Currently the overlay text, like stats for example, are drawing with
the widget_label font style size but using widget's weight. This is
just because UI_fontstyle_set is not called. Without this call we can
get a jiggling of the overlay text if these two styles differ in
weight. This PR also makes an (unnoticeable) correction to the font id
used in fontstyle_set_ex. uiFontStyle's uifont_id is not always the
same id as regular font ids, but here they are confused.
Pull Request: https://projects.blender.org/blender/blender/pulls/119808
Cached strip images were not invalidated, which caused, that these
images were kept in memory in incorrect colorspace.
Code readability was improved a bit and clarifying comments were added
to avoid confusion about what is the code supposed to do.
Pull Request: https://projects.blender.org/blender/blender/pulls/119475
This happened, because function returned early if `Editing` was nullptr.
However it is needed only for timeline boundbox, which is already initialized
for case where there are no strips.
Pull Request: https://projects.blender.org/blender/blender/pulls/118864
- Avoid unnecessary redundancy in function and variable names
- Use more consistent variable names in some places
- Avoid duplicate null checks and incorrect "ensure" naming
- Use const in a few places
- Pass more specific arguments besides just the curves
- Remove unnecessary namespace specification
This report includes a file that demonstrates a crash when ctrl-
clicking the "dot" icon to add to the objects in edit mode. This is
because the object has a mesh shared with another object that is
already in edit mode. This PR allows editing only one object at a
time between objects that share data.
Pull Request: https://projects.blender.org/blender/blender/pulls/119704
Caused by 1cca960677.
That commit stated that creating the final subdivided attribute didn't
free the "proc" attribute buffer that contains the data from the Curves
control points. However that wasn't the case, given the call to
`GPU_VERTBUF_DISCARD_SAFE` in that function. That caused a crash when
the overlay engine and EEVEE both wanted to access the VBO and it was
discarded the second time. To fix that, only regenerate the
`proc_attributes_buf` when it doesn't already exist.
This matches the "ensure" behavior that already exists for the
`cache.final[subdiv].attributes_buf` buffer, so conceptually it
seems fine.
Pull Request: https://projects.blender.org/blender/blender/pulls/119795
When creating popover with `UI_popover_begin` the popover block
is created just once without a region and since `UI_popover_begin` blocks
are not support refreshing, layout panels may not be compatible
in this kind of popover since open/close state cannot be refreshed either.
Only `UILayout.popover(...)` popovers are supported to have layout panels.
Pull Request: https://projects.blender.org/blender/blender/pulls/119796
When frame capturing cannot be start an error is printed to the console.
Most of the time the issue is that you're not running from within a frame
capturing environment. For example not from your IDE/GPU debugger.
The print statement is often just not that useful. Especially when
running the `WITH_GPU_DRAW_TESTS` where it floods the console.
Pull Request: https://projects.blender.org/blender/blender/pulls/119783
Replace the use of the `LIB_TAG_DOIT` flag which cwas used to
only process each object data ID once with a Set. Return the objects
or bases in a Vector. Now we only iterate over the view layers bases
once instead of three times.
Pull Request: https://projects.blender.org/blender/blender/pulls/119788
Ensure that subdividing "Bone" results in a chain "Bone", "Bone.001",
"Bone.002", etc.
Before this commit the order would be "Bone", "Bone.004", "Bone.003",
etc.
This might break add-ons that assume to know the bone names before the
actual subdivision happens. This would always have been fragile, as
there may, for example, already have been a "Bone.001"; in that case
subdividing "Bone" would result in "Bone", "Bone.002", etc. Instead, the
parent-child chain should be followed.
Pull Request: https://projects.blender.org/blender/blender/pulls/119775
Fix the name uniqueness check for editbones. The function can receive a
"bone to ignore", which would not be properly ignored. If it was found
earlier in `armature->edbo` than another bone with the same name, the
name would incorrectly be marked as unique.
This issue only occurred when a "bone to ignore" was passed to the
uniqueness check. This never actually happens in the current code, but
that's going to change soon.
This PR extends the existing `Ease` operator with a sharpness property.
This means it has two parameters:
* Curve Bend: Define which key to favor. At 0 it's exactly between the two keys.
* Sharpness: Higher values make the change more abrupt.
During modal operation it is possible to switch the slider between those two by pressing `TAB`.
Pull Request: https://projects.blender.org/blender/blender/pulls/117287
No functional changes intended.
The `insert_keyframe` function had a `bAction` argument that could be
a `nullptr`. If it was a `nullptr` it would be queried from the `ID`.
However in all cases where it is passed it is also gotten from the `ID`, making
the argument redundant.
This PR removes the argument to simplify the function.
Pull Request: https://projects.blender.org/blender/blender/pulls/119742
a958ae36e8 introduced support for UI lists to reference items that would
never be shown, regardless of filter settings. This was to skip assets
in the asset view template that were not of the requested type. UI list
sorting code wasn't updated to account for such items that should be
entirely ignored.
Pull Request: https://projects.blender.org/blender/blender/pulls/109157
When previewing an action in the NLA, the drawing code would
calculate the Keylist for the whole action regardless of what is shown.
This patch limits the keylist creation to only do it for the viewport range
increasing performance in the case when less than the whole action is visible.
whole F-Curve visible
* Before 60ms
* After 60ms
zoomed in
* Before 60ms
* After 1.6ms
Pull Request: https://projects.blender.org/blender/blender/pulls/119470
Use the Graph Editor icon for the "View in Graph Editor" operators,
to make a connection with the entry in the list of editors and the
View menu in the Dope Sheet.
Only use icon on the first item of the section, according to the HIG.
By default a URL would be used for the module name of new remote repos,
the '.' characters were removed, joining words together.
Even though this often isn't user visible, it is used for extension
directory names, command-line access & may show up in error messages.
Replace: `{BLENDER_RESOURCE_PATH_USER}/extensions`
With: `{BLENDER_USER_EXTENSIONS}`
This follows BLENDER_USER_CONFIG & BLENDER_USER_SCRIPTS conventions.
Reading the environment variable and accessible via
`bpy.utils.user_resource('SCRIPTS')`
This was only used on WIN32 when the temporary directory didn't exist.
When the check was added [0] this made some sense because it relied on
`U.tempdir` existing, since then additional checks have been added to
ensure a temporary directory can be used. Further, this fall-back
location isn't documented in the user manual.
[0]: 615db01b01
Caused by ddcfc46ee6.
That commit assumed that the cage mesh always had the deformed
position and normal data. But that isn't true, as shown in the example
in the report. To fix the bug, simplify things, and make the goal clearer,
just copy the struct directly.
Pull Request: https://projects.blender.org/blender/blender/pulls/119755
Caused by 25a10c211f.
The socket_type field for socket declarations wasn't set for declarations
created from the node group interface DNA tree structure. Arguably the
socket types should be set by the constructors, but setting it in one more
place isn't bad either, and is a simple fix for now.
When "moving" the new node group to the same library as the object, its
original name has to be cleared from the name-map as well. That's
because there is a separate name-map for each library. I had this in
the original PR, but incorrectly removed this because I thought it was
unnecessary.
Pull Request: https://projects.blender.org/blender/blender/pulls/119747