misc doc edits

- remove recently added sphinx reference workaround.
- tested doxygen, correct some warnings, set tab width and added pymathutils group.
- added convenience target 'make doc_doxy'
This commit is contained in:
Campbell Barton 2011-11-05 01:48:10 +00:00
parent 6483069a84
commit 057bf2a02b
27 changed files with 57 additions and 63 deletions

View File

@ -151,6 +151,7 @@ help:
@echo ""
@echo "Documentation Targets (not assosiated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@echo " * doc_doxy - generate doxygen C/C++ docs"
@echo " * doc_dna - generate blender file format reference"
@echo " * doc_man - generate manpage"
@echo ""
@ -238,9 +239,13 @@ check_sparse:
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py:
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
cd doc/python_api ; sphinx-build -n -b html sphinx-in sphinx-out
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
doc_doxy:
cd doc/doxygen; doxygen
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna:
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"

View File

@ -193,7 +193,7 @@ SEPARATE_MEMBER_PAGES = NO
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
TAB_SIZE = 8
TAB_SIZE = 4
# This tag can be used to specify a number of aliases that acts
# as commands in the documentation. An alias has the form "name=value".

View File

@ -22,6 +22,10 @@
* \ingroup python
*/
/** \defgroup pymathutils Python Mathutils
* \ingroup python
*/
/** \defgroup pythonintern Python RNA and Operators
* \ingroup python
*/

View File

@ -150,10 +150,6 @@ def is_struct_seq(value):
return isinstance(value, tuple) and type(tuple) != tuple and hasattr(value, "n_fields")
def module_id_as_ref(name):
return "mod_" + name.replace(".", "__")
def undocumented_message(module_name, type_name, identifier):
if str(type_name).startswith('<module'):
preloadtitle = '%s.%s' % (module_name, identifier)
@ -391,10 +387,6 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
write_title(fw, "%s (%s)" % (title, module_name), "=")
# write reference, annoying since we should be able to direct reference the
# modules but we cant always!
fw(".. _%s:\n\n" % module_id_as_ref(module_name))
fw(".. module:: %s\n\n" % module_name)
if module.__doc__:
@ -453,21 +445,20 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
if type(descr) == MemberDescriptorType:
if descr.__doc__:
value = getattr(module, key, None)
value_type = type(value)
descr_sorted.append((key, descr, value, type(value)))
# sort by the valye type
descr_sorted.sort(key=lambda descr_data: str(descr_data[3]))
for key, descr, value, value_type in descr_sorted:
# must be documented as a submodule
if is_struct_seq(value):
continue
type_name = value_type.__name__
py_descr2sphinx("", fw, descr, module_name, type_name, key)
if is_struct_seq(value):
# ack, cant use typical reference because we double up once here
# and one fort he module!
full_name = "%s.%s" % (module_name, type_name)
fw(" :ref:`%s submodule details <%s>`\n\n\n" % (full_name, module_id_as_ref(full_name)))
del full_name
attribute_set.add(key)
del key, descr, descr_sorted

View File

@ -454,7 +454,7 @@ extern float* AUD_readSoundBuffer(const char* filename, float low, float high,
/**
* Pauses a playing sound after a specific amount of time.
* \param handle The handle to the sound.
* \param time The time in seconds.
* \param seconds The time in seconds.
* \return The silence handle.
*/
extern AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds);

View File

