Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/io/io_collada.c
| Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | static int wm_collada_export_exec(bContext *C, wmOperator *op) | ||||
| char filepath[FILE_MAX]; | char filepath[FILE_MAX]; | ||||
| int apply_modifiers; | int apply_modifiers; | ||||
| int export_mesh_type; | int export_mesh_type; | ||||
| int selected; | int selected; | ||||
| int include_children; | int include_children; | ||||
| int include_armatures; | int include_armatures; | ||||
| int include_shapekeys; | int include_shapekeys; | ||||
| int deform_bones_only; | int deform_bones_only; | ||||
| int sampling_rate; | |||||
| int export_texture_type; | int export_texture_type; | ||||
| int use_texture_copies; | int use_texture_copies; | ||||
| int active_uv_only; | int active_uv_only; | ||||
| int triangulate; | int triangulate; | ||||
| int use_object_instantiation; | int use_object_instantiation; | ||||
| int use_blender_profile; | int use_blender_profile; | ||||
| Show All 34 Lines | static int wm_collada_export_exec(bContext *C, wmOperator *op) | ||||
| /* Options panel */ | /* Options panel */ | ||||
| apply_modifiers = RNA_boolean_get(op->ptr, "apply_modifiers"); | apply_modifiers = RNA_boolean_get(op->ptr, "apply_modifiers"); | ||||
| export_mesh_type = RNA_enum_get(op->ptr, "export_mesh_type_selection"); | export_mesh_type = RNA_enum_get(op->ptr, "export_mesh_type_selection"); | ||||
| selected = RNA_boolean_get(op->ptr, "selected"); | selected = RNA_boolean_get(op->ptr, "selected"); | ||||
| include_children = RNA_boolean_get(op->ptr, "include_children"); | include_children = RNA_boolean_get(op->ptr, "include_children"); | ||||
| include_armatures = RNA_boolean_get(op->ptr, "include_armatures"); | include_armatures = RNA_boolean_get(op->ptr, "include_armatures"); | ||||
| include_shapekeys = RNA_boolean_get(op->ptr, "include_shapekeys"); | include_shapekeys = RNA_boolean_get(op->ptr, "include_shapekeys"); | ||||
| sampling_rate = RNA_int_get(op->ptr, "sampling_rate"); | |||||
| deform_bones_only = RNA_boolean_get(op->ptr, "deform_bones_only"); | deform_bones_only = RNA_boolean_get(op->ptr, "deform_bones_only"); | ||||
| export_texture_type = RNA_enum_get(op->ptr, "export_texture_type_selection"); | export_texture_type = RNA_enum_get(op->ptr, "export_texture_type_selection"); | ||||
| use_texture_copies = RNA_boolean_get(op->ptr, "use_texture_copies"); | use_texture_copies = RNA_boolean_get(op->ptr, "use_texture_copies"); | ||||
| active_uv_only = RNA_boolean_get(op->ptr, "active_uv_only"); | active_uv_only = RNA_boolean_get(op->ptr, "active_uv_only"); | ||||
| triangulate = RNA_boolean_get(op->ptr, "triangulate"); | triangulate = RNA_boolean_get(op->ptr, "triangulate"); | ||||
| use_object_instantiation = RNA_boolean_get(op->ptr, "use_object_instantiation"); | use_object_instantiation = RNA_boolean_get(op->ptr, "use_object_instantiation"); | ||||
| Show All 13 Lines | export_count = collada_export(CTX_data_scene(C), | ||||
| filepath, | filepath, | ||||
| apply_modifiers, | apply_modifiers, | ||||
| export_mesh_type, | export_mesh_type, | ||||
| selected, | selected, | ||||
| include_children, | include_children, | ||||
| include_armatures, | include_armatures, | ||||
| include_shapekeys, | include_shapekeys, | ||||
| deform_bones_only, | deform_bones_only, | ||||
| sampling_rate, | |||||
| active_uv_only, | active_uv_only, | ||||
| export_texture_type, | export_texture_type, | ||||
| use_texture_copies, | use_texture_copies, | ||||
| triangulate, | triangulate, | ||||
| use_object_instantiation, | use_object_instantiation, | ||||
| use_blender_profile, | use_blender_profile, | ||||
| ▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemR(row, imfptr, "include_armatures", 0, NULL, ICON_NONE); | uiItemR(row, imfptr, "include_armatures", 0, NULL, ICON_NONE); | ||||
| uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected")); | uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected")); | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemR(row, imfptr, "include_shapekeys", 0, NULL, ICON_NONE); | uiItemR(row, imfptr, "include_shapekeys", 0, NULL, ICON_NONE); | ||||
| uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected")); | uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected")); | ||||
| row = uiLayoutRow(box, false); | |||||
| uiItemR(row, imfptr, "sampling_rate", 0, NULL, ICON_NONE); | |||||
| /* Texture options */ | /* Texture options */ | ||||
| box = uiLayoutBox(layout); | box = uiLayoutBox(layout); | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemL(row, IFACE_("Texture Options:"), ICON_TEXTURE_DATA); | uiItemL(row, IFACE_("Texture Options:"), ICON_TEXTURE_DATA); | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemR(row, imfptr, "active_uv_only", 0, NULL, ICON_NONE); | uiItemR(row, imfptr, "active_uv_only", 0, NULL, ICON_NONE); | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemR(row, imfptr, "export_texture_type_selection", 0, "", ICON_NONE); | uiItemR(row, imfptr, "export_texture_type_selection", 0, "", ICON_NONE); | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemR(row, imfptr, "use_texture_copies", 1, NULL, ICON_NONE); | uiItemR(row, imfptr, "use_texture_copies", 1, NULL, ICON_NONE); | ||||
| /* Armature options */ | /* Armature options */ | ||||
| box = uiLayoutBox(layout); | box = uiLayoutBox(layout); | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemL(row, IFACE_("Armature Options:"), ICON_ARMATURE_DATA); | uiItemL(row, IFACE_("Armature Options:"), ICON_ARMATURE_DATA); | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemR(row, imfptr, "deform_bones_only", 0, NULL, ICON_NONE); | uiItemR(row, imfptr, "deform_bones_only", 0, NULL, ICON_NONE); | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemR(row, imfptr, "open_sim", 0, NULL, ICON_NONE); | uiItemR(row, imfptr, "open_sim", 0, NULL, ICON_NONE); | ||||
| /* Collada options: */ | /* Collada options: */ | ||||
| box = uiLayoutBox(layout); | box = uiLayoutBox(layout); | ||||
| row = uiLayoutRow(box, false); | row = uiLayoutRow(box, false); | ||||
| uiItemL(row, IFACE_("Collada Options:"), ICON_MODIFIER); | uiItemL(row, IFACE_("Collada Options:"), ICON_MODIFIER); | ||||
| ▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | void WM_OT_collada_export(wmOperatorType *ot) | ||||
| RNA_def_boolean(func, "include_armatures", 0, "Include Armatures", | RNA_def_boolean(func, "include_armatures", 0, "Include Armatures", | ||||
| "Export related armatures (even if not selected)"); | "Export related armatures (even if not selected)"); | ||||
| RNA_def_boolean(func, "include_shapekeys", 1, "Include Shape Keys", | RNA_def_boolean(func, "include_shapekeys", 1, "Include Shape Keys", | ||||
| "Export all Shape Keys from Mesh Objects"); | "Export all Shape Keys from Mesh Objects"); | ||||
| RNA_def_boolean(func, "deform_bones_only", 0, "Deform Bones only", | RNA_def_boolean(func, "deform_bones_only", 0, "Deform Bones only", | ||||
| "Only export deforming bones with armatures"); | "Only export deforming bones with armatures"); | ||||
| RNA_def_int(func, "sampling_rate", 0, -1, INT_MAX, | |||||
| "Samplintg Rate", "The maximum distance of frames between 2 keyframes. Disabled when value is -1", -1, INT_MAX); | |||||
| RNA_def_boolean(func, "active_uv_only", 0, "Only Selected UV Map", | RNA_def_boolean(func, "active_uv_only", 0, "Only Selected UV Map", | ||||
| "Export only the selected UV Map"); | "Export only the selected UV Map"); | ||||
| RNA_def_boolean(func, "use_texture_copies", 1, "Copy", | RNA_def_boolean(func, "use_texture_copies", 1, "Copy", | ||||
| "Copy textures to same folder where the .dae file is exported"); | "Copy textures to same folder where the .dae file is exported"); | ||||
| RNA_def_boolean(func, "triangulate", 1, "Triangulate", | RNA_def_boolean(func, "triangulate", 1, "Triangulate", | ||||
| ▲ Show 20 Lines • Show All 178 Lines • Show Last 20 Lines | |||||