AWS Thinkbox Discussion Forums

3dsmax job, camera not shown in props

We have an odd couple of jobs… This is in the submission parameters (copy paste from the job props):

Camera=FL_FillLight003
Camera0=
Camera1=SQU_039_8020_camMaster
Camera2=SQU_039_8020_camFuture

This already looks wrong, but the enum dropdown does not appear in the 3dsmax Settings / Render Option, so we cant fix it (without resubmit). How can this happen?

The artist was looking through a light when he submitted the job, if that helps

Weird. Could you upload a simple test file that we could use to reproduce the problem here?

It has been like that forever.
Here is the relevant code:

[code] if forceCamera == “” then --no forced camera
(
local theCam = viewport.getCamera() --get viewport camera
if isValidNode theCam then --if it is valid, output it
format “Camera=%\n” (theCam.name) to:JobInfoFile
else
format “Camera=\n” to:JobInfoFile --if viewport is not a camera, output no camera.
)
else
format “Camera=%\n” forceCamera to:JobInfoFile --if camera was supplied, force output to it.

			format "Camera0=\n" to:JobInfoFile

			--Write out all cameras found in the current scene:                                
			local theCameras = for c in objects where findItem Camera.classes (classof c) > 0 collect c
			for c = 1 to theCameras.count do
				format "Camera%=%\n" c theCameras[c].name to:JobInfoFile

[/code]

So the first line is the current camera. In your case, that happens to be a Light.
The Camera0= is always empty. It seems that it is there so you can turn the camera off. Not sure how useful this is, but I don’t even think this was my code originally. It could have been yours or Grant’s from before 2004 :smiley:

Then we output Cameras 1 to N.
I guess we could check if the current view is NOT on the cameras list and add it too. I assume the list is considered “corrupt” because the active camera is not on the list, so the list does not show up at all.
I would not like to include ALL lights on the list, but if the current view IS a light, it probably should be included so the list is valid.

Thoughts?

I tried this as a fix and it seems to work with a light as viewport:

[code] local theCam = viewport.getCamera() --get viewport camera
if forceCamera == “” then --no forced camera
(
if isValidNode theCam then --if it is valid, output it
format “Camera=%\n” (theCam.name) to:JobInfoFile
else
format “Camera=\n” to:JobInfoFile --if viewport is not a camera, output no camera.
)
else
format “Camera=%\n” forceCamera to:JobInfoFile --if camera was supplied, force output to it.

			format "Camera0=\n" to:JobInfoFile

			--Write out all cameras found in the current scene:                                
			local theCameras = for c in objects where findItem Camera.classes (classof c) > 0 collect c
			for c = 1 to theCameras.count do
				format "Camera%=%\n" c theCameras[c].name to:JobInfoFile
			--If the current view is not a camera (it could be a light for example), make sure it is added to the list, otherwise the list would be invalid
			if isValidNode theCam AND findItem theCameras theCam == 0 do
				format "Camera%=%\n" (theCameras.count+1) theCam.name to:JobInfoFile[/code]

Yeah, checking the console, i actually see an error that the enum does not contain the current value

Privacy | Site terms | Cookie preferences