Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
0 votes
0 answers
6 views

How to Align Icon to the Right in Blender Panel Header using python?

I’m trying to customize a panel using python in Blender 4.1, and I want to align an icon to the right side of the panel header. (like this) I’ve tried a few approaches, but I can’t seem to get it ...
VxQtW-1's user avatar
-1 votes
0 answers
27 views

Command runs successfully, but not the expected outcome

I have a script that's intended to add a material to the bottom face of a room's 3D mesh. I was able to create a floor object and set its material correctly, but I also have to apply cube UV ...
Hilla Shahrabani's user avatar
0 votes
1 answer
14 views

Transform modal Map modified trough addon keymap?

I'm making an addon that has some remapping of the key configurations. How would you guys edit the transform modal map trough code? I want Y axis to be overriden by Space and ⇧ Shift + Space These are ...
GabrielJST's user avatar
0 votes
0 answers
25 views

How can I prevent operator from blocking Blender Interactions during execution?

I'm new to Blender Python programming, and for a personal project, I'm experimenting with creating a Blender Python addon. I aim to execute an asynchronous GET request when I select a button in a ...
kernage's user avatar
0 votes
0 answers
6 views

Alternative to create non-object elements like gizoms

I want to create a dimension like in autocad. So there is the dimension object which is visible and two small points which only appear when I want to edit my dimension. How to create your little ...
André Ruf's user avatar
3 votes
1 answer
78 views

How can I pass an object (like a bmesh) to an operator or should I not do that?

I have an operator that creates a certain mesh but I want to keep things modular so I separated each operation into its own operator. Like for example, I have an operator that removes vertices that ...
Megan Love's user avatar
2 votes
2 answers
28 views

Some operators don't appear in operator search F3 despite being Registered and Developer Extras enabled

I found this thread and I already have Developer Extras enabled but I noticed that sometimes some operators don't show up in the F3 menu search despite ...
Megan Love's user avatar
0 votes
0 answers
10 views

Respect the current "quad" when using transform.translate

