Custom Object - always show ShortDescription when selecting

I have a custom object derived from CustomMeshObject that overrides the ShortDescription to show the type of mesh.

public override string ShortDescription(bool plural)
{
    return plural ? "my grids" : "my grid";
}

Now, if I use _SelAll I see the following:

562 points, 83 curves, 6 polysurfaces, 18 surfaces, 19 my grids added to selection.
Cool! that works :smile:

But, if I use _SelMesh I see this:
19 meshes added to selection

It would be nice if the ShortDescription is also used when _SelMesh is used.

Yes it would be nice, but I doubt there is anything we can do here.

All “Sel” commands count up selected objects by “casting” them to known types. Since your custom object is derived from a mesh object, it passes the casting test and, thus, is counted as a mesh. There is no way for us to know the mesh object is actually some other type of object.

Well, what I’m saying is that SelAll does print ShortDescription but SelMesh does not. So, if SelAll can print it, why can’t SelMesh?

I suppose that all the Sel commands can also try to cast to CustomMeshObject (the base class that I derived from) and read the ShortDescription property in that case. But, not knowing the internals of Rhino, this is pure conjecture of course :smile:

Can I just draw your attention here once more (I know, it has been a while :wink:) Could this still be realized in Rhino WIP? I’m still seeing my custom objects not with their ShortDescription, except with SelAll

https://mcneel.myjetbrains.com/youtrack/issue/RH-37788