Input parameters from Blender Geometry Nodes are automatically placed on the “Geometry Nodes” modifier panel in the “Properties” window on the modifier tab. However, this tab is not always open, and it is not always convenient to switch to it to adjust values. For quick access to the input parameters of Geometry Nodes, we can duplicate them on the custom panel in the 3D Viewport window.
To transfer the value from the required input of any Geometry Nodes node to the modifier panel, we need, like in shader groups, to drag the link from the parameter to the empty circle of the Geometry Input node.
When a link is created, the parameter is automatically transferred to the modifier’s panel.
If hover over a parameter in the modifier panel, we can notice that this parameter is created as a simple dynamic property for the “modifier” object under the name “Input_3” (the number will be different for different parameters).
We can show the dynamic object’s properties on the custom UI panel through the API.
For the “Input_3” Geometry Nodes parameter, the code to show it on the custom UI panel will be the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
class GN_PT_panel(Panel): bl_idname = 'GN_PT_panel' bl_label = 'Geometry Nodes' bl_space_type = 'VIEW_3D' bl_region_type = 'UI' bl_category = 'GN' def draw(self, context): self.layout.prop( data=context.active_object.modifiers['GeometryNodes'], property='["Input_3"]', text='Scale' ) |
After registering this panel in the Blender API, this parameter will always be easily accessible from the 3D Viewport window.
* .blend file with an example of showing the Geometry Nodes parameters on a custom UI panel.
how do we set min & max values for this example?
For current Blender version 4.1 this should be: