I’ve decided to create another Thread instead of this
[http://forums.cgsociety.org/showthread.php?f=98&t=1110150](http://forums.cgsociety.org/showthread.php?f=98&t=1110150)
because now, after investigating, and trying to script I understood what I want! It is Multiple Copy! Here is a small video that displays how is it in Revit (for those that didn't use it yet) and what I've achieved through script!
[VIDEO](http://artrender.info/tmpmike/Untitled/index.html)
1: I love in revit the box around the object when copying and the line with distance, also the possibility to make multiple copies! This line may be the line when we copy in max with snap switched on! It would be great to make such a tool like dimension (distance)!
2: Max screen
2.a common copying principle with "Clone Options" dialog!
2.b here I use a script with "h" hotkey:
(
fn CopyClick =
try
(
maxOps.cloneNodes $ cloneType:#instance newNodes:&nnl
select nnl
print "Copied, now Move!!!"
)
catch
(
delete $
)--End Function
CopyClick()
)--End Script
It makes a clone copy in place (thx to Swordsplayer for the idea), but it has a minus - if you press on hot key (h) a little longer, then you can get a lot of objects in place and if your objects are heavy - it means your scene will slow down and ....
Another minus of it is that you have to press on h each time to copy!
2.c there is a good [script by agg3d at scriptspot](http://www.scriptspot.com/3ds-max/scripts/copyclick)
(
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
But it works only once, after this it stops and you have restart max in order to have it working!
I have tried to close the window "Clone Options" with a timer
global theTimer
fn onTick =
(
try(
local RollOutHandle = (windows.getChildHWND 0 "Clone Options" )[1]
UIAccessor.PressButtonByName RollOutHandle "OK"
)
catch()
)
theTimer = dotNetObject "System.Windows.Forms.Timer";
theTimer.interval = 1; --ms
dotnet.addEventHandler theTimer "tick" onTick
theTimer.start()
--theTimer.Stop()
the window is flickering - appears and quickly dissapears, which is not good! Except this, you have to copy again, using hot key at every copy!
So, 2.c is better, but it has to be improved! Please, if you find it interesting and useful the write down some ideas!
If you watch the VIDEO from above you will understand what is 1, 2 (a-c)