Blender Python Tutorial : Custom Drawing / Layout Improvements [learn python for beginners]

preview_player
Показать описание
In this Blender Python Tutorial, we will be looking at improving the layouts of our Operators/Panels.

Looking to learn Python for beginners? You are in the right place. Be sure to check out the Scripting Playlist!.

If you want to download the Finished result, you can find the Download link in our blog!.

By default, operator properties use an automatic user interface layout.

If you need more control you can create your own layout Function. It works like the Menu and Panel Draw Function.

There are many ways in which we can alter or change the layout of our operator and I just wanted to share some basic improvements to make our Operators and Panels look much better.

I hope you found this Blender Python Tutorial helpful and as always thanks for watching!.

Links -

Рекомендации по теме
Комментарии
Автор

Love this. I've learned this devoloping for Bforartists, a fork of blender focused on UI tuning. But it was all brute force learning. It's nice to actually understand a bit more. I'd love more tutorials like this. I'll check out you others! Thanks again for sharing.

trinumedia
Автор

Awesome explanation. This should be official blender documentation.

SRG-Learn-CGI
Автор

For a minor performance improvement and to shorten your source code slightly, you could replace your elif statement with else. A checkbox only has two states so if you test for one condition and it fails then the other is a given. Even if there are multiple tests and you only want to do something special when one is met (ie. you want to do something only if a value is 0 and nothing else) you can test for that one condition and then put an else for all the others. Else improves performance because it doesn't need to do a test (ie. checking if the checkbox is false). It is just what happens if all tests in that if statement fail. It shortens your code as that is all you need on the line "else:" and don't need to set up a conditional statement (ie. a == b).

JeffreyBlakeney
Автор

As usual, very complete and clear Tutorial! Tks for sharing all these very precious lessons;)

yannterrer
Автор

came here becoz of --- Grant Abbitt--- video Blender Channels You May Not Have Heard Of - Great Content You're Missing Out and subscribed.. 👍 great tutorials

ajkadakkal
Автор

you videos are really helpful!! thank you, will be nice if could explain also how we can add custom icon´s and how to create for example a custom library to display thumbnail images loaded from a path, etc

Artofdrendering
Автор

This is the closest I've come to what I have in mind. Only thing I would add here is a way to change the font of the text. Thanks a lot!

PS: just noticed that the follow up vid to this you included fonts, great stuff

deltaqed
Автор

Really nice tutorial mate! Subscribed!

CGLife
Автор

Also just to say, the fork also tries hide properties when not turned on.

trinumedia
Автор

Brilliant little tutorial! I was wondering, how could I use a ratio menu, or something that allows me to select between different options? Unlike check boxes, that allow you select multiple things.

alexandrepv
Автор

how to make the background transparent on a layout?

pavelsamoilenko
Автор

How can I add custom icons to blender's library so that I can use it later for my addons...or can how can I add customs in my panel /pie menu directly....without .DAT file

arko
Автор

Great improvement but you didn't implement snap to object feature

josephstark
Автор

i wish for more unreal engine tutorials

issamaf