Skip to content

bam_model_extensions changes external path references in distributions #1642

@izzyboris

Description

@izzyboris

Description

If a model file is converted using the bam_model_extensions from #714 and it references any external resources by pathname (textures, etc.), the write_bam_file() that saves the file changes the relative paths of these models and they may point into the source directory. Ideally I think the relative path references in the .bam outputs from the converter should be left alone so they point to the texture relative to their current location.

Steps to Reproduce

  • Create a model with an external texture (e.g., a .blend using blend2bam or .gltf)
  • Put ".blend" or .gltf in the bam_model_extensions list
  • Run bdist_apps
  • The external texture path will get munged during the file write_bam_file() within commands.py:_model_to_bam and point at the source directory instead of a texture copied into the build directory.

Environment

  • Operating system: Windows (probably happens in Linux too)
  • System architecture: 64-bit Intel
  • Panda3D version: 0.10.13
  • Installation method: pip
  • Python version (if using Python): 3.11
  • Compiler (if using C++): N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions