I made a mistake the download is working, it only works when you re logged in. You keep hammering me down and i forget this things.

xyz PEBKAM, as they used to say back in the day 😃

Ho no 😮 , ho my god its working !!! 😃
apparently you example is not working either...

I thought you ve made it work, just by making the undoRedo in the "extends EditorPlugin" instead of the handle object script.

But he throws the same thing, "EditorInspectorPlugin" resets, just by to pressing any of the boxes on the editor,
You problably going to tell me iam an idiot too, and i have to add the color to the undoRedo in the "stroke_draw_list" in "EditorPlugin"... The problem is why does the undoRedo resets the "EditorInspectorPlugin"...

but fine leave it on... its working 99.9% of the cases, just move on to another thing whatever, if its not working or just working in 1 or 2 years from now whats the diference anyway... ( A thing that could be solve in 5 or 10min, its going to drag for a lot of time, because noOne its using it )
But iam the "BadGuy" right, lets all become little friends and unite agaisnt the badGuy jonSS...lol

  • xyz replied to this.

    jonSS This is a bit far. @xyz Is only trying to explain from his perspective. We have rules here to respect each other.

      jonSS EditorInspectorPlugin::_parse_begin() is supposed to be called every time you select a node supported by EditorInspectorPlugin::_can_handle(). Nothing gets "reset". Custom controls scene is supposed to be instantiated every time this happens. Its _ready() is supposed to be called. You're complaining about things that happen by design.

      The skipped undo is due to possible bug in color picker gui modality. If you click into viewport with the color picker still open, EditorPlugin::_forward_canvas_gui_input() wont register mousedown event nor its counterpart mouseup event. This is the actual thing that may be worth reporting.

      For simplicity, my example was checking only for mouseup and mousemove envents. It implies stroke state instead of tracking it via a flag set by a received mousedown. Because of that, the stroke you start when a color picker is still visible won't make it into the undo queue.

      Easy fix by adding a flag into mouse input logic. It will now require an additional viewport click when trying to stroke from an open color picker. Courtesy of an apparent color picker glitch.

      All this is just menial gui stuff. Nothing to do with the core undo mechanism we're trying to demonstrate here.

      Now be a darling and check and report back how you feel undo performs in the project below.

      undo-example.zip
      4kB

        xyz Its running fine now... but I dont know ?
        I also think its normal for the inspector to reset when you change nodes...

        • But why is it that in my case the "inspector" resets everytime i press the screen ?
        • And it doesnt reset if i delete the "undoRedo" code, it runs perfecly normal ? like its running in your example...

        Ive been messing with "func _forward_canvas_gui_input(event):" and nothing will change it back to normal... The only thing that makes it run right is if i remove the "undoRedo" code..

        But never mind, i dont know why the "undoRedo" triggers that... And maybe it doesnt matter...
        tileSets have been cursing this engine every since day one when it come out... problably some Dev whos in charge of tiles, did the undoRedo... best to just leave it alone... i just wanted to make my own tileMap so i could get out of dodge, i ill find another way to do the undoRedo...

        • xyz replied to this.

          jonSS Only wanted to address complaints about my example "not working". It works and it shows how undo is properly implemented. The rest of your questions have already been answered. Go re-read my posts.

          Here's a hint; You do stuff with that dictionary outside of do/undo functions. Once you introduce undo functionality, all changes to that dictionary should be contained within those functions. Otherwise the thing will likely fall apart. And that's precisely what you're witnessing there.

          Either that or the devs are intentionally destroying the engine, eh? 😮

          jonSS Look at it from the bright side. Out of the whole ordeal you've learned one thing for sure - that it's spelled redo and not reNdo.

          jonSS Btw the inspector refresh that is breaking your heart is triggered by notify_property_list_changed() called from undo/redo functions. This is again by design. The sole purpose of this function is precisely that - to refresh the inspector.

          Also, you need to remove the inspector plugin in EditorPlugin::_exit_tree() by calling EdtorPlugin::remove_inspector_plugin(). Otherwise the custom inspector gets multiplied with every restart of the plugin.

          Go do an arkanoid clone or something. Plugins are messing with your mind 😃

          jonSS By the looks of it, we finally weeded out all of your undo related issues.

            xyz You re forgeting "undo" wasnt made by me... I thought y were more focused on the "reNdo" ?
            But i bet i have weeded out some of you guy(s) "undos" too... ( roofs of glass )

              jonSS If you didn't want my help, you just could have said so at any time. I would have been happy to oblige. No need to resort to lengthy incoherent personal attacks. Ironically they intensified only after I solved quite a few of your problems in other threads. Remember, it was you who was asking for help in the first place. Don't worry though, you won't hear from me anymore. Have a nice day!

              MikeCL I don't really know what's going on here. Why is the administration calmly observing the toxic behavior of a character who asked for help and then got personal? Some of his posts are just off-topic flud, and grossly rude. I understand his behavior, that he is frustrated that in his feeble mind he can't understand the explanation. That doesn't excuse him in any way: 428(❗️) "best answers" means @xyz can explain things in an accessible way. It in no way allows me to understand why insults to someone who has proven himself to be an excellent person here are ignored.

              jonSS But i bet i have weeded out some of you guy(s) "undos" too... ( roofs of glass )

              Child, who are you referring to?

              Thanks @Tomcat, I appreciate it. It's okay though. I don't mind nasty words or insults being thrown at me. Although I do prefer them delivered with style and substance. Sadly, that wasn't the case here 🙂

              Let the guy be. Maybe there's someone else on here more tuned into his way of reasoning, suited to help him with his programming efforts. I apparently am not. Let's leave it at that.

              I'm just sorry that the thread got derailed by this nonsense. Undo is an interesting and somewhat complex topic. Certainly worthy of discussion.

                @jonSS That's enough. Reading through the thread, you are getting a lot of help from @xyz who repeatedly try to explain things. I get that it's frustrating when things doesn't work as you expect them to, but you are getting personal (as other people have noticed). This is not ok. I gave you a warning, and this one will be the last.

                xyz I don't mind nasty words or insults being thrown at me.

                This is not ok. Discussions can get heated but personal attacks is not ok.

                [Update] - Removed some of the lengthy posts that were off-topic and inappropriate.