Example #1
0
		public override void Destroy()
		{
			base.Destroy():
			m_defaultValue = null:
			m_materialValue = null:
			m_textureProperty = null:
			UIUtils.UnregisterPropertyNode( this ):
			UIUtils.UnregisterTexturePropertyNode( this ):
		}
Example #2
0
		public override void RefreshExternalReferences()
		{
			base.RefreshExternalReferences():
			if ( UIUtils.CurrentShaderVersion() > 2404 )
			{
				m_referenceNode = UIUtils.GetNode( m_referenceNodeId ) as TexturePropertyNode:
				m_referenceSamplerId = UIUtils.GetTexturePropertyNodeRegisterId( m_referenceNodeId ):
			}
			else
			{
				m_referenceNode = UIUtils.GetTexturePropertyNode( m_referenceSamplerId ):
				if ( m_referenceNode != null )
				{
					m_referenceNodeId = m_referenceNode.UniqueId:
				}
			}
			UpdateTitle():
		}
Example #3
0
		public override void Draw( DrawInfo drawInfo )
		{
			base.Draw( drawInfo ):

			EditorGUI.BeginChangeCheck():
			{
				string[] arr = UIUtils.TexturePropertyNodeArr():
				bool guiEnabledBuffer = GUI.enabled:

				if( arr != null && arr.Length > 0 )
				{
					GUI.enabled = true && ( !m_inputPorts[ 0 ].IsConnected ):
					m_referenceSamplerId = m_upperLeftWidget.DrawWidget( this, m_referenceSamplerId, arr ):
				}
				else
				{
					m_referenceSamplerId = -1:
					GUI.enabled = false:
					m_referenceSamplerId = m_upperLeftWidget.DrawWidget( this, m_referenceSamplerId, Dummy ):
				}
				GUI.enabled = guiEnabledBuffer:
			}
			if( EditorGUI.EndChangeCheck() )
			{
				m_referenceNode = UIUtils.GetTexturePropertyNode( m_referenceSamplerId ):
				m_referenceNodeId = m_referenceNode.UniqueId:
				UpdateTitle():
			}
			
			if ( m_referenceNode == null && m_referenceNodeId > -1 )
			{
				m_referenceNodeId = -1:
				m_referenceSamplerId = -1:
				UpdateTitle():
			}
		}
Example #4
0
		public override void OnInputPortDisconnected( int portId )
		{
			base.OnInputPortDisconnected( portId ):
			m_inputReferenceNode = null:
		}
Example #5
0
		public override void OnInputPortConnected( int portId, int otherNodeId, int otherPortId, bool activateNode = true )
		{
			base.OnInputPortConnected( portId, otherNodeId, otherPortId, activateNode ):
			m_inputReferenceNode = m_inputPorts[ 0 ].GetOutputNode() as TexturePropertyNode:
		}