Changeset View
Changeset View
Standalone View
Standalone View
source/blender/collada/collada.cpp
| Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | int collada_import(bContext *C, | ||||
| DocumentImporter imp(C, &import_settings); | DocumentImporter imp(C, &import_settings); | ||||
| if (imp.import()) return 1; | if (imp.import()) return 1; | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| int collada_export(const EvaluationContext *eval_ctx, | int collada_export(const EvaluationContext *eval_ctx, | ||||
| Scene *sce, | Scene *sce, | ||||
| SceneLayer *scene_layer, | ViewLayer *view_layer, | ||||
| 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, | ||||
| int selected, | int selected, | ||||
| int include_children, | int include_children, | ||||
| int include_armatures, | int include_armatures, | ||||
| Show All 38 Lines | int collada_export(const EvaluationContext *eval_ctx, | ||||
| export_settings.limit_precision = limit_precision != 0; | export_settings.limit_precision = limit_precision != 0; | ||||
| export_settings.keep_bind_info = keep_bind_info !=0; | export_settings.keep_bind_info = keep_bind_info !=0; | ||||
| int includeFilter = OB_REL_NONE; | int includeFilter = OB_REL_NONE; | ||||
| if (export_settings.include_armatures) includeFilter |= OB_REL_MOD_ARMATURE; | if (export_settings.include_armatures) includeFilter |= OB_REL_MOD_ARMATURE; | ||||
| 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; | ||||
| export_settings.export_set = BKE_object_relational_superset(scene_layer, objectSet, (eObRelationTypes)includeFilter); | export_settings.export_set = BKE_object_relational_superset(view_layer, objectSet, (eObRelationTypes)includeFilter); | ||||
| int export_count = BLI_linklist_count(export_settings.export_set); | int export_count = BLI_linklist_count(export_settings.export_set); | ||||
| if (export_count == 0) { | if (export_count == 0) { | ||||
| if (export_settings.selected) { | if (export_settings.selected) { | ||||
| fprintf(stderr, "Collada: Found no objects to export.\nPlease ensure that all objects which shall be exported are also visible in the 3D Viewport.\n"); | fprintf(stderr, "Collada: Found no objects to export.\nPlease ensure that all objects which shall be exported are also visible in the 3D Viewport.\n"); | ||||
| } | } | ||||
| else { | else { | ||||
| fprintf(stderr, "Collada: Your scene seems to be empty. No Objects will be exported.\n"); | fprintf(stderr, "Collada: Your scene seems to be empty. No Objects will be exported.\n"); | ||||
| Show All 17 Lines | |||||