A BPY plus module to simplify work with the file system in Blender.
Usage example
1 2 3 4 5 |
from .bpy_plus.file_system import Path print(Path.current()) # d:\blender\projects\test |
Path class
python()
Returns the path to the Blender python executable.
Returns:
Path string
current()
Returns the path to the currently opened Blender project. If the current project is not saved – returns the system temporary directory path.
Returns:
Path string
temp()
Returns the system temporary directory path.
Returns:
Path string
blender()
Returns the installation Blender directory
Returns:
Path string
blender_v()
Returns the installation Blender directory with version.
For example: c:/Program Files/Blender/3.0
Returns:
Path string
scripts(source=’USER’)
Returns the ‘scripts’ directory path.
Parameters:
source: from where directory is – [‘USER’, ‘SYSTEM’]
Returns:
Path string
site_packages(source=’USER’)
Returns the ‘site-packages’ directory path.
Parameters:
source: from where directory is – [‘USER’, ‘SYSTEM’]
Returns:
Path string
abs(path)
Converts the relative Blender path to the absolute.
Parameters:
path: string with the path
Returns:
Path string