Can't access custom folder from module?

Can't access custom folder from module?

Anonymous
Not applicable
409 Views
0 Replies
Message 1 of 1

Can't access custom folder from module?

Anonymous
Not applicable

Good Evening,

 

I have created a module hierarchy as mentioned in this post: Maya Help: Module. Everything works fine except I have a custom folder and I can't load the "theme" file of it.

 

My mod file looks like this:

+ MAYAVERSION:2017 circlelizer 0.9 <fullpath*>/2017/
PATH +:= themes

* I hide my real path. 

 

So I am appending the themes folder path to the environment variable. It's also visible if I print out all the environment variables within Maya with python. But I can't access the folder by referencing it with themes/  in my plugin.

 

Before trying to open my theme file I try to resolve the relative path with Maya's python API.

 

def getRelativePath(path):
    fileObject = om.MFileObject()
    fileObject.resolveMethod = om.MFileObject.kRelative
    fileObject.setRawPath(path)
    return fileObject.resolvedPath()

(This works great for plug-ins and docs and icons folder.)

 

My module Folder hierarchy:

 

Modulename

+2017

- + plug-ins

- + themes

- + icons

- + docs 

 

Regards,

 

LifeArtist

0 Likes
410 Views
0 Replies
Replies (0)