-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terrain editor now edits *.tobj files in place #3199
Draft
ohlidalp
wants to merge
29
commits into
RigsOfRods:master
Choose a base branch
from
ohlidalp:terrn_export
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,643
−1,854
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ohlidalp
force-pushed
the
terrn_export
branch
3 times, most recently
from
November 30, 2024 20:26
341bc52
to
3a02667
Compare
Consistency++; Until now some document objects were named `^Document` (RigDef, GenericDocument), some `^File` (Odef, TObj) and some `^Def` (skin). Principal changes are in file 'ForwardDeclarations.h' - all document types and smart pointer typedefs are now here. The rest is pretty much all find&replace.
Consistency++;
Consistency++;
The 'logs/editor_out.log' file is history. The game now edits *.tobj files directly, but only if the terrain is unzipped in a directory (= a project). Exiting terrain editor at a zipped terrain will show a console warning "cannot export - not a project". Known issues: * preloaded actors rotations are off * procedural road bridge types are not preserved. * The "Terrain editor mode" doesn't inform about projects. TBD: add a button to import zipped terrain as project (internals already exist, only UI needs to be updated).
In this mode, the road will automatically switch between solid base and bridge depending on current height above ground. Internally, this mode already existed, but was only activated when importing legacy blocky-road into procedural road. This fixes the new TOBJ export from terrain editor.
* 'terrain_project_importer.as' - Launched automatically with terrain-editor mode with a read-only (ZIPped) terrain, provides info and import controls.
How I could trigger it: 1. enter simple test Terrain (zipped) 2. load 'script_editor.as' script. 3. enter terrain-editor mode --> game launches 'terrain_project_importer.as' --> boom. May be related: There are 2 messages "cannot run function with ID -1" that seem to appear when the terrain import script starts, I dont know where they come from.
Also Don't unload terrain when done (feels like crash).
other .terrn2 files in the project - typically FPS variants.
also much needed formatting
This is a messy commit as I reorganized the whole file into folding-regions to be able to work in script_editor.as. New features: * Road points now can be dragged using mouse (previously just moved with M hotkey). * Road point gizmos now always indicate hover (previously just if unselected). * Hover indication was changed - instead of changing color/size/thickness of the regular elements, it now draws extra elements around it. * UI redesigned to be displayed at bottom center of screen, wide and not very tall (as opposed to previous narrow panel fixed to left side of screen) - much better for ultrawide monitors such as mine :) * UI layout changed to accomodate new placement - multiple CollapsingHeader panels became their own tabs (mesh regen, AI waypoints).
ohlidalp
force-pushed
the
terrn_export
branch
from
December 11, 2024 00:37
3a02667
to
c5d8d0d
Compare
This can disable generation of collision triangles, which can be useful while editing to speed up mesh regen. Also in the future it will help creating decal meshes using the procedural geometry system.
Problem: The road mesh could not be removed from scene, so road editor's [rebuild mesh] button just piled up new meshes. Cause: The `ProceduralRoad::snode` variable was never set - it should have been written in `finish()` but it was shadowed by the new parameter. Broken in faebbcd Fix: rename the offending param and correctly create+assign child scene node.
There are 2 new methods in AngelScript `ProceduralManagerClass`: * `void rebuildObjectMesh(ProceduralObjectClassPtr@)` - previously private `updateObject()` * `void deleteObjectMesh(ProceduralObjectClassPtr@)` - previously private `deleteObject()` script 'road_editor.as' updated to use this.
ohlidalp
force-pushed
the
terrn_export
branch
from
December 12, 2024 00:33
d5aeb16
to
371c19f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are 3 major features:
Known issues:
Notes to code reviewers: