mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
d92b440617
5
direct/src/dist/commands.py
vendored
5
direct/src/dist/commands.py
vendored
@ -66,6 +66,8 @@ def _parse_dict(input):
|
||||
|
||||
|
||||
def egg2bam(_build_cmd, srcpath, dstpath):
|
||||
if dstpath.endswith('.gz') or dstpath.endswith('.pz'):
|
||||
dstpath = dstpath[:-3]
|
||||
dstpath = dstpath + '.bam'
|
||||
try:
|
||||
subprocess.check_call([
|
||||
@ -895,6 +897,9 @@ class build_apps(setuptools.Command):
|
||||
os.makedirs(dst_dir)
|
||||
|
||||
ext = os.path.splitext(src)[1]
|
||||
# If the file ends with .gz/.pz, we strip this off.
|
||||
if ext in ('.gz', '.pz'):
|
||||
ext = os.path.splitext(src[:-3])[1]
|
||||
if not ext:
|
||||
ext = os.path.basename(src)
|
||||
|
||||
|
@ -83,6 +83,7 @@ def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None,
|
||||
elif isinstance(file, strType):
|
||||
filename = core.Filename.fromOsSpecific(file)
|
||||
else:
|
||||
# It's either a Filename object or an os.PathLike.
|
||||
# If a Filename is given, make a writable copy anyway.
|
||||
filename = core.Filename(file)
|
||||
|
||||
|
@ -2038,33 +2038,11 @@ get_make_property(CPPMakeProperty *make_property, CPPStructType *struct_type, CP
|
||||
iproperty._length_function = length_function;
|
||||
}
|
||||
|
||||
if (make_property->_type == CPPMakeProperty::T_normal) {
|
||||
if (getter != nullptr) {
|
||||
iproperty._flags |= InterrogateElement::F_has_getter;
|
||||
iproperty._getter = get_function(getter, "", struct_type,
|
||||
struct_type->get_scope(), 0);
|
||||
nassertr(iproperty._getter, 0);
|
||||
}
|
||||
} else {
|
||||
// We could have a mixed sequence/mapping property, so synthesize a
|
||||
// getitem function. We don't really care what's in here; we just use
|
||||
// this to store the remaps.
|
||||
if (!iproperty.has_getter()) {
|
||||
iproperty._flags |= InterrogateElement::F_has_getter;
|
||||
iproperty._getter = InterrogateDatabase::get_ptr()->get_next_index();
|
||||
InterrogateFunction *ifunction = new InterrogateFunction;
|
||||
ifunction->_instances = new InterrogateFunction::Instances;
|
||||
InterrogateDatabase::get_ptr()->add_function(iproperty._getter, ifunction);
|
||||
}
|
||||
|
||||
// Add our getter to the generated getitem function.
|
||||
string signature = TypeManager::get_function_signature(getter);
|
||||
InterrogateFunction &ifunction =
|
||||
InterrogateDatabase::get_ptr()->update_function(iproperty._getter);
|
||||
if (ifunction._instances == nullptr) {
|
||||
ifunction._instances = new InterrogateFunction::Instances;
|
||||
}
|
||||
ifunction._instances->insert(InterrogateFunction::Instances::value_type(signature, getter));
|
||||
if (getter != nullptr) {
|
||||
iproperty._flags |= InterrogateElement::F_has_getter;
|
||||
iproperty._getter = get_function(getter, "", struct_type,
|
||||
struct_type->get_scope(), 0);
|
||||
nassertr(iproperty._getter, 0);
|
||||
}
|
||||
|
||||
if (hasser != nullptr) {
|
||||
|
@ -46,11 +46,13 @@ queue_event(CPT_Event event) {
|
||||
LightMutexHolder holder(_lock);
|
||||
|
||||
_queue.push_back(event);
|
||||
if (event_cat.is_spam() || event_cat.is_debug()) {
|
||||
if (event_cat.is_debug()) {
|
||||
if (event->get_name() == "NewFrame") {
|
||||
// Don't bother us with this particularly spammy event.
|
||||
event_cat.spam()
|
||||
<< "Throwing event " << *event << "\n";
|
||||
if (event_cat.is_spam()) {
|
||||
event_cat.spam()
|
||||
<< "Throwing event " << *event << "\n";
|
||||
}
|
||||
} else {
|
||||
event_cat.debug()
|
||||
<< "Throwing event " << *event << "\n";
|
||||
|
@ -41,6 +41,8 @@
|
||||
#include "pta_LVecBase2.h"
|
||||
#include "stl_compares.h"
|
||||
#include "shaderInput.h"
|
||||
#include "internalNameCollection.h"
|
||||
#include "materialCollection.h"
|
||||
#include "textureCollection.h"
|
||||
#include "textureStageCollection.h"
|
||||
|
||||
@ -49,13 +51,9 @@ class FindApproxPath;
|
||||
class FindApproxLevelEntry;
|
||||
class Light;
|
||||
class PolylightNode;
|
||||
class InternalNameCollection;
|
||||
class Texture;
|
||||
class TextureStage;
|
||||
class TextureCollection;
|
||||
class TextureStageCollection;
|
||||
class Material;
|
||||
class MaterialCollection;
|
||||
class Fog;
|
||||
class GlobPattern;
|
||||
class PreparedGraphicsObjects;
|
||||
@ -1054,6 +1052,8 @@ private:
|
||||
|
||||
INLINE std::ostream &operator << (std::ostream &out, const NodePath &node_path);
|
||||
|
||||
#include "nodePathCollection.h"
|
||||
|
||||
#include "nodePath.I"
|
||||
|
||||
#endif
|
||||
|
24
tests/dtoolutil/test_filename.py
Normal file
24
tests/dtoolutil/test_filename.py
Normal file
@ -0,0 +1,24 @@
|
||||
from panda3d.core import Filename
|
||||
import sys, os
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Requires Python 3.6")
|
||||
def test_filename_fspath():
|
||||
fn = Filename.from_os_specific(__file__)
|
||||
assert os.fspath(fn) == fn.to_os_specific_w()
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Requires Python 3.6")
|
||||
def test_filename_open():
|
||||
fn = Filename.from_os_specific(__file__)
|
||||
open(fn, 'rb')
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info < (3, 4), reason="Requires Python 3.4")
|
||||
def test_filename_ctor_pathlib():
|
||||
pathlib = pytest.importorskip('pathlib')
|
||||
|
||||
path = pathlib.Path(__file__)
|
||||
fn = Filename(path)
|
||||
assert fn.to_os_specific_w() == str(path)
|
Loading…
x
Reference in New Issue
Block a user