Jump to content

Help...Error when trying to reset Material Editor


danb4026
 Share

Recommended Posts

I get a Maxscript error when I try to reset the Material Editor or Condense the material editor. I have attached the Maxscript error as a text file. Does anyone have a fix for this problem?

 

The on screen error actually reads "Runtime error: Cannot assign undefined to Material Editor Slots".

 

I am using Max 2011 and Vray SP5 with the default switcher set to Max.Vray so that the Material Editor defaults to 24 vray slots. Not sure if that helps at all. Thanks.

Link to comment
Share on other sites

  • 3 weeks later...

I was having the same problem and couldn't find any information on-line about it. I managed to edit the script to remove the error, but I did it by hard-coding the default materials to vRay. This works great for me as I only use vRay in my workflow, but if you switch between rendering engines it might pose a problem for you.

 

I just had to update two lines of code to manually set the vRay Standard material as the default when reset. To do so open up the Macro_MeditUtilities.mcr and go down to line 47.

 

line 47: meditMaterials[i] = defaultMtlLib[defaultMtlLib.count]

This attempts to assign the default material library in use, which is where our problem is. Since I always use vRay I hardcoded the vRay material as the default by replacing that line with the one below.

 

line 47: meditMaterials[i] = VRayMtl name: ("vRay " + i as string)

Additionally you will want to go down to line 109 where the same code is duplicated, and replace it with the new code as well.

Link to comment
Share on other sites

  • 3 weeks later...

If you replaced the old code with the new code it should be working. Make sure you completely exit the program and then relaunch it so that the changes take effect.

 

When you get the same error message again does it refer you to the exact same line in the macroscript?

Link to comment
Share on other sites

  • 2 weeks later...

On a similar note, I use these two script regularly. The populate material editor I use about 5 times a day. I even have it hot keyed into my shortcuts. It takes whatever is selected, and puts it into the material editor for editing.

 

The other script simply open a new material editor with all of the material slots reset. This is helpful when you have a lot of large bitmaps that take awhile to load.

 

With a simple mod you can have it populate with Vray materials, or whatever else you might need besides standard amterials.

 

http://www.scriptspot.com/3ds-max/scripts/populate-medit-zorb

http://www.scriptspot.com/3ds-max/scripts/open-clean-material-editor-zorb

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...