-
Notifications
You must be signed in to change notification settings - Fork 18
Semiautomatic Weight Transfer
The following script will convert the listed weight groups on each selected mesh into a weight group that has the Bone Function ID provided by the mapping. Bone Function ID tables can be found here. Script thanks to AsteriskAmpersand.
Modify the namelist variable to include the weight group names from your model and the function id they should be mapped to.
import bpy
def weightMod(object, mhwGroup, sourceGroup):
name = "%s - %s"%(mhwGroup,sourceGroup)
#"Bone."+str(int(mod.name.split(".")[1])+7)+".000"
m = object.modifiers.new(name = name, type = "VERTEX_WEIGHT_MIX")
if mhwGroup not in object.vertex_groups:
object.vertex_groups.new(mhwGroup)
m.vertex_group_a = mhwGroup
m.vertex_group_b = sourceGroup
m.mix_mode = "ADD"
m.mix_set = "OR"
name_list = {
"Head Head":4,
"Body Extra Spine2":4
}
emptyNames = {}
for obj in [sel for sel in C.scene.objects if sel.type == "EMPTY"]:
if "boneFunction" in obj:
emptyNames[obj["boneFunction"]] = obj.name
for obj in [sel for sel in C.scene.objects if sel.type == "MESH"]:
v_groups = obj.vertex_groups
for n in name_list:
if n in v_groups and name_list[n] in emptyNames:
weightMod(obj, emptyNames[name_list[n]], v_groups[n].name)
For example, let's say I want to convert "Head Head" and "Body Extra Spine2" to a single group, and I want it to be the one used by the Head (bone function 04)
name_list = {
"Head Head":4,
"Body Extra Spine2":4
}
You need to have a world skeleton already present. The script will look on the skeleton what bone has the boneFunctionID of 4 and will rename the two groups above to the bone that has that function ID (in this case it was Bone.002). It does that by creating the WeightMixModifiers.
General Tutorials
Animation Tutorials
Audio Tutorials
File & In Game IDs
- Accessory and Specialized Tool IDs (Asset)
- Armor IDs (Asset)
- Decorations IDs
- EFX IDs
- Endemic Critter IDs (Asset)
- Face IDs (Asset)
- Furniture IDs (Asset)
- Gimmick IDs (Asset)
- Hairstyle IDs (Asset)
- Item IDs
- LMT IDs
- Material IDs
- Medal IDs
- Model Bone Function IDs
- Monster IDs
- Monster Shell IDs (A-P)
- Monster Shell IDs (Q-Z)
- NPC IDs (Asset)
- NPC Base Model (Asset)
- Palico Equipment IDs (Asset)
- Pendant IDs (Asset)
- Poogie Clothes IDs
- Quest IDs
- Skill IDs
- Stage IDs (Asset)
- Player Weapon Action IDs
- Weapon IDs (Asset)
- Weapon ID Dump (GS,SnS,DB)
- Weapon ID Dump (LS,Ham,HH)
- Weapon ID Dump (Lan,GL)
- Weapon ID Dump (SA,CB)
- Weapon ID Dump (Bow,HBG,LBG)
Model Tutorials
- Quick Guide to Importing Models (Blender 2.79)
- Walkthrough of a Weapon Import
- Basics of Exporting Into the .mod3 Format
- How To Fix UVs Sharing a Seam
- How To Separate Mesh Parts in Blender
- Rotating, Moving and Resizing in Blender
- How to Split a Single Mesh Outfit into Player Equippable Parts
- Jigglebone Chains (.ctc) and Colliders (.ccl)
- Axial CTC Rotations
- Editing Hair Models and Materials
- Useful Blender Scripts
- [external page] How to Make All Polygons Into Triangles (Required for MHW models)
- [external page] How to Convert Triangles Back Into Quads
- [external page] How to Change The View-port clipping Parameters For Large Models
- [external page] How to Set Origin to Vertex in Edit Mode
- [external page] Shortcut to repeat the last operation in Blender
- [external page] Transferring Rig Weights From One Mesh To Another
- [external page] How to Copy Paint Weights From One Object to Another
- [external page] How to Remove All Zero-Weight Vertex Groups
- [external page] How to Weight Paint Against Current Pose
- [external page] Making a Hair Rig
- [external page] Physics Transfer
EFX Tutorials
FSM Editing
MRL3 Tutorials
NPC Editing
Plugins and Memory Editing
Monster AI Editing
General Texture Tutorials
- Obtaining, Converting and Replacing Textures
- Textures with Paint NET
- How To Open DDS Files
- Editing Textures
- Understanding Alpha Channels
- Exporting Textures with Transparency
- How To Achieve Glass Texture
- How to create Crystal materials with Alpha Textures
- Working Around the Mip Map Loading Bug
- [external page] Extracting a UV Layout
Specific Texture Tutorials
Asterisk's Plugin Notes
Miscellaneous Tutorials
Outdated Tutorials
- How to Make an NPC Skin Material Support Skin Color Customization
- Plugin Comparison
- A Theoretical Proposal on Skeleton Extension
- Monster Hunter World Save Editor Tutorial
- Making Copies of a Save Slot
- Making a Green Screen
- Notes on CTC Physics Jiggle Files
- Opening MRL3 file with a template
- Transferring MRL3 Files Between Models
- Expanding mrl3 Reference List
- How to Edit Eye Color in mrl3 Files