# (Resolved) AppSDK: Append VRScene file using namespace

**URL:** <https://forums.chaos.com/t/resolved-appsdk-append-vrscene-file-using-namespace/100865>\
**Category:** General\
**Created:** [October 5, 2020, 12:19pm UTC](https://forums.chaos.com/t/resolved-appsdk-append-vrscene-file-using-namespace/100865 "2020-10-05T12:19:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbvfx](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@jbvfx](https://forums.chaos.com/u/jbvfx)\
**Post date:** [October 5, 2020, 12:19pm UTC](https://forums.chaos.com/t/resolved-appsdk-append-vrscene-file-using-namespace/100865/1 "2020-10-05T12:19:26Z")

</div>

Hi,

Is it possible to add a namespace to the content of vrscene files loaded with vray.VRayRenderer.append(“file”).  
We are running into issues with duplicate node names.

Best,  
Jacob

---

<div class="post-metadata">

**Author:** ![bdancer](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bdancer/32/52257_2.png) [@bdancer](https://forums.chaos.com/u/bdancer)\
**Post date:** [October 5, 2020, 1:25pm UTC](https://forums.chaos.com/t/resolved-appsdk-append-vrscene-file-using-namespace/100865/2 "2020-10-05T13:25:15Z")

</div>

Use .appendFiltered(): [https://docs.chaosgroup.com/vray\_app…appendFiltered](https://docs.chaosgroup.com/vray_app_sdk/doc/python27/vray.html?highlight=append#vray.VRayRenderer.appendFiltered)

---

<div class="post-metadata">

**Author:** ![jbvfx](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@jbvfx](https://forums.chaos.com/u/jbvfx)\
**Post date:** [October 5, 2020, 2:27pm UTC](https://forums.chaos.com/t/resolved-appsdk-append-vrscene-file-using-namespace/100865/3 "2020-10-05T14:27:36Z")

</div>

So how would I use this function if I want to add a namespace to all nodes in a vrscene file?

---

<div class="post-metadata">

**Author:** ![stanislav.kirilov](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/stanislav.kirilov/32/52485_2.png) [@stanislav.kirilov](https://forums.chaos.com/u/stanislav.kirilov)\
**Post date:** [October 5, 2020, 6:53pm UTC](https://forums.chaos.com/t/resolved-appsdk-append-vrscene-file-using-namespace/100865/4 "2020-10-05T18:53:41Z")

</div>

```auto
import vray

def onFilterPlugin(r, className, pluginName):
  print(className, pluginName)
  if className == 'Node': # is it a Node?
    return 'namespace' + pluginName #create the plugin with a different name
  return False # skip other plugins (or return True if you don't want to skip or rename)

with vray.VRayRenderer() as renderer:
  renderer.appendFiltered('file.vrscene', onFilterPlugin)

  # print the names of the plugins held in the renderer
  i = 0
  for plugin in renderer.plugins:
    i += 1
    print(str(i) + '. ' + plugin.getName())

```

---

<div class="post-metadata">

**Author:** ![jbvfx](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@jbvfx](https://forums.chaos.com/u/jbvfx)\
**Post date:** [October 6, 2020, 8:23am UTC](https://forums.chaos.com/t/resolved-appsdk-append-vrscene-file-using-namespace/100865/5 "2020-10-06T08:23:29Z")

</div>

Thanks.  
It works great.
