Loading nodePresets

Become a member of the CGSociety

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

Thread Tools Search this Thread Display Modes
  12 December 2010
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
  12 December 2010
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.
  12 December 2010
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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
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
Society of Digital Artists

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

All times are GMT. The time now is 05:09 AM.

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