Merge branch 'release/1.10.x'

This commit is contained in:
rdb 2021-11-02 15:20:41 +01:00
commit 0bc0709b72
10 changed files with 70 additions and 12 deletions

View File

@ -333,12 +333,12 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy: strategy:
matrix: matrix:
os: [ubuntu-16.04, windows-2016, macOS-latest] os: [ubuntu-18.04, windows-2016, macOS-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Install dependencies (Ubuntu) - name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-16.04' if: matrix.os == 'ubuntu-18.04'
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install build-essential bison flex libfreetype6-dev libgl1-mesa-dev libjpeg-dev libode-dev libopenal-dev libpng-dev libssl-dev libvorbis-dev libx11-dev libxcursor-dev libxrandr-dev nvidia-cg-toolkit zlib1g-dev sudo apt-get install build-essential bison flex libfreetype6-dev libgl1-mesa-dev libjpeg-dev libode-dev libopenal-dev libpng-dev libssl-dev libvorbis-dev libx11-dev libxcursor-dev libxrandr-dev nvidia-cg-toolkit zlib1g-dev

View File

@ -348,10 +348,14 @@ class MetaInterval(CMetaInterval):
def getManager(self): def getManager(self):
return self.__manager return self.__manager
manager = property(getManager, setManager)
def setT(self, t): def setT(self, t):
self.__updateIvals() self.__updateIvals()
CMetaInterval.setT(self, t) CMetaInterval.setT(self, t)
t = property(CMetaInterval.getT, setT)
def start(self, startT = 0.0, endT = -1.0, playRate = 1.0): def start(self, startT = 0.0, endT = -1.0, playRate = 1.0):
self.__updateIvals() self.__updateIvals()
self.setupPlay(startT, endT, playRate, 0) self.setupPlay(startT, endT, playRate, 0)
@ -475,6 +479,8 @@ class MetaInterval(CMetaInterval):
else: else:
CMetaInterval.setPlayRate(self, playRate) CMetaInterval.setPlayRate(self, playRate)
play_rate = property(CMetaInterval.getPlayRate, setPlayRate)
def __doPythonCallbacks(self): def __doPythonCallbacks(self):
# This function invokes any Python-level Intervals that need # This function invokes any Python-level Intervals that need
# to be invoked at this point in time. It must be called # to be invoked at this point in time. It must be called
@ -549,6 +555,8 @@ class MetaInterval(CMetaInterval):
self.__updateIvals() self.__updateIvals()
return CMetaInterval.getDuration(self) return CMetaInterval.getDuration(self)
duration = property(getDuration)
def __repr__(self, *args, **kw): def __repr__(self, *args, **kw):
# This function overrides from the parent level to force it to # This function overrides from the parent level to force it to
# update the interval list first, if necessary. # update the interval list first, if necessary.

View File

@ -725,7 +725,7 @@ class ShowBase(DirectObject.DirectObject):
of :meth:`~panda3d.core.GraphicsWindow.setUnexposedDraw()`. of :meth:`~panda3d.core.GraphicsWindow.setUnexposedDraw()`.
:param callbackWindowDict: If not None, a :param callbackWindowDict: If not None, a
:class:`~panda3d.core.CallbackGraphicWindow` :class:`~panda3d.core.CallbackGraphicsWindow`
is created instead, which allows the caller is created instead, which allows the caller
to create the actual window with its own to create the actual window with its own
OpenGL context, and direct Panda's rendering OpenGL context, and direct Panda's rendering

View File

@ -374,6 +374,7 @@ SectionGroup "Python modules" SecGroupPython
!insertmacro PyBindingSection 3.8-32 .cp38-win32.pyd !insertmacro PyBindingSection 3.8-32 .cp38-win32.pyd
!insertmacro PyBindingSection 3.9-32 .cp39-win32.pyd !insertmacro PyBindingSection 3.9-32 .cp39-win32.pyd
!insertmacro PyBindingSection 3.10-32 .cp310-win32.pyd !insertmacro PyBindingSection 3.10-32 .cp310-win32.pyd
!insertmacro PyBindingSection 3.11-32 .cp311-win32.pyd
!else !else
!insertmacro PyBindingSection 3.5 .cp35-win_amd64.pyd !insertmacro PyBindingSection 3.5 .cp35-win_amd64.pyd
!insertmacro PyBindingSection 3.6 .cp36-win_amd64.pyd !insertmacro PyBindingSection 3.6 .cp36-win_amd64.pyd
@ -381,6 +382,7 @@ SectionGroup "Python modules" SecGroupPython
!insertmacro PyBindingSection 3.8 .cp38-win_amd64.pyd !insertmacro PyBindingSection 3.8 .cp38-win_amd64.pyd
!insertmacro PyBindingSection 3.9 .cp39-win_amd64.pyd !insertmacro PyBindingSection 3.9 .cp39-win_amd64.pyd
!insertmacro PyBindingSection 3.10 .cp310-win_amd64.pyd !insertmacro PyBindingSection 3.10 .cp310-win_amd64.pyd
!insertmacro PyBindingSection 3.11 .cp311-win_amd64.pyd
!endif !endif
SectionGroupEnd SectionGroupEnd
@ -489,6 +491,7 @@ Function .onInit
${If} ${AtLeastWin8} ${If} ${AtLeastWin8}
!insertmacro MaybeEnablePyBindingSection 3.9-32 !insertmacro MaybeEnablePyBindingSection 3.9-32
!insertmacro MaybeEnablePyBindingSection 3.10-32 !insertmacro MaybeEnablePyBindingSection 3.10-32
!insertmacro MaybeEnablePyBindingSection 3.11-32
${EndIf} ${EndIf}
!else !else
!insertmacro MaybeEnablePyBindingSection 3.5 !insertmacro MaybeEnablePyBindingSection 3.5
@ -498,6 +501,7 @@ Function .onInit
${If} ${AtLeastWin8} ${If} ${AtLeastWin8}
!insertmacro MaybeEnablePyBindingSection 3.9 !insertmacro MaybeEnablePyBindingSection 3.9
!insertmacro MaybeEnablePyBindingSection 3.10 !insertmacro MaybeEnablePyBindingSection 3.10
!insertmacro MaybeEnablePyBindingSection 3.11
${EndIf} ${EndIf}
!endif !endif
@ -511,6 +515,10 @@ Function .onInit
SectionSetFlags ${SecPyBindings3.10} ${SF_RO} SectionSetFlags ${SecPyBindings3.10} ${SF_RO}
SectionSetInstTypes ${SecPyBindings3.10} 0 SectionSetInstTypes ${SecPyBindings3.10} 0
!endif !endif
!ifdef SecPyBindings3.11
SectionSetFlags ${SecPyBindings3.11} ${SF_RO}
SectionSetInstTypes ${SecPyBindings3.11} 0
!endif
${EndUnless} ${EndUnless}
FunctionEnd FunctionEnd
@ -822,6 +830,7 @@ Section Uninstall
!insertmacro RemovePythonPath 3.8-32 !insertmacro RemovePythonPath 3.8-32
!insertmacro RemovePythonPath 3.9-32 !insertmacro RemovePythonPath 3.9-32
!insertmacro RemovePythonPath 3.10-32 !insertmacro RemovePythonPath 3.10-32
!insertmacro RemovePythonPath 3.11-32
!else !else
!insertmacro RemovePythonPath 3.5 !insertmacro RemovePythonPath 3.5
!insertmacro RemovePythonPath 3.6 !insertmacro RemovePythonPath 3.6
@ -829,6 +838,7 @@ Section Uninstall
!insertmacro RemovePythonPath 3.8 !insertmacro RemovePythonPath 3.8
!insertmacro RemovePythonPath 3.9 !insertmacro RemovePythonPath 3.9
!insertmacro RemovePythonPath 3.10 !insertmacro RemovePythonPath 3.10
!insertmacro RemovePythonPath 3.11
!endif !endif
SetDetailsPrint both SetDetailsPrint both
@ -897,6 +907,7 @@ SectionEnd
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.8-32} $(DESC_SecPyBindings3.8-32) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.8-32} $(DESC_SecPyBindings3.8-32)
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.9-32} $(DESC_SecPyBindings3.9-32) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.9-32} $(DESC_SecPyBindings3.9-32)
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.10-32} $(DESC_SecPyBindings3.10-32) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.10-32} $(DESC_SecPyBindings3.10-32)
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.11-32} $(DESC_SecPyBindings3.11-32)
!else !else
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.5} $(DESC_SecPyBindings3.5) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.5} $(DESC_SecPyBindings3.5)
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.6} $(DESC_SecPyBindings3.6) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.6} $(DESC_SecPyBindings3.6)
@ -904,6 +915,7 @@ SectionEnd
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.8} $(DESC_SecPyBindings3.8) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.8} $(DESC_SecPyBindings3.8)
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.9} $(DESC_SecPyBindings3.9) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.9} $(DESC_SecPyBindings3.9)
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.10} $(DESC_SecPyBindings3.10) !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.10} $(DESC_SecPyBindings3.10)
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.11} $(DESC_SecPyBindings3.11)
!endif !endif
!ifdef INCLUDE_PYVER !ifdef INCLUDE_PYVER
!insertmacro MUI_DESCRIPTION_TEXT ${SecPython} $(DESC_SecPython) !insertmacro MUI_DESCRIPTION_TEXT ${SecPython} $(DESC_SecPython)

View File

@ -20,7 +20,7 @@ INLINE BulletDebugNode::
} }
/** /**
* * If true, displays collision shapes in wireframe mode.
*/ */
INLINE void BulletDebugNode:: INLINE void BulletDebugNode::
show_wireframe(bool show) { show_wireframe(bool show) {
@ -39,7 +39,8 @@ get_show_wireframe() const {
} }
/** /**
* * If true, display limits defined for constraints, e.g. a pivot axis or maximum
* amplitude.
*/ */
INLINE void BulletDebugNode:: INLINE void BulletDebugNode::
show_constraints(bool show) { show_constraints(bool show) {
@ -58,7 +59,7 @@ get_show_constraints() const {
} }
/** /**
* * If true, displays axis aligned bounding boxes for objects.
*/ */
INLINE void BulletDebugNode:: INLINE void BulletDebugNode::
show_bounding_boxes(bool show) { show_bounding_boxes(bool show) {
@ -77,7 +78,7 @@ get_show_bounding_boxes() const {
} }
/** /**
* * If true, displays normal vectors for triangle mesh and heightfield faces.
*/ */
INLINE void BulletDebugNode:: INLINE void BulletDebugNode::
show_normals(bool show) { show_normals(bool show) {
@ -92,4 +93,4 @@ INLINE bool BulletDebugNode::
get_show_normals() const { get_show_normals() const {
return _drawer._normals; return _drawer._normals;
} }

View File

@ -49,6 +49,8 @@ get_contact_processing_threshold() const {
*/ */
void BulletPersistentManifold:: void BulletPersistentManifold::
clear_manifold() { clear_manifold() {
nassertv_always(_manifold != nullptr);
LightMutexHolder holder(BulletWorld::get_global_lock()); LightMutexHolder holder(BulletWorld::get_global_lock());
_manifold->clearManifold(); _manifold->clearManifold();
@ -59,6 +61,8 @@ clear_manifold() {
*/ */
PandaNode *BulletPersistentManifold:: PandaNode *BulletPersistentManifold::
get_node0() { get_node0() {
nassertr_always(_manifold != nullptr, nullptr);
LightMutexHolder holder(BulletWorld::get_global_lock()); LightMutexHolder holder(BulletWorld::get_global_lock());
#if BT_BULLET_VERSION >= 281 #if BT_BULLET_VERSION >= 281
@ -75,6 +79,8 @@ get_node0() {
*/ */
PandaNode *BulletPersistentManifold:: PandaNode *BulletPersistentManifold::
get_node1() { get_node1() {
nassertr_always(_manifold != nullptr, nullptr);
LightMutexHolder holder(BulletWorld::get_global_lock()); LightMutexHolder holder(BulletWorld::get_global_lock());
#if BT_BULLET_VERSION >= 281 #if BT_BULLET_VERSION >= 281
@ -91,6 +97,8 @@ get_node1() {
*/ */
int BulletPersistentManifold:: int BulletPersistentManifold::
get_num_manifold_points() const { get_num_manifold_points() const {
nassertr_always(_manifold != nullptr, 0);
LightMutexHolder holder(BulletWorld::get_global_lock()); LightMutexHolder holder(BulletWorld::get_global_lock());
return _manifold->getNumContacts(); return _manifold->getNumContacts();
@ -107,3 +115,12 @@ get_manifold_point(int idx) const {
return new BulletManifoldPoint(_manifold->getContactPoint(idx)); return new BulletManifoldPoint(_manifold->getContactPoint(idx));
} }
/**
*
*/
BulletManifoldPoint BulletPersistentManifold::
__get_manifold_point(int idx) const {
LightMutexHolder holder(BulletWorld::get_global_lock());
return BulletManifoldPoint(_manifold->getContactPoint(idx));
}

View File

@ -35,7 +35,8 @@ PUBLISHED:
int get_num_manifold_points() const; int get_num_manifold_points() const;
BulletManifoldPoint *get_manifold_point(int idx) const; BulletManifoldPoint *get_manifold_point(int idx) const;
MAKE_SEQ(get_manifold_points, get_num_manifold_points, get_manifold_point); BulletManifoldPoint __get_manifold_point(int idx) const;
MAKE_SEQ(get_manifold_points, get_num_manifold_points, __get_manifold_point);
PN_stdfloat get_contact_breaking_threshold() const; PN_stdfloat get_contact_breaking_threshold() const;
PN_stdfloat get_contact_processing_threshold() const; PN_stdfloat get_contact_processing_threshold() const;
@ -44,7 +45,7 @@ PUBLISHED:
MAKE_PROPERTY(node0, get_node0); MAKE_PROPERTY(node0, get_node0);
MAKE_PROPERTY(node1, get_node1); MAKE_PROPERTY(node1, get_node1);
MAKE_SEQ_PROPERTY(manifold_points, get_num_manifold_points, get_manifold_point); MAKE_SEQ_PROPERTY(manifold_points, get_num_manifold_points, __get_manifold_point);
MAKE_PROPERTY(contact_breaking_threshold, get_contact_breaking_threshold); MAKE_PROPERTY(contact_breaking_threshold, get_contact_breaking_threshold);
MAKE_PROPERTY(contact_processing_threshold, get_contact_processing_threshold); MAKE_PROPERTY(contact_processing_threshold, get_contact_processing_threshold);

View File

@ -1074,6 +1074,19 @@ get_manifold(int idx) const {
return (ptr) ? new BulletPersistentManifold(ptr) : nullptr; return (ptr) ? new BulletPersistentManifold(ptr) : nullptr;
} }
/**
*
*/
BulletPersistentManifold BulletWorld::
__get_manifold(int idx) const {
LightMutexHolder holder(get_global_lock());
nassertr(idx < _dispatcher->getNumManifolds(), BulletPersistentManifold(nullptr));
btPersistentManifold *ptr = _dispatcher->getManifoldByIndexInternal(idx);
return BulletPersistentManifold(ptr);
}
/** /**
* *
*/ */

View File

@ -128,7 +128,8 @@ PUBLISHED:
// Manifolds // Manifolds
int get_num_manifolds() const; int get_num_manifolds() const;
BulletPersistentManifold *get_manifold(int idx) const; BulletPersistentManifold *get_manifold(int idx) const;
MAKE_SEQ(get_manifolds, get_num_manifolds, get_manifold); BulletPersistentManifold __get_manifold(int idx) const;
MAKE_SEQ(get_manifolds, get_num_manifolds, __get_manifold);
// Collision filtering // Collision filtering
void set_group_collision_flag(unsigned int group1, unsigned int group2, bool enable); void set_group_collision_flag(unsigned int group1, unsigned int group2, bool enable);
@ -168,7 +169,7 @@ PUBLISHED:
MAKE_SEQ_PROPERTY(characters, get_num_characters, get_character); MAKE_SEQ_PROPERTY(characters, get_num_characters, get_character);
MAKE_SEQ_PROPERTY(vehicles, get_num_vehicles, get_vehicle); MAKE_SEQ_PROPERTY(vehicles, get_num_vehicles, get_vehicle);
MAKE_SEQ_PROPERTY(constraints, get_num_constraints, get_constraint); MAKE_SEQ_PROPERTY(constraints, get_num_constraints, get_constraint);
MAKE_SEQ_PROPERTY(manifolds, get_num_manifolds, get_manifold); MAKE_SEQ_PROPERTY(manifolds, get_num_manifolds, __get_manifold);
MAKE_PROPERTY(force_update_all_aabbs, get_force_update_all_aabbs, MAKE_PROPERTY(force_update_all_aabbs, get_force_update_all_aabbs,
set_force_update_all_aabbs); set_force_update_all_aabbs);

View File

@ -65,6 +65,11 @@ PUBLISHED:
INLINE void set_clip_effect(int clip_effect); INLINE void set_clip_effect(int clip_effect);
INLINE int get_clip_effect() const; INLINE int get_clip_effect() const;
MAKE_PROPERTY(plane, get_plane, set_plane);
MAKE_PROPERTY(viz_scale, get_viz_scale, set_viz_scale);
MAKE_PROPERTY(priority, get_priority, set_priority);
MAKE_PROPERTY(clip_effect, get_clip_effect, set_clip_effect);
public: public:
INLINE static UpdateSeq get_sort_seq(); INLINE static UpdateSeq get_sort_seq();