Skip to content

Bone Slot class setVisible change suggest #187

@namuda

Description

@namuda

void Bone::setVisible(bool value)
{
if (_visible == value)
{
return;
}
_visible = value;
for (const auto & slot : _armature->getSlots())
{
if (slot->getParent() == this)
{
slot->_updateVisible();
}
}
}

void Slot::setVisible(bool value)
{
if (_visible == value)
{
return;
}
_visible = value;
_updateVisible();
}

void CCSlot::_updateVisible()
{
_renderDisplay->setVisible(_parent->getVisible()); // Only the visible state of the bone is used.
}

-- suggest
Bone class
void Bone::setVisible(bool value)
{
if (_visible == value)
{
return;
}
_visible = value;
for (const auto & slot : _armature->getSlots())
{
if (slot->getParent() == this)
{
slot->setVisible(_visible); //Change:Apply to bone sub-slot visible state
slot->_updateVisible();
}
}
}

CCSlot class
void CCSlot::_updateVisible()
{
_renderDisplay->setVisible(getVisible());//Change:Apply slot visible state
}

The existing setVisible() function can not apply the visible state on a slot by itself.
I hope you can use both the slot and the visible state of the bone.
I would like to be able to use both the slot and bone visible states.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions