mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
allow embedded textures
This commit is contained in:
parent
d5620f2671
commit
2df0ddc5be
@ -209,9 +209,17 @@ class AppPacker:
|
|||||||
# them their new location within the multifile.
|
# them their new location within the multifile.
|
||||||
|
|
||||||
for tex in NodePath(node).findAllTextures():
|
for tex in NodePath(node).findAllTextures():
|
||||||
if not tex.hasFullpath():
|
if not tex.hasFullpath() and tex.hasRamImage():
|
||||||
continue
|
# We need to store this texture as a raw-data image.
|
||||||
|
# Clear the filename so this will happen
|
||||||
|
# automatically.
|
||||||
|
tex.clearFilename()
|
||||||
|
tex.clearAlphaFilename()
|
||||||
|
|
||||||
|
else:
|
||||||
|
# We can store this texture as a file reference to its
|
||||||
|
# image. Copy the file into our multifile, and rename
|
||||||
|
# its reference in the texture.
|
||||||
if tex.hasFilename():
|
if tex.hasFilename():
|
||||||
tex.setFilename(self.addTexture(tex.getFullpath()))
|
tex.setFilename(self.addTexture(tex.getFullpath()))
|
||||||
if tex.hasAlphaFilename():
|
if tex.hasAlphaFilename():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user