The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
0answers
8 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
21 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
20 views

gbl shader blender 2.8

After adding an draw handler to my operator my terminal is showing the following: ...
0
votes
0answers
14 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 ...
0
votes
1answer
91 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
20 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
20 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
91 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
28 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
75 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
48 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
65 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
12 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
22 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
21 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
20 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
21 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
217 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
19 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
67 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
33 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
32 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 ...
0
votes
1answer
81 views

How to wait for an operation - to another operator - to complete within an operator (import_scene)

Besides the point but why is this not working as a default stack is expected to work? I'm trying to get an operator to call another operator and wait for the operator's response before proceeding. ...
1
vote
2answers
258 views

Modal Operators: Click Object Event

I'm currently working on a python tool using a modal operator. Now I know to finish the operation I can use: if event.type == 'LEFTMOUSE': return {'FINISHED'} ...
0
votes
1answer
186 views

How to display and use operator properties in a custom UI panel?

For example, as you can see in the keymap preferences, there are operators that have properties, like this Smooth Vertices: With this little code ...
0
votes
0answers
140 views

Blender 2.8 Operator Presets not working for me

So I have recently installed the recent blender 2.8, since my last 2.8 version wouldn't show me curves in the right way but now I am having issue interacting with the operator presets for add-ons. ...
2
votes
1answer
81 views

Overriding Context for bpy.ops.transform.shrink_fatten

I can't seem to get sufficient context for calling bpy.ops.transform.shrink_flatten() without this error: ...
0
votes
0answers
29 views

understanding the simple deform modifier (TAPER - FACTOR)

I'm trying to use the simple deform modifier to reproduce what the SHEAR operator does, in order to do so I'm using it in TAPER mode and locking one of the axis deformation, like that the object will ...
0
votes
0answers
30 views

Prevent Blender 2.8 navigation buttons overriding from modal operator

Is there some way to prevent modal operator call when user click in Blender 2.8 navigation buttons (four rounded buttons at right upper corner - Hand, Zoom etc.)? Or how can i detect coordinates of ...
1
vote
0answers
31 views

How do you execute bpy operations in the python console that requires you to hover your mouse over the 3D view port?

I just want to enter bpy.ops.view3d.snap_cursor_to_center() in my python console just to see how it works. I am getting the error: ...
1
vote
0answers
69 views

Is there a way to change default values of properties of operator?

I tried this to change, but no success Any ideas?
1
vote
1answer
56 views

alternatives for operator's report() function?

it seems that the report() function of Operator type lets all other routines finish before it actually reports. this makes it useless in many instances: for example, when reporting progress on baking ...
2
votes
2answers
55 views

How Bpy.ops.mesh differs from bmesh ops

I know that Bmesh is a standalone module and bpy is an application module. But still why we have mesh related operations under bpy i.e bpy.ops.mesh , if we have bmesh? I need deep insight. Thanks
1
vote
0answers
56 views

Setting New Default Operator Preset?

I'm using Blender 2.8! I've created an operator preset for importing models. It's simple, just import everything with z-forward instead of backwards. Is there anyway to make this default? Every time ...
0
votes
0answers
430 views

How do I fix bpy.ops.object.mode_set.poll() failed, context is incorrect?

I am trying to convert a metaball object to a mesh, but I cant pass this stage. I am basically stuck. I checked out all the bpy.context and context override and bpy.ops posts and documents and i ...
0
votes
1answer
44 views

How to alter operator property while it's invoking

In this script, I am taking two names, and printing them. The first name should be chosen from the menu or written manually (a new one). ...
0
votes
0answers
35 views

Blender addon - Writing new mesh operators

Blender has a number of mesh operators, like move, rotate, scale, extrude, bevel, inset, etc. They all consistently respect Blender modes like snapping, proportionate editing, pivot point (esp. ...
1
vote
1answer
59 views

Is there a way to access a bpy.types.Operator value

I have a popup that can allow the user the set a value. I can see that the value is getting set correctly as it reports it to the console. However after the function that calls the Operator ...
1
vote
0answers
62 views

How can I modify multiple properties of an Operator in a Panel? [duplicate]

I have an operator that has properties like below ...
2
votes
0answers
249 views

Override context for operator called from panel

I have an operator, “my_operator”, that is called from a panel, as follows: ...
0
votes
0answers
35 views

How to I render this .wrl using the python api (bpy)

I have been trying to render this wrl files like this one using this code: ...
1
vote
1answer
38 views

How should operator id_remap be used?

I'm trying to use id_remap on some materials, but Blender crashes when I try to use the operator. I've tried many different ways to invoke it. Right now I have: ...
1
vote
0answers
25 views

Code works in Console, not as registered Operator

I made a scene with a cube and a sphere. The sphere has a "displace" modifier on it, which I want to apply while having the cube (or nothing at all) selected. Executing the following lines one by one ...
1
vote
1answer
332 views

How do I pass an argument to an operator that is called inside a panel?

I would like to be able to pass aarguments to operators that I am calling from panels/buttons but I do not know how to do that. At the moment I use "global" variables but they tend to make the code a ...
0
votes
0answers
45 views

How to check from the script that modal operator is running?

Or at least it would be great if there is any way to know that modal operator was cancelled
1
vote
1answer
158 views

Can't get the active_object in Operator

I try to get the active object by "bpy.context.scene.objects.active" in my operator, but I receive a error 'Context' object has no attribute 'objects', what's wrong?My scripts is as follow: ...
0
votes
1answer
172 views

Blender Python: Running multiple timers

I have a bit of a weird problem that I simply cannot seem to get around. I want to run 2 timers, each set to a different interval. The problem that I'm having is that both classes receive each others ...
1
vote
1answer
261 views

Trying to make a pie menu with custom operator

Trying to understand how i can add the operator i made to a pie menu for me to use, when i run it nothing shows. Treat me like a noob at coding, thank you for your time ...
0
votes
0answers
53 views

Calling bpy.ops.wm.revert_mainfile() operator multiple times in one script

I have a script which iterates over objects in the scene. Each iteration removes the rigid body property from the given object (bpy.ops.rigidbody.object_remove()), ...
0
votes
0answers
529 views

How can I use a boolean property inside of a custom operator class?

Hi Blender/Python users, I am working on an add-on where I'm trying to make an operator class as a button that runs a different set of commands depending on whether custom boolean properties are ...