mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Optional viewport refresh on pointcache extraction
This commit is contained in:
parent
f0ece4b778
commit
a2abcd2524
2 changed files with 10 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ class CreatePointCache(plugin.Creator):
|
|||
self.data["visibleOnly"] = False # only nodes that are visible
|
||||
self.data["includeParentHierarchy"] = False # Include parent groups
|
||||
self.data["worldSpace"] = True # Default to exporting world-space
|
||||
self.data["refresh"] = False # Default to suspend refresh.
|
||||
|
||||
# Add options for custom attributes
|
||||
self.data["attr"] = ""
|
||||
|
|
|
|||
|
|
@ -86,13 +86,21 @@ class ExtractAlembic(publish.Extractor):
|
|||
start=start,
|
||||
end=end))
|
||||
|
||||
with suspended_refresh():
|
||||
if instance.data.get("refresh", False):
|
||||
with maintained_selection():
|
||||
cmds.select(nodes, noExpand=True)
|
||||
extract_alembic(file=path,
|
||||
startFrame=start,
|
||||
endFrame=end,
|
||||
**options)
|
||||
else:
|
||||
with suspended_refresh():
|
||||
with maintained_selection():
|
||||
cmds.select(nodes, noExpand=True)
|
||||
extract_alembic(file=path,
|
||||
startFrame=start,
|
||||
endFrame=end,
|
||||
**options)
|
||||
|
||||
if "representations" not in instance.data:
|
||||
instance.data["representations"] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue