diff --git a/.gitignore b/.gitignore index e9a2b611..e3822982 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ Runblender.bat.lnk /.vscode/settings.json /.vscode/launch.json /.vscode +notes.txt +mb-lab_updater/MB-Lab_updater_status.json +data/humanoid_library.blend1 diff --git a/CHANGELOG.md b/CHANGELOG.md old mode 100644 new mode 100755 index 34951eb7..87e14ccd --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,35 @@ All changes will be documented here +# MB-Lab 1.8.0 + +## Requirements + +- Requires Blender 4.0.0 + + +## Added + +- Melanin map added that adds variance to the skin pigment + +## Changed + +- MBLabSkin3 is a now based off of the 1.7.6 shader with modifications +- AutoUpdater is disabled +- SubD levels have increased for better visuals +- Some menus rearranged for better workflow +- Added new license types in MB-Dev, also removed AFPL due to restrictive nature + +## Bug Fixes + +- Fixed bugs in various files to make it work with Blender 4.0 + +## Known Issues + +- MB-Dev tools may contain bugs that are unknown at this time +- Importing BVH animation files is buggy +- Hair presets have the old PrincipledHairBSDF which will result in incorrect rendering +- Skin color and bump mapping change slightly when finalizing + # MB-Lab 1.7.8 ## Added diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 5ab76a77..5c0eef4a --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Character creation tool for Blender -## Blender 2.8 Support +## Blender 4.0 Support -MB-Lab has been developed to work with Blender 2.80 +MB-Lab has been developed to work with Blender 4.0 ## Contributors wanted! @@ -12,51 +12,38 @@ We are a small bunch of developers and artists but we always need more! MB-Lab's ## About -MB-Lab is a community developed and supported project based off ManuelBastioniLAB. - -If you're interested in helping this project Financially or to see behind the scenes information of this plugin's Development, Please support our [**Patreon**](https://www.patreon.com/mblab_development). +MB-Lab is a community developed project based off ManuelBastioniLAB. This fork is an attempt to keep this addon going forward as the original author is no longer developing ManuelBastioniLAB -# MB-Lab 1.7.8 +# MB-Lab 1.8.0 + +## Requirements + +- MB-Lab now requires Blender 4.0.0 + -## Added +### Added -- MB-Dev Character Development Framework introduced -- Hair Engine now adds hair shaders to Cycles and EEVEE +- Melanin map added that adds variance to the skin pigment ## Changed -- MBLabSkin2 uses Principled BSDF yet again -- Removed SSS scale group, replaced with Vector Math node -- Bump map added, Thickness map removed -- Modified skin oil maps -- Eyelash shader now has bump and gloss -- ExpressionEngine class now in it's own file -- Blush map converted to grayscale -- Modified Albedo maps -- Bump maps now 4k resolution -- Modified Freckle masks -- Modified Material Engine -- Changed lighting code -- MB-Lab has new version numbering scheme. Last number for dev purposes -- Sliders are now highlighted -- GUI update -- MBLab Pupil use Diffuse Node instead of Emission -- SSS Radius changed to more accurate values -- Freckles now include two colors +- MBLabSkin3 is a now based off of the 1.7.6 shader with modifications +- AutoUpdater is disabled +- SubD levels have increased for better visuals +- Some menus rearranged for better workflow +- Added new license types in MB-Dev, also removed AFPL due to restrictive nature ## Bug Fixes -- Poses don't show when user selects IK model -- Preserve Phenotype random function code fix -- Typo: Hands_Lenght, fixed in transformation and measurements JSON -- Typo: Various names in transformation files fixed -- Hair Dynamics bug fix for Nvidia GPU cards +- Fixed bugs in various files to make it work with Blender 4.0 ## Known Issues - MB-Dev tools may contain bugs that are unknown at this time +- Importing BVH animation files is buggy +- Hair presets have the old PrincipledHairBSDF which will result in incorrect rendering +- Skin color and bump mapping change slightly when finalizing ## ManuelBastioniLAB 1.6.1a diff --git a/__init__.py b/__init__.py old mode 100644 new mode 100755 index fe9ed412..8637cc54 --- a/__init__.py +++ b/__init__.py @@ -38,7 +38,7 @@ from bpy.app.handlers import persistent from bpy_extras.io_utils import ExportHelper, ImportHelper -from . import addon_updater_ops +#from . import addon_updater_ops from . import algorithms from . import animationengine from . import creation_tools_ops @@ -68,17 +68,17 @@ logger = logging.getLogger(__name__) # MB-Lab Blender Info -# 3/22 added new version number to MB-Lab, internal dev purposes +# bl_info = { "name": "MB-Lab", "author": "Manuel Bastioni, MB-Lab Community", - "version": (1, 7, 8, 50), - "blender": (2, 81, 16), + "version": (1, 8, 0), + "blender": (4, 0, 0), "location": "View3D > Tools > MB-Lab", - "description": "A complete lab for character creation", + "description": "Character creation tool based off of ManuelbastioniLAB", "warning": "", - 'wiki_url': "https://mb-lab-docs.readthedocs.io/en/latest/index.html", + 'doc_url': "https://mb-lab-docs.readthedocs.io/en/latest/index.html", 'tracker_url': 'https://github.com/animate1978/MB-Lab/issues', "category": "Characters" } @@ -1847,7 +1847,7 @@ def execute(self, context): class ExpDisplacementImage(bpy.types.Operator, ExportHelper): - """Export texture maps for the character""" + """Export displacement texture map for the character""" bl_idname = "mbast.export_dispimage" bl_label = "Save displacement map" filename_ext = ".png" @@ -1864,9 +1864,9 @@ def execute(self, context): class ExpDermalImage(bpy.types.Operator, ExportHelper): - """Export texture maps for the character""" + """Export albedo texture maps for the character""" bl_idname = "mbast.export_dermimage" - bl_label = "Save dermal map" + bl_label = "Save albedo map" filename_ext = ".png" filter_glob: bpy.props.StringProperty( default="*.png", @@ -1968,9 +1968,9 @@ def execute(self, context): class LoadDermImage(bpy.types.Operator, ImportHelper): - """Import texture maps for the character""" + """Import albedo texture maps for the character""" bl_idname = "mbast.import_dermal" - bl_label = "Load dermal map" + bl_label = "Load albedo map" filename_ext = ".png" filter_glob: bpy.props.StringProperty( default="*.png", @@ -1985,7 +1985,7 @@ def execute(self, context): class LoadDispImage(bpy.types.Operator, ImportHelper): - """Import texture maps for the character""" + """Import displacement texture maps for the character""" bl_idname = "mbast.import_displacement" bl_label = "Load displacement map" filename_ext = ".png" @@ -2597,12 +2597,12 @@ def draw(self, context): icon_collapse = "DISCLOSURE_TRI_DOWN" box_info = self.layout.box() - box_info.label(text="https://www.mblab.dev") + box_info.label(text="Open Source Humanoid Creator") if gui_status == "ERROR_SESSION": box_err = self.layout.box() box_err.label(text=gui_err_msg, icon="INFO") - + if gui_status == "NEW_SESSION": self.layout.label(text="CREATION OPTIONS", icon='RNA_ADD') @@ -2622,7 +2622,7 @@ def draw(self, context): box_new_opt.prop(scn, 'mblab_use_lamps', icon='LIGHT_DATA') self.layout.separator(factor=0.5) - self.layout.operator('mbast.init_character', icon='ARMATURE_DATA') + self.layout.operator('mbast.init_character', icon='OUTLINER_OB_ARMATURE') if gui_status != "ACTIVE_SESSION": self.layout.separator(factor=0.5) @@ -2692,7 +2692,7 @@ def draw(self, context): box_asts_t.label(text="use the proxy fitting tool", icon='BLANK1') # Add Particle Hair box_asts = self.layout.box() - box_asts.label(text="Hair") + box_asts.label(text="Hair", icon='OUTLINER_OB_CURVES') box_asts.prop(scn, 'mblab_hair_color') box_asts_a = box_asts.column(align=True) box_asts_a.operator("mbast.particle_hair", icon='USER') @@ -2866,7 +2866,7 @@ def draw(self, context): box_lib.prop(obj, "preset") if mblab_humanoid.exists_phenotype_database(): box_lib.prop(obj, "ethnic") - box_lib.prop(scn, 'mblab_mix_characters', icon='FORCE_CHARGE') + box_lib.prop(scn, 'mblab_mix_characters', icon='RNA_ADD') # Randomize character @@ -3004,21 +3004,34 @@ def draw(self, context): for material_data_prop in sorted(mblab_humanoid.character_material_properties.keys()): box_skin.prop(obj, material_data_prop) - # Finalize character + box_act_tools_sub.label(text="OTHERS", icon="RNA") box_act_tools_c = box_act_tools_sub.column(align=True) - if gui_active_panel_display != "finalize": - box_act_tools_c.operator('mbast.button_finalize_on', icon=icon_expand) + + + # Display character + + if gui_active_panel_display != "display_opt": + box_act_tools_c.operator('mbast.button_display_on', icon=icon_expand) else: - box_act_tools_c.operator('mbast.button_finalize_off', icon=icon_collapse) - box_fin = self.layout.box() - box_fin.prop(scn, 'mblab_save_images_and_backup', icon='EXPORT') - box_fin.prop(scn, 'mblab_remove_all_modifiers', icon='CANCEL') - box_fin.prop(scn, 'mblab_final_prefix') - if scn.mblab_save_images_and_backup: - box_fin.operator("mbast.finalize_character_and_images", icon='FREEZE') + box_act_tools_c.operator('mbast.button_display_off', icon=icon_collapse) + box_disp = self.layout.box() + + if mblab_humanoid.exists_displace_texture(): + if mblab_humanoid.get_disp_visibility() is False: + box_disp.operator("mbast.displacement_enable", icon='MOD_DISPLACE') + else: + box_disp.operator("mbast.displacement_disable", icon='X') + if mblab_humanoid.get_subd_visibility() is False: + box_disp.operator("mbast.subdivision_enable", icon='MOD_SUBSURF') + box_disp.label(text="Subd. preview is very CPU intensive", icon='INFO') else: - box_fin.operator("mbast.finalize_character", icon='FREEZE') + box_disp.operator("mbast.subdivision_disable", icon='X') + box_disp.label(text="Disable subdivision to increase performance", icon='ERROR') + if mblab_humanoid.get_smooth_visibility() is False: + box_disp.operator("mbast.corrective_enable", icon='MOD_SMOOTH') + else: + box_disp.operator("mbast.corrective_disable", icon='X') # File tools @@ -3053,35 +3066,25 @@ def draw(self, context): box_file.operator("mbast.export_character", icon='EXPORT') box_file.operator("mbast.import_character", icon='IMPORT') - # Display character + # Finalize character - if gui_active_panel_display != "display_opt": - box_act_tools_c.operator('mbast.button_display_on', icon=icon_expand) + if gui_active_panel_display != "finalize": + box_act_tools_c.operator('mbast.button_finalize_on', icon=icon_expand) else: - box_act_tools_c.operator('mbast.button_display_off', icon=icon_collapse) - box_disp = self.layout.box() - - if mblab_humanoid.exists_displace_texture(): - if mblab_humanoid.get_disp_visibility() is False: - box_disp.operator("mbast.displacement_enable", icon='MOD_DISPLACE') - else: - box_disp.operator("mbast.displacement_disable", icon='X') - if mblab_humanoid.get_subd_visibility() is False: - box_disp.operator("mbast.subdivision_enable", icon='MOD_SUBSURF') - box_disp.label(text="Subd. preview is very CPU intensive", icon='INFO') - else: - box_disp.operator("mbast.subdivision_disable", icon='X') - box_disp.label(text="Disable subdivision to increase performance", icon='ERROR') - if mblab_humanoid.get_smooth_visibility() is False: - box_disp.operator("mbast.corrective_enable", icon='MOD_SMOOTH') + box_act_tools_c.operator('mbast.button_finalize_off', icon=icon_collapse) + box_fin = self.layout.box() + box_fin.prop(scn, 'mblab_save_images_and_backup', icon='EXPORT') + box_fin.prop(scn, 'mblab_remove_all_modifiers', icon='CANCEL') + box_fin.prop(scn, 'mblab_final_prefix') + if scn.mblab_save_images_and_backup: + box_fin.operator("mbast.finalize_character_and_images", icon='FREEZE') else: - box_disp.operator("mbast.corrective_disable", icon='X') + box_fin.operator("mbast.finalize_character", icon='FREEZE') self.layout.separator(factor=0.5) self.layout.label(text="AFTER-CREATION TOOLS", icon="MODIFIER_ON") layout_sub=self.layout.box() layout_sub.label(text="FINALIZED characters ONLY", icon="INFO") - else: gui_status = "NEW_SESSION" @@ -3110,7 +3113,7 @@ def draw(self, context): icon_collapse = "DISCLOSURE_TRI_DOWN" box_general = self.layout.box() - box_general.label(text="https://www.mblab.dev") + box_general.label(text="Open Source Humanoid Development Toolkit") #box_general.operator('mbcrea.button_for_tests', icon='BLENDER') box_tools = self.layout.box() @@ -3408,7 +3411,7 @@ def draw(self, context): box_fast_creators.label(text="File already exists !", icon='ERROR') box_fast_creators.operator('mbcrea.button_save_preset', icon="FREEZE") else: - box_fast_creators.label(text="! NO COMPATIBLE MODEL !", icon='ERROR') + box_fast_creators.label(text="!!!...NO COMPATIBLE MODEL!", icon='ERROR') box_fast_creators.enabled = False #------------Expressions creator------------ elif scn.mbcrea_before_edition_tools == "morphs_for_expressions": @@ -3454,7 +3457,7 @@ def draw(self, context): box_morphexpression_b.operator('mbast.button_load_base_body', icon='IMPORT') box_morphexpression_b.operator('mbast.button_load_sculpted_body', icon='IMPORT') else: - box_morphexpression.label(text="!NO COMPATIBLE MODEL!", icon='ERROR') + box_morphexpression.label(text="!!!...NO COMPATIBLE MODEL!", icon='ERROR') box_morphexpression.enabled = False #------------Combine expressions creator------------ elif scn.mbcrea_before_edition_tools == "combine_expressions": @@ -3499,7 +3502,7 @@ def draw(self, context): box_combinexpression.label(text="Save in : " + mblab_humanoid.get_root_model_name(), icon='INFO') box_combinexpression.operator('mbcrea.button_save_final_comb_expression', icon="FREEZE") #Save the final expression. else: - box_combinexpression.label(text="!NO COMPATIBLE MODEL!", icon='ERROR') + box_combinexpression.label(text="!!!...NO COMPATIBLE MODEL!", icon='ERROR') box_combinexpression.enabled = False # Copy / Move / Delete utilities. @@ -3575,7 +3578,7 @@ def draw(self, context): box_cmd_rename.enabled = False # Here else: - box_cmd_morphs.label(text="!NO COMPATIBLE MODEL!", icon='ERROR') + box_cmd_morphs.label(text="!!!...NO COMPATIBLE MODEL!", icon='ERROR') box_cmd_morphs.enabled = False #------------Rigify------------ box_adaptation_tools.label(text="After finalization", icon='MODIFIER_ON') @@ -3759,9 +3762,17 @@ def draw(self, context): else: b_m_c_c.prop(scn, "mbcrea_texture_sebum") if creation_tools_ops.get_content(key, "texture_roughness") != "": - b_m_c_c.label(text="Sebum : " + creation_tools_ops.get_content(key, "texture_sebum"), icon='CHECKMARK') + b_m_c_c.label(text="Roughness : " + creation_tools_ops.get_content(key, "texture_roughness"), icon='CHECKMARK') else: b_m_c_c.prop(scn, "mbcrea_texture_roughness") + if creation_tools_ops.get_content(key, "texture_thickness") != "": + b_m_c_c.label(text="Thickness : " + creation_tools_ops.get_content(key, "texture_thickness"), icon='CHECKMARK') + else: + b_m_c_c.prop(scn, "mbcrea_texture_thickness") + if creation_tools_ops.get_content(key, "texture_melanin") != "": + b_m_c_c.label(text="Melanin : " + creation_tools_ops.get_content(key, "texture_melanin"), icon='CHECKMARK') + else: + b_m_c_c.prop(scn, "mbcrea_texture_melanin") if creation_tools_ops.get_content(key, "texture_eyes") != "": b_m_c_c.label(text="Eyes : " + creation_tools_ops.get_content(key, "texture_eyes"), icon='CHECKMARK') else: @@ -3770,14 +3781,6 @@ def draw(self, context): b_m_c_c.label(text="Eyelash albedo : " + creation_tools_ops.get_content(key, "texture_eyelash_albedo"), icon='CHECKMARK') else: b_m_c_c.prop(scn, "mbcrea_texture_eyelash_albedo") - if creation_tools_ops.get_content(key, "texture_iris_color") != "": - b_m_c_c.label(text="Iris color : " + creation_tools_ops.get_content(key, "texture_iris_color"), icon='CHECKMARK') - else: - b_m_c_c.prop(scn, "mbcrea_texture_iris_color") - if creation_tools_ops.get_content(key, "texture_iris_bump") != "": - b_m_c_c.label(text="Iris bump : " + creation_tools_ops.get_content(key, "texture_iris_bump"), icon='CHECKMARK') - else: - b_m_c_c.prop(scn, "mbcrea_texture_iris_bump") if creation_tools_ops.get_content(key, "texture_sclera_color") != "": b_m_c_c.label(text="Sclera color : " + creation_tools_ops.get_content(key, "texture_sclera_color"), icon='CHECKMARK') else: @@ -4624,8 +4627,9 @@ def update_character_new_name(self, context): items=[ ("CC0", "CC0 (Free)", "For commercial or personnal use"), ("CC-BY", "CC-BY (Free)", "For commercial or personnal use, attribution required"), - ("AGPL3", "AGPL3", "See documentation"), - ("AFPL9", "AFPL9 (Personnal use)", "You can't make money with") + ("CC-BY-SA", "CC-BY-SA (Free)", "For commercial or personnal use, attribution required"), + ("CC-BY-NC", "CC-BY-NC (Free)", "For non-commercial or personnal use, attribution required"), + ("AGPL3", "AGPL3", "See documentation") ], name="license", default=None) @@ -4660,6 +4664,16 @@ def update_texture_items(self, context): name="Roughness", default=None) +bpy.types.Scene.mbcrea_texture_thickness = bpy.props.EnumProperty( + items=update_texture_items, + name="Thickness", + default=None) + +bpy.types.Scene.mbcrea_texture_melanin = bpy.props.EnumProperty( + items=update_texture_items, + name="Melanin", + default=None) + bpy.types.Scene.mbcrea_texture_frecklemask = bpy.props.EnumProperty( items=update_texture_items, name="Freckle mask", @@ -5141,13 +5155,13 @@ def execute(self, context): creation_tools_ops.add_content(key, "texture_frecklemask", decide_which(key, "texture_frecklemask", scn.mbcrea_texture_frecklemask)) creation_tools_ops.add_content(key, "texture_blush", decide_which(key, "texture_blush", scn.mbcrea_texture_blush)) creation_tools_ops.add_content(key, "texture_sebum", decide_which(key, "texture_sebum", scn.mbcrea_texture_sebum)) + creation_tools_ops.add_content(key, "texture_roughness", decide_which(key, "texture_roughness", scn.mbcrea_texture_roughness)) + creation_tools_ops.add_content(key, "texture_thickness", decide_which(key, "texture_thickness", scn.mbcrea_texture_thickness)) + creation_tools_ops.add_content(key, "texture_melanin", decide_which(key, "texture_melanin", scn.mbcrea_texture_melanin)) creation_tools_ops.add_content(key, "texture_lipmap", decide_which(key, "texture_lipmap", scn.mbcrea_texture_lipmap)) - creation_tools_ops.add_content(key, "texture_iris_color", decide_which(key, "texture_iris_color", scn.mbcrea_texture_iris_color)) - creation_tools_ops.add_content(key, "texture_iris_bump", decide_which(key, "texture_iris_bump", scn.mbcrea_texture_iris_bump)) creation_tools_ops.add_content(key, "texture_sclera_color", decide_which(key, "texture_sclera_color", scn.mbcrea_texture_sclera_color)) creation_tools_ops.add_content(key, "texture_translucent_mask", decide_which(key, "texture_translucent_mask", scn.mbcrea_texture_translucent_mask)) creation_tools_ops.add_content(key, "texture_sclera_mask", decide_which(key, "texture_sclera_mask", scn.mbcrea_texture_sclera_mask)) - creation_tools_ops.add_content(key, "texture_roughness", decide_which(key, "texture_roughness", scn.mbcrea_texture_roughness)) # The rest creation_tools_ops.add_content(key, "bounding_boxes_file", decide_which(key, "bounding_boxes_file", scn.mbcrea_bboxes_file)) creation_tools_ops.add_content(key, "joints_base_file", decide_which(key, "joints_base_file", scn.mbcrea_joints_base_file)) @@ -6835,4 +6849,4 @@ def unregister(): if __name__ == "__main__": register() -# +# \ No newline at end of file diff --git a/addon_updater_ops.py b/addon_updater_ops.py old mode 100644 new mode 100755 index e42b3709..c5b9a618 --- a/addon_updater_ops.py +++ b/addon_updater_ops.py @@ -1353,16 +1353,16 @@ def register(bl_info): updater.private_token = None # "tokenstring" # Choose your own username, must match website (not needed for GitLab). - updater.user = "cgcookie" + updater.user = "animate1978" # Choose your own repository, must match git name for GitHUb and Bitbucket, # for GitLab use project ID (numbers only). - updater.repo = "blender-addon-updater" + updater.repo = "MB-Lab" # updater.addon = # define at top of module, MUST be done first # Website for manual addon download, optional but recommended to set. - updater.website = "https://github.com/CGCookie/blender-addon-updater/" + updater.website = "https://mb-lab-community.github.io/MB-Lab.github.io/" # Addon subfolder path. # "sample/path/to/addon" @@ -1391,7 +1391,7 @@ def register(bl_info): updater.backup_current = True # True by default # Sample ignore patterns for when creating backup of current during update. - updater.backup_ignore_patterns = ["__pycache__"] + updater.backup_ignore_patterns = [".git", "__pycache__", ".gitignore"] # Alternate example patterns: # updater.backup_ignore_patterns = [".git", "__pycache__", "*.bat", ".gitignore", "*.exe"] @@ -1405,7 +1405,7 @@ def register(bl_info): # update. If a pattern file is not found in new update, no action is taken # NOTE: This does NOT delete anything proactively, rather only defines what # is allowed to be overwritten during an update execution. - updater.overwrite_patterns = ["*.png", "*.jpg", "README.md", "LICENSE.txt"] + updater.overwrite_patterns = ["*.png","*.jpg","*.blend","*.json","README.md","LICENSE.txt"] # updater.overwrite_patterns = [] # other examples: # ["*"] means ALL files/folders will be overwritten by update, was the diff --git a/algorithms.py b/algorithms.py old mode 100644 new mode 100755 index e73855ef..93b500b8 --- a/algorithms.py +++ b/algorithms.py @@ -40,22 +40,7 @@ logger = logging.getLogger(__name__) -DEBUG_LEVEL = 3 - -# ------------------------------------------------------------------------ -# Print Log -# ------------------------------------------------------------------------ - -def print_log_report(level, text_to_write): - import warnings - warnings.warn("print_log_report deprecated, use python logging", DeprecationWarning) - l = 0 - levels = {"INFO": 0, "DEBUG": 1, "WARNING": 2, "ERROR": 3, "CRITICAL": 4,} - if level in levels: - l = levels[level] - if l >= DEBUG_LEVEL: - print(level + ": " + text_to_write) - +# Had old debugger code here forever, it has been removed # ------------------------------------------------------------------------ # Algorithms @@ -335,7 +320,7 @@ def check_mesh(obj): config_data = file_ops.get_configuration() model_config = config_data.get(obj.get("manuellab_id")) if not model_config: - logger.debug("check_obj %s model %s is not found", obj.name, obj.get("manuellab_id")) + logger.debug("check_obj %s model %s is not found", obj.name, obj.obj.get("manuellab_id")) return False templates = {} @@ -360,8 +345,8 @@ def looking_for_humanoid_obj(): Looking for a mesh that is OK for the lab """ logger.info("Looking for a humanoid object ...") - if bpy.app.version < (2, 81, 16): - msg = "Sorry, MB-Lab requires Blender 2.81.16 Minimum" + if bpy.app.version < (4, 0, 0): + msg = "Sorry, MB-Lab 1.8.0 requires Blender 4.0.0" logger.warning(msg) return("ERROR", msg) @@ -1145,7 +1130,7 @@ def remove_censors(): if char_name in("f_an01","f_an02","m_an01","m_an02"): swap_material("MBlab_generic", "MBLab_anime_skin",char_name) else: - swap_material("MBlab_generic", "MBLab_skin2",char_name) + swap_material("MBlab_generic", "MBLab_skin3",char_name) return None diff --git a/animationengine.py b/animationengine.py old mode 100644 new mode 100755 index bdad0ea7..2d844a8e --- a/animationengine.py +++ b/animationengine.py @@ -1023,9 +1023,8 @@ def bake_animation(self, target_armat, source_armat): if source_armat.animation_data: source_action = source_armat.animation_data.action f_range = source_action.frame_range - - bpy.ops.nla.bake(frame_start=f_range[0], frame_end=f_range[1], only_selected=False, - visual_keying=True, clear_constraints=False, use_current_action=True, bake_types={'POSE'}) +# Removed f_range, needs work + bpy.ops.nla.bake(only_selected=False, visual_keying=True, clear_constraints=False, use_current_action=True, bake_types={'POSE'}) self.remove_armature_constraints(target_armat) @staticmethod diff --git a/creation_tools_ops.py b/creation_tools_ops.py old mode 100644 new mode 100755 index cf3d8bbe..cf25a413 --- a/creation_tools_ops.py +++ b/creation_tools_ops.py @@ -179,8 +179,8 @@ def add_content(key, key_in, content): "texture_nails_albedo": "", "texture_eyelash_albedo": "", "texture_frecklemask": "", "texture_blush": "", "texture_sebum": "", "texture_lipmap": "", - "texture_roughness": "", "texture_iris_color": "", - "texture_iris_bump": "", "texture_sclera_color": "", + "texture_roughness": "", "texture_melanin": "", + "texture_sclera_color": "", "texture_thickness":"", "texture_translucent_mask": "", "texture_sclera_mask": "", "morphs_extra_file": "", "shared_morphs_file": "", "shared_morphs_extra_file": "", "bounding_boxes_file": "", diff --git a/data/characters_config.json b/data/characters_config.json old mode 100644 new mode 100755 index 1445ca29..16bdced1 --- a/data/characters_config.json +++ b/data/characters_config.json @@ -78,11 +78,13 @@ "texture_sebum": "human_female_sebum.png", "texture_lipmap": "human_female_lipmap.png", "texture_roughness": "human_female_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_female_thickness.png", + "texture_melanin": "human_female_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "", "shared_morphs_file": "human_female_morphs.json", "shared_morphs_extra_file": "human_female_morphs_extra.json", @@ -114,11 +116,13 @@ "texture_sebum": "human_female_sebum.png", "texture_lipmap": "human_female_lipmap.png", "texture_roughness": "human_female_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_female_thickness.png", + "texture_melanin": "human_female_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "", "shared_morphs_file": "human_female_morphs.json", "shared_morphs_extra_file": "human_female_morphs_extra.json", @@ -150,11 +154,13 @@ "texture_sebum": "human_female_sebum.png", "texture_lipmap": "human_female_lipmap.png", "texture_roughness": "human_female_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_female_thickness.png", + "texture_melanin": "human_female_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "", "shared_morphs_file": "human_female_morphs.json", "shared_morphs_extra_file": "human_female_morphs_extra.json", @@ -186,11 +192,13 @@ "texture_sebum": "human_female_sebum.png", "texture_lipmap": "human_female_lipmap.png", "texture_roughness": "human_female_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_female_thickness.png", + "texture_melanin": "human_female_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "", "shared_morphs_file": "human_female_morphs.json", "shared_morphs_extra_file": "human_female_morphs_extra.json", @@ -222,11 +230,13 @@ "texture_sebum": "human_male_sebum.png", "texture_lipmap": "human_male_lipmap.png", "texture_roughness": "human_male_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_male_thickness.png", + "texture_melanin": "human_male_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "", "shared_morphs_file": "human_male_morphs.json", "shared_morphs_extra_file": "human_male_morphs_extra.json", @@ -258,11 +268,13 @@ "texture_sebum": "human_male_sebum.png", "texture_lipmap": "human_male_lipmap.png", "texture_roughness": "human_male_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_male_thickness.png", + "texture_melanin": "human_male_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "", "shared_morphs_file": "human_male_morphs.json", "shared_morphs_extra_file": "human_male_morphs_extra.json", @@ -294,11 +306,13 @@ "texture_sebum": "human_male_sebum.png", "texture_lipmap": "human_male_lipmap.png", "texture_roughness": "human_male_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_male_thickness.png", + "texture_melanin": "human_male_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "", "shared_morphs_file": "human_male_morphs.json", "shared_morphs_extra_file": "human_male_morphs_extra.json", @@ -330,11 +344,13 @@ "texture_sebum": "human_male_sebum.png", "texture_lipmap": "human_male_lipmap.png", "texture_roughness": "human_male_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_male_thickness.png", + "texture_melanin": "human_male_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "", "shared_morphs_file": "human_male_morphs.json", "shared_morphs_extra_file": "human_male_morphs_extra.json", @@ -366,11 +382,13 @@ "texture_sebum": "", "texture_lipmap": "", "texture_roughness": "", - "texture_iris_color" : "", - "texture_iris_bump" : "", - "texture_sclera_color" : "", - "texture_translucent_mask" : "", - "texture_sclera_mask" : "", + "texture_thickness": "", + "texture_melanin": "", + "texture_iris_color": "", + "texture_iris_bump": "", + "texture_sclera_color": "", + "texture_translucent_mask": "", + "texture_sclera_mask": "", "morphs_extra_file": "", "shared_morphs_file": "anime_female_morphs.json", "shared_morphs_extra_file": "", @@ -404,11 +422,13 @@ "texture_sebum": "", "texture_lipmap": "", "texture_roughness": "", - "texture_iris_color" : "", - "texture_iris_bump" : "", - "texture_sclera_color" : "", - "texture_translucent_mask" : "", - "texture_sclera_mask" : "", + "texture_thickness": "", + "texture_melanin": "", + "texture_iris_color": "", + "texture_iris_bump": "", + "texture_sclera_color": "", + "texture_translucent_mask": "", + "texture_sclera_mask": "", "morphs_extra_file": "", "shared_morphs_file": "anime_female_morphs.json", "shared_morphs_extra_file": "", @@ -442,11 +462,13 @@ "texture_sebum": "human_female_sebum.png", "texture_lipmap": "human_female_lipmap.png", "texture_roughness": "human_female_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_female_thickness.png", + "texture_melanin": "human_female_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "f_an03_morphs_extra.json", "shared_morphs_file": "human_female_morphs.json", "shared_morphs_extra_file": "human_female_morphs_extra.json", @@ -478,11 +500,13 @@ "texture_sebum": "", "texture_lipmap": "", "texture_roughness": "", - "texture_iris_color" : "", - "texture_iris_bump" : "", - "texture_sclera_color" : "", - "texture_translucent_mask" : "", - "texture_sclera_mask" : "", + "texture_thickness": "", + "texture_melanin": "", + "texture_iris_color": "", + "texture_iris_bump": "", + "texture_sclera_color": "", + "texture_translucent_mask": "", + "texture_sclera_mask": "", "morphs_extra_file": "", "shared_morphs_file": "anime_male_morphs.json", "shared_morphs_extra_file": "", @@ -516,11 +540,13 @@ "texture_sebum": "", "texture_lipmap": "", "texture_roughness": "", - "texture_iris_color" : "", - "texture_iris_bump" : "", - "texture_sclera_color" : "", - "texture_translucent_mask" : "", - "texture_sclera_mask" : "", + "texture_thickness": "", + "texture_melanin": "", + "texture_iris_color": "", + "texture_iris_bump": "", + "texture_sclera_color": "", + "texture_translucent_mask": "", + "texture_sclera_mask": "", "morphs_extra_file": "", "shared_morphs_file": "anime_male_morphs.json", "shared_morphs_extra_file": "", @@ -554,11 +580,13 @@ "texture_sebum": "human_male_sebum.png", "texture_lipmap": "human_male_lipmap.png", "texture_roughness": "human_male_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_male_thickness.png", + "texture_melanin": "human_male_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "m_an03_morphs_extra.json", "shared_morphs_file": "human_male_morphs.json", "shared_morphs_extra_file": "human_male_morphs_extra.json", @@ -590,11 +618,13 @@ "texture_sebum": "human_female_sebum.png", "texture_lipmap": "human_female_lipmap.png", "texture_roughness": "human_female_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_female_thickness.png", + "texture_melanin": "human_female_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "f_ft01_morphs_extra.json", "shared_morphs_file": "human_female_morphs.json", "shared_morphs_extra_file": "human_female_morphs_extra.json", @@ -626,11 +656,13 @@ "texture_sebum": "human_male_sebum.png", "texture_lipmap": "human_male_lipmap.png", "texture_roughness": "human_male_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_male_thickness.png", + "texture_melanin": "human_male_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "", "shared_morphs_file": "human_male_morphs.json", "shared_morphs_extra_file": "human_male_morphs_extra.json", @@ -662,11 +694,13 @@ "texture_sebum": "human_male_sebum.png", "texture_lipmap": "human_male_lipmap.png", "texture_roughness": "human_male_roughness.png", - "texture_iris_color" : "iris_color.png", - "texture_iris_bump" : "iris_bump.png", - "texture_sclera_color" : "sclera_color.png", - "texture_translucent_mask" : "translucent_mask.png", - "texture_sclera_mask" : "sclera_mask.png", + "texture_thickness": "human_male_thickness.png", + "texture_melanin": "human_male_melanin.png", + "texture_iris_color": "iris_color.png", + "texture_iris_bump": "iris_bump.png", + "texture_sclera_color": "sclera_color.png", + "texture_translucent_mask": "translucent_mask.png", + "texture_sclera_mask": "sclera_mask.png", "morphs_extra_file": "m_ft02_morphs_extra.json", "shared_morphs_file": "human_male_morphs.json", "shared_morphs_extra_file": "human_male_morphs_extra.json", diff --git a/data/humanoid_library.blend b/data/humanoid_library.blend index 8c697fa3..4093cee4 100644 Binary files a/data/humanoid_library.blend and b/data/humanoid_library.blend differ diff --git a/data/poses/rest_poses/standard.json b/data/poses/rest_poses/standard.json index cd57f56f..96ee24df 100644 --- a/data/poses/rest_poses/standard.json +++ b/data/poses/rest_poses/standard.json @@ -1,498 +1,91 @@ -{ "root":[ - 1.0, - 0.0, - -0.0, - 0.0 - -], -"pelvis":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"thigh_R":[ - 0.9974778890609741, - -0.00018281217489857227, - 0.002352991374209523, +{ + "root": [1.0, 0.0, -0.0, 0.0], + "pelvis": [1.0, 0.0, 0.0, 0.0], + "thigh_R": [ + 0.9974778890609741, -0.00018281217489857227, 0.002352991374209523, 0.07093829661607742 - -], -"calf_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"foot_R":[ - 0.9946081042289734, - 0.004870180040597916, - -0.09026294946670532, + ], + "calf_R": [1.0, 0.0, 0.0, -0.0], + "foot_R": [ + 0.9946081042289734, 0.004870180040597916, -0.09026294946670532, -0.050829630345106125 - -], -"toes_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"calf_twist_R":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"thigh_twist_R":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"thigh_L":[ - 0.9974778890609741, - -0.00018281216034665704, - -0.0023529911413788795, + ], + "toes_R": [1.0, 0.0, 0.0, -0.0], + "calf_twist_R": [1.0, 0.0, 0.0, 0.0], + "thigh_twist_R": [1.0, 0.0, 0.0, 0.0], + "thigh_L": [ + 0.9974778890609741, -0.00018281216034665704, -0.0023529911413788795, -0.07093829661607742 - -], -"calf_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"foot_L":[ - 0.9946081042289734, - 0.004870180040597916, - 0.09026294946670532, + ], + "calf_L": [1.0, 0.0, 0.0, 0.0], + "foot_L": [ + 0.9946081042289734, 0.004870180040597916, 0.09026294946670532, 0.050829630345106125 - -], -"toes_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"calf_twist_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"thigh_twist_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"spine01":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"spine02":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"spine03":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"clavicle_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"upperarm_L":[ - 0.99983149766922, - 0.0, - 0.0, - 0.0 - -], -"lowerarm_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"hand_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"thumb01_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"thumb02_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"thumb03_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"index00_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"index01_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"index02_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"index03_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"middle00_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"middle01_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"middle02_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"middle03_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"ring00_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"ring01_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"ring02_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"ring03_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"pinky00_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"pinky01_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"pinky02_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"pinky03_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"lowerarm_twist_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"upperarm_twist_L":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"clavicle_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"upperarm_R":[ - 0.9999081492424011, - 0.0, - 0.0, - 0.0 - -], -"lowerarm_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"hand_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"thumb01_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"thumb02_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"thumb03_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"index00_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"index01_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"index02_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"index03_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"middle00_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"middle01_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"middle02_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"middle03_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"ring00_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"ring01_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"ring02_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"ring03_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"pinky00_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"pinky01_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"pinky02_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"pinky03_R":[ - 1.0, - 0.0, - 0.0, - -0.0 - -], -"lowerarm_twist_R":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"upperarm_twist_R":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"neck":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"head":[ - 1.0, - 0.0, - 0.0, - 0.0 - -], -"breast_L":[ - 0.9983381032943726, - 0.05762870982289314, - 2.224142289273894e-16, - 1.6325274465600614e-09 - -], -"breast_R":[ - 0.9983381032943726, - 0.05762871354818344, - -2.2898349882893854e-16, - -1.632527557582364e-09 - -] -} \ No newline at end of file + ], + "toes_L": [1.0, 0.0, 0.0, 0.0], + "calf_twist_L": [1.0, 0.0, 0.0, 0.0], + "thigh_twist_L": [1.0, 0.0, 0.0, 0.0], + "spine01": [1.0, 0.0, 0.0, 0.0], + "spine02": [1.0, 0.0, 0.0, 0.0], + "spine03": [1.0, 0.0, 0.0, 0.0], + "clavicle_L": [1.0, 0.0, 0.0, 0.0], + "upperarm_L": [0.99983149766922, 0.0, 0.0, 0.0], + "lowerarm_L": [1.0, 0.0, 0.0, 0.0], + "hand_L": [1.0, 0.0, 0.0, 0.0], + "thumb01_L": [1.0, 0.0, 0.0, 0.0], + "thumb02_L": [1.0, 0.0, 0.0, 0.0], + "thumb03_L": [1.0, 0.0, 0.0, 0.0], + "index00_L": [1.0, 0.0, 0.0, 0.0], + "index01_L": [1.0, 0.0, 0.0, 0.0], + "index02_L": [1.0, 0.0, 0.0, 0.0], + "index03_L": [1.0, 0.0, 0.0, 0.0], + "middle00_L": [1.0, 0.0, 0.0, 0.0], + "middle01_L": [1.0, 0.0, 0.0, 0.0], + "middle02_L": [1.0, 0.0, 0.0, 0.0], + "middle03_L": [1.0, 0.0, 0.0, 0.0], + "ring00_L": [1.0, 0.0, 0.0, 0.0], + "ring01_L": [1.0, 0.0, 0.0, 0.0], + "ring02_L": [1.0, 0.0, 0.0, 0.0], + "ring03_L": [1.0, 0.0, 0.0, 0.0], + "pinky00_L": [1.0, 0.0, 0.0, 0.0], + "pinky01_L": [1.0, 0.0, 0.0, 0.0], + "pinky02_L": [1.0, 0.0, 0.0, 0.0], + "pinky03_L": [1.0, 0.0, 0.0, 0.0], + "lowerarm_twist_L": [1.0, 0.0, 0.0, 0.0], + "upperarm_twist_L": [1.0, 0.0, 0.0, 0.0], + "clavicle_R": [1.0, 0.0, 0.0, -0.0], + "upperarm_R": [0.9999081492424011, 0.0, 0.0, 0.0], + "lowerarm_R": [1.0, 0.0, 0.0, -0.0], + "hand_R": [1.0, 0.0, 0.0, -0.0], + "thumb01_R": [1.0, 0.0, 0.0, -0.0], + "thumb02_R": [1.0, 0.0, 0.0, -0.0], + "thumb03_R": [1.0, 0.0, 0.0, -0.0], + "index00_R": [1.0, 0.0, 0.0, -0.0], + "index01_R": [1.0, 0.0, 0.0, -0.0], + "index02_R": [1.0, 0.0, 0.0, -0.0], + "index03_R": [1.0, 0.0, 0.0, -0.0], + "middle00_R": [1.0, 0.0, 0.0, -0.0], + "middle01_R": [1.0, 0.0, 0.0, -0.0], + "middle02_R": [1.0, 0.0, 0.0, -0.0], + "middle03_R": [1.0, 0.0, 0.0, -0.0], + "ring00_R": [1.0, 0.0, 0.0, -0.0], + "ring01_R": [1.0, 0.0, 0.0, -0.0], + "ring02_R": [1.0, 0.0, 0.0, -0.0], + "ring03_R": [1.0, 0.0, 0.0, -0.0], + "pinky00_R": [1.0, 0.0, 0.0, -0.0], + "pinky01_R": [1.0, 0.0, 0.0, -0.0], + "pinky02_R": [1.0, 0.0, 0.0, -0.0], + "pinky03_R": [1.0, 0.0, 0.0, -0.0], + "lowerarm_twist_R": [1.0, 0.0, 0.0, 0.0], + "upperarm_twist_R": [1.0, 0.0, 0.0, 0.0], + "neck": [1.0, 0.0, 0.0, 0.0], + "head": [1.0, 0.0, 0.0, 0.0], + "breast_L": [ + 0.9983381032943726, 0.05762870982289314, 2.224142289273894e-16, + 1.6325274465600614e-9 + ], + "breast_R": [ + 0.9983381032943726, 0.05762871354818344, -2.2898349882893854e-16, + -1.632527557582364e-9 + ] +} diff --git a/data/textures/human_female_melanin.png b/data/textures/human_female_melanin.png new file mode 100755 index 00000000..143357a3 Binary files /dev/null and b/data/textures/human_female_melanin.png differ diff --git a/data/textures/human_female_thickness.png b/data/textures/human_female_thickness.png new file mode 100644 index 00000000..dca30d70 Binary files /dev/null and b/data/textures/human_female_thickness.png differ diff --git a/data/textures/human_male_melanin.png b/data/textures/human_male_melanin.png new file mode 100755 index 00000000..19a8763d Binary files /dev/null and b/data/textures/human_male_melanin.png differ diff --git a/data/textures/human_male_thickness.png b/data/textures/human_male_thickness.png new file mode 100644 index 00000000..39f3282b Binary files /dev/null and b/data/textures/human_male_thickness.png differ diff --git a/hairengine.py b/hairengine.py old mode 100644 new mode 100755 index bca20f28..3d5a4745 --- a/hairengine.py +++ b/hairengine.py @@ -94,7 +94,7 @@ def add_hair(hair_object, mat_name, style): p_sys.settings.root_radius = 0.03 p_sys.settings.count = 1000 p_sys.settings.hair_step = 5 - p_sys.settings.child_nbr = 20 + #p_sys.settings.child_nbr = 20 p_sys.settings.rendered_child_count = 20 p_sys.settings.child_length = 0.895 bpy.context.object.show_instancer_for_viewport = False @@ -216,7 +216,7 @@ def add_pHair(hair_object): p_sys.settings.root_radius = 0.03 p_sys.settings.count = 1000 p_sys.settings.hair_step = 5 - p_sys.settings.child_nbr = 20 + #p_sys.settings.child_nbr = 20 p_sys.settings.rendered_child_count = 20 p_sys.settings.child_length = 0.895 bpy.context.scene.render.hair_type = 'STRIP' diff --git a/humanoid.py b/humanoid.py old mode 100644 new mode 100755 index 3eb130d1..14f83881 --- a/humanoid.py +++ b/humanoid.py @@ -305,7 +305,7 @@ def init_database(self, obj, character_identifier, rigging_type): def add_subdivision_modifier(self): obj = self.get_object() - parameters = {"levels": 1, "render_levels": 2, "show_viewport": True, "show_in_editmode": False} + parameters = {"levels": 2, "render_levels": 3, "show_viewport": True, "show_in_editmode": False} object_ops.new_modifier(obj, self.mat_engine.subdivision_modifier_name, 'SUBSURF', parameters) def add_displacement_modifier(self): @@ -514,8 +514,6 @@ def remove_modifiers(self): if "armature" not in modf.name: obj.modifiers.remove(modf) -#TODO Move to file_ops.py - def save_body_displacement_texture(self, filepath): self.mat_engine.save_texture(filepath, "body_displ") @@ -523,7 +521,7 @@ def save_body_dermal_texture(self, filepath): self.mat_engine.save_texture(filepath, "body_derm") def save_all_textures(self, filepath): - targets = ["body_derm", "body_displ", "teeth_albedo", "eyes_albedo", "tongue_albedo", "freckle_mask", "blush", "sebum", "roughness", "lipmap", "iris_color", "iris_bump", "sclera_color", "translucent_mask", "sclera_mask", "body_bump"] + targets = ["body_derm", "body_displ", "teeth_albedo", "eyes_albedo", "tongue_albedo", "freckle_mask", "blush", "sebum", "roughness", "thickness","melanin", "lipmap", "iris_color", "iris_bump", "sclera_color", "translucent_mask", "sclera_mask", "body_bump"] for target in targets: dir_path = os.path.dirname(filepath) filename = os.path.basename(filepath) @@ -860,14 +858,15 @@ def update_character(self, category_name=None, mode="update_all"): self.sync_gui_according_measures() if update_armature: self.sk_engine.fit_joints() - if update_normals: - obj.data.calc_normals() - if update_proxy: - self.fit_proxy() + # BUG - causes error in console + #if update_normals: + # obj.data.normal_update() + #if update_proxy: + # self.fit_proxy() self.set_subd_visibility(subdivision_value) - #logger.error("Character updated in {0} secs".format(time.time()-time1)) + logger.error("Character updated in {0} secs".format(time.time()-time1)) def generate_character(self, random_value, prv_face, prv_body, prv_mass, prv_tone, prv_height, prv_phenotype, set_tone_and_mass, body_mass, body_tone, prv_fantasy): logger.info("Generating character...") @@ -1230,10 +1229,11 @@ def combine_morphings(self, modifier, refresh_only=False, add_vertices_to_update values = [] for prop in modifier.properties: val = self.character_data[prop] - if val > 1.0: - val = 1.0 - if val < 0: - val = 0 + + #if val > 1.0: + # val = 1.0 + #if val < 0: + # val = 0 val1 = algorithms.function_modifier_a(val) val2 = algorithms.function_modifier_b(val) values.append([val1, val2]) diff --git a/materialengine.py b/materialengine.py old mode 100644 new mode 100755 index cf2e71b8..22c8243e --- a/materialengine.py +++ b/materialengine.py @@ -63,7 +63,9 @@ def __init__(self, obj_name, character_config): "freckle_mask": character_config["texture_frecklemask"], "blush": character_config["texture_blush"], "sebum": character_config["texture_sebum"], - "roughness": character_config["texture_roughness"], + #"roughness": character_config["texture_roughness"], + "thickness": character_config["texture_thickness"], + "melanin": character_config["texture_melanin"], "lipmap": character_config["texture_lipmap"], "iris_color": character_config["texture_iris_color"], "iris_bump": character_config["texture_iris_bump"], @@ -130,9 +132,15 @@ def texture_blush_exist(self): @property def texture_sebum_exist(self): return os.path.isfile(self.image_file_paths["sebum"]) + #@property + #def texture_roughness_exist(self): + # return os.path.isfile(self.image_file_paths["roughness"]) @property - def texture_roughness_exist(self): - return os.path.isfile(self.image_file_paths["roughness"]) + def texture_melanin_exist(self): + return os.path.isfile(self.image_file_paths["melanin"]) + @property + def texture_thickness_exist(self): + return os.path.isfile(self.image_file_paths["thickness"]) @property def texture_lipmap_exist(self): return os.path.isfile(self.image_file_paths["lipmap"]) @@ -244,8 +252,12 @@ def update_shaders(self, material_parameters=[], update_textures_nodes=True): self.assign_image_to_node(material.name, node.name, self.image_file_names["blush"]) if "_skn_sebum" in node.name: self.assign_image_to_node(material.name, node.name, self.image_file_names["sebum"]) - if "_skn_roughness" in node.name: - self.assign_image_to_node(material.name, node.name, self.image_file_names["roughness"]) + #if "_skn_roughness" in node.name: + # self.assign_image_to_node(material.name, node.name, self.image_file_names["roughness"]) + if "_skn_melanin" in node.name: + self.assign_image_to_node(material.name, node.name, self.image_file_names["melanin"]) + if "_skn_thickness" in node.name: + self.assign_image_to_node(material.name, node.name, self.image_file_names["thickness"]) if "_skn_lipmap" in node.name: self.assign_image_to_node(material.name, node.name, self.image_file_names["lipmap"]) if "_iris_color" in node.name: diff --git a/object_ops.py b/object_ops.py index bb486d01..e38d052f 100644 --- a/object_ops.py +++ b/object_ops.py @@ -54,7 +54,7 @@ def get_sel(): fa = bpy.context.object.data.polygons bpy.ops.object.mode_set(mode='OBJECT') countv = len(vt) - selv = np.empty(countv, dtype=np.bool) + selv = np.empty(countv, dtype=bool) #removed np.bool vt.foreach_get('select', selv) co = np.empty(countv * 3, dtype=np.float32) vt.foreach_get('co', co) @@ -62,7 +62,7 @@ def get_sel(): vidx = np.empty(countv, dtype=np.int32) vt.foreach_get('index', vidx) countf = len(fa) - selfa = np.empty(countf, dtype=np.bool) + selfa = np.empty(countf, dtype=bool) #removed np.bool fa.foreach_get('select', selfa) fidx = np.empty(countf, dtype=np.int32) fa.foreach_get('index', fidx) @@ -76,7 +76,7 @@ def get_sel(): return dc([co[selv], new_f, nv_Dict]) -############################################################################################################################### +############################################################################## # OBJECT CREATION #creates new mesh @@ -144,7 +144,7 @@ def add_rd_capsule(Name, length, radius, cap_coord, faces, collection): except: pass -############################################################################################################################### +############################################################################## # MATH OPS #Rotation Matrix @@ -175,7 +175,7 @@ def rot_obj(obj, rot_mat): for i, v in enumerate(List): vt[i].co = v -############################################################################################################################### +############################################################################## # VERTEX_GROUP OPS #Create Vertex Group @@ -230,7 +230,7 @@ def copy_wt(Name, viw, vid): transfer_vt(Name, viw) add_wt(Name, vid) -############################################################################################################################### +############################################################################## # COLLECTION OPS #get a list of all objects in collection @@ -242,7 +242,7 @@ def new_collection(Name): new_coll = bpy.data.collections.new(Name) bpy.context.scene.collection.children.link(new_coll) -############################################################################################################################### +############################################################################## # PARENTING OPS def adoption(parent, child, type, index): @@ -264,7 +264,7 @@ def add_parent(parent, children): -############################################################################################################################### +############################################################################## # MODIFIER OPS #Add modifier @@ -296,13 +296,13 @@ def new_modifier(obj, name, modifier_type, parameters): return _new_modifier -############################################################################################################################### +############################################################################## # ARMATURE OPS -############################################################################################################################### +############################################################################## # SHAPEKEY OPS -############################################################################################################################### +############################################################################## # OBJECT OPS @@ -401,7 +401,7 @@ def bvhtree_from_obj_polygons(obj, indices_of_polygons_subset=None): return mathutils.bvhtree.BVHTree.FromPolygons(vertices, polygons) -############################################################################################################################### +############################################################################## # LIGHTING_OPS def add_lighting(): diff --git a/preferences.py b/preferences.py old mode 100644 new mode 100755 index 783f62cc..73eba2a2 --- a/preferences.py +++ b/preferences.py @@ -33,39 +33,40 @@ class MBPreferences(bpy.types.AddonPreferences): ''' bl_idname = __package__ # addon updater preferences - auto_check_update = bpy.props.BoolProperty( - name="Auto-check for Update", - description="If enabled, auto-check for updates using an interval", - default=False, - ) - updater_interval_months = bpy.props.IntProperty( - name='Months', - description="Number of months between checking for updates", - default=0, - min=0 - ) - updater_interval_days = bpy.props.IntProperty( - name='Days', - description="Number of days between checking for updates", - default=7, - min=0, - max=31 - ) - updater_interval_hours = bpy.props.IntProperty( - name='Hours', - description="Number of hours between checking for updates", - default=0, - min=0, - max=23 - ) - updater_interval_minutes = bpy.props.IntProperty( - name='Minutes', - description="Number of minutes between checking for updates", - default=0, - min=0, - max=59 - ) - +# Auto updater disabled for now +# auto_check_update = bpy.props.BoolProperty( +# name="Auto-check for Update", +# description="If enabled, auto-check for updates using an interval", +# default=False, +# ) +# updater_interval_months = bpy.props.IntProperty( +# name='Months', +# description="Number of months between checking for updates", +# default=0, +# min=0 +# ) +# updater_interval_days = bpy.props.IntProperty( +# name='Days', +# description="Number of days between checking for updates", +# default=7, +# min=0, +# max=31 +# ) +# updater_interval_hours = bpy.props.IntProperty( +# name='Hours', +# description="Number of hours between checking for updates", +# default=0, +# min=0, +# max=23 +# ) +# updater_interval_minutes = bpy.props.IntProperty( +# name='Minutes', +# description="Number of minutes between checking for updates", +# default=0, +# min=0, +# max=59 +# ) +# use_censors = bpy.props.BoolProperty( name='censors', description="Use censors to cover genitals and breasts", @@ -81,7 +82,7 @@ def draw(self, context): col.prop(self, 'use_censors') # updater draw function - addon_updater_ops.update_settings_ui(self, context) + # addon_updater_ops.update_settings_ui(self, context) # Alternate draw function, which is more condensed and can be # placed within an existing draw function. Only contains: diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 8b137891..00000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -