Solved Prevent GetClone() to copy the tags attached on the object?


I'm trying to duplicate objects using the GetClone(c4d.COPYFLAGS_NO_HIERARCHY | c4d.COPYFLAGS_NO_BITS) line. However, when I do so, it also copies the tags attached to the object.

Is there a way to copy only the objects and not the tags?

Thank you for looking at the problem.

HI Bentraje, thanks for reaching out us.

With regard to your request, I'd like to share few considerations:

  • tags can store relevant information for the scene (whether they are visible or invisible)
  • tags can be hidden and avoiding copy of visible ones will also prevent the hidden ones to be copied

Because of the above considerations, cloning an object without its tags can be risky and lead to unpredictable results.

That said you can attempt to delivery a clone without tags by using the COPYFLAGS::PRIVATE_NO_TAGS but aside from this non-officially supported approach, disclosing your final intent might be more helpful.
Can't you consider for example to clone everything and then to remove those tags you know that to your scope are useless?

Best, Riccardo

Thanks for the @r_gigante response.
I'll stay away from the non-official method. Is this the reason why COPYFLAGS::PRIVATE_NO_TAGS is not included in the Python documentation of the GetClone() method?

I'll use the clone everything then remove tags methodology instead.