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:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-02-09 20:19:30 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-02-09 20:19:30 +0400
commitf34d1d55850cd82fbae843ffafa7115dab0e0eeb (patch)
treef01c7b58dc5a66639d4e554ba206e1752d4fada8 /source/blender/collada/collada.cpp
parent555bcc3298a564cb678c9f31ba6bded86d58bab6 (diff)
[#33437](partial fix) Collada: importing a scene changes units. Added an option to disable unit settings during import.
Diffstat (limited to 'source/blender/collada/collada.cpp')
-rw-r--r--source/blender/collada/collada.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
index ef34c55bbe6..1aff0f166ba 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -31,6 +31,7 @@
#include "DocumentExporter.h"
#include "DocumentImporter.h"
#include "ExportSettings.h"
+#include "ImportSettings.h"
extern "C"
{
@@ -42,9 +43,17 @@ extern "C"
#include "BLI_path_util.h"
#include "BLI_linklist.h"
-int collada_import(bContext *C, const char *filepath)
+int collada_import(bContext *C,
+ const char *filepath,
+ int import_units)
{
- DocumentImporter imp(C, filepath);
+
+ ImportSettings import_settings;
+ import_settings.filepath = (char *)filepath;
+
+ import_settings.import_units = import_units != 0;
+
+ DocumentImporter imp(C, &import_settings);
if (imp.import()) return 1;
return 0;