[Bf-python] after duplicate

Campbell Barton ideasman42 at gmail.com
Mon May 16 18:58:02 CEST 2011


Operators only return if they succeed or not, this is not ideal from
an API perspective, more a result of allowing python to access blender
tools which were not written to be used as an api.

So you have to do:

... select your object ...
bpy.ops.object.duplicate()
obj = bpy.context.active  # newly copied active object.


2011/5/16 Yuniel Castro González <ycastrog at estudiantes.uci.cu>:
> I have an active object in scene (cube for example) and I execute duplicate() function
>
> import bpy
> r = bpy.ops.object.duplicate()
>
> but I'm not execute r.select = True because an error occurs
>
> 'set' object has no attribute 'select'
>
> What happens?
>
> Thanks in advance.
>
>
>
> --
>
>
>
>
>
>
>
>
> Yuniel
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>



-- 
- Campbell



More information about the Bf-python mailing list