mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Do not auto create workfile instance if project isn't open.
This commit is contained in:
parent
c34f8fed24
commit
2c544246fd
1 changed files with 5 additions and 0 deletions
|
|
@ -10,6 +10,8 @@ from openpype.hosts.substancepainter.api.pipeline import (
|
|||
get_project_metadata
|
||||
)
|
||||
|
||||
import substance_painter.project
|
||||
|
||||
|
||||
class CreateWorkfile(AutoCreator):
|
||||
"""Workfile auto-creator."""
|
||||
|
|
@ -22,6 +24,9 @@ class CreateWorkfile(AutoCreator):
|
|||
|
||||
def create(self):
|
||||
|
||||
if not substance_painter.project.is_open():
|
||||
return
|
||||
|
||||
variant = self.default_variant
|
||||
project_name = self.project_name
|
||||
asset_name = legacy_io.Session["AVALON_ASSET"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue