# Shading networks: Can't use vray textures and plugins in mel scripts

**URL:** <https://forums.chaos.com/t/shading-networks-cant-use-vray-textures-and-plugins-in-mel-scripts/48360>\
**Category:** General\
**Created:** [January 15, 2014, 1:28pm UTC](https://forums.chaos.com/t/shading-networks-cant-use-vray-textures-and-plugins-in-mel-scripts/48360 "2014-01-15T13:28:24Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![t.petrov](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@t.petrov](https://forums.chaos.com/u/t.petrov)\
**Post date:** [January 17, 2014, 2:16pm UTC](https://forums.chaos.com/t/shading-networks-cant-use-vray-textures-and-plugins-in-mel-scripts/48360/10 "2014-01-17T14:16:00Z")

</div>

Just use the function below in your own scripts instead of vrayCreateNodeFromDll.

```auto

global proc string bertjenkins_vrayCreatePluginTexture(string $nodeName, string $pluginType, int $placement) {
	string $node = `shadingNode -asTexture -name $nodeName VRayPluginNodeTex`;
	vray addAttributesFromDll $node "texture" $pluginType;
	evalDeferred ("vrayCreateNodeFromDll_connectUVW "+$node +" "+$placement);
	return $node;
}

```

---

_[View the full topic](https://forums.chaos.com/t/shading-networks-cant-use-vray-textures-and-plugins-in-mel-scripts/48360)._
