Merge branch 'release/1.10.x'

This commit is contained in:
rdb 2019-11-02 20:42:32 +01:00
commit 6d96028b71
22 changed files with 118 additions and 55 deletions

View File

@ -117,7 +117,7 @@ class FSM(DirectObject):
at construction time; it is simply in Off already by convention.
If you need to call code in enterOff() to initialize your FSM
properly, call it explicitly in the constructor. Similarly, when
cleanup() is called or the FSM is destructed, the FSM transitions
`cleanup()` is called or the FSM is destructed, the FSM transitions
back to 'Off' by convention. (It does call enterOff() at this
point, but does not call exitOff().)
@ -261,9 +261,9 @@ class FSM(DirectObject):
def demand(self, request, *args):
"""Requests a state transition, by code that does not expect
the request to be denied. If the request is denied, raises a
RequestDenied exception.
`RequestDenied` exception.
Unlike request(), this method allows a new request to be made
Unlike `request()`, this method allows a new request to be made
while the FSM is currently in transition. In this case, the
request is queued up and will be executed when the current
transition finishes. Multiple requests will queue up in
@ -290,7 +290,7 @@ class FSM(DirectObject):
"""Requests a state transition (or other behavior). The
request may be denied by the FSM's filter function. If it is
denied, the filter function may either raise an exception
(RequestDenied), or it may simply return None, without
(`RequestDenied`), or it may simply return None, without
changing the FSM's state.
The request parameter should be a string. The request, along
@ -305,7 +305,7 @@ class FSM(DirectObject):
If the FSM is currently in transition (i.e. in the middle of
executing an enterState or exitState function), an
AlreadyInTransition exception is raised (but see demand(),
`AlreadyInTransition` exception is raised (but see `demand()`,
which will queue these requests up and apply when the
transition is complete)."""
@ -401,7 +401,6 @@ class FSM(DirectObject):
return (request,) + args
return self.defaultFilter(request, args)
def setStateArray(self, stateArray):
"""array of unique states to iterate through"""
self.fsmLock.acquire()
@ -410,7 +409,6 @@ class FSM(DirectObject):
finally:
self.fsmLock.release()
def requestNext(self, *args):
"""Request the 'next' state in the predefined state array."""
self.fsmLock.acquire()

View File

@ -1,4 +1,8 @@
"""This module contains the DirectButton class."""
"""This module contains the DirectButton class.
See the :ref:`directbutton` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = ['DirectButton']

View File

@ -1,6 +1,10 @@
"""A DirectCheckButton is a type of button that toggles between two states
when clicked. It also has a separate indicator that can be modified
separately."""
separately.
See the :ref:`directcheckbutton` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = ['DirectCheckButton']

View File

@ -1,4 +1,8 @@
"""This module defines various dialog windows for the DirectGUI system."""
"""This module defines various dialog windows for the DirectGUI system.
See the :ref:`directdialog` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = [
'findDialog', 'cleanupDialog', 'DirectDialog', 'OkDialog',

View File

@ -1,5 +1,9 @@
"""Contains the DirectEntry class, a type of DirectGUI widget that accepts
text entered using the keyboard."""
text entered using the keyboard.
See the :ref:`directentry` page in the programming manual for a more in-depth
explanation and an example of how to use this class.
"""
__all__ = ['DirectEntry']

View File

@ -11,6 +11,9 @@ A DirectFrame can have:
Each of these has 1 or more states. The same object can be used for
all states or each state can have a different text/geom/image (for
radio button and check button indicators, for example).
See the :ref:`directframe` page in the programming manual for a more in-depth
explanation and an example of how to use this class.
"""
__all__ = ['DirectFrame']

View File

@ -1,4 +1,8 @@
"""Contains the DirectLabel class."""
"""Contains the DirectLabel class.
See the :ref:`directlabel` page in the programming manual for a more in-depth
explanation and an example of how to use this class.
"""
__all__ = ['DirectLabel']

View File

@ -1,4 +1,8 @@
"""Implements a pop-up menu containing multiple clickable options."""
"""Implements a pop-up menu containing multiple clickable options.
See the :ref:`directoptionmenu` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = ['DirectOptionMenu']

View File

@ -1,7 +1,11 @@
"""A DirectRadioButton is a type of button that, similar to a
DirectCheckButton, has a separate indicator and can be toggled between
two states. However, only one DirectRadioButton in a group can be enabled
at a particular time."""
at a particular time.
See the :ref:`directradiobutton` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = ['DirectRadioButton']

View File

@ -1,4 +1,8 @@
"""Defines the DirectScrollBar class."""
"""Defines the DirectScrollBar class.
See the :ref:`directscrollbar` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = ['DirectScrollBar']

View File

@ -1,4 +1,8 @@
"""Contains the DirectScrolledFrame class."""
"""Contains the DirectScrolledFrame class.
See the :ref:`directscrolledframe` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = ['DirectScrolledFrame']
@ -82,6 +86,9 @@ class DirectScrolledFrame(DirectFrame):
self.guiItem.setVirtualFrame(f[0], f[1], f[2], f[3])
def getCanvas(self):
"""Returns the NodePath of the virtual canvas. Nodes parented to this
canvas will show inside the scrolled area.
"""
return self.canvas
def setManageScrollBars(self):

View File

@ -1,4 +1,8 @@
"""Contains the DirectScrolledList class."""
"""Contains the DirectScrolledList class.
See the :ref:`directscrolledlist` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = ['DirectScrolledListItem', 'DirectScrolledList']

View File

@ -1,4 +1,8 @@
"""Defines the DirectSlider class."""
"""Defines the DirectSlider class.
See the :ref:`directslider` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = ['DirectSlider']

View File

@ -1,4 +1,8 @@
"""Contains the DirectWaitBar class, a progress bar widget."""
"""Contains the DirectWaitBar class, a progress bar widget.
See the :ref:`directwaitbar` page in the programming manual for a more
in-depth explanation and an example of how to use this class.
"""
__all__ = ['DirectWaitBar']

View File

@ -1172,7 +1172,7 @@ def normalDistrib(a, b, gauss=random.gauss):
uniformly onto the curve inside [a, b]
------------------------------------------------------------------------
http://www-stat.stanford.edu/~naras/jsm/NormalDensity/NormalDensity.html
https://statweb.stanford.edu/~naras/jsm/NormalDensity/NormalDensity.html
The 68-95-99.7% Rule
====================

View File

@ -3165,7 +3165,7 @@ def CopyPythonTree(dstdir, srcdir, lib2to3_fixers=[], threads=0):
if (NeedsBuild([dstpth], [srcpth])):
WriteBinaryFile(dstpth, ReadBinaryFile(srcpth))
if ext == '.py' and not entry.endswith('-extensions.py'):
if ext == '.py' and not entry.endswith('-extensions.py') and lib2to3 is not None:
refactor.append((dstpth, srcpth))
lib2to3_args.append(dstpth)
else:

View File

@ -42,17 +42,23 @@ PUBLISHED:
virtual void set_loop_count(unsigned long loop_count=1) = 0;
virtual unsigned long get_loop_count() const = 0;
/*
* Control time position within the sound. This is similar (in concept) to
* the seek position within a file. time in seconds: 0 = beginning; length()
* = end. inits to 0.0. - The current time position will not change while the
* sound is playing; you must call play() again to effect the change. To play
* the same sound from a time offset a second time, explicitly set the time
* position again. When looping, the second and later loops will start from
* the beginning of the sound. - If a sound is playing, calling get_time()
* repeatedly will return different results over time. e.g.: PN_stdfloat
* percent_complete = s.get_time() s.length();
*/
/**
* Control time position within the sound, in seconds. This is similar (in
* concept) to the seek position within a file. The value starts at 0.0 (the
* default) and ends at the value given by the length() method.
*
* The current time position will not change while the sound is playing; you
* must call play() again to effect the change. To play the same sound from
* a time offset a second time, explicitly set the time position again. When
* looping, the second and later loops will start from the beginning of the
* sound.
*
* If a sound is playing, calling get_time() repeatedly will return different
* results over time. e.g.
* @code
* PN_stdfloat percent_complete = s.get_time() / s.length();
* @endcode
*/
virtual void set_time(PN_stdfloat start_time=0.0) = 0;
virtual PN_stdfloat get_time() const = 0;

View File

@ -111,7 +111,7 @@ get_verify_ssl() const {
* Specifies the set of ciphers that are to be made available for SSL
* connections. This is a string as described in the ciphers(1) man page of
* the OpenSSL documentation (or see
* http://www.openssl.org/docs/apps/ciphers.html ). If this is not specified,
* https://www.openssl.org/docs/apps/ciphers.html ). If this isn't specified,
* the default is provided by the Config file. You may also specify "DEFAULT"
* to use the built-in OpenSSL default value.
*/

View File

@ -31,7 +31,7 @@
* GeoMipMapping algorithm, or Geometrical MipMapping, based on the LOD (Level
* of Detail) algorithm. For more information about the GeoMipMapping
* algoritm, see this paper, written by Willem H. de Boer:
* http://flipcode.com/articles/article_geomipmaps.pdf
* https://flipcode.com/articles/article_geomipmaps.pdf
*/
class EXPCL_PANDA_GRUTIL GeoMipTerrain : public TypedObject {
PUBLISHED:

View File

@ -20,7 +20,7 @@
/**
* This class provides an implementation of Perlin noise for 2 variables.
* This code is loosely based on the reference implementation at
* http://mrl.nyu.edu/~perlin/noise/ .
* https://mrl.nyu.edu/~perlin/noise/ .
*/
class EXPCL_PANDA_MATHUTIL PerlinNoise2 : public PerlinNoise {
PUBLISHED:

View File

@ -73,8 +73,8 @@ is_deleted_b() const {
* You should set the ContactPairFlag CPF_notify_forces in order to receive
* this value.
*
* @see PhysxScene::set_actor_pair_flag @see
* PhysxScene::set_actor_group_pair_flag
* @see PhysxScene::set_actor_pair_flag
* @see PhysxScene::set_actor_group_pair_flag
*/
LVector3f PhysxContactPair::
get_sum_normal_force() const {
@ -88,8 +88,8 @@ get_sum_normal_force() const {
* You should set the ContactPairFlag CPF_notify_forces in order to receive
* this value.
*
* @see PhysxScene::set_actor_pair_flag @see
* PhysxScene::set_actor_group_pair_flag
* @see PhysxScene::set_actor_pair_flag
* @see PhysxScene::set_actor_group_pair_flag
*/
LVector3f PhysxContactPair::
get_sum_friction_force() const {

View File

@ -22,12 +22,13 @@
*/
class EXPCL_PANDA_PUTIL BamEnums {
PUBLISHED:
// This defines an enumerated type used to represent the endianness of
// certain numeric values stored in a Bam file. It really has only two
// possible values, either BE_bigendian or BE_littleendian; but through a
// preprocessor trick we also add BE_native, which is the same numerically
// as whichever value the hardware supports natively.
/**
* This defines an enumerated type used to represent the endianness of
* certain numeric values stored in a Bam file. It really has only two
* possible values, either BE_bigendian or BE_littleendian; but through a
* preprocessor trick we also add BE_native, which is the same numerically
* as whichever value the hardware supports natively.
*/
enum BamEndian {
BE_bigendian = 0,
BE_littleendian = 1,
@ -38,21 +39,25 @@ PUBLISHED:
#endif
};
/*
* This is the code written along with each object. It is used to control
* object scoping. A BOC_push includes an object definition, and will always
* be eventually paired with a BOC_pop (which does not). A BOC_adjunct
* includes an object definition but does not push the level; it is associated
* with the current level. BOC_remove lists object ID's that have been
* deallocated on the sender end. BOC_file_data may appear at any level and
* indicates the following datagram contains auxiliary file data that may be
* referenced by a later object.
*/
/**
* This is the code written along with each object. It is used to control
* object scoping.
*/
enum BamObjectCode {
// Indicates an object definition, and will always be eventually paired
// with a BOC_pop (which does not).
BOC_push,
BOC_pop,
// Includes an object definition but does not push the level; it is
// associated with the current level.
BOC_adjunct,
// Lists object IDs that have been deallocated on the sender end.
BOC_remove,
// May appear at any level and indicates the following datagram contains
// auxiliary file data that may be referenced by a later object.
BOC_file_data,
};