[Bf-blender-cvs] [c83447cdf46] fluid-mantaflow: Mantaflow: Mantaflow is now not an experimental feature
Sebastián Barschkis
noreply at git.blender.org
Thu Dec 12 17:54:25 CET 2019
Commit: c83447cdf46e1fe3d15c5076941f5cd06ab16778
Author: Sebastián Barschkis
Date: Thu Dec 12 17:53:44 2019 +0100
Branches: fluid-mantaflow
https://developer.blender.org/rBc83447cdf46e1fe3d15c5076941f5cd06ab16778
Mantaflow: Mantaflow is now not an experimental feature
===================================================================
M release/scripts/startup/bl_operators/object_quick_effects.py
M release/scripts/startup/bl_ui/properties_physics_manta.py
M release/scripts/startup/bl_ui/space_userpref.py
M source/blender/blenkernel/intern/DerivedMesh.c
M source/blender/blenloader/intern/writefile.c
M source/blender/makesdna/DNA_userdef_types.h
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index 07971f5aa89..e49ca0320c7 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -352,9 +352,6 @@ class QuickSmoke(ObjectModeOperator, Operator):
if not bpy.app.build_options.fluid:
self.report({'ERROR'}, "Built without Fluid modifier")
return {'CANCELLED'}
- if not (context.preferences.experimental.use_manta_fluids or context.preferences.experimental.use_experimental_all):
- self.report({'ERROR'}, "Modifier only available as experimental feature, can be enabled in preferences")
- return {'CANCELLED'}
fake_context = context.copy()
mesh_objects = [obj for obj in context.selected_objects
@@ -458,9 +455,6 @@ class QuickLiquid(Operator):
if not bpy.app.build_options.fluid:
self.report({'ERROR'}, "Built without Fluid modifier")
return {'CANCELLED'}
- if not (context.preferences.experimental.use_manta_fluids or context.preferences.experimental.use_experimental_all):
- self.report({'ERROR'}, "Modifier only available as experimental feature, can be enabled in preferences")
- return {'CANCELLED'}
fake_context = context.copy()
mesh_objects = [obj for obj in context.selected_objects
diff --git a/release/scripts/startup/bl_ui/properties_physics_manta.py b/release/scripts/startup/bl_ui/properties_physics_manta.py
index 1ce3061c6be..f59e0f1756f 100644
--- a/release/scripts/startup/bl_ui/properties_physics_manta.py
+++ b/release/scripts/startup/bl_ui/properties_physics_manta.py
@@ -39,12 +39,6 @@ class PhysicButtonsPanel:
bl_region_type = 'WINDOW'
bl_context = "physics"
- @staticmethod
- def poll_manta_enabled(context):
- if not (context.preferences.experimental.use_manta_fluids or context.preferences.experimental.use_experimental_all) or not (bpy.app.build_options.fluid):
- return False
- return True
-
@staticmethod
def poll_fluid(context):
ob = context.object
@@ -52,7 +46,7 @@ class PhysicButtonsPanel:
return False
md = context.fluid
- return md and (context.fluid.fluid_type != 'NONE') and PhysicButtonsPanel.poll_manta_enabled(context)
+ return md and (context.fluid.fluid_type != 'NONE')
@staticmethod
def poll_fluid_domain(context):
@@ -111,11 +105,6 @@ class PHYSICS_PT_manta(PhysicButtonsPanel, Panel):
col.alignment = 'RIGHT'
col.label(text="Built without Fluid modifier")
return
- if not (context.preferences.experimental.use_manta_fluids or context.preferences.experimental.use_experimental_all):
- col = layout.column(align=True)
- col.alignment = 'RIGHT'
- col.label(text="Modifier only available as experimental feature, can be enabled in preferences", icon='ERROR')
- return
md = context.fluid
layout.prop(md, "fluid_type")
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 965c902f846..e86eaac9c33 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2165,23 +2165,6 @@ class USERPREF_PT_experimental_all(ExperimentalPanel, Panel):
# For the other settings create new panels
# and make sure they are disabled if use_experimental_all is True
-
-class USERPREF_PT_experimental_physics(ExperimentalPanel, Panel):
- bl_label = "Physics"
-
- def draw_props(self, context, layout):
- prefs = context.preferences
- experimental = prefs.experimental
- layout.active = not experimental.use_experimental_all
-
- task = "T59995"
- split = layout.split(factor=0.66)
- col = split.split()
- col.prop(experimental, "use_manta_fluids")
- col = split.split()
- col.operator("wm.url_open", text=task, icon='URL').url = "https://developer.blender.org/" + task
-
-
"""
# Example panel, leave it here so we always have a template to follow even
# after the features are gone from the experimental panel.
@@ -2293,7 +2276,6 @@ classes = (
USERPREF_PT_studiolight_world,
USERPREF_PT_experimental_all,
- USERPREF_PT_experimental_physics,
# Add dynamically generated editor theme panels last,
# so they show up last in the theme section.
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 00f0aa4340f..8be7a947a67 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1019,14 +1019,6 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph,
for (; md; md = md->next, md_datamask = md_datamask->next) {
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- /* Mantaflow currently requires experimental flag. */
- if ((md->type == eModifierType_Manta) && !((U.experimental.flag & USER_EXPERIMENTAL_MANTA) ||
- (U.experimental.flag & USER_EXPERIMENTAL_ALL))) {
- modifier_setError(
- md, "Modifier only available as experimental feature, can be enabled in preferences");
- continue;
- }
-
if (!modifier_isEnabled(scene, md, required_mode)) {
continue;
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 23c827cfde9..282ad0d6e15 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1631,14 +1631,6 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
else if (md->type == eModifierType_Manta) {
FluidModifierData *mmd = (FluidModifierData *)md;
- bool is_valid = (mmd->domain || mmd->flow || mmd->effector);
- /* Mantaflow currently requires experimental flag. */
- if (!((U.experimental.flag & USER_EXPERIMENTAL_MANTA) ||
- (U.experimental.flag & USER_EXPERIMENTAL_ALL)) &&
- (!is_valid)) {
- continue;
- }
-
if (mmd->type & MOD_MANTA_TYPE_DOMAIN) {
writestruct(wd, DATA, FluidDomainSettings, 1, mmd->domain);
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 93f670c696b..11a0e441392 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -908,7 +908,6 @@ typedef enum eUserPref_SpaceData_Flag {
/** #UserDef_Experimental.flag. */
typedef enum eUserPref_Experimental_Flag {
USER_EXPERIMENTAL_ALL = (1 << 0),
- USER_EXPERIMENTAL_MANTA = (1 << 1),
} eUserPref_Experimental_Flag;
/** #UserDef.flag */
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index dd4dd35db4f..5d2bf161020 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -249,25 +249,6 @@ static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
USERDEF_TAG_DIRTY;
}
-static void rna_userdef_use_manta_fluids_update(bContext *C,
- Main *bmain,
- Scene *scene,
- PointerRNA *ptr)
-{
- Object *ob = CTX_data_active_object(C);
- DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
- WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, &ob->id);
- rna_userdef_update(bmain, scene, ptr);
-}
-
-static void rna_userdef_use_experimental_all_update(bContext *C,
- Main *bmain,
- Scene *scene,
- PointerRNA *ptr)
-{
- rna_userdef_use_manta_fluids_update(C, bmain, scene, ptr);
-}
-
static void rna_userdef_theme_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
/* Recreate gizmos when changing themes. */
@@ -5861,18 +5842,10 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_experimental_all", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_EXPERIMENTAL_ALL);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_ui_text(prop,
"All Experimental Features",
"Expose all the experimental features in the user interface");
- RNA_def_property_update(prop, 0, "rna_userdef_use_experimental_all_update");
-
- prop = RNA_def_property(srna, "use_manta_fluids", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_EXPERIMENTAL_MANTA);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_ui_text(
- prop, "Mantaflow Fluid Simulation", "Use new Mantaflow Fluid Simulation Framework");
- RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_userdef_use_manta_fluids_update");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
More information about the Bf-blender-cvs
mailing list