![]() ![]() i'll leave it in there just in case the thought process helps get a deeper understanding of the API. gradientStop is not going to be a sub property of groupItem, textFrame, placedItem, rasterItem etc. SCRIPT OBJECT OPACITY LENS STUDIO CODEIn the initial code i wrote for you, item could be any pageItem. we run into the same problem of "what kind of object is 'item'?" But theoretically the answer is yes, we could do that. I've never actually done any coding with gradients or gradientStops myself. These tasks should be treated separately. If we do that, then it breaks the function i already wrote for you because then the opacities of the child elements will be changed also, instead of only changing the parent group's opacity. So in order to access the tint property of each sub item, we need to build a recursive loop to dig into the groupItem and find all of it's child elements until we access all of the pathItems. SCRIPT OBJECT OPACITY LENS STUDIO UPDATEWe cannot use the same function to also update the tint, because "tint" is not a property of groupItem. The function i wrote for you earlier would update the opacity of "Main Group" as a whole, but it would ignore all of the subItems. PathItem (opacity: 25%) (fill color: My Third Spot Color) (tint: 100) PathItem (opacity: 100%) (fill color: My Other Spot Color) (tint: 75) GroupItem (opacity: 75%) (fill color: not applicable) (tint: not applicable PathItem (opacity: 100%) (fill color: My Spot Color) (tint: 50) Main Group (opacity: 50%) (fill color: not applicable) (tint: not applicable) because they will have to be set differently. but what i'm trying to say is that it's probably not realistic to implement the tint portion of this into the same code for the opacity. Item.opacity = opacityRelationships įor(var x=0,len = layers.length x ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |