Data Array Actor keeps editing in deactivated user actor
DillTheKraut last edited by
Hello guys,I'm not sure if this is a bug or feature. But I would like to have a solution for this issue.I'm on OSX 10.10.5Izzy 2.11\. Put a Data Array Actor in a User Actor and connect the editing values (erase, add, insert, etc...) to user actor input.1.a set some random values.2\. Put a "User Actor ON/OFF" actor in the same user actor and connect it to a user actor input.3\. close and save user actor4\. disable user actor by switching user input "enable" to "off"5\. trigger any of the editing values6\. switch the user actor by ON and Off by using the user input "enable".Result:The edits will be written, even if the user actor is turned off.This is done, even if the "write" value of the data array actor isn't connected to a user input.Ironically I stuck to this Issue while trying to construct a write protection to the user actor, so one can't edit the data accidentally.Does someone have a solution for the write protection?!sample file is attached
Hello,I think the gurus can best explain about that, but for me the on/off for user actor is more about computing and render, as pause/resume for the patch. For me it's normal that Data Array continues to record/read/write when the user actor is off. I would put a gate to avoid unwanted operation.jacques
This is surprising to me. I will start looking into it. In the meantime Gate is probably your best option.
I have tried to follow this through and see how it behaves. It's the first time I have placed the data array inside a user actor before actually.In my quick test I think I know what you mean.I could disable the user actor, change a load of values, write them and read them and then when the actor was enabled it would update with the new values?However: I did this once and then the next time I could not get it to happen... I am not 100% sure what I did.As suggested above - a gate actor would completely block any values/data going into the data array so that will work.I need to look into this further and talk to the team about the behaviour.So - leave it with us. :)
DillTheKraut last edited by
Thank you all for the response.I already had the idea with the gates too and did it this way already. But beside the more complex editing that indicates, there is a uncertain feeling left that the safety isn't given.I found this issue, because the complete Data in the file was deleted or changed several times, but I couldn't explain this behavior bevor.Especially as it is like graham is describing it. Sometime you need to switch more than on and off. Sometimes the actor even writes changes that are done before without manual triggering, if you switch from ON to Off.At least, the gate solution has one other issue, that I addressed already some years before.Value changes that are made in a user actor (due to actor internal dependency for example), are not updated to the connected user inputs in the lower levels.Which means you don't know the actual status of the value until you go to the root value in the highest user actor.But even if you build an indicator with user outputs, you have to change the value to the current status and then only can change to the new value.I find this a bit annoying especially if it is relevant to data consistency.
mark last edited by
Regarding the Data Array actor and the User Actor On/Off behavior.The User Actor On/Off allows or prevents an actor from being initialized or executed. For actors within a User Actor that have a User Actor On/Off, the behavior exactly mimics the activation of a scene when the User Actor On/Off transitions from off to on, or vice versa.So, first, the contention that "The edits will be written, even if the user actor is turned off." is not true. I tested this very carefully, and it is not true.What I think is happening here is a misunderstanding of the sequence of events. Below I will go through the entire sequence in extreme detail, so that you can understand exactly what Isadora is doing. If you want to debate the functionality of this actor, you need to read all the steps below carefully.NOTE: I made a valid path for /Users/dillthekraut/M/settings/1/content.txt so I could do this test. Initially, the "content.txt" was empty because I did not have DillTheKraut's actor**Initial Import of User Actor**
**Load File / Turn Enable Input On and Off**
- Place DillTheKraut's User Actor in a fresh Isadora file. At this point, whatever data was in the User Actor when the .iua file was saved is "given" to the Data Array actor. But no further actions are taken, including reading any file specified with the 'file path' input. Note that DillTheKraut saved his User Actor example with seven lines in it already. This data is no ready and waiting inside the Data Array actor.
- At this point, with the 'enable' input of DillTheKraut's User Actor still turned off, I clicked the 'insert' input. No data is added to the actor. Then I moved the User Actor a bit to make the .izz file "dirty", and then saved and closed the file. The original seven lines in the Data Array actor are stored along with the .izz file. Take note here that the 'file path' file is not written because the 'enable' input is 'off.'
**Load File / Turn Enable Input On, Insert, Turn Enable Input Off**
- Load saved Isadora file. Again, the seven lines that were saved in the .izz file for the Data Array actor are "given" to the actor. But no further action is taken. Clicking 'insert' still does nothing at this point.
- Change 'enable' input from 'off' to 'on'. Because the 'r/w mode' is set to 'rw', the "contents.txt" file is read. Because this file is empty, the Data Array actor now has zero lines in it. (The original seven lines are discarded at this point.) Additionally, the 'lines' output is updated to show the current number of lines. However, the other outputs are not updated. This was a design decision; we can debate whether the other outputs should be updated upon reading the file. (Note that what's happening here is exactly what would happen when you activate a scene.)
- Now, change 'enable' input from 'on' to 'off.' Again, because the 'r/w mode' is set to 'rw', the "contents.txt" file is written. It is still empty because, in the previous step, the file that was read was empty. (And again, the actions taken here are exactly what would happen if you deactivate a scene.)
- Move the User Actor a few pixels to make the .izz file dirty, then save the .izz file and close it. When you save the file, now the current data of the Data Array actor is written along with the .izz file, which is zero lines.
**Load File / Turn Enable Input On, Insert Again, Turn Enable Input Off**
- Load saved Isadora file.The zero lines that were saved in the .izz file for the Data Array actor are "given" to the actor. No further action is taken.
- Change 'enable' input from 'off' to 'on'. Because the 'r/w mode' is set to 'rw', the "contents.txt" file is read. Because this file is still empty, the Data Array actor still has zero lines in it.
- Trigger the 'insert' input. Because the current value of the 'index' input of the Data Array actor is 7, seven lines are added. The contents of these seven lines are identical: "6.0, 1.0, 1.0, 1.0, 6.0, 0.0, 0.0" because those are the current values of the 'value 1', 'value 2', etc. inputs of the Data Array actor.
- Change 'enable' input from 'on' to 'off.' The file "contents.txt" is written. There are seven lines in this file, each one being " "6.0, 1.0, 1.0, 1.0, 6.0, 0.0, 0.0"
- Move the User Actor a few pixels to make the .izz file dirty, then save the .izz file and close it. When you save the file, now the current data of the Data Array actor (the same seven lines written to the "contents.txt" file is written along with the .izz file, which is zero lines.)
In his Bug Report to me, DillTheKraut felt that using the Pause Engine function should have prevented any data from loading. But that's not what the Pause Engine does. Any initialization that needs to happen when an Scene is activated still happens even if the engine is paused. What the Pause Engine does is prevent any actors from being executed to act upon that initial data.I hope that all of this detail allow everyone to better understand how Isadora is operating. If any of you feel that this behavior is inconsistent or wrong, then please feel free to offer your opinion below. But, in my opinion, everything is functioning as I intended it as far as I can tell.Best Wishes,Mark
- Load saved Isadora file.The seven lines that were saved in the .izz file for the Data Array actor are "given" to the actor. No further action is taken.
- Change 'enable' input from 'off' to 'on'. Because the 'r/w mode' is set to 'rw', the "contents.txt" file is read. The seven lines stored in this file in the previous test replace the data previously loaded into the Data Array actor. (In this case, they are the same data of course.) Again, except for the 'lines' output, no outputs of the Data Array actor are updated because the 'read file' action does not update the outputs.
- Trigger the 'insert' input. Because the current value of the 'index' input of the Data Array actor is 7, a single line is added just before the last line. The contents of this new line is like the old one ("6.0, 1.0, 1.0, 1.0, 6.0, 0.0, 0.0") because those are the current values of the 'value 1', 'value 2', etc. inputs of the Data Array actor. Note that here the 'value 1', 'value 2', etc. outputs are updated, because of the value of the 'recall' input.
- Change 'enable' input from 'on' to 'off.' The file "contents.txt" is written. There are eight lines in this file, each one being " "6.0, 1.0, 1.0, 1.0, 6.0, 0.0, 0.0"
- Move the User Actor a few pixels to make the .izz file dirty, then save the .izz file and close it. When you save the file, now the current data of the Data Array actor (the same eight lines written to the "contents.txt" file is written along with the .izz file, which is zero lines.)
mark last edited by
Dear All,Michel brought some points to me privately, and I want to add further clarification. His point was that the reading and writing of the "contents.txt" file was confusing with regard to the User Actor On/Off actor.He said: "If the DataArray actor is _outside_ of a user actor, If I hit insert or delete I also have to hit write for the data array to write to the file. But if it is inside (along with a User Actor On/Off actor) The DataArray actor writes to the file without me having to hit write."This is not totally true. If the ‘r/w mode' is set to ‘rw’ then the file is automatically written when the Scene is deactivated. So the file is in fact written without you having to explicitly hit 'write' in this circumstance.When you turn off the User Actor On/Off actor, the behavior is exactly the same as when the a scene is deactivated. If one does not want this, then one can set the ‘r/w mode’ to ‘—‘ or ‘r-' In that case, the file will never be written until a trigger is received at the 'write' input.When the ‘r/w mode’ is set to ‘rw’ the help text for this input should make the functionality clear.
- Determines if and when the associated text file will be automatically be read and/or written to disk.
- '--' means do nothing on activate, do nothing on deactivate
- 'r-' means read on activate, do nothing on deactivate
- '-w' means do nothing on activate, write on deactivate
- 'rw' means read on activate, write on deactivate.
_Again, for all actors within a User Actor that also contains a User Actor On/Off actor, enabling the User Actor On/Off is exactly like activating a scene, and disabling it is exactly like deactivating a scene. Thus the automatic read/write behavior is triggered by enabling or disabling the User Actor On/Off actor.I hope that helps clarify things further.Best,Mark
Thank you for clarifying this, got it :-)
The Data Array is both a very powerful actor, and one of the more complex actors to use in Isadora.That in combination with the use of User Actor on/off, which I use 'All The Time', can abstract things a bit.I think it is important for a clear understanding of what User Actor on/off does, and how User Actors respond to it. I think it is fair to say that, User Actor on/off, works much the way you might expect a 'Scene on/off' actor to work, while being localized to its current context/scope.I would be happy to prepare a KB article on this, and the use of the Data Array.