<commit_before>
import textwrap

def splice(operator, command, *args, **kwargs):
    return Application.fabricSplice(command, operator, str(kwargs), *args)


def set_kl(operator, op_name, code):
    splice(operator, "addKLOperator", opName=op_name)
    splice(operator, "setKLOperatorCode", code, opName=op_name)


def draw_bones_traditional(points):
    assert len(points) >= 3
    start = points[0]
    mid   = points[1]
    end   = points[2]
    Application.Create3DSkeleton(
            start[0], start[1], start[2],
            mid[0],   mid[1], mid[2],
            end[0],   end[1], end[2],
        "", "")

    for p in points[3:]:
        x = p[0]
        y = p[1]
        z = p[2]
        Application.AppendBone("eff", x, y, z, False)




Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
klCode = textwrap.dedent("""
require Math;
require Characters;
require FABRIK;

require InlineDrawing;

operator initCharacter( io Skeleton skeleton, io DrawingHandle handle, io FFBIKGraph fbg, in Mat44 ik_handles[], io FABRIKResolver resolver ) {

  //////////////////////////////////
  // Generate a chain of bones with a random shape.

  //Skeleton skeleton = Skeleton();

    report( "hello" );

    if( skeleton.bones.size() == 0 ) {
        Bone bones[];
        bones.resize(0);
        report( "init skeleton" );<commit_msg>update softimage sample, fix initial effectors position<commit_after>
import textwrap

def splice(operator, command, *args, **kwargs):
    return Application.fabricSplice(command, operator, str(kwargs), *args)


def set_kl(operator, op_name, code):
    splice(operator, "addKLOperator", opName=op_name)
    splice(operator, "setKLOperatorCode", code, opName=op_name)


def draw_bones_traditional(points):
    assert len(points) >= 3
    start = points[0]
    mid   = points[1]
    end   = points[2]
    Application.Create3DSkeleton(
            start[0], start[1], start[2],
            mid[0],   mid[1], mid[2],
            end[0],   end[1], end[2],
        "", "")

    for p in points[3:]:
        x = p[0]
        y = p[1]
        z = p[2]
        Application.AppendBone("eff", x, y, z, False)




Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
Application.Translate("", 7.21095660746,      14.9754557972,  -0.257095710115)
Application.GetPrim("Null", "", "Scene_Root", "")
Application.Translate("", -7.21079536001,     14.9612588443,  -0.2533093422)
Application.GetPrim("Null", "", "Scene_Root", "")
Application.Translate("", 1.5139886508,       0.913547291364, -0.29962025889)
Application.GetPrim("Null", "", "Scene_Root", "")
Application.Translate("", -1.5139886508,      0.913547291364, -0.299620258891)
Application.GetPrim("Null", "", "Scene_Root", "")
Application.GetPrim("Null", "", "Scene_Root", "")
klCode = textwrap.dedent("""
require Math;
require Characters;
require FABRIK;

require InlineDrawing;

operator initCharacter( io Skeleton skeleton, io DrawingHandle handle, io FFBIKGraph fbg, in Mat44 ik_handles[], io FABRIKResolver resolver ) {

  //////////////////////////////////
  // Generate a chain of bones with a random shape.

  //Skeleton skeleton = Skeleton();

    report( "hello" );

    if( skeleton.bones.size() == 0 ) {
        Bone bones[];
        bones.resize(0);
        report( "init skeleton" );
{'fraction_non_alphanumeric': 0.18773946360153257, 'fraction_numerical': 0.04827586206896552, 'mean_word_length': 3.5271676300578036, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3631519', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1269, 'n_words': 282}