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. --- js/panels/properties/content.reel/content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/properties/content.reel') diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js index 53926c78..9b6416c7 100755 --- a/js/panels/properties/content.reel/content.js +++ b/js/panels/properties/content.reel/content.js @@ -163,7 +163,7 @@ exports.Content = Montage.create(Component, { // For now hardcode the background since it is the only custom property // No need to loop through all the properties. var backgroundChip = this.customSections[0].content.controls["background"]; - backgroundChip.initialColor = ElementsMediator.getProperty(stage, "background"); + backgroundChip.color = ElementsMediator.getProperty(stage, "background"); /* var customPI = PiData[this.customPi]; -- cgit v1.2.3 From d2cf980bece41594ac0756b5974a4414ca78a84c Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 23 Feb 2012 15:01:10 -0800 Subject: Fix to read back colors when re-opening files. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties/content.reel/content.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'js/panels/properties/content.reel') diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js index 9b6416c7..8fa33a75 100755 --- a/js/panels/properties/content.reel/content.js +++ b/js/panels/properties/content.reel/content.js @@ -255,6 +255,12 @@ exports.Content = Montage.create(Component, { if(currentValue) { + if(currentValue.color) + { + currentValue.color.wasSetByCode = true; + currentValue.color.type = "change"; + } + if(currentValue.mode === "gradient") { this.application.ninja.colorController.colorModel["gradient"] = @@ -267,7 +273,14 @@ exports.Content = Montage.create(Component, { this.application.ninja.colorController.colorModel.alpha = {value: currentValue.color.a, wasSetByCode: true, type: 'change'}; } - this.application.ninja.colorController.colorModel[currentValue.color.mode] = currentValue.color; + if(currentValue.color.mode) + { + this.application.ninja.colorController.colorModel[currentValue.color.mode] = currentValue.color; + } + else + { + this.application.ninja.colorController.colorModel["rgb"] = currentValue.color; + } } } else -- cgit v1.2.3