Skip to content

Commit

Permalink
make sure it doesn't show popup-dialog to convey project has been cre…
Browse files Browse the repository at this point in the history
…ated
  • Loading branch information
moonyuet committed Jul 18, 2024
1 parent 2124951 commit 6fc1f24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/ayon_max/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _set_project():
proj_dir = rt.pathConfig.getProjectSubDirectory(count)
if proj_dir:
os.makedirs(proj_dir, exist_ok=True)
rt.pathConfig.doProjectSetupStepsUsingDirectory(workdir)
#rt.pathConfig.doProjectSetupStepsUsingDirectory(workdir)
rt.pathConfig.setCurrentProjectFolder(workdir)


Expand Down
11 changes: 5 additions & 6 deletions client/ayon_max/hooks/pre_copy_mxp.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@ class PreCopyMxp(PreLaunchHook):

def execute(self):
max_setting = self.data["project_settings"]["max"]
enabled_project_creation = max_setting.get("enabled_project_creation")
if not enabled_project_creation:
self.log.warning("3dsmax project creation is not enabled. "
"Skipping creating workspace.mxp to workdir.")
return
mxp_workspace = max_setting.get("mxp_workspace")
# Ensure the hook would not cause possible error
# when using the old addon.
if mxp_workspace is None:
self.log.warning("No mxp workspace setting found in the "
"latest Max Addon.")
return

enabled_project_creation = max_setting["mxp_workspace"].get("enabled_project_creation")
if not enabled_project_creation:
self.log.warning("3dsmax project creation is not enabled. "
"Skipping creating workspace.mxp to workdir.")
return
workdir = self.launch_context.env.get("AYON_WORKDIR")
if not workdir:
self.log.warning("BUG: Workdir is not filled.")
Expand Down

0 comments on commit 6fc1f24

Please sign in to comment.