woo.qt
¶
-
class
woo.qt.
ControllerClass
(parent=None)[source]¶ -
-
generatorComboSlot
(genStr, menuAction=None, menuData=None)[source]¶ update generator parameters when a new one is selected
-
throttleExp2Lin
(y)[source]¶ Convert Scene.throttle (in seconds) to the position of the throttle control. This is the inverse of
throttleInt2Float
giving \(x(y)=\exp\left(\frac{y}{y_{\max}}\log(x_{\max}+1)\right)-1\).
-
UiPrefs¶
-
class
woo.qt.
UiPrefs
(self: woo.core.Object) → None[source]¶ Storage for local user interface preferences. This class is always instantiated as
woo.qt.uiPrefs
; if the fileprefsFile
exists at startup, it is loaded automatically.-
glRotCursorFreeze
(= False)¶ Freeze cursor when rotating things (moving with buttons pressed); useful for trackballs; not yet functional.
[type: bool]
-
prepShowVars
(= False)¶ Show variable names rather than descriptions by default in the preprocessor interface
[type: bool]
-
paraviewLike3d
(= True)¶ Paraview-like mouse bindings for the 3d view (requires restart): middle-drag to move, left-drag to zoom. IF false, use old (Yade) behavior, which is the opposite.
[type: bool]
-
defaultCmap
(= 'coolwarm')¶ Default colormap for scales.
[type: str, choices: coolwarm, 3gauss, 3saw, banded, blue_red, blu_red, bright, bw, default, detail, extrema, helix2, helix, hotres, jaisn2, jaisnb, jaisnc, jaisnd, jaison, jet, manga, rainbow, roullet, ssec, wheel, red-green-blue, viridis]
-
prefsFile
(= '/home/eudoxos/.config/woo/uiPrefs.conf')¶ Preferences will be loaded/saved from/to this file.
[type: str, not dumped, read-only in python]
-
static
__new__
(klass, **kw)[source]¶ Create and return a new object. See help(type) for accurate signature.
-
deepcopy
(**kw)¶ The c++ dedepcopy uses boost::serialization, we need to use pickle. As long as deepcopy is called from python, this function gets precedence over the c++ one. Additional keyword parameters are used to immediately set parameters on the copy before returning.
-
-
class
woo.qt.
SnapshotEngine
(*args, **kwargs)¶ Periodically save snapshots of GLView(s) as .png files. Files are named
fileBase
+counter
+.png
(counter is left-padded by 0s, i.e. snap00004.png).Overloaded function.
__init__(self: woo._qt.SnapshotEngine) -> None
__init__(self: woo._qt.SnapshotEngine, *args, **kwargs) -> None
-
fileBase
(= '')¶ Basename for snapshots
[type: string]
-
format
(= 'PNG')¶ Format of snapshots (one of JPEG, PNG, EPS, PS, PPM, BMP) QGLViewer documentation. File extension will be lowercased
format
. Validity of format is not checked.[type: string, choices: JPEG, PNG, EPS, PS, PPM, BMP]
-
counter
(= 0)¶ Number that will be appended to fileBase when the next snapshot is saved (incremented at every save).
[type: int, read-only in python]
-
plot
(= '')¶ Name of field in
woo.core.Plot.imgData
to which taken snapshots will be appended automatically.[type: string]
► Saved files
-
snapshots
(= [])¶ Files that have been created so far
[type: vector<string>, not shown in the UI, read-only in python]
► Error handling
-
ignoreErrors
(= True)¶ Only report errors instead of throwing exceptions, in case of timeouts.
[type: bool]
-
msecSleep
(= 0)¶ number of msec to sleep after snapshot (to prevent 3d hw problems) [ms]
[type: int]
-
deadTimeout
(= 3.0)¶ Timeout for 3d operations (opening new view, saving snapshot); after timing out, throw exception (or only report error if
ignoreErrors
) and make myselfdead
. [s][type: Real]
-
tryOpenView
(= False)¶ Attempt to open new view if there is none; this is very unreliable (off by default).
[type: bool]
woo._qt
¶
Note
This module is imported into the woo.qt
module automatically; refer to its objects through woo.qt
.
SnapshotEngine¶
Object
→ Engine
→ PeriodicEngine
→ SnapshotEngine
woo._GLViewer
¶
Note
This module is imported into the woo.qt
module automatically; refer to its objects through woo.qt
.
-
class
woo._GLViewer.
GLViewer
¶ -
property
axes
¶ Show arrows for axes.
-
center
()¶ Center view. View is centered either so that all bodies fit inside (
median=False
), or so that 75% of bodies fit inside (median=True
).
-
close
()¶
-
property
eyePosition
¶ Camera position.
-
fitAABB
()¶ Adjust scene bounds so that Axis-aligned bounding box given by its lower and upper corners mn, mx fits in.
-
fitSphere
()¶ Adjust scene bounds so that sphere given by center and radius fits in.
-
property
fps
¶ Show frames per second indicator.
-
loadState
()¶ Load display parameters from slot saved previously into, identified by its number.
-
property
lookAt
¶ Point at which camera is directed.
-
property
ortho
¶ Whether orthographic projection is used; if false, use perspective projection.
-
povRayCam
()¶ Return textual definition of camera in POV-Ray which will be the same with the current camera setup in this view.
-
property
rotCursorFreeze
¶
-
saveState
()¶ Save display parameters into numbered memory slot. Saves state for both
GLViewer
and associatedRenderer
.
-
property
sceneRadius
¶ Visible scene radius.
-
property
screenSize
¶ Size of the viewer’s window, in scree pixels
-
property
selection
¶
-
showEntireScene
()¶
-
snapshot
()¶ Save screenshot of this view to out. Recognized extensions are .png, .jpg, .jpeg. Execution of snapshot is deferred and will be carried out after the next frame will have been rendered; the call returns immediately.
-
property
upVector
¶ Vector that will be shown oriented up on the screen.
-
property
viewDir
¶ Camera orientation (as vector).
-
property
-
woo._GLViewer.
View
()¶ Create a new 3d view.
-
woo._GLViewer.
center
()¶ Center all views.
-
woo._GLViewer.
views
()¶ Return list of all open
woo.qt.GLViewer
objects
woo.qt.ObjectEditor
¶
-
class
woo.qt.ObjectEditor.
AttrEditor
(getter=None, setter=None)[source]¶ Abstract base class handing some aspects common to all attribute editors. Holds exacly one attribute which is updated whenever it changes.
-
class
woo.qt.ObjectEditor.
AttrEditor_AlignedBox2
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_AlignedBox3
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_Matrix3
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_MatrixX
(parent, getter, setter, rows, cols, idxConverter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_MatrixXX
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_MatrixXi
(parent, getter, setter, rows, cols, idxConverter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_Vector2
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_Vector2i
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_Vector3
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_Vector3i
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_Vector6
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_Vector6i
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
AttrEditor_VectorX
(parent, getter, setter)[source]¶ idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []
-
class
woo.qt.ObjectEditor.
ObjQLabel
(parent, label, tooltip, path, ser=None, elide=False, searchSlot=None)[source]¶
-
class
woo.qt.ObjectEditor.
ObjectEditor
(ser, parent=None, ignoredAttrs={}, objAttrLabelList=None, showType=False, path=None, labelIsVar=True, showChecks=False, showUnits=False, objManip=True, nesting=0)[source]¶ Class displaying and modifying attributes of a woo object, or of unrelated attributes of different objects.
Construct window, ser is the object we want to show.
-
addAttrEntry
(obj, trait, klass, label=None)[source]¶ Return attribute entry where obj is the parent object, trait is the attribute trait, klass is the class of the attribute (as python type; if 1-tuple, list of those types). label is what will be shown in the UI; if omitted, trait.name will be used by default.
-
collections
= <module 'collections' from '/usr/lib/python3.8/collections/__init__.py'>¶
-
logging
= <module 'logging' from '/usr/lib/python3.8/logging/__init__.py'>¶
-
maxListLen
= 40¶
-
maxNest
= 6¶
-
-
class
woo.qt.ObjectEditor.
SeqFundamentalEditor
(parent, getter, setter, itemType)[source]¶ -
-
mapSeq2List
(s)[source]¶ return list (widget) index from given sequence (object) index. Return -1 if the item is not shown in the UI due to splitting.
-
maxShowLen
= 60¶
-
-
woo.qt.ObjectEditor.
SeqObject
¶
-
class
woo.qt.ObjectEditor.
SeqObjectComboBox
(parent, getter, setter, T, trait, path=None, shrink=False, nesting=0)[source]¶ -
-
maxShowLen
= 500¶
-
-
class
woo.qt.ObjectEditor.
WidgetUpdatesDisabled
(widget)[source]¶ Context manager/decorator for disabling updates of qt widgets temporarily
-
woo.qt.ObjectEditor.
makeLibraryBrowser
(parentmenu, callback, types, libName='Library')[source]¶ Create menu under parentmenu named libName. types are passed to
woo.objectlibrary.checkout
. callback is called with chosen (name,object) as arguments.
woo.qt.Inspector
¶
-
class
woo.qt.Inspector.
BodyInspector
(parId=None, parent=None, bodyLinkCallback=None, intrLinkCallback=None)[source]¶
woo.qt.DisplayProfiles
¶
Tip
Report issues or inclarities to github.