COFFEE TagExpressionPlugin Updating
-
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?
-
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.