I am making a project where I use materials from an external file.Both my files are present in a folder. I append them. While scripting, I specified the absolute path of the file. But if I copy the folder with both project and materials file into another system. Then appending them shows an error because the path that I specified is no longer the materials path. So, can anyone help me out so that I can set up the path such that it imports material from within the folder that contains these files?


closed as off-topic by m.ardito, Scott Milner, Duarte Farrajota Ramos, dr. Sybren, GiantCowFilms Jun 4 '18 at 16:40

  • This question does not appear to be about Blender within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ I'm voting to close this question as off-topic because it's about python programming, not specifically Blender related. You should try on stackoverflow, perhaps. $\endgroup$ – m.ardito May 24 '18 at 6:36
  • 1
    $\begingroup$ Would making the paths relative before computer transfer help? $\endgroup$ – Leander May 24 '18 at 6:58
  • $\begingroup$ If it's an addon? setting a base folder via a user preferences path string property could be an option worth considering. Will require reset once each time for new system when enabling addon. $\endgroup$ – batFINGER May 24 '18 at 11:07
  • $\begingroup$ How would blender know where this folder is? It can't track files. If I understand your question correctly, I don't think its possible. The best solution is to store those assets in a folder with a shared parent to the blend file that uses them (and then use relative paths), or to manually update the paths each time you move the files between systems. $\endgroup$ – GiantCowFilms Jun 4 '18 at 16:40