Replace material operator raising an error #1

Open
opened 2024-06-05 18:00:54 +02:00 by Dmitry · 0 comments

Python: Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\blender_org\material_utilities\operators.py", line 338, in execute
return mu_replace_material(self.matorg, self.matrep, self.all_objects, self.update_selection)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\blender_org\material_utilities\functions.py", line 551, in mu_replace_material
obj.select_set(state = True)
RuntimeError: Error: Object 'Cube.003' can't be selected because it is not in View Layer 'ViewLayer'!

That's probably because I've been using the "Quick Groups" add-on which apparently is moving the objects through the different layers.
Nevertheless, maybe this error could be prevented, so I'm attaching the project file.

That is the latest daily Blender 3d 4.2

Python: Traceback (most recent call last): File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\blender_org\material_utilities\operators.py", line 338, in execute return mu_replace_material(self.matorg, self.matrep, self.all_objects, self.update_selection) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\blender_org\material_utilities\functions.py", line 551, in mu_replace_material obj.select_set(state = True) RuntimeError: Error: Object 'Cube.003' can't be selected because it is not in View Layer 'ViewLayer'! That's probably because I've been using the "Quick Groups" add-on which apparently is moving the objects through the different layers. Nevertheless, maybe this error could be prevented, so I'm attaching the project file. That is the latest daily Blender 3d 4.2
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: extensions/materials_utils#1
No description provided.