815 const MPoly *polys =
static_cast<const MPoly *
>(
818 if (polys[
i].totloop == 2) {
824 reinterpret_cast<float(*)[3]
>(me->vert_positions_for_write().data()),
826 me->edges_for_write().data(),
829 &me->fdata_legacy,
CD_MFACE, me->totface_legacy),
831 me->corner_verts().data(),
832 me->corner_edges_for_write().data(),
834 me->face_offsets().data(),
836 me->deform_verts_for_write().data(),
856 if (!DNA_struct_member_exists(fd->
filesdna,
"SpaceImage",
"float",
"uv_opacity")) {
870 if (!DNA_struct_member_exists(fd->
filesdna,
"BrushGpencilSettings",
"float",
"random_hue")) {
872 if ((brush->gpencil_settings) && (brush->gpencil_settings->curve_rand_pressure ==
nullptr))
875 1, 0.0f, 0.0f, 1.0f, 1.0f);
877 1, 0.0f, 0.0f, 1.0f, 1.0f);
880 1, 0.0f, 0.0f, 1.0f, 1.0f);
882 1, 0.0f, 0.0f, 1.0f, 1.0f);
884 1, 0.0f, 0.0f, 1.0f, 1.0f);
902 if (!DNA_struct_member_exists(fd->
filesdna,
"NodeTexSky",
"float",
"sun_size")) {
931 bool use_optix =
false;
932 bool use_denoising =
false;
936 use_denoising = use_denoising ||
938 use_optix = use_optix ||
945 use_denoising = use_denoising ||
947 use_optix = use_optix ||
973 if (!use_denoising) {
992 if (!DNA_struct_member_exists(fd->
filesdna,
"ModifierData",
"short",
"ui_expand_flag")) {
995 if (md->mode & eModifierMode_Expanded_DEPRECATED) {
999 md->ui_expand_flag = 0;
1006 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"motion_blur_depth_scale"))
1009 scene->eevee.motion_blur_depth_scale = 100.0f;
1010 scene->eevee.motion_blur_max = 32;
1014 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"int",
"motion_blur_steps")) {
1016 scene->eevee.motion_blur_steps = 1;
1021 if (!DNA_struct_member_exists(fd->
filesdna,
"bConstraint",
"short",
"ui_expand_flag")) {
1024 if (con->flag & CONSTRAINT_EXPAND_DEPRECATED) {
1028 con->ui_expand_flag = 0;
1035 if (!DNA_struct_member_exists(fd->
filesdna,
"GpencilModifierData",
"short",
"ui_expand_flag"))
1039 if (md->mode & eGpencilModifierMode_Expanded_DEPRECATED) {
1043 md->ui_expand_flag = 0;
1050 if (!DNA_struct_member_exists(fd->
filesdna,
"ShaderFxData",
"short",
"ui_expand_flag")) {
1053 if (fx->mode & eShaderFxMode_Expanded_DEPRECATED) {
1057 fx->ui_expand_flag = 0;
1064 if (!DNA_struct_member_exists(fd->
filesdna,
"BevelModifierData",
"short",
"profile_type")) {
1069 bool use_custom_profile = bmd->
flags & MOD_BEVEL_CUSTOM_PROFILE_DEPRECATED;
1092 if (!DNA_struct_member_exists(fd->
filesdna,
"NodeTexSky",
"float",
"sun_intensity")) {
1108 if (!DNA_struct_member_exists(fd->
filesdna,
"BevelModifierData",
"char",
"affect_type")) {
1113 const bool use_vertex_bevel = bmd->
flags & MOD_BEVEL_VERT_DEPRECATED;
1122 if (!DNA_struct_member_exists(
1123 fd->
filesdna,
"MeshSeqCacheModifierData",
"float",
"velocity_scale"))
1135 if (!DNA_struct_member_exists(fd->
filesdna,
"CacheFile",
"char",
"velocity_unit")) {
1137 STRNCPY(cache_file->velocity_name,
".velocities");
1142 if (!DNA_struct_member_exists(fd->
filesdna,
"OceanModifierData",
"int",
"viewport_resolution"))
1170 if (rbw ==
nullptr) {
1218 mesh->vert_data.totlayer = mesh->vert_data.maxlayer =
MEM_allocN_len(
1219 mesh->vert_data.layers) /
1221 mesh->edge_data.totlayer = mesh->edge_data.maxlayer =
MEM_allocN_len(
1222 mesh->edge_data.layers) /
1225 mesh->corner_data.totlayer = mesh->corner_data.maxlayer =
MEM_allocN_len(
1226 mesh->corner_data.layers) /
1228 mesh->face_data.totlayer = mesh->face_data.maxlayer =
MEM_allocN_len(
1229 mesh->face_data.layers) /
1239 if (fcu->totvert < 2 || fcu->bezt ==
nullptr) {
1252 if (scene->master_collection) {
1258 if (!DNA_struct_member_exists(fd->
filesdna,
"Curve",
"char",
"bevel_mode")) {
1260 if (curve->bevobj !=
nullptr) {
1274 if (fmd->
domain !=
nullptr) {
1281 const float grid_lines[4] = {1.0, 0.0, 0.0, 1.0};
1291 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"fade_alpha")) {
1306 if (!DNA_struct_member_exists(fd->
filesdna,
"Mesh",
"char",
"symmetry")) {
1329 scene->r.simplify_volumes = 1.0f;
1334 if (!DNA_struct_member_exists(fd->
filesdna,
"WorkSpaceDataRelation",
"int",
"parentid")) {
1341 if (relation->parent !=
nullptr) {
1345 if (win !=
nullptr) {
1346 relation->parentid = win->
winid;
1350 if (relation->parentid == 0) {
1353 "Found a valid parent for workspace data relation, but no valid parent id.");
1356 if (relation->parentid == 0) {
1364 if (!DNA_struct_exists(fd->
filesdna,
"SpaceImageOverlay")) {
1391 switch (sl->spacetype) {
1402 if (!DNA_struct_member_exists(
1403 fd->
filesdna,
"FluidModifierData",
"float",
"fractions_distance"))
1420 const int LEGACY_REFINE_RADIAL_DISTORTION_K1 = (1 << 2);
1425 int new_refine_camera_intrinsics = 0;
1449 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"wireframe_opacity")) {
1495 if (!DNA_struct_member_exists(fd->
filesdna,
"ViewLayer",
"short",
"cryptomatte_levels")) {
1498 view_layer->cryptomatte_levels = 6;
1529 if (scene->nodetree) {
1533 const char *volume_scatter =
"VolumeScatterCol";
1544 if (!DNA_struct_exists(fd->
filesdna,
"CryptomatteEntry")) {
1546 if (scene->nodetree) {
1550 char *matte_id = storage->
matte_id;
1551 if (matte_id ==
nullptr || strlen(storage->
matte_id) == 0) {
1578 if (
STREQ(node->idname,
"GeometryNodeRandomAttribute")) {
1579 STRNCPY(node->idname,
"GeometryLegacyNodeAttributeRandomize");
1585 if (scene->toolsettings->sequencer_tool_settings ==
nullptr) {
1605 if (!DNA_struct_member_exists(fd->
filesdna,
"FluidModifierData",
"float",
"viscosity_value")) {
1610 if (fmd->
domain !=
nullptr) {
1620 if (!DNA_struct_exists(fd->
filesdna,
"NodeSetAlpha")) {
1631 node->storage = storage;
1639 if (ed ==
nullptr) {
1675 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPdata",
"int",
"curve_edit_resolution")) {
1682 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPdata",
"float",
"curve_edit_threshold")) {
1701 node->storage =
data;
1710 if (!DNA_struct_member_exists(fd->
filesdna,
"bGPDlayer",
"float",
"location[0]")) {
1723 if ((brush->gpencil_settings) && (brush->gpencil_settings->fill_factor == 0.0f)) {
1724 brush->gpencil_settings->fill_factor = 1.0f;
1768 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"float",
"bokeh_overblur")) {
1770 scene->eevee.bokeh_neighbor_max = 10.0f;
1771 scene->eevee.bokeh_overblur = 5.0f;
1776 if (!DNA_struct_member_exists(fd->
filesdna,
"FModifier",
"short",
"ui_expand_flag")) {
1781 fcm->flag & FMODIFIER_FLAG_EXPANDED,
1794 scene->eevee.volumetric_shadow_samples = std::min(scene->eevee.volumetric_shadow_samples,
1803 if (
STREQ(node->idname,
"GeometryNodeSubdivisionSurfaceSimple")) {
1804 STRNCPY(node->idname,
"GeometryNodeSubdivide");
1806 if (
STREQ(node->idname,
"GeometryNodeSubdivisionSurface")) {
1807 STRNCPY(node->idname,
"GeometryNodeSubdivideSmooth");
1818 switch (sl->spacetype) {
1842 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
1846 if (new_footer !=
nullptr) {
1860 if (
STREQ(node->idname,
"GeometryNodeSubdivideSmooth")) {
1861 STRNCPY(node->idname,
"GeometryNodeSubdivisionSurface");
1869 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"diff_fac")) {
1871 light->diff_fac = 1.0f;
1872 light->volume_fac = 1.0f;
1881 if (
STREQ(node->idname,
"GeometryNodeMeshPlane")) {
1882 STRNCPY(node->idname,
"GeometryNodeMeshGrid");
1899#define CU_2D (1 << 3)
1904 if (nu->flag &
CU_2D) {
1919 if (!DNA_struct_member_exists(fd->
filesdna,
"bArmature",
"float",
"axes_position")) {
1922 arm->axes_position = 1.0;
1927 if (!DNA_struct_member_exists(fd->
filesdna,
"Light",
"float",
"area_spread")) {
1929 la->area_spread =
DEG2RADF(180.0f);
1939 STRNCPY(path->display_name, path->node_name);