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
1 answer
60 views

Operator Box Without Needing to Drag

Is there a way to bring up the Operator Box without needing to start a Bevel with my mouse. I'm used to using 3DS MAX. I'm used to typing the bevel amount without needing to drag a piece first,
Joseph Ibinson's user avatar
1 vote
0 answers
14 views

Use Outliner operators without Outliner context

Looking for a way to use Outliner operators without mouse hovering over Outliner window. So far got this code to simply walk select outside of Outliner window: ...
Andrey Vedenkin's user avatar
1 vote
0 answers
13 views

How to run my operator on a timer or continuously?

I have a device connected to the computer over serial. I have managed to read the value from it using an operator executed by a button press, but now, I want my Blender plugin to poll for a value on ...
user2175010's user avatar
1 vote
1 answer
24 views

Update/refresh manually Blender's interface?

I need to manually refresh Blender's window/interface. I'm working in my Addon's preferences, and I have an operator that modifies how things are drawed in a certain panel. I'd like to those changes ...
Ommadawn's user avatar
  • 432
2 votes
1 answer
19 views

Passing collection property as a parameter to an operator without UI

I have some automated tests setup for one of my add-ons. However, one of my operators initializes its own collection property parameter upon invoke() - which doesn'...
S. Magnusson's user avatar
  • 1,413
0 votes
0 answers
17 views

How to control existing Custom Properties that are assigned to armatures via operator?

I'm creating an addon that sets the Blender settings based on what type of render we need. However, I'm unable to change the attributes that control aspects of the rigs. I can't access them. The thing ...
Juan Tadeo Mangione's user avatar
0 votes
0 answers
12 views

What is the propper way to get the active Grease Pencil object from code?

Newbie here trying to understand better how things work. I'm making a GreasePencil addon, and I need to access the active grease pencil object a lot. I accessed it ...
Ommadawn's user avatar
  • 432
0 votes
1 answer
35 views

How can I change PropertyGroup properties (IntProperty, FloatProperty etc) after Operator executed using the PropertyGroup?

How to make changes in the last action menu affect the operation with properties passed in, like if I change them in the ...
Void's user avatar
  • 25
5 votes
2 answers
220 views

How can I get the class name of a panel where a button is pressed?

At the moment this addon makes a custom panel with only one button that prints "Active Panel IDName:", but how can I pass the class panel where this button was pressed? Is there a way to get ...
Forge Gabriel's user avatar
0 votes
0 answers
26 views

Close popover panel when button (operator) is pressed?

Basically what the title says. After pressing a button/operator in a popover panel, I would like to close it. I have no idea how, and I wasn't able to find anything in the manual. I made a litle ...
Ommadawn's user avatar
  • 432
2 votes
1 answer
34 views

How to document two or more different operator's options with Online Manual?

It's not clear to me whether or not it's possible to document 2 different options of the same operator, so by right clicking on the operator's buttons it's possible to go to the documentation. The ...
Noob Cat's user avatar
  • 1,207
0 votes
0 answers
20 views

Assign the trim_lasso_gesture operator to a custom panel

I am currently working on an addon that should provide the user with different build in operators of Blender via a custom user interface. For this I need a panel, where the user can use the operator ...
lcs's user avatar
  • 1
0 votes
0 answers
4 views

Bmesh selected faces list in modal operator is always a step behind

I am trying to get the list of the selected faces of a mesh using a modal operator which runs once a mouse button is pressed. The issue I have is that the faces listed by the operator are always a ...
Luca Saiani's user avatar
0 votes
0 answers
5 views

Execute a function after a native operator called/executed?

Is it possible to, lets say, call a custom function after a certain operator is called? Something like: ...
Ommadawn's user avatar
  • 432
0 votes
0 answers
11 views

Change Operator's icon depending of key pressed

I have an operator that when clicked, makes A, and when clicked while holding CTRL, makes B. In order to make this more intuitive and easier for the user, I'd like to detect on the ...
Ommadawn's user avatar
  • 432
0 votes
0 answers
28 views

Why operators in script could work without being called?

