Gibbz
11-02-2005, 10:12 AM
ok decided to do a bunch of max script questions as these things i cannot seem to get working...
1. Ok i can get the matID from the selected face, but i cannot set the matID for the selected face in edit poly. Im currently trying to use....
$.EditablePoly.setMaterialIndex 1 --set material id on selected face to 1
2. I want do do my own spinner for material ID on my dialog(hence the above question), does "on myMaterial changed do" activate the script when changing, using spinners etc?
3. The following code work when i cycle through it, but when i run the script it doesnt work... The same issue when doing a planarx, planary, planar z etc...
on myPlanarView pressed do --facemap
(
mySelection = $.getselection #Face --get currently selected polys
subobjectLevel = 0
modPanel.addModToSelection (Unwrap_UVW ()) ui:on
subobjectLevel = 3
$.modifiers[#unwrap_uvw].unwrap.selectPolygons mySelection --select original selection
$.modifiers[#unwrap_uvw].unwrap5.mappingMode 1 --planar map mode
$.modifiers[#unwrap_uvw].unwrap5.mappingAlign 2 --z map
$.modifiers[#unwrap_uvw].unwrap5.mappingAlignToView()
$.modifiers[#unwrap_uvw].unwrap5.mappingMode 0
macros.run "Modifier Stack" "Convert_to_Poly"
subobjectLevel = 4
$.EditablePoly.SetSelection #Face mySelection --select original selection
)
4. Is there a way to when selecting 2 faces find which face is selected first, then find the shared edge in the uv dialog?
Thanks again guys :) im getting there... slowly :D
1. Ok i can get the matID from the selected face, but i cannot set the matID for the selected face in edit poly. Im currently trying to use....
$.EditablePoly.setMaterialIndex 1 --set material id on selected face to 1
2. I want do do my own spinner for material ID on my dialog(hence the above question), does "on myMaterial changed do" activate the script when changing, using spinners etc?
3. The following code work when i cycle through it, but when i run the script it doesnt work... The same issue when doing a planarx, planary, planar z etc...
on myPlanarView pressed do --facemap
(
mySelection = $.getselection #Face --get currently selected polys
subobjectLevel = 0
modPanel.addModToSelection (Unwrap_UVW ()) ui:on
subobjectLevel = 3
$.modifiers[#unwrap_uvw].unwrap.selectPolygons mySelection --select original selection
$.modifiers[#unwrap_uvw].unwrap5.mappingMode 1 --planar map mode
$.modifiers[#unwrap_uvw].unwrap5.mappingAlign 2 --z map
$.modifiers[#unwrap_uvw].unwrap5.mappingAlignToView()
$.modifiers[#unwrap_uvw].unwrap5.mappingMode 0
macros.run "Modifier Stack" "Convert_to_Poly"
subobjectLevel = 4
$.EditablePoly.SetSelection #Face mySelection --select original selection
)
4. Is there a way to when selecting 2 faces find which face is selected first, then find the shared edge in the uv dialog?
Thanks again guys :) im getting there... slowly :D
