/// /// BlendShape List のElement描画 /// public static bool DrawBlendShapeBinding(Rect position, SerializedProperty property, PreviewSceneManager scene) { bool changed = false; if (scene != null) { var height = 16; var y = position.y; var rect = new Rect(position.x, y, position.width, height); int pathIndex; if (StringPopup(rect, property.FindPropertyRelative("RelativePath"), scene.SkinnedMeshRendererPathList, out pathIndex)) { changed = true; } y += height; rect = new Rect(position.x, y, position.width, height); int blendShapeIndex; if (IntPopup(rect, property.FindPropertyRelative("Index"), scene.GetBlendShapeNames(pathIndex), out blendShapeIndex)) { changed = true; } y += height; rect = new Rect(position.x, y, position.width, height); if (FloatSlider(rect, property.FindPropertyRelative("Weight"), 100)) { changed = true; } } return(changed); }
/// /// MorphTarget List のElement描画 /// static bool DrawMorphTargetBinding(Rect position, SerializedProperty property, PreviewSceneManager scene, int height) { bool changed = false; if (scene != null) { var y = position.y; var rect = new Rect(position.x, y, position.width, height); int pathIndex; if (ExpressionEditorHelper.StringPopup(rect, property.FindPropertyRelative(nameof(MorphTargetBinding.RelativePath)), scene.SkinnedMeshRendererPathList, out pathIndex)) { changed = true; } y += height; rect = new Rect(position.x, y, position.width, height); int morphTargetIndex; if (ExpressionEditorHelper.IntPopup(rect, property.FindPropertyRelative(nameof(MorphTargetBinding.Index)), scene.GetBlendShapeNames(pathIndex), out morphTargetIndex)) { changed = true; } y += height; rect = new Rect(position.x, y, position.width, height); if (ExpressionEditorHelper.FloatSlider(rect, property.FindPropertyRelative(nameof(MorphTargetBinding.Weight)), 100)) { changed = true; } } return(changed); }