limit tag attachment



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

    On 04/10/2010 at 16:36, xxxxxxxx wrote:

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

    ---------
    Hi,

    is there a way to prevent the user to attach my tag plugin to a "wrong" object? I want the tag to be attached to a specific object type only.

    Thanks,
    Klaus



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

    On 05/10/2010 at 05:55, xxxxxxxx wrote:

    Unfortunatly not possible.

    cheers,
    Matthias



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

    On 05/10/2010 at 07:05, xxxxxxxx wrote:

    hmm, couldn´t he just use a scenehook/messagedata and check the according objects and in case remove his tags?



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

    On 05/10/2010 at 07:21, xxxxxxxx wrote:

    After thinking a bit about, I think, it's quite user-unfriendly to just delete things, he made. The best way would be, to enable/disable the tag plugin entry in the tags menu according to the currently selected object.

    By now, I just disable all parameters and maybe I will display a message or s.th..

    Thanks,
    Klaus



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

    On 05/10/2010 at 07:25, xxxxxxxx wrote:

    Howdy,

    The simplest solution would be to hide the tag from the menu and create a CommandData plugin that adds the tag, so that the user can only add the tag through the command. This way the command can check for the proper object type and give the user an alert if the object is the wrong type of object.

    Adios,
    Cactus Dan



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

    On 05/10/2010 at 07:28, xxxxxxxx wrote:

    ah darn, of course dan is right. That´s probably the best solution. Haven´t thought a second about it.



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

    On 05/10/2010 at 09:44, xxxxxxxx wrote:

    thanks.

    How can I hide the tag plugin from the tags menu?
    Since the tag target is my object plugin, I can add a button for attaching the tag. Can my object plugin check, whether the tag plugin is available? Both are independent plugins. So I would need a method to check whether the tag plugin is installed in order to disable the button if not.



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

    On 05/10/2010 at 10:08, xxxxxxxx wrote:

    Howdy,

    Set the PLUGINFLAG_HIDEPLUGINMENU flag when registering the tag plugin.

    To check for it, you can use the FindPlugin() function, but that function can be slow, so it may be good to only use that once (for example in the PluginStart() function after all the parts have been loaded) to set a flag somewhere in your plugin that could be checked more quickly from within another function.

    Adios,
    Cactus Dan



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

    On 05/10/2010 at 10:29, xxxxxxxx wrote:

    Thanks for FindPlugin()!

    I certainly tried PLUGINFLAG_HIDEPLUGINMENU, but the tag is still visible in the TAGMENU. I assume, the flag only works with the plugin menu (as the name suggests)?



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

    On 05/10/2010 at 10:32, xxxxxxxx wrote:

    Maybe try

    PLUGINFLAG_HIDE



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

    On 05/10/2010 at 11:38, xxxxxxxx wrote:

    Howdy,

    Oooops, sorry about that. Samir is correct. 😊

    Adios,
    Cactus Dan



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

    On 05/10/2010 at 12:14, xxxxxxxx wrote:

    that's it. thanks.



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

    On 05/10/2010 at 12:27, xxxxxxxx wrote:

    btw.: did you know, that you can add an independent tag plugin to a tag collection of another plugin just by copying the whole plugin folder into the folder of another plugin? I didn't expect that it could work, but it does (tested with R12 on win7 only).

    [tagplugin1]
    tag1.cdl
    [res]
    [tagplugin2]
        tag2.cdl
        [res]



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

    On 06/10/2010 at 00:20, xxxxxxxx wrote:

    yep. You can also put all into one parent folder to have plugins in the submenu name of the paren folder. That works ever since even in coffee.



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

    On 06/10/2010 at 01:41, xxxxxxxx wrote:

    hello all,
    i use MSG_MENUPREPARE to solve this problem and wotk fine in my plugin here an example :

    Bool LookAtCamera::Message(GeListNode* node, LONG type, void* data)
    {
         if ( type == MSG_MENUPREPARE)
         {
              BaseObject * op = ((BaseTag* )node)->GetObject();
              if (op->GetType() != Ocamera) return FALSE;
         }
         return TRUE;
    }



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

    On 06/10/2010 at 03:16, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    yep. You can also put all into one parent folder to have plugins in the submenu name of the paren folder. That works ever since even in coffee.

    I know that, but I was surprized, that it even works with "chaotic" hierachies. This enables me to make my tag as an extension for my object that can be installed into the object plugin folder (I provide my plugins with installers).



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

    On 06/10/2010 at 03:18, xxxxxxxx wrote:

    Thanks Franz. This is a good solution.


Log in to reply