public BSSelectedBoxModify(Dictionary <IntVector3, byte> old_value, Dictionary <IntVector3, byte> new_value, BSSelectBrush brush) { old_selection = old_value; new_selection = new_value; select_brush = brush; data_source = brush.dataSource; }
bool OnCanClickSaveBtn() { if (PEBuildingMan.Self == null) { return(true); } if (!PEBuildingMan.Self.selectVoxel) { BSSelectBrush select_brush = m_CurBrush as BSSelectBrush; if (select_brush != null) { if (!select_brush.IsEmpty()) { PEBuildingMan.Self.IsoCaputure.Computer.ClearDataDS(); foreach (var kvp in select_brush.Selections) { BSVoxel voxel = BuildingMan.Blocks.Read(kvp.Key.x, kvp.Key.y, kvp.Key.z); PEBuildingMan.Self.IsoCaputure.Computer.AlterBlockInBuild(kvp.Key.x, kvp.Key.y, kvp.Key.z, voxel.ToBlock()); } PEBuildingMan.Self.IsoCaputure.Computer.RebuildMesh(); PEBuildingMan.Self.IsoCaputure.EnableCapture(); mSaveWnd.SetIsoItemContent(PEBuildingMan.Self.IsoCaputure.photoRT); select_brush.canDo = false; return(true); } } BSIsoSelectBrush iso_select = m_CurBrush as BSIsoSelectBrush; //BSIsoSelectBrush iso_select = PEBuildingMan.Self.Manipulator.activeBrush as BSIsoSelectBrush; if (iso_select != null) { List <IntVector3> voxels = iso_select.GetSelectionPos(); if (voxels.Count != 0) { PEBuildingMan.Self.IsoCaputure.Computer.ClearDataDS(); for (int i = 0; i < voxels.Count; i++) { BSVoxel voxel = BuildingMan.Blocks.Read(voxels[i].x, voxels[i].y, voxels[i].z); PEBuildingMan.Self.IsoCaputure.Computer.AlterBlockInBuild(voxels[i].x, voxels[i].y, voxels[i].z, voxel.ToBlock()); } PEBuildingMan.Self.IsoCaputure.Computer.RebuildMesh(); PEBuildingMan.Self.IsoCaputure.EnableCapture(); mSaveWnd.SetIsoItemContent(PEBuildingMan.Self.IsoCaputure.photoRT); return(true); } } } return(false); }
void OnSaveIsoClose() { PEBuildingMan.Self.IsoCaputure.DisableCapture(); BSSelectBrush select_brush = m_CurBrush as BSSelectBrush; if (select_brush != null) { select_brush.canDo = true; } }