Ejemplo n.º 1
0
        protected override IEnumerator ExecuteStep()
        {
            SelectedBounds = new List <BoundingBox>();

            foreach (var bound in Expression.ResolveExpression(ChainView.Instance.Chain.RootBoundingBoxes))
            {
                var foundSelectable = bound.GetComponent <MetaSelectionSet>();

                if (foundSelectable == null)
                {
                    continue;
                }

                var selectedList = Selection.SelectPayloads(foundSelectable.SelectablePayloads);

                SelectedBounds.AddRange(selectedList.ConvertAll(vp => vp.VisualData.Bound));

                var iterator = MetaSelectionMode.ApplySelectionOperation(MetaSelectionOperation,
                                                                         foundSelectable, selectedList);

                while (iterator.MoveNext())
                {
                    yield return(null);
                }
            }

            Router.FireEvent(EndEventName);
            yield return(null);
        }
Ejemplo n.º 2
0
        protected override IEnumerator ExecuteStep()
        {
            InternalBounds = new List <BoundingBox>();

            foreach (var metaSelectionSet in
                     TargetExpression.ResolveExpression(ChainView.Instance.Chain.RootBoundingBoxes))
            {
                var foundSelectable = metaSelectionSet.GetComponent <MetaSelectionSet>();

                if (foundSelectable == null)
                {
                    continue;
                }

                var selection = new MetaSelectionMode();
                selection.Selectable         = foundSelectable;
                selection.OperationToPerform = MetaSelectionOperation;

                var iterator = selection.ApplyMode(
                    MetaSelectionSet.GetLocalSelectables(BoundsToSelect.Bounds, foundSelectable)
                    );

                while (iterator.MoveNext())
                {
                    yield return(null);
                }
            }

            Router.FireEvent(EndEventName);
            yield return(null);
        }