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

Closed
Draise14 opened this issue May 15, 2024 · 3 comments
Closed
Labels
8 - invalid Cannot reproduce. Or is no task to solve.

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
@ReinerBforartists
Copy link
Contributor

Once again it is not clear what you want to do here. The eyedropper with exactly this code already exists. Is this now a double, and long fixed? Or do you mean something different? What is the task here?

eyedropper

@Draise14
Copy link
Collaborator Author

Draise14 commented Jul 5, 2024

Ah, previously we had our own code to make this feature discoverable, atleast to show the tooltip. It must have been lost with a merge.

I'll close, looks like you can now use it without hotkey only operations.

@Draise14 Draise14 closed this as completed Jul 5, 2024
@Draise14 Draise14 added 8 - invalid Cannot reproduce. Or is no task to solve. and removed 0 - task A normal development task Needs more information labels Jul 5, 2024
@ReinerBforartists
Copy link
Contributor

Okay, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8 - invalid Cannot reproduce. Or is no task to solve.
Projects
None yet
Development

No branches or pull requests

2 participants