dode74 Posted March 17, 2014 Share Posted March 17, 2014 I'm wondering if there is a way to export the positions of objects. I realise this is a slightly odd ask but I thought I'd check Basically I'm building a .dds file made of multiple images which will be referenced in an xml file. The format of the reference is to give x & y of the top left corner and the width and height of the object, thereby creating a map which specific graphics can be pulled from. While I know the data I want is given in the status bar and it can be done manually using the magic wand there are a lot of graphics involved, and I'm wondering if such data for individual layers (i.e. where the top-left of the top-leftmost object within a layer are and what the widths/height are) is exportable in some manner. If not then I'll just knuckle down and do it Quote Link to comment Share on other sites More sharing options...
david.atwell Posted March 18, 2014 Share Posted March 18, 2014 That doesn't sound quite like what the OP is asking for to me. I think they're trying to find out if there's any way of knowing the coordinates of an item within its layer, and the answer is no, there isn't. Sorry. See, a layer (every layer) is just a field of pixels. If there's nothing on the layer, it's a field of transparent pixels. If there is something on the layer, some of those pixels are colored instead. But wherever the item isn't, there's still those good old transparent pixels. Paint.NET doesn't know the difference between the object (the colored pixels) and the rest of the layer (the transparent pixels). The magic wand will search for that difference, but PdN doesn't know what that difference is until you ask. Good luck! 1 Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
dode74 Posted March 18, 2014 Author Share Posted March 18, 2014 Thanks david, that was pretty much it. I guess I was asking if there was a way to get the wand to cycle the layers and output the coordinate results. It seems not, which is fair enough as it's a pretty unlikely need. Guess I'd best get to work! 1 Quote Link to comment Share on other sites More sharing options...
pdnnoob Posted March 18, 2014 Share Posted March 18, 2014 It seems not, which is fair enough as it's a pretty unlikely need.A rare gem you are...you have no idea. 1 Quote No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo Link to comment Share on other sites More sharing options...
david.atwell Posted March 18, 2014 Share Posted March 18, 2014 Thanks david, that was pretty much it. I guess I was asking if there was a way to get the wand to cycle the layers and output the coordinate results. It seems not, which is fair enough as it's a pretty unlikely need. Guess I'd best get to work! Sounds like a cool idea for a plugin, really. It wouldn't be able to cycle through every layer, but maybe it could output the location of each contiguous block of pixels for the selected layer so you could run it with the "repeat" keystroke (Ctrl+F)... I'm not a plugin developer, but if I were, I would totally do this, because... A rare gem you are...you have no idea. ...pdnnoob is absolutely right. :-) We get entitled angry people insisting that Rick include their obscure functionality in the next version of PdN all the time. Thank you for understanding that use cases are not universal and he has to focus energy on the things that most people need. As he said. Rare gem. Stick around, I like you already. Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
TechnoRobbo Posted March 22, 2014 Share Posted March 22, 2014 (edited) try this: updated below it will find the upper left hand coordinates of the bounding box, it will give you 2 replies cause PDN calls it twice (once for the thumbnail?) but the same set of coords make sure there's no active selection it will work with PDN 4 I think It's too user specific to make it into a topic Edited March 23, 2014 by TechnoRobbo 2 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
dode74 Posted March 23, 2014 Author Share Posted March 23, 2014 Truly excellent of you to do this. The output appears to be the top right corner of the object. What I was after was two sets of co-ordinates: the top left x, y being the first set and the offset from those coordinates of the bottom right (effectively giving the size of the object in pixels as the second output) being the second. Is that possible at all? Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted March 23, 2014 Share Posted March 23, 2014 Ok this TRsObjectPos.zip 3 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
dode74 Posted March 24, 2014 Author Share Posted March 24, 2014 You, sir, are a gentleman - that's perfect. Thank you so very much. Unfortunately I can only add 1 rep point to each of your posts! Quote Link to comment Share on other sites More sharing options...
david.atwell Posted March 24, 2014 Share Posted March 24, 2014 'sokay, I can add another! TR is another gem on this forum, that's for sure. Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
TechnoRobbo Posted March 24, 2014 Share Posted March 24, 2014 Thanks, Glad I can help 2 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
midora Posted March 26, 2014 Share Posted March 26, 2014 I'm wondering if there is a way to export the positions of objects. I realise this is a slightly odd ask but I thought I'd check You may also have a look to Measure Object 1 Quote Link to comment Share on other sites More sharing options...
dode74 Posted March 28, 2014 Author Share Posted March 28, 2014 That, too, is spot on. Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.