[Bf-taskforce25] FCurvifying Materials

Joshua Leung aligorith at gmail.com
Tue Feb 3 23:23:52 CET 2009


Hi,

All of the code for this can be found in blenkernel in ipo.c

What basically needs to be done, is you need to take each of the sets of
switch(...){case...} blocks at the bottom of the file (in get_ipo_poin), and
make a function at the top for this (named <datablock>_adrcodes_to_paths).
Then you replace each poin= &struct->somevar;  with return
"some_equivalent_RNA_prop_identifier";
If the original setting is wrapped in RNA as an array, you need to add
*array_index= #;  before return ...  (i.e. see ob_adrcodes_to_paths() and
material_adrcodes_to_paths() for examples).

Some of the blocks are not completely done (i.e. objects and materials),
with the unconverted adrcodes #if 0'd out at the bottom of the respective
functions. It would be a good starting point to try your hand at these
first.

One more word of advice: if you see any of the old 'bitflag' vars ('mode'
for materials is one, 'lay'/layer for objects is another), follow the
example code for Object layers (hint, check adrcode_bitmaps_to_paths() as a
good startingpoint) to see how to implement this so that they get converted
properly to the new system.

Once you get the hang of this, it's not really as difficult as it may sound
here. :)
Joshua

On Wed, Feb 4, 2009 at 4:21 AM, Roland Hess <me at harkyman.com> wrote:

> Joshua -- You'd mentioned on irc that I could start working on fcurves
> for materials. I didn't think to ask at the time, but what exactly do
> you mean by that, from a practical standpoint? Point me to a sample from
> another module and I'll tackle it.
>
> Roland
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-taskforce25/attachments/20090204/d57b64e5/attachment.htm 


More information about the Bf-taskforce25 mailing list