6
$\begingroup$

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.

enter image description here

$\endgroup$

1 Answer 1

7
$\begingroup$

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}")
$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.