mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-29 03:33:48 +00:00
AnimationEditor: support copy absolute bone scale to clipboard
This commit is contained in:
parent
a1037091ad
commit
83e3739340
1 changed files with 12 additions and 0 deletions
|
@ -209,6 +209,18 @@ void AnimationEditor::resetScaleOrSave()
|
|||
|
||||
if (core->getCtrlState())
|
||||
saveFile();
|
||||
else if(core->getAltState() && editingBone)
|
||||
{
|
||||
Vector scale(1,1);
|
||||
Bone *b = editingBone;
|
||||
do
|
||||
scale *= b->scale;
|
||||
while( (b = dynamic_cast<Bone*>(b->getParent())) ); // don't want to get entity scale; that's what the anim editor uses for zooming
|
||||
std::ostringstream os;
|
||||
os << scale.x;
|
||||
if(!SDL_SetClipboardText(os.str().c_str()))
|
||||
dsq->screenMessage("Scale copied to clipboard");
|
||||
}
|
||||
else
|
||||
editSprite->scale = Vector(1,1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue