Anyone know how to use the APEX Script node input bindings to bind a Dictionary?
I have an attribute adjust dictionary node set to detail attribute with a few attributes created on it and I am passing that into the first port of an APEX Script node. On the APEX Script node under Invocation/Input1 Bindings i have Dictionary To Bind checked. When i click on the drop down, the dictionary i created in the attribute adjust dictionary node does not appear. Nothing appears there.
Do i need a custom header? do I need to do a BindImport() of some kind in the script before I am able to select a dictionary? If I am able to find my dictionary in the drop down, how would i go about bringing it into the graph?
-Sky
APEX Script node Input Bindings, Bind Dictionary
709 3 1- playBlaster
- Member
- 18 posts
- Joined: Nov. 2018
- Offline
- esttri
- Staff
- 79 posts
- Joined: May 2021
- Offline
It seems to be just the dropdown not showing the current dict attribute name. So for now you would just need to type in the name. We will see that this is fixed.
The actual functionality is there though. Bind an input in your script e.g:. If the input name aka myInput matches the name of a key entry of the correct type in your dictionary, then that value will be used when you run the script. you get the result of the script running on the first output of your apex script node.
The actual functionality is there though. Bind an input in your script e.g:
myInput: Float = BindInput()
- playBlaster
- Member
- 18 posts
- Joined: Nov. 2018
- Offline
esttri
It seems to be just the dropdown not showing the current dict attribute name. So for now you would just need to type in the name. We will see that this is fixed.
The actual functionality is there though. Bind an input in your script e.g:. If the input name aka myInput matches the name of a key entry of the correct type in your dictionary, then that value will be used when you run the script. you get the result of the script running on the first output of your apex script node.myInput: Float = BindInput()
Thanks Esther!
My mistake was trying to use the detail attribute name i had the dictionary stored in as a variable for bringing it into apex. Using a key in the dictionary works great. Thanks also for seeing that that drop down gets fixed.
Best,
Sky
- michaelyang0627
- Member
- 9 posts
- Joined: May 2019
- Offline
esttri
It seems to be just the dropdown not showing the current dict attribute name. So for now you would just need to type in the name. We will see that this is fixed.
The actual functionality is there though. Bind an input in your script e.g:. If the input name aka myInput matches the name of a key entry of the correct type in your dictionary, then that value will be used when you run the script. you get the result of the script running on the first output of your apex script node.myInput: Float = BindInput()
Related to BindInput() function, but in an autorig component using snippets, is there a way to setup the parameters in edit parameter interface, and reference them into the snippet?
Further more if I'm doing a multiparm and using those inputs in a forloop in the snippets, what would be the way to do it? Since right now the declare syntax seems to look like this:
myInput:Type = BindInput()
Where the variable name itself is the name on the parameter interface, so there isn't a way to us some string manipulation.
My goal would be to do something like this:
for i, obj in enumerate(objs): myInput:Type = BindInput(f"my_input_{i}")
Thank you
Edited by michaelyang0627 - Sept. 4, 2024 15:52:44
-
- Quick Links