modified default value grid_idx in set_node

default value of grid_idx is now -1 so that not setting a grid_idx in set_node applies the node_type to all grids