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

    Python - Insert as Parent

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 181 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 16/11/2012 at 05:16, xxxxxxxx wrote:

      I have an object I want to extrude.
      So I create an Extrude Nurbs object and then insert it with doc.InsertObject(extrudeobj)

      But how to insert it as parent of the selected object?
      adding parent=tobject is not correct, because it is then inserted as a child instead as a parent.

      In fact I want to simulate the ALT + Extrude Nurbs command
      Clicking the Extrude Nurbs command while pressing down the ALT key on the keyboard.

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 16/11/2012 at 05:50, xxxxxxxx wrote:

        Whew pim,
        If you're working on the job that I think you're working on, there's still quite a bit of ground to cover.

        Just do it "manually" :

        def extrudeSpline(spline) :  
          extrude = c4d.BaseObject(c4d.Oextrude)  
          extrude.InsertAfter(spline)  
          spline.Remove()  
          spline.InsertUnder(extrude)
        

        cheers,
        d

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