[Bf-blender-cvs] [773647d319e] fluid-mantaflow: Merge 'master' into 'fluid-mantaflow'
Bastien Montagne
noreply at git.blender.org
Sat May 4 15:56:28 CEST 2019
Commit: 773647d319ee3a3ec6512b2201838dee25f9e2c9
Author: Bastien Montagne
Date: Sat May 4 15:55:17 2019 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB773647d319ee3a3ec6512b2201838dee25f9e2c9
Merge 'master' into 'fluid-mantaflow'
Conflicts:
release/scripts/startup/bl_ui/properties_physics_common.py
release/scripts/startup/bl_ui/properties_physics_smoke.py
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/smoke.c
source/blender/editors/physics/CMakeLists.txt
source/blender/makesdna/DNA_smoke_types.h
source/blender/modifiers/intern/MOD_smoke.c
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/properties_particle.py
index bf5e5c97564,7167be362ad..c27c867f458
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@@ -485,10 -485,10 +485,10 @@@ class PARTICLE_PT_cache(ParticleButtons
return False
if psys.settings is None:
return False
- if psys.settings.is_fluid:
+ if psys.settings.is_fluid or psys.settings.is_manta:
return False
phystype = psys.settings.physics_type
- if phystype == 'NO' or phystype == 'KEYED':
+ if phystype in {'NO', 'KEYED'}:
return False
return (
psys.settings.type in {'EMITTER', 'REACTOR'} or (
diff --cc release/scripts/startup/bl_ui/properties_physics_common.py
index efae5983fa0,aeeb4714d46..c748f31962b
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@@ -98,13 -96,14 +96,13 @@@ class PHYSICS_PT_add(PhysicButtonsPanel
col = flow.column()
if obj.type in {'MESH', 'LATTICE', 'CURVE', 'SURFACE', 'FONT'}:
- physics_add(self, col, context.soft_body, "Soft Body", 'SOFT_BODY', 'MOD_SOFT', True)
+ physics_add(col, context.soft_body, "Soft Body", 'SOFT_BODY', 'MOD_SOFT', True)
if obj.type == 'MESH':
- physics_add(self, col, context.smoke, "Fluid", 'SMOKE', 'MOD_SMOKE', True)
- physics_add(col, context.fluid, "Fluid", 'FLUID_SIMULATION', 'MOD_FLUIDSIM', True)
- physics_add(col, context.smoke, "Smoke", 'SMOKE', 'MOD_SMOKE', True)
++ physics_add(col, context.smoke, "Fluid", 'SMOKE', 'MOD_SMOKE', True)
physics_add_special(
- self, col, obj.rigid_body, "Rigid Body",
+ col, obj.rigid_body, "Rigid Body",
"rigidbody.object_add",
"rigidbody.object_remove",
'MESH_ICOSPHERE'
diff --cc release/scripts/startup/bl_ui/properties_physics_smoke.py
index d9399fd0780,898e1f3804e..be2f6923f15
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@@ -39,50 -33,26 +39,56 @@@ class PhysicButtonsPanel
bl_region_type = 'WINDOW'
bl_context = "physics"
+ @staticmethod
- def poll_smoke(context):
+ def poll_fluid(context):
ob = context.object
if not ((ob and ob.type == 'MESH') and (context.smoke)):
return False
md = context.smoke
- return md and (context.smoke.smoke_type != 'NONE') and (bpy.app.build_options.mod_smoke)
+ return md and (context.smoke.smoke_type != 'NONE') and (bpy.app.build_options.manta)
+ @staticmethod
- def poll_smoke_domain(context):
- if not PhysicButtonsPanel.poll_smoke(context):
+ def poll_fluid_domain(context):
+ if not PhysicButtonsPanel.poll_fluid(context):
return False
md = context.smoke
return md and (md.smoke_type == 'DOMAIN')
++ @staticmethod
+ def poll_smoke_domain(context):
+ if not PhysicButtonsPanel.poll_fluid(context):
+ return False
-class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
- bl_label = "Smoke"
+ md = context.smoke
+ if md and (md.smoke_type == 'DOMAIN'):
+ domain = md.domain_settings
+ return domain.smoke_domain_type in {'GAS'}
+ return False
+
++ @staticmethod
+ def poll_liquid_domain(context):
+ if not PhysicButtonsPanel.poll_fluid(context):
+ return False
+
+ md = context.smoke
+ if md and (md.smoke_type == 'DOMAIN'):
+ domain = md.domain_settings
+ return domain.smoke_domain_type in {'LIQUID'}
+ return False
+
++ @staticmethod
+ def poll_fluid_flow(context):
+ if not PhysicButtonsPanel.poll_fluid(context):
+ return False
+
+ md = context.smoke
+ return md and (md.smoke_type == 'FLOW')
+
++
+class PHYSICS_PT_manta(PhysicButtonsPanel, Panel):
+ bl_label = "Fluid"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
@@@ -104,9 -74,10 +110,10 @@@
layout.prop(md, "smoke_type")
+
-class PHYSICS_PT_smoke_settings(PhysicButtonsPanel, Panel):
+class PHYSICS_PT_manta_fluid(PhysicButtonsPanel, Panel):
bl_label = "Settings"
- bl_parent_id = 'PHYSICS_PT_smoke'
+ bl_parent_id = 'PHYSICS_PT_manta'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
@@@ -166,85 -107,67 +173,86 @@@
col.separator()
col = flow.column()
- sub = col.row()
- sub.enabled = (not domain.point_cache.is_baked)
- sub.prop(domain, "collision_extents", text="Border Collisions")
+ if scene.use_gravity:
+ sub = col.column()
+ sub.enabled = False
+ sub.prop(domain, "gravity", text="Using Scene Gravity", icon='SCENE_DATA')
+ else:
+ col.prop(domain, "gravity", text="Gravity")
+ # TODO (sebas): Clipping var useful for manta openvdb caching?
+ # col.prop(domain, "clipping", text="Empty Space")
- # This can be tweaked after baking, for render.
- col.prop(domain, "clipping", text="Empty Space")
+ col.separator()
+
+ split = layout.split()
+ bake_incomplete = (domain.cache_frame_pause_data < domain.cache_frame_end)
+ if domain.cache_baked_data and not domain.cache_baking_data and bake_incomplete:
+ col = split.column()
+ col.operator("manta.bake_data", text="Resume")
+ col = split.column()
+ col.operator("manta.free_data", text="Free")
+ elif domain.cache_baking_data and not domain.cache_baked_data:
+ split.enabled = False
+ split.operator("manta.pause_bake", text="Baking Data - ESC to pause")
+ elif not domain.cache_baked_data and not domain.cache_baking_data:
+ split.operator("manta.bake_data", text="Bake Data")
+ else:
+ split.operator("manta.free_data", text="Free Data")
elif md.smoke_type == 'FLOW':
- flow_smoke = md.flow_settings
+ flow = md.flow_settings
- col = layout.column()
- col.prop(flow_smoke, "smoke_flow_type", expand=False)
+ row = layout.row()
+ row.prop(flow, "smoke_flow_type", expand=False)
- col.separator()
+ grid = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
- flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
- col = flow.column()
+ col = grid.column()
+ col.prop(flow, "smoke_flow_behavior", expand=False)
+ if flow.smoke_flow_behavior in {'INFLOW'}:
+ col.prop(flow, "use_inflow", text="Use Inflow")
- if flow_smoke.smoke_flow_type != 'OUTFLOW':
- col.prop(flow_smoke, "smoke_flow_source", expand=False, text="Flow Source")
+ col.prop(flow, "subframes", text="Sampling Substeps")
- if flow_smoke.smoke_flow_source == 'PARTICLES':
- col.prop_search(
- flow_smoke, "particle_system", ob, "particle_systems",
- text="Particle System"
- )
- else:
- col.prop(flow_smoke, "surface_distance")
- col.prop(flow_smoke, "volume_density")
+ if not flow.smoke_flow_behavior == 'OUTFLOW' and flow.smoke_flow_type in {'SMOKE', 'BOTH', 'FIRE'}:
- col = flow.column()
- col.prop(flow_smoke, "use_absolute")
+ if flow.smoke_flow_type in {'SMOKE', 'BOTH'}:
+ col.prop(flow, "smoke_color", text="Smoke Color")
- if flow_smoke.smoke_flow_type in {'SMOKE', 'BOTH'}:
- col.prop(flow_smoke, "density")
- col.prop(flow_smoke, "temperature", text="Temperature Diff.")
+ col = grid.column(align=True)
+ col.prop(flow, "use_absolute", text="Absolute Density")
- col.separator()
+ if flow.smoke_flow_type in {'SMOKE', 'BOTH'}:
+ col.prop(flow, "temperature", text="Initial Temperature")
+ col.prop(flow, "density", text="Density")
- col = flow.column()
- col.prop(flow_smoke, "smoke_color")
+ if flow.smoke_flow_type in {'FIRE', 'BOTH'}:
+ col.prop(flow, "fuel_amount", text="Fuel")
- if flow_smoke.smoke_flow_type in {'FIRE', 'BOTH'}:
- col.prop(flow_smoke, "fuel_amount")
+ col.separator()
+ col.prop_search(flow, "density_vertex_group", ob, "vertex_groups", text="Vertex Group")
- col.prop(flow_smoke, "subframes", text="Sampling Subframes")
+ elif md.smoke_type == 'EFFECTOR':
+ effec = md.effec_settings
- col.separator()
+ row = layout.row()
+ row.prop(effec, "effec_type")
- col.prop_search(flow_smoke, "density_vertex_group", ob, "vertex_groups", text="Vertex Group")
+ flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
- elif md.smoke_type == 'COLLISION':
- coll = md.coll_settings
+ col = flow.column()
- col = layout.column()
- col.prop(coll, "collision_type")
+ col.prop(effec, "surface_distance", text="Surface Thickness")
+ if effec.effec_type == "GUIDE":
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list