Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Bug or feature? Cannot copy layer definition...

Guide ,
Aug 28, 2023 Aug 28, 2023

...per drag 'n drop to another document. Is this normal?

 

Hello!

I'm used to copy layers in Photoshop like this, because that's the only way. An alternative would be to load layers from another document, but guess what - not possible. I mean, you can load styles and everything similar from other documents, why not layers? 

TOPICS
Type
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 29, 2023 Aug 29, 2023

I think you should know which objects are on normal pages and which one on Masters? 

 

But yes, if you are looking for some unspecified object - it can be a pain. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 29, 2023 Aug 29, 2023

We are talking past each other. Two situations:

a) I want to copy an object in order to copy the layer. I don't know where in my (worst case document with 500+ pages) the object is placed. I cannot filter the search to look on specific layers. I can search for object, but not for just the object itself. I made a test: blank INDD, created an oval shape, unselect. Then Find&Replace, set to "Object" and "Find next". It couldn't find the one object. What I can do: I can select a layer, press Ctrl+c and then Ctrl+v on the other document and it would copy the first object of that layer and the layer. I had hoped it would copy all objects.

b) I only want to copy one, or let's say, 50 layer definitions at once, just the definitions, not the layer objects. Not possible or only by scripting (not tested yet). I can select multiple layers or objects in the layers pane, but there it ends.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 29, 2023 Aug 29, 2023
quote

a) I want to copy an object in order to copy the layer. 


By @Doc Maik

 

Again - if you want to copy layer's definition - you can copy any object located on any page - that is located on this layer - so for this, you can create, new, temporary object.

 

If you don't mind copying all layers - it would probably work if you drag&drop any page - but if you need only specific layers - then only scripting.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 29, 2023 Aug 29, 2023
quote

Again - if you want to copy layer's definition - you can copy any object located on any page - that is located on this layer - so for this, you can create, new, temporary object.

By @Robert at ID-Tasker

 

Yes, but only this way. If you have 20 layers, you would have to create, assign, copy, change assignment, copy and that 19 times. Who would do that? In the target you would then have the 20 layers, but also 20 temporary objects.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 29, 2023 Aug 29, 2023

It's not as hard as you think. You can use Alt when dragging object between layers to make a copy. 

 

But yes, it's more complicated than it should be. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 29, 2023 Aug 29, 2023
LATEST

What I didn't know until a few minutes ago, though working with ID for over 10 years now: the objects in a layer are shown page specific

 

Right, that’s the difference between ID and PS, and probably the reason you won’t see a drag and drop feature.

 

If you have 20 layers, you would have to create, assign, copy, change assignment, copy and that 19 times.

 

Given that it’s unlikely to be added as a feature, scripting is the only option to do it in one move. This would loop through the source document’s layers and replicate them as empty layers in the document behind if the layer’s visibility is turned on:

 

var bd = app.documents[1]
var lyr = app.activeDocument.layers.everyItem().getElements();
var lc;
for (var i = lyr.length-1; i > -1; i--){
    if (lyr[i].visible) {
        lc = makeLayer(bd, lyr[i].name);
        lc.layerColor = lyr[i].layerColor
    } 
};   

function makeLayer(d, n){
    if (d.layers.itemByName(n).isValid) {
        return d.layers.itemByName(n);
    } else {
        return d.layers.add({name:n});
    }
}

 

Front:

Screen Shot 30.png

 

Back after run:

 

Screen Shot 32.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2023 Aug 28, 2023

You really don't need to convince us that it would be useful for you - no one is arguing with you about that... 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2023 Aug 28, 2023

If you work on a PC - you can use free version of my ID-Tasker - to do exactly that - maybe not like with ChatGPT, where you can type your request - but quickly enough. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2023 Aug 28, 2023

@Doc Maik said: "… I know all the things you suggest but they a) require to have an object and b) that object must be assigned to the layer definition and c) I would have to remove the object afterwards."

 

Hi @Doc Maik ,

exactly. You nailed it.

One could script this. And this is the only way to be as accurate as possible in regards of the copied layer's features:

 

ignoreWrap
label
layerColor
lockGuides
locked
name
printable
showGuides
visible

 

In principle this little script can do it when two documents are open and the source document is the front most, the active document and the layer in question is the active layer:

 

 

var sourceLayer = app.documents[0].activeLayer;
var targetLayer = app.documents[1].layers.add();
targetLayer.properties = sourceLayer.properties;

 

 

Note 1: Synching layers is not an option with the InDesign book features.

You could enforce this with synching parent pages if there are objects assigned to all layers, but the issue with this is the stacking order in the synched documents…

 

Note 2: If you copy/paste an object from document to document and the option is enabled, that the object's layer should remain after pasting, still some properties of the new layer you'll see in the target document could be changed. E.g. the color of the layer, that the layer is not printable (suddenly it is) etc.pp.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2023 Aug 28, 2023

@Doc Maik said:

"Guys, please, it's about the layer definition, not an object. In PS the layer definition is also not a bunch of pixels. I know all the things you suggest but they a) require to have an object and b) that object must be assigned to the layer definition and c) I would have to remove the object afterwards."

 

Hi @Doc Maik ,

see my post where it is all about layer definition.

And layer definitions that you cannot transport with a copy/paste command!

Read into my reply here that I did some hours ago:

 

https://community.adobe.com/t5/indesign-discussions/bug-or-feature-cannot-copy-layer-definition/m-p/...

 

The one definition of a given target layer in a target document that is missing there is the "stacking order" after the layer was added with that little script. And we could add features to the script like that the script first will check if a layer with that name already exists etc.pp. and act upon that; e.g. it will modify the target layer's feature to the one from the source document.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 29, 2023 Aug 29, 2023

@Doc Maik said: "… What I didn't know until a few minutes ago, though working with ID for over 10 years now: the objects in a layer are shown page specific. "

 

Hi @Doc Maik ,

no, the objects in a layer are not shown "page specific".

They are shown spread specific.

All the pages of a spread plus the pasteboard around the pages of that active spread.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 29, 2023 Aug 29, 2023

DocMaik_2-1693301521206.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 29, 2023 Aug 29, 2023

@Doc Maik said: "… In case I actually wanted to copy the object, the search starts."

 

Absolutely not.

Open the Layers panel. Make the layer you want to "copy over" the active one. Draw out e.g. a new rectangle and cut/paste that to your target document. Before make sure that option Paste Remembers Layers is turned on in the Layers panel.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines