Skip to content

Commit

Permalink
plugin - set default fur_width weight
Browse files Browse the repository at this point in the history
  • Loading branch information
HENDRIX-ZT2 committed Feb 22, 2024
1 parent aaf4488 commit d31ad8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions plugin/utils/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
FUR_FIN = "_fur_fin"
FUR = "_fur"
FUR_SHELL = "_fur_shell"
FUR_VGROUPS = ("fur_length", "fur_width", "fur_clump")
# 0.156 for PZ
FUR_VGROUPS = {"fur_length": 0.5, "fur_width": 0.187508, "fur_clump": 0.5}


def add_vgroup(ob, group_name, weight):
Expand All @@ -31,8 +32,8 @@ def add_hair():
logging.info(f"Adding hair to {base_ob.name}")
assert base_ob.users_collection[0].name.endswith("_L0"), f"Make sure that {base_ob.name} is in the _L0 collection"
# add vertex groups
for vgroup_name in FUR_VGROUPS:
add_vgroup(base_ob, vgroup_name, 0.5)
for vgroup_name, vgroup_weight in FUR_VGROUPS.items():
add_vgroup(base_ob, vgroup_name, vgroup_weight)
# add vcol layer
base_me.attributes.new(f"RGBA{0}", "BYTE_COLOR", "CORNER")
base_mat = base_me.materials[0]
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1e509c694 - Thu Feb 22 20:29:12 2024 +0100
aaf44887f - Thu Feb 22 23:17:08 2024 +0100

0 comments on commit d31ad8b

Please sign in to comment.