Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_fluidsim.c')
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index a62002365c9..936e1700ed7 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -72,17 +72,10 @@ static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr)
}
}
-static void rna_fluid_update(bContext *C, PointerRNA *ptr)
-{
- Object *ob= ptr->id.data;
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
-}
-
static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
FluidsimModifierData *fluidmd;
ParticleSystemModifierData *psmd;
@@ -131,7 +124,8 @@ static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
}
}
- rna_fluid_update(C, ptr);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
}
static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *value)
@@ -168,7 +162,7 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
RNA_def_property_enum_items(prop, slip_items);
RNA_def_property_ui_text(prop, "Slip Type", "");
- prop= RNA_def_property(srna, "partial_slip_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "partial_slip_amount", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "partSlipValue");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Partial Slip Amount", "Amount of mixing between no- and free-slip, 0 is no slip and 1 is free slip.");
@@ -222,7 +216,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "guiDisplayMode");
RNA_def_property_enum_items(prop, quality_items);
RNA_def_property_ui_text(prop, "Viewport Display Mode", "How to display the mesh in the viewport.");
- RNA_def_property_update(prop, 0, "rna_fluid_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "render_display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "renderDisplayMode");
@@ -237,7 +231,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 240);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store baked fluid simulation files in.");
- RNA_def_property_update(prop, 0, "rna_fluid_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "memory_estimate", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -437,7 +431,7 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 240);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store and load particles from.");
- RNA_def_property_update(prop, 0, "rna_fluid_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
}
static void rna_def_fluidsim_control(BlenderRNA *brna)