Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Trouble creating mograph cache tag

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 554 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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()
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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;">
            
            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                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(?).

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

                  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!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post