Browse Source

check error return from setWeight

David Rose 21 years ago
parent
commit
c07989aace
1 changed files with 6 additions and 1 deletions
  1. 6 1
      pandatool/src/mayaegg/mayaBlendDesc.cxx

+ 6 - 1
pandatool/src/mayaegg/mayaBlendDesc.cxx

@@ -17,6 +17,7 @@
 ////////////////////////////////////////////////////////////////////
 
 #include "mayaBlendDesc.h"
+#include "config_mayaegg.h"
 
 TypeHandle MayaBlendDesc::_type_handle;
 
@@ -55,7 +56,11 @@ MayaBlendDesc::
 ////////////////////////////////////////////////////////////////////
 void MayaBlendDesc::
 set_slider(float value) {
-  _deformer.setWeight(_weight_index, value);
+  MStatus status = _deformer.setWeight(_weight_index, value);
+  if (!status) {
+    mayaegg_cat.warning()
+      << "Unable to set slider " << get_name() << "\n";
+  }
 }
 
 ////////////////////////////////////////////////////////////////////