From 24b6c4148eb9aa51224a457b3fce22b807ce9d7a Mon Sep 17 00:00:00 2001 From: Daylily-Zeleen Date: Fri, 13 Dec 2024 17:12:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20DragonBonesArmatureProxy?= =?UTF-8?q?=20=E5=AF=B9=20DragonBonesArmature=20=E7=9A=84=20self=5Fmoduela?= =?UTF-8?q?te=20=E7=9A=84=E6=8E=A7=E5=88=B6=EF=BC=88DragonBonesArmature=20?= =?UTF-8?q?=E6=9C=AC=E8=BA=AB=E4=B8=8D=E8=BF=9B=E8=A1=8C=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dragonbones_armature.cpp | 4 ++-- src/dragonbones_slot.cpp | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/dragonbones_armature.cpp b/src/dragonbones_armature.cpp index e071f0b..3411d2c 100644 --- a/src/dragonbones_armature.cpp +++ b/src/dragonbones_armature.cpp @@ -143,7 +143,7 @@ void DragonBonesArmature::_bind_methods() { // Visibility storage_properties.emplace_back(StoredProperty{ "visible", true }); storage_properties.emplace_back(StoredProperty{ "modulate", Color(1.0, 1.0, 1.0, 1.0) }); - storage_properties.emplace_back(StoredProperty{ "self_modulate", Color(1.0, 1.0, 1.0, 1.0) }); + // storage_properties.emplace_back(StoredProperty{ "self_modulate", Color(1.0, 1.0, 1.0, 1.0) }); // Self modulate 不影响子节点 storage_properties.emplace_back(StoredProperty{ "show_behind_parent", false }); storage_properties.emplace_back(StoredProperty{ "top_level", false }); storage_properties.emplace_back(StoredProperty{ "clip_children", false }); @@ -168,7 +168,7 @@ void DragonBonesArmature::_bind_methods() { DragonBonesArmatureProxy::armature_property_list.emplace_back(PropertyInfo(Variant::NIL, "Visibility", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP)); DragonBonesArmatureProxy::armature_property_list.emplace_back(PropertyInfo(Variant::BOOL, "visible")); DragonBonesArmatureProxy::armature_property_list.emplace_back(PropertyInfo(Variant::COLOR, "modulate")); - DragonBonesArmatureProxy::armature_property_list.emplace_back(PropertyInfo(Variant::COLOR, "self_modulate")); + // DragonBonesArmatureProxy::armature_property_list.emplace_back(PropertyInfo(Variant::COLOR, "self_modulate")); DragonBonesArmatureProxy::armature_property_list.emplace_back(PropertyInfo(Variant::BOOL, "show_behind_parent")); DragonBonesArmatureProxy::armature_property_list.emplace_back(PropertyInfo(Variant::BOOL, "top_level")); DragonBonesArmatureProxy::armature_property_list.emplace_back(PropertyInfo(Variant::INT, "clip_children", PROPERTY_HINT_ENUM, "Disabled,Clip Only,Clip + Draw")); diff --git a/src/dragonbones_slot.cpp b/src/dragonbones_slot.cpp index b9d5d26..49d5015 100644 --- a/src/dragonbones_slot.cpp +++ b/src/dragonbones_slot.cpp @@ -83,10 +83,7 @@ void Slot_GD::_updateColor() { GDOwnerNode *__p_owner = _renderDisplay->p_owner; if (__p_owner) { - __color.a *= __p_owner->get_modulate().a; - __color.r *= __p_owner->get_modulate().r; - __color.g *= __p_owner->get_modulate().g; - __color.b *= __p_owner->get_modulate().b; + __color *= __p_owner->get_modulate(); } _renderDisplay->update_modulate(__color);