diff options
Diffstat (limited to 'silx/gui/plot3d/scene/core.py')
-rw-r--r-- | silx/gui/plot3d/scene/core.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/silx/gui/plot3d/scene/core.py b/silx/gui/plot3d/scene/core.py index a293f28..43838fe 100644 --- a/silx/gui/plot3d/scene/core.py +++ b/silx/gui/plot3d/scene/core.py @@ -1,7 +1,7 @@ # coding: utf-8 # /*########################################################################## # -# Copyright (c) 2015-2017 European Synchrotron Radiation Facility +# Copyright (c) 2015-2019 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -112,6 +112,15 @@ class Base(event.Notifier): return root if isinstance(root, Viewport) else None @property + def root(self): + """The root node of the scene. + + If attached to a :class:`Viewport`, this is the item right under it + """ + path = self.path + return path[1] if isinstance(path[0], Viewport) else path[0] + + @property def objectToNDCTransform(self): """Transform from object to normalized device coordinates. |