Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    GetActiveTag

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 301 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

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

      On 16/08/2011 at 00:40, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   12 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hello, its me again. I am Stucked with my Smoothedge-Script. I want to restrict a Splinedeformer to the current Pointselection of the selected Object. With my code I have the Problem that it does not work if there is already a Selection-Tag on the Object.
      I tried to use GetActiveObject(). But the functions does not exist aparently.
      Do you know how I can get the exact Selection tag, that is created with the Set Selection-Command?

      Here is what I have:

      obj->GetActiveObject();
        
      CallCommand(12139); // Points
      CallCommand(12552); // Set Selection
        
      var selectiontag = obj->GetFirstTag();
      while(selectiontag->GetType()!=5674) // As long as it's not a selection tag.
      {
      selectiontag=selectiontag->GetNext(); // Get the next tag until it finds one that's a selection tag
      }
        
      selectiontag#ID_BASELIST_NAME="smoothedge-restriction";
      var restag = AllocTag(5683);//restiction Tag
      splineDeformer->InsertTag(restag);//Apply tag
      restag#RESTRICTIONTAG_NAME_01="smoothedge-restriction";
        
        
      
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

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

        On 16/08/2011 at 05:38, xxxxxxxx wrote:

        doc->GetActiveObject();

        You might also want to use a for loop as you will crash readily with that while() loop:

        ------------------------------------------- ends loop if tags exhausted
        for (selectiontag = obj->GetFirstTag(); selectiontag; selectiontag = selectiontag->GetNext())
        {
        if (selectiontag->GetType == 5674) { do you stuff here; break; }
        }

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

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

          On 16/08/2011 at 06:15, xxxxxxxx wrote:

          Thank you Robert,
          nice Idea.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post