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])
)
So, my question is:
How can I pass all these parameters to BlenderPortable.exe?
BlenderPortable.exe -P im_fbx.py -- MyModel.fbx
just does not work. Blenders starts shiny empty scene.
Thank you!
P.S. Yes, I have read https://portableapps.com/node/19115
The command line is passed in unaltered on our end directly to blender.exe. Blender Portable doesn't add additional command line parameters itself to portablize as its handled with environment variables. It's possible that the path to your .py file isn't being found due to the additional directories and working directory settings. It may work if you use a full path.
Sometimes, the impossible can become possible, if you're awesome!
Copy the BlenderPortable.ini from Other\Source next to the BlenderPortable.exe and write your parameters into the "AdditionalParameters=" entry.
1) John T. Haller. For some reason it worked now. Probably previous trials has paths specified not too accurately. Thank you!
2) mwayne. How this method supposes me to associate .fbx-files with BlenderPortable?