Xref camera bug

Hi,

I’m submitting a file with a camera being xref object’d in from another scene, and get the attached error.

Its using a Vray cam.

Mark

Thanks for the report. When using XRefs, stranger things could happen.

We will need to add an extra test to make sure that code does not crash. But if you expect an XRef-ed VRay Camera to also work in a stereo rig (if not you, someone else might), it will be a lot more work, assuming it is even possible to support…

In the very short term, until this is fixed, try to avoid XRef-ed Cameras.

Thanks Bobo,

Yes its just a simple Vray Cam, no stereo in this case.

I’ll have to work round for now,

Thanks,
Mark

Ok, here is an easy fix:

  • Open the file (YourRepository)\submission\3dsmax\Main\SubmitMaxToDeadline_Functions.ms and navigate to the line where you got the error (10975).
  • Insert the following line right before it:

if classof theViewCamera == XRefObject do return #()

So the code would look like

... local theViewCamera = viewport.getCamera() --get the current view's camera if theViewCamera != undefined then --if it is valid, ( --first see if an active VRayStereoscopic Helper exists and the renderer is set to VRay if SMTDFunctions.getRendererIdString() == "vray" AND (for o in getClassInstances VRayStereoscopic where o.enabled == true collect o).count > 0 then ( #() --return nothing, VRay will handle this internally ) else ( if classof theViewCamera == XRefObject do return #() --> NEW CODE!!! --see if it is part of a VRay stereo rig: - either the center camera which has a VRayStereoRigSlaveControl controller, or a left/right eye camera which is controlled by such a controller: local VRayRig = if classof theViewCamera.transform.controller == VRayStereoRigSlaveControl then #(theViewCamera.transform.controller) else for o in refs.dependents theViewCamera where classof o == VRayStereoRigSlaveControl collect o ...

  • Save the modified file.
  • Relaunch SMTD.
  • Try to submit - it should not throw an error anymore.

Sorry Bobo, totally missed your reply, going to try now!

It works! I guess this code will be added to new builds going forward?

Thanks for the feedback. I’ll go ahead and add this fix to the internal version to be released in a future service pack of Deadline.

Perfect.