#1
|
|||
|
|||
<node3d>.color() [and others] and the node parameter
Today I stumbled over a problem of the quasi-polymorphism approach of <node3d>.color() command, also found in specular(), ambient(), emissive() and others.
These are generous in that they accept the three RGB color values as separate parameters or as a tuple. But watch out, this is paid for by abandoning the keyword argument feature for the node parameter. So while this works Code:
node.color(1,0,0, node='left') Code:
node.color([1,0,0], node='left') Code:
node.color([1,0,0], 'left') Furthermore, the documentation does not tell you about the mode parameter of color() and it's possible values. I don't have a pretty neat solution to this issue, but maybe there exist a Python guru out there who has. So far my post is mainly to raise awareness. BTW, similar things apply to setPosition(), setEuler() and several other positional and orientation commands.
__________________
21 is only half the truth. |
Thread Tools | |
Display Modes | Rate This Thread |
|
|