aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js26
1 files changed, 19 insertions, 7 deletions
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js
index 38a6865c..91d50234 100755
--- a/js/panels/Materials/materials-popup.reel/materials-popup.js
+++ b/js/panels/Materials/materials-popup.reel/materials-popup.js
@@ -160,14 +160,26 @@ exports.MaterialsPopup = Montage.create(Component, {
160 var selection = this.application.ninja.selectedElements; 160 var selection = this.application.ninja.selectedElements;
161 if (selection && (selection.length > 0)) 161 if (selection && (selection.length > 0))
162 { 162 {
163 var canvas = selection[0]; 163 var nObjs = selection.length;
164 var obj; 164 for (var iObj=0; iObj<nObjs; iObj++)
165 if (canvas.elementModel && canvas.elementModel.shapeModel) obj = canvas.elementModel.shapeModel.GLGeomObj;
166 if (obj)
167 { 165 {
168 var world = obj.getWorld(); 166 var canvas = selection[iObj];
169 if (world) 167 var obj;
170 world.restartRenderLoop(); 168 if (canvas.elementModel && canvas.elementModel.shapeModel) obj = canvas.elementModel.shapeModel.GLGeomObj;
169 if (obj)
170 {
171 var matArray = obj._materialArray;
172 var matTypeArray = obj._materialTypeArray;
173 var nMats = matArray.length;
174 for (var iMat=0; iMat<nMats; iMat++)
175 {
176 if (matTypeArray[iMat] === this._whichMaterial)
177 matArray[iMat].setProperty( this._propNames[index], value );
178 }
179 var world = obj.getWorld();
180 if (world)
181 world.restartRenderLoop();
182 }
171 } 183 }
172 } 184 }
173 } 185 }