Advertisement

You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

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

1

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!

About the Author

Avatar image for John Brook
John Brook

I make Youtube tutorials for blender Users. From CG and VFX to Animations, Shorts and Asset Creation. I upload tutorials once a week along with any assets we create for you to use in your own projects.

1 Comment

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.

Advertisement

×