I'm currently trying to generalize "point controls" for states to make a framework for tools creating. The idea is create something similar to what you have in game engines (from UI perspective).
So you have point like an object with transform and arbitrary set of properties (attributes). In state you can transform selected point and edit its properties in "inspector" (parameters pane in Houdini). This approach is very limiting, no channel expressions so no animations, and destructive. However at the same time it's surprisingly very flexible for tools. Set of points with data can represents so many inputs and manual editing can be very helpful in procedural workflow.
Current features:
- Base state to derive to create a "point controls" state
- Attributes "inspector" for points utilizing parameters pane. So inspector UI editing is available out of the box
- Mass transform (with optional box transform handle)
- Custom selections without using built-in one
- Multi editing of attributes (select points and adjust attribute for all of them)
- Support for custom collider. State stores all collisions in special attributes so it can be used as an anchor placer
From UX point of view it's like an uber Add SOP for points that can also edit attributes.
The very basic example would be metaball editor:
The state code is as simple as:
class State(PointControlsState): def __init__(self, state_name, scene_viewer): super(State, self).__init__(state_name, scene_viewer) self.point_controls.projection_mode = ProjectionType.FREE self.add_point_attribute("weight", 2.0, control_parm="weight", allow_multiedit=True) self.add_point_attribute("Cd", (1.0, 1.0, 1.0), control_parm="color", allow_multiedit=True) self.add_point_attribute("kernel", "wyvill", control_parm="kernel", allow_multiedit=True) self.add_point_attribute("roundness", 1.0, control_parm="roundness", allow_multiedit=True) self.allow_box_transform = False self.allow_box_selection = True self.allow_mass_moving = True
Basically just a defining attributes and linking them to the node parameters. Base state will take care of the rest.
Then downstream we just copy metaballs to points and that's it.
For modelling metaballs are little bit silly, but being basically sdf they are quite responsive and can be used as less destructive alternative to Attribute Paint.