Esempio 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);
            }
        }
Esempio n. 2
0
 public void DrawGizmo(VisualEffect component)
 {
     if (VFXGizmoUtility.HasGizmo(portType))
     {
         CreateGizmoContextIfNeeded();
         VFXGizmoUtility.Draw(m_GizmoContext, component);
     }
 }
        public override void DrawGizmos(VisualEffect component)
        {
            if (VFXGizmoUtility.HasGizmo(m_ParentController.portType))
            {
                m_ParentController.DrawGizmos(component);

                m_GizmoableAnchors.Add(m_ParentController);
            }
        }
Esempio n. 4
0
 public void DrawGizmo(VisualEffect component)
 {
     if (VFXGizmoUtility.HasGizmo(portType))
     {
         if (m_GizmoContext == null)
         {
             m_GizmoContext = new VFXDataAnchorGizmoContext(this);
         }
         VFXGizmoUtility.Draw(m_GizmoContext, component);
     }
 }
Esempio n. 5
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); }
        }