Hi, it's my first post here so if I did something wrong... sorry.
However, I need a script that will expand smart objects (to a group in the document containing them) and apply any transformations that where on the smart object originally.
If it could also apply the layer styles / do this automatically to every smart object in the document (not one by one) and / or expand recursively (I mean, if the smart object has smart objects nested in it and so on) it would be great (there aren't "must" because these are fairly easy to do manually. On the other hand, resizing / rotating / moving the group is much trouble )
I don't really know anything about Photoshop scripting, but it doesn't seem (to me) that this very hard to script (it doesn't involve any complex algorithms or anything).
If someone could help me with that I will be grateful!
Matan
Expanding Smart objects
-
Mike Hale
Expanding Smart objects
I think the biggest problem with doing something like this is a script can not determine what transform is applied to the smart object. At least I am not aware of a way to 'get' the transform values from a smart object. You can manually by looking at the options bar. A script can not.
There could be other problems as well such as bit depth, color mode or profile, the blend mode of the SO, smart filters, etc. If you want to convert a limited type of smart object those issues may not be a problem. But you still need to deal with the transform.
There could be other problems as well such as bit depth, color mode or profile, the blend mode of the SO, smart filters, etc. If you want to convert a limited type of smart object those issues may not be a problem. But you still need to deal with the transform.
-
matan129
Expanding Smart objects
Mike Hale wrote:I think the biggest problem with doing something like this is a script can not determine what transform is applied to the smart object. At least I am not aware of a way to 'get' the transform values from a smart object. You can manually by looking at the options bar. A script can not.
There could be other problems as well such as bit depth, color mode or profile, the blend mode of the SO, smart filters, etc. If you want to convert a limited type of smart object those issues may not be a problem. But you still need to deal with the transform.
So, it isn't possible to get the object's transformations? I've just read a bit about the DOM, isn't it accessible anyhow?
Thanks
There could be other problems as well such as bit depth, color mode or profile, the blend mode of the SO, smart filters, etc. If you want to convert a limited type of smart object those issues may not be a problem. But you still need to deal with the transform.
So, it isn't possible to get the object's transformations? I've just read a bit about the DOM, isn't it accessible anyhow?
Thanks
-
Mike Hale
Expanding Smart objects
matan129 wrote:So, it isn't possible to get the object's transformations? I've just read a bit about the DOM, isn't it accessible anyhow?
I have never found a way. Nor have I seen anyone else post a way. It may be possible, and I would be very happy if you come up with how to do it.
I have never found a way. Nor have I seen anyone else post a way. It may be possible, and I would be very happy if you come up with how to do it.
-
matan129
Expanding Smart objects
Mike Hale wrote:matan129 wrote:So, it isn't possible to get the object's transformations? I've just read a bit about the DOM, isn't it accessible anyhow?
I have never found a way. Nor have I seen anyone else post a way. It may be possible, and I would be very happy if you come up with how to do it.
Well, that's a bummer.
I've looked at the official scripting guide and found nothing :\
I have never found a way. Nor have I seen anyone else post a way. It may be possible, and I would be very happy if you come up with how to do it.
Well, that's a bummer.
I've looked at the official scripting guide and found nothing :\
-
Mike Hale
Expanding Smart objects
Yeah, if how to get the transform values of a smart object layer was in the scripting guides I would have told you to look there. In fact the scripting guide will not help much when working with smart object layers. Other than the common layer properties and methods you need to use Action Manger to work with smart object layers.
-
matan129
Expanding Smart objects
Mike Hale wrote:Yeah, if how to get the transform values of a smart object layer was in the scripting guides I would have told you to look there. In fact the scripting guide will not help much when working with smart object layers. Other than the common layer properties and methods you need to use Action Manger to work with smart object layers.
Yeah, thought so. Thanks for the quick replies by the way.
I've thought about it more and now it doesn't seem possible at all, especially because the extension will actually have to resize the strokes (and other effects like this), which isn't technically possible because (I don't think) it isn't possible to change the stroke value to non-integer number (it's always pixels). While you can do it approximately, it wouldn't be good enough in many cases which require more precision.
So, thanks again.
I think I'll stick with the smart objects and their drawbacks for now.
Yeah, thought so. Thanks for the quick replies by the way.
I've thought about it more and now it doesn't seem possible at all, especially because the extension will actually have to resize the strokes (and other effects like this), which isn't technically possible because (I don't think) it isn't possible to change the stroke value to non-integer number (it's always pixels). While you can do it approximately, it wouldn't be good enough in many cases which require more precision.
So, thanks again.
I think I'll stick with the smart objects and their drawbacks for now.