duststorm wrote:Solkar wrote:Or are the drivers programmatically breeded up-from-scratch on export?
[...]Try mhx_drivers.py

Pls guess what pattern I had used for a 'find' of driver-related stuff pls
'*driver*'?
Got it!

mhx_drivers.py is about how drivers are written to the export file; but I wanted to know
Solkar wrote:but where are data files for the drivers
or where the drivers are calc'ed.
duststorm wrote:I fear that they are buried in some .py source file in shared/mhx/
So it appears.
(But there is "Nothing to Fear" at all as every old Depeche Mode fan knows.)
Trying e.g.
- Code: Select all
find $CURRENT_MH_VERSION_DIR | xargs grep -i arms-back-70
took me to shared/mhx/rig_shoulder_25.py ($CURRENT_MH_VERSION_DIR valid for my env only)
- Code: Select all
479 if False:
480 ShoulderTargetDrivers = []
481 else:
482 expr70 = "%.3f*(1-%.3f*x1)" % (90.0/70.0, 2/pi)
483 expr70_60 = "%.3f*max(1-%.3f*x1,0)*max(1-%.3f*x2,0)" % (90.0/70.0, 2/pi, 3/pi)
484
485 ShoulderTargetDrivers = [
486 ("arms-up-70", "LR", expr70_60,
487 [("UpArmVec", "DirShldrUp"),
488 ("UpArm", "UpArmVec")]),
489 ("arms-up-70-pos-60", "LR", expr70_60,
490 [("UpArmVec", "DirShldrUp"),
491 ("UpArm", "UpArmVecPos")]),
492 ("arms-up-70-neg-60", "LR", expr70_60,
493 [("UpArmVec", "DirShldrUp"),
494 ("UpArm", "UpArmVecNeg")]),
495
496 ("arms-down-70", "LR", expr70_60,
497 [("UpArmVec", "DirShldrDown"),
498 ("UpArm", "UpArmVec")]),
499 ("arms-down-70-pos-60", "LR", expr70_60,
500 [("UpArmVec", "DirShldrDown"),
501 ("UpArm", "UpArmVecPos")]),
502 ("arms-down-70-neg-60", "LR", expr70_60,
503 [("UpArmVec", "DirShldrDown"),
504 ("UpArm", "UpArmVecNeg")]),
505
506 ("arms-forward-70", "LR", expr70_60,
507 [("UpArmVec", "DirShldrFwd"),
508 ("UpArm", "UpArmVec")]),
509 ("arms-forward-70-pos-60", "LR", expr70_60,
510 [("UpArmVec", "DirShldrFwd"),
511 ("UpArm", "UpArmVecPos")]),
512 ("arms-forward-70-neg-60", "LR", expr70_60,
513 [("UpArmVec", "DirShldrFwd"),
514 ("UpArm", "UpArmVecNeg")]),
515
516 ("arms-back-70", "LR", expr70_60,
517 [("UpArmVec", "DirShldrBack"),
518 ("UpArm", "UpArmVec")]),
519 ("arms-back-70-pos-60", "LR", expr70_60,
520 [("UpArmVec", "DirShldrBack"),
521 ("UpArm", "UpArmVecPos")]),
522 ("arms-back-70-neg-60", "LR", expr70_60,
523 [("UpArmVec", "DirShldrBack"),
524 ("UpArm", "UpArmVecNeg")]),
525
526 ("arms-twist-pos-60", "LR", expr70_60,
527 [("UpArmVec", "DirShldrOut"),
528 ("UpArm", "UpArmVecPos")]),
529 ("arms-twist-neg-60", "LR", expr70_60,
530 [("UpArmVec", "DirShldrOut"),
531 ("UpArm", "UpArmVecNeg")]),
and that seems to be the input for the mhx_drivers.py/CDriver c'tor
- Code: Select all
class CDriver:
def __init__(self, cond, drvdata, extra, channel, index, coeffs, variables):
self.cond = cond
try:
(self.drvtype, self.expr) = drvdata
except:
self.drvtype = drvdata
So I would assume
- placing sth like a e.g. "rig_legbend.py" in shared/mhx/
- along with targets shared/mhx/targets/correctives/*
would be conforming to current concepts.
Or am I mistaken?
Regards, S.