Browse Source

explicit test for parallelBlender

David Rose 21 years ago
parent
commit
4750d1f1d4

+ 13 - 1
pandatool/src/mayaegg/mayaNodeDesc.cxx

@@ -378,7 +378,19 @@ check_blend_shapes(const MFnDagNode &node, const string &attrib_name) {
         status.perror("MFnBlendShapeDeformer constructor");
 
       } else {
-        if (_tree->ignore_slider(blends.name().asChar())) {
+        // Check if the slider is a "parallel blender", which is a
+        // construct created by Maya for Maya's internal purposes
+        // only.  We don't want to fiddle with the parallel blenders.
+        MPlug plug = blends.findPlug("pb");
+	bool is_parallel_blender;
+	status = plug.getValue(is_parallel_blender);
+        if (!status) {
+          status.perror("Could not get value of pb plug.");
+          is_parallel_blender = false;
+        }
+
+        if (is_parallel_blender || 
+            _tree->ignore_slider(blends.name().asChar())) {
           _tree->report_ignored_slider(blends.name().asChar());
 
         } else {

+ 0 - 11
pandatool/src/mayaegg/mayaToEggConverter.cxx

@@ -93,17 +93,6 @@ MayaToEggConverter(const string &program_name) :
 
   _from_selection = false;
 
-  // By default, we ignore any sliders whose name begins with
-  // "parallelBlender".  This is because sliders of this name are
-  // created automatically by the parallel blend system, and while
-  // they do not directly control the geometry, they are often
-  // inadvertently linked to the sliders that do (so that, for
-  // instance, dialing them down to zero will also dial down the
-  // effect of the true sliders to zero).  We don't want to monkey
-  // with them.  The user can change this list with the -ignore-slider
-  // command-line option to maya2egg.
-  _ignore_sliders.push_back(GlobPattern("parallelBlender*"));
-
   _polygon_output = false;
   _polygon_tolerance = 0.01;
   _respect_maya_double_sided = maya_default_double_sided;

+ 3 - 7
pandatool/src/mayaprogs/mayaToEgg.cxx

@@ -97,14 +97,10 @@ MayaToEgg() :
   add_option
     ("ignore-slider", "name", 0,
      "Specifies the name of a slider (blend shape deformer) that maya2egg "
-     "should not process.  The slider will not be adjusted and it will not "
-     "become a part of the animation.  Since maya2egg will normally reset "
-     "all slider values to 0 before converting an animated character, this "
-     "option may be necessary in order to tell maya2egg to ignore sliders "
-     "for which doing this may cause an undesired side effect.  This "
+     "should not process.  The slider will not be touched during conversion "
+     "and it will not become a part of the animation.  This "
      "parameter may including globbing characters, and it may be repeated "
-     "as needed.  If the parameter does not appear at all, the default is "
-     "to ignore sliders named 'parallelBlender*'.",
+     "as needed.",
      &MayaToEgg::dispatch_vector_string, NULL, &_ignore_sliders);
 
   add_option