検索 - User list
Full Version: APEX Script get type
Root » Rigging » APEX Script get type
playBlaster
Is there a way to get the type of a value in APEX Script? I tried the following python:

my_value: Int = 0
type = type(my_value)
print(type)

and got the following error:

``type = type(my_value)``
The given function Type has no input at index -1).

is there no way to get the type of a value in APEX Script? I'm trying to dynamically add value nodes to my network by iterating over a dictionary and i need to know the types of each value, so i can create the callback string used in addNode, i.e. "Value<Int>".
edward
One way to do this:
d:Dict = BindInput()
t = ""
dummy0, success = d.get_Float('a')
if success:
    t = "Float"
dummy1, success = d.get_Int('a')
if success:
    t = "Int"
print(f'{t=}')
BindOutput(t)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB