28 lines
707 B
Python
28 lines
707 B
Python
# Author-
|
|
# Description-
|
|
|
|
import adsk.core
|
|
import adsk.fusion
|
|
import adsk.cam
|
|
import traceback
|
|
|
|
|
|
def run(context):
|
|
try:
|
|
|
|
app = adsk.core.Application.get()
|
|
ui = app.userInterface
|
|
camera = app.activeViewport.camera
|
|
eye = camera.eye
|
|
target = camera.target
|
|
upvector = camera.upVector
|
|
baseExtent = camera.viewExtents
|
|
|
|
ui.messageBox('Eye: {0}, {1}, {2} \ntarget: {3}, {4}, {5} \nupvector: {6}, {7}, {8}, \nviewExtants: {9}'.format(
|
|
eye.x, eye.y, eye.z, target.x, target.y, target.z, upvector.x, upvector.y, upvector.z, baseExtent))
|
|
|
|
except:
|
|
|
|
if ui:
|
|
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
|