I’m not entirely sure I understand what the specific goal is here. Nodes in general are self-contained and not intended to be able to edit other nodes. It’s not clear to me if you just want a node that has properties on it (in the details panel) that you can then read from your Execute Script node, or if you’re trying to set default values for Graph User Variables, or if you’re trying to set different default values for other node’s properties (ie: changing the default Output Directory in the Global Output Settings node).
A general overview of the graph is that you can have multiple copies of nodes in the graph, and then at runtime, we “flatten” the graph, giving priority to a property found further downstream (further to the right), based on whether or not the Override checkbox is checked on the left side of a property. So if you want to override an existing node’s values, the intention is that you re-declare that node with a new value and the override checked, and you won’t have to make any edits to the upstream value. It is not designed for nodes to be able to change other node’s properties, and it’s not designed that a node can change the User Variables when added.
The Execute Script node is run once the render starts, and is given a copy of the graph, allowing you to make topology/value changes without worrying about the changes leaking back out to the saved assets. So it is generally recommended that your execute script node is the one who makes alterations to the actual graph at runtime, based on looking up values from either things in the graph, or User Variables.
If you’re just looking to create a new node that has properties in the Details Panel that you can read from your Execute Script node to do further work to the overall graph, you’ll need to use C++ (as Python classes cannot be serialized). You can do this by inheriting from UMovieGraphSettingNode. Please note that the bOverride_ pattern is required for the value to show up in the final flattened graph, ie:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Overrides, meta = (InlineEditConditionToggle))
uint8 bOverride_OutputDirectory : 1;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “File Output”, meta=(EditCondition=“bOverride_OutputDirectory”))
FDirectoryPath OutputDirectory;
The bOverride_ variable name must EXACTLY match the variable name, just with a bOverride_ prefix.
With regard to the get_or_create_variable_overrides, the API for this has improved in the upcoming 5.6 release, and you can now search for nodes by name, so it now looks closer to:
`variable_overrides = my_job.get_or_create_variable_overrides(graph_asset)
variable_overrides.set_value_int32(graph_asset.get_variable_by_name(“TileCount”), tileCount)
variable_overrides.set_variable_assignment_enable_state(graph_asset.get_variable_by_name(“TileCount”), True)
variable_overrides.set_value_float(graph_asset.get_variable_by_name(“OverlapPercentage”), overlapRatio * 100)
variable_overrides.set_variable_assignment_enable_state(graph_asset.get_variable_by_name(“OverlapPercentage”), True)`
The variables that exist inside of the job are separate from the actual graph variables (as they can have their own values that are unique from the defaults set in the Graph), which is why the job has a get_or_create_variable_overrides call, it creates the container that stores a copy of the variables and their values.