public override void DrawProperties() { base.DrawProperties(); NodeUtils.DrawPropertyGroup(ref m_propertiesFoldout, Constants.ParameterLabelStr, DrawBaseProperties); NodeUtils.DrawPropertyGroup(ref m_visibleInputsFoldout, InputsStr, DrawInputs, DrawAddRemoveInputs); EditorGUILayout.HelpBox(CustomExpressionInfo, MessageType.Info); }
public void Draw(ParentNode owner) { m_currentOwner = owner; bool value = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedAdditionalIncludes; NodeUtils.DrawPropertyGroup(ref value, AdditionalIncludesStr, DrawMainBody, DrawButtons); owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedAdditionalIncludes = value; }
public void Draw(ParentNode owner) { m_currentOwner = owner; bool value = EditorVariablesManager.ExpandedAdditionalPragmas.Value; NodeUtils.DrawPropertyGroup(ref value, AdditionalPragmasStr, DrawMainBody, DrawButtons); EditorVariablesManager.ExpandedAdditionalPragmas.Value = value; }
public void Draw(ParentNode owner) { m_currentOwner = owner; bool value = EditorVariablesManager.ExpandedDependencies.Value; NodeUtils.DrawPropertyGroup(ref value, CustomDependencysStr, DrawMainBody, DrawButtons); EditorVariablesManager.ExpandedDependencies.Value = value; }
public override void DrawProperties() { base.DrawProperties(); if (m_freeType || m_freeName) { NodeUtils.DrawPropertyGroup(ref m_propertiesFoldout, Constants.ParameterLabelStr, DrawMainPropertyBlock); NodeUtils.DrawPropertyGroup(ref m_visibleAttribsFoldout, Constants.AttributesLaberStr, DrawAttributes, DrawAttributesAddRemoveButtons); CheckPropertyFromInspector(); } }
public override void DrawProperties() { base.DrawProperties(); NodeUtils.DrawPropertyGroup(ref m_propertiesFoldout, Constants.ParameterLabelStr, () => { m_billboardType = ( BillboardType )EditorGUILayoutEnumPopup(BillboardOpHelper.BillboardTypeStr, m_billboardType); m_rotationIndependent = EditorGUILayoutToggle(BillboardOpHelper.BillboardRotIndStr, m_rotationIndependent); }); EditorGUILayout.HelpBox(WarningMessage, MessageType.Warning); }
public override void DrawProperties() { if( m_currentTemplate == null ) return: base.DrawProperties(): bool generalIsVisible = ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedGeneralShaderOptions: NodeUtils.DrawPropertyGroup( ref generalIsVisible, GeneralFoldoutStr, DrawGeneralOptions ): ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedGeneralShaderOptions = generalIsVisible: if( m_currentTemplate.BlendData.DataCheck == TemplateDataCheck.Valid ) m_blendOpHelper.Draw( this ): if( m_currentTemplate.StencilData.DataCheck == TemplateDataCheck.Valid ) { CullMode cullMode = ( m_currentTemplate.CullModeData.DataCheck == TemplateDataCheck.Valid ) ? m_cullModeHelper.CurrentCullMode : CullMode.Back: m_stencilBufferHelper.Draw( this, cullMode ): } if( m_currentTemplate.DepthData.DataCheck == TemplateDataCheck.Valid ) m_depthOphelper.Draw( this ): if( m_currentTemplate.TagData.DataCheck == TemplateDataCheck.Valid ) m_tagsHelper.Draw( this ): DrawMaterialInputs( UIUtils.MenuItemToolbarStyle ): // NodeUtils.DrawPropertyGroup( ref m_snippetsFoldout, SnippetsFoldoutStr, DrawSnippetOptions ): if( GUILayout.Button( OpenTemplateStr ) && m_currentTemplate != null ) { try { string pathname = AssetDatabase.GUIDToAssetPath( m_currentTemplate.GUID ): if( !string.IsNullOrEmpty( pathname ) ) { Shader selectedTemplate = AssetDatabase.LoadAssetAtPath<Shader>( pathname ): if( selectedTemplate != null ) { AssetDatabase.OpenAsset( selectedTemplate, 1 ): } } } catch( Exception e ) { Debug.LogException( e ): } } #if SHOW_TEMPLATE_HELP_BOX EditorGUILayout.HelpBox( WarningMessage, MessageType.Warning ): #endif }
public void Draw(ParentNode owner) { bool value = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedRenderingPlatforms; NodeUtils.DrawPropertyGroup(ref value, RenderingPlatformsStr, () => { for (int i = 0; i < m_renderingPlatformValues.Length; i++) { m_renderingPlatformValues[i] = owner.EditorGUILayoutToggleLeft(RenderingPlatformsLabels[i], m_renderingPlatformValues[i]); } }); owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedRenderingPlatforms = value; }
public void Draw(UndoParentNode owner) { bool value = EditorVariablesManager.ExpandedRenderingPlatforms.Value; NodeUtils.DrawPropertyGroup(ref value, RenderingPlatformsStr, () => { for (int i = 0; i < m_renderingPlatformValues.Length; i++) { m_renderingPlatformValues[i] = owner.EditorGUILayoutToggleLeft(RenderingPlatformsLabels[i], m_renderingPlatformValues[i]); } }); EditorVariablesManager.ExpandedRenderingPlatforms.Value = value; }
public override void Draw(ParentNode owner, bool style = true) { m_currentOwner = owner; if (style) { NodeUtils.DrawPropertyGroup(ref m_foldoutValue, CustomTagsStr, DrawMainBody, DrawButtons); } else { NodeUtils.DrawNestedPropertyGroup(ref m_foldoutValue, CustomTagsStr, DrawMainBody, DrawButtons); } }
public override void Draw( UndoParentNode owner, bool style = true ) { m_currentOwner = owner: bool foldout = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedCustomTags: if( style ) { NodeUtils.DrawPropertyGroup( ref foldout, CustomTagsStr, DrawMainBody, DrawButtons ): } else { NodeUtils.DrawNestedPropertyGroup( ref foldout, CustomTagsStr, DrawMainBody, DrawButtons ): } owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedCustomTags = foldout: }
public void Draw( ParentNode owner, bool isNested = false ) { m_currentOwner = owner: bool value = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedDependencies: if( isNested ) { NodeUtils.DrawNestedPropertyGroup( ref value, CustomDependencysStr, DrawMainBody, DrawButtons ): } else { NodeUtils.DrawPropertyGroup( ref value, CustomDependencysStr, DrawMainBody, DrawButtons ): } owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedDependencies = value: }
public override void DrawProperties() { if (m_currentTemplate == null) { return; } base.DrawProperties(); bool generalIsVisible = EditorVariablesManager.ExpandedGeneralShaderOptions.Value; NodeUtils.DrawPropertyGroup(ref generalIsVisible, GeneralFoldoutStr, DrawGeneralOptions); EditorVariablesManager.ExpandedGeneralShaderOptions.Value = generalIsVisible; #if TEMPLATE_MODULES switch (m_currentTemplate.BlendData.DataCheck) { case TemplateDataCheck.Valid: m_blendOpHelper.Draw(this); break; case TemplateDataCheck.Unreadable: m_blendOpHelper.ShowUnreadableDataMessage(); break; } switch (m_currentTemplate.StencilData.DataCheck) { case TemplateDataCheck.Valid: { CullMode cullMode = (m_currentTemplate.CullModeData.DataCheck == TemplateDataCheck.Valid) ? m_cullModeHelper.CurrentCullMode : CullMode.Back; m_stencilBufferHelper.Draw(this, cullMode); } break; case TemplateDataCheck.Unreadable: { m_stencilBufferHelper.ShowUnreadableDataMessage(); } break; } #endif DrawMaterialInputs(UIUtils.MenuItemToolbarStyle); // NodeUtils.DrawPropertyGroup( ref m_snippetsFoldout, SnippetsFoldoutStr, DrawSnippetOptions ); if (GUILayout.Button(OpenTemplateStr) && m_currentTemplate != null) { AssetDatabase.OpenAsset(AssetDatabase.LoadAssetAtPath <Shader>(AssetDatabase.GUIDToAssetPath(m_currentTemplate.GUID)), 1); } #if SHOW_TEMPLATE_HELP_BOX EditorGUILayout.HelpBox(WarningMessage, MessageType.Warning); #endif }
public override void DrawProperties() { base.DrawProperties(); if (Function == null) { return; } if (Function.Description.Length > 0) { NodeUtils.DrawPropertyGroup(ref m_parametersFoldout, "Parameters", DrawDescription); } }
public void Draw(UndoParentNode owner) { bool value = EditorVariablesManager.ExpandedRenderingOptions.Value; NodeUtils.DrawPropertyGroup(ref value, RenderingOptionsStr, () => { int codeGenCount = m_codeGenerationDataList.Count; // Starting from index 4 because other options are already contemplated with m_renderPath and add/receive shadows for (int i = 4; i < codeGenCount; i++) { m_codeGenerationDataList[i].IsActive = owner.EditorGUILayoutToggleLeft(m_codeGenerationDataList[i].Name, m_codeGenerationDataList[i].IsActive); } }); EditorVariablesManager.ExpandedRenderingOptions.Value = value; }
public override void DrawProperties() { base.DrawProperties(); NodeUtils.DrawPropertyGroup(ref m_propertiesFoldout, Constants.ParameterLabelStr, () => { EditorGUI.BeginChangeCheck(); m_billboardType = ( BillboardType )EditorGUILayoutEnumPopup(BillboardOpHelper.BillboardTypeStr, m_billboardType); if (EditorGUI.EndChangeCheck()) { SetAdditonalTitleText(string.Format(Constants.SubTitleTypeFormatStr, m_billboardType)); } m_rotationIndependent = EditorGUILayoutToggle(BillboardOpHelper.BillboardRotIndStr, m_rotationIndependent); }); EditorGUILayout.HelpBox(WarningMessage, MessageType.Warning); }
public override void DrawProperties() { base.DrawProperties(); NodeUtils.DrawPropertyGroup(ref m_propertiesFoldout, Constants.ParameterLabelStr, () => { EditorGUI.BeginChangeCheck(); m_currentSelectedMode = EditorGUILayoutIntPopup("Type", m_currentSelectedMode, AvailableOutlineModes, AvailableOutlineValues); if (EditorGUI.EndChangeCheck()) { SetAdditonalTitleText(string.Format(Constants.SubTitleTypeFormatStr, AvailableOutlineModes[m_currentSelectedMode])); UpdatePorts(); } m_noFog = EditorGUILayoutToggle("No Fog", m_noFog); }); }
public override void DrawProperties() { base.DrawProperties(); bool generalIsVisible = EditorVariablesManager.ExpandedGeneralShaderOptions.Value; NodeUtils.DrawPropertyGroup(ref generalIsVisible, GeneralFoldoutStr, DrawGeneralOptions); EditorVariablesManager.ExpandedGeneralShaderOptions.Value = generalIsVisible; // NodeUtils.DrawPropertyGroup( ref m_snippetsFoldout, SnippetsFoldoutStr, DrawSnippetOptions ); if (GUILayout.Button(OpenTemplateStr) && m_currentTemplate != null) { AssetDatabase.OpenAsset(AssetDatabase.LoadAssetAtPath <Shader>(AssetDatabase.GUIDToAssetPath(m_currentTemplate.GUID)), 1); } #if SHOW_TEMPLATE_HELP_BOX EditorGUILayout.HelpBox(WarningMessage, MessageType.Warning); #endif }
public void Draw( ParentNode owner ) { bool visible = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedVertexOptions: bool enabled = m_isBillboard: NodeUtils.DrawPropertyGroup( owner, ref visible, ref m_isBillboard, BillboardTitleStr, () => { m_billboardType = (BillboardType)owner.EditorGUILayoutEnumPopup( BillboardTypeStr, m_billboardType ): m_rotationIndependent = owner.EditorGUILayoutToggle( BillboardRotIndStr, m_rotationIndependent ): } ): owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedVertexOptions = visible: if( m_isBillboard != enabled ) { UIUtils.RequestSave(): } }
public void Draw() { bool visible = EditorVariablesManager.ExpandedVertexOptions.Value; bool enabled = m_isBillboard; NodeUtils.DrawPropertyGroup(ref visible, ref m_isBillboard, BillboardTitleStr, () => { m_billboardType = ( BillboardType )EditorGUILayout.EnumPopup(BillboardTypeStr, m_billboardType); }); EditorVariablesManager.ExpandedVertexOptions.Value = visible; if (m_isBillboard != enabled) { UIUtils.RequestSave(); } }
public void Draw(GUIStyle toolbarstyle) { bool foldoutValue = EditorVariablesManager.ExpandedStencilOptions.Value; NodeUtils.DrawPropertyGroup(ref foldoutValue, ref m_active, FoldoutLabelStr, () => { m_refValue = EditorGUILayout.IntSlider(ReferenceValueContent, m_refValue, 0, 255); m_readMask = EditorGUILayout.IntSlider(ReadMaskContent, m_readMask, 0, 255); m_writeMask = EditorGUILayout.IntSlider(WriteMaskContent, m_writeMask, 0, 255); m_comparisonFunctionIdx = EditorGUILayout.Popup(ComparisonStr, m_comparisonFunctionIdx, ComparisonLabels); m_passStencilOpIdx = EditorGUILayout.Popup(PassStr, m_passStencilOpIdx, StencilOpsLabels); m_failStencilOpIdx = EditorGUILayout.Popup(FailStr, m_failStencilOpIdx, StencilOpsLabels); m_zFailStencilOpIdx = EditorGUILayout.Popup(ZFailStr, m_zFailStencilOpIdx, StencilOpsLabels); }); EditorVariablesManager.ExpandedStencilOptions.Value = foldoutValue; }
public override void DrawProperties() { base.DrawProperties(); if (Function == null) { return; } if (Function.Description.Length > 0 || m_allFunctionSwitches.Count > 0) { NodeUtils.DrawPropertyGroup(ref m_parametersFoldout, "Parameters", DrawDescription); } DrawInternalDataGroup(); }
public void Draw(UndoParentNode owner, CullMode cullMode, bool style = true) { if (style) { NodeUtils.DrawPropertyGroup(ref m_foldoutValue, FoldoutLabelStr, () => { DrawBlock(owner, cullMode); }); } else { NodeUtils.DrawNestedPropertyGroup(ref m_foldoutValue, FoldoutLabelStr, () => { DrawBlock(owner, cullMode); }); } }
public override void Draw(ParentNode owner, bool style = true) { if (style) { NodeUtils.DrawPropertyGroup(ref m_foldoutValue, BlendModeStr, () => { DrawBlock(owner, style); }); } else { NodeUtils.DrawNestedPropertyGroup(ref m_foldoutValue, BlendModeStr, () => { DrawBlock(owner, style); }); } }
public void Draw(UndoParentNode owner) { bool visible = EditorVariablesManager.ExpandedVertexOptions.Value; bool enabled = m_isBillboard; NodeUtils.DrawPropertyGroup(owner, ref visible, ref m_isBillboard, BillboardTitleStr, () => { m_billboardType = ( BillboardType )owner.EditorGUILayoutEnumPopup(BillboardTypeStr, m_billboardType); m_rotationIndependent = owner.EditorGUILayoutToggle(BillboardRotIndStr, m_rotationIndependent); }); EditorVariablesManager.ExpandedVertexOptions.Value = visible; if (m_isBillboard != enabled) { UIUtils.RequestSave(); } }
public override void DrawProperties() { base.DrawProperties(); if (Function == null) { return; } if (Function.Description.Length > 0 || m_allFunctionSwitches.Count > 0) { NodeUtils.DrawPropertyGroup(ref m_parametersFoldout, "Parameters", DrawDescription); } bool drawInternalDataUI = false; int inputCount = m_inputPorts.Count; if (inputCount > 0) { for (int i = 0; i < inputCount; i++) { if (m_inputPorts[i].Available && m_inputPorts[i].ValidInternalData && !m_inputPorts[i].IsConnected && m_inputPorts[i].AutoDrawInternalData /*&& ( m_inputPorts[ i ].AutoDrawInternalData || ( m_autoDrawInternalPortData && m_useInternalPortData ) )*/ /*&& m_inputPorts[ i ].AutoDrawInternalData*/) { drawInternalDataUI = true; break; } } } if (drawInternalDataUI) { NodeUtils.DrawPropertyGroup(ref m_internalDataFoldout, Constants.InternalDataLabelStr, () => { for (int i = 0; i < m_inputPorts.Count; i++) { if (m_inputPorts[i].ValidInternalData && !m_inputPorts[i].IsConnected && m_inputPorts[i].Visible && m_inputPorts[i].AutoDrawInternalData) { m_inputPorts[i].ShowInternalData(this); } } }); } }
public void Draw(StandardSurfaceOutputNode owner) { bool value = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedRenderingOptions; NodeUtils.DrawPropertyGroup(ref value, RenderingOptionsStr, () => { int codeGenCount = m_codeGenerationDataList.Count; // Starting from index 4 because other options are already contemplated with m_renderPath and add/receive shadows for (int i = 4; i < codeGenCount; i++) { m_codeGenerationDataList[i].IsActive = !owner.EditorGUILayoutToggleLeft(m_codeGenerationDataList[i].Name, !m_codeGenerationDataList[i].IsActive); } m_lodCrossfade = owner.EditorGUILayoutToggleLeft(LODCrossfadeContent, m_lodCrossfade); m_ignoreProjector = owner.EditorGUILayoutToggleLeft(IgnoreProjectorContent, m_ignoreProjector); EditorGUI.BeginDisabledGroup(!owner.CastShadows); m_useDefaultShadowCaster = owner.EditorGUILayoutToggleLeft(UseDefaultCasterContent, m_useDefaultShadowCaster); EditorGUI.EndDisabledGroup(); m_forceNoShadowCasting = owner.EditorGUILayoutToggleLeft(ForceNoShadowCastingContent, m_forceNoShadowCasting); if (owner.ContainerGraph.IsInstancedShader) { GUI.enabled = false; owner.EditorGUILayoutToggleLeft(ForceEnableInstancingContent, true); GUI.enabled = true; } else { m_forceEnableInstancing = owner.EditorGUILayoutToggleLeft(ForceEnableInstancingContent, m_forceEnableInstancing); } #if UNITY_5_6_OR_NEWER m_forceDisableInstancing = owner.EditorGUILayoutToggleLeft(ForceDisableInstancingContent, m_forceDisableInstancing); #endif m_specularHighlightToggle = owner.EditorGUILayoutToggleLeft(SpecularHightlightsContent, m_specularHighlightToggle); m_reflectionsToggle = owner.EditorGUILayoutToggleLeft(ReflectionsContent, m_reflectionsToggle); m_disableBatching = (DisableBatchingTagValues)owner.EditorGUILayoutEnumPopup(DisableBatchingContent, m_disableBatching); Material mat = owner.ContainerGraph.CurrentMaterial; if (mat != null) { mat.globalIlluminationFlags = (MaterialGlobalIlluminationFlags)owner.EditorGUILayoutEnumPopup(EmissionGIFlags, mat.globalIlluminationFlags); } }); owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedRenderingOptions = value; }
public override void Draw(ParentNode owner, bool style = true) { if (style) { NodeUtils.DrawPropertyGroup(ref m_foldoutValue, ZBufferOpHelper.DepthParametersStr, () => { EditorGUI.indentLevel++; DrawBlock(owner); EditorGUI.indentLevel--; }); } else { NodeUtils.DrawNestedPropertyGroup(ref m_foldoutValue, ZBufferOpHelper.DepthParametersStr, () => { DrawBlock(owner); }); } }
public override void Draw(UndoParentNode owner, bool style = true) { bool foldout = owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedBlendModeModule; if (style) { NodeUtils.DrawPropertyGroup(ref foldout, BlendModeStr + Target, () => { DrawBlock(owner, style); }); } else { NodeUtils.DrawNestedPropertyGroup(ref foldout, BlendModeStr + Target, () => { DrawBlock(owner, style); }); } owner.ContainerGraph.ParentWindow.InnerWindowVariables.ExpandedBlendModeModule = foldout; }
public override void DrawProperties() { base.DrawProperties(); NodeUtils.DrawPropertyGroup(ref m_propertiesFoldout, "Parameters", DrawMainOptions); DrawInternalDataGroup(); if (m_selectedTriplanarType == TriplanarType.Spherical) { NodeUtils.DrawPropertyGroup(ref m_topTextureFoldout, "Texture", DrawTopTextureOptions); } else { NodeUtils.DrawPropertyGroup(ref m_topTextureFoldout, "Top Texture", DrawTopTextureOptions); } if (m_selectedTriplanarType == TriplanarType.Cylindrical) { NodeUtils.DrawPropertyGroup(ref m_midTextureFoldout, "Middle Texture", DrawMidTextureOptions); NodeUtils.DrawPropertyGroup(ref m_botTextureFoldout, "Bottom Texture", DrawBotTextureOptions); } }