瀏覽代碼

support max 2014

rdb 12 年之前
父節點
當前提交
7720c482c7
共有 2 個文件被更改,包括 19 次插入3 次删除
  1. 4 0
      pandatool/src/maxegg/maxEgg.h
  2. 15 3
      pandatool/src/maxegg/maxOptionsDialog.cxx

+ 4 - 0
pandatool/src/maxegg/maxEgg.h

@@ -132,7 +132,11 @@ class MaxEggPlugin : public HelperObject
   CreateMouseCallBack* GetCreateMouseCallBack();
   CreateMouseCallBack* GetCreateMouseCallBack();
   void BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev);
   void BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev);
   void EndEditParams( IObjParam *ip, ULONG flags,Animatable *next);
   void EndEditParams( IObjParam *ip, ULONG flags,Animatable *next);
+#if MAX_VERSION_MAJOR < 16
   MCHAR *GetObjectName() { return GetString(IDS_LIBDESCRIPTION); }
   MCHAR *GetObjectName() { return GetString(IDS_LIBDESCRIPTION); }
+#else
+  const MCHAR *GetObjectName() { return GetString(IDS_LIBDESCRIPTION); }
+#endif
 
 
   // From Object
   // From Object
   ObjectState Eval(TimeValue time);
   ObjectState Eval(TimeValue time);

+ 15 - 3
pandatool/src/maxegg/maxOptionsDialog.cxx

@@ -164,8 +164,14 @@ public:
   AddNodeCB (MaxOptionsDialog *instance, HWND wnd) : 
   AddNodeCB (MaxOptionsDialog *instance, HWND wnd) : 
     ph(instance), hWnd(wnd) {}
     ph(instance), hWnd(wnd) {}
 
 
+#if MAX_VERSION_MAJOR < 16
   virtual MCHAR *dialogTitle() {return _M("Objects to Export");}
   virtual MCHAR *dialogTitle() {return _M("Objects to Export");}
   virtual MCHAR *buttonText()  {return _M("Select");}
   virtual MCHAR *buttonText()  {return _M("Select");}
+#else
+  virtual const MCHAR *dialogTitle() {return _M("Objects to Export");}
+  virtual const MCHAR *buttonText()  {return _M("Select");}
+#endif
+
   virtual int filter(INode *node);
   virtual int filter(INode *node);
   virtual void proc(INodeTab &nodeTab);
   virtual void proc(INodeTab &nodeTab);
 };
 };
@@ -213,12 +219,18 @@ class RemoveNodeCB : public HitByNameDlgCallback
 public:
 public:
     MaxOptionsDialog *ph; //Pointer to the parent class
     MaxOptionsDialog *ph; //Pointer to the parent class
     HWND hWnd;            //Handle to the parent dialog
     HWND hWnd;            //Handle to the parent dialog
-    
+
     RemoveNodeCB (MaxOptionsDialog *instance, HWND wnd) : 
     RemoveNodeCB (MaxOptionsDialog *instance, HWND wnd) : 
         ph(instance), hWnd(wnd) {}
         ph(instance), hWnd(wnd) {}
-    
+
+#if MAX_VERSION_MAJOR < 16
     virtual MCHAR *dialogTitle() {return _M("Objects to Remove");}
     virtual MCHAR *dialogTitle() {return _M("Objects to Remove");}
     virtual MCHAR *buttonText()  {return _M("Remove");}
     virtual MCHAR *buttonText()  {return _M("Remove");}
+#else
+    virtual const MCHAR *dialogTitle() {return _M("Objects to Remove");}
+    virtual const MCHAR *buttonText()  {return _M("Remove");}
+#endif
+
     virtual int filter(INode *node) {return (node && ph->FindNode(node->GetHandle()));}
     virtual int filter(INode *node) {return (node && ph->FindNode(node->GetHandle()));}
     virtual void proc(INodeTab &nodeTab);
     virtual void proc(INodeTab &nodeTab);
 };
 };
@@ -511,7 +523,7 @@ void MaxOptionsDialog::RefreshNodeList(HWND hWnd) {
   SendMessage(nodeLB, LB_RESETCONTENT, 0, 0);
   SendMessage(nodeLB, LB_RESETCONTENT, 0, 0);
   for (int i = 0; i < _node_list.size(); i++) {
   for (int i = 0; i < _node_list.size(); i++) {
       INode *temp = _max_interface->GetINodeByHandle(_node_list[i]);
       INode *temp = _max_interface->GetINodeByHandle(_node_list[i]);
-      MCHAR *name = _M("Unknown Node");
+      const MCHAR *name = _M("Unknown Node");
       if (temp) name = temp->GetName();
       if (temp) name = temp->GetName();
       SendMessage(nodeLB, LB_ADDSTRING, 0, (LPARAM)name);
       SendMessage(nodeLB, LB_ADDSTRING, 0, (LPARAM)name);
   }
   }