save plugins Fusion 360
This commit is contained in:
1
eyeCameraTest/.env
Normal file
1
eyeCameraTest/.env
Normal file
@@ -0,0 +1 @@
|
||||
PYTHONPATH=C:/Users/bartool/AppData/Local/Autodesk/webdeploy/production/9209df45963e1599ff476303834125d21fd43de4/Api/Python/packages
|
||||
20
eyeCameraTest/.vscode/launch.json
vendored
Normal file
20
eyeCameraTest/.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [{
|
||||
"name": "Python: Attach",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"pathMappings": [{
|
||||
"localRoot": "${workspaceRoot}",
|
||||
"remoteRoot": "${workspaceRoot}"
|
||||
}],
|
||||
"osx": {
|
||||
"filePath": "${file}"
|
||||
},
|
||||
"windows": {
|
||||
"filePath": "${file}"
|
||||
},
|
||||
"port": 9000,
|
||||
"host": "localhost"
|
||||
}]
|
||||
}
|
||||
5
eyeCameraTest/.vscode/settings.json
vendored
Normal file
5
eyeCameraTest/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"python.autoComplete.extraPaths": ["C:/Users/bartool/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/Python/defs"],
|
||||
"python.analysis.extraPaths": ["C:/Users/bartool/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/Python/defs"],
|
||||
"python.pythonPath": "C:/Users/bartool/AppData/Local/Autodesk/webdeploy/production/9209df45963e1599ff476303834125d21fd43de4/Python/python.exe"
|
||||
}
|
||||
10
eyeCameraTest/eyeCameraTest.manifest
Normal file
10
eyeCameraTest/eyeCameraTest.manifest
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"autodeskProduct": "Fusion360",
|
||||
"type": "script",
|
||||
"author": "",
|
||||
"description": {
|
||||
"": ""
|
||||
},
|
||||
"supportedOS": "windows|mac",
|
||||
"editEnabled": true
|
||||
}
|
||||
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