Advertisement
spookymunky

SymmThings 2.0 - Zero X (VBS)

Mar 25th, 2013
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. '-----------------------------------------------------------------------------------------------------------------'
  2. 'Scales the selected components to 0 on the object's x axis.... thats all :)
  3. '-----------------------------------------------------------------------------------------------------------------'
  4.  
  5. dim oSel, ScriptCancel, pref
  6.  
  7. set oSel = application.selection(0)
  8.  
  9. 'Make sure the selection is a SubComponent
  10. if oSel.Type = "edgeSubComponent" _
  11.     or oSel.Type = "pntSubComponent" _
  12.     or oSel.Type = "polySubComponent" then
  13.    
  14.     LogMessage oSel.Type & " detected"
  15.     ScriptCancel = "no"
  16.    
  17. else
  18.  
  19.     LogMessage "No Components Selected - Script Cancelled"
  20.     XSIUIToolkit.Msgbox "You need to select the components you want scaled to 0 on the object's x axis", 1, "No Components Detected"
  21.     ScriptCancel = "yes"
  22.    
  23. end if
  24.  
  25. if ScriptCancel = "no" then
  26.  
  27.     'Get the status of proportional modelling setting
  28.     pref = GetUserPref ("3D_TRANSFO_PROPORTIONAL_CHANGED")
  29.  
  30.     'If proportional modelling was enabled, turn it off
  31.     if pref = 1 then
  32.         SetUserPref "3D_TRANSFO_PROPORTIONAL_CHANGED", 0
  33.     end if
  34.  
  35.     Scale , 0, 1, 1, siRelative, siParent, siObj, siX, , , , , , , , 0
  36.  
  37.     'If proportional modelling was previously enabled, turn it back on
  38.     if pref = 1 then
  39.         SetUserPref "3D_TRANSFO_PROPORTIONAL_CHANGED", 1
  40.     end if
  41.  
  42.     LogMessage "Selection was scaled to 0 on the x axis"
  43.    
  44. end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement