New plugins: color tools - Printable Version +- Wings 3D Development Forum (https://www.wings3d.com/forum) +-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1) +--- Forum: Design & Development (https://www.wings3d.com/forum/forumdisplay.php?fid=6) +--- Thread: New plugins: color tools (/showthread.php?tid=3114) |
RE: New plugins: color tools - micheus - 05-26-2023 Something that can be then improved is the context menu be shown the options correctly. It has long time I noticed that we only get access to the menu if we are over a color square. but the only option that would require this is the Edit. For the others if we invoke the menu outside the square it should pop-up. Since you are playing around on it and learning about menus, maybe you would be interested to fix this behaviour. For that the menu creation will probably need to be broke into two functions: one that include the Edit and other that build everything else depending on where the RMB was clicked (on color square or client area). What do you think? RE: New plugins: color tools - edb - 05-27-2023 I've made the changes to the palette patch so everything is in the submenu, it does look much cleaner this way. I've also added a fix for accessing the menu when right clicked outside the square. Palette patch build: wings_palette_patch.tar I've added a preview color square in the corner, and also I've added the ability to delete individual colors by clicking on them and right clicking to delete. Color panel plugin: wpc_color_panel.tar RE: New plugins: color tools - micheus - 05-27-2023 edb Wrote:I've made the changes to the palette patch so everything is in the submenu, it does look much cleaner this way. I've also added a fix for accessing the menu when right clicked outside the square.Perfect! Thanks. Quote:I've added a preview color square in the corner, and also I've added the ability to delete individual colours by clicking on them and right clicking to delete.Preview looks OK, but maybe it would work a little different. When we have LMB pressed and move around looking for the nice color we want it's OK it to be shown, but after we release the button it would be good if it was hidden again. I thought this because I noticed I was unable so see the colours behind it if I want to pick one (although it keep showing then correctly based on mouse position). And, in this case, If I was clicking on that region of the panel it would be interesting the preview be shown on the opposite side (left). Possible additions: - Since it's fast to get many colours in the local lists it would be nice if the window would to be automatically resized (down) to accommodate and show all the colours we have chosen; - It can depends on the mesh density, because of the performance, but thinking about to use this panel to speed up the vertex painting it would be nice we have an option to apply the preview color directly on a selection instead of just after release the LMB. Also, because in this process we are looking for a nice color to the object it can flood the color history with unnecessary colours - since by now we need to release the LMB first. You could add a menu option which shows a checkmark in case of enabled the "direct preview" (each click will switch the option). So, if is there any selection available you can apply the preview color direct to it. I just updated the reorganized the menu "how to" to include that. I'm starting to like it as an independent tool. RE: New plugins: color tools - tkbd - 05-27-2023 hi!edb, Thank you for upadte! I checked color delete feature,It works fine So,I made a mini online tool support for assist the exported color data(column/hex data). It can sort the color order by hue.(But it is experimental not perfectly) https://brace.client.jp/wings3d_141/sort.html I used the following page as a reference. https://era86.github.io/2011/11/15/grouping-html-hex-colors-by-hue-in.html RE: New plugins: color tools - edb - 05-28-2023 Hello micheus and tkbd, micheus Wrote:Preview looks OK, but maybe it would work a little different.The preview square will need more changes. I can have the preview square move to opposite sides when it is in the way of the cursor. I'll see what I can do for when the color preview is dismissed. It currently dismisses when the cursor leaves the window as I notice Krita keeps a preview square open even after mouse release until the cursor leaves its color selector (though its preview square has its own borderless window). micheus Wrote:Since it's fast to get many colours in the local lists it would be nice if the window would to be automatically resized (down) to accommodate and show all the colours we have chosen;I'll see what I can do, the color panel also docks it's worth mentioning (it didn't for 2.2.9 for the first build but its now fixed). I could add a compact scroll bar button [v] [^] like InkScape has next to its horizontal palette. micheus Wrote:It can depends on the mesh density, because of the performance, but thinking about to use this panel to speed up the vertex painting it would be nice we have an option to apply the preview color directly on a selection instead of just after release the LMB. Also, because in this process we are looking for a nice color to the object it can flood the color history with unnecessary colours - since by now we need to release the LMB first.That would be neat, there's also the red selection coloring would make sense to have it somehow turn off temporarily during direct preview. micheus Wrote:I'm starting to like it as an independent tool.I'm glad its turning out good, thanks! tkbd Wrote:I checked color delete feature,It works fineThanks for letting me know it works tkbd. tkbd Wrote:So,I made a mini online tool support for assist the exported color data(column/hex data). It can sort the color order by hue.(But it is experimental not perfectly)Access as plain text colors is very convenient especially for tools. Palette Patch There is no significant changes in this latest patch, just a string typo changed and some source commenting (wouldn't change the compile actually) that were made for the pull request. wings_palette_patch.tar RE: New plugins: color tools - tkbd - 05-28-2023 I got a weird segmentation fault11 crash just after Wings3D quit in MacOS. I haven't tested on Windows, does it happen on Windows too? I installed last patches to Wings3D, so it caused by the plugin. How to recreate it
his phenomenon seems to have stopped once Wings3D is closed with the ColorPanel window open. But when do something and quit Wings3D, it reoccurs. Code: Process: beam.smp [2538] RE: New plugins: color tools - edb - 05-28-2023 Hello tkbd, It could be to be that while drawing the bitmap, something (maybe the window) is gone. I'm not completely sure. I might need someone more knowledgeable of erlang runtime and wx module than me. The call stack seems to mention wxBufferedPaintDC::~wxBufferedPaintDC() so this seems it happens during wxBufferedPaintDC being destroyed (and probably painting its buffer to the drawing context). The problem is likely only to the color panel and not the palette patch which only provides some menus to wings_palette and only does file io (doesn't use wx). RE: New plugins: color tools - edb - 05-29-2023 I wonder if the wxBufferedPaintDC crash happens on linux, I haven't seen a crash on windows but I know some of the windows api like GDI is forgiving of using released handles. I'm going to try using wxPaintDC for non-win32 os, I notice this is used for ww_color_slider.erl so mac os and linux might already be double buffered. RE: New plugins: color tools - edb - 05-29-2023 I've made a change, let me know if this helps: wpc_color_panel.tar RE: New plugins: color tools - micheus - 05-29-2023 Thanks for the update. Docking is working now as well as the gradient when the window get narrow (it was trunking a little at right side). |