cache multiple objects at once with cmds.cacheFile

255 views
Skip to first unread message

Kyle Burris

unread,
Jun 2, 2016, 5:10:56 PM6/2/16
to Python Programming for Autodesk Maya
I'm trying to geo cach a bunch of objects simultaneously with the cachFile command. Through the UI you can select multiple objects and run geometryCache -> exportCache and maya will go through the timeline once and write your cache according to your options. However in python the closest I can get is to use the points flag to cache a single object. I've tried digging through the mel scripts that the UI calls but I'm still stumped.


Any ideas?

Thanks,
Kyle

Kyle Burris

unread,
Jun 3, 2016, 11:04:47 AM6/3/16
to Python Programming for Autodesk Maya
It took a while but I managed to figure it out. You have to use the points flag for each object you want to cache, but since python doesn't support using a flag more than once I just ended up generating a mel command and pushed it through mel.eval(), This is essentially what the maya mel scripts are doing under the hood

Justin Israel

unread,
Jun 3, 2016, 3:59:50 PM6/3/16
to Python Programming for Autodesk Maya


On Sat, 4 Jun 2016 3:04 AM Kyle Burris <kyleb...@gmail.com> wrote:
It took a while but I managed to figure it out. You have to use the points flag for each object you want to cache, but since python doesn't support using a flag more than once I just ended up generating a mel command and pushed it through mel.eval(), This is essentially what the maya mel scripts are doing under the hood

If the Mel command accepts multiple points flags, have you tried passing the python version a list to the single flag? Just wondering if if they made it work like that or not. 



On Thursday, June 2, 2016 at 5:10:56 PM UTC-4, Kyle Burris wrote:
I'm trying to geo cach a bunch of objects simultaneously with the cachFile command. Through the UI you can select multiple objects and run geometryCache -> exportCache and maya will go through the timeline once and write your cache according to your options. However in python the closest I can get is to use the points flag to cache a single object. I've tried digging through the mel scripts that the UI calls but I'm still stumped.


Any ideas?

Thanks,
Kyle

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7e0b60de-453f-4142-8d2e-f9014ad04ba2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kyle Burris

unread,
Jun 6, 2016, 9:03:26 AM6/6/16
to Python Programming for Autodesk Maya
I don't think they did, but I scraped the mayaCache code and went with Alembic, much much easier


On Friday, June 3, 2016 at 3:59:50 PM UTC-4, Justin Israel wrote:


On Sat, 4 Jun 2016 3:04 AM Kyle Burris <kyleb...@gmail.com> wrote:
It took a while but I managed to figure it out. You have to use the points flag for each object you want to cache, but since python doesn't support using a flag more than once I just ended up generating a mel command and pushed it through mel.eval(), This is essentially what the maya mel scripts are doing under the hood

If the Mel command accepts multiple points flags, have you tried passing the python version a list to the single flag? Just wondering if if they made it work like that or not. 



On Thursday, June 2, 2016 at 5:10:56 PM UTC-4, Kyle Burris wrote:
I'm trying to geo cach a bunch of objects simultaneously with the cachFile command. Through the UI you can select multiple objects and run geometryCache -> exportCache and maya will go through the timeline once and write your cache according to your options. However in python the closest I can get is to use the points flag to cache a single object. I've tried digging through the mel scripts that the UI calls but I'm still stumped.


Any ideas?

Thanks,
Kyle

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages