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

Calling a function in operator to create a button

Hi this is probably very simple but it is proving difficult to archive I am basically atempting to make a button in the UI tools panel that can run any function I create Example ...
2
votes
1answer
24 views

Button with Multiple Operations/Functionality

I would like to code multiple functions (operations?) to a single button that is on a Display panel within the 3D viewport, and which will have toggle functionality. This is what I have so far. I'd ...
1
vote
1answer
59 views

Call operator with tweak popup window

I'm making a panel with buttons to do different actions for modeling. One one of my button I want to merge vertex by distance when I click on it, but merge to center when I CTRL + Click. I got this ...
0
votes
1answer
68 views

How to make the panel detect that the operator has been executed correctly?

NOTE : There are already two posts concerning this problem but I can't find an answer in them. I enclose the link that leads to it: Answers Hy everyone, I have in my script, a panel and an operator. ...
0
votes
1answer
52 views

How to simulate keyboard ESC command using Python builtin modules?

For my addon I need a function that simulates just a single ESC button event from the keyboard, using Python. I've tried many things and this seems to be the only way left to abort ...
1
vote
0answers
24 views

Operators panel missing [duplicate]

I wanted to make my very first blender donut yesterday. I have ver 2 82.7 When I add the torus it pulls up a floating menu where i can amend size and segments. When I click anywhere else this Add ...
0
votes
0answers
32 views

Accessing Transform Operator History inclusive constraint_axis in Python script

