Questions tagged [operator]

An operator is a processing unit that is invoked/executed on scene data by the window manager.

Filter by
Sorted by
Tagged with
1
vote
0answers
15 views

msgbus.subscribe_rna() to an operator?

I'm trying to find a way to get notified by the operator bpy.ops.object.transform_apply() so every time my users are applying an object scale I can re-calculate it's square_area property. But I have a ...
0
votes
1answer
65 views

Import multiple STL files and modify the incoming objects in one go?

I want to import stl files using file browser (by using 'INVOKE_DEFAULT' on import stl operator). It seems that join() operator ...
1
vote
0answers
21 views

Why does my Curve turn black? (only happens without bpy.ops)

I'm creating a curve without bpy.ops but the previously created curve turns black for some reason. Toggling in and out of Edit Mode fixes the issue but that seems kinda silly. EDIT: I reported this ...
1
vote
0answers
43 views

How to remove a certain operator? [duplicate]

In short my question is how can I remove/delete an panel/class/operator which: a. I don't know the full name b. and I don't know where it is stored in Blender system. In other words, how I can undo a ...
3
votes
1answer
47 views

How to get the file path from the open file operator?

I have the following code to create a file browser: ...
1
vote
1answer
58 views

How to force a redraw of a panel in the 3D_View

I have a panel in 3D_View that shows the current file and allows the selection of a new file. When the file is selected, the panel needs to redraw. How do I force a redraw? In Operator.py file ...
2
votes
0answers
55 views

bl_options = {'REGISTER', 'UNDO'} not working… Blender 2.9 | trying to link props to my Operator in separate files

I have an add-on split into multiple files. Here is my file structure: ...
1
vote
1answer
38 views

Toggle an operator

How do you toggle an operator? A prop works row.prop(bpy.context.object, 'lock_rotation', text = "", icon = "UNLOCKED", toggle = True) but ...
1
vote
1answer
25 views

How to create list bullets in an operator's class description? (see example)

I noticed this description for the measure tool. How do you create list bullets in an operator's class description?
0
votes
0answers
29 views

Blender crashes hard when I undo modal operations

I have an operator that when I execute it performs many tasks: It creates primative objects and curves, translates them, sets taper object and materials etc. etc. Some of the tasks are in seperate ...
1
vote
0answers
22 views

Stop modal operator externaly

I have a modal operator that runs in the 3d viewport. Its basically the raytracer from the template. It can be canceled with escape. But I have several other operators which can be executed from ...
1
vote
1answer
20 views

Remove pop-up window when running an operator

Is there anyway to remove this pop-up window when running an operator?
2
votes
1answer
35 views

How to focus a property field in an Operator dialog by default (v2.91)

This existing question has some answers that attempt to make a property field focused when it appears, but none of them seem to work in 2.91. If you run the code below, you will see that the field is ...
0
votes
2answers
88 views

Blender 2.8+, How to execute an operator in another window?

Some operators are global. Some are not. Transform for example is bound to the window where it gets executed in. As an example let's say i want to perform the ...
2
votes
1answer
23 views

Operator addons with multiple texture inputs in Python

I'm fairly new to Python in Blender and working on an add-on to allow users to input their textures without accessing the node editor. I take reference from some of the codings within this website and ...
1
vote
0answers
55 views

Delete Children Automatically

Is there a way to automatically delete children when the parent is deleted? By automatically I mean that you don't do any selection (or other action) of the children prior to selecting and deleting ...
0
votes
0answers
34 views

Modal operator from different context [duplicate]

I've asked a very similar question yesterday, but I have a more concrete example here. I'm using the template "Operator Modal View3d Raycast" with some modifications: ...
0
votes
1answer
68 views

Start modal operator from a click in panel

I want to start a modal operator by clicking a button in a panel in the properties region. It should then stop when I click somewhere in the 3D viewport. I want to execute some code when I start and ...
1
vote
1answer
37 views

Change the “OK” button name in dialog-boxes?

My question is really simple, by default the button of blender dialog boxes is the "OK" string what if I want to display something else? like "Execute" or "Play"? ...
1
vote
0answers
21 views

Button operator to open a specific file

I want a button to open a specific file, so I tried open_mainfile as an operator, but I cannot seem to pass the file as an argument for the operator using the ...
0
votes
1answer
20 views

Is it possible to determine the UI panel class that is parent/host to an operator when its button is clicked?

I'm dynamically registering a variable number of panel classes, all sub-classed from a custom panel class that includes an operator. Thus all the new panel sub-classes contain a button that executes ...
3
votes
1answer
57 views

How to pass an bpy.data.objects bpt.data.materials etc to an operator, from layout?

I would like to understand how to pass an object of type bpy.data to an operator, but I don't understand how to do it. I can pass a string, which will then retrieve what I am looking for, in this ...
1
vote
1answer
24 views

How to call rigify operators?

I'd like to run some rigify operators. As you might know, the operators are "unique" for each armature because of their rig_id. If I have the ...
1
vote
2answers
102 views

bpy - how to select an image running blender in -background mode so an operator can use it?

I need to invert an image running blender from the command line using the -background flag. To archive it I need to make the image active and later apply the ...
0
votes
0answers
30 views

Reload a scene from a frame change handler

I am generating a synthetic dataset in Blender and in order to avoid excessive memory usage I want to reload my scene every now and then to clear all memory allocated to the meshes that I spawn and ...
3
votes
1answer
172 views

Operator Search: 'Free Data' not available in Blender 2.9 anymore?

I have a problem with caching my data when I try to run 'replay mode' for a fluid simulation in 2.9. In the 2.8x versions, you can 'free the data', when you search for ...
0
votes
0answers
22 views

Execute operator after/while transforming

Is there a way to automatically executing an operator while I am transforming an object. For example could I color the top faces of an object while I am rotating it? Or rotate some object2 twice the ...
1
vote
0answers
19 views

General Python UI help [duplicate]

Ok, I've looked all over the place and I'm really stuck. I would like to have a panel with some input variables (like height and radius), which can be typed in. Then I would like a button that, when ...
0
votes
0answers
20 views

Can't invoke pop-up of operation? [duplicate]

I want to make an interface so that I can control my python methods I have already made. So I am trying to make a pop-up of an operation I made (see code below). But I get an error in the last line ...
2
votes
1answer
78 views

How to control spacing/alignment of Label + Horizontal Enum Property?

I would like to achieve the layout of this panel but I'm having some issues. The example is from blender's Bevel Operator. As far as I can tell it's just an Enum Property without the enum_flag since ...
1
vote
1answer
57 views

Dynamic props dialog into operator

good day. I want to change the props into operators dialog. something like this: if I select the option A....then show for example some buttons but if I select option B then show for example some ...
0
votes
0answers
14 views

How to run a compositor operation one after the other?

I'm currently trying to do a new Compositor node in C++ in blender and I need to wait for an operation to finish before the second one begins. Is it possible to do so? Thanks.
0
votes
0answers
32 views

How to move or modify the position of the redo panel?

The panel is always minimized, I have to enlarge it and move my head to bottom left each time: Does anyone know of any modifications or plugins that will allow me to move this window? Or even dock it ...
0
votes
0answers
31 views

how to create a new operator for the VSE?

I want to create an addon that will allow me to copy and paste video and image clips from one blender window(VSE) to another separately opened blender window(another VSE window). But I've been ...
0
votes
0answers
25 views

Call operator with adjust menu

I need to call an operator from bpy. ops in its operator so that the settings menu would also be called. Here is my operator. ...
0
votes
0answers
35 views

How to shade smooth using BPY

New to bpy and I'd like to write some code that sets the shading of an object to smooth by just clicking a button. I did some research and I have written the ...
0
votes
0answers
32 views

Blender output to 'INFO' panel

I have two operators which is subclass of Operator first draw dialog window and has button which call the second operator with ...
0
votes
1answer
78 views

blender python api custom GUI

Blender version 2.83 I need create dialog window with User. Now i'm using context.wm.invoke_popup but problem that This dialog window close when cursor to far from ...
0
votes
0answers
22 views

Simulation in Blender Python - respond to keypress without timer

I'm trying to create a simulation using blender python. Here's a sample template that creates a cube and bounces it back and forth on X axis: ...
0
votes
1answer
141 views

Create keyboard shortcut for an operator using python?

How can I create a keyboard shortcut for a specific operator with using the python API?
0
votes
1answer
125 views

What is a python command to create a node group or shader node tree from the nodes in the currently active material?

Essentially what I am trying to do is create a script that can make nodes into groups or shader node trees (unsure exactly what the difference is) based on which nodes are told to be selected at the ...
0
votes
1answer
81 views

How to execute my operator (wikibooks.org 2020)?

I am trying to learn python for blender, following this and many other things online. https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Python_Scripting/Addon_Anatomy I open the ...
0
votes
0answers
15 views

Keep Operator (bpy_struct) open while clicking on WindowManager file icon

In my blender UI development, i have a WindowsManager displayed in a bpy.types.Operator ...
0
votes
1answer
95 views

Python UI show value in panel after generation random property

Help me please to translate generated random values in integer panel property. I understand that the execute function create a new object every time, but for this simple example will be fine if the ...
1
vote
1answer
64 views

How to Keymap a Custom Operator with Properties

I have a custom python file where I setup my keymaps like this: ...
0
votes
0answers
40 views

can't open files .BLEND

i have problem can you help me? i have some .blend files from a few days ago; i Have Blender for Windows 10. My problem is that i wanna open the .blend files but when i double click to open the file, ...
1
vote
1answer
46 views

Python api - Rotate selected around vertex using bpy operator

I want to rotate a selected item around a specific vertex like this: vertex.select=true bpy.ops.transform.rotate(value=1) This code basically rotates at the ...
0
votes
0answers
14 views

Object Reference in Addon Panel [duplicate]

i'm developing a Facial Rig Panel, And I need to get the reference to an object(in this case the Armature) in a custom panel, similar to this picture.Or Maybe tip the Name of the Armature in a Text ...
8
votes
0answers
132 views

How can I get a list of currently running modal operators?

Here I found a working solution using ctypes which allows to find out if any modal operator is currently running. I am not good in C and don't understand how it works. But I'm sure someone does, so is ...

1
2 3 4 5
7