Linked Questions

11 votes
4 answers
19k views

How to completely remove all loaded data from Blender?

I'm implementing a Blender Python script to do batch conversions. It works like this: for each model file found in a directory: Import the model Process it Export in other format The problem is, ...
Fr0stBit's user avatar
  • 211
9 votes
4 answers
11k views

How to find number of animated frames in a scene via python?

I need to find the number of animated frames after importing a bvh file in blender. scene.frame_start and ...
Manu Tom's user avatar
  • 121
14 votes
2 answers
2k views

A comprehensive list of operator overrides

I feel like I'm always spending far too much time playing scripting whack-a-mole whenever I want to override an operator in one of my scripts. I'd like to build a comprehensive one-stop-shop list for ...
Gorgious's user avatar
  • 31.5k
4 votes
1 answer
21k views

How to completely delete an object through python?

How to completely delete an object without using: bpy.ops.object.delete() bpy.ops methods are too slow for my script, so far I am able to delete an object with a ...
VSB's user avatar
  • 483
5 votes
1 answer
7k views

How to prevent memory leakage in Blender?

I have to load lots of objects/meshes(50k) in Blender and render them for which I have written a Python script. My meshes have lots of vertices/faces (in the range of ~[10k, 70k]). I noticed that ...
Amir's user avatar
  • 3,062
3 votes
2 answers
3k views

How to delete all objects/cameras/meshes/etc. using Python scripting?

I have a Blender Python script that uses a loop to sequentially load and render viewpoints of multiple OBJ files that I generally try to run from the command line. However, if I have Blender open, ...
Yuerno's user avatar
  • 153
1 vote
1 answer
3k views

Export collection and set FBX file name as collection name?

How difficult is it to make a selection by collection and set the FBX file name as the collection name? ...
KasAndrr's user avatar
1 vote
1 answer
889 views

objects.delete doesn't remove completely

I have this part of code in my script: ...
aky-her's user avatar
  • 2,094
4 votes
2 answers
2k views

Blender consuming all memory

I have hundreds of thousands of models in a folder. In my script I have a loop which loads each model at a time as object in my scene then render an image of it then delete the object. After couple of ...
Tak's user avatar
  • 6,303
3 votes
1 answer
1k views

Python Scripting: Remove Curve Object

Preferably not using selection, tried bpy.data.meshes.remove don't works for it
as3boyan's user avatar
1 vote
1 answer
1k views

Cannot find camera after deleting and appending a new one with python

I run a background script that: deletes everything: override = {'selected_bases': list(bpy.context.scene.object_bases)} bpy.ops.object.delete(override) ...
Oirad's user avatar
  • 11
1 vote
0 answers
1k views

fully clear scene and cache from scene collections and their embeded components e.g. objects, meshes, materials etc

I have a script which I am loading mutliple .obj files of room models from the disk. Each .obj goes into sub-collections depending whether it is a room in the same house or not. In the beginning of ...
ttsesm's user avatar
  • 409
1 vote
1 answer
761 views

Script to intersect two objects gets rapidly slower

What I want I have two sets of objects and want to intersect every object of one set with every object of the other set by means of the boolean modifier. The output can be reduced to the vertices of ...
Phann's user avatar
  • 447
1 vote
0 answers
654 views

Delete Children Automatically

Is there a way to automatically delete children when the parent is deleted? By automatically I mean that you don't do any selection (or other action) of the children prior to selecting and deleting ...
DrDress's user avatar
  • 563
1 vote
1 answer
494 views

Deleting temporary mesh after extracting data

When extracting data via temporary mesh, like this: mesh = object.to_mesh(bpy.context.scene, apply_modifiers=True, settings='RENDER') Do I need to delete this ...
user avatar

15 30 50 per page