import type { NodeDef } from '../../NodeRegistry'; import { asString } from '../../values'; import { obj, str } from '../shared'; export const ObjectByName: NodeDef = { type: 'ObjectByName', label: 'Object by name', category: 'data', description: 'Finds a scene object by its name. The name is an input, so it can be put together at runtime ' + '("cell" + index).', inputs: [str('name')], outputs: [obj('object')], params: [], run: (ctx, inputs) => ({ outputs: { object: ctx.findByName(asString(inputs.name)) } }), };