Bug: SetSlice(Transform) only works with consecutive indexes

Found a weird bug in SetSlice(Transform) by woei:

You can set slices using consecutive indexes starting from 0 just like expected. But as soon as the indexes are not consecutive and dont start at 0 it fails. Also they don’t wrap - so if I input a spread with 10 slices I cant use index 11 to mean the same as index 1. Since there is no SetSlice(Node) I am not sure what to do other than maybe using VL.

Here is a screenshot:


set_slice_transform_bug.v4p (12.5 KB)

You know you can do a map node with enum set to Warp and it will cure your case, i think there should be a Mod also, witch is exactly for

Thanks, I will give those nodes a spin for my use case. I just find it odd that GetSlice and SetSlice have entirely different capabilities. There is no reason for SetSlice to have the limitations it does and quite frankly I would still call it a bug. There is no reason why the indexes HAVE to start at 0 and also not that they have to be consecutive.

I haven’t tried yet, but would be interested if all SetSlice nodes have that behaviour or just the ones by woei.

Well we in c# out of bounds array exception is quite common, it usually fixed in vvvv nodes tho so this is bug

@seltzdesign: has actually already been fixed with beta37. didn’t make it into the change log.
and peeking into your v4p i see it has been patched with beta36

@woei Oh, I see, yes, when I open it in beta37 it works - what a coincidence that it has been fixed in that release. Unfortunately I can’t quite switch over to the new release yet. We make extensive use of XML serialize and deserialize in VL and that has changed quite fundamentally in beta37.

seems like sdk commits have not yet been pushed to the public repo.

here’s the patch
SetSlice.zip (710 Bytes)

Thanks. But I think you sent me the wrong file. Shouldn’t it be the SetSlice.cs file? You sent the git file.

it’s not the cs file but the git diff patch in case you wanted to apply it on the sdk for building it yourself

@woei hm, I think that goes beyond my current capabilities unfortunately. I’ll find a way around. I’ll just build something in VL, which seems like a good little exercise anyways. Once we switch to beta37 I can always go back to the proper node.

Actually I already tried building it in VL, but stuck at how to feed the result of one iteration of a foreach loop back into itself? Right now it runs through the loop fine and sets the slice in the spread, but for each iteration uses the original spread, so you only have the last iteration applied. Hmm, there must be a way…

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