How do I change isSmoothTransition for named view?

How do I change isSmoothTransition for named view?

soswow
Advocate Advocate
185 Views
1 Reply
Message 1 of 2

How do I change isSmoothTransition for named view?

soswow
Advocate
Advocate

1. Create named view called `view1`

Open python console and execute:

 

app = adsk.core.Application.get()
app.activeProduct.namedViews.itemByName("view1").camera.isSmoothTransition # -> True
cam = app.activeProduct.namedViews.itemByName("view1").camera
cam.isSmoothTransition = False 
cam.isSmoothTransition # -> False
app.activeProduct.namedViews.itemByName("view1").camera = cam

app.activeProduct.namedViews.itemByName("view1").camera.isSmoothTransition # -> True (Still)

 

 

0 Likes
186 Views
1 Reply
Reply (1)
Message 2 of 2

BrianEkins
Mentor
Mentor

I don't think named views let you control whether they have a smooth transition. I don't see an option for that in the UI. The fact that the API uses a Camera object to define a named view doesn't mean that the named view uses all of the settings on a Camera.

 

There is a workaround if you don't want a smooth transition when applying a named view. Instead of applying the named view, you can get the camera from the named view. Turn off the smooth transition and then set the camera for the active viewport using that camera.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes