changing collada parameters
Differential Revision: https://developer.blender.org/D3080
This commit is contained in:
		| @@ -67,7 +67,7 @@ int collada_import(bContext *C, | |||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| int collada_export(Scene *sce, | int collada_export(bContext *C, | ||||||
|                    const char *filepath, |                    const char *filepath, | ||||||
|  |  | ||||||
|                    int apply_modifiers, |                    int apply_modifiers, | ||||||
| @@ -124,6 +124,7 @@ int collada_export(Scene *sce, | |||||||
| 	if (export_settings.include_children) includeFilter |= OB_REL_CHILDREN_RECURSIVE; | 	if (export_settings.include_children) includeFilter |= OB_REL_CHILDREN_RECURSIVE; | ||||||
|  |  | ||||||
| 	eObjectSet objectSet = (export_settings.selected) ? OB_SET_SELECTED : OB_SET_ALL; | 	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); | 	export_settings.export_set = BKE_object_relational_superset(sce, objectSet, (eObRelationTypes)includeFilter); | ||||||
| 	int export_count = BLI_linklist_count(export_settings.export_set); | 	int export_count = BLI_linklist_count(export_settings.export_set); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -67,7 +67,7 @@ int collada_import(struct bContext *C, | |||||||
|  |  | ||||||
| 				   int keep_bind_info); | 				   int keep_bind_info); | ||||||
|  |  | ||||||
| int collada_export(struct Scene *sce, | int collada_export(struct bContext *C, | ||||||
|                    const char *filepath, |                    const char *filepath, | ||||||
|                    int apply_modifiers, |                    int apply_modifiers, | ||||||
|                    BC_export_mesh_type export_mesh_type, |                    BC_export_mesh_type export_mesh_type, | ||||||
|   | |||||||
| @@ -158,7 +158,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) | |||||||
| 	ED_object_editmode_load(CTX_data_edit_object(C)); | 	ED_object_editmode_load(CTX_data_edit_object(C)); | ||||||
|  |  | ||||||
|  |  | ||||||
| 	export_count = collada_export(CTX_data_scene(C), | 	export_count = collada_export(C, | ||||||
| 		filepath, | 		filepath, | ||||||
| 		apply_modifiers, | 		apply_modifiers, | ||||||
| 		export_mesh_type, | 		export_mesh_type, | ||||||
|   | |||||||
| @@ -268,7 +268,7 @@ static void rna_Scene_alembic_export( | |||||||
|  |  | ||||||
| /* Note: This definition must match to the generated function call */ | /* Note: This definition must match to the generated function call */ | ||||||
| static void rna_Scene_collada_export( | static void rna_Scene_collada_export( | ||||||
|         Scene *scene, |         bContext *C, | ||||||
|         const char *filepath,  |         const char *filepath,  | ||||||
|         int apply_modifiers, |         int apply_modifiers, | ||||||
|  |  | ||||||
| @@ -291,7 +291,7 @@ static void rna_Scene_collada_export( | |||||||
|         int limit_precision, |         int limit_precision, | ||||||
|         int keep_bind_info) |         int keep_bind_info) | ||||||
| { | { | ||||||
| 	collada_export(scene, | 	collada_export(C, | ||||||
| 		filepath, | 		filepath, | ||||||
|  |  | ||||||
| 		apply_modifiers, | 		apply_modifiers, | ||||||
| @@ -379,6 +379,7 @@ void RNA_api_scene(StructRNA *srna) | |||||||
| #ifdef WITH_COLLADA | #ifdef WITH_COLLADA | ||||||
| 	/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */ | 	/* 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"); | 	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"); | 	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_parameter_flags(parm, 0, PARM_REQUIRED); | ||||||
| 	RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */ | 	RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user