Romania
Joined: Apr 24, 2014
Post Count: 588
Status:
Offline
Select Hide Utility plug-in
I've start learning java two month ago and this is my first script with 90% of my contribution, so don't expect too much. After install You will find an entry under Menu Edit->Select special... This plug-in let You to: - make complex selection at current level and then copy/delete/paste or - hide selected and so on. Hope the interface are self explained. PROBLEMS: 1. Conflict with Utility2Plugin; can't coexist so chose one. 2. I've don't know (yet) how to implement correctly the UNDO-REDO action. In this version, undo (only for hide/show section) work acceptable BUT redo didn't! 3. That's being said I recommend to test on an test-file or backup.
The plug-in with sources and licence GPL included could be find here Select Hide Plugin or at Source Forge
---------------------------------------- A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law) When all else fails, read the instructions.Murphy's Law
France
Joined: Nov 7, 2005
Post Count: 9381
Status:
Offline
Re: Select Hide Utility plug-in
Congratulations for your first plug-in
It's great that your plug-in provides some missing selection features and I've been wondering myself for a while how adding some Select all walls, Select all rooms, etc menu items could be useful. About searching furniture by name, it coud be nice to look for the furniture inside groups and subgroups. If programming a recursive method is too complicated, you could also use the getAllFurniture method in HomeFurnitureGroup class. About searching windows, it looks like you search them from their name, but then it will work only if the furniture name contains "window" word, making this option misleading compared to the Doors option which selects all doors and windows.
And why did you choose to provide two different actions (selecting and hiding/showing) in one dialog box with tabs? I wonder if it would be clearer to program two menu different items...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
Romania
Joined: Apr 24, 2014
Post Count: 588
Status:
Offline
Re: Select Hide Utility plug-in
Thank you, Emmanuel! For someone who just start to learn java is a honor! But "retourner à nos moutons". 1. About
And why did you choose to provide two different actions (selecting and hiding/showing) in one dialog box with tabs? I wonder if it would be clearer to program two menu different items...
In my mind was to kip the sweethome3d as simple as possible; I don't want to pollute the menu more than necessary. I get inspiration from LibreOffice where is Paste special... entry and than a lot of option (only for those who want). When you have all the plugins installed and have more than 12~15 entry in one menu it's like you need to read Shakespeare again and again. 2.
I've been wondering myself for a while how adding some Select all walls, Select all rooms, etc menu items could be useful
I don't think so. For the standard program You have already implement the basic option. Who need more could install plugins. 3.
About searching furniture by name, it coud be nice to look for the furniture inside groups and subgroups
Indeed, me or someone else will try to improve it. My fault is I don't make fully tests and this (and maybe others) I missed it. 4.
If programming a recursive method is too complicated, you could also use the getAllFurniture method in HomeFurnitureGroup class
For me everything is complicated and if is not, I made it to be. Anyway is not the single problem; I have to implement internationalization, the redo action etc. 5.
About searching windows, it looks like you search them from their name, but then it will work only if the furniture name contains "window" word, making this option misleading compared to the Doors option which selects all doors and windows
Is true, but I don't find a specific criteria to make difference between door, window or service hatch wile all are the same and I don't want to select/hide all. The same situation are for staircase and for lamps. A stair without cutOutShape or a lamp without light are like all other furniture and I don't find a bather way to identify them.
6.(and the last) This plugin and the next few are part of my learning java curve. Now I've start a fight whit another useless plugin which don't want to work as I want. As usual I've made the final (graphic interface) but I don't manage yet to make it functional. I don't give up even if I need to start from "Hello java World" part which I skip it like many others
---------------------------------------- A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law) When all else fails, read the instructions.Murphy's Law
Western Europa
Joined: Mar 29, 2014
Post Count: 2614
Status:
Offline
Re: Select Hide Utility plug-in
...
The plug-in with sources and licence GPL included could be find here Select Hide Plugin ...
Hi dorin,
After followed the link and installed the given plugin, I have this :
Why ?
More, with this version, option 5 doesn't work.
TY for your return. Regards. .
----------------------------------------
Evil progresses when good people do nothing! --- SH3D 7.1 and nothing else - W11 64b in 4K
Romania
Joined: Apr 24, 2014
Post Count: 588
Status:
Offline
Re: Select Hide Utility plug-in
New version (1.1) Accordingly with Murphy's Low when try to prove something is the moment when fail. I've try show to a friend how it work and I've make some choices on plug-in. Result = nothing!; nothing select; nothing hide; no errors. After few attempts I realize I want to make actions on objects that not exist at selected level (not belong to it). That's being said I've add few messages to inform user what's going on. Maybe I don't cover all possible situations but You will see. I update also on Source Forge .
---------------------------------------- A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law) When all else fails, read the instructions.Murphy's Law
Romania
Joined: Apr 24, 2014
Post Count: 588
Status:
Offline
Re: Select Hide Utility plug-in
New version 1.2 and on Source Forge -add localization (now only French); -add icon
---------------------------------------- A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law) When all else fails, read the instructions.Murphy's Law
Romania
Joined: Apr 24, 2014
Post Count: 588
Status:
Offline
Re: Select Hide Utility plug-in
New version 1.3 - solve door selection Also on Source Forge
---------------------------------------- A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law) When all else fails, read the instructions.Murphy's Law
-fix a bug to prevent selection of hided items from hided levels
-modify how doors and windows are treated: door if elevation < 6 cm and window if elevation >=6 cm
-add search and selection in group of furniture thanks to: @Puybaret for pointing me to the right direction AND @Enko Nyito from who I stole the code
-add icon on toolbar (a green square)
Note: The plugin became active only if the plan window are selected Also on Source Forge
---------------------------------------- A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law) When all else fails, read the instructions.Murphy's Law
Romania
Joined: Apr 24, 2014
Post Count: 588
Status:
Offline
Re: Select Hide Utility plug-in
New version 1.5 -fix undo/redo for hide/show action; for select action I consider is useless -modify a little the icon; I've add an "S" on it; is visible also on toolbar
To remember how should look:
As usual have a kind of translation in french. Also on Source Forge
---------------------------------------- A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law) When all else fails, read the instructions.Murphy's Law