Extending Tool Settings pane?

See the attached screenshot of the Tool Settings pane for the Geometry Editor Tool.     I'd like to add/trigger functionality around Selection Sets in this view.    Is there any way to catch signals that are emitted when the currenlty selected SelectionSet changes, and/or to add options to the context menu you get when right clicking on one?

I can't find any SDK class definitions for this view, and I don't see anything in the registered set of Actions involving these events.

 

Thanks!

 

2016-05-05 7-32-14 AM.jpg
661 x 421 - 46K

Comments

  • rbtwhizrbtwhiz Posts: 2,267
    edited May 2016

    The "Geometry Editor Tool" (DzPolygonGroupEditorTool*) is not included in the SDK, it is part of a plugin that was being sold at the time that the 4.5+ SDK was first published and, although it is currently provided free of charge (don't read anything into "currently"), is still considered a proprietary tool. This tool derives from an intermediate class (Dz3DBrushTool**) which provides general 3D brush type functionality for multiple tools. This intermediate class is the same one derived from by the "Node Weight Brush" tool (DzNodeWeightBrushTool) through another intermediate class (DzWeightMapBrushTool***). This intermediate 3D brush class derives from another intermediate class (DzPolygonSelectionTool*), which provides the API for interacting with polygon (geometry) selection. This polygon (geoemtry) selection tool class is part of the SDK (in its earlier form), but the generic weight map brush and the 3D brush are not (in the published SDK).

    • DzViewTool
      • DzPolygonSelectionTool *
        • Dz3DBrushTool **
          • DzPolygonGroupEditorTool *
          • DzWeightMapBrushTool ***
            • DzNodeWeightBrushTool
          • ​...

    * Scheduled to be renamed in the next major SDK revision because the class no longer pertains to just polygons.

    ** Scheduled to be added to the next minor SDK revision (we are investigating—but I will not make promises regarding—a potential SDK update for ~4.10.x).

    *** The header for this class is provided with the published SDK but derives from a class that isn't (see above), so effectively isn't

    My point in telling you all of that is to explain that normally you would be able to derive from the class of the tool that you want to extend and reimplment the virtual member functions for the pane and/or menu(s), calling up the chain before making your additions... but because those classes are not included in the published SDK, you cannot take the typical straight-forward approach. I will not say that it is impossible (as software developers, we are conditioned to challenge "impossible"—"where there is a will, there is a way" and all of that), rather I will say that the ways that immediately come to mind are more difficult to get right and less reliable than the method that accomplishes the task by design.

    Are you wanting to know that the selected item in the list has changed or that the selection of geometry associated with the item in the list has changed? If you can tell me what you are ultimately trying to achieve (as opposed to the manner in which you want to achieve it), I may be able to suggest something that uses the API that you do have access to instead of telling you that you don't.

    -Rob

    Post edited by rbtwhiz on
  • shoei321shoei321 Posts: 113

    Rob, thanks for taking the time to provide that background -- it definitely brings to light some of the challenges you guys face maintaining the codebase and the surrounding plugin ecosystem. 

    As for what I'm actually trying to achieve, I need a way to associate properties with SelectionSets.   My duct-tapey approach so far has been to create a DzNode-derived property-carrying scene node for each defined SelectionSet, and associating the property node to its corresponding SelectionSet by name.   This has some obvious problems when you rename or delete a SelectionSet.   Further, there doesn't appear to be any way to get the list of defined SelectionSets via the SDK, only through the scripting interface, so I actually have my SDK code call a script that sends back the list of SelectionSets for a given node.  

    My ideal solution here would be to create a Pane with a DzPropertyListView showing the props for the currently selected SelectionSet.    To do that I need to be able to reference SelectionSets by a non-changing unique identifier (couldn't find one in the SDK or scripting interface) -- doing this by SelectionSet name breaks as soon as a user renames a set.  Doing this by the SelectionSet's index in the list of Sets also doesn't work, since that list appears to be dynamic based on name sort order, and will of course change if you rename one.  

     

    While we're on the topic of future SDK plans, I'd like to throw out a request/suggestion for a set of functionality that would be very welcome surrounding geografted meshes.   If this should be posted elsewhere let me know.   

    An issue I've run into is that while most face/edge/vert-level attributes (such as SelectionSets) are defined on their respective figure nodes,  it is in the context of the resulting grafted AssemblyMesh that I need to know about those attributes.   Stated otherwise -- I need to know which component figure owns a given face/edge/vert of an assembly mesh, and also need to know the face/edge/vert index mapping from assembly mesh to figure mesh.  

    As it stands today I've created a set of utility classes that do this for me already, but only on the vertex level.   I couldn't work out the edge and face relationships between figure and assembly mesh.  

    Thanks

    Ivan

     

     

      

     

     

     

Sign In or Register to comment.