Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [operator]

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

1
vote
0answers
33 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
0answers
19 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 ...
0
votes
2answers
22 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
14 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
43 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
14 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
11 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
34 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
29 views

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

I have an operator that has properties like below ...
0
votes
0answers
61 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
16 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
20 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
21 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 ...
0
votes
1answer
69 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
24 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
50 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
57 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
118 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
25 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
58 views

I can't use Blender hair tool add-on

I want to use to hair tool add-on, but doesn't work. It seem to not use operator, so I search on the web, though I can't find it. Why can't use operator and how can I use hair tool ? I use blender 2....
0
votes
0answers
226 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 ...
0
votes
2answers
57 views

Keep getting .poll() Context is Incorrect Error even though I set the correct context

I keep getting "Context is incorrect" errors even though I use an override. Here is the .blend: http://pasteall.org/blend/index.php?id=50312 It has one of my models I am coding some Animation ...
0
votes
0answers
15 views

Get operator information while user is doing operator

In my example I am working with a resizing operator, bpy.context.active_operator.properties.value[0] Gives the x-scale, and so on. However, the scale operator ...
0
votes
1answer
184 views

How to create toggle button use python in blender

I want to make a toggle button for my custom operator. It works similar to checkbox: once the button is clicked, the operator keeps running until the button gets another click, so will the button ...
0
votes
0answers
41 views

How to access the operator instance members?

I'm testing Blender's scripting, with this simple operator from the documentation: ...
1
vote
1answer
77 views

Get an executable list of executed operators in python

What is it for: I’m writing an addon for blender which will have to store operators that have been executed since a custom button has been pressed, until another button is pressed. What do I need: If ...
0
votes
0answers
35 views

Good practice to develop Blender Addon : Execute/Invoke command (INVOKE DEFAULT, FINISHED, etc.)

How can I use the "execution content" at the end of execute/invoke command (INVOKE_DEFAULT, FINISHED) ? (https://docs.blender.org/api/blender_python_api_2_63_17/bpy.ops.html#execution-context) Could ...
0
votes
0answers
27 views

Good practice to develop Blender Addon : Objects and operations

I understand there is many kinds of "objects". The objects themselves such as cube, sphere, etc. (that are meshes), lights and camera, but also particle emitters, materials, node_tree, etc. The first ...
0
votes
0answers
82 views

Commands from serial port to blender controls

I'd like to make some extra keyboard on Arduino to send some commands to Blender. Some commands just duplicating existing shortcuts, some of them I need to start custom python scripts during ...
1
vote
0answers
151 views

object set_origin not working

I have been looking at similar questions yet the following script is not returning any error but the origin of the object is not changed. What did I not set right? The context seems ok since I have ...
1
vote
0answers
16 views

What do bl_undo_group and bl_translation_context properties do?

Both Operator and Macro struct's have the properties: bl_undo_group bl_translation_context Other than being string values no other information seems available for these properties. Can anyone ...
1
vote
0answers
73 views

Cancel Blender operators from python

Is it possible to cancel a recently run operator from a handler, if it fails to pass some condition? I basicaly want to restrict some objects which have a custom property from editing, so I want to ...
2
votes
1answer
89 views

How to extend an Operator

I tried to extend my own Operator but it doesn't work. What am I doing wrong? If I add this operator I get "Test" ...
1
vote
1answer
72 views

Python: How to select one 'BoolVectorProperty' value at a time unless 'shift' key is held

I am trying to overwrite the bpy.ops.object.move_to_layer operator in Blender so that I can move other objects when the selected objects are moved. When I try to ...
3
votes
1answer
154 views

Why are these buttons performing the same operation?

I'm writing a simple script that will help me use Blender better. One script sets everything up that's needed for retopology. The second just makes a hexagon and fan fills its face. Individually, I ...
0
votes
0answers
30 views

How to create a operator to import different categories 3d object?

I am not sure how write the question in a clear way. I am giving more details on the question here. I am going to create three buttons to import different 3D models. For example, the first one is for ...
1
vote
0answers
45 views

Draw callback still running after add-on reload

I have an operator that activates/deactivates an overlay on the 3D view, for that I used: ...
0
votes
0answers
49 views

Creating an operator that dinamically updates the viewport a certain number of times per second

I want to create an operator to preview a physic animation in real time. I have this set of object and I wanted to move them for example using a basic equation like this: ...
0
votes
0answers
99 views
2
votes
1answer
173 views

How to find python source code for an operator preset

I'm new to python and Blender and sometimes I find strange things. My problem is I'm trying to understand an operator behavior but something's missing. I'm in this situation: I select a mesh outside ...
0
votes
0answers
29 views

How to check operator status

How to know if an operator (like view3d.rotate) is running? has the blender something like the "active operator" global variable?
0
votes
0answers
78 views

How to run a modal operator for/in several 3D Views (video of problem included)

When i invoke a modal operator (it highlights faces under the mouse cursor via raycast and bgl) from the tool shelf, it is running in/for the 3D View, the tool shelf is in but not in other 3D Views ...
1
vote
1answer
99 views

How to generate temporary operators with dynamic properties?

During the development of an add-on I had to generate an operator based on the information in a dictionary. As I didn't find anything on that topic, I thought it might be useful to add my solution for ...
2
votes
0answers
200 views

Calling modal operator from prop update function ---> wrong context (how to change context for modal operator)

I have a modal operator to get the face index under mouse position from raycast (close to the "operator_modal_view3d_raycast.py" template). ...
1
vote
1answer
165 views

python scripting - how to stop my modal operator code from getting the old data?

i was working on a code to print this word (extruded) for every time i use extrude region tool bpy.ops.mesh.extrude_region_move so i created this code ...
0
votes
1answer
29 views

search for unknown operator 'BPY_OT_OPS_OT_mesh.dissolve_limited()

The menu for this code is in the the video sequencer. It just brings in an image file into the video sequencer. It works except that I get search for unknown operator 'BPY_OT_OPS_OT_mesh....
1
vote
0answers
44 views

Button-sized icons in operator?

I essentially want to make buttons with an image inside, similar to how template_icon_view works, but with the functionality of an operator button. I haven't found any way to resize icons, or to ...
1
vote
2answers
46 views

Custom image format importer

I've created an importer for an obscure texture format and I can invoke it as an operator successfully. Because I'm chaining two addons together, (a model importer that also automatically imports ...
0
votes
1answer
219 views

Adding a 'SUN' via lamp_add() actually adds a 'HEMI'. Bug?

If I fire the operator afterwards from a button, it doesn't work properly. I've other operators with other lamp types and those are working quite well as expected. But this one stole me a hour or two. ...
0
votes
2answers
64 views

Extension of standard operator

How can I add additional code for already existing operator? For example, I want to add into bpy.ops.wm.save_mainfile this string: print("My code") I know that I ...