ScriptSpot

Forum topic · General Scripting

Path Script Problem

By Mrjacks2o · 2011-12-07

Description

having problems with this script
I want cPath to = the selected shape that pickbutton gets the name of

------------------------------------
macroScript JM2010TL tooltip:"JM2010TL" Category:"Scripts" Icon:#("JM2010TL",1)
(
JM2010TL_float = NewRolloutFloater "3D Rail Max" 230 247
(
(
)

fn fn_bs_img str1 = (#(getdir #scripts+"\3DRM\\"+str1 , undefined, 1, 1, 1, 1, 1))

rollout MicroPave_roll "Ring Size"
(
pickbutton pck_test ">>Pick An Object" tooltip:"Pick A Scene Object..."
button OP2 "Insert" pos: [10,10] width:50 height:21

on pck_test picked obj do
(
pck_test.text = obj.name
)
On OP2 pressed do
(
cPath = $Circle001
cpath.rotation = quat 0 0 -0.707107 0.707107
cDum = $Group001
cCon = Path_Constraint follow:true bank:true
cDum.pos.controller = cCon
cDum.pos.controller.path = cPath
)

)
addRollout MicroPave_roll JM2010TL_float rolledUp:false

)
)

Comments (4)

so you should use cPath =

mjbg · 2011-12-08

so you should use


cPath = pck_test.object

It Worked!!!

Mrjacks2o · 2011-12-08

Thanks allot it Worked!!!!
Now is there a way to add to this script instead of CDum=$Group001 i want it to = a selected object or selected group is it possible to do this? thanks in advance :)

CDum = $   or   CDum =

mjbg · 2011-12-08


CDum = $

or

CDum = selection

not sure if its this is what you asked

Thanks

Mrjacks2o · 2011-12-12

Nice!! thanks your a big help bro!!!