EmbarkStudios / texture-synthesis

🎨 Example-based texture synthesis written in Rust 🦀
http://embark.rs
Apache License 2.0
1.75k stars 83 forks source link

Please update the addon to also function on macOS and Linux #63

Closed robw001 closed 4 years ago

robw001 commented 4 years ago

The texture-synthesis executable is available for several platforms, including Windows, macOS and Linux.

At current, the blender addon only works for MS Windows. It specifically looks for "texture-synthesis.exe' and fails to find the macOS executable "texture-synthesis". Please update the addon to include other platforms.

I got the addon to work on macOS by editing addon_preferences.py as follows:

import os, platform
(...)

class TextureSynthPreferences(bpy.types.AddonPreferences):
    bl_idname = addon_name_lowercase()

    def check_ts_exist(self, context):
        absPath, ts_exists = check_file_exist(self.text_synth_path)
        self['text_synth_path'] = absPath
        if platform.system() in ["Darwin","Linux"]:
            if ts_exists and os.path.basename(absPath) == "texture-synthesis":
                self.display_info = "texture-synthesis found in: " + absPath
        else:
            if ts_exists and os.path.basename(absPath) == "texture-synthesis.exe":
                self.display_info = "texture-synthesis.exe found in: " + absPath
            else:
                self.display_info = "texture-synthesis.exe not found in: " + absPath

(...)
repi commented 4 years ago

The blender addon that uses this library is in the https://github.com/JoseConseco/texture_synthesis repository so please do file the issue there. thanks!

robw001 commented 4 years ago

Thanks, did that.

AndreaMonzini commented 4 years ago

In GNU/Linux you can just rename the executable binary synthesis to synthesis.exe and it works.