How to draw Inputs from Geometry nodes modifier in a panel I am trying to draw the inputs of the Geometry Nodes modifier to a panel, and I tried doing this
import bpy
from bpy.types import (Panel)

class DRAW_PT_ModInputs(Panel):
    bl_label = &quot;Draw Modifier Inputs&quot;
    bl_idname = &quot;DRAW_PT_ModInputs&quot;
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = &quot;scene&quot;

    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.label(text = &quot;Geometry Node inputs here&quot;)
        row = layout.row()
        GeoNodesModifier = context.active_object.modifiers.get(&quot;GeometryNodes&quot;)
        if GeoNodesModifier:
            row.prop(GeoNodesModifier.Input_5, &quot;Density Max&quot;, text=&quot;Density&quot;)
        
        
 

classes = [DRAW_PT_ModInputs]   

def register():
    for cls in classes:
        bpy.utils.register_class(cls)



def unregister():
    for cls in classes:
        bpy.utils.register_class(cls)

if __name__ == &quot;__main__&quot;:
    register()

       

and that gave me error AttributeError: 'NodesModifier', object has no attribute 'Input_5' and in another attempt I tried this row.prop(GeoNodesModifier['Input_5'], &quot;Density Max&quot;, text=&quot;Density&quot;) but this is also not working and it gives error -
TypeError: UILayout.prop(): error with argument 1, &quot;data&quot; -  Function.data expected a AnyType type, not float

and this is how my Geometry Nodes Modifier looks like -

and this is my Geometry Node tree -

I needed help regarding drawing the inputs from the Geometry Nodes modifier in my customized panel.
Thanks in advance!
The modifier input value is treated like a custom property.
If you right click over the data field in the modifier and select &quot;copy datapath&quot;, pasting will reveal
modifiers[&quot;GeometryNodes&quot;][&quot;Input_5&quot;]

Indicating it is a custom propoerty of the modifier named &quot;Input_5&quot;.  A custom property naeed &quot;prop&quot; on object ob is shown in UI as
UILayout.prop(ob, '[&quot;prop&quot;]')

Hence in this case.
    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.label(text = &quot;Geometry Node inputs here&quot;)
        row = layout.row()
        gm = context.active_object.modifiers.get(&quot;GeometryNodes&quot;)
        if gm:
            row.prop(gm, '[&quot;Input_5&quot;]',  text=&quot;Density&quot;)
        

Note
Check out the style guide under which the modifier instance variable would be named akin to geom_modifier (I like using gm to reduce the verbosity) Camel case is used for class names. A variable named GeoNodesModifier will consistently be a type in any official blender UI code