Blender_bevy_components_wor.../tools/blenvy/core/path_helpers.py

12 lines
316 B
Python
Raw Permalink Normal View History

import bpy
import os
def absolute_path_from_blend_file(path):
# path to the current blend file
blend_file_path = bpy.data.filepath
# Get the folder
blend_file_folder_path = os.path.dirname(blend_file_path)
# absolute path
return os.path.abspath(os.path.join(blend_file_folder_path, path))