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/space_image/image_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/space_image/image_ops.c')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 0a3713a41e4..335de6e173a 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -565,6 +565,8 @@ static void image_view_zoom_cancel(bContext *C, wmOperator *op) void IMAGE_OT_view_zoom(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "View Zoom"; ot->idname = "IMAGE_OT_view_zoom"; @@ -581,8 +583,9 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot) ot->flag = OPTYPE_BLOCKING | OPTYPE_LOCK_BYPASS; /* properties */ - RNA_def_float(ot->srna, "factor", 0.0f, -FLT_MAX, FLT_MAX, - "Factor", "Zoom factor, values higher than 1.0 zoom in, lower values zoom out", -FLT_MAX, FLT_MAX); + prop = RNA_def_float(ot->srna, "factor", 0.0f, -FLT_MAX, FLT_MAX, "Factor", + "Zoom factor, values higher than 1.0 zoom in, lower values zoom out", -FLT_MAX, FLT_MAX); + RNA_def_property_flag(prop, PROP_HIDDEN); } /********************** NDOF operator *********************/ @@ -800,6 +803,8 @@ static int image_view_zoom_in_invoke(bContext *C, wmOperator *op, const wmEvent void IMAGE_OT_view_zoom_in(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "View Zoom In"; ot->idname = "IMAGE_OT_view_zoom_in"; @@ -814,7 +819,9 @@ void IMAGE_OT_view_zoom_in(wmOperatorType *ot) ot->flag = OPTYPE_LOCK_BYPASS; /* properties */ - RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in screen coordinates", -10.0f, 10.0f); + prop = RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, + "Location", "Cursor location in screen coordinates", -10.0f, 10.0f); + RNA_def_property_flag(prop, PROP_HIDDEN); } static int image_view_zoom_out_exec(bContext *C, wmOperator *op) @@ -845,6 +852,8 @@ static int image_view_zoom_out_invoke(bContext *C, wmOperator *op, const wmEvent void IMAGE_OT_view_zoom_out(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "View Zoom Out"; ot->idname = "IMAGE_OT_view_zoom_out"; @@ -859,7 +868,9 @@ void IMAGE_OT_view_zoom_out(wmOperatorType *ot) ot->flag = OPTYPE_LOCK_BYPASS; /* properties */ - RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in screen coordinates", -10.0f, 10.0f); + prop = RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, + "Location", "Cursor location in screen coordinates", -10.0f, 10.0f); + RNA_def_property_flag(prop, PROP_HIDDEN); } /********************** view zoom ratio operator *********************/ |