Fix #111715: VSE: "Bounding Box Center" pivot point is the same as "Median Point"

The logic to calculate the bounds was missing.

Also add a notifier with `NC_SPACE | ND_SPACE_SEQUENCER` to update the
space.
This commit is contained in:
Germano Cavalcante
2023-08-31 15:07:15 -03:00
parent d81a32dcaa
commit 14a9c2b1aa
2 changed files with 4 additions and 0 deletions
@@ -396,6 +396,9 @@ static bool gizmo2d_calc_transform_pivot(const bContext *C, float r_pivot[2])
has_select = SEQ_collection_len(strips) != 0;
SEQ_collection_free(strips);
}
else if (pivot_point == V3D_AROUND_CENTER_BOUNDS) {
has_select = gizmo2d_calc_bounds(C, r_pivot, nullptr, nullptr);
}
else {
has_select = seq_get_strip_pivot_median(scene, r_pivot);
}
@@ -3951,6 +3951,7 @@ static void rna_def_sequencer_tool_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, pivot_points);
RNA_def_property_ui_text(prop, "Pivot Point", "Rotation or scaling pivot point");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, nullptr);
}
static void rna_def_unified_paint_settings(BlenderRNA *brna)