I have a modal operator that calls bpy.ops.transform.translate('INVOKE_DEFAULT') as part of its code. Having written code that adjusts the position of the mouse cursor (before transform.translate is ...
Candle's user avatar
  • 302
0 votes
0 answers
35 views

Add icons (properties/operators) to Blender's Outline?

I'm trying and wondering if its possible to add new icons (to trigger properies or operators) in the Blender's Outline showing all the objects in the scene. I mean adding new properties/operators in ...
Ommadawn's user avatar
  • 658
0 votes
1 answer
91 views

How to force UNDO panel to be maximized in custom operator

I made an operator, which have an UNDO panel with my custom properties. If UNDO panel was collapsed – it remembers this state and next time will appear also collapsed: __ It's not ok in my case. I ...
Yaroslav's user avatar
  • 406
0 votes
1 answer
20 views

How to hide some properties in UNDO window *depending on the execute() result

I'm making an operator which has multiple properties in the UNDO window: Depending on the result which happened inside the execute() function some of these ...
Yaroslav's user avatar
  • 406
1 vote
0 answers
22 views

Python Centering Mouse X Y Coordinates To Operator

I am trying to get familiar with the modal operators in blender and want to create some kind of custom trackball rotation. When I set the rotation euler values to the mouse_x and mouse_y event values, ...
Coloremblem's user avatar
2 votes
1 answer
84 views

How to make popup auto adjust width?

I want my popups to be wider to fit the label but it seems it is limited to this width as shown with a label with ellipsis. How do I make it wider? I tried ...
Megan Love's user avatar
3 votes
2 answers
136 views

How to add click event listener to button operator?

How do you add a listener to a button? I need to handle something in the panel once a button is clicked but I don't know how to add this click event listener. import bpy ...
Megan Love's user avatar
1 vote
1 answer
37 views

Listen to insert_keyframe event using python

I can't figure out how to listen to a keyframe insert event in an armature and retrieve the newly inserted keyframe(s) using a callback. Msgbus, Depsgraph, Modal ? Any help would be much appreciated. ...
Revln9's user avatar
  • 227
1 vote
1 answer
31 views

BPY Modal Operators - Instead of changing the values, it creates the mesh from scratch each time

I made a script to create cable-like curves between two different 3D points. The logic behind the script is that it's using mathematical functions to find the exact coordinates of the vertices in 3D ...
Baha Yalnız's user avatar
1 vote
1 answer
23 views

Operator in import category working but showing as invalid syntax when accessing bpy.ops.import

I have several operators that import different file types like this example: ...
Harry McKenzie's user avatar
1 vote
1 answer
150 views

Is there a technique to *automatically* thicken up all thin parts to a certain minimum?

I regularly print models which have features that are just a bit too thin. I thicken those up manually with the sculpting tools in Blender. This works fine, but is quite time intensive. I have to ...
AnoE's user avatar
  • 113
0 votes
0 answers
29 views

row.operator() pass an argument to the called function [duplicate]

I had this working for Blender 2.x long ago but I'm unable to get that old script to work in 3.x and 4.x. All I want to do is create a panel with buttons. The buttons, when clicked, do execute the ...
NoRev's user avatar
  • 1
1 vote
0 answers
14 views

Is it possible to detect when a Operator preset is loaded prior to execute()?

Hello folks I have an operator that has the 'PRESET' bl_option for being able to save the properties as a preset. I'm using a ...
Ommadawn's user avatar
  • 658
2 votes
0 answers
55 views

How can I execute an operator only when it is confirmed by the user via popup?

I found this nice popup script by @CodeManX that works like a charm. I am trying to get an operator to only execute when the OK button from a popup is pressed. I have this simple setup, but I cannot ...
Harry McKenzie's user avatar
0 votes
1 answer
36 views

Is possible to execute an operator (OT) from code and SHOW its UNDO panel?

Hello folks I'm trying to execute an operator from code (like calling bpy.ops.my_operator()) and I'd like to show its UNDO-REDO panel. (The OT's panel is showing as ...
Ommadawn's user avatar
  • 658
0 votes
0 answers
43 views

Showing (and modifying) a Color Ramp in addon's menu?

I've seen this post from 9 years ago and I'm asking it again because is possible that things have changed (I hope) when it comes to work with color ramps. I'd like to display and modify a color ramp ...
Ommadawn's user avatar
  • 658
1 vote
1 answer
32 views

How do I use bpy.ops.constraint.childof_set_inverse() in blender 4.0?

I am trying to set the inverse on my child of constraints using python. However, with the correct bone active and while in pose mode, when running: ...
Lipizzaner's user avatar
0 votes
0 answers
20 views

The option in the panel shows the length of the Grease Pencil line when drawing

This code shows the parameter change on Panel, BUT it is done after releasing the mouse button. If I replace return {'PASS_THROUGH'} with return {'RUNNING_MODAL'}, the parameter is updated correctly, ...
mod3d's user avatar
  • 41
1 vote
0 answers
44 views

Operator for 2D button gizmo is not called

I have a simple GIZMO_GT_button_2d that should invoke an operator when clicked upon but this is not happening. I can call the operator directly with ...
alexmro's user avatar
  • 51
1 vote
0 answers
23 views

Reading an operator preset, the right way?

What I'm trying to do: import a bunch of fbx files with consistent (non-default) importer settings, that looks like this: user invokes the importer to bring up its UI; user sets desired values in the ...
Mechanic's user avatar
  • 962
0 votes
0 answers
63 views

Using File Browser to Import CSV Data

I'm struggling to import CSV data into my file using the file dialog. The code I've parsed together opens the file dialog and prints the file name. The problem is that inside of the ...
benadryl7664's user avatar
2 votes
1 answer
67 views

How can I add another sub category to File > Export with another list of options?

I can add an item My Item using the script at the bottom. Currently I only know how to add the item to the same flat list in the Export category like in the script at the bottom, but I would like to ...
Harry McKenzie's user avatar
2 votes
1 answer
87 views

Using python "getattr" to find out what button is right clicked (e.g. "X Rotation") returns an array when I need a single property

As per Blender's documentation about extending the right click context menu, I can find what UI button was right clicked with a custom operator I added to the menu: However, "button_prop" ...
JakeONeal's user avatar
  • 625
1 vote
0 answers
30 views

Do not show X (clear button) in prop_search?

I'm making an operator that uses the UNDO panel. In that panel, I'm showing a prop_search to select a vertex group: The problem: I've found that X button that ...
Ommadawn's user avatar
  • 658
0 votes
0 answers
26 views

How can I create a list of unique class instances for an object?

I am working on a project that requires each object to have a list of custom class instances, so that I can get and set things from the list as needed. I tried to do something like this (the code is ...
Golden Dragon's user avatar
1 vote
0 answers
49 views

How to execute a code after an operator has been executed?

My problem: I need to execute a code after an operator has finished. The operator is a non modal operator with the UNDO option to show the operator menu with its ...
Ommadawn's user avatar
  • 658
0 votes
0 answers
30 views

How to adjust tool via mouse after first use?

Say for Blender 3.x+ versions, while using edit mode tools such as scale, bevel, extrude, etc, a side operator menu shows that allows customization and extra control over the tool's behaviour. Now ...
SKB_BGPL's user avatar
0 votes
0 answers
39 views

Reverse GreasePencil frames via python?

I'm trying to make a operator/script that reverses the selected Here is the script with the basic code: ...
Ommadawn's user avatar
  • 658
0 votes
0 answers
32 views

How to efficiently duplicate geometry and data without bpy.ops?

Operators from bpy.ops are reputedly very slow and to be avoided where possible, so how would I go about duplicating geometry and data like uv maps and vertex groups without using bpy.ops? The ...
gcs_dev's user avatar
  • 610
1 vote
0 answers
26 views

How to hide properties in the "Adjust last operation" of custom operators?

I'm trying to create a custom operator to help me building armatures. It should change behavior depending on a custom property defined in the operator class. In addition, the "Adjust last ...
Antonio's user avatar
  • 357
0 votes
0 answers
18 views

Drawing folding/collapsible sections in an Operator's Undo panel?

I'm making an operator that is getting big in terms of properties and options. I thought about separating those properties into different kind of tabs that depending the selection, X or Y properties ...
Ommadawn's user avatar
  • 658
1 vote
0 answers
35 views

Prevent that changing an Operator's property retriggers the operator?

I'm making an operator that has the bl_options = {'REGISTER','UNDO'} in order to call the undo menu. Since my menu's draw() is ...
Ommadawn's user avatar
  • 658
1 vote
0 answers
27 views

Can't call a method inside a setter? (Operator)

I would like to understand what is happening here. I'm simply trying to call a method inside the setter of a property in an Operator (in order to not repeat code). But I'm getting: ...
Ommadawn's user avatar
  • 658
3 votes
1 answer
94 views

Python API - access operator's class for builtin operators

Is it possible to access operator's class for builtin operators? For addons, I can either import them from addon's module ...
FamousSnake's user avatar
1 vote
1 answer
82 views

Python API - run commands before / after .execute of the operator with file selection

I can start an operator with file selection by adding "INVOK_DEFAULT" to it's call, e.g. ...
FamousSnake's user avatar
1 vote
0 answers
31 views

Created Bezier Curve doesn't link to scene

I would like to start by expressing my gratitude to this community for providing solutions to programming problems related to BPY. I usually find answers here without submitting my question, but this ...
kakts's user avatar
  • 11
5 votes
1 answer
127 views

Align & Scale Light (Portal) to Face

I am an ArchViz artist and during my work I often have to do this tedious task manually: Setting up light portals to align exactly with the window pane mesh. First I have to snap it to the window pane,...
oeri's user avatar
  • 65
1 vote
0 answers
32 views

Iterate over all panels in screen?

I have a timer that is running in the background. I'm trying to identify the running operator by its panel, so when that operator's panel goes away, I execute some code. I thought about iterating all ...
Ommadawn's user avatar
  • 658
2 votes
1 answer
71 views

How to smooth such a boundary?

When I use a Boolean modifier to deviate from a plane, I get this section of the object. I want to make this interface smoother, but the bevel operation doesn't work and it creates a lot of extra ...
fage's user avatar
  • 109
0 votes
0 answers
36 views

Drawing Gizmo in 3D Viewport while operator's panel is showing?

I'm working in an operator that has as properties a point (Vector) in the 3D space and a radius (float). I'd like to show in the viewport some kind of circle/sphere with that position and its radius, ...
Ommadawn's user avatar
  • 658
0 votes
1 answer
48 views

Blender Addon for rendering animation with multiple settings without freezes Blender UI

I am trying to write an addon that will give me an ability to set settings for multiple render sequences. I used to use ...
Michael Lebedev's user avatar
1 vote
0 answers
54 views

Unable to change the object selection in my operator from Adjust Last Operation

I am building an add-on and here is a skeleton of the same with the relevant parts (it is fully functional, you can just copy-paste the code given below and test it yourself). I am running into issues ...
Jeet GT's user avatar
  • 65
0 votes
0 answers
27 views

Curve mapping in a Operator property panel?

I'd like to add a curve mapping in my operator's undo panel, along with its properties. As far as I know, is not possible and is pretty hacky; we have to basically add a Curve node in shader tree, and ...
Ommadawn's user avatar
  • 658

1
2 3 4 5
11