Locked file texture Python/Maya shadingNode

Locked file texture Python/Maya shadingNode

JohnSaleem3D
Community Visitor Community Visitor
2,009 Views
5 Replies
Message 1 of 6

Locked file texture Python/Maya shadingNode

JohnSaleem3D
Community Visitor
Community Visitor

i am getting some strange result here using the shadingNode,

 

whenever i create a file node thro python in maya i get the color space locked and the color space drop menu greyed out , ex.

fileNode = cmds.shadingNode("file",asTexture=True, name = "dispMap")

 

please see image attached, however i get the usual expected result when i create the file node from the create shader tab in hypershade

 

Capture.PNG

0 Likes
2,010 Views
5 Replies
Replies (5)
Message 2 of 6

mspeer
Consultant
Consultant

Hi!

 

You need a connection to Color Management.

 

fileNode = cmds.shadingNode("file",asTexture=True, isColorManaged=True, name = "dispMap")
0 Likes
Message 3 of 6

Anonymous
Not applicable

Is there an easier way to set this up? Something built in the UI? Or do I just type that snippet of code in to the script editor ? 

0 Likes
Message 4 of 6

mspeer
Consultant
Consultant

Hi!

 

What do you want to do, what is the problem?

0 Likes
Message 5 of 6

Anonymous
Not applicable

I am having the same issue as the guy in the original post. The color space is locking when I connect the output of 2D textures to certain nodes. I am trying to make sure the textures are in the RAW color space but after I set it and connect it to a 2D bump for example, the color space option box grey's out. Another example is me plugging in a roughness map to an AIStandard Surface specular roughness slot. Not sure if there is any way to fix this in the UI or if I need to use a script to unlock this. Albedo map is color map is unlocked and in the same AIstandard Surface / base color . I am baffled 

0 Likes
Message 6 of 6

mspeer
Consultant
Consultant

Hi!

1. It's not the same problem. This topis is about creating a node with a script not with the UI.

 

2. Please add an exact step by step instruction how to reproduce this + add an example scene.

(Here it works correct)

0 Likes