diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 1de2f14dbc0..b2c780cfdbf 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -994,7 +994,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor /* ******** export domain to elbeem ******** */ elbeemResetSettings(fsset); fsset->version = 1; - fsset->threads = domainSettings->threads; + fsset->threads = (domainSettings->threads == 0) ? BKE_scene_num_threads(scene) : domainSettings->threads; // setup global settings copy_v3_v3(fsset->geoStart, domainSettings->bbStart); copy_v3_v3(fsset->geoSize, domainSettings->bbSize); diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index 923e52e29c0..b18c21d53f1 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -28,6 +28,7 @@ #include "DNA_object_fluidsim.h" +#include "BLI_threads.h" #include "BLI_utildefines.h" #include "BLI_path_util.h" @@ -284,8 +285,8 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna) prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "threads"); - RNA_def_property_range(prop, 1, 32); - RNA_def_property_ui_text(prop, "Simulation Threads", "Threads used to calculate the simulation"); + RNA_def_property_range(prop, 0, BLENDER_MAX_THREADS); + RNA_def_property_ui_text(prop, "Simulation Threads", "Override number of threads for the simulation, 0 is automatic"); prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolutionxyz"); diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index ed42a30b351..e96ddcde161 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -76,7 +76,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd) fss->fmd = fluidmd; fss->type = OB_FLUIDSIM_ENABLE; - fss->threads = BLI_system_thread_count(); + fss->threads = 0; fss->show_advancedoptions = 0; fss->resolutionxyz = 65;