|
|
|
|
@ -4,23 +4,6 @@ me - this DAT |
|
|
|
|
scriptOp - the OP which is cooking |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
# press 'Setup Parameters' in the OP to call this function to re-create the |
|
|
|
|
# parameters. |
|
|
|
|
def onSetupParameters(scriptOp): |
|
|
|
|
""" |
|
|
|
|
Called to setup custom parameters for the Script DAT. |
|
|
|
|
""" |
|
|
|
|
page = scriptOp.appendCustomPage('Custom') |
|
|
|
|
page.appendFloat('Valuea', label='Value A') |
|
|
|
|
page.appendFloat('Valueb', label='Value B') |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
def onPulse(par): |
|
|
|
|
""" |
|
|
|
|
Called when a custom pulse parameter is pushed. |
|
|
|
|
""" |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
def onCook(scriptOp): |
|
|
|
|
""" |
|
|
|
|
Called when the Script DAT needs to cook. |
|
|
|
|
@ -61,8 +44,8 @@ def onCook(scriptOp): |
|
|
|
|
row_id = int(inputDat[i, 0]) |
|
|
|
|
if row_id == select_id: |
|
|
|
|
px_val = float(inputDat[i, 1] or 0) |
|
|
|
|
py_val = float(inputDat[i, 2] or 0) - camera_y_offset |
|
|
|
|
pz_val = float(inputDat[i, 3] or 0) |
|
|
|
|
py_val = float(inputDat[i, 2] or 0) |
|
|
|
|
pz_val = float(inputDat[i, 3] or 0)- camera_y_offset |
|
|
|
|
scriptOp.appendRow([row_id, px_val, py_val, pz_val]) |
|
|
|
|
return |
|
|
|
|
except (ValueError, TypeError): |
|
|
|
|
|