3046 scene->r.gauss = 1.5f;
3051 if (!DNA_struct_member_exists(fd->
filesdna,
"GPUDOFSettings",
"float",
"ratio")) {
3053 ca->gpu_dof.ratio = 1.0f;
3058 if (DNA_struct_exists(fd->
filesdna,
"MTexPoly")) {
3072 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"cascade_max_dist")) {
3074 la->cascade_max_dist = 1000.0f;
3075 la->cascade_count = 4;
3076 la->cascade_exponent = 0.8f;
3077 la->cascade_fade = 0.1f;
3081 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"float",
"vis_bias")) {
3083 probe->vis_bias = 1.0f;
3084 probe->vis_blur = 0.2f;
3098 if (node->type_legacy == 194 &&
3099 STREQ(node->idname,
"ShaderNodeOutputMetallic"))
3106 STREQ(node->idname,
"ShaderNodeOutputSpecular"))
3112 else if (node->type_legacy == 196 &&
3113 STREQ(node->idname,
"ShaderNodeOutputEeveeMaterial"))
3116 STRNCPY_UTF8(node->idname,
"ShaderNodeOutputMaterial");
3119 else if (node->type_legacy == 194 &&
3120 STREQ(node->idname,
"ShaderNodeEeveeMetallic"))
3123 STRNCPY_UTF8(node->idname,
"ShaderNodeBsdfPrincipled");
3137 "Eevee material conversion problem. Error in console");
3139 "You need to connect Principled and Eevee Specular shader nodes to new material "
3149 "Eevee material conversion problem. Error in console");
3151 "You need to combine transparency and emission shaders to the converted Principled "
3157 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPdata",
"float",
"line_color[4]")) {
3164 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPdata",
"float",
"pixfactor")) {
3171 if (!DNA_struct_member_exists(
3172 fd->
filesdna,
"GP_Sculpt_Settings",
"CurveMapping",
"cur_falloff"))
3205 win->screen =
nullptr;
3212 if (!DNA_struct_member_exists(
3213 fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_paper_color[3]"))
3230 if (DNA_struct_member_exists(fd->
filesdna,
"SpaceOutliner",
"int",
"filter") ==
false) {
3253 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"float",
"intensity")) {
3255 probe->intensity = 1.0f;
3292 if (
STR_ELEM(scene->r.engine,
"BLENDER_RENDER",
"BLENDER_GAME")) {
3299 if (
ELEM(tex->type, 10, 14, 15, 16)) {
3310 int win_width = 0, win_height = 0;
3312 win_width = std::max<int>(win_width, vert->vec.x);
3313 win_height = std::max<int>(win_height, vert->vec.y);
3316 for (
ScrArea *area =
static_cast<ScrArea *
>(screen->areabase.first), *area_next; area;
3319 area_next =
static_cast<ScrArea *
>(area->next);
3322 if ((area->v2->vec.y == win_height) && (area->v1->vec.x == 0) &&
3323 (area->v4->vec.x == win_width))
3344 if (la->mode & (1 << 13)) {
3346 la->mode &= ~(1 << 13);
3357 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3361 region = region_next)
3363 region_next =
static_cast<ARegion *
>(region->next);
3378 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"spec_fac")) {
3380 la->spec_fac = 1.0f;
3404 if (!DNA_struct_member_exists(fd->
filesdna,
"Scene",
"SceneDisplay",
"display")) {
3411 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"float",
"shadow_shift")) {
3413 scene->display.shadow_shift = 0.1;
3417 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"char",
"transform_pivot_point")) {
3423 if (!DNA_struct_exists(fd->
filesdna,
"SceneEEVEE")) {
3427 scene->eevee.gi_diffuse_bounces = 3;
3428 scene->eevee.gi_cubemap_resolution = 512;
3429 scene->eevee.gi_visibility_resolution = 32;
3431 scene->eevee.taa_samples = 16;
3432 scene->eevee.taa_render_samples = 64;
3434 scene->eevee.volumetric_start = 0.1f;
3435 scene->eevee.volumetric_end = 100.0f;
3436 scene->eevee.volumetric_tile_size = 8;
3437 scene->eevee.volumetric_samples = 64;
3438 scene->eevee.volumetric_sample_distribution = 0.8f;
3439 scene->eevee.volumetric_light_clamp = 0.0f;
3440 scene->eevee.volumetric_shadow_samples = 16;
3442 scene->eevee.gtao_distance = 0.2f;
3443 scene->eevee.fast_gi_quality = 0.25f;
3445 scene->eevee.bokeh_max_size = 100.0f;
3446 scene->eevee.bokeh_threshold = 1.0f;
3448 scene->eevee.motion_blur_samples = 8;
3449 scene->eevee.motion_blur_shutter_deprecated = 0.5f;
3451 scene->eevee.shadow_cube_size_deprecated = 512;
3456 if (scene->layer_properties ==
nullptr) {
3461#define EEVEE_GET_BOOL(_props, _name, _flag) \
3463 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3464 if (_idprop != nullptr) { \
3465 const int _value = IDP_int_get(_idprop); \
3467 scene->eevee.flag |= _flag; \
3470 scene->eevee.flag &= ~_flag; \
3476#define EEVEE_GET_INT(_props, _name) \
3478 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3479 if (_idprop != nullptr) { \
3480 scene->eevee._name = IDP_int_get(_idprop); \
3485#define EEVEE_GET_FLOAT(_props, _name) \
3487 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3488 if (_idprop != nullptr) { \
3489 scene->eevee._name = IDP_float_get(_idprop); \
3494#define EEVEE_GET_FLOAT_ARRAY(_props, _name, _length) \
3496 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3497 if (_idprop != nullptr) { \
3498 const float *_values = static_cast<float *>(IDP_Array(_idprop)); \
3499 for (int _i = 0; _i < _length; _i++) { \
3500 scene->eevee._name[_i] = _values[_i]; \
3505 enum { SCE_EEVEE_DOF_ENABLED = (1 << 7) };
3573 scene->layer_properties =
nullptr;
3575#undef EEVEE_GET_FLOAT_ARRAY
3576#undef EEVEE_GET_FLOAT
3578#undef EEVEE_GET_BOOL
3584 scene->display.matcap_ssao_distance = 0.2f;
3585 scene->display.matcap_ssao_attenuation = 1.0f;
3586 scene->display.matcap_ssao_samples = 16;
3602 switch (scene->toolsettings->snap_mode) {
3604 scene->toolsettings->snap_mode = (1 << 4);
3607 scene->toolsettings->snap_mode = (1 << 0);
3610 scene->toolsettings->snap_mode = (1 << 1);
3613 scene->toolsettings->snap_mode = (1 << 2);
3616 scene->toolsettings->snap_mode = (1 << 3);
3619 switch (scene->toolsettings->snap_node_mode) {
3621 scene->toolsettings->snap_node_mode = (1 << 5);
3624 scene->toolsettings->snap_node_mode = (1 << 6);
3627 scene->toolsettings->snap_node_mode =
3628 (1 << 5) | (1 << 6);
3631 scene->toolsettings->snap_node_mode = (1 << 7);
3634 switch (scene->toolsettings->snap_uv_mode) {
3636 scene->toolsettings->snap_uv_mode = (1 << 4);
3639 scene->toolsettings->snap_uv_mode = (1 << 0);
3647 part->rad_root = 1.0f;
3648 part->rad_tip = 0.0f;
3649 part->rad_scale = 0.01f;
3672 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"float",
"roughness")) {
3674 if (mat->use_nodes) {
3676 mat->roughness = mat->gloss_mir;
3679 mat->roughness = 0.25f;
3683 mat->roughness = 1.0f - mat->gloss_mir;
3685 mat->metallic = mat->ray_mirror;
3700 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"xray_alpha")) {
3712 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"matcap[256]")) {
3715 if (default_matcap) {
3728 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"wireframe_threshold")) {
3740 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"cavity_valley_factor"))
3754 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"xray_alpha_bone")) {
3769 if (!DNA_struct_member_exists(fd->
filesdna,
"Image",
"ListBase",
"renderslot")) {
3772 for (
int i = 0;
i < 8;
i++) {
3780 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceAction",
"char",
"mode_prev")) {
3788 if ((saction->
mode_prev == 0) && (saction->action ==
nullptr)) {
3815 if (sce->ed !=
nullptr && sce->ed->seqbase.first !=
nullptr) {
3820 if (!DNA_struct_member_exists(
3821 fd->
filesdna,
"View3DOverlay",
"float",
"texture_paint_mode_opacity"))
3828 V3D_SHOW_MODE_SHADE_OVERRIDE = (1 << 15),
3831 float alpha = (v3d->
flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE) ? 0.0f : 1.0f;
3841 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"background_type")) {
3854 if (!DNA_struct_member_exists(
3855 fd->
filesdna,
"RigidBodyWorld",
"RigidBodyWorld_Shared",
"*shared"))
3860 if (rbw ==
nullptr) {
3864 if (rbw->
shared ==
nullptr) {
3873 rbw->pointcache =
nullptr;
3882 if (!DNA_struct_member_exists(fd->
filesdna,
"SoftBody",
"SoftBody_Shared",
"*shared")) {
3885 if (sb ==
nullptr) {
3888 if (sb->
shared ==
nullptr) {
3896 sb->pointcache =
nullptr;
3901 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"short",
"type")) {
3918 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"View3DShading",
"shading")) {
3924 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceView3D",
"float",
"vertex_opacity")) {
3940 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"char",
"annotate_v3d_align")) {
3943 scene->toolsettings->annotate_thickness = 3;
3946 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDlayer",
"short",
"line_change")) {
3949 gpl->line_change = gpl->thickness;
3950 if ((gpl->thickness < 1) || (gpl->thickness > 10)) {
3956 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_paper_opacity"))
3969 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_grid_opacity"))
3984 if (!DNA_struct_member_exists(fd->
filesdna,
"GP_Sculpt_Settings",
"int",
"lock_axis")) {
3993 if (!DNA_struct_member_exists(fd->
filesdna,
"SubsurfModifier",
"short",
"uv_smooth")) {
4009 if (!DNA_struct_member_exists(fd->
filesdna,
"SubsurfModifier",
"short",
"quality")) {
4020 if (!DNA_struct_member_exists(fd->
filesdna,
"MultiresModifier",
"short",
"quality")) {
4037 if (!DNA_struct_member_exists(fd->
filesdna,
"ClothSimSettings",
"short",
"bending_model")) {
4049 if (clmd !=
nullptr) {
4066 if (!DNA_struct_member_exists(fd->
filesdna,
"BrushGpencilSettings",
"float",
"era_strength_f"))
4069 if (brush->gpencil_settings !=
nullptr) {
4122 if (!DNA_struct_member_exists(fd->
filesdna,
"ShrinkwrapModifierData",
"char",
"shrinkMode")) {
4127 if (smd->
shrinkOpts & MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE) {
4129 smd->
shrinkOpts &= ~MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE;
4136 if (!DNA_struct_member_exists(fd->
filesdna,
"PartDeflect",
"float",
"pdef_cfrict")) {
4139 ob->pd->pdef_cfrict = 5.0f;
4152 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"xray_alpha_wire")) {
4189 enum { V3D_OCCLUDE_WIRE = (1 << 14) };
4191 if (v3d->
flag2 & V3D_OCCLUDE_WIRE) {
4193 v3d->
flag2 &= ~V3D_OCCLUDE_WIRE;
4211 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4215 if (!region_header) {
4222 "header 2.83.1 versioning");
4236 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4239 ARegion *region_header =
nullptr;
4241 for (region_header =
static_cast<ARegion *
>(regionbase->
first);
4242 region_header !=
nullptr;
4243 region_header =
static_cast<ARegion *
>(region_header->
next))
4261 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_fade_layer")) {
4278 if (mat->gp_style) {
4287 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"overscan")) {
4289 scene->eevee.overscan = 3.0f;
4300 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"light_threshold")) {
4302 scene->eevee.light_threshold = 0.01f;
4306 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"att_dist")) {
4308 la->att_dist = la->clipend_deprecated;
4312 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"char",
"weight_brush_type")) {
4315#define PAINT_BLEND_MIX 0
4316#define PAINT_BLEND_ADD 1
4317#define PAINT_BLEND_SUB 2
4318#define PAINT_BLEND_MUL 3
4319#define PAINT_BLEND_BLUR 4
4320#define PAINT_BLEND_LIGHTEN 5
4321#define PAINT_BLEND_DARKEN 6
4322#define PAINT_BLEND_AVERAGE 7
4323#define PAINT_BLEND_SMEAR 8
4324#define PAINT_BLEND_COLORDODGE 9
4325#define PAINT_BLEND_DIFFERENCE 10
4326#define PAINT_BLEND_SCREEN 11
4327#define PAINT_BLEND_HARDLIGHT 12
4328#define PAINT_BLEND_OVERLAY 13
4329#define PAINT_BLEND_SOFTLIGHT 14
4330#define PAINT_BLEND_EXCLUSION 15
4331#define PAINT_BLEND_LUMINOSITY 16
4332#define PAINT_BLEND_SATURATION 17
4333#define PAINT_BLEND_HUE 18
4334#define PAINT_BLEND_ALPHA_SUB 19
4335#define PAINT_BLEND_ALPHA_ADD 20
4339 const char tool_init = brush->vertex_brush_type;
4340 bool is_blend =
false;
4344 switch (tool_init) {
4362 brush->vertex_brush_type = tool;
4365 if (is_blend ==
false) {
4370 switch (tool_init) {
4423 brush->blend =
blend;
4427 brush->weight_brush_type = brush->vertex_brush_type;
4430#undef PAINT_BLEND_MIX
4431#undef PAINT_BLEND_ADD
4432#undef PAINT_BLEND_SUB
4433#undef PAINT_BLEND_MUL
4434#undef PAINT_BLEND_BLUR
4435#undef PAINT_BLEND_LIGHTEN
4436#undef PAINT_BLEND_DARKEN
4437#undef PAINT_BLEND_AVERAGE
4438#undef PAINT_BLEND_SMEAR
4439#undef PAINT_BLEND_COLORDODGE
4440#undef PAINT_BLEND_DIFFERENCE
4441#undef PAINT_BLEND_SCREEN
4442#undef PAINT_BLEND_HARDLIGHT
4443#undef PAINT_BLEND_OVERLAY
4444#undef PAINT_BLEND_SOFTLIGHT
4445#undef PAINT_BLEND_EXCLUSION
4446#undef PAINT_BLEND_LUMINOSITY
4447#undef PAINT_BLEND_SATURATION
4448#undef PAINT_BLEND_HUE
4449#undef PAINT_BLEND_ALPHA_SUB
4450#undef PAINT_BLEND_ALPHA_ADD
4462 if (!navigation_region) {
4464 ListBase *regionbase = (slink == area->spacedata.first) ? &area->regionbase :
4482 if (!DNA_struct_member_exists(
4483 fd->
filesdna,
"View3DShading",
"float",
"curvature_ridge_factor"))
4500 if (
STREQ(scene->r.engine,
"BLENDER_OPENGL")) {
4506 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDlayer",
"int",
"gstep")) {
4516 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"lookdev_light[256]")) {
4530 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"float",
"shadow_focus")) {
4532 float *dir = scene->display.light_direction;
4533 std::swap(dir[2], dir[1]);
4542 ca->drawsize *= 2.0f;
4546 if (!DNA_struct_member_exists(
4547 fd->
filesdna,
"GP_Sculpt_Settings",
"CurveMapping",
"cur_primitive"))
4564 if (DNA_struct_member_exists(fd->
filesdna,
"Object",
"char",
"empty_image_visibility_flag")) {
4575 switch (sl->spacetype) {
4637 if (scene->toolsettings->sculpt) {
4661 ob->shapeflag &= ~OB_SHAPE_FLAG_UNUSED_1;
4671 mat->blend_flag &= ~(1 << 2);
4676 if (!DNA_struct_member_exists(
4677 fd->
filesdna,
"ToolSettings",
"char",
"snap_transform_mode_flag"))
4687 switch (sl->spacetype) {
4689 enum { V3D_BACKFACE_CULLING = (1 << 10) };
4691 if (v3d->
flag2 & V3D_BACKFACE_CULLING) {
4692 v3d->
flag2 &= ~V3D_BACKFACE_CULLING;
4702 if (!DNA_struct_exists(fd->
filesdna,
"TransformOrientationSlot")) {
4704 for (
int i = 0;
i <
ARRAY_SIZE(scene->orientation_slots);
i++) {
4705 scene->orientation_slots[
i].index_custom = -1;
4711 if (!DNA_struct_member_exists(fd->
filesdna,
"GP_Sculpt_Settings",
"float",
"isect_threshold"))
4721 ca->gpu_dof.ratio = std::max(ca->gpu_dof.ratio, 0.01f);
4730 if (!execute_region) {
4731 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4757 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"float",
"a")) {
4769 if (scene->r.alphamode == R_ALPHAKEY) {
4774 if (ts->
sculpt !=
nullptr) {
4782 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"wire_color_type")) {
4795 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DCursor",
"short",
"rotation_mode")) {
4797 if (
is_zero_v3(scene->cursor.rotation_axis)) {
4799 scene->cursor.rotation_quaternion[0] = 1.0f;
4800 scene->cursor.rotation_axis[1] = 1.0f;
4816 enum { PARCURVE = 1, PARKEY = 2, PAR_DEPRECATED = 16 };
4817 if (
ELEM(ob->partype, PARCURVE, PARKEY, PAR_DEPRECATED)) {
4823 enum { OB_WAVE = 21, OB_LIFE = 23, OB_SECTOR = 24 };
4824 if (
ELEM(ob->type, OB_WAVE, OB_LIFE, OB_SECTOR)) {
4849 if (scene->r.im_format.view_settings.look[0] ==
'\0') {
4852 &scene->r.im_format.view_settings, &scene->r.im_format.display_settings,
"Filmic");
4855 if (scene->r.bake.im_format.view_settings.look[0] ==
'\0') {
4858 &scene->r.bake.im_format.display_settings,
4884 if (!DNA_struct_member_exists(fd->
filesdna,
"TriangulateModifierData",
"int",
"min_vertices"))
4900 if (
STREQ(node->idname,
"ShaderNodeOutputLamp")) {
4915 if (!mat->use_nodes || !mat->nodetree || mat->blend_method ==
MA_BM_SOLID) {
4936 bool is_first_subdiv =
true;
4940 if (is_first_subdiv) {
4946 is_first_subdiv =
false;
4950 if (is_first_subdiv) {
4956 is_first_subdiv =
false;
4967 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5018 if (!DNA_struct_member_exists(fd->
filesdna,
"BrushGpencilSettings",
"float",
"hardness")) {
5020 if (brush->gpencil_settings !=
nullptr) {
5029 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDstroke",
"float",
"hardness")) {
5034 gps->hardness = 1.0f;
5060 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5077 if (region !=
nullptr) {
5087 if (!DNA_struct_member_exists(fd->
filesdna,
"bSplineIKConstraint",
"short",
"yScaleMode")) {
5094 if ((
data->flag & CONSTRAINT_SPLINEIK_SCALE_LIMITED) == 0) {
5104 if (!DNA_struct_member_exists(
5105 fd->
filesdna,
"View3DOverlay",
"float",
"sculpt_mode_mask_opacity"))
5118 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"char",
"render_aa")) {
5126 if (!DNA_struct_member_exists(fd->
filesdna,
"bPoseChannel",
"float",
"scale_out_z")) {
5135 pchan->scale_in_z = pchan->scale_in_x;
5136 pchan->scale_out_z = pchan->scale_out_x;
5156 if (sce->ed !=
nullptr) {
5164 if (!DNA_struct_member_exists(fd->
filesdna,
"bSizeLikeConstraint",
"float",
"power")) {
5179 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5192 if (region !=
nullptr) {
5222 cscene,
"film_transparent",
false);
5235 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"sun_angle")) {
5237 light->sun_angle = 2.0f *
atanf(light->area_size);
5245 enum { IMA_IGNORE_ALPHA = (1 << 12) };
5246 if (image->flag & IMA_IGNORE_ALPHA) {
5248 image->flag &= ~IMA_IGNORE_ALPHA;
5260 view_settings = &scene->view_settings;
5272 if (
STREQ(view_settings->
look,
"Filmic - Base Contrast")) {
5280 if (scene->ed !=
nullptr) {
5288 if (scene->master_collection !=
nullptr) {
5301 case FFM_PRESET_ULTRAFAST:
5302 case FFM_PRESET_SUPERFAST:
5305 case FFM_PRESET_VERYFAST:
5306 case FFM_PRESET_FASTER:
5307 case FFM_PRESET_FAST:
5308 case FFM_PRESET_MEDIUM:
5311 case FFM_PRESET_SLOW:
5312 case FFM_PRESET_SLOWER:
5313 case FFM_PRESET_VERYSLOW:
5344 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5361 if (mesh->remesh_voxel_size == 0.0f) {
5362 mesh->remesh_voxel_size = 0.1f;
5389 if (br->ob_mode &
OB_MODE_SCULPT && br->normal_radius_factor == 0.0f) {
5390 br->normal_radius_factor = 0.5f;
5397 if (scene->master_collection !=
nullptr) {
5416 if (studio_light !=
nullptr) {
5431 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5447 if (region_toolprops &&
5467 if (!DNA_struct_member_exists(fd->
filesdna,
"Bone",
"char",
"inherit_scale_mode")) {
5474 if (!DNA_struct_member_exists(fd->
filesdna,
"bRotateLikeConstraint",
"char",
"mix_mode")) {
5486 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"studiolight_intensity"))
5502 if (br->ob_mode &
OB_MODE_SCULPT && br->elastic_deform_volume_preservation == 0.0f) {
5503 br->elastic_deform_volume_preservation = 0.5f;
5529 constexpr char SCE_SNAP_TO_NODE_X = (1 << 1);
5530 if (scene->toolsettings->snap_node_mode == SCE_SNAP_TO_NODE_X) {
5535 if (!DNA_struct_member_exists(
5536 fd->
filesdna,
"LayerCollection",
"short",
"local_collections_bits"))
5555 if (sl != sl_other && sl_other->spacetype ==
SPACE_VIEW3D) {
5566 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5584 "versioning file tools region");
5594 if (br->ob_mode &
OB_MODE_SCULPT && br->area_radius_factor == 0.0f) {
5595 br->area_radius_factor = 0.5f;
5610 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"CurveProfile",
"custom_profile"))
5621 if (!DNA_struct_member_exists(fd->
filesdna,
"BevelModifier",
"CurveProfile",
"custom_profile"))
5636 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"dash_ratio")) {
5638 br->dash_ratio = 1.0f;
5639 br->dash_samples = 20;
5644 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"pose_smooth_iterations")) {
5646 br->pose_smooth_iterations = 4;
5671 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"int",
"render_pass")) {
5692 switch (sl->spacetype) {
5723 view_settings = &scene->view_settings;
5725 char *src = view_settings->
look + strlen(
"Filmic - ");
5726 memmove(view_settings->
look, src, strlen(src) + 1);
5729 char *src = view_settings->
look + strlen(
"Standard - ");
5730 memmove(view_settings->
look, src, strlen(src) + 1);
5753 if (!DNA_struct_member_exists(fd->
filesdna,
"Image",
"ListBase",
"tiles")) {
5756 tile->tile_number = 1001;
5762 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceImage",
"int",
"tile_grid_shape[2]")) {
5777 br->add_col[3] = 0.9f;
5778 br->sub_col[3] = 0.9f;
5783 if (br->pose_ik_segments == 0) {
5784 br->pose_ik_segments = 1;
5796 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"tip_roundness")) {
5800 br->tip_roundness = 0.18f;
5817 if (!DNA_struct_member_exists(fd->
filesdna,
"UVWarpModifierData",
"float",
"scale[2]")) {
5829 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"studiolight_blur")) {
5845 if (!DNA_struct_member_exists(
5846 fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_vertex_paint_opacity"))
5863 if (!DNA_struct_member_exists(fd->
filesdna,
"ArrayGpencilModifierData",
"int",
"seed")) {
5867 if (brush->gpencil_settings !=
nullptr) {
5868 brush->gpencil_vertex_brush_type = brush->gpencil_settings->brush_type;
5869 brush->gpencil_sculpt_brush_type = brush->gpencil_settings->brush_type;
5870 brush->gpencil_weight_brush_type = brush->gpencil_settings->brush_type;
5877 if (gp_style ==
nullptr) {
5897 gp_style->
fill_rgba[3] *= gp_style->texture_opacity;
5963 if ((mmd->
offset[0] != 0.0f) || (mmd->
offset[1] != 0.0f) || (mmd->
offset[2] != 0.0f))
5967 if ((mmd->
shift[0] != 0.0f) || (mmd->
shift[1] != 0.0f) || (mmd->
shift[2] != 0.0f)) {
5970 if (mmd->
object !=
nullptr) {
5977 float factor = mmd->
factor / 25.0f;
6035 if (!DNA_struct_member_exists(
6036 fd->
filesdna,
"ThickGpencilModifierData",
"float",
"thickness_fac"))
6049 const short simple = (1 << 0);
6051 if (mmd->
flag & simple) {
6052 mmd->
flag &= ~simple;
6073 gpd->zdepth_offset = 0.150f;
6078 gpl->vertex_paint_opacity = 1.0f;
6083 gps->fill_opacity_fac = 1.0f;
6091 for (
i = 0, pt = gps->points;
i < gps->totpoints;
i++, pt++) {
6102 if (!DNA_struct_member_exists(
6103 fd->
filesdna,
"View3DOverlay",
"float",
"sculpt_mode_face_sets_opacity"))
6127 if (!DNA_struct_member_exists(
6128 fd->
filesdna,
"Brush",
"int",
"automasking_boundary_edges_propagation_steps"))
6131 br->automasking_boundary_edges_propagation_steps = 1;
6136 if (!DNA_struct_member_exists(fd->
filesdna,
"CorrectiveSmoothModifierData",
"float",
"scale"))
6150 if (me->faces_num > 0) {
6151 const int *face_sets =
static_cast<const int *
>(
6154 me->face_sets_color_default =
abs(face_sets[0]);
6161 if (!DNA_struct_member_exists(fd->
filesdna,
"OceanModifierData",
"float",
"fetch_jonswap")) {
6172 if (!DNA_struct_exists(fd->
filesdna,
"XrSessionSettings")) {
6176 wm->xr.session_settings.shading = v3d_default->
shading;
6179 wm->xr.session_settings.clip_start = v3d_default->
clip_start;
6180 wm->xr.session_settings.clip_end = v3d_default->
clip_end;
6187 if (!DNA_struct_member_exists(fd->
filesdna,
"SurfaceDeformModifierData",
"float",
"strength"))
6214 if (!DNA_struct_member_exists(fd->
filesdna,
"RemeshModifierData",
"float",
"voxel_size")) {
6229 if (!DNA_struct_member_exists(
6230 fd->
filesdna,
"SolidifyModifierData",
"float",
"merge_tolerance"))
6247 if (rbc !=
nullptr) {
6249 INVALID_RBC_TYPE_SLIDER = 2,
6250 INVALID_RBC_TYPE_6DOF_SPRING = 4,
6251 INVALID_RBC_TYPE_MOTOR = 7,
6253 switch (rbc->
type) {
6254 case INVALID_RBC_TYPE_SLIDER:
6257 case INVALID_RBC_TYPE_6DOF_SPRING:
6260 case INVALID_RBC_TYPE_MOTOR:
6274 if (fmd->
domain !=
nullptr) {
6285 scene->grease_pencil_settings.smaa_threshold = 1.0f;
6293 if (br->cloth_mass == 0.0f) {
6294 br->cloth_mass = 1.0f;
6301 if (brush->gpencil_settings) {
6302 brush->rgb[0] = 0.498f;
6303 brush->rgb[1] = 1.0f;
6304 brush->rgb[2] = 0.498f;
6312 if (!DNA_struct_member_exists(fd->
filesdna,
"PartDeflect",
"float",
"f_wind_factor")) {
6315 ob->pd->f_wind_factor = 1.0f;
6320 part->pd->f_wind_factor = 1.0f;
6323 part->pd2->f_wind_factor = 1.0f;