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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-11-19 03:15:08 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-11-20 17:45:22 +0300
commitf68ef05a56b7b3dca4825513b257441739c373b9 (patch)
treea89fb2c66a3f5bf779787d13d9ceed97492f5274 /source/blender
parentaea4ed00d5a7fe661f12fbe1a16ad6574d9be8ea (diff)
Cycles: add basic backwards compatibility for device selection, move to System tab.
For the multi-GPU case users still have to reconfigure the devices they want to use. Based on patch from Lukas Stockner. Differential Revision: https://developer.blender.org/D2347
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c8
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h8
-rw-r--r--source/blender/makesrna/intern/rna_main.c2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c22
4 files changed, 29 insertions, 11 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 015988efc42..20f7ca4db16 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1108,8 +1108,12 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
tselem->flag &= ~TSE_CLOSED;
if (TSELEM_OPEN(tselem, soops)) {
- for (a = 0; a < tot; a++)
- outliner_add_element(soops, &te->subtree, (void *)ptr, te, TSE_RNA_PROPERTY, a);
+ for (a = 0; a < tot; a++) {
+ RNA_property_collection_lookup_int(ptr, iterprop, a, &propptr);
+ if (!(RNA_property_flag(propptr.data) & PROP_HIDDEN)) {
+ outliner_add_element(soops, &te->subtree, (void *)ptr, te, TSE_RNA_PROPERTY, a);
+ }
+ }
}
else if (tot)
te->flag |= TE_LAZY_CLOSED;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index e018b66dd60..0ad4482708f 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -867,14 +867,6 @@ typedef enum eNdof_Flag {
#define NDOF_PIXELS_PER_SECOND 600.0f
-/* compute_device_type */
-typedef enum eCompute_Device_Type {
- USER_COMPUTE_DEVICE_NONE = 0,
- USER_COMPUTE_DEVICE_OPENCL = 1,
- USER_COMPUTE_DEVICE_CUDA = 2,
-} eCompute_Device_Type;
-
-
typedef enum eMultiSample_Type {
USER_MULTISAMPLE_NONE = 0,
USER_MULTISAMPLE_2 = 2,
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index d432f086dba..94687b6fd46 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -399,7 +399,7 @@ void RNA_def_main(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Autopack", "Automatically pack all external data into .blend file");
prop = RNA_def_int_vector(srna, "version", 3, NULL, 0, INT_MAX,
- "Version", "Version of the blender the .blend was saved with", 0, INT_MAX);
+ "Version", "Version of Blender the .blend was saved with", 0, INT_MAX);
RNA_def_property_int_funcs(prop, "rna_Main_version_get", NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_flag(prop, PROP_THICK_WRAP);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 10807c32b91..ffdc5bb0592 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -124,6 +124,14 @@ static EnumPropertyItem rna_enum_language_default_items[] = {
#endif
+static void rna_userdef_version_get(PointerRNA *ptr, int *value)
+{
+ UserDef *userdef = (UserDef *)ptr->data;
+ value[0] = userdef->versionfile / 100;
+ value[1] = userdef->versionfile % 100;
+ value[2] = userdef->subversionfile;
+}
+
static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
{
WM_main_add_notifier(NC_WINDOW, NULL);
@@ -4194,6 +4202,14 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "OpenSubdiv Compute Type", "Type of computer back-end used with OpenSubdiv");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_PROPERTIES, "rna_userdef_opensubdiv_update");
#endif
+
+#ifdef WITH_CYCLES
+ prop = RNA_def_property(srna, "legacy_compute_device_type", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "compute_device_type");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ RNA_def_property_ui_text(prop, "Legacy Compute Device Type", "For backwards compatibility only");
+#endif
}
static void rna_def_userdef_input(BlenderRNA *brna)
@@ -4711,6 +4727,12 @@ void RNA_def_userdef(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_UserDef_system_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "System & OpenGL", "Graphics driver and operating system settings");
+ prop = RNA_def_int_vector(srna, "version", 3, NULL, 0, INT_MAX,
+ "Version", "Version of Blender the userpref.blend was saved with", 0, INT_MAX);
+ RNA_def_property_int_funcs(prop, "rna_userdef_version_get", NULL, NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_THICK_WRAP);
+
rna_def_userdef_view(brna);
rna_def_userdef_edit(brna);
rna_def_userdef_input(brna);