Forum: Virtual World Dynamics


Subject: Restarting the development of VWD

VirtualWorldDynamics opened this issue on Jan 24, 2018 · 306 posts


VirtualWorldDynamics posted Thu, 05 April 2018 at 2:59 PM

Hello Selinita, I am sure Philemot can help me but I don't know if he already worked on the subject.

Surody can perhaps help me for this script. He helps me a lot for the Patreon project.

I post here the message I want to send to the Daz Script Forum. If you have any idea on how to solve this, I thank you a lot.

"Message start" Hello,

I want to write a script which allows to modify morphs on a character.

When I import a character and I open the Parameters Tab, there are a lot of modifiers. I would like to modify these modifiers using their names.

I made some tests and I found a solution. Here is a small program which allows to modify the "Nipples" morph. The current version displays the Label and the value of this morph.

fig = Scene.getPrimarySelection();

object = fig.getObject();

numMods = object.getNumModifiers();

print(numMods);

for (i = 0 ; i < numMods ; i++)

{

curMod = object.getModifier(i);

if (curMod.getName() == "PBMNipples")

{

curProp = curMod.getProperty(0);

print(curProp.getLabel());  

print(curProp.getValue());      

}

}

I made another test to modify the left breast in UP/DOWN direction. The name of this modifier in the Parameters Tab is "pCTRLlBreastUp-Down". The corresponding script is:

fig = Scene.getPrimarySelection();

object = fig.getObject();

numMods = object.getNumModifiers();

print(numMods);

for (i = 0 ; i < numMods ; i++)

{

curMod = object.getModifier(i);

if (curMod.getName() == "pCTRLlBreastUp-Down")

{

curProp = curMod.getProperty(0);

print(curProp.getLabel());  

print(curProp.getValue());      

}

}

This script don't display anything. The "pCTRLlBreastUp-Down" don't exist by using this method. This modifier modifies the "lPectoral" node and applies to it a rotation on the X axis. To modify this modifier, I found this solution:

numNodes = Scene.getNumNodes();

for(i = 0; i < numNodes; i++)

{

curNode =Scene.getNode(i);

if (curNode.getName() == "lPectoral")

{

print(curNode.getLabel());

print(curNode.getXRotControl().getValue());

}

}

This script works fine. My problem is that I will need to modify these morphs using different methods.

My question is:

Is there a method to modify all the modifiers in the Parameters Tab by using only one method.

I thank you very much for your replies. "Message end"

I hope my scripts will be easy to read.

If my question is not very clear, please tell me.

 Gérald

____________________________________________

Follow me on Twitter : @VWDynamics

Watch demo videos on Youtube