mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
pgraph: Fix bug passing non-tuple sequence to shader input
This commit is contained in:
parent
3a41db130b
commit
f20d859fe2
@ -282,7 +282,7 @@ __init__(CPT_InternalName name, PyObject *value, int priority) {
|
||||
return;
|
||||
}
|
||||
|
||||
Py_ssize_t num_items = PySequence_Fast_GET_SIZE(value);
|
||||
Py_ssize_t num_items = PySequence_Fast_GET_SIZE(fast);
|
||||
if (num_items <= 0) {
|
||||
// We can't determine the type of a list of size 0.
|
||||
_this->_type = ShaderInput::M_numeric;
|
||||
|
@ -1,4 +1,9 @@
|
||||
from panda3d.core import ShaderInput, Vec4
|
||||
from array import array
|
||||
|
||||
|
||||
def test_shaderinput_construct_sequence_int():
|
||||
i = ShaderInput('test', array('I', [1, 2, 3, 4]))
|
||||
|
||||
|
||||
def test_shaderinput_vector_compare():
|
||||
|
Loading…
x
Reference in New Issue
Block a user