You should return a value from rootDir and now you will end up
with AttributeError: 'NoneType' object has no attribute 'endswith'.

you are using python so use / for path. And make another function which
return your show seq and shot.

hope this help


On Tuesday, July 3, 2012, Kurian O.S wrote:

> 1 : Your root function doesn't return anything and why you didn't use
> mainpath for setting the env vars ?
>
> like os.environ["SHOW"] =os.path.join(mainPath,"SHOW1")
>
> You should return a value from rootDir and you will end up
> with AttributeError: 'NoneType' object has no attribute 'endswith'
>
> basically your code is like this now os.listdir(os.path.join(None,
> None, None, None))
>
>
>
>
> On Tue, Jul 3, 2012 at 5:17 AM, Varun Hadkar 
> <varun...@gmail.com<javascript:_e({}, 'cvml', 'varun...@gmail.com');>
> > wrote:
>
>> Hello,
>>
>> After following the Asset management docs i'm trying to push the script
>> slightly bit further. I am trying to set my "Show", "Sequence" and "Shot"
>> environment for nuke.
>>
>> def rootDir():
>>     mainPath = 'X:\Nuke\PipelineTest'
>>     os.environ["SHOW"] = "X:\Nuke\PipelineTest\SHOW1"
>>     os.environ["SEQ"] = "X:\Nuke\PipelineTest\SHOW1\SEQ1"
>>     os.environ["SHOT"] = "X:\Nuke\PipelineTest\SHOW1\SEQ1\SHOT1"
>>
>> This just simply sets the whole Show env to show1 and same for scene and
>> shot. What I want is to tell nuke is that all the folders inside the
>> PipelineTest folder are "SHOWS"  and everything inside the SHOWS are
>> sequences and everything inside SEQUENCES are SHOTS.
>>
>> I tried using this:
>> os.listdir(os.path.join(rootDir(), os.environ["SHOW"], os.environ["SEQ"],
>> os.environ["SHOT"]))
>>
>> but it ends up giving me a runtime error.
>>
>> Any heads up as to how I should go about?
>>
>> --
>> Varun Hadkar
>>
>>
>>
>> _______________________________________________
>> Nuke-python mailing list
>> Nuke-python@support.thefoundry.co.uk <javascript:_e({}, 'cvml',
>> 'Nuke-python@support.thefoundry.co.uk');>,
>> http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>
>
> --
> --:: Kurian ::--
>
>

-- 
Sent from iPhone
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to