Selaa lähdekoodia

*** empty log message ***

David Rose 24 vuotta sitten
vanhempi
sitoutus
893ecf7d5e

+ 1 - 1
pandatool/src/converter/somethingToEggConverter.cxx

@@ -87,7 +87,7 @@ convert_path(const Filename &orig_filename, const DSearchPath &searchpath,
 
   case PC_absolute:
     result = as_found;
-    if (result.is_local()) {
+    if (!result.exists()) {
       nout << "Warning: file " << orig_filename << " not found.\n";
       return result;
     }

+ 17 - 3
pandatool/src/eggbase/somethingToEgg.cxx

@@ -279,9 +279,23 @@ post_command_line() {
     _make_rel_dir = _input_filename.get_dirname();
   }
 
-  if (_got_search_path && _append_to_sys_paths) {
-    get_texture_path().prepend_path(_search_path);
-    get_model_path().prepend_path(_search_path);
+  if (_append_to_sys_paths) {
+    DSearchPath &texture_path = get_texture_path();
+    DSearchPath &model_path = get_model_path();
+
+    // Prepend the source filename to the search paths.
+    Filename directory = _input_filename.get_dirname();
+    if (directory.empty()) {
+      directory = ".";
+    }
+    texture_path.prepend_directory(directory);
+    model_path.prepend_directory(directory);
+
+    // Then prepend whatever the user specified on the command line.
+    if (_got_search_path) {
+      texture_path.prepend_path(_search_path);
+      model_path.prepend_path(_search_path);
+    }
   }
 
   return EggConverter::post_command_line();