Commit Graph

404 Commits

Author SHA1 Message Date
rdb b75982a610 interval: fix QuatInterval not normalizing the start quaternion 2019-02-14 19:18:14 +01:00
rdb f8b47dc14c direct: fix slowness in big games with Func(messenger.send) 2018-10-18 22:19:55 +02:00
Sam Edwards 4695557a5d general: Don't require BUILDING_* for static builds 2018-08-31 23:54:32 -06:00
rdb ee318a73f3 interval: prevent hypothetical stack overflow 2018-08-08 20:16:11 +02:00
rdb 57578ee58f direct: add MetaInterval underscore aliases (fixes override bug)
These methods are supposed to override the underlying C methods, which do have underscore aliases, so it is important that the Python class defines these underscore aliases as well.
2018-07-17 22:20:35 +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 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +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 e0245d2777 First step towards eliminating `using namespace std;` (#335) 2018-06-03 20:32:23 +02:00
Sam Edwards 9dd37e9dbc general: Add guards to ensure proper BUILDING_ macros defined
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
2018-03-25 13:17:52 -06:00
Sam Edwards f231ba4cd7 directbase: Introduce BUILDING_ defines for each component
Ditto everything before, but for direct.
2018-03-25 13:17:52 -06:00
Michael Wass 89799bc024 direct: Fix some NameErrors
Squashed merge of GitHub PR #273
2018-03-05 18:32:27 -07:00
rdb 2e20a0f16e Implement awaitable thread-safe future for async operations
This introduces AsyncFuture as a new base class of AsyncTask.  It's modelled after asyncio's Future class, except that it is thread-safe and you can use result() to block the current thread waiting for the future to finish (of course this is not necessary for use with coroutines).

AsyncFuture should be used for any operation that finishes in the future, to get the benefit of awaitability within coroutines as well as a standard interface for querying status and results of the operation as well as cancelling it.  As such, it's been implemented in various places, including texture.prepare() and win.trigger_copy().

Note that AsyncFuture is intended to be used *once*; it cannot be used more than once.  As an example of how this works, tex.prepare() will return the same future as long as the prepare isn't complete, but when it is done, subsequent calls to tex.prepare() will return a new future.
2017-12-04 22:25:28 +01:00
rdb dd2806c8bd Mark constructors 'explicit' for which coercion makes no sense 2017-11-06 19:47:38 +01:00
rdb 3f0ab1d198 interval: fix ActorInterval endFrame assignment when passing duration
Fixes: #187
2017-11-03 20:07:24 +01:00
rdb d576c6b638 Improvements to generated API docs, especially in direct tree.
Also add an entry point for pfreeze.
2017-05-24 13:30:21 +02:00
Tohka facb1cca31 Fix several Sequence crashes (#99)
tuple and list shouldn't be used as parameter names. With the new Python 2.7.11 these break Sequences altogether.
2016-04-24 11:37:34 +02:00
rdb 23bf9ea5c7 The direct tree is now valid Python 2 *and* 3 2016-03-28 22:33:30 +02:00
rdb 54fa31ba17 StandardError -> Exception, other 2to3 changes, threaded 2to3 2016-03-25 17:13:09 +01:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 0d03207d1b Dramatically reduce size of frozen/compiled code by pruning/masking unnecessary imports/code 2016-02-12 22:20:27 +01:00
rdb 03c8d4c009 Fix use of many builtins 2016-02-02 13:41:20 +01:00
rdb 84e15316cc remove conflicting loop property on Interval 2016-01-03 17:40:13 +01:00
rdb dafe48a6bc Begin to add snake_case/property interfaces to important direct classes 2015-12-26 17:00:51 +01:00
mfwass f8837999ed Cleanup trailing whitespace 2015-12-13 10:08:41 -05:00
rdb 0a9f9887f9 Merge branch 'release/1.9.x'
Conflicts:
	direct/src/p3d/Packager.py
	direct/src/p3d/ppackage.py
	makepanda/makepandacore.py
2015-11-21 03:17:33 +01:00
rdb 2d6c2c5c6d Remove dependency on tkpanels and tkwidgets modules when building .p3d package 2015-11-20 17:42:18 +01:00
rdb 31dbcae262 Deprecate many extension methods, make extension methods imported via modules instead of dumped into core.py, move _core.pyd and _direct.pyd back to core.pyd, direct.pyd respectively, move MAIN_DIR set-up code to module init time 2015-11-10 00:44:29 +01:00
rdb db3ab953e4 Remove ppremake, genPyCode, and all hacks created to support them 2015-11-09 19:06:49 +01:00
rdb e8e155f218 AnimControlCollection methods should take floating-point frame numbers to match AnimInterface 2015-07-27 12:56:13 +02:00
rdb d7b5fe37da Merge remote-tracking branch 'origin/release/1.9.x' 2015-07-27 12:49:54 +02:00
rdb 5413a267ba Fix error with AnimControlInterval 2015-07-27 12:48:45 +02:00
rdb d9342043b0 Deprecate pandac.PandaModules and genPyCode, move extensions to panda3d/, clean up imports and deprecated behaviour 2015-06-28 13:55:31 +02:00
rdb a65b477734 Commit patches by cfsworks:
cxx: Fix missing includes masked by composite builds.
misc: Fix typos in comments.
config: Fix missing config forward-declarations.
direct: Adjust Python imports to panda3d.* instead of pandac.*.
display: Split graphicsWindow out into an extension.
framework: Use if/elif/elif/endif instead of ifdef/elif/elif/endif.
ode: Remove erroneous INLINE declarations.
interval: Fix missing import.
2014-10-19 22:41:47 +00:00
rdb 79430f6bc5 Fixes for Python 3 2014-02-27 11:30:56 +00:00
rdb c729775265 The 'new' module has been deprecated since 2.6 and removed in Python 3, let's not use it (use 'types' module instead) 2013-12-23 15:08:00 +00:00
rdb 88048bf3da Fix use of has_key and map() 2013-12-17 19:49:09 +00:00
Chris Brunner ee3adf5723 Fix a bug where privReverseInstant would reset to the last state of an interval and not the start state 2012-01-27 03:02:50 +00:00
David Rose fb220d8f93 missing file 2011-12-19 18:43:27 +00:00
David Rose c5c21a566a UnalignedLVecBase etc, remove lerp etc, moving towards Eigen on win32 2011-12-18 16:30:31 +00:00
Zhao Huang 33e1ead6c5 Don't import ParticleInterval if the ParticleSystem doesn't exist (ie., not compiled in) 2011-12-15 04:45:40 +00:00
David Rose f9658303e7 ah, *this* is the proper fix to recent interrogate bug. 2011-12-09 05:56:27 +00:00
David Rose 262a3558c7 fix interrogate error? 2011-12-09 02:35:34 +00:00
David Rose dfe16c64f6 rename all Panda-built libraries to begin with libp3 or libpanda 2011-12-06 02:39:21 +00:00
David Rose a1e13af431 wip: improve scrubbing behavior through SoundInterval 2011-10-31 21:39:04 +00:00
David Rose 05bd74a80e Parabolaf -> LParabola 2011-10-30 20:28:55 +00:00
David Rose 501470169f stdfloat_double 2011-10-10 05:25:10 +00:00
David Rose d6a8731988 fix for nameless functors 2011-06-22 21:32:23 +00:00
rdb 804a72b716 Partially apply typo fix patch I found somewhere on the web, by someone named Christoph Korn 2010-11-16 08:58:45 +00:00
Redmond Urbino 1c33e886ea kill garbage cycle by calling cleanup instead of disable 2010-06-15 21:40:42 +00:00