Details
Diff Detail
- Repository
- rB Blender
- Branch
- T59112 (branched from blender2.8)
- Build Status
Buildable 2607 Build 2607: arc lint + arc unit
Event Timeline
I have also removed the usage of bbone (as opposed to just bone), as these were the same anyways? [unless I am misunderstanding something here...]
note that bone-pinning itself isnt working right.
context.bone is actually wrong in the Properties Editor when pinning is used (shouldnt this always point to the pinned bone in this case? -- instead it is always pointing to the selected...afaics).
[this has been the case in 2.79 as well...]
But this should fix the error reported in T59112.
Of course they aren't the same: bone is Bone or EditBone, while bbone is PoseBone in pose mode.
Well, just noticed that the bone Transform panel is missing as well when pinning a bone. (this should not be the case, right?)
Corresponding panel poll() queries context.object.mode [context.object is None when pinning]
Need to wrap my head araound why we cannot rely on context.bone here all the time (and cannot get PoseBone from Bone...)?
Will check more carefully [also because context.bone actually seems to be wrong when pinning anyways, see my first comment...]
The same reason you can't get modifiers from mesh: PoseBone belongs to Object, while Bone/EditBone is from Armature. I.e. there can be any number of PoseBones for one base Bone.
However, you can get Bone from PoseBone.
This is a weakness in the pinning system. You can only pin datablocks, and here it pins the armature. But then you don't have an object anymore, and also no pose bone.
This is not ideal, but I guess just make the code work under the assumption that there could be no object or pose bone, just skip showing some properties then.
Well, I guess I'll just commit the fix for the obvious error [D4057 as is] and leave the rest as is...
- rB157082ecc9ad9d971111450f6b8cd172378af614 also prevented showing certain stuff for the same reason (no ob and no posebone)