mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
apply suggetion. use attribute query
This commit is contained in:
parent
6f57d567e4
commit
9cbcef4fd9
1 changed files with 4 additions and 1 deletions
|
|
@ -49,7 +49,10 @@ class MayaTemplateBuilder(AbstractTemplateBuilder):
|
|||
default_cameras = [cam for cam in cmds.ls(cameras=True)
|
||||
if cmds.camera(cam, query=True, startupCamera=True)]
|
||||
for cam in default_cameras:
|
||||
if not cmds.objExists("{}.renderable".format(cam)):
|
||||
if not cmds.attributeQuery("renderable", node=cam, exists=True):
|
||||
self.log.debug(
|
||||
"Camera {} has no attribute 'renderable'".format(cam)
|
||||
)
|
||||
continue
|
||||
cmds.setAttr("{}.renderable".format(cam), 0)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue