2387 enum { SCE_SNAP_SEQ = (1 << 7) };
2391 if (!DNA_struct_member_exists(fd->
filesdna,
"MirrorModifierData",
"float",
"bisect_threshold"))
2404 if (!DNA_struct_member_exists(fd->
filesdna,
"BrushGpencilSettings",
"int",
"dilate_pixels")) {
2406 if (brush->gpencil_settings) {
2407 brush->gpencil_settings->dilate_pixels = 1;
2416 if (!DNA_struct_member_exists(fd->
filesdna,
"bPoseChannel",
"float",
"custom_scale_xyz[3]")) {
2418 if (ob->pose ==
nullptr) {
2422 copy_v3_fl(pchan->custom_scale_xyz, pchan->custom_scale);
2434 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
2438 if (new_sidebar !=
nullptr) {
2466 if (!DNA_struct_member_exists(fd->
filesdna,
"FileAssetSelectParams",
"short",
"import_method"))
2483 if (!DNA_struct_member_exists(fd->
filesdna,
"Bone",
"int",
"bbone_flag")) {
2492 copy_v3_fl3(pchan->scale_in, pchan->scale_in_x, 1.0f, pchan->scale_in_z);
2493 copy_v3_fl3(pchan->scale_out, pchan->scale_out_x, 1.0f, pchan->scale_out_z);
2519 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
2524 if (spreadsheet_dataset_region) {
2551 tool_settings->
snap_flag |= SCE_SNAP_SEQ;
2552 short snap_mode = tool_settings->
snap_mode;
2555 tool_settings->
snap_mode &= ~((1 << 4) | (1 << 5) | (1 << 6));
2558 if (snap_mode & (1 << 4)) {
2561 if (snap_mode & (1 << 5)) {
2564 if (snap_mode & (1 << 6)) {
2567 if (snap_node_mode & (1 << 5)) {
2570 if (snap_node_mode & (1 << 6)) {
2573 if (snap_uv_mode & (1 << 4)) {
2586 if (scene->master_collection !=
nullptr) {
2587 BLI_strncpy(scene->master_collection->id.name + 2,
2589 sizeof(scene->master_collection->id.name) - 2);
2605 if (node->type == GEO_NODE_SUBDIVIDE_MESH) {
2606 STRNCPY(node->idname,
"GeometryNodeMeshSubdivide");
2624 mat->lineart.mat_occlusion = 1;
2631 if (!DNA_struct_member_exists(
2632 fd->
filesdna,
"SurfaceDeformModifierData",
"int",
"mesh_verts_num"))
2659 if (!DNA_struct_member_exists(
2660 fd->
filesdna,
"WorkSpace",
"AssetLibraryReference",
"asset_library"))
2667 if (!DNA_struct_member_exists(
2668 fd->
filesdna,
"FileAssetSelectParams",
"AssetLibraryReference",
"asset_library_ref"))
2695 tool_settings->
snap_flag &= ~SCE_SNAP_SEQ;
2719 if (!DNA_struct_member_exists(
2720 fd->
filesdna,
"View3DOverlay",
"float",
"normals_constant_screen_size"))
2775 if (object->type ==
OB_LAMP) {
2781 object->visibility_flag |=
flag;
2786 if (!DNA_struct_member_exists(
2787 fd->
filesdna,
"WorkSpace",
"AssetLibraryReference",
"asset_library_ref"))
2794 if (!DNA_struct_member_exists(
2795 fd->
filesdna,
"FileAssetSelectParams",
"AssetLibraryReference",
"asset_library_ref"))
2819 text->flags &= ~TXT_ISSCRIPT;
2852 if (link->tonode->type == GEO_NODE_MESH_PRIMITIVE_CUBE) {
2853 bNode *node = link->tonode;
2854 if (
STREQ(link->tosock->identifier,
"Size") && link->tosock->type ==
SOCK_FLOAT) {
2855 bNode *link_fromnode = link->fromnode;
2861 ntree, node, socket);
2868 if (node->type != GEO_NODE_MESH_PRIMITIVE_CUBE) {
2872 if (
STREQ(socket->identifier,
"Size") && (socket->type ==
SOCK_FLOAT)) {
2882 if (!DNA_struct_member_exists(
2883 fd->
filesdna,
"LineartGpencilModifierData",
"bool",
"use_crease_on_smooth"))
2928 seq_show_safe_center | seq_show_metadata);
2930 seq_show_strip_source | seq_show_strip_duration |
2931 seq_show_grid | show_strip_offset);
2943 if (scene->ed !=
nullptr) {
2962 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
2966 region->v2d.min[1] = 4.0f;
2986 R_EXR_TILE_FILE = (1 << 10),
2987 R_FULL_SAMPLE = (1 << 15),
2990 scene->r.scemode &= ~(R_EXR_TILE_FILE | R_FULL_SAMPLE);
3024 switch (sl->spacetype) {
3050 switch (sl->spacetype) {
3052 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3072 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3074 ARegion *region_tool =
nullptr, *region_head =
nullptr;
3075 int region_tool_index = -1, region_head_index = -1, i;
3078 region_tool = region;
3079 region_tool_index = i;
3082 region_head = region;
3083 region_head_index = i;
3086 if ((region_tool && region_head) && (region_head_index > region_tool_index)) {
3095 if (scene->ed !=
nullptr) {
3114 if (scene->ed !=
nullptr) {
3125 switch (sl->spacetype) {
3128 enum { SEQ_DRAW_SEQUENCE = 0 };
3129 if (sseq->
mainb == SEQ_DRAW_SEQUENCE) {
3136 st->
flags &= ~ST_FLAG_UNUSED_4;
3152 version_node_id(ntree, GEO_NODE_CAPTURE_ATTRIBUTE,
"GeometryNodeCaptureAttribute");
3153 version_node_id(ntree, GEO_NODE_MESH_BOOLEAN,
"GeometryNodeMeshBoolean");
3155 version_node_id(ntree, GEO_NODE_FILLET_CURVE,
"GeometryNodeFilletCurve");
3156 version_node_id(ntree, GEO_NODE_REVERSE_CURVE,
"GeometryNodeReverseCurve");
3157 version_node_id(ntree, GEO_NODE_SAMPLE_CURVE,
"GeometryNodeSampleCurve");
3158 version_node_id(ntree, GEO_NODE_RESAMPLE_CURVE,
"GeometryNodeResampleCurve");
3159 version_node_id(ntree, GEO_NODE_SUBDIVIDE_CURVE,
"GeometryNodeSubdivideCurve");
3161 version_node_id(ntree, GEO_NODE_REPLACE_MATERIAL,
"GeometryNodeReplaceMaterial");
3162 version_node_id(ntree, GEO_NODE_SUBDIVIDE_MESH,
"GeometryNodeSubdivideMesh");
3163 version_node_id(ntree, GEO_NODE_SET_MATERIAL,
"GeometryNodeSetMaterial");
3164 version_node_id(ntree, GEO_NODE_SPLIT_EDGES,
"GeometryNodeSplitEdges");
3175 if (!DNA_struct_exists(fd->
filesdna,
"SpaceNodeOverlay")) {
3208 wm->xr.session_settings.base_scale = 1.0f;
3221 version_node_id(ntree, FN_NODE_SLICE_STRING,
"FunctionNodeSliceString");
3231 if (node->type == GEO_NODE_VIEWER) {
3232 if (node->storage ==
nullptr) {
3236 node->storage =
data;
3245 ntree, GEO_NODE_DISTRIBUTE_POINTS_ON_FACES,
"Geometry",
"Mesh");
3265 ntree, GEO_NODE_MESH_PRIMITIVE_CYLINDER,
"Geometry",
"Mesh");
3268 ntree, GEO_NODE_MESH_PRIMITIVE_ICO_SPHERE,
"Geometry",
"Mesh");
3272 ntree, GEO_NODE_MESH_PRIMITIVE_UV_SPHERE,
"Geometry",
"Mesh");
3292 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3296 region->v2d.min[1] = 1.0f;
3309 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3313 if (region->v2d.minzoom > 0.05f) {
3314 region->v2d.minzoom = 0.05f;
3348 version_node_id(ntree, GEO_NODE_CURVE_SPLINE_PARAMETER,
"GeometryNodeSplineParameter");
3350 if (node->type == GEO_NODE_CURVE_SPLINE_PARAMETER) {
3356 if (node->type == FN_NODE_COMPARE) {
3357 if (node->storage ==
nullptr) {
3361 data->operation = node->custom1;
3362 STRNCPY(node->idname,
"FunctionNodeCompare");
3363 node->storage =
data;
3387 if (node->storage ==
nullptr) {
3389 data->clamp = node->custom1;
3391 data->interpolation_type = node->custom2;
3392 node->storage =
data;
3404 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3432 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"bone_wire_alpha")) {
3449 ntree, GEO_NODE_STRING_TO_CURVES,
"Curves",
"Curve Instances");
3451 ntree, GEO_NODE_INPUT_MESH_EDGE_ANGLE,
"Angle",
"Unsigned Angle");
3453 ntree, GEO_NODE_INPUT_MESH_ISLAND,
"Index",
"Island Index");
3478 if (scene->ed !=
nullptr) {
3488 ~(short(
SCE_SNAP) | short(SCE_SNAP_SEQ));
3489 if (tool_settings->
snap_flag & SCE_SNAP_SEQ) {
3491 tool_settings->
snap_flag &= ~SCE_SNAP_SEQ;
3539 if (gpmd->
step == 1 && gpmd->
factor <= 0.5f) {
3545 gpmd->
step + 2.0f)));
3561 br->flag &= ~BRUSH_ALPHA_PRESSURE;
3562 br->flag &= ~BRUSH_SPACE_ATTEN;
3568 for (
int step = 0; step < 2; step++) {
3583 actlayer = me->vert_data.layers + vact1;
3585 else if (vact2 != -1) {
3586 actlayer = me->corner_data.layers + vact2;
3628 if (brush->curves_sculpt_settings !=
nullptr) {
3631 brush->curves_sculpt_settings = MEM_cnew<BrushCurvesSculptSettings>(__func__);
3632 brush->curves_sculpt_settings->add_amount = 1;
3640 space_outliner->
filter &= ~SO_FILTER_CLEARED_1;
3659 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
3674 if (timeline_region !=
nullptr) {
3684 if (ed ==
nullptr) {
3694 ms->old_channels = previous_channels;
3695 previous_channels = &ms->parseq->channels;
3725 br->flag &= ~BRUSH_ALPHA_PRESSURE;
3726 br->flag &= ~BRUSH_SPACE_ATTEN;
3733 for (
int step = 0; step < 2; step++) {
3748 actlayer = me->vert_data.layers + vact1;
3750 else if (vact2 != -1) {
3751 actlayer = me->corner_data.layers + vact2;
3802 if (node->type == GEO_NODE_MERGE_BY_DISTANCE) {
3803 if (node->storage ==
nullptr) {
3806 node->storage =
data;
3817 ntree, GEO_NODE_SUBDIVISION_SURFACE,
"Crease",
"Edge Crease");
3837 if (settings ==
nullptr) {
3840 if (settings->curve_length == 0.0f) {
3846 if (!DNA_struct_member_exists(fd->
filesdna,
"Sculpt",
"float",
"automasking_cavity_factor")) {
3848 if (scene->toolsettings && scene->toolsettings->sculpt) {
3849 scene->toolsettings->sculpt->automasking_cavity_factor = 0.5f;
3857 scene->r.bake.max_ray_distance =
safe_sqrtf(scene->r.bake.max_ray_distance);
3872 if (brush->curves_sculpt_settings->points_per_curve == 0) {
3873 brush->curves_sculpt_settings->points_per_curve = 8;
3878 if (!DNA_struct_member_exists(fd->
filesdna,
"ImagePackedFile",
"int",
"tile_number")) {
3883 imapf->tile_number = 1001;
3891 if (ed !=
nullptr) {
3900 if (node->type == GEO_NODE_CURVE_SPLINE_TYPE) {
3936 ((
SpaceClip *)sl)->mask_info.blend_factor = 1.0;
3973 if (node->type == CMP_NODE_OUTPUT_FILE) {
3975 if (sock->storage) {
3981 if (node->storage) {
4005 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4009 if (channels_region) {
4023 brush->curves_sculpt_settings->density_add_attempts = 100;
4030 ob->dtx &= ~OB_DRAWBOUNDOX;
4039 if (!DNA_struct_member_exists(fd->
filesdna,
"ImageTile",
"int",
"gen_x")) {
4042 tile->gen_x = ima->gen_x;
4043 tile->gen_y = ima->gen_y;
4044 tile->gen_type = ima->gen_type;
4045 tile->gen_flag = ima->gen_flag;
4046 tile->gen_depth = ima->gen_depth;
4062 for (
int i = 0; i < mesh->faces_num; i++) {
4063 face_sets[i] =
abs(face_sets[i]);
4072 switch (sl->spacetype) {
4088 brush->automasking_cavity_factor = 0.5f;
4106 sima->
flag &= ~SI_FLAG_UNUSED_18;
4117 version_node_id(ntree, GEO_NODE_OFFSET_POINT_IN_CURVE,
"GeometryNodeOffsetPointInCurve");
4124 brush->automasking_cavity_factor = 1.0f;
4134 ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4139 region->v2d.flag &= ~V2D_VIEWSYNC_AREA_VERTICAL;
4157 if (node->type != GEO_NODE_SAMPLE_CURVE) {
4174 const float frame_center_x =
float(clip->lastsize[0]) / 2;
4175 const float frame_center_y =
float(clip->lastsize[1]) / 2;
4180 tracking->camera.principal_point[1] = (tracking->camera.principal_legacy[1] -
4194 if (!DNA_struct_member_exists(fd->
filesdna,
"Image",
"short",
"seam_margin")) {
4196 image->seam_margin = 8;
4223 light->radius = light->area_size;
4227 if (!DNA_struct_member_exists(
4228 fd->
filesdna,
"BuildGpencilModifierData",
"float",
"speed_fac") ||
4229 !DNA_struct_member_exists(
4230 fd->
filesdna,
"BuildGpencilModifierData",
"float",
"speed_maxgap"))
4245 const int CV_SCULPT_SELECTION_ENABLED = (1 << 1);
4247 curves_id->flag &= ~CV_SCULPT_SELECTION_ENABLED;
4257 bool after_armature =
false;
4269 after_armature =
false;
4273 after_armature =
true;
4281 after_armature =
false;
4294 if (node->type != GEO_NODE_DISTRIBUTE_POINTS_ON_FACES) {
4297 node->custom2 =
true;
4323 if (!DNA_struct_member_exists(fd->
filesdna,
"SceneEEVEE",
"int",
"shadow_pool_size")) {
4326 scene->eevee.shadow_pool_size = 512;
4345 if (ed !=
nullptr) {
4352 if (brush->curves_sculpt_settings->curve_parameter_falloff ==
nullptr) {
4354 1, 0.0f, 0.0f, 1.0f, 1.0f);
4362 if (!DNA_struct_member_exists(fd->
filesdna,
"View3DOverlay",
"float",
"retopology_offset")) {
4379 if (ed !=
nullptr) {
4401 const ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4406 region_main->
flag &= ~RGN_FLAG_HIDDEN;
4411 region_preview->
flag &= ~RGN_FLAG_HIDDEN;
4422 const char *tool_replace_table[][2] = {
4423 {
"selection_paint",
"Paint Selection"},
4425 {
"delete",
"Delete"},
4426 {
"density",
"Density"},
4428 {
"snake_hook",
"Snake Hook"},
4429 {
"grow_shrink",
"Grow / Shrink"},
4473 if (ed !=
nullptr) {
4492 if (ob->type !=
OB_ARMATURE || ob->pose ==
nullptr) {
4495 bPose *pose = ob->pose;
4507 short snap_mode_geom = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 4) | (1 << 5);
4508 scene->toolsettings->snap_mode_tools = snap_mode_geom;
4509 scene->toolsettings->plane_axis = 2;
4521 const ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
4525 region_main->
flag &= ~RGN_FLAG_HIDDEN;
4530 region_tools->
flag &= ~RGN_FLAG_HIDDEN;
4548 scene->toolsettings->uvcalc_iterations = 10;
4549 scene->toolsettings->uvcalc_weight_factor = 1.0f;
4550 STRNCPY(scene->toolsettings->uvcalc_weight_group,
"uv_importance");