Skip to main content
The 2024 Developer Survey results are live! See the results

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
12 views

No module named 'ezdxf'

I'm writing an add-on in vscode to export some geometries as dxf files. When I try to import ezdxf, i get an ModuleNotFoundError: No module named 'ezdxf'. I have ezdxf installed on my computer and can ...
JarodH99's user avatar
1 vote
0 answers
6 views

Runtime error when rendering animation with a frame_change_pre hanlder defined

To visualize time dependent data I make use of handlers. The idea is to change the geometry every time I change the time. A minimal working example is shown here: ...
SimonCan's user avatar
0 votes
0 answers
12 views

Relative Quaternion rotations in Blender Python

I'm trying to calculate the relative/local rotation between two Quaternions q1 and q2. The Quaternion represent a rotation in ...
David B's user avatar
  • 423
0 votes
0 answers
9 views

I want to create a custom asset library with different .blend objects and save it as a combined asset to use in a differrnt scene [closed]

I want to create a custom asset library with different .blend objects and save it as a combined asset to use in a different scene ...
AASIM MIRZA's user avatar
0 votes
0 answers
9 views

Different rotation directions caused by view orientation

I use pyhton "bpy.ops.transform.rotate()" to rotate the right angled pipe I made Set my transform orientation to Normal and Axis to Z. When I change my perspective from small to large, I ...
mengyuanlan's user avatar
1 vote
0 answers
10 views

Is it safe to use a Blender Object as a Python dict key in a background bpy script?

From the Blender Gotchas page I know that Object references are invalidated on Undo/Redo, but what about background script execution where no Undo is performed? Can I safely use a ...
Rush's user avatar
  • 11
1 vote
1 answer
21 views

How to lock the always on top subinterface when run a operator

Open a always on top subinterface Run a operator modal ...
X Y's user avatar
  • 6,248
0 votes
0 answers
16 views

module has no attribute 'register' - Installing Blender 4.2 add-on [closed]

Good day, all! So I finally made my add-on work as it should, but not Blender decided to change how add-ons works) This is great, but now my add-on not installing. I've removed bl_info from script and ...
Dmitry Stogov's user avatar
1 vote
1 answer
25 views

Add text information directly to the viewport for 5 sec

I am trying to add text information directly to the viewport so that it would be displayed for 5 seconds after the button is pressed and then disappear. I have not been able to realize this using ...
Andrew's user avatar
  • 83
0 votes
0 answers
24 views

Check if any popup is running in 3D viewport

How to check if any popup is running in 3D viewport like adjust last operation menu, not include N-Panel I am looking for a method to check this to resolve my addon bugs in blender 4.2. Script for ...
X Y's user avatar
  • 6,248
3 votes
0 answers
17 views

how can i import bmesh module just like bpy?

I try to install bpy to my local python package.It work well,but I just want to import bmesh is not found.What can I solve it? I git clone blender git,and run "make bpy" to import bpy.
沧笙踏歌's user avatar
0 votes
0 answers
13 views

Blender scripting, run the operator after the save window is closed?

have a problem with my addon. I have a button that is intended to first save a copy of the file (a basic save copy window shows up) and then it runs some operations on the file's model etc. So ...
amelylina's user avatar
1 vote
0 answers
29 views

How to handle invalid context in Blender 4.0 after render [duplicate]

In my Python script, I rotate a randomized dice with a rigid body, play the animation using bpy.ops.screen.animation_play() to apply the physics, and then render ...
Mp Thompson's user avatar
-2 votes
1 answer
27 views

AttributeError: 'NoneType' object has no attribute 'type' [closed]

Good time of the day, all. Can't get rid of this error message. Although the function is working, but I get "AttributeError: 'NoneType' object has no attribute 'type'" error message. Code: <...
Dmitry Stogov's user avatar
2 votes
1 answer
79 views

How to get not active object?

What I'm trying to do is select two objects, add Data Transfer modifier to active object in selection and then use not active as source. So, active object is ...
Dmitry Stogov's user avatar
1 vote
0 answers
18 views

Making a basic n panel template with working properties [duplicate]

I'm trying to display some different property types on a n-panel. I would like to level up from using operator buttons, but I'm having trouble figuring out how to make a panel with some properties. <...
Yank Scally's user avatar
0 votes
0 answers
24 views

Georeference 3D data generated using BlenderGIS

I generated a 3D model (terrain + extruded buildings) using BlenderGIS,and I was wondering if I could integrate them into an ifc project having the right georeferencing using BlenderBIM. The problem ...
aogino's user avatar
  • 11
0 votes
0 answers
12 views

Binding of machine gun ammunition chain

I made the skeleton of a machine gun, and because I want to achieve the effect of the remaining bullets disappearing bit by bit after finishing the bullet in UE, the parent-child relationship of my ...
Phantom54's user avatar
0 votes
0 answers
53 views

How can I transfer settings from Blender 4.1 to 4.2? [duplicate]

I recently installed Blender 4.2, but it’s starting with the default factory settings—meaning all my key mappings, shortcuts, and startup preferences are gone. It seems like Blender 4.2 starts from ...
Sjun's user avatar
  • 1
0 votes
0 answers
15 views

Regarding the issue of Blender importing FBX large files being too slow and often unresponsive

May I ask everyone, it always takes a long time for me to import FBX model files that exceed 150M or 200M in Blender, and I often encounter unresponsive situations? How can I solve this problem? First,...
MA__AM's user avatar
  • 15
0 votes
0 answers
8 views

How can I rig human-looking face onto a 3d FLAME mesh talking head?

Noob question here as I've just started working with Blender and 3d models: I'm currently working with Blender 3.4.1 and I'm using Python script which runs blender on ...
skidjoe's user avatar
  • 101
0 votes
0 answers
8 views

Copy/Paste and Duplication Differ with Cloth Simulation

I have a baked cloth simulation that looks as follows: I need to create meshes for each part of the shirt, so I copied and pasted the shirt repeatedly and created a mask for each part of the shirt ...
fny's user avatar
  • 153
4 votes
1 answer
218 views

How can I run a function when opening Blender that requires context?

My initial attempt was to call that function directly from the register part. However, I soon realized that this isn't possible for a function that needs context. I also tried using a load_post ...
Tsybe's user avatar
  • 533
0 votes
0 answers
14 views

How can I run code whenever any object is added? [duplicate]

When I add an object, I want to run some initialisation code on it first. How can I do that?
Yank Scally's user avatar
-1 votes
0 answers
18 views

How to access data (point_data, cell_data) written by meshio in Blender shader editor? [closed]

Conext: I have a mesh (N points, M cells) in my Python script (outside Blender). I associate to each point and to each cell a ...
Adel Redjimi's user avatar
0 votes
0 answers
13 views

Index Error Concerning Bound Box When Exporting GM [closed]

As the title says, I'm getting an index (or location unknown) error when exporting a GM. I'm not very experienced with Blender, but it seems Python cannot locate the bound box and I'm uncertain how to ...
jh.bovenkerk's user avatar
1 vote
0 answers
20 views

Subtracting overlapping 2D mesh with Python using Blender API

Supposing I have two 2D mesh objects, A and B. I would like to programmatically subtract the overlapping portion of one from ...
SKNB's user avatar
  • 121
0 votes
0 answers
13 views

How do I close an area using Python in Blender 4.1? [duplicate]

I want to close a panel from within my Python addon. Existing questions and answers seem to yield results that no longer work as they are very dated. The suggested code to run is: ...
Kristopher Ives's user avatar
2 votes
1 answer
31 views

How can I add a library override to a non-API custom property from a linked file with Python?

The question regards setting custom properties of a linked file via Python. Because when setting the property like ...
iclemens's user avatar
  • 117
0 votes
0 answers
13 views

Save an image of an area by it's index [duplicate]

General Question: Is there a way to capture a raw image, so no overlay or gizmo, of an area within Blender only by its index? I would need a script that writes the pixels of the area to an image ...
Erasers45-Studios's user avatar

15 30 50 per page
1
2 3 4 5
443