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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/scene.c8
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c1
-rw-r--r--source/blender/makesdna/DNA_scene_types.h16
-rw-r--r--source/blender/makesrna/intern/rna_scene.c11
4 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 02bc1fcb699..e501010fc56 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -638,8 +638,8 @@ Scene *BKE_scene_add(Main *bmain, const char *name)
sce->gm.exitkey = 218; // Blender key code for ESC
- sce->omp_mode = SCE_OMP_AUTO;
- sce->omp_num_threads = 1;
+ sce->omp_threads_mode = SCE_OMP_AUTO;
+ sce->omp_threads = 1;
sound_create_scene(sce);
@@ -1873,8 +1873,8 @@ int BKE_scene_num_threads(const Scene *scene)
int BKE_scene_num_omp_threads(const struct Scene *scene)
{
- if (scene->omp_mode == SCE_OMP_AUTO)
+ if (scene->omp_threads_mode == SCE_OMP_AUTO)
return BLI_omp_thread_count();
else
- return scene->omp_num_threads;
+ return scene->omp_threads;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 32c6f108ac4..441ce0f29b6 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -3787,6 +3787,7 @@ static void sculpt_omp_start(Scene *scene, Sculpt *sd, SculptSession *ss)
}
omp_set_num_threads(cache->num_threads); /* set user-defined corecount wich is physical cores when "AUTO" ( atm. OSX-only )*/
#else
+ (void)scene;
(void)sd;
cache->num_threads = 1;
#endif
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index d135ae6a962..0c950ff9ff0 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1165,8 +1165,13 @@ typedef struct Scene {
short flag; /* various settings */
- short use_nodes;
-
+ char use_nodes;
+
+ /* Openmp Global Settings */
+ char omp_threads_mode;
+ short omp_threads;
+ char pad[6];
+
struct bNodeTree *nodetree;
struct Editing *ed; /* sequence editor data is allocated here */
@@ -1224,13 +1229,8 @@ typedef struct Scene {
/* RigidBody simulation world+settings */
struct RigidBodyWorld *rigidbody_world;
-
- /* Openmp Global Settings */
- int omp_num_threads;
- int omp_mode;
} Scene;
-
/* **************** RENDERDATA ********************* */
/* flag */
@@ -1775,7 +1775,7 @@ typedef enum SculptFlags {
/* OpenMP settings */
#define SCE_OMP_AUTO 0
-#define SCE_OMP_MANUAL 1
+#define SCE_OMP_FIXED 1
#ifdef __cplusplus
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index b374e9552be..d15e9dc3441 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -5096,8 +5096,8 @@ void RNA_def_scene(BlenderRNA *brna)
};
static EnumPropertyItem omp_threads_mode_items[] = {
- {SCE_OMP_AUTO, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
- {SCE_OMP_MANUAL, "MANUAL", 0, "Manual", "Manually determine the number of threads"},
+ {SCE_OMP_AUTO, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads"},
+ {SCE_OMP_FIXED, "FIXED", 0, "Fixed", "Manually determine the number of threads"},
{0, NULL, 0, NULL, NULL}
};
@@ -5463,14 +5463,13 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ColorManagedSequencerColorspaceSettings");
RNA_def_property_ui_text(prop, "Sequencer Color Space Settings", "Settings of color space sequencer is working in");
- prop = RNA_def_property(srna, "omp_num_threads", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "omp_threads", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, BLENDER_MAX_THREADS);
RNA_def_property_int_funcs(prop, "rna_omp_threads_get", NULL, NULL);
RNA_def_property_ui_text(prop, "OpenMP Threads",
- "Number of CPU threads to use simultaneously for openmp"
- "(for multi-core/CPU systems)");
+ "Number of CPU threads to use for openmp");
- prop = RNA_def_property(srna, "omp_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "omp_threads_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, omp_threads_mode_items);
RNA_def_property_ui_text(prop, "OpenMP Mode", "Determine the amount of openmp threads used");