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

Fixed a bug for separated projects #289

Merged
merged 1 commit into from
Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3553,6 +3553,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