Hello,
is there a way to preserve Maya hierachy upon "Baking Asset" from an houdiniEngine's Hda in maya?
All hierarchy is merged when using "Bake Asset" from houdini node.
Seems like I can use maya "Mesh -> separate" to separate mesh after baking, but I have no clue to associate baked meshes from the source ones. (used HDA's 'Split geos by group option')
I wished I could have set an attribute on original meshes in maya (ex; current path attribute) so I could have retrieved them in the baked geos (bake asset) and set meshes back to their original hierarchy/named upon baking.
Any workaround exists?
thanks
Jonathan
Found 8 posts.
Search results Show results as topic list.
Houdini Engine for Maya » Preserve maya hierarchy
- jonathan.pgagne
- 33 posts
- Offline
Technical Discussion » Python promote parameter
- jonathan.pgagne
- 33 posts
- Offline
Hi,
I am trying to mimic the Hda's ‘Promote Parameter’ behavior, using python.
I've been able to add hda's parameters, with default values, using:
oParmTemplate = hou.StringParmTemplate(…
oParmTemplate = hou.ButtonParmTemplate(…
oHdaDefefinition.setParmTemplateGroup(oParmTemplateGroup)
But I can't find how to add a ‘Linked channels’, in the channels section (Edit Operator Type Properties –> Parameter).
Is it possible to do so using python?
Thanks,
Jonathan
I am trying to mimic the Hda's ‘Promote Parameter’ behavior, using python.
I've been able to add hda's parameters, with default values, using:
oParmTemplate = hou.StringParmTemplate(…
oParmTemplate = hou.ButtonParmTemplate(…
oHdaDefefinition.setParmTemplateGroup(oParmTemplateGroup)
But I can't find how to add a ‘Linked channels’, in the channels section (Edit Operator Type Properties –> Parameter).
Is it possible to do so using python?
Thanks,
Jonathan
Technical Discussion » HDA dynamic manipulate parameters
- jonathan.pgagne
- 33 posts
- Offline
Technical Discussion » HDA dynamic manipulate parameters
- jonathan.pgagne
- 33 posts
- Offline
Hi,
As for Pipeline purposes, I need to automate some parameters operation, when exporting / creating HDAs.
IE: Creating New Parameters, Creating Folders, Hiding Folders. (Just as we would do manually via ‘Type Properties –> Parameters’)
For example:
That all seems to work well. IE: Transform and Subnet Folder are now hidden, ‘Test Folder’ is created with ‘Test Parm’ parameters. However, it didn't ‘update’ hda's nodeType. And when ‘Saving node type’, theses updates are all losts.
How can I update HDA's Folder/Parameters and parameters's value in order to still exists when hda is being saved, using scripting?
Just the way we would do using type properties –> Parameters interface…
Jonathan
As for Pipeline purposes, I need to automate some parameters operation, when exporting / creating HDAs.
IE: Creating New Parameters, Creating Folders, Hiding Folders. (Just as we would do manually via ‘Type Properties –> Parameters’)
For example:
group = myHda.parmTemplateGroup()
group.hideFolder('Transform', True)
group.hideFolder('Subnet', True)
oFolder = hou.FolderParmTemplate('testFolder', 'Test Folder')
oParmTemplate = hou.StringParmTemplate('testParm', 'Test Parm', 1, 't')
oFolder.addParmTemplate(oParmTemplate)
group.append(oFolder)
myHda.setParmTemplateGroup(group)
That all seems to work well. IE: Transform and Subnet Folder are now hidden, ‘Test Folder’ is created with ‘Test Parm’ parameters. However, it didn't ‘update’ hda's nodeType. And when ‘Saving node type’, theses updates are all losts.
How can I update HDA's Folder/Parameters and parameters's value in order to still exists when hda is being saved, using scripting?
Just the way we would do using type properties –> Parameters interface…
Jonathan
Technical Discussion » hda scripted Event handler
- jonathan.pgagne
- 33 posts
- Offline
Is it possible to script (python) the creation of hda's Event handler?
For example (manually):
HDA –> Edit Operator Type Properties –> Event Handler = On Created
node = kwargs
print ‘CREATED’, node
Pipeline wise, I would need to automate that operation, I need to be able to ‘insert’ various Event Handler, everytime an artist creates a hda, via programmation.
Thanks,
Jonathan
For example (manually):
HDA –> Edit Operator Type Properties –> Event Handler = On Created
node = kwargs
print ‘CREATED’, node
Pipeline wise, I would need to automate that operation, I need to be able to ‘insert’ various Event Handler, everytime an artist creates a hda, via programmation.
Thanks,
Jonathan
Technical Discussion » Custom environment variable in Houidni
- jonathan.pgagne
- 33 posts
- Offline
Hi,
I'd like to be able to set houdini variable, that would stick/save with current hipfile, using python.
When setting a new Houdini variable, manually (edit –> Aliases and Variables –> Variables), it seems that newly created variable will follow with current hipfile (save and reopen hipfile, variable still exists).
ex: RENDER –> /drive/myRenderXXX/path
When setting a new variable, or updating an exting one, using the python API, it seems to work well in current houdini session, but doesn't save with the scene.
ex: hou.putenv('RENDER', ‘/drive/myRenderYYY/path’)
*Now ‘RENDER’ variable has ben updated/set to ‘/drive/myRenderYYY/path’ when querying using: hou.getenv('RENDER').
However, changes is not set when looking at (edit –> Aliases and Variables –> Variables) nd is not saved when saving hipfile.
Is it possible to mimic (edit –> Aliases and Variables –> Variables) behavior, using python commands?
thanks,
Jonathan
I'd like to be able to set houdini variable, that would stick/save with current hipfile, using python.
When setting a new Houdini variable, manually (edit –> Aliases and Variables –> Variables), it seems that newly created variable will follow with current hipfile (save and reopen hipfile, variable still exists).
ex: RENDER –> /drive/myRenderXXX/path
When setting a new variable, or updating an exting one, using the python API, it seems to work well in current houdini session, but doesn't save with the scene.
ex: hou.putenv('RENDER', ‘/drive/myRenderYYY/path’)
*Now ‘RENDER’ variable has ben updated/set to ‘/drive/myRenderYYY/path’ when querying using: hou.getenv('RENDER').
However, changes is not set when looking at (edit –> Aliases and Variables –> Variables) nd is not saved when saving hipfile.
Is it possible to mimic (edit –> Aliases and Variables –> Variables) behavior, using python commands?
thanks,
Jonathan
Technical Discussion » Hou.putenv Error
- jonathan.pgagne
- 33 posts
- Offline
I need to set some environment variables, attached to a scene.
Ex: hou.putEnv('RENDER', ‘/path/to/my/projectA/projectARenderFolder’)
I could have to update that variable several times within a houdini session:
IE:
Open scene B
hou.putEnv('RENDER', ‘/path/to/my/projectB/projectBRenderFolder’)
Open Scene C
hou.putEnv('RENDER', ‘/path/to/my/projectC/projectCRenderFolder’)
Having an outputPath (mantra), using environment variable works well within houdini session…
$RENDER/$OS/$F.exr …
However, when I save scene, reopen, or send it to farm, $RENDER is not defined anymore.
Is it possible to declare a variable, and making it ‘saved’ in current scene?
hou.putenv('RENDER', ‘/x/x/’)
thanks,
Jonathan
Ex: hou.putEnv('RENDER', ‘/path/to/my/projectA/projectARenderFolder’)
I could have to update that variable several times within a houdini session:
IE:
Open scene B
hou.putEnv('RENDER', ‘/path/to/my/projectB/projectBRenderFolder’)
Open Scene C
hou.putEnv('RENDER', ‘/path/to/my/projectC/projectCRenderFolder’)
Having an outputPath (mantra), using environment variable works well within houdini session…
$RENDER/$OS/$F.exr …
However, when I save scene, reopen, or send it to farm, $RENDER is not defined anymore.
Is it possible to declare a variable, and making it ‘saved’ in current scene?
hou.putenv('RENDER', ‘/x/x/’)
thanks,
Jonathan
Technical Discussion » OpenPort and communicate via Python (Socket)
- jonathan.pgagne
- 33 posts
- Offline
Hey guys,
I saw there is a hscript command ‘openport’, but I didn't find example on how to communicate with houdini via python.
Here's what I need to do:
1-Open a port, from localHost, within houdini session.
2-From an external python interpreter, execute houdini python commands, using local port.
IE: hou.node('/obj').createNode('geo')
Here's how I do it in maya:
1-cmds.commandPort(name='localhost:7555')
2-
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(('127.0.0.1', 7555))
c = ‘python(“cmds.polySphere()”);’
client.send©
Does anyone know if it's possible to this in houdini?
Anyone has some examples?
Thanks
Jonathan
I saw there is a hscript command ‘openport’, but I didn't find example on how to communicate with houdini via python.
Here's what I need to do:
1-Open a port, from localHost, within houdini session.
2-From an external python interpreter, execute houdini python commands, using local port.
IE: hou.node('/obj').createNode('geo')
Here's how I do it in maya:
1-cmds.commandPort(name='localhost:7555')
2-
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(('127.0.0.1', 7555))
c = ‘python(“cmds.polySphere()”);’
client.send©
Does anyone know if it's possible to this in houdini?
Anyone has some examples?
Thanks
Jonathan
-
- Quick Links