Commit: 58ea1639da702c8e792d303703d129790f8510bc
Author: Bastien Montagne
Date:   Sun Dec 28 18:30:33 2014 +0100
Branches: master
https://developer.blender.org/rB58ea1639da702c8e792d303703d129790f8510bc

Cleanup: no need for hacks here, RNA allows for real read-only props, and if 
you define
a getter func, it won't rely on any DNA member either...

===================================================================

M       source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_space.c 
b/source/blender/makesrna/intern/rna_space.c
index 86beec7..72fd7bf 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2967,14 +2967,12 @@ static void rna_def_space_graph(BlenderRNA *brna)
        RNA_def_property_enum_items(prop, autosnap_items);
        RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping 
settings for transformations");
        RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
-       
+
        /* readonly state info */
        prop = RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, 
PROP_NONE);
-       /* XXX: hack to make this compile, since this property doesn't actually 
exist*/
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", 0);
        RNA_def_property_boolean_funcs(prop, 
"rna_SpaceGraphEditor_has_ghost_curves_get", NULL);
+       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Has Ghost Curves", "Graph Editor 
instance has some ghost curves stored");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
 
        /* nromalize curves */
        prop = RNA_def_property(srna, "use_normalization", PROP_BOOLEAN, 
PROP_NONE);
@@ -3110,7 +3108,6 @@ static void rna_def_console_line(BlenderRNA *brna)
        
        srna = RNA_def_struct(brna, "ConsoleLine", NULL);
        RNA_def_struct_ui_text(srna, "Console Input", "Input line for the 
interactive console");
-       /* XXX using non-inited "prop", uh? RNA_def_property_update(prop, 
NC_SPACE|ND_SPACE_CONSOLE, NULL); */
        
        prop = RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
        RNA_def_property_string_funcs(prop, "rna_ConsoleLine_body_get", 
"rna_ConsoleLine_body_length",

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to