Look At Camera > Add Tag



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

    On 10/05/2010 at 16:15, xxxxxxxx wrote:

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

    ---------
    Hi!
    A newbie question:

    I have [ imageplane ] script, which "...his script will import an image into C4D and automatically create a material with the image in the luminance and alpha channels of the material, and then create a plane with -z orientation and apply the material to it. Basically, it's a way to import a bitmap image into Cinema's 3d space without having to do all the manual labor."

    But how can I add "Look At Camera" Tag to the new created object within the script? And turn off Pitch Rotation and set angle P=0?

    Whith Script Log I have this:

    CallCommand(100004788); // New Tag
    tag()#LOOKATCAMERA_PITCH=FALSE;
    object()#ID_BASEOBJECT_ROTATION:VECTOR_Y=0;

    How can I add Look At Camera TAG with script?
    Thanks a lot.



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

    On 12/05/2010 at 01:34, xxxxxxxx wrote:

    Tags can be created with AllocTag(tagID), where tagID is the plugin ID of the tag to created.
    In case of the Look At Camera tag it's 1001001. IDs for tags, objects etc. can be read out with GetType(), for instance op->GetType() returns the ID of the object.

      
    var op = object();  
      
    op#ID_BASEOBJECT_ROTATION:VECTOR_Y = 0.0;  
      
    var mytag = AllocTag(1001001);  
    mytag#LOOKATCAMERA_PITCH = FALSE;  
      
    op->InsertTag(mytag,NULL);  
    op->Message(MSG_UPDATE);  
    

    cheers,
    Matthias



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

    On 18/05/2010 at 11:21, xxxxxxxx wrote:

    Thanks! Works fine here!

    For CompositingTag and Object Buffer=1, I used this code below:

    var obj = doc->GetActiveObject();
    var comp = new(CompositingTag);
    comp#COMPOSITINGTAG_ENABLECHN0=TRUE;
    obj->InsertTag(comp,NULL);
    

    Adding Tags can differ from one to another in the way they are added?
    Where I can find this kind of information? SDK?
    Thanks



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

    On 20/05/2010 at 07:51, xxxxxxxx wrote:

    Please always use AllocTag(tag plugin id) to allocate tags. The tag plugin id can be obtained for every tag (or object, material etc.) by calling GetType() , see image below.

    cheers,
    Matthias




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

    On 20/05/2010 at 15:45, xxxxxxxx wrote:

    Thanks. Learning a lot!
    Now, I'm trying to set Material Preview to Plane. But no success. I believe this may be very easy.
    Something like this?

    var preview = textag->GetContainer();   
          preview->SetData(MATPREVIEWPLANE, NULL);
          textag->SetContainer(preview);



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

    On 25/05/2010 at 02:36, xxxxxxxx wrote:

    Changing the material preview in COFFEE is unfortunatly not possible.

    cheers,
    Matthias


Log in to reply