465 if (!DNA_struct_member_exists(fd->
filesdna,
"BevelModifierData",
"float",
"profile")) {
502 if (!DNA_struct_member_exists(
503 fd->
filesdna,
"MovieTrackingSettings",
"float",
"default_weight"))
506 clip->tracking.settings.default_weight = 1.0f;
528 me->smoothresh_legacy =
DEG2RADF(me->smoothresh_legacy);
548 ListBase *lb = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase;
572 if (!DNA_struct_member_exists(fd->
filesdna,
"RenderData",
"BakeData",
"bake")) {
575 sce->r.bake.width = 512;
576 sce->r.bake.height = 512;
577 sce->r.bake.margin = 16;
582 STRNCPY(sce->r.bake.filepath,
U.renderdir);
587 sce->r.bake.im_format.quality = 90;
588 sce->r.bake.im_format.compress = 15;
592 if (!DNA_struct_member_exists(fd->
filesdna,
"FreestyleLineStyle",
"float",
"texstep")) {
595 linestyle->texstep = 1.0;
602 scene->r.actlay =
min_ff(scene->r.actlay, num_layers - 1);
608 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"float",
"line_col[4]")) {
610 mat->line_col[0] = mat->line_col[1] = mat->line_col[2] = 0.0f;
611 mat->line_col[3] = mat->alpha;
618 br->fill_threshold = 0.2f;
621 if (!DNA_struct_member_exists(fd->
filesdna,
"BevelModifierData",
"int",
"mat")) {
657 if (!DNA_struct_member_exists(fd->
filesdna,
"Image",
"float",
"gen_color")) {
659 image->gen_color[3] = 1.0f;
663 if (!DNA_struct_member_exists(fd->
filesdna,
"bStretchToConstraint",
"float",
"bulge_min")) {
679#define BRUSH_RAKE (1 << 7)
680#define BRUSH_RANDOM_ROTATION (1 << 25)
691 br->mtex.random_angle = 2.0 *
M_PI;
692 br->mask_mtex.random_angle = 2.0 *
M_PI;
697#undef BRUSH_RANDOM_ROTATION
701 if (!DNA_struct_member_exists(fd->
filesdna,
"Scene",
"DisplaySafeAreas",
"safe_areas")) {
703 copy_v2_fl2(scene->safe_areas.title, 3.5f / 100.0f, 3.5f / 100.0f);
704 copy_v2_fl2(scene->safe_areas.action, 10.0f / 100.0f, 5.0f / 100.0f);
705 copy_v2_fl2(scene->safe_areas.title_center, 17.5f / 100.0f, 5.0f / 100.0f);
706 copy_v2_fl2(scene->safe_areas.action_center, 15.0f / 100.0f, 5.0f / 100.0f);
713 if (part->clumpcurve) {
716 if (part->roughcurve) {
723 if (!DNA_struct_member_exists(fd->
filesdna,
"ClothSimSettings",
"float",
"bending_damping")) {
740 if (!DNA_struct_member_exists(fd->
filesdna,
"ParticleSettings",
"float",
"clump_noise_size")) {
742 part->clump_noise_size = 1.0f;
746 if (!DNA_struct_member_exists(fd->
filesdna,
"ParticleSettings",
"int",
"kink_extra_steps")) {
748 part->kink_extra_steps = 4;
752 if (!DNA_struct_member_exists(fd->
filesdna,
"MTex",
"float",
"kinkampfac")) {
754 for (
int a = 0; a <
MAX_MTEX; a++) {
755 MTex *mtex = part->mtex[a];
763 if (!DNA_struct_member_exists(fd->
filesdna,
"HookModifierData",
"char",
"flag")) {
774 if (!DNA_struct_member_exists(fd->
filesdna,
"NodePlaneTrackDeformData",
"char",
"flag")) {
782 data->motion_blur_samples = 16;
783 data->motion_blur_shutter = 0.5f;
791 if (!DNA_struct_member_exists(fd->
filesdna,
"Camera",
"GPUDOFSettings",
"gpu_dof")) {
793 ca->gpu_dof.fstop = 128.0f;
794 ca->gpu_dof.focal_length = 1.0f;
795 ca->gpu_dof.focus_distance = 1.0f;
796 ca->gpu_dof.sensor = 1.0f;
804 const std::string old_name = md->name;
806 if (old_name != md->name) {
808 "Warning: Object '%s' had several modifiers with the "
809 "same name, renamed one of them to '%s'.\n",
826 region->v2d.minzoom = 0.001f;
827 region->v2d.maxzoom = 1000.0f;
868 switch (sl->spacetype) {
888 cam->stereo.interocular_distance = 0.065f;
889 cam->stereo.convergence_distance = 30.0f * 0.065f;
895 if (ima->packedfile) {
901 ima->packedfile =
nullptr;
913 if (!DNA_struct_member_exists(fd->
filesdna,
"FileSelectParams",
"int",
"thumbnail_size")) {
929 if (!DNA_struct_member_exists(fd->
filesdna,
"RenderData",
"short",
"simplify_subsurf_render"))
932 scene->r.simplify_subsurf_render = scene->r.simplify_subsurf;
933 scene->r.simplify_particles_render = scene->r.simplify_particles;
937 if (!DNA_struct_member_exists(fd->
filesdna,
"DecimateModifierData",
"float",
"defgrp_factor"))
951#define BRUSH_TORUS (1 << 1)
959 if (!DNA_struct_member_exists(fd->
filesdna,
"bPoseChannel",
"float",
"custom_scale")) {
963 pchan->custom_scale = 1.0f;
969#define RV3D_VIEW_PERSPORTHO 7
974 ListBase *lb = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase;
977 if (region->regiondata) {
990#undef RV3D_VIEW_PERSPORTHO
992#define LA_YF_PHOTON 5
1002 if (!DNA_struct_member_exists(
1003 fd->
filesdna,
"RenderData",
"CurveMapping",
"mblur_shutter_curve"))
1006 CurveMapping *curve_mapping = &scene->r.mblur_shutter_curve;
1018 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"char",
"gpencil_v3d_align")) {
1047 int a = lbarray.size();
1084 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
1152 if (!DNA_struct_member_exists(fd->
filesdna,
"Bone",
"float",
"scale_in_x")) {
1157 if (!DNA_struct_member_exists(fd->
filesdna,
"bPoseChannel",
"float",
"scale_in_x")) {
1162 pchan->scale_in_x = pchan->scale_in_z = 1.0f;
1163 pchan->scale_out_x = pchan->scale_out_z = 1.0f;
1172 pchan->flag &= ~((1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7) | (1 << 8));
1179 if (camera->stereo.pole_merge_angle_from == 0.0f &&
1180 camera->stereo.pole_merge_angle_to == 0.0f)
1182 camera->stereo.pole_merge_angle_from =
DEG2RADF(60.0f);
1183 camera->stereo.pole_merge_angle_to =
DEG2RADF(75.0f);
1187 if (!DNA_struct_member_exists(fd->
filesdna,
"NormalEditModifierData",
"float",
"mix_limit")) {
1198 if (!DNA_struct_member_exists(
1199 fd->
filesdna,
"BooleanModifierData",
"float",
"double_threshold"))
1212 if (br->sculpt_brush_type == SCULPT_BRUSH_TYPE_FLATTEN) {
1217 if (!DNA_struct_member_exists(fd->
filesdna,
"ClothSimSettings",
"float",
"time_scale")) {
1237 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDstroke",
"bGPDpalettecolor",
"*palcolor")) {
1248 if (palcolor !=
nullptr) {
1267 gpl->opacity = 1.0f;
1276 STRNCPY(gps->colorname, gpl->info);
1277 gps->thickness = gpl->thickness;
1280 for (
int i = 0;
i < gps->totpoints;
i++) {
1281 gps->points[
i].strength = 1.0f;
1294 if (!DNA_struct_member_exists(fd->
filesdna,
"MovieTrackingTrack",
"float",
"weight_stab")) {
1300 &tracking_object->tracks;
1302 track->weight_stab = track->weight;
1308 if (!DNA_struct_member_exists(
1309 fd->
filesdna,
"MovieTrackingStabilization",
"int",
"tot_rot_track"))
1312 if (clip->tracking.stabilization.rot_track_legacy) {
1315 if (clip->tracking.stabilization.scale == 0.0f) {
1319 clip->tracking.stabilization.scale = 1.0f;
1323 clip->tracking.stabilization.anchor_frame = 1;
1330 if (!DNA_struct_member_exists(fd->
filesdna,
"FFMpegCodecData",
"int",
"ffmpeg_preset")) {
1333 scene->r.ffcodecdata.ffmpeg_preset = FFM_PRESET_MEDIUM;
1336 if (!DNA_struct_member_exists(fd->
filesdna,
"FFMpegCodecData",
"int",
"constant_rate_factor"))
1340 scene->r.ffcodecdata.constant_rate_factor =
FFM_CRF_NONE;
1344 if (!DNA_struct_member_exists(fd->
filesdna,
"FluidModifierData",
"float",
"slice_per_voxel")) {
1362 if (scene->toolsettings !=
nullptr) {
1373 if (!DNA_struct_member_exists(fd->
filesdna,
"RigidBodyCon",
"float",
"spring_stiffness_ang_x"))
1391 if (scene->toolsettings !=
nullptr) {
1401 const float sqrt_3 = float(
M_SQRT3);
1403 br->fill_threshold /= sqrt_3;
1407 if (!DNA_struct_member_exists(fd->
filesdna,
"bMotionPath",
"int",
"line_thickness")) {
1410 mpath->color[0] = 1.0f;
1411 mpath->color[1] = 0.0f;
1412 mpath->color[2] = 0.0f;
1413 mpath->line_thickness = 1;
1420 mpath->color[0] = 1.0f;
1421 mpath->color[1] = 0.0f;
1422 mpath->color[2] = 0.0f;
1423 mpath->line_thickness = 1;
1440 if (mspoint->parent.id_type == 0) {
1449 if (!DNA_struct_member_exists(fd->
filesdna,
"NodeGlare",
"char",
"star_45")) {
1456 switch (ndg->
type) {
1458 ndg->streaks = ndg->angle;
1461 ndg->star_45 = ndg->angle != 0;
1473 if (!DNA_struct_member_exists(fd->
filesdna,
"SurfaceDeformModifierData",
"float",
"mat[4][4]"))
1507 if (!DNA_struct_member_exists(fd->
filesdna,
"FluidDomainSettings",
"float",
"clipping")) {
1526 area->full =
nullptr;
1531 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"falloff_angle")) {
1541 for (
int i = 0;
i < 2;
i++) {
1543 if (vp !=
nullptr) {
1553 if (!DNA_struct_member_exists(fd->
filesdna,
"SimpleDeformModifierData",
"char",
"deform_axis"))
1566 int preset = scene->r.ffcodecdata.ffmpeg_preset;
1570 if (preset <= FFM_PRESET_FAST) {
1573 else if (preset >= FFM_PRESET_SLOW) {
1579 scene->r.ffcodecdata.ffmpeg_preset = preset;
1582 if (!DNA_struct_member_exists(
1583 fd->
filesdna,
"ParticleInstanceModifierData",
"float",
"particle_amount"))