Updating attributes is now done specifically for each attribute,
and topology and visibility updates tag the draw cache data
explicitly too. That makes checking for updates with these
tags unnecessary.
Similar to the previous commits, previously all GPU buffers
were recreated when only masks changed. Now only
that masks are re-uploaded, using the same mechanism.
Part of #118145.
Similar to 7b69c82494.
We didn't make any good use of the time in between changing
mask values and recalculating whether nodes were fully masked
or not masked at all. There was no point in the lazy calculation.
Eager calculation should be faster too, for the same reason as
the above commit.
Part of #118145.
Similar to the previous commit, previously all GPU buffers
were recreated when only a color attribute changed. Now only
that attribute is re-uploaded, using the same mechanism.
Part of #118145.
Similar to the previous commit, previously all GPU buffers
were recreated when only face sets changed. Now only face
sets are re-uploaded, using the same mechanism.
Part of #118145.
Previously tagging node positions dirty set the `PBVH_UpdateDrawBuffers`
flag which was then used by `node_draw_update_mask` and
`tag_all_attributes_dirty`, which, as hinted by the name, causes a refresh
of all the PBVH GPU vertex buffers, not just positions and normals.
Instead of using that flag, add a function to the draw cache to tag only
position-related data dirty. This should give a performance improvement
when there are also face sets, masks, and/or generic attributes being
extracted for drawing.
Part of $118145.
This allows building tools that simplify Blender core development.
The depsgraph already exposed the dot graph using the `debug_relations_graphviz`
method. This has been extended to return the data as a string. The filepath is
optional now.
Similar functions have been added for node trees. Note that these should be used
on evaluated node trees.
Add a new function to the draw manager to only
issue a unique resource ID per `ObjectRef`.
This avoids the memory overhead of duplicating
the handle for each overlay.
The handle is stored inside the `ObjectRef` on
first query.
Rel #102179
Fixes Grid2D tiles background and boundaries drawing.
To reproduce switch to mesh edit mode and in UV editing view overlay
options set `Tiles X` or `Y` to more than 1.
Pull Request: https://projects.blender.org/blender/blender/pulls/127516
Also remove noisy print when a thumbnail can't be generated from an
animation. Similar prints have been commented and mainly seem useful
for debugging.
On MS-Windows the current frames file set the window title.
Remove this because it's strange to have the title flickering over
each name and the animation player already supports showing the filename
inside the window.
Avoid setting default cursor while number dragging. But always reset
cursor in title area if even there is a button in that space. Decrease
the title height slightly to work with title-less popups.
Pull Request: https://projects.blender.org/blender/blender/pulls/127598
Replace the `PBVH_UpdateBB` flag with a separate vector of booleans.
The simplest impact of this is that we can tell when there are no changed
nodes in constant time. Besides that, it also works better with the recent
IndexMask usage for selections of nodes, and allows better const
correctness too, since nodes themselves don't have to be changed
when positions are changed. This also leads into plans to change PBVH
draw data tagging to avoid having to reupload all attributes when only
one changes.
Part of #118145.
Pull Request: https://projects.blender.org/blender/blender/pulls/127587
Avoid truncation errors causing unneccessary resizing by passing floats
to UI_block_translate. That function translates block and button rects
which are floats.
Pull Request: https://projects.blender.org/blender/blender/pulls/127505
When inserting keys, look on related IDs for an action to reuse that.
This will make use of the slot system on the new layered action to ensure
the animation data doesn't collide.
This is done on the `id_action_ensure` function since that is the common
function to get an action off an `ID`.
IDs with more than 1 user will be skipped.
"Related ID" in this case is hardcoded with a `switch` statement for each ID type.
The system builds a list starting from the ID that should be keyed and
keeps expanding the list until an action is found or no more
non-duplicate IDs can be added. (This is using linear search for duplicate checks,
but I don't think we will deal with a lot of IDs in this case)
Pull Request: https://projects.blender.org/blender/blender/pulls/126655
This PR implements the Normalize operators in Weight Paint mode for
GPv3:
- Normalize weights of the active vertex group. This operator normalizes
all the vertex weights in the active vertex group to a value between 0.0
and 1.0.
- Normalize All. This operator normalizes the weights of all vertex
groups, so that for each vertex, the sum of the weights is 1.0. Weights
of locked vertex groups are not changed. By default, the active vertex
group also stays unchanged, unless it's necessary to reach a normalized
state.
The operators are added to the 'Weight' menu in Weight Paint mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/126302
This rename the `Cutter` tool's name, code and icon to `Trim`.
The legacy Grease Pencil code is unchanged.
This was discussed in the 2024-07-30 Grease Pencil Module Meeting.
Reasons for the change:
- Match the `Trim Stroke Ends` setting on brushes.
- Match the `stroke_trim` operator.
- Name is more clear and more commonly used.
- Frees the name for a future boolean cutting tool.
Pull Request: https://projects.blender.org/blender/blender/pulls/126452
This adds the following operators:
* Set Vertex Color
* Reset Vertex Colors
* Invert
* Brightness/Contrast
* HSV
* Levels
Also populates the `Paint` menu with them in vertex paint mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/127572