Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-10-18 07:47:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-18 07:47:28 +0300
commite538b2c3a38f130787ca604b0e0182a74e9d6976 (patch)
tree60fa8f77f52e132d55d62d09cff1be5c4297fd2c /source/blender/makesrna
parentc5a13ffcb4b98bbd46dca7637051a966d18cd46f (diff)
Cleanup: internal sequencer naming for overlays
- Rename RNA SpaceSeq.show_strip_overlay to show_overlays matching the 3D View, the term "strip" was misleading as this is used for the preview as well. - Rename various RNA overlay settings to overlay_frame since "Frame Offset" is a specific feature, avoid having both Editor.show_overlay and SpaceSeq.show_overlays. - Rename Editing `over_*` -> `overlay_frame_*` in DNA, as well as flags.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c32
-rw-r--r--source/blender/makesrna/intern/rna_space.c16
2 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index c9bcd5e0a0d..cc302c4dd89 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -1121,13 +1121,13 @@ static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, bool value)
}
/* convert from abs to relative and back */
- if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) == 0 && value) {
- ed->over_cfra = scene->r.cfra + ed->over_ofs;
- ed->over_flag |= SEQ_EDIT_OVERLAY_ABS;
+ if ((ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_ABS) == 0 && value) {
+ ed->overlay_frame_abs = scene->r.cfra + ed->overlay_frame_ofs;
+ ed->overlay_frame_flag |= SEQ_EDIT_OVERLAY_FRAME_ABS;
}
- else if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) && !value) {
- ed->over_ofs = ed->over_cfra - scene->r.cfra;
- ed->over_flag &= ~SEQ_EDIT_OVERLAY_ABS;
+ else if ((ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_ABS) && !value) {
+ ed->overlay_frame_ofs = ed->overlay_frame_abs - scene->r.cfra;
+ ed->overlay_frame_flag &= ~SEQ_EDIT_OVERLAY_FRAME_ABS;
}
}
@@ -1140,11 +1140,11 @@ static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
return scene->r.cfra;
}
- if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS) {
- return ed->over_cfra - scene->r.cfra;
+ if (ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_ABS) {
+ return ed->overlay_frame_abs - scene->r.cfra;
}
else {
- return ed->over_ofs;
+ return ed->overlay_frame_ofs;
}
}
@@ -1157,11 +1157,11 @@ static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
return;
}
- if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS) {
- ed->over_cfra = (scene->r.cfra + value);
+ if (ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_ABS) {
+ ed->overlay_frame_abs = (scene->r.cfra + value);
}
else {
- ed->over_ofs = value;
+ ed->overlay_frame_ofs = value;
}
}
@@ -2113,14 +2113,14 @@ static void rna_def_editor(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active Strip", "Sequencer's active strip");
- prop = RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_USE_FRAME_OVERLAY);
+ prop = RNA_def_property(srna, "show_overlay_frame", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "overlay_frame_flag", SEQ_EDIT_OVERLAY_FRAME_SHOW);
RNA_def_property_ui_text(
prop, "Show Overlay", "Partial overlay on top of the sequencer with a frame offset");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
- prop = RNA_def_property(srna, "use_overlay_lock", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_ABS);
+ prop = RNA_def_property(srna, "use_overlay_frame_lock", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "overlay_frame_flag", SEQ_EDIT_OVERLAY_FRAME_ABS);
RNA_def_property_ui_text(prop, "Overlay Lock", "");
RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_overlay_lock_set");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 8f9d4addd30..3255bc30d4c 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -5531,10 +5531,10 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
- static const EnumPropertyItem overlay_type_items[] = {
- {SEQ_DRAW_OVERLAY_RECT, "RECTANGLE", 0, "Rectangle", "Show rectangle area overlay"},
- {SEQ_DRAW_OVERLAY_REFERENCE, "REFERENCE", 0, "Reference", "Show reference frame only"},
- {SEQ_DRAW_OVERLAY_CURRENT, "CURRENT", 0, "Current", "Show current frame only"},
+ static const EnumPropertyItem overlay_frame_type_items[] = {
+ {SEQ_OVERLAY_FRAME_TYPE_RECT, "RECTANGLE", 0, "Rectangle", "Show rectangle area overlay"},
+ {SEQ_OVERLAY_FRAME_TYPE_REFERENCE, "REFERENCE", 0, "Reference", "Show reference frame only"},
+ {SEQ_OVERLAY_FRAME_TYPE_CURRENT, "CURRENT", 0, "Current", "Show current frame only"},
{0, NULL, 0, NULL, NULL},
};
@@ -5654,9 +5654,9 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil data for this Preview region");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
- prop = RNA_def_property(srna, "overlay_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "overlay_type");
- RNA_def_property_enum_items(prop, overlay_type_items);
+ prop = RNA_def_property(srna, "overlay_frame_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "overlay_frame_type");
+ RNA_def_property_enum_items(prop, overlay_frame_type_items);
RNA_def_property_ui_text(prop, "Overlay Type", "Overlay display method");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
@@ -5692,7 +5692,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
/* Overlay settings. */
- prop = RNA_def_property(srna, "show_strip_overlay", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_SHOW_OVERLAY);
RNA_def_property_ui_text(prop, "Show Overlay", "");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);