diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-08-30 18:38:06 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-08-30 18:38:41 +0400 |
commit | 16791fbecf2245a2eb7cfb73a24c9a98c1cdf216 (patch) | |
tree | c810a66a2c2841ef6a9979b3e3a5ebdd25f35f97 /source/blender/editors/interface/view2d_ops.c | |
parent | ec76d47a48b5091e4c25ea95d815602d860760fc (diff) |
Fix T41642: Zoom View hotkey: Zoom Position Y doesn't working
Hide zoom settings that have no use in UI/shortcuts definitions.
Diffstat (limited to 'source/blender/editors/interface/view2d_ops.c')
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 895a5f145f0..2b84c0678ae 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -767,6 +767,8 @@ static int view_zoomin_invoke(bContext *C, wmOperator *op, const wmEvent *event) static void VIEW2D_OT_zoom_in(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "Zoom In"; ot->description = "Zoom in the view"; @@ -778,10 +780,12 @@ static void VIEW2D_OT_zoom_in(wmOperatorType *ot) ot->poll = view_zoom_poll; /* rna - must keep these in sync with the other operators */ - RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, "Zoom Factor X", "", -FLT_MAX, FLT_MAX); - RNA_def_float(ot->srna, "zoomfacy", 0, -FLT_MAX, FLT_MAX, "Zoom Factor Y", "", -FLT_MAX, FLT_MAX); + prop = RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, "Zoom Factor X", "", -FLT_MAX, FLT_MAX); + RNA_def_property_flag(prop, PROP_HIDDEN); + prop = RNA_def_float(ot->srna, "zoomfacy", 0, -FLT_MAX, FLT_MAX, "Zoom Factor Y", "", -FLT_MAX, FLT_MAX); + RNA_def_property_flag(prop, PROP_HIDDEN); } - + /* this operator only needs this single callback, where it calls the view_zoom_*() methods */ static int view_zoomout_exec(bContext *C, wmOperator *op) { @@ -828,6 +832,8 @@ static int view_zoomout_invoke(bContext *C, wmOperator *op, const wmEvent *event static void VIEW2D_OT_zoom_out(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "Zoom Out"; ot->description = "Zoom out the view"; @@ -839,8 +845,10 @@ static void VIEW2D_OT_zoom_out(wmOperatorType *ot) ot->poll = view_zoom_poll; /* rna - must keep these in sync with the other operators */ - RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, "Zoom Factor X", "", -FLT_MAX, FLT_MAX); - RNA_def_float(ot->srna, "zoomfacy", 0, -FLT_MAX, FLT_MAX, "Zoom Factor Y", "", -FLT_MAX, FLT_MAX); + prop = RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, "Zoom Factor X", "", -FLT_MAX, FLT_MAX); + RNA_def_property_flag(prop, PROP_HIDDEN); + prop = RNA_def_float(ot->srna, "zoomfacy", 0, -FLT_MAX, FLT_MAX, "Zoom Factor Y", "", -FLT_MAX, FLT_MAX); + RNA_def_property_flag(prop, PROP_HIDDEN); } /* ********************************************************* */ @@ -1139,6 +1147,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event static void VIEW2D_OT_zoom(wmOperatorType *ot) { + PropertyRNA *prop; /* identifiers */ ot->name = "Zoom 2D View"; ot->description = "Zoom in/out the view"; @@ -1156,8 +1165,10 @@ static void VIEW2D_OT_zoom(wmOperatorType *ot) ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER; /* rna - must keep these in sync with the other operators */ - RNA_def_float(ot->srna, "deltax", 0, -FLT_MAX, FLT_MAX, "Delta X", "", -FLT_MAX, FLT_MAX); - RNA_def_float(ot->srna, "deltay", 0, -FLT_MAX, FLT_MAX, "Delta Y", "", -FLT_MAX, FLT_MAX); + prop = RNA_def_float(ot->srna, "deltax", 0, -FLT_MAX, FLT_MAX, "Delta X", "", -FLT_MAX, FLT_MAX); + RNA_def_property_flag(prop, PROP_HIDDEN); + prop = RNA_def_float(ot->srna, "deltay", 0, -FLT_MAX, FLT_MAX, "Delta Y", "", -FLT_MAX, FLT_MAX); + RNA_def_property_flag(prop, PROP_HIDDEN); } /* ********************************************************* */ |