turn array to object list

a=for i in objects collect a
for i in a do print a

result is

$Box:Box01 @ [-58.061844,32.259445,0.000000]
$Box:Box02 @ [8.451210,6.026428,0.000000]
$Box:Box01 @ [-58.061844,32.259445,0.000000]
$Box:Box02 @ [8.451210,6.026428,0.000000]
OK  <--- here is wrong

the question is how to make the result not using "ok" string just object in array as list like

$Box:Box01 @ [-58.061844,32.259445,0.000000]
$Box:Box02 @ [8.451210,6.026428,0.000000]
$Box:Box01 @ [-58.061844,32.259445,0.000000]
$Box:Box02 @ [8.451210,6.026428,0.000000]

can some one help me please

thanks and best regard

fajar

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fajar's picture

yes , youre correct anubisi

yes , youre correct anubis
i use

(
select geometry <---select all geomtry 
deselect myObj <---which is my object as later used as distribute object, defined first
a=getcurrentselection()
clearselection()
global mySurface=a <---yea ...this is the surface
---still wondering why those solution can work !!!?? :confuse
)
Anubis's picture

aha, so the problem is different then :)

I'm not sure whether we can edit the name of our topic, but try anyway to change it to "passing multiple objects to mouseTrack function".

my recent MAXScripts RSS (archive here)

fajar's picture

what do you mean by that

what do you mean by that anubis , could you give me more light ?

@swordplayer :

thanks for that but im not looking for something like that.

@ all

I want to try writte script "autogrid like" but not grid-ed only in on one selected object available but all objects. I use mousetrack function, standard-ly when using mouse track its only using pick one object, or select target object as surface, but im trying to make all object available to as surface. so instead say something like global my_surface=targetedNode ---(one objects) im try fn targetedNode= objects as array ---(but didnt workd);global my_surface=targetedNode

thanks for understanding and thanks for answering my question

best regard

fajar

EDIT = Resolved

Anubis's picture

Hi Fajar

objects is a collection,
maybe you ask for this one:
a = objects as array

my recent MAXScripts RSS (archive here)

Swordslayer's picture

That's because maxscript

That's because maxscript listener receives not only the output of print and format commands but also all the return values (and maxscript, being expression-based language, always returns something, whether it's OK, undefined or some other value). If you want to get just the text, send it to some sort of stream, for example:

a = for i in objects collect i
outputText = newScript()
for i in a do print i to:outputText

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.