[Bf-blender-cvs] [0a6a3912315] temp-workspace-object-mode-removal: Merge branch '28' into temp-workspace-object-mode-removal

Campbell Barton noreply at git.blender.org
Tue Feb 6 08:53:02 CET 2018


Commit: 0a6a391231574e240286c625bc572e9420bcdfcc
Author: Campbell Barton
Date:   Tue Feb 6 18:55:34 2018 +1100
Branches: temp-workspace-object-mode-removal
https://developer.blender.org/rB0a6a391231574e240286c625bc572e9420bcdfcc

Merge branch '28' into temp-workspace-object-mode-removal

===================================================================



===================================================================

diff --cc source/blender/blenkernel/intern/context.c
index 99a86f3062c,86c0b420f34..a14cf6c1f5c
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@@ -1035,11 -1035,9 +1035,11 @@@ int CTX_data_mode_enum_ex(const Object 
  
  int CTX_data_mode_enum(const bContext *C)
  {
 +	EvaluationContext eval_ctx;
 +	CTX_data_eval_ctx(C, &eval_ctx);
  	Object *obedit = CTX_data_edit_object(C);
  	Object *obact = obedit ? NULL : CTX_data_active_object(C);
- 	return CTX_data_mode_enum_ex(eval_ctx.object_mode, obedit, obact);
 -	return CTX_data_mode_enum_ex(obedit, obact, obact ? obact->mode : OB_MODE_OBJECT);
++	return CTX_data_mode_enum_ex(obedit, obact, eval_ctx.object_mode);
  }
  
  /* would prefer if we can use the enum version below over this one - Campbell */
@@@ -1273,13 -1271,12 +1273,12 @@@ void CTX_data_eval_ctx(const bContext *
  {
  	BLI_assert(C != NULL);
  
- 	WorkSpace *workspace = CTX_wm_workspace(C);
  	Scene *scene = CTX_data_scene(C);
  	ViewLayer *view_layer = CTX_data_view_layer(C);
 -	Object *obact = OBACT(view_layer);
  	RenderEngineType *engine_type = CTX_data_engine_type(C);
++	WorkSpace *workspace = CTX_wm_workspace(C);
  	DEG_evaluation_context_init_from_scene(
  	        eval_ctx,
  	        scene, view_layer, engine_type,
- 	        workspace->object_mode,
- 	        DAG_EVAL_VIEWPORT);
 -	        obact ? obact->mode : OB_MODE_OBJECT, DAG_EVAL_VIEWPORT);
++	        workspace->object_mode, DAG_EVAL_VIEWPORT);
  }
diff --cc source/blender/blenkernel/intern/object.c
index e4c62e09ce1,2e257a329ea..9bfc7e466a7
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@@ -539,10 -535,10 +538,10 @@@ bool BKE_object_is_in_editmode_vgroup(O
  	        BKE_object_is_in_editmode(ob));
  }
  
- bool BKE_object_is_in_wpaint_select_vert(const EvaluationContext *eval_ctx, Object *ob)
+ bool BKE_object_is_in_wpaint_select_vert(const EvaluationContext *eval_ctx, const Object *ob)
  {
  	if (ob->type == OB_MESH) {
 -		const Mesh *me = ob->data;
 +		Mesh *me = ob->data;
  		return ((eval_ctx->object_mode & OB_MODE_WEIGHT_PAINT) &&
  		        (me->edit_btmesh == NULL) &&
  		        (ME_EDIT_PAINT_SEL_MODE(me) == SCE_SELECT_VERTEX));
@@@ -923,7 -919,7 +922,7 @@@ struct Object *BKE_object_lod_meshob_ge
  	return lod_ob_get(ob, view_layer, OB_LOD_USE_MESH, object_mode);
  }
  
--struct Object *BKE_object_lod_matob_get(Object *ob, ViewLayer *view_layer, const short object_mode)
++struct Object *BKE_object_lod_matob_get(Object *ob, ViewLayer *view_layer)
  {
  	return lod_ob_get(ob, view_layer, OB_LOD_USE_MAT, object_mode);
  }
diff --cc source/blender/blenkernel/intern/paint.c
index 312a2f12ba6,f0ad8de33b9..f8892460fb4
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@@ -792,7 -792,7 +792,7 @@@ void BKE_sculptsession_free(Object *ob
  			BM_log_free(ss->bm_log);
  
  		if (dm && dm->getPBVH)
- 			dm->getPBVH(eval_ctx, NULL, dm);  /* signal to clear */
 -			dm->getPBVH(NULL, dm);  /* signal to clear */
++			dm->getPBVH(NULL, NULL, dm);  /* signal to clear */
  
  		if (ss->texcache)
  			MEM_freeN(ss->texcache);
diff --cc source/blender/editors/include/ED_mesh.h
index f9a4d1b5db7,0293f7cd204..af970dcc0ce
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@@ -239,15 -241,11 +241,13 @@@ void                 ED_vgroup_data_cla
  bool                 ED_vgroup_array_copy(struct Object *ob, struct Object *ob_from);
  bool                 ED_vgroup_parray_alloc(struct ID *id, struct MDeformVert ***dvert_arr, int *dvert_tot,
                                              const bool use_vert_sel);
 -void                 ED_vgroup_parray_mirror_sync(struct Object *ob,
 -                                                  struct MDeformVert **dvert_array, const int dvert_tot,
 -                                                  const bool *vgroup_validmap, const int vgroup_tot);
 -void                 ED_vgroup_parray_mirror_assign(struct Object *ob,
 -                                                    struct MDeformVert **dvert_array, const int dvert_tot);
 +void                 ED_vgroup_parray_mirror_sync(
-         const struct EvaluationContext *eval_ctx,
 +        struct Object *ob,
 +        struct MDeformVert **dvert_array, const int dvert_tot,
 +        const bool *vgroup_validmap, const int vgroup_tot);
 +void                 ED_vgroup_parray_mirror_assign(
-         const struct EvaluationContext *eval_ctx,
 +        struct Object *ob,
 +        struct MDeformVert **dvert_array, const int dvert_tot);
  void                 ED_vgroup_parray_remove_zero(struct MDeformVert **dvert_array, const int dvert_tot,
                                                    const bool *vgroup_validmap, const int vgroup_tot,
                                                    const float epsilon, const bool keep_single);
@@@ -256,12 -254,10 +256,11 @@@ void                 ED_vgroup_parray_t
  void                 ED_vgroup_parray_from_weight_array(struct MDeformVert **dvert_array, const int dvert_tot,
                                                          const float *dvert_weights, const int def_nr,
                                                          const bool remove_zero);
 -void                 ED_vgroup_mirror(struct Object *ob,
 -                                      const bool mirror_weights, const bool flip_vgroups,
 -                                      const bool all_vgroups, const bool use_topology,
 -                                      int *r_totmirr, int *r_totfail);
 +void ED_vgroup_mirror(
-         const struct EvaluationContext *eval_ctx,
 +        struct Object *ob,
 +        const bool mirror_weights, const bool flip_vgroups,
 +        const bool all_vgroups, const bool use_topology,
 +        int *r_totmirr, int *r_totfail);
  
  void                 ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum,  float weight, int assignmode);
  void                 ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum);
@@@ -322,42 -316,27 +319,32 @@@ int         join_mesh_shapes_exec(struc
  /* mirror lookup api */
  int ED_mesh_mirror_spatial_table(
          struct Object *ob, struct BMEditMesh *em, struct DerivedMesh *dm, const float co[3], char mode);
 -int  ED_mesh_mirror_topo_table(struct Object *ob, struct DerivedMesh *dm, char mode);
 +int  ED_mesh_mirror_topo_table(
-         const struct EvaluationContext *eval_ctx,
 +        struct Object *ob, struct DerivedMesh *dm, char mode);
  
  /* retrieves mirrored cache vert, or NULL if there isn't one.
   * note: calling this without ensuring the mirror cache state
   * is bad.*/
 -int            mesh_get_x_mirror_vert(struct Object *ob, struct DerivedMesh *dm, int index, const bool use_topology);
 -struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em,
 -                                           struct BMVert *eve, const float co[3],
 -                                           int index, const bool use_topology);
 -int           *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em, struct DerivedMesh *dm);
 -
 -int ED_mesh_mirror_get_vert(struct Object *ob, int index);
 +int mesh_get_x_mirror_vert(
-         const struct EvaluationContext *eval_ctx,
 +        struct Object *ob, struct DerivedMesh *dm, int index, const bool use_topology);
 +struct BMVert *editbmesh_get_x_mirror_vert(
-         const struct EvaluationContext *eval_ctx,
 +        struct Object *ob, struct BMEditMesh *em,
 +        struct BMVert *eve, const float co[3],
 +        int index, const bool use_topology);
 +int *mesh_get_x_mirror_faces(
-         const struct EvaluationContext *eval_ctx,
 +        struct Object *ob, struct BMEditMesh *em, struct DerivedMesh *dm);
 +
 +int ED_mesh_mirror_get_vert(
-         const struct EvaluationContext *eval_ctx,
 +        struct Object *ob, int index);
  
  bool ED_mesh_pick_vert(struct bContext *C,      struct Object *ob, const int mval[2], unsigned int *index, int size, bool use_zbuf);
  bool ED_mesh_pick_face(struct bContext *C,      struct Object *ob, const int mval[2], unsigned int *index, int size);
  bool ED_mesh_pick_face_vert(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size);
  
  
- struct MDeformVert *ED_mesh_active_dvert_get_ob(
-         struct Object *ob, int *r_index);
- struct MDeformVert *ED_mesh_active_dvert_get_em(
-         const struct EvaluationContext *eval_ctx,
-         struct Object *ob, struct BMVert **r_eve);
- struct MDeformVert *ED_mesh_active_dvert_get_only(
-         const struct EvaluationContext *eval_ctx,
-         struct Object *ob);
 -struct MDeformVert *ED_mesh_active_dvert_get_em(struct Object *ob, struct BMVert **r_eve);
+ struct MDeformVert *ED_mesh_active_dvert_get_ob(struct Object *ob, int *r_index);
++struct MDeformVert *ED_mesh_active_dvert_get_em(struct Object *ob, struct BMVert **r_eve);
+ struct MDeformVert *ED_mesh_active_dvert_get_only(struct Object *ob);
  
  #define ED_MESH_PICK_DEFAULT_VERT_SIZE 50
  #define ED_MESH_PICK_DEFAULT_FACE_SIZE 3
diff --cc source/blender/editors/object/object_modifier.c
index f715eea8c76,533bd0fcff5..62748c71b94
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@@ -255,7 -252,7 +255,7 @@@ static bool object_has_modifier_cb
   * for any multires modifiers on the object to the int pointed to by
   * callback_data. */
  bool ED_object_multires_update_totlevels_cb(
-         const EvaluationContext *eval_ctx,
 -        const struct EvaluationContext *UNUSED(eval_ctx),
++        const struct EvaluationContext *eval_ctx,
          Object *ob, void *totlevel_v)
  {
  	ModifierData *md;
diff --cc source/blender/editors/sculpt_paint/paint_vertex.c
index 945e7cb0346,97b1ab46b0d..386fc5cdf95
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@@ -2235,12 -2229,9 +2229,10 @@@ void PAINT_OT_weight_paint(wmOperatorTy
   */
  static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op)
  {
 +	Work

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list