diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-23 18:51:49 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-23 19:58:01 +0300 |
commit | b79b8478ee3bb1b115c5d6b8bdb0cc74d5169955 (patch) | |
tree | d67b529dc95488186255631660d3251cfb5da5da /source/blender/editors/physics/particle_object.c | |
parent | 2f9df08aa8eaad1127f1b44aed518e1beaf91df7 (diff) |
Cleanup: Rename ViewLayer *sl > ViewLayer *view_layer
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 8979630e834..4fee14dc71d 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -71,7 +71,7 @@ #include "physics_intern.h" -extern void PE_create_particle_edit(const bContext *C, Scene *scene, ViewLayer *sl, Object *ob, PointCache *cache, ParticleSystem *psys); +extern void PE_create_particle_edit(const bContext *C, Scene *scene, ViewLayer *view_layer, Object *ob, PointCache *cache, ParticleSystem *psys); extern void PTCacheUndo_clear(PTCacheEdit *edit); extern void recalc_lengths(PTCacheEdit *edit); extern void recalc_emitter_field(Object *ob, ParticleSystem *psys); @@ -135,7 +135,7 @@ static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op)) { Object *ob = ED_object_context(C); Scene *scene = CTX_data_scene(C); - ViewLayer *sl = CTX_data_view_layer(C); + ViewLayer *view_layer = CTX_data_view_layer(C); int mode_orig; if (!scene || !ob) @@ -149,7 +149,7 @@ static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op)) */ if (mode_orig & OB_MODE_PARTICLE_EDIT) { if ((ob->mode & OB_MODE_PARTICLE_EDIT) == 0) { - if (sl->basact && sl->basact->object == ob) { + if (view_layer->basact && view_layer->basact->object == ob) { WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL); } } @@ -569,7 +569,7 @@ void PARTICLE_OT_dupliob_move_down(wmOperatorType *ot) /************************ connect/disconnect hair operators *********************/ static void disconnect_hair( - const EvaluationContext *eval_ctx, Scene *scene, ViewLayer *sl, + const EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer, Object *ob, ParticleSystem *psys) { ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys); @@ -616,13 +616,13 @@ static void disconnect_hair( if (ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_PUFF)) pset->brushtype = PE_BRUSH_NONE; - PE_update_object(eval_ctx, scene, sl, ob, 0); + PE_update_object(eval_ctx, scene, view_layer, ob, 0); } static int disconnect_hair_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); - ViewLayer *sl = CTX_data_view_layer(C); + ViewLayer *view_layer = CTX_data_view_layer(C); Object *ob= ED_object_context(C); ParticleSystem *psys= NULL; const bool all = RNA_boolean_get(op->ptr, "all"); @@ -635,12 +635,12 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op) if (all) { for (psys=ob->particlesystem.first; psys; psys=psys->next) { - disconnect_hair(&eval_ctx, scene, sl, ob, psys); + disconnect_hair(&eval_ctx, scene, view_layer, ob, psys); } } else { psys = psys_get_current(ob); - disconnect_hair(&eval_ctx, scene, sl, ob, psys); + disconnect_hair(&eval_ctx, scene, view_layer, ob, psys); } DEG_id_tag_update(&ob->id, OB_RECALC_DATA); @@ -667,7 +667,7 @@ void PARTICLE_OT_disconnect_hair(wmOperatorType *ot) * from/to_mat : additional transform for from/to particles (e.g. for using object space copying) */ static bool remap_hair_emitter( - const EvaluationContext *eval_ctx, Scene *scene, ViewLayer *sl, Object *ob, ParticleSystem *psys, + const EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer, Object *ob, ParticleSystem *psys, Object *target_ob, ParticleSystem *target_psys, PTCacheEdit *target_edit, float from_mat[4][4], float to_mat[4][4], bool from_global, bool to_global) { @@ -853,13 +853,13 @@ static bool remap_hair_emitter( psys_free_path_cache(target_psys, target_edit); - PE_update_object(eval_ctx, scene, sl, target_ob, 0); + PE_update_object(eval_ctx, scene, view_layer, target_ob, 0); return true; } static bool connect_hair( - const EvaluationContext *eval_ctx, Scene *scene, ViewLayer *sl, + const EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer, Object *ob, ParticleSystem *psys) { bool ok; @@ -868,7 +868,7 @@ static bool connect_hair( return false; ok = remap_hair_emitter( - eval_ctx, scene, sl, ob, psys, ob, psys, psys->edit, + eval_ctx, scene, view_layer, ob, psys, ob, psys, psys->edit, ob->obmat, ob->obmat, psys->flag & PSYS_GLOBAL_HAIR, false); psys->flag &= ~PSYS_GLOBAL_HAIR; @@ -879,7 +879,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op) { EvaluationContext eval_ctx; Scene *scene= CTX_data_scene(C); - ViewLayer *sl = CTX_data_view_layer(C); + ViewLayer *view_layer = CTX_data_view_layer(C); Object *ob= ED_object_context(C); ParticleSystem *psys= NULL; const bool all = RNA_boolean_get(op->ptr, "all"); @@ -892,12 +892,12 @@ static int connect_hair_exec(bContext *C, wmOperator *op) if (all) { for (psys=ob->particlesystem.first; psys; psys=psys->next) { - any_connected |= connect_hair(&eval_ctx, scene, sl, ob, psys); + any_connected |= connect_hair(&eval_ctx, scene, view_layer, ob, psys); } } else { psys = psys_get_current(ob); - any_connected |= connect_hair(&eval_ctx, scene, sl, ob, psys); + any_connected |= connect_hair(&eval_ctx, scene, view_layer, ob, psys); } if (!any_connected) { @@ -934,7 +934,7 @@ typedef enum eCopyParticlesSpace { } eCopyParticlesSpace; static void copy_particle_edit( - const EvaluationContext *eval_ctx, Scene *scene, ViewLayer *sl, + const EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer, Object *ob, ParticleSystem *psys, ParticleSystem *psys_from) { PTCacheEdit *edit_from = psys_from->edit, *edit; @@ -985,10 +985,10 @@ static void copy_particle_edit( recalc_lengths(edit); recalc_emitter_field(ob, psys); - PE_update_object(eval_ctx, scene, sl, ob, true); + PE_update_object(eval_ctx, scene, view_layer, ob, true); PTCacheUndo_clear(edit); - PE_undo_push(scene, sl, "Original"); + PE_undo_push(scene, view_layer, "Original"); } static void remove_particle_systems_from_object(Object *ob_to) @@ -1018,7 +1018,7 @@ static void remove_particle_systems_from_object(Object *ob_to) /* single_psys_from is optional, if NULL all psys of ob_from are copied */ static bool copy_particle_systems_to_object(const bContext *C, Scene *scene, - ViewLayer *sl, + ViewLayer *view_layer, Object *ob_from, ParticleSystem *single_psys_from, Object *ob_to, @@ -1103,7 +1103,7 @@ static bool copy_particle_systems_to_object(const bContext *C, DM_ensure_tessface(psmd->dm_final); if (psys_from->edit) { - copy_particle_edit(&eval_ctx, scene, sl, ob_to, psys, psys_from); + copy_particle_edit(&eval_ctx, scene, view_layer, ob_to, psys, psys_from); } if (duplicate_settings) { @@ -1139,7 +1139,7 @@ static bool copy_particle_systems_to_object(const bContext *C, } if (ob_from != ob_to) { remap_hair_emitter( - &eval_ctx, scene, sl, ob_from, psys_from, ob_to, psys, psys->edit, + &eval_ctx, scene, view_layer, ob_from, psys_from, ob_to, psys, psys->edit, from_mat, to_mat, psys_from->flag & PSYS_GLOBAL_HAIR, psys->flag & PSYS_GLOBAL_HAIR); } @@ -1174,7 +1174,7 @@ static int copy_particle_systems_exec(bContext *C, wmOperator *op) const bool remove_target_particles = RNA_boolean_get(op->ptr, "remove_target_particles"); const bool use_active = RNA_boolean_get(op->ptr, "use_active"); Scene *scene = CTX_data_scene(C); - ViewLayer *sl = CTX_data_view_layer(C); + ViewLayer *view_layer = CTX_data_view_layer(C); Object *ob_from = ED_object_active_context(C); ParticleSystem *psys_from = use_active ? CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem).data : NULL; @@ -1189,7 +1189,7 @@ static int copy_particle_systems_exec(bContext *C, wmOperator *op) remove_particle_systems_from_object(ob_to); changed = true; } - if (copy_particle_systems_to_object(C, scene, sl, ob_from, psys_from, ob_to, space, false)) + if (copy_particle_systems_to_object(C, scene, view_layer, ob_from, psys_from, ob_to, space, false)) changed = true; else fail++; |