how to generate reference documentation locally

Because for some time online reference documentation (both python and c++) is partially missing, i’m trying to generate it on my machine.
For c++ I solved some way with doxygen using “panda3d/direct/src/directscripts/Doxyfile.cxx” file and giving the source tree directory.
For python I saw there are some scripts in “panda3d/direct/src/directscripts” (gendocs.py, extract_docs) but don’t know if and how to use them ( I tried to search the forums with no luck).
Help is appreciated.

First run direct/src/directscripts/extract_docs.py to generate pandadoc.hpp, which is basically a big header file mimicking the Python interfaces of the “panda3d” tree using fake C++ declarations. We need to do this in order to preserve things like type annotations and overloads in the generated documentation.
It uses the .in files (interrogate database) that are in pandac/input which contain a description of the interfaces we expose from C++ to Python.

Then run the Doxyfile.python with doxygen to generate the Python documentation from both pandadoc.hpp and the direct tree.

gendocs is not used. It was used to generate the old API ref at panda3d.org/apiref.php?page=classes

I built latest commit of panda with

makepanda/makepanda.py --verbose --everything --no-fftw --optimize 3 --installer

installed it and then run these commands from within top source tree

python direct/src/directscripts/extract_docs.py
doxygen direct/src/directscripts/Doxyfile.python

A little flaw: extract_docs.py issues this message

I don't know what type BitMaskNative is

Apart from this, all docs seem correctly generated .

Thanks

Hi I hope you are having a good day.

Is this thread about creating offline panda3d documentation and API?
If so how is that done I read the above statements but I don’t understand most of them if any at all.

Thanks, Any Help or Solutions will be greatly appreciated

Above commands are run on linux (debian). On windows, i don’t know , but may be they are no such different.

Just cd to the directory of the Panda3D installation, run direct/directscripts/extract_docs.py, and then open the Doxyfile.python with doxygen (it has a GUI front-end). Specify the directory of the Panda3D installation as working directory.

Hi I hope you are having a good day.

Thanks everyone I appreciate the help.
After running the “extract_docs.py” I got the following errors
“DLL loader cannot find libp3awesomium, DLL loader cannot find
libpandaspeedtree, DLL load failed: The specified module could be found”

Thanks, Any help or Solutions will be greatly appreciated.

That’s fine. Those are optional modules. Are they ignorable warnings or do they interrupt the process?

I am not sure, but it looks like they are. How do I open the doxyfile with doxygen (apologies I am still not used to panda3D).
What do you mean by “it has a GUI front-end”

There is no file by the name of doxygen, there’s a doxygen_filter, a doxyfile(a c++ file) and a doxyfile.python.

Just download and install doxygen from here:
stack.nl/~dimitri/doxygen/download.html

Thanks, I really appreciate the Help.

I’m trying to generate updated docs from latest git source, but when executing

python direct/src/directscripts/extract_docs.py

I get this error:

Traceback (most recent call last):
  File "direct/src/directscripts/extract_docs.py", line 12, in <module>
    from panda3d.dtoolconfig import *
ImportError: dynamic module does not define init function (initdtoolconfig)

Thanks, I’d changed symbol visibity semantics but had overlooked the init function of the dtoolconfig module. Checked in a fix.