Skip to content
Snippets Groups Projects
Commit eb3eb4ed authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

composite children in material definitions

parent 4d57f555
Branches
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
defaults: _.extend(LatticeBase.prototype.defaults, {
name: "",
color: null
color: null,
}),
__initialize: function(options, callback){
......
......@@ -14,7 +14,20 @@ Available Materials:<br/>
</label>
<% }); %>
<% _.each(_.keys(materials), function(key){
if (key == id || key.substr(0,5) != "super") return; %>
<!--if (key == id || key.substr(0,5) != "super") return;-->
<!--if (checkForLoops(key)) return;-->
<!--function checkForLoops(_key){-->
<!--console.log(materials[_key].compositeChildren);-->
<!--if (materials[_key].compositeChildren) {-->
<!--if (materials[_key].compositeChildren.indexOf(id)>0) return true;-->
<!--var childMatches = _.filter(materials[_key].compositeChildren, function(childKey){-->
<!--return checkForLoops(childKey);-->
<!--});-->
<!--if (childMatches.length>0) return true;-->
<!--}-->
<!--return false;-->
<!--}-->
%>
<label class="radio colorSwatches">
<input type="radio" <%if (key == materialType){ %>checked<%}%> name="materialType" value="<%= key %>" data-toggle="radio" class="custom-radio appState"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
<div class="materialColorSwatch">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment