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

Python Scripting - Property Subtypes and Password Protection

1

Darkfall writes:

In this video, we will be taking a look at some different Subtypes for our Properties.

Simply by changing the subtype of a property can change how the property is displayed on a panel or dialog box. In the previous video you may have seen how we changed a simple Float Vector Property into a Color (with alpha) input.

If you want to follow along, you can download the template script from our blog.

Within custom properties we can define many different arguments such as the Name, description and so on. In this example we want to focus one one argument in particular and that is the subtype.

Using the Python Console we can not only find what arguments we can use but also what subtypes and more. You will find that some subtypes are useful for certain situations and depending on what option or value you want to display, the choice will vary.

Thanks to the String Subtype, I also wanted to show you a quick way to password protect your operations or options. You could take it further and add more features to it.

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

About Author

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

  1. I guess if you have an encoded source of data outside the script (program on the hard drive, server on the intranet/internet), you could protect the user from visual attacks.

    Though it's a bit confusing to call it a PASSWORD subtype when all it really does is display strings as asterisks. This could be used for any and all confidential information - DOB, Credit Card details, etc.

    Please, don't use your credit card details as a password. :)

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.