[Bf-blender-cvs] [355bbb1d493] HMD_viewport: use 'use_' as an RNA prefix

Campbell Barton noreply at git.blender.org
Sun Apr 2 18:24:36 CEST 2017


Commit: 355bbb1d493f02ef77b16919db169232896ad8c6
Author: Campbell Barton
Date:   Mon Apr 3 02:24:11 2017 +1000
Branches: HMD_viewport
https://developer.blender.org/rB355bbb1d493f02ef77b16919db169232896ad8c6

use 'use_' as an RNA prefix

===================================================================

M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 58e79eb4abb..f1e35d81449 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -507,10 +507,10 @@ class USERPREF_PT_system(Panel):
 
             col.label(text="Head Mounted Displays:")
             col.prop(system, "hmd_device", text="Device")
-            col.prop(system, "hmd_use_device_rotation")
-            col.prop(system, "hmd_use_device_ipd")
+            col.prop(system, "use_hmd_device_rotation")
+            col.prop(system, "use_hmd_device_ipd")
             subcol = col.column()
-            subcol.active = not system.hmd_use_device_ipd or system.hmd_device == 'NONE'
+            subcol.active = (not system.use_hmd_device_ipd) or (system.hmd_device == 'NONE')
             subcol.prop(system, "hmd_custom_ipd")
 
         # 2. Column
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 439eeafde5b..6d1bf73f513 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -614,7 +614,7 @@ static void rna_userdef_hmd_device_update(Main *UNUSED(bmain), Scene *UNUSED(sce
 	}
 }
 
-void rna_userdef_hmd_use_device_ipd_set(PointerRNA *UNUSED(ptr), int value)
+void rna_userdef_use_hmd_device_ipd_set(PointerRNA *UNUSED(ptr), int value)
 {
 	if (value) {
 		U.hmd_settings.flag |= USER_HMD_USE_DEVICE_IPD;
@@ -4290,15 +4290,15 @@ static void rna_def_userdef_system(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "HMD Device", "Device to use for HMD view interaction");
 	RNA_def_property_update(prop, 0, "rna_userdef_hmd_device_update");
 
-	prop = RNA_def_property(srna, "hmd_use_device_ipd", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "use_hmd_device_ipd", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "hmd_settings.flag", USER_HMD_USE_DEVICE_IPD);
-	RNA_def_property_boolean_funcs(prop, NULL, "rna_userdef_hmd_use_device_ipd_set");
+	RNA_def_property_boolean_funcs(prop, NULL, "rna_userdef_use_hmd_device_ipd_set");
 	RNA_def_property_ui_text(prop, "IPD from HMD", "Request the interpupillary distance (distance between the "
 	                         "eye pupil centers) from the HMD driver");
 	RNA_def_property_editable_func(prop, "rna_userdef_hmd_active_device_poll");
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 
-	prop = RNA_def_property(srna, "hmd_use_device_rotation", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "use_hmd_device_rotation", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "hmd_settings.flag", USER_HMD_USE_DEVICE_ROT);
 	RNA_def_property_ui_text(prop, "Rotation from HMD", "Use the rotation of a head mounted display if available");
 	RNA_def_property_editable_func(prop, "rna_userdef_hmd_active_device_poll");




More information about the Bf-blender-cvs mailing list