On 04/06/2015 at 06:36, xxxxxxxx wrote:
Cinema 4D Version: R16
Platform: Mac OSX ;
Language(s) : C++ ;
I'm coding an objectData plugin which needs some new materials.
I can find almost no information about this, so that's why I'm posting it here.
I have a way to do it, but it isn't thread safe, so I'd like a better way.
This is the method I use right now:
- Inside MSG_MENUPREPARE I create the materials I need.
- Inside the Init method I set the parameters for the colors of my materials. (These are GUI sliders, representing the color)
- Inside GetVirtualObjects I change the color of my material depending on my GUI sliders. I know this isn't thread-safe, but I can't seem to find another way how to do this.
I've tried inside MSG_POSTSETPARAMETER, but that just instantly crashes my C4D.
If I have to work together with a materialData plugin to make it thread-safe, I'm happy to do so.
Also, there are no examples about this in the SDK, so I really don't know how to improve this.
Could somebody please help me with this? Give hints so I can search further in the right direction?
If you need more information, just ask.
Thanks in advance for your help and time!
With kind regards,