Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-01GPU: add 2D projection functionCampbell Barton
When projecting into screen space Z value isn't always needed. Add 2D projection functions, renaming them to avoid accidents happening again. - Add GPU_matrix_project_2fv - Add ED_view3d_project_v2 - Rename ED_view3d_project to ED_view3d_project_v3 - Use the 2D versions of these functions when the Z value isn't used.
2021-05-25Fix T86956: VSE shading mode ignores Grease Pencil Vertex colors.Jeroen Bakker
Issue is that due to the strange definition of render in grease pencil (meaning should be rendered similar to rendering). This included normal viewport rendering in OB_RENDER and OpenGL render in OB_RENDER. For other rendering modes the overlay vertex opacity would be used. This patch sets this value to 1 when rendering via a scene strip override. NOTE: that this isn't a good solution as I expect that users want to use the opacity of the Grease pencil object. Perhaps the GPencil team has a better solution for it.
2021-05-21Cleanup: spellingLeon Zandman
Includes fixes to misspelled function names. Ref D11280
2021-05-19Assets: Use textures (and shadows) for automatic object previewsSeverin
Textures may be important to be able to identify an object. They are also a way to make many objects look more like when rendered with an advanced render engine, without being that expensive. So this seems like a simple way to increase usefulness of the automatic previews.
2021-05-14GPencil: Refactor Append operatorsAntonio Vazquez
Now the operators work like other areas of Blender using the list of selected objects. Also, the name has been changed to: ```Layers: - Copy Layer to Selected - Copy All Layers to Selected Materials: - Copy Material to Selected - Copy All Materials to Selected``` Reviewed By: mendio, pablovazquez, pepeland Differential Revision: https://developer.blender.org/D11216
2021-05-12PyAPI: remove context.active_baseCampbell Barton
All other access to the Base structure from Python was removed, it seems this was left in by accident. Ref T85675
2021-05-07UI: Display indicator in the 3D Viewport when Clipping Region is onPablo Vazquez
Small addition inspired by [this tweet](https://twitter.com/Vorundor/status/1390645286624763909) of a user in a situation I also saw myself in the past. Showing "(Clipped)" next to the view name in the `Text Info` overlay fits well since it's a per-viewport setting. {F10059921, size=full} While on Local view: {F10059925, size=full} Multiple viewports: {F10059946, size=full} Reviewed By: Severin Differential Revision: https://developer.blender.org/D11193
2021-05-02Merge branch 'blender-v2.93-release'Robert Guetzkow
2021-05-02Fix T82824: Draw sensor size with correct alphaRobert Guetzkow
Previously the option in the camera's //Object Data Properties > Viewport Display > Sensor// would not display the sensor in camera view. This seemed to be caused by the theme color `TH_VIEW_OVERLAY` having zero set for the alpha channel and alpha blending being active, resulting in no visible output. Hence `immUniformThemeColorShade(TH_VIEW_OVERLAY, 100);` is replaced with `immUniformThemeColorShadeAlpha(TH_VIEW_OVERLAY, 100, 255);`. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11075
2021-04-28Cleanup: Fix inconcistent array lengths in function declarationsHans Goudey
In some cases functions were defined with arguments of different array lengths in headers vs. implementations. This commit fixes some of the cases I ran into, but probably not all of them.
2021-04-22Fix too big grid plane for Add Object tool on Retina displaysJulian Eisel
The grid plane was drawn too big on retina displays compared to other screens, because the factor was multiplied by the native pixel-size, which is 2 for Retina displays.
2021-04-21Merge branch 'blender-v2.93-release'Philipp Oeser
2021-04-21Fix T87677: Add primitive tools produce wrong sized objects after changing ↵Philipp Oeser
values in 'Adjust Last Operation' Always use the defaults here (radius, depth etc), since desired bounds have been set interactively, it does not make sense to use a different value from a previous command. The Cube tool has already seen a fix for this in rB26e5718e29a7, but Cone/UVSphere/Cylinder/IcoSphere havent. Maniphest Tasks: T87677 Differential Revision: https://developer.blender.org/D11038
2021-04-19Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-19Fix spin-gizmo button tool-tip placementCampbell Barton
gizmo_button2d_bounds result wasn't valid when the gizmo was part of a 3D gizmo group. Regression in cf6d17a6aa421e0038fc1f8e60e3f1f708887c3e
2021-04-18Cleanup: make formatJacques Lucke
2021-04-17Measure Tool: Snap to Cage GeometryGermano Cavalcante
For Measure tool, it is more useful to snap to what is really visible. So use the cage instead of the geometry that may be hidden with Bmesh.
2021-04-17Transform Snap Refactor: Use enum for cage snap optionsGermano Cavalcante
This allows the addition of the `SNAP_GEOM_CAGE` option. Currently unused.
2021-04-17Fix wrong logic used in 'ED_view3d_depth_read_cached'Germano Cavalcante
It is important to limit the pixels read on `BLI_array_iter_spiral_square`. Fortunately `ED_view3d_depth_read_cached` was not being called with a `margin` parameter. Wrong logic introduced in rB44c76e4ce310.
2021-04-17Fix wrong logic used in 'ED_view3d_depth_read_cached'Germano Cavalcante
It is important to limit the pixels read on `BLI_array_iter_spiral_square`. Fortunately `ED_view3d_depth_read_cached` was not being called with a `margin` parameter. Wrong logic introduced in rB44c76e4ce310.
2021-04-13Revert 87aa514611b9: Removal of Lock Camera Gizmo ButtonHarley Acheson
Differential Revision: https://developer.blender.org/D10968 Reviewed by Julian Eisel
2021-04-11Cleanup: spellingCampbell Barton
2021-04-08Add ability to get a selection list of bonesSebastian Parborg
This adds the ability to get a selection list for both edit mode bones and pose mode bones. To do this the selection menu list logic had to be reworked a bit. Before it only stored the names of objects. This might work will of objects, however as stated in the code, it might fail for linked objects (so multiple object can have the same name in some corner cases). For bones it is a very common occurance where you can have multiple armature that has the same bone names. So now it also stores the object and bone pointers for this case. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D10570 Fix T85796
2021-04-053D View Utils: Add 'margin' parameter to 'ED_view3d_depth_read_cached'Germano Cavalcante
Matches the alternative function ED_view3d_autodist_depth, but is more efficient since it uses the cache. No functional changes.
2021-04-03Fix T87162: Measure Tool Not WorkingGermano Cavalcante
The non-enabled gizmo was overwriting the projected coordinate value.
2021-04-01Cleanup/Refactor: Use flags instead of bool to configure the snap gizmoGermano Cavalcante
This simplifies the addition of future improvements. Also make it more practical to expose as a parameter of gizmo for Python.
2021-04-01Cleanup/Refactor: Transform Orientation: Use 'orient_index' instead ↵Germano Cavalcante
'orient_type' `orient_index` is a more comprehensive value as it reveals both the type and index. Differential Revision: https://developer.blender.org/D9595
2021-04-01Curve: Remove 'CU_2D' flag used for nurbsGermano Cavalcante
This fixes T86440 As the CU_2D flag is set for nurbs, a Curve can have 2D nurbs mixed with 3D. But the UI does not allow this mixing. It updates all nurbs to 2D or 3D when set. So remove this specific flag for nurbs. This may break old files, since 2D curves with mixed 3D are now set as 3D. Differential Revision: https://developer.blender.org/D10738
2021-03-31Cleanup: improve navigation gizmo flag useCampbell Barton
Flag check for V3D_LOCK_CAMERA used boolean style assignment to a char, which worked with this flag but could fail if other flags are added that use this convention in the future. - Add static type checks for values so any change to DNA types will need to be made in the navigation gizmo too. - Move camera lock check from `rv3d` to `v3d`, as this isn't stored in the region data.
2021-03-31UI: Gizmo Button to Lock Camera to ViewHarley Acheson
2D gizmo navigation button that toggles 'Lock Camera to View' while in Camera View. Differential Revision: https://developer.blender.org/D10835 Reviewed by Campbell Barton
2021-03-30Cleanup/Refactor: Unify functions that redraw the depth bufferGermano Cavalcante
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and `ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`. This new function replaces `ED_view3d_autodist_init`. Also, since `ED_view3d_depth_update` depends on the render context, and changing the context is a slow operation, that function also was removed, and the depth buffer cached is now updated inside the new unified drawing function when the "bool update_cache" parameter is true. Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to `runtime.flag`. Differential revision: https://developer.blender.org/D10678
2021-03-29Gizmo: Use a utility function to read snap gizmo valuesGermano Cavalcante
No functional changes. This makes the `ED_gizmotypes_snap_3d_update` function more specialized.
2021-03-29Comments: improve docstring for ED_view3d_clipping_testCampbell Barton
The meaning of the return value wasn't obvious.
2021-03-22Fix T86666: Lasso and Circle select tools selecting objects behind clip_minGermano Cavalcante
Although it works well in most cases, the algorithm to detect if a point is within the limits of the camera does not work well in othographic mode. This commit also adds the option `V3D_PROJ_TEST_CLIP_FAR` (currently unused). Differential Revision: https://developer.blender.org/D10771
2021-03-18Fix 3DView not updating on some NC_ID notifiers.Bastien Montagne
Outliner uses a lot `NC_ID | NA_EDITED` e.g., which was not caught by the View3D editor for update.
2021-03-18Fix missing view3d updates after recent NC_SPACE notifier filtersPhilipp Oeser
Since {rB46aa70cb486d}, using `NC_SPACE | ND_SPACE_VIEW3D` as notifier is restricted to space data as a reference. This was still used though for RNA updates in other places (namely `rna_camera`, `rna_scene`, `rna_animviz`), and passing NULL would automatically set the notifier reference to the owner id. Above commit would happily filter these out, leading to missing refreshes. Now use more specific notifiers (in case of animviz a new `ND_DRAW_ANIMVIZ` was added). This was reported for Camera background images btw. Fixes T86670. Maniphest Tasks: T86670 Differential Revision: https://developer.blender.org/D10758
2021-03-18Cleanup: spellingCampbell Barton
2021-03-11Fix warning from own previous commitJulian Eisel
2021-03-11UI: Avoid unnecessary redraws of unrelated editors on space changesJulian Eisel
When adding a notifier, `reference` data can be passed. The notifier system uses this to filter out listeners, for example if data of a scene changes, windows showing a different scene won't get the notifiers sent to their listeners. For the `NC_SPACE` notifiers, a number of places also passed the space as `reference`, but that wasn't used at all. The notifier would still be sent to all listeners in all windows (and the listeners didn't use it either). Causing some unnecessary updates (e.g. see ed2c4825d3e2344). With this commit, passing a space will make sure the notifier is only sent to that exact space. Some code seems to already have expected that to be the case. However there were some cases that passed the space as `reference` without reason, which would break with this commit (meaning they wouldn't redraw or update correctly). Corrected these so they don't pass the space anymore.
2021-03-08Fix T86347: Add Primitive Tool fails for 1x1x1 scalePhilipp Oeser
The Tool stores desired dimensions as `scale` and thus had to half the scale again in `make_prim_init()` because by default all primitives are created at a size of 2 in blender. This worked, but: - [1] it logged something like size=2, scale=2,2,2 for a 2x2x2 cube [which does not sound right, it should be size=2 scale=1,1,1] - [2] it had to make an exception for the case scale is exactly 1x1x1 [this happens when the property is not set specifically, e.g. adding primitives from the menu] -- this exception led to double sized primitives being created when the tool asked for exact dimensions of 1x1x1 Now - instead of compensating in `make_prim_init()` - do this earlier in the tool itself, see `view3d_interactive_add_modal`, this fixes the bug and now also correctly logs size=2 scale 0.5,0.5,0.5 for a 1x1x1 cube. Maniphest Tasks: T86347 Differential Revision: https://developer.blender.org/D10632
2021-03-08Cleanup: use ofs instead of offs as an abbreviation for offsetCampbell Barton
Used for local structs/variables, since `ofs` is by far the most widely used abbreviation.
2021-02-24UI: Cleanup and fix labels and descriptions in various placesYevgeny Makarov
Changes include using proper and consistent grammar, simplifying phrasing, using correct terminology, and not including python API identifiers in tooltips. Differential Revision: https://developer.blender.org/D9924
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2021-02-17Cleanup: Abbreviate enums with 'UNSIGNED_' in the nameGermano Cavalcante
2021-02-16Assets: Remove appended asset when dropping operation failsJulian Eisel
When dropping an asset somewhere, it is appended and then a drop operation is called to actually add it to the scene based on current context. If this drop operation fails, the appended data-block is now still in the .blend. The user may not notice and not expect this. Instead idea is to rollback any changes done by dropping code if the operation fails, namely removing the appended data-block again. Adds a new `cancel()` callback which is called if the drop operator returns `OPERATOR_CANCELLED` to drop-boxes and a generic function to deal with assets on drop failure. Also removes the `free_id_on_error` property of the `NODE_OT_add_group` operator, which was used as ad-hoc solution to get this same behavior.
2021-02-16Cleanup: spellingCampbell Barton
2021-02-14Cleanup: spellingCampbell Barton
2021-02-14Cleanup: use doxy sectionsCampbell Barton
2021-02-14Cleanup: remove commented logic for Alt-Pad0 to use previous cameraCampbell Barton
While this could be useful, it's been removed since 2.4x, keeping this here doesn't help add it back since it would need to be re-implemented.
2021-02-13Cleanup: spellingCampbell Barton