Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API for camera positioning while drawing

2 REPLIES 2
Reply
Message 1 of 3
ktelep
640 Views, 2 Replies

API for camera positioning while drawing

For a project I've built my own 'spaceball' like hardware, and am trying to figure out how to make event calls in Fusion in order to support positioning the camera while drawing.   I have a bunch of options on how the device presents itself to the system, right now it's just serial attached.   I was originally thinking of leveraging the API to fire off events, but it seems that having the plugin running constantly may not be exactly a best practices.

 

Are there any suggestions, or API calls that can be made from outside of Fusion360 to help with camera control?   Should I just treat it as a second mouse?  

2 REPLIES 2
Message 2 of 3
marshaltu
in reply to: ktelep

Hello,

 

We have Camara api to let clients be able to position. Unfortunately API doesn't support to be called directly from out-of Fusion 360 process. 

 

The doable solution could be to have plugin run in Fusion 360 and build a connection between your application and the plugin and then let plugin receive events/messages from your application to control the camera in Fusion 360.

 

Thanks,

Marshal



Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Message 3 of 3
ABabin
in reply to: ktelep

You can move the camera programmatically with the API via Application > Viewport > Camera.  You can find a good example of that here. The feasibility of doing that on-the-fly with a plug-in, though, I don't know.

 

Fusion's orbit shortcut key is shift + middle-mouse button. Maybe you can program your hardware to, when rotated, first move the mouse to center (to make sure it's over the view), hold shift and the middle mouse button, and move the mouse accordingly to give you a 1:1 rotation? 

 

It sounds really interesting though! It'd be great to see your DIY spaceball, if you don't mind sharing. I love homemade interface hardware!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report