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

Commit

Permalink
Mostly edits to surface shaders.
Browse files Browse the repository at this point in the history
Increased SubD levels for better visuals.
Removed old website URL
Minor code changes
  • Loading branch information
animate1978 committed Feb 25, 2024
1 parent 9edab93 commit 5c336af
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 22 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ All changes will be documented here

## Added

- Melanin map added that adds variance to the skin pigment

## Changed

- MBLabSkin3 is a now based off of the 1.7.6 shader
- MBLabSkin3 is a now based off of the 1.7.6 shader with major modifications
- AutoUpdater is disabled
- SubD levels have increased for better visuals
- Some menus rearranged for better workflow

## Bug Fixes

Expand Down
16 changes: 8 additions & 8 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2597,7 +2597,7 @@ 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="")

if gui_status == "ERROR_SESSION":
box_err = self.layout.box()
Expand All @@ -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)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -3113,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="")
#box_general.operator('mbcrea.button_for_tests', icon='BLENDER')

box_tools = self.layout.box()
Expand Down Expand Up @@ -3411,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":
Expand Down Expand Up @@ -3457,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":
Expand Down Expand Up @@ -3502,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.
Expand Down Expand Up @@ -3578,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')
Expand Down
Binary file modified data/humanoid_library.blend
Binary file not shown.
2 changes: 1 addition & 1 deletion humanoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
24 changes: 12 additions & 12 deletions object_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ 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)
co.shape = (countv, 3)
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)
Expand All @@ -76,7 +76,7 @@ def get_sel():
return dc([co[selv], new_f, nv_Dict])


###############################################################################################################################
##############################################################################
# OBJECT CREATION

#creates new mesh
Expand Down Expand Up @@ -144,7 +144,7 @@ def add_rd_capsule(Name, length, radius, cap_coord, faces, collection):
except:
pass

###############################################################################################################################
##############################################################################
# MATH OPS

#Rotation Matrix
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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):
Expand All @@ -264,7 +264,7 @@ def add_parent(parent, children):



###############################################################################################################################
##############################################################################
# MODIFIER OPS

#Add modifier
Expand Down Expand Up @@ -296,13 +296,13 @@ def new_modifier(obj, name, modifier_type, parameters):
return _new_modifier


###############################################################################################################################
##############################################################################
# ARMATURE OPS

###############################################################################################################################
##############################################################################
# SHAPEKEY OPS

###############################################################################################################################
##############################################################################
# OBJECT OPS


Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 5c336af

Please sign in to comment.