if the object is only created be sure to link it to the scene first. bpy.context.scene.objects.link(ob)
to change the active object do: bpy.context.scene.objects.active = ob 2011/5/15 Yuniel Castro González <[email protected]>: > Hi again. > I have a new StringProperty that contain a brush_name and a segment of codes: > > for d in bpy.context.scene.objects: > if d.name == brush_name: > bpy.context.SceneObjects.active = d > > to change an active object in scene, but when I use new active object I am > not obtain good results. > Suggest me. > > > ----- Mensaje reenviado ----- > De: "Yuniel Castro González" <[email protected]> > Para: "listaBlender" <[email protected]> > Enviados: Domingo, 15 de Mayo 2011 1:58:27 GMT +01:00 Amsterdam / Berlín / > Berna / Roma / Estocolmo / Viena > Asunto: change active object > > hello to all. > I am programming a script for Blender 2.5 and I need to change the active > object in the scene. > How can I do? > Thanks in advance. > > -- > > > > > > > > > Yuniel > > -- > > > > > > > > > Yuniel > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > -- - Campbell _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
