Simple Clone Script
Hi, can anyone help me with a code to create clones?
It just needs one button ,one spinner,and radiobutton with option of copy or instance
spinner= object count
button=create clones
so when one object is selected, spinner is at 100, it creates 100 duplicates at same position
can anyone help create this simple script?
Comments
thanks ill try that!
thanks ill try that!
// www.v-motion.co //
also, can someone tell me how
also,
can someone tell me how i keep this selection after clones have been made?
// www.v-motion.co //
rollout roClone
rollout roClone "clone"
(
spinner objCount "#:" range:[1,100,50] type:#integer across:2 align:#left width:60
button btndo
radiobuttons clone labels:#("Copy", "Instance","Reference") across:2
on btndo pressed Do (sel = getCurrentSelection()
sf = sel
if (Clone.state == 1) then(
c=objCount.value
for i=1 to c do (
mycyl = copy sf
)
)
if (Clone.state == 2) then(
c=objCount.value
for i=1 to c do (
mycyl = instance sf
)
)
if (Clone.state == 3) then(
c=objCount.value
for i=1 to c do (
mycyl = reference sf
)
)
)
)createDialog roClone 120 100
ok i think i just made my first script!
now another question...
how could i add a function which adds translation to each copy?
so when i have a 2nd spinner, with a value of 1, that each object is translated 1 on x axis
// www.v-motion.co //
hi V ... put offset position
hi V ...
put offset position in looping commands
about 'spinner_offset.value' is your new spinner
sel =
sel = getCurrentSelection()
sf = sel
if 1==1 then(
for i=1 to 10 do (
mycyl = copy sf
)
)
ok this works, now i just add the button
// www.v-motion.co //
spinner objCount "#:"
spinner objCount "#:" range:[1,100,50] type:#integer across:3 align:#left width:60
radiobuttons clone labels:#("Copy", "Instance","Reference") across:2
for i=1 to c do
(
mycyl = copy a
)
something like that?
// www.v-motion.co //