diff --git a/direct/src/plugin/p3dInstance.cxx b/direct/src/plugin/p3dInstance.cxx index 705f544eeb..06930a13c6 100644 --- a/direct/src/plugin/p3dInstance.cxx +++ b/direct/src/plugin/p3dInstance.cxx @@ -879,6 +879,14 @@ handle_script_request(const string &operation, P3D_object *object, xvalue->SetAttribute("value", (int)result); xcommand->LinkEndChild(xvalue); + } else if (operation == "has_method") { + bool result = P3D_OBJECT_HAS_METHOD(object, property_name.c_str()); + + TiXmlElement *xvalue = new TiXmlElement("value"); + xvalue->SetAttribute("type", "bool"); + xvalue->SetAttribute("value", (int)result); + xcommand->LinkEndChild(xvalue); + } else if (operation == "call") { // Convert the single value parameter into an array of parameters. P3D_object **values = &value; diff --git a/direct/src/plugin/p3dSession.cxx b/direct/src/plugin/p3dSession.cxx index 92dc6380fb..cbcec7de2a 100644 --- a/direct/src/plugin/p3dSession.cxx +++ b/direct/src/plugin/p3dSession.cxx @@ -696,6 +696,10 @@ start_p3dpython() { env += _python_root_dir; env += '\0'; + env += "LD_LIBRARY_PATH="; + env += _python_root_dir; + env += '\0'; + env += "PYTHONPATH="; env += _python_root_dir; env += '\0';