Trouble creating mograph cache tag
-
On 18/04/2014 at 06:59, xxxxxxxx wrote:
I'm able to create other tags on my object but when I try to call the mograph cache tag I get:
""module" object has no attribute 'Tmograph_cache'"
I'm calling it onto either a cloner or matrix object in a python node in xpresso with object.MakeTag(c4d.Tmograph_cache)
any help? -
On 21/04/2014 at 08:57, xxxxxxxx wrote:
I also could not find the correct Tag id, but using GetTags(), I found that the following inserts a Mograph Cache Tag: obj.MakeTag(1019337)
import c4d from c4d import gui def main() : obj = doc.GetActiveObject() obj.MakeTag(1019337) print obj.GetTags() c4d.EventAdd() print obj if __name__=='__main__': main()
-
On 21/04/2014 at 13:51, xxxxxxxx wrote:
Using the ID worked great Pim, Thanks! The only other issue i'm running into is that you can't seem to call a button from a python node in xpresso. I'm sort of getting that it isn't even possible, is that true?
-
On 22/04/2014 at 09:46, xxxxxxxx wrote:
In this case use the callcommand to "call" a button
You can find the correct id in mograph_cache.h file or on this great website: http://c4dconnect.com/Description/Node?containerName=Tmograph_cache
See also the examples.
_<_o:_<_o:p_>_o:p>obj = doc.SearchObject("C\_<\_o:\_<\_o:p\_>\_ tag = obj\_<\_o:\_<\_o:p\_>\_stTag() c4d.CallButton(tag,c4d.MGC\_<\_o:\_<\_o:p\_>\__BAKESEQUENCE) c4d.CallButton(tag,c4d.MGCACHETAG_CLEARCACHE)\_le="font-size: 5pt;">
-
On 22/04/2014 at 10:07, xxxxxxxx wrote:
yep this is what i used, but inside a python node in xpresso it gives you an "Illegal operation. Invalid cross-thread call." error. Which makes me think you cant call buttons inside a python node.
-
On 22/04/2014 at 11:44, xxxxxxxx wrote:
Sorry, I forgot you are using xpresso.
Indeed this is not possible in xpresso.You better switch to python plugins(?).
-
On 22/04/2014 at 12:38, xxxxxxxx wrote:
Unfortunately plugin not an option for the tool I'm making. The mograph cache was just going to be a nice addition inside the setup, but definitely not necessary. Thanks for all the help though!