Sorting images

General discussion about the R.U.B.E editor
Post Reply
mfagerlund
Posts: 20
Joined: Wed Jul 10, 2013 2:07 pm

Sorting images

Post by mfagerlund »

Hi - it would be really useful to be able to sort images by Render order, because right now it's very difficult to really know in what order things will be rendered at a glance.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Sorting images

Post by iforce2d »

There is a "render order" property for images, which specifies the order in which images are rendered in the editor (higher values will be on top), and this value is available in the exported .json file so you can use it in your app after loading the scene. The default opacity for images is 0.5 so it may not appear that images are being rendered in a specific order in the editor - you can set the opacity to 1 if you want to see the order more clearly. If more than one image has the same render order value, the order they will be rendered in is undefined.

If this is not what you're talking about, perhaps you could elaborate? Do you mean sort the listing order of images in the 'Items' panel?
mfagerlund
Posts: 20
Joined: Wed Jul 10, 2013 2:07 pm

Re: Sorting images

Post by mfagerlund »

I'm using the render order from the json and I've set default alpha to 0.65 so it's easier to see. But that only helps when images are initially overlapping - if they're not, you won't find out until they move so that they do overlap. If I could see a list of the images sorted by their render order (and a simple way of changing it) then that would be awesome. I refer you to setting tab order in a RAD environment (like C# or Delphi) - each component has a tab order, but there's typically a way of seeing them sorted by tab order to give you a quick overview. Or in design programs where you can right-click on objects and "bring to front/send to back" to make sorting easier.

Anyway, thanks for listening ;)
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Sorting images

Post by iforce2d »

I see. I am thinking about ways to display layers, when that feature is added. Items will need to be movable between layers, which is very similar to adjusting the render order of images. I am toying with the idea of an isometric view, like this. But I have a feeling this will quickly become cluttered and hard to read (and manipulate) when many items are in the scene... will have to experiment a little I think.

About "bring to front/send to back", that is easily achievable in script. Unzip the attached file and place the contents inside the config/actionMenu folder. It will add an extra submenu to the action menu.
Attachments
imageRenderOrder.zip
(2.03 KiB) Downloaded 587 times
mfagerlund
Posts: 20
Joined: Wed Jul 10, 2013 2:07 pm

Re: Sorting images

Post by mfagerlund »

That worked, thanks!
Post Reply