Selecting objects in Blender by name prefix

In order to select all objects in the scene whose name starts with a certain prefix (a certain set of characters), we can use a very simple script.

We can get a list of all objects in the scene through the following list:

For example, we need to select all high-poly objects whose names start with the prefix “high_”.

Let’s walk through all the objects in a loop and if the object’s name starts with a pre-defined prefix, we will select it.

If the object’s name starts with a prefix, we use the select_set() method to make it selected.

In the “else” block, we deselect all other objects whose name does not match the condition.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments