Added Occlusion mode and render YmapBoxOccluders (OccludeModels todo)

This commit is contained in:
dexy 2018-12-15 01:46:48 +11:00
parent 0ec052ddbc
commit ca7f270c5c
7 changed files with 214 additions and 63 deletions

View File

@ -2235,10 +2235,39 @@ namespace CodeWalker.GameFiles
public YmapFile Ymap { get; set; } public YmapFile Ymap { get; set; }
public Vector3 Position { get; set; }
public Vector3 Size { get; set; }
public Vector3 BBMin { get; set; }
public Vector3 BBMax { get; set; }
public Quaternion Orientation { get; set; }
public YmapBoxOccluder(YmapFile ymap, BoxOccluder box) public YmapBoxOccluder(YmapFile ymap, BoxOccluder box)
{ {
Ymap = ymap; Ymap = ymap;
_Box = box; _Box = box;
Vector3 ymapbbmin = ymap._CMapData.entitiesExtentsMin;
Vector3 ymapbbmax = ymap._CMapData.entitiesExtentsMax;
Vector3 ymapbbrng = ymapbbmax - ymapbbmin;
Vector3 boxcenter = new Vector3(box.iCenterX, box.iCenterY, box.iCenterZ) / 4.0f;// / 32767.0f;
Vector3 boxsize = new Vector3(box.iLength, box.iWidth, box.iHeight) / 4.0f;// / 32767.0f;
Position = boxcenter;// * ymapbbrng;
Size = boxsize;// * ymapbbrng;
BBMin = Size * -0.5f;
BBMax = Size * 0.5f;
float cosz = box.iCosZ / 32767.0f;// ((float)short.MaxValue)
float sinz = box.iSinZ / 32767.0f;
float angl = (float)Math.Atan2(cosz, sinz);
Orientation = Quaternion.RotationYawPitchRoll(0.0f, 0.0f, angl);
} }
} }

View File

@ -181,6 +181,8 @@ namespace CodeWalker
public YmapCarGen CarGenerator { get; set; } public YmapCarGen CarGenerator { get; set; }
public YmapGrassInstanceBatch GrassBatch { get; set; } public YmapGrassInstanceBatch GrassBatch { get; set; }
public YmapDistantLODLights DistantLodLights { get; set; } public YmapDistantLODLights DistantLodLights { get; set; }
public YmapBoxOccluder BoxOccluder { get; set; }
public YmapOccludeModel OccludeModel { get; set; }
public YmapEntityDef MloEntityDef { get; set; } public YmapEntityDef MloEntityDef { get; set; }
public MCMloRoomDef MloRoomDef { get; set; } public MCMloRoomDef MloRoomDef { get; set; }
public WaterQuad WaterQuad { get; set; } public WaterQuad WaterQuad { get; set; }
@ -226,6 +228,8 @@ namespace CodeWalker
(PathNode != null) || (PathNode != null) ||
(TrainTrackNode != null) || (TrainTrackNode != null) ||
(DistantLodLights != null) || (DistantLodLights != null) ||
(BoxOccluder != null) ||
(OccludeModel != null) ||
(MloEntityDef != null) || (MloEntityDef != null) ||
(ScenarioNode != null) || (ScenarioNode != null) ||
(Audio != null) || (Audio != null) ||
@ -251,6 +255,8 @@ namespace CodeWalker
|| (MloEntityDef != mhit.MloEntityDef) || (MloEntityDef != mhit.MloEntityDef)
|| (DistantLodLights != mhit.DistantLodLights) || (DistantLodLights != mhit.DistantLodLights)
|| (GrassBatch != mhit.GrassBatch) || (GrassBatch != mhit.GrassBatch)
|| (BoxOccluder != mhit.BoxOccluder)
|| (OccludeModel != mhit.OccludeModel)
|| (WaterQuad != mhit.WaterQuad) || (WaterQuad != mhit.WaterQuad)
|| (CollisionBounds != mhit.CollisionBounds) || (CollisionBounds != mhit.CollisionBounds)
|| (NavPoly != mhit.NavPoly) || (NavPoly != mhit.NavPoly)
@ -274,6 +280,8 @@ namespace CodeWalker
|| (MloEntityDef != null) || (MloEntityDef != null)
|| (DistantLodLights != null) || (DistantLodLights != null)
|| (GrassBatch != null) || (GrassBatch != null)
|| (BoxOccluder != null)
|| (OccludeModel != null)
|| (WaterQuad != null) || (WaterQuad != null)
|| (CollisionBounds != null) || (CollisionBounds != null)
|| (NavPoly != null) || (NavPoly != null)
@ -299,6 +307,8 @@ namespace CodeWalker
TimeCycleModifier = null; TimeCycleModifier = null;
CarGenerator = null; CarGenerator = null;
GrassBatch = null; GrassBatch = null;
BoxOccluder = null;
OccludeModel = null;
WaterQuad = null; WaterQuad = null;
CollisionBounds = null; CollisionBounds = null;
NavPoly = null; NavPoly = null;
@ -346,6 +356,14 @@ namespace CodeWalker
{ {
name = DistantLodLights.Ymap?.Name ?? ""; name = DistantLodLights.Ymap?.Name ?? "";
} }
else if (BoxOccluder != null)
{
name = "BoxOccluder " + (BoxOccluder.Ymap?.Name ?? "");
}
else if (OccludeModel != null)
{
name = "OccludeModel " + (OccludeModel.Ymap?.Name ?? "");
}
else if (CollisionBounds != null) else if (CollisionBounds != null)
{ {
name = CollisionBounds.GetName(); name = CollisionBounds.GetName();
@ -424,6 +442,14 @@ namespace CodeWalker
{ {
name = TimeCycleModifier.CTimeCycleModifier.name.ToString(); name = TimeCycleModifier.CTimeCycleModifier.name.ToString();
} }
if (BoxOccluder != null)
{
name = "BoxOccluder " + (BoxOccluder.Ymap?.Name ?? "");
}
if (OccludeModel != null)
{
name = "OccludeModel " + (OccludeModel.Ymap?.Name ?? "");
}
if (CarGenerator != null) if (CarGenerator != null)
{ {
name = CarGenerator.NameString(); name = CarGenerator.NameString();
@ -847,6 +873,7 @@ namespace CodeWalker
Scenario = 14, Scenario = 14,
PopZone = 15, PopZone = 15,
Audio = 16, Audio = 16,
Occlusion = 17,
} }

19
WorldForm.Designer.cs generated
View File

@ -285,6 +285,7 @@ namespace CodeWalker
this.ToolbarCameraMapViewButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarCameraMapViewButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarCameraOrthographicButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarCameraOrthographicButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarPanel = new System.Windows.Forms.Panel(); this.ToolbarPanel = new System.Windows.Forms.Panel();
this.ToolbarSelectOcclusionButton = new System.Windows.Forms.ToolStripMenuItem();
this.StatusStrip.SuspendLayout(); this.StatusStrip.SuspendLayout();
this.ToolsPanel.SuspendLayout(); this.ToolsPanel.SuspendLayout();
this.ToolsTabControl.SuspendLayout(); this.ToolsTabControl.SuspendLayout();
@ -345,7 +346,7 @@ namespace CodeWalker
this.StatusLabel.BackColor = System.Drawing.SystemColors.Control; this.StatusLabel.BackColor = System.Drawing.SystemColors.Control;
this.StatusLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.StatusLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.StatusLabel.Name = "StatusLabel"; this.StatusLabel.Name = "StatusLabel";
this.StatusLabel.Size = new System.Drawing.Size(847, 17); this.StatusLabel.Size = new System.Drawing.Size(878, 17);
this.StatusLabel.Spring = true; this.StatusLabel.Spring = true;
this.StatusLabel.Text = "Initialising"; this.StatusLabel.Text = "Initialising";
this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -1048,7 +1049,8 @@ namespace CodeWalker
"Distant Lod Lights", "Distant Lod Lights",
"Mlo Instance", "Mlo Instance",
"Scenario", "Scenario",
"Audio"}); "Audio",
"Occlusion"});
this.SelectionModeComboBox.Location = new System.Drawing.Point(51, 30); this.SelectionModeComboBox.Location = new System.Drawing.Point(51, 30);
this.SelectionModeComboBox.Name = "SelectionModeComboBox"; this.SelectionModeComboBox.Name = "SelectionModeComboBox";
this.SelectionModeComboBox.Size = new System.Drawing.Size(121, 21); this.SelectionModeComboBox.Size = new System.Drawing.Size(121, 21);
@ -2694,7 +2696,7 @@ namespace CodeWalker
this.ToolbarCameraModeButton}); this.ToolbarCameraModeButton});
this.Toolbar.Location = new System.Drawing.Point(1, 0); this.Toolbar.Location = new System.Drawing.Point(1, 0);
this.Toolbar.Name = "Toolbar"; this.Toolbar.Name = "Toolbar";
this.Toolbar.Size = new System.Drawing.Size(554, 25); this.Toolbar.Size = new System.Drawing.Size(585, 25);
this.Toolbar.TabIndex = 6; this.Toolbar.TabIndex = 6;
this.Toolbar.Text = "toolStrip1"; this.Toolbar.Text = "toolStrip1";
// //
@ -2851,7 +2853,8 @@ namespace CodeWalker
this.ToolbarSelectDistantLodLightsButton, this.ToolbarSelectDistantLodLightsButton,
this.ToolbarSelectMloInstanceButton, this.ToolbarSelectMloInstanceButton,
this.ToolbarSelectScenarioButton, this.ToolbarSelectScenarioButton,
this.ToolbarSelectAudioButton}); this.ToolbarSelectAudioButton,
this.ToolbarSelectOcclusionButton});
this.ToolbarSelectButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarSelectButton.Image"))); this.ToolbarSelectButton.Image = ((System.Drawing.Image)(resources.GetObject("ToolbarSelectButton.Image")));
this.ToolbarSelectButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.ToolbarSelectButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.ToolbarSelectButton.Name = "ToolbarSelectButton"; this.ToolbarSelectButton.Name = "ToolbarSelectButton";
@ -3258,6 +3261,13 @@ namespace CodeWalker
this.ToolbarPanel.TabIndex = 7; this.ToolbarPanel.TabIndex = 7;
this.ToolbarPanel.Visible = false; this.ToolbarPanel.Visible = false;
// //
// ToolbarSelectOcclusionButton
//
this.ToolbarSelectOcclusionButton.Name = "ToolbarSelectOcclusionButton";
this.ToolbarSelectOcclusionButton.Size = new System.Drawing.Size(181, 22);
this.ToolbarSelectOcclusionButton.Text = "Occlusion";
this.ToolbarSelectOcclusionButton.Click += new System.EventHandler(this.ToolbarSelectOcclusionButton_Click);
//
// WorldForm // WorldForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -3599,5 +3609,6 @@ namespace CodeWalker
private System.Windows.Forms.NumericUpDown SnapGridSizeUpDown; private System.Windows.Forms.NumericUpDown SnapGridSizeUpDown;
private System.Windows.Forms.Label label26; private System.Windows.Forms.Label label26;
private System.Windows.Forms.CheckBox RenderEntitiesCheckBox; private System.Windows.Forms.CheckBox RenderEntitiesCheckBox;
private System.Windows.Forms.ToolStripMenuItem ToolbarSelectOcclusionButton;
} }
} }

View File

@ -1118,6 +1118,10 @@ namespace CodeWalker
case MapSelectionMode.Grass: case MapSelectionMode.Grass:
change = change || (LastMouseHit.GrassBatch != PrevMouseHit.GrassBatch); change = change || (LastMouseHit.GrassBatch != PrevMouseHit.GrassBatch);
break; break;
case MapSelectionMode.Occlusion:
change = change || (LastMouseHit.BoxOccluder != PrevMouseHit.BoxOccluder)
|| (LastMouseHit.OccludeModel != PrevMouseHit.OccludeModel);
break;
case MapSelectionMode.WaterQuad: case MapSelectionMode.WaterQuad:
change = change || (LastMouseHit.WaterQuad != PrevMouseHit.WaterQuad); change = change || (LastMouseHit.WaterQuad != PrevMouseHit.WaterQuad);
break; break;
@ -1189,6 +1193,14 @@ namespace CodeWalker
{ {
ori = CurMouseHit.CarGenerator.Orientation; ori = CurMouseHit.CarGenerator.Orientation;
} }
if (CurMouseHit.BoxOccluder != null)
{
ori = CurMouseHit.BoxOccluder.Orientation;
}
if (CurMouseHit.OccludeModel != null)
{
//ori = CurMouseHit.OccludeModel.Orientation;
}
if (CurMouseHit.MloEntityDef != null) if (CurMouseHit.MloEntityDef != null)
{ {
scale = Vector3.One; scale = Vector3.One;
@ -1443,6 +1455,14 @@ namespace CodeWalker
bbmax = selectionItem.GrassBatch.AABBMax; bbmax = selectionItem.GrassBatch.AABBMax;
scale = Vector3.One; scale = Vector3.One;
} }
if (selectionItem.BoxOccluder != null)
{
var bo = selectionItem.BoxOccluder;
camrel = bo.Position - camera.Position;
ori = bo.Orientation;
bbmin = bo.BBMin;
bbmax = bo.BBMax;
}
if (selectionItem.NavPoly != null) if (selectionItem.NavPoly != null)
{ {
Renderer.RenderSelectionNavPoly(selectionItem.NavPoly); Renderer.RenderSelectionNavPoly(selectionItem.NavPoly);
@ -2684,7 +2704,40 @@ namespace CodeWalker
} }
} }
} }
if ((SelectionMode == MapSelectionMode.Occlusion) && (ymap.BoxOccluders != null))
{
for (int i = 0; i < ymap.BoxOccluders.Length; i++)
{
var bo = ymap.BoxOccluders[i];
if ((bo.Position - camera.Position).Length() > dmax) continue;
MapBox mb = new MapBox();
mb.CamRelPos = bo.Position - camera.Position;
mb.BBMin = bo.BBMin;
mb.BBMax = bo.BBMax;
mb.Orientation = bo.Orientation;
mb.Scale = Vector3.One;
Renderer.BoundingBoxes.Add(mb);
Quaternion orinv = Quaternion.Invert(bo.Orientation);
Ray mraytrn = new Ray();
mraytrn.Position = orinv.Multiply(camera.MouseRay.Position - mb.CamRelPos);
mraytrn.Direction = orinv.Multiply(mray.Direction);
bbox.Minimum = mb.BBMin;
bbox.Maximum = mb.BBMax;
if (mraytrn.Intersects(ref bbox, out hitdist) && (hitdist < CurMouseHit.HitDist) && (hitdist > 0))
{
CurMouseHit.BoxOccluder = bo;
CurMouseHit.HitDist = hitdist;
CurMouseHit.CamRel = mb.CamRelPos;
CurMouseHit.AABB = bbox;
}
}
}
if ((SelectionMode == MapSelectionMode.Occlusion) && (ymap.OccludeModels != null))
{
//TODO
}
} }
private void UpdateMouseHits(List<WaterQuad> waterquads) private void UpdateMouseHits(List<WaterQuad> waterquads)
@ -3652,6 +3705,16 @@ namespace CodeWalker
SelectionEntityTabPage.Text = "Grass"; SelectionEntityTabPage.Text = "Grass";
SelEntityPropertyGrid.SelectedObject = item.GrassBatch; SelEntityPropertyGrid.SelectedObject = item.GrassBatch;
} }
else if (item.BoxOccluder != null)
{
SelectionEntityTabPage.Text = "Box Occluder";
SelEntityPropertyGrid.SelectedObject = item.BoxOccluder;
}
else if (item.OccludeModel != null)
{
SelectionEntityTabPage.Text = "Occlude Model";
SelEntityPropertyGrid.SelectedObject = item.OccludeModel;
}
else if (item.WaterQuad != null) else if (item.WaterQuad != null)
{ {
SelectionEntityTabPage.Text = "WaterQuad"; SelectionEntityTabPage.Text = "WaterQuad";
@ -5830,6 +5893,10 @@ namespace CodeWalker
mode = MapSelectionMode.Audio; mode = MapSelectionMode.Audio;
ToolbarSelectAudioButton.Checked = true; ToolbarSelectAudioButton.Checked = true;
break; break;
case "Occlusion":
mode = MapSelectionMode.Occlusion;
ToolbarSelectOcclusionButton.Checked = true;
break;
} }
SelectionMode = mode; SelectionMode = mode;
@ -7449,6 +7516,12 @@ namespace CodeWalker
SetMouseSelect(true); SetMouseSelect(true);
} }
private void ToolbarSelectOcclusionButton_Click(object sender, EventArgs e)
{
SetSelectionMode("Occlusion");
SetMouseSelect(true);
}
private void ToolbarMoveButton_Click(object sender, EventArgs e) private void ToolbarMoveButton_Click(object sender, EventArgs e)
{ {
SetWidgetMode(ToolbarMoveButton.Checked ? "Default" : "Position"); SetWidgetMode(ToolbarMoveButton.Checked ? "Default" : "Position");

View File

@ -240,25 +240,6 @@ ufo
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB4SURBVDhP3ZC7DcAgDEQZKTMwHOvSIFriS7BlEB+HMic9 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB4SURBVDhP3ZC7DcAgDEQZKTMwHOvSIFriS7BlEB+HMic9
QJbvFThLUkpXzjkSpaeuzMPlEELx3jdsBauyCHBY6UWYPQI93KEljQD3jL6EGzN6x0bASyNYwkKU8Udm QJbvFThLUkpXzjkSpaeuzMPlEELx3jdsBauyCHBY6UWYPQI93KEljQD3jL6EGzN6x0bASyNYwkKU8Udm
gd6TMnIikDJyIqjVNz8T7FgKrAwFX6lVinM3aJ05lWDPRRcAAAAASUVORK5CYII= gd6TMnIikDJyIqjVNz8T7FgKrAwFX6lVinM3aJ05lWDPRRcAAAAASUVORK5CYII=
</value>
</data>
<data name="ToolbarObjectSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHRJREFUOE/tk0EKgCAQRedIncGrGZ602lowuFW/kM1ElLYLEh668D1dKO2DmYcQ
gs/EHpTsnIvGmGZKQMrWjnH12y3ztJR9NfBGxiwD6lpPQEYMaxU4n3aF3PcHPh/AY8Ljy67vDkgZ36AG
WlEyBgKdHDIRJSPcKxCRg0UPAAAAAElFTkSuQmCC
</value>
</data>
<data name="ToolbarWorldSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAThJREFUOE+dk01ugzAQhTlBj+MDIJC4A1yEa7DMnlWaSiAu0ZI7BNi0XaRpF7Bg
4/pzbMsQ0qod6SX2zHvPP4yDdUzTJBR2CieF2YAxOWFot6GKDwrlMAyyKAqZZZkMw1AjTVOdowYHrpFd
w4if67p2os/L1wI2DwfuwkRNSitu2+NdA1szJqUVC7ZGYb9/dOQtA/6bptFjcxyBwY7zkfwL0KDF4ESC
7bHCx/miCf7qYJ1jjjYYx3Fm0nfDXfJWzhjMzuBweJJvr++b5K1dOQN7hP9AH0H96EvM83zh7q+2zsH1
L1H0fS+TJHEX+ZsBXDRobS/oRorjWB5/aqSXVkZRJKuqQnxtJEJNXCvjTu9D9kGOmhEvW5kwJiVb43wI
WBXYx9R1nV75RuyHKrrnzCcGjE1u9ZyD4BugoZigQ9xrngAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="ToolbarTransformSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ToolbarTransformSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -267,34 +248,6 @@ ufo
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB0SURBVDhP7ZNBCoAgEEXnSJ3BqxmetNpaMLhVv5DNRJS2 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB0SURBVDhP7ZNBCoAgEEXnSJ3BqxmetNpaMLhVv5DNRJS2
CxIeuvA9XSjtg5mHEILPxB6U7JyLxphmSkDK1o5x9dst87SUfTXwRsYsA+paT0BGDGsVOJ92hdz3Bz4f CxIeuvA9XSjtg5mHEILPxB6U7JyLxphmSkDK1o5x9dst87SUfTXwRsYsA+paT0BGDGsVOJ92hdz3Bz4f
wGPC48uu7w5IGd+gBlpRMgYCnRwyESUj3CsQkYNFDwAAAABJRU5ErkJggg== wGPC48uu7w5IGd+gBlpRMgYCnRwyESUj3CsQkYNFDwAAAABJRU5ErkJggg==
</value>
</data>
<data name="ToolbarSnapToGroundButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADMSURBVDhPrZLBDcMgDEUzGxN0ilyZJ92DqXJoe4Cr
y3f8EXERUptaehVx/F8gzSIil1hKKWIMB8C0EA4hTCXToqCXVFbjOwElKSUF65zzzUbHhad4CYkxyr7v
KvHHIhQ0ybbd5fl4KVhDgns+SPSnDqzYMgQME/TsOO2d/EVQ17ozXmgD2/VHgMCGdY5h9psALwovDBLc
9GAYcwyzZ//FUZCgiS3btj8k/tqiR3Xn0w+pDp2e2IN+xZJWncAzDINTTQSAwRYGLfQbsrwBmeh5Q8G/
p8gAAAAASUVORK5CYII=
</value>
</data>
<data name="ToolbarSnapToGridButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAH5JREFUOE+9kEEKwCAMBH2bL+hPfI/9ooe2B71aVpKS5iBB0i4MyCZZjcFdrbUu
IdsuDMUYB/8H1Fo3HQCPynOhsZTSU0pPAM7wpiG4hcFAzns/j2uAMzzZo3ntDHiYkTWNXwCztAJr+ROl
0IhU+UTzMEsHkG2XS4CE7K8Uwg0o2F4o9CrlEwAAAABJRU5ErkJggg==
</value>
</data>
<data name="ToolbarSnapToGroundGridButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADLSURBVDhPpZHRDcIwDEQzWxbqGEjZoOzRqfoBfLS/
Jnf1IWMKAmrpSYl7d3HSYmaHKOu6msNG2BOKPhVEtdZHiPbqfR0QQqy1Rn4OUMg0TQTrZVlOLt2vLnoJ
EcMw2DzPDMEke9AsYBrHs10vN4I1QqImwwDcFyMjQGaBHr5Bo8nEoYCnCQTGzVeI4oj6fIi+KHgoPBhC
4knCjTww9vxfbIUQNDEyiGIZ8t6tW/k0vC/AOpuiueNOLwVkUeylvju9FJCg8E1vM/2PlTv5UoervVTJ
uQAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="ToolbarSnapButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ToolbarSnapButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -389,6 +342,64 @@ ufo
4BJN+IjGo5O8ZJndGVhKxpjWWts551aih0fre+0BLaVchRAezPB2NXSSV/gVwXGYPJiVUt6ns1ghCDjn 4BJN+IjGo5O8ZJndGVhKxpjWWts551aih0fre+0BLaVchRAezPB2NXSSV/gVwXGYPJiVUt6ns1ghCDjn
UQG86w3FToVgDcWCWS9Fvi/Ao0RVAcwUjwpyhzmf4n8BFApS5HZRwRuONGMbrIJ1JIN8O2QAAAAASUVO UQG86w3FToVgDcWCWS9Fvi/Ao0RVAcwUjwpyhzmf4n8BFApS5HZRwRuONGMbrIJ1JIN8O2QAAAAASUVO
RK5CYII= RK5CYII=
</value>
</data>
<data name="ToolbarCameraModeButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEvSURBVDhP3dK/K0dRGMfxKxRJopCSEkLya/guUhQRmQwG
WfwIkYySgYUSKUKJlOK/MBoMFMofYLUIsfJ+f3NuF3+A8tRree5zP/fcc070f6oHT/jAPTqQj6WvXvCM
TZQgG3H58gFGcYVLtGIN15jBNDbwiGNUIg4pQx8GsQuHhrCDW8yjHyns4Q0DcCXpykM5bFzgHGPYxw1G
UIVMtMHfWUUj4nIg/KurGIYrSAZYOXDGlbhXcZlegUO8Yxzb+BlQAwNW0G0jVAYK0AwHtnCEOyQDZvGC
ObTbKIIvLMA9WIYDizhFMsDjfsAZptCA9JcdfoVBvryOSbgCe4HPTuCz+BQMKEUvJmCy96ET1ehCuAf2
5ZF+uwdZKEYtmuBGFSIXhtejBe5PHX7dxL+qKPoEppRHcXOtiDsAAAAASUVORK5CYII=
</value>
</data>
<data name="ToolbarObjectSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHRJREFUOE/tk0EKgCAQRedIncGrGZ602lowuFW/kM1ElLYLEh668D1dKO2DmYcQ
gs/EHpTsnIvGmGZKQMrWjnH12y3ztJR9NfBGxiwD6lpPQEYMaxU4n3aF3PcHPh/AY8Ljy67vDkgZ36AG
WlEyBgKdHDIRJSPcKxCRg0UPAAAAAElFTkSuQmCC
</value>
</data>
<data name="ToolbarWorldSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAThJREFUOE+dk01ugzAQhTlBj+MDIJC4A1yEa7DMnlWaSiAu0ZI7BNi0XaRpF7Bg
4/pzbMsQ0qod6SX2zHvPP4yDdUzTJBR2CieF2YAxOWFot6GKDwrlMAyyKAqZZZkMw1AjTVOdowYHrpFd
w4if67p2os/L1wI2DwfuwkRNSitu2+NdA1szJqUVC7ZGYb9/dOQtA/6bptFjcxyBwY7zkfwL0KDF4ESC
7bHCx/miCf7qYJ1jjjYYx3Fm0nfDXfJWzhjMzuBweJJvr++b5K1dOQN7hP9AH0H96EvM83zh7q+2zsH1
L1H0fS+TJHEX+ZsBXDRobS/oRorjWB5/aqSXVkZRJKuqQnxtJEJNXCvjTu9D9kGOmhEvW5kwJiVb43wI
WBXYx9R1nV75RuyHKrrnzCcGjE1u9ZyD4BugoZigQ9xrngAAAABJRU5ErkJggg==
</value>
</data>
<data name="ToolbarSnapToGroundButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADMSURBVDhPrZLBDcMgDEUzGxN0ilyZJ92DqXJoe4Cr
y3f8EXERUptaehVx/F8gzSIil1hKKWIMB8C0EA4hTCXToqCXVFbjOwElKSUF65zzzUbHhad4CYkxyr7v
KvHHIhQ0ybbd5fl4KVhDgns+SPSnDqzYMgQME/TsOO2d/EVQ17ozXmgD2/VHgMCGdY5h9psALwovDBLc
9GAYcwyzZ//FUZCgiS3btj8k/tqiR3Xn0w+pDp2e2IN+xZJWncAzDINTTQSAwRYGLfQbsrwBmeh5Q8G/
p8gAAAAASUVORK5CYII=
</value>
</data>
<data name="ToolbarSnapToGridButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAH5JREFUOE+9kEEKwCAMBH2bL+hPfI/9ooe2B71aVpKS5iBB0i4MyCZZjcFdrbUu
IdsuDMUYB/8H1Fo3HQCPynOhsZTSU0pPAM7wpiG4hcFAzns/j2uAMzzZo3ntDHiYkTWNXwCztAJr+ROl
0IhU+UTzMEsHkG2XS4CE7K8Uwg0o2F4o9CrlEwAAAABJRU5ErkJggg==
</value>
</data>
<data name="ToolbarSnapToGroundGridButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADLSURBVDhPpZHRDcIwDEQzWxbqGEjZoOzRqfoBfLS/
Jnf1IWMKAmrpSYl7d3HSYmaHKOu6msNG2BOKPhVEtdZHiPbqfR0QQqy1Rn4OUMg0TQTrZVlOLt2vLnoJ
EcMw2DzPDMEke9AsYBrHs10vN4I1QqImwwDcFyMjQGaBHr5Bo8nEoYCnCQTGzVeI4oj6fIi+KHgoPBhC
4knCjTww9vxfbIUQNDEyiGIZ8t6tW/k0vC/AOpuiueNOLwVkUeylvju9FJCg8E1vM/2PlTv5UoervVTJ
uQAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="ToolbarCameraPerspectiveButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ToolbarCameraPerspectiveButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -424,17 +435,6 @@ ufo
rp3fhGJScIRLzKMLFTC9cMIu3nCDVUyjB6WkYA93mEWbAyH9cMImPuA+rWMA31YwBU82kF6BS32Er/aO rp3fhGJScIRLzKMLFTC9cMIu3nCDVUyjB6WkYA93mEWbAyH9cMImPuA+rWMA31YwBU82kF6BS32Er/aO
M8zAh+OEghpcwQ2bg3uwBW8ewFd7xQkm0IA4oaAS7bh2KHjBIZbhV/D6GJkFphrdcIP8lFrAGPwPOjCO M8zAh+OEghpcwQ2bg3uwBW8ewFd7xQkm0IA4oaAS7bh2KHjBIZbhV/D6GJkFphrdcIP8lFrAGPwPOjCO
QdQiTqrAWNICd7gPnUj+xBKaU9dxfhTkjwV/FxU+AbsiGnc46OYIAAAAAElFTkSuQmCC QdQiTqrAWNICd7gPnUj+xBKaU9dxfhTkjwV/FxU+AbsiGnc46OYIAAAAAElFTkSuQmCC
</value>
</data>
<data name="ToolbarCameraModeButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEvSURBVDhP3dK/K0dRGMfxKxRJopCSEkLya/guUhQRmQwG
WfwIkYySgYUSKUKJlOK/MBoMFMofYLUIsfJ+f3NuF3+A8tRree5zP/fcc070f6oHT/jAPTqQj6WvXvCM
TZQgG3H58gFGcYVLtGIN15jBNDbwiGNUIg4pQx8GsQuHhrCDW8yjHyns4Q0DcCXpykM5bFzgHGPYxw1G
UIVMtMHfWUUj4nIg/KurGIYrSAZYOXDGlbhXcZlegUO8Yxzb+BlQAwNW0G0jVAYK0AwHtnCEOyQDZvGC
ObTbKIIvLMA9WIYDizhFMsDjfsAZptCA9JcdfoVBvryOSbgCe4HPTuCz+BQMKEUvJmCy96ET1ehCuAf2
5ZF+uwdZKEYtmuBGFSIXhtejBe5PHX7dxL+qKPoEppRHcXOtiDsAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -545,7 +545,8 @@ namespace CodeWalker
"Distant Lod Lights", "Distant Lod Lights",
"Mlo Instance", "Mlo Instance",
"Scenario", "Scenario",
"Audio"}); "Audio",
"Occlusion"});
this.SelectionModeComboBox.Location = new System.Drawing.Point(453, 12); this.SelectionModeComboBox.Location = new System.Drawing.Point(453, 12);
this.SelectionModeComboBox.Name = "SelectionModeComboBox"; this.SelectionModeComboBox.Name = "SelectionModeComboBox";
this.SelectionModeComboBox.Size = new System.Drawing.Size(121, 21); this.SelectionModeComboBox.Size = new System.Drawing.Size(121, 21);

View File

@ -114,6 +114,16 @@ namespace CodeWalker
SelectionEntityTabPage.Text = "Grass"; SelectionEntityTabPage.Text = "Grass";
SelEntityPropertyGrid.SelectedObject = item.GrassBatch; SelEntityPropertyGrid.SelectedObject = item.GrassBatch;
} }
else if (item.BoxOccluder != null)
{
SelectionEntityTabPage.Text = "Box Occluder";
SelEntityPropertyGrid.SelectedObject = item.BoxOccluder;
}
else if (item.OccludeModel != null)
{
SelectionEntityTabPage.Text = "Occlude Model";
SelEntityPropertyGrid.SelectedObject = item.OccludeModel;
}
else if (item.WaterQuad != null) else if (item.WaterQuad != null)
{ {
SelectionEntityTabPage.Text = "Water Quad"; SelectionEntityTabPage.Text = "Water Quad";