GithubHelp home page GithubHelp logo

blender-dds-addon's People

Contributors

andrej730 avatar matyalatte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

blender-dds-addon's Issues

After using the export to DDS, Blender freezes when closing.

windows10
blender3.6
If I modify texconv.py to unload the DLL immediately after converting the file, Blender still freezes. Idk if the dll cause the problem?
Additionally, when exporting to BC7 sRGB, the color becomes lighter even if the original format is BC7 sRGB. Only if I choose BC7, it works.

RuntimeError: Failed to get Image Editor. This is unexpected.

Blender 3.5, got this error importing texture below.

RuntimeError: Failed to get Image Editor. This is unexpected.
Traceback (most recent call last):
  File "\addons\blender_dds_addon\ui\import_dds.py", line 166, in execute_base
    import_dds(context, os.path.join(directory, file.name))
  File "\addons\blender_dds_addon\ui\import_dds.py", line 123, in import_dds
    space = get_image_editor_space(context)
  File "\addons\blender_dds_addon\ui\bpy_util.py", line 24, in get_image_editor_space
    raise RuntimeError('Failed to get Image Editor. This is unexpected.')
RuntimeError: Failed to get Image Editor. This is unexpected.

BC5_SNORM Normal Map issue

BC5_SNORM Normals when imported into blender look different
original normal map
Photoshop_2yyBWEhvvE
after importing into blender
AzO97iYdzN

Support Apple Silicon

Blender supports ARM64 chips for macOS. (e.g. Apple M1)
But the DDS addon will raise an error (be56016) for them because libtexconv.dylib was built for x64.
It's possible to build the ARM64 version but I don't have mac for testing.

Please comment if you want the ARM64 build and you can test it with Apple silicon.
I'll upload it on this thread.

Wrong flags in exported dds

I got two warnings when importing dds in GIMP.

dds_flags_warning

It uses DDSD_PITCH when it should use DDSD_LINEARSIZE.
And it uses DDSD_LINEARSIZE when it should use DDSD_PITCH.

dds.py says

class DDS_FLAGS(IntEnum):
    PITCH = 0x8  # Use "w * h * bpp" for pitch_or_linear_size
    LINEARSIZE = 0x80000  # Use "w * bpp" for pitch_or_linear_size

but it should be

class DDS_FLAGS(IntEnum):
    PITCH = 0x8  # Use "w * bpp" for pitch_or_linear_size
    LINEARSIZE = 0x80000  # Use "w * h * bpp" for pitch_or_linear_size

Most of dds libraries don't care the flags but this should be fixed.

Add Drag and Drop Import

Blender 4.1 got APIs for drag-drop events.
https://docs.blender.org/api/current/bpy.types.FileHandler.html

You can't overwrite the drag-drop events on the image editor.
But you can add a new event to the DDS panel.

def is_dds_panel(context):
    return (context.area and context.area.type == 'IMAGE_EDITOR'
            and context.region and context.region.type == 'UI'
            and context.region.active_panel_category == 'DDS')

class DDS_FH_import(bpy.types.FileHandler):
    bl_idname = "DDS_FH_import"
    bl_label = "File handler for dds import"
    bl_import_operator = "dds.import_dds"
    bl_file_extensions = ".dds"

    @classmethod
    def poll_drop(cls, context):
        return is_dds_panel(context)

It means, you can drop dds files on the addon's panel to import them.
dnd

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.