Open With Python?

I’ve used blender for about a little over a year now and have to say I choose it over Maya for anything but NURBS and Subdivision Modeling. (But thats only because its so easy in Maya I never bothered to learn). My major annoyance is that I can have a 3ds or other model file in a folder and I can’t open it directly with blender.:confused:

Python seems to be able to do anything in blender and with Python installed you should be able to execute python scripts ouside of blender. This would seem
to allow one to write a .exe with a script in it to open blender and then execute the proper import script for the file extension. If any knows how to do this or knows of another way help would be much appreciated.

I’m pretty sure you can export it to .obj or use one of the python import scripts blender comes with. Just go: file ->import… and pick whatever format your source is in.

Have you tried the Import option from the File menu? I’ve heard of bugs in the import scripts, but there is a .3ds importer.

Edit: Ngons might cause some problems on imported models, but you could always donate to speed up development of Bmesh.

Yes I CAN import but the thing is you have to open up blender first. What I was thinking of was a default program for .obj, etc. that usually convenient option that blender doesn’t support. I know its possible and I could give you psuedocode for it but I don’t know all the specifics.

edit: figured I might as well add (crappy) psuedo code in case anyone ever wants to do this… since I’m going to give up the idea soon…also it shows where I’m coming up short

BlenderDefaultProgram.exe //this is a python script packed in an executable

initialize python 2.5.2;
save file_name of opened file in a string; //via a windows function? (need full path in name as well)
take extension off file_name // aka string
if(string = .3ds)
else if(string = .obj )

edit: and if anyone is wondering why its packed in an exe it’s because you can only set exe as default programs in windows and not py