Fix T68788: Particle Edit Mode Hair vertex doesn't follow vertex theme

color

Selection and grooming only ever happens on hair keys (vertices), so
makes sense to use that theme color.

Sidenote: `CacheEditrPathsIterData` and `PTCacheEdit` have `sel_col` and
`nosel_col`, these can go, will do in a separate commit.

Maniphest Tasks: T68788

Differential Revision: https://developer.blender.org/D6725
This commit is contained in:
Philipp Oeser
2020-01-31 13:02:20 +01:00
parent 5527cd4ba0
commit 80cecee5b7
4 changed files with 6 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ void main()
vec3 world_pos = point_object_to_world(pos);
gl_Position = point_world_to_ndc(world_pos);
finalColor = mix(colorWire, colorEdgeSelect, color);
finalColor = mix(colorWire, colorVertexSelect, color);
gl_PointSize = sizeVertex * 2.0;

View File

@@ -33,7 +33,7 @@ void main()
finalColor = vec4(weight_to_rgb(color), 1.0);
}
else {
finalColor = mix(colorWire, colorEdgeSelect, color);
finalColor = mix(colorWire, colorVertexSelect, color);
}
#ifdef USE_WORLD_CLIP_PLANES

View File

@@ -5190,7 +5190,8 @@ void PE_create_particle_edit(
/* Causes assert on startup. */
#if 0
UI_GetThemeColor3ubv(TH_EDGE_SELECT, edit->sel_col);
/* These are unused and can be removed. */
UI_GetThemeColor3ubv(TH_VERTEX_SELECT, edit->sel_col);
UI_GetThemeColor3ubv(TH_WIRE, edit->nosel_col);
#else
memset(edit->sel_col, 0xff, sizeof(edit->sel_col));

View File

@@ -1037,7 +1037,8 @@ static void copy_particle_edit(Depsgraph *depsgraph,
}
update_world_cos(ob, edit);
UI_GetThemeColor3ubv(TH_EDGE_SELECT, edit->sel_col);
/* These are unused and can be removed. */
UI_GetThemeColor3ubv(TH_VERTEX_SELECT, edit->sel_col);
UI_GetThemeColor3ubv(TH_WIRE, edit->nosel_col);
recalc_lengths(edit);