Viewport type (#view_*) in Python?

vidar.rinne
Contributor
Contributor

Viewport type (#view_*) in Python?

vidar.rinne
Contributor
Contributor

Hello,

Just wanted to ask if anyone knows how to use the #view_* objects (viewport type) in Python?

 

rt.viewport.setType('view_persp_user') gives:
-- Runtime error: The function needed argument with value: #view_left | #view_right | #view_top | #view_bottom | #view_front | #view_back | #view_iso_user | #view_persp_user | #view_camera | #view_grid | #view_none | #view_spot | #view_shape, got: "view_persp_user"

This script does work:

from pymxs import runtime as rt

t = rt.viewport.getType()
rt.viewport.setType(t)

 

The type of t is some max wrapper base class.

 

Best,

0 Likes
Reply
Accepted solutions (1)
500 Views
3 Replies
Replies (3)

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

see the answer to same question how to get name value in pymxs 

vidar.rinne
Contributor
Contributor
Thank you!
0 Likes

MartinBeh
Collaborator
Collaborator
in short: rt.name("#view_left")

Martin Breidt

http://scripts.breidt.net

EESignature

→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes