Notifications
Clear all

[Closed] Max Selection – Query

Thats Awesome…
Not limited t Maxscript???

So what Else?? SDK??

Can you help me as I am into MaxScript very keen on learning SDK…

Thank You

there is some exotics:


 fn ArrangeObjects4 = 
 (
 	posxs = #()
 	nodes = for node in objects as array collect 
 	(
 		append posxs node.pos.x
 		getHandleByAnim node
 	)
 	posxs = dotnet.ValueToDotNetObject posxs (dotnetclass "System.Single[]")
 	nodes = dotnet.ValueToDotNetObject nodes (dotnetclass "System.Int32[]")
 	posxs.Sort posxs nodes
 	nodes = nodes.clone()
 	for node in nodes collect (getAnimByHandle node)
 )
    
 st = timestamp()	
 ArrangeObjects4()
 format "% ms
"	(timestamp()-st)
 

… but < 200 ms on my machine…

1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

150 ms here.
You are the Speed King!


 fn ArrangeObjects6 =
 (
 	nodes = objects as array
 	posxs = for n in nodes collect n.pos.x
 
 	posxs = dotnet.ValueToDotNetObject posxs (dotnetclass "System.Single[]")
 	index = dotnet.ValueToDotNetObject (#{1..nodes.count} as array) (dotnetclass "System.Int32[]")
 	posxs.Sort posxs index
 	index = index.clone()
 	for i in index collect nodes[i]
 )
 
 st = timestamp()	
 ArrangeObjects6()
 format "% ms
"	(timestamp()-st)
 

is it ~100ms now?

Thats great man… 375ms on my pc though… but m HAPPY!!!

:applause:

And 157 here…

Page 2 / 2