Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-01 15:47:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-01 15:47:50 +0300
commit0d3cf5c8a68b97dc248b1758e2f5a36d6433c3c1 (patch)
tree568f26ada61a582cbc182c2b22b82a8a459808a8 /source/blender/windowmanager
parentffe7bde02c5725993e9c1986bbc8a83174adbbb8 (diff)
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 :)
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 1b602b167c7..43c4551d0dc 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -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");