how to make array and select this after cloning
hi, can anyone help me with this, its very simple, i simply want to select the clones after script has run,
select mycyl does not work, and i have tried others stuff as well (also reading anubis array tutorial), i still cant get it, and cannot find help in maxscript documentation
isnt mycyl already an array, or if not, how do i make this one, and then how do i select this array?
thanks for your help!
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
)
)
Comments
its beautiful anubis you did
its beautiful anubis
you did a great job!!!!!!!!!!!!!!!!!!!
and soon ill show u why i needed this so badly :)
// www.v-motion.co //
i realy need to go
i realy need to go :) but will reply on this.
1st - if you wish to end with 50 objects then insted to use insert + loop to num-1, you can just rid of your original/source objects after cloning by deleting them.
2nd - to access this var - cloneCollection after reopening the dialog it should be global variable.
ok, here is my last assistance on this script ;-)
changes in v.1.1:
my recent MAXScripts RSS (archive here)
hehe ok :) for c = 1 to
hehe
ok :)
for c = 1 to (num-1) do (
ok that was the line i also needed to change, so i press 50 clones now
and i have 50 objects selected
for the user, simple and straightforward
for the code- headache! :D
-------------------------
i try to make a button to select this array, so when i deselect it later i can still get back to it
similar to SFlowCollection,
------------------------------
for c = 1 to (num-1) do (
CloneAndSelect objs type
join objArray (getCurrentSelection())
)
--insertItem objs objArray 1
select objArray
sel = objArray
cloneCollection = sel
)
)
on btnCselect pressed Do
(
if cloneCollection != undefined do
--select (for i in cloneCollection where isValidObj i collect i)
)
// www.v-motion.co //
newObjs = for i =
newObjs = for i = (currObjs+0) to objects.count collect objects[i]
changed 1 to 0
got it!!!
see i have no idea what i do there :)
trial and error ^_^
// www.v-motion.co //
dont worry, even some mediate
dont worry,
even some mediate scripters hit problems on such codes,
also even some advanced scripters not know/understand mapping get/set operations at all.
after a time of learning everything will become clear to you :)
now i have job to do and leave you to continue alone on this.
cheers
my recent MAXScripts RSS (archive here)
hey how come this line dont
hey
how come this line dont work anymore?
would like ALL objects to be selected :D
insertItem objs objArray 1
// www.v-motion.co //
oh, this come from previous
oh, this come from previous example where the var hold single object.
my recent MAXScripts RSS (archive here)
oh my god thank you if i
oh my god
thank you
if i could i would give you a hug now :)
what i learn from all this?
functions are great, but dont use inside button :)
case types are also great, save yourself some code
but most of all-
anubis- greatest maxscripter of all time :D
// www.v-motion.co //
haha, thanksbut what you
haha, thanks
but what you mean not use functions inside button?
you can use them anywhere in the code :)
my recent MAXScripts RSS (archive here)
see attachment
oh man :) i knew you can fight easy with this script, so i wrote it and attached.
log whats new:
- new function to clone as copy/inst/ref.
- modification of button event (using Join() function)
get attached script and enjoy
my recent MAXScripts RSS (archive here)