operator draw() method in Node Editor I am creating a script that creates node in the node editor. I need to accept some properties from the user after creating the node. So I wrote a draw method.
But looks like operator.draw is not being called when the context is the node editor. I have put a print statement inside draw(self, context) to verify this. If I change the space type to 'VIEW_3D', the draw method is called.
Is the operator draw method only available in 3d view?
Edited with example:
In example below the message &quot;inside op draw&quot; is called on click of panel in 3d view not in node view:
import bpy

bl_info = {
    'name': 'test node editor op',
    'category': 'Object',
    'blender': (2, 80, 0),
}

class my_op(bpy.types.Operator):
    bl_idname = 'object.test_op'
    bl_label = 'test node op'
    bl_options = {'REGISTER', 'UNDO'}

    x : bpy.props.FloatProperty(name='X')
    y : bpy.props.FloatProperty(name='Y')

    def execute(self, context):
        if(context.area.type == 'VIEW_3D'):
            bpy.ops.mesh.primitive_cube_add(enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))
            bpy.context.object.location.x=self.x
            bpy.context.object.location.y=self.y            
        else:
            if(bpy.context.active_object!=None):
                if(bpy.context.active_object.active_material == None):
                    m=bpy.data.materials.new('my material')
                    bpy.context.active_object.data.materials.append(m)
                bpy.context.active_object.active_material.use_nodes = True
                n = bpy.context.active_object.active_material.node_tree.nodes.new('ShaderNodeValue')
                n.location = (self.x, self.y)
        
        return {'FINISHED'}

    def draw(self, context):
        print('inside op draw')
        col = self.layout.column()
        col.prop(self, 'x')
        col.prop(self, 'y')
        
class simple_3dview_panel(bpy.types.Panel):
    bl_label = 'simple 3d'
    bl_idname = 'simple_3d_panel'

    bl_space_type = 'VIEW_3D'

    bl_region_type = 'UI'
    bl_category = 'My View 3D Panel'

    def draw(self, context):
        col = self.layout.column()
        col.operator('object.test_op')

class simple_node_panel(bpy.types.Panel):
    bl_label = 'simple node'
    bl_idname = 'simple_node_panel'

    bl_space_type = 'NODE_EDITOR'

    bl_region_type = 'UI'
    bl_category = 'My Node Panel'

    def draw(self, context):
        col = self.layout.column()
        col.operator('object.test_op')

def register():
    bpy.utils.register_class(my_op)
    bpy.utils.register_class(simple_node_panel)
    bpy.utils.register_class(simple_3dview_panel)

def unregister():
    bpy.utils.unregister_class(simple_node_panel)
    bpy.utils.unregister_class(simple_3dview_panel)
    bpy.utils.unregister_class(my_op)

if(__name__ == '__main__'):
    register()
```
Yes, you are right. The operator draw method is only available in 3d view and not in node editor.