1

I did the following to achieve an UI for taking in path file

bpy.types.Scene.skeletonImporter = bpy.props.StringProperty(name="Import skeleton.xml path", default = "", description="Import which skeleton.xml file?", subtype = 'FILE_PATH')
bpy.types.Scene.meshImporter = bpy.props.StringProperty(name="Import .mesh path", default = "", description="Import which .mesh file?", subtype = 'FILE_PATH')

which give me this relative path when I try and open a file.

enter image description here

However, I wish to take in the absolute path for my files. How do I go about doing that?

There's no subtype called ABS_FILE_PATH (which would be useful in my situation).

The Intern
  • 137
  • 1
  • 9
  • I have seen your answer before I posted, but I'm still not sure how it can be applied to my situation. – The Intern Jul 22 '14 at 05:51
  • bpy.path.abspath(yourpath) should work. It will normalize all the extra ../../s and give you an absolute path. But only if the blend file is saved. Otherwise, '//' has no meaning. – Mike Pan Jul 22 '14 at 18:01

0 Answers0