修复动画问题
This commit is contained in:
@@ -1348,6 +1348,26 @@ bool ProjectWorkspace::setEntityImageFrame(const QString& id, int frame, const Q
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ProjectWorkspace::setEntityImageFramePath(const QString& id, int frame, const QString& relativePath) {
|
||||
if (m_projectDir.isEmpty() || id.isEmpty() || frame < 0) {
|
||||
return false;
|
||||
}
|
||||
const QString rel = relativePath.trimmed();
|
||||
if (rel.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
auto ents = m_project.entities();
|
||||
bool found = false;
|
||||
for (auto& e : ents) {
|
||||
if (e.id != id) continue;
|
||||
found = true;
|
||||
upsertFrame(e.imageFrames, frame, rel);
|
||||
break;
|
||||
}
|
||||
if (!found) return false;
|
||||
return applyEntities(ents, true, QStringLiteral("插入关键帧(图像)"));
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
bool removeLocationKeyAtFrame(QVector<Project::Entity::KeyframeVec2>& keys, int frame) {
|
||||
|
||||
Reference in New Issue
Block a user