From 93c767153ef23f132de8c884bcf1a9b3c47a023d Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Tue, 6 Oct 2015 11:21:57 -0400 Subject: [PATCH] material workflow is not broken --- js/cam/Cam.js | 3 ++- js/cells/DMACell.js | 2 +- js/materials/DMAMaterials.js | 2 +- js/menus/templates/Ribbon.html | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/cam/Cam.js b/js/cam/Cam.js index bc947101..64fd5037 100644 --- a/js/cam/Cam.js +++ b/js/cam/Cam.js @@ -179,6 +179,7 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel _setCAMVisibility: function(){ var visible = this.isVisible(); + console.log(visible); // this.get("origin").visible = visible; // this.get("stock").visible = visible; if (visible && !this.get("assembler")) this.selectMachine(); @@ -216,7 +217,7 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel isVisible: function(){ var currentTab = appState.get("currentTab"); var currentNav = appState.get("currentNav"); - return (currentTab == "assemblerSetup" || currentTab == "cam" || currentTab == "animate" || currentNav == "navComm" + return (currentTab == "assemblerSetup" || currentTab == "cam" || currentTab == "animation" || currentNav == "navComm" || currentTab == "editComponent"); }, diff --git a/js/cells/DMACell.js b/js/cells/DMACell.js index 070de485..d533bfc5 100644 --- a/js/cells/DMACell.js +++ b/js/cells/DMACell.js @@ -259,7 +259,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', ' var transparent = evalFunction(this); if (transparent == this.isTransparent) return; this.isTransparent = transparent; - this.setMaterial(this.getMaterial(true)); + this._setTHREEMaterial(this.getMaterial(true)); this.setWireframeVisibility(!this.isTransparent); if (this.parts) { _.each(this.parts, function(part){ diff --git a/js/materials/DMAMaterials.js b/js/materials/DMAMaterials.js index fce8698a..c844d3cb 100644 --- a/js/materials/DMAMaterials.js +++ b/js/materials/DMAMaterials.js @@ -159,7 +159,7 @@ define(['underscore', 'three', 'appState', 'lattice', 'materialsPlist', 'threeMo loopCells(cells, function(cell){ if (!cell) return; var isComposite = _isComposite(cell.getMaterialID()); - if ((elementaryTypes && !isComposite) || (!elementaryTypes && isComposite)) children.push(cell.materialID); + if ((elementaryTypes && !isComposite) || (!elementaryTypes && isComposite)) children.push(cell.getMaterialID()); if (isComposite){ if (elementaryTypes && materialsList[cell.materialID].elementaryChildren) { Array.prototype.push.apply(children, materialsList[cell.materialID].elementaryChildren); diff --git a/js/menus/templates/Ribbon.html b/js/menus/templates/Ribbon.html index 6ce50d48..06537a8e 100644 --- a/js/menus/templates/Ribbon.html +++ b/js/menus/templates/Ribbon.html @@ -12,7 +12,6 @@ <% }else{ %> <a class="btn btn-primary btn-ribbon ribbonDeleteMode<% if (deleteMode){ %> ribbon-selected"<% } %>"><span class="fui-cross"></span></a> <% } %> - <a id="ribbonAxesToggle" class="btn btn-primary btn-ribbon <% if (axesAreVisible){ %> ribbon-selected"<% } %>">Axes</a> </div> </div> <!--//<a class="btn btn-primary btn-ribbon highlightMode<% if (highlightMode){ %> ribbon-selected<% } %>" href="#"><img data-type="part" src="assets/imgs/cursor-light.png"></a>--> -- GitLab