DAZ script for erc-bake multipel files
Hurdy3D
Posts: 1,052
Hello,
I have a bunch of file where I want to remove the erc-freeze.
I figured out that erc-bake is the way to go, but erc-bake is only working for one file at once.
so, I thought maybe a little script could be wirtten do this.
I was thinking about a script that removes from all favourite morphs the erc-freeze.
erc-bake is availibe via the script api.
unfortunatelly I have no clue about DAZ scripting.
any hint how I collect all favourite morphs and pass them in a loop to erc-bake?
Comments
I made asmall progress:
The main issue is, that getControllerProperty doesn't accept my Property, return is always null:
Executing Script...
Any idea what I have to do here?
The docu is not pretty helpful here http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/ercbake_dz#a_1a0fa552d18aa130c9ad8ac83f17d1f89d
I'd add soem error-checking to the script, especially I would break down var modifier = nodeDzObj.getPropertyGroups().findPropertyByLabel( 'Morph name'); into separate steps and check that each strep of the process was giving a valid return.
Yes, I already checked that one.
findPropertyByLabel() returns the morph, I tested even reading the current value of the morph.
However, the thing I don't get is:
findPropertyByLabel() returns a value from from the type DzProperty
getControllerProperty() expects a DzNumericProperty.
How can I utlize the result of findPropertyByLabel() for getControllerProperty() ?
ok I found a solution:
I used DzERCBake in a wrong way.
So... no I have to figure out how to get a list all favourite morphs, any idea?
Someone has to say it: I'm a so [super-duper] S-M-R-T
Found a solution:
property.getValueChannel();