This patch add offset/individual scaling XYZ/rotation to custom shape. and remove uniform scaling from custom shape.
It will be more easily set up custom shapes instead of append many objects that adjusted offset/scaling/rotation:
Differential D10974
Add geometry parameters for custom bone Authored by Yuki Shirakawa (shirakawa) on Apr 14 2021, 5:58 AM.
Details
This patch add offset/individual scaling XYZ/rotation to custom shape. and remove uniform scaling from custom shape. It will be more easily set up custom shapes instead of append many objects that adjusted offset/scaling/rotation:
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions I found custom_scale (custom_shape_scale) uses as invisible (scale = 0.0) on some addons.
Comment Actions You can mark the comments that are handled as "Done" by checking the checkmark on them and submitting an empty comment. All my comments seems to be fixed now for me :)
Comment Actions The patch needs to be updated to the latest master version. Can you also generate the diff with git diff -U1000 so we can that we get rid of the "Context not available" here in the patch review? I also noticed that if I enter edit mode on a single bone added to the default cube scene, blender crashes. If you can't, you can try to see if building with ASAN exposes this for you.
Comment Actions I fixed some lines by review, fixed accesses to null pointer on draw non-custom shape bones. Comment Actions
I updated to the latest master.
I can reproduce it and I fixed it. Comment Actions There is a use of PCHAN_CUSTOM_DRAW_SIZE in armature.c that hasn't been updated for the fact that the macro now no longer takes custom bone scale into account.
Comment Actions Not all feedback has been taken into account (even including a note that was marked as "done").
Comment Actions I fixed some lines by review, moved if-block for PCHAN_DRAW_NO_CUSTOM_SHAPE to hide custom shape.
Comment Actions
If the custom shape is not visible, what happens to the bone? Does it reverts to showing the default shape (like it would without custom shape)? Or is assigning a custom shape + hiding the custom shape the same as hiding the bone altogether (so nothing is drawn)? Comment Actions I think adding a second "Hide" property for bones would be AMAZING, but this is the wrong way to do that, and it's maybe out of scope for this patch. The issue with a custom_shape_hide is simply that it relies on a custom shape being assigned. It could instead just be called enabled and not be related to custom shapes, and I think that would be a stronger design. But that raises other questions that make it be out of the scope of this patch. Comment Actions
"custom_shape_hide" will be invisible custom shape in viewport. not happens to the bone.
I added custom_shape_hide, requested by animator. because they uses it (uniform custom_shape_scale = 0.0) with driver for rig. and in some addons also. I removed custom_shape_hide in currently patch. Comment Actions I tested the patch with a Sprite Fright character and it seems to work fine! 👍 I wonder if the precision when sliding the Translation values can be made more precise. Currently the increment is quite large on a human sized character, even when holding Shift. This is also another reason I was advocating for a tool/gizmo for this. ;) Comment Actions It seems like this hasn't been addressed yet. So that line needs to be updated to take into account the changes to the macro. Also as Sybren pointed out, the macro no longer returns the the final custom bone size/scale. However instead of a comment I was thinking that perhaps we could rename the macro. What do you guys think about PCHAN_CUSTOM_BONE_LENGTH ? Comment Actions 👍 This would still need a comment that it doesn't take custom bone scaling into account, though, as it otherwise would be ambiguous whether it's the pre-scale or post-scale length. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||