瀏覽代碼

[fx] Refresh editor when any param of Event or Curve changes

Clément Espeute 1 天之前
父節點
當前提交
e7c5de82ae
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      hide/view/FXEditor.hx

+ 2 - 1
hide/view/FXEditor.hx

@@ -737,10 +737,11 @@ class FXEditor extends hide.view.FileView {
 			data.refreshObjectAnims();
 			data.refreshObjectAnims();
 		}
 		}
 
 
-		if(pname == "name" || pname == "time" || pname == "loop" || pname == "animation" || pname == "blendMode" || pname == "duration") {
+		if(p is Event || p is Curve) {
 			afterPan(false);
 			afterPan(false);
 			data.refreshObjectAnims();
 			data.refreshObjectAnims();
 			rebuildAnimPanel();
 			rebuildAnimPanel();
+			sceneEditor.sceneTree.refreshItem(p);
 			var fx3d = Std.downcast((cast data : hrt.prefab.Prefab).findFirstLocal3d(), hrt.prefab.fx.FX.FXAnimation);
 			var fx3d = Std.downcast((cast data : hrt.prefab.Prefab).findFirstLocal3d(), hrt.prefab.fx.FX.FXAnimation);
 			if (fx3d != null) {
 			if (fx3d != null) {
 				fx3d.initLoop();
 				fx3d.initLoop();