浏览代码

minor fixes

David Rose 16 年之前
父节点
当前提交
c8892d4991
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 8 0
      direct/src/plugin/p3dInstance.cxx
  2. 4 0
      direct/src/plugin/p3dSession.cxx

+ 8 - 0
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;

+ 4 - 0
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';