Render Path Grid v2

Involved development of the OpenMW construction set.
User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: Render Path Grid v2

Post by Zini » 30 Apr 2016, 08:00

I am not too familiar with the concept of nested tables (both in general and regarding our implementation). Therefore the amount of advice I can give you is limited.

But we definitely need a generic solution. Did you have a look at what other tables do regarding nested table updates? Do they cope with updates correctly? Thinking about it, I am actually surprised that we didn't see problems here earlier. Either we just didn't notice the problems or the other tables do something different.

I am not sure about the point of inserting the point in the middle. Maybe trace it back to the function calling addRow and see why it is doing that? I noticed a big fat FIXME in that piece of code. If that is still relevant, we may be in even more trouble.

aesylwinn
Posts: 231
Joined: 14 Dec 2015, 20:30

Re: Render Path Grid v2

Post by aesylwinn » 01 May 2016, 06:24

So I figured out that the FIXME comment is no longer relevant. As it turns out, whenever a row is modified, there is a signal that gets emitted from the IdTree class which apparently updates all of the views tied to that data. I'll make an attempt at interpreting the output of that signal tomorrow, though I fear that it may be a bit too abstracted to accurately use for the update code.

The rendering bit is almost done. I assume that the pathgrids should only be visible when in the pathgrid editing mode? Also, I was considering making the lines render on top of everything, but I don't know if that would be too annoying. I'm already rendering the lines with a vertical offset, but sometimes that isn't enough.

Image

User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: Render Path Grid v2

Post by Zini » 01 May 2016, 10:59

The rendering bit is almost done. I assume that the pathgrids should only be visible when in the pathgrid editing mode?
No. Pathgrids should be visible while the pathgrid scene elements are enabled (3rd button from the top). We normally do that via the visibility mask. Visibility and editing mode are two completely independent issues.
Also, I was considering making the lines render on top of everything, but I don't know if that would be too annoying. I'm already rendering the lines with a vertical offset, but sometimes that isn't enough.
Vertical offset should do the job. If the user has trouble with seeing the edges, he can always switch off visibility for some other scene elements.

aesylwinn
Posts: 231
Joined: 14 Dec 2015, 20:30

Re: Render Path Grid v2

Post by aesylwinn » 02 May 2016, 03:17

Looks like I will be able to use the signals already implemented.

Some issues I've come across with editing pathgrids:
1. I can't seem to add a new pathgrid record.
2. When adding to the list, points and edges are not correctly inserted in the proper place. If no row is selected, it is inserted at the beginning. If a row is selected, it is inserted after the first row regardless of which row was selected.
3. When removing a point, it also removes the related edges. The view for the edges is updated, but there is an artifact left behind. The rendered table doesn't decrease in size even though the elements in those position are moved up.

User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: Render Path Grid v2

Post by Zini » 02 May 2016, 09:12

Regarding #1: I can confirm that the creator bar in the pathgrid table is partially broken. I can add pathgrids for interior cells, but not for exterior cells.

aesylwinn
Posts: 231
Joined: 14 Dec 2015, 20:30

Re: Render Path Grid v2

Post by aesylwinn » 02 May 2016, 11:20

Zini wrote:I can add pathgrids for interior cells
Can you make it work for already existing interior cells?

aesylwinn
Posts: 231
Joined: 14 Dec 2015, 20:30

Re: Render Path Grid v2

Post by aesylwinn » 03 May 2016, 03:37

Pathgrids with lighting.

Image
Image

Pathgrids without lighting.
Image

Edit: Another option with color. Not sure why this one is scaled differently, but you can click on the others.
Image

User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: Render Path Grid v2

Post by Zini » 03 May 2016, 07:39

Very fancy. However we do have to consider that the pathgrid should look similar to what is shown in the scene visibility selector icons.
Can you make it work for already existing interior cells?
No. The pathgrid creator bar isn't set up correctly for exterior style IDs.

aesylwinn
Posts: 231
Joined: 14 Dec 2015, 20:30

Re: Render Path Grid v2

Post by aesylwinn » 03 May 2016, 07:51

Zini wrote:Very fancy. However we do have to consider that the pathgrid should look similar to what is shown in the scene visibility selector icons.
I can make them blue if that's what you mean.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest