Added "Paste Properties Options" form, which lets you pick properties for 'Copy Properties' and 'Paste Properties' actions.

Removed CopyPasteSectorProperties plugin, because built-in "Copy/Paste Properties" actions do the same job, but better.
This commit is contained in:
MaxED 2014-04-09 10:16:33 +00:00
parent 0d6f9a2594
commit dddf91e56e
27 changed files with 776 additions and 601 deletions

View file

@ -13,8 +13,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagExplorer", "Source\Plugi
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommentsPanel", "Source\Plugins\CommentsPanel\CommentsPanel.csproj", "{58BD8A5B-1B48-435D-8473-A92F27D06C49}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopyPasteSectorProperties", "Source\Plugins\CopyPasteSectorProps\CopyPasteSectorProperties.csproj", "{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NodesViewer", "Source\Plugins\NodesViewer\NodesViewer.csproj", "{9F244231-6A0C-42A6-87C5-ED9620DEE096}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StairSectorBuilder", "Source\Plugins\StairSectorBuilder\StairSectorBuilder.csproj", "{3F365121-906B-409D-BB1E-37E0A78056C2}"
@ -109,18 +107,6 @@ Global
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|Win32.ActiveCfg = Release|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.ActiveCfg = Release|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.Build.0 = Release|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|Any CPU.ActiveCfg = Debug|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|Mixed Platforms.Build.0 = Debug|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|Win32.ActiveCfg = Debug|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|x86.ActiveCfg = Debug|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Debug|x86.Build.0 = Debug|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|Any CPU.ActiveCfg = Release|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|Mixed Platforms.ActiveCfg = Release|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|Mixed Platforms.Build.0 = Release|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|Win32.ActiveCfg = Release|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|x86.ActiveCfg = Release|x86
{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}.Release|x86.Build.0 = Release|x86
{9F244231-6A0C-42A6-87C5-ED9620DEE096}.Debug|Any CPU.ActiveCfg = Debug|x86
{9F244231-6A0C-42A6-87C5-ED9620DEE096}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{9F244231-6A0C-42A6-87C5-ED9620DEE096}.Debug|Mixed Platforms.Build.0 = Debug|x86

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -91,6 +91,8 @@ Jump to: <a href="#general">General interface</a> |
<li>Camera position can be synchronized between Classic and Visual modes. <a href="all_modes/synch_camera.html">More info</a>.</li>
<li>You can use <a href="all_modes/colorpicker.html">Color Picker plugin </a> to edit dynamic light properties and sector's fog and tint colors in Classic and Visual modes.</li>
<li>You can use <a href="all_modes/tagexplorer.html">Tag Explorer plugin</a> to view all tags and actions used in current map.</li>
<li><span class="style1"><strong>[new]</strong></span> You can pick, which properties are pasted by &quot;Paste Properties&quot; action using &quot;Paste Properties Options&quot; window. <input class="spoilerbutton" type="button" onclick="ToggleSpoiler(this);" href="javascript:void(0);" value="Show image"/>
<div style="display: none; margin: 0px; padding: 6px; border: 1px inset;"> <img src="all_modes/paste_properties_options.jpg" alt="" /></div></li>
<li><span class="style1"><strong>[new]</strong></span> You can apply <a href="all_modes/jitter.html">jitter transform</a> to any map element.</li>
<li>Image browser shows directory structure of Folder, PK3 and PK7 resources and can filter images by texture type and size. <a href="all_modes/texture_browser.html">More info</a>.</li>
<li><span class="style1"><strong>[new]</strong></span> Most controls of Edit Sector/Linedef/Thing forms now work in realtime (e.g. you can immediately see texture offset/scale/rotation changes while you are changing appropriate values). Action and Tag changes are still applied only after you press &quot;OK&quot; button.</li>

View file

@ -102,7 +102,7 @@ namespace CodeImp.DoomBuilder.Data
invertedflatranges = new List<LumpRange>();
if(flatranges.Count > 0) {
//add range before first flatrange
//add range before the first flatrange
if (flatranges[0].start > 0) {
LumpRange range = new LumpRange {start = 0, end = flatranges[0].start - 1};
invertedflatranges.Add(range);
@ -114,7 +114,7 @@ namespace CodeImp.DoomBuilder.Data
invertedflatranges.Add(range);
}
//add range after last flatrange
//add range after the last flatrange
if(flatranges[flatranges.Count - 1].end < file.Lumps.Count - 1) {
LumpRange range = new LumpRange { start = flatranges[flatranges.Count - 1].end + 1, end = file.Lumps.Count - 1 };
invertedflatranges.Add(range);

View file

@ -312,6 +312,12 @@
<Compile Include="Interface\EditSelectionPanel.Designer.cs">
<DependentUpon>EditSelectionPanel.cs</DependentUpon>
</Compile>
<Compile Include="Interface\PastePropertiesOptionsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Interface\PastePropertiesOptionsForm.Designer.cs">
<DependentUpon>PastePropertiesOptionsForm.cs</DependentUpon>
</Compile>
<Compile Include="Interface\SectorDrawingOptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
@ -475,8 +481,14 @@
<EmbeddedResource Include="Resources\DrawGeometryMode.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Interface\PastePropertiesOptionsForm.resx">
<DependentUpon>PastePropertiesOptionsForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Resources\DrawRectangleMode.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\PastePropertiesOptions.png" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -289,6 +289,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Add toolbar buttons
General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste);
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness);//mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd
@ -308,6 +309,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Remove toolbar buttons
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste);
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness);//mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd

View file

@ -576,6 +576,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Add toolbar buttons
General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionNumbers);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionEffects);
@ -609,6 +610,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Remove toolbar buttons
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ViewSelectionNumbers);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ViewSelectionEffects);

View file

@ -117,6 +117,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Add toolbar buttons
General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.AlignThingsToWall); //mxd
@ -134,6 +135,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Remove toolbar buttons
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.AlignThingsToWall); //mxd

View file

@ -89,10 +89,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.SetPresentation(Presentation.Standard);
// Add toolbar buttons
General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties);
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd
if (General.Map.UDMF) {
General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd
}
// Convert geometry selection to vertices only
General.Map.Map.ConvertSelection(SelectionType.Vertices);
updateSelectionInfo(); //mxd
@ -104,10 +107,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
base.OnDisengage();
// Remove toolbar buttons
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties);
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd
if (General.Map.UDMF) {
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd
}
// Going to EditSelectionMode?
if(General.Editing.NewMode is EditSelectionMode)
{

View file

@ -691,6 +691,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
[BeginAction("pastepropertiesoptions")]
private void showPastePropertiesOptions() {
var form = new PastePropertiesOptionsForm();
form.ShowDialog(Form.ActiveForm);
}
#endregion
}
}

View file

@ -26,9 +26,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Vertex
public class VertexProperties
{
private UniFields fields;
private float zceiling; //mxd
private float zfloor; //mxd
public static bool ZCeiling = true; //mxd
public static bool ZFloor = true; //mxd
public static bool Universal_Fields = true; //mxd
private readonly UniFields fields;
private readonly float zceiling; //mxd
private readonly float zfloor; //mxd
public VertexProperties(Vertex v)
{
@ -39,27 +43,39 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void Apply(Vertex v)
{
v.ZCeiling = zceiling; //mxd
v.ZFloor = zfloor; //mxd
v.Fields.BeforeFieldsChange();
v.Fields.Clear();
foreach(KeyValuePair<string, UniValue> uv in fields)
v.Fields.Add(uv.Key, new UniValue(uv.Value));
if (ZCeiling) v.ZCeiling = zceiling; //mxd
if (ZFloor) v.ZFloor = zfloor; //mxd
if (Universal_Fields) {
v.Fields.BeforeFieldsChange();
v.Fields.Clear();
foreach (KeyValuePair<string, UniValue> uv in fields)
v.Fields.Add(uv.Key, new UniValue(uv.Value));
}
}
}
// Sector
public class SectorProperties
{
private int floorheight;
private int ceilheight;
private string floortexture;
private string ceilingtexture;
private int effect;
private int brightness;
private int tag;
private UniFields fields;
private Dictionary<string, bool> flags; //mxd
public static bool Floor_Height = true; //mxd
public static bool Ceiling_Height = true; //mxd
public static bool Floor_Texture = true; //mxd
public static bool Ceiling_Texture = true; //mxd
public static bool Brightness = true; //mxd
public static bool Tag = true; //mxd
public static bool Special = true; //mxd
public static bool Flags = true; //mxd
public static bool Universal_Fields = true; //mxd
private readonly int floorheight;
private readonly int ceilheight;
private readonly string floortexture;
private readonly string ceilingtexture;
private readonly int effect;
private readonly int brightness;
private readonly int tag;
private readonly UniFields fields;
private readonly Dictionary<string, bool> flags; //mxd
public SectorProperties(Sector s)
{
@ -76,33 +92,45 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void Apply(Sector s)
{
s.FloorHeight = floorheight;
s.CeilHeight = ceilheight;
s.SetFloorTexture(floortexture);
s.SetCeilTexture(ceilingtexture);
s.Brightness = brightness;
s.Tag = tag;
s.Effect = effect;
s.ClearFlags(); //mxd
foreach(KeyValuePair<string, bool> f in flags) //mxd
s.SetFlag(f.Key, f.Value);
s.Fields.BeforeFieldsChange();
s.Fields.Clear();
foreach(KeyValuePair<string, UniValue> v in fields)
s.Fields.Add(v.Key, new UniValue(v.Value));
if (Floor_Height) s.FloorHeight = floorheight;
if (Ceiling_Height) s.CeilHeight = ceilheight;
if (Floor_Texture) s.SetFloorTexture(floortexture);
if (Ceiling_Texture) s.SetCeilTexture(ceilingtexture);
if (Brightness) s.Brightness = brightness;
if (Tag) s.Tag = tag;
if (Special) s.Effect = effect;
if (Flags) {
s.ClearFlags(); //mxd
foreach (KeyValuePair<string, bool> f in flags) //mxd
s.SetFlag(f.Key, f.Value);
}
if (Universal_Fields) {
s.Fields.BeforeFieldsChange();
s.Fields.Clear();
foreach (KeyValuePair<string, UniValue> v in fields)
s.Fields.Add(v.Key, new UniValue(v.Value));
}
}
}
// Sidedef
public class SidedefProperties
{
private string hightexture;
private string middletexture;
private string lowtexture;
private int offsetx;
private int offsety;
private UniFields fields;
private Dictionary<string, bool> flags; //mxd
public static bool Upper_Texture = true; //mxd
public static bool Middle_Texture = true; //mxd
public static bool Lower_Texture = true; //mxd
public static bool OffsetX = true; //mxd
public static bool OffsetY = true; //mxd
public static bool Flags = true; //mxd
public static bool Universal_Fields = true; //mxd
private readonly string hightexture;
private readonly string middletexture;
private readonly string lowtexture;
private readonly int offsetx;
private readonly int offsety;
private readonly UniFields fields;
private readonly Dictionary<string, bool> flags; //mxd
public SidedefProperties(Sidedef s)
{
@ -117,44 +145,48 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void Apply(Sidedef s)
{
s.SetTextureHigh(hightexture);
s.SetTextureMid(middletexture);
s.SetTextureLow(lowtexture);
s.OffsetX = offsetx;
s.OffsetY = offsety;
s.ClearFlags(); //mxd
foreach(KeyValuePair<string, bool> f in flags) //mxd
s.SetFlag(f.Key, f.Value);
s.Fields.BeforeFieldsChange();
s.Fields.Clear();
foreach(KeyValuePair<string, UniValue> v in fields)
s.Fields.Add(v.Key, new UniValue(v.Value));
if (Upper_Texture) s.SetTextureHigh(hightexture);
if (Middle_Texture) s.SetTextureMid(middletexture);
if (Lower_Texture) s.SetTextureLow(lowtexture);
if (OffsetX) s.OffsetX = offsetx;
if (OffsetY) s.OffsetY = offsety;
if (Flags) {
s.ClearFlags(); //mxd
foreach (KeyValuePair<string, bool> f in flags) //mxd
s.SetFlag(f.Key, f.Value);
}
if (Universal_Fields) {
s.Fields.BeforeFieldsChange();
s.Fields.Clear();
foreach (KeyValuePair<string, UniValue> v in fields)
s.Fields.Add(v.Key, new UniValue(v.Value));
}
}
}
// Linedef
public class LinedefProperties
{
private SidedefProperties front;
private SidedefProperties back;
private Dictionary<string, bool> flags;
private int action;
private int activate;
private int tag;
private int[] args;
private UniFields fields;
public static bool Sidedef_Properties = true; //mxd
public static bool Action = true; //mxd
public static bool Activation = true; //mxd
public static bool Tag = true; //mxd
public static bool Flags = true; //mxd
public static bool Universal_Fields = true; //mxd
private readonly SidedefProperties front;
private readonly SidedefProperties back;
private readonly Dictionary<string, bool> flags;
private readonly int action;
private readonly int activate;
private readonly int tag;
private readonly int[] args;
private readonly UniFields fields;
public LinedefProperties(Linedef l)
{
if(l.Front != null)
front = new SidedefProperties(l.Front);
else
front = null;
if(l.Back != null)
back = new SidedefProperties(l.Back);
else
back = null;
front = (l.Front != null ? new SidedefProperties(l.Front) : null);
back = (l.Back != null ? new SidedefProperties(l.Back) : null);
flags = l.GetFlags();
action = l.Action;
@ -166,33 +198,48 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void Apply(Linedef l)
{
if((front != null) && (l.Front != null)) front.Apply(l.Front);
if((back != null) && (l.Back != null)) back.Apply(l.Back);
l.ClearFlags();
foreach(KeyValuePair<string, bool> f in flags)
l.SetFlag(f.Key, f.Value);
l.Action = action;
l.Activate = activate;
l.Tag = tag;
for(int i = 0; i < l.Args.Length; i++)
l.Args[i] = args[i];
l.Fields.BeforeFieldsChange();
l.Fields.Clear();
foreach(KeyValuePair<string, UniValue> v in fields)
l.Fields.Add(v.Key, new UniValue(v.Value));
if (Sidedef_Properties) {
if ((front != null) && (l.Front != null)) front.Apply(l.Front);
if ((back != null) && (l.Back != null)) back.Apply(l.Back);
}
if (Flags) {
l.ClearFlags();
foreach (KeyValuePair<string, bool> f in flags)
l.SetFlag(f.Key, f.Value);
}
if (Activation) l.Activate = activate;
if (Tag)l.Tag = tag;
if (Action) {
l.Action = action;
for (int i = 0; i < l.Args.Length; i++)
l.Args[i] = args[i];
}
if (Universal_Fields) {
l.Fields.BeforeFieldsChange();
l.Fields.Clear();
foreach (KeyValuePair<string, UniValue> v in fields)
l.Fields.Add(v.Key, new UniValue(v.Value));
}
}
}
// Thing
public class ThingProperties
{
private int type;
private float angle;
private Dictionary<string, bool> flags;
private int tag;
private int action;
private int[] args;
private UniFields fields;
public static bool Type = true; //mxd
public static bool Angle = true; //mxd
public static bool Action = true; //mxd
public static bool Tag = true; //mxd
public static bool Flags = true; //mxd
public static bool Universal_Fields = true; //mxd
private readonly int type;
private readonly float angle;
private readonly Dictionary<string, bool> flags;
private readonly int tag;
private readonly int action;
private readonly int[] args;
private readonly UniFields fields;
public ThingProperties(Thing t)
{
@ -207,19 +254,25 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void Apply(Thing t)
{
t.Type = type;
t.Rotate(angle);
t.ClearFlags();
foreach(KeyValuePair<string, bool> f in flags)
t.SetFlag(f.Key, f.Value);
t.Tag = tag;
t.Action = action;
for(int i = 0; i < t.Args.Length; i++)
t.Args[i] = args[i];
t.Fields.BeforeFieldsChange();
t.Fields.Clear();
foreach(KeyValuePair<string, UniValue> v in fields)
t.Fields.Add(v.Key, new UniValue(v.Value));
if (Type) t.Type = type;
if (Angle) t.Rotate(angle);
if (Flags) {
t.ClearFlags();
foreach (KeyValuePair<string, bool> f in flags)
t.SetFlag(f.Key, f.Value);
}
if (Tag) t.Tag = tag;
if (Action) {
t.Action = action;
for (int i = 0; i < t.Args.Length; i++)
t.Args[i] = args[i];
}
if (Universal_Fields) {
t.Fields.BeforeFieldsChange();
t.Fields.Clear();
foreach (KeyValuePair<string, UniValue> v in fields)
t.Fields.Add(v.Key, new UniValue(v.Value));
}
}
}
}

View file

@ -54,37 +54,38 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.joinsectorsitem = new System.Windows.Forms.ToolStripMenuItem();
this.mergesectorsitem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.makedooritem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.thingsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.selectInSectorsItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
this.vertsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.placethingsv = new System.Windows.Forms.ToolStripMenuItem();
this.globalstrip = new System.Windows.Forms.ToolStrip();
this.manualstrip = new System.Windows.Forms.ToolStrip();
this.seperatorcopypaste = new System.Windows.Forms.ToolStripSeparator();
this.separatorsectors1 = new System.Windows.Forms.ToolStripSeparator();
this.brightnessGradientMode = new System.Windows.Forms.ToolStripComboBox();
this.fileMenuStrip = new System.Windows.Forms.MenuStrip();
this.exportStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
this.buttoncopyproperties = new System.Windows.Forms.ToolStripButton();
this.buttonpasteproperties = new System.Windows.Forms.ToolStripButton();
this.seperatorcopypaste = new System.Windows.Forms.ToolStripSeparator();
this.buttonpastepropertiesoptions = new System.Windows.Forms.ToolStripButton();
this.buttonselectionnumbers = new System.Windows.Forms.ToolStripButton();
this.buttonselectioneffects = new System.Windows.Forms.ToolStripButton();
this.separatorsectors1 = new System.Windows.Forms.ToolStripSeparator();
this.buttonbrightnessgradient = new System.Windows.Forms.ToolStripButton();
this.buttonfloorgradient = new System.Windows.Forms.ToolStripButton();
this.buttonceilinggradient = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionh = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionv = new System.Windows.Forms.ToolStripButton();
this.buttoncurvelinedefs = new System.Windows.Forms.ToolStripButton();
this.brightnessGradientMode = new System.Windows.Forms.ToolStripComboBox();
this.buttonMarqueSelectTouching = new System.Windows.Forms.ToolStripButton();
this.buttonAlignThingsToWall = new System.Windows.Forms.ToolStripButton();
this.buttonTextureOffsetLock = new System.Windows.Forms.ToolStripButton();
this.buttonMakeDoor = new System.Windows.Forms.ToolStripButton();
this.fileMenuStrip = new System.Windows.Forms.MenuStrip();
this.exportStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
this.makedooritem = new System.Windows.Forms.ToolStripMenuItem();
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
this.menustrip.SuspendLayout();
this.manualstrip.SuspendLayout();
this.fileMenuStrip.SuspendLayout();
@ -308,15 +309,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(242, 6);
//
// makedooritem
//
this.makedooritem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Door;
this.makedooritem.Name = "makedooritem";
this.makedooritem.Size = new System.Drawing.Size(245, 22);
this.makedooritem.Tag = "makedoor";
this.makedooritem.Text = "Make &Door";
this.makedooritem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
@ -348,24 +340,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(242, 6);
//
// alignToWallItem
//
this.alignToWallItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.AlignThings;
this.alignToWallItem.Name = "alignToWallItem";
this.alignToWallItem.Size = new System.Drawing.Size(245, 22);
this.alignToWallItem.Tag = "thingaligntowall";
this.alignToWallItem.Text = "&Align To Closest Linedef";
this.alignToWallItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// pointAtCursorItem
//
this.pointAtCursorItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ThingPointAtCursor;
this.pointAtCursorItem.Name = "pointAtCursorItem";
this.pointAtCursorItem.Size = new System.Drawing.Size(245, 22);
this.pointAtCursorItem.Tag = "thinglookatcursor";
this.pointAtCursorItem.Text = "&Point at Cursor";
this.pointAtCursorItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// vertsmenu
//
this.vertsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -396,6 +370,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.manualstrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.buttoncopyproperties,
this.buttonpasteproperties,
this.buttonpastepropertiesoptions,
this.seperatorcopypaste,
this.buttonselectionnumbers,
this.buttonselectioneffects,
@ -417,6 +392,52 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.manualstrip.TabIndex = 2;
this.manualstrip.Text = "toolStrip1";
//
// seperatorcopypaste
//
this.seperatorcopypaste.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.seperatorcopypaste.Name = "seperatorcopypaste";
this.seperatorcopypaste.Size = new System.Drawing.Size(6, 25);
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// brightnessGradientMode
//
this.brightnessGradientMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.brightnessGradientMode.Name = "brightnessGradientMode";
this.brightnessGradientMode.Size = new System.Drawing.Size(75, 25);
this.brightnessGradientMode.ToolTipText = "Brightness Gradient affects:";
this.brightnessGradientMode.DropDownClosed += new System.EventHandler(this.brightnessGradientMode_DropDownClosed);
//
// fileMenuStrip
//
this.fileMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exportStripMenuItem});
this.fileMenuStrip.Location = new System.Drawing.Point(0, 0);
this.fileMenuStrip.Name = "fileMenuStrip";
this.fileMenuStrip.Size = new System.Drawing.Size(588, 24);
this.fileMenuStrip.TabIndex = 3;
this.fileMenuStrip.Text = "menuStrip1";
//
// exportStripMenuItem
//
this.exportStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem5});
this.exportStripMenuItem.Name = "exportStripMenuItem";
this.exportStripMenuItem.Size = new System.Drawing.Size(52, 20);
this.exportStripMenuItem.Text = "Export";
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(229, 22);
this.toolStripMenuItem5.Tag = "exporttoobj";
this.toolStripMenuItem5.Text = "Selection To Wavefront .obj...";
this.toolStripMenuItem5.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttoncopyproperties
//
this.buttoncopyproperties.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -439,11 +460,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonpasteproperties.Text = "Paste Properties";
this.buttonpasteproperties.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// seperatorcopypaste
// buttonpastepropertiesoptions
//
this.seperatorcopypaste.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.seperatorcopypaste.Name = "seperatorcopypaste";
this.seperatorcopypaste.Size = new System.Drawing.Size(6, 25);
this.buttonpastepropertiesoptions.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonpastepropertiesoptions.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.PastePropertiesOptions;
this.buttonpastepropertiesoptions.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonpastepropertiesoptions.Name = "buttonpastepropertiesoptions";
this.buttonpastepropertiesoptions.Size = new System.Drawing.Size(23, 22);
this.buttonpastepropertiesoptions.Tag = "pastepropertiesoptions";
this.buttonpastepropertiesoptions.Text = "Choose Properties to Paste";
this.buttonpastepropertiesoptions.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonselectionnumbers
//
@ -467,12 +493,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonselectioneffects.Text = "View Tags and Effects";
this.buttonselectioneffects.Click += new System.EventHandler(this.buttonselectioneffects_Click);
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// buttonbrightnessgradient
//
this.buttonbrightnessgradient.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -540,14 +560,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttoncurvelinedefs.Text = "Curve Linedefs";
this.buttoncurvelinedefs.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// brightnessGradientMode
//
this.brightnessGradientMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.brightnessGradientMode.Name = "brightnessGradientMode";
this.brightnessGradientMode.Size = new System.Drawing.Size(75, 25);
this.brightnessGradientMode.ToolTipText = "Brightness Gradient affects:";
this.brightnessGradientMode.DropDownClosed += new System.EventHandler(this.brightnessGradientMode_DropDownClosed);
//
// buttonMarqueSelectTouching
//
this.buttonMarqueSelectTouching.CheckOnClick = true;
@ -595,31 +607,32 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonMakeDoor.Text = "Make Door From Selection";
this.buttonMakeDoor.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// fileMenuStrip
// makedooritem
//
this.fileMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exportStripMenuItem});
this.fileMenuStrip.Location = new System.Drawing.Point(0, 0);
this.fileMenuStrip.Name = "fileMenuStrip";
this.fileMenuStrip.Size = new System.Drawing.Size(588, 24);
this.fileMenuStrip.TabIndex = 3;
this.fileMenuStrip.Text = "menuStrip1";
this.makedooritem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Door;
this.makedooritem.Name = "makedooritem";
this.makedooritem.Size = new System.Drawing.Size(245, 22);
this.makedooritem.Tag = "makedoor";
this.makedooritem.Text = "Make &Door";
this.makedooritem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// exportStripMenuItem
// alignToWallItem
//
this.exportStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem5});
this.exportStripMenuItem.Name = "exportStripMenuItem";
this.exportStripMenuItem.Size = new System.Drawing.Size(52, 20);
this.exportStripMenuItem.Text = "Export";
this.alignToWallItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.AlignThings;
this.alignToWallItem.Name = "alignToWallItem";
this.alignToWallItem.Size = new System.Drawing.Size(245, 22);
this.alignToWallItem.Tag = "thingaligntowall";
this.alignToWallItem.Text = "&Align To Closest Linedef";
this.alignToWallItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem5
// pointAtCursorItem
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(229, 22);
this.toolStripMenuItem5.Tag = "exporttoobj";
this.toolStripMenuItem5.Text = "Selection To Wavefront .obj...";
this.toolStripMenuItem5.Click += new System.EventHandler(this.InvokeTaggedAction);
this.pointAtCursorItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ThingPointAtCursor;
this.pointAtCursorItem.Name = "pointAtCursorItem";
this.pointAtCursorItem.Size = new System.Drawing.Size(245, 22);
this.pointAtCursorItem.Tag = "thinglookatcursor";
this.pointAtCursorItem.Text = "&Point at Cursor";
this.pointAtCursorItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// MenusForm
//
@ -709,5 +722,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
private System.Windows.Forms.MenuStrip fileMenuStrip;
private System.Windows.Forms.ToolStripMenuItem exportStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
private System.Windows.Forms.ToolStripButton buttonpastepropertiesoptions;
}
}

View file

@ -65,6 +65,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public ToolStripButton CurveLinedefs { get { return buttoncurvelinedefs; } }
public ToolStripButton CopyProperties { get { return buttoncopyproperties; } }
public ToolStripButton PasteProperties { get { return buttonpasteproperties; } }
public ToolStripButton PastePropertiesOptions { get { return buttonpastepropertiesoptions; } } //mxd
public ToolStripSeparator SeparatorCopyPaste { get { return seperatorcopypaste; } }
public ToolStripComboBox BrightnessGradientMode { get { return brightnessGradientMode; } } //mxd
public ToolStripButton MarqueSelectTouching { get { return buttonMarqueSelectTouching; } } //mxd

View file

@ -0,0 +1,254 @@
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
partial class PastePropertiesOptionsForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if(disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.tabControl = new System.Windows.Forms.TabControl();
this.sectors = new System.Windows.Forms.TabPage();
this.sectorflags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
this.linedefs = new System.Windows.Forms.TabPage();
this.lineflags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
this.sidedefs = new System.Windows.Forms.TabPage();
this.sideflags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
this.things = new System.Windows.Forms.TabPage();
this.thingflags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
this.vertices = new System.Windows.Forms.TabPage();
this.vertexflags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.enableall = new System.Windows.Forms.Button();
this.tabControl.SuspendLayout();
this.sectors.SuspendLayout();
this.linedefs.SuspendLayout();
this.sidedefs.SuspendLayout();
this.things.SuspendLayout();
this.vertices.SuspendLayout();
this.SuspendLayout();
//
// tabControl
//
this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl.Controls.Add(this.sectors);
this.tabControl.Controls.Add(this.linedefs);
this.tabControl.Controls.Add(this.sidedefs);
this.tabControl.Controls.Add(this.things);
this.tabControl.Controls.Add(this.vertices);
this.tabControl.Location = new System.Drawing.Point(12, 12);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(266, 209);
this.tabControl.TabIndex = 0;
//
// sectors
//
this.sectors.Controls.Add(this.sectorflags);
this.sectors.Location = new System.Drawing.Point(4, 23);
this.sectors.Name = "sectors";
this.sectors.Padding = new System.Windows.Forms.Padding(3);
this.sectors.Size = new System.Drawing.Size(353, 182);
this.sectors.TabIndex = 0;
this.sectors.Text = "Sectors";
this.sectors.UseVisualStyleBackColor = true;
//
// sectorflags
//
this.sectorflags.AutoScroll = true;
this.sectorflags.Columns = 2;
this.sectorflags.Dock = System.Windows.Forms.DockStyle.Fill;
this.sectorflags.Location = new System.Drawing.Point(3, 3);
this.sectorflags.Name = "sectorflags";
this.sectorflags.Size = new System.Drawing.Size(347, 176);
this.sectorflags.TabIndex = 3;
this.sectorflags.VerticalSpacing = 1;
//
// linedefs
//
this.linedefs.Controls.Add(this.lineflags);
this.linedefs.Location = new System.Drawing.Point(4, 23);
this.linedefs.Name = "linedefs";
this.linedefs.Padding = new System.Windows.Forms.Padding(3);
this.linedefs.Size = new System.Drawing.Size(353, 182);
this.linedefs.TabIndex = 1;
this.linedefs.Text = "Linedefs";
this.linedefs.UseVisualStyleBackColor = true;
//
// lineflags
//
this.lineflags.AutoScroll = true;
this.lineflags.Columns = 2;
this.lineflags.Dock = System.Windows.Forms.DockStyle.Fill;
this.lineflags.Location = new System.Drawing.Point(3, 3);
this.lineflags.Name = "lineflags";
this.lineflags.Size = new System.Drawing.Size(347, 176);
this.lineflags.TabIndex = 3;
this.lineflags.VerticalSpacing = 1;
//
// sidedefs
//
this.sidedefs.Controls.Add(this.sideflags);
this.sidedefs.Location = new System.Drawing.Point(4, 23);
this.sidedefs.Name = "sidedefs";
this.sidedefs.Padding = new System.Windows.Forms.Padding(3);
this.sidedefs.Size = new System.Drawing.Size(353, 182);
this.sidedefs.TabIndex = 2;
this.sidedefs.Text = "Sidedefs";
this.sidedefs.UseVisualStyleBackColor = true;
//
// sideflags
//
this.sideflags.AutoScroll = true;
this.sideflags.Columns = 2;
this.sideflags.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideflags.Location = new System.Drawing.Point(3, 3);
this.sideflags.Name = "sideflags";
this.sideflags.Size = new System.Drawing.Size(347, 176);
this.sideflags.TabIndex = 2;
this.sideflags.VerticalSpacing = 1;
//
// things
//
this.things.Controls.Add(this.thingflags);
this.things.Location = new System.Drawing.Point(4, 23);
this.things.Name = "things";
this.things.Padding = new System.Windows.Forms.Padding(3);
this.things.Size = new System.Drawing.Size(353, 182);
this.things.TabIndex = 3;
this.things.Text = "Things";
this.things.UseVisualStyleBackColor = true;
//
// thingflags
//
this.thingflags.AutoScroll = true;
this.thingflags.Columns = 2;
this.thingflags.Dock = System.Windows.Forms.DockStyle.Fill;
this.thingflags.Location = new System.Drawing.Point(3, 3);
this.thingflags.Name = "thingflags";
this.thingflags.Size = new System.Drawing.Size(347, 176);
this.thingflags.TabIndex = 2;
this.thingflags.VerticalSpacing = 1;
//
// vertices
//
this.vertices.Controls.Add(this.vertexflags);
this.vertices.Location = new System.Drawing.Point(4, 23);
this.vertices.Name = "vertices";
this.vertices.Padding = new System.Windows.Forms.Padding(3);
this.vertices.Size = new System.Drawing.Size(258, 182);
this.vertices.TabIndex = 4;
this.vertices.Text = "Vertices";
this.vertices.UseVisualStyleBackColor = true;
//
// vertexflags
//
this.vertexflags.AutoScroll = true;
this.vertexflags.Columns = 2;
this.vertexflags.Dock = System.Windows.Forms.DockStyle.Fill;
this.vertexflags.Location = new System.Drawing.Point(3, 3);
this.vertexflags.Name = "vertexflags";
this.vertexflags.Size = new System.Drawing.Size(252, 176);
this.vertexflags.TabIndex = 1;
this.vertexflags.VerticalSpacing = 1;
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(199, 228);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(75, 23);
this.cancel.TabIndex = 0;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(118, 228);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(75, 23);
this.apply.TabIndex = 1;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
this.apply.Click += new System.EventHandler(this.apply_Click);
//
// enableall
//
this.enableall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.enableall.Location = new System.Drawing.Point(12, 228);
this.enableall.Name = "enableall";
this.enableall.Size = new System.Drawing.Size(70, 23);
this.enableall.TabIndex = 2;
this.enableall.Text = "Enable All";
this.enableall.UseVisualStyleBackColor = true;
this.enableall.Click += new System.EventHandler(this.enableall_Click);
//
// PastePropertiesOptionsForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(290, 258);
this.Controls.Add(this.enableall);
this.Controls.Add(this.apply);
this.Controls.Add(this.cancel);
this.Controls.Add(this.tabControl);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "PastePropertiesOptionsForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Paste Properties Options";
this.tabControl.ResumeLayout(false);
this.sectors.ResumeLayout(false);
this.linedefs.ResumeLayout(false);
this.sidedefs.ResumeLayout(false);
this.things.ResumeLayout(false);
this.vertices.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl;
private System.Windows.Forms.TabPage sectors;
private System.Windows.Forms.TabPage linedefs;
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.TabPage sidedefs;
private System.Windows.Forms.TabPage things;
private System.Windows.Forms.TabPage vertices;
private CodeImp.DoomBuilder.Controls.CheckboxArrayControl vertexflags;
private CodeImp.DoomBuilder.Controls.CheckboxArrayControl sectorflags;
private CodeImp.DoomBuilder.Controls.CheckboxArrayControl lineflags;
private CodeImp.DoomBuilder.Controls.CheckboxArrayControl sideflags;
private CodeImp.DoomBuilder.Controls.CheckboxArrayControl thingflags;
private System.Windows.Forms.Button enableall;
}
}

View file

@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Controls;
namespace CodeImp.DoomBuilder.BuilderModes.Interface
{
public partial class PastePropertiesOptionsForm : Form
{
private readonly Dictionary<Type, CheckboxArrayControl> typecontrols;
public PastePropertiesOptionsForm() {
Point pos = Cursor.Position;
pos.Offset(-this.Width / 2, -this.Height / 2);
this.Location = pos;
InitializeComponent();
//create a collection
typecontrols = new Dictionary<Type, CheckboxArrayControl> {
{typeof (SectorProperties), sectorflags},
{typeof (LinedefProperties), lineflags},
{typeof (SidedefProperties), sideflags},
{typeof (ThingProperties), thingflags},
{typeof (VertexProperties), vertexflags}
};
//fill flags
foreach(KeyValuePair<Type, CheckboxArrayControl> group in typecontrols) {
FieldInfo[] props = group.Key.GetFields(BindingFlags.Static | BindingFlags.Public);
foreach(var prop in props) {
group.Value.Add(prop.Name.Replace("_", " "), prop.Name).Checked = (bool)prop.GetValue(group.Key);
}
group.Value.PositionCheckboxes();
}
//select proper tab
if (General.Editing.Mode is ThingsMode) {
tabControl.SelectTab(things);
}else if (General.Editing.Mode is VerticesMode) {
tabControl.SelectTab(vertices);
}else if (General.Editing.Mode is LinedefsMode) {
tabControl.SelectTab(linedefs);
}
}
private void apply_Click(object sender, EventArgs e) {
foreach (KeyValuePair<Type, CheckboxArrayControl> group in typecontrols) {
FieldInfo[] props = group.Key.GetFields(BindingFlags.Static | BindingFlags.Public);
var fields = new Dictionary<string, FieldInfo>(props.Length);
for(int i = 0; i < props.Length; i++) {
fields[props[i].Name] = props[i];
}
foreach(CheckBox cb in group.Value.Checkboxes) {
fields[cb.Tag.ToString()].SetValue(group.Key, cb.Checked);
}
}
this.Close();
}
private void cancel_Click(object sender, EventArgs e) {
this.Close();
}
private void enableall_Click(object sender, EventArgs e) {
foreach (KeyValuePair<Type, CheckboxArrayControl> group in typecontrols) {
foreach (var cb in group.Value.Checkboxes) cb.Checked = true;
}
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -32,9 +32,9 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
}
//restore settings
cbExportTextures.Checked = General.Settings.ReadPluginSetting("objexporttextures", false);//BuilderPlug.Me.ObjExportTextures;
cbFixScale.Checked = General.Settings.ReadPluginSetting("objgzdoomscale", false);//BuilderPlug.Me.ObjGZDoomScale;
nudScale.Value = (decimal)General.Settings.ReadPluginSetting("objscale", 1.0f);//(decimal)BuilderPlug.Me.ObjScale;
cbExportTextures.Checked = General.Settings.ReadPluginSetting("objexporttextures", false);
cbFixScale.Checked = General.Settings.ReadPluginSetting("objgzdoomscale", false);
nudScale.Value = (decimal)General.Settings.ReadPluginSetting("objscale", 1.0f);
this.Text = "Export " + (sectorsCount == -1 ? "whole map" : sectorsCount + (sectorsCount > 1 ? "sectors" : "sector")) + " to Wavefront .obj";
}
@ -48,10 +48,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
}
private void export_Click(object sender, EventArgs e) {
//BuilderPlug.Me.ObjExportTextures = cbExportTextures.Checked;
//BuilderPlug.Me.ObjGZDoomScale = cbFixScale.Checked;
//BuilderPlug.Me.ObjScale = (float)nudScale.Value;
//check settings
if(nudScale.Value == 0) {
MessageBox.Show("Scale should not be zero!");
return;
@ -66,7 +63,6 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
General.Settings.WritePluginSetting("objgzdoomscale", cbFixScale.Checked);
General.Settings.WritePluginSetting("objscale", (float)nudScale.Value);
//filePath = tbExportPath.Text;
this.DialogResult = DialogResult.OK;
this.Close();
}

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.5466
// Runtime Version:2.0.50727.5420
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -214,6 +214,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap PastePropertiesOptions {
get {
object obj = ResourceManager.GetObject("PastePropertiesOptions", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Reset {
get {
object obj = ResourceManager.GetObject("Reset", resourceCulture);

View file

@ -139,9 +139,6 @@
<data name="ColorPick" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FlipSelectionV" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FlipSelectionV.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Text" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Text.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -151,6 +148,12 @@
<data name="BrightnessGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\BrightnessGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Gear" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Gear.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SnapVerts" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SnapVerts.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CeilsGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CeilsGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -166,8 +169,8 @@
<data name="Angle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SnapVerts" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SnapVerts.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="FlipSelectionV" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FlipSelectionV.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="VisualModeGZ" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\VisualModeGZ.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -193,6 +196,9 @@
<data name="DrawGridMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawGridMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawGeometryMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawGeometryMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Door" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Door.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -202,16 +208,13 @@
<data name="List_Images" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\List_Images.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ThingPointAtCursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ThingPointAtCursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Gear" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Gear.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawGeometryMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawGeometryMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawRectangleMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawRectangleMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ThingPointAtCursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ThingPointAtCursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PastePropertiesOptions" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PastePropertiesOptions.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -1066,6 +1066,18 @@ classicpasteproperties
default = 196694; // CTRL+SHIFT+V
}
//mxd
pastepropertiesoptions
{
title = "Paste Properties Options";
category = "edit";
description = "Opens a window, which lets you pick properties for 'Copy Properties' and 'Paste Properties' actions.";
allowkeys = true;
allowmouse = false;
allowscroll = false;
default = 196691; //Ctrl-Shift-S
}
floodfilltextures
{
title = "Paste Texture Flood-Fill";

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

View file

@ -1,42 +0,0 @@

//
// This file defines which actions there are, what description they have and
// some behaviour options. The Doom Builder core will bind to these actions
// with delegates (function pointers) where you use the BeginAction and
// EndAction attributes. This file must be named Actions.cfg and must be
// included in the plugin project as "Embedded Resource".
//
//
// Options:
//
// allowkeys: Allows the user to bind standard keys to this action.
// allowmouse: Allows the user to bind mouse buttons to this action.
// allowscroll: Allows the user to bind the scrollwheel to this action.
// disregardshift: This action will trigger regardless if Shift or Control is used.
// repeat: BeginAction will be called for automatic key repetition.
// default: Default key is only used when the action is loaded for the first
// time and the default key is not used by any other action.
//
// allowkeys and allowmouse are true by default, the others are false by default.
//
copysectorprops
{
title = "Copy sector properties";
category = "sectors";
description = "Copies sector properties.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}
pastesectorprops
{
title = "Paste sector properties";
category = "sectors";
description = "Pastes sector properties.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}

View file

@ -1,208 +0,0 @@

#region ================== Copyright (c) 2009 Boris Iwanski
/*
* Copyright (c) 2009 Boris Iwanski
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#endregion
#region ================== Namespaces
using System.Collections.Generic;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Plugins;
using CodeImp.DoomBuilder.Actions;
#endregion
namespace CodeImp.DoomBuilder.CopyPasteSectorProps
{
//
// MANDATORY: The plug!
// This is an important class to the Doom Builder core. Every plugin must
// have exactly 1 class that inherits from Plug. When the plugin is loaded,
// this class is instantiated and used to receive events from the core.
// Make sure the class is public, because only public classes can be seen
// by the core.
//
public class BuilderPlug : Plug
{
// Static instance. We can't use a real static class, because BuilderPlug must
// be instantiated by the core, so we keep a static reference. (this technique
// should be familiar to object-oriented programmers)
private static BuilderPlug me;
// Static property to access the BuilderPlug
public static BuilderPlug Me { get { return me; } }
// These variables will store the properties we want to copy
private int floorHeight;
private int ceilHeight;
private string floorTexture;
private string ceilTexture;
private int brightness;
private int effect;
private int tag;
//private UniFields fields;
// This is set to true to know that we copied sector properties.
// If this is false, the variables above are uninitialized.
bool didCopyProps;
// This event is called when the plugin is initialized
public override void OnInitialize()
{
base.OnInitialize();
// This binds the methods in this class that have the BeginAction
// and EndAction attributes with their actions. Without this, the
// attributes are useless. Note that in classes derived from EditMode
// this is not needed, because they are bound automatically when the
// editing mode is engaged.
General.Actions.BindMethods(this);
// Keep a static reference
me = this;
}
// This is called when the plugin is terminated
public override void Dispose()
{
base.Dispose();
// This must be called to remove bound methods for actions.
General.Actions.UnbindMethods(this);
}
#region ================== Actions
// This is the method that will be called when the "copysectorprops" action is used by the user.
// The actions are defined in the Actions.cfg file (the name must be exactly that) and the
// BeginAction attribute indicates that this method must be called when the key for this
// action is pressed. You can use the EndAction attribute for methods that must be called when
// the key for an action is released. See above for the BindMethods method call which must be
// called in order for these methods to work.
[BeginAction("copysectorprops")]
public void CopySectorProps()
{
// Only make this action possible if a map is actually opened and the we are in sectors mode
if (General.Editing.Mode == null || General.Editing.Mode.Attributes.SwitchAction != "sectorsmode")
{
return;
}
// Make sure a sector is highlighted
if (!(General.Editing.Mode.HighlightedObject is Sector))
{
// Show a warning in the status bar
General.Interface.DisplayStatus(StatusType.Warning, "Please highlight a sector to copy the properties from");
return;
}
// Copy the properties from the sector
Sector s = (Sector)General.Editing.Mode.HighlightedObject;
floorHeight = s.FloorHeight;
ceilHeight = s.CeilHeight;
floorTexture = s.FloorTexture;
ceilTexture = s.CeilTexture;
brightness = s.Brightness;
effect = s.Effect;
tag = s.Tag;
// Remember that we copied the properties
didCopyProps = true;
// Let the user know that copying worked
General.Interface.DisplayStatus(StatusType.Action, "Copied sector properties.");
}
// This is the method that will be called when the "pastesectorprops" action is used by the user.
[BeginAction("pastesectorprops")]
public void PasteSectorProps()
{
// Collection used to store the sectors we want to paste to
List<Sector> sectors = new List<Sector>();
// Just for fun we want to let the user know to how many sectors he/she/it pasted
int pasteCount = 0;
// Only make this action possible if a map is actually opened and we are in sectors mode
if (General.Editing.Mode == null || General.Editing.Mode.Attributes.SwitchAction != "sectorsmode")
{
return;
}
// Make sure there's at least one selected or highlighted sector we can paste the properties to
if (General.Map.Map.GetSelectedSectors(true).Count == 0 && !(General.Editing.Mode.HighlightedObject is Sector))
{
// Show a warning in the status bar
General.Interface.DisplayStatus(StatusType.Warning, "Please select or highlight at least 1 sector to paste the properties to.");
return;
}
// Check if there's actually a copied sector to get the properties from
if (didCopyProps == false)
{
// Show a warning in the status bar
General.Interface.DisplayStatus(StatusType.Warning, "Can't paste properties. You need to copy the properties first.");
return;
}
// If there are selected sectors only paste to them
if (General.Map.Map.GetSelectedSectors(true).Count != 0)
{
ICollection<Sector> selectedsectors = General.Map.Map.GetSelectedSectors(true);
foreach (Sector s in selectedsectors)
{
sectors.Add(s);
pasteCount++;
}
}
// No selected sectors. paste to the highlighted one
else
{
sectors.Add((Sector)General.Editing.Mode.HighlightedObject);
pasteCount++;
}
// Make the action undo-able
General.Map.UndoRedo.CreateUndo("Paste sector properties");
// Set the properties of all selected sectors
foreach(Sector s in sectors)
{
// Heights
s.FloorHeight = floorHeight;
s.CeilHeight = ceilHeight;
// Textures
s.SetFloorTexture(floorTexture);
s.SetCeilTexture(ceilTexture);
// Other stuff
s.Brightness = brightness;
s.Effect = effect;
s.Tag = tag;
}
// Redraw to make the changes visible
General.Map.Map.Update();
General.Interface.RedrawDisplay();
// Let the user know to how many sectors the properties were copied
General.Interface.DisplayStatus(StatusType.Action, "Pasted sector properties to " + pasteCount + " sector(s).");
}
#endregion
}
}

View file

@ -1,67 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A5F93B70-18D9-4F3C-9B72-BC8B5B13998E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CodeImp.DoomBuilder.CopyPasteSectorProps</RootNamespace>
<AssemblyName>CopyPasteSectorProps</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\..\Build\Plugins\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\..\..\Build\Plugins\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="Builder, Version=2.0.0.0, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Build\Builder.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="BuilderPlug.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Actions.cfg" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View file

@ -1,30 +0,0 @@
=== DOOM BUILDER 2 PLUGIN (CopyPasteSectorProps) ==============================
File: CopyPasteSectorProps.dll
Author: Boris Iwanski
Version: 1.0.0.0
Minimum DB2 Version: 2.0.1.1157
=== What does it do ===========================================================
This plugin copies the properties (floor/ceiling heights, floor/ceiling
textures, brightness, tag and special effect from a sector and pastes
them to one or more sectors. Unlike the join/merge sector function this
plugin does not change the sector references of the sidedefs.
=== Usage =====================================================================
Menu entry: no
Toolbar buttons: no
Hotkeys: yes. There are two new actions in the "Sectors" section of the
controls. They are called "Copy sector properties" and "Paste sector
properties".
IMPORTANT: you'll have to assign hotkeys to those actions to use the
functionality of this plugin!
To copy the properties of a sector just highlight the desired sector (hover the
mouse over it) and press the hotkey you assigned to "Copy sector properties".
Now you have two ways to paste those properties to other sectors. Either you
highlight a sector and press your "Paste sector properties" hotkey or select
(by clicking) multiple sectors and then press you "Paste sector properties"
hotkey to paste the properties to all of them.

View file

@ -1,31 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CopyPasteSectorProperties Plugin")]
[assembly: AssemblyDescription("Doom Builder CopySectorProperties Plugin")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("boris")]
[assembly: AssemblyProduct("Doom Builder Plugin")]
[assembly: AssemblyCopyright("Copyright © 2009")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cb6d7713-9c4f-4777-92f3-36cb4c452ff6")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]