diff --git a/pandatool/src/converter/animationConvert.cxx b/pandatool/src/converter/animationConvert.cxx index 8ef6451efd..cbadad5242 100644 --- a/pandatool/src/converter/animationConvert.cxx +++ b/pandatool/src/converter/animationConvert.cxx @@ -34,6 +34,9 @@ format_animation_convert(AnimationConvert convert) { case AC_none: return "none"; + case AC_pose: + return "pose"; + case AC_flip: return "flip"; } @@ -61,6 +64,9 @@ string_animation_convert(const string &str) { if (cmp_nocase(str, "none") == 0) { return AC_none; + } else if (cmp_nocase(str, "pose") == 0) { + return AC_pose; + } else if (cmp_nocase(str, "flip") == 0) { return AC_flip; diff --git a/pandatool/src/converter/animationConvert.h b/pandatool/src/converter/animationConvert.h index 532f0798e7..37d446d32d 100644 --- a/pandatool/src/converter/animationConvert.h +++ b/pandatool/src/converter/animationConvert.h @@ -30,6 +30,7 @@ enum AnimationConvert { AC_invalid, AC_none, + AC_pose, AC_flip, }; diff --git a/pandatool/src/eggbase/somethingToEgg.cxx b/pandatool/src/eggbase/somethingToEgg.cxx index 13aa83642b..dbede37b87 100644 --- a/pandatool/src/eggbase/somethingToEgg.cxx +++ b/pandatool/src/eggbase/somethingToEgg.cxx @@ -107,7 +107,7 @@ add_animation_options() { ("a", "animation-mode", 40, "Specifies how animation from the " + _format_name + " file is " "converted to egg, if at all. At present, the following keywords " - "are supported: none and flip.", + "are supported: none, pose, or flip.", &SomethingToEgg::dispatch_animation_convert, NULL, &_animation_convert); add_option diff --git a/pandatool/src/mayaegg/mayaToEggConverter.cxx b/pandatool/src/mayaegg/mayaToEggConverter.cxx index d3f5a35b3e..7846f33b64 100644 --- a/pandatool/src/mayaegg/mayaToEggConverter.cxx +++ b/pandatool/src/mayaegg/mayaToEggConverter.cxx @@ -215,11 +215,20 @@ convert_maya() { bool all_ok = true; switch (get_animation_convert()) { + case AC_pose: + // pose: set to a specific frame, then get out the static geometry. + nout << "frame " << start_frame << "\n"; + MGlobal::viewFrame(MTime(start_frame, MTime::uiUnit())); + // fall through + case AC_none: + // none: just get out a static model, no animation. all_ok = convert_hierarchy(&get_egg_data()); break; case AC_flip: + // flip: get out a series of static models, one per frame, under a + // sequence node. all_ok = convert_flip(start_frame, end_frame, frame_inc, output_frame_rate); break;