need find command (was: attribute list options)
Open Source Solid Modeling CAD
Brought to you by:
brlcad
1. A tool to list all combinations which have non-
standard attributes i.e. things other than REGION id, air,
los, GIFTmaterial and also list the names of the
attributes.
e.g.
Comb Attribute name
-----------------------------------
pump part number
engine displacement
engine missing items
2. A tool to list all combinations which have shader
properties.
Suggestions:
Add options to the attr command.
attr -all (for all combinations with non-standard attributes)
attr -color(for all with shaders) or -shader
Reasoning:
Non-standard attributes can are essentially hidden in the
database currently.
Logged In: YES
user_id=11463
Originator: NO
Rather than adding options to attr, the proper way to address this is to implement a find command inside BRL-CAD which supports these types of queries. Changing summary accordingly.
There is now a "search" command in trunk (as of r32607) that will handle the shader portion and part of the non-standard request.
1. There is a -stdattr option to search that will return a match if the object is using one or more attributes and no non-standard attributes. To search as requested for attr -all, do:
search / -attr \* -not -stdattr
in mged. This will produce a list of objects with non-standard attributes but will not print the attributes.
2. The shader option is completely handled by the attr option to search:
search / -attr oshader
For more advanced uses:
search / -attr oshader=glass -attr rgb=255/255/255
To do a 'flat' search (where each object is returned only once) do:
search . -attr \* -not -stdattr
Talked with Dwayne - functionality here takes care of the locating objects parts of the request. Mutually agreed to close this request and open a new one to enhance idents/wcodes/rcodes functionality or other appropriate reporting function with the ability to output just non-standard attribute information.