3043 scene->r.gauss = 1.5f;
3048 if (!DNA_struct_member_exists(fd->
filesdna,
"GPUDOFSettings",
"float",
"ratio")) {
3050 ca->gpu_dof.ratio = 1.0f;
3055 if (DNA_struct_exists(fd->
filesdna,
"MTexPoly")) {
3069 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"cascade_max_dist")) {
3071 la->cascade_max_dist = 1000.0f;
3072 la->cascade_count = 4;
3073 la->cascade_exponent = 0.8f;
3074 la->cascade_fade = 0.1f;
3078 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"float",
"vis_bias")) {
3080 probe->vis_bias = 1.0f;
3081 probe->vis_blur = 0.2f;
3095 if (node->type_legacy == 194 &&
3096 STREQ(node->idname,
"ShaderNodeOutputMetallic"))
3098 STRNCPY(node->idname,
"ShaderNodeEeveeMetallic");
3103 STREQ(node->idname,
"ShaderNodeOutputSpecular"))
3105 STRNCPY(node->idname,
"ShaderNodeEeveeSpecular");
3109 else if (node->type_legacy == 196 &&
3110 STREQ(node->idname,
"ShaderNodeOutputEeveeMaterial"))
3113 STRNCPY(node->idname,
"ShaderNodeOutputMaterial");
3116 else if (node->type_legacy == 194 &&
3117 STREQ(node->idname,
"ShaderNodeEeveeMetallic"))
3120 STRNCPY(node->idname,
"ShaderNodeBsdfPrincipled");
3134 "Eevee material conversion problem. Error in console");
3136 "You need to connect Principled and Eevee Specular shader nodes to new material "
3146 "Eevee material conversion problem. Error in console");
3148 "You need to combine transparency and emission shaders to the converted Principled "
3154 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPdata",
"float",
"line_color[4]")) {
3161 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPdata",
"float",
"pixfactor")) {
3168 if (!DNA_struct_member_exists(
3169 fd->
filesdna,
"GP_Sculpt_Settings",
"CurveMapping",
"cur_falloff"))
3202 win->screen =
nullptr;
3209 if (!DNA_struct_member_exists(
3210 fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_paper_color[3]"))
3227 if (DNA_struct_member_exists(fd->
filesdna,
"SpaceOutliner",
"int",
"filter") ==
false) {
3250 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"float",
"intensity")) {
3252 probe->intensity = 1.0f;
3289 if (
STR_ELEM(scene->r.engine,
"BLENDER_RENDER",
"BLENDER_GAME")) {
3293 scene->r.bake_mode = 0;
3298 if (
ELEM(tex->type, 10, 14, 15, 16)) {
3309 int win_width = 0, win_height = 0;
3311 win_width = std::max<int>(win_width, vert->vec.x);
3312 win_height = std::max<int>(win_height, vert->vec.y);
3315 for (
ScrArea *area =
static_cast<ScrArea *
>(screen->areabase.first), *area_next; area;
3318 area_next =
static_cast<ScrArea *
>(area->next);
3321 if ((area->v2->vec.y == win_height) && (area->v1->vec.x == 0) &&
3322 (area->v4->vec.x == win_width))
3343 if (la->mode & (1 << 13)) {
3345 la->mode &= ~(1 << 13);
3356 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3360 region = region_next)
3362 region_next =
static_cast<ARegion *
>(region->next);
3377 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"spec_fac")) {
3379 la->spec_fac = 1.0f;
3403 if (!DNA_struct_member_exists(fd->
filesdna,
"Scene",
"SceneDisplay",
"display")) {
3410 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"float",
"shadow_shift")) {
3412 scene->display.shadow_shift = 0.1;
3416 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"char",
"transform_pivot_point")) {
3422 if (!DNA_struct_exists(fd->
filesdna,
"SceneEEVEE")) {
3426 scene->eevee.gi_diffuse_bounces = 3;
3427 scene->eevee.gi_cubemap_resolution = 512;
3428 scene->eevee.gi_visibility_resolution = 32;
3430 scene->eevee.taa_samples = 16;
3431 scene->eevee.taa_render_samples = 64;
3433 scene->eevee.volumetric_start = 0.1f;
3434 scene->eevee.volumetric_end = 100.0f;
3435 scene->eevee.volumetric_tile_size = 8;
3436 scene->eevee.volumetric_samples = 64;
3437 scene->eevee.volumetric_sample_distribution = 0.8f;
3438 scene->eevee.volumetric_light_clamp = 0.0f;
3439 scene->eevee.volumetric_shadow_samples = 16;
3441 scene->eevee.gtao_distance = 0.2f;
3442 scene->eevee.fast_gi_quality = 0.25f;
3444 scene->eevee.bokeh_max_size = 100.0f;
3445 scene->eevee.bokeh_threshold = 1.0f;
3447 scene->eevee.motion_blur_samples = 8;
3448 scene->eevee.motion_blur_shutter_deprecated = 0.5f;
3450 scene->eevee.shadow_cube_size_deprecated = 512;
3455 if (scene->layer_properties ==
nullptr) {
3460#define EEVEE_GET_BOOL(_props, _name, _flag) \
3462 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3463 if (_idprop != nullptr) { \
3464 const int _value = IDP_Int(_idprop); \
3466 scene->eevee.flag |= _flag; \
3469 scene->eevee.flag &= ~_flag; \
3475#define EEVEE_GET_INT(_props, _name) \
3477 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3478 if (_idprop != nullptr) { \
3479 scene->eevee._name = IDP_Int(_idprop); \
3484#define EEVEE_GET_FLOAT(_props, _name) \
3486 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3487 if (_idprop != nullptr) { \
3488 scene->eevee._name = IDP_Float(_idprop); \
3493#define EEVEE_GET_FLOAT_ARRAY(_props, _name, _length) \
3495 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3496 if (_idprop != nullptr) { \
3497 const float *_values = static_cast<float *>(IDP_Array(_idprop)); \
3498 for (int _i = 0; _i < _length; _i++) { \
3499 scene->eevee._name[_i] = _values[_i]; \
3504 enum { SCE_EEVEE_DOF_ENABLED = (1 << 7) };
3572 scene->layer_properties =
nullptr;
3574#undef EEVEE_GET_FLOAT_ARRAY
3575#undef EEVEE_GET_FLOAT
3577#undef EEVEE_GET_BOOL
3583 scene->display.matcap_ssao_distance = 0.2f;
3584 scene->display.matcap_ssao_attenuation = 1.0f;
3585 scene->display.matcap_ssao_samples = 16;
3601 switch (scene->toolsettings->snap_mode) {
3603 scene->toolsettings->snap_mode = (1 << 4);
3606 scene->toolsettings->snap_mode = (1 << 0);
3609 scene->toolsettings->snap_mode = (1 << 1);
3612 scene->toolsettings->snap_mode = (1 << 2);
3615 scene->toolsettings->snap_mode = (1 << 3);
3618 switch (scene->toolsettings->snap_node_mode) {
3620 scene->toolsettings->snap_node_mode = (1 << 5);
3623 scene->toolsettings->snap_node_mode = (1 << 6);
3626 scene->toolsettings->snap_node_mode =
3627 (1 << 5) | (1 << 6);
3630 scene->toolsettings->snap_node_mode = (1 << 7);
3633 switch (scene->toolsettings->snap_uv_mode) {
3635 scene->toolsettings->snap_uv_mode = (1 << 4);
3638 scene->toolsettings->snap_uv_mode = (1 << 0);
3646 part->rad_root = 1.0f;
3647 part->rad_tip = 0.0f;
3648 part->rad_scale = 0.01f;
3671 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"float",
"roughness")) {
3673 if (mat->use_nodes) {
3675 mat->roughness = mat->gloss_mir;
3678 mat->roughness = 0.25f;
3682 mat->roughness = 1.0f - mat->gloss_mir;
3684 mat->metallic = mat->ray_mirror;
3699 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"xray_alpha")) {
3711 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"matcap[256]")) {
3714 if (default_matcap) {
3727 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"wireframe_threshold")) {
3739 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"cavity_valley_factor"))
3753 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"xray_alpha_bone")) {
3768 if (!DNA_struct_member_exists(fd->
filesdna,
"Image",
"ListBase",
"renderslot")) {
3771 for (
int i = 0;
i < 8;
i++) {
3779 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceAction",
"char",
"mode_prev")) {
3814 if (sce->ed !=
nullptr && sce->ed->seqbase.first !=
nullptr) {
3819 if (!DNA_struct_member_exists(
3820 fd->
filesdna,
"View3DOverlay",
"float",
"texture_paint_mode_opacity"))
3827 V3D_SHOW_MODE_SHADE_OVERRIDE = (1 << 15),
3830 float alpha = (v3d->
flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE) ? 0.0f : 1.0f;
3840 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"background_type")) {
3853 if (!DNA_struct_member_exists(
3854 fd->
filesdna,
"RigidBodyWorld",
"RigidBodyWorld_Shared",
"*shared"))
3859 if (rbw ==
nullptr) {
3863 if (rbw->
shared ==
nullptr) {
3872 rbw->pointcache =
nullptr;
3881 if (!DNA_struct_member_exists(fd->
filesdna,
"SoftBody",
"SoftBody_Shared",
"*shared")) {
3884 if (sb ==
nullptr) {
3887 if (sb->
shared ==
nullptr) {
3895 sb->pointcache =
nullptr;
3900 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"short",
"type")) {
3917 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"View3DShading",
"shading")) {
3923 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceView3D",
"float",
"vertex_opacity")) {
3939 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"char",
"annotate_v3d_align")) {
3942 scene->toolsettings->annotate_thickness = 3;
3945 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDlayer",
"short",
"line_change")) {
3948 gpl->line_change = gpl->thickness;
3949 if ((gpl->thickness < 1) || (gpl->thickness > 10)) {
3955 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_paper_opacity"))
3968 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_grid_opacity"))
3983 if (!DNA_struct_member_exists(fd->
filesdna,
"GP_Sculpt_Settings",
"int",
"lock_axis")) {
3992 if (!DNA_struct_member_exists(fd->
filesdna,
"SubsurfModifier",
"short",
"uv_smooth")) {
4008 if (!DNA_struct_member_exists(fd->
filesdna,
"SubsurfModifier",
"short",
"quality")) {
4019 if (!DNA_struct_member_exists(fd->
filesdna,
"MultiresModifier",
"short",
"quality")) {
4036 if (!DNA_struct_member_exists(fd->
filesdna,
"ClothSimSettings",
"short",
"bending_model")) {
4048 if (clmd !=
nullptr) {
4065 if (!DNA_struct_member_exists(fd->
filesdna,
"BrushGpencilSettings",
"float",
"era_strength_f"))
4068 if (brush->gpencil_settings !=
nullptr) {
4121 if (!DNA_struct_member_exists(fd->
filesdna,
"ShrinkwrapModifierData",
"char",
"shrinkMode")) {
4126 if (smd->
shrinkOpts & MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE) {
4128 smd->
shrinkOpts &= ~MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE;
4135 if (!DNA_struct_member_exists(fd->
filesdna,
"PartDeflect",
"float",
"pdef_cfrict")) {
4138 ob->pd->pdef_cfrict = 5.0f;
4151 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"xray_alpha_wire")) {
4188 enum { V3D_OCCLUDE_WIRE = (1 << 14) };
4190 if (v3d->
flag2 & V3D_OCCLUDE_WIRE) {
4192 v3d->
flag2 &= ~V3D_OCCLUDE_WIRE;
4210 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4214 if (!region_header) {
4221 "header 2.83.1 versioning");
4235 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4238 ARegion *region_header =
nullptr;
4240 for (region_header =
static_cast<ARegion *
>(regionbase->
first);
4241 region_header !=
nullptr;
4242 region_header =
static_cast<ARegion *
>(region_header->
next))
4260 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_fade_layer")) {
4277 if (mat->gp_style) {
4286 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"overscan")) {
4288 scene->eevee.overscan = 3.0f;
4299 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"light_threshold")) {
4301 scene->eevee.light_threshold = 0.01f;
4305 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"att_dist")) {
4307 la->att_dist = la->clipend_deprecated;
4311 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"char",
"weight_brush_type")) {
4314#define PAINT_BLEND_MIX 0
4315#define PAINT_BLEND_ADD 1
4316#define PAINT_BLEND_SUB 2
4317#define PAINT_BLEND_MUL 3
4318#define PAINT_BLEND_BLUR 4
4319#define PAINT_BLEND_LIGHTEN 5
4320#define PAINT_BLEND_DARKEN 6
4321#define PAINT_BLEND_AVERAGE 7
4322#define PAINT_BLEND_SMEAR 8
4323#define PAINT_BLEND_COLORDODGE 9
4324#define PAINT_BLEND_DIFFERENCE 10
4325#define PAINT_BLEND_SCREEN 11
4326#define PAINT_BLEND_HARDLIGHT 12
4327#define PAINT_BLEND_OVERLAY 13
4328#define PAINT_BLEND_SOFTLIGHT 14
4329#define PAINT_BLEND_EXCLUSION 15
4330#define PAINT_BLEND_LUMINOSITY 16
4331#define PAINT_BLEND_SATURATION 17
4332#define PAINT_BLEND_HUE 18
4333#define PAINT_BLEND_ALPHA_SUB 19
4334#define PAINT_BLEND_ALPHA_ADD 20
4338 const char tool_init = brush->vertex_brush_type;
4339 bool is_blend =
false;
4343 switch (tool_init) {
4361 brush->vertex_brush_type = tool;
4364 if (is_blend ==
false) {
4369 switch (tool_init) {
4422 brush->blend =
blend;
4426 brush->weight_brush_type = brush->vertex_brush_type;
4429#undef PAINT_BLEND_MIX
4430#undef PAINT_BLEND_ADD
4431#undef PAINT_BLEND_SUB
4432#undef PAINT_BLEND_MUL
4433#undef PAINT_BLEND_BLUR
4434#undef PAINT_BLEND_LIGHTEN
4435#undef PAINT_BLEND_DARKEN
4436#undef PAINT_BLEND_AVERAGE
4437#undef PAINT_BLEND_SMEAR
4438#undef PAINT_BLEND_COLORDODGE
4439#undef PAINT_BLEND_DIFFERENCE
4440#undef PAINT_BLEND_SCREEN
4441#undef PAINT_BLEND_HARDLIGHT
4442#undef PAINT_BLEND_OVERLAY
4443#undef PAINT_BLEND_SOFTLIGHT
4444#undef PAINT_BLEND_EXCLUSION
4445#undef PAINT_BLEND_LUMINOSITY
4446#undef PAINT_BLEND_SATURATION
4447#undef PAINT_BLEND_HUE
4448#undef PAINT_BLEND_ALPHA_SUB
4449#undef PAINT_BLEND_ALPHA_ADD
4461 if (!navigation_region) {
4463 ListBase *regionbase = (slink == area->spacedata.first) ? &area->regionbase :
4481 if (!DNA_struct_member_exists(
4482 fd->
filesdna,
"View3DShading",
"float",
"curvature_ridge_factor"))
4499 if (
STREQ(scene->r.engine,
"BLENDER_OPENGL")) {
4505 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDlayer",
"int",
"gstep")) {
4515 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"lookdev_light[256]")) {
4529 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"float",
"shadow_focus")) {
4531 float *dir = scene->display.light_direction;
4532 std::swap(dir[2], dir[1]);
4541 ca->drawsize *= 2.0f;
4545 if (!DNA_struct_member_exists(
4546 fd->
filesdna,
"GP_Sculpt_Settings",
"CurveMapping",
"cur_primitive"))
4563 if (DNA_struct_member_exists(fd->
filesdna,
"Object",
"char",
"empty_image_visibility_flag")) {
4574 switch (sl->spacetype) {
4636 if (scene->toolsettings->sculpt) {
4660 ob->shapeflag &= ~OB_SHAPE_FLAG_UNUSED_1;
4669 mat->blend_flag &= ~(1 << 2);
4674 if (!DNA_struct_member_exists(
4675 fd->
filesdna,
"ToolSettings",
"char",
"snap_transform_mode_flag"))
4685 switch (sl->spacetype) {
4687 enum { V3D_BACKFACE_CULLING = (1 << 10) };
4689 if (v3d->
flag2 & V3D_BACKFACE_CULLING) {
4690 v3d->
flag2 &= ~V3D_BACKFACE_CULLING;
4700 if (!DNA_struct_exists(fd->
filesdna,
"TransformOrientationSlot")) {
4702 for (
int i = 0;
i <
ARRAY_SIZE(scene->orientation_slots);
i++) {
4703 scene->orientation_slots[
i].index_custom = -1;
4709 if (!DNA_struct_member_exists(fd->
filesdna,
"GP_Sculpt_Settings",
"float",
"isect_threshold"))
4719 ca->gpu_dof.ratio = std::max(ca->gpu_dof.ratio, 0.01f);
4728 if (!execute_region) {
4729 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4755 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"float",
"a")) {
4767 if (scene->r.alphamode == R_ALPHAKEY) {
4772 if (ts->
sculpt !=
nullptr) {
4780 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"wire_color_type")) {
4793 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DCursor",
"short",
"rotation_mode")) {
4795 if (
is_zero_v3(scene->cursor.rotation_axis)) {
4797 scene->cursor.rotation_quaternion[0] = 1.0f;
4798 scene->cursor.rotation_axis[1] = 1.0f;
4814 enum { PARCURVE = 1, PARKEY = 2, PAR_DEPRECATED = 16 };
4815 if (
ELEM(ob->partype, PARCURVE, PARKEY, PAR_DEPRECATED)) {
4821 enum { OB_WAVE = 21, OB_LIFE = 23, OB_SECTOR = 24 };
4822 if (
ELEM(ob->type, OB_WAVE, OB_LIFE, OB_SECTOR)) {
4847 if (scene->r.im_format.view_settings.look[0] ==
'\0') {
4850 &scene->r.im_format.view_settings, &scene->r.im_format.display_settings,
"Filmic");
4853 if (scene->r.bake.im_format.view_settings.look[0] ==
'\0') {
4856 &scene->r.bake.im_format.display_settings,
4882 if (!DNA_struct_member_exists(fd->
filesdna,
"TriangulateModifierData",
"int",
"min_vertices"))
4898 if (
STREQ(node->idname,
"ShaderNodeOutputLamp")) {
4899 STRNCPY(node->idname,
"ShaderNodeOutputLight");
4913 if (!mat->use_nodes || !mat->nodetree || mat->blend_method ==
MA_BM_SOLID) {
4934 bool is_first_subdiv =
true;
4938 if (is_first_subdiv) {
4944 is_first_subdiv =
false;
4948 if (is_first_subdiv) {
4954 is_first_subdiv =
false;
4965 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5016 if (!DNA_struct_member_exists(fd->
filesdna,
"BrushGpencilSettings",
"float",
"hardness")) {
5018 if (brush->gpencil_settings !=
nullptr) {
5027 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDstroke",
"float",
"hardness")) {
5032 gps->hardness = 1.0f;
5058 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5075 if (region !=
nullptr) {
5085 if (!DNA_struct_member_exists(fd->
filesdna,
"bSplineIKConstraint",
"short",
"yScaleMode")) {
5092 if ((
data->flag & CONSTRAINT_SPLINEIK_SCALE_LIMITED) == 0) {
5102 if (!DNA_struct_member_exists(
5103 fd->
filesdna,
"View3DOverlay",
"float",
"sculpt_mode_mask_opacity"))
5116 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"char",
"render_aa")) {
5124 if (!DNA_struct_member_exists(fd->
filesdna,
"bPoseChannel",
"float",
"scale_out_z")) {
5133 pchan->scale_in_z = pchan->scale_in_x;
5134 pchan->scale_out_z = pchan->scale_out_x;
5154 if (sce->ed !=
nullptr) {
5162 if (!DNA_struct_member_exists(fd->
filesdna,
"bSizeLikeConstraint",
"float",
"power")) {
5177 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5190 if (region !=
nullptr) {
5220 cscene,
"film_transparent",
false);
5233 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"sun_angle")) {
5235 light->sun_angle = 2.0f *
atanf(light->area_size);
5243 enum { IMA_IGNORE_ALPHA = (1 << 12) };
5244 if (image->flag & IMA_IGNORE_ALPHA) {
5246 image->flag &= ~IMA_IGNORE_ALPHA;
5258 view_settings = &scene->view_settings;
5270 if (
STREQ(view_settings->
look,
"Filmic - Base Contrast")) {
5278 if (scene->ed !=
nullptr) {
5286 if (scene->master_collection !=
nullptr) {
5299 case FFM_PRESET_ULTRAFAST:
5300 case FFM_PRESET_SUPERFAST:
5303 case FFM_PRESET_VERYFAST:
5304 case FFM_PRESET_FASTER:
5305 case FFM_PRESET_FAST:
5306 case FFM_PRESET_MEDIUM:
5309 case FFM_PRESET_SLOW:
5310 case FFM_PRESET_SLOWER:
5311 case FFM_PRESET_VERYSLOW:
5342 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5359 if (mesh->remesh_voxel_size == 0.0f) {
5360 mesh->remesh_voxel_size = 0.1f;
5387 if (br->ob_mode &
OB_MODE_SCULPT && br->normal_radius_factor == 0.0f) {
5388 br->normal_radius_factor = 0.5f;
5395 if (scene->master_collection !=
nullptr) {
5414 if (studio_light !=
nullptr) {
5429 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5445 if (region_toolprops &&
5465 if (!DNA_struct_member_exists(fd->
filesdna,
"Bone",
"char",
"inherit_scale_mode")) {
5472 if (!DNA_struct_member_exists(fd->
filesdna,
"bRotateLikeConstraint",
"char",
"mix_mode")) {
5484 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"studiolight_intensity"))
5500 if (br->ob_mode &
OB_MODE_SCULPT && br->elastic_deform_volume_preservation == 0.0f) {
5501 br->elastic_deform_volume_preservation = 0.5f;
5527 constexpr char SCE_SNAP_TO_NODE_X = (1 << 1);
5528 if (scene->toolsettings->snap_node_mode == SCE_SNAP_TO_NODE_X) {
5533 if (!DNA_struct_member_exists(
5534 fd->
filesdna,
"LayerCollection",
"short",
"local_collections_bits"))
5553 if (sl != sl_other && sl_other->spacetype ==
SPACE_VIEW3D) {
5564 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5582 "versioning file tools region");
5592 if (br->ob_mode &
OB_MODE_SCULPT && br->area_radius_factor == 0.0f) {
5593 br->area_radius_factor = 0.5f;
5608 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"CurveProfile",
"custom_profile"))
5619 if (!DNA_struct_member_exists(fd->
filesdna,
"BevelModifier",
"CurveProfile",
"custom_profile"))
5634 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"dash_ratio")) {
5636 br->dash_ratio = 1.0f;
5637 br->dash_samples = 20;
5642 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"pose_smooth_iterations")) {
5644 br->pose_smooth_iterations = 4;
5669 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"int",
"render_pass")) {
5690 switch (sl->spacetype) {
5721 view_settings = &scene->view_settings;
5723 char *src = view_settings->
look + strlen(
"Filmic - ");
5724 memmove(view_settings->
look, src, strlen(src) + 1);
5727 char *src = view_settings->
look + strlen(
"Standard - ");
5728 memmove(view_settings->
look, src, strlen(src) + 1);
5751 if (!DNA_struct_member_exists(fd->
filesdna,
"Image",
"ListBase",
"tiles")) {
5754 tile->tile_number = 1001;
5760 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceImage",
"int",
"tile_grid_shape[2]")) {
5775 br->add_col[3] = 0.9f;
5776 br->sub_col[3] = 0.9f;
5781 if (br->pose_ik_segments == 0) {
5782 br->pose_ik_segments = 1;
5794 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"tip_roundness")) {
5798 br->tip_roundness = 0.18f;
5815 if (!DNA_struct_member_exists(fd->
filesdna,
"UVWarpModifierData",
"float",
"scale[2]")) {
5827 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"studiolight_blur")) {
5843 if (!DNA_struct_member_exists(
5844 fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_vertex_paint_opacity"))
5861 if (!DNA_struct_member_exists(fd->
filesdna,
"ArrayGpencilModifierData",
"int",
"seed")) {
5865 if (brush->gpencil_settings !=
nullptr) {
5866 brush->gpencil_vertex_brush_type = brush->gpencil_settings->brush_type;
5867 brush->gpencil_sculpt_brush_type = brush->gpencil_settings->brush_type;
5868 brush->gpencil_weight_brush_type = brush->gpencil_settings->brush_type;
5875 if (gp_style ==
nullptr) {
5895 gp_style->
fill_rgba[3] *= gp_style->texture_opacity;
5961 if ((mmd->
offset[0] != 0.0f) || (mmd->
offset[1] != 0.0f) || (mmd->
offset[2] != 0.0f))
5965 if ((mmd->
shift[0] != 0.0f) || (mmd->
shift[1] != 0.0f) || (mmd->
shift[2] != 0.0f)) {
5968 if (mmd->
object !=
nullptr) {
5975 float factor = mmd->
factor / 25.0f;
6033 if (!DNA_struct_member_exists(
6034 fd->
filesdna,
"ThickGpencilModifierData",
"float",
"thickness_fac"))
6047 const short simple = (1 << 0);
6049 if (mmd->
flag & simple) {
6050 mmd->
flag &= ~simple;
6071 gpd->zdepth_offset = 0.150f;
6076 gpl->vertex_paint_opacity = 1.0f;
6081 gps->fill_opacity_fac = 1.0f;
6089 for (
i = 0, pt = gps->points;
i < gps->totpoints;
i++, pt++) {
6100 if (!DNA_struct_member_exists(
6101 fd->
filesdna,
"View3DOverlay",
"float",
"sculpt_mode_face_sets_opacity"))
6125 if (!DNA_struct_member_exists(
6126 fd->
filesdna,
"Brush",
"int",
"automasking_boundary_edges_propagation_steps"))
6129 br->automasking_boundary_edges_propagation_steps = 1;
6134 if (!DNA_struct_member_exists(fd->
filesdna,
"CorrectiveSmoothModifierData",
"float",
"scale"))
6148 if (me->faces_num > 0) {
6149 const int *face_sets =
static_cast<const int *
>(
6152 me->face_sets_color_default =
abs(face_sets[0]);
6159 if (!DNA_struct_member_exists(fd->
filesdna,
"OceanModifierData",
"float",
"fetch_jonswap")) {
6170 if (!DNA_struct_exists(fd->
filesdna,
"XrSessionSettings")) {
6174 wm->xr.session_settings.shading = v3d_default->
shading;
6177 wm->xr.session_settings.clip_start = v3d_default->
clip_start;
6178 wm->xr.session_settings.clip_end = v3d_default->
clip_end;
6185 if (!DNA_struct_member_exists(fd->
filesdna,
"SurfaceDeformModifierData",
"float",
"strength"))
6212 if (!DNA_struct_member_exists(fd->
filesdna,
"RemeshModifierData",
"float",
"voxel_size")) {
6227 if (!DNA_struct_member_exists(
6228 fd->
filesdna,
"SolidifyModifierData",
"float",
"merge_tolerance"))
6245 if (rbc !=
nullptr) {
6247 INVALID_RBC_TYPE_SLIDER = 2,
6248 INVALID_RBC_TYPE_6DOF_SPRING = 4,
6249 INVALID_RBC_TYPE_MOTOR = 7,
6251 switch (rbc->
type) {
6252 case INVALID_RBC_TYPE_SLIDER:
6255 case INVALID_RBC_TYPE_6DOF_SPRING:
6258 case INVALID_RBC_TYPE_MOTOR:
6272 if (fmd->
domain !=
nullptr) {
6283 scene->grease_pencil_settings.smaa_threshold = 1.0f;
6291 if (br->cloth_mass == 0.0f) {
6292 br->cloth_mass = 1.0f;
6299 if (brush->gpencil_settings) {
6300 brush->rgb[0] = 0.498f;
6301 brush->rgb[1] = 1.0f;
6302 brush->rgb[2] = 0.498f;
6310 if (!DNA_struct_member_exists(fd->
filesdna,
"PartDeflect",
"float",
"f_wind_factor")) {
6313 ob->pd->f_wind_factor = 1.0f;
6318 part->pd->f_wind_factor = 1.0f;
6321 part->pd2->f_wind_factor = 1.0f;