Commit Graph

26 Commits

Author SHA1 Message Date
rdb 5e05049725 collide: Add custom owner field to CollisionNode
This stores a weakref to a custom Python object, useful for being able to look up the game object corresponding to a particular collision node in an event without the downsides of Python tags

Fixes #1703
2024-12-14 12:48:24 +01:00
Yonnji c6ed5acdc2
fix building panda (#1694) 2024-10-18 14:03:15 +02:00
rdb 5106fc879f Changes for compatibility with Python 3.13
Includes some preliminary work to make free-threading safe, see also #1683
2024-09-19 16:01:10 +02:00
rdb 73360393df Switch use of Py_INCREF to new Py_NewRef function
This is more idiomatic, simplifies the code, makes it easier to port to eg. HPy later on, and makes it easier to use the limited ABI (where it can be optimized to a tail call) later on

A polyfill is provided for compatibility with Python versions 3.8 and 3.9
2024-01-29 17:57:53 +01:00
Disyer af4a1bc7a9 python: Use public PyErr_Occurred API instead of private macro
The _PyErr_OCCURRED macro was removed in Python 3.10, so we shouldn't keep any compat code left around for it
2023-02-12 02:36:57 +02:00
rdb b09a8a84ec Merge branch 'release/1.10.x' 2023-02-03 14:52:39 +01:00
rdb 51d0a55264 general: Fix silly new clang warning about unprefixed `std::move()` 2023-01-31 15:38:02 +01:00
rdb d799a09002 cleanup: Remove support for EOL versions of Python
Fixes #905
2020-04-26 20:07:56 +02:00
Sam Edwards b2bfb31114 general: Remove `using std::*` from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
rdb 193e4b5f59 interrogate: clean py_panda.h; use macros to access Dtool_PyInstDef 2017-12-12 23:03:38 +01:00
rdb 3e83f8c65e Fix priority argument ignored in NodePath::set_shader_input 2017-12-12 15:25:21 +01:00
rdb 69b3468b2c interrogate: more improvements to seq/map wrappers
Gets rid of properties defined as both MAKE_SEQ_PROPERTY/MAKE_MAP_PROPERTY, which are just a bad idea. Instead, adds a way for map properties to define a separate "keys" interface.

Fixes: #203
2017-11-27 17:29:50 +01:00
rdb 749b23a190 Fix support for pickling NodePaths (broken in 1b1d80c)
Fixes: #199
2017-11-25 23:12:47 +01:00
rdb 1b1d80cd27 More thoroughly fix issues with pickling Panda objects in Python 3
This also adds DatagramBuffer, a class for writing datagrams to memory and reading them from there again.
2017-11-08 00:02:35 +01:00
rdb 0e2b14cf4c pgraph: custom binding for set_shader_input()
Should be faster and more reliable at PTA handling
We no longer need the interrogate perf hack for the first-arg InternalName

Fixes: #161
2017-10-08 17:50:28 +02:00
rdb 6f8b379bda Big patch full of performance improvements
This particularly benefits applications with a lot of nodes.
2017-04-03 01:41:23 +02:00
rdb cfe810ace7 Add set_shader_inputs for efficiently setting multiple shader inputs 2017-02-06 13:16:27 +01:00
rdb 47388b0dbc Separate out CPython calls from core libs; eliminate need for pystub 2016-07-20 14:30:41 +02:00
rdb 15b0ba45f9 Fix broken pickling in Python 3 build 2016-03-31 16:49:27 +02:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 214d799d82 Add optional "other" NodePath argument for get_tight_bounds() 2015-07-06 14:52:08 +02:00
rdb cbd70ad8af Move all Python bindings out of core DLLs into the .pyd files. 2015-02-10 14:30:51 +01:00
rdb c257ce624e Interrogate overhaul that dramatically increases performance for the simpler methods 2014-07-18 13:54:38 +00:00
rdb 566feda34d Commit patch by cfsworks to move pgraph stuff to extensions 2014-04-04 09:23:58 +00:00
rdb 7e455e0fad Add files that belonged to the previous commit 2014-02-20 13:58:23 +00:00