Index: source/blender/makesrna/intern/rna_gpencil.c =================================================================== --- source/blender/makesrna/intern/rna_gpencil.c (revision 51287) +++ source/blender/makesrna/intern/rna_gpencil.c (working copy) @@ -473,6 +473,7 @@ prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "color[3]"); RNA_def_property_range(prop, 0.3, 1.0f); + RNA_def_property_float_default(prop, 0.9f); RNA_def_property_ui_text(prop, "Opacity", "Layer Opacity"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); @@ -480,6 +481,7 @@ prop = RNA_def_property(srna, "line_width", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "thickness"); RNA_def_property_range(prop, 1, 10); + RNA_def_property_int_default(prop, 3); RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels)"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); @@ -608,6 +610,7 @@ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, draw_mode_items); RNA_def_property_ui_text(prop, "Draw Mode", ""); + RNA_def_property_enum_default(prop, GP_DATA_VIEWALIGN); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); prop = RNA_def_property(srna, "use_stroke_endpoints", PROP_BOOLEAN, PROP_NONE); Index: source/blender/makesrna/intern/rna_object.c =================================================================== --- source/blender/makesrna/intern/rna_object.c (revision 51287) +++ source/blender/makesrna/intern/rna_object.c (working copy) @@ -1950,6 +1950,7 @@ 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 int boundbox_dimsize[] = {8, 3}; + static float default_color[4] = {1, 1, 1, 1}; /* default white color */ srna = RNA_def_struct(brna, "Object", "ID"); RNA_def_struct_ui_text(srna, "Object", "Object datablock defining an object in a scene"); @@ -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)"); @@ -2046,6 +2048,7 @@ RNA_def_property_ui_text(prop, "Up Axis", "Axis that points in the upward direction (applies to DupliFrame when " "parent 'Follow' is enabled)"); + RNA_def_property_enum_default(prop, OB_POSZ); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); /* proxy */ @@ -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); @@ -2293,6 +2297,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); @@ -2372,6 +2377,7 @@ RNA_def_property_boolean_negative_sdna(prop, NULL, "transflag", OB_DUPLINOSPEED); RNA_def_property_ui_text(prop, "Dupli Frames Speed", "Set dupliframes to use the current frame instead of parent curve's evaluation time"); + RNA_def_property_boolean_default(prop, TRUE); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); prop = RNA_def_property(srna, "use_dupli_vertices_rotation", PROP_BOOLEAN, PROP_NONE); @@ -2400,12 +2406,14 @@ prop = RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE | PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupsta"); RNA_def_property_range(prop, MINAFRAME, MAXFRAME); + RNA_def_property_int_default(prop, 1); RNA_def_property_ui_text(prop, "Dupli Frames Start", "Start frame for DupliFrames"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); prop = RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE | PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupend"); RNA_def_property_range(prop, MINAFRAME, MAXFRAME); + RNA_def_property_int_default(prop, 100); RNA_def_property_ui_text(prop, "Dupli Frames End", "End frame for DupliFrames"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); @@ -2413,6 +2421,7 @@ RNA_def_property_int_sdna(prop, NULL, "dupon"); RNA_def_property_range(prop, MINFRAME, MAXFRAME); RNA_def_property_ui_range(prop, 1, 1500, 1, 0); + RNA_def_property_int_default(prop, 1); RNA_def_property_ui_text(prop, "Dupli Frames On", "Number of frames to use between DupOff frames"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); @@ -2420,6 +2429,7 @@ RNA_def_property_int_sdna(prop, NULL, "dupoff"); RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_range(prop, 0, 1500, 1, 0); + RNA_def_property_int_default(prop, 0); RNA_def_property_ui_text(prop, "Dupli Frames Off", "Recurring frames to exclude from the Dupliframes"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); @@ -2436,6 +2446,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); Index: source/blender/makesrna/intern/rna_space.c =================================================================== --- source/blender/makesrna/intern/rna_space.c (revision 51287) +++ source/blender/makesrna/intern/rna_space.c (working copy) @@ -1535,6 +1535,7 @@ RNA_def_property_float_sdna(prop, NULL, "lens"); RNA_def_property_ui_text(prop, "Lens", "Lens angle (mm) in perspective view"); RNA_def_property_range(prop, 1.0f, 250.0f); + RNA_def_property_float_default(prop, 35.0f); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE); @@ -1742,6 +1743,7 @@ prop = RNA_def_property(srna, "tracks_draw_size", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, FLT_MAX); RNA_def_property_float_sdna(prop, NULL, "bundle_size"); + RNA_def_property_float_default(prop, 0.2f); RNA_def_property_ui_text(prop, "Tracks Size", "Display size of tracks from reconstructed data"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); Index: source/blender/makesrna/intern/rna_world.c =================================================================== --- source/blender/makesrna/intern/rna_world.c (revision 51287) +++ source/blender/makesrna/intern/rna_world.c (working copy) @@ -260,6 +260,7 @@ RNA_def_property_float_sdna(prop, NULL, "aoenergy"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_range(prop, 0, 1, 0.1, 2); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending"); RNA_def_property_update(prop, 0, "rna_World_update"); @@ -278,6 +279,7 @@ prop = RNA_def_property(srna, "environment_energy", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ao_env_energy"); RNA_def_property_ui_range(prop, 0, FLT_MAX, 1, 3); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Environment Color", "Defines the strength of environment light"); RNA_def_property_update(prop, 0, "rna_World_update"); @@ -297,12 +299,14 @@ RNA_def_property_float_sdna(prop, NULL, "ao_indirect_energy"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_range(prop, 0, 1, 0.1, 2); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Indirect Factor", "Factor for how much surrounding objects contribute to light"); RNA_def_property_update(prop, 0, "rna_World_update"); prop = RNA_def_property(srna, "indirect_bounces", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "ao_indirect_bounces"); RNA_def_property_range(prop, 1, SHRT_MAX); + RNA_def_property_int_default(prop, 1); RNA_def_property_ui_text(prop, "Bounces", "Number of indirect diffuse light bounces"); RNA_def_property_update(prop, 0, "rna_World_update"); @@ -323,17 +327,20 @@ RNA_def_property_float_sdna(prop, NULL, "aodist"); RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect"); + RNA_def_property_float_default(prop, 10.0f); RNA_def_property_update(prop, 0, "rna_World_update"); prop = RNA_def_property(srna, "falloff_strength", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "aodistfac"); RNA_def_property_ui_text(prop, "Strength", "Attenuation falloff strength, the higher, the less influence distant objects have"); + RNA_def_property_float_default(prop, 0.0f); RNA_def_property_update(prop, 0, "rna_World_update"); prop = RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "aobias"); RNA_def_property_range(prop, 0, 0.5); + RNA_def_property_float_default(prop, 0.050f); RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding " "(for Raytrace Constant Jittered)"); @@ -350,6 +357,7 @@ prop = RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac"); RNA_def_property_range(prop, 0, 1); + RNA_def_property_float_default(prop, 0.0f); RNA_def_property_ui_text(prop, "Adapt To Speed", "Use the speed vector pass to reduce AO samples in fast moving pixels - " "higher values result in more aggressive sample reduction " @@ -383,6 +391,7 @@ prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "aosamp"); RNA_def_property_range(prop, 1, 128); + RNA_def_property_int_default(prop, 5); RNA_def_property_ui_text(prop, "Samples", "Amount of ray samples. Higher values give smoother results and longer rendering times"); RNA_def_property_update(prop, 0, "rna_World_update"); @@ -390,6 +399,7 @@ prop = RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method"); RNA_def_property_enum_items(prop, prop_sample_method_items); + RNA_def_property_enum_default(prop, WO_AOSAMP_HAMMERSLEY); RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace)"); RNA_def_property_update(prop, 0, "rna_World_update"); } @@ -419,6 +429,7 @@ prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "misi"); RNA_def_property_range(prop, 0, 1); + RNA_def_property_float_default(prop, 0.0f); RNA_def_property_ui_text(prop, "Minimum", "Overall minimum intensity of the mist effect"); RNA_def_property_update(prop, 0, "rna_World_update"); @@ -426,6 +437,7 @@ RNA_def_property_float_sdna(prop, NULL, "miststa"); RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0, 10000, 10, 2); + RNA_def_property_float_default(prop, 5.0f); RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist, measured from the camera"); RNA_def_property_update(prop, 0, "rna_World_draw_mist_update"); @@ -433,6 +445,7 @@ RNA_def_property_float_sdna(prop, NULL, "mistdist"); RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0, 10000, 10, 2); + RNA_def_property_float_default(prop, 25.0f); RNA_def_property_ui_text(prop, "Depth", "Distance over which the mist effect fades in"); RNA_def_property_update(prop, 0, "rna_World_draw_mist_update"); @@ -467,24 +480,28 @@ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "starsize"); RNA_def_property_range(prop, 0, 10); + RNA_def_property_float_default(prop, 2.0f); RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars"); RNA_def_property_update(prop, 0, "rna_World_draw_update"); /* use normal update since this isn't visualized */ prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "starmindist"); RNA_def_property_range(prop, 0, 1000); + RNA_def_property_float_default(prop, 0.0f); RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars"); RNA_def_property_update(prop, 0, "rna_World_stars_update"); prop = RNA_def_property(srna, "average_separation", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "stardist"); RNA_def_property_range(prop, 2, 1000); + RNA_def_property_float_default(prop, 15.0f); RNA_def_property_ui_text(prop, "Average Separation", "Average distance between any two stars"); RNA_def_property_update(prop, 0, "rna_World_stars_update"); prop = RNA_def_property(srna, "color_random", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "starcolnoise"); RNA_def_property_range(prop, 0, 1); + RNA_def_property_float_default(prop, 0.0f); RNA_def_property_ui_text(prop, "Color Randomization", "Randomize star colors"); RNA_def_property_update(prop, 0, "rna_World_stars_update"); } @@ -506,6 +523,10 @@ }; #endif + static float default_horizon_color[3] = {0.05088f, 0.05088f, 0.05088f}; + static float default_zenith_color[3] = {0.01002f, 0.01002f, 0.01002f}; + static float default_ambient_color[3] = {0.0f, 0.0f, 0.0f}; + srna = RNA_def_struct(brna, "World", "ID"); RNA_def_struct_ui_text(srna, "World", "World datablock describing the environment and ambient lighting of a scene"); @@ -520,20 +541,22 @@ RNA_def_property_float_sdna(prop, NULL, "horr"); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon"); + RNA_def_property_float_array_default(prop, default_horizon_color); /* RNA_def_property_update(prop, 0, "rna_World_update"); */ /* render-only uses this */ RNA_def_property_update(prop, NC_WORLD | ND_WORLD_DRAW, "rna_World_update"); - prop = RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "zenr"); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Zenith Color", "Color at the zenith"); + RNA_def_property_float_array_default(prop, default_zenith_color); RNA_def_property_update(prop, 0, "rna_World_update"); prop = RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "ambr"); RNA_def_property_array(prop, 3); + RNA_def_property_float_array_default(prop, default_ambient_color); RNA_def_property_ui_text(prop, "Ambient Color", "Ambient color of the world"); RNA_def_property_update(prop, 0, "rna_World_update"); @@ -541,12 +564,14 @@ prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "exp"); RNA_def_property_range(prop, 0.0, 1.0); + RNA_def_property_float_default(prop, 0.0f); RNA_def_property_ui_text(prop, "Exposure", "Amount of exponential color correction for light"); RNA_def_property_update(prop, 0, "rna_World_update"); prop = RNA_def_property(srna, "color_range", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "range"); RNA_def_property_range(prop, 0.2, 5.0); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Range", "The color range that will be mapped to 0-1"); RNA_def_property_update(prop, 0, "rna_World_update");