Particle index/Custom node bug ?

Hi all ! I’m trying to learn python scripting by playing around with some simple scripts. I have a plane mesh with a hair particle system where the hairs are rendered with a group of long thin cubes (cube group). When the material is assigned to the cube group using particle info node, I get the below render in viewport. The white long thin cube belongs to particle index 0 while the rest are blue, ie, with indices > 0. This is performing correctly.

When I wrote a simple custom node to read the particle index and send it straight to output, the viewport render shows all white cubes, ie, the nodesocket is reading 0.0 and outputting 0.0 as well.

I’ve checked nodesocket properties and stuff but can find no differences. :frowning: Blend file attached, appreciate if anyone can explain what’s going on ? Or is node sockets for duplicate instance objects different from those available from python ?

Well, think I’ve figured it out. The custom node isn’t built to read data from cycles nodes. Gonna try smthg else. Forum admin, pls lock this thread, thanks.