Jump to content
MikeA

Duplicate without children?

Recommended Posts

R21...

Currently I'm doing a lot of work with complex models - scenes with lots of nested hierarchies and 1,000's of objects.  Working on these jobs has raised an old issue:

 

I want to duplicate (copy) an object somewhere in a hierarchy - without it's children!

 

Yes - I can delete the children afterwards, but when dealing with complex hierarchies that can mean 10, 20 ... 100 objects added temporarily to my OM, and it's too easy to loose track and delete the wrong stuff...

 

I just want to copy the single selected object - and paste it where I want.

 

Is there any solution I've missed?

 

 

Share this post


Link to post

hmm... I know of a Delete without Children command, but actually I haven't seen a Copy without children.

But since I haven't smuggled an ad for my Patreon into a post for a while, here's a script that duplicates the currently selected object and inserts the copy directly behind the original:

import c4d
from c4d import gui

def main():
    if op == None: return
    theClone = op.GetClone(c4d.COPYFLAGS_NO_HIERARCHY)
    theClone.InsertAfter(op)
    c4d.EventAdd()

if __name__=='__main__':
    main()

(Now waiting for someone to explain that there is such a copy already... 😎)

 

----------
Learn more about Python for C4D scripting:
https://www.patreon.com/cairyn

 

Share this post


Link to post

There's the 7 key you can hold down to move stuff independently of its kids of course, but not one for direct copy AFAIK...

 

CBR

Share this post


Link to post
  • Topic Author
  • Author of the topic Posted

    Thanks guys. Yep - very familiar with the 7 key etc...  although "7" has always seemed a wierdly random choice : )

     

    My next question was going to be... is this scriptable?  But I was wonderfully pre-empted. Thank you Cairyn. That little script is in use already and will be very helpful : )

     

    So, as testimonials are an excellent form of advertising, let me say that if you're interested in learning Python for C4D use, Cairyn's course via Patreon is top quality and very highly recommended. I am a student - although somewhat behind on my homework : )
     

    I very much doubt you'd find anything else even remotely comparable. Subscribe today!  : )

    Share this post


    Link to post
    2 hours ago, MikeA said:

    So, as testimonials are an excellent form of advertising, let me say that if you're interested in learning Python for C4D use, Cairyn's course via Patreon is top quality and very highly recommended. I am a student - although somewhat behind on my homework : )

     

     

    I very much doubt you'd find anything else even remotely comparable. Subscribe today!  : )

     

    I agree with your words,  Cairyn´s community support is invaluable 👍

    Share this post


    Link to post

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...

    FORUMS INFO:

    Dear members, we are aware of few more bugs that are still present withing the theme.We just wanted to let you know that we are working to fix them as soon as possible.
     

    NEW MEMBERS:

    Please be aware that we are manually approving all new registrations, due to spam prevention. Please be patient in case you cannot login right away, we will approve you within 12h or less if we decide you are not potential spammer. 

     

    Thanks for understanding! :cowboypistol: