Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #289 from TetoTheSquirrelFox/dev
Browse files Browse the repository at this point in the history
Fixed a bug for separated projects
  • Loading branch information
animate1978 authored Jul 17, 2020
2 parents 48c54b1 + 64d0095 commit 06d0f11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3554,6 +3554,7 @@ def draw(self, context):
if len(cleaned_name) > 0 :
box_compat_tools_sub.label(text="Cleaned : " + cleaned_name, icon='INFO')
creation_tools_ops.set_data_directory(cleaned_name)
file_ops.set_data_path(cleaned_name)
project_creation_buttons=box_compat_tools_sub.column(align=True)
project_creation_buttons.operator('mbcrea.button_create_directories', icon='FREEZE')
project_creation_buttons.operator('mbcrea.button_create_config', icon='FREEZE')
Expand Down
8 changes: 4 additions & 4 deletions creation_tools_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,16 @@ def is_blend_file_exist():
global config_content
if len(config_content["data_directory"]) < 1:
return False
dirpath = os.path.join(file_ops.get_data_path(), config_content["data_directory"] + "_library.blend")
dirpath = os.path.join(file_ops.get_data_path(), "humanoid_library.blend")
if os.path.isfile(dirpath):
return True
return False

def get_blend_file_pathname():
return os.path.join(file_ops.get_data_path(), config_content["data_directory"] + "_library.blend")
return os.path.join(file_ops.get_data_path(), "humanoid_library.blend")

def get_blend_file_name():
return config_content["data_directory"] + "_library.blend"
return "humanoid_library.blend"

def load_blend_file():
global blend_file_content
Expand All @@ -305,7 +305,7 @@ def load_blend_file():
if is_blend_file_exist():
lib_filepath = get_blend_file_pathname()
else:
logger.critical("Blend file does not exist or is not under /data/")
logger.critical("Blend file does not exist or is not under /" + file_ops.get_data_path() + "/")
return []
# Import objects name from library
with bpy.data.libraries.load(lib_filepath) as (data_from, data_to):
Expand Down

0 comments on commit 06d0f11

Please sign in to comment.