Insert scene under object
-
Hello guys! I know how to merge a scene with a current project. But i have no idea how to insert scene under parent with coordinats of this parent.
I want to create custom nulls thats why i want to it. What should i add in this code if i want insert scene under object?
import c4d def main(): doc.StartUndo() # Start recording undos path = "C:\Users\Jamaletdinov.r\Desktop\ArrowR.c4d" flags = c4d.SCENEFILTER_OBJECTS | c4d.SCENEFILTER_MATERIALS | c4d.SCENEFILTER_MERGESCENE c4d.documents.MergeDocument(doc, path, flags) c4d.EventAdd() doc.EndUndo() if __name__=='__main__': main()
-
Hi,
There's no direct way of doing that. I see two possibilities:
- Create an Xref as a child of the object, define the imported document as the document for the xref, make the xref editable.
- Open your document and clone all objects one by one. You could end up with lofs of issues if the document has a lot of links. (material, effectors etc etc)
The problem is, as you can see on this thread, that some parameters of the xref are not accessible with python.
The problem with links can be handle with AliasTrans.Cheers,
Manuel -
- Set active scene first object to, for example, variable MyFirstObject.
- Merge another scene to active document. All new objects will be pasted on the top of all in hierarchy.
- Put all objects before MyFirstObject to null.
- Place the null where you need.
-
-
Mike, thank you a lot!