Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 274

Python is an interactive, object-oriented programming language. In Blender, it is used as a general-purpose scripting language and to create add-ons to extend Blender's functionality.

3 votes
1 answer
237 views

MSGBUS drops subscriptions on new or reload blend file

Any ideas why the subscription via msgbus to property changes (node/attr) are dropped while starting a new blend or reloading a blend file? I use msgbus to subscribe to changes to a node name (in the …
DolphinDream's user avatar
1 vote
0 answers
182 views

Execute custom code once automatically in an add-on

I want to create a very simple add-on that will automatically call some code (e.g. see example below) that will create a custom group node to be available in the compositor. What should the simple add …
DolphinDream's user avatar
3 votes
0 answers
97 views

Can you make a node socket entirely transparent?

I know you can set a node socket's fill color to anything color, but can you also set the stroke color to any color too so that the socket is completely invisible? The need for this feature is really …
DolphinDream's user avatar
5 votes
2 answers
2k views

How to add custom icon to EnumProperty in add-on

I have a custom add-on and I would like to create a dropdown list based on an EnumProperty, but I want the items in the list to take custom icons rather than the icons available within blender. I know …
DolphinDream's user avatar
7 votes
1 answer
3k views

How to deactivate a UI element in an add-on?

In an add-on I would like to have a property adjustable via its UI element, but when I have a second elements enabled I want my first element to be disabled : only show the information without being e …
DolphinDream's user avatar
3 votes

How can I get the dimensions of a newly-created material node via Python?

There seems to be a solution to this (see below). Keep in mind, though, that while in general this approach is not recommended, in some cases it may work just fine. Add this call to your script to fo …
DolphinDream's user avatar
10 votes

Efficient way to get selected vertices via python (without iterating over the entire mesh)

In newer versions of Blender you can use (while in Edit Mode): bpy.context.active_object.data.total_vert_sel bpy.context.active_object.data.total_edge_sel bpy.context.active_object.data.total_face_sel …
DolphinDream's user avatar
0 votes
1 answer
725 views

How do I make an export addon pre-populate filename with name of the selected object?

I’m creating an export/import add-on (similar to STL import/export add-on) and I would like the suggested filename in the file browser to take the name of the currently selected object in the scene or …
DolphinDream's user avatar
1 vote
0 answers
8 views

How to Respond to File Selections in a Blender Add-on Using the File Browser?

I'm developing a Blender add-on that uses the built-in file browser. I want to update the property panel with information related to the selected files. For example, when a file is selected, I want to …
DolphinDream's user avatar
5 votes
3 answers
1k views

How to add a shortcut for 'Reload Scripts'?

Blender 2.7x used to have F8 to reload scripts. As an add-on developer I rely on reloading the scripts a lot and having to press F3 and search for "Reload Scripts” every time I update the add-on I dev …
DolphinDream's user avatar
4 votes
3 answers
1k views

Temporarily disable add-on UI property update callback

I want to synchronize two properties (e.g. sizeX and SizeY) when a “lock size” property is enabled. I have the properties SizeX and SizeY update callbacks linked to separate methods: update_sizex and …
DolphinDream's user avatar