Page MenuHome

Fix T65670: Transform UI cleanup

Authored by Demeter Dzadik (Mets) on Aug 10 2019, 4:04 AM.



This patch tries to make the Transforms section of the properties panel consistent with the Transforms section of the N panel, and to expose some currently hidden BBone properties in the Bendy Bone section.

  1. Object transformations were not consistent with Pose Bone transformations in that they did not use single-column layout.
  1. Even in Pose Bone transformations, the rotation mode option was after Scale.
  1. Edit Bone Transforms panel included "Tail Radius" and "Envelope Deform Distance", neither of which belong there. See T65670.
  1. Expose bbone_x and bbone_z in the UI. I can understand why these values were not exposed before, since they are purely visual and might confuse users. I don't have any strong feelings about this change, so I don't mind leaving it out. Maybe it could be labelled as "Display Size" or "Display Scale"? Would that clearly communicate that this scale will not have an effect on how the bone deforms meshes?

Apologies if these are too unrelated and should have been separate patches.

Diff Detail

rB Blender
arcpatch-D5454 (branched from master)
Build Status
Buildable 4392
Build 4392: arc lint + arc unit

Event Timeline

Demeter Dzadik (Mets) edited the summary of this revision. (Show Details)Aug 10 2019, 4:08 AM
Demeter Dzadik (Mets) edited the summary of this revision. (Show Details)Aug 10 2019, 4:17 AM

Nice. The flow layout isn’t so nice here, esp because it flows to two columns first.

Another thing in these panels we should fix, is that the locks are displayed in different ways. For the bone transform panel, we should match the object panel.

The patch should make the locks consistent too, I forgot to mention it. I copied the code from the bone transform UI into the object transform UI, so that should include the way the locks look.

Here is a screenshot of both the Object and Pose Transform tabs before/after the patch.

Maybe the code for drawing the Transforms options should be de-duplicated? I'm still learning when it comes to Blender's code philosophy, but the only challenge for de-duplicating this would be (at least I think), deciding where do we put the function.
Neither or have such helper functions, so if I put it in either of those, it would stick out like a sore thumb. It also doesn't belong to either more than the other.
Maybe we should make a new file for storing functions that help de-duplicate UI code. But I wouldn't know if there's enough of a reason to do that since I'm not that familiar with the UI code. But there's an idea I guess.

From your video and images, this appears not to be the case.

Both object and bone transform panels should expose the lock toggles like so:

Demeter Dzadik (Mets) planned changes to this revision.Aug 10 2019, 12:44 PM

Oh yeah, I see what you mean, there's no need for two animation dots, I don't know why I didn't realize that, it's painfully obvious! Good thing God invented code review. Will try to fix now!

Demeter Dzadik (Mets) updated this revision to Diff 17014.EditedAug 10 2019, 1:30 PM

Based on William's feedback, instead of copying the pose bone UI to the object UI, I just made the old object Transform UI single column and then copied that to the pose bone Transform UI.

Also changed the label for bbone_x and bbone_z from "Scale" to "Display Size".

I understand why you want to move the Rotation Mode next to the rotation controls. However, it also does make reading the Location/Rotation/Scale values less nice with the enum there in the middle.

At the very least we shouldn't need to call it Rotation Mode, given that it's under the Rotation leader text.

Another option for the rotation mode, is to add it to the Transform panel header:

This puts it more out of the way, and still better communicates that it controls the contents.

I agree under the current layout it could just say "Mode" instead of "Rotation Mode".

I think having it in the header implies to an unknowledgable user that the enum does something to all transforms, not just rotation. The order of these things is the same in the N panel and I think it's fine. As for readability, I think you're usually interested in only location or rotation or scale, as opposed to all three at the same time, so it's okay to have this slight break of flow in between them.

guys please take a look at this idea
"mprove compression and expansion of the attribute editor"

While I like the improvements in that post, it's out of the scope of this patch, or my coding skill level.

While I like the improvements in that post, it's out of the scope of this patch, or my coding skill level.

ok, Deme, .. sorry but I had to try ^^

Changed "Rotation Mode" labels to just "Mode".

Looks fine, minus the limit adjustment.


These should be left out, large ranges are causing issues - T68130

This revision is now accepted and ready to land.Aug 12 2019, 2:29 PM

Put the scale limits back to 0-1000.

Demeter Dzadik (Mets) marked an inline comment as done.Aug 12 2019, 9:43 PM