mirror of
https://github.com/leozide/leocad
synced 2025-01-29 20:34:50 +01:00
Fixed first key frame being overwritten when loading a file. Fixes #191.
This commit is contained in:
parent
9862d5c59e
commit
35eb41217a
1 changed files with 4 additions and 5 deletions
|
@ -30,9 +30,6 @@ lcPiece::lcPiece(PieceInfo* Info)
|
|||
mGroup = nullptr;
|
||||
mFileLine = -1;
|
||||
mPivotMatrix = lcMatrix44Identity();
|
||||
|
||||
ChangeKey(mPositionKeys, lcVector3(0.0f, 0.0f, 0.0f), 1, true);
|
||||
ChangeKey(mRotationKeys, lcMatrix33Identity(), 1, true);
|
||||
}
|
||||
|
||||
lcPiece::lcPiece(const lcPiece& Other)
|
||||
|
@ -390,8 +387,10 @@ void lcPiece::Initialize(const lcMatrix44& WorldMatrix, lcStep Step)
|
|||
{
|
||||
mStepShow = Step;
|
||||
|
||||
ChangeKey(mPositionKeys, WorldMatrix.GetTranslation(), 1, true);
|
||||
ChangeKey(mRotationKeys, lcMatrix33(WorldMatrix), 1, true);
|
||||
if (mPositionKeys.IsEmpty())
|
||||
ChangeKey(mPositionKeys, WorldMatrix.GetTranslation(), 1, true);
|
||||
if (mRotationKeys.IsEmpty())
|
||||
ChangeKey(mRotationKeys, lcMatrix33(WorldMatrix), 1, true);
|
||||
|
||||
UpdatePosition(Step);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue