From 43507dd1184c7775df93b10d494a7a0c31be434e Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 18 Aug 2020 16:37:44 +0200 Subject: [PATCH 01/12] mathutil: Fix Triangulator bug cleaning up hole indices --- panda/src/mathutil/triangulator.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panda/src/mathutil/triangulator.cxx b/panda/src/mathutil/triangulator.cxx index f179b24e83..fda047d5d6 100644 --- a/panda/src/mathutil/triangulator.cxx +++ b/panda/src/mathutil/triangulator.cxx @@ -263,7 +263,7 @@ cleanup_polygon_indices(vector_int &polygon) { ++pi; } else { // This index is out-of-bounds; remove it. - polygon.erase(_polygon.begin() + pi); + polygon.erase(polygon.begin() + pi); } } @@ -275,11 +275,11 @@ cleanup_polygon_indices(vector_int &polygon) { ++pi; } else { // This vertex repeats the previous one; remove it. - polygon.erase(_polygon.begin() + pi); + polygon.erase(polygon.begin() + pi); } } - if (polygon.size() > 1 && _vertices[polygon.back()] == _vertices[_polygon.front()]) { + if (polygon.size() > 1 && _vertices[polygon.back()] == _vertices[polygon.front()]) { // The last vertex repeats the first one; remove it. polygon.pop_back(); } From 5ef1db3fd3cb5255d0e5199444de22e77b9158dd Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 18 Aug 2020 17:25:58 +0200 Subject: [PATCH 02/12] Revert "mathutil: error instead of infinite loop if triangulation failed" This reverts commit 9c4cb28805edf550fac9d8f4f87e568bbbf9a154. The "fix" wasn't very satisfying, I'm going to try another approach. --- panda/src/mathutil/triangulator.cxx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/panda/src/mathutil/triangulator.cxx b/panda/src/mathutil/triangulator.cxx index fda047d5d6..d9023b1381 100644 --- a/panda/src/mathutil/triangulator.cxx +++ b/panda/src/mathutil/triangulator.cxx @@ -150,11 +150,7 @@ triangulate() { } */ - int attempts = 0; - while (construct_trapezoids(num_segments) != 0) { - nassertv_always(attempts++ < 100); - // If there's an error, re-shuffle the index and try again. Randomizer randomizer; for (i = 0; i < num_segments; ++i) { From 7b9b65693a7e15db926a3faf2431f60056a1a5a2 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 18 Aug 2020 17:58:28 +0200 Subject: [PATCH 03/12] mathutil: Gracefully deal with "tails" in Triangulator Fixes #985 --- panda/src/mathutil/triangulator.cxx | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/panda/src/mathutil/triangulator.cxx b/panda/src/mathutil/triangulator.cxx index d9023b1381..e13d856804 100644 --- a/panda/src/mathutil/triangulator.cxx +++ b/panda/src/mathutil/triangulator.cxx @@ -279,6 +279,38 @@ cleanup_polygon_indices(vector_int &polygon) { // The last vertex repeats the first one; remove it. polygon.pop_back(); } + + // Another pass over the polygons, this time removing any "tails". + while (polygon.size() >= 3) { + bool removed_any = false; + + int prevprev = polygon[polygon.size() - 2]; + int prev = polygon[polygon.size() - 1]; + + for (size_t i = 0; i < polygon.size(); ++i) { + int cur = polygon[i]; + if (_vertices[prevprev] == _vertices[cur]) { + // Cut off the tail. + removed_any = true; + polygon.erase(polygon.begin() + i); + if (i == 0) { + polygon.pop_back(); + } else { + polygon.erase(polygon.begin() + i - 1); + } + break; + } + + prevprev = prev; + prev = cur; + } + + // This might have been the tip of a longer tail, so if we removed + // something, go again. + if (!removed_any) { + break; + } + } } From 1236303acf54a587643122b31c52b5411990d595 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 18 Aug 2020 18:38:19 +0200 Subject: [PATCH 04/12] tests: Add new unit test for Triangulator (also testing #985) --- tests/mathutil/test_triangulator.py | 73 +++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 tests/mathutil/test_triangulator.py diff --git a/tests/mathutil/test_triangulator.py b/tests/mathutil/test_triangulator.py new file mode 100644 index 0000000000..9e8e41c16e --- /dev/null +++ b/tests/mathutil/test_triangulator.py @@ -0,0 +1,73 @@ +from panda3d.core import Triangulator + + +def triangulate(vertices): + t = Triangulator() + for i, v in enumerate(vertices): + t.add_vertex(v) + t.add_polygon_vertex(i) + + t.triangulate() + + # Make sure that the result is consistent by starting each triangle with + # the lowest index value. That makes it easier to use predetermined values + # in the test cases. + result = set() + + for n in range(t.get_num_triangles()): + # Switch to lowest matching index value in case of duplicates. + v0 = vertices.index(vertices[t.get_triangle_v0(n)]) + v1 = vertices.index(vertices[t.get_triangle_v1(n)]) + v2 = vertices.index(vertices[t.get_triangle_v2(n)]) + if v1 < v0: + v0, v1, v2 = v1, v2, v0 + if v1 < v0: + v0, v1, v2 = v1, v2, v0 + result.add((v0, v1, v2)) + + return result + + +def test_triangulator_degenerate(): + assert not triangulate([]) + assert not triangulate([(0, 0)]) + assert not triangulate([(0, 0), (0, 0)]) + assert not triangulate([(0, 0), (1, 0)]) + assert not triangulate([(0, 0), (0, 0), (0, 0)]) + assert not triangulate([(0, 0), (1, 0), (1, 0)]) + assert not triangulate([(1, 0), (1, 0), (1, 0)]) + assert not triangulate([(1, 0), (0, 0), (1, 0)]) + assert not triangulate([(0, 0), (0, 0), (0, 0), (0, 0)]) + + +def test_triangulator_triangle(): + assert triangulate([(0, 0), (1, 0), (1, 1)]) == {(0, 1, 2)} + + +def test_triangulator_tail(): + # This triangle has a long "tail" where the polygon retraces its vertices. + assert triangulate([ + (0, -1), + (0, 1), + (1, 0), + (2, 0), + (3, 1), + (4, 0), + (5, 0), + (4, 0), + (3, 1), + (2, 0), + (1, 0), + ]) == {(0, 2, 1)} + + +def test_triangulator_hourglass(): + # Two triangles with touching tips, effectively. + assert triangulate([ + (-1, 1), + (-1, -1), + (0, 0), + (1, -1), + (1, 1), + (0, 0), + ]) == {(0, 1, 2), (2, 3, 4)} From 4484aca8e19d4f4557d29e8f58ed3305161e89fd Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 21 Aug 2020 14:06:16 +0200 Subject: [PATCH 05/12] Revert "pgui: Ignore PGEntry tab keypress" This reverts commit 1f05d37b209470c179b6d00f888ac39ffd14bcf4. See #994 --- panda/src/pgui/pgEntry.cxx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/panda/src/pgui/pgEntry.cxx b/panda/src/pgui/pgEntry.cxx index c729a23038..b6a86754d7 100644 --- a/panda/src/pgui/pgEntry.cxx +++ b/panda/src/pgui/pgEntry.cxx @@ -203,11 +203,6 @@ press(const MouseWatcherParameter ¶m, bool background) { ButtonHandle button = param.get_button(); - if (button == KeyboardButton::tab()) { - // Tab. Ignore the entry. - return; - } - if (button == MouseButton::one() || button == MouseButton::two() || button == MouseButton::three() || From 9deb56944105c71b49a1b9d34fd085ce6b110e4b Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 21 Aug 2020 14:29:27 +0200 Subject: [PATCH 06/12] pgui: Work around Windows bug with tab character in PGEntry Fixes #994 --- panda/src/pgui/pgEntry.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/pgui/pgEntry.cxx b/panda/src/pgui/pgEntry.cxx index b6a86754d7..97d200f8e1 100644 --- a/panda/src/pgui/pgEntry.cxx +++ b/panda/src/pgui/pgEntry.cxx @@ -321,7 +321,7 @@ keystroke(const MouseWatcherParameter ¶m, bool background) { int keycode = param.get_keycode(); - if (!isascii(keycode) || isprint(keycode)) { + if ((!isascii(keycode) || isprint(keycode)) && keycode != '\t') { // A normal visible character. Add a new character to the text entry, // if there's room. if (!_candidate_wtext.empty()) { From ab6bf5f4f75e9aa16e71a5fed7c03f1ac8ce2762 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 21 Aug 2020 14:51:42 +0200 Subject: [PATCH 07/12] general: Add workaround for Windows bug in various uses of isprint() See #994; there is a regression in certain versions of the Windows CRT that gives the wrong result for isprint(). This adds workarounds to various potentially affected locations where isprint() is being used. --- direct/src/dcparser/dcPacker.cxx | 2 +- direct/src/plugin/p3dStringObject.cxx | 5 +++++ dtool/src/interrogate/interfaceMakerPythonNative.cxx | 4 ++++ dtool/src/prckeys/makePrcKey.cxx | 9 ++++++--- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/direct/src/dcparser/dcPacker.cxx b/direct/src/dcparser/dcPacker.cxx index b6dbd60855..810744c2ab 100644 --- a/direct/src/dcparser/dcPacker.cxx +++ b/direct/src/dcparser/dcPacker.cxx @@ -1102,7 +1102,7 @@ enquote_string(ostream &out, char quote_mark, const string &str) { if ((*pi) == quote_mark || (*pi) == '\\') { out << '\\' << (*pi); - } else if (!isprint(*pi)) { + } else if (!isprint(*pi) || (*pi) == '\t') { char buffer[10]; sprintf(buffer, "%02x", (unsigned char)(*pi)); out << "\\x" << buffer; diff --git a/direct/src/plugin/p3dStringObject.cxx b/direct/src/plugin/p3dStringObject.cxx index 8d87a2dc8c..4cd1d1f513 100644 --- a/direct/src/plugin/p3dStringObject.cxx +++ b/direct/src/plugin/p3dStringObject.cxx @@ -83,6 +83,11 @@ output(std::ostream &out) { out << "\\\x22"; break; + case '\t': + // Certain versions of the Windows CRT classify tab as printable. + out << "\\t"; + break; + default: out << *si; } diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 40572007fc..2a90a4b1db 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -8019,6 +8019,10 @@ output_quoted(ostream &out, int indent_level, const std::string &str, << '"'; continue; + case '\t': + out << "\\t"; + break; + default: if (!isprint(*si)) { out << "\\" << oct << std::setw(3) << std::setfill('0') << (unsigned int)(*si) diff --git a/dtool/src/prckeys/makePrcKey.cxx b/dtool/src/prckeys/makePrcKey.cxx index 23bf0914b0..fea188c87c 100644 --- a/dtool/src/prckeys/makePrcKey.cxx +++ b/dtool/src/prckeys/makePrcKey.cxx @@ -93,10 +93,13 @@ output_c_string(std::ostream &out, const string &string_name, last_nl = false; } - if (isprint(data_ptr[i])) { + if (data_ptr[i] == '\t') { + out << "\\t"; + } + else if (isprint(data_ptr[i])) { out << data_ptr[i]; - - } else { + } + else { out << "\\x" << std::hex << std::setw(2) << std::setfill('0') << (unsigned int)(unsigned char)data_ptr[i] << std::dec; } From 1cc82f47b60651fc6b7b21cf654e2ec4b5746ffa Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 1 Sep 2020 10:41:34 +0200 Subject: [PATCH 08/12] fmod: Fallback to opening file via callbacks if direct doesn't work Fixes #1002 --- panda/src/audiotraits/fmodAudioSound.cxx | 96 +++++++++++++----------- 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/panda/src/audiotraits/fmodAudioSound.cxx b/panda/src/audiotraits/fmodAudioSound.cxx index d8560658a7..e81695969c 100644 --- a/panda/src/audiotraits/fmodAudioSound.cxx +++ b/panda/src/audiotraits/fmodAudioSound.cxx @@ -123,50 +123,62 @@ FmodAudioSound(AudioManager *manager, VirtualFile *file, bool positional) { << "Reading " << _file_name << " into memory (" << sound_info.length << " bytes)\n"; } - - } else if (file->get_system_info(info)) { - // The file exists on disk (or it's part of a multifile that exists on - // disk), so we can have FMod read the file directly. This is also - // safe, because FMod uses its own IO operations that don't involve - // Panda, so this can safely happen in an FMod thread. - os_filename = info.get_filename().to_os_specific(); - name_or_data = os_filename.c_str(); - sound_info.fileoffset = (unsigned int)info.get_start(); - sound_info.length = (unsigned int)info.get_size(); - flags |= FMOD_CREATESTREAM; - if (fmodAudio_cat.is_debug()) { - fmodAudio_cat.debug() - << "Streaming " << _file_name << " from disk (" << name_or_data - << ", " << sound_info.fileoffset << ", " << sound_info.length << ")\n"; - } - - } else { -#if defined(HAVE_THREADS) && !defined(SIMPLE_THREADS) - // Otherwise, if the Panda threading system is compiled in, we can - // assign callbacks to read the file through the VFS. - name_or_data = (const char *)file; - sound_info.length = (unsigned int)info.get_size(); - sound_info.useropen = open_callback; - sound_info.userclose = close_callback; - sound_info.userread = read_callback; - sound_info.userseek = seek_callback; - flags |= FMOD_CREATESTREAM; - if (fmodAudio_cat.is_debug()) { - fmodAudio_cat.debug() - << "Streaming " << _file_name << " from disk using callbacks\n"; - } - -#else // HAVE_THREADS && !SIMPLE_THREADS - // Without threads, we can't safely read this file. - name_or_data = ""; - - fmodAudio_cat.warning() - << "Cannot stream " << _file_name << "; file is not literally on disk.\n"; -#endif + result = + _manager->_system->createSound(name_or_data, flags, &sound_info, &_sound); } + else { + result = FMOD_ERR_FILE_BAD; - result = - _manager->_system->createSound(name_or_data, flags, &sound_info, &_sound); + if (file->get_system_info(info)) { + // The file exists on disk (or it's part of a multifile that exists on + // disk), so we can have FMod read the file directly. This is also + // safe, because FMod uses its own IO operations that don't involve + // Panda, so this can safely happen in an FMod thread. + os_filename = info.get_filename().to_os_specific(); + name_or_data = os_filename.c_str(); + sound_info.fileoffset = (unsigned int)info.get_start(); + sound_info.length = (unsigned int)info.get_size(); + flags |= FMOD_CREATESTREAM; + if (fmodAudio_cat.is_debug()) { + fmodAudio_cat.debug() + << "Streaming " << _file_name << " from disk (" << name_or_data + << ", " << sound_info.fileoffset << ", " << sound_info.length << ")\n"; + } + + result = + _manager->_system->createSound(name_or_data, flags, &sound_info, &_sound); + } + + // If FMOD can't directly read the file (eg. if Panda is locking it for + // write, or it's compressed) we have to use the callback interface. + if (result == FMOD_ERR_FILE_BAD) { + #if defined(HAVE_THREADS) && !defined(SIMPLE_THREADS) + // Otherwise, if the Panda threading system is compiled in, we can + // assign callbacks to read the file through the VFS. + name_or_data = (const char *)file; + sound_info.fileoffset = 0; + sound_info.length = (unsigned int)info.get_size(); + sound_info.useropen = open_callback; + sound_info.userclose = close_callback; + sound_info.userread = read_callback; + sound_info.userseek = seek_callback; + flags |= FMOD_CREATESTREAM; + if (fmodAudio_cat.is_debug()) { + fmodAudio_cat.debug() + << "Streaming " << _file_name << " from disk using callbacks\n"; + } + result = + _manager->_system->createSound(name_or_data, flags, &sound_info, &_sound); + + #else // HAVE_THREADS && !SIMPLE_THREADS + // Without threads, we can't safely read this file. + name_or_data = ""; + + fmodAudio_cat.warning() + << "Cannot stream " << _file_name << "; file is not literally on disk.\n"; + #endif + } + } } if (result != FMOD_OK) { From dae9e31223cb472c8f39476a1d3340999d076b77 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 1 Sep 2020 10:54:38 +0200 Subject: [PATCH 09/12] direct: fix various uses of types.MethodType in Python 3 (from #1000) --- direct/src/fsm/State.py | 21 +++++++++++++++------ direct/src/interval/FunctionInterval.py | 11 ++++++++--- direct/src/showbase/Messenger.py | 8 ++++++-- direct/src/showbase/PythonUtil.py | 5 ++++- direct/src/task/Task.py | 10 +++++++--- 5 files changed, 40 insertions(+), 15 deletions(-) diff --git a/direct/src/fsm/State.py b/direct/src/fsm/State.py index 3842b0844b..07df3dd9d0 100644 --- a/direct/src/fsm/State.py +++ b/direct/src/fsm/State.py @@ -4,6 +4,7 @@ __all__ = ['State'] from direct.directnotify.DirectNotifyGlobal import directNotify from direct.showbase.DirectObject import DirectObject +import sys class State(DirectObject): @@ -32,16 +33,24 @@ class State(DirectObject): if type(enterFunc) == types.MethodType: if enterFunc.__func__ == oldFunction: # print 'found: ', enterFunc, oldFunction - state.setEnterFunc(types.MethodType(newFunction, - enterFunc.__self__, - enterFunc.__self__.__class__)) + if sys.version_info >= (3, 0): + state.setEnterFunc(types.MethodType(newFunction, + enterFunc.__self__)) + else: + state.setEnterFunc(types.MethodType(newFunction, + enterFunc.__self__, + enterFunc.__self__.__class__)) count += 1 if type(exitFunc) == types.MethodType: if exitFunc.__func__ == oldFunction: # print 'found: ', exitFunc, oldFunction - state.setExitFunc(types.MethodType(newFunction, - exitFunc.__self__, - exitFunc.__self__.__class__)) + if sys.version_info >= (3, 0): + state.setExitFunc(types.MethodType(newFunction, + exitFunc.__self__)) + else: + state.setExitFunc(types.MethodType(newFunction, + exitFunc.__self__, + exitFunc.__self__.__class__)) count += 1 return count diff --git a/direct/src/interval/FunctionInterval.py b/direct/src/interval/FunctionInterval.py index db626c404e..942875d4e3 100644 --- a/direct/src/interval/FunctionInterval.py +++ b/direct/src/interval/FunctionInterval.py @@ -7,6 +7,7 @@ from panda3d.direct import * from direct.showbase.MessengerGlobal import * from direct.directnotify.DirectNotifyGlobal import directNotify from . import Interval +import sys ############################################################# @@ -36,9 +37,13 @@ class FunctionInterval(Interval.Interval): if type(ival.function) == types.MethodType: if ival.function.__func__ == oldFunction: # print 'found: ', ival.function, oldFunction - ival.function = types.MethodType(newFunction, - ival.function.__self__, - ival.function.__self__.__class__) + if sys.version_info >= (3, 0): + ival.function = types.MethodType(newFunction, + ival.function.__self__) + else: + ival.function = types.MethodType(newFunction, + ival.function.__self__, + ival.function.__self__.__class__) count += 1 return count diff --git a/direct/src/showbase/Messenger.py b/direct/src/showbase/Messenger.py index e4ba5ccda8..457eba20c8 100644 --- a/direct/src/showbase/Messenger.py +++ b/direct/src/showbase/Messenger.py @@ -8,6 +8,7 @@ __all__ = ['Messenger'] from .PythonUtil import * from direct.directnotify import DirectNotifyGlobal import types +import sys from direct.stdpy.threading import Lock @@ -464,8 +465,11 @@ class Messenger: # 'oldMethod: ' + repr(oldMethod) + '\n' + # 'newFunction: ' + repr(newFunction) + '\n') if (function == oldMethod): - newMethod = types.MethodType( - newFunction, method.__self__, method.__self__.__class__) + if sys.version_info >= (3, 0): + newMethod = types.MethodType(newFunction, method.__self__) + else: + newMethod = types.MethodType( + newFunction, method.__self__, method.__self__.__class__) params[0] = newMethod # Found it retrun true retFlag += 1 diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index e92025a775..98753a7622 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -1600,7 +1600,10 @@ def appendStr(obj, st): return s oldStr = Functor(stringer, str(obj)) stringer = None - obj.__str__ = types.MethodType(Functor(appendedStr, oldStr, st), obj, obj.__class__) + if sys.version_info >= (3, 0): + obj.__str__ = types.MethodType(Functor(appendedStr, oldStr, st), obj) + else: + obj.__str__ = types.MethodType(Functor(appendedStr, oldStr, st), obj, obj.__class__) appendedStr = None return obj diff --git a/direct/src/task/Task.py b/direct/src/task/Task.py index 93e30eb3db..bc7b9b6e6a 100644 --- a/direct/src/task/Task.py +++ b/direct/src/task/Task.py @@ -599,9 +599,13 @@ class TaskManager: else: function = method if (function == oldMethod): - newMethod = types.MethodType(newFunction, - method.__self__, - method.__self__.__class__) + if sys.version_info >= (3, 0): + newMethod = types.MethodType(newFunction, + method.__self__) + else: + newMethod = types.MethodType(newFunction, + method.__self__, + method.__self__.__class__) task.setFunction(newMethod) # Found a match return 1 From fcfe3206eb9bcc61ecc21b252201c1a1608b264d Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 1 Sep 2020 10:55:37 +0200 Subject: [PATCH 10/12] cleanup: Remove newlines at end of direct/src/fsm/State.py --- direct/src/fsm/State.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/direct/src/fsm/State.py b/direct/src/fsm/State.py index 07df3dd9d0..2aedda6c71 100644 --- a/direct/src/fsm/State.py +++ b/direct/src/fsm/State.py @@ -224,18 +224,3 @@ class State(DirectObject): def __str__(self): return "State: name = %s, enter = %s, exit = %s, trans = %s, children = %s" %\ (self.__name, self.__enterFunc, self.__exitFunc, self.__transitions, self.__FSMList) - - - - - - - - - - - - - - - From 1f504f60310beccb1b5a4f72e93e05751bd4dcbb Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 31 Aug 2020 23:53:31 +0300 Subject: [PATCH 11/12] mayaegg: Fix animations not being created during egg traversal Closes #1004 --- pandatool/src/mayaegg/mayaEggLoader.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandatool/src/mayaegg/mayaEggLoader.cxx b/pandatool/src/mayaegg/mayaEggLoader.cxx index a60e5d2372..a6ec611d7a 100644 --- a/pandatool/src/mayaegg/mayaEggLoader.cxx +++ b/pandatool/src/mayaegg/mayaEggLoader.cxx @@ -1572,7 +1572,8 @@ void MayaEggLoader::TraverseEggNode(EggNode *node, EggGroup *context, string del mayaloader_cat.debug() << delim+delstring << "found an EggTable: " << node->get_name() << endl; } } else if (node->is_of_type(EggXfmSAnim::get_class_type())) { - //MayaAnim *anim = GetAnim(DCAST(EggXfmSAnim, node)); + // Create a MayaAnim equivalent of the EggXfmSAnim + GetAnim(DCAST(EggXfmSAnim, node)); //anim->PrintData(); if (mayaloader_cat.is_debug()) { mayaloader_cat.debug() << delim+delstring << "found an EggXfmSAnim: " << node->get_name() << endl; From 216475091e4741eb184bbf88d06da62adc5effbe Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 31 Aug 2020 23:53:48 +0300 Subject: [PATCH 12/12] maya: Silence compiler warning --- pandatool/src/maya/maya_funcs.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandatool/src/maya/maya_funcs.cxx b/pandatool/src/maya/maya_funcs.cxx index 2f21adefb3..b07b8089d1 100644 --- a/pandatool/src/maya/maya_funcs.cxx +++ b/pandatool/src/maya/maya_funcs.cxx @@ -519,8 +519,8 @@ describe_compound_attribute(MObject &node) { for (size_t i = 0; i < comp_attr.numChildren(); i++) { MObject child = comp_attr.child(i, &status); if (child.apiType() == MFn::kAttribute3Float){ - LRGBColor color; /* + LRGBColor color; if (get_vec3_attribute(child, "color", color)) { maya_cat.info() << "color: " << color << endl; }