Exemplo n.º 1
0
 private void EditorForm_ObjectPropertyChanged(object sender, ObjectPropertyChangedEventArgs e)
 {
     if (e.Objects.Components.Any(c => c is Transform || c is ICmpRenderer))
         this.InvalidateSelectionStats();
 }
Exemplo n.º 2
0
		private void EditorForm_ObjectPropertyChanged(object sender, ObjectPropertyChangedEventArgs e)
		{
			if (!(e is PrefabAppliedEventArgs) && (sender is PropertyEditor) && (sender as PropertyEditor).ParentGrid == this.propertyGrid) return;
			if (!(e is PrefabAppliedEventArgs) && sender is PropertyGrid) return;

			// Update values if anything changed that relates to the grids current selection
			if (e.Objects.Components.GameObject().Any(o => this.propertyGrid.Selection.Contains(o)) ||
				e.Objects.Any(o => this.propertyGrid.Selection.Contains(o)) ||
				(e.Objects.Contains(Scene.Current) && this.propertyGrid.Selection.Any(o => o is GameObject || o is Component)))
				this.propertyGrid.UpdateFromObjects(100);
		}
		private void EditorForm_ObjectPropertyChanged(object sender, ObjectPropertyChangedEventArgs e)
		{
			if (this.selectedBody != null)
			{
				if (this.selectedBody.Disposed || this.selectedBody.GameObj == null || this.selectedBody.GameObj.Disposed)
				{
					this.ClearSelection();
					return;
				}
			}
			if (e.Objects.Any(o => o is Transform || o is RigidBody || o is ShapeInfo))
			{
				// Applying its Prefab invalidates a Collider's ShapeInfos: Deselect them.
				if (e is PrefabAppliedEventArgs)
					DualityEditorApp.Deselect(this, ObjectSelection.Category.Other);
				else
				{
					foreach (SelPolyShape sps in this.allObjSel.OfType<SelPolyShape>()) sps.UpdatePolyStats();
				//	foreach (SelEdgeShape sps in this.allObjSel.OfType<SelEdgeShape>()) sps.UpdateEdgeStats();
					foreach (SelLoopShape sps in this.allObjSel.OfType<SelLoopShape>()) sps.UpdateLoopStats();
					this.InvalidateSelectionStats();
					this.Invalidate();
				}
				this.UpdateToolbar();
			}
		}
		private void DualityEditorApp_ObjectPropertyChanged(object sender, ObjectPropertyChangedEventArgs e)
		{
			if (e.Objects.ResourceCount > 0)
			{
				foreach (var r in e.Objects.Resources)
					this.OnResourceModified(r);
			}
		}
Exemplo n.º 5
0
		private void EditorForm_ObjectPropertyChanged(object sender, ObjectPropertyChangedEventArgs e)
		{
			if (e is PrefabAppliedEventArgs || 
				(e.HasProperty(ReflectionInfo.Property_GameObject_PrefabLink) && e.HasAnyObject(Scene.Current.AllObjects)) || 
				(e.CompleteChange && e.HasObject(Scene.Current)))
				this.UpdatePrefabLinkStatus(false);

			if (e.HasProperty(ReflectionInfo.Property_GameObject_Name))
			{
				foreach (GameObjectNode node in e.Objects.GameObjects.Select(g => this.FindNode(g)))
					if (node != null) node.Text = node.Obj.Name;
			}
		}
Exemplo n.º 6
0
		private void EditorForm_ObjectPropertyChanged(object sender, ObjectPropertyChangedEventArgs e)
		{
			// If a Resources modified state changes, invalidate
			if (e.Objects.Resources.Any())
			{
				this.folderView.Invalidate();
				foreach (Prefab prefab in e.Objects.Resources.OfType<Prefab>())
				{
					ResourceNode resNode = this.NodeFromPath(prefab.Path) as ResourceNode;
					if (resNode == null) continue;
					resNode.UpdateImage();
				}
			}
		}
Exemplo n.º 7
0
		private void DualityEditorApp_ObjectPropertyChanged(object sender, ObjectPropertyChangedEventArgs e)
		{
			if (!e.Objects.Resources.Any()) return;
			this.glControl.Invalidate();
		}
		private void DualityEditorApp_ObjectPropertyChanged(object sender, ObjectPropertyChangedEventArgs e)
		{
			if (e.HasObject(this.prevImageValue))
			{
				this.InvalidatePreview();
				this.PerformGetValue();
			}
		}