• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

How to set project setting automatically at launch time?

New Here ,
Jan 12, 2022 Jan 12, 2022

Copy link to clipboard

Copied

I'm looking to add substance painter to our VFX workflow and I'm looking for a way to have project Color managment settings automatically setted to the project template OCIO config file. This way artist don't have to reset those manually every time they receive a new painter assignment.

 

I've been looking in the doc, forum and the web and wasn't really able to find a clear explanation of the intended workflow to achieve this result pipeline wise.

 

Could anyone shed some lights on this for me please?

.Logan

TOPICS
Color Management , Discussion , Import & Export , Scripting

Views

177

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jan 13, 2022 Jan 13, 2022

Right now you can force the OCIO configuration by making sure there the "OCIO" environment variable present in the environment of the application (at OS level or in the context from which the app is ran). This will automatically set the desired configuration upon creating or editing projects.

 

We are missing right now (but currently in development) a way to set the value for the default color spaces for the bitmap import and export. We plan to add the support of custom roles in our next version

...

Likes

Translate

Translate
Adobe Employee ,
Jan 13, 2022 Jan 13, 2022

Copy link to clipboard

Copied

Right now you can force the OCIO configuration by making sure there the "OCIO" environment variable present in the environment of the application (at OS level or in the context from which the app is ran). This will automatically set the desired configuration upon creating or editing projects.

 

We are missing right now (but currently in development) a way to set the value for the default color spaces for the bitmap import and export. We plan to add the support of custom roles in our next version (next month if everything goes well) to allow this part to be automatically setup too.

 

In the future we will expose everything into the Python API to give full control on project creation and edition regarding Color Management. However I don't have an ETA to share for this yet.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2022 Jan 13, 2022

Copy link to clipboard

Copied

Hello Fabrice,

 

Thanks for taking the time to answer me. This is actually the 1st thing I've tried and in my case setting up the OCIO env var doesn't automatically set the color managment value to OCIO but legacy (with a mention that the OCIO env is set) as shown below. On my side, I've been looking for a way to set this config at a show level.

 

sbpainter2.PNG

 

I've also tried to use python plugin to achieve the same goal. I've tried using "substance_painter.project.create" method (as  seen in the app python API doc) to setup default show config and load a dummy geo that artist can update to their task once they open painter.

 

I've found out that this script was only working when added to the /plugin folder and triggered manually from the python menu.

 

Adding the same script to to the /startup does output the script print statement showing that the project is opened/saved and a mesh is associated but the UI doesn't seems to be refreshed to reflect this state:

  • Edit/Project Configuration is still disabled
  • no mesh is shown in the viewport.

 

I wasn't able to found ressources on the web / in the doc to confirm if this was or not the expected behavior but at that point I was still unable to found an automated way to achieve this goal.

 

Let me know if you have any idea that might help. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 14, 2022 Jan 14, 2022

Copy link to clipboard

Copied

Can you update to Painter 7.4.1 ? The behavior I described regarding the environnment variable wasn't implemnted yet in 7.4.0.

 

Regarding your python plugin, there is something that is not clear to me. Did you manually call the project creation during the application startup ? If that's so, you have to wait for the application to be ready to be able to call this kind of functions. An easy way to is to check if the libraries have finished crawling ressources.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

LATEST

I haven't tried the OCIO env variable approach, but you can modify the registry values for a new project that will specify new projects to use Ocio profile.  In Regedit Setting  "HKEY_CURRENT_USER\Software\Adobe\Adobe Substance 3D Painter\new_project\cm_config" entries "workflowType" variable to 1 will have "Color management" profile set to "OpenColorIO" in the new project dialog.  If you don't see these in the registry you have to create a new project once, then the enties will show up in the registry.  Problem I'm having is that creatinga new project using python doesn't respect these values. Hope this helps.

Felmers_1-1644533901041.png

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources