From 052c5500a65a01a75b834c9847d53c3f22c1549f Mon Sep 17 00:00:00 2001 From: redpawfx Date: Mon, 8 Oct 2012 11:34:38 -0700 Subject: [PATCH] quick fix for issue #16 stopped hard-coding 24fps and computed it from the settings in the session. --- contrib/partio4Maya/partio4MayaShared.cpp | 3 ++- contrib/partio4Maya/partio4MayaShared.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/partio4Maya/partio4MayaShared.cpp b/contrib/partio4Maya/partio4MayaShared.cpp index 99b3919f..9ffbe587 100644 --- a/contrib/partio4Maya/partio4MayaShared.cpp +++ b/contrib/partio4Maya/partio4MayaShared.cpp @@ -219,6 +219,7 @@ void partio4Maya::updateFileName (MString cacheFile, MString cacheDir, ) { formatExt = setExt(cacheFormat); + int fps = (float)(MTime(1.0, MTime::kSeconds).asUnits(MTime::uiUnit())); MStringArray fileParts = partioGetBaseFileName(cacheFile); @@ -244,7 +245,7 @@ void partio4Maya::updateFileName (MString cacheFile, MString cacheDir, // special case for PDCs and maya nCache files because of the funky naming convention TODO: support substepped/retiming caches if (formatExt == "pdc") { - cacheFrame *= (int)(6000 / 24); + cacheFrame *= (int)(6000 / fps); cachePadding = 1; } diff --git a/contrib/partio4Maya/partio4MayaShared.h b/contrib/partio4Maya/partio4MayaShared.h index fe39a4ed..eea9011b 100644 --- a/contrib/partio4Maya/partio4MayaShared.h +++ b/contrib/partio4Maya/partio4MayaShared.h @@ -64,6 +64,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. #include #include #include +#include #include "iconArrays.h" #include "Partio.h"