Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-06-17 18:05:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-17 18:05:51 +0300
commit6fc8a74886a30f89562bb542ef3b24cc64b3208a (patch)
treedf0503b6cf4f6b762eca66b90f4360c495d624aa /source/blender/blenkernel/intern/scene.c
parenta262ea8c47f8106f66e16935c556f383ef306861 (diff)
Cleanup: trailing space for blenkernel
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c114
1 files changed, 57 insertions, 57 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index ca2c683a5ad..a1003910ca3 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -131,10 +131,10 @@ static void remove_sequencer_fcurves(Scene *sce)
if (adt && adt->action) {
FCurve *fcu, *nextfcu;
-
+
for (fcu = adt->action->curves.first; fcu; fcu = nextfcu) {
nextfcu = fcu->next;
-
+
if ((fcu->rna_path) && strstr(fcu->rna_path, "sequences_all")) {
action_groups_remove_channel(adt->action, fcu);
free_fcurve(fcu);
@@ -499,14 +499,14 @@ void BKE_scene_free(Scene *sce)
BLI_freelistN(&sce->transform_spaces);
BLI_freelistN(&sce->r.layers);
BLI_freelistN(&sce->r.views);
-
+
BKE_toolsettings_free(sce->toolsettings);
sce->toolsettings = NULL;
-
+
DAG_scene_free(sce);
if (sce->depsgraph)
DEG_graph_free(sce->depsgraph);
-
+
MEM_SAFE_FREE(sce->stats);
MEM_SAFE_FREE(sce->fps_info);
@@ -529,7 +529,7 @@ void BKE_scene_init(Scene *sce)
BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(sce, id));
sce->lay = sce->layact = 1;
-
+
sce->r.mode = R_GAMMA | R_OSA | R_SHADOW | R_SSS | R_ENVMAP | R_RAYTRACE;
sce->r.cfra = 1;
sce->r.sfra = 1;
@@ -569,7 +569,7 @@ void BKE_scene_init(Scene *sce)
sce->r.color_mgt_flag |= R_COLOR_MANAGEMENT;
sce->r.gauss = 1.0;
-
+
/* deprecated but keep for upwards compat */
sce->r.postgamma = 1.0;
sce->r.posthue = 0.0;
@@ -626,7 +626,7 @@ void BKE_scene_init(Scene *sce)
sce->r.border.ymax = 1.0f;
sce->r.preview_start_resolution = 64;
-
+
sce->r.line_thickness_mode = R_LINE_THICKNESS_ABSOLUTE;
sce->r.unit_line_thickness = 1.0f;
@@ -762,7 +762,7 @@ void BKE_scene_init(Scene *sce)
sce->gm.gravity = 9.8f;
sce->gm.physicsEngine = WOPHY_BULLET;
- sce->gm.mode = 32; //XXX ugly harcoding, still not sure we should drop mode. 32 == 1 << 5 == use_occlusion_culling
+ sce->gm.mode = 32; //XXX ugly harcoding, still not sure we should drop mode. 32 == 1 << 5 == use_occlusion_culling
sce->gm.occlusionRes = 128;
sce->gm.ticrate = 60;
sce->gm.maxlogicstep = 5;
@@ -814,22 +814,22 @@ void BKE_scene_init(Scene *sce)
copy_v2_fl2(sce->safe_areas.action_center, 15.0f / 100.0f, 5.0f / 100.0f);
sce->preview = NULL;
-
+
/* GP Sculpt brushes */
{
GP_BrushEdit_Settings *gset = &sce->toolsettings->gp_sculpt;
GP_EditBrush_Data *gp_brush;
-
+
gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_SMOOTH];
gp_brush->size = 25;
gp_brush->strength = 0.3f;
gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF | GP_EDITBRUSH_FLAG_SMOOTH_PRESSURE;
-
+
gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_THICKNESS];
gp_brush->size = 25;
gp_brush->strength = 0.5f;
gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
-
+
gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_STRENGTH];
gp_brush->size = 25;
gp_brush->strength = 0.5f;
@@ -839,28 +839,28 @@ void BKE_scene_init(Scene *sce)
gp_brush->size = 50;
gp_brush->strength = 0.3f;
gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
-
+
gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_PUSH];
gp_brush->size = 25;
gp_brush->strength = 0.3f;
gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
-
+
gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_TWIST];
gp_brush->size = 50;
gp_brush->strength = 0.3f; // XXX?
gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
-
+
gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_PINCH];
gp_brush->size = 50;
gp_brush->strength = 0.5f; // XXX?
gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
-
+
gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_RANDOMIZE];
gp_brush->size = 25;
gp_brush->strength = 0.5f;
gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
}
-
+
/* GP Stroke Placement */
sce->toolsettings->gpencil_v3d_align = GP_PROJECT_VIEWSPACE;
sce->toolsettings->gpencil_v2d_align = GP_PROJECT_VIEWSPACE;
@@ -912,10 +912,10 @@ void BKE_scene_set_background(Main *bmain, Scene *scene)
Group *group;
GroupObject *go;
int flag;
-
+
/* check for cyclic sets, for reading old files but also for definite security (py?) */
BKE_scene_validate_setscene(bmain, scene);
-
+
/* can happen when switching modes in other scenes */
if (scene->obedit && !(scene->obedit->mode & OB_MODE_EDIT))
scene->obedit = NULL;
@@ -941,12 +941,12 @@ void BKE_scene_set_background(Main *bmain, Scene *scene)
for (base = scene->base.first; base; base = base->next) {
ob = base->object;
ob->lay = base->lay;
-
+
/* group patch... */
base->flag &= ~(OB_FROMGROUP);
flag = ob->flag & (OB_FROMGROUP);
base->flag |= flag;
-
+
/* not too nice... for recovering objects with lost data */
//if (ob->pose == NULL) base->flag &= ~OB_POSEMODE;
ob->flag = base->flag;
@@ -973,7 +973,7 @@ int BKE_scene_base_iter_next(Main *bmain, EvaluationContext *eval_ctx, SceneBase
Scene **scene, int val, Base **base, Object **ob)
{
bool run_again = true;
-
+
/* init */
if (val == 0) {
iter->phase = F_START;
@@ -1027,19 +1027,19 @@ int BKE_scene_base_iter_next(Main *bmain, EvaluationContext *eval_ctx, SceneBase
}
}
}
-
+
if (*base == NULL) {
iter->phase = F_START;
}
else {
if (iter->phase != F_DUPLI) {
if ( (*base)->object->transflag & OB_DUPLI) {
- /* groups cannot be duplicated for mballs yet,
- * this enters eternal loop because of
+ /* groups cannot be duplicated for mballs yet,
+ * this enters eternal loop because of
* makeDispListMBall getting called inside of group_duplilist */
if ((*base)->object->dup_group == NULL) {
iter->duplilist = object_duplilist_ex(bmain, eval_ctx, (*scene), (*base)->object, false);
-
+
iter->dupob = iter->duplilist->first;
if (!iter->dupob) {
@@ -1072,13 +1072,13 @@ int BKE_scene_base_iter_next(Main *bmain, EvaluationContext *eval_ctx, SceneBase
else if (iter->phase == F_DUPLI) {
iter->phase = F_SCENE;
(*base)->flag &= ~OB_FROMDUPLI;
-
+
if (iter->dupli_refob) {
/* Restore last object's real matrix. */
copy_m4_m4(iter->dupli_refob->obmat, iter->omat);
iter->dupli_refob = NULL;
}
-
+
free_object_duplilist(iter->duplilist);
iter->duplilist = NULL;
run_again = true;
@@ -1099,7 +1099,7 @@ int BKE_scene_base_iter_next(Main *bmain, EvaluationContext *eval_ctx, SceneBase
Object *BKE_scene_camera_find(Scene *sc)
{
Base *base;
-
+
for (base = sc->base.first; base; base = base->next)
if (base->object->type == OB_CAMERA)
return base->object;
@@ -1225,7 +1225,7 @@ void BKE_scene_base_unlink(Scene *sce, Base *base)
/* remove rigid body object from world before removing object */
if (base->object->rigidbody_object)
BKE_rigidbody_remove_object(sce, base->object);
-
+
BLI_remlink(&sce->base, base);
if (sce->basact == base)
sce->basact = NULL;
@@ -1257,7 +1257,7 @@ bool BKE_scene_validate_setscene(Main *bmain, Scene *sce)
if (sce->set == NULL) return true;
totscene = BLI_listbase_count(&bmain->scene);
-
+
for (a = 0, sce_iter = sce; sce_iter->set; sce_iter = sce_iter->set, a++) {
/* more iterations than scenes means we have a cycle */
if (a > totscene) {
@@ -1284,7 +1284,7 @@ float BKE_scene_frame_get_from_ctime(const Scene *scene, const float frame)
float ctime = frame;
ctime += scene->r.subframe;
ctime *= scene->r.framelen;
-
+
return ctime;
}
@@ -1299,7 +1299,7 @@ void BKE_scene_frame_set(struct Scene *scene, double cfra)
}
#ifdef WITH_LEGACY_DEPSGRAPH
-/* drivers support/hacks
+/* drivers support/hacks
* - this method is called from scene_update_tagged_recursive(), so gets included in viewport + render
* - these are always run since the depsgraph can't handle non-object data
* - these happen after objects are all done so that we can read in their final transform values,
@@ -1309,7 +1309,7 @@ static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
{
SceneRenderLayer *srl;
float ctime = BKE_scene_frame_get(scene);
-
+
/* scene itself */
if (scene->adt && scene->adt->drivers.first) {
BKE_animsys_evaluate_animdata(scene, &scene->id, scene->adt, ctime, ADT_RECALC_DRIVERS);
@@ -1320,16 +1320,16 @@ static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
if (scene->world) {
ID *wid = (ID *)scene->world;
AnimData *adt = BKE_animdata_from_id(wid);
-
+
if (adt && adt->drivers.first)
BKE_animsys_evaluate_animdata(scene, wid, adt, ctime, ADT_RECALC_DRIVERS);
}
-
+
/* nodes */
if (scene->nodetree) {
ID *nid = (ID *)scene->nodetree;
AnimData *adt = BKE_animdata_from_id(nid);
-
+
if (adt && adt->drivers.first)
BKE_animsys_evaluate_animdata(scene, nid, adt, ctime, ADT_RECALC_DRIVERS);
}
@@ -1338,7 +1338,7 @@ static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
if (scene->world && scene->world->nodetree) {
ID *nid = (ID *)scene->world->nodetree;
AnimData *adt = BKE_animdata_from_id(nid);
-
+
if (adt && adt->drivers.first)
BKE_animsys_evaluate_animdata(scene, nid, adt, ctime, ADT_RECALC_DRIVERS);
}
@@ -1364,32 +1364,32 @@ static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
static void scene_depsgraph_hack(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, Scene *scene_parent)
{
Base *base;
-
+
scene->customdata_mask = scene_parent->customdata_mask;
-
+
/* sets first, we allow per definition current scene to have
* dependencies on sets, but not the other way around. */
if (scene->set)
scene_depsgraph_hack(bmain, eval_ctx, scene->set, scene_parent);
-
+
for (base = scene->base.first; base; base = base->next) {
Object *ob = base->object;
-
+
if (ob->depsflag) {
int recalc = 0;
// printf("depshack %s\n", ob->id.name + 2);
-
+
if (ob->depsflag & OB_DEPS_EXTRA_OB_RECALC)
recalc |= OB_RECALC_OB;
if (ob->depsflag & OB_DEPS_EXTRA_DATA_RECALC)
recalc |= OB_RECALC_DATA;
-
+
ob->recalc |= recalc;
BKE_object_handle_update(bmain, eval_ctx, scene_parent, ob);
-
+
if (ob->dup_group && (ob->transflag & OB_DUPLIGROUP)) {
GroupObject *go;
-
+
for (go = ob->dup_group->gobject.first; go; go = go->next) {
if (go->ob)
go->ob->recalc |= recalc;
@@ -1782,7 +1782,7 @@ static void scene_update_tagged_recursive(EvaluationContext *eval_ctx, Main *bma
/* update masking curves */
BKE_mask_update_scene(bmain, scene);
-
+
}
#endif /* WITH_LEGACY_DEPSGRAPH */
@@ -1868,9 +1868,9 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc
DAG_ids_flush_tagged(bmain);
/* removed calls to quick_cache, see pointcache.c */
-
+
/* clear "LIB_TAG_DOIT" flag from all materials, to prevent infinite recursion problems later
- * when trying to find materials with drivers that need evaluating [#32017]
+ * when trying to find materials with drivers that need evaluating [#32017]
*/
BKE_main_id_tag_idcode(bmain, ID_MA, LIB_TAG_DOIT, false);
BKE_main_id_tag_idcode(bmain, ID_LA, LIB_TAG_DOIT, false);
@@ -1897,7 +1897,7 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc
{
AnimData *adt = BKE_animdata_from_id(&scene->id);
float ctime = BKE_scene_frame_get(scene);
-
+
if (adt && (adt->recalc & ADT_RECALC_ANIM))
BKE_animsys_evaluate_animdata(scene, &scene->id, adt, ctime, 0);
}
@@ -1975,7 +1975,7 @@ void BKE_scene_update_for_newframe_ex(EvaluationContext *eval_ctx, Main *bmain,
/* update animated image textures for particles, modifiers, gpu, etc,
* call this at the start so modifiers with textures don't lag 1 frame */
BKE_image_update_frame(bmain, sce->r.cfra);
-
+
#ifdef WITH_LEGACY_DEPSGRAPH
/* rebuild rigid body worlds before doing the actual frame update
* this needs to be done on start frame but animation playback usually starts one frame later
@@ -1985,9 +1985,9 @@ void BKE_scene_update_for_newframe_ex(EvaluationContext *eval_ctx, Main *bmain,
scene_rebuild_rbw_recursive(sce, ctime);
}
#endif
-
+
BKE_sound_set_cfra(sce->r.cfra);
-
+
/* clear animation overrides */
/* XXX TODO... */
@@ -2029,7 +2029,7 @@ void BKE_scene_update_for_newframe_ex(EvaluationContext *eval_ctx, Main *bmain,
#endif
/* clear "LIB_TAG_DOIT" flag from all materials, to prevent infinite recursion problems later
- * when trying to find materials with drivers that need evaluating [#32017]
+ * when trying to find materials with drivers that need evaluating [#32017]
*/
BKE_main_id_tag_idcode(bmain, ID_MA, LIB_TAG_DOIT, false);
BKE_main_id_tag_idcode(bmain, ID_LA, LIB_TAG_DOIT, false);
@@ -2041,7 +2041,7 @@ void BKE_scene_update_for_newframe_ex(EvaluationContext *eval_ctx, Main *bmain,
scene_do_rb_simulation_recursive(sce, ctime);
}
#endif
-
+
/* BKE_object_handle_update() on all objects, groups and sets */
#ifdef WITH_LEGACY_DEPSGRAPH
if (use_new_eval) {
@@ -2347,7 +2347,7 @@ int BKE_render_num_threads(const RenderData *rd)
threads = rd->threads;
else
threads = BLI_system_thread_count();
-
+
return max_ii(threads, 1);
}