Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
piffpoof
Posts: 346
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: Potential Function Request - Select All Children of Object in Tree View

Post by piffpoof »

microelly2 wrote:I have done some work on browsing the object net
https://www.youtube.com/watch?v=5evyAtZLnEg
https://github.com/microelly2/freecad-objecttree
does it make sense to add the requested action to this?
hi microelley

I'm not clear on which way you mean "does it make sense to add the requested action to this?"? Do you mean should I add your software functionality to my request, or do you mean should you add my request to your software. Sorry, but I'm not clear.

I watched your YouTube and your software looks very good. I think my Mantis Feature Requests are much simpler. Essentially they are two things:
  • migrate the Utility sub-menu Yorik put in the Architecture workbench to the other workbenches as a point of utility and customisation
  • migrate the "Select Children" option from the Utility menu in the Architecture workbench to the other workbenches and also extend it or add an option to select all the children of the selected object (the current version only selects the children at the next lower level)
My reason for this request is when I am using the Combo View to manage the object tree it would be the quickest to be able to select a complete tree with one right-click. Running a Macro or toolbar is slower and more intrusive to the workflow. My most frequent use of such a selection is for Deleting, Toggling the Visibility, and Copying. Speaking for myself I am never looking to explore the tree when I select the complete tree, only to move it or remove it. When I need to explore the tree, it would make sense to use your software as it seems to perform that function very well.

I'm not a developer for FreeCAD internals and so can not say, but I do wonder if we move the Utility menu to all the workbenches, will we will be able to use Macros there? Maybe their runtime would be slightly different and so there would have to be 2 flavours of Macros, or rather a switch at the top of the Macro file saying that the file was to execute in the right-click menu environment. And then again, if there was a system variable to check the same code could maybe run in both environments (i.e. regular Macro environment as we know it now, and within the right-click menu environment) based on the value of that system variable. These are just some of my ideas, as I said I don't develop this type of code and so can't say any thing authoritative, only speculative.

Dean
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by uwestoehr »

Here is a pull request that also adds this feature:
https://github.com/FreeCAD/FreeCAD/pull/4133

You will have a context menu independent of the workbench to select the childs. So you can now e.g. select a whole body with all its members, or you can get all objects withing one document:
xwANlnvFk1.gif
xwANlnvFk1.gif (351.86 KiB) Viewed 1635 times
(In the screencast you see that the context menu entry will not occur if your selection is across documents.)

If your selection is within a document you can have multiple selections:
yN5bvun2ei.gif
yN5bvun2ei.gif (118.92 KiB) Viewed 1635 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by uwestoehr »

uwestoehr wrote: Sun Dec 13, 2020 1:03 am Here is a pull request that also adds this feature:
https://github.com/FreeCAD/FreeCAD/pull/4133
This has now been merged.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by TheMarkster »

I think this will prove very useful.
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by drmacro »

TheMarkster wrote: Tue Oct 26, 2021 4:02 am I think this will prove very useful.
Not that I think one way or the other...

Can you outline a use case?

I have always used ctrl-click or shift-click for such things.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by uwestoehr »

drmacro wrote: Tue Oct 26, 2021 10:16 am I have always used ctrl-click or shift-click for such things.
How did you know what depends on each other?
The need to select dozens of objects consumes a lot of time.

With the new feature you can achieve this with just 2 clicks:
cUOo89rwBM.gif
cUOo89rwBM.gif (45.22 KiB) Viewed 1367 times
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by drmacro »

uwestoehr wrote: Tue Oct 26, 2021 11:15 am
drmacro wrote: Tue Oct 26, 2021 10:16 am I have always used ctrl-click or shift-click for such things.
How did you know what depends on each other?
The need to select dozens of objects consumes a lot of time.

With the new feature you can achieve this with just 2 clicks:
cUOo89rwBM.gif
Hmm...I see.

Not implying I don't see the utility, but...

What is your need to know the dependencies of a TechDraw view?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by Roy_043 »

I have a Part_Box whose width is Spreadsheet.MyWidth. So the Box depends on the Spreadsheet for its width. But the "Add dependent objects to selection" tool works the other way around. According to the tool the Spreadsheet is a dependency of the Box and the Spreadsheet has no dependencies. Therefore the menu text seems wrong to me, but native speakers may disagree.

InList vs OutList
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by uwestoehr »

drmacro wrote: Tue Oct 26, 2021 11:35 am What is your need to know the dependencies of a TechDraw view?
Personal use:
- I often have several bodies in a document and when I performed several boolean operations, it is hard to see what depends on what
- I want to delete a certain feature, not only e.g. a boolean operation, also the underlying things.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Tickets #2396 and #2397 - Potential Function Request - Select All Children of Object in Tree View

Post by uwestoehr »

Roy_043 wrote: Sun Oct 31, 2021 6:45 pm the Spreadsheet has no dependencies.
When you right-click on a spreadsheet there is no context menu to show its dependencies. I miss this feature too since I want to see what objects use dimensions defined in the spreadsheet.

Maybe @chennes knows a quick way to implement this since he recently worked with the code.
chennes wrote: Mon Nov 01, 2021 3:33 am .
There are several issues with spreadsheets and it seems @realthunder already fixed many in his branch. However, the focus is now to include his toponaming work before other things will be backported. @chennes, please correct me when you have more insights.
Post Reply