Python Scripting – How to Create a Property Group / Enum in a Panel

Darkfall writes:

In this video, we will be looking at adding an Enumerator and other Custom Properties onto a Panel. We will also be creating a Property Group which will contain a number of custom Properties we can define.

We will need a couple of things before we can get started. We will need a basic script that contains a Panel, operator and a registration section. You can use Blender’s Templates to add a panel and operator (though if you want to follow along you can download the starting script from our blog here).

In this example we will be adding a String (so the user can enter text), a Float (so the user can enter a number value) and we will also be adding an Enumerator (dropdown selection). You can add more (or different) properties to suit your needs.

As always, I hope you find this helpful and thanks for reading!

Advertisement