On Wed, Sep 21, 2016 at 1:11 AM Lidia Martinez <darksideg...@gmail.com>
wrote:

>
> I need to modify the path set for an image sequence on a texture file.
> First, when I try to get the path using getAttr, instead of having the
> same string in the field:
>
> path_to_files_<f>.iff
>
> I get the first file of the sequence instead:
>
> path_to_files_0001.iff
>
> I suppose this is a bug in Maya?...
>
>
> This was set by the people working on the textures, and they didn't know
> doing it automatically would not generate a #### pattern, but that <f>.
>

How about this?

cmds.getAttr(".computedFileTextureNamePattern")
# path_to_files_<f>.iff

http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/Nodes/file.html

*computedFileTextureNamePattern* (*cfnp*) string
TmultiSharedObject::create<TdataString>"" [image: output]
<http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/Nodes/flagHelp.html>[image:
input]
<http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/Nodes/flagHelp.html>[image:
hidden]
<http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/Nodes/flagHelp.html>
*Computed File Texture NamePattern *is the name of an image file with
certain parts replaced with token identifiers based on the configuration of
the file node. This value is automatically computed by Maya and never
stored.

That would make sense why it wasn't being returned by the normal
"fileTextureName" attribute, since its computed and used dynamically.



>
>
> So, after modifying that path, I need to generate the right path ending
> again, replacing that number for <f> or ####.
>
>
> If I change to ####, Arnold (which is the plugin that will eventually uses
> it), doesn't get the texture that used to work. Weird, because if you
> change it by hand on Maya, it works.
>
> If I set <f> , Arnold returns "unknown token <f>" error.
>
>
> This is not an Arnold problem. The thing is that changing that using code
> breaks the path somehow.
>
>
>
> Any ideas?
>
> Thanks
>
>
> --
> Lidia
>
> --
> 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/CAAB1%3D8wmCchawE-VQyXU%2BkdDw%2BTgtBZkWatzqxOciKD2ZxiFRg%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAAB1%3D8wmCchawE-VQyXU%2BkdDw%2BTgtBZkWatzqxOciKD2ZxiFRg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAPGFgA0Mhex7Qxe%3D_U1_xyW-JG9oFCDojrj4JGMrFyvOMN8R0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to