props
This commit is contained in:
@@ -69,6 +69,24 @@ test('metadata-only playback stages remain editable and survive definition expor
|
||||
assert.equal(h.analysis.stages.length, 1);
|
||||
});
|
||||
|
||||
test('prop tool metadata survives generator export including reused-stage overrides', () => {
|
||||
const h = createHarness();
|
||||
h.project.animationdirector_animdef_definitions = JSON.stringify({ test_animation: {
|
||||
actors: [{label:'player',entity_types:['minecraft:player'],prop_right:'minecraft:carrot'},
|
||||
{label:'wolf',entity_types:['minecraft:wolf'],prop_floor:'minecraft:stone'}],
|
||||
stages: [{stage:1,props:{player:{prop_left:'minecraft:stick'}}},
|
||||
{stage:2,use_stage:1,props:{player:{prop_right:null},wolf:null}}],
|
||||
} });
|
||||
const dialog=h.open(); dialog.onConfirm(defaults(dialog.form));
|
||||
assert.deepEqual(h.errors,[]);
|
||||
const def=h.exports[0];
|
||||
assert.equal(def.actors[0].prop_right,'minecraft:carrot');
|
||||
assert.equal(def.actors[1].prop_floor,'minecraft:stone');
|
||||
assert.equal(def.stages[0].props.player.prop_left,'minecraft:stick');
|
||||
assert.equal(def.stages[1].props.player.prop_right,null);
|
||||
assert.equal(def.stages[1].props.wolf,null);
|
||||
});
|
||||
|
||||
test('generates extended animdef fields and restores them on reopen', () => {
|
||||
const harness = createHarness();
|
||||
const dialog = harness.open();
|
||||
|
||||
Reference in New Issue
Block a user