Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Beware The Double Effect with Object Styles

As you may have heard in Episode 69, when we interviewed Deke McClelland, he described an InDesign problem he had experienced involving applying object styles to a group of objects. After we stopped recording, I discovered what the problem may have been, and to my eye it looks like a bug in InDesign that people need to watch out for.

Here’s the setup: Create some lines, some of which may overlap. The lines cover some dark areas, so we want to surround them with “light” to make them more visible. The solution Deke came up with was to use Outer Glow. This is pretty clever; in the past I’ve always made this effect by using a custom stroke style, based on a tip that Sandee Cohen showed years ago.

Anyway, here’s how it looks with just two lines, pre-glow:

stylebug1

Now, here’s the effect after the glow has been applied to each line in the Effects panel:

stylebug2

This is ugly because one glow “overlaps” the other line, so it looks like one goes under the other. Well, maybe it’s the effect that you’d want, but it’s not the effect that he was looking for. The solution, of course, is to group the lines first, and then apply the effect to the group:

stylebug3

That’s perfect (for his needs). But when he made an object style and applied that to the next group of lines, he had an unexpected surprise:

stylebug4

As my 4-year old is fond of saying: “What the heck?”

As far as I can tell, if you select a group of objects and apply an object style that includes transparency effects, InDesign applies those effects twice! Once to each individual object, and again to the group. So the effect is double-strong and, in this case, defeats the whole purpose. That’s what seems like a bug to me.

The solution is simple (though annoying): Select the individual lines with the Direct Selection tool and choose Clear Effects from the Effects panel’s flyout menu.

stylebug6

Any other suggested workarounds for this problem? Perhaps Adobe can get it fixed in CS4. Or perhaps someone can explain why it actually makes sense.

David Blatner

David Blatner

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at Lynda.com are among the most watched InDesign training in the world. You can find more about David at 63p.com.
David Blatner

Latest posts by David Blatner (see all)

  • - November 30, -0001
Related Articles
Comments

20 Comments on “Beware The Double Effect with Object Styles

  1. Well Ill be.. I can not find a workaround. I even see the glow again over the underlying line when I try this. It seems that indeed the effect is applied twice: to the group and the individual lines.
    I would call this a bug…

  2. I’ve been running into a variation of this issue with text wraps in groups. It can be a very annoying problem.

    The current implementation of object styles in InDesign CS3 doesn’t allow for objects inside a group to have their own object styles unless you apply those objects styles AFTER applying an object style to a group.

    Big PITA. Thanks to my scripting skills, I’ve been able to work my way out of this paper bag, but it shouldn’t be necessary to be a scripter to work with this feature.

    I think it comes down to this: when you apply an object style to a group, there are all kinds of possible ways you might want to have that style interact with the items inside the group, but InDesign offers little or no choice.

    Dave

  3. Greetings, everyone,

    I’ve made a compound path o the objects and then applied the outer glow.

    I guess it looks better

    William

  4. Carlos (or William?), you’re brilliant! I can’t believe I didn’t think of that. Yes, in this case, making it a compound object (instead of grouping) works great.

    By the way, I just got a reply from someone at Adobe who explained why this behavior is actually not a bug, but is as designed. He has some very good points. I will try to distill it later. But he also understands that it is undesirable behavior.

  5. Ah Carlos beat me to it! (Not that I had found a solution)

    I was off in a friends house making plans to go to Madrid in April.

    I was going to look at it in more detail when I got home, I brought a work-laptop home with me. I guess I don’t have to spend time looking at this problem now.

    Although I did get Peter Karhel (sp.) GREP book, so I still have stuff to do.

    Well done Carlos William.

  6. Thanks, Dave! I’m amazed not just that you wrote this, but that all the code apparently shows up properly!

  7. As the fates would decree, I just ran into the text wraps inside a group problem again, so I wrote this script:

    //DESCRIPTION: Turn-off text-wrap inside selected group

    if (app.documents.length > 0 &&
    app.selection.length > 0 &&
    app.selection[0] instanceof Group) {
    turnOffTextWrapInsideGroup(app.selection[0]);
    }

    function turnOffTextWrapInsideGroup(group) {
    var myObjs = group.allPageItems;
    for (var j = myObjs.length – 1; j >= 0; j--) {
    myObjs[j].textWrapPreferences.textWrapType = TextWrapTypes.none;
    }
    }

  8. Open ExtendScript Toolkit (in the Utilities/Adobe Utilities folder). Make a new script document. Paste the script into it. Save it with a name like “TurnOffWrapInsideSelectedGroup.jsx” in a folder in the appropriate place. It depends on which version of InDesign where you should put it:

    CS2: In the Scripts folder in the Presets folder of the Application.

    CS3: In the Scripts Panel folder in the Scripts folder of the Version 5.0 folder of the Adobe InDesign folder in Preferences.

    Then select a group that has items inside it that have text wrap and double-click the script’s name in the Scripts palette/panel.

    Note the the script doesn’t affect the wrap of the group itself, only the items inside the group.

    Dave

  9. In responding to the procedure of Carlos William I select my pairs of lines but the Compound path command is greyed out. I use CS3 and I think I have had this issue before of not having Compound Paths command available. Is this a glitch or can you please tell me how to take the lines (drawn with pen and a small shape added to one end of each and grouped) and make them compound paths.

  10. Gary, don’t group after making your lines or graphic. Just select all lines and then make compound path. Or, if you do have it grouped, use the direct selection tool.

  11. Sorry to extend teh list of help requests, but we ran into the same issue recently with groups of picture frames and an object style involving drop shadows in CS2.
    Since I can’t see the compound objects tip working in that case, does anyone have a suggestion?
    We’ve been working on it with the direct selection tool, but since pictures are invloved, it can sometimes be hard to grab the container and not the linked graphic.
    Any help would be much appreciated.

  12. Bret,

    Thanks, I think you are right but I had tried again last night and it worked. I will remember your advice though in case I have this issue again.

  13. I came to the forum tonight to post a query about a problem, and I think it’s the same issue. If I open our company’s logo in Illustrator, I can then copy and paste it into an InDesign doc. Then I can apply white or our corporate color to it depending on the background image I’m overlaying it on. If I apply an Object Style like a dropshadow, each individual grouped element (letters) gets the shadow, but shadows from some letters overlap other letters. This has been bugging me for some time. I just discovered through experimentation that if I apply no object style but apply the shadow via the dropshadow dialog box, it works fine. I just can’t automate the effect using object styles. I’m not sure if this issue is relevant or related to the discussion here. I’m wondering if I ungroup the Illustrator logo and make it a compound path if it will behave properly when using Object Styles.

  14. I ungrouped Illustrator logo object and made it a compound path. The Object Style applied nicely but the overlapping corners of a few letters reversed to white. Not good. I think I’ll just place logo as a TIFF or PSD or somesuch. I think this qualifies as a bug.

  15. Wondering if this has been fixed. I duplicated the above example and the allegedly observed behaviour, was unobserved. No double effect. Also, in case my eyes could not detect the double-effect (even at high mag/zoom) I used the Direct Selection Tool (the white arrow as Deke calls it) on both grouped and ungrouped lines and no doubles at all. Well, we’ve been through several updates since January, so maybe it is fixed.

  16. Okay, so, I’ve deleted pages, started with blank text boxes with no layers and yet when I try to type in the new text box and hit the return key to go to the next line it jumps to the very bottom of the box. What setting has been changed that is making the return this large of a space?

Leave a Reply

Your email address will not be published. Required fields are marked *