- Joined
- Feb 2, 2012
- Messages
- 1,667
- Reaction score
- 104
- Points
- 78
Hi guys,
you can see i'm developing in this days from the questions I keep asking here :lol:
Correct me if I'm wrong: you can not change the material index of a group in a mesh at runtime, right?
WHAT I AM TRYING TO DO:
highlight a meshgroup, pretty much similar to what the D3D9 debug mesh controls does. But I want multiple groups selection.
I already implemented an HighlightMesh function which highlights the entire mesh very well, but for single groups the story is a bit different.
I tried to use the same method (change the emissive set of the material) but when multiple groups share the same material also the groups that are not selected are highlighted.
So I thought of adding a material at the bottom of the list and then point the highlighted group to that, and I was in the middle of that when I realized that the GROUPEDITSPEC does not have any flag about materials... I can get the material index from the GROUPREQUESTSPEC but I cannot change it, and this is probably a show stopper for this option because I see no other way to do it.
Can anyone confirm this or point me on another path to get it?
As always thanks to anyone who will reply!
Fred
EDIT: Also I was thinking that if this is not possible I don't understand the point of the oapiAddMaterial function. if then I can set nothing to use it why should I add a material to a mesh?
you can see i'm developing in this days from the questions I keep asking here :lol:
Correct me if I'm wrong: you can not change the material index of a group in a mesh at runtime, right?
WHAT I AM TRYING TO DO:
highlight a meshgroup, pretty much similar to what the D3D9 debug mesh controls does. But I want multiple groups selection.
I already implemented an HighlightMesh function which highlights the entire mesh very well, but for single groups the story is a bit different.
I tried to use the same method (change the emissive set of the material) but when multiple groups share the same material also the groups that are not selected are highlighted.
So I thought of adding a material at the bottom of the list and then point the highlighted group to that, and I was in the middle of that when I realized that the GROUPEDITSPEC does not have any flag about materials... I can get the material index from the GROUPREQUESTSPEC but I cannot change it, and this is probably a show stopper for this option because I see no other way to do it.
Can anyone confirm this or point me on another path to get it?
As always thanks to anyone who will reply!
Fred
EDIT: Also I was thinking that if this is not possible I don't understand the point of the oapiAddMaterial function. if then I can set nothing to use it why should I add a material to a mesh?
Last edited: