Skip to main content

Questions tagged [python]

Python is an object-oriented programming language. In Blender, it is used as a general purpose scripting language and to create add-ons to extend Blender's functionality.

0 votes
0 answers
4 views

KeyError: 'bpy_prop_collection[key]: key "View Layer" not found' when launching blender with external script

when I fire the following code inside blender it's working well, no matter the version 3.x or 4.x But if I try to use it when launching blender with specific argument telling to open a blender file ...
2 votes
1 answer
613 views

How do I get vertex coordinates in the same units as the scene units?

I want to get the coordinates of a vertex in the correct units, millimeters in this case for the current model, to do some calculations in external to blender module. When changing the units of a ...
0 votes
1 answer
259 views

python code for Ctrl +Z

I have a small problem. I couldn't find anything even close to it in the blender stack exchange website. I have a python code for duplicating the selected mesh as many times as specified by the user ...
2 votes
0 answers
20 views

Operator called by another operator does not trigger Adjust Last Operation panel

I have an Operator defined as ImportImageOperator which calls another operator ...
0 votes
0 answers
21 views

draw() not called on a Panel when X-axis mirror button is clicked [closed]

Here's minimal example. When you click the 'X' mirror button in the 3D View header, the draw method is not called, so the panel is not updated. But draw is called when changing the mode. How can I get ...
30 votes
1 answer
11k views

How to implement custom icons for my script/addon?

Is it possible to use different icons other than the default set and how?
0 votes
0 answers
11 views

problem with UvRizom

I downloaded the trial version of UvRizom 2024, And I bought the Rizomuv Bridge addon - Blender 2.8+ (https://blendermarket.com/products/rizomuv-bridge) In "RizomPath" I chose this path: ...
0 votes
1 answer
343 views

Python Registration Error

I have been using Blender for a bit, I have made an animation, rendered images and many other things. I was using Blender 2.8 Beta and it worked great for a long time. However, it stopped working now, ...
3 votes
1 answer
630 views

Writing a plugin: How do you stop a process running in another thread?

I started writing a plugin for Blender that accepts Open Sound Control messages for direct manipulation of data in realtime. I ran into a snag that made me uneasy about releasing it: when I close ...
14 votes
2 answers
5k views

Is it possible to find the nodes connected to a node in python?

Is it possible to find nodes connected to a node? For example, could you trace your way back through a node tree from the material output node by finding the node connected to the material output ...
0 votes
0 answers
11 views

is it correct to set the camera intrinsics in this way?

I have a 3x3 matrix inside a calibration file that has the intrinsics of my real room inside it. We will call them fx fy cx cy. I would like to know if the code I have written is correct, as I am not ...
-1 votes
0 answers
16 views

Script for importing an OBJ file as Shape key for blender 4.1

I have blender version 4.1 I’m trying to adapt the script for my version ...
0 votes
1 answer
18 views

How to get the path to an image that the user chooses

I'm using openCV to process an image that is chosen by the user. For OpenCV I just need to get the path to the image, but I'm unable to find anything in the API which lets me just pick a file path (...
3 votes
1 answer
441 views

Run Python code from blank file every time

I am wondering whether it is possible to run a Python script in Blender 2.82 from the text editor, such that each time the script is run, it reverses everything that was done in the previous run. In ...
1 vote
1 answer
29 views

create an object from scratch by using numpy

I'm trying to create one object from scratch using numpy (in the example, in order to make it very simple, only two vertices and one edge). The code below works (Hurray!) but ... Could anyone give me ...

15 30 50 per page
1
2 3 4 5
884