Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '-----------------------------------------------------------------------------------------------------------------'
- 'Scales the selected components to 0 on the object's x axis.... thats all :)
- '-----------------------------------------------------------------------------------------------------------------'
- dim oSel, ScriptCancel, pref
- set oSel = application.selection(0)
- 'Make sure the selection is a SubComponent
- if oSel.Type = "edgeSubComponent" _
- or oSel.Type = "pntSubComponent" _
- or oSel.Type = "polySubComponent" then
- LogMessage oSel.Type & " detected"
- ScriptCancel = "no"
- else
- LogMessage "No Components Selected - Script Cancelled"
- XSIUIToolkit.Msgbox "You need to select the components you want scaled to 0 on the object's x axis", 1, "No Components Detected"
- ScriptCancel = "yes"
- end if
- if ScriptCancel = "no" then
- 'Get the status of proportional modelling setting
- pref = GetUserPref ("3D_TRANSFO_PROPORTIONAL_CHANGED")
- 'If proportional modelling was enabled, turn it off
- if pref = 1 then
- SetUserPref "3D_TRANSFO_PROPORTIONAL_CHANGED", 0
- end if
- Scale , 0, 1, 1, siRelative, siParent, siObj, siX, , , , , , , , 0
- 'If proportional modelling was previously enabled, turn it back on
- if pref = 1 then
- SetUserPref "3D_TRANSFO_PROPORTIONAL_CHANGED", 1
- end if
- LogMessage "Selection was scaled to 0 on the x axis"
- end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement