accessing the Bake buttons on the mograph cache ta

On 02/10/2013 at 00:37, xxxxxxxx wrote:

Hi.

Is there any way to access the Bake, Clear Cache, and other buttons for the MoGraph Cache tag? I see that the other parameters are exposed, but not the buttons.

I also see the tool c4d.CallButton( op , id ), but I am not sure how to find the id of the buttons.

I'd appreciate any suggestions to point me in the right direction.

Thanks.
_<_dt id="c4d.call"_>_[](file:///Users/robertcaldwell/Downloads/CINEMA4DR15037PYTHONSDKHTML20130823/help/modules/c4d/index.html#c4d.CallButton)

On 02/10/2013 at 00:59, xxxxxxxx wrote:

I found the information. Thanks.

Here is a link:

http://c4dconnect.com/Description/Node?containerName=Tmograph_cache

And here is sample code:

import c4d
from c4d import gui
#Welcome to the world of Python
  
  
def main() :
    obj = doc.SearchObject("Cloner")
    tag = obj.GetFirstTag()
    c4d.CallButton(tag,c4d.MGCACHETAG_BAKESEQUENCE)
    c4d.CallButton(tag,c4d.MGCACHETAG_CLEARCACHE)
if __name__=='__main__':
    main()