WIP: Animation: operators to update the pose library #104673
No reviewers
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#104673
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "dr.sybren/blender-addons:pr/poselib-replace-pose"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds two operators to the pose library context menu:
Replace Pose
Update Pose
For reference, the frame on which the pose asset is keyed influences which frame is used for rendering its preview image. This could influence choice in camera, backdrop color, etc. when those are animated in the scene.
The operators work in both the asset browser and the asset view (i.e. in the 3D viewport side-panel).
This patch requires blender/blender#108547 for the Replace Pose operator.Since blender/blender#108547 has landed onmain
, there are no futher dependencies for this PR.Limitations
This patch does not work around the limitation that Blender is only allowed to write to the currently-open blend file. As such, editing the pose library still requires you to open the blend file that contains the pose asset.
Future Work
Once this patch is in, people have used it a bit for actual work & the feature got polished, it might be a good idea to follow this up with "Update from Clipboard" and/or "Replace from Clipboard" operators. That could be used in conjunction with the "Copy Pose as Asset" operator.
WIP: Animation: pose library, add 'Replace Pose' operatorto WIP: Animation: operators to update the pose libraryWIP: Animation: operators to update the pose libraryto Animation: operators to update the pose libraryLooks good to me. I left a couple of comments that you may or may not want to address. But neither are critical.
@ -142,0 +330,4 @@
# Update the exsting FCurve. This assumes that it is a valid
# pose asset, i.e. that the FCurve has a single key.
kp = fcu_existing.keyframe_points[0]
old_value = kp.co.y
Unimportant nit: it doesn't seem like the
old_value
temporary is necessary.(
fcu_value
, by contrast, I think aids readability, since it's short-handing something that's rather long to read.)Not a big deal either way, though.
It's indeed not really necessary, but to me it makes the
if old_value == fcu_value:
read nicer. That can be resolved by renamingkp
tokeyframe
and it overall being less cryptic.@ -142,0 +334,4 @@
# Don't bother updating the FCurve if the value was unchanged.
fcu_value = fcu_to_read.keyframe_points[0].co.y
if abs(old_value - fcu_value) < 0.0001:
Do we expect there to be floating point error involved here? I wouldn't think so, but I could very well be missing something.
But if not, I think it makes more sense to just do a straight
==
comparison, rather than having an arbitrary epsilon.Animation: operators to update the pose libraryto WIP: Animation: operators to update the pose libraryMarked as WIP, as I want to include the suggestions from yesterday's module meeting as well.
Checkout
From your project repository, check out a new branch and test the changes.