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

    Return a Disconnected version of source object

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 232 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 22/05/2014 at 04:32, xxxxxxxx wrote:

      Hi,

      Could some one please help with this as I'm struggling to find examples, or more so, have found other examples but am trying to reverse engineer them to work for this situation. I have a Python Generator with the code below. I am aiming to take the child of the generator and then return a copy of it in its disconnected state. Is that possible?

      Also would this be possible with a python tag alone and not a generator at all?

      import c4d
      from c4d import utils as u
       
      def main() :
          obj = op.GetDown()
        
          if not obj: return
          source = obj.GetClone()
        
          bc = c4d.BaseContainer()
          bc.SetData(c4d.MDATA_DISCONNECT_PRESERVEGROUPS, False)
          u.SendModelingCommand(
              c4d.MCOMMAND_DISCONNECT,
              [source],
              c4d.MODELINGCOMMANDMODE_ALL,
              bc)
          return source
      

      Thanks

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

        On 27/05/2014 at 09:28, xxxxxxxx wrote:

        Has no one had experience with this?
        Any pointers would be a great help as I'm still stuck on this.

        Thanks

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

          On 28/05/2014 at 01:34, xxxxxxxx wrote:

          You didn't describe the problem at all. And no, it's not possible from a Python Tag.
          But a deformer plugin might be more fitting for this situation.

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