Age | Commit message (Collapse) | Author |
|
Fix T97500 by removing the logic that for some unknown reason draws the
entire string if the min/max were swapped.
This function is only called in two places, once here in the NLA, and
the VSE. The bug only materializes in the NLA though.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D14742
|
|
Fix T97974 by having the marker rendering code explicitly set the
required line width.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D14890
|
|
|
|
full scaled image isn't used anymore. It was added to use a different scale when
displaying an image in the image editor. This was replaced by the image engine
redesign.
This change will reduce complexity of {T98375}.
|
|
`BKE_id_delete` should only check for consistency of user count with
regards to the tags and flags of the ID, not 'protect' nor even warn in
case a 'fake user' ID is deleted (such higher-level checks are to be
handled by higher-level code).
Also replace the assert + debug print by a CLOG error, this avoids
'assert crash' while still failing tests, and always producing a useful
message.
Fixes T98374 and T98260.
|
|
Dragging number buttons wasn't grabbing the cursor and would stop
when the pointer reached the screen edge & wasn't setting the cursor
visible on completion.
|
|
|
|
|
|
Currently all cursors are square, so this didn't show up as a bug.
|
|
Error in [0] caused the `set` callback be checked as the search callback.
[0]: 3f3d82cfe9cefe4bfd9da3d283dec4a1923ec22d
|
|
The day is currently specified as 90000 seconds which is 25 hours.
Obviously this is wrong, and this commit changes it to 86400s/24 hours.
Differential Revision: https://developer.blender.org/D15034
|
|
Mostly using built-in `__atomic` functions, with a special code path
using `MemoryBarrier()`on windows.
Authored By: Sergey Sharybin (sergey)
Reviewed By: Sergey Sharybin (sergey), Ray molenkamp (LazyDodo)
Ref D15020
|
|
Contrary to coarse extraction, GPU extraction uses the same buffer for
the coarse data, only the final GPU buffer needs to be offset.
|
|
The face dots normals may not be always requested, thus leading to a
crash by null pointer dereference.
|
|
|
|
|
|
Sorting faces caused the tessellation data to be outdated,
making faces show the wrong materials.
Re-calculate tessellation when re-ordering faces.
|
|
A follow up on the fix for T98145 for the 2.7x keymap.
|
|
Reviewed By: brecht
Ref D15021
|
|
|
|
Callbacks used in the gizmo operator template don't support updating
while being dragged, set the EXCLUDE_MODAL flag so the offsets
aren't accumulated. Also fix the offset being applied twice to the
move gizmo.
|
|
When expanding the data path for the context, use Context.temp_override
to extract context members. Without this, only context-members available
in the preferences were used which misses members which are likely to
be useful.
Iterate over all windows, areas and regions showing unique member as
candidates. The search is limited to WINDOW/PREVIEW region types, the
preferences space type is also excluded. See the doc-string for
rna_path_prop_search_for_context for additional notes on this.
|
|
Currently strings are used for cases where a list of identifiers would
be useful to show.
Add support for string properties to reference a callback to populate
candidates to show when editing a string. The user isn't prevented from
typing in text not found in this list, it's just useful as a reference.
Support for expanding the following strings has been added:
- Operator, menu & panel identifiers in the keymap editor.
- WM operators that reference data-paths expand using the
Python-consoles auto-complete functionality.
- Names of keying sets for insert/delete keyframe operators.
Details:
- `bpy.props.StringProperty` takes an option `search` callback.
- A new string callback has been added, set via
`RNA_def_property_string_search_func` or
`RNA_def_property_string_search_func_runtime`.
- Addresses usability issue highlighted by T89560,
where setting keying set identifiers as strings isn't practical.
- Showing additional right-aligned text in the search results is
supported but disabled by default as the text is too cramped in most
string search popups where the feature would make sense. It could be
enabled as part of other layout tweaks.
Reviewed By: brecht
Ref D14986
|
|
|
|
(Not meant to cause user visible changes.)
Makes use of the new iterators introduced in the previous commit. Some
benefits:
- Shorter, simpler, easier to read & understand
- Deduplicates logic
- Centralizes iteration logic, making it easier to replace tree storage
(as planned), see previous commit.
- Avoids having to pass (sub-)tree to iterate around (often redundant
since it's just `SpaceOutliner.tree`, even though `SpaceOutliner` is
already passed).
- Function arguments that are only passed to the recursive call are
recognized as unused (found and removed a few).
Also does some general cleanups while refactoring the code for the
iterators. Use `const`, use references (signals null is not expected),
early-exit (see 16fd5fa656af), remove redundant arguments, etc.
|
|
(Not meant to cause user visible changes.)
Adds some first new iterators to traverse over tree elements with a
functional syntax. Functional because it meant to be used with C++
lambdas.
For example, this common pattern:
```lang=cpp
void some_recursive_function(SpaceOutliner *space_outliner, ListBase *tree, ...)
{
LISTBASE_FOREACH (TreeElement *, te, tree) {
/* ... do something with the element ... */
/* Recurse into open children. */
if (TSELEM_OPEN(TREESTORE(te), space_outliner) {
some_recursive_function(&te->subtree, ...);
}
}
}
```
Gets simplified to this:
```lang=cpp
void some_function(SpaceOutliner &space_outliner, ...)
{
tree_iterator::all_open(space_outliner, [&](TreeElement *te) {
/* ... do something with the element ... */
});
}
```
We can add more iterators, e.g. some that support early exiting or
skipping children, returning a custom type, only act on selected
elements, etc.
The following commit will convert a bunch of code to use these. Some
further benefits will become visible there. Not all cases are straight
forward to convert, but hopefully more and more code can be refactored
to work with this. This deduplicates and centralizes the iteration
logic, which will later make it much easier to refactor how the tree
storage is done (e.g. move it to `SpaceOutliner_Runtime` and use a
better container than `ListBase`).
|
|
Design is to have warnings in the sub-tree of a collapsed element show
up next to the collapsed element. But if inside the collapsed element,
there was a uncollapsed one containing yet another element with a
warning, that warning wouldn't "bubble up" to the collapsed parent.
Issue was that the warning lookup would only recurse into collapsed
elements, rather than all elements inside of a collapsed element.
While the actual fix for this could've been simpler, I decided to rework
this code entirely. Recursively querying the warning message is now done
separately from drawing the message once found, which makes the code
easier to follow and implements the single responsibility principle
better.
|
|
Library overrides were basically using their own system to display
warnings for tree elements, even though for other display elements we
have a more general solution. With the previous commit this has been
generalized further and made trivial to extend.
|
|
Uses a inheritance based approach for querying warning of tree elements
and the mode column support of display modes.
For the warnings, tree elements can override the
`AbstractTreeElement::getWarning()` method and return a warning string.
The UI will draw the warning column with warning icons. This makes the
warning column more generalized and easier to extend to more use-cases.
E.g. library override elements will use this after a followup commit.
To support mode toggles a display mode can now just return true in the
`AbstractTreeDisplay::supportsModeColumn()` method. This makes it
trivial to add mode columns to other display modes, and less error prone
because there's no need to hunt down a bunch of display mode checks in
different places.
|
|
The wm_gesture_tag_redraw function was only called on mouse move, so the
flip state preview was not updating just by pressing the F key.
Reviewed By: Severin
Maniphest Tasks: T83519
Differential Revision: https://developer.blender.org/D9779
|
|
|
|
Even though the `no_unique_address` attribute has only been standardized
in C++20, compilers seem to support it with C++17 already. This attribute
allows reducing the memory footprint of structs which have empty types as
data members (usually that is an allocator or inline buffer in Blender).
Previously, one had to use the empty base optimization to achieve the same
effect, which requires a lot of boilerplate code.
The types that benefit from this the most are `Vector` and `Array`, which
usually become 8 bytes smaller. All types which use these core data structures
get smaller as well of course.
Differential Revision: https://developer.blender.org/D14993
|
|
There should be no visible change. The difference is mostly on how we
changed the rounding to handle the conversion from color space to the
new linear space of the attribute colors.
To convert the materials in icon_geom.blend I used:
```
import bpy
from mathutils import Color
def convert_material(material):
if not material.use_nodes:
return
if not material.node_tree:
return
node_tree = material.node_tree
for node in node_tree.nodes:
if node.type != 'RGB':
continue
color_original = node.outputs[0].default_value
color_new = Color(color_original[:3]).from_srgb_to_scene_linear()
color = (*color_new, color_original[3])
node.outputs[0].default_value = color
def main():
for material in bpy.data.materials:
convert_material(material)
main()
```
|
|
This allows for the new tool icons to use geometry nodes.
In order to do this I also had to use the new API for accessing the
attributes (instead of vertex colors). Which in turn requires a few
changes to use linear color space.
I went ahead and updated the entire code to use the linear space
everywhere. I will update the icon files manually to make sure the final
result is similar to what we have now.
Note: We now use round instead of int. That plus the changes regarding the
color space will lead to some icons to change slightly (no perceived
visual change).
Differential Revision: https://developer.blender.org/D14988
|
|
|
|
This was not effectively doing anything anymore, time to remove it.
|
|
`RNA_path_struct_property_py` cannot get const `ptr` parameter for now
(usage of `RNA_struct_find_property`).
Also make `RNA_path_resolve_` functions take a const PointerRNA
parameter.
|
|
A global variable was mistakenly used here which would accumulate the
vertex attributes (leading to an assertion failure after a while), use
the wrong number of components depending on the attribute data type,
among other issues.
|
|
This fix will ensure not to load any meshes that's being edited, thus
avoiding crashes.
Ref D15022
|
|
This was caused by a wrong mass rename on a piece of code used only on
older hardware.
|
|
Faces, edges, and vertices are still shown when GPU subdivision is
actived. This is because the related edit mode flags were ignored by the
subdivision code.
The flags are now passed to the various compute shaders mostly as part of
the extra coarse data, also used for e.g. selection. For loose edges, a
temporary buffer is created when extracting them. Loose vertices are
already taken into account as it reuses the routines for coarse mesh
extraction, although `MeshRenderData.use_hide` was not initialized,
which is fixed now.
|
|
This results in a speedup if the capture attribute is only needed
under specific circumstances (e.g. when a switch further down the
line is true). Previously, the input field was always evaluated.
Differential Revision: https://developer.blender.org/D15018
|
|
In case of line art "occlusion only" or contour not enabled, it's possible for an object
to not produce any feature lines.
This patch checks that to prevent freeing a NULL pointer.
|
|
This icon was using a material with a slightly different shade of
purple. I removed all the duplicated materials in icons_geom.blend
and this was the only "functional" change (though it is not noticeable).
|
|
This commit makes PointerRNA passed to RNA path API const.
Main change was in the `path` callback for RNA structs, and indirectly
the `getlength` callback of properties.
|
|
|
|
Weird file where the proxy object has a `proxy_group` pointer, which
does not instantiate any collection...
|
|
|
|
When appending an already linked data, `BKE_blendfile_append` would not
properly substitute the `item->new_id` pointer of link/append context
items with the local duplicate of the linked ID.
This would cause drag'n'drop of assets to work incorrectly in some
cases. Fixes part of T95706 and T97320.
|
|
- Use early return and continue to reduce right-shift.
- Rename `lv` to `tri_cos` for storing triangle coordinates.
- Reduce variable scope.
|