Commit Graph

7270 Commits

Author SHA1 Message Date
Sam Edwards 90d3b29767 CMake: Sort direct/dtool/panda/pandatool subdirectories
This forces us to make sure the inter-target dependencies work
in an order-independent way.
2018-10-10 20:16:32 -06:00
Sam Edwards 53920e7aee CMake: Move __init__.py generation to Python.cmake
This also allows us to generate a suitable __init__.py for fixing
up PATH and/or __path__ on platforms that need it to properly
import Python extension modules.
2018-09-28 21:24:26 -06:00
Sam Edwards 2e2a8eae98 CMake: Byte-compile all .py files when building Panda
This also involves the creation a new include: Python.cmake

This file will contain utility functions for building Python
modules and installing Python packages.
2018-09-28 17:15:56 -06:00
Sam Edwards e917c54433 Merge branch 'master' into cmake 2018-09-22 15:55:59 -06:00
Sam Edwards 1520d712d4 CMake: Remove target_use_packages
Instead, let's use a PKG::PKGNAME interface library, which simplifies
the linking and also allows us to use imported libraries from
find_package in the future.
2018-09-21 10:17:05 -06:00
rdb 822f89fadb dgui: accept arg in setText, setImage, setGeom, also add clearers
This enables the "setters" to behave in a way that people expect setters to behave.  Since `setText(None)` now does not behave expectedly, a `clearText()` has also been added to remove the text.

Closes #385
2018-09-13 21:14:04 +02:00
jspam a333353af6 Make Loader.loadSound() accept a MovieAudio instance as soundPath
This functionality seems to have inadvertently been removed by
refactoring commit 23bf9ea5.

Closes #383
2018-09-09 20:22:51 +02:00
Sam Edwards 208ecd6708 Merge branch 'master' into cmake 2018-09-02 16:06:41 -06:00
Sam Edwards fa1e1a2e63 CMake: Tidy up installation directory
Don't install "object-Configuration/" directories when
using metalibs, and also put .dll files in bin/ on Windows.
2018-09-01 11:07:55 -06:00
Sam Edwards 4695557a5d general: Don't require BUILDING_* for static builds 2018-08-31 23:54:32 -06:00
rdb 27dbad6fd9 leveleditor: add missing import 2018-08-26 14:04:19 +02:00
Sam Edwards 67e6c4299e CMake: Reorganize Python installation in direct/CMakeLists.txt 2018-08-19 17:04:29 -06:00
rdb 35fff81b6a makepanda: fix missing BUILDING_DIRECT_DCPARSER
[skip ci]
2018-08-19 21:06:47 +02:00
rdb b1d2111037 express: add Datagram add_blob and add_blob32, et al.
This is for writing Python 2/3 agnostic code for writing binary data to a datagram, and reading from it using DatagramIterator.
2018-08-19 16:01:39 +02:00
Sam Edwards d94f27bedd CMake: Update dcparse(r) as latter now has EXPCL 2018-08-16 22:28:06 -06:00
Sam Edwards aea0ac4533 Merge branch 'master' into cmake 2018-08-16 22:27:49 -06:00
Sam Edwards 97d6d84ade dcparser: Add BUILDING_DIRECT_DCPARSER switch
Resolves GH #342.
2018-08-15 20:38:00 -06:00
Sam Edwards 2ab77d9a27 Merge branch 'master' into cmake 2018-08-14 21:59:45 -06:00
rdb ee318a73f3 interval: prevent hypothetical stack overflow 2018-08-08 20:16:11 +02:00
bfrisby2000 7c375ac531
showbase: Add blendType argument for Fade/Iris/Letterbox
This allows the 'blendType' argument to be passed through the three transitions' Lerp Intervals.
2018-08-07 20:23:16 -04:00
rdb 0fbfeb712f ParticlePanel: comment out unimplemented OrientedParticleFactory 2018-08-02 20:31:12 +02:00
rdb f813d2fb60 stdpy: fix broken threading.Event 2018-08-02 20:29:48 +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
rdb 886e1c2f16 general: fix many compilation warnings in GCC 8 2018-06-19 00:37:28 +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
Psychotropos fef2fff1f1 cmake: Actually install the p3direct library during the CMake install process 2018-06-13 02:05:32 -06:00
Sam Edwards 2e98b68e3b CMake: Make directbase/pandabase INTERFACE libraries
They export no code, and are really only used to contain several
preprocessor macros relevant to their respective packages. On
Windows, they're a problem: MSVC doesn't generate a .lib when
compiling a .dll that exports nothing.
2018-06-10 02:29:49 -06:00
Sam Edwards a088e6aba5 CMake: Autogenerate metalib init files 2018-06-10 02:29:35 -06:00
Sam Edwards c4126942f6 Merge branch 'master' into cmake 2018-06-10 02:29:21 -06: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 592a2e2d68 Merge branch 'master' into cmake 2018-06-06 13:18:12 -06:00
Sam Edwards 5e82671084 general: Do away with TYPENAME macro 2018-06-03 16:36:34 -06: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 7e4f9b4c8e CMake: Make p3directbase a component library 2018-06-01 02:56:43 -06:00
Sam Edwards 407589873a CMake: Update some Windows-specific rules 2018-06-01 02:56:43 -06:00
rdb 6b726fa697 general: fix various compiler warnings and issues exposed thereby 2018-05-30 11:09:35 +02:00
Sam Edwards d0ced03ffd CMake: Build direct.motiontrail
This covers pretty much all of direct, except for directd.
2018-05-29 22:57:28 -06:00
Sam Edwards 4b70cb162e CMake: Don't metalib p3distributed when not built 2018-05-29 22:47:28 -06:00
Sam Edwards d0ebc59d32 Merge branch 'master' into cmake 2018-05-27 14:07:05 -06:00
rdb 8c80ff1681 Audio3DManager: remove sounds when attached object is deleted
This now uses WeakNodePaths in order to prevent holding a reference to the corresponding nodes.

Closes #145
2018-05-20 18:46:27 +02:00
rdb 140644d8b6 stdpy: add Python 3 stuff to glob module, remove re dependency 2018-05-20 11:50:32 +02:00
Sam Edwards 6efb07de93 Merge branch 'master' into cmake 2018-05-14 19:09:14 -06:00
rdb 71eee6df3f showbase: make iris/fade/letterbox transitions awaitable
This allows using a coroutine to build up a more complex sequence including transitions (eg. scripted cutscene), as well as provide a standard way to register callbacks upon completion of the transition.
2018-05-05 23:05:50 +02:00
rdb cf58de4d04 showbase: make base.movie() awaitable (by returning a future) 2018-05-05 23:02:11 +02:00
rdb 11e21af52c showbase: fix iris/fade transitions for extreme aspect ratios
Fixes #311
2018-05-05 22:08:52 +02:00
rdb f986f8de1b showbase: add back clampScalar and PriorityCallbacks to PythonUtil
These were removed by 88dbb31daa under the assumption that they were not used, but it has recently come to my attention that there is still code out there that uses these.

PriorityCallbacks has been updated to be compatible with Python 3 by only comparing the priority, rather than the (priority, callback) tuple. This also has the side-effect of ditching the bisect dependency.

Also moves testing code from the source to the unit tests.
2018-04-21 11:43:46 +02:00
Sam Edwards 1fcb8a2748 CMake: Skip optional subdirectories in a cleaner way
Instead of wrapping the whole subdirectory's CMakeLists in
a gigantic if block, we use if(NOT HAVE_FOO) + return()

This is tidier since it keeps the indentation generally consistent
across all CMakeLists files.
2018-04-20 02:26:47 -06:00
Sam Edwards 56a6e6a80a Merge remote-tracking branch 'origin/master' into cmake 2018-04-20 01:57:46 -06:00
Sam Edwards 4cec331722 CMake: Add support for building metalibs as metalibs 2018-04-18 14:42:56 -06:00