There is no reason at all for each ID read/write callbacks to have to
deal with this generic, common data explicitely. Generic ID read/write
code is the place to handle such data (just like asset, liboverride,
etc. data are handled already).
Note behavioral change expected here.
Previously the shader associated with a batch was
assigned separately. This meant on occasion, the
incorrect shader was used with the Metal backend.
Updating the shader fetch to use the context bound
shader instead of the batch shader member as per
OpenGL/Vulkan backends.
Also include state change check to be consistent
with OpenGL.
Authored by Apple: Michael Parkin-White
Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/111112
Outliner `do_item_rename` has checks so linked or overridden IDs cannot
be renamed.
A `TreeStoreElem`s ID can point to other data than "real" IDs though
(see how `outliner_add_element` casts to an ID from an arbitrary void
pointer and cases marked `/* NO ID */` in code). In those cases,
`ID_IS_LINKED` or `ID_IS_OVERRIDE_LIBRARY` _could_ return true and a the
renaming operation would fail.
Now also check if this is a real ID (`TSE_IS_REAL_ID`), so code can
continue.
Also add a proper notifier, so track renaming from the Outliner will
update the NLA immediately.
Pull Request: https://projects.blender.org/blender/blender/pulls/111110
Reason was a difference in poll functions (dropbox poll function vs.
operator poll function).
So the dropbox was actually recognized as being active (see
`dropbox_active`) but then when actually dropping, the corresponding
operator wasnt called (but instead another operator was).
In detail, the way `wm_handlers_do_intern` works, it checks all
dropboxes poll function if one succeeds it calls the dropbox operator.
But if that operators poll function fails, `wm_handlers_do_intern`
happily continues and "ends" the drop operations in a way we dont
actually get to the "real" dropbox & operator that was also recognized
as being active.
In the case of the report:
- dropbox for `UI_OT_drop_name` is active
- dropbox poll for `NODE_OT_add_object` (`node_object_drop_poll`)
succeeds though
- operator poll for `NODE_OT_add_object` (`node_add_object_poll`) fails
(it checks `UI_but_active_drop_name` already)
So in order to make this work, add the check for `UI_but_active_drop_name` to two dropbox poll
functions (and remove from the operator polls).
Probably good for LTS as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/110929
Some code attempted to use `BIFIconID` instead of `int` to pass around
icon-ids. Problem is, that this is just a subset of the allowed ids,
more icons may be created at runtime and extend the range of valid
icon-ids. Such icons could give runtime warning prints.
Idea is to use a `using BIFIconID = int;` instead. This way there is
still a descriptive type name, while the whole dynamic range of possible
icon-ids is supported.
Additionally multiple `using BIFIconID = int;` declarations are valid,
so we can place these in multiple headers and use the type name in APIs
instead of just `int`, whithout having to include a single header
defining them. A type mismatch (one instance differs from the others)
will result in a compiler error.
Pull Request: https://projects.blender.org/blender/blender/pulls/111052
Also semantically separate draw_lock and draw_unlock, as it
is more clear than a single method with a boolean argument.
Should be no functional changes.
This logic has not been working since 2014 [0] although it was briefly
fixed (by accident) when TARGETDIR_VER was made an absolute directory
[1] (since reverted as that caused problems with CPACK/WIN32).
"file(REMOVE_RECURSE ${TARGETDIR_VER})" would attempt to remove:
- "${CMAKE_BINARY_DIR}/${TARGETDIR_VER}" instead of
- "${CMAKE_INSTALL_PREFIX}/${TARGETDIR_VER}".
While this could be re-enabled by correcting the path,
it slows down the install target by copying files every "install".
This could be made to detect changes and only cleaning files in this
case however this ends up being fairly involved, see: PR !111084.
As stale files haven't been causing problems as far as I'm aware,
remove this code.
[0]: e43c5fa005
[1]: d605cc7574
Use the installed executable location instead of the build location,
this would work in situations when the build location had relevant
files accessible but this is often not the case.
This simple function just performed a null check and an array lookup.
Just writing it in the few places its used works fine too, and avoiding
the function call per triangle can improve and make the check clearer.
Also, avoiding the abstraction makes the "node fully visible" check
when building the PBVH more obvious; that has been refactored here.
Pull Request: https://projects.blender.org/blender/blender/pulls/111072
The goal is to move to more data oriented design, reducing memory
usage and simplifying code by clarifying data access, avoiding
unnecessary levels of abstraction, and reusing code.
- Simplify threading with the C++ threading API
- Pass the faces to update with an IndexMask instead of a pointer array
- IndexMask uses less memory and simplifies masking and iteration
- Store the grid to face map with indices instead of pointers
- Now this is exactly the same as `build_loop_to_face_map`
The changes in this keymap are much more involved.
If any shortcut isn't mentioned, that means it is unchanged.
General:
- All brush shortcuts have been removed for free custom mapping
- `S` & `U` are now consistently mapped for Brush size & strength
- Redundant shortcuts have been removed such as
- Line Session drawing (In GP Draw Tool)
- Select Alternate in GP
- Quadriflow Remesh (In Mesh Sculpt Mode)
- Box Hide (In Mesh Sculpt Mode)
- Dynamic Topology Toggle (In Mesh Sculpt Mode)
- Mask Overlay (In Mesh Sculpt Mode)
- Removed Lasso Mask/Select shortcuts (This keymap is mainly using the Tools instead. Easy to add back if needed.)
Mode Switching (Global change):
Easier mode switching access for any workflow.
- `123` = switch selection/mask modes for the **current mode**. If in object mode, it will first switch to edit mode (Previously this would always switch to edit mode)
- `4` = Mode switching pie menu (previously `4-7` for individual modes)
- `Tilde` = Transfer Mode (Previously not mapped. Useful for instant object switching while keeping the current mode)
- `5-0` = Unassigned
Brush vs Selection:
Multiple Modes were missing these shortcuts.
- `Shift` `LMB` = Smooth Brush
- `Ctrl` `LMB` = Inverted Brush
- `Shift` `Alt` `LMB` = Set Selection
- `Shift` `Alt` `Ctrl` `LMB` = Toggle-Extend Selection
Brush Size vs Select Linked:
These were previously in direct conflict. Now they are both distinct and based on other DCC software.
- `[` = Decrease Brush Size
- `]` = Increase Brush Size
- `Alt` `dbl LMB` = Select Linked Pick
- `Ctrl` `Alt` `dbl LMB` = Deselect Linked Pick
- `Ctrl` `L` = Select Linked
Select & Mask:
- `Q` = Cycle Masking/Selection Tools
- `Ctrl` `A` = Mask/Select Pie Menu (Draw, Paint, Sculpt Modes)
- `Alt` `A` = Auto-Masking Pie Menu (Mesh & GP Sculpt Mode)
- `Shift A` = Expand Mask (Mesh Sculpt Mode) / Grow Selection (Curve Sculpt Mode)
- `Shift` `Alt` `A` = Expand Mask by Normals (Mesh Sculpt Mode)
Face Sets & Visibility:
Previously missing shortcuts.
- `Shift` `W` = Face Set Expand
- `Shift` `Alt` `W` = Active Face Set Expand
- `Ctrl` `W` = Face Set Edit Pie Menu
- `Page Up` = Grow Active Face Set
- `Page Down` = Shrink Active Face Set
- `H` = Hide Active Face Set
- `Shift` `H` = Hide Inactive Face Sets / Show everything
- `Ctrl` `H` = Hide Masked Geometry
Transforming:
For Sculpt and Weight Painting modes. Previously missing
- `C` = Cursor Tool
- `W` = Move Tool
- `E` = Rotate Tool
- `R` = Scale Tool
- `T` = Transform Tool
- `Shift` `RMB` = Set Cursor / Set Transform Pivot in Sculpt Mode
Sculpting:
Consistent and easier to access shortcuts for remeshing and subdiv level .
- `Shift` `D` = Subdivision level Down (Previously on `Pg Down`)
- `D` = Subdivision level Up (Previously on `Pg Up`)
- `Shift` `Ctrl` `D` = Voxel Size / Dyntopo Size
- `Ctrl` `D` = Voxel Remesh / Dyntopo Flood Fill
Adding missing shortcuts
Painting:
Fixing various missing or inconsistent shortcuts.
- `Backspace` = Set Color/Weight
- `I` = Sample Color/Weight
- `Alt` `I` = Sample Vertex Group
- `Alt` `Ctrl` `I` = Vertex Group Lock Pie
- `X` = Swap Colors (Previously missing in Sculpt Mode)
Grease Pencil:
Adding many missing shortcuts.
- `Shift S` = Animation Menu (Previously on `I` and missing outside of Draw Mode)
- `Shift` `Alt` `S` = Insert Blank Keyframe
- `Alt` `H` = Unhide Layers
- `Ctrl` `H` = Hide Active Layer
- `Shift` H = Hide Inactive Layers
- `Y` = Active Layer Menu
- `Shift` `Y` = Merge Layer Down
- `Alt` `Y` = Material Menu
- `Alt` `Backspace`/`Delete` = Delete Active Keyframe (Previously on `D` `Backspace`/`Delete`)
Other:
Adding missing shortcuts.
- `MMB` for panning in the User Interface (Highly requested)
- `Shift F` = Center View to Mouse (Replacing Frame Selected(All Regions) shortcut)
- `D` = Annotate
- `L` = Toggle Stabilize Stroke (Previously on `Shift` `S`)
- `Ctrl F` = Weight radial control in weight painting modes
Ref !109750.
Use the variable instead of "." for the install destination.
While they're equivalent, it's not discoverable where the value
for "." is set.
It also results in paths containing "/./", while valid isn't so nice
if the paths are copied from the terminal for use elsewhere.