Beispiel #1
0
        static string LabelName(string propertyName)
        {
            propertyName = AnimationWindowUtility.GetPropertyDisplayName(propertyName);
            int index = propertyName.LastIndexOfAny(s_LabelMarkers);

            if (index >= 0)
            {
                propertyName = propertyName.Substring(index);
            }
            return(propertyName);
        }
        private static string LabelName(string propertyName)
        {
            propertyName = AnimationWindowUtility.GetPropertyDisplayName(propertyName);
            int num = propertyName.LastIndexOfAny(ClipInspectorCurveEditor.s_LabelMarkers);

            if (num >= 0)
            {
                propertyName = propertyName.Substring(num);
            }
            return(propertyName);
        }
        string PropertyName(EditorCurveBinding binding, bool prependPathName)
        {
            var propertyName = m_CurveDataSource.ModifyPropertyDisplayName(binding.path, binding.propertyName);

            propertyName = CleanUpArrayBinding(AnimationWindowUtility.GetPropertyDisplayName(propertyName), false);
            if (binding.isPhantom)
            {
                propertyName = string.Format(s_DefaultValue, propertyName);
            }
            if (prependPathName && !string.IsNullOrEmpty(binding.path))
            {
                propertyName = $"{binding.path} : {propertyName}";
            }
            return(propertyName);
        }
Beispiel #4
0
        private AnimationWindowHierarchyPropertyGroupNode AddPropertyGroupToHierarchy(AnimationWindowCurve[] curves, AnimationWindowHierarchyNode parentNode)
        {
            List <AnimationWindowHierarchyNode> childNodes = new List <AnimationWindowHierarchyNode>();

            System.Type animatableObjectType = curves[0].type;
            AnimationWindowHierarchyPropertyGroupNode node = new AnimationWindowHierarchyPropertyGroupNode(animatableObjectType, 0, AnimationWindowUtility.GetPropertyGroupName(curves[0].propertyName), curves[0].path, parentNode);

            node.icon = GetIcon(curves[0].binding);

            node.indent = curves[0].depth;
            node.curves = curves;

            foreach (AnimationWindowCurve curve in curves)
            {
                AnimationWindowHierarchyPropertyNode childNode = AddPropertyToHierarchy(curve, node);
                // For child nodes we do not want to display the type in front (It is already shown by the group node)
                childNode.displayName = AnimationWindowUtility.GetPropertyDisplayName(childNode.propertyName);
                childNodes.Add(childNode);
            }

            TreeViewUtility.SetChildParentReferences(new List <TreeViewItem>(childNodes.ToArray()), node);
            return(node);
        }