Cleanup: return PROP_EDITABLE rna flag
authorCampbell Barton <ideasman42@gmail.com>
Tue, 6 Oct 2015 10:43:04 +0000 (21:43 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 6 Oct 2015 10:43:04 +0000 (21:43 +1100)
Harmless, since the flag happens to be 1.

source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/makesrna/intern/rna_lattice.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_nla.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_vfont.c

index 88065d29a5067639628cec3f0a381d372795d670..f0119c7d66509c5384bac1303fe4bd73054484cd 100644 (file)
@@ -126,7 +126,7 @@ static int rna_ID_name_editable(PointerRNA *ptr)
                        return false;
        }
        
-       return true;
+       return PROP_EDITABLE;
 }
 
 short RNA_type_to_ID_code(StructRNA *type)
index ac30c6154385d8c564ddc0f7cc90fd34c34d1be2..165c969ebc2bf6efa69d9fe138fbac60f3d35acb 100644 (file)
@@ -97,7 +97,7 @@ static int rna_AnimData_action_editable(PointerRNA *ptr)
        if ((adt->flag & ADT_NLA_EDIT_ON) || (adt->actstrip) || (adt->tmpact))
                return 0;
        else
-               return 1;
+               return PROP_EDITABLE;
 }
 
 static void rna_AnimData_action_set(PointerRNA *ptr, PointerRNA value)
@@ -381,7 +381,7 @@ static int rna_KeyingSet_active_ksPath_editable(PointerRNA *ptr)
        KeyingSet *ks = (KeyingSet *)ptr->data;
        
        /* only editable if there are some paths to change to */
-       return (BLI_listbase_is_empty(&ks->paths) == false);
+       return (BLI_listbase_is_empty(&ks->paths) == false) ? PROP_EDITABLE : 0;
 }
 
 static PointerRNA rna_KeyingSet_active_ksPath_get(PointerRNA *ptr)
index 333220146d6f8fb5e83bbb73e44abd05a5d805da..80a52a0a3d183080e7f683e0c3b4e5071b2e5ab2 100644 (file)
@@ -73,7 +73,7 @@ static int rna_GPencilLayer_active_frame_editable(PointerRNA *ptr)
        if (gpl->flag & GP_LAYER_LOCKED)
                return 0;
        else
-               return 1;
+               return PROP_EDITABLE;
 }
 
 static void rna_GPencilLayer_line_width_range(PointerRNA *ptr, int *min, int *max,
index 60e5f6d205c726f5459b90dd29bd9ff4d47993e7..035e9d156419060c38f6c508315faee30be68e3f 100644 (file)
@@ -175,7 +175,7 @@ static int rna_Lattice_size_editable(PointerRNA *ptr)
 {
        Lattice *lt = (Lattice *)ptr->data;
 
-       return lt->key == NULL;
+       return (lt->key == NULL) ? PROP_EDITABLE : 0;
 }
 
 static void rna_Lattice_points_u_set(PointerRNA *ptr, int value)
index a1fa6ab13be831d457d701898818bedda3fc3270..d7e566ff431744fbacfee1941cc54ef3f19f4cf2 100644 (file)
@@ -237,7 +237,7 @@ static int rna_Material_active_texture_editable(PointerRNA *ptr)
 {
        Material *ma = (Material *)ptr->id.data;
 
-       return has_current_material_texture(ma);
+       return has_current_material_texture(ma) ? PROP_EDITABLE : 0;
 }
 
 static PointerRNA rna_Material_active_node_material_get(PointerRNA *ptr)
index 22d0144250ef0dcf0f57e42cef0457b5ce3c280b..0e8ed5eea8d0da8bf109dd88558cd6292e08755f 100644 (file)
@@ -290,7 +290,7 @@ static int rna_NlaStrip_action_editable(PointerRNA *ptr)
                return 0;
                
        /* should be ok, though we may still miss some cases */
-       return 1;
+       return PROP_EDITABLE;
 }
 
 static void rna_NlaStrip_action_start_frame_set(PointerRNA *ptr, float value)
index cee98261e231c6d0f3deff82fbd552e13c11e1a8..d73b2315434d14c7094836a9d635ee3a99704b32 100644 (file)
@@ -1617,7 +1617,7 @@ static int rna_FileBrowser_FSMenuEntry_name_get_editable(PointerRNA *ptr)
 {
        FSMenuEntry *fsm = ptr->data;
 
-       return fsm->save;
+       return fsm->save ? PROP_EDITABLE : 0;
 }
 
 static void rna_FileBrowser_FSMenu_next(CollectionPropertyIterator *iter)
index 0879f4d355d2adbdf4fe3fd57d924f97a5d9d6e0..e9ba0c784396dc5cf410be9770d0053e24023337 100644 (file)
@@ -48,9 +48,9 @@ static int rna_VectorFont_filepath_editable(PointerRNA *ptr)
 {
        VFont *vfont = ptr->id.data;
        if (BKE_vfont_is_builtin(vfont)) {
-               return false;
+               return 0;
        }
-       return true;
+       return PROP_EDITABLE;
 }
 
 static void rna_VectorFont_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)