1

I am trying out this example from the templates:

class LayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label = "Layout Demo"
    bl_idname = "SCENE_PT_layout"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "output"
def draw(self, context):
    layout = self.layout

but now i'm stuck with getting autocompletion for layout.

Normally you can type in the commands e.g. "bpy." and with tab you will see all commands which are possible.

Since i now don't have "self" how can i get the autocompletion for layout?

batFINGER
  • 84,216
  • 10
  • 108
  • 233
John MC
  • 708
  • 2
  • 12
  • 1
    AFAIK no simple way to do this. Instead can print(dir(self.layout)) in a draw method, or consult the docs for bpy.types.UILayout Somewhat related https://blender.stackexchange.com/a/182852/15543 – batFINGER Sep 07 '21 at 09:17
  • 1
    I use this tool within PyCharm for writing scripts so i can get Intellisense, auto complete etc. https://github.com/Korchy/blender_autocomplete – Rug Sep 07 '21 at 11:36

0 Answers0