UI: allow to hide markers region per editor

Instead of having the option to show marker lines,
make the marker region optional.

- Added a Show Markers entry in the View menu of the animation editors.
- If the markers region is not active then the Marker menu gets hidden.
- Removed marker menu from the driver editor
  and don't allow to use marker operators.
This commit is contained in:
Alessio Monti di Sopra
2019-11-30 17:03:22 +11:00
committed by Campbell Barton
parent f478fef9d6
commit dc87d09b8b
17 changed files with 179 additions and 110 deletions

View File

@@ -288,7 +288,8 @@ class DOPESHEET_MT_editor_menus(Menu):
layout.menu("DOPESHEET_MT_view")
layout.menu("DOPESHEET_MT_select")
layout.menu("DOPESHEET_MT_marker")
if st.show_markers:
layout.menu("DOPESHEET_MT_marker")
if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action is not None):
layout.menu("DOPESHEET_MT_channel")
@@ -322,9 +323,12 @@ class DOPESHEET_MT_view(Menu):
layout.prop(st, "show_group_colors")
layout.prop(st, "show_interpolation")
layout.prop(st, "show_extremes")
layout.prop(st, "show_marker_lines")
layout.prop(st, "use_auto_merge_keyframes")
layout.separator()
layout.prop(st, "show_markers")
layout.separator()
layout.prop(st, "show_seconds")
layout.prop(st, "show_locked_time")

View File

@@ -94,10 +94,12 @@ class GRAPH_MT_editor_menus(Menu):
bl_label = ""
def draw(self, _context):
st = _context.space_data
layout = self.layout
layout.menu("GRAPH_MT_view")
layout.menu("GRAPH_MT_select")
layout.menu("GRAPH_MT_marker")
if st.mode != 'DRIVERS' and st.show_markers:
layout.menu("GRAPH_MT_marker")
layout.menu("GRAPH_MT_channel")
layout.menu("GRAPH_MT_key")
@@ -117,9 +119,12 @@ class GRAPH_MT_view(Menu):
layout.prop(st, "show_cursor")
layout.prop(st, "show_sliders")
layout.prop(st, "show_group_colors")
layout.prop(st, "show_marker_lines")
layout.prop(st, "use_auto_merge_keyframes")
if st.mode != 'DRIVERS':
layout.separator()
layout.prop(st, "show_markers")
layout.separator()
layout.prop(st, "use_beauty_drawing")

View File

@@ -71,10 +71,12 @@ class NLA_MT_editor_menus(Menu):
bl_label = ""
def draw(self, _context):
st = _context.space_data
layout = self.layout
layout.menu("NLA_MT_view")
layout.menu("NLA_MT_select")
layout.menu("NLA_MT_marker")
if st.show_markers:
layout.menu("NLA_MT_marker")
layout.menu("NLA_MT_edit")
layout.menu("NLA_MT_add")
@@ -96,8 +98,10 @@ class NLA_MT_view(Menu):
layout.prop(st, "show_locked_time")
layout.prop(st, "show_strip_curves")
layout.separator()
layout.prop(st, "show_markers")
layout.prop(st, "show_local_markers")
layout.prop(st, "show_marker_lines")
layout.separator()
layout.operator("anim.previewrange_set")

View File

@@ -134,7 +134,8 @@ class SEQUENCER_MT_editor_menus(Menu):
if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
layout.menu("SEQUENCER_MT_select")
layout.menu("SEQUENCER_MT_marker")
if st.show_markers:
layout.menu("SEQUENCER_MT_marker")
layout.menu("SEQUENCER_MT_add")
layout.menu("SEQUENCER_MT_strip")
@@ -268,7 +269,8 @@ class SEQUENCER_MT_view(Menu):
layout.prop(st, "show_seconds")
layout.prop(st, "show_strip_offset")
layout.prop(st, "show_marker_lines")
layout.separator()
layout.prop(st, "show_markers")
if is_preview:
layout.separator()

View File

@@ -90,6 +90,7 @@ class TIME_MT_editor_menus(Menu):
def draw(self, _context):
layout = self.layout
horizontal = (layout.direction == 'VERTICAL')
st = _context.space_data
if horizontal:
row = layout.row()
sub = row.row(align=True)
@@ -109,7 +110,8 @@ class TIME_MT_editor_menus(Menu):
sub = row.row(align=True)
sub.menu("TIME_MT_view")
sub.menu("TIME_MT_marker")
if st.show_markers:
sub.menu("TIME_MT_marker")
class TIME_MT_marker(Menu):
@@ -135,7 +137,10 @@ class TIME_MT_view(Menu):
layout.separator()
layout.prop(st, "show_marker_lines")
layout.prop(st, "show_markers")
layout.separator()
layout.prop(scene, "show_keys_from_selected_only")
layout.separator()