@ -52,15 +52,15 @@ struct GHOST_Buttons {
/**
* Returns the state of a single button.
* @param mask. Key button to return.
* @param mask Key button to return.
* @return The state of the button (pressed == true).
*/
virtual bool get(GHOST_TButtonMask mask) const;
/**
* Updates the state of a single button.
* @param mask. Button state to update.
* @param down. The new state of the button.
* @param mask Button state to update.
* @param down The new state of the button.
*/
virtual void set(GHOST_TButtonMask mask, bool down);

View File

@ -72,7 +72,7 @@ public:
/**
* Returns the number of display settings for this display device.
* @param display The index of the display to query with 0 <= display < getNumDisplays().
* @param setting The number of settings of the display device with this index.
* @param numSettings The number of settings of the display device with this index.
* @return Indication of success.
*/
virtual GHOST_TSuccess getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const;

View File

@ -26,7 +26,7 @@
*/
/** \file ghost/intern/GHOST_EventWheel.h
* \ingroup GHOSTeel.h
* \ingroup GHOST
* Declaration of GHOST_EventWheel class.
*/

View File

@ -2812,12 +2812,7 @@ void CURVE_OT_select_inverse(wmOperatorType *ot)
/** Divide the line segments associated with the currently selected
* curve nodes (Bezier or NURB). If there are no valid segment
* selections within the current selection, nothing happens.
*
* @deffunc subdividenurb subdivideNurb(void)
* @return Nothing
* @param None
*/
*/
static void subdividenurb(Object *obedit, int number_cuts)
{
Curve *cu= obedit->data;

View File

@ -130,7 +130,6 @@ void ED_view3d_win_to_segment_clip(struct ARegion *ar, struct View3D *v3d, const
* In orthographic view the resulting ray_normal will match the view vector.
* @param ar The region (used for the window width and height).
* @param v3d The 3d viewport (used for near clipping value).
* @param out The resulting normalized world-space direction vector.
* @param mval The area relative 2d location (such as event->mval, converted into float[2]).
* @param ray_start The world-space starting point of the segment.
* @param ray_normal The normalized world-space direction of towards mval.
@ -140,7 +139,7 @@ void ED_view3d_win_to_ray(struct ARegion *ar, struct View3D *v3d, const float mv
/**
* Calculate a normalized 3d direction vector from the viewpoint towards a global location.
* In orthographic view the resulting vector will match the view vector.
* @param ar The region (used for the window width and height).
* @param rv3d The region (used for the window width and height).
* @param coord The world-space location.
* @param vec The resulting normalized vector.
*/
@ -171,6 +170,7 @@ void ED_view3d_from_m4(float mat[][4], float ofs[3], float quat[4], float *dist)
* @param ofs The view offset to be set, normally from RegionView3D.ofs.
* @param quat The view rotation to be set, quaternion normally from RegionView3D.viewquat.
* @param dist The view distance from ofs to be set, normally from RegionView3D.dist.
* @param lens The view lens angle set for cameras and lamps, normally from View3D.lens.
*/
void ED_view3d_from_object(struct Object *ob, float ofs[3], float quat[4], float *dist, float *lens);

View File

@ -25,7 +25,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/blenkernel/intern/moviecache.c
/** \file blender/imbuf/intern/moviecache.c
* \ingroup bke
*/

View File

@ -25,8 +25,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/generic/mathutils.c
* \ingroup pygen
/** \file blender/python/mathutils/mathutils.c
* \ingroup pymathutils
*/
#include <Python.h>

View File

@ -26,8 +26,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/generic/mathutils.h
* \ingroup pygen
/** \file blender/python/mathutils/mathutils.h
* \ingroup pymathutils
*/
//Include this file for access to vector, quat, matrix, euler, etc...

View File

@ -21,8 +21,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/generic/mathutils_Color.c
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Color.c
* \ingroup pymathutils
*/

View File

@ -27,8 +27,8 @@
*
*/
/** \file blender/python/generic/mathutils_Color.h
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Color.h
* \ingroup pymathutils
*/

View File

@ -25,8 +25,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/generic/mathutils_Euler.c
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Euler.c
* \ingroup pymathutils
*/

View File

@ -27,8 +27,8 @@
*
*/
/** \file blender/python/generic/mathutils_Euler.h
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Euler.h
* \ingroup pymathutils
*/

View File

@ -24,8 +24,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/generic/mathutils_Matrix.c
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Matrix.c
* \ingroup pymathutils
*/

View File

@ -26,8 +26,8 @@
*
*/
/** \file blender/python/generic/mathutils_Matrix.h
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Matrix.h
* \ingroup pymathutils
*/

View File

@ -24,8 +24,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/generic/mathutils_Quaternion.c
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Quaternion.c
* \ingroup pymathutils
*/

View File

@ -27,8 +27,8 @@
*
*/
/** \file blender/python/generic/mathutils_Quaternion.h
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Quaternion.h
* \ingroup pymathutils
*/

View File

@ -24,8 +24,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/generic/mathutils_Vector.c
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Vector.c
* \ingroup pymathutils
*/

View File

@ -27,8 +27,8 @@
*
*/
/** \file blender/python/generic/mathutils_Vector.h
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_Vector.h
* \ingroup pymathutils
*/

View File

@ -26,8 +26,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/generic/mathutils_geometry.c
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_geometry.c
* \ingroup pymathutils
*/

View File

@ -26,8 +26,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/generic/mathutils_geometry.h
* \ingroup pygen
/** \file blender/python/mathutils/mathutils_geometry.h
* \ingroup pymathutils
*/
/*Include this file for access to vector, quat, matrix, euler, etc...*/

View File

@ -26,7 +26,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/render/intern/pipeline/engine.c
/** \file blender/render/intern/source/external_engine.c
* \ingroup render
*/

View File

@ -387,8 +387,7 @@ public:
void SetUseOverrideFrameColor(bool overrideFrameColor);
/**
* Enables/disables the use of the framing bar color of the Blender file's scenes.
* @param useSceneFrameColor The new setting.
* Check if the frame color is being overridden.
*/
bool GetUseOverrideFrameColor(void) const;