[Bf-python] bpy *tips & tricks* docs added.

HartsAntler goatman.py at gmail.com
Thu Sep 8 18:52:32 CEST 2011


You might want to add something that confused me today.  Python defined RNA
can only be applied to some objects, types that are *"datablocks"*

## this will not work ##
bpy.types.GameObjectSettings.myprop = IntProperty(...)
bpy.context.active_object.game.pyprop = 1
AttributeError: 'GameObjectSettings' object attribute 'myprop' is read-only

## this is valid ##
bpy.types.Object.myprop = IntProperty(...)
bpy.context.active_object.pyprop = 1


On Thu, Sep 8, 2011 at 6:56 PM, Campbell Barton <ideasman42 at gmail.com>wrote:

> Hi, just added tips & tricks section for the python api docs.
>
>
> http://www.blender.org/documentation/blender_python_api_2_59_2/info_tips_and_tricks.html
>
> Interested in feedback / suggestions for things I might have missed out.
>
> --
> - Campbell
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20110909/15c13d86/attachment.html>


More information about the Bf-python mailing list