[Bf-blender-cvs] [2457cfdfb6c] fluid-mantaflow: Merge branch 'mantaWrapper' into pythonScripts
Sebastián Barschkis
noreply at git.blender.org
Sat Apr 6 22:13:24 CEST 2019
Commit: 2457cfdfb6ce162691acbdd19a78939f8fa73c16
Author: Sebastián Barschkis
Date: Tue Mar 26 15:22:26 2019 +0100
Branches: fluid-mantaflow
https://developer.blender.org/rB2457cfdfb6ce162691acbdd19a78939f8fa73c16
Merge branch 'mantaWrapper' into pythonScripts
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_operators/presets.py
index 4d5a0672353,baacb0c051e..fdbd239679d
--- a/release/scripts/startup/bl_operators/presets.py
+++ b/release/scripts/startup/bl_operators/presets.py
@@@ -760,9 -701,7 +719,8 @@@ classes =
AddPresetCamera,
AddPresetCloth,
AddPresetFluid,
+ AddPresetManta,
AddPresetHairDynamics,
- AddPresetInteraction,
AddPresetInterfaceTheme,
AddPresetKeyconfig,
AddPresetNodeColor,
diff --cc release/scripts/startup/bl_ui/properties_particle.py
index 444a53701fb,e2504ba39ef..958551aab90
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@@ -194,14 -202,9 +202,9 @@@ class PARTICLE_PT_context_particles(Par
else:
part = psys.settings
- split = layout.split(factor=0.32)
- col = split.column()
- if (part.is_fluid is False) and (part.is_manta is False):
- col.label(text="Settings:")
- col.label(text="Type:")
+ col = layout.column()
- col = split.column()
- if part.is_fluid is False:
+ if (part.is_fluid is False) and (part.is_manta is False):
row = col.row()
row.enabled = particle_panel_enabled(context, psys)
row.template_ID(psys, "settings", new="particle.new")
diff --cc release/scripts/startup/bl_ui/properties_physics_smoke.py
index 1b243da99d3,9d170d07c69..5d03fd527f7
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@@ -54,36 -48,10 +54,36 @@@ class PhysicButtonsPanel
md = context.smoke
return md and (md.smoke_type == 'DOMAIN')
+ 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
+
+ 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
+
+ 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_OPENGL'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@@@ -104,10 -72,11 +104,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_OPENGL'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@@@ -166,85 -105,68 +166,85 @@@
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")
++ # col.prop(domain, "clipping", text="Empty Space")
+
+ col.separator()
- # This can be tweaked after baking, for render.
- col.prop(domain, "clipping", text="Empty Space")
+ 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.operator("manta.pause_bake", text="Pause Data")
+ 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":
+ col.prop(effec, "velocity_factor", text="Velocity Factor")
+ col = flow.column()
+ col.prop(effec, "guiding_mode", text="Guiding Mode")
-class PHYSICS_PT_smoke_settings_initial_velocity(PhysicButtonsPanel, Panel):
- bl_label = "Initial Velocity"
- bl_parent_id = 'PHYSICS_PT_smoke_settings'
+class PHYSICS_PT_manta_smoke(PhysicButtonsPanel, Panel):
+ bl_label = "Smoke"
+ bl_parent_id = 'PHYSICS_PT_manta_fluid'
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@@@ -256,28 -187,26 +256,28 @@@
def draw(self, context):
layout = self.layout
layout.use_property_split = True
- flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
md = context.smoke
- flow_smoke = md.flow_settings
-
- flow.active = flow_smoke.use_initial_velocity
+ domain = md.domain_settings
- col = flow.column(align=True)
- col.prop(flow_smoke, "velocity_factor")
+ baking_any
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list