- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I've got a scene with just a basic sphere ("pSphere1") in it, and I put 3 materials on it.
All that I am trying to do is to make a copy of the mesh under the same transform, using mel.
The duplicate and instance functions only work on transforms, i.e. not mesh shapes by themselves, so it seemed the most logical to create a duplicate, then reparent the mesh shape, and delete the copy transform.
I am doing this:
duplicate -name "copy" "pSphere1"; parent -s -r "copyShape" "pSphere1"; delete "copy";
If I do this and visualize the new mesh, it shows without materials (even though it appears to be connected in the hyper/node graph).
But oddly enough, if I first call:
duplicate -name "copy" "pSphere1";
And then as a separate call do:
parent -s -r "copyShape" "pSphere1"; delete "copy";
Then it all works fine.
It looks to me that if I call the `parent` right away, something about the `duplicate` might not have finished processing.
Not sure if this makes any sense?
Is there a way to force `parent` to be called only after duplicate is 100% finished? I tried pause -sec 3, but that didn't do the trick.
Maybe I am approaching this the wrong way and there is a much easier way to do this?
Maybe create a new mesh under the pSphere1 transform and copy all materials and attributes over? But that seems like a lot of work when duplicate takes care of all of this for me already.
Any help would be much appreciated.
Cheers,
Sebastian
Solved! Go to Solution.