671 if (sound->newpackedfile) {
672 sound->packedfile = sound->newpackedfile;
673 sound->newpackedfile =
nullptr;
692 if (ma->nodetree && ma->nodetree->id.name[0] ==
'\0') {
693 STRNCPY(ma->nodetree->id.name,
"NTShader Nodetree");
699 enum { R_PANORAMA = (1 << 10) };
700 if (sce->nodetree && sce->nodetree->id.name[0] ==
'\0') {
701 STRNCPY(sce->nodetree->id.name,
"NTCompositing Nodetree");
705 if (sce->r.mode & R_PANORAMA) {
716 sce->r.mode &= ~R_PANORAMA;
723 if (tx->nodetree->id.name[0] ==
'\0') {
724 STRNCPY(tx->nodetree->id.name,
"NTTexture Nodetree");
729 if (node->type == TEX_NODE_OUTPUT) {
747 part->ren_as = part->draw_as;
751 part->path_end = 1.0f;
752 part->clength = 1.0f;
788 pid->ptcaches->first = pid->ptcaches->last = pid->cache;
795 if (ob->totcol && ob->matbits ==
nullptr) {
798 ob->matbits =
static_cast<char *
>(
800 for (a = 0; a < ob->totcol; a++) {
801 ob->matbits[a] = (ob->colbits & (1 << a)) != 0;
833 if (ob->flag & 8192) {
840 bool do_gravity =
false;
843 if (sce->unit.scale_length == 0.0f) {
844 sce->unit.scale_length = 1.0f;
853 fluidmd->
fss->
fmd = fluidmd;
862 if (sce->audio.main == 0.0f) {
863 sce->audio.main = 1.0f;
866 sce->r.ffcodecdata.audio_mixrate = sce->audio.mixrate;
867 sce->r.ffcodecdata.audio_volume = sce->audio.main;
868 sce->audio.distance_model = 2;
869 sce->audio.doppler_factor = 1.0f;
870 sce->audio.speed_of_sound = 343.3f;
878 sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f;
879 sce->physics_settings.gravity[2] = -9.81f;
889 part->effector_weights->global_gravity = part->acc[2] / -9.81f;
905 ob->soft->effector_weights->global_gravity = ob->soft->grav / 9.81f;
933 ob->rotAxis[1] = 1.0f;
939 pchan->rotAxis[1] = 1.0f;
954 if ((key =
static_cast<Key *
>(
958 data =
static_cast<const float *
>(key->
refkey->
data);
961 &me->vert_data, CD_MVERT, me->verts_num);
962 for (a = 0; a < tot; a++, data += 3) {
969 if ((key =
static_cast<Key *
>(
973 data =
static_cast<const float *
>(key->
refkey->
data);
974 tot = std::min(lt->pntsu * lt->pntsv * lt->pntsw, key->
refkey->
totelem);
976 for (a = 0; a < tot; a++, data += 3) {
983 if ((key =
static_cast<Key *
>(
987 data =
static_cast<const float *
>(key->
refkey->
data);
993 for (a = 0; a < nu->pntsu; a++, bezt++) {
1007 for (a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) {
1102 for (i = 0; i < band->
tot; i++) {
1115 if (!sce->toolsettings->particle.selectmode) {
1163 if (sl == area->spacedata.first) {
1164 regionbase = &area->regionbase;
1167 regionbase = &sl->regionbase;
1194 if (sl == area->spacedata.first) {
1195 regionbase = &area->regionbase;
1198 regionbase = &sl->regionbase;
1201 if (sseq->
view == 0) {
1204 if (sseq->
mainb == 0) {
1208 ARegion *region_main =
nullptr;
1211 region_main = region;
1235 if (ob->pose && ob->data) {
1250 if (arm->
pathflag & ARM_PATH_FNUMS) {
1253 if (arm->
pathflag & ARM_PATH_KFRAS) {
1256 if (arm->
pathflag & ARM_PATH_KFNOS) {
1261 if (arm->
pathflag & ARM_PATH_HEADS) {
1266 if (arm->
pathflag & ARM_PATH_ACFRA) {
1295 pchan->limitmin[0] *=
float(
M_PI / 180.0);
1296 pchan->limitmin[1] *=
float(
M_PI / 180.0);
1297 pchan->limitmin[2] *=
float(
M_PI / 180.0);
1298 pchan->limitmax[0] *=
float(
M_PI / 180.0);
1299 pchan->limitmax[1] *=
float(
M_PI / 180.0);
1300 pchan->limitmax[2] *=
float(
M_PI / 180.0);
1315 if (sl == area->spacedata.first) {
1316 regionbase = &area->regionbase;
1319 regionbase = &sl->regionbase;
1325 region->v2d.cur.ymax = region->v2d.tot.ymax = 0.0f;
1326 region->v2d.cur.ymin = region->v2d.tot.ymin =
float(-area->winy) / 3.0f;
1338 if (sce->r.border.xmin == 0.0f && sce->r.border.ymin == 0.0f && sce->r.border.xmax == 0.0f &&
1339 sce->r.border.ymax == 0.0f)
1341 sce->r.border.xmin = 0.0f;
1342 sce->r.border.ymin = 0.0f;
1343 sce->r.border.xmax = 1.0f;
1344 sce->r.border.ymax = 1.0f;
1347 if ((sce->r.ffcodecdata.flags & FFMPEG_MULTIPLEX_AUDIO) == 0) {
1348 sce->r.ffcodecdata.audio_codec = 0x0;
1373 if (sl == area->spacedata.first) {
1374 regionbase = &area->regionbase;
1377 regionbase = &sl->regionbase;
1405 v3d->
flag2 &= ~V3D_HIDE_OVERLAYS;
1432 if (scene->nodetree) {
1433 bNode *node =
static_cast<bNode *
>(scene->nodetree->nodes.first);
1436 if (node->type == CMP_NODE_COLORBALANCE) {
1448 bNode *node =
static_cast<bNode *
>(ntree->nodes.first);
1451 if (node->type == CMP_NODE_COLORBALANCE) {
1492 if (sl == area->spacedata.first) {
1493 regionbase = &area->regionbase;
1496 regionbase = &sl->regionbase;
1499 if (snode->v2d.minzoom > 0.09f) {
1500 snode->v2d.minzoom = 0.09f;
1502 if (snode->v2d.maxzoom < 2.31f) {
1503 snode->v2d.maxzoom = 2.31f;
1508 if (region->v2d.minzoom > 0.09f) {
1509 region->v2d.minzoom = 0.09f;
1511 if (region->v2d.maxzoom < 2.31f) {
1512 region->v2d.maxzoom = 2.31f;
1529 enum { PARCURVE = 1 };
1564 for (i = 0; i < 20; i++) {
1565 if (scene->lay & (1 << i)) {
1566 scene->layact = 1 << i;
1581 cu->smallcaps_scale = 0.75f;
1596 if (brush->spacing == 0) {
1597 brush->spacing = 10;
1601 if (brush->alpha == 0) {
1602 brush->alpha = 1.0f;
1606 if (brush->unprojected_radius == 0) {
1607 brush->unprojected_radius = 0.125f;
1611 if (brush->size == 0) {
1616 if (brush->texture_overlay_alpha == 0) {
1617 brush->texture_overlay_alpha = 33;
1621 if (brush->crease_pinch_factor == 0) {
1622 brush->crease_pinch_factor = 0.5f;
1626 if (brush->plane_trim == 0) {
1627 brush->plane_trim = 0.5f;
1631 if (brush->smooth_stroke_radius == 0) {
1632 brush->smooth_stroke_radius = 75;
1636 if (brush->smooth_stroke_radius == 1) {
1637 brush->smooth_stroke_factor = 0.9f;
1641 if (brush->rate == 0) {
1652 brush->spacing =
int(100 *
float(brush->spacing) /
float(brush->size));
1654 if (brush->add_col[0] == 0 && brush->add_col[1] == 0 && brush->add_col[2] == 0) {
1655 brush->add_col[0] = 1.00f;
1656 brush->add_col[1] = 0.39f;
1657 brush->add_col[2] = 0.39f;
1660 if (brush->sub_col[0] == 0 && brush->sub_col[1] == 0 && brush->sub_col[2] == 0) {
1661 brush->sub_col[0] = 0.39f;
1662 brush->sub_col[1] = 0.39f;
1663 brush->sub_col[2] = 1.00f;
1672 if (sce->toolsettings->sculpt_paint_unified_alpha == 0) {
1673 sce->toolsettings->sculpt_paint_unified_alpha = 0.5f;
1676 if (sce->toolsettings->sculpt_paint_unified_unprojected_radius == 0) {
1677 sce->toolsettings->sculpt_paint_unified_unprojected_radius = 0.125f;
1680 if (sce->toolsettings->sculpt_paint_unified_size == 0) {
1681 sce->toolsettings->sculpt_paint_unified_size = 35;
1726 if (br->ob_mode == 0) {
1733 part->boids->pitch = 1.0f;
1736 part->flag &= ~PART_HAIR_REGROW;
1737 part->kink_amp_clump = 1.0f;
1757 region->v2d.minzoom = region->v2d.maxzoom = 1.0f;
1784 area =
static_cast<ScrArea *
>(screen->areabase.first);
1804 if (
IS_EQF(kb->slidermin, kb->slidermax) &&
IS_EQF(kb->slidermax, 0.0f)) {
1805 kb->slidermax = kb->slidermin + 1.0f;
1825 if (
is_zero_v3(ob->drotAxis) && ob->drotAngle == 0.0f) {
1841 if (sock->own_index >= ntree->cur_index) {
1842 ntree->cur_index = sock->own_index + 1;
1846 if (sock->own_index >= ntree->cur_index) {
1847 ntree->cur_index = sock->own_index + 1;
1858 ntree, sock->name, sock->type,
SOCK_IN);
1883 ntree, sock->name, sock->type,
SOCK_OUT);
1914 if (screen->redraws_flag == 0) {
1923 if (brush->height == 0) {
1924 brush->height = 0.4f;
1933 if (smd->
flag & MOD_SOLIDIFY_RIM_MATERIAL) {
1935 smd->
flag &= ~MOD_SOLIDIFY_RIM_MATERIAL;
1961 if (scene->nodetree) {
1963 if (node->type == CMP_NODE_BLUR) {
1985 View2D *v2d = ®ion->v2d;
1996 View2D *v2d = ®ion->v2d;
2008 part->bb_size[0] = part->bb_size[1] = 1.0f;
2014 scene->r.ffcodecdata.audio_channels = 2;
2015 scene->audio.volume = 1.0f;
2028 if (region->v2d.min[1] == 4.0f) {
2029 region->v2d.min[1] = 0.5f;
2038 if (region->v2d.min[1] == 4.0f) {
2039 region->v2d.min[1] = 0.5f;
2061 if ((fcu->flag & FCURVE_AUTO_HANDLES) == 0) {
2064 if ((fcu->totvert == 0) || (fcu->bezt ==
nullptr)) {
2069 for (bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
2078 fcu->flag &= ~FCURVE_AUTO_HANDLES;
2113 part->courant_target = 0.2f;
2114 part->time_flag &= ~PART_TIME_AUTOSF;