Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / saveTempMaterialLibrary() and Permanent Insanity... you choose
  RSS 2.0 ATOM  

saveTempMaterialLibrary() and Permanent Insanity... you choose
Rate this thread
 
56074
 
Permlink of this thread  
avatar
  • Location: Columbus, Ohio
  • Total Posts: 434
  • Joined: 01 March 2008 04:43 AM

So it’s late and I’m too tired to fire any more neurons on this at the moment… but instead send it to my Mental Backburner called the Area…

I’ve got a script creating a Material Library.

local BrushMaterials MaterialLibrary

Then a bunch of code to fill that library with a loop that contains this:

append BrushMaterials addMatarial

And finally, I end it all off with an excellent snippet of code I copied straight from the MAXScript doc:

saveTempMaterialLibrary BrushMaterials "$matlibs/wwmt_source.mat"

(well, copied in structure but renamed the variables… you understand)

And I run the code expecting to see the results… but alas I get this wonderful Exception:

>> MAXScript Rollout Handler Exception:
-- Type error: Operation requires a MaterialLibrary, got: MaterialLibrary <<

Maybe I’m old fashioned… but maybe I should have drank tonight instead of do code...?



______________________________
Shawn Olson’s Creative Arts
Developer of the Wall Worm Model Tools for Source
And my Favorite Unsung Plugin: Convexity for Level Design

Max 4/Gmax, 2008 - 2013
Mudbox 2009-2011
Win 7 x64 (x4)
Geforce 480x2 | Geforce 275x1 | ATI Radeon HD 3200 | Intel Generic chip
8GB | 12GB | 4GB | 4GB
Intel Quad 6700 | i7 930 | Athlon QL-65 | Intel Quad 6700

Replies: 2
/img/forum/dark/default_avatar.png
local BrushMaterials MaterialLibrary()
Author: Anubis

Replied: 21 May 2011 06:22 PM  
/img/forum/dark/default_avatar.png

Thank you Anubis! That’s what you get trying to make things late at night and never feeling completely sure about MAXScript syntax.

Author: Shawn Olson

Replied: 22 May 2011 03:13 AM