Cleanup: use a more specific name for NDOF's guide
Prepare for having a second guide (!129594).
This commit is contained in:
@@ -2089,7 +2089,7 @@ class USERPREF_PT_ndof_settings(Panel):
|
||||
|
||||
col = layout.column()
|
||||
if show_3dview_settings:
|
||||
col.prop(props, "ndof_show_guide")
|
||||
col.prop(props, "ndof_show_guide_orbit_axis")
|
||||
col.prop(props, "ndof_zoom_invert")
|
||||
col.prop(props, "ndof_lock_camera_pan_zoom")
|
||||
row = col.row(heading="Pan")
|
||||
|
||||
@@ -1027,8 +1027,10 @@ static void draw_view_axis(RegionView3D *rv3d, const rcti *rect)
|
||||
}
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
/* draw center and axis of rotation for ongoing 3D mouse navigation */
|
||||
static void draw_rotation_guide(const RegionView3D *rv3d)
|
||||
/**
|
||||
* Draw center and axis of rotation for ongoing 3D mouse navigation.
|
||||
*/
|
||||
static void draw_ndof_guide_orbit_axis(const RegionView3D *rv3d)
|
||||
{
|
||||
float o[3]; /* center of rotation */
|
||||
float end[3]; /* endpoints for drawing */
|
||||
@@ -1455,11 +1457,11 @@ void view3d_draw_region_info(const bContext *C, ARegion *region)
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
if ((U.ndof_flag & NDOF_SHOW_GUIDE) && ((RV3D_LOCK_FLAGS(rv3d) & RV3D_LOCK_ROTATION) == 0) &&
|
||||
(rv3d->persp != RV3D_CAMOB))
|
||||
{
|
||||
/* TODO: draw something else (but not this) during fly mode */
|
||||
draw_rotation_guide(rv3d);
|
||||
if (U.ndof_flag & NDOF_SHOW_GUIDE_ORBIT_AXIS) {
|
||||
if (((RV3D_LOCK_FLAGS(rv3d) & RV3D_LOCK_ROTATION) == 0) && (rv3d->persp != RV3D_CAMOB)) {
|
||||
/* TODO: draw something else (but not this) during fly mode. */
|
||||
draw_ndof_guide_orbit_axis(rv3d);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1509,7 +1509,7 @@ typedef enum eTimecodeStyles {
|
||||
|
||||
/** #UserDef.ndof_flag (3D mouse options) */
|
||||
typedef enum eNdof_Flag {
|
||||
NDOF_SHOW_GUIDE = (1 << 0),
|
||||
NDOF_SHOW_GUIDE_ORBIT_AXIS = (1 << 0),
|
||||
NDOF_FLY_HELICOPTER = (1 << 1),
|
||||
NDOF_LOCK_HORIZON = (1 << 2),
|
||||
|
||||
|
||||
@@ -6762,8 +6762,8 @@ static void rna_def_userdef_input(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Invert Zoom", "Zoom using opposite direction");
|
||||
|
||||
/* 3D view */
|
||||
prop = RNA_def_property(srna, "ndof_show_guide", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "ndof_flag", NDOF_SHOW_GUIDE);
|
||||
prop = RNA_def_property(srna, "ndof_show_guide_orbit_axis", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "ndof_flag", NDOF_SHOW_GUIDE_ORBIT_AXIS);
|
||||
|
||||
/* TODO: update description when fly-mode visuals are in place
|
||||
* ("projected position in fly mode"). */
|
||||
|
||||
Reference in New Issue
Block a user