Browse Source

render props: fix override render props

LeoVgr 1 year ago
parent
commit
399b6f0cdc
4 changed files with 5 additions and 5 deletions
  1. 2 2
      hide/comp/SceneEditor.hx
  2. 1 1
      hide/view/FXEditor.hx
  3. 1 1
      hide/view/Model.hx
  4. 1 1
      hide/view/Prefab.hx

+ 2 - 2
hide/comp/SceneEditor.hx

@@ -453,7 +453,7 @@ class HelpPopup extends Popup {
 class RenderPropsPopup extends Popup {
 class RenderPropsPopup extends Popup {
 	var editor:SceneEditor;
 	var editor:SceneEditor;
 
 
-	public function new(?parent:Element, ?root:Element, editor:SceneEditor, isSearchable = false, canChangeCurrRp = false) {
+	public function new(?parent:Element, ?root:Element, view:hide.view.FileView, editor:SceneEditor, isSearchable = false, canChangeCurrRp = false) {
 		super(parent, root, isSearchable);
 		super(parent, root, isSearchable);
 		this.editor = editor;
 		this.editor = editor;
 
 
@@ -476,7 +476,7 @@ class RenderPropsPopup extends Popup {
 			return;
 			return;
 		}
 		}
 
 
-		var renderProps = hide.Ide.inst.currentConfig.get("scene.renderProps");
+		var renderProps = view.config.getLocal("scene.renderProps");
 
 
 		if (renderProps is String) {
 		if (renderProps is String) {
 			var s_renderProps:String = cast renderProps;
 			var s_renderProps:String = cast renderProps;

+ 1 - 1
hide/view/FXEditor.hx

@@ -573,7 +573,7 @@ class FXEditor extends FileView {
 
 
 		tools.addSeparator();
 		tools.addSeparator();
 
 
-		tools.addPopup(null, "Render Props", (e) -> new hide.comp.SceneEditor.RenderPropsPopup(null, e, sceneEditor, true), null);
+		tools.addPopup(null, "Render Props", (e) -> new hide.comp.SceneEditor.RenderPropsPopup(null, e, this, sceneEditor, true), null);
 
 
 		tools.addSeparator();
 		tools.addSeparator();
 
 

+ 1 - 1
hide/view/Model.hx

@@ -746,7 +746,7 @@ class Model extends FileView {
 
 
 		tools.addSeparator();
 		tools.addSeparator();
 
 
-		tools.addPopup(null, "Render Props", (e) -> new hide.comp.SceneEditor.RenderPropsPopup(null, e, sceneEditor, true, true), null);
+		tools.addPopup(null, "Render Props", (e) -> new hide.comp.SceneEditor.RenderPropsPopup(null, e, this, sceneEditor, true, true), null);
 
 
 		tools.addSeparator();
 		tools.addSeparator();
 
 

+ 1 - 1
hide/view/Prefab.hx

@@ -502,7 +502,7 @@ class Prefab extends FileView {
 		toolsDefs.push({
 		toolsDefs.push({
 			id: "renderProps",
 			id: "renderProps",
 			title: "Render props",
 			title: "Render props",
-			type: Popup((e) -> new hide.comp.SceneEditor.RenderPropsPopup(null, e, sceneEditor, true))
+			type: Popup((e) -> new hide.comp.SceneEditor.RenderPropsPopup(null, e, this, sceneEditor, true))
 		});
 		});
 
 
 		toolsDefs.push({
 		toolsDefs.push({