aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Materials
diff options
context:
space:
mode:
authorEric Guzman2012-04-30 13:48:43 -0700
committerEric Guzman2012-04-30 13:48:43 -0700
commit23d8efd4ed9e8fd43f516595009679fb44c8096d (patch)
tree7d5be06e6417102702a49ece24fca82528aced7a /js/panels/Materials
parentae94b22c27b9b155e94bf140631e7faf8f55c6c0 (diff)
parentc8fac64d4ad8ac18744a17a5e0f0d17204355fd6 (diff)
downloadninja-23d8efd4ed9e8fd43f516595009679fb44c8096d.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
Diffstat (limited to 'js/panels/Materials')
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.html17
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.html18
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js21
3 files changed, 22 insertions, 34 deletions
diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
index 4e41512f..741ff6aa 100755
--- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
+++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
@@ -1,4 +1,4 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<!-- <copyright> 2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/> 3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> 4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
@@ -47,12 +47,10 @@
47 ] 47 ]
48 }, 48 },
49 "materialInfo": { 49 "materialInfo": {
50 "module": "js/panels/Materials/materials-popup.reel", 50 "prototype": "js/panels/Materials/materials-popup.reel"
51 "name": "MaterialsPopup"
52 }, 51 },
53 "materialsController" : { 52 "materialsController" : {
54 "module": "js/controllers/tree-controller", 53 "prototype": "js/controllers/tree-controller",
55 "name": "TreeController",
56 "properties" : { 54 "properties" : {
57 "branchKey" : "children", 55 "branchKey" : "children",
58 "labelKey" : "label", 56 "labelKey" : "label",
@@ -66,8 +64,7 @@
66 } 64 }
67 }, 65 },
68 "materialsContainer" : { 66 "materialsContainer" : {
69 "module" : "js/components/treeview/treeview.reel", 67 "prototype" : "js/components/treeview/treeview.reel",
70 "name" : "Treeview",
71 "properties" : { 68 "properties" : {
72 "element" : {"#": "materials_library_tree"}, 69 "element" : {"#": "materials_library_tree"},
73 "branchComponent" : {"@": "branch" }, 70 "branchComponent" : {"@": "branch" },
@@ -76,12 +73,10 @@
76 } 73 }
77 }, 74 },
78 "branch" : { 75 "branch" : {
79 "module" : "js/components/treeview/ninja-branch.reel", 76 "prototype" : "js/components/treeview/ninja-branch.reel[Branch]"
80 "name" : "Branch"
81 }, 77 },
82 "owner": { 78 "owner": {
83 "module": "js/panels/Materials/materials-library-panel.reel", 79 "prototype": "js/panels/Materials/materials-library-panel.reel[MaterialsLibraryPanels]",
84 "name": "MaterialsLibraryPanels",
85 "properties": { 80 "properties": {
86 "element": {"#": "materials_library_panel"}, 81 "element": {"#": "materials_library_panel"},
87 "_materialInfo": {"@": "materialInfo"} 82 "_materialInfo": {"@": "materialInfo"}
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.html b/js/panels/Materials/materials-popup.reel/materials-popup.html
index ae0ee2c8..9fdbc00d 100755
--- a/js/panels/Materials/materials-popup.reel/materials-popup.html
+++ b/js/panels/Materials/materials-popup.reel/materials-popup.html
@@ -14,32 +14,28 @@
14 <script type="text/montage-serialization"> 14 <script type="text/montage-serialization">
15 { 15 {
16 "okButton": { 16 "okButton": {
17 "module": "montage/ui/button.reel", 17 "prototype": "montage/ui/button.reel",
18 "name": "Button",
19 "properties": { 18 "properties": {
20 "element": {"#": "mp_ok_btn"}, 19 "element": {"#": "mp_ok_btn"},
21 "label": "OK" 20 "label": "OK"
22 } 21 }
23 }, 22 },
24 "cancelButton": { 23 "cancelButton": {
25 "module": "montage/ui/button.reel", 24 "prototype": "montage/ui/button.reel",
26 "name": "Button",
27 "properties": { 25 "properties": {
28 "element": {"#": "mp_cancel_btn"}, 26 "element": {"#": "mp_cancel_btn"},
29 "label": "Cancel" 27 "label": "Cancel"
30 } 28 }
31 }, 29 },
32 "eventDelegator": { 30 "eventDelegator": {
33 "module": "montage/core/event/action-event-listener", 31 "prototype": "montage/core/event/action-event-listener",
34 "name": "ActionEventListener",
35 "properties": { 32 "properties": {
36 "handler": {"@": "owner"}, 33 "handler": {"@": "owner"},
37 "action": "updatePreview" 34 "action": "updatePreview"
38 } 35 }
39 }, 36 },
40 "propControl1": { 37 "propControl1": {
41 "module": "js/components/ui/property-control.reel", 38 "prototype": "js/components/ui/property-control.reel",
42 "name": "PropertyControl",
43 "properties": { 39 "properties": {
44 "element": {"#": "mp_property"} 40 "element": {"#": "mp_property"}
45 }, 41 },
@@ -64,8 +60,7 @@
64 ] 60 ]
65 }, 61 },
66 "materialsProperties": { 62 "materialsProperties": {
67 "module": "montage/ui/repetition.reel", 63 "prototype": "montage/ui/repetition.reel",
68 "name": "Repetition",
69 "properties": { 64 "properties": {
70 "element": {"#": "mp_properties_list"} 65 "element": {"#": "mp_properties_list"}
71 }, 66 },
@@ -78,8 +73,7 @@
78 } 73 }
79 }, 74 },
80 "owner": { 75 "owner": {
81 "module": "js/panels/Materials/materials-popup.reel", 76 "prototype": "js/panels/Materials/materials-popup.reel",
82 "name": "MaterialsPopup",
83 "properties": { 77 "properties": {
84 "materialsProperties": {"@": "materialsProperties"}, 78 "materialsProperties": {"@": "materialsProperties"},
85 "element": {"#": "materials_popup"}, 79 "element": {"#": "materials_popup"},
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, {
214 enumerable: true, 214 enumerable: true,
215 value: function(materialID) 215 value: function(materialID)
216 { 216 {
217 // Note that setting Array.length = 0 will empty arrays, 217 //TODO - Hack to force repetition to draw. Setting .length = 0 did not work.
218 // which is fine if you use getMaterialData to get a new array, but not for the 218 this.materialsData = [];
219 // dummyData arrays. 219
220 this._materialsData.length = 0;
221 this._materialName = materialID; 220 this._materialName = materialID;
222 if( 221 if(
223 (materialID === "UberMaterial") || 222 (materialID === "UberMaterial") ||
@@ -231,16 +230,14 @@ exports.MaterialsPopup = Montage.create(Component, {
231 if (material) 230 if (material)
232 { 231 {
233 this._material = material; 232 this._material = material;
234 var matData = this.getMaterialData( material ); 233 this.materialsData = this.getMaterialData( material );
235 this.materialsData = matData;
236 } 234 }
237 } 235 }
238 else 236 else
239 { 237 {
240 this.materialsData = this._dummyData1.slice(0); 238 this.materialsData = this[materialID];
241 } 239 }
242 240 this.needsDraw = true;
243 this.needsDraw = true;
244 } 241 }
245 }, 242 },
246 243
@@ -445,7 +442,8 @@ exports.MaterialsPopup = Montage.create(Component, {
445 } 442 }
446 }, 443 },
447 444
448 _dummyData1: { 445 // _dummyData1
446 CheckerBoard: {
449 value: [ 447 value: [
450 { 448 {
451 "label": "Texture1", 449 "label": "Texture1",
@@ -588,7 +586,8 @@ exports.MaterialsPopup = Montage.create(Component, {
588 ] 586 ]
589 }, 587 },
590 588
591 _dummyData2: { 589 // _dummyData2
590 ShinyMetal: {