SetupPropertyModification() private static method

private static SetupPropertyModification ( string name, float value, UndoPropertyModification prop ) : void
name string
value float
prop UnityEditor.UndoPropertyModification
return void
 private static bool ApplyMaterialModificationToAnimationRecording(MaterialProperty materialProp, UnityEngine.Object target, float value)
 {
     UndoPropertyModification[] array = MaterialAnimationUtility.CreateUndoPropertyModifications(1, target);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name, value, array[0]);
     UndoPropertyModification[] array2 = Undo.postprocessModifications(array);
     return(array2.Length != array.Length);
 }
 private static void ApplyMaterialModificationToAnimationRecording(string name, Object target, Vector4 vec)
 {
     UndoPropertyModification[] propertyModifications = MaterialAnimationUtility.CreateUndoPropertyModifications(4, target);
     MaterialAnimationUtility.SetupPropertyModification(name + ".x", vec.x, propertyModifications[0]);
     MaterialAnimationUtility.SetupPropertyModification(name + ".y", vec.y, propertyModifications[1]);
     MaterialAnimationUtility.SetupPropertyModification(name + ".z", vec.z, propertyModifications[2]);
     MaterialAnimationUtility.SetupPropertyModification(name + ".w", vec.w, propertyModifications[3]);
     UndoPropertyModification[] propertyModificationArray = Undo.postprocessModifications(propertyModifications);
 }
 private static void ApplyMaterialModificationToAnimationRecording(MaterialProperty materialProp, Object target, Color color)
 {
     UndoPropertyModification[] propertyModifications = MaterialAnimationUtility.CreateUndoPropertyModifications(4, target);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".r", color.r, propertyModifications[0]);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".g", color.g, propertyModifications[1]);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".b", color.b, propertyModifications[2]);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".a", color.a, propertyModifications[3]);
     UndoPropertyModification[] propertyModificationArray = Undo.postprocessModifications(propertyModifications);
 }
Beispiel #4
0
 private static void ApplyMaterialModificationToAnimationRecording(string name, UnityEngine.Object target, Vector4 vec)
 {
     UndoPropertyModification[] array = MaterialAnimationUtility.CreateUndoPropertyModifications(4, target);
     MaterialAnimationUtility.SetupPropertyModification(name + ".x", vec.x, array[0]);
     MaterialAnimationUtility.SetupPropertyModification(name + ".y", vec.y, array[1]);
     MaterialAnimationUtility.SetupPropertyModification(name + ".z", vec.z, array[2]);
     MaterialAnimationUtility.SetupPropertyModification(name + ".w", vec.w, array[3]);
     Undo.postprocessModifications(array);
 }
Beispiel #5
0
 private static void ApplyMaterialModificationToAnimationRecording(MaterialProperty materialProp, UnityEngine.Object target, Color color)
 {
     UndoPropertyModification[] array = MaterialAnimationUtility.CreateUndoPropertyModifications(4, target);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".r", color.r, array[0]);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".g", color.g, array[1]);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".b", color.b, array[2]);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".a", color.a, array[3]);
     Undo.postprocessModifications(array);
 }
Beispiel #6
0
 private static PropertyModification[] MaterialPropertyToPropertyModifications(string name, UnityEngine.Object target, Vector4 vec)
 {
     PropertyModification[] array = MaterialAnimationUtility.CreatePropertyModifications(4, target);
     MaterialAnimationUtility.SetupPropertyModification(name + ".x", vec.x, array[0]);
     MaterialAnimationUtility.SetupPropertyModification(name + ".y", vec.y, array[1]);
     MaterialAnimationUtility.SetupPropertyModification(name + ".z", vec.z, array[2]);
     MaterialAnimationUtility.SetupPropertyModification(name + ".w", vec.w, array[3]);
     return(array);
 }
Beispiel #7
0
 private static PropertyModification[] MaterialPropertyToPropertyModifications(MaterialProperty materialProp, UnityEngine.Object target, Color color)
 {
     PropertyModification[] array = MaterialAnimationUtility.CreatePropertyModifications(4, target);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".r", color.r, array[0]);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".g", color.g, array[1]);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".b", color.b, array[2]);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".a", color.a, array[3]);
     return(array);
 }
 private static void ApplyMaterialModificationToAnimationRecording(MaterialProperty materialProp, Object target, float value)
 {
     UndoPropertyModification[] propertyModifications = MaterialAnimationUtility.CreateUndoPropertyModifications(1, target);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name, value, propertyModifications[0]);
     UndoPropertyModification[] propertyModificationArray = Undo.postprocessModifications(propertyModifications);
 }
Beispiel #9
0
 private static PropertyModification[] MaterialPropertyToPropertyModifications(MaterialProperty materialProp, UnityEngine.Object target, float value)
 {
     PropertyModification[] array = MaterialAnimationUtility.CreatePropertyModifications(1, target);
     MaterialAnimationUtility.SetupPropertyModification(materialProp.name, value, array[0]);
     return(array);
 }