From fc172f89183ca23b64ae4bbc0f35978f82ab5082 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 20 Apr 2018 12:48:26 +0200 Subject: [PATCH 01/20] tests: fix unit test on 32-bit Ubuntu due to float imprecision --- tests/bullet/test_bullet_bam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bullet/test_bullet_bam.py b/tests/bullet/test_bullet_bam.py index 11523a4f51..e22aa57ba2 100644 --- a/tests/bullet/test_bullet_bam.py +++ b/tests/bullet/test_bullet_bam.py @@ -88,8 +88,8 @@ def test_minkowski_sum_shape(): assert type(shape) is type(shape2) assert shape.margin == shape2.margin assert shape.name == shape2.name - assert shape.transform_a.mat.compare_to(shape2.transform_a.mat) == 0 - assert shape.transform_b.mat.compare_to(shape2.transform_b.mat) == 0 + assert shape.transform_a.mat.compare_to(shape2.transform_a.mat, 0.001) == 0 + assert shape.transform_b.mat.compare_to(shape2.transform_b.mat, 0.001) == 0 assert type(shape.shape_a) == type(shape2.shape_a) assert type(shape.shape_b) == type(shape2.shape_b) From e6e39cce0e9140de96febc3aba3d709cdffe8de1 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 20 Apr 2018 12:48:57 +0200 Subject: [PATCH 02/20] bullet: fix deadlock in get_manifold --- panda/src/bullet/bulletWorld.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/bullet/bulletWorld.cxx b/panda/src/bullet/bulletWorld.cxx index 9bfa707e9d..9732760460 100644 --- a/panda/src/bullet/bulletWorld.cxx +++ b/panda/src/bullet/bulletWorld.cxx @@ -1052,7 +1052,7 @@ BulletPersistentManifold *BulletWorld:: get_manifold(int idx) const { LightMutexHolder holder(get_global_lock()); - nassertr(idx < get_num_manifolds(), NULL); + nassertr(idx < _dispatcher->getNumManifolds(), NULL); btPersistentManifold *ptr = _dispatcher->getManifoldByIndexInternal(idx); return (ptr) ? new BulletPersistentManifold(ptr) : NULL; From 1ac351d594e559b5fa20bcdacb6b939b1b1ac8c0 Mon Sep 17 00:00:00 2001 From: deflected Date: Fri, 20 Apr 2018 21:25:41 +0300 Subject: [PATCH 03/20] bullet: Allow intractions with bullet world during tick callbacks - Release the global lock during the user tick callback and allow interactions with bullet world - Acquire the lock again after the callback Signed-off-by: deflected --- panda/src/bullet/bulletWorld.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/panda/src/bullet/bulletWorld.cxx b/panda/src/bullet/bulletWorld.cxx index 9732760460..6098759581 100644 --- a/panda/src/bullet/bulletWorld.cxx +++ b/panda/src/bullet/bulletWorld.cxx @@ -1186,7 +1186,12 @@ tick_callback(btDynamicsWorld *world, btScalar timestep) { CallbackObject *obj = w->_tick_callback_obj; if (obj) { BulletTickCallbackData cbdata(timestep); + // Release the global lock that we are holding during the tick callback + // and allow interactions with bullet world in the user callback + get_global_lock().release(); obj->do_callback(&cbdata); + // Acquire the global lock again and protect the execution + get_global_lock().acquire(); } } From 574000aedd9c4ef48f4a22b5cab52e373ba12c86 Mon Sep 17 00:00:00 2001 From: Donny Lawrence Date: Fri, 20 Apr 2018 22:25:01 -0500 Subject: [PATCH 04/20] Add getter and setter for Content-Type header Fixes #296 Closes #305 --- panda/src/downloader/httpChannel.I | 17 +++++++++++++++++ panda/src/downloader/httpChannel.cxx | 3 ++- panda/src/downloader/httpChannel.h | 4 ++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/panda/src/downloader/httpChannel.I b/panda/src/downloader/httpChannel.I index ccc30d504d..1a254e478a 100644 --- a/panda/src/downloader/httpChannel.I +++ b/panda/src/downloader/httpChannel.I @@ -426,6 +426,23 @@ get_max_updates_per_second() const { return _max_updates_per_second; } +/** + * Specifies the Content-Type header, useful for applications that require + * different types of content, such as JSON. + */ +INLINE void HTTPChannel:: +set_content_type(string content_type) { + _content_type = content_type; +} + +/** + * Returns the value of the Content-Type header. + */ +INLINE string HTTPChannel:: +get_content_type() const { + return _content_type; +} + /** * This may be called immediately after a call to get_document() or some * related function to specify the expected size of the document we are diff --git a/panda/src/downloader/httpChannel.cxx b/panda/src/downloader/httpChannel.cxx index a7eb5f58d3..93e04f1432 100644 --- a/panda/src/downloader/httpChannel.cxx +++ b/panda/src/downloader/httpChannel.cxx @@ -100,6 +100,7 @@ HTTPChannel(HTTPClient *client) : _response_type = RT_none; _http_version = _client->get_http_version(); _http_version_string = _client->get_http_version_string(); + _content_type = "application/x-www-form-urlencoded"; _state = S_new; _done_state = S_new; _started_download = false; @@ -3624,7 +3625,7 @@ make_header() { if (!_body.empty()) { stream - << "Content-Type: application/x-www-form-urlencoded\r\n" + << "Content-Type: " << _content_type << "\r\n" << "Content-Length: " << _body.length() << "\r\n"; } diff --git a/panda/src/downloader/httpChannel.h b/panda/src/downloader/httpChannel.h index b9131eba9a..7de0e17e83 100644 --- a/panda/src/downloader/httpChannel.h +++ b/panda/src/downloader/httpChannel.h @@ -143,6 +143,9 @@ PUBLISHED: INLINE void set_max_updates_per_second(double max_updates_per_second); INLINE double get_max_updates_per_second() const; + INLINE void set_content_type(string content_type); + INLINE string get_content_type() const; + INLINE void set_expected_file_size(size_t file_size); streamsize get_file_size() const; INLINE bool is_file_size_known() const; @@ -336,6 +339,7 @@ private: string request_path; string _header; string _body; + string _content_type; bool _want_ssl; bool _proxy_serves_document; bool _proxy_tunnel_now; From f986f8de1b7734205da4d60cd43318fe2d3e24ec Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 21 Apr 2018 11:20:49 +0200 Subject: [PATCH 05/20] showbase: add back clampScalar and PriorityCallbacks to PythonUtil These were removed by 88dbb31daa02779405ef5326677eefb5cf93f3c8 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. --- direct/src/showbase/PythonUtil.py | 105 ++++++++++++++---------------- tests/showbase/test_PythonUtil.py | 105 ++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+), 57 deletions(-) create mode 100644 tests/showbase/test_PythonUtil.py diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index 0c850f51a0..2cd4e62d15 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -10,7 +10,7 @@ __all__ = ['indent', 'bound', 'clamp', 'lerp', 'average', 'addListsByValue', 'boolEqual', 'lineupPos', 'formatElapsedSeconds', 'solveQuadratic', 'findPythonModule', 'mostDerivedLast', -'weightedChoice', 'randFloat', 'normalDistrib', +'clampScalar', 'weightedChoice', 'randFloat', 'normalDistrib', 'weightedRand', 'randUint31', 'randInt32', 'SerialNumGen', 'serialNum', 'uniqueName', 'Enum', 'Singleton', 'SingletonError', 'printListEnum', 'safeRepr', @@ -178,27 +178,6 @@ class Queue: def __len__(self): return len(self.__list) -if __debug__ and __name__ == '__main__': - q = Queue() - assert q.isEmpty() - q.clear() - assert q.isEmpty() - q.push(10) - assert not q.isEmpty() - q.push(20) - assert not q.isEmpty() - assert len(q) == 2 - assert q.front() == 10 - assert q.back() == 20 - assert q.top() == 10 - assert q.top() == 10 - assert q.pop() == 10 - assert len(q) == 1 - assert not q.isEmpty() - assert q.pop() == 20 - assert len(q) == 0 - assert q.isEmpty() - def indent(stream, numIndents, str): """ @@ -1130,6 +1109,23 @@ def findPythonModule(module): return None +def clampScalar(value, a, b): + # calling this ought to be faster than calling both min and max + if a < b: + if value < a: + return a + elif value > b: + return b + else: + return value + else: + if value < b: + return b + elif value > a: + return a + else: + return value + def weightedChoice(choiceList, rng=random.random, sum=None): """given a list of (weight, item) pairs, chooses an item based on the weights. rng must return 0..1. if you happen to have the sum of the @@ -2313,36 +2309,6 @@ def flywheel(*args, **kArgs): pass return flywheel -if __debug__ and __name__ == '__main__': - f = flywheel(['a','b','c','d'], countList=[11,20,3,4]) - obj2count = {} - for obj in f: - obj2count.setdefault(obj, 0) - obj2count[obj] += 1 - assert obj2count['a'] == 11 - assert obj2count['b'] == 20 - assert obj2count['c'] == 3 - assert obj2count['d'] == 4 - - f = flywheel([1,2,3,4], countFunc=lambda x: x*2) - obj2count = {} - for obj in f: - obj2count.setdefault(obj, 0) - obj2count[obj] += 1 - assert obj2count[1] == 2 - assert obj2count[2] == 4 - assert obj2count[3] == 6 - assert obj2count[4] == 8 - - f = flywheel([1,2,3,4], countFunc=lambda x: x, scale = 3) - obj2count = {} - for obj in f: - obj2count.setdefault(obj, 0) - obj2count[obj] += 1 - assert obj2count[1] == 1 * 3 - assert obj2count[2] == 2 * 3 - assert obj2count[3] == 3 * 3 - assert obj2count[4] == 4 * 3 if __debug__: def quickProfile(name="unnamed"): @@ -2687,11 +2653,36 @@ def unescapeHtmlString(s): result += char return result -if __debug__ and __name__ == '__main__': - assert unescapeHtmlString('asdf') == 'asdf' - assert unescapeHtmlString('as+df') == 'as df' - assert unescapeHtmlString('as%32df') == 'as2df' - assert unescapeHtmlString('asdf%32') == 'asdf2' +class PriorityCallbacks: + """ manage a set of prioritized callbacks, and allow them to be invoked in order of priority """ + def __init__(self): + self._callbacks = [] + + def clear(self): + del self._callbacks[:] + + def add(self, callback, priority=None): + if priority is None: + priority = 0 + callbacks = self._callbacks + lo = 0 + hi = len(callbacks) + while lo < hi: + mid = (lo + hi) // 2 + if priority < callbacks[mid][0]: + hi = mid + else: + lo = mid + 1 + item = (priority, callback) + callbacks.insert(lo, item) + return item + + def remove(self, item): + self._callbacks.remove(item) + + def __call__(self): + for priority, callback in self._callbacks: + callback() builtins.Functor = Functor builtins.Stack = Stack diff --git a/tests/showbase/test_PythonUtil.py b/tests/showbase/test_PythonUtil.py new file mode 100644 index 0000000000..faf5da269f --- /dev/null +++ b/tests/showbase/test_PythonUtil.py @@ -0,0 +1,105 @@ +from direct.showbase import PythonUtil + + +def test_queue(): + q = PythonUtil.Queue() + assert q.isEmpty() + q.clear() + assert q.isEmpty() + q.push(10) + assert not q.isEmpty() + q.push(20) + assert not q.isEmpty() + assert len(q) == 2 + assert q.front() == 10 + assert q.back() == 20 + assert q.top() == 10 + assert q.top() == 10 + assert q.pop() == 10 + assert len(q) == 1 + assert not q.isEmpty() + assert q.pop() == 20 + assert len(q) == 0 + assert q.isEmpty() + + +def test_flywheel(): + f = PythonUtil.flywheel(['a','b','c','d'], countList=[11,20,3,4]) + obj2count = {} + for obj in f: + obj2count.setdefault(obj, 0) + obj2count[obj] += 1 + assert obj2count['a'] == 11 + assert obj2count['b'] == 20 + assert obj2count['c'] == 3 + assert obj2count['d'] == 4 + + f = PythonUtil.flywheel([1,2,3,4], countFunc=lambda x: x*2) + obj2count = {} + for obj in f: + obj2count.setdefault(obj, 0) + obj2count[obj] += 1 + assert obj2count[1] == 2 + assert obj2count[2] == 4 + assert obj2count[3] == 6 + assert obj2count[4] == 8 + + f = PythonUtil.flywheel([1,2,3,4], countFunc=lambda x: x, scale = 3) + obj2count = {} + for obj in f: + obj2count.setdefault(obj, 0) + obj2count[obj] += 1 + assert obj2count[1] == 1 * 3 + assert obj2count[2] == 2 * 3 + assert obj2count[3] == 3 * 3 + assert obj2count[4] == 4 * 3 + + +def test_unescape_html_string(): + assert PythonUtil.unescapeHtmlString('asdf') == 'asdf' + assert PythonUtil.unescapeHtmlString('as+df') == 'as df' + assert PythonUtil.unescapeHtmlString('as%32df') == 'as2df' + assert PythonUtil.unescapeHtmlString('asdf%32') == 'asdf2' + + +def test_priority_callbacks(): + l = [] + def a(l=l): + l.append('a') + def b(l=l): + l.append('b') + def c(l=l): + l.append('c') + + pc = PythonUtil.PriorityCallbacks() + pc.add(a) + pc() + assert l == ['a'] + + del l[:] + bItem = pc.add(b) + pc() + assert 'a' in l + assert 'b' in l + assert len(l) == 2 + + del l[:] + pc.remove(bItem) + pc() + assert l == ['a'] + + del l[:] + pc.add(c, 2) + bItem = pc.add(b, 10) + pc() + assert l == ['a', 'c', 'b'] + + del l[:] + pc.remove(bItem) + pc() + assert l == ['a', 'c'] + + del l[:] + pc.clear() + pc() + assert len(l) == 0 From 3b4d4b0804ae7539bd271cbc7812311ee268c12c Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 30 Apr 2018 19:13:54 -0400 Subject: [PATCH 06/20] glgsg: fix broken upload of downscaled texture without mipmaps Fixes #306 --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 97917acee0..f5a42e2e45 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -12647,7 +12647,7 @@ upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload, int depth = tex->get_expected_mipmap_z_size(mipmap_bias); // Determine the number of images to upload. - int num_levels = 1; + int num_levels = mipmap_bias + 1; if (uses_mipmaps) { num_levels = tex->get_expected_num_mipmap_levels(); } From 9db74bca1d855230edbc5c3b6616e56c5de44127 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 1 May 2018 15:06:27 +0200 Subject: [PATCH 07/20] task: use consistent ordering for tasks with same sort value We don't guarantee a specific order in this case, especially because they can be run in either order if there is more than one thread, but it is still useful to have a defined order for single-threaded task chains. To that end, tasks are now run in the order in which they were added to taskMgr.add (in absence of any other ordering constraints). Fixes #309 --- panda/src/event/asyncTask.h | 1 + panda/src/event/asyncTaskChain.cxx | 6 +++++- panda/src/event/asyncTaskChain.h | 9 ++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/panda/src/event/asyncTask.h b/panda/src/event/asyncTask.h index d514b2f5a3..9712daa0f5 100644 --- a/panda/src/event/asyncTask.h +++ b/panda/src/event/asyncTask.h @@ -119,6 +119,7 @@ protected: double _wake_time; int _sort; int _priority; + unsigned int _implicit_sort; State _state; Thread *_servicing_thread; diff --git a/panda/src/event/asyncTaskChain.cxx b/panda/src/event/asyncTaskChain.cxx index c7d732eca9..bb82e00f92 100644 --- a/panda/src/event/asyncTaskChain.cxx +++ b/panda/src/event/asyncTaskChain.cxx @@ -51,7 +51,8 @@ AsyncTaskChain(AsyncTaskManager *manager, const string &name) : _needs_cleanup(false), _current_frame(0), _time_in_frame(0.0), - _block_till_next_frame(false) + _block_till_next_frame(false), + _next_implicit_sort(0) { } @@ -418,6 +419,9 @@ do_add(AsyncTask *task) { task->_start_time = now; task->_start_frame = _manager->_clock->get_frame_count(); + // Remember the order in which tasks were added to the chain. + task->_implicit_sort = _next_implicit_sort++; + _manager->add_task_by_name(task); if (task->has_delay()) { diff --git a/panda/src/event/asyncTaskChain.h b/panda/src/event/asyncTaskChain.h index 512a7b9fa0..5f81f6c3dd 100644 --- a/panda/src/event/asyncTaskChain.h +++ b/panda/src/event/asyncTaskChain.h @@ -146,7 +146,12 @@ protected: if (a->get_priority() != b->get_priority()) { return a->get_priority() < b->get_priority(); } - return a->get_start_time() > b->get_start_time(); + if (a->get_start_time() != b->get_start_time()) { + return a->get_start_time() > b->get_start_time(); + } + // Failing any other ordering criteria, we sort the tasks based on the + // order in which they were added to the task chain. + return a->_implicit_sort > b->_implicit_sort; } }; @@ -186,6 +191,8 @@ protected: double _time_in_frame; bool _block_till_next_frame; + unsigned int _next_implicit_sort; + static PStatCollector _task_pcollector; static PStatCollector _wait_pcollector; From b45726001e817278783500b8b358513979d0b031 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 May 2018 20:53:04 +0200 Subject: [PATCH 08/20] task: fix double free when failing to retrieve coroutine exception --- panda/src/event/pythonTask.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/panda/src/event/pythonTask.cxx b/panda/src/event/pythonTask.cxx index 996587885e..6a818ad19c 100644 --- a/panda/src/event/pythonTask.cxx +++ b/panda/src/event/pythonTask.cxx @@ -94,6 +94,9 @@ PythonTask:: PyErr_Restore(_exception, _exc_value, _exc_traceback); PyErr_Print(); PyErr_Restore(nullptr, nullptr, nullptr); + _exception = nullptr; + _exc_value = nullptr; + _exc_traceback = nullptr; } #endif From 11e21af52cead7c7f1fb5cfa613ea28dee76ea6a Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 May 2018 22:01:10 +0200 Subject: [PATCH 09/20] showbase: fix iris/fade transitions for extreme aspect ratios Fixes #311 --- direct/src/showbase/Transitions.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/direct/src/showbase/Transitions.py b/direct/src/showbase/Transitions.py index e26d0e93ec..aacb7afcc5 100644 --- a/direct/src/showbase/Transitions.py +++ b/direct/src/showbase/Transitions.py @@ -94,7 +94,9 @@ class Transitions: """ #self.noTransitions() masad: this creates a one frame pop, is it necessary? self.loadFade() - transitionIval = Sequence(Func(self.fade.reparentTo, aspect2d, DGG.FADE_SORT_INDEX), + + parent = aspect2d if self.fadeModel else render2d + transitionIval = Sequence(Func(self.fade.reparentTo, parent, DGG.FADE_SORT_INDEX), Func(self.fade.showThrough), # in case aspect2d is hidden for some reason self.lerpFunc(self.fade, t, self.alphaOff, @@ -115,7 +117,8 @@ class Transitions: self.noTransitions() self.loadFade() - transitionIval = Sequence(Func(self.fade.reparentTo,aspect2d,DGG.FADE_SORT_INDEX), + parent = aspect2d if self.fadeModel else render2d + transitionIval = Sequence(Func(self.fade.reparentTo, parent, DGG.FADE_SORT_INDEX), Func(self.fade.showThrough), # in case aspect2d is hidden for some reason self.lerpFunc(self.fade, t, self.alphaOn, @@ -167,7 +170,9 @@ class Transitions: # Fade out immediately with no lerp self.noTransitions() self.loadFade() - self.fade.reparentTo(aspect2d, DGG.FADE_SORT_INDEX) + + parent = aspect2d if self.fadeModel else render2d + self.fade.reparentTo(parent, DGG.FADE_SORT_INDEX) self.fade.setColor(self.alphaOn) elif ConfigVariableBool('no-loading-screen', False): if finishIval: @@ -191,7 +196,9 @@ class Transitions: #print "transitiosn: fadeScreen" self.noTransitions() self.loadFade() - self.fade.reparentTo(aspect2d, DGG.FADE_SORT_INDEX) + + parent = aspect2d if self.fadeModel else render2d + self.fade.reparentTo(parent, DGG.FADE_SORT_INDEX) self.fade.setColor(self.alphaOn[0], self.alphaOn[1], self.alphaOn[2], @@ -206,7 +213,9 @@ class Transitions: #print "transitiosn: fadeScreenColor" self.noTransitions() self.loadFade() - self.fade.reparentTo(aspect2d, DGG.FADE_SORT_INDEX) + + parent = aspect2d if self.fadeModel else render2d + self.fade.reparentTo(parent, DGG.FADE_SORT_INDEX) self.fade.setColor(color) def noFade(self): @@ -250,8 +259,9 @@ class Transitions: else: self.iris.reparentTo(aspect2d, DGG.FADE_SORT_INDEX) + scale = 0.18 * max(base.a2dRight, base.a2dTop) self.transitionIval = Sequence(LerpScaleInterval(self.iris, t, - scale = 0.18, + scale = scale, startScale = 0.01), Func(self.iris.detachNode), name = self.irisTaskName, @@ -277,9 +287,10 @@ class Transitions: else: self.iris.reparentTo(aspect2d, DGG.FADE_SORT_INDEX) + scale = 0.18 * max(base.a2dRight, base.a2dTop) self.transitionIval = Sequence(LerpScaleInterval(self.iris, t, scale = 0.01, - startScale = 0.18), + startScale = scale), Func(self.iris.detachNode), # Use the fade to cover up the hole that the iris would leave Func(self.fadeOut, 0), From cf58de4d04da6f9fd176bd8c127546699eeb6444 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 May 2018 23:02:11 +0200 Subject: [PATCH 10/20] showbase: make base.movie() awaitable (by returning a future) --- direct/src/showbase/ShowBase.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 367ae57d1a..13b9839255 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -2672,15 +2672,18 @@ class ShowBase(DirectObject.DirectObject): output file name (e.g. if sd = 4, movie_0001.png) - source is the Window, Buffer, DisplayRegion, or Texture from which to save the resulting images. The default is the main window. + + The task is returned, so that it can be awaited. """ globalClock.setMode(ClockObject.MNonRealTime) globalClock.setDt(1.0/float(fps)) - t = taskMgr.add(self._movieTask, namePrefix + '_task') + t = self.taskMgr.add(self._movieTask, namePrefix + '_task') t.frameIndex = 0 # Frame 0 is not captured. t.numFrames = int(duration * fps) t.source = source t.outputString = namePrefix + '_%0' + repr(sd) + 'd.' + format t.setUponDeath(lambda state: globalClock.setMode(ClockObject.MNormal)) + return t def _movieTask(self, state): if state.frameIndex != 0: From 71eee6df3fc9ce0099ea985e4d843790eee59216 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 May 2018 23:05:50 +0200 Subject: [PATCH 11/20] 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. --- direct/src/showbase/Transitions.py | 58 +++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/Transitions.py b/direct/src/showbase/Transitions.py index aacb7afcc5..5c449c6997 100644 --- a/direct/src/showbase/Transitions.py +++ b/direct/src/showbase/Transitions.py @@ -23,7 +23,9 @@ class Transitions: scale=3.0, pos=Vec3(0, 0, 0)): self.transitionIval = None + self.__transitionFuture = None self.letterboxIval = None + self.__letterboxFuture = None self.iris = None self.fade = None self.letterbox = None @@ -151,11 +153,17 @@ class Transitions: self.noTransitions() self.loadFade() self.fade.detachNode() + fut = AsyncFuture() + fut.setResult(None) + return fut else: # Create a sequence that lerps the color out, then # parents the fade to hidden self.transitionIval = self.getFadeInIval(t, finishIval) + self.transitionIval.append(Func(self.__finishTransition)) + self.__transitionFuture = AsyncFuture() self.transitionIval.start() + return self.__transitionFuture def fadeOut(self, t=0.5, finishIval=None): """ @@ -181,8 +189,16 @@ class Transitions: else: # Create a sequence that lerps the color out, then # parents the fade to hidden - self.transitionIval = self.getFadeOutIval(t,finishIval) + self.transitionIval = self.getFadeOutIval(t, finishIval) + self.transitionIval.append(Func(self.__finishTransition)) + self.__transitionFuture = AsyncFuture() self.transitionIval.start() + return self.__transitionFuture + + # Immediately done, so return a dummy future. + fut = AsyncFuture() + fut.setResult(None) + return fut def fadeOutActive(self): return self.fade and self.fade.getColor()[3] > 0 @@ -226,6 +242,9 @@ class Transitions: if self.transitionIval: self.transitionIval.pause() self.transitionIval = None + if self.__transitionFuture: + self.__transitionFuture.cancel() + self.__transitionFuture = None if self.fade: # Make sure to reset the color, since fadeOutActive() is looking at it self.fade.setColor(self.alphaOff) @@ -256,6 +275,9 @@ class Transitions: self.loadIris() if (t == 0): self.iris.detachNode() + fut = AsyncFuture() + fut.setResult(None) + return fut else: self.iris.reparentTo(aspect2d, DGG.FADE_SORT_INDEX) @@ -264,11 +286,14 @@ class Transitions: scale = scale, startScale = 0.01), Func(self.iris.detachNode), + Func(self.__finishTransition), name = self.irisTaskName, ) + self.__transitionFuture = AsyncFuture() if finishIval: self.transitionIval.append(finishIval) self.transitionIval.start() + return self.__transitionFuture def irisOut(self, t=0.5, finishIval=None): """ @@ -284,6 +309,9 @@ class Transitions: if (t == 0): self.iris.detachNode() self.fadeOut(0) + fut = AsyncFuture() + fut.setResult(None) + return fut else: self.iris.reparentTo(aspect2d, DGG.FADE_SORT_INDEX) @@ -294,11 +322,14 @@ class Transitions: Func(self.iris.detachNode), # Use the fade to cover up the hole that the iris would leave Func(self.fadeOut, 0), + Func(self.__finishTransition), name = self.irisTaskName, ) + self.__transitionFuture = AsyncFuture() if finishIval: self.transitionIval.append(finishIval) self.transitionIval.start() + return self.__transitionFuture def noIris(self): """ @@ -322,6 +353,11 @@ class Transitions: # Letterbox is not really a transition, it is a screen overlay # self.noLetterbox() + def __finishTransition(self): + if self.__transitionFuture: + self.__transitionFuture.setResult(None) + self.__transitionFuture = None + ################################################## # Letterbox ################################################## @@ -394,9 +430,17 @@ class Transitions: if self.letterboxIval: self.letterboxIval.pause() self.letterboxIval = None + if self.__letterboxFuture: + self.__letterboxFuture.cancel() + self.__letterboxFuture = None if self.letterbox: self.letterbox.stash() + def __finishLetterbox(self): + if self.__letterboxFuture: + self.__letterboxFuture.setResult(None) + self.__letterboxFuture = None + def letterboxOn(self, t=0.25, finishIval=None): """ Move black bars in over t seconds. @@ -407,7 +451,11 @@ class Transitions: if (t == 0): self.letterboxBottom.setPos(0, 0, -1) self.letterboxTop.setPos(0, 0, 0.8) + fut = AsyncFuture() + fut.setResult(None) + return fut else: + self.__letterboxFuture = AsyncFuture() self.letterboxIval = Sequence(Parallel( LerpPosInterval(self.letterboxBottom, t, @@ -420,11 +468,13 @@ class Transitions: # startPos = Vec3(0, 0, 1), ), ), + Func(self.__finishLetterbox), name = self.letterboxTaskName, ) if finishIval: self.letterboxIval.append(finishIval) self.letterboxIval.start() + return self.__letterboxFuture def letterboxOff(self, t=0.25, finishIval=None): """ @@ -435,7 +485,11 @@ class Transitions: self.letterbox.unstash() if (t == 0): self.letterbox.stash() + fut = AsyncFuture() + fut.setResult(None) + return fut else: + self.__letterboxFuture = AsyncFuture() self.letterboxIval = Sequence(Parallel( LerpPosInterval(self.letterboxBottom, t, @@ -449,9 +503,11 @@ class Transitions: ), ), Func(self.letterbox.stash), + Func(self.__finishLetterbox), Func(messenger.send,'letterboxOff'), name = self.letterboxTaskName, ) if finishIval: self.letterboxIval.append(finishIval) self.letterboxIval.start() + return self.__letterboxFuture From 8a98bf42a3bf5ecd473fe5cfd77059b17a340747 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 May 2018 23:09:39 +0200 Subject: [PATCH 12/20] general: enable use of tie and tuple on macOS (from TR1, for now) --- dtool/src/dtoolbase/dtoolbase_cc.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index 6777ce5611..81968085bc 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -122,6 +122,11 @@ typedef ios::seekdir ios_seekdir; // Apple has an outdated libstdc++. Not all is lost, though, as we can fill // in some important missing functions. #if defined(__GLIBCXX__) && __GLIBCXX__ <= 20070719 +#include + +using std::tr1::tuple; +using std::tr1::tie; + typedef decltype(nullptr) nullptr_t; template struct remove_reference {typedef T type;}; From 549301d0f01976eb321055dc2a168368089050ef Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 May 2018 23:10:41 +0200 Subject: [PATCH 13/20] putil: keep reference to objects queued for writing This prevents a crash when a reference counted object is destroyed right after a write_pointer call. Fixes #310 --- panda/src/putil/bamWriter.cxx | 30 ++++++++++++++++++++++++++++-- panda/src/putil/bamWriter.h | 3 ++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/panda/src/putil/bamWriter.cxx b/panda/src/putil/bamWriter.cxx index 679600b664..0fcfd2fe1f 100644 --- a/panda/src/putil/bamWriter.cxx +++ b/panda/src/putil/bamWriter.cxx @@ -94,6 +94,10 @@ BamWriter:: for (si = _state_map.begin(); si != _state_map.end(); ++si) { TypedWritable *object = (TypedWritable *)(*si).first; object->remove_bam_writer(this); + + if ((*si).second._refcount != nullptr) { + unref_delete((*si).second._refcount); + } } } @@ -529,6 +533,9 @@ object_destructs(TypedWritable *object) { // we're in trouble when we do write it out. nassertv(!(*si).second._written_seq.is_initial()); + // This cannot be called if we are still holding a reference to it. + nassertv((*si).second._refcount == nullptr); + int object_id = (*si).second._object_id; _freed_object_ids.push_back(object_id); @@ -606,8 +613,10 @@ enqueue_object(const TypedWritable *object) { // No, it hasn't, so assign it the next number in sequence arbitrarily. object_id = _next_object_id; - bool inserted = - _state_map.insert(StateMap::value_type(object, StoreState(_next_object_id))).second; + StateMap::iterator si; + bool inserted; + tie(si, inserted) = + _state_map.insert(StateMap::value_type(object, StoreState(_next_object_id))); nassertr(inserted, false); // Store ourselves on the TypedWritable so that we get notified when it @@ -615,6 +624,14 @@ enqueue_object(const TypedWritable *object) { (const_cast(object))->add_bam_writer(this); _next_object_id++; + // Increase the reference count if this inherits from ReferenceCount, + // until we get a chance to write this object for the first time. + const ReferenceCount *rc = ((TypedWritable *)object)->as_reference_count(); + if (rc != nullptr) { + rc->ref(); + (*si).second._refcount = rc; + } + } else { // Yes, it has; get the object ID. object_id = (*si).second._object_id; @@ -703,6 +720,15 @@ flush_queue() { (*si).second._written_seq = _writing_seq; (*si).second._modified = object->get_bam_modified(); + // Now release any reference we hold to it, so that it may destruct. + const ReferenceCount *rc = (*si).second._refcount; + if (rc != nullptr) { + // We need to assign this pointer to null before deleting the object, + // since that may end up calling object_destructs. + (*si).second._refcount = nullptr; + unref_delete(rc); + } + } else { // On subsequent times when we write a particular object, we write // simply TypeHandle::none(), followed by the object ID. The occurrence diff --git a/panda/src/putil/bamWriter.h b/panda/src/putil/bamWriter.h index c2b04b3757..bcd4a76ce6 100644 --- a/panda/src/putil/bamWriter.h +++ b/panda/src/putil/bamWriter.h @@ -140,8 +140,9 @@ private: int _object_id; UpdateSeq _written_seq; UpdateSeq _modified; + const ReferenceCount *_refcount; - StoreState(int object_id) : _object_id(object_id) {} + StoreState(int object_id) : _object_id(object_id), _refcount(nullptr) {} }; typedef phash_map StateMap; StateMap _state_map; From ed54856e9fff6229750671fff3adc0af1c36f573 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 6 May 2018 22:18:30 +0200 Subject: [PATCH 14/20] makepanda: don't fail building Windows installer if Pmw is missing --- makepanda/installer.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makepanda/installer.nsi b/makepanda/installer.nsi index bd139f7083..39b7dd3518 100644 --- a/makepanda/installer.nsi +++ b/makepanda/installer.nsi @@ -368,7 +368,7 @@ SectionGroup "Python support" SetOutPath $INSTDIR\pandac\input File /r "${BUILT}\pandac\input\*" SetOutPath $INSTDIR\Pmw - File /r /x CVS "${BUILT}\Pmw\*" + File /nonfatal /r /x CVS "${BUILT}\Pmw\*" !ifdef REGVIEW SetRegView ${REGVIEW} From 666591ff48f036917fa224091ed0afe3eae8fbb4 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 6 May 2018 22:19:33 +0200 Subject: [PATCH 15/20] cppparser: fix compile warnings on MSVC --- dtool/src/cppparser/cppExpression.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dtool/src/cppparser/cppExpression.cxx b/dtool/src/cppparser/cppExpression.cxx index adbbaea14e..139ac72d1b 100644 --- a/dtool/src/cppparser/cppExpression.cxx +++ b/dtool/src/cppparser/cppExpression.cxx @@ -81,7 +81,7 @@ as_integer() const { case RT_pointer: // We don't mind if this loses precision. - return (int)reinterpret_cast(_u._pointer); + return (int)(intptr_t)(_u._pointer); default: cerr << "Invalid type\n"; @@ -104,7 +104,7 @@ as_real() const { case RT_pointer: // We don't mind if this loses precision. - return (double)reinterpret_cast(_u._pointer); + return (double)(uintptr_t)(_u._pointer); default: cerr << "Invalid type\n"; @@ -120,10 +120,10 @@ void *CPPExpression::Result:: as_pointer() const { switch (_type) { case RT_integer: - return reinterpret_cast((long)_u._integer); + return (void *)(intptr_t)_u._integer; case RT_real: - return reinterpret_cast((long)_u._real); + return (void *)(uintptr_t)_u._real; case RT_pointer: return _u._pointer; From 6175e79c5797c3be3ff67a33eac3fe3e6f909be7 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 6 May 2018 22:20:09 +0200 Subject: [PATCH 16/20] cppparser: fix infinite recursion stack overflow with enum classes --- dtool/src/cppparser/cppEnumType.cxx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/dtool/src/cppparser/cppEnumType.cxx b/dtool/src/cppparser/cppEnumType.cxx index 927488585d..fbc3a7df53 100644 --- a/dtool/src/cppparser/cppEnumType.cxx +++ b/dtool/src/cppparser/cppEnumType.cxx @@ -224,12 +224,24 @@ substitute_decl(CPPDeclaration::SubstDecl &subst, bool any_changed = false; for (size_t i = 0; i < _elements.size(); ++i) { - CPPInstance *elem_rep = - _elements[i]->substitute_decl(subst, current_scope, global_scope) - ->as_instance(); + // We don't just do substitute_decl on the instance, which could lead to + // an infinite recursion. + CPPInstance *element = _elements[i]; + CPPExpression *value = element->_initializer-> + substitute_decl(subst, current_scope, global_scope)->as_expression(); - if (elem_rep != _elements[i]) { - rep->_elements[i] = elem_rep; + if (is_scoped()) { + // For a strong enum, we consider the elements to be of this type. + if (value != element->_initializer) { + rep->_elements[i] = new CPPInstance(rep, element->_ident); + rep->_elements[i]->_initializer = value; + any_changed = true; + } + } else if (value != element->_initializer || + rep->get_underlying_type() != get_underlying_type()) { + // In an unscoped enum, the elements are integers. + rep->_elements[i] = new CPPInstance(rep->get_underlying_type(), element->_ident); + rep->_elements[i]->_initializer = value; any_changed = true; } } From 87c11d80187923960d6783dd6eef86da53ead2e7 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 9 May 2018 15:28:56 -0600 Subject: [PATCH 17/20] pstatclient: Rename config_pstats to config_pstatclient --- makepanda/makepanda.vcproj | 4 ++-- panda/metalibs/panda/panda.cxx | 2 +- panda/src/display/graphicsStateGuardian.cxx | 2 +- panda/src/display/pStatGPUTimer.h | 2 +- .../{config_pstats.cxx => config_pstatclient.cxx} | 8 ++++---- .../pstatclient/{config_pstats.h => config_pstatclient.h} | 4 ++-- panda/src/pstatclient/p3pstatclient_composite1.cxx | 2 +- panda/src/pstatclient/pStatClient.cxx | 2 +- panda/src/pstatclient/pStatClientControlMessage.cxx | 2 +- panda/src/pstatclient/pStatClientImpl.cxx | 2 +- panda/src/pstatclient/pStatFrameData.cxx | 2 +- panda/src/pstatclient/pStatProperties.cxx | 2 +- panda/src/pstatclient/pStatServerControlMessage.cxx | 2 +- panda/src/pstatclient/test_client.cxx | 2 +- pandatool/src/gtk-stats/gtkStats.cxx | 2 +- pandatool/src/pstatserver/pStatGraph.cxx | 2 +- pandatool/src/pstatserver/pStatPianoRoll.cxx | 2 +- pandatool/src/pstatserver/pStatServer.cxx | 2 +- pandatool/src/pstatserver/pStatStripChart.cxx | 2 +- pandatool/src/pstatserver/pStatThreadData.cxx | 2 +- pandatool/src/text-stats/textStats.cxx | 2 +- pandatool/src/win-stats/winStats.cxx | 2 +- 22 files changed, 27 insertions(+), 27 deletions(-) rename panda/src/pstatclient/{config_pstats.cxx => config_pstatclient.cxx} (96%) rename panda/src/pstatclient/{config_pstats.h => config_pstatclient.h} (93%) diff --git a/makepanda/makepanda.vcproj b/makepanda/makepanda.vcproj index c21322f94a..8041faf55c 100644 --- a/makepanda/makepanda.vcproj +++ b/makepanda/makepanda.vcproj @@ -2322,8 +2322,8 @@ - - + + diff --git a/panda/metalibs/panda/panda.cxx b/panda/metalibs/panda/panda.cxx index d3a3b0c24a..8a193a8a28 100644 --- a/panda/metalibs/panda/panda.cxx +++ b/panda/metalibs/panda/panda.cxx @@ -11,7 +11,7 @@ #include "config_display.h" #include "config_pgraph.h" #ifdef DO_PSTATS -#include "config_pstats.h" +#include "config_pstatclient.h" #endif // By including checkPandaVersion.h, we guarantee that runtime attempts to diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 5817b62e4a..5f282b82ce 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -58,7 +58,7 @@ #include "colorScaleAttrib.h" #include "clipPlaneAttrib.h" #include "fogAttrib.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include #include diff --git a/panda/src/display/pStatGPUTimer.h b/panda/src/display/pStatGPUTimer.h index f5185778ec..1e0accdc04 100644 --- a/panda/src/display/pStatGPUTimer.h +++ b/panda/src/display/pStatGPUTimer.h @@ -17,7 +17,7 @@ #include "pandabase.h" #include "pStatTimer.h" #include "pStatCollector.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include "timerQueryContext.h" class Thread; diff --git a/panda/src/pstatclient/config_pstats.cxx b/panda/src/pstatclient/config_pstatclient.cxx similarity index 96% rename from panda/src/pstatclient/config_pstats.cxx rename to panda/src/pstatclient/config_pstatclient.cxx index dcd49a4365..4be7472441 100644 --- a/panda/src/pstatclient/config_pstats.cxx +++ b/panda/src/pstatclient/config_pstatclient.cxx @@ -6,12 +6,12 @@ * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * - * @file config_pstats.cxx + * @file config_pstatclient.cxx * @author drose * @date 2000-07-09 */ -#include "config_pstats.h" +#include "config_pstatclient.h" #include "dconfig.h" @@ -19,10 +19,10 @@ #error Buildsystem error: BUILDING_PANDA_PSTATCLIENT not defined #endif -ConfigureDef(config_pstats); +ConfigureDef(config_pstatclient); NotifyCategoryDef(pstats, ""); -ConfigureFn(config_pstats) { +ConfigureFn(config_pstatclient) { init_libpstatclient(); } diff --git a/panda/src/pstatclient/config_pstats.h b/panda/src/pstatclient/config_pstatclient.h similarity index 93% rename from panda/src/pstatclient/config_pstats.h rename to panda/src/pstatclient/config_pstatclient.h index d3136ad736..6de3c5c120 100644 --- a/panda/src/pstatclient/config_pstats.h +++ b/panda/src/pstatclient/config_pstatclient.h @@ -6,7 +6,7 @@ * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * - * @file config_pstats.h + * @file config_pstatclient.h * @author drose * @date 2000-07-09 */ @@ -25,7 +25,7 @@ // Configure variables for pstats package. -ConfigureDecl(config_pstats, EXPCL_PANDA_PSTATCLIENT, EXPTP_PANDA_PSTATCLIENT); +ConfigureDecl(config_pstatclient, EXPCL_PANDA_PSTATCLIENT, EXPTP_PANDA_PSTATCLIENT); NotifyCategoryDecl(pstats, EXPCL_PANDA_PSTATCLIENT, EXPTP_PANDA_PSTATCLIENT); extern EXPCL_PANDA_PSTATCLIENT ConfigVariableString pstats_name; diff --git a/panda/src/pstatclient/p3pstatclient_composite1.cxx b/panda/src/pstatclient/p3pstatclient_composite1.cxx index e1a29761d7..b20594b02a 100644 --- a/panda/src/pstatclient/p3pstatclient_composite1.cxx +++ b/panda/src/pstatclient/p3pstatclient_composite1.cxx @@ -1,5 +1,5 @@ -#include "config_pstats.cxx" +#include "config_pstatclient.cxx" #include "pStatClient.cxx" #include "pStatClientImpl.cxx" #include "pStatClientVersion.cxx" diff --git a/panda/src/pstatclient/pStatClient.cxx b/panda/src/pstatclient/pStatClient.cxx index 906d99a29a..a735ea080e 100644 --- a/panda/src/pstatclient/pStatClient.cxx +++ b/panda/src/pstatclient/pStatClient.cxx @@ -21,7 +21,7 @@ #include "pStatServerControlMessage.h" #include "pStatCollector.h" #include "pStatThread.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include "pStatProperties.h" #include "thread.h" #include "clockObject.h" diff --git a/panda/src/pstatclient/pStatClientControlMessage.cxx b/panda/src/pstatclient/pStatClientControlMessage.cxx index 0cecb2aead..e7fd765547 100644 --- a/panda/src/pstatclient/pStatClientControlMessage.cxx +++ b/panda/src/pstatclient/pStatClientControlMessage.cxx @@ -11,7 +11,7 @@ * @date 2000-07-09 */ -#include "config_pstats.h" +#include "config_pstatclient.h" #include "pStatClientControlMessage.h" #include "pStatClientVersion.h" diff --git a/panda/src/pstatclient/pStatClientImpl.cxx b/panda/src/pstatclient/pStatClientImpl.cxx index 56f044d2a1..d126c6c753 100644 --- a/panda/src/pstatclient/pStatClientImpl.cxx +++ b/panda/src/pstatclient/pStatClientImpl.cxx @@ -21,7 +21,7 @@ #include "pStatServerControlMessage.h" #include "pStatCollector.h" #include "pStatThread.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include "pStatProperties.h" #include "cmath.h" diff --git a/panda/src/pstatclient/pStatFrameData.cxx b/panda/src/pstatclient/pStatFrameData.cxx index 835b30f1df..f15f6bc61e 100644 --- a/panda/src/pstatclient/pStatFrameData.cxx +++ b/panda/src/pstatclient/pStatFrameData.cxx @@ -13,7 +13,7 @@ #include "pStatFrameData.h" #include "pStatClientVersion.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include "datagram.h" #include "datagramIterator.h" diff --git a/panda/src/pstatclient/pStatProperties.cxx b/panda/src/pstatclient/pStatProperties.cxx index 25d2bfd591..01411f3f74 100644 --- a/panda/src/pstatclient/pStatProperties.cxx +++ b/panda/src/pstatclient/pStatProperties.cxx @@ -14,7 +14,7 @@ #include "pStatProperties.h" #include "pStatCollectorDef.h" #include "pStatClient.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include "configVariableBool.h" #include "configVariableColor.h" #include "configVariableDouble.h" diff --git a/panda/src/pstatclient/pStatServerControlMessage.cxx b/panda/src/pstatclient/pStatServerControlMessage.cxx index f5003ba18c..e75f9eebec 100644 --- a/panda/src/pstatclient/pStatServerControlMessage.cxx +++ b/panda/src/pstatclient/pStatServerControlMessage.cxx @@ -11,7 +11,7 @@ * @date 2000-07-09 */ -#include "config_pstats.h" +#include "config_pstatclient.h" #include "pStatServerControlMessage.h" #include "datagram.h" diff --git a/panda/src/pstatclient/test_client.cxx b/panda/src/pstatclient/test_client.cxx index 11f6f392fe..35a79a8cbd 100644 --- a/panda/src/pstatclient/test_client.cxx +++ b/panda/src/pstatclient/test_client.cxx @@ -11,7 +11,7 @@ * @date 2000-07-09 */ -#include "config_pstats.h" +#include "config_pstatclient.h" #include "pStatClient.h" #include "pStatCollector.h" #include "thread.h" diff --git a/pandatool/src/gtk-stats/gtkStats.cxx b/pandatool/src/gtk-stats/gtkStats.cxx index b76bc292f3..5f3cf83e82 100644 --- a/pandatool/src/gtk-stats/gtkStats.cxx +++ b/pandatool/src/gtk-stats/gtkStats.cxx @@ -14,7 +14,7 @@ #include "pandatoolbase.h" #include "gtkStats.h" #include "gtkStatsServer.h" -#include "config_pstats.h" +#include "config_pstatclient.h" GtkWidget *main_window; static GtkStatsServer *server = NULL; diff --git a/pandatool/src/pstatserver/pStatGraph.cxx b/pandatool/src/pstatserver/pStatGraph.cxx index a216950117..f65dafbc3b 100644 --- a/pandatool/src/pstatserver/pStatGraph.cxx +++ b/pandatool/src/pstatserver/pStatGraph.cxx @@ -16,7 +16,7 @@ #include "pStatFrameData.h" #include "pStatCollectorDef.h" #include "string_utils.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include // for sprintf diff --git a/pandatool/src/pstatserver/pStatPianoRoll.cxx b/pandatool/src/pstatserver/pStatPianoRoll.cxx index 517fca358a..923c3991e7 100644 --- a/pandatool/src/pstatserver/pStatPianoRoll.cxx +++ b/pandatool/src/pstatserver/pStatPianoRoll.cxx @@ -16,7 +16,7 @@ #include "pStatFrameData.h" #include "pStatCollectorDef.h" #include "string_utils.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include diff --git a/pandatool/src/pstatserver/pStatServer.cxx b/pandatool/src/pstatserver/pStatServer.cxx index ddb6926995..1e295ee4f9 100644 --- a/pandatool/src/pstatserver/pStatServer.cxx +++ b/pandatool/src/pstatserver/pStatServer.cxx @@ -14,7 +14,7 @@ #include "pStatServer.h" #include "pStatReader.h" #include "thread.h" -#include "config_pstats.h" +#include "config_pstatclient.h" /** * diff --git a/pandatool/src/pstatserver/pStatStripChart.cxx b/pandatool/src/pstatserver/pStatStripChart.cxx index 28b28d6240..9b64abaa02 100644 --- a/pandatool/src/pstatserver/pStatStripChart.cxx +++ b/pandatool/src/pstatserver/pStatStripChart.cxx @@ -18,7 +18,7 @@ #include "pStatFrameData.h" #include "pStatCollectorDef.h" #include "string_utils.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include diff --git a/pandatool/src/pstatserver/pStatThreadData.cxx b/pandatool/src/pstatserver/pStatThreadData.cxx index eb3aa92702..fd5e3f411b 100644 --- a/pandatool/src/pstatserver/pStatThreadData.cxx +++ b/pandatool/src/pstatserver/pStatThreadData.cxx @@ -15,7 +15,7 @@ #include "pStatFrameData.h" #include "pStatCollectorDef.h" -#include "config_pstats.h" +#include "config_pstatclient.h" PStatFrameData PStatThreadData::_null_frame; diff --git a/pandatool/src/text-stats/textStats.cxx b/pandatool/src/text-stats/textStats.cxx index 2cbf69b4d9..cc1e2392c1 100644 --- a/pandatool/src/text-stats/textStats.cxx +++ b/pandatool/src/text-stats/textStats.cxx @@ -15,7 +15,7 @@ #include "textMonitor.h" #include "pStatServer.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include diff --git a/pandatool/src/win-stats/winStats.cxx b/pandatool/src/win-stats/winStats.cxx index e8995edaba..5c54535210 100644 --- a/pandatool/src/win-stats/winStats.cxx +++ b/pandatool/src/win-stats/winStats.cxx @@ -14,7 +14,7 @@ #include "pandatoolbase.h" #include "winStatsServer.h" -#include "config_pstats.h" +#include "config_pstatclient.h" #include From 52e7c952b30a0b274499a8c8c9a42cd8934575b9 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 9 May 2018 15:30:19 -0600 Subject: [PATCH 18/20] putil: Rename config_util to config_putil --- makepanda/makepanda.vcproj | 4 ++-- panda/src/android/android_main.cxx | 2 +- panda/src/audio/audioManager.cxx | 2 +- panda/src/audiotraits/fmodAudioManager.cxx | 2 +- panda/src/audiotraits/milesAudioManager.cxx | 2 +- panda/src/audiotraits/openalAudioManager.cxx | 2 +- panda/src/collada/load_collada_file.cxx | 2 +- panda/src/display/graphicsPipeSelection.cxx | 2 +- panda/src/egg/eggData.cxx | 2 +- panda/src/egg2pg/load_egg_file.cxx | 2 +- panda/src/egg2pg/save_egg_file.cxx | 2 +- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 2 +- panda/src/gobj/config_gobj.cxx | 2 +- panda/src/gobj/shader.cxx | 2 +- panda/src/gobj/texture.cxx | 2 +- panda/src/gobj/texturePool.cxx | 2 +- panda/src/iphonedisplay/iPhoneGraphicsWindow.mm | 2 +- panda/src/movies/movieTypeRegistry.cxx | 2 +- panda/src/osxdisplay/osxGraphicsWindow.mm | 2 +- panda/src/pgraph/bamFile.cxx | 2 +- panda/src/pgraph/loader.cxx | 2 +- panda/src/pgraph/shaderPool.cxx | 2 +- panda/src/physx/physxEnums.cxx | 2 +- panda/src/pnmtext/freetypeFont.cxx | 2 +- panda/src/putil/autoTextureScale.cxx | 2 +- panda/src/putil/bamCache.cxx | 2 +- panda/src/putil/bamCacheIndex.cxx | 2 +- panda/src/putil/bamCacheRecord.cxx | 2 +- panda/src/putil/bamEnums.cxx | 2 +- panda/src/putil/bamReader.cxx | 2 +- panda/src/putil/bamReader_ext.cxx | 2 +- panda/src/putil/bamWriter.cxx | 2 +- panda/src/putil/buttonRegistry.cxx | 2 +- panda/src/putil/clockObject.cxx | 2 +- panda/src/putil/colorSpace.cxx | 2 +- panda/src/putil/{config_util.N => config_putil.N} | 0 panda/src/putil/{config_util.cxx => config_putil.cxx} | 8 ++++---- panda/src/putil/{config_util.h => config_putil.h} | 4 ++-- panda/src/putil/copyOnWritePointer.cxx | 2 +- panda/src/putil/datagramInputFile.cxx | 2 +- panda/src/putil/datagramOutputFile.h | 2 +- panda/src/putil/factoryBase.cxx | 2 +- panda/src/putil/globalPointerRegistry.cxx | 2 +- panda/src/putil/keyboardButton.cxx | 2 +- panda/src/putil/load_prc_file.cxx | 2 +- panda/src/putil/loaderOptions.cxx | 4 ++-- panda/src/putil/mouseButton.cxx | 2 +- panda/src/putil/p3putil_composite1.cxx | 2 +- panda/src/putil/pythonCallbackObject.cxx | 2 +- panda/src/putil/simpleHashMap.h | 2 +- panda/src/putil/test_filename.cxx | 2 +- panda/src/putil/weakKeyHashMap.h | 2 +- panda/src/speedtree/speedTreeNode.cxx | 2 +- panda/src/text/dynamicTextFont.cxx | 2 +- panda/src/text/fontPool.cxx | 2 +- panda/src/tinydisplay/tinyOsxGraphicsWindow.mm | 2 +- panda/src/windisplay/winGraphicsWindow.cxx | 2 +- pandatool/src/bam/eggToBam.cxx | 2 +- pandatool/src/bam/ptsToBam.cxx | 2 +- pandatool/src/converter/somethingToEggConverter.h | 2 +- pandatool/src/egg-palettize/txaFileFilter.cxx | 2 +- pandatool/src/eggbase/eggReader.cxx | 2 +- pandatool/src/eggbase/somethingToEgg.cxx | 2 +- pandatool/src/flt/fltTexture.cxx | 2 +- pandatool/src/maxegg/maxToEggConverter.cxx | 2 +- pandatool/src/mayaprogs/mayaPview.cxx | 2 +- pandatool/src/pandatoolbase/pathReplace.cxx | 2 +- pandatool/src/ptloader/loaderFileTypePandatool.cxx | 2 +- 68 files changed, 73 insertions(+), 73 deletions(-) rename panda/src/putil/{config_util.N => config_putil.N} (100%) rename panda/src/putil/{config_util.cxx => config_putil.cxx} (98%) rename panda/src/putil/{config_util.h => config_putil.h} (95%) diff --git a/makepanda/makepanda.vcproj b/makepanda/makepanda.vcproj index 8041faf55c..b8bdcbf07b 100644 --- a/makepanda/makepanda.vcproj +++ b/makepanda/makepanda.vcproj @@ -1228,7 +1228,7 @@ - + @@ -1307,7 +1307,7 @@ - + diff --git a/panda/src/android/android_main.cxx b/panda/src/android/android_main.cxx index 0565ef5835..865936e2ed 100644 --- a/panda/src/android/android_main.cxx +++ b/panda/src/android/android_main.cxx @@ -12,7 +12,7 @@ */ #include "config_android.h" -#include "config_util.h" +#include "config_putil.h" #include "virtualFileMountAndroidAsset.h" #include "virtualFileSystem.h" #include "filename.h" diff --git a/panda/src/audio/audioManager.cxx b/panda/src/audio/audioManager.cxx index c09bbffc05..b52ceb50e5 100644 --- a/panda/src/audio/audioManager.cxx +++ b/panda/src/audio/audioManager.cxx @@ -18,7 +18,7 @@ #include "nullAudioManager.h" #include "windowsRegistry.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" #include "load_dso.h" #ifdef WIN32 diff --git a/panda/src/audiotraits/fmodAudioManager.cxx b/panda/src/audiotraits/fmodAudioManager.cxx index cc1b8ecd0b..012fd103cd 100644 --- a/panda/src/audiotraits/fmodAudioManager.cxx +++ b/panda/src/audiotraits/fmodAudioManager.cxx @@ -20,7 +20,7 @@ // Panda headers. #include "config_audio.h" -#include "config_util.h" +#include "config_putil.h" #include "fmodAudioManager.h" #include "fmodAudioSound.h" #include "filename.h" diff --git a/panda/src/audiotraits/milesAudioManager.cxx b/panda/src/audiotraits/milesAudioManager.cxx index 750475dee1..c20ebd1a9a 100644 --- a/panda/src/audiotraits/milesAudioManager.cxx +++ b/panda/src/audiotraits/milesAudioManager.cxx @@ -21,7 +21,7 @@ #include "milesAudioStream.h" #include "globalMilesManager.h" #include "config_audio.h" -#include "config_util.h" +#include "config_putil.h" #include "config_express.h" #include "virtualFileSystem.h" #include "nullAudioSound.h" diff --git a/panda/src/audiotraits/openalAudioManager.cxx b/panda/src/audiotraits/openalAudioManager.cxx index 2ba02c2fa7..1a91185ecf 100644 --- a/panda/src/audiotraits/openalAudioManager.cxx +++ b/panda/src/audiotraits/openalAudioManager.cxx @@ -14,7 +14,7 @@ // Panda headers. #include "config_audio.h" -#include "config_util.h" +#include "config_putil.h" #include "config_express.h" #include "config_openalAudio.h" #include "openalAudioManager.h" diff --git a/panda/src/collada/load_collada_file.cxx b/panda/src/collada/load_collada_file.cxx index bda9641c6f..1d849f0f79 100644 --- a/panda/src/collada/load_collada_file.cxx +++ b/panda/src/collada/load_collada_file.cxx @@ -16,7 +16,7 @@ #include "config_collada.h" #include "sceneGraphReducer.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" #include "bamCacheRecord.h" static PT(PandaNode) diff --git a/panda/src/display/graphicsPipeSelection.cxx b/panda/src/display/graphicsPipeSelection.cxx index cef68b22c2..1134cc0553 100644 --- a/panda/src/display/graphicsPipeSelection.cxx +++ b/panda/src/display/graphicsPipeSelection.cxx @@ -19,7 +19,7 @@ #include "config_display.h" #include "typeRegistry.h" #include "pset.h" -#include "config_util.h" +#include "config_putil.h" #include diff --git a/panda/src/egg/eggData.cxx b/panda/src/egg/eggData.cxx index f81755f8d9..69eb4eb6e6 100644 --- a/panda/src/egg/eggData.cxx +++ b/panda/src/egg/eggData.cxx @@ -18,7 +18,7 @@ #include "eggComment.h" #include "eggPoolUniquifier.h" #include "config_egg.h" -#include "config_util.h" +#include "config_putil.h" #include "config_express.h" #include "string_utils.h" #include "dSearchPath.h" diff --git a/panda/src/egg2pg/load_egg_file.cxx b/panda/src/egg2pg/load_egg_file.cxx index a3a5dd5fbf..36b60bb92c 100644 --- a/panda/src/egg2pg/load_egg_file.cxx +++ b/panda/src/egg2pg/load_egg_file.cxx @@ -16,7 +16,7 @@ #include "config_egg2pg.h" #include "sceneGraphReducer.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" #include "bamCacheRecord.h" static PT(PandaNode) diff --git a/panda/src/egg2pg/save_egg_file.cxx b/panda/src/egg2pg/save_egg_file.cxx index 520987da68..bda4205943 100644 --- a/panda/src/egg2pg/save_egg_file.cxx +++ b/panda/src/egg2pg/save_egg_file.cxx @@ -17,7 +17,7 @@ #include "modelRoot.h" #include "sceneGraphReducer.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" /** * A convenience function; converts the indicated scene graph to an egg file diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index f5a42e2e45..c4dd42ceb3 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -14,7 +14,7 @@ * get_supports_cg_profile) */ -#include "config_util.h" +#include "config_putil.h" #include "displayRegion.h" #include "renderBuffer.h" #include "geom.h" diff --git a/panda/src/gobj/config_gobj.cxx b/panda/src/gobj/config_gobj.cxx index d152f6ebcf..b7d0e02eb5 100644 --- a/panda/src/gobj/config_gobj.cxx +++ b/panda/src/gobj/config_gobj.cxx @@ -13,7 +13,7 @@ #include "animateVerticesRequest.h" #include "bufferContext.h" -#include "config_util.h" +#include "config_putil.h" #include "config_gobj.h" #include "geom.h" #include "geomCacheEntry.h" diff --git a/panda/src/gobj/shader.cxx b/panda/src/gobj/shader.cxx index add7acef2f..35fd3ce560 100644 --- a/panda/src/gobj/shader.cxx +++ b/panda/src/gobj/shader.cxx @@ -19,7 +19,7 @@ #include "shader.h" #include "preparedGraphicsObjects.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" #include "bamCache.h" #include "string_utils.h" diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index 5328b921d9..fa85fd44f0 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -16,7 +16,7 @@ #include "pandabase.h" #include "texture.h" #include "config_gobj.h" -#include "config_util.h" +#include "config_putil.h" #include "texturePool.h" #include "textureContext.h" #include "bamCache.h" diff --git a/panda/src/gobj/texturePool.cxx b/panda/src/gobj/texturePool.cxx index dd850c98ad..6b4c0a5168 100644 --- a/panda/src/gobj/texturePool.cxx +++ b/panda/src/gobj/texturePool.cxx @@ -15,7 +15,7 @@ #include "texturePool.h" #include "config_gobj.h" -#include "config_util.h" +#include "config_putil.h" #include "config_express.h" #include "string_utils.h" #include "virtualFileSystem.h" diff --git a/panda/src/iphonedisplay/iPhoneGraphicsWindow.mm b/panda/src/iphonedisplay/iPhoneGraphicsWindow.mm index cae0463e6b..07be09f580 100644 --- a/panda/src/iphonedisplay/iPhoneGraphicsWindow.mm +++ b/panda/src/iphonedisplay/iPhoneGraphicsWindow.mm @@ -31,7 +31,7 @@ #include "throw_event.h" #include "pnmImage.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" #include "pset.h" #include "pmutex.h" diff --git a/panda/src/movies/movieTypeRegistry.cxx b/panda/src/movies/movieTypeRegistry.cxx index bca56d3628..9c747b6fe3 100644 --- a/panda/src/movies/movieTypeRegistry.cxx +++ b/panda/src/movies/movieTypeRegistry.cxx @@ -14,7 +14,7 @@ #include "movieTypeRegistry.h" #include "string_utils.h" #include "config_movies.h" -#include "config_util.h" +#include "config_putil.h" #include "load_dso.h" MovieTypeRegistry *MovieTypeRegistry::_global_ptr = NULL; diff --git a/panda/src/osxdisplay/osxGraphicsWindow.mm b/panda/src/osxdisplay/osxGraphicsWindow.mm index 4fe2c45965..293f2fd2a3 100644 --- a/panda/src/osxdisplay/osxGraphicsWindow.mm +++ b/panda/src/osxdisplay/osxGraphicsWindow.mm @@ -36,7 +36,7 @@ #include "throw_event.h" #include "pnmImage.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" #include "pset.h" #include "pmutex.h" diff --git a/panda/src/pgraph/bamFile.cxx b/panda/src/pgraph/bamFile.cxx index 83256c340a..871ec94587 100644 --- a/panda/src/pgraph/bamFile.cxx +++ b/panda/src/pgraph/bamFile.cxx @@ -16,7 +16,7 @@ #include "bam.h" #include "bamCacheRecord.h" -#include "config_util.h" +#include "config_putil.h" #include "bamReader.h" #include "bamWriter.h" #include "filename.h" diff --git a/panda/src/pgraph/loader.cxx b/panda/src/pgraph/loader.cxx index 32187508e0..7e8c201daf 100644 --- a/panda/src/pgraph/loader.cxx +++ b/panda/src/pgraph/loader.cxx @@ -19,7 +19,7 @@ #include "modelLoadRequest.h" #include "modelSaveRequest.h" #include "config_express.h" -#include "config_util.h" +#include "config_putil.h" #include "virtualFileSystem.h" #include "filename.h" #include "load_dso.h" diff --git a/panda/src/pgraph/shaderPool.cxx b/panda/src/pgraph/shaderPool.cxx index 6334d83789..ba9f99e8c2 100644 --- a/panda/src/pgraph/shaderPool.cxx +++ b/panda/src/pgraph/shaderPool.cxx @@ -12,7 +12,7 @@ */ #include "shaderPool.h" -#include "config_util.h" +#include "config_putil.h" #include "config_express.h" #include "virtualFileSystem.h" #include "loader.h" diff --git a/panda/src/physx/physxEnums.cxx b/panda/src/physx/physxEnums.cxx index 5b186445c2..172e6013b3 100644 --- a/panda/src/physx/physxEnums.cxx +++ b/panda/src/physx/physxEnums.cxx @@ -14,7 +14,7 @@ #include "physxEnums.h" #include "string_utils.h" -#include "config_util.h" +#include "config_putil.h" ostream & operator << (ostream &out, PhysxEnums::PhysxUpAxis axis) { diff --git a/panda/src/pnmtext/freetypeFont.cxx b/panda/src/pnmtext/freetypeFont.cxx index f42b5b72bc..379a139426 100644 --- a/panda/src/pnmtext/freetypeFont.cxx +++ b/panda/src/pnmtext/freetypeFont.cxx @@ -16,7 +16,7 @@ #ifdef HAVE_FREETYPE #include "config_pnmtext.h" -#include "config_util.h" +#include "config_putil.h" #include "config_express.h" #include "virtualFileSystem.h" #include "nurbsCurveEvaluator.h" diff --git a/panda/src/putil/autoTextureScale.cxx b/panda/src/putil/autoTextureScale.cxx index 38f1c0a62a..ea17b6f08b 100644 --- a/panda/src/putil/autoTextureScale.cxx +++ b/panda/src/putil/autoTextureScale.cxx @@ -13,7 +13,7 @@ #include "autoTextureScale.h" #include "string_utils.h" -#include "config_util.h" +#include "config_putil.h" ostream & operator << (ostream &out, AutoTextureScale ats) { diff --git a/panda/src/putil/bamCache.cxx b/panda/src/putil/bamCache.cxx index 5576e16a43..94c31665c6 100644 --- a/panda/src/putil/bamCache.cxx +++ b/panda/src/putil/bamCache.cxx @@ -18,7 +18,7 @@ #include "hashVal.h" #include "datagramInputFile.h" #include "datagramOutputFile.h" -#include "config_util.h" +#include "config_putil.h" #include "bam.h" #include "typeRegistry.h" #include "string_utils.h" diff --git a/panda/src/putil/bamCacheIndex.cxx b/panda/src/putil/bamCacheIndex.cxx index 600ee6c328..31c62ec3a5 100644 --- a/panda/src/putil/bamCacheIndex.cxx +++ b/panda/src/putil/bamCacheIndex.cxx @@ -14,7 +14,7 @@ #include "bamCacheIndex.h" #include "bamReader.h" #include "bamWriter.h" -#include "config_util.h" // util_cat +#include "config_putil.h" // util_cat #include "indent.h" #include diff --git a/panda/src/putil/bamCacheRecord.cxx b/panda/src/putil/bamCacheRecord.cxx index 487d2b1e5d..8fabae7326 100644 --- a/panda/src/putil/bamCacheRecord.cxx +++ b/panda/src/putil/bamCacheRecord.cxx @@ -17,7 +17,7 @@ #include "virtualFileSystem.h" #include "virtualFile.h" #include "indent.h" -#include "config_util.h" // util_cat +#include "config_putil.h" // util_cat TypeHandle BamCacheRecord::_type_handle; diff --git a/panda/src/putil/bamEnums.cxx b/panda/src/putil/bamEnums.cxx index 292227d359..ed1b18ac58 100644 --- a/panda/src/putil/bamEnums.cxx +++ b/panda/src/putil/bamEnums.cxx @@ -13,7 +13,7 @@ #include "bamEnums.h" #include "string_utils.h" -#include "config_util.h" +#include "config_putil.h" ostream & operator << (ostream &out, BamEnums::BamEndian be) { diff --git a/panda/src/putil/bamReader.cxx b/panda/src/putil/bamReader.cxx index 3ab1386d7f..eab309c9d6 100644 --- a/panda/src/putil/bamReader.cxx +++ b/panda/src/putil/bamReader.cxx @@ -17,7 +17,7 @@ #include "bam.h" #include "bamReader.h" #include "datagramIterator.h" -#include "config_util.h" +#include "config_putil.h" #include "pipelineCyclerBase.h" TypeHandle BamReaderAuxData::_type_handle; diff --git a/panda/src/putil/bamReader_ext.cxx b/panda/src/putil/bamReader_ext.cxx index 1648d7e24c..444688a654 100644 --- a/panda/src/putil/bamReader_ext.cxx +++ b/panda/src/putil/bamReader_ext.cxx @@ -12,7 +12,7 @@ */ #include "bamReader_ext.h" -#include "config_util.h" +#include "config_putil.h" #include "pythonThread.h" #ifdef HAVE_PYTHON diff --git a/panda/src/putil/bamWriter.cxx b/panda/src/putil/bamWriter.cxx index 0fcfd2fe1f..ac3ac6b8ad 100644 --- a/panda/src/putil/bamWriter.cxx +++ b/panda/src/putil/bamWriter.cxx @@ -15,7 +15,7 @@ #include "pnotify.h" #include "typedWritable.h" -#include "config_util.h" +#include "config_putil.h" #include "bam.h" #include "bamWriter.h" #include "bamReader.h" diff --git a/panda/src/putil/buttonRegistry.cxx b/panda/src/putil/buttonRegistry.cxx index ff181c95ae..594a5864fd 100644 --- a/panda/src/putil/buttonRegistry.cxx +++ b/panda/src/putil/buttonRegistry.cxx @@ -12,7 +12,7 @@ */ #include "buttonRegistry.h" -#include "config_util.h" +#include "config_putil.h" #include diff --git a/panda/src/putil/clockObject.cxx b/panda/src/putil/clockObject.cxx index 09353ab739..341a11374a 100644 --- a/panda/src/putil/clockObject.cxx +++ b/panda/src/putil/clockObject.cxx @@ -12,7 +12,7 @@ */ #include "clockObject.h" -#include "config_util.h" +#include "config_putil.h" #include "configVariableEnum.h" #include "string_utils.h" #include "thread.h" diff --git a/panda/src/putil/colorSpace.cxx b/panda/src/putil/colorSpace.cxx index 34c37ee423..075eb438a1 100644 --- a/panda/src/putil/colorSpace.cxx +++ b/panda/src/putil/colorSpace.cxx @@ -12,7 +12,7 @@ */ #include "colorSpace.h" -#include "config_util.h" +#include "config_putil.h" #include "configVariableEnum.h" #include "string_utils.h" diff --git a/panda/src/putil/config_util.N b/panda/src/putil/config_putil.N similarity index 100% rename from panda/src/putil/config_util.N rename to panda/src/putil/config_putil.N diff --git a/panda/src/putil/config_util.cxx b/panda/src/putil/config_putil.cxx similarity index 98% rename from panda/src/putil/config_util.cxx rename to panda/src/putil/config_putil.cxx index c5956adc2b..5461b73f3f 100644 --- a/panda/src/putil/config_util.cxx +++ b/panda/src/putil/config_putil.cxx @@ -6,12 +6,12 @@ * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * - * @file config_util.cxx + * @file config_putil.cxx * @author cary * @date 2000-01-04 */ -#include "config_util.h" +#include "config_putil.h" #include "animInterface.h" #include "bamCacheIndex.h" #include "bamCacheRecord.h" @@ -51,7 +51,7 @@ #error Buildsystem error: BUILDING_PANDA_PUTIL not defined #endif -ConfigureDef(config_util); +ConfigureDef(config_putil); NotifyCategoryDef(util, ""); NotifyCategoryDef(bam, util_cat); @@ -88,7 +88,7 @@ ConfigVariableEnum bam_texture_mode PRC_DESC("Set this to specify how textures should be written into Bam files." "See the panda source or documentation for available options.")); -ConfigureFn(config_util) { +ConfigureFn(config_putil) { init_libputil(); } diff --git a/panda/src/putil/config_util.h b/panda/src/putil/config_putil.h similarity index 95% rename from panda/src/putil/config_util.h rename to panda/src/putil/config_putil.h index 34ff4abc2d..ec9f683378 100644 --- a/panda/src/putil/config_util.h +++ b/panda/src/putil/config_putil.h @@ -6,7 +6,7 @@ * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * - * @file config_util.h + * @file config_putil.h * @author cary * @date 2000-01-04 */ @@ -24,7 +24,7 @@ class DSearchPath; -ConfigureDecl(config_util, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL); +ConfigureDecl(config_putil, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL); NotifyCategoryDecl(util, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL); NotifyCategoryDecl(bam, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL); diff --git a/panda/src/putil/copyOnWritePointer.cxx b/panda/src/putil/copyOnWritePointer.cxx index 03ed76e24b..4beb105ada 100644 --- a/panda/src/putil/copyOnWritePointer.cxx +++ b/panda/src/putil/copyOnWritePointer.cxx @@ -12,7 +12,7 @@ */ #include "copyOnWritePointer.h" -#include "config_util.h" +#include "config_putil.h" #include "config_pipeline.h" #ifdef COW_THREADED diff --git a/panda/src/putil/datagramInputFile.cxx b/panda/src/putil/datagramInputFile.cxx index f81381d02e..4fc9b47ffb 100644 --- a/panda/src/putil/datagramInputFile.cxx +++ b/panda/src/putil/datagramInputFile.cxx @@ -16,7 +16,7 @@ #include "numeric_types.h" #include "datagramIterator.h" #include "profileTimer.h" -#include "config_util.h" +#include "config_putil.h" #include "config_express.h" #include "virtualFileSystem.h" #include "streamReader.h" diff --git a/panda/src/putil/datagramOutputFile.h b/panda/src/putil/datagramOutputFile.h index bd2007219a..c81dcdf986 100644 --- a/panda/src/putil/datagramOutputFile.h +++ b/panda/src/putil/datagramOutputFile.h @@ -21,7 +21,7 @@ #include "fileReference.h" #include "virtualFile.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" /** * This class can be used to write a binary file that consists of an arbitrary diff --git a/panda/src/putil/factoryBase.cxx b/panda/src/putil/factoryBase.cxx index 52704e92cd..d34035177c 100644 --- a/panda/src/putil/factoryBase.cxx +++ b/panda/src/putil/factoryBase.cxx @@ -13,7 +13,7 @@ #include "factoryBase.h" #include "indent.h" -#include "config_util.h" +#include "config_putil.h" /** * diff --git a/panda/src/putil/globalPointerRegistry.cxx b/panda/src/putil/globalPointerRegistry.cxx index dcec8579bd..40e062d9c0 100644 --- a/panda/src/putil/globalPointerRegistry.cxx +++ b/panda/src/putil/globalPointerRegistry.cxx @@ -12,7 +12,7 @@ */ #include "globalPointerRegistry.h" -#include "config_util.h" +#include "config_putil.h" // In general, we use the util_cat->info() syntax in this file (instead of // util_cat.info()), because much of this work is done at static init time, diff --git a/panda/src/putil/keyboardButton.cxx b/panda/src/putil/keyboardButton.cxx index 07e5265c03..e6d7162d50 100644 --- a/panda/src/putil/keyboardButton.cxx +++ b/panda/src/putil/keyboardButton.cxx @@ -84,7 +84,7 @@ DEFINE_KEYBD_BUTTON_HANDLE(rmeta) /** * This is intended to be called only once, by the static initialization - * performed in config_util.cxx. + * performed in config_putil.cxx. */ void KeyboardButton:: init_keyboard_buttons() { diff --git a/panda/src/putil/load_prc_file.cxx b/panda/src/putil/load_prc_file.cxx index d35a3b9c29..5663c49038 100644 --- a/panda/src/putil/load_prc_file.cxx +++ b/panda/src/putil/load_prc_file.cxx @@ -16,7 +16,7 @@ #include "configVariableManager.h" #include "virtualFileSystem.h" #include "config_express.h" -#include "config_util.h" +#include "config_putil.h" #include "hashVal.h" /** diff --git a/panda/src/putil/loaderOptions.cxx b/panda/src/putil/loaderOptions.cxx index 61aeb4f5d1..7f57d77fef 100644 --- a/panda/src/putil/loaderOptions.cxx +++ b/panda/src/putil/loaderOptions.cxx @@ -12,7 +12,7 @@ */ #include "loaderOptions.h" -#include "config_util.h" +#include "config_putil.h" #include "indent.h" /** @@ -25,7 +25,7 @@ LoaderOptions(int flags) : _texture_num_views(0), _auto_texture_scale(ATS_unspecified) { - // Shadowing the variables in config_util for static init ordering issues. + // Shadowing the variables in config_putil for static init ordering issues. static ConfigVariableBool *preload_textures; static ConfigVariableBool *preload_simple_textures; static ConfigVariableBool *compressed_textures; diff --git a/panda/src/putil/mouseButton.cxx b/panda/src/putil/mouseButton.cxx index 5f3ebabbe1..ef3802edca 100644 --- a/panda/src/putil/mouseButton.cxx +++ b/panda/src/putil/mouseButton.cxx @@ -129,7 +129,7 @@ is_mouse_button(ButtonHandle button) { /** * This is intended to be called only once, by the static initialization - * performed in config_util.cxx. + * performed in config_putil.cxx. */ void MouseButton:: init_mouse_buttons() { diff --git a/panda/src/putil/p3putil_composite1.cxx b/panda/src/putil/p3putil_composite1.cxx index 4fc6fcaf70..446f7f1f07 100644 --- a/panda/src/putil/p3putil_composite1.cxx +++ b/panda/src/putil/p3putil_composite1.cxx @@ -17,7 +17,7 @@ #include "callbackObject.cxx" #include "clockObject.cxx" #include "colorSpace.cxx" -#include "config_util.cxx" +#include "config_putil.cxx" #include "configurable.cxx" #include "copyOnWriteObject.cxx" #include "copyOnWritePointer.cxx" diff --git a/panda/src/putil/pythonCallbackObject.cxx b/panda/src/putil/pythonCallbackObject.cxx index fd1c9aa64f..b1917c6e0e 100644 --- a/panda/src/putil/pythonCallbackObject.cxx +++ b/panda/src/putil/pythonCallbackObject.cxx @@ -18,7 +18,7 @@ #include "py_panda.h" #include "pythonThread.h" #include "callbackData.h" -#include "config_util.h" +#include "config_putil.h" TypeHandle PythonCallbackObject::_type_handle; diff --git a/panda/src/putil/simpleHashMap.h b/panda/src/putil/simpleHashMap.h index 50a7e3af12..68f6352a88 100644 --- a/panda/src/putil/simpleHashMap.h +++ b/panda/src/putil/simpleHashMap.h @@ -16,7 +16,7 @@ #include "pandabase.h" #include "pvector.h" -#include "config_util.h" +#include "config_putil.h" /** * Entry in the SimpleHashMap. diff --git a/panda/src/putil/test_filename.cxx b/panda/src/putil/test_filename.cxx index a4cbfa76e6..b6703d7387 100644 --- a/panda/src/putil/test_filename.cxx +++ b/panda/src/putil/test_filename.cxx @@ -12,7 +12,7 @@ */ #include "filename.h" -#include "config_util.h" +#include "config_putil.h" #include "dSearchPath.h" diff --git a/panda/src/putil/weakKeyHashMap.h b/panda/src/putil/weakKeyHashMap.h index bbb7077998..3769660fbc 100644 --- a/panda/src/putil/weakKeyHashMap.h +++ b/panda/src/putil/weakKeyHashMap.h @@ -16,7 +16,7 @@ #include "pandabase.h" #include "pvector.h" -#include "config_util.h" +#include "config_putil.h" #include "weakPointerTo.h" /** diff --git a/panda/src/speedtree/speedTreeNode.cxx b/panda/src/speedtree/speedTreeNode.cxx index 61150a5a01..c455e848f5 100644 --- a/panda/src/speedtree/speedTreeNode.cxx +++ b/panda/src/speedtree/speedTreeNode.cxx @@ -15,7 +15,7 @@ #include "speedTreeNode.h" #include "stBasicTerrain.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" #include "cullTraverser.h" #include "cullableObject.h" #include "cullHandler.h" diff --git a/panda/src/text/dynamicTextFont.cxx b/panda/src/text/dynamicTextFont.cxx index 3a349a6d69..f02328009e 100644 --- a/panda/src/text/dynamicTextFont.cxx +++ b/panda/src/text/dynamicTextFont.cxx @@ -28,7 +28,7 @@ #endif #include "config_text.h" -#include "config_util.h" +#include "config_putil.h" #include "config_express.h" #include "virtualFileSystem.h" #include "geomVertexData.h" diff --git a/panda/src/text/fontPool.cxx b/panda/src/text/fontPool.cxx index 1fab675bff..ac7d476c63 100644 --- a/panda/src/text/fontPool.cxx +++ b/panda/src/text/fontPool.cxx @@ -14,7 +14,7 @@ #include "fontPool.h" #include "staticTextFont.h" #include "dynamicTextFont.h" -#include "config_util.h" +#include "config_putil.h" #include "config_express.h" #include "virtualFileSystem.h" #include "nodePath.h" diff --git a/panda/src/tinydisplay/tinyOsxGraphicsWindow.mm b/panda/src/tinydisplay/tinyOsxGraphicsWindow.mm index da3630a572..01892094b0 100644 --- a/panda/src/tinydisplay/tinyOsxGraphicsWindow.mm +++ b/panda/src/tinydisplay/tinyOsxGraphicsWindow.mm @@ -26,7 +26,7 @@ #include "throw_event.h" #include "pnmImage.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" #include diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index 054581e1fd..f8fa283020 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -19,7 +19,7 @@ #include "keyboardButton.h" #include "mouseButton.h" #include "clockObject.h" -#include "config_util.h" +#include "config_putil.h" #include "throw_event.h" #include "nativeWindowHandle.h" diff --git a/pandatool/src/bam/eggToBam.cxx b/pandatool/src/bam/eggToBam.cxx index 238eba17cf..f6c9bf4b52 100644 --- a/pandatool/src/bam/eggToBam.cxx +++ b/pandatool/src/bam/eggToBam.cxx @@ -13,7 +13,7 @@ #include "eggToBam.h" -#include "config_util.h" +#include "config_putil.h" #include "bamFile.h" #include "load_egg_file.h" #include "config_egg2pg.h" diff --git a/pandatool/src/bam/ptsToBam.cxx b/pandatool/src/bam/ptsToBam.cxx index 5f570d309b..4db96663ca 100644 --- a/pandatool/src/bam/ptsToBam.cxx +++ b/pandatool/src/bam/ptsToBam.cxx @@ -13,7 +13,7 @@ #include "ptsToBam.h" -#include "config_util.h" +#include "config_putil.h" #include "geomPoints.h" #include "bamFile.h" #include "pandaNode.h" diff --git a/pandatool/src/converter/somethingToEggConverter.h b/pandatool/src/converter/somethingToEggConverter.h index 0388ca8fb4..b3e71b6ab5 100644 --- a/pandatool/src/converter/somethingToEggConverter.h +++ b/pandatool/src/converter/somethingToEggConverter.h @@ -17,7 +17,7 @@ #include "pandatoolbase.h" #include "filename.h" -#include "config_util.h" // for get_model_path() +#include "config_putil.h" // for get_model_path() #include "animationConvert.h" #include "pathReplace.h" #include "pointerTo.h" diff --git a/pandatool/src/egg-palettize/txaFileFilter.cxx b/pandatool/src/egg-palettize/txaFileFilter.cxx index a8f6c21507..5c673c51a1 100644 --- a/pandatool/src/egg-palettize/txaFileFilter.cxx +++ b/pandatool/src/egg-palettize/txaFileFilter.cxx @@ -20,7 +20,7 @@ #include "dconfig.h" #include "configVariableFilename.h" #include "virtualFileSystem.h" -#include "config_util.h" +#include "config_putil.h" NotifyCategoryDeclNoExport(txafile); NotifyCategoryDef(txafile, ""); diff --git a/pandatool/src/eggbase/eggReader.cxx b/pandatool/src/eggbase/eggReader.cxx index dce7b64c51..e570b8aa9d 100644 --- a/pandatool/src/eggbase/eggReader.cxx +++ b/pandatool/src/eggbase/eggReader.cxx @@ -14,7 +14,7 @@ #include "eggReader.h" #include "pnmImage.h" -#include "config_util.h" +#include "config_putil.h" #include "eggTextureCollection.h" #include "eggGroup.h" #include "eggGroupNode.h" diff --git a/pandatool/src/eggbase/somethingToEgg.cxx b/pandatool/src/eggbase/somethingToEgg.cxx index 497761ea06..4f33599761 100644 --- a/pandatool/src/eggbase/somethingToEgg.cxx +++ b/pandatool/src/eggbase/somethingToEgg.cxx @@ -14,7 +14,7 @@ #include "somethingToEgg.h" #include "somethingToEggConverter.h" -#include "config_util.h" +#include "config_putil.h" /** * The first parameter to the constructor should be the one-word name of the diff --git a/pandatool/src/flt/fltTexture.cxx b/pandatool/src/flt/fltTexture.cxx index dfc2b9d987..c3c61cf130 100644 --- a/pandatool/src/flt/fltTexture.cxx +++ b/pandatool/src/flt/fltTexture.cxx @@ -16,7 +16,7 @@ #include "fltRecordWriter.h" #include "fltHeader.h" #include "pathReplace.h" -#include "config_util.h" +#include "config_putil.h" TypeHandle FltTexture::_type_handle; diff --git a/pandatool/src/maxegg/maxToEggConverter.cxx b/pandatool/src/maxegg/maxToEggConverter.cxx index b07c1fd77d..6e79178fc5 100644 --- a/pandatool/src/maxegg/maxToEggConverter.cxx +++ b/pandatool/src/maxegg/maxToEggConverter.cxx @@ -25,7 +25,7 @@ */ #include "maxEgg.h" -#include "config_util.h" +#include "config_putil.h" /** * diff --git a/pandatool/src/mayaprogs/mayaPview.cxx b/pandatool/src/mayaprogs/mayaPview.cxx index 60af297044..286d94ad67 100644 --- a/pandatool/src/mayaprogs/mayaPview.cxx +++ b/pandatool/src/mayaprogs/mayaPview.cxx @@ -19,7 +19,7 @@ #include "mayaToEggConverter.h" #include "eggData.h" #include "load_egg_file.h" -#include "config_util.h" +#include "config_putil.h" #include "config_chan.h" #include "config_gobj.h" #include "textNode.h" diff --git a/pandatool/src/pandatoolbase/pathReplace.cxx b/pandatool/src/pandatoolbase/pathReplace.cxx index 786bb6ae03..c3891cf047 100644 --- a/pandatool/src/pandatoolbase/pathReplace.cxx +++ b/pandatool/src/pandatoolbase/pathReplace.cxx @@ -12,7 +12,7 @@ */ #include "pathReplace.h" -#include "config_util.h" +#include "config_putil.h" #include "config_pandatoolbase.h" #include "indent.h" #include "virtualFileSystem.h" diff --git a/pandatool/src/ptloader/loaderFileTypePandatool.cxx b/pandatool/src/ptloader/loaderFileTypePandatool.cxx index 48625154f2..0de02c19de 100644 --- a/pandatool/src/ptloader/loaderFileTypePandatool.cxx +++ b/pandatool/src/ptloader/loaderFileTypePandatool.cxx @@ -15,7 +15,7 @@ #include "config_ptloader.h" #include "somethingToEggConverter.h" #include "eggToSomethingConverter.h" -#include "config_util.h" +#include "config_putil.h" #include "load_egg_file.h" #include "save_egg_file.h" #include "eggData.h" From c81229c1a88a35507dade535e5abdfc2318ae63b Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 9 May 2018 15:57:34 -0600 Subject: [PATCH 19/20] pfmprogs: Rename config_pfm to config_pfmprogs --- makepanda/makepanda.py | 4 ++-- .../src/pfmprogs/{config_pfm.cxx => config_pfmprogs.cxx} | 8 ++++---- .../src/pfmprogs/{config_pfm.h => config_pfmprogs.h} | 2 +- pandatool/src/pfmprogs/pfmBba.cxx | 2 +- pandatool/src/pfmprogs/pfmTrans.cxx | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) rename pandatool/src/pfmprogs/{config_pfm.cxx => config_pfmprogs.cxx} (89%) rename pandatool/src/pfmprogs/{config_pfm.h => config_pfmprogs.h} (95%) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 5ae064b649..0e196654a2 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -6110,9 +6110,9 @@ if not PkgSkip("PANDATOOL"): TargetAdd('pfm-trans.exe', opts=['ADVAPI']) TargetAdd('pfm-bba_pfmBba.obj', opts=OPTS, input='pfmBba.cxx') - TargetAdd('pfm-bba_config_pfm.obj', opts=OPTS, input='config_pfm.cxx') + TargetAdd('pfm-bba_config_pfmprogs.obj', opts=OPTS, input='config_pfmprogs.cxx') TargetAdd('pfm-bba.exe', input='pfm-bba_pfmBba.obj') - TargetAdd('pfm-bba.exe', input='pfm-bba_config_pfm.obj') + TargetAdd('pfm-bba.exe', input='pfm-bba_config_pfmprogs.obj') TargetAdd('pfm-bba.exe', input='libp3progbase.lib') TargetAdd('pfm-bba.exe', input='libp3pandatoolbase.lib') TargetAdd('pfm-bba.exe', input=COMMON_PANDA_LIBS) diff --git a/pandatool/src/pfmprogs/config_pfm.cxx b/pandatool/src/pfmprogs/config_pfmprogs.cxx similarity index 89% rename from pandatool/src/pfmprogs/config_pfm.cxx rename to pandatool/src/pfmprogs/config_pfmprogs.cxx index fc8cea6bf3..afa49ef91b 100644 --- a/pandatool/src/pfmprogs/config_pfm.cxx +++ b/pandatool/src/pfmprogs/config_pfmprogs.cxx @@ -6,16 +6,16 @@ * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * - * @file config_pfm.cxx + * @file config_pfmprogs.cxx * @author drose * @date 2010-12-23 */ -#include "config_pfm.h" +#include "config_pfmprogs.h" #include "dconfig.h" -Configure(config_pfm); +Configure(config_pfmprogs); NotifyCategoryDef(pfm, ""); ConfigVariableDouble pfm_bba_dist @@ -23,7 +23,7 @@ ConfigVariableDouble pfm_bba_dist PRC_DESC("Specifies the point_dist and sample_radius, in UV space, for " "compute bba files with pfm_trans.")); -ConfigureFn(config_pfm) { +ConfigureFn(config_pfmprogs) { init_libpfm(); } diff --git a/pandatool/src/pfmprogs/config_pfm.h b/pandatool/src/pfmprogs/config_pfmprogs.h similarity index 95% rename from pandatool/src/pfmprogs/config_pfm.h rename to pandatool/src/pfmprogs/config_pfmprogs.h index 5da1fcbb4e..98777496e7 100644 --- a/pandatool/src/pfmprogs/config_pfm.h +++ b/pandatool/src/pfmprogs/config_pfmprogs.h @@ -6,7 +6,7 @@ * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * - * @file config_pfm.h + * @file config_pfmprogs.h * @author drose * @date 2010-12-23 */ diff --git a/pandatool/src/pfmprogs/pfmBba.cxx b/pandatool/src/pfmprogs/pfmBba.cxx index 5517e45a63..5456efad27 100644 --- a/pandatool/src/pfmprogs/pfmBba.cxx +++ b/pandatool/src/pfmprogs/pfmBba.cxx @@ -12,7 +12,7 @@ */ #include "pfmBba.h" -#include "config_pfm.h" +#include "config_pfmprogs.h" #include "pfmFile.h" /** diff --git a/pandatool/src/pfmprogs/pfmTrans.cxx b/pandatool/src/pfmprogs/pfmTrans.cxx index 270d6a03af..123b098768 100644 --- a/pandatool/src/pfmprogs/pfmTrans.cxx +++ b/pandatool/src/pfmprogs/pfmTrans.cxx @@ -12,7 +12,7 @@ */ #include "pfmTrans.h" -#include "config_pfm.h" +#include "config_pfmprogs.h" #include "pfmFile.h" #include "pfmVizzer.h" #include "texture.h" From 47f7d3f29733bdcbc39ece033006f7f9f2d3857b Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Fri, 11 May 2018 19:13:22 -0600 Subject: [PATCH 20/20] general: Add headers explaining the renamed config_*.h --- makepanda/makepanda.py | 2 ++ panda/src/pstatclient/config_pstats.h | 2 ++ panda/src/putil/config_util.h | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 panda/src/pstatclient/config_pstats.h create mode 100644 panda/src/putil/config_util.h diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 0e196654a2..56ffecdbd5 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -3668,6 +3668,7 @@ if (not RUNTIME): OPTS=['DIR:panda/src/putil', 'ZLIB', 'PYTHON'] IGATEFILES=GetDirectoryContents('panda/src/putil', ["*.h", "*_composite*.cxx"]) IGATEFILES.remove("test_bam.h") + IGATEFILES.remove("config_util.h") TargetAdd('libp3putil.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3putil.in', opts=['IMOD:panda3d.core', 'ILIB:libp3putil', 'SRCDIR:panda/src/putil']) TargetAdd('libp3putil_igate.obj', input='libp3putil.in', opts=["DEPENDENCYONLY"]) @@ -3794,6 +3795,7 @@ if (not RUNTIME): OPTS=['DIR:panda/src/pstatclient', 'PYTHON'] IGATEFILES=GetDirectoryContents('panda/src/pstatclient', ["*.h", "*_composite*.cxx"]) + IGATEFILES.remove("config_pstats.h") TargetAdd('libp3pstatclient.in', opts=OPTS, input=IGATEFILES) TargetAdd('libp3pstatclient.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pstatclient', 'SRCDIR:panda/src/pstatclient']) TargetAdd('libp3pstatclient_igate.obj', input='libp3pstatclient.in', opts=["DEPENDENCYONLY"]) diff --git a/panda/src/pstatclient/config_pstats.h b/panda/src/pstatclient/config_pstats.h new file mode 100644 index 0000000000..84f42df553 --- /dev/null +++ b/panda/src/pstatclient/config_pstats.h @@ -0,0 +1,2 @@ +// This file to remain during the whole 1.10.x cycle; remove after that. +#error config_pstats.h has been renamed to config_pstatclient.h - please update your project. diff --git a/panda/src/putil/config_util.h b/panda/src/putil/config_util.h new file mode 100644 index 0000000000..6886f3257d --- /dev/null +++ b/panda/src/putil/config_util.h @@ -0,0 +1,2 @@ +// This file to remain during the whole 1.10.x cycle; remove after that. +#error config_util.h has been renamed to config_putil.h - please update your project.