From b82da95b5181ac8bbae38efb13e950d5e88a4caa Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 23 Oct 2020 13:08:43 +0800 Subject: =?UTF-8?q?*=E7=A7=BB=E5=8A=A8amplify=20shader=20editor=E5=88=B0th?= =?UTF-8?q?ird=20party=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Plugins/Editor/Nodes/NodeAttributes.cs | 97 ---------------------- 1 file changed, 97 deletions(-) delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeAttributes.cs (limited to 'Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeAttributes.cs') diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeAttributes.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeAttributes.cs deleted file mode 100644 index 91e441ea..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeAttributes.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda - -using System; -using UnityEngine; - -namespace AmplifyShaderEditor -{ - public enum NodeAvailability - { - SurfaceShader = 1 << 0, - ShaderFunction = 1 << 1, - CustomLighting = 1 << 2, - TemplateShader = 1 << 3 - } - - - [AttributeUsage( AttributeTargets.Class )] - public class NodeAttributes : Attribute - { - - public string Name; - public string Description; - public string Category; - public KeyCode ShortcutKey; - public bool Available; - public System.Type[] CastType; // Type that will be converted to AttribType if dropped on the canvas ... p.e. dropping a texture2d on the canvas will generate a sampler2d node - public bool Deprecated; - public string DeprecatedAlternative; - public System.Type DeprecatedAlternativeType; - public bool FromCommunity; - public string CustomCategoryColor; // Color created via a string containing its hexadecimal representation - public int SortOrderPriority; // to be used when name comparing on sorting - public int NodeAvailabilityFlags;// used to define where this node can be used - private string m_nodeUrl; - public string Community; - public string Tags; - public NodeAttributes( string name, string category, string description, System.Type castType = null, KeyCode shortcutKey = KeyCode.None, bool available = true, bool deprecated = false, string deprecatedAlternative = null, System.Type deprecatedAlternativeType = null, string community = null, string customCategoryColor = null, int sortOrderPriority = -1, int nodeAvailabilityFlags = int.MaxValue, string tags = null ) - { - Name = name; - Description = description; - Category = category; - if( castType != null ) - CastType = new System.Type[] { castType }; - - ShortcutKey = shortcutKey; - Available = available; - Deprecated = deprecated; - DeprecatedAlternative = deprecatedAlternative; - Community = community; - if( string.IsNullOrEmpty( Community ) ) - Community = string.Empty; - else - FromCommunity = true; - - if( !string.IsNullOrEmpty( customCategoryColor ) ) - CustomCategoryColor = customCategoryColor; - - DeprecatedAlternativeType = deprecatedAlternativeType; - SortOrderPriority = sortOrderPriority; - NodeAvailabilityFlags = nodeAvailabilityFlags; - Tags = tags; - if( string.IsNullOrEmpty( tags ) ) - Tags = string.Empty; - //m_nodeUrl = ( FromCommunity ? Constants.CommunityNodeCommonUrl : Constants.NodeCommonUrl ) + UIUtils.UrlReplaceInvalidStrings( Name ); - } - - public NodeAttributes( string name, string category, string description, KeyCode shortcutKey, bool available, int sortOrderPriority, int nodeAvailabilityFlags, params System.Type[] castTypes ) - { - Name = name; - Description = description; - Category = category; - if( castTypes != null && castTypes.Length > 0 ) - { - CastType = castTypes; - } - - ShortcutKey = shortcutKey; - Available = available; - SortOrderPriority = sortOrderPriority; - NodeAvailabilityFlags = nodeAvailabilityFlags; - //m_nodeUrl = ( FromCommunity ? Constants.CommunityNodeCommonUrl : Constants.NodeCommonUrl ) + UIUtils.UrlReplaceInvalidStrings( Name ); - } - - public string NodeUrl - { - get - { - if( string.IsNullOrEmpty( m_nodeUrl ) ) - { - m_nodeUrl = ( FromCommunity ? Constants.CommunityNodeCommonUrl : Constants.NodeCommonUrl ) + UIUtils.UrlReplaceInvalidStrings( Name ); - } - return m_nodeUrl; - } - } - } -} -- cgit v1.1-26-g67d0