FCurve update method for scripts #36168

Closed
opened 2013-07-16 23:16:57 +02:00 by Tom Edwards · 5 comments

%%%This small patch exposes Blender's internal FCurve update functions (specifically sort_time_fcurve and testhandles_fcurve) to Python scripts through a new "update" method on bpy.Types.FCurve.

Triggering the update functions previously required running a curve operator of some sort, all of which check the context for UI state. Setting up and then reverting the UI state was a pain when Blender was running with UI and impossible when it was running in background mode.

This patch mainly helps import scripts.%%%

%%%This small patch exposes Blender's internal FCurve update functions (specifically sort_time_fcurve and testhandles_fcurve) to Python scripts through a new "update" method on bpy.Types.FCurve. Triggering the update functions previously required running a curve operator of some sort, all of which check the context for UI state. Setting up and then reverting the UI state was a pain when Blender was running with UI and impossible when it was running in background mode. This patch mainly helps import scripts.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Member

Added subscriber: @JoshuaLeung

Added subscriber: @JoshuaLeung
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Joshua Leung self-assigned this 2014-03-22 03:55:22 +01:00
Member

I ended up reimplementing a similar feature in 3e26a7a594a9f2d91cba48ba70d30e3ca38a5505 to fix a bug.

In the end, I found that there were a few issues with this patch so I couldn't use it as-is (i.e. RNA api for FCurves already exists - it lives at the end of the struct def for FCurves, and the naming of the new API function was inconsistent with the rest of the code). Nevertheless, I ended up crediting this patch in the commit (though I had a bit of trouble trying to find it again at the time).

Thanks anyway for your time and work :)

I ended up reimplementing a similar feature in 3e26a7a594a9f2d91cba48ba70d30e3ca38a5505 to fix a bug. In the end, I found that there were a few issues with this patch so I couldn't use it as-is (i.e. RNA api for FCurves already exists - it lives at the end of the struct def for FCurves, and the naming of the new API function was inconsistent with the rest of the code). Nevertheless, I ended up crediting this patch in the commit (though I had a bit of trouble trying to find it again at the time). Thanks anyway for your time and work :)
Author

Thanks for the commit!

Thanks for the commit!
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#36168
No description provided.