Hidden python-callback-functions on the autorig-builder

   276   4   1
User Avatar
Member
29 posts
Joined: March 2015
Online
Hello, i'm currently trying to reproduce the automated ik/fk-snap from the autorig-builder. So i was breaking up (and reduced the amount of needed nodes) of such a autorig-builder-setup. It seems to be not so hard although i still not fully understand everything. Before trying to explain what i've found out i'd really appreciate a response from anyone who knows where to find the specific python-callback-function (in general for all) but specifically to trigger the switch (on the worm example the python-callback is available directly on the apex-node as a string). Anyway. Please correct me if i'm wrong but it seems to work this way, that in general there is a custom blend-subnet (3 red nodes) that takes the blend-value, the fk-joint, the corrsponding "ik driven"-fk-joint (orange below fk nodes) for each joint (upperarm, lowerarm, hand). Inside the subnet there is a 4th connection for the rest-position that has no input from the top-level, so i assume it gets set directly in code (which rest-position is it?) ... So the system interpolates between those 2 spaces and not on the ik itself. The ik-setup seems to be straight forward but i still not understand what those "L_upperarm_L_armLimb_rest_global_scale" matrices and multiplications (pink left side -> first 3 inputs of the MultiBoneIK) are used/made for and further more where those matrix-values are coming from. The second thing i don't understand is, what those proxy-transforms (yellow) are doing. Their use is not obvious in the rig-graph and when deleted the switch doesn't work anymore so i assume they have some funtionality used in the hidden python-callback i was asking upfront. Thanks

Attachments:
Screenshot 2026-02-27 at 10.56.42.png (1.8 MB)

User Avatar
Member
29 posts
Joined: March 2015
Online
Took me a bit of research but the callbacks are stored in stateutils_2.py (currently working with H21.0.620).
User Avatar
Staff
131 posts
Joined: Oct. 2023
Offline
The ik fk snap, is a property you add to a specific control with a mapping dict. This mapping dict will be key="pos from node name" value="pos to node name".
the control with the mapping on will be the one that initiates the snapping, usually set to on drag end.

The global scale is what sets the rest transforms when scaling the rig so the ik doesnt break.

the yellow controls are used as reference for the ik fk snapping, simply using their position. They are otherwise not used.
Edited by william_harley - March 3, 2026 03:32:34
User Avatar
Staff
131 posts
Joined: Oct. 2023
Offline
Here is a very simple example of the control snapping.
Edited by william_harley - March 3, 2026 03:53:33

Attachments:
Control_Snapping_Simple_v001.hip (291.4 KB)
Screencast_from_2026-03-03_10-52-28.gif (2.2 MB)

User Avatar
Member
29 posts
Joined: March 2015
Online
Thank you william! I will look at this asap. in the meantime i was able to (almost) fully reproduce a prototype for a custom apex node for creating an ikfk system with auto switch-function using a custom callback. it takes 4 joints as input with tags (a root, upperlimb, lowerlimb, tip) and it follows more or less the exact same pattern like in the autorigbuilder. if you look at the code i've tried to comment all parts for your own customization. i was also leaving a graph-node below the apex-node if you want to build stuff on top manually. there is still one restriction though. The autorigbuilder creates a way more flexible system for adding callbacks by using a dictionary that automatically registers the specific controls for switching. my callback is hard-coded. if you need to change names (which is quite likely) follow my description in the file. i've learned a lot from it so i hope it might be useful for you else well. cheers

Attachments:
Screenshot 2026-03-05 at 16.17.41.png (443.4 KB)
Screenshot 2026-03-05 at 16.18.43.png (1.6 MB)
auto_fkik_switch_clean.hiplc (561.7 KB)
custom_ikfk_switch.mp4 (6.0 MB)

  • Quick Links