0
$\begingroup$

How do I assign a custom hotkey to this f6 type(properties) pop-up ? I have tried putting "wm.call_menu" in the keymap items but it seems like it doesn't work for this kind of pop-up.

Here's the code

   class ShowPopupOperator(bpy.types.Operator):
       bl_idname = "object.show_popup"
       bl_label = "sample show popup"
       bl_options = {'REGISTER','UNDO'} 

       prop1 = bpy.props.IntProperty() 
       prop2 = bpy.props.FloatProperty() 

       def invoke(self, context, event): 
           return context.window_manager.invoke_props_popup(self, event) 
       def execute(self, context): # do stuff here 
           return {'FINISHED'} 

       def draw(self, context):
           col = self.layout.column()
           row = col.row() 
           row.label("Hello this the operator drawing") 
           row = col.row() 
           row.prop(self, 'prop1') 
           row = col.row() 
           row.prop(self, 'prop2')
$\endgroup$
  • $\begingroup$ I think this or this is what you are looking for. $\endgroup$ – sambler Jul 23 '17 at 6:28
  • 1
    $\begingroup$ No, I was asking that could a hotkey be assigned through Python for this specific type of pop-up ? I tried coding a hotkey like I usually do with regular pies and menus but it gives me a "wm.call_menu not found", I also created a panel button for it then assigned a hotkey to it but it gives me the same error. $\endgroup$ – Retrax Jul 23 '17 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.