An alpha component can be specified for an object's color. This adds an alpha
socket to the object info shader node allowing for the alpha component of the
object's color to be accessed in the shader editor.
Differential Revision: https://developer.blender.org/D14141
Fix crash when creating a pose asset for which the file list entry in
the asset browser is scrolled off-screen. Because of the
off-screen-ness, it wasn't loaded into memory, which eventually caused
an unexpected NULL pointer.
The solution was to use a different function (`filelist_file_find_id`)
that can reliably find the file list entry, after which the cache entry
can be created.
Reviewed by: Severin
Differential Revision: https://developer.blender.org/D14265
When drawing the driver editor, only skip drawing the "scrubbing area"
and not the Y-axis values or the scroll bars.
The issue was introduced in rBb3431a88465db2433b46e1f6426c801125d0047d
to avoid drawing the playhead in the Driver Editor but also prevented
the text on the y axis from being drawn.
Reviewed by: Severin, sybren
Maniphest Tasks: T95531
Differential Revision: https://developer.blender.org/D14022
Fix crash when creating a pose asset for which the file list entry in
the asset browser is scrolled off-screen. Because of the
off-screen-ness, it wasn't loaded into memory, which eventually caused
an unexpected NULL pointer.
The solution was to use a different function (`filelist_file_find_id`)
that can reliably find the file list entry, after which the cache entry
can be created.
Reviewed by: Severin
Differential Revision: https://developer.blender.org/D14265
Fix an assert by commenting out the assert.
In normal situations all keyframes are sorted. However, while keys are
transformed, they may change order and then this assertion no longer
holds. The effect is that the drawing isn't perfect during the
transform; the "constant value" bars aren't updated until the
transformation is confirmed. Apart from that, the code runs fine, so it
seems like a workable workaround.
When drawing the driver editor, only skip drawing the "scrubbing area"
and not the Y-axis values or the scroll bars.
The issue was introduced in rBb3431a88465db2433b46e1f6426c801125d0047d
to avoid drawing the playhead in the Driver Editor but also prevented
the text on the y axis from being drawn.
Reviewed by: Severin, sybren
Maniphest Tasks: T95531
Differential Revision: https://developer.blender.org/D14022
Annotation tool is used as a general mark tool for many add-ons. To be able to detect when an annotation is done is very handy to integrate the annotation tool in add-ons and other studio workflows.
The new callback names are: `annotation_pre` and `annotation_post`
Both callbacks are exposed via the Python module `bpy.app.handlers`
Example use:
```
import bpy
def annotation_starts(gpd):
print("Annotation starts")
def annotation_done(gpd):
print("Annotation done")
bpy.app.handlers.annotation_pre.clear()
bpy.app.handlers.annotation_pre.append(annotation_starts)
bpy.app.handlers.annotation_post.clear()
bpy.app.handlers.annotation_post.append(annotation_done)
```
Note: The handlers are called for any annotation tool, including eraser.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D14221
Using press to activate the Tweak tool doesn't work well when used a
fallback tool as the drag event is often used by the current tool -
making it impossible not to select when dragging (unless the fallback
tool is disabled entirely).
Resolve this by using CLICK events when the Tweak tool is used as a
fallback.
Even though this avoids the crash, check for null-pointer de-reference
since changes to the key-map shouldn't cause operators to crash.
Note that the ability for operators to access a gizmo before it's fully
initialized is a more general problem that should be addressed, but out
of scope for a bug-fix.
Reviewed By: zeddb, JulienKaspar, Severin
Maniphest Tasks: T95591
Ref D14231
When a grease pencil data-block has multiple users and is subject
to modifiers, layer transforms or parenting, performance
(especially playback) is greatly affected.
This was caused by the grease pencil eval process which does per
instance full-copies of the original datablock in case those
kinds of transformations need to be applied.
This commit changes the behavior of the eval process to do shallow
copies (layers with empty frames) of the datablock instead
and duplicates only the visible strokes.
When we need to have a unique eval data
per instance, only copy the strokes of visible
frames to this copy.
Performance:
On a test file with 1350 frames 33k strokes and 480k points
in a single grease pencil object that was instanced 13 times:
- master: 2.8 - 3.3 fps
- patch: 42 - 52 fps
Co-authored by: @filedescriptor
This patch was contributed by The SPA Studios.
Reviewed By: #grease_pencil, pepeland
Differential Revision: https://developer.blender.org/D14238
Regression in d961adb866cc2d7a95e4c6a7f06c49e346ec1abe,
it's important that for the Mesh used for undo storage matches
the shape-key instead of using the coordinates of the Basis key.
Prior to bfdbc78466ac14d45f353db9aa39cb21bb962701 a different method of
restoring the basis shape-key coordinates was used (restoring from the
input `Mesh.mvert` array). When undo wrote the edit-mesh into the mesh
this was always NULL so the basis shape keys coordinates were never
used.
Now a parameter has been added so undo can use the active shape for the
meshes vertex coordinates.
Reviewed By: sergey
Maniphest Tasks: T96205
Ref D14258
Undo would invalidate image owned GPU textures only. Textures
that are owned by the editor were not refreshed. This patch would
invalidate all the GPU textures by marking the whole image dirty.
This can be improved later as we could add partial updates of GPU
textures.
Reviewed By: mont29
Maniphest Tasks: T96163
Differential Revision: https://developer.blender.org/D14259
Caused by oversight in 2bcf93bbbeb. Operator returns `OPERATOR_CANCELLED`
when it should return `OPERATOR_FINISHED`.
Reviewed By: mano-wii, campbellbarton
Differential Revision: https://developer.blender.org/D14243
The "curve_type" was transferred to instances because it isn't a
built-in curve attribute. Then it was interpolated as a point
domain attribute from the instance domain in the realize
instances node.
The fix was just missing from 9ec12c26f16ea3da1e6de95d5.
`curve_type` needs to be marked as a built-in attribute.
Support drag/drop of materials to Properties Material Slots.
See D13549 for more details.
Differential Revision: https://developer.blender.org/D13549
Reviewed by Julian Eisel
The node should be faster than in 3.1, for a few reasons:
- It doesn't need to calculate and allocate the curve offsets.
- It doesn't need to de-reference a pointer for each curve.
- The inputs are accessed from the virual arrays fewer times.
On top of that, I added two other performance improvements:
- The node is multi-threaded when there are many curves.
- There are generated special cases for single value and span inputs.
**Performance**
With a set position node affecting 1 million splines with a selection
based on this node, on an Intel i5 8250U (times are approximate):
| Before | After | Speedup |
| 760 ms | 60 ms | 13x |
Differential Revision: https://developer.blender.org/D14233
When removing a modifier, changing the layer transform or updating
the parent of a grease pencil object that has a multi-user datablock
and animation data, the eval data is not updated properly (after a
frame change). This can also cause memory leaks.
The fix makes sure that we free and reset any runtime copy
(`ob->runtime.gpd_eval`) in `BKE_gpencil_prepare_eval_data`.
Note: As far as we can tell, `ob->runtime.gpd_orig` is unused and could
be removed. The assignment in `BKE_gpencil_prepare_eval_data`
seemed to be unnecessary.
Co-authored-by: @yann-lty
Reviewed By: antoniov
Maniphest Tasks: T96145
Differential Revision: https://developer.blender.org/D14236
Previously you'd have to be careful to drag the image itself. Dragging
anywhere else on the tile (e.g. between the preview and the text, or the
text itself) would trigger border select. This often conflicts with user
expectations and causes frustration when trying to work quick, I've seen
many people complain about this.
Note that the "hitbox" for dragging is a bit smaller than the tile, to
not make border select by dragging from in-between the tiles too hard.
Differential Revision: https://developer.blender.org/D14228