remove texture_path, sound_path, egg_path

This commit is contained in:
David Rose 2008-11-04 18:25:21 +00:00
parent 4c68734398
commit bcdab6f3d4
25 changed files with 33 additions and 119 deletions

View File

@ -287,7 +287,6 @@ get_dls_pathname() {
Filename dls_filename = audio_dls_file; Filename dls_filename = audio_dls_file;
if (!dls_filename.empty()) { if (!dls_filename.empty()) {
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
vfs->resolve_filename(dls_filename, get_sound_path()) ||
vfs->resolve_filename(dls_filename, get_model_path()); vfs->resolve_filename(dls_filename, get_model_path());
return dls_filename; return dls_filename;

View File

@ -410,7 +410,6 @@ get_sound(const string &file_name, bool positional, int) {
Filename path = file_name; Filename path = file_name;
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
vfs->resolve_filename(path, get_sound_path()) ||
vfs->resolve_filename(path, get_model_path()); vfs->resolve_filename(path, get_model_path());
// Build a new AudioSound from the audio data. // Build a new AudioSound from the audio data.

View File

@ -318,7 +318,6 @@ open_api() {
Filename dls_pathname = AudioManager::get_dls_pathname(); Filename dls_pathname = AudioManager::get_dls_pathname();
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
vfs->resolve_filename(dls_pathname, get_sound_path()) ||
vfs->resolve_filename(dls_pathname, get_model_path()); vfs->resolve_filename(dls_pathname, get_model_path());
_dls_data.clear(); _dls_data.clear();

View File

@ -147,7 +147,6 @@ get_sound(const string &file_name, bool, int) {
Filename path = file_name; Filename path = file_name;
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
vfs->resolve_filename(path, get_sound_path()) ||
vfs->resolve_filename(path, get_model_path()); vfs->resolve_filename(path, get_model_path());
audio_debug(" resolved file_name is '"<<path<<"'"); audio_debug(" resolved file_name is '"<<path<<"'");
@ -244,7 +243,6 @@ uncache_sound(const string &file_name) {
Filename path = file_name; Filename path = file_name;
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
vfs->resolve_filename(path, get_sound_path()) ||
vfs->resolve_filename(path, get_model_path()); vfs->resolve_filename(path, get_model_path());
audio_debug(" path=\""<<path<<"\""); audio_debug(" path=\""<<path<<"\"");

View File

@ -386,7 +386,6 @@ get_sound(const string &file_name, bool positional, int mode) {
Filename path = file_name; Filename path = file_name;
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
vfs->resolve_filename(path, get_sound_path()) ||
vfs->resolve_filename(path, get_model_path()); vfs->resolve_filename(path, get_model_path());
if (path.empty()) { if (path.empty()) {
@ -417,7 +416,6 @@ uncache_sound(const string& file_name) {
Filename path = file_name; Filename path = file_name;
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
vfs->resolve_filename(path, get_sound_path()) ||
vfs->resolve_filename(path, get_model_path()); vfs->resolve_filename(path, get_model_path());
SampleCache::iterator sci = _sample_cache.find(path); SampleCache::iterator sci = _sample_cache.find(path);

View File

@ -232,20 +232,4 @@ ISocketStream::
nassertv(_channel == NULL); nassertv(_channel == NULL);
} }
////////////////////////////////////////////////////////////////////
// Function: ISocketStream::set_hold_ptr
// Access: Published
// Description: Associates a reference-counting pointer with the
// stream. The stream does nothing with the pointer
// other than hold its reference count for its own
// lifetime (or until set_hold_ptr() is called again).
//
// At the moment, this is used only by VirtualFileHTTP.
////////////////////////////////////////////////////////////////////
void ISocketStream::
set_hold_ptr(const TypedReferenceCount *ptr) {
_hold_ptr = ptr;
}
#endif // HAVE_OPENSSL #endif // HAVE_OPENSSL

View File

@ -138,14 +138,10 @@ PUBLISHED:
virtual void close() = 0; virtual void close() = 0;
virtual ReadState get_read_state() = 0; virtual ReadState get_read_state() = 0;
void set_hold_ptr(const TypedReferenceCount *ptr);
protected: protected:
HTTPChannel *_channel; HTTPChannel *_channel;
private: private:
CPT(TypedReferenceCount) _hold_ptr;
friend class HTTPChannel; friend class HTTPChannel;
}; };

View File

@ -64,11 +64,6 @@ ConfigureFn(config_egg) {
init_libegg(); init_libegg();
} }
ConfigVariableSearchPath egg_path
("egg-path",
PRC_DESC("The search path along which only egg files are searched. Generally, you "
"should use model-path instead of egg-path."));
ConfigVariableBool egg_support_old_anims ConfigVariableBool egg_support_old_anims
("egg-support-old-anims", true, ("egg-support-old-anims", true,
PRC_DESC("Set this true to support loading of old character animation files, which " PRC_DESC("Set this true to support loading of old character animation files, which "

View File

@ -25,7 +25,6 @@
NotifyCategoryDecl(egg, EXPCL_PANDAEGG, EXPTP_PANDAEGG); NotifyCategoryDecl(egg, EXPCL_PANDAEGG, EXPTP_PANDAEGG);
extern ConfigVariableSearchPath egg_path;
extern ConfigVariableBool egg_support_old_anims; extern ConfigVariableBool egg_support_old_anims;
extern EXPCL_PANDAEGG ConfigVariableBool egg_mesh; extern EXPCL_PANDAEGG ConfigVariableBool egg_mesh;

View File

@ -37,10 +37,9 @@ TypeHandle EggData::_type_handle;
// Function: EggData::resolve_egg_filename // Function: EggData::resolve_egg_filename
// Access: Public, Static // Access: Public, Static
// Description: Looks for the indicated filename, first along the // Description: Looks for the indicated filename, first along the
// indicated searchpath, and then along the egg_path and // indicated searchpath, and then along the model_path.
// finally along the model_path. If found, updates the // If found, updates the filename to the full path and
// filename to the full path and returns true; // returns true; otherwise, returns false.
// otherwise, returns false.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
bool EggData:: bool EggData::
resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath) { resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath) {
@ -51,7 +50,6 @@ resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath) {
} }
vfs->resolve_filename(egg_filename, searchpath, "egg") || vfs->resolve_filename(egg_filename, searchpath, "egg") ||
vfs->resolve_filename(egg_filename, egg_path, "egg") ||
vfs->resolve_filename(egg_filename, get_model_path(), "egg"); vfs->resolve_filename(egg_filename, get_model_path(), "egg");
return vfs->exists(egg_filename); return vfs->exists(egg_filename);

View File

@ -412,9 +412,9 @@ has_absolute_pathnames() const {
// Function: EggGroupNode::resolve_filenames // Function: EggGroupNode::resolve_filenames
// Access: Published // Access: Published
// Description: Walks the tree and attempts to resolve any filenames // Description: Walks the tree and attempts to resolve any filenames
// encountered. This looks up filenames in the search // encountered. This looks up filenames along the
// path, etc. It does not automatically search the // specified search path; it does not automatically
// egg_path for missing files. // search the model_path for missing files.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void EggGroupNode:: void EggGroupNode::
resolve_filenames(const DSearchPath &searchpath) { resolve_filenames(const DSearchPath &searchpath) {

View File

@ -5223,20 +5223,16 @@ write_datagram(BamWriter *manager, Datagram &me) {
alpha_filename = _alpha_fullpath; alpha_filename = _alpha_fullpath;
bam_dir.make_absolute(); bam_dir.make_absolute();
if (!has_bam_dir || !filename.make_relative_to(bam_dir, true)) { if (!has_bam_dir || !filename.make_relative_to(bam_dir, true)) {
if (filename.find_on_searchpath(get_texture_path()) == -1) {
filename.find_on_searchpath(get_model_path()); filename.find_on_searchpath(get_model_path());
} }
}
if (gobj_cat.is_debug()) { if (gobj_cat.is_debug()) {
gobj_cat.debug() gobj_cat.debug()
<< "Texture file " << _fullpath << "Texture file " << _fullpath
<< " found as " << filename << "\n"; << " found as " << filename << "\n";
} }
if (!has_bam_dir || !alpha_filename.make_relative_to(bam_dir, true)) { if (!has_bam_dir || !alpha_filename.make_relative_to(bam_dir, true)) {
if (alpha_filename.find_on_searchpath(get_texture_path()) == -1) {
alpha_filename.find_on_searchpath(get_model_path()); alpha_filename.find_on_searchpath(get_model_path());
} }
}
if (gobj_cat.is_debug()) { if (gobj_cat.is_debug()) {
gobj_cat.debug() gobj_cat.debug()
<< "Alpha image " << _alpha_fullpath << "Alpha image " << _alpha_fullpath

View File

@ -850,7 +850,6 @@ resolve_filename(Filename &new_filename, const Filename &orig_filename) {
new_filename = orig_filename; new_filename = orig_filename;
VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
vfs->resolve_filename(new_filename, get_texture_path()) ||
vfs->resolve_filename(new_filename, get_model_path()); vfs->resolve_filename(new_filename, get_model_path());
_relpath_lookup[orig_filename] = new_filename; _relpath_lookup[orig_filename] = new_filename;
@ -958,8 +957,7 @@ report_texture_unreadable(const Filename &filename) const {
// search path. // search path.
gobj_cat.error() gobj_cat.error()
<< "Unable to find texture \"" << filename << "\"" << "Unable to find texture \"" << filename << "\""
<< " on texture_path " << get_texture_path() << " on model-path " << get_model_path() <<"\n";
<< " or model_path " << get_model_path() <<"\n";
} else { } else {
// A fully-specified filename is not searched along the path, so // A fully-specified filename is not searched along the path, so
// don't mislead the user with the error message. // don't mislead the user with the error message.

View File

@ -90,33 +90,6 @@ get_model_path() {
return *model_path; return *model_path;
} }
ConfigVariableSearchPath &
get_texture_path() {
static ConfigVariableSearchPath *texture_path = NULL;
if (texture_path == NULL) {
texture_path = new ConfigVariableSearchPath
("texture-path",
PRC_DESC("A special directory path to search for textures only. "
"Textures are also searched for along the model-path, so the "
"use of texture-path is only useful if you have special "
"directories that only contain textures."));
}
return *texture_path;
}
ConfigVariableSearchPath &
get_sound_path() {
static ConfigVariableSearchPath *sound_path = NULL;
if (sound_path == NULL) {
sound_path = new ConfigVariableSearchPath
("sound-path",
PRC_DESC("The directories to search for sound and music files to be loaded."));
}
return *sound_path;
}
ConfigVariableSearchPath & ConfigVariableSearchPath &
get_plugin_path() { get_plugin_path() {
static ConfigVariableSearchPath *plugin_path = NULL; static ConfigVariableSearchPath *plugin_path = NULL;

View File

@ -41,8 +41,6 @@ extern EXPCL_PANDA_PUTIL ConfigVariableEnum<BamTextureMode> bam_texture_mode;
BEGIN_PUBLISH BEGIN_PUBLISH
EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_model_path(); EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_model_path();
EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_texture_path();
EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_sound_path();
EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_plugin_path(); EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_plugin_path();
END_PUBLISH END_PUBLISH

View File

@ -496,18 +496,6 @@ get_egg_data() {
return _egg_data; return _egg_data;
} }
////////////////////////////////////////////////////////////////////
// Function: SomethingToEggConverter::convert_texture_path
// Access: Public
// Description: Converts the indicated texture filename to a relative
// or absolute or whatever filename, according to
// _path_replace.
////////////////////////////////////////////////////////////////////
INLINE Filename SomethingToEggConverter::
convert_texture_path(const Filename &orig_filename) {
return _path_replace->convert_path(orig_filename, get_texture_path());
}
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: SomethingToEggConverter::convert_model_path // Function: SomethingToEggConverter::convert_model_path
// Access: Public // Access: Public

View File

@ -18,7 +18,7 @@
#include "pandatoolbase.h" #include "pandatoolbase.h"
#include "filename.h" #include "filename.h"
#include "config_util.h" // for get_texture_path() and get_model_path() #include "config_util.h" // for get_model_path()
#include "animationConvert.h" #include "animationConvert.h"
#include "pathReplace.h" #include "pathReplace.h"
#include "pointerTo.h" #include "pointerTo.h"
@ -110,7 +110,6 @@ public:
bool handle_external_reference(EggGroupNode *egg_parent, bool handle_external_reference(EggGroupNode *egg_parent,
const Filename &ref_filename); const Filename &ref_filename);
INLINE Filename convert_texture_path(const Filename &orig_filename);
INLINE Filename convert_model_path(const Filename &orig_filename); INLINE Filename convert_model_path(const Filename &orig_filename);
// Set this true to treat errors as warnings and generate output // Set this true to treat errors as warnings and generate output

View File

@ -132,7 +132,6 @@ read_txa_file() {
"is in effect.")); "is in effect."));
Filename filename = txa_file; Filename filename = txa_file;
vfs->resolve_filename(filename, get_texture_path());
vfs->resolve_filename(filename, get_model_path()); vfs->resolve_filename(filename, get_model_path());
if (!vfs->exists(filename)) { if (!vfs->exists(filename)) {

View File

@ -280,9 +280,7 @@ copy_textures() {
EggTexture *tex = (*ti); EggTexture *tex = (*ti);
Filename orig_filename = tex->get_filename(); Filename orig_filename = tex->get_filename();
if (!orig_filename.exists()) { if (!orig_filename.exists()) {
bool found = bool found = orig_filename.resolve_filename(get_model_path());
orig_filename.resolve_filename(get_texture_path()) ||
orig_filename.resolve_filename(get_model_path());
if (!found) { if (!found) {
nout << "Cannot find " << orig_filename << "\n"; nout << "Cannot find " << orig_filename << "\n";
success = false; success = false;

View File

@ -242,7 +242,7 @@ extract_record(FltRecordReader &reader) {
} else { } else {
_orig_filename = iterator.get_fixed_string(200); _orig_filename = iterator.get_fixed_string(200);
} }
_converted_filename = _header->convert_path(Filename::from_os_specific(_orig_filename), get_texture_path()); _converted_filename = _header->convert_path(Filename::from_os_specific(_orig_filename), get_model_path());
_pattern_index = iterator.get_be_int32(); _pattern_index = iterator.get_be_int32();
_x_location = iterator.get_be_int32(); _x_location = iterator.get_be_int32();
_y_location = iterator.get_be_int32(); _y_location = iterator.get_be_int32();

View File

@ -244,7 +244,7 @@ check_texture() {
return false; return false;
} }
Filename pathname = _converter->convert_texture_path(clip->_filename); Filename pathname = _converter->convert_model_path(clip->_filename);
_egg_texture = new EggTexture("clip" + format_string(clip_index), pathname); _egg_texture = new EggTexture("clip" + format_string(clip_index), pathname);

View File

@ -959,7 +959,7 @@ void MaxToEggConverter::analyze_diffuse_maps(PandaMaterial &pandaMat, Texmap *ma
Filename fullpath, outpath; Filename fullpath, outpath;
Filename filename = Filename::from_os_specific(diffuseTex->GetMapName()); Filename filename = Filename::from_os_specific(diffuseTex->GetMapName());
_options->_path_replace->full_convert_path(filename, get_texture_path(), _options->_path_replace->full_convert_path(filename, get_model_path(),
fullpath, outpath); fullpath, outpath);
tex->set_filename(outpath); tex->set_filename(outpath);
tex->set_fullpath(fullpath); tex->set_fullpath(fullpath);
@ -1000,7 +1000,7 @@ void MaxToEggConverter::analyze_opacity_maps(PandaMaterial &pandaMat, Texmap *ma
Filename fullpath, outpath; Filename fullpath, outpath;
Filename filename = Filename::from_os_specific(transTex->GetMapName()); Filename filename = Filename::from_os_specific(transTex->GetMapName());
_options->_path_replace->full_convert_path(filename, get_texture_path(), _options->_path_replace->full_convert_path(filename, get_model_path(),
fullpath, outpath); fullpath, outpath);
// See if this opacity map already showed up. // See if this opacity map already showed up.
@ -1052,7 +1052,7 @@ void MaxToEggConverter::analyze_glow_maps(PandaMaterial &pandaMat, Texmap *mat)
Filename fullpath, outpath; Filename fullpath, outpath;
Filename filename = Filename::from_os_specific(gtex->GetMapName()); Filename filename = Filename::from_os_specific(gtex->GetMapName());
_options->_path_replace->full_convert_path(filename, get_texture_path(), _options->_path_replace->full_convert_path(filename, get_model_path(),
fullpath, outpath); fullpath, outpath);
// Try to find a diffuse map to pair this with as an alpha-texture. // Try to find a diffuse map to pair this with as an alpha-texture.
@ -1097,7 +1097,7 @@ void MaxToEggConverter::analyze_gloss_maps(PandaMaterial &pandaMat, Texmap *mat)
Filename fullpath, outpath; Filename fullpath, outpath;
Filename filename = Filename::from_os_specific(gtex->GetMapName()); Filename filename = Filename::from_os_specific(gtex->GetMapName());
_options->_path_replace->full_convert_path(filename, get_texture_path(), _options->_path_replace->full_convert_path(filename, get_model_path(),
fullpath, outpath); fullpath, outpath);
// Try to find a diffuse map to pair this with as an alpha-texture. // Try to find a diffuse map to pair this with as an alpha-texture.
@ -1142,7 +1142,7 @@ void MaxToEggConverter::analyze_normal_maps(PandaMaterial &pandaMat, Texmap *mat
Filename fullpath, outpath; Filename fullpath, outpath;
Filename filename = Filename::from_os_specific(ntex->GetMapName()); Filename filename = Filename::from_os_specific(ntex->GetMapName());
_options->_path_replace->full_convert_path(filename, get_texture_path(), _options->_path_replace->full_convert_path(filename, get_model_path(),
fullpath, outpath); fullpath, outpath);
PT(EggTexture) tex = new EggTexture(generate_tex_name(), ""); PT(EggTexture) tex = new EggTexture(generate_tex_name(), "");

View File

@ -2565,7 +2565,7 @@ set_shader_legacy(EggPrimitive &primitive, const MayaShader &shader,
//} //}
Filename filename = Filename::from_os_specific(color_def->_texture_filename); Filename filename = Filename::from_os_specific(color_def->_texture_filename);
Filename fullpath, outpath; Filename fullpath, outpath;
_path_replace->full_convert_path(filename, get_texture_path(), fullpath, outpath); _path_replace->full_convert_path(filename, get_model_path(), fullpath, outpath);
tex.set_filename(outpath); tex.set_filename(outpath);
tex.set_fullpath(fullpath); tex.set_fullpath(fullpath);
apply_texture_uvprops(tex, *color_def); apply_texture_uvprops(tex, *color_def);
@ -2609,7 +2609,7 @@ set_shader_legacy(EggPrimitive &primitive, const MayaShader &shader,
// set_alpha_file_channel()), but for now we assume it comes // set_alpha_file_channel()), but for now we assume it comes
// from the grayscale data. // from the grayscale data.
filename = Filename::from_os_specific(trans_def._texture_filename); filename = Filename::from_os_specific(trans_def._texture_filename);
_path_replace->full_convert_path(filename, get_texture_path(), _path_replace->full_convert_path(filename, get_model_path(),
fullpath, outpath); fullpath, outpath);
tex.set_alpha_filename(outpath); tex.set_alpha_filename(outpath);
tex.set_alpha_fullpath(fullpath); tex.set_alpha_fullpath(fullpath);
@ -2708,7 +2708,7 @@ set_shader_legacy(EggPrimitive &primitive, const MayaShader &shader,
// primary filename, and set the format accordingly. // primary filename, and set the format accordingly.
Filename filename = Filename::from_os_specific(trans_def._texture_filename); Filename filename = Filename::from_os_specific(trans_def._texture_filename);
Filename fullpath,outpath; Filename fullpath,outpath;
_path_replace->full_convert_path(filename, get_texture_path(), _path_replace->full_convert_path(filename, get_model_path(),
fullpath, outpath); fullpath, outpath);
tex.set_filename(outpath); tex.set_filename(outpath);
tex.set_fullpath(fullpath); tex.set_fullpath(fullpath);
@ -2874,7 +2874,7 @@ void MayaToEggConverter::
apply_texture_filename(EggTexture &tex, const MayaShaderColorDef &def) { apply_texture_filename(EggTexture &tex, const MayaShaderColorDef &def) {
Filename filename = Filename::from_os_specific(def._texture_filename); Filename filename = Filename::from_os_specific(def._texture_filename);
Filename fullpath, outpath; Filename fullpath, outpath;
_path_replace->full_convert_path(filename, get_texture_path(), fullpath, outpath); _path_replace->full_convert_path(filename, get_model_path(), fullpath, outpath);
tex.set_filename(outpath); tex.set_filename(outpath);
tex.set_fullpath(fullpath); tex.set_fullpath(fullpath);
} }
@ -2891,7 +2891,7 @@ apply_texture_alpha_filename(EggTexture &tex, const MayaShaderColorDef &def) {
if (def._opposite->_texture_filename != def._texture_filename) { if (def._opposite->_texture_filename != def._texture_filename) {
Filename filename = Filename::from_os_specific(def._opposite->_texture_filename); Filename filename = Filename::from_os_specific(def._opposite->_texture_filename);
Filename fullpath, outpath; Filename fullpath, outpath;
_path_replace->full_convert_path(filename, get_texture_path(), fullpath, outpath); _path_replace->full_convert_path(filename, get_model_path(), fullpath, outpath);
tex.set_alpha_filename(outpath); tex.set_alpha_filename(outpath);
tex.set_alpha_fullpath(fullpath); tex.set_alpha_fullpath(fullpath);
} }

View File

@ -2030,7 +2030,7 @@ set_shader_attributes(SoftNodeDesc *node_desc, EggPrimitive &primitive, int idx)
EggTexture tex(texName, ""); EggTexture tex(texName, "");
Filename filename = Filename::from_os_specific(texName); Filename filename = Filename::from_os_specific(texName);
Filename fullpath = _path_replace->match_path(filename, get_texture_path()); Filename fullpath = _path_replace->match_path(filename, get_model_path());
tex.set_filename(_path_replace->store_path(fullpath)); tex.set_filename(_path_replace->store_path(fullpath));
tex.set_fullpath(fullpath); tex.set_fullpath(fullpath);
// tex.set_format(EggTexture::F_rgb); // tex.set_format(EggTexture::F_rgb);

View File

@ -99,7 +99,7 @@ void XFileMaterial::
apply_to_egg(EggPrimitive *egg_prim, XFileToEggConverter *converter) { apply_to_egg(EggPrimitive *egg_prim, XFileToEggConverter *converter) {
// Is there a texture? // Is there a texture?
if (_has_texture) { if (_has_texture) {
Filename texture = converter->convert_texture_path(_texture); Filename texture = converter->convert_model_path(_texture);
EggTexture temp("", texture); EggTexture temp("", texture);
EggTexture *egg_tex = converter->create_unique_texture(temp); EggTexture *egg_tex = converter->create_unique_texture(temp);
egg_prim->set_texture(egg_tex); egg_prim->set_texture(egg_tex);