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>2018-02-27 00:49:30 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2018-02-27 00:49:30 +0300
commitf228a08d027ef700344d35f1ba958249afa93222 (patch)
treefc6c60d89f911bcb0c5019e2e6e4243e49cba9af /source/blender/collada/collada.cpp
parente94276d4033c72000942a49100e552e800d09e58 (diff)
parent7dd0e36dc4582e57a3f5235f384b5207882c923e (diff)
merge from master
Diffstat (limited to 'source/blender/collada/collada.cpp')
-rw-r--r--source/blender/collada/collada.cpp65
1 files changed, 33 insertions, 32 deletions
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
index 286444882e4..04b828d35f9 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -32,6 +32,7 @@
#include "DocumentImporter.h"
#include "ExportSettings.h"
#include "ImportSettings.h"
+#include "collada.h"
extern "C"
{
@@ -68,38 +69,38 @@ int collada_import(bContext *C,
return 0;
}
-int collada_export(bContext *C,
- const char *filepath,
-
- int apply_modifiers,
- BC_export_mesh_type export_mesh_type,
-
- int selected,
- int include_children,
- int include_armatures,
- int include_shapekeys,
- int deform_bones_only,
- int sampling_rate,
-
- int active_uv_only,
- int include_material_textures,
- int use_texture_copies,
-
- int triangulate,
- int use_object_instantiation,
- int use_blender_profile,
- int sort_by_name,
- BC_export_transformation_type export_transformation_type,
- int open_sim,
- int limit_precision,
- int keep_bind_info)
+int collada_export(
+ EvaluationContext *eval_ctx,
+ Scene *sce,
+ const char *filepath,
+
+ int apply_modifiers,
+ BC_export_mesh_type export_mesh_type,
+
+ int selected,
+ int include_children,
+ int include_armatures,
+ int include_shapekeys,
+ int deform_bones_only,
+ int include_animations,
+ int sampling_rate,
+
+ int active_uv_only,
+ int include_material_textures,
+ int use_texture_copies,
+
+ int triangulate,
+ int use_object_instantiation,
+ int use_blender_profile,
+ int sort_by_name,
+ BC_export_transformation_type export_transformation_type,
+ int open_sim,
+ int limit_precision,
+ int keep_bind_info)
{
ExportSettings export_settings;
- EvaluationContext eval_ctx;
- CTX_data_eval_ctx(C, &eval_ctx);
- Scene *sce = CTX_data_scene(C);
- ViewLayer *view_layer = CTX_data_view_layer(C);
+ ViewLayer *view_layer = eval_ctx->view_layer;
export_settings.filepath = (char *)filepath;
@@ -110,7 +111,8 @@ int collada_export(bContext *C,
export_settings.include_armatures = include_armatures != 0;
export_settings.include_shapekeys = include_shapekeys != 0;
export_settings.deform_bones_only = deform_bones_only != 0;
- export_settings.sampling_rate = sampling_rate;
+ export_settings.include_animations = include_animations;
+ export_settings.sampling_rate = sampling_rate;
export_settings.active_uv_only = active_uv_only != 0;
export_settings.include_material_textures= include_material_textures != 0;
@@ -130,7 +132,6 @@ int collada_export(bContext *C,
if (export_settings.include_children) includeFilter |= OB_REL_CHILDREN_RECURSIVE;
eObjectSet objectSet = (export_settings.selected) ? OB_SET_SELECTED : OB_SET_ALL;
-
export_settings.export_set = BKE_object_relational_superset(view_layer, objectSet, (eObRelationTypes)includeFilter);
int export_count = BLI_linklist_count(export_settings.export_set);
@@ -149,7 +150,7 @@ int collada_export(bContext *C,
}
DocumentExporter exporter(&export_settings);
- int status = exporter.exportCurrentScene(&eval_ctx, sce);
+ int status = exporter.exportCurrentScene(eval_ctx, sce);
BLI_linklist_free(export_settings.export_set, NULL);