Index: source/blender/makesrna/intern/rna_armature.c =================================================================== --- source/blender/makesrna/intern/rna_armature.c (revision 51285) +++ source/blender/makesrna/intern/rna_armature.c (working copy) @@ -1005,11 +1005,13 @@ prop = RNA_def_property(srna, "show_bone_custom_shapes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ARM_NO_CUSTOM); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_ui_text(prop, "Draw Custom Bone Shapes", "Draw bones with their custom shapes"); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_COL_CUSTOM); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_ui_text(prop, "Draw Bone Group Colors", "Draw bone group colors"); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); Index: source/blender/makesrna/intern/rna_camera.c =================================================================== --- source/blender/makesrna/intern/rna_camera.c (revision 51285) +++ source/blender/makesrna/intern/rna_camera.c (working copy) @@ -150,6 +150,7 @@ prop = RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "passepartalpha"); + RNA_def_property_float_default(prop, 0.5f); RNA_def_property_ui_text(prop, "Passepartout Alpha", "Opacity (alpha) of the darkened overlay in Camera view"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); @@ -170,6 +171,7 @@ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_range(prop, M_PI * (0.367 / 180.0), M_PI * (172.847 / 180.0)); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_float_default(prop, 0.857556f); RNA_def_property_ui_text(prop, "Field of View", "Camera lens field of view in degrees"); RNA_def_property_float_funcs(prop, "rna_Camera_angle_get", "rna_Camera_angle_set", NULL); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update"); @@ -177,18 +179,21 @@ prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "clipsta"); RNA_def_property_range(prop, 0.001f, FLT_MAX); + RNA_def_property_float_default(prop, 0.1f); RNA_def_property_ui_text(prop, "Clip Start", "Camera near clipping distance"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "clipend"); RNA_def_property_range(prop, 1.0f, FLT_MAX); + RNA_def_property_float_default(prop, 100.0f); RNA_def_property_ui_text(prop, "Clip End", "Camera far clipping distance"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); prop = RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "lens"); RNA_def_property_range(prop, 1.0f, 5000.0f); + RNA_def_property_float_default(prop, 35.0f); RNA_def_property_ui_text(prop, "Focal Length", "Perspective Camera lens value in millimeters"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update"); @@ -196,6 +201,7 @@ RNA_def_property_float_sdna(prop, NULL, "sensor_x"); RNA_def_property_range(prop, 1.0f, FLT_MAX); RNA_def_property_ui_range(prop, 1.0f, 100.f, 1, 2); + RNA_def_property_float_default(prop, 32.0f); RNA_def_property_ui_text(prop, "Sensor Width", "Horizontal size of the image sensor area in millimeters"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update"); @@ -203,6 +209,7 @@ RNA_def_property_float_sdna(prop, NULL, "sensor_y"); RNA_def_property_range(prop, 1.0f, FLT_MAX); RNA_def_property_ui_range(prop, 1.0f, 100.f, 1, 2); + RNA_def_property_float_default(prop, 18.0f); RNA_def_property_ui_text(prop, "Sensor Height", "Vertical size of the image sensor area in millimeters"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update"); @@ -216,6 +223,7 @@ RNA_def_property_float_sdna(prop, NULL, "drawsize"); RNA_def_property_range(prop, 0.01f, 1000.0f); RNA_def_property_ui_range(prop, 0.01, 100, 1, 2); + RNA_def_property_float_default(prop, 0.5f); RNA_def_property_ui_text(prop, "Draw Size", "Apparent size of the Camera object in the 3D View"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); @@ -252,6 +260,7 @@ prop = RNA_def_property(srna, "show_passepartout", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWPASSEPARTOUT); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_ui_text(prop, "Show Passepartout", "Show a darkened overlay outside the image area in Camera view"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); Index: source/blender/makesrna/intern/rna_curve.c =================================================================== --- source/blender/makesrna/intern/rna_curve.c (revision 51285) +++ source/blender/makesrna/intern/rna_curve.c (working copy) @@ -837,6 +837,7 @@ prop = RNA_def_property(srna, "path_duration", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pathlen"); RNA_def_property_range(prop, 1, MAXFRAME); + RNA_def_property_int_default(prop, 100); RNA_def_property_ui_text(prop, "Path Length", "The number of frames that are needed to traverse the path, " "defining the maximum value for the 'Evaluation Time' setting"); @@ -873,6 +874,7 @@ prop = RNA_def_property(srna, "use_radius", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH_RADIUS); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_ui_text(prop, "Radius", "Option for paths and curve-deform: " "apply the curve radius with path following it and deforming"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -915,29 +917,34 @@ RNA_def_property_range(prop, 0.0001f, 10000.0f); RNA_def_property_ui_range(prop, 0.01, 10, 1, 3); RNA_def_property_ui_text(prop, "Font size", ""); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "small_caps_scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "smallcaps_scale"); RNA_def_property_ui_range(prop, 0, 1.0, 1, 2); + RNA_def_property_float_default(prop, 0.75f); RNA_def_property_ui_text(prop, "Small Caps", "Scale of small capitals"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "space_line", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "linedist"); RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Distance between lines of text", ""); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "space_word", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "wordspace"); RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Spacing between words", ""); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "space_character", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "spacing"); RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Global spacing between characters", ""); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -968,6 +975,7 @@ prop = RNA_def_property(srna, "underline_height", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ulheight"); RNA_def_property_range(prop, -0.2f, 0.8f); + RNA_def_property_float_default(prop, 0.050f); RNA_def_property_ui_text(prop, "Underline Thickness", ""); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -1332,6 +1340,7 @@ RNA_def_property_int_sdna(prop, NULL, "resolu"); RNA_def_property_range(prop, 1, SHRT_MAX); RNA_def_property_ui_range(prop, 1, 64, 1, 0); + RNA_def_property_int_default(prop, 12); RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction"); RNA_def_property_update(prop, 0, "rna_Curve_resolution_u_update_data"); @@ -1352,6 +1361,7 @@ prop = RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolv_ren"); RNA_def_property_ui_range(prop, 0, 64, 1, 0); + RNA_def_property_int_default(prop, 4); RNA_def_property_range(prop, 0, SHRT_MAX); RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering (zero skips this property)"); @@ -1388,6 +1398,7 @@ prop = RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE); /* as an enum */ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, curve_axis_items); + RNA_def_property_enum_default(prop, CU_3D); RNA_def_property_enum_funcs(prop, NULL, "rna_Curve_dimension_set", NULL); RNA_def_property_ui_text(prop, "Dimensions", "Select 2D or 3D curve type"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -1395,6 +1406,7 @@ prop = RNA_def_property(srna, "fill_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, curve3d_fill_mode_items); + RNA_def_property_enum_default(prop, CU_FRONT | CU_BACK); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Curve_fill_mode_itemf"); RNA_def_property_ui_text(prop, "Fill Mode", "Mode of filling curve"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -1402,6 +1414,7 @@ prop = RNA_def_property(srna, "twist_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "twist_mode"); RNA_def_property_enum_items(prop, curve_twist_mode_items); + RNA_def_property_enum_default(prop, CU_TWIST_MINIMUM); RNA_def_property_ui_text(prop, "Twist Method", "The type of tilt calculation for 3D Curves"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -1414,6 +1427,7 @@ prop = RNA_def_property(srna, "use_fill_deform", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_DEFORM_FILL); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_ui_text(prop, "Fill Deformed", "Fill curve after applying shape keys and all modifiers"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -1425,6 +1439,7 @@ /* texture space */ prop = RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "texflag", CU_AUTOSPACE); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjust active object's texture space automatically when transforming object"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Curve_texspace_set"); @@ -1475,6 +1490,7 @@ prop = RNA_def_property(srna, "bevel_factor_end", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "bevfac2"); RNA_def_property_range(prop, 0, 1.0); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "End Bevel Factor", "Factor that defines to where beveling of spline happens (0=to the very beginning, 1=to the very end)"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); } @@ -1565,6 +1581,7 @@ RNA_def_property_int_sdna(prop, NULL, "resolu"); RNA_def_property_range(prop, 1, SHRT_MAX); RNA_def_property_ui_range(prop, 1, 64, 1, 0); + RNA_def_property_int_default(prop, 4); RNA_def_property_ui_text(prop, "Resolution U", "Curve or Surface subdivisions per segment"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); Index: source/blender/makesrna/intern/rna_lamp.c =================================================================== --- source/blender/makesrna/intern/rna_lamp.c (revision 51285) +++ source/blender/makesrna/intern/rna_lamp.c (working copy) @@ -356,6 +356,8 @@ StructRNA *srna; PropertyRNA *prop; + static float default_color[4] = {1, 1, 1, 1}; /* default white color */ + srna = RNA_def_struct(brna, "Lamp", "ID"); RNA_def_struct_refine_func(srna, "rna_Lamp_refine"); RNA_def_struct_ui_text(srna, "Lamp", "Lamp datablock for lighting a scene"); @@ -370,18 +372,21 @@ RNA_def_property_float_sdna(prop, NULL, "dist"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_range(prop, 0, 1000, 1, 3); + RNA_def_property_float_default(prop, 30.0f); RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE); RNA_def_property_ui_range(prop, 0, 10, 1, 3); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "r"); RNA_def_property_array(prop, 3); + RNA_def_property_float_array_default(prop, default_color); RNA_def_property_ui_text(prop, "Color", "Light color"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); @@ -398,11 +403,13 @@ prop = RNA_def_property(srna, "use_specular", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_SPEC); RNA_def_property_ui_text(prop, "Specular", "Create specular highlights"); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "use_diffuse", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF); RNA_def_property_ui_text(prop, "Diffuse", "Do diffuse shading"); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_update(prop, 0, "rna_Lamp_update"); /* nodes */ @@ -439,6 +446,7 @@ prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, prop_fallofftype_items); + RNA_def_property_enum_default(prop, LA_FALLOFF_INVSQUARE); RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); @@ -455,12 +463,14 @@ prop = RNA_def_property(srna, "linear_attenuation", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "att1"); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 0.0f); RNA_def_property_ui_text(prop, "Linear Attenuation", "Linear distance attenuation"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "quadratic_attenuation", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "att2"); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Quadratic Attenuation", "Quadratic distance attenuation"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); } @@ -535,6 +545,7 @@ prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); + RNA_def_property_enum_default(prop, LA_SHAD_RAY); RNA_def_property_enum_items(prop, (spot) ? prop_spot_shadow_items : prop_shadow_items); RNA_def_property_update(prop, 0, "rna_Lamp_update"); @@ -666,12 +677,14 @@ prop = RNA_def_property(srna, "shadow_adaptive_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "adapt_thresh"); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 0.001f); RNA_def_property_ui_text(prop, "Shadow Adaptive Threshold", "Threshold for Adaptive Sampling (Raytraced shadows)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "area_size"); RNA_def_property_ui_range(prop, 0, 100, 0.1, 3); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); Index: source/blender/makesrna/intern/rna_lattice.c =================================================================== --- source/blender/makesrna/intern/rna_lattice.c (revision 51285) +++ source/blender/makesrna/intern/rna_lattice.c (working copy) @@ -267,6 +267,7 @@ RNA_def_property_int_sdna(prop, NULL, "pntsu"); RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_u_set", NULL); RNA_def_property_range(prop, 1, 64); + RNA_def_property_int_default(prop, 2); RNA_def_property_ui_text(prop, "U", "Point in U direction (can't be changed when there are shape keys)"); RNA_def_property_update(prop, 0, "rna_Lattice_update_size"); RNA_def_property_editable_func(prop, "rna_Lattice_size_editable"); @@ -275,6 +276,7 @@ RNA_def_property_int_sdna(prop, NULL, "pntsv"); RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_v_set", NULL); RNA_def_property_range(prop, 1, 64); + RNA_def_property_int_default(prop, 2); RNA_def_property_ui_text(prop, "V", "Point in V direction (can't be changed when there are shape keys)"); RNA_def_property_update(prop, 0, "rna_Lattice_update_size"); RNA_def_property_editable_func(prop, "rna_Lattice_size_editable"); @@ -283,6 +285,7 @@ RNA_def_property_int_sdna(prop, NULL, "pntsw"); RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_w_set", NULL); RNA_def_property_range(prop, 1, 64); + RNA_def_property_int_default(prop, 2); RNA_def_property_ui_text(prop, "W", "Point in W direction (can't be changed when there are shape keys)"); RNA_def_property_update(prop, 0, "rna_Lattice_update_size"); RNA_def_property_editable_func(prop, "rna_Lattice_size_editable"); @@ -290,18 +293,21 @@ prop = RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typeu"); RNA_def_property_enum_items(prop, keyblock_type_items); + RNA_def_property_enum_default(prop, KEY_BSPLINE); RNA_def_property_ui_text(prop, "Interpolation Type U", ""); RNA_def_property_update(prop, 0, "rna_Lattice_update_data"); prop = RNA_def_property(srna, "interpolation_type_v", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typev"); RNA_def_property_enum_items(prop, keyblock_type_items); + RNA_def_property_enum_default(prop, KEY_BSPLINE); RNA_def_property_ui_text(prop, "Interpolation Type V", ""); RNA_def_property_update(prop, 0, "rna_Lattice_update_data"); prop = RNA_def_property(srna, "interpolation_type_w", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typew"); RNA_def_property_enum_items(prop, keyblock_type_items); + RNA_def_property_enum_default(prop, KEY_BSPLINE); RNA_def_property_ui_text(prop, "Interpolation Type W", ""); RNA_def_property_update(prop, 0, "rna_Lattice_update_data"); Index: source/blender/makesrna/intern/rna_mesh.c =================================================================== --- source/blender/makesrna/intern/rna_mesh.c (revision 51285) +++ source/blender/makesrna/intern/rna_mesh.c (working copy) @@ -2173,6 +2173,7 @@ /* texture space */ prop = RNA_def_property(srna, "auto_texspace", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "texflag", ME_AUTOSPACE); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjust active object's texture space automatically when transforming object"); @@ -2824,16 +2825,19 @@ prop = RNA_def_property(srna, "auto_smooth_angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_funcs(prop, "rna_Mesh_auto_smooth_angle_get", "rna_Mesh_auto_smooth_angle_set", NULL); RNA_def_property_ui_range(prop, DEG2RAD(1.0), DEG2RAD(80), 1.0, 1); + RNA_def_property_float_default(prop, 0.523599f); #else prop = RNA_def_property(srna, "auto_smooth_angle", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "smoothresh"); RNA_def_property_range(prop, 1, 80); + RNA_def_property_float_default(prop, 30.0f); #endif RNA_def_property_ui_text(prop, "Auto Smooth Angle", "Maximum angle between face normals that 'Auto Smooth' will operate on"); prop = RNA_def_property(srna, "show_double_sided", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_TWOSIDED); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_ui_text(prop, "Double Sided", "Render/display the mesh with double or single sided lighting"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); Index: source/blender/makesrna/intern/rna_meta.c =================================================================== --- source/blender/makesrna/intern/rna_meta.c (revision 51285) +++ source/blender/makesrna/intern/rna_meta.c (working copy) @@ -297,18 +297,21 @@ prop = RNA_def_property(srna, "resolution", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "wiresize"); RNA_def_property_range(prop, 0.050f, 1.0f); + RNA_def_property_float_default(prop, 0.400f); RNA_def_property_ui_text(prop, "Wire Size", "Polygonization resolution in the 3D viewport"); RNA_def_property_update(prop, 0, "rna_MetaBall_update_data"); prop = RNA_def_property(srna, "render_resolution", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "rendersize"); RNA_def_property_range(prop, 0.050f, 1.0f); + RNA_def_property_float_default(prop, 0.200f); RNA_def_property_ui_text(prop, "Render Size", "Polygonization resolution in rendering"); RNA_def_property_update(prop, 0, "rna_MetaBall_update_data"); prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "thresh"); RNA_def_property_range(prop, 0.0f, 5.0f); + RNA_def_property_float_default(prop, 0.600f); RNA_def_property_ui_text(prop, "Threshold", "Influence of meta elements"); RNA_def_property_update(prop, 0, "rna_MetaBall_update_data"); Index: source/blender/makesrna/intern/rna_object.c =================================================================== --- source/blender/makesrna/intern/rna_object.c (revision 51285) +++ source/blender/makesrna/intern/rna_object.c (working copy) @@ -1949,6 +1949,7 @@ static float default_quat[4] = {1, 0, 0, 0}; /* default quaternion values */ static float default_axisAngle[4] = {0, 0, 1, 0}; /* default axis-angle rotation values */ static float default_scale[3] = {1, 1, 1}; /* default scale values */ + static float default_color[4] = {1, 1, 1, 1}; /* default white color */ static int boundbox_dimsize[] = {8, 3}; srna = RNA_def_struct(brna, "Object", "ID"); @@ -2035,6 +2036,7 @@ prop = RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "trackflag"); RNA_def_property_enum_items(prop, track_items); + RNA_def_property_enum_default(prop, OB_POSY); RNA_def_property_ui_text(prop, "Track Axis", "Axis that points in 'forward' direction (applies to DupliFrame when " "parent 'Follow' is enabled)"); @@ -2043,6 +2045,7 @@ prop = RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "upflag"); RNA_def_property_enum_items(prop, up_items); + RNA_def_property_enum_default(prop, OB_POSZ); RNA_def_property_ui_text(prop, "Up Axis", "Axis that points in the upward direction (applies to DupliFrame when " "parent 'Follow' is enabled)"); @@ -2117,6 +2120,7 @@ RNA_def_property_enum_items(prop, prop_rotmode_items); /* XXX move to using a single define of this someday */ RNA_def_property_enum_funcs(prop, NULL, "rna_Object_rotation_mode_set", NULL); RNA_def_property_ui_text(prop, "Rotation Mode", ""); + RNA_def_property_enum_default(prop, ROT_MODE_XYZ); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ); @@ -2276,6 +2280,7 @@ RNA_def_property_float_sdna(prop, NULL, "empty_drawsize"); RNA_def_property_range(prop, 0.0001f, 1000.0f); RNA_def_property_ui_range(prop, 0.01, 100, 1, 2); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Empty Display Size", "Size of display for empties in the viewport"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); @@ -2293,6 +2298,7 @@ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "col"); + RNA_def_property_float_array_default(prop, default_color); RNA_def_property_ui_text(prop, "Color", "Object color and alpha, used when faces have the ObColor mode enabled"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); @@ -2436,6 +2442,7 @@ prop = RNA_def_property(srna, "draw_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "dt"); RNA_def_property_enum_items(prop, drawtype_items); + RNA_def_property_enum_default(prop, OB_TEXTURE); RNA_def_property_ui_text(prop, "Maximum Draw Type", "Maximum draw type to display object with in viewport"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); @@ -2453,6 +2460,7 @@ prop = RNA_def_property(srna, "show_name", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWNAME); RNA_def_property_ui_text(prop, "Draw Name", "Display the object's name"); + RNA_def_property_boolean_default(prop, FALSE); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); prop = RNA_def_property(srna, "show_axis", PROP_BOOLEAN, PROP_NONE); Index: source/blender/makesrna/intern/rna_speaker.c =================================================================== --- source/blender/makesrna/intern/rna_speaker.c (revision 51285) +++ source/blender/makesrna/intern/rna_speaker.c (working copy) @@ -84,6 +84,7 @@ RNA_def_property_float_sdna(prop, NULL, "volume_max"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Maximum Volume", "Maximum volume, no matter how near the object is"); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_max_set", NULL); */ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */ @@ -92,6 +93,7 @@ RNA_def_property_float_sdna(prop, NULL, "volume_min"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 0.0f); RNA_def_property_ui_text(prop, "Minimum Volume", "Minimum volume, no matter how far away the object is"); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_min_set", NULL); */ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */ @@ -100,6 +102,7 @@ RNA_def_property_float_sdna(prop, NULL, "distance_max"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_float_default(prop, FLT_MAX); RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance for volume calculation, no matter how far away the object is"); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_distance_max_set", NULL); */ @@ -109,6 +112,7 @@ RNA_def_property_float_sdna(prop, NULL, "distance_reference"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Reference Distance", "Reference distance at which volume is 100 %"); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_distance_reference_set", NULL); */ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */ @@ -117,6 +121,7 @@ RNA_def_property_float_sdna(prop, NULL, "attenuation"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Attenuation", "How strong the distance affects volume, depending on distance model"); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_attenuation_set", NULL); */ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */ @@ -125,6 +130,7 @@ RNA_def_property_float_sdna(prop, NULL, "cone_angle_outer"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 360.0f); + RNA_def_property_float_default(prop, 360.0f); RNA_def_property_ui_text(prop, "Outer Cone Angle", "Angle of the outer cone, in degrees, outside this cone the volume is " "the outer cone volume, between inner and outer cone the volume is interpolated"); @@ -135,6 +141,7 @@ RNA_def_property_float_sdna(prop, NULL, "cone_angle_inner"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 360.0f); + RNA_def_property_float_default(prop, 360.0f); RNA_def_property_ui_text(prop, "Inner Cone Angle", "Angle of the inner cone, in degrees, inside the cone the volume is 100 %"); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_angle_inner_set", NULL); */ @@ -144,6 +151,7 @@ RNA_def_property_float_sdna(prop, NULL, "cone_volume_outer"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Outer Cone Volume", "Volume outside the outer cone"); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_volume_outer_set", NULL); */ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */ @@ -151,6 +159,7 @@ prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "volume"); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Volume", "How loud the sound is"); RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_AUDIO); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_set", NULL); */ @@ -159,6 +168,7 @@ prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "pitch"); RNA_def_property_range(prop, 0.1f, 10.0f); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound"); RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_AUDIO); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_pitch_set", NULL); */