[Bf-codereview] RNA write access for CurveMap (issue 5091046)

lukas.toenne at googlemail.com lukas.toenne at googlemail.com
Wed Sep 21 13:57:32 CEST 2011


Further explanation:

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 the update).

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.

Not as elegant as direct CurveMapPoint functions, but a suitable
workaround imho.

http://codereview.appspot.com/5091046/


More information about the Bf-codereview mailing list