Re-Render to the same window?

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
beergeek
Posts: 14
Joined: Wed Oct 16, 2002 6:11 am

Re-Render to the same window?

Post by beergeek » Thu Oct 17, 2002 5:55 am

The first things that I have done with blender is to fix the things that annoy me the most :D. First was the zoom on the scroll wheel (I have already posted a patch for that :) ). Anyway on to the next thing that annoyed me. Every time you press the "render" button (and you are rendering to a window) it destroys the renderwindow if it is already there and creates a new one. Is there any reason it does this? Here is the code in question...
renderwin.c (line 508).

Code: Select all

	/* XXX, this is nasty and I guess bound to cause problems,
				 * but to ensure the window is at the user specified position
				 * and size we reopen the window all the time... we need
				 * a ghost _set_position to fix this -zr
				 */
			close_renderwin();
			open_renderwin(renderpos, rendersize);
The comment seems to state that it has to destroy and recreate the window for some specific reason. I commented out the two lines of code and everything worked great (if there was no window a new one was created otherwise it was rendered to the one already there). Can anybody think of a reason why the render window should be recreated each time?

matt_e
Posts: 410
Joined: Mon Oct 14, 2002 4:32 am
Location: Sydney, Australia
Contact:

Post by matt_e » Thu Oct 17, 2002 2:25 pm

What if (for example) someone renders at a small size, then changes the size to a larger one? Will the rendered image get squashed in to the same size window?

beergeek
Posts: 14
Joined: Wed Oct 16, 2002 6:11 am

Post by beergeek » Thu Oct 17, 2002 5:40 pm

I bet you are right that that will not work. That also makes the comment make more sense. We need to do a setsize() for the ghost window. I don't agree that you should move the window when rendering it. Thanks for the insight.

hanzo
Posts: 69
Joined: Mon Oct 14, 2002 9:56 am

Post by hanzo » Sat Oct 19, 2002 11:05 pm

beergeek, weres that scroll patch dude? I've wished blender had that for a long time, sounds cool.

hanzo

zr
Posts: 1
Joined: Mon Oct 21, 2002 1:04 pm

Re: Re-Render to the same window?

Post by zr » Mon Oct 21, 2002 1:08 pm

The comment seems to state that it has to destroy and recreate the window for some specific reason. I commented out the two lines of code and everything worked great (if there was no window a new one was created otherwise it was rendered to the one already there). Can anybody think of a reason why the render window should be recreated each time?
The comment didn't make it clear? The window is closed and
reopened austensibly to comply with the user-set position and
size information... a ghost _set_position call needs to be added
so that the position can just be changed instead of reopening the
window.

Note that reopening the window has other side-effects which may
have other influences... for example it usually ensures that the window
goes on top and it also makes a new OpenGL context...

Adding a set position call to ghost, and using that instead is the
best way to procede.
daniel dunbar
daniel@zuster.org

xand
Posts: 33
Joined: Wed Oct 16, 2002 9:46 am

Post by xand » Mon Oct 21, 2002 5:42 pm

you 're rendering a first time. then just before the second rendering, call back the fisrt rendering (F11), press JKEY to swicth to 2nd rendering window and render (F12). JKEY to switch each other. you can compare different rendering.

+++

Post Reply