From 60d6346a78fb5257eaf36f17a5fcb764a342c012 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 16 Apr 2012 15:07:16 -0700 Subject: Fixed materials editor popup not refreshing correctly. Signed-off-by: Nivesh Rajbhandari --- .../materials-popup.reel/materials-popup.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index bbccf45d..bd10f7a5 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -214,10 +214,9 @@ exports.MaterialsPopup = Montage.create(Component, { enumerable: true, value: function(materialID) { - // Note that setting Array.length = 0 will empty arrays, - // which is fine if you use getMaterialData to get a new array, but not for the - // dummyData arrays. - this._materialsData.length = 0; + //TODO - Hack to force repetition to draw. Setting .length = 0 did not work. + this.materialsData = []; + this._materialName = materialID; if( (materialID === "UberMaterial") || @@ -231,16 +230,14 @@ exports.MaterialsPopup = Montage.create(Component, { if (material) { this._material = material; - var matData = this.getMaterialData( material ); - this.materialsData = matData; + this.materialsData = this.getMaterialData( material ); } } else { - this.materialsData = this._dummyData1.slice(0); + this.materialsData = this[materialID]; } - - this.needsDraw = true; + this.needsDraw = true; } }, @@ -445,7 +442,8 @@ exports.MaterialsPopup = Montage.create(Component, { } }, - _dummyData1: { + // _dummyData1 + CheckerBoard: { value: [ { "label": "Texture1", @@ -588,7 +586,8 @@ exports.MaterialsPopup = Montage.create(Component, { ] }, - _dummyData2: { + // _dummyData2 + ShinyMetal: { value: [ { "label": "Diffuse", -- cgit v1.2.3 From c58dc96130c7eb5d964af53e9ad6e80bba5e647f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Apr 2012 17:24:40 -0700 Subject: initial stage web template Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index d9dca538..7fab1eb0 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -187,6 +187,7 @@ exports.Properties = Montage.create(Component, { displayStageProperties: { value: function() { + /* var stage = this.application.ninja.currentDocument.documentRoot; //this is test code please remove this.elementName.value = "Stage"; -- cgit v1.2.3 From c62273126004f057de40ce91ecda5606643f4c92 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 20 Apr 2012 16:37:47 -0700 Subject: reverting old template to current working status. New template work. Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 7fab1eb0..f57982b6 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -187,7 +187,7 @@ exports.Properties = Montage.create(Component, { displayStageProperties: { value: function() { - /* + var stage = this.application.ninja.currentDocument.documentRoot; //this is test code please remove this.elementName.value = "Stage"; -- cgit v1.2.3 From 3dfd75a1d7948ef369188e1ca23c0f044c0d17a1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 20 Apr 2012 16:43:31 -0700 Subject: more backup fixes for the old stage Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index f57982b6..d9dca538 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -187,7 +187,6 @@ exports.Properties = Montage.create(Component, { displayStageProperties: { value: function() { - var stage = this.application.ninja.currentDocument.documentRoot; //this is test code please remove this.elementName.value = "Stage"; -- cgit v1.2.3 From 3f8f224170937d498d3a03c706494408a6b4bf1d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 23 Apr 2012 13:47:35 -0700 Subject: Temporary fix for the PI and Stage when opening the new template. Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index d9dca538..b21014c1 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -73,8 +73,9 @@ exports.Properties = Montage.create(Component, { this.eventManager.addEventListener( "elementChange", this, false); - // For now always assume that the stage is selected by default - if(this.application.ninja.selectedElements.length === 0) { + // For now always assume that the stage is selected by default when opening the old template + // TODO: Remove marker for old template: NINJA-STAGE-REWORK + if(this.application.ninja.selectedElements.length === 0 && this.application.ninja.currentDocument.documentRoot.nodeName.toLowerCase() !== "body") { this.displayStageProperties(); } } -- cgit v1.2.3