Git Product home page Git Product logo

resprytile's Introduction

BLENDER 4.x NOTICE:

The plugin has been updated to work with 4.x, personally tested on Blender 4.1 on Ubuntu Linux. If you see anything misbehaving, please submit an issue.

ReSprytile

Fork of Sprytile Painter

Updated for Blender 4.1

A addon for creating tile based low spec 3D scenes. (Unofficial port for blender 4.1)


Features

  • Tile building: Build your mesh directly with tiles, skip tedious UV mapping while quickly rotating and flipping tiles.
  • UV painting: Create your mesh with other Blender tools, then quickly UV map them to your tiles. Spend less time in the UV editor.
  • Pixel grid tools: Keep your mesh aligned to the grid with pixel translation, move vertices around with confidence.

Demo:

Timelapse

Download:

Download from releases.

Getting Started:

Community:

  • Chat with the fellow users in the Discord server
  • Showcase your work or ask for support in the forum

Issue/Feature requests:

Bug reports for this port can be submitted to GitHub issues

Known Issues

  • Zooming too much can result in your palette dispearing. SAVE and RE-OPEN your blend file to get your palette back. Palette Position Reset button coming soon.

Acknowledgments:

The bulk of Blender 2.8 porting work by was done by Yonnji and ologon, with additional contributions by brandy92. The bulk of the Blender 3.x porting work was done by IonTheDev. The bulk of the Blender 4.x porting was done by Taron686

I simply just picked up the torch for this project, Python is not my native language and I am learning it as I develope this fork.

resprytile's People

Contributors

chemikhazi avatar ologon avatar jeiel-bunnyhug avatar ionthedev avatar yonnji avatar nurjeff avatar hikari-no-yume avatar kame7c0 avatar cg-cnu avatar belohlavek avatar brandy92 avatar

Stargazers

Paul Johnson avatar  avatar André Heringer avatar Nickolai Korshunov avatar  avatar  avatar Jung-uk Choi avatar Paulo Jorge PM avatar Andrew Poženel - SDT avatar Paweł Skorupka avatar Adriano Barroso avatar Bear avatar Sam Gibson avatar Freb avatar David avatar Symphony avatar Avery Hiebert avatar Adam avatar I ♥ Spicy Noodles avatar Nick Johnson avatar Petro zilia avatar Justin Trotter avatar  avatar Lillian avatar Thales R. avatar Miguel González Obenza avatar  avatar faceze avatar Edgar Sayohm Takamura avatar Ryosuke Sakaki avatar enigmaxp avatar  avatar Seremor108 avatar Gerardo Cotera avatar  avatar  avatar  avatar  avatar Pablo P. avatar Daniel Cañizares Corrales avatar  avatar Collin Visser avatar David Klein avatar Rafael Oliveira avatar  avatar  avatar Andrew Burke avatar Kao Félix avatar Cem avatar ZIK avatar Cpaz avatar Ali Al-Khalifa avatar Alexandre avatar Alex Noble avatar Sean Michael avatar  avatar Kurt avatar  avatar  avatar  avatar  avatar Mikael Ganehag Brorsson avatar Chris Wood avatar  avatar Elías Moreno avatar Shengchen Zhang avatar  avatar MirrorIsDangerous avatar  avatar Ivan Kuzmenko avatar Jaron Wanderley avatar Brandon Pendleton avatar Casey Carlin avatar Anu Prakash avatar Matt Hicks avatar  avatar  avatar  avatar wren 『773tk』  avatar  avatar Neil Wolfkid avatar SkanerSoft avatar Borion avatar  avatar Benjamin Westphal avatar  avatar d11z avatar Lollie avatar  avatar  avatar Ali Tsuki avatar Rubedo avatar Benjamin Stanley avatar Tara Sophie avatar  avatar VirtualPierogi avatar

Watchers

 avatar  avatar Pepper Ikeoka avatar  avatar Adam avatar

resprytile's Issues

uv align error

Happens when pressing one of the 9 uv align buttons.

Traceback (most recent call last):
  File "/home/r2d2/.config/blender/3.6/scripts/addons/ReSprytile-master/sprytile_modal.py", line 608, in modal
    self.exit_modal(event, context)
  File "/home/r2d2/.config/blender/3.6/scripts/addons/ReSprytile-master/sprytile_modal.py", line 924, in exit_modal
    self.call_tool(event, False, context)
  File "/home/r2d2/.config/blender/3.6/scripts/addons/ReSprytile-master/sprytile_modal.py", line 712, in call_tool
    build_preview=self.draw_preview,
  File "/home/r2d2/MyApps/blender-3.6.1-linux-x64/3.6/scripts/modules/bpy_types.py", line 855, in __getattribute__
    return super().__getattribute__(attr)
