[Bf-committers] RNA write access for CurveMap
lukas.toenne at googlemail.com
Wed Sep 21 14:03:14 CEST 2011
This is a small RNA patch to enable scripters to make custom curve
mapping node setups with python scripts. Only question is if we want
to carry the unwieldy C function design to the RNA, but since
CurveMaps are probably not going to be changed it's better than no
access at all.
>From the codereview description:
Updating points in a CurveMap requires update calls on the CurveMapping struct.
Since this is unknown to the CurveMap itself, this has been disabled in the RNA
(CurveMap points are readonly, except for selection flag, which does not require
To work around this i added some RNA functions to CurveMapping, wrapping the C
functions used for this purpose. They take the curve map index as a required
parameter. The remove and set_handle functions work on all selected points (as
in C code), so in order to update specific points without messing up selection
one would have to save the selection state and restore later.
More information about the Bf-committers