Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max: Create/Set Project Folder when starting Max or task changed #2

Merged
merged 12 commits into from
Jul 18, 2024

Conversation

moonyuet
Copy link
Member

@moonyuet moonyuet commented Jul 11, 2024

Changelog Description

Ported from ynput/ayon-core#475

Changelog Description

Create/Set Project Folder with mxp workspace file when starting Max or task changed, similar to what we do for creating mel workspace in Maya hosts

  • The default mxp files create and set up the project in workdir.
  • The scene would be set up in the workdirs. It will locate the workdir when launching Max.
  • Animation, archives, autobackup, bitmapproxies, images, preview, renderassets, and sounds folders would be created and set up accordingly to the directory
  • You can go to File -> Project -> Configure Project Paths to check to see if all files set correctly regarding to the mxp file.
  • You can use the relative path, e.g. images/image1.png can be used as texture map into the material

Additional info

Update your Max Addon to 0.1.8
Max Workspace is optional for project creation.
image

Testing notes:

  1. Launch Max
  2. It creates/sets the project folder for you.
  3. Tries to task change or workfile save, Max should set project folder accordingly

server/settings/main.py Outdated Show resolved Hide resolved
server/settings/main.py Outdated Show resolved Hide resolved
client/ayon_max/mxp.py Outdated Show resolved Hide resolved
@moonyuet moonyuet changed the title ported ayon_core max code to ayon_max Max: Create/Set Project Folder when starting Max or task changed Jul 12, 2024
@moonyuet moonyuet requested a review from BigRoy July 12, 2024 08:42
Copy link
Contributor

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small notes (see comments) but other than that code looks good.

I do think, if one were to "save" into another task that has no workfiles yet from the workfiles tool in Max itself it will not create and hence not set the project for that context. Not sure if critical, but that may be an issue one may face with this.

client/ayon_max/hooks/pre_copy_mxp.py Outdated Show resolved Hide resolved
client/ayon_max/mxp.py Outdated Show resolved Hide resolved
server/settings/main.py Outdated Show resolved Hide resolved
@moonyuet moonyuet requested a review from BigRoy July 12, 2024 13:54
Copy link
Contributor

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside of a logging level note - code looks good to me. Ready for test run.

This note I think may also still be relevant for a future issue:

I do think, if one were to "save" into another task that has no workfiles yet from the workfiles tool in Max itself it will not create and hence not set the project for that context. Not sure if critical, but that may be an issue one may face with this.

@moonyuet moonyuet force-pushed the core/enhancement/AY-5186_3dsmax-project-creation branch from 0b371e7 to 6fc1f24 Compare July 18, 2024 16:03
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
client/ayon_max/mxp.py Outdated Show resolved Hide resolved
moonyuet and others added 3 commits July 19, 2024 00:18
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
@moonyuet moonyuet merged commit a7c2313 into develop Jul 18, 2024
1 check passed
@moonyuet moonyuet deleted the core/enhancement/AY-5186_3dsmax-project-creation branch July 18, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants