Not familiar with metalray to say. I find it hard to believe that it doesn't
support environment variables completely, but if it does you might have to
come set up a 'pre-render' script that resolves these paths (in python:
os.path.expand).
Sorry I can't help more...

- Ofer
www.mrbroken.com


On Wed, Mar 16, 2011 at 5:53 PM, Erkan Özgür Yılmaz <[email protected]>wrote:

> hey guys,
>
> I have a related question, in our studio we are started to use mac osx
> workstations beside windows ones. And I have a problem with environment
> variables in path names.
>
> I've set an environment variable for all operating systems, let say is is
> REPOSITORY_PATH and it is set to M:\JOBs for windows and
> /Users/Shared/Servers/M/JOBs for osx.
>
> Using a path like $REPOSITORY_PATH/PROJECT_NAME/texture1.jpg works in both
> oses (windows, osx), but with mentalray binary proxies, setting the path
> with the environment variable is not working, so is there a particular tip
> for that situation.
>
> Thank you...
>
> E.Ozgur Yilmaz
> Lead Technical Director
> eoyilmaz.blogspot.com
> www.ozgurfx.com
>
>
> On Thu, Feb 3, 2011 at 8:52 PM, Panupat <[email protected]> wrote:
>
>>  Wow. Thank you so much Ofer, that's a very valid solution!
>>
>> I really appreciate your advise!
>>
>>
>>
>> On 4/2/2554 1:33, Ofer Koren wrote:
>>
>> You might want to consider simply using an environment variable in the
>> path, and always use forward slashes (linux style; they'll work on windows
>> too):
>>
>>  $PROJECT_ROOT/project/scene/B.ma
>>
>>
>>  Then on the windows machine set PROJECT_ROOT to "Z:"
>> ("set PROJECT_ROOT=Z:"), and on the linux machines have it set to "/linux".
>> (Obviously setting up the environment variable would be done in some logon
>> script, at the IT level...).
>>
>>  Maya will automatically resolve these variables and find the correct
>> path. It will also maintain the environment variable when saving the
>> referencing file (A.ma).
>>
>>
>>
>> - Ofer
>> www.mrbroken.com
>>
>>
>> On Thu, Feb 3, 2011 at 11:18 AM, Panupat <[email protected]> wrote:
>>
>>> Currently on a project that my client needs the reference file path to
>>> remain in linux format. For example
>>>
>>> A.ma , referencing objects from --> //linux/project/scene/B.ma
>>> B.ma , referencing objects from --> //linux/project/scene/C.ma
>>>
>>> Most of our Maya license here however are on Windows. I can run a
>>> Python script that convert all the paths  windows paths and save the
>>> file. For example
>>>
>>> Z:\project\scene\B.ma
>>>
>>> However I'm trying to figure out a way to do this without converting
>>> or altering the original file.... I'll try to explain my idea.
>>>
>>> - Run the script to open the file.
>>> - The script checks for the linux formatted reference path, and all
>>> child path down the hierarchy.
>>> - Maps the path to an appropriate windows formatted paths *without*
>>> altering the original files.
>>> - So when the animators "save" the file, the paths are still in their
>>> original linux formatted path.
>>>
>>> Is this possible to achieve this with Python script? Or will I need a
>>> fully-compiled plug in to get this to work?
>>>
>>> Greatly appreciate any suggestions.
>>>
>>> --
>>> http://groups.google.com/group/python_inside_maya
>>>
>>
>>  --
>> http://groups.google.com/group/python_inside_maya
>>
>>
>>  --
>> http://groups.google.com/group/python_inside_maya
>>
>
>  --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to