UI: move pivot to the topbar
Pivot variables are now stored in scene toolsettings.
This commit is contained in:
@@ -438,6 +438,18 @@ static const EnumPropertyItem rna_enum_gpencil_interpolation_mode_items[] = {
|
||||
|
||||
#endif
|
||||
|
||||
const EnumPropertyItem rna_enum_transform_pivot_items_full[] = {
|
||||
{V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center",
|
||||
"Pivot around bounding box center of selected object(s)"},
|
||||
{V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Pivot around the 3D cursor"},
|
||||
{V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION,
|
||||
"Individual Origins", "Pivot around each object's own origin"},
|
||||
{V3D_AROUND_CENTER_MEAN, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point",
|
||||
"Pivot around the median point of selected objects"},
|
||||
{V3D_AROUND_ACTIVE, "ACTIVE_ELEMENT", ICON_ROTACTIVE, "Active Element", "Pivot around active object"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
/* Icons could be made a consistent set of images. */
|
||||
static const EnumPropertyItem transform_orientation_items[] = {
|
||||
{V3D_MANIP_GLOBAL, "GLOBAL", ICON_SCENE_DATA, "Global", "Align the transformation axes to world space"},
|
||||
@@ -2587,6 +2599,19 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
||||
RNA_def_property_range(prop, 0.0, 1.0);
|
||||
RNA_def_property_ui_range(prop, 0.0, 0.1, 0.01, 6);
|
||||
|
||||
/* Pivot Point */
|
||||
prop = RNA_def_property(srna, "transform_pivot_point", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "transform_pivot_point");
|
||||
RNA_def_property_enum_items(prop, rna_enum_transform_pivot_items_full);
|
||||
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "use_transform_pivot_point_align", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "transform_flag", SCE_XFORM_AXIS_ALIGN);
|
||||
RNA_def_property_ui_text(prop, "Align", "Manipulate center points (object, pose and weight paint mode only)");
|
||||
RNA_def_property_ui_icon(prop, ICON_ALIGN, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "use_mesh_automerge", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
|
||||
RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location");
|
||||
|
||||
Reference in New Issue
Block a user