diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-01-03 02:47:48 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-01-03 02:47:48 +0300 |
commit | c052a65b93cf213edda5629ee916d9920b411fbd (patch) | |
tree | bfe08aba246bf9a058b84d1cd8887ae33c024f7c /source/blender/makesrna/intern/rna_ui.c | |
parent | c7aa4f86a8dccec2f03918a6258eb2b1cf7a2cc3 (diff) |
"Red-Alert" flags can now be set on UI layouts via the RNA API too
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 6b53082c095..e66fed2c50d 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -449,6 +449,16 @@ static void rna_UILayout_active_set(PointerRNA *ptr, int value) uiLayoutSetActive(ptr->data, value); } +static int rna_UILayout_red_alert_get(PointerRNA *ptr) +{ + return uiLayoutGetRedAlert(ptr->data); +} + +static void rna_UILayout_red_alert_set(PointerRNA *ptr, int value) +{ + uiLayoutSetRedAlert(ptr->data, value); +} + static void rna_UILayout_op_context_set(PointerRNA *ptr, int value) { uiLayoutSetOperatorContext(ptr->data, value); @@ -552,10 +562,8 @@ static void rna_def_ui_layout(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_UILayout_enabled_get", "rna_UILayout_enabled_set"); RNA_def_property_ui_text(prop, "Enabled", "When false, this (sub)layout is greyed out."); -#if 0 prop= RNA_def_property(srna, "red_alert", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_UILayout_red_alert_get", "rna_UILayout_red_alert_set"); -#endif prop= RNA_def_property(srna, "alignment", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, alignment_items); |