Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kduske/TrenchBroom
Browse files Browse the repository at this point in the history
Signed-off-by: Kristian Duske <[email protected]>

Conflicts:
	Mac/TrenchBroom/TrenchBroom-Info.plist
	Source/View/EditorFrame.cpp
	Source/View/EntityInspector.cpp
	Windows/TrenchBroom/BuildNo
  • Loading branch information
kduske committed Aug 27, 2013
2 parents 1b78432 + 6467a7a commit bc16e5a
Show file tree
Hide file tree
Showing 29 changed files with 212 additions and 91 deletions.
2 changes: 1 addition & 1 deletion Mac/Build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Build environment
../configure --enable-debug --with-osx_cocoa --with-opengl --enable-universal-binary=i386,x86_64 --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6
- Run make, then sudo make install
- Create a link from TrenchBroom/Mac/wxWidgets to your wxWidgets directory, e.g.
ln -s ~/Documents/Code/XCode/wxWidgets-2.9.4 ~/Documents/Code/XCode/TrenchBroom/Mac/wxWidgets
ln -s ~/Documents/Code/wxWidgets-2.9.5 ~/Documents/Code/TrenchBroom/Mac/wxWidgets
2 changes: 1 addition & 1 deletion Mac/TrenchBroom/TrenchBroom-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2551</string>
<string>2575</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
Expand Down
14 changes: 13 additions & 1 deletion Resources/Help/Documentation/creating_new_objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,20 @@ <h3>The Editing Plane</h3>
<p>If you wish to create a brush entity, select the brushes that should belong to that entity, <b>right click</b><script>print_macCtrlClick();</script> in the 3D view and select the brush entity from the <b>Create Brush Entity</b> submenu. To delete a brush entity, you can either delete all brushes belonging to that entity or you can move all brushes to another entity (such as worldspawn). To move brushes from one entity to another one, select the brushes you wish to move and then <b>right click</b><script>print_macCtrlClick();</script> on a brush belonging to the entity to which you wish to add the selected brushes. Finally, choose <b>Add Brushes to &lt;classname&gt;</b> from the menu.</p>

<a id="duplicating_objects"></a><h3>Duplicating Objects</h3>
<p>It is often very useful to create new objects by duplicating existing objects. You can duplicate brushes and entities by selecting them and choosing <script>print_menu_command("edit_duplicate_selection");</script>. The duplicated objects are offset by the current grid size towards the camera. Since TrenchBroom automatically selects the duplicates, you can edit them right away.</p>
<p>It is often very useful to create new objects by duplicating existing objects. You can duplicate brushes and entities by selecting them and choosing <script>print_menu_command("edit_duplicate_selection");</script>. The duplicated objects are duplicated in place and briefly flash to indicate the operation was successful. Since TrenchBroom automatically selects the duplicates, you can edit them right away.</p>
<p>You may also wish to duplicate and move with the current grid spacing. There is an array of shortcut commands to accomplish this:</p>
<ul>
<li><b>Duplicate Away (<script>print_key("Up", "CmdCtrl");</script>)</b> - creates a duplicate 1 grid spacing away from the current viewpoint horizontally.</li>
<li><b>Duplicate Toward (<script>print_key("Down", "CmdCtrl");</script>)</b> - creates a duplicate 1 grid spacing toward the current viewpoint horizontally.</li>
<li><b>Duplicate Right (<script>print_key("Right", "CmdCtrl");</script>)</b> - creates a duplicate 1 grid spacing toward the right side of the current viewpoint horizontally.</li>
<li><b>Duplicate Left (<script>print_key("Left", "CmdCtrl");</script>)</b> - creates a duplicate 1 grid spacing toward the left side of the current viewpoint horizontally.</li>
<li><b>Duplicate Upward (<script>print_key("PgUp", "CmdCtrl");</script>)</b> - creates a duplicate 1 grid spacing upwards vertically in world space.</li>
<li><b>Duplicate Downward (<script>print_key("PgDown", "CmdCtrl");</script>)</b> - creates a duplicate 1 grid spacing downwards vertically in worldspace.</li>
</ul>

<a id="drag_copy_objects"></a><h4>Ctrl Dragging to Duplicate</h4>
<p>You can also duplicate the current selection by pressing the <script>print_key("Ctrl");</script>, clicking on the current selection and dragging the mouse. This will duplicate the current selection while also moving to where you want immediately. If you desire more fine control, you can press <script>print_key("Ctrl");</script> along with any of the Arrow Keys <script>print_key("ArrowKeys");</script> to duplicate the current selection.</p>

<a id="copy_and_paste"></a><h3>Copy and Paste</h3>
<p>Standard commands apply: Cut (<script>print_menu_command("edit_cut");</script>), Copy (<script>print_menu_command("edit_copy");</script>) and Paste (<script>print_menu_command("edit_paste");</script>).</p>
<p>Just like in any other application, you can cut, copy and paste entities and brushes in TrenchBroom. Copied objects are placed on the clipboard as text snippets in the standard map format. This means that you can copy objects in TrenchBroom and paste them into a text editor and vice versa, however it is important to note that doing so may introduce floating point errors because Trenchbroom uses 'hidden' information during Copying and Pasting which helps preserve the complete structure of a brush but that information is lost when copying and pasting from text snippets.</p>
Expand Down
24 changes: 15 additions & 9 deletions Resources/Help/Documentation/editing_objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@ <h2>Editing Objects</h2>
<img src="images/move_objects_xy.jpg" width="600" height="553" alt="Moving Objects" id="move_objects" />
<div class="imagecaption">Moving objects with the mouse.</div>
</div>
<p>To move the selected objects horizontally using the mouse, <b>click and drag</b> the objects with the <b>left mouse button</b>. To move them vertically, hold the <script>print_key("Alt");</script> while dragging. The movement direction is indicated with little arrow heads next to the cursor.</p>
<p>If grid snapping is enabled, the objects are moved by multiples of the grid size.</p>
<p>To move the selected objects horizontally using the mouse, <b>click and drag</b> the objects with the <b>left mouse button</b>. To move them vertically, hold the <script>print_key("Alt");</script> while dragging. Note that while holding the <script>print_key("Alt");</script> key, the axis gizmo in the bottom left of the 3D view highlights the blue Z arrow to indicate movement is locked to that axis.</p>
<p>You can also toggle between horizontal direction locking with the <script>print_key("Tab");</script> key. The red and green axis arrows in the gizmo will become highlighted to indicate which direction movement is currently restricted to. Continue to cycle through the options with <script>print_key("Tab");</script> to unrestrict directional movement.</p>
<p>By default, Grid Snapping is on, and will restrict object movement to the grid size. If for some purpose you wish to turn this behavior off, choose <script>print_menu_command("view_snap_to_grid");</script>. Please note that the author of this document highly recommends <b>against</b> doing this for general editing, as it can only lead to trouble attempting to align brush faces and edges precisely.

<a name="rotating_objects"></a><h3>Rotating Objects</h3>
<p>There are two options for rotating objects. The first is to rotate the selected brushes by 90&deg; about the one of the axes of the coordinate system. The second is to rotate the selected objects freely using the mouse. In both cases, the center of the rotation is the center of the selected objects' bounding box. If grid snapping is enabled, the rotation center is snapped to the grid.</p>
<p>To rotate the selected objects by 90&deg; clockwise about one of the axes of the coordinate system, choose one of the rotation commands from the <b>Edit &raquo; Actions</b> menu or hit the appropriate keyboard shortcut. The following rotation commands are available:</p>
<ul>
<li><b>Rotate 90&deg; CW (<script>print_key("Up", "CmdCtrl");</script>)</b> - roll the selected objects clockwise about the closest axis of the camera direction by 90&deg;.</li>
<li><b>Rotate 90&deg; CCW (<script>print_key("Down", "CmdCtrl");</script>)</b> - roll the selected objects counter-clockwise about the closest axis of the camera direction by 90&deg;.</li>
<li><b>Rotate 90&deg; Left (<script>print_key("Left", "CmdCtrl");</script>)</b> - rotate the selected objects counter-clockwise about the Z axis by 90&deg;.</li>
<li><b>Rotate 90&deg; Right (<script>print_key("Right", "CmdCtrl");</script>)</b> - rotate the selected objects clockwise about the Z axis by 90&deg;.</li>
<li><b>Rotate 90&deg; Up (<script>print_key("PgUp", "CmdCtrl");</script>)</b> - rotate the selected objects clockwise about the closest axis of the camera right axis by 90&deg;.</li>
<li><b>Rotate 90&deg; Down (<script>print_key("PgDown", "CmdCtrl");</script>)</b> - rotate the selected objects counter-clockwise about the closest axis of the camera right axis by 90&deg;.</li>
<li><b>Rotate 90&deg; CW (<script>print_key("Up", "Alt");</script>)</b> - roll the selected objects clockwise about the closest axis of the camera direction by 90&deg;.</li>
<li><b>Rotate 90&deg; CCW (<script>print_key("Down", "Alt");</script>)</b> - roll the selected objects counter-clockwise about the closest axis of the camera direction by 90&deg;.</li>
<li><b>Rotate 90&deg; Left (<script>print_key("Left", "Alt");</script>)</b> - rotate the selected objects counter-clockwise about the Z axis by 90&deg;.</li>
<li><b>Rotate 90&deg; Right (<script>print_key("Right", "Alt");</script>)</b> - rotate the selected objects clockwise about the Z axis by 90&deg;.</li>
<li><b>Rotate 90&deg; Up (<script>print_key("PgUp", "Alt");</script>)</b> - rotate the selected objects clockwise about the closest axis of the camera right axis by 90&deg;.</li>
<li><b>Rotate 90&deg; Down (<script>print_key("PgDown", "Alt");</script>)</b> - rotate the selected objects counter-clockwise about the closest axis of the camera right axis by 90&deg;.</li>
</ul>
<br clear="all">
<p>Objects can also be rotated freely without any restriction as to the angle or axis of the rotation. To rotate the selected objects, activate the rotate tool by choosing <script>print_menu_command("edit_rotate_tool");</script>. You will see a rotate handle displayed approximately at the center of the bounding box of the selected objects.</p>
Expand All @@ -49,7 +50,7 @@ <h2>Editing Objects</h2>
<p>The selected objects can be flipped (or mirrored) horizontally by choosing <script>print_menu_command("edit_flip_horizontally");</script> from the menu. To flip the selected objects vertically, choose <script>print_menu_command("edit_flip_vertically");</script> from the menu.</p>

<a name="deleting_objects"></a><h3>Deleting Objects</h3>
<p>To delete brushes or entities, select them in the 3D view and hit the <script>print_key("Delete");</script> key.</p>
<p>To delete brushes or entities, select them in the 3D view and hit the <script>print_key("Backspace");</script> key.</p>

<a name="using_the_entity_property_editor"></a><h3>Using the Entity Property Editor</h3>
<p>Each Quake entity has some properties associated with it. These properties control the appearance or the effect of an entity in the game. Each property has a key and a value. In TrenchBroom, these properties can be edited using property list in the entity inspector. The property list represents all properties of the selected entities.</p>
Expand All @@ -64,6 +65,11 @@ <h2>Editing Objects</h2>
<div class="imagecaption">The color editor.</div>
</div>
<p>For color properties, TrenchBroom will display the smart color editor, shown in the screenshot above. You can use the sliders to adjust the RGB color values or you can click on the button below the sliders to bring up a color selection dialog. Next to the sliders, there is a list of all colors which are in use in the currently edited map. Click to select a color from the palette and to apply it to the currently selected entities.</p>

<a name="selection_isolation"></a><h3>Trenchbroom Entity Keys</h3>
<p>There are some entity keys that are Trenchbroom specific, these are the _def, _mod and _point_format keys and tell Trenchbroom which map specific settings to use. These keys allow the settings to persist across saves.</p>
<p>The _def key tells Trenchbroom which entity defition to use, the _mod key tells Trenchbroom which mod this map uses and controls things like what directories are searched for models and the _point_format key controls if Trenchbroom is using integer or float plane coordinates.</p>
<p>They cannot be modified by you through the smart editor interface. Instead, use the <a href="getting_started.html#entity_definition_files">Map Properties</a> dialog window.</p>
</div>
<script src="scripts/jquery.js"></script>
<script src="scripts/misc.js"></script>
Expand Down
8 changes: 7 additions & 1 deletion Resources/Help/Documentation/getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ <h2>Getting Started</h2>
<p>Open the Map Properties dialog by choosing <script>print_menu_command("edit_map_properties");</script> from the menu. In the middle section of the dialog, you can manage texture wad files. To add a texture wad, click on the <b>+</b> button. To remove texture wads, first select them in the list and then click on the <b>-</b> button. To change the order in which textures are loaded from the wad files, use the triangle buttons to move texture wad files up and down. The textures are loaded from top to bottom, and textures overwrite previously loaded textures with the same name. For example, if both &quot;quake.wad&quot; and &quot;rtz.wad&quot; contain a texture called &quot;trim1&quot;, the editor will use the one from &quot;rtz.wad&quot; because it is loaded later.</p>
<p>The paths to texture wads and external entity definition files can either be stored as absolute or as relative paths. A relative path can be relative to the current map file (if it has already been saved), to the application's executable or to your Quake installation. You can set this whenever you add an external entity definition file or a texture wad.</p>
<a name="setting_plane_point_format"></a><h3>Setting the Plane Point Format</h3>
<p>Open the Map Properties dialog by choosing <script>print_menu_command("edit_map_properties");</script> from the menu. In the bottom section of the dialog, you can set TrenchBroom to force integer plane points. This affects how the points that define a brush plane are stored in the map files. The two options are floating point coordinates (the default) and integer point coordinates. If your compilers supports floating point coordinates, you should leave this setting alone, as it gives you more freedom when editing the vertices of brushes. If your compiler does not support floating point coordinates, you should set it to &quot;Force integer plane points&quot;.</p>
<p>Open the Map Properties dialog by choosing <script>print_menu_command("edit_map_properties");</script> from the menu. In the bottom section of the dialog, you can set TrenchBroom to force integer plane points. This affects how the points that define a brush plane are stored in the map files. The two options are floating point coordinates (the default, unchecked) and integer point coordinates (checked). If your compilers supports floating point coordinates, you should leave this setting alone, as it gives you more freedom when editing the vertices of brushes. If your compiler does not support floating point coordinates, you should set it to &quot;Force integer plane points&quot;.</p>
<p>In general, if you find that geometry in-game does not look the way it did in-editor, you should try turning this on and re-compiling to see if it helps. Only older compilers do not support floating-point plane coordinates though, so this should rarely be an issue.</p>
<h4>What are planes and what does this setting really do?</h4>
<p>While Trenchbroom and all other editors represent brushes are convex shapes with faces and vertices, in actuality, brushes are defined as a set of planes via 3 points, and their edges are resolved by getting the intersections of those planes during compile time. ID chose to use this method because it reduces the filesize and also makes compiling faster. These reasons are of course no longer relevant now as computers are more than fast enough to perform the faces to planes conversion on the fly.</p>
<p>Planes are represented with 3 co-linear points (in other words, all 3 of those points are on the plane). Because of this, it is possible for a brush in the editor which has non-integer vertices to have integer plane-points.</p>
<p>When this option is enabled, once the user leaves vertex mode after performing vertex manipulations on a brush(es), Trenchbroom will rebuild those brushes from their plane definitions to ensure that editor and game engine will look the same.</p>
<p>Trenchbroom will try its best to make sure the rebuilt faces are as close to identical as the original was, but this is not always possible and as a result, occasionally, vertices will shift when leaving vertex mode.</p>
</div>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Resources/Help/Documentation/scripts/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ menu_commands["Mac"]["edit_actions_correct_verts"] = "Edit &raquo; Actions &raq
menu_commands["Mac"]["edit_actions_snap_verts"] = "Edit &raquo; Actions &raquo; Snap Vertices";

