diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2017-08-07 15:06:02 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2017-08-07 15:06:02 +0300 |
commit | 41e8bd9337563fc835300513e2273ad71696a619 (patch) | |
tree | 5bd64ec925725b8bb5a16488d460d3808e34180a /source/blender/editors/hair | |
parent | 77802b21a68e544feb92286de27e063cf09bfa12 (diff) | |
parent | 459365443f62d2f8e8718c1d1b0fbaafd6d765de (diff) |
Merge branch 'blender2.8' of git.blender.org:blender into strand_editmode
Diffstat (limited to 'source/blender/editors/hair')
-rw-r--r-- | source/blender/editors/hair/hair_edit.c | 8 | ||||
-rw-r--r-- | source/blender/editors/hair/hair_intern.h | 5 | ||||
-rw-r--r-- | source/blender/editors/hair/hair_object_mesh.c | 2 | ||||
-rw-r--r-- | source/blender/editors/hair/hair_object_particles.c | 4 |
4 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/editors/hair/hair_edit.c b/source/blender/editors/hair/hair_edit.c index 269ca5833fa..ccf66e34f90 100644 --- a/source/blender/editors/hair/hair_edit.c +++ b/source/blender/editors/hair/hair_edit.c @@ -162,6 +162,8 @@ static int hair_edit_toggle_exec(bContext *C, wmOperator *op) Object *ob = CTX_data_active_object(C); const int mode_flag = OB_MODE_HAIR_EDIT; const bool is_mode_set = (ob->mode & mode_flag) != 0; + EvaluationContext eval_ctx; + CTX_data_eval_ctx(C, &eval_ctx); if (!is_mode_set) { if (!ED_object_mode_compat_set(C, ob, mode_flag, op->reports)) { @@ -171,9 +173,9 @@ static int hair_edit_toggle_exec(bContext *C, wmOperator *op) if (!is_mode_set) { #if USE_PARTICLES - ED_hair_object_init_particle_edit(scene, ob); + ED_hair_object_init_particle_edit(&eval_ctx, scene, ob); #else - ED_hair_object_init_mesh_edit(scene, ob); + ED_hair_object_init_mesh_edit(&eval_ctx, scene, ob); #endif ob->mode |= mode_flag; @@ -230,7 +232,7 @@ void hair_init_viewcontext(bContext *C, ViewContext *vc) /* needed or else the draw matrix can be incorrect */ view3d_operator_needs_opengl(C); - ED_view3d_backbuf_validate(vc); + ED_view3d_backbuf_validate(C, vc); /* we may need to force an update here by setting the rv3d as dirty * for now it seems ok, but take care!: * rv3d->depths->dirty = 1; */ diff --git a/source/blender/editors/hair/hair_intern.h b/source/blender/editors/hair/hair_intern.h index 178671c1c60..2a8590d5679 100644 --- a/source/blender/editors/hair/hair_intern.h +++ b/source/blender/editors/hair/hair_intern.h @@ -40,6 +40,7 @@ struct ARegion; struct bContext; struct wmOperatorType; struct rcti; +struct EvaluationContext; struct Object; @@ -60,12 +61,12 @@ void HAIR_OT_select_linked(struct wmOperatorType *ot); void HAIR_OT_stroke(struct wmOperatorType *ot); /* hair_object_mesh.c */ -bool ED_hair_object_init_mesh_edit(struct Scene *scene, struct Object *ob); +bool ED_hair_object_init_mesh_edit(struct EvaluationContext *eval_ctx, struct Scene *scene, struct Object *ob); bool ED_hair_object_apply_mesh_edit(struct Object *ob); /* hair_object_particles.c */ bool ED_hair_object_has_hair_particle_data(struct Object *ob); -bool ED_hair_object_init_particle_edit(struct Scene *scene, struct Object *ob); +bool ED_hair_object_init_particle_edit(struct EvaluationContext *eval_ctx, struct Scene *scene, struct Object *ob); bool ED_hair_object_apply_particle_edit(struct Object *ob); diff --git a/source/blender/editors/hair/hair_object_mesh.c b/source/blender/editors/hair/hair_object_mesh.c index a1140c0be13..887eed12042 100644 --- a/source/blender/editors/hair/hair_object_mesh.c +++ b/source/blender/editors/hair/hair_object_mesh.c @@ -47,7 +47,7 @@ #include "hair_intern.h" -bool ED_hair_object_init_mesh_edit(Scene *UNUSED(scene), Object *ob) +bool ED_hair_object_init_mesh_edit(struct EvaluationContext *UNUSED(eval_ctx), Scene *UNUSED(scene), Object *ob) { if (ob->type == OB_MESH) { Mesh *me = ob->data; diff --git a/source/blender/editors/hair/hair_object_particles.c b/source/blender/editors/hair/hair_object_particles.c index bee56f2aeb9..f39ccdec6e2 100644 --- a/source/blender/editors/hair/hair_object_particles.c +++ b/source/blender/editors/hair/hair_object_particles.c @@ -58,7 +58,7 @@ bool ED_hair_object_has_hair_particle_data(Object *ob) return false; } -bool ED_hair_object_init_particle_edit(Scene *scene, Object *ob) +bool ED_hair_object_init_particle_edit(struct EvaluationContext *eval_ctx, Scene *scene, Object *ob) { ParticleSystem *psys = psys_get_current(ob); BMesh *bm; @@ -69,7 +69,7 @@ bool ED_hair_object_init_particle_edit(Scene *scene, Object *ob) bm = BKE_editstrands_particles_to_bmesh(ob, psys); if (ob->type == OB_MESH || ob->derivedFinal) - dm = ob->derivedFinal ? ob->derivedFinal : mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); + dm = ob->derivedFinal ? ob->derivedFinal : mesh_get_derived_final(eval_ctx, scene, ob, CD_MASK_BAREMESH); else dm = NULL; |