THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/05/2010 at 01:26, xxxxxxxx wrote:
Cinema 4D Version: 11.5+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
what is the best way to fill a modata with custom data? I want to apply a mograph effector to my own data.
On 27/05/2010 at 01:59, xxxxxxxx wrote:
Afaik this is not possible but I will ask the developers to make sure.
On 27/05/2010 at 03:06, xxxxxxxx wrote:
On 27/05/2010 at 16:00, xxxxxxxx wrote:
You can fill the MoData with whatever you want just fine, but be aware that unless you using the default MODATATYPEs then only the COFFEE Effector (or any custom Effectors you write with the C++ API) will be able to modify those arrays.
The MoData itself contains the functions to set the arrays however you want, size of the arrays, number, their types.
To have a situation where MoData is available for an effector with a generator you need to make sure your object returns true to InstanceOf(Obasemogen), and has the MoGraph DataTag ID_MOTAGDATA on it (this setup then allows baking to occur with the bake tag, which you can retrieve the modata from with MSG_GET_MODATA and reuse), message the tag to get the MoData and then modify it's content (the messages are in the c4d_baseeffector files), to then apply the effector(s) you use effector->Message(MSG_EXECUTE_EFFECTOR, Effector_PassData *data). This message can be used also with just some random MoData and not having to set up the instance type or DataTag.
It is feasible to modify MoData from within an effector too, the COFFEE effector allows this and you can do this from your own effector if you want, adding/removing data as needed.
On 27/05/2010 at 18:03, xxxxxxxx wrote:
Thanks Per for the description and info. I was just looking into the docs again and only saw two GeDynamicArrays so I was a bit iritated, but then I saw I was looking at the 10.5 SDK! And now saw the new class in the 11.5 docs. That clears a lot of further questions I´d have.
So I must fill the data for previous versions myself then I think, though I am not sure if it´s worth the trouble to deal with 2 versions of mograph. I probably then only go for v2 support, so 11.5.
Ok, thx again, that gets me going.