Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
8 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
14 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
15 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
42 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
14 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
33 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
38 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
71 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
18 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
43 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
110 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
51 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
13 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
92 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
37 views

How to access the operator instance members?

I'm testing Blender's scripting, with this simple operator from the documentation: ...
1
vote
1answer
71 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
28 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
22 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
52 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
127 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 ...
0
votes
0answers
11 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
67 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
68 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
56 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
141 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
22 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
42 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
45 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
95 views
2
votes
1answer
146 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
25 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
67 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
70 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
155 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). ...
0
votes
0answers
28 views

triggering custom event in modal operator

im developing some tools in order to communicate externally with blender. The chosen approach is socket communication, the tools run requests through a client and blender has a server started from the ...
1
vote
1answer
120 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
26 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
36 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 ...
0
votes
0answers
183 views

Multithreading with Python

I'm trying to write a marching cubes operator for the blender smoke simulator. The main part already works based on someone else's previous work. However is the code single threaded and as such rather ...
1
vote
2answers
40 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
159 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
53 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 ...
1
vote
1answer
260 views

Python: Operator Undo Method

Is there a way to call your own undo and or redo method when your operator is being 'undone'? I already used this bpy built-in method: bl_info = {'UNDO'} but ...
1
vote
0answers
394 views

Invoke operator from another operator

I have an operator that needs the file to be saved before it can continue (it uploads the file but that's not relevant). Rather than just give an error message that the user needs to save the file ...
3
votes
2answers
193 views

Force a Blender operator to always start with default values

I'm writing an operator for which it is crucial that every time it gets called all the properties are set to their default values. The ops.object.delete has 1 param. use_global. It is always false, ...
0
votes
1answer
132 views

How to avoid fence post issues when changing modal operators?

Is there a recommended option for avoiding fence-post issues (as in waiting for input) when exiting or changing a modal operator in Blender? It's been something I've been trying to find a nice ...
2
votes
0answers
327 views

Creating a list selector in a popup/dialog

For an import/export plugin I'd like to create a long list of objects to select from. This is fairly easy to do in a panel with a template list, but it's not quite what I want - it's too small and ...
0
votes
0answers
62 views

how do I get an operator's relative X, Y, Width, and Height screen orientation/size?

After countless failed attempts at trying to get a working template_curve_mapping, I have deemed it as inferior and broken, and decided to try my hand at a raw attempt with bgl, using an invisible ...
1
vote
1answer
138 views

How to create an operator to control the Radius of a spline and add a hotkey

Blender has a hotkey to control the Tilt of a curve (Ctrl+T) but does not for the Radius. When looking for Radius under User Preferences> Input I can't find it. I was told it's because unlike the Tilt,...
-1
votes
1answer
384 views

TCP Server inside Blender [closed]

I'm trying to implement a tcp server inside blender with a time operator using asyncio. but the code always crash the UI. I know there is a way to do this inside blender since some people have ...