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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    COFFEE TagExpressionPlugin Updating

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 233 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/03/2008 at 11:51, xxxxxxxx wrote:

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

      ---------
      The premise of the code is to take an animated camera and add offset values on top of the previously animated keyframes. So, what I'm doing is creating a new camera and through an expression tag plugin, copy the values over to the new camera from the animated one while doing some math to the values.

      Updating in the viewport shows that this works just fine as well as interactive rendering. However, when rendering on a slave machine running the -nogui flag, the renders still just sit there while the real camera moves as expected.

      Here's a code snippet to support what I'm trying:

      > MyExpTagPlugin::MyExpTagPlugin() \> { \> super(); \> this_cam = GetObject(); \> } \> \> MyExpTagPlugin::Execute(doc,op) \> { \> // Position / Rotation / Scale \> this_cam->SetPosition(orig_cam->GetPosition()); \> this_cam->SetRotation(orig_cam->GetRotation()); \> this_cam->SetScale(orig_cam->GetScale()); \>      \>      \> // Object Attributes \> var this_cam_bc = this_cam->GetContainer(); \> var orig_cam_bc = orig_cam->GetContainer(); \> \> this_cam_bc->SetData(CAMERAOBJECT_APERTURE, orig_cam_bc->GetFloat(CAMERAOBJECT_APERTURE)); \> var orig_cam_foc = orig_cam_bc->GetFloat(CAMERA_FOCUS); \> // ...etc... \> \> \> // MAKE IT SO     \> this_cam->SetContainer(this_cam_bc); \> this_cam->Message(MSG_UPDATE); \> EventAdd(); \> }

      My only thought is that perhaps it's because I'm using the GetObject() method to get the camera vs using the 'op' var that's provided?

      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 10/03/2008 at 14:22, xxxxxxxx wrote:

        Got it! (Thanks for the help, Rick) I wasn't using the document object correctly. I should have been using the supplied doc variable since when running the -nogui flag, GetActiveDocument() doesn't supply the correct document.

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