Skip to content
Snippets Groups Projects
  • Demeter Dzadik's avatar
    d3299824
    Rigify: allow passing Armature "targets" as a kwarg for make_constraint. · d3299824
    Demeter Dzadik authored
    It seems like the make_constraint() function was designed to allow fully
    defining a constraint with a single call, but currently when creating
    Armature constraints, its targets have to be created separately after
    the make_constraint() call.
    
    This patch addresses this, allowing you to pass a "targets" dictionary.
    Armature constraint targets only have three properties, which are "target",
    "subtarget" and "weight". For convenience, since 99.99% of the times the
    "target" will be the rig, that doesn't have to be specified, but it can be.
    
    Differential Revision: https://developer.blender.org/D9092
    d3299824
    History
    Rigify: allow passing Armature "targets" as a kwarg for make_constraint.
    Demeter Dzadik authored
    It seems like the make_constraint() function was designed to allow fully
    defining a constraint with a single call, but currently when creating
    Armature constraints, its targets have to be created separately after
    the make_constraint() call.
    
    This patch addresses this, allowing you to pass a "targets" dictionary.
    Armature constraint targets only have three properties, which are "target",
    "subtarget" and "weight". For convenience, since 99.99% of the times the
    "target" will be the rig, that doesn't have to be specified, but it can be.
    
    Differential Revision: https://developer.blender.org/D9092