Hello!
I want make such a think.
If I have at scene selected object with name for example Cube_test then I’m making some operations.
also I want make some operation when there is object with name Cube_test2, but operation are only when object is selected.
I wrote some like that.
for ob in bpy.context.scene.objects:
if "Cube_test" in ob.name:
bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=3)
else:
bpy.ops.object.mode_set(mode='SCULPT')
But It’s not working.
Can anyone write me, what I’m doing wrong ?
Greets and thank You for help