Game Development Community

dev|Pro Game Development Curriculum

Correcting an error in Scene tree, Library, meshes

by David Robert Pemberton · 06/03/2013 (3:36 am) · 5 comments

Correcting an error in Scene tree, Library, meshes. Not knowing how to use GitHub or having the time to learn how to use it I'm adding the correction here.

the error occurs if you have a space in your mesh name, It splits the name and makes it into folders.
Its always annoyed me so I decided to fix it

in 'tools/worldEditor/scripts/editors/creator.ed.cs'

in 'function EWCreatorWindow::navigate( %this, %address )'

around line 336 inside the 'if ( %this.tab $= "Meshes" )' statement.
delete '%splitPath = strreplace( %fullPath, "/", " " );'
and replace it with
%splitPath = strreplace( %fullPath, " ", "|" );   
%splitPath = strreplace( %splitPath, "/", " " );
after '%temp = strreplace( %pathFolders, " ", "/" );'
add
%temp = strreplace( %temp, "|", " " );

If someone could tell me how to do a pull request, I'll add it to GitHub.

[edit]Forgot ~ is allowed in filenames, so changed it to |[/edit]

About the author

http://www.deadlyassets.com I have a love of computers and programming them, have written a few games (ADV, Demon's Domain to name a couple) and even a couple of engines lost in the distant past of floppy disks


#1
06/03/2013 (5:40 am)
Thanks David, just changed it.
#2
06/03/2013 (4:01 pm)
could you move this to resources, not sure why they sometimes go to blogs..

[edit]
just posted it as an issue on GitHub with this fix.
[/edit]
#3
06/04/2013 (3:33 am)
ok, just spotted the same error is also in the prefabs and shapeEditor...
in 'tools/worldEditor/scripts/editors/creator.ed.cs'

in 'function EWCreatorWindow::navigate( %this, %address )'

around line 450 inside the 'if ( %this.tab $= "Prefabs" )' statement.

and in 'tools/shapeEditor/scripts/shapeEditpr.ed.cs'
in the 'function ShapeEdSelectWindow::navigate( %this, %address )'
around line 383
do the same replacement and addition.
#4
06/04/2013 (10:29 am)
A basic guide to how to submit a pull request:


  1. Update your development branch
  2. Create a new "topic" branch that is based upon the development branch. This branch will contain the changes that your contribution will make.
  3. Commit your changes to the "topic" branch.
  4. Push the "topic" branch to your forked repository on Github.
  5. From the webpage of your fork on Github select the newly pushed branch, then click the Pull Request button. Make sure on the following page that the base branch correctly points to development.
  6. Click the "Send Pull Request" button.

I didn't include specifics due to the variety of git clients available. Personally I prefer the command line when dealing with git and cannot recommend a client.

Thanks for creating the issue on Github, that will at least allow us to track the issue and this fix. The more that more people help out, the faster Torque can grow and improve -- thanks!
#5
06/24/2013 (3:16 am)
Think I figured it out, sent a pull request.

It would help if there was a basic guide to setting up a Torque Repo and sending pull requests.

I don't really care what client, sny would have been better than none, wasted a day I could have used coding figuring out how to do this :-/