[Bf-blender-cvs] [9565ea07245] master: IO: Harmonize UI for selection of axes in OBJ and Collada
Aras Pranckevicius
noreply at git.blender.org
Fri Feb 3 10:14:59 CET 2023
Commit: 9565ea072457e4523146883ad332fbe4766cdea2
Author: Aras Pranckevicius
Date: Fri Feb 3 11:14:43 2023 +0200
Branches: master
https://developer.blender.org/rB9565ea072457e4523146883ad332fbe4766cdea2
IO: Harmonize UI for selection of axes in OBJ and Collada
Implements T103858: in OBJ importer and exporter, and in Collada
exporter, present axis choices as a dropdown instead of inline button
row.
Reviewed By: Bastien Montagne
Differential Revision: https://developer.blender.org/D17186
===================================================================
M source/blender/editors/io/io_collada.c
M source/blender/editors/io/io_obj.c
===================================================================
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index 7bc28a0ba89..7fa835b6490 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -261,17 +261,8 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
uiItemL(row, IFACE_("Global Orientation"), ICON_ORIENTATION_GLOBAL);
uiItemR(box, imfptr, "apply_global_orientation", 0, IFACE_("Apply"), ICON_NONE);
-
- row = uiLayoutRow(box, false);
- uiItemR(row,
- imfptr,
- "export_global_forward_selection",
- UI_ITEM_R_EXPAND,
- IFACE_("Forward Axis"),
- ICON_NONE);
- row = uiLayoutRow(box, false);
- uiItemR(
- row, imfptr, "export_global_up_selection", UI_ITEM_R_EXPAND, IFACE_("Up Axis"), ICON_NONE);
+ uiItemR(box, imfptr, "export_global_forward_selection", 0, IFACE_("Forward Axis"), ICON_NONE);
+ uiItemR(box, imfptr, "export_global_up_selection", 0, IFACE_("Up Axis"), ICON_NONE);
/* Texture options */
box = uiLayoutBox(layout);
diff --git a/source/blender/editors/io/io_obj.c b/source/blender/editors/io/io_obj.c
index e1dba4ee954..54124b46ee5 100644
--- a/source/blender/editors/io/io_obj.c
+++ b/source/blender/editors/io/io_obj.c
@@ -115,7 +115,7 @@ static void ui_obj_export_settings(uiLayout *layout, PointerRNA *imfptr)
uiLayoutSetPropSep(layout, true);
uiLayoutSetPropDecorate(layout, false);
- uiLayout *box, *col, *sub, *row;
+ uiLayout *box, *col, *sub;
/* Object Transform options. */
box = uiLayoutBox(layout);
@@ -123,11 +123,8 @@ static void ui_obj_export_settings(uiLayout *layout, PointerRNA *imfptr)
sub = uiLayoutColumnWithHeading(col, false, IFACE_("Limit to"));
uiItemR(sub, imfptr, "export_selected_objects", 0, IFACE_("Selected Only"), ICON_NONE);
uiItemR(sub, imfptr, "global_scale", 0, NULL, ICON_NONE);
-
- row = uiLayoutRow(box, false);
- uiItemR(row, imfptr, "forward_axis", UI_ITEM_R_EXPAND, IFACE_("Forward Axis"), ICON_NONE);
- row = uiLayoutRow(box, false);
- uiItemR(row, imfptr, "up_axis", UI_ITEM_R_EXPAND, IFACE_("Up Axis"), ICON_NONE);
+ uiItemR(sub, imfptr, "forward_axis", 0, IFACE_("Forward Axis"), ICON_NONE);
+ uiItemR(sub, imfptr, "up_axis", 0, IFACE_("Up Axis"), ICON_NONE);
col = uiLayoutColumn(box, false);
sub = uiLayoutColumn(col, false);
@@ -466,10 +463,8 @@ static void ui_obj_import_settings(uiLayout *layout, PointerRNA *imfptr)
uiItemR(sub, imfptr, "clamp_size", 0, NULL, ICON_NONE);
sub = uiLayoutColumn(col, false);
- uiLayout *row = uiLayoutRow(box, false);
- uiItemR(row, imfptr, "forward_axis", UI_ITEM_R_EXPAND, IFACE_("Forward Axis"), ICON_NONE);
- row = uiLayoutRow(box, false);
- uiItemR(row, imfptr, "up_axis", UI_ITEM_R_EXPAND, IFACE_("Up Axis"), ICON_NONE);
+ uiItemR(sub, imfptr, "forward_axis", 0, IFACE_("Forward Axis"), ICON_NONE);
+ uiItemR(sub, imfptr, "up_axis", 0, IFACE_("Up Axis"), ICON_NONE);
box = uiLayoutBox(layout);
uiItemL(box, IFACE_("Options"), ICON_EXPORT);
More information about the Bf-blender-cvs
mailing list