On 20/02/2015 at 09:46, xxxxxxxx wrote:
Cinema 4D Version: 13+
Platform: Windows ;
Language(s) : C++ ;
I got 2 questions:
1- initialize tag desc from object desc:
I tried to do this in TagData::Init() , but it didn't work "object op is not there yet" , so the only solution that I can do is using GetParameter() with a flag to enter once "any better solution?"
2- restrict tag to certain objects:
I have my own light tag, camera tag, .... , but I need to show these tags "in the right click menu" only for certain objects "e.g. lights, cameras, ... respectively" , is this possible?
On 23/02/2015 at 08:14, xxxxxxxx wrote:
if you have questions, please open a new thread for each question. Thanks.
Can you explain with a few sentences what you mean with "initialize tag desc from object desc"? What do you want to do and how do you want it to do?
In Cinema 4D tags can be assigned to all objects; a restriction is not part of the typical workflow. As discussed multiple times in this forum, it is not possible to edit the object manager context menu.
On 23/02/2015 at 11:57, xxxxxxxx wrote:
so question 2 is solved "as it is not possible to do, so it's ok"
about "initialize tag desc from object desc" , imagine you have a light object, which got some properties like "color" , "type (omni, spot, ...)" , how to initialize my tag with the color value of the light "for example"
On 24/02/2015 at 00:27, xxxxxxxx wrote:
the tag's Init() function is called after the tag is created but before the tag is attached to the actual parent object. The first messages send to the tag after it was attached to the parent object are MSG_MENUPREPARE and MSG_EDIT. The data of the message MSG_EDIT is a Bool value which is true in the case of the creation of the tag. You could catch this message and set the values of your tag.
On 24/02/2015 at 06:51, xxxxxxxx wrote:
thanks a lot Sebastian, this is so handy!!