Skip to content

[visual] VisualModelImpl: add resetMaterial variable#6057

Open
EulalieCoevoet wants to merge 1 commit intosofa-framework:masterfrom
EulalieCoevoet:pr_visualmodelresetmaterial
Open

[visual] VisualModelImpl: add resetMaterial variable#6057
EulalieCoevoet wants to merge 1 commit intosofa-framework:masterfrom
EulalieCoevoet:pr_visualmodelresetmaterial

Conversation

@EulalieCoevoet
Copy link
Copy Markdown
Contributor

@EulalieCoevoet EulalieCoevoet commented Mar 27, 2026

Store the material in a new variable resetMaterial.
This allows to highlight the objects of the selected node.

2026-03-27_16-42-43.mp4

By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@hugtalbot hugtalbot added pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request labels Mar 28, 2026
Copy link
Copy Markdown
Contributor

@hugtalbot hugtalbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No use in SOFA, but it's the purpose of the PR : anticipating the future need in the GUI

Copy link
Copy Markdown
Contributor

@hugtalbot hugtalbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EulalieCoevoet the variable chould be renamed since it is hard to me to understand the meaning of "reset" (I suggested a new name)

Would you mind also:

  • set the member variable as protected
  • and add a getter

d_scale.setValue(Vec3Real(1, 1, 1));
}

m_resetMaterial = d_material.getValue();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_resetMaterial = d_material.getValue();
m_savedMaterial = d_material.getValue();

sofa::type::Vec3f bbox[2];

Data< sofa::type::Material > d_material;
sofa::type::Material m_resetMaterial;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sofa::type::Material m_resetMaterial;
sofa::type::Material m_savedMaterial; //> Store the material information, useful to highlight the objects of the selected node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants