3

I have a StringProperty(subtype="FILE_PATH) and I am trying to make it so the user selects a folder and then a file is saved out to the location, but the filepath comes out looking really funky.

The folder selected is D:\Pictures, what the StringProperty shows is //..\..\. What is going on here?

CodeManX
  • 29,298
  • 3
  • 89
  • 128
BlendingJake
  • 2,557
  • 1
  • 23
  • 38

1 Answers1

5

// indicates a relative path in Blender.

Make sure you untick Relative Path in the Accept panel of the file browser to make it an absolute path.

Or you can convert a relative path to a absolute path using the built in method bpy.path.abspath(path)

BlendingJake
  • 2,557
  • 1
  • 23
  • 38
CodeManX
  • 29,298
  • 3
  • 89
  • 128