Hello everyone, I would like to develop an tool, which will place car wheels from middle of the scene to correct positions.
There is an example, what I want to do:
http://i.imgur.com/m9SXXZr.png
I want the script to place wheels on the correct location (yellow dots) with one click after the values to the spinner are inserted.
This is the rollout I have:
rollout WheelPlacerTool "WheelPlacer" width:878 height:247
(
--- Rollout Style ---
GroupBox WheelParametersGroup "Wheel Parameters" pos:[11,5] width:843 height:138
spinner WheelDistance "" pos:[20,96] width:125 height:16 range:[0,4,0] type:#worldunits scale:0.001
spinner FrontValue "" pos:[160,96] width:125 height:16 range:[0,3,0] type:#worldunits scale:0.001
spinner RearValue "" pos:[300,96] width:125 height:16 range:[0,3,0] type:#worldunits scale:0.001
spinner FrontSupressionLimit "" pos:[440,96] width:125 height:16 range:[0,1,0] type:#worldunits scale:0.001
spinner RearSupressionLimit "" pos:[580,96] width:125 height:16 range:[0,1,0] type:#worldunits scale:0.001
spinner WheelDepth "" pos:[720,96] width:125 height:16 range:[0,0.5,0] type:#worldunits scale:0.001
)
createdialog WheelPlacerTool
WheelDistance - distance between center of front and rear wheel axis.
FrontValue - distance between front wheels
RearValue - distance between rear wheels
FrontSupressionLimit - center of front wheel in Z-axis.
RearSupressionLimit - center of rear wheel in Z-axis.
WheelDepth - correction for wheel pivot (0,000) will mean center.
The main question is how do I get current value from spinner and use it as :
$myObject.pos = [ ValuefromSpinner1, ValuefromSpinner2, ValuefromSpinner3]Thanks for any help with my project :)
miauu · 2015-08-01