menu_commands["Mac"]["view_center_on_selection"] = "View &raquo; Camera &raquo; Center on Selection - &#x2325;C";

menu_commands["Mac"]["view_camera_move_to_next_pt"] = "View &raquo; Camera &raquo; Move Camera to Next Point - &#x2325;+)";
menu_commands["Mac"]["view_camera_move_to_prev_pt"] = "View &raquo; Camera &raquo; Move Camera to Previous Point - &#x2325;-)";
menu_commands["Mac"]["view_snap_to_grid"] = "View &raquo; Grid &raquo; Snap to Grid - &#8984;&#8679;G";



menu_commands["Windows"]["preferences"] = "View &raquo; Preferences";
Expand Down Expand Up @@ -108,6 +111,7 @@ menu_commands["Windows"]["edit_actions_snap_verts"] = "Edit &raquo; Actions &ra
menu_commands["Windows"]["view_center_on_selection"] = "View &raquo; Camera &raquo; Center on Selection - Alt+C";
menu_commands["Windows"]["view_camera_move_to_next_pt"] = "View &raquo; Camera &raquo; Move Camera to Next Point - Alt+(Plus (+))";
menu_commands["Windows"]["view_camera_move_to_prev_pt"] = "View &raquo; Camera &raquo; Move Camera to Previous Point - Alt+(Minus (-))";
menu_commands["Windows"]["view_snap_to_grid"] = "View &raquo; Grid &raquo; Snap to Grid - Ctrl+Shift+G";

var keys = new Object();

Expand Down
Loading

0 comments on commit bc16e5a

Please sign in to comment.