public override void Draw( DrawInfo drawInfo )
		{
			base.Draw( drawInfo ):
			if( m_containerGraph.CurrentCanvasMode != NodeAvailability.TemplateShader )
				return:

			if( m_interpolatorData == null || m_interpolatorData.Count == 0 )
			{
				MasterNode masterNode = m_containerGraph.CurrentMasterNode:
				FetchInterpolator( masterNode ):
			}

			if( m_fetchDataId )
			{
				m_fetchDataId = false:
				FetchDataId():
			}

			if( m_currentDataIdx > -1 )
			{
				EditorGUI.BeginChangeCheck():
				m_currentDataIdx = m_upperLeftWidgetHelper.DrawWidget( this, m_currentDataIdx, m_dataLabels ):
				if( EditorGUI.EndChangeCheck() )
				{
					UpdateFromId():
				}
			}
		}
        public override void Draw(DrawInfo drawInfo)
        {
            base.Draw(drawInfo);
            if (m_containerGraph.CurrentCanvasMode != NodeAvailability.TemplateShader)
            {
                return;
            }

            if (m_localVarsData == null || m_localVarsData.Count == 0)
            {
                MasterNode masterNode = m_containerGraph.CurrentMasterNode;
                if (masterNode.CurrentMasterNodeCategory == AvailableShaderTypes.Template)
                {
                    FetchLocalVarData(masterNode);
                }
            }

            if (m_fetchDataId)
            {
                m_fetchDataId = false;
                FetchDataId();
            }

            if (m_currentDataIdx > -1)
            {
                EditorGUI.BeginChangeCheck();
                m_currentDataIdx = m_upperLeftWidgetHelper.DrawWidget(this, m_currentDataIdx, m_dataLabels);
                if (EditorGUI.EndChangeCheck())
                {
                    UpdateFromId();
                }
            }
        }
示例#3
0
        public override void Draw(DrawInfo drawInfo)
        {
            base.Draw(drawInfo);

            if (!UIUtils.CurrentWindow.OutsideGraph.SamplingMacros && ContainerGraph.CurrentShaderFunction == null)
            {
                m_showErrorMessage = true;
            }
            else
            {
                m_showErrorMessage = false;
            }

            EditorGUI.BeginChangeCheck();
            {
                List <string> arr = new List <string>(UIUtils.TexturePropertyNodeArr());
                bool          guiEnabledBuffer = GUI.enabled;

                if (arr != null && arr.Count > 0)
                {
                    arr.Insert(0, "None");
                    GUI.enabled          = true && (!m_inputPorts[0].IsConnected);
                    m_referenceSamplerId = m_upperLeftWidget.DrawWidget(this, m_referenceSamplerId + 1, arr.ToArray()) - 1;
                }
                else
                {
                    m_referenceSamplerId = -1;
                    GUI.enabled          = false;
                    m_upperLeftWidget.DrawWidget(this, m_referenceSamplerId, Dummy);
                }
                GUI.enabled = guiEnabledBuffer;
            }
            if (EditorGUI.EndChangeCheck())
            {
                m_referenceNode = UIUtils.GetTexturePropertyNode(m_referenceSamplerId);
                if (m_referenceNode != null)
                {
                    m_referenceNodeId = m_referenceNode.UniqueId;
                }
                else
                {
                    m_referenceNodeId    = -1;
                    m_referenceSamplerId = -1;
                }
                UpdateTitle();
            }
        }
        public override void Draw(DrawInfo drawInfo)
        {
            if (m_containerGraph.CurrentCanvasMode != NodeAvailability.TemplateShader)
            {
                if (!m_showErrorMessage || m_errorMessageTypeIsError == NodeMessageType.Info)
                {
                    ShowTab(NodeMessageType.Error, ErrorMessageStr);
                }
            }
            else if (m_showErrorMessage)
            {
                if (m_errorMessageTypeIsError == NodeMessageType.Error)
                {
                    HideTab();
                }
            }

            base.Draw(drawInfo);
            if (m_containerGraph.CurrentCanvasMode != NodeAvailability.TemplateShader)
            {
                return;
            }

            if (m_shaderProperties == null)
            {
                MasterNode masterNode = m_containerGraph.CurrentMasterNode;
                if (masterNode.CurrentMasterNodeCategory == AvailableShaderTypes.Template)
                {
                    if (SetTemplate(masterNode))
                    {
                        m_fetchPropertyId = true;
                    }
                }
            }

            if (m_fetchScopeFromProperty)
            {
                m_fetchScopeFromProperty = false;
                FetchScope();
                FetchShaderProperties();
            }

            if (m_fetchPropertyId)
            {
                m_fetchPropertyId = false;
                FetchPropertyId();
            }

            if (m_currentPropertyIdx > -1)
            {
                EditorGUI.BeginChangeCheck();
                m_currentPropertyIdx = m_upperLeftWidgetHelper.DrawWidget(this, m_currentPropertyIdx, m_propertyLabels);
                if (EditorGUI.EndChangeCheck())
                {
                    UpdateFromId();
                }
            }
        }
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_selectedPatternInt = m_upperLeftWidget.DrawWidget(this, m_selectedPatternInt, PatternsStr);
     if (EditorGUI.EndChangeCheck())
     {
         UpdatePorts();
     }
 }
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_viewDirSpace = (ViewSpace)m_upperLeftWidget.DrawWidget(this, m_viewDirSpace);
     if (EditorGUI.EndChangeCheck())
     {
         UpdateTitle();
     }
 }
示例#7
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_grayscaleStyle = m_upperLeftWidget.DrawWidget(this, m_grayscaleStyle, m_GrayscaleStyleValues);
     if (EditorGUI.EndChangeCheck())
     {
         SetAdditonalTitleText(string.Format(Constants.SubTitleTypeFormatStr, m_GrayscaleStyleValues[m_grayscaleStyle]));
     }
 }
示例#8
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_outputTypeInt = m_upperLeftWidget.DrawWidget(this, m_outputTypeInt, m_outputTypeStr);
     if (EditorGUI.EndChangeCheck())
     {
         ConfigureHeader();
     }
 }
示例#9
0
        public override void Draw(DrawInfo drawInfo)
        {
            base.Draw(drawInfo);
            PropertyType parameterType = (PropertyType)m_upperLeftWidget.DrawWidget(this, (int)m_currentParameterType, AvailablePropertyTypeLabels, AvailablePropertyTypeValues);

            if (parameterType != m_currentParameterType)
            {
                ChangeParameterType(parameterType);
            }
        }
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_grayscaleStyle = m_upperLeftWidget.DrawWidget(this, m_grayscaleStyle, m_GrayscaleStyleValues);
     if (EditorGUI.EndChangeCheck())
     {
         UpdateFromSelected();
     }
 }
示例#11
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_selectedType = (BuiltInFogAndAmbientColors)m_upperLeftWidget.DrawWidget(this, (int)m_selectedType, ColorValuesStr);
     if (EditorGUI.EndChangeCheck())
     {
         ChangeOutputName(0, ColorValuesStr[(int)m_selectedType]);
     }
 }
示例#12
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_sizeOption = m_upperLeftWidget.DrawWidget(this, m_sizeOption, SizeLabels);
     if (EditorGUI.EndChangeCheck())
     {
         UpdatePorts();
     }
 }
示例#13
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_comparision = (Comparision)m_upperLeftWidget.DrawWidget(this, (int)m_comparision, LabelsSTR);
     if (EditorGUI.EndChangeCheck())
     {
         UpdateTitle();
     }
 }
示例#14
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_viewSpaceInt = m_upperLeftWidget.DrawWidget(this, m_viewSpaceInt, m_viewSpaceStr);
     if (EditorGUI.EndChangeCheck())
     {
         SetAdditonalTitleText(string.Format(Constants.SubTitleSpaceFormatStr, m_viewSpaceStr[m_viewSpaceInt]));
     }
 }
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_currentOption = m_upperLeftWidget.DrawWidget(this, m_currentOption, LinearModeLabels);
     if (EditorGUI.EndChangeCheck())
     {
         UpdateFromOption();
     }
 }
示例#16
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_billboardType = (BillboardType)m_upperLeftWidget.DrawWidget(this, m_billboardType);
     if (EditorGUI.EndChangeCheck())
     {
         SetAdditonalTitleText(string.Format(Constants.SubTitleTypeFormatStr, m_billboardType));
     }
 }
示例#17
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_type = (NoiseGeneratorType)m_upperLeftWidget.DrawWidget(this, m_type);
     if (EditorGUI.EndChangeCheck())
     {
         ConfigurePorts();
     }
 }
示例#18
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_selectedType = (BuiltInShaderCameraTypes)m_upperLeftWidget.DrawWidget(this, (int)m_selectedType, _projMatrixValuesStr);
     if (EditorGUI.EndChangeCheck())
     {
         ChangeOutputName(0, _projMatrixValuesStr[(int)m_selectedType]);
         SetSaveIsDirty();
     }
 }
