mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Merge remote-tracking branch 'origin/release/1.9.x'
This commit is contained in:
commit
29411f5e14
@ -45,6 +45,8 @@ This issue fixes several bugs that were still found in 1.9.2.
|
||||
* Fix rare X11 .ico cursor bug; also now supports PNG-compressed icons
|
||||
* Add keyword argument support to make() methods such as Shader.make()
|
||||
* Fix compilation errors with Bullet 2.84
|
||||
* Fix exception when trying to pickle NodePathCollection objects
|
||||
* Fix error when trying to raise vectors to a power
|
||||
|
||||
------------------------ RELEASE 1.9.2 ------------------------
|
||||
|
||||
|
@ -2344,7 +2344,7 @@ write_module_class(ostream &out, Object *obj) {
|
||||
|
||||
string expected_params;
|
||||
|
||||
out << " if (arg2 != (PyObject *)NULL) {\n";
|
||||
out << " if (arg2 != (PyObject *)NULL && arg2 != Py_None) {\n";
|
||||
out << " PyObject *args = PyTuple_Pack(2, arg, arg2);\n";
|
||||
write_function_forset(out, two_param_remaps, 2, 2, expected_params, 4,
|
||||
true, true, AT_varargs, RF_pyobject | RF_err_null | RF_decref_args, true);
|
||||
|
@ -76,16 +76,19 @@ __reduce__(PyObject *self) const {
|
||||
// object whose constructor we should call (e.g. this), and the arguments
|
||||
// necessary to reconstruct this object.
|
||||
|
||||
PyObject *this_class = PyObject_Type(self);
|
||||
PyObject *this_class = (PyObject *)self->ob_type;
|
||||
if (this_class == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PyObject *self_iter = PyObject_GetIter(self);
|
||||
if (self_iter == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Since a NodePathCollection is itself an iterator, we can simply pass it
|
||||
// as the fourth tuple component.
|
||||
PyObject *result = Py_BuildValue("(O()OO)", this_class, Py_None, self);
|
||||
Py_DECREF(this_class);
|
||||
return result;
|
||||
return Py_BuildValue("(O()ON)", this_class, Py_None, self_iter);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -178,7 +178,8 @@ static INT_PTR CALLBACK ImportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int MaxEggImporter::DoImport(const TCHAR *name,ImpInterface *ii,Interface *i, BOOL suppressPrompts) {
|
||||
int MaxEggImporter::
|
||||
DoImport(const TCHAR *name, ImpInterface *ii, Interface *i, BOOL suppressPrompts) {
|
||||
// Prompt the user with our dialogbox.
|
||||
if (!DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_IMPORT_DLG),
|
||||
i->GetMAXHWnd(), ImportDlgProc, (LPARAM)this)) {
|
||||
@ -187,13 +188,23 @@ int MaxEggImporter::DoImport(const TCHAR *name,ImpInterface *ii,Interface *i, BO
|
||||
|
||||
std::ostringstream log;
|
||||
Notify::ptr()->set_ostream_ptr(&log, false);
|
||||
|
||||
#ifdef _UNICODE
|
||||
char sname[2048];
|
||||
sname[2047] = 0;
|
||||
wcstombs(sname, name, 2047);
|
||||
bool ok = MaxLoadEggFile(sname, _merge ? true:false, _importmodel ? true:false, _importanim ? true:false);
|
||||
#else
|
||||
bool ok = MaxLoadEggFile(name, _merge ? true:false, _importmodel ? true:false, _importanim ? true:false);
|
||||
#endif
|
||||
|
||||
string txt = log.str();
|
||||
if (txt != "") {
|
||||
MessageBox(NULL, txt.c_str(), "Panda3D Importer", MB_OK);
|
||||
} else {
|
||||
if (!ok) MessageBox(NULL, "Import Failed, unknown reason\n", "Panda3D Importer", MB_OK);
|
||||
MessageBoxA(NULL, txt.c_str(), "Panda3D Importer", MB_OK);
|
||||
} else if (!ok) {
|
||||
MessageBoxA(NULL, "Import Failed, unknown reason\n", "Panda3D Importer", MB_OK);
|
||||
}
|
||||
|
||||
Notify::ptr()->set_ostream_ptr(NULL, false);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user