Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography


Featured Threads
  inspiration alert!!!
(37 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies)
  Maxforums.org Members Gallery
(516 replies)
  SON OF POST YOURSELF
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

MAxscript / REbusfarm Question
show user profile  Jock
I'm trying to send stuff to Rebusfarm for the first time but I keep getting an error when trying to do so ans since their 'live' chat takes about 5 hours to get a response there seems to be no quick way to solve this and they dont seem to know what it is.

So i go to render with Rebus, and get a MAXscript Macroscript Error Exception which says: Runtime error: Cannot assign undefined to Material Editor Slots

Then I get a box full of Maxscript information. Was wondering if maybe someone who knows MAXscript to see if they can tell what the issue is.

-- MacroScript File
-- Created: Feb 09 2005
-- Last Modified: Feb 25 2005
-- Medit Utilities
-- Version: 3dsmax 8
-- Author: Alexander Esppeschit Bicalho, Discreet
-- Modified: Alexander Esppeschit Bicalho, Discreet
--***********************************************************************************************
-- MODIFY THIS AT YOUR OWN RISK

/* History

Feb 09 - created script
Feb 10 - fixed problem where defaults.ini uses Hex number and ClassID is an Int
Feb 10 - added Restore Medit Slots script
Feb 11 - added Localization Notes
Feb 25 - added Condense Medit
Feb 25 - moved functions to meditfunctions.ms in StdScripts

NOTE TO LOCALIZATION
Only the headers should be localized

*/

macroScript clear_medit_slots
enabledIn:#("MAX", "VIZ")
category:~CLEAR_MEDIT_SLOTS_CATEGORY~
internalCategory:"Medit Tools"
ButtonText:~CLEAR_MEDIT_SLOTS_BUTTONTEXT~
tooltip:~CLEAR_MEDIT_SLOTS_TOOLTIP~
(


on execute do
(
defaultMtlLibFile = MeditUtilities.getDefaultLibraryFile()
if defaultMtlLibFile != undefined do
(
defaultMtlLib = loadTempMaterialLibrary defaultMtlLibFile
global _meditMaterialsBeforeReset = #()
for i in 1 to meditMaterials.count do
(
append _meditMaterialsBeforeReset meditMaterials[i]
if i <= defaultMtlLib.count then
meditMaterials[i] = defaultMtlLib[i]
else
meditMaterials[i] = defaultMtlLib[defaultMtlLib.count]
)
)
)

)

macroScript restore_medit_slots
enabledIn:#("MAX", "VIZ")
category:~RESTORE_MEDIT_SLOTS_CATEGORY~
internalCategory:"Medit Tools"
ButtonText:~RESTORE_MEDIT_SLOTS_BUTTONTEXT~
tooltip:~RESTORE_MEDIT_SLOTS_TOOLTIP~
(

on isEnabled do (if classof _meditMaterialsBeforeReset == Array do _meditMaterialsBeforeReset.count > 0)

on execute do
(
if _meditMaterialsBeforeReset.count == meditMaterials.count do
(
for i in 1 to meditMaterials.count do
(
meditMaterials[i] = _meditMaterialsBeforeReset[i]
)
_meditMaterialsBeforeReset = undefined
)
)

)

macroScript condense_medit_slots
enabledIn:#("MAX", "VIZ")
category:~CONDENSE_MEDIT_SLOTS_CATEGORY~
internalCategory:"Medit Tools"
ButtonText:~CONDENSE_MEDIT_SLOTS_BUTTONTEXT~
tooltip:~CONDENSE_MEDIT_SLOTS_TOOLTIP~
(


on execute do
(
defaultMtlLibFile = MeditUtilities.getDefaultLibraryFile()
if defaultMtlLibFile != undefined do
(
defaultMtlLib = loadTempMaterialLibrary defaultMtlLibFile

usedMtls = #()
for i in 1 to meditMaterials.count do
(
if MeditUtilities.isMaterialInUse meditMaterials[i] == true do
append usedMtls meditMaterials[i]
)
global _meditMaterialsBeforeReset = #()
for i in 1 to meditMaterials.count do
(
append _meditMaterialsBeforeReset meditMaterials[i]
if i <= usedMtls.count then
meditMaterials[i] = usedMtls[i]
else if i <= defaultMtlLib.count then
meditMaterials[i] = defaultMtlLib[i]
else
meditMaterials[i] = defaultMtlLib[defaultMtlLib.count]
)
)
)

)

macroScript basic_material_editor
enabledIn:#("MAX", "VIZ")
category:~BASIC_MATERIAL_EDITOR_CATEGORY~
internalCategory:"Medit Tools"
ButtonText:~BASIC_MATERIAL_EDITOR_BUTTONTEXT~
tooltip:~BASIC_MATERIAL_EDITOR_TOOLTIP~
(


on execute do
(
-- close sme if needed and open Medit
maxOps.mtlDlgMode = 0
if (sme.IsOpen()) do sme.Close()

-- Safe to call redundantly. Will restore window if minimized.
matEditor.Open()
)

)

macroScript advanced_material_editor
enabledIn:#("MAX", "VIZ")
category:~ADVANCED_MATERIAL_EDITOR_CATEGORY~
internalCategory:"Medit Tools"
ButtonText:~ADVANCED_MATERIAL_EDITOR_BUTTONTEXT~
tooltip:~ADVANCED_MATERIAL_EDITOR_TOOLTIP~
(


on execute do
(
-- close Medit if needed and open sme
maxOps.mtlDlgMode = 1
if (matEditor.IsOpen()) do matEditor.Close()

-- Safe to call redundantly. Will restore window if minimized.
sme.Open()
)

)

read 991 times
2/9/2012 9:51:19 AM (last edit: 2/9/2012 9:51:19 AM)
show user profile  Dub.
Help us out. What part of the script are you running when it crashes? Also, does it give a line number?


read 984 times
2/9/2012 10:07:21 AM (last edit: 2/9/2012 10:07:21 AM)
show user profile  Jock
All im doing is going to Render>Render with Rebus

It goes through the motions then this apears, so its not a script i've set off myself though I presume its a script that the Rebus program runs in order to collate materials/maps, ready for render. Theres no line number or anything just those two messages i posted. One saying a runtime error, the other is the MAXscript box.

I've never used MAXscript before so havent got the first clue about it. I just thought the messages might mean something to someone and actually say somehow what the problem is. If it doesnt, then not to worry. Was just hoping to get it sorted to test some renders.
read 977 times
2/9/2012 10:25:21 AM (last edit: 2/9/2012 10:25:21 AM)
show user profile  Dub.
Ah ok. This sort of thing is near impossible to fix remotely as the problem is almost certainly not in the script you posted, but in another script (probably the rebus one) that has called something in the script you posted with invalid parameters. One hint you might want to investigate is that it is something to do with the material editor. Try resetting it before submitting the render.


read 970 times
2/9/2012 10:40:37 AM (last edit: 2/9/2012 10:40:37 AM)
show user profile  Jock
Aye no worries, thanks for trying. I'll have to have a play about and see what I can do.
read 966 times
2/9/2012 10:58:42 AM (last edit: 2/9/2012 10:58:42 AM)
#Maxforums IRC
Open chat window


Support Maxforums.org