Age | Commit message (Collapse) | Author |
|
GHOST always converts NDOF keyboard buttons into keyboard events
so there is no need to expose their values for Blender event types.
|
|
|
|
Support this for completeness, as it's simpler to support click-drag
for all events types that support press/release instead of having to
document which kinds buttons support click-drag.
|
|
This simplifies checking for event types that support press & release.
|
|
Also simplify modifier & keymodifier assignment.
|
|
In practice this didn't cause a bug since assigning hot-keys was also
checking for "press" events (which NDOF_MOTION doesn't generate).
Add ISNDOF_BUTTON macro which is now used by ISHOTKEY to avoid
problems in the future.
|
|
|
|
The main improvement is a code simplification, because attributes don't
have to be transferred separately for each curve, and all attributes can
be handled generically. Performance improves significantly when the
output contains many curves. Basic testing with a 2 million curve output
shows an approximate 10x performance improvement.
|
|
This was an oversight in 6594e802ab94ff11. First it must check if the
attribute exists before adding it.
|
|
Similar to 245722866d6977c8b, just another function I missed before.
|
|
|
|
This fixes the second part of T93573 that 8506f3d9fe9359518e didn't
properly address. Specifically, outlines of instances still had the
selected color in edit mode in wireframe view. This change is the
same as that commit, just in a different place.
Differential Revision: https://developer.blender.org/D14229
|
|
We had forgotten to unref packets after reading them.
This lead to a memory leak inside of ffmpeg.
|
|
Previously the labels and values in number fields and value sliders
used different padding for the text. This looks weird when they are
placed underneath each other in a column and, as noted by a comment
in the code of `widget_numslider`, they are actually meant to be
aligned.
This patch fixes that by using the same padding that is used for the
number field for the value slider, as well. This also has the benefit,
that the labels of the value sliders don't shift anymore when adjusting
the corner roundness.
Differential Revision: https://developer.blender.org/D14091
|
|
This quick fix will populate the runtime orig pointers to avoid
crashes when a grease pencil object uses layer transforms, parenting
or modifiers.
This will have to be revisited and fixed with a better solution.
|
|
Enables image user nodes to display the file alpha mode, similar to the
colorspace setting.
Also removes image_has_alpha in favor of using BKE_image_has_alpha, because it
did not check if the image actually had an alpha channel, just if the file format
was capable of supporting an alpha channel.
Differential Revision: https://developer.blender.org/D14153
|
|
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
|
|
|
|
The polynomial parameters were not shown correctly.
Differential Revision: https://developer.blender.org/D14254
|
|
Contributed by luzpaz.
Differential Revision: https://developer.blender.org/D14203
|
|
Move `ToolSettings *ts` into an `#ifdef NDEBUG` block, as it's only used
for a `BLI_assert` call.
|
|
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
|
|
|
|
Contributed by MysteryPancake.
Differential Revision: https://developer.blender.org/D14256
|
|
|
|
Differential Revision: https://developer.blender.org/D14260
|
|
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
|
|
This reverts commit 25fc5876d3bb37018adcfe1a1b943b90d45f5f9a.
Committed this unintentionally, looking into an alternate fix.
|
|
|
|
|
|
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
|
|
This reverts commit cb986446e29a51b07bdb73b999a0339df5ecdeb4.
|
|
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
|
|
Changing active spline updates active material index.
Reviewed By: campbellbarton
Ref D14250
|
|
Also improve on the doc-string for RE_RenderFrame & RE_RenderAnim.
|
|
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.
|
|
When converting from the new type to the old, the curve domain
attributes weren't properly resized, so their data was not properly
allocated.
|
|
Differential Revision: https://developer.blender.org/D14245
|
|
|
|
The stroke and fill parameters were flipped.
|
|
|