internal void RenderAddBlendshape(EePreviewAvatar?dummy, EeEditableBlendshape editableBlendshape, AnimationClip currentClip, int cameraIndex)
        {
            if (!dummy.HasValue)
            {
                return;
            }

            _renderingCommands.GenerateSpecificFastMode(
                new List <EeRenderingSample> {
                new EeRenderingSample(
                    CreateAnimationClipForBinding(currentClip, editableBlendshape.Binding),
                    BufferTexture2D(),
                    preview =>
                {
                    EnsureBasedInitialized();
                    EeRenderingSupport.MutateMultilevelHighlightDifferences(editableBlendshape.BoundaryTexture, preview.RenderTexture, BasedTexture(editableBlendshape.Property));
                    EeAnimationEditorWindow.Obtain().Repaint();
                }
                    )
            },
                dummy.Value,
                cameraIndex
                );
            RenderMain(dummy.Value);
        }
        private void RenderEditables(EePreviewAvatar dummy)
        {
            if (_state.EditableBlendshapes.Count == 0)
            {
                return;
            }
            if (_state.Maintain && _state.ScenePreviewMode == EeAnimationEditorScenePreviewMode.Never)
            {
                return;
            }

            _renderingCommands.GenerateSpecificFastMode(
                _state.EditableBlendshapes.Select(current =>
                                                  new EeRenderingSample(
                                                      CreateAnimationClipForBinding(_state.CurrentClip, current.Binding),
                                                      BufferTexture2D(),
                                                      preview =>
            {
                EnsureBasedInitialized();
                EeRenderingSupport.MutateMultilevelHighlightDifferences(current.BoundaryTexture, preview.RenderTexture, BasedTexture(current.Property));
                EeAnimationEditorWindow.Obtain().Repaint();
            }
                                                      )).ToList(),
                dummy,
                _state.CameraIndex
                );
        }
        internal void Throttle(EePreviewAvatar?dummy, EeEditableBlendshape info, AnimationClip currentClip, int cameraIndex, bool stateMaintain, EeAnimationEditorScenePreviewMode stateScenePreviewMode)
        {
            if (!dummy.HasValue)
            {
                return;
            }

            _throttleFinishedAction = () =>
            {
                RenderMain(dummy.Value);
                _renderingCommands.GenerateSpecificFastMode(
                    new List <EeRenderingSample>
                {
                    new EeRenderingSample(
                        CreateAnimationClipForBinding(currentClip, info.Binding),
                        BufferTexture2D(),
                        preview =>
                    {
                        EnsureBasedInitialized();
                        EeRenderingSupport.MutateMultilevelHighlightDifferences(info.BoundaryTexture, preview.RenderTexture, BasedTexture(info.Property));
                        EeAnimationEditorWindow.Obtain().Repaint();
                    }
                        )
                },
                    dummy.Value,
                    cameraIndex
                    );
            };

            if (stateMaintain && stateScenePreviewMode != EeAnimationEditorScenePreviewMode.Always)
            {
                Maintain(dummy.Value);
            }
            else if (!_isCalling)
            {
                EditorApplication.delayCall += () =>
                {
                    _isCalling = false;
                    _throttleFinishedAction();
                };
                _isCalling = true;
            }
        }
 private Action RenderBlendshapes(EePreviewAvatar dummy, Func <EeExplorerBlendshape, bool> predicate)
 {
     return(_renderingCommands.GenerateSpecificFastMode(
                _state.ExplorerBlendshapes.Where(predicate).Select(info => new EeRenderingSample(
                                                                       CreateBlendShapeClipForBinding(info.Binding),
                                                                       BufferTexture2D(),
                                                                       preview =>
     {
         EnsureBasedInitialized();
         EeRenderingSupport.MutateHighlightHotspots(info.HotspotTexture, preview.RenderTexture, BasedTexture(info.Property));
         EeRenderingSupport.MutateMultilevelHighlightDifferences(info.BoundaryTexture, preview.RenderTexture, BasedTexture(info.Property));
         EePropertyExplorerWindow.Obtain().Repaint();
     }
                                                                       )).ToList(),
                dummy,
                _state.CameraIndex,
                EeRenderingCommands.EeDummyAutoHide.Default,
                EeRenderingCommands.EePriority.Low
                ));
 }