mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
removing the dependency on -rp and assuming that the first word of the filename will be the prefix to be replaced
This commit is contained in:
parent
3fd05b7521
commit
3ba4ac0cb1
@ -192,12 +192,20 @@ copy_maya_file(const Filename &source, const Filename &dest,
|
|||||||
|
|
||||||
if (num_refs != 0) {
|
if (num_refs != 0) {
|
||||||
if (_replace_prefix.find("none") != string::npos) {
|
if (_replace_prefix.find("none") != string::npos) {
|
||||||
|
// try to put the first word of the file name as the replace prefix
|
||||||
|
size_t idx = source.get_basename().find("_",0);
|
||||||
|
if (idx != string::npos) {
|
||||||
|
string st = source.get_basename().substr(0, idx);
|
||||||
|
_replace_prefix = st;
|
||||||
|
}
|
||||||
|
else {
|
||||||
maya_cat.error()
|
maya_cat.error()
|
||||||
<< "External references exist: "
|
<< "External references exist: "
|
||||||
<< "please make sure to specify a _replace_prefix with -rp option\n";
|
<< "please make sure to specify a _replace_prefix with -rp option\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int ref_index;
|
unsigned int ref_index;
|
||||||
for (ref_index = 0; ref_index < num_refs; ref_index++) {
|
for (ref_index = 0; ref_index < num_refs; ref_index++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user