Message 1 of 7

Not applicable
06-19-2017
08:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The function setColors allows to specify a colorset, the setFaceColors function does not have such an option.
I am currently using this code to color the faces:
MIntArray colorIds; MColorArray colors; double max_potential = potentials.max(); double min_potential = potentials.min(); for(uint i = 0; i < potentials.size(); i++) { float color = (potentials[i] - min_potential) / (max_potential - min_potential); colorIds.append(i); colors.append(MColor(color, 0, 0)); } meshFn.setFaceColors(colors, colorIds); MString potentialColorsName("potentialColors"); meshFn.assignColors(colorIds, &potentialColorsName);
The colorSet name in assignColors does not work, but the setFaceColors function does not even have an colorSet argument.
Should i use setColors and how do I determine there the face indices to set the colors there? In the end I want to have two colorSets for the same mesh, which can be selected in the color set editor to visualize different properties of my result mesh.
Solved! Go to Solution.