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 / Material Viewport update
  RSS 2.0 ATOM  

Material Viewport update
Rate this thread
 
63893
 
Permlink of this thread  
avatar
  • gateian
  • Posted: 25 January 2012 11:14 PM
  • Location: Newcastle
  • Total Posts: 8
  • Joined: 22 August 2008 02:55 PM

I have written a script that takes the selected object and builds a Multi/Sub material that is shared across the selected objects. Basically, it does what attaching objects does, without actually attaching the objects.

The script does what it’s supposed to do, however the materials visible in the viewport after running the script, do not update correctly.

If I examine the object, the material IDs all match up to the newly created “shared” multi/sub material. That means max is displaying the wrong material on the object.

If I hit the render button, the max viewport suddenly shows the correct material in the viewport. I’m guessing I must be missing a command to update the viewport in some way. “redrawViews()” does not work. :/

Any ideas?



Replies: 0