Script to test import operators, so a single command can execute an operator on all files in a directory and optionally save out blend files for inspection.
This comes in handy for testing importers against 100's of files, quickly showing breakages and easier to setup then unit tests.
Example usage:
blender.bin --background --python source/tests/batch_import.py -- \
--operator="bpy.ops.import_scene.obj" \
--path="/data/testfiles/obj" \
--match="*.obj" \
--start=0 --end=50 \
--save_path="/tmp/test"
Also found my name was spelt wrong in some places :)
This commit is contained in:
@@ -1786,8 +1786,8 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot)
|
||||
ot->invoke= wm_save_as_mainfile_invoke;
|
||||
ot->exec= wm_save_as_mainfile_exec;
|
||||
ot->check= blend_save_check;
|
||||
ot->poll= WM_operator_winactive;
|
||||
|
||||
/* ommit window poll so this can work in background mode */
|
||||
|
||||
WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH);
|
||||
RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file");
|
||||
RNA_def_boolean(ot->srna, "relative_remap", 1, "Remap Relative", "Remap relative paths when saving in a different directory");
|
||||
|
||||
Reference in New Issue
Block a user