rename_function_parameter
Rename a Blueprint function parameter and register a redirect so call-site pins update, preventing orphaned old pins that silent compiles can miss.
Instructions
Rename a PARAMETER of a Blueprint function graph -- the parameter counterpart of rename_bp_variable, and the only headless way to do it: add_function_parameter only ADDS, there is no remove_function_parameter, so "delete and re-add" is not even available. It renames the pin on the Entry node and on EVERY Result node of the graph, and registers a CoreRedirect so that call sites re-map themselves. That redirect is not a nicety: it is what stops this from being a PHANTOM PIN FACTORY. With the redirect, the call site's pin takes the new name AND KEEPS ITS LITERAL VALUE; renamed WITHOUT one, the old pin stays alive and ORPHANED on the caller. WARNING: that orphan is silent: it survives compiles that report num_errors:0 -- so compile_blueprint is NOT the oracle here. The oracle is get_graph_nodes(compact=false) on the callers, checking that NO pin still carries the old name. The redirect matches on Class.Function.Param, so it reaches callers that merely CALL the function (K2Node_Message included) without implementing its interface, and dependents that are not even loaded -- both of which rename_bp_variable cannot reach. It does NOT rename anything that names the parameter as TEXT (a DataTable cell, a saved game, Python). Run compile_blueprint afterwards and save_asset on this Blueprint AND on every caller. AND THE COMPILE IS NOT THE END OF IT: what reaches the .uasset is UserDefinedPins, not the EdGraphPins you read back -- a rename checked only on the latter can report renamed:true, compile at num_errors:0, be saved and COMMITTED, and still come back as the OLD name the next time the editor starts. So it also reports entry_user_pins_after/result_user_pins_after (the serialized side, legitimately EMPTY on an interface-override graph) and refuses to claim success while any UserDefinedPin still carries the old name. The end-to-end oracle is still disk: save_asset -> reload_asset_package -> get_function_pins.
Returns: { blueprint_name, function_name, old_name, new_name, renamed: bool, terminals_renamed: [string], entry_pins_after: [string], result_pins_after: [string], entry_user_pins_after: [string], result_user_pins_after: [string], redirect_registered: string, redirect_persisted_to: string|null, referencers_loaded: [string], must_compile_and_save: [string], warning: string } -- the *_user_pins_after pair is the SERIALIZED side (UserDefinedPins): empty on an interface-override graph is normal, but the old name appearing there is the rename that will revert on restart.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Optional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk. | |
| new_name | Yes | New parameter name. Must be free on the terminal nodes; a collision is refused up front via the engine's own dry-run, before anything is touched. | |
| old_name | Yes | Current parameter name, matched on the Entry node and on every Result node. A name present on only one of them is fine. | |
| function_name | Yes | Name of the function graph (an interface's own function graph and an interface-override graph both work). | |
| blueprint_name | No | Blueprint asset name or path owning the function graph. | |
| blueprint_path | No | Alias of `blueprint_name` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `blueprint_name`. | |
| write_redirect | No | Optional bool (default true). Also PERSIST the redirect as a +PropertyRedirects line in Config/DefaultEngine.ini, so it survives a restart and reaches the other machine. With false the redirect is registered in memory only and the rename EVAPORATES for anyone who opens the project later. | |
| load_referencers | No | Optional bool (default true). Load the Blueprints the Asset Registry lists as referencers BEFORE renaming, so their nodes reconstruct in this session instead of the next one. |