Index: source/blender/makesdna/DNA_defaults.h =================================================================== --- source/blender/makesdna/DNA_defaults.h (revision 0) +++ source/blender/makesdna/DNA_defaults.h (revision 0) @@ -0,0 +1,587 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Harley Acheson + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file DNA_defaults.h + * \ingroup DNA + */ + +#ifndef __DNA_DEFAULTS_H__ +#define __DNA_DEFAULTS_H__ + + + + +/************************************************************************/ +/* Animation Defaults from rna_animation.c */ + +/* Animation: KeyingSetPath - Path to a setting for use in a Keying Set */ +#define KEYINGSETPATH_ID_TYPE_DEFAULT ID_OB + +/* Animation: AnimData - Animation data for datablock */ +#define ANIMDATA_ACTION_INFLUENCE_DEFAULT 1.0f + + + +/************************************************************************/ +/* Armature Defaults from rna_armature.c */ + +/* Armature: Armature */ +#define ARMATURE_SHOW_BONE_CUSTOM_SHAPES_DEFAULT TRUE +#define ARMATURE_SHOW_GROUP_COLORS_DEFAULT TRUE + + + +/************************************************************************/ +/* Brush Defaults from rna_brush.c */ + +/* Brush: Brush - Brush datablock for storing brush settings for painting and sculpting */ +#define BRUSH_WEIGHT_DEFAULT 1.0f +#define BRUSH_STRENGTH_DEFAULT 0.5f +#define BRUSH_PLANE_OFFSET_DEFAULT 0 +#define BRUSH_PLANE_TRIM_DEFAULT 0.5f +#define BRUSH_HEIGHT_DEFAULT 0.5f +#define BRUSH_TEXTURE_SAMPLE_BIAS_DEFAULT 0 +#define BRUSH_NORMAL_WEIGHT_DEFAULT 0 +#define BRUSH_CREASE_PINCH_FACTOR_DEFAULT 2.0f / 3.0f +#define BRUSH_AUTO_SMOOTH_FACTOR_DEFAULT 0 + + + +/************************************************************************/ +/* Camera Defaults from rna_camera.c */ + +/* Camera: Camera - Camera datablock for storing camera settings */ +#define CAMERA_PASSEPARTOUT_ALPHA_DEFAULT 0.5f +#define CAMERA_ANGLE_DEFAULT 0.857556f +#define CAMERA_CLIP_START_DEFAULT 0.1f +#define CAMERA_CLIP_END_DEFAULT 100.0f +#define CAMERA_LENS_DEFAULT 35.0f +#define CAMERA_SENSOR_WIDTH_DEFAULT 32.0f +#define CAMERA_SENSOR_HEIGHT_DEFAULT 18.0f +#define CAMERA_DRAW_SIZE_DEFAULT 0.5f +#define CAMERA_SHOW_PASSEPARTOUT_DEFAULT TRUE + + + +/************************************************************************/ +/* Cloth Defaults from rna_cloth.c */ + +/* Cloth: ClothCollisionSettings - Cloth Collision Settings */ +#define CLOTHCOLLISIONSETTINGS_REPEL_FORCE_DEFAULT 1.0f +#define CLOTHCOLLISIONSETTINGS_DISTANCE_REPEL_DEFAULT 0.005f + + + +/************************************************************************/ +/* Color Defaults from rna_color.c */ + +/* Color: ColorManagedViewSettings - Color management settings used for displaying images on the display */ +#define COLORMANAGEDVIEWSETTINGS_EXPOSURE_DEFAULT 0.0f +#define COLORMANAGEDVIEWSETTINGS_GAMMA_DEFAULT 1.0f + + + +/************************************************************************/ +/* Curve Defaults from rna_curve.c */ + +/* Curve: BezierSplinePoint - Bezier curve point with two handles */ +#define BEZIERSPLINEPOINT_PATH_DURATION_DEFAULT 100 +#define BEZIERSPLINEPOINT_USE_RADIUS_DEFAULT TRUE +#define BEZIERSPLINEPOINT_SIZE_DEFAULT 1.0f +#define BEZIERSPLINEPOINT_SMALL_CAPS_SCALE_DEFAULT 0.75f +#define BEZIERSPLINEPOINT_SPACE_LINE_DEFAULT 1.0f +#define BEZIERSPLINEPOINT_SPACE_WORD_DEFAULT 1.0f +#define BEZIERSPLINEPOINT_SPACE_CHARACTER_DEFAULT 1.0f +#define BEZIERSPLINEPOINT_UNDERLINE_HEIGHT_DEFAULT 0.050f + +/* Curve: Curve - Curve datablock storing curves, splines and NURBS */ +#define CURVE_RESOLUTION_U_DEFAULT 12 +#define CURVE_RENDER_RESOLUTION_V_DEFAULT 4 +#define CURVE_DIMENSIONS_DEFAULT CU_3D +#define CURVE_FILL_MODE_DEFAULT CU_FRONT | CU_BACK +#define CURVE_TWIST_MODE_DEFAULT CU_TWIST_MINIMUM +#define CURVE_USE_FILL_DEFORM_DEFAULT TRUE +#define CURVE_USE_AUTO_TEXSPACE_DEFAULT TRUE +#define CURVE_BEVEL_FACTOR_END_DEFAULT 1.0f + +/* Curve: Spline */ +#define SPLINE_RESOLUTION_U_DEFAULT 4 + + + +/************************************************************************/ +/* Fcurve Defaults from rna_fcurve.c */ + +/* Fcurve: FModifier - Modifier for values of F-Curve */ +#define FMODIFIER_INFLUENCE_DEFAULT 1.0f + +/* Fcurve: DriverTarget - Source of input values for driver variables */ +#define DRIVERTARGET_ID_TYPE_DEFAULT ID_OB + + + +/************************************************************************/ +/* Gpencil Defaults from rna_gpencil.c */ + +/* Gpencil: GPencilLayer - Collection of related sketches */ +#define GPENCILLAYER_ALPHA_DEFAULT 0.9f +#define GPENCILLAYER_LINE_WIDTH_DEFAULT 3 + +/* Gpencil: GreasePencil - Freehand annotation sketchbook */ +#define GREASEPENCIL_DRAW_MODE_DEFAULT GP_DATA_VIEWALIGN + + + +/************************************************************************/ +/* Key Defaults from rna_key.c */ + +/* Key: ShapeKey - Shape key in a shape keys datablock */ +#define SHAPEKEY_SLIDER_MAX_DEFAULT 1.0f + + + +/************************************************************************/ +/* Lamp Defaults from rna_lamp.c */ + +/* Lamp: Lamp - Lamp datablock for lighting a scene */ +#define LAMP_DISTANCE_DEFAULT 30.0f +#define LAMP_ENERGY_DEFAULT 1.0f +#define LAMP_USE_SPECULAR_DEFAULT TRUE +#define LAMP_USE_DIFFUSE_DEFAULT TRUE +#define LAMP_FALLOFF_TYPE_DEFAULT LA_FALLOFF_INVSQUARE +#define LAMP_LINEAR_ATTENUATION_DEFAULT 0.0f +#define LAMP_QUADRATIC_ATTENUATION_DEFAULT 1.0f +#define LAMP_SHADOW_METHOD_DEFAULT LA_SHAD_RAY +#define LAMP_SHADOW_ADAPTIVE_THRESHOLD_DEFAULT 0.001f +#define LAMP_SHADOW_SOFT_SIZE_DEFAULT 1.0f + + + +/************************************************************************/ +/* Lattice Defaults from rna_lattice.c */ + +/* Lattice: Lattice - Lattice datablock defining a grid for deforming other objects */ +#define LATTICE_POINTS_U_DEFAULT 2 +#define LATTICE_POINTS_V_DEFAULT 2 +#define LATTICE_POINTS_W_DEFAULT 2 +#define LATTICE_INTERPOLATION_TYPE_U_DEFAULT KEY_BSPLINE +#define LATTICE_INTERPOLATION_TYPE_V_DEFAULT KEY_BSPLINE +#define LATTICE_INTERPOLATION_TYPE_W_DEFAULT KEY_BSPLINE + + + +/************************************************************************/ +/* Mask Defaults from rna_mask.c */ + +/* Mask: MaskParent - Parenting settings for masking element */ +#define MASKPARENT_ID_TYPE_DEFAULT ID_MC + + + +/************************************************************************/ +/* Mesh Defaults from rna_mesh.c */ + +/* Mesh: MeshStringProperty - Mesh String Property */ +#define MESHSTRINGPROPERTY_AUTO_TEXSPACE_DEFAULT TRUE + +/* Mesh: Mesh - Mesh datablock defining geometric surfaces */ +#define MESH_AUTO_SMOOTH_ANGLE_RAD_DEFAULT 0.523599f +#define MESH_AUTO_SMOOTH_ANGLE_DEG_DEFAULT 30.0f +#define MESH_SHOW_DOUBLE_SIDED_DEFAULT TRUE + + + +/************************************************************************/ +/* Meta Defaults from rna_meta.c */ + +/* Meta: MetaBall - Metaball datablock to defined blobby surfaces */ +#define METABALL_RESOLUTION_DEFAULT 0.400f +#define METABALL_RENDER_RESOLUTION_DEFAULT 0.200f +#define METABALL_THRESHOLD_DEFAULT 0.600f + + + +/************************************************************************/ +/* Modifier Defaults from rna_modifier.c */ + +/* Modifier: VertexWeightProximityModifier - WeightVG Proximity Modifier */ +#define VERTEXWEIGHTPROXIMITYMODIFIER_PROXIMITY_MODE_DEFAULT MOD_WVG_PROXIMITY_GEOMETRY +#define VERTEXWEIGHTPROXIMITYMODIFIER_PROXIMITY_GEOMETRY_DEFAULT MOD_WVG_PROXIMITY_GEOM_FACES + + + +/************************************************************************/ +/* Nodetree Defaults from rna_nodetree.c */ + +#define NODETEXBRICK_OFFSET_FREQUENCY_DEFAULT 2 +#define NODETEXBRICK_SQUASH_FREQUENCY_DEFAULT 2 +#define NODETEXBRICK_OFFSET_DEFAULT 0.5f +#define NODETEXBRICK_SQUASH_DEFAULT 1.0f + +#define CMP_BOXMASK_X_DEFAULT 0.5f +#define CMP_BOXMASK_Y_DEFAULT 0.5f +#define CMP_BOXMASK_WIDTH_DEFAULT 0.3f +#define CMP_BOXMASK_HEIGHT_DEFAULT 0.2f +#define CMP_BOXMASK_ROTATION_DEFAULT 0.0f + +#define CMP_ELLIPSEMASK_X_DEFAULT 0.5f +#define CMP_ELLIPSEMASK_Y_DEFAULT 0.5f +#define CMP_ELLIPSEMASK_WIDTH_DEFAULT 0.3f +#define CMP_ELLIPSEMASK_HEIGHT_DEFAULT 0.2f +#define CMP_ELLIPSEMASK_ROTATION_DEFAULT 0.0f + +#define CMP_BOKEHIMAGE_ANGLE_DEFAULT 0.0f +#define CMP_BOKEHIMAGE_FLAPS_DEFAULT 5 +#define CMP_BOKEHIMAGE_ROUNDING_DEFAULT 0.0f +#define CMP_BOKEHIMAGE_CATADIOPTRIC_DEFAULT 0.0f +#define CMP_BOKEHIMAGE_SHIFT_DEFAULT 0.0f + +#define CMP_COLORCORRECTION_RED_DEFAULT TRUE +#define CMP_COLORCORRECTION_GREEN_DEFAULT TRUE +#define CMP_COLORCORRECTION_BLUE_DEFAULT TRUE +#define CMP_COLORCORRECTION_MIDTONES_START_DEFAULT 0.2f +#define CMP_COLORCORRECTION_MIDTONES_END_DEFAULT 0.7f +#define CMP_COLORCORRECTION_MASTER_SATURATION_DEFAULT 1.0f +#define CMP_COLORCORRECTION_MASTER_CONTRAST_DEFAULT 1.0f +#define CMP_COLORCORRECTION_MASTER_GAMMA_DEFAULT 1.0f +#define CMP_COLORCORRECTION_MASTER_GAIN_DEFAULT 1.0f +#define CMP_COLORCORRECTION_MASTER_LIFT_DEFAULT 0.0f +#define CMP_COLORCORRECTION_SHADOWS_SATURATION_DEFAULT 1.0f +#define CMP_COLORCORRECTION_SHADOWS_CONTRAST_DEFAULT 1.0f +#define CMP_COLORCORRECTION_SHADOWS_GAMMA_DEFAULT 1.0f +#define CMP_COLORCORRECTION_SHADOWS_GAIN_DEFAULT 1.0f +#define CMP_COLORCORRECTION_SHADOWS_LIFT_DEFAULT 0.0f +#define CMP_COLORCORRECTION_MIDTONES_SATURATION_DEFAULT 1.0f +#define CMP_COLORCORRECTION_MIDTONES_CONTRAST_DEFAULT 1.0f +#define CMP_COLORCORRECTION_MIDTONES_GAMMA_DEFAULT 1.0f +#define CMP_COLORCORRECTION_MIDTONES_GAIN_DEFAULT 1.0f +#define CMP_COLORCORRECTION_MIDTONES_LIFT_DEFAULT 0.0f +#define CMP_COLORCORRECTION_HIGHLIGHTS_SATURATION_DEFAULT 1.0f +#define CMP_COLORCORRECTION_HIGHLIGHTS_CONTRAST_DEFAULT 1.0f +#define CMP_COLORCORRECTION_HIGHLIGHTS_GAMMA_DEFAULT 1.0f +#define CMP_COLORCORRECTION_HIGHLIGHTS_GAIN_DEFAULT 1.0f +#define CMP_COLORCORRECTION_HIGHLIGHTS_LIFT_DEFAULT 0.0f + +#define CMP_VIEWER_CENTER_X_DEFAULT 0.5f +#define CMP_VIEWER_CENTER_Y_DEFAULT 0.5f + +/* Nodetree: NodeSocket - Input or output socket of a node */ +#define NODESOCKET_TYPE_DEFAULT 0 + + + +/************************************************************************/ +/* Object Defaults from rna_object.c */ + +/* Object: Object - Object datablock defining an object in a scene */ +#define OBJECT_TRACK_AXIS_DEFAULT OB_POSY +#define OBJECT_UP_AXIS_DEFAULT OB_POSZ +#define OBJECT_ROTATION_MODE_DEFAULT ROT_MODE_XYZ +#define OBJECT_EMPTY_DRAW_SIZE_DEFAULT 1.0f +#define OBJECT_USE_DUPLI_FRAMES_SPEED_DEFAULT TRUE +#define OBJECT_DUPLI_FRAMES_START_DEFAULT 1 +#define OBJECT_DUPLI_FRAMES_END_DEFAULT 100 +#define OBJECT_DUPLI_FRAMES_ON_DEFAULT 1 +#define OBJECT_DUPLI_FRAMES_OFF_DEFAULT 0 +#define OBJECT_DRAW_TYPE_DEFAULT OB_TEXTURE +#define OBJECT_SHOW_NAME_DEFAULT FALSE + + + +/************************************************************************/ +/* Particle Defaults from rna_particle.c */ + +/* Particle: ParticleSettings - Particle settings, reusable by multiple particle systems */ +#define PARTICLESETTINGS_COURANT_TARGET_DEFAULT 0.2 + + + + +/************************************************************************/ +/* Scene Defaults from rna_scene.c */ + +/* Scene: UnifiedPaintSettings - Overrides for some of the active brush's settings */ +#define UNIFIEDPAINTSETTINGS_STRENGTH_DEFAULT 0.5f +#define UNIFIEDPAINTSETTINGS_WEIGHT_DEFAULT 0.5f + +/* Scene: UnitSettings - Unit Settings */ +#define UNITSETTINGS_SCALE_LENGTH_DEFAULT 1.0f +#define UNITSETTINGS_USE_SEPARATE_DEFAULT FALSE + +/* Scene: RenderLayer */ +#define RENDERLAYER_USE_ZMASK_DEFAULT FALSE +#define RENDERLAYER_INVERT_ZMASK_DEFAULT FALSE +#define RENDERLAYER_USE_ALL_Z_DEFAULT FALSE +#define RENDERLAYER_USE_SOLID_DEFAULT TRUE +#define RENDERLAYER_USE_HALO_DEFAULT TRUE +#define RENDERLAYER_USE_ZTRANSP_DEFAULT TRUE +#define RENDERLAYER_USE_SKY_DEFAULT TRUE +#define RENDERLAYER_USE_EDGE_ENHANCE_DEFAULT TRUE +#define RENDERLAYER_USE_STRAND_DEFAULT TRUE +#define RENDERLAYER_USE_PASS_COMBINED_DEFAULT TRUE +#define RENDERLAYER_USE_PASS_Z_DEFAULT TRUE +#define RENDERLAYER_USE_PASS_VECTOR_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_NORMAL_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_UV_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_MIST_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_OBJECT_INDEX_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_MATERIAL_INDEX_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_COLOR_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_DIFFUSE_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_SPECULAR_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_SHADOW_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_AMBIENT_OCCLUSION_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_REFLECTION_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_REFRACTION_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_EMIT_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_ENVIRONMENT_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_INDIRECT_DEFAULT FALSE +#define RENDERLAYER_EXCLUDE_SPECULAR_DEFAULT FALSE +#define RENDERLAYER_EXCLUDE_SHADOW_DEFAULT FALSE +#define RENDERLAYER_EXCLUDE_AMBIENT_OCCLUSION_DEFAULT FALSE +#define RENDERLAYER_EXCLUDE_REFLECTION_DEFAULT FALSE +#define RENDERLAYER_EXCLUDE_REFRACTION_DEFAULT FALSE +#define RENDERLAYER_EXCLUDE_EMIT_DEFAULT FALSE +#define RENDERLAYER_EXCLUDE_ENVIRONMENT_DEFAULT FALSE +#define RENDERLAYER_EXCLUDE_INDIRECT_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_DIFFUSE_DIRECT_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_DIFFUSE_INDIRECT_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_DIFFUSE_COLOR_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_GLOSSY_DIRECT_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_GLOSSY_INDIRECT_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_GLOSSY_COLOR_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_TRANSMISSION_DIRECT_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_TRANSMISSION_INDIRECT_DEFAULT FALSE +#define RENDERLAYER_USE_PASS_TRANSMISSION_COLOR_DEFAULT FALSE + +/* Scene: SceneGameData - Game data for a Scene datablock */ +#define SCENEGAMEDATA_RESOLUTION_X_DEFAULT 1920 +#define SCENEGAMEDATA_RESOLUTION_Y_DEFAULT 1080 + +/* Scene: ImageFormatSettings - Settings for image formats */ +#define IMAGEFORMATSETTINGS_FILE_FORMAT_DEFAULT R_IMF_IMTYPE_PNG +#define IMAGEFORMATSETTINGS_COLOR_MODE_DEFAULT R_IMF_PLANES_RGB +#define IMAGEFORMATSETTINGS_QUALITY_DEFAULT 90 +#define IMAGEFORMATSETTINGS_COMPRESSION_DEFAULT 90 + +/* Scene: FFmpegSettings - FFmpeg related settings for the scene */ +#define FFMPEGSETTINGS_AUDIO_VOLUME_DEFAULT 1.0f +#define FFMPEGSETTINGS_AUDIO_MIXRATE_DEFAULT 44100 +#define FFMPEGSETTINGS_AUDIO_CHANNELS_DEFAULT 2 + +/* Scene: RenderSettings - Rendering settings for a Scene datablock */ +#define RENDERSETTINGS_RESOLUTION_PERCENTAGE_DEFAULT 50 +#define RENDERSETTINGS_PARTS_X_DEFAULT 8 +#define RENDERSETTINGS_PARTS_Y_DEFAULT 8 +#define RENDERSETTINGS_FRAME_MAP_OLD_DEFAULT 100 +#define RENDERSETTINGS_FRAME_MAP_NEW_DEFAULT 100 +#define RENDERSETTINGS_PIXEL_FILTER_TYPE_DEFAULT R_FILTER_MITCH +#define RENDERSETTINGS_FILTER_SIZE_DEFAULT 1.0f +#define RENDERSETTINGS_USE_INSTANCES_DEFAULT TRUE +#define RENDERSETTINGS_USE_LOCAL_COORDS_DEFAULT FALSE +#define RENDERSETTINGS_ANTIALIASING_SAMPLES_DEFAULT 8 +#define RENDERSETTINGS_USE_FIELDS_DEFAULT FALSE +#define RENDERSETTINGS_USE_FIELDS_STILL_DEFAULT FALSE +#define RENDERSETTINGS_USE_SHADOWS_DEFAULT TRUE +#define RENDERSETTINGS_USE_ENVMAPS_DEFAULT TRUE +#define RENDERSETTINGS_USE_SSS_DEFAULT TRUE +#define RENDERSETTINGS_USE_RAYTRACE_DEFAULT TRUE +#define RENDERSETTINGS_USE_TEXTURES_DEFAULT TRUE +#define RENDERSETTINGS_USE_EDGE_ENHANCE_DEFAULT FALSE +#define RENDERSETTINGS_EDGE_THRESHOLD_DEFAULT 10 +#define RENDERSETTINGS_MOTION_BLUR_SAMPLES_DEFAULT 1 +#define RENDERSETTINGS_MOTION_BLUR_SHUTTER_DEFAULT 0.5f +#define RENDERSETTINGS_USE_BORDER_DEFAULT FALSE +#define RENDERSETTINGS_USE_CROP_TO_BORDER_DEFAULT FALSE +#define RENDERSETTINGS_USE_PLACEHOLDER_DEFAULT FALSE +#define RENDERSETTINGS_USE_OVERWRITE_DEFAULT TRUE +#define RENDERSETTINGS_USE_COMPOSITING_DEFAULT TRUE +#define RENDERSETTINGS_USE_SEQUENCER_DEFAULT TRUE +#define RENDERSETTINGS_USE_FILE_EXTENSION_DEFAULT TRUE +#define RENDERSETTINGS_USE_FREE_IMAGE_TEXTURES_DEFAULT FALSE +#define RENDERSETTINGS_USE_FREE_UNUSED_NODES_DEFAULT FALSE +#define RENDERSETTINGS_USE_SAVE_BUFFERS_DEFAULT FALSE +#define RENDERSETTINGS_USE_FULL_SAMPLE_DEFAULT FALSE +#define RENDERSETTINGS_DISPLAY_MODE_DEFAULT R_OUTPUT_AREA +#define RENDERSETTINGS_USE_BAKE_SELECTED_TO_ACTIVE_DEFAULT FALSE +#define RENDERSETTINGS_USE_BAKE_CLEAR_DEFAULT TRUE +#define RENDERSETTINGS_BAKE_MARGIN_DEFAULT 2 +#define RENDERSETTINGS_USE_STAMP_TIME_DEFAULT TRUE +#define RENDERSETTINGS_USE_STAMP_DATE_DEFAULT TRUE +#define RENDERSETTINGS_USE_STAMP_FRAME_DEFAULT TRUE +#define RENDERSETTINGS_USE_STAMP_CAMERA_DEFAULT TRUE +#define RENDERSETTINGS_USE_STAMP_LENS_DEFAULT FALSE +#define RENDERSETTINGS_USE_STAMP_SCENE_DEFAULT TRUE +#define RENDERSETTINGS_USE_STAMP_NOTE_DEFAULT FALSE +#define RENDERSETTINGS_USE_STAMP_MARKER_DEFAULT FALSE +#define RENDERSETTINGS_USE_STAMP_FILENAME_DEFAULT TRUE +#define RENDERSETTINGS_USE_STAMP_SEQUENCER_STRIP_DEFAULT FALSE +#define RENDERSETTINGS_USE_STAMP_RENDER_TIME_DEFAULT TRUE +#define RENDERSETTINGS_STAMP_FONT_SIZE_DEFAULT 12 +#define RENDERSETTINGS_SIMPLIFY_SUBDIVISION_DEFAULT 6 +#define RENDERSETTINGS_SIMPLIFY_CHILD_PARTICLES_DEFAULT 1.0f +#define RENDERSETTINGS_SIMPLIFY_SHADOW_SAMPLES_DEFAULT 16 +#define RENDERSETTINGS_SIMPLIFY_AO_SSS_DEFAULT 1.0f +#define RENDERSETTINGS_USE_SIMPLIFY_TRIANGULATE_DEFAULT FALSE + +/* Scene: Scene */ +#define SCENE_GRAVITY_X_DEFAULT 0.0f +#define SCENE_GRAVITY_Y_DEFAULT 0.0f +#define SCENE_GRAVITY_Z_DEFAULT -9.810 +#define SCENE_FRAME_START_DEFAULT 1 +#define SCENE_FRAME_END_DEFAULT 250 +#define SCENE_FRAME_STEP_DEFAULT 1 +#define SCENE_AUDIO_DOPPLER_SPEED_DEFAULT 343.300f +#define SCENE_AUDIO_DOPPLER_FACTOR_DEFAULT 1.0f +#define SCENE_AUDIO_DISTANCE_MODEL_DEFAULT 2 +#define SCENE_AUDIO_VOLUME_DEFAULT 1.0f + + + +/************************************************************************/ +/* Sculpt_paint Defaults from rna_sculpt_paint.c */ + +/* Sculpt_paint: Sculpt */ +#define SCULPT_RADIAL_SYMMETRY_DEFAULT 1 + + + +/************************************************************************/ +/* Sequencer Defaults from rna_sequencer.c */ + +/* Sequencer: SequenceColorBalanceData - Color balance parameters for a sequence strip and it's modifiers */ +#define SEQUENCECOLORBALANCEDATA_LIFT_DEFAULT 1.0f +#define SEQUENCECOLORBALANCEDATA_GAMMA_DEFAULT 1.0f +#define SEQUENCECOLORBALANCEDATA_GAIN_DEFAULT 1.0f + +/* Sequencer: SequenceEditor - Sequence editing data for a Scene datablock */ +#define SEQUENCEEDITOR_COLOR_MULTIPLY_DEFAULT 1.0f +#define SEQUENCEEDITOR_COLOR_SATURATION_DEFAULT 1.0f + +/* Sequencer: ColorBalanceModifier - Color balance modifier for sequence strip */ +#define COLORBALANCEMODIFIER_COLOR_MULTIPLY_DEFAULT 1.0f + + + +/************************************************************************/ +/* Space Defaults from rna_space.c */ + +/* Space: SpaceView3D - 3D View space data */ +#define SPACEVIEW3D_LENS_DEFAULT 35.0f +#define SPACEVIEW3D_CLIP_START_DEFAULT 0.1f +#define SPACEVIEW3D_CLIP_END_DEFAULT 1000.0f +#define SPACEVIEW3D_GRID_SCALE_DEFAULT 1.0f +#define SPACEVIEW3D_GRID_LINES_DEFAULT 16 +#define SPACEVIEW3D_GRID_SUBDIVISIONS_DEFAULT 10 +#define SPACEVIEW3D_TRACKS_DRAW_SIZE_DEFAULT 0.2f + +/* Space: SpaceNodeEditor - Node editor space data */ +#define SPACENODEEDITOR_BACKDROP_ZOOM_DEFAULT 1.0f + + + +/************************************************************************/ +/* Speaker Defaults from rna_speaker.c */ + +/* Speaker: Speaker - Speaker datablock for 3D audio speaker objects */ +#define SPEAKER_VOLUME_MAX_DEFAULT 1.0f +#define SPEAKER_VOLUME_MIN_DEFAULT 0.0f +#define SPEAKER_DISTANCE_MAX_DEFAULT FLT_MAX +#define SPEAKER_DISTANCE_REFERENCE_DEFAULT 1.0f +#define SPEAKER_ATTENUATION_DEFAULT 1.0f +#define SPEAKER_CONE_ANGLE_OUTER_DEFAULT 360.0f +#define SPEAKER_CONE_ANGLE_INNER_DEFAULT 360.0f +#define SPEAKER_CONE_VOLUME_OUTER_DEFAULT 1.0f +#define SPEAKER_VOLUME_DEFAULT 1.0f +#define SPEAKER_PITCH_DEFAULT 1.0f + + + +/************************************************************************/ +/* Tracking Defaults from rna_tracking.c */ + +/* Tracking: MovieTrackingSettings - Movie tracking settings */ +#define MOVIETRACKINGSETTINGS_DISTANCE_DEFAULT 1.0f +#define MOVIETRACKINGSETTINGS_OBJECT_DISTANCE_DEFAULT 1.0f + +/* Tracking: MovieTrackingCamera - Match-moving camera data for tracking */ +#define MOVIETRACKINGCAMERA_PIXEL_ASPECT_DEFAULT 1.0f + +/* Tracking: MovieTrackingObject - Match-moving object tracking and reconstruction data */ +#define MOVIETRACKINGOBJECT_SCALE_DEFAULT 1.0f + + + +/************************************************************************/ +/* Userdef Defaults from rna_userdef.c */ + +/* Userdef: ThemeNodeEditor - Theme settings for the Node Editor */ +#define THEMENODEEDITOR_NOODLE_CURVING_DEFAULT 5 + +/* Userdef: UserPreferencesView - Preferences related to viewing data */ +#define USERPREFERENCESVIEW_MANIPULATOR_SIZE_DEFAULT 15 +#define USERPREFERENCESVIEW_MANIPULATOR_HANDLE_SIZE_DEFAULT 25 +#define USERPREFERENCESVIEW_MANIPULATOR_HOTSPOT_DEFAULT 14 + +/* Userdef: UserPreferencesSystem - Graphics driver and operating system settings */ +#define USERPREFERENCESSYSTEM_ANISOTROPIC_FILTER_DEFAULT 1 + +/* Userdef: UserPreferencesFilePaths - Default paths for external files */ +#define USERPREFERENCESFILEPATHS_ANIMATION_PLAYER_PRESET_DEFAULT 1 + + + +/************************************************************************/ +/* World Defaults from rna_world.c */ + +/* World: WorldLighting - Lighting for a World datablock */ +#define WORLDLIGHTING_AO_FACTOR_DEFAULT 1.0f +#define WORLDLIGHTING_ENVIRONMENT_ENERGY_DEFAULT 1.0f +#define WORLDLIGHTING_INDIRECT_FACTOR_DEFAULT 1.0f +#define WORLDLIGHTING_INDIRECT_BOUNCES_DEFAULT 1 +#define WORLDLIGHTING_DISTANCE_DEFAULT 10.0f +#define WORLDLIGHTING_FALLOFF_STRENGTH_DEFAULT 0.0f +#define WORLDLIGHTING_BIAS_DEFAULT 0.050f +#define WORLDLIGHTING_ADAPT_TO_SPEED_DEFAULT 0.0f +#define WORLDLIGHTING_SAMPLES_DEFAULT 5 +#define WORLDLIGHTING_SAMPLE_METHOD_DEFAULT WO_AOSAMP_HAMMERSLEY + +/* World: WorldMistSettings - Mist settings for a World data-block */ +#define WORLDMISTSETTINGS_INTENSITY_DEFAULT 0.0f +#define WORLDMISTSETTINGS_START_DEFAULT 5.0f +#define WORLDMISTSETTINGS_DEPTH_DEFAULT 25.0f + +/* World: WorldStarsSettings - Stars settings for a World data-block */ +#define WORLDSTARSSETTINGS_SIZE_DEFAULT 2.0f +#define WORLDSTARSSETTINGS_DISTANCE_MIN_DEFAULT 0.0f +#define WORLDSTARSSETTINGS_AVERAGE_SEPARATION_DEFAULT 15.0f +#define WORLDSTARSSETTINGS_COLOR_RANDOM_DEFAULT 0.0f + +/* World: World */ +#define WORLD_EXPOSURE_DEFAULT 0.0f +#define WORLD_COLOR_RANGE_DEFAULT 1.0f + + + + + +#endif /* __DNA_DEFAULTS_H__ */ Index: source/blender/makesrna/intern/rna_animation.c =================================================================== --- source/blender/makesrna/intern/rna_animation.c (revision 51352) +++ source/blender/makesrna/intern/rna_animation.c (working copy) @@ -35,6 +35,7 @@ #include "DNA_anim_types.h" #include "DNA_action_types.h" #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "BLI_utildefines.h" @@ -588,7 +589,7 @@ prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "idtype"); RNA_def_property_enum_items(prop, id_type_items); - RNA_def_property_enum_default(prop, ID_OB); + RNA_def_property_enum_default(prop, KEYINGSETPATH_ID_TYPE_DEFAULT); RNA_def_property_enum_funcs(prop, NULL, "rna_ksPath_id_type_set", NULL); RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used"); RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_EDITED, NULL); /* XXX: maybe a bit too noisy */ @@ -871,7 +872,7 @@ prop = RNA_def_property(srna, "action_influence", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "act_influence"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, ANIMDATA_ACTION_INFLUENCE_DEFAULT); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Action Influence", "Amount the Active Action contributes to the result of the NLA stack"); Index: source/blender/makesrna/intern/rna_armature.c =================================================================== --- source/blender/makesrna/intern/rna_armature.c (revision 51352) +++ source/blender/makesrna/intern/rna_armature.c (working copy) @@ -36,6 +36,7 @@ #include "DNA_armature_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "WM_api.h" #include "WM_types.h" @@ -1005,11 +1006,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, ARMATURE_SHOW_BONE_CUSTOM_SHAPES_DEFAULT); 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, ARMATURE_SHOW_GROUP_COLORS_DEFAULT); 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_brush.c =================================================================== --- source/blender/makesrna/intern/rna_brush.c (revision 51352) +++ source/blender/makesrna/intern/rna_brush.c (working copy) @@ -36,6 +36,7 @@ #include "DNA_texture_types.h" #include "DNA_scene_types.h" #include "DNA_object_types.h" +#include "DNA_defaults.h" #include "BLI_math.h" @@ -655,7 +656,7 @@ RNA_def_property_update(prop, 0, "rna_Brush_update"); prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, BRUSH_WEIGHT_DEFAULT); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); RNA_def_property_ui_text(prop, "Weight", "Vertex weight when brush is applied"); @@ -663,7 +664,7 @@ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "alpha"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, BRUSH_STRENGTH_DEFAULT); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied"); @@ -671,7 +672,7 @@ prop = RNA_def_property(srna, "plane_offset", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "plane_offset"); - RNA_def_property_float_default(prop, 0); + RNA_def_property_float_default(prop, BRUSH_PLANE_OFFSET_DEFAULT); RNA_def_property_range(prop, -2.0f, 2.0f); RNA_def_property_ui_range(prop, -0.5f, 0.5f, 0.001, 3); RNA_def_property_ui_text(prop, "Plane Offset", @@ -680,7 +681,7 @@ prop = RNA_def_property(srna, "plane_trim", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "plane_trim"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, BRUSH_PLANE_TRIM_DEFAULT); RNA_def_property_range(prop, 0, 1.0f); RNA_def_property_ui_text(prop, "Plane Trim", "If a vertex is further away from offset plane than this, then it is not affected"); @@ -688,35 +689,35 @@ prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "height"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, BRUSH_HEIGHT_DEFAULT); RNA_def_property_range(prop, 0, 1.0f); RNA_def_property_ui_text(prop, "Brush Height", "Affectable height of brush (layer height for layer tool, i.e.)"); RNA_def_property_update(prop, 0, "rna_Brush_update"); prop = RNA_def_property(srna, "texture_sample_bias", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "texture_sample_bias"); - RNA_def_property_float_default(prop, 0); + RNA_def_property_float_default(prop, BRUSH_TEXTURE_SAMPLE_BIAS_DEFAULT); RNA_def_property_range(prop, -1, 1); RNA_def_property_ui_text(prop, "Texture Sample Bias", "Value added to texture samples"); RNA_def_property_update(prop, 0, "rna_Brush_update"); prop = RNA_def_property(srna, "normal_weight", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "normal_weight"); - RNA_def_property_float_default(prop, 0); + RNA_def_property_float_default(prop, BRUSH_NORMAL_WEIGHT_DEFAULT); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Normal Weight", "How much grab will pull vertexes out of surface during a grab"); RNA_def_property_update(prop, 0, "rna_Brush_update"); prop = RNA_def_property(srna, "crease_pinch_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "crease_pinch_factor"); - RNA_def_property_float_default(prop, 2.0f / 3.0f); + RNA_def_property_float_default(prop, BRUSH_CREASE_PINCH_FACTOR_DEFAULT); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Crease Brush Pinch Factor", "How much the crease brush pinches"); RNA_def_property_update(prop, 0, "rna_Brush_update"); prop = RNA_def_property(srna, "auto_smooth_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "autosmooth_factor"); - RNA_def_property_float_default(prop, 0); + RNA_def_property_float_default(prop, BRUSH_AUTO_SMOOTH_FACTOR_DEFAULT); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); RNA_def_property_ui_text(prop, "Autosmooth", "Amount of smoothing to automatically apply to each stroke"); Index: source/blender/makesrna/intern/rna_camera.c =================================================================== --- source/blender/makesrna/intern/rna_camera.c (revision 51352) +++ source/blender/makesrna/intern/rna_camera.c (working copy) @@ -32,6 +32,7 @@ #include "rna_internal.h" #include "DNA_camera_types.h" +#include "DNA_defaults.h" #include "BLI_math.h" @@ -150,6 +151,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, CAMERA_PASSEPARTOUT_ALPHA_DEFAULT); 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 +172,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, CAMERA_ANGLE_DEFAULT); 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 +180,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, CAMERA_CLIP_START_DEFAULT); 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, CAMERA_CLIP_END_DEFAULT); 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, CAMERA_LENS_DEFAULT); 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 +202,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, CAMERA_SENSOR_WIDTH_DEFAULT); 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 +210,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, CAMERA_SENSOR_HEIGHT_DEFAULT); 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 +224,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, CAMERA_DRAW_SIZE_DEFAULT); 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); @@ -254,6 +263,7 @@ RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWPASSEPARTOUT); RNA_def_property_ui_text(prop, "Show Passepartout", "Show a darkened overlay outside the image area in Camera view"); + RNA_def_property_boolean_default(prop, CAMERA_SHOW_PASSEPARTOUT_DEFAULT); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); prop = RNA_def_property(srna, "show_title_safe", PROP_BOOLEAN, PROP_NONE); Index: source/blender/makesrna/intern/rna_cloth.c =================================================================== --- source/blender/makesrna/intern/rna_cloth.c (revision 51352) +++ source/blender/makesrna/intern/rna_cloth.c (working copy) @@ -38,6 +38,7 @@ #include "DNA_cloth_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "WM_api.h" #include "WM_types.h" @@ -481,14 +482,14 @@ prop = RNA_def_property(srna, "repel_force", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "repel_force"); RNA_def_property_range(prop, 0.0f, 20.0f); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CLOTHCOLLISIONSETTINGS_REPEL_FORCE_DEFAULT); RNA_def_property_ui_text(prop, "Repulsion Force", "Repulsion force to apply on cloth when close to colliding"); RNA_def_property_update(prop, 0, "rna_cloth_update"); prop = RNA_def_property(srna, "distance_repel", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "distance_repel"); RNA_def_property_range(prop, 0.001f, 10.0f); - RNA_def_property_float_default(prop, 0.005f); + RNA_def_property_float_default(prop, CLOTHCOLLISIONSETTINGS_DISTANCE_REPEL_DEFAULT); RNA_def_property_ui_text(prop, "Repulsion Distance", "Maximum distance to apply repulsion force, must be greater than minimum distance"); RNA_def_property_update(prop, 0, "rna_cloth_update"); Index: source/blender/makesrna/intern/rna_color.c =================================================================== --- source/blender/makesrna/intern/rna_color.c (revision 51352) +++ source/blender/makesrna/intern/rna_color.c (working copy) @@ -33,6 +33,7 @@ #include "DNA_color_types.h" #include "DNA_texture_types.h" +#include "DNA_defaults.h" #include "WM_api.h" #include "WM_types.h" @@ -889,13 +890,13 @@ prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "exposure"); RNA_def_property_range(prop, -10.0f, 10.0f); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, COLORMANAGEDVIEWSETTINGS_EXPOSURE_DEFAULT); RNA_def_property_ui_text(prop, "Exposure", "Exposure (stops) applied before display transform"); RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update"); prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "gamma"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, COLORMANAGEDVIEWSETTINGS_GAMMA_DEFAULT); RNA_def_property_range(prop, 0.0f, 5.0f); RNA_def_property_ui_text(prop, "Gamma", "Amount of gamma modification applied after display transform"); RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update"); Index: source/blender/makesrna/intern/rna_curve.c =================================================================== --- source/blender/makesrna/intern/rna_curve.c (revision 51352) +++ source/blender/makesrna/intern/rna_curve.c (working copy) @@ -34,6 +34,7 @@ #include "DNA_key_types.h" #include "DNA_material_types.h" #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "BLI_utildefines.h" @@ -840,6 +841,7 @@ 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"); + RNA_def_property_int_default(prop, BEZIERSPLINEPOINT_PATH_DURATION_DEFAULT); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); /* flags */ @@ -873,6 +875,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, BEZIERSPLINEPOINT_USE_RADIUS_DEFAULT); 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 +918,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, BEZIERSPLINEPOINT_SIZE_DEFAULT); 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, BEZIERSPLINEPOINT_SMALL_CAPS_SCALE_DEFAULT); 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, BEZIERSPLINEPOINT_SPACE_LINE_DEFAULT); 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, BEZIERSPLINEPOINT_SPACE_WORD_DEFAULT); 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, BEZIERSPLINEPOINT_SPACE_CHARACTER_DEFAULT); RNA_def_property_ui_text(prop, "Global spacing between characters", ""); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -968,6 +976,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, BEZIERSPLINEPOINT_UNDERLINE_HEIGHT_DEFAULT); RNA_def_property_ui_text(prop, "Underline Thickness", ""); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -1332,6 +1341,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, CURVE_RESOLUTION_U_DEFAULT); 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"); @@ -1353,6 +1363,7 @@ RNA_def_property_int_sdna(prop, NULL, "resolv_ren"); RNA_def_property_ui_range(prop, 0, 64, 1, 0); RNA_def_property_range(prop, 0, SHRT_MAX); + RNA_def_property_int_default(prop, CURVE_RENDER_RESOLUTION_V_DEFAULT); RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering (zero skips this property)"); @@ -1388,6 +1399,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, CURVE_DIMENSIONS_DEFAULT); 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 +1407,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, CURVE_FILL_MODE_DEFAULT); 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 +1415,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, CURVE_TWIST_MODE_DEFAULT); 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 +1428,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, CURVE_USE_FILL_DEFORM_DEFAULT); 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"); @@ -1427,6 +1442,7 @@ RNA_def_property_boolean_sdna(prop, NULL, "texflag", CU_AUTOSPACE); RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjust active object's texture space automatically when transforming object"); + RNA_def_property_boolean_default(prop, CURVE_USE_AUTO_TEXSPACE_DEFAULT); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Curve_texspace_set"); prop = RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION); @@ -1475,6 +1491,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, CURVE_BEVEL_FACTOR_END_DEFAULT); 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 +1582,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, SPLINE_RESOLUTION_U_DEFAULT); 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_fcurve.c =================================================================== --- source/blender/makesrna/intern/rna_fcurve.c (revision 51352) +++ source/blender/makesrna/intern/rna_fcurve.c (working copy) @@ -36,6 +36,7 @@ #include "DNA_anim_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "MEM_guardedalloc.h" @@ -1106,7 +1107,7 @@ prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "influence"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, FMODIFIER_INFLUENCE_DEFAULT); RNA_def_property_ui_text(prop, "Influence", "Amount of influence F-Curve Modifier will have when not fading in/out"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); @@ -1160,7 +1161,7 @@ prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "idtype"); RNA_def_property_enum_items(prop, id_type_items); - RNA_def_property_enum_default(prop, ID_OB); + RNA_def_property_enum_default(prop, DRIVERTARGET_ID_TYPE_DEFAULT); RNA_def_property_enum_funcs(prop, NULL, "rna_DriverTarget_id_type_set", NULL); RNA_def_property_editable_func(prop, "rna_DriverTarget_id_type_editable"); RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used"); Index: source/blender/makesrna/intern/rna_gpencil.c =================================================================== --- source/blender/makesrna/intern/rna_gpencil.c (revision 51352) +++ source/blender/makesrna/intern/rna_gpencil.c (working copy) @@ -33,6 +33,7 @@ #include "DNA_gpencil_types.h" #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "MEM_guardedalloc.h" @@ -473,6 +474,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, GPENCILLAYER_ALPHA_DEFAULT); RNA_def_property_ui_text(prop, "Opacity", "Layer Opacity"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); @@ -480,6 +482,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, GPENCILLAYER_LINE_WIDTH_DEFAULT); RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels)"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); @@ -607,6 +610,7 @@ prop = RNA_def_property(srna, "draw_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, draw_mode_items); + RNA_def_property_enum_default(prop, GREASEPENCIL_DRAW_MODE_DEFAULT); RNA_def_property_ui_text(prop, "Draw Mode", ""); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); Index: source/blender/makesrna/intern/rna_key.c =================================================================== --- source/blender/makesrna/intern/rna_key.c (revision 51352) +++ source/blender/makesrna/intern/rna_key.c (working copy) @@ -38,6 +38,7 @@ #include "DNA_key_types.h" #include "DNA_lattice_types.h" #include "DNA_mesh_types.h" +#include "DNA_defaults.h" #ifdef RNA_RUNTIME @@ -583,7 +584,7 @@ prop = RNA_def_property(srna, "slider_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "slidermax"); RNA_def_property_range(prop, -10.0f, 10.0f); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, SHAPEKEY_SLIDER_MAX_DEFAULT); RNA_def_property_float_funcs(prop, NULL, "rna_ShapeKey_slider_max_set", "rna_ShapeKey_slider_max_range"); RNA_def_property_ui_text(prop, "Slider Max", "Maximum for slider"); Index: source/blender/makesrna/intern/rna_lamp.c =================================================================== --- source/blender/makesrna/intern/rna_lamp.c (revision 51352) +++ source/blender/makesrna/intern/rna_lamp.c (working copy) @@ -35,6 +35,7 @@ #include "DNA_lamp_types.h" #include "DNA_material_types.h" #include "DNA_texture_types.h" +#include "DNA_defaults.h" #include "BLI_math_base.h" @@ -370,12 +371,14 @@ 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, LAMP_DISTANCE_DEFAULT); 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, LAMP_ENERGY_DEFAULT); RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); @@ -397,11 +400,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_boolean_default(prop, LAMP_USE_SPECULAR_DEFAULT); RNA_def_property_ui_text(prop, "Specular", "Create specular highlights"); 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_boolean_default(prop, LAMP_USE_DIFFUSE_DEFAULT); RNA_def_property_ui_text(prop, "Diffuse", "Do diffuse shading"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); @@ -439,6 +444,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, LAMP_FALLOFF_TYPE_DEFAULT); RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); @@ -455,12 +461,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, LAMP_LINEAR_ATTENUATION_DEFAULT); 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, LAMP_QUADRATIC_ATTENUATION_DEFAULT); RNA_def_property_ui_text(prop, "Quadratic Attenuation", "Quadratic distance attenuation"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); } @@ -536,6 +544,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_items(prop, (spot) ? prop_spot_shadow_items : prop_shadow_items); + RNA_def_property_enum_default(prop, LAMP_SHADOW_METHOD_DEFAULT); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE); @@ -666,12 +675,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, LAMP_SHADOW_ADAPTIVE_THRESHOLD_DEFAULT); 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, LAMP_SHADOW_SOFT_SIZE_DEFAULT); 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 51352) +++ source/blender/makesrna/intern/rna_lattice.c (working copy) @@ -36,6 +36,7 @@ #include "DNA_key_types.h" #include "DNA_lattice_types.h" #include "DNA_meshdata_types.h" +#include "DNA_defaults.h" #ifdef RNA_RUNTIME @@ -267,6 +268,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, LATTICE_POINTS_U_DEFAULT); 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 +277,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, LATTICE_POINTS_V_DEFAULT); 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 +286,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, LATTICE_POINTS_W_DEFAULT); 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 +294,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, LATTICE_INTERPOLATION_TYPE_U_DEFAULT); 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, LATTICE_INTERPOLATION_TYPE_V_DEFAULT); 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, LATTICE_INTERPOLATION_TYPE_W_DEFAULT); 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_mask.c =================================================================== --- source/blender/makesrna/intern/rna_mask.c (revision 51352) +++ source/blender/makesrna/intern/rna_mask.c (working copy) @@ -42,6 +42,7 @@ #include "DNA_mask_types.h" #include "DNA_object_types.h" /* SELECT */ #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "WM_types.h" @@ -395,7 +396,7 @@ prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "id_type"); RNA_def_property_enum_items(prop, mask_id_type_items); - RNA_def_property_enum_default(prop, ID_MC); + RNA_def_property_enum_default(prop, MASKPARENT_ID_TYPE_DEFAULT); RNA_def_property_enum_funcs(prop, NULL, "rna_MaskParent_id_type_set", NULL); //RNA_def_property_editable_func(prop, "rna_MaskParent_id_type_editable"); RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used"); Index: source/blender/makesrna/intern/rna_mesh.c =================================================================== --- source/blender/makesrna/intern/rna_mesh.c (revision 51352) +++ source/blender/makesrna/intern/rna_mesh.c (working copy) @@ -43,6 +43,7 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" +#include "DNA_defaults.h" #include "WM_types.h" @@ -2173,6 +2174,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, MESHSTRINGPROPERTY_AUTO_TEXSPACE_DEFAULT); RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjust active object's texture space automatically when transforming object"); @@ -2824,16 +2826,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, MESH_AUTO_SMOOTH_ANGLE_RAD_DEFAULT); #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, MESH_AUTO_SMOOTH_ANGLE_DEG_DEFAULT); #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, MESH_SHOW_DOUBLE_SIDED_DEFAULT); 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 51352) +++ source/blender/makesrna/intern/rna_meta.c (working copy) @@ -34,6 +34,7 @@ #include "DNA_mesh_types.h" #include "DNA_meta_types.h" +#include "DNA_defaults.h" #ifdef RNA_RUNTIME @@ -297,18 +298,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, METABALL_RESOLUTION_DEFAULT); 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, METABALL_RENDER_RESOLUTION_DEFAULT); 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, METABALL_THRESHOLD_DEFAULT); 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_modifier.c =================================================================== --- source/blender/makesrna/intern/rna_modifier.c (revision 51352) +++ source/blender/makesrna/intern/rna_modifier.c (working copy) @@ -40,6 +40,7 @@ #include "DNA_object_types.h" #include "DNA_object_force.h" #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "MEM_guardedalloc.h" @@ -2900,7 +2901,7 @@ prop = RNA_def_property(srna, "proximity_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, weightvg_proximity_modes_items); - RNA_def_property_enum_default(prop, MOD_WVG_PROXIMITY_GEOMETRY); + RNA_def_property_enum_default(prop, VERTEXWEIGHTPROXIMITYMODIFIER_PROXIMITY_MODE_DEFAULT); RNA_def_property_ui_text(prop, "Proximity Mode", "Which distances to target object to use"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2908,7 +2909,7 @@ RNA_def_property_enum_sdna(prop, NULL, "proximity_flags"); RNA_def_property_enum_items(prop, proximity_geometry_items); RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */ - RNA_def_property_enum_default(prop, MOD_WVG_PROXIMITY_GEOM_FACES); + RNA_def_property_enum_default(prop, VERTEXWEIGHTPROXIMITYMODIFIER_PROXIMITY_GEOMETRY_DEFAULT); RNA_def_property_ui_text(prop, "Proximity Geometry", "Use the shortest computed distance to target object's geometry " "as weight"); Index: source/blender/makesrna/intern/rna_nodetree.c =================================================================== --- source/blender/makesrna/intern/rna_nodetree.c (revision 51352) +++ source/blender/makesrna/intern/rna_nodetree.c (working copy) @@ -42,6 +42,7 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_texture_types.h" +#include "DNA_defaults.h" #include "BKE_animsys.h" #include "BKE_main.h" @@ -1615,28 +1616,28 @@ prop = RNA_def_property(srna, "offset_frequency", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "offset_freq"); - RNA_def_property_int_default(prop, 2); + RNA_def_property_int_default(prop, NODETEXBRICK_OFFSET_FREQUENCY_DEFAULT); RNA_def_property_range(prop, 1, 99); RNA_def_property_ui_text(prop, "Offset Frequency", ""); RNA_def_property_update(prop, 0, "rna_Node_update"); prop = RNA_def_property(srna, "squash_frequency", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "squash_freq"); - RNA_def_property_int_default(prop, 2); + RNA_def_property_int_default(prop, NODETEXBRICK_SQUASH_FREQUENCY_DEFAULT); RNA_def_property_range(prop, 1, 99); RNA_def_property_ui_text(prop, "Squash Frequency", ""); RNA_def_property_update(prop, 0, "rna_Node_update"); prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "offset"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, NODETEXBRICK_OFFSET_DEFAULT); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Offset Amount", ""); RNA_def_property_update(prop, 0, "rna_Node_update"); prop = RNA_def_property(srna, "squash", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "squash"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, NODETEXBRICK_SQUASH_DEFAULT); RNA_def_property_range(prop, 0.0f, 99.0f); RNA_def_property_ui_text(prop, "Squash Amount", ""); RNA_def_property_update(prop, 0, "rna_Node_update"); @@ -3354,7 +3355,7 @@ prop = RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "x"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, CMP_BOXMASK_X_DEFAULT); RNA_def_property_range(prop, -1.0f, 2.0f); RNA_def_property_ui_text(prop, "X", "X position of the middle of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -3362,27 +3363,28 @@ prop = RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "y"); RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, CMP_BOXMASK_Y_DEFAULT); RNA_def_property_range(prop, -1.0f, 2.0f); RNA_def_property_ui_text(prop, "Y", "Y position of the middle of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "width"); - RNA_def_property_float_default(prop, 0.3f); + RNA_def_property_float_default(prop, CMP_BOXMASK_WIDTH_DEFAULT); RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "Width", "Width of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "height"); - RNA_def_property_float_default(prop, 0.2f); + RNA_def_property_float_default(prop, CMP_BOXMASK_HEIGHT_DEFAULT); RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "Height", "Height of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "rotation"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_BOXMASK_ROTATION_DEFAULT); RNA_def_property_range(prop, -1000.0f, 1000.0f); RNA_def_property_ui_text(prop, "Rotation", "Rotation angle of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -3401,35 +3403,35 @@ prop = RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "x"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, CMP_ELLIPSEMASK_X_DEFAULT); RNA_def_property_range(prop, -1.0f, 2.0f); RNA_def_property_ui_text(prop, "X", "X position of the middle of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "y"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, CMP_ELLIPSEMASK_Y_DEFAULT); RNA_def_property_range(prop, -1.0f, 2.0f); RNA_def_property_ui_text(prop, "Y", "Y position of the middle of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "width"); - RNA_def_property_float_default(prop, 0.3f); + RNA_def_property_float_default(prop, CMP_ELLIPSEMASK_WIDTH_DEFAULT); RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "Width", "Width of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "height"); - RNA_def_property_float_default(prop, 0.2f); + RNA_def_property_float_default(prop, CMP_ELLIPSEMASK_HEIGHT_DEFAULT); RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "Height", "Height of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "rotation"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_ELLIPSEMASK_ROTATION_DEFAULT); RNA_def_property_range(prop, -1000.0f, 1000.0f); RNA_def_property_ui_text(prop, "Rotation", "Rotation angle of the box"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -3471,35 +3473,35 @@ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "angle"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_BOKEHIMAGE_ANGLE_DEFAULT); RNA_def_property_range(prop, -720.0f, 720.0f); RNA_def_property_ui_text(prop, "Angle", "Angle of the bokeh"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "flaps", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "flaps"); - RNA_def_property_int_default(prop, 5); + RNA_def_property_int_default(prop, CMP_BOKEHIMAGE_FLAPS_DEFAULT); RNA_def_property_range(prop, 3, 24); RNA_def_property_ui_text(prop, "Flaps", "Number of flaps"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "rounding", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "rounding"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_BOKEHIMAGE_ROUNDING_DEFAULT); RNA_def_property_range(prop, -0.0f, 1.0f); RNA_def_property_ui_text(prop, "Rounding", "Level of rounding of the bokeh"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "catadioptric", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "catadioptric"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_BOKEHIMAGE_CATADIOPTRIC_DEFAULT); RNA_def_property_range(prop, -0.0f, 1.0f); RNA_def_property_ui_text(prop, "Catadioptric", "Level of catadioptric of the bokeh"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "shift", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "lensshift"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_BOKEHIMAGE_SHIFT_DEFAULT); RNA_def_property_range(prop, -1.0f, 1.0f); RNA_def_property_ui_text(prop, "Lens shift", "Shift of the lens components"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -3521,19 +3523,19 @@ PropertyRNA *prop; prop = RNA_def_property(srna, "red", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, CMP_COLORCORRECTION_RED_DEFAULT); RNA_def_property_ui_text(prop, "Red", "Red channel active"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "green", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 2); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, CMP_COLORCORRECTION_GREEN_DEFAULT); RNA_def_property_ui_text(prop, "Green", "Green channel active"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "blue", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 4); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, CMP_COLORCORRECTION_BLUE_DEFAULT); RNA_def_property_ui_text(prop, "Blue", "Blue channel active"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -3541,49 +3543,49 @@ prop = RNA_def_property(srna, "midtones_start", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "startmidtones"); - RNA_def_property_float_default(prop, 0.2f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MIDTONES_START_DEFAULT); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Midtones Start", "Start of midtones"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "midtones_end", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "endmidtones"); - RNA_def_property_float_default(prop, 0.7f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MIDTONES_END_DEFAULT); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Midtones End", "End of midtones"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "master_saturation", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "master.saturation"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MASTER_SATURATION_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Master Saturation", "Master saturation"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "master_contrast", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "master.contrast"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MASTER_CONTRAST_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Master Contrast", "Master contrast"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "master_gamma", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "master.gamma"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MASTER_GAMMA_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Master Gamma", "Master gamma"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "master_gain", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "master.gain"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MASTER_GAIN_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Master Gain", "Master gain"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "master_lift", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "master.lift"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MASTER_LIFT_DEFAULT); RNA_def_property_range(prop, -1, 1); RNA_def_property_ui_text(prop, "Master Lift", "Master lift"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -3591,105 +3593,105 @@ // prop = RNA_def_property(srna, "shadows_saturation", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "shadows.saturation"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_SHADOWS_SATURATION_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Shadows Saturation", "Shadows saturation"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "shadows_contrast", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "shadows.contrast"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_SHADOWS_CONTRAST_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Shadows Contrast", "Shadows contrast"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "shadows_gamma", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "shadows.gamma"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_SHADOWS_GAMMA_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Shadows Gamma", "Shadows gamma"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "shadows_gain", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "shadows.gain"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_SHADOWS_GAIN_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Shadows Gain", "Shadows gain"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "shadows_lift", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "shadows.lift"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_SHADOWS_LIFT_DEFAULT); RNA_def_property_range(prop, -1, 1); RNA_def_property_ui_text(prop, "Shadows Lift", "Shadows lift"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); // prop = RNA_def_property(srna, "midtones_saturation", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "midtones.saturation"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MIDTONES_SATURATION_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Midtones Saturation", "Midtones saturation"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "midtones_contrast", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "midtones.contrast"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MIDTONES_CONTRAST_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Midtones Contrast", "Midtones contrast"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "midtones_gamma", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "midtones.gamma"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MIDTONES_GAMMA_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Midtones Gamma", "Midtones gamma"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "midtones_gain", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "midtones.gain"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MIDTONES_GAIN_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Midtones Gain", "Midtones gain"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "midtones_lift", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "midtones.lift"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_MIDTONES_LIFT_DEFAULT); RNA_def_property_range(prop, -1, 1); RNA_def_property_ui_text(prop, "Midtones Lift", "Midtones lift"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); // prop = RNA_def_property(srna, "highlights_saturation", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "highlights.saturation"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_HIGHLIGHTS_SATURATION_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Highlights Saturation", "Highlights saturation"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "highlights_contrast", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "highlights.contrast"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_HIGHLIGHTS_CONTRAST_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Highlights Contrast", "Highlights contrast"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "highlights_gamma", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "highlights.gamma"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_HIGHLIGHTS_GAMMA_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Highlights Gamma", "Highlights gamma"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "highlights_gain", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "highlights.gain"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_HIGHLIGHTS_GAIN_DEFAULT); RNA_def_property_range(prop, 0, 4); RNA_def_property_ui_text(prop, "Highlights Gain", "Highlights gain"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "highlights_lift", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "highlights.lift"); - RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_float_default(prop, CMP_COLORCORRECTION_HIGHLIGHTS_LIFT_DEFAULT); RNA_def_property_range(prop, -1, 1); RNA_def_property_ui_text(prop, "Highlights Lift", "Highlights lift"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -3714,14 +3716,14 @@ prop = RNA_def_property(srna, "center_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "custom3"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, CMP_VIEWER_CENTER_X_DEFAULT); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "X", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "center_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "custom4"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, CMP_VIEWER_CENTER_Y_DEFAULT); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Y", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -4172,7 +4174,7 @@ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, node_socket_type_items); - RNA_def_property_enum_default(prop, 0); + RNA_def_property_enum_default(prop, NODESOCKET_TYPE_DEFAULT); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Type", "Node Socket type"); Index: source/blender/makesrna/intern/rna_object.c =================================================================== --- source/blender/makesrna/intern/rna_object.c (revision 51352) +++ source/blender/makesrna/intern/rna_object.c (working copy) @@ -45,6 +45,7 @@ #include "DNA_property_types.h" #include "DNA_scene_types.h" #include "DNA_meta_types.h" +#include "DNA_defaults.h" #include "BLI_utildefines.h" @@ -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, OBJECT_TRACK_AXIS_DEFAULT); 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, OBJECT_UP_AXIS_DEFAULT); RNA_def_property_ui_text(prop, "Up Axis", "Axis that points in the upward direction (applies to DupliFrame when " "parent 'Follow' is enabled)"); @@ -2116,6 +2119,7 @@ RNA_def_property_enum_sdna(prop, NULL, "rotmode"); 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_enum_default(prop, OBJECT_ROTATION_MODE_DEFAULT); RNA_def_property_ui_text(prop, "Rotation Mode", ""); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); @@ -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, OBJECT_EMPTY_DRAW_SIZE_DEFAULT); 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); @@ -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, OBJECT_USE_DUPLI_FRAMES_SPEED_DEFAULT); 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, OBJECT_DUPLI_FRAMES_START_DEFAULT); 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, OBJECT_DUPLI_FRAMES_END_DEFAULT); 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, OBJECT_DUPLI_FRAMES_ON_DEFAULT); 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, OBJECT_DUPLI_FRAMES_OFF_DEFAULT); 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, OBJECT_DRAW_TYPE_DEFAULT); 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); @@ -2452,6 +2463,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_boolean_default(prop, OBJECT_SHOW_NAME_DEFAULT); RNA_def_property_ui_text(prop, "Draw Name", "Display the object's name"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); Index: source/blender/makesrna/intern/rna_particle.c =================================================================== --- source/blender/makesrna/intern/rna_particle.c (revision 51352) +++ source/blender/makesrna/intern/rna_particle.c (working copy) @@ -47,6 +47,7 @@ #include "DNA_scene_types.h" #include "DNA_boid_types.h" #include "DNA_texture_types.h" +#include "DNA_defaults.h" #include "WM_types.h" #include "WM_api.h" @@ -2132,7 +2133,7 @@ prop = RNA_def_property(srna, "courant_target", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.01, 10); - RNA_def_property_float_default(prop, 0.2); + RNA_def_property_float_default(prop, PARTICLESETTINGS_COURANT_TARGET_DEFAULT); RNA_def_property_ui_text(prop, "Adaptive Subframe Threshold", "The relative distance a particle can move before requiring more subframes " "(target Courant number); 0.1-0.3 is the recommended range"); Index: source/blender/makesrna/intern/rna_scene.c =================================================================== --- source/blender/makesrna/intern/rna_scene.c (revision 51352) +++ source/blender/makesrna/intern/rna_scene.c (working copy) @@ -38,6 +38,7 @@ #include "DNA_scene_types.h" #include "DNA_userdef_types.h" #include "DNA_world_types.h" +#include "DNA_defaults.h" #include "BLI_math.h" @@ -1818,14 +1819,14 @@ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "alpha"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, UNIFIEDPAINTSETTINGS_STRENGTH_DEFAULT); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied"); prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "weight"); - RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_float_default(prop, UNIFIEDPAINTSETTINGS_WEIGHT_DEFAULT); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); RNA_def_property_ui_text(prop, "Weight", "Weight to assign in vertex groups"); @@ -1882,11 +1883,13 @@ prop = RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converting between blender units and dimensions"); RNA_def_property_range(prop, 0.00001, 100000.0); + RNA_def_property_float_default(prop, UNITSETTINGS_SCALE_LENGTH_DEFAULT); RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3); RNA_def_property_update(prop, NC_WINDOW, NULL); prop = RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_UNIT_OPT_SPLIT); + RNA_def_property_boolean_default(prop, UNITSETTINGS_USE_SEPARATE_DEFAULT); RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs (e.g. 1m 0cm)"); RNA_def_property_update(prop, NC_WINDOW, NULL); } @@ -1959,12 +1962,14 @@ prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_ZMASK_DEFAULT); RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK); + RNA_def_property_boolean_default(prop, RENDERLAYER_INVERT_ZMASK_DEFAULT); RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); @@ -1972,42 +1977,49 @@ prop = RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_ALL_Z_DEFAULT); RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_solid", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_SOLID_DEFAULT); RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_HALO_DEFAULT); RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid)"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_ztransp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_ZTRANSP_DEFAULT); RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (on top of Solid and Halos)"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_SKY_DEFAULT); RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_EDGE_ENHANCE_DEFAULT); RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces)"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_STRAND_DEFAULT); RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); @@ -2015,114 +2027,133 @@ /* passes */ prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_COMBINED_DEFAULT); RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_z", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_Z_DEFAULT); RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_vector", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_VECTOR_DEFAULT); RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_normal", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_NORMAL_DEFAULT); RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_uv", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_UV_DEFAULT); RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_mist", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_MIST_DEFAULT); RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0)"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_object_index", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_OBJECT_INDEX_DEFAULT); RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXMA); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_MATERIAL_INDEX_DEFAULT); RNA_def_property_ui_text(prop, "Material Index", "Deliver material index pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_COLOR_DEFAULT); RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_DIFFUSE_DEFAULT); RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_specular", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_SPECULAR_DEFAULT); RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_shadow", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_SHADOW_DEFAULT); RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_AMBIENT_OCCLUSION_DEFAULT); RNA_def_property_ui_text(prop, "AO", "Deliver AO pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_reflection", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_REFLECTION_DEFAULT); RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflection pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_refraction", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_REFRACTION_DEFAULT); RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refraction pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_EMIT_DEFAULT); RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_environment", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_ENVIRONMENT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_ENVIRONMENT_DEFAULT); RNA_def_property_ui_text(prop, "Environment", "Deliver environment lighting pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_indirect", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDIRECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_INDIRECT_DEFAULT); RNA_def_property_ui_text(prop, "Indirect", "Deliver indirect lighting pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "exclude_specular", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC); + RNA_def_property_boolean_default(prop, RENDERLAYER_EXCLUDE_SPECULAR_DEFAULT); RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); @@ -2130,6 +2161,7 @@ prop = RNA_def_property(srna, "exclude_shadow", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW); + RNA_def_property_boolean_default(prop, RENDERLAYER_EXCLUDE_SHADOW_DEFAULT); RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); @@ -2137,6 +2169,7 @@ prop = RNA_def_property(srna, "exclude_ambient_occlusion", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO); + RNA_def_property_boolean_default(prop, RENDERLAYER_EXCLUDE_AMBIENT_OCCLUSION_DEFAULT); RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); @@ -2144,6 +2177,7 @@ prop = RNA_def_property(srna, "exclude_reflection", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_EXCLUDE_REFLECTION_DEFAULT); RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced reflection pass from combined"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); @@ -2151,6 +2185,7 @@ prop = RNA_def_property(srna, "exclude_refraction", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT); + RNA_def_property_boolean_default(prop, RENDERLAYER_EXCLUDE_REFRACTION_DEFAULT); RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced refraction pass from combined"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); @@ -2158,6 +2193,7 @@ prop = RNA_def_property(srna, "exclude_emit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_EMIT); + RNA_def_property_boolean_default(prop, RENDERLAYER_EXCLUDE_EMIT_DEFAULT); RNA_def_property_ui_text(prop, "Emit Exclude", "Exclude emission pass from combined"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); @@ -2165,6 +2201,7 @@ prop = RNA_def_property(srna, "exclude_environment", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_ENVIRONMENT); + RNA_def_property_boolean_default(prop, RENDERLAYER_EXCLUDE_ENVIRONMENT_DEFAULT); RNA_def_property_ui_text(prop, "Environment Exclude", "Exclude environment pass from combined"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); @@ -2172,6 +2209,7 @@ prop = RNA_def_property(srna, "exclude_indirect", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_INDIRECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_EXCLUDE_INDIRECT_DEFAULT); RNA_def_property_ui_text(prop, "Indirect Exclude", "Exclude indirect pass from combined"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); @@ -2179,54 +2217,63 @@ prop = RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_DIRECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_DIFFUSE_DIRECT_DEFAULT); RNA_def_property_ui_text(prop, "Diffuse Direct", "Deliver diffuse direct pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_diffuse_indirect", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_INDIRECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_DIFFUSE_INDIRECT_DEFAULT); RNA_def_property_ui_text(prop, "Diffuse Indirect", "Deliver diffuse indirect pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_diffuse_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_COLOR); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_DIFFUSE_COLOR_DEFAULT); RNA_def_property_ui_text(prop, "Diffuse Color", "Deliver diffuse color pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_glossy_direct", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_DIRECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_GLOSSY_DIRECT_DEFAULT); RNA_def_property_ui_text(prop, "Glossy Direct", "Deliver glossy direct pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_glossy_indirect", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_INDIRECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_GLOSSY_INDIRECT_DEFAULT); RNA_def_property_ui_text(prop, "Glossy Indirect", "Deliver glossy indirect pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_glossy_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_COLOR); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_GLOSSY_COLOR_DEFAULT); RNA_def_property_ui_text(prop, "Glossy Color", "Deliver glossy color pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_transmission_direct", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_DIRECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_TRANSMISSION_DIRECT_DEFAULT); RNA_def_property_ui_text(prop, "Transmission Direct", "Deliver transmission direct pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_transmission_indirect", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_INDIRECT); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_TRANSMISSION_INDIRECT_DEFAULT); RNA_def_property_ui_text(prop, "Transmission Indirect", "Deliver transmission indirect pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_pass_transmission_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_COLOR); + RNA_def_property_boolean_default(prop, RENDERLAYER_USE_PASS_TRANSMISSION_COLOR_DEFAULT); RNA_def_property_ui_text(prop, "Transmission Color", "Deliver transmission color pass"); if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); @@ -2404,12 +2451,14 @@ prop = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "xplay"); RNA_def_property_range(prop, 4, 10000); + RNA_def_property_int_default(prop, SCENEGAMEDATA_RESOLUTION_X_DEFAULT); RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the screen"); RNA_def_property_update(prop, NC_SCENE, NULL); prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "yplay"); RNA_def_property_range(prop, 4, 10000); + RNA_def_property_int_default(prop, SCENEGAMEDATA_RESOLUTION_Y_DEFAULT); RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen"); RNA_def_property_update(prop, NC_SCENE, NULL); @@ -2829,6 +2878,7 @@ prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "imtype"); RNA_def_property_enum_items(prop, image_type_items); + RNA_def_property_enum_default(prop, IMAGEFORMATSETTINGS_FILE_FORMAT_DEFAULT); RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_format_set", "rna_ImageFormatSettings_file_format_itemf"); RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as"); @@ -2837,6 +2887,7 @@ prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes"); RNA_def_property_enum_items(prop, image_color_mode_items); + RNA_def_property_enum_default(prop, IMAGEFORMATSETTINGS_COLOR_MODE_DEFAULT); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_mode_itemf"); RNA_def_property_ui_text(prop, "Color Mode", "Choose BW for saving grayscale images, RGB for saving red, green and blue channels, " @@ -2854,6 +2905,7 @@ prop = RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE); RNA_def_property_int_sdna(prop, NULL, "quality"); RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */ + RNA_def_property_int_default(prop, IMAGEFORMATSETTINGS_QUALITY_DEFAULT); RNA_def_property_ui_text(prop, "Quality", "Quality for image formats that support lossy compression"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -2861,6 +2913,7 @@ prop = RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE); RNA_def_property_int_sdna(prop, NULL, "compress"); RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */ + RNA_def_property_int_default(prop, IMAGEFORMATSETTINGS_COMPRESSION_DEFAULT); RNA_def_property_ui_text(prop, "Compression", "Compression level for formats that support lossless compression"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3105,6 +3158,7 @@ RNA_def_property_float_sdna(prop, NULL, "audio_volume"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, FFMPEGSETTINGS_AUDIO_VOLUME_DEFAULT); RNA_def_property_ui_text(prop, "Volume", "Audio volume"); RNA_def_property_translation_context(prop, "Audio"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3115,11 +3169,13 @@ RNA_def_property_int_sdna(prop, NULL, "audio_mixrate"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 8000, 192000); + RNA_def_property_int_default(prop, FFMPEGSETTINGS_AUDIO_MIXRATE_DEFAULT); RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "audio_channels"); + RNA_def_property_enum_default(prop, FFMPEGSETTINGS_AUDIO_CHANNELS_DEFAULT); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, audio_channel_items); RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count"); @@ -3372,18 +3428,21 @@ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 1, SHRT_MAX); RNA_def_property_ui_range(prop, 1, 100, 10, 1); + RNA_def_property_int_default(prop, RENDERSETTINGS_RESOLUTION_PERCENTAGE_DEFAULT); RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "xparts"); RNA_def_property_range(prop, 1, 512); + RNA_def_property_int_default(prop, RENDERSETTINGS_PARTS_X_DEFAULT); RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "yparts"); RNA_def_property_range(prop, 1, 512); + RNA_def_property_int_default(prop, RENDERSETTINGS_PARTS_Y_DEFAULT); RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3436,6 +3495,7 @@ RNA_def_property_int_sdna(prop, NULL, "framapto"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 1, 900); + RNA_def_property_int_default(prop, RENDERSETTINGS_FRAME_MAP_OLD_DEFAULT); RNA_def_property_ui_text(prop, "Frame Map Old", "Old mapping value in frames"); RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_update"); @@ -3443,6 +3503,7 @@ RNA_def_property_int_sdna(prop, NULL, "images"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 1, 900); + RNA_def_property_int_default(prop, RENDERSETTINGS_FRAME_MAP_NEW_DEFAULT); RNA_def_property_ui_text(prop, "Frame Map New", "How many frames the Map Old will last"); RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_update"); @@ -3457,12 +3518,14 @@ prop = RNA_def_property(srna, "pixel_filter_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "filtertype"); RNA_def_property_enum_items(prop, pixel_filter_items); + RNA_def_property_enum_default(prop, RENDERSETTINGS_PIXEL_FILTER_TYPE_DEFAULT); RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "gauss"); RNA_def_property_range(prop, 0.5f, 1.5f); + RNA_def_property_float_default(prop, RENDERSETTINGS_FILTER_SIZE_DEFAULT); RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3489,10 +3552,12 @@ RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES); RNA_def_property_ui_text(prop, "Use Instances", "Instance support leads to effective memory reduction when using duplicates"); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_INSTANCES_DEFAULT); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_LOCAL_COORDS_DEFAULT); RNA_def_property_ui_text(prop, "Use Local Coords", "Vertex coordinates are stored locally on each primitive " "(increases memory usage, but may have impact on speed)"); @@ -3507,11 +3572,13 @@ prop = RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "osa"); RNA_def_property_enum_items(prop, fixed_oversample_items); + RNA_def_property_enum_default(prop, RENDERSETTINGS_ANTIALIASING_SAMPLES_DEFAULT); RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_FIELDS_DEFAULT); RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3525,17 +3592,20 @@ prop = RNA_def_property(srna, "use_fields_still", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_FIELDS_STILL_DEFAULT); RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); /* rendering features */ prop = RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_SHADOWS_DEFAULT); RNA_def_property_ui_text(prop, "Shadows", "Calculate shadows while rendering"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_envmaps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_ENVMAPS_DEFAULT); RNA_def_property_ui_text(prop, "Environment Maps", "Calculate environment maps while rendering"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3548,28 +3618,33 @@ prop = RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_SSS_DEFAULT); RNA_def_property_ui_text(prop, "Subsurface Scattering", "Calculate sub-surface scattering in materials rendering"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_RAYTRACE_DEFAULT); RNA_def_property_ui_text(prop, "Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_TEXTURES_DEFAULT); RNA_def_property_ui_text(prop, "Textures", "Use textures to affect material properties"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_EDGE_ENHANCE_DEFAULT); RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "edgeint"); RNA_def_property_range(prop, 0, 255); + RNA_def_property_int_default(prop, RENDERSETTINGS_EDGE_THRESHOLD_DEFAULT); RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3605,6 +3680,7 @@ prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "mblur_samples"); RNA_def_property_range(prop, 1, 32); + RNA_def_property_int_default(prop, RENDERSETTINGS_MOTION_BLUR_SAMPLES_DEFAULT); RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene samples to take with motion blur"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); @@ -3613,6 +3689,7 @@ RNA_def_property_float_sdna(prop, NULL, "blurfac"); RNA_def_property_range(prop, 0.01f, 10.0f); RNA_def_property_ui_range(prop, 0.01, 2.0f, 1, 0); + RNA_def_property_float_default(prop, RENDERSETTINGS_MOTION_BLUR_SHUTTER_DEFAULT); RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between shutter open and close"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); @@ -3621,6 +3698,7 @@ prop = RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_BORDER_DEFAULT); RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size " "(note that this disables save_buffers and full_sample)"); @@ -3652,23 +3730,27 @@ prop = RNA_def_property(srna, "use_crop_to_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_CROP_TO_BORDER_DEFAULT); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_PLACEHOLDER_DEFAULT); RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch')"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_OVERWRITE_DEFAULT); RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_COMPOSITING_DEFAULT); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, " @@ -3677,6 +3759,7 @@ prop = RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_SEQUENCER_DEFAULT); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence " @@ -3692,6 +3775,7 @@ prop = RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_FILE_EXTENSION_DEFAULT); RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3717,18 +3801,21 @@ prop = RNA_def_property(srna, "use_free_image_textures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_FREE_IMAGE_TEXTURES_DEFAULT); RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image textures from memory after render, to save memory before compositing"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_free_unused_nodes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_COMP_FREE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_FREE_UNUSED_NODES_DEFAULT); RNA_def_property_ui_text(prop, "Free Unused Nodes", "Free Nodes that are not used while compositing, to save memory"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_SAVE_BUFFERS_DEFAULT); RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_save_buffers_get", NULL); RNA_def_property_ui_text(prop, "Save Buffers", "Save tiles for all RenderLayers and SceneNodes to files in the temp directory " @@ -3737,6 +3824,7 @@ prop = RNA_def_property(srna, "use_full_sample", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_FULL_SAMPLE_DEFAULT); RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_full_sample_get", NULL); RNA_def_property_ui_text(prop, "Full Sample", "Save for every anti-aliasing sample the entire RenderLayer results " @@ -3746,6 +3834,7 @@ prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode"); RNA_def_property_enum_items(prop, display_mode_items); + RNA_def_property_enum_default(prop, RENDERSETTINGS_DISPLAY_MODE_DEFAULT); RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3783,6 +3872,7 @@ prop = RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_BAKE_SELECTED_TO_ACTIVE_DEFAULT); RNA_def_property_ui_text(prop, "Selected to Active", "Bake shading on the surface of selected objects to the active object"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3796,6 +3886,7 @@ prop = RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_BAKE_CLEAR_DEFAULT); RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3807,6 +3898,7 @@ prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "bake_filter"); RNA_def_property_range(prop, 0, 64); + RNA_def_property_int_default(prop, RENDERSETTINGS_BAKE_MARGIN_DEFAULT); RNA_def_property_ui_text(prop, "Margin", "Amount of pixels to extend the baked result with, as post process filter"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3839,58 +3931,69 @@ prop = RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_TIME_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Time", "Include the rendered frame timecode as HH:MM:SS.FF in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_date", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_DATE_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_frame", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_FRAME_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_camera", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_CAMERA_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_lens", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERALENS); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_LENS_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Lens", "Include the active camera's lens in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_scene", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_SCENE_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_note", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_NOTE_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_marker", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_MARKER_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_filename", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_FILENAME_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Filename", "Include the .blend filename in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_sequencer_strip", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_SEQUENCER_STRIP_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_render_time", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_RENDERTIME); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_STAMP_RENDER_TIME_DEFAULT); RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render time in image metadata"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3907,6 +4010,7 @@ prop = RNA_def_property(srna, "stamp_font_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "stamp_font_id"); RNA_def_property_range(prop, 8, 64); + RNA_def_property_int_default(prop, RENDERSETTINGS_STAMP_FONT_SIZE_DEFAULT); RNA_def_property_ui_text(prop, "Font Size", "Size of the font used when rendering stamp text"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); @@ -3992,27 +4096,32 @@ prop = RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf"); RNA_def_property_ui_range(prop, 0, 6, 1, 0); + RNA_def_property_int_default(prop, RENDERSETTINGS_SIMPLIFY_SUBDIVISION_DEFAULT); RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level"); RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); prop = RNA_def_property(srna, "simplify_child_particles", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "simplify_particles"); + RNA_def_property_float_default(prop, RENDERSETTINGS_SIMPLIFY_CHILD_PARTICLES_DEFAULT); RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage"); RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); prop = RNA_def_property(srna, "simplify_shadow_samples", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "simplify_shadowsamples"); RNA_def_property_ui_range(prop, 1, 16, 1, 0); + RNA_def_property_int_default(prop, RENDERSETTINGS_SIMPLIFY_SHADOW_SAMPLES_DEFAULT); RNA_def_property_ui_text(prop, "Simplify Shadow Samples", "Global maximum shadow samples"); RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); prop = RNA_def_property(srna, "simplify_ao_sss", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "simplify_aosss"); + RNA_def_property_float_default(prop, RENDERSETTINGS_SIMPLIFY_AO_SSS_DEFAULT); RNA_def_property_ui_text(prop, "Simplify AO and SSS", "Global approximate AO and SSS quality factor"); RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); prop = RNA_def_property(srna, "use_simplify_triangulate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", R_SIMPLE_NO_TRIANGULATE); + RNA_def_property_boolean_default(prop, RENDERSETTINGS_USE_SIMPLIFY_TRIANGULATE_DEFAULT); RNA_def_property_ui_text(prop, "Skip Quad to Triangles", "Disable non-planar quads being triangulated"); /* Scene API */ @@ -4214,6 +4323,8 @@ FunctionRNA *func; PropertyRNA *parm; + static float default_gravity[3] = {SCENE_GRAVITY_X_DEFAULT, SCENE_GRAVITY_Y_DEFAULT, SCENE_GRAVITY_Z_DEFAULT}; + static EnumPropertyItem audio_distance_model_items[] = { {0, "NONE", 0, "None", "No distance attenuation"}, {1, "INVERSE", 0, "Inverse", "Inverse distance model"}, @@ -4317,6 +4428,7 @@ RNA_def_property_int_sdna(prop, NULL, "r.sfra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL); RNA_def_property_range(prop, MINFRAME, MAXFRAME); + RNA_def_property_int_default(prop, SCENE_FRAME_START_DEFAULT); RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playback/rendering range"); RNA_def_property_update(prop, NC_SCENE | ND_FRAME_RANGE, NULL); @@ -4325,6 +4437,7 @@ RNA_def_property_int_sdna(prop, NULL, "r.efra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL); RNA_def_property_range(prop, MINFRAME, MAXFRAME); + RNA_def_property_int_default(prop, SCENE_FRAME_END_DEFAULT); RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback/rendering range"); RNA_def_property_update(prop, NC_SCENE | ND_FRAME_RANGE, NULL); @@ -4333,6 +4446,7 @@ RNA_def_property_int_sdna(prop, NULL, "r.frame_step"); RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_range(prop, 1, 100, 1, 0); + RNA_def_property_int_default(prop, SCENE_FRAME_STEP_DEFAULT); RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame"); RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); @@ -4454,6 +4568,7 @@ RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -200.0f, 200.0f); + RNA_def_property_float_array_default(prop, default_gravity); RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in a given direction"); RNA_def_property_update(prop, 0, "rna_Physics_update"); @@ -4497,6 +4612,7 @@ RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.01f, FLT_MAX); + RNA_def_property_float_default(prop, SCENE_AUDIO_DOPPLER_SPEED_DEFAULT); RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for Doppler effect calculation"); RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update"); @@ -4504,6 +4620,7 @@ RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_float_default(prop, SCENE_AUDIO_DOPPLER_FACTOR_DEFAULT); RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for Doppler effect calculation"); RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update"); @@ -4511,12 +4628,14 @@ RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, audio_distance_model_items); + RNA_def_property_enum_default(prop, SCENE_AUDIO_DISTANCE_MODEL_DEFAULT); RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation"); RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update"); prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "audio.volume"); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, SCENE_AUDIO_VOLUME_DEFAULT); RNA_def_property_ui_text(prop, "Volume", "Audio volume"); RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_AUDIO); RNA_def_property_update(prop, NC_SCENE, NULL); Index: source/blender/makesrna/intern/rna_sculpt_paint.c =================================================================== --- source/blender/makesrna/intern/rna_sculpt_paint.c (revision 51352) +++ source/blender/makesrna/intern/rna_sculpt_paint.c (working copy) @@ -34,6 +34,7 @@ #include "DNA_ID.h" #include "DNA_scene_types.h" #include "DNA_brush_types.h" +#include "DNA_defaults.h" #include "BKE_paint.h" @@ -251,7 +252,7 @@ prop = RNA_def_property(srna, "radial_symmetry", PROP_INT, PROP_XYZ); RNA_def_property_int_sdna(prop, NULL, "radial_symm"); - RNA_def_property_int_default(prop, 1); + RNA_def_property_int_default(prop, SCULPT_RADIAL_SYMMETRY_DEFAULT); RNA_def_property_range(prop, 1, 64); RNA_def_property_ui_range(prop, 0, 32, 1, 1); RNA_def_property_ui_text(prop, "Radial Symmetry Count X Axis", Index: source/blender/makesrna/intern/rna_sequencer.c =================================================================== --- source/blender/makesrna/intern/rna_sequencer.c (revision 51352) +++ source/blender/makesrna/intern/rna_sequencer.c (working copy) @@ -39,6 +39,7 @@ #include "DNA_scene_types.h" #include "DNA_sequence_types.h" #include "DNA_movieclip_types.h" +#include "DNA_defaults.h" #include "BKE_animsys.h" #include "BKE_global.h" @@ -1168,19 +1169,19 @@ prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR); RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)"); RNA_def_property_ui_range(prop, 0, 2, 0.1, 3); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, SEQUENCECOLORBALANCEDATA_LIFT_DEFAULT); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update"); prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR); RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)"); RNA_def_property_ui_range(prop, 0, 2, 0.1, 3); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, SEQUENCECOLORBALANCEDATA_GAMMA_DEFAULT); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update"); prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR); RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)"); RNA_def_property_ui_range(prop, 0, 2, 0.1, 3); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, SEQUENCECOLORBALANCEDATA_GAIN_DEFAULT); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update"); prop = RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE); @@ -1571,7 +1572,7 @@ prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "mul"); RNA_def_property_range(prop, 0.0f, 20.0f); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, SEQUENCEEDITOR_COLOR_MULTIPLY_DEFAULT); RNA_def_property_ui_text(prop, "Multiply Colors", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); @@ -1579,7 +1580,7 @@ RNA_def_property_float_sdna(prop, NULL, "sat"); RNA_def_property_range(prop, 0.0f, 20.0f); RNA_def_property_ui_range(prop, 0.0f, 2.0f, 3, 3); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, SEQUENCEEDITOR_COLOR_SATURATION_DEFAULT); RNA_def_property_ui_text(prop, "Saturation", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); @@ -2242,7 +2243,7 @@ prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "color_multiply"); RNA_def_property_range(prop, 0.0f, 20.0f); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, COLORBALANCEMODIFIER_COLOR_MULTIPLY_DEFAULT); RNA_def_property_ui_text(prop, "Multiply Colors", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); } Index: source/blender/makesrna/intern/rna_space.c =================================================================== --- source/blender/makesrna/intern/rna_space.c (revision 51352) +++ source/blender/makesrna/intern/rna_space.c (working copy) @@ -47,6 +47,7 @@ #include "DNA_sequence_types.h" #include "DNA_mask_types.h" #include "DNA_view3d_types.h" +#include "DNA_defaults.h" #include "WM_api.h" #include "WM_types.h" @@ -1535,19 +1536,20 @@ 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, SPACEVIEW3D_LENS_DEFAULT); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "near"); RNA_def_property_range(prop, 0.001f, FLT_MAX); - RNA_def_property_float_default(prop, 0.1f); + RNA_def_property_float_default(prop, SPACEVIEW3D_CLIP_START_DEFAULT); RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance (perspective view only)"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "far"); RNA_def_property_range(prop, 1.0f, FLT_MAX); - RNA_def_property_float_default(prop, 1000.0f); + RNA_def_property_float_default(prop, SPACEVIEW3D_CLIP_END_DEFAULT); RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); @@ -1555,21 +1557,21 @@ RNA_def_property_float_sdna(prop, NULL, "grid"); RNA_def_property_ui_text(prop, "Grid Scale", "Distance between 3D View grid lines"); RNA_def_property_range(prop, 0.0f, FLT_MAX); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, SPACEVIEW3D_GRID_SCALE_DEFAULT); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gridlines"); RNA_def_property_ui_text(prop, "Grid Lines", "Number of grid lines to display in perspective view"); RNA_def_property_range(prop, 0, 1024); - RNA_def_property_int_default(prop, 16); + RNA_def_property_int_default(prop, SPACEVIEW3D_GRID_LINES_DEFAULT); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gridsubdiv"); RNA_def_property_ui_text(prop, "Grid Subdivisions", "Number of subdivisions between grid lines"); RNA_def_property_range(prop, 1, 1024); - RNA_def_property_int_default(prop, 10); + RNA_def_property_int_default(prop, SPACEVIEW3D_GRID_SUBDIVISIONS_DEFAULT); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE); @@ -1742,6 +1744,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, SPACEVIEW3D_TRACKS_DRAW_SIZE_DEFAULT); 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); @@ -2986,6 +2989,7 @@ RNA_def_property_float_default(prop, 1.0f); RNA_def_property_range(prop, 0.01f, FLT_MAX); RNA_def_property_ui_range(prop, 0.01, 100, 1, 2); + RNA_def_property_float_default(prop, SPACENODEEDITOR_BACKDROP_ZOOM_DEFAULT); RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); Index: source/blender/makesrna/intern/rna_speaker.c =================================================================== --- source/blender/makesrna/intern/rna_speaker.c (revision 51352) +++ source/blender/makesrna/intern/rna_speaker.c (working copy) @@ -34,6 +34,7 @@ #include "DNA_speaker_types.h" #include "DNA_sound_types.h" +#include "DNA_defaults.h" #include "BLF_translation.h" @@ -84,6 +85,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, SPEAKER_VOLUME_MAX_DEFAULT); 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 +94,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, SPEAKER_VOLUME_MIN_DEFAULT); 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 +103,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, SPEAKER_DISTANCE_MAX_DEFAULT); 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 +113,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, SPEAKER_DISTANCE_REFERENCE_DEFAULT); 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 +122,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, SPEAKER_ATTENUATION_DEFAULT); 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 +131,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, SPEAKER_CONE_ANGLE_OUTER_DEFAULT); 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 +142,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, SPEAKER_CONE_ANGLE_INNER_DEFAULT); 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 +152,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, SPEAKER_CONE_VOLUME_OUTER_DEFAULT); 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 +160,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, SPEAKER_VOLUME_DEFAULT); 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 +169,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, SPEAKER_PITCH_DEFAULT); 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); */ Index: source/blender/makesrna/intern/rna_tracking.c =================================================================== --- source/blender/makesrna/intern/rna_tracking.c (revision 51352) +++ source/blender/makesrna/intern/rna_tracking.c (working copy) @@ -42,6 +42,7 @@ #include "DNA_movieclip_types.h" #include "DNA_object_types.h" /* SELECT */ #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "WM_types.h" @@ -580,7 +581,7 @@ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_float_sdna(prop, NULL, "dist"); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, MOVIETRACKINGSETTINGS_DISTANCE_DEFAULT); RNA_def_property_ui_text(prop, "Distance", "Distance between two bundles used for scene scaling"); /* frames count */ @@ -718,7 +719,7 @@ RNA_def_property_float_sdna(prop, NULL, "object_distance"); RNA_def_property_ui_text(prop, "Distance", "Distance between two bundles used for object scaling"); RNA_def_property_range(prop, 0.001, 10000); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, MOVIETRACKINGSETTINGS_OBJECT_DISTANCE_DEFAULT); RNA_def_property_ui_range(prop, 0.001, 10000.0, 1, 3); } @@ -806,7 +807,7 @@ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.1f, 5000.0f); RNA_def_property_ui_range(prop, 0.1f, 5000.0f, 1, 2); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, MOVIETRACKINGCAMERA_PIXEL_ASPECT_DEFAULT); RNA_def_property_ui_text(prop, "Pixel Aspect Ratio", "Pixel aspect ratio"); RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_tracking_flushUpdate"); } @@ -1378,7 +1379,7 @@ RNA_def_property_float_sdna(prop, NULL, "scale"); RNA_def_property_range(prop, 0.0001f, 10000.0f); RNA_def_property_ui_range(prop, 0.0001f, 10000.0, 1, 4); - RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_float_default(prop, MOVIETRACKINGOBJECT_SCALE_DEFAULT); RNA_def_property_ui_text(prop, "Scale", "Scale of object solution in camera space"); RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, "rna_trackingObject_flushUpdate"); Index: source/blender/makesrna/intern/rna_userdef.c =================================================================== --- source/blender/makesrna/intern/rna_userdef.c (revision 51352) +++ source/blender/makesrna/intern/rna_userdef.c (working copy) @@ -38,6 +38,7 @@ #include "DNA_brush_types.h" #include "DNA_view3d_types.h" #include "DNA_scene_types.h" +#include "DNA_defaults.h" #include "WM_api.h" #include "WM_types.h" @@ -1610,7 +1611,7 @@ prop = RNA_def_property(srna, "noodle_curving", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "noodle_curving"); - RNA_def_property_int_default(prop, 5); + RNA_def_property_int_default(prop, THEMENODEEDITOR_NOODLE_CURVING_DEFAULT); RNA_def_property_range(prop, 0, 10); RNA_def_property_ui_text(prop, "Noodle curving", "Curving of the noodle"); RNA_def_property_update(prop, 0, "rna_userdef_update"); @@ -2614,21 +2615,21 @@ prop = RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tw_size"); RNA_def_property_range(prop, 2, 40); - RNA_def_property_int_default(prop, 15); + RNA_def_property_int_default(prop, USERPREFERENCESVIEW_MANIPULATOR_SIZE_DEFAULT); RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units"); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop = RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tw_handlesize"); RNA_def_property_range(prop, 2, 40); - RNA_def_property_int_default(prop, 25); + RNA_def_property_int_default(prop, USERPREFERENCESVIEW_MANIPULATOR_HANDLE_SIZE_DEFAULT); RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius"); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop = RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tw_hotspot"); RNA_def_property_range(prop, 4, 40); - RNA_def_property_int_default(prop, 14); + RNA_def_property_int_default(prop, USERPREFERENCESVIEW_MANIPULATOR_HOTSPOT_DEFAULT); RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Pixel distance around the handles to accept mouse clicks"); prop = RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE); @@ -3189,7 +3190,7 @@ prop = RNA_def_property(srna, "anisotropic_filter", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "anisotropic_filter"); RNA_def_property_enum_items(prop, anisotropic_items); - RNA_def_property_enum_default(prop, 1); + RNA_def_property_enum_default(prop, USERPREFERENCESSYSTEM_ANISOTROPIC_FILTER_DEFAULT); RNA_def_property_ui_text(prop, "Anisotropic Filter", "Quality of the anisotropic filtering (values greater than 1.0 enable anisotropic " "filtering)"); @@ -3574,7 +3575,7 @@ RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset"); RNA_def_property_enum_items(prop, anim_player_presets); RNA_def_property_ui_text(prop, "Animation Player Preset", "Preset configs for external animation players"); - RNA_def_property_enum_default(prop, 1); /* set default to blender 2.4 player until an internal one is back */ + RNA_def_property_enum_default(prop, USERPREFERENCESFILEPATHS_ANIMATION_PLAYER_PRESET_DEFAULT); /* set default to blender 2.4 player until an internal one is back */ /* Autosave */ Index: source/blender/makesrna/intern/rna_world.c =================================================================== --- source/blender/makesrna/intern/rna_world.c (revision 51352) +++ source/blender/makesrna/intern/rna_world.c (working copy) @@ -35,6 +35,7 @@ #include "DNA_material_types.h" #include "DNA_texture_types.h" #include "DNA_world_types.h" +#include "DNA_defaults.h" #include "WM_types.h" @@ -260,6 +261,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, WORLDLIGHTING_AO_FACTOR_DEFAULT); RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending"); RNA_def_property_update(prop, 0, "rna_World_update"); @@ -278,6 +280,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, WORLDLIGHTING_ENVIRONMENT_ENERGY_DEFAULT); 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 +300,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, WORLDLIGHTING_INDIRECT_FACTOR_DEFAULT); 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, WORLDLIGHTING_INDIRECT_BOUNCES_DEFAULT); RNA_def_property_ui_text(prop, "Bounces", "Number of indirect diffuse light bounces"); RNA_def_property_update(prop, 0, "rna_World_update"); @@ -321,12 +326,14 @@ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "aodist"); + RNA_def_property_float_default(prop, WORLDLIGHTING_DISTANCE_DEFAULT); RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect"); 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_float_default(prop, WORLDLIGHTING_FALLOFF_STRENGTH_DEFAULT); RNA_def_property_ui_text(prop, "Strength", "Attenuation falloff strength, the higher, the less influence distant objects have"); RNA_def_property_update(prop, 0, "rna_World_update"); @@ -334,6 +341,7 @@ 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, WORLDLIGHTING_BIAS_DEFAULT); RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding " "(for Raytrace Constant Jittered)"); @@ -350,6 +358,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, WORLDLIGHTING_ADAPT_TO_SPEED_DEFAULT); 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,12 +392,14 @@ 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, WORLDLIGHTING_SAMPLES_DEFAULT); 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"); 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_default(prop, WORLDLIGHTING_SAMPLE_METHOD_DEFAULT); RNA_def_property_enum_items(prop, prop_sample_method_items); 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 +430,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, WORLDMISTSETTINGS_INTENSITY_DEFAULT); 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 +438,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, WORLDMISTSETTINGS_START_DEFAULT); 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 +446,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, WORLDMISTSETTINGS_DEPTH_DEFAULT); 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 +481,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, WORLDSTARSSETTINGS_SIZE_DEFAULT); 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, WORLDSTARSSETTINGS_DISTANCE_MIN_DEFAULT); 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, WORLDSTARSSETTINGS_AVERAGE_SEPARATION_DEFAULT); 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, WORLDSTARSSETTINGS_COLOR_RANDOM_DEFAULT); RNA_def_property_ui_text(prop, "Color Randomization", "Randomize star colors"); RNA_def_property_update(prop, 0, "rna_World_stars_update"); } @@ -541,12 +559,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, WORLD_EXPOSURE_DEFAULT); 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, WORLD_COLOR_RANGE_DEFAULT); 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");