Hi there, i am in the middle of writng a little script, and what i need there is to take the list selected meshes, and select each one of meshes from list and do some action on them.
I have got creation of list working just fine, but the problem is when i want to select object by name… I thought using fuction bpy.ops.object.select_name(name="", extend=False) will be appropriate here, but this seems not to be working. I mean ths little script
import bpy
obs = bpy.data.objects
bpy.ops.object.select_all(action='DESELECT')
for ob in obs:
bpy.ops.object.select_name(name = ob.name, extend=True)
should firstly deselect all meshes, which is working, and then select all objects in the scene in a loop, one by one. But it doesnt. It also doesnt return any error messages…
Writing following codein the console always gives me {‘CANCELLED’}, no matter if default cube was selected or not.
>>> bpy.ops.object.select_name(name='Cube', extend=False)
{'CANCELLED'}
What am i doing wrong here?
Any help then how to select object by its name?
P.S. I am working on newest cog windows build from today(Trunk Blender 2.52 r28900 Win32)