Using Tplugin to add a tag?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/12/2012 at 20:45, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   13 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    I'm trying to add my own tag plugin to an object from inside a GeDialog plugin.
    To do this I assume we need to use Tplugin?
    The SDK says to pass the plugin's ID to Tplugin. But it doesn't say how to do that.
    Pass it how?

    Suppose I have a tag plugin with the ID#1000003.
    When I'm in my GeDialog plugin I can search for it like this:

    BasePlugin *myplugin = FindPlugin(1000003, PLUGINTYPE_ANY);  
      if(!myplugin) return FALSE;
    

    Yup...It's there and I can see it from inside my GeDialog plugin.
    So now I go about trying to create the tag:

    BaseObject *active = doc->GetActiveObject();  
    BaseTag *myTag = active->MakeTag(Tplugin);  
    Now what?  
    How do I "pass" the ID#1000003 to the tag? 
    

    -ScottA



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/12/2012 at 21:52, xxxxxxxx wrote:

    I managed to figure it out: BaseTag *myTag = active->MakeTag(1000003,NULL);

    I still have no idea what Tplugin is used for.

    -ScottA



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/12/2012 at 03:01, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    I managed to figure it out: BaseTag *myTag = active->MakeTag(1000003,NULL);

    I still have no idea what Tplugin is used for.

    I think Tplugin is meant to check if a tag is a registered plugin with C4DAtom::IsInstanceOf(Tplugin).


Log in to reply