Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I'm not one for bumping old threads, but this problem is really giving me a headache...
I'm having the same exact problem with copying groups from one document to another. It doesn't seem to matter if it's a top-level group or not; any group that gets copied over results in the copied art not showing up in the layer list and gives errors when trying to click on it.
If my source document looks like this:
Layer 1
<path 1_1>
<path 1_2>
Layer 2
<path 2_1>
If I DuplicateArt on the GetFirstArtOfLayer(Layer 1), Layer 1 gets copied into the new document, but it doesn't show up in the layer list and I get errors trying to click on any of the art.
If I iterate over the children/siblings of Layer 1 and duplicate them all separately, <path 1_1> and <path 1_2> will show up correctly in the new layer list and are clickable, but Layer 2 will not, and clicking on <path 2_1> results in the error.
At this point, the only solution I can think of is to recursively iterate over the source tree, manually creating the destination groups, and then copying the art work into them.
Very frustrating!
Copy link to clipboard
Copied
I had this same problem, and came up with a similar solution, except that you don't need to recreate all the groups. Recreate your layers in the new document (via sAILayers->NewLayer() (or whatever the function is....)), then iterate through and copy all the top-level art from each layer seems to be enough.
Copy link to clipboard
Copied
But the problem is when the top-level art is a group. Or when any of the children of the top-level art is a group. Duplicating groups is what seems to break it.