On 28/05/2015 at 11:25, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R16
Platform: Windows ;
Language(s) : C++ ;
---------
I am trying to set the start and stop frame range inside the point cache tag. This tag cannot be accessed through the API so I am trying to set the description parameters directly.
In the code I command the tag to perform the following:
1. Store state.
2. Set auto time to false.
3. Set start frame range to 2050.
4. Set stop frame range to 2150.
5. Calculate.
DescriptionCommand clickStore;
clickStore.id = DescID(DescLevel(ID_CA_GEOMCACHE_TAG_STORE, DTYPE_BUTTON, 0L));
tag->Message(MSG_DESCRIPTION_COMMAND, &clickStore);
tag->Message(MSG_UPDATE);
EventAdd();
tag->SetParameter(DescID(ID_CA_GEOMCACHE_TAG_CACHE_AUTOTIME), GeData(0), DESCFLAGS_SET_0);
tag->Message(MSG_UPDATE);
EventAdd();
tag->SetParameter(DescID(ID_CA_GEOMCACHE_TAG_CACHE_START), GeData(2050), DESCFLAGS_SET_FORCESET);
tag->Message(MSG_UPDATE);
tag->SetParameter(DescID(ID_CA_GEOMCACHE_TAG_CACHE_STOP), GeData(2150), DESCFLAGS_SET_FORCESET);
tag->Message(MSG_UPDATE);
DescriptionCommand clickCalculate;
clickCalculate.id = DescID(DescLevel(ID_CA_GEOMCACHE_TAG_CALCULATE, DTYPE_BUTTON, 0L));
tag->Message(MSG_DESCRIPTION_COMMAND, &clickCalculate);
tag->Message(MSG_UPDATE);
EventAdd();
Storing state, setting autotime to false and calculating all works perfectly. But I cannot set the start and stop frame range parameters. If I do not set the stop parameter, the value defaults to 30 F. But if I set the stop parameter, it becomes 0 F.
I have tried setting the parameter to a range of value types, and nothing seems to work
GeData(2150)
Or
GeData("2150 F")
I know its something simple and I can't find it. Why is this happening?