Automatize 'Fit to' and 'Auto Fit'

faseceroofaseceroo Posts: 12


A procedure I do over and over is right-clicking on a clothing item and selecting 'Fit Cloth_name to...'. then the 'Fit to' dialog box appears. When I press Accept, the second dialog box 'Auto-Fit' automatically appear, which I complete manually again. 

I'd rather like to automate this. What I do is iterate through the scene and get the DzNode's that derives from DzFigure.

var Prop = node.findProperty("Fit to");
Prop.setValue(targetFigure);

the code above makes 'Fit to' dialog box to run automatically, but then the second one appears and I have to fill it out manually


I asked Chat GPT and it gave me the following, but it's useless

var s = new DzSettings();

// first dialog "Fit To"
s.setStringValue("figureLabel", targetFigure.getLabel());
s.setBoolValue("parentToTarget", false);

// second dialog "Auto-Fit"
s.setStringValue("autoFitClone", "G8F_A_Pose");
s.setStringValue("autoFitTemplate", "Full-Body");
   
var Prop = node.findProperty("Fit to");
Prop.setValueFromSettings(s, "Standard");

Post edited by faseceroo on

Comments

Sign In or Register to comment.