forked from mcneel/rhino-developer-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SampleSafeFrame.py
49 lines (43 loc) · 2 KB
/
SampleSafeFrame.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# requires rhino3dm 8.0.0b2
# python3 -m pip install rhino3dm==8.0.0b2
import rhino3dm
model = rhino3dm.File3dm()
sf = model.Settings.RenderSettings.SafeFrame
print('Safe Frame Enabled: ' + str( sf.Enabled ) )
print('Safe Frame perspectiveOnly: ' + str( sf.PerspectiveOnly ) )
print('Safe Frame fieldGridOn: ' + str( sf.FieldGridOn ) )
print('Safe Frame liveFrameOn: ' + str( sf.LiveFrameOn ) )
print('Safe Frame actionFrameOn: ' + str( sf.ActionFrameOn ) )
print('Safe Frame actionFrameLinked: ' + str( sf.ActionFrameLinked ) )
print('Safe Frame ActionFrameXScale: ' + str( sf.ActionFrameXScale ) )
print('Safe Frame actionFrameYScale: ' + str( sf.ActionFrameYScale ) )
print('Safe Frame titleFrameOn: ' + str( sf.TitleFrameOn ) )
print('Safe Frame titleFrameLinked: ' + str( sf.TitleFrameLinked ) )
print('Safe Frame titleFrameXScale: ' + str( sf.TitleFrameXScale ) )
print('Safe Frame titleFrameYScale: ' + str( sf.TitleFrameYScale ) )
print()
sf.Enabled = True
sf.PerspectiveOnly = False
sf.FieldGridOn = True
sf.LiveFrameOn = False
sf.ActionFrameOn = False
sf.ActionFrameLinked = False
sf.ActionFrameXScale = 0.45
sf.ActionFrameYScale = 0.45
sf.TitleFrameOn = False
sf.TitleFrameLinked = False
sf.TitleFrameXScale = 0.45
sf.TitleFrameYScale = 0.45
print('Safe Frame Enabled: ' + str( sf.Enabled ) )
print('Safe Frame perspectiveOnly: ' + str( sf.PerspectiveOnly ) )
print('Safe Frame fieldGridOn: ' + str( sf.FieldGridOn ) )
print('Safe Frame liveFrameOn: ' + str( sf.LiveFrameOn ) )
print('Safe Frame actionFrameOn: ' + str( sf.ActionFrameOn ) )
print('Safe Frame actionFrameLinked: ' + str( sf.ActionFrameLinked ) )
print('Safe Frame ActionFrameXScale: ' + str( sf.ActionFrameXScale ) )
print('Safe Frame actionFrameYScale: ' + str( sf.ActionFrameYScale ) )
print('Safe Frame titleFrameOn: ' + str( sf.TitleFrameOn ) )
print('Safe Frame titleFrameLinked: ' + str( sf.TitleFrameLinked ) )
print('Safe Frame titleFrameXScale: ' + str( sf.TitleFrameXScale ) )
print('Safe Frame titleFrameYScale: ' + str( sf.TitleFrameYScale ) )
print()