[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21574] branches/blender2.5/blender: 2. 5 Buttons:

Joshua Leung aligorith at gmail.com
Tue Jul 14 14:40:26 CEST 2009


On Wed, Jul 15, 2009 at 12:32 AM, Thomas Dinges <dingto at gmx.de> wrote:

> Revision: 21574
>
> http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21574
> Author:   dingto
> Date:     2009-07-14 14:32:19 +0200 (Tue, 14 Jul 2009)
>
> ...
>
> Modified: branches/blender2.5/blender/release/ui/buttons_data_bone.py
> ===================================================================
> --- branches/blender2.5/blender/release/ui/buttons_data_bone.py 2009-07-14
> 12:23:08 UTC (rev 21573)
> +++ branches/blender2.5/blender/release/ui/buttons_data_bone.py 2009-07-14
> 12:32:19 UTC (rev 21574)
> @@ -23,6 +23,23 @@
>                split.itemL(text="", icon="ICON_BONE_DATA")
>                split.itemR(bone, "name", text="")
>
> +class BONE_PT_transform_bone(BoneButtonsPanel):
> +       __idname__ = "BONE_PT_transform_bone"
> +       __label__ = "Transform"
> +
> +       def draw(self, context):
> +               layout = self.layout
> +               bone = context.bone
> +               if not bone:
> +                       bone = context.edit_bone
> +
> +#Seems to be missing from RNA?
> +               row = layout.row()
> +               row.column().itemR(bone, "location")
> +               row.column().itemR(bone, "rotation")
> +               row.column().itemR(bone, "scale")
> +
> +

The problem here is that we really ought to be exposing PoseChannels NOT
Bones when not in EditMode. Transform stuff is located on PoseChannels not
bones. In fact, Bones really shouldn't be edited directly (or at least
exposed for direct editing). The current RNA wrapping still allows for this
though, since it is nice to allow for some Py-scripting access to this
directly for some special cases (exporters?)


More information about the Bf-committers mailing list