From 66655aae856f96437184e058a52b1b4a9e1b24a2 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 21 Jan 2019 15:31:54 +0100 Subject: [PATCH 1/4] device: fix incorrect features when printing InputDevice --- panda/src/device/inputDevice.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/panda/src/device/inputDevice.cxx b/panda/src/device/inputDevice.cxx index 130854834e..cce2f975b4 100644 --- a/panda/src/device/inputDevice.cxx +++ b/panda/src/device/inputDevice.cxx @@ -404,19 +404,19 @@ output(std::ostream &out) const { << (_axes.size() != 1 ? 'e' : 'i') << 's'; } - if (_features & (unsigned int)Feature::pointer) { + if (_features & (1 << (unsigned int)Feature::pointer)) { out << ", pointer"; } - if (_features & (unsigned int)Feature::keyboard) { + if (_features & (1 << (unsigned int)Feature::keyboard)) { out << ", keyboard"; } - if (_features & (unsigned int)Feature::tracker) { + if (_features & (1 << (unsigned int)Feature::tracker)) { out << ", tracker"; } - if (_features & (unsigned int)Feature::vibration) { + if (_features & (1 << (unsigned int)Feature::vibration)) { out << ", vibration"; } - if (_features & (unsigned int)Feature::battery) { + if (_features & (1 << (unsigned int)Feature::battery)) { out << ", battery"; if (_battery_data.level > 0 && _battery_data.max_level > 0) { From 9d12a4c43716d3ac0c1e53ced1e0fd847cbafd81 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 23 Jan 2019 22:24:02 +0100 Subject: [PATCH 2/4] general: improvements to doxygen API reference: * In C++ reference, only pick up classes defined in .h file * Add a few excludes to C++ reference that aren't public API * On class index pages, reduce number of columns * Add @since for some methods/classes that are new in 1.10.0 * Fix/improve a few docstrings here and there --- direct/src/directscripts/Doxyfile.cxx | 18 ++++++++++--- direct/src/directscripts/Doxyfile.python | 2 +- panda/src/device/evdevInputDevice.h | 2 ++ panda/src/device/inputDevice.h | 2 ++ panda/src/device/inputDeviceManager.h | 2 ++ panda/src/device/linuxJoystickDevice.h | 2 ++ panda/src/device/winRawInputDevice.h | 2 ++ panda/src/device/xInputDevice.h | 2 ++ panda/src/egg/eggMaterial.I | 32 ++++++++++++----------- panda/src/event/asyncFuture.h | 2 ++ panda/src/express/weakPointerTo.I | 9 ++++++- panda/src/express/weakPointerToBase.I | 2 +- panda/src/express/weakReferenceList.I | 6 +++++ panda/src/express/weakReferenceList.cxx | 6 +++++ panda/src/gobj/geom.I | 2 ++ panda/src/gobj/geom.cxx | 2 ++ panda/src/gobj/geomLinesAdjacency.h | 2 ++ panda/src/gobj/geomLinestripsAdjacency.h | 4 ++- panda/src/gobj/geomPrimitive.cxx | 2 ++ panda/src/gobj/geomTrianglesAdjacency.h | 2 ++ panda/src/gobj/geomTristripsAdjacency.h | 4 ++- panda/src/gobj/shaderBuffer.h | 2 ++ panda/src/gobj/texture.I | 4 +++ panda/src/movies/flacAudio.h | 2 ++ panda/src/movies/flacAudioCursor.h | 6 +++-- panda/src/movies/opusAudio.h | 2 ++ panda/src/movies/opusAudioCursor.h | 3 +++ panda/src/pgraph/light.I | 4 +++ panda/src/pgraph/light.cxx | 2 ++ panda/src/pgraph/logicOpAttrib.h | 2 ++ panda/src/pgraphnodes/rectangleLight.h | 2 ++ panda/src/pgraphnodes/shaderGenerator.cxx | 4 +++ panda/src/pgraphnodes/sphereLight.h | 2 ++ panda/src/text/textProperties.I | 8 +++++- 34 files changed, 123 insertions(+), 27 deletions(-) diff --git a/direct/src/directscripts/Doxyfile.cxx b/direct/src/directscripts/Doxyfile.cxx index 6c81025960..db71c81b3b 100644 --- a/direct/src/directscripts/Doxyfile.cxx +++ b/direct/src/directscripts/Doxyfile.cxx @@ -432,7 +432,7 @@ EXTRACT_STATIC = NO # for Java sources. # The default value is: YES. -EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_CLASSES = NO # This flag is only useful for Objective-C code. When set to YES local methods, # which are defined in the implementation section but not in the interface are @@ -802,6 +802,11 @@ EXCLUDE = dtool/src/parser-inc \ panda/src/iphone \ panda/src/tinydisplay \ panda/src/movies/dr_flac.h \ + panda/src/windisplay/winDetectDx.h \ + panda/src/wgldisplay/wglext.h \ + panda/src/glxdisplay/panda_glxext.h \ + pandatool/src/gtk-stats \ + dtool/src/dtoolbase/fakestringstream.h \ dtool/src/dtoolbase/pdtoa.cxx \ dtool/src/dtoolutil/panda_getopt_long.h \ dtool/src/dtoolutil/panda_getopt_impl.h \ @@ -840,7 +845,10 @@ EXCLUDE_PATTERNS = */Opt*-*/* \ # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = InterrogateFunctionWrapper::Parameter \ + CollisionFloorMesh::TriangleIndices \ + tagTOUCHINPUT \ + WINDOW_METRICS # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include @@ -1018,7 +1026,7 @@ ALPHABETICAL_INDEX = YES # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. -COLS_IN_ALPHA_INDEX = 5 +COLS_IN_ALPHA_INDEX = 3 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag @@ -1972,6 +1980,7 @@ INCLUDE_FILE_PATTERNS = PREDEFINED = TVOLATILE= \ INLINE=inline \ + ALWAYS_INLINE=inline \ PUBLISHED=public \ protected=private \ INLINE_LINMATH=inline \ @@ -1986,7 +1995,8 @@ PREDEFINED = TVOLATILE= \ MAKE_SEQ(x)= \ MAKE_SEQ_PROPERTY(x)= \ MAKE_MAP_PROPERTY(x)= \ - MAKE_MAP_KEYS_SEQ(x)= + MAKE_MAP_KEYS_SEQ(x)= \ + RETURNS_ALIGNED(x)= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/direct/src/directscripts/Doxyfile.python b/direct/src/directscripts/Doxyfile.python index 2119f7b321..170c3917c1 100644 --- a/direct/src/directscripts/Doxyfile.python +++ b/direct/src/directscripts/Doxyfile.python @@ -805,7 +805,7 @@ ALPHABETICAL_INDEX = YES # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) -COLS_IN_ALPHA_INDEX = 5 +COLS_IN_ALPHA_INDEX = 2 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. diff --git a/panda/src/device/evdevInputDevice.h b/panda/src/device/evdevInputDevice.h index ffc3503ff0..ce9e152cdc 100644 --- a/panda/src/device/evdevInputDevice.h +++ b/panda/src/device/evdevInputDevice.h @@ -24,6 +24,8 @@ class LinuxInputDeviceManager; * This is a type of device that uses the Linux /dev/input/event# API to read * data from a raw mouse or other input device. Unlike the joystick API, the * evdev API supports sending force feedback (ie. rumble) events. + * + * @since 1.10.0 */ class EXPCL_PANDA_DEVICE EvdevInputDevice : public InputDevice { public: diff --git a/panda/src/device/inputDevice.h b/panda/src/device/inputDevice.h index 3e4e37313e..f3f500e378 100644 --- a/panda/src/device/inputDevice.h +++ b/panda/src/device/inputDevice.h @@ -47,6 +47,8 @@ * There is the DeviceType enumeration, however, which will (if known) contain * identification of the general category of devices this fits in, such as * keyboard, mouse, gamepad, or flight stick. + * + * @since 1.10.0 */ class EXPCL_PANDA_DEVICE InputDevice : public TypedReferenceCount { PUBLISHED: diff --git a/panda/src/device/inputDeviceManager.h b/panda/src/device/inputDeviceManager.h index 7fd69b804e..66381c79e0 100644 --- a/panda/src/device/inputDeviceManager.h +++ b/panda/src/device/inputDeviceManager.h @@ -27,6 +27,8 @@ class WinRawInputDevice; /** * This class keeps track of all the devices on a system, and sends out events * when a device has been hot-plugged. + * + * @since 1.10.0 */ class EXPCL_PANDA_DEVICE InputDeviceManager { protected: diff --git a/panda/src/device/linuxJoystickDevice.h b/panda/src/device/linuxJoystickDevice.h index 61d05cd3e8..cf56e27b58 100644 --- a/panda/src/device/linuxJoystickDevice.h +++ b/panda/src/device/linuxJoystickDevice.h @@ -23,6 +23,8 @@ class LinuxInputDeviceManager; /** * This is a type of device that uses the Linux /dev/input/js# API to read * data from a game controller. + * + * @since 1.10.0 */ class EXPCL_PANDA_DEVICE LinuxJoystickDevice : public InputDevice { PUBLISHED: diff --git a/panda/src/device/winRawInputDevice.h b/panda/src/device/winRawInputDevice.h index ce4fe9a19c..bea8066b85 100644 --- a/panda/src/device/winRawInputDevice.h +++ b/panda/src/device/winRawInputDevice.h @@ -25,6 +25,8 @@ class WinInputDeviceManager; /** * This implementation of InputDevice uses the Win32 raw input API and the HID * parser library to support a wide range of devices. + * + * @since 1.10.0 */ class EXPCL_PANDA_DEVICE WinRawInputDevice final : public InputDevice { public: diff --git a/panda/src/device/xInputDevice.h b/panda/src/device/xInputDevice.h index 0bf3900ec4..2088c19182 100644 --- a/panda/src/device/xInputDevice.h +++ b/panda/src/device/xInputDevice.h @@ -31,6 +31,8 @@ typedef struct tagRID_DEVICE_INFO RID_DEVICE_INFO; /** * This implementation of InputDevice uses Microsoft's XInput library to * interface with an Xbox 360 game controller. + * + * @since 1.10.0 */ class EXPCL_PANDA_DEVICE XInputDevice final : public InputDevice { public: diff --git a/panda/src/egg/eggMaterial.I b/panda/src/egg/eggMaterial.I index f12a50c00d..7c49c2bd98 100644 --- a/panda/src/egg/eggMaterial.I +++ b/panda/src/egg/eggMaterial.I @@ -12,7 +12,7 @@ */ /** - * + * @since 1.10.0 */ INLINE void EggMaterial:: set_base(const LColor &base) { @@ -21,7 +21,7 @@ set_base(const LColor &base) { } /** - * + * @since 1.10.0 */ INLINE void EggMaterial:: clear_base() { @@ -29,7 +29,7 @@ clear_base() { } /** - * + * @since 1.10.0 */ INLINE bool EggMaterial:: has_base() const { @@ -39,6 +39,8 @@ has_base() const { /** * It is legal to call this even if has_base() returns false. If so, it * simply returns the default base color. + * + * @since 1.10.0 */ INLINE LColor EggMaterial:: get_base() const { @@ -239,7 +241,7 @@ get_shininess() const { } /** - * + * @since 1.10.0 */ INLINE void EggMaterial:: set_roughness(double roughness) { @@ -248,7 +250,7 @@ set_roughness(double roughness) { } /** - * + * @since 1.10.0 */ INLINE void EggMaterial:: clear_roughness() { @@ -256,7 +258,7 @@ clear_roughness() { } /** - * + * @since 1.10.0 */ INLINE bool EggMaterial:: has_roughness() const { @@ -264,7 +266,7 @@ has_roughness() const { } /** - * + * @since 1.10.0 */ INLINE double EggMaterial:: get_roughness() const { @@ -276,7 +278,7 @@ get_roughness() const { } /** - * + * @since 1.10.0 */ INLINE void EggMaterial:: set_metallic(double metallic) { @@ -285,7 +287,7 @@ set_metallic(double metallic) { } /** - * + * @since 1.10.0 */ INLINE void EggMaterial:: clear_metallic() { @@ -293,7 +295,7 @@ clear_metallic() { } /** - * + * @since 1.10.0 */ INLINE bool EggMaterial:: has_metallic() const { @@ -301,7 +303,7 @@ has_metallic() const { } /** - * + * @since 1.10.0 */ INLINE double EggMaterial:: get_metallic() const { @@ -313,7 +315,7 @@ get_metallic() const { } /** - * + * @since 1.10.0 */ INLINE void EggMaterial:: set_ior(double ior) { @@ -322,7 +324,7 @@ set_ior(double ior) { } /** - * + * @since 1.10.0 */ INLINE void EggMaterial:: clear_ior() { @@ -330,7 +332,7 @@ clear_ior() { } /** - * + * @since 1.10.0 */ INLINE bool EggMaterial:: has_ior() const { @@ -338,7 +340,7 @@ has_ior() const { } /** - * + * @since 1.10.0 */ INLINE double EggMaterial:: get_ior() const { diff --git a/panda/src/event/asyncFuture.h b/panda/src/event/asyncFuture.h index 27cab7b585..c12bccb7d0 100644 --- a/panda/src/event/asyncFuture.h +++ b/panda/src/event/asyncFuture.h @@ -55,6 +55,8 @@ class ConditionVarFull; * coroutine, which only suspends the current task and not the entire thread. * * This API aims to mirror and be compatible with Python's Future class. + * + * @since 1.10.0 */ class EXPCL_PANDA_EVENT AsyncFuture : public TypedReferenceCount { PUBLISHED: diff --git a/panda/src/express/weakPointerTo.I b/panda/src/express/weakPointerTo.I index 8d60057c31..316fe8ca71 100644 --- a/panda/src/express/weakPointerTo.I +++ b/panda/src/express/weakPointerTo.I @@ -118,9 +118,11 @@ operator T * () const { /** * A thread-safe way to access the underlying pointer; will silently return * null if the underlying pointer was deleted or null. - * Note that this may return null even if was_deleted() still returns true, + * Note that this may return null even if was_deleted() still returns false, * which can occur if the object has reached reference count 0 and is about to * be destroyed. + * + * @since 1.10.0 */ template INLINE PointerTo WeakPointerTo:: @@ -397,6 +399,11 @@ operator const T * () const { /** * A thread-safe way to access the underlying pointer; will silently return * null if the underlying pointer was deleted or null. + * Note that this may return null even if was_deleted() still returns false, + * which can occur if the object has reached reference count 0 and is about to + * be destroyed. + * + * @since 1.10.0 */ template INLINE ConstPointerTo WeakConstPointerTo:: diff --git a/panda/src/express/weakPointerToBase.I b/panda/src/express/weakPointerToBase.I index 5673114764..3b27047da1 100644 --- a/panda/src/express/weakPointerToBase.I +++ b/panda/src/express/weakPointerToBase.I @@ -290,7 +290,7 @@ update_type(To *ptr) { * A thread-safe way to access the underlying pointer; will only write to the * given pointer if the underlying pointer has not yet been deleted and is not * null. Note that it may leave the pointer unassigned even if was_deleted() - * still returns true, which can occur if the object has reached reference + * still returns false, which can occur if the object has reached reference * count 0 and is about to be destroyed. */ template diff --git a/panda/src/express/weakReferenceList.I b/panda/src/express/weakReferenceList.I index 0e4efc8c52..eb6e7b9976 100644 --- a/panda/src/express/weakReferenceList.I +++ b/panda/src/express/weakReferenceList.I @@ -13,6 +13,8 @@ /** * Increases the number of weak references. + * + * @since 1.10.0 */ INLINE void WeakReferenceList:: ref() const { @@ -23,6 +25,8 @@ ref() const { * Decreases the number of weak references. Returns true if, after this, * there are still any weak or strong references remaining, or false if this * structure should be deleted right away. + * + * @since 1.10.0 */ INLINE bool WeakReferenceList:: unref() const { @@ -32,6 +36,8 @@ unref() const { /** * Returns true if the object represented has been deleted, ie. there are only * weak references left pointing to the object. + * + * @since 1.10.0 */ INLINE bool WeakReferenceList:: was_deleted() const { diff --git a/panda/src/express/weakReferenceList.cxx b/panda/src/express/weakReferenceList.cxx index 0534556d7a..ac1363c85a 100644 --- a/panda/src/express/weakReferenceList.cxx +++ b/panda/src/express/weakReferenceList.cxx @@ -37,6 +37,8 @@ WeakReferenceList:: * * The data pointer can be an arbitrary pointer and is passed as only argument * to the callback. + * + * @since 1.10.0 */ void WeakReferenceList:: add_callback(WeakPointerCallback *callback, void *data) { @@ -61,6 +63,8 @@ add_callback(WeakPointerCallback *callback, void *data) { * weak reference-counting pointer), this removes the indicated PointerToVoid * structure from the list of such structures that are maintaining a weak * pointer to this object. + * + * @since 1.10.0 */ void WeakReferenceList:: remove_callback(WeakPointerCallback *callback) { @@ -73,6 +77,8 @@ remove_callback(WeakPointerCallback *callback) { /** * Called only by the ReferenceCount pointer to indicate that it has been * deleted. + * + * @since 1.10.0 */ void WeakReferenceList:: mark_deleted() { diff --git a/panda/src/gobj/geom.I b/panda/src/gobj/geom.I index 94469ec77c..3fa32ade36 100644 --- a/panda/src/gobj/geom.I +++ b/panda/src/gobj/geom.I @@ -215,6 +215,8 @@ make_patches() const { /** * Returns a new Geom with each primitive converted into a corresponding * version with adjacency information. + * + * @since 1.10.0 */ INLINE PT(Geom) Geom:: make_adjacency() const { diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index 3b6dee026a..4fc2b8ceb2 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -892,6 +892,8 @@ make_patches_in_place() { * * Don't call this in a downstream thread unless you don't mind it blowing * away other changes you might have recently made in an upstream thread. + * + * @since 1.10.0 */ void Geom:: make_adjacency_in_place() { diff --git a/panda/src/gobj/geomLinesAdjacency.h b/panda/src/gobj/geomLinesAdjacency.h index 884875cb39..7202d324e6 100644 --- a/panda/src/gobj/geomLinesAdjacency.h +++ b/panda/src/gobj/geomLinesAdjacency.h @@ -20,6 +20,8 @@ /** * Defines a series of disconnected line segments with adjacency information, * for use with geometry shaders. + * + * @since 1.10.0 */ class EXPCL_PANDA_GOBJ GeomLinesAdjacency : public GeomPrimitive { PUBLISHED: diff --git a/panda/src/gobj/geomLinestripsAdjacency.h b/panda/src/gobj/geomLinestripsAdjacency.h index baf3d19255..16753c302a 100644 --- a/panda/src/gobj/geomLinestripsAdjacency.h +++ b/panda/src/gobj/geomLinestripsAdjacency.h @@ -18,7 +18,9 @@ #include "geomPrimitive.h" /** - * Defines a series of line strips. + * Defines a series of line strips with adjacency information. + * + * @since 1.10.0 */ class EXPCL_PANDA_GOBJ GeomLinestripsAdjacency : public GeomPrimitive { PUBLISHED: diff --git a/panda/src/gobj/geomPrimitive.cxx b/panda/src/gobj/geomPrimitive.cxx index 6fa66329ba..afa406e921 100644 --- a/panda/src/gobj/geomPrimitive.cxx +++ b/panda/src/gobj/geomPrimitive.cxx @@ -1038,6 +1038,8 @@ make_patches() const { /** * Adds adjacency information to this primitive. May return null if this type * of geometry does not support adjacency information. + * + * @since 1.10.0 */ CPT(GeomPrimitive) GeomPrimitive:: make_adjacency() const { diff --git a/panda/src/gobj/geomTrianglesAdjacency.h b/panda/src/gobj/geomTrianglesAdjacency.h index 6ebdbdc6eb..90f3811b06 100644 --- a/panda/src/gobj/geomTrianglesAdjacency.h +++ b/panda/src/gobj/geomTrianglesAdjacency.h @@ -19,6 +19,8 @@ /** * Defines a series of disconnected triangles, with adjacency information. + * + * @since 1.10.0 */ class EXPCL_PANDA_GOBJ GeomTrianglesAdjacency : public GeomPrimitive { PUBLISHED: diff --git a/panda/src/gobj/geomTristripsAdjacency.h b/panda/src/gobj/geomTristripsAdjacency.h index 7811079401..896233c6ee 100644 --- a/panda/src/gobj/geomTristripsAdjacency.h +++ b/panda/src/gobj/geomTristripsAdjacency.h @@ -18,7 +18,9 @@ #include "geomPrimitive.h" /** - * Defines a series of triangle strips. + * Defines a series of triangle strips with adjacency information. + * + * @since 1.10.0 */ class EXPCL_PANDA_GOBJ GeomTristripsAdjacency : public GeomPrimitive { PUBLISHED: diff --git a/panda/src/gobj/shaderBuffer.h b/panda/src/gobj/shaderBuffer.h index 0cc0660433..d523e13256 100644 --- a/panda/src/gobj/shaderBuffer.h +++ b/panda/src/gobj/shaderBuffer.h @@ -27,6 +27,8 @@ class PreparedGraphicsObjects; /** * This is a generic buffer object that lives in graphics memory. + * + * @since 1.10.0 */ class EXPCL_PANDA_GOBJ ShaderBuffer : public TypedWritableReferenceCount, public Namable, public GeomEnums { private: diff --git a/panda/src/gobj/texture.I b/panda/src/gobj/texture.I index 7d859dbda8..ce3aa6cffe 100644 --- a/panda/src/gobj/texture.I +++ b/panda/src/gobj/texture.I @@ -175,6 +175,8 @@ setup_cube_map(int size, ComponentType component_type, Format format) { * is not the same as the z_size. Follow up with read() or load() to fill the * texture properties and image data, or use set_clear_color to let the * texture be cleared to a solid color. + * + * @since 1.10.0 */ INLINE void Texture:: setup_cube_map_array(int num_cube_maps) { @@ -189,6 +191,8 @@ setup_cube_map_array(int num_cube_maps) { * * The num_cube_maps given here is multiplied by six to become the z_size of * the image. + * + * @since 1.10.0 */ INLINE void Texture:: setup_cube_map_array(int size, int num_cube_maps, ComponentType component_type, Format format) { diff --git a/panda/src/movies/flacAudio.h b/panda/src/movies/flacAudio.h index 4fb9818930..5309e95eae 100644 --- a/panda/src/movies/flacAudio.h +++ b/panda/src/movies/flacAudio.h @@ -21,6 +21,8 @@ class FlacAudioCursor; /** * Reads FLAC audio files. Ogg-encapsulated FLAC files are not supported. + * + * @since 1.10.0 */ class EXPCL_PANDA_MOVIES FlacAudio : public MovieAudio { PUBLISHED: diff --git a/panda/src/movies/flacAudioCursor.h b/panda/src/movies/flacAudioCursor.h index 1de46bad01..995be42e1e 100644 --- a/panda/src/movies/flacAudioCursor.h +++ b/panda/src/movies/flacAudioCursor.h @@ -25,8 +25,10 @@ extern "C" { class FlacAudio; /** - * Interfaces with the libvorbisfile library to implement decoding of Ogg - * Vorbis audio files. + * Implements decoding of FLAC audio files. + * + * @see FlacAudio + * @since 1.10.0 */ class EXPCL_PANDA_MOVIES FlacAudioCursor : public MovieAudioCursor { PUBLISHED: diff --git a/panda/src/movies/opusAudio.h b/panda/src/movies/opusAudio.h index 813a4dbd58..3de8fb8535 100644 --- a/panda/src/movies/opusAudio.h +++ b/panda/src/movies/opusAudio.h @@ -24,6 +24,8 @@ class OpusAudioCursor; /** * Interfaces with the libopusfile library to implement decoding of Opus * audio files. + * + * @since 1.10.0 */ class EXPCL_PANDA_MOVIES OpusAudio : public MovieAudio { PUBLISHED: diff --git a/panda/src/movies/opusAudioCursor.h b/panda/src/movies/opusAudioCursor.h index 1a3dfa035b..b3996c73bb 100644 --- a/panda/src/movies/opusAudioCursor.h +++ b/panda/src/movies/opusAudioCursor.h @@ -28,6 +28,9 @@ class OpusAudio; /** * Interfaces with the libopusfile library to implement decoding of Opus * audio files. + * + * @see OpusAudio + * @since 1.10.0 */ class EXPCL_PANDA_MOVIES OpusAudioCursor : public MovieAudioCursor { PUBLISHED: diff --git a/panda/src/pgraph/light.I b/panda/src/pgraph/light.I index 4b84c409aa..6dd0428836 100644 --- a/panda/src/pgraph/light.I +++ b/panda/src/pgraph/light.I @@ -78,6 +78,8 @@ set_color(const LColor &color) { /** * Returns true if the color was specified as a temperature in kelvins, and * get_color_temperature is defined. + * + * @since 1.10.0 */ INLINE bool Light:: has_color_temperature() const { @@ -87,6 +89,8 @@ has_color_temperature() const { /** * Returns the basic color temperature of the light, assuming * has_color_temperature() returns true. + * + * @since 1.10.0 */ INLINE PN_stdfloat Light:: get_color_temperature() const { diff --git a/panda/src/pgraph/light.cxx b/panda/src/pgraph/light.cxx index 82b53f5757..8631cb5b0b 100644 --- a/panda/src/pgraph/light.cxx +++ b/panda/src/pgraph/light.cxx @@ -70,6 +70,8 @@ is_ambient_light() const { * * The default value is 6500 K, corresponding to a perfectly white light * assuming a D65 white point. + * + * @since 1.10.0 */ void Light:: set_color_temperature(PN_stdfloat temperature) { diff --git a/panda/src/pgraph/logicOpAttrib.h b/panda/src/pgraph/logicOpAttrib.h index f5bd2ce5d9..7d6b0f5b6e 100644 --- a/panda/src/pgraph/logicOpAttrib.h +++ b/panda/src/pgraph/logicOpAttrib.h @@ -24,6 +24,8 @@ class FactoryParams; * If enabled, specifies that a custom logical operation be performed instead * of any color blending. Setting it to a value other than M_none will cause * color blending to be disabled and the given logic operation to be performed. + * + * @since 1.10.0 */ class EXPCL_PANDA_PGRAPH LogicOpAttrib : public RenderAttrib { PUBLISHED: diff --git a/panda/src/pgraphnodes/rectangleLight.h b/panda/src/pgraphnodes/rectangleLight.h index 9fafe875d6..770f7f7d0d 100644 --- a/panda/src/pgraphnodes/rectangleLight.h +++ b/panda/src/pgraphnodes/rectangleLight.h @@ -22,6 +22,8 @@ /** * This is a type of area light that is an axis aligned rectangle, pointing * along the Y axis in the positive direction. + * + * @since 1.10.0 */ class EXPCL_PANDA_PGRAPHNODES RectangleLight : public LightLensNode { PUBLISHED: diff --git a/panda/src/pgraphnodes/shaderGenerator.cxx b/panda/src/pgraphnodes/shaderGenerator.cxx index 16a7483478..d00022984f 100644 --- a/panda/src/pgraphnodes/shaderGenerator.cxx +++ b/panda/src/pgraphnodes/shaderGenerator.cxx @@ -573,6 +573,8 @@ analyze_renderstate(ShaderKey &key, const RenderState *rs) { * Call this if certain state has changed in such a way as to require a rerun * of the shader generator. This should be rare because in most cases, the * shader generator will automatically regenerate shaders as necessary. + * + * @since 1.10.0 */ void ShaderGenerator:: rehash_generated_shaders() { @@ -614,6 +616,8 @@ rehash_generated_shaders() { /** * Removes all previously generated shaders, requiring all shaders to be * regenerated. Does not clear cache of compiled shaders. + * + * @since 1.10.0 */ void ShaderGenerator:: clear_generated_shaders() { diff --git a/panda/src/pgraphnodes/sphereLight.h b/panda/src/pgraphnodes/sphereLight.h index d4b1fb1c32..3717764b77 100644 --- a/panda/src/pgraphnodes/sphereLight.h +++ b/panda/src/pgraphnodes/sphereLight.h @@ -22,6 +22,8 @@ /** * A sphere light is like a point light, except that it represents a sphere * with a radius, rather than being an infinitely thin point in space. + * + * @since 1.10.0 */ class EXPCL_PANDA_PGRAPHNODES SphereLight : public PointLight { PUBLISHED: diff --git a/panda/src/text/textProperties.I b/panda/src/text/textProperties.I index 09bfc78dad..d56c354d46 100644 --- a/panda/src/text/textProperties.I +++ b/panda/src/text/textProperties.I @@ -801,6 +801,8 @@ get_text_scale() const { /** * Specifies the text direction. If none is specified, it will be guessed * based on the contents of the string. + * + * @since 1.10.0 */ INLINE void TextProperties:: set_direction(Direction direction) { @@ -811,6 +813,8 @@ set_direction(Direction direction) { /** * Clears the text direction setting. If no text direction is specified, it * will be guessed based on the contents of the string. + * + * @since 1.10.0 */ INLINE void TextProperties:: clear_direction() { @@ -819,7 +823,7 @@ clear_direction() { } /** - * + * @since 1.10.0 */ INLINE bool TextProperties:: has_direction() const { @@ -828,6 +832,8 @@ has_direction() const { /** * Returns the direction of the text as specified by set_direction(). + * + * @since 1.10.0 */ INLINE TextProperties::Direction TextProperties:: get_direction() const { From 3cc9e49469e58ba9812066940af2ca316e6d0134 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 23 Jan 2019 22:55:38 +0100 Subject: [PATCH 3/4] installpanda: fix issues installing includes to existing dir --- makepanda/installpanda.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/makepanda/installpanda.py b/makepanda/installpanda.py index 7f9b79cd60..0b82fa11bd 100644 --- a/makepanda/installpanda.py +++ b/makepanda/installpanda.py @@ -157,6 +157,7 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir( # Create the directory structure that we will be putting our files in. oscmd("mkdir -m 0755 -p "+destdir+prefix+"/bin") oscmd("mkdir -m 0755 -p "+destdir+prefix+"/include") + oscmd("mkdir -m 0755 -p "+destdir+prefix+"/include/panda3d") oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/panda3d") oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/mime-info") oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/mime/packages") @@ -184,7 +185,7 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir( WriteFile(destdir+"/etc/Config.prc", Configrc) oscmd("cp "+outputdir+"/etc/Confauto.prc "+destdir+"/etc/Confauto.prc") - oscmd("cp -R "+outputdir+"/include "+destdir+prefix+"/include/panda3d") + oscmd("cp -R "+outputdir+"/include/* "+destdir+prefix+"/include/panda3d/") oscmd("cp -R "+outputdir+"/pandac "+destdir+prefix+"/share/panda3d/") oscmd("cp -R "+outputdir+"/models "+destdir+prefix+"/share/panda3d/") if os.path.isdir("samples"): oscmd("cp -R samples "+destdir+prefix+"/share/panda3d/") @@ -237,8 +238,8 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir( DeleteEmptyDirs(destdir+prefix+"/include/panda3d") # Change permissions on include directory. - os.chmod(destdir + prefix + "/include", 0o755) - for root, dirs, files in os.walk(destdir + prefix + "/include"): + os.chmod(destdir + prefix + "/include/panda3d", 0o755) + for root, dirs, files in os.walk(destdir + prefix + "/include/panda3d"): for basename in dirs: os.chmod(os.path.join(root, basename), 0o755) for basename in files: From 0b087ecf92b5f59a8e32a5968a44c4dd3997d049 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 23 Jan 2019 23:18:51 +0100 Subject: [PATCH 4/4] installpanda: create intermediate directories with mode 0755 too Fixes #541 --- makepanda/installpanda.py | 32 ++++++++++++++++++-------------- makepanda/makepandacore.py | 16 +++++++++++++--- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/makepanda/installpanda.py b/makepanda/installpanda.py index 0b82fa11bd..ef8ddeab7e 100644 --- a/makepanda/installpanda.py +++ b/makepanda/installpanda.py @@ -155,25 +155,29 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir( libdir = prefix + "/" + libdir # Create the directory structure that we will be putting our files in. - oscmd("mkdir -m 0755 -p "+destdir+prefix+"/bin") - oscmd("mkdir -m 0755 -p "+destdir+prefix+"/include") - oscmd("mkdir -m 0755 -p "+destdir+prefix+"/include/panda3d") - oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/panda3d") - oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/mime-info") - oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/mime/packages") - oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/application-registry") - oscmd("mkdir -m 0755 -p "+destdir+prefix+"/share/applications") - oscmd("mkdir -m 0755 -p "+destdir+libdir+"/panda3d") + # Don't use os.makedirs or mkdir -p; neither properly set permissions for + # created intermediate directories. + MakeDirectory(destdir+prefix+"/bin", mode=0o755, recursive=True) + MakeDirectory(destdir+prefix+"/include", mode=0o755) + MakeDirectory(destdir+prefix+"/include/panda3d", mode=0o755) + MakeDirectory(destdir+prefix+"/share", mode=0o755) + MakeDirectory(destdir+prefix+"/share/panda3d", mode=0o755) + MakeDirectory(destdir+prefix+"/share/mime-info", mode=0o755) + MakeDirectory(destdir+prefix+"/share/mime", mode=0o755) + MakeDirectory(destdir+prefix+"/share/mime/packages", mode=0o755) + MakeDirectory(destdir+prefix+"/share/application-registry", mode=0o755) + MakeDirectory(destdir+prefix+"/share/applications", mode=0o755) + MakeDirectory(destdir+libdir+"/panda3d", mode=0o755, recursive=True) for python_version in python_versions: - oscmd("mkdir -m 0755 -p "+destdir+python_version["purelib"]) - oscmd("mkdir -m 0755 -p "+destdir+python_version["platlib"]+"/panda3d") + MakeDirectory(destdir+python_version["purelib"], mode=0o755, recursive=True) + MakeDirectory(destdir+python_version["platlib"]+"/panda3d", mode=0o755, recursive=True) if (sys.platform.startswith("freebsd")): - oscmd("mkdir -m 0755 -p "+destdir+prefix+"/etc") - oscmd("mkdir -m 0755 -p "+destdir+"/usr/local/libdata/ldconfig") + MakeDirectory(destdir+prefix+"/etc", mode=0o755) + MakeDirectory(destdir+"/usr/local/libdata/ldconfig", mode=0o755, recursive=True) else: - oscmd("mkdir -m 0755 -p "+destdir+"/etc/ld.so.conf.d") + MakeDirectory(destdir+"/etc/ld.so.conf.d", mode=0o755, recursive=True) # Write the Config.prc file. Configrc = ReadFile(outputdir+"/etc/Config.prc") diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 144d26f11a..74ce108adf 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -1104,9 +1104,19 @@ def GetOptimizeOption(opts): ## ######################################################################## -def MakeDirectory(path): - if os.path.isdir(path): return 0 - os.mkdir(path) +def MakeDirectory(path, mode=None, recursive=False): + if os.path.isdir(path): + return + + if recursive: + parent = os.path.dirname(path) + if parent and not os.path.isdir(parent): + MakeDirectory(parent, mode=mode, recursive=True) + + if mode is not None: + os.mkdir(path, mode) + else: + os.mkdir(path) def ReadFile(wfile): try: