I wanted to understand the logic behind the rotation planes, having no idea what to manually set them to, so I drilled deep into makehuman\shared\skeleton.py in the source code.
Internally, the rotation_plane is used to set the Bone.roll property. But from my reading of the code, it looks like none of the functions that use Bone.roll are used anywhere.
(and even if they were, the default value for roll is 0, so it shouldn't hurt anything to leave it empty, anyway. )
Or at least not in skeleton.py; one of those functions may still be used somewhere else in the code.
Some of the notes I made for myself while studying skeleton.py:
- Code: Select all
Class Bone:
One of the arguments for the Bone constructor is roll, where the default argument is also 0.
Some places where the Bone.roll property is used:
Skeleton.addReferencePlanes._remap_plane_strategy_[numbers 1-3]
These strategies use the Bone.roll property.
The Skeleton.plane_map_strategy property is used to determine the strategy here.
But addReferencePlanes() is not called anywhere.
Skeleton.scaled
This method is only used in Skeleton.clone
This method is only used in Skeleton.createFromPose
This method is not used anywhere.
Bone.get_normal
Used in Bone.build
this function passes get_normal() to a variable which is only used to pass into getMatrix (which may also perform an action) and assign a value to matRestGlobal
matRestGlobal determines matRestRelative, and the other way around.
matPoseGlobal and matRestGlobal determine matPoseVerts
matPoseVerts is used in Bone.skinMesh
skinMesh is not used anywhere
edit: the list of planes is also loaded from the mhskel, but planes are also only used in addReferencePlanes()
edit2: From plugs\3_libraries_skeleton\skeletonlibrary.py, which creates/uses a skeleton object:
- Code: Select all
# Remap bone orientation planes from reference rig
skel.addReferencePlanes(self.referenceRig) # Not strictly needed for the new way in which we determine bone normals
edit3: addReferencePlanes is definitely used, as it can display its warning, "No normal found for bone %s: no reference bones and could not map implicitly by name", in makehuman.
edit4: wait, crap, that's wrong, that error message is from _get_normal.