Copying individual models to new documents
-
On 17/01/2014 at 11:27, xxxxxxxx wrote:
I tried reducing my project to one model in the object manager and then the script works. Why would it work with one item but not more than one?
-
On 17/01/2014 at 11:40, xxxxxxxx wrote:
You should remove the object from the old document before inserting it into the new one.
-
On 17/01/2014 at 11:44, xxxxxxxx wrote:
I'll give that a try.
Is there a way to make a copy of the object rather than using the original? I would prefer not to alter the original project if possible.
-
On 17/01/2014 at 11:53, xxxxxxxx wrote:
BaseList2D.GetClone(), see the API reference
-
On 17/01/2014 at 11:59, xxxxxxxx wrote:
I appreciate your help but I was unable to find that function in the sdk documentation. I looked in the BaseList2D section and came up with nothing so I tried using the search feature and it couldn't be found. May I ask where did you find it?
thanks again for your help.
-
On 17/01/2014 at 12:10, xxxxxxxx wrote:
My fault, sorry.
It's in the C4DAtom class.Best,
-Niklas -
On 17/01/2014 at 12:12, xxxxxxxx wrote:
I had seen that one but I'm a little fuzzy on the Atom class. I'll see what I can figure out.
I tried removing the object like you suggested and the script is now functioning. If I can't get the cloning aspect to work I'll at least have something working even if it isn't ideal.
Thank you.
-
On 17/01/2014 at 12:16, xxxxxxxx wrote:
You would not even need to look up the function, just give it a try already.
>
> import c4d
>
> def main() :
> for op in doc.GetObjects() :
> newDoc = c4d.documents.BaseDocument()
> newDoc.SetDocumentName(op.GetName())
> c4d.documents.InsertBaseDocument(newDoc)
> newDoc.InsertObject(op.GetClone())
>
> main() -
On 17/01/2014 at 12:27, xxxxxxxx wrote:
Niklas - that is sooooo much more streamlined than what I have right now. I hope to be as skilled with this at some point. I was on the right path but I'm using more variables instead of just putting the methods right into the functions.
If I understand this correctly I can use functions from higher up in the hierarchy and apply them to the lower class object as if it were documented that way? (as if the clone command was listed down the hierarchy with the rest of the object commands)
Can we use our MSA training for Python?
-
On 17/01/2014 at 14:19, xxxxxxxx wrote:
Everything is working from the model standpoint but the textures don't follow. I've created a script that identifies which of the objects tags are textures and then gets the associated material and transfers it to the new project but the texture tags still come up with question marks in them for missing textures. Am I missing something or do I need to continue scripting to associate the material with the texture again?