Revision: 56942
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56942
Author:   blendix
Date:     2013-05-21 11:37:42 +0000 (Tue, 21 May 2013)
Log Message:
-----------
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".

Modified Paths:
--------------
    trunk/blender/source/blender/editors/physics/physics_fluid.c
    trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c
    trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c

Modified: trunk/blender/source/blender/editors/physics/physics_fluid.c
===================================================================
--- trunk/blender/source/blender/editors/physics/physics_fluid.c        
2013-05-21 10:13:47 UTC (rev 56941)
+++ trunk/blender/source/blender/editors/physics/physics_fluid.c        
2013-05-21 11:37:42 UTC (rev 56942)
@@ -994,7 +994,7 @@
        /* ******** 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);

Modified: trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c 2013-05-21 
10:13:47 UTC (rev 56941)
+++ trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c 2013-05-21 
11:37:42 UTC (rev 56942)
@@ -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 @@
 
        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");

Modified: trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c   
2013-05-21 10:13:47 UTC (rev 56941)
+++ trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c   
2013-05-21 11:37:42 UTC (rev 56942)
@@ -76,7 +76,7 @@
                
                fss->fmd = fluidmd;
                fss->type = OB_FLUIDSIM_ENABLE;
-               fss->threads = BLI_system_thread_count();
+               fss->threads = 0;
                fss->show_advancedoptions = 0;
 
                fss->resolutionxyz = 65;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to