I had some free time and did a node around the API command, mainly to practice my python skills.
At the moment it should work for 2d and 3d textures only.
I still need to find how to connect a shadingGroup to make it work with these too.
There are a lot of attributes, but only some of them are usefull for 2d/3d textures:
inColor: connect your 2d/3d texture output in there
for 3d textures only:
inPoint: this is the XYZ coords of the point to be sampled
refPoint: this is the XYZ coords of reference point (like a texture reference object)
for 2d textures only:
inUCoord/inVCoord: UV coords to be sampled
The result is sent to: [i]outColorR,outColorG,outColorB
[/i]Other attributes are for shadingGroup evalution and don’t work at the moment…
This is a python plugin, to use it, just copy it in one of your plug-in directory and load it as any other plugin. Or use use the “browse” button in the plugin manager to locate the file and load it.
Once loaded (hopefully without error messages :)) you can either source the included mel script this will create a simple test scene (a locator position driver by a ramp).
or just type “createNode pypl_colorAtPointNode” to create a new node…
Now for the bad side, I don’t know if it will be faster than the colorAtPoint MEL command… But well, this is a new toy to play with
Feel free to comment or suggest new things, I will upload new versions here too.
PS: this hasn’t been tested very much and could break at any moment, you’ve been warned!