Cleanup Vertex Groups 余計なVertaxGroupをお掃除してくれるアドオン

ウェイトペイントで役だつ地味なアドオンをつくりました。
アーマチュアに自動ウェイトで関連付けたときにできてしまう余計なVertaxGroupを削除してくれるアドオンです。


 

You can cleanup unnecessary Vertex Groups by this add-on.
When you will set parent to armature deform with automatic weights, you will set up also unnecessary Vertex Groups.
These unnecessary Vertex Groups makes too hard to paint weights in weight paint mode.
This add-on can correspond to mirror modifier, Left and Right.

 

 

 

Download
https://github.com/12funkeys/Cleanup-Vertex-Groups

 


 

自分メモ:

今回ハマったところ

Python−matchやsearchでマッチしなかった時
http://sookibizviz.blog81.fc2.com/blog-entry-1737.html

m.group()はNoneを返すこと。

 

blenderのflip_nameを名前だけ取得できなくて、結局力技で正規表現検索と置換で対応。正規表現にまだ慣れない。
flip_nameの説明
https://www.blender.org/manual/rigging/armatures/editing/properties.html

(nothing): handLeft –> handRight (大文字、小文字OK)※L/Rだけでは判別しない
_ (underscore): Hand_L –> Hand_R Left/Right(大文字、小文字OK)
. (point): hand.l –> hand.r Left/Right(大文字、小文字OK)
– (dash): Foot-l –> Foot-r
” ” (space): pelvis LEFT –> pelvis RIGHT L/R(大文字、小文字OK)
L_(大文字、小文字OK)
.001などの連番が続く場合がある末尾の連番(.001)は反転先にないと省略される
_LEFT_や_L_など文字列中のは無理っぽい
_Lの前にspaceがあっても反転される

 

 

addonカテゴリの記事

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です