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.setAttr("{}.fileTextureName".format(fileNode1), file1, type="string") )
I am sure it is a simple thing connected with usage of string type in the right way. If somebody has an idea how to fix it, let me know! Thank you On Tue, 15 Jun 2021 at 22:52, Marcus Ottosson <konstrukt...@gmail.com> wrote: > 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 make it a “raw string”, like > so: > > file1 = (r"C:\Users\User\Download\swatch_arles-yellow__6094-42.png") > > Which informs Python to “hey, don’t give special treatment to any of these > characters”. Or you can replace \ for /, Windows is OK with that syntax. > You can also remove the parentheses since they are not needed. > > There might be other issues with your snippet, but this is definitely one > of them. > > On Wed, 16 Jun 2021 at 06:23, Anastasia Korol <anastasii.ko...@gmail.com> > wrote: > >> 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 >> creating works perfectly so the only thing is texture file error when maya >> can't find the texture file path at all: >> >> https://del.dog/crafubingu.txt >> >> Thank you! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to python_inside_maya+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/40130504-df79-4ea6-841c-582c52d53e1bn%40googlegroups.com >> <https://groups.google.com/d/msgid/python_inside_maya/40130504-df79-4ea6-841c-582c52d53e1bn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to python_inside_maya+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB5tfBZarSreRTAX91SeA5ARduDWY-wodHzk14%3DSfbvNw%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB5tfBZarSreRTAX91SeA5ARduDWY-wodHzk14%3DSfbvNw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAAZJ9HV7jL5qVK4mzt-YQWJhMhA2oO8donWL20PBDYJm9nnw6w%40mail.gmail.com.