diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-07 04:32:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-07 19:27:55 +0300 |
commit | d04d27b406b856396102452cab0eedf315e94a54 (patch) | |
tree | 4a881ab29123828287f83272a0ca1d03b62b4472 /source/blender/makesrna | |
parent | 919e513fa8f9fb4f1304ea4b752869b6d63b1608 (diff) |
Sequencer: 2D cursor for the preview & transform
- Use 2D cursor in the preview space using shortcuts
matching the UV editor and 3D view.
- Add Cursor tool, cursor transform.
- Support for cursor and bound-box pivot.
- Add pivot pie menu.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 5b46dfa8210..3468cab9eea 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -3539,7 +3539,9 @@ static void rna_def_sequencer_tool_settings(BlenderRNA *brna) }; static const EnumPropertyItem pivot_points[] = { + {V3D_AROUND_CENTER_BOUNDS, "CENTER", ICON_PIVOT_BOUNDBOX, "Bounding Box Center", ""}, {V3D_AROUND_CENTER_MEDIAN, "MEDIAN", ICON_PIVOT_MEDIAN, "Median Point", ""}, + {V3D_AROUND_CURSOR, "CURSOR", ICON_PIVOT_CURSOR, "2D Cursor", "Pivot around the 2D cursor"}, {V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_PIVOT_INDIVIDUAL, diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 652d2545e67..9d8e06b3c56 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -5690,6 +5690,13 @@ static void rna_def_space_sequencer(BlenderRNA *brna) rna_def_space_sequencer_preview_overlay(brna); rna_def_space_sequencer_timeline_overlay(brna); + + /* transform */ + prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ); + RNA_def_property_float_sdna(prop, NULL, "cursor"); + RNA_def_property_array(prop, 2); + RNA_def_property_ui_text(prop, "2D Cursor Location", "2D cursor location for this view"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); } static void rna_def_space_text(BlenderRNA *brna) |