Table switch wont work

Added image with all descriptions.
Basically table switch wont work (par index is 0, but switch shows index 1)
Problem may accrue, because on of the tables are modified by python on frame end.

td 099 2017.31700
latest windows 10

After some testing after clearing table (op(‘…’).clear()) switch wont work, unless uoi change index value twice (manually or with python).

And this is what we call professional and reliable tool…

familyagency - can you post an example file with the technique you’re using to see this behavior?

It’s almost always easier to trouble shoot with an example.

It also looks like you’re using an experimental build - have you tried this with the stable build?

In the latest stable 099 the following function as expected:

CHOP export
Python reference from CHOP
CHOP execute
Panel Execute

base_switch_DAT.tox (2.24 KB)

Does this fail to work in the experimental?

Here you are example

Run “text7” a few times, and then run “text8”. after text8 you will have “phrasesSwitch” index to 0, but it will still show 1

Tested on 088 62160 - same story
switch_dat_bug.toe (4.07 KB)

In your limit CHOP:

Change the Type parameter to Loop
Change the Maximum to 2

When I do the above, running text7 works as expected.

Apologies, I think I misunderstood what you’re after.

I don’t think that par is updating - in your example you can get what I think is actually the behavior you’re expecting by adding a null CHOP after your limit, and setting the cook type to Always. This will keep updating the par, and ensure that you’re not using a cached value.

second example with video. i cant make better example…
youtu.be/W5AZgosDEE8
i need to clear table twice for switch to apply index paraemeter
switch_dat_bug_2.toe (3.98 KB)

Another approach here would be to use a delay script.

base_delay_script.tox (814 Bytes)

My best guess at what’s happening is these changes all happen on the same frame, which results in a the value not being updated - like you mention.

You can also use a delay CHOP to resolve this:

base_delay_chop.tox (1006 Bytes)

[quote=“raganmd” by adding a null CHOP after your limit, and setting the cook type to Always.[/quote]
i can’t do this, i will have heavy render later in pipeline and i dont want it to render every frame, only once, if i send tcp message. Adding delay is crutch, not a solution. It is not the first bug i post considering assync work TD with python.

Another solution would be to run a separate script, and just wait 1 frame - this is a non-blocking action in Touch, unlike waiting with Python, and will make sure that a frame has elapsed.

I understand that this is a crutch, but if you need a solution immediately at least there’s a way around this particular issue:

base_delay1frame.tox (854 Bytes)