Fix #139666: Grease Pencil: Fix modifier type when getting defgroup names
Previously `get_bone_deformed_vertex_group_names` checkes for regular mesh armature modifier type instead of the one specific to grease pencil and this caused it to always return empty defgroup name list, renders auto-normalize ineffective downstream. Now corrected to using `GreasePencilArmatureModifierData`. Pull Request: https://projects.blender.org/blender/blender/pulls/139706
This commit is contained in:
@@ -52,16 +52,17 @@ Set<std::string> get_bone_deformed_vertex_group_names(const Object &object)
|
||||
ModifierData *md = BKE_modifiers_get_virtual_modifierlist(&object, &virtual_modifier_data);
|
||||
for (; md; md = md->next) {
|
||||
if (!(md->mode & (eModifierMode_Realtime | eModifierMode_Virtual)) ||
|
||||
md->type != eModifierType_Armature)
|
||||
md->type != eModifierType_GreasePencilArmature)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ArmatureModifierData *amd = reinterpret_cast<ArmatureModifierData *>(md);
|
||||
if (!amd->object || !amd->object->pose) {
|
||||
GreasePencilArmatureModifierData *gamd = reinterpret_cast<GreasePencilArmatureModifierData *>(
|
||||
md);
|
||||
if (!gamd->object || !gamd->object->pose) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bPose *pose = amd->object->pose;
|
||||
bPose *pose = gamd->object->pose;
|
||||
LISTBASE_FOREACH (bPoseChannel *, channel, &pose->chanbase) {
|
||||
if (channel->bone->flag & BONE_NO_DEFORM) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user