Linked Questions

2 votes
1 answer
6k views

How do i select multiple object Using Python Script? [duplicate]

I want to select Cube.001,Cube.002,Cube.003,Cube.004 at the same time. trying this script ...
Avi Aninda's user avatar
49 votes
3 answers
100k views

Selecting an object via scripting?

As shown below, I have 2 nested spheres, each with a different material (inner = "1", outer = "2"). Ultimately, I need to select the inner sphere (material "1") via ...
AaronJPung's user avatar
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
8 votes
2 answers
10k views

How to get the collection an object belongs to?

I can access objects belonging to a collection like so: objects_in_collection = bpy.data.collections["My_Collection"].objects How can I access the collection a ...
coCoKNIght's user avatar
6 votes
2 answers
8k views

Python: Check if object exists in Blender 2.8

How can I check if the object exists in python? I want to create an add-on but I'm unable to find any reference. For example how can I check if "Cube" exist? If yes I will make another ...
Andy Andy's user avatar
  • 331
3 votes
2 answers
4k views

How can I replace all selected object's mesh?

With a linked duplicate object I can edit the mesh and have the change show up on all the duplicates. Can I completely replace the mesh of every duplicate instead, and in an easy and repeatable manner?...
Fax's user avatar
  • 171
2 votes
1 answer
7k views

Batch exporting scene collections or selected objects using glTF-Blender-IO

I'm still new with python and scripting. I tried editing the obj exporter that I found. Since I'm exporting tons of object groups, I need each of scene collection or selected objects to be exported as ...
EatCodePlaySleep's user avatar
2 votes
2 answers
2k views

How to access objects in Blender

I found this code I want to use: ...
Dirk Schiller's user avatar
1 vote
2 answers
1k views

Select objects in scene by their object color

I would like to select all the objects in the scene that have the same object color Object.color as the active object. ...
guest's user avatar
  • 11
1 vote
2 answers
2k views

How to create a custom UI script that toggles a specific Object's Render and Viewport visibility while being a bool property (toggle or checkbox)?

Blender Python (overall Python) noob here. I simply want to make a Custom UI that toggles my models accessories by enabling and disabling their viewport and render visibility. Generally, I want to ...
Scottie Doria's user avatar
0 votes
0 answers
1k views

Object Active Selected With Python

I want to use this add-on, so the Python code has to be Single line https://github.com/InamuraJIN/CommandRecorder I was able to select Empty in this Python ...
InamuraJIN's user avatar
0 votes
0 answers
886 views

Blender Python: Selections and Context

I'm trying to understand how selections and active objects work within a context. I thought I understood that a selection is part of a context. I read somewhere that you can create a copy of a ...
Robert's user avatar
  • 1,305
0 votes
1 answer
253 views

Select object pattern and then selecting the object

I import and object C27389_Part into the scene. I search the part by using bpy.ops.object.select_pattern(pattern="*_Part"). That's all good, however it is selected (in red outline) and not ...
Michael Teiniker's user avatar
0 votes
0 answers
179 views

Is it possible, with Python, to select an object by its scene graph path alone?

So I've been a programmer for a long time, and a modeler for a while now, and I've just gotten started on using Python in Blender. One thing bugs me about the interface and I'm hoping I'm just ...
Michael Macha's user avatar
1 vote
1 answer
108 views

Need to modernize my scripting, this bpy based script from 2.77 doesn't run in 2.92 so I can't post my main question yet [duplicate]

I need to make a custom mesh, don't know how and want to post a question about it. However before I do I want to run an example of something simple. I've been away for several years, this runs on 2.77....
uhoh's user avatar
  • 2,667

15 30 50 per page