Hi,
I try to create my first own texture node. For this node I need an array of textures as input. I had a look into the mtlMulti and tried to use the same parameters like this:
The "Color1" and "Color2" attributes appear in maya if I load the shader from the Create menu. But there is no sign of a list parameter.
Any idea whats wrong in this code?
I try to create my first own texture node. For this node I need an array of textures as input. I had a look into the mtlMulti and tried to use the same parameters like this:
Code:
struct MegaTex_Params: VRayParameterListDesc { MegaTex_Params(void) { // Add the parameters addParamTexture("Col1"); addParamColor("Col2",Color(1.0f,0.0f,0.0f)); addParamPlugin("TextureList", EXT_TEXTURE, 0, "A list of textures."); } }; class MegaTex: VRayTexture { MegaTex(VRayPluginDesc *pluginDesc):VRayTexture(pluginDesc) { // Set parameter caches paramList->setParamCache("Col1", &col1); paramList->setParamCache("Col2", &col2); paramList->setParamCache("TextureList", &txtPlugins); } void renderBegin(VR::VRayRenderer *vray); void renderEnd(VR::VRayRenderer *vray); void frameBegin(VR::VRayRenderer *vray); void frameEnd(VR::VRayRenderer *vray); AColor getTexColor(const VRayContext &rc); void getTexColorBounds(AColor &cmin, AColor &cmax); Vector getColorBumpGradient(const VRayContext &rc); PluginBase* getPlugin(void) { return (PluginBase*) this; } private: // Cached parameters TextureInterface *col1; TextureInterface *col2; VRayPluginList txtPlugins; ShadeCache<AColor, true, false> shadeCache; }; ..... ...
Any idea whats wrong in this code?
Comment