Linked Questions

31
votes
2answers
25k views

How to create a custom UI?

I was watching this video on making a custom UI tab using Python, and in the line from bpy.types import Menu, Panel, UIList, I see the names of objects that look ...
2
votes
2answers
2k views

What do the modal operators do?

What do the modal operators do? They are found below the 'Border Select.' Why are there so many of them? If I assigned a HotKey to 'Border Select' as shown in the screenshot, what values should I ...
3
votes
2answers
493 views

Force a Blender operator to always start with default values

I'm writing an operator for which it is crucial that every time it gets called all the properties are set to their default values. The ops.object.delete has 1 param. use_global. It is always false, ...
3
votes
1answer
319 views

How to create a button on the n-panel?

I would like to make a custom button on the N-panel. I already went through blender's templates and amended the ui button script to 2.8 but I don't understand where and how I should implement my code ...
3
votes
2answers
409 views

Re-entrant Operators : Rebuilding a Mesh after reselection

Question : How would one go about making an Add Mesh operator re-entrant ? There are three use cases for this that I can see (1) You want to rebuild the underlying mesh for an object where you have a ...
2
votes
1answer
741 views

How do I initiate a render from Python but still show progress bar and UI updates?

When I run bpy.ops.render.render(write_still=True) from Python on large files, Blender goes into "(Not responding)" mode and the CPU spins like crazy for a few ...
2
votes
2answers
448 views

Poll function for a BoolProperty

I'd like to add a poll function to my BoolProperty, but I don't understand how it works. Is it similar to the poll function of an operator? What represents the "object" argument of this function? ...
0
votes
3answers
145 views

How to assign a material to a mesh object with python?

Creating Materials using python is easy and it has a lot of answers on StackExchange. Now what I want to ask is - If I want that the material should only be added if the object (on which material ...
0
votes
1answer
193 views

How to delete a material from a duplicated object? Sanity Check

I must be misunderstanding something. I really need a sanity check. I'm trying to duplicate the active object, then delete all the material slots from it without affecting the original. ==== EDIT===...
3
votes
1answer
116 views

Change Operator Adjust Menu [duplicate]

I made a small operator which lets you change the ui_type. The question is how can I change this menu, not only the layout but also the spawn position? I want it to behave the same way when you click ...
0
votes
1answer
148 views

Get value of FloatProperty

Probably this is a very newbie question, but I am having issues trying to access the value of a FloatProperty. I have something like: ...
1
vote
0answers
38 views

Execute function before draw menu

I am traying to make a popup menu that will add a modifier if the object has none and then draw the menu, or just draw it if the modifier is already on it. But i am not sure how to go about it, the ...
0
votes
0answers
23 views

Call an Operator programmatically that uses the context [duplicate]

I'm trying to initialize some properties programmatically in an Operator. These properties belong to each node in a selected material, and therefore I need to access the context. I thought I could ...