Page MenuHome

Transform: Move with base point
Changes PlannedPublic

Authored by Germano Cavalcante (mano-wii) on Tue, Mar 3, 4:44 AM.
Tags
None
Tokens
"Love" token, awarded by temeddix."100" token, awarded by Frozen_Death_Knight."Love" token, awarded by jc4d."Love" token, awarded by wilBr."Y So Serious" token, awarded by shader."Love" token, awarded by Qwerky."Love" token, awarded by ReinhardK."Love" token, awarded by yebyte."Love" token, awarded by ugosantana."Love" token, awarded by Leul."Burninate" token, awarded by amonpaike."Love" token, awarded by lcs_cavalheiro."Love" token, awarded by symstract."Love" token, awarded by Schiette."Love" token, awarded by duarteframos."Like" token, awarded by kynu."Like" token, awarded by campbellbarton."Yellow Medal" token, awarded by franMarz.

Details

Summary

The idea is to create a new snap gizmo and use it in the Move tool.
To test, select the Move tool, enable Snap to vertices, edges and faces and move the object.
build

Ref T66424

Diff Detail

Repository
rB Blender
Branch
ruler-and-base-point (branched from master)
Build Status
Buildable 6940
Build 6940: arc lint + arc unit

Event Timeline

  • Clenaup deduplicate code

Minor updates

  • Remove view3d and region from the snap gizmo (access these directly from the context).
  • Pass in const colors.
  • Use 'uchar' instead of 'unsigned char'.
Campbell Barton (campbellbarton) requested changes to this revision.EditedTue, Mar 3, 8:45 AM

The technical side looks good, notices some input priority issues though.

  • The snap gizmo prevents the transform axis arrows from being clicked on, especially on high poly meshes.
  • The snap gizmo overrides tool keymaps, maybe this is OK if we view the base point snap as a kind of tool which is normally left off, however I think users may want them to co-exist.
  • Getting warnings: RNA_enum_set: GIZMO_GT_snap_3d.active_type not found. in the terminal.

Also, the gizmo remains during view-port operations such as zoom, orbit (note that this isn't only an issue with this gizmo, it's just more noticeable with this gizmo than others). Best not try to solve it as part of this patch, unless the check is simple - eg: hide while rv3d->rflag & RV3D_NAVIGATING.

I'd like to see this gizmo used in one other area the "Measure Tool" seems like a good candidate (so you can start the ruler off snapping).


On the usability side this is a reasonably big change in it's current form. It would be good to get some user testing, at a minimum it shouldn't override the transform gizmos since that seems like a bug.

This revision now requires changes to proceed.Tue, Mar 3, 8:45 AM
  • Fix snap gizmo preventing the transform axis arrows from being clicked on
  • Fix RNA warning
  • Don't draw snap point while RV3D_NAVIGATING
  • Don't test selection if the mval has not changed
  • The snap gizmo overrides tool keymaps, maybe this is OK if we view the base point snap as a kind of tool which is normally left off, however I think users may want them to co-exist.

The Gizmo is only activated if it has an operator attached to it.

return (snap_elem && gz->op_data_len) ? 0 : -1;

We can also choose the elements that activate gizmo with the property "active_on".

I'd like to see this gizmo used in one other area the "Measure Tool" seems like a good candidate (so you can start the ruler off snapping).

In progress...

On the usability side this is a reasonably big change in it's current form. It would be good to get some user testing, ...

A build with this patch is available here:
https://blender.community/c/graphicall/Skbbbc/

! In D7000#166727, @Germano Cavalcante (mano-wii) wrote:
A build with this patch is available here:
https://blender.community/c/graphicall/Skbbbc/

This is absolutely fantastic, and working quite well from my admittedly limited testing. It just made my day/month/year.

One thing I noticed is that it seems to be gizmo visibility dependent.
If you disable visibility from the Gizmos popover in the 3D View header, it stops working regardless of the move tool being active.

Not sure if it is possible to keep it working independently from visibility (reason being some times the gizmos get in the way and you can't snap to where you would desire)

It also seems to keep working if you enforce Move gizmo visibility from the popover, despite other tool being currently active.

Anyway fantastic work, this is my very last gripe with Blender usability. Thanks for all your work in this area of Blender.

Love it. I did experience frequent crashes when undoing (ctrl+z) after using this new feature.

  • Return the Normal and context of Gizmo Snap
  • Implement the new Snap Gizmo in the Ruler Tool

Love it. I did experience frequent crashes when undoing (ctrl+z) after using this new feature.

Thanks for identifying the crash, I was able to reproduce it!
For some reason the depsgraph of the snap context becomes invalid.

Great that you were able to reproduce it. I also got periodic crashes when switching from edit to object mode using tab. Any chance this is related to the same dependency graph issue?

Very curious to test out the changes to the ruler. Any chance you can share a build? I haven't set up my machine to build Blender yet (planning on doing so shortly though).

Tested it, and it's pretty cool. Didn't saw any issue, and tested on some awful cad geometry. Reminds of the lock selection/snap approach of 3dsmax, but without needing to lock.
Great work @Germano Cavalcante (mano-wii)

Dalai Felinto (dfelinto) requested changes to this revision.Wed, Mar 4, 12:01 PM

Please update the patch with what can be the final commit message. Right now there are no instructions on how to test this, and I couldn't find a way to get this to work.

This revision now requires changes to proceed.Wed, Mar 4, 12:01 PM

Also, I find really strange that the snap gizmo becomes the sole way of using the tool, when the user wants to snap. I would personally rather a solution that integrates with the tools (and non-tools). Like originally proposed on T66484.

Unless you are planning to ditch T66484 altogether.

Tested it .. it really makes me happy this exists, very nice and it really works, but assuming there will be a Rotate with base point tool too, the operations needed (Choosing a base point and an axis to rotate on) will not be as smooth, plus its not fast to choose the move tool with a mouse for every move you do if your whole workflow is that, so i hope there will be an additional dedicated overlapping tool to choose from like the "Scale and Scale Cage" tools are, but unlike the current "Scale and Scale Cage" tools if a person chooses the "Base move" or "Base Rotate" the default blender behavior should change when hitting "G or R" key, instead of moving the object it should wait for a base point to be chosen, but thanks again

and P.S i hope you will update GraphicAll with the current Undo Patch, i would like to work on this from here on and not go back :)

(also, this patch ignores Ctrl as a toggle for snapping completely)

  • applied D7013: Fix crash with Undo

and P.S i hope you will update GraphicAll with the current Undo Patch, i would like to work on this from here on and not go back :)

Done

Tested the new build. So far no crashes!

I like how the measure tool works now, much more usable than before (FYI: I'm an architect, so I might be biased here :) ).

Dalai has a point that it's inconsistent with the previous measure behavior (CTRL to enable snap), but the CTRL behavior always seemed inconsistent me to be honest. Wouldn't it be more consistent if you would just turn on/off snapping using the default snap toggle (shift tab)?

It does seem the measure tool is also ignoring the shift/tab for now, but that might be a bug? I don't really care as I would never measure without snapping, but perhaps it would be better for consistency if it did in fact react to the global snapping toggle?

Yap .. The measure Tool really feels like this is how it should have always been .. really awesome.. nd No crashes.. i really have tried to crash it, it doesn't .. issue i found is

  • the snapping doesn't work on Grease Pencil Objects and Text Object, and the other one is
  • the Gizmo not showing when snapping to Camera, Lights and in Edit mood on a Vertex.. It works when you just click on it.. but its not showing.. like its hiding behind the Transform Gizmo

I've noticed the snapping circle appears for a split second after doing the snap on the place the snapping point started.

Germano Cavalcante (mano-wii) planned changes to this revision.EditedMon, Mar 16, 2:13 PM

To be revisited after D7071