Please have a look at this: I am writing a script wich changes selected verts. Lets say the user is in Box-select-mode (...or whatever tool), selects something, does some constrained transformation (...
0
votes
0answers
30 views

Low level version of bpy.ops.scene.render_view_add()

Is there a low-level version of bpy.ops.scene.render_view_add() and bpy.ops.scene.render_view_remove() operators ? My goal is ...
4
votes
0answers
119 views

Is there a low level alternative for bpy.ops.mesh.separate()?

I am dealing with a great model, I have a problem, I want to divide it by parts, but bpy.ops.mesh.separate(type = 'LOOSE') seems to have a big problem, that is not ...
1
vote
1answer
14 views

Is it possible to avoid finding my operator via the search menu?

I was wondering if it was possible to avoid making bpy.ops.myscript.doesomething()available in the search menu of blender? I think it is not possible, but I would ...
2
votes
0answers
13 views

How to bundle undo steps in Modal operator

Background info: I am creating an addon with an 'Editor' mode. The mode is initiated by an Operator, and while the Modal is running, the user can add/remove/edit objects in the scene. The modal ends ...
0
votes
0answers
21 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 ...
1
vote
0answers
20 views

Different operations if operator is pressed with “Ctrl”, “Alt” or “Shift” within the UI? [duplicate]

I saw multiple add-ons that are using alternative operator action when pressing Shift, Alt or Ctrl within the operator interface (I think it's only one of the 3). I created an operator and draw it in ...
1
vote
1answer
34 views

How to read and print data from a dictionary using a modal operator?

The following code creates a dictionary and prints it at regular intervals: ...
0
votes
1answer
22 views

Pass data to EnumPropery items callback

I'm struggling to pass a variable to an EnumProperty items callback, resulting in making this variable a global, which I prefer to avoid. I want to be able to access the "plant" from the "...
1
vote
1answer
38 views

Using Grease Pencil (Annotation) from Modal in Blender 2.8

In my addon, I need to do a bunch of stuff while running modal. One of those things is drawing with a grease pencil, and then processing the curve. By grease pencil, I mean just the simple ...
0
votes
0answers
19 views

How to run Outliner operations for 3D view selection?

How can I run an outliner operation based on the user's 3D View objects selection? Technically: how does the ...
1
vote
2answers
90 views

How to close render 'View Render' after the render by bpy.ops.render.render()?

I would simply like to understand how to close the render window after it is finished and ready. The save path is already set, so it does not require manual save. Right now I use this system to ...
0
votes
0answers
14 views

Operator's 'BLOCKING' option not working

I have a tool which opens selected geometry in Substance Painter and then builds the materials in Blender after the user has applied them in Painter. It includes a separate operator which provides a ...
1
vote
1answer
31 views

Modal Operator Not Updating Driver(s)?

I've been creating an add-on for Blender but discovered a problem. For my add-on, I need to be able to get drivers to update in realtime while a Modal Operator is running. Since the add-on code is ...
0
votes
1answer
37 views

How to assign PointerProperty in Operator through UI?

I have multiple instances of class LayerSettings(bpy.types.PropertyGroup), which is simply a group of variables. These are stored at the scene level (they're a ...
1
vote
0answers
24 views

How can I run Bmesh ops interactively inside an operator with a popup?

I would like to add some bmesh operators to one of my operator class. The operator has pop up menu invoked by return wm.invoke_props_dialog( self) so the values are ...
1
vote
1answer
72 views

give a variable to an operator

For a workflow tool I made a panel in which it displays each separate library that is linked in my file. For each library I want to add some buttons that does stuff to the library in question. So in ...
1
vote
2answers
60 views

Why do i get this Merge Operator: Enum not found error?

I am recently learning to extend blender and trying to create a custom utilities panel. I'm trying to add a "merge vertices" button on a panel but I keep getting errors saying; ...
2
votes
1answer
73 views

Custom tool, modal gizmo, and non-modal operator (2.8)

I’m prototyping an addon that will have several custom Tools and, when those tools are selected, a bunch of custom Gizmos in 3D views for manipulating various aspects of objects created by the addon. ...
1
vote
0answers
21 views

Bake script works individually, but crashes in loop

I am trying to write a script to bake all of my physics in the correct order. The commands work if I issue them to each cache individually, but if I try to bake them all in a loop, I get a ...
0
votes
1answer
31 views

how to avoid operator `collection_instance_add`?

how to create a instance of a collection from a python script / addon without using the collection_instance_add operator? with the operator i use something like: ...
0
votes
1answer
146 views

Pass collectionProperty through operators (Blender 2.8)

I want to pass some created objects by an operator to another operator for modifications. I tested with CollectionProperty, but can't pass the collection from the first operator to the second one: ...
0
votes
0answers
11 views

Property set/get example for operator needed [duplicate]

Still trying to wrap a property into my Addon where I can dynamically control the values of the resulting variable. Take the default operator_mesh_add example and alter the definition of the width ...
0
votes
0answers
25 views

Blender property update [duplicate]

I am building an operator, which has multiple properties. One of the things I would like to do is update the min/max and update attributes of the property on-demand. I understand that I can create a ...
1
vote
0answers
35 views

gbl shader blender 2.8

After adding an draw handler to my operator my terminal is showing the following: ...
0
votes
0answers
16 views

Context issues while importing Alembic files in a plugin [duplicate]

I keep getting the context is incorrect error and the error is: Operator bpy.ops.wm.alembic_import.poll() failed. I have tried all the solutions shared in this post and in the official documentation ...
1
vote
1answer
214 views

How to interrupt a rendering which is not displayed in the UI to interact with?

I created a script that renders and saves the selected objects. The script is quite large and I don't think it is necessary to post it completely. ...
0
votes
0answers
24 views

Getting the context is incorrect error while importing alembics via python

I keep getting the context is incorrect error and the error is: Error: Operator bpy.ops.wm.alembic_import.poll() failed. Can someone tell me the right context or the way to figure it out? I am ...
1
vote
1answer
21 views

pyNode with button: any way to find which node the button pressed was on?

I want to have a pyNode with some buttons on it that modify the node. Similar to how some of the built-in nodes work (Color Ramp, Curves, etc). I can easily put a button on the node using an operator,...
1
vote
1answer
430 views

Plot single vertices based on xy coordinates from CSV file

I'm aware there are numerous posts/questions already been raised on this, but upon reading the previous posts, I'm not quite able to find exactly what I'm looking for. So apologies if there's a ...
1
vote
1answer
33 views

How do I determine Shift+Left Click modal operator?

I would like to determine if Left Click + Shift pressed at the same time in event.type in a ...
1
vote
2answers
240 views

Combine and duplicate meshes before exporting them?

I'm writing an add-on that exports objects to FBX file format. One of its features will be the ability to merge another object for export. So the user selects object ...
0
votes
0answers
57 views

How to exit with keys like “ESC” or “CANC” from for loop?

I was wondering if there was a simple way to get out of a "for loop" in case it gets too long. I was thinking in a keyboard type input as the interface during this cycle is completely freezed. ...
1
vote
1answer
343 views

(Python) How to add items in context menu in 2.8?

How can I add my operator to existing right-click (context menu) in the shader editor?
0
votes
0answers
17 views

Operator Window

I currently have an operator in a script I'm developing. In this operator, I call bpy.ops.mesh.fill_grid() while in edit mode. I want to get this panel in the ...
0
votes
0answers
37 views

Object creation in modal operator

I'm currently trying to create objects from random arrays, by using timer modal operator. However the code below doesn't work, and I think I miss some knowledge of Blender: ...
0
votes
0answers
22 views

Python Add-On API: Constructing a new item on each execute()

I have a simple operator (extending bpy.types.Operator) which I'm using as a button, and I intend to have it create a new cube each time execute() is called. <...
1
vote
0answers
25 views

Cant get modifier info in execute after running modal for the first time

I am writing a script and I am having problems accessing the new modifier created in the invoke() function from the execute() function. I have tried updating both the viewlayer and the depsgraph but ...
0
votes
0answers
34 views

bpy.ops.object.datalayout_transfer() don't work in Operator

In Blender 2.8 when I run bpy.ops.object.datalayout_transfer() in a Operator I get a error "RuntimeError: Operator bpy.ops.object.datalayout_transfer.poll() failed, context is incorrect" Outsite my ...
2
votes
1answer
565 views

Context Problem in Blender 2.80 python module

I run Blender 2.80 as python module (for running on a server with Django), so there is no gui. Apparently passing the correct context doesn't seem to work for me in this case. I have tried many ...
1
vote
0answers
35 views

Automated rendering actions in modal operator is cancelled

I'm trying to render a bunch of actions with a modal operator that is called with a timer. The first action is rendered as expected, and strangely some times the second and third are rendered aswell, ...
2
votes
0answers
109 views

Subscribe to 'Finished' event of modal operator and get result of the operator

I am currently writing a python script and call a modal operator of an external addon like this: bpy.ops.uvpackmaster2.uv_pack("INVOKE_DEFAULT") My problem now is, ...
0
votes
1answer
46 views

How to show operator properties when running operator in scripts or console?

I run an operator in the console, but the operator properties are not shown in Tool Panel. However, if I run the operator from search, the properties will be shown up. How to show operator ...
0
votes
1answer
35 views

Dual functionality for a single hotkey (S for Scale) - similar to the G hotkey for Move and Slide Move

If you press "S" you activate the scale tool, but I'm trying to create a script where if you press "S" again while the tool is already active... you start to cycle between pivot point modes (median ...

1
2 3 4 5