Why the operators of bpy can be called without the script calls it? I have searched for a long time. (a screenshot from Blender Python Tutorial:An Introduction to Scripting [how to learn python for ...
Dangle's user avatar
  • 1
0 votes
1 answer
12 views

push_pull operator not working using bpy scripting

I'm procedurally placing objects (XY dimension only) around a central object, with some randomness to their distance/angle relative to the central object. Occasionally, this results in overlap between ...
oscr104's user avatar
  • 35
0 votes
1 answer
17 views

Modal operator on keypress overriding the default bevahiour even with pass through

I have this code that triggers a modal operator everytime you hit the R key, i am trying to retain the default behaviour of blender while running this operator, meaning if i am in pose mode and want ...
Revln9's user avatar
  • 187
0 votes
0 answers
81 views

Multithreading in Blender Python API

I am trying to make a script that uses a new thread in python to not make blender freeze up. To start a new thread, I use the python threading module. It seems to work because I can create and delete ...
brian turner's user avatar
1 vote
1 answer
38 views

How can I apply a preset to an operator and execute it using Python?

I want to use Python to run an add-on Something like: import bpy bpy.ops.export_mesh.paper_model() But I need to change some settings before I run the add-on. I ...
Paul St George's user avatar
0 votes
0 answers
88 views

Can I change colors of my operator buttons in Blender?

Here in this task I am trying to add some QC Validation in blender, where my objective is once clicking the operator button if it passes QC Validation then the button turns green otherwise it turns ...
madara_was_right's user avatar
0 votes
0 answers
7 views

Hidding/showing properties from UNDO panel depending on certain property value?

I have an operator with some different properties (mostly bools). When a certain property is true, it makes no sense to show the others (they are related to a different "part of the execution&...
Ommadawn's user avatar
  • 432
1 vote
0 answers
9 views

How can I create a right click behaviour within an operator to override the default contextual menu for buttons in my panel?

I've created a panel with a button and have figured out how to use modal checks to check if the user was holding ctrl, shift etc while clicking the button. I'd also like to replace the default ...
Samotivad's user avatar
0 votes
1 answer
26 views

Create Custom Object List accessible to Scene files

I want to make a obj list of some sort, let's say in the scene, I want to mark a object as high poly and for that I am trying to implement a List to contain those objects. The problem I am facing ...
NamanDeep's user avatar
  • 451
0 votes
0 answers
73 views

How to disable "Pick Shortest Path" > "Fill Region" option by default?

Is there a way to disable this option by default when using the "Pick Shortest Path" operator? It's extremely unintuitive that this is enabled by default when it's so rarely useful.
P. Private's user avatar
0 votes
0 answers
11 views

Is it possible to surround/encapsulate a property with an operator on top in? (Stacking elements in UI)

The image represents my idea. Lets say the green is an operator that simply prints "hi". The other colours are properties of an object displayed. For example, the blue is the name. Is it ...
Ommadawn's user avatar
  • 432
0 votes
0 answers
30 views

Is it possible to call a function when hovering an operator/property?

I have a button that changes the visibility of a thing (not explaining it since is not related to the question), and I would like to preview the changes that clicking the operator will make in the ...
Ommadawn's user avatar
  • 432
0 votes
0 answers
29 views

Modal draw operator repeat draw function 8 times on every action

Need advice. Is it intendant behavior? In this simple example every action in blender modal operator prints me 8 time "Hello!" (in complex it calculates coordinates and draw some shape in a ...
APEC's user avatar
  • 454
0 votes
0 answers
25 views

How do I add a modal handler to another area?

I want to add a modal operator (a set of shortcuts) to the asset browser whn a button on the menu on the 3D viewer is clicked. I know that by using ...
simone's user avatar
  • 693
0 votes
0 answers
128 views

Blender 3.4.1 overlay addon

I am learning how to create extensions and I am stuck. In a text overlay I want to update the time every second with a modal operator. The script is running in principle, but no text is displayed on ...
Ambrus Attila's user avatar
2 votes
0 answers
66 views

How to avoid "internal error: modal gizmo-map handler has invalid area" when toggle maximize area while modal operator is in progress?

When modal operator is in progress and I press Ctrl+Space to Toggle Maximize Area in Blender it starts spamming ...
Andrey Sokolov's user avatar
0 votes
1 answer
17 views

Modal operator updating an armature is very slow

I have a modal operator that gets executed only by the 'TIMER' event 30x per second. There is one armature in the scene and nothing else. As soon as I tag the armature for update ...
Frederik Steinmetz's user avatar
2 votes
1 answer
124 views

Start modal operator from different operator

I have a modal operator which I use to move UVs directly in the 3d viewport (modalOP). I also have an operator which sets up a selection and a few parameters (...
CybranM's user avatar
  • 393
2 votes
0 answers
68 views

Create a Workspace Tool with Modal Operator?

I have an add-on that I want to use as a Workspace Tool (similar to the Bevel Tool). How can I set up my operator's modal call to only run the operator once and ...
Dr. Pontchartrain's user avatar
0 votes
0 answers
47 views

Making a Custom Operator Window Continue to be on top, blender python

With the below code I am able to create window. But when I click on viewport the windows doesn’t stay on top and it goes off. I want to stay the window unless I close by clicking on OK button. ...
Viswanathan L's user avatar
1 vote
0 answers
91 views

showing progress to the user within blocking code

The goal is to give feedback to the user when running long blocking tasks in an addon. There is already a question with great answers from 9 years ago that should be mentioned: How to show to the user ...
Christoph Müller's user avatar
0 votes
1 answer
63 views

Stop modal operator when "cancel" button is pressed in file dialog window (fbx importer)

I'm using the fbx importer to import an fbx file and after the import is done I want to process the imported objects. I need to open the importer window from bpy.ops.import_scene.fbx as I want to have ...
Simon Björk's user avatar
0 votes
0 answers
42 views

Blender Modal Operator Gets Slower With Each Execution

I am working on a Blender addon and I'm suffering with a huge problem with performance. I have created a modal operator and while the actual code is very complex here is a sample that is still able to ...
Vipul Rajan's user avatar
0 votes
0 answers
55 views

Drawing an Arc with the GPU Module

I am new to drawing with the GPU in Blender. How would I draw an arc with the GPU module? I suspect from the examples that I'd user gpu.types.GPUBatch, however I didn't see Arcs in the type options: <...
Dr. Pontchartrain's user avatar
0 votes
0 answers
27 views

Is it possible for an operator to generate an indeterminate number of properties upon execution?

I want to make a function that will allow the user to select a value from an Enum for each material on the object. This value will then be used later. But I am unsure how (or if it is possible) to ...
GammaMetroid's user avatar
0 votes
1 answer
59 views

How to get mouse width/height if bl_options = {'GRAB_CURSOR', 'BLOCKING'}

I'm trying to get visual position of cursor in modal VIEW_3D area if bl_options = {'GRAB_CURSOR', 'BLOCKING'}. Value continue to go further after reaching the area ...
APEC's user avatar
  • 454
0 votes
0 answers
22 views

Show alternative pop-up window when topbar menu operator is clicked the first time

I have created an operator in the Render top bar menu as displayed in the image below: After clicking, I am able to show a pop up window, here is the code: ...
DarioB's user avatar
  • 101
0 votes
0 answers
103 views

context.window_manager.modal_handler_add(self) not working on other windows

This is the shortest example I could think of to demonstrate my issue. Based on multiple searches this is not a new, nor unique issue. But I have yet to find a proper explanation and solution for it. ...
peterpop's user avatar
1 vote
1 answer
45 views

Setting a shortcut to split the current screen in half using screen.area_split

I'm trying to set a key bind to activate the screen.area_split so that I don't have to use the mouse, and instead splits the screen 50/50 down the middle. Does ...
SammoMcAwesome's user avatar
1 vote
0 answers
109 views

Getting the global coordinates of a vertex from mouse location

I have a some code here that I combined from other people to test out implementations on how to get the correct global coordinates of the vertex that your mouse is hoovering over. There are 2 ...
PoseCrator's user avatar
4 votes
1 answer
120 views

how can i make an operator delete itself when executed?

i have this script here. im trying to make the operator button remove itself from the n-panel once its clicked ...
desperrrr's user avatar
  • 548
1 vote
1 answer
293 views

RuntimeError: Operator bpy.ops.object.mode_set.poll() failed, context is incorrect [duplicate]

I want my object to switch between Edit mode and Object mode every one second, So I wrote this code: ...
AlecDev's user avatar
  • 97
0 votes
0 answers
26 views

INFO Box dissappears for running modal operator that uses pass though

I'm trying to make a blender addon that will work as a timer so I can easier keep track of how much time I'm spending on a project. I've tried various approaches the best one I've found this far is to ...
Ioanna Marinou's user avatar
0 votes
0 answers
24 views

Need help with Modal: move mouse - increase step value

Simple operator with select more/less. I need to increase/decrease step value by moving mouse. ...
APEC's user avatar
  • 454
1 vote
1 answer
161 views

How to make slider that changes operator properties

I have a custom operator called collection.vary_collection that has an IntProperty called ...
mqbaka mqbaka's user avatar

1
2 3 4 5
10