Skip to content

Instantly share code, notes, and snippets.

@kohyuk91
Created November 17, 2019 01:49
Show Gist options
  • Select an option

  • Save kohyuk91/547c6325b559960702aa5499214d0003 to your computer and use it in GitHub Desktop.

Select an option

Save kohyuk91/547c6325b559960702aa5499214d0003 to your computer and use it in GitHub Desktop.
#
#
# 3DE4.script.name: Flip Tracking Direction
#
# 3DE4.script.version: v1.0
#
# 3DE4.script.comment: This tool will flip the tracking dirction of one selected point.
#
# 3DE4.script.gui: Manual Tracking Controls::View
# 3DE4.script.gui.button: Manual Tracking Controls::Flip Direction, alight-bottom-left , 80 , 20
#
# 3DE4.script.hide: false
# 3DE4.script.startup: false
# by Bernhard Eiser 2014
def reverseTrackingDirection():
pg = tde4.getCurrentPGroup()
cam = tde4.getCurrentCamera()
frame = tde4.getCurrentFrame(cam)
point_list = tde4.getPointList(pg, 1)
if len(point_list) != 1:
#print "Please select exactly one point!" #print to console
tde4.postQuestionRequester("Point Error", "Please select exactly one point.", "OK")
return
point_id = point_list[0]
current_dir = tde4.getPointTrackingDirection(pg, point_id)
if current_dir == "TRACKING_FW":
tde4.setPointTrackingDirection(pg, point_id, "TRACKING_BW")
elif current_dir == "TRACKING_BW":
tde4.setPointTrackingDirection(pg, point_id, "TRACKING_FW")
#print point_id #test point ID
reverseTrackingDirection()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment