RNA Bugfix:
authorJoshua Leung <aligorith@gmail.com>
Sun, 8 May 2011 05:18:40 +0000 (05:18 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sun, 8 May 2011 05:18:40 +0000 (05:18 +0000)
commit85b1b459ed43a5667880f102d433cb2ac3dce7be
treeb7f9534f8503835bbe1103e90c59c043e555347b
parent2aea765d6eebd0dccf355c83ed9cb0eac5965072
RNA Bugfix:

The following script would fail:
#ob = bpy.context.active_object
pb = bpy.context.active_pose_bone
pb.bone.driver_add("hide")  # <--- exception here

The RNA-path function for Bone assumed that when it got called, it's
"id_data" (or owner-idblock-pointer) would only be ID_AR (i.e. an
armature). However, in the above example, pb.bone has ob as its
id_data, resulting in an invalid RNA path getting created. Added check
for this case, since it's likely to be common
source/blender/makesrna/intern/rna_armature.c