Search - User list
Full Version: Copying HDA parameters via maxscript
Root » Houdini Engine for 3ds Max » Copying HDA parameters via maxscript
animanoo
Hello

I have a modeling HDA that my client's team and I are using via the 3DS Max plugin for Houdini.

Now they must incorporate the modifier “Houdini Digital Asset” with their existing max scripts.
In the Houdini Engine for 3ds Max documentation, there are CreateModifierHDA and SetModifierHdaParameter functions.

But for their workflow, they would also need to read these parameters from existing models.
Is there no function like GetModifierHdaParameter?
Or is there a workaround, using standard max functions?
Maybe even something like the maxscript equivalent of the “copy to different object” button?

Thanks for any help!
BrookeA
There's no getter function yet. This will be added to the MaxScript API. I can also expose the copy functionality to the MaxScript API as well.

As a workaround right now–the parameter names and their values are available as custom attributes. For geometry HDAs, the custom attributes are stored on the root node, and for modifier HDAs, the custom attributes are stored directly on the modifier.
animanoo
Hello again.

First of all, thank you for your feedback, and also your workaround suggestion, I really hope we get the getter and copy functions soon.

However, my client has tried your workaround, and is having some trouble, here is what he said:

Thank you for your help. But I can’t access these attributes.

When I create a Box in Max and initialize my Houdini plugin “CD_SofaCushionMAX_18” it correctly initialize the assets and I can modify parameters. I get this info in the MaxScriptListener:

Box realWorldMapSizen pos: isSelectedn width:10.1174 length:6.90326 height:5.65464

modPanel.addModToSelection (Houdini_Digital_Asset ()) uin

$.modifiers.HEMAX_Parameter.value = 4
$.modifiers.HEMAX_Parameter.value = “”
$.modifiers.HEMAX_Parameter.value = 1
$.modifiers.HEMAX_Parameter.value = 1
$.modifiers.HEMAX_Parameter.value = 12

$.modifiers.HEMAX_Parameter.value = 0


But then I want to read these Parameters:

$.modifiers
Houdini_Digital_Asset:CD_SofaCushionMAX_18_2

custAttributes.get $.modifiers “infl_mid”
undefined

custAttributes.count $.modifiers
0

I can access the Houdini Modifier by script, but it seams there are no custAttributes on it!

Can you please help?
BrookeA
Two new functions have been added to the MaxScript API:

- CopyModifierHda
- CloneObjectHda

The next available daily build will have these functions. The documentation page on scripting will have more details about usage of the functions.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB