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

    Look At Camera > Add Tag

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 463 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 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.

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

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

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


            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 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);

              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/05/2010 at 02:36, xxxxxxxx wrote:

                Changing the material preview in COFFEE is unfortunatly not possible.

                cheers,
                Matthias

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