Commit Graph

266 Commits

Author SHA1 Message Date
rdb c980643649 chan: Lock PartBundle while binding animation
This seems like the right thing to do that could prevent some potential race conditions; let me known if this is breaking anything.
2021-11-28 16:21:59 +01:00
rdb 3ac504ec16 char: attempt to make Character class thread-safe 2020-02-10 12:49:45 +01:00
rdb b272af8bbf Merge branch 'cmake' 2020-01-22 11:20:51 +01:00
rdb 876cb60220 char/chan: clean up MovingPartScalar/CharacterSlider constructors
These changes are a follow-up to 8b6f82256e but could not be made on that branch due to ABI compatibility reasons.
2020-01-21 15:34:33 +01:00
rdb 05d5bac598 Merge branch 'release/1.10.x' into incoming 2020-01-21 15:34:25 +01:00
rdb 98268b59c0 chan: publish AnimChannelScalarTable constructor 2020-01-20 00:32:49 +01:00
Sam Edwards 5961cc2ee0 Merge branch 'master' into cmake 2019-10-05 15:00:49 -06:00
rdb 12e71ff1a6 Merge branch 'release/1.10.x' 2019-09-30 14:03:50 +02:00
rdb 9f9e1d8293 chan: print out actual anim info when showing AnimBundleNode in ls()
This allows one to more easily discover the animations present in a scene graph, such as when using bam-info -ls to inspect a .bam file.
2019-09-30 14:02:53 +02:00
Sam Edwards 5fa4af9189 CMake: Rely on GNUInstallDirs to specify install paths
This makes multiarch OSes happy as they can dictate that
64-bit libraries go into 'lib64'
2019-08-31 00:48:42 -06:00
Sam Edwards 1a654cba04 CMake: Record the location that headers are installed
This populates INTERFACE_INCLUDE_DIRECTORIES on the targets
after they're installed.
2019-08-30 22:58:18 -06:00
Sam Edwards 19ed9f6b47 Merge branch 'master' into cmake 2019-08-24 18:07:12 -06:00
rdb d3e61e1abe chan: remove net blend calculation, nothing is actually using it 2019-07-25 20:34:25 +02:00
rdb 4322523400 chan: remove unused MovingPartBase::_num_effective_channels member 2019-07-18 20:20:41 +02:00
Sam Edwards f8161cc529 Merge branch 'master' into cmake 2019-03-12 02:03:16 -06:00
rdb 11b5f09819 general: replace remaining references to ConditionVarFull. 2019-02-11 16:23:16 +01:00
Sam Edwards 99fee1a64d CMake: Assign COMPONENT and EXPORT to all targets 2018-12-06 17:48:44 -07:00
Sam Edwards df805bd02b Merge branch 'master' into cmake 2018-11-28 21:54:58 -07:00
rdb 97d4e32a06 general: use nassert_raise instead of nassertv(false) et al
Even a brief error message in the assertion is infinitely more useful to a user who is not at home in the source code, especially for assertions that may reasonably be triggered by honest user mistakes.
2018-11-28 17:35:20 +01:00
rdb 594e6b394b chan: add various property interfaces to animation system 2018-11-28 16:46:49 +01:00
Sam Edwards 58c065d970 Merge branch 'master' into cmake 2018-10-28 05:11:14 -06:00
rdb f35c9e5d79 chan: adjust _net_blend when AnimControl destructs 2018-10-18 22:03:16 +02:00
rdb a05e928a75 chan: fix crash in certain cases after AnimControl destruction 2018-10-17 19:44:39 +02:00
rdb eac88fc64a chan: disable AnimControl copy ctor and assignment operators 2018-10-17 19:43:41 +02:00
Sam Edwards e917c54433 Merge branch 'master' into cmake 2018-09-22 15:55:59 -06:00
Younguk Kim ba9ea8ea27 chan: add missing export macro 2018-09-21 19:49:21 -04: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
Sam Edwards 2ab77d9a27 Merge branch 'master' into cmake 2018-08-14 21:59:45 -06:00
rdb ad3ab3ad21 Define stable ordering for WeakPointerTo for use as map/set key
Currently, the WeakPointerTo comparison operators compare the raw pointers, but this is not useful as it may cause a false equality if one weak pointer in the comparison is expired and points to memory that has since been reused.

Instead, we can define a comparison based on the control block pointer, which exists since the new weak pointer implementation in 0bb81a43c9.  This is implemented in the owner_before method, matching C++11 std::weak_ptr semantics.

I would now recommend deprecating most comparison operators of WeakPointerTo or redefining them to make more sense, ie. comparing equal if they (once) referred to the same object and not if they simply point to the same memory address.  This has not yet been done, though code that uses the comparison operators has been fixed in this commit.

Overloads of std::owner_less have been provided for creating a map or set with Weak(Const)PointerTo keys.
2018-07-30 17:27:09 +02:00
rdb 269d154aea chan: fix thread-unsafe access of WeakPointerTo 2018-07-08 21:15:40 +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 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 bc596797a3 general: Resolve some warnings unique to Windows 2018-06-10 02:25:10 -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 32e1ca2252 general: Fix several miscategorized EXPCL_PANDA_* macros 2018-05-29 22:49:35 -06:00
Sam Edwards d0ebc59d32 Merge branch 'master' into cmake 2018-05-27 14:07:05 -06:00
rdb 0bb81a43c9 express: make a thread safe weak pointer implementation (#321)
To access a WeakPointerTo in a thread-safe way, use something like this:

    if (auto ptr = weak_ptr.lock()) {
      ..use ptr as regular PointerTo
    }

The new implementation no longer needs a reference to be stored to all weak pointers on the WeakReferenceList; a mere count of weak pointers is sufficient.  Therefore, callbacks theoretically no longer require a WeakPointerTo to be constructed.

The WeakPointerTo class is not actually atomic; it could be made so, but I don't believe it's worth it at this time.
2018-05-15 13:40:21 +02:00
Sam Edwards 4cec331722 CMake: Add support for building metalibs as metalibs 2018-04-18 14:42:56 -06:00
Sam Edwards 449195a33d CMake: Define appropriate BUILDING_ symbols 2018-03-31 04:24:06 -06:00
Sam Edwards 25b13ad199 Merge branch 'master' into cmake 2018-03-31 04:23:49 -06: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 cfd70ebead general: Remove '#pragma interface'/'#pragma implementation'
The GCC documentation states that, as of GCC 2.7.2, these aren't
necessary for proper program behavior. The documentation further
discourages their use because they don't suppress unnecessary code
duplication.

The Panda codebase these days uses "extern template class" instead,
which tells the compiler not to perform implicit template expansion
because an explicit template expansion is available for linking
elsewhere in the program. This is a more compiler-neutral way of
achieving the same thing as '#pragma interface', making
'#pragma interface' not only redundant, it could also mask problems
in the "extern template class" machinery.
2018-03-20 14:36:19 -04:00
rdb a5beccc99e chan: fix crash when AnimControl is destroyed in threaded pipeline
See #254 for related discussion.
2018-02-24 12:15:56 +01:00