Ejemplo n.º 1
0
        public virtual void DrawGizmos(VisualEffect component)
        {
            m_GizmoableAnchors.Clear();
            foreach (VFXDataAnchorController controller in inputPorts)
            {
                if (controller.model != null && controller.model.IsMasterSlot() && VFXGizmoUtility.HasGizmo(controller.portType))
                {
                    m_GizmoableAnchors.Add(controller);
                }
            }

            if (!m_GizmoableAnchors.Contains(m_GizmoedAnchor))
            {
                m_GizmoedAnchor = null;
            }

            if (m_GizmoedAnchor == null)
            {
                m_GizmoedAnchor = m_GizmoableAnchors.FirstOrDefault();
            }

            if (m_GizmoedAnchor != null)
            {
                ((VFXDataAnchorController)m_GizmoedAnchor).DrawGizmo(component);
            }
        }
Ejemplo n.º 2
0
 public Bounds GetGizmoBounds(VisualEffect component)
 {
     if (m_Context == null)
     {
         m_Context = new ParameterGizmoContext(this);
     }
     return(VFXGizmoUtility.GetGizmoBounds(m_Context, component));
 }
Ejemplo n.º 3
0
 public void DrawGizmos(VisualEffect component)
 {
     if (m_Context == null)
     {
         m_Context = new ParameterGizmoContext(this);
     }
     VFXGizmoUtility.Draw(m_Context, component);
 }
Ejemplo n.º 4
0
 public void DrawGizmo(VisualEffect component)
 {
     if (VFXGizmoUtility.HasGizmo(portType))
     {
         CreateGizmoContextIfNeeded();
         VFXGizmoUtility.Draw(m_GizmoContext, component);
     }
 }
Ejemplo n.º 5
0
        public Bounds GetGizmoBounds(VisualEffect component)
        {
            if (m_GizmoContext != null)
            {
                return(VFXGizmoUtility.GetGizmoBounds(m_GizmoContext, component));
            }

            return(new Bounds());
        }
        public override void DrawGizmos(VisualEffect component)
        {
            if (VFXGizmoUtility.HasGizmo(m_ParentController.portType))
            {
                m_ParentController.DrawGizmos(component);

                m_GizmoableAnchors.Add(m_ParentController);
            }
        }
Ejemplo n.º 7
0
 public void DrawGizmo(VisualEffect component)
 {
     if (VFXGizmoUtility.HasGizmo(portType))
     {
         if (m_GizmoContext == null)
         {
             m_GizmoContext = new VFXDataAnchorGizmoContext(this);
         }
         VFXGizmoUtility.Draw(m_GizmoContext, component);
     }
 }
Ejemplo n.º 8
0
        public VFXParameterController(VFXParameter model, VFXViewController viewController) : base(viewController, model)
        {
            m_Slot = model.outputSlots[0];
            viewController.RegisterNotification(m_Slot, OnSlotChanged);

            exposedName = MakeNameUnique(exposedName);

            if (VFXGizmoUtility.HasGizmo(model.type))
            {
                m_Gizmoables = new IGizmoable[] { this }
            }
            ;
            else
            {
                m_Gizmoables = new IGizmoable[] {}
            };
        }

        string IGizmoable.name
        {
            get { return(exposedName); }
        }