Fix T46903: Missing Render Border Menu items
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 20 Apr 2016 13:02:03 +0000 (15:02 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 20 Apr 2016 13:02:03 +0000 (15:02 +0200)
While other borders are more like a toggle, it is an intrinsic behavior
of those operators. Render Border is intrinsicly split into two operators
and trying to expose it as a toggle will end up with rather confusing
situation when shortcut listed in the menu changes depending on the
context.

release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/space_image/image_ops.c

index 10b4e24efd9f7d9d3a6771841e048ee1f910788b..fbea07a317ed6b5fbcef5a66294ddc132f1f9989 100644 (file)
@@ -113,6 +113,11 @@ class IMAGE_MT_view(Menu):
         layout.separator()
 
         if show_render:
+            layout.operator("image.render_border")
+            layout.operator("image.clear_render_border")
+
+            layout.separator()
+
             layout.operator("image.cycle_render_slot", text="Render Slot Cycle Next")
             layout.operator("image.cycle_render_slot", text="Render Slot Cycle Previous").reverse = True
             layout.separator()
index cbcdb86c41e2c1722606f83b1dc34465cebd1e1e..8db6f81ea514b49c5571bfd26a1ad1a4d7e593c1 100644 (file)
@@ -438,6 +438,7 @@ class VIEW3D_MT_view(Menu):
         layout.operator("view3d.clip_border", text="Clipping Border...")
         layout.operator("view3d.zoom_border", text="Zoom Border...")
         layout.operator("view3d.render_border", text="Render Border...").camera_only = False
+        layout.operator("view3d.clear_render_border")
 
         layout.separator()
 
index eb74922a25639a1cce91a679d1ddb78310cc059c..80dbfa140f69fad8d47f8b4842841e5aaa8db388 100644 (file)
@@ -3554,7 +3554,7 @@ static int clear_render_border_exec(bContext *C, wmOperator *UNUSED(op))
 void IMAGE_OT_clear_render_border(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name = "Render Border";
+       ot->name = "Clear Render Border";
        ot->description = "Clear the boundaries of the border render and disable border render";
        ot->idname = "IMAGE_OT_clear_render_border";