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

qgsabstractmaterialsettings: Handle selection in addParametersToEffect #57803

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

ptitjano
Copy link
Collaborator

Description

From the main commit:

`addParametersToEffect()` method is used to set the material color
parameters if the material has been created without calling
`toMaterial()`. In pratice, this is only used by `QgsPoint3DSymbol`
for the Phong material.

This method does not handle the selection state of an entity. This
means that the color parameters of the material need to be changed
after `addParametersToEffect()` has been called. This is error prone.

This issue is fixed by adding a `QgsMaterialContext` to this
method. It allows to directly set the correct color parameters
according to the selection context.

cc @benoitdm-oslandia

ptitjano added 3 commits June 19, 2024 20:07
`addParametersToEffect()` method is used to set the material color
parameters if the material has been created without calling
`toMaterial()`. In pratice, this is only used by `QgsPoint3DSymbol`
for the Phong material.

This method does not handle the selection state of an entity. This
means that the color parameters of the material need to be changed
after `addParametersToEffect()` has been called. This is error prone.

This issue is fixed by adding a `QgsMaterialContext` to this
method. It allows to directly set the correct color parameters
according to the selection context.
@github-actions github-actions bot added this to the 3.38.0 milestone Jun 19, 2024
Copy link

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 445c841)

@nyalldawson nyalldawson merged commit 684a802 into qgis:master Jun 19, 2024
31 checks passed
@ptitjano ptitjano deleted the mat3d-addparameterstoeffect branch June 19, 2024 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants