private void primitiveRemoved(LDrawStep step, LDrawPrimitive part) { if (!(part is LDrawPart)) { return; } if (customBrickData.ContainsKey(part as LDrawPart)) { PluginLoader.Log("Detected a part removal from the UI. Removing also our extra data reference."); customBrickData.Remove(part as LDrawPart); } }
private void PartModified(LDrawPrimitive part) { PluginLoader.Log("part modified!"); if (!(part is LDrawPart)) { return; } LDrawPart modifiedPart = part as LDrawPart; if (customBrickData.ContainsKey(modifiedPart) == false) { return; } PluginLoader.Log("Part modified! " + customBrickData[modifiedPart].myID); }