Pass command line arguments to application?
Salut!
I cannot figure out how to pass command line arguments to Blender.exe
Is it possible?
Finally, I've figured out how to open FBX* file in Blender*
(Blender is 3d graphics editor. FBX is non-native format, that must be imported, instead of opening).
The command line is:
blender.exe -P im_fbx.py -- MyModel.fbx
(while im_fbx.py reads:
import sys
import bpy
argv = sys.argv
argv = argv[argv.index("--") + 1:] # get all args after "--"
bpy.ops.import_scene.fbx(filepath=argv[0])
)
- Read more about Pass command line arguments to application?
- 3 comments
- Log in or register to post comments