@gmetrixr/rjson
Version:
(R)ecursive Json
23 lines (22 loc) • 850 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const r_1 = require("../../../r");
/**
* Renames scene properties
* scene_yaw_correction -> scene_yaw_start
* scene_pitch_correction -> scene_pitch_start (this property is kept for older projects,
* get handled via runtime migration to PointTo rule)
*/
class Migration {
execute(projectJson) {
const pJson = projectJson;
const projectF = r_1.r.record(pJson);
for (const e of projectF.getAllDeepChildren(r_1.RT.scene)) {
r_1.r.record(e).changePropertyName("scene_yaw_correction", "scene_yaw_start");
r_1.r.record(e).changePropertyName("scene_pitch_correction", "scene_pitch_start");
}
projectF.set(r_1.rtp.project.version, 123);
}
}
const migration = new Migration();
exports.default = migration;