[Bf-blender-cvs] [75f36266df1] blender2.8: Merge branch 'master' into blender2.8

Sergey Sharybin noreply at git.blender.org
Thu Sep 14 13:17:52 CEST 2017


Commit: 75f36266df11a482dc5d00d1030bf263593480a8
Author: Sergey Sharybin
Date:   Thu Sep 14 16:16:14 2017 +0500
Branches: blender2.8
https://developer.blender.org/rB75f36266df11a482dc5d00d1030bf263593480a8

Merge branch 'master' into blender2.8

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



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

diff --cc source/blender/blenkernel/intern/mask_evaluate.c
index 1b275f455f4,0d71cc548c7..f60d87f2464
--- a/source/blender/blenkernel/intern/mask_evaluate.c
+++ b/source/blender/blenkernel/intern/mask_evaluate.c
@@@ -42,8 -42,10 +42,11 @@@
  #include "DNA_mask_types.h"
  
  #include "BKE_curve.h"
 -#include "BKE_depsgraph.h"
+ #include "BKE_global.h"
  #include "BKE_mask.h"
  
++#include "DEG_depsgraph.h"
++
  
  unsigned int BKE_mask_spline_resolution(MaskSpline *spline, int width, int height)
  {
diff --cc source/blender/blenkernel/intern/scene.c
index 5d974192241,e8613d9ab9c..151d47b0316
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@@ -1657,9 -1932,15 +1657,7 @@@ void BKE_scene_update_tagged(Evaluation
  	 *
  	 * in the future this should handle updates for all datablocks, not
  	 * only objects and scenes. - brecht */
 -#ifdef WITH_LEGACY_DEPSGRAPH
 -	if (!use_new_eval) {
 -		scene_update_tagged_recursive(eval_ctx, bmain, scene, scene);
 -	}
 -	else
 -#endif
 -	{
 -		DEG_evaluate_on_refresh(eval_ctx, scene->depsgraph, scene);
 -	}
 +	DEG_evaluate_on_refresh(eval_ctx, scene->depsgraph_legacy, scene);
- 	/* TODO(sergey): This is to beocme a node in new depsgraph. */
- 	BKE_mask_update_scene(bmain, scene);
  
  	/* update sound system animation (TODO, move to depsgraph) */
  	BKE_sound_update_scene(bmain, scene);
@@@ -1701,10 -2044,22 +1699,8 @@@ void BKE_scene_update_for_newframe(Eval
  	/* XXX TODO... */
  
  	for (sce_iter = sce; sce_iter; sce_iter = sce_iter->set)
 -		DAG_scene_relations_update(bmain, sce_iter);
 -
 -#ifdef WITH_LEGACY_DEPSGRAPH
 -	if (!use_new_eval) {
 -		/* flush recalc flags to dependencies, if we were only changing a frame
 -		 * this would not be necessary, but if a user or a script has modified
 -		 * some datablock before BKE_scene_update_tagged was called, we need the flush */
 -		DAG_ids_flush_tagged(bmain);
 -
 -		/* Following 2 functions are recursive
 -		 * so don't call within 'scene_update_tagged_recursive' */
 -		DAG_scene_update_flags(bmain, sce, lay, true, do_invisible_flush);   // only stuff that moves or needs display still
 -		BKE_mask_evaluate_all_masks(bmain, ctime, true);
 -	}
 -#endif
 +		DEG_scene_relations_update(bmain, sce_iter);
  
- 	BKE_mask_evaluate_all_masks(bmain, ctime, true);
- 
  	/* Update animated cache files for modifiers. */
  	BKE_cachefile_update_frame(bmain, sce, ctime, (((double)sce->r.frs_sec) / (double)sce->r.frs_sec_base));
  
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 068122b4928,17f0c030bd0..02d20913177
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -1262,11 -1098,21 +1263,22 @@@ void DepsgraphNodeBuilder::build_mask(M
  {
  	ID *mask_id = &mask->id;
  	add_id_node(mask_id);
+ 	/* F-Curve based animation/ */
  	build_animdata(mask_id);
+ 	/* Animation based on mask's shapes. */
+ 	add_operation_node(mask_id,
+ 	                   DEG_NODE_TYPE_ANIMATION,
+ 	                   function_bind(BKE_mask_eval_animation, _1, mask),
+ 	                   DEG_OPCODE_MASK_ANIMATION);
+ 	/* Final mask evaluation. */
+ 	add_operation_node(mask_id,
+ 	                   DEG_NODE_TYPE_PARAMETERS,
+ 	                   function_bind(BKE_mask_eval_update, _1, mask),
+ 	                   DEG_OPCODE_MASK_EVAL);
  }
  
 -void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip) {
 +void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip)
 +{
  	ID *clip_id = &clip->id;
  	add_id_node(clip_id);
  	build_animdata(clip_id);
diff --cc source/blender/depsgraph/intern/depsgraph_type_defines.cc
index 969cc21d2c1,f4f071cd611..0c9ab8da910
--- a/source/blender/depsgraph/intern/depsgraph_type_defines.cc
+++ b/source/blender/depsgraph/intern/depsgraph_type_defines.cc
@@@ -128,21 -117,10 +128,24 @@@ static const char *stringify_opcode(eDe
  		STRINGIFY_OPCODE(BONE_CONSTRAINTS);
  		STRINGIFY_OPCODE(BONE_READY);
  		STRINGIFY_OPCODE(BONE_DONE);
 -		STRINGIFY_OPCODE(PSYS_EVAL);
 -		STRINGIFY_OPCODE(PSYS_EVAL_INIT);
 +		/* Particles. */
 +		STRINGIFY_OPCODE(PARTICLE_SYSTEM_EVAL_INIT);
 +		STRINGIFY_OPCODE(PARTICLE_SYSTEM_EVAL);
 +		STRINGIFY_OPCODE(PARTICLE_SETTINGS_EVAL);
 +		STRINGIFY_OPCODE(PARTICLE_SETTINGS_RECALC_CLEAR);
++		/* Masks. */
+ 		STRINGIFY_OPCODE(MASK_ANIMATION);
+ 		STRINGIFY_OPCODE(MASK_EVAL);
 +		/* Collections. */
 +		STRINGIFY_OPCODE(SCENE_LAYER_INIT);
 +		STRINGIFY_OPCODE(SCENE_LAYER_EVAL);
 +		STRINGIFY_OPCODE(SCENE_LAYER_DONE);
 +		/* Copy on write. */
 +		STRINGIFY_OPCODE(COPY_ON_WRITE);
 +		/* Shading. */
 +		STRINGIFY_OPCODE(SHADING);
 +		STRINGIFY_OPCODE(MATERIAL_UPDATE);
 +		STRINGIFY_OPCODE(WORLD_UPDATE);
  
  		case DEG_NUM_OPCODES: return "SpecialCase";
  #undef STRINGIFY_OPCODE
diff --cc source/blender/depsgraph/intern/depsgraph_types.h
index 9ea6dfedefe,1c461423e03..0dd7e85476c
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@@ -207,26 -213,16 +207,30 @@@ typedef enum eDepsOperation_Code 
  	DEG_OPCODE_BONE_READY,
  	DEG_OPCODE_BONE_DONE,
  
 -	/* Particles --------------------------------------- */
 -
 -	/* XXX: placeholder - Particle System eval */
 -	DEG_OPCODE_PSYS_EVAL_INIT,
 -	DEG_OPCODE_PSYS_EVAL,
 +	/* Particles. --------------------------------------- */
 +	/* Particle System evaluation. */
 +	DEG_OPCODE_PARTICLE_SYSTEM_EVAL_INIT,
 +	DEG_OPCODE_PARTICLE_SYSTEM_EVAL,
 +	DEG_OPCODE_PARTICLE_SETTINGS_EVAL,
 +	DEG_OPCODE_PARTICLE_SETTINGS_RECALC_CLEAR,
 +
 +	/* Collections. ------------------------------------- */
 +	DEG_OPCODE_SCENE_LAYER_INIT,
 +	DEG_OPCODE_SCENE_LAYER_EVAL,
 +	DEG_OPCODE_SCENE_LAYER_DONE,
 +
 +	/* Copy on Write. ------------------------------------ */
 +	DEG_OPCODE_COPY_ON_WRITE,
 +
 +	/* Shading. ------------------------------------------- */
 +	DEG_OPCODE_SHADING,
 +	DEG_OPCODE_MATERIAL_UPDATE,
 +	DEG_OPCODE_WORLD_UPDATE,
  
+ 	/* Masks ------------------------------------------- */
+ 	DEG_OPCODE_MASK_ANIMATION,
+ 	DEG_OPCODE_MASK_EVAL,
+ 
  	DEG_NUM_OPCODES,
  } eDepsOperation_Code;
  
diff --cc source/blender/editors/interface/interface_layout.c
index 393692e51c1,c21a76918e8..d2e4cdf5453
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@@ -1643,11 -1724,12 +1643,15 @@@ void ui_but_add_search(uiBut *but, Poin
  			but->str[0] = 0;
  		}
  
 -		UI_but_func_search_set(but, ui_searchbox_create_generic, rna_search_cb, but, NULL, NULL);
 +		UI_but_func_search_set(
 +		            but, ui_searchbox_create_generic, ui_rna_collection_search_cb,
 +		            coll_search, NULL, NULL);
 +		but->free_search_arg = true;
  	}
+ 	else if (but->type == UI_BTYPE_SEARCH_MENU) {
+ 		/* In case we fail to find proper searchprop, so other code might have already set but->type to search menu... */
+ 		but->type = UI_BTYPE_LABEL;
+ 	}
  }
  
  void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
diff --cc source/blender/editors/mesh/mesh_data.c
index 49755c75480,3294490d5b1..2767ce75a5f
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@@ -252,8 -251,8 +252,8 @@@ void ED_mesh_uv_loop_reset_ex(struct Me
  void ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me)
  {
  	/* could be ldata or pdata */
 -	CustomData *pdata = GET_CD_DATA(me, pdata);
 -	const int layernum = CustomData_get_active_layer(pdata, CD_MTEXPOLY);
 +	CustomData *ldata = GET_CD_DATA(me, ldata);
- 	const int layernum = CustomData_get_active_layer_index(ldata, CD_MLOOPUV);
++	const int layernum = CustomData_get_active_layer(ldata, CD_MLOOPUV);
  	ED_mesh_uv_loop_reset_ex(me, layernum);
  	
  	WM_event_add_notifier(C, NC_GEOM | ND_DATA, me);
diff --cc source/blender/editors/uvedit/uvedit_ops.c
index 5ee05273a5d,75294af08f9..2a0eed6f438
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@@ -219,10 -221,11 +219,10 @@@ void ED_uvedit_assign_image(Main *UNUSE
  #endif
  
  		/* ensure we have a uv map */
 -		if (!CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) {
 -			BM_data_layer_add(em->bm, &em->bm->pdata, CD_MTEXPOLY);
 +		if (!CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV)) {
  			BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPUV);
  			/* make UVs all nice 0-1 */
- 			ED_mesh_uv_loop_reset_ex(obedit->data, CustomData_get_active_layer_index(&em->bm->ldata, CD_MLOOPUV));
 -			ED_mesh_uv_loop_reset_ex(obedit->data, CustomData_get_active_layer(&em->bm->pdata, CD_MTEXPOLY));
++			ED_mesh_uv_loop_reset_ex(obedit->data, CustomData_get_active_layer(&em->bm->ldata, CD_MLOOPUV));
  			update = true;
  		}



More information about the Bf-blender-cvs mailing list