[Bf-blender-cvs] [d91f2ac37aa] master: changing collada parameters
Gaia Clary
noreply at git.blender.org
Sat Feb 24 22:51:09 CET 2018
Commit: d91f2ac37aa02d96a00d116fa55cdc9f55afd32c
Author: Gaia Clary
Date: Sat Feb 24 22:15:52 2018 +0100
Branches: master
https://developer.blender.org/rBd91f2ac37aa02d96a00d116fa55cdc9f55afd32c
changing collada parameters
Differential Revision: https://developer.blender.org/D3080
===================================================================
M source/blender/collada/collada.cpp
M source/blender/collada/collada.h
M source/blender/editors/io/io_collada.c
M source/blender/makesrna/intern/rna_scene_api.c
===================================================================
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
index 79f50888150..718ae1d876b 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -67,7 +67,7 @@ int collada_import(bContext *C,
return 0;
}
-int collada_export(Scene *sce,
+int collada_export(bContext *C,
const char *filepath,
int apply_modifiers,
@@ -124,6 +124,7 @@ int collada_export(Scene *sce,
if (export_settings.include_children) includeFilter |= OB_REL_CHILDREN_RECURSIVE;
eObjectSet objectSet = (export_settings.selected) ? OB_SET_SELECTED : OB_SET_ALL;
+ Scene *sce = CTX_data_scene(C);
export_settings.export_set = BKE_object_relational_superset(sce, objectSet, (eObRelationTypes)includeFilter);
int export_count = BLI_linklist_count(export_settings.export_set);
diff --git a/source/blender/collada/collada.h b/source/blender/collada/collada.h
index a8f082f630c..e546e1f1056 100644
--- a/source/blender/collada/collada.h
+++ b/source/blender/collada/collada.h
@@ -67,7 +67,7 @@ int collada_import(struct bContext *C,
int keep_bind_info);
-int collada_export(struct Scene *sce,
+int collada_export(struct bContext *C,
const char *filepath,
int apply_modifiers,
BC_export_mesh_type export_mesh_type,
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index 3746ba3b64a..7f5442bbca4 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -158,7 +158,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
ED_object_editmode_load(CTX_data_edit_object(C));
- export_count = collada_export(CTX_data_scene(C),
+ export_count = collada_export(C,
filepath,
apply_modifiers,
export_mesh_type,
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 7d95fbf4068..d641ee12366 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -268,7 +268,7 @@ static void rna_Scene_alembic_export(
/* Note: This definition must match to the generated function call */
static void rna_Scene_collada_export(
- Scene *scene,
+ bContext *C,
const char *filepath,
int apply_modifiers,
@@ -291,7 +291,7 @@ static void rna_Scene_collada_export(
int limit_precision,
int keep_bind_info)
{
- collada_export(scene,
+ collada_export(C,
filepath,
apply_modifiers,
@@ -379,6 +379,7 @@ void RNA_api_scene(StructRNA *srna)
#ifdef WITH_COLLADA
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
func = RNA_def_function(srna, "collada_export", "rna_Scene_collada_export");
+ RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT);
parm = RNA_def_string(func, "filepath", NULL, FILE_MAX, "File Path", "File path to write Collada file");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */
More information about the Bf-blender-cvs
mailing list