BlendLuxCore icon indicating copy to clipboard operation
BlendLuxCore copied to clipboard

Size mismatch with border render

Open Theverat opened this issue 7 years ago • 1 comments

Another one of these. The addon probably rounds different than Blender somewhere. Size mismatch. RenderPass->rect size: 229x255, passed width x height: 230x255 The scene was sent to me via private message.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Theverat avatar Aug 07 '18 15:08 Theverat

Just in case anyone is interested, I'm not sure how I could post a proper "fix", but for my own purposes I think I have fixed this by the following changes:

In file /utils/init.py on lines 203 and 204: change from: width = int(width_raw * border_max_x) - int(width_raw * border_min_x) height = int(height_raw * border_max_y) - int(height_raw * border_min_y) to: width = int(width_raw * border_max_x - width_raw * border_min_x + 0.5) height = int(height_raw * border_max_y - height_raw * border_min_y + 0.5)

The "0.5" may be overkill - "0.1" would probably work in this context, but I developed a habit of always adding 0.5 before doing an int from converting random numbers into dice values. Note that the "width" and "height" variables must be ints or something else bad happens, so just using "round" wouldn't work.

rvwsr avatar Jan 13 '22 02:01 rvwsr