| 479 | } |
| 480 | |
| 481 | Ref<Script> VisualShaderGraphPlugin::get_node_script(int p_node_id) const { |
| 482 | if (!links.has(p_node_id)) { |
| 483 | return Ref<Script>(); |
| 484 | } |
| 485 | |
| 486 | Ref<VisualShaderNodeCustom> custom = Ref<VisualShaderNodeCustom>(links[p_node_id].visual_node); |
| 487 | if (custom.is_valid()) { |
| 488 | return custom->get_script(); |
| 489 | } |
| 490 | |
| 491 | return Ref<Script>(); |
| 492 | } |
| 493 | |
| 494 | void VisualShaderGraphPlugin::register_default_input_button(int p_node_id, int p_port_id, Button *p_button) { |
| 495 | links[p_node_id].input_ports.insert(p_port_id, { p_button }); |
no test coverage detected