On 02/06/2015 at 14:07, xxxxxxxx wrote:
Cinema 4D Version: R16
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
I'm working on an ObjectData plugin that generates geometry based on child splines. Some attributes in the Attributes Manager need to be enabled/disabled and min/max values need to be set based on the number of child splines.
The generator object has a count of 5 child splines.
I have a LONG attribute named "Special Splines."
"Special Splines" should always have a max value of (child splines count - 2);
The user changes "Special Splines" from 0 to 3.
I catch this in ObjectData::GetDDescription() and set min/max accordingly.
"Special Splines" now has a max value of 3 and it's value is 3.
Now the user deletes one of the child splines.
"Special Splines" should now have a max value of 2 and be reset to a value of 2.
The only virtual functions i can find that are called when the user adds/deletes the child splines are ObjectData::GetVirtualObjects() and ObjectData::Message(). The type for Message(GeListNode *node, Int32 type, void *data) is MSG_GETCUSTOMICON or MSG_GETREALCAMERADATA.
The SDK states that no scene modifications can take place in GetVirtualObjects(). Is changing op's container or parameters considered a scene modification?
MSG_GETCUSTOMICON and MSG_GETREALCAMERADATA do not seem like the appropriate places to modify op's container or parameters.
Where can I safely update the op's container or parameters when the number of child splines change.