Commit: b333870203f3673de882e1306e5e2874f517832b
Author: Sebastián Barschkis
Date: Fri Sep 20 15:36:07 2019 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBb333870203f3673de882e1306e5e2874f517832b
Mantaflow: Fix for multiple modifiers issue
Some old smoke names were not renamed correctly
===================================================================
M intern/cycles/blender/blender_util.h
M release/scripts/presets/mantaflow/honey.py
M release/scripts/presets/mantaflow/oil.py
M release/scripts/presets/mantaflow/water.py
M release/scripts/startup/bl_operators/object_quick_effects.py
M release/scripts/startup/bl_ui/properties_data_modifier.py
M release/scripts/startup/bl_ui/properties_physics_manta.py
M source/blender/makesrna/intern/rna_modifier.c
===================================================================
diff --git a/intern/cycles/blender/blender_util.h
b/intern/cycles/blender/blender_util.h
index f93a254ee9e..1ff506e6f86 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -529,7 +529,7 @@ static inline BL::MantaDomainSettings
object_manta_domain_find(BL::Object &b_ob)
if (b_mod->is_a(&RNA_MantaModifier)) {
BL::MantaModifier b_mmd(*b_mod);
- if (b_mmd.type() == BL::MantaModifier::type_DOMAIN)
+ if (b_mmd.manta_type() == BL::MantaModifier::manta_type_DOMAIN)
return b_mmd.domain_settings();
}
}
diff --git a/release/scripts/presets/mantaflow/honey.py
b/release/scripts/presets/mantaflow/honey.py
index d1b9707c948..7381363b7c6 100644
--- a/release/scripts/presets/mantaflow/honey.py
+++ b/release/scripts/presets/mantaflow/honey.py
@@ -1,3 +1,3 @@
import bpy
-bpy.context.smoke.domain_settings.viscosity_base = 2.0
-bpy.context.smoke.domain_settings.viscosity_exponent = 3
+bpy.context.manta.domain_settings.viscosity_base = 2.0
+bpy.context.manta.domain_settings.viscosity_exponent = 3
diff --git a/release/scripts/presets/mantaflow/oil.py
b/release/scripts/presets/mantaflow/oil.py
index 6bbb84e6f0d..cd3e76d996b 100644
--- a/release/scripts/presets/mantaflow/oil.py
+++ b/release/scripts/presets/mantaflow/oil.py
@@ -1,3 +1,3 @@
import bpy
-bpy.context.smoke.domain_settings.viscosity_base = 5.0
-bpy.context.smoke.domain_settings.viscosity_exponent = 5
+bpy.context.manta.domain_settings.viscosity_base = 5.0
+bpy.context.manta.domain_settings.viscosity_exponent = 5
diff --git a/release/scripts/presets/mantaflow/water.py
b/release/scripts/presets/mantaflow/water.py
index 17095ce7b7e..3583710b4d3 100644
--- a/release/scripts/presets/mantaflow/water.py
+++ b/release/scripts/presets/mantaflow/water.py
@@ -1,3 +1,3 @@
import bpy
-bpy.context.smoke.domain_settings.viscosity_base = 1.0
-bpy.context.smoke.domain_settings.viscosity_exponent = 6
+bpy.context.manta.domain_settings.viscosity_base = 1.0
+bpy.context.manta.domain_settings.viscosity_exponent = 6
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py
b/release/scripts/startup/bl_operators/object_quick_effects.py
index 48c196be754..73641190a82 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -367,7 +367,7 @@ class QuickSmoke(ObjectModeOperator, Operator):
fake_context["object"] = obj
# make each selected object a smoke flow
bpy.ops.object.modifier_add(fake_context, type='MANTA')
- obj.modifiers[-1].type = 'FLOW'
+ obj.modifiers[-1].manta_type = 'FLOW'
# set type
obj.modifiers[-1].flow_settings.flow_type = self.style
@@ -392,7 +392,7 @@ class QuickSmoke(ObjectModeOperator, Operator):
# setup smoke domain
bpy.ops.object.modifier_add(type='MANTA')
- obj.modifiers[-1].type = 'DOMAIN'
+ obj.modifiers[-1].manta_type = 'DOMAIN'
if self.style == 'FIRE' or self.style == 'BOTH':
obj.modifiers[-1].domain_settings.use_noise = True
@@ -463,7 +463,7 @@ class QuickLiquid(Operator):
fake_context["object"] = obj
# make each selected object a liquid flow
bpy.ops.object.modifier_add(fake_context, type='MANTA')
- obj.modifiers[-1].type = 'FLOW'
+ obj.modifiers[-1].manta_type = 'FLOW'
# set type
obj.modifiers[-1].flow_settings.flow_type = 'LIQUID'
@@ -488,7 +488,7 @@ class QuickLiquid(Operator):
# setup liquid domain
bpy.ops.object.modifier_add(type='MANTA')
- obj.modifiers[-1].type = 'DOMAIN'
+ obj.modifiers[-1].manta_type = 'DOMAIN'
obj.modifiers[-1].domain_settings.domain_type = 'LIQUID'
# set all domain borders to obstacle
obj.modifiers[-1].domain_settings.use_collision_border_front = True
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py
b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 47c911821fc..1e78141071a 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -932,7 +932,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "angle")
col.prop(md, "limits", slider=True)
- def SMOKE(self, layout, _ob, _md):
+ def MANTA(self, layout, _ob, _md):
layout.label(text="Settings are inside the Physics tab")
def SMOOTH(self, layout, ob, md):
diff --git a/release/scripts/startup/bl_ui/properties_physics_manta.py
b/release/scripts/startup/bl_ui/properties_physics_manta.py
index 7191e6ab93e..d646866639d 100644
--- a/release/scripts/startup/bl_ui/properties_physics_manta.py
+++ b/release/scripts/startup/bl_ui/properties_physics_manta.py
@@ -45,7 +45,7 @@ class PhysicButtonsPanel:
return False
md = context.manta
- return md and (context.manta.type != 'NONE') and
(bpy.app.build_options.manta)
+ return md and (context.manta.manta_type != 'NONE') and
(bpy.app.build_options.manta)
@staticmethod
def poll_fluid_domain(context):
@@ -53,7 +53,7 @@ class PhysicButtonsPanel:
return False
md = context.manta
- return md and (md.type == 'DOMAIN')
+ return md and (md.manta_type == 'DOMAIN')
@staticmethod
def poll_gas_domain(context):
@@ -61,7 +61,7 @@ class PhysicButtonsPanel:
return False
md = context.manta
- if md and (md.type == 'DOMAIN'):
+ if md and (md.manta_type == 'DOMAIN'):
domain = md.domain_settings
return domain.domain_type in {'GAS'}
return False
@@ -72,7 +72,7 @@ class PhysicButtonsPanel:
return False
md = context.manta
- if md and (md.type == 'DOMAIN'):
+ if md and (md.manta_type == 'DOMAIN'):
domain = md.domain_settings
return domain.domain_type in {'LIQUID'}
return False
@@ -83,7 +83,7 @@ class PhysicButtonsPanel:
return False
md = context.manta
- return md and (md.type == 'FLOW')
+ return md and (md.manta_type == 'FLOW')
class PHYSICS_PT_manta(PhysicButtonsPanel, Panel):
@@ -107,7 +107,7 @@ class PHYSICS_PT_manta(PhysicButtonsPanel, Panel):
md = context.manta
- layout.prop(md, "type")
+ layout.prop(md, "manta_type")
class PHYSICS_PT_manta_fluid(PhysicButtonsPanel, Panel):
@@ -130,7 +130,7 @@ class PHYSICS_PT_manta_fluid(PhysicButtonsPanel, Panel):
ob = context.object
scene = context.scene
- if md.type == 'DOMAIN':
+ if md.manta_type == 'DOMAIN':
domain = md.domain_settings
# Deactivate UI if guiding is enabled but not baked yet
@@ -182,7 +182,7 @@ class PHYSICS_PT_manta_fluid(PhysicButtonsPanel, Panel):
else:
split.operator("manta.free_data", text="Free Data")
- elif md.type == 'FLOW':
+ elif md.manta_type == 'FLOW':
flow = md.flow_settings
row = layout.row()
@@ -215,7 +215,7 @@ class PHYSICS_PT_manta_fluid(PhysicButtonsPanel, Panel):
col.separator()
col.prop_search(flow, "density_vertex_group", ob,
"vertex_groups", text="Vertex Group")
- elif md.type == 'EFFECTOR':
+ elif md.manta_type == 'EFFECTOR':
effec = md.effec_settings
row = layout.row()
@@ -923,7 +923,7 @@ class PHYSICS_PT_manta_guiding(PhysicButtonsPanel, Panel):
col = flow.column()
col.prop(domain, "guiding_source", text="Velocity Source")
- if domain.guiding_source == "DOMAIN":
+ if domain.guiding_source == "DOMAIN":
col.prop(domain, "guiding_parent", text="Guiding parent")
col.separator()
diff --git a/source/blender/makesrna/intern/rna_modifier.c
b/source/blender/makesrna/intern/rna_modifier.c
index aebfa969602..2a4cbb8f364 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -3434,7 +3434,7 @@ static void rna_def_modifier_manta(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "effec");
RNA_def_property_ui_text(prop, "Effector Settings", "");
- prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "manta_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_manta_type_items);
RNA_def_property_ui_text(prop, "Type", "");
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs