save plugins Fusion 360
This commit is contained in:
27
eyeCameraTest/eyeCameraTest.py
Normal file
27
eyeCameraTest/eyeCameraTest.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# 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()))
|
||||
Reference in New Issue
Block a user