Select object then do something one by one batch process


#1

Hi, I have several objects in my scene and I want to select one by one and run an external application. I have already a script function to run this application, because I have got it at the installation of this application. It is a simple script function. But I can not achive that the objects will be selected one by one. What I want to do is something like that: select an object then run the application with the selected object. Thereafter select another object then run the application again with the other object. Not select all objects by once then run the application. It have to be done seperatly. An object have to be selected first then run the utility (the app), like an batch process. But I dont know how to do a simple script for that.

The application is Simplygon. The script to start that app is: sgsdk_ProcessSelectedGeometries();

My attemp to try to whrite a script by myself was like that:

for obj in $* do sgsdk_ProcessSelectedGeometries();

But it does not select the objects and I am a beginner at max script.

I appreciate any help.


#2

I have the solution now. Someone did helped me:

sel = getCurrentSelection()
for obj in sel do
(
select obj
sgsdk_ProcessSelectedGeometries()
)