mirror of
				https://github.com/maxartz15/VertexAnimation.git
				synced 2025-10-30 16:25:42 +01:00 
			
		
		
		
	ApplyAnimationBounds option.
This commit is contained in:
		| @@ -37,6 +37,7 @@ namespace TAO.VertexAnimation.Editor | |||||||
| 		private void BakeGUI() | 		private void BakeGUI() | ||||||
| 		{ | 		{ | ||||||
| 			EditorGUILayout.PropertyField(serializedObject.FindProperty("lodSettings").FindPropertyRelative("lodSettings")); | 			EditorGUILayout.PropertyField(serializedObject.FindProperty("lodSettings").FindPropertyRelative("lodSettings")); | ||||||
|  | 			EditorGUILayout.PropertyField(serializedObject.FindProperty("applyAnimationBounds")); | ||||||
| 			EditorGUILayout.PropertyField(serializedObject.FindProperty("generateAnimationBook")); | 			EditorGUILayout.PropertyField(serializedObject.FindProperty("generateAnimationBook")); | ||||||
|  |  | ||||||
| 			using (new EditorGUILayout.HorizontalScope()) | 			using (new EditorGUILayout.HorizontalScope()) | ||||||
|   | |||||||
| @@ -18,6 +18,7 @@ namespace TAO.VertexAnimation.Editor | |||||||
| 		public bool includeInactive = false; | 		public bool includeInactive = false; | ||||||
| 	 | 	 | ||||||
| 		public LODSettings lodSettings = new LODSettings(); | 		public LODSettings lodSettings = new LODSettings(); | ||||||
|  | 		public bool applyAnimationBounds = true; | ||||||
| 		public bool generateAnimationBook = true; | 		public bool generateAnimationBook = true; | ||||||
| 		public bool generatePrefab = true; | 		public bool generatePrefab = true; | ||||||
| 		public Shader materialShader = null; | 		public Shader materialShader = null; | ||||||
| @@ -118,7 +119,11 @@ namespace TAO.VertexAnimation.Editor | |||||||
|  |  | ||||||
| 			for (int i = 0; i < meshes.Length; i++) | 			for (int i = 0; i < meshes.Length; i++) | ||||||
| 			{ | 			{ | ||||||
| 				meshes[i].bounds = bounds; | 				if (applyAnimationBounds) | ||||||
|  | 				{ | ||||||
|  | 					meshes[i].bounds = bounds; | ||||||
|  | 				} | ||||||
|  |  | ||||||
| 				meshes[i].Finalize(); | 				meshes[i].Finalize(); | ||||||
| 				AssetDatabase.AddObjectToAsset(meshes[i], this); | 				AssetDatabase.AddObjectToAsset(meshes[i], this); | ||||||
| 			} | 			} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user