selecting multiple NMesh objects

hi,
Does anyone know how to select multiple NMesh objects from python script?
i know i can do this in 3d window by clicking RMB on objects while pressing ‘shift’ key but i would like to do this from python script.

Thanks in advance


import Blender
obj=[o for o in Blender.Object.Get() if o.getType()=='Mesh']
for o in  obj:  o.sel=1
Blender.Window.RedrawAll()

Thanks, it worked great.
But the thing is… what i really want to do is making one NMesh object from multiply selected objects. i guess i was not clear about that.
To make one single object from several objects, do i have to do ‘exporting and importing’? or is there any easy way?

Thanks again

You have just to push : ctrl-j

i figured out ‘ctrl+j’ joins selected objects into a single object in 3d window.
But is there any way i can do that using python script?
Now i know how to select multiple objects but have no idea how to make it into a simgle object.
i tried to figure it out by myself but not easy.
please help.

Thanks again.

The python’s way is really longer and more complex.

One of my personal goals is to make macro calls to functions like
Join, Convert, Centre-Cursor, ApplySizeRot, Duplicate, Delete-
I hope it will be in for 2.36

you can do it with current python,

have a look at the Window module for the event handling stuff, and the Draw module for key names.

LetterRip

hi,
i solved the problem by selecting multiple objects by the following script code and doing ‘export and import object file’ process.

obj=[o for o in Blender.Object.Get() if o.getType()==‘Mesh’]
for o in obj: o.sel=1