Feature request for mesh pinning tool

Issue #1205 resolved
jeroen b created an issue

The mesh pinning tool is a very useful feature and not just for hair.

I wonder if it would be possible to improve the pinning tool with an extra movable control-point & smoothed transition, like in Blenders custom curve?

Comments (5)

  1. Thomas Larsson repo owner

    Interesting suggestion, but I don’t know how to implement this. The natural idea seems to be to use a pointer property, like this:

    curve : PointerProperty(name="Falloff", type=bpy.types.CurveMapping)
    

    but that resulted in a type error:

    TypeError: PointerProperty(...) expected an RNA type derived from ID or ID Property Group
    

    If anybody knows how to add a curve mapping widget to a dialog I would be interested.

  2. jeroen b reporter

    I posted the question here; https://blenderartists.org/t/how-to-include-a-custom-curve-tool-into-an-addon-dialogue/1414970

    One reply at the moment;

    Years ago we would create a ShaderNodeVectorCurve and pass it to the layout as:

    layout.template_curve_mapping(curve_node, "mapping").

    The drawback is, not only must we ensure it exists in some node tree and create it if not, update callbacks must be put on idle callbacks, because Blender dislikes modifying things inside the UILayout draw context.

    I have no clue if this is useful though.

  3. jeroen b reporter

    Great job Thomas, works like a dream!

    This will make creating a good pinning group a lot easier, thanks again!

  4. Log in to comment