2 Standard G8F Body Morphs Imported Incorrectly

Issue #1097 resolved
Ben Jackson created an issue

Apologies for any inaccuracies in terminology in the text below.

The standard G8F body morphs ‘lHandFist’ and ‘rHandFist’ are imported incorrectly (they do nothing ATM - for me at least!). AFAICT they are the only 2 morphs affected. I’ve looked through the source dsf files and I believe this is because because their outputs point to another body morph and the formula expression uses a spline. All other standard body morphs only use splines when directly manipulating rotations.

I believe the relevant function is ‘makeValueFormula' from load_morph.py. Currently it uses the expressions factor which defaults to 0 (therefore the morph does nothing). The fix seems to be to use ‘cheatSplineTCB’ to set the factor. I can submit a PR if desired although I’ve included the changes below for convenience.

Current Function

Revised Version:

    def makeValueFormula(self, output, expr):
        output = self.getUniqueName(output)
        if expr["prop"]:
            self.addNewProp(output)
            prop = self.getUniqueName(expr["prop"])
            factor = expr["factor"]
            if "points" in expr.keys():
                factor = self.cheatSplineTCB(expr["points"], factor)
            self.drivers[output].append(("PROP", prop, factor))
        if expr["mult"]:
            mult = self.getUniqueName(expr["mult"])
            if output not in self.mults.keys():
                self.mults[output] = []
            self.mults[output].append(mult)
            self.addNewProp(mult)
        if expr["bone"]:
            bname = expr["bone"]
            if output not in self.drivers.keys():
                self.drivers[output] = []
            self.drivers[output].append(("BONE", bname, expr))

Comments (2)

  1. Log in to comment