Re: [Maya-Python] Shader texture file not found

2021-06-16 Thread Anastasia Korol
Thank you! I found out how to fix the string in my version but it is definitely a helpful script to take a look for me in the future to learn :) On Tuesday, June 15, 2021 at 11:51:40 p.m. UTC-7 tomas mikulak wrote: > Hi Anastasia, > it is better to create nodes yourself to have more control over

Re: [Maya-Python] Shader texture file not found

2021-06-15 Thread tomas mikulak
Hi Anastasia, it is better to create nodes yourself to have more control over it. But then you would have to do some operations maya does automatically. or just find proc that does it. I use this definition to add shader to specific mesh. In my case name of texture and mesh have some conventions.

Re: [Maya-Python] Shader texture file not found

2021-06-15 Thread Anastasia Korol
Thank you so much! Such a hilarious mistake The other thing I found out is that the fileNode is always being created as a new one for example fileNode12, etc and the texture node is connected to it and can't work with fileNode12 since in setAttr there is a specific format of fileNode1 ( cmds.setAt

Re: [Maya-Python] Shader texture file not found

2021-06-15 Thread Marcus Ottosson
Hi Anastasia, welcome to the forum! In Python, the \ character is a special character for escaping other characters. E.g. \n means “newline”. In your example, the \ is used in your path: file1 = ("C:\Users\User\Download\swatch_arles-yellow__6094-42.png") You can either keep it, and prepend a r to

[Maya-Python] Shader texture file not found

2021-06-15 Thread Anastasia Korol
Hi guys! I am beginner in Python and need a little bit of help with locating a path for texture file in Maya. It is a lambert shader with layered texture node and 3 texture files which I need to define. Hopefully it is the right chat to seek for help with such a noob question. The shader creati