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.
13,285
questions
0
votes
0
answers
6
views
where can I find _bpy module?
In bpy module, there is code like this:
When import bpy, it will prompts error.
...
0
votes
0
answers
13
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 ...
1
vote
0
answers
8
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:
...
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 ...
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
...
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 ...
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 ...
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
...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
-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:
<...