Skip to content

Commit 432dda5

Browse files
committed
fix 2 cases of not handling mixed values (multiple selections) correctly. untabify.
1 parent 7a1f1b2 commit 432dda5

File tree

2 files changed

+239
-236
lines changed

2 files changed

+239
-236
lines changed

Assets/HoloToolkit/Utilities/Shaders/FastConfigurable/Editor/CustomMaterialEditor.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@ MaterialProperty colorProp
4848
GUIContent tooltipOnly = new GUIContent();
4949
tooltipOnly.text = string.Empty;
5050
tooltipOnly.tooltip = label.tooltip;
51-
EditorGUI.BeginChangeCheck();
5251

52+
EditorGUI.showMixedValue = colorProp.hasMixedValue;
53+
EditorGUI.BeginChangeCheck();
5354
var color = EditorGUI.ColorField(controlRect, tooltipOnly, colorProp.colorValue);
54-
5555
if (EditorGUI.EndChangeCheck())
5656
{
5757
colorProp.colorValue = color;
5858
}
59+
EditorGUI.showMixedValue = false;
5960
}
6061

6162
return lineRect;
@@ -101,6 +102,7 @@ public static void TextureScaleOffsetVector4Property(MaterialEditor matEditor, G
101102
{
102103
matEditor.BeginAnimatedCheck(scaleOffsetProp);
103104

105+
EditorGUI.showMixedValue = scaleOffsetProp.hasMixedValue;
104106
EditorGUI.BeginChangeCheck();
105107

106108
Vector4 scaleOffsetVector = scaleOffsetProp.vectorValue;
@@ -115,6 +117,7 @@ public static void TextureScaleOffsetVector4Property(MaterialEditor matEditor, G
115117
{
116118
scaleOffsetProp.vectorValue = new Vector4(textureScale.x, textureScale.y, textureOffset.x, textureOffset.y);
117119
}
120+
EditorGUI.showMixedValue = false;
118121

119122
matEditor.EndAnimatedCheck();
120123
}

0 commit comments

Comments
 (0)