Support Blender Core Development with a monthly contribution.
The creators who share. Access production content and knowledge from the Open Movies.
Latest news and updates on Blender development.
Join the community and help with design, development, docs and more.
A platform to collect and display the Blender Benchmark results.
Documentation on Blender's features, tools and API.
The yearly event that brings together the Blender community in one place.
Download the latest Blender version, or try the beta!
Introduction & copy-pasting
Names & Objects
Stuff on Lists
Collections: Mass-Rename of Objects
For vs. While
Your Own Operator
From Script to Add-on
Roast my Add-on
The Roast of Nature Clicker
Readability & Understandability
Render 10,000 OBJ files
Mass-Rename Bones & Vertex Groups
Rendering from 'all' angles
17th April 2020
Buttons, panels, and menus. In this chapter of Scripting for Artists, Sybren shows the basics of creating your own user interface in Blender.
Join to comment publicly.
19th April 2020 - 13:39
A very clear and resourceful video. Even after making 30+ addons I learned a few things.
e.g: I will certainly use columns starting now ;), thanks Doc.
20th July 2020 - 13:15
Thanks for the tutorial. But how do I make the x, y and size values be defined by user input in the panel? I tried:
def draw(self, context): #draw panel
col = self.layout.column(align=True)
props = col.operator('mesh.monkey_grid',
text = 'Generate Grid',
icon = 'MONKEY')
The fields with the default paramaters show up in the panel, but I'm not able to change them. My guess is that I have to work with variables. I tried a couple of things, but I failed. Anyone?
4th August 2020 - 15:53
*@Tijm Lanjouw* You have to define the user-editable properties somewhere else. If they are to be saved within the blend file, you typically would add them to bpy.types.Scene. If they are temporary, you typically add them to bpy.types.WindowManager. You can then use them to assign for example props.count_x = context.scene.my_monkey_grid_count_x.
props.count_x = context.scene.my_monkey_grid_count_x
You cannot use operator properties with layout.prop().
2nd January 2021 - 22:40
@Sybren A. Stüvel For those searching, this is explained better in chapter 11 ;)