BGE: Fix for precision lost in setBackground/getBackground at Video Texture

Now internally the variables are processed as floats avoiding int->float->char conversions that are causing precision lost.

A check for int numbers is maintained to keep compatibility with old behaviour.

Reviewers: ben2610, campbellbarton, moguri, hg1

Reviewed By: moguri, hg1

Subscribers: campbellbarton

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1301
This commit is contained in:
2015-06-16 00:05:25 +02:00
parent 53e3e46332
commit 6d63446710
3 changed files with 31 additions and 20 deletions

View File

@@ -218,6 +218,8 @@ When the texture object is deleted, the new texture is deleted and the old textu
background color
:type: int or float list [r, g, b, a] in [0.0, 255.0]
.. attribute:: capsize
size of render area
@@ -315,6 +317,8 @@ When the texture object is deleted, the new texture is deleted and the old textu
background color
:type: int or float list [r, g, b, a] in [0.0, 255.0]
.. attribute:: capsize
size of render area