From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- js/panels/Materials/materials-popup.reel/materials-popup.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 js/panels/Materials/materials-popup.reel/materials-popup.js (limited to 'js/panels/Materials/materials-popup.reel/materials-popup.js') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js old mode 100644 new mode 100755 -- cgit v1.2.3 From 805059d68087530721212a650412aefb85e98d1f Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 9 Feb 2012 10:26:57 -0800 Subject: Removed unused materials. Signed-off-by: Nivesh Rajbhandari --- .../Materials/materials-popup.reel/materials-popup.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'js/panels/Materials/materials-popup.reel/materials-popup.js') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index afdc3628..62ca5395 100644 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -236,21 +236,11 @@ exports.MaterialsPopup = Montage.create(Component, { { this._materialName = materialID; if( - (materialID === "BrickMaterial") || - (materialID === "UberMaterial") || + (materialID === "UberMaterial") || (materialID === "FlatMaterial") || (materialID === "BumpMetalMaterial") || - (materialID === "PlasmaMaterial") || (materialID === "LinearGradientMaterial") || - (materialID === "RadialGradientMaterial") || - (materialID === "RadialBlurMaterial") || - (materialID === "PulseMaterial") || - (materialID === "TunnelMaterial") || - (materialID === "TwistMaterial") || - (materialID === "KeleidoscopeMaterial") || - (materialID === "JuliaMaterial") || - (materialID === "MandelMaterial") || - (materialID === "IridescentScalesMaterial") + (materialID === "RadialGradientMaterial") ) { var material = MaterialsLibrary.getMaterial( materialID ); -- cgit v1.2.3 From d2f4d5e5f6742d53b6324d585a700566f73c992a Mon Sep 17 00:00:00 2001 From: mqg734 Date: Tue, 21 Feb 2012 16:49:11 -0800 Subject: Updated Materials Library and Materials Editor Popup to work with latest version of Montage. We had to change our css to not use id's. Also, updated the popup to use Montage's Popup component. It looks like bump material has a bug. So loading that material results in a runtime error. --- .../materials-popup.reel/materials-popup.js | 47 ++++++++-------------- 1 file changed, 16 insertions(+), 31 deletions(-) (limited to 'js/panels/Materials/materials-popup.reel/materials-popup.js') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index 62ca5395..508b8130 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -11,36 +11,13 @@ var Button = require("js/components/button.reel").Button; //////////////////////////////////////////////////////////////////////// //Exporting as MaterialsPopup exports.MaterialsPopup = Montage.create(Component, { - //////////////////////////////////////////////////////////////////// - okButton: { - enumerable: false, - value: null - }, - - cancelButton: { - enumerable: false, - value: null - }, - //////////////////////////////////////////////////////////////////// // Material Properties - - materialsProperties: { - enumerable: true, - serializable: true, - value: null - }, - _materialName: { enumerable: true, - value: "Material" + value: "" }, - materialTitle: { - enumerable: true, - value: null - }, - captureAction: { value:function(event) { switch(event._currentTarget.label) @@ -69,6 +46,9 @@ exports.MaterialsPopup = Montage.create(Component, { } break; } + + // Notify Materials Library to close popup + NJevent("hideMaterialPopup"); } }, @@ -235,12 +215,12 @@ exports.MaterialsPopup = Montage.create(Component, { value: function(materialID) { this._materialName = materialID; - if( + if( (materialID === "UberMaterial") || (materialID === "FlatMaterial") || - (materialID === "BumpMetalMaterial") || - (materialID === "LinearGradientMaterial") || - (materialID === "RadialGradientMaterial") + (materialID === "BumpMetalMaterial") || + (materialID === "LinearGradientMaterial") || + (materialID === "RadialGradientMaterial") ) { var material = MaterialsLibrary.getMaterial( materialID ); @@ -323,6 +303,8 @@ exports.MaterialsPopup = Montage.create(Component, { { value: function( label, color ) { + var css = 'rgba(' + color[0]*255 + ',' + color[1]*255 + ',' + color[2]*255 + ',' + color[3] + ')'; + var colorObj = this.application.ninja.colorController.getColorObjFromCss(css) var obj = { "label": label, @@ -330,7 +312,7 @@ exports.MaterialsPopup = Montage.create(Component, { "controlType": "ColorChip", "defaults": { - "color": { r:color[0]*255, g:color[1]*255, b:color[2]*255, a:color[3] } + "color": colorObj } }; @@ -644,7 +626,7 @@ exports.MaterialsPopup = Montage.create(Component, { _materialsData: { enumerable: true, serializable: true, - value: this._dummyData1 + value: [] }, @@ -656,7 +638,10 @@ exports.MaterialsPopup = Montage.create(Component, { }, set: function(data) { this._materialsData = data; - this.materialsProperties.needsDraw = true; + if(this.materialsProperties) + { + this.materialsProperties.needsDraw = true; + } } } -- cgit v1.2.3