diff options
Diffstat (limited to 'source/blender/editors/io')
-rw-r--r-- | source/blender/editors/io/io_collada.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index b45f3ccde2a..b4b892963fa 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -366,6 +366,7 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op) char filename[FILE_MAX]; int import_units; int find_chains; + int fix_orientation; int min_chain_length; if (!RNA_struct_property_is_set(op->ptr, "filepath")) { @@ -376,12 +377,14 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op) /* Options panel */ import_units = RNA_boolean_get(op->ptr, "import_units"); find_chains = RNA_boolean_get(op->ptr, "find_chains"); + fix_orientation = RNA_boolean_get(op->ptr, "fix_orientation"); min_chain_length = RNA_int_get(op->ptr, "min_chain_length"); RNA_string_get(op->ptr, "filepath", filename); if (collada_import(C, filename, import_units, find_chains, + fix_orientation, min_chain_length)) { return OPERATOR_FINISHED; } @@ -408,11 +411,13 @@ static void uiCollada_importSettings(uiLayout *layout, PointerRNA *imfptr) uiItemL(row, IFACE_("Armature Options:"), ICON_MESH_DATA); row = uiLayoutRow(box, false); + uiItemR(row, imfptr, "fix_orientation", 0, NULL, ICON_NONE); + + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "find_chains", 0, NULL, ICON_NONE); row = uiLayoutRow(box, false); uiItemR(row, imfptr, "min_chain_length", 0, NULL, ICON_NONE); - } static void wm_collada_import_draw(bContext *UNUSED(C), wmOperator *op) @@ -446,6 +451,10 @@ void WM_OT_collada_import(wmOperatorType *ot) "otherwise use the settings from the Imported scene"); RNA_def_boolean(ot->srna, + "fix_orientation", 0, "Fix Leaf Bones", + "Fix Orientation of Leaf Bones (Collada does only support Joints)"); + + RNA_def_boolean(ot->srna, "find_chains", 0, "Find Bone Chains", "Find best matching Bone Chains and ensure bones in chain are connected"); |