This module has a similar scope to os.path, containing utility functions for dealing with paths in Blender.
Returns the absolute path relative to the current blend file using the “//” prefix.
Parameters: |
|
---|
Equivalent to os.path.basename, but skips a “//” prefix.
Use for Windows compatibility.
such as writing to a file. All characters besides A-Z/a-z, 0-9 are replaced with “_” or the replace argument if defined.
Creates a display string from name to be used menus and the user interface. Capitalize the first letter in all lowercase names, mixed case names are kept as is. Intended for use with filenames and module names.
Returns the path stripped of directory and extension, ensured to be utf8 compatible.
Return the path with the extension added if it is not already set.
Parameters: |
|
---|
Returns true if path in a subdirectory of directory. Both paths must be absolute.
Return a list of modules which can be imported from path.
Parameters: |
|
---|---|
Returns: | a list of string pairs (module_name, module_file). |
Return type: | list |
Given a sequence of directories, remove duplicates and any directories nested in one of the other paths. (Useful for recursive path searching).
Parameters: | dirs (sequence) – Sequence of directory paths. |
---|---|
Returns: | A unique list of paths. |
Return type: | list |
Returns the path relative to the current blend file using the “//” prefix.
Parameters: | start (string) – Relative to this path, when not set the current filename is used. |
---|
Resolve a case insensitive path on a case sensitive system, returning a string with the path if found else return the original path.