private String GetMaterialImageKey(OutlinerMaterial mat) { if (mat.IsUnassigned) return "material_unassigned"; else if (mat.Type == OutlinerScene.XrefMaterialType) return "material_xref"; else return "material"; }
public MaterialDragDropHandler(Outliner.TreeView tree, OutlinerMaterial data) : base(tree, null) { Data = data; }
internal void AddMaterialToTree(OutlinerMaterial material) { if (material == null || ListMode != OutlinerListMode.Material) return; if (Filter.ShowNode(material)) { BeginTimedUpdate(); BeginTimedSort(); TreeNode tn = CreateTreeNodeForOutlinerNode(material); // Add all objects belonging to the layer to the layers nodecollection. this.AddObjectsToTreeNodeCollection(tn.Nodes, material.ChildNodes, false); _treeNodes.Add(material, tn); this.Nodes.Add(tn); } }
public void RemoveMaterial(OutlinerMaterial mat) { materials.Remove(mat.Handle); objects_by_materialHandle.Remove(mat.Handle); removeHandleFromListInDict(mat.Handle, materials_by_parentHandle, mat.ParentHandle); }
public Boolean IsValidMaterialName(OutlinerMaterial editingMaterial, String newName) { if (newName == String.Empty) return false; foreach (KeyValuePair<Int32, OutlinerMaterial> kvp in materials) { if (String.Compare(kvp.Value.Name, newName, true) == 0 && kvp.Value != editingMaterial) return false; } return true; }
public void AddMaterial(Int32 handle, Int32 parentHandle, String name, String type) { OutlinerMaterial mat = new OutlinerMaterial(this, handle, parentHandle, name, type); AddMaterial(mat); }
public void AddMaterial(OutlinerMaterial mat) { if (!materials.ContainsKey(mat.Handle)) { materials.Add(mat.Handle, mat); addHandleToListInDict(mat.Handle, materials_by_parentHandle, mat.ParentHandle); } }
private Boolean MaterialIsVisible(OutlinerMaterial mat) { if (NameFilter != String.Empty && !Regex.IsMatch(mat.Name, NameFilter, _nameFilterOptions)) return false; if (mat.IsUnassigned && mat.ChildNodesCount == 0) return false; return true; }