Here are the changes to boost performance. The surprising thing is that reducing the pauses did not save as much time as I thought they would. It's faster than before. It still has a noticeable delay, even when the delay numbers are set low.
I changed the call to the Bitmap2 script to use Activity.Run instead of ScriptObject.Execute - still takes the same amount of time but control seems to be returned to the user faster.
Added an input to set the delay times. This is needed to get good undos when dragging in the controls. I set the default to 65. Running on an old centrino windowsxp machine needed a delay of 100 to get good undos. Decreasing the time made the undos less reliable. When just clicking in the controls, the delay time doesn't matter much and undos are good, but even set to low values there is a small delay. Might be able to work something out with 2 panel aspects, one for dragging and one for clicking where the delay can default automatically for each panel.
Removed the Source node connected to the watchdog and replace with the function set GetTargetNode function. This way there are no extra watchdog connections and the open buttons work without having to first make a selection in the list.
Color Picker
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Color Picker
- Attachments
-
- Color Picker.RsObj
- (348.69 KiB) Downloaded 51 times
Re: Color Picker
ColorDataclintonman wrote: ↑09 Feb 2023, 05:38 Here are the changes to boost performance. The surprising thing is that reducing the pauses did not save as much time as I thought they would. It's faster than before. It still has a noticeable delay, even when the delay numbers are set low.
I changed the call to the Bitmap2 script to use Activity.Run instead of ScriptObject.Execute - still takes the same amount of time but control seems to be returned to the user faster.
Added an input to set the delay times. This is needed to get good undos when dragging in the controls. I set the default to 65. Running on an old centrino windowsxp machine needed a delay of 100 to get good undos. Decreasing the time made the undos less reliable. When just clicking in the controls, the delay time doesn't matter much and undos are good, but even set to low values there is a small delay. Might be able to work something out with 2 panel aspects, one for dragging and one for clicking where the delay can default automatically for each panel.
Removed the Source node connected to the watchdog and replace with the function set GetTargetNode function. This way there are no extra watchdog connections and the open buttons work without having to first make a selection in the list.
I removed the Red, Green, and Blue attributes because they are not being used.
On the Color panel aspect, I set the Link for Value, Red, Green, and Blue to None because Resetting them did nothing except add entries into the Command History.
Can GetTargetNode be used to set the Final Color, instead of using Node.FirstSelected()?
Just a guess, but I think it may help with the Lights that I posted about in the previous post where the selected node has to be re selected.
If the Selection Change Event could set the selected node's path to a string connector, then it would not be necessary for it to be selected in order to set the Final Color.
In simpler terms, somehow make the Color Picker aware of the selected combo string's color more often and set the Color Picker's Color attribute.
Re: Color Picker
Noticed that the Undo button can undo the combo control string(s)
Change:
Undo Button script
For whatever reason, running the above in a jScript does not work, it has to be run from a Button script.
Example: Undo Button script: Activity.Run('%THIS_NAME/Undo') does not work.
Change:
Undo Button script
Code: Select all
if(Node.Value('%THIS_NAME%/PreUpdate ColorRGB', ' Control Out') == 2) {
RsApp.Undo()
}
Example: Undo Button script: Activity.Run('%THIS_NAME/Undo') does not work.
Re: Color Picker
So, when you change the selected nodes Color and you want to update the Color Picker's Color, it is as simple as reselecting the item in the combo control.
Guess I will give up on this one and leave it up to the instructions on how to use this.
Guess I will give up on this one and leave it up to the instructions on how to use this.
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Color Picker
I dont follow what youre saying. "...It's as simple as...I give up"
Re: Color Picker
It's as simple as, reselect the combo control string.I dont follow what youre saying. "...It's as simple as...I give up"
I gave up trying to supply a script that solved this.