├── .gitignore
├── Makefile
├── README.md
└── source
├── conf.py
└── index.rst
/.gitignore:
--------------------------------------------------------------------------------
1 | python2.7libs
2 | build
3 | _sources
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = sphinx-build
7 | SPHINXPROJ = HoudiniPythonmodules
8 | SOURCEDIR = source
9 | BUILDDIR = build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Houdini additional Python documentation
2 | *Additional documentation of Houdini Python modules*
3 |
4 |
5 |
6 | Info
7 | ----
8 | [Generated documentation can be found here](https://jtomori.github.io/houdini_additional_python_docs/)
9 |
10 | If you did some scripting in Houdini, then chances are that you have found [*toolutils*](https://jtomori.github.io/houdini_additional_python_docs/toolutils.html) module quite handy. But searching in Houdini online help is not very helpful, you will not find much information about it. Maybe some useful code snippets, but not its documentation.
11 |
12 | As it turns out there are some handy modules coming with Houdini, but they can be a bit hidden to many users. So I decided to do a small project and auto-generate documentation from docstrings from those modules. I used [*Sphinx*](http://www.sphinx-doc.org/en/master/) for this.
13 |
14 | Current documentation was generated from `Houdini 16.5.496`
15 |
16 |
17 | Update
18 | ------
19 | My initial approach involved using `hython` as interpreter for `sphinx-build` and I was deleting modules which would not import.
20 |
21 | It is not needed anymore since I found out [autodoc_mock_imports](http://www.sphinx-doc.org/en/master/ext/autodoc.html#confval-autodoc_mock_imports) option which you can find in [conf.py](./source/conf.py). This means that listed modules will not be documented, but all modules that depend on them will be documented fine (they will be importable by *Sphinx*). This allowed me to generate documentation for much more modules. It is still not perfect, but if you have any suggestions, then you are most welcome to let me know :).
22 |
23 |
24 | Guide (linux)
25 | -------------
26 |
27 | * Install *Sphinx* (e.g. using *pip*)
28 | ```
29 | $ pip install sphinx
30 | ```
31 |
32 | * Clone this repo and enter it
33 | ```
34 | $ git clone https://github.com/jtomori/houdini_additional_python_docs.git
35 | $ cd houdini_additional_python_docs
36 | ```
37 |
38 | * Copy Python files from Houdini: `$HH/python2.7libs`
39 | ```
40 | $ cp -r $HH/python2.7libs .
41 | ```
42 | `$HH` will be present after sourcing Houdini environment, if you are outside of Houdini environment, then replace `$HH` with your Houdini installation directory, e.g.:
43 | ```
44 | $ cp -r /opt/hfsXX.X.XXX/houdini/python2.7libs .
45 | ```
46 |
47 | Some of the modules do not need to be documented, so delete them
48 | ```
49 | $ rm -r python2.7libs/whoosh python2.7libs/hou.py
50 | ```
51 |
52 | Those two modules are already documented
53 | * [hou](http://www.sidefx.com/docs/houdini/hom/hou/)
54 | * [whoosh](http://whoosh.readthedocs.io/en/latest/)
55 |
56 | * Generate *rst* files from modules
57 | ```
58 | $ sphinx-apidoc -o source python2.7libs
59 | ```
60 |
61 | * Build html documentation
62 | ```
63 | $ make html
64 | ```
65 |
66 | * Now you have nice online documentation of Houdini Python modules, you will find it in `build/html` directory. You can push it to `gh-pages` branch.
--------------------------------------------------------------------------------
/source/conf.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # Configuration file for the Sphinx documentation builder.
4 | #
5 | # This file does only contain a selection of the most common options. For a
6 | # full list see the documentation:
7 | # http://www.sphinx-doc.org/en/master/config
8 |
9 | # -- Path setup --------------------------------------------------------------
10 |
11 | # If extensions (or modules to document with autodoc) are in another directory,
12 | # add these directories to sys.path here. If the directory is relative to the
13 | # documentation root, use os.path.abspath to make it absolute, like shown here.
14 | #
15 | import os
16 | import sys
17 | sys.path.insert(0, os.path.abspath('../python2.7libs'))
18 |
19 |
20 | autodoc_mock_imports = ["OpenGL", "PySide2", "PyQt4", "hou", "whoosh", "assetauthortools", "defaulttoolmenus", "autorigs.modules.master.masterModule", "autorigs.modules.spine.spineModule", "autorigs.modules.arm.armModule", "autorigs.modules.head.headModule", "autorigs.modules.basicFace.jaw.jawModule", "autorigs.modules.leg.legModule", "autorigs.modules.quadHead.quadHeadModule", "autorigs.modules.quadleg.quadLegModule", "autorigs.modules.simpleexample1.simpleModule", "autorigs.modules.tail.tailModule", "bookish.search", "autorigs.modules.foot.footModule", "autorigs.modules.hand.handModule", "autorigs.asset.geometry.buildGeometryGuide", "autorigs.modules.basicFace.basicFaceModule", "autorigs.modules.quadFoot.quadFootModule", "flask", "charpicker.cpglobals", "charpicker.mainwidget", "generateHDAToolsForOTL", "generate_proto", "opnode_sum", "perfmon_sum", "click", "houpythonportion", "hdefereval", "houdinihelp.cli", "rpyc", "mako"]
21 |
22 |
23 | # -- Project information -----------------------------------------------------
24 |
25 | project = u'Houdini Python modules'
26 | copyright = u'2018, jtomori'
27 | author = u'jtomori'
28 |
29 | # The short X.Y version
30 | version = u''
31 | # The full version, including alpha/beta/rc tags
32 | release = u'16.5.496'
33 |
34 |
35 | # -- General configuration ---------------------------------------------------
36 |
37 | # If your documentation needs a minimal Sphinx version, state it here.
38 | #
39 | # needs_sphinx = '1.0'
40 |
41 | # Add any Sphinx extension module names here, as strings. They can be
42 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
43 | # ones.
44 | extensions = [
45 | 'sphinx.ext.autodoc',
46 | 'sphinx.ext.githubpages',
47 | ]
48 |
49 | # Add any paths that contain templates here, relative to this directory.
50 | templates_path = ['_templates']
51 |
52 | # The suffix(es) of source filenames.
53 | # You can specify multiple suffix as a list of string:
54 | #
55 | # source_suffix = ['.rst', '.md']
56 | source_suffix = '.rst'
57 |
58 | # The master toctree document.
59 | master_doc = 'index'
60 |
61 | # The language for content autogenerated by Sphinx. Refer to documentation
62 | # for a list of supported languages.
63 | #
64 | # This is also used if you do content translation via gettext catalogs.
65 | # Usually you set "language" from the command line for these cases.
66 | language = None
67 |
68 | # List of patterns, relative to source directory, that match files and
69 | # directories to ignore when looking for source files.
70 | # This pattern also affects html_static_path and html_extra_path .
71 | exclude_patterns = []
72 |
73 | # The name of the Pygments (syntax highlighting) style to use.
74 | pygments_style = 'sphinx'
75 |
76 |
77 | # -- Options for HTML output -------------------------------------------------
78 |
79 | # The theme to use for HTML and HTML Help pages. See the documentation for
80 | # a list of builtin themes.
81 | #
82 | html_theme = 'alabaster'
83 |
84 | # Theme options are theme-specific and customize the look and feel of a theme
85 | # further. For a list of options available for each theme, see the
86 | # documentation.
87 | #
88 | # html_theme_options = {}
89 |
90 | # Add any paths that contain custom static files (such as style sheets) here,
91 | # relative to this directory. They are copied after the builtin static files,
92 | # so a file named "default.css" will overwrite the builtin "default.css".
93 | html_static_path = ['_static']
94 |
95 | # Custom sidebar templates, must be a dictionary that maps document names
96 | # to template names.
97 | #
98 | # The default sidebars (for documents that don't match any pattern) are
99 | # defined by theme itself. Builtin themes are using these templates by
100 | # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
101 | # 'searchbox.html']``.
102 | #
103 | # html_sidebars = {}
104 |
105 |
106 | # -- Options for HTMLHelp output ---------------------------------------------
107 |
108 | # Output file base name for HTML help builder.
109 | htmlhelp_basename = 'HoudiniPythonmodulesdoc'
110 |
111 |
112 | # -- Options for LaTeX output ------------------------------------------------
113 |
114 | latex_elements = {
115 | # The paper size ('letterpaper' or 'a4paper').
116 | #
117 | # 'papersize': 'letterpaper',
118 |
119 | # The font size ('10pt', '11pt' or '12pt').
120 | #
121 | # 'pointsize': '10pt',
122 |
123 | # Additional stuff for the LaTeX preamble.
124 | #
125 | # 'preamble': '',
126 |
127 | # Latex figure (float) alignment
128 | #
129 | # 'figure_align': 'htbp',
130 | }
131 |
132 | # Grouping the document tree into LaTeX files. List of tuples
133 | # (source start file, target name, title,
134 | # author, documentclass [howto, manual, or own class]).
135 | latex_documents = [
136 | (master_doc, 'HoudiniPythonmodules.tex', u'Houdini Python modules Documentation',
137 | u'jtomori', 'manual'),
138 | ]
139 |
140 |
141 | # -- Options for manual page output ------------------------------------------
142 |
143 | # One entry per manual page. List of tuples
144 | # (source start file, name, description, authors, manual section).
145 | man_pages = [
146 | (master_doc, 'houdinipythonmodules', u'Houdini Python modules Documentation',
147 | [author], 1)
148 | ]
149 |
150 |
151 | # -- Options for Texinfo output ----------------------------------------------
152 |
153 | # Grouping the document tree into Texinfo files. List of tuples
154 | # (source start file, target name, title, author,
155 | # dir menu entry, description, category)
156 | texinfo_documents = [
157 | (master_doc, 'HoudiniPythonmodules', u'Houdini Python modules Documentation',
158 | author, 'HoudiniPythonmodules', 'One line description of project.',
159 | 'Miscellaneous'),
160 | ]
161 |
162 |
163 | # -- Extension configuration -------------------------------------------------
164 |
--------------------------------------------------------------------------------
/source/index.rst:
--------------------------------------------------------------------------------
1 | .. Houdini Python modules documentation master file, created by
2 | sphinx-quickstart on Thu Jun 21 18:54:31 2018.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | Welcome to Houdini Python modules's documentation!
7 | ==================================================
8 |
9 | .. toctree::
10 | :maxdepth: 3
11 | :caption: Contents:
12 |
13 | modules
14 |
15 | Indices and tables
16 | ==================
17 |
18 | * :ref:`genindex`
19 | * :ref:`modindex`
20 | * :ref:`search`
21 |
--------------------------------------------------------------------------------