Advertisement

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

Python Scripting: Finishing the Object Adder

0

Darkfall writes:

In this Video, we will be continuing to develop our first Add-on, The Object Adder.

We can add almost anything to our Panel and I suggest adding things that will help speed up your workflow!. If you find yourself always jumping from one panel to another as you work, you can take the most common settings and functions from various sections and place them into your add-on.

With that being said, I add a few more options such as the Smooth Shading, Add Modifier and more.

We also create a couple of new Panels (you can call them what ever you like), and then we can add them to our Main Panel. Adding panels inside other panels is really simple and only needs one line of code.

By adding the bl_parentid, we are telling the Panel to be a Child of the Main Panel.

If you have tons of Panels open by default it can be annoying for the user to navigate to the Section they intend to use.

Adding the bl_options, we are telling the Panel to be Closed by Default.

Once we are happy with our Add-on, we need to add the bl_info to the beginning of the script (if you want to download or view the finished script head over to our blog!).

Without the bl_info, we can not install the Add-on and would have to run the script manually every time.

Now we have something that looks more like an add-on and yes of course it's still very basic and simple but we can always add/change and improve this script. I wanted to create something that was pretty easy to create and also (hopefully) inspire you to start making your own awesome add-ons!.

Next week we will be creating an add-on for the Shader Editor and though it's a little more advanced, we will be using the knowledge from these previous videos.

If you have any questions or suggestions on what you would like to see, be sure to let us know in the comments below or head over to our Facebook Group!.

I hope you found this Tutorial helpful and as always, 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.

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

×