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:
authorJens Verwiebe <info@jensverwiebe.de>2013-04-10 22:35:18 +0400
committerJens Verwiebe <info@jensverwiebe.de>2013-04-10 22:35:18 +0400
commitcbe9ae244e5af8b89e28a6fe03405bcb368ba83b (patch)
tree383220a82cfeea4845f96f298e34b98939014bf2 /source/blender
parentac224a64f408fcc8f90f7ea0124cbe4b9ef1e811 (diff)
Add a gui control for setting omp threads in fluids
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/physics/physics_fluid.c2
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h5
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c5
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim_util.c1
4 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 9197b9e99da..1de2f14dbc0 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;
// setup global settings
copy_v3_v3(fsset->geoStart, domainSettings->bbStart);
copy_v3_v3(fsset->geoSize, domainSettings->bbSize);
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
index dc4e4f54fd7..aaebdf579f8 100644
--- a/source/blender/makesdna/DNA_object_fluidsim.h
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -48,6 +48,9 @@ typedef struct FluidVertexVelocity {
typedef struct FluidsimSettings {
struct FluidsimModifierData *fmd; /* for fast RNA access */
+ /* threadcont the calculation is done with */
+ int threads;
+ int pad1;
/* domain, fluid or obstacle */
short type;
/* display advanced options in fluid sim tab (on=1, off=0)*/
@@ -75,7 +78,7 @@ typedef struct FluidsimSettings {
int bakeStart, bakeEnd;
/* offset for baked frames */
int frameOffset;
- int pad;
+ int pad2;
/* g star param (LBM compressibility) */
float gstar;
/* activate refinement? */
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index 9ff83daa2f8..d6ca900397a 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -280,6 +280,11 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
/* standard settings */
+ 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");
+
prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolutionxyz");
RNA_def_property_range(prop, 1, 1024);
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c
index b39ddf62c55..6afe121be90 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -75,6 +75,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
fss->fmd = fluidmd;
fss->type = OB_FLUIDSIM_ENABLE;
+ fss->threads = 4;
fss->show_advancedoptions = 0;
fss->resolutionxyz = 65;