SCIRun icon indicating copy to clipboard operation
SCIRun copied to clipboard

Pretty-fy the python outputs

Open jab0707 opened this issue 2 years ago • 0 comments

The python display for things like module states is pretty clunky. For example, when doing a module state dump on a viewscene the camera rotation and lookat print out as lsit of lits with the old listtype included. However, get module state seems to have cleaned this up. Overall, it would be nice if all of the printing in the python consol matched the epected input. For example, setting camera rotation expects a list of 4 numbers, not a list of 4 lists.

scirun_get_module_state('ViewScene:0','CameraRotation')
[0, 0, 0, 0]
scirun_dump_module_state('ViewScene:0')
'[Ambient, 0.2]
[AxesSize, 10]
[AxesVisible, 1]
[AxesX, 100]
[AxesY, 100]
[BackgroundColor, Color(0,0,0)]
[CameraDistance, 1013.04]
[CameraDistanceMinimum, 1e-10]
[CameraLookAt, [[listElement, -15.2] [listElement, 37.5] [listElement, 200.45] ]] #this is one of the problem printouts
[CameraRotation, [[listElement, -0.552601] [listElement, -0.306225] [listElement, 0.760364] [listElement, -0.150119] ]]
[ClippingPlaneD, [[, 0] [, 0] [, 0] [, 0] [, 0] [, 0] ]]
[ClippingPlaneEnabled, [[, 0] [, 0] [, 0] [, 0] [, 0] [, 0] ]]
[ClippingPlaneNormalReversed, [[, 0] [, 0] [, 0] [, 0] [, 0] [, 0] ]]
... #truncated for ease of reading

jab0707 avatar Oct 13 '22 23:10 jab0707