RNA: forgot to rename some values in the keymaps in last commit.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 16 Jan 2009 23:58:10 +0000 (23:58 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 16 Jan 2009 23:58:10 +0000 (23:58 +0000)
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/makesrna/intern/rna_define.c

index ea3f44c63c81b9e4b890b6dccb895c3f575852a0..6d31e240a84f4f476df04c7f9350946a63ded080 100644 (file)
@@ -2956,7 +2956,7 @@ void MESH_OT_select_sharp_edges(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
        
        /* props XXX figure out? */
-       RNA_def_float(ot->srna, "sharpness", 0.01f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, FLT_MAX);
+       RNA_def_float(ot->srna, "sharpness", 0.01f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f);
 }
 
 
@@ -3128,7 +3128,7 @@ void MESH_OT_select_linked_flat_faces(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
        
        /* props */
-       RNA_def_float(ot->srna, "sharpness", 0.0f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, FLT_MAX);
+       RNA_def_float(ot->srna, "sharpness", 0.0f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f);
 }
 
 void select_non_manifold(EditMesh *em)
index c8d27ddcbf27aa52094c8fd3e0124a8365d5620b..b869a6f798169752ef0a7fd497954c3a6705ff50 100644 (file)
@@ -106,8 +106,8 @@ void ED_keymap_mesh(wmWindowManager *wm)
        WM_keymap_add_item(keymap, "MESH_OT_select_non_manifold", MKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0);
        WM_keymap_add_item(keymap, "MESH_OT_selectconnected_mesh_all", LKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "MESH_OT_selectconnected_mesh", LKEY, KM_PRESS, 0, 0);
-       RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_select_linked_flat_faces", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"fsharpness",135.0);
-       RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_select_sharp_edges", SKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"fsharpness",135.0);          
+       RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_select_linked_flat_faces", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0);
+       RNA_float_set(WM_keymap_add_item(keymap, "MESH_OT_select_sharp_edges", SKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0)->ptr,"sharpness",135.0);           
        
        /* hide */
        WM_keymap_add_item(keymap, "MESH_OT_hide_mesh", HKEY, KM_PRESS, 0, 0);
index ecc7c3b3f21ea63b28881fa8d1906d4bd85e0f26..3b0b07123f105b3f8838ca46aabab409d1d3176c 100644 (file)
@@ -117,35 +117,35 @@ void view3d_keymap(wmWindowManager *wm)
        RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewhome", CKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "center", 1);
 
        /* numpad view hotkeys*/
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD0, KM_PRESS, 0, 0)->ptr, "viewnum", V3D_VIEW_CAMERA);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, 0, 0)->ptr, "viewnum", V3D_VIEW_FRONT);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD2, KM_PRESS, 0, 0)->ptr, "viewnum", V3D_VIEW_STEPDOWN);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, 0, 0)->ptr, "viewnum", V3D_VIEW_RIGHT);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD4, KM_PRESS, 0, 0)->ptr, "viewnum", V3D_VIEW_STEPLEFT);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD5, KM_PRESS, 0, 0)->ptr, "viewnum", V3D_VIEW_PERSPORTHO);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD6, KM_PRESS, 0, 0)->ptr, "viewnum", V3D_VIEW_STEPRIGHT);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, 0, 0)->ptr, "viewnum", V3D_VIEW_TOP);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD8, KM_PRESS, 0, 0)->ptr, "viewnum", V3D_VIEW_STEPUP);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_CTRL, 0)->ptr, "viewnum", V3D_VIEW_BACK);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_CTRL, 0)->ptr, "viewnum", V3D_VIEW_LEFT);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_CTRL, 0)->ptr, "viewnum", V3D_VIEW_BOTTOM);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD2, KM_PRESS, KM_CTRL, 0)->ptr, "viewnum", V3D_VIEW_PANDOWN);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD4, KM_PRESS, KM_CTRL, 0)->ptr, "viewnum", V3D_VIEW_PANLEFT);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD6, KM_PRESS, KM_CTRL, 0)->ptr, "viewnum", V3D_VIEW_PANRIGHT);
-       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD8, KM_PRESS, KM_CTRL, 0)->ptr, "viewnum", V3D_VIEW_PANUP);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD0, KM_PRESS, 0, 0)->ptr, "view", V3D_VIEW_CAMERA);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, 0, 0)->ptr, "view", V3D_VIEW_FRONT);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD2, KM_PRESS, 0, 0)->ptr, "view", V3D_VIEW_STEPDOWN);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, 0, 0)->ptr, "view", V3D_VIEW_RIGHT);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD4, KM_PRESS, 0, 0)->ptr, "view", V3D_VIEW_STEPLEFT);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD5, KM_PRESS, 0, 0)->ptr, "view", V3D_VIEW_PERSPORTHO);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD6, KM_PRESS, 0, 0)->ptr, "view", V3D_VIEW_STEPRIGHT);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, 0, 0)->ptr, "view", V3D_VIEW_TOP);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD8, KM_PRESS, 0, 0)->ptr, "view", V3D_VIEW_STEPUP);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_CTRL, 0)->ptr, "view", V3D_VIEW_BACK);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_CTRL, 0)->ptr, "view", V3D_VIEW_LEFT);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_CTRL, 0)->ptr, "view", V3D_VIEW_BOTTOM);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD2, KM_PRESS, KM_CTRL, 0)->ptr, "view", V3D_VIEW_PANDOWN);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD4, KM_PRESS, KM_CTRL, 0)->ptr, "view", V3D_VIEW_PANLEFT);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD6, KM_PRESS, KM_CTRL, 0)->ptr, "view", V3D_VIEW_PANRIGHT);
+       RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD8, KM_PRESS, KM_CTRL, 0)->ptr, "view", V3D_VIEW_PANUP);
 
        /* drawtype */
        km = WM_keymap_add_item(keymap, "VIEW3D_OT_drawtype", ZKEY, KM_PRESS, 0, 0);
-       RNA_int_set(km->ptr, "drawtype", OB_SOLID);
-       RNA_int_set(km->ptr, "drawtype_alt", OB_WIRE);
+       RNA_int_set(km->ptr, "draw_type", OB_SOLID);
+       RNA_int_set(km->ptr, "draw┬░type_alternate", OB_WIRE);
 
        km = WM_keymap_add_item(keymap, "VIEW3D_OT_drawtype", ZKEY, KM_PRESS, KM_ALT, 0);
-       RNA_int_set(km->ptr, "drawtype", OB_TEXTURE);
-       RNA_int_set(km->ptr, "drawtype_alt", OB_SOLID);
+       RNA_int_set(km->ptr, "draw_type", OB_TEXTURE);
+       RNA_int_set(km->ptr, "draw_type_alternate", OB_SOLID);
 
        km = WM_keymap_add_item(keymap, "VIEW3D_OT_drawtype", ZKEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_int_set(km->ptr, "drawtype", OB_SHADED);
-       RNA_int_set(km->ptr, "drawtype_alt", OB_WIRE);
+       RNA_int_set(km->ptr, "draw_type", OB_SHADED);
+       RNA_int_set(km->ptr, "draw_type_alternate", OB_WIRE);
 
        /* selection*/
        WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
index 7dab55ee4f552aead0665aaf18dd99f605f7af09..6af2453dde51229a328982eaeac4dcca05f52919 100644 (file)
@@ -1583,7 +1583,7 @@ PropertyRNA *RNA_def_int_vector(StructRNA *srna, const char *identifier, int len
        
        prop= RNA_def_property(srna, identifier, PROP_INT, PROP_VECTOR);
        if(len != 0) RNA_def_property_array(prop, len);
-       RNA_def_property_int_array_default(prop, default_value);
+       if(default_value) RNA_def_property_int_array_default(prop, default_value);
        if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
        RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -1598,7 +1598,7 @@ PropertyRNA *RNA_def_int_array(StructRNA *srna, const char *identifier, int len,
        
        prop= RNA_def_property(srna, identifier, PROP_INT, PROP_NONE);
        if(len != 0) RNA_def_property_array(prop, len);
-       RNA_def_property_int_array_default(prop, default_value);
+       if(default_value) RNA_def_property_int_array_default(prop, default_value);
        if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
        RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -1613,7 +1613,7 @@ PropertyRNA *RNA_def_string(StructRNA *srna, const char *identifier, const char
        
        prop= RNA_def_property(srna, identifier, PROP_STRING, PROP_NONE);
        if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
-       RNA_def_property_string_default(prop, default_value);
+       if(default_value) RNA_def_property_string_default(prop, default_value);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
 
        return prop;
@@ -1626,7 +1626,7 @@ PropertyRNA *RNA_def_string_file_path(StructRNA *srna, const char *identifier, c
        
        prop= RNA_def_property(srna, identifier, PROP_STRING, PROP_FILEPATH);
        if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
-       RNA_def_property_string_default(prop, default_value);
+       if(default_value) RNA_def_property_string_default(prop, default_value);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
 
        return prop;
@@ -1639,7 +1639,7 @@ PropertyRNA *RNA_def_string_dir_path(StructRNA *srna, const char *identifier, co
        
        prop= RNA_def_property(srna, identifier, PROP_STRING, PROP_DIRPATH);
        if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
-       RNA_def_property_string_default(prop, default_value);
+       if(default_value) RNA_def_property_string_default(prop, default_value);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
 
        return prop;
@@ -1651,7 +1651,7 @@ PropertyRNA *RNA_def_enum(StructRNA *srna, const char *identifier, EnumPropertyI
        PropertyRNA *prop;
        
        prop= RNA_def_property(srna, identifier, PROP_ENUM, PROP_NONE);
-       RNA_def_property_enum_items(prop, items);
+       if(items) RNA_def_property_enum_items(prop, items);
        RNA_def_property_enum_default(prop, default_value);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
 
@@ -1679,7 +1679,7 @@ PropertyRNA *RNA_def_float_vector(StructRNA *srna, const char *identifier, int l
        
        prop= RNA_def_property(srna, identifier, PROP_FLOAT, PROP_VECTOR);
        if(len != 0) RNA_def_property_array(prop, len);
-       RNA_def_property_float_array_default(prop, default_value);
+       if(default_value) RNA_def_property_float_array_default(prop, default_value);
        if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
        RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -1694,7 +1694,7 @@ PropertyRNA *RNA_def_float_color(StructRNA *srna, const char *identifier, int le
        
        prop= RNA_def_property(srna, identifier, PROP_FLOAT, PROP_COLOR);
        if(len != 0) RNA_def_property_array(prop, len);
-       RNA_def_property_float_array_default(prop, default_value);
+       if(default_value) RNA_def_property_float_array_default(prop, default_value);
        if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
        RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -1710,7 +1710,7 @@ PropertyRNA *RNA_def_float_matrix(StructRNA *srna, const char *identifier, int l
        
        prop= RNA_def_property(srna, identifier, PROP_FLOAT, PROP_MATRIX);
        if(len != 0) RNA_def_property_array(prop, len);
-       RNA_def_property_float_array_default(prop, default_value);
+       if(default_value) RNA_def_property_float_array_default(prop, default_value);
        if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
        RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -1725,7 +1725,7 @@ PropertyRNA *RNA_def_float_rotation(StructRNA *srna, const char *identifier, int
        
        prop= RNA_def_property(srna, identifier, PROP_FLOAT, PROP_ROTATION);
        if(len != 0) RNA_def_property_array(prop, len);
-       RNA_def_property_float_array_default(prop, default_value);
+       if(default_value) RNA_def_property_float_array_default(prop, default_value);
        if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
        RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -1740,7 +1740,7 @@ PropertyRNA *RNA_def_float_array(StructRNA *srna, const char *identifier, int le
        
        prop= RNA_def_property(srna, identifier, PROP_FLOAT, PROP_NONE);
        if(len != 0) RNA_def_property_array(prop, len);
-       RNA_def_property_float_array_default(prop, default_value);
+       if(default_value) RNA_def_property_float_array_default(prop, default_value);
        if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
        RNA_def_property_ui_text(prop, ui_name, ui_description);
        RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);