INNER CODE UNIT · Python
i
apistol78/traktor · scripts/generate-node-emitter-capture.py:65
i = k + 1
return funcs
def extract_registrations(text):
"""Return { node_type_short_name: function_name } from the emitter map."""
reg = re.compile(
r"m_emitters\[\s*&\s*type_of<\s*(\w+)\s*>\(\)\s*\]\s*=\s*new\s+EmitterCast<\s*\w+\s*>\(\s*(\w+)\s*\)"
)
mapping = {}
for m in reg.finditer(text):
mapping[m.group(1)] = m.group(2)
return mapping
def summarize(body):
"""Best-effort one-line GLSL expression for a node, or None if not cleanly
expressible. Reconstructs the single `assign(f, out) << ...;` statement,