Page MenuHome

Value typing issue in pie menu
Closed, ResolvedPublic

Description

System Intormation
Windows 8.1 | GTX680

Blender Version
Broken: 2.6.4 d970f02

Description
When using value input field as a pie menu item, it only accepts "0" "5" and ./*+ and a few other signs, which seems something quite strange. Thanks for checking.

How to Reproduce

  1. run the script below.
  2. in 3D view, press Shift + Q, then try typing values there.
import bpy
from bpy.types import Menu, Panel, UIList

class VIEW3D_PIE2_temp(Menu):

    bl_label = "John's Object Pie Menu2"
    bl_idname = "object2.tools_menu"  
    
    
    def draw(self, context):
        layout = self.layout
        
        scene = context.scene
        rd = scene.render

        pie = layout.menu_pie()
        
        col = pie.column(align=True)
        col.label(text="Resolution:")
        
        col.prop(rd, "resolution_x", text="X")
        col.prop(rd, "resolution_y", text="Y")
        col.prop(rd, "resolution_percentage", text="")
        
        
        
        
addon_keymaps = []

def register():
    bpy.utils.register_class(VIEW3D_PIE2_temp)
    
    
    
    wm = bpy.context.window_manager
    km = bpy.context.window_manager.keyconfigs.active.keymaps['Object Mode']
    
    kmi = km.keymap_items.new('wm.call_menu_pie', 'Q', 'PRESS',shift=True)
    kmi.properties.name = 'object2.tools_menu' 
    addon_keymaps.append(km)


def unregister():
    bpy.utils.unregister_class(VIEW3D_PIE2_temp)
    
    
if __name__ == "__main__":
    register()

Revisions and Commits

Event Timeline

Leon Cheung (leon_cheung) raised the priority of this task from to 90.
Leon Cheung (leon_cheung) updated the task description. (Show Details)
Leon Cheung (leon_cheung) edited a custom field.
Bastien Montagne (mont29) lowered the priority of this task from 90 to 50.Dec 18 2015, 2:20 PM

Problems comes from Pie menu using 1,2,3,4,6,7,8,9 as 'arrow directions' to quickly select relevant entries… That should be inhibited when a widget is being edited, imho.

Fixed in master, note however that you are kinda abusing pies here, they are not really designed to host editable buttons like that afaik (they are supposed to be another type of menu, not dialog boxes…).