Index: source/blender/blenkernel/intern/brush.c =================================================================== --- source/blender/blenkernel/intern/brush.c (revision 51721) +++ source/blender/blenkernel/intern/brush.c (working copy) @@ -75,16 +75,16 @@ brush->ob_mode = OB_MODE_ALL_PAINT; /* BRUSH SCULPT TOOL SETTINGS */ - brush->weight = 1.0f; /* weight of brush 0 - 1.0 */ + brush->weight = BRUSH_WEIGHT_DEFAULT; /* weight of brush 0 - 1.0 */ brush->size = 35; /* radius of the brush in pixels */ - brush->alpha = 0.5f; /* brush strength/intensity probably variable should be renamed? */ - brush->autosmooth_factor = 0.0f; - brush->crease_pinch_factor = 0.5f; + brush->alpha = BRUSH_STRENGTH_DEFAULT; /* brush strength/intensity probably variable should be renamed? */ + brush->autosmooth_factor = BRUSH_AUTO_SMOOTH_FACTOR_DEFAULT; + brush->crease_pinch_factor = BRUSH_CREASE_PINCH_FACTOR_DEFAULT; brush->sculpt_plane = SCULPT_DISP_DIR_AREA; - brush->plane_offset = 0.0f; /* how far above or below the plane that is found by averaging the faces */ - brush->plane_trim = 0.5f; + brush->plane_offset = BRUSH_PLANE_OFFSET_DEFAULT; /* how far above or below the plane that is found by averaging the faces */ + brush->plane_trim = BRUSH_PLANE_TRIM_DEFAULT; brush->clone.alpha = 0.5f; - brush->normal_weight = 0.0f; + brush->normal_weight = BRUSH_NORMAL_WEIGHT_DEFAULT; brush->flag |= BRUSH_ALPHA_PRESSURE; /* BRUSH PAINT TOOL SETTINGS */ Index: source/blender/blenkernel/intern/camera.c =================================================================== --- source/blender/blenkernel/intern/camera.c (revision 51721) +++ source/blender/blenkernel/intern/camera.c (working copy) @@ -56,15 +56,15 @@ cam = BKE_libblock_alloc(&G.main->camera, ID_CA, name); - cam->lens = 35.0f; + cam->lens = CAMERA_LENS_DEFAULT; cam->sensor_x = DEFAULT_SENSOR_WIDTH; cam->sensor_y = DEFAULT_SENSOR_HEIGHT; - cam->clipsta = 0.1f; - cam->clipend = 100.0f; - cam->drawsize = 0.5f; - cam->ortho_scale = 6.0; + cam->clipsta = CAMERA_CLIP_START_DEFAULT; + cam->clipend = CAMERA_CLIP_END_DEFAULT; + cam->drawsize = CAMERA_DRAW_SIZE_DEFAULT; + cam->ortho_scale = CAMERA_ORTHO_SCALE_DEFAULT; cam->flag |= CAM_SHOWPASSEPARTOUT; - cam->passepartalpha = 0.5f; + cam->passepartalpha = CAMERA_PASSEPARTOUT_ALPHA_DEFAULT; return cam; } Index: source/blender/blenkernel/intern/colortools.c =================================================================== --- source/blender/blenkernel/intern/colortools.c (revision 51721) +++ source/blender/blenkernel/intern/colortools.c (working copy) @@ -1236,8 +1236,8 @@ */ BLI_strncpy(settings->view_transform, "Default", sizeof(settings->view_transform)); - settings->gamma = 1.0f; - settings->exposure = 0.0f; + settings->gamma = COLORMANAGEDVIEWSETTINGS_GAMMA_DEFAULT; + settings->exposure = COLORMANAGEDVIEWSETTINGS_EXPOSURE_DEFAULT; } void BKE_color_managed_view_settings_copy(ColorManagedViewSettings *new_settings, Index: source/blender/blenkernel/intern/curve.c =================================================================== --- source/blender/blenkernel/intern/curve.c (revision 51721) +++ source/blender/blenkernel/intern/curve.c (working copy) @@ -175,17 +175,17 @@ cu = BKE_libblock_alloc(&G.main->curve, ID_CU, name); copy_v3_fl(cu->size, 1.0f); cu->flag = CU_FRONT | CU_BACK | CU_DEFORM_BOUNDS_OFF | CU_PATH_RADIUS; - cu->pathlen = 100; - cu->resolu = cu->resolv = (type == OB_SURF) ? 4 : 12; + cu->pathlen = BEZIERSPLINEPOINT_PATH_DURATION_DEFAULT; + cu->resolu = cu->resolv = (type == OB_SURF) ? CURVE_RENDER_RESOLUTION_V_DEFAULT : CURVE_RESOLUTION_U_DEFAULT; cu->width = 1.0; - cu->wordspace = 1.0; - cu->spacing = cu->linedist = 1.0; - cu->fsize = 1.0; - cu->ulheight = 0.05; + cu->wordspace = BEZIERSPLINEPOINT_SPACE_WORD_DEFAULT; + cu->spacing = cu->linedist = BEZIERSPLINEPOINT_SPACE_LINE_DEFAULT; + cu->fsize = BEZIERSPLINEPOINT_SIZE_DEFAULT; + cu->ulheight = BEZIERSPLINEPOINT_UNDERLINE_HEIGHT_DEFAULT; cu->texflag = CU_AUTOSPACE; - cu->smallcaps_scale = 0.75f; + cu->smallcaps_scale = BEZIERSPLINEPOINT_SMALL_CAPS_SCALE_DEFAULT; /* XXX: this one seems to be the best one in most cases, at least for curve deform... */ - cu->twist_mode = CU_TWIST_MINIMUM; + cu->twist_mode = CURVE_TWIST_MODE_DEFAULT; cu->type = type; cu->bevfac1 = 0.0f; cu->bevfac2 = 1.0f; Index: source/blender/blenkernel/intern/gpencil.c =================================================================== --- source/blender/blenkernel/intern/gpencil.c (revision 51721) +++ source/blender/blenkernel/intern/gpencil.c (working copy) @@ -179,8 +179,8 @@ BLI_addtail(&gpd->layers, gpl); /* set basic settings */ - gpl->color[3] = 0.9f; - gpl->thickness = 3; + gpl->color[3] = GPENCILLAYER_ALPHA_DEFAULT; + gpl->thickness = GPENCILLAYER_LINE_WIDTH_DEFAULT; /* auto-name */ strcpy(gpl->info, name); @@ -208,7 +208,7 @@ /* for now, stick to view is also enabled by default * since this is more useful... */ - gpd->flag |= GP_DATA_VIEWALIGN; + gpd->flag |= GREASEPENCIL_DRAW_MODE_DEFAULT; return gpd; } Index: source/blender/blenkernel/intern/key.c =================================================================== --- source/blender/blenkernel/intern/key.c (revision 51721) +++ source/blender/blenkernel/intern/key.c (working copy) @@ -1435,7 +1435,7 @@ if (key->totkey == 1) key->refkey = kb; kb->slidermin = 0.0f; - kb->slidermax = 1.0f; + kb->slidermax = SHAPEKEY_SLIDER_MAX_DEFAULT; /** * \note caller may want to set this to current time, but don't do it here since we need to sort Index: source/blender/blenkernel/intern/lamp.c =================================================================== --- source/blender/blenkernel/intern/lamp.c (revision 51721) +++ source/blender/blenkernel/intern/lamp.c (working copy) @@ -58,12 +58,12 @@ la = BKE_libblock_alloc(&G.main->lamp, ID_LA, name); la->r = la->g = la->b = la->k = 1.0f; - la->haint = la->energy = 1.0f; - la->dist = 25.0f; + la->haint = la->energy = LAMP_ENERGY_DEFAULT; + la->dist = LAMP_DISTANCE_DEFAULT; la->spotsize = 45.0f; la->spotblend = 0.15f; - la->att2 = 1.0f; - la->mode = LA_SHAD_BUF; + la->att2 = LAMP_QUADRATIC_ATTENUATION_DEFAULT; + la->mode = LAMP_SHADOW_METHOD_DEFAULT; la->bufsize = 512; la->clipsta = 0.5f; la->clipend = 40.0f; @@ -77,9 +77,9 @@ la->buffers = 1; la->buftype = LA_SHADBUF_HALFWAY; la->ray_samp_method = LA_SAMP_HALTON; - la->adapt_thresh = 0.001f; + la->adapt_thresh = LAMP_SHADOW_ADAPTIVE_THRESHOLD_DEFAULT; la->preview = NULL; - la->falloff_type = LA_FALLOFF_INVSQUARE; + la->falloff_type = LAMP_FALLOFF_TYPE_DEFAULT; la->curfalloff = curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f); la->sun_effect_type = 0; la->horizon_brightness = 1.0; Index: source/blender/blenkernel/intern/lattice.c =================================================================== --- source/blender/blenkernel/intern/lattice.c (revision 51721) +++ source/blender/blenkernel/intern/lattice.c (working copy) @@ -189,10 +189,12 @@ lt->flag = LT_GRID; - lt->typeu = lt->typev = lt->typew = KEY_BSPLINE; + lt->typeu = LATTICE_INTERPOLATION_TYPE_U_DEFAULT; + lt->typev = LATTICE_INTERPOLATION_TYPE_V_DEFAULT; + lt->typew = LATTICE_INTERPOLATION_TYPE_W_DEFAULT; lt->def = MEM_callocN(sizeof(BPoint), "lattvert"); /* temporary */ - BKE_lattice_resize(lt, 2, 2, 2, NULL); /* creates a uniform lattice */ + BKE_lattice_resize(lt, LATTICE_POINTS_U_DEFAULT, LATTICE_POINTS_V_DEFAULT, LATTICE_POINTS_W_DEFAULT, NULL); /* creates a uniform lattice */ return lt; } Index: source/blender/blenkernel/intern/mask.c =================================================================== --- source/blender/blenkernel/intern/mask.c (revision 51721) +++ source/blender/blenkernel/intern/mask.c (working copy) @@ -1521,7 +1521,7 @@ void BKE_mask_parent_init(MaskParent *parent) { - parent->id_type = ID_MC; + parent->id_type = MASKPARENT_ID_TYPE_DEFAULT; } Index: source/blender/blenkernel/intern/mball.c =================================================================== --- source/blender/blenkernel/intern/mball.c (revision 51721) +++ source/blender/blenkernel/intern/mball.c (working copy) @@ -207,9 +207,9 @@ mb->size[0] = mb->size[1] = mb->size[2] = 1.0; mb->texflag = MB_AUTOSPACE; - mb->wiresize = 0.4f; - mb->rendersize = 0.2f; - mb->thresh = 0.6f; + mb->wiresize = METABALL_RESOLUTION_DEFAULT; + mb->rendersize = METABALL_RENDER_RESOLUTION_DEFAULT; + mb->thresh = METABALL_THRESHOLD_DEFAULT; return mb; } Index: source/blender/blenkernel/intern/mesh.c =================================================================== --- source/blender/blenkernel/intern/mesh.c (revision 51721) +++ source/blender/blenkernel/intern/mesh.c (working copy) @@ -487,7 +487,7 @@ me = BKE_libblock_alloc(&G.main->mesh, ID_ME, name); me->size[0] = me->size[1] = me->size[2] = 1.0; - me->smoothresh = 30; + me->smoothresh = MESH_AUTO_SMOOTH_ANGLE_DEG_DEFAULT; me->texflag = ME_AUTOSPACE; me->flag = ME_TWOSIDED; me->drawflag = ME_DRAWEDGES | ME_DRAWFACES | ME_DRAWCREASES; Index: source/blender/blenkernel/intern/node.c =================================================================== --- source/blender/blenkernel/intern/node.c (revision 51721) +++ source/blender/blenkernel/intern/node.c (working copy) @@ -39,7 +39,6 @@ #include "DNA_action_types.h" #include "DNA_anim_types.h" #include "DNA_node_types.h" -#include "DNA_node_types.h" #include "DNA_scene_types.h" #include "BLI_string.h" Index: source/blender/blenkernel/intern/object.c =================================================================== --- source/blender/blenkernel/intern/object.c (revision 51721) +++ source/blender/blenkernel/intern/object.c (working copy) @@ -805,7 +805,7 @@ /* objects should default to having Euler XYZ rotations, * but rotations default to quaternions */ - ob->rotmode = ROT_MODE_EUL; + ob->rotmode = OBJECT_ROTATION_MODE_DEFAULT; unit_axis_angle(ob->rotAxis, &ob->rotAngle); unit_axis_angle(ob->drotAxis, &ob->drotAngle); @@ -819,21 +819,21 @@ unit_m4(ob->constinv); unit_m4(ob->parentinv); unit_m4(ob->obmat); - ob->dt = OB_TEXTURE; + ob->dt = OBJECT_DRAW_TYPE_DEFAULT; ob->empty_drawtype = OB_PLAINAXES; - ob->empty_drawsize = 1.0; + ob->empty_drawsize = OBJECT_EMPTY_DRAW_SIZE_DEFAULT; if (type == OB_CAMERA || type == OB_LAMP || type == OB_SPEAKER) { ob->trackflag = OB_NEGZ; ob->upflag = OB_POSY; } else { - ob->trackflag = OB_POSY; - ob->upflag = OB_POSZ; + ob->trackflag = OBJECT_TRACK_AXIS_DEFAULT; + ob->upflag = OBJECT_UP_AXIS_DEFAULT; } - ob->dupon = 1; ob->dupoff = 0; - ob->dupsta = 1; ob->dupend = 100; + ob->dupon = OBJECT_DUPLI_FRAMES_ON_DEFAULT; ob->dupoff = OBJECT_DUPLI_FRAMES_OFF_DEFAULT; + ob->dupsta = OBJECT_DUPLI_FRAMES_START_DEFAULT; ob->dupend = OBJECT_DUPLI_FRAMES_END_DEFAULT; ob->dupfacesca = 1.0; /* Game engine defaults*/ Index: source/blender/blenkernel/intern/particle.c =================================================================== --- source/blender/blenkernel/intern/particle.c (revision 51721) +++ source/blender/blenkernel/intern/particle.c (working copy) @@ -3555,7 +3555,7 @@ part->totpart = 1000; part->grid_res = 10; part->timetweak = 1.0; - part->courant_target = 0.2; + part->courant_target = PARTICLESETTINGS_COURANT_TARGET_DEFAULT; part->integrator = PART_INT_MIDPOINT; part->phystype = PART_PHYS_NEWTON; Index: source/blender/blenkernel/intern/scene.c =================================================================== --- source/blender/blenkernel/intern/scene.c (revision 51721) +++ source/blender/blenkernel/intern/scene.c (working copy) @@ -361,31 +361,31 @@ sce->r.mode = R_GAMMA | R_OSA | R_SHADOW | R_SSS | R_ENVMAP | R_RAYTRACE; sce->r.cfra = 1; - sce->r.sfra = 1; - sce->r.efra = 250; - sce->r.frame_step = 1; - sce->r.xsch = 1920; - sce->r.ysch = 1080; + sce->r.sfra = SCENE_FRAME_START_DEFAULT; + sce->r.efra = SCENE_FRAME_END_DEFAULT; + sce->r.frame_step = SCENE_FRAME_STEP_DEFAULT; + sce->r.xsch = RENDERSETTINGS_RESOLUTION_X; + sce->r.ysch = RENDERSETTINGS_RESOLUTION_Y; sce->r.xasp = 1; sce->r.yasp = 1; - sce->r.xparts = 8; - sce->r.yparts = 8; - sce->r.mblur_samples = 1; - sce->r.filtertype = R_FILTER_MITCH; - sce->r.size = 50; + sce->r.xparts = RENDERSETTINGS_PARTS_X_DEFAULT; + sce->r.yparts = RENDERSETTINGS_PARTS_Y_DEFAULT; + sce->r.mblur_samples = RENDERSETTINGS_MOTION_BLUR_SAMPLES_DEFAULT; + sce->r.filtertype = RENDERSETTINGS_PIXEL_FILTER_TYPE_DEFAULT; + sce->r.size = RENDERSETTINGS_RESOLUTION_PERCENTAGE_DEFAULT; - sce->r.im_format.planes = R_IMF_PLANES_RGB; - sce->r.im_format.imtype = R_IMF_IMTYPE_PNG; - sce->r.im_format.quality = 90; + sce->r.im_format.planes = IMAGEFORMATSETTINGS_COLOR_MODE_DEFAULT; + sce->r.im_format.imtype = IMAGEFORMATSETTINGS_FILE_FORMAT_DEFAULT; + sce->r.im_format.quality = IMAGEFORMATSETTINGS_COMPRESSION_DEFAULT; - sce->r.displaymode = R_OUTPUT_AREA; + sce->r.displaymode = RENDERSETTINGS_DISPLAY_MODE_DEFAULT; sce->r.framapto = 100; sce->r.images = 100; sce->r.framelen = 1.0; - sce->r.blurfac = 0.5; + sce->r.blurfac = RENDERSETTINGS_MOTION_BLUR_SHUTTER_DEFAULT; sce->r.frs_sec = 24; sce->r.frs_sec_base = 1; - sce->r.edgeint = 10; + sce->r.edgeint = RENDERSETTINGS_EDGE_THRESHOLD_DEFAULT; sce->r.ocres = 128; /* OCIO_TODO: for forwards compatibility only, so if no tonecurve are used, @@ -473,12 +473,12 @@ sce->toolsettings->proportional_size = 1.0f; - sce->physics_settings.gravity[0] = 0.0f; - sce->physics_settings.gravity[1] = 0.0f; - sce->physics_settings.gravity[2] = -9.81f; + sce->physics_settings.gravity[0] = SCENE_GRAVITY_X_DEFAULT; + sce->physics_settings.gravity[1] = SCENE_GRAVITY_Y_DEFAULT; + sce->physics_settings.gravity[2] = SCENE_GRAVITY_Z_DEFAULT; sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY; - sce->unit.scale_length = 1.0f; + sce->unit.scale_length = UNITSETTINGS_SCALE_LENGTH_DEFAULT; pset = &sce->toolsettings->particle; pset->flag = PE_KEEP_LENGTHS | PE_LOCK_FIRST | PE_DEFLECT_EMITTER | PE_AUTO_VELOCITY; @@ -497,22 +497,22 @@ } pset->brush[PE_BRUSH_CUT].strength = 100; - sce->r.ffcodecdata.audio_mixrate = 44100; - sce->r.ffcodecdata.audio_volume = 1.0f; + sce->r.ffcodecdata.audio_mixrate = FFMPEGSETTINGS_AUDIO_MIXRATE_DEFAULT; + sce->r.ffcodecdata.audio_volume = FFMPEGSETTINGS_AUDIO_VOLUME_DEFAULT; sce->r.ffcodecdata.audio_bitrate = 192; - sce->r.ffcodecdata.audio_channels = 2; + sce->r.ffcodecdata.audio_channels = FFMPEGSETTINGS_AUDIO_CHANNELS_DEFAULT; BLI_strncpy(sce->r.engine, "BLENDER_RENDER", sizeof(sce->r.engine)); - sce->audio.distance_model = 2.0f; - sce->audio.doppler_factor = 1.0f; - sce->audio.speed_of_sound = 343.3f; - sce->audio.volume = 1.0f; + sce->audio.distance_model = SCENE_AUDIO_DISTANCE_MODEL_DEFAULT; + sce->audio.doppler_factor = SCENE_AUDIO_DOPPLER_FACTOR_DEFAULT; + sce->audio.speed_of_sound = SCENE_AUDIO_DOPPLER_SPEED_DEFAULT; + sce->audio.volume = SCENE_AUDIO_VOLUME_DEFAULT; BLI_strncpy(sce->r.pic, U.renderdir, sizeof(sce->r.pic)); BLI_rctf_init(&sce->r.safety, 0.1f, 0.9f, 0.1f, 0.9f); - sce->r.osa = 8; + sce->r.osa = RENDERSETTINGS_ANTIALIASING_SAMPLES_DEFAULT; /* note; in header_info.c the scene copy happens..., if you add more to renderdata it has to be checked there */ BKE_scene_add_render_layer(sce, NULL); @@ -528,8 +528,8 @@ sce->gm.dome.resbuf = 1.0f; sce->gm.dome.tilt = 0; - sce->gm.xplay = 640; - sce->gm.yplay = 480; + sce->gm.xplay = SCENEGAMEDATA_RESOLUTION_X_DEFAULT; + sce->gm.yplay = SCENEGAMEDATA_RESOLUTION_Y_DEFAULT; sce->gm.freqplay = 60; sce->gm.depth = 32; Index: source/blender/blenkernel/intern/speaker.c =================================================================== --- source/blender/blenkernel/intern/speaker.c (revision 51721) +++ source/blender/blenkernel/intern/speaker.c (working copy) @@ -49,18 +49,18 @@ spk = BKE_libblock_alloc(&G.main->speaker, ID_SPK, name); - spk->attenuation = 1.0f; - spk->cone_angle_inner = 360.0f; - spk->cone_angle_outer = 360.0f; - spk->cone_volume_outer = 1.0f; - spk->distance_max = FLT_MAX; - spk->distance_reference = 1.0f; + spk->attenuation = SPEAKER_ATTENUATION_DEFAULT; + spk->cone_angle_inner = SPEAKER_CONE_ANGLE_INNER_DEFAULT; + spk->cone_angle_outer = SPEAKER_CONE_ANGLE_OUTER_DEFAULT; + spk->cone_volume_outer = SPEAKER_CONE_VOLUME_OUTER_DEFAULT; + spk->distance_max = SPEAKER_DISTANCE_MAX_DEFAULT; + spk->distance_reference = SPEAKER_DISTANCE_REFERENCE_DEFAULT; spk->flag = 0; - spk->pitch = 1.0f; + spk->pitch = SPEAKER_PITCH_DEFAULT; spk->sound = NULL; - spk->volume = 1.0f; - spk->volume_max = 1.0f; - spk->volume_min = 0.0f; + spk->volume = SPEAKER_VOLUME_DEFAULT; + spk->volume_max = SPEAKER_VOLUME_MAX_DEFAULT; + spk->volume_min = SPEAKER_VOLUME_MIN_DEFAULT; return spk; } Index: source/blender/blenkernel/intern/world.c =================================================================== --- source/blender/blenkernel/intern/world.c (revision 51721) +++ source/blender/blenkernel/intern/world.c (working copy) @@ -94,25 +94,25 @@ wrld->zeng = 0.01f; wrld->zenb = 0.01f; wrld->skytype = 0; - wrld->stardist = 15.0f; - wrld->starsize = 2.0f; + wrld->stardist = WORLDSTARSSETTINGS_AVERAGE_SEPARATION_DEFAULT; + wrld->starsize = WORLDSTARSSETTINGS_SIZE_DEFAULT; - wrld->exp = 0.0f; - wrld->exposure = wrld->range = 1.0f; + wrld->exp = WORLD_EXPOSURE_DEFAULT; + wrld->exposure = wrld->range = WORLD_COLOR_RANGE_DEFAULT; - wrld->aodist = 10.0f; - wrld->aosamp = 5; - wrld->aoenergy = 1.0f; - wrld->ao_env_energy = 1.0f; - wrld->ao_indirect_energy = 1.0f; - wrld->ao_indirect_bounces = 1; - wrld->aobias = 0.05f; + wrld->aodist = WORLDLIGHTING_DISTANCE_DEFAULT; + wrld->aosamp = WORLDLIGHTING_SAMPLES_DEFAULT; + wrld->aoenergy = WORLDLIGHTING_AO_FACTOR_DEFAULT; + wrld->ao_env_energy = WORLDLIGHTING_ENVIRONMENT_ENERGY_DEFAULT; + wrld->ao_indirect_energy = WORLDLIGHTING_INDIRECT_FACTOR_DEFAULT; + wrld->ao_indirect_bounces = WORLDLIGHTING_INDIRECT_BOUNCES_DEFAULT; + wrld->aobias = WORLDLIGHTING_BIAS_DEFAULT; wrld->ao_samp_method = WO_AOSAMP_HAMMERSLEY; wrld->ao_approx_error = 0.25f; wrld->preview = NULL; - wrld->miststa = 5.0f; - wrld->mistdist = 25.0f; + wrld->miststa = WORLDMISTSETTINGS_START_DEFAULT; + wrld->mistdist = WORLDMISTSETTINGS_DEPTH_DEFAULT; return wrld; } Index: source/blender/makesdna/DNA_anim_types.h =================================================================== --- source/blender/makesdna/DNA_anim_types.h (revision 51721) +++ source/blender/makesdna/DNA_anim_types.h (working copy) @@ -907,6 +907,15 @@ /* ************************************************ */ + +/* Defaults */ +#define KEYINGSETPATH_ID_TYPE_DEFAULT ID_OB +#define ANIMDATA_ACTION_INFLUENCE_DEFAULT 1.0f +#define FMODIFIER_INFLUENCE_DEFAULT 1.0f +#define DRIVERTARGET_ID_TYPE_DEFAULT ID_OB + + + #ifdef __cplusplus }; #endif Index: source/blender/makesdna/DNA_armature_types.h =================================================================== --- source/blender/makesdna/DNA_armature_types.h (revision 51721) +++ source/blender/makesdna/DNA_armature_types.h (working copy) @@ -203,4 +203,8 @@ #define MAXBONENAME 64 +#define ARMATURE_SHOW_BONE_CUSTOM_SHAPES_DEFAULT TRUE +#define ARMATURE_SHOW_GROUP_COLORS_DEFAULT TRUE + + #endif Index: source/blender/makesdna/DNA_brush_types.h =================================================================== --- source/blender/makesdna/DNA_brush_types.h (revision 51721) +++ source/blender/makesdna/DNA_brush_types.h (working copy) @@ -198,5 +198,17 @@ #define MAX_BRUSH_PIXEL_RADIUS 200 + +/* Defaults */ +#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 0.5f +#define BRUSH_AUTO_SMOOTH_FACTOR_DEFAULT 0 + #endif Index: source/blender/makesdna/DNA_camera_types.h =================================================================== --- source/blender/makesdna/DNA_camera_types.h (revision 51721) +++ source/blender/makesdna/DNA_camera_types.h (working copy) @@ -106,9 +106,19 @@ #define CAMERA_SENSOR_FIT_HOR 1 #define CAMERA_SENSOR_FIT_VERT 2 -#define DEFAULT_SENSOR_WIDTH 32.0f -#define DEFAULT_SENSOR_HEIGHT 18.0f +#define DEFAULT_SENSOR_WIDTH 32.0f +#define DEFAULT_SENSOR_HEIGHT 18.0f +#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_DRAW_SIZE_DEFAULT 0.5f +#define CAMERA_SHOW_PASSEPARTOUT_DEFAULT TRUE +#define CAMERA_ORTHO_SCALE_DEFAULT 6.0 + + #ifdef __cplusplus } #endif Index: source/blender/makesdna/DNA_cloth_types.h =================================================================== --- source/blender/makesdna/DNA_cloth_types.h (revision 51721) +++ source/blender/makesdna/DNA_cloth_types.h (working copy) @@ -105,4 +105,8 @@ } ClothCollSettings; +/* Defaults */ +#define CLOTHCOLLISIONSETTINGS_REPEL_FORCE_DEFAULT 1.0f +#define CLOTHCOLLISIONSETTINGS_DISTANCE_REPEL_DEFAULT 0.005f + #endif Index: source/blender/makesdna/DNA_color_types.h =================================================================== --- source/blender/makesdna/DNA_color_types.h (revision 51721) +++ source/blender/makesdna/DNA_color_types.h (working copy) @@ -182,4 +182,9 @@ COLORMANAGE_VIEW_USE_CURVES = (1 << 0) }; + +/* Defaults */ +#define COLORMANAGEDVIEWSETTINGS_EXPOSURE_DEFAULT 0.0f +#define COLORMANAGEDVIEWSETTINGS_GAMMA_DEFAULT 1.0f + #endif Index: source/blender/makesdna/DNA_curve_types.h =================================================================== --- source/blender/makesdna/DNA_curve_types.h (revision 51721) +++ source/blender/makesdna/DNA_curve_types.h (working copy) @@ -362,5 +362,29 @@ #define KEY_CU_EASE 3 +/* Curve defaults */ +#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 + +/* Bezier curve defaults */ +#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.05f + +/* Spline Defaults */ +#define SPLINE_RESOLUTION_U_DEFAULT 4 + + #endif Index: source/blender/makesdna/DNA_gpencil_types.h =================================================================== --- source/blender/makesdna/DNA_gpencil_types.h (revision 51721) +++ source/blender/makesdna/DNA_gpencil_types.h (working copy) @@ -160,4 +160,11 @@ #define GP_DATA_DEPTH_STROKE_ENDPOINTS (1<<7) + +/* Defaults */ +#define GPENCILLAYER_ALPHA_DEFAULT 0.9f +#define GPENCILLAYER_LINE_WIDTH_DEFAULT 3 +#define GREASEPENCIL_DRAW_MODE_DEFAULT GP_DATA_VIEWALIGN + + #endif /* __DNA_GPENCIL_TYPES_H__ */ Index: source/blender/makesdna/DNA_key_types.h =================================================================== --- source/blender/makesdna/DNA_key_types.h (revision 51721) +++ source/blender/makesdna/DNA_key_types.h (working copy) @@ -131,4 +131,9 @@ KEYBLOCK_LOCKED = (1 << 2) }; + +/* Defaults */ +#define SHAPEKEY_SLIDER_MAX_DEFAULT 1.0f + + #endif /* __DNA_KEY_TYPES_H__ */ Index: source/blender/makesdna/DNA_lamp_types.h =================================================================== --- source/blender/makesdna/DNA_lamp_types.h (revision 51721) +++ source/blender/makesdna/DNA_lamp_types.h (working copy) @@ -210,5 +210,19 @@ #define LA_SHADMAP_SIMPLE 0 #define LA_SHADMAP_VARIANCE 1 +/* defaults */ +#define LAMP_DISTANCE_DEFAULT 30.0f +#define LAMP_FALLOFF_TYPE_DEFAULT LA_FALLOFF_INVSQUARE +#define LAMP_SHADOW_ADAPTIVE_THRESHOLD_DEFAULT 0.001f +#define LAMP_SHADOW_METHOD_DEFAULT LA_SHAD_RAY +#define LAMP_LINEAR_ATTENUATION_DEFAULT 0.0f +#define LAMP_QUADRATIC_ATTENUATION_DEFAULT 1.0f +#define LAMP_SHADOW_SOFT_SIZE_DEFAULT 1.0f +#define LAMP_ENERGY_DEFAULT 1.0f +#define LAMP_USE_SPECULAR_DEFAULT TRUE +#define LAMP_USE_DIFFUSE_DEFAULT TRUE + + + #endif /* __DNA_LAMP_TYPES_H__ */ Index: source/blender/makesdna/DNA_lattice_types.h =================================================================== --- source/blender/makesdna/DNA_lattice_types.h (revision 51721) +++ source/blender/makesdna/DNA_lattice_types.h (working copy) @@ -85,5 +85,15 @@ #define LT_INDEX(lt, u, v, w) ((w) * ((lt)->pntsu * (lt)->pntsv) + ((v) * (lt)->pntsu) + (u)) + +/* Defaults */ +#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 + + #endif Index: source/blender/makesdna/DNA_mask_types.h =================================================================== --- source/blender/makesdna/DNA_mask_types.h (revision 51721) +++ source/blender/makesdna/DNA_mask_types.h (working copy) @@ -211,4 +211,9 @@ MASK_ANIMF_EXPAND = (1 << 4) }; + +/* Defaults */ +#define MASKPARENT_ID_TYPE_DEFAULT ID_MC + + #endif /* __DNA_MASK_TYPES_H__ */ Index: source/blender/makesdna/DNA_mesh_types.h =================================================================== --- source/blender/makesdna/DNA_mesh_types.h (revision 51721) +++ source/blender/makesdna/DNA_mesh_types.h (working copy) @@ -210,4 +210,14 @@ /* enable this so meshes get tessfaces calculated by default */ // #define USE_TESSFACE_DEFAULT + +/* Mesh Defaults from rna_mesh.c */ + +/* Defaults */ +#define MESHSTRINGPROPERTY_AUTO_TEXSPACE_DEFAULT TRUE +#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 + + #endif Index: source/blender/makesdna/DNA_meta_types.h =================================================================== --- source/blender/makesdna/DNA_meta_types.h (revision 51721) +++ source/blender/makesdna/DNA_meta_types.h (working copy) @@ -126,4 +126,10 @@ #define MB_HIDE 8 #define MB_SCALE_RAD 16 + +/* Defaults */ +#define METABALL_RESOLUTION_DEFAULT 0.400f +#define METABALL_RENDER_RESOLUTION_DEFAULT 0.200f +#define METABALL_THRESHOLD_DEFAULT 0.600f + #endif Index: source/blender/makesdna/DNA_modifier_types.h =================================================================== --- source/blender/makesdna/DNA_modifier_types.h (revision 51721) +++ source/blender/makesdna/DNA_modifier_types.h (working copy) @@ -1126,4 +1126,10 @@ short flag, repeat; } LaplacianSmoothModifierData; + +/* Defaults */ +#define VERTEXWEIGHTPROXIMITYMODIFIER_PROXIMITY_MODE_DEFAULT MOD_WVG_PROXIMITY_GEOMETRY +#define VERTEXWEIGHTPROXIMITYMODIFIER_PROXIMITY_GEOMETRY_DEFAULT MOD_WVG_PROXIMITY_GEOM_FACES + + #endif Index: source/blender/makesdna/DNA_node_types.h =================================================================== --- source/blender/makesdna/DNA_node_types.h (revision 51721) +++ source/blender/makesdna/DNA_node_types.h (working copy) @@ -786,4 +786,62 @@ #define CMP_NODE_MASK_MBLUR_SAMPLES_MAX 64 + +/* Defaults */ + +#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 + +#define NODESOCKET_TYPE_DEFAULT 0 + + #endif Index: source/blender/makesdna/DNA_object_types.h =================================================================== --- source/blender/makesdna/DNA_object_types.h (revision 51721) +++ source/blender/makesdna/DNA_object_types.h (working copy) @@ -601,6 +601,21 @@ #define MAX_DUPLI_RECUR 8 + +/* Defaults */ +#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 + + #ifdef __cplusplus } #endif Index: source/blender/makesdna/DNA_particle_types.h =================================================================== --- source/blender/makesdna/DNA_particle_types.h (revision 51721) +++ source/blender/makesdna/DNA_particle_types.h (working copy) @@ -570,4 +570,8 @@ #define PAMAP_ROUGH (1<<9) #define PAMAP_LENGTH (1<<4) + +/* Defaults */ +#define PARTICLESETTINGS_COURANT_TARGET_DEFAULT 0.2 + #endif Index: source/blender/makesdna/DNA_scene_types.h =================================================================== --- source/blender/makesdna/DNA_scene_types.h (revision 51721) +++ source/blender/makesdna/DNA_scene_types.h (working copy) @@ -1587,6 +1587,147 @@ #define USER_UNIT_OPT_SPLIT 1 #define USER_UNIT_ROT_RADIANS 2 + +/* Defaults */ + +#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 + +/* UnifiedPaintSettings Defaults */ +#define UNIFIEDPAINTSETTINGS_STRENGTH_DEFAULT 0.5f +#define UNIFIEDPAINTSETTINGS_WEIGHT_DEFAULT 0.5f + +/* Unit Settings Defaults */ +#define UNITSETTINGS_SCALE_LENGTH_DEFAULT 1.0f +#define UNITSETTINGS_USE_SEPARATE_DEFAULT FALSE + +/* RenderLayer Defaults */ +#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 + +/* SceneGameData Defaults */ +#define SCENEGAMEDATA_RESOLUTION_X_DEFAULT 640 +#define SCENEGAMEDATA_RESOLUTION_Y_DEFAULT 480 + +/* ImageFormatSettings Defaults */ +#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 + +/* FFmpegSettings Defaults */ +#define FFMPEGSETTINGS_AUDIO_VOLUME_DEFAULT 1.0f +#define FFMPEGSETTINGS_AUDIO_MIXRATE_DEFAULT 44100 +#define FFMPEGSETTINGS_AUDIO_CHANNELS_DEFAULT 2 + +/* RenderSettings Defaults */ +#define RENDERSETTINGS_RESOLUTION_X 1920 +#define RENDERSETTINGS_RESOLUTION_Y 1080 +#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 + + #ifdef __cplusplus } #endif Index: source/blender/makesdna/DNA_sequence_types.h =================================================================== --- source/blender/makesdna/DNA_sequence_types.h (revision 51721) +++ source/blender/makesdna/DNA_sequence_types.h (working copy) @@ -429,4 +429,14 @@ SEQUENCE_MASK_INPUT_ID = 1 }; + +/* Defaults */ +#define SEQUENCECOLORBALANCEDATA_LIFT_DEFAULT 1.0f +#define SEQUENCECOLORBALANCEDATA_GAMMA_DEFAULT 1.0f +#define SEQUENCECOLORBALANCEDATA_GAIN_DEFAULT 1.0f +#define SEQUENCEEDITOR_COLOR_MULTIPLY_DEFAULT 1.0f +#define SEQUENCEEDITOR_COLOR_SATURATION_DEFAULT 1.0f +#define COLORBALANCEMODIFIER_COLOR_MULTIPLY_DEFAULT 1.0f + + #endif Index: source/blender/makesdna/DNA_space_types.h =================================================================== --- source/blender/makesdna/DNA_space_types.h (revision 51721) +++ source/blender/makesdna/DNA_space_types.h (working copy) @@ -1129,4 +1129,16 @@ #define IMG_SIZE_FALLBACK 256 + +/* Defaults */ +#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 +#define SPACENODEEDITOR_BACKDROP_ZOOM_DEFAULT 1.0f + + #endif Index: source/blender/makesdna/DNA_speaker_types.h =================================================================== --- source/blender/makesdna/DNA_speaker_types.h (revision 51721) +++ source/blender/makesdna/DNA_speaker_types.h (working copy) @@ -64,5 +64,19 @@ #define SPK_MUTED (1<<1) #define SPK_RELATIVE (1<<2) + +/* Defaults */ +#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 + + #endif /* __DNA_SPEAKER_TYPES_H__ */ Index: source/blender/makesdna/DNA_tracking_types.h =================================================================== --- source/blender/makesdna/DNA_tracking_types.h (revision 51721) +++ source/blender/makesdna/DNA_tracking_types.h (working copy) @@ -368,4 +368,12 @@ #define TRACKING_DOPE_SELECTED_ONLY (1 << 1) #define TRACKING_DOPE_SHOW_HIDDEN (1 << 2) + +/* Defaults */ +#define MOVIETRACKINGSETTINGS_DISTANCE_DEFAULT 1.0f +#define MOVIETRACKINGSETTINGS_OBJECT_DISTANCE_DEFAULT 1.0f +#define MOVIETRACKINGCAMERA_PIXEL_ASPECT_DEFAULT 1.0f +#define MOVIETRACKINGOBJECT_SCALE_DEFAULT 1.0f + + #endif Index: source/blender/makesdna/DNA_userdef_types.h =================================================================== --- source/blender/makesdna/DNA_userdef_types.h (revision 51721) +++ source/blender/makesdna/DNA_userdef_types.h (working copy) @@ -706,4 +706,15 @@ } #endif + +/* Defaults */ +#define THEMENODEEDITOR_NOODLE_CURVING_DEFAULT 5 +#define USERPREFERENCESVIEW_MANIPULATOR_SIZE_DEFAULT 15 +#define USERPREFERENCESVIEW_MANIPULATOR_HANDLE_SIZE_DEFAULT 25 +#define USERPREFERENCESVIEW_MANIPULATOR_HOTSPOT_DEFAULT 14 +#define USERPREFERENCESSYSTEM_ANISOTROPIC_FILTER_DEFAULT 1 +#define USERPREFERENCESFILEPATHS_ANIMATION_PLAYER_PRESET_DEFAULT 1 + + + #endif Index: source/blender/makesdna/DNA_world_types.h =================================================================== --- source/blender/makesdna/DNA_world_types.h (revision 51721) +++ source/blender/makesdna/DNA_world_types.h (working copy) @@ -198,5 +198,36 @@ */ #define WO_DS_SHOW_TEXS (1<<2) + +/* WorldLighting Defaults */ +#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 + +/* WorldMistSettings defaults */ +#define WORLDMISTSETTINGS_INTENSITY_DEFAULT 0.0f +#define WORLDMISTSETTINGS_START_DEFAULT 5.0f +#define WORLDMISTSETTINGS_DEPTH_DEFAULT 25.0f + +/* WorldStarsSettings defaults */ +#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 Defaults */ +#define WORLD_EXPOSURE_DEFAULT 0.0f +#define WORLD_COLOR_RANGE_DEFAULT 1.0f + + + + #endif Index: source/blender/makesrna/intern/rna_animation.c =================================================================== --- source/blender/makesrna/intern/rna_animation.c (revision 51721) +++ source/blender/makesrna/intern/rna_animation.c (working copy) @@ -588,7 +588,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 +871,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 51721) +++ source/blender/makesrna/intern/rna_armature.c (working copy) @@ -1005,11 +1005,13 @@ prop = RNA_def_property(srna, "show_bone_custom_shapes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ARM_NO_CUSTOM); + RNA_def_property_boolean_default(prop, 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 51721) +++ source/blender/makesrna/intern/rna_brush.c (working copy) @@ -655,7 +655,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 +663,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 +671,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 +680,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 +688,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 51721) +++ source/blender/makesrna/intern/rna_camera.c (working copy) @@ -150,6 +150,7 @@ prop = RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "passepartalpha"); + RNA_def_property_float_default(prop, 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 +171,7 @@ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_range(prop, M_PI * (0.367 / 180.0), M_PI * (172.847 / 180.0)); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_float_default(prop, 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 +179,21 @@ prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "clipsta"); RNA_def_property_range(prop, 0.001f, FLT_MAX); + RNA_def_property_float_default(prop, 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 +201,7 @@ RNA_def_property_float_sdna(prop, NULL, "sensor_x"); RNA_def_property_range(prop, 1.0f, FLT_MAX); RNA_def_property_ui_range(prop, 1.0f, 100.f, 1, 2); + RNA_def_property_float_default(prop, DEFAULT_SENSOR_WIDTH); RNA_def_property_ui_text(prop, "Sensor Width", "Horizontal size of the image sensor area in millimeters"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update"); @@ -203,6 +209,7 @@ RNA_def_property_float_sdna(prop, NULL, "sensor_y"); RNA_def_property_range(prop, 1.0f, FLT_MAX); RNA_def_property_ui_range(prop, 1.0f, 100.f, 1, 2); + RNA_def_property_float_default(prop, DEFAULT_SENSOR_HEIGHT); RNA_def_property_ui_text(prop, "Sensor Height", "Vertical size of the image sensor area in millimeters"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update"); @@ -216,6 +223,7 @@ RNA_def_property_float_sdna(prop, NULL, "drawsize"); RNA_def_property_range(prop, 0.01f, 1000.0f); RNA_def_property_ui_range(prop, 0.01, 100, 1, 2); + RNA_def_property_float_default(prop, 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 +262,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 51721) +++ source/blender/makesrna/intern/rna_cloth.c (working copy) @@ -481,14 +481,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 51721) +++ source/blender/makesrna/intern/rna_color.c (working copy) @@ -895,13 +895,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 51721) +++ source/blender/makesrna/intern/rna_curve.c (working copy) @@ -840,6 +840,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 +874,7 @@ prop = RNA_def_property(srna, "use_radius", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH_RADIUS); + RNA_def_property_boolean_default(prop, 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 +917,34 @@ RNA_def_property_range(prop, 0.0001f, 10000.0f); RNA_def_property_ui_range(prop, 0.01, 10, 1, 3); RNA_def_property_ui_text(prop, "Font size", ""); + RNA_def_property_float_default(prop, 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 +975,7 @@ prop = RNA_def_property(srna, "underline_height", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ulheight"); RNA_def_property_range(prop, -0.2f, 0.8f); + RNA_def_property_float_default(prop, BEZIERSPLINEPOINT_UNDERLINE_HEIGHT_DEFAULT); RNA_def_property_ui_text(prop, "Underline Thickness", ""); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -1332,6 +1340,7 @@ RNA_def_property_int_sdna(prop, NULL, "resolu"); RNA_def_property_range(prop, 1, SHRT_MAX); RNA_def_property_ui_range(prop, 1, 64, 1, 0); + RNA_def_property_int_default(prop, 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 +1362,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 +1398,7 @@ prop = RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE); /* as an enum */ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, curve_axis_items); + RNA_def_property_enum_default(prop, 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 +1406,7 @@ prop = RNA_def_property(srna, "fill_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, curve3d_fill_mode_items); + RNA_def_property_enum_default(prop, 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 +1414,7 @@ prop = RNA_def_property(srna, "twist_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "twist_mode"); RNA_def_property_enum_items(prop, curve_twist_mode_items); + RNA_def_property_enum_default(prop, 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 +1427,7 @@ prop = RNA_def_property(srna, "use_fill_deform", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_DEFORM_FILL); + RNA_def_property_boolean_default(prop, 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 +1441,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 +1490,7 @@ prop = RNA_def_property(srna, "bevel_factor_end", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "bevfac2"); RNA_def_property_range(prop, 0, 1.0); + RNA_def_property_float_default(prop, 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 +1581,7 @@ RNA_def_property_int_sdna(prop, NULL, "resolu"); RNA_def_property_range(prop, 1, SHRT_MAX); RNA_def_property_ui_range(prop, 1, 64, 1, 0); + RNA_def_property_int_default(prop, 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 51721) +++ source/blender/makesrna/intern/rna_fcurve.c (working copy) @@ -1106,7 +1106,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 +1160,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 51721) +++ source/blender/makesrna/intern/rna_gpencil.c (working copy) @@ -473,6 +473,7 @@ prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "color[3]"); RNA_def_property_range(prop, 0.3, 1.0f); + RNA_def_property_float_default(prop, 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 +481,7 @@ prop = RNA_def_property(srna, "line_width", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "thickness"); RNA_def_property_range(prop, 1, 10); + RNA_def_property_int_default(prop, 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 +609,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 51721) +++ source/blender/makesrna/intern/rna_key.c (working copy) @@ -583,7 +583,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 51721) +++ source/blender/makesrna/intern/rna_lamp.c (working copy) @@ -370,12 +370,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 +399,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 +443,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 +460,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 +543,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 +674,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 51721) +++ source/blender/makesrna/intern/rna_lattice.c (working copy) @@ -267,6 +267,7 @@ RNA_def_property_int_sdna(prop, NULL, "pntsu"); RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_u_set", NULL); RNA_def_property_range(prop, 1, 64); + RNA_def_property_int_default(prop, 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 +276,7 @@ RNA_def_property_int_sdna(prop, NULL, "pntsv"); RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_v_set", NULL); RNA_def_property_range(prop, 1, 64); + RNA_def_property_int_default(prop, 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 +285,7 @@ RNA_def_property_int_sdna(prop, NULL, "pntsw"); RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_w_set", NULL); RNA_def_property_range(prop, 1, 64); + RNA_def_property_int_default(prop, 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 +293,21 @@ prop = RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typeu"); RNA_def_property_enum_items(prop, keyblock_type_items); + RNA_def_property_enum_default(prop, 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 51721) +++ source/blender/makesrna/intern/rna_mask.c (working copy) @@ -395,7 +395,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 51721) +++ source/blender/makesrna/intern/rna_mesh.c (working copy) @@ -2173,6 +2173,7 @@ /* texture space */ prop = RNA_def_property(srna, "auto_texspace", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "texflag", ME_AUTOSPACE); + RNA_def_property_boolean_default(prop, 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 +2825,19 @@ prop = RNA_def_property(srna, "auto_smooth_angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_funcs(prop, "rna_Mesh_auto_smooth_angle_get", "rna_Mesh_auto_smooth_angle_set", NULL); RNA_def_property_ui_range(prop, DEG2RAD(1.0), DEG2RAD(80), 1.0, 1); + RNA_def_property_float_default(prop, 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 51721) +++ source/blender/makesrna/intern/rna_meta.c (working copy) @@ -297,18 +297,21 @@ prop = RNA_def_property(srna, "resolution", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "wiresize"); RNA_def_property_range(prop, 0.050f, 1.0f); + RNA_def_property_float_default(prop, 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 51721) +++ source/blender/makesrna/intern/rna_modifier.c (working copy) @@ -3030,7 +3030,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"); @@ -3038,7 +3038,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 51721) +++ source/blender/makesrna/intern/rna_nodetree.c (working copy) @@ -1579,28 +1579,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"); @@ -3318,7 +3318,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"); @@ -3326,27 +3326,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"); @@ -3365,35 +3366,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"); @@ -3435,35 +3436,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"); @@ -3485,19 +3486,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"); @@ -3505,49 +3506,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"); @@ -3555,105 +3556,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"); @@ -3678,14 +3679,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"); @@ -4134,7 +4135,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 51721) +++ source/blender/makesrna/intern/rna_object.c (working copy) @@ -2035,6 +2035,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 +2044,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 +2118,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 +2279,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 +2376,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 +2405,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 +2420,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 +2428,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 +2445,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 +2462,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 51721) +++ source/blender/makesrna/intern/rna_particle.c (working copy) @@ -2132,7 +2132,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 51721) +++ source/blender/makesrna/intern/rna_scene.c (working copy) @@ -1834,14 +1834,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"); @@ -1898,11 +1898,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); } @@ -1975,12 +1977,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"); @@ -1988,42 +1992,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); @@ -2031,114 +2042,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"); @@ -2146,6 +2176,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"); @@ -2153,6 +2184,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"); @@ -2160,6 +2192,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"); @@ -2167,6 +2200,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"); @@ -2174,6 +2208,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"); @@ -2181,6 +2216,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"); @@ -2188,6 +2224,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"); @@ -2195,54 +2232,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); @@ -2420,12 +2466,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); @@ -2845,6 +2893,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"); @@ -2853,6 +2902,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, " @@ -2870,6 +2920,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); @@ -2877,6 +2928,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); @@ -3120,6 +3172,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); @@ -3130,11 +3183,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,6 +3427,7 @@ RNA_def_property_int_sdna(prop, NULL, "xsch"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 4, 10000); + RNA_def_property_int_default(prop, RENDERSETTINGS_RESOLUTION_X); RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update"); @@ -3379,6 +3435,7 @@ RNA_def_property_int_sdna(prop, NULL, "ysch"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 4, 10000); + RNA_def_property_int_default(prop, RENDERSETTINGS_RESOLUTION_Y); RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update"); @@ -3387,18 +3444,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); @@ -3451,6 +3511,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"); @@ -3458,6 +3519,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"); @@ -3472,12 +3534,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); @@ -3504,10 +3568,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)"); @@ -3522,11 +3588,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); @@ -3540,17 +3608,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); @@ -3563,28 +3634,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); @@ -3620,6 +3696,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"); @@ -3628,6 +3705,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"); @@ -3636,6 +3714,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)"); @@ -3667,23 +3746,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, " @@ -3692,6 +3775,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 " @@ -3707,6 +3791,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); @@ -3732,18 +3817,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 " @@ -3752,6 +3840,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 " @@ -3761,6 +3850,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); @@ -3798,6 +3888,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); @@ -3811,6 +3902,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); @@ -3822,6 +3914,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); @@ -3854,58 +3947,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); @@ -3922,6 +4026,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); @@ -4009,27 +4114,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 */ @@ -4231,6 +4341,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"}, @@ -4334,6 +4446,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); @@ -4342,6 +4455,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); @@ -4350,6 +4464,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); @@ -4471,6 +4586,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"); @@ -4514,6 +4630,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"); @@ -4521,6 +4638,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"); @@ -4528,12 +4646,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_sequencer.c =================================================================== --- source/blender/makesrna/intern/rna_sequencer.c (revision 51721) +++ source/blender/makesrna/intern/rna_sequencer.c (working copy) @@ -1168,19 +1168,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 +1571,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 +1579,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 +2242,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 51721) +++ source/blender/makesrna/intern/rna_space.c (working copy) @@ -1576,19 +1576,20 @@ RNA_def_property_float_sdna(prop, NULL, "lens"); RNA_def_property_ui_text(prop, "Lens", "Viewport lens angle (mm)"); 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); @@ -1596,21 +1597,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, "grid_scale_unit", PROP_FLOAT, PROP_NONE); @@ -1788,6 +1789,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); @@ -3038,6 +3040,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 51721) +++ source/blender/makesrna/intern/rna_speaker.c (working copy) @@ -84,6 +84,7 @@ RNA_def_property_float_sdna(prop, NULL, "volume_max"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 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 +93,7 @@ RNA_def_property_float_sdna(prop, NULL, "volume_min"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 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 +102,7 @@ RNA_def_property_float_sdna(prop, NULL, "distance_max"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_float_default(prop, 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 +112,7 @@ RNA_def_property_float_sdna(prop, NULL, "distance_reference"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_float_default(prop, 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 +121,7 @@ RNA_def_property_float_sdna(prop, NULL, "attenuation"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_float_default(prop, 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 +130,7 @@ RNA_def_property_float_sdna(prop, NULL, "cone_angle_outer"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 360.0f); + RNA_def_property_float_default(prop, 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 +141,7 @@ RNA_def_property_float_sdna(prop, NULL, "cone_angle_inner"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 360.0f); + RNA_def_property_float_default(prop, 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 +151,7 @@ RNA_def_property_float_sdna(prop, NULL, "cone_volume_outer"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 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 +159,7 @@ prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "volume"); RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 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 +168,7 @@ prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "pitch"); RNA_def_property_range(prop, 0.1f, 10.0f); + RNA_def_property_float_default(prop, 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 51721) +++ source/blender/makesrna/intern/rna_tracking.c (working copy) @@ -580,7 +580,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 +718,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 +806,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 +1378,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 51721) +++ source/blender/makesrna/intern/rna_userdef.c (working copy) @@ -1619,7 +1619,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"); @@ -2623,21 +2623,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); @@ -3208,7 +3208,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)"); @@ -3597,7 +3597,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 51721) +++ source/blender/makesrna/intern/rna_world.c (working copy) @@ -260,6 +260,7 @@ RNA_def_property_float_sdna(prop, NULL, "aoenergy"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_range(prop, 0, 1, 0.1, 2); + RNA_def_property_float_default(prop, 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 +279,7 @@ prop = RNA_def_property(srna, "environment_energy", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ao_env_energy"); RNA_def_property_ui_range(prop, 0, FLT_MAX, 1, 3); + RNA_def_property_float_default(prop, 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 +299,14 @@ RNA_def_property_float_sdna(prop, NULL, "ao_indirect_energy"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_range(prop, 0, 1, 0.1, 2); + RNA_def_property_float_default(prop, 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 +325,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 +340,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 +357,7 @@ prop = RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac"); RNA_def_property_range(prop, 0, 1); + RNA_def_property_float_default(prop, 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 +391,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 +429,7 @@ prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "misi"); RNA_def_property_range(prop, 0, 1); + RNA_def_property_float_default(prop, 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 +437,7 @@ RNA_def_property_float_sdna(prop, NULL, "miststa"); RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0, 10000, 10, 2); + RNA_def_property_float_default(prop, 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 +445,7 @@ RNA_def_property_float_sdna(prop, NULL, "mistdist"); RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0, 10000, 10, 2); + RNA_def_property_float_default(prop, 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 +480,28 @@ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "starsize"); RNA_def_property_range(prop, 0, 10); + RNA_def_property_float_default(prop, 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 +558,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");