Browse Source

direct: Add more links to manual pages in module docstrings

See panda3d/panda3d-docs#53

[skip ci]
rdb 5 years ago
parent
commit
54238e9730

+ 5 - 1
direct/src/actor/Actor.py

@@ -1,4 +1,8 @@
-"""Actor module: contains the Actor class"""
+"""Actor module: contains the Actor class.
+
+See the :ref:`models-and-actors` page in the Programming Guide to learn
+more about loading models and animated actors.
+"""
 
 __all__ = ['Actor']
 

+ 3 - 0
direct/src/actor/__init__.py

@@ -4,4 +4,7 @@ distributed variant thereof.  Actor is a high-level interface around
 the lower-level :class:`panda3d.core.Character` implementation.
 It loads and controls an animated character and manages the animations
 playing on it.
+
+See the :ref:`models-and-actors` page in the Programming Guide to learn
+more about loading models and animated actors.
 """

+ 3 - 0
direct/src/distributed/__init__.py

@@ -2,4 +2,7 @@
 This package contains an implementation of the Distributed Networking
 API, a high-level networking system that automatically propagates
 changes made on distributed objects to interested clients.
+
+See the :ref:`distributed-networking` section of the Programming Guide to
+learn more about the distributed networking system.
 """

+ 2 - 1
direct/src/filter/CommonFilters.py

@@ -1,7 +1,8 @@
 """
 
 Class CommonFilters implements certain common image
-postprocessing filters.
+postprocessing filters.  See the :ref:`common-image-filters` page for
+more information about how to use these filters.
 
 It is not ideal that these filters are all included in a single
 monolithic module.  Unfortunately, when you want to apply two filters

+ 2 - 0
direct/src/filter/FilterManager.py

@@ -3,6 +3,8 @@
 The FilterManager is a convenience class that helps with the creation
 of render-to-texture buffers for image postprocessing applications.
 
+See :ref:`generalized-image-filters` for information on how to use this class.
+
 Still need to implement:
 
 * Make sure sort-order of buffers is correct.

+ 3 - 0
direct/src/filter/__init__.py

@@ -8,4 +8,7 @@ texture values as desired.
 The :class:`.CommonFilters` class contains various filters that are
 provided out of the box, whereas the :class:`.FilterManager` class
 is a lower-level class that allows you to set up your own filters.
+
+See the :ref:`render-to-texture-and-image-postprocessing` section of the
+Programming Guide to learn more about image postprocessing in Panda3D.
 """

+ 3 - 0
direct/src/showbase/__init__.py

@@ -0,0 +1,3 @@
+""" This package contains `.ShowBase`, an application framework responsible
+for opening a graphical display, setting up input devices and creating
+the scene graph. """

+ 2 - 1
direct/src/stdpy/__init__.py

@@ -1,5 +1,6 @@
 """
 This package contains various modules that provide a drop-in substitute
 for some of the built-in Python modules.  These substitutes make better
-use of Panda3D's virtual file system and threading system.
+use of Panda3D's :ref:`Virtual File System <virtual-file-system>` and
+:ref:`threading` system.
 """

+ 14 - 8
direct/src/tkpanels/Inspector.py

@@ -1,8 +1,15 @@
 """Inspectors allow you to visually browse through the members of
-various python objects.  To open an inspector, import this module, and
-execute inspector.inspect(anObject) I start IDLE with this command
-line: idle.py -c "from inspector import inspect"
-so that I can just type: inspect(anObject) any time."""
+various Python objects.  To open an inspector, import this module, and
+execute ``inspector.inspect(anObject)``.
+
+I start IDLE with this command line::
+
+   idle.py -c "from inspector import inspect"
+
+so that I can just type: ``inspect(anObject)`` any time.
+
+See :ref:`inspection-utilities` for more information.
+"""
 
 
 __all__ = ['inspect', 'inspectorFor', 'Inspector', 'ModuleInspector', 'ClassInspector', 'InstanceInspector', 'FunctionInspector', 'InstanceMethodInspector', 'CodeInspector', 'ComplexInspector', 'DictionaryInspector', 'SequenceInspector', 'SliceInspector', 'InspectorWindow']
@@ -13,6 +20,9 @@ import Pmw
 ### public API
 
 def inspect(anObject):
+    """Opens up a window for visually inspecting the details of a given Python
+    object.  See :ref:`inspection-utilities`.
+    """
     inspector = inspectorFor(anObject)
     inspectorWindow = InspectorWindow(inspector)
     inspectorWindow.open()
@@ -437,7 +447,3 @@ class InspectorWindow:
                 label = item,
                 command = lambda p = part, f = func: f(p))
         return popupMenu
-
-
-
-