示例#19
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_selectedType = (BuiltInShaderTransformTypes)m_upperLeftWidget.DrawWidget(this, (int)m_selectedType, ValuesStr);
     if (EditorGUI.EndChangeCheck())
     {
         ChangeOutputName(0, ValuesStr[(int)m_selectedType]);
         m_sizeIsDirty = true;
     }
 }
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_selectedType = (BuiltInShaderClipPlanesTypes)m_upperLeftWidget.DrawWidget(this, m_selectedType);
     if (EditorGUI.EndChangeCheck())
     {
         SetAdditonalTitleText(string.Format(Constants.SubTitleTypeFormatStr, m_selectedType));
         SetSaveIsDirty();
     }
 }
示例#21
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     EditorGUI.BeginChangeCheck();
     m_currentSelectedMode = m_upperLeftWidget.DrawWidget(this, m_currentSelectedMode, AvailableOutlineModes);
     if (EditorGUI.EndChangeCheck())
     {
         SetAdditonalTitleText(string.Format(Constants.SubTitleTypeFormatStr, AvailableOutlineModes[m_currentSelectedMode]));
         UpdatePorts();
     }
 }
        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();
            }
        }
示例#23
0
        public override void Draw(DrawInfo drawInfo)
        {
            base.Draw(drawInfo);
            EditorGUI.BeginChangeCheck();
            m_selectedParallaxTypeInt = m_upperLeftWidget.DrawWidget(this, m_selectedParallaxTypeInt, m_parallaxTypeStr);
            if (EditorGUI.EndChangeCheck())
            {
                switch (m_selectedParallaxTypeInt)
                {
                default:
                case 0: m_selectedParallaxType = ParallaxType.Normal; break;

                case 1: m_selectedParallaxType = ParallaxType.Planar; break;
                }
                UpdateTitle();
            }
        }
示例#24
0
        public override void Draw(DrawInfo drawInfo)
        {
            base.Draw(drawInfo);
            EditorGUI.BeginChangeCheck();
            m_selectedOutputTypeInt = m_upperLeftWidget.DrawWidget(this, m_selectedOutputTypeInt, _outputValueTypes);
            if (EditorGUI.EndChangeCheck())
            {
                switch (m_selectedOutputTypeInt)
                {
                case 0: m_selectedOutputType = WirePortDataType.FLOAT3x3; break;

                case 1: m_selectedOutputType = WirePortDataType.FLOAT4x4; break;
                }

                UpdatePorts();
            }
        }
示例#25
0
        public override void Draw(DrawInfo drawInfo)
        {
            base.Draw(drawInfo);
            if (m_containerGraph.CurrentCanvasMode != NodeAvailability.TemplateShader)
            {
                return;
            }

            if (m_interpolatorData == null || m_interpolatorData.Count == 0)
            {
                MasterNode masterNode = m_containerGraph.CurrentMasterNode;
                if (masterNode.CurrentMasterNodeCategory == AvailableShaderTypes.Template)
                {
                    TemplateData currentTemplate = (masterNode as TemplateMasterNode).CurrentTemplate;
                    if (currentTemplate != null)
                    {
                        m_inVarName        = currentTemplate.FragFunctionData.InVarName + ".";
                        m_interpolatorData = currentTemplate.InterpolatorData.Interpolators;
                        m_fetchDataId      = true;
                    }
                }
            }

            if (m_fetchDataId)
            {
                m_fetchDataId = false;
                FetchDataId();
            }

            if (m_currentDataIdx > -1)
            {
                EditorGUI.BeginChangeCheck();
                m_currentDataIdx = m_upperLeftWidgetHelper.DrawWidget(this, m_currentDataIdx, m_dataLabels);
                if (EditorGUI.EndChangeCheck())
                {
                    UpdateFromId();
                }
            }
        }
示例#26
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     m_upperLeftWidget.DrawWidget <BlendOps>(ref m_currentBlendOp, this, OnWidgetUpdate);
 }
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     m_upperLeftWidget.DrawWidget <BuiltInShaderClipPlanesTypes>(ref m_selectedType, this, OnWidgetUpdate);
 }
示例#28
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     m_upperLeftWidget.DrawWidget <NoiseGeneratorType>(ref m_type, this, OnWidgetUpdate);
 }
示例#29
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     m_upperLeftWidget.DrawWidget <ViewSpace>(ref m_viewDirSpace, this, OnWidgetUpdate);
 }
示例#30
0
 public override void Draw(DrawInfo drawInfo)
 {
     base.Draw(drawInfo);
     m_upperLeftWidget.DrawWidget <BillboardType>(ref m_billboardType, this, OnWidgetUpdate);
 }