665 if (sound->newpackedfile) {
666 sound->packedfile = sound->newpackedfile;
667 sound->newpackedfile =
nullptr;
686 if (ma->nodetree && ma->nodetree->id.name[0] ==
'\0') {
687 STRNCPY(ma->nodetree->id.name,
"NTShader Nodetree");
693 enum { R_PANORAMA = (1 << 10) };
694 if (sce->nodetree && sce->nodetree->id.name[0] ==
'\0') {
695 STRNCPY(sce->nodetree->id.name,
"NTCompositing Nodetree");
699 if (sce->r.mode & R_PANORAMA) {
710 sce->r.mode &= ~R_PANORAMA;
717 if (tx->nodetree->id.name[0] ==
'\0') {
718 STRNCPY(tx->nodetree->id.name,
"NTTexture Nodetree");
741 part->ren_as = part->draw_as;
745 part->path_end = 1.0f;
746 part->clength = 1.0f;
782 pid->ptcaches->first = pid->ptcaches->last = pid->cache;
789 if (ob->totcol && ob->matbits ==
nullptr) {
793 for (a = 0; a < ob->totcol; a++) {
794 ob->matbits[a] = (ob->colbits & (1 << a)) != 0;
801 if (tex->afmax == 0) {
826 if (ob->flag & 8192) {
833 bool do_gravity =
false;
836 if (sce->unit.scale_length == 0.0f) {
837 sce->unit.scale_length = 1.0f;
846 fluidmd->
fss->
fmd = fluidmd;
855 if (sce->audio.main == 0.0f) {
856 sce->audio.main = 1.0f;
859 sce->r.ffcodecdata.audio_mixrate = sce->audio.mixrate;
860 sce->r.ffcodecdata.audio_volume = sce->audio.main;
861 sce->audio.distance_model = 2;
862 sce->audio.doppler_factor = 1.0f;
863 sce->audio.speed_of_sound = 343.3f;
871 sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f;
872 sce->physics_settings.gravity[2] = -9.81f;
882 part->effector_weights->global_gravity = part->acc[2] / -9.81f;
898 ob->soft->effector_weights->global_gravity = ob->soft->grav / 9.81f;
926 ob->rotAxis[1] = 1.0f;
932 pchan->rotAxis[1] = 1.0f;
946 Key *key =
static_cast<Key *
>(
952 &me->vert_data, CD_MVERT, me->verts_num);
953 for (a = 0; a < tot; a++,
data += 3) {
960 Key *key =
static_cast<Key *
>(
964 tot = std::min(lt->pntsu * lt->pntsv * lt->pntsw, key->
refkey->
totelem);
966 for (a = 0; a < tot; a++,
data += 3) {
973 Key *key =
static_cast<Key *
>(
982 for (a = 0; a < nu->pntsu; a++, bezt++) {
996 for (a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) {
1091 for (
i = 0;
i < band->
tot;
i++) {
1104 if (!sce->toolsettings->particle.selectmode) {
1152 if (sl == area->spacedata.first) {
1153 regionbase = &area->regionbase;
1156 regionbase = &sl->regionbase;
1183 if (sl == area->spacedata.first) {
1184 regionbase = &area->regionbase;
1187 regionbase = &sl->regionbase;
1190 if (sseq->
view == 0) {
1193 if (sseq->
mainb == 0) {
1197 ARegion *region_main =
nullptr;
1200 region_main = region;
1223 if (ob->pose && ob->data) {
1238 if (arm->
pathflag & ARM_PATH_FNUMS) {
1241 if (arm->
pathflag & ARM_PATH_KFRAS) {
1244 if (arm->
pathflag & ARM_PATH_KFNOS) {
1249 if (arm->
pathflag & ARM_PATH_HEADS) {
1254 if (arm->
pathflag & ARM_PATH_ACFRA) {
1283 pchan->limitmin[0] *= float(
M_PI / 180.0);
1284 pchan->limitmin[1] *= float(
M_PI / 180.0);
1285 pchan->limitmin[2] *= float(
M_PI / 180.0);
1286 pchan->limitmax[0] *= float(
M_PI / 180.0);
1287 pchan->limitmax[1] *= float(
M_PI / 180.0);
1288 pchan->limitmax[2] *= float(
M_PI / 180.0);
1303 if (sl == area->spacedata.first) {
1304 regionbase = &area->regionbase;
1307 regionbase = &sl->regionbase;
1313 region->v2d.cur.ymax = region->v2d.tot.ymax = 0.0f;
1314 region->v2d.cur.ymin = region->v2d.tot.ymin = float(-area->winy) / 3.0f;
1326 if (sce->r.border.xmin == 0.0f && sce->r.border.ymin == 0.0f && sce->r.border.xmax == 0.0f &&
1327 sce->r.border.ymax == 0.0f)
1329 sce->r.border.xmin = 0.0f;
1330 sce->r.border.ymin = 0.0f;
1331 sce->r.border.xmax = 1.0f;
1332 sce->r.border.ymax = 1.0f;
1335 if ((sce->r.ffcodecdata.flags & FFMPEG_MULTIPLEX_AUDIO) == 0) {
1336 sce->r.ffcodecdata.audio_codec = 0x0;
1361 if (sl == area->spacedata.first) {
1362 regionbase = &area->regionbase;
1365 regionbase = &sl->regionbase;
1418 if (scene->nodetree) {
1419 bNode *node =
static_cast<bNode *
>(scene->nodetree->nodes.first);
1434 bNode *node =
static_cast<bNode *
>(ntree->nodes.first);
1478 if (sl == area->spacedata.first) {
1479 regionbase = &area->regionbase;
1482 regionbase = &sl->regionbase;
1485 snode->v2d.minzoom = std::min(snode->v2d.minzoom, 0.09f);
1486 snode->v2d.maxzoom = std::max(snode->v2d.maxzoom, 2.31f);
1490 region->v2d.minzoom = std::min(region->v2d.minzoom, 0.09f);
1491 region->v2d.maxzoom = std::max(region->v2d.maxzoom, 2.31f);
1507 enum { PARCURVE = 1 };
1542 for (
i = 0;
i < 20;
i++) {
1543 if (scene->lay & (1 <<
i)) {
1544 scene->layact = 1 <<
i;
1553 if (tex->saturation == 0.0f) {
1554 tex->saturation = 1.0f;
1559 cu->smallcaps_scale = 0.75f;
1574 if (brush->spacing == 0) {
1575 brush->spacing = 10;
1579 if (brush->alpha == 0) {
1580 brush->alpha = 1.0f;
1584 if (brush->unprojected_radius == 0) {
1585 brush->unprojected_radius = 0.125f;
1589 if (brush->size == 0) {
1594 if (brush->texture_overlay_alpha == 0) {
1595 brush->texture_overlay_alpha = 33;
1599 if (brush->crease_pinch_factor == 0) {
1600 brush->crease_pinch_factor = 0.5f;
1604 if (brush->plane_trim == 0) {
1605 brush->plane_trim = 0.5f;
1609 if (brush->smooth_stroke_radius == 0) {
1610 brush->smooth_stroke_radius = 75;
1614 if (brush->smooth_stroke_radius == 1) {
1615 brush->smooth_stroke_factor = 0.9f;
1619 if (brush->rate == 0) {
1630 brush->spacing = int(100 *
float(brush->spacing) /
float(brush->size));
1632 if (brush->add_col[0] == 0 && brush->add_col[1] == 0 && brush->add_col[2] == 0) {
1633 brush->add_col[0] = 1.00f;
1634 brush->add_col[1] = 0.39f;
1635 brush->add_col[2] = 0.39f;
1638 if (brush->sub_col[0] == 0 && brush->sub_col[1] == 0 && brush->sub_col[2] == 0) {
1639 brush->sub_col[0] = 0.39f;
1640 brush->sub_col[1] = 0.39f;
1641 brush->sub_col[2] = 1.00f;
1650 if (sce->toolsettings->sculpt_paint_unified_alpha == 0) {
1651 sce->toolsettings->sculpt_paint_unified_alpha = 0.5f;
1654 if (sce->toolsettings->sculpt_paint_unified_unprojected_radius == 0) {
1655 sce->toolsettings->sculpt_paint_unified_unprojected_radius = 0.125f;
1658 if (sce->toolsettings->sculpt_paint_unified_size == 0) {
1659 sce->toolsettings->sculpt_paint_unified_size = 35;
1704 if (br->ob_mode == 0) {
1711 part->boids->pitch = 1.0f;
1715 part->kink_amp_clump = 1.0f;
1735 region->v2d.minzoom = region->v2d.maxzoom = 1.0f;
1762 area =
static_cast<ScrArea *
>(screen->areabase.first);
1782 if (
IS_EQF(kb->slidermin, kb->slidermax) &&
IS_EQF(kb->slidermax, 0.0f)) {
1783 kb->slidermax = kb->slidermin + 1.0f;
1803 if (
is_zero_v3(ob->drotAxis) && ob->drotAngle == 0.0f) {
1819 if (sock->own_index >= ntree->cur_index) {
1820 ntree->cur_index = sock->own_index + 1;
1824 if (sock->own_index >= ntree->cur_index) {
1825 ntree->cur_index = sock->own_index + 1;
1836 ntree, sock->name, sock->type,
SOCK_IN);
1861 ntree, sock->name, sock->type,
SOCK_OUT);
1892 if (screen->redraws_flag == 0) {
1901 if (brush->height == 0) {
1902 brush->height = 0.4f;
1911 if (smd->
flag & MOD_SOLIDIFY_RIM_MATERIAL) {
1913 smd->
flag &= ~MOD_SOLIDIFY_RIM_MATERIAL;
1939 if (scene->nodetree) {
1963 View2D *v2d = ®ion->v2d;
1974 View2D *v2d = ®ion->v2d;
1986 part->bb_size[0] = part->bb_size[1] = 1.0f;
1992 scene->r.ffcodecdata.audio_channels = 2;
1993 scene->audio.volume = 1.0f;
2006 if (region->v2d.min[1] == 4.0f) {
2007 region->v2d.min[1] = 0.5f;
2016 if (region->v2d.min[1] == 4.0f) {
2017 region->v2d.min[1] = 0.5f;
2039 if ((fcu->flag & FCURVE_AUTO_HANDLES) == 0) {
2042 if ((fcu->totvert == 0) || (fcu->bezt ==
nullptr)) {
2047 for (bezt = fcu->bezt;
i < fcu->totvert;
i++, bezt++) {
2056 fcu->flag &= ~FCURVE_AUTO_HANDLES;
2091 part->courant_target = 0.2f;