How to edit transform array in controlrig?

I have a vector array of ‘scale’ values, I want to edit the bone transform array to apply the scale values from that array instead

You can see in the upper part of the image i figured out how to break down a transform array into it’s compoenents, and i have lines going out from the values I want to re-merge into a new transforms array, but how do I do that?

I figured it’d be more efficient to do it this way than to use a for each loop.

I have figured this out, more or less. I would love it if someone points out a better way for me.

First I create a variable that contains the initial bone transform array on construction event, the primary purpose here is to have a populated transform array with a correct number of entries.

I then modify it like this, I’m using a vector array that gets updated from the animbp and applying it’s values to the transform variable based on index:

Then to ensure it is only updated when actually needed I apply the final solution like this:

Where the update bone scale function is the same as in the 2nd picture.

I originally wanted to use the transform array to SRT node in the OP and compare that to my scalebyindex variable but for some reason even if it should be an exact match, it for some reason is not which is why i created that buffer variable instead.

This way the modifiedtransforms variable is only updated when it is required, and when it doesn’t have to be only the set transform array node is run to keep the last transform active.

The biggest downside is that when using global space it behaves different than expected, when using local space it behaves as expected though, I’m not sure why this is.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.