Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/io/io_collada.c
| Show First 20 Lines • Show All 396 Lines • ▼ Show 20 Lines | else if (ui_section == BC_UI_SECTION_COLLADA) { | ||||
| uiItemR(col, imfptr, "sort_by_name", 0, NULL, ICON_NONE); | uiItemR(col, imfptr, "sort_by_name", 0, NULL, ICON_NONE); | ||||
| uiItemR(col, imfptr, "keep_bind_info", 0, NULL, ICON_NONE); | uiItemR(col, imfptr, "keep_bind_info", 0, NULL, ICON_NONE); | ||||
| uiItemR(col, imfptr, "limit_precision", 0, NULL, ICON_NONE); | uiItemR(col, imfptr, "limit_precision", 0, NULL, ICON_NONE); | ||||
| } | } | ||||
| } | } | ||||
| static void wm_collada_export_draw(bContext *UNUSED(C), wmOperator *op) | static void wm_collada_export_draw(bContext *UNUSED(C), wmOperator *op) | ||||
| { | { | ||||
| PointerRNA ptr; | uiCollada_exportSettings(op->layout, op->ptr); | ||||
| RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr); | |||||
| uiCollada_exportSettings(op->layout, &ptr); | |||||
| } | } | ||||
| static bool wm_collada_export_check(bContext *UNUSED(C), wmOperator *op) | static bool wm_collada_export_check(bContext *UNUSED(C), wmOperator *op) | ||||
| { | { | ||||
| char filepath[FILE_MAX]; | char filepath[FILE_MAX]; | ||||
| RNA_string_get(op->ptr, "filepath", filepath); | RNA_string_get(op->ptr, "filepath", filepath); | ||||
| if (!BLI_path_extension_check(filepath, ".dae")) { | if (!BLI_path_extension_check(filepath, ".dae")) { | ||||
| ▲ Show 20 Lines • Show All 377 Lines • ▼ Show 20 Lines | static void uiCollada_importSettings(uiLayout *layout, PointerRNA *imfptr) | ||||
| box = uiLayoutBox(layout); | box = uiLayoutBox(layout); | ||||
| uiItemR(box, imfptr, "keep_bind_info", 0, NULL, ICON_NONE); | uiItemR(box, imfptr, "keep_bind_info", 0, NULL, ICON_NONE); | ||||
| } | } | ||||
| static void wm_collada_import_draw(bContext *UNUSED(C), wmOperator *op) | static void wm_collada_import_draw(bContext *UNUSED(C), wmOperator *op) | ||||
| { | { | ||||
| PointerRNA ptr; | uiCollada_importSettings(op->layout, op->ptr); | ||||
| RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr); | |||||
| uiCollada_importSettings(op->layout, &ptr); | |||||
| } | } | ||||
| void WM_OT_collada_import(wmOperatorType *ot) | void WM_OT_collada_import(wmOperatorType *ot) | ||||
| { | { | ||||
| ot->name = "Import COLLADA"; | ot->name = "Import COLLADA"; | ||||
| ot->description = "Load a Collada file"; | ot->description = "Load a Collada file"; | ||||
| ot->idname = "WM_OT_collada_import"; | ot->idname = "WM_OT_collada_import"; | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| ▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines | |||||