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

    AlignToSpline Tag class ID

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 316 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 24/01/2011 at 10:37, xxxxxxxx wrote:

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

      ---------
      Hey!

      I'm trying to figure out the class ID for the AlignToSpline tag. Some of the other Tags have the ID stored as a constant (e.g. TextureTag), that you can check with the instanceof() procedure.
      Would be really nice if someone could point me in the right direction.

      Cheers,
      Sparkle

      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 24/01/2011 at 14:01, xxxxxxxx wrote:

        Is this what you're looking for?

        var obj = doc->GetFirstObject();
        //var t = AllocTag(Taligntospline); //Create the ATS tag using the text based ID
        var t = AllocTag(5699); //Create the ATS tag using the numeric ID
        obj->InsertTag(t);

        -ScottA

        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 25/01/2011 at 01:08, xxxxxxxx wrote:

          Unfortunately that's not really helpful in my case. I want to detect if an object has an allign to spline tag attached and not attach a new one.

          The code I came up with so far is this:

          var ATag = Obj->GetFirstTag();
          while (ATag && !instanceof(ATag,XXXTag)) {
               ATag=ATag->GetNext();
               }

          XXXTag would have to be replaced with the proper name of the constant that describes the class id of the Align to Spline tag.
          Unfortunately getclass() only returns "BaseTag" which seems to be a broader group of C4D tags.
          I hope this is a little clearer than my initial jibberish 🙂

          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 25/01/2011 at 02:12, xxxxxxxx wrote:

            BaseList2D::GetType() returns the type ID (plugin ID) of objects, tags, materials etc.

            Example:

              
            var ATag = Obj->GetFirstTag();  
              
            while (ATag)  
            {  
              if (ATag->GetType() == Taligntospline)  
              {  
                  // the tag is an Align To Spline tag  
                  // do something  
              }  
                
              ATag = ATag->GetNext();  
            }  
            

            cheers,
            Matthias

            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 25/01/2011 at 02:25, xxxxxxxx wrote:

              Works like a charm! Thanks a lot for the quick help.

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