Author Topic: Substance Painter scripting: alg.project.ProjectSettings  (Read 1496 times)

Hello there,

My scripting with Substance Painter and maya continues, and I'm running into another problem that I can't find a solution for.
In the documentation, there is some info about adding projectSettings to a new project.

<static> create(meshFile [, additionalMaps] [, templateFile] [, projectSettings])

The projectsettings contain the normalMapFormat for example, but I can't get the syntax right.

What do I have to type in to make this work, and is it also possible to change the projectsettings if you already opened a project?

I tried the following:

alg.project.create("file:///c:/Test.fbx",[],[],[alg.project.ProjectSettings.normalMapFormat="DirectX"]
or
alg.project.create("file:///c:/Test.fbx",[],[],[alg.project.ProjectSettings{normalMapFormat:"DirectX"}]
or
alg.project.create("file:///c:/Test.fbx",[],[],[normalMapFormat:"DirectX"]
or
alg.project.create("file:///c:/Test.fbx",[],[],[{normalMapFormat:"DirectX"}]
and probably many more that I can't remember anymore.

Basically, I tried everything I could think of, but I can't figure out the correct syntax.
Can anybody please help me with this?

Thanks,

Ron Kamphuis

Hello there,

My scripting with Substance Painter and maya continues, and I'm running into another problem that I can't find a solution for.
In the documentation, there is some info about adding projectSettings to a new project.

<static> create(meshFile [, additionalMaps] [, templateFile] [, projectSettings])

The projectsettings contain the normalMapFormat for example, but I can't get the syntax right.

What do I have to type in to make this work, and is it also possible to change the projectsettings if you already opened a project?

I tried the following:

alg.project.create("file:///c:/Test.fbx",[],[],[alg.project.ProjectSettings.normalMapFormat="DirectX"]
or
alg.project.create("file:///c:/Test.fbx",[],[],[alg.project.ProjectSettings{normalMapFormat:"DirectX"}]
or
alg.project.create("file:///c:/Test.fbx",[],[],[normalMapFormat:"DirectX"]
or
alg.project.create("file:///c:/Test.fbx",[],[],[{normalMapFormat:"DirectX"}]
and probably many more that I can't remember anymore.

Basically, I tried everything I could think of, but I can't figure out the correct syntax.
Can anybody please help me with this?

Thanks,

Ron Kamphuis

Hi Ron,

It's not possible to change the project settings if you have already opened the project. Here is the create syntax.

Code: [Select]
alg.project.create("file:///c:/Test.fbx",[],[],{"normalMapFormat":"DirectX"})
Cheers,
Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja