From 2d896877d1c203e60f8af7ae3791127516c159c4 Mon Sep 17 00:00:00 2001 From: Guillermo Venegas Date: Sat, 26 Apr 2025 21:07:34 +0200 Subject: [PATCH] Refactor: UI: Replace uiLayoutColumn with class method uiLayout::column This converts the public `uiLayoutColumn` function to an object oriented API (`uiLayout::column`), matching the python API. This reduces the difference between the C++ API with the python version, its also helps while converting code from python to C++ code (or vice-versa), making it almost seamless. `uiLayout::column` now returns an `uiLayout` reference instead of a pointer. New calls to this method should use references too. Pull Request: https://projects.blender.org/blender/blender/pulls/138034 --- .../blender/editors/animation/fmodifier_ui.cc | 42 +++++++-------- .../editors/asset/intern/asset_menu_utils.cc | 2 +- .../asset/intern/asset_shelf_popover.cc | 6 +-- source/blender/editors/curve/editfont.cc | 6 +-- .../curves/intern/curves_attribute_set.cc | 2 +- .../editors/curves/intern/curves_ops.cc | 2 +- .../editors/geometry/node_group_operator.cc | 2 +- .../editors/include/UI_interface_layout.hh | 8 ++- source/blender/editors/interface/interface.cc | 2 +- .../interface/interface_context_menu.cc | 10 ++-- .../editors/interface/interface_layout.cc | 46 ++++++++-------- .../editors/interface/interface_utils.cc | 4 +- .../interface/regions/interface_region_hud.cc | 2 +- .../interface_template_asset_view.cc | 4 +- .../interface_template_cache_file.cc | 4 +- .../interface_template_color_management.cc | 8 +-- .../interface_template_color_picker.cc | 6 +-- .../interface_template_component_menu.cc | 22 ++++---- .../interface_template_constraint.cc | 4 +- .../interface_template_curve_mapping.cc | 14 +---- .../templates/interface_template_layers.cc | 2 +- .../templates/interface_template_list.cc | 22 ++++---- .../interface_template_operator_property.cc | 8 +-- .../templates/interface_template_preview.cc | 4 +- .../templates/interface_template_scopes.cc | 6 +-- .../templates/interface_templates.cc | 2 +- .../editors/interface/views/grid_view.cc | 2 +- .../editors/interface/views/tree_view.cc | 10 ++-- source/blender/editors/io/io_alembic.cc | 26 ++++----- source/blender/editors/io/io_collada.cc | 24 ++++----- source/blender/editors/io/io_fbx_ops.cc | 8 +-- source/blender/editors/io/io_grease_pencil.cc | 10 ++-- source/blender/editors/io/io_obj.cc | 16 +++--- source/blender/editors/io/io_ply_ops.cc | 8 +-- source/blender/editors/io/io_stl_ops.cc | 8 +-- source/blender/editors/io/io_usd.cc | 40 +++++++------- .../editors/mesh/editmesh_attribute.cc | 2 +- source/blender/editors/mesh/editmesh_bevel.cc | 6 +-- source/blender/editors/mesh/editmesh_tools.cc | 2 +- .../editors/object/add_modifier_assets.cc | 2 +- source/blender/editors/object/object_edit.cc | 2 +- .../pointcloud/intern/attribute_set.cc | 2 +- source/blender/editors/screen/screen_ops.cc | 2 +- .../sculpt_paint/grease_pencil_interpolate.cc | 2 +- .../editors/sculpt_paint/paint_image_proj.cc | 2 +- .../editors/space_clip/clip_buttons.cc | 8 +-- .../blender/editors/space_file/file_panels.cc | 2 +- .../editors/space_graph/graph_buttons.cc | 54 +++++++++---------- .../editors/space_image/image_buttons.cc | 34 ++++++------ .../blender/editors/space_image/image_ops.cc | 8 +-- .../blender/editors/space_nla/nla_buttons.cc | 18 +++---- .../editors/space_node/add_menu_assets.cc | 2 +- source/blender/editors/space_node/drawnode.cc | 44 +++++++-------- .../editors/space_node/node_templates.cc | 6 +-- .../editors/space_outliner/outliner_edit.cc | 4 +- .../editors/space_topbar/space_topbar.cc | 2 +- .../editors/space_view3d/view3d_buttons.cc | 36 ++++++------- .../editors/uvedit/uvedit_unwrap_ops.cc | 4 +- .../blender/modifiers/intern/MOD_armature.cc | 2 +- source/blender/modifiers/intern/MOD_array.cc | 12 ++--- source/blender/modifiers/intern/MOD_bevel.cc | 8 +-- .../blender/modifiers/intern/MOD_boolean.cc | 2 +- .../blender/modifiers/intern/MOD_decimate.cc | 2 +- .../blender/modifiers/intern/MOD_displace.cc | 6 +-- .../blender/modifiers/intern/MOD_explode.cc | 2 +- .../intern/MOD_grease_pencil_array.cc | 6 +-- .../intern/MOD_grease_pencil_build.cc | 6 +-- .../intern/MOD_grease_pencil_dash.cc | 10 ++-- .../intern/MOD_grease_pencil_hook.cc | 2 +- .../intern/MOD_grease_pencil_length.cc | 6 +-- .../intern/MOD_grease_pencil_multiply.cc | 4 +- .../intern/MOD_grease_pencil_noise.cc | 4 +- .../intern/MOD_grease_pencil_offset.cc | 2 +- .../intern/MOD_grease_pencil_shrinkwrap.cc | 4 +- .../intern/MOD_grease_pencil_smooth.cc | 2 +- .../intern/MOD_grease_pencil_texture.cc | 4 +- .../intern/MOD_grease_pencil_time.cc | 14 ++--- .../intern/MOD_grease_pencil_tint.cc | 2 +- .../intern/MOD_grease_pencil_util.cc | 6 +-- .../MOD_grease_pencil_weight_proximity.cc | 2 +- source/blender/modifiers/intern/MOD_hook.cc | 2 +- .../blender/modifiers/intern/MOD_lineart.cc | 34 ++++++------ .../modifiers/intern/MOD_mesh_to_volume.cc | 4 +- .../blender/modifiers/intern/MOD_meshcache.cc | 2 +- .../modifiers/intern/MOD_meshdeform.cc | 4 +- source/blender/modifiers/intern/MOD_mirror.cc | 6 +-- .../blender/modifiers/intern/MOD_multires.cc | 6 +-- source/blender/modifiers/intern/MOD_nodes.cc | 4 +- .../modifiers/intern/MOD_normal_edit.cc | 2 +- source/blender/modifiers/intern/MOD_ocean.cc | 22 ++++---- .../modifiers/intern/MOD_particleinstance.cc | 6 +-- source/blender/modifiers/intern/MOD_remesh.cc | 2 +- source/blender/modifiers/intern/MOD_screw.cc | 10 ++-- .../modifiers/intern/MOD_shrinkwrap.cc | 4 +- source/blender/modifiers/intern/MOD_smooth.cc | 2 +- .../blender/modifiers/intern/MOD_solidify.cc | 12 ++--- .../blender/modifiers/intern/MOD_subsurf.cc | 8 +-- .../modifiers/intern/MOD_surfacedeform.cc | 6 +-- .../blender/modifiers/intern/MOD_uvproject.cc | 4 +- source/blender/modifiers/intern/MOD_uvwarp.cc | 6 +-- .../modifiers/intern/MOD_volume_to_mesh.cc | 6 +-- source/blender/modifiers/intern/MOD_warp.cc | 6 +-- source/blender/modifiers/intern/MOD_wave.cc | 8 +-- .../modifiers/intern/MOD_weighted_normal.cc | 2 +- .../modifiers/intern/MOD_weightvgedit.cc | 2 +- .../modifiers/intern/MOD_weightvgproximity.cc | 2 +- .../blender/modifiers/intern/MOD_wireframe.cc | 2 +- source/blender/nodes/NOD_socket_items_ui.hh | 6 +-- .../nodes/node_composite_alpha_over.cc | 2 +- .../nodes/node_composite_bilateralblur.cc | 2 +- .../composite/nodes/node_composite_blur.cc | 6 +-- .../nodes/node_composite_channel_matte.cc | 4 +- .../nodes/node_composite_color_spill.cc | 2 +- .../nodes/node_composite_colorbalance.cc | 16 +++--- .../composite/nodes/node_composite_crop.cc | 2 +- .../composite/nodes/node_composite_defocus.cc | 10 ++-- .../nodes/node_composite_directionalblur.cc | 4 +- .../nodes/node_composite_double_edge_mask.cc | 2 +- .../nodes/node_composite_file_output.cc | 22 ++++---- .../composite/nodes/node_composite_image.cc | 2 +- .../nodes/node_composite_keyingscreen.cc | 2 +- .../nodes/node_composite_lensdist.cc | 4 +- .../nodes/node_composite_map_range.cc | 2 +- .../nodes/node_composite_map_value.cc | 10 ++-- .../nodes/node_composite_planetrackdeform.cc | 2 +- .../nodes/node_composite_trackpos.cc | 2 +- .../function/nodes/node_fn_input_bool.cc | 2 +- .../nodes/function/nodes/node_fn_input_int.cc | 2 +- .../function/nodes/node_fn_input_rotation.cc | 2 +- .../function/nodes/node_fn_input_vector.cc | 2 +- .../nodes/geometry/nodes/node_geo_bake.cc | 18 +++---- .../geometry/nodes/node_geo_index_switch.cc | 2 +- .../geometry/nodes/node_geo_simulation.cc | 2 +- .../nodes/node_shader_output_linestyle.cc | 2 +- .../shader/nodes/node_shader_tex_brick.cc | 4 +- .../nodes/shader/nodes/node_shader_tex_sky.cc | 6 +-- .../shader_fx/intern/FX_shader_blur.cc | 2 +- .../shader_fx/intern/FX_shader_pixel.cc | 2 +- .../blender/shader_fx/intern/FX_shader_rim.cc | 4 +- .../shader_fx/intern/FX_shader_shadow.cc | 4 +- .../blender/shader_fx/intern/FX_ui_common.cc | 4 +- .../blender/windowmanager/intern/wm_files.cc | 36 ++++++------- .../windowmanager/intern/wm_operators.cc | 10 ++-- .../windowmanager/intern/wm_splash_screen.cc | 2 +- .../blender/windowmanager/intern/wm_stereo.cc | 2 +- .../blender/windowmanager/intern/wm_window.cc | 6 +-- 146 files changed, 564 insertions(+), 570 deletions(-) diff --git a/source/blender/editors/animation/fmodifier_ui.cc b/source/blender/editors/animation/fmodifier_ui.cc index 0c799024a2b..aa6f9aeebf2 100644 --- a/source/blender/editors/animation/fmodifier_ui.cc +++ b/source/blender/editors/animation/fmodifier_ui.cc @@ -284,11 +284,11 @@ static void fmodifier_frame_range_draw(const bContext *C, Panel *panel) FModifier *fcm = static_cast(ptr->data); uiLayoutSetActive(layout, fcm->flag & FMODIFIER_FLAG_RANGERESTRICT); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "frame_start", UI_ITEM_NONE, IFACE_("Start"), ICON_NONE); uiItemR(col, ptr, "frame_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "blend_in", UI_ITEM_NONE, IFACE_("Blend In"), ICON_NONE); uiItemR(col, ptr, "blend_out", UI_ITEM_NONE, IFACE_("Out"), ICON_NONE); } @@ -372,7 +372,7 @@ static void generator_panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "poly_order", UI_ITEM_NONE, IFACE_("Order"), ICON_NONE); PropertyRNA *prop = RNA_struct_find_property(ptr, "coefficients"); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); switch (data->mode) { case FCM_GENERATOR_POLYNOMIAL: /* Polynomial expression. */ { @@ -394,8 +394,8 @@ static void generator_panel_draw(const bContext *C, Panel *panel) /* Add column labels above the buttons to prevent confusion. * Fake the property split layout, otherwise the labels use the full row. */ uiLayout *split = uiLayoutSplit(col, 0.4f, false); - uiLayoutColumn(split, false); - uiLayout *title_col = uiLayoutColumn(split, false); + split->column(false); + uiLayout *title_col = &split->column(false); uiLayout *title_row = &title_col->row(true); uiItemL(title_row, CTX_IFACE_(BLT_I18NCONTEXT_ID_ACTION, "A"), ICON_NONE); uiItemL(title_row, CTX_IFACE_(BLT_I18NCONTEXT_ID_ACTION, "B"), ICON_NONE); @@ -450,10 +450,10 @@ static void fn_generator_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "use_additive", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "amplitude", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "phase_multiplier", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "phase_offset", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -494,12 +494,12 @@ static void cycles_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropDecorate(layout, false); /* Before. */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "mode_before", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "cycles_before", UI_ITEM_NONE, IFACE_("Count"), ICON_NONE); /* After. */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "mode_after", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "cycles_after", UI_ITEM_NONE, IFACE_("Count"), ICON_NONE); @@ -539,7 +539,7 @@ static void noise_panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "blend_type", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "scale", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "strength", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "offset", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -676,7 +676,7 @@ static void envelope_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropDecorate(layout, false); /* General settings. */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "reference_value", UI_ITEM_NONE, IFACE_("Reference"), ICON_NONE); uiItemR(col, ptr, "default_min", UI_ITEM_NONE, IFACE_("Min"), ICON_NONE); uiItemR(col, ptr, "default_max", UI_ITEM_NONE, IFACE_("Max"), ICON_NONE); @@ -700,7 +700,7 @@ static void envelope_panel_draw(const bContext *C, Panel *panel) TIP_("Add a new control-point to the envelope on the current frame")); UI_but_func_set(but, fmod_envelope_addpoint_cb, env, nullptr); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetPropSep(col, false); FCM_EnvelopeData *fed = env->data; @@ -767,30 +767,30 @@ static void limits_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropDecorate(layout, false); /* Minimums. */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); row = &col->row(true, IFACE_("Minimum X")); uiItemR(row, ptr, "use_min_x", UI_ITEM_NONE, "", ICON_NONE); - sub = uiLayoutColumn(row, true); + sub = &row->column(true); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min_x")); uiItemR(sub, ptr, "min_x", UI_ITEM_NONE, "", ICON_NONE); row = &col->row(true, IFACE_("Y")); uiItemR(row, ptr, "use_min_y", UI_ITEM_NONE, "", ICON_NONE); - sub = uiLayoutColumn(row, true); + sub = &row->column(true); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min_y")); uiItemR(sub, ptr, "min_y", UI_ITEM_NONE, "", ICON_NONE); /* Maximums. */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); row = &col->row(true, IFACE_("Maximum X")); uiItemR(row, ptr, "use_max_x", UI_ITEM_NONE, "", ICON_NONE); - sub = uiLayoutColumn(row, true); + sub = &row->column(true); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max_x")); uiItemR(sub, ptr, "max_x", UI_ITEM_NONE, "", ICON_NONE); row = &col->row(true, IFACE_("Y")); uiItemR(row, ptr, "use_max_y", UI_ITEM_NONE, "", ICON_NONE); - sub = uiLayoutColumn(row, true); + sub = &row->column(true); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max_y")); uiItemR(sub, ptr, "max_y", UI_ITEM_NONE, "", ICON_NONE); @@ -829,21 +829,21 @@ static void stepped_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropDecorate(layout, false); /* Stepping Settings. */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "frame_step", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "frame_offset", UI_ITEM_NONE, std::nullopt, ICON_NONE); /* Start range settings. */ row = &layout->row(true, IFACE_("Start Frame")); uiItemR(row, ptr, "use_frame_start", UI_ITEM_NONE, "", ICON_NONE); - sub = uiLayoutColumn(row, true); + sub = &row->column(true); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_frame_start")); uiItemR(sub, ptr, "frame_start", UI_ITEM_NONE, "", ICON_NONE); /* End range settings. */ row = &layout->row(true, IFACE_("End Frame")); uiItemR(row, ptr, "use_frame_end", UI_ITEM_NONE, "", ICON_NONE); - sub = uiLayoutColumn(row, true); + sub = &row->column(true); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_frame_end")); uiItemR(sub, ptr, "frame_end", UI_ITEM_NONE, "", ICON_NONE); diff --git a/source/blender/editors/asset/intern/asset_menu_utils.cc b/source/blender/editors/asset/intern/asset_menu_utils.cc index cbe1e24b586..b36b67c77c2 100644 --- a/source/blender/editors/asset/intern/asset_menu_utils.cc +++ b/source/blender/editors/asset/intern/asset_menu_utils.cc @@ -139,7 +139,7 @@ void draw_menu_for_catalog(const asset_system::AssetCatalogTreeItem &item, const StringRefNull menu_name, uiLayout &layout) { - uiLayout *col = uiLayoutColumn(&layout, false); + uiLayout *col = &layout.column(false); uiLayoutSetContextString(col, "asset_catalog_path", item.catalog_path().c_str()); uiItemM(col, menu_name, IFACE_(item.get_name()), ICON_NONE); } diff --git a/source/blender/editors/asset/intern/asset_shelf_popover.cc b/source/blender/editors/asset/intern/asset_shelf_popover.cc index 2b39e96a42c..5bbbde7f7e6 100644 --- a/source/blender/editors/asset/intern/asset_shelf_popover.cc +++ b/source/blender/editors/asset/intern/asset_shelf_popover.cc @@ -241,13 +241,13 @@ static void popover_panel_draw(const bContext *C, Panel *panel) uiLayoutSetContextPointer(layout, "asset_library_reference", &library_ref_ptr); uiLayout *row = &layout->row(false); - uiLayout *catalogs_col = uiLayoutColumn(row, false); + uiLayout *catalogs_col = &row->column(false); uiLayoutSetUnitsX(catalogs_col, LEFT_COL_WIDTH_UNITS); uiLayoutSetFixedSize(catalogs_col, true); library_selector_draw(C, catalogs_col, *shelf); catalog_tree_draw(*C, *catalogs_col, *shelf); - uiLayout *right_col = uiLayoutColumn(row, false); + uiLayout *right_col = &row->column(false); uiLayout *sub = &right_col->row(false); /* Same as file/asset browser header. */ PointerRNA shelf_ptr = RNA_pointer_create_discrete(&screen->id, &RNA_AssetShelf, shelf); @@ -259,7 +259,7 @@ static void popover_panel_draw(const bContext *C, Panel *panel) "", ICON_VIEWZOOM); - uiLayout *asset_view_col = uiLayoutColumn(right_col, false); + uiLayout *asset_view_col = &right_col->column(false); BLI_assert((layout_width_units - LEFT_COL_WIDTH_UNITS) > 0); uiLayoutSetUnitsX(asset_view_col, layout_width_units - LEFT_COL_WIDTH_UNITS); uiLayoutSetFixedSize(asset_view_col, true); diff --git a/source/blender/editors/curve/editfont.cc b/source/blender/editors/curve/editfont.cc index 90e017016e7..64ac884779f 100644 --- a/source/blender/editors/curve/editfont.cc +++ b/source/blender/editors/curve/editfont.cc @@ -735,19 +735,19 @@ static uiBlock *wm_block_insert_unicode_create(bContext *C, ARegion *region, voi uiBut *confirm = nullptr; uiBut *cancel = nullptr; uiLayout *split = uiLayoutSplit(layout, 0.0f, true); - uiLayoutColumn(split, false); + split->column(false); if (windows_layout) { confirm = uiDefIconTextBut( block, UI_BTYPE_BUT, 0, 0, "Insert", 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, std::nullopt); - uiLayoutColumn(split, false); + split->column(false); } cancel = uiDefIconTextBut( block, UI_BTYPE_BUT, 0, 0, "Cancel", 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, std::nullopt); if (!windows_layout) { - uiLayoutColumn(split, false); + split->column(false); confirm = uiDefIconTextBut( block, UI_BTYPE_BUT, 0, 0, "Insert", 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, std::nullopt); } diff --git a/source/blender/editors/curves/intern/curves_attribute_set.cc b/source/blender/editors/curves/intern/curves_attribute_set.cc index d31d31b5ee5..4e5a60d3fd6 100644 --- a/source/blender/editors/curves/intern/curves_attribute_set.cc +++ b/source/blender/editors/curves/intern/curves_attribute_set.cc @@ -184,7 +184,7 @@ static wmOperatorStatus set_attribute_invoke(bContext *C, wmOperator *op, const static void set_attribute_ui(bContext *C, wmOperator *op) { - uiLayout *layout = uiLayoutColumn(op->layout, true); + uiLayout *layout = &op->layout->column(true); uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc index 713c16627ec..5c57af64279 100644 --- a/source/blender/editors/curves/intern/curves_ops.cc +++ b/source/blender/editors/curves/intern/curves_ops.cc @@ -1016,7 +1016,7 @@ static void select_ends_ui(bContext * /*C*/, wmOperator *op) uiLayoutSetPropSep(layout, true); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayoutSetPropDecorate(col, false); uiItemR(col, op->ptr, "amount_start", UI_ITEM_NONE, IFACE_("Amount Start"), ICON_NONE); uiItemR(col, op->ptr, "amount_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); diff --git a/source/blender/editors/geometry/node_group_operator.cc b/source/blender/editors/geometry/node_group_operator.cc index ba3886675a3..e046800a9b8 100644 --- a/source/blender/editors/geometry/node_group_operator.cc +++ b/source/blender/editors/geometry/node_group_operator.cc @@ -1446,7 +1446,7 @@ void ui_template_node_operator_asset_menu_items(uiLayout &layout, if (!all_library) { return; } - uiLayout *col = uiLayoutColumn(&layout, false); + uiLayout *col = &layout.column(false); uiLayoutSetContextString(col, "asset_catalog_path", item->catalog_path().str()); uiItemMContents(col, "GEO_MT_node_operator_catalog_assets"); } diff --git a/source/blender/editors/include/UI_interface_layout.hh b/source/blender/editors/include/UI_interface_layout.hh index 45425a5c484..878ada4bcbf 100644 --- a/source/blender/editors/include/UI_interface_layout.hh +++ b/source/blender/editors/include/UI_interface_layout.hh @@ -94,6 +94,11 @@ struct uiLayout : uiItem { LayoutSuppressFlag suppress_flag_; public: + /** + * Add a new column sub-layout, items placed in this sub-layout are added vertically one under + * each other in a column. + */ + uiLayout &column(bool align); /** * Add a new row sub-layout, items placed in this sub-layout are added horizontally next to each * other in row. @@ -363,9 +368,8 @@ uiLayout *uiLayoutPanel(const bContext *C, bool uiLayoutEndsWithPanelHeader(const uiLayout &layout); -uiLayout *uiLayoutColumn(uiLayout *layout, bool align); /** - * Variant of #uiLayoutColumn() that sets a heading label for the layout if the first item is + * Variant of #uiLayout::column() that sets a heading label for the layout if the first item is * added through #uiItemFullR(). If split layout is used and the item has no string to add to the * first split-column, the heading is added there instead. Otherwise the heading inserted with a * new row. diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc index 13672279924..9dfdbd59406 100644 --- a/source/blender/editors/interface/interface.cc +++ b/source/blender/editors/interface/interface.cc @@ -4608,7 +4608,7 @@ static void ui_def_but_rna__menu(bContext *C, uiLayout *layout, void *but_p) } } - column = uiLayoutColumn(split, false); + column = &split->column(false); } const EnumPropertyItem *item = &item_array[a]; diff --git a/source/blender/editors/interface/interface_context_menu.cc b/source/blender/editors/interface/interface_context_menu.cc index e8d94182ea1..4659c0edd28 100644 --- a/source/blender/editors/interface/interface_context_menu.cc +++ b/source/blender/editors/interface/interface_context_menu.cc @@ -1085,7 +1085,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev const bContextStore *prev_ctx = CTX_store_get(C); /* Sub-layout for context override. */ - uiLayout *sub = uiLayoutColumn(layout, false); + uiLayout *sub = &layout->column(false); set_layout_context_from_button(C, sub, view_item_but); view_item_but->view_item->build_context_menu(*C, *sub); @@ -1108,13 +1108,13 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev /* Gray out items depending on if data-block is an asset. Preferably this could be done via * operator poll, but that doesn't work since the operator also works with "selected_ids", * which isn't cheap to check. */ - uiLayout *sub = uiLayoutColumn(layout, true); + uiLayout *sub = &layout->column(true); uiLayoutSetEnabled(sub, !id->asset_data); uiItemO(sub, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Mark as Asset"), ICON_ASSET_MANAGER, "ASSET_OT_mark_single"); - sub = uiLayoutColumn(layout, true); + sub = &layout->column(true); uiLayoutSetEnabled(sub, id->asset_data); uiItemO(sub, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Asset"), @@ -1399,13 +1399,13 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev if (is_inside_listrow) { MenuType *mt = WM_menutype_find("UI_MT_list_item_context_menu", true); if (mt) { - UI_menutype_draw(C, mt, uiLayoutColumn(layout, false)); + UI_menutype_draw(C, mt, &layout->column(false)); } } MenuType *mt = WM_menutype_find("UI_MT_button_context_menu", true); if (mt) { - UI_menutype_draw(C, mt, uiLayoutColumn(layout, false)); + UI_menutype_draw(C, mt, &layout->column(false)); } if (but->context) { diff --git a/source/blender/editors/interface/interface_layout.cc b/source/blender/editors/interface/interface_layout.cc index cdf1119e820..e2e21208ff4 100644 --- a/source/blender/editors/interface/interface_layout.cc +++ b/source/blender/editors/interface/interface_layout.cc @@ -468,7 +468,7 @@ static uiLayout *ui_item_local_sublayout(uiLayout *test, uiLayout *layout, bool sub = &layout->row(align); } else { - sub = uiLayoutColumn(layout, align); + sub = &layout->column(align); } sub->space_ = 0; @@ -1529,7 +1529,7 @@ void uiItemsFullEnumO_items(uiLayout *layout, } else { split = uiLayoutSplit(layout, 0.0f, false); - target = uiLayoutColumn(split, layout->align_); + target = &split->column(layout->align_); } bool last_iter = false; @@ -1592,7 +1592,7 @@ void uiItemsFullEnumO_items(uiLayout *layout, else { if (item->name) { if (item != item_array && !radial && split != nullptr) { - target = uiLayoutColumn(split, layout->align_); + target = &split->column(layout->align_); } uiBut *but; @@ -2257,7 +2257,7 @@ void uiItemFullR(uiLayout *layout, if (name.is_empty() && !use_split_empty_name) { /* Ensure we get a column when text is not set. */ - layout = uiLayoutColumn(layout_row ? layout_row : layout, true); + layout = &(layout_row ? layout_row : layout)->column(true); layout->space_ = 0; if (heading_layout) { ui_layout_heading_label_add(layout, heading_layout, false, false); @@ -2267,7 +2267,7 @@ void uiItemFullR(uiLayout *layout, uiLayout *layout_split = uiLayoutSplit( layout_row ? layout_row : layout, UI_ITEM_PROP_SEP_DIVIDE, true); bool label_added = false; - uiLayout *layout_sub = uiLayoutColumn(layout_split, true); + uiLayout *layout_sub = &layout_split->column(true); layout_sub->space_ = 0; if (!use_prop_sep_split_label) { @@ -2328,21 +2328,21 @@ void uiItemFullR(uiLayout *layout, layout = &layout_split->row(true); } else { - layout = uiLayoutColumn(layout_split, true); + layout = &layout_split->column(true); } } else { if (use_prop_sep_split_label) { name = ""; } - layout = uiLayoutColumn(layout_split, true); + layout = &layout_split->column(true); } layout->space_ = 0; } #ifdef UI_PROP_DECORATE if (ui_decorate.use_prop_decorate) { - ui_decorate.layout = uiLayoutColumn(layout_row, true); + ui_decorate.layout = &layout_row->column(true); ui_decorate.layout->space_ = 0; UI_block_layout_set_current(block, layout); ui_decorate.but = block->last_but(); @@ -2364,7 +2364,7 @@ void uiItemFullR(uiLayout *layout, if (inside_prop_sep) { /* Within a split row, add array items to a column so they match the column layout of * previous items (e.g. transform vector with lock icon for each item). */ - layout = uiLayoutColumn(layout, true); + layout = &layout->column(true); } ui_item_array(layout, @@ -2509,7 +2509,7 @@ void uiItemFullR(uiLayout *layout, tmp.append(block->buttons.pop_last()); } const bool use_blank_decorator = (flag & UI_ITEM_R_FORCE_BLANK_DECORATE); - uiLayout *layout_col = uiLayoutColumn(ui_decorate.layout, false); + uiLayout *layout_col = &ui_decorate.layout->column(false); layout_col->space_ = 0; layout_col->emboss_ = blender::ui::EmbossType::None; @@ -2732,7 +2732,7 @@ void uiItemsEnumR(uiLayout *layout, PointerRNA *ptr, const StringRefNull propnam } uiLayout *split = uiLayoutSplit(layout, 0.0f, false); - uiLayout *column = uiLayoutColumn(split, false); + uiLayout *column = &split->column(false); int totitem; const EnumPropertyItem *item; @@ -2748,7 +2748,7 @@ void uiItemsEnumR(uiLayout *layout, PointerRNA *ptr, const StringRefNull propnam else { if (item[i].name) { if (i != 0) { - column = uiLayoutColumn(split, false); + column = &split->column(false); } uiItemL(column, item[i].name, ICON_NONE); @@ -3123,7 +3123,7 @@ void uiItemDecoratorR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, uiBlock *block = layout->root_->block; UI_block_layout_set_current(block, layout); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); col->space_ = 0; col->emboss_ = blender::ui::EmbossType::None; @@ -3355,11 +3355,11 @@ uiPropertySplitWrapper uiItemPropertySplitWrapperCreate(uiLayout *parent_layout) uiLayout *layout_row = &parent_layout->row(true); uiLayout *layout_split = uiLayoutSplit(layout_row, UI_ITEM_PROP_SEP_DIVIDE, true); - split_wrapper.label_column = uiLayoutColumn(layout_split, true); + split_wrapper.label_column = &layout_split->column(true); split_wrapper.label_column->alignment_ = UI_LAYOUT_ALIGN_RIGHT; split_wrapper.property_row = ui_item_prop_split_layout_hack(parent_layout, layout_split); split_wrapper.decorate_column = uiLayoutGetPropDecorate(parent_layout) ? - uiLayoutColumn(layout_row, true) : + &layout_row->column(true) : nullptr; return split_wrapper; @@ -5101,22 +5101,22 @@ uiLayout &uiLayout::row(bool align, const StringRef heading) return litem; } -uiLayout *uiLayoutColumn(uiLayout *layout, bool align) +uiLayout &uiLayout::column(bool align) { uiLayout *litem = MEM_new(__func__); - ui_litem_init_from_parent(litem, layout, align); + ui_litem_init_from_parent(litem, this, align); litem->type_ = uiItemType::LayoutColumn; - litem->space_ = (align) ? 0 : layout->root_->style->buttonspacey; + litem->space_ = (align) ? 0 : this->root_->style->buttonspacey; - UI_block_layout_set_current(layout->root_->block, litem); + UI_block_layout_set_current(this->root_->block, litem); - return litem; + return *litem; } uiLayout *uiLayoutColumnWithHeading(uiLayout *layout, bool align, const StringRef heading) { - uiLayout *litem = uiLayoutColumn(layout, align); + uiLayout *litem = &layout->column(align); ui_layout_heading_set(litem, heading); return litem; } @@ -6352,7 +6352,7 @@ static void ui_paneltype_draw_impl(bContext *C, PanelType *pt, uiLayout *layout, item_last = layout->items_.last(); } - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); ui_paneltype_draw_impl(C, child_pt, col, true); } } @@ -6523,7 +6523,7 @@ uiLayout *uiItemsAlertBox(uiBlock *block, uiDefButAlert(block, icon, 0, 0, icon_size, icon_size); /* The rest of the content on the right. */ - layout = uiLayoutColumn(split_block, false); + layout = &split_block->column(false); return layout; } diff --git a/source/blender/editors/interface/interface_utils.cc b/source/blender/editors/interface/interface_utils.cc index 725f1785f99..e67f1ee0ec4 100644 --- a/source/blender/editors/interface/interface_utils.cc +++ b/source/blender/editors/interface/interface_utils.cc @@ -391,7 +391,7 @@ eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, name = RNA_property_ui_name(prop); if (label_align == UI_BUT_LABEL_ALIGN_COLUMN) { - col = uiLayoutColumn(layout, true); + col = &layout->column(true); if (!is_boolean) { uiItemL(col, *name, ICON_NONE); @@ -399,7 +399,7 @@ eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, } else { BLI_assert(label_align == UI_BUT_LABEL_ALIGN_SPLIT_COLUMN); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); /* Let uiItemFullR() create the split layout. */ uiLayoutSetPropSep(col, true); } diff --git a/source/blender/editors/interface/regions/interface_region_hud.cc b/source/blender/editors/interface/regions/interface_region_hud.cc index 2c08e94483b..95b63ff0faf 100644 --- a/source/blender/editors/interface/regions/interface_region_hud.cc +++ b/source/blender/editors/interface/regions/interface_region_hud.cc @@ -174,7 +174,7 @@ static void hud_panel_operator_redo_draw(const bContext *C, Panel *panel) if (!WM_operator_check_ui_enabled(C, op->type->name)) { uiLayoutSetEnabled(panel->layout, false); } - uiLayout *col = uiLayoutColumn(panel->layout, false); + uiLayout *col = &panel->layout->column(false); uiTemplateOperatorRedoProperties(col, C); } diff --git a/source/blender/editors/interface/templates/interface_template_asset_view.cc b/source/blender/editors/interface/templates/interface_template_asset_view.cc index 73a345a69dd..a44dac8fdc6 100644 --- a/source/blender/editors/interface/templates/interface_template_asset_view.cc +++ b/source/blender/editors/interface/templates/interface_template_asset_view.cc @@ -236,7 +236,7 @@ void uiTemplateAssetView(uiLayout *layout, return; } - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); PropertyRNA *asset_library_prop = RNA_struct_find_property(asset_library_dataptr, asset_library_propname); @@ -278,7 +278,7 @@ void uiTemplateAssetView(uiLayout *layout, template_list_flags |= UI_TEMPLATE_LIST_NO_FILTER_OPTIONS; } - uiLayout *subcol = uiLayoutColumn(col, false); + uiLayout *subcol = &col->column(false); uiLayoutSetScaleX(subcol, 0.8f); uiLayoutSetScaleY(subcol, 0.8f); diff --git a/source/blender/editors/interface/templates/interface_template_cache_file.cc b/source/blender/editors/interface/templates/interface_template_cache_file.cc index 482acfc8614..00370ae2a1a 100644 --- a/source/blender/editors/interface/templates/interface_template_cache_file.cc +++ b/source/blender/editors/interface/templates/interface_template_cache_file.cc @@ -164,7 +164,7 @@ void uiTemplateCacheFileLayers(uiLayout *layout, const bContext *C, PointerRNA * uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr); uiLayout *row = &layout->row(false); - uiLayout *col = uiLayoutColumn(row, true); + uiLayout *col = &row->column(true); uiTemplateList(col, (bContext *)C, @@ -181,7 +181,7 @@ void uiTemplateCacheFileLayers(uiLayout *layout, const bContext *C, PointerRNA * 1, UI_TEMPLATE_LIST_FLAG_NONE); - col = uiLayoutColumn(row, true); + col = &row->column(true); uiItemO(col, "", ICON_ADD, "cachefile.layer_add"); uiItemO(col, "", ICON_REMOVE, "cachefile.layer_remove"); diff --git a/source/blender/editors/interface/templates/interface_template_color_management.cc b/source/blender/editors/interface/templates/interface_template_color_management.cc index 2b43a97a8ba..bfe8fc5f5bc 100644 --- a/source/blender/editors/interface/templates/interface_template_color_management.cc +++ b/source/blender/editors/interface/templates/interface_template_color_management.cc @@ -53,22 +53,22 @@ void uiTemplateColormanagedViewSettings(uiLayout *layout, ColorManagedViewSettings *view_settings = static_cast( view_transform_ptr.data); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, &view_transform_ptr, "view_transform", UI_ITEM_NONE, IFACE_("View"), ICON_NONE); uiItemR(col, &view_transform_ptr, "look", UI_ITEM_NONE, IFACE_("Look"), ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, &view_transform_ptr, "exposure", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, &view_transform_ptr, "gamma", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, &view_transform_ptr, "use_curve_mapping", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (view_settings->flag & COLORMANAGE_VIEW_USE_CURVES) { uiTemplateCurveMapping( col, &view_transform_ptr, "curve_mapping", 'c', true, false, false, false); } - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, &view_transform_ptr, "use_white_balance", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (view_settings->flag & COLORMANAGE_VIEW_USE_WHITE_BALANCE) { uiItemR(col, diff --git a/source/blender/editors/interface/templates/interface_template_color_picker.cc b/source/blender/editors/interface/templates/interface_template_color_picker.cc index ff1602557fa..310cc6eda4c 100644 --- a/source/blender/editors/interface/templates/interface_template_color_picker.cc +++ b/source/blender/editors/interface/templates/interface_template_color_picker.cc @@ -44,7 +44,7 @@ void uiTemplateColorPicker(uiLayout *layout, float softmin, softmax, step, precision; RNA_property_float_ui_range(ptr, prop, &softmin, &softmax, &step, &precision); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayout *row = &col->row(true); uiBut *but = nullptr; @@ -254,7 +254,7 @@ void uiTemplatePalette(uiLayout *layout, Palette *palette = static_cast(cptr.data); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); col->row(true); uiDefIconButO(block, UI_BTYPE_BUT, @@ -308,7 +308,7 @@ void uiTemplatePalette(uiLayout *layout, block, ui_template_palette_menu, nullptr, ICON_SORTSIZE, 0, 0, UI_UNIT_X, UI_UNIT_Y, ""); } - col = uiLayoutColumn(layout, true); + col = &layout->column(true); col->row(true); int row_cols = 0, col_id = 0; diff --git a/source/blender/editors/interface/templates/interface_template_component_menu.cc b/source/blender/editors/interface/templates/interface_template_component_menu.cc index 6709895709b..e99cdfd0c84 100644 --- a/source/blender/editors/interface/templates/interface_template_component_menu.cc +++ b/source/blender/editors/interface/templates/interface_template_component_menu.cc @@ -29,18 +29,18 @@ static uiBlock *component_menu(bContext *C, ARegion *region, void *args_v) uiBlock *block = UI_block_begin(C, region, __func__, blender::ui::EmbossType::Emboss); UI_block_flag_enable(block, UI_BLOCK_KEEP_OPEN); - uiLayout *layout = uiLayoutColumn(UI_block_layout(block, - UI_LAYOUT_VERTICAL, - UI_LAYOUT_PANEL, - 0, - 0, - UI_UNIT_X * 6, - UI_UNIT_Y, - 0, - UI_style_get()), - false); + uiLayout &layout = UI_block_layout(block, + UI_LAYOUT_VERTICAL, + UI_LAYOUT_PANEL, + 0, + 0, + UI_UNIT_X * 6, + UI_UNIT_Y, + 0, + UI_style_get()) + ->column(false); - uiItemR(layout, &args->ptr, args->propname, UI_ITEM_R_EXPAND, "", ICON_NONE); + uiItemR(&layout, &args->ptr, args->propname, UI_ITEM_R_EXPAND, "", ICON_NONE); UI_block_bounds_set_normal(block, 0.3f * U.widget_unit); UI_block_direction_set(block, UI_DIR_DOWN); diff --git a/source/blender/editors/interface/templates/interface_template_constraint.cc b/source/blender/editors/interface/templates/interface_template_constraint.cc index 109de0551d8..5e40184657d 100644 --- a/source/blender/editors/interface/templates/interface_template_constraint.cc +++ b/source/blender/editors/interface/templates/interface_template_constraint.cc @@ -71,7 +71,7 @@ static void constraint_ops_extra_draw(bContext *C, uiLayout *layout, void *con_v uiItemS(layout); /* Move to first. */ - row = uiLayoutColumn(layout, false); + row = &layout->column(false); uiItemFullO(row, "CONSTRAINT_OT_move_to_index", IFACE_("Move to First"), @@ -86,7 +86,7 @@ static void constraint_ops_extra_draw(bContext *C, uiLayout *layout, void *con_v } /* Move to last. */ - row = uiLayoutColumn(layout, false); + row = &layout->column(false); uiItemFullO(row, "CONSTRAINT_OT_move_to_index", IFACE_("Move to Last"), diff --git a/source/blender/editors/interface/templates/interface_template_curve_mapping.cc b/source/blender/editors/interface/templates/interface_template_curve_mapping.cc index 66555606c8a..90bb828aaeb 100644 --- a/source/blender/editors/interface/templates/interface_template_curve_mapping.cc +++ b/source/blender/editors/interface/templates/interface_template_curve_mapping.cc @@ -726,18 +726,8 @@ static void curvemap_buttons_layout(uiLayout *layout, /* black/white levels */ if (levels) { uiLayout *split = uiLayoutSplit(layout, 0.0f, false); - uiItemR(uiLayoutColumn(split, false), - ptr, - "black_level", - UI_ITEM_R_EXPAND, - std::nullopt, - ICON_NONE); - uiItemR(uiLayoutColumn(split, false), - ptr, - "white_level", - UI_ITEM_R_EXPAND, - std::nullopt, - ICON_NONE); + uiItemR(&split->column(false), ptr, "black_level", UI_ITEM_R_EXPAND, std::nullopt, ICON_NONE); + uiItemR(&split->column(false), ptr, "white_level", UI_ITEM_R_EXPAND, std::nullopt, ICON_NONE); layout->row(false); bt = uiDefBut(block, diff --git a/source/blender/editors/interface/templates/interface_template_layers.cc b/source/blender/editors/interface/templates/interface_template_layers.cc index 55fd982f474..5dbb025b4dc 100644 --- a/source/blender/editors/interface/templates/interface_template_layers.cc +++ b/source/blender/editors/interface/templates/interface_template_layers.cc @@ -85,7 +85,7 @@ void uiTemplateLayers(uiLayout *layout, /* layers are laid out going across rows, with the columns being divided into groups */ for (int group = 0; group < groups; group++) { - uiLayout *uCol = uiLayoutColumn(layout, true); + uiLayout *uCol = &layout->column(true); for (int row = 0; row < 2; row++) { uiLayout *uRow = &uCol->row(true); diff --git a/source/blender/editors/interface/templates/interface_template_list.cc b/source/blender/editors/interface/templates/interface_template_list.cc index 9dfcde8156c..77317a3ce6d 100644 --- a/source/blender/editors/interface/templates/interface_template_list.cc +++ b/source/blender/editors/interface/templates/interface_template_list.cc @@ -733,9 +733,9 @@ static void ui_template_list_layout_draw(const bContext *C, case UILST_LAYOUT_DEFAULT: { /* layout */ box = uiLayoutListBox(layout, ui_list, &input_data->active_dataptr, input_data->activeprop); - glob = uiLayoutColumn(box, true); + glob = &box->column(true); row = &glob->row(false); - col = uiLayoutColumn(row, true); + col = &row->column(true); TemplateListLayoutDrawData adjusted_layout_data = *layout_data; adjusted_layout_data.columns = 1; @@ -826,7 +826,7 @@ static void ui_template_list_layout_draw(const bContext *C, /* Add scroll-bar. */ if (items->item_vec.size() > visual_info.visual_items) { - uiLayoutColumn(row, false); + row->column(false); but = uiDefButI(block, UI_BTYPE_SCROLL, 0, @@ -896,9 +896,9 @@ static void ui_template_list_layout_draw(const bContext *C, break; case UILST_LAYOUT_GRID: { box = uiLayoutListBox(layout, ui_list, &input_data->active_dataptr, input_data->activeprop); - glob = uiLayoutColumn(box, true); + glob = &box->column(true); row = &glob->row(false); - col = uiLayoutColumn(row, true); + col = &row->column(true); subrow = nullptr; /* Quite gcc warning! */ uilist_prepare(ui_list, items, layout_data, &visual_info); @@ -973,7 +973,7 @@ static void ui_template_list_layout_draw(const bContext *C, /* Add scroll-bar. */ if (items->item_vec.size() > visual_info.visual_items) { - /* col = */ uiLayoutColumn(row, false); + /* col = */ row->column(false); but = uiDefButI(block, UI_BTYPE_SCROLL, 0, @@ -994,7 +994,7 @@ static void ui_template_list_layout_draw(const bContext *C, case UILST_LAYOUT_BIG_PREVIEW_GRID: box = uiLayoutListBox(layout, ui_list, &input_data->active_dataptr, input_data->activeprop); /* For grip button. */ - glob = uiLayoutColumn(box, true); + glob = &box->column(true); /* For scroll-bar. */ row = &glob->row(false); @@ -1019,7 +1019,7 @@ static void ui_template_list_layout_draw(const bContext *C, const int flt_flag = items->item_vec[i].flt_flag; overlap = uiLayoutOverlap(grid); - col = uiLayoutColumn(overlap, false); + col = &overlap->column(false); uiBlock *subblock = uiLayoutGetBlock(col); UI_block_flag_enable(subblock, UI_BLOCK_LIST_ITEM); @@ -1040,7 +1040,7 @@ static void ui_template_list_layout_draw(const bContext *C, std::nullopt); UI_but_drawflag_enable(but, UI_BUT_NO_TOOLTIP); - col = uiLayoutColumn(overlap, false); + col = &overlap->column(false); icon = UI_icon_from_rnaptr(C, itemptr, rnaicon, false); layout_data->draw_item(ui_list, @@ -1068,7 +1068,7 @@ static void ui_template_list_layout_draw(const bContext *C, } if (items->item_vec.size() > visual_info.visual_items) { - /* col = */ uiLayoutColumn(row, false); + /* col = */ row->column(false); but = uiDefButI(block, UI_BTYPE_SCROLL, 0, @@ -1145,7 +1145,7 @@ static void ui_template_list_layout_draw(const bContext *C, UI_block_emboss_set(subblock, blender::ui::EmbossType::Emboss); - col = uiLayoutColumn(glob, false); + col = &glob->column(false); subblock = uiLayoutGetBlock(col); uiDefBut(subblock, UI_BTYPE_SEPR, diff --git a/source/blender/editors/interface/templates/interface_template_operator_property.cc b/source/blender/editors/interface/templates/interface_template_operator_property.cc index 4e61396bf82..033d0ec8d91 100644 --- a/source/blender/editors/interface/templates/interface_template_operator_property.cc +++ b/source/blender/editors/interface/templates/interface_template_operator_property.cc @@ -155,7 +155,7 @@ static eAutoPropButsReturn template_operator_property_buts_draw_single( uiBut *but; uiLayout *col; /* needed to avoid alignment errors with previous buttons */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); block = uiLayoutGetBlock(col); but = uiDefIconTextBut(block, UI_BTYPE_BUT, @@ -365,7 +365,7 @@ static void draw_export_properties(bContext *C, wmOperator *op, const std::string &filename) { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetPropSep(col, true); uiLayoutSetPropDecorate(col, false); @@ -448,11 +448,11 @@ void uiTemplateCollectionExporters(uiLayout *layout, bContext *C) 1, UI_TEMPLATE_LIST_FLAG_NONE); - uiLayout *col = uiLayoutColumn(row, true); + uiLayout *col = &row->column(true); uiItemM(col, "COLLECTION_MT_exporter_add", "", ICON_ADD); uiItemIntO(col, "", ICON_REMOVE, "COLLECTION_OT_exporter_remove", "index", index); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemO(col, std::nullopt, ICON_EXPORT, "COLLECTION_OT_export_all"); uiLayoutSetEnabled(col, !BLI_listbase_is_empty(exporters)); diff --git a/source/blender/editors/interface/templates/interface_template_preview.cc b/source/blender/editors/interface/templates/interface_template_preview.cc index 47b437fb893..2d7f3338507 100644 --- a/source/blender/editors/interface/templates/interface_template_preview.cc +++ b/source/blender/editors/interface/templates/interface_template_preview.cc @@ -120,7 +120,7 @@ void uiTemplatePreview(uiLayout *layout, /* layout */ uiBlock *block = uiLayoutGetBlock(layout); uiLayout *row = &layout->row(false); - uiLayout *col = uiLayoutColumn(row, false); + uiLayout *col = &row->column(false); uiLayoutSetKeepAspect(col, true); /* add preview */ @@ -158,7 +158,7 @@ void uiTemplatePreview(uiLayout *layout, /* Create RNA Pointer */ PointerRNA material_ptr = RNA_id_pointer_create(&ma->id); - col = uiLayoutColumn(row, true); + col = &row->column(true); uiLayoutSetScaleX(col, 1.5); uiItemR(col, &material_ptr, "preview_render_type", UI_ITEM_R_EXPAND, "", ICON_NONE); diff --git a/source/blender/editors/interface/templates/interface_template_scopes.cc b/source/blender/editors/interface/templates/interface_template_scopes.cc index 085b1ded4f2..714d7e6180f 100644 --- a/source/blender/editors/interface/templates/interface_template_scopes.cc +++ b/source/blender/editors/interface/templates/interface_template_scopes.cc @@ -40,7 +40,7 @@ void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const StringRefNull hist->height = UI_UNIT_Y * 20; } - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiBlock *block = uiLayoutGetBlock(col); uiDefBut(block, UI_BTYPE_HISTOGRAM, 0, "", 0, 0, UI_UNIT_X * 10, hist->height, hist, 0, 0, ""); @@ -80,7 +80,7 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const StringRefNull p } Scopes *scopes = (Scopes *)cptr.data; - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiBlock *block = uiLayoutGetBlock(col); if (scopes->wavefrm_height < UI_UNIT_Y) { @@ -145,7 +145,7 @@ void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const StringRefNul scopes->vecscope_height = UI_UNIT_Y * 20; } - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiBlock *block = uiLayoutGetBlock(col); uiDefBut(block, diff --git a/source/blender/editors/interface/templates/interface_templates.cc b/source/blender/editors/interface/templates/interface_templates.cc index 7c3d5c0abff..a8c46e43c4d 100644 --- a/source/blender/editors/interface/templates/interface_templates.cc +++ b/source/blender/editors/interface/templates/interface_templates.cc @@ -89,7 +89,7 @@ void template_add_button_search_menu(const bContext *C, if (use_big_size) { /* Assume column layout here. To be more correct, we should check if the layout passed to * template_id is a column one, but this should work well in practice. */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); } but = uiDefBlockButN(block, diff --git a/source/blender/editors/interface/views/grid_view.cc b/source/blender/editors/interface/views/grid_view.cc index 16963f7a4d2..33ce3c94157 100644 --- a/source/blender/editors/interface/views/grid_view.cc +++ b/source/blender/editors/interface/views/grid_view.cc @@ -400,7 +400,7 @@ void GridViewLayoutBuilder::build_from_view(const bContext &C, { uiLayout *parent_layout = this->current_layout(); - uiLayout &layout = *uiLayoutColumn(parent_layout, true); + uiLayout &layout = parent_layout->column(true); const GridViewStyle &style = grid_view.get_style(); /* We might not actually know the width available for the grid view. Let's just assume that diff --git a/source/blender/editors/interface/views/tree_view.cc b/source/blender/editors/interface/views/tree_view.cc index ff0e90328dc..b12ab188867 100644 --- a/source/blender/editors/interface/views/tree_view.cc +++ b/source/blender/editors/interface/views/tree_view.cc @@ -800,10 +800,10 @@ void TreeViewLayoutBuilder::build_from_tree(AbstractTreeView &tree_view) uiLayout *col = nullptr; if (add_box_) { uiLayout *box = uiLayoutBox(&parent_layout); - col = uiLayoutColumn(box, true); + col = &box->column(true); } else { - col = uiLayoutColumn(&parent_layout, true); + col = &parent_layout.column(true); } /* Row for the tree-view and the scroll bar. */ uiLayout *row = &col->row(false); @@ -812,7 +812,7 @@ void TreeViewLayoutBuilder::build_from_tree(AbstractTreeView &tree_view) const int tot_items = count_visible_items(tree_view); /* Column for the tree view. */ - uiLayoutColumn(row, true); + row->column(true); /* Clamp scroll-value to valid range. */ if (tree_view.scroll_value_ && visible_row_count) { @@ -841,7 +841,7 @@ void TreeViewLayoutBuilder::build_from_tree(AbstractTreeView &tree_view) } if (visible_row_count && (tot_items > *visible_row_count)) { - uiLayoutColumn(row, false); + row->column(false); uiBut *but = uiDefButI(block, UI_BTYPE_SCROLL, 0, @@ -899,7 +899,7 @@ void TreeViewLayoutBuilder::build_row(AbstractTreeViewItem &item) const UI_block_emboss_set(&block_, blender::ui::EmbossType::NoneOrStatus); /* Add little margin to align actual contents vertically. */ - uiLayout *content_col = uiLayoutColumn(overlap, true); + uiLayout *content_col = &overlap->column(true); const int margin_top = (padded_item_height() - unpadded_item_height()) / 2; if (margin_top > 0) { uiDefBut(&block_, UI_BTYPE_LABEL, 0, "", 0, 0, UI_UNIT_X, margin_top, nullptr, 0, 0, ""); diff --git a/source/blender/editors/io/io_alembic.cc b/source/blender/editors/io/io_alembic.cc index f3dc7569898..d5d25dcc666 100644 --- a/source/blender/editors/io/io_alembic.cc +++ b/source/blender/editors/io/io_alembic.cc @@ -152,10 +152,10 @@ static void ui_alembic_export_settings(const bContext *C, uiLayout *layout, Poin uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "ABC_export_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "global_scale", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(panel, false); + col = &panel->column(false); if (CTX_wm_space_file(C)) { uiLayout *sub = uiLayoutColumnWithHeading(col, true, IFACE_("Include")); uiItemR(sub, ptr, "selected", UI_ITEM_NONE, IFACE_("Selection Only"), ICON_NONE); @@ -165,17 +165,17 @@ static void ui_alembic_export_settings(const bContext *C, uiLayout *layout, Poin /* Scene Options */ if (uiLayout *panel = uiLayoutPanel(C, layout, "ABC_export_scene", false, IFACE_("Scene"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); - uiLayout *sub = uiLayoutColumn(col, true); + uiLayout *sub = &col->column(true); uiItemR(sub, ptr, "start", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE); uiItemR(sub, ptr, "end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); - sub = uiLayoutColumn(col, true); + sub = &col->column(true); uiItemR(sub, ptr, "xsamples", UI_ITEM_NONE, IFACE_("Samples Transform"), ICON_NONE); uiItemR(sub, ptr, "gsamples", UI_ITEM_NONE, IFACE_("Geometry"), ICON_NONE); - sub = uiLayoutColumn(col, true); + sub = &col->column(true); uiItemR(sub, ptr, "sh_open", UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE); uiItemR(sub, ptr, "sh_close", UI_ITEM_R_SLIDER, IFACE_("Close"), ICON_NONE); @@ -190,14 +190,14 @@ static void ui_alembic_export_settings(const bContext *C, uiLayout *layout, Poin ICON_NONE); uiItemR(col, ptr, "flatten", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(panel, true); + col = &panel->column(true); uiItemR(col, ptr, "evaluation_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); } /* Object Data */ if (uiLayout *panel = uiLayoutPanel(C, layout, "ABC_export_geometry", false, IFACE_("Geometry"))) { - uiLayout *col = uiLayoutColumn(panel, true); + uiLayout *col = &panel->column(true); uiItemR(col, ptr, "uvs", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiLayout *row = &col->row(false); @@ -216,9 +216,9 @@ static void ui_alembic_export_settings(const bContext *C, uiLayout *layout, Poin uiItemR(sub, ptr, "apply_subdiv", UI_ITEM_NONE, IFACE_("Apply"), ICON_NONE); uiItemR(sub, ptr, "subdiv_schema", UI_ITEM_NONE, IFACE_("Use Schema"), ICON_NONE); - col = uiLayoutColumn(panel, false); + col = &panel->column(false); uiItemR(col, ptr, "triangulate", UI_ITEM_NONE, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "triangulate")); uiItemR(sub, ptr, "quad_method", UI_ITEM_NONE, IFACE_("Method Quads"), ICON_NONE); uiItemR(sub, ptr, "ngon_method", UI_ITEM_NONE, IFACE_("Polygons"), ICON_NONE); @@ -228,7 +228,7 @@ static void ui_alembic_export_settings(const bContext *C, uiLayout *layout, Poin if (uiLayout *panel = uiLayoutPanel( C, layout, "ABC_export_particles", false, IFACE_("Particle Systems"))) { - uiLayout *col = uiLayoutColumn(panel, true); + uiLayout *col = &panel->column(true); uiItemR(col, ptr, "export_hair", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "export_particles", UI_ITEM_NONE, std::nullopt, ICON_NONE); } @@ -570,12 +570,12 @@ static void ui_alembic_import_settings(const bContext *C, uiLayout *layout, Poin uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "ABC_import_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "scale", UI_ITEM_NONE, std::nullopt, ICON_NONE); } if (uiLayout *panel = uiLayoutPanel(C, layout, "ABC_import_options", false, IFACE_("Options"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "relative_path", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "set_frame_range", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "is_sequence", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/editors/io/io_collada.cc b/source/blender/editors/io/io_collada.cc index f529f72e5fc..7bd128e112d 100644 --- a/source/blender/editors/io/io_collada.cc +++ b/source/blender/editors/io/io_collada.cc @@ -254,9 +254,9 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) if (ui_section == BC_UI_SECTION_MAIN) { /* Export data options. */ box = uiLayoutBox(layout); - col = uiLayoutColumn(box, false); + col = &box->column(false); uiItemR(col, imfptr, "selected", UI_ITEM_NONE, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetEnabled(sub, RNA_boolean_get(imfptr, "selected")); uiItemR(sub, imfptr, "include_children", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, imfptr, "include_armatures", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -279,7 +279,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) box = uiLayoutBox(layout); uiItemL(box, IFACE_("Texture Options"), ICON_TEXTURE_DATA); - col = uiLayoutColumn(box, false); + col = &box->column(false); uiItemR(col, imfptr, "use_texture_copies", UI_ITEM_NONE, std::nullopt, ICON_NONE); row = &col->row(true, IFACE_("UV")); uiItemR(row, imfptr, "active_uv_only", UI_ITEM_NONE, IFACE_("Only Selected Map"), ICON_NONE); @@ -288,13 +288,13 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) box = uiLayoutBox(layout); uiItemL(box, IFACE_("Export Data Options"), ICON_MESH_DATA); - col = uiLayoutColumn(box, false); + col = &box->column(false); uiItemR(col, imfptr, "triangulate", UI_ITEM_NONE, std::nullopt, ICON_NONE); row = &col->row(true, IFACE_("Apply Modifiers")); uiItemR(row, imfptr, "apply_modifiers", UI_ITEM_NONE, "", ICON_NONE); - sub = uiLayoutColumn(row, false); + sub = &row->column(false); uiLayoutSetActive(sub, RNA_boolean_get(imfptr, "apply_modifiers")); uiItemR(sub, imfptr, "export_mesh_type_selection", UI_ITEM_NONE, "", ICON_NONE); @@ -320,7 +320,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) box = uiLayoutBox(layout); uiItemL(box, IFACE_("Armature Options"), ICON_ARMATURE_DATA); - col = uiLayoutColumn(box, false); + col = &box->column(false); uiItemR(col, imfptr, "deform_bones_only", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, imfptr, "open_sim", UI_ITEM_NONE, std::nullopt, ICON_NONE); } @@ -329,7 +329,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) box = uiLayoutBox(layout); uiItemR(box, imfptr, "include_animations", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(box, false); + col = &box->column(false); row = &col->row(false); uiLayoutSetActive(row, include_animations); uiItemR( @@ -353,19 +353,19 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) ICON_NONE); } - row = uiLayoutColumn(col, false); + row = &col->column(false); uiLayoutSetActive(row, include_animations && (animation_transformation_type == BC_TRANSFORMATION_TYPE_DECOMPOSED || animation_type == BC_ANIMATION_EXPORT_KEYS)); uiItemR(row, imfptr, "keep_smooth_curves", UI_ITEM_NONE, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, sampling && include_animations); uiItemR(sub, imfptr, "sampling_rate", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, imfptr, "keep_keyframes", UI_ITEM_NONE, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, include_animations); uiItemR(sub, imfptr, "keep_flat_curves", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, imfptr, "include_all_actions", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -376,7 +376,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) row = &box->row(false); uiItemL(row, IFACE_("Collada Options"), ICON_MODIFIER); - col = uiLayoutColumn(box, false); + col = &box->column(false); uiItemR(col, imfptr, "use_object_instantiation", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, imfptr, "use_blender_profile", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, imfptr, "sort_by_name", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -784,7 +784,7 @@ static void wm_collada_import_settings(uiLayout *layout, PointerRNA *imfptr) box = uiLayoutBox(layout); uiItemL(box, IFACE_("Armature Options"), ICON_ARMATURE_DATA); - col = uiLayoutColumn(box, false); + col = &box->column(false); uiItemR(col, imfptr, "fix_orientation", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, imfptr, "find_chains", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, imfptr, "auto_connect", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/editors/io/io_fbx_ops.cc b/source/blender/editors/io/io_fbx_ops.cc index c0a762f1327..c10b9574ea5 100644 --- a/source/blender/editors/io/io_fbx_ops.cc +++ b/source/blender/editors/io/io_fbx_ops.cc @@ -92,7 +92,7 @@ static void ui_fbx_import_settings(const bContext *C, uiLayout *layout, PointerR uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "FBX_import_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "global_scale", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_custom_props", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiLayoutSetEnabled(col, RNA_boolean_get(ptr, "use_custom_props")); @@ -101,7 +101,7 @@ static void ui_fbx_import_settings(const bContext *C, uiLayout *layout, PointerR if (uiLayout *panel = uiLayoutPanel(C, layout, "FBX_import_geometry", false, IFACE_("Geometry"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "use_custom_normals", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "import_subdivision", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "import_colors", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -114,14 +114,14 @@ static void ui_fbx_import_settings(const bContext *C, uiLayout *layout, PointerR uiItemR(panel.header, ptr, "use_anim", UI_ITEM_NONE, "", ICON_NONE); uiItemL(panel.header, IFACE_("Animation"), ICON_NONE); if (panel.body) { - uiLayout *col = uiLayoutColumn(panel.body, false); + uiLayout *col = &panel.body->column(false); uiItemR(col, ptr, "anim_offset", UI_ITEM_NONE, std::nullopt, ICON_NONE); } } if (uiLayout *panel = uiLayoutPanel(C, layout, "FBX_import_armature", false, IFACE_("Armature"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "ignore_leaf_bones", UI_ITEM_NONE, std::nullopt, ICON_NONE); } } diff --git a/source/blender/editors/io/io_grease_pencil.cc b/source/blender/editors/io/io_grease_pencil.cc index fd48898046a..feab81aee5e 100644 --- a/source/blender/editors/io/io_grease_pencil.cc +++ b/source/blender/editors/io/io_grease_pencil.cc @@ -177,7 +177,7 @@ static void grease_pencil_import_svg_draw(bContext * /*C*/, wmOperator *op) uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); uiLayout *box = uiLayoutBox(layout); - uiLayout *col = uiLayoutColumn(box, false); + uiLayout *col = &box->column(false); uiItemR(col, op->ptr, "resolution", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "scale", UI_ITEM_NONE, std::nullopt, ICON_NONE); } @@ -350,7 +350,7 @@ static void grease_pencil_export_svg_draw(bContext * /*C*/, wmOperator *op) row = &box->row(false); uiItemL(row, IFACE_("Export Options"), ICON_NONE); - uiLayout *col = uiLayoutColumn(box, false); + uiLayout *col = &box->column(false); uiItemR(col, op->ptr, "stroke_sample", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "use_fill", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "use_uniform_width", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -509,13 +509,13 @@ static void ui_gpencil_export_pdf_settings(uiLayout *layout, PointerRNA *imfptr) row = &box->row(false); uiItemL(row, IFACE_("Export Options"), ICON_NONE); - col = uiLayoutColumn(box, false); - sub = uiLayoutColumn(col, true); + col = &box->column(false); + sub = &col->column(true); uiItemR(sub, imfptr, "frame_mode", UI_ITEM_NONE, IFACE_("Frame"), ICON_NONE); uiLayoutSetPropSep(box, true); - sub = uiLayoutColumn(col, true); + sub = &col->column(true); uiItemR(sub, imfptr, "stroke_sample", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, imfptr, "use_fill", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, imfptr, "use_uniform_width", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/editors/io/io_obj.cc b/source/blender/editors/io/io_obj.cc index 34e0bc395ec..b38e72e36ba 100644 --- a/source/blender/editors/io/io_obj.cc +++ b/source/blender/editors/io/io_obj.cc @@ -130,7 +130,7 @@ static void ui_obj_export_settings(const bContext *C, uiLayout *layout, PointerR /* Object General options. */ if (uiLayout *panel = uiLayoutPanel(C, layout, "OBJ_export_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); if (CTX_wm_space_file(C)) { uiLayout *sub = uiLayoutColumnWithHeading(col, false, IFACE_("Include")); @@ -146,7 +146,7 @@ static void ui_obj_export_settings(const bContext *C, uiLayout *layout, PointerR /* Geometry options. */ if (uiLayout *panel = uiLayoutPanel(C, layout, "OBJ_export_geometry", false, IFACE_("Geometry"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "export_uv", UI_ITEM_NONE, IFACE_("UV Coordinates"), ICON_NONE); uiItemR(col, ptr, "export_normals", UI_ITEM_NONE, IFACE_("Normals"), ICON_NONE); uiItemR(col, ptr, "export_colors", UI_ITEM_NONE, IFACE_("Colors"), ICON_NONE); @@ -166,13 +166,13 @@ static void ui_obj_export_settings(const bContext *C, uiLayout *layout, PointerR /* Grouping options. */ if (uiLayout *panel = uiLayoutPanel(C, layout, "OBJ_export_grouping", false, IFACE_("Grouping"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "export_object_groups", UI_ITEM_NONE, IFACE_("Object Groups"), ICON_NONE); uiItemR( col, ptr, "export_material_groups", UI_ITEM_NONE, IFACE_("Material Groups"), ICON_NONE); uiItemR(col, ptr, "export_vertex_groups", UI_ITEM_NONE, IFACE_("Vertex Groups"), ICON_NONE); uiItemR(col, ptr, "export_smooth_groups", UI_ITEM_NONE, IFACE_("Smooth Groups"), ICON_NONE); - col = uiLayoutColumn(col, false); + col = &col->column(false); uiLayoutSetEnabled(col, export_smooth_groups); uiItemR(col, ptr, @@ -188,7 +188,7 @@ static void ui_obj_export_settings(const bContext *C, uiLayout *layout, PointerR uiItemR(panel.header, ptr, "export_materials", UI_ITEM_NONE, "", ICON_NONE); uiItemL(panel.header, IFACE_("Materials"), ICON_NONE); if (panel.body) { - uiLayout *col = uiLayoutColumn(panel.body, false); + uiLayout *col = &panel.body->column(false); uiLayoutSetEnabled(col, export_materials); uiItemR(col, ptr, "export_pbr_extensions", UI_ITEM_NONE, IFACE_("PBR Extensions"), ICON_NONE); @@ -201,7 +201,7 @@ static void ui_obj_export_settings(const bContext *C, uiLayout *layout, PointerR uiItemR(panel.header, ptr, "export_animation", UI_ITEM_NONE, "", ICON_NONE); uiItemL(panel.header, IFACE_("Animation"), ICON_NONE); if (panel.body) { - uiLayout *col = uiLayoutColumn(panel.body, false); + uiLayout *col = &panel.body->column(false); uiLayoutSetEnabled(col, export_animation); uiItemR(col, ptr, "start_frame", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE); @@ -459,7 +459,7 @@ static void ui_obj_import_settings(const bContext *C, uiLayout *layout, PointerR uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "OBJ_import_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "global_scale", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "clamp_size", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "forward_axis", UI_ITEM_NONE, IFACE_("Forward Axis"), ICON_NONE); @@ -467,7 +467,7 @@ static void ui_obj_import_settings(const bContext *C, uiLayout *layout, PointerR } if (uiLayout *panel = uiLayoutPanel(C, layout, "OBJ_import_options", false, IFACE_("Options"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "use_split_objects", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_split_groups", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "import_vertex_groups", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/editors/io/io_ply_ops.cc b/source/blender/editors/io/io_ply_ops.cc index 66f29fa6cac..c4960aabf51 100644 --- a/source/blender/editors/io/io_ply_ops.cc +++ b/source/blender/editors/io/io_ply_ops.cc @@ -108,7 +108,7 @@ static void wm_ply_export_draw(bContext *C, wmOperator *op) uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "PLY_export_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiLayout *sub = uiLayoutColumnWithHeading(col, false, IFACE_("Format")); uiItemR(sub, ptr, "ascii_format", UI_ITEM_NONE, IFACE_("ASCII"), ICON_NONE); @@ -127,7 +127,7 @@ static void wm_ply_export_draw(bContext *C, wmOperator *op) if (uiLayout *panel = uiLayoutPanel(C, layout, "PLY_export_geometry", false, IFACE_("Geometry"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "export_uv", UI_ITEM_NONE, IFACE_("UV Coordinates"), ICON_NONE); uiItemR(col, ptr, "export_normals", UI_ITEM_NONE, IFACE_("Vertex Normals"), ICON_NONE); @@ -291,7 +291,7 @@ static void ui_ply_import_settings(const bContext *C, uiLayout *layout, PointerR uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "PLY_import_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "global_scale", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_scene_unit", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "forward_axis", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -299,7 +299,7 @@ static void ui_ply_import_settings(const bContext *C, uiLayout *layout, PointerR } if (uiLayout *panel = uiLayoutPanel(C, layout, "PLY_import_options", false, IFACE_("Options"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "merge_verts", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "import_colors", UI_ITEM_NONE, std::nullopt, ICON_NONE); } diff --git a/source/blender/editors/io/io_stl_ops.cc b/source/blender/editors/io/io_stl_ops.cc index 90a6a349b88..ca157c42df6 100644 --- a/source/blender/editors/io/io_stl_ops.cc +++ b/source/blender/editors/io/io_stl_ops.cc @@ -84,7 +84,7 @@ static void wm_stl_export_draw(bContext *C, wmOperator *op) uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "STL_export_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiLayout *sub = uiLayoutColumnWithHeading(col, false, IFACE_("Format")); uiItemR(sub, ptr, "ascii_format", UI_ITEM_NONE, IFACE_("ASCII"), ICON_NONE); @@ -106,7 +106,7 @@ static void wm_stl_export_draw(bContext *C, wmOperator *op) if (uiLayout *panel = uiLayoutPanel(C, layout, "STL_export_geometry", false, IFACE_("Geometry"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "apply_modifiers", UI_ITEM_NONE, IFACE_("Apply Modifiers"), ICON_NONE); } } @@ -248,7 +248,7 @@ static void ui_stl_import_settings(const bContext *C, uiLayout *layout, PointerR uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "STL_import_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "global_scale", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_scene_unit", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "forward_axis", UI_ITEM_NONE, IFACE_("Forward Axis"), ICON_NONE); @@ -256,7 +256,7 @@ static void ui_stl_import_settings(const bContext *C, uiLayout *layout, PointerR } if (uiLayout *panel = uiLayoutPanel(C, layout, "STL_import_options", false, IFACE_("Options"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "use_facet_normal", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_mesh_validate", UI_ITEM_NONE, std::nullopt, ICON_NONE); } diff --git a/source/blender/editors/io/io_usd.cc b/source/blender/editors/io/io_usd.cc index 66722b1d945..71601b57782 100644 --- a/source/blender/editors/io/io_usd.cc +++ b/source/blender/editors/io/io_usd.cc @@ -448,7 +448,7 @@ static void wm_usd_export_draw(bContext *C, wmOperator *op) uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "USD_export_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "root_prim_path", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiLayout *sub = uiLayoutColumnWithHeading(col, true, IFACE_("Include")); @@ -460,7 +460,7 @@ static void wm_usd_export_draw(bContext *C, wmOperator *op) sub = uiLayoutColumnWithHeading(col, true, IFACE_("Blender Data")); uiItemR(sub, ptr, "export_custom_properties", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *props_col = uiLayoutColumn(sub, true); + uiLayout *props_col = &sub->column(true); uiItemR(props_col, ptr, "custom_properties_namespace", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(props_col, ptr, "author_blender_name", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiLayoutSetActive(props_col, RNA_boolean_get(op->ptr, "export_custom_properties")); @@ -469,7 +469,7 @@ static void wm_usd_export_draw(bContext *C, wmOperator *op) sub = uiLayoutColumnWithHeading(col, true, IFACE_("File References")); uiItemR(sub, ptr, "relative_paths", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(panel, false); + col = &panel->column(false); uiItemR(col, ptr, "convert_orientation", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (RNA_boolean_get(ptr, "convert_orientation")) { uiItemR(col, ptr, "export_global_forward_selection", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -483,14 +483,14 @@ static void wm_usd_export_draw(bContext *C, wmOperator *op) uiItemR(col, ptr, "xform_op_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(panel, false); + col = &panel->column(false); uiItemR(col, ptr, "evaluation_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); } if (uiLayout *panel = uiLayoutPanel( C, layout, "USD_export_types", false, IFACE_("Object Types"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "export_meshes", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "export_lights", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -508,7 +508,7 @@ static void wm_usd_export_draw(bContext *C, wmOperator *op) if (uiLayout *panel = uiLayoutPanel(C, layout, "USD_export_geometry", false, IFACE_("Geometry"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "export_uvmaps", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "rename_uvmaps", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "export_normals", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -524,7 +524,7 @@ static void wm_usd_export_draw(bContext *C, wmOperator *op) } if (uiLayout *panel = uiLayoutPanel(C, layout, "USD_export_rigging", true, IFACE_("Rigging"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "export_shapekeys", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "export_armatures", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -543,10 +543,10 @@ static void wm_usd_export_draw(bContext *C, wmOperator *op) const bool export_materials = RNA_boolean_get(ptr, "export_materials"); uiLayoutSetActive(panel.body, export_materials); - uiLayout *col = uiLayoutColumn(panel.body, false); + uiLayout *col = &panel.body->column(false); uiItemR(col, ptr, "generate_preview_surface", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "generate_materialx_network", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(panel.body, true); + col = &panel.body->column(true); uiLayoutSetPropSep(col, true); uiItemR(col, ptr, "export_textures_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -554,7 +554,7 @@ static void wm_usd_export_draw(bContext *C, wmOperator *op) const eUSDTexExportMode textures_mode = eUSDTexExportMode( RNA_enum_get(op->ptr, "export_textures_mode")); - uiLayout *col2 = uiLayoutColumn(col, true); + uiLayout *col2 = &col->column(true); uiLayoutSetPropSep(col2, true); uiLayoutSetEnabled(col2, textures_mode == USD_TEX_EXPORT_NEW_PATH); uiItemR(col2, ptr, "overwrite_textures", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -568,7 +568,7 @@ static void wm_usd_export_draw(bContext *C, wmOperator *op) if (uiLayout *panel = uiLayoutPanel( C, layout, "USD_export_experimental", true, IFACE_("Experimental"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "use_instancing", UI_ITEM_NONE, std::nullopt, ICON_NONE); } } @@ -1096,7 +1096,7 @@ static void wm_usd_import_draw(bContext *C, wmOperator *op) uiLayoutSetPropDecorate(layout, false); if (uiLayout *panel = uiLayoutPanel(C, layout, "USD_import_general", false, IFACE_("General"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "prim_path_mask", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -1104,7 +1104,7 @@ static void wm_usd_import_draw(bContext *C, wmOperator *op) uiItemR(sub, ptr, "import_visible_only", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, ptr, "import_defined_only", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(panel, false); + col = &panel->column(false); uiItemR(col, ptr, "set_frame_range", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "create_collection", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "relative_path", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -1118,7 +1118,7 @@ static void wm_usd_import_draw(bContext *C, wmOperator *op) if (uiLayout *panel = uiLayoutPanel( C, layout, "USD_import_types", false, IFACE_("Object Types"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "import_cameras", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "import_curves", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "import_lights", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -1145,26 +1145,26 @@ static void wm_usd_import_draw(bContext *C, wmOperator *op) if (uiLayout *panel = uiLayoutPanel(C, layout, "USD_import_geometry", true, IFACE_("Geometry"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "read_mesh_uvs", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "read_mesh_colors", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "read_mesh_attributes", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "import_subdiv", UI_ITEM_NONE, IFACE_("Subdivision"), ICON_NONE); - col = uiLayoutColumn(panel, false); + col = &panel->column(false); uiItemR(col, ptr, "validate_meshes", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "merge_parent_xform", UI_ITEM_NONE, std::nullopt, ICON_NONE); } if (uiLayout *panel = uiLayoutPanel(C, layout, "USD_import_rigging", true, IFACE_("Rigging"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "import_blendshapes", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "import_skeletons", UI_ITEM_NONE, std::nullopt, ICON_NONE); } if (uiLayout *panel = uiLayoutPanel(C, layout, "USD_import_material", true, IFACE_("Materials"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "import_all_materials", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "import_usd_preview", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -1177,7 +1177,7 @@ static void wm_usd_import_draw(bContext *C, wmOperator *op) } if (uiLayout *panel = uiLayoutPanel(C, layout, "USD_import_texture", true, IFACE_("Textures"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "import_textures_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); bool copy_textures = RNA_enum_get(op->ptr, "import_textures_mode") == USD_TEX_IMPORT_COPY; @@ -1194,7 +1194,7 @@ static void wm_usd_import_draw(bContext *C, wmOperator *op) if (uiLayout *panel = uiLayoutPanel( C, layout, "USD_import_instancing", true, IFACE_("Particles and Instancing"))) { - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiItemR(col, ptr, "support_scene_instancing", UI_ITEM_NONE, std::nullopt, ICON_NONE); } } diff --git a/source/blender/editors/mesh/editmesh_attribute.cc b/source/blender/editors/mesh/editmesh_attribute.cc index 82c437e6fe1..6a799b5f178 100644 --- a/source/blender/editors/mesh/editmesh_attribute.cc +++ b/source/blender/editors/mesh/editmesh_attribute.cc @@ -240,7 +240,7 @@ static wmOperatorStatus mesh_set_attribute_invoke(bContext *C, static void mesh_set_attribute_ui(bContext *C, wmOperator *op) { - uiLayout *layout = uiLayoutColumn(op->layout, true); + uiLayout *layout = &op->layout->column(true); uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); diff --git a/source/blender/editors/mesh/editmesh_bevel.cc b/source/blender/editors/mesh/editmesh_bevel.cc index fe25bb43841..dd1b5109102 100644 --- a/source/blender/editors/mesh/editmesh_bevel.cc +++ b/source/blender/editors/mesh/editmesh_bevel.cc @@ -924,7 +924,7 @@ static void edbm_bevel_ui(bContext *C, wmOperator *op) } uiItemR(layout, op->ptr, "material", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, op->ptr, "harden_normals", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "clamp_overlap", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "loop_slide", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -936,7 +936,7 @@ static void edbm_bevel_ui(bContext *C, wmOperator *op) uiItemS(layout); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, affect_type == BEVEL_AFFECT_EDGES); uiItemR(col, op->ptr, "miter_outer", UI_ITEM_NONE, IFACE_("Miter Outer"), ICON_NONE); uiItemR(col, op->ptr, "miter_inner", UI_ITEM_NONE, IFACE_("Inner"), ICON_NONE); @@ -946,7 +946,7 @@ static void edbm_bevel_ui(bContext *C, wmOperator *op) uiItemS(layout); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, affect_type == BEVEL_AFFECT_EDGES); uiItemR(col, op->ptr, "vmesh_method", UI_ITEM_NONE, IFACE_("Intersection Type"), ICON_NONE); diff --git a/source/blender/editors/mesh/editmesh_tools.cc b/source/blender/editors/mesh/editmesh_tools.cc index 79561689c90..507af835acc 100644 --- a/source/blender/editors/mesh/editmesh_tools.cc +++ b/source/blender/editors/mesh/editmesh_tools.cc @@ -5735,7 +5735,7 @@ static void edbm_decimate_ui(bContext * /*C*/, wmOperator *op) uiItemR(layout, op->ptr, "ratio", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(layout, op->ptr, "use_vertex_group", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(op->ptr, "use_vertex_group")); uiItemR(col, op->ptr, "vertex_group_factor", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "invert_vertex_group", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/editors/object/add_modifier_assets.cc b/source/blender/editors/object/add_modifier_assets.cc index 3f95e69fc40..f936c1576a7 100644 --- a/source/blender/editors/object/add_modifier_assets.cc +++ b/source/blender/editors/object/add_modifier_assets.cc @@ -418,7 +418,7 @@ void ui_template_modifier_asset_menu_items(uiLayout &layout, const StringRef cat return; } uiItemS(&layout); - uiLayout *col = uiLayoutColumn(&layout, false); + uiLayout *col = &layout.column(false); uiLayoutSetContextString(col, "asset_catalog_path", item->catalog_path().str()); uiItemMContents(col, "OBJECT_MT_add_modifier_catalog_assets"); } diff --git a/source/blender/editors/object/object_edit.cc b/source/blender/editors/object/object_edit.cc index 5a7387d85d7..47a0364b8a1 100644 --- a/source/blender/editors/object/object_edit.cc +++ b/source/blender/editors/object/object_edit.cc @@ -1930,7 +1930,7 @@ static void shade_auto_smooth_ui(bContext * /*C*/, wmOperator *op) uiItemR(layout, op->ptr, "use_auto_smooth", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(op->ptr, "use_auto_smooth")); uiItemR(layout, op->ptr, "angle", UI_ITEM_NONE, std::nullopt, ICON_NONE); } diff --git a/source/blender/editors/pointcloud/intern/attribute_set.cc b/source/blender/editors/pointcloud/intern/attribute_set.cc index d0385a5dfe5..01b9148c5bd 100644 --- a/source/blender/editors/pointcloud/intern/attribute_set.cc +++ b/source/blender/editors/pointcloud/intern/attribute_set.cc @@ -169,7 +169,7 @@ static wmOperatorStatus set_attribute_invoke(bContext *C, wmOperator *op, const static void set_attribute_ui(bContext *C, wmOperator *op) { - uiLayout *layout = uiLayoutColumn(op->layout, true); + uiLayout *layout = &op->layout->column(true); uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); diff --git a/source/blender/editors/screen/screen_ops.cc b/source/blender/editors/screen/screen_ops.cc index 90da80b4d6f..321a344ded3 100644 --- a/source/blender/editors/screen/screen_ops.cc +++ b/source/blender/editors/screen/screen_ops.cc @@ -5219,7 +5219,7 @@ void ED_screens_header_tools_menu_create(bContext *C, uiLayout *layout, void * / } ARegion *region_header = BKE_area_find_region_type(area, RGN_TYPE_HEADER); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetActive(col, (region_header->flag & RGN_FLAG_HIDDEN) == 0); if (BKE_area_find_region_type(area, RGN_TYPE_TOOL_HEADER)) { diff --git a/source/blender/editors/sculpt_paint/grease_pencil_interpolate.cc b/source/blender/editors/sculpt_paint/grease_pencil_interpolate.cc index 4074474bc2e..a527628b654 100644 --- a/source/blender/editors/sculpt_paint/grease_pencil_interpolate.cc +++ b/source/blender/editors/sculpt_paint/grease_pencil_interpolate.cc @@ -1472,7 +1472,7 @@ static void grease_pencil_interpolate_sequence_ui(bContext *C, wmOperator *op) row = &layout->row(true); uiItemR(row, op->ptr, "flip", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, op->ptr, "smooth_factor", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "smooth_steps", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.cc b/source/blender/editors/sculpt_paint/paint_image_proj.cc index 6e183ac7272..635dbc74b41 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.cc +++ b/source/blender/editors/sculpt_paint/paint_image_proj.cc @@ -6877,7 +6877,7 @@ static void texture_paint_add_texture_paint_slot_ui(bContext *C, wmOperator *op) switch (slot_type) { case PAINT_CANVAS_SOURCE_IMAGE: { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemR(col, op->ptr, "width", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "height", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/editors/space_clip/clip_buttons.cc b/source/blender/editors/space_clip/clip_buttons.cc index b810f9dbb09..70c35c21081 100644 --- a/source/blender/editors/space_clip/clip_buttons.cc +++ b/source/blender/editors/space_clip/clip_buttons.cc @@ -137,7 +137,7 @@ void uiTemplateMovieClip(uiLayout *layout, uiItemR(row, &clipptr, "filepath", UI_ITEM_NONE, "", ICON_NONE); uiItemO(row, "", ICON_FILE_REFRESH, "clip.reload"); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiTemplateColorspaceSettings(col, &clipptr, "colorspace_settings"); } } @@ -177,7 +177,7 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const StringRefNull prop scopes->track_preview_height = UI_UNIT_Y * 20; } - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiBlock *block = uiLayoutGetBlock(col); uiDefBut(block, @@ -517,7 +517,7 @@ void uiTemplateMarker(uiLayout *layout, 0, tip); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0); block = uiLayoutAbsoluteBlock(col); @@ -751,7 +751,7 @@ void uiTemplateMovieclipInformation(uiLayout *layout, MovieClip *clip = static_cast(clipptr.data); MovieClipUser *user = static_cast(userptr->data); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetAlignment(col, UI_LAYOUT_ALIGN_RIGHT); /* NOTE: Put the frame to cache. If the panel is drawn, the display will also be shown, as well diff --git a/source/blender/editors/space_file/file_panels.cc b/source/blender/editors/space_file/file_panels.cc index 81430678433..792262a977b 100644 --- a/source/blender/editors/space_file/file_panels.cc +++ b/source/blender/editors/space_file/file_panels.cc @@ -228,7 +228,7 @@ static void file_panel_asset_catalog_buttons_draw(const bContext *C, Panel *pane FileAssetSelectParams *params = ED_fileselect_get_asset_params(sfile); BLI_assert(params != nullptr); - uiLayout *col = uiLayoutColumn(panel->layout, false); + uiLayout *col = &panel->layout->column(false); uiLayout *row = &col->row(true); PointerRNA params_ptr = RNA_pointer_create_discrete( diff --git a/source/blender/editors/space_graph/graph_buttons.cc b/source/blender/editors/space_graph/graph_buttons.cc index f319137823a..066ac3f2fcd 100644 --- a/source/blender/editors/space_graph/graph_buttons.cc +++ b/source/blender/editors/space_graph/graph_buttons.cc @@ -122,7 +122,7 @@ static void graph_panel_cursor_header(const bContext *C, Panel *panel) PointerRNA spaceptr = RNA_pointer_create_discrete(&screen->id, &RNA_SpaceGraphEditor, sipo); /* 2D-Cursor */ - col = uiLayoutColumn(panel->layout, false); + col = &panel->layout->column(false); uiItemR(col, &spaceptr, "show_cursor", UI_ITEM_NONE, "", ICON_NONE); } @@ -142,10 +142,10 @@ static void graph_panel_cursor(const bContext *C, Panel *panel) uiLayoutSetPropDecorate(layout, false); /* 2D-Cursor */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(&spaceptr, "show_cursor")); - sub = uiLayoutColumn(col, true); + sub = &col->column(true); if (sipo->mode == SIPO_MODE_DRIVERS) { uiItemR(sub, &spaceptr, "cursor_position_x", UI_ITEM_NONE, IFACE_("Cursor X"), ICON_NONE); } @@ -155,7 +155,7 @@ static void graph_panel_cursor(const bContext *C, Panel *panel) uiItemR(sub, &spaceptr, "cursor_position_y", UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); - sub = uiLayoutColumn(col, true); + sub = &col->column(true); uiItemO(sub, IFACE_("Cursor to Selection"), ICON_NONE, "GRAPH_OT_frame_jump"); uiItemO(sub, IFACE_("Cursor Value to Selection"), ICON_NONE, "GRAPH_OT_snap_cursor_value"); } @@ -183,7 +183,7 @@ static void graph_panel_properties(const bContext *C, Panel *panel) PointerRNA fcu_ptr = RNA_pointer_create_discrete(ale->fcurve_owner_id, &RNA_FCurve, fcu); /* user-friendly 'name' for F-Curve */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); if (ale->type == ANIMTYPE_FCURVE) { /* get user-friendly name for F-Curve */ const std::optional optional_icon = getname_anim_fcurve(name, ale->id, fcu); @@ -221,13 +221,13 @@ static void graph_panel_properties(const bContext *C, Panel *panel) uiLayoutSetPropDecorate(layout, false); /* RNA-Path Editing - only really should be enabled when things aren't working */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetEnabled(col, (fcu->flag & FCURVE_DISABLED) != 0); uiItemR(col, &fcu_ptr, "data_path", UI_ITEM_NONE, "", ICON_RNA); uiItemR(col, &fcu_ptr, "array_index", UI_ITEM_NONE, std::nullopt, ICON_NONE); /* color settings */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, &fcu_ptr, "color_mode", UI_ITEM_NONE, IFACE_("Display Color"), ICON_NONE); if (fcu->color_mode == FCURVE_COLOR_CUSTOM) { @@ -235,7 +235,7 @@ static void graph_panel_properties(const bContext *C, Panel *panel) } /* smoothing setting */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, &fcu_ptr, "auto_smoothing", UI_ITEM_NONE, IFACE_("Handle Smoothing"), ICON_NONE); MEM_freeN(ale); @@ -386,7 +386,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel) } /* interpolation */ - col = uiLayoutColumn(layout, false); + col = &layout->column(false); if (fcu->flag & FCURVE_DISCRETE_VALUES) { uiLayout *split = uiLayoutSplit(col, 0.33f, true); uiItemL(split, IFACE_("Interpolation:"), ICON_NONE); @@ -404,11 +404,11 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel) /* easing extra */ switch (bezt->ipo) { case BEZT_IPO_BACK: - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, &bezt_ptr, "back", UI_ITEM_NONE, std::nullopt, ICON_NONE); break; case BEZT_IPO_ELASTIC: - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, &bezt_ptr, "amplitude", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, &bezt_ptr, "period", UI_ITEM_NONE, std::nullopt, ICON_NONE); break; @@ -420,7 +420,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel) * - we use the button-versions of the calls so that we can attach special update handlers * and unit conversion magic that cannot be achieved using a purely RNA-approach */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); /* keyframe itself */ { uiItemL_respect_property_split(col, IFACE_("Key Frame"), ICON_NONE); @@ -462,7 +462,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel) /* previous handle - only if previous was Bezier interpolation */ if ((prevbezt) && (prevbezt->ipo == BEZT_IPO_BEZ)) { - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemL_respect_property_split(col, IFACE_("Left Handle Type"), ICON_NONE); but = uiDefButR(block, UI_BTYPE_MENU, @@ -520,7 +520,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel) if (bezt->ipo == BEZT_IPO_BEZ) { /* NOTE: special update callbacks are needed on the coords here due to #39911 */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemL_respect_property_split(col, IFACE_("Right Handle Type"), ICON_NONE); but = uiDefButR(block, UI_BTYPE_MENU, @@ -762,7 +762,7 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa PointerRNA root_ptr = RNA_id_pointer_create(dtar->id); /* rna path */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetRedAlert(col, (dtar->flag & (DTAR_FLAG_INVALID | DTAR_FLAG_FALLBACK_USED))); uiTemplatePathBuilder(col, &dtar_ptr, @@ -790,7 +790,7 @@ static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar * PointerRNA dtar2_ptr = RNA_pointer_create_discrete(id, &RNA_DriverTarget, dtar2); /* Object 1 */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiItemR(col, &dtar_ptr, "id", UI_ITEM_NONE, IFACE_("Object 1"), ICON_NONE); @@ -800,7 +800,7 @@ static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar * } /* Object 2 */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetRedAlert(col, (dtar2->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiItemR(col, &dtar2_ptr, "id", UI_ITEM_NONE, IFACE_("Object 2"), ICON_NONE); @@ -824,7 +824,7 @@ static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar * PointerRNA dtar2_ptr = RNA_pointer_create_discrete(id, &RNA_DriverTarget, dtar2); /* Object 1 */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiItemR(col, &dtar_ptr, "id", UI_ITEM_NONE, IFACE_("Object 1"), ICON_NONE); @@ -840,7 +840,7 @@ static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar * uiItemR(col, &dtar_ptr, "transform_space", UI_ITEM_NONE, std::nullopt, ICON_NONE); /* Object 2 */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetRedAlert(col, (dtar2->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiItemR(col, &dtar2_ptr, "id", UI_ITEM_NONE, IFACE_("Object 2"), ICON_NONE); @@ -867,7 +867,7 @@ static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar PointerRNA dtar_ptr = RNA_pointer_create_discrete(id, &RNA_DriverTarget, dtar); /* properties */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiItemR(col, &dtar_ptr, "id", UI_ITEM_NONE, IFACE_("Object"), ICON_NONE); @@ -877,7 +877,7 @@ static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar col, &dtar_ptr, "bone_target", &tar_ptr, "bones", IFACE_("Bone"), ICON_BONE_DATA); } - sub = uiLayoutColumn(layout, true); + sub = &layout->column(true); uiItemR(sub, &dtar_ptr, "transform_type", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (ELEM(dtar->transChan, @@ -908,7 +908,7 @@ static void graph_panel_driverVar__contextProp(uiLayout *layout, ID *id, DriverV /* Target Path */ { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayoutSetRedAlert(col, (dtar->flag & (DTAR_FLAG_INVALID | DTAR_FLAG_FALLBACK_USED))); uiTemplatePathBuilder(col, &dtar_ptr, @@ -1009,7 +1009,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, /* driver-level settings - type, expressions, and errors */ PointerRNA driver_ptr = RNA_pointer_create_discrete(id, &RNA_Driver, driver); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); block = uiLayoutGetBlock(col); uiItemR(col, &driver_ptr, "type", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -1034,7 +1034,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, /* expression */ /* TODO: "Show syntax hints" button */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); block = uiLayoutGetBlock(col); uiItemL(col, IFACE_("Expression:"), ICON_NONE); @@ -1042,7 +1042,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, uiItemR(col, &driver_ptr, "use_self", UI_ITEM_NONE, std::nullopt, ICON_NONE); /* errors? */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); block = uiLayoutGetBlock(col); if (driver->flag & DRIVER_FLAG_PYTHON_BLOCKED) { @@ -1072,7 +1072,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, } else { /* errors? */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); block = uiLayoutGetBlock(col); if (driver->flag & DRIVER_FLAG_INVALID) { @@ -1138,7 +1138,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, uiLayout *subrow, *sub; /* sub-layout column for this variable's settings */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); /* 1) header panel */ box = uiLayoutBox(col); diff --git a/source/blender/editors/space_image/image_buttons.cc b/source/blender/editors/space_image/image_buttons.cc index 8686b672672..2155f82ee45 100644 --- a/source/blender/editors/space_image/image_buttons.cc +++ b/source/blender/editors/space_image/image_buttons.cc @@ -170,7 +170,7 @@ static void ui_imageuser_layer_menu(bContext * /*C*/, uiLayout *layout, void *rn } UI_block_layout_set_current(block, layout); - uiLayoutColumn(layout, false); + layout->column(false); const char *fake_name = ui_imageuser_layer_fake_name(rr); if (fake_name) { @@ -245,7 +245,7 @@ static void ui_imageuser_pass_menu(bContext * /*C*/, uiLayout *layout, void *rnd rl = static_cast(BLI_findlink(&rr->layers, rpass_index)); UI_block_layout_set_current(block, layout); - uiLayoutColumn(layout, false); + layout->column(false); nr = (rl == nullptr) ? 1 : 0; @@ -316,7 +316,7 @@ static void ui_imageuser_view_menu_rr(bContext * /*C*/, uiLayout *layout, void * } UI_block_layout_set_current(block, layout); - uiLayoutColumn(layout, false); + layout->column(false); uiDefBut(block, UI_BTYPE_LABEL, @@ -364,7 +364,7 @@ static void ui_imageuser_view_menu_multiview(bContext * /*C*/, uiLayout *layout, ImageView *iv; UI_block_layout_set_current(block, layout); - uiLayoutColumn(layout, false); + layout->column(false); uiDefBut(block, UI_BTYPE_LABEL, @@ -815,13 +815,13 @@ void uiTemplateImage(uiLayout *layout, uiItemS(layout); } - layout = uiLayoutColumn(layout, false); + layout = &layout->column(false); uiLayoutSetEnabled(layout, !is_dirty); uiLayoutSetPropDecorate(layout, false); /* Image source */ { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetPropSep(col, true); uiItemR(col, &imaptr, "source", UI_ITEM_NONE, std::nullopt, ICON_NONE); } @@ -855,10 +855,10 @@ void uiTemplateImage(uiLayout *layout, uiItemS(layout); /* Generated */ - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetPropSep(col, true); - uiLayout *sub = uiLayoutColumn(col, true); + uiLayout *sub = &col->column(true); uiItemR(sub, &imaptr, "generated_width", UI_ITEM_NONE, "X", ICON_NONE); uiItemR(sub, &imaptr, "generated_height", UI_ITEM_NONE, "Y", ICON_NONE); @@ -886,10 +886,10 @@ void uiTemplateImage(uiLayout *layout, /* Animation */ uiItemS(layout); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayoutSetPropSep(col, true); - uiLayout *sub = uiLayoutColumn(col, true); + uiLayout *sub = &col->column(true); uiLayout *row = &sub->row(true); uiItemR(row, userptr, "frame_duration", UI_ITEM_NONE, IFACE_("Frames"), ICON_NONE); uiItemO(row, "", ICON_FILE_REFRESH, "IMAGE_OT_match_movie_length"); @@ -910,7 +910,7 @@ void uiTemplateImage(uiLayout *layout, if ((scene->r.scemode & R_MULTIVIEW) != 0) { uiItemS(layout); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetPropSep(col, true); uiItemR(col, &imaptr, "use_multiview", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -924,14 +924,14 @@ void uiTemplateImage(uiLayout *layout, { uiItemS(layout); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetPropSep(col, true); uiTemplateColorspaceSettings(col, &imaptr, "colorspace_settings"); if (compact == 0) { if (ima->source != IMA_SRC_GENERATED) { if (BKE_image_has_alpha(ima)) { - uiLayout *sub = uiLayoutColumn(col, false); + uiLayout *sub = &col->column(false); uiItemR(sub, &imaptr, "alpha_mode", UI_ITEM_NONE, IFACE_("Alpha"), ICON_NONE); bool is_data = IMB_colormanagement_space_name_is_data(ima->colorspace_settings.name); @@ -970,7 +970,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_ma uiLayout *col; - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetPropSep(col, true); uiLayoutSetPropDecorate(col, false); @@ -1067,7 +1067,7 @@ void uiTemplateImageStereo3d(uiLayout *layout, PointerRNA *stereo3d_format_ptr) Stereo3dFormat *stereo3d_format = static_cast(stereo3d_format_ptr->data); uiLayout *col; - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, stereo3d_format_ptr, "display_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); switch (stereo3d_format->display_mode) { @@ -1104,7 +1104,7 @@ static void uiTemplateViewsFormat(uiLayout *layout, { uiLayout *col; - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetPropSep(col, true); uiLayoutSetPropDecorate(col, false); @@ -1188,7 +1188,7 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i void *lock; ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, &lock); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayoutSetAlignment(col, UI_LAYOUT_ALIGN_RIGHT); if (ibuf == nullptr) { diff --git a/source/blender/editors/space_image/image_ops.cc b/source/blender/editors/space_image/image_ops.cc index cee405cbf04..2dad9af817e 100644 --- a/source/blender/editors/space_image/image_ops.cc +++ b/source/blender/editors/space_image/image_ops.cc @@ -2066,7 +2066,7 @@ static void image_save_as_draw(bContext * /*C*/, wmOperator *op) if (!save_as_render) { PointerRNA linear_settings_ptr = RNA_pointer_get(&imf_ptr, "linear_colorspace_settings"); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemS(col); uiItemR(col, &linear_settings_ptr, "name", UI_ITEM_NONE, IFACE_("Color Space"), ICON_NONE); } @@ -2702,7 +2702,7 @@ static void image_new_draw(bContext * /*C*/, wmOperator *op) uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, op->ptr, "name", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "width", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "height", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -4251,7 +4251,7 @@ static void draw_fill_tile(PointerRNA *ptr, uiLayout *layout) uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, ptr, "color", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "width", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "height", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -4398,7 +4398,7 @@ static void tile_add_draw(bContext * /*C*/, wmOperator *op) uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, op->ptr, "number", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "count", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, op->ptr, "label", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/editors/space_nla/nla_buttons.cc b/source/blender/editors/space_nla/nla_buttons.cc index 3ee96e0c024..021473f632b 100644 --- a/source/blender/editors/space_nla/nla_buttons.cc +++ b/source/blender/editors/space_nla/nla_buttons.cc @@ -333,7 +333,7 @@ static void nla_panel_animdata(const bContext *C, Panel *panel) /* Active Action Properties ------------------------------------- */ /* action */ - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiTemplateID(col, C, &adt_ptr, "action", "ACTION_OT_new", nullptr, "NLA_OT_action_unlink"); uiTemplateSearch(col, C, @@ -419,7 +419,7 @@ static void nla_panel_properties(const bContext *C, Panel *panel) uiLayoutSetPropDecorate(layout, false); /* strip extents */ - column = uiLayoutColumn(layout, true); + column = &layout->column(true); uiItemR(column, &strip_ptr, "frame_start_ui", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE); uiItemR(column, &strip_ptr, "frame_end_ui", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); @@ -433,7 +433,7 @@ static void nla_panel_properties(const bContext *C, Panel *panel) /* only show if allowed to... */ if (showEvalProps) { /* extrapolation */ - column = uiLayoutColumn(layout, false); + column = &layout->column(false); uiItemR(column, &strip_ptr, "extrapolation", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(column, &strip_ptr, "blend_type", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -443,7 +443,7 @@ static void nla_panel_properties(const bContext *C, Panel *panel) uiItemS(layout); - column = uiLayoutColumn(layout, true); + column = &layout->column(true); uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_auto_blend") == false); uiItemR(column, &strip_ptr, "blend_in", UI_ITEM_NONE, IFACE_("Blend In"), ICON_NONE); uiItemR(column, &strip_ptr, "blend_out", UI_ITEM_NONE, IFACE_("Out"), ICON_NONE); @@ -489,7 +489,7 @@ static void nla_panel_actclip(const bContext *C, Panel *panel) /* Strip Properties ------------------------------------- */ /* action pointer */ - column = uiLayoutColumn(layout, true); + column = &layout->column(true); uiItemR(column, &strip_ptr, "action", UI_ITEM_NONE, std::nullopt, ICON_ACTION); NlaStrip *strip = static_cast(strip_ptr.data); @@ -515,7 +515,7 @@ static void nla_panel_actclip(const bContext *C, Panel *panel) } /* action extents */ - column = uiLayoutColumn(layout, true); + column = &layout->column(true); uiItemR( column, &strip_ptr, "action_frame_start", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE); uiItemR(column, &strip_ptr, "action_frame_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); @@ -525,7 +525,7 @@ static void nla_panel_actclip(const bContext *C, Panel *panel) uiItemO(row, IFACE_("Now"), ICON_FILE_REFRESH, "NLA_OT_action_sync_length"); /* action usage */ - column = uiLayoutColumn(layout, true); + column = &layout->column(true); uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == false); uiItemR(column, &strip_ptr, "scale", UI_ITEM_NONE, IFACE_("Playback Scale"), ICON_NONE); uiItemR(column, &strip_ptr, "repeat", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -547,7 +547,7 @@ static void nla_panel_animated_influence_header(const bContext *C, Panel *panel) block = uiLayoutGetBlock(layout); UI_block_func_handle_set(block, do_nla_region_buttons, nullptr); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, &strip_ptr, "use_animated_influence", UI_ITEM_NONE, "", ICON_NONE); } @@ -586,7 +586,7 @@ static void nla_panel_animated_strip_time_header(const bContext *C, Panel *panel block = uiLayoutGetBlock(layout); UI_block_func_handle_set(block, do_nla_region_buttons, nullptr); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, &strip_ptr, "use_animated_time", UI_ITEM_NONE, "", ICON_NONE); } diff --git a/source/blender/editors/space_node/add_menu_assets.cc b/source/blender/editors/space_node/add_menu_assets.cc index 023de805932..43007f9b307 100644 --- a/source/blender/editors/space_node/add_menu_assets.cc +++ b/source/blender/editors/space_node/add_menu_assets.cc @@ -324,7 +324,7 @@ void ui_template_node_asset_menu_items(uiLayout &layout, if (!item) { return; } - uiLayout *col = uiLayoutColumn(&layout, false); + uiLayout *col = &layout.column(false); uiLayoutSetContextString(col, "asset_catalog_path", item->catalog_path().str()); uiItemMContents(col, "NODE_MT_node_add_catalog_assets"); } diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index bae681876ee..54b3ba3a840 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -107,7 +107,7 @@ static void node_buts_rgb(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) uiLayout *col; PointerRNA sockptr = RNA_pointer_create_discrete(ptr->owner_id, &RNA_NodeSocket, output); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiTemplateColorPicker(col, &sockptr, "default_value", true, false, false, false); uiItemR(col, &sockptr, "default_value", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE); } @@ -116,7 +116,7 @@ static void node_buts_mix_rgb(uiLayout *layout, bContext * /*C*/, PointerRNA *pt { bNodeTree *ntree = (bNodeTree *)ptr->owner_id; - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayout *row = &col->row(true); uiItemR(row, ptr, "blend_type", DEFAULT_FLAGS, "", ICON_NONE); if (ELEM(ntree->type, NTREE_COMPOSIT, NTREE_TEXTURE)) { @@ -319,7 +319,7 @@ static void node_buts_image_user(uiLayout *layout, } ImageUser *iuser = (ImageUser *)iuserptr->data; - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, imaptr, "source", DEFAULT_FLAGS, "", ICON_NONE); @@ -337,7 +337,7 @@ static void node_buts_image_user(uiLayout *layout, } if (ELEM(source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) { - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "frame_duration", DEFAULT_FLAGS, std::nullopt, ICON_NONE); uiItemR(col, ptr, "frame_start", DEFAULT_FLAGS, std::nullopt, ICON_NONE); uiItemR(col, ptr, "frame_offset", DEFAULT_FLAGS, std::nullopt, ICON_NONE); @@ -348,7 +348,7 @@ static void node_buts_image_user(uiLayout *layout, if (show_layer_selection && RNA_enum_get(imaptr, "type") == IMA_TYPE_MULTILAYER && RNA_boolean_get(ptr, "has_layers")) { - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "layer", DEFAULT_FLAGS, std::nullopt, ICON_NONE); } @@ -520,7 +520,7 @@ static void node_buts_image_views(uiLayout *layout, return; } - col = uiLayoutColumn(layout, false); + col = &layout->column(false); if (RNA_boolean_get(ptr, "has_views")) { if (RNA_enum_get(ptr, "view") == 0) { @@ -595,7 +595,7 @@ static void node_composit_buts_cryptomatte_legacy(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemL(col, IFACE_("Matte Objects:"), ICON_NONE); @@ -621,7 +621,7 @@ static void node_composit_buts_cryptomatte(uiLayout *layout, bContext *C, Pointe uiLayout *row = &layout->row(true); uiItemR(row, ptr, "source", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, std::nullopt, ICON_NONE); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); if (node->custom1 == CMP_NODE_CRYPTOMATTE_SOURCE_RENDER) { uiTemplateID(col, C, ptr, "scene", nullptr, nullptr, nullptr); } @@ -638,7 +638,7 @@ static void node_composit_buts_cryptomatte(uiLayout *layout, bContext *C, Pointe node_buts_image_views(col, C, ptr, &imaptr); } - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "layer_name", UI_ITEM_NONE, "", ICON_NONE); uiItemL(col, IFACE_("Matte ID:"), ICON_NONE); @@ -710,11 +710,11 @@ static void node_texture_buts_bricks(uiLayout *layout, bContext * /*C*/, Pointer { uiLayout *col; - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "offset", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, IFACE_("Offset"), ICON_NONE); uiItemR(col, ptr, "offset_frequency", DEFAULT_FLAGS, IFACE_("Frequency"), ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "squash", DEFAULT_FLAGS, IFACE_("Squash"), ICON_NONE); uiItemR(col, ptr, "squash_frequency", DEFAULT_FLAGS, IFACE_("Frequency"), ICON_NONE); } @@ -728,7 +728,7 @@ static void node_texture_buts_proc(uiLayout *layout, bContext * /*C*/, PointerRN PointerRNA tex_ptr = RNA_pointer_create_discrete(id, &RNA_Texture, tex); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); switch (tex->type) { case TEX_BLEND: @@ -1282,7 +1282,7 @@ static void std_node_socket_draw( uiItemR(layout, ptr, "default_value", DEFAULT_FLAGS, "", ICON_NONE); } else { - uiLayout *column = uiLayoutColumn(layout, false); + uiLayout *column = &layout->column(false); { uiLayout *row = &column->row(true); draw_node_socket_name_editable(row, sock, text); @@ -1296,7 +1296,7 @@ static void std_node_socket_draw( } break; case SOCK_ROTATION: { - uiLayout *column = uiLayoutColumn(layout, false); + uiLayout *column = &layout->column(false); { uiLayout *row = &column->row(true); draw_node_socket_name_editable(row, sock, text); @@ -1451,13 +1451,13 @@ static void std_node_socket_interface_draw(ID *id, BLI_assert(typeinfo != nullptr); eNodeSocketDatatype type = eNodeSocketDatatype(typeinfo->type); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); switch (type) { case SOCK_FLOAT: { uiItemR(col, &ptr, "subtype", DEFAULT_FLAGS, IFACE_("Subtype"), ICON_NONE); uiItemR(col, &ptr, "default_value", DEFAULT_FLAGS, IFACE_("Default"), ICON_NONE); - uiLayout *sub = uiLayoutColumn(col, true); + uiLayout *sub = &col->column(true); uiItemR(sub, &ptr, "min_value", DEFAULT_FLAGS, IFACE_("Min"), ICON_NONE); uiItemR(sub, &ptr, "max_value", DEFAULT_FLAGS, IFACE_("Max"), ICON_NONE); break; @@ -1465,7 +1465,7 @@ static void std_node_socket_interface_draw(ID *id, case SOCK_INT: { uiItemR(col, &ptr, "subtype", DEFAULT_FLAGS, IFACE_("Subtype"), ICON_NONE); uiItemR(col, &ptr, "default_value", DEFAULT_FLAGS, IFACE_("Default"), ICON_NONE); - uiLayout *sub = uiLayoutColumn(col, true); + uiLayout *sub = &col->column(true); uiItemR(sub, &ptr, "min_value", DEFAULT_FLAGS, IFACE_("Min"), ICON_NONE); uiItemR(sub, &ptr, "max_value", DEFAULT_FLAGS, IFACE_("Max"), ICON_NONE); break; @@ -1473,7 +1473,7 @@ static void std_node_socket_interface_draw(ID *id, case SOCK_VECTOR: { uiItemR(col, &ptr, "subtype", DEFAULT_FLAGS, IFACE_("Subtype"), ICON_NONE); uiItemR(col, &ptr, "default_value", UI_ITEM_R_EXPAND, IFACE_("Default"), ICON_NONE); - uiLayout *sub = uiLayoutColumn(col, true); + uiLayout *sub = &col->column(true); uiItemR(sub, &ptr, "min_value", DEFAULT_FLAGS, IFACE_("Min"), ICON_NONE); uiItemR(sub, &ptr, "max_value", DEFAULT_FLAGS, IFACE_("Max"), ICON_NONE); break; @@ -1510,7 +1510,7 @@ static void std_node_socket_interface_draw(ID *id, break; } - col = uiLayoutColumn(layout, false); + col = &layout->column(false); const bNodeTree *node_tree = reinterpret_cast(id); if (interface_socket->flag & NODE_INTERFACE_SOCKET_INPUT && node_tree->type == NTREE_GEOMETRY) { @@ -1520,7 +1520,7 @@ static void std_node_socket_interface_draw(ID *id, } { - uiLayout *sub = uiLayoutColumn(col, false); + uiLayout *sub = &col->column(false); uiLayoutSetActive(sub, interface_socket->default_input == NODE_INPUT_DEFAULT_VALUE); uiItemR(sub, &ptr, "hide_value", DEFAULT_FLAGS, std::nullopt, ICON_NONE); } @@ -1529,11 +1529,11 @@ static void std_node_socket_interface_draw(ID *id, if (type == SOCK_BOOLEAN) { uiItemR(col, &ptr, "layer_selection_field", DEFAULT_FLAGS, std::nullopt, ICON_NONE); } - uiLayout *sub = uiLayoutColumn(col, false); + uiLayout *sub = &col->column(false); uiLayoutSetActive(sub, !is_layer_selection_field(*interface_socket)); uiItemR(sub, &ptr, "hide_in_modifier", DEFAULT_FLAGS, std::nullopt, ICON_NONE); if (nodes::socket_type_supports_fields(type)) { - uiLayout *sub_sub = uiLayoutColumn(col, false); + uiLayout *sub_sub = &col->column(false); uiLayoutSetActive(sub_sub, (interface_socket->default_input == NODE_INPUT_DEFAULT_VALUE) && !is_layer_selection_field(*interface_socket)); diff --git a/source/blender/editors/space_node/node_templates.cc b/source/blender/editors/space_node/node_templates.cc index 5aaee5f565f..641649a5cb1 100644 --- a/source/blender/editors/space_node/node_templates.cc +++ b/source/blender/editors/space_node/node_templates.cc @@ -538,7 +538,7 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname) } if (first) { - column = uiLayoutColumn(layout, false); + column = &layout->column(false); UI_block_layout_set_current(block, column); uiItemL(column, IFACE_(cname), ICON_NODE); @@ -626,7 +626,7 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_ ntreetype->foreach_nodeclass(arg, node_menu_column_foreach_cb); } - column = uiLayoutColumn(split, false); + column = &split->column(false); UI_block_layout_set_current(block, column); if (sock->link) { @@ -908,7 +908,7 @@ static void ui_node_draw_input(uiLayout &layout, switch (input.type) { case SOCK_VECTOR: uiItemS(sub); - sub = uiLayoutColumn(sub, true); + sub = &sub->column(true); ATTR_FALLTHROUGH; case SOCK_FLOAT: case SOCK_INT: diff --git a/source/blender/editors/space_outliner/outliner_edit.cc b/source/blender/editors/space_outliner/outliner_edit.cc index da09c6a4901..6c674e8eb8b 100644 --- a/source/blender/editors/space_outliner/outliner_edit.cc +++ b/source/blender/editors/space_outliner/outliner_edit.cc @@ -2428,7 +2428,7 @@ static void outliner_orphans_purge_ui(bContext * /*C*/, wmOperator *op) std::string unused_message; unused_message_gen(unused_message, data.num_local); - uiLayout *column = uiLayoutColumn(layout, true); + uiLayout *column = &layout->column(true); uiItemR(column, ptr, "do_local_ids", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiLayout *row = &column->row(true); uiItemS_ex(row, 2.67f); @@ -2436,7 +2436,7 @@ static void outliner_orphans_purge_ui(bContext * /*C*/, wmOperator *op) unused_message = ""; unused_message_gen(unused_message, data.num_linked); - column = uiLayoutColumn(layout, true); + column = &layout->column(true); uiItemR(column, ptr, "do_linked_ids", UI_ITEM_NONE, std::nullopt, ICON_NONE); row = &column->row(true); uiItemS_ex(row, 2.67f); diff --git a/source/blender/editors/space_topbar/space_topbar.cc b/source/blender/editors/space_topbar/space_topbar.cc index e49b5bb0d97..bcd30dcb8a0 100644 --- a/source/blender/editors/space_topbar/space_topbar.cc +++ b/source/blender/editors/space_topbar/space_topbar.cc @@ -241,7 +241,7 @@ static void undo_history_draw_menu(const bContext *C, Menu *menu) continue; } if (!(undo_step_count % col_size)) { - column = uiLayoutColumn(split, false); + column = &split->column(false); } const bool is_active = (us == wm->undo_stack->step_active); uiLayout *row = &column->row(false); diff --git a/source/blender/editors/space_view3d/view3d_buttons.cc b/source/blender/editors/space_view3d/view3d_buttons.cc index 33969c79026..c3b6b48b83d 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.cc +++ b/source/blender/editors/space_view3d/view3d_buttons.cc @@ -1460,13 +1460,13 @@ static void view3d_panel_vgroup(const bContext *C, Panel *panel) UI_block_func_handle_set(block, do_view3d_vgroup_buttons, nullptr); - bcol = uiLayoutColumn(panel->layout, true); + bcol = &panel->layout->column(true); row = &bcol->row(true); /* The filter button row */ PointerRNA tools_ptr = RNA_pointer_create_discrete(nullptr, &RNA_ToolSettings, ts); uiItemR(row, &tools_ptr, "vertex_group_subset", UI_ITEM_R_EXPAND, std::nullopt, ICON_NONE); - col = uiLayoutColumn(bcol, true); + col = &bcol->column(true); vgroup_validmap = BKE_object_defgroup_subset_from_select_type( ob, subset_type, &vgroup_tot, &subset_count); @@ -1565,7 +1565,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *panel) yco -= 2; - col = uiLayoutColumn(panel->layout, true); + col = &panel->layout->column(true); row = &col->row(true); ot = WM_operatortype_find("OBJECT_OT_vertex_weight_normalize_active_vertex", true); @@ -1613,9 +1613,9 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) bone = static_cast(boneptr.data); uiLayoutSetActive(split, !(bone->parent && bone->flag & BONE_CONNECTED)); } - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiItemR(colsub, ptr, "location", UI_ITEM_NONE, std::nullopt, ICON_NONE); - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiLayoutSetEmboss(colsub, blender::ui::EmbossType::NoneOrStatus); uiItemL(colsub, "", ICON_NONE); uiItemR(colsub, @@ -1629,9 +1629,9 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) switch (RNA_enum_get(ptr, "rotation_mode")) { case ROT_MODE_QUAT: /* quaternion */ - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiItemR(colsub, ptr, "rotation_quaternion", UI_ITEM_NONE, IFACE_("Rotation"), ICON_NONE); - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiLayoutSetEmboss(colsub, blender::ui::EmbossType::NoneOrStatus); uiItemR(colsub, ptr, "lock_rotations_4d", UI_ITEM_R_TOGGLE, IFACE_("4L"), ICON_NONE); if (RNA_boolean_get(ptr, "lock_rotations_4d")) { @@ -1653,9 +1653,9 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) ICON_DECORATE_UNLOCKED); break; case ROT_MODE_AXISANGLE: /* axis angle */ - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiItemR(colsub, ptr, "rotation_axis_angle", UI_ITEM_NONE, IFACE_("Rotation"), ICON_NONE); - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiLayoutSetEmboss(colsub, blender::ui::EmbossType::NoneOrStatus); uiItemR(colsub, ptr, "lock_rotations_4d", UI_ITEM_R_TOGGLE, IFACE_("4L"), ICON_NONE); if (RNA_boolean_get(ptr, "lock_rotations_4d")) { @@ -1677,9 +1677,9 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) ICON_DECORATE_UNLOCKED); break; default: /* euler rotations */ - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiItemR(colsub, ptr, "rotation_euler", UI_ITEM_NONE, IFACE_("Rotation"), ICON_NONE); - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiLayoutSetEmboss(colsub, blender::ui::EmbossType::NoneOrStatus); uiItemL(colsub, "", ICON_NONE); uiItemR(colsub, @@ -1693,9 +1693,9 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) uiItemR(layout, ptr, "rotation_mode", UI_ITEM_NONE, "", ICON_NONE); split = uiLayoutSplit(layout, 0.8f, false); - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiItemR(colsub, ptr, "scale", UI_ITEM_NONE, std::nullopt, ICON_NONE); - colsub = uiLayoutColumn(split, true); + colsub = &split->column(true); uiLayoutSetEmboss(colsub, blender::ui::EmbossType::NoneOrStatus); uiItemL(colsub, "", ICON_NONE); uiItemR(colsub, @@ -1720,7 +1720,7 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob) PointerRNA pchanptr = RNA_pointer_create_discrete(&ob->id, &RNA_PoseBone, pchan); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); /* XXX: RNA buts show data in native types (i.e. quaternion, 4-component axis/angle, etc.) * but old-school UI shows in eulers always. Do we want to be able to still display in Eulers? @@ -1743,7 +1743,7 @@ static void v3d_editarmature_buts(uiLayout *layout, Object *ob) PointerRNA eboneptr = RNA_pointer_create_discrete(&arm->id, &RNA_EditBone, ebone); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, &eboneptr, "head", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (ebone->parent && ebone->flag & BONE_CONNECTED) { PointerRNA parptr = RNA_pointer_get(&eboneptr, "parent"); @@ -1773,7 +1773,7 @@ static void v3d_editmetaball_buts(uiLayout *layout, Object *ob) PointerRNA ptr = RNA_pointer_create_discrete(&mball->id, &RNA_MetaElement, mball->lastelem); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, &ptr, "co", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, &ptr, "radius", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -1781,7 +1781,7 @@ static void v3d_editmetaball_buts(uiLayout *layout, Object *ob) uiItemR(col, &ptr, "type", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); switch (RNA_enum_get(&ptr, "type")) { case MB_BALL: break; @@ -1861,7 +1861,7 @@ static void view3d_panel_transform(const bContext *C, Panel *panel) block = uiLayoutGetBlock(panel->layout); UI_block_func_handle_set(block, do_view3d_region_buttons, nullptr); - col = uiLayoutColumn(panel->layout, false); + col = &panel->layout->column(false); if (ob == obedit) { if (ob->type == OB_ARMATURE) { diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.cc b/source/blender/editors/uvedit/uvedit_unwrap_ops.cc index 5ef8338d02a..cde0ed6f060 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.cc +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.cc @@ -2891,7 +2891,7 @@ static void unwrap_draw(bContext * /*C*/, wmOperator *op) uiLayout *col; - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, &ptr, "method", UI_ITEM_NONE, std::nullopt, ICON_NONE); bool is_slim = RNA_enum_get(op->ptr, "method") == UVCALC_UNWRAP_METHOD_MINIMUM_STRETCH; @@ -2903,7 +2903,7 @@ static void unwrap_draw(bContext * /*C*/, wmOperator *op) uiItemR(col, &ptr, "use_weights", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (RNA_boolean_get(op->ptr, "use_weights")) { - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, &ptr, "weight_group", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, &ptr, "weight_factor", UI_ITEM_NONE, std::nullopt, ICON_NONE); } diff --git a/source/blender/modifiers/intern/MOD_armature.cc b/source/blender/modifiers/intern/MOD_armature.cc index 73718c62a93..da4848a06f2 100644 --- a/source/blender/modifiers/intern/MOD_armature.cc +++ b/source/blender/modifiers/intern/MOD_armature.cc @@ -218,7 +218,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "object", UI_ITEM_NONE, std::nullopt, ICON_NONE); modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", std::nullopt); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "use_deform_preserve_volume", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_multi_modifier", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_array.cc b/source/blender/modifiers/intern/MOD_array.cc index 7d2779a7b7b..843f156b9cc 100644 --- a/source/blender/modifiers/intern/MOD_array.cc +++ b/source/blender/modifiers/intern/MOD_array.cc @@ -930,7 +930,7 @@ static void relative_offset_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_relative_offset")); uiItemR(col, ptr, "relative_offset_displace", UI_ITEM_NONE, IFACE_("Factor"), ICON_NONE); @@ -953,7 +953,7 @@ static void constant_offset_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_constant_offset")); uiItemR(col, ptr, "constant_offset_displace", UI_ITEM_NONE, IFACE_("Distance"), ICON_NONE); @@ -979,7 +979,7 @@ static void object_offset_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_object_offset")); uiItemR(col, ptr, "offset_object", UI_ITEM_NONE, IFACE_("Object"), ICON_NONE); @@ -1002,7 +1002,7 @@ static void symmetry_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_merge_vertices")); uiItemR(col, ptr, "merge_threshold", UI_ITEM_NONE, IFACE_("Distance"), ICON_NONE); uiItemR(col, @@ -1022,7 +1022,7 @@ static void uv_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "offset_u", UI_ITEM_R_EXPAND, IFACE_("Offset U"), ICON_NONE); uiItemR(col, ptr, "offset_v", UI_ITEM_R_EXPAND, IFACE_("V"), ICON_NONE); } @@ -1036,7 +1036,7 @@ static void caps_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "start_cap", UI_ITEM_NONE, IFACE_("Cap Start"), ICON_NONE); uiItemR(col, ptr, "end_cap", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); } diff --git a/source/blender/modifiers/intern/MOD_bevel.cc b/source/blender/modifiers/intern/MOD_bevel.cc index 97b30ea930e..cc6559f565d 100644 --- a/source/blender/modifiers/intern/MOD_bevel.cc +++ b/source/blender/modifiers/intern/MOD_bevel.cc @@ -294,7 +294,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "offset_type", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (RNA_enum_get(ptr, "offset_type") == BEVEL_AMT_PERCENT) { uiItemR(col, ptr, "width_pct", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -307,11 +307,11 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemS(layout); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "limit_method", UI_ITEM_NONE, std::nullopt, ICON_NONE); int limit_method = RNA_enum_get(ptr, "limit_method"); if (limit_method == MOD_BEVEL_ANGLE) { - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, edge_bevel); uiItemR(col, ptr, "angle_limit", UI_ITEM_NONE, std::nullopt, ICON_NONE); } @@ -358,7 +358,7 @@ static void profile_panel_draw(const bContext * /*C*/, Panel *panel) ICON_NONE); if (profile_type == MOD_BEVEL_PROFILE_CUSTOM) { - uiLayout *sub = uiLayoutColumn(layout, false); + uiLayout *sub = &layout->column(false); uiLayoutSetPropDecorate(sub, false); uiTemplateCurveProfile(sub, ptr, "custom_profile"); } diff --git a/source/blender/modifiers/intern/MOD_boolean.cc b/source/blender/modifiers/intern/MOD_boolean.cc index 01b1ccf1161..711679a19e8 100644 --- a/source/blender/modifiers/intern/MOD_boolean.cc +++ b/source/blender/modifiers/intern/MOD_boolean.cc @@ -648,7 +648,7 @@ static void solver_options_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); if (use_exact) { uiItemR(col, ptr, "material_mode", UI_ITEM_NONE, IFACE_("Materials"), ICON_NONE); /* When operand is collection, we always use_self. */ diff --git a/source/blender/modifiers/intern/MOD_decimate.cc b/source/blender/modifiers/intern/MOD_decimate.cc index 803e6255b25..a424bddd2c9 100644 --- a/source/blender/modifiers/intern/MOD_decimate.cc +++ b/source/blender/modifiers/intern/MOD_decimate.cc @@ -257,7 +257,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) } else { /* decimate_type == MOD_DECIM_MODE_DISSOLVE. */ uiItemR(layout, ptr, "angle_limit", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, ptr, "delimit", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(layout, ptr, "use_dissolve_boundaries", UI_ITEM_NONE, std::nullopt, ICON_NONE); } diff --git a/source/blender/modifiers/intern/MOD_displace.cc b/source/blender/modifiers/intern/MOD_displace.cc index f0bd1400b70..cbeb4128802 100644 --- a/source/blender/modifiers/intern/MOD_displace.cc +++ b/source/blender/modifiers/intern/MOD_displace.cc @@ -350,7 +350,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiTemplateID(layout, C, ptr, "texture", "texture.new", nullptr, nullptr); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, has_texture); uiItemR(col, ptr, "texture_coords", UI_ITEM_NONE, IFACE_("Coordinates"), ICON_NONE); if (texture_coords == MOD_DISP_MAP_OBJECT) { @@ -375,7 +375,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemS(layout); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "direction", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (ELEM(RNA_enum_get(ptr, "direction"), MOD_DISP_DIR_X, @@ -388,7 +388,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemS(layout); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "strength", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "mid_level", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_explode.cc b/source/blender/modifiers/intern/MOD_explode.cc index ff4fd4cb5c0..953b525e374 100644 --- a/source/blender/modifiers/intern/MOD_explode.cc +++ b/source/blender/modifiers/intern/MOD_explode.cc @@ -1182,7 +1182,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "use_edge_cut", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_size", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_array.cc b/source/blender/modifiers/intern/MOD_grease_pencil_array.cc index 795ca759626..b3260241d71 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_array.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_array.cc @@ -295,7 +295,7 @@ static void panel_draw(const bContext *C, Panel *panel) IFACE_("Relative Offset")) .body) { - uiLayout *col = uiLayoutColumn(sub, false); + uiLayout *col = &sub->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_relative_offset")); uiItemR(col, ptr, "relative_offset", UI_ITEM_NONE, IFACE_("Factor"), ICON_NONE); } @@ -309,7 +309,7 @@ static void panel_draw(const bContext *C, Panel *panel) IFACE_("Constant Offset")) .body) { - uiLayout *col = uiLayoutColumn(sub, false); + uiLayout *col = &sub->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_constant_offset")); uiItemR(col, ptr, "constant_offset", UI_ITEM_NONE, IFACE_("Distance"), ICON_NONE); } @@ -323,7 +323,7 @@ static void panel_draw(const bContext *C, Panel *panel) IFACE_("Object Offset")) .body) { - uiLayout *col = uiLayoutColumn(sub, false); + uiLayout *col = &sub->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_object_offset")); uiItemR(col, ptr, "offset_object", UI_ITEM_NONE, IFACE_("Object"), ICON_NONE); } diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_build.cc b/source/blender/modifiers/intern/MOD_grease_pencil_build.cc index ebca2085b80..3ec1f740649 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_build.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_build.cc @@ -801,7 +801,7 @@ static void panel_draw(const bContext *C, Panel *panel) .body) { const bool active = RNA_boolean_get(ptr, "use_restrict_frame_range"); - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiLayoutSetActive(col, active); uiItemR(col, ptr, "frame_start", UI_ITEM_NONE, IFACE_("Start"), ICON_NONE); uiItemR(col, ptr, "frame_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); @@ -813,12 +813,12 @@ static void panel_draw(const bContext *C, Panel *panel) .body) { const bool active = RNA_boolean_get(ptr, "use_fading"); - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); uiLayoutSetActive(col, active); uiItemR(col, ptr, "fade_factor", UI_ITEM_NONE, IFACE_("Factor"), ICON_NONE); - uiLayout *subcol = uiLayoutColumn(col, true); + uiLayout *subcol = &col->column(true); uiItemR(subcol, ptr, "fade_thickness_strength", UI_ITEM_NONE, IFACE_("Thickness"), ICON_NONE); uiItemR(subcol, ptr, "fade_opacity_strength", UI_ITEM_NONE, IFACE_("Opacity"), ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_dash.cc b/source/blender/modifiers/intern/MOD_grease_pencil_dash.cc index 4eff8bac0ff..9bd6905bcba 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_dash.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_dash.cc @@ -417,12 +417,12 @@ static void panel_draw(const bContext *C, Panel *panel) 1, UI_TEMPLATE_LIST_FLAG_NONE); - uiLayout *col = uiLayoutColumn(row, false); - uiLayout *sub = uiLayoutColumn(col, true); + uiLayout *col = &row->column(false); + uiLayout *sub = &col->column(true); uiItemO(sub, "", ICON_ADD, "OBJECT_OT_grease_pencil_dash_modifier_segment_add"); uiItemO(sub, "", ICON_REMOVE, "OBJECT_OT_grease_pencil_dash_modifier_segment_remove"); uiItemS(col); - sub = uiLayoutColumn(col, true); + sub = &col->column(true); uiItemEnumO_string( sub, "", ICON_TRIA_UP, "OBJECT_OT_grease_pencil_dash_modifier_segment_move", "type", "UP"); uiItemEnumO_string(sub, @@ -437,11 +437,11 @@ static void panel_draw(const bContext *C, Panel *panel) &RNA_GreasePencilDashModifierSegment, &dmd->segments()[dmd->segment_active_index]); - sub = uiLayoutColumn(layout, true); + sub = &layout->column(true); uiItemR(sub, &ds_ptr, "dash", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, &ds_ptr, "gap", UI_ITEM_NONE, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(layout, false); + sub = &layout->column(false); uiItemR(sub, &ds_ptr, "radius", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, &ds_ptr, "opacity", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, &ds_ptr, "material_index", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_hook.cc b/source/blender/modifiers/intern/MOD_grease_pencil_hook.cc index c00fd27cb6e..fafec5f86ce 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_hook.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_hook.cc @@ -270,7 +270,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, ptr, "object", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (!RNA_pointer_is_null(&hook_object_ptr) && RNA_enum_get(&hook_object_ptr, "type") == OB_ARMATURE) diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_length.cc b/source/blender/modifiers/intern/MOD_grease_pencil_length.cc index 81ca64d70fa..699d306c171 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_length.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_length.cc @@ -277,7 +277,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); uiItemR(layout, ptr, "mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); if (RNA_enum_get(ptr, "mode") == GP_LENGTH_RELATIVE) { uiItemR(col, ptr, "start_factor", UI_ITEM_NONE, IFACE_("Start"), ICON_NONE); @@ -295,7 +295,7 @@ static void panel_draw(const bContext *C, Panel *panel) C, layout, ptr, "open_random_panel", ptr, "use_random", IFACE_("Randomize")) .body) { - uiLayout *subcol = uiLayoutColumn(random_layout, false); + uiLayout *subcol = &random_layout->column(false); uiLayoutSetPropSep(subcol, true); uiLayoutSetActive(subcol, RNA_boolean_get(ptr, "use_random")); @@ -312,7 +312,7 @@ static void panel_draw(const bContext *C, Panel *panel) C, layout, ptr, "open_curvature_panel", ptr, "use_curvature", IFACE_("Curvature")) .body) { - uiLayout *subcol = uiLayoutColumn(curvature_layout, false); + uiLayout *subcol = &curvature_layout->column(false); uiLayoutSetPropSep(subcol, true); uiLayoutSetActive(subcol, RNA_boolean_get(ptr, "use_curvature")); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_multiply.cc b/source/blender/modifiers/intern/MOD_grease_pencil_multiply.cc index be530810338..49b76782f94 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_multiply.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_multiply.cc @@ -247,7 +247,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "duplicates", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetActive(col, RNA_int_get(ptr, "duplicates") > 0); uiItemR(col, ptr, "distance", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "offset", UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE); @@ -257,7 +257,7 @@ static void panel_draw(const bContext *C, Panel *panel) C, layout, ptr, "open_fading_panel", ptr, "use_fade", IFACE_("Fade")) .body) { - uiLayout *sub = uiLayoutColumn(fade_panel, false); + uiLayout *sub = &fade_panel->column(false); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_fade")); uiItemR(sub, ptr, "fading_center", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_noise.cc b/source/blender/modifiers/intern/MOD_grease_pencil_noise.cc index cebc508b4ba..46080c89391 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_noise.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_noise.cc @@ -278,7 +278,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "factor", UI_ITEM_NONE, IFACE_("Position"), ICON_NONE); uiItemR(col, ptr, @@ -297,7 +297,7 @@ static void panel_draw(const bContext *C, Panel *panel) C, layout, ptr, "open_random_panel", ptr, "use_random", IFACE_("Random")) .body) { - uiLayout *random_col = uiLayoutColumn(random_layout, false); + uiLayout *random_col = &random_layout->column(false); uiLayoutSetActive(random_col, RNA_boolean_get(ptr, "use_random")); uiItemR(random_col, ptr, "random_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_offset.cc b/source/blender/modifiers/intern/MOD_grease_pencil_offset.cc index f7acff579ba..a23812e7e13 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_offset.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_offset.cc @@ -412,7 +412,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(advanced_panel, ptr, "stroke_rotation", UI_ITEM_NONE, IFACE_("Rotation"), ICON_NONE); uiItemR(advanced_panel, ptr, "stroke_scale", UI_ITEM_NONE, IFACE_("Scale"), ICON_NONE); - uiLayout *col = uiLayoutColumn(advanced_panel, true); + uiLayout *col = &advanced_panel->column(true); switch (offset_mode) { case MOD_GREASE_PENCIL_OFFSET_RANDOM: uiItemR(advanced_panel, diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_shrinkwrap.cc b/source/blender/modifiers/intern/MOD_grease_pencil_shrinkwrap.cc index e9a785f3585..3741e923633 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_shrinkwrap.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_shrinkwrap.cc @@ -263,7 +263,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "project_limit", UI_ITEM_NONE, IFACE_("Limit"), ICON_NONE); uiItemR(layout, ptr, "subsurf_levels", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); row = &col->row(true, IFACE_("Axis")); uiItemR(row, ptr, "use_project_x", toggles_flag, std::nullopt, ICON_NONE); uiItemR(row, ptr, "use_project_y", toggles_flag, std::nullopt, ICON_NONE); @@ -273,7 +273,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(col, ptr, "use_positive_direction", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(layout, ptr, "cull_face", UI_ITEM_R_EXPAND, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_negative_direction") && RNA_enum_get(ptr, "cull_face") != 0); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_smooth.cc b/source/blender/modifiers/intern/MOD_grease_pencil_smooth.cc index e3602e92450..23289509ccd 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_smooth.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_smooth.cc @@ -250,7 +250,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "factor", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(layout, ptr, "step", UI_ITEM_NONE, IFACE_("Repeat"), ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_edit_position")); uiItemR(col, ptr, "use_keep_shape", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_smooth_ends", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_texture.cc b/source/blender/modifiers/intern/MOD_grease_pencil_texture.cc index 8ca5968327b..21201770ab8 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_texture.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_texture.cc @@ -315,7 +315,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (ELEM(mode, MOD_GREASE_PENCIL_TEXTURE_STROKE, MOD_GREASE_PENCIL_TEXTURE_STROKE_AND_FILL)) { - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "fit_method", UI_ITEM_NONE, IFACE_("Stroke Fit Method"), ICON_NONE); uiItemR(col, ptr, "uv_offset", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "alignment_rotation", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -327,7 +327,7 @@ static void panel_draw(const bContext *C, Panel *panel) } if (ELEM(mode, MOD_GREASE_PENCIL_TEXTURE_FILL, MOD_GREASE_PENCIL_TEXTURE_STROKE_AND_FILL)) { - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "fill_rotation", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "fill_offset", UI_ITEM_NONE, IFACE_("Offset"), ICON_NONE); uiItemR(col, ptr, "fill_scale", UI_ITEM_NONE, IFACE_("Scale"), ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_time.cc b/source/blender/modifiers/intern/MOD_grease_pencil_time.cc index 05fff431d99..839628574ef 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_time.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_time.cc @@ -531,7 +531,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); const char *text = use_fixed_offset ? IFACE_("Frame") : IFACE_("Frame Offset"); uiItemR(col, ptr, "offset", UI_ITEM_NONE, text, ICON_NONE); @@ -563,13 +563,13 @@ static void panel_draw(const bContext *C, Panel *panel) 1, UI_TEMPLATE_LIST_FLAG_NONE); - col = uiLayoutColumn(row, false); + col = &row->column(false); - uiLayout *sub = uiLayoutColumn(col, true); + uiLayout *sub = &col->column(true); uiItemO(sub, "", ICON_ADD, "OBJECT_OT_grease_pencil_time_modifier_segment_add"); uiItemO(sub, "", ICON_REMOVE, "OBJECT_OT_grease_pencil_time_modifier_segment_remove"); uiItemS(col); - sub = uiLayoutColumn(col, true); + sub = &col->column(true); uiItemEnumO_string( sub, "", ICON_TRIA_UP, "OBJECT_OT_grease_pencil_time_modifier_segment_move", "type", "UP"); uiItemEnumO_string(sub, @@ -585,9 +585,9 @@ static void panel_draw(const bContext *C, Panel *panel) &RNA_GreasePencilTimeModifierSegment, &tmd->segments()[tmd->segment_active_index]); - sub = uiLayoutColumn(layout, true); + sub = &layout->column(true); uiItemR(sub, &segment_ptr, "segment_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(layout, true); + sub = &layout->column(true); uiItemR(sub, &segment_ptr, "segment_start", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, &segment_ptr, "segment_end", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, &segment_ptr, "segment_repeat", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -605,7 +605,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(body, true); uiLayoutSetActive(body, use_custom_range && RNA_boolean_get(ptr, "use_custom_frame_range")); - col = uiLayoutColumn(body, true); + col = &body->column(true); uiItemR(col, ptr, "frame_start", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE); uiItemR(col, ptr, "frame_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); } diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_tint.cc b/source/blender/modifiers/intern/MOD_grease_pencil_tint.cc index f00f715fffd..cfa17eab3e1 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_tint.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_tint.cc @@ -436,7 +436,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "color", UI_ITEM_NONE, std::nullopt, ICON_NONE); break; case MOD_GREASE_PENCIL_TINT_GRADIENT: - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetPropSep(col, false); uiTemplateColorRamp(col, ptr, "color_ramp", true); uiItemS(layout); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_util.cc b/source/blender/modifiers/intern/MOD_grease_pencil_util.cc index 90d2f4c971b..098cee70e26 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_util.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_util.cc @@ -100,7 +100,7 @@ void draw_layer_filter_settings(const bContext * /*C*/, uiLayout *layout, Pointe uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); row = &col->row(true); uiLayoutSetPropDecorate(row, false); uiItemPointerR(row, @@ -132,7 +132,7 @@ void draw_material_filter_settings(const bContext * /*C*/, uiLayout *layout, Poi uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); row = &col->row(true); uiLayoutSetPropDecorate(row, false); uiItemPointerR( @@ -158,7 +158,7 @@ void draw_vertex_group_settings(const bContext * /*C*/, uiLayout *layout, Pointe uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); row = &col->row(true); uiLayoutSetPropDecorate(row, false); uiItemPointerR(row, ptr, "vertex_group_name", &ob_ptr, "vertex_groups", std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_weight_proximity.cc b/source/blender/modifiers/intern/MOD_grease_pencil_weight_proximity.cc index d83aba2ffeb..c22de3c59ea 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_weight_proximity.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_weight_proximity.cc @@ -263,7 +263,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "object", UI_ITEM_NONE, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(layout, true); + sub = &layout->column(true); uiItemR(sub, ptr, "distance_start", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, ptr, "distance_end", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_hook.cc b/source/blender/modifiers/intern/MOD_hook.cc index 5c6e7226a07..f4724a1ffdb 100644 --- a/source/blender/modifiers/intern/MOD_hook.cc +++ b/source/blender/modifiers/intern/MOD_hook.cc @@ -456,7 +456,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "object", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (!RNA_pointer_is_null(&hook_object_ptr) && RNA_enum_get(&hook_object_ptr, "type") == OB_ARMATURE) diff --git a/source/blender/modifiers/intern/MOD_lineart.cc b/source/blender/modifiers/intern/MOD_lineart.cc index cefee55e581..dfb60c5f352 100644 --- a/source/blender/modifiers/intern/MOD_lineart.cc +++ b/source/blender/modifiers/intern/MOD_lineart.cc @@ -248,7 +248,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) /* Source is Scene. */ } - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemPointerR(col, ptr, "target_layer", @@ -259,7 +259,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemPointerR( col, ptr, "target_material", &obj_data_ptr, "materials", std::nullopt, ICON_MATERIAL); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "thickness", UI_ITEM_R_SLIDER, IFACE_("Line Thickness"), ICON_NONE); uiItemR(col, ptr, "opacity", UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE); @@ -291,7 +291,7 @@ static void edge_types_panel_draw(const bContext * /*C*/, Panel *panel) IFACE_("Illumination Filtering"), ICON_NONE); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); sub = &col->row(false, IFACE_("Create")); uiItemR(sub, ptr, "use_contour", UI_ITEM_NONE, "", ICON_NONE); @@ -324,7 +324,7 @@ static void edge_types_panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(col, ptr, "use_edge_mark", UI_ITEM_NONE, IFACE_("Edge Marks"), ICON_NONE); uiItemR(col, ptr, "use_loose", UI_ITEM_NONE, IFACE_("Loose"), ICON_NONE); - entry = uiLayoutColumn(col, false); + entry = &col->column(false); uiLayoutSetActive(entry, has_light); sub = &entry->row(false); @@ -339,7 +339,7 @@ static void edge_types_panel_draw(const bContext * /*C*/, Panel *panel) uiItemL(layout, IFACE_("Options"), ICON_NONE); - sub = uiLayoutColumn(layout, false); + sub = &layout->column(false); if (use_cache && !is_first) { uiItemL(sub, IFACE_("Type overlapping cached"), ICON_INFO); } @@ -375,12 +375,12 @@ static void options_light_reference_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "light_contour_object", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *remaining = uiLayoutColumn(layout, false); + uiLayout *remaining = &layout->column(false); uiLayoutSetActive(remaining, has_light); uiItemR(remaining, ptr, "shadow_camera_size", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *col = uiLayoutColumn(remaining, true); + uiLayout *col = &remaining->column(true); uiItemR(col, ptr, "shadow_camera_near", UI_ITEM_NONE, IFACE_("Near"), ICON_NONE); uiItemR(col, ptr, "shadow_camera_far", UI_ITEM_NONE, IFACE_("Far"), ICON_NONE); } @@ -411,7 +411,7 @@ static void options_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(subrow, true); uiItemR(subrow, ptr, "source_camera", UI_ITEM_NONE, "", ICON_OBJECT_DATA); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemR(col, ptr, @@ -449,13 +449,13 @@ static void occlusion_panel_draw(const bContext * /*C*/, Panel *panel) uiItemL(layout, TIP_("Object is not in front"), ICON_INFO); } - layout = uiLayoutColumn(layout, false); + layout = &layout->column(false); uiLayoutSetActive(layout, show_in_front); uiItemR(layout, ptr, "use_multiple_levels", UI_ITEM_NONE, IFACE_("Range"), ICON_NONE); if (use_multiple_levels) { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemR(col, ptr, "level_start", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "level_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); } @@ -503,7 +503,7 @@ static void material_mask_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetEnabled(layout, RNA_boolean_get(ptr, "use_material_mask")); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayout *sub = &col->row(true, IFACE_("Masks")); PropertyRNA *prop = RNA_struct_find_property(ptr, "use_material_mask_bits"); @@ -529,7 +529,7 @@ static void intersection_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetActive(layout, RNA_boolean_get(ptr, "use_intersection")); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayout *sub = &col->row(true, IFACE_("Collection Masks")); PropertyRNA *prop = RNA_struct_find_property(ptr, "use_intersection_mask"); @@ -652,7 +652,7 @@ static void vgroup_panel_draw(const bContext * /*C*/, Panel *panel) return; } - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayout *row = &col->row(true); @@ -677,20 +677,20 @@ static void bake_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); if (is_baked) { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetPropSep(col, false); uiItemL(col, TIP_("Modifier has baked data"), ICON_NONE); uiItemR( col, ptr, "is_baked", UI_ITEM_R_TOGGLE, IFACE_("Continue Without Clearing"), ICON_NONE); } - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetEnabled(col, !is_baked); uiItemO(col, std::nullopt, ICON_NONE, "OBJECT_OT_lineart_bake_strokes"); uiItemBooleanO( col, IFACE_("Bake All"), ICON_NONE, "OBJECT_OT_lineart_bake_strokes", "bake_all", true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemO(col, std::nullopt, ICON_NONE, "OBJECT_OT_lineart_clear"); uiItemBooleanO( col, IFACE_("Clear All"), ICON_NONE, "OBJECT_OT_lineart_clear", "clear_all", true); @@ -714,7 +714,7 @@ static void composition_panel_draw(const bContext * /*C*/, Panel *panel) uiItemL(layout, TIP_("Object is shown in front"), ICON_ERROR); } - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetActive(col, !show_in_front); uiItemR(col, ptr, "stroke_depth_offset", UI_ITEM_R_SLIDER, IFACE_("Depth Offset"), ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc index c309ef40682..23e4972ec00 100644 --- a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc +++ b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc @@ -75,11 +75,11 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "density", UI_ITEM_NONE, std::nullopt, ICON_NONE); { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, ptr, "interior_band_width", UI_ITEM_NONE, std::nullopt, ICON_NONE); } { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, ptr, "resolution_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (mvmd->resolution_mode == MESH_TO_VOLUME_RESOLUTION_MODE_VOXEL_AMOUNT) { uiItemR(col, ptr, "voxel_amount", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_meshcache.cc b/source/blender/modifiers/intern/MOD_meshcache.cc index 54d51972c69..7b1e5b697ea 100644 --- a/source/blender/modifiers/intern/MOD_meshcache.cc +++ b/source/blender/modifiers/intern/MOD_meshcache.cc @@ -345,7 +345,7 @@ static void axis_mapping_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetRedAlert(col, RNA_enum_get(ptr, "forward_axis") == RNA_enum_get(ptr, "up_axis")); uiItemR(col, ptr, "forward_axis", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "up_axis", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_meshdeform.cc b/source/blender/modifiers/intern/MOD_meshdeform.cc index ff3beb957dd..b7993d76ff6 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.cc +++ b/source/blender/modifiers/intern/MOD_meshdeform.cc @@ -514,13 +514,13 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetEnabled(col, !is_bound); uiItemR(col, ptr, "object", UI_ITEM_NONE, std::nullopt, ICON_NONE); modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", std::nullopt); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetEnabled(col, !is_bound); uiItemR(col, ptr, "precision", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_dynamic_bind", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_mirror.cc b/source/blender/modifiers/intern/MOD_mirror.cc index ccac17b5ed0..5025adcecd2 100644 --- a/source/blender/modifiers/intern/MOD_mirror.cc +++ b/source/blender/modifiers/intern/MOD_mirror.cc @@ -142,7 +142,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) bool has_bisect = (mmd->flag & (MOD_MIR_BISECT_AXIS_X | MOD_MIR_BISECT_AXIS_Y | MOD_MIR_BISECT_AXIS_Z)); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetPropSep(col, true); prop = RNA_struct_find_property(ptr, "use_axis"); @@ -197,7 +197,7 @@ static void data_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); row = &col->row(true, IFACE_("Mirror U")); uiLayoutSetPropDecorate(row, false); sub = &row->row(true); @@ -216,7 +216,7 @@ static void data_panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(sub, ptr, "mirror_offset_v", UI_ITEM_R_SLIDER, "", ICON_NONE); uiItemDecoratorR(row, ptr, "mirror_offset_v", 0); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "offset_u", UI_ITEM_R_SLIDER, IFACE_("Offset U"), ICON_NONE); uiItemR(col, ptr, "offset_v", UI_ITEM_R_SLIDER, IFACE_("V"), ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_multires.cc b/source/blender/modifiers/intern/MOD_multires.cc index e9b2151e704..361b1964cf8 100644 --- a/source/blender/modifiers/intern/MOD_multires.cc +++ b/source/blender/modifiers/intern/MOD_multires.cc @@ -299,7 +299,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "levels", UI_ITEM_NONE, IFACE_("Levels Viewport"), ICON_NONE); uiItemR(col, ptr, "sculpt_levels", UI_ITEM_NONE, IFACE_("Sculpt"), ICON_NONE); uiItemR(col, ptr, "render_levels", UI_ITEM_NONE, IFACE_("Render"), ICON_NONE); @@ -408,7 +408,7 @@ static void generate_panel_draw(const bContext * /*C*/, Panel *panel) layout, IFACE_("Rebuild Subdivisions"), ICON_NONE, "OBJECT_OT_multires_rebuild_subdiv"); } - col = uiLayoutColumn(layout, false); + col = &layout->column(false); row = &col->row(false); if (is_external) { uiItemO(row, IFACE_("Pack External"), ICON_NONE, "OBJECT_OT_multires_external_pack"); @@ -436,7 +436,7 @@ static void advanced_panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "quality", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, true); uiItemR(col, ptr, "uv_smooth", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "boundary_smooth", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index a59a47dafcc..d48e4cb11d4 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -2593,7 +2593,7 @@ static void draw_output_attributes_panel(DrawGroupInputsContext &ctx, uiLayout * static void draw_bake_panel(uiLayout *layout, PointerRNA *modifier_ptr) { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetPropSep(col, true); uiLayoutSetPropDecorate(col, false); uiItemR(col, modifier_ptr, "bake_target", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -2729,7 +2729,7 @@ static void draw_warnings(const bContext *C, return BLI_strcasecmp_natural(a->message.c_str(), b->message.c_str()) < 0; }); - uiLayout *col = uiLayoutColumn(panel.body, false); + uiLayout *col = &panel.body->column(false); for (const NodeWarning *warning : warnings) { const int icon = node_warning_type_icon(warning->type); uiItemL(col, warning->message, icon); diff --git a/source/blender/modifiers/intern/MOD_normal_edit.cc b/source/blender/modifiers/intern/MOD_normal_edit.cc index c1495d4cf96..218b1e9c76b 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.cc +++ b/source/blender/modifiers/intern/MOD_normal_edit.cc @@ -634,7 +634,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "target", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, mode == MOD_NORMALEDIT_MODE_DIRECTIONAL); uiItemR(col, ptr, "use_direction_parallel", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_ocean.cc b/source/blender/modifiers/intern/MOD_ocean.cc index e55605e429c..0e548676683 100644 --- a/source/blender/modifiers/intern/MOD_ocean.cc +++ b/source/blender/modifiers/intern/MOD_ocean.cc @@ -476,15 +476,15 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "geometry_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (RNA_enum_get(ptr, "geometry_mode") == MOD_OCEAN_GEOM_GENERATE) { - sub = uiLayoutColumn(col, true); + sub = &col->column(true); uiItemR(sub, ptr, "repeat_x", UI_ITEM_NONE, IFACE_("Repeat X"), ICON_NONE); uiItemR(sub, ptr, "repeat_y", UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); } - sub = uiLayoutColumn(col, true); + sub = &col->column(true); uiItemR(sub, ptr, "viewport_resolution", UI_ITEM_NONE, IFACE_("Resolution Viewport"), ICON_NONE); uiItemR(sub, ptr, "resolution", UI_ITEM_NONE, IFACE_("Render"), ICON_NONE); @@ -515,7 +515,7 @@ static void waves_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "wave_scale", UI_ITEM_NONE, IFACE_("Scale"), ICON_NONE); uiItemR(col, ptr, "wave_scale_min", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "choppiness", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -523,9 +523,9 @@ static void waves_panel_draw(const bContext * /*C*/, Panel *panel) uiItemS(layout); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "wave_alignment", UI_ITEM_R_SLIDER, IFACE_("Alignment"), ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, RNA_float_get(ptr, "wave_alignment") > 0.0f); uiItemR(sub, ptr, "wave_direction", UI_ITEM_NONE, IFACE_("Direction"), ICON_NONE); uiItemR(sub, ptr, "damping", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -551,7 +551,7 @@ static void foam_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, use_foam); uiItemR(col, ptr, "foam_layer_name", UI_ITEM_NONE, IFACE_("Data Layer"), ICON_NONE); uiItemR(col, ptr, "foam_coverage", UI_ITEM_NONE, IFACE_("Coverage"), ICON_NONE); @@ -588,7 +588,7 @@ static void spray_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, use_foam && use_spray); uiItemR(col, ptr, "spray_layer_name", UI_ITEM_NONE, IFACE_("Data Layer"), ICON_NONE); uiItemR(col, ptr, "invert_spray", UI_ITEM_NONE, IFACE_("Invert"), ICON_NONE); @@ -605,7 +605,7 @@ static void spectrum_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "spectrum", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (ELEM(spectrum, MOD_OCEAN_SPECTRUM_TEXEL_MARSEN_ARSLOE, MOD_OCEAN_SPECTRUM_JONSWAP)) { uiItemR(col, ptr, "sharpen_peak_jonswap", UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE); @@ -652,12 +652,12 @@ static void bake_panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "filepath", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetEnabled(col, !is_cached); uiItemR(col, ptr, "frame_start", UI_ITEM_NONE, IFACE_("Frame Start"), ICON_NONE); uiItemR(col, ptr, "frame_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, use_foam); uiItemR(col, ptr, "bake_foam_fade", UI_ITEM_NONE, std::nullopt, ICON_NONE); } diff --git a/source/blender/modifiers/intern/MOD_particleinstance.cc b/source/blender/modifiers/intern/MOD_particleinstance.cc index 37ee410aa93..c33991d4d38 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.cc +++ b/source/blender/modifiers/intern/MOD_particleinstance.cc @@ -591,10 +591,10 @@ static void path_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetActive(layout, RNA_boolean_get(ptr, "use_path")); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "position", UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE); uiItemR(col, ptr, "random_position", UI_ITEM_R_SLIDER, IFACE_("Random"), ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "rotation", UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE); uiItemR(col, ptr, "random_rotation", UI_ITEM_R_SLIDER, IFACE_("Random"), ICON_NONE); @@ -613,7 +613,7 @@ static void layers_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemPointerR( col, ptr, "index_layer_name", &obj_data_ptr, "vertex_colors", IFACE_("Index"), ICON_NONE); uiItemPointerR( diff --git a/source/blender/modifiers/intern/MOD_remesh.cc b/source/blender/modifiers/intern/MOD_remesh.cc index de703723fa5..0fb9119a314 100644 --- a/source/blender/modifiers/intern/MOD_remesh.cc +++ b/source/blender/modifiers/intern/MOD_remesh.cc @@ -231,7 +231,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); if (mode == MOD_REMESH_VOXEL) { uiItemR(col, ptr, "voxel_size", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "adaptivity", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_screw.cc b/source/blender/modifiers/intern/MOD_screw.cc index 2a5ede3cedc..5ae3e0718b0 100644 --- a/source/blender/modifiers/intern/MOD_screw.cc +++ b/source/blender/modifiers/intern/MOD_screw.cc @@ -1068,7 +1068,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "angle", UI_ITEM_NONE, std::nullopt, ICON_NONE); row = &col->row(false); uiLayoutSetActive(row, @@ -1078,17 +1078,17 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(col, ptr, "iterations", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemS(layout); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); row = &col->row(false); uiItemR(row, ptr, "axis", UI_ITEM_R_EXPAND, std::nullopt, ICON_NONE); uiItemR(col, ptr, "object", UI_ITEM_NONE, IFACE_("Axis Object"), ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, !RNA_pointer_is_null(&screw_obj_ptr)); uiItemR(sub, ptr, "use_object_screw_offset", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemS(layout); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "steps", UI_ITEM_NONE, IFACE_("Steps Viewport"), ICON_NONE); uiItemR(col, ptr, "render_steps", UI_ITEM_NONE, IFACE_("Render"), ICON_NONE); @@ -1118,7 +1118,7 @@ static void normals_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "use_smooth_shade", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_normal_calculate", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_normal_flip", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.cc b/source/blender/modifiers/intern/MOD_shrinkwrap.cc index 8ef4301817a..49ff331117f 100644 --- a/source/blender/modifiers/intern/MOD_shrinkwrap.cc +++ b/source/blender/modifiers/intern/MOD_shrinkwrap.cc @@ -148,7 +148,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "project_limit", UI_ITEM_NONE, IFACE_("Limit"), ICON_NONE); uiItemR(layout, ptr, "subsurf_levels", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); row = &col->row(true, IFACE_("Axis")); uiItemR(row, ptr, "use_project_x", toggles_flag, std::nullopt, ICON_NONE); uiItemR(row, ptr, "use_project_y", toggles_flag, std::nullopt, ICON_NONE); @@ -158,7 +158,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(col, ptr, "use_positive_direction", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(layout, ptr, "cull_face", UI_ITEM_R_EXPAND, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_negative_direction") && RNA_enum_get(ptr, "cull_face") != 0); diff --git a/source/blender/modifiers/intern/MOD_smooth.cc b/source/blender/modifiers/intern/MOD_smooth.cc index a81dea60dd9..68ec25d279b 100644 --- a/source/blender/modifiers/intern/MOD_smooth.cc +++ b/source/blender/modifiers/intern/MOD_smooth.cc @@ -190,7 +190,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(row, ptr, "use_y", toggles_flag, std::nullopt, ICON_NONE); uiItemR(row, ptr, "use_z", toggles_flag, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "factor", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "iterations", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_solidify.cc b/source/blender/modifiers/intern/MOD_solidify.cc index d092bef890e..64bc0c6b734 100644 --- a/source/blender/modifiers/intern/MOD_solidify.cc +++ b/source/blender/modifiers/intern/MOD_solidify.cc @@ -107,7 +107,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) col = uiLayoutColumnWithHeading(layout, false, CTX_IFACE_(BLT_I18NCONTEXT_ID_MESH, "Rim")); uiItemR( col, ptr, "use_rim", UI_ITEM_NONE, CTX_IFACE_(BLT_I18NCONTEXT_ID_MESH, "Fill"), ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_rim")); uiItemR(sub, ptr, "use_rim_only", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -139,7 +139,7 @@ static void normals_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "use_flip_normals", UI_ITEM_NONE, IFACE_("Flip"), ICON_NONE); if (solidify_mode == MOD_SOLIDIFY_MODE_EXTRUDE) { uiItemR(col, ptr, "use_quality_normals", UI_ITEM_NONE, IFACE_("High Quality"), ICON_NONE); @@ -157,7 +157,7 @@ static void materials_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); uiItemR(layout, ptr, "material_offset", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_rim")); uiItemR(col, ptr, @@ -180,7 +180,7 @@ static void edge_data_panel_draw(const bContext * /*C*/, Panel *panel) if (solidify_mode == MOD_SOLIDIFY_MODE_EXTRUDE) { uiLayout *col; - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "edge_crease_inner", UI_ITEM_NONE, IFACE_("Crease Inner"), ICON_NONE); uiItemR(col, ptr, "edge_crease_outer", UI_ITEM_NONE, IFACE_("Outer"), ICON_NONE); uiItemR(col, @@ -203,7 +203,7 @@ static void clamp_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "thickness_clamp", UI_ITEM_NONE, std::nullopt, ICON_NONE); row = &col->row(false); uiLayoutSetActive(row, RNA_float_get(ptr, "thickness_clamp") > 0.0f); @@ -220,7 +220,7 @@ static void vertex_group_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemPointerR( col, ptr, "shell_vertex_group", &ob_ptr, "vertex_groups", IFACE_("Shell"), ICON_NONE); uiItemPointerR(col, diff --git a/source/blender/modifiers/intern/MOD_subsurf.cc b/source/blender/modifiers/intern/MOD_subsurf.cc index 8c7f8bf133d..27925c82858 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.cc +++ b/source/blender/modifiers/intern/MOD_subsurf.cc @@ -395,7 +395,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemR(col, ptr, "levels", UI_ITEM_NONE, IFACE_("Levels Viewport"), ICON_NONE); uiItemR(col, ptr, "render_levels", UI_ITEM_NONE, IFACE_("Render"), ICON_NONE); @@ -450,8 +450,8 @@ static void panel_draw(const bContext *C, Panel *panel) 0.1f); uiLayout *split = uiLayoutSplit(adaptive_panel.body, 0.4f, false); - uiItemL(uiLayoutColumn(split, true), "", ICON_NONE); - uiLayout *col = uiLayoutColumn(split, true); + uiItemL(&split->column(true), "", ICON_NONE); + uiLayout *col = &split->column(true); uiItemL(col, fmt::format(RPT_("Viewport {:.2f} px"), preview), ICON_NONE); uiItemL(col, fmt::format(RPT_("Render {:.2f} px"), render), ICON_NONE); } @@ -464,7 +464,7 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(advanced_layout, ptr, "use_limit_surface", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *col = uiLayoutColumn(advanced_layout, true); + uiLayout *col = &advanced_layout->column(true); uiLayoutSetActive(col, ob_use_adaptive_subdivision || RNA_boolean_get(ptr, "use_limit_surface")); uiItemR(col, ptr, "quality", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.cc b/source/blender/modifiers/intern/MOD_surfacedeform.cc index 606a44d1f70..35676d53a5c 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.cc +++ b/source/blender/modifiers/intern/MOD_surfacedeform.cc @@ -1588,7 +1588,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, !is_bound); uiItemR(col, ptr, "target", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "falloff", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -1597,14 +1597,14 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", std::nullopt); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetEnabled(col, !is_bound); uiLayoutSetActive(col, !is_bound && RNA_string_length(ptr, "vertex_group") != 0); uiItemR(col, ptr, "use_sparse_bind", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemS(layout); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); if (is_bound) { uiItemO(col, IFACE_("Unbind"), ICON_NONE, "OBJECT_OT_surfacedeform_bind"); } diff --git a/source/blender/modifiers/intern/MOD_uvproject.cc b/source/blender/modifiers/intern/MOD_uvproject.cc index e5cef5cfa0a..12a6db8d2bd 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.cc +++ b/source/blender/modifiers/intern/MOD_uvproject.cc @@ -319,12 +319,12 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) } RNA_END; - sub = uiLayoutColumn(layout, true); + sub = &layout->column(true); uiLayoutSetActive(sub, has_camera); uiItemR(sub, ptr, "aspect_x", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, ptr, "aspect_y", UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); - sub = uiLayoutColumn(layout, true); + sub = &layout->column(true); uiLayoutSetActive(sub, has_camera); uiItemR(sub, ptr, "scale_x", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(sub, ptr, "scale_y", UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_uvwarp.cc b/source/blender/modifiers/intern/MOD_uvwarp.cc index 3b9643692fd..8e7f452d2cd 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.cc +++ b/source/blender/modifiers/intern/MOD_uvwarp.cc @@ -254,14 +254,14 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemPointerR( layout, ptr, "uv_layer", &obj_data_ptr, "uv_layers", std::nullopt, ICON_GROUP_UVS); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "center", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "axis_u", UI_ITEM_NONE, IFACE_("Axis U"), ICON_NONE); uiItemR(col, ptr, "axis_v", UI_ITEM_NONE, IFACE_("V"), ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "object_from", UI_ITEM_NONE, std::nullopt, ICON_NONE); warp_obj_ptr = RNA_pointer_get(ptr, "object_from"); if (!RNA_pointer_is_null(&warp_obj_ptr) && RNA_enum_get(&warp_obj_ptr, "type") == OB_ARMATURE) { diff --git a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc index 158be4a9fd7..e162dc2f67c 100644 --- a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc +++ b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc @@ -82,13 +82,13 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, ptr, "object", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "grid_name", UI_ITEM_NONE, std::nullopt, ICON_NONE); } { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, ptr, "resolution_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (vmmd->resolution_mode == VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_AMOUNT) { uiItemR(col, ptr, "voxel_amount", UI_ITEM_NONE, std::nullopt, ICON_NONE); @@ -99,7 +99,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) } { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, ptr, "threshold", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "adaptivity", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_smooth_shade", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_warp.cc b/source/blender/modifiers/intern/MOD_warp.cc index 869be9b8a26..3f4c5915384 100644 --- a/source/blender/modifiers/intern/MOD_warp.cc +++ b/source/blender/modifiers/intern/MOD_warp.cc @@ -348,7 +348,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "object_from", UI_ITEM_NONE, std::nullopt, ICON_NONE); PointerRNA from_obj_ptr = RNA_pointer_get(ptr, "object_from"); if (!RNA_pointer_is_null(&from_obj_ptr) && RNA_enum_get(&from_obj_ptr, "type") == OB_ARMATURE) { @@ -358,7 +358,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) col, ptr, "bone_from", &from_obj_data_ptr, "bones", IFACE_("Bone"), ICON_BONE_DATA); } - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "object_to", UI_ITEM_NONE, std::nullopt, ICON_NONE); PointerRNA to_obj_ptr = RNA_pointer_get(ptr, "object_to"); if (!RNA_pointer_is_null(&to_obj_ptr) && RNA_enum_get(&to_obj_ptr, "type") == OB_ARMATURE) { @@ -410,7 +410,7 @@ static void texture_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "texture_coords", UI_ITEM_NONE, IFACE_("Coordinates"), ICON_NONE); if (texture_coords == MOD_DISP_MAP_OBJECT) { uiItemR(col, ptr, "texture_coords_object", UI_ITEM_NONE, IFACE_("Object"), ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_wave.cc b/source/blender/modifiers/intern/MOD_wave.cc index b092422ca4f..b0a30e02470 100644 --- a/source/blender/modifiers/intern/MOD_wave.cc +++ b/source/blender/modifiers/intern/MOD_wave.cc @@ -323,7 +323,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(sub, ptr, "use_normal_y", UI_ITEM_R_TOGGLE, "Y", ICON_NONE); uiItemR(sub, ptr, "use_normal_z", UI_ITEM_R_TOGGLE, "Z", ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "falloff_radius", UI_ITEM_NONE, IFACE_("Falloff"), ICON_NONE); uiItemR(col, ptr, "height", UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE); uiItemR(col, ptr, "width", UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE); @@ -345,7 +345,7 @@ static void position_panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "start_position_object", UI_ITEM_NONE, IFACE_("Object"), ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "start_position_x", UI_ITEM_NONE, IFACE_("Start Position X"), ICON_NONE); uiItemR(col, ptr, "start_position_y", UI_ITEM_NONE, "Y", ICON_NONE); } @@ -359,7 +359,7 @@ static void time_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "time_offset", UI_ITEM_NONE, IFACE_("Offset"), ICON_NONE); uiItemR(col, ptr, "lifetime", UI_ITEM_NONE, IFACE_("Life"), ICON_NONE); uiItemR(col, ptr, "damping_time", UI_ITEM_NONE, IFACE_("Damping"), ICON_NONE); @@ -380,7 +380,7 @@ static void texture_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "texture_coords", UI_ITEM_NONE, IFACE_("Coordinates"), ICON_NONE); if (texture_coords == MOD_DISP_MAP_OBJECT) { uiItemR(col, ptr, "texture_coords_object", UI_ITEM_NONE, IFACE_("Object"), ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.cc b/source/blender/modifiers/intern/MOD_weighted_normal.cc index 3b7ff83e711..a0bb6adf8a4 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.cc +++ b/source/blender/modifiers/intern/MOD_weighted_normal.cc @@ -590,7 +590,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "weight", UI_ITEM_NONE, IFACE_("Weight"), ICON_NONE); uiItemR(layout, ptr, "thresh", UI_ITEM_NONE, IFACE_("Threshold"), ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "keep_sharp", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_face_influence", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.cc b/source/blender/modifiers/intern/MOD_weightvgedit.cc index 680732d48a3..4068291dd60 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.cc +++ b/source/blender/modifiers/intern/MOD_weightvgedit.cc @@ -293,7 +293,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemPointerR( col, ptr, "vertex_group", &ob_ptr, "vertex_groups", std::nullopt, ICON_GROUP_VERTEX); diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.cc b/source/blender/modifiers/intern/MOD_weightvgproximity.cc index 9aa4f47bc84..7cfcec102e0 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.cc +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.cc @@ -646,7 +646,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "proximity_geometry", UI_ITEM_R_EXPAND, IFACE_("Geometry"), ICON_NONE); } - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "min_dist", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "max_dist", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/modifiers/intern/MOD_wireframe.cc b/source/blender/modifiers/intern/MOD_wireframe.cc index e3ce6b4a6ab..cd6cd4d02e9 100644 --- a/source/blender/modifiers/intern/MOD_wireframe.cc +++ b/source/blender/modifiers/intern/MOD_wireframe.cc @@ -111,7 +111,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "thickness", UI_ITEM_NONE, IFACE_("Thickness"), ICON_NONE); uiItemR(layout, ptr, "offset", UI_ITEM_NONE, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "use_boundary", UI_ITEM_NONE, IFACE_("Boundary"), ICON_NONE); uiItemR(col, ptr, "use_replace", UI_ITEM_NONE, IFACE_("Replace Original"), ICON_NONE); diff --git a/source/blender/nodes/NOD_socket_items_ui.hh b/source/blender/nodes/NOD_socket_items_ui.hh index f7de727bd20..cfbe6197532 100644 --- a/source/blender/nodes/NOD_socket_items_ui.hh +++ b/source/blender/nodes/NOD_socket_items_ui.hh @@ -81,14 +81,14 @@ static void draw_items_list_with_operators(const bContext *C, 0, UI_TEMPLATE_LIST_FLAG_NONE); - uiLayout *ops_col = uiLayoutColumn(row, false); + uiLayout *ops_col = &row->column(false); { - uiLayout *add_remove_col = uiLayoutColumn(ops_col, true); + uiLayout *add_remove_col = &ops_col->column(true); uiItemO(add_remove_col, "", ICON_ADD, Accessor::operator_idnames::add_item); uiItemO(add_remove_col, "", ICON_REMOVE, Accessor::operator_idnames::remove_item); } { - uiLayout *up_down_col = uiLayoutColumn(ops_col, true); + uiLayout *up_down_col = &ops_col->column(true); uiItemEnumO( up_down_col, Accessor::operator_idnames::move_item, "", ICON_TRIA_UP, "direction", 0); uiItemEnumO( diff --git a/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc b/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc index 0ed90c197c6..0f15aea2e3c 100644 --- a/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc +++ b/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc @@ -52,7 +52,7 @@ static void node_composit_buts_alphaover(uiLayout *layout, bContext * /*C*/, Poi { uiLayout *col; - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "use_premultiply", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "premul", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); } diff --git a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.cc b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.cc index b306be235d0..bc161d74287 100644 --- a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.cc +++ b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.cc @@ -49,7 +49,7 @@ static void node_composit_buts_bilateralblur(uiLayout *layout, bContext * /*C*/, { uiLayout *col; - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "iterations", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "sigma_color", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "sigma_space", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); diff --git a/source/blender/nodes/composite/nodes/node_composite_blur.cc b/source/blender/nodes/composite/nodes/node_composite_blur.cc index b9393045d3a..ede7713e17a 100644 --- a/source/blender/nodes/composite/nodes/node_composite_blur.cc +++ b/source/blender/nodes/composite/nodes/node_composite_blur.cc @@ -57,7 +57,7 @@ static void node_composit_buts_blur(uiLayout *layout, bContext * /*C*/, PointerR { uiLayout *col, *row; - col = uiLayoutColumn(layout, false); + col = &layout->column(false); const int filter = RNA_enum_get(ptr, "filter_type"); const int reference = RNA_boolean_get(ptr, "use_variable_size"); @@ -82,12 +82,12 @@ static void node_composit_buts_blur(uiLayout *layout, bContext * /*C*/, PointerR std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "factor_x", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("X"), ICON_NONE); uiItemR(col, ptr, "factor_y", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Y"), ICON_NONE); } else { - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "size_x", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("X"), ICON_NONE); uiItemR(col, ptr, "size_y", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Y"), ICON_NONE); } diff --git a/source/blender/nodes/composite/nodes/node_composite_channel_matte.cc b/source/blender/nodes/composite/nodes/node_composite_channel_matte.cc index 050116eaf4a..1c56c68ef8d 100644 --- a/source/blender/nodes/composite/nodes/node_composite_channel_matte.cc +++ b/source/blender/nodes/composite/nodes/node_composite_channel_matte.cc @@ -73,7 +73,7 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext * /*C*/, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemL(col, IFACE_("Key Channel:"), ICON_NONE); row = &col->row(false); uiItemR(row, @@ -83,7 +83,7 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext * /*C*/, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "limit_method", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); if (RNA_enum_get(ptr, "limit_method") == 0) { diff --git a/source/blender/nodes/composite/nodes/node_composite_color_spill.cc b/source/blender/nodes/composite/nodes/node_composite_color_spill.cc index 7637651f9ad..602a4ddace0 100644 --- a/source/blender/nodes/composite/nodes/node_composite_color_spill.cc +++ b/source/blender/nodes/composite/nodes/node_composite_color_spill.cc @@ -43,7 +43,7 @@ static void cmp_node_color_spill_declare(NodeDeclarationBuilder &b) std::nullopt, ICON_NONE); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemR(col, ptr, "limit_method", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); if (RNA_enum_get(ptr, "limit_method") == 0) { diff --git a/source/blender/nodes/composite/nodes/node_composite_colorbalance.cc b/source/blender/nodes/composite/nodes/node_composite_colorbalance.cc index a4c495a09ca..ed3dc8f0907 100644 --- a/source/blender/nodes/composite/nodes/node_composite_colorbalance.cc +++ b/source/blender/nodes/composite/nodes/node_composite_colorbalance.cc @@ -105,35 +105,35 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext * /*C*/, if (method == CMP_NODE_COLOR_BALANCE_LGG) { split = uiLayoutSplit(layout, 0.0f, false); - col = uiLayoutColumn(split, false); + col = &split->column(false); uiTemplateColorPicker(col, ptr, "lift", true, true, false, true); row = &col->row(false); uiItemR(row, ptr, "lift", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(split, false); + col = &split->column(false); uiTemplateColorPicker(col, ptr, "gamma", true, true, true, true); row = &col->row(false); uiItemR(row, ptr, "gamma", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(split, false); + col = &split->column(false); uiTemplateColorPicker(col, ptr, "gain", true, true, true, true); row = &col->row(false); uiItemR(row, ptr, "gain", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); } else if (method == CMP_NODE_COLOR_BALANCE_ASC_CDL) { split = uiLayoutSplit(layout, 0.0f, false); - col = uiLayoutColumn(split, false); + col = &split->column(false); uiTemplateColorPicker(col, ptr, "offset", true, true, false, true); row = &col->row(false); uiItemR(row, ptr, "offset", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "offset_basis", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(split, false); + col = &split->column(false); uiTemplateColorPicker(col, ptr, "power", true, true, false, true); row = &col->row(false); uiItemR(row, ptr, "power", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(split, false); + col = &split->column(false); uiTemplateColorPicker(col, ptr, "slope", true, true, false, true); row = &col->row(false); uiItemR(row, ptr, "slope", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); @@ -141,7 +141,7 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext * /*C*/, else if (method == CMP_NODE_COLOR_BALANCE_WHITEPOINT) { split = uiLayoutSplit(layout, 0.0f, false); - col = uiLayoutColumn(split, false); + col = &split->column(false); row = &col->row(true); uiItemL(row, IFACE_("Input"), ICON_NONE); uiTemplateCryptoPicker(row, ptr, "input_whitepoint", ICON_EYEDROPPER); @@ -153,7 +153,7 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext * /*C*/, ICON_NONE); uiItemR(col, ptr, "input_tint", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Tint"), ICON_NONE); - col = uiLayoutColumn(split, false); + col = &split->column(false); row = &col->row(true); uiItemL(row, IFACE_("Output"), ICON_NONE); uiTemplateCryptoPicker(row, ptr, "output_whitepoint", ICON_EYEDROPPER); diff --git a/source/blender/nodes/composite/nodes/node_composite_crop.cc b/source/blender/nodes/composite/nodes/node_composite_crop.cc index 6ba30a17a3a..3c76206c814 100644 --- a/source/blender/nodes/composite/nodes/node_composite_crop.cc +++ b/source/blender/nodes/composite/nodes/node_composite_crop.cc @@ -55,7 +55,7 @@ static void node_composit_buts_crop(uiLayout *layout, bContext * /*C*/, PointerR uiItemR(layout, ptr, "use_crop_size", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(layout, ptr, "relative", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); if (RNA_boolean_get(ptr, "relative")) { uiItemR(col, ptr, "rel_min_x", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Left"), ICON_NONE); uiItemR(col, ptr, "rel_max_x", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Right"), ICON_NONE); diff --git a/source/blender/nodes/composite/nodes/node_composite_defocus.cc b/source/blender/nodes/composite/nodes/node_composite_defocus.cc index cc68d51e0ce..17f63531e24 100644 --- a/source/blender/nodes/composite/nodes/node_composite_defocus.cc +++ b/source/blender/nodes/composite/nodes/node_composite_defocus.cc @@ -65,7 +65,7 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA { uiLayout *sub, *col; - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemL(col, IFACE_("Bokeh Type:"), ICON_NONE); uiItemR(col, ptr, "bokeh", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE); uiItemR(col, ptr, "angle", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); @@ -73,21 +73,21 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA uiItemR( layout, ptr, "use_gamma_correction", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer") == true); uiItemR(col, ptr, "f_stop", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(layout, ptr, "blur_max", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(layout, ptr, "threshold", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "use_preview", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiTemplateID(layout, C, ptr, "scene", nullptr, nullptr, nullptr); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "use_zbuffer", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer") == false); uiItemR(sub, ptr, "z_scale", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); } diff --git a/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc b/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc index 97ff8a124b9..2ae9732cc7e 100644 --- a/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc +++ b/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc @@ -46,14 +46,14 @@ static void node_composit_buts_dblur(uiLayout *layout, bContext * /*C*/, Pointer uiItemR(layout, ptr, "iterations", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemL(col, IFACE_("Center:"), ICON_NONE); uiItemR(col, ptr, "center_x", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("X"), ICON_NONE); uiItemR(col, ptr, "center_y", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Y"), ICON_NONE); uiItemS(layout); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "distance", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "angle", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); diff --git a/source/blender/nodes/composite/nodes/node_composite_double_edge_mask.cc b/source/blender/nodes/composite/nodes/node_composite_double_edge_mask.cc index c2b077cffe0..b704d8a82ab 100644 --- a/source/blender/nodes/composite/nodes/node_composite_double_edge_mask.cc +++ b/source/blender/nodes/composite/nodes/node_composite_double_edge_mask.cc @@ -40,7 +40,7 @@ static void node_composit_buts_double_edge_mask(uiLayout *layout, { uiLayout *col; - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemL(col, IFACE_("Inner Edge:"), ICON_NONE); uiItemR(col, ptr, "inner_mode", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE); diff --git a/source/blender/nodes/composite/nodes/node_composite_file_output.cc b/source/blender/nodes/composite/nodes/node_composite_file_output.cc index b355c9d2c9e..40bd8f8f4ee 100644 --- a/source/blender/nodes/composite/nodes/node_composite_file_output.cc +++ b/source/blender/nodes/composite/nodes/node_composite_file_output.cc @@ -327,7 +327,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi node_composit_buts_file_output(layout, C, ptr); { - uiLayout *column = uiLayoutColumn(layout, true); + uiLayout *column = &layout->column(true); uiLayoutSetPropSep(column, true); uiLayoutSetPropDecorate(column, false); uiItemR(column, ptr, "save_as_render", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); @@ -336,7 +336,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi uiTemplateImageSettings(layout, &imfptr, save_as_render); if (!save_as_render) { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayoutSetPropSep(col, true); uiLayoutSetPropDecorate(col, false); @@ -355,7 +355,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi uiItemO(layout, IFACE_("Add Input"), ICON_ADD, "NODE_OT_output_file_add_socket"); row = &layout->row(false); - col = uiLayoutColumn(row, true); + col = &row->column(true); const int active_index = RNA_int_get(ptr, "active_input_index"); /* using different collection properties if multilayer format is enabled */ @@ -399,7 +399,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi * setting this manually here */ active_input_ptr.owner_id = ptr->owner_id; - col = uiLayoutColumn(row, true); + col = &row->column(true); wmOperatorType *ot = WM_operatortype_find("NODE_OT_output_file_move_active_socket", false); uiItemFullO_ptr(col, ot, "", ICON_TRIA_UP, nullptr, WM_OP_INVOKE_DEFAULT, UI_ITEM_NONE, &op_ptr); RNA_enum_set(&op_ptr, "direction", 1); @@ -409,7 +409,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi if (active_input_ptr.data) { if (multilayer) { - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemL(col, IFACE_("Layer:"), ICON_NONE); row = &col->row(false); @@ -424,7 +424,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi nullptr); } else { - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemL(col, IFACE_("File Subpath:"), ICON_NONE); row = &col->row(false); @@ -441,7 +441,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi /* format details for individual files */ imfptr = RNA_pointer_get(&active_input_ptr, "format"); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemL(col, IFACE_("Format:"), ICON_NONE); uiItemR(col, &active_input_ptr, @@ -454,7 +454,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi if (!use_node_format) { { - uiLayout *column = uiLayoutColumn(layout, true); + uiLayout *column = &layout->column(true); uiLayoutSetPropSep(column, true); uiLayoutSetPropDecorate(column, false); uiItemR(column, @@ -467,11 +467,11 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi const bool use_color_management = RNA_boolean_get(&active_input_ptr, "save_as_render"); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiTemplateImageSettings(col, &imfptr, use_color_management); if (!use_color_management) { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayoutSetPropSep(col, true); uiLayoutSetPropDecorate(col, false); @@ -481,7 +481,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi } if (is_multiview) { - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiTemplateImageFormatViews(col, &imfptr, nullptr); } } diff --git a/source/blender/nodes/composite/nodes/node_composite_image.cc b/source/blender/nodes/composite/nodes/node_composite_image.cc index 5f73ef4ae27..9df2e8b5e4b 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.cc +++ b/source/blender/nodes/composite/nodes/node_composite_image.cc @@ -660,7 +660,7 @@ static void node_composit_buts_viewlayers(uiLayout *layout, bContext *C, Pointer return; } - col = uiLayoutColumn(layout, false); + col = &layout->column(false); row = &col->row(true); uiItemR(row, ptr, "layer", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE); diff --git a/source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc b/source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc index b79283737e9..f9fa7b07c9b 100644 --- a/source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc +++ b/source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc @@ -79,7 +79,7 @@ static void node_composit_buts_keyingscreen(uiLayout *layout, bContext *C, Point PointerRNA tracking_ptr = RNA_pointer_create_discrete( &clip->id, &RNA_MovieTracking, &clip->tracking); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA); } } diff --git a/source/blender/nodes/composite/nodes/node_composite_lensdist.cc b/source/blender/nodes/composite/nodes/node_composite_lensdist.cc index 637f1ba1e9d..3a94e99da1c 100644 --- a/source/blender/nodes/composite/nodes/node_composite_lensdist.cc +++ b/source/blender/nodes/composite/nodes/node_composite_lensdist.cc @@ -67,10 +67,10 @@ static void node_composit_buts_lensdist(uiLayout *layout, bContext * /*C*/, Poin { uiLayout *col; - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, ptr, "use_projector", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(col, false); + col = &col->column(false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_projector") == false); uiItemR(col, ptr, "use_jitter", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "use_fit", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); diff --git a/source/blender/nodes/composite/nodes/node_composite_map_range.cc b/source/blender/nodes/composite/nodes/node_composite_map_range.cc index accf499b8e3..d08b35a8d47 100644 --- a/source/blender/nodes/composite/nodes/node_composite_map_range.cc +++ b/source/blender/nodes/composite/nodes/node_composite_map_range.cc @@ -57,7 +57,7 @@ static void node_composit_buts_map_range(uiLayout *layout, bContext * /*C*/, Poi { uiLayout *col; - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "use_clamp", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); } diff --git a/source/blender/nodes/composite/nodes/node_composite_map_value.cc b/source/blender/nodes/composite/nodes/node_composite_map_value.cc index 0584480b7e1..02bcc5131f1 100644 --- a/source/blender/nodes/composite/nodes/node_composite_map_value.cc +++ b/source/blender/nodes/composite/nodes/node_composite_map_value.cc @@ -48,19 +48,19 @@ static void node_composit_buts_map_value(uiLayout *layout, bContext * /*C*/, Poi { uiLayout *sub, *col; - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "offset", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "size", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "use_min", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min")); uiItemR(sub, ptr, "min", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "use_max", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - sub = uiLayoutColumn(col, false); + sub = &col->column(false); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max")); uiItemR(sub, ptr, "max", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE); } diff --git a/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc b/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc index f04e3d1b98e..e693e0cb581 100644 --- a/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc +++ b/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc @@ -59,7 +59,7 @@ static void cmp_node_planetrackdeform_declare(NodeDeclarationBuilder &b) PointerRNA tracking_ptr = RNA_pointer_create_discrete( &clip->id, &RNA_MovieTracking, tracking); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA); tracking_object = BKE_tracking_object_get_named(tracking, diff --git a/source/blender/nodes/composite/nodes/node_composite_trackpos.cc b/source/blender/nodes/composite/nodes/node_composite_trackpos.cc index 31db4f98dab..014cbf8a6c6 100644 --- a/source/blender/nodes/composite/nodes/node_composite_trackpos.cc +++ b/source/blender/nodes/composite/nodes/node_composite_trackpos.cc @@ -78,7 +78,7 @@ static void node_composit_buts_trackpos(uiLayout *layout, bContext *C, PointerRN NodeTrackPosData *data = (NodeTrackPosData *)node->storage; PointerRNA tracking_ptr = RNA_pointer_create_discrete(&clip->id, &RNA_MovieTracking, tracking); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA); tracking_object = BKE_tracking_object_get_named(tracking, data->tracking_object); diff --git a/source/blender/nodes/function/nodes/node_fn_input_bool.cc b/source/blender/nodes/function/nodes/node_fn_input_bool.cc index 0ebefaed84f..6b4f9d7da61 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_bool.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_bool.cc @@ -16,7 +16,7 @@ static void node_declare(NodeDeclarationBuilder &b) static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemR(col, ptr, "boolean", UI_ITEM_R_EXPAND, IFACE_("Value"), ICON_NONE); } diff --git a/source/blender/nodes/function/nodes/node_fn_input_int.cc b/source/blender/nodes/function/nodes/node_fn_input_int.cc index f185fa219b8..70573109a99 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_int.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_int.cc @@ -16,7 +16,7 @@ static void node_declare(NodeDeclarationBuilder &b) static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemR(col, ptr, "integer", UI_ITEM_R_EXPAND, "", ICON_NONE); } diff --git a/source/blender/nodes/function/nodes/node_fn_input_rotation.cc b/source/blender/nodes/function/nodes/node_fn_input_rotation.cc index 108e03b564d..32cc4f8014c 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_rotation.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_rotation.cc @@ -20,7 +20,7 @@ static void node_declare(NodeDeclarationBuilder &b) static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemR(col, ptr, "rotation_euler", UI_ITEM_R_EXPAND, "", ICON_NONE); } diff --git a/source/blender/nodes/function/nodes/node_fn_input_vector.cc b/source/blender/nodes/function/nodes/node_fn_input_vector.cc index 483578e65c8..f8dc5685ea2 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_vector.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_vector.cc @@ -16,7 +16,7 @@ static void node_declare(NodeDeclarationBuilder &b) static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemR(col, ptr, "vector", UI_ITEM_R_EXPAND, "", ICON_NONE); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_bake.cc b/source/blender/nodes/geometry/nodes/node_geo_bake.cc index 31e55dbbeb3..d16f2e4e706 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_bake.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_bake.cc @@ -502,7 +502,7 @@ static void node_layout(uiLayout *layout, bContext *C, PointerRNA *ptr) } uiLayoutSetEnabled(layout, ID_IS_EDITABLE(ctx.object)); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); { uiLayout *row = &col->row(true); uiLayoutSetEnabled(row, !ctx.is_baked); @@ -524,7 +524,7 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *ptr) uiLayoutSetEnabled(layout, ID_IS_EDITABLE(ctx.object)); { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); { uiLayout *row = &col->row(true); uiLayoutSetEnabled(row, !ctx.is_baked); @@ -694,7 +694,7 @@ std::optional get_bake_state_string(const BakeDrawContext &ctx) void draw_bake_button_row(const BakeDrawContext &ctx, uiLayout *layout, const bool is_in_sidebar) { - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiLayout *row = &col->row(true); { const char *bake_label = IFACE_("Bake"); @@ -787,16 +787,16 @@ void draw_common_bake_settings(bContext *C, BakeDrawContext &ctx, uiLayout *layo uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); - uiLayout *settings_col = uiLayoutColumn(layout, false); + uiLayout *settings_col = &layout->column(false); uiLayoutSetActive(settings_col, !ctx.is_baked); { - uiLayout *col = uiLayoutColumn(settings_col, true); + uiLayout *col = &settings_col->column(true); uiItemR(col, &ctx.bake_rna, "bake_target", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *subcol = uiLayoutColumn(col, true); + uiLayout *subcol = &col->column(true); uiLayoutSetActive(subcol, ctx.bake_target == NODES_MODIFIER_BAKE_TARGET_DISK); uiItemR( subcol, &ctx.bake_rna, "use_custom_path", UI_ITEM_NONE, IFACE_("Custom Path"), ICON_NONE); - uiLayout *subsubcol = uiLayoutColumn(subcol, true); + uiLayout *subsubcol = &subcol->column(true); const bool use_custom_path = ctx.bake->flag & NODES_MODIFIER_BAKE_CUSTOM_PATH; uiLayoutSetActive(subsubcol, use_custom_path); Main *bmain = CTX_data_main(C); @@ -824,14 +824,14 @@ void draw_common_bake_settings(bContext *C, BakeDrawContext &ctx, uiLayout *layo placeholder_path); } { - uiLayout *col = uiLayoutColumn(settings_col, true); + uiLayout *col = &settings_col->column(true); uiItemR(col, &ctx.bake_rna, "use_custom_simulation_frame_range", UI_ITEM_NONE, IFACE_("Custom Range"), ICON_NONE); - uiLayout *subcol = uiLayoutColumn(col, true); + uiLayout *subcol = &col->column(true); uiLayoutSetActive(subcol, ctx.bake->flag & NODES_MODIFIER_BAKE_CUSTOM_SIMULATION_FRAME_RANGE); uiItemR(subcol, &ctx.bake_rna, "frame_start", UI_ITEM_NONE, IFACE_("Start"), ICON_NONE); uiItemR(subcol, &ctx.bake_rna, "frame_end", UI_ITEM_NONE, IFACE_("End"), ICON_NONE); diff --git a/source/blender/nodes/geometry/nodes/node_geo_index_switch.cc b/source/blender/nodes/geometry/nodes/node_geo_index_switch.cc index 2f5fe2c3afb..c55a01f448a 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_index_switch.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_index_switch.cc @@ -72,7 +72,7 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *ptr) NodeIndexSwitch &storage = node_storage(node); if (uiLayout *panel = uiLayoutPanel(C, layout, "index_switch_items", false, IFACE_("Items"))) { uiItemO(panel, IFACE_("Add Item"), ICON_ADD, "node.index_switch_item_add"); - uiLayout *col = uiLayoutColumn(panel, false); + uiLayout *col = &panel->column(false); for (const int i : IndexRange(storage.items_num)) { uiLayout *row = &col->row(false); uiItemL(row, node.input_socket(i + 1).name, ICON_NONE); diff --git a/source/blender/nodes/geometry/nodes/node_geo_simulation.cc b/source/blender/nodes/geometry/nodes/node_geo_simulation.cc index 76c3733bfd8..7f24075997f 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_simulation.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_simulation.cc @@ -233,7 +233,7 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *current_no uiLayoutSetEnabled(layout, ID_IS_EDITABLE(ctx.object)); { - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); draw_bake_button_row(ctx, col, true); if (const std::optional bake_state_str = get_bake_state_string(ctx)) { uiLayout *row = &col->row(true); diff --git a/source/blender/nodes/shader/nodes/node_shader_output_linestyle.cc b/source/blender/nodes/shader/nodes/node_shader_output_linestyle.cc index 78dbfeb3488..62076c9c3b3 100644 --- a/source/blender/nodes/shader/nodes/node_shader_output_linestyle.cc +++ b/source/blender/nodes/shader/nodes/node_shader_output_linestyle.cc @@ -29,7 +29,7 @@ static void node_buts_output_linestyle(uiLayout *layout, bContext * /*C*/, Point { uiLayout *row, *col; - col = uiLayoutColumn(layout, false); + col = &layout->column(false); row = &col->row(true); uiItemR(row, ptr, "blend_type", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE); uiItemR(col, ptr, "use_clamp", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_brick.cc b/source/blender/nodes/shader/nodes/node_shader_tex_brick.cc index 907eaba0cb3..4de1975d5ea 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_brick.cc +++ b/source/blender/nodes/shader/nodes/node_shader_tex_brick.cc @@ -80,7 +80,7 @@ static void node_shader_buts_tex_brick(uiLayout *layout, bContext * /*C*/, Point { uiLayout *col; - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "offset", @@ -90,7 +90,7 @@ static void node_shader_buts_tex_brick(uiLayout *layout, bContext * /*C*/, Point uiItemR( col, ptr, "offset_frequency", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Frequency"), ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "squash", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Squash"), ICON_NONE); uiItemR( col, ptr, "squash_frequency", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Frequency"), ICON_NONE); diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc b/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc index 6f3e06ea428..afea38d9965 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc +++ b/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc @@ -50,18 +50,18 @@ static void node_shader_buts_tex_sky(uiLayout *layout, bContext *C, PointerRNA * uiLayout *col; if (RNA_boolean_get(ptr, "sun_disc")) { - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "sun_size", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "sun_intensity", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); } - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "sun_elevation", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "sun_rotation", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(layout, ptr, "altitude", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); - col = uiLayoutColumn(layout, true); + col = &layout->column(true); uiItemR(col, ptr, "air_density", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "dust_density", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); uiItemR(col, ptr, "ozone_density", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); diff --git a/source/blender/shader_fx/intern/FX_shader_blur.cc b/source/blender/shader_fx/intern/FX_shader_blur.cc index 32a9eb93d68..f9863dacd55 100644 --- a/source/blender/shader_fx/intern/FX_shader_blur.cc +++ b/source/blender/shader_fx/intern/FX_shader_blur.cc @@ -48,7 +48,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "samples", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(layout, ptr, "use_dof_mode", UI_ITEM_NONE, IFACE_("Use Depth of Field"), ICON_NONE); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiLayoutSetActive(col, !RNA_boolean_get(ptr, "use_dof_mode")); uiItemR(col, ptr, "size", UI_ITEM_NONE, std::nullopt, ICON_NONE); uiItemR(col, ptr, "rotation", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/shader_fx/intern/FX_shader_pixel.cc b/source/blender/shader_fx/intern/FX_shader_pixel.cc index 89006c8d858..e9cd5ae105c 100644 --- a/source/blender/shader_fx/intern/FX_shader_pixel.cc +++ b/source/blender/shader_fx/intern/FX_shader_pixel.cc @@ -45,7 +45,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); /* Add the X, Y labels manually because size is a #PROP_PIXEL. */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); PropertyRNA *prop = RNA_struct_find_property(ptr, "size"); uiItemFullR(col, ptr, prop, 0, 0, UI_ITEM_NONE, IFACE_("Size X"), ICON_NONE); uiItemFullR(col, ptr, prop, 1, 0, UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); diff --git a/source/blender/shader_fx/intern/FX_shader_rim.cc b/source/blender/shader_fx/intern/FX_shader_rim.cc index 9e445348d24..5d1627952b4 100644 --- a/source/blender/shader_fx/intern/FX_shader_rim.cc +++ b/source/blender/shader_fx/intern/FX_shader_rim.cc @@ -55,7 +55,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "mode", UI_ITEM_NONE, IFACE_("Blend Mode"), ICON_NONE); /* Add the X, Y labels manually because offset is a #PROP_PIXEL. */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); PropertyRNA *prop = RNA_struct_find_property(ptr, "offset"); uiItemFullR(col, ptr, prop, 0, 0, UI_ITEM_NONE, IFACE_("Offset X"), ICON_NONE); uiItemFullR(col, ptr, prop, 1, 0, UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); @@ -73,7 +73,7 @@ static void blur_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); /* Add the X, Y labels manually because blur is a #PROP_PIXEL. */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); PropertyRNA *prop = RNA_struct_find_property(ptr, "blur"); uiItemFullR(col, ptr, prop, 0, 0, UI_ITEM_NONE, IFACE_("Blur X"), ICON_NONE); uiItemFullR(col, ptr, prop, 1, 0, UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); diff --git a/source/blender/shader_fx/intern/FX_shader_shadow.cc b/source/blender/shader_fx/intern/FX_shader_shadow.cc index 234660265c4..99216d9d718 100644 --- a/source/blender/shader_fx/intern/FX_shader_shadow.cc +++ b/source/blender/shader_fx/intern/FX_shader_shadow.cc @@ -87,7 +87,7 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) uiItemR(layout, ptr, "shadow_color", UI_ITEM_NONE, std::nullopt, ICON_NONE); /* Add the X, Y labels manually because size is a #PROP_PIXEL. */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); PropertyRNA *prop = RNA_struct_find_property(ptr, "offset"); uiItemFullR(col, ptr, prop, 0, 0, UI_ITEM_NONE, IFACE_("Offset X"), ICON_NONE); uiItemFullR(col, ptr, prop, 1, 0, UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); @@ -112,7 +112,7 @@ static void blur_panel_draw(const bContext * /*C*/, Panel *panel) uiLayoutSetPropSep(layout, true); /* Add the X, Y labels manually because size is a #PROP_PIXEL. */ - col = uiLayoutColumn(layout, true); + col = &layout->column(true); PropertyRNA *prop = RNA_struct_find_property(ptr, "blur"); uiItemFullR(col, ptr, prop, 0, 0, UI_ITEM_NONE, IFACE_("Blur X"), ICON_NONE); uiItemFullR(col, ptr, prop, 1, 0, UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); diff --git a/source/blender/shader_fx/intern/FX_ui_common.cc b/source/blender/shader_fx/intern/FX_ui_common.cc index 5ae76c9d9e9..5aa0d28eeb8 100644 --- a/source/blender/shader_fx/intern/FX_ui_common.cc +++ b/source/blender/shader_fx/intern/FX_ui_common.cc @@ -129,7 +129,7 @@ static void gpencil_shaderfx_ops_extra_draw(bContext *C, uiLayout *layout, void uiItemS(layout); /* Move to first. */ - row = uiLayoutColumn(layout, false); + row = &layout->column(false); uiItemFullO(row, "OBJECT_OT_shaderfx_move_to_index", IFACE_("Move to First"), @@ -144,7 +144,7 @@ static void gpencil_shaderfx_ops_extra_draw(bContext *C, uiLayout *layout, void } /* Move to last. */ - row = uiLayoutColumn(layout, false); + row = &layout->column(false); uiItemFullO(row, "OBJECT_OT_shaderfx_move_to_index", IFACE_("Move to Last"), diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 717ff5cd63e..87036485385 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -3336,7 +3336,7 @@ static void wm_open_mainfile_ui(bContext * /*C*/, wmOperator *op) uiItemR(layout, op->ptr, "load_ui", UI_ITEM_NONE, std::nullopt, ICON_NONE); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); if (file_info->is_untrusted) { autoexec_text = IFACE_("Trusted Source [Untrusted Path]"); uiLayoutSetActive(col, false); @@ -4130,7 +4130,7 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void block, style, dialog_width + icon_size, ALERT_ICON_ERROR, icon_size); /* Title and explanation text. */ - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemL_ex(col, title, ICON_NONE, true, false); uiItemL_ex(col, G.autoexec_fail, ICON_NONE, false, true); uiItemL(col, message, ICON_NONE); @@ -4148,10 +4148,10 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void uiLayoutSetScaleY(split, 1.2f); /* Empty space. */ - col = uiLayoutColumn(split, false); + col = &split->column(false); uiItemS(col); - col = uiLayoutColumn(split, false); + col = &split->column(false); /* Allow reload if we have a saved file. * Otherwise just enable scripts and reset the depsgraphs. */ @@ -4191,7 +4191,7 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void } UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); - col = uiLayoutColumn(split, false); + col = &split->column(false); but = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, @@ -4311,7 +4311,7 @@ static const char *save_file_overwrite_dialog_name = "save_file_overwrite_popup" static void file_overwrite_detailed_info_show(uiLayout *parent_layout, Main *bmain) { - uiLayout *layout = uiLayoutColumn(parent_layout, true); + uiLayout *layout = &parent_layout->column(true); /* Trick to make both lines of text below close enough to look like they are part of a same * block. */ uiLayoutSetScaleY(layout, 0.70f); @@ -4504,7 +4504,7 @@ static uiBlock *block_create_save_file_overwrite_dialog(bContext *C, ARegion *re uiLayout *split = uiLayoutSplit(layout, 0.3f, true); uiLayoutSetScaleY(split, 1.2f); - uiLayoutColumn(split, false); + split->column(false); /* Asset files don't actually allow overriding. */ const bool allow_overwrite = !bmain->is_asset_edit_file; if (allow_overwrite) { @@ -4513,13 +4513,13 @@ static uiBlock *block_create_save_file_overwrite_dialog(bContext *C, ARegion *re uiLayout *split_right = uiLayoutSplit(split, 0.1f, true); - uiLayoutColumn(split_right, false); + split_right->column(false); /* Empty space. */ - uiLayoutColumn(split_right, false); + split_right->column(false); save_file_overwrite_cancel_button(block, post_action); - uiLayoutColumn(split_right, false); + split_right->column(false); save_file_overwrite_saveas_button(block, post_action); UI_block_bounds_set_centered(block, 14 * UI_SCALE_FAC); @@ -4722,7 +4722,7 @@ static uiBlock *block_create__close_file_dialog(bContext *C, ARegion *region, vo uint modified_images_count = ED_image_save_all_modified_info(bmain, &reports); LISTBASE_FOREACH (Report *, report, &reports.list) { - uiLayout *row = uiLayoutColumn(layout, false); + uiLayout *row = &layout->column(false); uiLayoutSetScaleY(row, 0.6f); uiItemS(row); @@ -4817,13 +4817,13 @@ static uiBlock *block_create__close_file_dialog(bContext *C, ARegion *region, vo uiLayout *split = uiLayoutSplit(layout, 0.0f, true); uiLayoutSetScaleY(split, 1.2f); - uiLayoutColumn(split, false); + split->column(false); wm_block_file_close_save_button(block, post_action, needs_overwrite_confirm); - uiLayoutColumn(split, false); + split->column(false); wm_block_file_close_discard_button(block, post_action); - uiLayoutColumn(split, false); + split->column(false); wm_block_file_close_cancel_button(block, post_action); } else { @@ -4832,18 +4832,18 @@ static uiBlock *block_create__close_file_dialog(bContext *C, ARegion *region, vo uiLayout *split = uiLayoutSplit(layout, 0.3f, true); uiLayoutSetScaleY(split, 1.2f); - uiLayoutColumn(split, false); + split->column(false); wm_block_file_close_discard_button(block, post_action); uiLayout *split_right = uiLayoutSplit(split, 0.1f, true); - uiLayoutColumn(split_right, false); + split_right->column(false); /* Empty space. */ - uiLayoutColumn(split_right, false); + split_right->column(false); wm_block_file_close_cancel_button(block, post_action); - uiLayoutColumn(split_right, false); + split_right->column(false); wm_block_file_close_save_button(block, post_action, needs_overwrite_confirm); } diff --git a/source/blender/windowmanager/intern/wm_operators.cc b/source/blender/windowmanager/intern/wm_operators.cc index 12d830a058f..6928e1aed7d 100644 --- a/source/blender/windowmanager/intern/wm_operators.cc +++ b/source/blender/windowmanager/intern/wm_operators.cc @@ -1455,7 +1455,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *region, void *arg_op) uiItemS_ex(layout, 0.2f, LayoutSeparatorType::Line); uiItemS_ex(layout, 0.5f); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiTemplateOperatorPropertyButs(C, col, op, UI_BUT_LABEL_ALIGN_NONE, 0); UI_block_bounds_set_popup(block, 7 * UI_SCALE_FAC, nullptr); @@ -1588,7 +1588,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *user_ /* Message lines. */ if (message_lines.size() > 0) { - uiLayout *lines = uiLayoutColumn(layout, false); + uiLayout *lines = &layout->column(false); uiLayoutSetScaleY(lines, 0.65f); uiItemS_ex(lines, 0.1f); for (auto &st : message_lines) { @@ -1616,7 +1616,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *user_ * confirmation buttons which are shown instead of these, see: #124098. */ if (!UI_block_has_active_default_button(uiLayoutGetBlock(layout))) { /* New column so as not to interfere with custom layouts, see: #26436. */ - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiBlock *col_block = uiLayoutGetBlock(col); uiBut *confirm_but; uiBut *cancel_but; @@ -1637,14 +1637,14 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *user_ 0, 0, ""); - uiLayoutColumn(col, false); + col->column(false); } cancel_but = uiDefBut( col_block, UI_BTYPE_BUT, 0, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, ""); if (!windows_layout) { - uiLayoutColumn(col, false); + col->column(false); confirm_but = uiDefBut(col_block, UI_BTYPE_BUT, 0, diff --git a/source/blender/windowmanager/intern/wm_splash_screen.cc b/source/blender/windowmanager/intern/wm_splash_screen.cc index 914d61d4652..24a2c622bea 100644 --- a/source/blender/windowmanager/intern/wm_splash_screen.cc +++ b/source/blender/windowmanager/intern/wm_splash_screen.cc @@ -471,7 +471,7 @@ static uiBlock *wm_block_about_create(bContext *C, ARegion *region, void * /*arg } #endif /* !WITH_HEADLESS */ - uiLayout *col = uiLayoutColumn(layout, true); + uiLayout *col = &layout->column(true); uiItemL_ex(col, IFACE_("Blender"), ICON_NONE, true, false); diff --git a/source/blender/windowmanager/intern/wm_stereo.cc b/source/blender/windowmanager/intern/wm_stereo.cc index dc852bb86d6..5fb032e774d 100644 --- a/source/blender/windowmanager/intern/wm_stereo.cc +++ b/source/blender/windowmanager/intern/wm_stereo.cc @@ -363,7 +363,7 @@ void wm_stereo3d_set_draw(bContext * /*C*/, wmOperator *op) uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); - col = uiLayoutColumn(layout, false); + col = &layout->column(false); uiItemR(col, &stereo3d_format_ptr, "display_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE); switch (s3dd->stereo3d_format.display_mode) { diff --git a/source/blender/windowmanager/intern/wm_window.cc b/source/blender/windowmanager/intern/wm_window.cc index 2f17a065551..538738e8671 100644 --- a/source/blender/windowmanager/intern/wm_window.cc +++ b/source/blender/windowmanager/intern/wm_window.cc @@ -2118,14 +2118,14 @@ static uiBlock *block_create_opengl_usage_warning(bContext *C, ARegion *region, uiLayout *layout = uiItemsAlertBox( block, style, dialog_width + icon_size, ALERT_ICON_ERROR, icon_size); - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetScaleY(col, 0.9f); /* Title and explanation text. */ uiItemL_ex(col, title, ICON_NONE, true, false); uiItemS_ex(col, 0.8f, LayoutSeparatorType::Space); - uiLayout *messages = uiLayoutColumn(col, false); + uiLayout *messages = &col->column(false); uiLayoutSetScaleY(messages, 0.8f); uiItemL(messages, message1, ICON_NONE); @@ -2194,7 +2194,7 @@ static uiBlock *block_create_gpu_backend_fallback(bContext *C, ARegion *region, uiLayout *layout = uiItemsAlertBox(block, 44, ALERT_ICON_ERROR); /* Title and explanation text. */ - uiLayout *col = uiLayoutColumn(layout, false); + uiLayout *col = &layout->column(false); uiLayoutSetScaleY(col, 0.8f); uiItemL_ex( col, RPT_("Failed to load using Vulkan, using OpenGL instead."), ICON_NONE, true, false);