Notifications
Clear all
[Closed] Max Selection – Query
Page 2 / 2
Prev
Sep 01, 2011 3:43 pm
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
Sep 01, 2011 3:43 pm
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
Sep 01, 2011 3:43 pm
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?
Page 2 / 2
Prev