示例#1
0
        public bool IsInputCategorized(ShaderInput shaderInput)
        {
            foreach (var category in categories)
            {
                if (category.IsItemInCategory(shaderInput))
                {
                    return(true);
                }
            }

            return(false);
        }
示例#2
0
        // The only situation in which an input has an identical reference name to another input in a category, while not being the same instance, is if they are duplicates
        public bool IsInputDuplicatedFromCategory(ShaderInput shaderInput, CategoryData inputCategory, GraphData targetGraphData)
        {
            foreach (var child in inputCategory.Children)
            {
                if (child.referenceName.Equals(shaderInput.referenceName, StringComparison.Ordinal) && child.objectId != shaderInput.objectId)
                {
                    return(true);
                }
            }

            // Need to check if they share same graph owner as well, if not then we can early out
            bool inputBelongsToTargetGraph = targetGraphData.ContainsInput(shaderInput);

            if (inputBelongsToTargetGraph == false)
            {
                return(false);
            }

            return(false);
        }
示例#3
0
 public string GetConnectionStateVariableNameForSlot(int slotId)
 {
     return(ShaderInput.GetConnectionStateVariableName(GetVariableNameForSlot(slotId)));
 }
示例#4
0
 void AddInput(ShaderInput input)
 {
     m_Inputs.Add(input);
 }