AlignToSpline Tag class ID



  • 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



  • 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



  • 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 :)



  • 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



  • 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.


Log in to reply