CopyClick
-- Copy by Click
-- V1.0
-- How it works?
-- 1. Select objects
-- 2. Execute CopybyClick
-- 3. Click to make a instance of selection
-- 4. ESC or rightclick to cancel
------------------------ THE CODE ------------------------
macroScript CopybyClick
category:"AGGTools"
buttonText:"CopybyClick"
tooltip:"Copy by Click"
(
fn CopyClick =
try
(
maxOps.cloneNodes $ cloneType:#instance newNodes:&nnl
select nnl
Sel=selection
p = point pos:Sel.center
p.pos.z = 0
ClickPos = pickPoint snap:#2D ()
ArrayFiltroGroupHead = #()
for obj in Sel do
(
result = isGroupHead obj
result1 = isGroupMember obj
if result == true and result1 == false then
(
append ArrayFiltroGroupHead obj
obj.parent = p
)
if result1 == false then
(
obj.parent = p
)
)-- Fim Loop
p.pos = ClickPos
delete p
CopyClick()
)
catch
(
delete p
delete $
)--End Function
CopyClick()
)--End Script
-- Alvaro Gonçalves Guimarães
-- Made in Brazil
------------------------------------------------------------
This is a old script but never works with groups inside groups. And i make some changes in the code and now it works. Tested in 3dsMax 2009.