mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Code cosmetics
This commit is contained in:
parent
a364a82b7d
commit
84817a77a3
1 changed files with 6 additions and 8 deletions
|
|
@ -5,6 +5,7 @@ import pyblish.api
|
|||
|
||||
from openpype.client import get_subset_by_name
|
||||
from openpype.pipeline import legacy_io
|
||||
from openpype.hosts.maya.api.lib import get_attribute_input
|
||||
|
||||
|
||||
class CollectReview(pyblish.api.InstancePlugin):
|
||||
|
|
@ -146,19 +147,16 @@ class CollectReview(pyblish.api.InstancePlugin):
|
|||
)
|
||||
|
||||
# Collect focal length.
|
||||
#Refactor to lib or use available lib method.
|
||||
plug = "{0}.focalLength".format(camera)
|
||||
attr = camera + ".focalLength"
|
||||
focal_length = None
|
||||
if not cmds.listConnections(plug, destination=False, source=True):
|
||||
# Static.
|
||||
focal_length = cmds.getAttr(plug)
|
||||
else:
|
||||
# Dynamic.
|
||||
if get_attribute_input(attr):
|
||||
start = instance.data["frameStart"]
|
||||
end = instance.data["frameEnd"] + 1
|
||||
focal_length = [
|
||||
cmds.getAttr(plug, time=t) for t in range(int(start), int(end))
|
||||
cmds.getAttr(attr, time=t) for t in range(int(start), int(end))
|
||||
]
|
||||
else:
|
||||
focal_length = cmds.getAttr(attr)
|
||||
|
||||
key = "focalLength"
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue