The International Simutrans Forum

PakSets and Customization => General Resources and Tools => Tools => Topic started by: An_dz on July 25, 2018, 11:37:05 PM

Title: TileCutter 1.1.2
Post by: An_dz on July 25, 2018, 11:37:05 PM


New version is out, now with full season support, no more warnings for ICCP profiles and fixing TCP projects not saving.

You can choose any combination of seasons, if you enable any of autumn, winter, spring or a combination of them and also leave either autumn, winter, spring or a combination of them disabled, those disabled will have summer season graphics.

Minor fix v1.1.1
- Fixed transparency loss on Linux
- Other quality improvements (see GitHub page for complete changelog)

Minor tweak v1.1.2
- Allow entering custom pakset sizes

Known issue
Console works but doesn't output messages.

Reporting bugs
You can submit a bug report by posting a reply to this thread or on GitHub (https://github.com/An-dz/tilecutter/issues) with the following information:

1. Clear steps on how to trigger it
2. tilecutter.log and TileCutter.exe.log (if present) - These can be found under "%USERPROFILE%\Application Data\tilecutter\" on Windows, "~/Library/Logs/tilecutter.log" on OSX and "~/.tilecutter/tilecutter.log" on all other platforms.

Download
If upgrading from any version before 1.0 it's advisable to completely delete the old version instead of replacing the files.

Windows executable is stand-alone. Other platforms must download the dependencies (Python 3 & wxPython 4).

Windows version needs the Visual C++ Redistributable 2010 x64. The latest version of the 2010 version is 10.0.40219, and you can download the x64 version here (https://www.microsoft.com/en-us/download/details.aspx?id=8328).

https://github.com/An-dz/tilecutter/releases/

Future
There are planned features that you can check out on GitHub (https://github.com/An-dz/tilecutter/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement).

Thanks to Ashley Baldock, the original creator, for all the work and for letting me use the same name. This tools is a time-saver.
Title: Re: TileCutter 1.1.0
Post by: NNW on June 29, 2019, 07:48:20 AM
I get an error with the "Linux" Version:File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_core.py", line 12003, in Append
    return _core_.Menu_Append(*args, **kwargs)
TypeError: in method 'Menu_Append', expected argument 2 of type 'int'
Title: Re: TileCutter 1.1.0
Post by: An_dz on June 29, 2019, 06:23:29 PM
You're using python 2 and wxPython 3, TileCutter is now using Python 3 and wxPython 4 since v1.

I forgot to add a shebang to tell it must use Python 3. You can either run tilecutter with python3 tilecutter.pyw or add this as the first line of tilecutter.pyw: #!/usr/bin/env python3.
Title: Re: TileCutter 1.1.0
Post by: NNW on June 30, 2019, 09:25:04 AM
God thanks, that I'm not using Linux for the first time.
I have altered python tilecutter.pyw to python3 tilecutter.pyw
And now it works lol
Title: Re: TileCutter 1.1.0
Post by: NNW on July 14, 2019, 08:44:39 AM
Houston I have another problem hihi. TC removes the Alpha channel from the images and creates on with a solid black background. This does not work with ST ;)
I'm using PovRay with the +UA switch for my objects....
Title: Re: TileCutter 1.1.0
Post by: An_dz on July 14, 2019, 10:48:15 PM
Please send me your TileCutter log and a testing image.
Title: Re: TileCutter 1.1.0
Post by: NNW on July 18, 2019, 04:29:25 PM
Template is attached
Title: Re: TileCutter 1.1.1
Post by: An_dz on July 25, 2019, 04:25:34 AM
After many hours going back and forth on the confusing reference manual and lots of testing as behaviour constantly differed between Linux and Windows it's finally fixed. The code is far more elegant now and other minor fixes were included like alerting the user if they are trying to run TileCutter with unsupported Python and wxPython versions.

Download is available on the releases page on GitHub (https://github.com/An-dz/tilecutter/releases/). Windows version is also affected with the changes and I recommend to update it.
Title: Re: TileCutter 1.1.1
Post by: NNW on July 26, 2019, 03:41:25 PM
You are my Hero. But though, if you start TC with bash you get:

Traceback (most recent call last):
  File "tilecutter/tilecutter.pyw", line 6, in <module>
    from main import run
  File "/home/herruntermoser/Programme/TileCutter/tilecutter/main.py", line 39, in <module>
    import project, tc, tcui, translator
  File "/home/herruntermoser/Programme/TileCutter/tilecutter/tcui/__init__.py", line 9, in <module>
    from .menuObject import menuObject
  File "/home/herruntermoser/Programme/TileCutter/tilecutter/tcui/menuObject.py", line 9, in <module>
    gt = translator.Translator()
  File "/home/herruntermoser/Programme/TileCutter/tilecutter/translator/translator.py", line 32, in __init__
    list = os.listdir(Translator.PATH_TO_TRANSLATIONS)
FileNotFoundError: [Errno 2] No such file or directory: 'languages'


But if you start tilecutter.pyw directly it works....  ;D :question:
Title: Re: TileCutter 1.1.1
Post by: ACarlotti on July 26, 2019, 04:06:30 PM
What do you mean by "start TC with bash"? The issue you're getting seems to be that you're running it with a different working directory to the one TileCutter expects. If you change directory in the tilecutter directory before running it (which I presume is what you've effectively done when you "start tilecutter.pyw directly"), then TileCutter will be looking for the languages directory in the right place.

Of course, it's probably possible to make TileCutter set the correct working directory on startup, but I don't see any reason you'd need to run it from another directory.
Title: Re: TileCutter 1.1.1
Post by: An_dz on July 26, 2019, 04:54:34 PM
They mean from the .sh file that is included. It was wrong, but now it's fixed.
Title: Re: TileCutter 1.1.1
Post by: R1dO on July 26, 2019, 05:00:26 PM
Quote from: ACarlotti on July 26, 2019, 04:06:30 PM... but I don't see any reason you'd need to run it from another directory.

A use case could be when adding the TileCutter folder to your $PATH (or symlink `tilecutter.py` to your `bin` folder).
In order to call TileCutter from the folder you are currently working in (assuming CLI workflow, when using a launcher icon it is always possible to set the startup path).

P.s. just started it up for the first time to see what it is actually all about. Must say: first impression .. looks nice.
Title: Re: TileCutter 1.1.1
Post by: Phystam on August 08, 2019, 06:02:34 PM
Can you support pak256 size?
Title: Re: TileCutter 1.1.2
Post by: An_dz on August 12, 2019, 12:31:07 AM
There you go, version 1.1.2 adds 256, 320 and 512 to the dropdown list and also allows custom pakset sizes, as long as it's between [16, 32765] (makeobj limits).

Download on GitHub (https://github.com/An-dz/tilecutter/releases/)

P.S.: Not many checks are made as makeobj allows it but it's very possible you'll have bugs with odd numbered sizes.
Title: Re: TileCutter 1.1.2
Post by: Matthew on September 09, 2019, 05:10:07 AM
I am trying to run TileCutter for the first time, on Windows 7 SP1 x64, but I have failed.  :-[

I have downloaded and unpacked the 7-zip archive. It is not in a 'special' directory like Program Files. Windows Control Panel confirms that version 10.0.40219 of the Visual C++ 2010 redistributables (both x86 and x64) are already installed on my system.

Unfortunately, when I double-click on the TileCutter.exe icon, nothing happens. No process appears in Windows Task Manager and no logs are created. This result is the same both as an ordinary user and using 'Run as Administrator'. Nothing happens if I type 'TileCutter -h' at a Command Prompt either.

Does anyone have any ideas where I have gone wrong, please? Does it need an installation of Python? Does it require the C++ redistributable or TileCutter itself to be installed in particular directories?
Title: Re: TileCutter 1.1.2
Post by: An_dz on September 09, 2019, 11:44:47 AM
@Matthew Sorry, during the zipping one dll was skipped. I've reuploaded the file and now it works as expected.
Title: Re: TileCutter 1.1.2
Post by: Matthew on September 09, 2019, 12:52:44 PM
Quote from: An_dz on September 09, 2019, 11:44:47 AM
@Matthew Sorry, during the zipping one dll was skipped. I've reuploaded the file and now it works as expected.

Thank you for that extremely swift response, @An_dz!  :star: The program now loads and the wiki page looks very helpful.
Title: Re: TileCutter 1.1.2
Post by: prissi on October 13, 2021, 07:53:54 AM
Somehow this seems broken now. When cutting, I rather get the inverse of the cutted image ...
Title: Re: TileCutter 1.1.2
Post by: Andarix on October 30, 2021, 06:26:11 PM
the bug is version 1.2.1

https://forum.simutrans.com/index.php/topic,20149.msg192484.html#msg192484 (https://forum.simutrans.com/index.php/topic,20149.msg192484.html#msg192484)