Page MenuHome

Incorrect snapping of focus object in camera view
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.67

Blender Version
Broken: version: 2.80 (sub 60), branch: blender2.7, commit date: 2019-05-07 19:17, hash: rB3dc9da3a74ee
Worked: (optional)

Short description of error
All snap settings except "increment" don't work when trying to snap a camera's focus target, while in camera view.

Exact steps for others to reproduce the error

  1. Open attached blend file
  2. Select "Empty" object
  3. Press G and hold "Ctrl" to try snapping the Empty to the Cube's faces

No matter what snap option is selected, snapping works as if "increment" was selected. This only happens in camera view for the object used as that camera's focus target.

Event Timeline

Yeah, i can reproduce the issue

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.
Germano Cavalcante (mano-wii) lowered the priority of this task from Confirmed, Medium to Confirmed, Low.

@Germano Cavalcante (mano-wii), if you are re-assigning tasks, please mention what exactly you expect new assignee to do.
You have a patch, and i gave all feedback i could there. It might not be ideal, but it is not up to me to decide whether it's go or no-go. This is up to module owners, which is either you or Campbell.

I understand, sorry I didn't explain or asked first.

The problem here is that all objects passed in DEG_foreach_dependent_ID(...) are tagged as LIB_TAG_DOIT which for the operator this indicates that they are being transformed too.

On blender.chat you have recommended implementing a DEG_foreach_ancestor_ID_component(...), where we could additionally pass an eDepsObjectComponentType component.

I looked at the code and at first glance it didn't seem so simple to implement.

I'll see what I can do.

@Germano Cavalcante (mano-wii), ok now i see. I can do the tweaks to DEG_foreach_dependent_ID and introduce new queries.

Shall i ignore D4842 then?

@Germano Cavalcante (mano-wii), ok now i see. I can do the tweaks to DEG_foreach_dependent_ID and introduce new queries.
Shall i ignore D4842 then?

You can just show the patch with the new function. (and I'll do the rest if you prefer).
I wonder if dependencies like those in modifiers will still be considered.

@Germano Cavalcante (mano-wii), see D5184.
And you shouldn't worry about modifiers. All you care about here is "who's transform depends on a transform of FOO". The rest is up to dependency graph traversal to take care of.