Code Monkey home page Code Monkey logo

tilecutter's People

Contributors

an-dz avatar ashleybaldock avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tilecutter's Issues

Default to the same source image for all seasons/rotations

Currently, you have to define the image source for each rotation. I think it would be beneficial if the image source you set for South Summer Backimage would be automatically set for everything else.
If the user is like me, and produces rotation or even seasons in the same file, it saves some clicking.
If the user has all states of the buildings in different files, they need to manually set them just like before.

A more advanced version would be to let the user choose a default pattern. That is, once they choose the size and position in the South Summer Backimage, Tilecutter would already know where the other images would be (eg. "one 'step' [(x+y)*paksize/2] to the right" or "append '_snowy' to image source name" etc.)

Shorthand notation support

Image paramaters can be shortened with a shorthand parameter for less lines in the dat parameters.

This support should be the one and only option available. An algorithm to generate it for all possibilities must be created.

It most certainly will require changing the way images are generated as well to take the maximum advantage of the system.

Option to only replace image data in dats

Currently TileCutter overwrites the entire dat file with its internal dat. While this may stay for compatibility reasons, another option for replacing only the image data with what is generated might be good to reduce duplication.

Add Shades feature

Shades can't read images with transparency and upgrading the code is unfeasible. Adding this tool into TileCutter would save time and coding time.

  • Identify special colours
  • Add features to easily identify said colours (some mask)
  • Add feature to check night-mode
  • Option to 'fix' the image by removing said colours

Add full seasons support

There are now 5 seasons in Simutrans:

  • Summer
  • Winter with Snow
  • Winter without Snow
  • Autumn
  • Spring

All should be supported, only the first two are now. This should be easy to add on the UI but might be a little tricky on the image/dat generation code.

Images with sRGB IEC iCC profiles show a popup with a warning

Images that wrongly include the sRGB IEC61966-2.1 iCC profile show a warning box with such information.

This warning shows up every time the image window updates which is every time the window size changes or the view is scrolled.

The best option would be to show the warning inside the UI without having the user to dismiss the message to use the app.

TileCutter location on Linux

I am trying to install and run TileCutter on Linux, but so far without success.

Distro: Kubuntu 22.04
Python: 3.10.6
wxPython: wxpython-tools 4.0.7+dfsg-13build1
NumPy: python3-numpy 1.21.5-1ubuntu22.04.1

Based on the output below, TileCutter seem to have some assumptions about where it is installed and maybe that your Simutrans (user?) directory is in ~/Documents/Simutrans.

If you could mention in the installation instructions where TileCutter should be installed, then I will happily move it there.

Does it rely on the presence of files from Simutrans Standard to run? I only install Standard through Steam. If it needs those files in a certain place, then again it would be helpful to know.

EDIT: Actually, looking at the output more closely, I think that it may have been unable to handle a space in the path in the path to the installation directory.

Output of ./install.sh

chmod: cannot access '/mnt/house/linmanfu/Documents/Simutrans': No such file or directory
chmod: cannot access 'Development/tilecutter/TileCutter.desktop': No such file or directory`
Do you want a Start Menu item? (y/N) n

You can now run TileCutter by double-clicking the TileCutter
icon on the same directory of this installation file.

Output of running TileCutter shortcut:

Could not find the program '/mnt/house/linmanfu/Documents/Simutrans

(I'm not sure whether it was looking for Simutrans or whether it was thrown the fact that it was originally installed in a directory called "Simutrans Development", with a space in the directory name)

Output of running ./libs/TileCutter.pyw from terminal:

TileCutter : INFO TC:WX version is: 4.0.7 gtk3 (phoenix) wxWidgets 3.0.5: main.<module>
TileCutter : INFO TC:Begin loading translation from file: languages/tc_gr.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_dk.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_es.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_ja.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_fi.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_it.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_hr.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_ce.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_id.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_et.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_ru.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_nl.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_ro.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_sv.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_en.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_no.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_hu.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_cz.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_pt.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_de.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_pl.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_zh.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_ko.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_sk.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_tr.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_cn.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_lt.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_fr.tab: translator.__init__
TileCutter : INFO TC:Begin loading translation from file: languages/tc_ca.tab: translator.__init__
TileCutter : INFO TC:Language setting found in config file - Setting active translation to English: translator.__init__
TileCutter : INFO TC:configuration source is unix auto location: main.<module>
TileCutter : INFO TC:configuration loaded from file: /home/matthew/.tilecutter/tilecutter.config: main.<module>
TileCutter : DEBUG TC:{'debug_on': True, 'debug_level': 2, 'logfile': '/home/matthew/.tilecutter/tilecutter.log', 'logfile_platform_default': True, 'transparent': [231, 255, 255], 'transparent_bg': [[153, 153, 153], [103, 103, 103]], 'default_paksize': 64, 'valid_image_extensions': ['.png'], 'OFFSET_NEGATIVE_ALLOWED': False, 'window_size': [-1, -1], 'window_position': [-1, -1], 'window_maximised': False, 'last_save_path': '', 'last_image_path': '', 'negative_offset_allowed': False, 'default_image_path': '', 'path_to_makeobj': '', 'write_dat': True, 'default_language': 'English'}: main.<module>
TileCutter : DEBUG TC:sys.argv says: ['./libs/tilecutter.pyw']: main.run
TileCutter : INFO TC:options: {'pak_output': False, 'dat_output': True, 'cli': False, 'png_directory': None, 'png_filename': None, 'dat_directory': None, 'dat_filename': None, 'pak_directory': None, 'pak_filename': None, 'verbose': None}: main.run
TileCutter : INFO TC:args: []: main.run
TileCutter : INFO TC:Init - Creating app with GUI: main.run
TileCutter : INFO TC:Starting...: main.OnInit
TileCutter : INFO TC:Create default project: main.OnInit
TileCutter : DEBUG TC:as: <bound method Project.save_location of <project.Project object at 0x7fa506494df0>>, datfile_location: <bound method Project.datfile_location of <project.Project object at 0x7fa506494df0>>, pngfile_location: <bound method Project.pngfile_location of <project.Project object at 0x7fa506494df0>>, pakfile_location: <bound method Project.pakfile_location of <project.Project object at 0x7fa506494df0>>: project.init_save_location
TileCutter : INFO TC:New title text: main.update_title_text
TileCutter : DEBUG TC:Check Project for changes - Project Unchanged: project.has_changed
TileCutter : DEBUG TC:Setting title_text to: (New Project) - TileCutter: main.update_title_text
TileCutter : INFO TC:Show main frame: main.OnInit
TileCutter : INFO TC:Creating main frame: viewMain.__init__
TileCutter : INFO TC:Creating menu: menuObject.__init__
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Adding item: menuObject.add_menu_item
TileCutter : INFO TC:Translating Menu: menuObject.translate
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Create season controls: controlSeason.__init__
TileCutter : INFO TC:Creating image controls: controlImage.__init__
TileCutter : INFO TC:Creating facing direction controls: controlFacing.__init__
TileCutter : INFO TC:Create dimension controls: controlDims.__init__
TileCutter : INFO TC:Creating offset controls: controlOffset.__init__
TileCutter : INFO TC:Create image display area: viewImage.__init__
TileCutter : INFO TC:Creating image location controls: controlImageFile.__init__
TileCutter : INFO TC:Create file picker: filePicker.__init__
TileCutter : INFO TC:Translate UI: viewImage.translate
TileCutter : INFO TC:Translate UI: controlImageFile.translate
TileCutter : INFO TC:Creating files locations controls: controlFiles.__init__
TileCutter : INFO TC:Create file picker: filePicker.__init__
TileCutter : INFO TC:Translate UI: viewMain.translate
TileCutter : INFO TC:Translate UI: viewImage.translate
TileCutter : INFO TC:Translate UI: controlImageFile.translate
TileCutter : INFO TC:Translate UI: controlSeason.translate
TileCutter : INFO TC:Translate UI: controlImage.translate
TileCutter : INFO TC:Translate UI: controlFacing.translate
TileCutter : INFO TC:Translate UI: controlDims.translate
TileCutter : INFO TC:Translate UI: controlOffset.translate
TileCutter : INFO TC:Translate UI: controlFiles.translate
TileCutter : INFO TC:Translating Menu: menuObject.translate
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Keyboard shortcuts: menuObject.gsc
TileCutter : INFO TC:Set new title text: viewMain.set_title
TileCutter : DEBUG TC:previous panel size: (877, 797), previous window size: (877, 850): viewMain.translate
TileCutter : DEBUG TC:minimum panel size is: (877, 797): viewMain.translate
TileCutter : DEBUG TC:new panel size is: (877, 797), new window size is: (877, 850): viewMain.translate
Traceback (most recent call last):
  File "/mnt/house/linmanfu/simutrans/tilecutter/libs/main.py", line 86, in OnInit
    self.frame = tcui.ViewMain(None, self, wx.ID_ANY, "TileCutter")
  File "/mnt/house/linmanfu/simutrans/tilecutter/libs/tcui/viewMain.py", line 153, in __init__
    self.translate()
  File "/mnt/house/linmanfu/simutrans/tilecutter/libs/tcui/viewMain.py", line 233, in translate
    self.panel.SetMinSize(wx.Size(max(self.panel.GetBestSize().Get()[1] * 1.4, self.panel.GetBestSize().Get()[0]), self.panel.GetBestSize().Get()[1]))
TypeError: Size(): arguments did not match any overloaded call:
  overload 1: too many arguments
  overload 2: argument 1 has unexpected type 'float'
  overload 3: argument 1 has unexpected type 'float'
OnInit returned false, exiting...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.