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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Get Deformed Cache Matrix / axis

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 429 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 06/08/2017 at 15:54, xxxxxxxx wrote:

      Hello,

      I am trying to figure out how to access the axis, global or local matrix of an object, after deformation, for example after it has been affected by an effector set to deformation: Object mode.

      Do effectors create a deformed cache when used in this mode? I seem to get a none type object when I try to access it..

      import c4d
        
      target = op[c4d.ID_USERDATA,1]
        
      def main() :
        
          print target
          
          DC = target.GetDeformCache()
        
          DCM = DC.GetMl()
        
          op.SetMl(DCM)
        
      
      

      I also tried to get the deformed cache using the recursion functions in a previous thread I posted about getting deformed points: thread

      But it again returns a none type object, which makes me question what the effector is doing when set to deform mode?

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

        On 07/08/2017 at 10:47, xxxxxxxx wrote:

        Hi,

        I'm having some difficulties understanding the question. Or rather the situation we are in?

        What has this user data parameter to do with the question? It's probably a link, but where is it pointing? An effector (like Random effector), a effected object (i.E. a cube) or something like a MoGraph cloner?

        Are we talking about MoGraph effector influencing objects directly (like the effector is grouped with a bunch of cubes) or are about a MoGraph effector influencing clones of a for example MoGraph cloner?

        In the first case the relevant cache is part of the effected object(s) themselves. In the later case it's part of the cloner. In any case you will need to traverse the cache as discussed in the other thread you already linked to, as the exact cache hierarchy is different depending for example on the input objects (if they are generators themselves, as for example a cube, or simple polygon objects,...).
        And in the MoGraph cloner case, you probably wouldn't even check the caches at all, but instead rather check the MoData.

        Do you have the option to compile the C++ SDK examples (cinema4dsdk)? The Active Object Dialog example contained in there would be really helpful for you to understand different cache situations.

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