Page MenuHome

Move "Camera Parent Lock" from preferences to 3D view
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Oct 16 2020, 7:42 PM.
Tokens
"Like" token, awarded by PrettyFireNOI7."Like" token, awarded by franMarz."Like" token, awarded by Tetone."Like" token, awarded by Blendify.

Details

Summary

"Camera Parent Lock" can be useful when rigging cameras, but it's not
intuitive, and has also generated a LOT of confusion. This is because
it breaks the fundamental parent <-> child relationship conventions in
Blender, and there is absolutely no indication that it's intended without
diving into the preferences.

I easily found 14 bug reports about this behavior on the tracker, which
probably means that thousands of people have been confused by this.

T27459: Flymode moves parent
T46107: Camera parented to amarature
T48821: Fly-through mode when in camera view moves 3D objects parented to the same object
T78607: Model rotates with view when parented to camera
T43055: Fly/walk view nav cause parent object to move with child camera
T31881: lock camera view problem
T28803: "Lock Camera to View" will drag everything inside the hierarchy that the camera belongs to.
T69048: Lock Camera to View is not working correctly when camera is child of an object
T48656: A parented camera in fly mode moves it's parent.
T75543: Рarented camera moves parent, in navigation mode (regression)
T76436: The camera moves the parent into camera view
T45790: Parented camera moves the parent object when manipulating camera with "Lock Camera to View" enabled
T78934: Lock Camera to View Also Moves the Parent
T78607: Model rotates with view when parented to camera

Even if we leave this preference on by default, there is now an indication
right next to the camera lock property, so any confused user can easily
find the "problem."

Before

After

Note that I adjusted the UI label from "Adjust Parent" to "Affect Parent"
after making this video.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Oct 16 2020, 7:42 PM
Hans Goudey (HooglyBoogly) created this revision.
Hans Goudey (HooglyBoogly) added inline comments.
release/scripts/startup/bl_ui/space_view3d.py
5433–5444 ↗(On Diff #30028)

I adjusted some of the other labels in this subpanel to avoid confusion. It looked like the "Affect Parent" label was inside the "Lock" column without this change. "Lock" should be implied by the panel's label anyway.

source/blender/blenloader/intern/versioning_290.c
866–867 ↗(On Diff #30028)

This versioning code is working properly, but it isn't showing up with the new values in the UI after, I haven't figured out why yet.

This revision is now accepted and ready to land.Oct 21 2020, 2:12 PM

Since this is intended for camera rigs, perhaps this should be a property of the object (in the Relations panel next to other parenting settings)? Then it's a rigging feature, similar to transform channel locking, where the rigger can indicate how the object is intended to be transformed.

Exposing in parenting panel would be useful.

It's showing an option I suspect is rarely used in a more prominent place, although I can't think of a better alternative.

  • If this is a more general rigging option, should it be made into an index so riggers can define the parent in the chain? Instead of only selecting between camera/root.
  • Would we show this for non-camera objects (suggest not, then only use this setting for camera type objects).

I'd try to keep it simple and have a checkbox for all types of objects. I imagine riggers will find other use cases besides cameras.

This patch already helps a lot, so I don't want to push a more complex solution too hard. It's up to you guys if you want to do it 3D view or object based.

It probably makes sense for this to be an object property-- why limit this to cameras? I worry that there may be a lot more places for this check then if it's to be supported more generally. Only because I don't know where they are at the moment and I don't want to miss any. It seems doable though.

Side question-- why is "Pass Index" in the "Relations" panel? Seems very weird.

Side question-- why is "Pass Index" in the "Relations" panel? Seems very weird.

No good reason. It didn't belong anywhere else and didn't seem worth creating a new panel for.

Perhaps the new Shading panel could be renamed to Rendering, and the pass index could be moved into that.

Campbell Barton (campbellbarton) requested changes to this revision.EditedOct 27 2020, 5:00 AM

I'd try to keep it simple and have a checkbox for all types of objects. I imagine riggers will find other use cases besides cameras.

This patch already helps a lot, so I don't want to push a more complex solution too hard. It's up to you guys if you want to do it 3D view or object based.

+1 for an object flag then, since it makes more sense for rigging.

This revision now requires changes to proceed.Oct 27 2020, 5:00 AM
  • Make "affect parent transform" an object property instead of view3d

This just moves the existing functionality to an object property. So it still only
works for camera movements when the camera has a parent. I assume the next step is
to tie this in with the transform system so that more interactions support this
"move parent instead" behavior. That will take a bit longer for me to do.

One change: OB_TRANSFORM_ADJUST_PARENT sounds like a generic transform flag, where this is a very spesific option.

Suggest OB_TRANSFORM_ADJUST_ROOT_PARENT_FOR_VIEW_LOCK.

This revision is now accepted and ready to land.Nov 4 2020, 4:41 AM