AttributeError: 'VIEW3D_OP_SprytileModalTool' object has no attribute 'draw_preview'
Error: Python: Traceback (most recent call last):
  File "/home/r2d2/.config/blender/3.6/scripts/addons/ReSprytile-master/sprytile_modal.py", line 608, in modal
    self.exit_modal(event, context)
  File "/home/r2d2/.config/blender/3.6/scripts/addons/ReSprytile-master/sprytile_modal.py", line 924, in exit_modal
    self.call_tool(event, False, context)
  File "/home/r2d2/.config/blender/3.6/scripts/addons/ReSprytile-master/sprytile_modal.py", line 712, in call_tool
    build_preview=self.draw_preview,
  File "/home/r2d2/MyApps/blender-3.6.1-linux-x64/3.6/scripts/modules/bpy_types.py", line 855, in __getattribute__
    return super().__getattribute__(attr)
AttributeError: 'VIEW3D_OP_SprytileModalTool' object has no attribute 'draw_preview'

Traceback (most recent call last):
  File "/home/r2d2/.config/blender/3.6/scripts/addons/ReSprytile-master/sprytile_gui.py", line 1742, in draw_callback_handler
    VIEW3D_OP_SprytileGui.draw_to_viewport(self.gui_min, self.gui_max, show_extra,
  File "/home/r2d2/MyApps/blender-3.6.1-linux-x64/3.6/scripts/modules/bpy_types.py", line 851, in __getattribute__
    properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type VIEW3D_OP_SprytileGui has been removed

Tile picker dissapear.

When clicking and using Shift + scroll on the tile picker, the size becomes so small that resizing it back is challenging. Is there an option to restore the palette picker size? Please help me with this issue

Can't install

Hi

trying to install this to Blender 3.6.1 and getting this error message:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\addon_utils.py", line 333, in enable
    mod = __import__(module_name)
ModuleNotFoundError: No module named 'ReSprytile-0'

Any way to fix this?

Max distance to paint tiles

There seems to be a max distance you can paint onto faces?

When I am too far away, I can't paint any tiles.

Painting tiles used to work from any distance.

blender_x17kf71C2X

Working with larger sprite/tilesheets

I've noticed that zooming in and moving the sheet only works inside the blender windows bounds. It would be better if the zoom and move would go through the bounds. Otherwise it's not possible to select on large sheets:
Screenshot 2023-10-09 12:48:38

Update version to not confuse auto updater

I downloaded version 0.8.0 and after installation version 0.7.1 is displayed. Also, auto update constantly shows that an update to 0.8.0 is available for the add-on.

It would also be a good idea to update the releases link in the ReadMe so that it does not redirect to another repository and is not misleading.

Issue with offset and padding

offset padding problem
As the picture shows the space between the tiles is at the size of 2 pixels instead of 1.

This might be fixable if margin values were allowed to have negative values.

I've also noticed that messing with (line 739):

                grid_size[0] + (padding[0]+2) + margin[1] + margin[3],
                grid_size[1] + (padding[1]+2) + margin[0] + margin[2]

like removing the *2 changes the selection to two pixels to the left.

About resprytile, tiling textures and big meshes.

I've noticed that using resprytile is very limiting. The main reason is that it needs the right size to paint or build. So if I have large walls I'd like to apply the same 32x32 tiling texture too I can't without splitting the 6 poly wall into small parts so it can be painted on. Or I have to add the texture in the right size to it which uses a lot of space on the tile sheet.

So if instead of using tile sheets there was an option to make a palette out of materials we could use both tile sheets and single textures. This would allow to place repeating textures on large surfaces or build large surfaces out of repeating tiles without adding extra geometry.

Tile Palette disappears in Version 1.0.3

I managed to lose the Tile Palette in literal seconds after trying 1.0.3

I scrolled in and out once, and it was gone.

This has been a consistent critical issue and is in dire need for a fix or at least a workaround.

Strange Module Not Found Error

This may be due to some peculiarities of NixOS that I'm not as yet aware of, but upon installing the add-on as a .zip file, blender correctly adds the addon's files to its addon filepath, and displays a message reading that the modules have been installed. On trying to enable the addon, however, an error occurs with the following traceback-

File "/nix/store/(random string)-blender-3.5.1/share/blender/3.5/scripts/modules/addon_utils.py", line 333, in enable
mod = __import__(module_name)
ModuleNotFoundError: No module named 'ReSprytile-0.8'

The issue, seemingly, is that the file has incorrectly truncated the path for the module it's trying to enable, removing the final ".1"; this occurred earlier, but also truncated the filename to "ReSprytile-0". The current state was achieved by simply changing the name of the folder to "ReSprytile-0", but has persisted after reinstalling the addon altogether.

Oddly, this issue does not happen with the original Sprytile, which instead breaks after having been enabled due to an error while loading image previews.

Expected Behavior

The addon, after installation, should be possible to enable through the blender preferences addon menu.

###Steps to Reproduce

  • Install blender 3.5.1 declaratively through Nix package manager
  • Download ReSprytile 0.8.1 as .zip from releases page
  • Install ReSprytile 0.8.1 through Blender's Preferences/Add-ons menu
  • Attempt to enable the addon in the Preferences/Add-ons Menu

Two errors plus workaround

Traceback (most recent call last):
  File "/home/r2d2/.config/blender/3.6/scripts/addons/sprytile-addon-master/sprytile_modal.py", line 608, in modal
    self.exit_modal(event, context)
  File "/home/r2d2/.config/blender/3.6/scripts/addons/sprytile-addon-master/sprytile_modal.py", line 924, in exit_modal
    self.call_tool(event, False, context)
  File "/home/r2d2/.config/blender/3.6/scripts/addons/sprytile-addon-master/sprytile_modal.py", line 712, in call_tool
    build_preview=self.draw_preview,
  File "/home/r2d2/MyApps/blender-3.6.1-linux-x64/3.6/scripts/modules/bpy_types.py", line 855, in __getattribute__
    return super().__getattribute__(attr)
AttributeError: 'VIEW3D_OP_SprytileModalTool' object has no attribute 'draw_preview'
Traceback (most recent call last):
  File "/home/r2d2/.config/blender/3.6/scripts/addons/sprytile-addon-master/sprytile_gui.py", line 205, in modal
    ret_val = self.handle_ui(context, event)
  File "/home/r2d2/.config/blender/3.6/scripts/addons/sprytile-addon-master/sprytile_gui.py", line 489, in handle_ui
    tilegrid.tile_selection[0] = sel_min.x
TypeError: expected an int type
Error: Python: Traceback (most recent call last):
  File "/home/r2d2/.config/blender/3.6/scripts/addons/sprytile-addon-master/sprytile_gui.py", line 205, in modal
    ret_val = self.handle_ui(context, event)
  File "/home/r2d2/.config/blender/3.6/scripts/addons/sprytile-addon-master/sprytile_gui.py", line 489, in handle_ui
    tilegrid.tile_selection[0] = sel_min.x
TypeError: expected an int type

The issue I've found is blender outputting floats: <Vector (25.0000, 16.0000)> when it's supposed to be an int.

The workaround is:
sprytile_gui.py:

                tilegrid.tile_selection[1] = int(sel_min.y)
                tilegrid.tile_selection[2] = (int(sel_max.x) - int(sel_min.x)) + 1
                tilegrid.tile_selection[3] = (int(sel_max.y) - int(sel_min.y)) + 1

and

        context.scene.sprytile_ui.palette_pos[0] = int(display_offset.x)
        context.scene.sprytile_ui.palette_pos[1] = int(display_offset.y)

That seems to fix both issues but also messes with the padding settings. My assumption is that blender forwards the .000 values from the ui. But I haven't found that part.

Crashes when trying to enable on MacOS (Intel)

MacOS Sonoma (Intel)
Blender 4.1.1
ReSprytile 1.0.3

It installs fine, but when I try to enable, it crashes with these messages. I've tried renaming the folder/zip, like some other comments have mentioned. I also tried to pip install gpu in blender's python, but didn't get too far down that path.

Unknown system architecture.
WARN (bgl): source/blender/python/generic/bgl.cc:2678 BPyInit_bgl: 'bgl' imported without an OpenGL backend. Please update your add-ons to use the 'gpu' module.
ERROR INITIALIZING UPDATER
attempted relative import with no known parent package
Traceback (most recent call last):
  File "/Applications/Blender.app/Contents/Resources/4.1/scripts/modules/addon_utils.py", line 376, in enable
    mod = importlib.import_module(module_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Blender.app/Contents/Resources/4.1/python/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/foobar/Library/Application Support/Blender/4.1/scripts/addons/ReSprytile/__init__.py", line 36, in <module>
    from . import sprytile_gui, sprytile_modal, sprytile_panel, sprytile_utils, sprytile_uv, spryTile_addonPref
  File "/Users/foobar/Library/Application Support/Blender/4.1/scripts/addons/ReSprytile/sprytile_gui.py", line 32, in <module>
    import spryTile_OS_EverythingElse
  File "/Users/foobar/Library/Application Support/Blender/4.1/scripts/addons/ReSprytile/spryTile_OS_EverythingElse.py", line 77, in <module>
    flat_shader = gpu.types.GPUShader(flat_vertex_shader, flat_fragment_shader)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: Shader Compile Error, see console for more details

UV bug

Screenshot 2023-10-08 12:25:22
While painting textures some faces uv gets messed up.

Decal Layer seems to crash the script

image

Whenever I try to switch to decal layer, I get that script crash, and I need to restart blender to be able to use resprytile normally (decal layer doesn't work completely)

Tile preview is filtered

Before placing a tile, the preview is bilinearly fitered, looking very blurry and making it hard to judge how the tile will look once placed.

In older versions of Sprytile, the preview was pixel perfect.

Preview
Screenshot 2024-04-19 155623

Placed Tile
Screenshot 2024-04-19 155627

Working with multiple 3D Viewports shows multiple palettes

When having two or more 3D Viewports open, the Sprytile palette gets displayed in each one, but only the "original" is actually useable. All multiple palettes are not interactable.

To reproduce:

  1. Activate Sprytile
  2. Open second 3D Viewport
  3. Click into second viewport to activate

image

Tile selector doesn't show up on Blender 4.0

The tile selector does not show up whenever I click on the Build tool or any of the ReSprytile tools

More info:

  • OS: Fedora Workstation 38
  • Running Blender 4.0
  • ReSprytile version: Master

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.