3032 scene->r.gauss = 1.5f;
3037 if (!DNA_struct_member_exists(fd->
filesdna,
"GPUDOFSettings",
"float",
"ratio")) {
3039 ca->gpu_dof.ratio = 1.0f;
3044 if (DNA_struct_exists(fd->
filesdna,
"MTexPoly")) {
3058 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"cascade_max_dist")) {
3060 la->cascade_max_dist = 1000.0f;
3061 la->cascade_count = 4;
3062 la->cascade_exponent = 0.8f;
3063 la->cascade_fade = 0.1f;
3067 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"float",
"vis_bias")) {
3069 probe->vis_bias = 1.0f;
3070 probe->vis_blur = 0.2f;
3084 if (node->type == 194 &&
3085 STREQ(node->idname,
"ShaderNodeOutputMetallic"))
3087 STRNCPY(node->idname,
"ShaderNodeEeveeMetallic");
3092 STREQ(node->idname,
"ShaderNodeOutputSpecular"))
3094 STRNCPY(node->idname,
"ShaderNodeEeveeSpecular");
3098 else if (node->type == 196 &&
3099 STREQ(node->idname,
"ShaderNodeOutputEeveeMaterial"))
3102 STRNCPY(node->idname,
"ShaderNodeOutputMaterial");
3105 else if (node->type == 194 &&
3106 STREQ(node->idname,
"ShaderNodeEeveeMetallic"))
3109 STRNCPY(node->idname,
"ShaderNodeBsdfPrincipled");
3123 "Eevee material conversion problem. Error in console");
3125 "You need to connect Principled and Eevee Specular shader nodes to new material "
3135 "Eevee material conversion problem. Error in console");
3137 "You need to combine transparency and emission shaders to the converted Principled "
3143 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPdata",
"float",
"line_color[4]")) {
3150 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPdata",
"float",
"pixfactor")) {
3157 if (!DNA_struct_member_exists(
3158 fd->
filesdna,
"GP_Sculpt_Settings",
"CurveMapping",
"cur_falloff"))
3191 win->screen =
nullptr;
3198 if (!DNA_struct_member_exists(
3199 fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_paper_color[3]"))
3216 if (DNA_struct_member_exists(fd->
filesdna,
"SpaceOutliner",
"int",
"filter") ==
false) {
3239 if (!DNA_struct_member_exists(fd->
filesdna,
"LightProbe",
"float",
"intensity")) {
3241 probe->intensity = 1.0f;
3249 if (con->
type == 17) {
3291 if (
STR_ELEM(scene->r.engine,
"BLENDER_RENDER",
"BLENDER_GAME")) {
3295 scene->r.bake_mode = 0;
3311 int win_width = 0, win_height = 0;
3313 win_width = std::max<int>(win_width, vert->vec.x);
3314 win_height = std::max<int>(win_height, vert->vec.y);
3317 for (
ScrArea *area =
static_cast<ScrArea *
>(screen->areabase.first), *area_next; area;
3320 area_next =
static_cast<ScrArea *
>(area->next);
3323 if ((area->v2->vec.y == win_height) && (area->v1->vec.x == 0) &&
3324 (area->v4->vec.x == win_width))
3345 if (la->mode & (1 << 13)) {
3347 la->mode &= ~(1 << 13);
3358 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3362 region = region_next)
3364 region_next =
static_cast<ARegion *
>(region->next);
3379 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"spec_fac")) {
3381 la->spec_fac = 1.0f;
3405 if (!DNA_struct_member_exists(fd->
filesdna,
"Scene",
"SceneDisplay",
"display")) {
3412 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"float",
"shadow_shift")) {
3414 scene->display.shadow_shift = 0.1;
3418 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"char",
"transform_pivot_point")) {
3424 if (!DNA_struct_exists(fd->
filesdna,
"SceneEEVEE")) {
3428 scene->eevee.gi_diffuse_bounces = 3;
3429 scene->eevee.gi_cubemap_resolution = 512;
3430 scene->eevee.gi_visibility_resolution = 32;
3432 scene->eevee.taa_samples = 16;
3433 scene->eevee.taa_render_samples = 64;
3435 scene->eevee.volumetric_start = 0.1f;
3436 scene->eevee.volumetric_end = 100.0f;
3437 scene->eevee.volumetric_tile_size = 8;
3438 scene->eevee.volumetric_samples = 64;
3439 scene->eevee.volumetric_sample_distribution = 0.8f;
3440 scene->eevee.volumetric_light_clamp = 0.0f;
3441 scene->eevee.volumetric_shadow_samples = 16;
3443 scene->eevee.gtao_distance = 0.2f;
3444 scene->eevee.fast_gi_quality = 0.25f;
3446 scene->eevee.bokeh_max_size = 100.0f;
3447 scene->eevee.bokeh_threshold = 1.0f;
3449 scene->eevee.motion_blur_samples = 8;
3450 scene->eevee.motion_blur_shutter_deprecated = 0.5f;
3452 scene->eevee.shadow_cube_size_deprecated = 512;
3457 if (scene->layer_properties ==
nullptr) {
3462#define EEVEE_GET_BOOL(_props, _name, _flag) \
3464 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3465 if (_idprop != nullptr) { \
3466 const int _value = IDP_Int(_idprop); \
3468 scene->eevee.flag |= _flag; \
3471 scene->eevee.flag &= ~_flag; \
3477#define EEVEE_GET_INT(_props, _name) \
3479 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3480 if (_idprop != nullptr) { \
3481 scene->eevee._name = IDP_Int(_idprop); \
3486#define EEVEE_GET_FLOAT(_props, _name) \
3488 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3489 if (_idprop != nullptr) { \
3490 scene->eevee._name = IDP_Float(_idprop); \
3495#define EEVEE_GET_FLOAT_ARRAY(_props, _name, _length) \
3497 IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
3498 if (_idprop != nullptr) { \
3499 const float *_values = static_cast<float *>(IDP_Array(_idprop)); \
3500 for (int _i = 0; _i < _length; _i++) { \
3501 scene->eevee._name[_i] = _values[_i]; \
3506 enum { SCE_EEVEE_DOF_ENABLED = (1 << 7) };
3574 scene->layer_properties =
nullptr;
3576#undef EEVEE_GET_FLOAT_ARRAY
3577#undef EEVEE_GET_FLOAT
3579#undef EEVEE_GET_BOOL
3585 scene->display.matcap_ssao_distance = 0.2f;
3586 scene->display.matcap_ssao_attenuation = 1.0f;
3587 scene->display.matcap_ssao_samples = 16;
3603 switch (scene->toolsettings->snap_mode) {
3605 scene->toolsettings->snap_mode = (1 << 4);
3608 scene->toolsettings->snap_mode = (1 << 0);
3611 scene->toolsettings->snap_mode = (1 << 1);
3614 scene->toolsettings->snap_mode = (1 << 2);
3617 scene->toolsettings->snap_mode = (1 << 3);
3620 switch (scene->toolsettings->snap_node_mode) {
3622 scene->toolsettings->snap_node_mode = (1 << 5);
3625 scene->toolsettings->snap_node_mode = (1 << 6);
3628 scene->toolsettings->snap_node_mode =
3629 (1 << 5) | (1 << 6);
3632 scene->toolsettings->snap_node_mode = (1 << 7);
3635 switch (scene->toolsettings->snap_uv_mode) {
3637 scene->toolsettings->snap_uv_mode = (1 << 4);
3640 scene->toolsettings->snap_uv_mode = (1 << 0);
3648 part->rad_root = 1.0f;
3649 part->rad_tip = 0.0f;
3650 part->rad_scale = 0.01f;
3673 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"float",
"roughness")) {
3675 if (mat->use_nodes) {
3677 mat->roughness = mat->gloss_mir;
3680 mat->roughness = 0.25f;
3684 mat->roughness = 1.0f - mat->gloss_mir;
3686 mat->metallic = mat->ray_mirror;
3701 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"xray_alpha")) {
3713 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"matcap[256]")) {
3716 if (default_matcap) {
3729 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"wireframe_threshold")) {
3741 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"cavity_valley_factor"))
3755 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"xray_alpha_bone")) {
3770 if (!DNA_struct_member_exists(fd->
filesdna,
"Image",
"ListBase",
"renderslot")) {
3773 for (
int i = 0; i < 8; i++) {
3782 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceAction",
"char",
"mode_prev")) {
3817 if (sce->ed !=
nullptr && sce->ed->seqbase.first !=
nullptr) {
3822 if (!DNA_struct_member_exists(
3823 fd->
filesdna,
"View3DOverlay",
"float",
"texture_paint_mode_opacity"))
3830 V3D_SHOW_MODE_SHADE_OVERRIDE = (1 << 15),
3833 float alpha = (v3d->
flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE) ? 0.0f : 1.0f;
3843 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"background_type")) {
3856 if (!DNA_struct_member_exists(
3857 fd->
filesdna,
"RigidBodyWorld",
"RigidBodyWorld_Shared",
"*shared"))
3862 if (rbw ==
nullptr) {
3866 if (rbw->
shared ==
nullptr) {
3875 rbw->pointcache =
nullptr;
3884 if (!DNA_struct_member_exists(fd->
filesdna,
"SoftBody",
"SoftBody_Shared",
"*shared")) {
3887 if (sb ==
nullptr) {
3890 if (sb->
shared ==
nullptr) {
3899 sb->pointcache =
nullptr;
3904 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"short",
"type")) {
3921 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"View3DShading",
"shading")) {
3927 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceView3D",
"float",
"vertex_opacity")) {
3943 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"char",
"annotate_v3d_align")) {
3946 scene->toolsettings->annotate_thickness = 3;
3949 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDlayer",
"short",
"line_change")) {
3952 gpl->line_change = gpl->thickness;
3953 if ((gpl->thickness < 1) || (gpl->thickness > 10)) {
3959 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_paper_opacity"))
3972 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_grid_opacity"))
3987 if (!DNA_struct_member_exists(fd->
filesdna,
"GP_Sculpt_Settings",
"int",
"lock_axis")) {
3998 if (!DNA_struct_member_exists(fd->
filesdna,
"SubsurfModifier",
"short",
"uv_smooth")) {
4014 if (!DNA_struct_member_exists(fd->
filesdna,
"SubsurfModifier",
"short",
"quality")) {
4025 if (!DNA_struct_member_exists(fd->
filesdna,
"MultiresModifier",
"short",
"quality")) {
4042 if (!DNA_struct_member_exists(fd->
filesdna,
"ClothSimSettings",
"short",
"bending_model")) {
4054 if (clmd !=
nullptr) {
4071 if (!DNA_struct_member_exists(fd->
filesdna,
"BrushGpencilSettings",
"float",
"era_strength_f"))
4074 if (brush->gpencil_settings !=
nullptr) {
4127 if (!DNA_struct_member_exists(fd->
filesdna,
"ShrinkwrapModifierData",
"char",
"shrinkMode")) {
4132 if (smd->
shrinkOpts & MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE) {
4134 smd->
shrinkOpts &= ~MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE;
4141 if (!DNA_struct_member_exists(fd->
filesdna,
"PartDeflect",
"float",
"pdef_cfrict")) {
4144 ob->pd->pdef_cfrict = 5.0f;
4157 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"xray_alpha_wire")) {
4194 enum { V3D_OCCLUDE_WIRE = (1 << 14) };
4196 if (v3d->
flag2 & V3D_OCCLUDE_WIRE) {
4198 v3d->
flag2 &= ~V3D_OCCLUDE_WIRE;
4216 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4220 if (!region_header) {
4227 "header 2.83.1 versioning");
4241 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4245 ARegion *region_header =
nullptr;
4247 for (region_header =
static_cast<ARegion *
>(regionbase->
first);
4248 region_header !=
nullptr;
4249 region_header =
static_cast<ARegion *
>(region_header->
next))
4267 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_fade_layer")) {
4284 if (mat->gp_style) {
4293 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"overscan")) {
4295 scene->eevee.overscan = 3.0f;
4306 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"light_threshold")) {
4308 scene->eevee.light_threshold = 0.01f;
4312 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"att_dist")) {
4314 la->att_dist = la->clipend_deprecated;
4318 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"char",
"weight_brush_type")) {
4321#define PAINT_BLEND_MIX 0
4322#define PAINT_BLEND_ADD 1
4323#define PAINT_BLEND_SUB 2
4324#define PAINT_BLEND_MUL 3
4325#define PAINT_BLEND_BLUR 4
4326#define PAINT_BLEND_LIGHTEN 5
4327#define PAINT_BLEND_DARKEN 6
4328#define PAINT_BLEND_AVERAGE 7
4329#define PAINT_BLEND_SMEAR 8
4330#define PAINT_BLEND_COLORDODGE 9
4331#define PAINT_BLEND_DIFFERENCE 10
4332#define PAINT_BLEND_SCREEN 11
4333#define PAINT_BLEND_HARDLIGHT 12
4334#define PAINT_BLEND_OVERLAY 13
4335#define PAINT_BLEND_SOFTLIGHT 14
4336#define PAINT_BLEND_EXCLUSION 15
4337#define PAINT_BLEND_LUMINOSITY 16
4338#define PAINT_BLEND_SATURATION 17
4339#define PAINT_BLEND_HUE 18
4340#define PAINT_BLEND_ALPHA_SUB 19
4341#define PAINT_BLEND_ALPHA_ADD 20
4345 const char tool_init = brush->vertex_brush_type;
4346 bool is_blend =
false;
4350 switch (tool_init) {
4368 brush->vertex_brush_type = tool;
4371 if (is_blend ==
false) {
4376 switch (tool_init) {
4429 brush->blend =
blend;
4433 brush->weight_brush_type = brush->vertex_brush_type;
4436#undef PAINT_BLEND_MIX
4437#undef PAINT_BLEND_ADD
4438#undef PAINT_BLEND_SUB
4439#undef PAINT_BLEND_MUL
4440#undef PAINT_BLEND_BLUR
4441#undef PAINT_BLEND_LIGHTEN
4442#undef PAINT_BLEND_DARKEN
4443#undef PAINT_BLEND_AVERAGE
4444#undef PAINT_BLEND_SMEAR
4445#undef PAINT_BLEND_COLORDODGE
4446#undef PAINT_BLEND_DIFFERENCE
4447#undef PAINT_BLEND_SCREEN
4448#undef PAINT_BLEND_HARDLIGHT
4449#undef PAINT_BLEND_OVERLAY
4450#undef PAINT_BLEND_SOFTLIGHT
4451#undef PAINT_BLEND_EXCLUSION
4452#undef PAINT_BLEND_LUMINOSITY
4453#undef PAINT_BLEND_SATURATION
4454#undef PAINT_BLEND_HUE
4455#undef PAINT_BLEND_ALPHA_SUB
4456#undef PAINT_BLEND_ALPHA_ADD
4468 if (!navigation_region) {
4470 ListBase *regionbase = (slink == area->spacedata.first) ? &area->regionbase :
4473 navigation_region =
static_cast<ARegion *
>(
4489 if (!DNA_struct_member_exists(
4490 fd->
filesdna,
"View3DShading",
"float",
"curvature_ridge_factor"))
4507 if (
STREQ(scene->r.engine,
"BLENDER_OPENGL")) {
4513 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDlayer",
"int",
"gstep")) {
4523 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"lookdev_light[256]")) {
4537 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"float",
"shadow_focus")) {
4539 float *dir = scene->display.light_direction;
4540 std::swap(dir[2], dir[1]);
4549 ca->drawsize *= 2.0f;
4553 if (!DNA_struct_member_exists(
4554 fd->
filesdna,
"GP_Sculpt_Settings",
"CurveMapping",
"cur_primitive"))
4571 if (DNA_struct_member_exists(fd->
filesdna,
"Object",
"char",
"empty_image_visibility_flag")) {
4582 switch (sl->spacetype) {
4644 if (scene->toolsettings->sculpt) {
4668 ob->shapeflag &= ~OB_SHAPE_FLAG_UNUSED_1;
4677 mat->blend_flag &= ~(1 << 2);
4682 if (!DNA_struct_member_exists(
4683 fd->
filesdna,
"ToolSettings",
"char",
"snap_transform_mode_flag"))
4693 switch (sl->spacetype) {
4695 enum { V3D_BACKFACE_CULLING = (1 << 10) };
4697 if (v3d->
flag2 & V3D_BACKFACE_CULLING) {
4698 v3d->
flag2 &= ~V3D_BACKFACE_CULLING;
4708 if (!DNA_struct_exists(fd->
filesdna,
"TransformOrientationSlot")) {
4710 for (
int i = 0; i <
ARRAY_SIZE(scene->orientation_slots); i++) {
4711 scene->orientation_slots[i].index_custom = -1;
4717 if (!DNA_struct_member_exists(fd->
filesdna,
"GP_Sculpt_Settings",
"float",
"isect_threshold"))
4729 if (ca->gpu_dof.ratio < 0.01f) {
4730 ca->gpu_dof.ratio = 0.01f;
4740 if (!execute_region) {
4741 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4745 execute_region =
static_cast<ARegion *
>(
4768 if (!DNA_struct_member_exists(fd->
filesdna,
"Material",
"float",
"a")) {
4779 scene->r.color_mgt_flag &= ~R_COLOR_MANAGEMENT_UNUSED_1;
4780 if (scene->r.alphamode == R_ALPHAKEY) {
4785 if (ts->
sculpt !=
nullptr) {
4793 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"char",
"wire_color_type")) {
4806 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DCursor",
"short",
"rotation_mode")) {
4808 if (
is_zero_v3(scene->cursor.rotation_axis)) {
4810 scene->cursor.rotation_quaternion[0] = 1.0f;
4811 scene->cursor.rotation_axis[1] = 1.0f;
4827 enum { PARCURVE = 1, PARKEY = 2, PAR_DEPRECATED = 16 };
4828 if (
ELEM(ob->partype, PARCURVE, PARKEY, PAR_DEPRECATED)) {
4834 enum { OB_WAVE = 21, OB_LIFE = 23, OB_SECTOR = 24 };
4835 if (
ELEM(ob->type, OB_WAVE, OB_LIFE, OB_SECTOR)) {
4860 if (scene->r.im_format.view_settings.look[0] ==
'\0') {
4863 &scene->r.im_format.view_settings, &scene->r.im_format.display_settings,
"Filmic");
4866 if (scene->r.bake.im_format.view_settings.look[0] ==
'\0') {
4869 &scene->r.bake.im_format.display_settings,
4895 if (!DNA_struct_member_exists(fd->
filesdna,
"TriangulateModifierData",
"int",
"min_vertices"))
4911 if (
STREQ(node->idname,
"ShaderNodeOutputLamp")) {
4912 STRNCPY(node->idname,
"ShaderNodeOutputLight");
4914 if (node->type == SH_NODE_BSDF_PRINCIPLED && node->custom2 == 0) {
4926 if (!mat->use_nodes || !mat->nodetree || mat->blend_method ==
MA_BM_SOLID) {
4947 bool is_first_subdiv =
true;
4951 if (is_first_subdiv) {
4955 smd->
flags &= ~eSubsurfModifierFlag_UseCrease;
4957 is_first_subdiv =
false;
4961 if (is_first_subdiv) {
4965 mmd->
flags &= ~eMultiresModifierFlag_UseCrease;
4967 is_first_subdiv =
false;
4978 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5029 if (!DNA_struct_member_exists(fd->
filesdna,
"BrushGpencilSettings",
"float",
"hardness")) {
5031 if (brush->gpencil_settings !=
nullptr) {
5040 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDstroke",
"float",
"hardness")) {
5045 gps->hardness = 1.0f;
5071 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5088 if (region !=
nullptr) {
5098 if (!DNA_struct_member_exists(fd->
filesdna,
"bSplineIKConstraint",
"short",
"yScaleMode")) {
5105 if ((data->flag & CONSTRAINT_SPLINEIK_SCALE_LIMITED) == 0) {
5115 if (!DNA_struct_member_exists(
5116 fd->
filesdna,
"View3DOverlay",
"float",
"sculpt_mode_mask_opacity"))
5129 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneDisplay",
"char",
"render_aa")) {
5137 if (!DNA_struct_member_exists(fd->
filesdna,
"bPoseChannel",
"float",
"scale_out_z")) {
5146 pchan->scale_in_z = pchan->scale_in_x;
5147 pchan->scale_out_z = pchan->scale_out_x;
5167 if (sce->ed !=
nullptr) {
5175 if (!DNA_struct_member_exists(fd->
filesdna,
"bSizeLikeConstraint",
"float",
"power")) {
5190 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5203 if (region !=
nullptr) {
5204 region->v2d.scroll &= ~V2D_SCROLL_LEFT;
5219 space_outliner->
filter &= ~SO_FLAG_UNUSED_1;
5233 cscene,
"film_transparent",
false);
5246 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"sun_angle")) {
5248 light->sun_angle = 2.0f *
atanf(light->area_size);
5256 enum { IMA_IGNORE_ALPHA = (1 << 12) };
5257 if (image->flag & IMA_IGNORE_ALPHA) {
5259 image->flag &= ~IMA_IGNORE_ALPHA;
5271 view_settings = &scene->view_settings;
5283 if (
STREQ(view_settings->
look,
"Filmic - Base Contrast")) {
5291 if (scene->ed !=
nullptr) {
5299 if (scene->master_collection !=
nullptr) {
5312 case FFM_PRESET_ULTRAFAST:
5313 case FFM_PRESET_SUPERFAST:
5316 case FFM_PRESET_VERYFAST:
5317 case FFM_PRESET_FASTER:
5318 case FFM_PRESET_FAST:
5319 case FFM_PRESET_MEDIUM:
5322 case FFM_PRESET_SLOW:
5323 case FFM_PRESET_SLOWER:
5324 case FFM_PRESET_VERYSLOW:
5355 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5372 if (mesh->remesh_voxel_size == 0.0f) {
5373 mesh->remesh_voxel_size = 0.1f;
5400 if (br->ob_mode &
OB_MODE_SCULPT && br->normal_radius_factor == 0.0f) {
5401 br->normal_radius_factor = 0.5f;
5408 if (scene->master_collection !=
nullptr) {
5427 if (studio_light !=
nullptr) {
5442 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5455 if (region_toolprops &&
5475 if (!DNA_struct_member_exists(fd->
filesdna,
"Bone",
"char",
"inherit_scale_mode")) {
5482 if (!DNA_struct_member_exists(fd->
filesdna,
"bRotateLikeConstraint",
"char",
"mix_mode")) {
5494 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"studiolight_intensity"))
5510 if (br->ob_mode &
OB_MODE_SCULPT && br->elastic_deform_volume_preservation == 0.0f) {
5511 br->elastic_deform_volume_preservation = 0.5f;
5542 if (!DNA_struct_member_exists(
5543 fd->
filesdna,
"LayerCollection",
"short",
"local_collections_bits"))
5562 if (sl != sl_other && sl_other->spacetype ==
SPACE_VIEW3D) {
5573 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
5591 "versioning file tools region");
5601 if (br->ob_mode &
OB_MODE_SCULPT && br->area_radius_factor == 0.0f) {
5602 br->area_radius_factor = 0.5f;
5612 area->flag &= ~AREA_FLAG_UNUSED_6;
5617 if (!DNA_struct_member_exists(fd->
filesdna,
"ToolSettings",
"CurveProfile",
"custom_profile"))
5628 if (!DNA_struct_member_exists(fd->
filesdna,
"BevelModifier",
"CurveProfile",
"custom_profile"))
5643 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"dash_ratio")) {
5645 br->dash_ratio = 1.0f;
5646 br->dash_samples = 20;
5651 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"pose_smooth_iterations")) {
5653 br->pose_smooth_iterations = 4;
5678 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"int",
"render_pass")) {
5699 switch (sl->spacetype) {
5730 view_settings = &scene->view_settings;
5732 char *src = view_settings->
look + strlen(
"Filmic - ");
5733 memmove(view_settings->
look, src, strlen(src) + 1);
5736 char *src = view_settings->
look + strlen(
"Standard - ");
5737 memmove(view_settings->
look, src, strlen(src) + 1);
5760 if (!DNA_struct_member_exists(fd->
filesdna,
"Image",
"ListBase",
"tiles")) {
5763 tile->tile_number = 1001;
5769 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceImage",
"int",
"tile_grid_shape[2]")) {
5784 br->add_col[3] = 0.9f;
5785 br->sub_col[3] = 0.9f;
5790 if (br->pose_ik_segments == 0) {
5791 br->pose_ik_segments = 1;
5803 if (!DNA_struct_member_exists(fd->
filesdna,
"Brush",
"float",
"tip_roundness")) {
5807 br->tip_roundness = 0.18f;
5824 if (!DNA_struct_member_exists(fd->
filesdna,
"UVWarpModifierData",
"float",
"scale[2]")) {
5836 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DShading",
"float",
"studiolight_blur")) {
5852 if (!DNA_struct_member_exists(
5853 fd->
filesdna,
"View3DOverlay",
"float",
"gpencil_vertex_paint_opacity"))
5870 if (!DNA_struct_member_exists(fd->
filesdna,
"ArrayGpencilModifierData",
"int",
"seed")) {
5874 if (brush->gpencil_settings !=
nullptr) {
5875 brush->gpencil_vertex_brush_type = brush->gpencil_settings->brush_type;
5876 brush->gpencil_sculpt_brush_type = brush->gpencil_settings->brush_type;
5877 brush->gpencil_weight_brush_type = brush->gpencil_settings->brush_type;
5884 if (gp_style ==
nullptr) {
5904 gp_style->
fill_rgba[3] *= gp_style->texture_opacity;
5909 gp_style->
flag &= ~GP_MATERIAL_STROKE_PATTERN;
5970 if ((mmd->
offset[0] != 0.0f) || (mmd->
offset[1] != 0.0f) || (mmd->
offset[2] != 0.0f))
5974 if ((mmd->
shift[0] != 0.0f) || (mmd->
shift[1] != 0.0f) || (mmd->
shift[2] != 0.0f)) {
5977 if (mmd->
object !=
nullptr) {
5984 float factor = mmd->
factor / 25.0f;
6042 if (!DNA_struct_member_exists(
6043 fd->
filesdna,
"ThickGpencilModifierData",
"float",
"thickness_fac"))
6056 const short simple = (1 << 0);
6058 if (mmd->
flag & simple) {
6059 mmd->
flag &= ~simple;
6080 gpd->zdepth_offset = 0.150f;
6085 gpl->vertex_paint_opacity = 1.0f;
6090 gps->fill_opacity_fac = 1.0f;
6098 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
6109 if (!DNA_struct_member_exists(
6110 fd->
filesdna,
"View3DOverlay",
"float",
"sculpt_mode_face_sets_opacity"))
6134 if (!DNA_struct_member_exists(
6135 fd->
filesdna,
"Brush",
"int",
"automasking_boundary_edges_propagation_steps"))
6138 br->automasking_boundary_edges_propagation_steps = 1;
6143 if (!DNA_struct_member_exists(fd->
filesdna,
"CorrectiveSmoothModifierData",
"float",
"scale"))
6157 if (me->faces_num > 0) {
6158 const int *face_sets =
static_cast<const int *
>(
6161 me->face_sets_color_default =
abs(face_sets[0]);
6168 if (!DNA_struct_member_exists(fd->
filesdna,
"OceanModifierData",
"float",
"fetch_jonswap")) {
6179 if (!DNA_struct_exists(fd->
filesdna,
"XrSessionSettings")) {
6183 wm->xr.session_settings.shading = v3d_default->
shading;
6186 wm->xr.session_settings.clip_start = v3d_default->
clip_start;
6187 wm->xr.session_settings.clip_end = v3d_default->
clip_end;
6194 if (!DNA_struct_member_exists(fd->
filesdna,
"SurfaceDeformModifierData",
"float",
"strength"))
6221 if (!DNA_struct_member_exists(fd->
filesdna,
"RemeshModifierData",
"float",
"voxel_size")) {
6236 if (!DNA_struct_member_exists(
6237 fd->
filesdna,
"SolidifyModifierData",
"float",
"merge_tolerance"))
6254 if (rbc !=
nullptr) {
6256 INVALID_RBC_TYPE_SLIDER = 2,
6257 INVALID_RBC_TYPE_6DOF_SPRING = 4,
6258 INVALID_RBC_TYPE_MOTOR = 7,
6260 switch (rbc->
type) {
6261 case INVALID_RBC_TYPE_SLIDER:
6264 case INVALID_RBC_TYPE_6DOF_SPRING:
6267 case INVALID_RBC_TYPE_MOTOR:
6281 if (fmd->
domain !=
nullptr) {
6292 scene->grease_pencil_settings.smaa_threshold = 1.0f;
6300 if (br->cloth_mass == 0.0f) {
6301 br->cloth_mass = 1.0f;
6308 if (brush->gpencil_settings) {
6309 brush->rgb[0] = 0.498f;
6310 brush->rgb[1] = 1.0f;
6311 brush->rgb[2] = 0.498f;
6319 if (!DNA_struct_member_exists(fd->
filesdna,
"PartDeflect",
"float",
"f_wind_factor")) {
6322 ob->pd->f_wind_factor = 1.0f;
6327 part->pd->f_wind_factor = 1.0f;
6330 part->pd2->f_wind_factor = 1.0f;