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> 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, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > -- --:: Kurian ::--
_______________________________________________ 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