Cleanup: remove redundant preferences.inputs.use_ndof

This is available via: bpy.app.build_options.input_ndof
This commit is contained in:
Campbell Barton
2024-04-12 21:24:13 +10:00
parent 196954dc66
commit a4de136e78
2 changed files with 1 additions and 10 deletions

View File

@@ -1812,9 +1812,7 @@ class USERPREF_PT_input_ndof(InputPanel, CenterAlignMixIn, Panel):
@classmethod
def poll(cls, context):
prefs = context.preferences
inputs = prefs.inputs
return inputs.use_ndof
return bpy.app.build_options.input_ndof
def draw_centered(self, context, layout):
prefs = context.preferences

View File

@@ -6501,14 +6501,7 @@ static void rna_def_userdef_input(BlenderRNA *brna)
prop,
"Lock Camera Pan/Zoom",
"Pan/zoom the camera view instead of leaving the camera view when orbiting");
/* let Python know whether NDOF is enabled */
prop = RNA_def_boolean(srna, "use_ndof", true, "", "");
# else
prop = RNA_def_boolean(srna, "use_ndof", false, "", "");
# endif /* WITH_INPUT_NDOF */
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "mouse_double_click_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, nullptr, "dbl_click_time");