I can confirm that this bug still exists and that the provided patch fixes the bug.
I used the following code to expose the bug, which is fixed after applying the patch.
Pressing space toggles scaling the text using two different methods, using setTextScale, and using setScale on the NodePath.
Without the patch, only the NodePath scale works properly.
from panda3d.core import *
from direct.showbase.ShowBase import ShowBase
class Game(ShowBase):
def __init__(self): ShowBase.__init__(self)
self.text = TextNode('my text node') self.text_np = NodePath(self.text) self.text_np.reparentTo(render2d) self.text.setText('hello world') self.accept('space', self.swap_scales) self.text_np.setScale(0.1) self.text.setTextScale(1.0)
I can confirm that this bug still exists and that the provided patch fixes the bug.
I used the following code to expose the bug, which is fixed after applying the patch.
Pressing space toggles scaling the text using two different methods, using setTextScale, and using setScale on the NodePath.
Without the patch, only the NodePath scale works properly.
from panda3d.core import * showbase. ShowBase import ShowBase
from direct.
class Game(ShowBase):
ShowBase. __init_ _(self)
self.text_ np = NodePath(self.text)
self.text_ np.reparentTo( render2d)
self.text. setText( 'hello world')
self.accept( 'space' , self.swap_scales)
self.text_ np.setScale( 0.1)
self.text. setTextScale( 1.0)
def __init__(self):
self.text = TextNode('my text node')
def swap_scales(self): np.getScale( ) getTextScale( )
self.text_ np.setScale( text_scale)
self.text. setTextScale( np_scale[ 0])
self.text. forceUpdate( )
np_scale = self.text_
text_scale = self.text.
Game().run()