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

Bastien Montagne noreply at git.blender.org
Mon Sep 26 17:20:29 CEST 2016


Commit: 8cff9c20fff954cb0aa725c15c064c3aecf322b5
Author: Bastien Montagne
Date:   Mon Sep 26 17:19:03 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB8cff9c20fff954cb0aa725c15c064c3aecf322b5

Merge branch 'master' into blender2.8

WARNING! Full build is broken, alembic has not been merged in correctly and has some references to particle stuff.
Don't have time to tackle this now (and probably would be better if someone knowing what he's doing does it anyway).

Conflicts:
	release/scripts/startup/bl_ui/properties_particle.py
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenkernel/intern/smoke.c
	source/blender/editors/physics/particle_object.c
	source/blender/editors/physics/physics_intern.h
	source/blender/editors/physics/physics_ops.c
	source/blender/editors/space_outliner/outliner_intern.h
	source/blender/editors/space_view3d/drawvolume.c
	source/blender/makesrna/intern/rna_smoke.c

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



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

diff --cc source/blender/blenkernel/intern/library_remap.c
index 69b52c9,b468e64..b7f7f2c
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@@ -98,6 -98,8 +98,7 @@@
  #include "BKE_node.h"
  #include "BKE_object.h"
  #include "BKE_paint.h"
 -#include "BKE_particle.h"
+ #include "BKE_sca.h"
  #include "BKE_speaker.h"
  #include "BKE_sound.h"
  #include "BKE_screen.h"
diff --cc source/blender/blenkernel/intern/smoke.c
index 4a8629e,05540f5..0535612
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@@ -523,6 -535,15 +523,14 @@@ void smokeModifier_createType(struct Sm
  			smd->domain->openvdb_comp = VDB_COMPRESSION_ZIP;
  #endif
  			smd->domain->data_depth = 0;
 -			smd->domain->cache_file_format = PTCACHE_FILE_PTCACHE;
+ 
+ 			smd->domain->display_thickness = 1.0f;
+ 			smd->domain->slice_method = MOD_SMOKE_SLICE_VIEW_ALIGNED;
+ 			smd->domain->axis_slice_method = AXIS_SLICE_FULL;
+ 			smd->domain->slice_per_voxel = 5.0f;
+ 			smd->domain->slice_depth = 0.5f;
+ 			smd->domain->slice_axis = 0;
+ 			smd->domain->vector_scale = 1.0f;
  		}
  		else if (smd->type & MOD_SMOKE_TYPE_FLOW)
  		{
@@@ -614,8 -637,18 +622,17 @@@ void smokeModifier_copy(struct SmokeMod
  		tsmd->domain->openvdb_comp = smd->domain->openvdb_comp;
  		tsmd->domain->data_depth = smd->domain->data_depth;
  		tsmd->domain->cache_file_format = smd->domain->cache_file_format;
+ 
+ 		tsmd->domain->slice_method = smd->domain->slice_method;
+ 		tsmd->domain->axis_slice_method = smd->domain->axis_slice_method;
+ 		tsmd->domain->slice_per_voxel = smd->domain->slice_per_voxel;
+ 		tsmd->domain->slice_depth = smd->domain->slice_depth;
+ 		tsmd->domain->slice_axis = smd->domain->slice_axis;
+ 		tsmd->domain->draw_velocity = smd->domain->draw_velocity;
+ 		tsmd->domain->vector_draw_type = smd->domain->vector_draw_type;
+ 		tsmd->domain->vector_scale = smd->domain->vector_scale;
  	}
  	else if (tsmd->flow) {
 -		tsmd->flow->psys = smd->flow->psys;
  		tsmd->flow->noise_texture = smd->flow->noise_texture;
  
  		tsmd->flow->vel_multi = smd->flow->vel_multi;
diff --cc source/blender/editors/physics/physics_ops.c
index 3572597,7ba4b2b..d0cb7fd
--- a/source/blender/editors/physics/physics_ops.c
+++ b/source/blender/editors/physics/physics_ops.c
@@@ -88,6 -225,12 +88,9 @@@ void ED_operatortypes_physics(void
  	operatortypes_dynamicpaint();
  }
  
 -void ED_keymap_physics(wmKeyConfig *keyconf)
 +void ED_keymap_physics(wmKeyConfig *UNUSED(keyconf))
  {
 -	keymap_particle(keyconf);
 -	//keymap_pointcache(keyconf);
  }
+ 
+ 
+ 
diff --cc source/blender/editors/space_outliner/outliner_intern.h
index a65733c,a1663dd..e95ca32
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@@ -61,8 -61,8 +61,8 @@@ typedef struct TreeElement 
  
  #define TREESTORE_ID_TYPE(_id) \
  	(ELEM(GS((_id)->name), ID_SCE, ID_LI, ID_OB, ID_ME, ID_CU, ID_MB, ID_NT, ID_MA, ID_TE, ID_IM, ID_LT, ID_LA, ID_CA) || \
 -	 ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_PA, ID_GD, ID_LS) || \
 +	 ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_GD, ID_LS) || \
- 	 ELEM(GS((_id)->name), ID_SCR, ID_WM, ID_TXT, ID_VF, ID_SO, ID_CF))  /* Only in 'blendfile' mode ... :/ */
+ 	 ELEM(GS((_id)->name), ID_SCR, ID_WM, ID_TXT, ID_VF, ID_SO, ID_CF, ID_PAL))  /* Only in 'blendfile' mode ... :/ */
  
  /* TreeElement->flag */
  #define TE_ACTIVE       1
diff --cc source/blender/editors/space_view3d/drawvolume.c
index 75ba8bc,b0e2160..9cfcd6c
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@@ -41,6 -40,9 +41,8 @@@
  #include "BLI_utildefines.h"
  #include "BLI_math.h"
  
+ #include "BKE_DerivedMesh.h"
 -#include "BKE_particle.h"
+ 
  #include "smoke_API.h"
  
  #include "BIF_gl.h"
diff --cc source/blender/makesrna/intern/rna_smoke.c
index 3f9bcde,40a4541..b0be30a
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@@ -400,6 -435,40 +400,32 @@@ static void rna_def_smoke_domain_settin
  		{0, NULL, 0, NULL, NULL}
  	};
  
 -	static EnumPropertyItem cache_file_type_items[] = {
 -		{PTCACHE_FILE_PTCACHE, "POINTCACHE", 0, "Point Cache", "Blender specific point cache file format"},
 -#ifdef WITH_OPENVDB
 -		{PTCACHE_FILE_OPENVDB, "OPENVDB", 0, "OpenVDB", "OpenVDB file format"},
 -#endif
 -		{0, NULL, 0, NULL, NULL}
 -	};
 -
+ 	static EnumPropertyItem smoke_view_items[] = {
+ 	    {MOD_SMOKE_SLICE_VIEW_ALIGNED, "VIEW_ALIGNED", 0, "View", "Slice volume parallel to the view plane"},
+ 	    {MOD_SMOKE_SLICE_AXIS_ALIGNED, "AXIS_ALIGNED", 0, "Axis", "Slice volume parallel to the major axis"},
+ 	    {0, NULL, 0, NULL, NULL}
+ 	};
+ 
+ 	static EnumPropertyItem axis_slice_method_items[] = {
+ 	    {AXIS_SLICE_FULL, "FULL", 0, "Full", "Slice the whole domain object"},
+ 	    {AXIS_SLICE_SINGLE, "SINGLE", 0, "Single", "Perform a single slice of the domain object"},
+ 	    {0, NULL, 0, NULL, NULL}
+ 	};
+ 
+ 	static EnumPropertyItem axis_slice_position_items[] = {
+ 	    {SLICE_AXIS_AUTO, "AUTO", 0, "Auto", "Adjust slice direction according to the view direction"},
+ 	    {SLICE_AXIS_X, "X", 0, "X", "Slice along the X axis"},
+ 	    {SLICE_AXIS_Y, "Y", 0, "Y", "Slice along the Y axis"},
+ 	    {SLICE_AXIS_Z, "Z", 0, "Z", "Slice along the Z axis"},
+ 	    {0, NULL, 0, NULL, NULL}
+ 	};
+ 
+ 	static EnumPropertyItem vector_draw_items[] = {
+ 	    {VECTOR_DRAW_NEEDLE, "NEEDLE", 0, "Needle", "Draw vectors as needles"},
+ 	    {VECTOR_DRAW_STREAMLINE, "STREAMLINE", 0, "Streamlines", "Draw vectors as streamlines"},
+ 	    {0, NULL, 0, NULL, NULL}
+ 	};
+ 
  	srna = RNA_def_struct(brna, "SmokeDomainSettings", NULL);
  	RNA_def_struct_ui_text(srna, "Domain Settings", "Smoke domain settings");
  	RNA_def_struct_sdna(srna, "SmokeDomainSettings");
@@@ -658,7 -737,74 +684,66 @@@
  	RNA_def_property_ui_range(prop, 0.01, 0.5, 1.0, 5);
  	RNA_def_property_ui_text(prop, "Threshold",
  	                         "Maximum amount of fluid cell can contain before it is considered empty");