View File

@@ -27,7 +27,7 @@
* \note Use #STRINGIFY() rather than defining with quotes.
*/
#define BLENDER_VERSION 282
#define BLENDER_SUBVERSION 2
#define BLENDER_SUBVERSION 3
/** Several breakages with 280, e.g. collections vs layers. */
#define BLENDER_MINVERSION 280
#define BLENDER_MINSUBVERSION 0

View File

@@ -3394,19 +3394,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
if (!MAIN_VERSION_ATLEAST(bmain, 280, 45)) {
for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
for (ScrArea *area = screen->areabase.first; area; area = area->next) {
for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_SEQ) {
SpaceSeq *sseq = (SpaceSeq *)sl;
sseq->flag |= SEQ_SHOW_MARKER_LINES;
}
}
}
}
}
if (!MAIN_VERSION_ATLEAST(bmain, 280, 46)) {
/* Add wireframe color. */
if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "char", "wire_color_type")) {
@@ -4222,9 +4209,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
{
/* Versioning code until next subversion bump goes here. */
if (!MAIN_VERSION_ATLEAST(bmain, 282, 3)) {
/* Remove Unified pressure/size and pressure/alpha */
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
ToolSettings *ts = scene->toolsettings;
@@ -4249,5 +4234,39 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
/* Make markers region visible by default. */
for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
for (ScrArea *area = screen->areabase.first; area; area = area->next) {
for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) {
switch (sl->spacetype) {
case SPACE_SEQ: {
SpaceSeq *sseq = (SpaceSeq *)sl;
sseq->flag |= SEQ_SHOW_MARKERS;
break;
}
case SPACE_ACTION: {
SpaceAction *saction = (SpaceAction *)sl;
saction->flag |= SACTION_SHOW_MARKERS;
break;
}
case SPACE_GRAPH: {
SpaceGraph *sipo = (SpaceGraph *)sl;
sipo->flag |= SIPO_SHOW_MARKERS;
break;
}
case SPACE_NLA: {
SpaceNla *snla = (SpaceNla *)sl;
snla->flag |= SNLA_SHOW_MARKERS;
break;
}
}
}
}
}
}
{
/* Versioning code until next subversion bump goes here. */
}
}

View File

