예제 #1
0
#pragma warning restore 618

        /// <summary>
        /// overwrites any DNAEvaluators in the current settings with the settings from the incoming DNAEvaluators if the dnaName matches, otherwise adds a new evaluator for the dnaName
        /// </summary>
        /// <param name="existingDNANames">If the dnaName used by a DNAEvaluator in the incoming settings is not found in this list it will not be processed</param>
        private void ProcessSkelModOverwrites(DNAEvaluatorList currentMods, DNAEvaluatorList incomingMods, List <string> existingDNANames)
        {
            for (int i = 0; i < incomingMods.Count; i++)
            {
                if (!existingDNANames.Contains(incomingMods[i].dnaName))
                {
                    continue;
                }
                var foundInCurrent = false;
                for (int ci = 0; ci < currentMods.Count; ci++)
                {
                    if (currentMods[ci].dnaName == incomingMods[i].dnaName)
                    {
                        currentMods[ci].calcOption = incomingMods[i].calcOption;
                        currentMods[ci].evaluator  = new DNAEvaluationGraph(incomingMods[i].evaluator);
                        currentMods[ci].multiplier = incomingMods[i].multiplier;
                        foundInCurrent             = true;
                    }
                }
                if (!foundInCurrent)
                {
                    currentMods.Add(new DNAEvaluator(incomingMods[i].dnaName, incomingMods[i].evaluator, incomingMods[i].multiplier, incomingMods[i].calcOption));
                }
            }
        }
예제 #2
0
#pragma warning restore 618


#pragma warning disable 618 //disable obsolete warning

        /// <summary>
        /// Converts the legacy incoming values into DNAEvaluators and then overwrites any DNAEvaluators in the current settings with the settings from the incoming DNAEvaluators if the dnaName matches, otherwise adds a new evaluator for the dnaName
        /// </summary>
        /// <param name="existingDNANames">If the dnaName used by a DNAEvaluator in the incoming settings is not found in this list it will not be processed</param>
        private void ProcessSkelModOverwrites(DNAEvaluatorList currentMods, List <SkeletonModifier.spVal.spValValue.spValModifier> incomingMods, List <string> existingDNANames)
        {
            SkeletonModifier.spVal.spValValue tempValValue = new SkeletonModifier.spVal.spValValue();
            tempValValue.modifiers = new List <SkeletonModifier.spVal.spValValue.spValModifier>(incomingMods);
            tempValValue.ConvertToDNAEvaluators();
            ProcessSkelModOverwrites(currentMods, tempValValue.modifyingDNA, existingDNANames);
        }
 public DNAColorSet(DNAColorSet other)
 {
     mode           = other.mode;
     targetName     = other.targetName;
     textureChannel = other.textureChannel;
     colorModifier  = new DNAColorModifier(other.colorModifier);
     modifyingDNA   = new DNAEvaluatorList(other.modifyingDNA);
 }
예제 #4
0
 public DNAEvaluatorList(DNAEvaluatorList other)
 {
     _aggregationMethod = other._aggregationMethod;
     for (int i = 0; i < other._dnaEvaluators.Count; i++)
     {
         _dnaEvaluators.Add(new DNAEvaluator(other._dnaEvaluators[i]));
     }
 }
예제 #5
0
 public BlendshapeDNAConverter(string shapeToApply, float startingShapeWeight = 0f, List <DNAEvaluator> modifyingDnas = null)
 {
     this._blendshapeToApply   = shapeToApply;
     this._startingShapeWeight = startingShapeWeight;
     if (modifyingDnas != null)
     {
         this._modifyingDNA = new DNAEvaluatorList(modifyingDnas);
     }
 }
 public BonePoseDNAConverter(UMABonePose poseToApply, float startingPoseWeight = 0f, List <DNAEvaluator> modifyingDnas = null)
 {
     this._poseToApply        = poseToApply;
     this._startingPoseWeight = startingPoseWeight;
     if (modifyingDnas != null)
     {
         this._modifyingDNA = new DNAEvaluatorList(modifyingDnas);
     }
 }
예제 #7
0
 public BlendshapeDNAConverter(BlendshapeDNAConverter other)
 {
     this._blendshapeToApply   = other._blendshapeToApply;
     this._startingShapeWeight = other._startingShapeWeight;
     this._modifyingDNA        = new DNAEvaluatorList(other._modifyingDNA);
 }
 public BonePoseDNAConverter(BonePoseDNAConverter other)
 {
     this._poseToApply       = other._poseToApply;
     this.startingPoseWeight = other._startingPoseWeight;
     this._modifyingDNA      = new DNAEvaluatorList(other._modifyingDNA);
 }