beginner question

Sorry Im an absolute beginner at this but I want to create a rollout script that, at the press of a button can read the selected object/model(s) name(s) and position(s) in scene and write it to the maxscript listener

ie..
Myobject, 5.00, 5.00, 5.00

I know how to create a rollout and a button but thats all atm.
can anyone help me out please? as I trying to get my head around this but need some relevant-to-me examples to start from

thanks

Comments

Comment viewing options

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

for i in selection do format

for i in selection do format "%, %, %, %\n" i.name i.pos[1] i.pos[2] i.pos[3]

my recent MAXScripts RSS (archive here)

Graph's picture

.. on foo pressed do (

..
on foo pressed do
(
  local sel = selection as array
  local obj = sel[1]
 
  if isValidNode obj do format "Obj:% Pos:% KindOf:%\n" obj.name obj.pos (classOf obj.baseObject)
)
..

the maxScript help is quite helpful and well written, dig into it

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Comment viewing options

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