Explicitly also check for endFrame + PEP08 and cosmetics

This commit is contained in:
Roy Nieterau 2018-12-08 19:39:27 +01:00
parent 7a39b50469
commit 8c09ada8cb

View file

@ -15,8 +15,8 @@ class CollectInstances(pyblish.api.ContextPlugin):
id (str): "pyblish.avalon.instance
Specific node:
The specific node is important because it dictates in which way the subset
is being exported.
The specific node is important because it dictates in which way the
subset is being exported.
alembic: will export Alembic file which supports cascading attributes
like 'cbId' and 'path'
@ -53,11 +53,9 @@ class CollectInstances(pyblish.api.ContextPlugin):
data.update(self.get_frame_data(node))
# Create nice name
# All nodes in the Outputs graph have the 'Valid Frame Range'
# attribute, we check here if any frames are set
# Create nice name if the instance has a frame range.
label = data.get("name", node.name())
if "startFrame" in data:
if "startFrame" in data and "endFrame" in data:
frames = "[{startFrame} - {endFrame}]".format(**data)
label = "{} {}".format(label, frames)