Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties Editor - Camera - Depth of Field Eyedropper update from Blender #4257

Open
Draise14 opened this issue May 15, 2024 · 0 comments
Open
Labels
0 - task A normal development task

Comments

@Draise14
Copy link
Collaborator

Draise14 commented May 15, 2024

Blender

image

Blender finally added the camera eye dropper, a bit more elegant than our one, but we probably should update.

Here is the code in properties_data_camera.py

        row.operator(
            "ui.eyedropper_depth",
            icon='EYEDROPPER',
            text="").prop_data_path = "scene.camera.data.dof.focus_distance"
Details

SHA-1: e8d028b

  • Fix #121338: Depthdropper ensure viewport camera

Depthdropper should ensure that the viewport is in camera view to use
active camera position, otherwise it should still use rv3d->viewinv[3]
to ensure correct distance result.

Pull Request: https://projects.blender.org/blender/blender/pulls/121339

More Details

UI: Add eyedropper button to camera focus distance

Blender already had the ability to sample the depth with an eyedropper
and fill the focus distance (see "ui.eyedropper_depth"). But this feature
was fairly hidden. You had to hover over the focal_distance property
in the camera data panel and then press E (then sample a distance
in the 3D viewport).

This patch adds a prop_data_path property to the ui.eyedropper_depth
operator to allow specifying the property that should be filled with the
depth value.

The idea for this is taken from wm.radial_control, which also uses this
approach to write to a property. This allows us to add the eyedropper
as a button.

Pull Request: #121486

@Draise14 Draise14 added the 0 - task A normal development task label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - task A normal development task
Projects
None yet
Development

No branches or pull requests

1 participant