[Bf-funboard] fCurve API extension (Feature Request)

Atomic Perception atomicperception at gmail.com
Wed Jul 9 19:39:12 CEST 2014


Hello All,

I am writing a script that transfers the animation from one material to
another. The script examines the fCurves to determine what transfer.

For example the data_path of an array, like color looks like
this..."diffuse_color". The data_path of a float, say emit looks like this
"emit". While I can examine the array_index to determine what value goes
with what portion of an array, I have no way to determine if a data_path is
an array or numeric value. Thus I can not construct an eval statement to
execute the assignment without a bunch of if statements like "if data_path
== "emit": (etc...) I want to avoid this because I want the code to work
with Blender Internal, Cycles or any value with animation data.

I propose that the API be extended with a new fCurve property called
"is_array". It should be True when the data_path is an array. An
alternative, which falls under the category of "better defaults" would be
that the array_index could return a -1 if the data_path is not an array.
This would work for me as well but I don't know how much of an issue it
would cause to the rest of the program.

I hope my request is clear enough

Thanks
Atom


More information about the Bf-funboard mailing list