How to create karma material builder with pyhton?

   336   2   0
User Avatar
Member
26 posts
Joined: Nov. 2013
Offline
The type of karma material builder is "subnet" ,so normally I can only create a empty subnet with createNode().Is it possible to create a "karma material builder " node using python code?
User Avatar
Member
277 posts
Joined: Jan. 2013
Offline
Use the same functions that are called in the context of the network.

import voptoolutils

dest = hou.node('/obj/lopnet1/materiallibrary1')
mask = voptoolutils.KARMAMTLX_TAB_MASK

# USD Material Builder
voptoolutils._setupMtlXBuilderSubnet(destination_node=dest)
# Karma Material Builder
voptoolutils._setupMtlXBuilderSubnet(destination_node=dest, name='karmamaterial', mask=mask, folder_label='Karma Material Builder')
User Avatar
Member
26 posts
Joined: Nov. 2013
Offline
alexwheezy
Use the same functions that are called in the context of the network.

import voptoolutils

dest = hou.node('/obj/lopnet1/materiallibrary1')
mask = voptoolutils.KARMAMTLX_TAB_MASK

# USD Material Builder
voptoolutils._setupMtlXBuilderSubnet(destination_node=dest)
# Karma Material Builder
voptoolutils._setupMtlXBuilderSubnet(destination_node=dest, name='karmamaterial', mask=mask, folder_label='Karma Material Builder')
That's great! Thank you so much.
  • Quick Links