666 if (sound->newpackedfile) {
667 sound->packedfile = sound->newpackedfile;
668 sound->newpackedfile =
nullptr;
687 if (ma->nodetree && ma->nodetree->id.name[0] ==
'\0') {
688 STRNCPY_UTF8(ma->nodetree->id.name,
"NTShader Nodetree");
694 enum { R_PANORAMA = (1 << 10) };
695 if (sce->nodetree && sce->nodetree->id.name[0] ==
'\0') {
696 STRNCPY_UTF8(sce->nodetree->id.name,
"NTCompositing Nodetree");
700 if (sce->r.mode & R_PANORAMA) {
711 sce->r.mode &= ~R_PANORAMA;
718 if (tx->nodetree->id.name[0] ==
'\0') {
719 STRNCPY_UTF8(tx->nodetree->id.name,
"NTTexture Nodetree");
742 part->ren_as = part->draw_as;
746 part->path_end = 1.0f;
747 part->clength = 1.0f;
783 pid->ptcaches->first = pid->ptcaches->last = pid->cache;
790 if (ob->totcol && ob->matbits ==
nullptr) {
794 for (a = 0; a < ob->totcol; a++) {
795 ob->matbits[a] = (ob->colbits & (1 << a)) != 0;
820 if (ob->flag & 8192) {
827 bool do_gravity =
false;
830 if (sce->unit.scale_length == 0.0f) {
831 sce->unit.scale_length = 1.0f;
840 fluidmd->
fss->
fmd = fluidmd;
849 if (sce->audio.main == 0.0f) {
850 sce->audio.main = 1.0f;
853 sce->r.ffcodecdata.audio_mixrate = sce->audio.mixrate;
854 sce->r.ffcodecdata.audio_volume = sce->audio.main;
855 sce->audio.distance_model = 2;
856 sce->audio.doppler_factor = 1.0f;
857 sce->audio.speed_of_sound = 343.3f;
865 sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f;
866 sce->physics_settings.gravity[2] = -9.81f;
876 part->effector_weights->global_gravity = part->acc[2] / -9.81f;
892 ob->soft->effector_weights->global_gravity = ob->soft->grav / 9.81f;
920 ob->rotAxis[1] = 1.0f;
926 pchan->rotAxis[1] = 1.0f;
940 Key *key =
static_cast<Key *
>(
946 &me->vert_data, CD_MVERT, me->verts_num);
947 for (a = 0; a < tot; a++,
data += 3) {
954 Key *key =
static_cast<Key *
>(
958 tot = std::min(lt->pntsu * lt->pntsv * lt->pntsw, key->
refkey->
totelem);
960 for (a = 0; a < tot; a++,
data += 3) {
967 Key *key =
static_cast<Key *
>(
976 for (a = 0; a < nu->pntsu; a++, bezt++) {
990 for (a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) {
1085 for (
i = 0;
i < band->
tot;
i++) {
1098 if (!sce->toolsettings->particle.selectmode) {
1146 if (sl == area->spacedata.first) {
1147 regionbase = &area->regionbase;
1150 regionbase = &sl->regionbase;
1177 if (sl == area->spacedata.first) {
1178 regionbase = &area->regionbase;
1181 regionbase = &sl->regionbase;
1184 if (sseq->
view == 0) {
1187 if (sseq->
mainb == 0) {
1191 ARegion *region_main =
nullptr;
1194 region_main = region;
1217 if (ob->pose && ob->data) {
1232 if (arm->
pathflag & ARM_PATH_FNUMS) {
1235 if (arm->
pathflag & ARM_PATH_KFRAS) {
1238 if (arm->
pathflag & ARM_PATH_KFNOS) {
1243 if (arm->
pathflag & ARM_PATH_HEADS) {
1248 if (arm->
pathflag & ARM_PATH_ACFRA) {
1277 pchan->limitmin[0] *=
float(
M_PI / 180.0);
1278 pchan->limitmin[1] *=
float(
M_PI / 180.0);
1279 pchan->limitmin[2] *=
float(
M_PI / 180.0);
1280 pchan->limitmax[0] *=
float(
M_PI / 180.0);
1281 pchan->limitmax[1] *=
float(
M_PI / 180.0);
1282 pchan->limitmax[2] *=
float(
M_PI / 180.0);
1297 if (sl == area->spacedata.first) {
1298 regionbase = &area->regionbase;
1301 regionbase = &sl->regionbase;
1307 region->v2d.cur.ymax = region->v2d.tot.ymax = 0.0f;
1308 region->v2d.cur.ymin = region->v2d.tot.ymin =
float(-area->winy) / 3.0f;
1320 if (sce->r.border.xmin == 0.0f && sce->r.border.ymin == 0.0f && sce->r.border.xmax == 0.0f &&
1321 sce->r.border.ymax == 0.0f)
1323 sce->r.border.xmin = 0.0f;
1324 sce->r.border.ymin = 0.0f;
1325 sce->r.border.xmax = 1.0f;
1326 sce->r.border.ymax = 1.0f;
1329 if ((sce->r.ffcodecdata.flags & FFMPEG_MULTIPLEX_AUDIO) == 0) {
1330 sce->r.ffcodecdata.audio_codec = 0x0;
1355 if (sl == area->spacedata.first) {
1356 regionbase = &area->regionbase;
1359 regionbase = &sl->regionbase;
1394 if (brush->curve_distance_falloff) {
1412 if (scene->nodetree) {
1413 bNode *node =
static_cast<bNode *
>(scene->nodetree->nodes.first);
1428 bNode *node =
static_cast<bNode *
>(ntree->nodes.first);
1472 if (sl == area->spacedata.first) {
1473 regionbase = &area->regionbase;
1476 regionbase = &sl->regionbase;
1479 snode->v2d.minzoom = std::min(snode->v2d.minzoom, 0.09f);
1480 snode->v2d.maxzoom = std::max(snode->v2d.maxzoom, 2.31f);
1484 region->v2d.minzoom = std::min(region->v2d.minzoom, 0.09f);
1485 region->v2d.maxzoom = std::max(region->v2d.maxzoom, 2.31f);
1501 enum { PARCURVE = 1 };
1536 for (
i = 0;
i < 20;
i++) {
1537 if (scene->lay & (1 <<
i)) {
1538 scene->layact = 1 <<
i;
1547 if (tex->saturation == 0.0f) {
1548 tex->saturation = 1.0f;
1553 cu->smallcaps_scale = 0.75f;
1568 if (brush->spacing == 0) {
1569 brush->spacing = 10;
1573 if (brush->alpha == 0) {
1574 brush->alpha = 1.0f;
1578 if (brush->unprojected_size == 0) {
1579 brush->unprojected_size = 0.125f;
1583 if (brush->size == 0) {
1588 if (brush->texture_overlay_alpha == 0) {
1589 brush->texture_overlay_alpha = 33;
1593 if (brush->crease_pinch_factor == 0) {
1594 brush->crease_pinch_factor = 0.5f;
1598 if (brush->plane_trim == 0) {
1599 brush->plane_trim = 0.5f;
1603 if (brush->smooth_stroke_radius == 0) {
1604 brush->smooth_stroke_radius = 75;
1608 if (brush->smooth_stroke_radius == 1) {
1609 brush->smooth_stroke_factor = 0.9f;
1613 if (brush->rate == 0) {
1624 brush->spacing = int(100 *
float(brush->spacing) /
float(brush->size));
1626 if (brush->add_col[0] == 0 && brush->add_col[1] == 0 && brush->add_col[2] == 0) {
1627 brush->add_col[0] = 1.00f;
1628 brush->add_col[1] = 0.39f;
1629 brush->add_col[2] = 0.39f;
1632 if (brush->sub_col[0] == 0 && brush->sub_col[1] == 0 && brush->sub_col[2] == 0) {
1633 brush->sub_col[0] = 0.39f;
1634 brush->sub_col[1] = 0.39f;
1635 brush->sub_col[2] = 1.00f;
1644 if (sce->toolsettings->sculpt_paint_unified_alpha == 0) {
1645 sce->toolsettings->sculpt_paint_unified_alpha = 0.5f;
1648 if (sce->toolsettings->sculpt_paint_unified_unprojected_radius == 0) {
1649 sce->toolsettings->sculpt_paint_unified_unprojected_radius = 0.125f;
1652 if (sce->toolsettings->sculpt_paint_unified_size == 0) {
1653 sce->toolsettings->sculpt_paint_unified_size = 35;
1698 if (br->ob_mode == 0) {
1705 part->boids->pitch = 1.0f;
1709 part->kink_amp_clump = 1.0f;
1729 region->v2d.minzoom = region->v2d.maxzoom = 1.0f;
1756 area =
static_cast<ScrArea *
>(screen->areabase.first);
1776 if (
IS_EQF(kb->slidermin, kb->slidermax) &&
IS_EQF(kb->slidermax, 0.0f)) {
1777 kb->slidermax = kb->slidermin + 1.0f;
1797 if (
is_zero_v3(ob->drotAxis) && ob->drotAngle == 0.0f) {
1813 if (sock->own_index >= ntree->cur_index) {
1814 ntree->cur_index = sock->own_index + 1;
1818 if (sock->own_index >= ntree->cur_index) {
1819 ntree->cur_index = sock->own_index + 1;
1830 ntree, sock->name, sock->type,
SOCK_IN);
1855 ntree, sock->name, sock->type,
SOCK_OUT);
1886 if (screen->redraws_flag == 0) {
1895 if (brush->height == 0) {
1896 brush->height = 0.4f;
1905 if (smd->
flag & MOD_SOLIDIFY_RIM_MATERIAL) {
1907 smd->
flag &= ~MOD_SOLIDIFY_RIM_MATERIAL;
1933 if (scene->nodetree) {
1937 nbd->percentx *= 100.0f;
1938 nbd->percenty *= 100.0f;
1957 View2D *v2d = ®ion->v2d;
1968 View2D *v2d = ®ion->v2d;
1980 part->bb_size[0] = part->bb_size[1] = 1.0f;
1986 scene->r.ffcodecdata.audio_channels = 2;
1987 scene->audio.volume = 1.0f;
2000 if (region->v2d.min[1] == 4.0f) {
2001 region->v2d.min[1] = 0.5f;
2010 if (region->v2d.min[1] == 4.0f) {
2011 region->v2d.min[1] = 0.5f;
2033 if ((fcu->flag & FCURVE_AUTO_HANDLES) == 0) {
2036 if ((fcu->totvert == 0) || (fcu->bezt ==
nullptr)) {
2041 for (bezt = fcu->bezt;
i < fcu->totvert;
i++, bezt++) {
2050 fcu->flag &= ~FCURVE_AUTO_HANDLES;
2085 part->courant_target = 0.2f;