From eb28a66f6f8d3872559eb85100ad0ce04e2123b2 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Wed, 6 Feb 2013 23:00:32 +0000 Subject: [PATCH] - possible fix for corrupted DAE imports, thanks to @jagwire git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10356 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/com/jme3/gde/blender/scripts/import_dae.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/jme3-blender/src/com/jme3/gde/blender/scripts/import_dae.py b/sdk/jme3-blender/src/com/jme3/gde/blender/scripts/import_dae.py index 7b9df2297..2d545a924 100644 --- a/sdk/jme3-blender/src/com/jme3/gde/blender/scripts/import_dae.py +++ b/sdk/jme3-blender/src/com/jme3/gde/blender/scripts/import_dae.py @@ -39,6 +39,11 @@ def save_file(save_path): if ok: bpy.ops.wm.save_as_mainfile(filepath=save_path) +# Due to an issue in the DAE importer, the file has to be resaved after an import +def open_save_file(open_path): + bpy.ops.wm.open_mainfile(filepath=save_path) + bpy.ops.wm.save_as_mainfile(filepath=save_path) + def main(): import sys # to get command line args import argparse # to parse options for us and print a nice help message @@ -75,6 +80,7 @@ def main(): clear_scene() import_file(args.file_path) save_file(args.save_path) + open_save_file(args.save_path) print("batch job finished, exiting")