I wanted to ask if there is a solution for adding the vray physical cam attributes to a camera.
for now I can make it work if I execute the script in two parts:
Part1
cmds.camera()
camlist = cmds.ls(sl=True)
cmds.rename(camlist[0], 'vrayPhysicalCamera')
mel.eval('vray addAttributesFromGroup |vrayPhysicalCamera|vrayPhysicalCameraShape vray_cameraPhysical 1;')
part2
mel.eval('setAttr "vrayPhysicalCameraShape.vrayCameraPhysicalOn" 1;')
However, executing everything at once produces an error:
// Error: line 1: setAttr: No object matches name: vrayPhysicalCameraShape.vrayCameraPhysicalOn //
# Error: RuntimeError: file line 6: Error occurred during execution of MEL script
line 1: setAttr: No object matches name: vrayPhysicalCameraShape.vrayCameraPhysicalOn #
This happens regardless of using mel or python.
Is there a native python or mel command for this action, without having to execute as a two part script?
Thank you.
for now I can make it work if I execute the script in two parts:
Part1
cmds.camera()
camlist = cmds.ls(sl=True)
cmds.rename(camlist[0], 'vrayPhysicalCamera')
mel.eval('vray addAttributesFromGroup |vrayPhysicalCamera|vrayPhysicalCameraShape vray_cameraPhysical 1;')
part2
mel.eval('setAttr "vrayPhysicalCameraShape.vrayCameraPhysicalOn" 1;')
However, executing everything at once produces an error:
// Error: line 1: setAttr: No object matches name: vrayPhysicalCameraShape.vrayCameraPhysicalOn //
# Error: RuntimeError: file line 6: Error occurred during execution of MEL script
line 1: setAttr: No object matches name: vrayPhysicalCameraShape.vrayCameraPhysicalOn #
This happens regardless of using mel or python.
Is there a native python or mel command for this action, without having to execute as a two part script?
Thank you.
Comment