danb4026 Posted September 25, 2010 Share Posted September 25, 2010 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 More sharing options...
Coty Posted October 13, 2010 Share Posted October 13, 2010 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 More sharing options...
danb4026 Posted October 29, 2010 Author Share Posted October 29, 2010 Coty, thanks for the reply, just saw it. I copied and pasted your code into lines 47 and 109, but get the same result. Am I doing something wrong? Link to comment Share on other sites More sharing options...
Coty Posted October 29, 2010 Share Posted October 29, 2010 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 More sharing options...
danb4026 Posted November 3, 2010 Author Share Posted November 3, 2010 Coty, thanks for everything. Got it all working just great thanks to your help. Link to comment Share on other sites More sharing options...
architectandy Posted November 3, 2010 Share Posted November 3, 2010 I had problems with this too - just wanted to thanks also. Link to comment Share on other sites More sharing options...
scepticus Posted November 17, 2010 Share Posted November 17, 2010 Same problem, same solution, thanks again. Link to comment Share on other sites More sharing options...
Crazy Homeless Guy Posted November 17, 2010 Share Posted November 17, 2010 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now