[Bf-committers] F-Curve Path Fixing Script

Joshua Leung aligorith at gmail.com
Wed Nov 18 23:51:27 CET 2009


Hi all,

In light of some recent changes with some RNA properties (i.e.
pose.pose_channels -> pose.bones) and a few bugreports, I've hacked together
an operator to do somewhat crude fixing of issues like this so that
animation files saved with earlier versions of B 2.5 can still work.

The script can be obtained from:
https://svn.blender.org/svnroot/bf-extensions/contrib/2_5x/py/scripts/animation/demo_fcurve_fixer.py

NOTE: the script is NOT in the standard svn tree for now, unless there's
enough interest for such a tool to be bundled by default.

Using this script is not totally ideal, since the settings in the panel only
really get applied "permanently" when moving the mouse outside. It's
therefore very easy to forget this, and try making changes to several
batches of different settings at once, only to find that only the last set
of changes worked.

Some common changes that may be necessary - check your DopeSheet/Graph
Editor channel list for the relevant broken channels:
1) "pose.pose_channels" -> "pose.bones"
2) "rotation" -> "rotation_quaternion"

------

A few notes regarding using the Py-API as it currently stands (probably
should report these on the tracker at some point):
- While trying to get this script working, I ran across numerous places
where making a typo would cause obscure warning messages in the console only
(attribute error... location: 61 (null)... etc.). Sometimes, Blender
(probably the py-interpreter actually) would crash upon exit with complaints
of internal errors. I got errors like this from either leaving an extra ,
at the end of one of the property definitions (i.e.  myStringProp =
StringProperty(...), ), and/or leaving out an  ,  for the return codes
(i.e.   return('CANCELLED' )  )

- I'm getting some memory leaks after the operator runs. Some of these seem
to be from the popup invoke region, while others are related to the
management of custom operator types.

- Reloading all scripts with F8 reveals some problems with the way times
sometimes get handled - custom operators either complain about
existing/freed python handles or similar. Memory leaks from above may/may
not factor into this too.

------

Aligorith


More information about the Bf-committers mailing list