- 	RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_update");
 -	RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
 -
 -	prop = RNA_def_property(srna, "cache_file_format", PROP_ENUM, PROP_NONE);
 -	RNA_def_property_enum_sdna(prop, NULL, "cache_file_format");
 -	RNA_def_property_enum_items(prop, cache_file_type_items);
 -	RNA_def_property_enum_funcs(prop, NULL, "rna_Smoke_cachetype_set", NULL);
 -	RNA_def_property_ui_text(prop, "File Format", "Select the file format to be used for caching");
 -	RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
+ 
+ 	/* display settings */
+ 
+ 	prop = RNA_def_property(srna, "slice_method", PROP_ENUM, PROP_NONE);
+ 	RNA_def_property_enum_sdna(prop, NULL, "slice_method");
+ 	RNA_def_property_enum_items(prop, smoke_view_items);
+ 	RNA_def_property_ui_text(prop, "View Method", "How to slice the volume for viewport rendering");
+ 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+ 
+ 	prop = RNA_def_property(srna, "axis_slice_method", PROP_ENUM, PROP_NONE);
+ 	RNA_def_property_enum_sdna(prop, NULL, "axis_slice_method");
+ 	RNA_def_property_enum_items(prop, axis_slice_method_items);
+ 	RNA_def_property_ui_text(prop, "Method", "");
+ 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+ 
+ 	prop = RNA_def_property(srna, "slice_axis", PROP_ENUM, PROP_NONE);
+ 	RNA_def_property_enum_sdna(prop, NULL, "slice_axis");
+ 	RNA_def_property_enum_items(prop, axis_slice_position_items);
+ 	RNA_def_property_ui_text(prop, "Axis", "");
+ 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+ 
+ 	prop = RNA_def_property(srna, "slice_per_voxel", PROP_FLOAT, PROP_NONE);
+ 	RNA_def_property_float_sdna(prop, NULL, "slice_per_voxel");
+ 	RNA_def_property_range(prop, 0.0, 100.0);
+ 	RNA_def_property_ui_range(prop, 0.0, 5.0, 0.1, 1);
+ 	RNA_def_property_ui_text(prop, "Slice Per Voxel",
+ 	                         "How many slices per voxel should be generated");
+ 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+ 
+ 	prop = RNA_def_property(srna, "slice_depth", PROP_FLOAT, PROP_NONE);
+ 	RNA_def_property_float_sdna(prop, NULL, "slice_depth");
+ 	RNA_def_property_range(prop, 0.0, 1.0);
+ 	RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 3);
+ 	RNA_def_property_ui_text(prop, "Position", "Position of the slice");
+ 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+ 
+ 	prop = RNA_def_property(srna, "display_thickness", PROP_FLOAT, PROP_NONE);
+ 	RNA_def_property_float_sdna(prop, NULL, "display_thickness");
+ 	RNA_def_property_range(prop, 0.001, 1000.0);
+ 	RNA_def_property_ui_range(prop, 0.1, 100.0, 0.1, 3);
+ 	RNA_def_property_ui_text(prop, "Thickness", "Thickness of smoke drawing in the viewport");
+ 	RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, NULL);
+ 
+ 	prop = RNA_def_property(srna, "draw_velocity", PROP_BOOLEAN, PROP_NONE);
+ 	RNA_def_property_boolean_sdna(prop, NULL, "draw_velocity", 0);
+ 	RNA_def_property_ui_text(prop, "Draw Velocity", "Toggle visualation of the velocity field as needles");
+ 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+ 
+ 	prop = RNA_def_property(srna, "vector_draw_type", PROP_ENUM, PROP_NONE);
+ 	RNA_def_property_enum_sdna(prop, NULL, "vector_draw_type");
+ 	RNA_def_property_enum_items(prop, vector_draw_items);
+ 	RNA_def_property_ui_text(prop, "Draw Type", "");
+ 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+ 
+ 	prop = RNA_def_property(srna, "vector_scale", PROP_FLOAT, PROP_NONE);
+ 	RNA_def_property_float_sdna(prop, NULL, "vector_scale");
+ 	RNA_def_property_range(prop, 0.0, 1000.0);
+ 	RNA_def_property_ui_range(prop, 0.0, 100.0, 0.1, 3);
+ 	RNA_def_property_ui_text(prop, "Scale", "Multiplier for scaling the vectors");
+ 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
  }
  
  static void rna_def_smoke_flow_settings(BlenderRNA *brna)




More information about the Bf-blender-cvs mailing list