DescriptionAdds a new ID property type for ColorBands. This feature is needed as part of the new PyNodes development, since node types such as the ColorRamp node have custom storage data in the form of a ColorBand struct, which must be implemented as ID property in order to make the type definition python-based. Other node data such as RGB curves could be added in the same where when required.
The IDP_COLORBAND property maps to the PROP_POINTER rna type, like the IDP_GROUP. A change to the way pointer rna properties are casted in RNA_property_pointer_get (rna_access.c) is necessary: Previously the PointerRNA data pointer could just be casted from the IDProperty pointer directly, since groups were the only id prop type mapping to rna pointer type.
Now the actual pointer to be used for a property depends on the id prop type (IDProperty* for groups, ColorBand* for color bands). The solution is to store the actual data pointer in the idprop->data.pointer. For groups this is the id prop itself (idprop->data.pointer==idprop).
Patch Set 1 #
Total comments: 1
MessagesTotal messages: 4
|