Hi,
i am using a math node from here https://apps.autodesk.com/MAYA/en/Detail/Index?id=212304226072872821&appLang=en&os=Win64
what i am trying to achieve is to implement this Python script with this math node,
I put here the parenthesis of (a) , (b), (c ) and (result), so these are the equivelant to MathNodes variables and result
import maya.cmds as mc
import math
previous_driver_angle(a) = 0.
previous_driven_angle(b) = 0.
def testFunction():
global previous_driver_angle, previous_driven_angle
next_driver_angle(c) = mc.getAttr('driver.rotateX')
next_driven_angle(result) = max(math.floor(previous_driven_angle / 60. + 10 ** -6) * 60.,
previous_driven_angle + (next_driver_angle - previous_driver_angle) * 60. / 55.)
mc.setAttr('driven.rotateZ', next_driven_angle)
previous_driver_angle = next_driver_angle
previous_driven_angle = next_driven_angle
So in the math node i am writing in the Expression tab this:
[(b / 60. + 10 ** -6) * 60., b + (c - a) * 60. / 55.)]
a = 0
b = 0
c = (driver.rotateX)
I connect driver’s rotate X with c and then i connect the result of MathNode to driven.rotateZ.
And this is the error i get:
// Error: SyntaxError: file
C:/ProgramData/Autodesk/ApplicationPlugins/MathNode/Contents/plug-ins/asdkMathNode.py line 82: invalid syntax //
Expression [(b / 60. + 10 ** -6) * 60., b + (c - a) * 60. / 55.)] failed// Error: SyntaxError: file C:/ProgramData/Autodesk/ApplicationPlugins/MathNode/Contents/plug-ins/asdkMathNode.py line 82: invalid syntax //
Expression [(b / 60. + 10 ** -6) * 60., b + (c - a) * 60. / 55.)] failed
Any idea would be appreciated thank you