MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_node_script

Method get_node_script

editor/shader/visual_shader_editor_plugin.cpp:481–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481Ref<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
494void 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 });

Callers 2

_update_custom_scriptMethod · 0.80
_resources_removedMethod · 0.80

Calls 3

hasMethod · 0.45
is_validMethod · 0.45
get_scriptMethod · 0.45

Tested by

no test coverage detected