Age | Commit message (Collapse) | Author |
|
Besides helping to avoid buffer overflow errors this reduces complexity
of BLI_str_utf32_as_utf8 which needed a special loop for the last 6
characters to avoid writing past the buffer bounds.
Also add BLI_str_utf8_from_unicode_len which only returns the length.
|
|
Follow up to fix for T89868.
|
|
This was added in b24712a9ca6fa807660a02d6988269748daecdbf
but is no longer needed as of efc129bc827558e55cf4619b8e2ca502342338f3.
Further, this wasn't reliable as it could fail on linked library data
which has a different base directory.
Assert when blend file relative paths are passed to BLF
(matching imbuf file loading).
|
|
|
|
The default float IDProperty min value rB8b9a3b94fc148d19 for when there
is no UI data was FLT_MIN instead of -FLT_MAX, which meant that animated
custom property values couldn't be less than zero unless they had their
UI data values edited previously.
That's a mistake I won't make again! Also change the int minimums from
-INT_MAX to INT_MIN to sanitize the whole situation.
|
|
This patch just clamps and rounds node contents and socket locations
so they don't appear to jiggle around when you move them. This issue
happens because node sizing and positioning are in floats while text
content must be pixel-aligned.
See D11684 for more details and comparisons.
Differential Revision: https://developer.blender.org/D11684
Reviewed by Julian Eisel
|
|
The overlay was drawn twice on top of each other making it hard to see,
hard to theme, and making it more prominent in the wrong areas (before
frame 0, not even start frame). The comment in the code was also wrong
since it said "frame one" but it was 0.
Checked with the Animation module team that it's better to use start/end
frame range instead of frame 0.
There is a TODO note to de-duplicate this section eventually so I left it there.
This fix is currently done for Grease Pencil and Mask modes, but it should
also be fixed for the regular Dopesheet mode (in line 244 if anyone wants to do it).
|
|
The storage of IDProperty UI data (min, max, default value, etc) is
quite complicated. For every property, retrieving a single one of these
values involves three string lookups. First for the "_RNA_UI" group
property, then another for a group with the property's name, then for
the data value name. Not only is this inefficient, it's hard to reason
about, unintuitive, and not at all self-explanatory.
This commit replaces that system with a UI data struct directly in the
IDProperty. If it's not used, the only cost is of a NULL pointer. Beyond
storing the description, name, and RNA subtype, derived structs are used
to store type specific UI data like min and max.
Note that this means that addons using (abusing) the `_RNA_UI` custom
property will have to be changed. A few places in the addons repository
will be changed after this commit with D9919.
**Before**
Before, first the _RNA_UI subgroup is retrieved the _RNA_UI group,
then the subgroup for the original property, then specific UI data
is accessed like any other IDProperty.
```
prop = rna_idprop_ui_prop_get(idproperties_owner, "prop_name", create=True)
prop["min"] = 1.0
```
**After**
After, the `id_properties_ui` function for RNA structs returns a python
object specifically for managing an IDProperty's UI data.
```
ui_data = idproperties_owner.id_properties_ui("prop_name")
ui_data.update(min=1.0)
```
In addition to `update`, there are now other functions:
- `as_dict`: Returns a dictionary of the property's UI data.
- `clear`: Removes the property's UI data.
- `update_from`: Copy UI data between properties,
even if they have different owners.
Differential Revision: https://developer.blender.org/D9697
|
|
Caused by recent lazy render result passes allocation change.
|
|
The __LINE__ was not properly expanded.
|
|
Reason was that the notifier did not set the NS_VIEW3D_SHADING
subtype, which the VR view listens for for a shading update.
In the case of "toggle xray", a notifier was absent altogether.
|
|
Add mode to overwrite strips on overlap instead of resolving overlap.
When overlap is created, 3 things can happen:
- On partial overlap, handles of overlapped strip are moved
- On complete overlap with smaller strip, overlapped strip is split
- On complete overlap with larger strip, overlapped strip is removed
This mode can be enabled in header.
Reviewed By: fsiddi, mano-wii
Differential Revision: https://developer.blender.org/D11805
|
|
|
|
Caused by {rB1a81d268a19f}.
This caused e.g. ALT-clicking the 'Link' button to not propagate to
other selected objects (same as the 'Copy To Selected' context menu
entry).
If these are not unique across IDs, checks in ui_selectcontext_begin()
or copy_to_selected_button() could fail.
Now offset by ID pointer.
thx @JacquesLucke for clarification on the POINTER_* macros (and why
not to use them)!
Maniphest Tasks: T90907
Differential Revision: https://developer.blender.org/D12321
|
|
This reverts 151eed752b01. Originally thought it was necessary to
initialize selected/active indices to -1 to prevent out-of-bounds
list access, but this is not needed since null checks are already
performed after obtaining list members via BLI_findlink().
In addition, leaving indices zero-initialized facilitates use of the
Python API, for example when displaying action map information in a
UI list.
|
|
|
|
Various changes to reduce risk of out of bounds errors in utf8 seeking.
- Remove BLI_str_prev_char_utf8
This function could potentially scan past the beginning of a string.
Use BLI_str_find_prev_char_utf8 instead which takes a limiting
string start argument.
- Swap arguments for BLI_str_find_prev_char_utf8 so the stepping
argument is first and the limiting argument is last.
This matches BLI_str_find_next_char_utf8.
- Change behavior of these functions to return it the start or end
pointers instead of NULL, which complicated use of these functions
to calculate offsets.
Callers that need to check if the limits were reached can compare
the return value with the start/end pointers.
- Return 'const char *' from these functions
so they don't remove const from the input arguments.
|
|
|
|
|
|
Reuse the existing font loading function which handles this case.
|
|
Add an option to the mask modifier to use the vertex weights to generate
smooth in between geometry, instead of just deleting non complete faces.
This can be used to make all sorts of smooth dissolve animations
directly with geometry, which are usually hacked together with shaders.
It also allows for implicit function plotting using geometry nodes and
boolean like operations on non manifold geometry with the proximity
modifier.
Reviewed By: campbellbarton
Ref D10979
|
|
|
|
These buttons were in Meshes but not for Grease Pencil. This patch add them in order to keep consistency.
Reviewed By: HooglyBoogly
Maniphest Tasks: T90973
Differential Revision: https://developer.blender.org/D12328
|
|
Change Area Move snapping locations to even 12ths, rather than current
eights and thirds, so snap distances are consistent sizes. Also adds
snapping at minimum and maximum locations.
see D11938 for details and illustrations.
Differential Revision: https://developer.blender.org/D11938
Reviewed by Hans Goudey
|
|
|
|
Solution similar to the one seen in {rBb94ab93dfb82}.
The idea is to find the window and region under the cursor to use in the
operator.
Reviewed By: brecht
Maniphest Tasks: T90817
Differential Revision: https://developer.blender.org/D12310
|
|
The window and region find utility can be used in other eyedropper
operators.
|
|
This better matches other functions like `BKE_screen_find_area_xy`.
|
|
Now you can get a shader that uses Clip Planes and set the number of
Clip Distanes with `gpu.state.clip_distances_set(value)`.
|
|
|
|
|
|
|
|
|
|
Should be no visible change on user side.
Preparing for render parts removal as part of Cycles X project.
Differential Revision: https://developer.blender.org/D12317
|
|
I think there are the following issues with {rB5fa6cdb77a98}:
- if we introduce a PROP_UNIT_TIME_ABSOLUTE unit, shouldnt it be visible
to RNA as well?
- seems like a double entry sneaked into that commit?
This is in preparation to use this for render time limit in cycles-x.
ref. T90701
Maniphest Tasks: T90701
Differential Revision: https://developer.blender.org/D12315
|
|
Also add gizmo group example to the tool-template.
|
|
These update calls are already performed by
ED_object_add_type_with_obdata.
|
|
Newly created objects would not become visible until
another action forced a depsgraph update.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Error in 452cc0193255c9e80ca4f163a2d524ed6bb17ef1
|
|
Before, distances from each component were handled in the same loop,
making it more complicated to add support for more component types
in the future (and probably hurting performance by dealing with two
BVH trees at the same time, though I didn't test that).
Now each component is handled in a separate function, so that adding
support for another component type is much simpler.
|
|
Remove redundant code for drawing text strings that contain only ASCII.
See D12293 for much more detail.
Differential Revision: https://developer.blender.org/D12293
Reviewed by Campbell Barton
|
|
Missed in {rB0d36439f95c0}.
|
|
The code assumed that when a node group is is at the highest
level in the node editor, then it is embedded into another data
block and can't be referenced by other node groups. This is true
for shader and compositor nodes, but not for geometry nodes.
|