[Bf-committers] Crop/Zoom feature solution

Chris Burt desoto at blender.spaceisbig.com
Fri Feb 11 15:48:07 CET 2005


Not sure if anyone else has a problem with this functionality:

	Border and crop are turned on, image dimensions set
	very high. Render window is bigger than screen, so
	it scales down, but border selected area is not.
	Thus your selected content is scaled down to fit
	inside the enormous gray void created by crop.

My solution was to scale the render window based on the relative 
coordinates stored within the RenderData struct. This data is given in 
floats stored in r.border.xmax, r.border.xmin, r.border.ymax, and 
r.border.ymin. By finding the difference of these two pairs one ends up 
with a factor by which the render window can be multiplied to yield the 
proper dimensions for the render window to fit the cropped image. I also 
had to correct the zoom which occurs automatically if the window is 
scaled in the case that R_BORDER and R_MOVIECROP are active. Thus no 
more HUGE render window just to contain a tiny piece of your render.

I think this functionality is an improvement and should let people fuss 
with the render window less just to see how a portion of their render 
will look. I'm fairly confident it doesn't break anything but testers 
should... well... test. I hope this can be included in the main tree. 
Thanks!

--Chris Burt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crop_zoom.patch
Type: text/x-diff
Size: 2498 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20050211/cef75d63/crop_zoom.bin


More information about the Bf-committers mailing list