Skip to content

Commit

Permalink
移除 DragonBonesArmatureProxy 对 DragonBonesArmature 的 self_moduelate 的控…
Browse files Browse the repository at this point in the history
…制(DragonBonesArmature 本身不进行渲染)
  • Loading branch information
Daylily-Zeleen committed Dec 13, 2024
1 parent 18aa921 commit 24b6c41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/dragonbones_armature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand All @@ -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"));
Expand Down
5 changes: 1 addition & 4 deletions src/dragonbones_slot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 24b6c41

Please sign in to comment.