XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Maxscript flakey?

11-03-2005, 03:59 AM
Why does the following work in the max script listener , but not in my max script?!

$.modifiers.mapChannel = 3

also the same happens with the following variation

$.modifiers[#UVW_Mapping].mapChannel = 3

Is there a way to get odd stuff like this to be posted in the listener so it does work?
Ive had this isse before...

11-03-2005, 04:19 AM
Both work just fine for me. What are you wrapping around the line?

11-03-2005, 04:29 AM
Probably the object gets deselected at some point during your script, which is why people are telling you to store the selected object into a variable like obj

11-03-2005, 08:04 AM
yeah okay ill update my script tonight and see if it works...

11-03-2005, 12:45 PM
ok trying to planarmap, this code fails to work. the following line doesnt seem to get executed, the rest are fine...


myObj = selection[1] --get selected object
myTempSelection = for i in myObj.selectedfaces collect i.index --convert selection to array
mySelection = myTempselection as bitarray --convert array to bitarray

subobjectLevel = 0
modPanel.addModToSelection (Unwrap_UVW ()) ui:on
subobjectLevel = 3
myObj.modifiers[#unwrap_uvw].unwrap.selectPolygons mySelection --select original selection
myObj.modifiers[#unwrap_uvw].unwrap5.mappingMode 1 --planar map mode
myObj.modifiers[#unwrap_uvw].unwrap5.mappingAlign 2 --z map
myObj.modifiers[#unwrap_uvw].unwrap5.mappingMode 0
macros.run "Modifier Stack" "Convert_to_Poly"
subobjectLevel = 4
myObj.EditablePoly.SetSelection #Face mySelection --select original selection

11-06-2005, 02:13 PM
sometimes if the editble pannel is not your current pannel, some modifier command won't work.
try adding one of this at the begining of your script
max modify mode

11-07-2005, 03:55 AM
that still doesnt fix the issue, i fixed it at home by reinstalling max, but i cant do that here at work :|

CGTalk Moderation
11-07-2005, 03:55 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.