Loading nodePresets

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 12 December 2010   #1
Loading nodePresets

I am trying to load a mental ray preset for 'defaultRenderGlobals', [made from the render settings window-> presets ->save settings as preset] but if I have Maya Software selected as my renderer I get:

      cmds.nodePreset(load=["defaultRenderGlobals", "ibltest"])
      // Error: file: C:/Program Files/Autodesk/Maya2011/scripts/others/createMayaSoftwareCommonGlobalsTab.mel line 45: setParent: Object 'mentalRayTabLayout' not found. //


I still get an error if I try:
cmds.setAttr("defaultRenderGlobals.currentRenderer", "mentalRay", type="string")
  cmds.nodePreset(load=["defaultRenderGlobals", "ibltest"])


However, if I run:
cmds.setAttr("defaultRenderGlobals.currentRenderer", "mentalRay", type="string")

followed by seperately:
cmds.nodePreset(load=["defaultRenderGlobals", "ibltest"])

Everything works. But I need to run them from one script.

Does anyone know of a way to run each line independently, or another way to load the preset without causing errors. I have also tried this with a refresh to no avail.

Last edited by fallenrelics : 12 December 2010 at 04:47 PM. Reason: Clarification
 
Old 12 December 2010   #2
cmds.setAttr("defaultRenderGlobals.currentRenderer", "mentalRay", type="string") cmds.evalDeferred("cmds.nodePreset(load=[\"defaultRenderGlobals\", \"newPSTest\"])", lowestPriority=1)


Using evalDeffered works. Although it would still be nice know of a way to suspend errors since scriptEditorInfo no longer does so.
 
Old 12 December 2010   #3
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:55 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.