PDA

View Full Version : Maxscript flakey?


Gibbz
11-03-2005, 02: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...

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

stuh505
11-03-2005, 03: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

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

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

myObj.modifiers[#unwrap_uvw].unwrap5.mappingAlignToView()



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.mappingAlignToView()
myObj.modifiers[#unwrap_uvw].unwrap5.mappingMode 0
macros.run "Modifier Stack" "Convert_to_Poly"
subobjectLevel = 4
myObj.EditablePoly.SetSelection #Face mySelection --select original selection

CarlosA
11-06-2005, 01: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

Gibbz
11-07-2005, 02: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, 02: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.