@@ -150,10 +150,9 @@ static void blo_update_defaults_screen(bScreen *screen,
}
}
else if (sa->spacetype == SPACE_ACTION) {
/* Show marker lines, hide channels and collapse summary in timelines. */
/* Show markers region, hide channels and collapse summary in timelines. */
SpaceAction *saction = sa->spacedata.first;
saction->flag |= SACTION_SHOW_MARKER_LINES;
saction->flag |= SACTION_SHOW_MARKERS;
if (saction->mode == SACTCONT_TIMELINE) {
saction->ads.flag |= ADS_FLAG_SUMMARY_COLLAPSED;
@@ -166,11 +165,15 @@ static void blo_update_defaults_screen(bScreen *screen,
}
else if (sa->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = sa->spacedata.first;
sipo->flag |= SIPO_MARKER_LINES;
sipo->flag |= SIPO_SHOW_MARKERS;
}
else if (sa->spacetype == SPACE_NLA) {
SpaceNla *snla = sa->spacedata.first;
snla->flag |= SNLA_SHOW_MARKER_LINES;
snla->flag |= SNLA_SHOW_MARKERS;
}
else if (sa->spacetype == SPACE_SEQ) {
SpaceSeq *seq = sa->spacedata.first;
seq->flag |= SEQ_SHOW_MARKERS;
}
else if (sa->spacetype == SPACE_TEXT) {
/* Show syntax and line numbers in Script workspace text editor. */

View File

@@ -228,6 +228,47 @@ void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *la
*last = max;
}
/**
* Function used in operator polls, checks whether the markers region is currently drawn in the
* editor in which the operator is called.
*/
static bool ED_operator_markers_region_active(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
switch (sa->spacetype) {
case SPACE_ACTION: {
SpaceAction *saction = sa->spacedata.first;
if (saction->flag & SACTION_SHOW_MARKERS) {
return true;
}
break;
}
case SPACE_GRAPH: {
SpaceGraph *sipo = sa->spacedata.first;
if (sipo->mode != SIPO_MODE_DRIVERS && sipo->flag & SIPO_SHOW_MARKERS) {
return true;
}
break;
}
case SPACE_NLA: {
SpaceNla *snla = sa->spacedata.first;
if (snla->flag & SNLA_SHOW_MARKERS) {
return true;
}
break;
}
case SPACE_SEQ: {
SpaceSeq *seq = sa->spacedata.first;
if (seq->flag & SEQ_SHOW_MARKERS) {
return true;
}
break;
}
}
return false;
}
static bool region_position_is_over_marker(View2D *v2d, ListBase *markers, float region_x)
{
if (markers == NULL || BLI_listbase_is_empty(markers)) {
@@ -409,7 +450,7 @@ static void draw_marker_name(const uiFontStyle *fstyle,
UI_fontstyle_draw_simple(fstyle, name_x, text_y, name, text_color);
}
static void draw_marker_line(const float color[4], float x, float ymin, float ymax)
static void draw_marker_line(const float color[4], int xpos, int ymin, int ymax)
{
GPUVertFormat *format = immVertexFormat();
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
@@ -426,8 +467,8 @@ static void draw_marker_line(const float color[4], float x, float ymin, float ym
immUniform1f("dash_factor", 0.5f);
immBegin(GPU_PRIM_LINES, 2);
immVertex2f(pos, x, ymin);
immVertex2f(pos, x, ymax);
immVertex2f(pos, xpos, ymin);
immVertex2f(pos, xpos, ymax);
immEnd();
immUnbindProgram();
@@ -449,26 +490,6 @@ static int marker_get_icon_id(TimeMarker *marker, int flag)
}
}
static void draw_marker_line_if_necessary(TimeMarker *marker, int flag, int xpos, int height)
{
#ifdef DURIAN_CAMERA_SWITCH
if ((marker->camera) || (flag & DRAW_MARKERS_LINES))
#else
if (flag & DRAW_MARKERS_LINES)
#endif
{
float color[4];
if (marker->flag & SELECT) {
copy_v4_fl4(color, 1.0f, 1.0f, 1.0f, 0.38f);
}
else {
copy_v4_fl4(color, 0.0f, 0.0f, 0.0f, 0.38f);
}
draw_marker_line(color, xpos, UI_DPI_FAC * 20, height);
}
}
static void draw_marker(
const uiFontStyle *fstyle, TimeMarker *marker, int cfra, int xpos, int flag, int region_height)
{
@@ -476,7 +497,15 @@ static void draw_marker(
GPU_blend_set_func_separate(
GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
draw_marker_line_if_necessary(marker, flag, xpos, region_height);
float color[4];
if (marker->flag & SELECT) {
copy_v4_fl4(color, 1.0f, 1.0f, 1.0f, 0.38f);
}
else {
copy_v4_fl4(color, 0.0f, 0.0f, 0.0f, 0.38f);
}
draw_marker_line(color, xpos, UI_DPI_FAC * 20, region_height);
int icon_id = marker_get_icon_id(marker, flag);
UI_icon_draw(xpos - 0.55f * UI_DPI_ICON_SIZE, UI_DPI_FAC * 18, icon_id);
@@ -599,8 +628,7 @@ static bool ed_markers_poll_selected_markers(bContext *C)
{
ListBase *markers = ED_context_get_markers(C);
/* first things first: markers can only exist in timeline views */
if (ED_operator_animview_active(C) == 0) {
if (!ED_operator_markers_region_active(C)) {
return 0;
}
@@ -613,12 +641,7 @@ static bool ed_markers_poll_selected_no_locked_markers(bContext *C)
ListBase *markers = ED_context_get_markers(C);
ToolSettings *ts = CTX_data_tool_settings(C);
if (ts->lock_markers) {
return 0;
}
/* first things first: markers can only exist in timeline views */
if (ED_operator_animview_active(C) == 0) {
if (ts->lock_markers || !ED_operator_markers_region_active(C)) {
return 0;
}
@@ -632,12 +655,7 @@ static bool ed_markers_poll_markers_exist(bContext *C)
ListBase *markers = ED_context_get_markers(C);
ToolSettings *ts = CTX_data_tool_settings(C);
if (ts->lock_markers) {
return 0;
}
/* first things first: markers can only exist in timeline views */
if (ED_operator_animview_active(C) == 0) {
if (ts->lock_markers || !ED_operator_markers_region_active(C)) {
return 0;
}
@@ -692,7 +710,7 @@ static void MARKER_OT_add(wmOperatorType *ot)
/* api callbacks */
ot->exec = ed_marker_add_exec;
ot->poll = ED_operator_animview_active;
ot->poll = ED_operator_markers_region_active;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -1661,7 +1679,7 @@ static void MARKER_OT_camera_bind(wmOperatorType *ot)
/* api callbacks */
ot->exec = ed_marker_camera_bind_exec;
ot->poll = ED_operator_animview_active;
ot->poll = ED_operator_markers_region_active;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;

View File

@@ -71,7 +71,7 @@ static SpaceLink *action_new(const ScrArea *sa, const Scene *scene)
saction->autosnap = SACTSNAP_FRAME;
saction->mode = SACTCONT_DOPESHEET;
saction->mode_prev = SACTCONT_DOPESHEET;
saction->flag = SACTION_SHOW_INTERPOLATION | SACTION_SHOW_MARKER_LINES;
saction->flag = SACTION_SHOW_INTERPOLATION | SACTION_SHOW_MARKERS;
saction->ads.filterflag |= ADS_FILTER_SUMMARY;
@@ -215,10 +215,10 @@ static void action_main_region_draw(const bContext *C, ARegion *ar)
marker_flag = ((ac.markers && (ac.markers != &ac.scene->markers)) ? DRAW_MARKERS_LOCAL : 0) |
DRAW_MARKERS_MARGIN;
if (saction->flag & SACTION_SHOW_MARKER_LINES) {
marker_flag |= DRAW_MARKERS_LINES;
if (saction->flag & SACTION_SHOW_MARKERS) {
ED_markers_draw(C, marker_flag);
}
ED_markers_draw(C, marker_flag);
/* caches */
if (saction->mode == SACTCONT_TIMELINE) {

View File

@@ -81,7 +81,7 @@ static SpaceLink *graph_new(const ScrArea *UNUSED(sa), const Scene *scene)
/* settings for making it easier by default to just see what you're interested in tweaking */
sipo->ads->filterflag |= ADS_FILTER_ONLYSEL;
sipo->flag |= SIPO_SELVHANDLESONLY | SIPO_MARKER_LINES;
sipo->flag |= SIPO_SELVHANDLESONLY | SIPO_SHOW_MARKERS;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for graphedit");
@@ -296,10 +296,9 @@ static void graph_main_region_draw(const bContext *C, ARegion *ar)
if (sipo->mode != SIPO_MODE_DRIVERS) {
UI_view2d_view_orthoSpecial(ar, v2d, 1);
int marker_draw_flag = DRAW_MARKERS_MARGIN;
if (sipo->flag & SIPO_MARKER_LINES) {
marker_draw_flag |= DRAW_MARKERS_LINES;
if (sipo->flag & SIPO_SHOW_MARKERS) {
ED_markers_draw(C, marker_draw_flag);
}
ED_markers_draw(C, marker_draw_flag);
}
/* preview range */

View File

@@ -71,7 +71,7 @@ static SpaceLink *nla_new(const ScrArea *sa, const Scene *scene)
/* set auto-snapping settings */
snla->autosnap = SACTSNAP_FRAME;
snla->flag = SNLA_SHOW_MARKER_LINES;
snla->flag = SNLA_SHOW_MARKERS;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for nla");
@@ -274,10 +274,9 @@ static void nla_main_region_draw(const bContext *C, ARegion *ar)
/* markers */
UI_view2d_view_orthoSpecial(ar, v2d, 1);
int marker_draw_flag = DRAW_MARKERS_MARGIN;
if (snla->flag & SNLA_SHOW_MARKER_LINES) {
marker_draw_flag |= DRAW_MARKERS_LINES;
if (snla->flag & SNLA_SHOW_MARKERS) {
ED_markers_draw(C, marker_draw_flag);
}
ED_markers_draw(C, marker_draw_flag);
/* preview range */
UI_view2d_view_ortho(v2d);

View File

@@ -2067,10 +2067,9 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
/* markers */
UI_view2d_view_orthoSpecial(ar, v2d, 1);
int marker_draw_flag = DRAW_MARKERS_MARGIN;
if (sseq->flag & SEQ_SHOW_MARKER_LINES) {
marker_draw_flag |= DRAW_MARKERS_LINES;
if (sseq->flag & SEQ_SHOW_MARKERS) {
ED_markers_draw(C, marker_draw_flag);
}
ED_markers_draw(C, marker_draw_flag);
UI_view2d_view_ortho(v2d);
/* draw cache on top of markers area */

View File

@@ -93,7 +93,7 @@ static SpaceLink *sequencer_new(const ScrArea *UNUSED(sa), const Scene *scene)
sseq->chanshown = 0;
sseq->view = SEQ_VIEW_SEQUENCE;
sseq->mainb = SEQ_DRAW_IMG_IMBUF;
sseq->flag = SEQ_SHOW_GPENCIL | SEQ_USE_ALPHA | SEQ_SHOW_MARKER_LINES;
sseq->flag = SEQ_SHOW_GPENCIL | SEQ_USE_ALPHA | SEQ_SHOW_MARKERS;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for sequencer");

View File

@@ -860,8 +860,8 @@ typedef enum eSAction_Flag {
SACTION_SHOW_INTERPOLATION = (1 << 12),
/* show extremes */
SACTION_SHOW_EXTREMES = (1 << 13),
/* show vertical line markers */
SACTION_SHOW_MARKER_LINES = (1 << 14),
/* show markers region */
SACTION_SHOW_MARKERS = (1 << 14),
} eSAction_Flag;
/* SpaceAction_Runtime.flag */

View File

@@ -466,8 +466,8 @@ typedef enum eGraphEdit_Flag {
/* normalize curves on display */
SIPO_NORMALIZE = (1 << 14),
SIPO_NORMALIZE_FREEZE = (1 << 15),
/* show vertical line for every marker */
SIPO_MARKER_LINES = (1 << 16),
/* show markers region */
SIPO_SHOW_MARKERS = (1 << 16),
} eGraphEdit_Flag;
/* SpaceGraph.mode (Graph Editor Mode) */
@@ -532,8 +532,8 @@ typedef enum eSpaceNla_Flag {
SNLA_NOREALTIMEUPDATES = (1 << 6),
/* don't show local strip marker indications */
SNLA_NOLOCALMARKERS = (1 << 7),
/* show vertical line for every marker */
SNLA_SHOW_MARKER_LINES = (1 << 8),
/* show markers region */
SNLA_SHOW_MARKERS = (1 << 8),
} eSpaceNla_Flag;
/** \} */
@@ -615,7 +615,7 @@ typedef enum eSpaceSeq_Flag {
SEQ_NO_WAVEFORMS = (1 << 8), /* draw no waveforms */
SEQ_SHOW_SAFE_CENTER = (1 << 9),
SEQ_SHOW_METADATA = (1 << 10),
SEQ_SHOW_MARKER_LINES = (1 << 11),
SEQ_SHOW_MARKERS = (1 << 11), /* show markers region */
} eSpaceSeq_Flag;
/* SpaceSeq.view */

View File

@@ -4560,9 +4560,12 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
prop = RNA_def_property(srna, "show_marker_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_SHOW_MARKER_LINES);
RNA_def_property_ui_text(prop, "Show Marker Lines", "Show a vertical line for every marker");
prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_SHOW_MARKERS);
RNA_def_property_ui_text(
prop,
"Show Markers",
"If any exists, show markers in a separate row at the bottom of the editor");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
@@ -4818,7 +4821,7 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_pose_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_POSEMARKERS_SHOW);
RNA_def_property_ui_text(prop,
"Show Pose Markers",
"Toggle Pose Markers",
"Show markers belonging to the active action instead of Scene markers "
"(Action and Shape Key Editors only)");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL);
@@ -4847,10 +4850,13 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
"comparison with adjacent keys");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL);
prop = RNA_def_property(srna, "show_marker_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SHOW_MARKER_LINES);
RNA_def_property_ui_text(prop, "Show Marker Lines", "Show a vertical line for every marker");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SHOW_MARKERS);
RNA_def_property_ui_text(
prop,
"Show Markers",
"If any exists, show markers in a separate row at the bottom of the editor");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL);
/* editing */
prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
@@ -5004,9 +5010,12 @@ static void rna_def_space_graph(BlenderRNA *brna)
"Display groups and channels with colors matching their corresponding groups");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
prop = RNA_def_property(srna, "show_marker_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_MARKER_LINES);
RNA_def_property_ui_text(prop, "Show Marker Lines", "Show a vertical line for every marker");
prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SHOW_MARKERS);
RNA_def_property_ui_text(
prop,
"Show Markers",
"If any exists, show markers in a separate row at the bottom of the editor");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
/* editing */
@@ -5115,10 +5124,13 @@ static void rna_def_space_nla(BlenderRNA *brna)
"Show action-local markers on the strips, useful when synchronizing timing across strips");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NLA, NULL);
prop = RNA_def_property(srna, "show_marker_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNLA_SHOW_MARKER_LINES);
RNA_def_property_ui_text(prop, "Show Marker Lines", "Show a vertical line for every marker");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNLA_SHOW_MARKERS);
RNA_def_property_ui_text(
prop,
"Show Markers",
"If any exists, show markers in a separate row at the bottom of the editor");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NLA, NULL);
/* editing */
prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);