diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc index 35cb0e11005..910440c0361 100644 --- a/source/blender/editors/curves/intern/curves_ops.cc +++ b/source/blender/editors/curves/intern/curves_ops.cc @@ -905,11 +905,12 @@ static int select_random_exec(bContext *C, wmOperator *op) for (Curves *curves_id : unique_curves) { CurvesGeometry &curves = curves_id->geometry.wrap(); const eAttrDomain selection_domain = eAttrDomain(curves_id->selection_domain); + const int domain_size = curves.attributes().domain_size(selection_domain); IndexMaskMemory memory; const IndexMask inv_random_elements = random_mask( curves, selection_domain, seed, probability, memory) - .complement(curves.points_range(), memory); + .complement(IndexRange(domain_size), memory); const bool was_anything_selected = has_anything_selected(curves); bke::GSpanAttributeWriter selection = ensure_selection_attribute( diff --git a/source/blender/editors/space_node/add_menu_assets.cc b/source/blender/editors/space_node/add_menu_assets.cc index 6605d11d118..4faf210461a 100644 --- a/source/blender/editors/space_node/add_menu_assets.cc +++ b/source/blender/editors/space_node/add_menu_assets.cc @@ -187,7 +187,7 @@ static void node_add_catalog_assets_draw(const bContext *C, Menu *menu) IFACE_(asset->get_name().c_str()), ICON_NONE, nullptr, - WM_OP_INVOKE_DEFAULT, + WM_OP_INVOKE_REGION_WIN, UI_ITEM_NONE, &op_ptr); asset::operator_asset_reference_props_set(*asset, op_ptr); @@ -234,7 +234,7 @@ static void node_add_unassigned_assets_draw(const bContext *C, Menu *menu) IFACE_(asset->get_name().c_str()), ICON_NONE, nullptr, - WM_OP_INVOKE_DEFAULT, + WM_OP_INVOKE_REGION_WIN, UI_ITEM_NONE, &op_ptr); asset::operator_asset_reference_props_set(*asset, op_ptr);