Welcome to mirror list, hosted at ThFree Co, Russian Federation.

bpy_sys.py « modules « scripts « release - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 01c4dfda9107140f663a00d257197f692c2a5e0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This software is distributable under the terms of the GNU
# General Public License (GPL) v2, the text of which can be found at
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.

import bpy
import os

def expandpath(path):
    if path.startswith("//"):
        return os.path.join(os.path.dirname(bpy.data.filename), path[2:])

    return path

import types
bpy.sys = types.ModuleType("bpy.sys")
bpy.sys.expandpath = expandpath