Jump to content

Sign in to follow this  
prowl

Tag Plug in needed.

Recommended Posts

So some simple way to add Tags to a Toolbar... so you don't have to do the right click, search though objects 

 

There is a convoluted Script way to to this..  

https://ace5studios.com/tag-buttons/

Share this post


Link to post

is it convoluted? The code is really short... here for a Protection tag...
 

import c4d

def main():
    if op == None: return
    op.InsertTag(c4d.BaseTag(c4d.Tprotection))
    c4d.EventAdd()

if __name__=='__main__':
    main()

For other tags you just need to replace Tprotection with another tag type, a list of which you can find here:

https://developers.MAXON.net/docs/Cinema4DPythonSDK/html/types/tags.html

 

The problem with writing a plugin to select tags is still that you need to do the selection... which would probably be no better conceptually than the current menu choices. If you want a different solution, the big question is how it's supposed to work. Having just a button for a single special tag... well, use/modify the script above, no need to bother with a plugin unless you have a novel idea how to make the selection easier for the user.

Share this post


Link to post
  • Topic Author
  • I suppose it's just an anomaly that you CAN'T simply do it from the Customise Commands Window.  Tags are so important and it's not as obvious as some.  Especially as they have changed the grouping in r21 I have no idea where they are Half the time 🙂

    So a proper plugin could:
    Setup a tag within it then:
    Apply/Remove/copy/replace to: 
    Selected
    Object Type 
    Children 

    Parent
    Namespace .* ( all things containing Field "DOOR"  for example ) 

     

    Share this post


    Link to post
    18 hours ago, prowl said:

    I suppose it's just an anomaly that you CAN'T simply do it from the Customise Commands Window.  Tags are so important and it's not as obvious as some.  Especially as they have changed the grouping in r21 I have no idea where they are Half the time 🙂

    So a proper plugin could:
    Setup a tag within it then:
    Apply/Remove/copy/replace to: 
    Selected
    Object Type 
    Children 

    Parent
    Namespace .* ( all things containing Field "DOOR"  for example ) 

     

     

    The question remains though: How do you select the tag that you want? It's a fact that there are dozens of tags in my system, including stuff from plugins and stuff I programmed myself, so any kind of selection would either be a very long list, or a hierarchical list (as the tag menu currently offers), or a text box where you type the name, or... so many possibilities. I guess it depends on taste how you want to select it. (I admit I have the same issue with some tags - I don't find them immediately in the menu hierarchy!)

     

    Then there are the special functions - like "Set Selection" which creates or overwrites a selection tag, depending on the mode and whether a tag is already selected. These are specific to the tag type and require special handling. In some cases (like X-Particles) it absolutely makes sense to have functions which set up a full object/tag hierarchy with one click.

     

    And finally there is the fact that not all functionalities that you listed make sense for all the tags available, or that some functionalities exist in one form or the other (creating a tag on a multi-selection does create the tag for all selected objects; a function "copy tag to children" does exist, etc.).

     

    Personally, I found that it makes most sense to have a few selected scripts (like the one from my previous post, sometimes enhanced by additional functionality - for example a SetSelection variant that does not overwrite an existing selection, or a popup menu to activate point selections) to cover often-needed usecases, and just live with the tag menu structure otherwise...

    Share this post


    Link to post

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    Sign in to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...