[Bf-blender-cvs] [9f74b66ab7d] hair_guides: Merge branch 'blender2.8' into hair_guides

Lukas Tönne noreply at git.blender.org
Thu Nov 9 09:12:37 CET 2017


Commit: 9f74b66ab7dcfd68dbb841b46bb2ae728806dc4d
Author: Lukas Tönne
Date:   Thu Nov 9 08:12:04 2017 +0000
Branches: hair_guides
https://developer.blender.org/rB9f74b66ab7dcfd68dbb841b46bb2ae728806dc4d

Merge branch 'blender2.8' into hair_guides

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



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

diff --cc release/scripts/startup/bl_ui/__init__.py
index 93103249522,037fe9618ec..576a4c0f8dd
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@@ -42,8 -42,8 +42,9 @@@ _modules = 
      "properties_data_modifier",
      "properties_data_lightprobe",
      "properties_data_speaker",
+     "properties_data_workspace",
      "properties_game",
 +    "properties_hair",
      "properties_mask_common",
      "properties_material",
      "properties_object",
diff --cc release/scripts/startup/bl_ui/space_view3d.py
index d49f443ff4f,d449dd20c3e..77af655422c
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@@ -176,9 -170,9 +176,9 @@@ class VIEW3D_MT_editor_menus(Menu)
              mesh = obj.data
              if mesh.use_paint_mask:
                  layout.menu("VIEW3D_MT_select_paint_mask")
-             elif mesh.use_paint_mask_vertex and mode_string == 'PAINT_WEIGHT':
+             elif mesh.use_paint_mask_vertex and mode_string in {'PAINT_WEIGHT', 'PAINT_VERTEX'}:
                  layout.menu("VIEW3D_MT_select_paint_mask_vertex")
 -        elif mode_string != 'SCULPT':
 +        elif mode_string not in {'SCULPT'}:
              layout.menu("VIEW3D_MT_select_%s" % mode_string.lower())
  
          if gp_edit:
@@@ -1773,12 -1894,8 +1909,9 @@@ class VIEW3D_MT_brush_object_modes(Menu
          layout.prop(brush, "use_paint_vertex", text="Vertex Paint")
          layout.prop(brush, "use_paint_weight", text="Weight Paint")
          layout.prop(brush, "use_paint_image", text="Texture Paint")
 +        layout.prop(brush, "use_hair_edit", text="Hair Edit")
  
  
- # ********** Vertex paint menu **********
- 
- 
  class VIEW3D_MT_paint_vertex(Menu):
      bl_label = "Paint"
  
@@@ -2038,18 -2170,7 +2186,15 @@@ class VIEW3D_MT_particle_specials(Menu)
  class VIEW3D_MT_particle_showhide(ShowHideMenu, Menu):
      _operator_name = "particle"
  
 +# ********** Hair menu **********
 +
 +class VIEW3D_MT_hair(Menu):
 +    bl_label = "Hair"
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
  
- # ********** Pose Menu **********
- 
- 
  class VIEW3D_MT_pose(Menu):
      bl_label = "Pose"
  
diff --cc source/blender/blenloader/intern/readfile.c
index ddd0e2aed73,8bdaa1d91bb..60930fa4d13
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -5851,15 -5831,7 +5864,15 @@@ static void lib_link_scene(FileData *fd
  			
  			sce->toolsettings->particle.shape_object = newlibadr(fd, sce->id.lib, sce->toolsettings->particle.shape_object);
  			
 +			{
 +				HairEditSettings *hair_edit = &sce->toolsettings->hair_edit;
 +				if (hair_edit->brush)
 +					hair_edit->brush = newlibadr(fd, sce->id.lib, hair_edit->brush);
 +				if (hair_edit->shape_object)
 +					hair_edit->shape_object = newlibadr(fd, sce->id.lib, hair_edit->shape_object);
 +			}
 +			
- 			for (BaseLegacy *base_legacy_next, *base_legacy = sce->base.first; base_legacy; base_legacy = base_legacy_next) {
+ 			for (Base *base_legacy_next, *base_legacy = sce->base.first; base_legacy; base_legacy = base_legacy_next) {
  				base_legacy_next = base_legacy->next;
  				
  				base_legacy->object = newlibadr_us(fd, sce->id.lib, base_legacy->object);
@@@ -6171,18 -6142,7 +6183,8 @@@ static void direct_link_scene(FileData 
  		sce->toolsettings->particle.scene_layer = NULL;
  		sce->toolsettings->particle.object = NULL;
  		sce->toolsettings->gp_sculpt.paintcursor = NULL;
 +		sce->toolsettings->hair_edit.paint_cursor = NULL;
  		
- 		/* in rare cases this is needed, see [#33806] */
- 		if (sce->toolsettings->vpaint) {
- 			sce->toolsettings->vpaint->vpaint_prev = NULL;
- 			sce->toolsettings->vpaint->tot = 0;
- 		}
- 		if (sce->toolsettings->wpaint) {
- 			sce->toolsettings->wpaint->wpaint_prev = NULL;
- 			sce->toolsettings->wpaint->tot = 0;
- 		}
- 		
  		/* relink grease pencil drawing brushes */
  		link_list(fd, &sce->toolsettings->gp_brushes);
  		for (bGPDbrush *brush = sce->toolsettings->gp_brushes.first; brush; brush = brush->next) {
diff --cc source/blender/bmesh/intern/bmesh_mesh_conv.c
index e73d2f70dbe,6cc1f37db43..1cf699b755d
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@@ -200,24 -205,16 +208,17 @@@ void BM_mesh_bm_from_me
  	KeyBlock *actkey, *block;
  	BMVert *v, **vtable = NULL;
  	BMEdge *e, **etable = NULL;
- 	BMFace *f;
+ 	BMFace *f, **ftable = NULL;
  	float (*keyco)[3] = NULL;
- 	int totloops, i, j;
+ 	int totloops, i;
 +	CustomDataMask mask = CD_MASK_BMESH | params->cd_mask_extra;
  
- 	/* free custom data */
- 	/* this isnt needed in most cases but do just incase */
- 	CustomData_free(&bm->vdata, bm->totvert);
- 	CustomData_free(&bm->edata, bm->totedge);
- 	CustomData_free(&bm->ldata, bm->totloop);
- 	CustomData_free(&bm->pdata, bm->totface);
- 
  	if (!me || !me->totvert) {
- 		if (me) { /*no verts? still copy customdata layout*/
+ 		if (me && is_new) { /*no verts? still copy customdata layout*/
 -			CustomData_copy(&me->vdata, &bm->vdata, CD_MASK_BMESH, CD_ASSIGN, 0);
 -			CustomData_copy(&me->edata, &bm->edata, CD_MASK_BMESH, CD_ASSIGN, 0);
 -			CustomData_copy(&me->ldata, &bm->ldata, CD_MASK_BMESH, CD_ASSIGN, 0);
 -			CustomData_copy(&me->pdata, &bm->pdata, CD_MASK_BMESH, CD_ASSIGN, 0);
 +			CustomData_copy(&me->vdata, &bm->vdata, mask, CD_ASSIGN, 0);
 +			CustomData_copy(&me->edata, &bm->edata, mask, CD_ASSIGN, 0);
 +			CustomData_copy(&me->ldata, &bm->ldata, mask, CD_ASSIGN, 0);
 +			CustomData_copy(&me->pdata, &bm->pdata, mask, CD_ASSIGN, 0);
  
  			CustomData_bmesh_init_pool(&bm->vdata, me->totvert, BM_VERT);
  			CustomData_bmesh_init_pool(&bm->edata, me->totedge, BM_EDGE);
@@@ -227,12 -224,20 +228,20 @@@
  		return; /* sanity check */
  	}
  
- 	vtable = MEM_mallocN(sizeof(void **) * me->totvert, "mesh to bmesh vtable");
+ 	if (is_new) {
 -		CustomData_copy(&me->vdata, &bm->vdata, CD_MASK_BMESH, CD_CALLOC, 0);
 -		CustomData_copy(&me->edata, &bm->edata, CD_MASK_BMESH, CD_CALLOC, 0);
 -		CustomData_copy(&me->ldata, &bm->ldata, CD_MASK_BMESH, CD_CALLOC, 0);
 -		CustomData_copy(&me->pdata, &bm->pdata, CD_MASK_BMESH, CD_CALLOC, 0);
++		CustomData_copy(&me->vdata, &bm->vdata, mask, CD_CALLOC, 0);
++		CustomData_copy(&me->edata, &bm->edata, mask, CD_CALLOC, 0);
++		CustomData_copy(&me->ldata, &bm->ldata, mask, CD_CALLOC, 0);
++		CustomData_copy(&me->pdata, &bm->pdata, mask, CD_CALLOC, 0);
+ 	}
  
- 	CustomData_copy(&me->vdata, &bm->vdata, mask, CD_CALLOC, 0);
- 	CustomData_copy(&me->edata, &bm->edata, mask, CD_CALLOC, 0);
- 	CustomData_copy(&me->ldata, &bm->ldata, mask, CD_CALLOC, 0);
- 	CustomData_copy(&me->pdata, &bm->pdata, mask, CD_CALLOC, 0);
+ 	/* -------------------------------------------------------------------- */
+ 	/* Shape Key */
+ 	int tot_shape_keys = me->key ? BLI_listbase_count(&me->key->block) : 0;
+ 	if (is_new == false) {
+ 		tot_shape_keys = min_ii(tot_shape_keys, CustomData_number_of_layers(&bm->vdata, CD_SHAPEKEY));
+ 	}
+ 	const float (**shape_key_table)[3] = tot_shape_keys ? BLI_array_alloca(shape_key_table, tot_shape_keys) : NULL;
  
  	if ((params->active_shapekey != 0) && (me->key != NULL)) {
  		actkey = BLI_findlink(&me->key->block, params->active_shapekey - 1);
diff --cc source/blender/draw/CMakeLists.txt
index c5ae2dadd6c,1fd731c0c41..012378e583b
--- a/source/blender/draw/CMakeLists.txt
+++ b/source/blender/draw/CMakeLists.txt
@@@ -72,8 -69,8 +72,9 @@@ set(SR
  	modes/edit_curve_mode.c
  	modes/edit_lattice_mode.c
  	modes/edit_mesh_mode.c
+ 	modes/edit_mesh_mode_text.c
  	modes/edit_metaball_mode.c
 +	modes/edit_strands_mode.c
  	modes/edit_surface_mode.c
  	modes/edit_text_mode.c
  	modes/object_mode.c
@@@ -124,9 -130,7 +134,8 @@@ data_to_c_simple(engines/eevee/shaders/
  data_to_c_simple(engines/eevee/shaders/default_frag.glsl SRC)
  data_to_c_simple(engines/eevee/shaders/default_world_frag.glsl SRC)
  data_to_c_simple(engines/eevee/shaders/background_vert.glsl SRC)
- data_to_c_simple(engines/eevee/shaders/ambient_occlusion_lib.glsl SRC)
- data_to_c_simple(engines/eevee/shaders/effect_minmaxz_frag.glsl SRC)
+ data_to_c_simple(engines/eevee/shaders/concentric_samples_lib.glsl SRC)
 +data_to_c_simple(engines/eevee/shaders/hair_lib.glsl SRC)
  data_to_c_simple(engines/eevee/shaders/lamps_lib.glsl SRC)
  data_to_c_simple(engines/eevee/shaders/lightprobe_lib.glsl SRC)
  data_to_c_simple(engines/eevee/shaders/lightprobe_filter_glossy_frag.glsl SRC)
diff --cc source/blender/draw/engines/eevee/eevee_materials.c
index 070b6be94a4,ddbe51ee3e8..de82cae8c01
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@@ -113,8 -85,10 +93,11 @@@ extern char datatoc_shadow_geom_glsl[]
  extern char datatoc_lightprobe_geom_glsl[];
  extern char datatoc_lightprobe_vert_glsl[];
  extern char datatoc_background_vert_glsl[];
+ extern char datatoc_volumetric_vert_glsl[];
+ extern char datatoc_volumetric_geom_glsl[];
  extern char datatoc_volumetric_frag_glsl[];
+ extern char datatoc_volumetric_lib_glsl[];
 +extern char datatoc_hair_lib_glsl[];
  
  extern Material defmaterial;
  extern GlobalsUboStorage ts;
@@@ -439,57 -475,45 +500,59 @@@ void EEVEE_update_util_texture(float of
  void EEVEE_materials_init(EEVEE_StorageList *stl)
  {
  	if (!e_data.frag_shader_lib) {
 -		char *frag_str = NULL;
 -
  		/* Shaders */
 -		DynStr *ds_frag = BLI_dynstr_new();
 -		BLI_dynstr_append(ds_frag, datatoc_bsdf_common_lib_glsl);
 +		{
 +			DynStr *ds_frag = BLI_dynstr_new();
 +			BLI_dynstr_append(ds_frag, datatoc_bsdf_common_lib_glsl);
  		BLI_dynstr_append(ds_frag, datatoc_bsdf_sampling_lib_glsl);
 -		BLI_dynstr_append(ds_frag, datatoc_ambient_occlusion_lib_glsl);
 +			BLI_dynstr_append(ds_frag, datatoc_ambient_occlusion_lib_glsl);
  		BLI_dynstr_append(ds_frag, datatoc_raytrace_lib_glsl);
  		BLI_dynstr_append(ds_frag, datatoc_ssr_lib_glsl);
 -		BLI_dynstr_append(ds_frag, datatoc_octahedron_lib_glsl);
 -		BLI_dynstr_append(ds_frag, datatoc_irradiance_lib_glsl);
 -		BLI_dynstr_append(ds_frag, datatoc_lightprobe_lib_glsl);
 -		BLI_dynstr_append(ds_frag, datatoc_ltc_lib_glsl);
 -		BLI_dynstr_append(ds_frag, dat

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list