-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow
ptLayer.setTexture()
for unloaded images.
This is useful for setting textures that are in global PRPs.
- Loading branch information
Showing
4 changed files
with
4 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
|
||
#include "pyImage.h" | ||
|
||
#include <algorithm> | ||
#include <vector> | ||
|
||
#include <string_theory/format> | ||
|
@@ -209,12 +208,6 @@ PyObject* pyImage::Find(const ST::string& name) | |
{ | ||
std::vector<plKey> foundKeys; | ||
plKeyFinder::Instance().ReallyStupidSubstringSearch(name, plMipmap::Index(), foundKeys); | ||
// Remove anything that isn't loaded - they aren't useful in Python code | ||
std::remove_if( | ||
foundKeys.begin(), | ||
foundKeys.end(), | ||
[](const plKey& key) { return key->ObjectIsLoaded() == nullptr; } | ||
); | ||
|
||
PyObject* tup = PyTuple_New(foundKeys.size()); | ||
for (size_t i = 0; i < foundKeys.size(); ++i) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters