forked from bartvdbraak/blender
Fluid simulation manual number of threads option now doesn't set the number
of threads to the number of cores when the fluid is created. Rather it is now set to 0 which means "use the number of threads specified for the scene".
This commit is contained in:
parent
b11dc51974
commit
c4ee1f2658
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user