How To Get Texture Object inside Actor class?

I am writing a Toon Cg shader for Panda.
So, I need to get Texture Object directly from Actor Object to make the process be more gerneral.

I found that “getTexture” and “hasTexture” function didn’t work at all.
But, the told me that there is a TextureAttrib with GeomNode in the bottom level. I have tried to get it from the bottom level GeomObject too but it still didn’t work.

Any Idea?

The getTexture() and hasTexture() calls are used to query textures that have been set on this particular node, and do not traverse to child nodes.

Use findTexture() or findAllTextures() to get the texture(s) from a GeomNode below this node. Note that there might be multiple textures; if you just want the first one, use findTexture("*").