Group Attaching
Tell me please, I just want to make the same operation like simple attach group tool! I need to use this:
attachNodesToGroup
I know that I can use
on atachbtn click do ( attachNodesToGroup selection <targetNode> )
but how to define targetnode that will be a group? It means that selection should be attached to the picked group=>finally it will be a group as well! How to pick a group by script? Thx in advance!
on atachbtn picked obj do ( if isValidNode obj AND isGroupHead obj do print obj.name )
doesn't work for me
Comments
Barigazy, thanks!
I have sent you an email! Read when you can please!
oh, finally, Barigazy!
You did a brilliant work! Thank you so much - even with visual line :)
HUUUGS!
:)
You mean "rubber Band" ;) My pleasure
bga
To prevent flickering use
To prevent flickering use this way
bga
thx Miauu
the problem is that first we have selection (it can be an object, group or even more then 1 object selected - t.e. torus001 from the picture of barigazy)! With this you pick the group(group001 from pic) that will attach your previous selection(torus001)!
my difficulty is to get the selection after you pressed on atachbtn and immediately to be able to pick the group that will take this selection inside!
Thank you again for your patience and for the wish to help!!!
I hope that this will help you.
This function will return the top most group head(work with hested groups also).
Using the atachbtn you can pick an object that is a part of a group, then the fn above will return the group head and you can attach the object that you want(is selected or stored in array) to the group head.
Tools and Scripts for Autodesk 3dsMax
:)
Hey Kostadin
you are fester then me.
@artrender
See this image

You have Torus and one group which contains box sphere and teapot.
Schematic view shows you everithing that you need to know.
Group Head ei. helper is the grand parent of theses tree nodes.
bga
...
Previous image code
Select Torus and then Group and try next line
bga
the idea is good
but default attach tool doesn't work like it! It works when the object is selected and then when pressed on attachbtn you can pick the group that will attach the object
what if you have 2 toruses to attach at once? or even more?
Then select first theses two
Then select first theses two toruses first then group and start for loop from number 3
for i = 3 to ...
Are you want pickObject method maybe (select objects that you need to attach and activae picking)?
bga