I am new to Geometry Nodes and am trying to create an addon using them. I have exposed some settings in the Modifier tab and want to hide the node setup in the Geometry Nodes tab. I do not want people to see the node setup, as they should only use the settings in the Modifier tab. Please help me solve this issue.
1 Answer
$\begingroup$
$\endgroup$
As far as I know, you can't completely hide the node tree—users will always be able to see it. However, you can make it read-only, preventing direct modifications by linking it instead of appending. This can be done manually via File > Link or automatically through your add-on using Python:
import bpy
blend_path = "/path/to/blend-with-node-tree/nodes.blend"
nodetree_name = "<GeometryNodesNodeTreeName>"
bpy.ops.wm.link(
filepath=f"{blend_path}/NodeTree/{nodetree_name}",
directory=f"{blend_path}/NodeTree/",
filename=nodetree_name
)
print(f"Linked NodeTree: {nodetree_name}")
