Skip to content

Commit

Permalink
pass PatcherInstance.index when creating message ports
Browse files Browse the repository at this point in the history
  • Loading branch information
fde31 committed Dec 16, 2024
1 parent 67dc331 commit 6c7f911
Show file tree
Hide file tree
Showing 4 changed files with 1,136 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/actions/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ export const initNodes = (jackPortsInfo: OSCQueryRNBOJackPortInfo, instanceInfo:
const instance = PatcherInstanceRecord.fromDescription(info);
instances.push(instance);
instanceParameters.push(...ParameterRecord.fromDescription(instance.index, info.CONTENTS.params));
instanceMessageInports.push(...MessagePortRecord.fromDescription(info.CONTENTS.messages?.CONTENTS?.in));
instanceMessageOutports.push(...MessagePortRecord.fromDescription(info.CONTENTS.messages?.CONTENTS?.out));
instanceMessageInports.push(...MessagePortRecord.fromDescription(instance.index, info.CONTENTS.messages?.CONTENTS?.in));
instanceMessageOutports.push(...MessagePortRecord.fromDescription(instance.index, info.CONTENTS.messages?.CONTENTS?.out));
}

// Build a list of all Jack generated names that have not been used for PatcherNodes above
Expand Down Expand Up @@ -697,8 +697,8 @@ export const addPatcherNode = (desc: OSCQueryRNBOInstance, metaString: string):
// Create Instance State
const instance = PatcherInstanceRecord.fromDescription(desc);
const parameters = ParameterRecord.fromDescription(instance.index, desc.CONTENTS.params);
const messageInports = MessagePortRecord.fromDescription(desc.CONTENTS.messages?.CONTENTS?.in);
const messageOutports = MessagePortRecord.fromDescription(desc.CONTENTS.messages?.CONTENTS?.out);
const messageInports = MessagePortRecord.fromDescription(instance.index, desc.CONTENTS.messages?.CONTENTS?.in);
const messageOutports = MessagePortRecord.fromDescription(instance.index, desc.CONTENTS.messages?.CONTENTS?.out);

dispatch(setInstance(instance));
dispatch(setInstanceParameters(parameters));
Expand Down
Loading

0 comments on commit 6c7f911

Please sign in to comment.