-- cgit v1.2.3 From 1e2e08085319712183aa8171c003c851f7707ce1 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 25 Jul 2011 15:27:01 +0000 Subject: =?UTF-8?q?Adding=20WeightVG=20modifiers=20code.=20Still=20some=20?= =?UTF-8?q?points=20to=20tweak,=20though.=20NOTE=C2=A0:=20Haven=E2=80=99t?= =?UTF-8?q?=20yet=20tested=20build=20with=20scons,=20will=20do=20asap=20(u?= =?UTF-8?q?nless=20someone=20else=20does=20:)=20).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- release/datafiles/blenderbuttons | Bin 210335 -> 211021 bytes .../startup/bl_ui/properties_data_modifier.py | 129 + source/blender/blenloader/intern/readfile.c | 24 +- source/blender/blenloader/intern/writefile.c | 6 + source/blender/editors/datafiles/blenderbuttons.c | 13170 ++++++++++--------- source/blender/editors/include/UI_icons.h | 3 +- source/blender/editors/space_outliner/outliner.c | 4 + source/blender/makesdna/DNA_modifier_types.h | 167 +- source/blender/makesrna/RNA_access.h | 3 + source/blender/makesrna/intern/rna_modifier.c | 377 + source/blender/modifiers/CMakeLists.txt | 5 + source/blender/modifiers/MOD_modifiertypes.h | 3 + source/blender/modifiers/intern/MOD_util.c | 3 + .../blender/modifiers/intern/MOD_weightvg_util.c | 246 + .../blender/modifiers/intern/MOD_weightvg_util.h | 82 + source/blender/modifiers/intern/MOD_weightvgedit.c | 343 + source/blender/modifiers/intern/MOD_weightvgmix.c | 433 + .../modifiers/intern/MOD_weightvgproximity.c | 512 + 18 files changed, 8933 insertions(+), 6577 deletions(-) create mode 100644 source/blender/modifiers/intern/MOD_weightvg_util.c create mode 100644 source/blender/modifiers/intern/MOD_weightvg_util.h create mode 100644 source/blender/modifiers/intern/MOD_weightvgedit.c create mode 100644 source/blender/modifiers/intern/MOD_weightvgmix.c create mode 100644 source/blender/modifiers/intern/MOD_weightvgproximity.c diff --git a/release/datafiles/blenderbuttons b/release/datafiles/blenderbuttons index 9872e53585e..609a4d55ebc 100644 Binary files a/release/datafiles/blenderbuttons and b/release/datafiles/blenderbuttons differ diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index ce6d0990f05..18ae7ec2be6 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -735,5 +735,134 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): col.prop(md, "width", slider=True) col.prop(md, "narrowness", slider=True) + @staticmethod + def weight_vg_mask(layout, ob, md): + layout.label(text="Influence/Mask Options:") + split = layout.split() + col1 = split.column() + col2 = split.column() + + col1.label(text="Global Influence:") + col2.prop(md, "mask_constant", text="") + + if not md.mask_texture: + col1.label(text="Vertex Group Mask:") + col2.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="") + + if not md.mask_vertex_group: + col1.label(text="Texture Mask:") + col2.template_ID(md, "mask_texture", new="texture.new") + if md.mask_texture: + split = layout.split() + col = split.column() + col.label(text="Texture Coordinates:") + col.prop(md, "mask_tex_mapping", text="") + col = split.column() + col.label(text="Use Channel:") + col.prop(md, "mask_tex_use_channel", text="") + + if md.mask_tex_mapping == 'OBJECT': + layout.prop(md, "mask_tex_map_obj", text="Object") + elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH': + layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures") + + def WEIGHT_VGEDIT(self, layout, ob, md): + if ob.type == 'MESH': + split = layout.split() + col = split.column() + col.label(text="Vertex Group:") + col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + + col = split.column() + col.label(text="Default Weight:") + col.prop(md, "default_weight", text="") + + layout.prop(md, "flag_map") + if md.flag_map: + split = layout.split() + col = split.column() + col.label("Input:") + col.label("Output:") + col = split.column() + col.prop(md, "map_input_low", text="Min") + col.prop(md, "map_output_low", text="Min") + col = split.column() + col.prop(md, "map_input_high", text="Max") + col.prop(md, "map_output_high", text="Max") + + layout.prop(md, "flag_curve_map") + if md.flag_curve_map: + row = layout.row() + row.template_curve_mapping(md, "cmap_curve") + + layout.prop(md, "flag_reverse") + + layout.prop(md, "flag_clamp") + if md.flag_clamp: + row = layout.row() + row.prop(md, "clamp_min_weight") + row.prop(md, "clamp_max_weight") + + row = layout.row() + row.prop(md, "flag_add2vg") + row.prop(md, "flag_remfvg") + row = layout.row() + if md.flag_add2vg: + row.prop(md, "add_threshold") + if md.flag_remfvg: + row.prop(md, "rem_threshold") + + # Common mask options… + layout.separator() + self.weight_vg_mask(layout, ob, md) + + def WEIGHT_VGMIX(self, layout, ob, md): + if ob.type == 'MESH': + split = layout.split() + col = split.column() + col.label(text="Vertex Group 1:") + col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + col.label(text="Default Weight 1:") + col.prop(md, "default_weight", text="") + + col.label(text="Mix Mode:") + col.prop(md, "mix_mode", text="") + + col = split.column() + col.label(text="Vertex Group 2:") + col.prop_search(md, "vertex_group2", ob, "vertex_groups", text="") + col.label(text="Default Weight 2:") + col.prop(md, "default_weight2", text="") + + col.label(text="Mix Set:") + col.prop(md, "mix_set", text="") + + # Common mask options… + layout.separator() + self.weight_vg_mask(layout, ob, md) + + def WEIGHT_VGPROXIMITY(self, layout, ob, md): + if ob.type == 'MESH': + split = layout.split() + col = split.column() + col.label(text="Vertex Group:") + col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + + col = split.column() + col.label(text="Target Object:") + col.prop(md, "ob_target", text="") + + row = layout.row() + row.prop(md, "proximity_mode", expand=True) + if md.proximity_mode == 'OBJ2VERTDIST': + row = layout.row() + row.prop(md, "obj2vert_verts") + row.prop(md, "obj2vert_edges") + row.prop(md, "obj2vert_faces") + + # Common mask options… + layout.separator() + self.weight_vg_mask(layout, ob, md) + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4ad99c02b2d..e21a132d16d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4154,6 +4154,13 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) if(tmd->curfalloff) direct_link_curvemapping(fd, tmd->curfalloff); } + else if (md->type==eModifierType_WeightVGEdit) { + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + + wmd->cmap_curve = newdataadr(fd, wmd->cmap_curve); + if(wmd->cmap_curve) + direct_link_curvemapping(fd, wmd->cmap_curve); + } } } @@ -11707,7 +11714,22 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* put compatibility code here until next subversion bump */ { - + Object *ob; + ModifierData *md; + + /* WeightVGEdit modifier: CurveMapping pointer… */ + for(ob = main->object.first; ob; ob = ob->id.next) { + for(md = ob->modifiers.first; md; md = md->next) { + if(md->type == eModifierType_WeightVGEdit) { + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + if (wmd->cmap_curve == NULL) { + wmd->cmap_curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); + curvemapping_initialize(wmd->cmap_curve); + } + } + } + } + } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index bf86527b9d3..8658462c53e 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1294,6 +1294,12 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) write_curvemapping(wd, tmd->curfalloff); } } + else if (md->type==eModifierType_WeightVGEdit) { + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + + if (wmd->cmap_curve) + write_curvemapping(wd, wmd->cmap_curve); + } } } diff --git a/source/blender/editors/datafiles/blenderbuttons.c b/source/blender/editors/datafiles/blenderbuttons.c index 7525015bca9..ee88f8f6f4a 100644 --- a/source/blender/editors/datafiles/blenderbuttons.c +++ b/source/blender/editors/datafiles/blenderbuttons.c @@ -3,6580 +3,6602 @@ */ /* DataToC output of file */ -int datatoc_blenderbuttons_size= 210335; +int datatoc_blenderbuttons_size= 211021; char datatoc_blenderbuttons[]= { -137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 2, 90, 0, 0, 2,128, 8, 6, 0, 0, 0, 68,254, -214,163, 0, 0, 10, 79,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,105,108,101, 0, - 0,120,218,157, 83,103, 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148, 75,111, 82, 21, 8, 32, 82, 66,139,128, 20,145, 38, - 42, 33, 9, 16, 74,136, 33,161,217, 21, 81,193, 17, 69, 69, 4, 27,200,160,136, 3,142,142,128,140, 21, 81, 44, 12,138, 10,216, - 7,228, 33,162,142,131,163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,215, 62,231,172,243,157,179,207, 7,192, - 8, 12,150, 72, 51, 81, 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,228, 46, 64,129, 10, 36,112, 0, 16, 8,179,100, 33, -115,253, 35, 1, 0,248,126, 60, 60, 43, 34,192, 7,190, 0, 1,120,211, 11, 8, 0,192, 77,155,192, 48, 28,135,255, 15,234, 66, -153, 92, 1,128,132, 1,192,116,145, 56, 75, 8,128, 20, 0, 64,122,142, 66,166, 0, 64, 70, 1,128,157,152, 38, 83, 0,160, 4, - 0, 96,203, 99, 98,227, 0, 80, 45, 0, 96, 39,127,230,211, 0,128,157,248,153,123, 1, 0, 91,148, 33, 21, 1,160,145, 0, 32, - 19,101,136, 68, 0,104, 59, 0,172,207, 86,138, 69, 0, 88, 48, 0, 20,102, 75,196, 57, 0,216, 45, 0, 48, 73, 87,102, 72, 0, -176,183, 0,192,206, 16, 11,178, 0, 8, 12, 0, 48, 81,136,133, 41, 0, 4,123, 0, 96,200, 35, 35,120, 0,132,153, 0, 20, 70, -242, 87, 60,241, 43,174, 16,231, 42, 0, 0,120,153,178, 60,185, 36, 57, 69,129, 91, 8, 45,113, 7, 87, 87, 46, 30, 40,206, 73, - 23, 43, 20, 54, 97, 2, 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,243,204, 0, 0,160,145, 21, 17,224,131,243,253,120, -206, 14,174,206,206, 54,142,182, 14, 95, 45,234,191, 6,255, 34, 98, 98,227,254,229,207,171,112, 64, 0, 0,225,116,126,209,254, - 44, 47,179, 26,128, 59, 6,128,109,254,162, 37,238, 4,104, 94, 11,160,117,247,139,102,178, 15, 64,181, 0,160,233,218, 87,243, -112,248,126, 60, 60, 69,161,144,185,217,217,229,228,228,216, 74,196, 66, 91, 97,202, 87,125,254,103,194, 95,192, 87,253,108,249, -126, 60,252,247,245,224,190,226, 36,129, 50, 93,129, 71, 4,248,224,194,204,244, 76,165, 28,207,146, 9,132, 98,220,230,143, 71, -252,183, 11,255,252, 29,211, 34,196, 73, 98,185, 88, 42, 20,227, 81, 18,113,142, 68,154,140,243, 50,165, 34,137, 66,146, 41,197, - 37,210,255,100,226,223, 44,251, 3, 62,223, 53, 0,176,106, 62, 1,123,145, 45,168, 93, 99, 3,246, 75, 39, 16, 88,116,192,226, -247, 0, 0,242,187,111,193,212, 40, 8, 3,128,104,131,225,207,119,255,239, 63,253, 71,160, 37, 0,128,102, 73,146,113, 0, 0, - 94, 68, 36, 46, 84,202,179, 63,199, 8, 0, 0, 68,160,129, 42,176, 65, 27,244,193, 24, 44,192, 6, 28,193, 5,220,193, 11,252, - 96, 54,132, 66, 36,196,194, 66, 16, 66, 10,100,128, 28,114, 96, 41,172,130, 66, 40,134,205,176, 29, 42, 96, 47,212, 64, 29, 52, -192, 81,104,134,147,112, 14, 46,194, 85,184, 14, 61,112, 15,250, 97, 8,158,193, 40,188,129, 9, 4, 65,200, 8, 19, 97, 33,218, -136, 1, 98,138, 88, 35,142, 8, 23,153,133,248, 33,193, 72, 4, 18,139, 36, 32,201,136, 20, 81, 34, 75,145, 53, 72, 49, 82,138, - 84, 32, 85, 72, 29,242, 61,114, 2, 57,135, 92, 70,186,145, 59,200, 0, 50,130,252,134,188, 71, 49,148,129,178, 81, 61,212, 12, -181, 67,185,168, 55, 26,132, 70,162, 11,208,100,116, 49,154,143, 22,160,155,208,114,180, 26, 61,140, 54,161,231,208,171,104, 15, -218,143, 62, 67,199, 48,192,232, 24, 7, 51,196,108, 48, 46,198,195, 66,177, 56, 44, 9,147, 99,203,177, 34,172, 12,171,198, 26, -176, 86,172, 3,187,137,245, 99,207,177,119, 4, 18,129, 69,192, 9, 54, 4,119, 66, 32, 97, 30, 65, 72, 88, 76, 88, 78,216, 72, -168, 32, 28, 36, 52, 17,218, 9, 55, 9, 3,132, 81,194, 39, 34,147,168, 75,180, 38,186, 17,249,196, 24, 98, 50, 49,135, 88, 72, - 44, 35,214, 18,143, 19, 47, 16,123,136, 67,196, 55, 36, 18,137, 67, 50, 39,185,144, 2, 73,177,164, 84,210, 18,210, 70,210,110, - 82, 35,233, 44,169,155, 52, 72, 26, 35,147,201,218,100,107,178, 7, 57,148, 44, 32, 43,200,133,228,157,228,195,228, 51,228, 27, -228, 33,242, 91, 10,157, 98, 64,113,164,248, 83,226, 40, 82,202,106, 74, 25,229, 16,229, 52,229, 6,101,152, 50, 65, 85,163,154, - 82,221,168,161, 84, 17, 53,143, 90, 66,173,161,182, 82,175, 81,135,168, 19, 52,117,154, 57,205,131, 22, 73, 75,165,173,162,149, -211, 26,104, 23,104,247,105,175,232,116,186, 17,221,149, 30, 78,151,208, 87,210,203,233, 71,232,151,232, 3,244,119, 12, 13,134, - 21,131,199,136,103, 40, 25,155, 24, 7, 24,103, 25,119, 24,175,152, 76,166, 25,211,139, 25,199, 84, 48, 55, 49,235,152,231,153, - 15,153,111, 85, 88, 42,182, 42,124, 21,145,202, 10,149, 74,149, 38,149, 27, 42, 47, 84,169,170,166,170,222,170, 11, 85,243, 85, -203, 84,143,169, 94, 83,125,174, 70, 85, 51, 83,227,169, 9,212,150,171, 85,170,157, 80,235, 83, 27, 83,103,169, 59,168,135,170, -103,168,111, 84, 63,164,126, 89,253,137, 6, 89,195, 76,195, 79, 67,164, 81,160,177, 95,227,188,198, 32, 11, 99, 25,179,120, 44, - 33,107, 13,171,134,117,129, 53,196, 38,177,205,217,124,118, 42,187,152,253, 29,187,139, 61,170,169,161, 57, 67, 51, 74, 51, 87, -179, 82,243,148,102, 63, 7,227,152,113,248,156,116, 78, 9,231, 40,167,151,243,126,138,222, 20,239, 41,226, 41, 27,166, 52, 76, -185, 49,101, 92,107,170,150,151,150, 88,171, 72,171, 81,171, 71,235,189, 54,174,237,167,157,166,189, 69,187, 89,251,129, 14, 65, -199, 74, 39, 92, 39, 71,103,143,206, 5,157,231, 83,217, 83,221,167, 10,167, 22, 77, 61, 58,245,174, 46,170,107,165, 27,161,187, - 68,119,191,110,167,238,152,158,190, 94,128,158, 76,111,167,222,121,189,231,250, 28,125, 47,253, 84,253,109,250,167,245, 71, 12, - 88, 6,179, 12, 36, 6,219, 12,206, 24, 60,197, 53,113,111, 60, 29, 47,199,219,241, 81, 67, 93,195, 64, 67,165, 97,149, 97,151, -225,132,145,185,209, 60,163,213, 70,141, 70, 15,140,105,198, 92,227, 36,227,109,198,109,198,163, 38, 6, 38, 33, 38, 75, 77,234, - 77,238,154, 82, 77,185,166, 41,166, 59, 76, 59, 76,199,205,204,205,162,205,214,153, 53,155, 61, 49,215, 50,231,155,231,155,215, -155,223,183, 96, 90,120, 90, 44,182,168,182,184,101, 73,178,228, 90,166, 89,238,182,188,110,133, 90, 57, 89,165, 88, 85, 90, 93, -179, 70,173,157,173, 37,214,187,173,187,167, 17,167,185, 78,147, 78,171,158,214,103,195,176,241,182,201,182,169,183, 25,176,229, -216, 6,219,174,182,109,182,125, 97,103, 98, 23,103,183,197,174,195,238,147,189,147,125,186,125,141,253, 61, 7, 13,135,217, 14, -171, 29, 90, 29,126,115,180,114, 20, 58, 86, 58,222,154,206,156,238, 63,125,197,244,150,233, 47,103, 88,207, 16,207,216, 51,227, -182, 19,203, 41,196,105,157, 83,155,211, 71,103, 23,103,185,115,131,243,136,139,137, 75,130,203, 46,151, 62, 46,155, 27,198,221, -200,189,228, 74,116,245,113, 93,225,122,210,245,157,155,179,155,194,237,168,219,175,238, 54,238,105,238,135,220,159,204, 52,159, - 41,158, 89, 51,115,208,195,200, 67,224, 81,229,209, 63, 11,159,149, 48,107,223,172,126, 79, 67, 79,129,103,181,231, 35, 47, 99, - 47,145, 87,173,215,176,183,165,119,170,247, 97,239, 23, 62,246, 62,114,159,227, 62,227, 60, 55,222, 50,222, 89, 95,204, 55,192, -183,200,183,203, 79,195,111,158, 95,133,223, 67,127, 35,255,100,255,122,255,209, 0,167,128, 37, 1,103, 3,137,129, 65,129, 91, - 2,251,248,122,124, 33,191,142, 63, 58,219,101,246,178,217,237, 65,140,160,185, 65, 21, 65,143,130,173,130,229,193,173, 33,104, -200,236,144,173, 33,247,231,152,206,145,206,105, 14,133, 80,126,232,214,208, 7, 97,230, 97,139,195,126, 12, 39,133,135,133, 87, -134, 63,142,112,136, 88, 26,209, 49,151, 53,119,209,220, 67,115,223, 68,250, 68,150, 68,222,155,103, 49, 79, 57,175, 45, 74, 53, - 42, 62,170, 46,106, 60,218, 55,186, 52,186, 63,198, 46,102, 89,204,213, 88,157, 88, 73,108, 75, 28, 57, 46, 42,174, 54,110,108, -190,223,252,237,243,135,226,157,226, 11,227,123, 23,152, 47,200, 93,112,121,161,206,194,244,133,167, 22,169, 46, 18, 44, 58,150, - 64, 76,136, 78, 56,148,240, 65, 16, 42,168, 22,140, 37,242, 19,119, 37,142, 10,121,194, 29,194,103, 34, 47,209, 54,209,136,216, - 67, 92, 42, 30, 78,242, 72, 42, 77,122,146,236,145,188, 53,121, 36,197, 51,165, 44,229,185,132, 39,169,144,188, 76, 13, 76,221, -155, 58,158, 22,154,118, 32,109, 50, 61, 58,189, 49,131,146,145,144,113, 66,170, 33, 77,147,182,103,234,103,230,102,118,203,172, -101,133,178,254,197,110,139,183, 47, 30,149, 7,201,107,179,144,172, 5, 89, 45, 10,182, 66,166,232, 84, 90, 40,215, 42, 7,178, -103,101, 87,102,191,205,137,202, 57,150,171,158, 43,205,237,204,179,202,219,144, 55,156,239,159,255,237, 18,194, 18,225,146,182, -165,134, 75, 87, 45, 29, 88,230,189,172,106, 57,178, 60,113,121,219, 10,227, 21, 5, 43,134, 86, 6,172, 60,184,138,182, 42,109, -213, 79,171,237, 87,151,174,126,189, 38,122, 77,107,129, 94,193,202,130,193,181, 1,107,235, 11, 85, 10,229,133,125,235,220,215, -237, 93, 79, 88, 47, 89,223,181, 97,250,134,157, 27, 62, 21,137,138,174, 20,219, 23,151, 21,127,216, 40,220,120,229, 27,135,111, -202,191,153,220,148,180,169,171,196,185,100,207,102,210,102,233,230,222, 45,158, 91, 14,150,170,151,230,151, 14,110, 13,217,218, -180, 13,223, 86,180,237,245,246, 69,219, 47,151,205, 40,219,187,131,182, 67,185,163,191, 60,184,188,101,167,201,206,205, 59, 63, - 84,164, 84,244, 84,250, 84, 54,238,210,221,181, 97,215,248,110,209,238, 27,123,188,246, 52,236,213,219, 91,188,247,253, 62,201, -190,219, 85, 1, 85, 77,213,102,213,101,251, 73,251,179,247, 63,174,137,170,233,248,150,251,109, 93,173, 78,109,113,237,199, 3, -210, 3,253, 7, 35, 14,182,215,185,212,213, 29,210, 61, 84, 82,143,214, 43,235, 71, 14,199, 31,190,254,157,239,119, 45, 13, 54, - 13, 85,141,156,198,226, 35,112, 68,121,228,233,247, 9,223,247, 30, 13, 58,218,118,140,123,172,225, 7,211, 31,118, 29,103, 29, - 47,106, 66,154,242,154, 70,155, 83,154,251, 91, 98, 91,186, 79,204, 62,209,214,234,222,122,252, 71,219, 31, 15,156, 52, 60, 89, -121, 74,243, 84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, 46,249,220, 96,219,162,182,123,231, 99,206,223, -106, 15,111,239,186, 16,116,225,210, 69,255,139,231, 59,188, 59,206, 92,242,184,116,242,178,219,229, 19, 87,184, 87,154,175, 58, - 95,109,234,116,234, 60,254,147,211, 79,199,187,156,187,154,174,185, 92,107,185,238,122,189,181,123,102,247,233, 27,158, 55,206, -221,244,189,121,241, 22,255,214,213,158, 57, 61,221,189,243,122,111,247,197,247,245,223, 22,221,126,114, 39,253,206,203,187,217, -119, 39,238,173,188, 79,188, 95,244, 64,237, 65,217, 67,221,135,213, 63, 91,254,220,216,239,220,127,106,192,119,160,243,209,220, - 71,247, 6,133,131,207,254,145,245,143, 15, 67, 5,143,153,143,203,134, 13,134,235,158, 56, 62, 57, 57,226, 63,114,253,233,252, -167, 67,207,100,207, 38,158, 23,254,162,254,203,174, 23, 22, 47,126,248,213,235,215,206,209,152,209,161,151,242,151,147,191,109, -124,165,253,234,192,235, 25,175,219,198,194,198, 30,190,201,120, 51, 49, 94,244, 86,251,237,193,119,220,119, 29,239,163,223, 15, - 79,228,124, 32,127, 40,255,104,249,177,245, 83,208,167,251,147, 25,147,147,255, 4, 3,152,243,252, 99, 51, 45,219, 0, 0, 0, - 6, 98, 75, 71, 68, 0,255, 0,255, 0,255,160,189,167,147, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, - 66, 40,155,120, 0, 0, 0, 7,116, 73, 77, 69, 7,219, 2, 27, 16, 38, 47, 61,220,216,191, 0, 0, 32, 0, 73, 68, 65, 84,120, -218,236, 93,119,120, 20,213,226, 61, 51, 59,179,187,217,146, 77, 35, 61,144, 66, 9, 96, 0, 67, 81,130, 84, 65, 80,140,138, 10, - 86,132,167,207,103,197,134, 5, 84, 68, 68, 32, 54, 64,240, 39,242,208,167,128,160,128, 5, 4,164, 68, 74,232, 29,233, 9,144, - 4, 18, 66, 58,201, 38,219,203,220,223, 31,217, 89, 55,203,182, 64, 98,129,123,190,111,190,221,157,157, 57,115,239,157,123,239, -156, 57,183, 1, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,215, 52, 86,175, 94, 77,154,112,248,144, - 64, 57, 29,219,128,191, 59,103, 11,198,157, 52, 35,231, 0, 7,231,187,255,144,112, 14,248,187,114,138,241,109, 2,239,144,166, -228,163,230, 74, 79,151,112,146,230, 14,103, 75,113, 54, 87, 57,242, 16, 78,210, 2,247,253,221,127, 72, 56, 7,252,221, 56,221, -243, 79,128,188, 77,226, 12, 48, 79, 53, 53,156,164,185,195,217, 82,156, 87, 91,142,124,132,147, 92,109, 94,242,114,239,223,197, -117, 4,174, 5, 69, 86,192,200,204,204,100, 92,248,153,191, 43,167,107, 58,136,252,205, 25,214,102,196,150,230,230,116, 75,207, -230,194,187,153,153,153,204,234,213,171,183, 2, 24,208,156,113,111,142,251,238, 22,215,102,225,189, 2,145,213, 36,206,230,202, -247, 45,205,217, 92,101,201,157,179, 57,242,189,167,251,222,130,247,168,185,194,217, 44,101,169, 37,242,188,135,252,115,213,188, -238,156,205, 81,150,220, 57,155, 35,223,255, 25,156,205, 81,150, 60,113, 54, 71,190,247,118,239,175, 55,131,138,253,139, 5,129, -123, 1, 31,248,119, 22, 68, 45, 37, 54,155,224,192,252,229,156,205,124,143,222,117,112, 54,231,219,205,192,230,186, 71, 45,145, -223, 93, 57,155,139,223,157,167, 57,238,147, 39,206,171, 13,175,151,112, 54,123,220,175, 54,223,255, 89,156,205,124,143,154,165, - 44,185,113, 14,108,230,151,129,129, 46,191,223,109, 78,206,230, 42, 75, 30,194,121,213,247,201, 19,231,213,134,215, 75, 56,155, - 61,238,205,241, 12,105, 41,222,107, 26, 45,213,124,214,220,156, 77,228,190,166, 56,155,216, 60, 51,164, 5,238,253, 95, 26,206, -230,228,116, 15, 99,115, 54,247,180,100, 56,155,147,179, 9, 97,189,230, 56,255,105,247,253,239,152,158,222,248,174,166, 89,202, -155, 59,218, 18,225,108, 78,206, 0,185,175, 9,206,171,184,247,215, 28,184,191, 75, 64,196,132,111,230, 55, 19, 52,179, 3,211, -146,194,181, 57,195, 57,176, 37, 28,194, 22, 64,179,135,211,241,166, 60,185, 5,226,254, 79, 73, 83, 90,150,104, 89,250,219,149, - 37,183, 60, 57,176, 25,157,162,102,117,158,221, 57,155,227, 26,174, 28,205,149, 71, 91, 58,238,205, 89,150, 90,226,222, 83, 92, -133, 11, 65, 57, 41, 39,229,164,156,148,147,114, 82,206,235,150,243,154, 4, 75,147,128,130,130,130,130,130,130,130,130,130,130, -130,130,130,130,130,130,226, 31, 5,175,237,187,113,113,113,171,149, 74,101, 59,111,255,235,116,186,139, 23, 47, 94, 28, 68,147, -240,175, 3,189, 71, 20,255, 32,176,248,195, 65, 23, 0, 16,199, 70, 65, 65, 65,113, 77,195,107,103,120,185, 92,158,114,242,228, -201, 14,130, 32,192,110,183,195,102,179, 57, 63,205,102, 51,250,247,239,223,228,142,244,209,209,209, 57, 18,137, 36,169, 41,231, -216,237,246,243,101,101,101,125,125, 28,178, 19, 64, 10,195,252,161, 25,197,239,222, 62, 1,148, 88,173,214,238,190, 56, 25,134, - 73,113,231,243,194, 37,126,247,201, 25, 18, 18,178,159,227,184, 4, 79, 92,222,190, 11,130,144, 95, 81, 81,209,231,207,188, 71, -215, 51,162,163,163,115, 56,142,107,114,254, 44, 45, 45,245,154, 63, 99, 99, 99, 15,177, 44, 27,215, 4, 74,137, 32, 8,185, 23, - 47, 94,236,235, 67,136,236, 4,144,226,243, 13,202, 45, 63, 49, 12, 83,108,183,219,123,250, 43, 71,190,184, 60,228, 81,127,156, - 78,145,197,113, 92, 86, 84, 84,212, 51,122,189,222, 8,128, 72, 36, 18,226, 18, 54, 0,128,205,102,171,168,169,169,233, 66,115, - 34, 5, 5,197,117, 33,180, 4, 65, 96, 77, 38, 19,242,242,242, 64,136,199,250,222,126, 5,215,235,112,224,183,141, 81,193, 81, -209,176, 89, 44, 80,181,138,116,114,151,157, 56, 6,155,213, 2,155,217,140, 54,189,122,139, 97, 64,231,206,157, 37,126, 56, 19, - 62,248,224,131,168,224,224, 96, 24,141, 70, 24,141, 70,152, 76, 38, 24,141, 70,152,205,102,152,205,102, 88, 44, 22, 88, 44, 22, -216,108, 54,152, 76, 38,100,103,103,219,173, 86,171, 79,206,105,211,166, 69,105, 52, 26, 39,159,184,137,156, 34,175,213,106,133, -209,104,196,166, 77,155,124,114,114, 28,151, 80, 82, 82, 18, 37,149, 74, 65, 8,129, 32, 8, 32,132, 52,218,220,209,182,109, 91, -139,175, 64,182,208, 61,186,158,209, 97,218,210, 53, 81, 33, 10, 57,108,130,128,204,110,109,157,127,228,127,185, 28,196,102,135, - 96,179,161,253,243,163,157,251, 59,117,234,228, 51,127, 18, 66, 18,167, 45, 93, 19, 26, 40,103, 85, 85,149,161, 99,199,142, 37, -104,112,155,189, 9,173, 4,131,193, 16,229,224,191, 76, 16,177, 44,219,104, 91,191,126, 61, 50, 51, 51,253,197, 61,225,229,151, - 95,142,178, 90,173, 48,155,205, 48,153, 76,176, 90,173,176,217,108,206,205,110,183, 59, 55,179,217,140, 61,123,246, 4,234,100, -125,112,219,109,183, 61,190,102,205, 26,213,207, 63,255,172, 74, 74, 74,130, 84, 42,133, 68, 34,129, 68, 34, 1,203,178,224, 56, - 14, 55,223,124, 51, 67,179, 32, 5, 5,197,117, 35,180, 76, 38, 83, 65,122,122, 58,113,124,143,151,203,229, 82,183,183,220,184, -246,237,219,231,186,159,231,175,185, 42, 56, 42, 26, 19, 91,135, 3, 0,222, 57, 87,229,124, 64,124,216,231, 70,231, 49,239, 93, -168, 5, 0, 40, 20, 10, 48,174,175,209, 94,160, 82,169,112,219,109,183, 65, 38,147,161,103,207,158,224,121,222,227, 38,149, 74, -193,243,188,223, 68, 97, 24, 6,106,181, 26, 83,166, 76, 17, 69, 18, 84, 65,114,140,235,211, 19, 65, 32,248,239,177,211, 48, 11, - 4, 28,199, 57,183, 64, 56,165, 82, 41,142, 30, 61, 10,142,227, 32,145, 72,156,159,226,247, 85,171, 86, 97,228,200,145,224, 56, - 14, 10,133, 2,240, 51,115,176,235, 61, 50,155,205,177, 50,153,204, 2, 64, 20,103, 82,134, 97, 98,174,228, 30, 93,207, 8, 81, -200, 49,102,222, 79, 0,128,162, 89,207, 59,239,221,158,103,223,113, 30,147,248,159, 7,192, 48, 12,120,158, 7,203,178,205,198, - 89, 93, 93,109,120,232,161,135,182, 7, 7, 7,175,215,106,181,240, 35,224, 80, 84, 84, 4,142,227,188,230,119,150,101, 49,115, -230, 76,156, 57,115, 38,160,184, 27,141, 70, 44, 88,176, 0,118,187,189, 17,175,248,221,125, 95,128, 34,235,253,161, 67,135,142, - 94,179,102, 77, 24,195, 48,248,236,179,207, 32,149, 74, 49,124,248,112, 68, 68, 68, 96,195,134, 13,144, 74,165,120,253,245,215, -105,230,163,160,160,240, 85,231,241, 0,110, 4, 16,233, 48, 17,234, 0,132,186, 28, 82,225,248,140, 20,127, 51, 12,179,207, 3, - 79, 47,199, 49, 21, 12,195,236,115,249,109, 6, 32,243,176,191, 10,128,194,177,153,208,224,254,167,185, 92, 71, 60, 15,222,174, -203, 1, 13,235, 15, 1,216, 2, 96, 96,102,102,230, 86, 0, 40, 45, 45,189,163,180,180, 20, 0,144,146,146,114, 50, 55, 55,183, -163,168,121, 28,205, 83, 82,155,205,214, 65,108,170, 18,221,162, 33, 67,134,248,124,195,183, 89, 44,151, 9, 16, 79, 90,202, 83, -115,133, 55, 1, 99,177, 88,240,192, 3, 15, 0,128,215,135,142,235, 22,128,118,131,217,108, 6,199,113, 72,109, 29,137, 73,195, -210,113, 19,177, 66, 87,207,192, 86,171,195, 61,106, 43, 78,118,238,142,249,231, 43,112, 78, 91, 15,142,227, 2,226, 20, 4,193, -171,200,146, 72, 36,152, 55,111, 30, 30,122,232, 33, 72, 36,146,128,248, 92,239, 81,114,114,242,154,220,220,220, 8,134, 97, 76, -142,123, 36,183,217,108, 26,155,205, 22, 97,183,219, 35,154,114,143,174,103,216, 4,193, 99, 62,244,150,103, 3,185, 79,129,112, - 86, 87, 87, 27, 50, 51, 51,119,203,229,242,133,209,209,209, 37,197,197,197,126,133,150,187,248,113,127,169,248,228,147, 79, 48, -103,206, 28, 12, 26, 52, 40,160,112,154, 76, 38, 48, 12,131,249,243,231, 95,246,223,212,169, 83, 47,187,158, 31, 78, 6, 0, 27, - 23, 23,247,236,186,117,235, 52,226,177,173, 90,181, 2,207,243,232,210,165, 11,130,131,131,177,125,251,118,216,237,246,128,203, - 37, 5, 5,197,181, 11, 79, 90,196, 5,253, 39, 78,156,216, 51, 43, 43,107,122, 70, 70,198,119, 59,119,238, 92,202, 48,204,106, -151, 58, 49,211, 81,191,174, 22,127, 19, 66,122,185,138, 30,135, 88,139,100, 24,102,181,120,188,235,111,241,147, 16, 50, 4,128, - 76,252, 61,113,226,196,180,172,172,172,233, 19, 38, 76,120,115,198,140, 25,210,137, 19, 39,118,205,202,202,154, 46, 94,199, 83, - 56, 60, 57, 90, 62,215,158, 18,155,168, 78,157, 58,229,173,137,202,245, 1,224,179,182, 84,181,138,116, 58, 89,239, 37, 70, 56, -247, 79, 41,174,113, 62,192,230,246,104, 7,149, 74,133, 97,239,125, 20,144, 83,100, 54,155, 81, 94, 94,238,116, 25,252,109,129, -114, 42, 21, 65,200,126,185, 11,138,170,100,120,119, 87, 53,214, 28, 62, 3,158,231,113,123,231, 46,184, 67, 26,140,183, 19,101, -120,249,116, 33,172, 36,176, 62,189,132, 16,143, 2, 75,252, 46, 54,161, 4, 42,180,220,238, 81,145,209,104,172,202,203,203, 51, - 8, 13, 15,118, 5, 33, 36,140, 97,152, 58,135,203, 21, 27,232, 61,186,158,145,217,173,173,211,117,218, 19, 60,216,185,127,164, -238,168,243,158,140,159,247, 33, 0, 96, 80,247,155,253,150,135, 64, 56,171,170,170, 12,125, 7, 15,220,106, 55,152,191, 25, 61, -122,116,193,230,205,155, 21,129,132,213,147,208, 18, 93, 91, 81,100,113, 28, 7,179,217, 28, 80,220,205,102,179,215,242, 33,149, - 74,175,196,209,130, 78,167, 51,175, 92,185, 18,115,231,206, 69, 68, 68, 4,134, 14, 29,138,216,216, 88, 44, 95,190, 28,132, 16, - 60,255,252,243, 80, 40, 20,162,123, 77, 51, 32, 5,197,245, 13, 95, 90, 68,158,149,149, 53,221, 93,200,184,254,118, 21, 80,110, - 98,202, 85,172,165,249,121,254,175,118, 23, 79,226,117, 25,134, 89, 61, 99,198,140, 76, 63,225,168,240, 38,180,124, 78,137,111, - 50,153, 10,186,117,235, 22,144,154,208,235,245,165,254,196,134,167,183,122, 87,151, 64,173, 86, 67,165, 81,131, 13,176,222,181, - 90,173, 78,161,178,113,227, 70, 40, 20, 10, 12, 31, 62,252,170, 28, 45,139,197, 2,153,148, 7,219, 42, 26, 99,102,109, 70, 85, -157,193,249,128,217,146, 95,128,131,101,229,120, 57, 99, 48, 84,138,114,212,155,205, 1, 57,111,130, 32, 92, 38,178, 56,142,195, - 3, 15, 60,224,116, 19, 92,251,173,192, 71,211, 97, 68, 68,196,126,142,227, 18, 92,238, 81, 80, 74, 74, 10,240, 71,191, 30, 70, - 16,132,250,208,208,208, 31, 1,196, 17, 66, 18, 0, 4, 7,114,143, 40, 60,231, 79,247,253,130,155, 83,117, 37,156, 85, 85, 85, -134,204,204,204,221,118,131,249,155, 11, 23, 46,236, 6, 16,116,211, 77, 55, 53, 89,104,137, 2,139,231,121,204,156, 57, 19,115, -230,204,113,254, 31,168,208,178,217,108,141, 4,212,233,211,167, 27, 93,203, 93,216,249,105, 54, 37,104, 24, 93, 40,164,164,164, - 56,207,137,137,137, 65,104,104, 40, 4, 65,128, 32, 8, 8, 10, 10,130, 66,161,128, 84, 42,165,153,142,130,130,194,151, 22, 49, - 76,152, 48,225, 77,134, 97, 86, 59,156,165, 99, 62, 4,149, 39,237,209,203, 77,172, 85,120, 57, 46,211,147,216,114,253, 46, 98, -226,196,137,105,238,225,240,212, 92,233,172, 85,221,166,221,111, 4,215, 38,170,230,122,136,249,122,144,169, 67, 53, 80,168, 84, -144, 72, 88, 48, 12, 67,252,113, 89, 44, 22,103,197,255,204, 51,207,248,236,183, 18,104,127, 42,139,197, 2,150,147,224, 98, 76, - 50,236,236, 54,231,185,226,198,114, 60,206,197,116,132,228,212, 33,240, 1, 62,112,221, 29,173,231,159,127, 30, 11, 22, 44, 0, -203,178,206, 52,225, 56, 14,237,219,183, 71, 65, 65,129, 79, 46,142,227, 18,206,157, 59, 23,229,154,142,162,136, 37,132,192,110, -183,163,109,219,182,198,188,188,188, 23,105,209,189, 58,145,229,109,191,221, 46, 4,236,194,120, 58,174,170,170,202, 48,106,212, -168,173,181,181,181,223,220,112,195, 13,167,209,120, 10, 4,191,124, 28,199, 53, 18, 88,162,200,250,244,211, 79, 27,137, 34,171, -213, 26,208,139,128,213,106,189, 76,240,124,252,241,199,141, 62, 1,160, 79,159, 62, 1, 57,195, 0, 8,203,178, 68, 42,149,226, -182,219,110, 67,215,174, 93,241,243,207, 63, 67, 16, 4, 60,247,220,115, 80, 40, 20,152, 61,123, 54,108, 54, 27, 62,248,224, 3, -234,104, 81, 80, 80,248,210, 34,166, 25, 51,102, 28,155, 49, 99,134,211, 89,114,119,180,188, 60,119,239,116,136,170, 72, 81,164, - 1, 48,121, 18, 68,158, 92, 50,119, 1,230,186, 47, 43, 43,107,186,123, 56,220,155, 43, 27, 9,173, 63, 11,165,199,143,226,163, - 91,210, 1, 52,110, 46,156,119,115, 71,168,212, 42,168,130,213, 24,181,106, 27, 0, 56, 42,253, 9, 1, 57, 90,162,208,170,170, -170,242, 41,178,154,226,104,177, 50, 14, 43, 18, 46,129,200,120,112,102,107, 35,161, 37,225,120, 20, 69, 36,131,229,165,224,236, -182,128, 56, 9, 33,151, 53, 21,142, 29, 59, 22, 12,195, 56, 71,136,117,235,214,205,149,139,241,247,112,124, 45,188,161, 15,158, -123,115,236, 7,149, 70, 90, 98,175, 36,127,238,255, 18, 39,127,120, 22, 0,208, 87,167,115,222,139,105,221,254, 24, 59, 48,235, -232, 86,167,251,248, 30, 94,189, 34,206,170,170, 42,195, 77,157,210,118, 75,195, 67,190, 57,127,254,252,110, 0,236,131, 15, 62, - 24,218,173, 91,183,128,202,164, 56,184,194, 93,100,185, 58, 89,226,167,159, 17,182, 46,194,209, 30,144,128, 18,155, 17, 3,200, -243, 68,204,219, 26,141, 6,106,181,218, 57,226, 54, 40, 40, 8, 74,165,210,217,191, 51, 64,225, 70, 65, 65,113,253, 34, 76, 20, - 58, 14,177,212,200,105,114,244,173,202,116,253,237,201,241,114, 56, 80, 57,126,234,215, 53, 14,129,230, 17,162,179,230,118,206, -106,111, 34,141, 19, 21,164,235,103, 76, 76,204,175,106,181, 58, 57,208,216, 55,101, 20,155,221,106,185,204,217, 98, 24, 6,234, - 96, 53, 20,106, 21, 20,193,106,175,174,151, 47,161, 37, 58, 69,226, 67,103,225,194,133, 80,171,213,248,215,191,254,213,228, 62, - 90, 78,161, 37,101,177, 65,190, 9, 18, 25,215, 72,100,113, 28, 7, 9,207,163, 84, 29, 11,150,231,193,217, 2,115,201,106,107, -107,193,113, 28, 38, 77,154,228,124,131,119, 21, 89, 77,137,179, 47,176, 12, 35,186, 91,242,118,237,218,189,202, 48, 76, 34,128, - 36,157, 78, 39,191,120,241,226,173,180,188,250, 80, 6,118,235,101, 46,148, 55,247,245, 74, 57, 69, 39, 75, 26, 30,242, 77,199, -142, 29,157, 78,150, 82,169, 20, 71,155,250,191,199, 44,235, 81,100,185,143, 16,228, 56,174, 33, 47,251, 25, 29,233,234,104,205, -152, 49,195,201,235,234,100,137,104, 74, 57, 18,195,186,117,235, 86, 28, 60,120, 16,207, 60,243, 12, 20, 10, 5,230,204,153, 3, -155,205,134,169, 83,167, 66,161, 80, 64, 38,147,209,204, 71, 65, 65,221,172, 70, 90,196, 13, 21,110,253,160, 24, 55, 81, 83,225, - 73, 96,185, 54, 19,138,223, 25,134,177,122,224, 53,187, 53, 41,186,239, 23, 63,171,102,204,152,177, 89,116,178, 92,246, 55, 10, -135, 95, 71, 75, 46,151, 39,231,229,229, 57, 39,194,244,245,105, 54,155, 49,104,208,160,128,157, 49,113,212, 33,199, 73, 26, 9, - 11,101,176, 26, 74, 77, 48, 20,106,181,187,224, 96,252, 85,226,226, 27,177,171,208,154, 60,121, 50, 56,142,195,130, 5, 11, 0, - 0,175,190,250,106,192,125,180, 68, 78,216, 25, 20,147,179, 72,159, 53, 18,230,111,173, 40,219,241, 59, 56,142, 67, 84,239, 59, - 32,220, 52, 18,122,133, 26,156,221, 22,240,168,195,234,234,106, 20, 20, 20, 64, 34,145,224,149, 87, 94,105, 52,215,145,251, 72, -182,141, 27, 55,250,141,187, 39, 39,107,242,249,106, 39,143, 66,161, 96,127,255,253,247,100, 65, 16, 82, 12, 6, 67,187, 62,125, -250, 8,180, 40,251, 17, 69,130, 45, 32, 81, 21,104,254,116,231, 20,251,100,213,214,214,126,115,254,252,249, 61, 0,216,209,163, - 71,135, 42,149, 74,124,245,213, 87,122, 0,178,229,203,151, 43,252,137, 34, 49,223,248, 19, 89, 60,207, 55,228,229, 64,226, 78, - 26, 79, 89,226,175, 99,124, 32,121, 94, 12, 43,195, 48,176,219,237, 80, 40, 20,141,156,172,160,160, 32,200,229,114,154,241, 40, - 40, 40,252,213, 37,251, 2,174,199, 9,233,229, 34,170,246, 93, 9,111, 83,174,231, 15,156, 55,161, 97, 50,153,112,226,196,137, - 64,121, 2,158, 24,179,117,207,155,241,222,133, 90, 48, 12,131,255,246,185, 1, 42,141, 26, 74,149, 10,247,255,188,213, 89,113, - 31,157,254, 42,228, 42, 53,226,250, 13, 13,168, 34, 23,155, 14, 93,133, 86, 77, 77, 13,120,158,199,251,239,191, 15,150,101,241, -193, 7, 31, 32, 62, 62, 30, 23, 47, 94,196,242,229,203, 3,114,180, 36,118, 9, 98, 31,235, 4,229,216, 16,104, 30,235,143,176, -219, 38,227,130,153,195, 78,163, 18,253,141,199, 33,219,240, 41,204,130, 61,224, 17, 88, 54,155, 13, 91,183,110,117,239,240,238, -236, 83,101,179,217, 96,181, 90, 97,177, 88,240,193, 7, 31, 4, 50,194,243,178,251, 38,166,161, 99, 18, 84, 73,110,110,110, 36, - 33, 36, 28, 64, 8,128, 74, 90, 92,125, 35,182,247,243,136,236,249, 52, 0, 96,213,140, 39,156,251, 39, 29,253, 35,127,206,252, -182, 97, 1,128,142, 73, 67,155,196, 89, 85, 85,101,184,125, 80,159, 28,163,192,127,221,165, 75,151, 70, 78, 86, 80, 80, 16,227, -248, 29,144, 93,198,178, 44, 36, 18,201,101,205,133,222,196, 86, 32,125,180,108, 54,155,115, 34, 81, 95,253, 25,175,196,209,122, -226,137, 39, 16, 27, 27,235,116,178,222,123,239, 61, 40, 20, 10, 76,156, 56, 17, 86,171, 21,159,126,250, 41,205,124, 20, 20, 20, -127,186, 40,251, 51,224,177, 38, 53, 26,141,133, 93,187,118,133,151,255,226,131,130,130,120,183, 72,197,181,111,223, 62,215, 67, - 19,226, 16, 0,217,158, 42,117,134, 97, 16,172, 9, 70,144, 90, 5,165,155,139, 21, 20,172,129, 92,173, 6, 43,245, 88,153, 95, -198, 41,246, 45,113, 21, 90,226, 86, 91, 91, 11,158,231, 49,119,238, 92,104, 52, 26,152, 76, 38,191,156,226, 67, 71, 34,145, 64, - 95, 84,135,147,211,179, 33, 11,218,137,118, 67, 31, 66, 44,175,128,116,251,143, 48,216,173,254, 38, 44,189,140,179, 67,135, 14, -120,231,157,119, 46,155,214,193, 27,226,227,227,253,198,221,221,201,154,121, 67, 27, 72,101, 82,140, 63, 94, 4,147,201,196, 60, -244,208, 67, 2, 0, 3,128, 10,131,193,112, 62,144,244,108, 6,252,227, 57,125,141,138, 21, 33, 16,187, 39, 1,227,145, 83,116, -178,140, 2,255,117, 65, 65,129,232,100,133, 40,149, 74,124,241,197, 23,122, 0,236,212,169, 83,149,137,137,137,146, 64,242,146, - 68, 34,193,172, 89,179, 60,246,201,242, 36,186,154, 82,142, 92,207, 29, 48, 96,128,199, 9, 75,189,136,183,203, 56,197,176, 70, - 68, 68, 56,157, 44,187,221,238, 28,109, 40,206, 62,239,227,165,130,230, 79,202, 73, 57,175, 31,206,107, 18, 30,107,224,139, 23, - 47,222,238,237,132,182,109,219,230,229,229,229,181, 23,151,226,112, 84,156, 82,163,209,216,161, 79,159, 62,126,173, 29, 65, 16, - 32,151,203, 65, 8,193,173,239,100,129, 97, 1, 22,141, 31, 98, 81,183, 12,134, 68,194, 65,104, 88,234,195,239,168, 67,131,193, -208,232,225,224,105,171,175,175,135,201,100, 10,120, 54,111,163,209,216,104, 10, 6,134, 8, 56,247,219,178,203, 70, 31,138, 91, -160,253,118,130,130,130, 26, 53,253,248,113,172,152, 64, 28, 45,215,166, 71,169, 76, 10, 78,202,139,142, 86,221,233,211,167, 71, -209,108, 30, 56,196, 1, 11, 0,144,218,103, 56, 4,193, 14, 98,183, 55, 90, 38,169, 83,242,237, 16,136, 29, 22,171, 30, 38,147, -201,223,180, 39, 76,101,101,165, 97,212,168, 81, 91, 1,252,239,158,123,238,201, 69,195,236,194, 68,173, 86,203,121,158, 23, 0, - 84, 3, 32,151, 46, 93, 10,185,112,225,130, 96, 52, 26,219,248, 11,231,154, 53,107,112,226,196, 9,244,235,215,175,209,114, 80, -162, 43,234, 58,187,123, 32,249, 83,108, 46,247, 52, 35,188, 55, 33, 23, 40, 36, 18, 9, 66, 66, 66, 32,149, 74,241,254,251,239, - 67, 42,149, 66,169, 84, 2, 0, 62,253,244, 83,231,228,171, 20, 20, 20, 20,215,141,208,242, 87,111,250,104, 86,244,217,132,104, -179,217,138, 19, 19, 19,155,116, 49,187,221, 94,230, 71,184, 21, 47, 95,190, 92,234,234, 66,248,251, 36,132,148,249,121,216, 22, -175, 90,181, 74,234,201,221,240,182,192,180, 63, 78,187,221, 94,156,148,148,228,213, 49,241, 4,171,213,122,193,159,104,205,170, - 48, 52, 18, 9,227,143, 23,121, 93, 59,145,194,111, 94,243,145, 63,223,186,210,252,121, 58, 53, 53,245, 66,104,104,232,218,232, -232,232,170, 29, 59,118, 68,244,234,213, 43,194,245,152, 94,189,122,197,186,157,102,134,247,117, 14,193, 48, 76,241, 61,247,220, -227, 49,207,139,162,201, 67,254, 44,246,151,231,247,238,221, 43,117, 61,223, 27,191, 75, 57, 42, 14, 64,184,158, 75, 79, 79,103, - 93,121,188,229,125,171,213, 90, 65,115, 33, 5, 5,197,117, 47,180, 12, 6, 67, 81,215,174, 93,109, 94,254, 59,239,235,220,170, -170,170,158,205, 29, 1,171,213,218,231,159,192, 89, 89, 89,217,172,113,183,217,108,197,142, 9, 74,125, 30, 67,179,248, 95,119, -143, 0,160,188,188,252, 38, 0,208,233,116,240,183,172, 78, 19, 4, 97,179,231, 79,155,205,214,167, 37,210,180,186,186, 58,131, -230, 44, 10, 10, 10, 42,180,154, 0,186, 24,241,223, 3, 45, 33, 90, 41, 40, 40, 40, 40, 40, 40,154, 23, 44, 77, 2, 10, 10, 10, - 10, 10, 10, 10,138,150, 1,131,134,145, 3,158,208,148,209, 4, 67,174,224,218,217,148,147,114, 82, 78,202, 73, 57, 41, 39,229, -188,238, 56,253,113,211,209,140, 45, 44,192, 40, 39,229,164,156,148,147,114, 82, 78,202,121,253,113, 94,147,160, 77,135, 20, 20, - 20, 20, 20, 20, 20, 20, 45, 4,142, 38,193, 95, 6, 9,154, 48,163,190, 63, 16, 66,194, 0,120, 91, 48,206,204, 48,204,165, 43, -224,100, 0, 72, 29,155, 56,209,145, 21,128, 5,128,133, 97, 24,226,159,227, 93,182,164, 36, 44,141,216,249, 94,132, 97,120, 65, -192,225, 54,109, 90, 31, 98,152, 59,204, 0,160,138,238,212, 89,173, 82, 12, 49, 89,204,201,114, 94,118,162, 70, 87,191,209, 84, -158, 87, 72,179, 7, 5,197, 95,130,187, 0, 76, 65, 67,183,146, 25, 0,150,209, 36,161,160,104, 33,161,165, 86,171,247,179, 44, -155,224,111,126, 30, 17,142,181,204,138, 47, 93,186,212,179, 9,215, 30,165, 86,171, 7,241, 60,127, 11, 0, 88,173,214, 29,245, -245,245,155, 1, 44, 7, 96,187,194, 56,105, 0, 60, 0,224, 17,199,239, 37,142,202, 66,123,133,124, 93, 67, 66, 66,126,224,121, -158, 84, 86, 86,246, 6,128,136,136,136,221, 86,171,149,209,106,181,247, 3, 56,210, 68, 62,150,231,249,153,189,123,247,238,191, -109,219,182,255, 1,152,219, 76,247, 82,206,178,172, 71,129, 34, 8, 66,210, 21,136, 44, 41,128,144,185,115,231, 70, 44, 94,188, - 56,189,184,184,184, 11, 0, 36, 36, 36, 28, 29, 61,122,244,161,113,227,198, 85, 17, 66,106, 25,134,177,248,226, 41, 41, 9, 75, - 43, 47,205,127,166,172,252,196, 3, 0, 16, 19,219,101,153, 68,194, 74, 9, 57,176, 75,217,234,145, 86,237,219, 37, 61,253,221, - 87,115,165, 73,201,173,177,105,231,193, 27,199,189,248,102,218, 5,224, 19, 42,182,254, 60, 4, 7, 7,239,103, 89, 54,193, 87, - 25,247, 84,230,237,118,123,113,117,117,117, 79,111,156, 28,199, 37,248,170, 47, 60,237, 19, 4, 33,191,178,178,210,227, 84, 19, - 26,141,102, 23,199,113,201,129,114,137,159, 54,155,173,216,219, 40, 93,141, 70,179, 95, 34,145, 36,248,138,167,167,255, 4, 65, -200,175,168,168,240, 22,206,203,226,222, 28,225,188, 18, 78, 95,225, 20,235, 35, 0,159, 70, 68, 68,220, 92, 85, 85,245, 40,128, - 55,181, 90,109, 55,137, 68,130,240,240,240, 55,205,102,243,153,144,144,144, 47,107,107,107,119, 2,120, 17, 0, 93, 47,149,130, -162,185,160,209,104,202,234,235,235,137, 8, 65, 16,136,213,106, 37, 38,147,137, 24, 12, 6,162,211,233, 72,125,125, 61,209,106, -181,164,182,182,150, 84, 85, 85,145,200,200, 72,247,201, 27,189,181,225,118,209,104, 52,121, 89, 89, 89,166,130,130, 2, 98,177, - 88,136,197, 98, 33,133,133,133,228,163,143, 62, 50,105, 52,154, 60, 0, 93,188,156, 59,196, 75,101,113, 27,128,165,233,233,233, -230, 53,107,214, 16,163,209, 72,116, 58, 29, 89,182,108, 25,185,225,134, 27,204, 0,150, 58,142, 97, 3,228, 4,128,190, 49, 49, - 49,197,103,207,158,181,111,220,184,209, 18, 18, 18,146, 29, 18, 18,146, 93, 88, 88,104, 63,123,246,172,208,170, 85,171, 98, 0, -125,155, 16, 78, 0, 24, 57,126,252,248,178,194,194, 66, 50, 96,192,128,195, 46,251, 25,248, 95,231,110,136, 39, 39,139, 16, 18, - 67, 8,137, 69,195, 36,151,151,109,132,144, 88,199, 49, 97, 1,114,170,242,243,243, 91, 71, 71, 71,103, 49, 12, 99,118,231, 99, - 24,198, 28, 29, 29,157,149,159,159,223,154, 16,162,242,197, 89,124,126,222,147,107,215, 12,174,209, 93, 58, 69,116,151, 78,145, -255,125, 61, 80,251,212,184, 71,151,198,182,237,190, 32, 52, 33,109,238,137, 83,167,231, 19, 66,230,111,222,151, 55,127,242,231, -191,206,191,119,220,236, 47, 34, 18,211,159,106, 66,122, 94, 13, 40, 39,128,208,208,208, 82,157, 78, 71, 8, 33,196,110,183, 19, -139,197, 66, 76, 38, 19,209,235,245,164,190,190,158,212,213,213, 57,203,121,109,109,173,243,123, 84, 84,148,215,242, 30, 22, 22, - 86,102, 48, 24, 26,213, 29,102,179,217, 89,127,232,245,122,162,215,235,137, 78,167,115,110,245,245,245, 36, 46, 46,174,200, 71, - 56, 47,138,225, 20, 4,129,216,108, 54, 98,177, 88,156,188, 70,163,177,209,102, 50,153,136,201,100, 34,137,137,137, 1,135, 51, - 16, 78,163,209, 72, 18, 18, 18, 74,188,113,134,135,135,151, 25,141,198, 70,156,174,241,119,231, 21,127,199,196,196,148, 54,133, - 51,144,112,250, 74, 79, 7,230,230,230,230, 18,131,193, 64,226,227,227,171,238,191,255,126,171,221,110, 39,107,214,172, 33,233, -233,233,194,192,129, 3, 45,149,149,149,228, 95,255,250, 23,241,241, 82, 72,203, 17,229,164,184, 18, 71,139, 97, 24,168, 84, 42, -124,255,253,247, 94,151,227,112,253,222,166, 77,155, 64,175,217, 51, 57, 57,121,235,246,237,219, 21,177,177,127, 76,136,109, 54, -155, 17, 22, 22,134,231,158,123, 78,118,215, 93,119,181, 31, 58,116,232,238,115,231,206, 13, 0,176,223, 15,223,125,145,145,145, -159, 77,154, 52, 41,250,193, 7, 31, 68, 68, 68,163, 73,183, 49,106,212, 40,220,127,255,253,210,220,220,220,135, 22, 46, 92,248, -208,188,121,243, 74,235,235,235,199, 1,248,209, 23,169, 66,161,184, 39, 46, 46,238,139,237,219,183, 71, 69, 69, 69, 33, 37, 37, -133,125,253,245,215,219,119,232,208, 65,145,144,144,192, 94,188,120, 17, 63,255,252,115,252,195, 15, 63,188,162,172,172,236,105, -139,197,178, 50,128,184,203, 34, 34, 34,222,124,250,233,167, 91,105,181, 90,219,129, 3, 7,242,196,253, 50,153,108,106, 70, 70, - 70,175, 45, 91,182,124, 11,224,203, 43,113,178, 8, 33, 90,252,209,196, 39,194, 42,254, 31,136,179, 69, 8,145, 29, 62,124, 56, - 60, 35, 35,227, 71,147,201,212,253,153,103,158, 57, 63,125,250,116,133, 70,163,209, 0, 96,180, 90,237,165, 41, 83,166,152,103, -207,158,253, 70,231,206,157, 7,239,218,181,235, 62, 66,136,213, 33,200, 46,231, 99, 24,103,120,138, 46, 84, 96,235, 78, 65,246, -206,196, 87, 19, 62,156,150,124,110,223,241, 34,129, 83,104,240, 75,206, 49,148, 85,213,227,215, 93,199, 17, 19, 17,204, 72,229, -124, 90, 72,252, 13, 3,106, 47, 28,207,129,143, 25,210, 41,154, 7, 12,195, 64,169, 84,226,151, 95,126,185,108,233, 42, 79,203, - 90,113, 28,135,208,208, 80,191,171, 27, 4, 5, 5, 97,227,198,141, 30,215, 94,244,180,164, 79, 72, 72, 8,124,189,108, 48, 12, -131,160,160, 32,236,216,177, 3, 44,203,122, 92, 26,200,125,159, 74,165, 2,235, 99,173, 43,145, 51, 39, 39,199, 47,151,248,169, - 86,171,129,134,166,127,239,133, 82, 46,199,246,237,219,189,198,217,253,187,218,177,222,171, 63,206, 29, 59,118, 52, 90,250,203, -125, 73, 48,215,223, 42,149, 10,140, 31,210,176,176,176,222, 9, 9, 9,216,187,119, 47,150, 47, 95, 30,158,150,150,134,211,167, - 79,131, 97, 24, 76,159, 62,157,185,225,134, 27,248,210,210, 82,244,235,215, 15, 63,253,244, 83, 31,173, 86, 75, 11, 12,197, 95, - 2, 66, 8, 15,224, 70, 0,145,104,232,118, 83, 7, 32, 20, 13, 43,105,200, 0, 84, 1, 80, 56, 54, 19,128,122, 0,173, 28,167, - 87, 58,234, 22, 87,129, 80,225,186,248, 52, 33,164,151,131, 91, 92,161, 34,210,229, 88,241, 26,238,191,221, 63, 61,114,115, 0, -176,122,245,106,241, 97, 54, 48, 51, 51,115,171,107,228, 2, 17, 89,226, 58,101, 30,202,180,251, 16, 77,185, 74,165,250, 97,247, -238,221,138,200,200, 63,226, 96, 50,153, 80, 87, 87,135,250,250,122,212,213,213, 33, 56, 56, 24,203,151, 47, 87, 12, 30, 60,248, -135,186,186,186, 14,142, 68,243,198, 57,235,226,197,139,209, 54,155, 13, 50,153,231, 46, 74, 44,203,162, 83,167, 78,120,243,205, - 55, 49,108,216,176,152, 65,131, 6,205,114, 19, 90,151, 13, 37, 85, 42,149, 95, 28, 56,112, 32, 74,169, 84, 34, 47, 47, 15,197, -197,197, 24, 63,126,124,107, 65, 16, 80, 84, 84,132,211,167, 79,227,194,133, 11, 88,184,112, 97,212,136, 17, 35,190,240, 32,180, - 60, 13, 79,125,230,229,151, 95,238, 24, 22, 22,198,126,244,209, 71, 53, 58,157,238,255, 28,251,223,153, 51,103,206, 99,253,251, -247,143,250,247,191,255, 77,118,236,216,177,216,113,227,188,166,167,107,159, 44, 71, 51, 31, 28,153,239,164,219, 57,157, 92,254, - 7, 33, 36, 6,128,137, 97,152, 26, 15,156, 12,128,144,161, 67,135,190, 98, 50,153,186,111,223,190,253,204, 45,183,220,146, 8, -224,162,152,249, 66, 66, 66, 84,179,102,205,138,206,204,204,204,189,245,214, 91,187, 15, 29, 58,244,149,138,138,138,233,132,144, - 10,151, 62, 91, 78, 78, 65,192,225,152,216, 46,203,114,118,141,123, 96,203, 14,179,244,213, 23, 39,159,111,211, 58,169,246,112, - 94,181,253,120,126, 5,234, 12, 54,220,123,107,195, 2,230,189,187,180,193,103,223,111,199,115, 47,189,197,255,184,108,209,253, -103, 8, 84,245, 37,199,215,248, 72,207,171, 5,229,132,179,137, 9, 60,207,227,142, 59,238, 0,195, 48,151,173,229,201,243, 60, -118,237,218,133, 91,111,189, 21, 60,207,227,137, 39,158, 8,136,147,227, 56, 12, 29, 58,212,185,142,162, 43,159,187,104,240,162, - 9,178,221, 42, 91,112, 28, 7,150,101,189, 46,164,237,206,233,175, 94, 18,195,233,139,203,245, 63,127,225,116, 44,121, 20,176, -200, 10,148, 83, 12, 39,199,113,232,211,167, 15, 14, 29, 58,228, 83,116,121,209,151,141,226,126,233,210,165, 49, 29, 58,116,200, -153, 59,119,110, 56, 0, 84, 85, 85, 57, 23,188,151, 72, 36, 56,117,234, 20,204,102, 51,222,125,247, 93,139, 86,171,253, 55, 45, - 71,148,179, 37, 57,125,105, 17, 0,253, 39, 78,156,216, 51, 43, 43,107,122, 70, 70,198,119, 59,119,238, 92,202, 48,204,106, 66, - 72,166,248, 57,113,226,196,180,172,172,172,233, 19, 38, 76,120,115,198,140, 25,199, 24,134, 89, 13, 0,238,191, 29,117, 73,166, -155,136,139, 20,121, 28,101,174,209,177,158,126,187,127,122,226,110,228,104,101,102,102, 50,142, 72, 50,174,149, 90,160, 66, 43, -144,181,251, 56,142,123,126,250,244,233,209,190, 68, 86,125,125, 61, 74, 74, 74,144,152,152,136, 39,158,120, 34,122,238,220,185, -207,219,108,182,143,125,208, 74, 37, 18, 9,246,238,221,139,242,242,114,116,237,218, 21,201,201,201,141, 14, 56,123,246, 44,214, -174, 93,139,154,154, 26,244,232,209, 3,104,232,220,237, 17,221,186,117,123,183, 83,167, 78, 67, 89,150,181, 41, 20, 10, 28, 62, -124, 24,221,187,119,199,247,223,127,143, 54,109,218, 64,169, 84, 34, 55, 55, 23, 93,187,118,197,214,173, 91, 17, 25, 25,137,244, -244,116,155, 86,171,221, 86, 93, 93,189,249,220,185,115,239,122, 11,103,124,124,252,228,167,158,122, 74, 86, 82, 82, 34,124,243, -205, 55,219, 1,108, 7,240,252, 91,111,189,245,248,176, 97,195,162, 14, 30, 60, 88,187,111,223,190, 61, 94, 68, 86, 32, 78,150, -205,253,161,100,183,219, 77, 6,131,193,108, 50,153,172, 44,203, 22, 50, 12, 99,182,219,237, 29,188,153, 16, 99,199,142,109, 91, - 89, 89,249,220, 75, 47,189, 84,224, 16, 89,167,208,208, 1, 30, 0, 96,179,217, 76,245,245,245,218,140,140,140,196,135, 31,126, -248,204,210,165, 75,159, 27, 59,118,236,242,111,190,249,166, 30,128,193,157,176, 77,155,214,135, 36, 18, 86,170,171, 11,207, 95, -177,252,203,151,215,174,122,190,117, 81,209,133,246, 17,173, 34,117, 82,117,100,201,242, 37, 95,239, 7, 96, 46,169,208,226,200, -217, 82,240,188, 4, 39,138,106,209,255,246, 81,252,153,188,105,125, 1,172,161,239,114, 45,255,178, 40, 46, 66,189,101,203, 22, -159,142,214,174, 93,187,192,243, 60, 20, 10, 5,102,207,158,237,147, 84, 20, 6,162, 91,228, 79,204,136,139,163,251,114,159, 4, - 65,112, 46,244,238,190,253,223,255,253, 31, 94,122,233,165, 70,215,112,136, 13,198, 31,167,183,240, 37, 38, 37,161,188,172,172, -209,190, 64, 22,165,183,219,237,224,121, 30, 11, 22, 44, 64,102,102, 38, 86,175, 94,237,243,243,142, 59,238, 0,203,178, 36,144, -244,236,211,167, 15, 44, 22,139, 51,204,167, 78,157,242,200, 59,111,222, 60,127,193,188, 11,192,148,238,221,187,107, 6, 13, 26, -132,156,156, 28,220,127,255,253, 38,139,197,146, 7, 0,119,222,121,103,234,220,185,115,101, 7, 14, 28, 64, 68, 68, 4,127,254, -252,249,255,129,118,144,167,104, 97,120,210, 34,226, 51, 47, 43, 43,107,186,187,136,113,133,248, 63,195, 48,171,103,204,152,145, -233, 42,138, 92,127,139,174,147,155,136, 75,115,117,164, 92, 69,148, 55, 1,229,246,188,117, 61,190,194,163,208,114, 68,108,160, -171, 11, 36, 86,190,254, 68,150,143, 55,199, 70, 8, 9, 9, 25,126,239,189,247, 58, 69,142,209,104,116, 10, 44, 81,100,137,191, -115,115,115,209,179,103, 79,105, 72, 72,200,240,170,170,170,143, 3, 16,113,136,139,139, 67,101,101, 37,142, 30, 61,138,196,196, - 68, 88,173, 86,172, 95,191, 30,181,181,181,224,121, 30, 82,169, 20, 22,139,207,190,219,232,212,169,211, 29,139, 23, 47,238,185, -104,209,162, 75,226, 27,221,146, 37, 75, 64, 8, 65,100,100, 36,244,122, 61,202,202,202,176,121,243,102,216,108, 54,168,213,106, -164,164,164,200,238,185,231,158,190, 83,166, 76,225,125, 8,173, 62,247,223,127,127,136, 70,163,193,139, 47,190, 72, 44, 22,203, - 12,199,190,201,227,198,141,139, 40, 44, 44, 52, 63,249,228,147,123, 45, 22,203, 71,162,153,232, 42,112,188,220, 88,175, 78,150, -213,106, 21,211,180,160,190,190, 30,173, 90,181, 74,116,117,182,188,137,193, 29, 59,118,244, 1, 32,153, 58,117,106, 16,128, 50, -215, 48,152,205,102,212,215,215, 67,167,211, 89,107,107,107,203, 95,123,237, 53,219,210,165, 75, 37,142,115, 78,120, 18, 90, 12, -115,135, 89,163, 81,202, 8,145,188, 53,127,254,124,245,176, 97,195, 88,181, 90,141,186,186, 58,205,175,235,214,169, 7, 15,234, -155, 50, 61,235,195, 13,154,132,174,101, 59, 14,231,227, 66,105, 45,204, 86, 43, 82, 98, 67, 26,252, 48,138, 22,135, 99, 32,139, -211,209,114, 21, 21, 57, 57, 57,184,253,246,219,157,101, 93, 42,149, 54,114,190,252,113,114, 28,135,219,111,191,253, 50,135,103, -203,150, 45, 30,221, 39,127,112, 21, 69,238,226,200,147, 0, 99, 89,214,239, 2,235,162,155,231, 73,108,185,186,250,110,226,205, - 95, 51, 7, 56,142,195,184,113,227,192,243, 60, 94,127,253,117,112, 28,135,244,244,116,112, 28,135,140,140, 12,240, 60,143, 91, -111,189,181,201,113,223,189,123, 55,186,119,239,238, 12, 83,122,122, 58,122,245,234, 5,142,227,208,175, 95, 63,240, 60,143,161, - 67,135, 6,194,249,102, 93, 93, 93, 55,181, 90,141,220,220, 92, 72, 36, 18, 48, 12,115, 26, 64, 55, 0,136,141,141, 61,163, 6, -111,130,189, 0, 0, 32, 0, 73, 68, 65, 84,215,235,219, 26,141, 70, 60,245,212, 83,140,217,108,238,250,250,235,175,191,101, 52, - 26,169,208,162,104, 49,184,107, 17, 23, 24, 38, 76,152,240, 38,195, 48,171, 69,135,202,221,121,242,244,219, 67,221, 36, 58, 80, -251, 28,101,181,151,155,136,171, 96, 24,102, 31, 33,228, 78,111,231, 2, 48,187, 9,171, 70, 77,135,174,205,134,126, 29, 45,177, -242, 13, 84,104,249,131,209,104,188, 49, 42, 42,202,171,200,114,253, 52,155,205, 72, 78, 78,134,209,104,188,177,169, 15,141,216, -216, 88, 88, 44, 22,124,249,229,151,144, 74,165,144, 74,255,208, 23,102,179,111,179,232,248,241,227, 5,187,119,239,238,222,163, - 71,143,176,159,126,250,169, 98,192,128, 1,145,195,134, 13,131, 66,161,128,193, 96,128,213,106, 69,239,222,189,209,169, 83, 39, - 20, 23, 23,227,215, 95,127,173,236,208,161, 67,171, 61,123,246, 8,165,165,165,231,124, 80,223, 54,120,240, 96, 48, 12,131,117, -235,214, 85, 2,216, 39,151,203,215, 78,155, 54, 45,204,108, 54, 11,163, 71,143, 62, 95, 93, 93,253, 18, 0,139, 76, 38,155, 51, - 96,192,128,140,236,236,236,111, 5, 65,152,221,212,140,234,158,182, 58,157, 14, 65, 65, 65,129, 76, 37,193, 87, 87, 87,119, 1, - 0,149, 74, 21, 14,224,140, 51,135, 27, 12,141,196,176,217,108, 54,134,135,135,171, 0,192,113, 14,239,133, 51,210,102,195,138, -115,231,242,131, 93,251,207,133,134,134,226,145,135, 31,102,111,233,211, 71,214,237,198, 27,135,190,253,201,162,239,227, 34, 52, -230,148,184, 8, 88,237, 86,100,111, 88, 47, 16,193,186,129, 86, 59,127,142,208, 18,197,134,187,163,197,243, 60,182,110,221,122, -217, 62,169, 84,138,255,254,247,191, 1, 9, 3, 81, 84,121,107, 58,115,107,234, 98,252, 9, 24,158,231, 33,145, 72,176, 96,193, - 2, 8,130,128,151, 95,126,185, 81,115,162, 43,127, 64,118,158,139, 8,236, 52, 89, 0, 96, 70,241, 76,185,243,124,247,240, 58, -206, 9,200, 37,155, 59,119,110, 64,142,214,157,119,222,233, 87,184,186,182, 48,184,134,235,208,161, 67, 30,121,231,207,159,239, - 55, 61,237,118, 59,214,172, 89,227, 20,169, 34,222,126,251,237,167,100, 50, 89,244,182,109,219, 80, 90, 90, 10,157, 78,135,250, -250,122,244,238,221, 59,133,101,217,195,165,165,165,133, 39, 78,156,184,151,150, 30,138, 63,209,209, 50,205,152, 49,227,216,140, - 25, 51, 60, 58, 86,238,206,146, 47,231, 73, 20, 88, 14, 65, 20, 41,138, 55, 52,116,171,217,231,239, 92, 0, 50,247,166, 67,159, - 70,144,155,138,156,226,169,242, 13,164,249, 48, 64, 59,157, 99, 24, 6, 70,163,209,163,192,114, 21, 7, 22,139, 5,213,213,213, -176,219,237, 87, 60,215,151,167, 55, 89,127, 66,235,232,209,163,255,122,252,241,199, 75, 66, 66, 66,186, 85, 84, 84,148, 11,130, -112,235,174, 93,187, 34, 57,142,131, 70,163,129, 70,163,193,218,181,107,161, 84, 42, 49,110,220,184,114,187,221,158, 19, 28, 28, - 28, 97, 48, 24,126, 47, 45, 45,125,219,171,130,225,249,161,253,250,245,195,129, 3, 7,112,233,210,165,141, 0,210, 31,125,244, -209,219, 91,183,110,205, 76,155, 54,205,120,246,236,217,217, 0,202, 85, 42,213,226,197,139, 23, 15,234,209,163, 71,240,232,209, -163,177,117,235,214,249, 0,140,129,198, 89,167,211, 53, 18, 88, 90,173, 22,117,117,117, 80,169, 84,182, 0,211,140,199, 31, 35, - 12, 65, 8,113,222, 27,135,155, 37,222, 31,194,113,156, 56,170,209,155,200,130, 74,165,154,186,104,209, 34,133,251, 32, 5,187, -221,142,178,178, 50,104, 52, 26, 76,122,251,109,233,123,227,255,221, 93,162,142,222,197,178, 12,204, 22, 82, 67, 4,243,122, 93, -217,131,219,128,119,105,205,243, 39, 64, 20, 6,119,223,125,247,101,205,133, 82,169, 20, 27, 55,110,196,136, 17, 35,156, 47, 46, - 61,122,244,240,251,114, 37, 10,131,187,238,186,203,233, 12,173, 95,191,222, 99,179,159,232, 72, 5, 34, 8,197, 99, 95,120,225, - 5,112, 28,135,207, 62,251, 12,175,188,242, 10, 88,150,197,204,153, 51,193,178, 44,222,121,231,157,128, 69,166,171,128, 41,252, -176,225, 51,225, 21, 45,170,230, 69, 3, 0,130, 53, 26, 49, 66, 77,170,123, 56,142,115, 58, 89, 55,222,120, 35,120,158, 71, 70, - 70, 6, 56,142,115, 58, 89,195,135, 15,119, 77, 71, 18, 8, 39,199,113,200,203,203,115,134, 57, 35, 35,163,145,147,197,113, 28, -238,188,243,206, 64,130, 57, 61, 52, 52,116, 74,167, 78,157, 58,207,154, 53,139,151, 72, 36, 24, 60,120,112,106, 76, 76,204, 57, -155,205, 22, 49,117,234, 84,165,135,115, 20, 0,186,117,238,220, 89, 69, 75, 13, 69, 11, 58, 90, 83, 60,252, 21,230,218,231,170, - 9, 47,146,171, 93,143, 23, 57,220,197,145,195, 33,203,241,199,229,233, 92,127,224, 68, 5,233,203, 82, 15, 68,104, 57,108,103, -159, 23, 83, 42,149, 71,202,203,203, 51, 20, 10, 69, 35,145,229, 73,112, 73, 36, 18,148,150,150, 66,169, 84, 30, 49,153, 76,205, -118, 19,253, 53, 29, 2, 48,158, 62,125,122,188,203,239, 33,195,135, 15,255,102,227,198,141,177,217,217,217,216,179,103, 15, 34, - 35, 35, 49,119,238,220,139,101,101,101,255, 2,176,177,178,178,210,239,117,219,182,109,219, 69,173, 86, 99,199,142, 29, 0,176, - 21,192,191,159,123,238, 57,198,106,181, 98,222,188,121, 58, 0,235, 66, 67, 67,215, 44, 95,190,188,123,183,110,221,100,217,217, -217,218, 61,123,246,252, 22,160,200,178, 11,130,112,153,192,114, 77,211,224,224,224, 64, 28, 45,107, 72, 72,200, 81,173, 86, 59, -202, 96, 48,104,229,114,121,176, 86,171, 53,185, 10, 44,145,159,227, 56, 62, 47, 47,175, 4, 64, 74, 72, 72,200, 81,120,105,230, -228, 56,110,240,224,193,131, 57,247,123, 80, 86, 86,134,210,210, 82, 88, 44, 22,244,232,209,131,145, 48, 86,201,165,162, 35,110, -211, 58, 80,145,245, 39, 57, 90, 68, 44,235,226, 40, 65, 79, 35, 13,215,175, 95,239,252,205,178, 44,190,254,250,235,128, 68,209, -198,141, 27,125,118, 88,119,107, 58,244,107,141,139,199,127,254,249,231, 32,132, 56,157, 44,150,101, 49, 97,194, 4,200,229,114, - 76,155, 54, 13, 19, 38, 76, 0,199,113,126,155, 14, 93, 5, 76,210,235,122,215,151,163,134, 66,225,232, 15,197, 48,140,171,216, - 98, 2, 21,111,190,220,188, 64, 90, 2, 92, 57,197,243,130,130,130,188,118,132,119,227,244,117,129, 95, 0,228,199,198,198,238, -200,200,200, 8,217,191,127, 63,102,206,156, 41, 53,153, 76,109,178,179,179,157,215,245,148, 94, 58,157, 78, 65, 75, 14, 69, 75, -184, 89, 62,254,174,112,235, 95,197,184, 54,227,249,248,116, 63, 30, 46,251, 92,121, 43, 24,134,177,122,184, 94,133, 7,113,229, -126, 13,215, 99, 42,188, 58, 90,254, 42, 11,127,130, 43, 16, 71, 75,175,215,255,182,110,221,186, 94, 15, 63,252, 48,231,171,217, - 80,167,211, 33, 58, 58, 26,199,142, 29,179,233,245,250,223, 2,112,202,154, 83,104,185, 35,187,188,188, 92, 98,181, 90,209,190, -125,123,196,199,199,195,104, 52,162,166,166, 70, 2, 96, 99,128, 28, 82,149, 74, 37, 1,128,154,154, 26,160, 97,168,105,106,135, - 14, 29,112,224,192, 1, 84, 87, 87,255, 8, 96,216,148, 41, 83,122,244,238,221, 91,250,253,247,223,235,159,121,230,153, 31,173, - 86,107, 64, 74, 67, 16, 4,179,205,102, 75,102, 89,214, 82, 83, 83,115,193, 53, 61,163,163,163,195, 85, 42, 21, 83, 86, 86,102, - 13, 68,104,117,235,214,109,239,249,243,231, 49,117,234,212,138,233,211,167,119,168,171,171,187, 84, 91, 91,107,115, 21, 91, 70, -163,145,109,213,170,149,124,222,188,121, 10, 0,232,214,173,219, 94,111, 66, 75,167,211,181, 86, 42,255,120, 49, 54,153, 76, 40, - 45, 45, 69,105,105, 41,202,202,202, 80, 87, 87,135,148,148, 20,232,245,250, 68, 90,205,252,101, 66,171, 81,243,153,107,249,118, -125,144, 55,165,172,187, 10,152,187,239,190,219,217,183, 75,116,200,196,109,197,138, 21,238, 29,204, 3, 18, 90,159,127,254, 57, - 94,120,225, 5, 4, 5, 5, 97,214,172, 89,141,154, 14,221,197,129, 32, 8, 76, 32,113, 79,126,195,128,210, 57,225,224,121, 30, - 17,207,148, 53,106,162,243, 32, 56, 2, 10,231,244,233,211,155,165,233,208,149, 51, 49,177,161,168, 44, 88,176, 0,163, 70,141, -194,182,109,219,174,184,233, 48, 45, 45,109,201,234,213,171, 67,142, 31, 63, 14,173, 86,139,138,138, 10,152, 76, 38, 20, 23, 23, -123,109, 21,112,212,229, 65,180,228, 80,252,201,245,212,190, 63,147,183, 57,175,199,249,121,128, 7, 44,180, 2,113,180, 76, 38, -211,172, 23, 95,124,241,185, 33, 67,134,132, 7, 7, 7,163,164,164,228, 50,145, 85, 95, 95, 15,181, 90, 13,131,193,128, 85,171, - 86,105, 77, 38,211, 44,127,226,192,106,181, 34, 42, 42, 10,149,149,149, 16,188,244,159,102, 89, 22, 10,133, 2,245,245,245,128, -159, 78,230,158, 30, 24, 22,139, 5, 86,171, 21, 86,171, 21, 22,139,197,239, 91,178,187,153,167, 82,169, 68,225, 1, 0,186,184, -184,184,246, 65, 65, 65, 40, 40, 40, 0, 26, 70,246, 13,185,253,246,219,249,170,170, 42,242,228,147, 79,110, 39,132, 60, 5,223, -179,227,155,115,114,114,146, 1, 64,161, 80,228, 2, 64,113,113,177,181,166,166,166,145, 83,168, 84, 42,201,136, 17, 35, 98, 9, - 33,200,201,201, 73,150, 74,165, 4,222, 71, 53, 26, 87,174, 92,121, 60, 36, 36,100,105, 86, 86,214,195,153,153,153,199,186,116, -233,146,172,211,233,202, 13, 6,131,193,104, 52, 18,137, 68, 34, 13, 11, 11, 11,218,176, 97,195,153, 93,187,118, 13,209,104, 52, - 75, 87,174, 92,121,220,155,243,166, 82,169,138,245,122,125,146,120, 79, 93, 69, 86,105,105, 41, 8, 33,200,207,207,135, 82,169, - 60,239,175, 89,151,162,229, 32,190, 84,185, 59, 47,238,251, 2, 21, 89,174,194, 96,195,134, 13, 62,231,208, 10,148,211, 85, 20, -189,242,202, 43,152, 51,103,206,101,142,214,180,105,211, 0, 0,111,191,253,118,192,125,180, 68,247,170,116, 78, 56, 98, 94,168, -110, 20,118, 0, 96,196,240, 53,173,204,131,227, 56, 76,157, 58,245,178, 78,234,174, 77,123, 1, 54,241, 53, 10,103,121,121, 57, - 56,142, 67,120,120, 56, 30,121,228, 17, 12, 29, 58,212,217, 4,217, 84,222,147, 39, 79,238,120,227,141, 55,186,166,165,165,225, -253,247,223,175, 14, 13, 13, 13,254,207,127,254,195,213,212,212, 48,190, 28, 45, 42,180, 40, 40,154, 65,104,137, 5, 44,208, 81, -135, 94, 42,203, 33,104, 60,215, 70,173, 94,175,127,228,182,219,110,251,105,217,178,101,138,182,109,219,226,228,201,147,168,174, -174,134,217,108,134, 84, 42, 69,108,108, 44,106,106,106,240,245,215, 95, 27,244,122,253, 35, 0,106,253,112,190,213,179,103,207, - 47, 62,254,248,227,160,244,244,116, 84, 87, 87,163,190,190,222, 41,132, 24,134,129, 70,163,129, 66,161,192,222,189,123,177,126, -253,122, 3,128,183,252,112,122, 82,115,176, 88, 44, 78,193, 21,128,208,114,229, 84,137,174,142, 94,175, 7, 0,107,235,214,173, - 99, 0, 32, 63, 63, 31, 0, 10, 83, 82, 82,166,180,109,219,150, 89,188,120, 49, 33,132,172,247, 34,178,156,156, 12,195, 84, 19, - 66, 46, 1,136, 49,155,205, 82, 0,168,173,173,181,180,106,213, 42, 74, 46,151, 11, 10,133, 66, 8, 10, 10, 18, 74, 74, 74,108, - 54,155, 77, 10, 0,253,250,245, 51, 3, 40,117, 91,163,208,149, 83, 32,132,104,231,207,159, 63,101,244,232,209, 25,125,250,244, - 73,123,246,217,103,143, 62,249,228,147,108,124,124,124, 88, 93, 93,157,241,244,233,211,151, 62,249,228,147,186,221,187,119, 15, -225,121,254,220,252,249,243,167, 0,208, 50, 12, 35,120,226,180,217,108,191,101,103,103,255, 43, 51, 51,147,187,112,225, 2,202, -202,202,156, 34,171,172,172, 12,157, 58,117,194,174, 93,187,236, 22,139, 37,187, 9,233,217, 92,160,156, 13, 47, 33, 68, 44,235, -222, 4,150,248, 50, 21, 40,167,171, 40, 26, 53,106, 84, 35, 23, 75, 42,149,226,135, 31,126,240, 88,111,120, 40, 87,141,226,238, - 58,199,215, 27,111,188,209, 72,180, 77,154, 52,201,107,117,230, 47, 61, 69,158,218, 5,241,141, 71, 29,122, 41,231,190,194, 41, -214,157, 60,207, 99,210,164, 73, 1, 59, 90,184,188,143,214,101,156, 98,220, 7, 12, 24, 0,189, 94,239, 20,178,222, 28, 45,127, -233,105,183,219, 95,152, 51,103, 14,209,104, 52, 55,107,181,218, 71,207,159, 63,191, 80,175,215,223, 84, 91, 91,235,211,209, 50, -153, 76,114, 90,142, 40, 39, 90,102,126,174,235, 71,104, 57, 30,146,104,221,186,117,163,181,179, 88,150,109,180, 53,165,159,129, - 3, 27,242,242,242,238,187,229,150, 91,190,125,225,133, 23,130,211,211,211,249,164,164, 36,232,116, 58, 20, 20, 20,224,216,177, - 99,182,149, 43, 87,106,245,122,253,163, 0, 2, 25,117,182,232,248,241,227,235,135, 13, 27,246, 78,239,222,189,159,158, 60,121, -178, 36, 53, 53, 21,181,181,181, 8, 11, 11, 67, 84, 84, 20, 78,157, 58,133, 85,171, 86,217, 43, 43, 43,191, 0,240, 30, 60,180, -161,250,123,225,183, 88, 44,120,232,161,135, 32, 8, 2,102,207,158,141, 64, 22, 84,118,129,197, 98,177, 16, 0,140,163, 63,151, -222, 49,187, 52, 78,159, 62, 13, 0,231,146,147,147,131, 1, 32, 59, 59,155, 65,195,252, 90,129,188,225, 19, 66,136,211,217,234, -212,169, 83,129,123,229, 40, 58, 89,162, 11,230, 47,220, 12,195, 24, 9, 33,229,122,189,126,216, 43,175,188,242,206,231,159,127, -254,240,231,159,127,126,217,113, 26,141,102,233,204,153, 51,223,123,224,129, 7,202, 25,134,241,218,143, 76,167,211,189, 61,102, -204,152, 7,142, 28, 57, 18, 28, 20, 20, 4,157, 78,135,170,170, 42, 88, 44, 22,164,164,164,160,188,188, 28,139, 22, 45,170, 51, - 24, 12,239,210,226,248,215,192, 85, 24,120,115,181, 2, 16, 89, 94, 93,157, 95,126,249,197,227, 28, 85, 77,229,116, 23, 27,129, -206,109,229,235,165, 72,156,150,198,211,148, 17, 77,172,215, 46,227,229, 56, 14, 31,125,244,145,115,210, 86, 79, 78, 86, 83, 28, - 45,145, 51, 60, 60,188,193, 38, 87, 42, 33, 8, 2,238,188,243,206,171,225, 21, 0,140,115,153,241,125,250,107,175,189, 54,165, - 83,167, 78,169, 0,228,174,105,208, 68, 23,159,130,130,194,159,208,178,219,237,197, 29, 59,118,108, 84,193,249, 91,204,212,106, -181, 22, 7,120,221,245, 58,157, 46,101,230,204,153, 47,170, 84,170, 33,122,189,190,171,163,226, 56,162,211,233,178, 77, 38,211, -167,104,218, 34,208, 21, 0,158,223,189,123,247,236, 97,195,134, 77,187,245,214, 91, 71,142, 31, 63,158, 33,132, 96,222,188,121, -228,236,217,179, 43, 28, 46,214,217, 43, 73,164,240,240,240,227, 95,127,253,117,244, 79, 63,253, 4,171,213,138, 79, 63,253, 20, -193,193,193,199,171,171,171, 3,165, 40,223,180,105,211, 55,125,250,244,121,108,215,174, 93,139, 0,252,190,117,235,214,133,125, -251,246, 29,179,107,215,174, 37, 0,142,109,222,188,121, 97,239,222,189,199,236,219,183,111, 57,128, 67, 77,168,124,157,206,150, -205,230,185,165,209,139,147,229,139, 83, 75, 8,177, 60,254,248,227,227, 31,120,224,129, 47,247,237,219,119, 83, 77, 77, 77, 87, - 0, 8, 13, 13, 61,210,171, 87,175,189,203,150, 45, 59,229,112,178,252,117,214,175,208,233,116, 35,186,118,237,250,227,251,239, -191,175, 74, 75, 75,227,218,183,111,143,194,194, 66, 28, 61,122,212,246,191,255,253,175,222, 96, 48,220, 13,224, 18, 45,142,127, -157,208, 34,132, 32, 52, 52,180,209, 75,148, 56,228,191,169,205,133,174, 15,102,113,169, 30,119, 94,111,156,190,166, 77, 16,161, - 86,171,157,147,155, 6,210,101, 65, 16,124,207,199, 70, 8,113,114,138, 91, 0, 34,203,239, 8, 65,199, 18, 56, 1,115, 6, 50, -189,131, 74,165,130,213,106,117,242, 6, 48,242,179,169,106,241, 23, 0,191, 88,173,214,211, 0,218, 81,113, 69, 65,209,130, 66, -235,210,165, 75, 61, 91,248,218, 90,147,201,244,158,201,100,122, 79,220, 97, 52, 26,175,150,243, 44,128, 7, 54,109,218,244,241, -166, 77,155,196,118,132,169,240,191, 94,162, 79,156, 60,121, 50,147,231,249,255, 46, 93,186,180, 55, 33, 4, 33, 33, 33,187, 11, - 11, 11,255,211, 20, 14,187,221,254,248,174, 93,187,158,131,163, 47,147,197, 98,121,124,199,142, 29, 47,162, 97, 61, 38,216,237, -246,199,247,236,217,227,252,221,196, 7, 37, 33,132,152, 8, 33,113, 94, 14, 49, 53,209,129, 19,157, 45,243,178,101,203,234, 1, - 28,198, 31,243,100, 89, 29,155,209,173,185,208, 23, 54,235,116,186,246,147, 38, 77,154, 46,145, 72, 6,235,116,186,120,149, 74, - 85,100,179,217,126,211,235,245,111,161, 97,141, 42,138,191, 8,102,179,249, 66,199,142, 29, 57, 79, 47, 80,190, 30,228,190, 94, -172,236,118,123,113,135, 14, 29,252,190,156,121,224,188,224, 67, 52,156, 75, 73, 73, 97, 3,229, 18, 97,177, 88,202,125,133, 51, - 37, 37, 5, 77,229,244, 23,247,228,228,100,143,113,247, 35, 8,189,198,221,102,179, 93, 17,167,175,244,244, 5,131,193,112, 41, - 50, 50,178,222,104, 52,242, 38,147,137,183,217,108,141,236, 71,133, 66, 81, 97, 48, 24,104,225,161,160,184, 26,161,245, 15,199, -126, 52, 44, 47,209, 92, 48, 29, 57,114,228, 49,167, 61, 85, 94,126,165, 60,238, 74,178,222,207,239,166, 8,163,102,119,132, 28, - 66, 74,223, 76,116,149,245,245,245, 79,138, 63,196, 62, 32, 20,127, 61,170,170,170,110,110,110,206,234,234,234,102,127, 81,171, -172,172,204,104,129,184,247,188, 94, 57,125,161,164,164,228,102, 63, 66,140, 22, 28, 10,138, 0,193,210, 36,160,160,160,160,160, -160,160,160,104, 25, 48,104, 24, 57,224, 9, 77, 25, 77, 48,228, 10,174,157, 77, 57, 41, 39,229,164,156,148,147,114, 82,206,235, -142,211, 31, 55, 29,205,216,194, 2,140,114, 82, 78,202, 73, 57, 41, 39,229,164,156,215, 31,231, 53, 9,218,116, 72, 65, 65, 65, - 65, 65, 65, 65, 65,133, 22, 5, 5, 5, 5, 5, 5, 5, 5, 21, 90, 20, 20, 20, 20,174, 72,109,221,186,245,137,212,212,212, 11, - 0,198,182,240,181, 30,233,221,187,119,149, 92, 46,223, 0, 32,149, 38, 61, 5, 5, 5, 21, 90, 20, 20, 20,215,180,200,234,218, -181,235,246,147, 39, 79,118,202,206,206,142,139,143,143,255,176, 37, 47,214,179,103,207, 15,182,109,219, 22,190,110,221,186,219, - 98, 98, 98,114,174, 80,108,165,182,105,211,230, 68,106,106,106, 49,128, 71,154, 57,136, 99, 51, 50, 50,170,101, 50,217,122, 42, - 4, 41,174, 3,116, 1,208,149, 10, 45, 10, 10, 10,138, 22, 20, 89, 59,119,238,140, 48, 26,141, 56,121,242, 36, 42, 42, 42, 14, -181,228, 5,115,115,115, 47,237,220,185, 19, 9, 9, 9, 88,178,100, 73,100,114,114,242,182, 38, 10,154,212,174, 93,187,110, 63, -113,226, 68,167,236,236,236,248,168,168,168, 79,154, 51,124, 55,221,116,211,180,109,219,182,133,109,216,176, 97,104,100,100,228, -149, 10, 65, 10,138,191, 51,228, 0, 30, 99, 24,102,111,151, 46, 93,142,164,165,165,253,206, 48,204, 46, 0,163,112,237,206,221, - 25, 24, 86,175, 94,189,117,245,234,213, 91,105, 30,161,160,160,104, 6,164,165,165,165,233,116, 58, 29,169,168,168, 32,159,125, -246, 25, 9, 15, 15,183, 0,248, 13,192, 74, 15,219,155, 0, 52, 1,114,107, 28,199,123,226,249, 45, 60, 60,220,242,217,103,159, -145,252,252,124,114,252,248,113,146,154,154,106, 8, 80,208,164,118,237,218,181, 82, 12,243,218,181,107, 9,199,113,235,155, 51, - 81, 52, 26,205,177,156,156, 28,114,246,236, 89,178, 97,195, 6, 18, 29, 29, 93, 78,197, 22,197, 53,130, 36, 0, 31,168,213,234, -234,187,238,186,139,124,245,213, 87,100,213,170, 85,228,199, 31,127, 36,179,102,205, 34,131, 6, 13, 34, 50,153,236, 2,128,215, - 1,132, 94, 79, 90,132,113, 68,140, 0, 24, 8, 0,153,153,153, 84,108, 81, 80, 80, 92, 45,118,234,245,250, 12,189, 94,143,186, -186, 58,180,110,221, 26, 60,207,123, 60,176,188,188, 28, 59,118,236,192,184,113,227,142,151,150,150,246,135,239,117, 47,195,186, -119,239,190,115,243,230,205,169,193,193,193,206,157,130, 32,192, 98,177,192,106,181,194, 98,177,192,100, 50,193,100, 50, 65, 38, -147, 65,161, 80, 32, 60, 60,252, 40,124, 55, 97, 56,221, 55,131,193,128,131, 7, 15, 98,244,232,209, 21, 85, 85, 85,253, 1,228, - 54, 99,186,164, 70, 69, 69,229, 44, 90,180, 40, 50, 37, 37, 5,231,207,159,199, 19, 79, 60, 81,121,238,220,185,126,205,124, 29, - 10,138, 63, 19, 19,238,187,239,190,105,209,209,209,108,151, 46, 93, 16, 27, 27, 11,147,201, 4,131,193, 0, 66, 8, 56,142, 3, - 33, 4,181,181,181,200,201,201,193,230,205,155, 77,151, 46, 93,250, 26,192,167, 0,242, 92, 68,214, 53,169, 69,156, 66, 43, 51, - 51,147,161,121,133,130,130,162,153,112,164,182,182,182,139,201,100,130, 78,167, 11,232,132,252,252,124,140, 29, 59,246,120,105, -105,233, 45,240,188,168,188,166,123,247,238,123,114,114,114, 82,141, 70, 35,180, 90,255,235,206,203,100, 50, 4, 5, 5, 33, 34, - 34, 98, 23,128, 62,222,222,196,187,116,233,178,127,215,174, 93,225, 6,131, 1,135, 14, 29,194, 35,143, 60, 98,169,174,174,222, - 14,192, 91,224,171,209,176,142,234, 57, 15,255, 37, 2,120,209,241,134,239, 9,170,200,200,200,190,139, 23, 47,150,182,109,219, - 22,122,189, 30,163, 70,141,170,206,205,205,237, 5,160,128,102, 29,138,127, 32,114, 79,158, 60,217,193,110,183,163,178,178, 18, - 38,147, 9,122,189,222, 41,180, 36, 18, 9, 8, 33,176,217,108,206, 23,163, 3, 7, 14, 32, 59, 59,155,228,231,231, 79,118,148, -165,107, 86,139, 80,161, 69, 65, 65,209, 18, 72,237,208,161,195,161, 95,127,253, 53, 72, 42,149, 98,213,170, 85,152, 60,121,178, -181,186,186,122,155,187,120,137,142,142, 78, 91,184,112, 97,114, 74, 74, 10,126,255,253,119,220,127,255,253,111, 1,152,238,129, -243, 77,173, 86, 59,205, 98,177,224,208,161, 67, 24, 51,102, 76, 65, 89, 89,217, 49,119, 17,147,156,156,220,239,147, 79, 62,225, -123,244,232, 1,173, 86,139,145, 35, 71,234, 79,157, 58,213, 27,192, 49, 47, 97,253,164,186,186,250, 21,187,221,142,186,186, 58, - 36, 36, 36, 64, 42,149,250,140,156,193, 96, 64, 82, 82,210,174,138,138,138,203,196, 91, 68, 68,196,166,243,231,207, 15, 82, 40, - 20, 62, 57, 44, 22, 11,138,139,139, 33,147,201, 96, 50,153,208,174, 93,187,175, 1, 60, 78,179, 14,197, 63, 81,104, 29, 62,124, -184,195,119,223,125,135,238,221,187,163,115,231,206,168,175,175,119,138, 46,179,217, 12,171,213,122,217, 73, 90,173, 22, 47,191, -252,114, 30, 28,205,231,215,170, 22, 17, 59,166, 77, 17,219, 68, 51, 51, 51, 7,208, 60, 67, 65, 65,113,181, 21,111, 94, 94, 94, -250,144, 33, 67,182,173, 88,177,162,213,240,225,195,209,174, 93, 59,254,222,123,239,141,212,235,245,131, 93, 15, 44, 43, 43, 11, - 27, 51,102,204,254,162,162,162,100,199,174, 94, 94, 56,123, 5, 7, 7, 35, 63, 63, 95, 20, 89, 61,225,214,204, 40,147,201,214, - 31, 62,124,152,151,201,100,216,183,111, 31,198,142, 29, 91, 89, 80, 80,224,175, 89, 46,212,108, 54, 67, 34,145, 0, 0,138,139, -139,253, 70,238,252,249,243, 16, 4,193,228,233, 63,150,101,229, 7, 14, 28, 64, 92, 92,156, 79, 14,150,101,221, 5, 93, 13,205, - 54, 20,255, 80, 88,205,102, 51,122,246,236,137,130,130, 2, 28, 56,112,192, 41,184, 42, 43, 43, 81, 82, 82,210,232,224,189,123, -247,226,224,193,131,232,223,191,191, 59,207, 53,169, 69,156,202,113,245,234,213, 3, 28,145,219, 74,243, 12, 5, 5, 69, 51, 33, - 53, 46, 46, 46,103,209,162, 69,145,177,177,177, 24, 52,104, 80, 81,105,105,105, 27, 15,199,173, 36,132,220,157,159,159,143,182, -109,219,174, 2,112,207,149, 28,147,152,152, 88,177,111,223,190, 86,199,143, 31,199, 35,143, 60, 82,225,232,243,229,175,239, 83, -114,167, 78,157,246,109,216,176, 33,156,101, 89, 28, 59,118, 44,144,166,195, 66, 52,244, 47, 57,231,225,191, 68, 0,147, 0,132, -123, 57, 87,213,161, 67,135,190,251,247,239,151, 50, 12,131,194,194, 66,177,233,176,167,131,151,130,226,159,134, 17,113,113,113, -255,123,238,185,231, 66,122,247,238,141,226,226, 98, 92,184,112, 1,151, 46, 93, 66,122,122, 58,210,210,210,112,246,236, 89,172, - 95,191, 30, 7, 15, 30,132, 92, 46, 71, 66, 66, 2,212, 75,191,195,127, 25, 28, 7,144, 70,181, 8, 5, 5, 5,197, 85,136, 45, -169, 84,186, 62, 62, 62,190, 28,158,231,165, 10, 27, 57,114,100,137,221,110, 39,103,207,158, 37,104, 24, 61, 8, 47, 66,139,156, - 61,123,150, 68, 71, 71,231, 3, 8,243,112,204,216,152,152,152, 34,165, 82,121, 20, 77,156,214,161,125,251,246, 21,167, 78,157, - 34, 69, 69, 69,100,221,186,117, 36, 34, 34,162, 37, 70, 4,166,118,236,216,177,178,174,174,142, 24,141, 70,146,147,147, 67, 18, - 19, 19, 43, 64, 71, 30, 82,252,243, 17, 12, 96,106, 74, 74,138,241,227,143, 63, 38,235,215,175, 39, 11, 22, 44, 32,211,166, 77, - 35,227,199,143, 39, 25, 25, 25, 36, 35, 35,131,140, 26, 53,138,188,242,202, 43,228,246,219,111, 39,106,181,186, 22,192,189, 52, -233, 40, 40, 40, 40,154, 23,137, 0,102, 57, 4,213,202,145, 35, 71,150,152, 76, 38,114,225,194, 5,242,195, 15, 63, 16, 52, 76, -221,224, 9,111,150,150,150,146,210,210, 82,113,106,132,124,252, 49,173,195, 87, 14,222,171, 18, 65, 73, 73, 73, 21,251,247,239, - 39,133,133,133,100,237,218,181,196, 33,216,154, 13, 10,133, 98,131, 86,171, 37, 70,163,145,108,218,180,137, 78,239, 64,113, 45, - 34, 10,192,220, 27,110,184,193, 58,123,246,108,178,114,229, 74,242,217,103,159,145, 17, 35, 70,144,215, 95,127,157, 60,248,224, -131, 36, 50, 50,210, 4, 32, 11, 64, 8, 77,174,171, 7, 93,217,156,114, 82, 78,202,233,142,245,199,143, 31, 39, 34,236,118, 59, -185,112,225, 2,217,176, 97, 3,137,137,137, 57,134,198,243,105,185,114,106, 58,119,238,124,242,212,169, 83,228,252,249,243,196, - 98,177, 56, 57, 78,158, 60, 73, 0,108,109,134,112,166,198,199,199,151,111,217,178,133,156, 58,117,138,196,196,196, 20, 53,103, -220,147,146,146,202, 43, 42, 42,200,166, 77,155, 72,100,100,164, 63,145, 69,243, 18,229,252, 39,115, 38, 1, 88,220,163, 71, 15, -251,156, 57,115,200,211, 79, 63, 77, 18, 19, 19,237,142,151,162,248,235, 73, 8, 93,223,179,180, 82, 80, 80,252, 21,144,239,222, -189, 27,114,185,220,185,227,247,223,127,119,157, 71,203,219,188, 13,218, 19, 39, 78,220, 50,124,248,240,109,115,230,204,233,236, - 58,138,105,203,150, 45, 0, 96,106,134,176,229, 94,184,112,161,255,176, 97,195, 62,141,136,136,184,177,180,180,244,157,230,140, -120, 97, 97,225, 43, 93,187,118,157, 94, 87, 87,167,213,235,245,163, 64,231,206,162,184,118, 81, 8, 96,244,129, 3, 7, 62, 60, -112,224,192, 91, 0, 8,128,247, 1,156,184,222, 18,130, 10, 45, 10, 10,138, 63, 27, 99,159,124,242, 73,247,206,226,251, 0,252, -159, 15,145, 37,226, 82, 65, 65, 65,159, 59,239,188,243, 57, 52, 30,157, 40,118, 78,111, 14,228,154,205,230,161,238, 35,165,154, - 9, 75, 74, 75, 75,151,208, 44, 64,113, 29,225, 24,128, 7,175,231, 4,160, 66,139,130,130,226,207,198, 57, 0, 79, 92,197,249, - 90,120,158,103,139,130,130,130,226,111, 7,186,168, 52, 5, 5, 5, 5, 5, 5, 5, 5, 21, 90, 20, 20, 20, 20, 20, 20, 20, 20, -255, 44, 48,240, 62,114, 32,187, 9, 60, 87, 50,162, 33,155,114, 82, 78,202, 73, 57, 41, 39,229,164,156,215, 29,167, 63,238,108, - 80,180,168, 0,163,156,148,147,114, 82, 78,202,249,207,230,100, 28, 27,235,216,196,223,127,231,184, 51,127,227,184, 95, 47,156, -215, 36,254,170,206,240,226,141, 16,208, 48,228,147,226,239, 7,215, 2, 66,232,125,162,160,160,104, 98,221, 33,113,121,216,218, - 29, 27,254,134,117,137,171, 40, 16,174,242,185,212, 18,113,191,158, 57,175,121,161,117,163, 74,165,154, 44,147,201, 82, 24,134, -177,235,116,186, 35, 38,147,105, 62,128, 93, 87,121,205,175,162,163,163,199, 86, 85, 85, 9, 44,203,130,101, 89, 48, 12, 3,150, -101,193,243,188,161,182,182, 86,115, 37,164,145, 93, 70,188,202, 49,204, 11,118, 98,159, 95,126,116,213, 52,127,251, 41,124, 23, - 24,169, 84,122, 95,120,120,120,104, 69, 69, 5, 97,217,134,174,124, 18,137, 68, 92, 8,215, 86, 91, 91,251, 77,160,100, 97, 97, - 97,123,195,195,195, 67,197,243, 25,134, 65, 85, 85, 85, 77,121,121,249, 77, 0, 16, 20, 20,180, 67,165, 82, 69,112, 28, 7,137, - 68, 2,137, 68, 2,189, 94, 95, 85, 85, 85,117, 11,189, 21,255, 76, 44, 95,190, 92, 50, 44,254,137,118, 28, 49,116, 99, 89, 18, - 34, 8, 76,173,141, 81,252,190,254,194, 87,103, 2, 57,127,212,168, 81,118,154,138,127, 30,100, 50,217,236,232,232,232,127,215, -215,215,235, 25,134, 33, 12,195,128, 97, 26,222,179,220, 63,237,118,123,113, 85, 85, 85, 79, 63, 15, 91, 94, 38,147,205,140,137, -137, 25,163,215,235,245, 14, 62,143,188, 0, 96,181, 90,139, 43, 43, 43,123, 6, 84,215, 71, 70,206, 87, 40, 20,143,234,245,122, - 29,195, 48,130,235,127,132, 16,215,135,249,217,202,202,202,126,254,132,129, 76, 38,251, 52, 58, 58,250, 95,142,184, 59,195,121, -181,113,143,142,142, 30,163,211,233, 2,226,244, 17,247,203, 56, 91, 34,156,127, 83,206,107, 95,104,165,167,167,127,183,103,207, -158, 14, 60,207, 3, 0,140, 70, 99,215,185,115,231, 62,246,198, 27,111,100, 1,152,120,133,215, 91,216,175, 95,191,135,114,114, -114,216,149, 43, 87,178,189,122,245, 2,195, 48,176,219,237,176,219,237,232,210,165,139,226, 74, 35, 18,162, 82, 78, 56,184,241, -191, 65, 55, 14,121,242,133,114, 96,154,191,253,190, 4, 38,128,183, 1,164, 52, 49, 8, 21,142,116, 57,232, 69,108,236,100, 89, -182, 73,156,130, 32,228, 95,186,116,169,143, 15, 1,211,236,156, 14,145,117,127,191,126,253, 66,178,179,179,153,162,162, 34, 70, -161, 80, 64, 16, 4,216,237,118, 88,173, 86,220,112,195, 13, 77,114, 66, 67, 67, 67, 53, 19, 38, 76,104,119,199, 29,119,224,135, - 31,126,192, 99,143, 61,134,190,125,251,230,149,151,151, 3, 0, 84, 42, 85,196,241,227,199, 59,132,135,135, 67,175,215,163,182, -182, 22,183,221,118, 27,170,170,170,254,209,133,235,230,244,132,247, 25,150,113,206, 21, 69,108,246,234, 61,191,151,188,125,181, -188,225,225,225, 7,229,114,121,180, 95,181,236,242, 32, 51, 26,141,101,213,213,213,221,253,156,146, 4,224, 46,137, 68,210,158, -227,184,142, 0,146,108, 54, 91, 52, 0, 72,165,210, 50,137, 68, 82,104,181, 90, 79,153,205,230,211, 0,126,129,143, 5,144,135, -197, 63,209,142,177,233, 71,214,153,132,225,202,182, 89,169,250,179, 19,114,149,114,253,218, 97,241, 79,172, 8, 84,108,253,133, - 72, 5,176, 12, 13, 11, 74, 63,141,134,121,128,174, 6,241, 0,238, 70,195,154,143,201, 22,139,165, 18,192, 1, 52,244, 67,201, - 3,144, 24, 25, 25,185, 68, 16, 4, 83, 85, 85,213, 19,240,176, 80,117,239, 30,173,247,179, 44,155, 32,122, 2, 2,177, 23,239, - 62, 80,220, 44, 15, 40,150,101, 63,205,204,204,252,215,138, 21, 43,148, 7, 14, 28, 80,118,238,220,217,249, 66, 36, 8, 2, 26, -107, 23, 32, 57, 57,217,159,171,193,177, 44, 59,123,228,200,145, 15, 47, 94,188, 88,121,238,220, 57,101, 92, 92,156,147,211, 85, -108,137,136,139,139, 11, 52,239,127, 53,116,232,208,209,139, 22, 45,226, 87,173, 90,165,104,213,170, 21, 34, 34, 34, 32,149, 74, - 47, 59,246,150, 91,110, 17,252, 71,157,253,244,158,123,238, 25,253,253,247,223, 43,247,236,217,163,236,210,165, 11, 36, 18,201, - 85,199,125,196,136, 17, 15,127,247,221,119,202, 35, 71,142, 40,219,183,111, 15,209, 84,112,231, 99, 89, 22,173, 91,183, 14,136, -243,238,187,239,126,120,217,178,101,202,131, 7, 15, 42, 59,118,236,232, 76, 79, 66,200, 21,135,243,111,206,121, 93, 56, 90, 50, -139,197,130,173, 91,183,130,101, 89,132,135,135, 99,236,216,177,216,184,113,227,132, 77,155, 54,173,190, 2,103,235, 43,135,200, -226, 1,224,199, 71, 71, 32,159, 7,198,149,155, 33,149, 74,113,246,236, 89, 72, 36,146, 38, 91,139,114,185,124, 12, 33,100,146, -254,194, 62,185,193, 96,133,177,100,191, 82,161, 80, 56, 31, 0,250, 18,199,254,139,251,149, 10,133,226,172, 68, 34,153, 90, 95, - 95,191,208, 27, 95,251,246,237,191, 61,118,236, 88, 39, 79, 5,215, 23,244,122, 61,218,180,105,147, 88, 93, 93,221,222,211,255, - 60,207, 39,156, 59,119, 46, 74, 38,147,129, 16,226, 44,196,238,159,226,119,139,197,130, 27,110,184,193,226,235,154,190, 56,109, - 54, 27,130,130,130, 32,186, 81,102,179, 25,245,245,245,254, 56, 25,169, 84,122,159, 40,178, 0, 96,233,210,165,136,137,137, 65, - 84, 84, 20, 84, 42, 21, 20, 10,133,147, 51, 80, 72, 36, 18, 12, 27, 54, 12,239,190,251, 46,178,178,178,240,218,107,175, 53,170, -104,121,158, 71,120,120, 56,214,173, 91, 7,141, 70,131,196,196, 68,136, 2,255, 31,109, 11,178, 76,248,174,253,231,157, 14,237, -237,183,118,226,110,238,206,125,238,120, 84,130,101, 1, 65,104,120,116, 50, 12,136,205, 42, 92,218,127,164,228,157, 0,210, 51, -174,176,176, 48, 42,208, 52,178,217,108,136,139,139,147,248, 57,108,120, 90, 90,218,143,207, 62,251,172,180,125,251,246,140, 84, - 42, 5,199,113,224, 56, 78, 20,232,137,132,144, 68, 65, 16, 6,150,149,149,145,185,115,231,126,184,101,203,150,123, 1,172,245, - 88,177, 16, 67,183, 58,147, 48,124,219, 33,220, 52,114,200, 27, 88,183,124,194, 77,253,210, 5, 4, 43, 13,103, 0,252,157,133, - 86,106, 90, 90,218,161, 61,123,246, 4, 89, 44, 22,244,238,221,123,119,110,110,110, 15, 92,217, 12,238, 97, 0, 62,153, 56,113, -226,232,103,159,125, 86, 18, 26, 26, 10,153, 76,134,186,186, 58,156, 57,115,102,204, 55,223,124, 67,190,248,226,139,255, 3, 16, - 92, 88, 88,152,177,119,239, 94, 12, 26, 52,232, 69, 0, 47, 95,174, 8, 36, 9, 59,246, 22, 68,137,191,239, 30,214, 85,154,209, -147, 45,107,112,113,220,143, 38, 16,236, 66,241,222,195, 23, 2, 17, 98, 31,142, 24, 49,226,145, 21, 43, 86,168, 1, 96,222,188, -121,184,239,190,251, 16, 30, 30, 14,165, 82, 9,169, 84, 10,158,231, 27,125,250,121,216, 74, 0,124,248,224,131, 15,142, 92,188, -120,113, 48, 0, 44, 94,188, 24, 35, 70,140, 64, 68, 68, 4,130,131,131, 33,147,201, 32,145, 72,154,156,152,225,225,225, 95,245, -189,233,166,199, 23, 45, 90, 4, 0,120,235,165,151,112,199,205, 55, 67,173, 84, 64,169,144, 65, 76, 11,153,132,199,237,227, 94, -240,171, 47, 1,124,124,223,125,247, 61,240,253,247,223, 7, 3,192,129, 3, 7, 80, 94, 94,142,232,232,104, 40, 20, 10,200,100, - 50,103,156, 25,134,129, 66,161, 8, 40,238,247,221,119,223,200,239,190,251, 46, 24, 0, 22, 46, 92,136, 97,195,134, 57,227, 46, -151,203, 33,149, 74, 27,109,238,162,211, 19,231,189,247,222, 59,114,217,178,101,193, 0,240,205, 55,223, 96,200,144, 33, 8, 11, - 11,115,166,167,200,213,148,123,244, 55,231,188, 62,132,214,161, 67,135,238, 87,169, 84, 51, 0, 68,202,100,178,208,135, 31,126, -184,245,227,143, 63,142, 7, 31,124, 16,155, 54,109,122,170,137, 66,139,137,142,142, 30,155,147,147,227,124, 66,155,201,101,130, -169,201, 15,112, 7, 38,237,127,234,169,152,172, 51,245,216,189,247, 20,130,192, 50,123, 63,254, 56,210,120,250, 52,236,102, 51, -222, 59, 91,215,176,223, 70,152,173,175,140,139,185,113,246,255, 77, 2,176,208,135, 11, 32, 55,153, 76,200,203,203,107, 82, 32, -138,138,138, 32, 8,130,201,151,187, 32,149, 74,113,244,232,209,203, 84,189, 39, 36, 38, 38,250, 42,128,126, 57,215,175, 95,143, -241,227,199,227,212,169, 83, 16,151, 42, 9,128,147, 9, 15, 15, 15, 21, 69,150, 40,130, 20, 10, 5,120,158,103, 56,142, 99,196, -166, 61, 71,225, 10, 72, 24,179, 44,139,111,191,253, 22, 31,124,240, 1, 94,127,253,117,204,159, 63, 31,221,186,117,251, 35, 19, -114, 28,180, 90, 45,194,194,194, 16, 22, 22,214, 72, 32,254,147,225,126,155,103,206,154,163,132, 64, 26, 58,129, 16, 1, 16, 0, - 2, 2,129, 8, 40,187,112, 6,147,223,253, 40,224,167, 15,207,243, 56,125,250,180, 51, 31,136,206,176, 40,140, 92, 93,131,164, -164, 36,191,121, 73, 42,149, 78,249,249,231,159,101,223,126,251, 45,190,255,254,123, 48, 12, 3,185, 92, 14,149, 74,133,208,208, - 80, 68, 68, 68, 56,183,132,132, 4,230,127, 61,184,254,121, 0, 0, 32, 0, 73, 68, 65, 84,255,251,159,180, 91,183,110, 83,180, - 90,237, 90,207,247,156,132, 40,219,102,165,142, 28,242, 6, 0, 96,228, 27, 4,151,242,166,221,200,214,188,243,119, 94, 68, 54, -181,107,215,174,219,119,238,220, 25,164,215,235, 33, 8, 2,214,174, 93,171, 28, 50,100,200,182,130,130,130,126, 77, 21, 91, 73, - 73, 73,171,118,238,220,121, 75,100,100, 36,106,107,107,161,213,106, 97,181, 90, 33,145, 72,144,152,152,136, 15, 63,252,144,185, -231,158,123,158, 31, 51,102,140, 81,161, 80,136,206, 70,146,231,188,212, 56, 51,205,253,236,243, 80, 66, 26,242, 15, 17, 72,163, -207,234,242, 66,188,244,202,228,128,194,216,186,117,235,167,127,248,225, 7,181,171,179,228, 42, 2, 92, 69,150,184,249, 17, 6, -108,155, 54,109, 30, 95,178,100,137,147,179, 85,171, 86,224, 56, 14, 60,207,131,227, 56,176, 44,139,109,219,182, 97,198,148,137, - 8,139,140,195,156,207,230,249, 13,103,100,100,228,252, 97,195,134, 61,186,112,225, 31, 85,119,215,182,109,113,231, 45, 55, 35, -170,149, 6,173,194,130, 27,210, 73, 96,240,251,169, 2,191,207, 35, 0,108,235,214,173,159, 88,190,124,185,218,245,133, 80,140, -171,248,242, 44,186,248,102,179, 25, 61,123,246, 12, 40,238,174,156,162,219, 38,138, 54, 49, 61,197,235,136,229,213, 79, 56, 31, - 23,133,176, 67,112, 54,226,224,121, 30,203,215, 45,242,234,102, 95, 41,103, 83,239,187, 59,103, 97, 97, 33,166, 79,159, 14,241, -165,205,181,171, 80,124,124, 60,230,204,153,227,183, 94,114, 43, 3,189, 0, 68,186,236, 50, 3,144,185,124, 86, 48, 12,179,207, -195,113,226,126,222,209, 98, 21,137,134,126, 99,117, 0, 66, 61,240,121,227,169,116, 60,243, 34,221,142,111,116, 29,175, 66,107, -245,234,213, 98, 41, 30,152,153,153,185,213,241,189, 70, 46,151, 23, 41,149,202, 24, 0,117,107,215,174,197,127,254,243, 31, 56, -172,213,187, 67, 66, 66,142,121,112,117, 14,153, 76,166, 55, 0,148, 57,118,137, 67, 52,217,234,234,106, 97,227,198,141,236,226, -123,135,194, 76,128,244, 73, 51, 48, 44, 51, 19,235,227,101,144, 0,184,233,100, 37,148, 74, 37,167,213,106,173,174,253,182, 60, -244,221,202,118,203, 80,146, 32,142, 67,239,237,107, 48,126,251, 26,220,164,146,161,106,197, 50,212,237,200, 1,203, 50,232,175, -106,133,215, 30,217,136, 62, 26, 57,100, 38, 29, 88,150,245,148,179,157,156,121,121,121,163, 52, 26,205, 12,183, 4, 14, 4,249, -104, 88,199, 9, 94,194, 9, 66, 8,186,117,235, 6,134, 97,156,110,129,184,137,133, 78,220, 14, 30,244,216, 2,233,149,211,209, - 4, 7,149, 74,133,223,126,251,205,121,204,224,193,131, 97, 52, 26, 17, 30, 30, 30, 16,103, 69, 69, 5, 41, 41, 41, 97, 22, 47, - 94, 12,158,231, 17, 17, 17, 1,165, 82,201, 44, 90,180,104,162, 84, 42, 77, 48, 26,141,130,217,108,134, 76, 38,155, 35,222, 31, -142,227,116, 90,173, 54,194, 27,167, 68, 34,193,179,207, 62,139, 87, 95,125, 21,243,231,207,199, 83, 79, 61,117,153,227,101, 52, - 26,209,170, 85, 43,167,216,242, 80, 0, 91, 98,184,111,203,114, 10, 4,199, 14,174,199,241, 35,217, 16,236, 2,236, 2, 1, 33, -118, 8, 54,224,192,198,221, 29, 46,230,151,196, 19,144,134,174,183, 0,228,181,245,182, 1, 17,178,142, 0, 86,110,173, 50,207, -246, 23, 78,142,227, 96, 52, 26,241,243,207, 63,227,228,201,147, 88,187,118, 45, 12, 6, 3, 90,181,106,133,208,208, 80,220,124, -243,205, 24, 51,102, 12,146,146,146,252,198,157, 16,178,176,168,168, 40,189,111,223,190, 76, 77, 77, 13,106,106,106, 96, 48, 24, - 96,183,219, 97,179,217,192,113, 28,130,130,130,160, 80, 40, 16, 29, 29, 13,163,209, 72, 76, 38,211, 66,111,156,130,192,212,234, -207, 78,200, 93,183,124,194, 77, 35,223, 32, 88,241, 1,131,118,109,228,250,223,246, 7, 63,190,114,251,107,183, 1, 32, 2,113, - 90, 11,196,106, 23, 42, 95,157,248,201,243,127,250, 61,186, 92,100, 69, 24, 12, 6,212,213,213, 53,216,250, 50, 25, 86,172, 88, -209,234,174,187,238,202, 41, 41, 41,233,239, 67,108, 93,198, 25, 28, 28,156, 40,145, 72,112,244,232, 81,124,241,197, 23,248,237, -183,223, 80, 86, 86,118, 41, 46, 46, 46,100,224,192,129,236, 75, 47,189,132,244,244,116,124,253,245,215, 65,254, 56, 9, 33, 40, -204,219,134,194,211,219, 33, 8, 13,174,117,195,230,249, 59, 9, 48,238, 58,157,206,120,232,208, 33,245,151, 95,126,137,168,168, - 40, 36, 39, 39, 67,169, 84, 34, 40, 40,168,209, 67,214,245,193,235,175,108, 26, 12, 6, 99, 97, 97,161,250,187,239,190, 67, 68, - 68, 4,146,146,146,160, 84, 42, 33,147,201,192,113, 28, 24,134,193,226,197,139,177,244,221, 71, 80,120,234, 8, 70,220,121,155, -223,112, 42,149,202, 71, 23, 46, 92,216,200, 2,137, 14, 11, 3,199,179,144,240, 12,194, 6,223, 11, 0,184,180,233, 39, 95,179, - 67,186,114, 50,117,117,117,198, 61,123,246,168,247,239,223, 15, 65, 16,144,148,148, 4,189, 94, 15,141, 70,227,140,255,198,141, - 27,113,207, 61,247,224,219,111,191, 69, 70, 70,134,223,184,215,215,215, 27,143, 28, 57,162, 94,178,100, 9,194,195,195,209,186, -117,107,103,220,197,141,231,121, 72, 36, 18,164,164,164,160,182,182, 22,106,181,218,239, 61, 58,112,224,128,122,201,146, 37, 8, - 11, 11, 67, 66, 66,130,211,113, 19,197,209, 7,159,191,219,136, 32,136,137,189,106,206,166,222,119,119,206, 17, 35, 70,160, 93, -187,118,208,104, 52, 80,169, 84, 78,110, 95,156, 94,180,136, 83,111, 51, 12,179,218,165, 76,100, 50, 12,179,218,245,211,219,113, -142,175,253, 39, 78,156,216, 51, 43, 43,107,122, 70, 70,198,119, 59,119,238, 92,234,141,207, 27,207,196,137, 19,211,178,178,178, -166,187, 30,239,225, 58,222, 29,173,204,204, 76,198, 17, 73, 6, 64,114,143, 30, 61,246,109,218,180, 41, 60, 56, 56,216,121,240, -249,243,231, 81, 83, 83,131,224,224, 96,205,204,153, 51, 53, 3, 7, 14, 68,116,116,180,243, 13, 32, 47, 47,239,134,212,212, 84, - 45, 0,119,223, 86, 96, 89, 22,125,250,244,193, 49, 71,107,199,176,204, 76, 36, 36, 36, 56, 59,121, 4, 5, 5,225,249,231,159, -103,198,143, 31,207,137,110, 6, 33, 4, 6,131, 1,177,177,177, 10, 95,174, 14, 0,164, 25, 42,241,211,192,254, 96, 25, 64,127, -112, 47,164, 50, 6,172,132, 65,119, 82,133, 95, 7,245, 7, 3,192,124,120, 23, 2,112, 97, 14, 2,184,173,101, 28, 14,130, 51, -103,206, 4,228,104, 57,226,197, 92, 41,167,232,104,236,220,185, 19,118,187, 61, 80, 78,194,178, 44, 84, 42, 21, 98, 98, 98,160, - 80, 40,160, 84, 42,153,239,190,251,238,237,228,228,228,216,241,227,199,179, 90,173,150,237,211,167, 15,238,187,239, 62, 78,108, -226, 76, 75, 75,243, 27,151,173, 91,183,226,139, 47,190,192, 83, 79, 61,229,209,209, 98, 24, 6,145,145,145,208,104, 52,184, 86, - 32, 0,176,216,172,208,215, 27,156, 77,186,118,187, 29, 71,182, 28,238,144,127, 56, 47,109,245,119,223,242, 0, 96,220,242,147, -235,105,177,247,125,190, 44,117, 64, 24,191,103,235, 37,235, 30, 95,121,158,227, 56,140, 29, 59, 22, 89, 89, 89,120,244,209, 71, -177,118,237, 90,188,243,206, 59,248,247,191,255,125,153,171,229,239,205,209,106,181,254,247,177,199, 30,123,106,197,138, 21, 29, -223,120,227, 13, 86,116,180,148, 74, 37, 24,134,129,209,104,132,201,100,130,193, 96,192,169, 83,167,132, 39,159,124, 50,215,108, - 54,255,215,107,115, 37,163,248, 93, 41,215,175,109,155,192,182,211, 21,124, 20,220,247,230, 36, 3,163,232, 81,123,111,234, 16, - 50,124,108, 82, 24, 8, 1, 17, 0,129, 0, 38,147, 14,207, 63,255,162,228, 47,188, 85, 78,145,101, 52, 26,113,232,208, 33, 12, - 26, 52, 8, 69, 69, 69, 56,113,226, 4, 58,116,232,128, 69,139, 22, 69, 62,252,240,195, 57,229,229,229,253, 3,117,182,142, 28, - 57, 50,241,198, 27,111,252,180,190,190,190,186,190,190,254, 83, 0, 75, 1,212,156, 57,115,166,243,153, 51,103,230,174, 95,191, -190,223,228,201,147, 37,110,125,116, 36,222,236, 81,171,213, 6,131,193,228, 83, 96,137,191, 9, 17, 2,138, 56,195, 48,164, 99, -199,142,184,235,174,187,192,243, 60,148, 74, 37,212,106,117,163,102, 51,119,193,229,171,254, 0, 32, 48, 12,131,184,184, 56, 12, - 31, 62, 28, 82,169,180, 17,167,152, 15,135, 15, 31,142, 23,222,155,132,255,190,112, 43,190,120,172, 3,134,188, 95,230, 51,156, -122,189,190,126,243,230,205,138, 87,159,122, 10, 55,182,111,143, 86, 26, 13,218, 68, 71, 66, 33,151, 65,234, 26, 38, 38, 32,147, -157, 0, 16, 36, 18, 9,186,116,233,130,178,178, 50, 20, 20, 20,160,160,160, 0, 44,203,162,111,223,190, 78, 23,230,244,233,211, -120,239,189,247, 96, 50,153, 2,142,123,251,246,237,113,235,173,183, 66, 38,147, 65,169, 84, 54,106, 50, 20,211,180,174,174, 14, -237,218,181,195,202,149, 43,145,154,154,234,151,179, 83,167, 78, 24, 48, 96, 64,163,244, 84, 40, 20, 78, 81, 4, 0, 69,123,234, -157,215,136,143,143,111, 18,231,134,189,231,241,229,198,205, 48,153, 5,104,245,214, 70, 39,196,182,210, 96,251,146, 55, 2,138, -187,200,185, 96,193, 2,212,212,212, 56,141, 3,241,165, 92, 52, 81, 90,183,110,141,121,243, 60, 59,153,110, 90,196,211, 51, 47, - 51,192,231,173,120,156,152,185,228, 89, 89, 89,211,221,207,247,199,231,250,191,219,249,102, 55,113, 86,214,164,166, 67,185, 92, -254,230,230,205,155,195,107,107,107,113,250,244,105,176, 44,235,108, 83,231, 56, 14, 22,139, 5,103,207,158, 69,120,120, 56,202, -203,203, 33,151,203, 33,145, 72, 96, 54,155, 1,160,187,183, 7, 56, 33, 4, 47, 84, 52,116, 17, 90, 23, 39, 69, 33,128, 59, 43, - 26, 10,134,216, 33,254,135, 31,126,128, 90,173, 70,112,112,176,243,211, 95, 51,210,145,130, 51, 40,227, 25,176,187,182,129, 97, - 1,150, 1, 24, 9,192,178, 4, 44,195,128,221,149, 3,134, 1, 84, 17, 97, 77,173,128,253,117,140,247,217, 1,222,155,251,228, -201,197,114,255,190,101,203, 22, 4,202,217,174, 93, 59,168,213,106,231,182,126,253,250, 70,142,150,221,110, 71, 68, 68, 68, 32, -156,164,193,141, 16, 16, 21, 21, 5,158,231,153, 69,139, 22, 77, 76,249,127,246,174, 59, 60,138,106,125,191, 51,219,119,147,108, - 54, 61, 33, 33,148, 0, 82, 34, 77,225,194,165,151, 0, 66,104, 34, 69, 46, 4, 17, 81,138,168, 40, 17,129, 31, 42, 32,161, 73, -147, 42,200, 37, 32, 72,151, 46, 69,164,131, 5, 20, 36,129, 64, 8, 9,164,111,234,246, 50,237,247, 71,118,227,102,179, 73, 54, - 33,194, 5,231,125,158,121,118,167,189,115,206,156, 51,103,222,243,157,239,124,211,176, 97,200,244,233,211, 73,129, 64,128,235, -215,175, 35, 33, 33, 1,245,235,215,119,219,103,171,168,168, 40,235,147, 79, 62, 97, 62,249,164,100, 14, 69,100,100, 36,138,138, -138,114,237,251, 53, 26, 77,126,159, 62,125,202,248,109,228,229,229, 61,219,158,240,182,251, 72, 91,105, 24, 76, 38,232,180,134, - 82,235, 80,110,102,142,234,227, 15, 63, 16, 45,155,250, 6, 0,224,195,149,107,160,221,248, 87, 67,118,224,195, 81,129, 67,191, -220, 53, 19,192,224,202,248,117, 58, 29, 76, 38, 19, 34, 34, 34,112,249,242,101,104,181, 90,244,235,215, 15, 4, 65,148,206, 16, -173, 6, 44, 25, 25, 25,157,162,163,163,127, 93,177, 98, 69, 68,243,230,205, 9,189, 94, 15,131,193, 0,199,223,155, 55,111,114, - 59,119,238, 76, 49, 24, 12,255,182,153,206, 93,226, 68,198, 55,201,125, 67,223,220,251,227,117, 65,116, 96,163, 36,101, 70, 97, - 4,157,159, 33,213,107,140,119, 76, 12,151, 0,142, 1, 24,176,224,104, 22,140,109,216,235,105, 65, 46,151,127,117,241,226, 69, - 63,147,201,132,107,215,174, 97,204,152, 49,150,188,188, 60, 9, 0,252,231, 63,255,177,108,223,190, 93,210,168, 81, 35,108,219, -182, 45,224,213, 87, 95,221,163,215,235, 95,116,147,250,219,172,172,172,111,157, 55,250,249,249,173,126,248,240, 97,119, 71,159, - 31,154,166, 75,147,227,242,193,100, 1,138,162, 96, 52,154, 81, 92,172,133,197, 74,217,218, 76, 22, 12, 67,219,126, 89,208,182, -118, 84, 34, 22,122,181,125, 49, 88,199,113, 28, 72,130, 40,186,246,103,118,221,202, 68,187,171, 33, 46, 55,173, 89,206, 96,236, -179,204,252,252,252, 32, 18,137,240,237,183,223,226,198,165, 19,144, 8, 56, 48, 52, 5,154,178,130,161, 44, 16, 9, 4,248,241, -250, 3, 68, 53,243,114, 75, 16,250,251,251, 99, 64,199,142,136,238,216,177,100,122,155, 80, 8, 79,169, 20, 10,177,172,196,146, - 5,128, 99, 72,119,131, 8,176,246,116, 6, 5, 5,225,183,223,126,195,180,105,211,176,120,241, 98,200,229,242,210,217,207,183, -111,223,198,238,221,187, 17, 21, 21, 85,237,188,219, 45,120, 51,103,206, 68,102,102, 38, 86,174, 92,137,151, 94,122, 9, 34,145, - 8, 69, 69, 69,248,247,191,255,141,156,156, 28,183, 56, 29,135,247, 36, 18, 73, 25,235,147, 93, 0, 86,183,140, 28, 57,223, 24, - 18,130, 67,151,118,130, 0,129,171, 59, 62, 40, 35, 10,215,239,186, 80,109,206,185,115,231,150, 73,167, 59,214, 44,119,225,100, -117,170,242, 56,130, 32,174,217,141,173, 51,103,206,156, 69, 16,196,145,153, 51,103,206,138,139,139,187,229, 14,159,171,253, 4, - 65, 28,181,137,176, 1, 14,219,174, 85, 75,104, 41, 20,138,246,158,158,158,184,119,239, 30,250,245,235,103,201,207,207, 79, 18, -137, 68, 77,242,242,242,164,185,185,185, 48, 24, 12,186,249,243,231, 63, 0, 32,239,208,161, 67,163, 31,127,252, 17,143, 30, 61, -194,246,237,219, 1,224,128,107,159, 13, 18, 44,203,150, 86, 10,231,110,155, 64, 32,192,149, 43, 87,112,229, 74, 89,215,175,205, -155, 55, 87,249,194,120,245,251,195,184,126,253, 58, 28,195, 3,216,255, 59,110,147,201,100, 64,229, 51, 60,202,160, 42,199,248, -170, 28,224, 93,193, 93,223, 47, 87, 51,115, 42, 66, 70, 70, 70,133,231, 95,185,114,165,140, 69,171, 42, 78,129, 64, 0,134, 97, - 32,151,203, 9,177, 88, 76,136,197,226, 48,187,200, 18, 8, 4,165, 15,140, 84, 42,133, 84, 42, 45,211, 75,173, 8,153,153,153, - 61, 50, 51, 51, 43,220,175, 86,171, 59,169,213,106, 60,143,176, 82, 20,140, 6, 11,180, 58, 35, 62,143,251,111,201,198,207,241, - 51,128,159, 59,189, 51, 13,147,251, 70,245,172,238, 48,181,253,126, 7, 6, 6,226,220,185,115, 32, 8, 2,123,246,236,129,183, -183, 55,250,246,237, 11,165, 82,137,153, 51,103, 98,248,240,225,213,109,204,138,243,243,243, 59,189,255,254,251,191, 46, 93,186, - 52,188,110,221,186,176, 88, 44,176, 90,173,176, 88, 44, 72, 78, 78,198,206,157, 59, 31, 25, 12,134, 78, 0,138,171, 34, 59,145, -241, 77,242,254,243, 31,102,246, 30,249,170,241,118,206, 15,200,206,206, 7, 77,103,128,101,104, 88,105,166,196,194, 71,211,160, -105, 6, 98,177, 64,185,244,139, 15, 78,177,224, 64,146,132, 5,192, 43, 79,170,140, 84, 42, 85,164, 90,173,198,221,187,119, 17, - 19, 19,147,157,159,159,159, 8,160, 23, 0,228,231,231, 95, 28, 51,102, 76,243,248,248,248,224, 6, 13, 26,192,211,211, 83,169, -215,235,171,162,244, 4, 48, 25, 64, 31,148,248,129,216, 81, 0, 96, 62, 73,146,210,107,215,174,149,155,105,119,254,252,121, 0, -248,217,117, 15,200,102,209, 50,153,160,206, 47,196,132,119,230,252,213, 51, 2, 87, 70, 92,112,224, 48,233, 93,200, 0, 32, 47, - 39, 25,111, 76,152, 38,173,170, 67,224,234, 69, 88, 13, 31,157, 50, 29, 53,123, 29,245,244,244, 44, 25,126, 59,184, 19, 71,191, -124, 7, 96,172,224, 40, 35, 96, 53, 0, 86, 29, 88,139, 1,132, 88, 14, 80, 70,183,132,150,167,167, 39, 60,229,114, 4,170, 84, -224, 56, 14, 66,129, 0, 34,145, 16, 44, 5, 16, 12, 81, 42, 72, 89,247, 2,131,148,118, 42,229,114, 57, 82, 83, 83, 49,121,242, -100, 88,173, 86, 12, 25, 50, 4, 22,139, 5, 38,147, 9, 70,163, 17, 13, 27, 54,132,193, 96,112,139,207, 62, 91,209,211,211, 19, - 98,177, 24, 31,124,240, 1, 94,126,249,101,204,155, 55, 15,177,177,177,104,216,176, 33, 38, 77,154,132,157, 59,119, 34, 50, 50, -178, 42, 94,206,177,140,236,247,211, 46,182, 28,135,248, 0, 84,187,140,156, 57, 9,130, 44, 35,216,236,203,123, 99,123, 85,155, -115,209,162, 69, 80,171,213,229, 44, 89,246,255,161,161,161, 88,183,110, 93, 77, 71,134,236,214,163, 32, 23,251, 6, 56, 91,162, - 56,142,107,103,243,157, 50,199,197,197,221,138,139,139,139, 38, 8,226, 72, 92, 92, 92,116, 69, 22, 45, 87, 60, 46,246,187,253, -210, 18, 58,141,141,118,119,220,105,191,209,190,190,190,130,240,240,112, 82,169, 84,162,168,168, 8, 1, 1, 1,156, 90,173, 30, -169, 80, 40, 62,251,238,187,239, 26,233,116, 58,220,190,125, 27,171, 87,175,254, 25,192,170,202,132,214,177, 0,155,233,216,102, -201,114, 92, 31, 56,112, 32, 26, 52,104, 80,198,154, 37,151,203, 43,173, 60,246,125,118,139,144, 64, 32,192, 11, 47,188, 32, 79, - 73, 73, 49,138,197, 98,132,133,133,201,179,179,179,141, 98,177,184,218, 51, 93,170,114,140,175,202, 1,222,149,240,105,215,174, - 93, 25, 11,150,227,175,227,255, 67,135, 14, 85, 57,116,104,231,108,222,188,121,233,253,242,242,242,178,159, 11, 0,232,215,175, - 31, 88,150,133,191,191,191, 91,156,118, 81,107,115,128,135,201,100, 98,181, 90, 45,121,237,218, 53, 72, 36, 18,120,121,121,149, -250,234,200,100,178, 82,107, 38, 15, 87, 13, 2, 11, 11, 69,193,104, 52, 66,167,211, 1, 0,146,255,220, 87, 86,136,153, 53, 53, -230,183, 55,176, 5, 5, 5, 56,113,226, 4,126,248,225, 7,188,252,242,203, 46, 69,117, 53, 4,151,186,160,160,160,243,140, 25, - 51,174, 46, 88,176,160,142,175,175, 47,172, 86, 43, 30, 62,124,136, 45, 91,182,100, 26, 12,134,206,213,105, 96,192, 1, 20, 69, -195,100, 48,163, 88,163,197,103, 95,108,173,176,234, 1, 64, 65,238, 29, 12, 28, 52, 92,242, 36,203, 41, 51, 51,115,122,231,206, -157,191,208,106,181, 69, 6,131, 97, 56,128,101,142,253,169,252,252,252, 46,131, 6, 13, 90,225,235,235,251, 82,110,110,238, 44, - 55, 40,103,166,166,166,206,170, 87,175, 94,153,141,102,179, 25,245,234,213,123, 33, 55, 55,119,116,215,174, 93,255, 15,128,175, -195,110, 47, 0, 39, 1,172,171,168, 46,217,135, 14,117, 58, 35,148,170, 16,100, 60, 56, 87,101, 66,196, 2, 19, 56,150,173,180, - 13,177,119,128, 43, 90,170,152, 25, 87, 46,169,246, 99,237, 47,236, 87,134,141,197, 43,147, 23, 65, 33, 2, 22,190,209, 9, 13, - 85, 0,228,190, 16,119,253, 24,132,202,118,143, 38, 31,118,139, 60,118,195, 6, 92,183,181,199, 97, 1, 1,152, 49,114, 36, 56, - 10,184,156,144,128, 93, 63,253,132,145, 61,122, 64, 33,147,185,221, 97, 97, 89, 22, 98,177, 24,201,201,201,184,124,249, 50,154, - 53,107,134,123,247,238,149, 9, 67,193,113,156,187,249, 47,205,187, 84, 42,133, 72, 36, 66,118,118, 54,162,163,163, 33, 22,139, -177,117,235, 86,156, 59,119, 14, 51,102,204,192,248,241,227,209,189,123,119, 36, 38, 38,186,197,201,113, 92,185,217,138,206,195, -185,213, 45, 35,103, 78,231,247,126, 77,202,221,206,185, 96,193, 2,151, 19, 42,220,225,116,165, 69, 92,148,221, 53, 71, 49,100, -183, 60, 57, 10, 35,231,117, 0, 62,246,109, 51,103,206,156,229,238,121,142,235,118,139, 88,117,134, 48, 75,133, 86,116,116,116, -153,156, 23, 20, 20, 92,189,122,245,106, 11, 15, 15, 15,220,185,115, 71,162, 84, 42, 91,216, 27,116,146, 36,177,103,207, 30,175, -254,253,251,159, 90,182,108, 89, 24,203,178,200,201,201,193, 71, 31,125,164,163,105,122, 20, 0,186,162, 23,120, 85,150,169,195, -135,203, 63,108, 7, 15, 30,116,107, 8,196, 46,164,132, 66, 33,124,124,124,140, 70,163, 17, 10,133, 2, 62, 62, 62, 70,131,193, - 0, 15, 15, 15,251, 88, 49,137,191,102, 42, 84,101,125,170,202, 49,222,217, 1,190, 74, 36, 36, 36,184,117,156,109,168,213,173, - 90,158,154,154, 90, 97, 67,114,238,220, 57,176,182,134,214, 93, 78, 91, 47,143,179, 11, 63,133, 66, 1, 95, 95, 95, 72,165, 82, -200,229,242, 50, 34, 75, 42,149, 86,249,224, 84, 21,144, 84, 38,147,253,226,225,225,161,178,239, 23,137, 68,208,106,181, 69, 5, - 5, 5,237,159,233,161, 67,112,160,173, 52,140, 70, 19,116, 90, 99,173,243, 91, 44, 22, 72,165, 82,236,220,185, 19,157, 58,117, - 66,135, 14, 29,202,137,172, 26,154,231,211, 11, 10, 10,186,175, 90,181,234,231,229,203,151,251,232,116, 58,252,247,191,255, 45, -214,233,116,221, 1,164, 87, 75,108,178, 28, 40,171, 21, 6,147, 25,122, 93,201, 61,184,127,107,223,255, 90, 81,237,204,206,206, -222, 89,201,254,251, 52, 77, 71,219,227,190,185,129,127,213,171, 87, 15,217,217,217,101, 54,166,165,165,129, 97, 24, 51, 74,226, -100,189,233,104, 72,198, 95,209,179, 43,234,197,151, 88, 71,141,102,232,116, 37, 86, 16,147, 62,175,118,234,169, 77,108, 84,228, -147, 85,147, 58, 68, 16, 68,169,211,247,212,169, 83,113,243,198, 13,244,170,163, 65,195, 96, 47,112,154, 12,136,123,126,138, 63, -212,114, 44, 91,113,172,218,220,187, 29, 92, 32,150,237,222,237,114,223,253,193,131,171,149,247,164,164, 36,200,229,114, 48, 12, - 83,238,125, 83,221,252, 59, 10,152, 21, 43, 86, 96,198,140, 25,216,186,117, 43,110,222,188,137,214,173, 91,163,119,239,222,200, -205,205,197,141, 27, 55, 96, 54,155,221, 78,167,163,223, 92, 82, 74, 2, 78, 95, 62,142,180,244, 7,200,204,126, 84,227,114,119, -228,116, 22, 90,251, 79,255,142, 97, 81,109,107,196,249,217,103,159, 33, 55, 55,183,140, 37,203,177, 93,170,200,162,229,172, 69, -156,144,231,228, 11,101, 95,183, 56,137, 30,231,117,231,227, 1, 32, 23,128,160,138,243,156,215,243,226,226,226,206,218, 45, 97, - 54, 94, 65, 85,254, 89,101, 44, 90, 78, 88, 52,120,240,224, 65,171, 87,175, 14,144,201,100,165, 51,144,102,206,156,137, 25, 51, -102, 32, 34, 34, 2,254,254,254,161, 42,149, 10,249,249,249, 88,188,120, 49, 82, 83, 83, 39,194, 69,160, 61,103,161,213, 37, 69, - 11,137,228,175, 14,171,221,178, 5, 0,227,199,143, 47,103,209,178, 23, 80,101,160, 40, 10,126,126,126, 48, 24, 12, 16, 8, 4, - 24, 50,100,136,224,207, 63,255,100,250,246,237,139,161, 67,135, 10,110,220,184,193, 12, 24, 48, 0, 2,129, 0, 61,123,246,212, -236,223,191,255, 67, 0, 95,186, 33,182,106,205, 49,222, 94,201,220,141,125,228,142,184,172,140,147, 32, 8, 24, 12, 6, 8,133, -194, 82, 71,121,119, 56,237, 67,135,142, 15, 32, 73,146, 80,169, 84,165,141,135,221,162,101, 23, 90, 85,241, 86, 21,144, 84,161, - 80, 40,239,220,185,211,200, 62,241, 34, 47, 47, 15, 61,123,246,188, 91, 80, 80,240,108,155,180, 88,192, 74, 51,208, 25, 77,208, - 25, 13,181, 70,107,127, 30, 54,110,220,136,196,196, 68,152, 76, 38,124,245,213, 87,165,147, 10, 28, 69,214, 99, 8,174,100,185, - 92,206,246,235,215, 15, 87,175, 94,133, 84, 42,165, 80,131,248, 87, 44,199,194, 74,211, 48, 25,141,208, 85, 61,228,246,188,160, - 84, 85, 39, 38, 38,194, 98,177, 96,222,188,121,204,175,191,254,122, 22, 37, 1, 80,237, 22,188,209,221,186,117,155,239,225,225, -161, 58,122,244,232,123, 0,182, 86,246,242,166,104,155,104,175,197,251,232, 56, 34,224,202, 39,171, 38, 97, 86, 28, 95,172, 44, -203, 98,226, 91,111,161,119, 29, 13,134,190, 20, 0,125,214, 93, 40,188, 3, 64,168,234, 99,217,138, 99,184,149,226,182, 43, 38, - 7, 0,253,186, 13, 70,171,102,229,195,131,117,238, 85,210, 39,187,248,227, 47,200,201,203,172,118,222,245,122,125,133,150,171, -106, 88,180, 74,159, 57,251,253,107,211,166, 13,154, 52,105,130,179,103,207,162,109,219,182,184,119,239, 30,238,221,187,135,212, -212, 84,220,188,121, 19,133,133,133,213, 46,163,239, 79,238, 66,161,182, 0, 18,177, 4, 5, 69,121, 72,203,120,128, 32,191,224, -199, 46,119, 59,154, 14,248, 12, 0, 80, 39,192,187, 90, 66,203,145,115,201,146, 37,229,196,251,227,134,236, 33, 8,226,151,202, -214,171,123,254,147, 68, 69, 66,235,129, 90,173,238, 48,114,228,200,153, 0,218,217,182, 21, 3,216,125,234,212,169,193,129,129, -129, 61, 58,118,236, 40,148, 72, 36,184,124,249, 50,246,239,223,191, 21,192,174,202, 46, 36,145, 72,140,245,235,215,151,219, 43, -162,253, 65, 84, 42,149,130,197,139, 23, 19,155, 55,111,174,208,202, 85, 85, 1, 21, 23, 23, 67,175,215,195,219,219, 27, 86,171, - 21,253,250,245, 99, 18, 19, 19, 33, 22,139, 49,104,208, 32, 38, 33, 33,161,180,160, 55,109,218, 20,102, 52, 26,255,253,195, 15, - 63,244, 1,208,181, 26,247,202,238, 24,239, 9, 55, 29,224, 43,234,229,185, 3,119,135,227, 42,226,156, 54,109, 90,141, 56,197, - 98, 49,109,143,252, 78,146, 36,172, 86, 43,218,182,109,139,220,220,220,210,135,198,195,195,163, 84,100,185, 35,180,170, 10, 72, - 42, 20, 10, 97,177, 88,208,181,107, 87, 16, 4,129, 53,107,214, 60, 31,195,145, 44, 75,120,122,250,161, 78,157, 23, 16, 16,104, - 2,203,214,238, 87,101, 98, 99, 99,203,136, 41, 87,145,151,237,247,191, 38,176,115,185, 51, 75,182,178,183,163,125,200, 75,175, - 55, 61,115, 69, 24, 24, 24,216, 33, 55, 55,247,160,211,230, 2, 0,243, 43,233, 88,150, 22,244,163, 71,143,208,183,111, 95, 28, - 63,126, 92,112,224,192,129, 94,135, 14, 29, 74,184,123,247,238,163,182,109,219,214,125,251,237,183,165, 93,187,118, 69, 94, 94, - 30, 94,122,233,165,207, 51, 50, 50, 42, 17, 90,182,251,104, 50, 67,175,175,125,235,168, 43,107,214,227,188, 24,237,117,114,238, -220,255, 67,239,144, 34, 12,105,237,141,248, 35,151, 48,186,141, 28,176, 72,171,205,103, 79,139,111,157, 6,168, 31,217,161,220, -126,169,178, 36,150,107,253,200, 14, 32, 31,221,171,118,222, 29,211,236, 44,170,106, 98,209,115,188,159, 19, 38, 76,192,199, 31, -127,140, 62,125,250,224,222,189,123, 56,127,254, 60,238,221,187,135,105,211,166, 33, 50, 50, 18,173, 91,183,174, 22,231,161,211, -123,161,209, 21,131, 36, 72, 20, 20,231,195,100, 54, 34,118,210,220,199, 46,247,210,151,255,233, 56, 0,192,190, 83,215,107,204, - 57,123,246,108,100,103,103,151,177,100, 61,142, 95,214,179,142,202,162,165, 61, 0, 48,209,121,163,197, 98,241,154, 55,111, 94, -148,191,191, 63, 8,130,192,138, 21, 43,224,235,235,219, 9,192, 45,139,197,146,167,215,235,103, 56,136,144,222,176,197,218,200, -201,201,113, 57,111, 95,175,215, 91,163,162,162, 68, 33, 33, 33,101,102, 27,122,120,120, 84,100,221, 41,229,180,239,163,105, 26, -177,177,177, 88,184,112, 33,194,195,195, 49, 96,192, 0, 68, 71, 71,131, 32, 8,244,235,215, 15, 3, 6,252, 53,148,171, 82,169, -196,199,143, 31,239, 70,146,100,130,195, 11,164, 12,167, 43,216, 29,227, 41,138,114,215, 1,190, 12,167,189,178, 77,155, 54, 13, - 11, 23, 46,196,172, 89,149,187,122,108,216,176, 1, 40,239, 79,245,183,115, 22, 20, 20,148,105,236, 21, 10,197,154,161, 67,135, - 10, 31, 61,122, 84, 70, 92, 57, 46, 46, 26,162, 50,156, 85, 5, 36, 21, 8, 4, 8, 10, 10,194,130, 5, 11,224,231,231,135,224, -224, 96, 87,129,252,170, 44,163, 26,224,111,229,100, 56,246,218,210, 69,255,215,249,191,219, 15,137,164, 18,224,202,249,125,208, - 20,150, 29, 78, 50, 91,255,154, 74, 45,105,219, 11,150,235, 63,186, 85,151,236, 98,250,179,207, 62,195,103,159,125, 86,105,130, - 54,110,220,248,216,121,119, 83,108,149,231,100, 57, 66,225,225, 3,153, 71, 29,180,136,244, 1,203,209,255, 83,101, 84, 1,126, -253,229,151, 95, 6,249,249,249, 33, 61, 61, 61, 64, 36, 18, 13, 42, 99,174, 50, 26, 81,191,126,253, 23,212,106,245,191,171,226, -156, 54,109,154,121,206,156, 57,210, 81,163, 70, 97,232,208,161, 24, 53,106,148, 84, 44, 22, 55,230, 56, 14, 86,171, 21,233,233, -233,248,241,199, 31,161, 86,171,111, 87,150, 78,150,227, 8,185, 66, 5,153, 71, 8, 90,188,168, 2,203,210,181,146,119, 71,171, -184,163, 53,171,154, 34,203,101,253, 4,128, 95,127, 60,136,185, 31,188,136,173, 71,127,198,234, 95,128, 86,170, 92,180, 8, 80, -131, 85,223,198, 71,163, 95,198,178, 29,191, 1, 0,206,159,171,178,140,184,202,234,160,201,104,125,172,188, 59, 90,174, 28,175, -227,134,143, 86, 57, 78,123, 39, 81,171,213,162,168,168, 8,241,241,241,120,227,141, 55,144,155,155,139,212,212, 84,220,189,123, - 23,223,125,247, 29, 20, 10, 69,141,202,232,195,183,102, 99,206,178,233,224,192,161,105,163, 22,152, 57,249, 51,180,107,213,241, -177,203,221, 25,110, 88,179, 42,228, 92,185,114,101, 77,235,210, 63, 78,104,185,132,191,191,255,168,110,221,186,193,100, 50, 33, - 32, 32, 0,169,169,169, 32, 73, 50, 2, 40, 25,194, 11, 13, 13,221,173, 86,171, 35,220,229, 19, 8, 4,160,105,186,212,247,199, -190, 0,192,192,129, 3,113,248,240,225, 42,123, 20,193,193,193,168, 91,183, 46,222,127,255,253,114,179, 28, 28,103, 58,200,229, -114, 28, 61,122, 52,187,160,160,160,128,227,184,106, 77,115,179, 59,198, 95,188,120,209,109, 7,120, 71, 88,173,214, 71,119,239, -222, 13,217,184,113,163,160,146,151, 95, 41,206,159, 63, 79,163,138,161,154,191,131,211, 85,207,148,227,184, 10, 69,150, 59, 97, - 4,170, 10, 72, 42, 20, 10,145,148,148,132,185,115,231,130, 32, 8,236,219,183,239,185,120,184,254,188,147,191,153, 36, 73,159, -129,175,116,110, 9,130,128,213, 82,126,164,218,179, 80, 87, 42,178,134,126,185, 11, 7, 62, 28,233,142,232, 73,190,112,225,130, -239,198,141, 27,133,238,148,251,133, 11, 23,104,142,227,170, 61,236,103,127,225, 88,173, 86, 24,141, 53,179,162,112, 28,119, 57, -238,139, 57, 81,219,190, 61, 38, 34, 8, 11,174,156,219,135,226, 34,215,238, 12, 18,145, 16,155,227,247,211, 98,145,224,209, 83, - 46,186,181, 67,134, 12, 25,245,213, 87, 95,181,112,181,211,141, 73, 48,169, 38,147, 9, 25, 25, 25, 48, 24, 12,123, 63,249,228, - 19,235,177, 99,199,222,124,245,213, 87,209,186,117,107,132,132,132, 32, 43, 43, 11,201,201,201,136,143,143,231, 46, 93,186,180, - 23,192,148, 42,238,227,193, 69, 95,204,137,137,223,113, 76, 66, 18, 86, 92, 57,191, 15,197, 78,162,189,188,117, 90,132,111,182, -238,183,138,197,162, 59, 85, 89,139, 28,173, 89,181,249, 98, 28, 52,102, 50,134,174, 90,141,136,118,125,177,104,113,111,124,243, -197,112, 44,239, 39,134,117,207,104,180,122,109, 27,118,206,235, 15, 0,168,243,141,155,214, 18,161, 24, 15, 93, 88,172,138,138, -101, 54,113, 83, 61,171,169, 61,239,149, 89,174,170,107,209, 34, 73, 18, 13, 26, 52, 64, 68, 68, 4, 58,117,234,132,182,109,219, -162, 71,143, 30,184,113,227, 6,110,220,184,129,105,211,166, 85, 38,178,170, 44,163,238,255,142,194,207, 93,238, 60,118,217, 56, -151,123,109,192,157,186, 52,121,242,100, 0,248, 71, 89,183,170, 45,180, 52, 26,205, 13,150,101, 91,122,123,123,219, 45, 82,165, -251,210,210,210,192,178,172,161,186, 5, 99,177, 88,236,193, 49,203,196,101,178, 59,199, 87,246,224,115, 28,199, 20, 20, 20,160, - 91,183,110,232,210,165, 75,233,240,137,227,226, 32, 76,112,224,192, 1,112, 28, 87,109, 39,107, 7,199,120, 29,170,233, 0, 15, - 0,185,185,185,125,187,118,237,122, 74, 40, 20,186,245, 21, 77,150,101, 83,115,114,114, 94,121,210,156,174,202,135,101,217, 10, - 69,150, 59, 13, 81, 85, 1, 73,133, 66, 33, 60, 60, 60,240,253,247,223,195,223,223,255,185,122,192,110, 36,170,151, 84,182,191, -155,159,228, 28,128,128,161, 95,238,122,120, 46,223, 90,111,232,151,187,210, 14,124, 56, 50,188,178,115,178,179,179,251,140, 28, - 57,242,184,187,229, 78,211,244,131,236,236,236,106,135, 75,224, 56, 14,119,238,220, 97, 39, 76,152,144,167, 86,171,135,215, 36, -255, 51,231,174, 94,190,240,243,169,126,253,162, 58,180, 3, 9, 88, 42,118,254,229, 8,128, 19,138, 4,143,102,204, 90,249,214, -240,225,195,159,102,177,105,178,179,179, 59, 13, 27, 54,108, 10,254,114,157, 40, 35,164, 80,193,236,106, 27, 86,213,173, 91,247, - 69,129, 64, 32, 5, 48, 23, 64,218,165, 75,151,214, 94,186,116,169, 15,128,127, 9, 4,130, 16,134, 97, 50,108,157,158, 93, 0, -254,168,186, 30,229,190, 13,142, 13,235,215,251, 95,125, 65, 16,156,197, 98,174,162,131, 4, 14, 28,199,137,197,162, 59,191,222, -200,106, 85, 89, 71,202,225, 11, 28,181, 62,100, 63,101,202, 20, 76,153, 50,165,180, 62,173, 89,211, 5,123,255,188,136,215, 90, -165,195,252,117,103, 16,202,112,183, 59,124, 0, 48,251,255, 38,212, 90,218, 28,243,238,104,209,114,245, 28, 84,199, 71, 75, 32, - 16, 32, 47, 47, 15, 73, 73, 73,200,201,201,129,193, 96, 64, 98, 98, 34,172, 86, 43, 10, 11, 11,241,226,139, 47,214, 56,157,181, - 85, 70, 79,147,243,159, 56,124, 88,109,161,101,181, 90, 63,109,208,160,129, 72, 38,147,181, 96, 24, 6, 28,199,129, 97, 24,206, - 38,106,170, 61, 11, 79, 36, 18,153,154, 52,105, 66,184,154,157, 96,255,239,225,225, 97,172,196, 90, 18, 87,191,126,253, 79, 8, -130, 16, 84,212, 11,177,255,103, 89,150, 17, 10,133,113, 53,188, 87,143,235, 24,175, 87,171,213, 29,107,185,252,254, 14, 78,231, -242,209, 55,107,214,172,244,139,246,206, 49, 81,108, 31, 91,213, 87, 33,206, 43, 13, 72,170,215,235,179,250,246,237,203, 56,238, -119, 12,104,250, 92,131,224,210,250,143,122,179,222,185,124,107, 61, 0,176,139, 45,112, 92, 90, 37,103, 25,179,179,179,187,253, -221, 73, 75, 73, 73,177,252,235, 95,255,250, 86,171,213, 78, 6, 80, 99,111,254, 89,159,174,153,245, 12,150,140, 6,192,194, 26, -158,155,150,159,159,223,211,105,219, 31,118, 65,101,143,107, 87,109,209,126, 59,175,214, 99,139,209, 52,157, 30, 17, 17, 81, 45, -203, 13, 69, 81,233, 85,237,119,142, 17,230,136, 91,240,198,172,171, 64,201,228,239,124,183, 56, 77, 38, 83, 65,199,142, 29, 69, -213,204, 91,174,187,121, 15, 9, 9, 65,157, 58,117, 74,127,237,112,222, 94, 85, 58,105,154, 78, 15, 11, 11,131,191,191,127,133, - 17,223,157,125,178,220,225,172,237, 50,170,140,179, 78,157,109,181,206, 89,211,116,242,112, 15,189,121, 78,158,147,231,124,102, - 57, 5,252,253,228, 57,121, 78,158,243, 9,114, 62,151,224,189,212,120,240,224, 81, 17, 24,254, 22,240,224,193,131,199,227,129, -168, 68,149, 86,103,166, 79, 77,148,237,105,158,147,231,228, 57,121, 78,158,147,231,228, 57,255,113,156, 85,113,215,246, 76,227, -231, 26,188, 89,149,231,228, 57,121, 78,158,147,231,228, 57,121,206,127, 44,248,161, 67, 30, 60,120,240,224,193,131, 7, 15, 94, -104,241,224,193,131, 7, 15, 30, 60,120,240, 66,139, 7, 15, 30, 60,120,240,224,193,131, 7, 47,180,120,240,224,193,131, 7, 15, - 30, 60,120,161,197,131, 7, 15, 30, 60,120,240,224,193,131, 7, 15, 30, 60,120,240,224,193,131, 71, 9, 8, 0, 56,114,228, 72, -233, 7, 1,163,163,163, 9,254,182,240,224,193,131, 7, 15, 30, 60,158, 36,158,107, 45,226,152, 57, 30, 60,120,240,224,193,131, - 7, 15, 94,139,212, 14, 72, 94,108,241,224,193,131, 7, 15, 30, 60,120,177,197,103,140, 7, 15, 30, 60,120,240,224,193,139,172, -103, 10,101, 44, 90,188,224,226,193,131, 7, 15, 30, 60,120, 60, 77,177,245,140,106, 17,206,182, 56,174,243,224,193,131, 7, 15, - 30, 60,120,240,120, 76,129, 85,217, 47, 15, 30, 60,120,240,224,193,131, 7,143, 90, 18, 92,246,255, 79, 76,104,241, 95, 54,231, - 57,121, 78,158,147,231,228, 57,121, 78,158,243, 31, 11, 33,127, 11,120,240,224,193,131, 7, 15, 30, 60, 30, 27,142, 86, 44,130, - 23, 90, 60,120,240,224,193,131, 7, 15, 30,181, 39,178, 8, 87,235,252,183, 14,121,240,224,193,131, 7, 15, 30, 60,254, 38,240, - 22, 45, 30, 60,120,240,224,193,131, 7,143,199, 3, 1,126,232,144, 7, 15, 30, 60,120,240,224,193,227,111, 21, 91, 46, 55, 86, - 52,115,224,116, 53,200,107, 50,251,224, 52,207,201,115,242,156, 60, 39,207,201,115,242,156,255, 56,206,170,184, 79,227,217, 67, - 55, 0,103, 1,116,183,253, 86, 40,188,106, 27,252,212, 87,158,147,231,228, 57,121, 78,158,147,231,228, 57,159,119, 84, 24,168, -148,119,134,231, 81, 21,132,168,124,136,185,170,253, 60,120,240,224,193,131,199, 63, 77,108, 17,225, 72,218, 0, 0, 32, 0, 73, - 68, 65, 84,113,142, 47, 73, 87,104, 12, 96, 22, 0,111,135,109,191, 0,136,115, 58,110, 7, 0,133,195,186, 30,192, 60, 0,247, -170, 76, 13,199,137,109,252, 82,219,194, 2, 48, 1, 48, 3,208, 18, 4, 65,241,101,246,212,209, 17, 64,180,237,255, 17, 0, 87, -170,185,255,185, 66, 72, 72,136,220,199,199,167,207,245,235,215, 37,137,137,137,184,112,225, 2,183,121,243,102,107, 97, 97,225, -201,172,172, 44, 35, 95, 93,158, 11,244, 5, 48,211,246,127, 17,128, 19,143,201, 71, 40, 20,138,105, 30, 30, 30,253,165, 82,105, - 29,154,166, 9,131,193,144,169,215,235, 79,209, 52,253,165,173,221,171, 46, 6,251,250,250,190,217,180,105,211,198,169,169,169, - 25,153,153,153, 59, 0,236, 1, 48,188, 78,157, 58,163,235,215,175, 31,122,231,206,157,123, 5, 5, 5,223, 0, 56,248, 20,211, -201,131,199, 63, 9, 68,101,214, 8, 87,152,203,113,220,232, 50, 12, 68,121,142,158, 61,123, 14, 58,121,242,164,130,101, 89,216, - 23,185, 92, 78, 3, 24, 87,133,200,242,187,124,249,114,189,201,147, 39, 15,205,204,204,124, 89,171,213,182, 7, 0,133, 66,241, -115, 96, 96,224,175,171, 86,173,250,142,227,184,116,130, 32,180,213,204,168, 80, 36, 18,189,225,227,227,211,159,166,233,182, 28, -199, 65, 36, 18, 93, 47, 44, 44, 60, 65, 81,212, 55, 0,106, 34,222, 36, 66,161,112,138, 84, 42,237, 75,211,116, 75, 0, 16, 10, -133, 55,205,102,243, 9,154,166,215, 2,176,212,128, 83, 38,145, 72,166, 40,149,202, 40,139,197,210, 18, 0, 36, 18,201, 77,141, - 70,115,202, 98,177,172,181, 9,206,167, 13, 33,128,104,142,227, 68, 0, 32, 16, 8, 6,183,111,223,190, 30, 65, 16, 44, 65, 16, - 28,199,113,196,207, 63,255,220,134, 97, 24,210, 86, 63,162, 1,252, 10,128,126, 22,159, 16,127,127,255,133, 44,203,214,169,180, -208,100,178,151,175, 95,191,222,116,247,238,221,204,215, 95,127, 93, 52,126,252,120,207,201,147, 39, 11,215,172, 89,179, 54, 43, - 43,235, 61,231,227,253,252,252,150,147, 36,233,239,206,245, 89,150,205,203,207,207,159,254,180,242, 31, 19, 99, 42, 99,238,142, -143,151, 53, 2,144, 94,195,250,253,247,113,154, 98, 56, 0,136,151,197, 55,138, 49,197, 36,219,255, 63, 46,175, 3,102,174, 59, -173,237,202,113,192,148, 40, 47,242,113,133, 86,104,104,104,124, 76, 76,204,168,150, 45, 91, 10, 57,142, 3, 69, 81, 48,155,205, - 77,175, 92,185,210,125,223,190,125, 47,107,181,218,225,213,164,124,235,227,143, 63, 94, 48,127,254,124,127,145, 72, 68, 80, 20, -213,104,247,238,221,109,223,126,251,237,247, 55,110,220, 88,119,196,136, 17, 94,246,237,115,231,206,109,183,104,209,162,134, 0, -190,124, 10,233,228,193,227,159,134,110, 40,235,163,245, 57,128,207, 42, 19, 90, 30,182,151,103,142,205,146, 5,135,223, 82,156, - 57,115,230,144, 80, 40,180, 91,180,218,235,245,250, 32, 39, 43,152, 43,145, 85,127,204,152, 49, 29,247,238,221,187,112,196,136, - 17,217, 10,133,162,201,171,175,190,170, 37, 8, 66,176,123,247,238, 54, 17, 17, 17,242,129, 3, 7,142,233,217,179,231,135, 28, -199, 93, 32, 8, 66,237,102, 38, 91,248,250,250,238, 95,178,100, 73,189,190,125,251,138,253,253,253,193,113, 28, 50, 51, 51, 67, -143, 30, 61,218,239,243,207, 63,255,176,160,160, 96, 8,128,132,106,220,184,118,114,185,124,239,231,159,127, 30,210,175, 95, 63, - 97,112,112, 48, 76, 38, 19, 18, 19, 19,123,159, 56,113,162,235,198,141, 27,223, 51, 26,141,175,217, 4,134,187,104,239,237,237, -189,239,191, 31,127, 28,212,225,141, 55,132,190,190,190,224, 56, 14,106,181,186,247,197,109,219,186, 79, 90,178,228,189,226,226, -226, 97,174,238,247,211,132, 68, 34, 33,183,111,223,222, 90, 34,145, 0, 0, 44, 22, 11, 34, 35, 35,137,231,229, 9, 33, 8, 34, - 44, 51, 51,211, 91, 44, 22,187,220,207, 48, 12,186,118,237,218, 64, 44, 22,227,203, 47,191,164,242,242,242,218,124,245,213, 87, -215,119,238,220,233,191,118,237,218,215, 0,148, 19, 90, 36, 73,250,167,167,167,187,228,100, 24, 6, 86,171, 21, 52, 77,195, 98, -177,160,121,243,230, 79, 53,255,241,241,178, 48, 0,211, 99, 98, 76, 31,216, 54,125, 9,224, 67, 0, 41,168,225, 55,187,254, 6, - 78,199,250,182,220,225,255, 99,167,213, 1,245, 0,224,216, 13, 19, 0,248, 62,238,125,245,240,240,104,246,250,235,175, 11,213, -106, 53, 68, 34, 17,172, 86, 43,178,179,179, 17, 25, 25, 41,248,246,219,111, 95,168, 46, 95,163, 70,141,198, 47, 90,180, 40,224, -216,177, 99,214,237,219,183, 91,162,162,162, 68,227,199,143, 87,118,237,218,181,121, 88, 88, 24,185,101,203, 22,243,169, 83,167, -168, 49, 99,198, 72,226,226,226, 2,142, 30, 61, 58, 48, 33, 33,225,203, 39,157, 78, 30, 60,254,129, 56,139,191, 66, 60,216,127, - 43, 21, 90,112, 16, 87,131, 1, 64, 36, 18,181, 9, 10, 10,138,167,105, 58,216,102,213,201,206,201,201,249,146,162,168,223,109, -199, 30,100, 89,118, 80, 85,150,172, 49, 99,198,116, 60,126,252,248,178, 43, 87,174, 20,231,231,231, 7, 31, 58,116,200,244,225, -135, 31,166, 2, 64, 74, 74, 74,195,129, 3, 7,134, 78,157, 58, 53,189, 79,159, 62,171,122,244,232,241, 46,199,113,167, 8,130, -208, 87, 37,178, 34, 35, 35, 47,159, 63,127,222, 75,165, 82,149,217, 81,191,126,125,188,251,238,187,226, 65,131, 6, 69,244,234, -213,235, 82,114,114,114, 23, 0,127,186, 35,136, 26, 55,110,124,250,204,153, 51,158, 62, 62, 62, 40, 42, 42, 66,118,118, 54, 12, - 6, 3,148, 74, 37, 70,140, 24, 33,238,214,185, 83,221,169,211,222, 59,157,158,145,209,219, 77,177,213,190, 83,139, 22,167,119, -198,197,121, 82, 15, 31, 66, 46,151, 67,167,211, 1, 0,188,188,188,240,114,131, 6,194,223,182,109, 11, 29, 29, 27,123,250,215, -164,164,222, 79, 73,108, 73,109,191,102, 0, 71, 4, 2,193, 96,137, 68, 66, 14, 30, 60, 24,167, 79,159, 38, 76, 38,147,208,102, -221,161, 7, 15, 30, 12,185, 92, 14,139,197,194,162,100,232,144,126,150,159, 18,137, 68,130,228,228,228, 50,219,180, 90, 45,212, -106, 53,242,243,243, 97, 54,155, 81, 84, 84, 4,150,101, 9,185, 92,174,102, 89, 22, 36, 73, 58, 11,128, 50, 16,139,197, 72, 74, - 74, 42,179,141,166,105,232,245,122,152,205,102, 88,173, 86,104,181, 90,185,151,151, 87, 99,127,127,255,116, 0, 7, 11, 10, 10, -190,204,201,201, 73,123,194,217,207,179, 11,162,248,120,217,125, 0,146,255, 69, 78, 7, 75, 86,168,109,253,143, 90, 74,171, 29, - 15,143,252,110, 10,183, 89,199, 30,212, 2, 31, 11, 0, 23, 46, 92, 64, 78, 78, 14,242,242,242,160, 86,171, 17, 22, 22, 6,142, -227,170, 61, 28,151,156,156,188,238,197, 23, 95, 36,110,221,186,117, 2,192,154,221,187,119,143, 43, 40, 40,152, 57, 99,198, 12, -223,165, 75,151, 22,196,198,198, 46, 2,176,117,247,238,221,239, 52,107,214,172,255,237,219,183, 55, 62,141,116,242,224, 81,219, -224, 56,174, 29,128, 0,123,219, 98,107,119,253, 28,214,111, 16, 4, 97,113, 56,206, 98,107, 27,156,127,237,176,175,171, 9,130, -248,213,225, 60, 53, 65, 16,191,214, 52,153, 78,191, 37,157,110, 0, 56,114,228, 8,103, 95, 92,157, 25, 24, 24, 56,173,103,207, -158,203,174, 93,187,214, 60, 43, 43,203, 39, 43, 43,203,231,218,181,107,205,123,246,236,185, 44, 48, 48,112,154,195,141,112, 62, -245,180,195, 62,241,229,203,151,235,237,223,191,127,209,233,211,167,139,219,180,105, 99, 57,115,230, 12,221,167, 79,159, 92,219, - 11,154,238,211,167, 79,238, 79, 63,253,196,116,232,208, 65,126,252,248,241, 71,151, 46, 93, 90,190,119,239,222, 32,142,227, 4, -174, 56,109, 16,169, 84,170,239,207,157, 59, 87, 78,100, 57,162,110,221,186, 56,114,228,136, 82,165, 82, 29, 4, 32,174, 40,157, - 54,200,100, 50,217,190,159,126,250,201,211,203,203, 11,185,185,185, 16,137, 68, 8, 12, 12, 68,113,113, 49,178,179,178,144,118, -247, 46, 72,139, 5, 43,190,152,239, 37,151,203,247,186,104,236,203,113,122,123,123,239,219,185,112,161,103,254,233,211,248, 99, -193, 2, 88,173,214,210, 33, 87,171,213,138, 75,147, 39, 67,253,227,143,216, 50,119,174,167,183,183,247, 62, 0,178, 42, 56,107, - 3,142,156,147, 1, 20,216,150,201, 0,174, 68, 70, 70, 94, 75, 76, 76, 68,151, 46, 93,176,103,207,158, 86, 51,102,204,152, 60, - 99,198,140,201,123,246,236,105,213,165, 75, 23, 36, 38, 38, 34, 50, 50,242, 26,202,250,103,253,221,233,252,219, 56, 25,134, 41, -179,176,236, 95,239,152, 58,117,234,228,238,223,191, 31, 35, 70,140, 32, 37, 18, 73,214,200,145, 35,165, 23, 47, 94,228,108, 34, -211,237,116,154, 76, 38, 24,141, 70,232,245,122,164,164,164,200,151, 44, 89,210,249,179,207, 62,107,116,250,244,233,208, 89,179, -102, 77, 10, 8, 8,184, 30, 20, 20, 84,239, 9,231,221,234,244,127, 5,128,140,106, 90,136,254,110, 78,206,118, 62, 98, 76, 49, -173, 29, 26,216,234,242, 86,118, 63,179,109,105,213, 3, 72,123,156,186,212,179,103,207, 23, 27, 53,106, 20,180,251,150, 15, 10, -197, 77,193,138, 85, 96,197, 42, 48,126,237,144, 44,121, 5,225,225,225, 65,158,158,158, 29,171,153,206,237,183,110,221,250,151, -173,167,156, 15, 96, 89,108,108,236,231, 4, 65, 92,136,141,141,157, 15, 96,153,109,251,130,219,183,111,119, 0,176,243, 41,165, -243,153,120,222,121,206,255, 45,206, 42,180, 72, 0, 65, 16, 71, 8,130, 56,242,201, 39,159,244, 0,224,231,180,254,111,199,227, - 0, 72, 92,253,218, 23,135,237, 1, 28,199, 13,112, 56, 47,160,134,201, 39, 92, 44,127, 9, 45, 0,136,142,142, 38,162,163,163, -237, 59,126, 33, 8,226, 16,128, 95, 68, 34, 81,155,214,173, 91, 15,254,225,135, 31,188, 2, 2,254,186,126, 64, 64, 0,246,238, -221,235,213,162, 69,139,193, 34,145,168, 13,128, 95,148, 74,229,161, 74,172, 48,170,201,147, 39, 15, 29, 59,118,172,166, 77,155, - 54, 0, 80,148,144,144,160,232,208,161,131,158,166,105,130,166,105,162, 67,135, 14,250,132,132, 4, 5, 69, 81,218,118,237,218, -121,244,234,213, 43,117,250,244,233, 99, 92, 8, 14, 71,188,190,120,241,226, 48, 31, 31,159,202,148, 48,180, 90, 45,130,130,130, - 48,121,242,228, 96,145, 72,244,102,101,119, 75, 40, 20, 78, 89,188,120,113,160, 74,165, 66, 97, 97, 33,194,194,194, 96,177, 88, -144,148,148, 4,147, 94, 7, 74,171, 1,165, 41,130,250,254, 61,168, 68, 66,140, 25, 20, 29, 36, 20, 10,167, 84, 97, 45,153,242, - 77,108,108,144, 37, 53, 21, 41,123,246,128,161,203, 27,127,104,171, 21, 55, 55,109,130, 41, 61, 29,139, 38, 76, 8,146, 72, 36, - 83,158,176, 37,107, 41,199,113,114,142,227,228, 4, 65,172,234,216,177,227,183,114,185,124,114, 92, 92, 92,223,147, 39, 79,246, - 59,127,254,124,119,154,166, 69, 52, 77,139, 46, 92,184,208,197,100, 50, 9,165, 82, 41,132, 66, 33,135,231, 20, 34,145, 8, 98, -177, 24,114,185, 28,157, 59,119,190,191,121,243,102, 42, 44, 44, 76,180,111,223, 62,159, 58,117,234,120,172, 89,179,166, 72,171, -213, 46,118,151,207,106,181,194,108, 54,195,104, 52,194,100, 50,225,204,153, 51, 13,166, 78,157, 42, 52,153, 76,204,192,129, 3, - 11, 40,138, 50,199,198,198, 42,125,125,125, 63,124,146,249,140,137, 49,177, 54,203,211,109,155,104,121,128,199,244,121,250, 59, - 56, 1, 88,108, 62, 89,118,248,219,184, 45,181,116, 43,104, 0, 58,155,208, 50, 59, 61, 31, 45, 29, 44,190, 85,162,168,168,104, -227, 55,223,124, 19, 70, 74, 85,184,104,233,143,239,216,207,113,210,123, 13,114,235,125,132,192,176, 70, 24, 53,106, 84, 32,199, -113,107,106, 33,205, 95, 1,232, 10, 96, 85, 77, 78,126, 2,233,172,231,225,225,177,199,203,203,235,162,135,135,199, 30,216,134, -103, 31, 7, 81,141,208,123, 80, 51, 50, 61, 42, 2,220,160,102,100,122, 84, 35, 62,212,192,243, 2, 39, 45,226, 8, 53,199,113, -209, 28,199, 69, 47, 90,180,104,161,195,251,221,190, 46,119,211, 50, 22,205,113, 92,116, 25,133, 84, 34,176, 30,219,232,230, 98, - 41,209, 20,142, 74,210, 33,115,165,179, 11,131,130,130,226,227,227,227,189,156, 25,179,178,178,160,209,104, 48,103,206, 28,175, -177, 99,199,190,151,158,158, 30, 83, 69, 34, 36,217,217,217,109, 71,143, 30, 45,179, 90,173,133, 44,203,146, 26,141, 70,232,237, -237,205,216, 15,240,246,246,102,138,139,139, 69,122,189, 94,192, 48,140,121,236,216,177,146, 9, 19, 38,188, 12, 64, 80, 17,105, - 64, 64, 64, 84,255,254,253, 43, 28, 58,160, 40, 10,122,189, 30,122,189, 30, 86,171, 21,157, 59,119,150,110,222,188,185, 79,110, -110,238,250, 10, 21,135, 84, 26, 21, 21, 21, 37, 42, 40, 40,128,183,183, 55,210,210,210,240,224,193, 3,152,117, 58, 88,117, 26, - 88,117, 90,208, 90, 13, 56, 77, 49,242,239,221, 65,135,102, 77,197, 59,164,210,190,122,189,126,121, 69,156, 74,165, 50,170,195, -184,113, 66, 15, 15, 15,116, 31, 93, 50,207,224,120,179,102,224, 24, 6, 44,195,128,161,105,244, 77, 74, 2, 69, 81, 32, 73, 18, -237, 10, 10,132,202,109,219,162,212,106,245,178,167, 81,217,165, 82,169,112,251,246,237,175, 75, 36, 18,112, 28, 71, 88, 44, 22, -156, 60,121,242, 31,247,208, 75, 36, 18,200,100, 50, 88,173, 86,212,175, 95,223, 56,122,244,232,203, 95,124,241, 69, 56, 73,146, - 30, 98,177,248,135,252,252,252,133, 89, 89, 89, 41,238,242, 81, 20, 5,139,197, 2,139,197, 2,163,209,136,251,247,239, 7, 55, -104,208,128,152, 60,121, 50, 99, 48, 24, 26,174, 94,189, 58,249,228,201,147,138,197,139, 23,191, 10,224,221, 39,157,223,152, 24, - 83, 51, 0,205,226,227,101, 98,155,229,215,242, 63,198,201,161,196,241, 29,241,178,248, 68, 0,234, 90, 20, 89, 18, 0,222,225, -126, 66,189, 72, 0, 29, 0, 47,155, 40,120,149, 32,136, 14,205,155, 55,247, 73, 76, 76, 44,228, 56,238, 42,128,239, 0,100, 85, - 70,198,178, 44,193,178, 44,222,110, 95,132,201, 29, 5,160,168, 98, 20, 23, 23, 35, 45, 45, 13, 9, 9, 9,248,249,231,132,154, - 62,155,111,122,122,122,246,145,201,100,245,105,154, 38,117, 58, 93,154,193, 96, 56,205,178,236, 70,212,192, 71,237,239, 74,167, - 29, 30, 30, 30, 75,102,205,154,213,201,219,219, 27,191,255,254,123,195, 93,187,118, 45,209,235,245,143,229, 92, 47, 19,145, 91, -150,175, 92, 19, 26, 26,168,194,141,243,135, 67, 23,110,216,189, 5, 96,195,120,153,242,236,195, 73,139, 56,138,161, 95, 57,142, - 27, 64, 16,196, 17,103,161, 84, 45,179,211, 99,158, 95,133, 69,203,249,195,210,101,133, 86, 5, 10, 18, 52, 77, 7, 59, 90,178, - 56,142, 67, 86, 86, 22, 50, 50, 50,160, 86,171,225,227,227, 3,171,213, 26,236, 78,251,160,213,106,219,251,249,249, 25, 68, 34, -145,217,104, 52, 66,161, 80,176, 34,145,136,179, 93,135,176,205, 90,100,204,102, 51, 33, 20, 10, 41, 47, 47, 47, 79,179,217,220, - 20,149,248,146,113, 28,215,222,207,207,207,229, 62,179,217, 12,157, 78, 7,189, 94, 15,157, 78, 7,179,217,140,160,160, 32,208, - 52,221,182,210, 46, 45, 77,183, 12, 8, 8, 64,102,102, 38,228,114, 57,210,211,211, 97,209,105, 97,213,106, 65,235, 53, 96,138, -139,193,106, 52, 96,245, 26, 80, 22, 3, 66,155, 52,131,125, 70, 98,133,221,112,139,165,165,159,159, 31,244,250,191,220,205, 56, -155,192,162,105, 26,180,205, 57,218, 62,156,232,239,239, 15,251,140,196, 39, 4, 51,128, 25, 36, 73,174,146, 74,165,194, 73,147, - 38, 33, 43, 43,171, 76,157,152, 52,105, 82,169, 79, 86,215,174, 93, 47,200,100, 50, 90,173, 86,195,108, 54,139,158,215,135,158, - 32, 8, 16, 4, 81, 82, 70, 52, 13,127,127,127,125, 94, 94,222,207, 69, 69, 69,175,215,132,143,162, 40,251,140, 46, 24,141, 70, -112, 28,135,223,127,255, 29, 50,153, 76,196, 48,204, 45,154,166, 21, 34,145, 8,164,205,249,235, 73,193, 54, 35,240, 75, 0, 97, - 54, 11,209,155, 40,113, 56,207,112,209,144,184,117,235,220,228,172,190,112, 51,197,216, 45, 77, 25,168,217,112,164, 43,116,111, -170,146, 44,143,235, 16,168,106, 61,208, 67,175,144, 8,244,108, 90,235,250,255, 93,154,176,107,236,152, 55,189,230,205,155, 87, -207,223,223, 95,150,156,156,108,154, 63,127,126,131,237,219,183, 19, 40, 25,166,171, 16, 15, 31, 62, 60, 48,107,214, 44,223,254, -253,251, 55,148, 74,165, 68,113,113, 49,212,106, 53,114,114,114,240,224,193, 3,238,198,141, 27,247,205,102,243,158,234, 36, 50, - 36, 36,100,243,235,175,191, 62,246,165,151, 94, 18,217, 45,164,122,189,190,205,185,115,231, 6, 29, 63,126,188,139, 94,175,175, -118,189,124,244,232,209,158,217,179,103,123,188,242,202, 43, 77,165, 82, 41, 89, 27,233,116, 4, 73,146, 65,158,158,158, 56,125, -250, 52, 84, 42, 21, 72,146, 12,122,220,250,106,178,178,161,117,130,253, 96,186,180, 28, 77, 3,234,193,100,101, 67,121,137,242, -252, 88,180, 42,120,215,183,179, 91,164,170, 16, 75,198,153, 51,103,206, 34, 8,226,200,204,153, 51,103,185,178,104,217,254, 50, -142,199, 57, 28,111,174,109,177, 85,173, 64,147, 44,203, 34, 35, 35, 3,153,153,153,200,200,200, 64,126,126, 62, 72,146, 4,199, -113,238,204, 62,227, 8,130, 96, 79,157, 58,229,115,249,242,101,125,187,118,237,138,236,254, 47, 52, 77, 19, 20, 69, 17, 54,191, - 24, 34, 45, 45, 77,124,241,226, 69,213,237,219,183,131,108,189, 85,182, 10, 83, 96,185,109,118,129,229,184,152, 76, 38,200,100, - 50,247, 84,135,237, 69,248,251,181,107, 37, 34, 75,167,181, 13, 25, 22,131,209, 20,131,211,107, 33, 97, 40, 72,192,129, 48, 25, -220,190,127,142,176,139, 44,171, 77,104, 89, 44, 22, 80, 20, 5,150,101, 65,211, 79,197,175,124, 93,171, 86,173,218, 30, 56,112, - 96,124, 70, 70,249,119,225,144, 33, 67,240,238,187,239, 98,234,212,169,183, 7, 12, 24,112,227,240,225,195,152, 50,101, 10, 88, -150,109, 13,160, 24,192,241,231,237,161, 55,155,205,165, 22, 40,147,201, 4,171,213, 10, 84,227,179, 10,206,117,211, 94,182, 52, - 77,219,185,137, 3, 7,246,227,194,133, 11,100, 66,194,173,176, 73,147, 38,219, 29,238,159,116, 86,211, 81, 50,115, 79, 98,107, - 40, 44, 40,241,127,170, 40,164, 66, 4, 42, 31,178,227, 42,227,124, 28,180,218,208,106,196, 7, 31,124, 16,133,146, 25,206, 41, -143,105,209,122, 69, 66, 18, 95, 79,107,233, 43,251,176,149,159, 94, 34, 36,116, 73, 95,207,210, 61, 8, 87,234,131,234, 42, 44, - 97, 13, 84,117, 22, 46,252, 34,228,246,237, 59,230, 57,115,230, 36,142, 28, 57, 50,240,195, 15, 63,108,190,111,223,190, 46, 38, -147,233, 27, 0, 69, 21, 25, 93, 6, 13, 26,116, 53, 48, 48,176,193,134, 13, 27,114, 31, 61,122,228, 67, 81,148,135,213,106,101, -245,122,253, 3,163,209,120,218,106,181,158, 6,112,173, 58,137,245,242,242,106, 53,110,220, 56, 81, 81, 81, 17,132, 66, 33,172, - 86, 43,114,115,115,209,169, 83, 39,193,161, 67,135, 90,212,228, 6, 20, 22, 22, 46,255,230,155,111,206,238,220,185,179,143, 82, -169,124, 73, 42,149, 6, 3, 96,180, 90,109,142, 94,175,255,163, 38,233, 44,211,206, 49, 76,206,181,107,215, 34,148, 74, 37, 30, - 62,124, 8,134, 97,114, 30,183, 14,200,196,228,163,155,231, 15,213,109,230,223, 0, 23, 47, 95,133, 76, 76, 62,226, 67,125, 61, -247,176,251, 80,193, 81, 64,185, 16, 72,151,227,226,226,228,139, 22, 45, 66, 92, 92,220, 45, 87, 22, 45,187,224,138,139,139,187, -101, 63,206,225,248,243,143,145,198,138, 45, 90, 21, 41, 72,160,100,118,161, 90,173,246, 81,169, 84,165, 2, 43, 51, 51, 19,153, -153,153,144, 72, 36, 72, 75, 75,131, 68, 34,201,114,167, 19, 34,151,203,127,107,211,166,205, 11, 41, 41, 41,226,249,243,231,215, -189,118,237,154,178, 83,167, 78, 47,202,229,114,134,227, 56,152, 76, 38, 50, 49, 49,209,115,217,178,101,161,237,219,183,183,180, -111,223,254,250,238,221,187,141,168, 36,254, 21, 65, 16,191,100,101,101, 53,172, 95,191,190, 93,180,149, 17, 87,142,130, 11, 40, - 25,242, 20, 10,133,215, 43, 75,168, 80, 40,188,153,148,148,212, 91, 33,147,194,162,213,192,170,211,128,214,106,193,104,139,193, - 20, 23, 3,122, 13, 36, 52, 13, 17, 67, 65, 46,147, 33, 35, 61, 29, 66,161,240,102,101,156, 18,137,228,102, 78, 78, 78,111,149, - 74, 85,250, 18,165,104,186,100, 97, 24, 88,104,186,212,162, 37, 18,137,240,232,209, 35, 72, 36,146,155, 79,186, 38,147, 36,201, -216, 67, 56, 84,144, 15, 4, 5, 5,177, 29, 58,116,192,148, 41, 83,192, 48,140,173, 24,136,238, 0, 46,162,196,191,229,153,132, - 43,113,107,119, 90, 55, 26,141,208,233,116, 40, 44, 44, 20,202,229,242, 23, 66, 67, 67,175, 90, 44,150, 61, 52, 77,111,121,240, -224,129,166, 34, 78,155, 48, 43, 21, 93, 44,203,130,227, 56, 48, 12, 3,138,162, 32, 22,139,217,115,231,206, 99,217,138, 37,136, -223,178,157, 27, 52,104, 16,113,232,208, 33,176, 44,155,254,132,179,111,177,137,150,202, 26, 13,231,144, 10, 31,161,242,144, 10, - 21,113, 58,246,254, 28,183, 17, 46,142, 41,135, 15, 62,248,224, 4, 74,134, 12,243,108, 98,238,113, 56,191, 44,250,238, 11, 25, -104, 70,111, 62,183, 83,247,237, 93,141,126,222,183, 43,127,179, 72, 4,154,151,187, 5,181,108,216,224, 5,129, 74,229, 67,174, -223,184, 42,127,199,246,189,201, 15, 31, 62,212,172, 93,187,182,227, 11, 47,188,224,253,199, 31,127,132, 86, 36,180, 20, 10, 69, -227, 55,223,124,115, 92, 97, 97,161, 56, 62, 62,126,119, 86, 86,214,111, 40, 9, 45,227, 56,131,122, 0,128,173, 54, 33, 26,100, -107,231, 46, 2,152, 95, 89,127,141, 32, 8,252,244,211, 79,229,102, 7,178,143,167,206, 85,141, 26, 53, 26,145,146,146,114, 33, - 39, 39,103,152,243, 78,177, 88, 60,175, 73,147, 38,125,111,221,186,245, 57,128, 99,213, 33, 54, 24, 12,177,123,247,238, 93, 42, - 16, 8,234, 48, 12,147,105, 52, 26, 99, 31,219,162, 69,177, 19,226,214,239,218,100,180, 48,225,114,137,224,161,137, 98,223,226, -117,200,243,107,205,178, 65,237, 96,141, 82, 3, 32,156,214,255,176,189,140, 44, 28,199,217,143, 85, 59, 88,177, 44, 78, 86, 48, - 87,251,212,143, 17, 44,157,171,168,141,171,200,162,245, 9,128,246, 0,126,201,201,201, 89, 53,118,236,216,101, 59,118,236,240, -210,104, 52,200,201,201, 65,110,110, 46,132, 66, 33,148, 74, 37,214,173, 91,103,204,201,201, 89,229,120, 14,202, 71,144, 7, 0, -147,191,191,255,111,219,183,111, 15,254,250,235,175,133, 49, 49, 49,105, 3, 6, 12,104,186,110,221,186, 20,177, 88,204, 49, 12, - 67,152,205,102,226,237,183,223,142, 88,177, 98, 69,170, 64, 32, 80,140, 24, 49,130,240,240,240,248, 5,149,132, 13, 80,171,213, -167,190,255,254,251,161,211,167, 79,151, 90, 44, 22,151,150, 44,251, 54,149, 74,133, 75,151, 46, 89, 10, 11, 11, 79, 86, 97,197, - 56,245,195,177,163, 93,255, 51,114,164,152,210,106, 64,105, 53,160, 53, 26, 48,218, 34, 16, 58, 13, 68, 12, 13,185,152, 69,112, -152, 12,180,209, 19, 71,127,253,131, 50,155,205,149, 6, 54,212,104, 52,167, 46,198,199,119,111, 95,175,158,240,210,180,105,176, - 82, 20, 94, 73, 74, 42, 21, 87, 86,171, 21, 7, 91,182, 4, 67, 16,104, 61,113, 34,238,209, 52,173,209,104, 78,253, 47, 62, 12, - 55,110,220,200, 29, 61,122,244, 53,150,101,219,226, 9,125, 52,243, 73,128,162,168,114,214, 40,134, 97, 74,172,142, 37,150, 3, -201,209,163, 71,187, 38, 38, 38,138,255,252,243, 79, 92,184,112,161,245,142, 29, 59, 62, 9, 15, 15,111,249,240,225,195,236,170, -196,155,171,160,191,176,249, 31,238,222,185, 7,239,188,243, 14,145,157,157,141,239,190,251, 14, 85, 5, 79,253, 59, 16, 19, 99, - 98,227,227,101,117,225,228,247,228, 34,164,194,239,112, 51,164, 66, 69,156,166,152, 18, 43,153, 44,190, 36,216,168, 41,166,100, - 56, 80, 22, 95,165,165, 12, 49,166, 24,141,205, 33, 62,171, 22, 56,245,160, 25,185,229,220, 78,221,128, 99, 15,181, 87,178,140, -243, 1,156,128,137,225,238, 93,231,110,188,244,146,143, 63, 0,152, 77, 76,112,227,198,141,187, 9,133, 66, 9, 0,120,122,122, -190,228,231,231,183, 46, 63, 63,191,179,171, 50,141,142,142,238, 16, 24, 24,216,230,248,241,227,127,100,101,101,221, 2,240,179, -243, 65, 17, 17, 17,115,110,223,190,221, 78, 36, 18, 17, 85,212, 17, 0, 64,183,110,221, 94,144, 74,165,126,199,238,122, 67, 35, -110, 4, 78, 80, 12, 8,101, 96, 84,173,144, 38,110,142,176,176,171,126,133,133,133,173,139,139,139,255,168,102,209,247, 24, 58, -116,232,150,248,248,248,176,110,221,186,113,215,175, 95, 39,157, 71, 17, 34, 34, 34,250, 92,185,114,165,237, 91,111,189,181, 97, -215,174, 93,147, 81,118,166,109, 85, 72,179,197, 27,172, 53,156, 74,198,105,128,169,103,179,153,241, 10,229, 31,128,234,132, 92, -120,140,240, 12,143,149,196, 10, 13, 24, 21,108,111,111,139,137,213,158,162,168,223,111,220,184,113,112,196,136, 17,186,252,252, -124,248,249,249,161,126,253,250, 32, 8, 2,235,214,173, 51, 62,120,240, 96,159, 45,150, 86,251,204,204,204, 65, 54,177,229, 10, -218,213,171, 87,239,218,182,109,155,234,218,181,107, 2,154,166,149, 77,155, 54, 53, 92,190,124,217, 83, 36, 18,113, 98,177,152, -189,118,237,154, 34, 34, 34,194, 68, 16,132,244,199, 31,127,204,191,122,245,106,248,140, 25, 51,190, 65,217,105,226,206,216,185, - 96,193,130,140,148,148, 20,152,205,102,104, 52, 26, 20, 23, 23,151, 46, 69, 69, 69, 40, 46, 46,134, 72, 36, 66,118,118, 54,246, -239,223,159,101,139, 18, 95,153,101, 99,237,154,117,235,213, 89, 15,211,160, 84,200, 65,107,138,192, 20,231, 3,218, 98, 72, 40, - 43, 60, 68, 12,234, 54,146, 67,166, 80, 34, 71,163, 67,252,229, 95,179,109, 81,226, 43, 54, 23, 88, 44,107,223, 93,177, 34,135, - 22,139, 81,111,248,112, 88,109, 67,133,142, 66,139, 33, 8,132,247,234, 5,210,219, 27, 11,247,237,203,177, 69,137,127,162, 96, - 89, 86, 96,177, 88, 42,203, 7, 88,150, 77, 79, 76, 76,220, 5,224, 44, 65, 16, 28, 65, 16, 28, 74,130,181,233,158,229, 7,153, -162, 40,204,157, 59, 23, 98,177, 24,115,231,206,197,167,159,126,138,101,203,150, 97,253,250,245,248,246,219,111,113,244,232,209, - 6, 23, 47, 94, 20,159, 63,127,158,139,139,139,203,139,136,136, 16, 76,156, 56, 81, 37,151,203, 63,168,140, 51, 54, 54, 22, 94, - 94, 94,136,141,141,197,146, 37, 75,176,121,243,102, 28, 60,120, 16,151, 46, 93,130, 64, 32, 96,211,211, 31,193,100, 50,113,171, - 87,175,206, 56,120,240,160,113,213,170, 85, 16, 10,133,196, 83,106, 36, 62,176, 9, 42, 71, 75,144,115, 72,133,124, 0, 43, 81, -181,111, 84, 69,156,144,197,199,215,181,137,163,100, 7, 65,116, 24,192,116, 84, 62,189,218,206, 49, 25, 64,112, 45,112,206,150, -143,254,191, 68,213,166, 59,247,175,100, 25,103, 3,248,193,158, 39,165, 82, 41, 63,112,224,123, 33, 0,236,219,187, 95,148,148, -148,228,253,253,247,223,203, 2, 3, 3,241,237,183,223,202,228,114,121, 96, 5,156,204,193,131, 7,205, 18,137,196,111,194,132, - 9,253,218,181,107,247,190,173, 35,218, 11, 64, 11,148,204, 94,140,186,127,255,126,130,191,191,255,221,147, 39, 79,234,221, 41, - 32,173, 86,251,205,214,173, 91,235, 23, 48,190, 56,166, 31,138,120,118, 41,142,170,182, 32,173,222,167, 80,212,121, 25,175,191, -254,122, 29,134, 97, 54, 85,179,220, 95, 31, 50,100,200,214,248,248,248,176, 9, 19, 38,100, 95,191,126, 61, 7, 64, 60,128,237, -142,203,237,219,183,243,198,142, 29,155,181,105,211,166,144, 17, 35, 70,172, 7, 48,140,127,245,243,224, 81,182, 47,132,170,102, - 29,186,120,225,150,254,207,205,205, 93, 93, 88, 88,120,233,222,189,123,239, 89, 44,150, 16,130, 32, 56,177, 88,156,157,147,147, -179,202, 33, 96,169, 43,191,146,222,176,197,218, 32, 8,130,226, 56, 46,189, 71,143, 30, 31,244,234,213,235,171, 35, 71,142,152, -186,119,239,142,189,123,247,250,247,232,209,195,192,178, 44,119,236,216, 49,255,190,125,251, 26,206,158, 61,171,127,251,237,183, -155, 54,105,210,100, 98,108,108,172,154, 32, 8,214, 21,167,253, 93, 86, 84, 84, 52,164, 95,191,126,151,246,237,219,167, 84,169, - 84,160,105, 26, 6,131, 1, 6,131, 1, 28,199,193,219,219, 27,106,181, 26,243,231,207,215, 20, 23, 23, 15,118, 33,220,156, 57, - 77, 38,147,105,216,228,247,167,159, 90,245,249, 92,175,240, 6, 13,144,127,199, 4,218,100,128,136, 35, 81,247, 5,111,136, 37, -114,220, 75,210,226,163, 93, 7,180, 70,147,233, 53, 23,189,229,114,156,197,197,197,195, 98, 62,253,244,244,134, 25, 51, 60,219, - 4, 5, 65, 32, 16,192,108, 54,131, 97, 24,136, 68, 34, 68,198,196, 64, 28, 16,128, 57,187,118,233, 53, 26,205, 48,148,255, 20, -143, 51,103,109,192,145,115,242,141, 27, 55,198, 54,107,214, 12,147, 38, 77,194,144, 33, 67,202, 28,248,253,247,223, 99,253,250, -245, 48,155,205, 99, 1, 92, 7,176, 14, 37, 67, 29,112, 18, 89,127,119, 58,107,157,147, 97,152,194,164,164, 36,229,210,165, 75, - 9,171,213,138,207, 63,255, 28,118,193,105,175,215, 83,166, 76,169,227,229,229,133,207, 62,251,204,146,151,151,215,115,201,146, - 37,103,182,111,223,238,255,205, 55,223,188, 14, 32,214,153,147,101,217,220,155, 55,111,122,109,216,176,129,164,105, 26,203,151, - 47, 47, 55, 60, 57,126,252,120, 88,173, 20, 4, 2,161,197,100, 50,183,144,203,229,201,126,126,126,114,174,172,115,215,147,188, -159,161, 40, 9, 97,224,232,248,110,113,244,207, 66,197, 33, 21,170,195,169,150,197,199,119, 55,197,196,156,181, 9,162, 68,219, - 49,123,237, 38,253,106,112,218, 5, 97, 77, 56, 79,217,150, 42, 97, 50,153,160, 86,171,145,151,151, 7,149, 74, 5,129, 64, 64, - 84,148, 78,179,217,252,231, 71, 31,125,116, 99,211,166, 77,189,175, 92,185, 50,240,252,249,243, 61, 78,159, 62,109, 74, 75, 75, -163, 41,138,226, 66, 66, 66,132,157, 59,119,150,245,239,223,223, 67, 42,149,146,179,103,207,206,251,226,139, 47,252, 81,214,135, -205, 57,239, 2,130, 32,240, 97, 87, 45, 98,123, 8, 96,177, 88, 81, 84, 84,132,140,140,116, 36, 36, 36,224,202,149, 59,224, 56, -142,172, 70,185,251, 1,152,253,221,119,223,133, 74, 36, 18, 98,215,174, 93,117,118,237,218, 85,165, 37,117,199,142, 29,117,118, -239,222, 61,207, 54,122,145,254, 44, 62,239, 60,231,255, 44,231,179, 12,231,200,240,168, 82,104,217,218,249,246,176,125,148,148, -162,168, 95, 92,132,112,248, 4,192, 92, 7, 43, 88, 85,230, 60, 13,199,113, 23,122,247,238, 61,165, 87,175, 94, 43,250,244,233, -147,149,149,149,213,112,249,242,229, 97, 52, 77, 91, 19, 18, 18,200,228,228,228,180,223,126,251,173, 81,147, 38, 77, 38,222,190, -125,251, 28, 65, 16, 86, 55, 50,152,144,156,156,220,169, 71,143, 30,251, 39, 78,156, 24,222,161, 67, 7,137, 74,165,130, 80, 40, - 68, 74, 74, 10,254,248,227, 15,203,238,221,187,211,139,138,138,170,243, 9,158, 95, 82, 51, 50,162, 70, 76,125,111,223,196, 33, - 3,253,255,213,244, 5, 73, 72, 72, 8, 96, 52,226,206,195,108, 92,189,243,135,117,243,133,171,106,179,217, 60, 12,238,127,130, -231,151,223,238,221,235,221,115,198,140,125,243,254,243,159, 32,100,101, 9, 67, 66, 66, 32,145, 72,240,224,193, 3, 36,179, 44, -189,120,227,198, 28,155,200,122,210, 81,225,165, 0,150,178, 44, 43, 4, 0,185, 92,142,119,223,125, 23,142,159,220, 89,191,126, - 61,140, 70, 35, 0, 8, 9,130, 88, 10, 96,203,179,110,197,178,163,160,160, 96,206, 43,175,188, 18, 39, 20, 10, 43,140,122,235, -227,227, 3,173, 86, 11,154,166,153,140,140,140, 59, 62, 62, 62, 16,137, 68,224, 56,206,229,115,148,159,159, 63,103,216,176, 97, - 11, 72,146,172,200,242, 1,165, 82,153,118,230,204,153,198,111,189,245, 22,249,223,255,254, 55,101,194,132, 9,210, 51,103,206, - 48, 28,199,237,127,210,247,160, 75,151,157,192,134,152,215, 0,188, 6,148,115,120,207,176,109,171, 86, 72,133, 46, 93,118, 98, - 3,254,226,116, 28,198,179, 11, 34,155, 21,170,185, 44, 62,126, 5, 74,252, 44, 42,229,238,178,179, 11, 54,196,160, 86, 57,221, -129,163,246,213,235,245, 96, 24,166, 50,107,222,239,123,247,238, 93,241,219,111,191, 5, 76,153, 50,165,225,127,254,243, 31,101, -143, 30, 61, 60, 29, 15, 48, 26,141,236,225,195,135,245,235,215,175, 47,190,112,225, 66,234,248,241,227, 59, 84,150,206,135, 15, - 31, 30, 93,184,112,161,119,255,254,253,155, 0, 40,245,207, 82,171,213, 72, 75, 75,195,159,127,254,153,102,181, 90, 15, 85, 35, - 75,249, 0,230,141, 26, 53,106,233,182,109,219,234, 76,152, 48, 33,123,247,238,221,127,162, 36, 96,177, 51, 84, 67,134, 12,105, -185,109,219,182,144, 9, 19, 38,100,163,196,143, 44, 29, 60,120,240,176,163, 59,202,251,105, 85, 58, 50,177,213, 98,177,112, 38, -147,137, 51, 24, 12,156, 78,167,227,224,250, 43,240, 7, 51, 51, 51,185,244,244,116,238,225,195,135, 92,106,106, 42, 7,224, 91, - 39,197,235,170,193,242,216,177, 99, 71,163,208,208,208,207, 21, 10,197, 9,129, 64,160, 17, 8, 4, 26,169, 84,250,131,159,159, -223,167,139, 23, 47, 14,229, 56, 78, 92,137,138,174, 8, 66,145, 72,244, 86, 96, 96,224, 65, 95, 95,223,116, 31, 31,159,244,192, -192,192,131, 34,145,232, 29, 0,162, 42,148,121, 69,144, 9,133,194,143, 60, 60, 60, 78, 73,165,210, 92,169, 84,154,235,225,225, -113, 74, 40, 20,126,132,202, 3,169, 86,202, 41,145, 72, 62, 10, 8, 8, 56,165, 84, 42,115,149, 74,101,110, 64, 64,192, 41,137, - 68,242, 56,156,143,211, 43,177, 11, 45, 3,103, 3, 65, 16, 84,235,214,173, 55,180,109,219,118, 93,219,182,109,215,181,106,213, -234,107,155, 85,146,179, 89, 91, 12,168, 56,120,227,223,153,206,167,198, 25, 25, 25,185,125,219,182,109,236,156, 57,115, 52, 77, -154, 52, 41,152, 51,103,142,102,219,182,109,108,100,100,228,246,154,114, 6, 5, 5,213,139,140,140, 44,216,180,105, 19,157,148, -148,196,109,218,180,137,142,140,140, 44,112,138, 12,255, 36,242, 78, 0,136,176, 89,127, 14, 1,216,131, 18,231,247, 80, 0, 68, -140, 41,134,179,205, 62, 60, 1,160, 79, 5,101,239, 46,103,152, 41, 38,134,179,249, 84,157, 4,144,232,176,222, 13,101,253,191, -158, 4,167, 75,180,104,209,226, 30,231, 0,139,197,194,169,213,106, 46, 41, 41,137,187,112,225, 2, 23, 22, 22,118,207, 13, 78, - 63, 0,111, 3, 56, 28, 28, 28,124,187, 99,199,142, 15, 59,117,234,244,176, 94,189,122, 41, 34,145,232, 10, 74, 34,188, 71,218, -150,165, 0,154, 84,193,217, 81,165, 82, 45, 12, 11, 11, 59,212,184,113,227, 75,245,235,215,191,226,235,235,123, 68, 38,147, 45, -194, 95,145,177,171, 91,231,123, 12, 29, 58, 52, 77,167,211, 49, 47,189,244,210,109, 87, 39, 53,107,214,236,162, 78,167, 99, 70, -142, 28,153, 14, 32,250,159,240,188,243,156, 79,133,243, 31,133,198, 54,193,116,208, 97,249,196,197,113,159, 56, 29,179,213,118, -110,149, 5,193,113,156,128,227, 56, 15,142,227,188, 57,142,243,229, 56, 78,197,113,156, 39,199,113,210, 42,204,223,124,197,254, -251, 56, 39,219, 4,148,193,246,223, 25, 85,237,127,174,239,103,104,104,168, 79,187,118,237,166, 30, 56,112,224,163,251,247,239, -127,116,224,192,129,143,218,181,107, 55, 53, 52, 52,212,231,113,210, 25, 20, 20, 84,175,121,243,230, 95, 53,107,214, 44,189,121, -243,230, 95, 57,137,172, 39,153,119,137, 77,196, 52,179, 45, 13,109,219, 8,148,196,194, 90,107, 19, 54, 17, 21,244,212,170,195, -105,231, 59, 4,160,175,109, 57,100,219, 22,246, 20, 56,203,161, 65,131, 6,199, 91,182,108,121,175, 85,171, 86,201,173, 90,181, -186,215,162, 69,139,123, 77,155, 54,189, 23, 17, 17,113,175,110,221,186,247,252,253,253,143,215,160,140,124, 1,132,160,252,103, -192,158,118,157,239, 30, 25, 25,121, 85, 38,147,185,140, 13, 38, 20, 10,231,181,106,213,234, 38, 74,102, 74,242,237, 39,207,201, - 11,173,255, 33,240,149,240,217,227,148,162,242,207,140, 84,181,159,191,159,207, 54,167,203,111,117,217,132, 76, 67,155,192,145, -212, 2,167, 35,159,189, 78, 69, 56,136,166,167,193,201,215, 37,158,147,231,228,133, 86,173, 67,200,223, 2, 30, 78, 48, 63,230, -126, 30,207,197,104, 60,126, 0, 0, 32, 0, 73, 68, 65, 84, 54,170, 19, 19,235,113, 56, 93,241,221,127,202,156, 60,120,240,224, - 81, 91,109,103,119, 0,231,236,189,194,138, 84,105,117,102, 19,212, 68,217,158,230, 57,121, 78,158,147,231,228, 57,121, 78,158, -243, 31,199,105,199,138, 10,182,223,113, 90,255,250, 25, 21, 94, 79, 36, 76, 15,111, 86,229, 57,121, 78,158,147,231,228, 57,121, - 78,158,179,166,152,248,140,138,172,110,246, 21,126,232,144, 7, 15, 30, 60,120,240,224,193,163,246, 80,117, 28,173, 61,123,246, - 8,236,255, 71,141, 26, 53,158, 97,152,169,246,117,129, 64,176,230,187,239,190,219, 82,217, 21,134, 15, 31,206, 84,198,233, 10, - 85, 93,199, 21,103,139, 38,202, 73,126,222,138,247,138,138, 13, 43, 83, 50,153, 11, 38,147,169,185,125,159, 76, 38, 75,220,178, -101,203,221,218, 78,231,248,241,227,155, 56, 95,167,126,152,168,187,175,151,236,221,130, 34,221,242, 91,247,116, 95,243,117,236, -169,192, 31, 64,180,151, 76, 60,168,133, 74,220,241,207,124,211,101,189,149, 57,140,146,217,176,133,207, 99,134,131,131,131,155, - 42,149,202, 49, 0, 90, 24, 12,134, 64,133, 66,145, 11, 32, 65,163,209,108,207,206,206,190,227, 46, 79,183,250, 72, 3, 16,110, - 91,125,120, 46, 21,245,220,217, 87, 21,250, 68,192,196, 1, 82,130,128,245,100,242, 95,206,232,125, 27,193,196,114,229,183,247, -105, 4, 11,199, 65, 76, 0,230,147,247, 33,123,142,138, 74, 9, 32, 10, 37, 33, 28,110,160, 36,252,132,129,127,100,121,240,120, -174,224, 60, 84, 88,186, 46,172, 64, 76,116, 21, 11,137,175, 56,112, 42,128,243, 51,155,205, 34,137, 68, 2,139,197, 2,133, 66, -190,246,237, 9,227, 63, 7,137, 34,138,198,187, 91,182,108,169,241,151,174,171,115, 29, 0, 63, 57,159,239,163,148, 47, 56,123, -248, 99,159,174, 3, 22, 47,178, 60,200,139,213,106,181,164, 84, 42,133,217,108,134,183,183,119,167, 73, 19, 39,190, 68,138, 56, -139, 88,236,113,121,197,138, 21,217, 53, 77,231, 7, 31,124, 16,108,181,154,254,205,178,172,196, 98,177, 72,157,175,227,173,240, - 88,124,246,240,199,138,110,209,139, 62, 7,120,161,245, 20, 32,169,231,227,113,110,229,168,238,205, 58,182,104, 12, 54,225, 60, - 76, 22,235,160,179,233,186, 65,159, 94,201,156,158,174,179,182, 69, 45, 4,172,252, 31,130,160, 97,195,134, 83, 2, 2, 2, 70, -110,220,184, 81,220,176, 97, 67,200,100, 50, 24,141,198,144,251,247,239,135, 76,154, 52,169,155, 92, 46,223,149,146,146,178, 22, -238,125, 8, 46,252,236,214,255, 3, 0,116, 26, 51, 63, 28, 37, 31,139, 54, 56,239,235, 62,110,126, 56,128, 25, 40,251, 97,228, - 44,148,132, 80,112,213,234, 72,142,108, 91,134, 65, 99, 63, 18, 2,152, 84,154,120, 18,248,225,219, 85,232, 55,234,189, 50,219, - 9, 14,194,195,219,150, 33,122,236, 71, 21,126, 71,177,111, 99,130, 98, 89,174, 66, 75, 60, 73, 18,244,137,123,156,171, 15, 12, -231,160, 36, 6, 88, 57, 74,148,124,208,217,229,241, 3,154, 10,114,172, 20,227, 50,224,172, 88, 36,200, 61,122,135, 41,119,110, - 76, 27, 80, 20, 83,210,182,138,133, 96, 14,166,120,159,157, 61,123,182, 48, 58, 58, 26,155, 55,111,238,252,245,215, 95, 79,212, -106,181, 63,218,238, 91, 50,255,248,242,224,241, 92, 11, 46,215, 66, 75, 40,192,134, 67,251,182, 52,202,201,205, 67,204, 91, 31, - 98,231,206,157, 40, 44, 44,132,143,143, 15, 36, 98,177,104,229,210,255, 11, 86, 42, 61,130, 99, 38,198,110, 0,208,180,166,169, -169,230,117, 26, 59,159, 79,216, 62,165, 35, 20,144, 34,137, 68, 66,238,218,181, 11, 69, 69, 69, 80,169, 84,144, 72, 68,228,138, - 69,159,200,149, 74, 79,249,155,147,103,118, 70, 73,252,159, 26,193, 98,209,117, 62,176,115,139, 82,173, 86, 99,220, 59,177,112, -190,142, 88, 44,102,236, 47, 22,190,142, 61, 21,204,222,248,238,216,102, 47,122, 1,214, 91,151, 32, 18, 8,160,240,246, 65,148, - 80, 0, 1,129,230, 49, 39, 82,103, 1,248,244,121,201,108,195,134, 13,167, 12, 31, 62,124,228,130, 5, 11,196, 36, 89, 18,114, - 78,175,215,195,104, 52, 34, 52, 52, 20,103,207,158, 21,207,153, 51,103,228,247,223,127,143,148,148,148,213,213,229,191,117,235, - 86,253,240,240,112, 19, 0, 12,108,233,229,188,175,158,125, 31, 0,120,121,121, 85,201,231,167,242, 48,223,186,117,181,133,253, -188, 41,189, 66,153, 10,182,155, 0, 40, 42,227, 98, 89, 78,120,242,171, 73, 21,238,127,107,193, 14,250,198,158, 11, 77, 27, 54, -108,104,116,220,238,233,233, 89,209, 41, 65, 58,157, 46,220,121,163,253,120, 43,197, 4, 86,116,189, 62,239,174,119, 41,192, 40, - 6,194, 29, 59,118, 0, 0,190,252,104,180, 96,211,207,121, 66,161,176,164,169, 93,186,116, 41,230,205,155, 39, 57,113,226, 68, -255,109,219,182,245, 63,120,240,224,202,138,132, 42, 15, 30, 60,158, 73,145,229,248, 91,177,208, 34, 9,194, 75,233,229,137,215, - 94,127, 27,199,143,255,128,174, 93,187,150,238,107,208,160, 1,134, 15, 27,140,239,182,174, 0, 0,175,199, 73,209,227, 94,167, -176, 88,255,105,191,145, 95,205,127,152,173,187,114,228,200, 17,116,233,210,165,204,249,175,143,120, 13,223,126,179, 20,149, 68, -153,119, 11, 4, 71,138,189,148, 30, 24, 21,243, 14, 92, 93,103,226,184, 33, 71,250, 14, 95,213, 59, 39, 95,191,130,175,103, 79, - 30,141,130,253,250,180,108,214, 20,133,251,215,226,143, 34, 19,142,103,154,240,102,212,191, 16,233, 43, 71, 23,154, 65,176,135, -168,103,182,158,122, 46,132, 86,112,112,112,211,128,128,128, 50, 34, 75,171,213, 66,167,211, 65,163,209, 64,171,213,130, 36, 73, -196,198,198,138,207,157, 59, 55, 50, 56, 56,248,180, 27,195,136, 15,109,150, 44, 64, 32,210,205,157, 59,215, 28, 24, 24,104, 86, - 40, 20,156, 80, 44,213,118, 31, 55,223, 11, 0, 72,161, 88,187,114,229, 74, 75,104,104,168, 73, 40, 20, 74,222,123,239, 61,210, -157, 52,155,205,102,206,145,211, 98, 49,151,110, 95,188,120,177, 37, 40, 40,200,172, 80, 40, 56,171,213,125,163,227,205, 7, 5, -144,138, 5,144,138, 5,144, 73, 68,240,170,223, 14,210,194, 63, 65,211, 52,150, 44, 89, 98, 13, 14, 14,182, 40, 20, 10, 78, 34, -145,136,167, 77,155, 86,101, 58,199,143, 31,207,169, 84, 42,171, 66,161, 16,207,155, 55,175,220, 76,161, 51, 55, 50, 32,151,136, -160,144, 10,209,184, 65, 24,164,156,209,237,180, 10, 4,101,189, 17,164, 82, 41, 58,119,238,140, 22, 45, 90,224,224,193,131,221, -121,161,197,131,199,115,129, 10,103, 24, 10, 1,224,200,145, 35,221, 80,242, 65, 68, 68, 71, 71, 19, 37,103,112,152, 49,101, 24, -222, 28, 55, 10, 12,195,150,126,231,139, 32, 9, 76,126,163, 63, 88,214,157, 17,137,170,167,120,214,224, 58,165,156, 28, 65, 10, - 0,160, 81,189, 16,110,226,155,255, 1,195,178,127, 13,148, 8,128,183,199,245, 43,217, 86, 11,233, 20,128,193,135,147, 94,133, -171,235, 52,109, 84,135,164,173, 38, 16,101, 63,246,248,119,124,108,147,231,116,129, 22,117, 67, 34, 40,163, 17, 38, 19,133,248, - 59, 5,198, 83, 25,250, 64, 82,149,170, 94,245, 90, 7,153, 64,157,137,122, 94,146,198,217,122,234,185,200,187, 82,169, 28,179, -113,227,198,114, 34, 43, 39, 39,135,212,233,116,176, 90,173,172, 86,171, 5,195, 48,152, 57,115,166,104,206,156, 57, 99,178,179, -179,231,217, 53,143, 43, 78,155,223,213,140, 91,183,110,213,155, 61,123,182,181,103,207,158, 15, 27, 52,104,160, 23, 8, 4, 8, - 9, 9, 89, 21, 21, 21,229,187, 96,193, 2,107,255,254,253, 83, 5, 2, 1, 26, 55,110,172,255,243,207, 63,235, 1,144,187,155, -119, 71,206, 45,103,214,112, 0, 64, 16, 4,162,162,162,210, 26, 55,110,172, 23, 8, 4,184,123,120, 49,231,238,253, 20, 9, 73, - 52, 9,245,182, 53, 34, 4, 32,247, 44,245,196,139,138,138, 74,111,218,180,169,142, 36, 73,220,188,121, 51, 12,229, 63,107, 85, -142, 83, 46,151, 83,175,191,254,250,195, 59,119,238,184, 58, 30, 66, 1,137, 14, 77,109, 6,172,208,182, 64,250,197, 10,211, 41, - 18,128,158, 51,101,180, 80, 37, 3,164, 94,254,102,141, 70, 3,165, 82, 89, 98, 33,179, 90,241,251,239,191,163, 99,199,142,221, -246,236,217,115,142,127,222,121, 78,158,243, 47,184,210, 34,207,160, 53,203,241, 67,247,101,124,180,206, 58,103,138, 97,104, 52, - 8, 15,194,226,255, 27, 15,134, 97,193, 48, 12,104,219, 47,195, 48,160,172,214, 90, 73,217,227, 92,199, 71, 41, 95,240,195,174, -119,125,122, 14, 89,218, 43,110,246,184, 83, 12, 3,176, 44, 5,138, 2, 24,150, 2,203, 48,160,168,218,113,205,161, 88, 22,245, -194,130, 17, 55,123, 28,156,175,179,253,187, 61, 3,207, 28,138, 85,116,141, 94,244,225,221, 52,195, 18, 94,216, 63, 89,200,196, - 82, 33, 39,148,193, 98,161,161,181,176, 22, 0,122, 19,197, 90, 57, 15,127, 25, 0, 8, 73,226,121,154, 93,219,162, 97,195,134, -101, 68,214,178,101,203,252,215,173, 91, 23, 10, 0,195,134, 13,203,232,213,171, 87, 94, 82, 82, 18, 66, 66, 66,136,188,188,188, - 1, 0,222,179,157, 59, 3,192,186, 10,120,245,225,225,225,166,128,128, 0,179, 93, 16,145, 36, 9,161, 80,136,240,240,112, 83, - 96, 96,160,185,113,227,198,122,177, 88, 12,146, 36, 97, 23,122,110,117,243, 8, 2, 2,129, 0,118, 78,103,107,143,157,179, 58, - 16, 9,201,242,205,155, 3, 39, 73,146, 46,175, 87, 97, 29,146,201, 56, 0, 21, 30, 47, 32, 29,154, 71, 97,229, 30, 2,241,191, - 67, 4,224, 44,199,113,184,126,253, 58, 82, 82, 82, 32, 22,139, 17, 28, 28,140,121,243,230,193,108, 46,209,187,195,135, 15,239, - 6,224, 38,255, 4,243,224, 81,138,179,207,160,192,114,182,106, 85,238,163,117,228,200,145,110,209,209,209,231,236, 2,168, 68, -236,184, 16, 63, 20, 13,138,178, 2, 28, 87, 43, 66,171,162,235, 48, 12, 91,233,117,236, 62, 90, 44,203, 9, 93,138, 44,150, 5, - 77, 81,181,114,247, 88,134, 2,203, 82,112,117, 29,130, 32, 25, 91,131, 47,230,159,147, 39,143,224,240,122, 36, 21,222, 0, 23, -104, 19, 66,253,164, 18,228, 25,209,240,133,102,130,223, 13, 20, 46,221, 72,132,191,167,242,185, 41, 23,131,193, 16, 40,147,201, -160,215,235, 75, 45, 89,235,214,173, 11,181, 88, 44, 36, 0, 8,133,162, 48, 53, 27, 42, 99, 88,192, 91,153,133,194,194, 98, 63, -142,227, 8,155,224, 89, 10, 96, 11, 42,137,238, 47, 22,139, 75, 5,138,163, 0,146, 74,165, 53, 18, 48,118,216,197,153, 88, 44, -118,185,221,121,120,173, 42,136, 29,133, 22,184, 18,171,150,147,216, 18, 8, 4,176,251, 70, 85, 5,137, 68, 82,154,119, 87, 16, - 10, 28,174, 39,168,190, 43,166,213,106,133, 78,167, 67, 81, 81, 17,100,178, 18,131, 25,199,113, 32, 8,226, 61, 0,239,243, 79, - 49, 15, 30,174,181,200, 51, 44,182, 92, 11, 45,148,152,236, 8, 0,160, 41,171, 75,241,179,231,240, 37, 60,204,214, 35,216,255, - 23,112,213,140,122, 58,114,228,200,173, 33, 33, 33, 29,236,235, 82,185,167,223,196,119, 63, 3, 77, 91,225, 37, 39,241,214,152, -126,101, 68, 86,137, 69,203, 82,225, 55, 65, 10,139,245,159,246, 27,190,122,190,183,210,239,138,179,248,137,139,191,246, 90,161, -198, 28, 70,146,191,162,144, 8, 97,134,191,253,217,120,135,198,253,198,174,245,115,167,187,109, 15, 36, 72,209,107,147, 86, 77, -228,132,158,205, 21,164,246,252,199,227,254,117,192, 81,204,249,250,250, 30,233,243,218,202,222, 57, 5,188,143,214,211,128,151, -183,138, 12,123,185, 59, 94,126,239, 43,156,249,228, 99, 14, 40,132, 95, 72, 40,217, 99,202, 23,240,124,121, 32,174,190, 53,134, - 5, 10,158,139,188, 42, 20,138, 92,131,193, 16, 98, 52, 26,161,209,104,160,209,104,202, 10, 2,145,136,152,248,206, 84,127,145, - 88, 2,202,106,193,241,237, 95, 84,201,105, 15,225, 48,176,165, 23, 4, 34,137, 54,161, 97,195, 85, 66,161, 16, 36, 73,226,240, -218,143,223,219,191,252, 93, 47, 0,184,113,100,173,102, 84,236,154,213, 36, 73,194,108, 54, 75,171,147,238, 71,143, 30,133,153, -205,102,147, 77,160,217,133, 31, 30, 60,120, 80,215,108, 54, 27, 29,183,187, 3,185,194, 11, 80, 53, 0, 20,129,229,172,103,169, -169,169,117, 40,138, 50, 8,133, 66, 88, 44, 22,183, 84, 17, 73,146,226,155, 55,111,134,177, 44,235,242,248, 22, 17,117,128,224, -150,128,196,219,237, 60,115,110,116, 68,109, 98,235,137, 69,144,230,193,227, 89,177,108, 61,131,207, 4, 81,193,255, 82,161,213, -253,200,145, 35,156, 99, 15,145,166, 40,155,200,250, 75,244, 48, 12,139, 76,181, 9, 73, 73,119,177,114,229, 74, 92,186,250,145, -247,130, 5, 11,164,115,230,204, 49,143, 28, 57,114, 57,203,178,173, 72,146,188,129,191,134, 42,202, 90,133, 88,182,238,181,107, -215, 26,218,215, 41,138,130,151,151, 23,188,188,188,208,180,113, 88, 57,145,197, 48, 12,172,149, 12, 29,218,125,180, 8,142,229, - 40,138, 1,195,178,165,226,167, 80, 99, 14, 59,116,250,122, 35,135,195, 95,176,255,233,220,174,121,197, 98,112,210,188,210,124, -236, 90, 63,119,250,130,205,155,165,133, 76,192,180, 81,175,189, 25, 57,124,212, 24,188,254,234, 43,221,204, 22,203, 65, 1,201, -177, 84,233,245, 64,130,131,179,143, 22,143, 39,132,228, 34, 61, 37,146,202,225, 25, 92, 31,119,117,140, 88, 32, 16,252,114,191, -200, 32, 38, 5, 66,144, 66, 49, 18, 10, 77,212,115,148,221,132,228,228,228,144,186,117,235, 66,163,209,128,166,105,118,216,176, - 97, 25, 66,161, 40, 76, 40, 18, 17,209,163,166,178,217,217,153, 20, 73, 10,192,113, 12, 94, 25, 62,137,144,202,228, 98,171,197, - 66,163,100,232,208,149, 53,203, 49,132,131, 87, 84, 84,148,175,125, 38,224,254,229,239,122, 57,236, 83,190,244,210, 75,190,142, -179, 14,221,180, 22, 17, 35, 71,142,148,135,135,135, 19, 0,240,235,246,217,118,235, 25, 49,112,224, 64, 89,120,120,137, 31,254, -143,107,223,117,155,211, 95,193, 1,197, 15,128,226,212,114,150,172,129, 3, 7, 74, 27, 54,108, 88,173,103,209,230, 0, 95, 97, -236, 46, 15, 33, 13,100, 95,119,139, 43,166, 13,168, 80, 79, 8,151,191, 66, 66,226,233,103,238,240,241,137,159,121,177,197,131, -135, 91,112,210, 34,207, 20,186,217, 4, 98,119,219,111,169,224, 18, 2,128,205, 68, 71, 56,232, 44, 80,180,181,156,200, 98, 24, - 6, 34,194,140,149, 43, 87,226,253,247,223, 7, 0,241,244,233,211, 15, 44, 88,176, 96, 40,203,178,173, 56,142,235, 66, 16, 68, -101,189,198,179, 33, 33, 33, 57, 28,199,137, 72,146,236,178,118,237, 90,223,254,253,251,195,203,203, 11, 28,203,149, 19, 89, 12, -195,194,106,181, 84,248,153, 91, 31,165,124,193, 15,123,166,249,244, 28,188,180, 23,195,178,167,236, 34,139,101, 24,128, 45, 57, - 41, 63, 55, 3, 39,143, 31,196,134,245, 27, 10, 65,112,183,193,129,181,137, 65, 84, 32, 6, 91, 93,252, 53,177, 75,231,118,205, -177, 96,243,102,233,173,107, 89, 7,166,126, 48, 43,114,248,168, 49,216,243,221,118,144,116,209,117, 71,145,197, 80, 44,138, 11, -243, 6,254,196,251,104, 61, 45,248,158, 60,117,138, 24, 51,102, 12,171,213,106, 33,150, 72, 88,138,162, 4,255,254,247,191,153, -247,223,127,159,204,206,206,134, 70,171, 19, 2,240,197,115, 96,214,210,104, 52,219, 39, 77,154,212,237,252,249,243, 98,146, 36, -161,209,104,208,163, 71,143, 60, 53, 27, 42,155,248,206, 84,255,204,204, 12, 90, 41, 23,154,197, 98, 17,114,115,115,217,110,253, - 71, 27, 71,141,127,191,206,251,179,227, 54,102, 93, 94,191,206,157,107, 56,206, 4,116,222,183,105,211, 38, 75,104,104,168, 73, - 42,149, 74,198,141, 27,231,214,248,161,197, 98,225, 22, 47, 94,108,118,158, 93,104,177, 88,184,149, 43, 87, 90,194,194,194,204, -114,185,156,163,168,170,253, 62, 73,146,160,223, 90,176,131,166,105,186,140, 21,203, 46,178, 40,150,208,125,245,213, 87,214,176, -176, 48,139, 66,161,224,164, 82,169,216,157,116, 78,157, 58,149,243,241,241,177,122,120,120,136, 99, 99, 99, 31,107,214, 33,197, - 64,184, 96,109,105,120, 7,169,151,151, 23,180, 90,109,105, 90, 67, 66, 66,120,177,197,131,135, 11,148,211, 34,207,166, 21,206, -189, 56, 90, 44,160,203,201,205, 11,244, 15,170, 15,154,166,109, 11, 5,154,162, 48,237,237, 81, 88,190,254, 43, 0,176,139,173, -168,233,211,167, 31, 0, 80,101, 99,182,107,215,174,249,211,167, 79, 87,230,228,228,156,216,186,117,171,239,232,209,163, 49, 99, -198, 12, 44, 93,186, 20, 34,137, 12,190, 1,117, 75,175, 99,191,110,158,186, 0, 28, 56, 93, 5,118, 58,107, 73, 35, 5,161, 95, - 64, 61, 80, 12, 5,150,162, 64, 81, 20, 8, 65, 73,214, 78, 30, 63,136,209,111, 76,133, 72,170,244, 89,179,114,137, 49,242,229, -144,161,115, 38, 76, 48,187, 97, 4, 36,111, 93,203, 58, 48,245,253,216, 40,187,200,218,183,125,253,237, 47,103, 14,222, 41,149, - 8, 75,175, 67,177, 44, 72, 82,192,251,104, 61, 37,145, 37,149, 74,247, 30, 59,118,236, 94,219,182,109, 9,189, 94, 15,138,162, -144,151,151,135, 3, 7, 14, 36,112, 28, 7, 31, 31, 31, 28, 59,118,140, 29, 61,122,244, 94,179,217,252,218,179, 46,182,178,179, -179,239,200,229,242, 93,179,102,205, 26, 53,115,230, 76, 17,203,178, 72, 74, 74, 2, 8,130, 19,137, 37, 32, 73, 18, 34,145, 16, -197,197, 26, 86,225,169,202,178,114, 2,133, 72, 44, 1, 41, 16, 87, 54, 77,248,161, 45, 24, 41, 72,161, 88,107,159, 9, 40, 22, -139,113,117,207, 50, 77,247,113,243,149, 0, 32,150,202, 11,251,244,233,147,214,188,121,115,253,111,191,253, 86, 15,229,103, 29, - 58, 63,159,244,144,113,177, 2,133, 92,166,143,138,138,122,104,231, 76, 61,181, 70, 51,102,242,108,130, 16, 72,244,209,209,209, -105,145,145,145,122,129, 64,128,196,131, 75, 52, 67,198,197,202,136, 74,130,172,158,184,199,189,117, 99,207,133,166, 95,124,241, - 5,213,191,127,255, 71,118,127,177,212,212,212, 58, 3, 6, 12,144,174, 88,177,130, 26, 48, 96, 64,250,139,255,207,222,117,199, - 53,113,254,225,231, 46,155,189, 71, 16, 68, 69, 81, 20,112,139, 11,197, 58,107, 29,173,226,194,189, 71,157,173,179, 14,220, 74, -221,168,117,214, 90,220, 84,171,162,214, 81, 23, 42, 46, 16, 7, 67, 69, 1, 25, 97, 67,128,144,157,187,223, 31, 36, 52, 32, 35, - 65, 91,107,127,121, 62,159,124,146,220,189,247,220,123,251,185,239,251, 29, 94, 94,197, 36, 73, 34, 50, 50,210,185, 58, 75,149, - 6, 70, 70, 70,138, 9, 19, 38,188,123,254,252,121,109,163, 14,171,133,139,139, 11, 40,138, 66,183,110,221, 32,145, 72, 12,150, - 45, 3, 12,248,111,162, 98, 30,173,170, 51,195, 43,148,138,111,167,204, 94,185, 19, 32, 76,181,238, 2,127, 25,150,104, 16,223, -127,255,157, 9, 0, 35,141,216,154, 59,119,110,141,101, 78,180, 68, 86,155,128,128, 0, 44, 94,188, 24,155, 55,111, 86,253,248, -227,143,140,248, 87,137,242,177,211, 87, 20, 84, 88, 15,104,208,197,148,130,250,182, 50,190,124,161,104,133,239, 87, 27, 86,166, -101,150,220, 25, 59,109,105,217,221, 75, 5,160,144,224,171, 0, 96,207, 79, 63,137, 88, 92,115,147, 33,195, 71, 1, 64,207,157, -219,130,206,172,193,129,154,197, 22, 77,120,124, 59,119,129,149, 70,100,237,218,186,246,185, 5,145, 25, 60,243,187, 24,133,246, -122, 0,192,218, 12,103,124,191,218,208, 59, 43, 79,180,221,112,158,253,115,224,112, 56,171,175, 95,191,110,226,237,237, 77,228, -230,230, 66,165, 42, 61, 34,114,185, 28, 66,161, 16, 69, 69, 69,144, 74,165,104,221,186, 53,185, 99,199, 14,147,153, 51,103,174, -150,201,100,211, 63,247,237,126,251,246,237,174,115,231,206,225,214,173, 91,195, 22, 45, 90,196,114,116,116, 36, 44, 44, 50, 9, -133, 92, 6,128,166,179,179,179, 41, 99, 83, 75,129,173,131,243,187,244,140, 44, 15,133, 92, 6, 74, 37,175,210,219, 92,157,222, -225,251, 23, 47, 94,212,219,180,105,147, 76, 59, 18,112,248,130,157, 59, 90,183,110,109, 29, 28, 28, 44,235,215,175, 95,178,198, -121, 93, 23,103,248, 43,111, 48,251,197,139,103,205, 42,114,250, 77,222,116, 80,195,169, 29,141,216,255,187,189, 7, 27, 53,106, -100,237,233,233,153, 92, 29,111,131, 6, 13,196,124, 62, 95,214,164, 73,147, 98, 22,139, 85,106,201, 82, 40, 74, 26, 52,104, 64, - 57, 56, 56,200,154, 54,109, 90,172,175,211,190,145,145, 17,173,177,138, 85, 6,125,162, 14, 89, 12, 40, 3, 2, 2,202, 50,195, -127,223,168,145, 96,212,168, 81,252,121,243,230,225,224,193,131,184,123,247,238,123, 98,191,107,215,174,184,125,251,246, 74,252, -135, 18,235, 26, 96,192,255, 25,170,207,163, 85, 17,135, 14,133,252, 9, 45,159,166,202,176,102,205, 26,174,218,146,213,115,206, -156, 57, 16,139,197, 86,149, 52,235, 1,117,174,141,202, 68, 86, 80, 80,208, 49,154,166,157, 1,116, 86,169,168, 7,251, 15, 28, -234, 86,213,250,134, 12, 25,242, 30, 39, 77,144, 12,146, 36,138, 57, 44,250,201, 79,251, 14, 30, 41,215,190,212,249,189, 49, 8, - 60,221,185, 45, 72, 12,160,103, 69,177,133,191,202,140,148,113,106, 48,117,218,212, 50,145,181,115, 91,208, 85,207, 54,117,191, - 89, 58,113,117,165,226,108,245,138, 41, 38, 36, 73,116,172,224,163,245, 30,231, 71,128,129,243, 47,116, 11, 8, 8,104,238,227, -227, 67,106,139, 44,153, 76, 86,150,184, 83,227, 44,158,150,150,134,174, 93,187,146,205,155, 55,247,122,248,240, 97, 55,252, 85, -206,233,115,221,118,213,219,183,111,119, 56, 58, 58, 94, 91,190,124,249,168,156,156,156,175,242,243, 11,108,194, 14,173, 70,159, - 33,211,136,174,125, 71,136,100, 52,147,151, 42,200,108,114,243,226, 81,235, 75, 39,118, 65, 46,147, 77, 1, 16,135,191,210, 59, - 84,228, 44,209,164,113,104,210,164,137, 72, 91,168,212,173, 91, 87,226,228,228, 36,245,244,244, 44,155, 94, 69, 52,223,123,219, -174, 47,167,218,255, 75, 84,211,254,212,136,182,138,105, 35,140,141,141,161, 17, 95,250,244, 83, 59,218,178,210, 27,101,205, 81, -135,101,156,234,244, 14,229,116, 90, 72, 72, 72,143,144,144,144, 54, 0,158,160,180,214,161, 2, 40, 29, 74,212,114,154, 15, 84, -127, 12,215,187,129,243,255,149,243,115, 70, 87,252,229,155, 5,148,250,106,221,170, 82,104,213, 4,141,227, 59, 0,114,238,220, -185,249, 98,177,216,106,212,168, 81,213, 46,147,145,145,113,240,240,225,195,229, 68,214,160, 65,131,198,133,134,134, 94,203,202, -202,170,213, 86, 89,153, 27,173,185,117,126,161, 85,215,126, 27,230, 0,248,177, 10, 67, 30,229,217,134,255,205,206,109, 65,103, - 42,136,173, 95, 1, 12,170, 74,149,246,250,114, 32,142, 30,218,169,241,237, 50,122,254, 56,237,210,176,168, 85,149, 70, 43, 90, -154,114, 87,169,251, 49,207,224,163,245,207,128,205,102,251, 45, 90,180,136, 45, 18,137,222, 19, 89, 21,133, 86, 97, 97, 33,158, - 62,125,138,177, 99,199,114,163,163,163,253,228,114,249,141,255,194, 62,200,200,200,136, 87, 39, 35,157,173, 73,225,192,229, 25, -177, 71,140,159,227, 92, 22,117,120, 98, 23,164, 18, 49, 0, 48,117, 73,239,192,100, 50,217,209,209,209,174, 26,171,149, 92, 46, -231,106,166, 63,126,252,216, 85,147, 91, 75, 34,145,232, 28,117,248,119,113, 62,123,246,204, 89, 19, 29,169,137, 46,100, 50,153, -236,200,200, 72,103, 13,167, 84, 42,213, 41,234,144,195,225,176,163,163,163,157, 85, 42,213, 71,139, 58,212, 22,198, 40,173,179, - 88,174,214,162,218,183,140, 32, 8,130, 54, 12, 27, 26, 96,192,103,143,138,145,146,213, 23,149,174, 9, 26,199,119, 61, 22, 97, -186,184,184,244, 26, 62,124,120, 57,145,229,239,239,175, 58,125,250,244, 77, 62,159,159, 73,146,100,188,190,253, 40,243,209,194, -123,111,144, 32, 73,242,105,231,182, 77, 65,146,228,211,165, 19, 39, 74,215,224, 64, 57,177,117,246,204,201,222,169,249, 49,149, - 75, 51, 0, 54,246,117, 16, 48,238, 91, 4,140,251,214, 10, 64, 39,160,234,104,197,234,250, 97,192,223, 3,130, 32, 56, 78, 78, - 78,207, 37, 18, 9, 8,130,128, 84, 42, 45, 19, 88, 69, 69, 69, 16, 10,133,101,255,229,114, 57,178,179,179, 81,183,110, 93, 16, - 4,241,159,246,163,147,203,229,202, 69, 43, 55, 29,102, 48,217, 74,138,146, 19,114,185,124,188, 62,215,249,162, 69,139, 72, 84, -226,123, 53,115,230,204, 74,167,127, 42,206, 37, 75,150, 84, 26, 37, 56,115,230,204,106,163, 7,171,194,119,223,125,247,209,162, - 14,117,191,125, 25, 96,128, 1,255, 49, 84, 26,186, 87, 43,161, 69,146,228,211, 74,162, 11, 9, 0, 52, 73,146, 79, 43,201,114, -160,124,247,238,221, 74, 75, 75,203, 41, 34,145,232,143, 65,131, 6,205,245,247,247, 87, 1,165, 14,242,181,221,162,124,161,104, -133, 95,255,141,243, 10,138,165,193, 21,231, 85,180, 60,105,196,214,174,237, 65,187,207,132, 30,247,207, 72, 79,221, 93,213,182, - 85, 37,168,170,138, 86, 20, 22,138, 87,250,245,223, 56, 39,191, 80,108,240,209,250,135,160, 82,169,174, 24, 25, 25, 17,154, 98, -202,218,214,171,194,194, 66,148,148,148, 64, 93,146, 6, 0, 80, 92, 92, 12, 11, 11, 11,168, 84, 42,250, 63,182, 43,164, 0,230, -171,173, 85, 0, 48, 63,241,230, 14,237,115,251,153,246,188,106,172, 89, 2, 93, 10, 68, 87,182, 92,117,243,254, 6,206,204,106, - 10, 68, 87,135, 76, 61,249, 50, 1,128,205, 98,100, 85, 85, 60,154,205, 98,100, 85,227,183,175,231,123, 3, 65, 3, 88,105,184, -178, 13, 48,224,243,125,255,255, 84, 43,238, 97,224, 52,112, 26, 56,255, 17, 78,174,250,163,235, 60,195,254, 52,112, 26, 56, 13, -156,255, 54,206,202, 48,249, 51, 17, 90,116, 37, 31, 0,181,180,104, 25, 96,128, 1,255, 58, 72,107, 57,207, 0, 3, 12, 48,192, -128, 15,199,123,197,164,181,103, 84,165, 74,245,137, 38,168,141,178,189,102,224, 52,112, 26, 56, 13,156, 6, 78, 3,167,129,243, -255,142,179, 38,110,237,229, 39, 3,216,247,153,136,173, 79, 18,208, 98, 48,171, 26, 56, 13,156, 6, 78, 3,167,129,211,192,105, -224,172, 45, 12, 67,135, 6, 24, 96,128, 1, 6, 24, 96,128, 1,255,231,208, 47, 97,169, 1,149,160,238,192,165,160,176, 68,189, - 59,131,144,114, 54,240,191,182,137,254,254,254, 12,125,218, 39, 38, 90,146, 81,224,111, 54, 55, 97,247, 47, 22, 41, 54, 83, 81, - 43,130,107, 58, 17,109, 27,180, 26,109,204, 51,158, 46,147,201,234,155,154,153,101,229,229,102,239,201,123,247,108,151, 86, 27, -243, 7, 15, 30,240,125,124,124,210, 1, 20,105,189, 41, 24, 96,128, 1, 31, 19,150, 77, 93, 64, 16,227, 1,250,175,176, 75,138, -142,129, 48,238, 80,185,118, 22, 30,227, 64, 18,205,180,166,136, 65, 99, 63, 10, 98, 83,106,120,224, 88, 38, 36, 36,184, 54,108, -216, 48, 25, 64, 65,197,181, 87, 50,207,112,157, 27,240, 57,163, 43,202, 39, 44, 45,187, 22, 62, 92,104, 53, 26, 84, 31, 74,114, - 12,104,140, 4,129,104, 36,134, 14,174, 21,143,219, 55,117, 64, 49,219, 1,104, 5,208,173, 76,140,120, 45,197, 50,121, 22, 69, -211,163,241,230,228, 19,189,249,234,251, 79, 67,213,229, 44, 86, 34, 49,244, 39,189,248, 40,250,135, 71,183, 79,115, 45,141, 9, - 52,108, 61,104, 1,202,103,112,174, 45, 56, 0,124, 73,146,108,102,108,108,204, 47, 41, 41,201,166, 40, 42, 5,165,227,211,249, -181,228, 36, 1, 76, 48, 53, 49,233,227,106,198,105,245, 46, 71,152, 86,164, 80,133,163, 52,161,107,254,199, 58,163, 74, 69,150, -227,190, 57, 35,124,198, 6,205,234, 1, 75,191,141, 11, 74,128,234,132, 22,225,220,184,227,217, 97,195,135,248,205,152, 60,214, -180,142,157, 41, 4, 57, 34,155,159, 14,134,108, 10, 9, 57,218,111,226,176,158,125, 0, 96,245,234,213, 95,187,184,184,212, 99, - 48, 24,137,203,150, 45,251,117,197,138, 21, 52, 81,117,165,114,190,250, 28,214,220,240, 77, 0,120, 2,104, 0,224, 45,128, 23, - 40,159,101,188, 54,248, 44, 56,235,212,169,227, 68, 81,212, 68, 7, 7,135,175, 50, 51, 51, 47,144, 36,121, 32, 45, 45, 45,253, - 83,222,117,104,154,222, 75, 16,196,100,154,166,247,233,241, 61, 69,159,117,240,120,188, 76,137, 68, 98,175,254,157, 37,145, 72, - 28,254,174,237,249, 39,215,245, 15,189,127, 79,186,114,231, 69, 31,237, 73,189, 58, 55,171,228,142, 66, 52,187,114, 39,166, 75, -249,118,158,170, 42,238,129, 4, 77,211, 88,185,114, 37,177,106,213,170,113,110,110,110,141, 72,146,124,185,124,249,242,114,169, -111, 42,206,211,186,206, 13, 98,203,128,207, 21,250, 21,149,174, 17, 77,253, 77, 32,161,253, 1, 98,108,215,182, 45, 59, 79, 25, -221,159,160, 25, 60,140,152,180, 80,169, 55,151,235, 88, 46, 24,226, 53,222,205, 26,207, 29,210,191, 7,217,198,179, 30,248,118, - 22, 0,201,194,222,139, 73, 54,193, 65,203,118, 3,240,169, 69, 47, 87,188,137, 56,102, 47, 40, 80,129, 32, 0,130, 0, 72, 2, - 40,150, 80,232,245,245,152, 21, 0,126,210,243,174, 68, 90, 26, 19,152,123, 76, 2, 0,140,143,112, 80,234,217,217,217,141,155, - 61,123,182,137,167,167,167, 37,143,199,227, 72, 36, 18,135,132,132, 4,187,101,203,150,121,138,197,226,243, 0, 30,233,201, 89, -183,161,179,211,201,224,185, 19,218, 53,111,224, 10,150,172, 24,148, 84,228,242, 42,225,117,135,169,187, 79, 77,138,201,147, 12, - 71, 45, 74, 38,228,228,228, 16, 0, 96,107,107, 75,151, 23, 89,237,199,110,157,215, 11,115,183, 92, 65,137, 68,118,164, 58, 14, -235,122, 45, 70,125,243,205, 64,191,181, 63,204, 52, 77,203,149, 35, 58, 81, 12,107, 83, 54, 86,204,159,198,145, 74, 21, 29,118, -255, 26, 50,121,231,134,133,251, 85, 42,213, 23, 0,218,168, 84,170,199, 0,126, 93,185,114,101, 85, 55,223, 85, 0,150,168, 79, -232,163, 12, 6,227,106,183,110,221,234, 79,156, 56,145,104,221,186, 53, 34, 35, 35, 27, 28, 59,118,172,199,133, 11, 23, 18, 85, - 42,213, 51, 0, 47,161, 46,123,162, 3, 88, 0, 26, 51, 24, 12,239,127, 51, 39,159,207, 55,146,201,100, 99,156,157,157, 39,119, -236,216,209,187,127,255,254, 68,227,198,141, 17, 31, 31,223,250,210,165, 75, 43,194,195,195,159,165,166,166,238,227,112, 56,135, - 5, 2,129,248, 31,127,142, 19,196,100, 0, 78,106,157,188, 82,135,239,116,148,230,146, 18,232,186, 14,137, 68, 98,175, 41, 97, - 67, 16,132,253,223,185, 61,122,174, 43,150, 32, 8,107,117, 91, 84,247, 77,146, 36,148, 74,165, 72,165, 82,185,213,192,217, 88, -253, 34,165,179,214, 5, 80, 93, 34,104, 35, 0,232,213,169, 89, 30, 8,196,148, 89,180,222,127,201,140, 41, 19, 96, 52,154, 93, -185, 27, 99, 93,206, 10, 86,241, 45,118,229, 74, 98,197,138, 21, 8, 12, 12,236, 15,192,151,162,168,112, 15, 15,143, 29,229, 40, - 41,170,108,222,138, 21, 43,182, 87,115,157, 27, 96,192,231, 2, 63,232, 83, 84,186,202,247, 31,183,193, 93,160,194, 88, 87, 27, -123,255, 89, 19,135, 26,121,122, 52,132, 4,166, 72,202, 81,225, 98,216, 37, 0, 56,161,159,213,105,104, 27, 38, 83,114, 56, 40, -112,126, 19,223,118,158,120,158,166,192,227, 52, 21, 74, 18, 21, 96,144, 10,168, 40, 26,160, 33,169,237, 86,167,230, 43,113,231, -165, 12, 36, 1, 48, 72,128, 36, 9, 48,200, 90,146, 81,178, 87,171, 15, 69,121,230,100, 82, 0, 37,123,245,129, 7,164,153,187, -187,251,168, 85,171, 86, 89,102,100,100,152, 68, 70, 70,130,203,229,194,202,202,138,193,231,243,157,182,108,217, 34,158, 53,107, -214, 87,114,185, 60, 9, 64,142,142,156, 30,125,219,120,223,219, 23,180,218, 66,241,224, 18, 10,142,255, 6, 6, 73,131,109, 98, -138,250, 70, 70,184,244, 77, 67,107,255,176,196,211, 15, 51, 69, 30, 0,210,106, 34,139,139,139, 99, 72,165,210,225,230,230,230, -237, 89, 44,150, 3,207,170, 30,149,206,108,147,155, 77, 52,120,155,101, 95,210,101, 94, 15,135, 62,155,231,116,195,220, 45, 87, -176,237,216,253, 95, 90, 33, 99,121,117,121,179,141,141, 77,167,204,154, 62,209, 52, 53, 71,142, 53,167,115,112,232,118, 33,198, -248,154, 97,238,151, 22, 8, 24, 49,204,228,212,111,161, 83, 0,236,215, 90, 36,222,195,195,131,136,139,139,171,236,230,107, 5, - 96,161, 76, 38, 35,217,108, 54,193,227,241, 70,173, 93,187, 86, 62, 98,196,136, 84, 77, 3, 95, 95, 95,248,250,250, 18, 69, 69, - 69, 13,110,220,184,209, 32, 36, 36, 68, 25, 17, 17, 17, 11,224,108,213, 22, 11,163,119, 18,137,216,133,103,100, 84,242,211,238, -221,155,187,116,233, 66,113,185,127,165,159,170, 13, 39, 0, 88, 88, 88,236,183,183,183, 39, 22, 47, 94,156,254,177, 56,235,213, -171,119,165, 93,187,118,221,122,245,234,197,236,212,169, 19,156,156,156,202,230,217,218,218,194,215,215,151, 72, 73, 73,105, 30, - 30, 30,190,251,202,149, 43, 59,158, 60,121,114, 35, 41, 41,169,215, 63,108,209,218,167, 22, 19, 2, 61,219,127,246, 32, 8,194, -116,239,222,189,246,154,154,140, 10,133, 2, 42,149,170,236, 91,243,161, 40, 10, 42,149, 10,107,215,174, 85,137, 68, 34, 93,246, -145, 72,235,173, 89,243,161, 42,251,230,112, 56,182,154,132,189, 53,220,217, 99,248,220,130,166, 38, 38, 38,174, 0,250,194,174, -209,194,242, 13, 74,223,159, 69, 34, 81,178, 64,106, 25, 3,160, 75, 53,108,150,171, 86,173, 26, 19, 24, 24, 56, 80,203, 74,235, - 61,100,200,144,138,101,175,188,213,223, 34,130, 32,110,146, 36,121, 30,192, 33,124, 68,171,187, 1,255, 45,208, 52,221, 22,128, -157,214, 36, 25, 74, 71,133,160,126, 78, 18, 0,108, 42, 76,215,110,167,249,206, 86, 79,183, 83, 47, 71,107,241,102, 19, 4,241, -168,150, 93,188,133, 42,252,180,152, 0, 16, 22, 22, 70,247,235,215,143,208,124, 87, 46,138,252, 47, 78, 24, 49,160,207, 87,221, - 59,130,228, 89,225, 85, 22, 16,241,142, 6,147, 84,128, 4,141, 7,119,111,208, 96, 82,135, 43, 44, 85,181,245,164,222,224,239, -188, 61, 61, 54, 30, 8,154,205,136,205, 98,226, 80,120, 9,228,146, 98,100,103,188, 67, 86,122, 50, 4,169,111,145,246,238,237, - 51,128, 88,161, 51,231,123, 7, 6, 80, 81,234,119, 64, 10,168, 38,242,178,102, 78,185, 40,174, 65, 99, 79,207,124,142, 10,144, -139,226,116, 88,125, 85,156, 94,141, 26, 53, 26,241,195, 15, 63, 88,191,120,241,194,168,164,164, 68,122,233,210,165,248,164,164, - 36,115, 62,159,159, 55,109,218,180, 70, 78, 78, 78,230,131, 6, 13,226, 28, 63,126,252,107,148, 15,107,173,138,211,115, 64,251, -150, 17, 7,119,108, 53,201, 61, 21, 12, 89,194, 83, 92, 20,136,112, 55,179,132,110, 96,193, 37,190,109,110, 7, 83, 46, 19,171, - 59, 57,153,246, 61,147,176, 81, 65, 81, 1,213,113,222,187,119,143,111,108,108,188,101,228,200,145,252,153, 51,103,114, 85, 76, - 75,102,104, 68,174,197,194,221, 17, 78, 37, 82, 57, 99, 68,183,122,152, 55,210, 27,243,182, 93,215,136,172,201,245,235, 23, 80, - 81, 81, 85,115, 42,228,242,250,206,246,230,136, 78, 18,227,208,237, 66,252,249,131, 19,186,175, 77,199,160, 86, 76,120,212, 53, -133, 82,174,104, 60,100,200,144,195,234,183,246, 71, 0,190, 30, 50,100, 72, 19, 6,131,113, 29,192,239, 53, 29, 35, 30,175,242, -234, 41, 86, 86, 86,232,218,181, 43, 60, 60, 60,152, 93,186,116,241,174, 32, 96,202,113,202,229, 50, 62, 69,209, 48, 51, 51, 51, -178,177,177,177, 50, 51, 51,203,173,236, 65,165, 15, 39, 0, 88, 91, 91, 15,238,218,181, 43,243,216,177, 99, 57,137,137,137, 15, - 70,140, 24,241,214,220,220,188,156,245,215,196,196, 4,141, 26, 53,194,178,101,203,152,125,250,244,169,145,211,193,193,161,103, - 72, 72, 8, 8,130, 40,123,104,191,103, 44,118,117,133,163,163, 35,250,246,237,203, 28, 60,120,112,207,164,164,164, 90, 93, 71, -122,224, 90, 37, 22,173,149, 21,142, 83,149,195,111,149,181,215,225,184,103,105,172, 75,106, 62,124,192,181, 89,237,112, 39,143, -199, 43,179, 66, 85,178,174,247, 56, 73,146,196,210,165, 75, 65, 16, 4, 88, 44, 22,216,108,118,165,223,126,126,126,250,246, 51, -133, 32, 8,146,205,102, 47,100, 50,153, 19,165, 82,169, 51,143,199, 75, 87,169, 84,191, 72,165,210,181, 0, 20, 52, 77, 91, 86, - 33,178, 42,229, 52, 49, 49,113,125,245,234,149,123, 85, 29,145, 74,165,240,246,246, 6,164,136,173,142, 51, 33, 33,193,213,205, -205,173, 49, 0, 77,137,182,219, 52, 77,119,209,250,175,141,219, 52, 77,127,169,254,253,242,205,155, 55,174, 13, 27, 54,204,255, -167,206, 79, 3,231,191,143,179, 6, 45, 98, 71, 16, 68,152,113, 48, 25,151, 0, 0, 32, 0, 73, 68, 65, 84,214,181,218, 79,243, -127,209,162, 69, 75,214,175, 95,255,130, 32,136, 48,237,233,218,237,180,191,213,247,155, 48,154,166,251, 45, 94,188,216,115,195, -134, 13,235, 52,109,255, 14,145,168,143, 69,203, 60, 91, 98,130,240,119,230, 96, 50, 84, 96,146, 4,152, 12, 0, 52,129,228,164, - 4, 20, 21, 22,220, 65,226,233, 68,221, 44, 89,254,157, 90,180,240, 10, 58,186,109, 1,249,115,120, 9, 10, 68, 18,196, 61,185, -137, 71, 55,127,207, 80, 41, 85,191,131,160, 31, 3,100, 36,222, 82,241, 64,104,237,106, 92, 16, 52,179, 84,104,169,197, 85, 57, -177,245,201,208,188, 73,147, 38,195,150, 45, 91,102, 27, 21, 21,197, 19, 10,133, 69, 71,143, 30, 77,151, 74,165, 73, 0, 46, 39, - 39, 39, 55,217,190,125, 59, 39, 40, 40,200,203,203,203,139,127,242,228, 73, 89, 37,229,140,222,227,156, 63, 54, 32, 98,226,172, - 57,188,216,147,187,192,137,141,196,210,167, 57,170, 63, 5, 37, 63, 0,216,134,148,226, 78,217, 18,229,213,173, 93, 93,200,122, -102,108, 52,180,228,248,197,229, 73,170,181,100, 25, 27, 27,111, 9, 9, 9,113,109,219,182, 45, 9, 0,225, 47,149,220,133,187, - 35,156, 46,175,239, 68,116,106,102,131,172, 2, 41,102,239,138,198,165,136,172, 63, 52, 34,171,166, 78,154,153,153,101,167,102, - 21, 58,216,152,242, 48,186,179, 41,186,175, 77,135,127, 27, 46,184,108, 2,241,137, 25,104,232, 86,143,136,190,115,182,141, 90, -100,181, 21, 8, 4, 0,208, 6, 64, 98, 74, 74, 10,223,199,199, 71,168, 69,151, 15, 96, 35,135,195, 89, 74, 16, 4,221,182,109, -219,104, 47, 47,175, 98, 43, 43, 43,136,197, 98, 72,165, 82,176,217,108,136,197, 98, 36, 39, 39,227,193,131, 7,176,178,178,210, -235, 64, 21, 23, 23,195,204,204, 12, 20, 69,125, 48,167, 74,165, 34,246,236,217, 99,242,226,197, 11,147,208,208, 80,135,185,115, -231,230, 54,109,218,244,241,176, 97,195, 94,219,219,219, 75,159, 62,125,138,123,247,238, 33, 63, 63, 31,237,219,183,215,137, 83, - 38,147,129,201,100, 66, 44, 22,131,203,229,130,201,100, 66,169, 84,130,162,168, 50,241, 85, 92, 92,140,188,188, 60,176,217,108, -200,100,178, 79,241, 6,250,158,133,170,186,225,183,218, 88,180,180,133,154,142, 34,171, 38, 75, 84,149,195,157, 5, 5, 5, 70, -150,150,150, 11, 1, 8,106, 90, 23, 65, 16, 96, 48, 24, 96,179,217, 32, 8, 2, 93,186,116,193,132, 9, 19,208,170, 85, 43, 36, - 36, 36,224,248,241,227,120,244,232, 17, 88, 44, 86, 89,123,157,199, 39,252,252, 24, 60, 30,239,222,128, 1, 3, 60,127,248,225, - 7, 94,189,122,245, 16, 27, 27, 91,119,195,134, 13, 11,175, 93,187, 54, 80, 36, 18,181,209,220,237,170,183,210,171,135, 4, 75, -135, 11,251, 74,165, 82,196,198,198,234,179,204,123,104,216,176, 97, 50, 73,146,175, 41,138, 10, 7,224, 77,211,116, 23,130, 32, - 46,161,212, 47, 81, 27, 34,154,166,191, 36, 8,162, 16,192, 51,146, 36, 95, 82, 20,149,108,176,219, 24,160,195,125,165, 95,197, -255, 4, 65,132,173, 95,191,190, 95,101,226,170,146,107,179,220,244, 13, 27, 54,172,211,250,255, 33, 22,213,174, 40,239, 12,239, -167,182,114,253, 37,180,194,194,194,170, 87, 32, 20, 6,133,157, 62,118,191,187, 28,174,158,173,125,181,172, 67, 52, 34, 31,220, - 3, 64,255,162, 83, 87,248,253,140, 72, 6,243,151, 61,235,102,146,123,111,150, 32, 37, 61, 11,247, 46,254,130,108, 65,210, 33, -128,158,139,196,208,194, 15, 62, 18,245, 6,121,217,219,216, 90, 74,228, 52, 40, 26,192,123, 98,235,147,160, 85,227,198,141, 7, - 71, 68, 68,216, 74, 36, 18,222,157, 59,119, 74, 66, 66, 66, 50,228,114,249, 77, 0,119,213,109,162,178,179,179,135,168,133, 9, -131,201,100,114,228,114,121,117,190, 11,173,230, 79, 28,115,103,227,158,131,188,215,207,163,177, 61,244, 34, 10, 74, 74, 84, 55, -179,196, 95, 3,208, 40,250,235, 81, 57,226, 52, 26,180, 11,139, 36,192, 55, 97, 57,198,229, 73,120, 64,229, 67,178, 82,169,116, -196,200,145, 35,249, 26,145, 5, 0, 57, 69, 10,102,137, 84,193,232,212,204, 6,173,187, 13, 65,228,141, 83, 56,121, 59, 13,110, -118,198,183,235,155, 20,232,180, 71,179,179, 4,123,182, 6,239,221,186,113,229,124,206,188,190, 22,240,111,195, 2,143, 77,192, -220,152,133,181, 59,246, 43,162, 30,220,126,202,231,243,195, 0,124, 45, 16, 8,192,231,243,139, 1,188,100, 48, 24,137, 42,149, -170, 50,167,238,229, 0, 28, 14, 31, 62, 76, 42, 20,138,226,132,132, 4, 56, 58, 58,194,193,193, 1, 22, 22, 22,136,139,139,195, -159,127,254,137,248,248,120, 80, 20,133, 22, 45, 90,232,117,176,114,115,115,241,244,233, 83,244,237,251,213,220,236,236, 44,115, - 43,107, 27,209,157,240,219,155,106,195, 73, 81, 20, 1, 0,158,158,158,240,244,244,228,165,165,165, 57,135,133,133,217,175, 89, -179,230,157,171,171,235, 81,177, 88, 92,206,114,160,171,208,210,136, 11,141, 8,228,241,120, 96,179,217, 40, 44, 44, 68,102,102, - 38,138,138, 74,131, 54, 45, 45, 45, 63,137,208,170,194, 66,245,209,218,255,205,226,240,189,225, 78, 75, 75,203,145, 0, 22,234, -184, 45, 80, 42,149, 96,179,217,240,241,241, 65,112,112, 48, 30, 61,122,132,223,127,255, 29,117,235,214,197,216,177, 99, 65,146, - 36, 94,188,120,161,111, 23,169,136,136,136,133, 95,127,253,181,231,225,195,135,121,201,201,201,136,143,143,135,165,165, 37,130, -131,131,185,147, 39, 79,110,120,227,198,141,229, 40, 13,126,169, 30, 90,209,133, 34, 35,254, 80,111,111,239,247,154, 56, 58, 58, - 90, 92,190,124,217,190, 76,128, 85,140, 72,124, 31, 5,203,151, 47,223,234,225,225,177, 77, 61, 92,232, 11,192,132,166,105,191, -208,208, 80, 2, 0,252,253,253,105,130, 32, 52, 15,164,103,167, 78,157,234, 22, 23, 23, 71, 7, 6, 6, 26,124,180, 12,168, 74, -139, 76,214, 92,147, 85, 9, 40,125,132,154,182,197, 75,131,197,139, 23,123,174, 95,191,254,225, 7,138, 44,237, 55, 38, 90, 35, -182,202, 30,166, 85, 14, 25,150,217,190, 72,190,163,189,141,245,162,177,157, 64, 81,128, 82, 5, 40, 85, 52, 68, 37, 98,196, 62, -127, 84, 2, 30, 17,170, 83,119,184,156,160, 53, 63,204,105, 16,157, 74, 34, 61, 95,142, 91,103,247,210,217,130,164,193, 72, 60, - 53,254,227,136,172,161,222,142, 14,246,183,142,237, 93, 77, 62,122, 43,131,138, 42,213, 89, 20, 69,151,253,254, 4,112,180,179, -179, 11,184,127,255,190, 29,151,203,229,189,122,245,138, 58,117,234, 84,190, 92, 46,191,166, 37,178, 0,160, 83,155, 54,109,148, -166,166,166, 16,137, 68,114,185, 92, 46,169, 70,100, 57,251,181,106,126,123,227,158,131, 60,137, 76, 6,161, 88, 10,134,141,125, - 69,145, 5, 0, 29,187,185,215,169, 67,240,204, 64, 3, 72, 42,148,167, 87, 37,178, 0,128,203,229,246,152, 57,115,102,185,186, -120,182,102, 44,165, 49,151,165,186, 27,147, 67, 69,222, 56,133,240, 23, 57, 20,143,205, 80,217,209,111, 27,232,186, 3, 10, 82, - 99,246,252,126, 46,236,234,119,203,130,138, 75, 68, 69,112,115, 50, 66,113,145, 16,107,215,111, 84, 68, 68,132,223, 92, 56,119, -106,135, 83,167, 78,109, 64,169, 51, 56, 0,188, 60,117,234,212,152,101,203,150,253,138,191,210, 60, 84, 68,122, 64, 64, 64,106, -179,102,205,132, 30, 30, 30,194,220,220, 92,196,196,196, 32, 63, 63, 31,219,183,111, 71,108,108, 44, 52, 22, 65,157,124, 85,222, - 23, 72,200,207,207, 51,165,105, 26,249,121,185, 38, 63,252,240,131, 69,109, 56, 85, 42, 85,185,107,171, 78,157, 58,152, 54,109, - 26,187,164,164,196,242,221,187,119,230,218,243,116,229,148,201,100,208, 88,134,104,154,134, 76, 38,131, 80, 40,132, 76, 38,195, -235,215,175,203, 68,150,122,253,159,204,162,165,249,205,227,241, 50, 53,231,178,102, 8,142,199,227,101, 85,213,254, 67,160,181, - 46, 90,253, 91, 95,113, 88,227,246,232,120,220,193,102,179, 49, 97,194, 4, 60,124,248, 16, 9, 9, 9, 96, 48, 24, 16,137, 68, - 40, 41, 41, 65,207,158, 61,193,225,112,244,181,104,209,108, 54,123,228,146, 37, 75,120,137,137,137,200,201,201,209, 56,211, 67, -165, 82, 97,238,220,185, 70, 92, 46,119,164,190,166,123,129, 64,208,251,245,235,215,141, 43,126, 50, 50, 50,132,218, 62,133,181, - 69,104,104, 40,225,239,239, 79,251,251,251,211, 26,193,101,128, 1,149,161, 10, 45,178,175, 42,139,214,199,176,138,105, 44, 91, - 80, 7,136,212, 2, 26,145,213, 85, 75,120, 17, 26, 11,151,110, 67,135,110, 67, 91, 58,216, 88,223, 56,188,107,149,105,216,115, - 2,169, 41, 73,200, 22, 36,163, 77, 7, 63,196, 62,143, 6,165, 80,157,198,235,208,154, 61, 57,235,249,187,123,120, 52,157,222, -181,131, 23,130,194,138,241, 42,242, 50, 10,178, 5, 59,145,116,234,244, 71, 57, 66,174,254,205, 29,236,173,111,252,186,107,149, -229,165, 24, 18, 41, 41, 73, 56,251,235, 86, 90, 33,151, 22,160,124, 36,151,222,111,205, 70,148,140, 83, 92,144, 9, 89,145, 10, - 60,178,132,167,231, 32, 69, 6,128,240,173, 91,183,118,111,223,190, 61, 39, 32, 32, 32, 35, 63, 63,255, 44,128,251, 90,109,154, -185,187,187,247, 13, 14, 14,118, 72, 73, 73,193,181,107,215, 50, 80, 26,250, 95, 21, 82,111, 71, 63,223,253,231,175,251,231, 27, - 53,104,130,237, 75,190, 83,134, 62,138, 25, 0,224,146, 86, 27,143, 30,222,238, 97,107,190,159, 65, 82, 81,127,224,105,114, 38, -222, 10,165,127, 86, 69,152,147,147, 67,148,148,148,184, 90, 90, 90,106,159,144,224,155,136,164, 11,134,186,167,247, 92,120,199, - 73, 34, 87,129,203, 34,233,217, 3, 93,211, 31,158, 13,181,201,145,228, 16,154,104,196,154, 48,105, 88,143,129,187, 66,206,140, - 14, 11,187, 48, 93, 46,149,120, 53,105,210,152,126, 28,113,227,233,194,185, 83,251,212,242,136,155, 62,124,248,144,100, 48, 24, -229, 4,186,182,133, 72, 95, 75,145, 62,208,149,179,162,208,210, 64,169, 84, 18,181,229,148, 74,165,101, 66,171,226,195,189, 50, -193,248,119,108,191, 62, 22, 42,237, 33, 67,141, 63,157, 68, 34,177, 87,251,108, 57,124, 76,139,214,135, 68, 34, 86, 55,124,169, - 79,255, 72,146, 4, 69, 81, 96,179,217,104,209,162, 5,194,194,194, 96,109,109, 13,115,115,115,152,155,155,195,200,200, 8, 54, - 54, 54,101, 66,139, 36,117,142,210,161,165, 82,105,221,186,117,235,226,245,235,215,224,241,120,101, 31, 46,151, 11, 79, 79, 79, -136, 68,162, 58,248,148,182,123, 3, 12,248,123,239, 43, 97,218, 98,137, 32,136,176, 69,139, 22, 45,169, 45,223,162, 69,139,150, - 84,102,225,250, 64,193, 85,206,186,197,212, 86,144,149, 42, 73,181,200, 58,180,115,165,249,153, 39, 64,106,106, 34,174,158,220, - 81,164,144,203,242, 41, 74,225,250, 54, 62, 26, 32,241,139, 78, 93, 32,233,118, 3,251,118, 35,174,190,144,161,176, 32, 27, 47, - 31, 95, 78,130,152,179,248,163,137, 44, 7,219, 27,135,119,173,180, 60,255,156, 64, 74, 74, 18, 46, 29,219, 94,168,144,203,123, - 32, 49,244,241,135, 80,143,100,179, 7,178, 93,222,245,155,232,155, 14, 21,161,194,200,216,184, 47,179, 50, 48, 80,112,167,250, -200, 48,109,100,103,103,159,221,186,117, 43,241,227,143, 63,118,149, 72, 36,191, 1,208, 54, 81,122,185,185,185, 13,223,183,111, -159,117, 74, 74, 10,235,206,157, 59,162, 27, 55,110,208, 0,206,215, 96,113, 89,208,115,252, 52, 70,171,122,117,102, 70, 37,165, - 13, 0,240,135,214,108,207,126,173,155,221, 61,184,126,185,153,226,110, 40,138, 5, 41, 88,124, 55,181, 16,128,206,251, 91,161, - 80, 64, 40, 20, 66, 81,156,171,108,195, 23, 9, 3,135,216, 75, 51,243, 37, 76, 22, 85,162,244, 48,207,146,222,200,125,203, 48, - 54, 54,214,107, 95,238, 90, 63, 63, 4, 64,200,144, 33, 67, 14, 63,139,184,208,134,207,231, 95,240,240,240, 32, 0,160,138, 8, -195,170,176, 10,192,220,142, 29, 59, 18, 62, 62, 62, 15,182,109,219,118,165, 58,177, 82, 27,139, 86, 77,208,149,147,162, 40,178, -138,253, 75,212,150, 83,219,162, 85,147,208,250,148, 22,173,202, 68,139,182, 72,212, 22, 66,255,134,168,195,234,196,148, 62,253, -211,248,201,177,217,108, 68, 71, 71,195,197,197, 5,114,185, 28,102,102,102, 48, 51, 51,131,169,169, 41,138,138,138,192, 98,177, -160,231, 54, 83, 60, 30,239, 93, 76, 76, 76, 99, 59, 59, 59,168, 84,170,114, 98,235,213,171, 87, 48, 49, 49, 73,211,215,162,197, -231,243, 47,171,163, 14,203,193,209,209,209,226, 99,236, 87,109, 75,150,191,191,191, 97,136,208,128,106,173, 89, 85, 88,181,178, - 43, 88,162,100, 90,255,179, 81,154,195,173,159,250, 55, 42,249, 45,171,100, 90,238,250,245,235,111,104,249,119,101,127,224, 38, -104, 82, 60,148,139,112, 97,214,100,201,178,183,182,186,113, 96,123,160,249,201, 72, 32, 45, 37, 17,183, 78, 7, 11,149, 42,249, - 23,160,104, 65,196,181,211,161, 32, 80,130,183,161,183,116,187, 69,160, 85,171,166,174,248,253,133, 2,217,169,175, 64,211,212, - 33,100,133,148,124,240,209,113, 27,212,194,222,218,246,198,161,224, 64,139, 51,209, 4, 82, 83, 18,113,245,100,112,161, 82, 81, -210, 29,137,167, 35,107, 75, 59, 1,176, 98,152,240,118, 15,246,107, 53,212,213,205, 25, 20,173, 0,197,166, 49,104,129, 45,243, -101, 84,201,239,225, 60,225, 73,170,152,154,158,118, 95, 55, 7,186,226,226,226,223, 1, 60, 70,249,244, 10,205, 27, 53,106, 52, -116,247,238,221,118,169,169,169,188,168,168, 40,241,222,189,123,179, 40,138, 58, 3, 64,151,161,212,239,162,146,210, 14,160,124, -190,156,230,243,199, 7, 68, 4,140,155,200, 75,188, 22, 2,171,196, 88,124,127, 55, 93,245, 50, 95, 54, 66,109, 93,171, 20,182, -182,182,116, 78, 78, 78,114, 65, 65, 65, 99, 19, 19, 19,228,230,230, 34, 47, 47, 15, 66,161, 16,210,194, 60,165,141,170, 64, 68, - 40,243,192, 98,177,144,149,162,128, 74,165,202,208,213,154, 5,192,106,213,170, 85,147, 40,138,210,100, 68, 44, 23, 93,168,213, - 78,115, 62, 52, 30, 50,100,200, 97,173,168, 67,109,103,120, 77,122, 7, 66,157,222,161,253, 31,127,252, 17,215,167, 79,159,212, -202,196, 10,151,203,213,219, 81,186,170, 40,198,218,112, 86,101,209,170, 56, 93, 31, 78,205,240,165,198, 9,190,226,116, 13, 24, - 12, 6, 40,138,130, 14, 65, 21,127,171,104,209,142, 14,172,141,200,169,112,108,170, 77, 28, 90,203, 72,196,143,106,209,210, 28, - 11, 54,155,141,115,231,206, 97,220,184,113, 80,169, 84, 48, 54, 54,134,169,169, 41, 76, 76, 76,112,250,244,105,104,210, 63,232, -163, 95, 21, 10,197,145,245,235,215, 47,217,179,103,143, 17, 77,211,224,112, 56,101, 66, 43, 48, 48, 80, 44,151,203,143,232, 36, -180, 52, 25,223, 41, 58,198,196, 68, 89,109,212, 97,101,203, 84,225,175,101,185,106,213,170, 49, 20, 69, 13, 68,133, 20, 14, 21, -218,149, 75,253, 96, 72,239, 96,128, 14,247,147, 71,255,226,238,105, 4, 22,161,101,201, 42, 19, 92,100,117,226,197,206,202,242, -198,254,237,129,230, 71, 31, 17, 72,124,251, 22, 55,127,219, 81, 42,178,222,156,124,130,228,208, 76, 36,134,118,198,219,208,222, - 58,191, 61, 17, 68, 43, 39,123, 75,228,137, 40, 20,230,188, 3,104, 68,125, 12,145,101,103,101,119,227,231,224, 64,139, 83, 79, - 72, 36, 38, 38,226,234,201, 29, 66,165, 82,242,197,135,136,172,145,108,246,192, 70,238,206, 9, 75, 39, 13, 28,234,211,208, 17, - 54,239,226,112,126,236, 80,172, 62,254, 13,204,236, 24,104,215,215, 12, 19,214, 58, 14,229,123,114, 95,243, 59, 99,160, 30,212, -218, 34,171, 85,253,250,245,135,222,191,127,223,214,219,219,155, 23, 31, 31, 47,217,187,119,111,150, 88, 44,190, 2, 32, 90, 15, - 78,109,145,213,106,209,228,177, 17, 27,247, 31,230,145,108, 14,130,142,156,199,172,219,169,170, 11,201,133, 67, 80,126, 88,177, - 82, 72,165,210,107,193,193,193, 82,146, 36,145,151,151,135,156,156, 28,100,101,101,149,125, 23, 20, 20,128,193, 96,224,250,245, -235,178,194,194,194,251,186,118,240,222,189,123,245,211,210,210, 60, 4, 2, 65, 27,245, 39, 30,165,209,133,166, 90,211,218, 8, - 4,130,174, 0, 30,105,166,167,166,166,214,123,240,224, 1,191, 38,126, 51, 51, 51,176,217,236,114, 22, 45, 46,151, 11, 7, 7, - 7, 40,149, 74,156, 56,113, 2, 0,242,170,227, 96,179, 57, 2,146, 36, 64,209,148,148,199,227, 81,124, 62,191, 82,129,165, 15, -167, 26,169, 95,126,249,165, 36, 50, 50,178, 82,139, 86,109, 56,105,154, 46,233,213,171, 23,210,211,211,193,227,241,202, 30,214, - 26, 65, 69,146, 36,184, 92, 46, 50, 50, 50, 48,101,202, 20,208, 52, 93,242, 79,223,121,180,125,154,212, 98,136, 0, 64,168,133, -208,123,126, 90,186,250, 64,105,134, 6,105,154,134, 70,112, 85,152, 95,182, 46, 93,178,183, 87,240,233,154, 92, 80, 80,176,177, -180, 59,244,222, 10,223,251,244,120, 40,148, 9,173,216,216, 88, 28, 62,124, 24, 5, 5, 5,224,112, 56,200,207,207,199,193,131, - 7, 17, 19, 19, 3, 14,135, 3,205,190,208, 85,191,249,248,248,108, 12, 15, 15,143, 25, 49, 98,132, 56, 58, 58, 26, 98,177, 24, -209,209,209,232,221,187,183,228,238,221,187, 9, 98,177,120, 21,116, 25, 58,212,100,124, 87,151,215,145, 74,165,136,138,138,170, -244, 83,213, 50, 21,145,144,144,224,170, 82,169, 26,211, 52,237, 75,211,180, 57,212, 41, 28,212,255,181, 63, 95,170,231,153,211, - 52,237,171, 82,169, 26, 37, 36, 36,184, 26,228,132, 1,159, 41,110,105,137, 45, 90, 75,100,221,170,222,162, 69,145,193, 7,118, -172, 52, 63,242,144, 68, 74,114, 2, 30, 95,220, 45, 84, 81,138, 47,244, 44,135,211, 3, 90,185, 54,120, 70, 38, 94, 20, 81, 26, -206, 92,152,147, 2,208,140,218, 8,173,114,156,160,200,224,131, 59, 2, 45,142, 61, 38,144,158,242, 6,119,207,238, 18, 42,149, -210,238,120, 27, 26, 85, 27,206,145,108,246, 50, 22,131, 88,218,171, 83, 75,118,231,150,238, 48,201, 74, 66, 70,106, 58, 78,196, -102,231, 37,228, 75, 39,222, 37,228, 72,126, 35, 61,208,119,146,181,181,149, 35, 11,253,166,218, 88,223, 63, 95,248, 59,193, 18, -201,105, 57,189, 94,112,183,172, 44, 69,249,126,190, 15, 71, 51, 51,179, 17,143, 31, 63, 54,231,241,120, 70,143, 31, 63,166,246, -238,221,155, 43, 22,139, 47, 2,136,208,105,219,223,135,115, 91,119,183, 91,235,118,237,231, 21,139, 74, 32,146,201,193,117,224, -171,206, 68, 60, 31,140,170, 19, 96,150,227,228,114,185,199,142, 29, 59,214,183, 75,151, 46,174, 94, 94, 94,100, 94, 94, 30,138, -139,139,203,156,171,237,236,236, 16, 27, 27, 75, 37, 38, 38,166,115,185,220,227,186,246,179, 99,199,142,137, 36, 73,198,171,135, -209,226, 81, 33,186, 80,171,105, 99,129, 64,208,150,207,231,223, 2, 96,172, 21,117,168,205,169, 73,239,176, 4, 0, 73, 16,196, -163,232,232,232,226, 62,125,250,192,200,200, 8, 34,145, 8,117,235,214,133, 82,169,196,197,139, 23, 17, 25, 25, 41,162, 40,234, - 86, 37,226,181, 92, 63, 37, 18,113, 93, 0,164,184,164,164,197,152, 49, 99,186,206,155, 55,175, 92, 72,186,189,189, 61,172,173, -173,245,226, 4,128,188,188,188,166,127,252,241,199,156,232,232,232,239,250,246,237,107,177,100,201, 18,110,253,250,245,161, 82, -169,200,218,114,230,231,231, 91, 68, 69, 69,109,234,220,185,243,140, 62,125,250, 48,215,173, 91, 7, 11, 11, 11,168, 84, 42, 24, - 25, 25,161,176,176, 16,171, 86,173,194,157, 59,119,148, 52, 77,239, 18, 10,133,223,235,121, 46,225, 67,175,205,170, 44, 64, 85, -165,100,168,162,253,223,222,207, 10, 62, 93, 80,167,112, 88, 88, 69, 6,123,232,122,206,107,132, 22,131,193, 64, 82, 82, 18,246, -238,221,251, 94, 30, 45, 77,250,135, 42,184, 43,219,118,250,230,205,155, 42,130, 32, 58, 60,126,252,120,225,232,209,163, 39,138, - 68, 34,103, 19, 19,147,116,133, 66,241,139, 88, 44, 94,139, 82,127, 84,182, 62,247, 16,145, 72,148, 92, 89,212, 97,197, 54,128, -101,181,156, 21,210, 59,148, 75,225, 80, 97,153,114,169, 31, 42, 73,239,240,183, 31,119, 3,231,191,146,243,115, 23, 91, 85, 39, - 44,125, 15,173, 38,179, 88, 98,133,119,120, 2,241, 33, 34,235,125,107,137,164, 36, 97,249,177,119, 45,101, 82, 9, 68,194,204, -151, 72, 58,145,245, 65,155,165,238,231,237, 4, 2, 73,137,111,240, 48,108, 87,105, 63,223,134,214,186,159, 4,176,248,167, 75, -161,108,194,194, 26, 79,231,140, 67,122,129, 8,151,222,230,159,164, 75,164,211,143, 0,249,184, 3,144, 74,105,248,193, 31, 50, -118,251, 14,178, 24,106, 91,135,133, 45,243,127, 1,111,145, 13,187, 93,247, 46,250,212, 64,204,224,241,120,225,219,183,111,239, -225,235,235,203, 29, 50,100, 72,101, 14,242,250, 34,245,209,171, 55, 63, 93,216,179,121,190,141,119,123,236, 92,182, 64,117, 44, -226,121,197, 40,196,106,225,225,225,161,186,119,239,222,188, 41, 83,166,108,233,209,163,135,211,128, 1, 3, 56,117,235,214, 5, -151,203,197,155, 55,111, 16, 30, 30, 46,123,251,246,109,122, 73, 73,201,188,230,205,155,235,147,227, 44,127,249,242,229, 27,213, -235, 32,212,195,133,109,160,142, 46,212, 52, 82, 39, 45,109, 3,192, 56, 48, 48,112, 52, 0, 84, 17,246,189, 28,192, 30, 0, 76, -154,166, 51, 66, 66, 66, 58,156, 61,123,182,195,220,185,115,217,125,251,246,197,253,251,247,113,245,234, 85,185, 92, 46,143, 80, - 11, 87, 93, 75,229, 80, 0,162,148, 74,229,243,160,160,160, 14, 12, 6, 99,185,102, 70, 76, 76, 12, 14, 29, 58, 84, 27, 78, 37, -128, 77,153,153,153, 63,133,132,132, 44,191,118,237,218,248, 49, 99,198,152, 43, 20, 10,196,198,198,226,231,159,127,174, 21,167, - 80, 40,156, 99,107,107,187,244,226,197,139,191, 92,185,114,229,235, 81,163, 70,145,179,102,205, 66,112,112, 48,126,251,237, 55, - 74,165, 82,157,101,177, 88, 99,114,114,114, 68,159,226,174,163, 30,134, 75,215,179,214, 97,141,188, 31, 50, 52,168, 35, 4, 31, - 74,160,217, 14, 63, 63,191, 50, 43,163,198, 10,167,221,134, 32, 8,189,135, 14, 1, 88,210, 52, 77, 1,216,133,210,250,162,218, - 89,225, 25,248, 43,115,188,174,140,205, 4, 82,203, 24, 72, 17, 91,125, 81,105, 75,128, 70,179, 26,216, 10,150, 47, 95,190,117, -197,138, 21, 91, 43,166,112,208,110, 84, 49,245,195,202,149, 43, 97, 72,239, 96,192,127, 21,149, 11,173,168,125, 10, 69,131,193, - 75,182,175, 91,176, 66,169,144, 9,105,200,253,241,230,116,244,135,174,140,166,232, 69,215,143, 6, 6,131, 70, 62,173, 82, 46, -252,224,222,255, 77,253, 36, 44,172, 81,180,106, 26,126,123,145, 78,103,136, 20,223, 28,145,203,203, 89,131, 74,125,178,168, 97, - 55, 36,249, 39,172,156, 88,103,230,124, 97, 67, 92,200, 27,173,247,122,178,178,178,206,109,221,186,149,220,188,121,115,215,146, -146,146,138, 14,242,181,197,130,254, 51, 23, 49,218, 53,114,157,249,240,117,242, 64,232, 48, 92, 88, 17, 29, 59,118, 20,196,197, -197, 5, 92,185,114,101,196,237,219,183,123,136, 68, 34, 87,130, 32, 96,108,108,156, 44,149, 74,175,113,185,220, 99,122,138, 44, - 0,192,138, 21, 43,232,149, 43, 87, 18,113,113,113, 52,131,193,248, 19, 64, 34,131,193, 72,210,118,130,215,158,174, 89, 38, 48, - 48, 80,151, 7,226,237,226,226,226,200, 85,171, 86,117, 89,181,106, 85, 11,181, 85,232, 54,254,242,249,210, 23, 10, 0,183,217, -108, 78, 58, 65, 16,206,108, 14, 87,116,239,222,189,107, 31,200, 89, 34,151,203, 23,166,164,164,108,217,178,101,203, 90, 19, 19, -147,182, 49, 49, 49,127,126, 8,167, 90, 68, 13,182,182,182,118, 58,124,248,240,169,131, 7, 15,182,103, 50,153,247, 9,130, 24, - 34, 20, 10, 63,105, 81,105,117,129,232,149,122,212, 58,212,137,247, 99, 39, 41,253, 59,132,155, 74,165, 42, 94,186,116,105, 86, - 69,225, 85,209,122,165,249,175, 78,229,162,203, 62,213, 39,138,178, 6,225, 66, 20, 3, 64,105,237,194,210,178, 58,186, 22,149, - 6, 32,174,233, 58, 39, 73,242, 44,128,151, 36, 73,190,174, 24,232,162, 61,111,229,202,149, 53, 93,231, 6, 24,240, 89, 67,135, - 59, 91, 32, 9, 4,214,214,147,246, 31, 52, 87,126,156,126, 6,176,217, 43, 73, 96, 62, 0,130, 6,182, 28,145,203,127,168,110, - 65,199,142, 88, 75, 19,152,171,222,153,235, 50,238, 98, 77, 45,182,189, 14,116,168, 63,168, 39,103, 19, 84, 95, 80,246, 61, 78, -127,127,127, 70, 21, 15,243,114, 69,165,171, 66,104,104, 89, 22,255,170,250,169,125,190,153, 61,120,240,192,201,199,199, 71,128, -242, 78,255,149, 77,167,245,220,118, 6, 0,213, 71,222,159,159, 5,167,155,155, 27,231,205,155, 55,178,127,215,181,105,224,252, - 87,114, 90, 54,117, 1,129, 73,208,206, 29, 84,173, 69, 75, 75,160,209,244,207, 40,136, 77,169,162,159,154,235,220, 50, 33, 33, -193,181, 97,195,134,201, 0, 10, 42,244,163,178,121,180,225, 24,253,223,115, 86,134,201, 40, 95,138,206,128, 74, 14,132,129,211, -192,105,224, 52,112, 26, 56, 13,156, 6, 78, 3,103,109,133,214,103, 13, 18, 6, 24, 96,128, 1, 6, 24, 96,128, 1, 6,252, 45, - 32,170, 81,165,250,152, 4,107,163,108,175, 25, 56, 13,156, 6, 78, 3,167,129,211,192,105,224,252,191,227,172,137, 91,123,249, -207,117,232,240, 31,235,183,193,172,106,224, 52,112, 26, 56, 13,156, 6, 78, 3,167,129,243, 67, 4,203,103, 13, 38, 12, 48,192, - 0, 3, 12, 48,192,128,207, 6, 61,220,193,103,170, 64,254,241, 70,167, 32,170, 26,209,199, 13,117, 0,224, 99,241,253,159,130, - 15,224, 43,173,255, 23,160,142,140, 55, 8,173,207, 23,141, 0, 44, 1,160, 93,139,236, 33,128,245, 21,218, 29, 5,160, 93,144, - 80,132,210, 58,129,175,245, 89, 25, 73,146,235,187,116,233, 50,253,206,157, 59,155,149, 74,229,170, 90,244,215,149,207,231,111, - 36, 8,162, 53, 0, 22, 65, 16,111, 50, 51, 51,215, 43,149,202, 15,137, 90,105,224,232,232,184, 1, 64, 75,146, 36, 89, 4, 65, - 36,100,102,102,174, 81, 42,149, 55, 63,128,211,204,193,193,161, 19, 77,211,142, 0, 24, 44, 22, 43, 55, 45, 45,237, 1,106,153, - 91,201, 63, 48,150, 93, 40, 82,178, 0,192,220,132,169, 8, 13,108, 42,215,117,154,225, 20, 55,192,128,255,111,208,165,145,201, -229,208,219, 13,107,105, 37,190, 87, 1, 68,175,250,216,113, 57, 17,223, 87,181, 60, 81, 73, 84,115, 69,206,222,110, 88,171,162, - 75, 57,122,185, 97,211,229, 55,168, 54,210, 94, 23, 78, 13,246, 1,228,100, 29,170, 20, 16,186, 69, 95,255,219,241, 21,202, 15, - 21,150, 13, 29, 86, 43,180,134,185,131,175, 98,130, 25, 26, 11, 77, 24,175, 25,128, 22,234,135,252,107,148,230, 42, 42,250,192, -206,125, 46,156,255, 54, 44,167,105, 58,160,220,201, 90, 73, 30,162, 47,190,248, 98,192,149, 43, 87,140, 53,245,238, 40,138,130, -145,145,145, 18,192, 88, 61,214,101, 63,108,216,176, 69, 7, 14, 28,192,208,161, 67,151,134,133,133,109, 5, 80,172,235,194, 86, - 86, 86,254,150,150,150,193,251,247,239,183,107,223,190, 3,193,225,112,240,230, 77,130,243,148, 41, 83,188,226,226,226,206,102, -101,101, 77,212,119,227,173,173,173, 71, 90, 90, 90,110,217,187,119,175,109,231,206,157, 65, 16, 4, 34, 35, 35,157,231,204,153, -211,226,221,187,119,199, 51, 51, 51,103,232,203,105, 99, 99,227,110, 97, 97,209,109,231,206,157, 70,157, 58,117, 2,143,199, 67, -116,116,180,233,212,169, 83, 29,211,210,210, 98, 51, 51, 51,111,233, 43,178,158, 69,158,255, 90, 41,151, 6, 1, 0,147,205, 93, -208,126, 75,196,249,103, 55,206,247,175,105,154,127, 96,236,239, 6,177,101,128, 1, 6,104, 99,164, 19, 28,105, 26,243,175,252, -188,140, 4,128, 94,227, 87,207, 26,233,132,205, 71,210,171,174, 97,171, 39,223,247, 99,234, 32,248,112, 26, 50, 63,164,159,251, - 0,114, 14,147, 57,171,157,143,143,237,183,119,239, 38,200,129, 95,254, 79, 14, 81,165,195,156, 85, 10,173,193, 77,177, 74, 89, -106, 49, 33,250, 52,196,241,171,137,140,240, 47,190,248,162,225,132, 9, 19,136, 86,173, 90, 33, 50, 50,210,253,248,241,227, 95, - 93,184,112, 33, 65,165, 82, 69, 2,120, 1,221,179, 90,179, 0,120, 50, 24,140,214,255,114,206,127, 51, 76,212,226, 42, 19,127, - 37, 58,125, 47,225,233,245,235,215,207, 49,153, 76,141, 69,171,157, 72, 36,114,168, 96, 5,211, 5,245, 20, 10, 5,226,227,227, - 65,146, 36, 11, 64,125,188, 95, 82,163, 42, 56, 27, 27, 27,239,142,120, 24,105, 67, 48,141,144, 47, 1, 32,145,131, 99,234,128, - 3,135, 66,172,231,205,158, 49,248,230,205,155,225, 69, 69, 69,191,234,209,159,250, 38, 38, 38, 91,159, 62,125,106, 99,108,108, - 12,138,162, 80, 84, 84, 4, 71, 71, 71,236,223,191,223,114,222,188,121, 1,133,133,133, 55, 37, 18,201,111,250,136,115, 11, 11, -139,110,207,159, 63, 55,210, 20,148,150,201,100,112,118,118,198,209,163, 71,185,179,102,205,106, 90, 80, 80,144, 42,147,201,222, -234, 74, 88, 40, 82,178,148,114,105,208,225, 93,129, 46, 0, 48,102, 70, 96, 16,167,200,252,162, 46,211, 10, 69,202, 11, 0, 12, - 66,203,128,127, 26,173,109,109,109, 67,115,114,114,110, 1,152,136,143, 99,105,112,231,241,120,205, 41,138,114, 36, 73, 18, 12, - 6, 35, 67, 36, 18, 61, 5,240,170,182,132, 54,110,126,253,193, 53, 30, 7,154,106, 65, 2, 32, 72, 50, 90, 37, 47, 57,148,251, -234,230,249, 15,226,228, 24,141, 7,232, 22, 36, 64, 17, 36,249,148, 82,150,236,207,137,191,121,233,223,114,112,238, 11,209,216, -205, 81,247,194,152, 31,131,111,120, 3,240, 73, 10,228,209, 36,221,135, 21,103, 2,125,103,207,158,237, 56, 99,250,116, 98,220, -216,177,141,110,221,185, 67,116,213,167, 90,193,231,137, 42, 29,223, 43, 21, 90,254, 77, 97, 69, 3, 11,143, 7, 47, 33,153, 12, - 6, 49, 98,246,250,128,131,187, 54,145, 61,251, 15, 41, 27, 62,241,245,245,133,175,175, 47, 17, 20, 20,212,232,207, 63,255,108, -116,244,232, 81,101, 68, 68,196, 83, 0, 39,170, 90, 89,111, 55,136, 41,128,199,102, 49, 69, 35,150,253,186,215,199,199, 7, 92, - 46, 23, 31,194, 9, 0, 61, 27,146,111, 89,214, 13,158,142,152,185, 60,185,125,251,142,244,199,224,252,140,240, 16, 40, 43,106, -109,229,226,226,210, 73,169, 84,242, 0,128,201,100, 74, 82, 82, 82,102,162,180, 54, 32, 0,156,165, 40,106,128, 30,220, 36,128, - 21, 3, 6, 12, 88,250,237,183,223,162,110,221,186,152, 53,107, 22, 20, 10, 69,228,165, 75,151,150, 3,216,128, 26, 46, 30,123, -123,251,229,187,119,239,182,102,114, 76,208,106, 97, 34, 4, 5, 74, 0,128, 41, 23, 56, 55,141,198,172, 89,179,204, 31, 63,126, -188, 70, 31,161,101,111,111,191,106,255,254,253,214,198,198,198,160,105,186,172, 22, 99,113,113, 49,138,139,139, 49, 99,198, 12, -243,216,216,216,141,250, 8, 45, 7, 7,135, 78, 59,119,238, 52,226,241,120, 40, 46, 46,102,203,229,114,162,168,168, 8, 37, 37, - 37,180, 76, 38,147,207,156, 57,147,251,226,197, 11, 63,129, 64,240, 22, 6,252, 91,192, 0,240, 13,139,197, 26,212,176, 97,195, - 54,175, 95,191,126,162, 84, 42, 79, 3, 56,253, 17, 94,166,186, 59, 57, 57,173, 77, 79, 79,223, 9, 32,228,255,101,135, 58, 56, - 56,156,190,119,239,158,203,238,221,187,199,110,222,188,249, 34,128,223, 62,128,142,205,102,179, 7,119,237,218,213,101,204,152, - 49, 28, 7, 7, 7, 72,165, 82, 36, 38, 38,154,159, 60,121,210, 53, 58, 58, 58, 85, 93, 17, 67,231, 23, 10, 27,247,142,166, 96, -154, 31,239,208,177, 83,231,161,131,191, 49,115,176,177,128, 88,166,194,235,100, 65,221, 63, 46,158,235, 26,199, 54,186, 39,151, - 11,135,231,190,186, 87,172, 47,103,183,110,221, 59,247,232,222,221,204,194,210, 2, 66,145, 28,111,146,210, 92,111, 92, 61,239, -203,100, 26,221,166, 8,197,168,172,231, 87, 75, 62,229,177,153, 5, 48, 69, 60,155,230, 45, 58,182,122,220,107,194,154, 54, 52, - 77,131,164,177,163,162, 53,107, 22,192,220, 81, 90,246, 75, 47, 62,208, 52, 77, 16,216,164,109,205,234,237,134,181, 52,141,239, - 65,130,232, 93,195, 48,165, 6,189, 0,174,165,181,181,207,212,201,147,137,162,194, 66, 68, 71, 71,151, 84, 20, 89, 91,235,128, -125,155, 68,189,179, 41,181, 23,219,255, 82,107, 86,165, 67,135, 58,231,209, 50, 54, 54,174,116,186,133,133, 5,186,117,235,134, -245,235,215, 51, 1,180,174, 48,187,124,145, 85,128, 27,182,103, 49, 44, 76,184,100,221,186,117,205,204,205,205, 63,152, 19, 0, - 64, 83,245, 59,214,165,191,124,244,235,146,177,215,142,110,241, 20, 21, 21,176, 42, 54, 49, 53, 53, 69,227,198,141,177,116,233, - 82,221, 56, 63, 28,255, 40,167,163,163, 99, 19, 95, 95,223,214,215,111,221,178, 76, 79, 79,231,166,167,167,115,175, 92,191,110, -217,161, 67,135,214,142,142,142, 77,202,118, 21, 77,235,211,207,213,187,118,237, 90,126,246,236, 89,210,215,215, 23, 86, 86, 86, -232,214,173, 27, 46, 94,188,200,220,188,121,243, 58, 0, 75,107,234, 39, 73,146,157,125,125,125, 9,208, 52, 50,132, 74, 60, 88, -223, 4,209,155, 60, 80, 36,161,145, 39, 44,132, 88, 44,129,177,177, 49, 15,165,195,189,186,110,123,199, 14, 29, 58, 16, 0,202, -196, 85, 81, 81,233,167,184, 88, 4,153, 76, 14, 46,151,107, 6,128,167, 43, 39, 77,211,142,157, 58,117, 2, 0,200,229,242,178, - 55,188,130,130, 2, 66, 40, 20, 66, 38,147,129,197, 98,177, 81,179, 95, 99, 25,167,185, 9, 83,193,100,115, 23,140,153, 17,152, - 50,102, 70, 96, 10,147,205, 93, 32, 51, 43, 84,233, 50,205,220,132,169,248,196,231,167, 29, 73,146, 63,187,185,185,197,146, 36, -121, 24,128,227, 7,114,182, 5,176,206,200,200,232,154,135,135, 71,138,177,177,241,117,181, 80,239, 80, 75, 78,142,177,177,241, -245,117,235,214,157,122,242,228,201,208, 63,255,252,179,254,179,103,207, 6, 7, 5, 5, 29, 55, 53, 53, 13, 71,121,191, 68,189, -175,205,250,245,235, 31,124,240,224, 65,219,142, 29, 59, 30, 0,192,253, 72,215, 59, 3, 64, 75,232, 84,145,227,147, 28,119,167, - 86,173, 90,185,240,120, 60,244,232,209, 3, 0,252, 62,132,147,205,102, 15, 94,186,116,169,219,178,101,203, 56, 2,129, 0,215, -175, 95,199,195,135, 15,161, 84, 42, 49,109,218, 52,238,152, 49, 99, 26,152,153,153, 13,214,171,159, 76,243,227,179,231,204,237, - 51,127,214, 36,179,167,239,228, 56,116,237, 29,126,143, 16, 32,171,132,131,254,131,199, 88,244, 30, 56,172, 55,135,107,113, 92, - 95,206, 69, 11, 23,246,153, 60, 62,192, 44, 70, 64,225,220,253, 12,220,143, 23, 66,201,178, 68,223,193, 19,173, 90,116,234,243, - 21, 19,172, 95, 62,245, 49,218, 15,180,159, 61,123,182,221,130, 77, 71,238, 58,181,253,102, 71,118, 62,124,181,133,143, 59, 96, -105,109, 98,242, 77,124,215,174,147,140, 74,235,197, 86,203, 89,142,175,245,192,224,172,124,116,209,246,207,234, 98,141, 70,234, - 97, 69,198,149,159,151,145, 52,129, 89, 35,157,202,221, 7, 42,237,231, 77, 96,232,236,185,115, 89, 22, 86, 86,216,181,107, 23, -164, 34, 81, 57,159,217,238, 46,232,115,205,152,153,218,192,195, 57,182,155, 43, 17,254, 31,124, 95,153, 92,165, 69, 43, 44, 44, -140,238,215,175, 31, 1, 0,161,177,200, 31,220, 20, 27,135,125,187,110, 41, 65, 18,116, 61,207,142, 49,117,220,154,137,108,108, -108, 80, 82, 82, 2,169, 84, 10, 54,155, 13,137, 68,130,119,239,222,225,254,253,251,176,178,178,210,171, 39,133,133,133, 48, 53, - 53,133,169,169,233, 71,225, 92, 60,182, 7,247, 77, 74, 54,247,242,253,155, 93,183, 79,255,173,189, 91, 75,191,103,221,135,205, -122,110,110,231, 36,121,246,236, 25,238,221,187,135,252,252,124,248,248,248,252, 87, 14,230, 67,181, 79,214, 67, 0, 86, 13, 27, - 54,116,190,124,237,182, 85,177,132, 50, 79,202, 84,176, 40,138,130,177, 49, 95,121, 34,244,156,112,232,224,254, 68, 70, 70, 70, - 22,128,135,106,113, 91, 83, 77, 69, 30,128, 38,254,254,254,139,166, 79,159,142,132,132, 4, 76,154, 52, 73,252,240,225,195,220, -142, 29, 59,218,236,223,191,223,104,222,188,121,184,117,235,214,138,176,176,176, 51, 0, 18, 1, 84, 90,171,141,166,105, 54,155, -205,134, 82, 45, 27,228, 42,170, 76,223, 23, 22, 22,130, 22,231,131,205,102, 51, 0,216, 65, 71, 63, 58,138,162,216, 44, 22,171, - 76,100,189,203, 44,196,187,172, 18, 20, 22,203, 32, 22, 43, 33, 19,211, 96, 24,219, 48,129, 36, 7, 0, 73, 80,170, 87, 0, 0, - 0, 32, 0, 73, 68, 65, 84,186, 90, 71,120, 60, 30,148, 74, 37,138,138, 74,187,161,177,148,201,100, 50, 8,133, 66, 48, 24, 12, - 83, 0,230, 0,242,116, 33, 84, 59,185,255,174, 30, 6,196,163, 35, 3,108, 95, 95, 88, 92,110,154,185, 9, 83, 17, 58,175, 41, -195,198,185,197,157,150, 67,127,241, 40,155,246,105,253,179,184,118,118,118, 55, 78,157, 58,213,180, 81,163, 70, 72, 76, 76,244, - 24, 50,100,136,143, 64, 32,104, 9,253,107, 50, 26,147, 36,185,113,204,152, 49,211, 71,140, 24, 65,184,187,187,131,201,100, 66, -169, 84, 58, 39, 36, 36,116, 59,121,242,228,194,131, 7, 15,238, 87,169, 84,223, 65,119,191, 63,146,195,225,156,216,187,119,111, - 23, 31, 31, 31, 28, 62,124, 24, 15, 31, 62,164,218,182,109, 75,142, 30, 61, 26,174,174,174, 62,163, 71,143,254, 93, 42,149,246, -173,165,101,203,181, 67,135, 14, 46, 12, 6, 3, 29, 59,118,100,223,187,119,175, 21,128,123, 31,184, 79, 77,157,157,157,111,249, -249,249,181,188,118,237, 90, 84, 70, 70,134,159, 30,219, 11, 0, 3,157,156,156,130, 44, 44, 44,172,244,184,199,150,164,165,165, -125, 15, 32, 84,199, 69,218,183,110,221, 26,201,201,201,104,210,164, 9,216,108,118, 7,185, 92, 62, 5, 64, 31, 0, 63, 0,136, -213,163,191,238,221,187,119,119,241,243,243, 35, 66, 67, 67,203,252, 67, 73,146,132, 82,169, 4,155,205, 70,251,246,237,201,200, -200,200, 58,143, 30, 61,114,135, 14,195,136, 54,110,126,253, 59,118,238,218,185,139, 79,115,114,115,232,107,168, 40, 21, 24,132, - 18, 76,130, 2,165,224,130,203,102,192,221,179, 13, 35,254,197, 83, 31,153, 84,222, 63,247,213,181,243,186,112,246,233,213,211, -183,105, 19,119,114,251,239,111, 80,144, 22,171, 74,139,187,157, 67, 50, 72, 52,109,253,133,173,123,179,150,140,150, 62,126,172, -244,196, 23,221, 36,146, 46, 61,242, 19,110, 95,251, 20, 23,228, 74,128,225, 92,199,246,155,126, 61,253,216,130,244,116,209,201, -208,243,207, 75, 20,184, 15, 0,183, 0,162, 47,208,220,187, 93,187,174,251, 55,108,176,225,243,249,172, 81, 35, 70, 40,247, 69, - 69, 69,161,138,161,223,149, 0,195,214,209,177,199,212,169, 83, 25,130,244,116,250,228,233, 11,207, 52,124, 40,125, 75,241,110, -238,236,209, 15,162,120,189,134, 41,251, 3, 28, 7, 71,199,166, 83,166, 76, 65, 70,122, 58, 14,135,132, 20, 75,128, 8,141, 21, -235, 28, 3, 59,155,185, 57,142, 91, 48,113, 0,225,194,183,197,212, 21,251, 58,116,147,103,185, 65,240,215,241,215,214, 34,159, -177,200,154, 92,169,208,170,136,223, 98,177,220,140,141,250, 39, 79, 30, 35,179,139,228,162,132,132, 4,216,218,218,130,207,231, -195,194,194, 2, 49, 49, 49,184,126,253, 58, 94,190,124, 9,138,162,208,162, 69, 11,189,122,147,147,147,131,167, 79,159,194,202, -202,234,163,113,186,185,216,225, 91, 23, 59,118,102,110, 33,251,218,195,151, 62,251, 22, 15,110, 70,122, 12, 62,168, 93, 36, 86, - 38,147,225, 63,130,178,232, 66, 23, 23,151, 78,135, 14, 29, 98, 75,149, 48,115,159, 18,241,163, 72,162, 50, 1, 0, 19, 30, 67, - 20, 25,212,248,187,213,171, 87,139,198,143, 31,239,145,146,146,178, 94, 7, 91,255,218,238,221,187,207,167,105,154, 53,123,246, -108, 0,192,152, 49, 99, 10,239,223,191,239, 14, 32,235,250,245,235, 78, 19, 38, 76,120,117,227,198, 13,227,185,115,231, 50,148, - 74,101, 12,147,201,164,195,194,194, 86, 1, 8,124,239,137, 72,146,143,163,162,162,234, 57,185, 54,134,171, 13, 9,223,165, 47, - 75,111,112,198, 20, 82,147,222, 32,238,217, 67, 56, 58, 58, 90,240,249,252,216,212,212, 84,121, 90, 90,218, 66,145, 72,180,187, -134, 62, 70, 71, 70, 70,242, 93, 93, 93, 81, 92, 92,140,212,236, 18,204, 58,109,140, 66,113,169, 17,131, 5, 49, 90,186, 52, 54, - 51, 34,101, 15,179,178,178,228, 50,153,108,153, 80, 40, 60, 84, 29, 39,139,197,202,125,246,236,153,105,221,186,117, 33,145, 72, -232,188,188, 60, 66, 36, 18,161,168,168,136,184,112,225,194,215, 2,129,160,109,253,250,245, 9,103,103,231, 85, 2,129, 64,156, -150,150, 54, 73,151,161, 73,181, 96, 82, 49,153,204,205,147, 39, 79, 30,122,230,204,153,199,161,129, 77, 7,106, 13,151, 88,120, -122,122, 94,110,222,188,153, 83,200, 38,239, 29, 0,126,252, 23,156, 91,227,150, 44, 89,210,212,218,218, 26, 83,167, 78,197,202, -149, 43,177,124,249,242, 70, 83,167, 78,157, 12, 96,171, 30, 60, 70,142,142,142,143,182,111,223,238,209,169, 83, 39, 92,188,120, - 17,199,142, 29,195,219,183,111,149,245,235,215,103,250,248,248, 96,197,138, 21,232,221,187,247,164,153, 51,103,118, 77, 79, 79, -111,165,163,248, 24,191, 98,197,138,129,157, 59,119,198,216,177, 99,165, 55,111,222, 28, 10,224,202,213,171, 87,191,184,117,235, - 86,232,145, 35, 71,140,214,173, 91,215, 99,222,188,121, 83, 1, 4,215, 98,251,191,238,210,165,180,134,114,231,206,157, 17, 20, - 20,212,251, 3,133, 22,199,198,198,230,194,225,195,135, 91, 54,110,220, 24,163, 70,141,106, 53,116,232,208, 11,249,249,249, 61, - 1,232,116, 67,170, 83,167,206,198,179,103,207, 54,172,106,100,161, 50, 72,165, 82,235,111,190,249,102, 67, 82, 82,146, 94, 66, -235,232,209,163,248,254,251,239,209,162, 69,139,230,237,219,183,223, 51,101,202, 20,248,251,251,119,143,137,137,113, 64,105,212, -114,141,224,241,120,205,135, 15, 31,206,121,240,224, 1, 0,192,211,211, 19, 45, 91,182, 68,114,114, 50, 30, 63,126, 12,169, 84, - 10, 7, 7, 7, 12, 26, 52,136,151,148,148,212, 60, 39, 39,167, 70,161, 69,114,141,199, 13,236,215,215,236,220,125, 1, 84,148, - 18,109, 26,154,195,199,195, 30,241,169,133,136,140, 77,133, 74,198,134,185,181, 13, 58,116,237,101,157,145,246,118, 92, 46, 80, -179,191, 22,215,120,220,160,129, 95,153,158,139, 72, 71, 65,122, 28,253,250,225,153,235, 10,137,104, 18, 0, 60,254,243,248, 30, - 71, 27,163,158,238,173,219, 48,252,122, 14,176, 58,125, 44, 99, 92,254, 63, 83,219,239, 61,220,114,193, 94, 87, 86,206,152, 5, - 1,190, 52,203,202,249,161,153, 66,177, 83, 51,175, 55,208,107,225,146, 37,237, 39, 78,158,204,163, 40, 10, 71,126,253,181,240, -105, 84, 84,252,100,128,154, 82, 5,223, 78,192,117,232,192,129, 92, 51,115,115,204,153, 53, 11,102, 10,197,141,178, 93, 2,116, -159, 51,127,126,167, 25, 51,102, 24,237, 89, 53,253,113,239, 9,107, 90, 83, 52, 77,104,134, 41,143, 86,111,138,107, 59, 97,224, - 64,152,153,155, 99,246,236,217, 32,228,242,203,101, 2,138,137, 27,227,191,246,245, 9,232,223, 25, 4, 8, 28, 11,187,131,215, -201,217,207,110, 8,240,230,115, 85, 85, 21, 80,165,143, 86,181, 67,135, 69,114,100,118,255,106,176,192,221,221,189,168, 81,163, - 70, 69,185,185,185,120,254,252, 57,242,243,243, 17, 28, 28,140,184,184, 56, 80, 20, 85,107, 1, 67, 81, 20, 62, 54, 39, 0, 56, -216,152, 99, 84,223,118, 76,169, 68,196,203,206,206, 46, 55,124,244, 31, 18, 90,101, 80, 42,149,188,250,245,235,131, 4, 8, 97, -137,194, 52,227,104, 23, 34,227,104, 23, 66, 88,162, 48,149,201,100,164,169,169, 41,164, 82, 41, 79, 7, 42,214,151, 95,126, 57, -255,204,153, 51,172,181,107,215,194,203,203, 11,114,185, 28,247,239,223, 79, 5,144,165,110,147,126,251,246,237,116,141, 16, 94, -191,126, 61, 78,159, 62, 77,244,232,209, 99, 97,101,231,147, 64, 32,216, 56,101,202,148,188,146,162, 60,236, 29, 38, 70,232,168, -108,252, 60,240, 45, 70,216,156, 66, 94,230, 59,236,219,183, 15, 87,175, 94, 35,174, 92,185,202,190,121,243,166,201, 87, 95,125, -181,163, 78,157, 58, 97,213,117, 50, 61, 61,125,237,140, 25, 51, 10,138,138,138, 80, 84, 84, 4,177, 88,130, 60, 17,240,108, 75, - 83, 60,219,210, 20, 18,202, 8,187,118,238, 38,159, 61,123,102,251,246,237, 91,167,254,253,251,111,225,243,249, 7,171,227, 76, - 75, 75,123,240,237,183,223, 74, 10, 11, 11, 33,147,201,228, 42,149, 74, 38, 22,139, 21,199,143, 31,159,107, 99, 99,211,225,226, -197,139,172,171, 87,175, 49,111,222,188,197,190,126,253,186, 69,183,110,221, 78, 56, 56, 56,252,162,139,165,140,193, 96,108, 11, - 9, 9, 25,183,107,215, 46, 7, 31, 31,159,102, 21,134,162,248, 61,123,246,172,247,235,175,191,214, 9, 10, 10, 90,136,210, 0, -148, 79, 10, 91, 91,219,153, 3, 7, 14,196,174, 93,187,112,254,252,249,121, 59,118,236,192,151, 95,126, 9, 39, 39,167,111,161, -251,176, 23, 0,252,184,117,235, 86, 15, 15, 15, 15,140, 25, 51, 70, 54,105,210,164,239, 14, 29, 58, 84, 63, 60, 60,156,253,203, - 47,191,212,155, 58,117,234,236,128,128, 0, 73,131, 6, 13, 16, 28, 28,220,144, 36,201,109, 58, 93,223, 14, 14,115, 71,140, 24, -129, 77,155, 54,225,230,205,155,131, 81,250, 64,149, 1,184,116,247,238,221,254,235,214,173,195,224,193,131,225,236,236, 60,187, - 54,150,167,166, 77,155, 46,235,211,167, 15,194,195,195,209,170, 85, 43,116,232,208, 97, 30, 0,219, 90,238, 78,210,212,212,244, -196,161, 67,135,124,235,213,171,135, 53,107,214,192,205,205, 13, 7, 15, 30,244, 53, 49, 49, 57, 1, 29,221, 55, 44, 44, 44, 76, -141,141,141,177,112,225, 66,122,240,224,193,121, 53,125,230,205,155, 71,115,185, 92, 88, 89, 89,233, 26,248, 98,196,227,241, 58, -122,121,121,225,254,253,251,184,122,245, 42,150, 46, 93,138,185,115,231, 34, 59, 59, 27,195,135, 15, 55, 6,224,175,199,118,219, -219,217,217,161,176,176,180, 46,188,151,151, 23,158, 60,121,130,236,236,108, 56, 59, 59, 35, 35, 35, 3, 54, 54, 54,104,220,184, - 49, 40,138,178,215,141,146,246,178,181,182, 64, 86,190, 20, 76, 40,209,218,221, 22, 55,158,231,226, 93,182, 12,246, 54,150,200, -200,202, 70, 29, 27, 30, 92, 92,234,130,166, 41, 47,157, 20, 48,131,108,205,229, 25, 33,175, 72,142,180,216,155,185,114,149,116, - 74, 65,226,221,148,130,196,187, 41,114,169,100,202,227, 59, 87,115,235, 57, 24,193,197,197, 5, 4, 77,181,251, 20,215,227,144, -186,112, 49, 49, 98,142,185,250,243, 50, 34,108,255, 98, 66,154,251,174,109, 31,135, 82,203,178, 29, 80,127,200,240,225, 29,191, -251,238, 59, 94,102,102, 38, 21, 48,108, 88,222,218,192,192,107,127,212,240, 98, 80, 12, 52,234,217,179, 39, 72, 0,127, 92,185, - 34,202, 0, 82, 1,192, 1,112, 25,240,205, 55, 93,150, 44, 90,100,148,147,155, 75,221, 79, 40, 62, 23,151, 69, 15,178, 86,161, -190, 46,254, 89, 42,192, 91,195,123,249,242,101, 90, 12, 60, 6, 0, 63, 23,124,219,171,147,167,207,232,129, 93, 32,200,202,199, -236,181, 63, 99,207,201, 91,151, 45, 20,244, 23,255,161, 71,241,228, 90, 9, 45,245,208,207,123,211, 74, 74,222, 31, 61,248, 80, - 1,243,119,112, 86,134,255,162,208,210, 64,161, 40, 29, 37,145, 41, 40,200, 20,148,230,173, 22, 98,177, 88,103,138,203,151, 47, - 31,158, 53,107, 22,182,108,217,130, 87,175, 94,129,205,102,195,203,203,139, 15,192, 84,115,207,111,221,186,181, 61, 73,146,136, -143,143,199,230,205,155, 49,126,252,120,250,222,189,123, 7, 81,121,190,148, 39,121,121,121, 59,167, 76, 26, 95,144,159,249, 14, - 10,113, 62,178,210,222, 64, 42, 42,192,154,245, 27, 81,162, 96, 34, 67, 40, 71,134, 80, 14,146,107,141, 61,251, 15, 49,154, 54, -109,218,135,193, 96,244,171,166,159,247, 51, 51, 51,247, 79,155, 54,173, 32, 35, 35,163,108,251,100, 10, 26, 50, 69,249,243,213, -216,216, 24,219,182,109,179,112,119,119, 31,200,100, 50,187, 85,195, 41, 72, 73, 73,137,155, 54,109,154, 44, 51, 51, 19, 66,161, - 16,231,206,157,235, 95,175, 94, 61,171, 13, 63,110, 33, 68,114, 38, 50, 10,228,200, 40,144,131, 99,106,143, 19,161,103, 24,141, - 27, 55, 14, 96, 50,153, 29,106, 18, 89, 71,142, 28, 25, 61,108,216, 48,179, 31,127,252, 49,239,236,217,179,187, 0,104, 31,144, -248,109,219,182,157, 60,113,226, 68,209,252,249,243,173,131,130,130,230,125, 98,177,213,109,216,176, 97, 77, 40,138,194,169, 83, -167,158, 1,216,122,230,204,153, 71, 82,169, 20,195,135, 15,175,175, 30, 70,210, 5,109, 3, 2, 2,166,251,250,250, 98,206,156, - 57,242,107,215,174,181, 6,176, 5,165, 67,185, 52,128,100, 0, 59,110,221,186,213, 98,230,204,153,210,118,237,218, 97,236,216, -177,227, 1,248,214,192,219,113,196,136, 17, 30, 20, 69,225,248,241,227, 79, 1, 92,172, 48,255,122,104,104,232,125,153, 76,134, -145, 35, 71, 54, 0,160,207,141,156,205,229,114, 79,173, 94,189,218, 50, 45, 45, 13,163, 71,143,150,198,199,199, 35, 48, 48,208, -200,194,194,226,162,214, 53,160, 51,184, 92,238,190,159,126,250,105,160,183,183, 55,166, 77,155, 38,219,189,123,247,172,233,211, -167,203, 90,183,110,141, 93,187,118, 13,228,112, 56,122,149,232, 72, 79, 79, 47,136,141,141,181,169,233,147,154,154,170,107,120, -190,177,169,169,105,132,167,167,103,161,151,151, 87, 27,165, 82,137,152,152,152, 55,135, 15, 31,166,188,188,188,176,115,231, 78, - 4, 5, 5,161, 95,191,126, 96, 48, 24, 58, 11, 45, 6,131, 1,185, 92, 14, 99, 99, 99, 48,153, 76,188,121,243, 70,147, 90, 6, -108, 54, 27, 0, 96, 98, 98, 2, 35, 35, 35,144, 36,169, 83, 52, 26, 65,128, 46, 44, 81,128,197, 34,193, 36, 41,196, 37, 11, 33, - 87, 80,224,177, 25, 96, 49, 9,128,166, 96,105,194, 2,143,195, 0, 73, 16,148,142,156, 16,138,228,224,176, 73,176,216, 28,130, - 84,170,140,202, 30,142, 76,149,145,145, 17,135,176, 53,231,130,199,254, 23,149, 5, 38, 74, 29,203,199, 1, 44,147,186,117,135, -110,218,188,153, 83, 88, 92,140,193,131, 7,231, 37, 61,122, 20, 34, 6, 30,117,173, 33, 72,137,100, 50,221,253,186,118, 69,100, - 84, 20,138,242,243, 95, 3,165,206,241, 28, 39,167, 97,219,182,109,227,136, 37, 18, 12, 30, 52,168,224,213,157, 59, 71, 82,138, - 17,118, 60,185, 84,136,213,120,220,217,108, 71, 13,175, 48, 63, 63, 31, 40, 77, 33,225, 96,103,186, 97, 70, 64,111, 20,149, 72, -176, 96, 99, 8, 21, 21, 39,248, 54, 60, 21, 95,157, 73,135,240, 63,246, 24,158, 92,225, 3, 64,135,132,165, 26,235, 82, 77, 98, - 69, 42,149,126,116, 1,244,161,156,149,137,196, 15,229,252, 55,130,201,100, 74, 94,190,124,201, 49,183,113,162,108,204, 88,249, -245,198,223,177, 0, 0,107, 83,166, 80,174, 82, 80,233,233,233,224,114,185, 18, 29,135, 27, 38,237,219,183,111, 13,128,102, 76, - 38, 51,236,208,161, 67, 68, 72, 72,136,213,136, 17, 35, 18, 98, 99, 99,211, 60, 61, 61, 93, 15, 29, 58,100, 14, 0, 59,118,236, -160, 79,156, 56,209, 27,165, 41, 51,170,204,227,146,153,153, 25,152,155,155,123,111,198,140, 25,193, 28, 14,199,202,196,196,196, - 38, 60, 60,156,144,200,105,180, 93,146, 92, 22,137,104,110, 68,226,246, 98,115, 76,158, 60,153, 17, 27, 27,187, 62, 45, 45, 45, -172, 26,206,133, 5, 5, 5,225,175, 94,189,218, 98,225,220,210,206,196,117,137,133,207,226,120, 0,128,171, 45, 11,164,250,190, - 88, 80, 80,128,236,236,108, 76,159, 62,221, 42, 33, 33, 97, 97, 90, 90,218,141,106,172, 90,183,114,114,114, 82, 95,188,120,225, -199, 98,177, 56, 38, 38, 38,109, 35, 34, 34, 8,137,140, 66,243,133,201,200, 43, 46,237,167,181, 41, 19,143, 87, 59,224,219,111, -191,101,190,126,253,122,163, 64, 32,232, 92,233,205,140, 36,131,180, 69,214,130, 5, 11,162, 1, 52, 0, 80,110,104, 84,165, 82, - 17, 35, 71,142,124, 14,192,107,254,252,249,214, 52, 77,207, 91,184,112, 97, 30,128,189,255,244,185,100,110,110,190, 97,202,148, - 41, 56,113,226, 4,242,243,243,183, 1, 64, 97, 97,225,214,163, 71,143, 30,159, 52,105, 18,126,253,245,215, 13,217,217,217,127, -160,230, 80,237, 47,135, 15, 31,142, 75,151, 46,225,207, 63,255, 92, 6, 32,166,138,118,175,194,195,195, 23,158, 61,123,118,251, -136, 17, 35,240,243,207, 63,247, 1, 80,157,131,108,207,222,189,123,227,226,197,139,200,205,205,221, 85, 89,131,130,130,130,221, -231,206,157,107,223,187,119,111,172, 95,191,190, 39,128,235, 58,108,186,135,133,133,197,161,237,219,183,183,245,246,246, 70, 64, - 64,128, 68, 46,151,247,153, 63,127,254,249, 99,199,142,153, 29, 62,124,184,205,228,201,147, 31,168,115,190,221,215,201,148, 69, -146,235, 54,111,222, 60,193,207,207, 15,243,230,205, 83, 94,190,124,121, 0,128, 43,127,252,241, 71,194,130, 5, 11, 46,108,222, -188,153,177,105,211,166, 9,179,103,207,206,166, 40,234, 83,137,235,213, 59,118,236,104,223,171, 87, 47,188,121,243, 6,247,239, -223,135, 92, 46,255, 53, 34, 34,226,118,163, 70,141, 86,203,100,178,243, 38, 38, 38, 99,204,204,204, 60, 91,182,108,249,197,227, -199,143,141,161,155,159, 94,102, 98, 98,162,165,133,133, 5,148, 74, 37,158, 61,123,134,186,117,235, 66, 46,151,227,237,219,183, -240,246,246, 6,155,205, 70,102,102, 38,180,172,229, 53,136, 34,242, 89, 66, 82,122, 3,107, 51, 19, 64,197,195,147,248, 84,216, -217, 90, 65, 69,144,200,200, 16,160,101, 19,103, 16, 4,129,130,220, 12, 16, 4,241, 92, 23, 78, 21, 77, 69,190, 75,207,170, 99, - 99,198,133,119,251, 94, 54, 17,127,100,135,152, 55,232, 52,153,201, 32, 24, 28,174,233,222, 9, 99,199,218, 82, 20,141,130,220, - 76, 48, 73,242,225,167, 56, 64,167,222, 33,165,171, 27,239, 73,175, 9,107, 90, 18, 52,104,177, 28,135,127,206, 68,190, 49,208, -114,199, 15, 63, 88,218,216,218, 34, 32, 32,128,202, 77, 75,187, 86,162, 99, 98,229, 6,141, 26, 57,152,154,153,225,238,221,187, - 96,148,250,216,226, 32,224, 17,180, 96,129,141,189,163, 35,198, 79,152, 64,101,190,123,119, 93, 12,164,235,211,215, 6,110,110, - 44, 13, 47,169,230, 21, 48, 48,107,254, 0, 95,174,137, 17, 23,235,246,156, 65, 74,142,232,120,132, 0,123,254,163,246,142,125, -213, 90,180,170,114, 62, 43,117,170, 54,174, 86,172,240,120,188, 50,107,138, 30,111,122, 31,157,179, 38,252, 29,156,159, 16,139, - 1,156, 5,176, 56, 37, 37, 37,110,194,132, 9,114,165, 92, 90,116,111, 77,131, 69, 81,235,235, 77,139, 8,228, 79,251,125,150, -197,162, 18, 97, 94,209,142, 29, 59, 20, 41, 41, 41,113,218,203,212,192,253, 14,192,197, 95,126,249,101,247,169, 83,167,224,229, -229,133,152,152, 24,123,145, 72,212,234,249,243,231,214, 30, 30, 30, 8, 9, 9,193,137, 19, 39,182, 0,184, 90,157,200,210, 64, -169, 84, 94,203,200,200,104,156,156,156,220,208,210,210, 82, 97,105,105,137,138,145,136,133, 98, 10,185, 5, 66, 88, 91,219,192, -220,220,188,190, 14,226,252, 98, 70, 70,134, 59,101,213,164,139,123,206, 54, 97,228, 58, 23, 68,174,115,193,197,133, 78,224, 91, -114,144,159,159,143,236,236,108,100,103,103,131, 32, 8, 40, 20,138,166, 58,112,190, 21, 8, 4, 7,222,189,123,119,214,193,193, - 1,102,102,102,160, 1,100, 20, 40, 16,189,201, 3,209,155, 60,144, 81,160, 64, 97, 81, 17,234,213,171, 7, 51, 51,179,170,134, - 40,200, 58,117,234,244, 29, 54,108,152, 25, 0,168, 5, 84,119,154,166,167, 85,242,153,170, 84, 42, 59,105,218,126,255,253,247, -214, 0,122,255,195,231, 19, 3,192,140, 73,147, 38,181,225,241,120,216,185,115,231, 91, 0, 71, 52,247,250,221,187,119,199, 3, -192,172, 89,179, 60, 1,204, 67, 21,153,160,203, 76, 67,108,118,235,166, 77,155, 34, 34, 34, 2, 0,206,212,176,238,208,123,247, -238,161, 81,163, 70,224,241,120,109,107,104, 91,223,197,197, 5,241,241,241, 0,240,164,138, 54, 79,226,227,227, 75,135,123, 8, -162,190, 14,219, 62,176, 87,175, 94,207,110,220,184,209,182, 99,199,142,152, 48, 97,130,236,193,131, 7,125, 1,220,126,242,228, - 73,183,145, 35, 71,138,220,221,221,113,235,214, 45,143,145, 35, 71,222, 35, 73,114,141, 14,156,227, 87,173, 90,181,248,235,175, -191,198,170, 85,171,232,147, 39, 79, 6, 0,184,162,158,119,249,248,241,227,163,215,174, 93, 75, 15, 26, 52, 8, 43, 87,174, 92, - 12, 96, 90,117,100, 34,145, 72,168, 82,169, 32, 18,137,116, 50,201,235,218,222,214,214,246,203, 94,189,122, 97,233,210,165,168, - 83,167, 14,206,159, 63, 79, 3, 8, 3, 16, 46,147,201,186, 0,216, 44, 18,137,126,143,136,136, 64,207,158, 61,217, 40, 95, 98, -164,186,245, 63, 59,122,244,168,212,194,194, 2,174,174,174,104,208,160, 1, 50, 50, 50,144,148,148, 4,111,111,111,180,110,221, - 26, 74,165, 18, 7, 14, 28,144, 20, 21, 21,233,148,147, 79, 41, 19, 29,190,122,225,180,208,198,140, 11,103,123, 11,212,171, 99, -141,226,130, 28,100,103,164,163,117,211,186,232,218,186, 30,114,132, 50, 92, 14, 59,157, 95, 84, 84,114, 88, 39, 19,190,180,228, -208,181, 63,206, 11,173,204,216,104,220,196, 19, 35, 39,204,106,217,178,149,207,213,118,237, 58, 93,254,113,195,186,230,221, 59, - 52, 37, 82,115, 36,184, 20,118, 38, 95, 88, 88,120,232, 83,220,232, 87, 2, 12,137,133,251,237, 93,103, 35, 15, 52,235, 51,233, - 64, 92, 42,182, 1,128,130,193,240,232,251,229,151, 72, 77, 77,197,233, 83,167, 4, 37,192, 83, 93,249,140,140,140, 72, 0, 16, - 10,133,224,170,253,238,148, 64,147,175,190,250, 10,217, 57, 57, 56,122,228, 72,246, 37, 32, 74,159,126,246, 7, 56,198, 70,165, - 6, 65,161, 80, 8, 2, 40, 4, 0,130,137,190,237,188, 26, 33, 59,175, 16, 55, 30,198, 21,215, 19, 99,122,117, 60,159,177, 35, -124,237,124,180, 0,228,204,155, 55, 15, 92, 46, 23,124, 62,191, 76, 28,105,196, 10,135,195, 1,159,207,135, 82,169,196,241,227, -199, 1, 32,167,218, 55, 60, 64, 58, 96,218,122, 74,170,160, 75, 88, 44,214, 71,225, 84,191, 57, 74, 7, 47,248,153,250,227, 94, -229, 65, 49,181,225,252, 12,208, 78,157, 19,171, 29,128,252,164,164,164,212,161,131, 7, 8,147, 19, 94,100,136, 10,210, 5,133, -185, 41,130,148,183,207, 51,150, 44,156, 39, 76, 77, 77, 77, 65,105, 46,173,118,233,233,233,154,101,116,193,188,161, 67,135,254, - 52,105,210, 36, 58, 58, 58, 26, 0, 16, 25, 25,137,177, 99,199,210,163, 71,143,222, 6, 96, 81, 45,250, 45, 18,139,197,229,172, - 33,114, 21, 85, 54,228, 87, 88, 88,136,244,244,116,200,100, 50,157, 21,241,171,203,155, 94,230, 37, 61, 86,120,186,154,192,211, -213, 4, 30, 46,198, 32,148,197,101, 34, 43, 59, 59, 91,243,230, 44,209,163,159,133, 82,169,180, 92, 63,181,135, 38, 11, 11, 11, -145,145,145, 1,149, 74, 85,213,131,140, 74, 75, 75,187,124,226,196,137, 34, 0,248,241,199, 31,243, 8,130,248,147, 32,136,159, - 42,249,236, 97, 50,153,119, 53,109, 55,109,218,148,135,247,135,196,254, 78,124,237,237,237,157,191,120,241,226,157,179,103,207, -198,158, 61,123, 32, 16, 8, 22,225,175, 92, 60, 84, 78, 78,206,130, 93,187,118, 97,220,184,113, 88,190,124,249,166, 86,173, 90, - 21, 2, 24, 89, 21,161,157,157,157, 51,147,201, 68, 84, 84, 84, 33,128, 55, 53,172, 63, 35, 42, 42, 42,147, 32, 8,240,249,124, -183,234, 26, 90, 91, 91, 55, 52, 51, 51, 67, 90, 90, 26,160,126, 99,174, 4, 73,233,233,233, 52,135,195,129,147,147, 83,163,154, - 54,222,202,202,106,193,129, 3, 7,152, 47, 94,188, 64,247,238,221, 83,111,221,186,213, 19,128, 38, 36, 61, 42, 50, 50,210,183, - 91,183,110, 47,175, 94,189,138,141, 27, 55, 18, 45, 90,180,152, 86, 19,167,171,171,235,212,241,227,199, 35, 56, 56, 24,123,247, -238,157, 6,224, 84,133, 38,199,118,237,218, 53,107,239,222,189,152, 48, 97, 2,234,215,175, 63,178, 58,190,228,228,228,133,126, -126,126,145,175, 94,189,210,169,226,129,142,237,187,249,248,248, 52, 20,139,197, 56,116,232,208,155,134, 13, 27, 62, 58,117,234, -212, 60,188,255,192,254,253,244,233,211, 24, 53,106, 20, 90,180,104,113, 8,192, 8, 93, 46,203,216,216,216,148,235,215,175, 83, -108, 54, 27,174,174,174,232,215,175, 31, 2, 2, 2,208,188,121,115,200,229,114,156, 62,125,154,122,254,252,121,170, 76, 38,211, - 41,151, 82,238,171,155,231, 19, 19,255,199,222,121,135, 71, 81,181, 81,252,204,246,190,155,186, 73, 72, 72, 8, 45,149,142, 84, -233,161, 72, 23, 81, 68, 16, 43,162,130, 72,177,125, 34, 86, 4,105, 34,136, 20, 69, 65, 4, 20, 69, 90,164,136, 40,145, 78, 2, -132, 0, 33,129,244,186,233,101,179,125,103,238,247, 71,138, 33,164,236, 38, 40,150,251,123,158,121, 38,185,179,115,246,206,157, -118,246,189, 45,225,212,197,115, 81, 54, 1,159, 7,127, 31, 55, 60, 24,209, 13,207, 76,238,143, 30, 33,190, 72,203, 51,226,248, -241,159,109, 41, 41, 73,103, 28,233,113, 88,173, 25,127, 45,246,244,213,139, 39,237, 66, 1,131,144,224,142, 88,244,191, 87, 93, -151,188,253,154, 75,199,118,254,136, 77, 46,197,207, 71, 15,217,178, 51, 51,126,189, 87, 61, 14, 79, 0, 34,165,132, 81,240,121, - 60,176, 60, 73, 5,191,170, 35, 77,167,176,176, 32, 47,111,111, 68, 70, 70,130,231, 68,143,208, 19,128, 72,169,172,172, 5,215, -235,245,168,214,107, 31, 28, 28,236, 31, 16,128,159, 34, 35,193,231,184,235,131,156, 28, 96,244, 70,101, 53,116,141, 46, 3,152, - 94,104, 13, 85,251,214,218, 96, 87,141, 2,231, 98,111,194,108, 35,231,191, 41,198, 61, 29,143,236, 79,100, 38,154, 89,117,184, - 98,227,198,141,189,190,248,226,139,225,243,231,207, 87,206,152, 49, 3, 82,169, 20, 6,131, 1,126,126,126, 96, 89, 22,135, 15, - 31, 70,116,116,180,158,227,184,159,113,231,176, 1, 17,168,213, 75,227, 72, 18,100,149,126,203,208,107,223,195, 15,223, 21, 77, - 0, 80,222,228,212,133,109, 44,219,215,238, 62, 57,105,199,145,139,204,203, 83, 7,241,122, 4,183, 6, 0,120,121,121, 65,173, - 86, 59,173,121, 23,248,211, 53,107, 87,235,230,230,230,222,200,205,205,205,123,246,217,103, 67,170, 27,190, 75, 36, 18, 83, 85, - 36,171,184,190,125, 28,200,167, 21,192, 11, 95,124,241,197,254,210,210,210, 35,175,188,242, 10,150, 44, 89,130, 3, 7, 14, 12, - 0,112,170,153,199,206, 22, 23, 23,151,156, 63,127,222,171, 67,104,119,180,213, 10, 49,240,173, 68, 16, 66,224, 46, 39, 40, 47, - 41,194,165, 75, 23, 81, 94, 94,126,206,153,124, 90,173,214,146,188,188, 60, 15,173, 86,139,162,162, 34, 20, 20, 20,212,152,172, -226,226, 98, 20, 21, 21, 17,134,185, 99,204,150,198, 52, 43,242,242,242, 12,241,241,241, 98,175,214, 29,208, 78, 43, 66,239,255, -221, 0, 8,129,191, 27, 15,229,101, 37, 56,115,230, 12, 74, 75, 75,127,107, 72,147,227,184, 5,211,166, 77,227, 3,120,252,149, - 87, 94,113, 3,208,245,213, 87, 95,253, 25,117,122, 22, 10, 4,130,143,183,111,223,222,169,186,138,241,181,215, 94, 91, 13,224, -139,191,234, 90,114,119,119, 95, 16, 25, 25,169,178, 90,173, 88,187,118, 45, 86,175, 94,189, 5,119, 14, 84, 25,249,233,167,159, -174,231,241,120, 47,206,158, 61, 27,207, 61,247,156,188,103,207,158,243,115,114,114,190,169, 79, 51, 43, 43,107, 81,143, 30, 61, - 22,231,229,229,125,232,144, 89, 78, 76,156,217,163, 71,143, 69,121,121,121,203, 27, 59, 71, 10,133, 66,193,178, 44, 82, 82, 82, -138,129, 6,219,119,152, 82, 82, 82,178, 88,150,245,147,203,229,110, 77, 93,159,197,197,197, 31,246,236,217,243, 29,157, 78,119, - 20,192, 7,245, 24,242,203, 57, 57, 57,225,115,231,206,157,179,108,217,178, 73,185,185,185,187,154,210, 76, 75, 75,251,112,200, -144, 33,111, 37, 36, 36,108, 69,195, 85,192,159,190,251,238,187,214,237,219,183, 63,159,146,146,178,180, 9,205,131, 5, 5, 5, - 7,157, 56,191, 13,125,190, 70,147,207,231,191,186,108,217, 50,222,198,141, 27, 65, 8, 89,201,178,108, 67,249,140,221,187,119, -239,182,254,253,251,207,216,189,123,183, 52, 60, 60,252, 57,179,217,188,179,169,235,211, 96, 48,236,217,189,123,247,164,216,216, - 88,191, 25, 51,102, 72,131,130,130, 96,181, 90,145,147,147,131,141, 27, 55,154,226,226,226, 50, 75, 74, 74,246, 56,243, 12,177, - 91,202,166,158, 62,190,111,103,106, 98, 92,223,193,163, 38,184, 90,172,126,144, 20,242, 81, 82,152,139,195, 7,247, 20,167,164, - 36,157, 49, 24, 74,166, 58,163,105, 53,151, 62,122,230,215,253,187, 50, 83,226,251, 12, 28, 50,218,213,100, 9,128, 68,196, 67, -161, 46, 11,135, 35,247, 21,165,164, 36,255,110,178,153,159,184, 87,207,121,126, 32, 62,224,231, 70, 63, 59,107, 92, 55,200, 92, -253, 46, 9,129,181,253, 1,153,135,151,151,168,234,222,129,178,178,205,163, 67,154, 58, 64,220,161,170,150,202, 96, 48, 64, 8, - 88,158, 4,132,158,158,158, 50, 0, 72, 72, 72,128,188,178, 86,195,169,124,234, 1,133,188,150, 46, 15, 48, 20, 10,224,219, 94, -173, 96, 0, 32, 51,183, 16, 22, 91,163,239,141,127, 58,155,107, 25,174,205,205, 17, 16, 1,136, 80, 42,149, 75, 22, 47, 94,188, -242,220,185,115, 43,199,142, 29,187, 82, 34,145, 44,169, 42,108, 81, 35, 39,226, 47,211,188,175, 21,220,134,180, 99,162, 70,180, -103,184, 89, 3, 92,217, 39,122, 43, 44, 67,135, 14, 93,223,194,124,182,228,102,249, 51, 53,247,217,108, 54,130,202,106,187,125, -104,184, 74,240,141, 90,219,115,211,211,211, 73,213,223,206,228,211, 99,202,148, 41, 92,121,121, 57,121,228,145, 71, 8,154,158, -194,167, 81, 77,137, 68, 50,100,224,192,129, 54, 93,126, 17,185,145,156, 69,206,198, 92, 35, 71,142,159, 38,187,246, 68,146,117, -235, 55,145, 46, 93,186, 88, 0, 4, 56,163, 41, 16, 8,134, 14, 25, 50,164, 80,167,211,145,248,248,120, 18, 21, 21, 69,190,255, -254,123,178,105,211, 38,178, 97,195, 6,210,186,117,107, 29, 0, 47,103, 52,101, 50,217,132, 7, 30,120,192, 86, 82,102, 32, 41, - 89,133,228, 74,124, 10, 57,117,254, 10, 57,124,252, 20,249,102,231,110, 18, 22, 22,102,114, 64,147,207,231,243,215,237,218,181, -171,140, 16, 66, 38, 76,152,144,137,219, 7, 82,109,187, 96,193,130, 60, 66, 8, 89,190,124,121, 33,234,111, 8,255,103, 95, 75, -163,124,125,125,111,136, 68,162, 72, 0,143, 55,177,223,163, 2,129,224,128,183,183,247, 5, 0, 15,222,131,251,104,172, 86,171, - 61, 11,160,169, 25, 14,170, 63, 55,241, 95,114,191,255, 25,154, 67, 5, 2, 65, 20,208,248, 36,194,181,158,215,239,243,249,252, -159, 0, 12,115, 50,159, 29, 61, 60, 60, 30,113,117,117,125,217,213,213,245,101,173, 86,251,136, 88, 44,238,216,146, 99,119,239, - 24, 49,206,191,251,248,189,173,187,142, 73,243,239, 54, 54, 45,176,199,132,189,238, 29, 35,198,181, 84, 51,160,199,132,125,254, -221,198,166,251,119, 27,151,218,246,190, 9,123, 61,130, 35, 30,184,151,231,232,113, 95,180, 26,222, 22,118, 18,245, 22, 33, 81, -111,145,136,182,224,250,186, 32,172, 23,160, 26, 25, 17,177,138,176,236,170, 73, 19, 39,174,234, 0,184, 19,128, 95,119,169, 79, -179, 59,160,174,217,119,194,132, 85,237, 0,143,225,128,124,208,128, 1, 43, 9,203,174,154,246,232,163,171,252, 1,239,250,244, - 26,210, 36, 0,223, 23,104, 85, 91,215, 3,104, 63, 57, 16,225,111,140, 11, 36, 36,234, 45,242,238,195, 65,164,135, 23, 30,111, - 66,179,161, 72,209, 63, 58,162,229, 44,138,170,135,235,210,170,181,226, 46, 92,132,119, 93,179,143, 15,130, 34,218, 51,241,163, -131, 5, 69,168,236,146,172,248, 23, 62, 36,183, 90, 44, 22, 98, 50,153,136,193, 96, 32,122,189,190,174,129,170, 49,100,217,217, -217, 36, 51, 51,147,164,167,167,147,212,212, 84,130, 63,218,222, 56,156, 79,181, 90,253,197,195, 15, 63,204, 10,133,194,117,119, -227,216,221,220,220,150,246,238,221,219,250,201, 39,159,144,189,123,247,146,207, 63,255,156,204,158, 61,155,116,234,212,201,236, -226,226, 50,181, 57,154,222,222,222,139,130,131,131, 11,183,108,217, 66,190,249,230, 27,178,102,205, 26,242,230,155,111,178,126, -126,126,185, 42,149,106,100,115, 52,181, 90,237,230,251,239,191,223,186,121,243,102,242,243,207, 63,147, 29, 59,118,144, 5, 11, - 22,144,144,144, 16,179, 66,161,120,200, 65, 77,190, 64, 32, 88, 53,107,214,172,220, 86,173, 90, 69,214,217, 38, 15, 11, 11,187, - 48,109,218,180,108, 0,175,253,139,174, 79,170, 73, 53,169,230,159, 96,180, 30,107, 5, 95, 2,240,229, 34,209,163,131, 6, 12, - 88, 41, 2, 30,117,214, 20, 73,249,252,201,253,123,247, 94, 41, 2,166, 86,127, 86,202,231, 79, 30, 52, 96,192, 74, 33,159, 63, -189, 33,189,198, 52, 9,192, 23, 9, 4,175,245,239,219,119,149, 0,248, 95,117,218,208,182,204,245, 5,163, 90,147, 1, 1,204, -205,233, 90,200,255,197, 70,235,174, 35,248, 19, 46,194,127,138,230,223,229,166,238, 80,101,152,246, 57, 17,209,218,135,202, 89, -212, 59, 52, 51,159,178,187,124,236,157, 61, 60, 60, 14,117,232,208, 33,191, 77,155, 54,217,174,174,174, 59, 1,248,181, 80, 51, -220,219,219,251,107, 47, 47,175, 68, 31, 31,159, 88, 15, 15,143,143, 81, 57,234,124,179, 53,133, 66, 97,111, 47, 47,175,223, 2, - 3, 3, 75, 2, 2, 2,116, 30, 30, 30,187,234,137,100, 57,162,233,131,250, 31, 42,162,170,109,244,165, 67, 53,169, 38,213,188, -205,192,140,104,135,101,195,219,194, 62,188, 45,216, 17,129,248,184,182, 65, 25, 11,200,154,107,138,158, 0, 36,117, 63,223,148, - 94, 83,154, 4,224,247, 3,148,117,247, 25,237,135, 48, 7, 53,255,233, 17,173,234,231,188,115,195, 59, 52,128,253, 79,200,228, - 63, 69,243,239,194, 77, 52,210, 24,185, 22, 75,239,226,119, 26,239,242, 49, 92, 41, 40, 40,120,160,160,224,174,246, 77,184,154, -155,155,251,248,221, 20,180,217,108,231,116, 58,221,224,187, 32,213, 80,215,107, 43, 28,236,150, 77,161, 80,254, 59, 48, 0,139, - 36,188, 30,209, 17,107, 5, 44,120,135,147,145, 85,167, 75,158,145,105,142,102, 37,236,214,122,158,241, 76,115,243,249, 7,250, - 59, 52, 50,113,141,249,239,156,182, 28, 84,182,209,106,177,209,162, 80, 40, 20, 10,133,242, 23,112, 44,145,254, 16,251, 7, 16, -137,219,163,111,145,181,140,104,131,161, 79,103,122, 82, 52, 39,124,122,140,106, 82, 77,170, 73, 53,169, 38,213,164,154,255, 57, -205,106, 26,154, 59,245, 70,157,255,155,213,139,239,191, 2,173,103,167,154, 84,147,106, 82, 77,170, 73, 53,169,230,191,157,102, -143,163, 69,161, 80, 40, 20, 10,133, 66,105,156, 6,163,110,212,104, 81, 40, 20, 10,133, 66,161,180, 12, 31, 84, 78, 81, 21,137, - 63,166,170,218, 76,141, 22,133, 66,161, 80, 40, 20, 74,203, 25,131, 63,122, 27,222, 22,221,226,209,178,161, 80, 40, 20, 10,133, - 66,105, 49, 51,107,173,105, 27, 45, 10,133, 66,161, 80, 40,148,187,132, 99, 61, 35, 15, 30, 60, 72,104, 89, 81, 40, 20, 10,133, - 66,185, 87,252, 67,189, 72,117, 20,235,142, 89, 62,104, 68,139, 66,161, 80, 40, 20, 10,165,101,108,174,101,184,110, 75,163, 70, -139, 66,161, 80, 40, 20, 10,165,101, 84, 27,172, 72,212,153, 82,141, 7,208, 42, 67, 10,133, 66,161, 80, 40,247,150,127,184, 23, -217, 92,181,220, 49, 93, 82,117,175,195,193, 85, 7, 56,152,158,106, 10,133, 66,161, 80, 40,247,128,127,178, 23,241, 65, 3,109, -180, 40, 20, 10,133, 66,161, 80, 40, 45, 99,102,157,117, 13, 12, 45, 27, 10,133, 66,161, 80, 40,148,187, 98,180,106, 67, 39,195, -166, 80, 40, 20, 10,133, 66,249, 39, 67,103, 54,167,154, 84,147,106, 82, 77,170, 73, 53,169,230,127,129,153,168, 51, 42, 60, 64, -135,119,160, 80, 40, 20, 10,133, 66,185, 27, 38,107,115,125,255,211,185, 14, 41, 20, 10,133, 66,161, 80,254, 36,104, 68,139, 66, -161, 80, 40, 20, 10,165,101,108, 70, 61,163,194, 83,163, 69,161, 80, 40, 20, 10,133,114,247,204,214, 29,208,170, 67, 10,133, 66, -161, 80, 40,148,150, 49,179,161,255, 25, 52,220,115,224,152, 19, 95,208,156,222, 7,199,168, 38,213,164,154, 84,147,106, 82, 77, -170,249,159,211,108, 74,251, 24,254,121, 52,216, 24,254,207,134,118,125,165,154, 84,147,106, 82, 77,170, 73, 53,169,230,191,157, -234, 41,120,170,151,154,169,120,104, 27, 45, 10,229, 31, 14,217, 13, 62,138,131, 3, 65, 72, 43,240,197, 57,200,185,146,196,188, - 3,174,197,154,186,176, 0,200,108, 94,176, 75,243,161,139, 77,110,169, 38,133, 66,161,252,139,201, 65, 3, 17, 44,106,180, 40, -148,127, 58,249, 33, 65, 16, 96, 41,120,240, 1,177,222,130,103,216, 82,224, 90, 92,139, 53, 69,220, 7, 96,121,126, 32,214, 4, -104,131,151, 1, 55,174,209,112,241,142,135, 0, 0, 32, 0, 73, 68, 65, 84,194,166, 80, 40, 20,231,248,203, 27,195, 11,133, 66, - 29, 0, 78, 42,149,238, 1,157,229,154,242,231,226, 83,117,157,113, 85,215,157, 51, 40, 5, 2,193, 98,185, 92,254,171, 68, 34, -201,147, 72, 36,121, 10,133,226, 87,129, 64,176, 24,128,242,239,114,128,228,235, 78,114,240,216, 7, 44, 54,206,247,240,149, 18, -173,193,204, 6,129,103, 31, 77,182,116, 84,182, 72, 83,192,140, 48, 89, 57,255,111,206, 27,188, 42, 44,246, 80, 16,180, 72,179, - 22, 46, 34,145,232, 48, 0, 15,122,121,254, 59, 9, 5,122,246, 20, 8, 22,134, 0, 67, 65,231,211,165, 80,254,122,163,101,179, -217,180, 5, 5, 5,204,182,109,219,198,107, 52,154, 91, 2,129,224, 13, 0,162,255, 74,129, 43,149,202,211,106,181, 90,167,209, -104,116,106,181,250, 98, 83,233,255, 82,130, 60, 61, 61,211,220,220,220, 18,106, 39,122,118,121,176, 95,135,254,143,191,237, 30, - 54, 97, 80, 11,245, 69, 2,129,224, 13,141, 70,115,107,219,182,109,227,179,178,178, 24,155,205,166,117, 98,255,129,174,174,174, -215,207,157, 59,247, 86, 65, 65,193,160,140,179, 91, 60,115,207,109,242, 76,251,109,213,224,232,159,214,189,229,226,162,185, 6, - 96,224,223,162, 36, 77,156, 23,120,252, 33, 87,115, 12,242,156, 50,155, 87, 76,170, 65, 5,240, 7,195,210,130, 31, 49,165,156, - 23, 64,134, 94,206, 52, 42, 78, 23,121,122,253,158,100, 86,131,199, 27, 2, 19,227,221,226, 7, 14,143,247, 60,199,113,195, 69, - 34,209,203,244,241,251,239, 68,204,227,245, 63, 61,126,252, 7,175,117,233, 50, 39, 4, 24,215,128,217, 98, 0,188, 20, 18, 18, -114, 8,192,163,119,241,235, 63, 10, 14, 14,206, 2, 48,151,158, 9,202, 95, 76,247,234, 31,248,168,211, 70,203, 97,163, 53, 57, - 16,253,167,182,197,137, 71, 2, 81, 62,165, 45,244,211,219,226,228, 67,129, 24,218,156,220,184,187,187, 99,224,192,129,252,172, -172, 44,217,130, 5, 11,222,150, 74,165, 41, 0, 70, 54, 71, 75, 38,147, 69,203,229,242, 12,129, 64,112, 91, 94,228,114,121,180, - 66,161,200, 16, 8, 4,195,106,167,171, 84,170,211,106,181, 90,167, 82,169, 46, 54, 96,132,162,213,106,181, 78,169, 84, 70,215, - 78, 23, 8, 4,195,148, 74,101,166, 74,165,170,155, 62, 84,165, 82,101,212, 77,111, 8,161, 80,232,151,145,145,161,205,204,204, -212,138,197, 98,175,218,233,233,233,233,218,140,140,140,219,210,157, 65, 32, 16, 12, 85, 40, 20, 25,114,185, 60,186,190,244,186, -199,212, 16,181,202,110,168, 35,233,206,154,172, 17, 35, 70,156,204,201,201,241,119,113,113,113,169,189,193, 77,227, 50,242,235, - 45,235,231, 79, 24, 61,226,121,207,208,137,157,155,169, 63, 82, 42,149,166, 44, 88,176,224,237,172,172, 44, 89,223,190,125,249, - 60,158, 83,191, 39, 34, 38, 76,152,176, 79,167,211,249,118,237,218,149,111,183,219,113,117,255, 98,200, 99, 95,134, 52,101, 35, - 90,203,242, 5,183,126, 94,230, 55, 98,112,207,125,184,199,141, 65,201,238, 80, 17, 24,110, 32, 71,136,231,245, 44,147,231,152, -241, 15, 11, 46,101, 24, 61,109, 44,235, 6,240, 7,147,175, 2, 36,205,210, 20,216, 6,112,132,120,253,146, 42,244, 28,242,200, - 28,254,241, 84,129,167,141,101,221,193,195,160,230,104,214,190,252,249,124,254,252, 85,171, 86,241, 0,204, 6, 32,254, 47, 61, -133,123,181,130,239,208,246,252,243,221,125,208,255, 46,202,134, 87,221,239, 65,127,151,227,180,112,220,141, 93,201,201, 71,166, -183,111, 63,246,181, 46, 93,158,172,199,108, 49, 0, 94, 91,182,108,217,227, 87,175, 94,245,108,219,182,237,115,119,233, 71,255, -154,101,203,150,189,122,245,234,213, 86,129,129,129,239,130, 14, 95,244,175,130, 16, 34, 38,132, 12, 33,132,140, 33,132, 12, 35, -132,244,170,250,251,190,170,101, 12, 33, 36,162,206,250,190,170,125,171,183,247,110, 64, 99, 76,221,253,106,237, 83,247,255,219, -254,174,199,104,141, 65,101, 91,173, 49,183, 29,192,193,131, 7, 73,237,117, 93,166, 4,226,157, 57,253,124, 13,215, 15,236, 32, -250,140,100, 82, 28,127,137, 92,218,252, 33,153,115,159,167,225,177,182,248,200,249,242, 34,228,212,169, 83,228,234,213,171, 68, -175,215,147,196,196, 68,210,187,119,111,163, 92, 46,255, 5, 64,160, 51, 98, 42,149, 74,247,203, 47,191,144, 17, 35, 70,148, 42, -149,202,149,213, 55,151, 90,173,214,157, 58,117,138,140, 24, 49,162, 84,165, 82,173, 1,192, 7,128,135, 30,122, 40,143, 16, 66, - 60, 61, 61,179,235,211,155, 48, 97, 66, 49, 33,132,104, 52,154,234,170, 38,190, 74,165, 90,243,226,139, 47,234, 47, 92,184, 64, - 92, 93, 93,171,211,121,106,181,122,229,236,217,179,245, 49, 49, 49,181,211, 27,197,205,205, 45,131,101, 89,114,224,192, 1,162, -213,106,107,242,224,234,234,154,193,178, 44,217,183,111, 95,131,121,107, 44, 80,160, 84, 42, 87, 76,159, 62,189, 60, 53, 53,149, -184,187,187,235,106,165,175,156, 49, 99, 70,121,122,122, 58,241,240,240,112, 40,143,238,238,238,186,211,167, 79,147, 73,147, 38, -149,213, 46, 83,119,119,119,221,153, 51,103,170,211, 87, 56,242, 32,107,213,170,213,115, 90,173, 54, 91,171,213,102,187,184,184, - 44,241,241,241,201,205,207,207, 39,132, 16,210,174, 93,187,188,218,145, 44,109,248,248,121, 27,119,159, 57, 23, 21, 87,152,223, -101,248,243, 43, 52, 93, 38,104,156, 40,131, 64,185, 92,254,203,160, 65,131,140, 25, 25, 25,164,162,162,130,196,198,198,146, 83, -167, 78,145,155, 55,111, 18, 0,196,145,203, 73,169, 84,102,153,205,102,206,108, 54,115,249,249,249,108, 94, 94, 30, 27,191,210, -135,144, 47,133, 53, 75,201,190,113, 36, 55,106, 41,167, 86,202, 51, 1,168,238,217,131,103,125,152, 31,217, 20,188,235,218, 98, -255,248,168,101,163,108, 36,245, 56,217,241,164,167,237,196, 60,223, 91,100, 67,200, 15,100, 83,104,235,102,105,110, 8,221, 17, -251,166,255,141,117,239,190,100, 75, 75, 75, 35, 11,103,140,178, 31,157,227,155, 68, 54,134,236,110,142,102, 45,166, 62,248,224, -131,250,244,244,116, 18, 22, 22, 86,193,231,243,159,254, 47,153,172,136, 32,113, 86,236, 55, 11,185,113,225,242,194,187,100,182, -194,181, 90,109,193,214,173, 91,137, 74,165,202,251, 27,153, 45, 38, 4, 24,191,173, 75,151,125,220,228,201,236,182, 46, 93,246, -133, 0,227,171, 12, 22, 3,224,245,229,203,151,199,216,108,182,152,175,190,250, 42,102,252,248,241, 49, 0, 22,182,240, 59, 63, -249,232,163,143,136,205,102, 35, 95,125,245, 21, 25, 63,126, 60, 1,176,214,209,157,149, 74,101,135,206,157, 59,111, 15, 11, 11, - 75,239,218,181,171, 37, 52, 52,212, 20, 20, 20,148, 26, 30, 30,190, 85, 34,145, 4,130,242,151,208,152, 23, 33,132,244,122,253, -245,215,223, 0, 64, 94,127,253,245, 55, 8, 33, 99,170,252,196,152,218,127,215, 93, 87,155,167,234,255,235,211,168, 94,234,211, -172,239, 59,234,124, 15, 26,136,100,205,188,227,224, 14, 30, 60, 56,232,224,193,131, 39,234, 30,220,195,109,209,111, 78, 63, 95, -163, 49, 63,135,196,125,248, 50,249,117,136, 31, 57, 53,216,155, 36,204,127,144,228,124,179,134,188,208,205,213, 48,185, 45,134, - 56,107,180, 98, 98, 98, 72, 76, 76, 12,185,120,241, 34, 73, 73, 73, 33,165,165,165,228,219,111,191,101,221,221,221,141, 18,137, -100, 25, 0,153, 35, 98,106,181, 90, 71, 8, 33,102,179,153, 44, 89,178,196, 84, 21,169,242,210,104, 52, 58, 66, 8, 41, 41, 41, - 33,203,150, 45, 51,105, 52,154, 88, 0,173, 60, 60, 60, 50,146,147,147,137,151,151, 87,189,102,198,213,213, 85,119,227,198,141, -106,227,228,235,234,234, 26,183,127,255,126, 43, 33,132,100,102,102, 18, 55, 55, 55, 29, 0, 47,119,119,247, 75, 7, 15, 30,180, - 18, 66, 72,118,118,118,117,186, 67, 70,203,104, 52,146,163, 71,143,222,150,135,234,244, 67,135, 14,221,102,192, 28,192, 75,163, -209,196,124,251,237,183, 22,150,101, 73, 92, 92, 92,181, 73,244,114,113,113,185,184,123,247,110, 11,203,178, 36, 62, 62,222, 97, - 51,216,166, 77,155, 60, 66, 8,177,219,237,100,227,198,141,230,234, 50,173, 78,183, 88, 44,228,179,207, 62, 51,171,213,234, 24, - 0,141, 70,223, 60, 60, 60,178, 45, 22, 11, 41, 41, 41, 33,189,123,247,214,159, 58,117,138,148,149,149, 17, 66, 8,105,211,166, - 77, 30, 0, 4, 15,122,250,253,115,137,250,178,167, 94, 93,255, 93, 96,175,199, 62, 60,114, 62, 43,243,139,189,209, 49, 30,225, - 19, 70, 57, 18,212,148, 72, 36,203,124,124,124, 76,191,255,254, 59,107,181, 90, 73,122,122, 58,185,120,241, 98,205, 53,118,229, -202, 21,135,140,150, 64, 32, 88,124,238,220, 57, 43,203,178, 92, 65, 65, 1,155,151,151,199,230,229,229,217,235, 26, 45,242,165, -144, 20, 28,122,150, 68,110,158,107, 17,137, 68,139,239, 77, 52, 11,124,178, 41,120, 2,217, 20, 28,179,117,186, 71, 65,249,197, -157,132,252, 60,151, 36,189,223,150, 44, 30,165, 42,231, 54, 5,199,144, 77, 33,147,201, 59,131, 4, 78,105,110, 14, 29, 71, 54, - 5,199,124,244,112, 64,225,165,152, 11,228,196,137, 19,228,179, 53,203,201,156, 8,223, 10,110, 83,112, 12,217, 16, 58,201, 25, -205,218, 72, 36,146,196,147, 39, 79,146,168,168, 40,242,238,187,239, 18,185, 92,158,126, 55,162,122,100, 67, 80, 0,249, 60,104, - 16,217,210,209,135,252, 54,232,111,215,193,167, 87, 43,248, 14, 15, 18,103, 22, 92,218, 75, 72,209, 77,146,187, 50,140,140, 10, - 22,182,212,108,133,107,181,218,252,212,212, 84,146,155,155, 75, 86,175, 94, 77,212,106,245,223,218,108, 5, 3, 19, 0,188,177, - 98,197,138, 26,147,181,126,253,250,152, 43, 87,174,196,248,251,251,255,212,130,239, 90,187, 98,197,138, 26,147,181,126,253,122, -114,229,202, 21, 18, 16, 16,144,209,212,142,211,167, 79,151,247,235,215, 47,102,218,180,105,134,173, 91,183,146,212,212, 84, 18, - 27, 27, 75, 86,172, 88, 65,222,126,251,109,242,229,151, 95,146, 73,147, 38, 85,244,238,221,251,220,228,201,147,165, 78, 70, 20, - 4, 85, 81, 24, 49, 33, 68, 72, 8,169, 54,154, 2, 0,194,234, 31,255, 20,199,188, 72, 67,102,170, 33,131, 85,119, 91, 35, 70, -172, 81,195,230,192,247,221,105,170,234, 70, 66,106,253,253,219,216,177, 99, 7,221,241,242, 33,120,111,230,130,247,165, 41, 91, - 87, 67,247,237,167,224,151,232, 32, 44, 47,132,249,100, 36,108, 39,247,227,241,190,125,101, 50,134,249,192,217, 2, 21,139,197, - 16,139,197, 16,137, 68, 48, 24, 12,200,206,206,198,253,247,223,207,187,120,241,162,244,185,231,158,155, 43,147,201,210, 1, 76, -108,242,110,102, 42, 35,210,167, 79,159,198,179,207, 62, 43,217,190,125,123, 87, 79, 79,207,203, 44,203,138, 1, 32, 62, 62, 30, - 83,166, 76,145,236,220,185,179, 83,171, 86,173, 46, 90,173, 86,185, 68, 34, 1,159,207,111, 80, 79, 44, 22,195,102,179, 73, 58, -118,236, 24,123,249,242,229,240,177, 99,199, 10,211,210,210,144,156,156, 12,155,205, 38, 14, 10, 10,186,114,241,226,197,174, 99, -198,140, 17,102,100,100, 32, 45, 45,173, 38, 31,142,228,215, 98,177, 64, 34,145,160,118,149, 22,195, 48, 48,155,205, 16,139,197, - 14,107, 9, 4,130,161, 33, 33, 33, 87, 46, 95,190,220,125,194,132, 9,162, 11, 23, 46, 32, 51, 51, 19, 44,203,138, 67, 67, 67, -175, 92,190,124,185,219,248,241,227, 69,177,177,177,208,233,116,112,180, 10,173,250,115,151, 47, 95,198,180,105,211,196,135, 15, - 31,238,230,227,227, 19,107,183,219,197, 0,112,229,202, 21, 76,153, 50, 69,124,228,200,145,238,173, 91,183,142,109,162, 42,145, - 15, 0, 54,155, 13,207, 61,247,156, 66,173, 86, 35, 35, 35, 3, 28,199,129,101, 89, 0, 64, 97,113,225,149,203, 87,226,226, 31, -159,250,240, 32,163,213,108, 62,115, 62,250,122,187, 54, 1,126, 12, 67,218, 52,145,213,137, 10,133, 34,125,229,202,149,243, 82, - 83, 83, 37, 33, 33, 33,188,164,164, 36,148,151,151, 67, 36, 18,213, 92, 99,142, 30,183, 88, 44, 30, 28, 22, 22, 38, 48,153, 76, -224, 56, 14, 0, 8,143,199,171,247,100, 72, 75, 78, 34,212,203, 46,148,201,100,131,239,201, 19,169, 44,204, 29, 28,134,167,229, - 91, 36, 18, 23, 63,149,210, 39, 8, 72,143, 66, 91, 79, 9,248, 60,190,244, 66,178, 65, 1,144,225,240, 47,112,119, 78,147, 27, -158,156,103,145,216,220, 58, 41, 91,249,249,163,176,176, 16,173,219,133,192, 36,246, 20,159,190, 89,161, 4,227,164,230, 31, 12, -232,216,177,163,119,135, 14, 29, 80, 80, 80,128,238,221,187,195,213,213,213, 21,192,240,102,155,172,175, 2, 36, 40, 67,127,128, -183, 18, 44,243, 46,108,130,165,184,153,223,157,108,234, 46,252, 59,153, 44,181, 82,124,118,231,174,111,125,221,253, 67,129,200, -167,224,229, 34,193,150,231,187,187,121,106, 36,251,154,105,182,194,189,188,188,142,159, 59,119,206, 67, 42,149,226,226,197,139, - 8, 11, 11,195,234,213,171, 61, 93, 93, 93,163,254, 38,102,139,196, 3, 7, 62,138,141,253,106,251,173, 91, 7,167,183,111, 63, -118, 90, 80,208,146, 89,143, 62,250,244, 75, 47,189,132,229,203,151, 99,223,190,125,232,223,191, 63,102,206,156,105, 75, 79, 79, -223,214,204,239,249,116,229,202,149,115,230,206,157, 91, 87,211,154,150,150,214,104,109, 75, 88, 88,152, 95, 98, 98, 98,214,252, -249,243,187,111,223,190, 93, 38,151,203, 81, 82, 82,130,207, 63,255, 28,111,188,241, 6, 24,134, 1, 33, 4, 95,126,249,165,252, -201, 39,159,236,117,235,214,173,172,128,128,128, 38,155,117, 16, 66, 24, 66,136, 20,128,188,106, 81, 0,144,239,220,185, 83, 51, - 97,194, 4,117, 85,154,172,106,145,128, 82,151,122,189, 72,173,119,229,193, 58,229, 61,182,110, 90,221,109,132,144,177,141,105, - 56,105,160,235,251,190,200,198,204, 86,237, 55,208,224,122, 93, 36,208,197, 59, 48, 24,165, 63,239,134, 76,192, 64,198,175, 90, - 4, 12,120, 73, 87,208, 90, 42,132,141,144,240,230, 26,173,234, 69, 40, 20,194, 96, 48,128,101, 89,188,241,198, 27,146,163, 71, -143,186,243,120,188, 31,154,210,169,109,152, 18, 18, 18, 16, 26, 26,202, 28, 56,112,192,107,246,236,217,178,234,239, 41, 45, 45, - 69,135, 14, 29,152, 67,135, 14,105,223,124,243, 77,101, 99,102,134, 97, 24,136, 68, 34,204,157, 59, 87,118,254,252,121,183, 86, -173, 90, 33, 41, 41, 9, 69, 69, 69, 80, 42,149,152, 59,119,174,236,220,185,115,158,173, 90,181, 66,106,106, 42, 74, 75, 75,161, - 84, 42,157, 54, 90, 34,145,232,182,125, 24,134,129,213,106,117,202, 24,104, 52,154, 29, 49, 49, 49,158, 26,141, 6,177,177,177, -176,219,237,208,104, 52,152, 51,103,142, 44, 38, 38,198,211,197,197, 5,241,241,241, 32,132, 64,173, 86, 59,149, 71, 0,224, 56, - 14,241,241,241,104,211,166, 13,162,162,162,180,179,102,205,146, 86,167,223,188,121, 19,126,126,126,136,138,138,210, 42, 20,138, - 29, 13,105,113, 28,135,156,156, 28, 92,189,122, 21, 73, 73, 73,200,207,207, 71, 65, 65, 1,202,203,203, 97,183,219, 1, 0,242, -242,178,200,157,223, 29,184, 44,147,201,228, 97, 65, 29,253,175,196, 93,203,147,201,100,242, 0,127,255, 32,224, 29, 94, 35,134, -240,135,180,180, 52,247, 39,159,124, 82,148,155,155,139,226,226, 98, 8, 4,130, 59,174, 45,177,216,177,166, 64,118,187, 61, 84, - 42,149, 50, 86,171,181, 38, 2, 38, 22,139, 49,111,135, 1, 97,139,113,219,242,232,154, 60, 16,214, 6,139,197, 18,250,151,191, -193, 0, 6,140,165, 35, 24,166,251,217,164, 10,183, 1, 99,167,138,144,124, 24,224,108, 0, 79,128,193, 93,252, 4,251,174, 84, -120,129,160, 11,204, 8, 33,164,233,158, 95, 4, 96, 0,107, 7,128,233,121, 52,209,238,222,255,193,231, 69, 89, 89, 89, 16,137, - 68,144, 72, 36,232, 62,244, 33,193,206,203, 54,111, 48,232, 10, 43,130, 29,209,188, 45,236, 40,147,189,245,246,219,111, 43,106, -107, 62,253,244,211, 10,141, 70,243,118,179, 77, 86,133,188, 47,236,100,238,213, 44, 67,155, 37,145,185,161,183,242,140,193, 32, -100, 62, 96,235,118, 23,204,214, 96,137, 68,146, 12,224,254, 22,153, 44,149,248,204,174, 93,223,250,186,181,174, 52, 89,176,155, - 0,161, 12,222,158, 46,216, 50,111,136,155,167,139,204, 89,179, 21,238,229,229,245,203,217,179,103, 61,164, 82, 41, 98, 98, 98, - 32, 18,137, 32,149, 74,209,185,115,103,108,218,180,201,211,205,205,237,111,101,182,150,197,198,110, 93,122,245,106,194,235,225, -225, 33, 19, 21, 10,183, 23,167, 77,211,188,249,230,155, 7,247,239,223,255,213,152, 49, 99, 10,206,159, 63,255, 49,128,221,206, - 70,204, 0,172, 95,181,106,213,139,213,198,237,205, 55,223,252,114,255,254,253, 75,199,140, 25,147,115,254,252,249,249, 0,214, - 55, 38,160,215,235,247, 47, 90,180, 72,243,224,131, 15, 86,255,143,147, 39, 79, 98,219,182,109, 80, 40, 20,183,125,118,252,248, -241,120,246,217,103, 93, 45, 22, 75,163,239, 36,173, 86, 59,236,236,217,179, 97,168,236,224, 37,169, 54, 90,113,113,113, 46,101, -101,101, 46, 74,165,210,197,199,199, 71, 85,109,182, 30,124,240, 65, 23,129, 64,112, 63, 40,104,202,139,212, 54, 58,142,164, 53, -247,243,142,154,173, 58, 73, 13,142,161,117,155,209, 26, 59,118,236, 9, 52,208,147,202, 90,164,131, 4, 44,100,124, 6,114,126, - 45,179, 5, 14,130,210, 60, 48,205,232,192, 91,223,203, 80, 44, 22,131,207,231,195, 98,177,160,176,176,208, 41, 83,160, 86,171, -161, 84, 42, 97, 52, 26, 97,183,219, 33,149, 74,171,205, 8,212,106, 53,132, 66, 33,132, 66, 33,164, 82,233, 29,209,164,186,209, - 28,145, 72, 4,133, 66,129,156,156, 28,164,165,165,129,227, 56, 40,149, 74, 40, 20, 10,136,197, 98,100,103,103, 35, 59, 59, 27, -132, 16, 40, 20, 10, 40, 20, 10, 56,211,224,154,101,217,122, 95,254, 54,155,205,169,136,150,221,110,199,245,235,215,145,158,158, - 14,169, 84, 90,115,172, 18,137, 4, 55,111,222, 68,110,110, 46,228,114, 57,212,106, 53, 52, 26,141,195,186,213,199,162, 82,169, - 32,147,201, 80, 92, 92, 12,131,193, 80, 83,166,106,181, 26, 10,133, 2,165,165,165,200,203,203,107,244,216, 89,150, 69,118,118, - 54,242,243,243,145,145,145,129,130,130,130, 26,179, 85, 21, 53,106, 89, 96,167,172, 12,133,133,133, 53,145,200,134, 22, 71,224, - 56, 14,229,229,229, 56,123,246, 44,195,113, 28, 74, 74, 74,184,252,220, 92,246,133,108, 49,246,189,179,129,124,123,248,146,105, -231, 79, 49,198, 61,191, 92, 53,174,223,115,197, 40,237,253,174,253,158, 60,134, 62, 11,215,192, 38, 28, 81,160,183, 73,242,173, - 34,141, 87,120, 4,144,124, 8,224, 9, 0,169, 43,250,116,106,139,180, 98, 86,113, 67,103,145,130,193, 72,172, 15,114,117, 72, -147, 21, 14,207, 47,183, 73, 82,173,158,234,208, 46, 61,160,211,233, 32,145, 72, 32,145, 72,208,179,127, 4,146, 11, 89,249,181, - 44,163, 28, 4, 35, 28,210,252,131,118, 74,165,178,239,253,247,223,207,212,214, 28, 61,122, 52, 24,134,233, 12, 32,196,169,135, -220,218,118, 98, 88,229,125, 32, 32,115,175,229, 24, 90,237,139, 51, 5,141,155,248,144,219, 39,199,242, 66,175,231,154, 3, 65, -108, 11, 64,172, 61, 90, 96,182, 6,169, 84,170,131,235,214,173, 11,148, 74,165,135, 0, 12,104,142,136, 82,198,223,248,214,139, - 83,125, 93,171, 77,150,205, 0, 8,100,128, 80, 6, 8,100,240,214,122,224,131,103,135,187,201,165,194, 61, 78, 24,214,157,235, -215,175,247,172,107,178,170,151,238,221,187, 99,241,226,197,158,110,110,110, 59,238,241,203,114,132, 70,163,217, 30, 17, 17,113, - 54, 91,165,122, 54,167, 71, 15,241, 47, 26, 77,233,176,210, 82, 77, 64, 92,156, 53, 24,184, 2,224,179,204,204,204, 81, 78,152, -172, 71,213,106,117,204,176, 97,195,172, 42,149, 42,125,245,234,213, 47,204,158, 61, 27,203,151, 47,199,162, 69,139, 62, 7,240, - 12,128,255,101,102,102,182,106,202,100, 1, 64,110,110,238, 99,175,189,246, 90, 65, 65, 65, 1, 0,160,115,231,206, 40, 41, 41, -193,194,133, 11,241,242,203,149,157, 98,187,117,235, 6, 66, 8,116, 58, 29, 86,174, 92,169,203,205,205,125,162,137,103,123,198, -238,221,187,123, 89,173, 86, 63, 84, 86, 15, 74, 74, 74, 74,212, 69, 69, 69, 42,171,213,170,224, 56, 78,225,226,226,162, 4, 32, -127,252,241,199, 5,215,174, 93, 11,181,219,237, 89,212, 91,253, 65, 99, 94,164, 57, 48, 12, 19,217,146,200, 85,125, 17,177, 6, -104, 60,162, 53,118,236, 88,166,246,250,182,136, 17,131,216,244,232, 40,184,133,247,184, 45,154, 37,231, 51,144,169, 53, 72,206, - 72,131, 8,204,213,187,101,180,138,139,139,241,194, 11, 47, 24, 31,123,236,177, 66,142,227, 30,114,212, 20,104, 52, 26,104, 52, - 26, 92,187,118,141, 76,154, 52, 73,183,122,245,106, 99,109,163,149,144,144, 64, 70,140, 24,145,247,246,219,111,235, 27, 51, 90, -213, 17,173,101,203,150, 25, 7, 15, 30,156,127,245,234, 85, 82,109,166,148, 74, 37, 86,174, 92,105, 28, 50,100,136,238,194,133, - 11,164, 58,205,153,136, 22,143,199,171, 49, 90,181,247,225,241,120,224, 56,206, 41,163, 85, 81, 81,241,216,152, 49, 99,116,241, -241,241,164,250, 56, 53, 26, 13, 86,175, 94,109, 28, 62,124,184,238,234,213,171,164, 58, 77,173, 86, 59,108, 6,171,191, 95,165, - 82, 65,173, 86,227,218,181,107,100,196,136, 17,186,181,107,215,154,106,167, 95,191,126,157,140, 31, 63, 94, 87, 94, 94,254, 88, - 99,230,165,186, 58,207,110,183,195,100, 50,161,160,160, 0, 25, 25, 25, 53, 85,135, 70,133,122,212,212, 71,198,117, 53, 26,141, -134,107, 9,137,233,157, 59,133,105,141, 70,163, 33, 45, 61, 61, 1,120,135,107, 68,251,161,240,240,240,194, 23, 94,120,193, 88, - 92, 92,220, 98,163, 37, 22,139,227, 5, 2, 1, 25, 48, 96, 0,177, 88, 44, 36, 35, 35,195, 86, 80, 92,108, 15,249,240, 67,114, -117,222, 60, 70, 22, 29, 45, 81, 42,149, 76,149, 38, 47, 41, 41,137,147,201,100,241,127,249,147,136,199,121,131, 33,247,255,158, -168,119, 25, 62,110,138,152,201, 61, 15, 88,245,128,196, 21,144,184, 66,160,112,199, 3, 3,186,241,183,158, 45,243, 6,225,250, - 65, 36,241,107, 82, 83, 72,188, 0,110,192,207, 9, 38,215,251, 39,207, 17, 23, 21, 21,129,207,231,215,152, 34,185, 66,129, 97, - 19, 31,231,125,121,222,236, 13,144,254, 96,248,126, 78,220,235,175,190,245,214, 91,162,226,226, 98,240,120,188, 63, 52,229,114, -204,154, 53, 75,162, 86,171, 23, 57,252,240,219, 29, 42,130, 80,210, 7, 32, 47,223,200, 53,181,218,127,197, 24,188, 96,217, 22, - 89,120,183, 94,120,110,176, 86,182, 44, 50, 47,252,114,134,177, 45,192,206,131,221,210,179, 25,102,107,128, 74,165,138,140,142, -142,150,143, 30, 61, 26, 43, 87,174, 84,200,100,178, 67,205,121,240, 87,232,217,217,239,173,253, 90, 23,251,241, 72,192, 90, 81, -105,176,106, 45,121,122, 14,139,183, 28, 47,181,217,200, 84, 71, 53,141, 70,227,140,103,158,121,166,112,207,158, 61,119,152, 44, -169, 84,138,148,148, 20, 44, 89,178,164,168,168,168,232,137,123,105,178,102,207,158,189, 36, 51, 51, 51,248,231,159,127, 22,228, -231,231,107, 87,125,241, 69,233,247,165,165, 69, 75,227,226,110,252,175, 83,167,142,175,119,233,242, 68, 35, 67, 63,212,107,178, - 94,124,241,197,157,153,153,153,221,143, 29, 59, 38,204,207,207,247,123,241,197, 23,177, 98,197, 10, 44, 90,180,104, 19,128,231, -224, 88,135,151, 63, 2, 8, 86,235,141,226,226,226,177, 35, 71,142, 44, 41, 46, 46, 70,151, 46, 93, 48,110,220, 56,120,123,123, -163, 85,171, 86,152, 48, 97, 2,130,130,130, 80, 88, 88,136,169, 83,167, 22,229,231,231,143, 4,144,212,152,102, 97, 97,225,173, - 29, 59,118, 36,204,153, 51,167,123,102,102,102, 40, 0,247,242,242,114, 69,121,121,185,196, 98,177,200, 92, 93, 93, 93,187,117, -235,230, 49,115,230, 76,229,165, 75,151, 66, 51, 51, 51,245, 0,210,168,189,170, 49, 89, 13,122, 17, 0,249, 85,134,199, 82,103, -157,223,196, 54, 71,247,173,247,111, 7, 62, 87,215,108,213, 94,238,168, 58,172,255, 98, 4, 22,111,219,189,213, 36,246,239, 0, - 77,112, 87,200,165, 82,200,196, 98,200, 92,221, 97,230, 56,124,145,146,107,168, 32,100,145,179, 5, 90,247, 69,200, 48, 12, 62, -253,244, 83,123,223,190,125, 77,199,143, 31, 95,103, 52, 26,253, 1,236,117,198, 20,172, 93,187,214, 48,119,238,220,203,121,121, -121, 93,165, 82,169,165, 58,125,221,186,117,134,199, 31,127, 60, 46, 51, 51,179,187, 92, 46, 55, 52,212, 62,171,182,209,146, 72, - 36,230,188,188,188, 94, 79, 63,253,116,252,103,159,125, 86, 33,151,203,161, 80, 40, 32,145, 72, 44,121,121,121, 93, 95,120,225, -133,203, 43, 86,172, 48,200,100, 50, 40, 20, 10,167,170,229, 8, 33,119, 24,170,218,233,142, 98,183,219,143,231,229,229,117,157, - 59,119,238,165, 79, 62,249,164,162,218, 0,213,206,227,170, 85,171, 12, 74,165,210,169,136, 86,245,231, 20, 10, 5,214,172, 89, - 99,152, 51,103,206,229,188,188,188,174, 18,137,196, 82, 43,189, 98,246,236,217,151,242,242,242,186,218,237,246,227,141,252,194, - 99,203,202,202, 32, 16, 8, 16, 23, 23,103, 22,137, 68,224,241,120,184,121,243,102,141,209,114,115,115, 11,235,218,185, 83,200, -215, 59,119,159,144,137, 36,146,190,189,122,134, 38,165,166,101, 18,194,164, 54,145,213,189, 70,163,209,255,248,241,227,235,250, -246,237,107,250,244,211, 79,237, 13, 69,182, 28,193,108, 54,159,184,120,241,162, 77, 42,149, 50, 57, 57, 57,118, 62,159, 15,150, -101,137,185, 87, 47,115,231, 79, 62, 33,215, 94,127,157, 81, 43, 20, 2,145, 72, 4,185, 92,206, 28, 62,124,216, 98, 48, 24, 78, -252,245, 70, 11,114, 48,144, 37,230,153, 85, 82,158,157, 65,194,222, 74,147, 37,117, 1,164,174,128,212, 21,190,190,126, 56,159, - 98, 80,129, 7, 49, 88, 7,198, 16, 35, 68, 1, 6,242, 56, 29, 84, 66,177,140,201,205,205,173, 49, 68,213, 75, 96,135, 80, 92, - 76,211, 43,193, 16, 9,248,112,102, 8,146,177,238,238,238,130,156,156,156, 59, 52,195,194,194,248, 54,155,205,241,161, 93,178, - 89, 31,128,123, 49, 33,215,228,243,227,229,138,224,121, 75,191,148,201,216, 18, 32,122, 45,194,219,181,194,188,201,221,196,111, -238,207, 15,191,144,106,104, 7, 62,121, 14,156,222,211,137,124,222,175, 82,169, 14, 93,184,112, 65,174, 82,169,144,148,148,132, - 94,189,122, 97,243,230,205,114,185, 92,254, 19, 0,167,218,227,157,211, 33, 77, 95,206,246,125,117,119,122,110,108,142,253, 54, -147,149, 95, 65,240,204, 71,251, 75,138,203, 76, 15,157,205,104,248,254,169,135, 75, 37, 37, 37, 35, 22, 45, 90, 84,152,159,159, -127,155,201, 74, 75, 75,171, 54, 4,131, 1, 92,189, 87, 47, 75,141, 70, 51,109,233,210,165,184,112,225, 2, 70,143, 30,141,168, -168, 40, 20, 21, 21, 97,215,161, 67,137, 59, 18, 19,255, 87,221,102,171,129,161, 31,234, 69,173, 86, 47, 88,186,116, 41,162,163, -163,107, 52, 11, 11, 11,177,116,233,210, 76, 0,207, 59,107,178,170,201,203,203, 59,127,227,198,141,145, 93,186,116,185,190,110, -221,186, 76, 31, 31, 31,110,230,204,153,120,230,153,103,224,233,233,201,174, 89,179, 38,125,192,128, 1,113,183,110,221,138, 48, - 24, 12, 87, 28,249, 45, 80, 80, 80,112,122,243,230,205,103,135, 14, 29, 42,159, 49, 99,134,231,190,125,251,220, 13, 6, 67, 43, -137, 68,162,181, 88, 44,226,235,215,175,243,191,255,254,123,239,107,215,174,165,152, 76,166,243,205,205,251,127, 13,134, 97, 46, - 48, 12, 19,201, 48,204,177, 58,235, 11,141,109,115, 98,223,134,254,110,244,115,117,178,185,185,206,226, 56,211,218,225,157, 89, -157, 84,134,211,211,251,144,220,153,247, 19,221,148, 80,114,114,144, 27,121,186, 61, 83, 49,163,153,195, 59, 24,141,198,154,101, -207,158, 61,196,219,219,187, 66,165, 82, 57, 61,188,131,183,183,183,174,172,172,140,220,119,223,125, 69,158,158,158, 53, 67, 17, -248,248,248,232, 42, 42, 42, 72,159, 62,125,138,180, 90,109,205,240, 14,126,126,126, 25,132, 16, 18, 16, 16,144,221,144,158,221, -110, 39,222,222,222,213, 61,244,132,110,110,110, 27,122,247,238, 93,164,211,233,136,143,143, 79,205,208, 9,158,158,158, 43,123, -245,234, 85, 55,189,169,252,102,100,102,102,146,204,204, 76,210,186,117,235,236,218,233,105,105,105, 36, 45, 45,141,248,249,249, - 57, 61,188,131,167,167,231,138,122,242,210,172, 60,250,251,251,235,140, 70, 35,233,215,175,223,109,101,234,239,239,175, 51,153, - 76,213,233, 14, 13,239, 32,147,201,158,147, 74,165,217, 82,169, 52, 91, 34,145, 44,105,211,166, 77,222,119,223,125, 71,214,172, - 89, 83,221, 37, 29,158, 97,227,251,118,232,247,196,255, 60,195, 38, 44,104,201,240, 14, 42,149,234, 23,111,111,239,138, 61,123, -246,220,118,125, 25,141, 70,135,135,119,144,201,100,153,122,189,158,211,233,116,182, 83,167, 78, 25,162,163,163, 13,113,113,113, -134,148,148, 20, 99, 97, 94,158, 85,167,211, 25, 75, 75, 75,205,151, 47, 95, 54,203,229,247,102,120, 7,178, 57,168, 3,217, 16, -178,255,214,123,129,215,230, 14,148,155,174,124,208,149,144, 31, 30, 36,228,167,103, 8, 57,254, 42, 57,191,105, 38,233, 23, 40, - 97, 79, 45,108,157, 64, 54, 6,255,232,200,144, 12,100,115,231, 14,100, 67,200, 79,137,239, 6, 94,155, 49,160,149,233,139,207, -214,144,115,231,206,145,184,184, 56,146,148,148, 68,126,218,251, 29,233,215, 78, 94,169,185, 33,100,191,147,195, 60,244,151, 72, - 36,250,213,171, 87,147,179,103,207,214,104,238,223,191,159,200,229,114, 3,224, 88,175,101, 2, 48,100, 67,216, 68,251,103,193, -191,191, 57, 92, 89, 94,120,240, 85, 66,174,108, 37,100,115, 56, 33, 95,245, 38,228,187, 49,132, 28,120,130,156, 93, 51,153,244, - 15, 20,217,200,198,224, 40,178, 41,204,225,198,246, 66,161,176,108,207,158, 61, 36, 59, 59,155, 68, 69, 69,145,232,232,104, 18, - 31, 31, 79,210,211,211, 73,100,100, 36, 17, 10,133, 38, 52, 99,218,178,222, 94, 8,136,232, 40,202,185,188,172, 63, 33,251,166, -146,252, 29,211,200,216, 78,170,162, 62,173, 91, 52, 30, 93, 55,119,119,247,130,200,200, 72,146,146,146, 66, 78,156, 56, 65,180, - 90,109, 1,128,240,123,253, 66,140,136,136, 56, 71, 8,137, 25, 61,122,116, 12,128,195, 17, 17, 17, 49,201,201,201, 49,189,122, -245, 58,139,198,135,126,104,144, 97,195,134, 89, 9, 33,100,244,232,209, 4, 64,118, 68, 68, 4, 73, 78, 78, 38,189,122,245,178, -220,165,108,243, 1, 60, 33, 20, 10,191,112,115,115,251,213,213,213,245, 56,159,207,223, 12, 96, 58,154, 63, 30, 23, 31, 64, 43, - 0, 97, 0,122, 86, 45,161, 85,105,180,199, 33,229, 78, 38, 7,162,255,147,237,152, 19,143,181, 69,249,212,182,208, 63,213,158, -113,100,192,210,136,134,140, 22,199,113, 36, 33, 33,129, 12, 25, 50,164, 66,161, 80,100,193,241, 1, 75,111,211,244,240,240,136, -214,106,181,119, 12,162, 89, 43,253,182, 1, 75,181, 90,237,105, 31, 31, 31,157,167,167,231,197,250, 52, 61, 60, 60,162,125,124, -124,116, 30, 30, 30,183, 13,238,201,231,243, 71,123,120,120,100,213, 77, 23, 8, 4, 67,181, 90,109, 70,221,244, 6,142, 29,222, -222,222, 25,217,217,217, 36, 63, 63,159,248,251,251,103,215, 53, 96,185,185,185,183, 25, 48, 71, 52,155,202, 75, 35,121,172, 87, -211,129, 50,109,206,121,175, 38,200,215,215, 55,111,213,170, 85, 68,169, 84,230,213,222, 16, 60,240,169,183,206, 37,234,203,158, -121,109,195,119,245, 12, 88,234,232,224,160, 35, 21, 10, 69,214,144, 33, 67, 42, 18, 18, 18, 8,199,113,132,227,184,134,140, 86, -125,154,163,122,246,236, 89, 88, 80, 80,192,150,151,151,219, 51, 50, 50,204,201,201,201,198, 15, 62,248,192,154,159,159,111,210, -235,245,150,216,216, 88,179,143,143, 79, 62,128, 81,206,158,163,230,190,187,234, 86,159,145, 77,161,253,201,198,208,200,248,183, - 3,174, 63,209, 91, 97,142, 89, 53,154,144,227,175,146,179, 27,158, 33,125, 3,197,149,134,104, 83,200, 33,242,101,208, 64,178, -182,157,216, 33,205, 47,218, 15, 32,155, 66, 14, 93, 91, 28,112,253,193, 30,158,150,157, 91, 55,145,155, 55,111,146,253,223,239, - 32,125,218, 86,153,172,141,161, 71,201,134,208, 33,142,104,214,103,182,182,108,217, 66,110,222,188, 73,126,252,241, 71, 71, 77, - 86, 68,125, 70,235,141, 8,101,201, 51,189,165,230,169,221,196,150, 9,225, 34,235,136, 14, 34,123,191, 0, 1,219,213,135,199, -133,122,130,140, 8,150,153,201,198,224, 40,178, 49,116,164,163,249, 20,139,197,233,168, 53,166, 78,221, 69, 34,145,228, 55, 98, -180, 34,154, 52, 91, 65,146,156, 95,222, 27, 74,198,117, 81, 21, 58,104,178,154,186,150,186,121,120,120, 20,124,245,213, 87,196, -203,203, 43,223, 65,147,245,167, 95,159, 26,141,102,187, 94,175,143, 57,114,228, 72, 76, 68, 68, 68,204,246,237,219, 99, 78,158, - 60, 25, 35,151,203,183, 87, 7, 39,234,154,173,208, 59,159,255, 17,117, 34, 90, 49,229,229,229,228,200,145, 35, 36, 34, 34,130, -108,223,190,157,156, 60,121,146,200,229,242,152,230,230,243,207, 56,118,170,249,159,102, 38, 26,168, 58,252,211,127,220,212,103, -180, 76, 38, 19, 89,184,112,161, 69, 42,149, 26, 68, 34,145,179, 83,240,252,163, 47, 66, 15, 15,143,211, 94, 94, 94, 58, 47, 47, -175,219,204, 94,237,116, 15, 15,143,139,255,242, 27, 48, 72, 36, 18,165, 9,133,194,219,167,224, 9, 27,223,183,125,255, 25,139, -188,194,199, 63,208,194,124,138, 68, 34,209, 27, 82,169,212,176,112,225, 66,139, 94,175,119,198,104, 1,192,112,185, 92,158,181, -109,219, 54, 99, 98, 98,162,173,168,168,200,126,238,220, 57, 91,116,116,180,229,157,119,222, 41,151,203,229, 89,104,120, 88,130, -191,164, 60,201,218,118,226,106,179,117,101, 81, 64,252,184, 78,114,235,230,249, 35, 72,223, 54,117, 76, 86,195, 35,185,215,175, - 89,101,182, 46,189,233, 31, 63, 36, 72,105, 95,186,104, 30,233,211, 86,118,187,201,114, 66,179,174,217,146,203,229,229,111,191, -253,182, 51,145,172,219, 13,225, 23,193,254,100, 83,200,246, 74, 19,213,196,178, 33,248,115,242,105,176,255,223,229, 62,234,237, -133,128, 97, 65,146,171, 78, 68,178, 28,201,103, 55, 87, 87,215,235, 78, 68,178,254,138, 99, 31, 49,107,214,172,152,228,228,228, -152,164,164,164,152,147, 39, 79,198, 76,156, 56, 49, 6,192,136, 90,159,169, 49, 91,214, 73,147,204,221,120,188,121, 77,104, 62, - 58,107,214, 44,146,156,156, 76,146,146,146,200,201,147, 39,201,196,137, 19, 9,156,155,190,135,154, 34,106,180,238, 9,127,246, -132,159, 17, 0,142,213, 78,144, 74,165, 58,147,201,228,169, 84, 42,247,234,245,250, 57,168,236, 22,217, 34,205, 63, 35,159, 84, -243, 95,161,233,163, 84, 42,215,233,245,250,137, 82,169, 52,223,100, 50,121, 57,161,233, 34,145, 72,230, 73,165,210, 33, 6,131, - 33, 8, 0, 20, 10, 69,130,217,108,254,213,104, 52,126, 12,160,228, 94, 31, 59, 89,219, 78, 12,177,184, 39, 8, 94,143, 73,175, -104,187,244, 72, 81,192,252,161,174,233,253,218, 43, 82, 32,228, 62, 2, 99, 62,207, 60,153,102,118, 90, 83,198,244, 2, 43,124, -253,124,170,161,205, 71, 63,151, 7, 44, 24,162, 76,239,215, 78,153, 14,130,143, 32, 49,156,113, 86,179,174,217, 82, 40, 20,219, - 42, 42, 42,158, 5,240,171,179,199, 78,118,135,138, 80, 97,243,133,141,223, 9,164,145, 41,124, 8, 49,128,199,143, 67, 46,116, -204, 59,215,173,244, 62,250,203, 53, 71, 40,149,202,105, 33, 33, 33,237,174, 93,187,150,100, 48, 24,190, 1,112,180,238,251, 39, - 4, 24, 34, 23, 8,186, 26,237,246,168,235, 64,116, 19,154,143, 42,149,202, 5, 33, 33, 33,225,215,174, 93,187,106, 48, 24, 86, - 1,216, 69,207,209,191, 74,243, 95,201, 95, 62,138,114,245,203, 78,175,215,211,210,167,252,217,228,232,245,250, 73, 85,215,157, -179,251,150,152,205,230,197,102,179,121,113,245, 15,146,226,226,226,191, 85,163, 85,230,165, 36, 11, 89,219, 46, 26, 98,241,178, - 30,254,178, 57,123,102,201, 12, 32, 76, 38,132,220,154, 38, 76, 86, 83,154,231, 33,179, 45,235, 21, 32,123,249,199,231,100, 6, - 16,228,130,224,227, 38, 76,150,163,156,170,168,168,104,219,236, 99,126,248,186, 21, 64, 10, 1, 82,241, 78, 35, 63, 20,223, 1, - 97,104, 35,227,123,201, 81,189, 94,127,244,252,249,243,141,125,134,196, 3, 4,249, 91,179, 0, 0, 32, 0, 73, 68, 65, 84,199, - 97,119,184, 51,192, 46,189, 94,191,171, 9, 77, 10,133, 26, 45, 10,229, 31,200,223,246,133,205,188,148,100, 33,187, 67, 47,160, -128,191, 16, 60,180, 5,236,105,168,176,231, 50, 47,165, 89, 90,168,121, 14, 5,204, 92,240, 17, 4,177,253, 22,244,150, 92,230, -249, 52,203,223,230,184, 1,130,119,168,145,162, 80, 40,127, 27,102,226,246,158,134, 53,255, 83,163, 69,161,252,195,169,138,242, -100, 86, 45,127, 91, 77, 10,133, 66,249, 15, 26, 46, 48,104,184, 65,155, 51,117,175,205,105, 20,119,140,106, 54, 75,147, 15, 64, - 3,192, 5,149,211, 56, 84,119, 19,110,106,152,141, 7, 0,216,104,121, 82, 77,170, 73, 53,169, 38,213,188,199,154, 77,105,255, - 19,219,126,213,215,203,112,243, 95,241,197,180, 71,198,221,101, 36, 45, 79,170, 73, 53,169, 38,213,164,154,255, 82,205,127, 37, - 60, 90, 4,255, 40,164,180, 8, 40, 20, 10,133, 66,249,219,209,189,106,237,131,202,232,150, 79,245,134,123,218, 70, 75,230,222, -209, 7, 2, 94, 23,134, 35, 33, 0, 64,120, 76, 60,236, 92,172,177, 48, 49,167,165,218,202, 86, 65,110, 4,226,221, 12, 44, 15, -235,179, 19,138, 90,170,215, 41, 72, 61,201,203, 67, 53, 45,183,176,116,219,213, 27,250,125,206,236,171,209, 4,104,164,110,174, -147,205, 86, 91, 39,177, 72,148,110, 45, 41,219, 92, 92,156, 84,222,140,108,184, 53,182,241,157,119, 8,115, 48,231, 34, 35,146, - 91,121,238,106, 17,163,135,158,232,115,148, 92, 96, 73, 10,249,254,251,135,137,179,231,134,225, 97,176, 66,165,234, 33,145,202, -123,201, 85,174, 29, 57, 2, 20,233,178, 82, 45, 54,251, 73,214, 98,136, 33, 28,126,187, 27,231,138, 66,161, 80, 40,148,127,129, -209,186, 8, 96, 12, 42,171, 12,155,110, 12, 31, 16,118,255, 5,169, 84, 22, 8, 0, 28, 33,224, 8, 80, 81, 86, 18,147,155, 20, - 61, 18, 0, 60,218,116, 63, 34,148,170,123,112,164,114, 59,203, 1,118,171, 41,165, 44,237,220,125,142,228, 72,225, 25,244,224, -208,136, 97,147,198,142, 29, 19,220,185, 83,231,246, 0,112, 37,238,202,173,131, 7, 35,111, 28, 63,198,236,169,200, 79,248,177, - 37, 71, 76, 32,125,191,103,207,110,247, 71, 71, 95,124, 15,192,139, 45, 45, 65,119,119,229,156,163, 63, 44, 28, 56,108,210, 74, - 5,224,156,209,146,186,185, 78,158, 48,110, 84,183, 87, 94,154,197,123,102,225,135,129, 23, 78,253,182, 92,233, 19, 94, 66, 56, -219,209, 10,221,148,223, 27,155, 56,185,174,127,108,200, 96,125, 83,116,152,183,230,171,190,174,198,162, 91, 83, 8,199, 78, 97, - 24, 6,124,177,252,123,207,118,247,127,231, 50,120,126, 49, 0,135,123,140,169,125,194, 34,180, 62,126,123,166, 60, 53, 79, 42, -215,120, 9,192, 23, 1, 96,144,157,122, 29,199,119, 45,117,125,249,221, 45,221, 79,197,166,217,127,249, 97,189,137, 17, 9, 39, - 25,114,174,209,177, 84, 40, 20, 10,133,242, 95, 38,178,202, 92, 69,214,221,208,160,209,146, 74,101,129,103,127, 59,232,246,227, -201, 12, 0, 64, 68,119,111,252,239,131,117, 35,182,175,141,190, 1, 0,125,135,142, 13,122,239,141,151,112,250,106, 30, 8, 33, -232,214,193, 29, 15, 76,120,216, 49,227,225, 21,122,223,228,201, 15, 61,182,112,225,130,241, 55,111,222, 76,221,185,115,231,239, - 0, 48, 96,224,192, 14, 31,126,248,225, 35, 43, 93,221, 36,223,126,255, 67,150, 73,119,253, 66,115,142, 86,218,170,157,111,112, -199,182,211,190,253,114, 29,111,240,200,135,166,166,162, 98,169, 41, 59, 41,203,145,125, 61, 60, 60,230, 10,133, 66, 13, 0,112, -220, 31,254,199,106, 37,222, 0, 96,103, 57,149,107,171,224,114,190, 72,202, 74, 36,162,107,229,122,253,182,178,172,235, 95, 52, -166,105,182,217,194, 95,126,254, 73,222,165,164, 66, 4,134, 15,224,175, 89,250, 38, 56,214,230, 58,239,141, 15, 38, 71,159,251, - 22, 21, 58,156,112,240,208,132,117, 19,124,125,251,240,223, 95,170, 28,206, 48,120, 34,160,239, 83, 19,223,219,250,189,176,103, - 7, 53,204, 54, 14,135, 98, 10,251,110,248,248,253, 21,167, 54,140, 57, 0, 96, 19,128, 95, 0, 52,105,234,220,220,221,190,153, -187,232, 99,101,133,229,143, 97,138,170, 76, 22, 62,223,182, 27,151, 51, 56,132, 4,135, 8,188,231, 46, 87,110,250, 96,230, 86, - 67,229,220, 93, 20, 10,133, 66,161,252, 87,201,193,237,141,223, 55, 55,105,180, 0, 64, 41, 19,224, 70,114, 46, 0,192, 69, 6, -204,121,110, 6, 10, 11,242,131, 44,118, 14, 79,205,152,142,139,241, 57,184,145,146, 15, 66, 8,130,252,228, 14,231,134, 15,174, -231, 83, 79, 63, 53,232,200,209,163,231,223, 90,244,214,215, 12,131, 51, 0,176,105,243,231,125, 23,191,189,248,217,233, 51,166, - 15,255,254,251,239,175, 2,104,150,209, 18, 48,170,117, 43,150, 45, 17,103, 22,152, 76,115, 23,190,206, 45,152, 63,119, 13,128, -135, 28,114, 50, 66,161, 38, 51, 51, 83,201,227,221,222,124,237,163, 37,175, 71, 13,159,180, 50, 49, 53,189,228,210,145,253,251, -239, 11, 11, 11, 67,102, 86,110,255,229,159,108,236,122,232,136,236,201,242, 50,227, 36, 67,193,245,122, 39,109,150, 8,133, 87, -223, 93,190,161, 27,231,210,129,247,191,103, 71, 35,188,125, 43,100,229,149, 96,224,200,241,130,152, 11, 23, 70, 0, 14, 27,173, -186, 3, 52, 78,182,112,121, 93, 63,220,118,110,216,196,126,173,122,242,120,124,232,141, 54,228,151,154,193,114,192,128, 80, 13, - 70,109,255, 68, 80, 84, 97,123,240,131, 31, 50, 30, 60,179,118,172,206, 84,154, 61, 27,192,158,198,191,134,184,249,105,213,184, -145, 81, 94,175,201,170, 48,217, 1, 0, 34, 62, 11, 6,196,157,222, 95, 20, 10,133, 66,249,143,211, 96,175, 67, 30, 0, 28, 60, -120,176,222,246, 59, 44, 75,112, 35, 37, 7, 55, 82,114,112, 62, 62, 31, 86, 34,196,154,229,239, 98,213,210,183, 81,100,228,225, -199,211, 25, 72, 72,201, 69, 66, 74, 46, 10,138,235, 29,233,253,182, 42,165,149, 75,101,221, 63,254, 88,189, 98,196, 64,197, 96, - 55, 87, 87,215,196,171, 95, 87, 44,158,175, 11,125,247,229, 12,145,208, 34,201, 84, 40, 21,253,118,239,254, 46,204,203, 83,171, - 80, 42, 85,175,202,125,187,110,209,104,186,104, 26,211,172,139, 76, 27, 50,126,252,152, 81, 67,189,189,189,184, 89,107, 98,226, - 59,133,134,216, 58,118,232,216, 95,166,237, 56,190,145,221,106, 52, 57,142, 3,143,199,131, 78,167, 67,118,118, 54,146,147,147, -145,144,144,128,140,140, 84, 29, 71,136,144, 5,199,243,241,241,131, 64, 32, 70, 96,155, 0,108, 88,179, 84,254,193, 59,255,235, - 37, 85,136,247,213, 49, 66, 53,154,166,162,226,239,127, 58,124, 52,235,208,206, 13, 44, 0,228, 21,235,113,252,194, 77, 92,188, -150,225,236,137,172, 59,132, 67,155,172,180,155,101,246,148, 72,254,123,111, 46,200, 56,121,242, 84,106,105,185, 5,229, 6, 43, - 12, 38, 27,204, 22, 22, 54,150, 67,128,167, 20,123, 95,239,132,253,191,198,122, 49, 12,243,113, 83,229,105, 54,219,216,251, 67, - 20,152, 58,164, 53, 66,252, 20,200,186,113, 6,115, 23,125,140,232,100, 51,138,139, 75, 96,171, 40, 0,167,207, 68, 65,202, 69, -216, 89,150, 52,117,222,239, 18, 84,147,106, 82, 77,170, 73, 53,255,197,154, 13,121,145,127, 8,155,235, 89, 80, 99,180, 26,226, - 86, 70, 17,110, 36,231,162, 71,136, 47,218,183,241,193,249,132, 98,124,115, 60, 3, 91,142,164,225,248,229,124,112, 2, 21,114, -203,128,196, 84, 29, 18,211, 10,154, 28, 63,155, 47, 17, 78,121,249,229,210,133,157,195,202,250,252,118,104, 14,124, 61, 19,195, - 94,123,173,100, 14, 95, 34,156,226,218, 90,181,243,245,133,243,166,169,228,114,177,197,108, 65,187,182, 1,210,151,102,207,121, -146,113,149,236,116,244, 40, 85,190,161,174, 18,153,236,139, 15,222,121, 85,242,241,143,137,233, 21, 22, 84,236, 57,163, 75, 90, -240,250,226, 34,129, 80,186, 65,229, 27,234,234,168,150,205,102,131,217,108,134,197, 98,129,213,106, 69, 86,198,245,241,191,252, -248,202,200,182,173,221, 70, 74,164, 82, 16, 0,101, 70, 59,146,115, 12, 24, 50,108, 56,191, 71,247,238,225, 74,159,208,167,235, -211, 42, 45, 77, 43,229, 8, 95,117,112,239, 14,254,119, 63, 95,194,215, 7, 47, 96,223,175,151,112,254,196, 33, 59,225,108, 53, -243,127, 41,125, 58, 4, 41,125, 58,167, 41, 91,117,209,213, 44,190,157,162, 27, 45, 83, 62,143, 12, 25, 22,113,236,185, 23, 95, -250,205, 80, 94,152,247,197,186,119,179,242,179, 83,175, 75, 68,140, 93, 46,225, 67,111,178, 99,235, 47,217,152,188,244, 50,174, -165,235, 65, 8,105,114, 2,111, 14,152, 63,229,233, 87, 88,155,213,138, 96,127, 37,118,108, 94,134,241, 67,186, 98,104,103, 87, -220,215, 94, 1,185,192,140,171,241, 55,176,107,199, 86, 59,199,241, 22,208, 31, 50, 20, 10,133, 66,161, 17,173,154,197,167,246, -134, 6,171, 14, 77, 38, 99,202, 67, 83,166,195, 71,235,173,156, 48,248, 9, 81,204,173, 18,228,231,164,225,102, 66, 28, 12, 38, - 27, 68,174,109, 1,169, 55,218, 4, 6, 32,246,198, 62,235,218, 21,145,122,206,110, 78,105, 72,111,252,120, 31,191,155,241, 12, -111,197,114,255,179, 9, 55,138,123,236, 88,244, 21, 30,123, 76,233,177, 98,185,255,217,212, 36, 5, 79, 46, 37,253,158,156, 49, -149,225, 49, 4,175,189,182, 16, 19,198,142,194, 83, 79, 62,206,108,219,182,181, 79,137,131, 71,201, 65,248,233, 27,111,190, 43, -214,149,216, 45,231, 19,244,102,185, 66, 38, 59,149,168,175, 8, 15,244,151,141,158,244, 68,118,228,238, 47, 62, 6, 48,195, 17, -173,106,131,101,179,217, 96,181, 90, 1,128, 5, 0, 30,175,114, 93, 88,110, 65, 94,137, 25,186, 18, 51,236, 44,135, 73, 83,102, -200, 46, 68, 95,158, 1,160,129,246, 90, 28,103,179,219,176,231,231,139,200,186,240, 61,199,240,248,165,181, 26,195, 67,233,211, - 33,200,219,219, 63,106,236,164,199, 61,197,210,202,106,216,242, 10, 51,182,109, 92,222,104, 62,121, 12, 67, 56,214, 94, 98,183, -217, 42,218,181,109,151, 21, 18,214, 85,122,242,183, 35,227, 79, 29,219,163,183,183,123,220,229, 86,106, 14,248, 66, 9,248, 34, - 41,204, 86,199,126, 44,232,110,158, 93, 15,128,121,250,133,133,107,230,189,242, 63,254,252,181,191,195, 98, 50,192,108,172, 64, - 89,105, 49,100, 2, 27,174,158,222,111, 39,172,109, 94, 69,206,165,245,244,254,162, 80, 40, 20,202,127,156,186,211,239,212,164, - 53,104,180,210,174,157,188, 15, 0,130,122,142, 40, 84, 74, 5,110, 2, 30, 3, 93,230, 45,108, 91, 57, 23, 28, 71, 48,250,217, - 21, 80, 5,122, 67, 38,226,195,172, 47,212, 23,221, 58,209,104, 91, 29,134,177, 13, 95,191, 41, 43,240,133,231,219,169,119,236, -208, 11, 1, 96,199, 14,189,240,249, 89,173,213,159,109, 74, 9,236,125,127, 15, 16,150,197,216, 9, 15, 97,202,163, 83,144,154, -107,192, 15, 81,233,168, 48, 90, 28,234, 45, 39,243, 8,233,234,225,238, 57,234,229, 39, 70, 41, 4,124,134,233, 24,160,225,103, -228,219,236,124,190,144, 61,112,161, 52,123,210,164, 71, 61,142,255,244,221, 80,214, 35,164,171,177, 32,254,114, 83,122,102,179, - 25, 44,203,194,108, 54,195,102,179,193,205,163,237, 79,195, 31, 90,153,153,147, 91, 30,153, 91,108,234, 93, 97,179, 67, 87, 98, - 70, 94,137, 25, 37, 21, 86,120,171, 92, 97,183, 89, 58, 55,164, 71, 8,249,122,226, 67,211, 31, 7,192, 99,120,246,175,244, 57, -241, 9,149, 91,254, 48, 89,163, 38, 60,230, 25, 21,115, 11, 55,163, 15, 21, 19,206, 94, 57,138, 59,195,101, 54, 94,174, 32,124, - 6,156, 72,192,216,248, 60, 30,103,181,234,109, 90,173,231,241, 19,199, 15,143, 51,217,147,192, 23, 73,106, 62,107,180,176, 14, - 95, 49,186,155,103, 63, 5,128, 79,214,174, 89,213,111,248, 99,162, 19, 23, 83, 96,180, 1,125,187, 7, 97,239,183,159,155, 9, -177,189, 82,145,115,233, 83,122,111, 81, 40, 20, 10,133,114,155,193,138, 68,101,227,248,219, 35, 90,213,117,163, 99,199,142,173, -219,224, 26, 89,186, 34,184, 43, 5,240,108, 21,136,105,115, 87,225,235,143,231,131,101,109, 32, 4,176,179,142,141, 76, 64,136, -240,231, 23,159, 15, 12,105, 19,200,247,156,246,152,220,248,205, 14,131,108,218, 99,114, 99,167,206,238,165, 47, 62, 31,152, 82, -110,242,239,111,103, 89,156,186,154,135,184,148, 82,196,165,150, 65, 41,115,124,152, 47,190, 88,244,252,242,101, 75, 69, 2, 62, -195, 92, 77,211,235, 51, 11,237,122,190, 80,104,149,203,196,196, 66, 4,230,212, 2, 82, 56,108,226,147,198, 3,219, 63,121, 26, -192,236,134,116,170,123, 26, 86, 71,178,170,215,132, 16,194, 0, 28,199,176,108,102,129, 9,122,171, 13,186,226, 63,140, 22, 99, -111,184,230, 84,233,211, 33, 72,173, 82, 30,230,243,249, 18, 66, 0,155,213,254, 8,124, 58,140,212,231,220, 76,168,109,178,206, - 94,205,198,173, 75,199,116,172,213, 48,221,144,119,227, 23, 71,143,157, 97, 64,248,124,112,124, 30,195, 49, 12, 56, 33,143, 88, - 64, 8, 87, 55, 71, 6, 39,140, 86,181,217, 18, 11,249,139,142,238,250, 88,251,212,152, 80,124, 27, 85,233,249, 76,229,249,101, - 21, 89,212,100, 81, 40, 20, 10,229,238,210,152, 23,249, 7, 69,181,238,140,104, 53,118, 64,132, 0,137,105, 5,104,227,231, 9, -191, 54,237,145,112, 61,246,143,109, 0,236,172, 99,213, 81,251,247,231,100,174, 90,165,230,230,207, 47,237,187,124,185,255,153, -231,103,181,214,116,234,236, 94,250,234,171,233,125, 87,175,214,156,249,249,172,144, 37, 85,227,117, 85,143,205, 69,136, 51,237, -226,120,189,186,134,181,229,191,187, 35, 49,253,151, 43,229,121, 34,145,200,230,237, 42,101, 84, 74, 49,159,207, 19,138,205, 54, -158, 57, 40,188, 59,255, 0,143,233,222,152, 74,181,209,170, 91,117, 88,152,127,107,252,209, 31, 22,118, 26, 60,113,133, 91, 86, -190, 17,165, 22,126, 77,213, 33,159,199,224,202,245, 52,128, 47,138,171, 79, 83,173,114, 59,178,243,155,175,253, 87, 47, 95, 2, -171,157,197,139,243,223,194,147, 51,166, 31,129, 79,135,145,254,129,193, 49,191, 31,248, 74, 62,114,214, 6,164,221,136,206,181, -155,203,118, 57, 99,178,106,204, 22, 64, 88,194,241,138,138,203,148,102, 59,164,168,199,247,153,173, 92,179,174, 28,189,209,142, - 3,231,114,113,240,199, 93,208,168, 20,244, 73, 64,161, 80, 40,148,187,206, 63,212, 92,161,142,185, 2, 26,138,104, 53, 70,128, -159, 23,206,197,165,160,115, 72, 91,104,212, 42,196,223,202, 4,159, 39, 4,143, 1,108,118,199,205, 16,177,218,190, 93,189, 90, -131,180, 20, 5,239,179, 13, 41,129, 47, 62, 31,152,178,122,181,230, 12,177,218,190, 5, 48,157, 16,160,210,108, 85, 26, 46,214, - 9, 95, 64, 56, 91,107, 47, 55, 57, 63, 58,169,162,144,199,227,155,221, 53, 82,206, 93, 35,225,185,171,196, 66,145,144,207,217, - 9,207,234,167, 13, 52, 17,142,235,234,136, 94,237,170, 67,150,101,193, 48, 60,182,202,136, 41, 50, 10,141, 40, 53,241,161, 43, - 49,163,184,220,138,142,190, 10, 28, 59,254,189,129,181, 25,119,212,167,197, 23,138, 52,237, 3,253,240,191,247, 87,195,104,102, -145,152,165,135, 72, 34,241,246,242, 14,191, 60,253,133,215, 37, 47,109,190,133,167,135,186, 99,254,239,183,178, 12, 58,233,235, -206,156, 89,150,101, 97, 52, 89, 68,186,130, 98,215,178,242, 10,181, 76, 42, 49,122,186,105, 10,234,251,172,201,201,136, 86, 53, -114,169, 0,227,250,120,195,100,157, 10,163,217,142,211,191,236,161, 79, 4, 10,133, 66,161, 80,254,160,193, 9,164, 29, 50, 90, - 74,185, 20,132, 47,197,239, 49,183, 16, 28,214, 5, 91,247,159, 71,135,206,125,144, 83,110, 7, 1,175,201,222,134,213, 44,124, -195,120, 17,192,197,241,227,229,126, 15, 62,232, 59,156, 16,225,207, 27, 54,149,101, 2, 64,219, 78,149, 50, 28, 71, 64, 8, 64, -184, 74,195,229, 48,140, 32, 45, 37,167,172, 77,160,183, 2,215, 50,173,102,133, 68,196,115, 85,136,249,158, 26,177, 72, 36, 16, -128, 37,140, 57, 39,231,150,153, 1, 82, 29,145,171, 91,117, 40, 87,250,252, 52,108,226,138,252,212,244,210,232,142, 69,134,174, -165, 86, 49, 8, 1, 58,250, 42, 16,119, 54,146,213,101,221, 76, 52,234,110,108,172, 79,139,227,192,183,218, 57, 92, 78, 42, 69, - 73,133, 13, 37,122, 43,250, 15, 25, 39,234, 31, 49, 30,191,199, 21,128,179,219,176,252,243,200,114,150,216,166, 0,215,109, 78, - 28, 52,239,220,197,171,126,249,197, 21, 18,161, 64, 80, 18,210, 33, 32, 89, 44, 18,218,203,202,202,196,183,127,138, 15,133, 76, -140, 34,189, 13, 0,108,206, 94, 61,165, 21, 54,236, 63,155,139, 3,123,118, 66, 38,147,129,208, 27,138, 66,161, 80, 40,148,218, -248,160,114,250,157,200,170,117,141,249,114,104, 82,105,150, 35,240,112,119,131, 84,161, 70,138,206,138,114, 70,139, 98, 3, 1, -203, 86, 70,180, 26, 9, 60,213, 59,187,247,254,253, 57,153,251,246, 21,108,217,191, 63,167, 86, 67,239, 63, 34, 89, 53,107,142, - 56,172,201, 16,246,216,254, 67,191,149,142,239,237,233,202,227,243,141, 34, 33,207, 44, 16,241,173, 34, 1,207, 38, 18,240, 44, - 94,106, 33,255,183, 3,187,196,132,193,111, 77,105,154, 76, 38, 68, 68, 68, 96,244,232,209,152, 48, 97, 2, 30,126,248, 97, 4, - 5,133,106,121,124,198, 66, 24,142,243, 20,151,163,189, 39, 3,129, 41, 3,191,236,250,200, 16,119,106,239,101,214,108, 26,135, -219, 45,231, 31,154,132,112, 69,165,102,152,172, 44,138,245, 86, 20, 87, 88, 97,247,236,139,189,167,179, 97,180,176, 72,139,249, -222,152,159,155, 57,215,156,119, 51,165,137, 83,241,218,237,255,146,204,103,158,154,145,175,146,242,110, 14,232,119, 95,190,135, -187,155,157, 97,254,136,188, 50, 12, 3,169, 90, 11, 87, 23, 21, 82, 46, 30,194,209,229,195,140, 0,222,116,164, 60,107,163,150, - 11, 48,190,183, 55,198, 77,154,138,206,125, 70, 58, 98,172,233,140,246, 84,147,106, 82, 77,170, 73, 53,255, 75, 84,207,113, 88, -189,118,108,100,248,106, 3,212,206, 71,129, 14,190, 10,152,172, 90,152, 44, 44, 42, 76, 44,202, 12, 86,148, 25,108, 72,201, 53, - 32,110,127,203,115, 88, 25,197,170, 28,241,147, 16, 0, 76,165,193,115, 52,122, 34,182, 90,222, 95,181,252,195, 71,118,117,239, -102,121,105,140, 79,235,216, 20, 75, 54,195,240,140, 60,190,192,230,166, 18, 8,227,227, 99,243,207, 68,253, 52, 80,106,103, 31, - 55, 52,162, 99,183,219, 75,125,125,125, 1,220, 62, 5, 79,104,123,217,132, 83,145,175,181, 29, 52,126,185,231,199, 75, 22, 26, -120,124, 17,199, 8, 68,113,172,205,184,211,168,187,177, 1,141,216, 15,158, 72,122,253,220,165,107,125, 92,220, 90,227,102, 86, - 5, 42, 76,118, 88,237, 28, 92,149, 34,100, 94, 57, 98, 77,137,143,254, 78,159, 29,187,181, 25,197,182, 35,225,122,156,223,168, - 81, 35, 31,234,211,167, 47,127,241,226,183, 16, 28, 28, 12,163,209, 8, 30,143,135,214,109,218, 35, 37,225, 18,206, 70,190,207, - 26, 10, 83, 55, 2,120, 15, 64,190,179, 95, 82, 80,102,193,161,232, 60, 68,254,248, 45,248, 66, 49,189,157, 40, 20, 10,133, 66, -185,147,153,117,214,155, 29, 50, 90, 38,147, 41,229,254,136,113,224, 56, 2,150, 0, 28, 91, 21,121,226,254,136, 62,177, 54, 83, - 74, 75,115,199,113,236,249, 79, 55,111, 25,221,189,215, 32,126,152,191, 18,101,133,185, 56,123,234, 87, 59, 56,114,198,145,253, - 11, 11, 19,245, 50,175, 14, 15, 61, 50,249,193,221, 51,158,154, 85, 50,112,200, 16,133, 86,235,109,206,204,202, 52,124,185,253, - 27,219,145,159,246, 13,228, 96,127,180,176,240,166,190, 49,157,210,210,210, 79,234, 75,151,136,149,253, 1,180,229, 11, 24,139, - 49, 63,209,169, 22,225, 5, 89, 25,147, 62,124,255,157,212,199,158,157, 39,110,231,219, 30,121,165,124,164,100,230, 34, 62,106, -159, 57, 43,225,194,143,101,153, 23,159,118, 80, 42,167,158,180, 76, 0, 31,159, 61,123, 38,124,212,168, 81, 35,135, 14, 29, 74, -102,206,156, 9, 66,128, 95, 54, 63, 79,138, 82,206,126,143,202, 40, 86, 82, 51,207, 75, 90,212,153, 75,110, 15, 15,236, 41,112, - 87, 61,141, 45,223,254,100, 3,225,210,232,253, 68,161, 80, 40, 20, 74, 13,205,111,163,149,113,189,114, 60,173, 63,155,242,220, -188,233, 91,183,126,253,193,215,219,119,245, 55, 89, 44,190, 4,162, 12,214,110, 57,161,103,177,216, 81, 13,163,238,102,180,187, -123,199, 78, 95,126,254,233,155, 95,110,249,108, 16, 56, 54,132, 1, 82, 9,131,223,164, 54,118, 70, 83, 38,171, 81,179, 84, 80, -190,105,248, 67, 43,141,133,133,250,175,157,221,215, 88,120, 35,151,199,183,182,222,180,230,253, 21, 60, 30,127, 4,203,114, 66, -142,181,221,100,173,166,143,140,249, 55,246,195,225, 86,110, 40,106,100,219, 85, 0, 87,143, 31, 63, 62,224,248,241,227,189, 0, -124,130,202, 57, 20,163, 91,114, 94,204,133,229,195, 94, 89,248,202, 47, 11,192, 4,112, 28,129,157,229,210, 68, 70,195, 48,122, - 79, 81, 40, 20, 10,133, 82,195, 76,220, 57,104,169, 99, 17,173,191,138,226,226,164,114, 20,227,165,150,234, 20, 22, 38,234, 1, -220,209,115,207,208, 66,221,184,196,178, 31,144, 88,246, 67,115,247,175,200, 75,206, 7,146,103,180, 48, 27,142, 52,100,255,189, -106,185, 43, 20, 20, 92,175, 64, 1,122,211,123,136, 66,161, 80, 40, 20,167, 13,151, 99,141,225, 41, 20, 10,133, 66,161, 80, 40, - 77,154,172,218,107, 0,149,109,207, 27,234, 57,224,204,204,220,205,233,125,112,140,106,182, 88, 83, 8, 64, 12, 64, 9,160,169, - 42,205,145,168,154,175,145,150, 39,213,164,154, 84,147,106, 82,205,123,168,217,148,246, 49, 80,254, 84, 3, 70, 53,169, 38,213, -164,154, 84,147,106, 82,205,255,158,230, 63,153,153,245, 44, 0,254, 70,109,180, 40, 20, 10,133, 66,249,171,112,119,239,168, 4, -106,218,245, 54,137,220, 35,212, 11, 0, 12, 5,215,117,180,244, 40,245, 80,123,158,195,187,210, 70, 75,200, 19,136, 95,145,171, -220,175, 43, 52,238, 89,255,241,194,101,130,218, 40,230, 12, 31, 24,184, 55,184,173,108,130, 51, 59,202, 61,131,190,242,110,223, - 59, 93,161, 13,154, 3,159,238,178,150,100, 66,161,109,235,169,108,221,243,148,202, 55,252,129, 63,225, 24, 37, 97, 97, 97,125, -195,194,194,250, 2,144,220, 13, 65,185, 54,104,170, 95,135, 62, 81,218,118,221,126, 85,120,117,156,124,183, 51,172,244,233,224, -174,108,221,227, 7,101,171, 46,197, 74,159, 46,101, 74,191, 30, 39, 84, 30,161,237,154,218,175,245,248, 15, 67,222,221, 25,183, -179,245,248, 15, 67,234,219,238, 58,106,173,234,237, 93,137, 75,220,199,125,164,164,207,149,230,209,186,255, 84, 23,159, 65, 11, -220,157,221,207, 55,168,207,213, 54,225, 3,242, 90,117,236, 29,231,232, 62,126,193,125, 47, 6,132,245,215,249, 5,245,141,166, - 37,239, 24, 82,207,182,125,165,174,254,145, 18, 87,255,159, 36,110,109,135,180, 84,207,199,199, 71, 22, 18, 18, 50,170, 79,159, - 62,207, 13, 27, 54,236,229,110,221,186,205, 12, 8, 8, 24,113, 47,127,232,203,181, 65,111,152,133, 76,129, 89,200, 20,200,181, - 65,111, 52,253,124, 13,254,128,225,177,217, 12,143,205, 86,104,131, 63,248,187,156, 43,137, 87, 80,128, 92, 27,180, 90,229, 29, -118, 94,166,237, 56,206,217,253, 93, 93, 93, 71,120,122,122, 78,172, 94, 92, 93, 93, 71,208, 59,160,217,212,142, 98,181, 56,162, -197, 23, 74,228, 39, 31,123,234,197, 78,203,222,121, 93,186,102,203, 94,172, 89,178,240,154,185,162, 36,236,239,120,228, 30,109, -123, 69,243,121,124,191,218,105, 44,199,102, 22, 36,159,239,121, 55,244,131,219,200,158,126,243,213,233,243,167, 62, 18, 17, 16, - 49,118, 46,115, 35,217,184,207,113,139,134,174,223,253,240, 99,235,168,223,126, 93,187,101,203,230,247,242,237,193,171,133, 18, -193,167,101, 25, 87, 75,156,201,131,218,179, 93, 91,129,194, 35,234,254, 9, 47,122,199, 28,251,102, 43,107,225,134, 27, 10,106, -205,254,221,124, 60,219,183,111,127, 31,159,207,119,159, 51,103,142, 8, 0, 62,254,248,227, 14, 44,203, 22,222,186,117,235, 2, -154, 49,248,105,165,193, 12,158,254,201,138,119,191,126,224,129,209,200, 46,168,192,242,213,235, 7, 31, 62,248,221,195, 21,186, -196,239,239,198, 57,113,113, 9, 84, 67,164,186, 50,247,213,247,180,163, 6,223,199,215,155,236, 56, 28,117,105,192, 55,235,223, - 59, 15,132,246, 42, 47,184,222,224,152, 98,156,161,116,145,151,146,140,226, 12,165, 0, 48,245,142,151,189,210, 22,225, 41, 99, - 71,249, 72, 4,151, 10,129, 38, 39,125,116,105,211,255,136, 80, 34, 9,224,241,120,224, 49, 0,143,199,128,207, 48,149,243,132, - 90,141,105, 89,241,191,143,252, 59,220, 39, 42,255, 94,185,224, 11,220,121,204, 31,249, 99,120, 85,107, 66,202,114, 19, 79,186, -223,133,175,209,116,234,224, 18,222,191, 67,197,151, 39,146,139, 20,130,129, 47, 71, 50,132,247, 89,250,239,171, 47, 59,100, 0, -164, 82,215, 3, 7, 14,120,142, 26, 53, 74,163, 13,159,112,194,145,125,196,124,125,216,193,131,251, 69,163, 70,141,116,226,250, - 12, 26, 14, 30,111, 59, 3, 8, 57,142,124,204,231,200,119,250,194,132, 91,128,115,179, 79,201,180,193, 79,243, 64, 28,126,206, -112, 96,162,141,121, 55,182, 52,183,112, 5, 18,245, 48,161, 72,244,114,219,160,206,221,179, 82,111, 70, 87,232,203, 87,219,205, -165, 39,156, 22,178,217, 95, 57,246,123,204, 3, 2,161,144, 25, 53,172, 55,223, 12,252,218,146,147,238,229,229, 53,113,221,186, -117,237,250,246,237, 11, 0,176,219,237,234,221,187,119,123,191,255,254,251,138,132,132,132,230, 78,156,234,235,233,233,233, 47, - 22,139,125, 1,192, 98,177,100,229,231,231,167, 3,104,242,135,191,194,171,157, 7, 8,222,251, 61, 42, 74, 0, 0, 3, 6, 12, -252,192,255,254,217,174,124,145,210, 88,111,113, 88,202, 21, 37,183,126,157,119,246,220, 25, 6, 0,250,244,238,251,186,220, 35, -244,211,123, 25,217,146,106,131,123,243,128,249,125, 6, 68, 76,154,242,232,116, 94,120, 71,127,140, 24, 62,244, 53, 35,112,192, -169,107, 70, 32,144,157, 63,127,190, 61,143,199,227,219,237,118, 83,159, 62,125,210, 91,146,175, 86, 65,125, 79, 51,224,181,182, -218, 45,159,231, 39, 69,127, 0,220, 49,113, 12, 95,211,186,251,155,224, 11,158,229, 56, 46,163, 60, 61,186,223,191, 48,162,117, -103, 57, 59,171,196, 19,136, 95,158,250,228, 11,157,230, 45,248,159,116,238,154,227,136, 92,255,122,193,223,213,100, 1, 0,159, -199,247, 59,114,244,136, 86, 46,230, 3, 0,244, 38, 59, 30, 24, 53,170,233, 55, 66,155, 94,191,241, 24, 38,184,122, 66, 27,214, -110,149, 10,132, 98, 19, 83,105,144,192, 0,240,104,213,230,184,151,253,164,124,234, 35, 17, 1,219,119,253,156,153,158, 89,232, -244, 67,141,225,139,208,103,224, 8, 68, 12, 31,169, 57,127,238,244,123,155, 55,110,120,195,110,181,109,224,108,220,106, 83,209, -205,236, 38, 31,230,222, 29,123,136,149, 30,135, 39, 61,247,190,187,137,231,134,197, 75, 62,241,136, 58,180,227, 68, 86, 70, 87, - 46, 45, 45,195, 68, 24,230, 90,113, 81,206,203, 21,185,183,110, 56, 90,100, 74,165,178,157, 82,169,236,218,165, 75, 23,233,194, -133, 11,133,131, 7, 15,254,195,178,207,156, 41,250,237,183,223,124, 86,174, 92, 57, 58, 54, 54,214,164,215,235, 47,235,245,250, - 36, 56,209,208,222,219,219,115,246, 67, 15,142,195,208, 73, 47,130,229, 24,204,124, 97, 30,142, 28,218, 51, 11,192, 93, 49, 90, - 54,185,250,253,103,159, 91,232,217,231,190,110,252,247,118,220,128, 76, 44,192,200,158,193,204,147,115, 22,185,108, 89,251,222, - 23, 40,192,160,250, 34, 89,156,161,116, 81, 39, 15,203,163,227,251,182,197,254,157,150, 71, 49,236, 85,240,228,154, 15, 50,246, -255, 47, 30, 0,218,141,154,163,146,176,249,235, 90,185,240,181, 18, 54,127, 93,187, 81,115,142, 37, 29, 94, 87,222, 88, 94,132, - 18, 73,192,206, 29, 59, 58,186,170, 68, 16,240, 24,240,249, 12, 4,124, 30, 76, 22, 22, 15, 63,242,232, 93,187,204,101,218,142, -163,121,192,147,149, 47,108,124,101,204, 75,252,201,153,115,194,240, 69,238, 7,247,255, 40,208,106, 36,224,243, 25,240,121, 0, -159,199, 32, 85,103,196,211, 79, 63,169,105,169, 97,127,160,191,246,190, 87,166, 4,143,236,211,201,173,203,183,103, 24, 77,159, - 7,166,184, 23,152,228, 79,236,218,247,235,163,100,192,188,115,132,112, 43, 50, 79,126,114,180, 49, 17,179,217,172, 27, 57,234, - 1, 53, 35, 80,200,143,237,221, 58, 80,192, 99, 96, 99, 9,236, 44, 1, 91, 53, 55, 42, 83,245, 11,134,199, 99, 64, 56,130,103, -159,125, 26, 35, 71, 61, 96,224,236, 92,166,227, 15, 57,222,246,195,199, 78,121,154,109, 28, 86,174,219,242, 94, 69,105,254,123, -201,241,238,169,250,210,130,121,198,188, 68,135,231,193,224,129,244,204, 72,138,123,110,199,193,179,232, 20, 22, 10,150,171,204, -103,176,159, 2, 59, 34,207, 34, 36, 56,164, 50,223, 28,249, 63,123,103, 29, 29,197,245,183,241,103,214, 53,238, 9,193, 3,193, - 18,220,221,139,107,209, 66,113, 90, 74,141, 34, 45, 45, 80,180, 20,167, 64, 11,148, 82,160,184, 7, 11, 14,165,104,128,144, 0, - 73,136, 19,223,216,186,239,220,247,143, 77, 40, 18,217, 0,125,251,107,123, 63,231,236,217,204,100,247,217, 59,115,103,238, 60, -247,123, 13,181, 3,229,104,214,180, 25, 0,188,150,209,226,137,156,190,233,208,123,244,130, 62, 67,199,193,219,203, 11, 28, 98, -233,115,238,196,111,125,126,217,248,253, 23, 86,131,106, 69,133,196,136,237,217,115,129,176,236, 27, 71,157,252,253,253,189,154, - 53,251,115, 58, 70,171,213,138,106,213,170, 33, 61, 61, 61,248,117,234,105,126,126,126,189,231,205,155,231,221,171, 87, 47,190, -175,175, 47, 0, 32, 43, 43, 43,224,244,233,211,141,231,205,155,151,147,153,153,121, 2,101,204,232, 99,179,112, 4, 28, 30,184, - 98,177,212,126,140, 96, 56, 51,166,189, 23,234,227,231,111, 44,233,243, 10, 69,150,112,230,135, 23, 25, 30, 79, 80,244,121,112, - 8, 97,153, 50,162, 68, 93,249,124,126,137, 45, 20,102,174,115, 75,194,119,153,192,225,114,236, 23,171,213,162, 40, 72,189, 91, -183, 2,145,184,250,124,161, 96,211,224, 97,227, 90, 15, 25,212, 31,126, 94, 46, 56,247,123, 36,166, 76,251,204, 98, 53, 91, 86, -189, 86,225,193,229,242,114,114,114,146,221,220,220,124,223,252,121,203, 84, 63,123,230,148,247,185,243, 23,102,175, 92,179,110, -170,217,100,181,176,132, 60, 91,199, 88, 34, 17,241,187,245,121,215,217,187,102, 75,241,186,121, 19,248,255,194,136,214,230,183, - 98,180,132, 18,167,119,191,158,249,145,120,225,174, 27, 56,177, 97, 74,174, 78,149,235,245,172,166,224,236,122, 87,171, 42,108, -252, 58, 41,148,123,213,110,197,112,121,147, 25, 46, 87,198,112, 24, 33,107, 99,159, 90, 77,166, 69,250,188,184,204, 55, 61,122, -150, 37, 56,248, 71, 78,197, 12, 16, 65,208,206,189,135,189,125, 92, 69, 48,152,109, 24, 54, 98, 52,118,236,216,225,228,229, 34, -132,193,100,197,247, 43, 87,170, 53,201, 39,188,147,159, 22,164,119,237,251, 89,120, 66, 82, 78, 84,106,166, 97, 95, 69,211,102, - 52,219,160,210, 89,161, 51,114, 80,171,126, 51,124,191,170,142, 56, 53, 37,241,179,237,191,108,157,254,240, 33,119, 7,203,229, - 44, 48,100, 62,122, 90,226, 77,231,219,160,135,179,155,199,238,129,147, 23,187,198,229,240, 64, 96, 70,188,179, 24,239,142,157, -238, 92,195, 87, 2,153,152,235,154,152,146,238, 55,227,139, 47,126, 79,176,145,230, 42, 69, 66, 98,121,233,169, 90,181,234,160, - 62,125,250, 72, 63,255,252,115,126, 96, 96, 32,126,249,109,127,149,118, 61,134,246,205,200,204, 14, 36,132,192,199,219,251,233, -196,247,135, 30, 63,121,242,100,202,211,167, 79,249,203,151, 47,111,113,248,240,225,122, 89, 89, 89, 14,215, 76,109,132,192, 96, -180,193, 86,244,128, 84, 40,141, 21,246,167, 1, 1, 1,162,244,244,116,227,115, 81, 6,230,207, 64, 33,211,163, 75,135, 22,188, -159, 78, 37, 65, 99,176, 65, 38,230, 35, 41, 91,135,166,141, 66,152, 45, 54,107,195,146, 4,199,191,219,123,174,143,156,244,236, -215,170, 58,188,221,164,216,246,195, 98, 28,187,158,216, 51, 91,195, 96, 61,225, 78,246, 19,241,186,201,216,204,245, 29,155,214, -244,237,220,164, 10,110, 55,173,233,123, 37, 34, 38, 86, 50,116,229, 71,233, 26,254,185,130,211,211,213, 37, 23, 60, 28,184, 59, - 9,240,243,153, 20, 72,197, 60,200,196, 60,200, 68,246,119, 14,135,121,179, 90,173, 95,221, 64, 46,107, 27,207,229,242,198, 15, -127,119,168,255,200,225, 67, 9,184, 28,236, 63,120,188,255,174, 93, 59, 51, 45,102,211, 86, 27,135,251,115,105,215,207, 11, 39, -148, 3,120,187, 8,241,197,214, 40, 56, 75,248,112,146,242,225, 44,229,163,115,168, 23,184,175, 63, 9,140,219,148,254, 53,122, - 77, 25, 88,181, 83,112,101,121,173,251,241,202,135,227, 23,221, 89,115,169,176,211, 39, 63,172,174,231,161, 41, 52,241,190,153, - 49,145,151,150,145,209,105,255,241,203,157,109,166,113, 49, 86,179,246, 75, 69,228,254, 18,163,194,105, 49,215, 27, 7,180, 28, - 34, 54,107, 44, 15,238,199,164,213, 44, 48,138, 16,157,172,130, 76,204,131,188,248,220,138,121,144,137,249,144,139,121,200, 72, - 75, 66,190,150,251,123,186, 7,167, 19, 46, 95,183, 86, 36,225, 6,179, 13,247, 18, 53,168, 26,220, 8,126,126,254, 48,245, 26, - 85,245,230,133,131, 71,111, 93, 62,178, 84,151,245,248, 75, 71,117,126, 11,187,129,217,159, 78,142, 96,128,187, 69, 15,233,198, -223, 44,219,208,228,219,217, 31,190,176,111,198,130,117, 77, 94, 63,146,229, 52,183,243,192, 15, 22,180,235, 54, 16,234,252,108, -252, 17,190, 15, 61,250, 12,198,168,113, 31,195,213,213,243,251, 85,139,102,222,183, 26, 85, 23, 94, 41,115,125,235,180, 13,105, - 80,119, 87,128,191,127, 32,203,218, 87,249, 32, 4,208,168,149,152,249,201, 68,176,132,160, 97,227,230,157,197,237,186, 17, 82, -180, 26, 72,110, 94,174, 54,230,241,195,174,134,156,152,155, 14,159, 75,131,193,162, 80, 40,112,239,222, 61,196,198,198, 34, 58, - 58, 26,121,121,121,112,113,113,209,104,181,218, 10, 5,239, 67, 67, 67, 71, 94,184,112, 65,236,230,230,246,108,167,201,100,130, -147,147, 19, 70,142, 28,201,239,222,189,123, 64,239,222,189,199, 68, 69, 69,253, 6, 64, 85, 98,122,242,159,100, 56,249, 4,255, -216,161, 99,135,169, 0, 32,113,246, 75, 92,255,203,241,232, 50, 43,180, 46,254, 85, 90,183,110, 83, 19,132,128, 1, 89,171,203, -139,205, 42, 35, 74, 36,187,113,227, 70, 13, 46,151,203,251,243, 25,196, 98,227,182,189,117,206, 94,125, 48,104,217,247, 43,196, -206, 50, 17, 20, 74, 19, 38,140, 26,232,240, 51, 88,226, 19,220,171,117,235,246, 71,191, 93,240, 53, 79, 46,147, 33,252,102, 2, - 62,250,228, 11, 67,102,114,212, 10,194,242, 55,232, 20,177, 57,111,248,168, 36,120, 11,212,170, 36,135, 83,191, 30,226, 41,239, -245, 19,155, 44, 54, 20,106, 45, 48,154,109,176,177, 4, 74,173, 5, 15, 83,213,240,116,174,248, 82,110,132,144,102, 0,188, 0, - 40, 24,134,185,253,252,118,113,133,174,216, 27,191,180,157, 91,244,124,240, 0, 96,130,125,164,254,179,203,167,104,187,180,253, -197,223,127, 8,160,110,145,166, 13,192, 45,134, 97, 10, 74, 49, 91,175, 68,185,120, 97, 97, 97,164, 79,159, 62,207, 74,252,151, -183, 95, 70, 36,224,251,203, 92,188, 64,200, 35, 60,191,128,177,183,111, 64,222,138, 85,107,220,167,125, 48, 57, 69, 85,152, 95, -165,104,247, 57, 71, 30, 22, 60,134,187,170, 67,155,150,221,167,126,240, 1,130,107, 84, 18,216,108, 54, 18, 21,155,104,217,254, -243,182,177, 87,174, 11,215,168,210,162,230, 62, 23,130,172,208,176, 79, 27,107, 75,123, 57,130,101, 99,109, 47,215,110, 95,209, -100, 24,192, 85, 46,196,143,167,146, 64, 8,192,128,192, 69,198,199,158, 75,105, 72,140, 56,164,234,211, 80,165, 29,185,108,126, -231, 78,189,166, 95,120, 24,111,216,151,147, 99, 56, 3, 32,171, 44,205,146, 11,116, 22, 70,179, 13, 22,171, 21, 7,142, 31, 71, -207,206, 45,208,186,117, 11,180,111,215,154,119, 39, 34,114,220, 7, 83, 39, 6,226,207,209, 29,207, 52,197, 62, 65,205,228, 46, -158,251, 6, 77, 93,238,244, 32,205, 10, 30, 23,168,238, 43,129,187,147, 0, 38, 43,131,100,133,185,232,206,113,197, 71, 51,218, - 68,194,144, 0, 0, 32, 0, 73, 68, 65, 84, 22,184,207,254,108,234, 73,149, 66,216, 0,120,100, 46,235,216,117, 58,157,112,244, -232,209,124,139,197, 98, 30, 57,225,227,238, 89, 89,138,254, 27,215,126, 39,242,246,246,129,206, 96, 69, 68,244,147,186,223,126, -187,160,250,241,211,151,142,204,255, 98,202,209,158, 61,123,186,236,221,187,151, 45,239,124,190, 80, 67,204,206,253, 97,219,174, - 3, 59, 86,175, 88,130,152,148, 2,252,252,211, 6, 16,155,245,199,114, 78,213,243,154,100,244,232,209,146, 35, 71,142, 84, 74, - 75, 75, 83,233,116, 58,197, 11,241, 8, 14,195,203,206,215,193,211, 73, 8, 1,143, 3, 31, 55, 49,188, 93, 68,224,115, 1, 14, -195,216, 74,210,252,121,223,137, 69,172, 78,137, 99,187, 77,195,183,253,176, 24,227,166,125,133,168, 92,225,105,142,212,101,209, -135,195, 7,205,246,146,216,122,250,187,114,188, 59, 55,169, 10,153, 88,128, 57,211, 71,163,121, 68,178,119,122, 33,251,149, 66, -207,109,180,224,244,179,197,186,207,189, 24, 28,177, 71,176,156,164,124,156,222,245,125,142, 86,169, 80, 22, 55,201,153,140,134, - 20, 7, 47,227,115, 37,212,108,103, 55, 10,169,191,120,234,164,241,156, 54,173,154, 19, 14,135,143, 92,181,137, 33, 4,248,228, -163, 41,248,112,202, 68,223,167, 25, 57,223,108,216,240,227,220, 11,103,201, 66,173,226,241,252,178, 52, 57,140, 61, 10, 36, 23, -243, 32,151,216,141,139, 92,204,131,193,100, 3,195,128,235, 90,185,177,146,177, 71,114, 51,242, 83, 74,173,129,191,160,233, 94, -185,254,249,179,137, 78,117, 10,246, 21, 92, 79,202,136, 94, 20, 17,153,125, 11, 64,126, 96,123,215, 49,102, 43,129,198, 96, 69, - 82,182, 14, 86, 51, 97,198,189, 83, 5,213,134, 48,193, 75,182,221,221,113, 42, 18,206,207, 21,250, 47,104,166,223, 56, 96,240, -104, 48,112,216,234,117, 63,221, 94,177,248, 43,110,174,210, 4,150, 16,136,133, 92, 72,132,188,162, 23, 23,122,173, 18, 27, 54, -109,201,178,130, 25,132,203,151,173, 21,185, 62,193,146, 81, 3,123,181,223,195, 0, 66,134, 35, 72,243,175, 82,181, 74,151,190, - 99,197, 93,250,141,134,205,106,154, 29,113,149, 92,212,229,196,156,119, 68,179, 65,189,186, 96,128,187,218,156,216, 41, 0, 32, -243,174,253, 99,157,224, 58, 77, 94,222, 23, 20, 20,220,196,145,124,127, 22, 41, 21, 59, 77,115,115,247,250, 42,184,126, 35,239, -236, 2, 35,227,228, 81, 9, 73,113,247,176,123,211, 55, 59, 89,131,105,193,249, 19,251, 22,175,249,249,240,187, 93,122, 14,196, -182,141,223,205,201,203,124,102,180,206, 61, 23,173, 26,181,125,235,230, 64,190, 80, 4,139,149,133,197, 70,236,239, 86, 27,242, -243, 11, 96,177,178, 16, 75,157, 96,101, 25, 88,108, 44, 44, 86, 22, 70,147, 85, 54,101,116,239, 15, 12,192,205,146,210, 25, 80, -167,195, 25,129, 72, 84,133,192,190,118, 45, 33, 4, 73, 89,122,142,159,159,223,111, 0, 32, 18,137, 32, 18,137,192,178, 44, 34, - 98, 20,211, 60,131,107, 79, 69,145,193,179,153, 77, 41,133,201,215,122,148,118,236,190,190,190,125, 95, 54, 89, 6,131, 1, 26, -141, 6, 87,175,223,118,217,186,227, 64,207,164,148,180, 26, 44,113, 49, 58,121,215,232,161,206, 73,232, 91,218,249, 84,103,199, -124,224,220,114, 34,231,243, 15,199, 4,173,219, 30,118,235,201,153, 69,101,246,211,170,214,101,150,233,243,201,131,155, 46, 91, -251,115, 92,193,181, 31, 63, 45, 47,143,120, 60, 30, 95,161, 80, 60,187,191,215,111,217,221,244,110, 76,250,128, 53,171,215,136, - 35, 18,212,120,144,148,129, 49, 93, 43,219,107, 56, 14,228,187,204,167,134,103,245,154, 53,127,219,176,118, 25, 47, 46,195,128, - 31, 14,221,194,133,163, 63, 94,205,202,185,217, 19,217,153,250,215, 41, 67,222,130,209, 42, 85,243, 98,100, 46, 52, 6, 43,140, - 38, 43, 44, 44,129, 74,103, 65, 78,161, 9, 42,157, 25, 26,189, 21, 99,186, 85, 46,241,123,229,248, 17, 47,134, 97,194, 8, 33, -125, 8, 33, 93, 1, 8,139,183,237,207,108, 38,172,200,144,189,176, 61,123,246,236, 47,151, 46, 93, 26, 93,252,217,226,253,197, -159, 45,107,255,115,223,247,152, 51,103, 78,131,101,203,150, 45,105,213,170,213,158, 63,254,248, 35, 17, 64,129,163,205,135,188, -231, 15, 38, 44, 44,172,188, 19, 93,195,108, 49,139,156, 37,124, 84,175, 86, 25,239,127,185,205,243,215,101,227,115,196, 66, 30, -247,212,169, 83,238,121, 38, 57, 56, 28,174,195, 85, 20,185, 87,173,214, 2,129,240,196,202,149, 43, 49,188,111, 59, 73,106,174, - 69, 19,153,170,207,214,154, 96,245,246,170, 45, 92,180,100,153,124,217,242,239, 63, 12, 59,198, 22,106,178, 31,126, 95,114, 19, - 95,211, 59, 92,230,185, 62, 88, 12, 3,194,218,210, 10,146,111, 55, 5,128, 55,233,139,165, 49, 88,192, 45,234, 91,195, 48,128, -206, 96, 5,151,203,228, 20,198,236,123, 56,114,225,162,206, 59,247,156,205, 32, 28, 87,181, 86,155, 36,133,125,205,193, 10, 99, - 48,217, 96,180,216, 16,125, 63, 2,237, 91,214, 67,235,166,117,160, 51,216,160, 51, 90, 81,173,102, 48, 0,120,150,152,113, 92, - 78, 34,177, 89, 12,132,216,156,250, 52,243,130,183,171, 16,126,110, 34,136,132, 60, 88,172,128,222,196,194, 96,178, 33, 57, 71, - 15,181, 94,130,144, 14, 67,171,123,248,221, 49,102, 37, 75,142,228,167,222, 25, 84,166, 57,181,217,176,253,183, 3, 65, 25, 25, -217,253, 79, 30,217, 37, 82,168, 44,136, 76,214, 34,167,208, 8,112,189, 48,111,201, 15,162, 89,159, 78, 26,176,125,247,193,148, - 46,237, 90,164, 84,244,152,117,138,152,157,251,246, 31,248,177, 79,159, 1,146,232,155, 39, 17,119,239,252, 98,109, 78,133,250, -103,113, 26, 54,108,104,157, 52,105,146,122,201,146, 37,129,199,142, 29,171,166, 80, 40,238, 1,176,184,186,186,214,169, 29, 84, -229,126,248,233, 83, 1,189, 7, 12,229,167,229,234,225, 34, 21,160,138,183, 20,215,175,158,177, 8,133,252, 18,251,155, 20, 53, - 15,142, 64,151,153, 56,118, 61,177,103,116,158,248,210,196,241, 99, 82,194,175,196,228,173,223, 17,254, 93,128,220,114, 79,204, - 42,214,223,105, 90,211,119,246, 71,163,177,116,221, 78, 92,142,136,201,209,114,252, 22,103, 26,173,103, 75, 15,165, 3, 60, 46, - 3, 39, 9, 31, 90,149, 66, 25,127,247,116,237,183, 20,166, 30, 19,126,100, 39, 39, 95,109,193,211, 92, 3,147,145,175,134,141, - 37,112,149, 10, 96,101, 9, 10,243,115,153, 93, 59,119,224,246,237,235, 28,112, 57, 19, 0,204, 47,243,132, 50,246,166, 66,185, -152,111,143, 8, 73,236,239, 22, 27,139,224,160,154,216,188,126,149,179,167,183, 15,218,182,119,188,111,180,147, 71,149,134,123, -126, 89,143, 75,127,220,237,120,121,205, 15,205,228,254, 94,235, 24,198,182, 2, 4, 6,163,217, 6,101, 97, 1,132,166,167,104, - 30,160,128,187,212,134,100,149, 31,162,178,226,228,229, 21,248,121, 81,135,239, 49,100,192,220, 3,199, 47, 44,237,209,173, 35, -162,146, 85,144, 8,121, 16, 11,185, 16, 11,185,224, 51, 54,172,218,244,163,165, 64,169,238,147, 23,125, 52,247, 53,174,207,115, - 69,181, 95,187,185,179,105,188,118,174,155,251,235,196,153,203,123,244, 28, 56,150,137,186,125,241, 75, 29,112,222,177,138, 30, -113,104, 31,203, 58,254,140, 19, 59,121,174,157, 62,107,209,244,238,125,134,130,203,229,193, 98,177,224,224,222,157,248,229,135, -121,143, 77,154,188,177, 0, 88, 83, 14,119,210,190,157,155,134,206,252,102, 21,211,160, 97,243, 22, 23, 51, 95, 93,142,150,229, - 50, 63,189, 55,126,242, 48, 31, 31, 31,167, 63, 35, 90, 4,181,131,235,161, 87,191,193, 56,115,244, 48, 30, 70, 71,130, 37,118, -195,196,178, 4,133, 5,121, 89, 86,139,105,123,169, 45, 30, 98,113,149,109,191,236,168,197,225, 48, 48, 91, 88,152,172, 44, 62, -253,224,125,211,148, 79,190,108,219,171,123,135,104, 33, 23,170,228,212, 76,215,235,119, 31,133,176,124,121,224,248, 25,171, 4, - 6,163, 13, 74,157, 5, 39,127, 46,221,235,136,221, 42,183,170,218,164,215,248, 41, 95,111, 22,137,184, 28,115,253,218,129,137, - 29, 90,214,127, 90,217,223, 83,253,237,178, 31,154,255,126,243,110,175,119, 71,142, 23,143,169,211,132,241,247,144, 56,189, 63, -114, 96,168,205,106,126, 79,151,255,180,212,249, 5,249, 82,183,194,202,213,130,116,127, 70,140,106, 31, 98, 8,170,191,224, 60, - 24, 36,234,179, 99, 7, 1,128,159,127,101, 3, 95,228,172,174, 64, 4,134, 0,192,186, 45,187,155,222,143,205,152,184,122,245, - 26,105, 68,130, 26,247, 18,148, 16, 9, 56, 48, 91, 88, 48, 14, 6,181, 89,194,157,252,213,156,217,206, 5, 90, 27, 46, 69, 42, - 16,125,231, 34, 49,105, 12, 35,165, 86,231, 65,240,118,122, 15, 64, 77, 0,241, 12, 67,126,210,102,251, 30, 5, 46, 91, 43,122, -221,179,172,189,190,236,236, 85,163,186,141, 39,234,197, 23,202, 90, 49, 12,169,207, 16,184, 1, 36, 61,191,232,153,234,168, 83, -211,102,199, 98,249,146,111,176,118,235, 97,100,228, 25,224, 98,123,138,163, 63, 47,194,231, 75,127,131,222, 88,122,175,134,242, -252, 72, 73,198,232,101,195, 85,252,119,241,231,150, 46, 93,218,231,165,188,233, 83, 74,158,189,242,185,226,239, 47, 91,182,108, -201,115,255,215, 57,106,178,158, 25,173,226,131, 42,199,108,213,246,242,171,242,199,209, 35,135,220, 10, 52,102,136, 5, 92, 84, -174, 22,132,249,235,143,122,189,211,212, 19,185,102, 23,236,222,188, 34,223,160, 83,239,117,168,176,240, 14,110, 33,145,203, 78, - 30, 58,120, 24, 53, 42,123, 11,118, 93,205, 79,186,155,168,127, 22,234, 85, 41, 82,132,213,156,117,188, 65, 3, 7, 74,207, 95, -184,248,137, 6, 40,209,104,113, 25,110,165, 45, 59, 14,122, 59, 73,248, 96, 24, 64,173,183, 98,226,123,131,223,252, 49, 70, 88, -238,248,177, 99,192, 20,153, 44, 85, 94, 22,190,156,245,129, 65,102,137,123,152,154,156,154,222,181,239,231,231, 85, 26,198, 48, -108,244, 7,183, 31,198, 46, 45,208,233, 94,111,145, 31,163,201, 6,163,153, 69, 66, 66, 60, 62, 29,211, 13,124, 46, 7, 92, 46, -107,239, 44,109, 45,253, 98,212,100,196,230,195, 87, 48,100,231,202,105, 91,252,125,188, 61,228, 50, 9,145, 75, 69, 76,253, 58, -181, 4, 45, 91,182, 22, 86, 11, 14, 21, 92,125,164, 71,170, 66,143,196, 12, 37, 68, 62,141,120,195, 59,191,131,157,107,102,116, -204, 79,189,195,193,171,157, 20, 95,224,236,165, 27,125,183,110, 90, 45,202, 46, 52,227,113,170, 6, 89, 5, 6,100, 22, 24,145, -149,111,128, 92,194, 71,251,126,147, 68, 39,142,254,212,183, 75,187, 22,235, 94,231,184, 19, 19,147, 78, 36,167,103, 14, 13,109, -220, 28, 59,127,253,165,157,171,107, 53,231,194,194, 36,149,163,185,179,104,209, 34,225,178,101,203,120,235,215,175, 87,181,108, -217,210,119,206,156, 57, 61,114,114,114,110, 85,173, 90, 53,248,204,161,237, 23, 26,181,239,223, 12,172,217,171, 93,135, 78, 2, - 17,203, 67,120, 88,152,121,223,222, 93,121,122,189,122, 74,153,134, 67,234,178, 40, 91,195,192, 43, 32, 32, 90, 46,180,117,227, -113, 10, 99, 11, 78, 79,223, 81, 0, 28,170,209,243,163,115, 23,239,196,196, 54,141, 72,246,190, 16,241, 36, 39, 95,103,174,157, -112,250,243, 50, 11, 94, 46,195,128,207,229,192, 73,194, 3,167,168, 84,149,251,135, 62, 1,195,120, 21, 71, 78, 25, 48, 69,239, - 0,195, 32,163, 32,245,158, 3,125, 54, 24,194, 18, 32, 38, 77, 11,141,193, 30,154,175,228, 41,133, 34, 59, 13, 27,215,109,199, -221, 59,183,209,253,157,126,216,176,101, 23, 38,190, 55,212, 80, 94,237,135,195, 41,138,104, 61, 23,205,146, 75,120, 0, 24, 20, -106, 45, 56,248,251, 83,212,172,206,113,248,193, 0, 0, 78,114, 41,148,106, 61, 56, 2, 39,196, 71,156,148,158,186,120,115,206, -220,133,171,191, 40,200,140, 76,125,242,224, 42,130, 61,149,168, 30, 96, 70,116,150, 51,238,228, 85, 67,112, 80, 13,112, 4,183, - 29,210,206,141, 14, 89,126,148,115,176, 79,211, 70,245, 90, 85,241,118,133,222,100, 43,138,106,113,241,203,182, 29, 72, 78, 74, - 27,159,247,240,232,221,183,225,104,181, 57,137, 10,145,119,208,135, 15,110,158, 79, 28, 56,242, 67,248, 5, 84,110, 88,152,122, -207,225,110, 11,142,236,179, 57,104,180, 4, 82,215, 57,159,126,245,221,244,238,189,135,224,198,213,243,184, 23, 29,143, 22, 45, -154,225,157, 1,195,161, 86,229,215,217,191, 99, 77, 55,171, 78,125,134, 39,178, 78,111,222,186, 51,195,218,108,136,123, 28, 21, - 95,146,150, 62, 51,230,222,245,204, 24,231, 23,154,167, 60,235, 52,148,187,184,223, 51,154,109, 72, 79, 79,195,181, 63, 46, 53, -214,103,198,220,171,200,249, 18, 9,184, 8,191,155, 3,179,133,133,217,202,162,125,135,110, 38, 1,199,216,110,241,234,109, 45, - 51, 51, 50, 57, 50,103, 79,214, 61,160,174,192, 79,100, 54,222, 79, 80, 10,204, 22, 22, 53,252,101,101,106,122,249, 7, 45,153, - 49,227,211,186, 92,129, 4,106,173,209,148,153,145,238,187,121,247, 69,205,163,199, 15, 2, 42,121,187, 56,127,183,230, 39,129, -202,192, 32, 71,105, 68,190, 90,197,140,156, 60,211,127,235, 15, 75, 71,149,101,180, 74,232, 46, 82,253, 68,248,213, 58,110, 78, - 2, 70, 99,176,178,121, 42,179,109,228,128, 55, 27,116, 89,100,178, 38,173, 94,181, 70,122, 55, 65,141,251, 9, 74,136, 5, 92, - 8, 5, 28,152, 44, 44, 28,188,157, 56,190,222,190, 83, 90, 55, 13,193,153,123,185,224,114, 57,208,171, 11,116, 60,228,197, 54, -237,216, 93,218,164,121, 75,116,234,216, 1, 79, 98, 99, 42,135, 29, 59,216,229,250,181,203, 89, 86,115,237,105, 90, 69,236,225, - 10, 5, 22,116, 58,174, 69,232,251,190, 95, 64,213, 54,131,134,191,239, 82,165,114, 0,227,237,233, 1, 43,225, 97,210,123,131, - 29,190,243,237,198, 28, 88,182,112, 14,140, 70, 19,188, 92,133, 32, 4,216,182,110, 62, 76, 38, 19,252, 61, 68, 80,106, 75, 95, - 77,174, 60, 63, 82, 90, 20,170, 66,125, 79,158, 51, 99,101,237,103, 24, 38,108,246,236,217, 95, 2, 32,179,103,207,254,178,120, -123,233,210,165,122, 0, 25,229, 52, 29,110,126,193,104, 21, 31, 92,233,119,183, 32,216,211,195,239,122,248,153,211, 46, 71,238, -179,184,113,248, 14,122,183,240,131,128,199,129,212,197, 31,247,147,148, 56,113,104, 83,225,209, 61, 63,165, 27,141,198,239,203, -111,107, 14,106, 42,151,202,206,252,186,115, 47,235,233,225,193,217, 24,174, 72,200, 83, 91,159, 53,105,197,222, 60,198,222, 57, -179,217,143,128, 57, 45, 22,139,131, 76, 38,147, 91,121, 25,187, 45, 60,165,168, 19, 47,243, 54,202, 86, 48, 92,174,109,231,174, -157,240,116, 22,194,104, 97, 49,251,139,143,245, 99,186,203, 11, 71,190, 59,188,115,167, 94,211, 47,240,101,181,206,183,110, 92, -139, 52,106,212,168,144,203,229, 58,212,149,194,219,219,123, 62,135,195, 25, 33, 20, 10,157, 76, 38,147,218,196, 26,164, 90,131, - 9, 6, 51,160,211, 25,192, 23,216,205, 34,159,203, 64,111, 48, 65,167, 55,149,125, 99,100, 69,253, 14,160,182,234,185,152,210, -249, 71, 53,132,191,237, 63,250,241,144,119,135,205, 13,104, 56, 64,158,148,169,132,128, 49,163, 89, 93, 63, 92, 60,125,152,164, - 37,199,126, 90,158,201, 2,128, 28, 69,126,160,151,151, 15,238, 38,106,144,158,167, 71, 86,145,201,202, 44, 48, 66,173, 87, 35, -180,138, 63, 10,149,202,192,215, 62,191,192,225, 51,103,206, 12,237,213,127, 24,166,127,177,160,237,207,155, 86, 68,202,132,252, -113,218,236,184, 75,142, 24,173,168,168,168,252, 89,179,102,213,220,178,101, 11,103,212,168, 81,250,144,144, 16,241,232,209,163, -219,238,216,177, 67, 44,149,138,245,247,175, 30,155, 59,225,163,217,253, 55,175, 93,212,176,160,160,128,177, 90, 44,167,204, 5, - 5,179, 53,229,152,185,167,199,190,124, 60, 47,193, 60,182, 91, 59,175, 99,238, 82, 78,125, 17, 49, 13, 71,221,249,123,241,104, -190, 57,225,244,122,181,100,232,202,143, 50, 10,217,175, 12, 28,239,197,229,153, 44, 0,224,112, 25,152,172, 54, 56, 73,248,224, -112, 56,197, 38,222,239,151,189,167,164, 94, 46, 66,240,185, 28,240,184, 12, 84, 58, 11,114, 85,102,124,248,190,163, 51,132, 16, -214,106, 35,208,155,172,208, 21,213, 14,213,170, 92,204,249,226, 51,188,211,119, 32, 38, 76,249, 12, 5,122,224, 78,162, 26,102, -139,165,220,155,130,195,112,160, 51, 90, 49,174,123, 21,228,107,204,208,234,173, 48, 89, 89, 72,133, 60,240,121, 28,200,196, 60, - 56, 75,249, 0, 33,130,226,194,132,207,231, 27, 44, 22,203,206, 50,106,244,168, 22,232, 3,189,133,131,230,195, 86,160,107,171, -218,136,254,253, 32,239,242,141, 7,213, 63,249,226, 43,124, 60,177, 47, 14, 60,174, 9,119,239, 42,144,203, 36,176, 16, 14, 0, -226, 96,135,189,249, 44,199, 60,112,196,143, 91,182,197,124,251,205,108,113,161,150,129, 72,192,197,133,243,231,112,253,230,157, -181,185, 15,143,238,196, 91,132, 79, 56, 62,206,206,206, 16, 11,185, 48,153,141, 38,199,187, 46, 16, 16,160,177,204,187,246,143, - 69, 53,254,198, 54, 22, 37,236, 43,223,104,241,196,206,179,167,125,241,237,146,238,189,135, 32, 60,236, 0,246, 31,216,107,107, -213,115, 60,119,215, 47,155,208,182,107, 63,180,237, 62, 12,167, 14,239,248, 76,203, 50,245, 38, 77,159,187,176,125,231, 94, 8, - 63,113, 0,217, 89,105, 43, 29, 77, 47,151,207, 76,239,220,173, 47, 12, 38, 27,218,117,233,131,211,199, 15,127,132,162, 65, 22, -142, 63,196, 94, 42,159,193,177,126,246,233,116,126, 78,161,137,175, 80,153,144,166,208, 33, 41, 91,135,163,123,126, 38,142,151, - 23,166,102,237, 67, 43,241, 39, 45,191,240, 52,176,146,159,145,111,212, 75, 98,227, 19,234, 76,120,127, 12,191,122, 80, 29, 78, -142,210, 8,133,210,136, 92,165, 17, 26,131, 21, 65,149,106,113, 44, 86,166, 85, 69,243,217,211, 69,200,223,112, 60, 17,206, 50, - 62, 90,215,121,253,129,182, 44,203,254,105,178, 86,219, 77, 86,100,162, 18, 34, 1, 23, 34, 1, 7, 34, 1, 23, 86, 27,113,168, -226, 34,241,174,221,235,195,105, 31,248,155,172, 64,158,210, 4, 30,151,129,183,167,155,172, 89,195, 17,216,182,226, 35, 0,192, -196, 89, 27, 49, 97,220,104,212,173, 31,130,194,130, 2,223, 17, 67,122,173, 6,112,216,209,180,158, 12,191, 84, 57,252,202,221, - 89, 31,206,152, 39,127,183,111, 39,238,189, 4, 37, 50,243,141,136,143, 85, 87, 40,242, 6, 0, 86, 27, 11, 2,130,237,123,195, - 32, 17,242,160, 80,154, 65, 8,193,162,245,251,224, 36,225, 35,179,192,222,220, 95, 22,101,250,145, 50, 34, 82, 21,136, 54,246, -129,189, 47,151,151,163, 17,173,165, 75,151, 70, 47, 93,186,180,196, 8,217,115, 38,235,245, 22,149, 22, 8,100,117,156, 61, 60, -111,132,159, 62,233,116,248,190, 13, 23,239,231, 97, 72,187, 74,208,228,167,226,251, 47,222,205,103, 64, 76, 28, 46,183,208,168, -215, 29,210,235,181,139, 1,152,203,188,104,124,107, 55,150,137,229,231, 54,108,254,213,234,233,237,141,157, 87,243,211, 10,180, - 86,203,159,205, 86, 22,230,206,153,205,213,173,172,165,167, 33,251,201,237,242,106,226, 44,129, 96,233,166,163, 0, 8, 88,150, - 5, 97, 89,240,197,114,153,103,141,150,217, 69, 5,157,152,199, 97, 12,207,151, 0,132,181,166,229, 38,150, 29, 6,101, 0,184, - 72,249,216,123, 57, 29, 0,178,185,234,136, 71, 35,223,181, 55, 23, 26, 76, 98, 85,253,154, 53, 73,179,102,205, 10, 37, 18,135, -166,191,226,250,248,248,220,154, 59,119,110,157, 9, 19, 38,136,132, 66, 33,172, 86,171,251, 79,155, 55,179,155, 23, 79,196,160, -143, 54, 64, 32, 20, 65,111, 48,131,207,231,161, 64,169, 65,161, 74, 7,181,206, 82,241, 43, 40, 33,193,164, 0,150, 31, 57, 44, - 28,216, 67, 30,218, 92,200, 17,160, 73,176, 31, 46,158, 57, 66,110,156,222, 54, 81,159, 19,251,171,131, 23, 34, 52, 6, 11, 50, -242, 12, 72,207, 51, 32,171,192,128,172,124, 35,178, 10, 12, 96, 24, 6, 6,147,245,141, 30, 92,218,156,152,253, 59,127,221,218, -207,104,198,240,246,221, 7,226,179,121, 27,170,236,252,113,217,185, 68,194,105,227, 96, 71, 91, 91,116,116,116,242,251,239,191, -223,112,247,238,221,220, 6, 13, 26,232, 31, 61,122, 36, 45, 50,145,102,185, 92, 42,249,249,135,165,103,154, 55,111,190, 39, 61, -246,241,133,162,246,244,114, 11,246, 42, 29,198,138, 36,230,187,147, 42,203, 90,247,168,225, 43, 69,101,153,186, 71, 29,249,253, -239,243, 58,127,188, 68,113, 97,109, 78,166,209,122, 86,161,231, 54, 74,215,240, 29,234,131,103, 49, 26, 82, 6, 13, 25, 14, 46, -195,129,217,160, 75, 41,190,184,188, 93,132,152,191,235, 49,228, 98, 62,156, 36, 60,200, 37,124,180,173,231,142, 10,148,103,196, - 98, 99,161, 51,218,160, 55, 90, 97, 48, 89,225, 25,232,134, 45, 59,247, 35, 53, 71,143,163,183,115, 17,147,162, 70,173, 74, 50, - 16, 82,126, 49,201,218, 44,218,190,131, 71, 57,113, 57, 12,184, 28,134, 83,175, 78,109,228,107,204, 16,240, 56, 16,136, 37,144, -137,120,112,150,240, 33, 16,240,145,147,147, 3,163,209,136,202,149, 43,139,203,182,130, 4, 78,114, 9,106, 85,247,135,217, 98, -197,201, 43, 15,177,248,211, 65,232,214,190, 41, 24,190, 28,143,141,141,225,228,238, 4,150,195,129,217,202,194,100,182, 1,224, - 24, 74,211, 11, 12, 12,236, 44,147,201,100, 58,157, 78,157,154,154,122, 41, 43,230,112,170,141,219,127,210,233,240, 11, 59,251, -188,211, 13,119, 35,163,113,224,240,177,171,185, 30,202, 25,197,223,169, 95,191,126, 75, 79, 79, 79,121, 94, 94,158, 42, 42, 42, -234,214,235,214, 11, 8,135,243, 73,171,182, 29,161, 41,204, 65,246,211, 36,135,107,209,117,171, 56,225,235,165, 27,154, 4,215, - 14,110, 98, 35,118,227, 85,175,178, 19, 62,159,183,174, 73,205, 90,181,155, 20, 15, 8,169, 91,185,236,105,217,120, 82,167,238, -239, 77,248,108,105,191, 33, 99,113, 33,252, 24, 86, 45,254, 98,167,204,197,171,174,187,155, 75,163, 6, 45,187,227,234,185, 99, - 16, 59,249,194,205,195,183,237,168,113,211,186, 14, 25, 53, 25,215,175,158,195,218,101, 95,238,176, 25,213,191, 57,146, 86,153, -119,117,175,134,141,155,143,116,114,247, 65,161, 82, 13, 39, 55,111,212, 13,109, 54,242,225,125,227, 44,109, 78,162,226,181, 77, - 7, 33, 48,154, 9, 10, 52,102, 60, 85,232,145,156,101, 55, 90, 44, 91,129, 62, 65, 54,150,145,139,121, 60,119,203,147,202, 15, -206, 93, 32, 85, 2,125,152,229, 11,191,224,154, 33,134,162,208,110,178, 20, 42, 19, 20, 74, 19, 52, 6, 11,220,101, 60,176, 54, -182,194,181,238, 2,141, 25, 78, 82, 62, 92,164, 2,135,163,140, 37,177,233,151,189,193,247, 99, 51, 6,172, 90,181, 70,122, 47, -241, 57,147,197,183, 71,179, 68, 2, 46,108, 44, 11, 56,112,199,243,121,252,233,253,123,117,197,211, 92,189,125,212, 50,135, 65, -173,144,230,240,148,176,232, 50,108, 54, 0,160,111, 47,123,215,182,196, 76, 45,142,223, 80, 0, 47,118,236, 46,187, 44,214,235, -185,155,119,157,248,100,255,190, 61, 46, 6, 27, 15, 63,157, 74,134,206,104,133, 88,192,133, 72,192,133, 68,192,125,161, 63,118, -249, 70,203,222,231, 46, 53,215, 2,157,193, 0,149,222, 2, 2,224,214, 19, 13,244, 38, 43,148, 90, 11, 90,214,113,123,179, 64, - 8,195,156, 32,132,244,126,217, 16,189,108,150,158,139, 72,149,164,113,251,121,141,226,207,151,102,228,158,239,179, 5,160, 66, - 35,184,120, 47, 59,199,231,183, 5, 50,183,186, 46, 78, 46, 55, 78,159, 10,147, 31,190,207,226, 82,164,221,100, 89,244,185, 88, - 57,107, 68,154,170, 48,183, 19,128, 4, 71,127, 76,234, 89, 55, 84, 44, 20, 93,248,110,205, 79,102,111,159, 0,246,208,141,194, - 28,165,206,246,130,155,176, 25,141, 28,194, 18,129, 33,251,137, 67,109, 8, 28, 14, 99,158,247,209, 64,176,132, 96,254,154,253, - 88, 50, 99, 24,228,146, 81, 82,134, 97,164, 90,131, 21,159, 46,216,138,149, 95,143,119,146,138,120, 96, 24,123,159,168,247,134, - 15,116,236, 2, 52, 88, 17,127,115,183, 70,157, 24,246,232,249,230,194, 22,109,223,185,211,162, 69,139, 66, 55, 55, 55, 72, 36, -146, 63, 35, 21,165,224,227,227,243,245,188,121,243,130,167, 76,153,242,108,178, 79, 30,143,135, 15, 63,248,128, 99,179, 17,156, - 58,181, 13, 94, 85, 27,227,216,217, 27,232,217,185, 25, 52, 58, 3,242, 11,213, 96,193,125,237, 11, 81, 93,152,123, 33, 43,249, - 65,243, 54,157,250,226,210,153, 35,228,198,169,159, 39, 86,100,142, 30, 55,119,183,167, 17, 15,226,235, 50,140,187, 61,162, 85, -100,178, 76, 22, 22, 85,124,164,120,154, 28, 15, 87, 23,151,167,142,234, 73,188,130,251, 51, 28, 50,133, 1,217,166,205,142,219, - 15,128,104, 51, 31,141,216,255,219,230,200,232,168,123,139,251,140,156,206,235, 62,228, 3,238,143, 75,167,125, 9,192,209,137, -247,204, 49, 49, 49, 15,199,143, 31,223,250,250,245,235, 54, 0, 58,134, 97, 44, 92, 46, 87,106, 50,153, 4,157, 58,117, 82, 62, -126,252,248, 50, 74,238,180,248, 2,109,223,223,239,201,136,212,239, 8, 89,243,136, 42, 78,234,110,157,218,181, 66,171,250,129, -120,218,174, 21, 0, 76, 79,209,200,131, 13, 53,183,238,181, 88, 37, 39,127,252,229,248,146,137,195,186,126,186,147, 55,127, 85, -102,216,252, 50, 59,162, 62,125,116,185, 71, 73, 54,158,199,229,192, 73,194,135, 92,194,131,147,132, 15, 39, 49, 31, 22, 43,169, - 72,205,145, 88,172,172, 61,162,101,178, 66,163,183,226,194,189,108,100, 41, 77, 40, 84,155,161, 55,219, 64, 64,236,181, 81, 7, - 74,115,197,147,107,174,197, 79, 82,215,202,141,149,155,215,175,112, 62,248,123,218,179, 17,125, 46, 82, 33,156,164,246,209,216, - 87,174, 92,129,135, 71,249,181,125,150,101,113,224,244, 45,172,218,126, 1,167,183,205,132, 88,192, 69,104,255, 5, 24, 59,160, - 5, 88,194, 34, 62, 38, 58,187, 86,189,134, 62, 28,142, 4, 28,134,129,209,194, 2, 32,165,158, 79,147,201,228,145,154,154,170, - 10, 10, 10,242,245,247,247, 31,194,229,114, 9,212,247,140, 71,246,228,235,206,135,253, 38,213,234,141, 54,169, 85,185, 45, 40, - 83,223, 27, 65, 65, 96, 24,134, 56, 59, 59, 11, 46, 92,184,160, 9, 9, 9,241,122,205, 91,137, 35,241,174,189,118,194,212, 79, -134,212,172, 81, 3,251,127,219, 6, 66,152,131,142,126,121,215,241,235, 88, 56,231,197, 17,134,159,207, 91,215,100,229,130,233, - 47,236,155, 58,103, 85,153,163, 14, 37, 34,249,140, 65, 35, 38,225,206,173, 63,240,253,130,207,247, 24, 53,249, 99, 45, 86,203, -208,252,204,196, 61,213,235,181, 0, 49,171, 17,190,111, 5,134,141,158, 40,234,222,103, 8,174, 95, 61,135, 37, 95, 78,221,165, - 43,204,121, 31, 14,118,114,102, 9,127, 74,167, 30, 3,248,122,163, 25,235,150,127,131,201, 51, 22,163,101,231,190,252,168,123, - 55,166, 0,248,214,225,238, 16,102, 27, 58,133,120,218,205,179,133,197,177, 68, 46,175,164, 43,144,199,101, 56,141,106,184, 66, -111,178, 66, 85, 78,165,146, 39,224,103, 21, 42, 85, 85,127, 88,242, 9, 87,107,176, 66,161, 52, 33, 71,105, 68,110,225,159, 6, - 43, 87,105,132, 66,105, 2,159,199, 32, 54, 33, 5, 28, 62,175,194,253,243, 10, 52, 22, 52,175,237,102,191, 71, 95,179,117,196, -194,115,110,113,250,242,253, 65,171, 86,173, 22,223, 79, 82, 35, 50, 81, 85, 20,201,226, 66,196,231, 64, 88,244,183,141,181,247, -141, 44, 11,103,175, 26,213,199,188, 55,170,139,179, 92,130,140,184, 28,240,184,246, 41, 98, 92,188, 3,225, 34, 50, 96,218,212, - 73,240,244,112, 69,106,174, 17,107, 15,199, 34,242,225, 19,176,250,138, 29,246,186,159,246,244,156,240,225,231,174, 28,190, 16, - 59,206, 36,217,211,201,181,225,241,141,227,134,140,248, 7, 90,141, 42,143,128,216, 28,236,131,204, 16,171,205,126,185, 45,153, - 63, 27,123,182,111,196,153,136,156,103, 87,224,239, 7, 87,226,147, 57,139,144,171, 50,161,164,235,178, 44, 63, 2, 64,241, 92, - 36,234,149,237,231,204, 81, 73,219, 76,209,182,169, 20, 13,211, 75,230,202,244,210,126,211, 75,122, 37,205,253,183,185,220,166, -195, 87, 76,145,171, 87, 3,169, 88,246,199,169, 83,199,101, 71, 34,201, 51,147,101,214,229,146,197,211,251,166,169, 10, 21,221, - 43,100,178,188,106, 53, 16, 73, 69,151,231, 46, 90,107,244, 9,168,106, 61,121, 79,149,167, 54,216,172,175,246, 65,144,217,100, - 46, 94, 6,158, 80,180,138,175, 55,125,147,155,251, 72, 91, 94,228,137, 37, 4, 97, 55,179, 64,136,189,138,180,239, 74, 58,138, -106,230,176,177,246,102,149,179,247,114,192, 43,234,135,226,104,248,123,211, 79, 27, 85,189, 67,148,218,145, 75,230, 63,107, 46, -108,217,208, 30,201,114,118,118,134,171,171, 43,228,114, 57,202,107, 58,100, 24,230,189, 9, 19, 38,188, 82,251,207,201,201, 65, -215, 46,157,176,126,227, 22, 52,236, 50, 6,103,175,157,129,217,194, 34,180, 94, 13, 84,245,119,195,211,108,245,107,221,232, 50, -159,224, 15,155,119, 26,240,101,219,206,125,113,225,244, 33,114,227,244, 47,147, 42, 58, 17, 98,239,174,173,143, 47, 92, 56,191, -250,220,197, 63,136,156,196, 60, 60,210,152,192, 97, 24, 84,241,145,194, 67,198,193,165, 35, 59, 12,195,250,182,118,120,114,188, -192,192,128,157, 43,215,111,150,173, 92,182,160,211,157, 8,230,130, 38, 35, 54, 31, 0,116,217, 49,203, 31, 3, 15, 43,253, 17, -126,178, 97,135,129,240,241,175,209, 45, 49,251,177,195,102, 3,128, 46, 33, 33, 33,113,238,220,185,193,203,150, 45, 35, 92, 46, -151, 5, 32, 90,179,102,141, 46, 46, 46,238, 30,236, 67,115, 81,222,195,166, 75,183,250,159,202,133,182,150,238, 82, 78,253, 26, -190, 82,180,170,111,111, 21, 29,214,187, 45, 2, 43, 87, 70, 66,150,174, 81,190,142,229,107, 76,220, 26, 27,126,138,188, 93,205, -147, 59,209,170, 55, 61, 4,112,180,162,249,195,224,207, 14,242,197,209, 44, 39, 9, 31,172,253, 90,169,144,209, 50,154,109,208, - 27,109,208,155,172,208,154,108,208,153,108, 96,137,253,158, 96, 24, 6,102, 43, 11,135,170,205, 47, 93,251,206,238,158,168, 81, -141,129,179,212,158, 54,231,162,233, 30, 24, 0, 30, 30, 30,240,246,246,118, 40, 42,106, 50,219,111,113,147,133,125,214,172,111, - 50, 91, 65, 8, 65,108,108,204,204,228,196,196,254, 65,181,130,218,215, 11,109,232, 46, 21,113, 0,160, 84,163,165,211,233,108, - 78, 78, 78,222,238,238,238,156,244,244,244,103,230, 57,168, 81, 39,235,225, 67, 7, 49,104,208, 64,205,163, 91,247,159, 13,113, -215,235,245, 76,155, 54,109,156, 3, 3, 3, 57, 70,163, 81, 85,209,108,146,121,213, 30,224,230,225,190,248,189,247, 39,215,238, -212,181, 39, 46,158, 15,199,209, 67,187,127,213, 41, 98,195, 29, 21, 9, 14,174,243,202,168,195,154,181,106,191, 50,234,176,106, -245, 90,101, 26,173,122,161,205, 90, 16,134,135, 51, 97,251,136,129, 99,158, 10,128,181, 25,212,251,246,110,250,250,219, 17, 83, -230,212,236,213,111, 4,222, 27, 61, 22, 60, 30, 23,151,206, 30,199,202, 5,159,157,208, 40,115,198, 56,210, 77,192, 30,122,171, - 43, 8,144, 4,126, 92,185,102, 3, 68,220,184,138,248,216,168,232,251,183,175,215, 15, 10,105, 9, 47,255, 42, 31,167,120,114, -151,225,209, 35,115,121, 50, 38,131, 33,101,236,152,209,120,126,212, 97,171,198,193, 30,204,203, 55, 0, 0,157, 58,199,252,243, -138, 79,227,138, 71, 29,178,102, 83, 74,105,186,202, 2,197,129, 75,215,110,206,232,223,187, 39, 39, 87,101,178, 71,176,148,166, -162,151, 17,185,197,127,171,140,168,229, 47, 71, 76,116, 4,107, 80,230, 30,172,224,125,105, 24, 59,180,199,195,226,107,151,101, - 9, 24,192, 80,225,102, 41,190,243,164,229,223,175, 18,223, 79,212, 32, 50, 73,101,111, 42,228,115,237, 6,139,207,121,102,186, -236,163,217,203,137, 14, 49,220, 37,227,198, 12, 71,174,202, 12,150, 5,120, 92, 78,209, 75,128, 84, 53,131,167,106, 29,114, 11, - 20, 72, 76, 78, 65, 97, 86, 60, 56, 28, 14, 60,253,107, 59, 60,147,180,141, 8,253,116, 38, 18, 50,164,119,123,222,161, 63, 50, - 33, 21,241, 96, 84,103,227,212,222, 21, 10,163, 70,181, 88,175,211, 28,114,100, 62,199, 63,187, 32, 48, 10,149,198,224, 35,226, -115,177,127,251, 15, 24, 58,118,234, 11,165,239,204,175, 22, 2, 28, 6,249, 5,106, 48, 12,163,168, 88,185,196,220, 46,107,251, - 53, 35, 99,111,172, 81,130,217,122,181,162, 80,122,109,148,156, 10, 63,125, 92,246,123,178, 8,183, 98, 50,139, 76,150,130, 93, -244, 81,239, 52,181, 50,191, 7,128,216,138,213, 11, 57, 61,134,141,155, 17, 93,163,118, 61,227,197, 40, 77, 82,161,214, 82,106, - 63,135, 86, 67,230, 70,223, 57,177,190,151,210,146,240,129,204,175,158,141,181, 90,151,235, 21,177, 11, 74,105, 58, 20, 46, 88, -187,255, 89,179,225,172,101, 59,236,127,219,108,176, 17, 22,132, 5,166,125,189, 9, 86,214, 6,214,102, 3,107, 35,176,216,136, -180,188,228,122,251, 87, 61, 84,240,120, 95,157,145,223,190,218, 92,232,234,234, 10, 15, 15, 15,120,120,120,192,217,217,185, 92, -163,197,231,243,229, 60,222,139,167, 58, 37, 37, 5,201,201,201,112,118,118, 6, 97, 45, 48, 89,128, 6, 45,187,227, 65,124, 20, -206,253,126, 15,132,181, 65, 38,175,248, 42, 47, 50,159,224, 15,154,117,236,255, 67,231,126,227,113,246,208, 79,228,246,149,227, -147,245, 57,177, 91, 29,142,208,219,108,140,197, 98, 65,239,238, 29, 83,238, 70, 63, 57,253,213,140, 41, 61, 91,247,153, 44,106, - 21, 28, 0,131,201,134,180,228,120, 92, 58,242,139,161,118,117,191, 51, 93,218,181, 72,177, 88, 44,176,217,108,229, 62,200, 13, - 38,115, 46,151, 47,145, 13, 31, 62,146,127,251,214,173,131, 50,175, 90,251,109, 12,231, 62, 67,216, 80,134,144, 65,161,161,117, - 97,182,176,208,233, 84, 5, 21, 61,102,181, 90,157,184,109,219,182,234, 99,198,140,145,214,171, 87,143, 31, 31, 31,143,149, 43, - 87,230,169,213,234, 68, 71, 53,194,175,196,172,225, 49, 5,113,197, 17,173,212,182,173, 48,188, 79, 91,236, 57,241, 59, 46, 93, -189,142, 20,141,252,158,198,202, 59,242, 52, 37,195, 88,223, 93,117,176, 95,171,170,220,253,219, 11, 14, 70,119,156,253, 46, 33, -162,240,220,203,243,181,142,223,220,128, 90,111,129,179,212, 62,223, 83,113,100,139,203, 48, 14, 59, 34, 6, 72,188,122, 61,162, - 65,211, 90,245,112, 55, 81,137,156, 66, 35,244, 70, 43, 88,150,128, 5,129,135,147, 16, 98, 1, 7,169,201,137, 96,137, 57,169, -130,143, 10, 69,135,246, 29,120, 0, 3,134, 33, 60, 62,143, 7, 2,251,252,138, 18,137, 68,227,237,237,237, 80, 68,203,108,181, - 98, 80,207, 22,104,217, 44, 20,253, 39,219,231,204, 60,255,235,108,184,201,249,216,179,115, 43,158, 94, 89,179,179,122,171, 41, -225, 81, 15,162, 7, 71,223,253, 99,228, 59, 77, 36,141,124,121, 25,130,210,194,164, 90,173,246, 32, 0,161, 64, 32,232,217,190, -125,123,247,131, 7, 15, 22,122,122,122,178, 66,129, 64,209,175,111, 31,150, 47, 16,228, 23,127,246,218,181,107,252,201,147, 39, - 59, 21, 20, 20,164,102,103,103, 95, 7, 96, 41,187, 34, 24,220, 21, 28,236, 6,195,136,229, 18,105, 74,181,106, 53,252,155,181, -108,225, 50, 96,208, 80,136,132, 34,156, 13, 63,141,117,171,151,237,211,100, 62, 26, 87,145, 51,249,182, 70, 29,166,165, 38, 37, -234,244,198,144, 6, 77, 59, 50, 87,195,143, 76, 55,195,115, 53, 87,100, 94,209,117,208,212,154,137, 25, 26,172, 91, 58, 19,110, - 46, 50, 36,197, 63,214,199, 61,122,176,201, 98, 80,205,116,216,100, 1,144,230,217, 6,183, 26,221,211,205,104,182,225,202,133, - 19, 6,214,202,246,188,126,249,100,124,165,218,205,196, 13,154,117,113,203, 61,186,117,144, 14,216, 83,158, 78,250,227, 87, 35, -184,196, 84,152,116,254,194, 57, 23,159, 42,245,185, 12, 24,152,141, 6, 40, 18,110, 91,117,217,143, 85,170,244, 40,135, 70,225, -230, 61,197,215,115,230,125,247, 65,179,166, 77,101, 4,226, 23, 34, 88,197, 6, 43, 87,101,130,167,147, 16,122,149, 2,113,183, - 79, 27,116, 10,110,153,243,157, 89, 77, 90,105,110, 78,182,240,207,238, 12,177, 45,203,250,124,110, 78,182,208,106,210, 74,203, -127,212,113,225, 44, 19,226, 65, 82,250,179,142,239, 34,190,189,111,150,144,207,125,214, 79,171,184, 44, 40,135,142, 2,177, 43, -210,243, 12, 96, 64,192,218,172,176, 90, 76,221, 61,207,163, 0, 0, 32, 0, 73, 68, 65, 84, 80,171, 84, 72,207,200, 66,118, 86, - 54,212,234, 66, 72,229,110,104,208,168, 57,156,100, 98,220,191,180, 15,132, 16,135,230, 53,180, 48,252,224,102, 45,219,137,162, -146,237,125,177,196,124,130,227,187,151,229,105, 84, 57,237, 52,153,113,113, 21, 45,139,173, 54,219,185,200,135,113,245, 43,249, - 85, 99,238,197, 43,177,115,203,122,152,138, 34,155, 22,139, 13, 81,169, 90,100,230,235,144,154,240,136,176, 54,219, 57,252, 71, -224,149, 30, 0, 4, 47,180, 65, 93,116, 31, 53, 0, 27, 55,110, 66, 66, 98, 50,187,120,122,175, 84,141,186,240,157, 10,152,172, -174, 40,154,107, 67,151, 29,179, 92,239,214, 44,237,216,221,124,142,222, 68,202,236,224, 35,246,170,130,118,227, 86,158,209,171, -243,133, 54,163,142,119,124,231,184,221, 37,105,218, 29, 52, 76,139, 63, 31, 6,185,132, 7,134, 97, 80,220, 92,184, 97,225, 36, - 72, 69,246,182,101,189,209,138, 81,159,174,194,206, 85,159,129, 0, 24, 49,244,119, 93,105,233,132,125,237,194,105,126,184, 85, - 41, 37, 57, 39,189,107,223,207,207, 27,204, 34, 99,159,129, 99,238, 52,109,218,180, 80, 34,145, 64, 34,145,192,217,217, 25,110, -110,110,112,117,117, 45,247,216, 45, 22,139,198,100, 50,121, 8,133, 66,176, 44,139,164,164, 36, 36, 37, 37, 65,169, 84, 66,161, - 80, 64,171, 81, 89,111,157,223,207,107,208,170, 23,252,107,132,160, 74,173,134,224,115, 25,240,120, 28, 92, 58,182,165,180,116, -150,108,178, 58,244,219,208,165,255, 4,156, 61,180,153,220,190,114,124,138, 62, 39,118,139,163,121, 84,212,220,115,127,208,160, - 65, 33,147, 39, 79, 22,204,155, 49,249,204,137,240, 75,177,251,195, 54,247, 45, 40, 40, 12, 36,132,192,213,197,229,233,176,190, -173,143,119,106,211, 44,229,252,249,243,236,238,221,187,141, 12,195, 60, 40, 75,211, 94, 72,229,252,122,254,220,133,249,237, 58, -116,196,214,237,187, 59, 68, 63,124,212, 33, 62, 62, 14,129, 85,106,160, 90,245, 90,208, 49,110,184,112,249, 42, 52,133, 57,191, - 58,146,206,151,162, 90, 76, 65, 65,193, 31,195,134, 13,235,254,251,239,191,115,134, 13, 27,166,203,205,205,189,246, 92, 20,139, -148,167,121,253,199,129, 10, 0,191, 86,233, 48,118, 95,186,185,240, 99, 0,203, 42, 87,169,140, 75, 87,175,227,250,239, 55, 55, -229, 74, 43, 47, 24, 55,234,253, 73, 85,251,113, 39,244,107, 85,149,235,237, 38,197,111,155, 87,114,143, 93, 79, 94,149,156,103, -219,186,236,242,252,133,142,228,209,179, 7,135,218,140, 54,117,221, 97,177, 17,176,196, 94,224, 58,137,249,165, 21,188,175,104, -242, 76,162,113, 83, 38, 79,142,111, 16,218,232,147, 81,239, 79, 17, 52,170, 17,136, 91, 79, 10, 1,134,129,187,175, 12,153,153, -153,184,114, 96,179,181, 32,253,241, 38, 46,151,253,182, 2,231, 19, 5, 41,247,130,158,219,156,148,155,155,139, 75,151, 46,161, -216, 96,121,121,121,149,102,180, 94,208,204,203,206,184,182,240,251,159,218, 76,124,111, 32,250,116,172,143,203,183,227, 97, 42, -154,175,169,120, 40,121,226,245, 31,133, 31, 15,171, 97,250, 96, 80,109,149,222, 34, 76,254, 58, 73,121, 5,246, 53, 88,217, 82, -210,105,202,207,207, 63, 22, 19, 19,211,182, 97,195,134, 85, 79,158, 60,153, 31,125,243,204,244,231, 19,241,249,231,159,203, 55, -110,220, 40, 37,132, 92, 51,153, 76, 9, 14, 29, 59, 7,191, 69,220,185,227, 97,182,176,184,122,243,126,221, 46,109, 26,129, 37, -192,237,219,183,177,245,231,173,134, 7,145,247, 86,104,179,125,191, 45,195,188,148,120, 62,109,111, 54,234,240,153,102,102,122, -242,138,179, 39, 14,236,108,214,161, 47, 70, 78,251,246,219, 75, 39,118,207,111,210,174, 15,167,110,179,238,136,184,126, 1,231, - 78,158,254,206,172,201,159,143,242,251,142,148,152, 78,145, 68,250, 81,189, 38, 29,144,154,146,140,164,184,168, 95, 13,249, 79, - 50, 82,226,185,191,102,164,165, 76,169, 94,191, 13,126, 63,179,103,122, 25, 70,171,204,107, 62,208, 75,178,249,100,216,177,225, -105,105, 63,250,106,245, 6, 17, 33,196, 32, 18,242,178,228, 28,245, 94,149,195,233,124,100, 86,100, 84, 29, 52,116,212,148, 19, -235,214,173,230,251,184, 74,145, 85, 96,128, 74,111,134, 90,103, 6,135, 97, 16,228, 47,131, 78,157,143,203, 7,190,183,152, 52, - 5,195,128,120,115,105,154, 50,239,224, 69, 5, 79, 46, 76,251,124,234, 69, 8, 93, 2,253,171,117,158, 83,102,180, 78,157,126, -175,239,231, 83,143, 7, 19, 66,186,200,188,131,213,218,156,152,185,165, 29, 59,195,216,239,239,145,157, 2, 97,182,218,231, 31, -179,178,128,141,101,139,162,124, 0,121,214,158,207,148,115,236, 12,187,247,196, 53,100,100, 23, 66,111,178,192,104,178,194,108, -177,129,195,229,194,213,205, 21,181,170, 53,134,139,171, 51,178,179, 50,112,253,252, 49,196, 70, 94,190,198, 16, 44,208, 43,226, -206, 59,146, 71, 2,137,107,176,159,191, 47, 39, 83,101,130, 68,200,197,189,203, 39,205, 22,147,113,133,131, 38,235, 21,205,194, -188,252, 85,159,204,248, 98,196, 47,219,182,251,134, 84,119, 70, 90,174, 30,105, 10, 3,212, 6, 75,145, 17, 99, 97,212,228, 34, -242,194,246, 44,155, 65,189, 10,255, 17, 74, 53, 90, 86,179, 65,125,240,244, 45,143,217,243,191,231, 62,137, 79,176, 44,250,184, -119,154, 94,163,234, 85,225, 72,214,115,252,242, 97,245, 61,127,197, 65,188,210, 92, 72, 88,176,132,224,248,205,172,103,205,133, -108, 81,207,203,187,241,101, 47, 35,248,252,218,133, 29,123, 77, 63, 27, 25,163,222,165,215,103,187, 60,126,178,162, 0, 0,184, - 92,238,179, 87,113,223, 44,131,193, 96, 42,167, 9,101,199,150, 45, 91,102, 77,153, 50, 69,244,244,233, 83,196,199,199,163,176, -176, 16, 98,177, 24,167, 79,159,182,128,181,174,136,252,253,112, 82, 76, 68,248, 55,193, 77,187, 87, 10,105,213, 11, 82,169, 12, - 60,226,120,103, 76,169,119,237,225, 77, 59,244,251,161,203,128,137, 56,119,120, 11,185,125,249,216, 84,189, 34,118,115, 69,207, -101, 97, 97, 97, 52,128,184, 21, 43, 86, 52,218,186,117,107,245, 25, 51,102, 36,236,248, 97,254, 58, 0,200,203,203, 3, 0,220, -189,123,151, 76,157, 58,213,104, 48, 24, 18, 11, 10, 10, 34, 80,206, 0, 8, 0,208, 43,164, 75,182,110, 88,214,224,105,122,230, -192, 26, 13,154,195,171,122,115,248, 6,181, 64,129,218,140, 91, 79, 50,144,240,232, 60, 30, 93, 61,112, 82, 39,183,206, 71, 5, -231, 55,110,216,176, 97, 32,135,195,169,166,209,104,124,235,213,171,215, 80, 38,147,221,109,216,176, 97, 99, 30,143,151,118,231, -206,157,228,138,104,165, 92,222,110,172,210, 97,236,218, 20,181, 83,167,132, 44, 93,227, 20,181,211, 93,157,200,229, 51,197,133, -181,198, 95,184, 1,171,136, 57, 55,122,255,118,213,193,223, 54,175,228,142,154,244,185, 45, 74,233,246, 49, 79, 34, 60, 91,177, -112, 53, 39,243,131, 49,253,255,156,222,161, 40,146, 85,244,183, 67, 97,122,165, 50, 82, 9, 96, 86,228, 67,254, 15, 81, 31, 79, - 94, 24,218,172,205,232,246,239, 12,227, 88, 5,114,156, 57,252, 35, 73,140,188,176,159, 71,108, 95,233, 29, 88, 13,160,220,230, - 32,147,201, 17,147,245,106, 26,159,202, 58,238,223,253,243,216,131,135, 15, 45, 29,208,175,191,199,134,175,223,197,247, 63, 29, -129, 76, 34, 2, 97, 89,188,219, 41,112,200, 55, 19,234,244, 13,244, 17, 7, 28,188,152,118,101,218,234,168, 89, 58,157, 57,214, -129, 72, 12,201,205,205,189, 42,151,203, 21,109,219,182,109, 41, 18,137,152,220,220, 92,158,183,183,183,213,197,197,197,148,150, -150,166, 51, 26,141, 7, 1, 84,104,218,113,179,133, 69, 82,182, 1, 71, 15, 29,196,253,155,231,241,232, 81,140,250,209,195, 71, -235, 25, 30, 89,173,205,142,203, 7, 42, 92,193, 7, 91,226,168, 67, 82,225, 81,135, 54,163,250,183, 29,155, 22,117,214, 25,140, - 99, 27,182,238,141,170,117,219,112,204, 22, 27, 30,220,190,136,139, 7, 86,127,111,214,228,207,126,147, 60,246,175, 84,189, 22, -225, 10,241,199,165, 19, 32, 44,187, 9, 0, 8,203,110,186,251,251,201, 41, 45,122, 77,128,187,119,213,134,133,169,119, 25,188, -198,236,225, 2, 30, 71,123,234,224, 47,135,147,146,146,240,248,241, 99, 60,121,242, 4,249,249,249,248,237,183,164, 10,229,143, -174, 32,249,108,236, 67, 78,143,193,239,142, 60, 62,100,248,123,226,234,181, 66, 56,193,149,220,224, 33,231, 33,230, 73, 50, 98, -239, 68,178, 49,183, 78, 26,204,170,156, 1,250,130,228, 82,141,159,212,179,174, 15, 96,155, 93,188,118, 97,171, 86,109,130,191, - 88,188,180,165,135,151,119,137,229,120,158, 34, 71, 56,115,218,177,224,235, 55,254,112,104,173, 67,214,102,203,155, 52,118, 24, -203,181, 47, 20,138,103,113,234,162,179,103,175, 76,217,247, 19,214, 90,110, 4,255,253,129,237, 96,101, 89,104,245,102,168,180, - 70, 40,213, 6,100,230,228,225,126,100, 36, 46, 31, 63,134,248,152,251,137, 22,147, 41,156,195, 97, 14,232,179, 99, 47, 87,172, -165,137, 87,221,195,221, 29,137,249, 26,136,133, 60, 36,199,222, 49,106, 85,202, 93,175,123, 29,233,243,226, 50,115,184, 76,247, - 97,195,134,159,238,220,163,159, 75,179,214, 93,165,158,206,174, 16,240, 8,226,146, 50, 16,113,237,180, 54,225,254, 21,149,197, -164,233,249, 54, 86,125,249, 31,167,252, 81,135,102,163,182,239,136,254, 29, 14,113,185, 60, 33,203, 90,141,102,147,113,240,155, -152,172,191, 10, 66,108,105, 99, 71, 12,124,161,110, 96,101,137,100,196,208, 51,250,231,235, 10, 22, 27,145,142, 24,122, 77,103, - 47, 64, 74,239,216,231,231,231,222,187,120,237,194,148,148,188,219,249,249,198,139, 0,210, 12, 6,195,107,167, 49, 59, 59,123, -225,226,197,139,251,232,116,186, 58, 29, 59,118, 20, 57, 59, 59, 35, 47, 47, 15,225,225,225,150,176,176,176,135, 57, 57, 57,223, - 0, 57, 86, 61, 26,255, 26,105, 56, 60, 38,230, 78,248, 55,117,154,246,168, 20,210,186,151,227,133,153, 72, 50,177,115,191,241, -204,185, 35, 91,200,173, 75, 71, 62,208, 43,226,126,122,131,211,106, 54, 24, 12, 55, 13, 6, 67,212, 87, 95,125,213,204,199,199, -199,231,155,111,190, 17,171, 84, 42,254,134, 13, 27, 12,185,185,185, 89, 42,149,234, 58,202,232, 79,243, 42,119, 45,202,116, 12, - 58,117,112, 75, 39,114,112, 75, 55, 87,207,128,238, 46, 94,149,106, 22, 42,210, 19,149,138,140,112, 0,231,138, 38,138,172, 16, -141, 26, 53,170,193, 48,204, 48, 0, 13,100, 50, 89,144, 92, 46, 23, 17, 66,234, 48, 12, 19,205,178,108,100,189,122,245,194, 30, - 62,124, 88,161,201,100, 83, 46,111, 55, 6, 6,183,217,157,175, 99, 5, 38,142, 96,119,202,229,237, 70, 0,200, 57,251,133, 14, -192,209,135, 29,103, 13, 58,118, 61,121, 93,116,129,203,116,197,165,165,199, 42,154,102,101,218,253,160,183,117,253, 27, 50, 31, -166, 1, 24, 27,121, 7, 43, 31,220,189, 62,143, 33,224,219, 96, 93,164,207,121,114,231,109,232,243,249,124, 67, 64, 64, 64,137, -163, 11, 69, 34,145,193,104, 44, 43,128,114,217,170,201,196, 86,160,195,246, 67,251,182,143, 61,114,236,232,210,246, 93, 6,120, -136, 43, 85, 66, 53,111, 6,219,103, 55,153,126,254,174,226, 86,191, 47,174,108, 76,200, 48, 68,162,130,253, 97, 52, 26, 77, 44, -128, 2,141, 70,211,159, 16,242,148, 97,152,192,130,130,130,123, 22,139,229, 65,133, 13, 1,139,145,173, 90, 53,255,141, 97, 24, - 30,177,178,203,175,243,185,187, 13,153,143,210,240,134,203,146,132, 84,115,198,167,223,172,109, 82, 51,168,118,147,226,181, 14, -235, 87,117,194,228, 89, 43,155, 84,173, 94,171,201,159,235, 31,150,219, 77,128, 88,116, 5,227, 14,253,188,252,202,221, 27, 23, -191,244,244,171, 90, 53, 43, 45,225,209,211, 39,247, 22,218, 12,170, 67,111,154,207, 73, 79,162, 87,111, 93, 49,107, 70,102,122, -226, 86,157, 34, 46, 10, 0,116,138,184,168, 71, 17,248, 58, 55, 43,109, 70, 94, 78,194,138,215, 61, 23, 90,173, 54, 99,215,174, - 93,174,109,218,180,225,248,248,248, 64,161, 80,224,226,197,139, 44,203,178,233, 21,214,202, 79,188,168,205,103,220,127,253,233, -135,229, 2,153, 83, 47,171,213,234, 79, 8,192,227,241, 50, 77, 58,213,105, 53, 71,246, 5, 10,146, 13,101, 63, 51, 88, 6, 0, -167,120,237, 66,150,101,153,229,235,182, 39,243,197, 78, 37, 78,134,104, 49,168,165, 44,203, 58,188,214, 97, 97,106, 68,205,183, -117,127, 51,132, 44,104,216,180,229,151, 22,139,217, 80,116,127, 24, 0, 24, 8, 65, 30,135,195, 92,230,178,150, 51,170, 55,168, - 76, 49, 12,156, 9,195,131,147,132, 7, 6, 12, 52,202,124, 82,145, 62, 89, 37, 26,226,156,216,104, 93, 78,135, 42,167, 76,251, -198, 92, 56,123,114,168,205,102,171, 86, 20, 51, 72, 50,234,181,251, 53,153,110,191, 2,119,172,248,247,115,162,216,108, 49,127, -241, 15, 57,212,140,242,191,164, 25, 92, 93,210,191, 82,128,207,152,164,228,156, 91, 9, 79,117,191,226,197,101,117,222, 36,157, - 92, 31, 31,159,175, 25,134, 25, 45, 20, 10,229, 38,147, 73, 75, 8,217,145,157,157,189, 16,175, 44,254,219,152, 47,241,214,143, - 17,138,165,115,205, 6,237, 31,186,156,216,145,229, 29,187,212,171,118,119,177, 76, 54,203,160,215,238,208,101,199,110,127,203, -231,211, 69, 36, 18, 53,150,203,229,252,220,220,220,155, 0,148,255, 75,249,222,176, 97,195,202, 28, 14,167, 26,203,178, 62, 0, - 92, 96, 31, 21,146,203,227,241,210,139, 34, 90,164,162,154,109,223,223,239,217,165, 91,253, 79,195,175,196,172, 41,106, 86,124, - 70,192,144, 85,226,209,189, 58,125,254,235,161,163, 37,141, 58,252,199, 93,243,255,127,154, 29,120,114,191,220,177, 28,161,203, -162, 46,193, 6, 93,110, 70,250,212,171, 15, 20, 55, 1,168,223, 36,157, 2,129, 96,148,217,108,150, 8, 4, 2,189,217,108,222, -245,191,114,236, 18,239,224,241, 28, 16,135, 87,166, 96,193,220,121,105,208,202,191,229, 90,226,134,132,132,180, 19, 8, 4,149, -109, 54,155,212,100, 50,233,244,122,125, 82,114,114,242, 31, 40,125,225,243,191, 52,157, 50,239, 90,171, 5, 2,209,199, 0, 96, - 54, 27,215,106,115,226, 62, 45,235,139,101,124,254, 31,157, 71,158,213,154,198,241,184,124, 47, 20, 77,204,205, 90,173,138,236, -196,219,181,254,198,116, 82, 94, 51,115,169, 38,213,164,154, 84,243,101, 56,244,124, 82,205,191, 83, 83,236, 87, 55, 80,236, 87, -215,225, 73,151, 75,249, 60, 61,159,148, 98, 38,149,240, 2,224,192,132,165, 20, 10,133,242, 23,192,210, 83, 64,249, 59, 49,100, - 62,122,250, 87,126,158,242,159,163,212, 62,209, 76, 25,174,180, 34, 33,193,215,113,182,231,168, 38,213,164,154, 84,147,106, 82, - 77,170,249,159,211, 44, 79,251,159,216, 36, 57,233,165,237, 19, 0,254, 95, 58,252,211,176, 42,213,164,154, 84,147,106, 82, 77, -170, 73, 53,255,107, 60, 51, 94, 28,122, 46, 40, 20, 10,133, 66,161, 80,254, 26,104, 31, 45, 10,133, 66,161, 80, 40,148, 55,163, -164,166, 67,106,180, 40, 20, 10,133, 66,161, 80,222, 2,165,118,134,167, 77,135, 20, 10,133, 66,161, 80, 40,111, 70,113, 68,203, - 15, 47, 77,239, 64,141, 22,133, 66,161, 80, 40, 20,202,219, 33, 19, 37, 69,183,194,194,194, 72, 73,127, 83, 40, 20, 10,133, 66, -161,252,127,240, 15,247, 34,207, 71,178, 38, 21,109, 3,120, 46,162, 69, 13, 22,133, 66,161, 80, 40,148,255, 21,179,245, 15,163, - 56,146, 85,252,202,124,197,104,245,233,211,135,161,102,139, 66,161, 80, 40, 20,202,223,197,191,209,139,112, 94, 62, 64,154,205, - 20, 10,133, 66,161, 80,254, 78,179,245,111, 58, 30, 58,189, 3,133, 66,161, 80, 40, 20,202,155,225, 7,160,247,115,219,255,111, - 75,240, 80, 40, 20, 10,133, 66,161,252,219,153, 84,218, 54,141,104, 81, 40, 20, 10,133, 66,161,188,125,179, 69,161, 80, 40, 20, - 10,133, 66,249, 39, 67, 87, 54,167,154, 84,147,106, 82, 77,170, 73, 53,169,230,191,157,226,121,180,128,210,230,209,162, 80, 40, - 20, 10,133, 66,161,188, 22,189, 97,159, 63,107, 82,209,123,111,106,180, 40, 20, 10,133, 66,161, 80,222, 46,175, 44,191, 67,141, - 22,133, 66,161, 80, 40, 20,202,219, 53, 88,155,169,209,162, 80, 40, 20, 10,133, 66,249,139,161, 70,139, 66,161, 80, 40, 20, 10, -229, 47,130, 65,233, 35, 7,206, 85, 64,231,117, 70, 31,156,163,154, 84,147,106, 82, 77,170, 73, 53,169,230,127, 78,179, 60,237, -115,248,231, 81, 60, 51,252, 9,252,217, 17,126,243,255,199, 15,211,161,175, 84,147,106, 82, 77,170, 73, 53,169, 38,213,252,183, - 51,233,165,247,103,208,166, 67, 10,133, 66,161, 80, 40,148,183,107,182,232, 18, 60, 20, 10,133, 66,161, 80, 40,111,137, 82,155, - 9,105, 68,139, 66,161, 80, 40, 20, 10,229,205, 40,117, 81,105,106,180, 40, 20, 10,133, 66,161, 80,254, 26,195, 69,141, 22,133, - 66,161, 80, 40, 20,202, 91, 52, 89,147, 74,252,111, 88, 88, 24,161,231,136, 66,161, 80, 40, 20,202,223,197,191,214,139, 20, 31, - 24, 53, 91, 20, 10,133, 66,161, 80,168, 23,169, 48,126,248,115,180,225,164,162,109, 0,116,212, 33,133, 66,161, 80, 40, 20,202, -155,210, 27, 47,142, 60,156, 84,188, 77,141, 22,133, 66,161, 80, 40, 20,202,155, 51,169,204,255,210,102, 67, 10,133, 66,161, 80, - 40,127, 39,255, 70, 47,194,208,108,165, 80, 40, 20, 10,133, 66,121, 35, 74,138,102,109,166,167,133, 66,161, 80, 40, 20, 10,229, -175, 53, 92, 20, 10,133, 66,161, 80, 40,148,191,194,100,253,213, 19,150,210,149,205,169, 38,213,164,154, 84,147,106, 82, 77,170, -249, 95, 49, 89,207, 79,241, 0,128,142, 58,164, 80, 40, 20, 10,133, 66,121, 83,232,162,210, 20, 10,133, 66,161, 80, 40,127, 17, -116, 81,105, 10,133, 66,161, 80, 40,148,255,103,195, 69,141, 22,133, 66,161, 80, 40, 20,202, 91, 52, 89, 47,152, 45,218, 71,139, - 66,161, 80, 40, 20, 10,229,205, 40,181,143, 22,131,210, 71, 14,156,171,192, 15,188,206,232,131,115, 84,147,106, 82, 77,170, 73, - 53,169, 38,213,252,207,105,150,167,125, 14,255,124, 38,225,255,105,194, 82, 58,244,149,106, 82, 77,170, 73, 53,169, 38,213,164, -154,255, 53,232,244, 14, 20, 10,133, 66,161, 80, 40,111,219, 88,189, 12, 53, 90, 20, 10,133, 66,161, 80, 40,111, 6,157, 71,139, - 66,161, 80, 40, 20, 10,229, 47,194, 15,246,168, 86,241,123, 99,106,180, 40, 20, 10,133, 66,161, 80,222, 14,189, 97,143,106, 21, -191, 83,163, 69,161, 80, 40, 20, 10,133,242, 22, 41,113, 30, 45, 6, 0,194,194,194, 72,209,118,199, 62,125,250, 92,166,231,138, - 66,161, 80, 40, 20,202,255, 39,255, 86, 47,242, 44,162,213,167, 79, 31, 6,192, 37,154,213, 20, 10,133, 66,161, 80,254, 14,254, -141, 94,132,243,146,147,236, 72,179,153, 66,161, 80, 40, 20,202,223,193,191,209,139,240, 94,114,145, 20, 10,133, 66,161, 80, 40, -127, 11,255, 96, 47,226, 7,123, 71,248, 19, 69,239, 64,209,148, 15,116, 30, 45, 10,133, 66,161, 80, 40,148, 55,163,120,180,225, - 43, 75,239,208, 40, 22,133, 66,161, 80, 40, 20,202,155, 81,210,204,240,155,233,105,161, 80, 40, 20, 10,133, 66,249, 11,161, 17, - 45, 10,133, 66,161, 80, 40,148, 55,231,249,168,214,255, 91, 52,139,174,108, 78, 53,169, 38,213,164,154, 84,147,106, 82,205,255, -146,201,122, 97,155,206, 12, 79,161, 80, 40, 20, 10,133,242, 23, 65, 71, 29, 82, 40, 20, 10,133, 66,161,188, 25,197, 35, 14,159, -223,166, 70,139, 66,161, 80, 40, 20, 10,229, 45,154,173, 87,160, 77,135, 20, 10,133, 66,161, 80, 40,111,198,164,210,254, 65,141, - 22,133, 66,161, 80, 40, 20,202, 95,100,184, 24,148, 62,114,224, 92, 5,132, 95,103,244,193, 57,170, 73, 53,169, 38,213,164,154, - 84,147,106,254,231, 52,203,211, 62,135,127, 30,127,219,132,165,116,232, 43,213,164,154, 84,147,106, 82, 77,170, 73, 53,255,179, -208,166, 67, 10,133, 66,161, 80, 40,148,255, 1,163,229,197,227,241,190,148, 72, 36, 27, 37, 18,201, 79, 60, 30,111, 5, 0,183, -138,254,160, 76, 38,155,238,235,235,251,216,215,215, 55,173,114,229,202, 39,157,156,164,159,212, 16,161, 61, 0,254, 91, 58,158, - 96, 0,159, 72, 36,146, 71, 98,177, 56, 25,192, 78, 0,159, 0,240,124, 19,225,133,254, 24, 28,245,113,255, 35, 11,253, 49,248, -165,127,245,246,241,241,185, 10,160,251,219,202,148,225, 82,116, 29, 34, 67,234, 16, 25, 82,135, 75, 95,191,214,224,228,228, 52, -218,207,207,239,186,135,135, 71,186,159,159,223, 53,177, 88, 60,164,130, 18,222, 62, 62, 62,223, 7, 6, 6,198,250,251,251,175, -129,125,117,242,255, 89,218,137,208,174,165, 8,138, 86, 66,168,219, 8,177,177,149, 16,221,186, 1,210,215,148,107, 11,224,128, -179,179,243, 61, 30,143, 23, 6, 96, 80,209,245, 53,136,199,227,133, 57, 59, 59,223, 3,112,160,232,115,175,115,157,126, 15, 32, - 29,192,146,162,237,143, 2, 3, 3,213,161,161,161,201,161,161,161,191, 4, 5, 5,189,231,168,152, 84, 42,237, 22, 24, 24,120, -176,114,229,202,201,173, 90,181,202, 15, 8, 8,136,169, 84,169,210,118,145, 72,212,145, 22,113, 20, 10,133,242,191, 79, 95, 0, - 75, 1,172,143,140,140,140, 32,132, 68, 16, 66, 34, 34, 35, 35, 35, 0,108, 4,176, 12,165,135, 16, 95,216,239,225,225,177, 96, -209,162, 69,134,204,204, 76,162, 80, 40, 72,108,108, 44, 89, 61,119, 22,219,195,157, 71,106,120,185,233,252,252,252,226,171, 84, -170,180,167,190,156, 51, 11, 64, 77, 71, 52,159,195, 77, 34,145,220,156, 59,119,174,230,234,213,171, 26,147,201,164, 97, 89, 86, -147,145,145,161, 57,119,238,156,166, 77,155, 54, 26, 0,159, 2,224, 86, 64,243, 25,223,250,227, 50,249,249,107,242,173, 63, 46, - 63,191,191, 78,157, 58, 15, 89,150, 37,131, 7, 15, 54, 2, 8,168,136,230,203, 4, 0,226,250,206,112, 29, 34, 71,182,117,251, - 66, 66, 54,204, 32, 67,100, 72,125, 29, 77,111,111,239,163,211,167, 79, 87,165,167,167, 19,163,209, 72, 82, 83, 83,201,228,201, -147,149,222,222,222,187, 28, 60,118,143,144,144,144,236,235,215,175,179,133,133,133,228,210,165, 75,108,131, 6, 13,178, 29, 52, - 91, 93, 95, 74,203,102,127,127,255,147, 21,121,121,123,123,111,173,104, 30,181, 16, 33,213, 28,113,145,144,219,225,228,216,224, - 86,100,117,211, 74,100,144,187,176,176,173, 16, 31,117, 40,121, 42,147,210, 52,135,118,232,208, 65,251,224,193, 3, 91, 94, 94, - 30,121,248,240, 33, 59,113,226, 68, 3,128,232,137, 19, 39, 26, 30, 62,124,200,230,229,229,145, 7, 15, 30,216, 58,116,232,160, - 5, 48,161, 2,233,228, 0,216, 54,127,254,124, 66, 8, 33,139, 22, 45, 34,161,161,161,164,115,231,206, 68,163,209, 16, 66, 72, - 50, 33,228, 23,171,213, 58,214, 17, 77, 23, 23,151,209,211,167, 79,215,232,116, 58, 82, 12,203,178,164,176,176,144,172, 95,191, - 94,235,235,235,123,178,148, 74, 6,109,242,160,154, 84,147,106,254,175,105,254,147,241,131,189,159, 86,241,203,225,192,196,136, - 89,179,102, 21,155,170, 83,109,219,182,189, 53,118,236,216,136,177, 99,199, 70,180,109,219,246, 18,128, 51,119,238,220,137,152, - 57,115,102, 4,128, 17,229,100,132, 91,235,214,173, 11,179,178,178, 72,173, 90,181, 72,213,170, 85, 73, 86, 86, 22, 33,132,144, -219, 67,155,144,243,117, 65,158, 94, 57, 69,194, 15, 31, 32, 19,253,120,164,157,159,139,197,207,215, 55,207,211,211,115, 49, 94, - 92,147,177,164,204, 29, 88,183,110, 93,117,116,116,180, 38, 46, 46, 78,179, 96,193, 2, 77,231,206,157, 53, 33, 33, 33,154, 65, -131, 6,105,214,173, 91,167, 49,155,205,154,173, 91,183,106,156,157,157,163, 75, 48, 91,175,109,180,120, 60,222,218,200,200, 72, - 18, 31, 31, 79,138,162, 20,165,105,186,184,186,186,246,116,115,115,251,212,213,213,181, 39, 0, 23, 0,168, 5,200, 27,186,160, -242, 71, 13,107,212, 9, 27,209,181,230,250,174,205,154, 12,113,226, 20, 90,126,152, 65,200,224,202,175,101,180, 92, 92, 92, 70, -127,242,201, 39,106,163,209, 72,116, 58, 29,209,104, 52, 68,167,211, 17,181, 90, 77, 70,140, 24,161, 18,139,197, 3,203,211,244, -244,244, 92,120,229,202, 21,107, 86, 86, 22,185,114,229, 10, 57,121,242, 36,217,176, 97, 3,235,237,237,189,170,162, 55,160,175, -175,239,217,240,240,240,136,187,119,239, 70,220,188,121, 51,194, 98,177, 68,152,205,230, 8,179,217, 28, 17, 22, 22, 22,113,232, -208,161,136,189,123,247, 70,152, 76,166, 8,147,201, 20, 97, 52, 26, 35,170, 87,175,126,186,162,121,212, 92,132,167,166,171,199, - 8, 89,245, 33, 81,126, 55,149, 20,126,214,139,228, 76,110, 79, 54, 54,171, 68,218, 75,112, 28,175,174,237, 89,162, 38,159,207, -191,156,156,156,204,206,153, 51,199, 84,175, 94, 61,229,184,113,227, 12, 70,163,145, 16, 66,136,209,104, 36,227,198,141, 51,212, -171, 87, 79, 57,103,206, 28, 83, 82, 82, 18,203,227,241,206, 85, 32,157,203,138, 77,214,229,203,151,201,243,104, 52, 26,210,185, -115,231,228,208,208,208, 95,170, 85,171, 54,178, 60, 77,185, 92,222,127,246,236,217, 26, 82, 2, 22,139,133,168,213,106,146,148, -148,196, 86,173, 90, 53, 3,128, 7, 45,204,169, 38,213,164,154,212,104,253,101, 76, 42,103,187,228,147, 56,115,230,204, 8, 66, - 72,196, 87, 95,125, 21, 81, 20,217, 18, 0,144, 23,189,120, 0,134,207,158, 61, 59,130, 16, 18, 49,107,214,172,226,207,148,150, - 17,125,247,239,223,111, 94,179,102, 13,241,241,241, 33,190,190,190,100,237,218,181,132,101, 89,146, 21,182,139,156,175, 11,242, -232,203, 49,132, 16, 66, 98, 23, 79, 35,231,235,130, 36,108,250,150,140, 26, 53, 74, 39,149, 74, 71,148,145,185,238, 77,154, 52, - 81,235,245,122,205,246,237,219, 53, 82,169,244, 54,128,122,176, 55, 69, 50, 69,105,125,175, 94,189,122,170,168,168, 40,205,238, -221,187, 53, 0, 22, 56,120,193,212, 4,208, 73, 38,147, 13,154, 29,192,143, 35, 63,127, 77,102,251,224, 1,128, 6, 0,188,138, - 62,227, 63,107,214, 44, 66, 8, 33,129,129,129, 87, 74,209,116, 9, 9, 9,153, 21, 23, 23, 55,207, 98,177,204,187,123,247,238, -188,218,181,107,207,233, 87,221,175,213,145, 17,221, 26, 43,191,157,218,152,172,252, 44,100,197, 59,205,187,238, 25,214,113,196, -251,213, 60,175,142,243, 22,235,222,117,225,170, 95,106, 58,116,232,194, 14, 8, 8,184,153,154,154,250,204, 92,169,213,106,146, -158,158, 78, 18, 19, 19,201,213,171, 87,137,159,159,223,249,242, 52,125,125,125, 31,166,166,166,146, 77,171, 87,147,193, 13,234, -144,246,174, 78,164,131,155, 19,105, 42, 23,107,235, 2, 77, 43,106,180,238,221,187, 23, 1, 32, 2, 64, 68, 94, 94, 94, 68, 94, - 94, 94, 68, 65, 65,193,179,125, 0, 34,148, 74,101,132, 82,169,140, 48,153, 76, 17, 53,106,212,168,176,209,106, 35, 70,155, 22, - 98,228,183, 18, 65,223, 55,192, 51, 99,106,117, 79,219,141, 17,173, 72,193,135,157,201,154,198, 1,164,173, 16, 31, 57,168,217, - 87, 40, 20, 94, 2, 48,163,200,148,143,233,217,179,167,142, 16, 66,122,246,236,169, 3, 48,166,104,255, 39, 69, 38,171,167,131, -233,228, 4, 5, 5,105,139, 35, 89, 0,254, 8, 10, 10,210,134,134,134,146,208,208, 80, 18, 24, 24,168, 46,210,118,168, 64,171, - 89,179,102,172, 94,175,127,102, 0, 11, 11, 11, 73, 70, 70, 6, 73, 72, 72, 32,209,209,209,228,246,237,219, 36, 57, 57,153,236, -219,183,207,230,234,234,122,130, 22,230, 84,147,106, 82, 77,106,180,254, 82,163,245,242,235, 69,194,194,194,200, 75,187,190,187, -115,231, 78,196,236,217,179, 35,202,113,102,147,190,250,234,171,226,168,215,210, 50, 30,254, 91, 99, 99, 99,201,152, 49, 99, 72, -112,112, 48, 9, 14, 14, 38, 99,199,142, 37, 74,165,146,104,158, 68,145,243,117, 65,110,191,219,148, 16, 66,136,250,209, 93,114, -190, 46, 72,196,168,214,228,254,253,251,164, 82,165, 74,225,101,252,254,241,107,215,174, 41,118,237,218,149, 5,123,127, 44, 62, -128,150, 0,214, 74, 36,146,109,176, 55, 23, 86, 5,224, 86,171, 86,173,124,157, 78,167, 25, 60,120,176, 6, 64,229, 50, 52, 59, - 4, 7, 7,199,111,221,186,149,228,228,228,144,252,252,124,178,188, 77,109, 66,126,254,154, 44,106, 90,149,221,180,105,147,113, -198,140, 25, 90,119,119,247, 48, 0,254,131, 7, 15,182, 18, 66, 72,251,246,237,179, 75, 18,115,117,117,237, 25, 23, 23, 55,207, - 96, 48,204, 43, 44, 44,156,151,159,159, 63,239,216,145, 35,243,122, 52,168, 61, 70,249,237,212,198, 71, 70,116,107,252, 78,128, -219,160, 85,221,155, 77, 73,159, 51, 97,240, 87,173,235, 61, 50, 44,251,248,226,208,234, 62,223,191, 78,110,123,121,121,101, 26, -141, 70, 2,224,149, 87,124,124, 60,241,240,240, 72, 45, 79,195,221,221,253,171, 79,134, 15,179, 13,172, 26, 64,226,215,204, 37, -150,179,187,137,229,228,118,242,228,187,207, 72, 63, 95, 79, 85, 75, 1,103,182,163,233,241,245,245, 61,123,243,230,205, 23,140, - 86, 65, 65, 65,137, 70, 75,165, 82, 69,152, 76,166,136,160,160,160,211,111,122,213,183, 20,162, 70, 7, 9,247,246,221, 49,237, -136, 98,106,103,210,211,133,159,252, 6,114,195, 1, 92, 2, 48,170,130,223,227, 0, 88, 86,108,168,190,251,238, 59, 66, 8, 33, - 65, 65, 65, 90,188,217, 96, 20,151, 58,117,234, 36, 78,152, 48,193, 90,183,110,221,156, 54,109,218, 20,222,186,117,139, 92,190, -124,153,156, 60,121,146, 28, 56,112,128, 68, 69, 69,145,244,244,116, 18, 27, 27, 75,122,247,238, 93, 8,160, 3, 45, 11, 41, 20, -202,255, 50, 37,120,145,127, 60,156,226, 3,235,211,167, 15,243,220, 1,186, 0, 16, 55,109,218, 84,177,108,217,178,149,176,207, - 5,193,132,112, 49,180,179,132,119,191,179,132,119, 63,132,139,161, 69, 17,163,205,139, 23, 47, 94, 24, 26, 26,154, 9, 64, 2, -192,183,164, 31, 34,132,180,243,240,240, 64,106,106, 42, 92, 92, 92,224,226,226,130,212,212, 84, 16, 66, 96, 37,128,133, 0, 70, -179, 25,122,189, 30, 6,150, 64,207, 2, 42,141, 6,190,190,190, 48,155,205, 53, 74, 73,127,195,119,223,125,183, 70, 72, 72,136, - 98,230,204,153, 25,176,247,149,217, 54,126,252,248,179,127,252,241, 71,136, 70,163,201,143,142,142, 54, 52,104,208,160, 39, 0, -223,184,184,184,209,235,215,175,199,152, 49, 99, 80,198, 67,167, 65,239,222,189, 79, 70, 69, 69,213, 24, 53,106, 20, 46, 93,186, -132,229,203,151, 35, 55, 55,151, 0,128,209,104, 36, 54,155,205,220,186,117,107,243,154, 53,107,154,183,111,223,254,102,245,234, -213,185, 0,144,152,152,248,164, 36, 65,134, 97,106, 87,169, 82, 5, 70,163, 17, 10,133, 2, 81, 81, 81,112,114,113, 65,100, 70, -174, 79,199, 85,155,242,190, 60,114,150, 63,188,121,136,251,167,221,218, 24,151,132, 95,170, 85,207,223,199,199,100,182,248,198, -102,102,103,188, 78,166, 10, 4,130,212,220,220, 92,152, 76, 38,232,245,122,168, 84, 42,228,229,229, 33, 55, 55, 23, 25, 25, 25, - 16, 8, 4,241,229,105, 56,231,231, 95, 73,188,118,153,217,247,227,119,168, 97,205, 7,239,224, 90,240,142,110, 68, 77,147, 2, - 63,205,157,236,100,242,240,154,239,236,228, 84,224,234,234,186, 25, 64, 80,121,122,141, 27, 55, 70, 94, 94, 30,242,242,242,224, -225,225, 1, 55, 55, 55,184,185,185,161,176,176, 16, 74,165, 18, 42,149, 10,181,106,213, 66,195,134, 13,177, 99,199,142,183,114, -113,223, 48, 33,193, 10,219,212,179, 49, 25, 16,200,100,168,238, 38,175,210, 76, 14,247, 50,190,210,153,207,231,239,119,119,119, - 15, 7,240, 33, 0, 25,128, 15,221,221,221,195,249,124,254, 0, 0,139, 0,236,170, 96, 50,150,204,159, 63,127, 86, 92, 92,156, -244,254,253,251,152, 57,115, 38, 22, 44, 88,128, 39, 79,158,252, 0,128, 45,250,204, 7, 30, 30, 30, 97, 28, 14,103, 11,128, 94, - 0,122,250,249,249,117, 41, 71,119,192,140, 25, 51, 12, 77,154, 52,137,125,244,232,209,128,107,215,174, 53,253,236,179,207,148, - 41, 41, 41,136,141,141,133,159,159, 31, 2, 3, 3,161,209,104, 80, 80, 80,128, 1, 3, 6,184, 56, 59, 59,143,160,197, 56,133, - 66,249, 95, 54, 89, 47,121,145,127, 90, 68,171,196,237, 18,107,212, 82,169,116,126, 68, 68, 68,171,208,208, 80, 30,128,125, 0, - 16,194,197,144, 1,173, 27,109, 59,178,249,187,208, 67,107,230,134,246, 8,173,181, 45,132,139,226, 81,108, 97, 77,155, 54,117, -139,136,136,104, 45, 18,137, 62, 42, 37, 17, 4, 0,220,220,220,224,226,226, 2, 87, 87, 87,184,185,185,129,101, 89,104,116, 6, -104,109,128,218, 96,130, 82,169,132,186,104, 91, 99, 52, 67,171,213, 62,251,110, 9,116,156, 48, 97,130, 98,253,250,245, 57,153, -153,153,223, 1,104, 48,102,204,152,254,235,214,173,195,133, 11, 23, 12,189,130,107,122, 44,110,215,104, 97,189,204, 39,243,130, -249,152, 8,224,202,149, 43, 87,208,186,117,107, 48, 12, 51,172, 36, 65,137, 68,178,113,207,158, 61,146,232,232,104,212,172, 89, - 51,122,216,176, 97, 67,191,251,238,187, 26, 50, 77,254,239, 0, 96,205,203,138,158, 54,109,218,215,139, 23, 47, 86, 40, 20, 10, -179, 78,167,251, 63,246,190, 59, 44,138,171,125,251,158,237,203,238,210,219,210, 85,138, 96, 65,197,222,176,183,136,157,216, 53, -246, 88,162,209, 24, 99, 11,197,168,177, 68,141, 26, 19, 77,108, 17,141, 5, 81, 17, 99,195,222, 21, 80, 84, 4, 65,144, 38,101, -105,203, 22,182,176,229,124,127, 32, 4, 13,213,188,239,239,123,147,204,125, 93,123, 45,236,156,185,231,156,153,115,102,238,121, -206,115,158,199,110,248,240,225,200,204,204,196,155, 55,111,238,214, 34, 50, 95,198,197,197,145,210,210, 82,164,166,166, 34, 46, - 46,206,228,235,175,191,238,100, 96, 48, 70,100,195,116,218,212,238, 29, 58, 77,234,210, 14,135,239, 61,225,220, 74, 74,179,232, -208,196,201,242,113, 86,110, 83, 29,133, 87, 31,114,181,229,114,249,246,111,190,249, 70,161, 80, 40,144,157,157,141,167, 79,159, -226,197,139, 23, 72, 79, 79,199,166, 77,155, 20,197,197,197, 59,234,227,112,228,179,190,216,188,100, 6,197, 74,184, 11, 60,185, - 1,148,201, 1,149, 2,154,196, 88, 28, 72,204,195,174,147,167,184, 25,153,153, 22,199,142, 29,155,233,234,234, 26, 11,192,171, - 46, 62, 66, 42, 46, 33,131,193,120, 95,132,130,193, 96,200, 1,228, 9,133,194, 44, 83, 83,211, 44, 6,131,145, 71, 8, 81,254, - 71,222, 36,244, 40, 7,147, 9,112, 77,192, 96,215,153,218,243,227,113,227,198, 29,205,202,202, 26,148,154,154,218,117,199,142, - 29,223,240,249,252,248, 29, 59,118,124,147,154,154,218, 53, 43, 43,107,208,184,113,227,142, 2,152,210,152,227,123,122,122, 46, - 8, 14, 14,198,166, 77,155,208,182,109, 91,120,121,121,149,133,132,132,108, 7,176, 26,192,103,158,158,158,183, 23, 44, 88, 48, - 93, 34,145,136,179,179,179,219,254,240,195, 15,115,182,111,223,222, 49, 39, 39,135, 95, 15,117,143,129, 3, 7,226,252,249,243, - 0,144, 11, 32,181,168,168, 72,159,147,147, 3, 31, 31, 31,116,234,212, 9, 10,133, 2, 10,133, 2, 82,169, 20,110,110,110, 48, - 26,141, 93,233, 91, 57, 13, 26, 52,104,252,159, 10,174,154,133, 22,159,207,183,244,243,243, 67,179,102,205, 44,241,118,181,150, - 53,151,181, 98,241,204,241, 2, 81,236, 5, 80,113, 87, 48,174,103, 43,129, 53,151,181,226,237, 46, 44, 55, 55, 55,158,159,159, - 31,132, 66,161, 83, 45, 7,191,158,151,151, 7, 63, 63, 63, 88, 88, 88,192,220,220, 28,126,126,126, 40, 47, 47, 71,169, 92, 14, -165, 1, 40,211, 25, 81, 90, 90,138,226,130,124,148, 25, 0,189,169, 53,210,211,211,193,100, 50,211,106,225,116,240,240,240, 40, -136,143,143, 47, 0,112, 19,192,167,161,161,161, 88,190,124, 57,130,130,130,142, 10,114, 95, 15, 60,122,254,140,245,145,144,121, -182, 94, 92,106, 60,128,242,172,172, 44, 88, 88, 88, 64, 40, 20,214, 40, 12,252,253,253,219, 11,133, 66, 28, 60,120,144,100,103, -103,119, 71,197, 18,254, 52,138,170, 16,123, 38, 12,148, 2,216, 30, 27, 27,219,249,235,175,191, 78,234,223,191, 63,187, 75,151, - 46, 88,187,118, 45, 0, 68,213,196, 41,149, 74,239, 79,153, 50, 69,123,237,218, 53, 36, 38, 38, 10, 79,159, 62, 29,184,118,237, -218, 86, 25, 25, 25,188,179,191, 95, 24, 18,150, 37, 11,220,120,233, 22,127,221,197,235,247,109,204,132, 45,155,218, 88, 33, 46, -227, 13,199,192,196,195,250,174,104,103, 54,115,102,111, 62, 43,174, 39,143,145,219,155,207, 66,159, 74, 59, 0, 0, 32, 0, 73, - 68, 65, 84,138,237,200,102,206,144,203,229,199, 34, 35, 35, 47, 46, 89,178, 68, 33,145, 72, 96,106,106,138,162,162, 34,172, 95, -191, 94, 17, 23, 23,119, 82,171,213,158,173,143,215, 96, 36,237, 93,154,184, 2,175,226,171,126, 43, 55, 18, 60,212,114, 16,240, -233, 34,120,251,248, 64,171,213,162,117,235,214, 84,104,104,168,208,220,220,252,203,122, 69, 15,227, 79,221, 77, 79, 81, 84, 30, - 33,228,141, 66,161,200, 54, 49, 49,201,224,112, 56, 25,197,197,197,217,132,144,252,255,132,206, 34, 12,124,209,173,181, 39,192, - 51, 65, 70,145, 34,231,145, 2,197, 53, 21, 52, 53, 53,157,177,107,215, 46,254,190,125,251,116, 11, 22, 44,208,204,153, 51,135, -173, 82,169,236,230,204,153,195, 94,176, 96,129,102,223,190,125,186, 93,187,118,241, 69, 34,209,232, 15,169,136, 78,167, 67,124, -124,252,198,148,148, 20, 33, 42,194,141, 44, 10, 9, 9,153,154,156,156,204,223,185,115, 39,194,195,195, 17, 30, 30,142, 17, 35, - 70, 96,225,194,133, 8, 14, 14,174,139, 78,208,166, 77, 27, 63,107,107,107,220,184,113, 35, 7, 64, 6,128,246, 34,145,200,116, -196,136, 17, 24, 52,104, 16,212,106, 53,202,203,203,171,132, 22,147,201,132,133,133,133, 53,125, 15,164, 65,131, 6,141,255,186, -200,122, 71,108,177, 0,160,210, 84, 23, 16, 16, 64,213,245, 96, 52,148, 72, 32, 85,150, 33,189,180, 12,153, 37,198,119,182, 25, -141,198, 58,143,158,147,147,115,246,222,189,123, 51,252,252,252, 88, 57, 57, 21, 51, 98,126,126,126, 40, 43, 43, 67,206,147, 7, - 80, 26, 1,161,135, 47,148, 74, 37, 74, 94, 60,134,168, 77, 87, 88, 15,157,132,173, 59,119,106,138,138,138,118,215,196,201,229, -114,217,206,206,206, 5,105,105,105,122, 0,197,230,230,230, 3, 93, 93, 93,113,253,250,117, 0, 56, 76,128,205,136,187, 6,220, -136, 0,169, 48,169,136,220,220,220, 32,145, 72,160, 80, 40,174,215,196,121,239,222,189,100,157, 78,215,122,248,240,225,212,175, -191,254,122, 92, 38,147, 5, 1,120,170, 49,130,249, 36, 43, 31, 74, 3,248, 0, 6, 88, 90, 90,126, 30, 28, 28,220,111,193,130, - 5,136,140,140,196,165, 75,151,202, 81,225, 11,118,175, 6,218,210,212,212,212, 61, 75,151, 46,237,194, 96, 48, 62,189,124,249, -178,222,203,203, 75, 86, 94, 94,110,104,238,237,205, 8, 10, 93,195,153,255,233,108,139,162, 50, 36, 12,106,238,208,141,162,128, -132, 55,146,140, 20, 5,138,234, 58,167,254, 92,102,212,200,238,109,252,103,140, 27, 38, 18,122,180,132,242,217, 3,241,158, 19, -191,111, 53,137, 75, 14,184, 33,145,140,136,140,140, 12,188,126,253,250,124,173, 86,219,140,199,227,189,146, 74,165,223, 43, 20, -138,122, 69, 22,147,201, 28,170,113,112,182,148, 22, 23,131,255,214, 18, 37,211, 25, 81,168,209, 35,209,194, 11, 19,156, 93,170, -166, 65,243,242,242, 32, 22,139, 41,131,193, 48,172, 46,206, 75,151, 46, 33, 32, 32,160, 82,120,130,162, 40, 80, 20, 85,232,237, -237,157,207,227,241,138, 56, 28,142,108,243,230,205,106,181, 90, 13, 22,139,197, 55, 24, 12,204,191,210,219, 59, 9, 96,199, 35, -212,143,115,134,247,233,223,182,165, 15,185,249,232, 9, 85, 82,166, 62, 80,135, 21,240, 7, 79, 79, 79, 86,113,113,241, 89, 0, -137, 58,157,238,200,241,227,199,249,147, 39, 79, 86,159, 56,113, 98, 34, 0,247, 45, 91,182, 4, 42, 20,138, 70,165, 84, 72, 73, - 73,249, 97,221,186,117, 95,173, 90,181, 10,135, 14, 29, 90,144,146,146,178,252,173,165,107, 68,112,112, 48, 54,111,222,140, 67, -135, 14, 25, 19, 19, 19,127, 55, 26,141, 41, 75,150, 44,105, 99,111,111, 95,152,155,155,155, 82, 7,109,135,193,131, 7,107,110, -223,190,205,149,203,229,183, 0,124, 62,119,238,220,153,157, 59,119,150,141, 27, 55, 78, 84, 92, 92, 44, 21, 8, 4,220,189,123, -247, 90,178, 88, 44, 40,149, 74, 80, 20, 5,185, 92,174,165,239,131, 52,104,208,248, 95, 69,109, 90,228,111,130, 90,159, 13,172, -154, 26, 88, 86, 86,150,159,153,153,233,243,230,205, 27, 61, 0, 61, 0, 20,105,245,223,174,219, 27,177,111,116, 23, 79, 97,174, - 78,135,211,143,158,151, 21,105,245,149,206,239,250, 55,111,222,200, 51, 50, 50, 76, 85, 42,149,162,150, 99,221,253,241,199, 31, - 85,215,174, 93, 51, 77, 77, 77,133,193, 96, 64,251,246,237,241,242,229, 75,148, 36,198, 67,232,211, 30,194, 94, 1,120, 30,251, - 8,113,151,162,241, 90,161,213, 39,173, 94, 87,170, 80, 42,131,203,203,203, 79,215, 68,200,102,179,139, 1, 16, 66,136, 1, 0, -100, 50,217, 83,133, 66,209,211,222,222, 30, 9, 9, 9, 66,165, 1, 11, 3, 87,108,221, 65, 8, 49,112, 42, 86,115, 45, 30, 55, -110, 28, 98, 98, 98, 0, 32,166, 38, 78,153, 76,182, 96,214,172, 89,215, 14, 30, 60,200, 74, 77, 77, 29,180,111,223,190, 65, 73, - 73, 73,132, 42,206, 52,220, 46, 99,195,125,234,194,142, 63,185,121, 95, 10, 8, 8,128,131,131, 3,246,238,221,139,239,191,255, - 94, 55,111,222,188,228,239,191,255,190,163, 68, 34, 57, 82, 75,251, 75,165, 82,233, 5,107,107,235,249,173, 90,181,146, 43,149, - 74, 20, 21, 21, 33, 39, 39, 7, 86,214,214, 12, 61, 24,221,108, 45, 44,142,156,205,147, 11, 89, 23,238,227, 65,118,110,157,214, -172, 46,108,230,148,209,254,237,252, 63, 91,181, 66,132,219,167, 65,205, 10, 6,217,247, 13, 22,125, 18,104,170,214, 28,233,165, -124,146, 62, 57, 86, 38, 11,147,201,100,225,141,236, 44,131,187,117,235,118,116,221,186,117, 38, 43, 55,173,195, 22, 31, 39,232, -139,138, 80,160, 49,160, 80,163,135,172, 36, 17, 9, 9,207, 97,109,109,131,215,175, 95, 67,173, 86,227,197,139, 23,132,201,100, -158,173,207,162, 83,137,106,211,133, 82, 30,143, 87,196,102,179,243, 89, 44, 86,113,106,106,170, 82,173, 86,131,193, 96, 8, 13, - 6,131, 73, 3,234,234,108, 99, 99,179, 4, 21,193, 68, 35,229,133,133,219,253,216,176, 0, 11,189,221,108,172,135,172,158, 51, -217,198,213,209, 78,154,154,252, 74,183,251,226,157, 66,181,166,246,197, 26, 0,162,138,139,139,171, 44,146, 39, 78,156, 88,116, -226,196,137,153, 0,246,163, 34,239, 86,180, 84, 42,253,233, 3, 6,223,234,147, 39, 79,126,181,106,213, 42,152,152,152, 84, 5, - 79, 53, 49, 49,225, 3,192,111,191,253,134,132,132,132,206,120,235,175,101, 52, 26,143,230,230,230,214,199,233,238,235,235,155, - 26, 17, 17,193, 5,224, 56,119,238,220,174, 59,118,236,192, 39,159,124, 82,240,252,249,243, 46, 0,210, 0,184,127,250,233,167, - 15, 15, 29, 58,100,105, 52, 26, 81, 82, 82, 2,173, 86,155, 70,223,202,105,208,160, 65,139,173,255, 10,252, 0,196,161, 34,126, -214, 80, 0,231, 80,225,214, 81, 43, 92,222,170,179,139, 0,134, 87, 62, 31,107,113,134, 7, 42, 86,100, 93, 0,240, 11, 0,251, -218, 72,173,173,173,191,156, 58,117,170, 46, 59, 59,155,228,229,229,145,240,240,112,178,120,198, 84,195, 0, 15, 71,163,135,163, -189,210,214,214,246,165,131,141,213,129,118, 2, 44, 6,224,220,128,134, 77, 77, 74, 74,154, 61,117,234,212, 25,111,143, 59,227, -232,209,163,138,203,151, 47, 43,152, 76,102, 20, 42, 66, 59, 84, 10,202, 41,195,134, 13, 83,104, 52, 26,133,183,183,119, 49, 42, - 28,247,107, 67, 96,239,222,189, 75,206,159, 63, 79, 12, 6,195,159, 98, 20, 21, 20, 20,144, 75,151, 46,145,238,221,187, 75, 1, - 76,238,215,175,223,245, 59,119,238, 92,239,209,163,199,201,250, 42,108, 99, 99,179,226,201,147, 39, 49,233,233,233,177,231,206, -157,139, 61,114,228, 72,236,167,159,126,250,180, 77,155, 54,170,228,228,100,163, 94,175, 39, 79, 30, 63, 38,222,205,155, 43, 1, -184,213,198,211,215,132,245, 80,182,247, 27,162, 94,251, 9, 81,143,116, 33, 0,136,124,235,151, 36,127, 65,127,242,114,254, 16, -210,135,207,188,247, 33, 61,197,202,202,234, 98, 76, 76, 12,145,203,229,228,217,179,103,100, 74,192, 32,114,111,102,127,114, 97, -144, 39, 57,212,171, 41,217, 58,176, 13, 25,212,171, 39,249,241,199, 31, 73, 68, 68, 4, 89,177, 98,133,209,198,198, 70,142, 58, -124,180,196, 98,241,229,227,199,143,199, 2,136,101, 50,153,177, 50,153, 44, 86, 46,151,159,205,202,202,218,229,237,237,253, 85, -171, 86,173, 38,250,248,248,244,237,211,212,237,171,126,166,188,151,253,205,248,175,154,139, 4, 91,241,231,184, 87, 85, 48, 7, -220, 60,220,221,229, 55,110,220, 48,106, 52, 26,114,235,214, 45, 99,139,230, 94,234, 45, 99, 7,159,124,189,119,195, 73,245,249, - 95, 47,150,157,249,249,206,137,105, 1,241,189, 5,140, 95,187, 10,171,194,113,124, 40,198, 3, 56,141, 63, 86, 29, 78, 5,112, - 6,117,175, 66,100, 0,216,191,118,237,218,234, 43, 13, 1,128,209,166, 77,155, 88, 66, 72,108,155, 54,109, 98, 27, 91, 17,129, - 64,176, 36, 50, 50, 50,196,213,213,117,211,184,113,227,246, 74,165,210,115, 19, 39, 78,140, 71,197, 98, 16, 10, 21,217, 17,134, - 57, 59, 59, 23,196,197,197,145,235,215,175,147, 49, 99,198,200, 57, 28,206, 36,250, 54, 78,131, 6, 13, 26,255, 21,204,174,229, -187, 78,172,139,143,143,175,140,161, 53,183, 46,242,229,203,151,199,198,196,196,196,162, 34, 74,124,157, 96,177, 88,167,230,205, -155, 71,236,237,237, 21,118,118,118,167,216, 76,230, 76, 23, 19,248,225,195,150,186,247, 12, 11, 11, 27,241,195, 15, 63, 12, 5, -208, 25, 0,219,201,201, 41, 39, 47, 47, 79,113,231,206, 29, 69,247,238,221, 21, 54, 54, 54, 18, 95, 95, 95,197,150, 45, 91, 20, - 58,157, 78,177,100,201, 18, 5,254, 28,239,171, 38,240, 1,204,231,114,185,167, 90,180,104, 17,191,122,120, 95,221,166,133, 51, -201, 84, 79, 91, 5,128, 31, 0,204, 3, 96, 1,128, 29, 24, 24,120,229,197,139, 23, 23,125,125,125,247, 52,128,215,177, 85,171, - 86, 87,143, 30, 61, 26, 19, 17, 17, 17,251,229,151, 95,198, 88, 91, 91,103, 39, 39, 39, 27,213,106, 53, 41, 41, 41, 33, 82,169, -148,156, 59,119,206, 96,101,101,181,179,214,134,243,152,185,228,210,225, 26, 67, 56,100,173,154, 68,186,115, 25,111, 62,164,167, - 8,133,194,226,162,162, 34,146,151,151, 71, 82, 83, 83,201,201,147, 39,201,224,110,157,200,177, 79, 71,147,195, 51, 70,144,205, -131, 59,145,206,166,124,165,216, 84, 20, 99,106,106, 42,105,200,170, 67,177, 88,124, 89,163,209, 84,133,111,112,118,118,142,245, -246,246,142,240,245,245,221, 26, 25, 25,185,104,219,182,109, 35,250, 52,117,251,106,253,160,110,170,178,232, 19, 68,126,252, 7, -178,188,189,151,250,173,152,175, 17, 78,214, 86, 97, 55,174, 95, 55, 86,138, 95,189, 94, 79, 78,159, 58, 69,198, 14, 25, 16, 95, -122,225,183, 95,110, 5, 47, 56,186,164,189,215,233,238,124,140,175, 75,176, 85,189,138,136, 96,237,111,198,216,245,145,171, 85, -110, 79,115,198, 15, 93, 76,223, 73, 47, 53,214,203,203, 43,149, 16,146,235,227,227,147, 10,224,176,143,143, 79,245,255,167,213, - 66, 91, 21,156, 52, 36, 36,132,188, 29, 31, 12, 0, 65,235,214,173,139, 37,132,196,122,122,122,222, 6,128,182, 66,216,244, 50, -103,252, 50,220,221,190,168,151, 57,227,151,182,194,154, 83, 70,185,113,208,188,167,173,224,214, 8, 79, 7,121,111, 39,243,155, -135, 15,236,219,244,209, 71, 31,237, 5,176, 19,192, 55,214,214,214,183,198,143, 31,159,112,232,208,161,132, 45, 91,182,148, 39, - 39, 39,147,233,211,167, 43,121, 60,222, 55,244,125,144, 6, 13, 26, 52,254,107,168,140, 12,239,208, 24,161, 53,236,171,175,190, -138, 37,132, 84,198,210,154, 92, 67,153,225,171, 86,173,138, 37,132, 84, 70,135,127, 63,128, 89, 77, 1,205, 66,118,237,218, 69, -120, 60,222, 47, 31,216,152,234,156,226,145, 35, 71,118,145,201,100, 29,237,237,237, 59,190,181, 92,185,216,216,216,164, 30, 57, -114, 68,161, 82,169, 20,132, 16,133, 94,175, 87,196,196,196, 40,122,247,238,173,168,246,214, 95, 95, 61,223,193, 74, 49,110, 63, - 90, 61,131,172, 20,227,246,123,155, 38,237,223,191,255,124, 90, 90,218, 89, 51, 51,179,101, 13,228,116,177,181,181, 13,178,178, -178,186,104, 99, 99,179,210,202,202, 42,183,188,188,156,148,148,148,144,151, 47, 95,146,235,215,175,147,123,247,238, 17, 43, 43, -171,236,218,234,217,207,132,117,191,100,211,124, 98,220,191,142,104,119,172, 32, 0,136,116,219,114, 82,248, 99, 40,121, 52,107, - 16,233,205,103,222,253,128,243, 9, 11, 11,139,159, 79,157, 58,101, 76, 73, 73, 33, 81, 81, 81,228,220,185,115,100,225,194,133, -164,185,163,131,166, 11,151,145,223,147,199,186,248, 33, 1, 75, 53, 26, 77,172, 76, 38,139, 85, 40, 20,177, 45, 90,180,136,237, -212,169, 83, 68,151, 46, 93,182,158, 56,113, 98,209,250,245,235, 71,244, 51,229,189, 44,139, 62, 65,200,151, 67, 8,153,223,131, -188,154,217,155,244, 53, 97, 61,169,149,211,222, 62,187, 50, 90,187, 82,169, 36, 55,111,222, 36, 87,175, 94, 37, 98, 27, 27,153, -191, 9,115,118,119, 30,122,117, 55,131, 69, 67,235,217,199,156,113,224,254,143,223, 26, 84,231, 15,145,223,166, 14,209,247,182, - 96,236,170, 86,238, 24, 33, 36,119,204,152, 49,175, 9, 33,185, 39, 79,158,204, 34,132,228,142, 30, 61,250, 53, 33, 36, 23,192, -209,154, 56,223, 11, 78,186,255,173,200,154, 31, 18, 18, 18, 75, 8,137, 13, 9, 9,137, 5, 42,130,168,246, 50,103, 28,124,176, -103,179, 81,115,238, 32, 57, 49,125,168,161,151, 57,227, 96,141,245,180, 96,157,141,219,191,141,104, 47, 30, 38,167, 22, 78, 52, -244, 16,155,221,240,242,242,218,188,104,209,162,136,123,247,238, 61, 53, 24, 12, 9,169,169,169, 9, 59,119,238, 76,232,218,181, -235,109,107,107,235,120, 46,151, 59,175,190,107,244, 31, 2,205, 73,115,210,156, 52, 39,141,247, 13, 76,117,108, 59,187,113,227, - 70, 33, 33,100, 73, 96, 96, 32, 54,108,216, 48,182, 85,171, 86,227,157,156,156,108, 1, 32, 39, 39,167,236,217,179,103,178,192, -192, 64, 4, 5, 5, 97,211,166, 77, 91, 81,225,203,242,127,137,188,211,167, 79, 59, 47, 88,176, 64,178,126,253,122,227,244,233, -211,125, 0, 60, 43, 44, 44,108, 62,113,226,196,249, 44, 22, 43,208,205,205,205, 55, 55, 55,183, 64,165, 82, 29, 6,176, 7,245, -204,153,214, 6, 30, 3,134, 14, 77, 28,112,145, 1, 67,181,159,135, 4, 5, 5,141, 27, 61,122,116,249,182,109,219,244, 50,153, - 44,178,129,116, 89, 5, 5, 5,107, 42,255,177,178,178, 18, 63,121,242,100,158,157,157, 29, 35, 53, 53, 21, 26,141, 6, 41, 41, - 41, 70, 84, 76, 77,213, 8,133,158,108,255,233,228,101,239, 37,147, 2,204,202, 18, 31,131,195,100, 66,199,230, 34,239,254, 69, -236,191,153, 40, 83,150, 99,199,135,180, 83, 42,149,126,183,112,225,194,137,203,150, 45,227,187,185,185, 81,119,239,222,197,241, -227,199, 53, 18,137,100, 48,128, 27,127,132,126,106, 28,140, 70, 35,184, 92, 46, 0, 96,249,242,229, 96, 48, 24,108,137, 68,194, -165, 40,138, 71, 81,148,128,162, 40,166, 46, 45, 1, 70, 89, 9,242, 75,164,200,202,151,214,201,103, 48, 26,143, 63,120,240, 96, -113,187,118,237, 24,143, 30, 61, 66, 65, 65, 1, 82, 82, 82,136,129,144,163, 55, 85,134, 10,167, 68, 77,195,235, 39,176,178, 30, -217,214,146,199,224, 30, 8,130,191,150,193,220,109,196, 24, 84,196,210, 2,128,253, 20, 69,113, 0, 20,181,104,209,162,207,139, - 23, 47, 76, 90,180,104,161, 74, 76, 76, 60, 79, 81,148, 19,128,131, 53,113,154,152,152, 20, 2, 40, 60,121,242, 36, 0,204, 66, -197,201,107, 31, 28, 28,156,123,243,230, 77,132,132,132,228, 3,216, 5, 0, 34, 75,235,225,190,230, 28,138,251,107, 8,186,106, -192,216, 97, 36, 53, 90, 93, 69,118,246,125, 91, 9, 25, 96,239,251, 26, 29,197,222, 12,174,190,188,117,104,104,232, 77,133, 66, -161, 57,118,236,152,118,218,180,105,204,228,228,228,135, 0,110, 1, 56,137,183, 62,150, 52,104,208,160, 65,227,191,138,247, 45, - 88,245,250,104,189,175, 90, 55, 0,248, 41, 41, 41,169, 42,169,116, 82, 82, 82, 44,128,221,168,136, 6, 63,172, 17,138,119,245, - 91,139,214,158, 15,108,204,251,156,124, 63, 63, 63,147, 23, 47, 94,112, 80,115, 18, 71,234, 3, 56,255,132,154,114, 29,122,121, -121,125,175,211,233, 34,118,239,222,125,130,201,100, 78,252, 11,106,223,205,211,211,179,228,200,145, 35,198,168,168, 40,178,122, -245,106,131,131,131, 67, 9,254,236,163,245, 14,167, 63,151, 25,190,212,199, 73, 22, 51,185, 7,121,181,104, 56,185, 53,169, 55, -153,237, 36,146,249,243,153,199,255,226, 91,137,167,185,185,249,126, 19, 19, 19,153,153,153,217,101, 0,221,254,202, 53,178,182, -182, 62, 36, 22,139, 47, 87,255,216,219,219, 71,216,218,218,254, 96, 99, 99,179,218,194,194, 98,142, 59,159,187,109, 81,115, 71, -117,252,200, 22, 36,186,187, 45,153,100,195,125,127,234,240,253,122, 58,184,187,187, 23,133,133,133, 25,207,158, 61, 75, 86,172, - 88, 97,108,210,164,137, 12,117,248,181,213,105,209,178, 96, 30, 15, 31,221,197,152, 63,212,137,108,240, 49, 53,246,177,100,214, -182, 66,113,210, 91, 1, 60,181, 62, 78, 15, 15,143,221,132,144, 3,107,215,174, 61,128, 63,114,129, 14, 8, 13, 13, 13, 38,132, - 4,135,134,134, 6, 3, 24, 4, 0,254,230,140,176,195, 35, 58, 24,114, 62,114, 36,223,250,136, 12,254,230,140,176, 26, 45,153, - 86,172,211,103,102, 14, 53,230,206,236, 78,130, 60,133,134, 46, 86,188, 43, 92, 46,119, 17, 42, 44,206,157, 0,112,233,183,102, -154,147,230,164, 57,105,139,214,255,156,240,106, 16,196, 86, 86, 86,251,155, 53,107,118,194,205,205,237,132, 72, 36,218,138, 10, -167,249,198, 94, 8,247,117,235,214,201,204,205,205,219,254, 7, 47,174, 29, 0, 39,252, 57,113,238,127,172,195,172,113,192,130, -228,101, 99,159,172,113,192,130,106, 63,119,242,241,241,249, 22, 21,209,188,255,106, 39,116,179,178,178,218,105,101,101,149,253, -214, 55,203,173, 33,156, 29,152,204,137,125,248,204,187,221,184,140,188, 62,124,214,157,142, 76,230,132,191,233, 0,172,107,177, - 69,109,156,206, 54, 54, 54,219,172,172,172,114,108,108,108,118, 54, 82,100,189,195,217,214, 4, 14,125, 45,152,167,187,153, 82, -202,190,230,204,147, 29, 4,181, 47,234,104, 68,219,253, 66, 66, 66, 62, 33,132,124,226,232,232, 24, 88, 77,248,251, 6, 5, 5, - 5, 16, 66, 2, 42, 35,192,119, 18,192,174,183, 5,243, 72,119, 51, 74,218,219,130,121,164,147, 0,118,181,213,179,143, 5,243, -120,119, 51, 74,234,111,198, 56,226,202, 67, 19,250,102, 78,115,210,156, 52, 39, 45,180,254, 25, 66,139,238, 48, 52, 39,205, 73, -115,210,156, 52, 39,205, 73,115,210, 66,171,102, 97, 85,253, 83, 53,195,198,162,207, 13, 13, 26, 52,104,208,160, 65,131,198, 95, - 66,173, 1, 75,169, 58, 84,105, 99, 28,219, 63, 68,217, 70,211,156, 52, 39,205, 73,115,210,156, 52, 39,205,249,175,227,172,143, -251,255,122, 97,221,223, 26,180, 89,149,230,164, 57,105, 78,154,147,230,164, 57,105,206,127, 45, 24,244, 41,160, 65,131, 6, 13, - 26, 52,104,208,248, 75,240,123,251,253,126,224,210,154,125,180, 88,157,214,230,235,245,122, 59, 0, 96,177, 88, 18,221,195,213, - 14,117,177,179,129,126,250,138,244, 59, 96, 1,179,244,192,229, 26, 56, 47,235,245,122,203,183,156, 37,186,135,171, 7,213,201, -217,105,237,197,234,229,245, 15, 87, 15,120,191, 12, 1,152,236, 78,107,115,222,171,171, 99, 67,207, 10,133,119, 98, 98,253,215, -234,249,119,225,252, 55,131,221,121,109,190, 78, 87,209,143,216,108,150,164,252, 65,221,253,136,211,121,109, 78,245,242,186, 7, -171,237,235,226, 20,152,240,138, 60,156,108,183,214,197,153,154, 83,184, 68, 89,166,182,174,139,179,177, 99,211,197,193,161,159, -225,237,216,100, 2,179,178,115,115, 47,255,143,245,165, 14, 0, 86, 3, 48,171,246, 91, 60,128,207,233, 94, 73,131, 6,141,191, -153,208,138, 67, 69,158,195,159,223,138,173,159,107, 21, 90,122,189,222, 46,246, 84, 48,148, 26,160,223,148,181,118,238, 35,247, -252, 41, 81,178, 94, 93,194,149, 62, 63,230,203,212,201, 44,109, 89,229,102, 57, 57, 57, 20, 0, 80, 20,245, 11, 0,215, 26, 56, - 45, 99, 79, 5,163, 76, 11,248,143, 15,181,116, 5,204, 10, 56,156, 47, 76,132,194, 62, 42,149,170, 21, 0,152,152,152, 60, 87, - 41,149,215,108,203,203,183,188, 95,190,182,150, 85,175,107,223,201,107,237,124, 70,238, 89,104, 48, 26,185,111, 30,237,246, 87, - 23, 38,179,216,122,205,174,149,192,249,224, 26, 68, 85, 45,124,127, 28,247,227, 21,214,108,160, 47,151,207,111,107, 97,105,217, -211, 72, 72, 11,163,209, 72, 25,244,250, 4, 89,105,233, 45,163, 94,255, 68,175, 85, 90,199, 70,126,107,172,171,158,239,183,229, - 99,128,117, 10, 8, 20,138, 68,125,152,108,118, 55, 0, 48,232,116,119,149, 10,197,181, 81, 64,120, 67,218,222,208,243,243,161, -229,255,109,208,233,244,118,105, 23,131,161,209, 1,126, 99,190,181,107, 51,241,215, 35, 0,160,149, 60,177, 87, 36, 71,118, 6, - 0,161, 71,192, 3,158,216, 47, 31, 0, 88, 25,185,118, 47,163, 86, 65,163, 3, 90, 4,132,218,213,199, 57, 45,232,184,245,178, -217,163,121, 0,112,233,228, 15,205,175, 70,252, 52, 4, 0,250,142,158,123,126,224,152, 5, 47, 1, 96,211,207, 17,214, 71,191, - 29, 91, 39,103,195,198,102, 41,167, 52, 57,202, 83, 43,203,181,112, 17,178,196,201,201,201, 12, 0,112,116,116,108,208,216,116, - 6,204,115,129,249, 12, 38,179,167,135,167,167, 31, 0,146,250,234, 85,156, 65,175,191,237, 0,236,250, 15,247,165,133,132,188, - 27,156,149,162, 40,186, 67,210,160, 65,227,239,134,115,111,197,213,185, 63,189,204,214,182,135, 82, 3,220, 72, 1,122,117,105, -131,217, 19, 63, 18, 85,223, 22,190, 39,212, 53,249,209, 25,159,125,191,110, 97,180,105,211, 6,105,105,105, 13,170, 69,153, 22, -184,158, 12, 64,250,194,180, 68, 40,124,181,109,243,102,179, 1, 3, 6,176, 28, 29, 29, 65, 81, 20,242,242,242,186, 68, 71, 71, -119, 88,188,120,241,167,144,190, 40, 41,211, 66,126, 61,185,126,222,202,186,182,106,222, 4,171, 23,140, 53, 7,128,149, 83,118, -117,120,148,148,111,245,234,213,171,126, 95,125,245, 85, 17,243,218,181,159,108,128, 3,249, 64, 86, 67,234,121,232,236, 3,190, -121,238,111,238,147, 22, 44, 56,233,233,233, 41,114,115,115,163, 76, 77, 77,193,100, 50, 81, 82, 82,226,250,236,217,179, 33, 15, - 31, 62, 84, 70,223,248,133, 27,243,112,120,170,132,223, 89,221,160,182,171,114,248,151, 76, 77,159, 79, 30, 53,202,121,236,216, -177,124, 15, 15, 15, 0,192,171, 87,175,188,194,195,195,199,159, 60,121, 50, 8,170, 28,125,153, 22,234,250,218, 94,197, 9,128, - 15,116,179,176,179,155,196,100,179, 91,233,245,122,167,183,214,134, 55, 6,157,238,185, 84, 34, 57,252,126,121, 26,127,134, 70, - 7,188,200, 5,250,247,244,195,228,209,253,133, 0,240,213,184,117, 93, 50, 94,167,112,180, 90, 45,154,123,183,232,254,205,183, - 91, 47,130,193, 64, 88, 68,116, 85,249,134,112,198,191, 72, 67,240, 55,219,144,243, 52,188,139,161, 52,165,143, 92, 86,202, 4, - 0, 51,115,243,209,225,199,126,187,230,232, 27,120, 63,165,176,188, 65,156,117,141,205, 11,199,118, 58,100, 63,187,214,242,199, - 75,251,217,174,174,174,120,250,244,105,227,198,102,105,146,169,209,193, 33, 97,203,151, 95,138,253,253,253, 33, 18,137,192, 98, -177,160,215,235,251,223,190,125,187,127,112,112,240, 92,148, 38, 41, 27, 58, 54, 27,128, 45, 20, 69,245,153, 54,123,161,195, 71, - 35, 2, 49,122,112,119,186, 35,210,160, 65,227,239,134, 74,235, 85,245,149,135, 63,215, 41,180, 88, 44,150,100,192,212,245,118, - 61, 59,183,198,163, 39, 47, 75,211, 51,115, 21,149,219,138,159,135, 55, 31,209,221,169,229,205,155, 55,160,209,104,112,247,238, - 93, 60,121,242, 4,175, 95,191,198,156, 57,115, 52,111,167, 14,107,226, 44,241, 31, 31,106,137,210,100,145, 23, 55,169,105,116, - 98, 34, 83,173, 86,227,230,205,155, 40, 41, 41, 1,151,203,133,179,179, 51, 6, 14, 28,200, 74, 76, 76,180,234, 55, 96,176,185, -255,224, 9,105, 48,247, 82,176, 88,172,146,218,242,136,176, 88, 44, 73,191, 41,107,237, 90,122, 53,193,171,244,156,210,213,223, -238, 83, 24,141,132,149,250, 58,163,252,198,141, 27,240,243,243,195,229,203,151,173,139,139,139,191,222,181,107,215,106,246,198, - 31,183,235,180, 69, 75, 81, 59, 95,137,255,248, 80, 75,107,201, 9,183,171, 23, 78,115,158, 63,127,206,217,189,123, 55,138,138, -138,192,229,114, 97, 97, 97, 1,177, 88,140,230,205,155, 83, 43, 87,174, 20, 5, 4, 60,199,103,179, 2,221,202,221,103, 38,213, - 86,207,170,182, 43, 50, 4, 54,178, 75, 30, 17,231,206, 49,122,244,232,241,206,107,123,179,102,205, 48,104,208, 32,254,164, 73, -147, 60,198,142,159,104,244, 31, 58,237, 21, 68,110,101,245,114, 42,179, 76,172,203,238, 57,246, 31, 63, 62, 50, 52, 52,212, 66, - 44, 22, 67, 40, 20, 2, 0, 74, 75, 75,157,211,211,211,187, 4, 5, 5,141,121, 16,127,140,229, 31,144,149, 3,161,139,170,174, -243,249,111, 5,155,205,146, 84, 90,145, 76,133, 38, 37, 89,217,249, 74, 0,208,106,181,208,106,181,208,104, 52,152, 55,119, 14, -115,214,152, 78,158,110, 61, 23, 62,126,253, 38,191,184, 69,244,125,171,202,125,117,245,112,178,202, 94, 75,165,153, 87,102, 5, -127,249,165,216,222,254,143, 25,193,176, 67,135,152,197,197,197,253,131,131,131, 91, 18, 65,111,105,139,128, 80,139,186, 56,235, - 26,155,210,151,231,154,126,179, 96, 80,219, 61,223, 70,193, 96, 48,224,222,189,123,184,121,243, 38,182,110,221, 74,206,159, 63, - 95,106, 38, 20,206, 66,157, 99, 51,201,180,135, 67,158,251,198,141, 39, 41, 30,143,135, 51,103,206, 32, 49, 49, 17, 12, 6, 3, -109,218,180,193,228,201,147,209,191,127,127,241,236,217,115,136,255,224,113,169, 48,247,150,255,197,190,196, 0,176,112, 69,240, - 70,135, 41, 51,231, 99,211, 55, 43,105,161, 69,131, 6,141,191,179, 53,171,214, 16, 15,136,138,138, 34,111, 63,189, 0,128, 0, -140,102, 35,247, 28, 61, 17, 99, 60,215,108,228,158,163, 4, 96, 16,128, 97, 6, 52,105,215,174,157, 78, 42,149,146,135, 15, 31, -146,121,243,230, 41,183,111,223,126,237,220,185,115,225,250,242,242,189,142, 14, 14,223,145, 90, 28,236, 9,192,112, 3,204, 5, - 2, 65, 65,102,102, 38,249,253,247,223, 73, 72, 72, 8, 57,124,248, 48, 57,127,254, 60,137,142,142, 38,231,207,159, 39, 71,143, - 30, 37,241,241,241,228,229,203,151, 68, 40, 20, 22,184, 1,230,117,112, 50, 9,192,108, 62,114,247,210,147,143,116,161,222, 35, -247, 44, 38, 0,211, 18,240,105,215,174,157, 33, 60, 60,156,132,133,133,145, 95,127,253,149,196,199,199,147,194,194, 66,194,226, - 9, 11, 42,247,171,173,158, 4, 96, 56, 57, 57, 21, 72,165, 82,226,226,226, 66,184, 92, 46,177,183,183, 39,205,155, 55, 39, 93, -186,116, 33, 67,134, 12, 33, 19, 39, 78, 36, 95,127,253, 53,145, 74,165,132,207,231,231, 87,238, 87, 27,167, 31, 96, 34, 20, 10, - 51, 99, 99, 99, 73,109, 80,169, 84,164,176,176,144, 92,188,120,145, 8,133,194, 76, 63,192,164, 46, 78, 19,160,189,175,175,111, - 65, 97, 97, 33, 41, 47, 47, 39,153,153,153,228,217,179,103, 36, 49, 49,145,100,102,102, 18,149, 74, 85,197,253,242,229, 75,226, -238,238, 94, 96, 2,180, 39,244, 34,136, 90,251,210,251, 31, 87,123,251, 33, 98,177, 88,117,242,228, 73,242,230,205, 27,114,240, -224, 65,194, 0,214,189, 95,174, 46, 78, 46, 48,176, 71,143, 30,134,123,247,238,145,199,143, 31,147,229,203,151,147, 65,131, 6, -145,193,131, 7,147,224,224, 96,146,157,157, 77,178,179,179,201,144, 33, 67, 12, 92, 96, 96,125,253,179,166,177,105, 14,184, 6, - 4, 4,168,202,203,203, 73,106,106, 42,105,213,170, 85, 54, 19,152, 36, 4, 90,246, 2,120,245,245, 79, 39,192,210,193,193, 33, -247,222,189,123, 36, 34, 34,130,184,185,185, 21, 48,129,105,102, 64, 51, 51,160, 25, 19,152,214,172, 89,179,130,123,247,238,145, -162,162, 34,226,234,234,154,235, 4, 88,254,133,190,196, 0,176,127, 69,240, 70,146,148,173, 36, 43,130, 55, 18, 0,153,132, 16, -130, 26,124, 60,105,208,160,241,207,199,251, 90,228,159,130,170,155,100, 64, 64, 0, 5,224,122, 93,133, 85, 76,230,250, 77,155, - 54,177,212,106, 53,246,237,219, 39,255,120,204,152, 19,189,122,246, 76,109,234,230, 38,165, 24,140,122,179, 13, 23,240,120,139, - 54,109,218,100,161,213,106, 17, 19, 19,131, 14, 29, 58, 64, 44, 22, 67, 36, 18, 65, 36, 18,193,206,206, 14,222,222,222,144, 72, - 36, 48, 53, 53,197,178,101,203,204, 11,120,188, 69,245,241, 26,141,132, 5, 0, 6,163,145,203, 1,102,187,119,236, 24, 19, 20, - 20,196,176,182,182,134,149,149, 21, 68, 34, 17, 18, 19, 19,161,213,106, 33, 48, 17, 52, 40, 72, 43,131,193, 96,136, 68, 34, 92, -189,122, 21, 11, 23, 46, 68,183,110,221, 96, 97, 97, 1, 83, 83, 83,180,106,213, 10, 3, 7, 14,196,172, 89,179,144,154,154, 10, -170, 1, 78, 37, 9, 44,214,252, 89,179,102,217,249,249,249,213,184, 93,173, 86, 67, 42,149,162,160,160, 0,206,206,206, 8, 12, - 12,180, 75, 96,177,230,215,198,103, 13,136,157,189,188, 34, 31, 62,124,104, 35, 20, 10, 17, 22, 22,134,211,167, 79,227,194,133, - 11,248,253,247,223, 17, 21, 21,133, 51,103,206,160,160,160, 0, 0,224,229,229,133,227,199,143,219,136,236,236,162,172, 1, 49, - 61,164, 27,134,140,252,252, 75,173,242,242,108, 38, 77,156,120, 75,161, 80, 96,210,164, 73, 88,191, 97,195, 74, 54,176,184, 33, -251,123, 3,230, 86, 14, 14, 7, 54,110,220,200,200,203,203,195,168, 81,163, 10,183,108,216, 48, 35,238,226, 69,143,216, 11, 23, - 60,214,135,134,206,232,213,171, 87, 97,118,118, 54, 14, 29, 58,196,176,119,117, 61,224, 13,152, 55,182,158,114, 96,225,247,223, -127,207, 87,171,213, 24, 48, 96, 64,170,241,249,115,111, 61,240,155, 2, 72,188, 14,148,215,183,127, 46, 48,127,217,178,101, 98, - 30,143,135, 47,190,248,162,176, 44, 35,163,181, 30,248,181, 20, 72, 47, 5,210,245,192,175,242,180,180,214, 83,166, 76, 41,228, -241,120,216,182,109,155, 56,247,143,164,219, 13, 69, 7, 0,145, 0,110, 0,200,153, 54,123,225, 52,191, 78, 93,113,104,239, 46, -124, 27,250,213, 1, 0, 31, 83, 20,117, 24,192, 82,186,231,209,160,241,239, 68, 67,180,200,255, 40,106, 77,185,195,170,174, 36, - 1,244,174,139,197,210,218,186, 67,235,214,173,113,243,230, 77,248,250,250, 62,180,176,176,208,115,120, 60,176,217,108, 16, 99, -189, 58, 11, 38, 66, 97,191,254,253,251,179,238,223,191, 15,119,119,119,152,152,152,128,205,102,191,243,225,112, 56,112,112,112, -128, 76, 38, 67,191,126,253,216, 59,118,236,232, 7,141,230,155,122, 31,136,201,207, 68, 5,247, 55, 78,252,229,224,129,102,254, -254,254, 40, 45,149,193,104, 52, 66, 32, 16, 64,171,213,130,197, 98, 85, 76, 1,233,136,172, 33,103,204, 96, 48, 24,152, 76, 38, -220,221,221,177,126,253,122,168,213,106,112, 56, 28, 0,128, 76, 38,131, 84, 42,197,179,103,207,144,158,158,142,183,111,225,117, -194,212,220,252,163,177, 99,199,214,152,240, 87,163,209,160,180,180, 20,165,165,165,144, 74,165, 80,171,213,232,218,181, 43,247, - 92, 84,212, 71, 40, 42,218, 82,227, 62,124,254,152, 67,135, 14,217,113,185, 92,168, 84, 42,200,229,114,100,101,101, 33, 35, 35, - 67, 45,145, 72,244,166,166,166, 12, 55, 55, 55, 6,143,199,227,141, 28, 57,146,146,201,100,160, 40, 10, 1, 1, 1,214, 71,194, -194,198, 66,171,221, 74, 15,233,134,225, 18,160,105,175,213, 14,235,220,169,211,213,135,143, 30,249, 45, 90,180, 8,241,241,241, - 27, 5,199,142,221, 40, 3,158,212,181,111, 42, 48,255,187,106, 2,134,100,100,248,150, 3, 5,213,138,164,187,165,165, 93,152, - 50,101,202,211,248,248,120,155,109,219,182,137, 63, 30, 53,106, 62,128,117,141,169,163,169,185,121, 71, 7, 7, 7,156, 63,127, - 30,153,175, 95,127,165, 7, 84,141,122,227, 98, 50,123,248,251,251,227,204,153, 51,200,206,200,248, 74,255,110, 29, 43, 94,148, -128, 2, 86,106,234, 87, 7, 14, 28,216, 63,125,250,116, 48, 89,172, 30,208, 55,106,226,240, 79,142,239,211,231, 44,194,129,159, -119, 28, 0, 48, 19,128, 17,192, 67,186,199,209,160,241,239,182,106,213,167, 69,254, 70, 98,235,231, 70, 91,180,236,236,236,156, - 68, 34, 17,114,114,114,208,194,199, 71,194,227,241,192,101,179,193,231,114, 27, 84,131,178,178, 50, 95, 71, 71, 71,148,150,150, -194,198,198, 6, 28, 14,167,234,195,229,114,171,254, 54, 53, 53, 5,131,193,128,171,171, 43,202,202,202,124,235,229,205,127,102, -119,108,199,220,121,247,110,156,111, 54,106,212,104, 88, 90, 90,193,197,197, 25,118,118,118, 48, 49, 49,129,139,139, 11, 60, 60, - 60,200,150, 45, 91, 32,176,107,211,160, 27,121,117,241,196, 98,177, 96, 48, 24,144,159,159,143,164,164, 36,196,199,199,227,222, -189,123,120,252,248, 49,228,114, 57, 26,160,179, 80,166, 82,181,101,177, 88, 53,138, 44,169, 84, 10,169, 84, 90, 37,180, 10, 10, - 10,144,158,158, 14,133, 82,217,174, 14,209, 59,186,117,235,214, 76, 0, 48, 49, 49, 65,187,118,237,176,103,207, 30,253,217,211, -167,199,181,188,119,207,202,229,226, 69,139, 95,118,239, 30, 23, 24, 24,104,184,127,255, 62,100, 50, 25, 94,188,120, 1, 91, 91, - 91, 22,151,207, 31, 75, 15,231,198, 33, 22, 80,218,200,229,131,187,117,235,150, 86, 90, 90,138,205,155, 55, 51,216,166,166, 63, -135,214, 50,197, 87, 5, 38,179,187,191,191, 63, 34, 35, 35,145,147,145,177, 60,163, 6, 1,147, 1, 20,100,166,166, 46, 63,112, -224, 0, 6, 14, 28, 8,138,197,106,180,163, 82,151, 46, 93, 90, 27,141, 70, 60,125,250, 20, 22,192,131,198,238,239,225,233,233, - 87,105,249, 21, 2,183,106, 43, 39, 4,110,197,197,197,193,196,196, 4, 45, 90,182,108,223,200,195,108,161, 40, 42,119,250,156, - 69,136,184,112, 7, 0,112,224,231, 29,249,213, 68, 22, 13, 26, 52,104,139,214,223,213,162, 85, 41,172,170,127,240,142,208,106, -160,248, 0, 0,176,217,108,112,121, 60,112,185,220, 10,129,196,227, 53,152,131,162, 40,240,249,252, 42, 97, 85, 93, 96, 85,255, - 91, 32, 16, 52, 72,192, 0, 64, 73,202,133,158, 51,103, 76,231,242,120, 60,104,181, 26, 16, 66,192,227,241, 97, 97, 97, 1,119, -119,119,200,100, 50,116,235,222, 75,147, 37,229, 68, 89,183, 24, 25,255, 33,103, 79,175,215, 67,169, 84,162,164,164, 4,197,197, -197,144,201,100, 80,169, 84, 13, 94,138,110, 52, 26,153, 89, 89, 89,248,237,183,223, 80, 84, 84, 4,160,194,209,186, 82, 92, 85, -126,167,165,165, 33, 44, 44, 12,175, 95,191,110,212,245,233,217,179, 39,162,162,162,152,189,251,245,219,123,217,205, 45,231,178, -155, 91, 78,239,126,253,246, 70, 70, 70, 50,157,156,156,144,158,158,142,152,152, 24,148,148,148,128, 16, 66,175,159,255, 0,188, - 2, 74,202,138,139,167,175, 92,185,146,136, 68, 34,108,254,238,187,182,235,128, 9, 13, 21, 48,230,117, 8, 24,243,191, 38, 96, - 64, 8,129,209,104,132,193, 96,248,160,182, 81, 20, 69,177,217,236,198,134, 86,104, 76,225, 42,199,247,101, 95,175,199,239,103, -194, 43,127, 79,166, 69, 22, 13, 26, 52,254, 1,168,213, 17,158, 85, 77, 65, 86,125,215,134,252,252,252, 55, 74,165,178,153,155, -155, 27,178,179,179,237, 92, 93, 93, 51,184,108, 54, 56, 92, 46, 40, 70,253,154, 64, 32, 16, 60,205,201,201,233,238,228,228, 4, -189, 94, 95, 37,170,222,159, 58,172,180,210, 60,126,252, 24, 2,129,224, 41,212,117, 70, 78,128, 65, 91,210,164,125,251,246, 85, -150, 33, 11, 11, 11, 88, 88,152,131,199,227, 99,213,170, 85,198,109, 91,182,236,114,237, 27, 90,250,201,226,149,100,229,186,189, -255,209, 51,219,208, 7,147, 64, 32,120,234,226,226,210,213,220,220, 28, 17, 17, 17, 72, 79, 79, 71, 73, 73, 9,202,202,202,160, -209,104, 80, 86, 86, 6,173, 86, 11, 62,159,143,150, 45, 91,194,204,204, 12,209,209,209, 79,161,209,212, 44, 46,139,138, 34,158, - 62,125,218,181, 83,167, 78, 85, 22,149, 62,125,250, 80,125,250,244,177,169,178,162,149,149,161,176,176, 16, 15, 31, 62, 68,116, -116, 52, 40,148, 28,221,209, 0, 0, 32, 0, 73, 68, 65, 84,138, 66,114,114,178, 65,163, 82, 29,165,199,196,135, 65, 13,220,101, - 30, 56,176,255,211, 79, 63,157,209,189,123,119, 24,128, 33, 0,194,254, 63, 10, 24, 0,192,189,123,247,158, 25, 12,134,238,205, -155, 55,135, 20,232, 12,224, 76,163, 68,100, 74, 74,156, 94,175,239,215,182,109, 91, 68,156, 56,209, 19, 64,122, 77,229,148, 64, - 79, 63, 63, 63,168, 84, 42,188, 72, 72,136,109,132,200,218,187, 34,120,227,180, 41, 51,231,227,208,222, 93, 56,240,243,142,172, -253,123,182,187,160, 1,254, 99, 52,104,208,248, 87, 89,179,234,213, 34,255,163,152, 93,155,248, 98, 53,134,165,180,164, 36, 54, - 46, 46,174, 89,251,246,237,177,119,239,222, 78,221,186,118,125,195,225,114,245, 92, 14, 7,140, 6, 60, 72, 84, 74,229,149, 43, - 87,174,116, 30, 57,114, 36,235,254,253,251, 16,139,197, 85, 66,171,242,155,197, 98,129, 16, 2,129, 64,128, 83,167, 78,149,171, -148,202, 43,245, 90,139, 12, 70, 3,227,173,208, 35,132, 64, 42,149,130,195,225, 96,235,214,109,216,185,101,203, 68, 3, 16,238, - 37,180,253, 18, 0,255,255,219, 3,186,172,236,234,239,191,255,222, 33, 40, 40,136,237,236,236, 12,169, 84,138,146,146, 18, 20, - 21, 21, 65, 38,147, 65, 38,147,161,164,164, 4, 82,169, 20,124, 62, 31,241,241,241, 58,117, 89,217,213,218,248,120,106,245,201, -169, 83,167, 46,139,139,139,115, 96,177, 88,208,233,116, 48, 26,141, 48, 26,141, 40, 47, 47, 71, 74, 74, 10,158, 63,127,142,196, -196, 68, 20, 23, 23,131,205,102,131,201,100,226,241,227,199, 37, 66,157,238,132,150, 30,211, 31, 12, 54, 16,113,251,246,237, 25, -147, 39, 79,134,163,179,115, 47,100,103, 55, 72,192,156,174, 67,192,148,126,152,128,249, 67, 0,201,229,143,210,210,210,186,247, -238,221, 27, 14,206,206, 27, 91,102,103, 95, 78,104,132,159,150, 65,175,191,117,251,246,237,126, 83,166, 76,193,222,189,123, 55, -218,166,165, 93, 40,120,111,154,211, 22,176,109,234,225,177,113,218,180,105,184,116,233, 18, 12,122,253,173, 58, 40,171, 71,124, -111, 50,109,246, 66,151,247, 28,223,247, 80, 20,181, 0,192,102,186, 71,209,160, 65,227,159,108,209,106,212,212,161,137,193,176, - 98,233,210,165, 58, 6,131,129,209,163, 71,155,158,137,140, 12,124,252,228,137,187, 68, 34,177, 48, 24, 12,245,114,217,106, 52, -219,151, 46, 93, 42,213,106,181,240,246,246, 70,113,113, 49, 12, 6, 3, 88, 44, 22, 88, 44, 22, 40,138, 2,131,193,128, 72, 36, - 66, 92, 92, 28,246,239,223, 47,179,213,104,182,215,251,144, 48, 24,158,134,133,133,129,201,100, 18, 62,159, 15,138,162,192, 98, -177,176,109,219, 54,201, 78, 32, 2, 0,152, 12,134, 22, 0, 24, 12,170,161,222,187,245,206, 91,114,185, 92, 24, 43, 22, 1,212, - 91,214, 82,163,249,126,211,166, 77,242, 23, 47, 94, 64,169, 84, 86, 89,223, 20, 10, 69,149,115,189, 84, 42, 5, 69, 81, 80, 42, -149,136,140,140,148, 91,106, 52,223,215,198, 87, 4,228,101, 39, 39, 15,239,212,169, 83, 81, 90, 90, 26, 74, 75, 75,241,244,233, - 83, 68, 71, 71,227,248,241,227,184,116,233, 18, 82, 82, 82,160,215,235,225,228,228, 4, 66, 8, 78,159, 62, 93,170,151,203,135, - 20, 1,121,244,152,168, 29, 77,196,226,126,246,118,118,153,182, 54, 54,217, 77,196,226,126,239,111, 55, 7, 94,190,124,249, 18, -122,189, 30,238,238,238, 86,117,249,105, 17,189,254,246,237,219,183, 49,101,202, 20,184, 52,107,182,193, 13,176,125,191,140, 27, - 96,235,230,225,177,161, 82,192, 16,189,254,118, 99,235,108, 10,236,248,242,203, 47, 85, 28, 14, 7,199,142, 29,115,215,121,122, - 38,178,128, 9, 34,192,167, 55,192,169,111,127, 7, 96,215,215, 95,127,157, 71, 81, 20, 14, 31, 62,108, 99,238,225,241,140, 5, - 76, 53, 7,154,152, 3, 77, 88,192, 84,115, 15,143,103,199,142, 29,179,209,235,245, 88,188,120,113,158, 3,176,171, 14,202,133, -132,144, 97,132, 16,127, 66,136,203,254, 61,219,241,251,153,240, 74,145, 53, 19, 21, 78,239,147, 1, 60,163,123, 28, 13, 26, 52, -254,201,168,209, 12,197,234,180, 54, 31, 32,118,189,186,180,193,163, 39, 73,165, 54,150,102, 23, 43,183, 21, 63, 15,111,222,215, -215,172,205,143, 63,254, 8, 54,155,141,172,172, 44, 36, 36, 36,192,204,204, 12, 19, 39, 78,212,168,228,242,225,213,114, 29,246, - 7, 16,253,150,179, 34,159, 90,105,178,200,131, 21,223,236,194,239, 81, 76,115,115,115, 40, 20, 10, 48, 24, 12,240,249,124, 8, - 4, 2,152,152,152, 32, 38, 38, 6, 67,135,141, 48, 20, 8,252,255, 8, 88,250, 71, 62,181, 42,206,202, 88, 67,157, 1, 65, 28, -240,133,157,163,227,210,213,171, 87,155, 12, 26, 52, 8, 28, 14, 7,206, 77,188,242,220, 7,111,222,193, 96, 80,250,236, 34,217, - 42,143, 38,142,230, 9,201,233, 0, 40,137,238,225,106,199,106,185, 14,255, 84, 79, 87,237, 13,247, 83,191,110, 49,107,215,174, -194, 31, 93, 42,149, 34, 63, 63, 31, 18,137, 4, 82,169, 20, 74,165, 18, 0, 16, 21, 21,133,223,111, 38,202, 84,206,129,169,181, -213,243,143,182, 39,153, 58,150, 63,104,122, 36,236, 87,166,173,173, 45,242,243,243, 81, 80, 80, 0,169, 84, 10,149, 74, 5,131, -193,128,226,226, 98,236, 59,240,171,161, 72,228,255,186, 42, 32,100, 93,156,202, 44, 19, 43,197, 29, 39,191,150,110,100,198,140, - 25,166,102,102,102, 48, 26,141, 40, 41, 41, 65,102,102, 38,210,210,210,112,243,230, 77,165, 68,170,133,210,102, 64,118, 85,192, -210, 26, 56,255,131,248,219,113, 86,143, 91,229,232,224,144,147,145,145, 97,103, 48, 24,224,228,228,164,151, 22, 23,111,224, 2, -151, 76,129, 92, 0,164, 16, 88,253,253,142, 29,211, 71,140, 24,129,142, 29, 59,102,229,229,231, 55,173,169, 47, 17,128,233, 13, -152,151, 57, 59, 63,127,248,240,161, 56, 51, 51, 19, 83,166, 76, 41,204,120,245,106,121,165,191, 86, 41,208,211,205,195, 99,195, -177, 99,199,108,154, 53,107, 6, 95, 95,223, 60,126,102,102,171, 36,160,180,150,254, 89,235,216,148,190, 60,215,116,238,168,214, - 29,231,205,155, 7,189, 94,143,155, 55,111,226,193,131, 7,200,200,200,192,157, 59,119,164,102, 66,225,184,106,185, 14,107,236, -159, 67,188,148,238,135, 15,135, 81, 28, 14, 7, 7, 14, 28, 64, 92, 92, 28, 0,192,207,207, 15,211,166, 77,131, 94,175,199,164, - 73,147,201,185, 36,147,212,186,250, 39,128,214, 0,190, 67,133,200,235, 72, 8,225, 83, 20,149, 3,192, 5,141,243,201,162,251, - 39,205, 73,115,254,123, 56,255,145,168, 55,215,225,218,159, 96,254,110,154,143, 89, 57,225,123, 66, 89, 61,122,250,251,132,134, - 4, 51, 58,117,234, 4, 23, 23, 23,248,249,249, 33, 51, 51,147,103, 97, 97, 81, 95, 62, 53,133,255,224, 9,105,109,218,180,177, - 88,190,124,185,249,192,129, 3,217, 46, 46, 46, 32,132, 32, 46, 46, 14, 17, 17, 17,229,123,247,238,149,149,217, 15,147,198, 94, -251, 77,209,144,124,106, 15,128, 50, 0,107,156,115,114,126,158, 63,119,110,112,187,246,237,103,132,132,132, 48, 68, 2, 19,246, -250, 85, 51,249, 0,176,246,135,227,230, 35, 2, 39,226,123, 79,160,215,132,154,243,200, 85,175,103,102,246,172,140,143, 70,245, -243,252, 98,193,116,195,216,177, 99,133,102,102,102,112,113,113,129,165,165, 37, 82, 83, 83,145,157,157, 77,206,158, 61,171,184, -247,248, 37,251,244,165, 71, 25,124,115,135,134,228, 37,148,251, 15,250,248,245, 71, 31,125,100, 57,117,234, 84,211, 14, 29, 58, -176,121, 60, 30,120, 60, 30,242,243,243,145,146,146, 82,126,246,236, 89, 69,153,221,144,146,216,107,199,228, 13,204,117,168,242, - 31, 31,154,114,235,114,200,226,231, 79,159, 78, 54, 2,109,203,203,203,157, 12, 6, 3,197, 96, 48,114,141, 70,227,211,114,185, -124,191,198, 47,100, 27,157,235,176, 97, 48, 24, 12, 28,131,193, 0,169, 84,138,203,151, 47,179, 94,189,122,181,250,201,147, 39, -171,115,114,114,160,211,233, 48,102,204, 24,248,249,249,225,218,181,107, 40,200,207, 63, 91, 23, 87, 18, 80,202,203,206,158, 54, -107,214,172,243, 97, 97, 97,140, 39, 79,158,216, 28, 56,112, 96, 95, 77, 2,102,242,228,201,198,252,204,204,105, 26,160,180,142, -254, 89,215,216, 44,188,112,108,231,147,145,163, 3, 91,134, 4,173,102,119,235,214, 13, 54, 54, 54,232,217,179, 39,202,203,203, - 45, 90,180,104, 81,223,216,148,251, 15, 30,151,218,182,109, 91,225,182,109,219,196,211,167, 79,199,130, 5, 11, 0, 0, 42,149, - 10,151, 46, 93,194,226,197,139,243, 50, 89,157,149,245,245,207,183,150,170, 74, 1,118, 3,128, 63,128, 84,208,142,239, 52,104, -208,248,103,162, 50,169,180, 3, 42, 18, 75,159, 67,197,203,121,253,185, 14,111, 61,120,134,234,105, 62, 42,224,144,160,119,157, -250,106,206,210, 13,190, 76,157,204,146, 77,169,205,146, 95,190,164,234,203,121, 88,149, 79,205,220, 75, 97,157,118,180,211,250, -181,107, 23,125,255,253,247,253, 42, 67, 56, 8, 4,130,167, 42,165,242,138,173, 70,179,189,204,220,235, 74, 99,115,243,101, 3, -249, 0,230, 90,198,198,238, 8, 24, 49,102, 19,223,202,157,189,114,221, 94, 53,147,193,208,166,228, 20,224,123, 79, 64,216,128, - 5,146,101, 90,224,185,212, 65,159,111, 29,152,244,245,151, 95,126,177,118,205,154, 78, 34,145,168, 87,185, 94,239,101, 52, 26, - 1,163, 49,185, 76,169,188, 65,202,203, 31,106,252,130,182,240,205, 29, 72,131,243, 18, 90,180,144, 91,189, 14,239,116,112,255, -254,133, 39, 78,156,248, 83,219,173, 53,154, 29,101, 22, 45,162, 27,210,246,234,101,212,192, 93, 72, 36,119,235, 50, 93,210,185, - 14, 27,248,246, 97, 52,206,182,180,180, 60,212,175, 95, 63,126,255,254,253, 49,116,232, 80,116,235,214, 13, 70,163, 17,132, 16, -200,229,114, 28, 63,126, 28,155, 54,109, 74,110, 10,172,169,143, 79, 3, 92,225,253,254,251,144,182,109,219, 30,168, 75,192,188, - 21, 89,245,250, 36,214, 61, 54,121,201,122,243,225,233,227,231,175,247,212,202,114, 45,172, 5,122,241,243,103, 79, 25, 13, 31, -155,222,114, 67,220,241,206, 99, 70,141,154,207,100,177,122,190, 93, 1, 73, 94, 36, 36,196, 86, 38,149,134,223,180,203,141,236, - 75,149,177,235,104,199,119, 26, 52,104,252,211,133,214, 80, 84,248,107, 85,165,228,169, 53,215, 97,165,213,135,197, 98, 73, 82, - 79,207,153, 88, 23, 59, 27,232,247,214,146,133,122,115, 29,190,253, 59, 29,144, 67,163,249,230,157, 96,164,213, 86, 23,178,223, - 43,223,152,176,136, 37, 64, 18,244,154, 0, 72, 18,128,200,185, 21,124,157,214,126, 85,189, 77,181, 62,100,223, 57, 46,167, 88, - 13,220,130, 66,113, 11, 10, 69,141, 78,187,108, 22,167,184,190,122,190,223,246, 76, 64,246, 87,219,254, 62,103,189,226,225, 47, -156,207,127, 27,222, 20, 22,158, 6, 32,114,142,138,178,191, 16, 21, 53,246,139, 37, 75,198, 56, 56, 58,122,216,216,216, 88,154, -154,154, 50,238,223,191,159,166, 87,171,119,180, 3, 14,190,181,166,214, 11, 13,112,197, 59, 51,179,213,199,163, 70,205,167, 88, -172, 30,213, 5, 12,209,235,239,184, 3,187,234,178,100,125,232,216,116,225, 57,244,123,107,201, 2, 19,152,213,144,190,145, 93, - 81,143,117,208,235,215, 33, 62,190,134, 62,223,232,190,180,150,162, 40, 57,104,199,119, 26, 52,104,252,115, 81,153,239,240,220, -255,245,129,251,211,156, 52,231, 63,136,147,137,138, 85,116,244,249,164, 57,105, 78,154,147,230,164,209, 32,176,232, 83, 64,131, - 70,131, 97,192, 31,211, 96, 52,104,208,160, 65,131, 70, 37, 42,125,179,170,227,103,160,194,117,167, 54, 85,218,152,213, 4, 31, -162,108,163,105, 78,154,147,230,164, 57,105, 78,154,147,230,252,215,113,214,199,253,119, 92,205, 88,233,147, 85,229,155,245,127, - 5,218,172, 74,115,210,156, 52, 39,205, 73,115,210,156, 52,231, 63, 29, 14,111, 69, 86,245, 15,128, 70, 6, 44,165, 65,131, 6, -141,127, 42, 66, 66,192, 32, 4, 20, 33, 33, 12, 66, 78, 48, 9, 9,100, 18,130,191,148, 10, 36, 48,176,230, 96,182,159, 77,180, - 52,165,207, 56, 13, 26,255, 40,228,162,150,164,210,180,143,214,255, 95,184,138,197,226, 61, 0,168,188,188,188,217, 0, 50,233, - 83,242,191, 7, 43, 43,171,126,122,189, 30, 50,153,236,202, 63,177,125, 45, 61, 48,138, 48,208,162,234, 7,130,204, 23, 41, 56, - 84, 83,217, 22,158,152, 2,234,143, 88, 92,148, 17, 47, 18, 94,225, 84, 35, 14,199, 24,210,223,101, 23, 0,156,143,206,154,143, -255, 78, 92,173,230,182,182,182, 23, 89, 44, 22,203, 96, 48,204,149, 72, 36, 81,181, 11,161, 64, 38, 0,176,201,181, 21,210, 60, -187,229,159,127, 74,177,203, 52,251,165, 26,149,178,148,201,102,190,230,177,197,183,231, 76,103,156, 47, 81,116, 77,168,105,255, -240,240,240, 90,179,120,183,242,196, 16,134,161,229, 48,191,214,105,169,223,109,239,244,125, 47,119, 27,118, 90,214, 99,209,198, -221,165,123,184, 22,110,195,166,140,165,162, 88, 2,106,242,254,253, 69, 10,122,148, 53, 28,235, 1,171,114,192,151,205,227,185, - 24,244,122,123, 10, 32, 76, 22, 43, 95,167,209,100,113,128,248, 21,128,244,159,206,201,225,241,156, 13,122,189, 61, 0,252, 47, -214,147,198,187,168, 85,104,137, 68,162, 24, 6,131,225, 92, 61, 25,110,101, 62,193,202,223,170,111,163, 40, 10, 6,131, 33,187, -164,164,164, 67, 35,142,111, 6, 96, 44,128,202, 37,234, 71, 0, 28,199,135, 59, 28,155,113, 56,156,165, 66,161,176,175, 74,165, -106, 5, 0, 38, 38, 38,207,149, 74,229,213,242,242,242,239, 62,144,151, 5,224, 99,145, 72,212,135,193, 96,244, 33,132, 80,132, -144,107, 10,133,226, 42,128, 19, 0, 62, 36, 82,130,137,157,157,221, 58, 43, 43,171, 9, 43, 86,172, 40,178,182,182,246, 94,188, -120,241,163,226,226,226,223, 10, 11, 11, 87,161, 17, 57,234,254,203,240, 16,139,197, 71,216,108, 54, 51, 43, 43,171, 15, 0,184, -184,184, 92,211,106,181, 6,137, 68, 50, 17,192,171, 70,242, 9, 1,116, 17,137, 68, 29, 68, 34,145,191,193, 96,104,241, 54, 63, -227, 11,133, 66,113,179,188,188, 60, 6,192,125, 0,202,255,161, 49, 98,202, 98,177,194,222,246,117, 47, 0,242,127,218, 77,128, - 48,208, 34,225,121,162,119,149,240,106,229, 83,123, 97, 10,174, 53,148,109,176,208,234,219,203, 97,216,240,225, 3, 24, 0,160, -213,157, 31,118,245, 70,238,153,255,112,115,154,143, 30, 61,250,110, 88, 88,152,165, 70,163,193,236,217,179,143, 68, 71, 71,239, -146,201,100, 43,234,188,113,136, 44, 23,111,222,118, 73, 64, 81, 12, 0,176, 51, 26, 13,118,111,222,188,242, 74,120,118,119,240, -243,231,247,214,171, 18,175,222, 55, 82,236, 57,229,232,153,216,144, 74,180,112, 71,192,176, 49,163,134,174, 89, 19,130, 9,227, - 38, 52,121,254, 92,109,226,100,150,202, 45, 86, 9, 61,173,109,237,134,175, 89, 27, 78,221,190,117,122,120,216,129,208,171,211, -167, 91,247,165,197, 86,131, 64,173,101,177,186,152,123,122,250,143, 59,125, 26, 34, 23, 23, 22,139,199, 99, 0,128, 94,163,113, - 81,100,101, 57, 28, 27, 62,188,115,200,203,151,215, 67,128, 7, 52,231,255, 23, 78, 26,141, 17, 90, 12, 6,195,249,205,155, 55, -118, 66,161,176,226,102, 76, 8, 12, 6, 3, 12, 6, 67, 85,242, 98, 66, 72,213,183, 94,175,135,143,143, 79,131,222,104, 1,244, - 5,240, 73,239,222,189, 3,191,251,238, 59,182,175,175,111,101,202,144,158, 43, 87,174,252, 33, 46, 46,238, 36,128,131,168, 8, -222,216,208, 55,222, 65, 66,161,240,240,230,205,155,205, 6, 12, 24,192,114,116,116, 4, 69, 81,200,203,203,235, 18, 29, 29,221, - 97,241,226,197,115,149, 74,229, 36, 0, 23, 27,113,126, 90,155,154,154,134,143, 26, 53,202,185, 87,175, 94,252,150, 45, 91,194, - 96, 48,224,241,227,199,211, 99, 98, 98,198,159, 60,121, 50, 88, 46,151, 7,162,225,249,218, 40,145, 72, 52,213,204,204,108, 93, - 80, 80,144,213,164, 73,147,184,207,158, 61, 43,113,119,119,167,110,223,190,109,123,252,248,241,185, 27, 54,108,248, 88, 38,147, -173, 82, 40, 20,191,162, 1, 57, 20, 77, 77, 77, 99, 24, 12,134,115, 67,132, 48,128,198,136,225,118, 77,155, 54, 61,126,235,214, -173,166,233,233,233,134,145, 35, 71, 30, 2,128,171, 87,175,250,234,116, 58,106,224,192,129,231,179,179,179,199, 2,120,220,192, -182,183,177,178,178, 58, 51, 97,194, 4, 43, 15, 15, 15, 65,211,166, 77, 41,161, 80, 8, 38,147,137,210,210, 82,199,103,207,158, -245,127,240,224,129, 42, 58, 58,186, 88,163,209, 12, 7, 16,223,136,235,212,205,206,206,110, 50,155,205,110,173,215,235,157, 0, -128,197, 98,189,209,233,116,207, 36, 18, 73, 24,128,187, 31, 58, 64,236,237,237,119,174, 91,183,206, 70, 34,145,144, 13, 27, 54, -236,148,203,229, 83,255,169, 55,131, 35,191,157, 64,204,163, 7, 64, 69,218, 28,170,134,254, 71, 1,224,124,254,249, 18,116,232, -216, 25, 19, 39,124, 92, 47,231, 71,253,156, 55,179,185, 28,107,181, 90,125,183,180, 76,115, 66, 40,224,143,157, 48, 62, 32, 25, - 0,206, 95,184, 62,182, 83, 39,203,107,230, 2,222,199,124, 62,191,155, 78, 91, 94,244,251,149,236, 47, 27, 35,170,156,156,156, - 46, 90, 90, 90, 10,138,139,139,243, 10, 10, 10,126, 26, 54,108,216,218,131, 7, 15, 90,166,165,165, 33, 43, 43, 11,139, 22, 45, - 18,101,103,103,207,143,143,143,191,167,213,106,107,181,108,201,229,197,219, 87, 46, 31, 17,100,110,110,195, 20, 10,204, 96,106, -110, 5,119,143,182,232,210,109, 24,134, 12,157,129,148,228,184, 46, 7, 15,172,137,123,243, 38,250, 91,145, 85,179,181, 82,105, -211, 90,239, 75, 45,155,163,215,240, 81, 21, 34, 43, 40, 40, 4, 47, 19, 19,229,233,175, 25,159,157, 59,205, 18, 12,233,231,195, -211,107,243,210,111,223, 58,221,180, 71,207,145, 0,208, 33,236, 64,232,213,207, 38, 90,246,219,121,164, 68, 78, 63,146,106,191, -119,174, 97,179,167, 14,218,182,205,206,111,238, 92,142,226,245,235,242,212,221,187,203,242,111,222, 52,176,120, 60,226, 50,120, - 48,101,219,167, 15,127,238,139, 23,156, 59, 27, 54,248,179, 67, 67,221, 87,149,151, 31,166, 57,255, 79, 57,255,237,168,116,130, -175,190,250,240,231, 58,133, 22, 69, 81, 16, 10,133, 56,118,236, 24,216,108, 54, 88, 44, 22,216,108,118,173,127,187,186,186, 54, -164, 34,163,197, 98,241, 15,187,118,237,178, 31, 52,104, 16,248,124,126,213, 6, 38,147,137, 1, 3, 6,160,127,255,254,236,156, -156,156,241,199,142, 29, 27,191,126,253,250,124,169, 84,186, 0,111, 19, 67,215,129, 62,222,222,222, 17,151, 46, 93, 50, 81,171, -213,184,121,243, 38, 74, 74, 74,192,229,114,225,236,236,140,129, 3, 7,178, 18, 19, 19,173, 6, 12, 24, 16,241,242,229,203, 0, - 0,215, 26, 80,215, 14,118,118,118, 55, 78,156, 56,193,111,219,182, 45,149,146,146, 2, 63, 63, 63, 0, 64,105,105, 41, 70,142, - 28,201,159, 52,105,146,199,248,241,227,239, 75, 36,146, 94, 0, 98,234,225,107, 47, 22,139,127, 29, 53,106,148,227,250,245,235, -205, 76, 77, 77,145,158,158,158, 43, 22,139,189, 42,207,247,248,241,227,185,195,134, 13,115,216,180,105,211,246,240,240,240, 47, - 37, 18,201, 84, 0,177,117,170,214,183,130, 88, 32, 16, 32, 63, 63, 31, 71,142, 28,193,252,249,243,193,100, 50, 33,145, 72,112, -252,248,113,124,246,217,103,149,130,166, 65, 98, 88, 32, 16,244,247,244,244,220,119,245,234, 85,103, 11, 11, 11, 56, 58, 58, 50, -190,254,250,235,214,238,238,238, 38, 77,154, 52, 97,230,230,230, 34, 34, 34,194,125,242,228,201,103, 50, 51, 51,167,107, 52,154, -122,167,212,236,237,237,247,159, 59,119,206,245,249,243,231,216,189,123, 55,138,139,139,193,229,114, 97, 97, 97, 1,177, 88, 12, - 47, 47, 47,106,249,242,229,130, 97,195,134, 9, 22, 44, 88,176, 95,171,213,182,107,192, 53,106,107,103,103,183,167, 79,159, 62, -238,161,161,161, 22, 98,177, 24,149, 47, 6,165,165,165,206,233,233,233, 93,130,130,130, 2, 99, 98, 98,210, 36, 18,201, 28, 0, - 79, 26, 57,112,218,181,108,217, 50, 96,228,200,145,204,220,220, 92,132,133,133, 5,200,229,242,118,141, 16,151,127, 43,196, 60, -122,128,217,243, 22, 41, 28, 93, 92, 56,151, 46,238, 27, 29,126,170,249, 35, 11,147,138,132,212, 82, 21,202, 3, 71,189,236, 56, -112,208, 12,206, 71, 67, 71, 42,126,254,113,187,168, 33, 66,139,205,229, 88, 31, 57,188, 53,243,214,237,152,214,151,163, 31, 12, - 30, 61,124, 56,225,112, 44,220, 1,224,203,197,159,179, 35, 34, 35, 15, 12,232,223, 57,167,103,143, 14,153, 19, 39, 45,113,109, - 68,117,155, 55,111,222,252,122, 92, 92,156, 61,143,199, 67,113,113,177,245,207, 63,255,188,181, 71,143, 30,140,212,212, 84, 36, - 38, 38,226,245,235,215, 40, 45, 45,197,128, 1, 3, 68,177,177,177, 63, 1,168, 85,104,149, 51,250,174,115,108,162,219, 97,109, - 34,108, 90,110,144,217, 17, 93,110,203,203,231, 46,183, 57, 26,166,242,179,119,240,241,250,100, 90, 48,214,172, 61,201,254,237, -200,198,160, 43,209, 71, 1, 70,211,218, 51, 2, 16,116, 91,185,106, 5,100,114, 13, 38, 77,152,133,201, 19,102, 89, 19,104, 29, -136, 65, 45,212,170, 74, 44, 76, 57, 47,162,118,237,221, 58, 10,128,115, 53,177,117,133, 22, 91,181, 99, 13,139,213, 57,224,135, - 31,108, 91,207,156,201,123, 18, 26,170, 44,188,121, 83,229,249,209, 71, 37,126,159,126,170, 1, 0,249,235,215,156,151,193,193, - 2, 91,127,127,147,174, 75,151, 90, 26,180, 90,241,154, 53,107, 58, 5, 85, 36, 47,111, 20,167,235,216,177,134,160, 3, 7, 58, -222, 92,178,164, 55,165,211, 49, 7,119,237,250,120, 67, 88,216,155,191,194,249,159,172,103,206,141, 27,154, 98,119,119,248,141, - 28, 89,228,106,103,167,249, 79,182,253,175,212,147, 70, 21, 42,125,181,102, 87,127, 67, 69, 84, 84, 84, 47, 0,215, 1,132, 6, - 4, 4,132, 0,128,185,185,121,190, 84, 42,181,139,136,136,168, 87,100,177,217,108, 56, 56, 56,192,203,203, 75, 34,145, 72,236, -235,168, 64,150,209,104,116, 38,132, 84, 89, 95,106,131, 70,163, 65,114,114, 50,218,180,105,147,141,138, 68,180,181, 26,117, 4, - 2, 65,106, 98, 98,162, 77, 66, 66, 2, 98, 98, 98,224,238,238, 14, 75, 75, 75,176,217,108,232,116, 58,200,100, 50,120,123,123, -131,199,227,161,125,251,246,133, 74,165,210,189,158, 41, 32,158, 80, 40, 76,190,113,227,134,139,159,159, 31, 30, 62,124, 8, 23, - 23, 23,136,197, 98, 0,192,235,215,175,113,251,246,109,124,244,209, 71,136,139,139,195,152, 49, 99,178,148, 74,165, 23, 0, 77, -109,132, 86, 86, 86,185, 87,175, 94,205,246,245,245, 85, 43,149, 74, 70,126,126, 62,251,230,205,155,122,185, 92, 46, 42, 45, 45, -101, 75,165, 82,182, 76, 38, 99, 41,149, 74, 54,131,193,224,168, 84, 42,246,149, 43, 87,152,229,229,229,117, 6,200,172,188, 78, -145,145,145,240,245,245, 69, 68, 68, 4,190,248,226, 11,220,185,115, 7, 46, 46, 46, 56,113,226, 4,150, 46, 93,138,164,164, 36, -216,216,216,160,101,203,150,245, 93, 35,120,120,120,164, 60,125,250,212,131,195,225, 84,230,117,172,204,151,135,130,130, 2,188, -122,245, 10,111,222,188,129,167,167, 39, 38, 76,152,240,234,205,155, 55,158,245,245, 60, 39, 39,167,130,231,207,159,219,180,105, -211, 6,249,249,249,176,176,176,128,185,185, 57, 44, 44, 44,170,254,118,119,119,199,146, 37, 75, 32, 22,139, 37,106,181,218,190, - 62, 17,228,235,235,123,241,202,149, 43, 54,102,102,102,200,203,203,131, 76, 38, 3,139,197,130, 64, 32,128,141,141, 77,149,144, - 79, 78, 78,198,208,161, 67, 11, 83, 83, 83, 7, 53, 66, 36, 49,236,237,237, 19,227,227,227,189, 8, 33,200,204,204, 68, 82, 82, - 18,230,205,155,151,172, 86,171,125,240, 15,202,217, 87,205,239,138, 51,117,218,108,206,168, 17,221,180, 47,158, 71, 81, 60, 99, - 18,218,181, 54, 43, 5,128,199,207,100,230, 26,134, 55, 90,180, 10, 32,167,206,220,229,254,122,240,103, 54,140,176, 7,133,164, - 23,201,248,166, 54,238,129,125, 28,102,126,254,249,244,214,189,123,244, 98,200,149, 74,187,159,126,218,214, 62, 53,245,133, 29, - 0,184,187,183,144,204,157,187, 56,214, 84, 40,148, 92,191,125,195,248,253,247,251,159, 93,186,150,187,183, 1, 85,118,247,242, -242,186, 23, 25, 25,105, 99,103,103, 7,115,115,115, 40,149, 74,148,151,151, 35, 33, 33, 65,125,236,216, 49,157,153,153,153,105, - 94, 94, 30,164, 82, 41, 40,138, 66,100,100,100, 38, 0,183,247,137, 42,125,180, 0, 96,222,144, 22,236,150,125,189, 44, 57, 60, -189,137, 9,251,165, 3, 40, 3,143, 34, 34,251,243, 23, 31,183, 57,127,249,225,196, 81,163,191,176,237,217,107, 20,130, 86, 7, -234,114,114, 50,253,202,209, 51,177, 38, 31, 45, 31, 79,244, 29, 57,102,212,199,107,214,132, 32, 36, 40, 20, 81,145,167, 75, 69, - 66,134,198,204,130,109,238,223,165,187,122,201,252, 17, 89, 10, 69,142,203,154, 77,199, 38, 12, 29,177,196,185, 71,207,145,184, -125,235, 52,194, 14,132,198, 80, 38,132,158, 70,124, 15, 33,128,165,133,187,251,156,133,201,201,156, 39, 33, 33, 10,125, 78, 78, - 73,135,197,139, 11,107, 42,155,125,249,178,144,235,232,104,102, 57,124,184,213,118, 55, 55,162,147, 72,246,212,228, 99, 84, 19, -103,180, 72,100,113,244,252,249,126,132,205,238,181,236,171,175, 76, 2, 2, 2, 32,147,201,112,242,228, 73,236,217,189, 91,227, -224,224,240,212,241,217,179,184,214, 50,217,234,134,114,118, 88,188,184,208, 96, 48, 80, 31, 47, 93, 58,224,249,235,215,125,243, - 36,146, 38, 0,224, 96,101,149,213,193,221, 61,102,127, 84, 84,210,206,166, 77,141, 13,173,231, 47, 23, 46,216,135,167,167,207, -180,178,178, 50,201,151, 72, 88, 60, 46,183,168, 75,203,150, 39,126, 92,181,234,186, 62, 62,158,195,119,118, 54, 51, 15, 8,104, -116,219, 59, 44, 94, 92, 88, 44,151,179, 22,174, 93,219, 61, 35, 63,191,137, 66,163,241,148,202,229, 98,131, 78,199, 48, 19, 8, -138,154,121,123, 75, 84, 55,111,230, 54, 43, 43, 91,180, 23,144,252,183,174,117, 77, 90,228,111,132,247,227,104,253, 41,215,225, -245,128,128,128, 63,173,174, 33,132, 52,200,154,197,102,179,223,153,166,170, 3, 28,138,162, 16, 27, 27, 11,107,107,107,136,197, - 98,240,120,239, 38, 31, 44, 40, 40,192,157, 59,119,240,226,197, 11,180,109,219,182,114, 26,163,118, 69,196,227,125,190,105,211, - 38, 11,173, 86,139,152,152, 24,116,232,208, 1, 60, 30, 15, 28, 14,231, 29, 17, 40,145, 72,208,170, 85, 43, 44, 91,182,204,124, -253,250,245,159,107, 52,154, 90,223, 72, 89, 44,214,130, 89,179,102,217, 85, 90,176,178,178,178,208,190,125,251,170,237,182,182, -182,120,252,248, 49, 58,116,232, 0,103,103,103, 4, 6, 6,218,133,133,133, 45,208,235,245,223,213,198,201,229,114, 25,190,190, -190, 29, 1, 64, 40, 20,130,193, 96,188, 52, 51, 51,179,181,183,183, 23,154,153,153,253,169,141, 7, 14, 28,144, 50, 24, 12, 93, -189,106,128,193, 64, 94, 94, 30, 90,183,110,141,210,210,138, 12, 46, 74,165, 18,158,158,158,144,201,100, 85,162,213,209,209, 17, - 42, 85,221,174, 95,109,218,180, 9,241,241,241, 25, 40, 20, 10,121,108, 54, 27, 79,158, 60,129,159,159, 31,142, 29, 59, 6, 87, - 87, 87, 8, 4, 2, 36, 39, 39,195,215,215, 23, 55,110,220,128,173,173, 45, 90,181,106,197,179,179,179,187, 85, 92, 92,124, 45, - 35, 35, 35,164,142,122, 50, 68, 34, 17,110,220,184,129,253,251,247,227,245,235,215,200,201,201,129,169,169, 41,218,181,107,135, -150, 45, 91,162, 91,183,110, 72, 78, 78, 6, 85,127,103, 18,123,121,121, 69, 61,124,248,208,134, 16,130,176,176, 48, 40, 20, 10, -104,181, 90, 48, 24, 12,240,249,124, 88, 90, 90,162,111,223,190,176,181,181,133,151,151, 23,142, 31, 63,110, 51,100,200,144,223, - 37, 18, 73, 59, 0,121,245,157, 87, 75, 75,203, 69,193,193,193, 46,118,118,118, 72, 79, 79, 71,105,105, 41,236,237,237,209,187, -119,111,167,232,232,232, 69, 58,157,110,219, 63,229, 65, 86,205,241,157,186,116,113,223,104,175,102, 37,190,109,189, 5, 46, 17, - 81,246, 46,199,162, 36,173, 0,160,117, 11,251,231,163, 3, 4, 89, 79,158, 71,101, 93,186,120, 58,230,197, 75, 68,160, 1, 83, -219,165,101,154, 19,151,163, 31, 12,246,107,219,222,184,105,227,210,161,243,231,205,228,217,217,207, 64,126,230,105, 68, 95,141, -117, 93,250,197, 44,219,239,182,252,114,254,114,244, 3, 70,105,153,102,117,195, 76, 89,174, 59, 15,254,216,205, 70, 94, 24,142, -148, 68, 46, 76, 76, 91,195,221,189, 57,100, 50, 25,248,124, 62,127,194,132, 9,134, 21, 43, 86,148,153,153,153, 9, 40,138,194, -181,107,215, 36, 0, 6,213,199,171,182,179, 36,134,114,157,158,112,153, 70, 66,153,170, 40, 67, 49,247, 89, 66, 26, 6,246,239, -147,223,163,115,235,245, 43,214,108, 89,233,213,220,207,118,250,204, 80,246,218,144,137,187, 65,161,103, 77, 60,137, 41,184, 74, -157, 56,101, 2, 96,232,154,111, 66,144,154,154,108, 57,251, 19,105, 40,139,103,226,232,227,214,221,116,247,254,107,131, 61, 61, -155, 54, 89,178, 32,240,220,214, 31,182, 14,173,110,217, 58,120, 32,248, 12,128,126, 13, 57,183,255, 34,180,153, 28, 21, 5, 69, -102,166,174,248,214, 45,117,191, 31,126, 40,116, 25, 52,104,155,182,188,220,166,242, 86,193,160, 40, 80,149,174, 19, 70, 35,197, - 90,182,140, 65, 88, 44,232, 44, 45, 63, 65, 73, 73,243,250, 56,191,200,205, 29, 61,113,230,204,161,103, 46, 92, 64,211,166, 77, -171,158,103, 22, 22, 22, 88,186,116, 41, 22, 47, 94,204,123,252,248,113,167,240,240,240, 78,223,109,222,108, 15, 96,116, 67,234, -121,233,254,125,203, 79,215,172, 89,213,182, 67, 7,215, 67, 71,142,240, 60, 60, 60, 0, 0,175, 94,189,242,218,184, 97,131, 91, -107, 95,223,252,245,159,127,126,240,249,138, 21,173, 0,220,170,139, 51,239,230, 77,109,120,122,250,204,171,215,174, 89,180,110, -221, 26, 0,144,148,148,100,183,125,251,246, 89,173, 2, 3, 39,173,153, 59,119,117,128, 90, 45, 53, 43, 40,224, 5,236,220,201, - 58,250,241,199,245,114, 86,214, 19, 0,122, 79,159,254,121,207, 62,125, 90,142,158, 57,211,202,213,213,149, 18,137, 68, 40, 47, - 47, 71, 78, 78,142,229,243,231,207, 61,162,228,114,217,169,251,247,195, 96, 48, 12,248, 47, 94,235, 26,181,200,223,204,146,245, -103, 77,241,246,187,119, 84, 84, 20, 1,208, 59, 32, 32,224, 70,229, 3,220, 96, 48, 52, 72,100,177, 88, 44, 80, 20,213, 80,177, - 5, 66, 8, 10, 11, 11, 81, 88, 88, 88, 53,117, 36,145, 72,112,245,234, 85, 36, 39, 39,131,205,102,131,195,225,160,188,188,254, - 28,180, 66,161,176,127,255,254,253, 89,247,239,223,135,187,187, 59, 76, 76, 76,170,234, 85,249,225,112, 56,112,112,112,128, 76, - 38, 67,191,126,253,216, 59,118,236,232, 95,151,208, 50, 55, 55,255,104,236,216,177,220,202,255, 21, 10, 5,152, 76,102,149,104, - 81, 40, 20, 40, 46, 46,134, 84, 42,133, 90,173, 70,215,174, 93,185, 81, 81, 81, 31, 21, 21, 21,125,215,144,246,151,149,149, 41, - 36, 18,137, 69,207,158, 61, 45, 15, 30, 60,152,212,181,107, 87,239,119,122,218,245,235,106,181, 90,205,102, 48, 24, 13,202,163, -119,248,240,225,170,115,255,230,205, 27,236,222,189,187,106, 91,114,114, 50,118,236,216, 1, 66, 8, 8, 33,117, 94, 35, 31, 31, -159, 33, 97, 97, 97, 29, 14, 29, 58, 84,194,100, 50,145,148,148,132, 35, 71,142,128, 16, 2, 91, 91, 91,148,149,149, 33, 63, 63, - 31,215,174, 93,131, 94,175,135, 72, 36,130,147,147, 19,127,193,130, 5, 61, 66, 67, 67,217,117, 9, 45,131,193, 96, 96, 50,153, -112,115,115, 67, 80, 80, 16,212,106, 53, 56,156, 10,125, 41,147,201, 32,149, 74, 17, 23, 23,135,244,244,116, 16, 66,234,124,200, -240,249,252,192, 67,135, 14,217,113,185, 92,168, 84, 42,200,229,114,100,101,101, 33, 35, 35, 67, 45,145, 72,244,166,166,166, 12, - 55, 55, 55, 6,143,199,227,141, 28, 57,146,170, 20,156, 1, 1, 1,214, 97, 97, 97,227,180, 90,109,125, 34,201, 86, 44, 22,175, -156, 53,107, 22,191,122,159,205,203,203,195,232,209,163, 5,119,239,222, 93, 33,147,201,142, 0, 40,248,135, 61,208, 72,248,169, -230,143, 98,162,147,124, 35,162,236, 93, 50,178, 13,221,151,126,185,133, 5, 0, 63,239,249,182,123, 68,212,155, 59, 62, 77,243, -179,194, 79, 53,127,100,105,249,162, 62, 33,192,232,219,203, 97,152, 80,192, 31, 59,122,248,112,242,211, 79,219,218,207,159, 55, -147,231,214,124,105,133,133,147,109,135,126,250,111,168, 50,213, 43,254, 79, 63,109,107, 63,122,248,152,184,215,175,211,247,244, -237,197, 59,126,245, 70,238,217,186, 44,134,118,214,124, 39, 1, 79, 9, 39,247,150,240,110, 33,196,227, 39, 73, 56,121,226, 30, - 90,180,234, 2,141, 70, 3,189, 94, 47, 28, 54,108, 88,217,177, 99,199,212, 47, 95,190,148,171, 84,170, 94, 0, 94,214,215,248, -236,236, 4,163,183,184, 75, 57,199,132,167,151,151,114,202,150,175, 14,255,184,125,231,129, 29, 44, 29,156,216,182, 66,227,217, - 33, 3, 58, 29,217,191, 55,104,241,234,224, 35,232,216,105, 96,215, 23, 73,183, 90, 2,120, 90,163,120, 77, 69, 20,227,228, 41, -125,106, 74,202,208,140,244,244,236,230,246, 98,237, 43, 41,209, 45, 90,254,203,128,158,189, 2,219,120,180,240,231,190, 72,184, - 65, 5, 45, 27,247,219,154, 77, 91, 39, 84,138,173, 43,151,127,235,245,201, 39,247,184, 7, 15,214,110, 29,255,183,129,195,227, - 57,139,220,220, 88,175, 15, 30, 84,185, 15, 27, 86, 2, 0,218,242,114,155,215,233,233,230, 2,129, 0,132, 16,232,116,186,119, -124,136, 43,253,134, 91,123,123,219, 55,132,243,245,215, 95,183, 89,182,108, 25,242,242,242,160,215,235,193,102,179,223,191,103, - 67,169, 84,226,147, 79, 62,193,206,205,155,187, 52,132,211, 96, 48, 80,159,174, 89,179,234,171, 85,171, 60,230,204,153,195,168, -126,239,181,178,178, 66,248,201,147,220, 93,187,118, 57,175,220,185,243,147,137, 60, 94, 42, 52,154, 58, 57, 11, 61, 61, 97,149, -159,111, 82, 41,178, 0,192,219,219, 27,187,119,239,230,205,152, 49,131, 59,108,216,176, 45,143,219,182,221,190,173, 71,143, 20, -235,230,205,205,184, 60,158,115,125,156,149,231, 19, 0,228,106,117,235,109,219,183, 91, 62,120,240, 0,249,249,249,200,203,171, -120, 31,165, 40, 10, 29, 59,118,164, 38, 79,158,108,222,204,197,165, 19, 12,134,255,230,229,254,147, 22,249, 27, 97,118, 13,191, -253,225,163,245,182, 65,212,219, 6, 82,213, 30,142,239, 8,150,250,132,214,135, 64, 42,149, 66, 42,149, 98,239,222,189,224,112, - 56, 85, 15, 95, 0,208,106,181, 13, 17, 45,190,142,142,142, 40, 45, 45, 69,243,230,205,223,177,100,113, 56, 28,176, 88, 44,112, - 56, 28,240,120, 60,104, 52, 26,184,186,186,162,172,172,204,183, 46, 78,149, 74,213,206,202,202,170,234, 1,171,121,219, 89, 53, - 26, 77, 85,125,181, 90, 45, 74, 74, 74,160, 80, 40, 32,151,203,161, 84, 42,253, 26,210, 94,163,209,136,103,207,158,189,242,246, -246,110,199,100, 50, 33, 18,137,132, 74,165,178,202,183,168,184,184, 24,191,254,250,171,114,202,148, 41, 54,145,145,145,245, 10, - 45,138,162,240,217,103,159,129,199,227,161,172,172, 12, 63,253,244, 19, 22, 46, 92, 8, 14,135, 3,185, 92,142,221,187,119, 99, -201,146, 37, 96,177, 88,208,106,181,216,190,125,123,173, 92, 9, 9, 9,175,239,223,191,239,215,190,125,123,203, 83,167, 78, 21, - 12, 24, 48,192,118,208,160, 65, 48, 49, 49,129, 74,165,130, 78,167, 67,151, 46, 93,224,227,227, 3,137, 68,130,243,231,207, 23, -122,121,121,217, 60,120,240,192,152,151,151,151,241,255,216,187,238,240, 40,170,246,123,102,123, 73,175,164,144, 80, 34,164,211, - 12,160,244, 18, 90, 18, 12,162, 20, 69, 81, 81,154, 5, 20, 68, 16, 5, 68, 52,128,162,136,130, 82, 44, 96, 16,144,110,168, 1, - 19,144, 34, 66, 8, 37, 29, 2,169,187,201,110, 54,201,110,178,125,218,239, 15,146,124, 33, 38,217, 77,192,239,167,126,115,158, -103,159,157,157,189,115,230,222,185,119,102,206,125,239,123,223,107, 67, 92,179,141, 44,134,160,105, 26,229,229,229,168,174,174, -134, 90,173,134, 66,161, 64, 73, 73, 9, 4, 2, 1,108,232, 44,120,120,120, 60, 21, 25, 25,201, 7, 0,153, 76,134,222,189,123, - 99,233,210,165,148,209,104,156, 12,224, 88, 93,178,113, 91, 22,186,136,224, 0, 0, 32, 0, 73, 68, 65, 84,183,110, 61,112,238, -220, 57,129,159,159, 31,178,179,179,225,229,229, 37,144, 74,165, 54,133,150,143,143,207,247,191,252,242,139,123,189,184,174,191, -206, 6,195,189,234,152, 56,113,162,251,142, 29, 59,190,167, 40, 42,230,223,246, 82,115,149, 65,212, 59,210, 89,187, 59, 73, 21, -177,240,237,117,130,208,200,123,157,215,153,179, 32,248,244,147, 5, 17,211,226,157,143,184,202,116, 34, 91, 60,227,162, 3, 54, - 62,241,196, 40,222, 51, 83,227,242, 68, 34,215,160,205, 91, 62,240,246,238, 48,163,145, 12,115,134,135,167, 51,130, 58,137,137, -189, 71,178,188, 23, 47,249,208,156,184,227,179,252,159,118, 37,141, 21, 11,147, 71, 31, 59, 85, 60,167, 37,238,220,219,213,135, - 13,102,105,152, 78,115,157,112,239, 48, 16,189,123,133,192,219,171, 10, 91,191,223,141, 46, 93,251,194,108, 54,195,217,217, 89, - 78,211,180,149,207,231, 39,218, 35,178, 0,224,244,233,106, 38, 34,162,218,194,175, 97,168, 87,223,248,244,201, 81,227,158, 8, - 31, 49, 34,154, 57,153,124,210, 58,176,143, 85, 57,110, 76,239,242,227,201, 27,243,148,138, 59,221, 35,122, 12, 66,102, 70,202, - 88,150,197, 77,130,104,222,250,148,113, 11,199, 77, 76,102,202,238,221, 51, 25, 35,115, 85,182,234,163, 27,227, 98, 99,167, 71, - 14, 25, 60,132, 73, 62,245,171, 69,140,138, 44,231, 65, 3, 74, 95,125,121,220,129,111, 19,191, 24,125,252,216,247,221,180,186, -194, 36, 78,100, 53,233,164, 81, 84, 7,129, 68,194, 83,167,164, 80, 61,102,204, 48,215,223,143,114,185, 28,135, 14, 29,130, 88, - 44,110,248,136, 68,162,134,237, 14, 29, 58,128,168,155, 70,106, 15, 39, 0, 40,149, 74,148,149,149,193,197,197, 5, 94, 94, 94, - 40, 43, 43,195,133, 11, 23,144,155,155, 11,161, 80,136,177, 99,199,130,215,130,111,115, 83,206, 73, 11, 23,142, 10,235,209, 35, -176,169,200, 2, 0,171,213,138,202,202, 74,196,199,199,243,142, 29, 59,230,115,188,168,232, 9, 0,137,173,113,246,137,141,213, -148,239,221,219,236,185, 31,125,244, 81,226,252,249,243,146,177, 99,198,188,185,224,163,143, 54,126,185, 99, 71, 49, 77, 81, 62, -109, 41, 59,143,199,227, 17, 4,129,128,128, 0, 84, 86, 86,162,182,246,222, 8,182,163,163, 35,220,220,220, 64,146, 36, 24,150, - 21,254,149,117,221,146, 22,249,135, 96, 75, 35,193,181,229, 79, 22,173,186, 66, 1,192,176,198, 47, 22,134, 97,236, 18, 89, 66, -161,208,166,207,149, 61, 86,174,166,176, 71,104,213,231, 85, 42,149, 54,220,104,141, 5, 86,125, 62,121, 60, 30,248,124,190,205, -151,120,157, 24,226,215,212,212, 96,223,190,125, 24, 58,116,104,195,176,148, 86,171, 69,117,117, 53,180, 90, 45, 76, 38, 19,238, -222,189,139,211,167, 79,163, 91,183,110,128,157,193, 95,243,243,243,175,116,233,210, 37,170,254, 37, 62,124,248,240,142, 63,252, -240,131, 34, 38, 38,198,143,101, 89,188,247,222,123, 21,143, 61,246,152,103,227,151,188, 45,240,249,124, 92,184,112, 1,221,186, -117, 3,203,178, 16,137, 68,200,201,201,129,183,183, 55, 24,134,129, 64, 32,128, 90,173,134,147, 83,235, 49, 18,111,222,188,249, -226, 75, 47,189,164,112,113,113,233,169,209,104,148, 18,137,100,240,217,179,103, 3,172, 86, 43,156,157,157,225,236,236,140,163, - 71,143,194,213,213, 21,243,231,207, 47, 50, 26,141, 23, 28, 28, 28, 58, 24,141,198,235,101,101,101,239,181,165,190, 41,138,130, - 94,175, 71, 85, 85, 21, 42, 43, 43,161,211,233, 96, 50,153,108,230,177, 57, 12, 30, 60, 24, 73, 73, 73,252,132,132,132,111,243, -243,243, 1, 0, 65, 65, 65,152, 63,127, 62,223,223,223, 31,119,239,222,197,149, 43, 87, 96,181, 90,193,178,108,171, 55,175, 64, - 32, 24,254,252,243,207, 15, 10, 12, 12, 36,172, 86, 43, 24,134,129,217,108, 70,253,118, 81, 81, 17,194,194,194,120,157, 58,117, -122, 60, 63, 63,127, 56,236,155, 88,193, 1, 64,121,209, 65,248, 11,189, 1,158, 51, 88,227, 65,104, 42,218, 23,197, 69,165, 82, -125,180,232,253,243, 51,190, 92,107,237, 80,162, 4, 66, 34, 39,160,123,248, 72,188,248, 28,133,132, 79,246, 33,176, 83, 8, 10, - 11, 11, 49,124,248,112,145, 66,161,120,169,182,182,118,161,189,220,201,201,191,211, 39,143, 30,123,122,210,148,233, 81,209,209, - 49,212,137, 19, 71,113,243,250,137,140,151,166, 60,165, 98,153, 90,194,221, 85,118, 53, 39,251,114,247,158,189,135,193, 66,209, -131,129, 21,107,129, 21,108,203,247, 59, 44, 71,142,248,242,142, 28,252,254,185,103,166,189,208,107,228,200,209,228,137,228, 95, -112,229, 98,242,181,117,107, 95, 57,147,240,197,158,225,163,198, 62, 21,225,213,225,194,209,200, 96,243,203, 1, 30, 46,183,183, -254, 80,201, 53,150,230,238, 77,169,148, 65,221,115,145, 71, 16, 96, 89,246, 62,145,213, 84,104,241,120, 60,155, 6,128,198,156, -141,223, 69,245, 29,234,205,155, 55, 67, 34,145, 64, 44, 22, 67, 40, 20,218,116,191,104,204,153,113,247,238,136,237,137,137,146, -230, 68,150, 70,163,129, 70,163, 65,109,109, 45,166, 78,157, 42,250,224,242,229, 71, 81,231,250,209, 18,103,160,175,175,217, 65, - 38, 43,207,204,204,244, 11, 15, 15,191, 47,191, 58,157, 14, 50,153, 12,137, 59,119,138,226, 98, 99,231,142, 60,122,116, 29,108, -196,191,106,174,236, 4, 65,192,219,219, 27,110,110,110, 32, 8, 2, 20, 69,161,172,172, 12, 25, 25, 25,184,124,249, 50,248, 4, - 65,253,149,117,220,156, 22,249, 7, 90,181,182, 52, 59,116,216,210,152,104, 91,132, 22,159,207,111,183, 85,171, 37,216, 51,116, - 40,151,203,111, 40, 20,138,129,254,254,254,160, 40,170, 65,104, 53, 29, 58,172,183,126,164,167,167, 67, 46,151,223, 48,153, 76, -173,114,178, 44,251,120,191,126,253,176,127,255,126,164,164,164,224,206,157, 59, 48, 24, 12, 48,155,205, 48, 26,141,200,200,200, - 0,195, 48,136,140,140,132,131,131, 3,228,114,249, 13,179,185,245,142,168, 94,175, 87, 10,133,194, 16,153, 76,214,176,207,215, -215, 23, 26,141,134, 33, 73, 18,219,183,111,215,249,248,248, 56,200,100, 50,187,133, 43, 65, 16, 80,169, 84,232,216,177, 99,131, -143, 86, 77, 77, 13,188,189,189,235,133, 5,204,102, 51,156,156,156,108, 14, 29, 2, 48,221,186,117,107, 65,163,223,125, 39, 77, -154,244,211,238,221,187,187,158, 58,117, 10,151, 46, 93,130,151,151, 23, 62,254,248,227, 59, 5, 5, 5,207, 0,184,172, 82, 61, - 92,191, 72,123,218,144, 70,163,217,119,227,198,141,199,251,245,235,215,240,148, 24, 62,124, 56, 49,124,248,112,207,198,166,126, -181, 90,141, 63,254,248, 3,167, 78,157, 2, 65, 16,200,203,203,163,141, 70,227, 79,173,141, 82,248,251,251,255,176,116,233, 82, - 71,138,162, 26,218,182, 76, 38,131, 84, 42,133, 72, 36, 2,159,207, 71, 65, 65, 1,226,227,227, 93,190,250,234,171,239,205,102, -243, 35, 0,172,248,151,160,218, 8,107,250, 77,157, 75,100, 88,135,140, 45,155, 19, 6,206,156,133,250,161, 67, 42, 50,204, 59, - 35,253,102,185, 75,148,183,237,242, 30, 59, 85,252,170,133, 60, 54,254,216,241,212,201,111,191, 57, 95, 24, 20, 20,166, 58,245, -107, 90,224, 72,234, 67,194,195,211, 25,154, 10, 29, 10,138,202,145, 95,104, 97,131,130,194, 84, 87,254,184, 33,249,228,243,245, -221,245, 6, 83,253,208, 97,171,237,244,183, 11,119, 38,172,219, 32, 57, 51,253,165,190, 98,153,204, 15,149, 21, 55, 16, 24,232, -133,248,184,158,248,110,199, 5,184,184,184,163, 67,135, 14,224,241,120, 14,246,150,189,162,162,130,216,183,235,183, 25,207,191, -240,202, 99, 99, 70,199, 82,199, 79, 28, 17,164,156, 60,124,225,251, 45,239, 30, 96,249,122, 57,193,214,200, 58,119,241,185,126, -251, 86,250, 51, 35,162,167, 66, 38,114,234, 6,132, 54,219, 96, 27, 38, 24,176, 40,218,191,123,133,244,249, 23,102, 14, 24, 51, -230, 9,234,196,137,131, 56,113,116,199,239,203,151,119, 62,122,167,116,167,232,226,229, 18,233,132,167,231, 84, 37, 29,203,178, - 60, 53,190, 75,174,159, 67,111, 35,112,135, 83, 85,141, 59,146, 2, 65, 57,101, 54, 7,116, 28, 51,134,111, 40, 44, 20, 58,118, -232, 64, 1, 0, 73,146, 54,133, 22, 90, 24,130,110,202,105,111, 94, 12, 6, 3,152, 22, 98, 39, 54,229, 44, 83,169, 58,215,117, -194, 27, 64,146,100,131,200,210,104, 52,168,174,174,134,131,131, 3,212,102,115, 7,123, 56, 71,247,239,191,253,131, 21, 43, 22, -238,221,183, 79,212, 88,100,213,127,132, 66, 33,214,172, 93, 43,122,227,237,183,231,204, 21, 8,230,129,162,236,190,158,245,157, -118, 62,159, 15,129, 64,128,194,194, 66, 20, 21, 21,161,176,176, 16,133,133,133,144,201,100, 96,255,226, 73, 64,255, 96,255,172, -122,145,213,248,187,193,202,213,106,120,135,182, 56,195,219, 43, 12,232, 54,140,239,218, 35,180,244,122,253,169,211,167, 79,247, -159, 48, 97,130,224,247,223,127,135,143,143, 79,131,208,170,255,174, 31,142,146,203,229, 56,112,224,128, 85,175,215,159,178,113, - 51,157, 62,122,244,104,212,178,101,203,132, 47,190,248, 34, 50, 51, 51, 49,107,214, 44, 84, 87, 87, 67,167,211, 65,163,209,192, - 96, 48,160,127,255,254,144, 74,165,184,126,253, 58,105, 48, 24, 78,219,176,216,177, 42,149,170,214,203,203,203,183,233,127, 79, - 63,253,116,135, 77,155, 54, 25,178,179,179,201,129, 3, 7, 58,219, 43, 56,234,177,107,215,174, 6, 75, 93,110,110, 46, 54,109, -218,212,224,147,149,150,150,134, 79, 63,253,180, 33,246, 89, 27,113,185,162,162,130, 34, 73, 18,221,186,117,131,191,191, 63, 76, - 38, 19,214,175, 95, 79, 1,184,252,255,213,154, 77, 38,211,222,233,211,167,191,115,245,234, 85, 95,129, 64,112,207,164, 93, 87, - 62,171,213,138, 91,183,110, 33, 35, 35, 3,217,217,217,168,172,172,108,232, 8,164,167,167, 87,145, 36,185,167, 37, 94, 47, 47, -175,247,190,251,238, 59, 31,185, 92,126, 95,123,174,183,134,214, 91, 73,213,106, 53, 92, 93, 93, 49,114,228, 72,239,211,167, 79, -191,103, 54,155,151,253, 75,222,105,196,211, 79,230,246,125,227,213, 9,152, 24, 39, 47,222,159, 84,122,254,211, 79, 22,212, 57, -195,123,103, 76,140,243, 47,190,150,227,138,167,159, 60,216, 23, 64, 9, 90,119,216,102,126, 61,163, 60,212,175,159, 91,202,254, -195,135,191, 95,178,232,205,180,133, 11, 94,241, 50, 24,111, 75,131, 58,137, 9, 0,200, 47,180,176,215, 51, 25,211,167,235,222, - 76, 75, 88,251, 21,175, 92, 83, 61,235,143, 63, 90, 14,111,208, 88,188,240,120,144, 6,133, 14, 85,116, 15, 30,212,229,247, 11, -137,112,148, 27, 17, 18,218, 23, 99, 70, 63,142,148,212,116,148,169, 77, 80, 42,149, 48,155,205,173,134, 75,200,190,126,224, 57, -150, 96, 3, 9,150, 40, 34,120,172,244,185,233, 47, 15,142,141,125,130, 77, 74, 58, 76, 29, 60,144,120,110,207,143, 27,246,242, - 68, 66,129,209,226, 98, 33, 8,147, 22,188,155,153,181,250,123, 29, 26,161, 68,212,178,249,181, 46,176,107,120, 68,168,207,115, -211,103,185,196,140,139,103,143, 30, 61,200,236,217,189, 61,101,207,182, 30,137, 12, 79, 39, 82, 22, 27, 36, 90, 29,169,101, 9, -177,107,173,142, 49,148,231, 63, 98,242,139,125,218, 10,236,229,212, 85,227,247,128,217, 92, 82, 91, 92,236,235, 62,116,168,228, -214,138, 21,242, 14,253,251,155,136, 58, 31,226,214,132, 22,159,207, 7,120, 60,198, 30, 78,123,243, 98, 52, 26,193, 0,100,123, - 56, 41,138,186, 79,100,213, 11,173,250,251,197, 30,206, 45,203,151,255, 30, 56,102, 76,101,106,106,106,135, 97,195,134, 17, 53, - 53, 53,168,169,169,185, 79,108,249,249,249, 17,225,145,145,242, 93, 41, 41, 65,246, 94, 79,123,202,206,227,241,254,114,161,245, - 15, 71,139, 11, 73,183,186, 4, 79,189, 69,203, 30,161,101,167, 69,139, 36, 73, 18,222,222,222,168,168,168,104,241,197,207,227, -241, 32,147,201,234,199,136, 91,157,121,103, 54,155,215, 47, 92,184,240,181,113,227,198,121,134,132,132, 64,173, 86,163, 67,135, - 14,144, 74,165, 13,190, 99,245,124,105,105,105,248,238,187,239,116,102,179,121,189, 13,206,207,215,174, 93,251,234,196,137, 19, -221,125,124,124,224,230,230,134,235,215,175,195,205,205, 13, 58,157, 14, 57, 57, 57,112,114,114,106,240,219, 57,124,248,112,141, -217,108,254,220,134,120, 99,207,158, 61,107,117,114,114,186,174, 86,171,249,149,149,149,130,170,170, 42,129, 78,167, 19,106,181, - 90,225,241,227,199, 61, 93, 92, 92, 12,191,254,250,171, 58, 48, 48,144,127,231,206, 29, 62, 73,146, 54,213, 43, 65, 16,152, 55, -111, 30, 68, 34, 17,204,102, 51,214,175, 95,143,133, 11, 23, 54,248,100,173, 93,187, 22, 75,151, 46,109, 16,206, 91,183,110,109, - 83,203, 97, 89, 22, 86,171, 21, 36, 73,130, 36, 73,187,196,239,131,192, 78,193, 94,150,151,151, 23,215,175, 95,191,147, 63,255, -252,179, 71, 93, 76, 50,148,151,151,163,188,188, 28,106,181, 26,181,181,181,160, 40, 10,254,254,254, 40, 47, 47,199,193,131, 7, -181, 53, 53, 53, 99,208,202,140, 67, 62,159, 63,125,240,224,193,130,166,121,168,239,229,213,139,119,137, 68, 2,133, 66,129,225, -195,135,139, 83, 83, 83,167, 3,248, 71, 11,173,198,225, 29, 70,143,153, 33, 10,139, 24, 96,185,150,145, 84, 28,218,165,188,120, - 90,188,243, 17, 0, 72,191, 89,238,114, 45,199, 21, 97, 17,113,236,232, 49,110, 81,229,101, 91,122, 0,176,182,182, 92, 15, 0, -184,200, 37,147, 70, 69,247, 87, 56, 57, 56,240, 62, 93,183,245,216,215, 95,127,254,232,222, 35,255, 9,239,240,233,186,123,225, - 29, 70, 69,247,103,178,179,178, 39, 1,216,102,175,120,137,139, 27,127,245,187, 31,190, 67,118,198,175,126,239,204,235, 41,174, - 44, 39, 33,115, 12, 64, 84,239, 14,216,242,195, 13, 92,187,118,173,204, 98,177, 12,111,181,125, 19,108, 96, 70,230,205,224, 30, - 17,225, 62,207, 77,159,233, 28, 23, 23,143,164,164, 67,248,113,251,182,179, 79, 77,157,248,109,105,149,142,239, 45,148,139,228, - 44, 35,230,139, 92, 4, 34,137, 76,101,177,220,155, 3, 33, 20, 74,157,129, 73,173,190,120,102,207,156,230, 50, 34, 58, 30, 71, -142, 30,194,143,219,183,156,121, 63,226,233,109, 93,250,132, 17,253, 31,253,100, 78,151,174, 93, 58,233,107,203,117, 60, 66,108, - 53,153, 24,167, 79,182, 23,124,150,191,116,122, 62,128,117,224,102, 29, 54,198,245, 31, 99, 98,250,189,113,251,182,200,107,208, - 32,153, 34, 37, 69, 94,183, 18, 73,171, 66, 75, 32, 16,128,109,121,168,235, 62, 78, 98,199, 14, 30,128, 86, 39, 97,137, 68, 34, - 24, 12, 6,144, 45, 91,176,239,227,244, 61,113,162,248,246,237,219,221,221,221,221,239, 19, 89,149,149,149, 13,219, 38,147, 9, - 6,131, 1, 50,153, 44,195,216,252,136,200,125,156,229,103,207,154, 86,207,155,183,236,153,169, 83, 55,156, 58,125, 90,234,225, -225, 1,173, 86,123,159,208,178, 88, 44, 24, 49,114,164,104,237,213,171,207, 65,167, 91,110,207,245,236, 48,124,184, 77,127, 96, - 62,159, 15,230, 47, 30, 58,252, 23, 96,102,115,194,139,103,107, 8,199,222, 89,135, 45,188, 32,155,174,238,189, 52, 42, 42,202, -148,155,155,139,192,192,192, 6,177,210,248,156,206,206,206,112,117,117, 69, 90, 90, 26, 62,250,232, 35, 35,128,165, 54, 56,107, - 12, 6,195,148, 81,163, 70, 25, 5, 2, 1, 66, 67, 67, 27,226,103, 49, 12, 3,177, 88, 12, 7, 7, 7, 92,189,122, 21,227,199, -143, 55, 24, 12,134, 41,248,115, 12,173,166,156, 90,131,193,240,236,232,209,163, 13,153,153,153, 24, 60,120, 48,174, 93,187,134, -218,218, 90,212,214,214,226,238,221,187, 8, 15, 15,135,193, 96,192,166, 77,155,140, 6,131,225, 89, 0,218,214, 56,107,106,106, -198, 47, 92,184,144,255,211, 79, 63,117,241,247,247,143,232,219,183,111,200,200,145, 35, 31,121,242,201, 39, 59,197,196,196,248, -118,239,222,221, 52,102,204, 24,175,113,227,198,121, 25, 12, 6,225,249,243,231,149, 36, 73,142,179,145,207, 6,113,146,155,155, -219, 48, 84, 40, 16, 8, 80, 81, 81,209, 16,185,191,254,161,212,130, 16,142,182, 37,182,235, 5, 86,189,224,178,195,207,173, 57, - 78,155, 7,137,197,226,122,139, 39,107, 7,103,122, 86, 86,214,168,161, 67,135,166,207,152, 49,163,166,172,172, 12, 78, 78, 78, - 8, 10, 10, 66,112,112, 48, 60, 61, 61, 97,181, 90,113,224,192, 1,253,193,131, 7,111,104,181,218,225,248,115, 12,173,232, 38, -215,241,110,115, 15,217,122,107, 86,189,208,146, 74,165,240,247,247,175,191,182,119,219,114, 61,219,137,191,150,179, 78,192,140, - 28, 49,166,107, 76,236, 4,151, 3,135, 46,136, 55,108, 60,120, 35, 42, 26, 91, 61, 58,235, 14,123,116,214, 29,142,138,198,214, - 13, 27, 15,222, 56,112,232,130, 56, 38,118,130,203,200, 17, 99,186,102,102,100,135, 52, 94,247,176,185,124, 74,165,210, 1,131, - 7, 69, 85,165,158, 59,195, 36,172,253,138, 55, 98,248, 83, 87,183,125,123,224,192,182,111, 15, 28, 24, 49,252,169,171, 9,107, -191,226,165,158, 59,195, 12, 30, 20, 85, 37,149, 74, 7,216, 83,246,217, 51,167,185,196,198,196, 35, 41,233, 0,181,119,215,166, -181,187,247,229, 13,125,249,181,179,229,185,185,215, 88, 85,201, 9, 8,121,133,200,202,202,210,214,137,172, 92,123, 56,103,189, - 50,173,177,200,250,205,195,103,240,214,172, 44,208,201,201,191,144,167, 79, 95, 53,254,150,174,210, 94,201,172,168, 84,168, 43, -239,232,116, 26, 11,195,208,160,105,154,255,193, 7, 13, 14,187,205,214,209,192,129,195,240,235,169,157,216,254,195,102, 45,195, -192, 52,105,239, 94,122,210,164, 21,108,167,206,157, 59, 37,238,218, 73,196, 61, 49,193,133, 5,152,241, 19,227, 93,127,218,253, - 19,209,181, 91,215,206, 65, 65, 13, 33,109,254,121,109,233, 47,224, 92, 1, 84,233, 10, 11,207,164,125,245,149,185,195,148, 41, -238,226, 14, 29,156, 65,211, 68,253,243,189,165,143, 64, 32,104,106,129,105,145,211,223,211,179,244,240,225,195, 8, 14, 14,134, -191,191, 63, 26,251,200,214, 7,228,246,240,240,192,190,125,251,192,222, 31,156,186, 69,206, 62, 93,186,164,173, 89,189,218,194, - 48, 12,170,170,170,254,100,205,170,170,170, 2,195, 48, 56,122,228,136, 69,119,111, 37, 16,187,202, 62,156,207,175,125,102,200, -144,132,216,216, 88,235,237,219,183,193, 48, 12, 26, 91,182, 84, 42, 21, 28, 29, 29, 97, 50,155, 3, 0,200,237,225, 84, 29, 63, -238, 0, 27,207,245,102, 44, 90,127, 69,189,255,211, 69, 86,227, 5,165,103,218,101,209,162, 40, 10, 1, 1, 1,247, 45,233,194, -227,241,238,251,180,113,198,225,142,204,204,204, 19, 99,198,140, 89,246,216, 99,143,205, 94,182,108, 25, 63, 36, 36, 4, 90,173, - 22,110,110,110,240,246,246, 70, 78, 78, 14, 14, 31, 62, 76, 87, 84, 84,124, 3, 96, 37,236,155, 66,159,146,151,151, 23,215,179, -103,207,221,139, 23, 47,118, 25, 61,122,180, 48, 32, 32, 0, 44,203,226,234,213,171,216,191,127,191,117,219,182,109,186, 58,145, -101,175,243,242, 73,133, 66,241,212,184,113,227, 18,167, 79,159,238, 68,211,180,240,238,221,187, 48,155,205, 32, 73, 18, 69, 69, - 69,214,164,164,164, 90,131,193, 48, 13,192, 73, 59,248,210,170,171,171,195,147,147,147,167,159, 63,127,254,163, 25, 51,102,120, -140, 28, 57, 82, 68, 81, 20,206,157, 59,167,238,211,167,143,183, 74,165,178,238,219,183, 79, 99, 50,153,150,210, 52,109,215, 18, - 60, 4, 65, 64,167,211,193,211,211, 19,102,179, 25, 12,195,192, 98,177,192,209,209,177, 97,217, 36,150,101,209, 22,231,250, 38, -109,128,111,181, 90, 49,117,234, 84, 48, 12,131,245,235,215,131,162,168, 54,147,185,184,184, 92, 73, 79, 79,143,235,221,187,119, -131,120,169,111, 67, 18,137, 4,158,158,158,240,240,240, 64, 82, 82, 18,132, 66,225, 21, 91,254,110,117,184, 86, 81, 81,209, 39, - 57, 57,121,192,141, 27, 55,158, 7,208,219,106,181,250,211, 52, 77,240,120, 60, 37,203,178,215,117, 58,221,183,176,115, 9, 30, -149, 74,245,209, 11, 47,188,208,103,231,206,157,142, 2,193,127,110, 13,129, 64, 0,137, 68,130,250,224,152, 44,203,194, 98,177, -224,189,247,222,211,233,245,250,143,254, 45, 79,137,168,190,253,177,101,211, 23,142,167,127, 61,161,206,202,195,254,102, 66, 56, -148,148,151,109,233,161, 40, 46,118,140,234,219,223, 46, 78,210, 98,213, 60, 59,237,173,192,186, 37,120,222,187,123,183, 96,115, -226,142,207,242, 1,224,147,207,215,119, 47,215, 84,207,202,206,202,158,180,121,243,174, 1,164,197,170,177,135,243, 63,226, 37, - 81, 11, 22, 38, 0,151,174,222, 40,239, 50,126,202,241,165,221,186, 58, 63,161,210, 24, 75,107,107, 13,175, 3,200,183,183,236, -131, 6, 14,197,175, 39,127,194,143,219, 19,117, 44,195, 55,121,122,122,178, 0,144,149,229,201,102,101, 85,179,255,241, 43,118, -213, 11,217,107, 43,223,122,125,228, 91, 90, 93,229,231,235, 55,181, 62,148,210,179,215, 99,232,217,235, 49,188,246,250,187, 46, -225, 17,161,129, 0,176,119, 47,232,136,110,153,191, 44,123,127,197, 19, 43, 87,174,128,174,198,140,250,229,122,114,110,102, 30, -201,207,135,133,123,103,221,143,101, 20,117, 9,111,189,213,221, 80, 89,233, 53,232,157,119, 60, 5,111,191,205,107,205, 25,190, -241,253,107, 15,231,229,235,215,143,204,122,249,229,210,229,203,150,141,249,102,243,102, 89,143, 30, 61, 80, 86, 86,134,208,208, - 80,248,251,251, 35, 57, 57, 25,251,246,236,209, 87,215,212, 44, 5,240,181, 61,156, 59,142, 30,205, 9,137,136,168,216,188,121, -179, 95,108,108, 44,161,215,235,161,213,106,161,213,106, 97, 54,155, 81, 23, 16,154,205,205,203,203, 34, 73,242, 27,123,203, 78, -171,213,210,149,253,251,151,136, 24,102,205, 83, 19, 39, 46, 92,249,225,135,146,174, 93,187, 18,102,179,185,193,170,101,181, 90, -225,232,232,104,181, 88, 44, 30, 0, 12,246,112, 74,182,109,163,212,106, 53,188,188,188, 26,194, 53, 53,142, 75, 88, 83, 83, 3, -150,101,185, 96,186,237, 64,139, 10,201,205,205,237,138, 64, 32,232,216,216,186,213,220,218,121,141,247,145, 36, 89, 82, 81, 81, - 17,213, 68,241,182,228, 15, 21, 4,224,227, 17, 35, 70, 60,181, 96,193, 2, 34, 53, 53, 21, 7, 15, 30,100,243,243,243,247,214, - 89,177,242, 91,233,233,180,196,233, 36,145, 72,230, 59, 56, 56, 68,215,135,112,144,203,229, 55,244,122,253,169,186,225,194,154, -118,112, 58, 75, 36,146,121, 14, 14, 14,163,234,150, 95,129,147,147, 83,186, 94,175, 79, 54,155,205, 95,160,229,133,170, 91,227, -148,185,184,184,124,228,233,233,249,236,219,111,191,237,113,246,236, 89,229,175,191,254, 42,170,174,174,222,105,177, 88, 90, 91, - 84,250, 79,156,238,238,238, 87,248,124,126,199,191,168,142,208,179,103,207,164,241,227,199,199, 78,155, 54, 13, 36, 73,226,235, -175,191, 70,114,114,242,145, 91,183,110,197,217,232,141, 54,229,244,236,216,177, 99,234,236,217,179, 59, 77,157, 58, 85,238,230, -230, 6,129, 64, 0,189, 94,143, 91,183,110,225,234,213,171,236,161, 67,135,106,211,210,210, 74, 12, 6,195, 48, 0, 21,109,184, -158, 15,210,107,190,143, 83, 32, 16, 12, 13, 8, 8,216,181,124,249,114,167, 81,163, 70,201, 60, 60, 60,192,231,243, 65,146, 36, -148, 74, 37,110,222,188,137, 19, 39, 78,232,247,238,221,171,215,104, 52, 83, 1,156,249,255,200,231,195,228, 12,235,142,247,155, - 44, 20,221, 98,180,119, 27,105,109,230,115,196, 80,223,248, 73, 79,141, 27, 11, 0, 63,239, 59,118,220,142, 69,165, 91,204,167, -173,188,218,195, 25,218,141,183, 60, 35,243,230,125, 1, 45, 35,194, 35,115,195,122, 76, 92,101, 15, 81,163,200,240,247,149,189, -209,112,108, 99,155,238,125,195,172, 97, 65,136,139,159,244,100,236,187, 75,151,224,227,143, 18,112,232,231, 3, 71,178,242,239, - 91, 38,232, 31,215,150,254, 98, 78, 98,149, 64,240,152,220,215,119,200,122,134, 89,114,237,230, 77,199,198, 29,182,122,203,115, -227, 78,165,159,159,159, 74,169, 84,118,176,135, 51,238,203, 47,173, 6, 7, 7,201,146, 53,107,134,214,154, 76, 67, 87,174, 92, - 41,184,124,249, 50, 54,125,245, 21,101, 42, 41, 73, 84, 3,243, 90, 24, 13,105,145,179,211,188,121,210, 69,155, 54,189, 24,212, -173,155,247,243,207, 63, 47, 20, 10,133,208,235,245, 40, 46, 46,198,201, 19, 39, 44,153, 89, 89,153, 58,157,238, 9, 0, 10,123, - 57,227,190,252,210,234, 26, 20, 4,185,151, 23,123, 58, 37,197,101,214,252,249,179, 59,119,233,226, 50,102,236, 88,161,179,179, - 51,170,170,170,112,247,238, 93, 28, 56,112, 64, 85, 91, 91,235, 7,128,182,135, 51,241,252,249,158, 71,207,156,121,122,213,170, - 85,226,200,200, 72,184,184,184,160,166,166, 6, 55,111,222,196,153, 51,103,204,223,124,243,141, 86,171,213,206,166,105,250,240, - 95, 88,239,255, 6,171, 86, 61,182,216, 20, 90,255,197, 27, 48, 10,192,251,117,219, 31,194,246,154,129,255,166,135, 79,160,187, -187,251, 22,147,201,196, 26,141,198, 89, 0,138,254,134,249, 20, 68, 69, 69,109, 82,169, 84, 3, 88,150,133,139,139,203,133,140, -140,140,185,104, 97,230,141, 13, 78, 62,128, 1,142,142,142,253,157,156,156,134,154,205,230,176,186,225,183, 44,189, 94,127,198, -106,181, 94,170,179, 62,209,255,207,101,231, 3, 24,229,231,231,247, 50,195, 48,221, 8,130,112,165,105, 26, 36, 73, 86, 51, 12, -115, 75,171,213,110, 3,144,252, 55,200,231, 67,225, 12,127, 4, 79,178, 60,132,181, 36, 8,238, 19, 90, 77, 4, 4,193, 32, 43, -243, 54, 14,180, 33,159,188,113,209, 1, 27,129,123, 51, 19, 97,219,185,246, 63, 66,203, 14,241,210,102,145,249, 8,255, 5,150, - 96,239,227, 36, 88,162, 40,180,231,147, 63, 62,136,208,178, 23,225,193, 24, 10, 22, 3, 24, 22,151,178,111,225,215,127,241,179, -238,161,113,126, 12,184,127,229,230,118,129, 39, 16,248, 0,224,213, 89, 95, 24,134, 32,104,150, 32,168,198,195, 91, 77, 58,150, -173,114, 90,129, 30, 66,137, 36,128,166,168, 14,101,128,227, 81,154,126,212,196,178,181, 29,129,247,211,129,156,246,228,211, 10, -244,224, 75, 36,129, 71, 89, 54, 94,237,224,208, 83,101, 52,122, 1, 96, 29, 29, 28,178,116,122,253,118,147,201,180, 17,127, 30, -185,176,201, 41,146, 72, 58,210, 20,213, 1, 0,120, 2,129,106,183,217, 28, 80,226,236,252,188,201,108,238,228,232,232, 72, 90, - 44, 22,157,201,100,154, 70, 81,212,233,182,148,253, 22, 69,133,159,231,241, 6, 91, 29, 28, 60,172, 4,225, 96,161, 40,171,197, -106, 45, 54,153, 76, 55, 0,124, 6,224,246, 95, 92,239, 28,218,121,179,112,156, 28, 39,199,201,113,114,156, 28, 39,199,249,215, -115,202, 1, 4,214,117, 22,255,137,101,255, 55,193, 62, 31, 45, 14, 28, 56,112,224,192,129,195, 63, 6, 6, 52,227,147,197,225, -255, 23, 68, 43,170,180, 45, 38,193,246, 40,219, 83, 28, 39,199,201,113,114,156, 28, 39,199,201,113,254,207,113,218,226,254, 39, - 14, 73,182,184,214,225, 95, 13,206,252,203,113,114,156, 28, 39,199,201,113,114,156, 28,231,255, 44,120,220, 37,104, 17, 29,234, - 62, 15, 59, 45,135,127,119, 91,104, 10,255,186, 79, 91,210,251,114,151,156, 3, 7, 14, 28, 56,161,245, 87,191,180, 30,228,229, -246,160,194, 39,129, 32,160, 32, 8, 40, 0, 36, 60,196,180,182,224,231,233,233,249, 70,120,120,120, 98,135, 14, 29, 94, 3,224, -221,198,227,187,203,229,242, 47, 28, 28, 28, 82, 29, 28, 28, 82,229,114,249, 23, 0,186, 63,164,122, 35, 0,204,146, 72, 36, 41, -190,190,190,165, 98,177, 56, 5,192,108,180,127,230,106, 8,238,197, 73,251, 16, 64,207,182, 28,232, 29, 17,191,199, 43, 34,254, -186, 87, 68,252, 77,143,200,241,221,189, 34,226,111,122, 69,196, 95,247,142,136,223,243, 23,180,215, 7,169,223, 4,130, 64, 17, - 65,160,200,206, 99, 63, 35,128, 98,130, 64,201, 67,104, 75, 28, 56,112,224,192,225,159, 6, 63, 63,191,167,124,125,125, 79,249, -250,250, 38,251,249,249, 61,101,199, 33,209,205,188,120,104,130, 0,109,227, 69,210, 90, 58, 91,230,202,198,199,126,106,103,209, - 26,115,118, 32, 8,208,108, 29, 8, 2,140,183,183,247, 6, 95, 95,223,132,166, 31,111,111,239, 13, 4, 1,166, 81, 90,186,145, -192,107,171, 89,181,195,115,207, 61,247,115, 85, 85, 85,146,197, 98, 73,202,203,203, 75, 26, 54,108,216,238, 38,214,141, 22, 57, -165, 82,233, 51,253,250, 15, 72, 59,115,238, 82, 94,238,173, 2, 69,102,206,157,130, 95,142,159,190, 28,217,163,231, 31, 82,169, -244,153, 54,212, 17, 1, 96,150, 64, 32, 72,113,116,116, 44, 17, 8, 4, 41, 0,230,240,249,252,195,171, 87,175, 46,200,200,200, - 40, 63,127,254,124,245,153, 51,103, 74,103,204,152,113,139, 32,136, 95,154, 17,236,209,205, 88,105,154, 90,117,150, 21, 22, 22, - 30, 87, 42,149, 39,100, 50,217, 71,118,164,111,224,244,138,136,191,174,210, 90, 89,149,214,202,122, 69,196,179,141,182,175,183, -241,154,219,170,163, 63,181, 5,137, 68, 18,104, 67,208, 71,183,116, 44, 0,159,186,255,162, 0,124, 89,247,169,159,122,238, 35, -149, 72, 30, 86, 91,122, 24,101,231, 56, 57, 78,142,147,227,252,111,115,254,147,209,167,238,219, 23,247,252,181, 26,222,221,109, -157,117,248,106, 94, 94,158, 35, 0, 4, 7, 7,207, 5,176,175, 45, 66,130, 32,176,136, 97, 88, 30, 0,240,120,196, 59,195,135, -143,232, 35,147,201,238,139,130,108, 52, 26,197, 41, 41,191,142,100, 24,150,168, 75,183,136,101,241, 5,128,114,123,207, 97,177, -152,121, 66,161, 24, 60, 30,241, 86,100,100,143,206, 21, 21, 21,103,121, 60, 94, 98,105,105,105, 85,155,205, 56, 4,129,173, 91, -183, 6,251,250,250,254, 41, 90,179, 82,169, 20,199,199, 63,209, 38,190, 23, 0,137, 89, 34,233, 47, 34, 8, 95,154,162, 92, 1, - 64, 32, 16, 84, 93, 22,139,163, 62, 94,181, 74, 78, 16, 4,163,209,104, 96, 52, 26,241,230,155,111,202, 50, 51, 51, 39, 84, 84, - 84,108,180, 65, 27,220,179, 87,159, 55, 79,156, 56, 30,166,171,172, 50,109,253,124,115,154, 81, 32, 50,116, 9, 15, 21,109,218, -178,221,109,230,139,211, 94,207,206,206, 72, 71,243,203,145, 52, 6, 15,192,129,249,243,231, 71,196,197,197,137,107,106,106,164, - 70,163,177,115, 98, 98,226,123, 81, 81, 81,142,189,123,247, 22,239,218,181,139,208,106,181, 96, 89, 86, 30, 26, 26,202, 78,158, - 60,217,180,123,247,238,215, 0,108,104, 69,248, 46,186,119, 45,121,235, 67, 66, 66,150, 3, 64, 94, 94,158,168,209, 53, 22,134, -133,133, 57, 0, 64, 78, 78,206, 7, 44,203,204, 7, 0,150,197, 90, 0, 75,154, 49,173,229, 69, 12,154, 4, 16,232,150,113,238, -103,105,196,224, 73, 38,176,184, 69, 0,121,117, 29,130,149, 64,163,184, 80,247, 35, 75,161, 80,180,107,109,194,216,216, 56,130, - 32,136,189,105,105,105,251, 84, 42, 85, 23,134,161, 95,105, 45,159, 77,218, 17,225,225,225,241, 66, 69, 69, 69, 2,128,151,179, -178,178,250, 0, 64, 88, 88,152, 8,192, 21,103,103,231,129, 86,139,133,224,158, 85, 28, 56,112,224,240,143, 21, 90, 87, 1,196, -226, 63, 75,240,108,105,143,208, 18, 3,192,217,179,103, 1, 64,210,142,140, 16,141, 5,204,188,121,243,224,235,235,219, 84,188, - 32, 53, 53,229, 65, 10,123,223, 57, 62,252,240, 67,199,234,234,234,232,111,191,253,118, 8,203,178,159, 42, 20,138,223,109, 28, - 95,206,178, 88,203,227, 17,239, 16, 4, 1,137, 68,154, 59,123,246,236,171,117,255,117,254,229,151, 95,228,227,199,143, 55, 0, - 40, 0, 0,137, 68,234,207,231,243,130, 89,150,173,127,225,182, 40, 8,159, 6,130, 40,177,120,196,172, 47,191,164, 30, 29, 63, - 94,224,224,229, 69, 0, 64, 65,118,182,199,218, 79, 62, 25, 88,149,159, 47, 54,122,120,104, 52,122,189, 49, 55, 55, 23, 18,137, -132,224,243,249,143,218, 42,176,131,131,195, 27,171, 62, 94,227,160,171,172, 54,154,116, 53, 22, 62, 69,154,157,100,114,186,188, - 76,165,113,148, 57, 24,222,121,127,133,248,213, 87,166,191,161,215,235,231,218,160,122,237,173,183,222, 10,235,215,175,159,255, -158, 61,123, 8,173, 86, 11,129, 64,224,216,187,119,111, 68, 69, 69,209,191,254,250, 43,209,165, 75, 23, 68, 70, 70,226,220,185, -115,184,112,225, 2,209,167, 79, 31,249,254,253,251,159, 35, 73,114,131, 45,113,205,231,243,222, 12, 13, 13,237,237,224,224, 96, - 9, 14, 14,198, 43,175,188, 2,150,101, 17, 29, 29, 29,233,232,232,184, 79,175,215,139,115,114,178,135,216, 18,217,170,140, 67, -147,235, 45, 91, 0,122,128,197, 45,117,198,161,198,195,143, 97, 57, 57, 57,143, 85, 85, 85,225, 94,189,176, 13, 11,152, 15, 25, - 50,164, 45,109,169,156,101,177,118,252,248,184,119, 0,130,136,142,142,174,126,237,181,215,120,217,217,217,207, 62,249,228,132, -200,188,188, 91,104, 37,159,141,219, 17,241,194, 11, 47,150, 59, 58, 58, 78,220,187,119,111,142, 82,169, 20,136, 68, 13, 58,147, -239,237,237,237, 21, 28, 28, 60,199,221,221, 93,197,231,241,188, 89,176,172,173,182,196,129, 3, 7, 14, 28,254, 86, 56, 82, 39, -174,142, 52,253, 67, 0, 0, 73, 73, 73, 13,145,105,227,226,226, 90,236, 85,179, 44, 91,126,237,218,181, 0,131,193, 0,150,101, -237,121, 9, 52,158,162, 89, 78, 16,188, 77, 60, 30, 49,151, 32, 8, 68, 70,246,184,179,126,253,250,230,214,244,178, 68, 70,246, -184,195,231,243,186,178, 44, 11,130,224,125,205,178, 76,121, 11,156,205,190, 24,197, 98,201, 34, 0,240,241,241,205, 63,118,236, -152,229,233,167,159,198, 39,159,124, 34, 90,188,120,241, 66,129, 64,240, 90, 81, 81, 81, 89, 43,249, 4,128, 37, 94, 94,222,242, -173, 91,183, 6,207,158, 61,251,170, 82,169, 92, 2, 0,190,190,190, 9, 0,194, 1, 20, 52,218,135,111,190,217, 93,250,202, 43, -175,228,170, 84,170, 37, 45,113, 78, 4, 30, 9, 8, 13, 29,177,242,236, 89,150,103, 54, 19, 21,191,253,166, 83,151,151,147,183, -213,106,249, 15, 87,174,196,189,151,144, 32, 12, 8, 12, 68,234,225,195,158, 21, 6,131, 90,107, 54,155,202,203,203, 89,138,162, - 46,216, 81,246, 8,111, 47,111,249,230,207,190,190,236, 36,228, 51,222, 29,253, 9,161,187,187,128, 39,119, 22,243, 5, 60,115, -215,206,221,197, 0, 34,108,213,145, 72, 36,122,110,244,232,209,242,221,187,119, 19,145,145,145,112,117,117,197,111,191,253,134, -244,244,116, 84, 85, 85,241, 72,146, 68,223,190,125,177,102,205, 26, 4, 6, 6,162,186,186, 26, 69, 69, 69,158, 98,177,216,139, - 36,201,150,174,231,125,237,105,209,162, 69,240,245,245, 5, 69, 81,168,172,172, 4, 69, 81,112,116,116, 4, 0,148,148,148,224, -240,225, 67,246,180, 37,155, 96, 89, 22,143, 63,254,120, 13, 65, 16, 89, 77, 45, 90,109,225,244,247,247,223,165, 86, 87,140, 27, - 49, 98, 4,170,170,170,200, 21, 43, 86,160,103,207,158, 8, 14, 14,182, 39,159, 75, 68, 34,241,183,157, 58,117,250,108,222,188, -121,190,238,238,238, 48,155,205,239,149,149,149, 97,206,156, 57, 0,128,152,152,152,158, 66,161,240,216,140, 25, 51,208,165, 75, -151,210,202,202,202,162,180,180,180, 87, 12, 6,195,205,246,150,221, 78,112,156, 28, 39,199,201,113,254,173, 56,237,213, 34,127, - 83, 40,113,127, 56,135, 45,247, 9,173,184,184, 56, 34, 41, 41,137,181,163, 96,154,142, 29, 59, 6,200,100, 50, 0,208,180, 53, - 23, 12,195,188,230,225,225,161, 90,178,100,201,160,224,224, 96,203,107,175,189,118,179,160,160, 96,105,227, 52,157, 59,119,254, -232,171,175,190, 66,110,110,110, 65, 66, 66,194, 57,141, 70,211,214,117,204, 22,179, 44,214,215, 89,199, 42, 14, 31, 62,220,243, -236,217,179,115, 63,255,252,115,175, 87, 95,125, 85,244,198, 27,111, 76, 3,240,137, 45, 18, 62,159,111,104,110,184,176, 57,248, -250,250, 90,248,124,126,139, 65,226,226, 0,153, 84, 44, 30,190,242,236, 89,214, 82, 80, 96,248,110,221, 58,167,205,127,252,177, -156,100,217, 14,222,222,222, 24, 60,112, 96,173,148,207,175, 80,149,149, 49,222,143, 60,194,191,123,236,152,167, 81, 44, 86,236, -222,189, 91,171,209,104, 14,218, 52,225, 17,132,142, 97, 89,139, 99,199, 64,242,233, 9,163, 34, 47, 95, 74,207,118,242,246,228, -245,233, 29,217, 51, 59,183, 32, 13, 12, 99, 37, 8, 66,103,139,199,197,197, 37, 88,163,209, 64,167,211,193,203,203, 11,235,215, -175,135,143,143, 15, 12, 6, 3, 50, 50, 50,216,142, 29, 59, 18,103,207,158, 69,199,142, 29,161, 86,171, 97,144,143,144,232, 0, - 0, 32, 0, 73, 68, 65, 84,177, 88, 80, 83, 83,163, 50,155,205, 45,173,205, 88,206,227,241,191,231,241,136, 23, 9,130, 64,215, -174, 65,133, 27, 55,110,180, 48, 12,131,176,176, 48, 60,249,228,147,216,191,127, 63, 50, 50, 50,234, 45, 79,150, 78,157, 58, 23, -242,120, 68,167, 58,173,212,110,171, 78,253,210, 62, 10,133, 98, 98, 59,111, 26,158,159,159,223,180,110,221,186,205,125,230,153, -103, 72,177, 88, 12,189, 94, 95,127, 45,200,113,227, 98,170,199,143,143,115, 57,114,228, 72,171,249,180, 88, 44,249, 90,173,246, -229,183,222,122, 43,241,155,111,190,113, 91,186,116, 41, 24,134, 1,203,178,160, 40,170, 97,209,111,134, 97,112,224,192, 1,220, -190,125,251,163, 38, 34,139, 3, 7, 14, 28,254, 39,208, 6, 45,242,119,132, 47,238, 13, 27,162,169,216,250,175, 71,134,231,243, -249,155, 79,158, 60,217,123,200,144, 33,130,145, 35, 71, 70, 30, 63,126, 60,178,180,180,244,102,157,245, 32,114,228,200,145,145, -222,222,222,248,226,139, 47, 12,124, 62,127,115, 59, 79,211,240,210, 43, 43, 43,187, 10,224,211,253,251,247,175,157, 53,107, 22, -124,124,124,194,149, 74,229,127,181,204,206, 18, 73,159, 25,235,215, 83, 66,146,228,125,249,233,167,206,235, 82, 82,214,238,249, -249,103,193,227,143, 63, 78,176, 44,139, 27,215,175,203,214,108,216, 32,159, 58, 97, 66, 65, 78,126, 62,117,232,196, 9,178,188, -180,180,178, 84,173, 94, 6,160,210, 22, 63, 73,146, 23,243,242,242,252, 6, 15,125,220,255,204, 31, 55,211,159,158, 16, 51, 66, - 40,224, 17,183, 10, 74,174,248,250,120,186,164,166,156, 50,146, 36,121,209, 22,143, 94,175,191, 75, 81,148, 59,203,178, 94,169, -169,169,240,242,242, 66, 85, 85, 21, 72,146,132,197, 98,177, 24, 12, 6,169, 70,163,129,201,100,130,217,108,134,179,179, 51,110, -220,184, 81, 78, 81,212,175, 45,113,210, 52, 61, 67, 34,145,124, 40, 20, 10,197, 34,145, 72,113,229,202, 21,232,116,186,206,174, -174,174,159, 80, 20, 5,133, 66,129,179,103,207,190,237,236,236, 92, 0, 0, 82,169, 20, 98,177,196,195,108, 54, 83, 0, 74,219, -123,205, 89,150,109,119,125,249,248,248, 4,202,100,178,149,239,188,179, 40,172, 87,175,222, 80,171,213, 96, 24, 6, 14, 14, 14, - 48, 24, 12,112,118,118,198,128, 1, 3,238,174, 92,185, 82,201,178,152,105, 75, 12,170, 84, 42,181, 64, 32,120,109,214,172, 89, - 31, 6, 7, 7,119,101, 89, 22,221,187,119,199,232,209,163,113,236,216, 49,228,230,230, 66,175,215,211,191,255,254,251, 79, 74, -165,242, 23,238,113,203,129, 3, 7, 14,255, 56,252,201, 55,235, 62,139,214,127, 19, 42,149, 74,157,157,157,125, 60, 45, 45, 45, -110,242,228,201, 72, 77, 77,125, 1,192, 91, 0, 32,145, 72, 94,152, 60,121, 50,210,210,210,144,157,157,125, 92,165, 82,169, 31, -198, 57,197, 98,177,201, 98,185,103,156,146, 74,165,210, 54, 30,222,185,110,200, 16, 0, 58,183,178,175,101,211,136, 64,224,219, - 99,236, 88, 65, 85,122,186,110,235,165, 75, 31, 38, 38, 38, 10, 6, 13, 26, 68,144, 86, 43,104,134, 65, 80, 80, 16, 49, 50, 58, -218,225,251,196, 68,119, 90,175, 63,187,234,157,119,126,219, 50, 99, 70,109, 94,157, 31,152, 45,152,205,230, 13,115,231,188, 28, -157,146,250,155,127,120,232, 35,238,199, 79,166, 92,245,240,112,145, 7,119,235,230,160,169,170,164,151, 46,126, 91, 96, 54,155, -191,180,197, 99, 52, 26, 15,156, 58,117,106, 66, 64, 64,128,215,205,155, 55, 97,177, 88, 64,211, 52, 70,142, 28, 9,150,101, 37, - 0, 24,129, 64,128,236,236,108, 88,173, 86, 85, 94, 94,158,226,214,173, 91, 18, 0,171,109,228,175,208,108, 54, 35, 43,235,222, -168, 93,199,142, 29, 71,197,198,198,130,162, 40,140, 29, 59, 22,135, 14, 29, 26,149,149,149,181,174,177,230,123,208, 58,175,179, -144,133,249,249,249,237,175,219,101,151, 19,188,191,191,127,100, 80, 80,208, 55,171, 87,175, 22,117,236,216, 17, 44,203,194,205, -205, 21, 6,131, 1, 21, 21, 26,132,135,135, 35, 32, 32, 0,171, 87,175, 6,128,159,236,181,184, 41, 20,138, 91, 10,133, 98,178, - 74,165, 18, 85, 87, 87, 71,141, 26, 53,234,139,232,232,104, 92,189,122, 21,191,253,246,219, 84,137, 68,162,178, 90,173,148,143, -143,207, 76,130, 32,156,173, 86,235, 78,141, 70,163,228,158, 93, 28, 56,112,224,240,143, 64,189,143, 22, 26,125,183,205,162, 21, - 22, 22,230, 80, 80, 80,240,124,231,206,157,197, 0, 32,147,201,194,131,130,130, 22,230,231,231,215,180, 53, 55, 6,131, 97, 79, - 98, 98,226,232,207, 62,251, 76, 20, 19, 19,243,200,254,253,251,251, 1, 64, 76, 76,204, 35, 78, 78, 78, 72, 76, 76,180, 26, 12, -134,135, 22, 19,137, 36,201, 33,125,251,246, 69,101,101, 37, 10, 10, 10,218, 52, 44,243,203, 47,191,200,113,207, 47,171,213,125, -173,129,178, 88,220, 92,253,253,121,165, 41, 41,214, 74,157,206,119,200,208,161, 4,105,181,130,199,227, 65,163,209,160,168,168, - 8, 46,174,174, 68,118, 94,158,227,182, 69,139,126,233,220,171,151,152,182, 88, 60,218,144, 77,125,133,170,252,197,215, 95,123, -245,192,206,157, 63,121, 85,235,116,183,101, 50,185, 89, 34, 17,249,204,123,253,117,186,178,178,114, 58,128, 90, 59,120, 86,239, -220,185,115,236,216,177, 99,175, 7, 6, 6,122,171,213,106,159,234,234,106,186,178,178,146,143,123,190, 86, 4, 0,164,164,164, - 64,167,211, 81, 52, 77,159,197,189, 88, 88, 22,123, 51,218,169, 83, 39,151,168,168,168, 97, 94, 94, 94,208,106,181,240,240,240, - 64,239,222,189,135,241,249,252,111, 11, 11, 11,181, 15,179,213, 39, 39, 39, 59,177, 44,251, 24,203,178, 24, 59,118,172, 93,199, -208, 52,253, 82,108,108,172,136, 32, 8, 24,141, 6, 72,165, 50, 56, 56, 56,194,201,201, 25,193,193, 33, 80, 40, 20, 24, 51,102, -140,229,246,237,219,155,148, 74,101,155,219,168, 86,171,141, 31, 48, 96,192,130, 57,115,230,128,162, 40,196,199,199,163,184,184, -120,221,221,187,119,119,251,249,249, 77,123,233,165,151,188, 60, 60, 60,176, 96,193, 2, 25,128, 15,184,103, 23, 7, 14, 28, 56, -252, 35,208,212, 71,235,207, 22,173,214,198, 68,125,124,124, 6, 19, 4,241,158,209,104, 20,215, 15,201, 16, 4, 33,246,242,242, - 58,100, 52, 26, 19,148, 74,101,155,156,226,170,171,171,117,119,238,220, 57,116,241,226,197, 73, 19, 39, 78, 68,114,114,242,116, - 0,152, 56,113, 34, 46, 94,188,136, 59,119,238, 28,170,174,174,214, 61,140,146,251,251,251,143, 27, 58,116,232,196,190,125,251, - 34, 41, 41, 9, 52, 77, 95,104,203,241,141,103, 24,162,153, 89,135,245,251,236, 34,227,243, 65, 16, 4, 40,138, 2, 0, 84,168, -213,200,205,201, 65,101, 85, 21,204, 38, 19,244, 6, 3, 29,220,165,139, 81,107,177, 8, 9,160,173, 99, 95,133,105,151,127, 47, - 50,232,245,222, 30,110,238, 70,185, 92,130,106,157, 86,116,229,242,239,181, 0,110,219,201, 97, 97, 89,118,232,177, 99,199,150, -241,249,252,201,142,142,142,152, 59,119, 46,127,216,176, 97, 16,137, 68, 48,155,205,168,174,174, 70, 98, 98,162,154,166,233,174, -117,199, 56,202,229,242,237,124, 62,191,164,166,166,230, 61,155, 39,176, 88, 98,226,226,226, 4, 22,139, 5,171, 86,173,194,242, -229,203, 49,118,236, 88,193,229,203,151, 99, 0,236,124, 88, 45,158, 97, 24,140, 26, 53,170,177, 51,124,150, 61,199, 9,133,194, -200,110,221,186, 65,173, 86, 67,173, 86,195,203,203, 11,126,126,126,240,241,241,193,186,117,235,216, 47,190,248,226,184,213,106, -221, 84, 81, 81, 81,222,142,182, 56,115,250,244,233, 51, 39, 77,154,132,218,218, 90, 92,188,120, 17, 3, 7, 14,196,218,181,107, -125,207,158, 61,251, 86,223,190,125, 33, 20, 10,145,154,154, 10,138,162,138,185,231, 22, 7, 14, 28,254,215,240, 15,245,207,106, - 21,173, 90,180, 2, 2, 2, 92,105,154,126, 59, 54, 54,118,212,132, 9, 19, 48,102,204,152,251,254,223,185,115,167,211,190,125, -251, 18, 54,108,216, 48,214,106,181,174,110,203, 80, 31,195, 48, 7,118,238,220, 25,243,248,227,143,203,135, 15, 31, 30, 4, 0, - 18,137,196,178,115,231, 78, 3,195, 48, 7,218, 81,150,250,224,142,229, 0,224,231,231,215, 83, 32, 16, 76, 28, 55,110, 92,207, - 23, 95,124, 17, 25, 25, 25, 72, 76, 76,188, 21, 28, 28,124,174,188,188, 77,239,200, 2, 27,179, 14, 19,108, 89,183,248, 98,177, -166,186,172,204,213, 49, 48, 80,232,230,228,164, 76, 74, 74, 10,136,142,142, 38,138,139,139, 81, 85, 85, 5,147,201,132,203,151, - 47, 51, 2,160, 80,224,230, 70, 20, 94,188, 72,240,197, 98, 13,238,159,201,103, 19, 1,190,110,221,223, 95, 60,187,179,201,108, -138,208,106,181,148, 64, 40, 20,118,244,113, 45,206,185,221,166,145, 56,179, 92, 46,143, 2, 32, 96, 24,198,224,238,238, 46, 63, -121,242, 36,196, 98, 49, 8,130, 64,143, 30, 61, 32,149, 74, 69, 44,203, 22, 1,128,147,147,147,120,243,230,205, 46,211,166, 77, -251,205, 22,113,159, 62,125,132, 18,137,228,137,224,224, 96, 92,188,120, 17, 55,111,222, 44,188,120,241, 98,167, 62,125,250, 32, - 48, 48,240, 9, 95, 95,223,159,175, 94,189, 74, 62,140,134,125,111,198,106,219,157,225,105,154,102, 8,130, 0,143,199, 3,195, - 48, 80,171,213,232,218,181, 43, 54,110,220,136,245,235,215,175, 82, 42,149,135,219,147,159,176,176, 48, 81,215,174, 93,167, 79, -154, 52, 9,249,249,249, 72, 72, 72,168, 80, 42,149, 41, 39, 78,156,120,106,206,156, 57,252,129, 3, 7, 66,163,209,224,251,239, -191,167,174, 92,185,242, 93, 89, 89,217, 14,238,145,203,129, 3, 7, 14,255, 98,161, 21, 16, 16, 48, 73, 36, 18, 45,152, 50,101, - 10, 63, 36, 36, 4,229,229,229,112,118,118, 38, 9,130, 16, 2,128,171,171, 43, 41,147,201, 48,123,246,108,244,234,213,107,240, -162, 69,139, 6, 10, 4,130,141, 10,133, 98,187, 61, 39, 86,169, 84, 6, 30,143,183,119,238,220,185,171,211,211,175,118, 5,128, - 63,254,248,227,142, 66,161, 88,172, 82,169, 12,109, 44, 71,125, 80, 76, 66, 34,145, 94,234,222,189,251,221,168,168, 40,231, 9, - 19, 38,192,203,203, 11,105,105,105, 88,179,102, 77,158,197, 98, 89,118,230,204, 25,234,191,125,145, 41,179,185,236,202,193,131, - 78,195,158,125,214,121, 94,108,236,167,175,206,157,251,217,251,239,191, 47, 8, 9, 9, 33, 12, 6, 3, 46, 93,186,196,238,219, -183,143,252,254,195, 15,215,195,193, 65,120,113,223, 62,177,197, 98, 41,108,163,181,100,232,160, 33,131, 67, 62,253,108, 3, 76, -198, 90, 92,186,112, 4, 85, 85,106,108,222,178, 63,196,223,159, 29, 90, 90, 90,122,198, 94, 46,130, 32,130,147,147,147,189, 89, -150,133, 88, 44,198,202,149, 43,225,231,231, 7,103,103,103,212,212,212,224,173,183,222,114,153, 63,127,190, 11, 0,100,100,100, - 52,132,103,176, 5,133, 66, 49, 96,246,236,217, 78, 20, 69,225,248,241,227, 22,130, 32,222, 59,117,234,212,183, 61,122,244, 16, - 15, 30, 60,216,105,199,142, 29, 3, 1,164, 62, 44,161,213,206,227,110,157, 60,121,178,239,228,201,147, 89,161, 80, 72, 84, 87, - 87,195,213,213, 21, 27, 55,110,212, 43,149,202, 35,237,110, 3, 20, 37,150,203,229, 98,150,101,177,119,239, 94, 20, 22, 22,190, -164,209,104,202,104,154,222,255,246,219,111, 47, 12, 9, 9,233,146,147,147, 83, 88, 83, 83,179, 86,165, 82,221,229, 30, 77, 28, - 56,112,224,240,143, 66,189, 19,124,253,236,195, 35,184, 55,156,216,178,208,162,105,122,246,137, 19, 39,248, 12,195, 96,203,150, - 45,184,114,229, 10, 43,151,203,223,147,203,229, 95,201,100, 50,218,104, 52,206,122,229,149, 87,166, 45, 95,190,156, 55,120,240, - 96, 92,188,120,145,215,181,107,215,233, 0, 26, 11,173,104,180, 18,107, 67,171,213, 94, 46, 47, 47,235,218, 40, 64,101, 87,137, - 68,122,217, 70, 97,154,114, 54, 13,138,217,127,229,202,149,122, 95, 95, 95,203,205,155, 55,241,205, 55,223, 48, 87,174, 92, 73, - 17,139,197,155,149, 74,165,217, 78,206,135,129, 6, 78, 49, 69,165,253,184,112, 97,216,163,241,241,204,203, 11, 22,212,138,100, -178, 55, 62,221,176, 97, 81,117, 77,141, 31, 8,130,245,112,113, 41,220,178,114,101,194,216, 39,158,168,205, 56,115, 70,154,158, -156, 44,244, 34,201,107,109,201,103,105,105,233,153,212,212,223,240,195,214,207, 96,181,154,161, 44,189,167,211, 42, 52, 90,216, - 16, 89,127,226,164, 40, 74,251,212, 83, 79,137, 0,200,158,123,238, 57,177, 74,165,194, 35,143, 60, 2, 0,208,233,116, 56,114, -228, 8, 66, 67, 67, 1, 0, 55,110,220,104,216,182,149, 79, 7, 7,135, 39, 6, 14, 28,136,194,194, 66,100,100,100,156, 86, 42, -149, 26, 0,167,139,139,139, 99,250,246,237,139, 3, 7, 14,140,111, 69,104,181,169,142,236, 20, 90,127,226,148,201,100,139,247, -239,223,255,210,133, 11, 23, 38, 47, 92,184, 80, 56,114,228, 72, 0, 64, 77, 77,141, 1, 0,221, 30,206,198,121, 34, 73, 18, 12, -195,192,221,221, 93,175,209,104,160, 82,169,238,170, 84,170,185,183,111,223,110, 23,231,195,104,159, 28, 39,199,201,113,114,156, -127, 19,206,127, 3,236,143, 12,207,178, 44,197, 48, 12, 82, 83, 83,177,127,255,126,218,106,181,206, 84, 42,149, 55, 26, 37,217, -144,150,150,150,252,212, 83, 79,109,207,201,201,225,103,102,102,130,101, 89,186, 45,185, 49,153, 76, 36, 65,252,121,223,131,150, -242,135, 31,126, 64, 89, 89,153,181,184,184,248, 20, 69, 81, 7, 30,112,246,226, 3,207, 58,252, 1, 48, 63, 99,177,156, 90, 62, -104,208,168,101,201,201,146,151,223,125,215,252,194,139, 47,190, 77, 91, 44, 36, 95, 36, 98,196, 14, 14, 60, 90, 34, 17,102,156, - 57, 35,253, 98,206, 28,119,163,217,124, 60,177, 13, 14,230,245, 22,173, 97,195, 6,227,133,151,223,132,177,145, 69,235,226,229, - 92,152,173,104,147, 69,203,108, 54, 71, 40,149, 74, 72,165,210, 34, 0, 62,207, 63,255, 60, 24,134,129,209,104, 68, 77, 77, 13, - 20, 10,133,246,197, 23, 95,164,235,196,147, 96,226,196,137,206,246,240, 6, 5, 5,249, 9,133, 66, 28, 63,126, 28, 66,161,240, - 8, 0, 8,133,194, 35,201,201,201, 49, 83,167, 78,133,191,191,127, 80,126,126, 62, 1, 27,254,105,222, 17,241,123, 88,160, 59, - 8,116,187,103,130, 67, 55,175,136,248,235, 4,144, 87, 23, 53, 62,171, 79,159, 62,128,157,126, 89,141, 81, 55,185, 99, 61, 73, -146, 63, 47, 90,180,104,110,255,254,253, 71, 47, 95,190,156, 0,192,127, 24,119, 32, 69, 81, 15, 20,122,130, 3, 7, 14, 28, 56, -252,173,173, 90,127, 66,139, 66,139, 32,136, 45, 67,135, 14,157, 9,128, 79, 16,196, 55, 10,133,226, 70,211, 52, 74,165, 50,215, -207,207,239,147, 46, 93,186,204, 2,192, 18, 4,177,165,141,153, 42,103, 89,172,225,241,136, 69,247,196, 93,187, 2, 84,214, 47, -117,178, 8, 0,193,227,241,183, 95,189,122,245,221,162,162, 34,181,157, 22,136, 86,241, 48,102, 29, 2,192, 79,192,221, 41,133, -133, 39, 22, 68, 70, 70,143,157, 51, 7, 61,199,142,117,246,235,212,137, 54, 90,173,204,141,115,231,136, 11,123,247,138,210,147, -147,133, 70,179,249,248, 1,160,168,173,249, 44, 45, 45, 61,243,107,202,153,147, 79, 79,140, 25, 29,212,197,239,158,104,184,171, - 64, 69,165,246,100, 91, 68, 86, 19,209, 27,191,113,227,198,195, 34,145, 72,208,120, 41, 27,171,213, 90,105, 54,155, 35, 0,160, -170,170,202,111,203,150, 45,187,120, 60, 94,161, 45,190,204,204,204, 67,203,150, 45,155, 88, 80, 80,112,178,184,184,184, 0, 0, -138,138,138, 10, 72,146,220,174, 84, 42, 39, 22, 22, 22,238,131, 29,147, 0, 88,160,123,198,185,159,123, 0, 64,196,160, 73,200, - 56,247,179, 20, 64,143,136, 65,147, 0, 0,237, 93,203,176, 49,234, 66, 43,188,119,241,226,197,157,163, 71,143,126, 5, 15, 16, -211, 11, 0, 44, 22, 11,105, 52, 26, 41,154,166, 5, 86,171,149,181, 88, 44, 36,247, 76,226,192,129, 3, 7,251,193,178,108, 95, - 0, 94,117, 63,235, 13, 40, 94, 77,182, 45,168, 91, 46,176,254,241, 91,247, 91, 77, 16,196,229, 70, 28, 13,251,237, 56, 22, 0, - 42, 0, 92, 39, 8,162, 37, 35,200,150,150,126,183, 40,180, 20, 10,197, 62,216,177,104,180,189,233, 90,193,146,186,117,226,128, -246,175,237,214,192, 65,211,116,121, 81, 81,209, 3, 87, 40,143,199,187, 59,126,252,248, 54,165,183,149,102, 55, 80,248,186,217, -188, 35,233,203, 47,123, 31,255,230, 27,127,154,162, 60, 8,128,229,139,197, 26,139,197, 82,224, 69,146,215,218,106,201,186,207, - 26,115,167,116, 76,254,157, 82,116,235,214,141,189,117,235,214, 61, 91,207,131,225,154, 94,175, 15,176,213, 4, 12, 6,195, 96, - 59,197,224, 79,165,165,165, 63, 53, 35,216,119, 41,149,202, 93,246,102,170, 97, 81,105,128,199, 16,204,211, 17,131, 38,237, 5, -192,212, 47, 42,253, 48, 81, 86, 86,150,131,186, 56,111, 15,130,194,194, 66, 51, 65, 16, 63,174, 89,179,230,185,244,244,244,221, - 10,133,194,204, 61, 54, 57,112,224,192,161,109, 34,139, 32,136,164,186,223,113,117, 70,161,164,166,219,245,105,234,211, 53, 78, - 83,207,209,116,127,107,199, 2,192,226,197,139,223, 77, 72, 72,144, 3,176,119, 49,230,118, 47, 42,253, 87,161,252,111,194,209, - 88, 20,108,253, 43, 10,250, 37, 96, 1, 69,253, 14,170,145, 79, 62,249,112,141, 27,183,110,221, 34,254,205, 55, 92,253,162,210, -141, 16,249, 79,200,119, 65, 65,193,198,192,192,192,205, 10,133,130, 2, 7, 14, 28, 56,112,104, 11,188,154, 19, 70, 45,136,178, -184,214,254,191,175,227,222, 76,186,230,126, 19, 4,145,148,144,144, 16,215,134,252, 54, 88,180,120, 92,221,113,224,240,223,195, -255,199,172, 87, 14, 28, 56,112,224,208, 60,154, 90,177,234,197, 87,211,223,139, 23, 47,126, 23,173,143, 56,249,226,158, 21,203, -183,238,119,131,191, 22,129,123, 51, 7,154, 67, 91,102, 19, 68,183,163,124,167, 56, 78,142,147,227,228, 56, 57, 78,142,147,227, -252,159,227,180,197,125,170, 25, 65, 20,219,210, 80, 95,107,195,136, 77,183,109, 29,107, 43, 45, 65, 16, 45,133,249,169, 31, 42, -108,250,253,151, 35,154,227,228, 56, 57, 78,142,147,227,228, 56, 57, 78,142,243, 65,192,178,108, 95,150,101, 99,113,111,194, 20, -203,178,108, 44,203,178, 99, 23, 47, 94,188,164,126,223,226,197,139,151,176, 44, 59,178, 62, 93, 93,154,134, 99,234,247, 53,253, -110,186,175,181,180,173,100,113,102,147,237,134,223,127, 23, 31, 45, 14, 28, 56,112,224,192,129, 3,135,102, 81, 63, 99,176,145, -181, 73, 13,224, 70, 66, 66, 66, 85, 35,223, 41, 53,128,107, 0,122,213,165, 83,215,137,180,198,190, 85,150,186,223,150,102,210, - 88,236, 73,219, 2,182,180,176,205, 9,173,150,208,203,135,247, 97, 96, 71,239,168,186, 10, 0,203, 48, 0, 0,166, 46, 6, 18, - 91, 31, 12,137, 97,192,178, 44, 20,170,234,180, 27, 42,188,223,222,243, 5,251,193,221, 91, 42, 93,207,176,236,160,186, 93,103, -180, 26,243,155, 25, 58, 84,219,203, 17,218, 1, 97, 82, 30,222,102, 88,244, 4, 0, 30,129,235, 38, 6,159,100,151,183, 61,158, - 84,115,237, 60,194, 11, 51,197, 50,249, 20, 23, 87,183,110, 85, 85, 21,121, 86,147,249,231, 76, 53, 54,163,237,235, 50, 34,200, - 13,143, 49, 44,222, 5,192, 19,242,176, 46,175,210,238,153, 28, 28, 56,112,224,240,160,214,145, 7,138,139, 71, 16, 4,221, 12, - 39,241,128,156, 92,128, 61, 59,196, 86, 51,187,255,104,102,223,229,191, 83,190,219, 36,180,194,189, 48, 7, 4, 86, 0, 96,193, -226,131, 76, 53,190,110,211,241,190,136,150,242,249,219, 0,240, 77, 86,122, 1,203,224,108,179, 23,147,135, 33, 82, 17,127, 29, - 0,198, 68,211, 51, 50,149,246,251,139, 69,248, 99,172,128,225,253,200,176,172,144,102,216,237, 96,145,228, 40,194,249,223, 75, - 97,106, 75, 94, 3, 59,122, 71, 29,252, 67, 57, 58,229,235,121,232,223,243, 17,176, 52, 5, 48, 36,228,131,223,198,233,207,159, - 71,255,176, 64,176, 12, 9, 48, 20, 28,199,125,138,113,145, 46,236, 13, 85,251,214,193, 14,246,131,123, 39, 79,239,155, 91,183, -110,243,241, 11, 10, 39, 24,202,138,156, 63, 78, 78,155,191,104,217,136, 8,104, 35,237, 17, 91, 61,125,241,114, 96,231,144,183, -223, 92,241, 25,223,215, 47,192,129, 33,205, 84,217,221,172, 62, 27,214, 46,219, 39,226, 21,174,187,174,196, 54,123,219,114,184, - 23,102, 9, 36,226, 73, 50,169, 67, 55,131,161,230, 22,109, 37,127,230, 9, 5, 99, 63,249,116,125,239, 97,163, 98, 28,233,154, - 50, 30,201, 32,124,207,238, 93,157,190,220,184, 41,230,166,146,126, 2, 0,211,150, 50, 51, 44, 22,229,238,152, 25, 35, 20,240, -137,176,151,182,242, 1,170, 93, 66, 43,204, 27,207, 16, 44,108,134,151, 96, 9,252,150,165,194, 79,237, 57, 71,168, 55,190, 37, - 88, 4,131,192, 94,130,197,174, 76, 53, 84,220, 35,143, 3,135,127, 23,120, 60, 94, 10,195, 48,195, 31,178, 48,120,140,101,217, -223,185,171,251,191,141,182, 89,180, 8,172,202,184, 93,236, 6,218,138,136,224,160, 15,129,182, 9, 45, 41,159,191,253,114, 94, -185, 15, 40, 43,182,126, 52,119,183,133, 4, 40,210, 10,154, 34, 65, 83, 36, 40,202, 10,154, 36,193,146,102, 44,251, 46, 5,176, -212, 32, 42,178,251,118,128,246,181,247, 28, 66,150,247, 99,218,185,147,238,132, 69,139,159,190, 78,120,189, 88, 93,251,250,169, -235,138,138,112,111,227,146, 76, 21,190,111,139, 32, 72,249,102, 30, 18, 15, 28, 41,249,226, 91,125, 54,195,178,112,119,150,133, - 76,139,203, 8,216,113, 40,165,120,253,118, 83, 54, 0,184, 56,136, 67,166, 95,207, 11,124,144, 74,240,150, 74,215,111,222,244, -165,143,175,135,140,160, 46,172, 6, 69,211, 8,232, 20,203, 95,242,218, 52,223, 85,159,111,251, 28, 58,243, 11,173, 29, 31,226, -141,240,206, 93,194, 22,108, 63,114, 33, 80,175, 83, 89, 78,238,124,247, 54,204, 32,125,252,195,132, 31, 38,124,198, 95,250,206, -188,183, 44,116,201,165, 28, 21, 50,109, 61,107,194,188,113, 40, 97,245,167, 61, 71,140,139,115,100,106,213,124,147,190, 54,120, -235,119,219, 86,132,246,236, 39, 31, 28,217, 81,164,250,121, 54, 97,172,169,132,149, 39,149,140,136,136,118, 54, 62, 55,149,220, -250, 67,226,107,153, 42,108,104, 75,153,105,246, 63,109,143, 97,218, 31,117,157, 96, 49, 56,253,247,148, 89,180,226, 50, 88,154, - 4,104,107,195, 55,104, 18, 44,115,239,187,255,236,239, 0,180, 79,104,241, 88,140, 62,117,238,178,111,121,153,178,239,231,159, -126,188,132,189,124,249, 24,104,252,152, 85,137, 51,109, 21,152, 28, 56,112,248, 91, 91, 76, 40,150,101, 5, 15,153, 51,134,101, -217,163, 15, 72,243, 54,128,151,235,182,183, 1,248,228, 33,100,173, 35, 0,159,186,237, 50, 0, 37, 92, 11,120, 32, 52,117,126, -111,119, 28, 45, 41, 88, 6,216, 59, 1, 0,100,109,205, 5, 11, 72, 65,240, 1, 82,143,248,113,163,224,233,237, 3,144, 6,192, -106, 0, 72, 35, 64,234, 1,210,136, 10,101, 33, 96,213, 3,249,199, 64,177,172,164,205,197, 53,107,129,220,159, 49,178, 79, 32, -188, 92,164,152, 23, 31,238,185,229,120,238,182,109, 39,115,162, 51, 85,152, 98, 87, 94, 89, 22,253,123,116,195, 23,219,244,217, -191, 92, 85,143, 1,128,152, 94, 30,199,251,135,119, 10, 88,191,221,148,125,244, 70,213, 88, 0, 24, 27,225,124,172, 95,136,111, - 32,131,246, 91,125, 25,150, 29,236,215,185, 27, 65,167,111, 6,163, 43,129, 78,103, 68,201,221, 29,112,243,127,148, 71, 51, 24, -106,235,120, 25, 31,139,223, 88,186, 70,104,208,149, 91, 24,171,154,246,226, 87,241, 5, 98,134, 64,233, 25,115, 45, 83, 77,191, - 57,243,121,106,193,251, 31, 45, 6, 48,173, 53,158,112,111,188,182,110,221,250, 30, 3,163, 66,189,203,246,205, 35,106,171,202, - 65,241,229,146,248,199, 7,194,181,123, 56, 83,158,186,142, 16, 7, 69,195,213, 35, 8,165, 23,118,162,224,247,253,196,160, 62, - 19, 37,223,255, 36,122, 14,176, 54, 43,180,186,121, 98,208,152, 33,253,118, 7, 5,250,249,178, 44, 3,134, 97,193, 50, 52,106, - 77, 36,150,236,201, 7, 77,211,120,106,204,160,145, 14, 98,130,101, 24, 6, 44,203,160,184, 76, 99,248,245, 82,246,200,252, 42, - 92,178,199, 82,213,235,177,225,131,174,167,253, 30, 74,230,254,130,168,105, 9,217, 4,112,174, 81,155, 27,116,245,196,247,161, -192,119,237,215,114, 4,232,130,227,171, 17, 56,100, 38,127,243, 79,199,189,180,234,210,233,251,118,108,122,250,235,205,155, 19, -179, 85,152,205, 61, 95, 56,112,248,119,128,101,217,135, 46,182, 10, 11, 11, 21, 15, 34,182,252,253,253,135,148,150,150,174,173, -247, 86, 33, 8, 98,109,231,206,157,151,253,167,163,122, 95, 95, 79, 75,211,244,180,210,210,210,179,173,113,198,198,198,250, 29, - 57,114,164, 75, 35,206, 46, 0,186, 52,151,214,213,213,149, 30, 48, 96, 64,193,145, 35, 71, 20, 92, 11,105,151,224,106,179,208, -202, 46,250,121, 94, 31,179,178, 22, 0,178,237, 72,127,223,144,159,137,164, 87,255,176,226,249,213, 17,157,221, 81,163,183,224, -228,149, 2,208, 52, 9,154,162,234, 44, 91, 20,104,138,196,152, 94,158, 24, 96,154,141, 13, 73, 57,160,104, 38,161, 53,206,166, -176,178,204, 51,189,163, 39,239, 97, 24, 86, 44, 17,242,180,193, 1, 30,222, 11,158,234,197,155, 23, 31, 1,163,149,154,188, 51, -245,246,175, 89, 42,108,181,139,147,249,115,200, 35,182,185,125, 52,101,179,236,173, 88,163,250, 71, 15, 27,236,204,154,181, 32, - 43,242, 81, 99, 32,145,175, 33, 81,102,170,134,132, 80,218,197,201,176,232,217,209,223, 87,126,126,247, 59,119, 61,248, 58,129, - 55,159, 18,137,121, 20,104,134,229,179,213,153,102,247,208, 81,194,122,191,173,214,242, 41,147, 59, 61, 63,100,116,172, 75,209, -206,153,132, 44,120, 12,188,251, 4,224,238,217, 31,160,186,146, 4,141,162,128,112, 54, 85,163,131,199, 35, 24, 55,109, 10, 62, -153,210, 23, 53,186, 26,240,149,183, 93,196, 66,137, 43, 96,109,150,147,165, 49,109,221,154,143,124, 5,124,222,189,235, 89,255, -161, 73, 24,205,102,128,166, 32, 21, 48, 32,216,250,255, 72,208,164, 85,222,115,226, 59,115, 1,250,146,173,178,103,169,240, 83, -184, 23, 6,131, 33, 67, 89,210, 8, 2, 56,151,169,254,143,248, 9,243,198, 51,143,142,121,113, 48, 75,224,183,246,212, 81,164, - 7,226,162,186, 56, 58, 56,232,178, 81,178,247,117,220,134,148,237, 48,240,101, 60,243,210,107,242, 45, 91,182,140, 7,216, 57, -184,223, 71,237,175, 88,100,149,227,228, 56,255,145,156,206,206,206, 93, 59,119,238,188,140, 36,201, 33, 34,145,168,131,213,106, - 5,195, 48,101, 98,177,248,183,130,130,130,149, 58,157,238,206,223,173,236,215,175, 95,111,139,216,178,201, 41, 20, 10,145,147, -147,115,171, 13, 98,235, 84,147,227,127, 60,119,238, 28,246,236,217, 3, 0,200,205,205, 69,247,238,221, 29,154, 59,240,238,221, -187, 14,195,134, 13,251, 17, 64, 64,107,156, 55,110,220,232,250,203, 47,191, 96,239,222,189, 0,128,156,156, 28, 4, 7, 7, 55, -155,153,115,231,206,241,159,125,246,217,174, 0, 20,255,133, 58,250, 55,136,172,198,223,255, 17, 90, 73, 73, 73,108, 92, 92, 28, -209,116,187, 25,228, 7,186,137,251,192, 68, 3, 64,126, 91,115,144, 85,142, 53, 95,236, 56, 49,246,244,222,141, 67,164, 34, 30, -150,111, 93, 80,172,174,172,121, 76, 64,220, 27,126,161, 88,240,220, 28,197, 23, 19,166,247, 10,172,170, 53,225,240, 31,165,103, - 51, 85,109, 51,145,102, 42,145, 12, 48,174,247,126,209, 48, 25, 85,193,211, 63, 73,222,181,107,241,216,158,111,198,247,196,161, - 11, 5,111, 2,148,205,168,239, 44,195,128,101,168, 6,231,247,186,174, 3,192,220,191, 40, 48, 3,246,222, 62,166,109, 22,173, -161,128,160,202, 27,227,156,228,226,175,102,205,122,197,153, 84,231,161,210, 34, 66,113,149, 9,101, 70, 33,106, 5,222, 40,205, -190, 65,243, 8, 36,219, 52,185, 16,208,177,148,201,213, 77,236,200,139, 28, 53,215, 95,119,252,221, 42, 49, 65,241,157,159, 92, -229, 90,113,250,179, 2, 74,175,214, 19, 4,108,134,159,119,113,113,237,110,210, 20,240,181, 85, 21,112,245,137,192,216,201,113, -248, 32, 54, 28, 53, 58, 61,212,149, 23,217,110,190,206, 68,225,111,137, 88, 58, 46, 12,154,114, 37,204, 36, 64,232,205,149, 38, -139,169,182,197,235,200,195,230,249, 11, 23, 61,211,201,215,203,161,126, 82, 1,203,208,232, 21, 22,132, 81, 67,250, 35,249,220, -121, 92,190,145, 11,166,110, 82, 1,203, 48, 40, 81, 85,149,155,172,244, 15,109,186,160, 52, 5,150, 52, 53, 43,196,208,142, 33, -195, 72,111,200,105,224,253,190, 93,157,102, 44,142,235,228,228, 32, 33, 96, 34,105,152, 44, 36,106,206,127, 5,143,206, 61, 32, -151, 74,137, 62, 48, 10,174, 2,220,186,133, 28, 56, 52,194,211, 79, 63, 45, 45, 47, 47, 79, 13, 8, 8, 8, 31, 53,106,148,124, -240,224,193,208,235,245, 56,121,242, 36,244,122,125,167,128,128,128, 78, 39, 79,158,156, 88, 84, 84,148,217,177, 99,199, 97,123, -247,238,181,219,135,182, 78, 0,241, 27, 30,193, 0, 69, 16, 4,234,246, 17,117,251,218,189,206,173, 88, 44, 70, 97, 97,225, 67, -183,108,149,150,150,222,106,143,101,171,182,182, 86,228,239,239, 15, 47, 47, 47,208, 52, 13,189, 94,143,131, 7, 15, 66,171,213, -130, 97, 24,200,100, 50,172, 90,183, 21,217, 87, 83,113,233,210, 37,104,181, 90,145, 45,206,146,146, 18,162, 87,175, 94, 48,155, -205,160, 40, 10, 38,147, 9,167, 78,157,106,248, 45, 16, 8,176,232,195,207,145,123, 37, 21,233,233,233, 40, 41, 41,249,175,172, - 54,210, 6, 45,242,119, 68,139, 49,179,254,235,179, 14,105,154, 90,178,101,251,174,139, 75,102, 79,193,107, 83,163, 3, 86,110, -220, 31,157, 85,129,237, 0, 16,230,137,233,207, 13,239, 22,232, 42, 23,226,131,157, 87, 0,150, 93,242,160,231,203,168, 68,110, -120, 7,230,205, 3,151, 10, 83,223,157,210, 7, 65,190,206,221,171,196,149,226,252,124, 59,214, 20,100, 40,184, 57, 74, 66, 98, -122,121, 28, 7,195,192,213, 73, 18, 10,154,130,171,163, 36,100,108,132,243, 49, 0,112,150, 11, 67,155,179,124,181,132,168, 0, -225, 76,185, 68, 48,211,193,201, 53,240,133,241,163,100, 49,227, 39,202, 28,133, 20, 52,151, 78, 66, 39,236, 8,210,189, 19,204, -100, 37, 74,238,220,166, 79,255,158, 85, 90, 81, 99, 94, 96, 51,155, 44,206,150,222,201,241,234,218,115,148, 91, 69,210, 82, 85, -215, 23,119,118,225,129,225,213, 36, 62, 89,238,224,221, 79,246, 71,254,157, 90,134,109,214,162,115, 31,116, 90,109, 1, 73,195, -215, 72, 11,156,110,167,124,143,197,227,122,160,170, 82, 5,147,149,130,214, 72, 89,125, 92,165, 18,243,157,155, 48, 91, 41, 88, - 72, 6, 66, 87,127,156,188,120,163,130, 33,201, 99, 45,113,230,107,144,158,127, 48,221,177,241,190, 32, 79,244,122,199, 89,150, - 14,210,136,194, 18, 5,182, 31,185,216, 39, 95,131,244, 7,169,103,150,161,238, 13, 63, 55,178,100, 17, 44, 6,183,199, 9, 62, -212, 27,253, 68, 82,209,151,107,223,124, 54,252,241, 96,119, 9, 83,114, 17, 4, 99,133, 3, 45,128, 81, 76,195, 37, 32, 8,140, -165,134, 53,152, 76,213, 25, 0, 23,233,157, 3,135, 70, 8, 9, 9,241, 41, 45, 45,205, 88,184,112,161,251,147, 79, 62,137, 3, - 7, 14, 64,167,211,225,135, 31,126,192,250,245,235,177, 98,197, 10,144, 36,137, 45, 91,182,200,247,237,219,215,111,211,166, 77, - 37,129,129,129, 17, 69, 69, 69,101, 54, 4, 22, 1, 64, 2, 64, 88,247,238, 34, 0, 48, 71,143, 30, 69, 76, 76, 12,142, 30, 61, -202,212,237,163,113,175,243,211,174,245, 68,197, 98, 49,196, 98, 49,180, 90,237, 67, 17, 91, 66,161, 16,142,142,142, 16,139,197, -168,169,169,105,179,216,162, 40,138, 95, 82, 82, 2,173, 86,139, 81,227,199,227,243,132, 4, 12, 31, 62, 28,163, 70,141, 2,203, -178, 56,117,234, 20,162, 7, 70, 98,202, 19,195,144,149,149, 5,138,162,236,202,111, 89, 89, 25,202,203,203, 49,118,252,120,108, -221,180, 9,253,251,247, 71, 72, 72, 8, 40,138, 66,106,106, 42,158, 30, 51, 16,210, 9,209,200,205,205,229, 26,181,253,214,172, -135,226,163,245,192,200, 80,227,119,230,208,153,164,169, 99,250,197,141, 31, 20,142,173,187, 79,127, 4, 47,221, 46, 0,240, 48, - 75, 86, 61, 63, 60, 8,153, 69, 85, 56,157,174, 72,202,170,192, 67,153,173,193,208,240,244,112,150, 3,124, 49,140, 86,134,114, -206,183,237,192,204,176, 44,228, 67,222,193,115,227, 51, 3,250,135, 7, 4,212,207, 58,116,140,249, 12,211,111,220, 10,236, 27, -226, 19, 8,154, 4,104, 18,206, 83,118, 2, 31, 58,216,204,199,192, 46,226,228,249,243,230, 13, 24, 55, 97,178, 76, 44,119, 1, -173, 43, 6, 89,118, 3,154,188,179,208,203,187,163,172, 48, 31,123, 78, 92,210,230,149,104,116, 60, 30, 78,150,107,205,111,231, - 87,161,214, 22,175,137, 68,194,178,165, 11, 98,247,236,218,237, 36, 9, 26, 68,220,254, 42, 70, 43, 22, 80, 18,175, 46,143,242, - 12, 82, 79,246,227, 31,118, 59,235, 45, 88,109,139,199,160,215,237, 63,117,242,248,148,110, 93, 7, 57,221,189,124, 4, 70,147, - 25,102, 18,136,232, 55, 12, 52,205,138, 9, 30,193, 56,243,249,132, 74, 83, 5,130,164,203,127,187,118, 87,121,238, 90, 62,223, -236,132,213,173, 70, 23,105,170,238, 9,254, 27,227,135,245, 6, 72, 35,158, 24,210, 3,159, 39,158,126, 29,160, 95,124,176, 74, -190,103,209, 98,129, 65,225, 94,248,134,101, 49,232,202,193,245,161, 81, 19,230,163, 45, 22,173, 8, 79,140, 11,235,234,247,253, -231,171,222,113,247,232,216,157, 79, 48, 36, 88,159,158,128,174,132, 37, 74, 46,194,197,191, 63,104,191,129,216,178,225,211, 90, -134, 97,119, 1,224,166,100,115,224,208,248,121,100, 50,237, 95,179,102,141,123, 92, 92, 92,189, 69, 6, 23, 47, 94,196,182,109, -219,224,224,112,255,115, 50, 38, 38, 6, 44,203,186, 47, 95,190,124, 63,128,199, 91,226, 28, 48, 96,192,248,244,244,116, 69,239, -222,189,243,235,196,150, 8, 0,239,230,205,155,188,226,226, 98,194,205,205,141,245,243,243, 35, 21, 10, 5, 3,128,126,233,165, -151,248, 63,255,252,115, 55,189, 94,127,166,189, 66, 75, 44, 22, 63, 20,159, 45,161, 80, 8,130, 32, 32, 22,139, 33, 18,137,192, -178,108,155,196, 22, 77,211,130,163, 71,143,226,202,149, 43, 88,209,187, 55,222,244,247,135,187,187, 59, 82, 83, 83,193,178, 44, - 28, 28, 28, 80, 89, 89,137, 93,187,118, 97,196,136, 17,160, 40, 74,100, 15,239,222,189,123,145,150,150,134, 15,163,162,240,166, -139, 11, 28, 29, 29,113,234,212,189,209, 64,137, 68,130,194,194, 66,156, 58,117, 10,195,134, 13,227, 26,245, 3,194,238,198, 51, - 20, 16, 84, 18,240,177, 90,140, 96, 41, 22, 32,224, 23, 22, 6, 81, 86,214,253,206, 57,246,128,199,195,210, 13,219,147, 98, 63, -155, 63,158,152, 25,223,199,111,229,247, 41,115, 0, 96,198, 83,193,254,114,137, 0, 95, 28,202,100,121, 60, 44,125, 24, 5, 12, - 11,131,136,208, 96,206,168,254, 33, 80, 84, 91,112, 91, 81,253,107,150,157, 67, 61,167, 63,123, 14, 59, 14,167, 22,175,223, 97, -202,102, 89, 22,174,142,146,144,233,215,111, 7,126,127, 52,173,104,221, 30, 83, 54,203,176,112,149, 11, 67, 95,204, 26,104,115, -214, 97, 84,128,112,230, 91, 11, 22, 12,140,127,113,161,148,202,254, 25,150,219, 39,192, 88,141,208, 89, 69,168,230,251,160,164, -168, 8, 31,111, 73, 42,214,233, 45, 83, 50,212,109, 19,152,121, 26,212, 10, 8,221,147, 31,127,240,110,114,194,170,229,142,198, -252,212, 90, 62, 65, 25,249,157,135, 10, 86,173,248,140,168, 49, 91, 38,231, 87,161,198, 22,143,217, 9,171,215,172,219, 16,251, -202,180,137,217,193,221,135,122,208,138, 59, 30, 38,157, 78,181,243,120,154, 79, 93, 79,145, 0,128,219, 37, 26,168,181,122,138, -166,200, 51, 78, 66,172,204,180,199, 58, 88,135,174,222,240,138, 27, 20,241,172,151,147, 8,198,218,106,120, 59, 9, 49,166,255, - 35,207,146,127,228,190,115, 71,213, 22,185,214, 84,104,145, 96, 73, 35,126, 95, 61, 34,148,165,201, 80,208, 36,172,215,127,108, -187,101,140,192,155,175, 13,113,116,118,179,220,229, 65,239, 0,200, 60, 65, 56,119, 2, 92,186, 16,194,176,201, 80,228,103, 80, -175, 63, 59, 77,115,167,160,228, 91, 79,217, 67,153,249,195,129,195,191, 10,133,133,133,207, 47, 89,178,228, 92,255,254,253, 59, -120,122,122,162, 71,143, 30, 4, 75, 75,198, 0, 0, 32, 0, 73, 68, 65, 84, 56,124,248, 48, 22, 46, 92,216,144,166,119,239,222, - 96, 89, 22,149,149,149, 88,179,102, 77,153, 66,161,120,190,213, 14,122, 70, 70,246,142, 29, 59,134,132,135,135, 91, 69, 34, 81, - 53, 0, 73,117,117,181,180,178,178,146, 48,153, 76, 96, 24,134,113,113,113,161, 21, 10, 5, 57,101,202, 20,243,133, 11, 23, 30, -209,235,245,133, 15, 98,209, 10, 8, 8,184,169,209,104,180, 4, 65, 60,112,232,135,122,145,229,233,233,233, 85, 91, 91,203, 0, -168,106, 79,232, 7,138,162, 16, 21, 21,133, 19,103,175,226,232,233, 11,208, 41,114, 48,231,149,231,209,163, 71, 15,156, 56,113, -162,221,117,214,171, 87, 47, 28, 63,117, 14,231,174, 92, 67, 97,238,117,188, 62,231, 21, 68, 68, 68,224,248,241,227, 92,131,182, - 31, 71,112,191,111,214,145,166, 66,107, 88, 82, 82, 82,125,207,252, 79,242, 53,212, 19,189,132,174,226, 31,151,143,123, 36, 76, - 56,106, 57, 8,161, 12, 63,119, 63, 62,112,233,199, 95,101,243,189, 11,167,221, 84,217,158, 29,118,223, 77,163, 66, 6,123, 41, -251,167,107, 89,161,207, 62,209, 63, 0, 91, 15,203,223, 7,128,201,131,187,226,143, 60, 53, 46,229,170,126,202, 84, 35,227, 65, - 75, 29,233, 13, 57, 93,129,159,214,188, 17, 63,172, 83, 71, 31,108, 59,112, 14, 4,129,253,118,189,112, 89,150,237, 31,222, 9, -235,119, 52,157, 97,232, 19,184,110,143, 41,251,100, 70,205, 56, 0, 24, 21, 42, 63,214,247, 17,183, 64,182,177,227, 86, 51,144, -137, 5,179,198, 77,124, 78, 74,229, 30, 6, 10, 78,129,160,204, 48, 90, 25, 40, 43,106, 96,112, 9, 64,234,197,107, 70,173,201, - 50, 63, 83,221, 62, 43, 94, 86, 5,242, 69,151,175, 21,213,234,141,190,114,175, 71, 76,124, 30,195,212,154, 89,252,145, 89,160, -203, 44, 67,142, 61, 28,249,249,176, 60,230, 79, 13,254,102,251,158,101, 66,145,120, 50,159, 0,225,237,234,224,245,205,103, 31, -194,201,201, 17,140,165, 22,208,171,241,228,171, 31,171,111, 42,200,174, 0,208,221, 3,142,131,187, 10,183, 11,120, 68, 73,202, -109,235,123,182,206, 65,144,152, 61,109, 76,111, 33, 99,209,227,141, 53,187,177,249,157,120, 60, 55, 50, 76,120,228,124,238,108, - 0, 43,219, 91,215, 44, 77,129, 37,141,120,252,221,179,217, 4,112,142, 5, 6, 93,217,179, 42, 20,184,106, 55, 71, 31, 64, 72, - 11,136,176,158,129, 14, 34,166,228, 60,152,146,243, 44, 63, 96, 32,136,192, 33, 4,225, 19,197,126,185,118,133,126,235,214,109, - 39, 25, 30, 62,176, 35, 84, 6, 7, 14,255,171,200, 87, 40, 20, 99, 99, 98, 98, 78,159, 56,113,194, 61, 50, 50, 18, 0,112,229, -202,149,123,157,206,168, 40, 4, 7, 7,163,188,188, 28, 83,167, 78,173, 80, 42,149, 99, 97,195,231,183,166,166,230,206,222,189, -123, 59,232,245,250,222,239,189,247,158,170, 83,167, 78, 58,147,201, 68, 84, 87, 87, 51, 20, 69,193,205,205, 77,220,187,119,111, - 12, 24, 48,160,246,226,197,139,157,139,139,139,107, 0, 20,180, 39,243,241,241,241, 56,123,246,222,164,189,135, 17, 87, 75, 36, - 18, 33, 50, 50,210, 63, 63, 63,191,180,238,221,210,230,103,124,227,215,203,181,107,215,112,230,106, 9, 4, 22, 35,196,106, 5, -126, 63,176, 23,227,103,205, 5, 69,181,223,139,225,255,216, 59,239,240, 40,170, 54,138,159, 41,219,178,233,101,211, 11, 33,144, - 64, 32,244, 78, 16,144,166, 18, 62,138, 84, 65,154, 64, 64, 20, 16,165, 35, 69,165, 35, 69, 58,168,244,142,148,160, 2, 81,122, - 9,157,132, 36, 4, 2,132,180, 77,239,217, 62,229,251, 35,197, 4, 82,118, 19,108, 56,191,231,153,103,182,204,158,157,153,187, - 59,247,204,123,239,125,239,253,251,247,113, 60,244, 6,204,165, 52, 30, 61,122,136, 35, 71,142, 96,226,196,137,181,210,172, 33, - 85,122,145,127, 56, 74, 84,210, 79,139, 6,128,160,160,160,139, 37,209,138,178,248,248, 64, 34, 45,192,130, 30, 45,220,102, 12, - 14,172, 71, 25,242,146,193,177, 28, 40, 17,224,232, 96,133, 61,123,246,215,221,127,240,224,245, 77, 27, 55,173,231, 24,102,110, - 68, 26, 84, 38,236,212,130,111, 15, 94, 25,188,103,122, 23,122,226,187, 13,237, 0, 64, 76,147, 88,119,242, 33, 3, 96, 65,109, -142,182,157, 27,100, 5, 6,140,119,180,183,158, 63,251,163,222,118, 93, 90,249,225, 98, 88, 4,214, 31,185,126, 73,146,134,221, - 70,255,184, 57, 3, 94,246, 79, 21,141, 58, 4, 87,125,191, 75,150,229,157,197,230,182,208,199,157, 7,244, 26,104,180,122, 36, -100,178, 72,200,210,128,150,139,113, 59, 38, 81,109,159,130,144, 90, 28, 54, 97, 46,151,185,126,249,205,106,119,141,186,128,201, -203,206, 96,196,146, 27, 34,185,153, 84,105, 74, 87,133, 27, 73,208,188,229, 45,106, 9,112,148, 68,198,171,230,124, 54,202, 60, - 41,242, 12,234,147,201, 32,120, 30,102,254,189, 97,105, 70,137, 3,235,136,226, 1,192,220, 92, 46, 89,190,232,115,235,169, 51, - 23, 85,219, 7,204, 31, 16,251,249, 56, 79, 13,240,178,197,165, 59,209,184, 20,254,226,225,165,219,143, 26,119,109,226, 10, 63, -119,155, 41,146,236,156,101, 81, 48, 61, 66, 90, 84, 48, 12, 96,208,148,142, 58,244,119,196,176,214,131,231, 85, 54,218,176, 66, -188, 1, 46,134,229, 65, 80, 20, 64,144, 69, 35, 32, 19,174,130,182,241,225,247, 31, 58,174,218,177, 99,247, 87, 81, 25, 66, 20, - 75, 64,160, 58,114,115,115, 31, 68, 69, 69,245,106,218,180,233,206, 79, 63,253,212,114,248,240,225,174,227,198,141, 35, 1, 32, - 53, 53,149, 91,187,118,109,242,119,223,125,151,155,145,145, 49,218, 96, 48,132, 27,243, 15, 87, 42,149,215,190,255,254,251,244, -203,151, 47, 55,110,211,166,141,180,101,203,150,156,173,173, 45, 45,149, 74, 89,157, 78,167,137,137,137, 97,159, 62,125,234,146, -147,147,243, 4, 64, 44,106,208,172, 95, 28,189, 90, 76, 81,212,151, 60,207, 7,188,142, 62, 90,114,185,220, 21,192, 19,130, 32, -234,155,218,108,248, 74,133, 77,211,200,206,206,134, 42,229, 33,100,137,143,209,212,156, 68, 35, 91, 11, 88, 89, 89,213,202, 20, -229,230,230, 2,133, 73,184,114,229, 62,192, 48,176,182,182,134,181,181,245, 95,110,180, 42,243, 34,255, 18,198, 87,240, 90,213, -125,180, 26, 41, 48,209, 76,135,181, 19,122,215, 19,123,123,186, 67,155,120, 27,247, 19, 10, 48,183, 93,155, 72, 74,106,169,153, -240, 97,223, 86, 3, 6,214, 65,151, 14,173, 9,111, 23,235, 41,203,190,221,252,113, 35,100,124, 30,153,134,117,198,236, 81,100, - 58,158,113, 72,219,113,254, 65, 98,176,187, 92, 13,142,227,113, 62, 92,137,240,184,236, 29,209,233,120,102,202,209, 53,114, 65, -119, 26,228, 65,158,231,101,214,230,230,249,141,252,220, 29,186,183,111, 70,190,211,185, 21,196, 20,112,229,230,125, 76,251,246, -216, 13,142,227,123, 27, 61, 66,140,227, 94, 49, 80, 69, 35, 12, 13,229, 70, 24,242, 60,207, 23,141, 58,172,186,219, 23, 69, 17, - 41,170, 23,183,156, 69,246,190, 80,199,158, 71, 92, 54,135, 23,105,249,200,163,157,161, 77, 74, 2,120, 46,254, 98, 45, 58, 86, - 59, 56, 56, 56,214,109,228, 87,111,195,174, 35,208,171,114,241,236,194, 78, 20,100, 43,241,245,150,147,245,220,220,236, 59, 39, - 37, 37, 93, 52,225, 98,227,247, 91,200,126, 71,240, 0, 37,146,226,244,166, 67,200,176, 55,131,131, 92, 12, 78,157,142, 9, 83, -135, 91,191,219, 99,184, 53, 0,188,120,116, 15, 94,114,181, 81,186,122,123, 12, 24,220,181,129, 13, 12,106,236,250,245,158,134, - 4,222,217,125,246, 97,108,215,134, 54,178,193,129, 94,182,139,147,115,222, 71,102,205,146,138,150, 68,180, 74, 35,124, 53, 24, -109,120, 4, 96, 27,114,136, 61,120, 45,205,124, 96,143,150,114, 49, 77, 16,124, 65, 18,120, 51, 7,108,222,117,184, 64, 98,248, -107,102, 98, 23, 16,120, 19, 80,171,213,119,212,106,117,147, 47,190,248, 98,216,156, 57,115,222, 50, 55, 55,175, 11, 0,133,133, -133,207, 12, 6,195,165,226,255,167, 41,163, 3,121, 0, 79, 98, 99, 99,159,197,198,198, 58,237,221,187,215, 6,128,172,248, 61, - 13,128, 28, 0,169,168,197,136,195, 18, 83, 69, 16,196,151,175,235, 60,148,152, 42,130, 32,234,215,228,243, 36, 73,178, 4, 65, -128, 32, 8, 72,165, 82, 92,190,124, 25,131,122,247, 64,212,233, 28, 4,216, 88,160,205,232, 9, 56,120,238, 28, 40,138, 2, 65, - 16,160, 40,202,164,122,132,166,105, 92,185,114, 5, 35,134, 14,132,148, 6,172,173,173,241,197, 23, 95,224,196,137, 19,160,105, - 97,150, 62, 19,216, 86,198,112, 25,153, 71,139,192,226,115, 59,151,136,193, 26,112,106,231, 42,132, 68, 20,232, 30,165, 99,110, -131,116,172, 61,130,124, 46,253,219,221,193,231,174, 68,172, 28, 51, 36, 72,254,118,215, 30,120,187, 75, 87,186,113,235,206,243, -129,114, 70,171, 59,170,200,181,193,114,248,106,219,175,209, 19, 14, 94,136, 33,160,207,199,144,158,173,121,150,195, 87,213, 28, -204, 43,154,214,102, 22, 7,175, 92,191,110, 11,125, 1,226,238,253, 46,171, 83,183, 30,192,234,241,228,201, 99,124,183,235, 39, -238,194,205, 71,123,116, 12, 62,125,154,141, 66, 99, 53,139,156, 21, 3,107,115, 73,131,119, 26, 91,253,194,129,135,141, 92,220, -144,231, 88,216,200, 69, 13,123, 52,148,255,194,243, 60,111,105, 38,106,200,179,134,106, 53,213, 58,102,235,174, 31,118,172, 30, - 59,118,172,121, 70, 98, 10,146,243, 34, 80, 32,113,131, 65,238,129,216,123,151,212, 42, 45, 99, 76, 37, 94,233,249,204,200,200, - 72,187, 19,150,133,131, 91,150,194,160,211, 34, 45,177,200,171, 38,103,228,193,202,193,237,122, 82, 82,146,209,154,122,134,203, - 29, 48,124,188,216,204, 18,102, 35, 6, 4, 73, 98, 51,181,104,225,106, 89,116,209, 40, 72, 71, 84,232, 21,116, 41,238, 99,250, - 52,129,132, 87, 51, 87,163,246,211, 82, 38,254,244,221,150,110,120, 22,175,196,229,135, 73,187,158,101, 33,153,141, 86,238,138, - 77,206, 9,238,219,206, 19,107, 78, 68,126, 2, 24,246,155,114,236,254,142, 24,198,243, 8, 44,234, 12,175, 6, 15, 4,250, 59, - 98,152,145, 35, 13, 95,209,164,197,248, 96,245, 47, 47,230, 29,190,149,209,119,198, 7,157,172, 58,116,120, 79, 2, 70,135,124, -181,214, 16,149,131,188,218,148, 81, 45, 16, 52, 5,205,127,171, 38, 11, 96,143,193, 96,216,147,147,147,243, 58, 53,147,241,106, - 94,167, 90, 29,123,217,102, 66,158,231,233,226,104, 86,117,157,225,171,212, 44,219, 76,200,243,252,207,197,209,172,234,162, 90, -229, 52, 57,142, 75,110,213,170,149, 93,159, 62,125,192,178, 44, 30, 63,126,140, 23, 9, 9,232, 30,252, 9,108,108,108,112,233, -193, 3, 60,122,244, 8, 95,126,249, 37, 12, 6, 3,142, 31, 63,158, 88,157, 38, 77,211,250,122,245,234,137,251,245,235, 7,134, - 97,240,244,233, 83, 36, 37, 37, 97,218,180,105,176,182,182,198,157, 59,119, 74, 53, 51, 50, 50, 64,211,180,190,130,232,214,159, -241, 91,250,183,243,138,201,170,218,104, 1, 44, 88, 3,114,207, 45,192,186,203,208,235, 13,104, 24,153,142,231,145,127, 68,164, - 54, 83, 97, 15, 78, 61,136,136,126,118,231,234,219, 18,164,133,195,212, 59,137,199,153, 80, 90,202,242,243,161,207,183,194,211, - 95,240, 60, 53,191,224,113, 38,148, 38,223, 49,112, 44, 1,189, 10, 80,222,198,181, 75, 23,113,225,198,125,220, 10,143,102,175, -221,137, 57, 72,114,248, 42, 42, 19,143,107,112, 23, 2,139,222,107, 48, 42,252,137,103,107, 63, 39, 79,176, 12,120,206, 0,235, - 33,251, 49, 58,178,131,103,107, 31, 27,207,162, 72,150, 1,182, 31,253, 14,172,150, 85,169,119, 59,193,176, 77,114,226,204,251, -249, 57,153,237,186,117,110,111,110,237,255, 46, 50,158,196,224,241,253, 43,234, 59, 17,177,215,110, 39, 24,106, 21, 45,113,115, -115,123,171, 91,231, 6, 24, 50, 97, 54,244,170, 92, 60,189,240, 3, 10,178, 82,112,249,186, 5,162,243,242,218, 3, 48, 58,162, -117, 61,158,105,140,248,108,116,172, 35,138,183,132,214,249,195,160, 62,144, 18, 26,112,218, 60, 16,170, 12,196, 38,233,114,223, -223,146,192, 2,128, 92, 74,208,230,124,174,149, 81,145, 71, 47,123, 95, 57,101,192,238,115, 15,193,113, 69,211, 55,113, 28, 54, -239,254, 61, 54,248,171, 17, 45,208,200,211,182,217,189,164, 52, 2, 38,132,252, 9, 30,157,110, 29, 92,212, 80,243,219,124,128, -211,227,202, 20,187,134,157,214,101,117, 66, 13,167,219,137, 72, 70, 18,128, 96,208,170,173, 83,214,253, 58,191,213,185,200,192, -233, 31,245,181, 2, 47, 76,192, 46, 32, 32,240,215, 83, 80, 80, 48, 97,244,232,209, 91, 69, 34,145, 2, 0,193,113, 28, 56,142, -163, 87,174, 92, 41, 98, 89,150, 36, 73,146,165, 40,138,249,249,231,159, 13, 44,203,166,107, 52,154, 9,213,105, 50, 12, 19, 59, -105,210,164,122,213,141, 80, 60,112,224, 64,137,201,138, 21, 74,194, 40,147, 85,118, 93, 26,229,170,188,242,224,177,168,227,136, - 5, 11, 0, 16,224,177, 48, 50, 29,207, 95,222, 36, 60, 11,201,141, 40,253,180,198,173, 59, 47, 40,249,140,169,123,166, 97,217, -129,173,155,248, 29, 0, 0, 45,207,142,168,201,209,229,105,213,131,155,183,110,127,144,227,121,154,225,249, 29, 36,135,163, 26, - 6, 81,198,140,180,171,140,228,180,156, 59,239, 6, 88,243, 64, 81,147, 97,105,115, 97,113, 26, 7,158,231,249,210,230,194, 85, - 50,100,228,106,171,205, 3,117,245,185,174,135,142,185, 53,254,236,213,123, 19, 88,150,119,166, 40, 34, 69,173, 99,182,214,214, -100, 1, 64, 82, 82,210,197,208,115, 73,103, 31, 52,115,234,233, 32, 47,142,114,169,128, 12, 21,206, 38,165, 23, 92,172,137,102, -118,161,161,239,156,181, 39, 78, 74, 68, 20, 13,158, 47, 74, 40,202,243,208,232,217,172,235,241, 76, 99, 0,104, 98, 7,215, 47, -142, 51, 7, 40,138,120, 81,157, 94,216, 35,229,154, 33,203, 66, 63,127, 24,151,189, 35, 46, 7, 17, 0, 16,151,131,136, 67, 87, -158,207,143, 77,201,255, 60,226, 69,246, 42,152,216,175,130, 39,112,185,245,144, 5,175,188, 86,219,243, 25,173,196,125, 0,253, -129,196, 30, 67,166,127, 55,157, 32, 32, 76, 63, 33, 32,240, 31,162, 36,170, 69,146,228,226,215,168,249, 51, 65, 16,239, 1,120, - 98,194,199,194, 10, 10, 10,154,188,230,195,203,100, 24, 38,211,152, 13,255,134, 14,241,255, 86,254,182,174, 37,221, 5,205,191, - 94,179,126,253,250,188, 9,134, 69, 56,159,130,166,160, 41,104,254,167, 52,121,158,167,106,179, 84,162, 73,212,102, 17,202,232, - 95,207,248,202,158, 11,205, 33,111, 32, 79,158, 60, 33,132,179, 32, 32, 32, 32, 80, 49, 4, 65,176,127,130,166,144,188, 88,160, -196, 96,149,139,110,145,194, 57, 17, 16, 16, 16, 16, 16, 16, 16,120, 45, 38,171,236,186,200,132,163,242,240,159, 41,163, 9,106, - 18, 66, 12, 21, 52, 5, 77, 65, 83,208, 20, 52, 5, 77, 65,243, 63,167, 89,157,182, 48,154,241, 79, 54, 96,130,166,160, 41,104, - 10,154,130,166,160, 41,104,254,247, 52,255,205, 84,218, 71, 75,104, 58, 20, 16, 16, 16, 16, 16, 16, 16,248,147, 16, 58,195, 11, - 8, 8, 8, 8, 8, 8, 8,212,142,106, 39,149, 22, 16, 16, 16, 16, 16, 16, 16, 16,168, 25, 85, 79, 42, 45, 32, 32, 32, 32, 32, - 32, 32, 32, 80, 99, 76,159, 84, 90, 64, 64, 64, 64, 64, 64, 64, 64,192, 40,182, 9,167, 64, 64, 64, 64, 64, 64, 64, 64,224,175, -161,252,168,195,144,144, 16,190,236, 90, 64, 64, 64, 64, 64, 64, 64,224,175,228, 77,245, 34, 66,211,161,128,128,128,128,128,128, -128, 64,237, 24, 47, 24, 45, 1, 1, 1, 1, 1, 1, 1,129, 63,135, 74,251,104,149, 36, 44,237, 82, 28,170,235, 34,156, 43, 1, - 1, 1, 1, 1, 1,129,191,129, 55,219,139, 8,253,179, 4, 4, 4, 4, 4, 4, 4, 4, 47, 34, 32, 32, 32, 32, 32, 32, 32, 32, -240, 79, 66,152,235, 80, 64, 64, 64, 64, 64, 64, 64,224, 47, 54, 92,127,186,209, 18,102, 54, 23, 52, 5, 77, 65, 83,208, 20, 52, - 5, 77, 65,243,191,100,178,202,153, 45, 97,212,161,128,128,128,128,128,128,128, 64,237,168,118,212,161,128,128,128,128,128,128, -128,128, 64,205, 24, 15, 32,168,248,113, 16,202, 68,181,132,136,150,128,128,128,128,128,128,128, 64,237,216, 6,192,165,216, 96, -157, 6,160, 20,140,150,128,128,128,128,128,128,128,192,235,161,108,191,172,222,101,204,151, 96,180, 4, 4, 4, 4, 4, 4, 4, - 4,106, 73,165,125,180, 8, 84, 62,114, 32,212,132, 47,168,201,232,131, 80, 65, 83,208, 20, 52, 5, 77, 65, 83,208, 20, 52,255, -115,154,213,105,135,226,223,199,120, 83,204,215,235, 68, 24,250, 42,104, 10,154,130,166,160, 41,104, 10,154,130,230,127,150,215, - 62,234,176, 5, 96, 38,156,214, 55, 18,167,226, 69, 64, 64, 64, 64, 64, 64,160,106,254,156, 81,135,254,192, 71,195, 3, 20, 91, - 12, 17,233, 86, 17,128,170,170,109, 21, 10,197, 86,185, 92, 62, 92,165, 82, 21, 18, 4,193,149,188,206,243, 60, 0,148,157,235, -232,105,122,122,122,167,234,190, 91, 34,145,172,117,114,114,250,168,160,160, 64, 69, 16, 4, 79, 16, 4, 8,130, 0,128, 87,214, - 44,203, 38,102,102,102,182,250, 87, 23, 33,207, 83, 14, 78, 78, 55, 69, 20,229,102,234, 71, 89,142,123,158,150,154,218,222,132, -143, 44, 37, 8,204, 40,250, 90,172, 0, 48,251, 77,251, 71,240, 0,101,204,118, 1,128,101, 12, 48,132, 37,201, 79, 68,192, 70, - 45,199,109, 1, 0, 2, 96,107,250,221,218, 48,212, 35,120, 52, 35, 8, 88,243, 60,114,121, 2,247,165,109, 17,251, 55,157,138, - 1, 34,145,168,175,149,149,149, 69,102,102,230, 69, 0, 7, 0, 12,181,183,183,239,156,151,151, 87, 96, 48, 24, 78, 0, 56, 86, - 19,225, 78,205, 48, 83, 34, 22,141,209,232, 13,203,175,222,199, 15,157, 91,192,158,225,176, 76, 38,166, 59,105,117,204,138, 43, - 15,176,195, 68, 73,162,120, 41,185,102,152, 60, 71,218, 97, 35,203, 29, 0,142,219,218,250, 73, 21, 86,191,137, 36,212,243,156, -212,130,225, 3,211,210, 18, 6,213,162,220,255,137, 56, 56, 56,140, 34, 73,242, 27,158,231,193,178,236,220,172,172,172,157,175, - 73,122, 46, 0,155,226,199, 57, 0,190,169,165,222, 11, 0,158,197,143,227, 1,120, 9,245,122,141,217,252,211, 79, 63, 5,119, -237,218, 21,107,214,172,193,230,205,155,227,210,211,211,151, 1,216, 5, 64,247, 55,232, 8, 84, 70, 35,224,189,149,189,218,178, -134, 31,191,226,202,188,220,189,146, 63,243,247, 31,126,248,161,158,231,121,254,209,163, 71,188, 78,167,227, 13, 6, 3,207, 48, - 12,207, 48, 12,111, 48, 24, 74, 23, 55, 55,183,164,151, 62,254,138, 38, 73,146,235,222,127,255,253,124,158,231,249,219,183,111, -243,106,181,154,215,106,181,188, 78,167,227, 53, 26, 13,175, 86,171,203, 45, 78, 78, 78,169, 85,105, 90, 89, 89,221,182,181,181, - 77,181,181,181, 77,181,179,179, 75,181,179,179, 75,181,183,183, 47, 93, 28, 28, 28, 74, 23,133, 66,145,170, 80, 40, 82,237,236, -236,110, 87,183,159,197,244, 2,112,209,136,165, 87, 5,159,237, 94,214,104,185,184,184,164,242, 53,192,221,221, 61,193,136,253, - 44,193,137, 32,192,150,124,150, 32,192, 73,165, 82,207,178,239,227,213, 72, 87,181, 33,101, 87, 87,215,247, 93, 92, 92, 66, 93, - 92, 92,206,185,186,186,190,111,196, 79,172,156,166,165,165,229,109, 7, 7,135, 84,103,103,231,180,146,197,197,197,165,220,226, -234,234, 90,186, 56, 57, 57,165,218,218,218, 86, 90, 70, 60, 64, 85,182, 92, 0,104, 41,240, 54, 77, 81, 33, 78, 78, 78,121,225, -225,225, 44,207,243, 60, 73,146, 73, 37,219,152,114,236, 47,155, 44,213, 21,204,205, 56, 47, 13, 43,120,190, 44, 55,227,188, 52, - 76,117, 5,115,181, 97,168, 87, 83, 77, 35,169, 72,115,228,200,145, 35,239,167,166,166, 38,229,228,228, 40,183,108,217, 18, 35, -147,201,174,108,217,178, 37, 38, 39, 39, 71,153,154,154,154, 52,114,228,200,251, 0, 38,153,160, 9, 0,104,223, 12,237,198, 14, -112, 81,221, 63, 62, 66,245,118,107,250, 94,199, 0, 4,245,104, 47, 78,218, 48,203, 95,117,105,123,160,170,107, 75, 50,194, 68, - 77,130,166,233, 14,158,158,158, 99, 20, 10,197,135,197,203,136,146,197,217,217,121,132,179,179,243, 8, 91, 91,219, 65, 85,105, - 30, 6, 40, 99, 22, 15,153,172,195,160,186,158,170, 23,139, 23,242,225, 83, 63,225,199,248,120,228, 13,116,116,172,243, 55,148, -209,159,170,233,232,232,152,108, 48, 24,120,189, 94,207,219,219,219, 39,191,198,253, 92,197,243,252, 42,158,231, 87, 1, 88,245, - 26, 52, 75,175,103, 38, 24,236,170, 52,101, 52, 73, 78,151, 75, 36,231,164, 52,157, 38,165,233, 52,185, 68,114,142, 38,201,207, - 1,200,254, 73,101,244, 39,104, 90, 40, 20,138,103,107,215,174,229, 85, 42, 21,175, 82,169,248,181,107,215,242, 10,133,226, 25, - 0, 11, 19, 52,107,170,243, 38, 69,176, 94, 94, 94, 95, 68,203, 31,104,245,118,179,250, 71,167,140, 26, 2,238,200, 90,162,154, - 59,166,239,219,183,106, 53,102,215,174, 93, 0,128,225,125,251,162,103,155, 54,176,180, 48,135, 68, 82,180, 59, 4, 79, 64, 44, - 18,163,223,180,207,140,249,250, 21,253,250,245,251,224,200,145, 35, 22, 0,176,121,243,102, 12, 24, 48, 0,118,118,118,144,203, -229, 16,139,197, 16,137, 68,229,214,213, 65, 81,148,123, 82, 82,146,163, 76, 38, 43,141,178,113, 28, 87,110,225,121,190, 36,250, - 6,134, 97,224,235,235,107,236,233,154,149,155,155,251, 86, 97, 97, 97,169, 70, 69, 75,221,186,117, 1,224,140, 49,130,223,124, -253, 21, 56,166, 16, 52, 13, 48, 12,160,213,147,224,248, 10,205, 13, 38, 77,154, 84,186,223, 53,161,119,239, 32,130, 32,136, 35, -119,238,220, 57,154,150,150,230,205,113,236,184, 26, 70,186, 62,126,252,248,177, 5, 0,248,249,249, 77, 2,112,212,148,253,160, -105,218,253,193,131, 7,142, 82,169,180,210,200,101,153, 8, 38,244,122, 61, 90,180,104,193,152,242, 29, 78,128,103, 22, 73,142, -107,222,178,229,248, 5,253,250,201,110,222,188, 41, 35, 73, 18, 12,195, 96,229,202,149, 12,207,243, 54,141, 0,171, 72, 32,175, - 10,153, 57, 0, 70, 21, 87, 6, 59, 0,172, 44,231, 22,120, 52, 83, 27,164, 65, 79, 11,250,181,105, 91,103, 38, 34, 31,134,183, -241,177, 56, 14, 75, 90, 27, 11,252,181, 81, 45, 43, 43,171,190,107,214,172, 81,236,216,177, 35,239,209,163, 71,250, 45, 91,182, - 40, 38, 76,152, 96,169,215,235, 17, 28, 28,156,222,160, 65, 3,241,154, 53,107, 20,199,142, 29,123,187,176,176,112,147, 73,229, - 69,224,171,161,125,123, 66, 99, 32, 97, 48, 48, 10, 23,133,229,158, 41, 35,187,136,120, 94,135,221, 39,238,192,192,112, 63,152, - 24,201,106, 63,112,224, 64,159,253,251,247,211,209,209,209,116,195,134, 13,193,113, 28, 88,150,133,193, 96, 0, 0,112, 28,135, -250,245,235,215,250,188,140, 1,252, 28,156,236,206,181,127,239, 93, 51, 23,153, 20,118,217,233, 24, 43,166, 45,119,202,181,123, - 1,116,120,163, 34,187, 60, 15,154,166,145,144,144, 0, 71, 71, 71, 51,142,227,148, 0, 22,102,103,103,111,195,155, 75, 27, 9, - 77, 31,221,253,195, 58,231,182, 29, 58, 80, 78, 46,142,136,121, 28, 15,154, 96,187, 63,184,117,167,203,152,137,211,167,232, 24, -230,125, 0, 55,223,180, 3,119,238, 48,169, 63, 65, 82,155, 9,158,195,162, 13, 39,243,151,174, 88, 43, 15, 30, 55,146,154, 54, -109, 26, 60, 60, 60,188,251,247,239,191, 2,192,196,106,117,218, 78,234, 15,138,220, 12,158,199,130,239, 78,230, 47, 89,177, 86, - 62,177, 6, 58,255,114, 42,253,143,212,218,104,249, 3, 62,141, 61, 28,207, 46,157, 49, 81,196,255,242, 35,169,202, 76,171,116, - 91,133, 66,177,245,157,119,222, 25,190,115,231, 31,209,232,246, 1, 1,232,255,118, 32, 28,237,173, 33, 55,151, 20, 85, 71, 28, -129,251,143,158, 27,101, 8, 60, 60, 60,130,143, 30, 61,106, 81,214, 76,136,197,226,210,165,172,201, 42, 89, 74, 42,224,170,144, -201,100, 8, 13, 13, 5, 77,211,160, 40, 10, 52, 77,151, 46,101,159, 83, 20, 5, 39, 39,147,186, 46, 45,179,182,182,110,154,159, -159,111,149,147,147, 3, 79, 79,207, 60, 0, 15,202,188,223, 52, 61, 61,221,202, 20, 65,142, 41,196,180,177,254, 16,233,110, 64, - 39,106, 3, 53,221, 17,215,110, 69, 33,228,204, 69, 36, 37,167, 32,176, 93,115,124, 56,108, 32,206,157, 59, 7,150, 53,185,165, - 35,149,231,177,162, 79,159,160,153, 0, 65,116,239,222, 61,103,242,228,201,100,116,116,244, 7,253,251,247, 11,120,252,248, 73, -113, 84,145,152,193,243, 88, 7, 32,213, 72, 93, 9, 0, 92,186,116, 9, 0,164, 53,249,237, 73,165, 82, 92,191,126, 29, 37,205, -196, 36, 73,130, 36, 73, 80, 20,133, 83, 79, 28, 80,168, 35,161, 74,141,192, 39, 65,158,168, 91,183, 46, 72,178,250, 46,137, 93, - 0,217, 53,160, 63, 33, 18, 77,115,113,117,245,238,236,227, 35, 15, 13, 13,165, 0,192,203,203,139, 87, 42,149, 57, 39, 78,156, -200,167,129,205, 94, 60,191,171, 42,147,229,225,225,209, 49, 41, 41,233,155,146,115, 78, 16,196,138, 58,117,234,124, 89, 90,110, - 28,135,133, 63, 20,138,166, 76,153, 42,110,219,101, 30, 0,160,109,159,253,200,123,186,212,159,200,154, 99,253, 87, 95, 37,242, -242,242, 14,214,175, 95,159,202,204,204,188, 6,224,133,193, 96,152,181,103,207, 30,199,177, 99,199,166,237,221,187,119, 25, 0, -215,229,203,151,119, 41, 44, 44, 60,100,138,110, 96, 83,188,215,178,105, 64, 59, 79, 15, 15, 92,188,118, 19, 98,137,200,102,210, -168, 32, 88, 88,208, 88,181,227, 52,247, 34, 49,107,242,149, 7,216,101,130,201,106, 51,112,224, 64,239,253,251,247, 75, 0,224, -193,131, 7, 72, 73, 73,129, 66,161,128,153,153, 25, 68, 34, 17, 40,138,130, 72, 36,122, 45, 38,203,218,195, 62,236,248,241, 19, -102,118,118, 54,216,240,217, 20,124,152,150, 10, 27, 75, 11, 24, 10, 10,189,223,176,138,194,175, 83,167, 78, 50,150,101, 81, 88, - 88,136, 11, 23, 46, 88,155,153,153, 89,187,187,187, 47,128, 9,163,167,100, 50, 89,170, 70,163,113, 44,126,156,166,209,104,156, - 0,228, 73,165,210,146,235,116, 65,241,218,216,230,196, 23,120,181,153, 48,158, 32,136,178,175,213,148,214,109, 90, 55, 13, 61, -118,100,159, 69,110,126, 10,108,108,211, 64, 34, 23,219,182,109,132,153,153, 21, 22, 44,152, 67, 63,239,254,182, 91,175,247,222, - 15,125, 24, 21,211,253,141, 51, 91, 60,177,173,123,159,225,118,102,114,203,226,186,196,128,157,219,167,128, 36, 73,124,249,229, -151,104,220,184,241,248,135, 15, 31,206, 3,144, 85,181, 12,182, 53,121,107,176,157, 68, 86, 84,196, 28,107,192,150, 3,159, 23, -233,204,158,128,161,125,234,142,255, 98,224,179, 95, 27,251, 32,191,248,198, 92, 45, 34, 17, 79,180, 69,169, 97, 8, 9, 9,233, - 28, 20, 20,116,177,178,231,255, 2, 92,240, 71,254,172,114,230,139, 14, 9, 9,225,131,130,130,136, 50, 7, 87,238,121, 85, 52, - 3, 28,108,173,229,161,155, 23, 78,177,160,111,156,166,212,241, 79,144,172, 41, 87,145,151, 27,162, 41,151,203,135,239,220,185, -179, 92, 72,201,211,201, 17, 98,177, 8, 34, 49, 1,155, 78, 69,217,235,115, 46,135,128, 32, 42, 53, 89,229, 52, 11, 11, 11, 53, -247,238,221,179,216,177, 99, 7, 28, 29, 29,225,237,237, 13,185, 92, 14,153, 76, 86,206, 92,149, 53, 92, 21, 24,173,114,154, 37, -239,211, 52, 13,146, 36,113,238,220, 57, 48, 12,131,129, 3, 7,190, 98,178,104,154,174,204,184, 85, 54, 60,245, 12,128, 7, 60, -207,191, 85, 92, 1, 63, 0,208,185,204,251,189, 20, 10,197, 44, 0,203,140,213,164, 40, 30,148,230, 26, 56,247,181,160, 19,166, - 64, 39,106,134,243, 87,238, 96,231,214, 53, 0, 0,239,134,173, 49,168,127, 80,105, 52,206,200,253, 44,197,205,205,237, 64,122, -122,198,187,111,191,253, 54,178,179,179, 13, 11, 23, 46, 68,211,166, 77,225,231,231,103, 84, 25, 85,114,231,156,250,224,193, 3, - 15,181, 90, 13,158,231,141, 49,103,175,104, 18, 4,129, 61,123,246, 64,163,209,188,178,177,109,231, 37,248,124,128, 23, 70,127, -178, 11, 43, 30, 29,194,166, 77,155,170, 60,118, 57,208, 84, 99, 93,127,157,132, 98,154, 46,155,243,177,244,195, 15, 63,164, 70, -143, 30,141,248,248,120,140, 29, 59, 86,115,238,220, 57, 93,138, 82,121, 66,194,113, 27,244,229,141,113,165,154, 82,169,116,247, -153, 51,103,112,232, 80,145, 47,137,137,137,129,175,175,175,121, 57,147,156,117, 24,249, 47, 54, 32,236, 84, 52,218,246,217,143, -176, 83,195,192,230,156, 22,181,242, 69,174, 41,231,179, 6, 84,164,121, 40, 51, 51,179,212, 68,237,221,187,215,108,239,222,189, -253, 0,156, 4,112, 8, 0,178,178,178,190, 53, 81, 19, 32, 48,122,240,128,126,160,197,150,136,126,146,136,206,237, 91,192,201, -209, 17, 15,162, 98,241, 34, 41, 43,149, 32, 48,170, 87, 7,201, 50,181, 90, 55,239,242,125,124, 95,141, 38,225,238,238,238,119, -248,240, 97,113,153, 8,116,233,127,156,162,168,210,231, 37,198,187, 38,191,207, 18,147,101,233,110, 17,246,213,198,142,230, 97, -225,123,225,235,245, 30,108,223, 11,194,247,103,207,226,241,195, 72,141, 78,197,116,251, 27,202,232,207,210,244, 27, 48, 96,192, -181,125,251,246,217, 36, 36, 36,224,210,165, 75,240,246,246,134, 74,165, 50,230,134,183,156,166, 70,163,113, 44,249, 12, 65, 16, -142, 37,129,119,157, 78, 87, 82, 24, 37,127, 68,155, 50,219,217, 84,161,233, 89,102,187, 18,115,229,245, 26,142, 93, 34, 19,139, - 15, 31, 63,118,192, 34, 50,250, 18,154, 55,107, 7, 11,235, 70,224,216, 20,100,102, 21, 32,251, 73, 50,190,254,122, 5, 22, 44, -156,139,147, 63, 29,177,104,224,223,236,168,142, 97,234, 3,208,188, 49,229, 78,240,227, 67, 79,237,221, 76,240, 28,212,169,209, - 82, 81,225, 51,249,240, 97,239, 83, 67,134, 12,193,201,147, 39,241,240,225,195,205, 85,152,172,208, 50,145,249,241, 17,151, 14, -109, 6,207, 67,157, 22, 45, 21,171,159,201, 71,126, 48,136,250,112,104, 79,220,248,125, 29,122, 54,127, 22,225,234,136,254,217, -197, 22,155,166,144, 41,149,225, 42, 31,134, 27,101,204,214, 5, 0, 68, 25,131,117, 1,127,244,193,252, 55,208,187,216, 88,141, -127,249,198,132,174,137,193, 2, 0, 95,192,130,144,136,195,118, 46,248,216, 85, 30,255,144,214, 70, 92, 71,178,150,227,183,196, - 49, 92, 11,192,236, 46,160,126,249, 51, 42,149,170, 48, 54, 54,214,108, 84,255,254,232, 16, 16, 0, 23,123,123,212,119,119,135, -153, 84, 2,137, 88, 84,238,150,213,232, 54, 4,130,224, 27, 52,104,128, 62,125,250, 64, 36, 18, 65, 46,151,195,194,194, 2, 18, -137,164,194,104,150,177,119,185, 60,207,131,162, 40, 68, 68, 68,224,197,139, 23,176,177,177,193,213,171, 87,209,173, 91,183, 87, -162, 90,101,205,153, 41, 33,250, 10, 42,254, 18, 35,118,198, 20, 45,150, 37, 80,192, 55,131, 44,110, 50, 84, 68, 11,104,181, 12, -180, 90, 45,190,191,162,199,205,216, 66,232,245, 58,104,181,218,170,190,179, 50, 72, 87, 87,215,225,245,235,215,159, 52,108,216, - 48,131, 68, 34, 65, 97, 97, 33, 84, 42, 21, 30, 62,124,104,120,247,221,247,114,250,244, 9,178, 62,125,250, 52, 95,220,116,152, -106,130,118,166,155,155,155, 71,113,243,108,102, 77,126,213, 4, 65,148,154,152,151, 25,245,109, 36,104,170,168, 76, 54,111,222, - 12,150,101,193,243,124,165,133,164, 33,136,223, 22, 46, 89,109,189,124,237, 15,176,182,115,194,197,139, 23,217, 95,127,253, 53, -159, 0, 98, 30, 63,124,248,237,255,128,159, 15, 3,122, 83,246, 47, 59, 59,219,204,219,219, 27,238,238,238,224, 56, 14, 6,131, -161, 52,250,146,153,153, 9,181, 90, 13, 59,243, 28,212,179,119, 7,147,127, 1,202,136, 69,112,177,136,198,174, 51, 58, 67, 75, - 63,220,255, 7, 92, 56,126, 44, 94,106,121,215, 12, 55, 71,103, 15,144,188, 1,201,105,153,232,215,187, 39, 40,177, 5,158, 39, -100,160, 89, 35, 31,151, 15,254,215,209,133, 34, 24,204, 88,182,127, 18,192,125, 95,157, 92, 65, 65, 1, 27, 29, 29,141, 7, 15, -138,252,174,149,149, 21,204,205,205,203,253,199, 73,146,172, 85, 68,171,196,100, 45,217,220,205,156, 20, 21, 34,143, 13,197,142, - 61,119,208,172, 65, 16,182,132,221,210,176,169, 89,221, 87,105, 52, 49, 7,254,197,193, 12,103,103,231, 9, 28,199, 45,224,121, - 62, 39, 48, 48,208,105,255,254,253,182, 73, 73, 73,184,115,231, 14,190,252,242,203,116,150,101, 25,158,231, 9,158,231, 23,189, -134,175,227,202, 24,172,215,137, 72, 46,195, 39, 14, 86, 68, 95,154,180,242,102,242, 10,158,103,232,248, 19, 42,134,251, 14,128, -161,202,139, 27, 73,126,116,228,224,102, 87, 7, 5,135, 46,138,183,161, 76,213, 99,201,103, 35,145,153,153,143,239,183, 47, 5, - 32,129,158,161,240, 86,151,247,225,232,232,134,241,227,198, 59,111,222,186,229, 99,134,227, 86,225, 13, 33,229,218,166,159, 0, -132, 42, 20,138,135, 31,143, 31,175,240,246, 30, 1,153, 76,134, 3, 7, 14, 96,255,134, 13,236, 90, 96,144, 20, 56, 31, 12,252, - 84,165, 78,216, 31, 58, 83,130,131, 21,254,254,193,144, 74,165,248,253,215, 31,161, 73,217,147,223,187, 3,244, 42, 13,122,215, -233,195,219,197,157, 34,178, 68, 34, 60, 1, 0,145, 12, 74, 0, 47, 55,131,253,219, 12, 86, 9,167,241, 71,191,172,241,229, 34, - 90, 53,190,118,138, 36,225,219,167, 14,245,114,130,150,208, 93, 57,133, 36, 45,199, 46,127,172,167,238,230,242,159, 71, 85, 96, -178,138,127,216,156,167,167, 39,222,110,213, 10,253, 59,117, 2, 77,211,144, 73,196,176,148,153,129,103,139, 34, 89, 37, 77,135, - 85,212,137,168, 40,250,100,111,111, 15,177, 88, 92,106,176, 76,136,102, 85,168,201,113, 28,104,154,198,131, 7, 15, 16, 24, 24, - 8, 15, 15, 15, 28, 58,116, 8,189,122,245,122,165, 41,209, 84,147, 85, 98,180, 94,106,198,235, 5,160, 36,146,101,146,209,210, -232, 8,100,232,154,129, 32, 2,192, 48, 0,203, 3, 90,141, 6, 60, 15,240, 60, 96,208,235,160,209,104, 74,191,211,152, 38, 89, -103,103,103, 79, 51, 51,179,197, 51,103,206,240,111,214,172, 57,210,211,211,193,113, 28,204,205,205,161, 82,169, 96,101,101,133, - 14, 29, 58, 60, 95,188,120,177,146,231, 49,222, 68,147, 85,107, 74,206,249,217,179,103,203, 53, 27,150, 44,133,202, 68,140,254, -116, 47, 36,116, 81,211, 82, 73, 31,158,170,174,187, 93,223,234,136,107,119, 99,152,143,102,172,211,138, 50,239, 44,115,230,184, -157,137,181, 56, 46,158,231,145,145,145,129,212,212, 84,244,237,215, 15,251,247,237, 67, 92, 92, 28, 26, 53,106,132,174, 93,187, -194,209,209, 17,113,113,113,184,121, 89, 11,109,118, 22,178,116,119, 32,183,108,139,227, 23, 99,181, 95,110,214,199,254,141, 23, -140,190, 0, 70, 90, 89, 89,213, 85,169, 84, 74,134, 97, 14, 3, 56, 12, 96, 16, 77,211,131,228,114,185, 75, 94, 94,222, 51, 20, -141, 38, 58, 81,157,152,153, 76,102, 47,149, 89,129, 99,180,160,105, 26, 30, 30,222,224, 89, 29,178,243,212, 24, 53,164, 15,238, - 62,136,194,175,231,111, 48, 6, 3,183,222,152,211, 74, 81, 20,239,231,231,135,180,180, 52,136, 68, 34,152,153,153,193,194,194, - 2,179,103,207,198,134, 13, 27, 74, 77, 86, 77,141,214, 24,192,207,202,211,226,198, 55, 27,139, 76, 86, 74,178, 18,169,137, 34, - 40,236,157,176,126,195,218,194,236,184,148,182, 63, 0, 49,255,246, 74,150,227,184, 69, 73, 73, 73,142, 52, 77, 59, 51, 12,131, -132,132, 4,220,190,125, 27,147, 39, 79, 78,205,204,204,236,130, 26, 30,163, 76, 38, 75, 43,137,100, 21, 55, 29, 86,214,156,152, - 83, 38,146,149, 83,133,100,101,205,132, 62,222,238,150,231,182,175,153,230,217,186,109, 7, 82, 78, 91,101, 23, 60, 73, 9,188, -114,233, 98,135,201,107,190,255,248, 69,118, 65, 79, 0, 79, 43, 19,149,138, 68,239,182,235,216,145, 6,159, 10, 90, 18,136, 21, -203,135, 32, 61, 35, 15,217, 89,249, 16,139,205,161, 51, 80, 96, 57, 2, 29, 2, 59,225,199, 93, 7,209,120,220, 88, 74, 34, 18, -245, 96,116,186, 55,198,104, 21,179,244,187,239,190,243,108,208,160, 1,118,238,220,137,243,187,119,227,195,220, 92, 92, 36, 73, -202, 32, 18, 57,252,108, 48,108, 67, 53, 70,171,172, 78,227,198,141,241,195, 15, 63, 96,207,158, 61,241,195,187,165, 29,157, 54, - 28,142,122, 61,222,185,243, 8,118,117,250, 0,119, 30,193,174,101, 3,212,103,104, 60, 33,136,242,233,160, 66, 66, 66, 58,151, - 93,255,203, 80,162,146, 38,118, 26, 64,151,144,144, 16,190,236,186,218, 11,232, 44, 71,207, 0, 0, 32, 0, 73, 68, 65, 84,167, -194, 55,120,105,207,186, 94, 1,245, 60, 9,195,161,117, 72, 40,100,116,243, 30,233, 37,143, 11,248,105, 81,192,218, 42,238, 32, -120,138,162, 96,105,102, 6,133,141, 77, 81,152,159, 36, 1, 14,224, 12, 0,193, 22, 25, 0,158, 35,192,179, 38, 93, 48, 32,145, - 72, 42,236,248,110,106,223,172,178,154,249,249,249,120,254,252, 57,198,143, 31, 15,185, 92, 94,228,220, 83, 82,224,229,229, 5, -154,166,145,148,148,132,223,127,255, 29,117,235,214,133, 84, 42, 53,201,109,149,137, 46, 53, 69,209, 40,195,166, 74,165,210,202, -197,197, 5, 38, 71,180, 56, 30, 42, 45, 1,157,142,197,227,199,143,145,156,156,140,231,207,158,160,117, 97, 30,120, 80,224,121, -222,164,136,150,155,155, 91,128,143,143,207,150,101,203,150,137,221,221,221,193,243, 60,108,109,109,160, 82,169,144,145,145,137, - 70,141, 26,193,195,195, 3,203,150, 45, 3,128,253,127,181,201,122,233, 55, 85,106,180,202, 26,174, 79,255,231,137,172, 44, 11, - 80, 20, 89,106,156,171,233,163, 37, 6,128, 46, 61, 7,208,231,126,253,217,156, 1, 22,167, 80,212, 98,186,250,114, 52,176, 28, - 39,175,236,253,132,132, 4,136, 68, 34, 28, 57,124, 24, 89,169,169,104,214,172, 25,218,180,105,131, 39, 79,158,224,238,221,187, -176,183,183,135,194,189, 61, 46, 62,211, 35, 50, 89, 13,107,107,107,196, 38,146,127,103,202,128,113,221,187,119,255,242,219,111, -191,117,116,118,118, 22,165,167,167, 55,216,184,113, 99,179,141, 27, 55, 78,249,248,227,143,157, 62,254,248, 99, 91,133, 66, 65, -167,164,164,248,125,246,217,103, 45, 67, 67, 67,235, 2, 88, 93,149,160,185,185,165, 29, 37, 54, 7, 65,208,176,177,182, 5, 45, - 49, 7,199,208, 96, 57,192,202, 90,129,107,119,143,224,106,120,254,132,180, 76, 28, 54, 42, 62, 86, 92,238,246,246,246,175, 68, -170, 39, 79,158,140,237,219,183,151, 54, 35,214,212,100, 45,217,216,205,130, 40, 54, 89, 41, 9, 52, 8,109, 93,156,250,233,122, - 78,118, 92, 74,224,155, 96,178, 74,174,113, 60,207,227,217,179,103, 80,169, 84,184,124,249, 50, 22, 45, 90,148,254,178,201,114, -116,116, 28,103,101,101,181,176,160,160, 96, 69, 74, 74,202,186,106,111,252,138, 76, 84,201,227,146,117,133,205,137, 70,238,170, - 87, 69,145, 44, 15, 23,217,153,187,151,247,122, 89,243,247, 9,188, 24, 15, 60,206,123,104, 25,230,248,214,123,173,123,147, 45, - 54,125, 85,167,205,132,217,103, 18,242, 52, 13, 42,139,108,113, 44,219,194,220,194, 18, 64, 26,238,220,190, 80,106,178, 50,179, -114,161,213, 83,208,234, 8,104,244, 36,222,238,254, 14, 54,108,217,131,164,180, 44,176, 44,219,228, 13, 51, 89,118, 1, 1, 1, -193,131, 6, 13,194,226,197,139, 17,250,237,183,186,137, 4,145, 71, 3,252,105,150, 5,199,243, 4,105, 92, 39,246,114, 58,171, - 86,173,250, 9,192,208,101,147,209, 62,187, 0,163, 92,251,240,118,117,250, 20,109, 56,112, 38, 15, 0,118,233,161,229,171,204, -160,160, 32,162,164,101,205,212, 22,182,127, 58,116, 80, 80,208,197,144,144, 16,148, 93, 87,245, 1, 75,167, 6,239,125, 49,125, -210,242,214,189, 58, 17,202,233, 61,144,149,167, 97,230, 68,234, 37,137,234,170, 77, 86, 89,190,216,184, 17,119, 99,138,254,199, -238,142,142,152,241,193, 7,224, 25,224,234,195, 72, 28, 12, 13,197,144,238,221, 97, 46,147, 25, 29,217,224, 56,174,194, 40, 86, -217,104,150,169, 81,167,156,156, 28, 28, 62,124, 24,109,218,180,129, 92, 46, 7, 77,211,104,218,180, 41,162,162,162,224,227,227, - 3,130, 32,112,252,248,113,244,239,223, 31, 79,159, 62, 69,251,246,237, 45, 94,188,120, 97,178,209,138,140,140,180,226,121,254, -173,146,232, 71, 77,209,106,181,136,142,142, 70,159, 62,125, 96,107,107, 11, 55,183,253, 8, 61,179, 23,242,128, 15, 65, 16, 48, -201,104,177, 44, 59,166,119,239,222, 98,130, 32,160, 86,171, 32,147,153,193,220,220, 2,150,150, 86,240,243,107,128,228,228,100, -244,234,213, 75, 23, 27, 27,187, 73,169, 84, 30, 50,117, 95,253,253,253,205,227,226,226, 62,172, 83,167,142, 4, 0,204,204,204, - 26,249,248,248,124,254,244,233,211,124, 83,163, 90, 37, 6,139, 32, 8, 80, 20, 85,106,180,104,146,132,139,179, 99,233,243,226, -254,105, 68, 21, 90,121, 73,153, 90, 41, 0,120,122,122, 98,195,214,147,100,239,222,189, 49,101,202, 20, 24, 12, 6,108,218, 84, - 52,200,110,216,176, 97,208,235,245, 56,122,180,104,144, 36, 77,211, 85,134, 77,110,223,190,141, 59,119,238,192, 96, 48, 32, 55, - 55, 23,191,252,242, 11, 46, 94,186,132, 3,199,127, 67,220,179, 39,104,218,192, 11, 99,199,142,129, 72, 36,194,174, 93,187, 16, - 24, 24,248,183, 94, 16, 68, 34,209,240,237,219,183,187,236,220,185, 51,231,248,241,227,133,237,218,181,147,174, 93,187,214,113, -195,134, 13, 10,157, 78,135,169, 83,167,166,221,184,113, 67,219,175, 95, 63,243,109,219,182,185,212,171, 87,175, 7,195, 48, 21, - 25, 45,115, 0, 67, 0,140,200,206,215,209, 57,249,106,112,140, 14,207,226,158, 35,183, 64, 7,142,213, 35, 62, 49, 25, 5, 26, - 22,153, 89,249,104,218,162,231,119, 23, 46, 92,152,171,215,235,231, 0, 8,169,110, 63, 31, 62,124,136, 27, 55,110, 32, 46, 46, - 14,207,158, 61, 43,239, 20,199,141,195,158, 61,123, 76,142,104, 85,108,178, 40, 16, 90, 31,132, 28, 15,203, 73,123,162,124, 99, - 76, 86,241, 53,104,129,139,139,203, 2, 23, 23, 23,217,217,179,103,173,235,212,169, 3,134, 97,116, 47, 71,178,186,116,233, 50, -111,251,246,237, 46, 62, 62, 62,147, 1,172,251, 39,236, 59, 73, 98,220,138,205,193, 14,150,146,248,100, 60, 94, 93,156, 75,144, - 2, 84,121,192,133,125,160, 59,206,127, 62,185,223, 76,219, 89, 59, 23,143,227,192, 85, 58, 66, 54,246,105, 2, 54,111,222,128, -105, 83, 71,225,199,239, 87,128,227,104,104, 13, 20, 60,189,219, 65,171,231, 64,144, 52,154,181,104,133,243, 23, 46, 67, 68, 2, -135,119,110,126,195,124, 22,178, 34, 34, 34, 54, 29, 63,126,252,147, 41, 83,166,128,227, 56,201,194,205,155,213,233,233,233, 75, - 97, 90,254,171,151,117,250,111,222,188, 57,102,214,134,244,159,166, 13, 7, 21,119,138,200,186,243, 8,118, 3,103,242, 56,178, -156, 64,203, 6,200,146, 87, 92,197, 95,122,105,253,102, 24,173, 18, 39, 89,118, 93, 17, 45,124,235,126,101,109,103, 59,134,180, -116,115,152, 49,101, 34,253, 52, 69,131,163,117, 62, 40,248,125,247,122,243, 20, 70,250, 93, 44, 52,107, 77,249,226,131,191,255, - 94,250,120,229,254,253, 21,190,167, 28, 56,208,232, 59,179,202,162, 88,166, 70,178, 0, 64, 46,151,219,244,232,209, 3,221,186, -117,195,251,239,191, 95,218, 39,171,121,243,230, 56,112,224, 0, 6, 12, 24,128,123,247,238,193,197,197, 5, 13, 27, 54, 68,195, -134, 13,241,243,207, 63,155,122,145, 3,203,178, 8, 8, 8, 40, 25,117,216, 52, 49, 49,209,170,166, 5,169,213,106,145,153,153, - 9, 59, 59, 59, 72, 36, 18,180,109,219, 6,159,124,218, 22, 14, 46, 63, 32,192,191, 1, 10, 11, 11, 75,135,191, 27, 81,217, 6, -212,175, 95, 31,233,233,233, 72, 79, 79,135, 66,161,128,171,171, 43,156,157,157,177,122,245,106,126,221,186,117,191,234,245,250, - 77, 25, 25, 25, 38, 71,178,156,157,157, 59, 17, 4, 49, 79,173, 86, 75,202,220,225, 74, 20, 10,197, 9,181, 90,189, 84,169, 84, - 26,221, 17,148, 32, 8,232,245,122, 16, 4,129,211,207, 92, 81,168, 35,144,151,120, 7, 83,254,231, 85,206,120,137, 68,162,106, -155, 75,121,158, 47, 28, 58,116,168,163,135,135, 59, 18, 98, 31,226,200, 17, 30,223,126,251,109,201,168, 72,196, 20,223, 24,148, - 60,239,218,181, 43,188,189,189,193,155,144, 43,131,227, 56, 60,120,240, 0,251, 79, 92,132,139,151, 63,226, 31, 71,227,238,207, -167, 80, 71, 97,135,198, 45, 90,193, 96, 48,212, 42,245,198,235,192, 96, 48,236,240,245,245,229,117, 58,221, 69, 0, 27,194,195, -195, 71, 41,149,202,169, 39, 79,158,116, 29, 52,104, 80,242,169, 83,167,214, 2,216, 25, 30, 30, 30,252,245,215, 95,119, 99, 24, -166,194,209,130, 20, 69,253,248,217,103,159,117, 25, 52,104, 16, 33, 38, 13,186,179,103,118,209, 12, 99, 32,190,152,179,131,189, -112,229, 34,201, 48, 6,226,253,161,159,113, 63,255, 30, 78, 78,248,116, 37,219,188, 93,111, 68, 68, 68, 56, 7, 5, 5,125,109, - 48, 24,170, 52, 90, 37,145,170,202, 34,148, 20, 69, 97,212,168, 81, 56,112,192,248, 30, 84, 99, 1, 31, 43, 47,139, 27, 75, 54, -118,183, 32,232,130, 50, 38,171, 30, 66,142,135,229,164, 62, 78,126,163, 76, 22, 0,100,102,102,110, 5,176,149,227,184, 84,115, -115,115,228,231,231, 87,244,251,147,133,135,135,203, 36, 18, 9,122,246,236,105, 23, 26, 26, 26, 67,146,228,186,228,228,228, 74, - 29, 71, 69,205,132, 21, 53, 39,162, 22,163, 14,109, 21, 8,106,219,169,133,229, 35,235,197,150, 50, 90,115,175, 78,140,204,138, - 0,144,171,117,122,118,237,197,144, 60, 34, 77,218,188, 85,215,150,176,162,205,131,114,152,252, 10,141, 22, 73, 81,119,115,179, -115,222,205,203,215,225,202,213, 8, 12, 29, 82, 31, 90, 61, 1,142, 35, 81, 80,168, 5, 40, 17, 72, 0,195, 62, 24, 9,158,160, -145,149,154, 12,138,162,194,193, 48,120,195,152, 29, 28, 28,252,238,156, 57,115,234,206,152, 49, 3, 51,102,204,240,218,190,125, -251,214, 37, 75,150,204, 72, 79, 79,111,130,106,146,143, 87,161, 83,231,212,129,249,211, 79, 92,222,146,219,187,131,250,113,203, - 6, 69,145,175,150, 13,144, 37, 18,225, 9, 77, 33,147,231,203,119, 51, 10, 10, 10,234, 92,118,253, 47,227,229, 78,240,165,207, -141,234,163, 85,191,174,219, 59, 45,154, 7,124, 58,119,206, 92,203,168,107, 23, 48,235,171, 13,188,111,171, 30,249, 91, 47,223, -213, 21,152,123,191, 91,144,241,228,170,177,254, 2, 0,222,121,123, 0,154, 54,106,243,202,155,129, 93,139,146,181, 95, 57,127, - 27,169,233, 73, 70, 87,182,197,230,160,194, 62, 89,198, 12,233,127, 25,181, 90,157, 19, 17, 17,225,152,152,152, 88,174,227,187, -183,183, 55, 8,130, 64, 88, 88, 24,110,220,184,129,161, 67,135,130,166,105,136, 68, 34, 92,188,120,209,164,104, 76,153,232, 82, -201,168,195, 94,238,238,238,149,141, 54,172, 86, 75,173, 86, 35, 55, 55, 23,103,206,156, 65,253,250,245,177,100,201, 18,184,186, - 56, 97,238,220,233,224, 56, 14,121,121,121, 96, 89,214,216,136, 22, 87, 18, 45,226, 56, 14,233,233,233,168, 91,183, 46, 54,110, -220,136,181,107,215,126,173, 84, 42, 79,154,186,143, 30, 30, 30, 54, 44,203,126,209,187,119,239, 30,253,250,245, 67,175, 94,229, -243,177,238,219,183,207,242,232,209,163, 75,215,175, 95,255,142, 94,175, 95,150,150,150,150,110,140,238, 15, 63, 20,165, 95,146, -183, 91,128, 89,131,234, 96,196,164, 93, 88,189,250, 24,164, 82,105,185,138,119,241,226,197, 85,154, 24,142,231,125,197, 25,215, -146,167,207, 92,229,184,116,105, 40, 66, 67,211, 64,146, 36, 92, 92, 92, 64,146, 36,158, 63,127, 14,146, 36,225,229,229, 5,146, - 36,145,148,148, 84,210, 39, 48, 27, 21,140,122,172,248, 46,156,132, 70,163, 65, 66,124, 28, 18, 99, 99, 96,145,151, 2,133,149, - 28,217, 15, 31,160,233,216,113,165,249,159,254,102,246,232,116,186, 61,101,158,175, 58,117,234,148,142, 32,136,247, 81,212, 79, -163, 36,162,241, 53,195, 48, 95, 87, 38,210,174, 93,187,230,115,230,204, 17,149,164,219,112,245,252,134,209,235,245, 28, 0, 52, -104,250, 86, 57,183,255,228,201, 19,172, 94,189, 26,133,133,133, 16,139,197, 98, 99,206, 3,199,113,165, 35, 12, 43, 50, 97,166, -152, 44, 0,176,247,114,255, 46,236,206, 69,246,126,236, 22,117,248,163, 95,204,148,241, 36, 72,221,155,107,178, 94,142,108,185, -187,187, 47,224, 56,142,231,121,126,126,153,183,164,158,158,158,151,207,158, 61,107,207, 48, 12,214,175, 95,111,147,146,146, 98, -243,214, 91,111,205, 2, 80,169,209,170,168,153,176,162,230, 68,148, 25,117, 40,149, 74,237,116,186, 74,131, 39,175,140, 58,100, - 89,248, 89, 89,218, 32, 27,137,208, 58, 24,154,231,216, 51, 89,231,148,227,238,185,190,104,209,200,156, 53,212, 37,243,116,112, -147,219,128,227,249, 74,135, 70,107, 13,134, 95,238,221,185,219,211,211,163, 62,117, 50,228, 18,250,246, 31, 4,173,150,132,198, - 64,128,160, 68, 32, 40, 49,154, 52,109,129,134,141,155,130, 7,112,251,230, 53, 70,103, 48,156,123,147,202,222,165,227, 39, 67, - 9, 2,235,192,115,124, 5,121,180,234,246,239,223,127, 41,128, 79,171,211,113,108,247,201, 80,146, 44,210, 41,155, 71,235,179, - 79,130,241,240,166,200,250,210,157,229,226, 94,237,112, 58, 61,148,128, 92,246,199,168, 67, 17, 89,171,212, 28,255, 22,195, 85, -189,209,242,240,240,176,177,146,202,126,248,120,236, 24,203, 23,247,175, 35, 37, 50, 12, 87, 47,197,100, 31, 60,122, 44,171, 48, - 51,109,172, 9, 38,171,180,153,207,222,185, 14,188,253, 95, 53, 90, 50, 11, 5, 0,192,219,191, 13, 40,115,211,210, 8, 85, 20, -205,170,137,201, 42,123,193,174, 40,135,214,132, 9, 19,176,125,251,118,116,236,216, 17,190,190,190,165, 23,123, 83,163,102, 21, - 68,151, 76, 30,109, 88,150,252,252,124,120,121,121, 97,219,182,109, 8, 15, 15,135,165,165, 37,134, 14, 29,138,252,252,252, 82, -131,101,108,103,120,158,231,159,156, 61,123,182,245,224,193,131,121,145, 72, 68,228,228,228,192,198,198, 6, 27, 55,110, 44, 84, - 42,149,167,107, 96,178, 6,137,197,226,233, 67,134, 12,161, 26, 52,104,128,212,212, 84, 88, 89, 89, 25, 8,130, 16, 1,128,141, -141,141,193,204,204, 12,193,193,193,104,214,172, 89,167, 25, 51,102,116,164,105,122, 99,114,114,242,174,170,126, 75, 4, 65,148, - 86,168, 99,215, 69, 67,167, 43,170,160, 55,109,218,132,226,190,110,127, 52, 17,196,198, 2, 70,140,100,177,176,176,128,175,175, -111,133,101,223,169, 83, 39,220,190,125,187,168,105,146,166,225,232,232,136,171, 87,175, 26, 53,146,170, 36, 17,100, 68, 68, 4, -252,189, 29, 16, 30,122, 22, 14,114, 17,154,185, 58,195,189, 83,103,196,196,196,252,157,209, 44, 2, 69,253, 48,186, 23,255, 6, -119, 0,152, 80,230,249, 70, 0,223,153, 34,200, 48, 12, 79,146, 36,145,144,144,160,151,203,229,132,157,157, 29, 45,149, 74,161, -213,106, 75, 13,215,147, 39, 79, 16, 18, 18,130,196,196, 68,216,217,217,145,214,214,214,208,235,245,217,198,232,251,249,249,193, -217,217,185, 92,199,247,177, 99,199,214,200,100,141, 2, 2,182,127,179,172,142,148,164,172,253, 29,222,193,179,232,231, 26, 82, - 7,217,127,193,100, 1, 64, 78, 78,206, 86, 0, 91, 75,158, 59, 56, 56,140,166, 40,106,174, 86,171,181,190,120,241,162,141, 66, -161, 32,118,237,218,101,152, 63,127,126, 14, 69, 81,217, 4, 65,172,249,251,205, 33, 34, 51,114, 99,189, 68,182,174,220,125, 13, -127,109,106,194,172,134,217,162,250, 10,162,113, 0,250,167, 69, 93, 25,205,196,118, 72, 85,166,144, 60,184,200, 42,174,193, 59, -102,205, 89,252, 69, 76,244, 93, 79,153,149, 12, 19,130,231,224,244,175,231, 65,144, 34, 92,190, 22, 6,157,158, 69, 70, 86, 46, -134, 12, 27, 14,119, 23, 7, 68,222, 56,147,206,112,220,198, 55,203,100,115, 27,122,246, 29,109, 43, 53,147, 23,159, 19, 22,123, -190,159, 14,146, 92,135, 47,191,252, 18, 1, 1, 1,147, 34, 34, 34, 22,161,154, 60, 90, 4,193,109,104,210,121,152,173, 88, 90, -164,195,115, 44,182, 29,158, 85,156, 71,107, 26, 54,110, 61,218,164,177,247,179,133, 85,229,209,122,131, 76, 86,217,117,213, 70, -203,203,203, 75,106, 46,194,120, 17, 69,207,248,248,131,126,138,180,216,135, 72,140,186, 91,212,188,160, 87,235, 83, 30, 71, 25, -147, 10,189, 59,202,231,239,224,171,106,186,210,104,140,186,163, 47,167, 89, 82,225,190, 28,205, 50,209,100,189,162, 89,214,108, -149,205,155,229,225,225,129,165, 75,151, 26,147, 71,235,229, 99, 47,161, 23,138, 58,192,151,237, 12,223,203, 72,147, 85,161,166, - 66,161, 64,102,102, 81,134,132, 46, 93,186,160, 75,151, 63,198, 51,232,245,250,210, 40,150,165,165,101, 69, 17,173, 87, 52,205, -204,204,102, 29, 59,118,108,204,181,107,215, 6,127,254,249,231,162,110,221,186,149,152, 57, 21,140,155,219,173,156, 38,203,178, -193,103,206,156,161, 56,142,195,182,109,219,112,251,246,109, 94, 46,151,207,147,203,229, 27,204,204,204, 88,181, 90, 61, 97,220, -184,113,195, 23, 46, 92, 72,118,234,212, 9,215,175, 95, 39,235,214,173, 59, 18, 40,151,196,178,194, 99, 15, 11, 11, 3, 73,146, - 96,178,226, 49,105,214, 65,152,155,209,136,142,142, 70, 86, 86,214, 43, 73, 76,141, 57,159,101, 35, 37, 37, 75,167, 78,157, 74, -155, 33,219,182,109, 11,138,162,112,239,222,189,202,154, 97,203,106,242,246,246,246,165,191, 15,177, 88,140,243,231,207,227,171, -175,190,130,167,157, 13,178,163,194,225,220,229,109,244, 24, 51, 14, 67,135, 14, 5, 69, 81,176,179,179, 43,141,252, 26,241, 91, -170, 13,101, 53,199,248,251,251,143,140,140,140,116,111,210,164,137, 75, 68, 68, 68,215,128,128, 0,175,240,240,240,146,231, 82, - 24,215, 55,167, 84,243,214,173, 91, 71, 54,108,216, 16, 60,106,212, 40, 49,199,113,236,139, 23, 47, 12, 0, 8,103,103,103,234, -214,173, 91,220,201,147, 39,161, 86,171,225,238,238, 78,186,185,185, 17,231,206,157,227,162,162,162,194,120,158,159, 99,204,177, -179, 44, 91, 46,141, 67,201,227,125,251,246,153,252,127,175,211,208,111, 73,183,183, 26,120,100, 36,223,131, 50, 41, 22,108,174, - 66, 31,114,252,148,214, 68,147,245,103,151,209, 95,169,185,248,241,227,199,110, 90,173, 22, 18,137, 4,155, 54,109,210, 47, 93, -186, 52, 50, 35, 35, 35, 16, 21,143, 40, 47,167, 89,195, 81,135, 89, 85,104,190, 50,234, 48, 55, 19,167,143,159,184,213,218,162, -255, 14, 76, 74, 78, 47,237,216,200, 19,132,221, 49,167, 70,129,242, 54, 77,146,200,159, 23,144,249,172,234,116, 21,199,174, 83, -235,116,131,250, 15, 24,246,219,129, 3,251, 45,230, 47, 88,128,171, 97,225,200,204, 41, 0,199, 83,224, 8, 2,115,231,206,135, -179,131, 29,242,146, 31,171,180,122,125,127,148,207,161,245,175, 47,119,130, 32, 39,159, 59,185,107, 29, 73,128, 43, 76,125, 36, -165,242, 99,229, 35,134,246,167, 7, 13, 26,132, 99,199,142, 33, 34, 34, 98, 75, 21, 38,171, 84,147,231,201,201,225, 23, 15,174, - 35, 0, 78,157,254, 72, 74, 23, 60,147,143,252,160, 63, 61,116,232, 80,252, 20,114, 13, 7, 78, 61,219,124,224, 20, 78,225,205, -198,244,204,240,150, 52, 34, 2, 27,249,184,117,106,209, 88, 70,179,106, 36, 70,197, 34,171, 80,131,115, 15, 95,228,144, 60, 89, -227,220, 58, 69, 23, 72, 49,226,227, 31, 87,112,103, 37, 43,174,208, 53, 38,105,146, 36, 89, 46,154, 85,155, 72, 86,217,253,116, -114,114, 42, 55,157, 75,217,138,187,164, 15, 80, 13, 82, 59,204,138,143,143,183,138,143,143, 7,207,243, 8, 11, 11,179,106,219, -182,237,172,218, 68,179,166, 79,159, 94, 26,181,122,121, 93,209,107,213, 81,220, 41,125,173,193, 96, 56, 60, 99,198,140, 73,109, -219,182,237,185, 96,193, 2, 2, 38, 76,192,251, 82, 52,135,225, 56, 14, 23, 46, 92,192,177, 99,199, 88,189, 94, 63, 94,169, 84, -134,151,217,100,253,157, 59,119,206, 13, 24, 48, 96,215,163, 71,143,168,200,200, 72,240,124,245,227, 78,213,106, 53,124,125,125, -193, 48, 12,150, 79,242, 64,126,126, 19, 48, 12, 3,150,101, 97,110,110, 94, 26,197, 43,107,158,171,251, 29,177, 44,251,138,209, - 10, 11, 11, 3, 69, 81, 8, 12, 12,196,221,187,119, 75, 35, 90,213, 69,160,244,122,125,188,147,147,147,211,226,197,139, 75,247, - 43, 61, 61, 29,103,207,158, 69,187,246, 29,208,104,252, 4, 36, 39, 39, 99,205,154, 53,112,117,117,197,146, 37, 75,144,149,149, - 5,134, 97,254,234,112,250,187,145,145,145,238, 31,124,240, 65, 90,120,120,184,123, 72, 72,136, 77, 80, 80,144,249,176, 97,195, -210,194,195,195,221, 9,130,232, 0, 19, 59, 65,115, 28, 55,123,238,220,185,191, 46, 89,178,100,214,167,159,126,218,118,212,168, - 81, 34,145, 72,196, 37, 37, 37, 49,251,247,239, 39,124,125,125, 73,177, 88, 76,156, 57,115,134,187,121,243,230, 13,134, 97,150, - 3,184,108, 74,196,185,172,201,162, 40,202, 88,147, 85,142,169,142,210,145,150,100,122,224,134, 77, 75,201, 6,222,238,250,221, -251,207, 38, 92,190,254,248, 41,165,101,166,254, 80, 69,106,128, 55, 25,138,162, 14,249,251,251,143,158, 60,121,178, 89,175, 94, -189,164, 11, 23, 46,204,205,207,207,175,204,100, 85,112,195,252,151,140, 58,252,126,246,231, 33, 83, 63,107, 50,218,231, 35,231, - 58, 8, 45, 76, 67, 54, 77,145, 86, 54, 36, 90,120, 81,200,207,120,162, 56,245,219,206,231, 0,170,203,203,118,235,206,131,136, -238,141,155, 52, 63,186,124,201,114,199,121, 51,103,136,142,134,252, 2,158,209, 35,236,226, 69, 88,136, 89, 62,234, 78,104,170, - 86,175,235,135, 55,112, 10, 30,229,213,239, 14, 0, 56, 97,103,103,119,127,204,168, 81,190,254,254,195, 32,151,203,113,228,200, - 17,236, 89,191,158, 93, 11, 12,150, 2,119,131,171,201,167,151,118,163, 84,231,222,184, 49, 99,252, 90,180,248, 8,114,185, 28, -135, 15, 31,198,174,181,107,141,214,249,151, 83,146, 25,254, 52,254,200, 16, 95, 77, 31, 45,146,200,191,241,248, 69, 65,216,227, - 23, 5,224,120,158,227,121, 45, 73, 34,161, 80,175, 95,242,248, 89, 82,141, 76, 65, 73,211,225,215,223, 76,126,125,109, 30,101, -204, 79, 77,135,116, 87, 96,178, 18,203,206,145, 86,182,146,174,236,177,193, 96, 72, 52, 82,126,153,167,167,231, 43,175,213, 60, -244,203,155,100,178,140,205,163, 5, 0,153,153,153, 74, 0,243,174, 95,191,190,175,103,207,158,227, 0, 36,213,176,140,182,117, -238,220,121, 60, 0,138, 32,136, 45,201,201,201,225,175,252,225,149,202, 24, 87, 87,215,149,222,222,222, 19,138,110, 76,137,109, -213, 84,228,207,154, 52,105,162,175,168, 44, 42,123,206,113, 92,181,101,148,147,147,131, 54,109,218,188, 50,167, 37,207,243,120, -241,226, 69, 73,196,169,244,220, 87,101,224, 10, 10, 10, 38,124,242,201, 39, 91, 69, 34,145, 39, 0,162,196,228,178, 44, 75,125, -247,221,119, 50,150,101, 41, 0, 4, 73,146,140, 72, 36,210, 28, 59,118,140, 97, 24, 38, 94,171,213, 78,248,139, 47, 16,135,137, -162,169, 24, 10, 35, 35, 35, 27, 20, 71,178, 18, 35, 34, 34,238, 29, 56,112, 64, 1,224, 96, 13,117, 47,171, 84,170,203, 75,151, - 46,237,180,105,211,166,217, 19, 38, 76,104, 51,116,232, 80,186, 75,151, 46, 56,125,250, 52,123,225,194,133, 48,181, 90,189,204, - 20,131, 85, 92,150,185, 30, 30, 30,165,134,171,154,255,114,149, 29,121,237,189,164, 27,134, 79,116,149,109, 91,118,182, 32, 35, - 89,119,205, 80,160,155,179, 19,136,192,127,152,212,212,212,207, 1,204, 95,179,102, 77,114,179,102,205,164, 98,177, 88,103,172, -201,250, 11, 97,184,156,130,247,190,237, 49,240, 68,231,185,159,120,247,232, 26, 40,247,168,227,232, 22, 21,155,138, 39,215, 79, - 23,222, 63,245, 77, 28,175,205,238, 11,192,152,158,235, 55,181,122,125,253,233, 51,166, 79,146,136, 68, 61, 89,150,109,218,237, -220,113,158,162,168,112,157,193,112,174,184,185, 80,243, 6, 23,249,215, 43, 87,174,244,245,247,247,199,145, 35, 71,112,110,239, - 94, 12,201,200,192,121,138,162, 72,177,216,254,148, 94,191, 10,198, 25,164,175, 87,175, 94,237, 23, 16, 16,128, 67,135, 14,225, -204,174, 93, 24, 92, 51,157,202,234,186,214, 0, 20,197, 79, 51, 0, 60, 2,208, 18,128, 25, 0, 45,138,166,118,114, 40, 91,133, - 21,191, 87,242,254, 37,130, 32,254,204,142,176,213,103,134,127,153,136, 39,113, 45, 95,247, 94,168,213,234, 44, 95, 95, 95,147, -198, 92, 27, 12,134, 42,219,112, 25,134, 73,244,241,241, 49, 58,106, 97,140, 41,202,202,202,106,245, 39, 22, 70,173,250, 98,149, -171, 68, 56, 46,206,197,197,133, 43,169,244, 43, 50, 97, 21,189,198, 3,207, 77,249,158,148,148,148, 71, 0, 62,171,233,126, 38, - 39, 39, 31,133, 17,147, 70, 27,187, 29, 0,100,103,103,191,246,201,124, 9,158, 79, 90,184,112,161, 73, 6, 27, 60, 95,149,249, - 12, 47, 40, 40,104,107,204,119,235,245,122,252,141, 28, 42, 94,200,136,136,136,113, 4, 65,244, 66, 81,147,192, 22,188,158,108, -222,151,243,242,242, 46,175, 88,177,162,211,182,109,219,166,242, 60,143,188,188,188,181,166, 26,172,210,187,231,180,180,211,175, -235,192,179, 82,117,191,239,223,146,248,182, 58, 71, 63,117,123,129,110, 23, 4, 74,131, 81, 60,207,255, 56, 98,196,136,118, 0, -118,214, 86,172,146, 81,135,181,229, 57,151,157,219,236,252,244,175,198,156,183,177,236, 13,150,110, 0, 29,121, 10,186,204,211, - 0,126,128,113,221, 28, 74,143,151,225,184,213,140, 78,183,186, 76,229,242, 95, 40,103,187,128,128,128,169,163, 71,143,198,252, -249,243,113,102,213, 42,253, 68,130,200, 21, 1,252,175, 69, 55,154, 36, 1,204, 52, 86,103,228,200,145,152, 63,127, 62,126, 94, -190,188,166, 58, 85,161, 32, 8, 34, 4, 0,102,205,154, 53,103,233,210,165,182,179,103,207,110,186,108,217,178, 37,197,207, 31, -150,188, 95, 92,215, 5,205,158, 61,187,113,153,247,243, 1,220,250,147,207,103,133,153,225,255,108,186, 11,154,130,166,160, 41, -104, 10,154,130,166,160, 41,104,214, 6,158,231,123, 23,173, 42, 95, 87,246,184,204,250,111,129,134,128,128,128,128,128,128,128, -192,191,144,178, 81,172,154,188,255, 26, 41,233,163, 85,150,109, 64,209,176,238,202, 92,169, 41,163, 30,106,226,108, 67, 5, 77, - 65, 83,208, 20, 52, 5, 77, 65, 83,208,252,207,105, 86,167,253,202,231,121,158,239, 77, 16, 68, 8,207,243, 65,149,173, 75,140, -213,203,143,203,172, 95, 91,183,131, 10, 40,233,155,245, 74, 31,173, 63, 27, 33,172, 42,104, 10,154,130,166,160, 41,104, 10,154, -130,102,173, 40,105, 2, 4,192,207,154, 53,107,246, 63,176,233,208,165,216,100,149, 93, 0, 84,209,116,200,243,135,169,164, 36, - 88, 73, 36,114, 49, 0,232,116, 42,189,155, 27,242, 8, 98,208,223, 57,225,173,192,191,147,146,225,222,169,175,121, 91, 1, 1, - 1, 1,129,255, 6,233, 37,145, 42, 0,233, 0,136,226,231,186,226,117,122,177, 33,123,249,113,185,247,255, 68,148,168, 36,146, - 69, 87,102,178, 50, 50,228, 14, 52,157,237,199,178,154,134, 0, 64,211,100,116, 70,134,109, 12,207, 31,206,168,137,217,114,112, -116,188, 35,162, 40, 55, 99,182, 53,176,108, 82, 70,106,106,249,212,241, 4,241, 38, 24, 60, 99, 77, 68,109,204,198,159,110, 84, - 28, 28, 28,156,156,156,156,254,103,101,101,213, 62, 39, 39,231,102,122,122,250, 79, 85,204,123,184,148, 32, 48,163,232,119,133, - 21, 0,102, 87, 33,109,202,182, 47,227, 43,151,203, 39, 17, 4, 17, 80,252, 7,139, 80,169, 84,155, 0, 60,254, 15, 94,144,204, - 0,244,163,105,122,164,131,131, 67,155,148,148,148,133, 0,106,154,205,155, 6, 48,221,198,198,102,136,141,141,141, 79, 86, 86, -214,211,188,188,188, 67, 0, 86, 3,168,118,168,244,194, 79, 93,218,119,233,213,101,222,133, 51, 23,190, 94,184, 94,121,253,149, -247,167,187,216,247,236,209,113,254,133, 83,215, 22,207,217,152,156,101,226,190,145,197, 11, 80, 52, 58,146,199,171,201, 94,107, -139, 8, 64, 31, 0, 93, 0, 92, 0,112,202,152,227,174,132,118, 0,230, 20,239,243,106, 0,231,255,225,191, 35,115, 39, 39,167, -229, 0,250,208, 52, 29,153,148,148, 52, 30, 64,226,223,188, 79, 52,128,214, 0, 2, 80,148,134,227, 22,140, 75,225, 80, 45,246, -246,246, 65, 52, 77, 79, 42, 78,237,178, 41, 51, 51, 51,228,159, 90, 48, 18,137,100,173,179,179,243, 71,106,181, 90, 69, 16, 4, - 95, 54,223, 35,195, 48,137, 25, 25, 25,173,222,180,139, 26, 65, 16,183,254,225,187, 56,190,130,215, 42,207,163,149,148, 4, 43, -154,206,246, 75, 75, 9, 31,146,172,124, 48, 24, 0, 92, 93,154, 30,114,116,110,114, 48, 41, 73,162,119,110,208,223, 66, 36,167, - 55, 81,148,168,185, 70,167,117, 16,209,162, 12, 61, 99,184, 71,234,248, 73, 41,143,126,170, 48,217,162,136,162,220,226, 98,206, - 59, 50,250, 44,136,100,174, 16,153,121, 86,186,183,174,174,174, 53, 58, 74, 91, 91, 31, 75,189, 84, 54, 85, 36,162,122,112, 60, - 19,192,115, 0, 73,136, 34, 24,214,240,155, 88,171,253, 54, 59,251,105,126, 77,207, 96, 3,123, 56,243,192, 80, 16,232, 1, 30, -231, 8,224,192,163, 76,164,152, 32, 97,172,137,168,141,217, 40,251,217, 53, 0, 62,127,221,191, 36, 55, 55, 55,219,160,160,160, -181, 95,125,245,149,153,133,133, 5, 17, 31, 31,223,107,230,204,153,111,221,190,125,251,179,164,164,164,228,151, 77, 31, 65, 96, - 6,199,241, 36, 0,144, 36, 49, 83,161,112,148, 83, 20,245, 74,110, 35,150,101,229,233,233,105,147, 57,142, 39,138,183,157,193, -243, 88,103,140, 97,148,201,100,195, 2,154, 52,255,108,249,202,213, 22, 78,142,142,230, 12,203,233,159,191,136,147,207,155,245, -121,219,216, 39,143,215,105, 52,154,253, 53,249, 95, 83, 20, 53, 68, 42,149, 6, 1,240, 47,126, 45, 74,171,213,134,176, 44,123, -208,216, 10,221,201,201,233, 18, 69, 81,117, 76,249, 98,150,101,227, 83, 83, 83, 3,107, 88, 68,131, 60, 61, 61,127,232,220,185, -179,188, 77,155, 54,144, 72, 36,152, 63,127,254,116,165, 82, 89,157,209,162, 1, 76,151,203,229, 67,204,205,205,125, 10, 10, 10, - 98,213,106,245, 81,137, 68,210,125,221,186,117, 30, 29, 59,118,180, 76, 77, 77, 37, 40,138,114,250,249,231,159, 63, 92,187,118, -109, 47,134, 97,186, 85, 87,201,229,198,242,243,164,125,252, 59,229,198,158,159, 7,224,221,151,223,103, 52,178,145, 60,229, 17, -164,230,239, 38, 20,155, 15,163, 77,150, 72, 36, 90,231,236,236, 60, 90, 83,148, 43,128,127,185,194, 1, 0,157, 78,151,157,147, -147,211,160, 38,127,121, 0, 99,109,108,108, 70,127,241,197, 23,182,239,190,251, 46,246,238,221,251,241,246,237,219,179,243,242, -242,126, 68, 81, 34,204, 71, 38,106,206, 72, 73, 73,121, 79, 36, 18, 17, 30, 30, 30,148, 90,173, 54,197,104,249,161,104, 18,230, - 91, 0, 54,161, 40,117, 65, 87,160,232,255, 14, 96, 69,137,113, 35, 73,114, 83,131, 6, 13,254, 23, 21, 21,181, 25,192,215, 53, -253,175, 59, 59, 59,111,221,184,113,227,224,190,125,251, 82,233,233,233,110,205,154, 53,219,151,146,146,210,233, 53, 92, 70,198, - 72,165,210,105, 77,155, 54,109,244,232,209,163,152,188,188,188,213,197,231,179,170,255,148, 59,128,238, 54, 54, 54,221,230,206, -157,107, 17, 20, 20,132,109,219,182,189,183,125,251,246,130,252,252,252,223, 80,212,167,167, 86, 38,144,166,233, 73,137,137,137, - 14, 60,207,195,197,197,101, 18,128,127,164,209, 34, 73,114,221,128, 1, 3, 70,239,219,183, 79, 30, 23, 23, 39,119,115,115, 43, - 77,158, 77, 16, 68,141,235, 79,129, 90,179,173,140,225,170, 62,143,150, 68, 34, 23,179,172,166, 97,178,242,193,224,183, 58,127, -103, 13, 0,151, 46,126, 50,216,209,185,113,132, 68, 34,143,145, 90,201,142, 13,232,211,189,249,192,160,206,132,187,139, 35, 18, -149,105, 78,223, 31, 56,243, 78,200,153,243,199, 80,148, 64,172, 66, 24,125, 22,204,244,161,120,116,101, 61, 28,186, 36, 99,195, -207,137,184,126,255, 57, 84,185, 25,168,227,108,134,149, 83,123,194,217, 86, 94,179, 91, 47, 71,223,174, 12, 45, 61,248,193,176, - 17,214,255,235,231, 47,242,114,118, 6,207, 75, 17, 19, 91,208,225,151,179,231, 91, 31, 61,188,127,146,185,200,119, 72, 97,218, - 99,163, 47,110, 45, 92, 96, 86,168, 71, 63,154, 34, 62,236,216,170, 81,183, 97,239,117, 34, 27,249,215, 71,228,195,168,158, 39, -126, 15, 91, 73, 94,123,248, 27,195,242,187,205,197, 56,126, 87, 89,101, 66,191, 87, 12, 71,183,110,221, 59, 73,165,210,114,201, -147,180, 90,173,248,183,223, 66,219,213,196,108,148,124,135, 78,167, 37, 69, 34, 9, 72,146,248, 44, 32,160,137,127, 70, 70,198, -121,130, 32,126, 72, 78, 54, 45, 90,240, 9, 32,201,166,233,150,164, 84,234,194,234,116,246, 0, 64, 72, 36,217,207, 73,178,201, -220, 57,115, 44, 40,138,226, 50, 51, 51,161, 82,169,136,113,227,198,201, 98, 99, 99, 7, 36, 37, 37,173,175,230,142, 4,219,183, -111,247,115,113,113,121,101,246, 88,165, 82, 41,233,219,247,127, 53, 41,122,191,166,205, 90, 76, 59,115,230, 87,255,188,172,108, -205,246, 53, 91,239, 24,100,114,109, 93,255, 6,162, 77,219,118, 89,143, 31, 61,252,147,232,232,135,247, 96,218,124,117,158,102, -102,102,199, 86,173, 90, 21,208,181,107, 87,145,163,163, 35, 82, 83, 83, 17, 21, 21, 21,240,251,239,191,247,219,181,107,215,116, -181, 90, 61, 0, 48,106, 66, 84,223,223,118,255,224,104,110,103, 15,214, 96,128,107,211, 22,165,249,205,158,252,126, 22,140, 94, - 15,206, 96,128,127, 80,191,226,104, 50, 15,127,127,255,154,102,221,117,109,220,184,241,158, 37, 75,150,136,181, 90, 45,194,194, -194,112,254,252,121, 78,169, 84, 86,151, 16,151, 38, 8,226,236,130, 5, 11,220, 3, 3, 3, 45, 51, 50, 50,192,178,172,195,241, -227,199, 39, 53,111,222,220,202,195,195, 67,178,123,247,110, 20, 20, 20,128, 97, 24, 59, 31, 31, 31,187, 97,195,134,233,118,239, -222, 61, 29,192,242,202, 34, 89,121,177,252, 60, 37,225,243, 78,131,150, 35,145, 66,252,250,206,180,119,240,139, 85, 61,162, 52, -178,245,142,143,143,101, 94,146,124,166,133, 85, 19,187,188,164,208,153,239,248,248,108,255,245,169, 81, 55, 67,100,113,101,243, -193,129, 3, 7,228, 81, 81, 81,114,127,127,127,112, 28, 87,154,129,191, 36,225,172,175,175,111, 77,206,227,178,224,224,224,153, -131, 7, 15, 70,211,166, 77, 75,147,162,126,249,229,151,152, 57,115,166,237,165, 75,151,166,239,223,191,127,250, 79, 63,253,180, - 28,192, 44, 19,163, 49, 37,152, 90,198,139,158, 61,123, 54,232,216,177, 99,195,103,204,152,225, 11, 96, 50,128,249,153,153,153, -157,139,163, 49,146, 98,163, 53,102,250,244,233, 19,103,205,154,133,247,222,123,111,126, 88, 88,216, 55, 53,140,242, 81, 12,195, -188,215,183,111, 95,202, 96, 48,192,220,220, 28, 6,131,161, 94,109,131, 18, 0, 54, 78,152, 48, 97, 98,112,112, 48,108,109,109, - 97, 48, 24,252, 14, 28, 56,176,125,254,252,249,237, 1,140,173,100, 95, 71, 78,156, 56,241,253, 17, 35, 70,160, 85,171, 86,160, -233,162,211,184,106,213, 42, 44, 94,188,216,226,236,217,179,253,118,239,222,221,239,196,137, 19, 71, 81,126,218, 46,147,224, 56, - 14, 52, 77, 35, 33, 33, 1,142,142,142, 82,142,227,206, 16, 4,177, 45, 43, 43,235,167,127, 80,101,190, 98,208,160, 65, 31,236, -219,183,207, 2, 0, 86,174, 92,137,105,211,166,193,201,201, 9, 22, 22, 22,130,213,249,231, 68,180,198, 87, 27,209,170, 14,149, - 74,213, 98,246,167, 31,130, 36,139,238, 26,235,215,245,196,210, 57,227,137, 19, 33,103, 90, 84, 25,131,151,185,226,209,149,245, -144,122, 76,133,214,192,224,198,253,103, 56,183,178, 87, 81,109,249,238, 92,104,245,221, 74, 42, 27, 59,137,153,217, 10, 29,203, - 94,133,179,115, 24, 94,188, 72,175,206,100, 41,156,157, 66,182,108, 89,110, 22, 80,175, 1,244,140, 1, 73,105, 73, 32, 8, 41, -220,221, 44, 49,102,228,187,162,206,157, 93, 29, 22, 45,218,122, 58,133, 67,127, 85,198,227,106, 19,134,250, 57, 96,103,139, 0, -223,193,195,122, 7, 74,155, 4, 52,134, 88,106, 86,250, 94,203, 86,173,208,178, 85, 43,114, 86, 65,126,143,155,183,238,244, 56, -114,246,134, 86,101,120,113, 40, 38, 3,163,170,185,200,148, 26,142, 41, 83,166,192,201,201,169,220, 6,169,169,169,248,253,247, -223, 42,252,140, 9, 23,178,210,239,248,230,155,111, 44,179,179,179,223,221,177, 99,199,219, 28,199,125,147,146,146,114,197, 24, -145, 17, 64,157, 92,169,180,219,232,213,171,185,230,255,251, 31,101,227,236, 76,114, 44, 75, 36, 63,125,106,191,102,253,250, 46, - 89, 79,158,152, 21,218,217,101,101,171,213,170,152,152, 24,200,100, 50,130,166,233,214, 21, 72,165,242, 60, 86,144, 36, 49,147, - 32, 8, 72,165,178,152,224,224,224,187,197,239,213, 57,117,234,148,188, 79,159, 62, 42, 0,113, 0, 32,149,202,220, 40,138,222, - 54, 21,243, 0, 0, 32, 0, 73, 68, 65, 84,244, 43,202,196,142, 21,198, 24, 76,115,115,243, 79,191, 94,178,220, 60, 47, 43, 71, -173, 47, 44, 52, 40,172, 44, 8,194,194,146,202,203,205,207, 79, 82,166,107,231, 46, 92, 76, 77, 24, 51,226,211,194,194,194, 73, -198,154,172,102,205,154,221, 60,118,236,152,163,189,189, 61,114,114,114,144,153,153,137,155, 55,111,130,227, 56, 12, 24, 48, 64, -218,161,109,155, 22,115,230,206,187,158,144,148,212,222, 24,179,101,110,231,128,149,129,205,139, 42,235,184,204,210,242,217, 54, - 40,168,116,155,197,137,185, 37,209,185,218, 76, 33,213,190, 91,183,110, 98, 0, 24, 59,118,108, 94,126,126,254, 82, 0,251, 80, -125, 70,255,233,243,230,205,115,171, 91,183,174,215,190,125,251, 80, 80, 80, 0, 0,142,117,235,214,133,159,159, 31,123,225,194, - 5,248,249,249,193,210,210, 18,151, 46, 93,194,245,235,215,209,170, 85, 43, 75,177, 88, 60, 88,175,215, 87,104,180,186,244,234, - 50, 79,218,199,191, 83,131,150, 35, 97, 97,229,130,237,251, 15,226,209,157, 93,157,180,250,168,121, 98,246,226, 8, 53, 47, 29, -149, 30,111, 49,171, 78,171,206,246,245, 27,255, 15, 94, 45,239, 58,104,216,203,207,230,245,168,187,140,150,105,118, 45, 92,173, -204,172,204,100, 1, 88, 57, 96,192,128, 65, 7, 14, 28,176, 1,128,240,240,112,164,166,166, 66,161, 80, 64, 38,147, 65, 36, 18, -149,206, 79, 90, 67, 70,109,218,180,169,212,180, 49, 12, 83, 58, 11,128, 92, 46,199, 91,111,189,133,230,205,155,227,167,159,126, - 26, 85,137,209, 10,108,219,182,237, 94, 47, 47, 47,143,178, 47, 22, 22, 22, 98,232,208,161, 0,128,206,157, 59,119, 51, 51, 51, -227, 75, 12,161, 82,169, 44,184,117,235, 86, 15, 0, 97,149, 56, 75,117, 82, 82, 18,190,248,226, 11, 60,127,254,252,227, 45, 91, -182,188, 0, 32,147, 72, 36,165,247,199, 0,252, 26, 55,110,188,110,218,180,105,136,141,141, 69,100,100,228, 77,212,188, 41,149, - 53, 55, 55,127, 98, 48, 24, 90, 49, 12, 3,181, 90,141,254,253,251,203,142, 30, 61,154, 74, 81, 84,116, 70, 70,198,112, 20,245, - 73, 49, 22, 25,128,213,193,193,193, 19,103,204,152,129,223,126,251, 13, 39, 78,156,192,136, 17, 35, 48,117,234, 84, 88, 88, 88, -140,158, 58,117,234,117, 20, 77,104,254, 50,221, 54,109,218, 4,150,101, 95,249,111,200,100, 50, 4, 6, 6,162, 81,163, 70, 56, -113,226, 68,183, 90, 24, 45,175,192,192, 64, 9,199,113, 40, 44, 44,196,133, 11, 23, 44,204,204,204, 44,220,221,221,199, 1,248, -199, 24, 45, 47, 47,175,224, 3, 7, 14, 88,148,109,253,145, 74,165, 40,243, 59, 16,248,251, 35, 90, 85,222, 97,149,162,211,169, -244, 52, 77, 70,187,186, 52, 61,116,233,226, 39,165, 77,135, 0, 25,173,211,169,244, 0,192,114, 60,242, 84, 12,204,164, 36,226, - 82,242,241,240,105, 70, 69, 82,229,134,104,138,204, 60, 33,109, 19, 7,158,231,161,211,179,208,230,166, 96,233,105, 21,162, 18, - 53,208, 21,102, 67,167, 47,234,134,229,224,224, 64,159, 57,243,203,180,208,208,223, 39,254,248,227,143, 84,162,181,117,100, 62, -208,162, 34, 77, 91, 91, 31, 75, 78, 34, 57,180,121,203,124, 51,158,122,138,152,248, 66,212,119,111, 3, 7, 27, 15,164,100, 20, -226,106,228,207,136,126, 28,130,186, 46, 94,152,250,233, 59,178,175,151,236, 59, 40,102,188, 61,115,114,158,231, 85,182,159, 37, -119, 81, 91,127,141, 1,147,245, 20,108,102, 44,216,252,228, 87, 54,176, 80,120,162,101, 87, 55, 40, 60,234, 73, 71, 77, 93, 60, - 18, 40,103,180,202,106,166, 18, 4,185,153, 36,137,137, 4, 65,160,105,211,102,137,171, 87,175,174, 40, 21,184,190,105,211,102, -137, 20, 69,186, 23, 93,216,201, 77, 60,207,165, 86,179,159,229, 76,141, 68, 34,157, 81, 20,246,119, 73, 56,125,250,180,126,208, -160, 65, 88,181,106,149,100,230,204,153,115, 41,138, 26, 91, 65,243, 94, 57,205,254,128,167, 77,189,122, 61,191,185,122,149, 23, - 25, 12, 68,214,205,155,121, 57, 74, 37,147,146,159, 47, 57, 28, 29,253,222, 71,159,127, 46,241,240,240,192,149,144, 16,251,244, -194, 66, 62, 71,171, 85,231,228,228,240, 12,195,220,172, 68,115,182, 66,225, 40,223,190,125,187, 95,112,112,240, 93,165, 82, 57, - 27, 0, 92, 92, 92,150, 2,104, 4, 32,174,204,107,216,178,229, 96,210,184,113,227, 98,210,210,210,102, 87,181,159,101,104,236, -168,112,148,239,223,186,251,129,157,165, 25,169,112,119, 37, 69, 54, 54, 52, 35, 49, 19,115,128,186,174, 71, 61,115, 0,141, 43, -249,236,203,154,132,153,153,217,177,147, 39, 79, 58,138, 68, 34,176, 44, 11,133, 66,129,231,207,159, 35, 39, 39, 7,249,249,249, -120, 22, 29, 5,111, 15, 15, 44,154, 53,211,101,242,204, 89,199, 84, 42, 85,171,151, 42,179, 87, 39, 64, 54,232, 95,137,236, 85, - 52,139,193,203,205, 94, 70,150,123, 89,158,199,199,199,195,194,194, 2, 1, 1, 1, 22, 87,175, 94,189, 92,133,201, 42, 59, 9, -240,224,142, 29, 59, 90,238,219,183, 15,173, 90,181,130,181,181, 53, 46, 92,184,128,240,240,112,232,245,122,178,160,160, 0, 22, - 22, 22, 88,182,108, 25, 60, 61, 61,145,159,159,143,184,184, 56,123,145, 72,228,240, 82, 70,251, 82,205, 11,103, 46,124,157, 27, -123,126, 94, 10,241,235, 59,219,247, 31,196,184, 97, 67,224,204, 63,189,108, 93,143,248,186,103,159,142, 95,242,148, 71,144,185, -101, 83, 91,223,128, 62, 16, 75, 44, 48,121,198, 98,196, 68,156,178, 85,229, 63,248,152, 96, 19, 60, 22,174, 62, 60,165,130, 99, - 39, 0,144, 30, 30, 30, 31, 29, 62,124,216,178, 52,244, 66, 81,165,115, 30,150,157, 4,190,138, 9,223,171, 61,159, 4, 65,224, -249,243,231,112,116,116,132,133,133, 69,233, 4,226, 81, 81, 81,184,113,227, 6, 74,102,163,168, 68,115,120,104,104,168,135,185, -185,121,185, 13,120,158, 71, 70, 70, 6, 24,134,129, 92, 46, 7,203,178,208,235,245, 48, 24, 12,208,104, 52, 22,141, 26, 53,154, -100, 48, 24,194, 42,210,228, 56,238,179,193,131, 7,119, 12, 11, 11,243, 89,191,126, 61,116, 58,221,202,148,148, 20,188,255,254, -251,224, 56, 14,221,186,117,107,199,243,252,163,185,115,231, 2, 0,166, 77,155,102, 40, 44, 44, 12,174,201,177, 23,211,168,101, -203,150, 62,191,253,246, 27, 58,117,234, 4,173, 86,139, 85,171, 86, 89,109,217,178,197,106,247,238,221,138, 25, 51,102,252,144, -158,158,222,171, 26, 77, 2,192, 74,103,103,231,137, 93,186,116, 49, 43,158,195, 20,187,118,237,194,162, 69,139, 14, 0,152,251, -203, 47,191, 44, 56,113,226,196,200,143, 62,250, 8,139, 22, 45,154,154,147,147,179,163, 50,205,103,207,158, 65,161, 80,192,202, -202,170,232, 98,169,215,227,222,189,123, 56,119,238, 28, 26, 54,108,104,204, 49, 85,182,159, 94, 3, 6, 12,248, 97,255,254,253, -150, 9, 9, 9,184,116,233, 18,188,189,189,161, 82,169,140,153, 27, 54,244, 79,168,176, 43,213, 84,171,213,154,248,248,120,139, -229,203,151,195,197,197, 5, 94, 94, 94,144,201,100, 32, 8, 2, 6,131,161,170,233,213,170,221,207,206,157, 65,103, 36,217,246, -181,182,177,253,152,231,121, 58, 55, 55,123,171, 30, 57, 71,158, 62,133,238, 47, 60,246,127, 51, 45, 0,220, 69,249, 57, 15,149, -165, 70, 43, 36, 36,132, 15, 10, 10, 34, 74,214,110,110,200,203,200,176,141,113,116,110,114,208,209,185,113,241,188, 95,100, 52, - 69,217,198, 56, 57,169,242, 0, 64,207,240,184, 22,157,131, 7, 79, 82, 16,254, 36, 5,230, 82,227,130, 47, 90, 61, 83,212, 99, -149,231,161, 41,248,227,166, 85,175,202,134, 86, 95,212,221, 67,167, 85, 33, 55, 61,146, 24,212,191,135,108,226,196, 9,112,113, -113, 83, 84,166,167,151,202,166, 78,158,246,158,141,157,141, 8, 33, 87,127, 69,187,134,253, 33,147,138,144,153,171, 1, 8,224, -241,211,115, 0,103,137,136,152,120,180,109, 44, 71,175,158,254,255,103,239,186,195,162,184,218,239,153,237,176,187,244, 94, 44, - 88, 0,123,239, 40, 98, 67, 99,239, 88, 98,239,216, 27,106,140, 37, 42, 26, 77,236,189,196, 96,239,137,216, 80, 84, 44, 88,233, -136, 88, 0, 41, 11, 82,150,165,108,223,157,157,249,253, 65, 9, 42,101, 65,243,253,190,228,219,243, 60,243,192,236,206,156,125, -231,222, 59,115,207,188,247,222,247, 21, 94,190, 16,191, 4,192,106,125,236, 37,211,158,131,227,218, 15,108,157, 22,218,156,120, - 80,121,201,128,192, 30, 10, 66, 8,113, 70, 50, 94, 63,188,168,215, 59, 35, 69, 81,115,172,173,173,243, 86,173, 90,213,189, 97, -195,134,154,217,179,103, 71, 38, 39, 39, 47,250,236,109,229,215,125,251,246,225,221,187,119,162,141, 27, 55,222,207,201,201,249, -161,154, 21,237, 71,211,216, 81, 60, 20,151,115,229,202,149, 54, 33, 33, 33, 11,118,236,216, 97, 55,119,238, 92,238,220,185,115, - 39, 3,248,169,178,225,194, 2, 30,175,215,198, 7, 15,104, 50, 45, 77,117, 98,247,110,238,222,208,208, 85, 26,138,114,180,182, -181, 37, 58,119,232, 32,227, 51, 24, 57,226,204, 76,210,166,126,125,102,210,237,219, 86,180,177,113,250,141, 27, 55, 10,164, 82, -105,133,169,115,152, 76,166,188,188,225,194,242,224,224,224,160, 46,111, 14, 87, 37, 29, 98, 1, 69,211, 26,243,122,245,232, 62, - 61, 59, 53,124, 23,159,144, 96,100,110,206,116,109,232,226, 30,251, 58,233, 57,173,211, 41, 9,130, 40,208,107,172,132,201, 28, -189, 99,199,142,230,166,166,166,160, 40, 10,102,102,102,200,206,206,134, 90,173, 70, 65, 65, 1,212,133,249, 80,231,231, 35, 58, - 57, 9, 93,186,119,199,200,190,125, 26, 7, 92,249,115,180, 78,167, 59, 83,233,120, 94,139,214,165,158,172,245,117,173,254, 26, - 11, 74,205, 43, 21, 93, 91, 90,187,130, 35, 20,162,247, 34,191,175,185,209,195,175, 93,187,118,125,216,176, 97,223, 45, 89,178, -132,145,145,145,113, 51, 41, 41,169, 11,128, 87,149,157, 36, 20, 10, 27,228,228,228, 64, 42,149,194,204,204, 12, 59,118,236,128, -157,157, 29,228,114, 57, 94,188,120, 65, 59, 59, 59, 19,247,239,223,135,179,179, 51,196, 98, 49, 52, 26, 13, 20, 10,197, 71,181, - 90, 93,225,112,121,241,240, 96,191,133,125,113, 35, 62,236,247,174, 78, 68,226,139, 81,139, 61,223,197, 71,191, 78, 9,186,253, -248, 39, 82,105,148,154,151,118,103,121,189,118,225,214,115,150,174,195,158,173,107, 16,255,236, 65,174, 93,237,130,189,198,132, -234,120,101,246,202,100, 50,229,235,215,175, 77, 34, 35, 35, 65, 16, 4,204,204,204,192,231,243,203, 21, 91, 53, 0,163,172, 7, - 74, 38,147,129,195,225,192,202,202, 10, 71,142, 28, 41,237,120, 93, 92, 92, 42,227, 56,216,187,119,239,209,181,107,215, 54, 41, -251, 97,187,118,237, 48, 99,198, 12,236,223,191, 31,161,161,161,159,228,211,252,248,241, 99,134, 86,171,173,236,186,243, 50, 51, - 51,251, 14, 29, 58, 52,236,225,195,135,166, 71,142, 28, 1, 73,146,229,110,135, 15, 31,198,211,167, 79, 87, 3,120, 93,195,118, -212,104,248,240,225, 15, 78,158, 60,105,158,157,157,141,146,182, 33,147,201,160,211,233,224,238,238, 78,144, 36, 89,213,188, 55, - 6,147,201,188,178,123,247,238,129,211,166, 77, 3,139,197,130, 90,173,198,238,221,187,177,124,249,242,204,226,151, 82, 13,128, - 85,199,143, 31,159, 48,104,208, 32,180,108,217,178,241,189,123, 21,207,236,144, 74,165,144, 74,165, 96,179,217,176,183,183,199, -134, 13, 27,160, 86, 23, 61, 86,220,220,220, 74,111, 99, 0, 7,221,220,220, 6,190,121,243,102, 27,138,230,174,125, 1,123,123, -251,161, 52, 77, 79,215,233,116,133, 93,187,118,181, 58,125,250,180,137, 72, 36, 66, 88, 88, 24, 86,175, 94, 45,161, 40, 74, 71, - 81, 20,161, 80, 40, 18,109,109,109,195,120, 60,158,177, 92, 46,207, 21,139,197,155, 0,220,252,255,234,201, 9,130, 32,216,108, - 54,166, 76,153, 2, 22,139, 5, 99, 99, 99, 40,149, 74,104,181,218, 82, 49,143,106, 14, 75, 55,108, 40,180, 98,129, 51,205,194, -164,201,130,145,243, 7,216, 56, 56, 58,193,220,148,135,184,184, 87, 93,238, 6,223,222,205,101,197, 31,160,212,218, 3,241, 31, -242,255,246,100,247,159,107,145,127,168,208,250, 34,231, 33,171,252,202, 28,169,163,233,243, 57, 34, 17, 87,195,229,242,223,148, -120,185,236,236,228, 5, 4, 49, 82,103,211,116, 48, 72,141,182,248, 65, 65, 23,111,122, 10, 45,173, 14,239,226, 99,240, 48,232, - 79, 88,203, 69,200, 73,108, 5,112,154, 67,173,200,135, 82,173, 41, 22, 37, 58, 68,134, 5,163, 32, 63, 23,205,218, 14, 0, 24, -140,167, 21,241,153, 89, 17, 3, 58,183,105,193,124,151, 18,131,118,110, 35, 80,223,185, 43,146, 51, 10,144, 39, 85, 65, 82,160, - 68,171,102,126,200,150, 40, 80, 32, 87,226,213,187, 0, 56, 57,214,103, 16,172,132,158,250, 10, 45,213,171, 75, 80,189,254, 3, -156, 58, 93,192,117, 31, 4,102, 29, 15,164, 68,221, 67,228,141,237, 72,139,125, 4,154,210,193,193,173,189,190, 55,201,238,155, - 55,111,182,239,210,165, 11,171, 87,175, 94, 45,175, 95,191,222, 50, 35, 35, 35,178, 88, 96,180,236,213,171, 87, 75, 27, 27, 27, -236,220,185, 83, 65, 16,196,238, 26, 86,118,169, 7, 44, 43, 43,235, 57,128,141,151, 46, 93,218, 61, 99,198, 12,216,218,218, 54, - 79, 79, 79,175,240,196,108, 54,187,229,196, 77,155,104, 54,147, 73,159,217,179,135,179,238,230,205, 95,126, 59,126,156,211,195, -203,139,160,105, 26, 17, 17, 17,252, 45,123,246,240,199, 14, 30,252, 33, 57, 43,139, 12, 9, 13,213,100,164,165, 21,102,201,100, -235, 50, 50, 50, 62,254,127,180,108,173, 86,251, 36, 49, 41,209,169,109,135, 86, 54,225,113,137,177,222, 61, 58,119,102, 48, 24, -140,248,132,228, 80, 27, 27, 83,254,237,160,219, 26,173, 86,251, 68, 31, 46, 30,143, 55,160, 71,143, 30, 44,137, 68, 2, 71, 71, - 71,100,103,103, 67, 36, 18, 21,121, 28,242, 37,208,228,231, 67, 91,144, 7,157, 76,138,196, 23,207,209,170,126, 61,222,121, 30, -111,128, 92, 46,175, 84,104,149,188,101,150,151,232,186,228, 51,174,137, 9,184, 66, 33,136,234, 15, 27, 14, 54, 55, 55, 95,158, -151,151,119, 29,192, 6,141, 70,227,187,124,249,242,118,187,118,237,178,222,184,113,163,233,244,233,211,207, 75,165,210, 86, 40, - 74,170, 90, 81, 7,246,158, 36, 73, 43, 0,118,193,193,193,176,181,181, 69,126,126,126,137,167, 69, 45,151,203,141,196, 98, 49, - 84, 42, 21,212,106, 53, 76, 77, 77,241,242,229,203, 92,146, 36,175, 86,101,156,105, 3, 98,131, 74, 19,247,131, 85, 99, 65,186, -134,180,240,204,202,165, 36,107,127,201, 88, 15,224,151,190,245,235, 31,214, 80, 15, 18,223,198, 92,181, 72,122,113, 63, 55,253, -173,172,254,145,235,137,149,205,209,162, 1, 80, 4, 65,208,110,110,110,200,206,206, 6,147,201, 4,159,207,135, 80, 40,196,138, - 21, 43,176,123,247,238,154, 8, 45, 35,129, 64,176,137,193, 96,140,102, 48, 24, 54, 58,157, 14,126,126,126, 24, 56,112, 32,184, - 92, 46, 52, 26, 77,169, 71,179,196, 75, 85,133,167, 35,226,233,211,167,166, 79,159,126,242,216,242,178,182,182,190,171, 82,169, -144,144,144,128, 43, 87,174,116, 7, 16, 82,205,186, 78,136,136,136,232,235,225,225,241,123,155, 54,109, 26,208, 52,141,230,205, -155,195,199,199, 7, 1, 1, 1,136,140,140, 68,126,126, 62,117,251,246,237,223, 0,108,171,110, 31, 94, 92,190,238,195,135, 15, -127,116,234,212, 41, 11,177, 88, 12,133, 66, 1,153, 76,134,243,231,207,163, 75,151, 46,176,182,182,198,201,147, 39, 73,154,166, - 43,171,123, 6,131,193, 56,114,224,192,129,129, 83,167, 78,197,222,189,123,113,230,204, 25, 12, 26, 52, 8,163, 71,143, 70,118, -118,182,221,214,173, 91, 39, 20, 15, 19,174,241,241,241,129, 84, 42,197,139, 23, 47,226,244,188,231,145,151,151,135,188,188, 60, - 24, 27, 27,151,189,199, 8, 0, 1,219,183,111, 31,179, 96,193, 2,212,175, 95,127, 77, 98, 98,226,118,148,179, 74,148,162,168, -153, 34,145,200,130,197, 98, 89,145, 36,137,212,212, 84,188,124,249, 18,115,230,204,201,205,205,205,157, 1, 32, 25,192,170, 41, - 83,166,108, 88,180,104, 81,105, 91, 90,180,104, 81,224,245,235,215,251,254,167,189, 57,110,110,230, 77,185, 76,222,124, 73, 33, -211, 74, 34,145,148, 62, 59,212,106, 53, 84, 42,213, 39,158, 44, 14,135,109,213,174, 85,237,107, 10,121,225,202, 87,111,243, 42, - 76,144,222,184,129, 89, 11,190,192,108, 65,151,174, 61,198,245,233, 59,132, 73,106,181,184,117,235, 42,142, 30,221, 7, 47, 15, - 55,212,111,216, 28,115,231,205, 55, 83,169, 73,191,219,183,111, 46, 55,127,250,240,102, 97, 65,222,138,202, 56,255,199,113,173, - 88, 92, 93, 43,119,232,176, 60, 5, 89, 28,194, 65, 82,188,107,109, 97, 97,177, 71,167,211,121,153,154,154,130,202,123,131, 87, - 47,159, 33, 87,194,134, 74,161, 3, 69, 23,137, 45,189,132,139, 74,141, 7,183,254,192,142,237,191, 64, 44, 22,195,163, 91,119, - 72, 89,181, 80,187, 86,109, 40, 21,242,226,155, 6,208,168,181,176,177,171,131,240,240, 72,109,129, 76, 86,225, 3,137, 99,164, -105, 92,219,206, 13, 42, 77, 39, 24,113,185,200, 47, 84, 67, 82, 44,178, 78, 94, 24, 5,149, 92, 1, 82,173, 1,169,214,194,166, -246,112, 52,178,235, 1, 74,119,181,105,181,138,143,210, 65,147,244, 0,154,164, 7, 48,238, 52, 15,127,250,143,249,172, 35,213, - 47,239,110,118,118,118, 86,108,108,236,213,136,136,136,161,163, 70,141,194,189,123,247,166, 3,152, 85, 60,124, 51,125,212,168, - 81,136,136,136, 64,108,108,236,213,236,236,236,172,111, 81,243, 92, 46, 87,161, 82, 21,245,177,124, 62,223,168,138, 99,157,218, - 13, 27,198,200, 15, 15, 47,216,254,248,241,154,195, 71,142,112,122,245,236, 73,104, 73, 18,148, 78,135,134,174,174, 68,159, 62, -125, 4, 1,231,206, 89, 49,181,218,167, 75,125,125,131,247,143, 31, 95,248, 92, 38,211,119,162,121,221,226, 33, 67, 0,168, 91, -201,103,122, 67,165, 82,237,154, 57,109, 82,175,144, 7,143,106,213,174,229,100,122,235,118, 72, 36,207,152,203,168,239,210,128, - 41,201,207,101,173, 95,179,210, 88,165, 82,233, 43, 90, 27, 91, 91, 91,227,227,199,143,120,247,238, 29, 84, 42, 21,180, 90, 45, - 40,185, 12,106, 73, 30,212,249,185, 32,148, 10,240,116, 58, 40,115, 50, 81,183,126, 61,224,175, 21,137, 85, 14, 69,149, 39,180, - 74,254, 26,153,154,130, 35, 16,130,193,102,235,157, 28, 29, 64,155,246,237,219,159,187,120,241, 34,103,242,228,201, 29,238,220, -185,179, 7, 64,178, 72, 36,234,185,122,245,234,231,123,246,236,225,205,152, 49,195,125,219,182,109, 19, 0, 28,172,136, 68,169, - 84,158,187,118,237,218,216, 58,117,234,216, 69, 71, 71, 67,169, 84,130,162, 40,244,235,215, 15, 40,154, 91, 3, 0,136,143,143, - 87, 40,149,202,172,152,152,152,130,228,228,100, 13,244, 88, 37,184,118, 87,198,147,130,143, 15,134,217,217, 59, 61, 53, 50,174, -235, 66, 75,195,135, 46, 28,225,180,117,251, 5,145,242,102, 66, 66,225, 15,189,235,109,150, 21, 70,205, 49,119,150,238,189, 25, -152,168,207, 68,248,210,213,133, 86, 86, 86, 96,177, 88, 96,179,217,224,112, 56, 32, 8, 2,243,230,205,195,161, 67,135,170, 26, - 58,252, 68,100,153,152,152,196,174, 91,183,206,121,198,140, 25, 28, 35, 35, 35, 72, 36, 18,156, 60,121, 18, 83,166, 76,193,209, -163, 71,203,157,255,162,199,144,210,231,222,210, 5,227,199,143,135, 90,173,134,143,143, 15, 14, 31, 62,188, 64,167,211,133,212, -224,150,126, 26, 25, 25,233, 26, 25, 25,105, 10, 96,208,232,209,163,143, 15, 31, 62, 28, 33, 33, 33,184,122,245,106,119, 20, 45, -250, 80, 0,240, 7, 96, 91,252,183,178,251, 83, 96,103,103,183,143,162,168, 65, 54, 54, 54,145,110,110,110,205, 78,157, 58,101, -158,149,149, 85,178,248, 1, 73, 73, 73, 56,118,236, 88,198,145, 35, 71, 10,116, 58,157, 21,131,193,184,150,151,151,183,162, 18, -193,118,100,251,246,237,147,138,135, 3,113,241,226, 69,250,151, 95,126, 33, 86,175, 94, 13,137, 68, 2, 47, 47, 47, 28, 56,112, - 96,190, 84, 42,109,249,203, 47,191, 76, 27, 57,114, 36,214,175, 95, 15,153, 76,182,189,170,151,149, 74,196, 23, 1,160,243,246, -237,219,235, 44, 88,176, 0, 23, 47, 94, 68,155, 54,109,140, 19, 19, 19,247, 3,152, 90, 94,253,209, 52,141,196,196, 68,200,229, -114, 60,122,244, 8,107,214,172,145,148, 17, 89,243,103,205,154,181, 97,254,252,249,216,180,105, 19, 29, 29, 29,157, 53,124,248, -112,187, 67,135, 14, 49, 27, 54,108, 56, 95, 46,151,255,199,132,150,123, 67,203,205,237,218,116, 93,238,224,212, 16, 39, 79,157, - 70,110,110,110,105,153,148,148, 11, 77,211, 40, 44, 44,196,199,143, 31, 97,102,106,130,173,219, 54,124, 55,123,250,164, 90, 40, - 10,131,241,165,203,178,190,197,182,225,163, 39, 47,246, 25, 59, 9,209,145, 97, 8, 56,126, 16, 49,209, 17,165,124,164, 86,131, - 55,113, 47,241, 38,238, 37,236,236,235,160, 79,175,238,196,152, 49, 99,250,141, 31, 59,218, 6,192,223, 22, 58,226, 31,236,205, - 2,190,140,163,117,232, 19,161, 85,133,187,206,218,194,194, 34,246,236,217,179, 86, 30, 30, 30, 76,146, 36,113,243,214, 45,204, -153,245, 61, 38,140,247,131, 6, 22, 32,213, 28, 80, 28, 35,189, 44, 81, 40,228,160, 65, 67, 38,147, 33, 52, 52, 20, 52, 69, 34, -224,208, 47,160,105,170, 84,104, 1, 52,212, 26, 13,156,106,187, 99,223,225,141, 36,216,236,231,208,150, 31,186,166, 64,204,212, -105, 73, 26,162,172, 20,164,100,196,192,204,164, 54, 88,236,218, 16,231,201,193, 98,216, 67,171,140,135,174,248, 92,185, 44, 13, - 10,205,215,213,159,174, 28,239, 41, 93,141,135,174, 66,161, 56,113,226,196,137,239,126,253,245, 87,110,255,254,253,221, 46, 92, -184,208, 25, 0,250,247,239,239,102,106,106,138, 19, 39, 78,168, 21, 10,197,137,111,232,241,233,209,190,125,123, 72, 36, 18, 36, - 37, 37, 69, 86,122,109,106,181,149,208,214,150,153,117,239,158, 54, 91, 34,169,213,163, 71, 15, 66, 75,146, 96, 16, 4,114,243, -243,145,252,225, 3,204,205,205,137,216,248,120,225,238,185,115, 47,187, 53,107,198, 42, 89,145,168, 15,174, 94,189,202, 71,209, -188,172, 74, 63,171, 38,100, 89,153, 31, 39,249,250,250, 94, 62,113,226,164, 89,102, 86,230, 27, 30,151, 75, 10,133, 70,142,227, -199,205,102,229,229,229,141, 5, 32,213,151, 76, 34,145, 32, 49, 49, 17,198,198,198,224,176,217,160, 20,114,232,100, 82, 40,115, -179,193,212,168,193,213,233, 96,201,231,161,150,157, 29,106,219, 88,235,197,249,238,110, 80,233,196,247,178,195,133, 91,219, 55, - 6, 87, 32, 4,215, 68,136,217,129,247,139,223, 70, 57,192,234,159,244,161,181,118,114,114,250,243,212,169, 83,156,236,236,108, - 68, 68, 68, 68, 2,200, 7, 96, 2,128,138,139,139,187, 19, 19, 19, 51,160,120,213, 93, 85,171,197,126,185,116,233, 82,111, 15, - 15, 15,210,197,197, 69,144,149,149, 85, 75, 34,145, 80, 25, 25, 25,159,184,132,130,130,130,120,133,133,133, 50,138,162, 46, 23, -139,172, 42,227, 23, 45, 28,225,100, 20, 26,142,121,158,222,117,155,155, 90,183, 64, 46, 25,222,252,105,100,198,188,133, 35,156, -118,109,191, 32, 82, 26, 19,170,227,132, 46,181, 22,203, 72,169,239, 36,102, 26, 40,154, 43, 21, 26, 26,138,228,228,100, 36, 38, - 38,126, 34,168,166, 79,159,142,128,128, 0,189, 60, 90, 2,129, 96,211,218,181,107,157, 23, 44, 88,192, 41, 35,138,224,235,235, -139,252,252,124, 28, 62,124, 24,190,190,190,213,238,248, 63, 67,189, 30, 61,122,244,119,112,112,128, 88, 44,134,189,189, 61, 60, - 60, 60, 6,134,132,132,184, 0, 72,170, 97,187,159,237,237,237,189, 97,221,186,117,208,106,181,152, 50,101, 10,222,190,125,123, -238,237,219,183, 59,106,215,174, 61,111,217,178,101,118,118,118,118, 24, 53,106,148,128, 36,201, 97, 21,145, 88, 90, 90,250, 31, - 60,120,112,108,255,254,253, 25, 26,141,166,219,221,187,119,241,225,195, 7,168,213,106,144, 36,137,247,239,223,195,215,215, 55, -163,120,117,227,123, 61,236,154,188,106,213,170, 73,243,230,205,195,150, 45, 91,176,118,237,218,223,204,204,204,154,181,106,213, -170,245,218,181,107,177,116,233, 82,212,169, 83, 7, 86, 86, 86,141, 86,175, 94,221,120,209,162, 69,216,181,107, 23,214,172, 89, -243, 27,128, 99, 53, 41, 8,138,162,136,205,155, 55,183,220,190,125,187, 67,137,200, 98, 48, 24, 56,123,246, 44,194,195,195, 7, - 38, 36, 36,148,119,206, 1,123,123,251,233, 14, 14, 14,220,219,183,111, 11,235,212,169, 3,146, 36,181,197, 34,107,119,237,218, -181,231,188,127,255, 30,253,251,247, 71, 66, 66,194, 9, 0, 19,204,204,204,100,139, 22, 45,226, 27, 27, 27,155,201,229,242,255, - 84,231, 13, 38,131,152,184,105,253, 82,188, 8,143,199,165, 75, 28,188,120,241, 2,118,118,118,224,241,120,160,105, 26, 42,149, - 10,217,217,217,208,106, 84,104,222,180, 30,126, 63,178, 25, 89, 89,217, 0,131,168,112,202, 13,193, 32,198, 77,250,126, 40, 30, - 62,186,133,253,251, 15, 66, 42,149, 85,240,242,109,132,134,110,141,225,228,104,139,212,180, 84, 16, 12, 88,255,157,215,250, 15, - 31, 58, 44,125, 4, 65,159,240, 14,101, 97,110,110,190,227,204,153, 51, 86, 94, 94, 94, 76,153, 76, 6,138,162,208,213,195, 3, -243, 22, 44,192,213, 83,167,224,218,193, 7,132, 90, 8,146,175,223,170, 7,165, 66,142, 38,173, 59, 99,228,168,209, 72, 73, 78, -134,247,128,225, 80, 42,229,165,111, 24, 37, 30, 45,181, 90, 3,107,219, 90, 8, 10, 10, 98, 98,202,148, 87,216, 93,190, 83, 66, -167,225, 70,189,121,175,236,146,167, 8, 71,232,139, 0,104, 84, 26, 52,111,190, 26, 26,202, 10,182,206,211,161,213, 94, 65, 65, -246,221,162, 97, 12, 43, 47,164,165,164,128,193,228,196,214,180, 4, 41, 89,246, 87, 61,116,243,243,243,243, 19, 19, 19, 47,132, -134,134,142, 27, 54,108, 24,130,130,130,166, 1,192,176, 97,195, 16, 26, 26,138,196,196,196, 11,249,249,249,249,223,162,182, 29, - 28, 28, 6,117,239,222,221,167, 93,187,118, 8, 12, 12, 4, 77,211, 15,245,186,177,217,108,154,193, 96,128,162, 40, 16, 0,196, -121,121,120,251,246, 45,196, 57, 57,208,106,181,144, 73,165, 84, 99, 55, 55, 41, 77, 81, 38,213,177,167,236, 10, 67,148,179,234, -176,228,179, 26, 92,106,242,243,167,143, 83, 10,165, 82, 27, 11,115,139, 66, 46,151,171,147,228,229,229,191,138,141, 86,235,217, - 57,148, 32, 46, 38, 38,166, 89,122,122, 58, 82, 82, 82, 64,202, 10,193, 84,169,193, 80,201,209,179,115, 39, 24,131,134, 17, 40, -176, 41, 45,216, 76, 54, 10,139, 86,231, 85, 57,220,161, 43,243,146, 80, 34,178, 8,130, 40, 26, 46, 20, 8,192, 21,154,124,226, -225,210,167, 61,241,120,188, 83,231,207,159,119,112,114,114,194,250,245,235,225,236,236,220,200,209,209, 81,110,102,102,102,108, -103,103,135, 38, 77,154,160,115,231,206,184,113,227, 6,244, 40, 3,146,166,233, 62, 15, 31, 62, 92,252,248,241,227,145, 2,129, -128,152, 59,119, 46,171, 95,191,126,224,241,120,144,203,229,144, 72, 36, 56,125,250,116, 14, 69, 81, 37,139, 82,172,248,124,254, - 49,130, 32,146,100, 50,217,130,207, 9,127,255,181,185, 99, 86, 46, 53,133,150,242,135,122,122,215,109,222,195,187, 23,234,185, -246, 64, 15,239, 20, 0,216,108,201,250,224,243,243, 42,243,203,230, 38,196,177,160,155,183,215,120,120,246, 88,181, 92,122,111, -195,150, 67,121, 85,206,167, 35, 8, 2, 20, 69,125, 18, 59,232,243,239, 39, 76,152,128,179,103,207, 86, 89,142, 12, 6, 99,244, -140, 25, 51, 56,159,121,158, 33, 18,137, 48, 96,192, 0, 12, 27, 54,236, 19,161,101,109,109, 13,123,123,123,124,248,240, 1, 0, -196,122,182,171,121,147, 39, 79, 38, 20, 10, 5,166, 78,157,138,195,135, 15,195,199,199,135, 8, 9, 9,153, 7, 96, 65,117, 27, - 59,131,193,216,186,108,217,178,197,190,190,190,200,205,205,197,245,235,215,209,175, 95, 63,156, 61,123,214,230,250,245,235,155, -188,188,188,192,100, 50, 17, 24, 24, 8,146, 36, 43,141,245,197,225,112, 6,245,239,223,159,145,154,154, 10, 14,135,131,182,109, -219, 34, 45, 45, 13,114,185, 28, 34,145, 8,243,231,207,255, 40, 22,139,187,235,123, 31,113, 56,156, 5,243,230,205,195,153, 51, -103,224,231,231,119, 28,192,212,252,252,252,145,143, 31, 63, 62, 51,120,240, 96,136, 68, 34, 92,190,124, 25,107,214,172, 33, 38, - 76,152,128,189,123,247, 98,254,252,249,191, 21,123,157, 42,106,248,133, 89, 89, 89,102, 13, 26, 52, 64,102,102, 38,164, 82, 41, - 46, 95,190,108,123,227,198, 13, 23, 39, 39, 39,211,196,196, 68,221, 79, 63,253,196, 93,176, 96, 1,118,236,216,129,136,136, 8, - 4, 4, 4,160, 71,143, 30,100, 66, 66, 66,185, 94,178,226,144, 13,151,105,154,190, 45, 16, 8, 80, 88, 88, 88,114,223, 45,241, -243,243,243,245,247, 47,114,178,167,167,167, 99,226,196,137,227,131,131,131, 41, 47, 47, 47, 62,135,195,129, 82,169,148,253, 39, -123,109, 74, 71, 1,160,224, 82, 75,136, 91, 87,143, 32, 44, 50, 1, 97,145, 49,224,242,138, 38,193, 43, 20,114,180,110,222, 16, - 29,218,182, 71,122,134, 8, 39, 2,142,192,210,218,169,210,231, 8, 77,211,224,176,116,104,236,102,143, 83, 1, 7, 17,120, 61, - 24, 1, 39, 78,151,206,121, 99,177,216,104,213,186, 3,218,182,245, 64, 66,226,123, 28, 57,178, 31, 54,182,181, 12,131,131, 53, - 68,233,208, 97,217,191,159, 41,255, 30, 30, 30, 30, 76,169, 84, 10,165, 82,137,143, 31, 63,226,195,135, 15, 48,183, 48, 71, 66, -122, 18,186,243, 53,248, 72, 21, 32, 46, 50, 86, 71, 48,217, 17, 85,253, 96,127,207, 86,128,103, 43,204,153,236, 83,201, 43, 43, - 13,129,169,117,209,208, 13, 73,190,195,174, 93,100, 69, 66,139,212,105,239,220,186,125,183,253,228, 9,131,216, 65,119, 15, 67, -171,166,160,208,154, 65,166, 84, 67,166, 97,131, 97,214, 15,200, 9, 1,147,197, 67,199,150, 13,113,249,210, 13, 13, 77,106,131, -245, 46, 32,187,102, 32, 51, 99,202, 8,173,172,207,198, 29, 44,245, 30, 58, 44,237,120,117,186,179, 39, 79,158, 28,210,169, 83, - 39,190,151,151, 87,131,226,142, 83,115,242,228, 73,121,113, 48,204,234,226,147,104,240,246,246,246,173, 57, 28,142, 79,191,126, -253, 90, 79,154, 52, 9,175, 94,189,194,137, 19, 39,222, 52,108,216,240, 94, 70, 70,197, 43,178,153, 92,174, 88,154,149,101, 46, -116,113, 97, 89,152,152,164,223,184,126,189, 78,175,222,189,137,148,148, 20,136,197, 98, 40,149, 74, 68, 68, 70,210,108, 38, 51, -141, 48, 53,101,196,135,135, 51,152, 92,174,184, 34,111, 99, 57,248, 80,197,170, 67,255,154,122,183,106, 57, 88, 52, 88,227, 55, -179,158, 82,165,108, 86, 80, 80, 64,178,216,108,182,179,189,121,114,252,123,253,159,137, 42,149, 42,240,206,157, 59, 67,122,245, -234,197,123, 19, 21, 1, 50, 63, 31,234,124, 9, 56,148, 14,150,173, 91,130,169, 81, 1,106, 45,156, 26,211, 80,230,241, 17,242, - 44, 94,171, 82,169,170, 12,106, 88, 34,180, 24,159, 9, 3,174, 80, 8,158,137, 41,120, 66,225,231,130,161,170, 55, 57,126,159, - 62,125,122,118,236,216, 17, 52, 77,227,208,161, 67,208,104, 52, 92,141, 70, 3,181, 90, 13,141, 70,131,130,130, 2, 4, 4, 4, - 96,223,190,125,143, 1,252,166,199,229,147,198,198,198,131, 9,130,176,101,177, 88,114, 27, 27, 27,193,217,179,103, 75,195, 77, -180,106,213, 10, 38, 38, 38, 28, 20, 7,133,180,181,181,101, 31, 61,122,212,124,224,192,129, 15,202, 29,238,104,222,104,105, 61, -210,194,211,200,184,174,139,169,117, 11,212,115,237, 1, 0,232, 61, 96, 50,234, 53,172,141,130,156, 40, 23,165,226,195, 80, 14, - 75, 98, 17,187, 75,244,202,184,127,179, 73,178,172,251,111, 81,254,242,254,114, 59, 10, 6,131, 81,225,112,172, 62, 34,171, 72, -179, 48,108, 74,230,249, 0,128, 88, 44, 70, 70, 70, 6,226,226,226,224,238,238,142,220,220, 92, 56, 57, 57, 65,173, 86,163, 93, -187,118, 80, 40, 20,216,190,125, 59, 30, 61,122,244, 24,192,124, 61,126,195,216,213,213,117, 98,235,214,173,113,253,250,117,188, -120,241, 66,116,235,214, 45, 39, 15, 15, 15,184,184,184, 76, 74, 74, 74, 90, 89, 60,212,167, 47, 4, 30, 30, 30,115,125,125,125, - 17, 19, 19,131,153, 51,103,138, 83, 83, 83, 47,159, 59,119,110,234,154, 53,107, 24,222,222,222,200,200,200,192,214,173, 91,117, -143, 30, 61,218, 6, 96,125, 21,229,248, 58, 53, 53,213, 89,169, 84, 34, 55, 55, 23, 36, 73, 66, 46,151,227,198,141, 27, 8, 8, - 8,200, 44, 22, 89,239,244, 53,174,101,203,150, 77, 24, 12, 6,206,156, 57, 3, 0, 63,160, 40, 98,255,229,161, 67,135,138,126, -250,233, 39,167, 21, 43, 86, 96,218,180,105,208,104, 52,216,178,101, 11, 86,172, 88,113,173, 88,100, 85,246, 16,253,213,222,222, -126,250,204,153, 51, 27, 45, 90,180, 8,161,161,161,182, 47, 95,190,108, 27, 17, 17,129, 90,181,106, 65, 44, 22,179,172,172,172, -176, 99,199, 14, 44, 92,184,240, 34,128,156, 39, 79,158,140, 78, 76, 76,244, 7,176,181, 10,209,126,192,201,201,105, 58, 77,211, -180, 92, 46,255,224,231,231,183,117,227,198,141, 88,184,112, 33, 98, 99, 99,145,159,159, 15, 19, 19, 19, 98,217,178,101, 19,127, -248,225, 7, 76,153, 50,133,150,201,100,251,254,211, 29, 53, 77,235, 32,151,196, 64,167,178, 64,171,230,238,104,213,172, 46,110, -221, 13, 3, 0,244, 28,238, 1,185,172, 16,199,143, 31,194,187,119,111,193, 98,179, 97,110,105,175,143, 39, 16,234,130,215,200, -211,100,160,151, 87, 91,244,243,238,142,223,126, 63, 11, 82,171,193,212,201, 99, 33,201,203,195,239,191, 31, 65, 66,226,123,176, -216,108, 88, 89,255,253,129, 80, 43,211, 34,255,120,161,165,199,240, 19, 40,138,130, 72, 36,194,203,151, 47,145,148,148, 4, 62, -159, 15, 5,169,163,246,223,121, 68, 17, 4, 39,141,162,233,199, 52, 89, 26,165,248, 75, 14,157, 78, 84, 38, 98,173,153,133,133, - 5, 87,165, 82,128, 36,181,101,122, 21, 2, 32, 0, 14, 11,112,112,172,135,212,148, 84, 90,169, 84,222,175,244, 13, 74,165,220, -241,199,229,243,190,157,187,120, 88,247,235,185, 14,151,175,172,134,164,160, 0, 74, 13, 27, 50,165, 6,114, 37, 96,110,233,134, -118,205, 91, 32, 61, 93,140,168, 23, 33, 82,150, 74,174,207, 68,209,183,187, 87, 77,118,157, 60,103, 41,140,235,116,129, 42,238, - 50, 40,105,102,169, 71,203, 72,104, 1,203,218,141,145, 39, 83,225,124,112, 24, 80,141, 84, 47, 89, 89, 89,114, 38,147,121,210, -215,215,119, 75, 88,216, 75,103, 0, 8, 11, 11, 75,203,200,200, 88,158,149,149, 85, 93,159,116, 73, 52,120,194,200,200, 56,172, - 97,195,134,233,109,219,182, 53, 27, 58,116, 40,172,173,173, 17, 17, 17, 1,127,127,255,215, 26,141,102,105, 72, 72, 72,165, 67, - 61,106,181, 90, 20,118,229,138,105,247,239,191, 55, 95, 58,112,224, 86, 95, 95,223, 29,235,215,175,103,187,186,186, 18, 90,141, - 6,209,209,209,244,169,147, 39,181,251, 86,172,216,206, 21, 8, 88,207,255,248,131, 77,170, 84,162,255,239, 70,236,228,228,228, -233,209,173,107,227,109,191,238,130, 82, 33,197,179,208,107,144, 72,178,113,240,208,165,198, 78, 78,180,167, 72, 36, 10,209, 87, - 0, 31, 59,118,108,113,135,214,173, 91,215,175, 85, 11,209,201, 73,224, 82, 58,112, 72, 18, 76,141, 10, 12, 82,137, 90,205,104, - 16, 12, 19,100,124, 44,192,198, 51, 23, 98,244, 17,198,141,190, 27,132,245,105,249, 32, 8, 2,191,116,106, 6,174,137, 16, 28, -129, 16,179,255,188, 91, 42, 12, 2,215,175, 0, 87, 40, 68,131, 14,122, 5,132,151,223,187,119,239,101,116,116,116,187,102,205, -154, 97,241,226,197,248,240,225, 3, 40,138, 66,102,102,166, 50, 35, 35, 67,148,157,157,253, 1, 69,241,127, 14, 87,209,137,149, - 85, 29, 78, 33, 33, 33,165,195, 13,193,193,193,112,116,116,132,153,153, 25, 10, 10, 10, 48, 99,198, 12,243, 31,127,252, 17, 0, -240,242,229, 75,148, 21, 40,159, 35, 58, 44,110, 91, 94, 33, 45,161,165,225, 67,115,201,240,230, 61,188, 83,209,123,192, 36,220, - 14,252, 13,119,111,221,129, 37,235, 67, 18, 4,133, 55,114,146,114, 10,210,100,174, 7, 26,183,153,202,204,144,221, 58, 48,119, -208, 27,166,131, 3,117,126,197,254,130,188,202,108,117,117,117,133,157,157, 93,233, 28, 45, 22,139,133, 41, 83,166,128,166,105, -125, 69, 86,113, 95, 67,101, 43,149, 74, 59,196,253, 47,128, 0, 0, 32, 0, 73, 68, 65, 84, 35, 35, 35,124,252,248, 17,239,223, -191, 71, 66, 66, 66,105,232, 0,138,162,180, 75,150, 44, 97,207,157, 59, 23,251,247,239,199,253,251,247, 31, 3, 88, 7, 64,223, -151,181,177,163, 70,141, 50, 81,171,213, 56,125,250, 52, 9, 96,192,249,243,231, 95,182,107,215,142,213,183,111, 95,147,189,123, -247,142, 45,174, 35,189,133,150,169,169, 41, 71,163,209, 96,239,222,189, 72, 77, 77,245, 4, 16,247,252,249,243, 3,163, 70,141, -218,215,172, 89,179,134, 49, 49, 49,111,165, 82,233,108, 0, 81, 85,145,101,102,102, 78,110,219,182,237,121,138,162,234,244,234, -213, 75,240,235,175,191,154,198,199,199,195,217,217, 25, 20, 69, 69,163,154, 41,172,222,190,125, 27,151,145,145,209,184,123,247, -238,184,113,227,198,102,157, 78,183, 9,192,150, 89,179,102, 57, 37, 39, 39,163,117,235,214,176,180,180, 68,124,124,124, 97, 70, - 70,198, 62, 20,165, 36,170,202,133,155, 8, 96,249,129, 3, 7, 90, 28, 56,112,192,199,210,210,178, 99, 68, 68, 4, 30, 62,124, -136,109,219,182,225,199, 31,127, 68,215,174, 93,177,120,241,226, 28, 0, 62, 0,200,196,196, 68,189,226,230,149,120,182, 0,160, - 77,155, 54,233,254,254,254,152, 58,117, 42,125,244,232,209,157, 39, 79,158, 92, 48,118,236,216,210, 62,112,226,196,137,244,137, - 19, 39, 38,162, 40, 13,211,127, 18, 90,141, 70, 13, 83,203,122,144,230,165, 32, 59, 53, 20,124, 19,123,120,247,104, 9,185, 66, -141,171,127, 92, 68, 84,116, 36, 24, 12, 6,236,236,107,193,220,194, 26,111,222,188, 5, 42, 95,109,172,213,104, 52, 48,177,168, - 11,105,126, 42,212, 89, 97, 48, 22,218, 98,210,247, 67, 33, 87,104,112,233,242, 69,196,196, 68,129,201,100,194,222,161, 22,204, -204,139, 56, 9,186,242, 21,204, 6, 0, 40, 39,158, 86,149, 66,139,201,100,222,187,121,243,230,136, 14, 29, 58,176,222,189,123, -135,119,239,138, 94,110, 36, 18, 9, 73, 64,119, 33, 43,250,143, 49,149,156,222, 11,197,171, 51,202,230, 46, 20,154,152,136,226, - 95,199,217, 73,114, 51, 17, 25,254, 8,239,222, 68, 35, 41, 33, 14, 26,141, 18, 76, 6, 3, 12, 38, 3,117,235, 53,197,163,199, -161,106, 37, 73,134, 86,196, 89,100, 71, 66,161,192,214,117,244,134,245, 43, 3, 23, 46, 93,107, 60,114,196,126, 68,197,191,130, -148,180, 7, 77, 3,246, 86, 2,180,170,191, 12,162,244,108,156,249,109,175,156,210,104,198,125, 22, 67,235, 11, 78, 0,176,203, - 65,147,125,135,126,155,114, 56,224,212,218,165,115,103,216, 13, 30, 54, 14,220,220, 87,208,166,135,161, 94,187,126, 32,120,230, -184, 30,116, 23, 33, 47, 95,101, 82, 58,122,173,157, 24, 71,223, 84,193, 89, 22,121,121,121, 79, 62,126,204,112, 46, 19, 5,222, -153,199, 51,170,106,117,220,231,156,159, 68,156,103, 50, 25,109, 54,108,216,160,181,179,179,211,196,196,196, 96,255,254,253, 84, - 88, 88, 88, 16,131,193,216,157,145,145,161,172,138,211, 70,171,141, 60,229,231,215,164,253,176, 97,244,152,185,115,229,224,241, -230,109,253,229, 23,191,108,137,196,145,166, 40,216, 88, 90,166,109, 93,177,194,127,196,168, 81,146,216, 71,143,140, 67,175, 92, - 49,230,146,100,152, 30,118,126, 11, 84,200, 41, 18,137, 66,238,223,127,136,227,135,127,133, 70,163, 66,134, 40, 25, 0,144, 35, -206, 71, 21, 34,235,115, 78, 90, 46,151, 15,251,225,199, 31,159,254,176,112,129,125,183,158,189,144, 18, 25, 1, 77,110, 54, 8, - 45, 9, 54,193,130, 44,139,143,172, 76, 41,150,159, 56,151, 37,149,203,135,149,211, 73,148,107,103,137,199,138,103,106, 2,142, - 64, 8,174,208,228, 19, 47,150,145,169, 41,184, 2, 33, 88, 92,110,121, 19,184,191,224,148, 74,165,195, 71,140, 24, 17,245,252, -249,115,139,169, 83,167,162,115,231,206,225, 10,133,194, 11, 64, 97, 77,203,147,162, 40, 81,183,110,221, 24, 4, 65, 8,199,141, - 27,199,203,206,206, 46,141,172, 46,149, 74,113,227,198, 13,184,187, 23,173,234,143,141,141, 69,211,166, 77, 43,228,156,182, 60, - 70, 4, 96,253,194, 17, 78, 91,159, 70,102,204, 3,176,185, 94,195, 90,184,123,235, 14, 30,222, 13,245,235,216,140,218,245,221, -184,118, 63,241,189, 70, 45,109,220,102, 42, 83,104,234,128,223, 47, 93,100,198,133, 29,217, 40,151, 71, 55,192,254,203, 75, 42, -178,147, 32, 8,208, 52,253, 69, 40, 7, 38,147,137,147, 39, 79, 86,247,218,207, 29, 62,124,120,214,204,153, 51, 57, 25, 25, 25, -120,253,250, 53,100, 50, 25,140,140,140,112,235,214, 45, 18,192,222,147, 39, 79,222, 58,121,242,100, 95, 20,173, 38, 10,174, 78, -251, 20, 8, 4,190,222,222,222,120,253,250, 53, 94,188,120,113, 17, 64, 84,120,120,248,197,119,239,222,141,238,218,181, 43,126, -251,237, 55, 95,133, 66,113,184, 58,156, 20, 69,149,141,153, 84,146,241, 33, 82, 42,149,118, 12, 13, 13,173,110,189,103,136,197, -226, 46,197,194, 58,213,206,206,206, 52, 50, 50, 18,181,107,215,134, 70,163,233, 80,221,182,148,159,159,255,235,238,221,187,143, - 78,158, 60, 25, 63,253,244,211,184,115,231,206,141,251,238,187,239,208,191,127,127, 28, 59,118, 12, 81, 81, 81,155,161, 95, 90, -177,242,174, 61, 10, 64,148,157,157,221,156, 90,181,106, 97,219,182,109,136,142,142,246, 95,191,126,253,138,168,168, 40,184,187, -187,243,226,226,226,200,154, 60, 67, 0,192,212,212,212, 84,171,213,226,202,149, 43,207, 0, 44, 28, 55,110,156,237,142, 29, 59, -124,132, 66, 33,114,115,115, 21, 49, 49, 49, 99, 1,252,241,159,126,214,209, 4,177,106,234,180,121, 7,166, 77, 29,107,212,182, - 77, 43,200, 11,210,160,144,102, 66, 94,248, 17,187, 15, 7,129, 32, 24,176,177,113,128,173,189, 51,146,147, 83,240,248,218,117, -181, 76,174,216,193,213, 82,155, 43,231,156, 91,196,217,186,136, 83, 46,203,130, 66,154, 85,202,105,107,235, 88,204,153,140, 71, -161,215,149, 10,153,236, 87, 53, 77,252,252, 55, 95,251, 63, 25,213,203,117, 88, 22, 18,137,100,254,140, 25, 51,188,150, 47, 95, -110, 69,146, 36,211,210,210, 18,201,201,201,228,133, 11, 23,114,165, 82,233,252,154, 88,195, 98,179,163, 92,221,220,189, 6, 15, - 30, 76, 14, 26, 52,144, 51,126,114, 95,150,141,173, 45,242,243,196,120,243, 58, 2,241,175,194,224,234,222, 18,107,214,111, 7, -204,205,171, 76, 36, 89,156, 86,103,192,186, 31,150,156,237,226,217,199,212,189,105, 75, 78,171, 6,102,208,104, 73,164,165,165, -225,143, 43,145,154,152,151, 15, 11, 40, 82, 61, 90,158,163, 95, 10,158, 16,128,132, 24, 7,155,217,106, 78,110,218,186,123,241, -222,131,199,151, 46,159, 55, 85,208,213,163, 55,162,239,252,134,139,129,103,101, 74,149,122, 43,135,137, 95, 98,196,144,191,169, -102, 25, 40,149, 74,205,231,253,169, 82,169,212,124,109, 77, 31, 59,118, 12,153,153,153,234, 15, 31, 62,220, 36, 73,242, 92, 37, -201,158,191,192,110, 64, 61, 84,165,186,243,131,135, 71,223, 31,110,221, 50,154,184,108,153,122,220,248,241, 75,160, 82,105,192, -229,210, 44,129,128, 1, 30,143, 29,251,232,145,241,206, 89,179, 44, 9,181,250,246,241, 74,194, 6,148,131,111,190,234,176,196, -163,213,189,123, 87, 76,156,186, 16,138, 50, 30,173, 39, 47,222, 64,165,129,222, 30,173, 98,164,124, 72, 77,237, 56,111,213, 15, -151, 70,123,247,108,220,172, 78, 93,158,141, 75, 93, 8,237,237, 33,206,206,198,163, 23,241,218,245,103, 47,197, 20,139, 44,189, -226,202, 80, 20, 85, 52,201, 29, 64,207,249,203, 65, 48,153, 64,113, 24,135,146,149, 67, 46,237, 58,131, 96,177,160,163, 41,168, - 84, 42,125, 38,253,165,189,127,255,126,248,184,113,227,130, 3, 3, 3, 25,222,222,222,173, 46, 95,190, 76,125, 77,219, 81, 40, - 20, 29, 1,192,200,200, 40,201,220,220,220,105,242,228,201,208,106,181,144,203,229,200,207,207, 71, 90, 90, 90,222,228,201,147, - 53, 0, 96,108,108,204, 29, 49, 98,132,105, 85,156,219, 47,136,148, 11, 71, 56,237,178,100,125,240, 41,200,137,114,177,100,125, - 72,234,216,140,218,181,253,130, 72,105,234, 40,219,144,243, 33,228, 77,134,236,214,129,223, 47, 93,100, 78, 24, 58, 92,231, 44, -124,235,103,100, 75, 95,168,138,151, 32,136, 47,130,147,234, 41,178, 62, 65, 97, 97,225,138,213,171, 87,247,151, 72, 36,206,125, -251,246,229, 52,110,220, 24, 79,159, 62, 69, 96, 96, 32,249,228,201,147, 84,153, 76,182, 18,128, 18, 64, 80, 77,202,212,205,205, -205,133,197, 98,149, 12,165,237, 41,254,120,207,229,203,151, 71, 79,157, 58, 21,117,235,214,109, 18, 23, 23,199, 67, 53,238, 35, -154,166, 75, 71, 25,190, 37, 8,130, 72,216,185,115,167,147,189,189, 61,113,227,198, 13,146,201,100,214,196,115,115,236,200,145, - 35, 29,180, 90,237,180,233,211,167,195,211,211, 19, 36, 73,226,196,137, 19, 56,114,228,136,190, 34,171, 82,188,121,243, 38, 44, - 53, 53,181,219,146, 37, 75,176,109,219,182, 21, 75,150, 44, 65,106,106, 42,222,188,121, 19,241, 53,188, 5, 5, 5,138,148,148, - 20,126,167, 78,157,218,198,196,196,196,120,121,121, 53,157, 58,117, 42, 54,111,222, 76,223,191,127,127, 4,128, 27,255, 31,189, -119,252,187,220, 0,182,142,117,107,253,134, 95,127,108, 80,223,101,230,148, 73,163,152,110,174, 77, 33,203, 79,131,149,181, 29, -156,107,213, 67,118, 86, 14,110,222,188,161,203,201,201, 59,166, 99, 16,235,222,189,203, 77,255, 26, 78, 39,231,122,200,202,202, -194,245,235,215,117,121,146,130, 67,208, 50,214,199, 37,231,101,194, 0,125, 60, 89,211, 81, 73,148,248,202, 96,109, 97, 97,113, -218,212,212, 52,211,212,212, 52,211,194,194,226, 52,160,215,234,131, 94,101,158, 14,204, 79,182, 17, 35,140, 96,100,212, 17, 44, -214, 34,115, 11,139, 27,102,102,102,226,238,221,187,171, 15, 28, 56,160,140,139,139,165, 68,162, 84,218,204,204, 44,191,244,248, -242, 56, 63,131,133, 69,125, 19,129, 67,211, 31,205,156, 91, 61, 18, 58, 52, 41, 20, 58, 52, 41, 52,115,110,249, 88,224,208,100, -173,133, 69,125, 19,189,236,172, 0,245,108, 97,227,106,141,189,238, 54,132,194,213, 26,123,235,217,194, 70,239,107,175,124,216, - 79, 71, 16,208,161,104, 25, 54,106,192, 89,194, 65, 49,153,204,227,206,206,206, 14,168, 94,192,186, 47, 56,199, 3,117,199,243, -120,211,206,251,249, 77, 76,186,127,127, 92, 65, 98,226,152,252,132,132, 81, 17,103,207,142,222, 51,122,244,248, 49, 60,222,244, - 17, 64,125,125, 57, 29, 28, 28,252,195,194,194, 2,245,221,202, 8, 47,189,203,179,126, 61,167, 91,222,189, 58,208,190, 51,134, -209,190, 51,134,209,222,189, 58,208,245,235, 57,221,250,138, 58, 34,152, 76,166, 15,159,207, 63, 45,224,243,163, 5,124,126, 52, -159,207, 63,205,100, 50,125, 80,249, 28,170, 79, 56,173,172,172, 94,218,217,217,101, 86,103,179,182,182, 14,175,134,157, 99, 92, - 92, 92, 82, 25, 12,198,246,106,222,211,149,113,186, 26, 27, 27, 39, 8, 4,130,180,178,155,177,177,113,217,192, 80, 86,124, 62, -255,170, 64, 32,216,161, 15,231,207,171,154,254,248, 56,104, 78,212,207,171,154,254,248,249,119,115,135, 88, 76,126, 26,188, 78, - 60,119,136,197,100,125,236,180,181,181,189,111,107,107,155, 97,107,107,155, 97,103,103, 87,233,102,109,109,253, 82, 15, 78, 35, - 19, 19,147, 29, 38, 38, 38,153, 2,129, 64, 39, 20, 10, 51, 5, 2,193,118,148, 9,109, 81,211,242,100, 48, 24,155,155, 52,105, -162,100, 50,153, 71, 63,251,106, 91,131, 6, 13,148, 44, 22,107,107, 53, 57, 77,187,118,237,170,139,140,140,164, 61, 61, 61,105, - 0, 22,223,176,222,237, 45, 44, 44,110,152,154,154,166,152,152,152,236, 6, 32,168, 33, 39, 1,192,199,201,201, 41,162, 71,143, - 30,114, 39, 39,167, 80, 0,131,191,161,157,253,135, 12, 25, 66,165,164,164,208, 52, 77,211, 41, 41, 41,244,144, 33, 67, 40, 20, - 5,138,252,154,103,242,170, 89,179,102,209, 79,158, 60,161,159, 60,121, 66,135,134,134,210,253,251,247,167, 0,124,255,149,207, -121,124,171,107,111, 92,207,186,126,163,134, 22,231,198, 14,247,160,130,254,216, 78,175, 89, 57,147,238,237,217,148,118,111, 96, -113,201,213,213,202,245, 91,112,254,184,114, 6,221,171, 91, 19,170,113,125,139,179,141,235, 89,215,255, 15, 95,251,191,209,171, -133,191,123,194,217, 95,174,197, 79,197, 82,249,112,116,116,132, 88,220,193,136,197,242,224,241,120, 94, 12, 38,243, 94,110,118, -246,130,226,215, 45,221,127,202, 85, 91,105,135, 94, 31,220, 74, 82, 18,212,132,243,147,137,236, 53,228,172, 14,135, 94,156, 21, - 37,149,166, 84,170,116, 43,146,124,185, 27,149,150,193, 39,156, 78, 78, 78,211, 40,138,114,209,215, 32, 6,131,145, 36, 18,137, - 14,215,164, 60, 27, 54,108, 72, 23, 15,111, 19,223,178,222,255,142,182,244,191,196,249,251,175,205, 29,221,155, 55, 90, 26, 29, - 22,183,173,120, 88,177, 20,107,231, 90,152,120,244,232,190,250,209,221,251, 63,173,221, 45, 41,252,127,190,118, 6,244,156,211, -246, 13, 56, 75,130,132, 86,139,147,205,102, 31,104,223,190,253,180,167, 79,159, 30,213,233,116,211,255, 71,219,103,127, 38,147, -185,196,205,205,173,213,155, 55,111, 34,116, 58,221, 54,148, 19, 40,178, 6,118,174,116,113,113,153,205,225,112,120, 82,169, 84, -146,158,158,190, 26,192,185,255,182,242,108,220,208,178, 45, 77,151, 6,221,222,248,250,125,238,243,111,198, 73, 83, 58,138,102, -110,120,147, 40, 14,255,127,168,247,127,155,200, 58,244,159,248,225, 94, 6, 78, 3,167,129,211,192,105,224,252,230,156,198,134, -242, 52,112,254, 11, 57,255,149, 96, 25,138,192, 0, 3, 12, 48,224, 31, 7,133,161, 8, 12, 48,224,191, 14,101,189, 90,165,222, - 44,162, 18, 85, 90, 29,151, 96, 77,148,237, 29, 3,167,129,211,192,105,224, 52,112, 26, 56, 13,156,255,115,156,255, 86,145,117, -168,146,253,191, 13, 6,183,170,129,211,192,105,224, 52,112, 26, 56, 13,156, 6,206,255, 5,161, 85,238,190, 97,232,208,128,191, - 29,187,134,194, 9, 0,230, 93,134,232,239, 56,222, 0, 3, 12, 48,192, 0, 3,254,159,113, 8, 21, 12, 29,254, 55, 8, 45, 71, - 0, 29, 81,148,248, 54, 30,192, 67, 0,146,175,224,179, 6, 48,138, 32,136,145, 0, 64,211,244,121, 20,173, 26,201,209,231,100, - 35, 35,163, 76,165, 82,105, 91,252,127,150, 82,169, 44,155,203,128,192,151,171,217,232, 50, 91,185,112,113,113,201, 84,169, 84, -182,122,252,124, 62, 77,211, 81, 12, 6, 35, 90, 40, 20,222,125,243,230, 77, 96,117, 46,220,203,203,107, 34,147,201,220, 8, 0, - 58,157,110,213,189,123,247,142,255,141,245,214,161,150,163,253,111, 26,173,134,204,204,206, 93,141, 47, 3,249, 1, 0,246, 14, -128, 63, 65, 98,105,241,255, 91,231, 4, 86, 30, 71,167,186,199, 87,130,182,108, 54,219,215,206,206,174, 95, 90, 90,218, 75, 0, -203,128,170,163, 26,215,170, 85,235,123, 22,139, 53, 78,167,211,213,103, 50,153, 9, 36, 73,158, 76, 77, 77, 13, 48, 60, 67, 12, - 48,192, 0, 3, 12,208, 67,108,125,129,106, 9, 45,119, 43,216,211,128, 15, 8,244, 6,141,219, 4,112, 38, 94,140,143,250,158, -255,157, 59,180, 90,178,232, 55, 57, 12,232,110,188,103, 28,234,215,175,159,243,220,185,115,209,185,115,103, 60,125,250,180,211, -177, 99,199, 38,159, 59,119, 46,138,162,168,123, 0,158, 2,122,133, 82, 16,160, 40, 78,203,216,126,253,250,245,218,184,113, 35, -179,105,211,166, 80, 40, 20,184,127,255,190,199,214,173, 91,119, 60,126,252,248, 14,128, 83,197,130,160,194, 4,120, 74,165,210, -182, 36, 25, 39, 65, 16,182, 35, 70,140,120, 94, 86, 92, 21,231, 87, 35,104,154,126, 66, 16, 68,168, 78,167,123,122,225,194,133, - 84,119,160,195, 12, 23,206,133, 5, 73, 26,231,207, 57, 85, 42,149,237,149,159, 55,129,197,227, 65, 85, 88,128, 78,147,254, 18, -189,183,127, 92, 10,130, 34,193, 4, 45,241,218,176, 35, 10, 64,116,122,122,122,148,167,167,103, 82,117,107,152,201,100,110,188, -121,243,166, 3, 77,211,240,246,246,222, 8,224,239, 18, 90,188,142,109, 91,222,187,122,241,180,145, 52, 55, 19,125, 7,143, 62, -249, 54, 53,107, 34,128,139,159,136,166,126,176, 35, 8, 44,157,181,233, 20, 19, 0,246,173, 28,187,108,123, 31,236, 90, 24,132, -143, 0,188,138,197, 15, 0,252, 12,224,222,222,126,176, 3,176,124,214,166, 83, 4, 0,236, 95, 57,118,233,222,126,216, 57,231, - 70,181,195, 86,204,158, 56,113,226,174,141, 27, 55, 50, 29, 28, 28, 32, 18,137,250, 54,105,210,196,173,160,160,160, 9, 42,153, - 68, 92,183,110,221,179, 93,123, 12,172, 55,108,164, 15,223,198,218, 2,233, 25, 57,166,103, 79, 31,157,193,124,114,191,223,135, - 15, 31, 70, 27,158, 33, 6, 24, 96,128, 1, 6, 84,128,154, 71,134,111,237, 0, 99,153, 6, 67, 88, 76,226,251, 46,109,155,244, - 28,243, 93, 87, 70,147,198, 13,241, 42, 54,174,207, 31,119,159,109,101,132,198, 6,147, 58, 58, 64,192,193,149,240,140,202, 87, -194,104, 73,176,130,174,156, 42,234, 9, 39,143,101, 62,127,254,188, 97,155, 54,109, 74, 83,195,244,236,217, 19, 61,123,246, 36, -246,237,219,215, 50, 40, 40,168,229,145, 35, 71, 52,193,193,193,191,161,242,248, 40,190, 13, 26, 52,216,186,107,215, 46,158,167, -167, 39,120, 60, 94,233, 23, 66,161, 16, 3, 7, 14,196,192,129, 3,153,233,233,233,222, 87,175, 94,245,254,249,231,159,213,201, -201,201, 75,240, 87,148,230, 74,177,122,245,234,182,229,124,124,147, 32,136,247, 36, 73, 70,180,108,217, 50,213, 13,104, 56,227, -187,206,183,103,119,113, 21, 44, 88,113,172, 92, 30, 22,151,139,223, 39, 22,245,213,101,133, 86,210,221, 27, 16,154,154,136,249, - 38, 38, 81, 0,162, 1, 68,209, 52, 29,157,144,144, 16,215, 8,104,217,209,130,241,219, 81, 9,213,162, 26, 98, 11,169,169,169, - 48, 51, 51, 51,246,244,244,204, 32, 8, 98,237,253,251,247,191,245,132,188, 14,107,151,206,230, 72, 62, 68,225,227,235, 39, 88, - 52,210,131,191, 96,247,159, 63, 41,213,218,139,149,157, 68, 16, 12,198,207,161,148, 31,138,146,241,174, 22,139,197,158, 0, 96, -101,101,197, 5,112,111,251, 51,124,183,176, 11,241, 53,177,221, 56, 76, 38,115,239,177, 99,199,166,126,255,253,247, 69,169, 35, - 30, 61,130, 80, 40,196,250,245,235,235, 46, 94,188,216,159, 36,201,249, 21,121,178,186,246, 24, 88,111,231,182,159,154, 20,230, -230,171, 14,238, 61,247,194,177,153, 59, 99,150,239, 98,147,157, 26,149,189, 78,167,251,222,224,217, 50,192, 0, 3, 12, 48,160, - 58,222,172, 42,133,150,155, 53,142,183,110,230, 58,106, 76,127, 15, 94,243,102, 77,193,225,253, 21,186,165, 77,219,182,104,211, -182, 45,195, 79, 90,216,251,249,139,176,222, 23,130,158,170,228,218,228,115,111,114, 48, 81, 95,171, 74,146,210,110, 28,108,215, - 67,150,151,101, 4, 0, 2,115, 91,229,202, 43, 31,239,118,233,210, 5,206,206,206,156,224,224,224, 41, 85, 8,173,149,241,241, -241, 60, 38,179,242,120,168,142,142,142, 24, 49, 98, 4,220,221,221,185,221,187,119, 95, 89,145,208, 50, 50, 50,202, 34, 8,194, - 22, 0, 44, 45, 45,117,107,215,174,141,160,139, 0, 0, 52, 77,211, 79, 24, 12,198, 83,138,162,158,253,249,231,159,105, 77, 0, -219,190,109,220, 31,206, 30, 63,130, 79, 95,216, 81,161, 72, 80, 22, 20,148,251, 57, 95, 40,200, 54, 22, 8,162,120,124,163,104, - 20,229,242,138,118,118,118,142,107, 2, 56,183,119,119, 9,218,183,112,172,201,209,233, 63, 85, 89,150,173, 91,183,118,107,209, -162,133,145, 78,167,131, 76, 38,195,254,253,251,205,140,141,141,205,250,245,235,183,166,108, 3,104, 12, 52, 31,238,200,156,190, - 46, 93, 55,167, 6, 13,201,188,107,167,182, 31, 70, 12,236,103,218,182, 99, 87,188,189,119, 2,185,185,133,200,207,147,130,162, -168, 47,226,250,204,185,129,204,189, 3,176,117,223,138,177,203, 9, 6,131,104, 57,116, 25, 6,217,231,207, 59,112,224, 64, 44, - 0, 54,151,203, 45,219, 14, 29,141,157,154,109,109,216,167, 43,246,175, 26, 15,154,162,104, 0, 91,171,225,205,178, 53, 49, 49, -249, 35, 40, 40,168, 67,187,118,237,240,244,233, 83, 36, 38, 38, 98,246,236,217,234, 57,115,230,112, 38, 76,152, 64, 44, 90,180, -104,238,207, 63,255,124, 1,192,227, 47,110, 4, 22,107,220,224, 97,163,185,210,188, 2,165, 90,165, 81, 91, 90,155, 83, 42,153, - 82,158, 35, 41, 80,142, 30, 59, 77, 29, 27,254,108, 28,128, 47,132,214, 87,150,167, 1, 6, 24, 96,128, 1,122,128,166,233,118, - 0,108, 0,100, 19, 4,241,162,236,126,241, 33, 37,217, 90, 62,223,207, 65,209,168,148, 85, 25,186, 28, 20, 77,247,177, 1,160, - 3,240,156, 32, 8,201, 87,154, 88,249, 42,195,192,192, 64,186,236,223, 50, 66,139,166,105,154,214,138,223,211,170, 55, 55,104, -249,139,195, 95,108,138,216,139,116,198,243,115,244,179, 83, 63,210,110,214,149,103, 97,255,206, 29,218,177, 45, 64,207,106, 7, -122,126,119,115,229,243,231,207,131, 41,138, 10,244,235, 10,154,126,117,138,166, 95,157,162, 23,118, 2,125,225,194,133,155,254, -254,254,129, 1, 1, 1,129, 0,170,154,167,148, 89,248, 34,148,126,102, 11,186, 34,196,199,199,211, 7, 14, 28,160, 87,172, 88, - 65, 31, 61,122,148, 70, 21, 17,212,189,189,189,239,199,196,196,208, 19, 38, 76,136, 64, 37,129, 1, 27, 3,130,113,117,237, 95, -171,206,238,208,168,191,111, 78, 75,186, 25,149,123,253, 14, 14, 14,159,216,179,217,213,158,222,211,222,149, 62,222,187,205, 71, -154,166,111,210, 52,189,153,166,233,209, 52, 77,187, 3, 64,107,192,116,176,131,213, 59,229,185,157, 10,245,244,142, 85,230,189, -107,221,186,181,219,146, 37, 75,114,213,106, 53,157,148,148, 68, 31, 60,120,144,190,125,251, 54,125,229,202, 21,218,195,195, 35, -189,140,189,118,147,221,235,100,170,143,172, 83,213,164, 21,177,153,204, 61, 47,110, 95,160,223, 61, 60, 79, 63, 63,227, 79,159, -252, 97, 12, 61,119,112, 7,141,169, 49, 79, 9,160, 71, 69,231,205,233,130,134,238,117,109,222, 36, 39, 39,211, 26,141,134,158, - 52,105, 18,237,237,237, 77,247,233,211,135,238,213,171, 23,221,179,103, 79,186, 71,143, 30,244,221,187,119,233,244,244,116,186, - 87,215, 54,178, 1,141,209,182, 26,166, 53,171, 83,167,206,199,164,164, 36, 90,163,209,208,193,193,193,244,137, 19, 39,232,224, -224, 96,218,207,207,143, 6,112,124,214,172, 89, 10,137, 68, 66,123,123,123,167,161,156,168,241,117,234,212,137,139,121,147,154, -186,125,211,225,187,191,239, 57,125,247,210,133,219,119,255,184,245,252,218,149, 91, 47,206, 61,139, 76,184, 82,167, 78,157,184, -114,234,255,171,202,211, 0, 3, 12, 48,192,128,170,181, 72,177,208,234, 95,236,236,232, 79,211,116,175,207,246,251, 23, 11,167, - 47,246,253,252,252, 86,148,221, 47, 57,198,207,207,111, 5, 0,186, 83,167, 78,167,105,154,110,248, 13,204,159, 94,206, 86,181, - 71,171, 4,100,218,115,112, 92,251,129,173,211, 66,155, 19, 15, 42, 47, 25, 16,216, 67, 65, 8, 33,206, 72,198,235,135, 23, 43, - 79, 36, 81,140,235,241, 96, 3, 8,142,139,139,195,235,215,175,145,154,154, 10, 62,159,255,197,113,143, 30, 61,130,177,177, 49, - 28, 28, 28,244, 83,186,234, 79,251,185,168, 54,117, 32,236,228,137,156, 49, 51, 17, 28, 28,140,172,172, 44,112, 56, 28,112,185, - 92,144, 36, 89, 37, 31,131, 81,148,241,183,196,139, 85,222, 49,158, 0,139,103, 41,188,186,111,205,124, 23,198,147, 64,182, 34, -229, 29,210,149, 58,253, 60,121, 66, 1,248, 2,126,134,177, 49,191,116,184, 16, 64, 52, 65, 16,111, 91, 3,108,129,208,232,234, -111, 27, 22,217, 51,195,131,141, 20,239,162,202,229,232,213,171,215, 12, 0,107,104,154,206,107,209,162,133,221,198,141, 27, 45, - 68, 34, 17, 94,189,122,133,115,231,206,101,147, 69, 23, 74,208, 52,189, 14, 0, 58, 2, 70,230, 54,230,183,246,252, 56,223, 4, -247,206,114,107,210,138,204, 26, 15,188, 54,124,194,172, 57,187,230, 15,132,172, 80,129, 83,183,195,113, 51,236,253, 32, 0,143, - 80,201,188,183,189,143,241, 14,200,238, 57,108,216,176,136, 7, 15, 30, 88, 31, 57,114, 4, 36, 73,150,187, 29, 57,114, 4,119, - 30,134,205, 3,240, 82, 79,179, 28, 93, 92, 92,238, 60,123,246,204,134,207,231,227,246,237,219,200,203,203, 43,245,100, 77,156, - 56,145,200,203,203,243,217,191,127,255,240, 15, 31, 62,108,123,248,240,161, 24, 69,185, 32, 63,105, 8, 76, 38,243, 61, 73,106, - 26, 57, 52,110,200, 26, 57,176,107, 87,169, 56, 10, 66,171, 22,120, 18,249,254,106,158, 68,172, 96, 50,153,239,203, 30,255, 45, -202,211, 0, 3, 12, 48,192,128,234,129, 32,136, 64,154,166, 7, 16, 4, 17,248,249,103,159,255, 95,114,156,191,191,127,233,126, -201, 57,155, 55,111,222, 84,102, 95,254,141,204,171,116, 50,124,247, 98, 5,217,189,188,131, 84,175, 46, 65,245,250, 15,112,234, -116, 1,215,125, 16,152,117, 60,144, 18,117, 15,145, 55,182, 35, 45,246, 17,104, 74, 7, 7,183,246,250, 26,162,108,212,168, 17, -148,202,162,169, 89, 42,149, 10, 28,129,133,114,209,244,177, 70, 0, 64,177,140, 84,101, 20,172, 94,132, 38, 93,188,208, 62,147, -198,115,187, 34, 71, 69,251,204,162,243, 54, 76,154, 4, 14,135, 3, 14,135, 3,162,120,234,143, 62, 66,139, 40, 62,152, 42, 26, -190, 42,207, 8, 66,206, 99,159, 58,179,198,183, 61,239, 67, 52, 87, 21,243, 4,233, 42,138,190,154,169,187,166,143,189,124, 1, - 95,100,204,231, 71, 27, 11, 5,165, 66,139, 32,136,247, 0, 64,179,217, 1, 39,214,249,182, 16,100, 38, 8,148, 47,130,145,161, -164, 52, 21,208,172,187,113,227,134, 45,139,197,178,215,233,116, 72, 73, 73, 65,108,108, 44,118,238,220,153, 89, 88, 88,216, 61, - 60, 60,252, 77, 89,237,168, 51,230,158, 11, 88, 63,191, 30, 43, 42,196, 72,245, 62,166,218,173,199,186,217, 16,239, 65,221, 91, - 94,155, 49,126, 21,134,124,215, 7, 19,186, 55,161,147,210,115,149, 0,110, 23,187, 94,171,130, 40, 60, 60,188,119,183,110,221, - 78,182,106,213,170, 49, 77,211,104,222,188, 57,124,124,124, 16, 16, 16,128,200,200, 72, 20, 20, 20,104,130,130,130,118, 0, 56, -166,167, 89,124, 11, 11,139,155,119,239,222,181,225,243,249, 8, 10, 10,130, 66,161,128,131,131, 3,230,204,153,195,221,188,121, -243,239, 5, 5, 5, 35,253,253,253,141,146,146,146,246,220,186,117,171, 46,138,242,206,125,209, 8,212,106,245,161, 83, 1,199, -119,205,241,157,235,116,247,233,171, 96,149,180,208,172, 78,157,212, 2, 27, 11,161,201,142, 45,235,106,171,213,234, 25,229,151, -231,253, 26,149,167, 1, 6, 24, 96,128, 1, 95,160, 82, 45, 82, 86, 60,125, 46,182,170, 35,210, 0, 40,252,252,252, 86, 18, 4, - 17,232,231,231,183,210,223,223, 95, 1, 32,253,239, 16, 89,165, 66,107,192,128, 1, 33,129,129,129, 24, 48, 96, 64, 72,133, 20, -148, 14,154,164, 7,208, 36, 61,128,113,167,121,248,211,127,204,103, 23, 79,213,216,186,129,235,111,223, 85,169, 84,172,227,199, -143,151,206,219, 2, 0,157, 78,247,205,107,177, 58, 66,171, 88,232,125, 97,132, 11, 79, 24,114,104,225,200,142, 86, 58, 57, 91, -253,232, 42, 68, 42,138,220,246, 78, 35,127,145, 71,255, 92, 17,231,149, 5, 51,144,250,240, 14,248, 66, 97,234,212, 7,209,165, - 94,172, 98,145,149, 8, 0,117,121, 38,193, 7,230, 15,241,176,231,128,163,190,118, 30,233, 42, 74,117,224,131,246, 88, 5,141, - 13, 52, 77, 35, 49, 49, 17,114,185, 28,161,161,161,184,120,241, 98,118, 57, 34, 11, 46, 60,225,253,163,203,198,117, 48, 45,252, -200, 81,191,184,131,116, 21,165,215, 80,151,117,243, 33, 93, 56, 12, 34,136, 96, 48,141,123,118,116,195,130,105, 67,177,253,232, -159,164,218,182,235,128, 93,127, 92, 31, 37, 85,105, 86,234, 41,178, 74,157,141,225,225,225, 77,194,195,195,121, 0,188,124,124, -124,174, 15, 31, 62, 28, 33, 33, 33,184,122,245,170, 43,128,140,226,227,214,163, 40, 81,246,207, 0, 18, 42,114, 60,114, 56,156, - 51,119,238,220,105,234,232,232,136, 59,119,238, 64,161, 80, 96,214,172, 89,106, 95, 95, 95,206,196,137, 19,137,252,252,252, 82, - 79, 86,104,104,168,184, 34,145, 5, 0, 34,145,232,198,197,115, 39, 58,119,235,214,109,104, 61, 87,119,211,132,194,130, 44, 62, -223,200,248, 97,200, 61,206,139,103,143,247,136, 68,162,231,229,151,103,176,222,229,105,128, 1, 6, 24, 96, 64,197,208, 75,139, -124,230,153,170, 14,202,156,199,246,247,247,143,245,247,247,255,196,227,245,149,248,124,213,225,181,146, 62,173, 70,113,180,116, -249, 41, 95, 94, 0, 69, 85,231, 98,191,248,204,194,194,130, 52, 54, 54,254, 68,104, 81,122,114,230, 94, 62,141,132,217, 99, 75, - 61, 89, 37,158, 45,244,157,248, 85, 66,139,162,168, 80, 0,159, 24,193,183,117, 27,179, 99, 96,227, 46, 77,234, 57, 49,180,231, -118, 34, 77, 78, 42,215,196,107,148,175, 11,233, 65,113,229, 76,178, 46,229, 36,181, 48, 18, 24, 39, 27, 11, 5,159,139,172, 15, - 0, 32,176,115, 29,190,173,159,123,247,150,238, 13, 24,228,217, 95, 33,146,107,165,126,113, 26, 77,130,140,190, 84, 65, 25,174, -233,211,167,207, 26, 43, 43, 43,163, 93,187,118,153,213,169, 83, 7, 36, 73,170, 63, 23, 89,124, 91,183, 49, 59,135, 52,235,226, -102,111,193,208, 94,216,141, 84,133, 78,190, 51, 65,251,187, 62, 34,203,218, 76,120,235,192,166,217,198,124, 30, 27, 74,165, 18, -155,247, 93, 64,208,227,152, 1, 57, 49, 87,110, 1,184,245, 21, 13,114,234,128, 1, 3,182,175, 95,191, 30, 90,173, 22, 83,166, - 76,193,251,247,239,131,226,227,227,119,214,174, 93,123,201,178,101,203, 28,237,237,237, 49,106,212, 40,142, 86,171,157, 88, 1, -199,150, 83,167, 78, 13,104,217,178, 37, 66, 66, 66,144,151,151, 7, 7, 7, 7,248,250,250,114,253,253,253,127, 47, 40, 40, 24, -185,105,211, 38,163,196,196,196, 74, 61, 89,159,180,107,157,110,195,193,237,179,151,180,235,232,193,120,247,238, 13,153,210,222, -147,113,239,206,213, 7, 86, 86, 86,191,167,164,164,252, 85,158, 67,155, 87,187, 60, 13, 48,192, 0, 3, 12,248, 54, 32, 8,226, - 90,241,188,171, 79,188, 92,159,139,176, 18,143, 85,217,253,207,143, 47,254,254, 91,188, 44, 31, 42, 71,120,125, 26,222, 97,192, -128, 1,122, 47,171,167,100,217,122,137,167,207,241,157, 59,180, 78, 66,176, 86,122, 50,192, 17, 88, 40, 7,174,191,125,183,162, - 99, 5, 2,129,222, 30, 45, 74,165,172,170, 82,170, 37,180,138,231,104,221,164,105,250, 19,161,101,102,231,230,185,124,217,252, - 29, 30,195,251, 50, 50,167,117, 66,158, 84,165, 90,246,138,164,210,228,149,139,172,162, 94, 92,155,196, 23, 8,163,141, 4,252, -178, 34, 43, 5, 0,140,108, 27,180, 95,186, 96,206,190, 30, 99, 6, 18,217,179, 60, 32,201, 83,168,150,196,146,132, 72, 65,143, -140, 3,238,149, 71,119,247,238,221,131, 0, 14,122,122,122,102, 10, 4, 2, 72,165,210, 47,234,160,196,222, 46,195,251, 50, 50, -167,118, 64,174, 76,163, 90, 22, 75, 34, 93, 65,157,169, 74,100,217,152,155,220, 58,176,113, 54, 63, 61,237, 3, 56, 28, 14,132, - 66, 33,110, 63,138, 70, 78,236, 31, 95, 35,176,192, 96, 48,214,250,249,249,173,153, 51,103, 14,196, 98, 49,174, 94,189,138,239, -190,251, 14,167, 79,159,174,115,253,250,245,237, 94, 94, 94, 96, 50,153, 8, 12, 12,132, 86,171,125, 91, 1,205,208,233,211,167, - 47, 25, 62,124, 56,158, 63,127,142,140,140,140, 79, 60, 89,121,121,121, 62,251,246,237, 27,158,148,148, 84,165, 39,235, 51,180, -119,105,208,154,179, 98,245, 47, 80,201,179, 88,217,162,167, 33,193,183, 25, 79,114,115,115,249, 0,242,107, 90,158, 6, 24, 96, -128, 1, 6,232,237,213,170, 72,139,100, 23,139,168,236,242,246,203, 8,172,242,246,137,207,188, 96,234,207,190,143,252, 59,175, - 73, 47,143, 22,203,174, 25,200,204,152, 50, 66, 43,235,147,239,141, 76, 44,245, 26, 58,212,146, 96, 29, 56, 86, 26, 71,203, 72, - 44, 22, 27, 89, 91, 91, 43,203, 10, 4, 62,159, 15, 71, 71, 71, 72, 36, 18, 28, 58,116, 8,168,122, 82, 52,105, 58,124, 60,218, -143,153,130, 23,206, 92,208, 90, 77,169,103,235,192,164, 73,159,136, 45, 14,135, 83, 50, 55,172,170, 78,247, 89,177,167,233, 9, - 0,186,181,107,189,159,140, 4,130, 73, 70,214,181,172, 23,204,158,202, 78,202, 82,225,174,199,138,188, 11, 91,150, 11, 83,105, -225,156, 20,228, 63,174,130, 47, 97,240,254, 19,159,123,178,210, 90,185,214, 91,101,196, 55,154,198,181,172,107,239,183,104, 54, - 59, 41, 83, 69,220,109,191,172,224,226,207,203,248,137, 48, 89,146,134,188,123,122, 84,207,154,239,190,251,110, 13, 77,211, 52, - 69, 81,171, 1,160,172,189,139,124,167,177, 19, 62, 42, 17,236,177, 74,114,113,203,114,147, 84, 84,110,175,117,243, 33, 93,236, - 44, 76,111, 29,216, 52,135,159, 33, 74, 6,143,199,131,137,137, 9, 82, 51,243,193,102, 49, 21, 95,217,222,120, 93,187,118, 93, - 62,123,246,108, 68, 71, 71, 99,214,172, 89, 25, 41, 41, 41,151,206,158, 61, 59,235,199, 31,127,100,121,123,123, 35, 35, 35, 3, - 91,183,110,213, 62,122,244,104, 19,128,173,229,182, 71, 22,107,234, 79, 63,253, 68,167,167,167, 19,137,137,137,112,112,112,192, -220,185,115,185,155, 54,109, 42,157,147, 85, 29, 79, 86, 9, 68, 34, 81, 72,208,157, 39, 24,116, 99, 7, 72,173, 42, 36, 79,156, -242,224,117,130, 36,196,146,203, 93,236,212,186,121,141,202,211, 0, 3, 12, 48,192,128,111,226,197,122, 81,217,254,127, 1,202, - 27, 58,212, 75,104,189,221,189,106,178,235,228, 57, 75, 97, 92,167, 11, 84,113,151, 65, 73, 51, 75, 61, 90, 70, 66, 11, 88,214, -110,140, 60,153, 10,231,131,195, 0,224,109,117,172, 42, 44, 44, 68,155, 54,109,176,119,162, 91, 15,101,161,216,200, 24,128,138, -103,170,188,194,237,122,247,250,245,235,114,138,162,206, 0,184, 94, 5,205,218,166, 77,155,238,249,229,151, 95,184,141,199, 76, -134,244,233,195,207, 61, 40, 48, 54, 54, 6,143,199, 67, 84, 84, 20,238,222,189,171, 6,176,182,138, 10,125, 70,146,100,228,217, -179,103,211, 26,214,115,234,219,166, 85,139,121, 43, 87,248,153,188,122, 24,132,213,155,246, 80, 13,219,122,231,111, 62,125,165, - 48, 95, 88,187,167, 34, 35, 62, 66,143, 75,141,252, 76,100,165, 55,114,169,213,163, 85,179,166, 75, 87,175, 94,101, 26,251,240, - 54,126,252,249, 0,237,218,178, 87,254,207, 23,255, 40,200,225,215,237,163,204,122,253, 92,159, 50, 12, 9, 9, 57, 8,224, 96, -201,254,231,246,250,173,223, 73,185,181,235, 43,217,124,250,162,172,192,164,118,175,202,236,181,105, 60,180,179,179,141,197,173, -221, 27,102,242, 63,138, 82,192,227,241, 32, 20, 10,145,146,145,135, 53, 59,206,201, 52, 20,213,247,107,133,150,137,137, 9, 79, -163,209, 96,239,222,189, 72, 73, 73,233, 4, 32,229,229,203,151, 7, 70,143, 30,189,171,121,243,230,141, 98, 99, 99,223, 74,165, -210, 57, 0, 94, 87, 68, 98,110,110,222,201,198,198,134,120,242,228, 9,102,206,156,169,158, 59,119, 46,103,194,132, 9,132, 68, - 34,169,169, 39, 11, 0,224,228,228,228,217,187,103, 71,116,233, 61, 43, 68,173,204,123,144,244,250,247, 16, 6,253,216,168,166, -229,105,128, 1, 6, 24, 96,192,255, 12,106, 22, 24,220, 19, 96,185, 89, 97, 70, 83, 39,206,199,128, 45,115,233,194,132, 80, 90, -241,252, 32, 93,112,121, 26,125,109,235, 4,250,250,238, 5,244,172,254, 77,233, 70,182,196, 71, 55, 43,204,240,252, 82,184,125, -146,221,251, 59,119,104,123, 55, 0,221,187, 1,232,254,110,208, 2, 88,217,186,117,235, 43,190,237,255,138,163,229,219, 30, 52, -128,153, 0,132, 21,152, 85, 94,198,112, 7, 0,135,218,180,105, 67,222,187,119,143,142, 31,217,139, 14,111,100, 77,207,153, 51, -135,254,241,199, 31,233,177, 99,199,210, 54, 54, 54,100,113, 65, 56, 84,197, 57,104,208, 32,103, 0,168, 85,171,150,121,219,198, - 13, 63, 70, 5, 95,165, 31, 4,236,162,143,250, 14,163, 59, 52,111,156, 99,223,168, 91,164,177,131,123,171, 42,138,175,148,211, -222,222,126, 5, 77,211,125,105,154,118, 0, 0, 87, 87, 43, 97,235, 70, 13,211, 35,239, 92,165, 31,158,216, 67, 31,245, 29, 70, -119,108,209, 68,236,220,216,235,181,145,109,163,246,250,112,150,135,114,237,109,214, 40,199,104,243, 99,239, 0, 0, 32, 0, 73, - 68, 65, 84,174, 97,231,136, 74,236, 45,229,172,215,126,212, 31,105,233,153,244,179,103,207,232,235,215,175,211, 15, 31, 62,164, - 3,206,254, 65,215,110, 55, 82,106,221,124, 72,151,106, 52,157,138,236, 52,235,223,191, 63,253,246,237, 91,186, 95,191,126, 52, - 0,179, 26,114, 94, 73, 74, 74,162, 99, 98, 98,232,149, 43, 87,210, 0,142,207,158, 61, 91,145,159,159, 79,247,234,213, 43,165, - 88, 96,177,106, 98,103,125, 23,167,205, 67, 7,118, 93,235, 59,115,184,231,215,150,231, 55,132,129,211,192,105,224, 52,112,254, - 47,112,254,147,225, 80,236,213, 42,249,219, 90, 47,143, 86, 8, 64, 66,140,131,205,108, 53, 39, 55,109,221,189,120,239,193,227, - 75,151,207,155, 42,232,234,209, 27,209,119,126,195,197,192,179, 50,165, 74,189,149,195,196, 47, 49, 98,200,223, 84, 97, 69,113, - 28,173, 79, 16, 30, 30,206,183,108,240, 87, 12,166,119, 69,177, 89, 15, 84,243, 2, 51, 0, 76, 15, 11, 11,251,197,203,203,107, -227,180, 46,237,135,249,118,238, 1,173, 86,139,128,128, 0, 36, 39, 39, 95, 2,176, 74, 95,143, 91,116,116,116, 78,147, 6,117, -230,179,153,172,165,115,198, 14,181,201,126,255, 10,105,113,225, 0, 0,149, 74,161,253,248,246, 65,203,234, 24,103,108,108,252, -204,198,198, 38,222,198,198, 70,226, 86,175,214,116, 30,216,171,103,249, 12,182, 21, 39,189, 70,106,108,209,200,168, 74, 41,215, -164,189,189,215,168, 38,181, 91,167, 78, 29,158,128,141, 25,229,218,171, 86,106, 51,223,189,110,165, 15,143, 92,165,222,180,110, -123, 64,159, 13, 75, 39,241, 76, 77, 77, 17, 22,243, 14,171,127, 61, 45, 83,168,181,125,115,162,175,124,147,225, 49,154,166,161, -213,106,245, 94,232, 80, 1,150,183,108,217,210,125,227,198,141,174, 19, 39, 78,196,215,122,178,202, 34, 33, 73,228,231, 84,171, -126,147,119,241, 97, 94,150,198,156,147, 95, 83,158, 6, 24, 96,128, 1, 6,252,207,160,127,177, 51,103,122,153,191,225, 85, 10, -173, 18,196,100, 65, 14, 96,125, 61,166,244,192,138,141,219,215, 48,136, 29,147, 40,154,254,141,100, 96, 93,162, 24,217, 95,105, -156,156,205, 2,217,103,200, 88, 22, 0,176, 89, 53,235, 32,139,241, 22,192,240,195,143,159,183, 59,252,248,249, 15,197,159,109, - 0, 80,173,177, 92, 19, 22, 98, 60,154,212,119,234,218,186,169, 17, 83,167, 64, 90,220,123,228,202,148,184, 29,155,156,199,160, - 25,191, 85,215,168,196,196,196,251, 0, 96,103,198,143,235,218,164, 65,237,110,109,154,242,217,132, 26,105,175,194,144,175, 80, - 35, 40, 54, 57, 31, 4, 81,227, 9,213,223,202,222,204,232, 63, 94,252, 9,162, 23, 65, 16,119, 86,250,142,225,173,249,245,204, - 55, 21, 89, 0,228, 34,145, 72, 44,151,203,173,210,211,211,213,168,121,144,184,119, 5, 5, 5,205, 23, 44, 88,176,126,201,146, - 37, 75,183,108,217,194,169,201,156,172,138, 32, 17, 37, 95,238,214,244,219,213,191, 1, 6, 24, 96,128, 1,255, 19,152,254,217, - 95,232, 45,180, 74, 5, 67, 22,178, 1,204,169, 95,159, 94,148,144, 0,245,183,178,172, 60, 79,215, 87,226, 5,128,129, 53, 62, -155, 65, 20, 62,125,155, 44,125,246, 54, 89, 10,138,166, 41,154, 86, 49, 24, 72,149,105, 52,155,222, 38,138,106,190,234,142, 32, -116, 47,222,165, 40, 94,190, 79, 85,210, 20, 69, 83, 52,173, 38, 8,124,212,106,169, 77,177,137,201,127,252, 55,216,155, 19,125, -229,113, 32, 73,116,125,252, 44,102,145, 76,166,217,147, 19,119, 37,244, 27,214,139, 54, 58, 58,122, 92,167, 78,157, 38,235,116, -186, 3, 0,180, 95,193,165, 38, 73,114,249,230,205,155, 47, 69, 71, 71,159, 11, 13, 13,205,248, 22, 34,235,111,173,127, 3, 12, - 48,192, 0, 3,254,173,168, 89, 82,233,138,240, 45, 69,214,127, 35, 98,222,125,104,243,119,240,198,190,251,208,236,159, 96,111, -102,220,229,151,153,128,207,223, 84,188, 65, 58,157, 46,232, 91,138,234,155, 55,111,186,160,156,180, 58,255,109,245,111,128, 1, - 6, 24, 96,192,191, 22,211, 43, 18, 95, 44, 67,217, 24,240, 47, 0,253,173, 68,150, 1, 6, 24, 96,128, 1, 6,212, 0, 21,122, -180, 8, 84,188,114,224, 78, 53,126,160, 38,171, 15,238, 24, 56, 13,156, 6, 78, 3,167,129,211,192,105,224,252,159,227,252, 55, -194, 1, 69, 19,226,175, 21,255,173, 84,124,125, 75, 24,150,190, 26, 56, 13,156, 6, 78, 3,167,129,211,192,105,224,252,183,163, -220,137,240, 64,209,228, 97, 3, 12, 48,192, 0, 3, 12,248,187,192, 43,222,106,250,189, 1, 6,252, 19,197, 86,169,224,170,201, - 28,173,134,197,127,223,253,141,198,250, 58, 56, 56, 76,111,209,162, 69, 99, 14,135,195, 40, 44, 44, 92,119,239,222,189,181,159, - 31,212,181, 9,235, 37,147, 1,231,191, 62, 33, 0,130, 9, 48, 24,208,209, 72,123, 24,165,104,107,168,247,255,106,212, 49, 54, -181,249,147, 96, 48,185, 58, 82, 3,157, 86,131,162,233, 86, 69,160, 40, 50, 89,167, 81,121, 87,116,178,125,203,161,181, 73, 29, -181, 5,160,247, 2,140,217, 0,181,143, 0,107, 22, 13,114, 63, 1,230, 76, 48,233,159,161, 35,150,177,216,204, 21, 25,225, 23, - 82,255, 13, 5,118,254,252,121,230,215,156, 63,114,228,200,114, 19,136, 58, 58, 58, 6,242,249,252, 6, 21,157, 39,147,201, 50, - 50, 50, 50,188,254,229,237,177, 27,128,221, 0,154,126,246,249,107, 0,243, 1, 4,127,237, 15,120, 2, 44, 59, 96, 6, 7, 88, - 6, 0, 26,224,231, 76,224, 96,200,127,209, 28, 67, 27, 27,155, 7, 44, 22,203, 85, 38,147,201, 10, 11, 11,235,155,152,152, 36, - 8, 4, 2, 1, 73,146,111,179,179,179,187, 85,147,110, 54,254, 74,165,181, 20,192,190,106,126,111,128, 1,255, 20,124,213,170, - 67,183,162,231, 3, 60, 1,116,107,215,174,157,157, 76, 38,195,235,215,175, 51, 1, 60, 0, 16, 82,188,189,249, 22,150, 50, 24, -140,109,219,183,111, 95, 60,119,238,220,210,100,208, 81, 81, 81,104,217,242,203, 24,161, 76, 6,156,239, 93,189, 99,251, 34,250, - 13,218,245, 26, 81, 44,180, 24,128, 44, 3, 94,189,219,215,212, 4, 19, 11, 11,139,117, 4, 65,140,100, 48, 24, 85,118,106, 20, - 69,233,104,154, 62, 47,145, 72,214, 0, 40,172,206, 15, 9,248, 60, 45,169,211,149,251, 27, 44, 38, 83, 39,147,171, 42, 12,123, - 97,105,105, 25,202, 96, 48,234,149, 77,152, 13,124,154, 64,187,162,239, 72,146, 76,203,201,201,209, 71,132, 26, 49, 88,156,249, - 4,193,233, 13, 6,229, 6, 16, 32,192,120, 67,233,212,183, 41, 82,179, 19,128,242,107, 68,150, 67,173,250, 15, 23,174,218,236, - 28, 19,247, 26, 43,125,199, 98,203,238,227, 88, 49,127, 50,118, 30, 58,141,249,211,199,160, 73,147,166,168, 44,173, 56, 5,206, -166, 85,243, 70,246,242,223,123,206, 99,197,156,145, 60,255,189,231,187,174,244, 29,205,221,180,231, 92,215,149,190,163,120,254, -123,206,121,172,152, 55,210,120,211,190, 11, 20,128,241, 53, 49,114,140,171,163,140, 32,201,114,223,182,105, 22, 75,117,250,109, -186,224,255,227,142,158, 56,113, 98, 11,133, 66, 17, 54,182,119,235,205,173,220,156, 68,229, 29, 35,254, 40,114, 74,136, 15,247, - 99,115,140,219, 12,246, 59, 30, 85,169,203,129,199,171,247,250,245,107, 87,138,162,160,211,233, 64,146,100,233, 95,181, 90,141, -110,221,186,125,171,133, 51, 3, 1,172, 43,186, 89,225, 15,224,220, 87,112, 9, 89, 44,214, 66, 46,151,235, 73,146,100, 99, 0, - 96,179,217,113, 42,149, 42,132, 36,201,237, 0,164,213,228,219, 33, 18,137,154, 8,133, 66,104, 52,154,210, 4,244, 76, 38,179, - 81,237,218,181,247, 42,149, 74,215,175,189,120, 59, 96, 70,103, 15,143,157, 19, 22, 47,102, 42, 30, 60,192,206, 99,199,118,160, -160, 0, 0,246, 86,117, 46,151,203,189,197, 96, 48,234, 84,231,247, 40,138, 74, 86,171,213,222,213, 57,135,197, 98,185,166,167, -167,219, 58, 58, 58,162,176,176, 16, 2,129, 64, 80,178, 95, 3, 79,214, 86,154,166,141,139,159,237, 59, 59,118,236,216,137, 32, - 8, 18, 0, 77, 81, 20,227,217,179,103, 99, 40,138, 98, 21, 63,159,182, 2, 56, 6, 64,101,232,179, 13,248,135,122,179, 14, 85, - 87,104, 93, 7,224,217,174, 93, 59, 99, 31, 31, 31,120,122,122,194,213,213, 21, 70, 70, 70, 69, 15,113,177,216, 46, 34, 34, 98, -212,131, 7, 15, 70, 93,189,122, 21,175, 94,189, 82, 0,120, 4,160,220,155,186,231, 0,143,185, 70, 66,222, 46, 0,200, 78, 19, -103,164, 37,102,237,202,200,200,216, 10,160,108,136,240,250,227,199,143, 95, 52,111,222, 60, 4, 6, 6,226,244,233,211, 80,169, - 84, 40, 44,172, 68,191,200,179, 32,185,187, 25, 16, 36, 1, 41, 33, 0,223, 22, 16,216,213,184,164, 44, 44, 44,214,205,159, 63, -127, 65,147, 38, 77, 74,163,152,107,181, 90,144, 36, 9,173, 86, 11,137, 68,130, 69,139, 22, 21,117,180, 52, 13,138,162,112,227, -198,141,185,211,167, 79,135, 68, 34, 89, 88, 30,103,199, 54,181, 94, 50, 8,134,115,137,175,134,214,233,210,158, 70,164,181, 37, -117, 58,166, 82,169, 41, 55, 83,185,145, 17,167, 82,145,199,102,179,157, 95,253,249,167, 45,131,203, 5,173,211, 1, 20, 5,154, -162,138,139,179,120,163,139, 62,163,117, 20,104,173, 14, 20, 73,129, 84,168,208,126,246,108,125,138,162, 51,155,107,124,122,220, -180,197,246, 29, 58,118,100,215,173,229, 8, 82, 71,225,125, 82,154,125,216,203,167, 93,206,255,190,119,150, 90, 81, 56, 6, 64, -141,226,108,113,249,166, 65,123,246, 31,118,126, 17, 17,131,224,123, 15,112,231,110, 8, 0,224,214,189,208, 18,193, 93,101, 85, -129,148, 54,159, 63,101, 8,111,243,158, 51,236,249, 83,134, 50,183,236, 57,203,158, 55,121, 48,115,243,174,211,156,121,147, 7, - 51, 55,239, 62,205,153, 55,101, 8,211,127,231,209, 22, 0, 44, 0, 72, 42, 34,171,168,142, 8,146,228,157, 76,200,100, 2, 64, -246,129, 3,208,102,101,193,113,205, 26, 0,192,184,250,118,122, 15,119, 88, 91, 91,191,100,179,217,206, 85, 29,167,213,106,171, - 20,193, 19, 39, 78,108,169, 80, 40, 94,146, 36, 73,179, 88, 44,191,177, 67,251, 92,233,219,181,165,184,236, 49, 81, 81,145, 86, -155, 54,253, 57,228, 92, 88, 33, 61,170,141, 73, 88,224,182,137,109, 7, 44, 57, 30, 89, 73,135,204, 80,169, 84,120,251,246, 45, -202, 38,121, 47, 3, 93, 77,223,157, 0,236,180,178,178,234, 32, 22,139,199, 1, 88, 89, 80, 80,208,130,201,100,194,210,210,114, -165, 90,173,126,111,102,102,118, 36, 63, 63, 63,180,216,107,164,111,202,128,110,166,166,166, 1,151, 47, 95,182,104,221,186, 53, - 35, 39, 39, 7, 46, 46, 46,200,205,205,109,255,224,193,131, 54, 83,166, 76,153, 82, 88, 88,248,125,241,203,160,190,112,231,243, -249,244,132, 9, 19, 8,157,238,175,203, 61,122,244, 40,188,155,145, 13,108,204,249,114,165,154,206, 15,126,107, 54,147,195,225, - 60, 74, 78, 78,206,175,110, 97,112,128,101, 19, 22, 47,102, 10, 63,124,128, 48, 50, 18,227, 10, 10, 88, 91,138,188, 91, 85, 10, - 45, 6,131, 81, 39,224,244,111,174, 92, 46, 23, 36, 73,150,138,193,146,103,148, 86,171,133, 70,163,129, 86,171,133, 78,167,131, - 86,163,133,255,134,159,107,252, 44,228,243,249,124, 7, 7,135, 76, 62,159,207,255, 22,189, 16,143,199, 99,253,254,251,239, 99, -184, 92, 46, 0, 64,173, 86,163, 89,179,102,132,161,127, 54,224, 95, 38,182,190,240,114, 85, 38,180,250, 21, 20, 20, 64,167,211, -193,196,196, 4, 76,230,167,253,190,149,149, 21,122,247,238,141,110,221,186,193,199,199, 7,175, 94,189, 50,246,241,241,233, 93, - 17,217,216,197, 3, 80,203,213,174,184, 51,161, 28, 30, 95,139,216,124,244,167, 11, 54, 31, 63,126, 92, 92,230,176, 41, 51,102, -204, 32,196, 98, 49, 70,142, 28,249, 64,165, 82, 13, 2, 80, 80, 17,167,142, 66,154,151,207, 56, 80, 52, 97,188,253,217, 97, 66, -173, 84,208, 12, 6, 67, 81, 50,116, 88,147, 82, 34, 8, 98,164,163,163, 35,206,156,249, 63,246,190, 59, 46,138,107,125,255,153, -217,190, 44,189,131, 10, 42,136,130, 32,216, 16,108,216, 53, 17, 19,107,188,246, 36, 38,222, 36,150, 88, 18,177, 69, 99,131,196, - 26, 19,141,154,196, 88,174, 13,187,216, 98,197,196,174, 40, 82, 20, 20,105,194, 2, 75, 95,216, 54,187, 51,243,251, 3, 88, 1, -217,130,201,253,221,251,189,217,231,243,217,207,238,236,204,190,123,230,156,153, 57,207,121,222,247,188,231, 32, 52,154,215,211, -133,217,218,218, 34, 57, 57,249,149,170,198,225, 32, 44, 44,140, 67, 16,196, 56, 0,115,155,182, 73,182,188,113, 47,203,181,110, - 59,114,112, 32, 63,172, 43, 89,152, 95, 88,205, 2, 32,150, 44, 89,162, 39,110, 0,240,245,215, 95,155, 83, 78,144, 60, 30,100, -241,241,175, 30,196, 92, 18, 36,159, 0,193, 3, 72,110,141, 23, 21, 44,192,210, 0,163, 3, 24, 45, 32,242,104,101, 78, 53,132, -182,240,242,139, 91,187,113,155,189, 90,203,226,224,201,203,200,204,124, 1, 14, 73,194,199,215, 15, 67,250,245,225,117,237, 30, -222,234,219, 21,243, 79,231,231, 60,123, 11,192,221,102, 87, 52,195,138,124,189,156,241,243, 47, 15,224,226, 96,141,113, 35,223, -134, 88, 36,196, 55,223,255,138,213,139,102,194,207,199, 27, 59, 54,175, 49,248,115, 59, 59,187,149, 1,126,190,222,219,246,156, - 65,128,191, 63,103,219,222, 51, 8,232, 88,251, 30, 24,192,217,182,247, 12, 58, 6,118,228,108,219,123, 6,193,129, 29, 90,223, -151,222, 89, 89, 90, 90, 58,211,112,125, 54,106,163, 33, 53,109,196,171, 98,244, 29, 65,214, 39,159, 0,128,158,104, 53, 7, 60, - 30,175,101,126,126,190,171,169,227, 76,169, 6,181, 74,214,125,157, 78,135,162,162, 34,162,188,188,156,181,183,183, 31,121,126, -199,226,227, 67,123,135,148, 2,192,163, 71,143, 28,163,163,215,142, 60,116,191, 18,202,219, 63, 16,255, 58, 21,207, 76,122, 39, -226,254,201,152,105, 93, 81,187, 36, 68, 99,168,213,234,204,206,157, 59,179,181,159, 91, 8,133, 66,126,163,235,205,179, 93,187, -118,175,169,214,102,184, 20,191,187,117,235,214,204,142, 29, 59,194,223,223,255,102,143, 30, 61,108, 37, 18, 9,206,159, 63,143, -128,128,128, 64, 91, 91,219, 59,177,177,177,188,133, 11, 23,134,236,218,181, 11, 0,102,153, 81,157,131,250,247,239,127, 48, 46, - 46, 78,196,231,243,161, 84, 42,145,156,156, 12, 59, 59, 59, 8, 4, 2,188,251,238,187,156, 94,189,122, 57,245,235,215,239,104, - 90, 90,218, 4, 52, 99, 6,148, 74,165, 98, 23, 47, 94, 12, 43, 43, 43, 88, 89, 89, 65, 34,145, 64, 34,145,192, 90, 4, 98,251, - 28, 47,241,236,157,229,226,185,203,183,199,236,221,182,226,106,171, 86,204, 87,185,185,185,229,205,189, 22,148,215,175,195,250, -209, 35,160,222,189,107, 46,236, 36,142,136,138,138, 50,165, 72,129,207,231,163,103,207,158, 38,237, 57, 58, 58, 30,227,114,185, - 13, 70,166, 58,157, 78, 20, 21, 21, 69,167,165,165, 73, 72,146,148, 48, 12,131,168,168, 40, 90,167,211,137, 92, 93, 93,111, 50, - 12, 83, 88, 92, 92, 60,218,140,226,170, 1,124, 65,146,228,119, 66,161,144,219,186,117,235,236,101,203,150,221,170, 85, 51,193, -178, 44,217,186,117,235, 80,177, 88,236,173, 86,171,117,168,113, 29, 90,212, 44, 11,154, 4,203,178, 93,107, 68, 97, 61, 52, 0, - 4,181,159, 75,106,122, 59, 56, 55,250, 30, 0,138,107, 7,138,110, 6,182, 75, 0,164, 0,232, 0,192,181,118,223, 61,130, 32, - 74,223,160,152,134, 21,173,184,184, 56,253, 16, 54, 50, 50, 82,223,177,216,216,216,224,222,189,123, 32, 8, 2, 54, 54, 54,176, -181,181,133,157,157, 29, 42, 43, 43,145,146,146,130, 39, 79,158, 32, 43, 43, 11, 4, 65,192,199,199, 7,117, 55, 80, 61,232, 31, -112,251, 55,196, 65,100, 45, 4, 65, 0, 93, 6, 4, 35,184,111, 16,186,223,205,152,115,255, 18,177, 83, 42,149,166, 3,224, 6, - 5, 5,125, 24, 22, 22,134,141, 27, 55, 66,173, 86,111, 52, 64,178,244, 54,127, 79,209,117, 3, 0, 15, 15,143, 5,251,206, 63, -183,154, 60,204, 87, 33,149, 74,215,191, 65,229, 52,120, 16, 23, 23, 23,155,189, 22, 31,195, 48, 40, 43, 43, 51,106,179,177, 66, -176,233,187, 31,236,229, 21,133, 88,245,205, 62,104,181, 90,204,159, 63, 31, 12,195,232, 95,229,229,229,102,149,147,165,233,215, -181, 3,178,198,123, 74,112, 1,175,241, 53,188, 34,231,224, 15, 32, 88,128,160, 1,188,126, 94,141, 59, 33, 17,135, 47, 62,180, -226,155, 45,246, 9, 79, 94,226,228,229, 4, 80,149,121,144, 62, 58, 94, 35, 57,246,156,128,195,106, 14,122, 4,251,226,243, 37, -223, 58, 44,253,124,202, 33,141, 82,238,143,134,110,196, 75,166,111, 26, 26,171, 86,174,196,206, 45, 27,241,237,198, 45,168,172, - 40, 7,143,231, 92,251,160,167, 65,211,180,241,115,103,217, 97, 81,115,222, 39,190,249,241, 24, 66, 59,122,224,232,249,187,232, -221,217, 27,199,127,187,143,190, 93,219,224,228,165, 4, 12,232,225,139,179,241, 73,248,124,198, 4, 98,194,133, 93,195,154,211, - 70,155, 55,255, 96, 47,175, 44, 68,220,154, 61, 40,218,186, 21,217, 51,103, 34,180,246,152,187, 4, 1,126,203,150, 0,223,116, - 27, 53, 70,106,106, 42,212,106,117, 83,163,125, 4, 4, 4,152,108,119,165, 82,249, 64,167,211,177,133,133,133, 68, 97, 97, 33, - 36, 18, 9,145,156,156, 68, 7, 6, 6,141, 98,159, 28,249, 9, 0,162,163,215,142, 58,252,160, 18,138,155, 91,160,188,245, 61, -248,109, 18,201,157, 95,207,160, 62, 94,190,227, 65,189,123,180, 65, 57, 11, 10, 10,222, 42, 40, 40, 0, 0,180,109,219,246, 73, - 90, 90, 90,135, 58, 87,115,173, 11,145,175,211,233,252,234,220,137, 58,157, 14,106,181, 26,131, 6, 13,226, 24, 59,119, 7, 7, -135,176,128,128, 0, 36, 36, 36, 96,203,150, 45,142,253,251,247,199,179,103,207, 64, 16, 4,214,174, 93, 75,116,236,216,145, 87, - 92, 92,140,161, 67,135,226,216,177, 99, 61, 43, 43, 43, 77,213,167,141, 68, 34,217,117,250,244,105, 17, 73,146,144,203,229, 96, - 24, 6,189,122,245, 2, 73,146, 72, 74, 74,194,146, 37, 75,112,236,216, 49,156, 56,113, 66,220,181,107,215, 93, 10,133, 34, 0, - 13,221,250,134,218,136, 85,169, 84,172, 80, 40,132, 80, 40,132, 72, 36,130, 72, 36,130, 64, 32, 64,149, 10,248,120, 83,182,154, - 35,114,102, 2, 59,247,246,125,127,246, 90,114,253,178, 15,174, 0, 56,105,238, 53, 15,212,196,100,125,247,235,175, 91, 38, 85, - 84,144, 0,240, 51, 65, 48, 20,203,126,107,206,253, 14, 0, 85,170, 10,120,251,180,196,209, 67, 39, 48,102,252,200, 38, 73, 22, -143,199, 7,159,199,131,173,163,196,164, 77, 62,159,239,246,228,201, 19, 39, 30,143, 7,150,101, 65,211, 52, 40,138, 42, 92,186, -116,169,203,240,225,195,109,206,157, 59, 71, 14, 31, 62,156,113,112,112,168,190,123,247,110,145, 78,167,115,234,211,167, 79,115, -174,249,109,193,193,193, 93,142, 31, 63,254, 65, 84, 84,212,253, 5, 11, 22,172,170,191,115,221,186,117, 43,207,158, 61,235, 61, -106,212,168,189,143, 30, 61,218,214,156,103,200,159,125,206, 91,108,254,247,217, 52,196, 69,106,225, 70, 16, 68, 92,189,103,118, -100,221,118, 84, 84,212,226,232,232,232,100,130, 32,226,234,127, 95,119, 92,237, 96, 49,174,169,237,218,223, 58, 46, 90,180, 40, - 40, 38, 38,102,109,120,120,248,193,155, 55,111,190, 0,208, 92,162,101, 60, 70,171,238,132,234,159,100,163, 78, 13,149,149,149, -168,172,172, 68,110,110, 46,182,111,223, 94,123, 67,243,192,229,114,193,229,114,245,241, 12,134,112, 57,238,143,239, 1,124,223, -165, 75, 23,222,227, 91,177,231,190,220, 57,123, 96,183, 65, 93, 56, 15, 46, 63, 30,139,154,245, 8,223,154, 58,117,170, 51, 0, -236,217,179,167, 24,192,185,255, 16,107,142, 77, 79, 79,255,220,195,195, 67, 31,163, 82,223,125,168,211,233, 32, 18,137, 80, 23, -203,162, 82,169,176,125,251,118, 29,203,178,177, 70,108, 34, 45,249, 10,210,147,175,214,252,142, 97,192,208,175,126,191, 98,197, - 10,176, 44,171,239,236, 63,169, 85, 78, 76,146,188,166,234,156,109,244,222,232,123,150,166, 77,184, 39,248,179,199, 78,153,233, -193, 16, 92,156,186,242, 16, 60, 30, 15, 76, 61, 53,147,199,169, 25, 45, 39, 63,203,135,167, 91, 32,222,153, 48,195,253,248,222, - 31,102,235, 40,213, 55,205,173,107,255,224,112,204,249,252,115,252,180,115, 39,150, 44, 95,169,103, 0, 58,154,134,206,100, 57, - 73,114, 80,175, 32,232,170,242,193,225,112, 48, 32,212, 23, 28, 14, 7,131,195,219,131,195,225, 96,104, 47,127,112,185, 92, 12, -235,221, 17,237,218,181, 3,151,203, 37, 77,180, 59,210,146, 47, 35, 61,249, 90, 61,210,203,130, 5, 64, 73,165,175, 29,175,149, - 74,193,122, 57, 53,247,218,194,135, 31,126, 88,158,155,155, 75, 53,222,215,170, 85, 43,254,245,235,215,237, 13,184,237,244, 16, -139,197, 93,185, 92,238,131,210,210, 82,198,202,202,138,100, 24,154, 9, 12, 12,226,156,223,177,248,120,221, 49,139, 22, 45, 62, -254, 94, 87,219, 81,251, 98,227, 88,126,235,222, 4,193, 19,234, 62, 90,190,131,207,227,139,187, 2, 74,115, 6, 15,164, 90,173, -198,211,167, 79, 97,170, 60, 44,203, 26,117,253,148,149,149, 77, 13, 8, 8,184,254,253,247,223, 59, 18, 4,129,223,127,255, 29, - 28, 14, 71,255,202,200,200, 0, 73,146,248,242,203, 47,169,202,202,202,233,166,202,198,229,114, 63, 63,122,244,168,157, 64, 32, -128, 92, 46,215,223, 55, 28, 14, 7, 79,158, 60,193,250,245,235, 49,117,234, 84,228,228,228,192,211,211, 19,243,231,207,183,142, -137,137,249,156,162,168,149,102, 52, 81,162, 70,163,233,102,101,101, 5,145, 72,132, 58,194, 5, 0,191, 37,243,146,148, 74,101, - 39, 39, 39,133,187, 75,124,220,169,158,253,223, 9,113,114,241, 8,151, 74,165,205, 90, 58,235, 57,176, 51,147,166,151,190,117, -252,184,235,141,227,199,153,219,167, 79,191, 20,202,229, 59,204,190,134,180, 36,178, 51, 94,162,107,215,174,120,240,224, 1,186, -118,237, 90,159, 52, 65, 32, 16,128,207,231,131,207,231,195,217,193,172, 16, 10,150, 36, 73,220,184,113, 3, 52, 77, 67,163,209, - 64,163,209,160, 99,199,142,165, 87,175, 94,181, 6,128,140,140, 12,118,242,228,201,229,119,238,220, 65,231,206,198,215, 83,119, -115,115,187,206,225,112, 90,215,255,174,164,164,196, 97,244,232,209, 40, 43, 43,123,123,244,232,209,189,107,239,223,188, 35, 71, -142, 76, 6, 0,129, 64, 0,146, 36,105, 88,240,183,135, 41, 46, 82,159, 40, 53, 38, 92,209,209,209,145,141,191,171, 79,170,154, -250, 92,255,183, 49, 49, 49,107,235,217, 86,190, 65,241, 77,199,104,197,197,197,177, 77, 48, 72,179, 97,138,104,213, 33, 33, 33, - 65,235,233,233,249, 83,250,195,172,129,190,193, 62, 16, 75,132, 67, 0,124, 47, 20, 10,231, 77,153, 50, 5,183,111,223, 70, 82, - 82,210, 47,248,147,179,112,130,130,130, 46, 8,133, 66,111, 3,110,146,236,164,164,164,161, 6, 58,134,229,167, 79,159,134,177, - 96,248, 43, 87,174,212,239,148,234, 7,195, 55,125, 97, 48, 44,180,148, 22,213, 10,229,171, 78,188,150,104, 85, 87, 87, 99,252, -248,241, 13, 20,173,162,162, 34,147,231, 71, 16, 4,214,159, 60,137,139,177,177,120, 59, 36, 4,199,238,222, 69,204,148,137,240, -247,110, 1,150, 38,192, 18, 64,206,129, 31, 80, 82, 89,133,253,151,111,160, 84,174,192,164, 62,125,224,103,235,108,220, 46,143, - 63, 56, 52, 44,156,127,233,102, 10,120, 60, 46, 72, 48, 96,181, 10,120, 6,244, 3,135, 36, 97,231,214, 6,124, 30, 15, 60, 30, - 23, 25,185,197, 8, 8,234, 46,136, 19,136, 6,191, 9,209,106,229,221, 6, 52, 77, 99,234,212,169, 56,120,240, 32,156,220,189, - 97,215, 42, 8,171, 55,238,196,219,131,250,152, 60,255,186, 17, 60,151,203, 5,135,195,121,237,189,238,179, 57,234, 36,203,176, -160, 26,183, 17,195, 2, 44,139,150,107,214,160,229,154, 53,184, 91,251,159, 29,171,171,161, 84, 42,129, 30,129,205, 34, 89, 26, -141, 6,185,185,185, 84, 65, 65,129, 91, 19,251, 11, 53, 26,141, 73, 98,179,123,247,238,196,105,211,166,117,115,116,116,188,159, -248,232,145, 54, 56, 36,132,119,110,251,226, 19,117,110, 67, 0, 8, 9, 9, 41, 93,188,120,241,137,201,227, 34, 71,110,139,250, - 7,253,233,202,189, 92,161, 88,220, 45,114,193,238,196, 3,227,198,153,246,247,168,213,153,193,193,193,172, 57,231,165, 80, 40, - 10,140,236, 30, 1,224,235, 46, 93,186,216,246,239,223, 31,215,175, 95,199,152, 49, 99,212, 20, 69,165, 3,192,240,225,195,219, -239,223,191, 95,144,146,146, 2, 23, 23, 23, 94,118,118,246, 46,152, 8,144, 23, 8, 4,253,186,119,239, 78,170,213,234,215, 72, - 86, 76, 76, 12, 38, 76,152,128,246,237,219,131, 97, 24, 84, 85, 85,161,127,255,254,188, 45, 91,182,244, 51,147,104,205,241,247, -247, 95,143,154, 89,135,245,159,133,169,168,113,107,161,164,164,164,224,225,157,203,201,125, 6,141,238,214,186, 93,144, 71, 82, -226, 3,163, 6, 93, 93, 93, 23,145, 36,249, 30,195, 48,156,202,202,202,220,135, 26, 77,187,142,222,222,110,189, 70,142, 68, 5, -143,199,249,238,242,101,178, 80, 46,183, 6, 96,150, 11, 82,165,173,134,183, 79, 77,168,223,152,241, 35,241,224,193, 3,140,253, -199, 40,240,249,124,112,185,188,154,123,147, 95,163,104,217, 59,219,154,117,109,106,181, 90,253, 51,188, 46,206,139,162, 40,212, -133,102, 89, 89, 89,233,247,169,213,106, 16, 4, 97,236,218,240, 59,188,114,153,171,216,214, 14,180, 86,139,192,145, 99,245,215, -244,157,159,183,137,193, 48,226,242,236, 76,204,138, 61,205,131, 5, 22, 24, 80,181,140,113,145,250, 68,233,207,130, 32,136,184, -168,168,168,197, 0,216,168,168,168,197,117,219,209,209,209, 74, 0,121,111, 72,182, 94, 83,185,184,127, 5,201,170,115, 47, 24, - 67,255,254,253,103,217,216,216,108,169,219,206,189,157,135,220,219,121, 8,232, 16,216,171, 75, 72,183,138, 9, 19, 38,192,201, -201, 9, 11, 22, 44, 96, 1,252,210,220,255,207, 72, 75,182, 6,192,122,120,120, 44,168,125, 32,135,220,189,123,215,229,222,189, -123,232,222,189,251, 43,233,158,162,208,187,119,111, 99,166,228,181, 65,237,115,255, 58,149,140, 1, 69, 81, 80, 40,148,208,104, - 40,232,180, 12,116, 58, 29,186, 6,218, 96,239,206,168,154,239,116,117,234, 89,141,106,214,210,221, 6, 54,214, 60, 45, 73, 18, -202,251,137, 5, 77, 62, 49, 53, 26, 13, 18,179,179,241, 40, 43, 11, 0,240, 78,180,241,192,215,189,151,175,163, 99,199,142,166, - 74,235,219,210,211, 29,249, 23, 19,107, 30,222,202, 92,220,251,227, 48,108,108,172, 1, 0,129, 17,147,192,231,215, 16,173,106, - 37, 5,231, 14,173, 64,176,172,193,180, 0, 86, 14,238, 23,184,124,145, 55, 75, 51, 96, 89, 6, 44, 67,131,101, 25,112,120,124, -171, 89,159,124, 0,134,161, 17, 26, 26, 10,130,195, 1,173, 85, 99,220,136,193, 40,171,144,195,201,222,188, 78,130,207,231, 35, - 34, 34, 66,108,104,255,179,103,207,148,245,137,153,241, 54,210,162,186, 90, 9,181, 90, 13, 74,163, 3,165,213,129,110,203,199, -170,165, 19,161,163,116, 80,252, 35, 28,148, 86, 7,230,243, 81,160, 52, 90,228, 88,145,100,112,128,179,150, 4,161,124,152, 42, -179, 53, 69,180,234,200,129, 33, 52, 21, 19,104,128,108, 61,154, 54,109, 90,215,224,144,144, 7,239, 13, 10,217,240, 56, 41, 57, -255,113, 82,242,107,199,121,183, 15,201,252, 52,230,224,124, 30, 95,220, 53,114,129,241, 89,135,245, 81,223,141,248, 39,177, 88, - 46,151, 7, 91, 91, 91, 35, 45, 45, 13, 28, 14, 7, 4, 65, 60, 3, 16, 12, 0, 30, 30, 30,207,185, 92,174, 15,135,195,193,214, -173, 91, 9, 46,151,219, 41, 60, 60,124,177, 74,165, 58,108,100, 64, 23, 96, 99, 99,211, 64,205,226,243,249,136,138,138,194,228, -201,147,245, 36,139,207,231, 99,247,238,221,232,214,173, 27, 52, 26, 77,128,153,229,189, 7,160,143, 25,138, 31, 81, 75,206, 77, -146, 81,157, 78, 55,173,228,189,247,218, 33, 62, 30,189,124,124, 58,118,237,218, 21, 20,245, 74,208,244,241,241,105, 37,151,203, - 11,148, 74,229,191, 80,147,218,224,161, 81, 82,164, 98,144,157, 81, 19,126,250,224,193, 3,132,134,134,234, 21,172,250,106, 22, -159,207,135, 88, 96,221, 44,162,197, 48, 53,207, 37,185, 92, 78,198,199,199, 59,251,251,251, 19, 0,224,239,239, 79, 60,124,248, -208,209,202,202,170,216,215,215,215,228, 0, 88,108,107,135,221,211,198, 3, 0,190, 26, 52, 76, 63, 48, 58,255,245, 98,240,120, - 60, 12, 92,176,248,181,235,158, 97, 24, 14, 44,176,144, 44, 51,184,200, 95, 69,178, 26, 43, 90,209,209,209,201,209,209,209,175, -169, 99,205,132,105, 69,171,190,116,215, 92,212,221,172,134,176,113,227, 70,116,234,212,201,104, 71,180,101,203, 22,236,219,183, -111, 35,128,140,102, 75,142, 3,187, 4, 98,211,241,100,159,246,129, 4, 0,172,252,124, 4, 89, 93, 93,141, 27, 55,110,192,206, -206, 14,207,158,153,157,246,203,198,206,206,238,107,146, 36,199,113, 26,207, 0,104,154, 96,210, 12,195,196, 86, 84, 84, 24, 76, -239,192,178, 0,165,213,161, 90,161,130, 70,163,193,231, 95,254, 96,178, 16,209, 0, 65,105,228,220,136,190,225, 98, 67,138, 78, -104,167,126,248,108,138,245,107,157, 55,135, 4, 72, 18,232, 28, 90,163,184, 60,188,155, 12,134, 1,104, 6,112,118,117,192, 47, - 7, 54, 24, 37,249, 58,154,169, 29, 29,211,168, 82,211, 8, 8,139,196,203,212,120,189,130, 36,224,215,184,140,249, 60, 30, 24, -150,168,201,250, 96,136, 8, 9,196,222,101,210, 12,191,157,113,143,241,113,100, 39, 28,185,148,136,177,131,130,113,245, 78, 10, -250,247,232,136,228,244, 44, 4,250,181,198,214, 93,177, 96, 89,200,127,220,180,186,224, 85,135,166,203, 54, 71,209,186,125,251, -182,178,177,138, 85,255,157, 53,221, 31,130,101, 95, 41, 90, 74,149, 26, 11, 22,153,149,206,167,166,141,250,132,137,205, 57,216, -152, 98,101, 14, 17,107,172,108,193, 68,122,150,182, 0,186, 1, 11,255,147, 15, 78,154,166,113,230,204, 25,125,123, 52,213,142, -245,219,206, 12,146,131,236,236,108, 36, 39, 39, 35, 44, 44, 12, 21, 21, 21,224,145, 36,230, 63,126,140,142, 83,166, 64,195,231, -131, 97, 24, 8, 4, 2,204,152, 49,195,236,250,108,230,211,185, 54,152,155, 54,101,124, 67,120,120,120,187,180,234,106, 36, 63, -121,130, 65, 43, 86, 0, 0,206,158, 61,219,224,154,152, 55,111,158, 32, 37, 37,229,195,251,247,239,127,152,159,159,191, 17,192, -124,131,207, 89, 86,173,143,209,122,111,226, 24,180,243,111,139,125,191, 30,208,239,159,247,197, 28,240,120,124,240,248, 60,216, -219,217,155,117, 54, 90,173, 86, 79, 90, 21, 10, 5,121,246,236,217,150,131, 7, 15,230,207,153, 51,135, 0,128,125,251,246,145, -223,127,255,189,228,226,197,139,252, 22, 45, 90, 72, 77,146, 75,138,122,173,141, 9,130, 0,143,199, 3, 95,192, 7, 24, 6, 4, - 65, 72,214,173, 91,183, 50, 57, 57,185,187,191,191, 63,212,106,245, 20,212, 76,212,176,228,209,178,144, 45,163, 92,164,169, 88, -171, 90, 85,202, 16,100,245,227,182, 12, 17,181,250, 49, 91,120,179, 73, 25,230,197,104, 53, 5, 14,135, 99, 82,173, 34, 73,210, -164,235,112,222,188,121,176,177,177, 49,212, 1,177,143, 31, 63, 78,145, 74,165, 59, 1,252,240, 70,141,115, 57, 33,249,235,185, -163,228,168,245,173,218,219,219, 23, 15, 24, 48,160, 10, 0,117,248,112,195, 1,178, 90,173, 54,216,129,219,217,217,125,253,243, -207, 63,207, 30, 57,114, 36,217, 56,197, 64,125,247, 94,221, 75,171,213,226,240,225,195,179, 23, 46, 92,136,138,138,138,185,198, - 58,113, 69,181, 18,202,218, 64,232,231, 73, 71,204,125,168, 27,220,101,109,239,129,150,109,131, 13,118, 38, 36,191, 38,134,200, -205,235, 85, 7,102, 99, 35, 2,109,196, 38, 65,144, 25, 89, 57,249, 45, 90,185, 59,226,121,174, 12,110,173, 59,161, 44,239, 85, - 61,112,185, 28,240,106, 93,135,246,182, 18,200,138,138, 64,146, 28,163,196,120,245,254, 4,220, 73,202,194,209, 75, 15, 65,169, -170,177,105,207,121, 80,234, 42, 80,170,106, 80,170,154,247,181, 11, 63, 2, 65,160, 64,171,174,110,223,156,118,231,114,185,232, -209,163,135, 65,162,147,151,151,103,166,162,197,234, 21, 45,165,170,153,109,100,222,200,201,168, 98, 85,183,255, 77,137, 65, 93, -202, 7,177, 88,220,109,247,110,195,105, 28,154,130,187,187,251, 57,107,107,235, 54,230, 30,223,140,228,165,107,237,237,237,191, -246,247,247, 15,216,180,105, 19,143,195,225, 96,224,192,129,237,221,221,221,179, 1, 32, 48, 48,208,179,238, 25,243,233,167,159, -178,183,111,223, 78,170, 25, 99, 24,134, 64, 32,120, 98,103,103,215,173,127,255,254,168,168,168, 64,110,110, 46, 36, 18, 9, 58, -110,216,128,199,159,126,138,144,237,219, 65, 14, 24, 0,130, 32, 32, 16, 8,240,248,241, 99,136,197,226, 39, 42,149,193,148,111, - 61, 0,124, 11,160, 23, 94,185, 11, 89, 0, 55, 80,147,118,225, 78, 19,207, 59, 18, 0,104,134, 49,213, 88, 19, 23, 44, 88,128, -114, 30, 15, 24, 62, 28,252,140, 12, 80, 20,133,176,176, 48,189,202, 30, 22, 22, 6, 46,151,139,224,224, 96,120,122,122, 98,235, -214,173, 19,141, 17, 45, 85, 21,133,236,140,151, 8, 15, 15,215, 43, 87,195,135, 15,215, 43, 90, 60, 30, 79,175,108, 17,180,105, -226, 74, 16, 4, 91,127,144, 76,211, 52,193,229,114,185,115,231,206, 37,198,140, 25,195,106, 52, 26, 70, 32, 16,144, 71,143, 30, - 37,174, 94,189,202,173,174,174, 54, 57, 16, 15, 26, 53, 14, 95, 13,126,171,230,222,111,227, 2, 30,159, 7, 1,159,143, 5, 79, - 94,234,219,197,118,247, 65, 65, 76, 76,204, 88,127,127,255, 26, 55, 60,192,181,228,209,178,192,132,208, 35,107, 68,146, 52,245, -182,101, 0,136,218,109, 89, 61, 66, 37, 35, 8,226, 30,203,178,221, 27, 29, 91,183, 95,211,232,189,110,255,163, 55, 40,126,221, - 90,135,175,145, 47, 99, 35,226,244, 91,183,110,249,117,237,218, 21, 57, 57, 57,175,205,132,171,235,184, 36, 18, 9,196, 98, 49, -110,222,188, 9, 0,233,134,140, 93,189,122,245,123,212,100, 93,174, 41,145,135, 71,120,255,247,250,221, 12, 29,214, 29,251,163, - 15, 84, 72,165,210, 96,188,202,161, 67,120,122,122, 78,230, 9,184,227,125,130,188, 34,192, 48,223, 94, 62,125, 99,133,177, 51, -244,105, 31, 88, 5, 64, 89, 55,235,240, 13,103, 31,130, 36,201,113, 35, 71,142, 36, 83, 82, 82, 48,126,252,120,236,219,183,207, -224,177,147, 39, 79,198,193,131, 7, 49,114,228, 72,114,209,162, 69, 6,211, 59, 52, 84, 75, 52,127,217, 69,153,246,236, 17,246, - 30,252,217, 96, 12,146,171,107, 77, 60, 86, 81, 81,177,254,187,238, 93,141,123, 70, 24,157,230, 98,194,253,187,225, 61,251, 14, -228,231, 22,150,131,209,169,161,146,191,250,189,162,188, 16,172, 78, 5,190,149, 35,220,157,237,240,224,214,111, 26, 74,163,186, -104,204,230,236,145,129,248,116, 68, 0,192, 50, 24, 53,255, 23,196,253, 48, 75, 63,130,238, 61,102, 14, 46, 31,254,206,236, 24, -191,198,224,241,120,120,252,248,177,210,144,154,197,225,112,204,201,201, 85,171, 58,106,161, 80, 40,161, 80,170,254,202,103,135, -139,155,155,219,143, 14, 14, 14, 34, 3, 68,202,197,197,197,229, 71, 39, 39, 39,145,185,174, 67, 67, 36,171, 54,175,214,253,105, -211,166, 53,139,108, 9,133,194, 54,233,233,233,250,100,165,198,222, 53, 26, 13,250,247,239,111,110,242,210,211, 0, 94,120,120, -120,220,232,216,177,163,221,243,231,207,113,224,192, 1, 62,143,199,243,170,123,126,200,229,114,112, 56, 28, 20, 21, 21,105, 1, -124, 0, 19,174, 51,181, 90, 29, 31, 31, 31,223,121,196,136, 17,156, 39, 79,158,128,195,225,212,148, 43, 60, 28, 33,219,183, 35, -105,238, 92, 68,100,101, 65, 69, 81, 16,137, 68,184,112,225, 2,165, 80, 40,226, 13,217, 19,139,197, 59, 51, 51, 51, 3, 69, 34, - 17, 40,138, 2,195, 48, 32, 73,146,224,114,185,189,237,237,237,183, 0,232,222,168,177, 92, 67,186,247,239, 64,235,116,180, 52, -231,185,204, 84, 5,148,148,148,224,244,233,211, 8, 11, 11, 67, 68, 68, 4,242,242,242,144,145,145,129,183,223,126, 91,127,204, -163, 71,143,144,144,144, 0, 95, 95, 95,211,138, 30,169,133,111,135, 54,224,243,249, 53, 10, 17,143, 95, 59,240,225,233,149, 44, - 62,143, 15, 30,151, 7,145, 88,100,182,162, 69, 16, 4, 72,146, 4, 65, 16, 16,139,197,117,131,108,166,101,203,150,210,210,210, - 82, 15, 0, 13, 3, 10, 12, 0, 0, 32, 0, 73, 68, 65, 84, 28,177, 88, 12,154,166,205, 26,180,212,245, 17,117, 36,139, 47,224, -235,149, 45, 0, 40, 47, 47, 87,141, 28, 57,242, 95,106,181,250,125,188,217, 10, 37, 22,252,205, 64, 16,196,189,255,196,111,155, -129,225,181,196,234,181,160,120, 99, 23,248,219, 61,123,246,220, 62, 97,194,132,129,155, 55,111,134,181,181, 53,164, 82,169,190, - 67, 20, 8, 4,104,213,170, 21, 74, 75, 75,177, 99,199, 14,188,124,249,242, 10,128, 25,230,150, 72, 42,149,222,126,246, 48,189, -164,255,216,158, 78,129, 61, 59,216,231,166,191, 12,147, 74,165, 55,107, 73,214, 47, 19,230,189,253,126,255,209,161,224, 11,120, -200,125, 86,128,203,167,111,252,127,105, 76, 14,135,195, 33, 8, 2,227,199,143, 55,235,248,127,252,227, 31,136,143,143,135, 49, - 55, 35, 83,167,104, 41, 84,168, 86,254,117,131,181,207,102, 77,198,103,179, 38,235,201,132, 57,174, 23, 0,240,244, 60,100,132, -104, 81,155,227, 14,237,248,184, 75,104,184,119,183,192, 54,184,115,255, 33,246,111,127, 37, 50,236,250,126, 37,190,217,117, 5, -173,220, 28, 64,169,171,113,238,200, 79, 5,148, 90,177,249, 13, 69,185, 26,114, 75, 16, 96, 89,166, 89,231, 94, 71,158,120, 60, - 30,130,130,130, 12, 42, 90,165,165,165, 74, 83, 29,131,190,141, 52, 90, 84, 85, 43,161, 84,252,101, 68, 43,164,119,239,222, 23, - 99, 99, 99,157, 92, 93, 93,145,159,159,223,152,104,133,244,234,213,235, 98,108,108,172,147,155,155, 27,114,115,115,205, 78, 43, -210, 4,201,130, 76, 38, 35,202,202,202, 24, 7, 7,135,102,145, 45,146, 36,161, 86,171,145,154,154,106,238,223,154, 61, 67,204, -206,206,110,247,193,131, 7,237,138,139,139,193,225,112,144,154,154,218, 96,214, 97,221,235,151, 95,126,225,143, 26, 53,234,231, -242,242,114,163,211,218,116, 58,221,198,201,147, 39,127,152,151,151,231,224,234,234, 10,169, 84, 10,129, 64, 0,150,101, 65,244, -239,143, 62, 47, 94,128,162,105,136,197, 98,164,165,165, 97,231,206,157,213,181,169, 98,154, 20,200, 8,130,240,227,243,249,152, - 52,105, 82,131, 29,123,246,236,193, 59,221, 56,221, 92,236,184, 85, 58,136,212,133,226,183,206,113, 56, 28, 34,164,199,128,246, - 61,250, 14, 15,122,154,116,231,185,172,240,165,169,135,146, 86,163,209,192,223,223, 31,247,238,221,195,165, 75,151, 48, 96,192, - 0, 68, 68, 68, 32, 49, 49, 17,191,253,246, 27, 18, 18, 18, 64, 16, 4,156,156,156,234,194, 47,140,198, 96,104, 20, 58, 20,229, -151,188,166, 94, 53,222,230,243,249, 80, 43, 41,179,218,232,201,147, 39,184,119,239,158, 62,181, 12,135,195,209, 77,153, 50, 5, - 44,203,178,153,153,153,176,177,177, 97,167, 77,155, 70,115,185, 92, 93, 94,158,121,241,193,117,164,170,142,100,113,249,188, 6, - 4,141, 97, 24,121, 98, 98,226,199, 0, 18,107,149, 44,192,146, 71,203,130,255,219, 56,131,215, 23,150, 54,169,104,189, 0, 48, -232,192,129, 3, 19, 79,156, 56,177,113,203,150, 45, 46,145,145,145, 40, 43, 43,131,183,183, 55, 60, 60, 60, 16, 23, 23,135,179, -103,207, 22,211, 52, 61, 31, 64, 83,210,207, 32, 24,201, 89,147,247, 92, 26,171,174,170,250,180,107, 68, 0,174, 28,254, 61,218, -221,221,125, 6,135,195,249,124,218,226,119,223,239, 55,178, 59,210, 18, 50,113,251,183,199, 40,204, 41, 54,105,179,113, 48,188, -189,189,253,135, 86, 86, 86, 2, 0, 84, 19,163,226,198,179, 14,245, 54,105,154,166, 53, 26, 13, 14, 29, 58,100, 22,217, 58,112, -224, 0, 84, 42, 21,232,215,253,171,122,155, 44,195, 18, 92,158, 16,158,173,252, 65, 81,213, 96,152, 55,158, 80,169,183, 89, 55, - 2,125, 46, 16,192,181,184, 24,119,238,220, 49,143,114, 15, 31,110,170,141, 84, 26,149,124,210,119,107, 22,196,205,140,250,214, -126, 64,207,206,248,106,195, 30, 80,212, 46,144, 28, 18, 98, 33, 31, 93, 67,123,129, 3, 53,126,140,249,162, 92, 81, 89, 54, 9, -175, 47,197,211,192, 38,107,204,195,194, 2, 52,195,224,210,245,187,102,159,187,190,183,167,105,112,185, 92, 60,123,246, 76,217, -212,108, 67, 14,167,198,205, 89, 55, 82, 55,102,147,101, 24,130,199, 23,161,149,119, 71,104,212, 85,127, 73, 27,185,186,186,126, -113,252,248,113,167,186, 84, 9,137,137,137, 32, 8, 34,245,149,226, 88,179, 95,169, 84, 34, 41, 41, 9,137,137,137, 64,205, 12, - 55,179,239,163, 58, 37, 75, 38,147, 17, 82,169, 20, 86, 86, 86,100, 98, 98,162, 58, 56, 56,248,190,137,251, 91,111, 83,165, 82, -101, 25,138,159, 84,169, 84, 45, 68, 34, 17,175, 81, 39,234,217,174, 93,187,180, 38, 92,136,175,149,179,162,162,226,206,194,133, - 11,187, 14, 27, 54, 12, 95,124,241, 69,169,131,131,131,205,143, 63,254,200,229,112, 56,196,204,153, 51,233,162,162,162,170,159, -126,250,201,238,196,137, 19, 40, 47, 47,191,105,198,185,203, 85, 42,213,199, 61,123,246,220,115,254,252,121, 43, 63, 63, 63, 84, - 86, 86,130,101, 89,236,222,189, 27, 51,103,206,132, 72, 36, 66, 90, 90, 26,222,121,231, 29,133, 66,161,248, 24,175,199, 78,214, -217, 36, 8,130, 96, 25,134,193,178,101,203,244,201, 73,235,146,149,218,136, 9,236,156,215, 86, 50,231,167, 10,201,196,175,126, -154, 2, 0,180, 78, 71, 63, 77,186,243,124,247, 15, 95, 93,229,243,249,215, 77,180,209,146, 57,115,230,252, 56,124,248,112,177, -181,181, 53, 74, 75, 75,113,227,198, 13,220,186,117, 11,183,111,223,134, 70,163,129,147,147, 19, 28, 28, 28, 32,149, 74,241,228, -201, 19, 37,128, 37,198,108, 10,172,120,240,105, 95, 55,243,183, 70,193,226,213,155,109, 88, 95,221,226,243,120,102,221, 71,125, -251,246, 69,143, 30, 61,234, 8, 16,157,157,157, 45, 85,171,213, 68, 61,210,159, 87, 71,200,189,188,188,116,251,246,237, 99,141, -217,188,189,115, 43,206,175, 90, 2, 1,159,143,249,169,185,122,210,181,103, 64, 23,240, 4,124, 4,140, 24, 83,255,183,219, 80, -227, 46, 68, 35,146,101,172,239,248,211,247,166,197,230,127,173,205,255,203,144,226, 13,150,224,169,195,126,149, 74,117,238,163, -143, 62,138, 9, 9, 9,249,104,211,166, 77, 4,159,207,199,138, 21, 43,216,252,252,252, 95,107, 71, 33,101,111, 82, 42,150,101, -127,189,118,236,230, 39, 83,163, 70, 18,243, 54, 79,235,125,255,114,210,147, 78, 61,253,208,169,167, 31,238, 95, 73,193, 15,139, - 15,236,163,181,244,178,130,130,130, 28, 19,166,212,131,122,117,104, 28, 12,239, 20,127,245,178, 83,115,103, 29, 50, 12, 19,123, -224,192,129,217,163, 71,143, 38,239,222,189,251, 90, 76, 86,221,178, 59, 12,195,224,226,197,139,160, 40, 10,191,254,250, 43,195, - 48,140,225, 60, 90, 96, 79,126,183, 57,102,234,175,123, 79, 10, 4,124, 2,183,174, 31, 69, 69,153,241, 89, 93,124, 62, 15,191, -236, 62, 70,241,249,188,167, 77,237,167, 40, 42,247,242,229,203,110, 67,105,154, 71,146,100, 83, 4,170, 73,196,198,198,106, 25, -134,201, 54,113,216,205,194,151, 57, 35, 86,127,241,193,129,225,239,125,228,214,179,103,111,158,179,171, 27, 8,130, 64, 81, 97, - 17,210,146,238,106,207, 29,253,185,176, 90, 97,222, 18, 60, 31,172,191,166,143,201, 2,128,200,153, 91,244,241, 89, 0, 48, 98, -218, 66,244, 15, 11, 4, 97,142,244,244,138,100, 49, 58,157, 14, 18,137, 4, 58,157,174,201, 20, 15,118,118,118, 98,149, 74,165, -172, 77,196,104, 84, 42, 98,129,191,188,141,104,154, 14, 40, 43, 43, 67,117,117, 53,110,221,186,197,174, 89,179, 70, 38,147,201, -244, 65,155, 90,173, 54,160,180,180, 20, 85, 85, 85,184,121,243, 38, 27, 19, 19, 35, 43, 41, 41, 89,220,156,123, 72, 44, 22,119, -227,114,185,247,203,202,202, 24, 43, 43, 43, 82,171,213,106,131,131,131,133, 98,177,216,236, 5,213,165, 82,233, 48, 67,251,124, -124,124,210,211,211,211,219,209, 52, 93,127, 13, 68,190, 74,165,242,235,217,179,167, 57,207,143, 57,187,118,237,194,177, 99,199, - 66, 43, 43, 43, 39,103,103,103,239, 1, 16,202,229,114,241,240,225,195, 84,149, 74, 53, 97,244,232,209,187,203,202,202,238,160, -102, 9, 30,115,112, 62, 45, 45,109, 82, 64, 64,192,174,175,191,254,218, 58, 34, 34,130,235,233,233,137,238,221,187, 35, 45, 45, - 13,103,206,156,209,110,219,182,173, 90,161, 80,124, 0,224,162,241,102, 7,161,211,233, 32, 16, 8,244, 47,161, 80, 8, 62,159, - 15,185,146,197,244, 13, 25, 74, 29,196,202,141, 43, 62, 62,195, 2, 68, 65,110, 70,113, 81, 65,238, 29,130, 32,174, 75,165,210, - 10, 3,117, 38, 80,169, 84,157, 89,150,229, 16, 4,177,153,162,168,105,179,102,205,242, 88,187,118, 45, 58,116,232,128,226,226, - 98, 72, 36, 18,248,249,249, 65, 38,147,225,238,221,187,180, 66,161,216, 14, 96, 37,106,227, 71, 12,161,188,184, 18, 45,221,189, - 26, 40,159, 44,203,130,165, 1,173,154, 6, 77,177,208, 16, 90,240,120, 90,240,249,124,115,148, 39,150, 97, 24,148,121,120,128, - 73, 74,194,237,219,183,193,178,172, 65, 85,205,223,223,223,140, 7, 59, 3,129, 80,208,192, 93, 72, 16, 4,248, 2, 1,120, 2, -126, 83, 51,103, 44, 42,150, 5,255,211, 48,215, 55, 94, 14, 96,198,163, 71,143,246,244,235,215, 47,142,101, 89, 30,106,252,145, -191,255,153, 63, 47, 40, 40,120,112,243,204,131, 69,110, 45, 29, 98,222,154,220, 27, 29, 58,123,131,214,209,184,113,246, 33,126, - 93,123,226, 96, 94,110,222, 52,152,177,246, 25,195, 48, 87,123,117,235, 64,162, 94,174,110, 79, 79, 79,230, 77,102, 29, 86, 84, - 84, 44,159, 63,127, 62,190,248,226,139, 55,153,117,216, 36, 30, 63,145,205, 32,192,182, 28,241, 86,159,161, 32, 72, 86,163, 81, - 27,121,240, 65,159,185,148,207,231, 61,189,151, 40, 13,110,234, 56,153, 76, 54,244,253,247,223,191,200,229,114,219, 52,167,206, - 25,134,201, 46, 44, 44, 28,104,250, 72,221, 13,181,178,210,239,244,193, 29,115,207, 31,219, 53,148, 97,104, 95, 2, 0,135,203, -127,174,165,168, 11,106,101,229, 38,152,185,168,244,186, 25,225,152,243,221,111,216,250,197, 8,204,138, 57,140,159,151, 77,199, -162, 13, 7,240,237, 23,115,176,102,203,191,240,213,156, 73, 24, 59,241,125,134, 37,200, 63,204, 61, 15, 14,135,115,126,199,142, - 29, 83,167, 79,159,174,159,180,192,178,108,131, 7,187, 86,171, 85, 50, 12,131,237,219,183, 51, 0,206, 27,179,215,176,141, 8, -214, 88,188,148,185,109, 84, 89, 89,249, 65,120,120,248,110, 0, 66,150,101,159,149,149,149,253, 19,120,181, 52, 84, 85, 85,213, - 7, 61,123,246,220,205,178,172,144, 32,136,215,246,155,131,218, 84, 15,221, 28, 28, 28,238,215, 42, 89,194, 55, 9,136, 55, 86, -213, 70,220,138,230,184, 16, 25, 0,179,234,101,124, 95, 27, 26, 26, 90,127, 81,233,212,178,178,178,110,111, 80,174,139, 74,165, - 50,112,217,178,101,115, 69, 34, 81,127,133, 66,209, 30, 0, 36, 18, 73,154, 90,173,190,170, 84, 42, 55,193,116,110, 42, 13,195, - 48,105, 58,157, 46,200,197,197,165,102, 70,109, 45,217, 2,128, 83,247,233,251, 0,221,189, 70, 20,223,111,118,193,206,158, 61, -219,218,193,193, 97, 8, 65, 16, 99, 89,150,245,151,203,229,234,101,203,150,221,140,141,141,173,104,211,166,205, 91,195,135, 15, - 39, 28, 29, 29,113,239,222, 61,182,164,164,228, 40,128,197, 48, 99,166, 53,195, 48,217,235,214,173, 67,115,239,119, 99,251, 41, -138, 42, 56,123,246,172,243,176,162, 34, 46,195, 48, 24, 49, 98, 68, 3, 2,215, 24, 79,159, 62,133, 90,173, 54,154,204, 81, 93, - 81,134, 1,115, 23, 2,181,179, 63,235, 80,163,100,177, 96, 53, 22, 94,101,193,223, 11,255,238, 5, 61,205,146, 22, 61, 60, 60, -198,139, 36,194,207,188,219,123, 4,231,103, 20,165,200, 43, 20,251,164, 82,233, 14, 3, 15,114,179,108, 54, 51, 97,169, 69,254, -253, 55,217,124,149, 71,139, 6,203,210, 96, 25, 22, 44,203,128, 97,232,154, 5,175, 89, 6, 44, 77, 19, 4,129, 63, 52, 74,163, -153,193, 27,151,211,193,217,217,121, 37,203,178,195, 56, 28, 14, 89, 95, 12,171,255,185, 86,201, 58, 47,147,201,190,106, 66,121, -253, 63, 87,159,177,177,177, 77,146,127,115,103, 29,142, 27, 55,142,110,230,189,121, 85, 34,145,120, 52,181,175,186,186, 58, 71, - 42,149, 14,249, 47,169,207,250, 51, 6,155, 99,179,217,179, 14, 77,217,244,246,246, 22, 82, 20,213, 5,128, 31, 65, 16,246, 0, - 74, 41,138,186, 80, 92, 92, 92, 8,160, 27,128,101,181,191, 89, 5,224,254,127,248,126, 23, 59, 59, 59,239, 34, 73,178,165, 57, - 63,214,233,116,154,210,210,210,169,141, 6, 4,122,155, 78, 78, 78,247,185, 92,110, 75, 51,236,188, 44, 41, 41,233,102,121,126, - 90,108,254, 15,161,113, 16,188,193, 76,241,255, 14,162,101,177,105,177,105,177,105,177,105,177,105,177,105,177,105,177,249,191, - 78,180,154,220,182, 76,171,181,192, 2, 11, 44,176,192, 2, 11, 44,248,115, 56,211,136,108,157,169,251, 64, 24, 97,165,205,145, - 4,223,132,217, 94,178,216,180,216,180,216,180,216,180,216,180,216,180,216,252,219,217,180,224, 47,132, 69, 86,181,216,180,216, -180,216,180,216,180,216,180,216,180,216,252, 95,135, 65,215, 33,105,169, 27, 11, 44,176,192, 2, 11, 44,176,192,130,127, 15,204, - 38, 90, 18, 55,255, 0,103,239,224,221, 14, 45, 59, 37, 58,180,236,148,232,236, 29,188, 91,226,230, 31,240, 55,173, 55, 49,128, -137, 92, 46,247,162,187,187,123, 37, 12, 44,189,243, 63, 0, 91, 0, 99, 81,147,223,103, 20, 0,171,191,210,120, 4,192, 29, 15, -124, 54, 5,200,153, 2,228,140, 7, 62,139,248, 31,140, 27, 92, 49,219, 35,252,250,185,137,231, 86,204,246, 8,111,114,255,124, - 15,167,219,191,141,251,110,237,103,158,142,127,209, 95,218,184,186,186,238,116,115,115,203,114,117,117,205,118,117,117,221, 5, -192,206,242,184,179,192, 2, 11, 44,248,183,161, 46, 70,171,238,165,143,209,226, 2, 64, 92, 92, 92, 4,128,107, 0,250, 69, 70, - 70,198, 55,254,181,131, 87,208,116,223,182,190, 95,172, 94,177,152,112,119,117,182,210,209, 12,149,153,149,219,113,249,234,152, - 35,249, 2,238,198,178,156,164,159,223,160, 80, 4,135,195, 25, 47, 20, 10, 35, 1,212, 17,182, 84,181, 90, 29, 71,211,244, 33, -152, 55, 77, 27,110,110,110,215, 57, 28, 78,235,230,252, 49, 77,211, 57,133,133,133,189,223,176, 50,199,121,121,121,237,138,136, -136,176, 10, 13, 13,133, 64, 32,192,178,101,203,230, 75,165,210, 77,230, 26,112,112,240,177,161,132,162,207,185, 2,193, 96, 86, -171, 9, 98,193, 2,164, 48,137,209,169, 47,243,213,234,141,101,101, 25,114, 51, 77, 45, 6, 48,173,182,174,126, 6,176,238,207, - 92, 37, 83, 59, 67,171,165,107,174, 9, 62, 23,244,201, 23,118,215,150, 44, 89,194,141,140,140,196,207, 63,255,220,123,231,206, -157, 31,203,229,242,203, 0, 78, 1,120,254,103,175, 74, 55, 96, 70,207,222,189,191,155, 58,127, 62, 71,121,253, 58,190,219,181, -107, 51,106,242, 45,109,109,238,181,196,231, 99,172,179, 51, 47,146,101,209,133, 0, 8, 2,120, 40, 43, 97,206, 82, 20,125, 8, -102,228, 98, 51,130,137,104, 56, 29,127,127,115, 13, 84, 60,103,151, 10, 71, 4,244,169,120,126,117, 41,128,183, 26,239,215,169, - 68, 83, 89, 78,171, 72, 37,155,144, 11, 96,195,159,172, 86, 43, 23, 23,151,196,147, 39, 79,182, 12, 13, 13,229, 2,192,253,251, -247,167, 68, 70, 70, 14,144,201,100, 65, 0, 42,255, 67, 15, 33, 17,151, 36, 63, 19,240,120,131,105,154,238, 4, 0, 28, 14,231, -177, 70,171,189,168, 99,152,173, 48, 51, 39,155, 5, 22, 88,240,191, 11, 83, 92,228,191, 28, 6, 51,195,215,157, 28, 91,255,189, - 62, 36,174, 29, 58,134, 13, 28,243,180, 66,174, 80,101,101,229,149,205,251,108,205,197,143,231,172, 63,177,225,167,184,179,241, -119, 82,111, 7,132, 14, 73,145,184,118,232,104,192,180, 33, 31,174,151, 88, 44,126,176,109,219, 54, 42, 45, 45,141, 45, 47, 47, -103,159, 62,125,202, 30, 61,122,148,253,228,147, 79, 84, 98,177,248, 1, 0, 47,115,108,186,185,185, 21, 62,189,242, 27,251, 50, - 49,129,205,190,127,135,213,106,181, 44, 69, 81, 44, 69, 81,108,202,249, 56, 54,241,212, 49,246,225,209, 67,172, 70,163, 97, 53, - 26, 13,171, 86,171,217,182,109,219,230,155, 89,206,198,240, 12, 12, 12,212,196,197,197,177, 71,142, 28, 97,231,207,159,207,134, -132,132,208, 0,102,154,123,238, 18, 87,191,254, 54, 45,130,101,211,163,182, 82,103,110, 94, 96,147, 95, 60,100,147, 95,164,179, -177,151, 82,217,105, 11,182, 80, 54, 45, 66,100, 18, 87,191,254,166,206,221,193,193, 33,140, 32, 8,182, 14, 0,216,214,173, 91, - 87,213,127,121,121,121, 53,120,181,106,213,170,170, 77,155, 54,207,157,156,156,186, 52,101,115, 66, 39,176,108,202,126,150, 77, -217,207, 46,233, 11, 54, 57, 57,249, 54,203,178,215,234, 94, 74,165,242,218,241,227,199,175,189,251,238,187,215, 0,188, 99,164, -158,204,170,207, 41, 64,142,252,228, 73,150,221,180,137,101, 35, 34,216, 84,128,157, 2,228, 52,211,102, 91,119,119,222,195,245, -235, 62,214,156, 60,249, 43,123,238,220, 25,246,236,217, 56,246,196,241, 93,236,230, 77,159, 81,110,110,188, 36, 0,237,154, 97, -147, 11, 96, 13,128,141,168, 81, 46,211,100, 50, 25, 91, 80, 80,192, 2, 72,171,253,110,163,139,139,203, 6, 52,173,190, 13,170, -175,100,205, 29,230,126,238,189,183,122,179,242,138,124,246,189,183,122,179,115,135,185, 55, 80,182,134,249,248,216,204, 26,209, - 73,150,124,127, 31, 61,107, 68, 39,217, 48, 31, 31,155, 55,172, 79, 2, 53,235,132,110,187,114,229,138,142,173, 7,173, 86,203, -238,217,179,135,118,112,112,248,181, 25, 54,219,187,184,184,100, 59, 58, 58,166,213,255,210, 37,120, 84, 79,255, 62, 83,150, 59, -117,124, 55,162, 25,229, 12, 21,241,249, 47, 47, 30,254,145, 46,201,121,204,106,148,133,108,197,179, 4,246,101,234,109,118,207, -142,141, 90, 1,151,251, 18, 64,232,159,185,150,154, 9,139, 77,139, 77,139,205,255, 66,155,198,184,200,255,101,112, 27,159, 96, - 99, 8,133,130,168,229, 75, 22, 18,229, 37,229, 74, 85,165, 92,163, 85,169, 84, 36,159, 85, 61, 78,121, 81, 68,114, 57,229,115, -231,204,182,137, 90,180, 36,170, 26,152,100,230,127,122,133,132,132,220, 61,118,236,152,171,163,163, 35, 42, 42, 42, 80, 82, 82, -130,187,119,239,130,101, 89,140, 30, 61, 90,216,163,123,247, 46, 75,151, 45,187,245, 50, 47, 47, 28,134, 59,222, 87,228,197,209, - 25,235,122,215,172, 69,251, 85, 86, 73, 77,175, 67, 16,216, 57, 46, 82,127,204,202,151, 53,171,101,136, 68, 34,253,130,196,111, -128,240,129, 3, 7,242, 1,224,195, 15, 63,172,148,203,229,209,181, 10,135, 89, 43,173, 74, 92,253,250, 59,123,120,198,253,184, -125,157,184,147,175, 31, 40,173, 14,217, 5,249,224,242,236,209,178, 37, 31,239, 79, 26,204,235,219,211,209,121,205,170,157,103, - 10, 24,140, 82, 20,167, 95, 48,100,203,222,222,126,207,161, 67,135,112,248,240, 97, 0, 64, 90, 90, 26,252,252,252, 36,166,202, -144,148,148,228,243,206, 59,239, 28, 44, 41, 41,105,103,234,216,198,137,241,133, 66, 33,122,247,238,141,142, 29, 59,226,228,201, -147,253,106,149,173, 63, 5,229,245,235,176,126,244, 8,136,127,163,193, 75,219,174, 93,189,111,159, 61,179,207,249,204,217, 84, -108,216,176, 11,207,159,215, 8,109, 62, 62, 62,152, 56, 97, 28,239,241,227,155,129, 99,199, 78,188,249,251,239,207,123,215, 18, - 37, 83,248,250,167,159,126, 90,220,166, 77, 27,140, 29, 59,118, 92, 96, 96,160,187,173,173, 45,118,236,216, 1, 15, 15, 15, 31, -141, 70,243,236,228,201,147,158, 5, 5, 5,152, 61,123, 54, 10, 11, 11,231, 27, 50,212,111,104,191,165,194, 17, 1,125, 58,116, -157, 10,107, 91, 15,252,116,224, 16,158, 62,216,211, 71, 77,165, 46,229,211,241,147,149,172,112,154, 44,199, 58,170,117,183, 8, -167,118,129,239,192,187,107,130,179,138,254,253,197,210,193,109, 99,184, 34,213,158, 21, 27,164, 37,175, 25, 29, 27,203, 9,170, -124,226,152,116, 17, 37,192, 10,166,142, 96,233,213, 90, 22,239,244,237,219, 87,223,112, 89, 89, 89, 80,171,213, 8, 8, 8, 32, - 53, 26, 77,127, 51,235,181,253,144, 33, 67,254, 56,123,246,172, 83,251,246,237,101,165,165,165,250, 29,238, 78,246, 67,227,143, -109,158,189,230,187,127,249,239,101,137,114, 89,234,137,199, 38,108,133,246, 10,235,122,233,220,177,125,214, 68, 85, 46, 4,246, -197, 0, 83,130,140,131,191,128,176,114,196,248, 79,230,113,251, 15, 28,208, 98,240, 91, 99, 46, 61, 77,127, 62, 16,192, 61,203, -184,222, 2, 11,254,214,170, 22,251,191,118, 78,122,162, 21, 25, 25, 73, 52,117,130, 12,203, 4,187,185, 58,137, 55,175,223,125, -143, 67,105, 52, 18,123, 59, 13,207,206,150, 33,108,236, 56,148, 70, 91,229,237,227, 45, 96, 88, 38,216,128,253,198, 83, 60, 9, -177, 88,124,236,212,169, 83,174, 60, 30, 15, 12,195,192,197,197, 5,153,153,153, 40, 47, 47,135, 92, 46,199,243,212, 84,180,241, -106,133, 21, 81, 11, 61,102, 47,140, 58,166, 80, 40,186,161,161, 27,241,181,105,163,180,182,225,186,209,117, 75,176,188, 54,228, -175,253,174,137,125,230, 78, 69,205,204,201,201,129,181,181, 53,130,130,130,172,111,220,184,241,187, 17,146,213,192,166,131,131, -143, 13, 35, 20, 28,222,246,227, 50, 49,165, 77, 66, 74, 70, 41, 58,180,233, 3, 55, 39, 47,228,151,106,112,251,238, 41, 36, 37, -238,135,111, 11, 47,204,252,100,128, 40,102,221,145, 67,124, 93, 27,175,242,242,204,202,166,108, 86, 86, 86, 90,183,109,219, 22, - 94, 94, 53,235,158,209, 52,141,148,148, 20,208, 52,173,223,174,255,190,251,232, 21,232, 42,179, 49,117,202, 20,148,148,148, 88, - 55,101,147,199,129,110,222,199, 19,185, 98, 30, 32,144, 56,106,170,170,170,244,203,112, 80, 20,133,135, 15, 31, 34, 60, 60, 60, - 34, 54, 54,214, 20, 43, 50,171, 62, 41,224,219,239,126,253,117,203,164,138, 10, 18, 0,126, 38, 8,134, 98,217,111,205,189,150, - 92, 93,121, 71,207,159,219,235,204, 33,159,192,209,238, 27,220,189,155, 13,138,170, 41,111, 73, 73, 17,102,125, 86, 9, 62,207, - 6, 39, 79,254,203, 41, 32,160,247,209,130, 2, 42, 8, 13,221,136, 77,149, 83,116,238,220, 57,204,154, 53, 11, 41, 41, 41,158, - 28, 14, 7,119,238,220,129, 88, 44,198,250,245,235, 57, 1, 1, 1,158, 18,137, 4,231,207,159, 71, 97, 97, 33, 97,172,156,215, - 46, 92, 91, 93,241,252,234,210, 2,226,252,176,159, 14, 28,194, 71, 19,198,195,157,205,248,221,206,151, 88, 61,100, 68,175,175, - 88, 78,171, 72,137, 77,176,131, 95,208, 8,240, 5,214,152,249,229, 74,164, 37,157,118, 80,200, 19, 63, 35,232,220, 86, 43, 54, -196,206,121,173,156, 71,198,209, 31,238,191,209,245,162,215, 61,239, 71, 15, 63,190, 35, 77,216,153,248,138,104,249,112, 9,146, -182, 3,106,150, 79,121,246,236, 25,158, 63,127, 14, 46,151, 11,165, 82, 9,157, 78,215,100, 57, 61, 61, 61,103,232,116,186,175, -106,219,121,183, 72, 36,250, 96,223,190,125, 78,245,137,182, 75,240,168,158, 78, 54,146,129,133, 69, 37,101, 55,239, 37, 63,157, - 55, 99,108,191,235,183,147,114, 41,222,187, 57, 21,137, 39, 43, 12,212,167, 72, 44, 16, 28, 61,127,252, 95,214,218, 23, 87, 32, - 9,232, 7,158,181, 31,104,109, 30, 20,101,213,144, 63,151, 66,253,227, 15,232,252,217, 92,156, 62,113,196, 58,176, 83,183, 88, -181, 86,235, 7, 64,243, 6,247,102,115, 96,177,105,177,105,177,249,223,105,211, 32, 23, 97, 89,182, 43, 0,183,218,205,146, 90, - 94,224, 12,160, 24, 53,171,200,184,213, 62, 59, 4,245,126,214,120,187,254,177,141,183,235,127, 46,169,253,236, 90,251,126,143, - 32,136, 82, 19, 69,247, 64,205,210,132,103,106,223,129, 90, 87,162,201,192, 99,130, 32, 43,105,154, 17,242, 93, 92, 85, 31,190, - 55,176,211,111,151,238, 63,180,114,182,229, 14,237,215, 37,226,238,227, 23,183, 8,146,208, 18, 4,105, 86,220, 7,135,195, 25, -191,121,243,230, 78,182,182,182, 96, 24, 6,118,118,118,144,201,100,208,104, 52,168,168,168,128, 90, 94, 9, 74, 94,137, 71,185, - 89,232, 21,209, 15, 99,134, 13, 9,248,215,137, 83,227,105,154, 62,104,204,174,103,112, 23,189,146,181,178,181,211, 43,105, 34, -183, 92, 79,186,190,233,226, 7,190,181, 53, 6,207,139,250, 51,215, 64,194,153, 51,103,206,141, 30, 61,250,173, 5, 11, 22,144, - 82,169,244,124,102,102,102, 47, 0, 41, 38, 73,133, 80,244,249,167,159, 71, 58, 56, 88,179,136,189,120, 10,125,187, 76,128,149, -128,131,146, 74, 10, 4, 1,164, 38, 31, 3, 65, 56, 34, 49, 77,138, 62,157,109, 49,100,104,128,245,137, 35,169, 11,240, 42, 62, -232,181,166, 41, 43, 43, 67, 81, 81, 17,180, 90, 45,180, 90, 45,198,142, 27,135,189,123,246,160,186,186, 26, 74,165, 18, 26,141, - 6, 52, 77,131, 36, 73, 92,140,139, 69,238,139, 84,244, 12, 15, 7, 12, 44,189,180,231, 33,120, 0,110, 63,125,250, 20,169,169, -169,120,249,242, 37, 68, 34, 17,220,221,221,177,114,229, 74,168,213, 53,107,148,141, 27, 55, 46, 2,192,227, 63,123, 67, 61, 7, -118,102,210,244,210,183,142, 31,119,189,113,252, 56,115,251,244,233,151, 66,185,124,135, 57,191,229,243, 49,118,221,183,159,116, -144, 72, 36,120,153,179, 25,254,254,124,204,159,235,132,232,111,138, 1, 0,179,103,181, 68,247,110,206,168, 44, 63, 2,103,215, -197,216,178,101,142,239,180,105, 27,167, 40, 20,244,110, 19,166,151,158, 58,117,106,140,159,159, 95,139,132,132, 4, 66, 32, 16, - 64, 44, 22, 67, 44, 22, 67, 36, 18,161,168,168, 8,153,153,153,236,186,117,235,242, 0, 44, 53,102,104,197, 22,233, 45, 0,111, -205, 29,134,115, 79, 31,236,233,211,130,243,226,209,152,153,189,179, 18,111, 39,200,127,187,120, 99,149, 78, 37,202, 45,127,121, -105, 97,219,238, 9,206,159,125,241, 53,126, 88,183, 28, 79,239, 92, 47,117,243,170,220, 42, 38,212, 77,150, 51, 34, 98, 5,215, -195,205, 81, 55, 99,218, 24,251,211,110, 55,103,156,229, 18,178,130,226, 7,235,145,153,160, 20,182,235, 50,185,189, 15,169,185, -114,229,138,184,111,223,190, 80,169, 84,122,101,114,223,190,125,140, 78,167,187,218,228,181, 73, 81, 95,229,229,229,121, 40,149, - 74, 12, 27, 54,108,246,250,245,235, 37,117,107,212,209, 52,221, 64,201, 90,189,105,239,133,207,191,218,122,245,194,193,111, 60, - 87, 71,125,208,111,210,204, 53, 87, 97, 96, 29, 73, 46, 73,126,118,250,248, 46,119,145,131, 22, 98,199, 33, 80, 21, 42,241,116, -231, 71, 80, 84,170,208,125,245,215, 0, 4,208,104, 73,236, 24, 49, 22, 60, 39, 79, 44,159,254,129,231,146, 29, 63,125,194, 48, -204,102,203,184,222, 2, 11, 44,104, 4, 55,130, 32,226, 0, 32, 42, 42,106,113,116,116,116, 50, 65, 16,113, 44,203, 70,214, 10, - 40,113, 44,203, 70,214, 29, 83, 75,206, 94,219,174, 59,182,241,118,227,207,139, 22, 45, 10,140,137,137, 89, 27, 30, 30,126,240, -230,205,155, 47, 0,152, 34, 90,195,107,137,213,107, 75,239,144,117, 12,178,254,123, 3, 69,139, 97,174, 63,123,145,165, 24, 50, -168, 71,203,184,248,199,247,222,127,127,248,192,241, 35,250, 14,205,204, 41, 73,245,245,118,119, 78, 78,126,108,203, 48,204,117, -115,106, 73, 40, 20, 70, 14, 24, 48,128, 91, 86, 86, 6, 43, 43, 43,200,100, 50,228,229,229,129,162, 40,168, 42,202,161,174, 40, -135,170,188, 12, 84, 69, 25,158,223,191,139, 96, 95, 31, 97,109,176,188, 81,212,169, 46,141,149,170,250,202,150,192,198, 6, 66, - 27, 27, 16,205,119, 27,190,107,111,111,127,187,174, 83,165, 40,234,179,133, 11, 23, 22, 51, 12,131, 53,107,214,216, 90, 91, 91, -199, 2, 16,154, 50, 98,227,194,137, 12,239, 28, 68, 62,201, 76, 68,239,144,169,104,223,246,109,100, 22, 42, 81, 44,167, 80, 84, - 78,161,123,223,239,209, 58,228,107,180,234, 28,141,212,236, 82,120,182,240, 35,193, 21, 26, 93,252, 57, 55, 55,183,193,246,193, - 3, 7,160, 80, 40,224,235,235,139, 9, 19, 38, 96,225,194,133,152, 48, 97, 2, 60, 61, 61, 49,233,189,119,176,124,249,114, 20, - 20, 20,152, 42,170,186,125,251,246,106,111,111,111,181,183,183,183,154,162, 40, 84, 85, 85,161,188,188,188,113,125,207,105,110, - 69,186,186,186, 46,114,119,119, 79,116,117,117, 77, 22, 10,133,103, 31, 18,196, 19,149,183,183, 91,175,145, 35,137,142,239,189, -199,201, 22,139,137,120,192,218, 28, 91,206,142,188,225,253, 7,188, 37, 40, 47,219,165, 23,169, 62,120,223, 5,127,196, 7,226, -198,239,221, 48,235, 51, 95, 16,164, 8, 4, 41,128,162,250, 10,122,132,134,243,237,237, 9, 83,215,210, 68, 0, 15,123,245,234, -229, 57,115,230, 76, 66, 40, 20, 98,246,236,217,212,244,233,211,211, 39, 76,152,144,126,249,242,101,218,219,219, 27,173, 90,181, - 34, 90,181,106,229, 1,224, 97,237,111,140,194,214,151, 88,173,166, 82,127,183,247,147,188,160,225,220,179, 74, 43, 28,187, 98, -131,180,100,245,182, 23, 27, 50,159, 42,124,158,222,185, 94,146,158,116,154,201,188,119,173, 56, 63, 93,238,179,122,219,139, 13, -139,183,230, 55,121, 83,199,199,131, 57, 22, 23, 79, 41,170, 21,220,145, 35,250, 43,102,124, 56,190,189,163,117,224, 62,180, 24, - 18,210,218,171,229,164,229,107,183, 80,211, 63,249,156,250,249,151, 93,172, 92, 46, 71,101,101, 37,182,108,217,162, 59,125,250, -116, 30, 77,211,159, 27, 26, 3, 1,128, 86,171,197,140, 25, 51, 36,182,182,182,200,205,205,213, 43,162, 0, 32,149,149, 60,190, -113, 47,233,201,188,127,142,139,168, 86,171,213, 23,174,221, 79,237,232,231,221,146, 32, 88,131, 19, 81, 4, 60,222,224,110, 61, -122,112, 88,182, 28, 4,215, 11,207,247,172, 67,101, 65, 41, 42,139, 74,193,225, 73,160,131, 16, 90, 70, 0,251,224, 80,164,221, - 75, 64, 11, 23, 55,174,144,199, 27,106,233, 79, 44,176,224,239, 9, 99, 92,164, 62, 89,138,137,137, 89,107,108,127,189,119, 77, -163,109, 61,145,106, 76,194,234,127, 6,128,152,152,152,181, 44,203, 70,222,188,121,243, 0, 0,165,153,167,240,113,189,119,243, -243,104,113, 84,154,232, 5, 11,151,194,193, 78,108, 23,218,197,207,253,228,249,248,251,215,111,222, 79,109,221,202,217,133,213, -106, 28,190,221,248, 67, 75, 66,161,140, 49,179, 16, 1,206,206,206,160, 40, 10,207,158, 61,195,203,151, 47, 65, 81, 20,116,213, -213, 80,151,151, 67, 85, 86, 6,186, 90, 14, 62, 77, 67, 41, 43,130,147,149, 8,120, 53, 35,209,132,242, 70, 52, 73,180,234,222, - 69,182,182, 16,218,216,130,228,241,154,116, 43, 26, 64,215,208,208,208,195, 73, 73, 73, 61, 6, 13, 26,180, 10, 53, 83,228,179, -243,242,242, 6, 46, 91,182, 76,237,230,230,134, 25, 51,102,116, 0, 48,213, 36,201, 20,104, 2,188,221, 59,160,189,207, 84,180, -110, 53, 0,229,213, 90,200, 42,181, 40, 42,167,176,227,251,112, 28,253, 57, 20,127, 28,237,131,164, 11,131, 81,174,117,135,181, -231,187, 96,105, 77,160, 49,155, 23, 47, 94,196,202,149, 43,177,106,213, 42,172, 89,179, 6,171, 86,173, 66, 94, 94, 30,130,130, -130,144,147,147,131,115,231,206, 65, 42,149,194,217,217, 25,119,239,222,197,166, 77,155,240,199, 31,127,152, 60,233, 58,226,106, -198, 49,205,242,165,235,116,186,105,210,145, 35, 59, 21, 58, 58,118,236,210,165,203, 91,179,103,207,246,233,213,171,151,126,191, -143,143,143,151, 88, 44, 46, 64,205, 12,202,206,198,108, 49, 64, 23, 23,151, 32,104,212, 79,106,219,152, 7,130, 16, 97,192,224, - 84,244,234,115, 31,148,150, 15,146, 16,130, 36, 69,208,233, 74,224,224,224, 9,150, 37,130, 76, 20,113,153, 76, 38,243,187,116, -233, 18,153,153,153, 9,145, 72, 4, 0, 89, 43, 86,172,248, 97,195,134, 13, 41, 78, 78, 78,116, 92, 92, 28, 78,156, 56,129,200, -200, 72,206,244,233,211,253, 90,181,106,181,221,212,121,175,216, 34,189,181,127,227,185,127,240,180, 14,157, 69,226,214,109, 80, -109,253,238,167, 17,206, 18, 0, 56,159,145, 33,119,245,170,140,169,150, 39,230,216,183,172,250,230,124,134,169, 25,167, 43,152, - 7,233, 79,110,239, 63,126,190,162,168,176,140,215,165, 83,160, 50,122,229, 23,252,214,109,218,125,187,124,225, 63,221,243, 42, - 69,229,131,103,159,123,114,236,252,221,170,201,239,127,164,251,240,227,153,170,115,231, 47, 30,103, 24,166, 19, 12,204, 56,100, - 24, 6, 82,169, 20,201,201,201,200,200,200,128, 76, 38, 67,113,113, 49,228,114,185,222,221,104, 37,175, 60,243,195,175,167, 31, - 73,196, 98,171, 30,157,252,188,238, 36,164, 20, 73,196, 98, 43,191, 54, 94,237,129, 21, 77, 62, 71,104,154,238, 36,178, 18, 3, - 32, 80,158,116, 29, 85,101, 85,168, 42,175,130,188,180, 10,106,138, 3,149,154,132, 82, 67,194, 59, 98, 8,170,170, 85,168, 42, -169, 0, 67,211, 33,150,238,198, 2, 11, 44, 48,210,215,199, 69, 69, 69, 45, 54,243, 88,179,221,155,141,137, 87, 84, 84,212, 98, -130, 32,226, 22, 45, 90, 20, 8,195, 19,170,234, 99,103, 19, 47, 0,102,164,119, 40, 41, 73,175,178, 33, 2, 70,207,253,242,171, -115, 7,126,249,222, 85,173, 86,228, 56, 57, 88,211,214, 86, 2,231, 15,103,172,129,188,170,108, 84,181,249,233, 8, 80, 86, 86, -134, 23, 47, 94, 64, 44, 22,131,207,227,129, 86, 42, 65, 43,171,161, 44, 43, 1, 73,169,193,167,105, 56, 90,137,225,237,233,142, -214,110,238,102,217,124,118,229, 55,125,224,123,125,119,225,186,208, 0, 8, 36,214, 16,216, 88,227,211,184,107, 0, 0, 62,159, - 15, 44, 91,101,150,104,210,162, 69,139, 83,251,247,239,231,203,100, 50, 60,124,248,240, 17,128, 10, 0, 54, 0,152,212,212,212, - 75, 73, 73, 73,145,126,126,126, 0,224,107,202, 88,101, 49, 73,107,117, 44,114, 11,178,144,249, 50, 1,142,118,109,193,179,106, -143,162,114, 10, 66,113, 91,104,213,175,188,143,170,202,108, 40, 41,142, 89,231,174,209,104,160,211,233,160,211,233,160,209,104, -240,241,199, 31,227,198,205,155, 56,120,226, 50, 94, 60, 79, 67,135, 54,238,152, 50,101, 50, 66, 67, 67,113,243,230, 77,163,182, -166,118,134,182,133, 53,184, 27,223, 34, 33,176,118, 82,135, 45,188,112,199, 20,217, 34, 8,130,133, 1, 87,100, 35,108, 8, 15, - 15,111,151, 86, 93,141,228, 39, 79, 48,104,197, 10, 0,192,217,179,103, 27,156,203,188,121,243, 4, 41, 41, 41, 31,222,191,127, -255,195,252,252,252,141, 0,154, 14, 54,103,129, 51,103,110,225,159,255, 76,129, 76, 38, 3, 0, 28, 58,240,138,151,102,190,160, - 48,108,120,141, 71,203,222,222, 30, 27, 55, 6,153, 85,159, 52, 77, 99,231,206,157,122,119, 33, 0,112,185,220, 94,243,230,205, - 27,221,212,241,237,218,181,227,155,178, 57,119,108, 11,209, 31,143,216,207,236,218,181, 14,180,117, 14, 70,137, 54, 33, 40, 33, - 79, 58,107,238,216, 22,155, 55, 29,201, 83,137, 9,245,110,130,206,109,197, 21,169,246,152, 83,198,140,243,223,107, 74,188,167, -237, 41,144, 85, 46,153,249,209, 68, 39, 91,123,215,234,159,127,136,118, 32, 57, 36,123,234, 62, 85, 30,232,227,100,255,110,216, -119, 85,255,156,187, 44, 65,163,203,157,137,220, 83,105, 48,146,226,130,166,105,228,231,231, 67, 38,147, 33, 39, 39, 7,197,197, - 53,238,215,226,226, 98, 48, 12,243,103, 30,136, 80,230,228, 32,251,248,207,104, 61,121, 50,186,175, 90, 9,154,225, 66,169,160, -177,177,231, 64,148, 85, 40,161,102, 8,120,118,237,137,143,206,254, 14,146,165,129, 29, 91, 45, 61,137, 5, 22,252, 77, 97, 78, -122,135, 58, 66, 20, 29, 29, 29,249, 87,255,127,125,178, 21, 29, 29,157, 28, 29, 29,221,156,255,106,236, 50,212,111,215,197,104, - 93,171, 23,128,246, 90,167, 41, 47, 78,205, 72, 73,225,230, 87, 43,171,173,220, 92, 93,212, 86, 34, 33, 83, 81, 41,231, 36, 60, -126, 68, 85, 23, 60,127,218,140,243, 72, 77, 74, 74, 10,202,207,207, 71, 78,118, 54,116,202,106,144,106, 13, 88,149, 2,131,122, -247,132, 8,128,136, 36,192,103, 40,112, 57, 2,200,171, 42, 1, 32,213,100,231,168,213,190,166,108, 17, 4, 1,129,141, 13, 4, - 18, 9, 4,214, 54, 13, 20, 46,115, 20, 27,161, 80,184, 63, 54, 54,214,163, 69,139, 22, 88,185,114, 37, 90,182,108,233,239,233, -233,169,176,179,179, 19,187,185,185,161, 99,199,142,232,217,179, 39,206,157, 59, 7,152,145, 83, 74,171, 19, 37, 62,205, 66,175, -226,210,155,248,253,218,143,208, 40,213,232, 18,241, 35, 40,219, 62, 66,105, 0, 0, 32, 0, 73, 68, 65, 84,110,107,184, 4,126, - 13,230,217, 62, 40, 10, 78,214,168, 7,238, 35,240, 50, 39, 11, 4, 71,144,108,174,242, 84,247,249,209,163, 71, 56,112, 50, 30, - 30,222, 1,200, 73,127,130, 39, 87, 47,225,134,139, 19,188, 3, 58,234,221, 64, 6,203, 72,131,187,122,107, 77,154,168,165,159, - 77, 20,150,150,150, 10, 29, 29, 29,213,117,117,231,225,225,241,103,200,214,196, 5, 11, 22,160,156,199, 3,134, 15, 7, 63, 35, - 3, 20, 69, 33, 44, 44, 12,221,187,119, 7, 0,132,133,133,129,203,229, 34, 56, 56, 24,158,158,158,216,186,117,235, 68, 67, 68, -139, 36,240, 80,167, 43,241,247,241,241,209, 19,173, 61,123,101, 72,184, 63, 24, 4, 4,216,242,195, 51,253,177, 94, 94, 94, 40, -144,102,128, 32,216, 36, 19,101, 92,229,238,238,190,204,195,195,195,103,195,134, 13, 28,145, 72,132, 79, 62,249,164,109, 85, 85, - 85,235, 90, 41, 25,139, 22, 45, 2, 0, 44, 95,190, 28, 43, 86,172,128, 90,173, 86, 24, 50,182,103, 99, 39,207,162, 82,230, 67, -182,202,106, 84,127,231,214,157, 6, 12, 29,132,182,126, 3, 48, 96,104, 14, 0,172,117,228,102,189,247,237, 18,251,227,246, 54, -196,174,223,206, 95, 92,222, 59, 98,192,146,133, 85, 87, 87,127,179,179,220,100,204, 99, 69,246,110,249, 83,193,248, 77,223,111, -223,187,233,171, 69,115, 68, 57, 50, 77, 89, 94, 25, 91,101, 45,228, 90,251,186, 17,214,179,190, 92,245, 34, 63, 63, 99, 62,114, -207,155,156,105,201, 48, 12, 50, 50, 50,244, 49,125, 42,149, 10,213,213,213,200,205,205,213, 95, 51, 74,137,237,176,153,239,143, - 8,169, 86, 42, 21,119, 30,167,231, 44,157, 61, 41,188, 90,169, 84,164,103,230,164, 1, 91,154,100, 99, 36, 73, 62, 86,200, 21, -131, 20,229, 42,200, 30, 62, 69,203,129,222,208,234, 8,104,116, 52,100, 37,114,168,117, 0, 77,242, 16,248,222, 20,208, 4, 23, -197,249,121, 32, 57,156, 71,104, 24,180,111,129, 5, 22,252,125, 96,148,139,212, 41, 90,225,225,225, 7,235,171, 78,117,159, 1, -168, 97, 60,148, 71, 86,159, 76,213,185, 19, 13,253, 79, 35,187,230,226,181, 24, 45,147,233, 29,234,254,179,149, 93,165,231,186, -229,147, 90, 50, 58, 93,135,162,226, 66, 29,151, 43,228,181,178, 83, 74, 75,115,204,255,119,181, 90, 29,119,233,210,165,145,131, - 7, 15, 22,166, 63,126, 4, 77, 69, 5, 52, 21,229,224, 49, 58, 56,138,187,129,164,212, 32, 52, 26,180,240,103,160,146,139, 17, -127, 35, 73,171, 86,171,227,204, 37, 90, 36,135,211, 48, 46,203,218, 26, 66, 27, 91, 8,173,173, 27,187, 22, 77,145, 2,171, 33, - 67,134, 12, 12, 11, 11, 3,203,178,216,185,115, 39, 40,138, 18, 80, 20, 5,141, 70, 3,138,162, 80, 89, 89,137,189,123,247, 98, -219,182,109, 55, 0,252,106,178, 51,211,105, 46, 93,184,120, 37,244,131, 73,145,188,179,113, 27,161,211,208, 80, 18, 45, 81, 93, -173, 69,149,198, 10,180,211,100,160,240, 12, 56, 92, 17,194,131,219,226,228,145, 99, 20,116,234,203,102,178,240, 6,170, 80,110, - 78, 22, 94, 62, 79,131,117,101, 1, 92,108,173,160,200, 72, 67,151, 41, 83,223, 72,157,104,213,170, 21, 24,134, 65,255,254,253, -245,193,213,111, 74,182, 74, 74, 74,112,250,244,105,132,133,133, 33, 34, 34, 2,121,121,121,200,200,200,192,219,111,191,173, 63, -230,209,163, 71, 72, 72, 72,128,175,175,113,145,176,184, 84,123,246,101,238,195,113,239,190,251, 46,255,246,237,219, 96, 89, 22, -126,126,182,176,181,145,128, 32,133, 8, 8,112, 5, 80, 51, 6,232,215,175, 31, 42, 43, 51,116,101,101,236, 89, 19,167,187, 31, -192, 9,141, 70,243,172,111,223,190,158,207,159, 63,199,220,185,115,185,135, 14, 29,170,147,146, 17, 21,213,112, 50,133, 82,105, -216,117,223,161,147,255, 23,109,117, 14, 17, 34,113,235, 54,182,206,193,104,235, 55, 0, 0, 48, 56,242, 3,180,109,231,133,202, -226,196, 54, 42,101,214, 40, 62,183,204, 33,113, 75, 94,138,120,120,208,251,170,162,107,233,168,113,157,154,108,118,101,250,161, -194, 28,222,228,195, 39, 78,157,155,241,118,228, 59, 60, 45,173,211, 5,121,243,236, 99,143,159, 41,202,203,206,249, 14, 57,231, -147, 94,233,127, 70, 85, 60,186,178,178, 18, 18,137, 4, 73, 73, 73,234,225,195,135, 11, 73,146,196,179,103,207,244, 68,203,213, -217,177, 99,175,238, 65,254,171, 55,237,189, 32, 17, 10,133, 67,251,117, 11, 72, 73,207,126,201,178, 68,150, 65,181, 85,171,189, -248,248,225,163,254, 46,158,237, 56, 25,215,110,195,169,207,219, 80,171, 73, 40, 53, 12,212, 58, 64,199,225,195,163,115, 15,216, -251, 6,128, 5,112,239,246, 13,173, 90,171,189, 96,233,107, 44,176,224,111,173,106,177,198, 72, 82,237,231, 82, 0, 89,209,209, -209,197,245,212, 38, 25,128, 71, 0, 66,106,143,147, 53,250,157,140, 32,136,123, 44,203,118,175,103, 71, 86,143,112,213,255,172, -105,116,204,163,102,144,172,250,239, 13,137,150,161, 41,149, 0,224,236,236,236,218,165, 75, 55,223,159,126, 57, 12,150,101,241, - 52, 97, 61,202,138,158, 96,217,218, 91,190, 45, 90,180,136,200,203,203,139, 55,167, 4, 52, 77, 31,218,181,107,215,252, 30, 93, -187,116,105,211,178, 37, 30,101,101,130,207,210,224,211, 52, 72, 74, 13, 46,173, 65,203, 32, 26, 36, 97,141,252,252, 10,196,236, - 63,156, 84,155, 37,222, 40,252,223,126, 7, 43, 95, 86,128, 32, 8,108, 8, 15,130,192,198, 26,124,137, 53, 62, 61,117, 69, 79, -174,226, 86, 46,130,192,218, 26,190, 61,204, 74, 8,175,184,122,245,234,253,199,143, 31,119, 15, 10, 10,194,252,249,243,145,149, -149, 5,134, 97, 80, 88, 88,168,146, 74,165,121, 50,153, 44, 11,192,113, 0, 63,193,140,204,227,124,181,106,115,220,209, 61, 51, -195,123, 71, 56,191, 59,106, 27, 78, 28,153,135,242,138, 74, 40,116, 98, 84,171,116,168, 86,115,224,232,212, 9, 61,130,131,145, -159, 87,132,228,219, 23,170,184,106,197,250,230, 92,160, 4, 65, 32, 33, 33, 1, 62,158, 54, 72,251, 61, 30,206, 86, 60,132,120, -186,195,179, 87,111,125,126, 41, 99,224,113,160,155, 56,113,162, 62, 51,252,144, 33, 67, 50, 39, 79,158,236, 49,111,222, 60,252, -242,203, 47,184,113,227,198,107, 1,218, 17, 17, 17,184,126,253,250,215, 0,150,155, 18,245, 52, 26, 13,252,253,253,113,239,222, - 61, 92,186,116, 9, 3, 6, 12, 64, 68, 68, 4, 18, 19, 19,241,219,111,191, 33, 33, 33, 1, 4, 65,192,201,201, 9,218, 26,242, -172, 53,100,140,162, 16,251,205,183,187, 22,111,218,180, 45,112,210,164, 73, 56,122,244, 32, 62,120,191, 3, 8, 82, 8,130, 16, -226,157, 17, 29,176,114,213, 61,244,232,209, 15,206,206, 60,108,218,120,242,133, 82, 73,239, 53,163, 26, 87,255,246,219,111,158, - 42,149, 10,229,229,229,172,181,181, 53, 81, 82, 82, 51,163,181, 41, 69, 75,161, 80,136, 12, 25,122,252, 32,117,125,185,156, 45, - 99,171, 18, 70,149,234, 18, 58, 13, 24,154,139,193,145,239,227, 98,220,175,184,114,225, 18, 28,185, 89,153,144,200,207, 21,103, - 22, 87, 74,171,253,182, 7,116,157,206,121, 89,125, 97,251,172,119,210, 56, 30, 30, 76,236,162, 31, 43,203,141, 17, 45, 0, 68, -105,202,190, 83,199, 89,188,211, 51,188, 71,187, 32, 47, 15, 65, 89,113, 17,123,228,228,185, 36, 42,243,232,233,122, 4,139, 53, - 65,212, 87, 70, 69, 69,125, 85,251,121,247,210,165, 75,167,199,196,196,184, 20, 20, 20,232, 99,180,138,138, 75,175,244, 28, 62, -139, 46, 41,175,208,236,218,244,229, 88,177, 72, 40, 88, 26,179,235,154,150,131,219,134,236,234, 24,102,235,123,115,151,205, 73, -127,154,208,162,181, 88,128,147, 95, 46,199,163,223,174, 66, 75,242,241,207, 75,119,160,166,104,148, 23,151,224,242,135,159,193, -218,205, 1,219,174, 29, 45,100, 24,230, 71, 75, 87, 99,129, 5,127, 95, 24,226, 34, 4, 65, 52,149, 99,175,176,137,239,238, 25, -251,157, 1, 59,127, 5, 12,102,133, 55,107, 10, 94,113,113,113,209,245,235,119,112, 45,110, 53,226,227, 86, 35, 57,225, 17,242, -243, 52,200, 43, 84,193,214,214,246,150,145,159, 54,206, 28,203, 42, 20,138,209, 75,151,125, 85, 32, 18, 91,161,239,192,129,112, -119,113,133, 21,159, 7,142,142, 1,135,224,161, 74,102,143,180, 68, 5, 22,238,218, 87, 84,165, 80,140,110,162,147, 24,100,136, -100, 16, 4, 1,161,173, 13, 4,214, 54, 16,218,216, 54,112, 35,138,108,109, 33,178,177, 5, 87, 32,104, 42, 24,254, 53,155, 85, - 85, 85, 99,198,142, 29, 91, 86, 81, 81,129,233,211,167, 35, 62, 62, 62,225,194,133, 11,182,137,137,137, 98,153, 76,214, 14,192, - 16, 0, 59,140,144,172, 6, 54,203,202, 50,228,172, 78, 61, 62,250,171,207,149, 42,157, 19,198, 77, 61, 4, 9,153, 11, 29,205, -128, 5,224,233, 40, 64,175, 65,171, 80,164,233,137, 67,219,215, 40, 24, 74, 53,169, 81, 14,173, 6, 54, 89,150,101,221,220,220, - 94,171,131, 75,151, 46, 97,220,216, 49, 24, 58,106, 36, 92,218,248,192,117,208,219, 24, 58,253,159,216,190,125, 59, 72,146,132, -179,179,115,227,142, 87,111,115,207, 67,240, 14, 60, 6,113,224, 49,136,221, 9,224, 2,152,178,111,223,190,111, 66, 66, 66,174, -222,184,113, 99, 61,128,241,245,255,171, 30, 86, 52, 82,179,154,106,163, 37,115,230,204, 81,166,167,167, 67, 34,145, 64,167,211, -225,198,141, 27,216,182,109, 27, 54,108,216,128,132,132, 4, 56, 57, 57,193,215,215, 23,106,181, 26,247,238,221, 83, 2, 88, 98, -196, 38, 35,147,233,198,108,217, 18, 83, 18, 25,217, 7,187,118,253, 0,119,247,158,224,113,221,193,229,185, 64, 98,237,143,159, -127,250, 6,111,189,213, 5,167, 78, 30, 46, 45, 46,209,141, 1,160, 51,227, 90, 82,221,185,115, 7,219,183,111,199,216,177, 99, -243,198,141, 27, 71, 87, 84, 84,232, 21, 45,150,101,193,178, 44, 86,212,198,152,169,213,106,161, 33,155, 31, 45, 76,202,251,114, - 77,242,202,194,130,188,176,248,171,183, 38, 94,185,112, 9, 47,210,175,224,202,133, 75,248,253,202,205,168,194,130,188,176, 46, -161,237,249,163,167,207,252, 98,207,177,163, 28,107, 91, 15,236, 57,118,148, 51, 97,214,231,107,186, 13, 29,176,196,212, 53, 95, -219,142,108, 85, 81,225,162,181,235,191,175,210, 81, 42,114,221,119, 91,243,149, 50,233,146,122,215, 37,107,234,250, 84, 42,149, - 59, 84, 42,149,167, 74,165,242, 84,171,213, 75,178,178,178,250,206,159, 63, 95, 70,211,180, 94, 45,149,165,156,186,245,228,143, -221,107, 93,157, 29,196, 61,187, 7,118,216,184,227,200,181,156,220,194,127,213,203,161,213, 84, 57, 85, 85, 74,213,152,145,163, - 39, 87,151,151,169, 17,254,121, 20, 24,145, 53,212, 52,160,101, 57,208, 17, 92, 60, 94,189, 17, 98, 71, 27,236,207,124,160,168, -208, 82, 99,208, 48,135,150,177,115,255, 51,176,216,180,216,180,216,252,239,180,249,127, 25, 30,104,184,214,161, 71, 3, 69,203, -212,148,202, 22, 45, 90,244,125,247,157, 65,232, 23,185, 20, 44,203,226,201,131,111, 81, 38,123,138, 22,238, 66,100,228, 84,134, - 3,136,111, 70, 97,114,178,114,115,195,230, 44, 89,122,108,220,144,129, 1, 65,109,218, 8, 91,183,246,134,196,213, 21,197,197, - 50,252,113, 59, 69,187,230, 64,108, 82, 45,201, 50,203, 49,201, 48, 76, 77,144, 59,128,129,115, 22,130,224,112,128,218, 52, 14, -117, 29, 99,155,238, 61, 65,112,185,160, 89, 6,106,181,218,156,217,114, 47,159, 63,127, 62,102,210,164, 73,151,227,226,226,200, -161, 67,135,118, 62,126,252,248,159, 89, 51, 15,213, 69,233, 87, 1, 68,174, 89, 52,227, 80,216,128,145,182,126,129,221,248,221, - 90,115, 64,105, 9,228,231,101, 35,238,216, 93, 42,229,206,133, 74, 86,167, 26,175, 40, 78,191,106,204, 22, 69, 81, 57,237,218, -181,115,219,190,125,187, 62, 24,158,166,105, 20, 23, 23,227,214,173, 91,232,212,189, 7, 2,222,255, 16, 50,153, 12, 91,182,108, -129,151,151, 23, 70,140, 24,129,210,210, 82,232,116, 58,115, 29,190, 52,128, 11,181, 47, 52, 34, 89, 68,237, 18, 64, 70,221,134, - 62, 62, 62, 2,149, 74,213,153,101, 89, 14, 65, 16,155, 53, 26,205,180, 69,139, 22,121,172, 93,187, 22, 29, 58,116, 64,113,113, - 49, 36, 18, 9,252,252,252, 32,147,201,112,247,238, 93, 90,161, 80,108, 71,205, 66,214, 50, 19,229,123,118,247,110,102,216,236, -217,159, 30,251, 38,102,134,159, 74,221, 79,224,232,216, 27, 44,171,131, 76,150, 5,121,229, 13,106,213,202, 95,159, 23, 22,105, - 71, 3, 72, 55,243,156,151,207,156, 57, 19, 0, 68, 0,150,102,100,100, 60, 12, 8, 8,240, 51,164,104,153,131, 77, 71,242, 84, - 0, 14,140, 25,234, 57,183,178, 56,209,207,145,155,149, 25, 22,196,108,217,116, 36, 79,101,235, 89,189,186, 56, 43, 62, 77, 90, -125, 97,251,158, 99, 71, 57, 83, 71,141,161, 91, 90,167, 71,137, 92,217, 35,102,152,102, 67, 66, 66, 90, 17, 68,105,219,162,146, -167,247, 63,152, 62,227, 61, 59,190,242,108, 72,203, 18, 95,210,171,139, 40, 33, 33, 33, 19,205,156, 25, 90,139,180,188,188,188, -190,139, 22, 45,186,192,178,108,131,216,132,162,226,210, 43,225,145, 51,217,242,242,138,135,178,212, 83,230,228, 82,187,123,247, - 65,194,192,160, 78, 93,142,126,179, 54,198,173,223,156,249,220,180,171,215, 0, 90,139,236,248,107,160,133, 26,102,227,205,139, -133, 21, 20, 53, 10,150,172,240, 22, 88,240,183, 87,179,140,113,145,255,114, 12,135,129, 96,120,179, 79,198,167,109,139, 11, 29, -252, 90, 15,241,106,233, 2, 0,200,200,204, 71, 70,102,222,111, 25, 47,242,134,154, 96,188,134,166, 87,234, 23,149, 38,106, 83, - 56,176,230, 45, 42,221,192,166,147,147,211,125, 46,151,219,178, 57,181, 65,211,116,126,113,113,113, 23, 51,203, 57,161, 77,155, - 54, 49,217,217,217,199, 24,134,153,219, 76,182,223,164,205,186, 69,165, 73,174, 96, 16,171,211,116, 2, 0,130, 43, 48,103, 81, -233,250, 54, 59, 89, 91, 91,239,224,241,120, 94,117,237, 88, 23,131, 69,211, 52,135,162, 40, 17, 77,211, 28, 0, 4, 73,146, 58, - 30,143,167, 34, 8, 66,167,211,233,114,212,106,245, 12,188, 74, 56,106,236,220, 77,118,244,181, 68, 11, 77, 40, 90,151, 0, 32, - 61, 61,189,189,131,131,195,120,130, 32,198,178, 44,235, 47,151,203,213,203,150, 45, 75,136,141,141,173,108,211,166,205,176,225, -195,135, 19,137,137,137, 72, 74, 74, 98, 75, 74, 74,142,212,170, 88, 25,205,188,150, 72,161,144,243, 15, 71, 71,114, 56,203, 34, - 4, 44, 8,130,196,227,138, 10,230,172, 66, 65,255,171,150, 48, 54,247,250,172,195,196,214,173, 91,255,154,153,153,201, 51,164, -164, 26, 58,247,198,248,118, 73,224,210,240, 62,125,198,220,250,253,247,227, 95,174, 73, 94, 89,127,223,172,145, 14, 31, 76,248, -108,206,183, 7,182,126,247,229,247, 39,202,118,153, 83,206,206,157, 59,251, 16, 4, 49, 30, 64, 16,203,178,237, 88,150, 16, 17, - 4, 91, 70, 16, 68, 50,128, 68,141, 70, 19,151,146,146,242,242, 79,156,251,155,140,112, 13,217,212, 47, 42, 13,154, 14,166, 1, -214,204, 69,165,255,127,151,211, 98,211, 98,211, 98,243, 63,103,243,255, 50, 62,110,226, 59,243, 50,195,215, 33,227, 69,222,208, -140, 23,121,104,215,174, 29,251,236,217,179,102,145, 52, 67,157, 52, 77,211, 7, 21, 10,197,193, 63, 99,164,164,164,164,219,191, -185,242, 14,100,102,102, 30,248, 43, 13,214, 18,169,149,181,175, 55,197,227,170,170,170, 30,230, 30, 76, 81,212,191,163,110,136, - 90, 53,235,107, 67, 7, 12, 25, 50, 36,155,162,168, 75, 0,114, 9,130,176, 7, 80, 74, 81,212, 5,157, 78, 87,248,236,217,179, -110, 27, 55,110,172,203,124,191, 10,192,253, 55, 44, 7,163, 86,211,251,243,243,233,253,255,134,115,220,175,209,104,230, 57, 57, - 57,249,170, 84, 42,129, 74,165,226,215,159,124, 32, 22,139,101,198, 2,226,235,195,222,134,216,205,231,150, 57,217,219, 16,141, -137, 20, 28, 91,224,168,178, 58,169,131, 99, 11, 28, 53,183, 96, 15, 31, 62,204, 8, 9, 9,217, 71,146,100, 27,150,101,221, 0, -214,142,101, 33, 99, 89,182,152,251,255,216,187,238,184, 40,174,182,123,102,102,103,251, 46,176, 75, 93,138, 5, 20, 68, 64, 1, - 11,246,136,154, 24,123,137, 88,162, 98, 47, 49,106, 98,212,168, 81,163,177,198,215,196,158,216,123,111, 81,176,247, 94,177, 43, - 86,164, 55,169, 11,203,246,157,249,254,128, 37,168,148, 5, 77,222,228,253,246,252,126,227, 58,195,238,217,123,103,231,222,123, -238,115,159,251, 60, 28, 78,210,227,199,143,147,254, 65,157,144,198,200, 48,139,141, 58,221,159,126,135,214,221,133, 86, 88, 97, -197,255, 14,202,244,209,226, 84,150,233,197,139, 23,132,245,126, 90, 81, 82,108,149,247,199,184,184, 56, 45,128,171, 69,199,187, -184, 13,160,203, 63,189,130, 41, 41, 41,193,101,253,205, 82,145, 5, 20,250,108, 1, 15, 75,141,206, 62,107, 69,118, 30, 86, 28, -152, 84,217,178,221,187,119, 47, 30, 22, 46,177, 91, 97,133, 21, 86, 88,241,151,225,195, 45, 90, 86, 88, 97,133, 21, 86, 88, 97, -133, 21, 86,148,138,181, 37, 4,215, 91,214, 45, 2,101,239, 28,168,204,218,107, 85,118, 31,156,182,114, 90, 57,173,156, 86, 78, - 43,167,149,211,202,249,255,142,243,127, 21,239,137,172,191, 3,214,173,175, 86, 78, 43,167,149,211,202,105,229,180,114, 90, 57, -255, 63,136,172,119, 15, 0,214,165, 67, 43,172,176,226,255, 49,246,238,221,107, 81, 82,209,190,147,215,119,150, 72,100, 51,242, -149,185, 11,119, 45, 30,114,208,124, 61, 44, 44,204,100,189,139, 86, 88, 97, 5,170,226, 12,239,233,233,238, 71,154,152,230, 44, - 75, 82, 44,201, 26, 8,165,122,247,171,236,236,183,194, 14,120,120,120,216,209, 36,186, 16, 44, 43, 38, 8,198,196, 80,228,149, -152,152,196,199,149, 40, 24, 79, 38,147,125,205,229,114,219,233,116, 58,119,146, 36, 19,181, 90,237,233,130,130,130,149,120, 63, -112,225,127, 13, 62, 62, 62,253,206,159, 63,111,215,162, 69, 11,173, 80, 40, 52,170,213,106,206,241,227,199,249, 29, 58,116,200, -121,249,242,101,149,118, 36,186,186,186,182, 89,191,126,189,103,251,246,237, 81,187,118,109, 85,159, 62,125,184, 77,155, 54,229, - 14, 27, 54, 44, 38, 57, 57,249,108, 37,233,252, 8,130,216, 74, 16, 4,197, 48,204, 64,252, 25,186,225, 99,131, 36, 73,114, 36, - 65, 16, 61, 88,150,245, 34, 8,226, 21,203,178, 7, 25,134, 41, 47,112,107,121,248, 2, 64, 71,146, 36,131, 1,128, 97,152, 59, - 0,142, 2,150,239,188,251, 59, 57, 69, 34, 81, 16, 0, 20, 20, 20,220,253, 88,156, 4, 65, 4, 1, 0,203,178, 85,229, 28, 44, - 20, 10,135, 3,128, 90,173, 94, 7, 11,210, 65,189, 11,118,181, 47, 27, 60, 59, 26, 0,112,231, 71, 95, 0, 64,101,206,137, 81, -209, 68,101,190,171, 52,190,202,112,148,130,142,253,251,247,159,191,125,251,246, 31, 1, 28,250, 43, 30,124, 23, 23,143,149,191, - 44, 91,235,250,205,215, 67, 23,162, 48, 35, 68,249, 13, 18,248,148, 71, 81, 93,117, 38,211,165,199,192, 94, 0, 28,185, 92,222, -143,199,227,181,210,233,116, 10, 14,135,147,162,211,233, 46,230,230,230,238, 68, 57, 25, 16, 44,190,175, 79, 32,211, 23,192,133, - 96,254,204,243,198,146,208,114, 69, 72, 37,234, 34,251, 31,208,141,146, 0,198, 23,213,117, 3,202, 14,231, 81, 94,231,243,141, -171,171,107, 15,165, 82, 89, 64, 81, 20,139,194, 93,207,133,255, 20,254,157, 96, 24, 38, 61, 43, 43,107, 96, 69, 92,226,106,168, -195, 19, 19, 91, 77, 6,168,141, 90,118,180, 42, 1,209, 18, 15, 52, 99,129,129, 44, 80,147,164, 72, 71,134, 97, 82, 0,156, 37, -141,136,200, 79,198,139,127,232,224, 94,189,232,190,214, 40, 58,167, 1, 56, 3,184, 15,224, 27, 0,249, 86,253,243,183,225, 93, -103,248, 35, 0, 82,138,133, 86,137,112,247,173, 59,119,238,124,193,211,211,221,175, 87,247,158,243, 71,141, 28, 77, 80, 20,137, -135,143, 30,113,190, 28, 56,248, 51,153, 76,230, 38,209,106,235,130, 32,152, 2,129,224,161, 82,153,155,180,119,231,118,169,111, -157, 58, 38,147,137,193,234, 53,191,119,216,247,199,129,105, 22,138, 45, 31, 23, 23,151,173, 83,166, 76,113,233,218,181, 43,229, -226,226,130,216,216, 88,187, 93,187,118,213, 89,177, 98, 69,239,236,236,236,129, 0,158, 85,161,178, 45, 93,228,228,103, 82, 33, -209, 22,121, 38,228, 25,112, 38, 85,141,147, 0, 46, 85,245,238, 21, 20, 20,140, 45, 40, 40, 8,105,212,168, 17,187, 97,195, 6, - 98,208,160, 65, 44, 65, 16,132, 90,173,222, 12,160, 74, 66, 75, 44, 22,175,106,223,190,189,183,183,183,247,171,151, 47, 95,118, -220,179,103,207,209,240,240,112, 47,177, 88,252, 28,128, 79, 37,233, 54,101,102,102, 6,170,213,106,184,187,187,111, 0,208,224, - 47,120,136, 8,138,162, 14,186,185,185,177,139, 22, 45, 58, 20, 24, 24,232,156,149,149,101,156, 52,105, 82,187,235,215,175,119, - 48,153, 76, 93, 43, 33,182,100, 4, 65,172,113,118,118,118, 88,184,112,225,139,134, 13, 27,222,231,243,249,188,231,207,159,139, - 38, 76,152,240,237,179,103,207,122,179, 44, 59, 18,168,212, 0, 33, 35, 8, 98,141,171,171,171,195,252,249,243, 99,131,131,131, - 31,114,185, 92,238,243,231,207,197,223,127,255,253, 55,209,209,209, 85,226, 36, 73,114,117, 72, 72,136,236,199, 31,127,124, 82, -167, 78,157,171, 20, 69,241, 18, 19, 19,201, 89,179,102,125,125,234,212,169, 48,134, 97, 70, 85,165,156, 78, 78, 78,178, 89,179, -102, 61,105,218,180,233,117, 46,151,203,125,250,244, 41, 57,101,202,148,175, 95,188,120, 97,113, 57,229,114,121, 40, 65, 16,107, - 83, 83, 83, 57, 0,160, 80, 40, 26,219,216,216,172, 40,153,211,210, 28,138,194, 96, 48,228,105, 52,154,254, 89, 89, 89,165, 6, -194, 29, 52,117,121, 23, 0, 88,161, 55,159, 23,190, 86,116, 14,172,142,176,164,210, 65, 46,133,113,241,126, 81, 13,233, 14, 0, -253,138, 82,133,255,162, 2, 56, 28, 14, 19,228,242, 13,123, 55,181, 82, 33, 99,186,181,105,211,102,214,217,179,103,127,111,221, -186,245,247,219,182,109,115, 74, 72, 72,248,249,210,165, 75, 30,125,251,246, 29,116,230,204,153, 5, 25, 25, 25,251, 62,214,195, -207,227,242,249, 4, 73, 64, 40, 16,217, 88,242,126,154, 36, 59, 95,237,214,109,248,186,167, 79,131, 87, 68, 71,123,170, 20,138, -144,113,227,198, 57,247,236,217,147,244,240,240,192,139, 23, 47,236,183,109,219, 86,119,221,186,117, 61,114,114,114,198, 3,136, -251, 16,145,165,202, 65, 61,173, 14,193, 44, 11,187,226, 6, 75, 32,135,175,199, 29,246, 9, 30,252, 3,196,214,204, 77,155, 54, -253,248,226,197, 11, 44, 88,176, 0, 0, 86, 86,242,243, 19,186,117,235,214,233,192,129, 3,194,189,123,247, 10, 27, 53,106, 4, - 23, 23, 23, 20, 77,166,138, 3, 83,123,122,122, 90,118,207, 24,252,178,244,232,144, 6, 15,179,142, 97, 85,207,212, 5, 66,119, - 24,155,117,243,238,209,121, 80, 48,108, 29, 69, 16, 72, 56,200,201, 84, 6, 60,189,147,208,254,220,158, 23, 63,191,136,122,179, - 80, 21,143,153, 40, 59, 38,223,127, 5,246,246,246, 27, 98, 98, 98, 66,197, 98,241, 91,215, 95,189,122, 21,228,237,237,157, 11, -224,187,202, 10, 55, 71, 71,199, 29, 12,195,104, 51, 51, 51,135, 2,128, 84, 42,221, 46, 22,139,101, 41, 41, 41,211,254,170,137, -140, 25,239,106,145,127,185, 69,171,216, 95,171,180, 92,135, 4,105, 98,154,143, 26, 57,154,232,211,175,111,234,139, 87, 49, 12, -135,230,245, 59,126,226,132,200,207,207,143,212,174, 92, 9,227,155, 55, 48,124,251,109,179,211,167, 79, 27,194,250, 13, 80,211, - 20,177,201,203,179,166,104,247,206, 93, 46, 7,246,239,107, 14,160, 34,161,197,115,113,113,217,122,254,252,121, 55, 79, 79, 79, -228,228,228, 32, 54, 54, 22, 42,149, 10,189,123,247,166,155, 55,111,238,214,171, 87,175,173,185,185,185, 45, 42, 97,217,114,174, -237,206,137, 28, 57,184,167, 79,135,207,154,139,221, 60,106,129, 77,213, 32,225,101,116,163,200,243,215,199,109,218,127,244,217, -139, 92,182, 51, 74,207,141, 84, 46, 50, 50, 50, 38,247,232,209, 99,127,104,104,168, 35,159,207,135,171,171, 43,209,181,107,215, -244,228,228,228,217, 85, 86, 45, 69, 41,108, 72,146, 52,149,124, 45, 37, 61,144, 37,112,151,201,100,144,201,100, 0,224,246,161, - 51, 79, 59, 59,187,149, 82,169,180,151, 82,169, 84,147, 36,201, 18, 4,193,234,116, 58,161, 76, 38,187,247, 36,250,153,171, 86, -171,173,189,120,233,186,101,109, 90, 6,218,156, 58,117, 10, 61,123,246,100, 79,158, 60, 57,210,210, 60,117, 4, 65,172,233,209, -163, 71,193,140, 25, 51, 52, 47, 94,197,186, 61,121,246,138, 16, 11,120,140,131,131, 3,125,243,230, 77,206,146, 37, 75, 4,179, -102,205, 90,195,178,108,175, 74,220,207, 53,125,251,246,213, 79,156, 56, 49,229,233,139, 24,167, 7, 79, 94,176, 18, 1,109,116, -112,176,167,174, 95,191,206, 84,133,147, 36,201,213,147, 39, 79, 86,142, 28, 57, 50, 59, 51, 43,215, 37, 91,153,207,242,105,202, -224,226,226,194, 57,116,232,144,118,199,142, 29,228,240,225,195, 87, 51, 12, 19, 86,137,251,187,186,107,215,174,121, 83,166, 76, -201,121,254,234,181,203,131,199,207, 32,226,211, 6,103,103, 39,234,214,173, 91,250,197,139, 23,147,115,231,206,181,168,156, 98, -177,120,203,158, 61,123, 56,135, 14, 21,246,125,215,174, 93, 35,189,188,188, 68, 37,223,163,214,104, 65, 18, 64, 70, 70,134,168, -105,211,166, 91, 0,188, 23,220, 55,120,118, 52, 6, 77, 5,198,142, 29,155, 82,217,135, 37, 88, 49,174,194,247,152,126,247,101, -151, 20, 12,233,206,225,112,152,225,195,135,167,190,251,119,141, 70, 67, 0,232,138,159, 45, 23, 91, 29, 59,118,252,225,200,145, - 35,181,182,109,219,246,235,142, 29, 59,116, 0, 32, 16, 8, 28,118,237,218,181,160,119,239,222,232,221,187,247,140,125,251,246, -125, 52,161,101, 98, 77,122, 0,224, 11,248,252,232,232,104,194,215,215,183,220,136,251,122,134,185,189,238,233,211,134, 95,249, -250, 54,202, 98,152,218,220, 14, 29,242, 39, 76,152,144,161, 84, 42, 17, 27, 27, 11,189, 94,143, 65,131, 6, 81,173, 91,183,118, -237,221,187,247,242,188,188,188, 47, 0,232, 45,120, 38, 23,187,185,185,141,200,205,205,205, 55, 91,117, 90, 12, 52,113, 90, 5, - 25,249,245,107, 27,120, 92,202,200,237,242, 45, 67,156, 92, 73,168,124, 61,113, 25, 0,184, 5,120, 83,201,201, 64,169,176,113, -135,167,137,198, 92, 71,119, 97,155, 55,113,234,159, 84,241,229,138,165, 47,196, 98,113,119,149, 74,181,175,104,112,246,233,220, -185, 51,174, 95,191, 14, 0,205,139,132, 86, 27,146, 36,191,100, 24,102, 61,128,242, 82,185,141,235,214,173,219,167, 7, 14, 28, -144, 2,192,190,125,251, 96, 48, 24,224,229,229, 5, 46,151, 11, 30,143, 7,154,166,139,179,131, 88, 8,133,163,163, 3, 28,108, -105,200,228,226, 14,223,255,214,141, 83,205,207, 6,233,166, 71,200, 98,115, 96,100,181,224,218,139, 81,167,189, 29,130, 63,107, - 67, 70,172,126, 56, 45, 98,213,147,134, 5, 36,186, 32, 14,218,127,202,200, 78,146, 36,255,254,253,251,112,117,117,125,235, 58, - 69, 81, 0,208,170, 10,148, 51, 94,189,122,213, 52, 42, 42, 10,161,161,161, 51,234,213,171,247,249,133, 11, 23, 92, 50, 51, 51, - 17, 26, 26,186, 60, 49, 49,241,208, 95, 93,167,146, 90,228,127,197,212, 69,190,163, 36, 91, 23,206,130, 73,138,162, 72,196,188, -138, 53,132,134,182, 13,143,143,143,151,132,132,132,144, 52, 77, 67,117,246, 44, 52,183,110, 65, 34,145,160, 71,143, 30,244,197, -139, 23,109,108, 36, 54,195, 94,199,188,206,163, 40, 18, 44, 75, 86,232,243, 32,147,201,190,158, 54,109,154,139,183,183, 55,140, - 70, 99,113, 68,115,163,209,136,132,132, 4, 72, 36, 18, 12, 28, 56,208, 73, 36, 18,125,109, 97, 61,106,248,120, 57,221, 57,127, -116, 77,131, 9,163, 58,138,125, 68,167, 32, 78, 24, 15,201,190,175, 80, 55,249, 56,166,116, 15, 17,159, 92, 53, 35,184,150,171, -252, 78, 9, 19,171,197,208,106,181,151, 31, 62,124, 56,236,194,133, 11, 12, 0,156, 59,119,142,125,242,228,201,200, 15,153,133, - 50, 12,131,156,156, 28, 48, 12, 67, 21,157,155, 95,255,171,207,131,141,141,205,234,207, 63,255,188,111, 92, 92,156,240,216,177, - 99,246,241,241,241, 14,175, 95,191,118,244,241,241,225, 44, 88,176,224,136, 70,171,167, 12, 38, 86,103, 52, 25,242, 82, 30, 61, -122,149,157,150,118,103,227,198,141,106,130, 32,122, 88,248, 29, 95, 40, 20, 10,251,169, 83,167,130,160, 69,141,235,212,173,231, - 77,209, 66, 91,146,230,217,170,213, 26, 83, 76, 76, 76,194,212,169, 83,107, 6, 6, 6,186,162,112,121,205, 34, 78, 87, 87, 87, -135,137, 19, 39,130,195,151, 6,213, 15, 12,174,197,227,139,165, 20, 45,148,134,132,132,180,126,245,234, 85,242,148, 41, 83, 20, -141, 26, 53,170, 20,103,163, 70,141,100,195,135, 15, 55, 10,132,210,166,158,158, 94,117,235,251,215,237,228,227,227,211,157,195, -225, 24,223,188,121, 19, 55,112,224, 64, 69,151, 46, 93,156, 43,195,233,228,228, 36,155, 50,101,138,209,163,186, 87,251,246,159, -126,214,132, 43,148,218,114,120, 98,187,130, 2,141,233,233,211,167,113,211,167, 79, 87, 4, 5, 5, 57, 89,194, 89, 80, 80, 64, - 59, 56, 56, 32, 32, 32, 0,126, 94, 94,200,205,205,197,129, 3, 7,176,105,211, 38,172, 95,191, 30, 59,119,238, 68,195, 22,159, - 65, 42,149, 34, 57, 57, 25, 74,165,146,254,187, 31, 40,211,239,190,236, 10,221,136,174,163, 71,143, 78, 30, 62,124,120,170, 80, - 40,100,222, 61,228,114,185,169,127,255,254,105, 3,191, 95,218,213,188,180, 88,129, 37,235,254,209,163, 71, 95,110,219,182, 13, -126,126,126,104,223,190, 61, 15, 0,190,254,250,107, 94,239,222,189,177,103,207, 30,236,219,183,239,177,183,183,247, 21, 0,221, - 44, 41,231,192,129, 3, 91,132,133,133, 93, 10, 11, 11,187,219,167, 79,159,181, 35, 71,142,124,107,228, 74, 73, 78,188,173,211, -233, 16, 24,220, 72, 52,103,195,141,254, 21,241, 61, 1,182,173,141,142,222,180,240,209,163,184, 25,126,126,118,213, 95,191,150, -111, 94,188,216,193,156,164,219, 96, 48, 32, 33, 33, 1, 50,153, 12,253,251,247,119,224,243,249, 3, 45, 40,230,146,110,221,186, - 13,142,143,143,151,172, 91,183, 78,113,247,238, 93,215,148,148, 20,197,153,211, 39, 28, 39,125,247,181,212, 86,194,227, 37,191, - 97, 9, 0,120,157, 12,113,116, 12, 90,176, 44,236, 74, 46, 39, 86, 9, 10, 8,133,238, 88, 81,171,133,221,179,137,123,130,250, - 76,137, 12,118,144, 41,248, 83,203,249, 68,253, 69,139, 22,237,141,136,136,232,215,162, 69,139,253, 0,132,165,188, 71,208,176, - 97,195, 3,123,246,236, 25,220,178,101,203,203, 0, 2,202,156, 69,186,187,247,248,227,143, 63,236,205,231, 14, 14, 14, 16, 8, - 4,239,137, 44, 46,151, 11,146, 36, 43, 93,189,121,187,250,113,228,117,181,120,152,125, 20,123, 22,221,199,162, 14, 79,153,249, -205, 94,107, 87, 14,140,198,201, 61,247,145,142,251,232,248, 85, 45,244,155, 30,216, 78,100,194,220,127,210, 0,254,230,205,155, - 47, 91,181,106,181,183, 99,199,142,218,168,168, 40,188,121,243, 6,110,110,197,115,237,212, 42, 80,202, 69, 34, 17, 60, 60, 60, -224,237,237,221,239,226,197,139, 46, 6,131, 1,175, 95,191, 70,122,122,250,157,191,163, 78, 37,181,200,191, 12,239, 58,194, 31, -121, 79,104, 21,229, 22, 58, 15, 0, 44, 65,168,238, 63,124, 72, 83, 60,222,128,237, 59,118,240,185, 92, 46,226,226,226,240,248, -241, 99, 20,156, 57, 3,245,213,171, 72, 75, 75, 67,126,126, 62,156,157,157,177,102,195, 6,177,206,196, 14,121,250,236, 25,197, -146,108, 73,127,131, 82,183,120,242,249,252,118, 61,123,246, 44, 83,144, 37, 39, 39,163, 99,199,142, 52, 69, 81,165,237,106,120, -151,147,112,117, 36, 34,206,236,159,163, 80,240, 30, 3, 47, 38, 0,121,119, 0, 86, 11, 24,117, 64,210, 3,224,200,108, 84,207, -143, 38, 78,204, 9,119,113, 19,113, 34, 74, 81,202, 21,109, 69,245,242,245,245, 93, 63, 96,192, 0, 18, 0,218,180,105, 67,248, -250,250,174, 5,224, 85,206,103, 78, 87, 48, 72, 94,207,206,206, 70,239,222,189,237,107,213,170,117,186,119,239,222,246,230,235, - 85,229, 52, 91,147,253,252,252, 50, 5, 2,193, 78,192,162, 14,182,152,211,206,206,110,101,199,142, 29,123,237,216,177,131, 11, - 0,231,207,159, 71, 68, 68, 4, 30, 61,122,132,231,207,159, 51,193,193,193,142, 75,215,239, 93,189,242,247, 45, 75,186, 55, 15, -116,109,221, 56,184,174, 36, 63, 59,223,217,217,185, 57,203,178, 94, 22,150,179,227,236,217,179, 31, 63,121, 25,103, 75,114,104, - 14,151,230,240,109,108,196,206, 50,169,216, 93, 46, 18,184,241, 73, 66, 82, 80, 80,144,186,115,231, 78, 6, 64, 71, 75, 57,231, -204,153, 19,243,228, 69,156, 29, 65,114, 56, 52,135,230, 74, 36, 34,187, 14,237, 67, 27, 1, 0, 23, 44, 87,169, 84,166,109,218, -180, 73, 95, 25,206, 31,127,252,241, 97, 86, 78,190,140, 67,211, 52,135, 67, 21,223, 75,177, 80,232, 40,226,243,121, 90,173, 54, -105,217,178,101,234,202,112,206,158, 61,251,241,211,151,241,114,146, 32, 40,130, 32, 57, 54, 82,177,189,189,173,200,209, 81, 34, -116, 16,113, 40,158, 82,169, 76,218,186,117,171, 69,156,122,189,158,155,150,150,134, 39, 79,158,192,163, 81, 35,156, 58,117, 10, -213,170, 85, 67,239,222,189,209,183,111, 95, 8,133, 66,180,105, 90, 15, 83,167, 78,197,203,151, 47,161,215,235,249,165,113,154, -253,164,222,133,171,171,107, 84, 69, 15,207, 59,159,125,171,156, 65, 46, 96, 87,232, 70,116, 45, 41,176,202,226,151,203,229,166, -210,172, 93,239,114,118,236,216,241,135, 51,103,206,212,218,186,117,107,215,129, 3, 7, 94,222,186,117, 43,154, 52,105,130, 39, - 79,158,160,102,205,154,216,188,121, 51,250,246,237,123,121,249,242,229, 93,163,162,162, 2, 61, 61, 61,167, 85,196,217,167, 79, -159, 49, 65, 65, 65,103, 83, 83, 83,155,102,101,101, 5, 28, 56,112, 96, 72,143, 30, 61, 98,250,245,235,215,182, 88, 48, 26, 12, - 59,142, 28,222,143, 78, 93,123,162,142,127,192,234, 65,211,182,213,171,160,109,178,143,128,181,155, 82, 82,222,236,208,104, 10, -122,211,180, 72,116,227,134,124,223,239,191, 59,148,204, 44,144,148,148,132, 46, 93,186,208, 92, 46,183,101, 5,229, 92,212,189, -123,247,222, 7, 14, 28,144,153,173, 58, 87,175, 94,197,131, 7, 15, 16, 27, 27,139,156,156, 28,180, 29,153,143,209, 11, 10,185, - 71, 47, 96,241,217,215,172,184,138,125, 72, 49,132,213,224, 98,111,195,185, 50,100, 89,157,175, 71,172,246,227, 72,228, 52,182, -127,255, 28, 25,175,181,251,202,224, 36,154, 54,109,186, 45, 44, 44,140,208,233,116,208,233,116, 58, 0,165, 70,245,117,115,115, - 19,212,175, 95, 31, 35, 71,142, 36,109,108,108,150,151, 85, 78,149, 74,165, 61,122,244, 40, 6, 14, 28,136,241,227,199,163,118, -237,218,144,201,100,160,105, 26, 91,182,237,118,232, 59,100,148, 79,131, 22,173, 2,253, 26, 52,169,159,167,165, 26,209, 66,217, -240, 50,172, 33,165,214, 61,223, 41, 10, 15, 95, 95,195,138,174,137,204,205,205, 5,249,147,190,252, 79,244,211, 11,105,143,166, -133,173,125,200, 94,107,150,177,237,155,120,164, 25,158,160,101,239,234,240, 12,146,125, 43,246,128,111, 85,239,167,133,168, 20, -103,189,122,245, 90,220,188,121,147,223,170, 85, 43,196,197,197,129,166,139,231, 83,166, 15, 41,231,236,217,179,249, 26,141, 6, -247,238,221, 67,120,120,120,146, 94,175,255,246, 67,202, 89, 25,139,150, 89,139,252,203,176,246,157, 35,165, 44,139,214,108, 0, - 48, 48,136, 24, 16, 62,164, 32, 50, 50, 82,196,227,241, 16, 23, 23,135,148,148, 20,108,217,180,201,212,198,201, 41,175,189,155, -155,114,203,166, 77,172, 78,167, 3,203,178,240,245,245, 69,175, 94,189,132, 95,244,238,151, 78, 40,213,187, 45, 88,230, 81,152, -215,215,135, 12, 25,242,222,223, 39, 77,154, 4, 27, 27, 27, 16, 4,225, 98, 65,229,194,198,205,238,238, 46,243,180, 75, 99, 83, -183,100,129, 18, 0, 28, 41,192,177, 1, 4,182, 0, 95, 10,240, 68,208, 70,157,205, 34,217,246,177, 61, 91, 14,117, 3, 80,153, -165, 30,184,186,186,206, 56,123,246,172, 99, 84, 84, 20,171, 84, 42,145,146,146,194,206,159, 63,223,209,213,213,117, 70, 85,127, -145,228,228,228, 57,157, 58,117, 74, 11, 15, 15,183, 61,126,252,184, 71,120,120,184,109,167, 78,157,210,146, 7,149,255,129, 0, - 0, 32, 0, 73, 68, 65, 84,147,147,231,124,200, 47,205,229,114,169, 71,143, 30,201,231,206,157,219, 23,192,109,127,127,255, 76, - 55, 55,183,219, 40,116,154, 44, 23, 82,169,180, 88,100,153,173,107, 28, 14, 7, 52, 77,195,213,213, 85,151,149,149,101,106,217, -192, 75,232,107, 75, 26, 92,249, 92,161, 92, 40,112,151,218,216,134,100,102,102,222, 39, 8,226,149,133, 75,124, 65,141, 27, 55, -166, 77, 44,205,140, 30,208,198,245,235,193,161, 78,191,205, 29, 94,109,217,156, 17,110,139,102, 13,243,157, 51,185,127, 40,201, - 48,154,154, 53,107,186,152, 29,218, 45, 48,159, 7, 55,108,216,144,195,128,198,147,103,177,105,113,137, 73,121,159,182,110, 90, -108,185,244, 11, 10,110,239,232,232,216,202,215,215,183, 33, 65, 16, 22,109, 73, 22, 10,133, 65,117,234,212,225,144, 20, 77,216, -203,164, 30, 82,137,208,185,120, 9,197,206,174,153,220,209, 49,140,100,217, 92,133, 66,225, 36, 20, 10,131, 42, 81,119, 14, 3, - 46,156,157,228,182,142, 14,118,146,246,161,205,107, 55,109,214,212,167, 94, 72,147,166,254, 13, 26,126, 65, 24,141, 74, 47, 47, - 47, 39,179,147,124, 5,150, 86,193,142, 29, 59, 48,119,238, 92,212,175, 94, 29,110,110,110,112,114,114,194,213,171, 87,113,243, -230, 77,200,100, 50,164,167,167, 99,241,226,197, 56,120,240, 32,244,122,189,180,178,207,147, 37, 98,171, 60, 24,141, 70,242, 93, -129, 85, 22,191, 80, 40,100,204, 78,242,101,225,232,209,163,219,204,150,172,111,190,249,166,197,210,165, 75, 47, 71, 71, 71, 67, - 34,145,224,230,205,155, 24, 50,100,200,229,229,203,151,183, 24, 53,106, 20, 54,109,218,132,152,152,152, 13,229,241,245,233,211, -103,214,176, 97,195,150, 93,184,112,129,116,118,118,134, 76, 38, 67,247,238,221,177, 97,195, 6,142,209,104,220, 24, 22, 22,118, - 55, 44, 44,236,174, 41,225,228, 15,123,215,207,191,250,240,254, 93,140, 25, 55,145,167, 51, 26,166, 88, 80,125, 86, 45,145,228, - 25, 91,181,202,218, 99, 48, 20,244,225,114, 69,182,119,239,202, 35, 54,110, 44, 22, 91, 83,167, 78,133,173,173, 45, 80,232,192, -140,114,172, 58, 35, 14, 30, 60, 88,220, 31,218,219,219,131,199,227,129,203,229,130,166,105, 80, 20,133,211,171,197,248,125,106, -161,190,248,125, 42,129,147, 43, 9,213,135,252,118, 34, 55, 4,200,156,121,119,191,218,236, 31, 24,208,214, 30, 87,119,165, 98, -126,167,168,196,155,123,222, 76,208,164,227,151, 50, 62,214, 96,210,164, 73,126,233,233,233,184,117,235, 22,110,221,186, 85,150, - 5, 72,115,248,240,225,159,243,243,243,225,233,233,137,110,221,186,181, 2,208,168,140,118,131,134, 13, 27,162, 75,151, 46, 8, - 13, 13, 69,253,250,245,161,211, 27,233,176, 1, 35,234, 60,138,121,227, 54,127,241,124,209,217,115, 7,200,203,151, 47, 80,219, -246,159,180,109, 26,250,217, 50,174, 84,113, 29, 66,123,133, 37,245, 44, 48,101, 34, 72,209, 1,107,207,140, 35, 87,156, 15,151, -108,137, 88,225, 37,149, 74,137, 59,183,238, 26,182,172,218, 19, 31, 32,238,150,126,125, 87, 38, 10,136, 84,180, 29,236, 73, 50, - 64,175,127,202,200, 46, 16, 8,150, 94,184,112,193, 69,175,215,227,225,195,135, 24, 63,126,188,230, 3, 41,139, 13, 32, 30, 30, - 30, 56,127,254, 60,250,247,239,175, 73, 75, 75,187,246,119,213,169,164, 22,249, 95, 1,167,132,130, 44, 70, 66, 66, 66,142, 76, - 38,115,171, 83,167, 14,169,211,233, 10,151, 36,246,237, 51,173,223,184,241,136, 70,163, 25, 7,128,187,242,183,223, 86,187,185, -187,135, 14, 24, 56,144, 48, 24, 12,232,212,169, 19, 47, 50, 50,210,254, 85,122,122,158, 5, 3,206, 91,223, 55,104,208, 32, 44, - 93,186, 20, 0, 48,118,236,216, 98,211, 58, 97,129,195,146,196, 22, 29,219,119,110,104,147, 32, 94, 97,163,111,102,200,175,241, - 82,122, 93,156, 47,108, 8,146,199,129,128, 2,163, 55, 24,159,167,247,184,253,242,121, 93, 63, 97, 86,102,205,118,254,159, 96, -253,169,173, 29, 11, 76,154, 61, 22,119, 56, 34, 81, 99,137, 68,130,219,183,111,103, 53,108,216, 48,135,101, 89,219, 57,115,230, - 56,136, 68,162,198, 31,112,239, 95, 63,123,246,172, 85,243,230,205,191, 38, 73,178, 29,195, 48,167,211,210,210, 86, 2,120,109, -225,231, 71, 3,248, 17, 64,241,204, 82,167,211,129, 36, 73,176, 44,139, 62,125,250, 96,234,212,169,126, 15, 30, 60,192,217,179, -103,229,237,218,181,187, 14, 32, 7,192, 80, 0,165, 90,205,148, 74,165,250,230,205,155,194,179,103,207,130, 97, 24,200,229,114, -216,216,216,128,207,231,163,123,247,238,146, 41, 83,166,180, 61,113,226, 68,186,178, 70, 53, 74,144,146,164,226, 75, 36, 82,184, -184,181, 28,213,239,203,104,150,101, 15, 86,162,115,224, 9, 57, 70, 13, 97,210,146,139,102, 46, 39, 69, 92, 46, 33,224,114,192, -103, 10,240,195,207,243, 8, 46,107,226,160,146,235,243, 92, 46,151, 43,229, 67, 71,241, 40,131,136, 0,251, 49, 26, 7, 69, 81, - 60, 1,183,108,127, 12,154, 36, 73,146, 36,185, 0, 44, 78,218,199,231,243,185, 82, 62, 91, 38,167,144, 34, 40,130, 32,120, 40, - 99, 39, 90,144, 11, 88,179, 21,137, 55,238,149,182,164, 40,110,217,178, 37,142,156,189,141,125, 17,167,145, 17,119, 31,211,191, -255, 6,141, 26, 53, 66,100,100,100,185,101, 50,251,104,149,101, 93,118,117,117,141, 74, 78, 78,110, 80,214,103,203, 91, 50, 44, -195, 74,245, 62,255, 76, 91, 4,207,142, 70, 5, 62, 90,221, 90,182,108, 57,102,199,142, 29,186,207, 63,255,156,215,167, 79, 31, - 4, 4, 4,180, 24, 60,120, 48, 0,160, 93,187,118, 88,186,116,105,139,193,131, 7, 99,247,238,221, 56,112,224,128,182,117,235, -214,223,159, 63,127, 62, 9,133, 59, 58,223, 3,195, 48, 93,214,172, 89,243,174,165, 16, 70,163, 17, 6,131, 65, 97, 52, 26, 21, - 69,125, 17,150, 45, 91,158,113,242, 68, 36,190,159, 54, 27, 78,142, 46, 65, 22, 62, 67,196,160,137, 19, 51, 54, 47, 94,140,197, -187,119, 99, 98,205,154,162,173,143, 31,227,164, 70,131, 61,103,207,102, 20,125, 79,133,190,153, 42,149, 74,125,244,232, 81,155, - 61,123,246,192,206,206, 14,181,107,215,134, 92, 46, 7, 77,211, 32, 41, 33, 40,174, 12,117,252, 27, 3,184, 9, 0,168,233, 10, -149,175, 39, 46, 19, 4,114, 88,178,242, 62, 69,252,106,168,225,224, 46,184, 48,102, 83,128,157,141, 19, 23,199, 87,198,227,196, -138,132,131,154, 12,252, 10, 35,158,162,108,159,175,134,158,158,158, 72, 79, 79,199,209,163, 71, 85, 64,153,130, 12, 12,195,252, -252,219,111,191, 77,154, 54,109, 26,223,215,215, 23, 0,130, 0,220, 42,237,189, 98,177, 24,110,110,110,197,194,178, 79,248, 40, -175,145, 19, 70, 9,123,124, 22, 10, 14,199, 1, 57, 42, 3, 50,243, 12,144, 57, 72,240,253,132, 48,193,233,134,110,141,214, 44, -223,126, 88,173, 70, 35,224,253,254,128, 32,112,235,198,253,203,245, 4,190, 0, 65, 2, 9,228, 57, 16, 32,144, 79, 24, 64, 80, - 20,107, 50,153, 16, 31, 31, 15,150,101,209,191,199,144,132, 17,243, 15, 56,181,232,175,132, 71, 29, 87, 16, 44, 62,249,167, 8, - 1,123,123,251,160,204,204, 76,188,126,253, 26,225,225,225, 73, 25, 25, 25,167, 84, 42,213,144,228,228,100, 0,200,170, 2,101, -177,152, 15, 10, 10, 66,227,198,141,209,187,119,111, 65, 65, 65, 65,152,151,151,151,219,155, 55,111,154,253,149,245,121, 87,139, -252, 79, 9,173, 82, 27,154,193, 80, 71,187,122, 53, 84,167, 79,131,119,242, 36,246,184,186,230,107, 52,154,239, 0, 36, 20, 53, -252,111, 54,109,222,124,165,235,181,107, 54,186,232,104,120, 61,120, 0,218,206, 46,168,178, 5,216,184,113, 35,148, 74, 37,114, -115,115, 1, 0, 43, 86,172,128, 82,169,132,209,194,132,179, 28, 46, 90,184, 56,213, 68, 42,158,131,225,144,146,216, 58, 5, 77, - 36, 26,105,178, 91,188,179, 42,151,116, 67,116, 92,136, 88,157,169,107, 66, 80, 58,104, 50, 10,224,214,188, 54, 56,224,180,168, - 76, 25,205,235,254, 28, 14, 39,235,217,179,103, 93,124,124,124, 34, 0, 56, 84,197, 31,224, 29,188, 72, 75, 75, 27, 87,149, 15, - 82, 20,245, 99, 76, 76,140,211,134, 13, 27,190,158, 51,103, 14, 91, 82,104,153,255,207,225,112,192,178, 44,108,109,109, 65,211, -180,243,213,171, 87,157, 67, 66, 66, 86, 49, 12, 19, 84, 70, 61,217,128,128, 0,196,196,196,128,195,225,192,214,214, 22,140, 81, -143,217, 19, 70,193, 68,241, 57,147, 39, 79, 14,234,217,179,231,195, 13, 27, 54, 24,108,154, 54,111,150,153,153,249,104, 76,255, - 1, 15, 15, 29, 58,164, 43, 10,241, 80,241, 20,159,101,239, 62,127,254,156,114,119,117,166, 88, 99, 1, 35,230, 2,130,251,203, - 88,158,196, 5, 2, 14,197,114, 9, 18,124,129,208,246,117, 98, 98, 38,195, 48, 79, 44,225,100, 24,230, 78, 76, 76,140,208,217, -201,158, 83,160,214,229, 11,105,150, 23,123,231,246,171, 26,193, 13,189, 0, 64,115,231,230,121,126,157,186,194,216,180, 55,226, -154, 53,107, 90,196,169, 86,171,239, 38, 37, 37, 81,206,206,206,156,184,132,196,195,118, 18,177,163,141,157, 93, 19, 0,208,231, -229,222, 36,181,218, 55, 20,205,113,126,147,153,153,165, 86,171, 99, 44,173,251,203,151, 47, 57, 10,133, 19,117,252,228,153, 8, -103, 17,223, 73,202,227,216,240, 9,130, 16, 81,132,146,107,100, 50, 4, 34,145,211,235,196,196, 44,150,101,203,180, 16, 46,204, - 25,208,163,240,247,154,189,187, 4, 55,238,223,191,143, 99,151,159, 64,204,234, 64,104,114,113,114,211, 58,244,159, 60,237,131, -253,254, 42, 18, 91, 85,178,102,173,169, 27,245, 14, 63, 82, 42,112,132,239,223,191,255,236,109,219,182, 21, 59,160, 60,121,242, - 4,109,218,180, 49, 47,115,160,125,251,246, 8, 9, 9,193,147, 39, 79,224,237,237,141,179,103,207,242, 41,138,226, 15, 24, 48, - 96,254,246,237,219,143, 86,104,247, 95,187, 22, 67,134, 12, 41,205,177,250, 37, 0, 13, 33,243,205,159,186,112,139, 67, 86,102, - 6,210,223,164,222,181,244, 62, 16, 4,129, 65, 19, 39,102,172,209,233,176,227,198, 13, 12, 20,139, 69,155, 95,188, 64,167,144, - 16,212,107,211, 38,195,146,190,206,108,213,209,104, 52,160,105, 26, 54, 54, 54,176,183,183, 7,151,203, 5, 69,187,130,195, 11, - 4,201,229, 34,184,101, 32, 22,127, 39, 46, 8,239,128,229, 4,129, 28, 62, 15,119,184,162, 50,125,117, 8,113, 53,116,103, 89, - 40, 11, 18,112,206, 44, 72,108,171,195,150,150,210, 39,135,173,242,181,179,113,226,226,216,242, 56,156, 92,149,184, 95,147,138, -233, 69,247,130, 41,103, 34, 81,207,206,206, 14, 9, 9, 9,136,143,143,127,140,242, 29,252, 11,158, 60,121,242,138,207,231,251, - 57, 58, 58, 2,128,103, 89, 19,115,134, 97,138,253,176,182,238,216,235, 16,212,202, 75,240,105, 11, 63,108,137,152,135,175,194, -150,131,166, 8,152, 76,122,252,186,180, 51, 76,218,124,132,117, 29, 65,124,210,206, 59,240,116,132,110,152, 65,157,189,238,189, -137, 0, 7,115,255,211,247,170, 29, 95, 66,214, 3, 67,216, 57, 56, 56,137,185, 92, 46,236,109, 20,186,105, 35,191, 77, 97, 89, -182,184,221,208, 20,215, 64,230,201,213,153,169,249, 66, 59, 90, 13,176,100,141,170, 69,179,249,248, 72, 76, 76, 28,215,170, 85, -171,249,121,121,121,217, 42,149,170, 63, 0,120,122,122, 86, 39, 73,146, 15,160,188,213,145,234, 40, 61, 44, 4,247,193,131, 7, -144, 74,165, 72, 74, 74, 42,105,124, 1,195, 48,255,152, 77, 0,255, 80, 4, 3,184, 3, 64, 1,160, 19, 74,132,119, 32,139, 76, -117,159, 68, 70, 70,178,145,145,145,159, 20, 15, 94, 44,203, 24,179,178,192,106, 11,239, 45, 77,211, 44,128,146, 59,154, 68,118, -118,118, 4,237,238, 14,130, 95,232,250,193,126,196,173,175, 6,131,101,161,101, 24, 19, 40, 16,122,176, 37, 38, 45, 42, 1,129, -121, 14,109, 49,142, 55, 3,169, 60,187,146, 35, 29, 96,100, 97, 2, 67, 85,178, 56,172, 74,165,130,209,104,148,213,170, 85,235, -136,209,104,148, 21, 13,110,236,127,235, 23, 53,153, 76,175, 40,138,194,215, 95,127, 13,179,245, 71,167,211, 33, 53, 53, 21, 90, -173, 22, 58,157, 14, 49, 49, 49,200,205,205,133, 78,167,195,163, 71,143,224,233,233, 9,138,162, 20,229,116,230, 44,203,178,240, -240,240, 64,141, 26, 53, 64, 17, 44,214, 47,154,133, 31,198,143, 66, 95, 79, 6, 27, 87,254,138,214,173, 91,215,173, 89,179,102, - 83, 14,135, 99,114,113,113,225, 30, 56,112,224,176,201,100,234, 14,203,123,158,163, 83,167, 78,173,225,239,239,239,100,103, 35, - 53,240,121, 20,120, 6, 21,203,215,102,178,156,130, 12,120,120, 84, 55, 66, 40,242, 30, 56,112,160,169, 44, 43, 68,105,156,223, -125,247,157,194,215,215,215, 86,102, 39, 85,241,104, 42,157, 11, 54, 35,247,254,173,235, 0,192,115,116,210, 64, 32,242, 11, 15, - 15, 55, 86,134,115,198,140, 25,158,142,142,142,118, 36,216, 60,147, 94,255,231,122,187, 86,151, 73,208,180, 26, 92, 94,195,177, - 99,199, 18,149,225,156, 52,105, 82, 77, 63, 63, 63, 59, 59, 27,113, 62,135,166, 82,184, 12,147, 34, 0,147, 74,235,244,217, 2, - 71,135, 2,136, 36,193, 3, 7, 14, 44,147,211,108,205,154, 50,101, 74,194, 59,194, 27, 89, 89, 89,208,164, 62, 4, 55, 41, 26, -129, 18, 26,141, 28,101,224,243,249,197, 91,223,203,122, 92,203,242,209, 42, 77,108, 89,250,217,134, 63,149,179, 4,184,166,110, -212,187,113,179,146,147,147,161, 80, 40,202,109, 79,219,183,111,159, 22, 26, 26,154,222,190,125,123,221,145, 35, 71, 64, 16, 4, -206,158, 61,139,164,164, 36,180,111,223, 30, 44,203,154,119,181,225,238,221,187,104,215,174,157,174, 85,171, 86, 73, 69,241,181, - 42,196,144, 33, 67, 96, 48, 24,144,159,159,143,172,172, 44, 68, 70, 70, 34, 48, 48,144, 21,137, 68, 61, 41,143,207,230,133, 13, -155,214, 44,160,126, 16, 86, 45, 95,172,227,113,232,133,149,105,175, 4, 65, 32,252,187,239, 50,114,131,131,179,182,170, 84, 5, -131,108,108, 68,181, 18, 18,228,183, 79,156,112,208,235,245, 22,113,152,173, 58,238,238,238,197, 34,139,203,229,130,195,115, 4, - 37,174, 7,158,125,123,136, 92,122,226,220, 29,190,214, 86,140,131, 82, 9,142,139,237,202, 14,237, 32,242,192,188,102,125, 20, - 7,154,247, 85,156, 17, 85,195,134,162,241,128,100, 57,196,129,193,191,250,212,114,172, 33,196,181,189,169, 56,185, 42,241, 15, - 77, 42,102, 1,120, 81, 81, 59,215,235,245, 26,147,201, 4,146, 36,193,225,112, 74,250, 4, 94,249,227,143, 63,112,251,246,109, -160, 68,216,158,188,188, 60, 19, 69, 81, 16, 8, 4, 0, 32, 41,167,191, 3, 77,211,160,105, 26,231,175, 95,180,239,251, 69,103, -226,234,189, 83,104, 30,216, 15,153,249,122,164,229,234,145, 83, 0,248, 55,154,142,128,118, 7,113, 63, 38, 15, 65,245, 3, 40, -138, 39, 14, 47,141, 79,243, 26, 9,170,120,244,202,124,204,212,214, 37, 10,143, 93, 59,244,228,241,197,125,247, 31,237,250, 45, -226, 69,179, 70,173, 84, 69,198, 4,228,231,231,179, 4, 65,176,223, 14,159,246,106,235,144,108,211,242,254,247, 25,142, 86,240, -242,111,236,234,171, 59, 58, 58, 94,181,183,183, 63, 91, 36,142,170, 75,165,210, 43, 10,133, 34, 26,133, 27, 61, 14,165,164,164, -248,170, 84,170,230, 40,220,156, 21,151,153,153,217,166,200,242, 20, 87,142, 37,108,131, 82,169,252,198,100, 50,117, 45, 58, 58, -152, 76,166,160,231,207,159,251, 5, 5, 5, 61,246,242,242,186,235,229,229,117,204,203,203,235,176,151,151,215,225,208,208,208, -165,230,112, 15,127,241,178,225,123, 90,228, 95, 38,180, 80, 36,178,214, 22,189,162, 88,104, 1, 56,255,174, 3,154,145,207,127, -100, 28, 51, 6,118,135, 15,131,126,254, 28,131,195,195,109, 68, 34,209,114, 20,198,104,106, 46,145, 72, 86,205,154, 53, 75,234, -176, 96, 1, 92, 47, 94, 68,108,100, 36, 12, 52,125,171, 42,165, 83,171,213,224,112, 56,197,150, 24,177, 88, 12,147,201,132,210, - 76,190,239, 53, 64, 35,174, 37,165, 69,131,135, 26, 96,192,230, 31, 87,182,186,209,239,213,116,167, 72,165,167,247, 11, 21,215, -251, 39,199, 38, 78,203,171,183,184,161, 34, 56,249, 60, 59, 1,226,227, 19, 96, 2, 83,169,245,102,141, 70,147,171, 82,169, 16, - 20, 20,100,127,251,246,237, 90,129,129,129,242,162,235, 55, 63,240,135,105,234,234,234,186,215,205,205,237,181,171,171,235, 94, - 0, 77, 43,241,217, 13,151, 46, 93, 2, 69, 81,152, 53,107, 22,242,242,242,160,215,235,145,153,153,137,248,248,120,232,116, 58, - 36, 38, 38,226,233,211,167,208,233,116,136,141,141,133, 86, 91,241,132,132, 97, 24,216,216,216, 64,163,206,199,239,243,126,192, -140, 41, 19,144,251, 50, 10,137,201,105,176,179, 21, 99,220,184,113,148, 76, 38, 99, 24,134,169, 97, 50,153,218, 49, 12,179,218, -146,223,169,196,243,118,217,195,195, 35, 96,209,162, 69,126, 63,204, 91,205,181,225,228,179,124,169,128,225, 73,249, 44,175,110, - 19, 12,153,190,156,187,108,201, 47,207,174, 93,187,150, 4,203,130,119,146, 0, 46, 7, 7, 7,251, 36, 37, 37, 5,250,250,250, -214,113,168, 94,147,207, 87,184,229,112, 21,213,148,172, 86,115,131,112,171,214,114,245,234,213, 15,175, 92,185,146, 92, 25, 78, -177, 88, 92,119,203,150, 45, 1,206,206,206, 1,180, 80, 40, 40,200,205,221, 99, 44, 80,237,165,236,100, 2,210,198,174,195,193, -131, 7,163,246,239,223,159, 90, 25, 78,111,111,111,223,121,243,230,249,215,171, 87,207,223,197,179, 22, 95,232,230,145, 41,112, -175,158, 41,172, 23,200,135,123,141,207, 87,173, 90,117,247,218,181,107, 22,113, 82, 20,101, 36, 73, 18, 52, 77, 67, 36, 18,225, -248,241,227, 24, 51,172, 31, 60,220,236, 81,199,215, 23,109,191,250, 6,251,247,239, 47,246,225,161, 40,170,204, 17,125,243,130, -113, 17,193, 10, 34, 10,107,234, 70, 97, 77,221,168, 96, 5, 17, 85,166,216, 42,250,123,105,239,177,168, 55, 42, 99,185,209, 2, -177,117,244,252,249,243, 63, 15, 26, 52,136,215,177, 99, 71,220,184,113, 3, 67,134, 12,185,124,224,192, 1, 0,192,141, 27, 55, -240,237,183,223, 94, 62,115,230, 12, 70,141, 26,133, 54,109,218,240, 46, 93,186,180, 10, 22,196,254, 49, 26,141,216,184,113, 35, -140, 70, 35, 36, 18, 9,228,114, 57, 58,119,238,140,135, 15, 31,142,218,180,105, 83, 52, 69,211, 95,118,234,250, 5,142, 28, 62, -128,167,143, 30,142,218, 60,127, 64,165,131, 2,147, 36,137,142,225,225, 25, 25,254,254, 89,155,149,202,130,161, 50,153,200, 55, - 53, 85,126,110,239, 94, 7, 11,132, 26, 97, 50,153,138,197,149, 89,116,152, 15, 14,207, 17, 28,113, 0, 56,210, 70,184,255,130, -107,224,134,224, 14,175, 17,158,148, 23, 63,139,230,145, 67,122,254,224,137,158, 63,120,162,219,228,154,131, 69,213,176, 94, 92, - 13,163, 59,142,175, 17,234,213,200, 22,202,116, 61, 34,127,141,141,211,100, 98, 1,128,167,150,180,115,134, 97, 30, 39, 37, 37, -129,199,227,161, 90,181,106, 62, 0,204,126,129, 27,134, 15, 31, 62,246,167,159,126,154, 0,224,167,162,107,146,208,208, 80,255, -252,252,124, 60,127,254, 28, 0,110,151, 99, 13, 46,222,101,152,165,140,229,215,116,173,135,192,186, 35, 33,147,213, 71, 82,150, - 14,201, 89, 58,172,255,189, 59,162, 46,205,197,237,147, 3, 17,151,154, 10,161, 75, 15,152,140,218, 0, 11, 38,245,174,247,238, -221, 35, 46, 93,186, 68, 48, 12, 3,131,193,192,230, 41,149,236,157,203,151,161,190,112,129,176,177,177, 33, 90, 52,110,149,191, -121,238,145,155, 7, 87, 94,190,173, 47,168,244, 68,253, 67, 48,227,213,171, 87, 77,247,238,221, 27, 10, 96, 70,189,122,245,174, -197,199,199, 55,187,120,241, 98, 29,119,119,247,229, 85, 37, 53,135,133,136,141,141,125,235, 40, 10, 11,161, 43, 18, 13, 29,139, -196, 92, 55, 0,223,226, 3,118,217, 87, 2,231,255,197,206,240, 71,240,206,110,195,119,133, 86,201, 64, 97,240,146,201,164, 6, -131, 62,241,212,169, 83,122,146, 36, 33, 18,137, 48,104,200, 16,242,247,223,126,107,217,175,105,211,179, 35, 62,253,244,216,217, - 51,103,130, 67, 66, 66,192,178, 44, 72,146,196,238,221,187,213, 26,141, 58,211,195,195,195,206,146, 78,163,100, 3, 82, 42,149, -197, 66, 43, 55, 55, 23,206,206,206, 22, 47, 29,170,148, 56,125,230,120, 84, 54,107,250, 42,190,227,139, 37,250,133,169,221, 67, -114, 24, 19, 39,215,100, 64,174,154, 69,158, 6,156, 27,164, 60,100,144,119, 15,125, 76,187,144,167, 23,162,175,102,106, 76,154, - 74,237,150, 72, 79, 79,255, 33, 44, 44, 44, 83,161, 80, 16, 54, 54, 54,112,115,115, 35,187,117,235,150,145,144,144,240, 83, 85, -127, 17,123,123,251,190,161,161,161, 17, 73, 73, 73,189, 46, 92,184, 80,227,226,197,139,189, 66, 67, 67, 35,236,237,237,251, 90, - 72,177,103,218,180,105, 42, 30,143,135, 38, 77,154, 32, 47, 47, 15, 69,187,124,202, 61, 44, 89, 34,229,114,185, 88,179,232, 71, -204,152, 50, 1, 89,209, 55,112,255,242, 41,156, 79, 37, 48,125,222, 47,224,114,185, 85,138,245, 85,219, 81, 84,175,158,171,244, -201,183, 67,250, 36, 79,157, 50, 69,122,247,238, 93,122,236,248,111,217,216,148, 44,240, 58, 46,166,240,201, 15,228, 61,149, 35, - 58,117,104,139, 89, 51, 38,214, 43, 10,218, 89, 46,234, 58,138,234, 5,184, 74, 31, 79, 28,209,239,213,248,241,227,133, 11, 23, - 46,212, 52,109,218, 84,157,150,150, 38, 20,203,228,190, 28, 91,187,128,216,148, 84, 73,211,166, 77, 99,190,250,234,171,156,202, -114, 78,159, 62, 93,116,226,196, 9, 78, 88, 88,152, 49, 59, 59, 91, 66, 11,133, 65, 4, 95,208,248, 77,118,182,109,175,176,176, - 23,189,122,245, 42, 40, 10, 88,106, 49,231,204,153, 51, 69, 79,159, 62,229, 52,109,218,212,144,154,154, 42, 21,219, 59, 4, 82, -118,242, 70,175, 83,210,108, 26,135,132,188, 28, 59,118,172,170,188,114,150, 20, 41, 82,169, 52,169,121,243,230,248,245,215, 95, -177,108,217, 50,124,254,249,231,120,248,232, 33, 58,141,157, 0,191,209,223,226,240,213,235, 72, 74, 74,194,156, 57,115, 16, 24, - 24, 8, 46,151,251,180,212,246, 56, 42,154,184,155, 10,226,110, 42, 8, 98, 84, 52, 97, 62, 47,211,178,245, 83, 46, 74,190,191, -180,247,221,158, 89,186,165, 43, 88, 65, 68,149,231,135, 85,145,216,234,213,171,215, 24,115, 8,135,161, 67,135, 94, 94,190,124, -121,139,161, 67, 11, 39,218, 77,154, 52,193,220,185,115, 91, 76,159, 62,253,242,188,121,243,208,182,109, 91,120,121,121, 85,184, -241,197,100, 50,193,104, 52,162, 95,191,126, 48, 26,141,120,243,230, 13,158, 61,123,134,181,107,215,130,101, 89, 1, 0, 40, 92, -221, 27,242,120, 60,220,187,115,171, 96,198,208,144,237,149,176,100, 17, 37, 39, 49,249,249,249,232, 53,122,116, 70, 98,237,218, - 89,171, 51, 50, 10,134,201,100,162,154,113,113,114,169, 78,231,134,114,252, 18, 9,130, 0,195, 48,197,194,202, 44,184,222, 61, -138, 6, 74,139,160, 47, 96,142, 94,220,150, 12, 0,104, 53,192, 21,221, 38,215, 28,172,240, 22,173,104,217,191,208,232,189,127, -238, 43, 54, 47,217,180, 16, 6, 60,174,132,197,250,198,141, 27, 55, 96,103,103,135,176,176, 48, 62, 73,146, 11,204,243, 85, 20, -198,206, 90, 98,230,226,243,249,139, 7, 14, 28, 72,230,228,228,224,254,253,251, 0,112,166,172,126,137,101,217,226,186,231,103, - 17, 48, 49, 60, 92,185,115, 28, 39, 47,238,195,235,164, 55,136, 75,215, 0, 28, 91,104, 84,137,208,171,147,160,203,185, 3,165, - 86,100, 81,129,185, 92,238,155,122,245,234,177,141, 26, 53, 98, 89,150,197,203,151, 47,141,177,113,113,198, 91, 75,151,178, 15, - 70,142, 36,164,207,158,113,133, 66, 33,225,233,233, 9,129, 64,192, 8, 4,130,204,191,113,240,254, 75,194, 45,252, 5, 97, 33, - 62,166, 85,139,197,191, 19, 41,120,123,183, 97,113, 0,211,210, 2,150,130,181, 17,246,217,183,234,119,219,176,126, 3, 84,129, -129,129, 50, 55, 55, 55, 16, 4,129,238, 61,122, 16,161, 23, 46, 72,105, 87, 87,216, 55,104, 80,188, 28,113,250,212, 41, 28, 63, -126, 92,117,228,143,131,110, 67,134, 13,235, 2, 96, 75, 57,133,225,240,249,252,226,239, 77, 73, 73, 1,159,207, 47,246,137, 80, - 42,149,112,116,116, 68, 74, 74, 10, 44, 92,153,219, 58,117,202,245, 41,233, 33, 63,120,134, 72,105,226,152, 42, 21, 38,150, 5, - 77,152, 0, 53, 11,131, 9,208, 26, 88, 52,172, 73,201, 79,170,141,178,200, 27, 7, 98, 0,108,173,204,221,211,106,181,231,238, -222,189, 59,146, 97,152,125, 0,200, 11, 23, 46, 48,143, 31, 63, 30, 3,203, 29,215,223, 55,219,139, 68,147,207,158, 61, 43,159, - 60,121,114,118,100,100,100,110,231,206,157,109,215,174, 93, 43,111,211,166,205,228,204,204,204, 93,150, 24, 2,227,227,227,183, - 36, 36, 36,140,105,212,168, 17,178,178,178,160,215,235, 17, 21, 21, 5,111,111,111,220,190,125, 27, 62, 62, 62,184,117,235, 22, -234,212,169, 3,147,201, 4,141, 70, 3,134, 97, 76, 21,117,230, 89, 25,111,128,204,120, 36,223, 56,134,103, 15,162,112, 54,153, -192,202, 93, 17,168, 86,195,179, 74,113,106,124,156, 68,254, 10, 71,251,147, 11,103,207,116,138, 61,183, 27, 7, 54,174,100,206, - 31, 59,230,199,147, 98,228, 39,253,190,249, 66,103, 64,117, 0,188,102, 33,141,208, 81,246,212, 36,170,129,212,179,143,203, 15, -176,232,227, 36,242,119,118,176, 63,241,159, 5, 63, 73, 95, 30,223,140, 61,107,126,101,247,111,219, 25,168, 1, 66,252,253,253, - 59,146, 36,105, 7, 64, 83,228,231,101, 81,106,155,210, 56, 79, 71, 68, 4,107,128,144, 67,135, 14,117, 20,137, 68, 46, 0, 12, - 5, 5, 5,175, 62,132,243, 76,100,100,176,185,156, 4, 65, 56, 1,208,179, 44,251, 18,149, 76,193,211,187,119,239,185,223,126, -251,237, 20,147,201,228, 88, 98,118, 78, 45, 94,188,152,195, 48, 12,197,178,172,158, 36, 73,253,137, 19, 39, 76, 70,163, 49, 89, -163,209,140,254,144, 94,228,139, 47,190,192,245,235,215,103,163,112, 19,134,165,214,234,183,252,180,138, 82,246, 84,153,255,194, -133, 11,115,190,252,242,203,169,187,118,237,122,182,124,249,242,174,163, 70,141,194,238,221,187, 81,187,118,109,220,187,119, 15, - 63,252,240, 3, 0,180,152, 62,125,250,225, 13, 27, 54,120,197,198,198, 46,182,192,162, 1,163,209,136,157, 59,119,162,123,247, -238,112,116,116,132,171,171, 43, 8,130, 56, 55,108,216,176,223, 0,128, 34, 40, 46, 0,104, 53, 90,173,175,111, 35,139, 45,184, - 92, 46,183,184,175, 75, 77, 77, 45,222, 41,248,217,151, 95,102,172, 95,184, 16,219,213,106, 12,147,201, 68,137,238,238,138,195, - 47, 95,142,120, 84,216, 57,179,229, 89,117, 42, 18, 89,150,186, 52,168, 83, 48,237,143,249,175, 93, 0,124,222,106,128, 43, 90, - 13,112, 69,163,110, 78, 4, 73, 17,120,112, 50, 19, 15, 79,103,237, 55, 40,113, 14,149, 75,151,243,120,193,130, 5,135, 63,249, -228,147,174,117,235,214,197,240,225,195,191,218,184,113, 35,215, 96, 48,140,199,159, 97, 30,108, 73,146,252,105,205,154, 53, 35, -228,114, 57, 46, 93,186,132,139, 23, 47,158, 3, 16, 95, 86,191, 4,160, 56,102, 86, 53, 15, 31,205,211,216,124, 81,122,210, 21, - 92,190,244, 7,106, 7,126, 3,161, 75, 23,200,125,231, 65, 31,189, 12,186,204,147,144,123,116, 70, 98,236, 75, 80, 28,254,195, -138,156, 80, 88,150,125,148,152,152,232,229,229,229, 69,188,126,253,218, 8,128, 53,153, 76,172,190,101, 75,131,223,194,133,244, -195,175,190, 34,154, 61,125, 74,177, 4,193, 68, 69, 69, 1,192,147,255,198, 40,110, 14,183,240,240,225,195,178,194, 45, 84, 10, -245,234,213,107,113,241,226, 69,190, 70,163,193,249,243,231,209,184,113,241,222,174,255,106,244,251,146, 90,228, 95,134, 17,165, - 92, 91,251,150, 69,235,173, 7,155, 33,232, 58, 62, 62, 38, 46,137, 77,221,187,116, 41,184,123,247,110,241,172, 79,115,243, 38, - 84,199,143,195,100, 50,129,101, 89, 92,188,112, 1, 3, 7, 12,200,167, 41, 98,125,205,154, 53, 88,130,125, 43,118, 75,187, 82, -102, 15, 97, 97, 97, 97,197,157, 79, 66, 66, 2,196, 98, 49,120, 60, 30, 24,134,129,209,104, 4, 69, 81,176,181,181,133,209,104, - 44,205, 4,243, 46,167,193,148,165,234,181,161, 83,255, 20,215,124, 61, 59,210,174, 38,170,115,133,197,141,211,197,134, 64,215, - 64, 26, 14,156,116,246,204,226, 79,147, 25,109,102, 47,188,191,163,171,162, 45,255, 62,245,235,215,255,109,224,192,129, 36, 0, -180,107,215,142,172, 95,191,254, 10,148,159, 42,167, 92, 78,129, 64,192, 7,128,136,136,136,172,103,207,158,125, 30, 17, 17,145, - 85,242,186,133,156,107, 23, 45, 90, 4,145, 72, 4,163,209, 8,157, 78, 87,236,159, 85,242, 85,175,215,195,193,193, 1, 71,142, - 28,129,201,100, 58, 82, 81, 57, 61,170,215, 0,225, 88, 11, 91, 34,206,226, 98, 6,183, 42, 34,171,152,179,150,139,184,142,139, -131,253,169,255,204,159,227,152,253, 34, 10,137,137,137,236,137,227, 71,174,105,128,164,220, 60,204,200, 81,161,142, 90, 7, 65, - 99, 47,196,159, 90,243, 61, 59,189, 21, 12, 40,125,215, 96, 49,167,159,139,184,142,155,163,253,137, 95,254, 51, 95,154,243, 34, - 10, 41,169,169, 56,122, 36,226,174, 6, 48, 47, 55, 14,102, 24, 38,128, 97,152, 0, 0,131,203, 17, 47,149,226, 44, 40, 40,168, - 87, 80, 80, 80,239, 99,114,178, 44, 91,143,101, 89,139, 57, 75,250, 68, 45, 89,178, 36, 58, 37, 37,101, 96,122,122,122,123,243, -145,157,157,221, 46, 63, 63,191,117, 65, 65, 65, 75,245,146, 26,182, 5, 5, 5, 78,249,249,249, 10,141, 70,211, 16, 64, 84, 37, -158,249, 98,148,140, 58,157,146,146, 50, 43, 37, 37,133,168,168,156,212,232,104, 98,199, 47, 19,255, 88,179,102,141,226, 3,249, -223, 42,103, 70, 70,198,190, 93,187,118, 5,121,122,122,122, 13, 30, 60, 24,171, 87,175,198,242,229,203,181, 0,176, 97,195, 6, -109, 9, 75,150, 71,108,108,108,163, 50,150, 13,219,149,176,150,108,253,236,179,207,216,139, 23, 47,162,123,247,238,197,129, 68, -215,173, 91, 7,163,209,168,108,219,182, 45, 3, 0,106, 77,129,146,101, 88,232,244,101,174,191,191,119, 63,121, 60, 94,135,146, -241, 2,205,193,152,121, 60, 30, 88,150, 69,157, 22, 45, 50,114, 2, 3,179, 54,230,230, 22,204,170, 87,207,102,132,175,239,224, -186,192,128,210, 56, 9,130,120,203,170,243,238, 81, 9, 75, 86,201,114,166,171,147, 49,252,143,249,175,143,155, 45, 91, 2, 9, - 7,154, 60, 35, 14, 46,124,253, 70,243, 6,235,202, 18, 63,229,213, 61, 43, 43,107,236,194,133, 11,181, 50,153, 12, 95,124,241, - 5,230,205,155, 55,172, 69,139, 22,185, 78, 78, 78,215,107,215,174,253,160, 79,159, 62, 41, 81, 81, 81, 99, 67, 67, 67,241,252, -249,115,252,242,203, 47, 57,217,217,217,253,203,227, 36, 8,162,216,146,215,173, 83,187,172,223, 87,252,202,180,253,100, 12, 68, - 66, 27, 24,104, 15,100,229, 27,144,173, 98,161,227,135,128,199,229,163,125, 83,127, 92, 63,177,185,192,164, 83,109,169,232,153, -207,207,207,223, 63,104,208, 32, 37,151,203,133, 78,167, 99,105,154, 6,191,208,239,152,161, 63,255, 92,223,236,241, 99,163,137, -101, 25,130, 32,240,221,119,223,169,178,179,179,119, 85,165, 29, 85, 2, 37, 57, 63, 86,184,133,118,239,140, 63, 31, 35, 44,196, - 95, 81,247,127, 51,214,150,114,252,105,209, 50,111,169, 52,191, 18, 4, 99, 50,153, 24,212,244,172, 41,141,125, 29,191,178,119, -239,176,161, 29, 59,118, 18,117,234,212, 73,224, 31, 93, 56, 27,141,136,136,192,129, 3, 7, 10, 78,158, 60,169,228,211,212, 6, -143,106, 30,206, 38, 19, 3,130, 96,202, 85,195, 82,169,116,252,180,105,211,132,185,185,185, 88,190,124, 57, 19, 20, 20, 68,138, -197, 98,232,245,122,108,216,176,193,224,239,239, 79,147, 36,137,220,220, 92,144, 36,249,212,194, 10,222,207,141, 79,106,255, 91, -104,207, 3,141,190, 30, 98,239, 23,218, 76,214,218,195, 13,134, 6, 44,146, 19, 94,227,217,153,147,217,143, 78, 44,205,132, 38, -173, 39, 42, 78, 15, 84,218, 64,240,227,201,147, 39,157,198,142, 29,203,106, 52, 26, 34, 62, 62,158,157, 63,127,190,211,240,225, -195,127, 76, 78, 78,238, 91,197, 31,133,200,201,201, 1, 65, 16, 76, 81, 71, 98,158,245, 87,102, 93,238,225,150, 45, 91, 14,245, -232,209,163, 91,219,182,109, 17, 29, 29, 93,188, 68, 88, 82,104,153,119, 31, 46, 88,176, 32, 7,192,212,138, 72,105,154,198,242, - 45,251,144,147,157, 1,103,103, 87, 8,132, 66, 84,117,135, 37,143, 36,103,253, 60,103,166, 83,198,147,235,196,195,107,103,153, -189,247,211,210,141, 38,182,244,136,255,121,201,108,145,250, 47,127, 54, 67, 82,179,126,158,255,147,173,121, 89,115,215,157, 20, - 37, 97, 98,199,126, 80, 19,249,183,112,254,205,112,117,117, 69, 74, 74, 10,225,234,234,202, 22,249,104,177,229, 8,173,183, 31, -240,194,229, 50,162,188,101,195,170,242,199,196,196,204,111,208,160,193,196,231,207,159,239,245,243,243, 27, 5,160,154, 86,171, -205,153, 62,125,250,127, 54,108,216, 48,212, 18, 75, 22, 0,236,222,189,123,233,144, 33, 67,142,119,233,210,229,123,134, 97,234, -151, 24,216, 99,156,156,156,138,151,112,223,164,165, 78, 25, 57,180,223,148,252,252,108,139,227,220, 73, 36,146, 17,211,167, 79, - 23,168, 84, 42,172, 90,181,138,241,247,247, 39,205,147,162,109,219,182, 25,125,124,124, 56, 97, 99,198,100, 44, 73, 77,197,220, - 75,151, 84, 83, 2, 2,130, 54, 62,123,214, 16, 12,179,181, 44,171, 78,105,150, 44,179,219, 69, 21,145, 92, 36,182,214, 1,248, -188, 89,111, 23, 28, 90,244, 26,217,177,186,255,192,136,151,176, 32, 45, 80, 41, 72,220,191,127,127,251,180,180,180, 67, 51,103, -206,180,109,216,176, 33, 2, 2, 2,104,137, 68, 18, 98, 14, 23,147,155,155,139,211,167, 79, 99,245,234,213,186, 71,143, 30,245, - 40,111,185,202,100, 50,165,251,248,248,152,239, 3, 75, 16, 68,166, 82, 75,216,238,169, 27, 34, 25, 60,114, 47,113,249,214, 85, - 36,235, 25,104, 13, 12,106,122, 6,163,245,231, 75,112,248,216, 3, 83,114,236,227,199, 6,117,246,122, 11,202,251,242,197,139, - 23, 7,231,204,153,211,251,251,239,191, 23,102,100,100,152,180, 90, 45,179,111,223, 62,106,240,224,193, 38,150,195, 97,184, 28, - 14,198,143, 31,175,206,201,201,249, 3,248, 91, 19, 76,255, 37,225, 22,254,130,176, 16, 31,205,154, 85,242,245,127, 5,165,182, - 80,134, 34,175,172, 94,243,123,135,221, 59,119,185, 80, 20,233,242,242,213,171, 91, 93,123,246, 74, 58,117,234,148,156,107,107, -219, 24, 0,163, 27, 53,234,154, 94,171,206,138, 60,116,168,122,205,154, 53, 2,139,146, 74,179, 12, 69, 94, 41,239, 11,243,243, -243, 85,151, 46, 93, 42,152, 58,117, 42,145,144,144,176,195,217,217,185,207,177, 99,199, 36, 61,123,246, 84, 71, 71, 71,239,119, -113,113,233, 22, 26, 26, 42,157, 56,113,162, 54, 63, 63,191, 50,137, 71, 31,179,111,178,235,222,156,185,248,203,155,139,126,255, - 20, 28,170, 57,180, 52,192, 24,174, 64,159,119, 10,192, 14, 84, 34,222, 81, 73,136,197,226, 64,145, 72,132,187,119,239,102,135, -132,132,232, 52, 26, 13,119,222,188,121,246, 98,177, 56,176,170, 55,158,101, 89, 54, 59, 59, 27, 12,195,112, 0, 16, 69,175, 96, - 42,191, 23,191,111,215,174, 93, 15,237,217,179,231,179, 78,157, 58,193,203,203, 11, 6,131, 1, 62, 62, 62,208,233,116,240,246, -246,134, 86,171,197,236,217,179,145,155,155, 59, 1,229,228, 60, 35, 8, 2, 70,163,177,216,217,214,205,189,122, 97,156,158, 15, - 8, 99, 33,166, 73,175,167,145, 27,145,158,153,193,236,185,151,150, 86,160, 55,181,127,241,166,224,209,187,239, 43, 48, 65, 21, - 58,120, 92, 18, 0,104,153,242, 51,206,139,121,240,122,118,100, 29,210,210, 51,176,251, 78, 74,142, 74,207,124,254,172, 20,206, - 74,149,243, 95,194, 25, 60, 59, 26,189,198, 89,254,222, 15,129,165,130,170, 44,220, 77, 5,113, 91,180,145,197,154,141,165,198, -200,250, 64,254, 67,207,159, 63, 63, 4, 0,143, 31, 63, 78,232,215,175,223,148,215,175, 95,207, 1,112, 52, 54, 54,118, 77,101, -136, 54,110,220,248, 28,192,144,242,222,179,107,241,144,131, 0, 14, 86,134, 55, 47, 47, 79, 19, 21, 21,165,153, 56,113, 34,145, -144,144,112,204,197,197,229,179,227,199,143,139,122,246,236,169,125,248,240,225, 25, 87, 87,215, 86,237,218,181,147, 28,189,113, - 35,169,224,229,203,200,200,196,133,151,166, 0, 0, 32, 0, 73, 68, 65, 84,215,175,221, 13, 12, 19, 89, 94,251,252,200, 34,235, - 45,177,117,112,238,235,159, 15,253,252,186, 29,163,197,126, 93, 54,174, 1, 72,252, 0,206,139, 87,174, 92,241, 27, 48, 96,192, -158,206,157, 59, 55,243,243,243, 67,181,106,213,240,236,217, 51,188,121,243, 6,247,239,223, 71, 68, 68, 68,132, 70,163,169, 48, -161,118, 86, 86,214,251,233,137, 4,114,215,205,171,102, 69,220,186,220,216,167,101,167, 65,194, 0, 87, 6, 58, 61,139,132,184, -151,152, 61, 99,125, 65, 74,220,243,199,122,163,190, 7, 44,220,168,163, 86,171,215, 46, 91,182,140,142,140,140,236,180,114,229, - 74,105,245,234,213, 41, 46,151, 75, 2, 96,111,223,190,205,142, 27, 55, 78,149,145,145,113, 68,169, 84,174,253,155,199,232,139, -175, 94,189, 10,166, 40,234,163,134, 91,248,128,176, 16, 86,124, 76,120,122,186,251,213,170,238, 58,202,171,154,251, 24,207,234, - 30,225,165, 57,185,123,201,100, 82,207, 26,110, 35,188,170,185,143,169, 85,221,117,148,167,167,187,159, 5,166, 69, 47, 27, 27, -155, 99, 10,133, 34, 8, 0,108,109,109,187,217,217,217, 61,178,181,181,237, 86, 52, 11,236, 38,145, 72,158,248,251,251, 15,255, - 27,205,149,229,114,250,248,248,244,203,207,207,255,202,199,199,167,159,249,252,229,203,151,197,231, 85,225,244,240,240,104,123, -251,246,237,190,139, 23, 47,254,162,118,237,218,221,230,207,159,255,197, 31,127,252,209,215,221,221,189, 97, 21, 56,249, 0,182, -211, 52,157,198,227,241,210,105,154, 78, 51, 31, 28, 14, 39,141,162,168, 52, 0,107,202,176,150,181, 43, 49,203,185,236,236,236, - 28,235,236,236, 28,235,226,226, 18,235,226,226, 18,171, 80, 40,222, 59, 28, 28, 28, 46, 91,122, 63,125, 93, 36, 45, 66,170, 73, -175,212, 83, 72, 46,215,117, 22,251,126,140,223,200,215, 69,210,162,113, 53,219, 43,245, 20,210, 75,255,223, 56,131, 92,192,178, -171,125, 89,118,181, 47, 27,228, 2,182,162,243,143,105,246, 87, 40, 20,172, 66,161,152,245, 87, 45, 37,148,193,255,183,183,247, -143,200,233, 37,149, 74,119, 85,171, 86,205,220,215,117,177,177,177, 57, 39,145, 72,186, 20,245,117, 93,196, 98,241, 5,127,127, -255, 65, 21,113,202,229,242,219, 78, 78, 78,169, 69, 71,138,179,179,115,138,179,179,115,138,147,147, 83,178,147,147, 83,178,163, -163, 99,146,249,176,179,179,187, 94,197,186, 59, 1,104, 2,160, 33, 0,155,143,120, 63, 61, 1,140, 44,234,131, 22, 2, 24, 14, -160,254, 71,248,141, 8, 90, 40, 31,205,183,243,184, 66, 75, 28,243,104,137, 99, 30,223,214,253, 74, 57, 41,120, 44,225,172, 35, -151,203,231,217,216,216,252, 33,149, 74, 47, 73,165,210, 67, 14, 14, 14,243, 1,212,249, 47, 61, 75, 18, 0, 27, 80, 24,159,233, - 40, 10,151,194, 15,161,112, 83, 65,245,127,224, 51,255,255, 25, 35,254, 91, 95,220,206,202,105,229,180,114, 90, 57,173,156, 86, -206,127, 33, 39,105,189,159, 86,161, 85, 73,161,245,238, 1,160,156,200,240, 86, 88, 97,133, 21, 86, 88,241,255, 24,140,245, 22, - 88, 81, 73,148,186,180, 76,148,163, 74, 43, 19,107,170, 42,202,246,180,149,211,202,105,229,180,114, 90, 57,173,156, 86,206,255, -119,156, 86,124, 68, 88,205,170, 86, 78, 43,167,149,211,202,105,229,180,114, 90, 57,255,215, 97, 93, 58,180,194, 10, 43,172,176, -194, 10, 43,172,248,139,176,182,132,224,122,107, 9,209, 42,180, 42, 15, 18,192, 87, 0,122, 1,168,133,194,108,246,251, 0,252, -134,170,173,233,219, 0,152, 2,160, 57, 10,119,231,196, 0,184,132,194,221, 57,249,214,219, 93, 58, 28, 28, 28,166,209, 52,109, - 7, 20,166, 54, 49,191,150,252,191,201,100,202, 81, 42,149,243,255,162, 34, 80,176, 48,130,178,185,172, 37,203, 86,242,213, 96, - 48,252,149,229,180,226,159, 9, 31,185, 92,190, 61, 43, 43,171, 63, 74, 36, 89,182,194,138,255, 5, 56, 58, 58,142,210,235,245, -211,185, 92,238,188, 55,111,222,252,254,255,168,234,239,137,172,183,132, 86,100,100,228, 5, 0,232,220,185,243, 39, 0, 96,103, -103,119,149, 36, 73,207,202,124, 3,195, 48, 49, 57, 57, 57,101, 6, 80,179,179,179,187, 74, 81,212,123,156, 6,131, 65,202,225, -112,242, 74,251,140,209,104, 76, 84, 42,149, 13,255, 33, 55,145, 0, 16, 41,147,201, 52,115,230,204,249,173,117,235,214, 30,201, -201,201,198,201,147, 39,183,186,119,239, 94, 39, 0, 29, 42, 41,182,154, 18, 4,177, 57, 40, 40,232, 96,120,120,248,158,144,144, - 16, 94,102,102,166,116,223,190,125,110, 91,182,108,137, 98, 24,166, 63,202, 73,180,250,255, 25, 52, 77,219, 37, 38, 38, 74,129, -194,212, 36, 69,194, 10, 6,131, 1, 6,131, 1, 42,149, 10,129,129,129, 31,253,123, 93, 92, 92,130, 9,130, 88, 41,145, 72, 26, -230,231,231,223, 2, 48, 38, 37, 37,229, 94,101,202,106, 52, 26,193,178,108,113, 57,253,252,252,172, 63,104,229, 48,140,199,227, -125,238,237,237,221, 88,171,213,102,199,196,196,220, 52,153, 76, 51,241,241,114,180,217, 2,152,201,231,243, 67,106,213,170,229, -241,252,249,243, 4,189, 94,127, 3,133,201,144,115, 63,134,200,250,228,147, 79, 46,175, 90,181,202,126,244,232,209,151, 47, 93, -186,212,194, 42,182,172,248,111,193,195,195,195, 78,165, 82,173, 7, 16, 76,211,180,139, 64, 32,128, 80, 40, 76,229,243,249,119, -133, 66,225,208, 43, 87,174,228, 84,150,211,100, 50,205,140,141,141,117,105,210,164,201, 34, 39, 39,167,217, 25, 25, 25, 26,189, - 94,127, 38, 59, 59,123, 2, 0,101,121,159,125, 87,139,252,203, 68, 86,201, 87,152, 69, 23,167,168, 98, 44,128,214,111, 41, 48, - 14,199, 61, 46, 46,206, 73, 32, 16,128, 97,152,226,193,236,221,195,124, 93,167,211, 33, 32, 32, 64, 95,193,128,227,145,144,144, -224,196,227,241,138,175,233,116, 58,184,185,185, 49,137,137,137, 78, 69,105, 15,138,161,213,106,225,238,238,254, 79,202,121,244, -149, 92, 46,207,141,143, 79, 8,212,104,245, 63, 13, 31, 59,117, 90,255, 94,159,202,174, 94,189,202,116,232,208, 65,123,225,194, -133,175, 80,152, 56,213,162,206,156, 32,136, 45,147, 39, 79,158, 45, 16,217,216,159,189,250, 88,187,101,223,145,164, 32,159,154, -196,132, 9, 19,168,113,227,198, 93, 12, 14, 14,222,206, 48, 76, 3, 84,194,178, 37,147,201,142,243,249,252, 26, 69,247, 47, 62, - 59, 59,251,179,127,224, 3,201,193,251,193, 99, 75,187, 86, 33, 50, 51, 51,161, 86,171,223, 59,252,252,252, 44,205,149, 89,169, -114,211, 52,125,104,193,130, 5,110,169, 41, 41,248,117,201,146, 38, 40,180,100, 54,177,228,195,233,233,233,239,149,211,215,215, - 23, 86, 84, 10, 83,102,207,158,189,224,203, 47,191,132,201,100,130, 90,173,118,125,241,226,133,255,244,233,211,123,188,124,249, -178, 49,128, 87, 31, 58, 25,247,246,246,142,254,230,155,111,228,141, 27, 55, 70, 81,150, 10,215, 75,151, 46, 53,217,176, 97,195, -192,248,248,120, 95, 0,111, 62,228, 11,228,114,249,246,117,235,214,217,139, 68, 34, 28, 62,124,216,190,109,219,182,151,238,220, -185,211,242, 3,196, 22,105,111,111, 63, 14, 64, 27,134, 97,120, 0,110,100,103,103,207, 69,229,163,186, 43, 36, 18,201,126,146, - 36,107, 2,127, 70,163, 39, 73,210,129, 32,136, 12,243, 53,130, 32,156, 24,134,185,150,149,149,213,204,250, 56,254,187, 97,111, -111, 63, 44, 45, 45,109, 21,159,207,231,202,100, 50,136, 68, 34,112, 56, 28,112, 56,156,106,124, 62,191, 26,159,207,239, 24, 26, - 26, 58,230,220,185,115,229, 70,216,111, 26,228, 60, 24, 36,241, 19, 69,144, 20, 0,144,180,216,198,214,214, 22, 63,253,244,147, -184, 91,183,110, 98, 0,184,124,249,114,248,160, 65,131,218, 38, 38, 38, 6,148, 37,182, 74,211, 34,255, 34,172, 45,111,192, 67, -145,122,188,240, 86,203, 37, 73,240,120, 60, 92,191,126, 29,150, 4, 43, 55,167, 72, 40,183, 55, 40,138, 48,126,239,222,159, 6, - 0,243, 64,195,227,241,112,229,202,219, 65,229,155, 54,109, 90,220,216,255, 46,244,242, 43, 12,242,184,247,235,194,114,133,173, - 44,140,174,189,247,107, 95,180,250, 37, 14,189,198,205,234, 83,160,209, 55, 2,160,202,201,206,206,190,117,224, 64,114,144,143, - 15,119,251,246,237,141,221,220,220,122, 85, 66,104, 77,105,208,160,193,126, 74,104,235, 16, 62,104,112,248, 80, 14,169, 31, 56, -114,226,188,132,148, 12,213,136, 17, 35, 14, 28, 62,124, 56,252,231,159,127,126, 50,105,210,164, 41, 0,126,176,180,252, 2,129, -160,198,211,167, 79,189, 77, 38, 19,252,252,252,254,137,105, 12,130, 80, 24,124,239, 75, 0, 59,139,174,245, 67, 97,228,254, 96, - 0,119, 43, 67,102,182, 96,149,118,124,108,184,185,185,249, 14, 24, 48,192, 33, 43, 35, 3,191, 46, 89, 98,190,220, 16, 21, 44, - 35,154,219,143, 78,167,195, 23, 95,124, 49,192,100, 50,113,204, 34, 80,171,213,234,114,115,115, 53,248,211,177,244, 13,128, 79, - 45, 40,142,167, 88, 44,254, 15,128, 96,181, 90,237, 6, 0, 98,177, 56,137, 97,152,131, 42,149,234, 7,252,153,192,183,210, 19, - 92, 0,254, 40, 59, 21, 20,187, 96,193,130,231, 83,167, 78,125,245, 95,224,172,225,236,236, 60, 63, 44, 44, 12, 71,142, 28,193, -209,163, 71, 13, 66,161,144, 51,104,208, 32, 98,204,152, 49,178,111,190,249,166, 35,128,101, 31,248, 51,119,156, 61,123,182,188, -110,221,186,216,183,111, 31,238,223,191,175,246,246,246, 22,182,110,221, 26, 28, 14, 71, 62,109,218,180, 14, 0, 54,127,200, 23, -100,101,101,205,157, 56,113,226,150,157, 59,119, 74, 99, 98, 98,176,114,229, 74,135, 62,125,250, 92,136,143,143,255,164, 18, 98, -139, 15, 96, 28,128, 80,138,162, 90, 14, 26, 52,200, 56,118,236, 88,154, 36, 73,195,146, 37, 75, 28, 55,108,216,208,135,166,233, -224,204,204, 76, 75, 38,105, 36,128,159,134, 14, 29, 58,228,220,185,115,178,155, 55,111,242,236,237,237, 97, 50,153,138, 45,197, - 12,195, 56,153,159, 89,163,209, 8, 95, 95, 95,247, 18,159, 23,254, 91,133, 6, 73,146,122,134, 97,104, 0, 2, 0,218,138,206, -255,151, 68,150, 92, 46, 31,157,149,149,245,155,139,139, 11,156,157,157,223, 27,107,181, 90, 45, 4, 2, 1,215,197,197,101, 93, -183,110,221,232, 67,135, 14,149,185, 4, 72, 80,196,204,195,187,230,184,201,101, 82, 0,192,210,213, 39, 10, 0,224,143, 63,254, - 64,114,114, 50,100, 50, 25, 2, 2, 2,168, 57,115,230, 40, 38, 76,152,240,107,118,118,246,208,178,184,222,213, 34,255, 50,139, -214,218,210,206,203,245,209, 98, 89,182, 56, 79,158,133, 15,237,187,151, 78,191,195, 71,232,116, 58,188,107,209, 50, 55, 94,154, -166,223, 53, 63,130, 32, 8,182, 60,206, 82, 48, 72, 44, 22, 7,170, 84,170, 21,149,152,221, 22,115,238,253,218, 23, 91,248,147, -251,153, 51,145,118,156, 88,248,186, 5,192,213,215, 67, 87,174,250,228, 19,183,113, 51,150,207, 82,103, 38,103, 76, 27,208,165, -134,183,139,189, 80,156,147,158, 43,175, 83,167,253, 59, 22,153,138,202,217, 42, 60, 60,124,235,201,235,177,132, 64,192,229,114, - 40,138,110, 81,207,199,222,195,150,178,149, 2,182, 9,175,158, 95, 29, 60,120,112,189, 73,147, 38,181,172, 4, 39,138, 6, 92, -108,219,182, 13, 4, 65,144,149,169,251, 71,196,233,242, 68, 22,203,178, 32, 8, 98, 71,137, 65,101, 71,209,181, 59, 37,196, 22, -167,188,251,105,182,166,154, 69,213,160, 65,131, 6, 24,141, 70, 78,137, 78,226, 93, 1, 83,154,136,177,168,238, 10,133,226, 36, -128, 79, 9,130,128, 78,163,209,253,231,151, 95, 74,254,249,246, 59, 34,235,116, 89,109,201, 96, 48,192,100, 50,113,238,220,185, - 67,151,120,214,105, 0, 98, 0, 14, 44,203,130, 36,201, 7, 22,220, 79, 95,145, 72,116, 53, 34, 34,194,166, 97,195,134, 4,143, -199,131,209,104,196,195,135, 15, 61,126,254,249,231,145,167, 79,159,238,160, 82,169,252,240,126,242,116, 75,126, 35,255, 75,151, - 46,169,188,188,188, 74, 21,142, 74,165,146,227,227,227,243, 73, 25,162,232,175,230, 76, 76, 75, 75,235,254,233,167,159,142, 74, - 77, 77,141, 54, 26,141,223, 3, 8,112,112,112,184,211,179,103, 79, 8,133,194, 80,181, 90,189,236, 67,158,121, 39, 39,167,110, -205,154, 53,195,202,149, 43,241,243,207, 63,183, 3,112, 6, 64, 91,165, 82,121,186,107,215,174,176,179,179,235,158,147,147,179, -249, 3,218,145, 79,171, 86,173,214,253,244,211, 79,210, 35, 71,142,192,219,219, 27,121,121,121,248,238,187,239,156,126,252,241, -199,243, 57, 57, 57,173, 75,180,139,178, 56,253,248,124,254,230,157, 59,119, 74,188,188,188,188,184, 92, 46,233,229,229,133,172, -172, 44,104, 52, 26,254,188,121,243,234, 9,133,194,123,203,150, 45,219, 12,160,103, 5,229, 36, 1,204, 93,179,102,205,168, 17, - 35, 70,216, 13, 24, 48,192,164,211,233,176,103,207, 30, 80, 20, 5,154,166, 33, 18,137,138,147, 87,115,185, 92,212,169,243, 94, -144,244,195,229,212, 55, 23,133,126,168,118,168,220,178,235,233,114,248,138,151, 62,104,154,134, 64, 32,128, 64, 32, 0,159,207, -199,211,167, 79,103, 8, 4,130, 37, 4, 65, 24, 45,225, 36,254, 84, 23,129, 0,110, 86,116,142,247, 93, 67,254,206,254,211, 12, -119,130, 32,150, 2, 8, 45, 28,118,201, 11, 14, 14, 14,227,211,210,210,226, 44,229, 84, 40, 20,246,153,153,153,203, 20, 10, 5, -156,157,157,139,199,111, 55, 55, 55, 24, 12, 6,164,165,165,129,101, 89,228,228,228, 64, 36, 18,193,213,213,117,217,136, 17, 35, -246,173, 93,187, 54,179, 84, 78, 6, 63,119,237, 51,125, 38, 69, 81, 36, 0, 80, 28,137,228,155,169, 64,141, 26, 53,208,162, 69, - 11,104, 52, 26,228,230,230,194,223,223,159, 67, 16, 68, 56, 65, 16, 54, 44,203,254, 14,224,236,255,160,161,176, 76,103,248,217, -239,174,139,154,179,197,115,185, 92,139,132, 86,209,251, 43,178,160,144, 6,131, 1, 92, 46,247, 45,139, 4, 65, 16, 48,153, 76, -111, 93, 55, 11,173,170, 8,245, 49, 99,198, 48,235,214,173, 27,149,157,157,189, 26, 85, 92, 74, 8, 15, 15,127,207,223, 99,194, -132, 9,137,233,233,233,236, 23,237, 3,197,209,199,146, 83,106,201, 36, 66, 71,169,180,166, 64, 38,183,203,204,204,188, 86,212, -153, 88,138,218, 13, 26, 52, 16,110, 57,112, 41,113,248,183, 11,230, 52,244,178,183,169,239,238, 32,115,177, 21,242, 36, 36,161, - 18, 24, 13,137,114,185,220,187,178,229, 54,247, 11, 34,145, 8, 36, 73,254,147, 44, 90, 28,179,200,202,202,202,194,145, 35, 71, -208,169, 83,167, 59,102, 17,162, 84, 42,145,146,146, 2,133, 66,113,167,200,242, 81,225, 50, 34,195, 48,208,235,245,208,235,245, -197, 2,166,196, 51, 84, 44, 96,204,239,165, 40,234, 65, 21,203, 62, 71, 38,147,181, 10, 13, 13,229,237,218,179,135,199,178,172, - 10,133, 57,212,242, 89,182,140, 4,217,239,192,104, 52, 22, 91,217,104,154, 70,124,124,124,241,192,101,206, 45, 41, 16, 8, 44, - 51,101,240,249, 19,119,239,222,109,211,184,113, 99, 34, 51, 51, 19, 12,195, 20,119,146,191,253,246,155,160, 87,175, 94,110, 81, - 81, 81,211,180, 90,237,236, 42,212,149, 40, 75, 16, 1,128,141,141,141, 17,150, 69,204,174,144,211,104, 52, 18,205,155, 55,159, -148,145,145, 81, 79,173, 86,207,179,228, 54, 2, 56,156,152,152, 88,114, 96,191, 23, 29, 29,173,238,221,187,183,176,102,205,154, - 33,143, 31, 63,254,160,135,212,199,199,167, 41, 77,211,184,113,227,134, 22,128,121,102,125,225,254,253,251,218,158, 61,123,242, - 61, 60, 60,154,230,228, 88,236,178,226,227,235,235,123,202,201,201, 73,104,238, 67, 29, 29, 29,233,181,107,215, 74,147,146,146, -160,215,235, 49,101,202, 20,116,238,220, 25, 14, 14, 14,152, 48, 97,130,243,162, 69,139,182,231,231,231, 55, 40,207,104,205,227, -241,182,190,120,241,194, 91,161, 80, 8,175, 95,191,142,250,245,235, 35, 35, 35, 3,169,169,169,200,207,207, 71,106,106, 42,134, - 14, 29,234,244,235,175,191,186, 90, 96,201, 42, 22, 89,107,215,174,205,217,191,127, 63,181,126,253,122, 41, 77,211,197, 66,139, -195,225, 20, 11, 45,115,110,197, 42,172, 52,228, 20,137, 54,187,220,220,220, 15,241,115,227, 3,224,149, 20, 89,124, 62, 31,124, - 62, 31, 2,129,224,131,242,178,254, 75,224, 70, 16,196, 99, 46,151,203, 23,137, 68, 92,146, 36,193,231,243,219,203,229,242, 71, - 1, 1, 1, 1,167, 78,157,138,181,132, 68,163,209,108,229,243,249,180,147,147, 19, 0,192,219,219, 27,245,235,215,135, 74,165, - 98,114,115,115, 97,103,103, 71,198,197,197, 65,173, 86, 35, 37, 37, 5,213,171, 87,167, 73,146,220,138, 66, 63,228,247,112,245, - 78,234,106, 0,171,205,231, 14, 14, 14,105, 37, 45,157, 2,129, 0,110,110,110, 72, 74, 74,130, 84, 42,165,126,252,241,199,158, -123,246,236,233,113,245,234,213,112, 0,219, 74, 80,205,254, 23,251,104,153, 69, 86,201,215, 63,133, 86,231,206,157,103, 69, 70, - 70,126, 82,218, 44,156,166,233,143,230,235, 98, 22, 84, 54, 54, 54,239, 90,173,192, 48, 76, 89, 22,173, 74,127,143, 64, 32, 16, -142, 30, 61, 58,239,247,223,127,175,180,216, 10, 91, 25, 93,108,197,122,111, 26,233,231,119,117,218,180,105,221,206,157, 59,151, -212,208,171, 38, 71,156, 28,151, 47,176,177,179,131,123,181, 78,131,186,247,188,143,194,221,135,150,226, 69, 94, 94,158,176,150, -187, 72, 71,146, 26,162, 26,159, 35, 85,136,185,124, 23,153,204,141,171,211,166,219,200,100, 60,173, 86,155,131,114,146, 64, 3, -128,179,179,243, 9,161, 80, 88,221,124, 46,147,201,108, 89,150,133, 72, 36,130, 66,161,144, 80, 20,245,172, 68,227,138, 75, 75, - 75,107, 95, 81,193,236,236,236, 78,240,249,252,234, 36, 73,130, 32, 8, 80, 20, 5,146, 36, 65,146,100,241,255, 41,138, 2, 65, - 16, 40, 40, 40,136,139,141,141,109,111, 65,125,141, 0,130, 9,130,184,115,228,200, 17,132,132,132,224,216,177, 99,248,252,243, -207,145,155,155,139,135, 15, 31,162, 85,171, 86, 64,225,146,162, 69, 40,233,252,110,158, 20, 60,125,250,180, 88,184,148, 60,164, - 82,233,135,152,216, 47,135,133,133, 97,221,186,117,108,209,100, 66, 76, 16, 68,125, 91, 91,219,167, 79,158, 60,177,200, 15,134, -101, 89,232,245,127,190,213, 60,120, 21,249, 67, 84, 42, 57, 48, 69, 81,237, 27, 52,104, 64,228,230,230,154, 5, 36, 56, 28, 14, - 40,138, 2, 69, 81, 88,181,106,149,176,113,227,198,211,249,124,254, 36, 46,151,171, 52, 24, 12,187, 52, 26,205, 60, 0, 57,255, -164, 30,169,101,203,150,223, 38, 36, 36,116,174, 94,189,122,196, 7,208,176, 6,131, 65, 7, 64, 72, 81, 20,253, 17,250, 40,170, -232,217,210,148, 16,251,198,162,115, 62, 10,151,137, 45,130,131,131,195,246,163, 71,143,186, 87,175, 94, 29, 6,131, 1, 70,163, - 17,249,249,249,184,112,225, 2,180, 90, 45,140, 70, 35,188,189,189, 49,115,230, 76,205,248,241,227, 5,107,214,172, 73,207,207, -207,239, 95, 1,237,248,125,251,246,137, 21, 10,133, 80,173, 86,227,213,171, 87,104,208,160, 1,242,242,242,160, 82,169, 80, 80, - 80, 0,189, 94, 15,165, 82,105,103, 50,153,116, 21,112,205, 40, 41,178, 70,142, 28,249,128,199,227, 53, 24, 59,118, 44, 18, 19, - 19,139,219,252,240,225,195,225,236,236, 92,220,150,138,250,228, 74,117,204, 28, 14, 7,124, 62, 31, 92, 46, 55,167, 90,181,106, - 32, 8, 66, 16, 23, 23, 87,149,165, 56, 27, 0, 74,154,166,121, 37, 5, 22,159,207,199,141, 27, 55,166,241,120,188,178,172, 89, -101,181, 75,182, 50,231,255,109, 16, 4,177,148,203,229,242,229,114, 57,183,196,132,147, 43,145, 72,224,228,228,180, 18, 64, 71, - 11,235, 29, 36,151,203,139,251,247,192,192, 64, 36, 36, 36, 28,204,205,205, 29,152,158,158, 14,146, 36,183,146, 36,217,195, 60, - 73,205,206,206,134,135,135, 71, 80, 89,124,205,130, 93, 70,129, 96,223,178,104,189, 51, 65,131,141,141, 13, 94,191,126, 13,149, - 74,197, 62,127,254,156, 24, 61,122, 52,161,211,233, 54, 69, 69, 69, 93, 67,225,110,251, 50,181,200,191, 4,149,247,209, 50, 91, -180, 44, 29, 0, 8,130,168,112, 54, 97, 48, 24, 36,254,254,254,165, 57,124, 17,165, 9,173,162,229,164, 42, 61,232, 52, 77, 75, -171, 42,182,222, 69,196,254,157,206, 63,207,156, 50, 83,238, 90,179,214,164, 73, 51, 56, 93,186,116,185,190,101,203, 22,147,188, -110,199,182,103, 79,108,115, 94,246,221,228, 99, 71,143, 30, 5, 10, 29,163, 45,197,229,200,200, 72,151, 9,227,198, 96,230,196, -241,199,109,188, 29,120, 18, 66, 46, 22,104, 85,111, 36, 96,213,252,218,190,157, 15, 68, 68,164, 0,136, 42,143, 68, 36, 18, 85, -127,252,248,177,119,201,141, 4,186,255,107,239,186,195,163,168,214,247, 59, 51,219, 75, 54,189, 18, 72, 0,129, 0,161,133,222, -171,128,128, 98,161, 92,165, 94, 48,136,120,189,160, 87,208, 31,122,197, 72, 17,132, 11, 10, 82,114, 65, 41, 98,161, 73, 19,144, - 98, 66, 34, 61, 1, 9, 73, 8, 69, 72,111,155,205,214,108,182,204,236,252,254,200,238,186, 9, 41,187, 97, 67,241,238,251, 60, -243,100,103,103,246,205,153, 51,167,188,231, 59,223,249,142,209, 8,177, 88,140, 51,103,206, 4,138, 68,162, 64, 0,208,235,245, -232,212,169,147,179, 22,147,136,172,172,172,182, 94, 94, 94,168,168,168,128,193, 96,128,217,108,134,197, 98, 1, 65, 16,224,114, -185,224,243,249,144, 72, 36,174,174,236,187, 10,224,181,177, 99,199,238, 62,118,236, 24,162,163,163, 81, 94, 94,142,204,204, 76, -155,200,114,201, 71,203,102, 37,114,244,199,226,112, 56,248,182,117,107,188, 94, 80, 96, 23, 48,235,188,189,241,111, 75,227,118, -211,232,212,169, 19,155,156,156,140,227,199,143,227,133, 23, 94, 32, 14, 30, 60,104, 98, 24,134, 87, 80, 80,112,189,160,160,192, - 41, 14,139,197, 98, 79,171,173,221,118, 20, 88,174, 10, 45,154,166,189,248,124, 62, 42, 43, 43, 97,179, 60, 56, 30,173, 90,181, -130, 66,161,224,168,213,106, 78, 65, 65,129,120,233,210,165,255, 72, 72, 72, 8,213,104, 52,175, 62,206, 86,104,211,166, 77, 17, -175,191,254,122, 14,135,195, 97, 71,143, 30, 61, 53, 59, 59,251,197,208,208,208,211,191,254,250,235, 26, 0,237, 92,229, 11, 8, - 8,184,194,225,112,194,213,106, 53,111,207,158, 61,102,141, 70,195, 11, 12, 12, 44,182,181, 29,182,188, 54,155,205, 78,173, 92, - 14, 8, 8,184, 34,151,203,121,235,215,175, 55,151,149,149,241,130,131,131,139,109, 60, 74,165,146,183,103,207, 30,179, 90,173, -230,121,123,123, 95, 81,169, 84, 13,242,201,229,242, 41,211,167, 79, 79, 58,125,250,116, 0, 69, 81,200,206,206, 70, 89, 89, 25, -124,124,124,176,115,231, 78, 68, 68, 68, 96,239,222,189, 10,133, 66, 49,251,243,207, 63,255,208, 42,178, 26,242,209, 26,212,187, -119,239, 8,165, 82, 9, 31, 31, 31,232,116, 58, 92,185,114, 5, 29, 59,118, 68, 65, 65, 1, 72,146,132,143,143, 15, 54,110,220, - 88, 65, 16,132,162, 62, 34,145, 72,244, 98,108,108,172, 15, 0,196,198,198,250,196,198,198,214,218,193,245,237,219, 23, 27, 54, -108,168, 41,180, 92, 25, 24,216,173, 78, 14,226,168,178, 79,159, 62, 72, 72, 72, 88,232,162, 56, 50,218, 68, 91, 77,107,150, 64, - 32,112,121, 49,141,197, 98,225,161,202,165,129,112,230,252, 9,192, 96,145, 72,196,171,249,101, 69, 69, 5, 47, 52, 52,116,160, - 11,194,215, 95, 36,170, 50, 56, 69, 68, 68, 64,165, 82, 49, 70,163,113,242,174, 93,187,204, 0, 16, 19, 19, 51,153, 97,152, 74, -154,166, 41, 62,159, 15,157, 78,135,160,160, 32,255,122,108,163,139, 14,125,191, 52,164,166,143, 86,104,104, 40, 98, 98, 98, 96, - 48, 24, 80, 88, 88,136,196,196, 68, 51,195, 48,187, 55,109,218,100, 9, 12, 12,252,251, 43,175,188, 66,165,164,164,188, 5, 96, - 65, 93, 90,228, 41,179,102,197,215, 41,180,172, 10, 50, 1,192,144,154, 15, 89, 83,252,212, 39,180, 26,154, 58,228,243,249,202, -156,156, 28,137, 99,167, 66,211, 52,194,194,194, 44, 44,203, 18,181, 9,173,135, 49, 5,115,185, 92,175, 15, 62,248, 64,185,105, -211,166, 41,247,238,221, 91,226,204,111,246,188,213, 30, 59,106,136,172,205, 43,227, 54,172, 95,185,212,239,206,241,111,176,245, -203,213, 12,195, 32,165,115,231,206, 3,181, 90, 45,199, 91, 98,134, 92,137, 99, 86,145,229,172, 40, 36, 1,124,125,233,210,165, -148, 49, 99,198,252,246,245, 15,251,253, 10,238,222, 61, 47, 80,203, 11,101,109,218,114,120,205, 34, 94,210, 84, 86,242, 38, 79, -158, 28, 8,224,149,134, 26, 49,165, 82,137,162,162,162,154, 2, 12, 55,111,222,124,224, 94,167, 18, 71,146, 96, 24, 6,251,246, -237,131, 88, 44,134, 68, 34,169,118,216, 68, 86, 35, 23, 42,100, 1,192,232,209,163,161, 80, 40, 32,149, 74,157, 78, 87, 77,241, -194,178, 44,140, 70, 35,140, 70, 35, 76, 38, 19, 3,128,203,225,112, 48, 43, 47,207,110,229,113, 69,192,212, 68,231,206,157,217, -115,231,206,225,183,223,126,131, 78,167,195,250,245,235, 17, 26, 26, 58, 12,192, 71,174,114, 57, 56,233, 51,106,181,154,171, 86, -171,237,214, 65, 46,151,107,183, 30, 56,105,201,227,113, 56, 28,251,104,212,118, 56, 90,181, 40,138, 66,112,112, 48, 66, 66, 66, -176,121,243,102, 94,203,150, 45,199, 61,206, 22,104,213,170, 85,109,214,173, 91,183,109,199,142, 29,199,166, 76,153,242, 99, 90, - 90,218, 76,111,111,239,235,103,206,156, 89, 42, 16, 8, 44,141,172,223,225, 5, 5, 5, 65,142, 95, 89, 44, 22, 49, 77,211,118, - 97, 91, 81, 81,225,244, 0,131,203,229,134,167,167,167,139, 1, 96,233,210,165, 92, 0, 98,155, 51,184,141,179,162,162,130,219, -177, 99,199,112,103,203,122, 82, 82,210,192, 17, 35, 70,156, 59,121,242,164,111, 68, 68, 4,242,243,243,145,159,159,143, 54,109, -218, 96,249,242,229, 58,181, 90,221, 31, 64,150, 86,171, 61,232, 36,103,152,175,175, 47, 55, 39, 39, 7, 52, 77,163, 91,183,110, -216,184,113, 35, 38, 79,158,140, 78,157, 58, 65,173, 86, 35, 61, 61, 29,219,183,111,247,229,241,120,245,182, 29,122,189,254, 96, -124,124,124,243,154, 22,173,169, 83,167, 74,138,139,139,237,101, 50, 46, 46,174,218, 20,162, 43,109,178,117,106,171,206,163, 49, -160,105, 90, 38, 20, 10,213, 2,129,128,111,243,207, 74, 76, 76,116,217,154, 85, 99, 0,232,202,249, 99,131, 77,180,214,210,183, - 34, 36, 36,196,105, 30,129, 64, 64,216,218, 70,154,166,161, 82,169,152,208,208, 80,251,244,126,106,106, 42, 19, 25, 25,201, 80, - 20, 69,241,249,124, 16, 4, 1,177, 88, 92,103,131,207, 50,108,220,243,147, 63,170,182,234,112,254, 7,128,201,100, 66,106,106, - 42, 76, 38, 19, 18, 19, 19,205,159,127,254,121,129, 82,169,156, 15,128,115,226,196,137,233, 11, 23, 46,164,130,130,130, 70,148, -148,148,160, 33, 45,242, 20,137,173, 7,172, 92,182, 94, 40, 97,220,184,113,132,117,105, 37, 97, 19, 78,174, 8, 45,107,229,107, -176,231, 37, 8, 2,133,133,133,246,243,160,160, 32,151,255,151,179,240,247,247,215,245,237,219,215, 75, 46,151, 31, 92,181,106, - 85,163, 44, 89,155, 87,198,109, 88,241,233,199,126,138,140, 11,200, 43, 40,132,162,196,156,146,124,253,222, 1, 0, 7, 0, 0, - 91, 58, 36, 16,111,100,126,229, 44,103,251, 0, 81, 87, 46,143,115,224,217, 49,227,154, 79,138, 93, 64,190,249,230,155, 3,166, - 79,159,174,154, 50,101,202,219, 82,169,180,157,201,100, 42,223,127,244,232,253, 73,147, 38,181,100, 24,102, 58, 26,136, 57,162, -215,235,179,135, 12, 25,226,152,159,178, 83,167, 78, 5,223,191,127, 31,243,230,205, 43,205,207,207, 87, 58,222,235, 76, 26, 77, - 38, 83,118,215,174, 93,235,156, 46,180, 77, 41, 2,128, 70,163,201,118, 33, 75, 95,133,213,241,189,172,172, 12, 55,111,222, 4, -135,195, 65,159, 62,125,144,156,156,140, 1, 3, 6,164,186, 98,213,170,172,172, 68, 68, 68, 4, 42, 43, 43,161,211,233, 42, 0, - 8,118,182,108, 9, 0,120,171,172, 12, 87, 62,255, 28, 23, 86,172,128, 99,121,118, 22, 93,186,116, 97, 47, 92,184,128,235,215, -175,195, 96, 48, 96,246,236,217, 0, 64, 88,203,174, 43, 33, 51, 90, 83, 20, 53,122,204,152, 49, 97, 0,160,211,233,136, 75,151, - 46, 65, 40, 20,218,235,194,225,195,135,145,159,159, 15,130, 32,224,235,235, 27, 94, 94, 94,222, 18,192,189,122,204,254,196,189, -123,247,240,217,103,159,193, 98,177, 96,225,194,133,104,219,182,173, 93, 96,101,103,103, 99,233,210,165, 96, 24, 6, 31,127,252, - 49,218,180,105, 3,179,217, 44, 68, 35, 67,104,184, 3,239,188,243,206,157, 3, 7, 14, 28,203,205,205,125,110,229,202,149,131, - 9,130,176,188,247,222,123,159,201,100, 50,230, 97,120,203, 85, 26,220,188,157,109, 23, 66, 53,143,192, 0, 63,151,249,110,221, -205,181,255,158, 97, 28,249, 24,248,251,249,186,154,196, 10,179,217,172,123,233,165,151,124,246,237,219, 71,180,105,211, 6,127, -252,241,135,205, 50, 84, 1,215, 67, 58,228, 43, 20,138,182, 20, 69,241,110,223,190,141,200,200, 72,244,238,221, 27,203,150, 45, -131, 92, 46, 7, 77,211, 8, 10, 10,178,152,205,230, 84,147,201,116,182, 1,174,184, 57,115,230,240, 0,188, 97,181,108,117,158, - 63,127,190,101,245,234,213, 72, 77, 77,181, 91,176, 28,157,225, 93,157, 58,116,180, 58, 57, 30,137,137,137, 11,249,124, 62, 11, -224, 34, 92, 15,244,108,172,105,209,106,140, 53,171,169,208,148, 43, 25, 67, 67, 67, 19,189,188,188,198,149,151,151, 87,179,106, -245,239,223,223, 20, 28, 28,156,228, 44,143, 84, 42, 45,167, 40,202, 31, 0,242,243,243, 33,145, 72,120,119,239,222, 93,129,170, -224,217,104,217,178,229, 10,133, 66,193,107,105,109, 79, 67, 66, 66, 96, 52, 26,235,116, 99, 57,127,181,248, 27, 0,223,216,206, -253,252,252, 10, 85, 42,149,104,245,234,213,218, 21, 43, 86,232, 25,134, 49, 0, 56,163, 84, 42,237,113,180,138,138,138, 84, 92, - 46,215,207,199,199,167,153, 77,104,213,166, 69,158, 50,212,109,209,178, 42, 73,182,166, 32, 34, 8,226, 1, 7,245, 6,132, 86, -131, 34,139, 97,152,106, 86, 6,155,195,123,109,255,203,218,169, 55,106,234,208, 42,178,132,251,247,239,223,185,106,213,170,139, -206,254,206,209, 71,107,203,154, 79, 87,218, 68,214,239,191,157,196,193, 76,149,124,225,138,181,235, 26,251, 6, 58, 4,136,187, - 4, 7,251, 39,124,190, 60, 78,118,231,248,118,252,184,229, 63,236,239,151, 47,247,186,124,249,242,180,121,243,230,181,176, 22, - 44, 5,128,107, 0, 38,193,137, 85, 58,249,249,249,163,106,116,194, 89, 60, 30, 47, 88, 44, 22, 35, 63, 63, 95,123,235,214, 45, -151,167,100,228,114,249,168, 38, 40,128, 28,155,200,146,203,229, 72, 79, 79,199,208,161, 67, 1, 0,201,201,201,232,223,191, 63, - 82, 82, 82,208,189,123,247, 84, 0, 61,209, 64,160, 86,179,217,172,236,208,161,131,221,186,165, 82,169, 44, 0, 16, 91, 88,136, -248,208, 80,112, 56, 28, 92, 88,177, 2,139,205,102, 44,115, 81,192,119,237,218,149,189,116,233, 18,238,223,191, 15,154,166, 49, -126,252,120, 52,178,210,119,106,223,190,253,169, 51,103,206, 4, 74,165, 82,232,116, 58,104,181, 90,204,152, 49, 3,147, 39, 79, -134,193, 96,192,158, 61,123,112,232,208, 33,120,121,121, 65,167,211, 65,167,211,249,142, 29, 59,246, 92, 86, 86,214, 32, 0,183, -235, 16, 90,236,168, 81,163,144,148,148, 4,138,162,208,171, 87, 47,148,149,253,185, 24, 40, 56, 56,184,182,107,212,227, 20, 90, - 28, 14,135, 77, 76, 76, 92, 57,120,240, 96,228,230,230, 62,215,189,123,247,245, 51,103,206,204,127, 88, 94, 95,111, 47,116,237, -216, 26, 6,131, 1, 6,131, 1, 97, 97, 97,208,104, 52,184,115,231, 14, 12, 6, 3,130,131,124, 92,230,139,233,212,198,206, 23, - 20, 20, 4,157, 78,135,123,247,238,193,104, 52, 34, 32,192, 37,161,213,124,212,168, 81,191,238,222,189,219,127,251,246,237,198, - 33, 67,134,240,215,175, 95, 79,200,100, 50, 56,116, 44,174, 34, 49, 57, 57, 57, 98,196,136, 17, 81, 25, 25, 25, 72, 76, 76,132, -209,104, 68, 76, 76, 12,110,221,186,133,190,125,251, 66,171,213, 94,188,124,249,242, 33,103, 12,195, 0, 62,156, 51,103, 14,108, - 98, 43, 41, 41, 9,133,133,133,240,242,242,122, 64,104,217,124, 31,173,171,198,195,156, 73,172, 77, 16, 57, 88,158, 22,251,248, -248,152, 0,172,107,164,245, 9, 0,144,155,155, 43,232,220,185,179, 65, 40, 20,242,173,162,109,237,195,240,185, 19,110, 88,201, - 88, 39, 66, 66, 66,230, 7, 4, 4,140,104,213,170, 21,138,139,139,121,124, 62, 31,253,251,247, 55,245,236,217,211, 20, 18, 18, -242,150,179, 60, 2,129, 32,131,199,227, 13,170, 26, 76, 48,200,201,201, 1,203,178, 11, 59,117,234,244, 79,141, 70,131,178,178, - 50,190, 76, 38,179, 15,170,163,162,162, 96, 48, 24, 50, 92,176,188,197, 69, 70, 70,126,200,227,241,150,201,229,242,218,194, 66, -240,125,124,124,100, 60, 30, 15, 38,147,169,154,216,172,169, 69,158,118,145, 85, 77,104, 57,168,200,106, 66,199, 21,139,150, 51, - 86, 3,155,131,189,227,185, 77,212,213,252, 95,141,141,161,229,237,237,109,176,137,172,101,203,150, 93,108, 12,199,222,221,187, - 66,189, 45, 21,205, 11, 46,254,140,172,235, 41, 56,144,174,148, 47, 92,177,246,237,231, 95,121,181,184,166, 48,115, 6,109, 3, -197,157,130,131,252, 19,214,172, 90, 33, 83,100, 92, 64, 97, 81, 17,126,190,120, 57,197, 4,164, 3, 88,232, 78,211, 50, 80, 53, -117, 72, 81,212,147, 84, 96,237,206,240,133,133,133, 54,145, 21, 3, 0, 3, 6, 12, 72,181,138, 44, 56,107,209, 82, 42,149, 53, -183,172, 25, 1, 32,192,246,252, 28, 14, 7,253, 63,252,208,101,145, 5,128, 77, 73, 73,129, 66,161,176,141, 20, 27, 43,178, 16, - 18, 18,242,175, 51,103,206, 4,126,253,245,215,234, 29, 59,118,148, 89, 44, 22,110,215,174, 93,195,123,244,232, 65,236,220,185, - 19, 0, 48,105,210, 36, 44, 92,184, 16, 55,110,220,128, 68, 34,193,128, 1, 3,152, 37, 75,150, 4,205,159, 63,255,173,226,226, -226,183,107,237, 29, 45, 22,158, 80, 40, 60, 13, 96, 88, 70, 70, 6, 0,156, 67,213, 22, 78, 54, 43, 66,157,215,156,233,124, 53, - 26, 13,215,203,203,171,214,208, 16,188,170,209,144,171, 22, 8, 59,231,111,191,253,246,217,154, 53,107, 14,188,251,238,187,183, - 31,146,179, 86,139,214,184,113,227,160, 55,152,144, 87,172, 2,195,208,208,155, 74, 92,230,115,180,104,141, 27, 55, 14, 21,149, - 70,228, 20, 42, 64,211, 12, 52,122,167,251,114,241,179,207, 62,123,226,251,239,191, 15, 57,127,254, 60, 24,134,177,220,186,117, -235,222, 75, 47,189, 36,123,239,189,247,252, 31, 98,145,209,151,175,190,250,234,132,223,126,251, 77, 17, 21, 21,229,119,241,226, - 69,148,148,148,128,166,105, 12, 27, 54, 12,124, 62, 63,103,197,138, 21, 60, 0, 95, 58,251,110,172, 98,203,116,249,242,229,215, - 47, 92,184,224,231,231,231,199,183,180,111,143,194,147, 39,177,111,223,190, 7,126,176,101,203, 22,192,201, 40,252, 54,139,211, -165, 75,151,220, 34,176,170,245,212,124,126,163,167, 31,159, 86, 92,186,116, 41,255,205, 55,223,236, 40,147,201,214, 13, 28, 56, -112,168,191,191, 63,233,235,235,155,216,172, 89,179,127,118,237,218,213,233,217, 5, 46,151, 59, 83, 34,145,220,161,105,154,210, -106,181,208,233,116, 85,141, 52, 77,243, 73,146, 68,203,150, 45,237,125, 73,175, 94,189, 16, 18, 18,194,100,102,102,206,116,150, -191,180,180,180,218, 42,196, 90, 48,167,127,255,254, 28,131,193,128,251,247,239, 39, 59, 94,168, 77,139, 60, 37,136,173, 87,124, -217, 30,202,241,225,154, 53,107,150,107, 54,155,217,116,128,189,118,237, 26, 27, 27, 27, 91,239, 81, 89, 89,201, 6, 5, 5, 21, -214,210,249,193,145,211, 96, 48, 84,251,157,193, 96, 96,131,131,131, 25,189, 94,255, 0,167, 94,175,103,195,195,195,243,235,227, -172, 5, 51,174, 94,189,186,105,241,226,197,189, 93,200, 32, 59, 39,187,185, 61,187,125,251,246,191,177, 44, 59,120, 96,199,136, -235, 19,187, 6,179,253,219, 6, 21, 28,218,187,123, 50,203,178,131,107, 30,182, 0,167,245,113,182, 15,150,116, 24, 30,221,162, -252,247,227,223,177,103, 86,255,131, 93, 51,190, 45,219, 61,220, 75,217, 62, 64,228,234, 30, 49, 13,238,150, 30, 29, 29,157,101, -177, 88, 88,163,209,200, 70, 71, 71,223,114, 7,103, 35, 80, 31,103, 55, 84,249,178,189, 90,203,119,221, 30, 34,157,191,179, 44, -203, 42, 20, 10, 86,171,213,178, 6,131,129,101, 24,134,117, 4,128,223,157, 92,118,192,127, 0, 0, 32, 0, 73, 68, 65, 84,224, -100, 77, 38, 19, 91, 94, 94,206,194,121,159,187, 90, 57, 67, 67, 67,239,221,189,123,151,125,230,153,103,114,173,230,248,249, 58, -157,142,173, 9,157, 78,199, 14, 29, 58,148,189,117,235, 22, 27, 25, 25, 89,121,235,214, 45, 54, 52, 52,244,102, 3,233,108,213, -188,121,243,211, 1, 1, 1,137, 0,218,186,112,173,222,252,220,179,103, 79,107,150,101,103,179, 44, 27, 91,199, 49,155,101,217, -246,143,155,211,154,191,197, 44,203,178, 21, 21, 21,172, 66,161, 96, 11, 10, 10,216,138,138, 10, 86,171,213,178, 87,175, 94,101, -207,159, 63,207, 94,191,126,157,245,243,243, 43,118,134,211,198,103, 52, 26, 89,181, 90,205,150,148,148,176,122,189,158,213,233, -116,108, 90, 90, 26,123,229,202, 21, 54, 35, 35,163, 54,190, 7, 56,253,253,253,183, 20, 21, 21,105,207,157, 59, 87,177,121,243, -230,138,144,144,144, 12, 0, 17, 0,218,249,250,250, 22,253,227, 31,255, 96,165, 82,105,118, 35,235, 81, 71, 46,151,123,117,229, -202,149,151,142, 28, 57, 82,124,232,208, 33,227,182,109,219,242,230,205,155,119,150,195,225, 92, 5,208,177,145,245, 40,200,199, -199,231,220,197,139, 23,233,242,242,114, 86,169, 84,178,106,181,154,213,233,116,172, 94,175,103,141, 70, 35,107, 54,155,217,179, -103,207,178,193,193,193,142,211,146,139,234, 25, 88, 47, 96, 89,246, 95, 44,203,114,220,221,214, 57,112, 15,116, 23,167, 59,218, - 58,146, 36, 77,214,182,163, 79,213,105,253,231,143, 43,157,195,135, 15,255,120,242,228,201,236,232,209,163,217,152,152,152, 7, -142,238,221,187,179,115,231,206,101,143, 28, 57,194,126,254,249,231, 31,187, 33,157, 28, 84, 45,122, 89, 62,124,248,112,115, 82, - 82, 18, 59,105,210, 36, 22,192,168,250,180,200, 95, 65,112,217,194, 59, 16,142,127, 1,192,100, 50,229,102,101,101,133, 70,209, - 52, 5, 0, 95,125,245,213, 3,150, 41, 71, 36, 37, 37,209, 4, 65,220,169,239,191,155, 76,166,220, 51,103,206, 4,111,216,176, -129,235, 96, 2, 6, 77,211,150,130,130, 2,114,253,250,245,213,238, 79, 72, 72,160,105,154,206,113,241, 33,183,119,235,214,109, -187, 59,114,235,236,141,251,255, 60,241,243, 79, 1,125,122, 15, 84,202,252,252,106, 29,133,237,121,171, 61,136, 55,234,183,106, - 17, 28,114,217,202,229,113, 62,182, 41,200, 31, 82,139,148,149, 6,102,104,166, 92,255,187,187,223,176, 86,171,189,111, 91, 9, -168,211,233,114,158,192, 66,120, 21, 85, 49,174,232, 26,223,245,196, 67, 58,157, 90, 44, 22,120,123,123,219,173,161,141,176,136, -178, 54, 11,171,237,213, 61, 76,122, 88,150,253, 45, 45, 45, 45,114,198,140, 25, 94, 59,118,236,184,203, 48, 12,119,214,172, 89, -166,144,144, 16, 94,114,114,178, 25, 0, 49,120,240, 96, 78, 81, 81, 17,155,159,159,175,120,225,133, 23, 52,175,191,254,186,255, -181,107,215,248, 22,139,165,161,160,133,127,228,230,230, 14,111,196,181,122, 49,113,226,196,187,120,248,109,108,154,156,211, 6, -133, 82,141,187,247,243,173, 17,204, 45, 96,178,139,237,126, 85,102, 51, 13,133,186,204,101,139,214,157,123,249,214, 45,198, 24, - 48, 76,129,149,175,202, 33,158, 45,175,104,184, 55,225,112, 6, 44, 89,178,100, 12, 73,146,228,133, 11, 23, 12,171, 86,173,202, - 45, 45, 45, 29, 15, 32, 7, 0,202,203,203,135,108,223,190,253, 91, 39, 66, 57,212,133,116,179,217,220,119,209,162, 69,111, 3, - 24, 0,160,133,149, 59,217,106,201,106,108, 4,243, 18,165, 82, 57,114,204,152, 49, 39, 41,138,106,233, 80,143, 2, 0,200,109, -245,130,101,217,160,226,226,226,231,156, 33, 36, 8, 98,109, 83, 53, 36, 77,201,253,144,237,208, 83,177,146,241,244,233,211,159, -140, 31, 63,158, 19, 17, 17,241,127, 17, 17, 17,100,121,121, 57,180, 90, 45, 72,146, 68, 72, 72, 8,162,163,163, 17, 18, 18, 98, -201,200,200, 88,254,254,251,239, 55, 24,147,175, 67,135, 14,173,205,102,243, 51, 36, 73,182, 6,208,154,101,217,214, 4, 65,180, - 6,224, 7, 0, 50,153, 76, 22, 25, 25,201,233,211,167, 15,122,247,238,141,132,132, 4,236,221,187,247, 27, 0, 39, 28,173, 89, - 53,181,200,147,128,244,110, 96, 59, 94, 5,113,163, 59, 6, 19, 22, 36,176, 36,134, 68,167,216,227,236,213, 20, 89,117,111, 42, - 93,139,233,111,212,176, 97,195,236, 21,206,137, 78,229,126, 67,149,175,180,180,116,212,204,153, 51,171,113, 50, 12, 99, 40, 43, - 43,123,179, 95,191,126, 27, 41,138, 18,212, 40,176,217, 37, 37, 37,143,116,175,190,154,113,180, 70,141,121, 81,254,176,156, 82, - 30,249, 76,214,209,255,162,184, 68,142, 31, 82,139,202, 53, 70,102,200, 45,121, 69, 90, 83,164, 63, 59, 59,123,244, 83,160,248, -107, 19,173, 15,187,121,118,169, 19, 1, 73, 27,218,163,142,176,134, 19,113, 75, 37, 47, 42, 42, 90,253,225,135, 31,142, 92,190, -124,121,224,177, 99,199,100,182, 1,202,203, 47,191, 92,146,150,150, 54, 16,128,160,178,178,242,212,242,229,203, 3,227,226,226, -252, 1,248, 3,192,216,177, 99,139,139,139,139, 55,192,131,122, 97, 54,155,243,162, 59, 68,217, 7,126,142, 33, 29, 28, 63,211, - 52,157,231, 10, 95,109, 60,142,231, 12,195,212,203, 71, 81,212,187,189,123,247,166,222,125,247,221,226, 99,199,142,217, 54,210, -117, 84,104, 89, 13, 4, 37,117, 6, 6, 0,171,172,135, 59,161, 83, 40, 20,125, 93,252, 13,227, 41,141,181, 14, 40, 93, 57,127, - 44, 56,120,240,224, 71,147, 38, 77,218,238,231,231,183,171,117,235,214, 81,193,193,193, 50,145, 72, 4,131,193,160, 49, 26,141, - 55,179,178,178,166,124,244,209, 71,127, 56,101,225,216,190,157, 2,192,179, 88, 44, 66,146, 36, 37, 0,100, 4, 65,248,218,132, - 22, 65, 16, 48,153, 76,184,127,255, 62, 22, 47, 94,204,156, 62,125,250,115, 0, 31,187, 48,112,237, 9, 32,208,161, 29, 15, 4, - 96, 68, 85, 0,219, 82,130, 32, 46, 55,117,126, 17, 22, 36,116,188, 10, 34,189, 27,106,235, 39,234,223, 84,186,174, 10, 87, 90, - 90,218,215,221,149,184, 46,206,210,210,210,136, 39,165,134, 76, 55,172,250, 14, 91, 86, 85,219,231,208, 38,194,106, 59,111, 8, - 42, 61, 61,239,203, 19, 55, 86, 27,104,214, 98,162, 45,127,191, 85, 90,145,238,105,135,220,142,103,221, 85,151,220,152,166,180, -204,204,204,126,243,230,205,251, 72, 44, 22,247, 2,128,138,138,138, 11, 5, 5, 5,159,194,186,170,176,161,235, 30,212, 13,185, - 92,222,227, 73,228, 51, 26,141,255,236,215,175,223, 23, 12,195,172,161,105, 58,249,127,224, 85, 84,122, 74,227,211,139, 31,127, -252,241, 15, 0,125, 1, 96,194,132, 9, 20, 0,236,221,187,215,101,241, 60, 99,198, 12,134,101, 89,147,181, 60,232, 80,181,186, -176,220,214,166,234,116,186,242,130,130,130, 12,134, 97, 50, 0,124, 11,215, 87,220, 6, 18, 4,113,132,101,217,113, 86,225,118, -132,101,217,113,142,223, 53,181, 85,171,129, 91, 26,118,134,247,160, 10,123,211, 65,212,156, 10,108,232,188, 33,100, 21,235, 18, - 1,116,247,228,238,255, 36,238, 22, 20, 20, 76,127,136,235, 30, 60,125,200, 49, 26,141,227,255,135,158, 87,229,121,229,127,145, -254,175, 17, 2,203,134,140,140,140, 38,115, 17,120,220,232,120,181,250, 0,188,230,185, 3, 98,107, 19, 94, 30,161,229,129, 7, - 30,120,224,193,195, 64,233,201, 2, 15,254,202,176,249,102,217,206,235,240,209,170,233,159,101, 63, 39, 80,247,202, 1, 87,118, - 37,111,204, 42,137, 83, 30, 78, 15,167,135,211,195,233,225,124,236,156, 62, 0, 34, 1,172,108,224,190,154,171, 11,139, 1,200, - 1,152, 61,249,233,225,124, 8,253,224, 20, 88,150, 29, 91,223,212, 33, 65, 16, 71,155, 74,104,217,157,225,187, 97, 73,244, 85, - 44,177,157, 59, 43,180,154, 26, 35, 60,156, 30, 78, 15,167,135,211,195,233,225,244,112,122, 56, 31, 82,104, 13,125,255,253,247, - 63, 64, 85,104, 12,246,253,247,223,255,128,101,217,177, 85,151,216,177, 77,249,191,111,116,199,224,244,110, 96,109,199,141,238, - 24, 92,199,173,177, 14,135, 29,158,169, 67, 15, 60,240,192, 3, 15, 60,240,224, 73,199,185, 21, 43, 86, 84,172, 88,177,194,230, -248, 94, 10,128,176, 90,184, 74,155,242, 31, 91,167, 9,157, 89, 40, 85,255, 22, 60,143, 1, 97, 36,135, 55,149,203, 19, 12, 5, -107,137, 6, 0,144,212, 13,198, 88,249, 43, 77,155,118, 1, 40,104, 44,113,123,160, 67, 27, 31,209, 33, 3,195,240,114, 53,198, - 9,153, 85,219, 28,184,140, 9, 64,127, 1,159,255,139,192,199, 71, 84,219,117,131, 82,169, 55, 24,141, 35,247, 2,191,121,234, -128, 7, 30,120,224,129, 7, 79, 9, 36,190,190,190,167, 73,146,140,176,125,225, 24,119,176,102, 12, 66,134, 97, 10, 21, 10,197, - 72, 84, 77, 21, 63, 74, 78,199,223, 27,209,200,190,220,221,112,117,234,144, 3, 84,139,194,250, 72,118,204,166,184,130,215,189, -188,125,150,253,109,230, 63,253,219,182,139, 34,154, 55,111, 6,176, 64, 78,110, 94,240,157,219,183,134,255,184,227,203,119,212, - 42,197, 98,179,193,240, 95, 87,185, 59, 0,146, 22, 82, 65,242,127,223,127,205,135, 3, 26,175, 46,221,125,156,208,154,154,103, - 84, 45, 55,117, 73,100,249,248,251,159, 88,113,234,148,200,183, 75,151,106,215, 88,150,173,218, 95,239,247,223, 69,255, 55,114, -228,137, 9, 10,197, 40,143,216,250, 75, 34, 68, 38,147,205,231,114,185, 67, 76, 38, 83, 4,159,207,207,101, 24, 38,177,188,188, -124, 29,128,124, 79,246,252,181, 17, 21, 34, 25, 24,213, 58, 98,119, 65, 81,113,170,186,210, 56, 43,171, 64,171,240,228,138,203, -168,111,127,205,199,182,247, 38, 0, 72,165,210, 43, 36, 73,134, 59,138, 0,219,158,189,182,243,154,127, 45, 22,203, 31, 10,133, -162, 95, 61,180,173,253,252,252, 54, 2,232,217, 80,192,100,107,108,182,203, 10,133,226, 77,212,189, 90,207,203,215,215,247, 19, -130, 32, 38,146, 36, 73, 53,244, 76, 22,139,133, 97, 89,118, 79,121,121,249,199, 0, 52,117,221,231,235,235,123, 42, 51, 51,179, -103, 80, 80, 80,131, 86, 26,154,166,145,147,147, 19,216,171, 87,175,179, 10,133,162,125, 83,114, 62,106, 45,210, 88,212,179,234, -176,206,130, 14,160,218,254, 66, 77, 26,145,149, 39,148, 30,234, 59,104,212,208,185,111,191, 43,185,154,118, 19,191, 36,156,135, - 90,103, 0, 69,146,240,241, 18,163, 93,187,103,136,181,241,251, 2,190,217,188,118,205,133,164,147, 99, 43,117,170, 23, 92,146, -233, 98,206,226,133, 47,245,146,248,251, 49,128,133,193,191,198,116,149,252,223,145,212,197,168,160, 63,112, 89,100,157, 62, 45, - 46, 41, 46, 70, 92, 88, 24, 56, 52, 13, 33, 73, 66, 72, 16, 16,146, 36, 36, 66, 33, 70,111,219,134, 79,143, 29, 19,127,244,220, -115, 30,177,245, 23,131, 84, 42,157, 25, 22, 22,182,106,235,214,173,254,173, 90,181,130, 68, 34,129, 66,161, 8,200,202,202,234, -182, 96,193,130,233,133,133,133, 31,170,213,234, 45,158,156,250,235,194, 98,193,212,175,151,189,217,172, 48,251,118,179, 57,203, -191,107, 71,248, 51, 67,110,150,233,139, 60, 57,227, 52,186, 1, 72, 69,237,251,151,214,119,173, 78, 8,133,194,226,202,202,202, -160,250,238,225,243,249, 37, 70,163, 49,184, 33, 46,146, 36,195,243,243,243,131,196, 98, 49, 24,134,177,238, 6, 96,177, 15,164, - 29,119, 63,177, 6,170, 69,251,246,237, 77,245,113,122,121,121,125, 85, 82, 82, 50,194,182, 79,160,131,160,170, 21,249,249,249, - 35, 58,118,236,248,149, 70,163, 25, 89,135,120,249,228,237,183,223,158,223,169, 83, 39,155, 21,200,186, 11, 66,213, 95,185, 92, -142,121,243,230,217,255,135,197, 98,193,201,147, 39,223,158, 57,115, 38,202,203,203, 23,212,243,236, 17, 65, 65, 65,132,117, 67, -241, 58,177,100,201, 18, 44, 89,178, 4, 95,126,249, 37,193,229,114,125, 26,200, 79,183,112, 62, 42, 45,210, 24, 11, 86, 3,145, -225,143,162,186,111,214,209, 7,132,214,163, 0,197, 21,252,189,103,191, 17, 67,230,205, 95, 40,249,238,167, 51,200,202,248, 29, -153,201,223, 87,187,167,199,200,153, 40,146,107, 48,115,238,191,164, 4,197, 25,146,116,234,224,223,205, 6,253,215, 78, 90,179, -130, 35, 4,252,127,244,233, 21,205,205, 23,101, 33,196, 87,132, 1,221,219,112,155,159,184,254, 15, 29,232, 47, 50,170, 86,201, -184, 36,178,182,190,246, 26, 6,154,205, 8,162, 40, 80, 4, 1, 10, 0, 73, 16,168, 52, 24,112,121,234, 84,244,218,185, 19, 31, - 31, 62, 44,254,228,249,231, 93, 18, 91, 18,137,228, 42, 65, 16,190, 90,173,118, 44,170, 54,150,126, 26,208, 81, 42,149, 30,101, - 89,182, 92,167,211,117,123,130,210, 21,138,170, 57,250,154,163, 99, 30,170, 86, 84,185,180,179,176, 64, 32,120,125,194,132, 9, -107, 55,108,216, 32, 46, 46, 46, 70, 65, 65, 1, 24,134,129, 80, 40, 68,219,182,109,137, 83,167, 78,249, 47, 92,184,112,245,209, -163, 71, 5, 26,141,230, 11, 87, 6, 54, 92, 46, 55,222,207,207,239,185,224,224, 96, 73, 73, 73, 73,133, 82,169, 60,105, 48, 24, - 94, 71,227,183, 77, 33,185, 92,238,148,200,200,200, 23,195,194,194,130,243,243,243,229,121,121,121,135, 12, 6,195, 55,104,228, - 70,205, 14,121,218, 5,214,104,245, 0, 10, 35, 35, 35,111,220,191,127,191,196,141,156, 5,145,145,145,233,141,224,148, 0,248, - 17, 64, 88, 3,247, 21, 0,152, 4, 23,173,217,246,140,101, 45, 63, 47, 93,183,117, 86,220,140, 1,196,215, 11, 70,180,125,227, -203, 83,231, 73, 30, 59, 40,163,176, 50,215,163,161,156, 19, 89,214, 45,173,106, 10,170,250,174,213, 11,131,193, 16,104, 50,153, -192,173, 99,179,120,157, 78, 7, 47, 47,175, 64,103, 19, 41, 18,137,240,253,247,223,131,203,229,130,203,229,162,188,188, 28,225, -225,225,246,115, 30,143,103,255,220,162, 69,139, 6,249, 24,134,233, 69, 81, 20,180, 90, 45, 24,134,177, 31, 74,165, 18, 44,203, - 66, 32, 16,128, 97,170,182,115,114,184,222,171, 46, 62,130, 32, 38,134,133,133,225,187,239,190,131,209,104,124,224,186, 76, 38, - 67, 90,218,159,155,140, 80, 20,133,222,189,123,147, 4, 65, 76, 4,176,160, 30, 94, 22, 0, 98, 99, 99, 65, 81, 20, 40,138, 2, - 73,146,246,207,182,131, 97, 24, 44, 89,178, 4, 53,182, 38,123,100,156, 79, 26, 26,136, 12, 95,136, 58,124,180,200, 38, 78,151, -227, 18,207, 48,177, 68,246,217,155,255,252,151,244,232,217,235,200,201,205,121, 64,100, 1,192,149, 95,190, 65, 97, 65, 62, 82, - 51,243, 48,229,239,111, 73,101, 50,159,207,106, 52,168,117, 46, 27,245,246,226,125,254,254,164, 1, 66,173,185, 0, 26, 95,128, -106,205, 7, 87,172,195,194,113, 93, 4, 50, 47,222, 42,103,210, 41,224,243,127, 89,113,234,148, 93,100,245, 55, 24, 32, 96, 24, -208, 12, 99, 23, 89, 70,154,134,222,104, 68,168, 86,139, 59, 51,103,130, 53,155,241,225,129, 3, 98, 1,159,255,139, 51,233, 4, - 0, 30,143, 23,122,232,208,161, 22,157, 59,119, 78,128,243,193, 76, 79, 53,241, 59,170, 15,221,187,118,237,154,184,115,231,206, - 22, 60, 30, 47,212, 29,156, 66,161,240, 21,137, 68, 82, 42, 20, 10, 95,105,100, 58, 73, 0, 75,103,205,154,149,242,204, 51,207, -156,177, 10, 43,187,168,121,230,153,103, 78,205,154, 53,235, 42,128, 37,117,148,245,218, 56,155,133,133,133, 45,219,176, 97,131, -248,214,173, 91,200,207,207,135,217,108,198,171,175,190, 10,134, 97,160,215,235, 97, 52, 26,177,114,229, 74,137,191,191,255, 98, - 84,109, 20,236,204,179,243,188,189,189,111,237,216,177, 99,194,189,123,247,164,103,206,156, 33,210,210,210, 36,171, 87,175, 30, -239,239,239,159, 5, 64,208,136,252, 36, 67, 67, 67,191, 62,120,240,224,155,105,105,105,225,251,247,239,231, 94,184,112, 33,116, -243,230,205,179, 67, 67, 67,119, 2,160, 26,249,142,186,137,197,226,225,239,189,247,158,229,220,185,115,249,231,206,157,203, 95, -187,118, 45, 6, 14, 28,216, 63, 46, 46, 46,166,145,156,221,189,188,188,134,189,247,222,123,150,164,164,164,130,139, 23, 47,230, -173, 94,189,154, 28, 54,108,216,128,101,203,150,117,113,145,243,199,115,231,206, 13,206,205,205,109,149,151,151,215, 50, 47, 47, - 47, 50, 47, 47, 47, 50, 63, 63, 63,162,176,176,176, 69, 81, 81, 81,243,146,146,146,230,137,137,137, 3, 0,236,118,134, 51, 42, - 88,242,230,130, 87, 71, 84, 44,254,251, 24,246,131,105,207,178, 11, 95, 29,204, 62, 55,168,243, 79, 20,135, 67, 92, 76,207, 65, -184, 55,240,205,188,158, 17,205, 3, 36,105,209,126,210,118, 79, 88,221,124,210, 56, 57, 54, 33,165, 80, 40,112,244,232, 81, 88, -173, 87,221, 28, 69,150, 90,173, 70, 97, 97,161,237, 26,199,153,116,202,100,178,211, 91,183,110,101, 43, 43, 43,161, 82,169, 80, - 82, 82,130,220,220, 92,220,185,115, 7,101,101,101,184,121,243, 38,196, 98,241,105,103,210, 73, 16, 4, 24,134,177, 11,169,147, - 39, 79, 98,214,172, 89, 80, 40, 20,246,239, 56, 28,142,253,179,237, 55, 13,113,218, 44, 79, 12,195,224,226,197,139,152, 51,103, - 14,214,174, 93,139,221,187,119,227,200,145, 35, 80, 40, 20,118,177, 69,211,116,131,156,114,185, 28, 22,139,115, 99, 38,150,101, -161, 82,169,156,126,239,142, 2,136,195,225, 60, 32,138,108,135, 43,101,233, 33, 57,159, 88, 56, 17, 25,190,238, 17,182,237,131, -213, 84, 55,164,169, 18, 73,114,120, 83, 38,206,120,219, 63,175, 68,141,252, 98, 21, 40,242,207,126, 47,102,196, 12,112, 40, 18, -151, 78, 84, 25,174, 72,138,130, 74,103,128, 82,107,194,132, 25,243,253,254,187,246,223, 83,104, 83,101,189, 49, 94, 58, 1,109, -163,165,210,151, 58,118,108, 65,102, 8, 50, 17,243, 92, 50, 24, 11,192, 38, 61,143,110,229, 65, 84,251, 95,248, 47,233, 52,166, -101,105,192,173,122,173, 25, 62, 62, 34,223, 46, 93, 16, 23, 22,134, 65,102, 51,120, 44,139,103,139,139,241,251,252,249, 48,236, -219, 7, 18, 0,239,149, 87, 48,116,221, 58,156, 13, 11, 67,136, 94, 15,229, 59,239, 32,240,248,113,240,100, 50, 17, 74,157, 91, -252, 64, 16, 4,134, 12, 25,130, 83,167, 78,249,143, 30, 61,250,196,245,235,215, 95,166,105,250,108, 99,242,214,219,219,251, 10, -135,195, 9,111,232, 62,154,166,243, 84, 42,149,203,219,140,112, 56,156, 65,189,123,247, 62,176,127,255,126, 95,147,201,228,150, - 81, 8,159,207, 31, 61,126,252,248,173,155, 54,109,146,205,158, 61,123,235,145, 35, 71, 42,140, 70,227,113, 87,138, 20,128,165, - 91,182,108,121, 35, 54, 54,214,103,246,236,217,236,157, 59,119, 28,173, 87,129, 3, 7, 14,124,102,235,214,173, 33, 61,123,246, -124,123,206,156, 57, 60, 0, 31, 54,100,229,145, 74,165,115,183,110,221, 26, 32,151,203,161,213,106,237,141,108, 94, 94, 30, 68, - 34, 17, 72,146, 4, 73,146,224,114,185,248,236,179,207,252,231,206,157, 59, 95,161, 80,204,119,194, 74, 22,191,113,227,198,192, -145, 35, 71,146,247,238,221, 3, 73,146, 16, 10,133,120,237,181,215, 72,189, 94,239, 27, 23, 23,183, 93,167,211, 77,118, 37, 15, -185, 92,238,148,248,248,248,118,253,251,247,231,100,102,102,162,111,223,190,184,116,233, 18, 94,121,229, 21,174, 70,163,105,185, -112,225,194, 89, 6,131,193,213, 56, 46,161, 98,177,184,211,175,191,254,154,219,188,121,115,123,195,210,178,101, 75,102,236,216, -177,138,204,204,204,168,115,231,206,149,245,235,215,207,149, 13,203,155,137,197,226,246, 63,255,252,115, 97, 92, 92,220,240, 45, - 91,182,140, 7,128, 94,189,122, 29,250,244,211, 79,207, 40, 20,138,232,179,103,207, 42, 6, 13, 26,148,231, 36, 95, 88,104,104, - 40, 51,111,222, 60,105,125, 55,109,219,182, 77,137,170, 13,151, 91, 1,168,119,191,182,168,200,144,197,171,230, 79, 20,129, 49, -129, 53,235, 1, 83, 5, 96,210,194, 98,172, 0,193, 19, 1,102, 61, 2, 5, 10,252, 56, 55, 74,182,232,187,187, 25,204, 77, 98, -108,166, 92,115, 28, 30,212,218,212, 0,136, 33, 8, 34,245,232,209,163,232,221,187, 55,142, 30, 61,138,177, 99,199,166, 58,138, -129,180,180, 52, 12, 26, 52, 8, 86,139,150, 83,190, 90, 42,149,234,253, 37, 75,150, 36, 77,153, 50, 69, 92,173, 49, 32, 73,248, -248,248, 96,204,152, 49,149, 58,157,238,125,103, 19,202, 48, 12, 56, 28, 14,242,242,242,176,109,219, 54, 44, 95,190, 28,109,219, -182,133,217,108,126, 64,108, 89,219, 61,167, 26, 63,154,166,113,249,242,101,236,218,185, 19, 31, 46, 94, 12, 47, 47, 47, 0,128, -201,100,130,162,188, 28, 66,161,208, 46,198, 26, 16, 78,123,110,223,190, 61, 63, 60, 60,188,218,148,161,237,175,181,205,130,197, - 98, 1, 77,211,168,172,172,196,218,181,107,105,150,101,247, 52,212,255,216, 68,209,252,249,243, 97, 48,252,105, 80,239, 98,245, - 73,142,140,140, 68,215,174, 93,237,231, 36, 73,178,206,114,254,183, 95, 39,232, 29,238,142, 90,178, 26, 0, 16, 30, 30,142,168, -168, 40,132,134,134,214,201,217,212, 90,164, 49,112, 33, 50,124,221, 66,235, 81,236,148,205,229, 9,135,182,110,211,142,200, 41, - 84,128,195,225, 64,226, 29,128,126, 47, 46, 0, 69,145,144,250, 4,128, 96,244,127, 42, 98,146, 2,135,226, 64,161,209, 35,178, - 85, 27, 82, 32, 20, 13,213, 53, 32,180,100,222,220,141,239, 77,238, 39, 44,163,243, 32,106, 33, 4, 99,235, 78,195,248, 32,253, - 53,120,119,116, 91, 81,236,161,235, 27,161, 50, 15,115, 38,189, 20, 77, 35,136,162, 96, 98, 89,252, 62,127, 62, 98,226,227,145, -106, 19,134,241,241, 72,141,141,133, 31,151, 11, 1, 73,130, 53,155, 31,152,211,119, 70,104, 1, 64,110,110, 46,246,237,219,231, - 55,113,226,196, 3,105,105,105, 83, 92, 20, 27, 54,174,128,139, 23, 47, 6,181,106,213,170,206,123,254,248,227, 15,244,232,209, -195,229,233, 41, 62,159, 63,122,216,176, 97,223,237,219,183,207, 59, 61, 61, 29, 65, 65, 65, 15, 45,180, 4, 2,193,160, 17, 35, - 70,124,183, 99,199, 14, 89,105,105, 41,226,227,227,101,207, 63,255,252,238,148,148,148, 23, 13, 6,131, 51, 98,179,154,200,138, -143,143, 87,110,219,182,237,191,168, 62, 69, 88,184,109,219,182,175,123,246,236,249,102,108,108,172, 15,128, 55,172,190, 3,245, -138, 45,129, 64, 48,164,117,235,214,213, 70,181, 2, 65,149,177, 73, 34,145,192,219,219, 27, 60, 30, 15, 6,131, 1, 49, 49, 49, - 4,159,207, 31,224,204, 51,123,121,121,141,120,233,165,151,200,228,228,100, 20, 21, 21,193,199,199, 7, 82,169, 20, 12,195, 96, -246,236,217,212,218,181,107,135,232,116,174,205,112, 53,111,222,124,252,240,225,195, 57, 55,110,220,192,189,123,247, 96, 48, 24, -144,149,149, 5,153, 76,134,105,211,166,241, 86,173, 90,245,124,126,126,190,171, 66,171, 83,108,108,108,177,163,200,178, 65, 34, -145, 16,237,218,181, 83,248,251,251,119, 7,224,138,208,234,244,214, 91,111,149,172, 88,177, 98,208,169, 83,167,236, 65, 47, 79, -157, 58,181, 16, 0,190,248,226,139,164,192,192,192,238, 0,156, 21, 90, 96, 89,214,242,183,191,253, 45,155,207,231,131,203,229, -130,207,231, 87, 59,120, 60, 30, 72,146,244,178, 85,231,134,248, 50,238, 21,173,156,189,112,245,106,137,144,226,254,243,197,206, -104,225,195, 3, 68,126,224, 13, 90, 4,194,167,202,104,201, 42,254, 0,126, 89,132, 53, 47, 41,200,216,111, 43,127, 50, 49,190, -129,119,203,203, 53,143,185, 15,232, 9,224, 63,168,218, 92,119, 49,128,139, 79, 72,223,116, 21, 64,204,216,177, 99,237, 98,235, -216,177, 99, 24, 61,122, 52,148, 74, 37,110,220,184,225, 40,178, 92,217, 96,249,170,217,108,190,246,253,247,223,247,155, 56,113, - 34,225, 80,191,144,158,158,142,155, 55,111,166, 58,203, 71,146, 36, 44, 22, 11,184, 92, 46, 86,175, 94, 13,147,201,132,111,191, -253, 22,123,247,238, 5, 73,146, 32, 8, 2, 4, 65, 64, 38,147,225,203, 47,191,116,169,221, 99, 24, 6,219,183,111,199,162,133, - 11,237, 34,203, 58,147,129,144,224, 96,248, 7, 4,224,238,221,187, 13, 10,173,242,242,242,143, 15, 31, 62,140,250,156,225, 15, - 31, 62,108,255, 92,195, 25,190,225,126,142,162, 96, 48, 24,240,236,179,127,110, 21,251,214, 91,111,217, 63, 43, 20, 10, 80, 20, -101,203, 11,194, 89, 78, 61, 11,188, 40,252,243,187, 49,239,190, 91,205, 66, 87, 23,231,163,208, 34,238,178,110,213, 34,182, 98, -172,214,217, 80, 0, 99, 81,229,163, 85, 8, 60, 66, 31, 45,150,181,180, 15,111, 22,134,107,119,210,192,161, 40,240,189, 3,224, -237, 23, 12, 11,109,132,170,228, 30, 18,246,127, 5, 0,216,178,125, 15, 72,146, 4,135, 67,193, 96,100,208,182, 69, 24, 44, 22, - 75,251,250,184, 59, 0,253,134, 4, 7,244,110, 30,225, 67,220,240,189,135,118, 65,254, 53, 38, 66, 4,104, 91, 32, 37,250, 74, - 69,189,202, 85,234,126, 25,192,185, 6,197, 0, 73,130, 36, 8,136,121, 60, 24,246,237,171,242,218,140,175,234,179, 82, 99, 99, - 65,254,244, 19,188, 4, 2, 80, 4, 1,142,213, 4,221, 24,168,213,106, 16, 4,129, 93,187,118,249, 78,155, 54,109,247,141, 27, - 55, 98, 43, 43, 43,247,185,194,161, 84, 42,199,246,239,223,255,204,246,237,219, 3, 67, 66, 66, 30,184, 94, 84, 84,132, 25, 51, -102,148, 42,149, 74,151,130,186, 9,133,194, 87,198,143, 31,191,245,155,111,190,145,221,190,125, 27, 90,173, 22,129,129,129, 15, - 91, 20,186,247,233,211,231,192,190,125,251,188,139,138,138,160, 82,169, 96, 48, 24,176,107,215, 46,159, 49, 99,198,236,203,204, -204, 28, 13, 32,165, 1,142,143, 28, 69,214,156, 57,115,174, 3, 8, 2,176,177,166, 6,181, 94,235,236, 32,182, 84, 0, 86,213, - 51, 18,141,144, 72, 36, 40, 41, 41,193,140, 25, 51,112,235,214,159, 6,208,176,176, 48,251, 72,239,238,221,187, 8, 12, 12, 4, - 65, 16, 65,206, 60,116, 96, 96,160,212,104, 52, 98,214,172, 89,200,205,205,173,198,153,151,151, 7,130, 32,196,174,102,100,112, -112,112,176, 94,175,199,192,129, 3, 81, 89, 89,181,175,239,164, 73,147,192,229,114, 81, 82, 82, 2, 46,151, 27,208,136,247, 19, - 48,118,236,216, 58, 67,171,200,100, 50,147,175,175,111, 7, 23, 57,253,159,127,254,249,252,248,248,248, 7, 22,182, 92,186,116, -233, 5, 63, 63,191, 83,126,126,126,237, 92,228,180, 56,138, 42, 30,143, 87, 77,104,113,185, 92,144, 36,233,180,143,218,173, 18, -221, 6, 14, 81,216,117,197,188,145, 51, 90, 4,121,131,213, 22,131, 55,236, 99, 92, 43, 21, 97,245,218,159, 1, 0,255,122,173, - 7,186,140, 88, 10,227, 55, 35, 49,191, 47,197,159,154,103,120, 15,192, 71,143,185,205,255, 28,128,109, 21,220, 38, 0, 93,159, -160,254,200, 46,182,142, 29, 59,134,232,232,104,148,151,151, 35, 51, 51,179,177, 34,203,214,222, 45,250,228,147, 79,126,121,249, -229,151, 37,182, 65,171, 72, 36,194, 59,239,188,163,215,106,181,139, 92, 42, 68, 22, 11, 56, 28,142,125,144, 44, 20, 10, 17, 19, - 19, 99, 23, 89, 4, 65,160,162,162, 2, 28, 14,199,182, 34,145,112, 50,141, 8, 13, 9,129,151,151, 23,218,180,109,139,219,214, -118,196,246, 89, 32, 16,128, 32, 8,208,116,131,134, 60,141,213,169,125,129,187,187,100,155, 40,170,215,116, 28, 22, 6,139,197, - 98, 19,153,172, 59, 56, 3, 2, 2,160,213,106,157,229,124, 34, 81,135, 69,203, 38,180,198,162,202, 87,235,129,240, 14,131, 1, - 36,160, 9,151, 84, 18, 96, 9, 11,203,130, 67,145,214,185, 91, 10, 20, 69, 66, 81, 90,136,117, 31,191, 97, 21, 89,123,113, 52, - 41, 19,225,173,163,255,156,199, 37, 8,128,173,191,112, 7,122,243,226,231,190,220, 71, 84, 76, 20,194, 39, 76, 12,161,176,134, -126,244,229,129,136, 36, 49,111, 72,184,248,242,225,202,248, 12,149,169,193,142, 66, 72,146, 85,206,239, 4, 81,171,115, 15,105, -189, 70, 17, 4, 88,150, 5,107,113,205,239,216, 38,228, 69, 34, 17, 76, 38, 19, 40,138,194,250,245,235,125, 70,140, 24,177,209, - 85,161, 5, 32,189,184,184,120,204,236,217,179,143,237,217,179, 39, 32, 32, 32,160,218,232, 97,246,236,217,242,226,226,226, 49, -112,209,233,158,203,229,110,220,180,105,147,236,254,253,251,168,168,168,128, 72, 36,178, 55, 62,141, 45,159,189,122,245, 58,113, -252,248,113, 95,149, 74, 5,147,201, 4,145, 72, 4,150,101, 65, 81, 20,126,248,225, 7,255,113,227,198,253,156,147,147, 51,172, -190,180,138, 68,162, 23,173,194, 9,177,177,177, 62,177,177,177,131,129, 58, 35,245,218, 17, 27, 27,235,179, 96,193,130,231,245, -122,253,170,122,158, 57, 87,161, 80,132,136, 68, 34,236,223,191, 31, 82,169, 20, 98,177, 24, 97, 97, 97, 80, 40, 20, 16,139,197, - 96, 89, 22,102,179,217,214, 88,148, 57,243,224,165,165,165, 90,154,166,189,143, 29, 59,134,178,178, 63,127,210,162, 69, 11, 40, -149, 74, 88, 44,150, 10, 87, 51,179,160,160,160,152, 32,136,230,215,174, 93,195,253,251,247, 49,122,244,104,252,244,211, 79,232, -209,163,106,118,216,104, 52, 54, 38,136, 31, 67, 81, 20, 91, 79,185, 37, 0,248,186,147,211,218,121,185,196,105,177, 88, 44, 54, -145,229,248,215, 81,124, 53,240, 63,171, 85,231, 14,193,210,109, 43,230, 14,159, 49, 50, 58, 0,250,210,123, 16,122, 5,128,240, -137,196,234,181, 63,227,198, 31, 85,239,107,245,238, 43,248, 46,110, 12, 32,242, 67,148,183, 28, 33, 94,156,151,110,150, 60,118, -161,229,237, 56, 78,120, 82, 59,166,209,163, 71, 67,161, 80, 64, 42,149,186,195, 63,231,188, 94,175,207, 58,120,240, 96,247,177, - 99,199,130,207,231, 35, 43, 43, 11, 41, 41, 41,153, 0,206,187, 42,180,184, 92, 46, 62,249,228, 19,188,241,198, 27, 8, 14, 14, -198,162, 69,139,192,225,112,236, 7, 65, 16,118, 11,151, 43, 8, 10,174,127,225,163,205, 33,190, 33, 99,184,183,183,247, 39, 36, - 73, 78,164,156,200, 56,134, 97, 24,139,197,178, 71,165, 82,213, 27,222,193,230,184,238,204,187,112,204,131, 6,250,180,135,230, -124, 20, 90,164, 49,168,185,218,176, 14,139,150,109,213,225, 3, 91, 1,217,158, 50,193,106,178, 75,104,170,132, 18, 36,117, 51, - 47,191, 0,254,190, 82,171,200,178, 30, 36,137, 46,209, 85,131,217,163, 73,153, 8,111, 21, 13, 14, 69,129, 67, 81,144,138, 4, - 40, 46, 42, 4,135, 67,222,172,139,183, 19,133,151, 95,110,215, 60,210,215,159, 11,121,160, 17,161,193,117, 24, 6,186,123, 33, - 60,148,143, 81,254,194,136, 78, 20, 94,174,223,250,198,218,133,150,137,166,193,123,229, 21,251,116, 97,106,108, 44, 98,226,227, -193,140, 31, 15,157,201, 84,205, 84,220, 88,161, 37, 18,137,160,209,104, 48,101,202, 20,133,217,108,126,179,145, 89,156, 82, 86, - 86, 54, 97,234,212,169,101, 54, 1, 99, 50,153, 48,117,234,212,178,178,178,178, 9, 78, 88,137, 30,128,217,108,126,179, 71,143, - 30, 10,185, 92,110, 79,103, 99, 26, 28, 27,252,252,252,142,110,219,182,205,207, 96, 48,128,166,105, 59,167, 72, 36, 2, 69, 81, - 8, 12, 12,196,119,223,125, 23,232,231,231, 87,239,158, 85,122,189,254, 96,124,124,188, 18, 0,226,227,227,149, 4, 65, 36, 18, - 4,177,153, 32,136, 77, 53,142,205, 4, 65, 36, 58,222,171,215,235, 15,212,199,109, 52, 26, 19, 51, 51, 51, 89,177, 88, 12,138, -162, 96, 50,153, 32, 20, 10,237, 38,113,181, 90, 13,189,190,106,154, 59, 37, 37, 5,102,179, 57,217,153,103,215,104, 52,167,183, -111,223,110,105,209,162, 5,162,163,163, 17, 19, 19,131, 62,125,250, 32, 34, 34, 2,159,126,250, 41,163,211,233, 92,174,123, 5, - 5, 5, 71,127,252,241, 71,115,243,230,205,209,189,123,119, 8, 4, 2,116,233,210, 5, 97, 97, 97, 88,190,124,185, 81,165, 82, - 29,107,196,107,202, 73, 75, 75,163,234, 17,185, 50, 56,177,122,183, 6,114, 47, 95,190, 76,245,233,211,231, 80,205, 11,189,122, -245, 58, 36,149, 74,189,109, 38,118, 87, 70,228,142,226, 74, 32, 16,216, 15,219,247, 28, 14,199,153,209, 15,217, 33, 88,186,237, -179, 55,134,206, 24, 25,237,139, 67,167, 47,130,103, 82, 2,198,122,102, 4, 25, 51, 8,158, 4,193,222,220,240, 39,160, 15,152, - 15,224, 58,170,226, 48, 45,194,147, 5,187,227,123, 89, 89, 25, 50, 51, 51,145,146,146,130, 62,125,250, 32, 57, 57, 25,248,211, - 65,222,101,168, 84,170, 69,113,113,113, 58,219, 74,190,197,139, 23,235, 53, 26,205, 34, 87,219, 96,150,101,193,229,114, 17, 21, - 21,133, 5, 11, 22,224,231,159,127, 70, 86, 86, 22,204,102,179, 93, 8,217,124, 50, 93,177,104,241,120, 60, 4, 7, 7,195,108, - 54,219,173, 89, 0,112,251,214, 45,112, 56, 28, 88, 44, 22, 24,141,198, 6, 45, 90,222,222,222,159,108,221,186,245,109,185, 92, - 30, 90, 90, 90, 26,228,120, 20, 23, 23, 7, 21, 22, 22, 6,229,231,231, 7,229,230,230, 6,101,103,103, 7,221,187,119, 47,116, -229,202,149,111,123,123,123,127,226, 76, 58, 41,138, 66,151, 46, 93,240,214, 91,111,217,143, 13, 27, 54,216,143,132,132, 4,151, -157,215, 41,138, 66,212,146,213, 24, 83,202,218,143,159, 3, 9,251,113,227, 95,115,234,227,108,114, 45,210, 40,253, 98, 93,109, -232,184,177,116, 45,176,173, 58,180,181,101,118,183,141,154,206,240, 77, 6,218, 88,121,230,143, 59,183,134, 70,117,234, 73, 22, -201,181,213,150,127,198, 12,153, 0,130, 32,208,172, 85, 52, 40, 14, 7, 20, 69,130, 67, 81,240,145, 9,145,121,237,154,197,160, -215,159,169,141,115, 48,192,225,139,248, 27, 94, 27,213, 69, 88,192, 47, 65, 96,168, 4, 60,110,149,118,100,255,152, 80,163,135, -224, 0,157,188, 48, 51,223, 95,116,166,184,114,131,175,206,116, 40,177,142, 17,160,197, 98,129, 84, 32, 64,165,193, 0, 61, 77, - 99,200,186,117,246,233, 66,146, 32,112, 21, 64,231,117,235,112,110,223, 62,200,248,124, 64, 32,112,122, 85, 72,109, 66, 75, 46, -151, 99,250,244,233,101,133,133,133,211, 26,227,163,101,131,193, 96, 56, 91, 84, 84, 52,109,194,132, 9,187,246,239,223,239, 55, - 97,194, 4, 69, 81, 81,209, 52, 39,253,158, 30, 64,101,101,229,190,220,220,220,138,233,211,167,239,220,189,123,183,127, 64, 64, -128,125, 36,210,168,194, 74, 16,242,225,195,135, 11,156,185,175,129, 91,226,172,206,237,111, 88, 45, 91,157,231,204,153,115, 14, - 85,254, 87,142, 88,178,101,203,150, 73, 14, 83,140,155, 1,172,171,143, 88,173, 86,111, 90,176, 96,193,223,207,158, 61, 27, 32, - 20, 10, 65, 16, 4,120, 60, 30,218,180,105, 99, 95, 69,195,229,114,193,178, 44,222,125,247, 93,121, 73, 73,201, 23, 78,190,155, - 57,113,113,113,131, 42, 43, 43,125,167, 79,159, 78, 9,133, 66, 20, 23, 23, 99,237,218,181,204, 55,223,124,163,212,233,116, 51, - 26, 33,132,183,255,251,223,255, 30,162,213,106, 91,205,158, 61,155,167, 82,169,160,215,235,241,222,123,239, 25,191,254,250,235, - 60,189, 94,239,114,192,223,190,125,251,222,201,206,206, 30, 80, 81, 81, 81, 46, 22,139,107, 90,251, 8,137, 68,210, 19,192, 78, - 87, 56, 99, 98, 98,238,230,228,228,244, 89,186,116,105,162,217,108,230, 94,186,116,201,238, 12,191,126,253,250, 4,161, 80, 56, - 28, 46,110,190, 74, 16,132, 69, 32, 16, 84,179, 96,213,252,204,225,112, 26,108,211,218,135,136,151,126,246,250,160, 25,207,118, -240,198,193,211, 87, 16,119,224,143,155,109,103, 4, 70, 61,227, 91, 10, 75,105, 38,254,245, 90, 15,172,222,125, 5, 64,213,212, -161,165,228, 6,216,242,187, 96,189,154,227,158, 66, 94,240, 4,244, 1, 9,168, 10,153,241,164,161,154,200,186,113,227, 6,134, - 14, 29, 10, 0, 72, 78, 78, 70,255,254,253,145,156,156,140, 1, 3, 6,184, 28, 75,203,138, 95,213,106,117,118, 66, 66, 66,199, -230,205,155,227,252,249,243,247, 0,252,234,106, 34,109, 66,139,195,225,224,213, 87, 95,197,136, 17, 35,208,162, 69,139,106,171, - 13,109,159, 93, 17, 27, 52, 77,163, 83,167, 78, 48, 24,141,224,241,120,246,169, 73, 14,135,131,192,160, 32,220,185,115,199, 41, -139, 22, 73,146, 19, 95,124,241, 69, 50, 61, 61, 29,147, 39, 79,198,174, 93,187,234,188,119,234,212,169,248,254,251,239,241,226, -139, 47,146, 31,124,240, 65,189,225, 29,108, 78,232,206, 60,147,173,159,110,168,221,119, 23,103, 83,107,145,135,129, 67,104,135, - 90, 39, 77,106,249, 46,190,154,208,114, 8, 18,214, 52, 66,139, 54,237,250,233,219,175, 22,244,217, 56, 32, 48, 52,200, 27, 10, -149,222, 46,182, 82, 19,246, 2, 0, 94,158,179, 12, 28,170,106, 74, 81, 38, 21, 66,196,163,176,111,199, 23,114,147,169,178,214, -210,165,225,146,111,124,208,175,141, 55, 95, 98,134, 58,132, 69,116,224,159, 59,229, 16,173,246, 62, 40,184,186,249, 34,224,248, - 59,101,193, 0, 0, 9,165, 73, 68, 65, 84, 70, 57, 94,123, 70, 42,251, 34, 93,249, 6,204,150, 13, 15,116,136, 74,165, 94,121, -237,154,104,244,214,173,184, 52,109, 26,154, 49, 12, 18,195,194,224,199,229,194, 91, 32, 0, 73, 16,208, 31, 57,130,115,251,247, - 35, 88, 32, 0,188,188, 64,127,250, 41, 12,153,153, 48,107, 52,250, 70,140,204, 48,105,210, 36,185, 92, 46,159, 96, 52, 26,207, - 62,108, 62,235,245,250,227,185,185,185,111,244,237,219,119,163,217,108,126, 83,175,215, 63,212,202, 40,163,209,120,188,168,168, -232,149, 73,147, 38,237, 61,112,224, 64,128,143,143, 79,163,185,202,202,202,122,184,169, 56, 89, 0,124,104,117,110,127, 35, 54, - 54,214,231,242,229,203,127,223,182,109,219, 70,135,209, 68,208,172, 89,179, 94,175, 33,178, 26, 92,117, 8, 32,167,164,164,228, -211,119,222,121,103,217,154, 53,107,164, 54,199,247,223,127,255, 29, 52, 77,131,203,229,130, 97, 24,204,154, 53, 75, 91, 86, 86, -182, 26,117, 71,116,126,160,104,169,213,234, 54, 75,151, 46,221,182,110,221,186, 17, 20, 69, 73, 24,134,209, 85, 84, 84, 36, 86, - 86, 86,206, 64,227,226,104, 89, 74, 75, 75,167,127,244,209, 71,211,215,174, 93,251, 34, 73,146, 65, 52, 77,203, 53, 26,205, 97, -189, 94,255, 53, 26, 49,149,116,254,252,249,210,215, 94,123,237,143,210,210,210,246,225,225,225, 42,169, 84,106, 52, 26,141,148, - 72, 36,146, 73, 36,146, 24, 0,231, 9,130,200,112,133, 51, 53, 53,181,104,246,236,217,247, 13, 6, 67,212,230,205,155,147,100, - 50,217,105,130, 32, 8, 30,143,231, 43, 18,137,134, 2, 72, 36, 8,226,182, 43,156, 36, 73, 90, 28,173, 87, 53,253,179,248,124, -190, 83, 62, 90,173, 2,197, 51, 71,180,225,224,224,153, 43,136, 59,152,179,157, 97,217,253,251, 83,203,143, 44,234, 15,152,246, -188,134, 46, 19,118, 86, 77, 23, 2,176,148,220,128,105,207, 84, 16,226, 0, 36,229,115,161,210,155,142,194,131,218, 96, 15,239, - 32,151,203,145,158,158,110, 19, 89, 49, 0, 48, 96,192,128, 84,155,216, 74, 73, 73, 65,247,238,221, 83, 1,112, 93, 45,175,106, -181,250,157, 41, 83,166, 28,183, 14,142,223,105,196,192,207, 46,180,108,130,170, 69,139, 22,246,115,199,195,193, 71,203, 41, 48, - 12, 3, 30,143, 7, 14,135,131,208,176, 48,251,255, 98, 89, 22,119,238,220,129, 66,161,112, 74,104, 81, 20, 69, 17, 4,129,201, -147,157, 91,144,252,183,191,253, 13,137,137,137,160,156, 84,133, 20, 69, 33, 50, 50,178,193,123,108,186,212, 89,206,240,240,240, - 70,115, 54,181, 22,105,172,192,170,237,115,109,162,170,174, 10,241,168, 80,160,213,170, 62,220,177,117,253,154, 89,115,223,149, -222,184, 91, 12,149,214, 0,138, 34, 29, 27, 79,112, 56, 20,100, 18, 33,154,135,120, 99,247,127,255,163,209,168,149, 31,161,142, -125, 15, 91,120,241,230, 12,239,249,140,128, 23,170, 67, 84,231, 73,160,132,127,138, 0,182,168,142,217,193,254,191,224,185, 28, -157,240,167, 28,221,156,171,229,198, 7,133,150,209, 56,114,241,168, 81, 39,226,126,254, 89,220,107,251,118,220,157, 53, 11, 97, -122, 61, 4,214,169, 68,146, 32, 32,229,241, 32,229,241,170, 68,214,218,181,208,211, 52,214, 77,155, 86, 97, 48, 26, 71,185, 82, -201,203,202,202, 48,126,252,248,210,130,130,130, 49,104,196,212, 94, 93,208,233,116,251, 0,236,115, 23,159,193, 96, 56,155,151, -151,247,220,248,241,227,127, 62,126,252,120,224, 19, 18,100,206, 38,182, 76,151, 47, 95,126, 61, 41, 41,233, 46,170,111, 44,170, - 76, 74, 74,186, 59,123,246,108, 98,219,182,109, 95, 3,248, 55,156, 12,224,169,211,233,214,159, 60,121, 18,131, 6, 13,250,247, -138, 21, 43,252,123,244,232,129,160,160, 32,104, 52, 26,164,164,164, 96,254,252,249, 10,181, 90,189, 66,169, 84,174,113, 49,205, - 38,131,193, 48,213,113, 41,181, 59,242,193, 96, 48,124, 83, 88, 88,248,141,187, 8,231,205,155,247,251,157, 59,119,202, 2, 3, - 3,123,243,120,188,206,168,242, 3, 42, 2,240,181,171,130,200,134,185,115,231, 94,187,115,231,142,188, 89,179,102,125,172,156, - 62,168,218,198,104,107, 35, 56, 11,174, 92,185, 18,222,179,103, 79,146,203,229,178, 20, 69,129,203,229,178, 28, 14,135,181,250, -213,176, 0,112,248,240, 97, 1,128,122,183,205,185, 91,162, 95, 58,245, 63,191,125,144, 81, 84,185, 63,179,184, 98, 1, 0,118, -207, 13,241, 47, 93, 2,169,145, 35,219,229,193, 16, 63, 0,132,172, 42, 80, 37,171, 45, 4, 33, 9, 70,158,165, 25,150, 28,186, - 89, 68,131, 88,229,209, 84,181,143,171, 97, 13,239, 80, 88, 88,232, 40,178,108, 86,171,152, 1, 3, 6,164, 90, 69,150,237, 90, - 99,252,203, 78, 89, 44,150,135,234,195, 88,150, 69, 92, 92, 28,182,108,217,130,134, 34,154, 91, 87,247, 17, 13,241,217, 44, 90, - 12,195,192,100, 50,225,198,141, 27,246,152, 93,182,233, 66, 91,104, 7,154,166,235, 93,173,206, 48, 12, 99, 52, 26,241,195, 15, - 63, 56, 37,182,190,251,238, 59, 84, 86, 86,130,105, 64,193, 57,134, 98,232,218,181, 43, 20, 10,133,125,177, 79, 76,204,159,161, -242, 76, 38,147, 75,194,213,198, 25, 21, 21, 5,185, 92, 14,155,191,112,243,105,127, 26,123,104,157,238,175, 90,238,235,180,104, - 61,242, 30, 83, 32,150, 29,239,209,111, 68,255,105,175,207,151,104, 13, 12,238,223,207, 70,105, 73, 33, 72,130, 68,104,179,112, - 68, 68, 68, 66,196, 39,177, 43,126,141, 46,245,220,233,223,180,154,242,209,117,113,141,245,230,157, 91,251, 74,255, 62,173, 91, -123, 17,160,205, 0, 99, 6,104, 51, 96,177,254,181,125,103,169, 94,230,210,211,149,236, 7, 87, 21, 23,142,170, 76,181,238, 89, - 53, 1,232,239,227,231,119, 98,201,225,195, 98,139,201,132,178,119,222,129,152,166, 33,180,142, 74,170, 30, 68, 0,250,211, 79, -171, 68,214,212,169, 21, 42,165,210,165, 45,120, 2, 2, 2,174, 16, 4, 17, 80, 90, 90,250, 84, 69,134, 15, 12, 12, 60,202,178, -172, 92, 46,151,247,120,130,210, 21, 4, 64, 9,192, 84,203, 64, 34, 16,174,251,255,216, 16, 25, 24, 24,248, 1, 73,146,125, 89, -150,245, 39, 73,178,220, 98,177,156, 47, 41, 41, 89, 9,224,142,167, 63,125,108,176, 69,134,111,217,192,125, 37, 0,254,137, 42, -167,224,251,206,146,119,241,246,246, 54,240,205, 7, 94,136, 22, 12,153, 24,227,141, 86, 33, 94,224,242,132, 40, 80,211, 56,149, -161,198,214,132,162, 92,189,153, 25,119,171,180, 34,205,243, 42,234,133,219,183,224,113, 39,252,252,252, 46,158, 56,113,162, 71, -171, 86,173, 72, 71,135,119, 91,172, 60,219,244, 22,135, 83,165,229,206,158, 61, 75, 79,158, 60,249,124,113,113,241,160,186, 56, -189,188,188,126,185,126,253,250,179, 42,149,234, 1, 65,229, 24, 41,222,118,174,211,233, 48,119,238,220,147,117,109,193,227,237, -237,189,118,205,154, 53,111,191,252,242,203,164, 45, 28,133,227, 97,219, 46,200,118,152, 76, 38,236,220,185,211,242,197, 23, 95, -124,169, 82,169,234,156, 58, 12, 13, 13,205, 45, 40, 40, 8,183,133, 90,112, 38,168,104,100,100,100, 97,118,118,118,216,163,228, -124,138, 5, 87, 53,235,214, 99, 49, 77,112, 69,162,121, 94, 82,223,143, 95,158,242,150,127,100,235,182, 68,112,104, 51, 16, 32, - 81, 92,148,143,236, 63,110,177, 7,190,253,170, 76,167, 86,124,162,215,235,190,170,143,167, 3,208,186,165,140,183,135,207,160, - 29,108, 2,168,198,254, 84, 15,140, 56, 0,152,184,228,205,251, 26,243,164,140,122,166,125,108, 98,235,195, 3, 7,196,252,118, -237, 30, 8, 20,103,177, 88, 96,200,204,196,186,105,211, 92, 22, 89, 30,120,224,129, 91,208, 10, 13,199,200, 50,163, 42, 62,151, -171, 22, 19, 34, 42, 72, 50,137, 5, 38,146,176,116, 34, 9,130, 79,179,200, 2,139, 95,196,156,138,141,169,133,208,123,178,223, - 41, 60,177,155, 74, 3,144,248,249,249,157,166, 40, 42,194,102,145,113,180,214,215,178,161,244,253,226,226,226,225, 0,234, 91, - 33,220,218,203,203,235, 43,134, 97,122, 57,179,169, 52, 69, 81,151, 52, 26,205, 60,212,179,169,116, 83,172, 58,244,247,247,191, -147,157,157,221,218,182,138,218,177,175,172,109,101,249,237,219,183, 49,120,240,224,236,162,162,162,200, 71,201,249,164,162,142, - 85,135, 79,142, 69,203, 1, 97, 60,129,116, 58, 95, 36, 28,102, 49,211, 81, 32, 0, 14,151,123,211, 88,169, 63, 99,208,107,119, -160,142,233,194, 71,137, 9, 64,127, 1,159,255, 11, 79, 38, 19,213, 38,218,204, 26,141,222, 96, 52,142,244,136, 44, 15, 60,240, -192, 3, 15,158, 34,180,243,243,243, 59,193,229,114, 5,142, 98,178,230,103, 27,104,154,174, 44, 45, 45, 29, 13, 32,235, 17,115, -254,111,194, 69, 39,181, 17,206,114, 90,143,193, 79, 58,103, 19, 62, 59,235, 70,206,193, 86,206, 37, 79, 73, 58, 7, 63,169,156, -182,231,117,129,119,132, 43,229,200, 93,249,233,144, 78,214,221,233,108, 42, 78,119,213,163, 90,210,201, 54,193,123, 95,242,148, -164,115,240,147,198, 89,179,252, 56,201,235, 18,167,147,101,202,213,116,178,238, 78,103, 83,113, 62,108, 61,170, 39,157,236,195, -150,165, 58,222,253, 18, 60,133, 72,239, 6, 54,189, 27,216, 27,221,107,141,219, 24, 91,215,239, 92,114, 36,108,170,149, 0,182, -176,251, 86,126,226, 73,229,116,204, 7,119,110, 21,208, 4,219, 14, 36,184,155,179, 70,126,186, 11, 75,172, 43, 76, 18,225, 68, -192, 81, 87,158,221, 29,239,189,198,179,186,133,183, 17, 34,203, 37, 78,119,149,251,166,230,116, 87, 93,170,201,233,142,114, 95, -219,123,111,194,119,228,174,116,186,165, 46, 53, 69,153,175,165,252, 60, 52,111, 77, 78,119,212,165,154,156,238, 40,247,143,130, -211, 29,117,169, 54, 78,119,148,251,186,222,253,211,106,104,178, 77, 23, 90, 67, 60, 16, 78,136,173,120, 0, 32, 27,147,105, 77, -104, 41, 27,226,110, 78,119,167,185, 41,196,166, 11, 22,152,199,206,233,230,119,180,196,202,233,206,209,205, 16,119,189,163,166, - 40,239,142,156,238,226,175,201,227,142,247, 84, 27,231,195,166,183,142,116,186,253,217, 31,182,220, 63, 42, 78, 55,191, 35,183, -212,165, 26,156, 67,220, 60, 24, 24,226,112,190,196,157,156,238,170, 75,181,164,243,161,223, 83,109,156, 15,155,222, 58,210,233, -246,103,119, 71, 31,210, 84,188,143,211,162,197,146,117,150,137,248, 26,199, 35, 17, 26,143,109, 74,206, 69,238,191, 20,167,139, -211, 51, 35,154,224,221, 63,214,116,186,147,179,102, 26,221, 57,221,211,148,233,116, 39,167, 11,105,253,203,113, 62,109,239,253, - 73,204,207,186,248, 30,102, 90,170, 46,235,104, 83,164,211,157,156, 78,114,255, 37, 56, 31,226,221,255,229,192,121, 82, 18, 98, -203,120, 55,143, 76,224,102, 11, 76,147, 61,183,155,211, 57,164, 41, 44,132, 77, 0,183,167,211, 58, 82,254,184, 9,158,253,105, -201, 83, 79, 93,242,212,165, 39,174, 46,213, 40,147, 67,220,104, 41,114,171,229,185, 38,167, 59,254,135, 35,135,187,202,104, 83, - 63,187, 59,235, 82, 83,188,251,167, 13,255, 15, 47,211, 45,132, 34, 78,139,159, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, +137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, + 72, 68, 82, 0, 0, 2, 90, 0, 0, 2,128, 8, 6, 0, 0, 0, 68,254,214,163, 0, 0, 10, 79,105, 67, 67, 80, 80,104,111,116, +111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,105,108,101, 0, 0,120,218,157, 83,103, 84, 83,233, 22, 61,247,222,244, + 66, 75,136,128,148, 75,111, 82, 21, 8, 32, 82, 66,139,128, 20,145, 38, 42, 33, 9, 16, 74,136, 33,161,217, 21, 81,193, 17, 69, + 69, 4, 27,200,160,136, 3,142,142,128,140, 21, 81, 44, 12,138, 10,216, 7,228, 33,162,142,131,163,136,138,202,251,225,123,163, +107,214,188,247,230,205,254,181,215, 62,231,172,243,157,179,207, 7,192, 8, 12,150, 72, 51, 81, 53,128, 12,169, 66, 30, 17,224, +131,199,196,198,225,228, 46, 64,129, 10, 36,112, 0, 16, 8,179,100, 33,115,253, 35, 1, 0,248,126, 60, 60, 43, 34,192, 7,190, + 0, 1,120,211, 11, 8, 0,192, 77,155,192, 48, 28,135,255, 15,234, 66,153, 92, 1,128,132, 1,192,116,145, 56, 75, 8,128, 20, + 0, 64,122,142, 66,166, 0, 64, 70, 1,128,157,152, 38, 83, 0,160, 4, 0, 96,203, 99, 98,227, 0, 80, 45, 0, 96, 39,127,230, +211, 0,128,157,248,153,123, 1, 0, 91,148, 33, 21, 1,160,145, 0, 32, 19,101,136, 68, 0,104, 59, 0,172,207, 86,138, 69, 0, + 88, 48, 0, 20,102, 75,196, 57, 0,216, 45, 0, 48, 73, 87,102, 72, 0,176,183, 0,192,206, 16, 11,178, 0, 8, 12, 0, 48, 81, +136,133, 41, 0, 4,123, 0, 96,200, 35, 35,120, 0,132,153, 0, 20, 70,242, 87, 60,241, 43,174, 16,231, 42, 0, 0,120,153,178, + 60,185, 36, 57, 69,129, 91, 8, 45,113, 7, 87, 87, 46, 30, 40,206, 73, 23, 43, 20, 54, 97, 2, 97,154, 64, 46,194,121,153, 25, + 50,129, 52, 15,224,243,204, 0, 0,160,145, 21, 17,224,131,243,253,120,206, 14,174,206,206, 54,142,182, 14, 95, 45,234,191, 6, +255, 34, 98, 98,227,254,229,207,171,112, 64, 0, 0,225,116,126,209,254, 44, 47,179, 26,128, 59, 6,128,109,254,162, 37,238, 4, +104, 94, 11,160,117,247,139,102,178, 15, 64,181, 0,160,233,218, 87,243,112,248,126, 60, 60, 69,161,144,185,217,217,229,228,228, +216, 74,196, 66, 91, 97,202, 87,125,254,103,194, 95,192, 87,253,108,249,126, 60,252,247,245,224,190,226, 36,129, 50, 93,129, 71, + 4,248,224,194,204,244, 76,165, 28,207,146, 9,132, 98,220,230,143, 71,252,183, 11,255,252, 29,211, 34,196, 73, 98,185, 88, 42, + 20,227, 81, 18,113,142, 68,154,140,243, 50,165, 34,137, 66,146, 41,197, 37,210,255,100,226,223, 44,251, 3, 62,223, 53, 0,176, +106, 62, 1,123,145, 45,168, 93, 99, 3,246, 75, 39, 16, 88,116,192,226,247, 0, 0,242,187,111,193,212, 40, 8, 3,128,104,131, +225,207,119,255,239, 63,253, 71,160, 37, 0,128,102, 73,146,113, 0, 0, 94, 68, 36, 46, 84,202,179, 63,199, 8, 0, 0, 68,160, +129, 42,176, 65, 27,244,193, 24, 44,192, 6, 28,193, 5,220,193, 11,252, 96, 54,132, 66, 36,196,194, 66, 16, 66, 10,100,128, 28, +114, 96, 41,172,130, 66, 40,134,205,176, 29, 42, 96, 47,212, 64, 29, 52,192, 81,104,134,147,112, 14, 46,194, 85,184, 14, 61,112, + 15,250, 97, 8,158,193, 40,188,129, 9, 4, 65,200, 8, 19, 97, 33,218,136, 1, 98,138, 88, 35,142, 8, 23,153,133,248, 33,193, + 72, 4, 18,139, 36, 32,201,136, 20, 81, 34, 75,145, 53, 72, 49, 82,138, 84, 32, 85, 72, 29,242, 61,114, 2, 57,135, 92, 70,186, +145, 59,200, 0, 50,130,252,134,188, 71, 49,148,129,178, 81, 61,212, 12,181, 67,185,168, 55, 26,132, 70,162, 11,208,100,116, 49, +154,143, 22,160,155,208,114,180, 26, 61,140, 54,161,231,208,171,104, 15,218,143, 62, 67,199, 48,192,232, 24, 7, 51,196,108, 48, + 46,198,195, 66,177, 56, 44, 9,147, 99,203,177, 34,172, 12,171,198, 26,176, 86,172, 3,187,137,245, 99,207,177,119, 4, 18,129, + 69,192, 9, 54, 4,119, 66, 32, 97, 30, 65, 72, 88, 76, 88, 78,216, 72,168, 32, 28, 36, 52, 17,218, 9, 55, 9, 3,132, 81,194, + 39, 34,147,168, 75,180, 38,186, 17,249,196, 24, 98, 50, 49,135, 88, 72, 44, 35,214, 18,143, 19, 47, 16,123,136, 67,196, 55, 36, + 18,137, 67, 50, 39,185,144, 2, 73,177,164, 84,210, 18,210, 70,210,110, 82, 35,233, 44,169,155, 52, 72, 26, 35,147,201,218,100, +107,178, 7, 57,148, 44, 32, 43,200,133,228,157,228,195,228, 51,228, 27,228, 33,242, 91, 10,157, 98, 64,113,164,248, 83,226, 40, + 82,202,106, 74, 25,229, 16,229, 52,229, 6,101,152, 50, 65, 85,163,154, 82,221,168,161, 84, 17, 53,143, 90, 66,173,161,182, 82, +175, 81,135,168, 19, 52,117,154, 57,205,131, 22, 73, 75,165,173,162,149,211, 26,104, 23,104,247,105,175,232,116,186, 17,221,149, + 30, 78,151,208, 87,210,203,233, 71,232,151,232, 3,244,119, 12, 13,134, 21,131,199,136,103, 40, 25,155, 24, 7, 24,103, 25,119, + 24,175,152, 76,166, 25,211,139, 25,199, 84, 48, 55, 49,235,152,231,153, 15,153,111, 85, 88, 42,182, 42,124, 21,145,202, 10,149, + 74,149, 38,149, 27, 42, 47, 84,169,170,166,170,222,170, 11, 85,243, 85,203, 84,143,169, 94, 83,125,174, 70, 85, 51, 83,227,169, + 9,212,150,171, 85,170,157, 80,235, 83, 27, 83,103,169, 59,168,135,170,103,168,111, 84, 63,164,126, 89,253,137, 6, 89,195, 76, +195, 79, 67,164, 81,160,177, 95,227,188,198, 32, 11, 99, 25,179,120, 44, 33,107, 13,171,134,117,129, 53,196, 38,177,205,217,124, +118, 42,187,152,253, 29,187,139, 61,170,169,161, 57, 67, 51, 74, 51, 87,179, 82,243,148,102, 63, 7,227,152,113,248,156,116, 78, + 9,231, 40,167,151,243,126,138,222, 20,239, 41,226, 41, 27,166, 52, 76,185, 49,101, 92,107,170,150,151,150, 88,171, 72,171, 81, +171, 71,235,189, 54,174,237,167,157,166,189, 69,187, 89,251,129, 14, 65,199, 74, 39, 92, 39, 71,103,143,206, 5,157,231, 83,217, + 83,221,167, 10,167, 22, 77, 61, 58,245,174, 46,170,107,165, 27,161,187, 68,119,191,110,167,238,152,158,190, 94,128,158, 76,111, +167,222,121,189,231,250, 28,125, 47,253, 84,253,109,250,167,245, 71, 12, 88, 6,179, 12, 36, 6,219, 12,206, 24, 60,197, 53,113, +111, 60, 29, 47,199,219,241, 81, 67, 93,195, 64, 67,165, 97,149, 97,151,225,132,145,185,209, 60,163,213, 70,141, 70, 15,140,105, +198, 92,227, 36,227,109,198,109,198,163, 38, 6, 38, 33, 38, 75, 77,234, 77,238,154, 82, 77,185,166, 41,166, 59, 76, 59, 76,199, +205,204,205,162,205,214,153, 53,155, 61, 49,215, 50,231,155,231,155,215,155,223,183, 96, 90,120, 90, 44,182,168,182,184,101, 73, +178,228, 90,166, 89,238,182,188,110,133, 90, 57, 89,165, 88, 85, 90, 93,179, 70,173,157,173, 37,214,187,173,187,167, 17,167,185, + 78,147, 78,171,158,214,103,195,176,241,182,201,182,169,183, 25,176,229,216, 6,219,174,182,109,182,125, 97,103, 98, 23,103,183, +197,174,195,238,147,189,147,125,186,125,141,253, 61, 7, 13,135,217, 14,171, 29, 90, 29,126,115,180,114, 20, 58, 86, 58,222,154, +206,156,238, 63,125,197,244,150,233, 47,103, 88,207, 16,207,216, 51,227,182, 19,203, 41,196,105,157, 83,155,211, 71,103, 23,103, +185,115,131,243,136,139,137, 75,130,203, 46,151, 62, 46,155, 27,198,221,200,189,228, 74,116,245,113, 93,225,122,210,245,157,155, +179,155,194,237,168,219,175,238, 54,238,105,238,135,220,159,204, 52,159, 41,158, 89, 51,115,208,195,200, 67,224, 81,229,209, 63, + 11,159,149, 48,107,223,172,126, 79, 67, 79,129,103,181,231, 35, 47, 99, 47,145, 87,173,215,176,183,165,119,170,247, 97,239, 23, + 62,246, 62,114,159,227, 62,227, 60, 55,222, 50,222, 89, 95,204, 55,192,183,200,183,203, 79,195,111,158, 95,133,223, 67,127, 35, +255,100,255,122,255,209, 0,167,128, 37, 1,103, 3,137,129, 65,129, 91, 2,251,248,122,124, 33,191,142, 63, 58,219,101,246,178, +217,237, 65,140,160,185, 65, 21, 65,143,130,173,130,229,193,173, 33,104,200,236,144,173, 33,247,231,152,206,145,206,105, 14,133, + 80,126,232,214,208, 7, 97,230, 97,139,195,126, 12, 39,133,135,133, 87,134, 63,142,112,136, 88, 26,209, 49,151, 53,119,209,220, + 67,115,223, 68,250, 68,150, 68,222,155,103, 49, 79, 57,175, 45, 74, 53, 42, 62,170, 46,106, 60,218, 55,186, 52,186, 63,198, 46, +102, 89,204,213, 88,157, 88, 73,108, 75, 28, 57, 46, 42,174, 54,110,108,190,223,252,237,243,135,226,157,226, 11,227,123, 23,152, + 47,200, 93,112,121,161,206,194,244,133,167, 22,169, 46, 18, 44, 58,150, 64, 76,136, 78, 56,148,240, 65, 16, 42,168, 22,140, 37, +242, 19,119, 37,142, 10,121,194, 29,194,103, 34, 47,209, 54,209,136,216, 67, 92, 42, 30, 78,242, 72, 42, 77,122,146,236,145,188, + 53,121, 36,197, 51,165, 44,229,185,132, 39,169,144,188, 76, 13, 76,221,155, 58,158, 22,154,118, 32,109, 50, 61, 58,189, 49,131, +146,145,144,113, 66,170, 33, 77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197,110,139,183, 47, 30,149, 7,201,107, +179,144,172, 5, 89, 45, 10,182, 66,166,232, 84, 90, 40,215, 42, 7,178,103,101, 87,102,191,205,137,202, 57,150,171,158, 43,205, +237,204,179,202,219,144, 55,156,239,159,255,237, 18,194, 18,225,146,182,165,134, 75, 87, 45, 29, 88,230,189,172,106, 57,178, 60, +113,121,219, 10,227, 21, 5, 43,134, 86, 6,172, 60,184,138,182, 42,109,213, 79,171,237, 87,151,174,126,189, 38,122, 77,107,129, + 94,193,202,130,193,181, 1,107,235, 11, 85, 10,229,133,125,235,220,215,237, 93, 79, 88, 47, 89,223,181, 97,250,134,157, 27, 62, + 21,137,138,174, 20,219, 23,151, 21,127,216, 40,220,120,229, 27,135,111,202,191,153,220,148,180,169,171,196,185,100,207,102,210, +102,233,230,222, 45,158, 91, 14,150,170,151,230,151, 14,110, 13,217,218,180, 13,223, 86,180,237,245,246, 69,219, 47,151,205, 40, +219,187,131,182, 67,185,163,191, 60,184,188,101,167,201,206,205, 59, 63, 84,164, 84,244, 84,250, 84, 54,238,210,221,181, 97,215, +248,110,209,238, 27,123,188,246, 52,236,213,219, 91,188,247,253, 62,201,190,219, 85, 1, 85, 77,213,102,213,101,251, 73,251,179, +247, 63,174,137,170,233,248,150,251,109, 93,173, 78,109,113,237,199, 3,210, 3,253, 7, 35, 14,182,215,185,212,213, 29,210, 61, + 84, 82,143,214, 43,235, 71, 14,199, 31,190,254,157,239,119, 45, 13, 54, 13, 85,141,156,198,226, 35,112, 68,121,228,233,247, 9, +223,247, 30, 13, 58,218,118,140,123,172,225, 7,211, 31,118, 29,103, 29, 47,106, 66,154,242,154, 70,155, 83,154,251, 91, 98, 91, +186, 79,204, 62,209,214,234,222,122,252, 71,219, 31, 15,156, 52, 60, 89,121, 74,243, 84,201,105,218,233,130,211,147,103,242,207, +140,157,149,157,125,126, 46,249,220, 96,219,162,182,123,231, 99,206,223,106, 15,111,239,186, 16,116,225,210, 69,255,139,231, 59, +188, 59,206, 92,242,184,116,242,178,219,229, 19, 87,184, 87,154,175, 58, 95,109,234,116,234, 60,254,147,211, 79,199,187,156,187, +154,174,185, 92,107,185,238,122,189,181,123,102,247,233, 27,158, 55,206,221,244,189,121,241, 22,255,214,213,158, 57, 61,221,189, +243,122,111,247,197,247,245,223, 22,221,126,114, 39,253,206,203,187,217,119, 39,238,173,188, 79,188, 95,244, 64,237, 65,217, 67, +221,135,213, 63, 91,254,220,216,239,220,127,106,192,119,160,243,209,220, 71,247, 6,133,131,207,254,145,245,143, 15, 67, 5,143, +153,143,203,134, 13,134,235,158, 56, 62, 57, 57,226, 63,114,253,233,252,167, 67,207,100,207, 38,158, 23,254,162,254,203,174, 23, + 22, 47,126,248,213,235,215,206,209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235, 25,175,219,198,194,198, 30,190, +201,120, 51, 49, 94,244, 86,251,237,193,119,220,119, 29,239,163,223, 15, 79,228,124, 32,127, 40,255,104,249,177,245, 83,208,167, +251,147, 25,147,147,255, 4, 3,152,243,252, 99, 51, 45,219, 0, 0, 0, 6, 98, 75, 71, 68, 0,255, 0,255, 0,255,160,189,167, +147, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66, 40,155,120, 0, 0, 0, 7,116, 73, 77, 69, 7,219, + 3, 1, 19, 44, 13, 18,209, 81,195, 0, 0, 32, 0, 73, 68, 65, 84,120,218,236, 93,119,120, 20,213,226, 61, 51, 59,179,187,217, +146, 77, 35, 61,144, 66, 9, 96, 0, 67, 81,130, 84, 65, 80,140,138, 10, 86,132,167,207,103,197,134, 5, 84, 68, 68, 32, 54, 64, +240, 39,242,208,167,128,160,128, 5, 4,164, 68, 74,232, 29,233, 9,144, 4, 18, 66, 58,201, 38,219,203,220,223, 31,217, 89, 55, +203,182, 64, 98,129,123,190,111,190,221,157,157, 57,115,239,157,123,239,156, 57,183, 1, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20,215, 52, 86,175, 94, 77,154,112,248,144, 64, 57, 29,219,128,191, 59,103, 11,198,157, 52, 35,231, + 0, 7,231,187,255,144,112, 14,248,187,114,138,241,109, 2,239,144,166,228,163,230, 74, 79,151,112,146,230, 14,103, 75,113, 54, + 87, 57,242, 16, 78,210, 2,247,253,221,127, 72, 56, 7,252,221, 56,221,243, 79,128,188, 77,226, 12, 48, 79, 53, 53,156,164,185, +195,217, 82,156, 87, 91,142,124,132,147, 92,109, 94,242,114,239,223,197,117, 4,174, 5, 69, 86,192,200,204,204,100, 92,248,153, +191, 43,167,107, 58,136,252,205, 25,214,102,196,150,230,230,116, 75,207,230,194,187,153,153,153,204,234,213,171,183, 2, 24,208, +156,113,111,142,251,238, 22,215,102,225,189, 2,145,213, 36,206,230,202,247, 45,205,217, 92,101,201,157,179, 57,242,189,167,251, +222,130,247,168,185,194,217, 44,101,169, 37,242,188,135,252,115,213,188,238,156,205, 81,150,220, 57,155, 35,223,255, 25,156,205, + 81,150, 60,113, 54, 71,190,247,118,239,175, 55,131,138,253,139, 5,129,123, 1, 31,248,119, 22, 68, 45, 37, 54,155,224,192,252, +229,156,205,124,143,222,117,112, 54,231,219,205,192,230,186, 71, 45,145,223, 93, 57,155,139,223,157,167, 57,238,147, 39,206,171, + 13,175,151,112, 54,123,220,175, 54,223,255, 89,156,205,124,143,154,165, 44,185,113, 14,108,230,151,129,129, 46,191,223,109, 78, +206,230, 42, 75, 30,194,121,213,247,201, 19,231,213,134,215, 75, 56,155, 61,238,205,241, 12,105, 41,222,107, 26, 45,213,124,214, +220,156, 77,228,190,166, 56,155,216, 60, 51,164, 5,238,253, 95, 26,206,230,228,116, 15, 99,115, 54,247,180,100, 56,155,147,179, + 9, 97,189,230, 56,255,105,247,253,239,152,158,222,248,174,166, 89,202,155, 59,218, 18,225,108, 78,206, 0,185,175, 9,206,171, +184,247,215, 28,184,191, 75, 64,196,132,111,230, 55, 19, 52,179, 3,211,146,194,181, 57,195, 57,176, 37, 28,194, 22, 64,179,135, +211,241,166, 60,185, 5,226,254, 79, 73, 83, 90,150,104, 89,250,219,149, 37,183, 60, 57,176, 25,157,162,102,117,158,221, 57,155, +227, 26,174, 28,205,149, 71, 91, 58,238,205, 89,150, 90,226,222, 83, 92,133, 11, 65, 57, 41, 39,229,164,156,148,147,114, 82,206, +235,150,243,154, 4, 75,147,128,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,226, 31, 5,175,237,187,113,113, +113,171,149, 74,101, 59,111,255,235,116,186,139, 23, 47, 94, 28, 68,147,240,175, 3,189, 71, 20,255, 32,176,248,195, 65, 23, 0, + 16,199, 70, 65, 65, 65,113, 77,195,107,103,120,185, 92,158,114,242,228,201, 14,130, 32,192,110,183,195,102,179, 57, 63,205,102, + 51,250,247,239,223,228,142,244,209,209,209, 57, 18,137, 36,169, 41,231,216,237,246,243,101,101,101,125,125, 28,178, 19, 64, 10, +195,252,161, 25,197,239,222, 62, 1,148, 88,173,214,238,190, 56, 25,134, 73,113,231,243,194, 37,126,247,201, 25, 18, 18,178,159, +227,184, 4, 79, 92,222,190, 11,130,144, 95, 81, 81,209,231,207,188, 71,215, 51,162,163,163,115, 56,142,107,114,254, 44, 45, 45, +245,154, 63, 99, 99, 99, 15,177, 44, 27,215, 4, 74,137, 32, 8,185, 23, 47, 94,236,235, 67,136,236, 4,144,226,243, 13,202, 45, + 63, 49, 12, 83,108,183,219,123,250, 43, 71,190,184, 60,228, 81,127,156, 78,145,197,113, 92, 86, 84, 84,212, 51,122,189,222, 8, +128, 72, 36, 18,226, 18, 54, 0,128,205,102,171,168,169,169,233, 66,115, 34, 5, 5,197,117, 33,180, 4, 65, 96, 77, 38, 19,242, +242,242, 64,136,199,250,222,126, 5,215,235,112,224,183,141, 81,193, 81,209,176, 89, 44, 80,181,138,116,114,151,157, 56, 6,155, +213, 2,155,217,140, 54,189,122,139, 97, 64,231,206,157, 37,126, 56, 19, 62,248,224,131,168,224,224, 96, 24,141, 70, 24,141, 70, +152, 76, 38, 24,141, 70,152,205,102,152,205,102, 88, 44, 22, 88, 44, 22,216,108, 54,152, 76, 38,100,103,103,219,173, 86,171, 79, +206,105,211,166, 69,105, 52, 26, 39,159,184,137,156, 34,175,213,106,133,209,104,196,166, 77,155,124,114,114, 28,151, 80, 82, 82, + 18, 37,149, 74, 65, 8,129, 32, 8, 32,132, 52,218,220,209,182,109, 91,139,175, 64,182,208, 61,186,158,209, 97,218,210, 53, 81, + 33, 10, 57,108,130,128,204,110,109,157,127,228,127,185, 28,196,102,135, 96,179,161,253,243,163,157,251, 59,117,234,228, 51,127, + 18, 66, 18,167, 45, 93, 19, 26, 40,103, 85, 85,149,161, 99,199,142, 37,104,112,155,189, 9,173, 4,131,193, 16,229,224,191, 76, + 16,177, 44,219,104, 91,191,126, 61, 50, 51, 51,253,197, 61,225,229,151, 95,142,178, 90,173, 48,155,205, 48,153, 76,176, 90,173, +176,217,108,206,205,110,183, 59, 55,179,217,140, 61,123,246, 4,234,100,125,112,219,109,183, 61,190,102,205, 26,213,207, 63,255, +172, 74, 74, 74,130, 84, 42,133, 68, 34,129, 68, 34, 1,203,178,224, 56, 14, 55,223,124, 51, 67,179, 32, 5, 5,197,117, 35,180, + 76, 38, 83, 65,122,122, 58,113,124,143,151,203,229, 82,183,183,220,184,246,237,219,231,186,159,231,175,185, 42, 56, 42, 26, 19, + 91,135, 3, 0,222, 57, 87,229,124, 64,124,216,231, 70,231, 49,239, 93,168, 5, 0, 40, 20, 10, 48,174,175,209, 94,160, 82,169, +112,219,109,183, 65, 38,147,161,103,207,158,224,121,222,227, 38,149, 74,193,243,188,223, 68, 97, 24, 6,106,181, 26, 83,166, 76, + 17, 69, 18, 84, 65,114,140,235,211, 19, 65, 32,248,239,177,211, 48, 11, 4, 28,199, 57,183, 64, 56,165, 82, 41,142, 30, 61, 10, +142,227, 32,145, 72,156,159,226,247, 85,171, 86, 97,228,200,145,224, 56, 14, 10,133, 2,240, 51,115,176,235, 61, 50,155,205,177, + 50,153,204, 2, 64, 20,103, 82,134, 97, 98,174,228, 30, 93,207, 8, 81,200, 49,102,222, 79, 0,128,162, 89,207, 59,239,221,158, +103,223,113, 30,147,248,159, 7,192, 48, 12,120,158, 7,203,178,205,198, 89, 93, 93,109,120,232,161,135,182, 7, 7, 7,175,215, +106,181,240, 35,224, 80, 84, 84, 4,142,227,188,230,119,150,101, 49,115,230, 76,156, 57,115, 38,160,184, 27,141, 70, 44, 88,176, + 0,118,187,189, 17,175,248,221,125, 95,128, 34,235,253,161, 67,135,142, 94,179,102, 77, 24,195, 48,248,236,179,207, 32,149, 74, + 49,124,248,112, 68, 68, 68, 96,195,134, 13,144, 74,165,120,253,245,215,105,230,163,160,160,240, 85,231,241, 0,110, 4, 16,233, + 48, 17,234, 0,132,186, 28, 82,225,248,140, 20,127, 51, 12,179,207, 3, 79, 47,199, 49, 21, 12,195,236,115,249,109, 6, 32,243, +176,191, 10,128,194,177,153,208,224,254,167,185, 92, 71, 60, 15,222,174,203, 1, 13,235, 15, 1,216, 2, 96, 96,102,102,230, 86, + 0, 40, 45, 45,189,163,180,180, 20, 0,144,146,146,114, 50, 55, 55,183,163,168,121, 28,205, 83, 82,155,205,214, 65,108,170, 18, +221,162, 33, 67,134,248,124,195,183, 89, 44,151, 9, 16, 79, 90,202, 83,115,133, 55, 1, 99,177, 88,240,192, 3, 15, 0,128,215, +135,142,235, 22,128,118,131,217,108, 6,199,113, 72,109, 29,137, 73,195,210,113, 19,177, 66, 87,207,192, 86,171,195, 61,106, 43, + 78,118,238,142,249,231, 43,112, 78, 91, 15,142,227, 2,226, 20, 4,193,171,200,146, 72, 36,152, 55,111, 30, 30,122,232, 33, 72, + 36,146,128,248, 92,239, 81,114,114,242,154,220,220,220, 8,134, 97, 76,142,123, 36,183,217,108, 26,155,205, 22, 97,183,219, 35, +154,114,143,174,103,216, 4,193, 99, 62,244,150,103, 3,185, 79,129,112, 86, 87, 87, 27, 50, 51, 51,119,203,229,242,133,209,209, +209, 37,197,197,197,126,133,150,187,248,113,127,169,248,228,147, 79, 48,103,206, 28, 12, 26, 52, 40,160,112,154, 76, 38, 48, 12, +131,249,243,231, 95,246,223,212,169, 83, 47,187,158, 31, 78, 6, 0, 27, 23, 23,247,236,186,117,235, 52,226,177,173, 90,181, 2, +207,243,232,210,165, 11,130,131,131,177,125,251,118,216,237,246,128,203, 37, 5, 5,197,181, 11, 79, 90,196, 5,253, 39, 78,156, +216, 51, 43, 43,107,122, 70, 70,198,119, 59,119,238, 92,202, 48,204,106,151, 58, 49,211, 81,191,174, 22,127, 19, 66,122,185,138, + 30,135, 88,139,100, 24,102,181,120,188,235,111,241,147, 16, 50, 4,128, 76,252, 61,113,226,196,180,172,172,172,233, 19, 38, 76, +120,115,198,140, 25,210,137, 19, 39,118,205,202,202,154, 46, 94,199, 83, 56, 60, 57, 90, 62,215,158, 18,155,168, 78,157, 58,229, +173,137,202,245, 1,224,179,182, 84,181,138,116, 58, 89,239, 37, 70, 56,247, 79, 41,174,113, 62,192,230,246,104, 7,149, 74,133, + 97,239,125, 20,144, 83,100, 54,155, 81, 94, 94,238,116, 25,252,109,129,114, 42, 21, 65,200,126,185, 11,138,170,100,120,119, 87, + 53,214, 28, 62, 3,158,231,113,123,231, 46,184, 67, 26,140,183, 19,101,120,249,116, 33,172, 36,176, 62,189,132, 16,143, 2, 75, +252, 46, 54,161, 4, 42,180,220,238, 81,145,209,104,172,202,203,203, 51, 8, 13, 15,118, 5, 33, 36,140, 97,152, 58,135,203, 21, + 27,232, 61,186,158,145,217,173,173,211,117,218, 19, 60,216,185,127,164,238,168,243,158,140,159,247, 33, 0, 96, 80,247,155,253, +150,135, 64, 56,171,170,170, 12,125, 7, 15,220,106, 55,152,191, 25, 61,122,116,193,230,205,155, 21,129,132,213,147,208, 18, 93, + 91, 81,100,113, 28, 7,179,217, 28, 80,220,205,102,179,215,242, 33,149, 74,175,196,209,130, 78,167, 51,175, 92,185, 18,115,231, +206, 69, 68, 68, 4,134, 14, 29,138,216,216, 88, 44, 95,190, 28,132, 16, 60,255,252,243, 80, 40, 20,162,123, 77, 51, 32, 5,197, +245, 13, 95, 90, 68,158,149,149, 53,221, 93,200,184,254,118, 21, 80,110, 98,202, 85,172,165,249,121,254,175,118, 23, 79,226,117, + 25,134, 89, 61, 99,198,140, 76, 63,225,168,240, 38,180,124, 78,137,111, 50,153, 10,186,117,235, 22,144,154,208,235,245,165,254, +196,134,167,183,122, 87,151, 64,173, 86, 67,165, 81,131, 13,176,222,181, 90,173, 78,161,178,113,227, 70, 40, 20, 10, 12, 31, 62, +252,170, 28, 45,139,197, 2,153,148, 7,219, 42, 26, 99,102,109, 70, 85,157,193,249,128,217,146, 95,128,131,101,229,120, 57, 99, + 48, 84,138,114,212,155,205, 1, 57,111,130, 32, 92, 38,178, 56,142,195, 3, 15, 60,224,116, 19, 92,251,173,192, 71,211, 97, 68, + 68,196,126,142,227, 18, 92,238, 81, 80, 74, 74, 10,240, 71,191, 30, 70, 16,132,250,208,208,208, 31, 1,196, 17, 66, 18, 0, 4, + 7,114,143, 40, 60,231, 79,247,253,130,155, 83,117, 37,156, 85, 85, 85,134,204,204,204,221,118,131,249,155, 11, 23, 46,236, 6, + 16,116,211, 77, 55, 53, 89,104,137, 2,139,231,121,204,156, 57, 19,115,230,204,113,254, 31,168,208,178,217,108,141, 4,212,233, +211,167, 27, 93,203, 93,216,249,105, 54, 37,104, 24, 93, 40,164,164,164, 56,207,137,137,137, 65,104,104, 40, 4, 65,128, 32, 8, + 8, 10, 10,130, 66,161,128, 84, 42,165,153,142,130,130,194,151, 22, 49, 76,152, 48,225, 77,134, 97, 86, 59,156,165, 99, 62, 4, +149, 39,237,209,203, 77,172, 85,120, 57, 46,211,147,216,114,253, 46, 98,226,196,137,105,238,225,240,212, 92,233,172, 85,221,166, +221,111, 4,215, 38,170,230,122,136,249,122,144,169, 67, 53, 80,168, 84,144, 72, 88, 48, 12, 67,252,113, 89, 44, 22,103,197,255, +204, 51,207,248,236,183, 18,104,127, 42,139,197, 2,150,147,224, 98, 76, 50,236,236, 54,231,185,226,198,114, 60,206,197,116,132, +228,212, 33,240, 1, 62,112,221, 29,173,231,159,127, 30, 11, 22, 44, 0,203,178,206, 52,225, 56, 14,237,219,183, 71, 65, 65,129, + 79, 46,142,227, 18,206,157, 59, 23,229,154,142,162,136, 37,132,192,110,183,163,109,219,182,198,188,188,188, 23,105,209,189, 58, +145,229,109,191,221, 46, 4,236,194,120, 58,174,170,170,202, 48,106,212,168,173,181,181,181,223,220,112,195, 13,167,209,120, 10, + 4,191,124, 28,199, 53, 18, 88,162,200,250,244,211, 79, 27,137, 34,171,213, 26,208,139,128,213,106,189, 76,240,124,252,241,199, +141, 62, 1,160, 79,159, 62, 1, 57,195, 0, 8,203,178, 68, 42,149,226,182,219,110, 67,215,174, 93,241,243,207, 63, 67, 16, 4, + 60,247,220,115, 80, 40, 20,152, 61,123, 54,108, 54, 27, 62,248,224, 3,234,104, 81, 80, 80,248,210, 34,166, 25, 51,102, 28,155, + 49, 99,134,211, 89,114,119,180,188, 60,119,239,116,136,170, 72, 81,164, 1, 48,121, 18, 68,158, 92, 50,119, 1,230,186, 47, 43, + 43,107,186,123, 56,220,155, 43, 27, 9,173, 63, 11,165,199,143,226,163, 91,210, 1, 52,110, 46,156,119,115, 71,168,212, 42,168, +130,213, 24,181,106, 27, 0, 56, 42,253, 9, 1, 57, 90,162,208,170,170,170,242, 41,178,154,226,104,177, 50, 14, 43, 18, 46,129, +200,120,112,102,107, 35,161, 37,225,120, 20, 69, 36,131,229,165,224,236,182,128, 56, 9, 33,151, 53, 21,142, 29, 59, 22, 12,195, + 56, 71,136,117,235,214,205,149,139,241,247,112,124, 45,188,161, 15,158,123,115,236, 7,149, 70, 90, 98,175, 36,127,238,255, 18, + 39,127,120, 22, 0,208, 87,167,115,222,139,105,221,254, 24, 59, 48,235,232, 86,167,251,248, 30, 94,189, 34,206,170,170, 42,195, + 77,157,210,118, 75,195, 67,190, 57,127,254,252,110, 0,236,131, 15, 62, 24,218,173, 91,183,128,202,164, 56,184,194, 93,100,185, + 58, 89,226,167,159, 17,182, 46,194,209, 30,144,128, 18,155, 17, 3,200,243, 68,204,219, 26,141, 6,106,181,218, 57,226, 54, 40, + 40, 8, 74,165,210,217,191, 51, 64,225, 70, 65, 65,113,253, 34, 76, 20, 58, 14,177,212,200,105,114,244,173,202,116,253,237,201, +241,114, 56, 80, 57,126,234,215, 53, 14,129,230, 17,162,179,230,118,206,106,111, 34,141, 19, 21,164,235,103, 76, 76,204,175,106, +181, 58, 57,208,216, 55,101, 20,155,221,106,185,204,217, 98, 24, 6,234, 96, 53, 20,106, 21, 20,193,106,175,174,151, 47,161, 37, + 58, 69,226, 67,103,225,194,133, 80,171,213,248,215,191,254,213,228, 62, 90, 78,161, 37,101,177, 65,190, 9, 18, 25,215, 72,100, +113, 28, 7, 9,207,163, 84, 29, 11,150,231,193,217, 2,115,201,106,107,107,193,113, 28, 38, 77,154,228,124,131,119, 21, 89, 77, +137,179, 47,176, 12, 35,186, 91,242,118,237,218,189,202, 48, 76, 34,128, 36,157, 78, 39,191,120,241,226,173,180,188,250, 80, 6, +118,235,101, 46,148, 55,247,245, 74, 57, 69, 39, 75, 26, 30,242, 77,199,142, 29,157, 78,150, 82,169, 20, 71,155,250,191,199, 44, +235, 81,100,185,143, 16,228, 56,174, 33, 47,251, 25, 29,233,234,104,205,152, 49,195,201,235,234,100,137,104, 74, 57, 18,195,186, +117,235, 86, 28, 60,120, 16,207, 60,243, 12, 20, 10, 5,230,204,153, 3,155,205,134,169, 83,167, 66,161, 80, 64, 38,147,209,204, + 71, 65, 65,221,172, 70, 90,196, 13, 21,110,253,160, 24, 55, 81, 83,225, 73, 96,185, 54, 19,138,223, 25,134,177,122,224, 53,187, + 53, 41,186,239, 23, 63,171,102,204,152,177, 89,116,178, 92,246, 55, 10,135, 95, 71, 75, 46,151, 39,231,229,229, 57, 39,194,244, +245,105, 54,155, 49,104,208,160,128,157, 49,113,212, 33,199, 73, 26, 9, 11,101,176, 26, 74, 77, 48, 20,106,181,187,224, 96,252, + 85,226,226, 27,177,171,208,154, 60,121, 50, 56,142,195,130, 5, 11, 0, 0,175,190,250,106,192,125,180, 68, 78,216, 25, 20,147, +179, 72,159, 53, 18,230,111,173, 40,219,241, 59, 56,142, 67, 84,239, 59, 32,220, 52, 18,122,133, 26,156,221, 22,240,168,195,234, +234,106, 20, 20, 20, 64, 34,145,224,149, 87, 94,105, 52,215,145,251, 72,182,141, 27, 55,250,141,187, 39, 39,107,242,249,106, 39, +143, 66,161, 96,127,255,253,247,100, 65, 16, 82, 12, 6, 67,187, 62,125,250, 8,180, 40,251, 17, 69,130, 45, 32, 81, 21,104,254, +116,231, 20,251,100,213,214,214,126,115,254,252,249, 61, 0,216,209,163, 71,135, 42,149, 74,124,245,213, 87,122, 0,178,229,203, +151, 43,252,137, 34, 49,223,248, 19, 89, 60,207, 55,228,229, 64,226, 78, 26, 79, 89,226,175, 99,124, 32,121, 94, 12, 43,195, 48, +176,219,237, 80, 40, 20,141,156,172,160,160, 32,200,229,114,154,241, 40, 40, 40,252,213, 37,251, 2,174,199, 9,233,229, 34,170, +246, 93, 9,111, 83,174,231, 15,156, 55,161, 97, 50,153,112,226,196,137, 64,121, 2,158, 24,179,117,207,155,241,222,133, 90, 48, + 12,131,255,246,185, 1, 42,141, 26, 74,149, 10,247,255,188,213, 89,113, 31,157,254, 42,228, 42, 53,226,250, 13, 13,168, 34, 23, +155, 14, 93,133, 86, 77, 77, 13,120,158,199,251,239,191, 15,150,101,241,193, 7, 31, 32, 62, 62, 30, 23, 47, 94,196,242,229,203, + 3,114,180, 36,118, 9, 98, 31,235, 4,229,216, 16,104, 30,235,143,176,219, 38,227,130,153,195, 78,163, 18,253,141,199, 33,219, +240, 41,204,130, 61,224, 17, 88, 54,155, 13, 91,183,110,117,239,240,238,236, 83,101,179,217, 96,181, 90, 97,177, 88,240,193, 7, + 31, 4, 50,194,243,178,251, 38,166,161, 99, 18, 84, 73,110,110,110, 36, 33, 36, 28, 64, 8,128, 74, 90, 92,125, 35,182,247,243, +136,236,249, 52, 0, 96,213,140, 39,156,251, 39, 29,253, 35,127,206,252,182, 97, 1,128,142, 73, 67,155,196, 89, 85, 85,101,184, +125, 80,159, 28,163,192,127,221,165, 75,151, 70, 78, 86, 80, 80, 16,227,248, 29,144, 93,198,178, 44, 36, 18,201,101,205,133,222, +196, 86, 32,125,180,108, 54,155,115, 34, 81, 95,253, 25,175,196,209,122,226,137, 39, 16, 27, 27,235,116,178,222,123,239, 61, 40, + 20, 10, 76,156, 56, 17, 86,171, 21,159,126,250, 41,205,124, 20, 20, 20,127,186, 40,251, 51,224,177, 38, 53, 26,141,133, 93,187, +118,133,151,255,226,131,130,130,120,183, 72,197,181,111,223, 62,215, 67, 19,226, 16, 0,217,158, 42,117,134, 97, 16,172, 9, 70, +144, 90, 5,165,155,139, 21, 20,172,129, 92,173, 6, 43,245, 88,153, 95,198, 41,246, 45,113, 21, 90,226, 86, 91, 91, 11,158,231, + 49,119,238, 92,104, 52, 26,152, 76, 38,191,156,226, 67, 71, 34,145, 64, 95, 84,135,147,211,179, 33, 11,218,137,118, 67, 31, 66, + 44,175,128,116,251,143, 48,216,173,254, 38, 44,189,140,179, 67,135, 14,120,231,157,119, 46,155,214,193, 27,226,227,227,253,198, +221,221,201,154,121, 67, 27, 72,101, 82,140, 63, 94, 4,147,201,196, 60,244,208, 67, 2, 0, 3,128, 10,131,193,112, 62,144,244, +108, 6,252,227, 57,125,141,138, 21, 33, 16,187, 39, 1,227,145, 83,116,178,140, 2,255,117, 65, 65,129,232,100,133, 40,149, 74, +124,241,197, 23,122, 0,236,212,169, 83,149,137,137,137,146, 64,242,146, 68, 34,193,172, 89,179, 60,246,201,242, 36,186,154, 82, +142, 92,207, 29, 48, 96,128,199, 9, 75,189,136,183,203, 56,197,176, 70, 68, 68, 56,157, 44,187,221,238, 28,109, 40,206, 62,239, +227,165,130,230, 79,202, 73, 57,175, 31,206,107, 18, 30,107,224,139, 23, 47,222,238,237,132,182,109,219,230,229,229,229,181, 23, +151,226,112, 84,156, 82,163,209,216,161, 79,159, 62,126,173, 29, 65, 16, 32,151,203, 65, 8,193,173,239,100,129, 97, 1, 22,141, + 31, 98, 81,183, 12,134, 68,194, 65,104, 88,234,195,239,168, 67,131,193,208,232,225,224,105,171,175,175,135,201,100, 10,120, 54, +111,163,209,216,104, 10, 6,134, 8, 56,247,219,178,203, 70, 31,138, 91,160,253,118,130,130,130, 26, 53,253,248,113,172,152, 64, + 28, 45,215,166, 71,169, 76, 10, 78,202,139,142, 86,221,233,211,167, 71,209,108, 30, 56,196, 1, 11, 0,144,218,103, 56, 4,193, + 14, 98,183, 55, 90, 38,169, 83,242,237, 16,136, 29, 22,171, 30, 38,147,201,223,180, 39, 76,101,101,165, 97,212,168, 81, 91, 1, +252,239,158,123,238,201, 69,195,236,194, 68,173, 86,203,121,158, 23, 0, 84, 3, 32,151, 46, 93, 10,185,112,225,130, 96, 52, 26, +219,248, 11,231,154, 53,107,112,226,196, 9,244,235,215,175,209,114, 80,162, 43,234, 58,187,123, 32,249, 83,108, 46,247, 52, 35, +188, 55, 33, 23, 40, 36, 18, 9, 66, 66, 66, 32,149, 74,241,254,251,239, 67, 42,149, 66,169, 84, 2, 0, 62,253,244, 83,231,228, +171, 20, 20, 20, 20,215,141,208,242, 87,111,250,104, 86,244,217,132,104,179,217,138, 19, 19, 19,155,116, 49,187,221, 94,230, 71, +184, 21, 47, 95,190, 92,234,234, 66,248,251, 36,132,148,249,121,216, 22,175, 90,181, 74,234,201,221,240,182,192,180, 63, 78,187, +221, 94,156,148,148,228,213, 49,241, 4,171,213,122,193,159,104,205,170, 48, 52, 18, 9,227,143, 23,121, 93, 59,145,194,111, 94, +243,145, 63,223,186,210,252,121, 58, 53, 53,245, 66,104,104,232,218,232,232,232,170, 29, 59,118, 68,244,234,213, 43,194,245,152, + 94,189,122,197,186,157,102,134,247,117, 14,193, 48, 76,241, 61,247,220,227, 49,207,139,162,201, 67,254, 44,246,151,231,247,238, +221, 43,117, 61,223, 27,191, 75, 57, 42, 14, 64,184,158, 75, 79, 79,103, 93,121,188,229,125,171,213, 90, 65,115, 33, 5, 5,197, +117, 47,180, 12, 6, 67, 81,215,174, 93,109, 94,254, 59,239,235,220,170,170,170,158,205, 29, 1,171,213,218,231,159,192, 89, 89, + 89,217,172,113,183,217,108,197,142, 9, 74,125, 30, 67,179,248, 95,119,143, 0,160,188,188,252, 38, 0,208,233,116,240,183,172, + 78, 19, 4, 97,179,231, 79,155,205,214,167, 37,210,180,186,186, 58,131,230, 44, 10, 10, 10, 42,180,154, 0,186, 24,241,223, 3, + 45, 33, 90, 41, 40, 40, 40, 40, 40, 40,154, 23, 44, 77, 2, 10, 10, 10, 10, 10, 10, 10,138,150, 1,131,134,145, 3,158,208,148, +209, 4, 67,174,224,218,217,148,147,114, 82, 78,202, 73, 57, 41, 39,229,188,238, 56,253,113,211,209,140, 45, 44,192, 40, 39,229, +164,156,148,147,114, 82, 78,202,121,253,113, 94,147,160, 77,135, 20, 20, 20, 20, 20, 20, 20, 20, 45, 4,142, 38,193, 95, 6, 9, +154, 48,163,190, 63, 16, 66,194, 0,120, 91, 48,206,204, 48,204,165, 43,224,100, 0, 72, 29,155, 56,209,145, 21,128, 5,128,133, + 97, 24,226,159,227, 93,182,164, 36, 44,141,216,249, 94,132, 97,120, 65,192,225, 54,109, 90, 31, 98,152, 59,204, 0,160,138,238, +212, 89,173, 82, 12, 49, 89,204,201,114, 94,118,162, 70, 87,191,209, 84,158, 87, 72,179, 7, 5,197, 95,130,187, 0, 76, 65, 67, +183,146, 25, 0,150,209, 36,161,160,104, 33,161,165, 86,171,247,179, 44,155,224,111,126, 30, 17,142,181,204,138, 47, 93,186,212, +179, 9,215, 30,165, 86,171, 7,241, 60,127, 11, 0, 88,173,214, 29,245,245,245,155, 1, 44, 7, 96,187,194, 56,105, 0, 60, 0, +224, 17,199,239, 37,142,202, 66,123,133,124, 93, 67, 66, 66,126,224,121,158, 84, 86, 86,246, 6,128,136,136,136,221, 86,171,149, +209,106,181,247, 3, 56,210, 68, 62,150,231,249,153,189,123,247,238,191,109,219,182,255, 1,152,219, 76,247, 82,206,178,172, 71, +129, 34, 8, 66,210, 21,136, 44, 41,128,144,185,115,231, 70, 44, 94,188, 56,189,184,184,184, 11, 0, 36, 36, 36, 28, 29, 61,122, +244,161,113,227,198, 85, 17, 66,106, 25,134,177,248,226, 41, 41, 9, 75, 43, 47,205,127,166,172,252,196, 3, 0, 16, 19,219,101, +153, 68,194, 74, 9, 57,176, 75,217,234,145, 86,237,219, 37, 61,253,221, 87,115,165, 73,201,173,177,105,231,193, 27,199,189,248, +102,218, 5,224, 19, 42,182,254, 60, 4, 7, 7,239,103, 89, 54,193, 87, 25,247, 84,230,237,118,123,113,117,117,117, 79,111,156, + 28,199, 37,248,170, 47, 60,237, 19, 4, 33,191,178,178,210,227, 84, 19, 26,141,102, 23,199,113,201,129,114,137,159, 54,155,173, +216,219, 40, 93,141, 70,179, 95, 34,145, 36,248,138,167,167,255, 4, 65,200,175,168,168,240, 22,206,203,226,222, 28,225,188, 18, + 78, 95,225, 20,235, 35, 0,159, 70, 68, 68,220, 92, 85, 85,245, 40,128, 55,181, 90,109, 55,137, 68,130,240,240,240, 55,205,102, +243,153,144,144,144, 47,107,107,107,119, 2,120, 17, 0, 93, 47,149,130,162,185,160,209,104,202,234,235,235,137, 8, 65, 16,136, +213,106, 37, 38,147,137, 24, 12, 6,162,211,233, 72,125,125, 61,209,106,181,164,182,182,150, 84, 85, 85,145,200,200, 72,247,201, + 27,189,181,225,118,209,104, 52,121, 89, 89, 89,166,130,130, 2, 98,177, 88,136,197, 98, 33,133,133,133,228,163,143, 62, 50,105, + 52,154, 60, 0, 93,188,156, 59,196, 75,101,113, 27,128,165,233,233,233,230, 53,107,214, 16,163,209, 72,116, 58, 29, 89,182,108, + 25,185,225,134, 27,204, 0,150, 58,142, 97, 3,228, 4,128,190, 49, 49, 49,197,103,207,158,181,111,220,184,209, 18, 18, 18,146, + 29, 18, 18,146, 93, 88, 88,104, 63,123,246,172,208,170, 85,171, 98, 0,125,155, 16, 78, 0, 24, 57,126,252,248,178,194,194, 66, + 50, 96,192,128,195, 46,251, 25,248, 95,231,110,136, 39, 39,139, 16, 18, 67, 8,137, 69,195, 36,151,151,109,132,144, 88,199, 49, + 97, 1,114,170,242,243,243, 91, 71, 71, 71,103, 49, 12, 99,118,231, 99, 24,198, 28, 29, 29,157,149,159,159,223,154, 16,162,242, +197, 89,124,126,222,147,107,215, 12,174,209, 93, 58, 69,116,151, 78,145,255,125, 61, 80,251,212,184, 71,151,198,182,237,190, 32, + 52, 33,109,238,137, 83,167,231, 19, 66,230,111,222,151, 55,127,242,231,191,206,191,119,220,236, 47, 34, 18,211,159,106, 66,122, + 94, 13, 40, 39,128,208,208,208, 82,157, 78, 71, 8, 33,196,110,183, 19,139,197, 66, 76, 38, 19,209,235,245,164,190,190,158,212, +213,213, 57,203,121,109,109,173,243,123, 84, 84,148,215,242, 30, 22, 22, 86,102, 48, 24, 26,213, 29,102,179,217, 89,127,232,245, +122,162,215,235,137, 78,167,115,110,245,245,245, 36, 46, 46,174,200, 71, 56, 47,138,225, 20, 4,129,216,108, 54, 98,177, 88,156, +188, 70,163,177,209,102, 50,153,136,201,100, 34,137,137,137, 1,135, 51, 16, 78,163,209, 72, 18, 18, 18, 74,188,113,134,135,135, +151, 25,141,198, 70,156,174,241,119,231, 21,127,199,196,196,148, 54,133, 51,144,112,250, 74, 79, 7,230,230,230,230, 18,131,193, + 64,226,227,227,171,238,191,255,126,171,221,110, 39,107,214,172, 33,233,233,233,194,192,129, 3, 45,149,149,149,228, 95,255,250, + 23,241,241, 82, 72,203, 17,229,164,184, 18, 71,139, 97, 24,168, 84, 42,124,255,253,247, 94,151,227,112,253,222,166, 77,155, 64, +175,217, 51, 57, 57,121,235,246,237,219, 21,177,177,127, 76,136,109, 54,155, 17, 22, 22,134,231,158,123, 78,118,215, 93,119,181, + 31, 58,116,232,238,115,231,206, 13, 0,176,223, 15,223,125,145,145,145,159, 77,154, 52, 41,250,193, 7, 31, 68, 68, 68,163, 73, +183, 49,106,212, 40,220,127,255,253,210,220,220,220,135, 22, 46, 92,248,208,188,121,243, 74,235,235,235,199, 1,248,209, 23,169, + 66,161,184, 39, 46, 46,238,139,237,219,183, 71, 69, 69, 69, 33, 37, 37,133,125,253,245,215,219,119,232,208, 65,145,144,144,192, + 94,188,120, 17, 63,255,252,115,252,195, 15, 63,188,162,172,172,236,105,139,197,178, 50,128,184,203, 34, 34, 34,222,124,250,233, +167, 91,105,181, 90,219,129, 3, 7,242,196,253, 50,153,108,106, 70, 70, 70,175, 45, 91,182,124, 11,224,203, 43,113,178, 8, 33, + 90,252,209,196, 39,194, 42,254, 31,136,179, 69, 8,145, 29, 62,124, 56, 60, 35, 35,227, 71,147,201,212,253,153,103,158, 57, 63, +125,250,116,133, 70,163,209, 0, 96,180, 90,237,165, 41, 83,166,152,103,207,158,253, 70,231,206,157, 7,239,218,181,235, 62, 66, +136,213, 33,200, 46,231, 99, 24,103,120,138, 46, 84, 96,235, 78, 65,246,206,196, 87, 19, 62,156,150,124,110,223,241, 34,129, 83, +104,240, 75,206, 49,148, 85,213,227,215, 93,199, 17, 19, 17,204, 72,229,124, 90, 72,252, 13, 3,106, 47, 28,207,129,143, 25,210, + 41,154, 7, 12,195, 64,169, 84,226,151, 95,126,185,108,233, 42, 79,203, 90,113, 28,135,208,208, 80,191,171, 27, 4, 5, 5, 97, +227,198,141, 30,215, 94,244,180,164, 79, 72, 72, 8,124,189,108, 48, 12,131,160,160, 32,236,216,177, 3, 44,203,122, 92, 26,200, +125,159, 74,165, 2,235, 99,173, 43,145, 51, 39, 39,199, 47,151,248,169, 86,171,129,134,166,127,239,133, 82, 46,199,246,237,219, +189,198,217,253,187,218,177,222,171, 63,206, 29, 59,118, 52, 90,250,203,125, 73, 48,215,223, 42,149, 10,140, 31,210,176,176,176, +222, 9, 9, 9,216,187,119, 47,150, 47, 95, 30,158,150,150,134,211,167, 79,131, 97, 24, 76,159, 62,157,185,225,134, 27,248,210, +210, 82,244,235,215, 15, 63,253,244, 83, 31,173, 86, 75, 11, 12,197, 95, 2, 66, 8, 15,224, 70, 0,145,104,232,118, 83, 7, 32, + 20, 13, 43,105,200, 0, 84, 1, 80, 56, 54, 19,128,122, 0,173, 28,167, 87, 58,234, 22, 87,129, 80,225,186,248, 52, 33,164,151, +131, 91, 92,161, 34,210,229, 88,241, 26,238,191,221, 63, 61,114,115, 0,176,122,245,106,241, 97, 54, 48, 51, 51,115,171,107,228, + 2, 17, 89,226, 58,101, 30,202,180,251, 16, 77,185, 74,165,250, 97,247,238,221,138,200,200, 63,226, 96, 50,153, 80, 87, 87,135, +250,250,122,212,213,213, 33, 56, 56, 24,203,151, 47, 87, 12, 30, 60,248,135,186,186,186, 14,142, 68,243,198, 57,235,226,197,139, +209, 54,155, 13, 50,153,231, 46, 74, 44,203,162, 83,167, 78,120,243,205, 55, 49,108,216,176,152, 65,131, 6,205,114, 19, 90,151, + 13, 37, 85, 42,149, 95, 28, 56,112, 32, 74,169, 84, 34, 47, 47, 15,197,197,197, 24, 63,126,124,107, 65, 16, 80, 84, 84,132,211, +167, 79,227,194,133, 11, 88,184,112, 97,212,136, 17, 35,190,240, 32,180, 60, 13, 79,125,230,229,151, 95,238, 24, 22, 22,198,126, +244,209, 71, 53, 58,157,238,255, 28,251,223,153, 51,103,206, 99,253,251,247,143,250,247,191,255, 77,118,236,216,177,216,113,227, +188,166,167,107,159, 44, 71, 51, 31, 28,153,239,164,219, 57,157, 92,254, 7, 33, 36, 6,128,137, 97,152, 26, 15,156, 12,128,144, +161, 67,135,190, 98, 50,153,186,111,223,190,253,204, 45,183,220,146, 8,224,162,152,249, 66, 66, 66, 84,179,102,205,138,206,204, +204,204,189,245,214, 91,187, 15, 29, 58,244,149,138,138,138,233,132,144, 10,151, 62, 91, 78, 78, 65,192,225,152,216, 46,203,114, +118,141,123, 96,203, 14,179,244,213, 23, 39,159,111,211, 58,169,246,112, 94,181,253,120,126, 5,234, 12, 54,220,123,107,195, 2, +230,189,187,180,193,103,223,111,199,115, 47,189,197,255,184,108,209,253,103, 8, 84,245, 37,199,215,248, 72,207,171, 5,229,132, +179,137, 9, 60,207,227,142, 59,238, 0,195, 48,151,173,229,201,243, 60,118,237,218,133, 91,111,189, 21, 60,207,227,137, 39,158, + 8,136,147,227, 56, 12, 29, 58,212,185,142,162, 43,159,187,104,240,162, 9,178,221, 42, 91,112, 28, 7,150,101,189, 46,164,237, +206,233,175, 94, 18,195,233,139,203,245, 63,127,225,116, 44,121, 20,176,200, 10,148, 83, 12, 39,199,113,232,211,167, 15, 14, 29, + 58,228, 83,116,121,209,151,141,226,126,233,210,165, 49, 29, 58,116,200,153, 59,119,110, 56, 0, 84, 85, 85, 57, 23,188,151, 72, + 36, 56,117,234, 20,204,102, 51,222,125,247, 93,139, 86,171,253, 55, 45, 71,148,179, 37, 57,125,105, 17, 0,253, 39, 78,156,216, + 51, 43, 43,107,122, 70, 70,198,119, 59,119,238, 92,202, 48,204,106, 66, 72,166,248, 57,113,226,196,180,172,172,172,233, 19, 38, + 76,120,115,198,140, 25,199, 24,134, 89, 13, 0,238,191, 29,117, 73,166,155,136,139, 20,121, 28,101,174,209,177,158,126,187,127, +122,226,110,228,104,101,102,102, 50,142, 72, 50,174,149, 90,160, 66, 43,144,181,251, 56,142,123,126,250,244,233,209,190, 68, 86, +125,125, 61, 74, 74, 74,144,152,152,136, 39,158,120, 34,122,238,220,185,207,219,108,182,143,125,208, 74, 37, 18, 9,246,238,221, +139,242,242,114,116,237,218, 21,201,201,201,141, 14, 56,123,246, 44,214,174, 93,139,154,154, 26,244,232,209, 3,104,232,220,237, + 17,221,186,117,123,183, 83,167, 78, 67, 89,150,181, 41, 20, 10, 28, 62,124, 24,221,187,119,199,247,223,127,143, 54,109,218, 64, +169, 84, 34, 55, 55, 23, 93,187,118,197,214,173, 91, 17, 25, 25,137,244,244,116,155, 86,171,221, 86, 93, 93,189,249,220,185,115, +239,122, 11,103,124,124,252,228,167,158,122, 74, 86, 82, 82, 34,124,243,205, 55,219, 1,108, 7,240,252, 91,111,189,245,248,176, + 97,195,162, 14, 30, 60, 88,187,111,223,190, 61, 94, 68, 86, 32, 78,150,205,253,161,100,183,219, 77, 6,131,193,108, 50,153,172, + 44,203, 22, 50, 12, 99,182,219,237, 29,188,153, 16, 99,199,142,109, 91, 89, 89,249,220, 75, 47,189, 84,224, 16, 89,167,208,208, + 1, 30, 0, 96,179,217, 76,245,245,245,218,140,140,140,196,135, 31,126,248,204,210,165, 75,159, 27, 59,118,236,242,111,190,249, +166, 30,128,193,157,176, 77,155,214,135, 36, 18, 86,170,171, 11,207, 95,177,252,203,151,215,174,122,190,117, 81,209,133,246, 17, +173, 34,117, 82,117,100,201,242, 37, 95,239, 7, 96, 46,169,208,226,200,217, 82,240,188, 4, 39,138,106,209,255,246, 81,252,153, +188,105,125, 1,172,161,239,114, 45,255,178, 40, 46, 66,189,101,203, 22,159,142,214,174, 93,187,192,243, 60, 20, 10, 5,102,207, +158,237,147, 84, 20, 6,162, 91,228, 79,204,136,139,163,251,114,159, 4, 65,112, 46,244,238,190,253,223,255,253, 31, 94,122,233, +165, 70,215,112,136, 13,198, 31,167,183,240, 37, 38, 37,161,188,172,172,209,190, 64, 22,165,183,219,237,224,121, 30, 11, 22, 44, + 64,102,102, 38, 86,175, 94,237,243,243,142, 59,238, 0,203,178, 36,144,244,236,211,167, 15, 44, 22,139, 51,204,167, 78,157,242, +200, 59,111,222, 60,127,193,188, 11,192,148,238,221,187,107, 6, 13, 26,132,156,156, 28,220,127,255,253, 38,139,197,146, 7, 0, +119,222,121,103,234,220,185,115,101, 7, 14, 28, 64, 68, 68, 4,127,254,252,249,255,129,118,144,167,104, 97,120,210, 34,226, 51, + 47, 43, 43,107,186,187,136,113,133,248, 63,195, 48,171,103,204,152,145,233, 42,138, 92,127,139,174,147,155,136, 75,115,117,164, + 92, 69,148, 55, 1,229,246,188,117, 61,190,194,163,208,114, 68,108,160,171, 11, 36, 86,190,254, 68,150,143, 55,199, 70, 8, 9, + 9, 25,126,239,189,247, 58, 69,142,209,104,116, 10, 44, 81,100,137,191,115,115,115,209,179,103, 79,105, 72, 72,200,240,170,170, +170,143, 3, 16,113,136,139,139, 67,101,101, 37,142, 30, 61,138,196,196, 68, 88,173, 86,172, 95,191, 30,181,181,181,224,121, 30, + 82,169, 20, 22,139,207,190,219,232,212,169,211, 29,139, 23, 47,238,185,104,209,162, 75,226, 27,221,146, 37, 75, 64, 8, 65,100, +100, 36,244,122, 61,202,202,202,176,121,243,102,216,108, 54,168,213,106,164,164,164,200,238,185,231,158,190, 83,166, 76,225,125, + 8,173, 62,247,223,127,127,136, 70,163,193,139, 47,190, 72, 44, 22,203, 12,199,190,201,227,198,141,139, 40, 44, 44, 52, 63,249, +228,147,123, 45, 22,203, 71,162,153,232, 42,112,188,220, 88,175, 78,150,213,106, 21,211,180,160,190,190, 30,173, 90,181, 74,116, +117,182,188,137,193, 29, 59,118,244, 1, 32,153, 58,117,106, 16,128, 50,215, 48,152,205,102,212,215,215, 67,167,211, 89,107,107, +107,203, 95,123,237, 53,219,210,165, 75, 37,142,115, 78,120, 18, 90, 12,115,135, 89,163, 81,202, 8,145,188, 53,127,254,124,245, +176, 97,195, 88,181, 90,141,186,186, 58,205,175,235,214,169, 7, 15,234,155, 50, 61,235,195, 13,154,132,174,101, 59, 14,231,227, + 66,105, 45,204, 86, 43, 82, 98, 67, 26,252, 48,138, 22,135, 99, 32,139,211,209,114, 21, 21, 57, 57, 57,184,253,246,219,157,101, + 93, 42,149, 54,114,190,252,113,114, 28,135,219,111,191,253, 50,135,103,203,150, 45, 30,221, 39,127,112, 21, 69,238,226,200,147, + 0, 99, 89,214,239, 2,235,162,155,231, 73,108,185,186,250,110,226,205, 95, 51, 7, 56,142,195,184,113,227,192,243, 60, 94,127, +253,117,112, 28,135,244,244,116,112, 28,135,140,140, 12,240, 60,143, 91,111,189,181,201,113,223,189,123, 55,186,119,239,238, 12, + 83,122,122, 58,122,245,234, 5,142,227,208,175, 95, 63,240, 60,143,161, 67,135, 6,194,249,102, 93, 93, 93, 55,181, 90,141,220, +220, 92, 72, 36, 18, 48, 12,115, 26, 64, 55, 0,136,141,141, 61,163, 6,111,130,189, 0, 0, 32, 0, 73, 68, 65, 84,215,235,219, + 26,141, 70, 60,245,212, 83,140,217,108,238,250,250,235,175,191,101, 52, 26,169,208,162,104, 49,184,107, 17, 23, 24, 38, 76,152, +240, 38,195, 48,171, 69,135,202,221,121,242,244,219, 67,221, 36, 58, 80,251, 28,101,181,151,155,136,171, 96, 24,102, 31, 33,228, + 78,111,231, 2, 48,187, 9,171, 70, 77,135,174,205,134,126, 29, 45,177,242, 13, 84,104,249,131,209,104,188, 49, 42, 42,202,171, +200,114,253, 52,155,205, 72, 78, 78,134,209,104,188,177,169, 15,141,216,216, 88, 88, 44, 22,124,249,229,151,144, 74,165,144, 74, +255,208, 23,102,179,111,179,232,248,241,227, 5,187,119,239,238,222,163, 71,143,176,159,126,250,169, 98,192,128, 1,145,195,134, + 13,131, 66,161,128,193, 96,128,213,106, 69,239,222,189,209,169, 83, 39, 20, 23, 23,227,215, 95,127,173,236,208,161, 67,171, 61, +123,246, 8,165,165,165,231,124, 80,223, 54,120,240, 96, 48, 12,131,117,235,214, 85, 2,216, 39,151,203,215, 78,155, 54, 45,204, +108, 54, 11,163, 71,143, 62, 95, 93, 93,253, 18, 0,139, 76, 38,155, 51, 96,192,128,140,236,236,236,111, 5, 65,152,221,212,140, +234,158,182, 58,157, 14, 65, 65, 65,129, 76, 37,193, 87, 87, 87,119, 1, 0,149, 74, 21, 14,224,140, 51,135, 27, 12,141,196,176, +217,108, 54,134,135,135,171, 0,192,113, 14,239,133, 51,210,102,195,138,115,231,242,131, 93,251,207,133,134,134,226,145,135, 31, +102,111,233,211, 71,214,237,198, 27,135,190,253,201,162,239,227, 34, 52,230,148,184, 8, 88,237, 86,100,111, 88, 47, 16,193,186, +129, 86, 59,127,142,208, 18,197,134,187,163,197,243, 60,182,110,221,122,217, 62,169, 84,138,255,254,247,191, 1, 9, 3, 81, 84, +121,107, 58,115,107,234, 98,252, 9, 24,158,231, 33,145, 72,176, 96,193, 2, 8,130,128,151, 95,126,185, 81,115,162, 43,127, 64, +118,158,139, 8,236, 52, 89, 0, 96, 70,241, 76,185,243,124,247,240, 58,206, 9,200, 37,155, 59,119,110, 64,142,214,157,119,222, +233, 87,184,186,182, 48,184,134,235,208,161, 67, 30,121,231,207,159,239, 55, 61,237,118, 59,214,172, 89,227, 20,169, 34,222,126, +251,237,167,100, 50, 89,244,182,109,219, 80, 90, 90, 10,157, 78,135,250,250,122,244,238,221, 59,133,101,217,195,165,165,165,133, + 39, 78,156,184,151,150, 30,138, 63,209,209, 50,205,152, 49,227,216,140, 25, 51, 60, 58, 86,238,206,146, 47,231, 73, 20, 88, 14, + 65, 20, 41,138, 55, 52,116,171,217,231,239, 92, 0, 50,247,166, 67,159, 70,144,155,138,156,226,169,242, 13,164,249, 48, 64, 59, +157, 99, 24, 6, 70,163,209,163,192,114, 21, 7, 22,139, 5,213,213,213,176,219,237, 87, 60,215,151,167, 55, 89,127, 66,235,232, +209,163,255,122,252,241,199, 75, 66, 66, 66,186, 85, 84, 84,148, 11,130,112,235,174, 93,187, 34, 57,142,131, 70,163,129, 70,163, +193,218,181,107,161, 84, 42, 49,110,220,184,114,187,221,158, 19, 28, 28, 28, 97, 48, 24,126, 47, 45, 45,125,219,171,130,225,249, +161,253,250,245,195,129, 3, 7,112,233,210,165,141, 0,210, 31,125,244,209,219, 91,183,110,205, 76,155, 54,205,120,246,236,217, +217, 0,202, 85, 42,213,226,197,139, 23, 15,234,209,163, 71,240,232,209,163,177,117,235,214,249, 0,140,129,198, 89,167,211, 53, + 18, 88, 90,173, 22,117,117,117, 80,169, 84,182, 0,211,140,199, 31, 35, 12, 65, 8,113,222, 27,135,155, 37,222, 31,194,113,156, + 56,170,209,155,200,130, 74,165,154,186,104,209, 34,133,251, 32, 5,187,221,142,178,178, 50,104, 52, 26, 76,122,251,109,233,123, +227,255,221, 93,162,142,222,197,178, 12,204, 22, 82, 67, 4,243,122, 93,217,131,219,128,119,105,205,243, 39, 64, 20, 6,119,223, +125,247,101,205,133, 82,169, 20, 27, 55,110,196,136, 17, 35,156, 47, 46, 61,122,244,240,251,114, 37, 10,131,187,238,186,203,233, + 12,173, 95,191,222, 99,179,159,232, 72, 5, 34, 8,197, 99, 95,120,225, 5,112, 28,135,207, 62,251, 12,175,188,242, 10, 88,150, +197,204,153, 51,193,178, 44,222,121,231,157,128, 69,166,171,128, 41,252,176,225, 51,225, 21, 45,170,230, 69, 3, 0,130, 53, 26, + 49, 66, 77,170,123, 56,142,115, 58, 89, 55,222,120, 35,120,158, 71, 70, 70, 6, 56,142,115, 58, 89,195,135, 15,119, 77, 71, 18, + 8, 39,199,113,200,203,203,115,134, 57, 35, 35,163,145,147,197,113, 28,238,188,243,206, 64,130, 57, 61, 52, 52,116, 74,167, 78, +157, 58,207,154, 53,139,151, 72, 36, 24, 60,120,112,106, 76, 76,204, 57,155,205, 22, 49,117,234, 84,165,135,115, 20, 0,186,117, +238,220, 89, 69, 75, 13, 69, 11, 58, 90, 83, 60,252, 21,230,218,231,170, 9, 47,146,171, 93,143, 23, 57,220,197,145,195, 33,203, +241,199,229,233, 92,127,224, 68, 5,233,203, 82, 15, 68,104, 57,108,103,159, 23, 83, 42,149, 71,202,203,203, 51, 20, 10, 69, 35, +145,229, 73,112, 73, 36, 18,148,150,150, 66,169, 84, 30, 49,153, 76,205,118, 19,253, 53, 29, 2, 48,158, 62,125,122,188,203,239, + 33,195,135, 15,255,102,227,198,141,177,217,217,217,216,179,103, 15, 34, 35, 35, 49,119,238,220,139,101,101,101,255, 2,176,177, +178,178,210,239,117,219,182,109,219, 69,173, 86, 99,199,142, 29, 0,176, 21,192,191,159,123,238, 57,198,106,181, 98,222,188,121, + 58, 0,235, 66, 67, 67,215, 44, 95,190,188,123,183,110,221,100,217,217,217,218, 61,123,246,252, 22,160,200,178, 11,130,112,153, +192,114, 77,211,224,224,224, 64, 28, 45,107, 72, 72,200, 81,173, 86, 59,202, 96, 48,104,229,114,121,176, 86,171, 53,185, 10, 44, +145,159,227, 56, 62, 47, 47,175, 4, 64, 74, 72, 72,200, 81,120,105,230,228, 56,110,240,224,193,131, 57,247,123, 80, 86, 86,134, +210,210, 82, 88, 44, 22,244,232,209,131,145, 48, 86,201,165,162, 35,110,211, 58, 80,145,245, 39, 57, 90, 68, 44,235,226, 40, 65, + 79, 35, 13,215,175, 95,239,252,205,178, 44,190,254,250,235,128, 68,209,198,141, 27,125,118, 88,119,107, 58,244,107,141,139,199, +127,254,249,231, 32,132, 56,157, 44,150,101, 49, 97,194, 4,200,229,114, 76,155, 54, 13, 19, 38, 76, 0,199,113,126,155, 14, 93, + 5, 76,210,235,122,215,151,163,134, 66,225,232, 15,197, 48,140,171,216, 98, 2, 21,111,190,220,188, 64, 90, 2, 92, 57,197,243, +130,130,130,188,118,132,119,227,244,117,129, 95, 0,228,199,198,198,238,200,200,200, 8,217,191,127, 63,102,206,156, 41, 53,153, + 76,109,178,179,179,157,215,245,148, 94, 58,157, 78, 65, 75, 14, 69, 75,184, 89, 62,254,174,112,235, 95,197,184, 54,227,249,248, +116, 63, 30, 46,251, 92,121, 43, 24,134,177,122,184, 94,133, 7,113,229,126, 13,215, 99, 42,188, 58, 90,254, 42, 11,127,130, 43, + 16, 71, 75,175,215,255,182,110,221,186, 94, 15, 63,252, 48,231,171,217, 80,167,211, 33, 58, 58, 26,199,142, 29,179,233,245,250, +223, 2,112,202,154, 83,104,185, 35,187,188,188, 92, 98,181, 90,209,190,125,123,196,199,199,195,104, 52,162,166,166, 70, 2, 96, + 99,128, 28, 82,149, 74, 37, 1,128,154,154, 26,160, 97,168,105,106,135, 14, 29,112,224,192, 1, 84, 87, 87,255, 8, 96,216,148, + 41, 83,122,244,238,221, 91,250,253,247,223,235,159,121,230,153, 31,173, 86,107, 64, 74, 67, 16, 4,179,205,102, 75,102, 89,214, + 82, 83, 83,115,193, 53, 61,163,163,163,195, 85, 42, 21, 83, 86, 86,102, 13, 68,104,117,235,214,109,239,249,243,231, 49,117,234, +212,138,233,211,167,119,168,171,171,187, 84, 91, 91,107,115, 21, 91, 70,163,145,109,213,170,149,124,222,188,121, 10, 0,232,214, +173,219, 94,111, 66, 75,167,211,181, 86, 42,255,120, 49, 54,153, 76, 40, 45, 45, 69,105,105, 41,202,202,202, 80, 87, 87,135,148, +148, 20,232,245,250, 68, 90,205,252,101, 66,171, 81,243,153,107,249,118,125,144, 55,165,172,187, 10,152,187,239,190,219,217,183, + 75,116,200,196,109,197,138, 21,238, 29,204, 3, 18, 90,159,127,254, 57, 94,120,225, 5, 4, 5, 5, 97,214,172, 89,141,154, 14, +221,197,129, 32, 8, 76, 32,113, 79,126,195,128,210, 57,225,224,121, 30, 17,207,148, 53,106,162,243, 32, 56, 2, 10,231,244,233, +211,155,165,233,208,149, 51, 49,177,161,168, 44, 88,176, 0,163, 70,141,194,182,109,219,174,184,233, 48, 45, 45,109,201,234,213, +171, 67,142, 31, 63, 14,173, 86,139,138,138, 10,152, 76, 38, 20, 23, 23,123,109, 21,112,212,229, 65,180,228, 80,252,201,245,212, +190, 63,147,183, 57,175,199,249,121,128, 7, 44,180, 2,113,180, 76, 38,211,172, 23, 95,124,241,185, 33, 67,134,132, 7, 7, 7, +163,164,164,228, 50,145, 85, 95, 95, 15,181, 90, 13,131,193,128, 85,171, 86,105, 77, 38,211, 44,127,226,192,106,181, 34, 42, 42, + 10,149,149,149, 16,188,244,159,102, 89, 22, 10,133, 2,245,245,245,128,159, 78,230,158, 30, 24, 22,139, 5, 86,171, 21, 86,171, + 21, 22,139,197,239, 91,178,187,153,167, 82,169, 68,225, 1, 0,186,184,184,184,246, 65, 65, 65, 40, 40, 40, 0, 26, 70,246, 13, +185,253,246,219,249,170,170, 42,242,228,147, 79,110, 39,132, 60, 5,223,179,227,155,115,114,114,146, 1, 64,161, 80,228, 2, 64, +113,113,177,181,166,166,166,145, 83,168, 84, 42,201,136, 17, 35, 98, 9, 33,200,201,201, 73,150, 74,165, 4,222, 71, 53, 26, 87, +174, 92,121, 60, 36, 36,100,105, 86, 86,214,195,153,153,153,199,186,116,233,146,172,211,233,202, 13, 6,131,193,104, 52, 18,137, + 68, 34, 13, 11, 11, 11,218,176, 97,195,153, 93,187,118, 13,209,104, 52, 75, 87,174, 92,121,220,155,243,166, 82,169,138,245,122, +125,146,120, 79, 93, 69, 86,105,105, 41, 8, 33,200,207,207,135, 82,169, 60,239,175, 89,151,162,229, 32,190, 84,185, 59, 47,238, +251, 2, 21, 89,174,194, 96,195,134, 13, 62,231,208, 10,148,211, 85, 20,189,242,202, 43,152, 51,103,206,101,142,214,180,105,211, + 0, 0,111,191,253,118,192,125,180, 68,247,170,116, 78, 56, 98, 94,168,110, 20,118, 0, 96,196,240, 53,173,204,131,227, 56, 76, +157, 58,245,178, 78,234,174, 77,123, 1, 54,241, 53, 10,103,121,121, 57, 56,142, 67,120,120, 56, 30,121,228, 17, 12, 29, 58,212, +217, 4,217, 84,222,147, 39, 79,238,120,227,141, 55,186,166,165,165,225,253,247,223,175, 14, 13, 13, 13,254,207,127,254,195,213, +212,212, 48,190, 28, 45, 42,180, 40, 40,154, 65,104,137, 5, 44,208, 81,135, 94, 42,203, 33,104, 60,215, 70,173, 94,175,127,228, +182,219,110,251,105,217,178,101,138,182,109,219,226,228,201,147,168,174,174,134,217,108,134, 84, 42, 69,108,108, 44,106,106,106, +240,245,215, 95, 27,244,122,253, 35, 0,106,253,112,190,213,179,103,207, 47, 62,254,248,227,160,244,244,116, 84, 87, 87,163,190, +190,222, 41,132, 24,134,129, 70,163,129, 66,161,192,222,189,123,177,126,253,122, 3,128,183,252,112,122, 82,115,176, 88, 44, 78, +193, 21,128,208,114,229, 84,137,174,142, 94,175, 7, 0,107,235,214,173, 99, 0, 32, 63, 63, 31, 0, 10, 83, 82, 82,166,180,109, +219,150, 89,188,120, 49, 33,132,172,247, 34,178,156,156, 12,195, 84, 19, 66, 46, 1,136, 49,155,205, 82, 0,168,173,173,181,180, +106,213, 42, 74, 46,151, 11, 10,133, 66, 8, 10, 10, 18, 74, 74, 74,108, 54,155, 77, 10, 0,253,250,245, 51, 3, 40,117, 91,163, +208,149, 83, 32,132,104,231,207,159, 63,101,244,232,209, 25,125,250,244, 73,123,246,217,103,143, 62,249,228,147,108,124,124,124, + 88, 93, 93,157,241,244,233,211,151, 62,249,228,147,186,221,187,119, 15,225,121,254,220,252,249,243,167, 0,208, 50, 12, 35,120, +226,180,217,108,191,101,103,103,255, 43, 51, 51,147,187,112,225, 2,202,202,202,156, 34,171,172,172, 12,157, 58,117,194,174, 93, +187,236, 22,139, 37,187, 9,233,217, 92,160,156, 13, 47, 33, 68, 44,235,222, 4,150,248, 50, 21, 40,167,171, 40, 26, 53,106, 84, + 35, 23, 75, 42,149,226,135, 31,126,240, 88,111,120, 40, 87,141,226,238, 58,199,215, 27,111,188,209, 72,180, 77,154, 52,201,107, +117,230, 47, 61, 69,158,218, 5,241,141, 71, 29,122, 41,231,190,194, 41,214,157, 60,207, 99,210,164, 73, 1, 59, 90,184,188,143, +214,101,156, 98,220, 7, 12, 24, 0,189, 94,239, 20,178,222, 28, 45,127,233,105,183,219, 95,152, 51,103, 14,209,104, 52, 55,107, +181,218, 71,207,159, 63,191, 80,175,215,223, 84, 91, 91,235,211,209, 50,153, 76,114, 90,142, 40, 39, 90,102,126,174,235, 71,104, + 57, 30,146,104,221,186,117,163,181,179, 88,150,109,180, 53,165,159,129, 3, 27,242,242,242,238,187,229,150, 91,190,125,225,133, + 23,130,211,211,211,249,164,164, 36,232,116, 58, 20, 20, 20,224,216,177, 99,182,149, 43, 87,106,245,122,253,163, 0, 2, 25,117, +182,232,248,241,227,235,135, 13, 27,246, 78,239,222,189,159,158, 60,121,178, 36, 53, 53, 21,181,181,181, 8, 11, 11, 67, 84, 84, + 20, 78,157, 58,133, 85,171, 86,217, 43, 43, 43,191, 0,240, 30, 60,180,161,250,123,225,183, 88, 44,120,232,161,135, 32, 8, 2, +102,207,158,141, 64, 22, 84,118,129,197, 98,177, 16, 0,140,163, 63,151,222, 49,187, 52, 78,159, 62, 13, 0,231,146,147,147,131, + 1, 32, 59, 59,155, 65,195,252, 90,129,188,225, 19, 66,136,211,217,234,212,169, 83,129,123,229, 40, 58, 89,162, 11,230, 47,220, + 12,195, 24, 9, 33,229,122,189,126,216, 43,175,188,242,206,231,159,127,254,240,231,159,127,126,217,113, 26,141,102,233,204,153, + 51,223,123,224,129, 7,202, 25,134,241,218,143, 76,167,211,189, 61,102,204,152, 7,142, 28, 57, 18, 28, 20, 20, 4,157, 78,135, +170,170, 42, 88, 44, 22,164,164,164,160,188,188, 28,139, 22, 45,170, 51, 24, 12,239,210,226,248,215,192, 85, 24,120,115,181, 2, + 16, 89, 94, 93,157, 95,126,249,197,227, 28, 85, 77,229,116, 23, 27,129,206,109,229,235,165, 72,156,150,198,211,148, 17, 77,172, +215, 46,227,229, 56, 14, 31,125,244,145,115,210, 86, 79, 78, 86, 83, 28, 45,145, 51, 60, 60,188,193, 38, 87, 42, 33, 8, 2,238, +188,243,206,171,225, 21, 0,140,115,153,241,125,250,107,175,189, 54,165, 83,167, 78,169, 0,228,174,105,208, 68, 23,159,130,130, +194,159,208,178,219,237,197, 29, 59,118,108, 84,193,249, 91,204,212,106,181, 22, 7,120,221,245, 58,157, 46,101,230,204,153, 47, +170, 84,170, 33,122,189,190,171,163,226, 56,162,211,233,178, 77, 38,211,167,104,218, 34,208, 21, 0,158,223,189,123,247,236, 97, +195,134, 77,187,245,214, 91, 71,142, 31, 63,158, 33,132, 96,222,188,121,228,236,217,179, 43, 28, 46,214,217, 43, 73,164,240,240, +240,227, 95,127,253,117,244, 79, 63,253, 4,171,213,138, 79, 63,253, 20,193,193,193,199,171,171,171, 3,165, 40,223,180,105,211, + 55,125,250,244,121,108,215,174, 93,139, 0,252,190,117,235,214,133,125,251,246, 29,179,107,215,174, 37, 0,142,109,222,188,121, + 97,239,222,189,199,236,219,183,111, 57,128, 67, 77,168,124,157,206,150,205,230,185,165,209,139,147,229,139, 83, 75, 8,177, 60, +254,248,227,227, 31,120,224,129, 47,247,237,219,119, 83, 77, 77, 77, 87, 0, 8, 13, 13, 61,210,171, 87,175,189,203,150, 45, 59, +229,112,178,252,117,214,175,208,233,116, 35,186,118,237,250,227,251,239,191,175, 74, 75, 75,227,218,183,111,143,194,194, 66, 28, + 61,122,212,246,191,255,253,175,222, 96, 48,220, 13,224, 18, 45,142,127,157,208, 34,132, 32, 52, 52,180,209, 75,148, 56,228,191, +169,205,133,174, 15,102,113,169, 30,119, 94,111,156,190,166, 77, 16,161, 86,171,157,147,155, 6,210,101, 65, 16,124,207,199, 70, + 8,113,114,138, 91, 0, 34,203,239, 8, 65,199, 18, 56, 1,115, 6, 50,189,131, 74,165,130,213,106,117,242, 6, 48,242,179,169, +106,241, 23, 0,191, 88,173,214,211, 0,218, 81,113, 69, 65,209,130, 66,235,210,165, 75, 61, 91,248,218, 90,147,201,244,158,201, +100,122, 79,220, 97, 52, 26,175,150,243, 44,128, 7, 54,109,218,244,241,166, 77,155,196,118,132,169,240,191, 94,162, 79,156, 60, +121, 50,147,231,249,255, 46, 93,186,180, 55, 33, 4, 33, 33, 33,187, 11, 11, 11,255,211, 20, 14,187,221,254,248,174, 93,187,158, +131,163, 47,147,197, 98,121,124,199,142, 29, 47,162, 97, 61, 38,216,237,246,199,247,236,217,227,252,221,196, 7, 37, 33,132,152, + 8, 33,113, 94, 14, 49, 53,209,129, 19,157, 45,243,178,101,203,234, 1, 28,198, 31,243,100, 89, 29,155,209,173,185,208, 23, 54, +235,116,186,246,147, 38, 77,154, 46,145, 72, 6,235,116,186,120,149, 74, 85,100,179,217,126,211,235,245,111,161, 97,141, 42,138, +191, 8,102,179,249, 66,199,142, 29, 57, 79, 47, 80,190, 30,228,190, 94,172,236,118,123,113,135, 14, 29,252,190,156,121,224,188, +224, 67, 52,156, 75, 73, 73, 97, 3,229, 18, 97,177, 88,202,125,133, 51, 37, 37, 5, 77,229,244, 23,247,228,228,100,143,113,247, + 35, 8,189,198,221,102,179, 93, 17,167,175,244,244, 5,131,193,112, 41, 50, 50,178,222,104, 52,242, 38,147,137,183,217,108,141, +236, 71,133, 66, 81, 97, 48, 24,104,225,161,160,184, 26,161,245, 15,199,126, 52, 44, 47,209, 92, 48, 29, 57,114,228, 49,167, 61, + 85, 94,126,165, 60,238, 74,178,222,207,239,166, 8,163,102,119,132, 28, 66, 74,223, 76,116,149,245,245,245, 79,138, 63,196, 62, + 32, 20,127, 61,170,170,170,110,110,110,206,234,234,234,102,127, 81,171,172,172,204,104,129,184,247,188, 94, 57,125,161,164,164, +228,102, 63, 66,140, 22, 28, 10,138, 0,193,210, 36,160,160,160,160,160,160,160,160,104, 25, 48,104, 24, 57,224, 9, 77, 25, 77, + 48,228, 10,174,157, 77, 57, 41, 39,229,164,156,148,147,114, 82,206,235,142,211, 31, 55, 29,205,216,194, 2,140,114, 82, 78,202, + 73, 57, 41, 39,229,164,156,215, 31,231, 53, 9,218,116, 72, 65, 65, 65, 65, 65, 65, 65, 65,133, 22, 5, 5, 5, 5, 5, 5, 5, + 5, 21, 90, 20, 20, 20, 20,174, 72,109,221,186,245,137,212,212,212, 11, 0,198,182,240,181, 30,233,221,187,119,149, 92, 46,223, + 0, 32,149, 38, 61, 5, 5, 5, 21, 90, 20, 20, 20,215,180,200,234,218,181,235,246,147, 39, 79,118,202,206,206,142,139,143,143, +255,176, 37, 47,214,179,103,207, 15,182,109,219, 22,190,110,221,186,219, 98, 98, 98,114,174, 80,108,165,182,105,211,230, 68,106, +106,106, 49,128, 71,154, 57,136, 99, 51, 50, 50,170,101, 50,217,122, 42, 4, 41,174, 3,116, 1,208,149, 10, 45, 10, 10, 10,138, + 22, 20, 89, 59,119,238,140, 48, 26,141, 56,121,242, 36, 42, 42, 42, 14,181,228, 5,115,115,115, 47,237,220,185, 19, 9, 9, 9, + 88,178,100, 73,100,114,114,242,182, 38, 10,154,212,174, 93,187,110, 63,113,226, 68,167,236,236,236,248,168,168,168, 79,154, 51, +124, 55,221,116,211,180,109,219,182,133,109,216,176, 97,104,100,100,228,149, 10, 65, 10,138,191, 51,228, 0, 30, 99, 24,102,111, +151, 46, 93,142,164,165,165,253,206, 48,204, 46, 0,163,112,237,206,221, 25, 24, 86,175, 94,189,117,245,234,213, 91,105, 30,161, +160,160,104, 6,164,165,165,165,233,116, 58, 29,169,168,168, 32,159,125,246, 25, 9, 15, 15,183, 0,248, 13,192, 74, 15,219,155, + 0, 52, 1,114,107, 28,199,123,226,249, 45, 60, 60,220,242,217,103,159,145,252,252,124,114,252,248,113,146,154,154,106, 8, 80, +208,164,118,237,218,181, 82, 12,243,218,181,107, 9,199,113,235,155, 51, 81, 52, 26,205,177,156,156, 28,114,246,236, 89,178, 97, +195, 6, 18, 29, 29, 93, 78,197, 22,197, 53,130, 36, 0, 31,168,213,234,234,187,238,186,139,124,245,213, 87,100,213,170, 85,228, +199, 31,127, 36,179,102,205, 34,131, 6, 13, 34, 50,153,236, 2,128,215, 1,132, 94, 79, 90,132,113, 68,140, 0, 24, 8, 0,153, +153,153, 84,108, 81, 80, 80, 92, 45,118,234,245,250, 12,189, 94,143,186,186, 58,180,110,221, 26, 60,207,123, 60,176,188,188, 28, + 59,118,236,192,184,113,227,142,151,150,150,246,135,239,117, 47,195,186,119,239,190,115,243,230,205,169,193,193,193,206,157,130, + 32,192, 98,177,192,106,181,194, 98,177,192,100, 50,193,100, 50, 65, 38,147, 65,161, 80, 32, 60, 60,252, 40,124, 55, 97, 56,221, + 55,131,193,128,131, 7, 15, 98,244,232,209, 21, 85, 85, 85,253, 1,228, 54, 99,186,164, 70, 69, 69,229, 44, 90,180, 40, 50, 37, + 37, 5,231,207,159,199, 19, 79, 60, 81,121,238,220,185,126,205,124, 29, 10,138, 63, 19, 19,238,187,239,190,105,209,209,209,108, +151, 46, 93, 16, 27, 27, 11,147,201, 4,131,193, 0, 66, 8, 56,142, 3, 33, 4,181,181,181,200,201,201,193,230,205,155, 77,151, + 46, 93,250, 26,192,167, 0,242, 92, 68,214, 53,169, 69,156, 66, 43, 51, 51,147,161,121,133,130,130,162,153,112,164,182,182,182, +139,201,100,130, 78,167, 11,232,132,252,252,124,140, 29, 59,246,120,105,105,233, 45,240,188,168,188,166,123,247,238,123,114,114, +114, 82,141, 70, 35,180, 90,255,235,206,203,100, 50, 4, 5, 5, 33, 34, 34, 98, 23,128, 62,222,222,196,187,116,233,178,127,215, +174, 93,225, 6,131, 1,135, 14, 29,194, 35,143, 60, 98,169,174,174,222, 14,192, 91,224,171,209,176,142,234, 57, 15,255, 37, 2, +120,209,241,134,239, 9,170,200,200,200,190,139, 23, 47,150,182,109,219, 22,122,189, 30,163, 70,141,170,206,205,205,237, 5,160, +128,102, 29,138,127, 32,114, 79,158, 60,217,193,110,183,163,178,178, 18, 38,147, 9,122,189,222, 41,180, 36, 18, 9, 8, 33,176, +217,108,206, 23,163, 3, 7, 14, 32, 59, 59,155,228,231,231, 79,118,148,165,107, 86,139, 80,161, 69, 65, 65,209, 18, 72,237,208, +161,195,161, 95,127,253, 53, 72, 42,149, 98,213,170, 85,152, 60,121,178,181,186,186,122,155,187,120,137,142,142, 78, 91,184,112, + 97,114, 74, 74, 10,126,255,253,119,220,127,255,253,111, 1,152,238,129,243, 77,173, 86, 59,205, 98,177,224,208,161, 67, 24, 51, +102, 76, 65, 89, 89,217, 49,119, 17,147,156,156,220,239,147, 79, 62,225,123,244,232, 1,173, 86,139,145, 35, 71,234, 79,157, 58, +213, 27,192, 49, 47, 97,253,164,186,186,250, 21,187,221,142,186,186, 58, 36, 36, 36, 64, 42,149,250,140,156,193, 96, 64, 82, 82, +210,174,138,138,138,203,196, 91, 68, 68,196,166,243,231,207, 15, 82, 40, 20, 62, 57, 44, 22, 11,138,139,139, 33,147,201, 96, 50, +153,208,174, 93,187,175, 1, 60, 78,179, 14,197, 63, 81,104, 29, 62,124,184,195,119,223,125,135,238,221,187,163,115,231,206,168, +175,175,119,138, 46,179,217, 12,171,213,122,217, 73, 90,173, 22, 47,191,252,114, 30, 28,205,231,215,170, 22, 17, 59,166, 77, 17, +219, 68, 51, 51, 51, 7,208, 60, 67, 65, 65,113,181, 21,111, 94, 94, 94,250,144, 33, 67,182,173, 88,177,162,213,240,225,195,209, +174, 93, 59,254,222,123,239,141,212,235,245,131, 93, 15, 44, 43, 43, 11, 27, 51,102,204,254,162,162,162,100,199,174, 94, 94, 56, +123, 5, 7, 7, 35, 63, 63, 95, 20, 89, 61,225,214,204, 40,147,201,214, 31, 62,124,152,151,201,100,216,183,111, 31,198,142, 29, + 91, 89, 80, 80,224,175, 89, 46,212,108, 54, 67, 34,145, 0, 0,138,139,139,253, 70,238,252,249,243, 16, 4,193,228,233, 63,150, +101,229, 7, 14, 28, 64, 92, 92,156, 79, 14,150,101,221, 5, 93, 13,205, 54, 20,255, 80, 88,205,102, 51,122,246,236,137,130,130, + 2, 28, 56,112,192, 41,184, 42, 43, 43, 81, 82, 82,210,232,224,189,123,247,226,224,193,131,232,223,191,191, 59,207, 53,169, 69, +156,202,113,245,234,213, 3, 28,145,219, 74,243, 12, 5, 5, 69, 51, 33, 53, 46, 46, 46,103,209,162, 69,145,177,177,177, 24, 52, +104, 80, 81,105,105,105, 27, 15,199,173, 36,132,220,157,159,159,143,182,109,219,174, 2,112,207,149, 28,147,152,152, 88,177,111, +223,190, 86,199,143, 31,199, 35,143, 60, 82,225,232,243,229,175,239, 83,114,167, 78,157,246,109,216,176, 33,156,101, 89, 28, 59, +118, 44,144,166,195, 66, 52,244, 47, 57,231,225,191, 68, 0,147, 0,132,123, 57, 87,213,161, 67,135,190,251,247,239,151, 50, 12, +131,194,194, 66,177,233,176,167,131,151,130,226,159,134, 17,113,113,113,255,123,238,185,231, 66,122,247,238,141,226,226, 98, 92, +184,112, 1,151, 46, 93, 66,122,122, 58,210,210,210,112,246,236, 89,172, 95,191, 30, 7, 15, 30,132, 92, 46, 71, 66, 66, 2,212, + 75,191,195,127, 25, 28, 7,144, 70,181, 8, 5, 5, 5,197, 85,136, 45,169, 84,186, 62, 62, 62,190, 28,158,231,165, 10, 27, 57, +114,100,137,221,110, 39,103,207,158, 37,104, 24, 61, 8, 47, 66,139,156, 61,123,150, 68, 71, 71,231, 3, 8,243,112,204,216,152, +152,152, 34,165, 82,121, 20, 77,156,214,161,125,251,246, 21,167, 78,157, 34, 69, 69, 69,100,221,186,117, 36, 34, 34,162, 37, 70, + 4,166,118,236,216,177,178,174,174,142, 24,141, 70,146,147,147, 67, 18, 19, 19, 43, 64, 71, 30, 82,252,243, 17, 12, 96,106, 74, + 74,138,241,227,143, 63, 38,235,215,175, 39, 11, 22, 44, 32,211,166, 77, 35,227,199,143, 39, 25, 25, 25, 36, 35, 35,131,140, 26, + 53,138,188,242,202, 43,228,246,219,111, 39,106,181,186, 22,192,189, 52,233, 40, 40, 40, 40,154, 23,137, 0,102, 57, 4,213,202, +145, 35, 71,150,152, 76, 38,114,225,194, 5,242,195, 15, 63, 16, 52, 76,221,224, 9,111,150,150,150,146,210,210, 82,113,106,132, +124,252, 49,173,195, 87, 14,222,171, 18, 65, 73, 73, 73, 21,251,247,239, 39,133,133,133,100,237,218,181,196, 33,216,154, 13, 10, +133, 98,131, 86,171, 37, 70,163,145,108,218,180,137, 78,239, 64,113, 45, 34, 10,192,220, 27,110,184,193, 58,123,246,108,178,114, +229, 74,242,217,103,159,145, 17, 35, 70,144,215, 95,127,157, 60,248,224,131, 36, 50, 50,210, 4, 32, 11, 64, 8, 77,174,171, 7, + 93,217,156,114, 82, 78,202,233,142,245,199,143, 31, 39, 34,236,118, 59,185,112,225, 2,217,176, 97, 3,137,137,137, 57,134,198, +243,105,185,114,106, 58,119,238,124,242,212,169, 83,228,252,249,243,196, 98,177, 56, 57, 78,158, 60, 73, 0,108,109,134,112,166, +198,199,199,151,111,217,178,133,156, 58,117,138,196,196,196, 20, 53,103,220,147,146,146,202, 43, 42, 42,200,166, 77,155, 72,100, +100,164, 63,145, 69,243, 18,229,252, 39,115, 38, 1, 88,220,163, 71, 15,251,156, 57,115,200,211, 79, 63, 77, 18, 19, 19,237,142, +151,162,248,235, 73, 8, 93,223,179,180, 82, 80, 80,252, 21,144,239,222,189, 27,114,185,220,185,227,247,223,127,119,157, 71,203, +219,188, 13,218, 19, 39, 78,220, 50,124,248,240,109,115,230,204,233,236, 58,138,105,203,150, 45, 0, 96,106,134,176,229, 94,184, +112,161,255,176, 97,195, 62,141,136,136,184,177,180,180,244,157,230,140,120, 97, 97,225, 43, 93,187,118,157, 94, 87, 87,167,213, +235,245,163, 64,231,206,162,184,118, 81, 8, 96,244,129, 3, 7, 62, 60,112,224,192, 91, 0, 8,128,247, 1,156,184,222, 18,130, + 10, 45, 10, 10,138, 63, 27, 99,159,124,242, 73,247,206,226,251, 0,252,159, 15,145, 37,226, 82, 65, 65, 65,159, 59,239,188,243, + 57, 52, 30,157, 40,118, 78,111, 14,228,154,205,230,161,238, 35,165,154, 9, 75, 74, 75, 75,151,208, 44, 64,113, 29,225, 24,128, + 7,175,231, 4,160, 66,139,130,130,226,207,198, 57, 0, 79, 92,197,249, 90,120,158,103,139,130,130,130,226,111, 7,186,168, 52, + 5, 5, 5, 5, 5, 5, 5, 5, 21, 90, 20, 20, 20, 20, 20, 20, 20, 20,255, 44, 48,240, 62,114, 32,187, 9, 60, 87, 50,162, 33, +155,114, 82, 78,202, 73, 57, 41, 39,229,164,156,215, 29,167, 63,238,108, 80,180,168, 0,163,156,148,147,114, 82, 78,202,249,207, +230,100, 28, 27,235,216,196,223,127,231,184, 51,127,227,184, 95, 47,156,215, 36,254,170,206,240,226,141, 16,208, 48,228,147,226, +239, 7,215, 2, 66,232,125,162,160,160,104, 98,221, 33,113,121,216,218, 29, 27,254,134,117,137,171, 40, 16,174,242,185,212, 18, +113,191,158, 57,175,121,161,117,163, 74,165,154, 44,147,201, 82, 24,134,177,235,116,186, 35, 38,147,105, 62,128, 93, 87,121,205, +175,162,163,163,199, 86, 85, 85, 9, 44,203,130,101, 89, 48, 12, 3,150,101,193,243,188,161,182,182, 86,115, 37,164,145, 93, 70, +188,202, 49,204, 11,118, 98,159, 95,126,116,213, 52,127,251, 41,124, 23, 24,169, 84,122, 95,120,120,120,104, 69, 69, 5, 97,217, +134,174,124, 18,137, 68, 92, 8,215, 86, 91, 91,251, 77,160,100, 97, 97, 97,123,195,195,195, 67,197,243, 25,134, 65, 85, 85, 85, + 77,121,121,249, 77, 0, 16, 20, 20,180, 67,165, 82, 69,112, 28, 7,137, 68, 2,137, 68, 2,189, 94, 95, 85, 85, 85,117, 11,189, + 21,255, 76, 44, 95,190, 92, 50, 44,254,137,118, 28, 49,116, 99, 89, 18, 34, 8, 76,173,141, 81,252,190,254,194, 87,103, 2, 57, +127,212,168, 81,118,154,138,127, 30,100, 50,217,236,232,232,232,127,215,215,215,235, 25,134, 33, 12,195,128, 97, 26,222,179,220, + 63,237,118,123,113, 85, 85, 85, 79, 63, 15, 91, 94, 38,147,205,140,137,137, 25,163,215,235,245, 14, 62,143,188, 0, 96,181, 90, +139, 43, 43, 43,123, 6, 84,215, 71, 70,206, 87, 40, 20,143,234,245,122, 29,195, 48,130,235,127,132, 16,215,135,249,217,202,202, +202,126,254,132,129, 76, 38,251, 52, 58, 58,250, 95,142,184, 59,195,121,181,113,143,142,142, 30,163,211,233, 2,226,244, 17,247, +203, 56, 91, 34,156,127, 83,206,107, 95,104,165,167,167,127,183,103,207,158, 14, 60,207, 3, 0,140, 70, 99,215,185,115,231, 62, +246,198, 27,111,100, 1,152,120,133,215, 91,216,175, 95,191,135,114,114,114,216,149, 43, 87,178,189,122,245, 2,195, 48,176,219, +237,176,219,237,232,210,165,139,226, 74, 35, 18,162, 82, 78, 56,184,241,191, 65, 55, 14,121,242,133,114, 96,154,191,253,190, 4, + 38,128,183, 1,164, 52, 49, 8, 21,142,116, 57,232, 69,108,236,100, 89,182, 73,156,130, 32,228, 95,186,116,169,143, 15, 1,211, +236,156, 14,145,117,127,191,126,253, 66,178,179,179,153,162,162, 34, 70,161, 80, 64, 16, 4,216,237,118, 88,173, 86,220,112,195, + 13, 77,114, 66, 67, 67, 67, 53, 19, 38, 76,104,119,199, 29,119,224,135, 31,126,192, 99,143, 61,134,190,125,251,230,149,151,151, + 3, 0, 84, 42, 85,196,241,227,199, 59,132,135,135, 67,175,215,163,182,182, 22,183,221,118, 27,170,170,170,254,209,133,235,230, +244,132,247, 25,150,113,206, 21, 69,108,246,234, 61,191,151,188,125,181,188,225,225,225, 7,229,114,121,180, 95,181,236,242, 32, + 51, 26,141,101,213,213,213,221,253,156,146, 4,224, 46,137, 68,210,158,227,184,142, 0,146,108, 54, 91, 52, 0, 72,165,210, 50, +137, 68, 82,104,181, 90, 79,153,205,230,211, 0,126,129,143, 5,144,135,197, 63,209,142,177,233, 71,214,153,132,225,202,182, 89, +169,250,179, 19,114,149,114,253,218, 97,241, 79,172, 8, 84,108,253,133, 72, 5,176, 12, 13, 11, 74, 63,141,134,121,128,174, 6, +241, 0,238, 70,195,154,143,201, 22,139,165, 18,192, 1, 52,244, 67,201, 3,144, 24, 25, 25,185, 68, 16, 4, 83, 85, 85,213, 19, +240,176, 80,117,239, 30,173,247,179, 44,155, 32,122, 2, 2,177, 23,239, 62, 80,220, 44, 15, 40,150,101, 63,205,204,204,252,215, +138, 21, 43,148, 7, 14, 28, 80,118,238,220,217,249, 66, 36, 8, 2, 26,107, 23, 32, 57, 57,217,159,171,193,177, 44, 59,123,228, +200,145, 15, 47, 94,188, 88,121,238,220, 57,101, 92, 92,156,147,211, 85,108,137,136,139,139, 11, 52,239,127, 53,116,232,208,209, +139, 22, 45,226, 87,173, 90,165,104,213,170, 21, 34, 34, 34, 32,149, 74, 47, 59,246,150, 91,110, 17,252, 71,157,253,244,158,123, +238, 25,253,253,247,223, 43,247,236,217,163,236,210,165, 11, 36, 18,201, 85,199,125,196,136, 17, 15,127,247,221,119,202, 35, 71, +142, 40,219,183,111, 15,209, 84,112,231, 99, 89, 22,173, 91,183, 14,136,243,238,187,239,126,120,217,178,101,202,131, 7, 15, 42, + 59,118,236,232, 76, 79, 66,200, 21,135,243,111,206,121, 93, 56, 90, 50,139,197,130,173, 91,183,130,101, 89,132,135,135, 99,236, +216,177,216,184,113,227,132, 77,155, 54,173,190, 2,103,235, 43,135,200,226, 1,224,199, 71, 71, 32,159, 7,198,149,155, 33,149, + 74,113,246,236, 89, 72, 36,146, 38, 91,139,114,185,124, 12, 33,100,146,254,194, 62,185,193, 96,133,177,100,191, 82,161, 80, 56, + 31, 0,250, 18,199,254,139,251,149, 10,133,226,172, 68, 34,153, 90, 95, 95,191,208, 27, 95,251,246,237,191, 61,118,236, 88, 39, + 79, 5,215, 23,244,122, 61,218,180,105,147, 88, 93, 93,221,222,211,255, 60,207, 39,156, 59,119, 46, 74, 38,147,129, 16,226, 44, +196,238,159,226,119,139,197,130, 27,110,184,193,226,235,154,190, 56,109, 54, 27,130,130,130, 32,186, 81,102,179, 25,245,245,245, +254, 56, 25,169, 84,122,159, 40,178, 0, 96,233,210,165,136,137,137, 65, 84, 84, 20, 84, 42, 21, 20, 10,133,147, 51, 80, 72, 36, + 18, 12, 27, 54, 12,239,190,251, 46,178,178,178,240,218,107,175, 53,170,104,121,158, 71,120,120, 56,214,173, 91, 7,141, 70,131, +196,196, 68,136, 2,255, 31,109, 11,178, 76,248,174,253,231,157, 14,237,237,183,118,226,110,238,206,125,238,120, 84,130,101, 1, + 65,104,120,116, 50, 12,136,205, 42, 92,218,127,164,228,157, 0,210, 51,174,176,176, 48, 42,208, 52,178,217,108,136,139,139,147, +248, 57,108,120, 90, 90,218,143,207, 62,251,172,180,125,251,246,140, 84, 42, 5,199,113,224, 56, 78, 20,232,137,132,144, 68, 65, + 16, 6,150,149,149,145,185,115,231,126,184,101,203,150,123, 1,172,245, 88,177, 16, 67,183, 58,147, 48,124,219, 33,220, 52,114, +200, 27, 88,183,124,194, 77,253,210, 5, 4, 43, 13,103, 0,252,157,133, 86,106, 90, 90,218,161, 61,123,246, 4, 89, 44, 22,244, +238,221,123,119,110,110,110, 15, 92,217, 12,238, 97, 0, 62,153, 56,113,226,232,103,159,125, 86, 18, 26, 26, 10,153, 76,134,186, +186, 58,156, 57,115,102,204, 55,223,124, 67,190,248,226,139,255, 3, 16, 92, 88, 88,152,177,119,239, 94, 12, 26, 52,232, 69, 0, + 47, 95,174, 8, 36, 9, 59,246, 22, 68,137,191,239, 30,214, 85,154,209,147, 45,107,112,113,220,143, 38, 16,236, 66,241,222,195, + 23, 2, 17, 98, 31,142, 24, 49,226,145, 21, 43, 86,168, 1, 96,222,188,121,184,239,190,251, 16, 30, 30, 14,165, 82, 9,169, 84, + 10,158,231, 27,125,250,121,216, 74, 0,124,248,224,131, 15,142, 92,188,120,113, 48, 0, 44, 94,188, 24, 35, 70,140, 64, 68, 68, + 4,130,131,131, 33,147,201, 32,145, 72,154,156,152,225,225,225, 95,245,189,233,166,199, 23, 45, 90, 4, 0,120,235,165,151,112, +199,205, 55, 67,173, 84, 64,169,144, 65, 76, 11,153,132,199,237,227, 94,240,171, 47, 1,124,124,223,125,247, 61,240,253,247,223, + 7, 3,192,129, 3, 7, 80, 94, 94,142,232,232,104, 40, 20, 10,200,100, 50,103,156, 25,134,129, 66,161, 8, 40,238,247,221,119, +223,200,239,190,251, 46, 24, 0, 22, 46, 92,136, 97,195,134, 57,227, 46,151,203, 33,149, 74, 27,109,238,162,211, 19,231,189,247, +222, 59,114,217,178,101,193, 0,240,205, 55,223, 96,200,144, 33, 8, 11, 11,115,166,167,200,213,148,123,244, 55,231,188, 62,132, +214,161, 67,135,238, 87,169, 84, 51, 0, 68,202,100,178,208,135, 31,126,184,245,227,143, 63,142, 7, 31,124, 16,155, 54,109,122, +170,137, 66,139,137,142,142, 30,155,147,147,227,124, 66,155,201,101,130,169,201, 15,112, 7, 38,237,127,234,169,152,172, 51,245, +216,189,247, 20,130,192, 50,123, 63,254, 56,210,120,250, 52,236,102, 51,222, 59, 91,215,176,223, 70,152,173,175,140,139,185,113, +246,255, 77, 2,176,208,135, 11, 32, 55,153, 76,200,203,203,107, 82, 32,138,138,138, 32, 8,130,201,151,187, 32,149, 74,113,244, +232,209,203, 84,189, 39, 36, 38, 38,250, 42,128,126, 57,215,175, 95,143,241,227,199,227,212,169, 83, 16,151, 42, 9,128,147, 9, + 15, 15, 15, 21, 69,150, 40,130, 20, 10, 5,120,158,103, 56,142, 99,196,166, 61, 71,225, 10, 72, 24,179, 44,139,111,191,253, 22, + 31,124,240, 1, 94,127,253,117,204,159, 63, 31,221,186,117,251, 35, 19,114, 28,180, 90, 45,194,194,194, 16, 22, 22,214, 72, 32, +254,147,225,126,155,103,206,154,163,132, 64, 26, 58,129, 16, 1, 16, 0, 2, 2,129, 8, 40,187,112, 6,147,223,253, 40,224,167, + 15,207,243, 56,125,250,180, 51, 31,136,206,176, 40,140, 92, 93,131,164,164, 36,191,121, 73, 42,149, 78,249,249,231,159,101,223, +126,251, 45,190,255,254,123, 48, 12, 3,185, 92, 14,149, 74,133,208,208, 80, 68, 68, 68, 56,183,132,132, 4,230,127, 61,184,254, +121, 0, 0, 32, 0, 73, 68, 65, 84,255,251,159,180, 91,183,110, 83,180, 90,237, 90,207,247,156,132, 40,219,102,165,142, 28,242, + 6, 0, 96,228, 27, 4,151,242,166,221,200,214,188,243,119, 94, 68, 54,181,107,215,174,219,119,238,220, 25,164,215,235, 33, 8, + 2,214,174, 93,171, 28, 50,100,200,182,130,130,130,126, 77, 21, 91, 73, 73, 73,171,118,238,220,121, 75,100,100, 36,106,107,107, +161,213,106, 97,181, 90, 33,145, 72,144,152,152,136, 15, 63,252,144,185,231,158,123,158, 31, 51,102,140, 81,161, 80,136,206, 70, +146,231,188,212, 56, 51,205,253,236,243, 80, 66, 26,242, 15, 17, 72,163,207,234,242, 66,188,244,202,228,128,194,216,186,117,235, +167,127,248,225, 7,181,171,179,228, 42, 2, 92, 69,150,184,249, 17, 6,108,155, 54,109, 30, 95,178,100,137,147,179, 85,171, 86, +224, 56, 14, 60,207,131,227, 56,176, 44,139,109,219,182, 97,198,148,137, 8,139,140,195,156,207,230,249, 13,103,100,100,228,252, + 97,195,134, 61,186,112,225, 31, 85,119,215,182,109,113,231, 45, 55, 35,170,149, 6,173,194,130, 27,210, 73, 96,240,251,169, 2, +191,207, 35, 0,108,235,214,173,159, 88,190,124,185,218,245,133, 80,140,171,248,242, 44,186,248,102,179, 25, 61,123,246, 12, 40, +238,174,156,162,219, 38,138, 54, 49, 61,197,235,136,229,213, 79, 56, 31, 23,133,176, 67,112, 54,226,224,121, 30,203,215, 45,242, +234,102, 95, 41,103, 83,239,187, 59,103, 97, 97, 33,166, 79,159, 14,241,165,205,181,171, 80,124,124, 60,230,204,153,227,183, 94, +114, 43, 3,189, 0, 68,186,236, 50, 3,144,185,124, 86, 48, 12,179,207,195,113,226,126,222,209, 98, 21,137,134,126, 99,117, 0, + 66, 61,240,121,227,169,116, 60,243, 34,221,142,111,116, 29,175, 66,107,245,234,213, 98, 41, 30,152,153,153,185,213,241,189, 70, + 46,151, 23, 41,149,202, 24, 0,117,107,215,174,197,127,254,243, 31, 56,172,213,187, 67, 66, 66,142,121,112,117, 14,153, 76,166, + 55, 0,148, 57,118,137, 67, 52,217,234,234,106, 97,227,198,141,236,226,123,135,194, 76,128,244, 73, 51, 48, 44, 51, 19,235,227, +101,144, 0,184,233,100, 37,148, 74, 37,167,213,106,173,174,253,182, 60,244,221,202,118,203, 80,146, 32,142, 67,239,237,107, 48, +126,251, 26,220,164,146,161,106,197, 50,212,237,200, 1,203, 50,232,175,106,133,215, 30,217,136, 62, 26, 57,100, 38, 29, 88,150, +245,148,179,157,156,121,121,121,163, 52, 26,205, 12,183, 4, 14, 4,249,104, 88,199, 9, 94,194, 9, 66, 8,186,117,235, 6,134, + 97,156,110,129,184,137,133, 78,220, 14, 30,244,216, 2,233,149,211,209, 4, 7,149, 74,133,223,126,251,205,121,204,224,193,131, + 97, 52, 26, 17, 30, 30, 30, 16,103, 69, 69, 5, 41, 41, 41, 97, 22, 47, 94, 12,158,231, 17, 17, 17, 1,165, 82,201, 44, 90,180, +104,162, 84, 42, 77, 48, 26,141,130,217,108,134, 76, 38,155, 35,222, 31,142,227,116, 90,173, 54,194, 27,167, 68, 34,193,179,207, + 62,139, 87, 95,125, 21,243,231,207,199, 83, 79, 61,117,153,227,101, 52, 26,209,170, 85, 43,167,216,242, 80, 0, 91, 98,184,111, +203,114, 10, 4,199, 14,174,199,241, 35,217, 16,236, 2,236, 2, 1, 33,118, 8, 54,224,192,198,221, 29, 46,230,151,196, 19,144, +134,174,183, 0,228,181,245,182, 1, 17,178,142, 0, 86,110,173, 50,207,246, 23, 78,142,227, 96, 52, 26,241,243,207, 63,227,228, +201,147, 88,187,118, 45, 12, 6, 3, 90,181,106,133,208,208, 80,220,124,243,205, 24, 51,102, 12,146,146,146,252,198,157, 16,178, +176,168,168, 40,189,111,223,190, 76, 77, 77, 13,106,106,106, 96, 48, 24, 96,183,219, 97,179,217,192,113, 28,130,130,130,160, 80, + 40, 16, 29, 29, 13,163,209, 72, 76, 38,211, 66,111,156,130,192,212,234,207, 78,200, 93,183,124,194, 77, 35,223, 32, 88,241, 1, +131,118,109,228,250,223,246, 7, 63,190,114,251,107,183, 1, 32, 2,113, 90, 11,196,106, 23, 42, 95,157,248,201,243,127,250, 61, +186, 92,100, 69, 24, 12, 6,212,213,213, 53,216,250, 50, 25, 86,172, 88,209,234,174,187,238,202, 41, 41, 41,233,239, 67,108, 93, +198, 25, 28, 28,156, 40,145, 72,112,244,232, 81,124,241,197, 23,248,237,183,223, 80, 86, 86,118, 41, 46, 46, 46,100,224,192,129, +236, 75, 47,189,132,244,244,116,124,253,245,215, 65,254, 56, 9, 33, 40,204,219,134,194,211,219, 33, 8, 13,174,117,195,230,249, + 59, 9, 48,238, 58,157,206,120,232,208, 33,245,151, 95,126,137,168,168, 40, 36, 39, 39, 67,169, 84, 34, 40, 40,168,209, 67,214, +245,193,235,175,108, 26, 12, 6, 99, 97, 97,161,250,187,239,190, 67, 68, 68, 4,146,146,146,160, 84, 42, 33,147,201,192,113, 28, + 24,134,193,226,197,139,177,244,221, 71, 80,120,234, 8, 70,220,121,155,223,112, 42,149,202, 71, 23, 46, 92,216,200, 2,137, 14, + 11, 3,199,179,144,240, 12,194, 6,223, 11, 0,184,180,233, 39, 95,179, 67,186,114, 50,117,117,117,198, 61,123,246,168,247,239, +223, 15, 65, 16,144,148,148, 4,189, 94, 15,141, 70,227,140,255,198,141, 27,113,207, 61,247,224,219,111,191, 69, 70, 70,134,223, +184,215,215,215, 27,143, 28, 57,162, 94,178,100, 9,194,195,195,209,186,117,107,103,220,197,141,231,121, 72, 36, 18,164,164,164, +160,182,182, 22,106,181,218,239, 61, 58,112,224,128,122,201,146, 37, 8, 11, 11, 67, 66, 66,130,211,113, 19,197,209, 7,159,191, +219,136, 32,136,137,189,106,206,166,222,119,119,206, 17, 35, 70,160, 93,187,118,208,104, 52, 80,169, 84, 78,110, 95,156, 94,180, +136, 83,111, 51, 12,179,218,165, 76,100, 50, 12,179,218,245,211,219,113,142,175,253, 39, 78,156,216, 51, 43, 43,107,122, 70, 70, +198,119, 59,119,238, 92,234,141,207, 27,207,196,137, 19,211,178,178,178,166,187, 30,239,225, 58,222, 29,173,204,204, 76,198, 17, + 73, 6, 64,114,143, 30, 61,246,109,218,180, 41, 60, 56, 56,216,121,240,249,243,231, 81, 83, 83,131,224,224, 96,205,204,153, 51, + 53, 3, 7, 14, 68,116,116,180,243, 13, 32, 47, 47,239,134,212,212, 84, 45, 0,119,223, 86, 96, 89, 22,125,250,244,193, 49, 71, +107,199,176,204, 76, 36, 36, 36, 56, 59,121, 4, 5, 5,225,249,231,159,103,198,143, 31,207,137,110, 6, 33, 4, 6,131, 1,177, +177,177, 10, 95,174, 14, 0,164, 25, 42,241,211,192,254, 96, 25, 64,127,112, 47,164, 50, 6,172,132, 65,119, 82,133, 95, 7,245, + 7, 3,192,124,120, 23, 2,112, 97, 14, 2,184,173,101, 28, 14,130, 51,103,206, 4,228,104, 57,226,197, 92, 41,167,232,104,236, +220,185, 19,118,187, 61, 80, 78,194,178, 44, 84, 42, 21, 98, 98, 98,160, 80, 40,160, 84, 42,153,239,190,251,238,237,228,228,228, +216,241,227,199,179, 90,173,150,237,211,167, 15,238,187,239, 62, 78,108,226, 76, 75, 75,243, 27,151,173, 91,183,226,139, 47,190, +192, 83, 79, 61,229,209,209, 98, 24, 6,145,145,145,208,104, 52,184, 86, 32, 0,176,216,172,208,215, 27,156, 77,186,118,187, 29, + 71,182, 28,238,144,127, 56, 47,109,245,119,223,242, 0, 96,220,242,147,235,105,177,247,125,190, 44,117, 64, 24,191,103,235, 37, +235, 30, 95,121,158,227, 56,140, 29, 59, 22, 89, 89, 89,120,244,209, 71,177,118,237, 90,188,243,206, 59,248,247,191,255,125,153, +171,229,239,205,209,106,181,254,247,177,199, 30,123,106,197,138, 21, 29,223,120,227, 13, 86,116,180,148, 74, 37, 24,134,129,209, +104,132,201,100,130,193, 96,192,169, 83,167,132, 39,159,124, 50,215,108, 54,255,215,107,115, 37,163,248, 93, 41,215,175,109,155, +192,182,211, 21,124, 20,220,247,230, 36, 3,163,232, 81,123,111,234, 16, 50,124,108, 82, 24, 8, 1, 17, 0,129, 0, 38,147, 14, +207, 63,255,162,228, 47,188, 85, 78,145,101, 52, 26,113,232,208, 33, 12, 26, 52, 8, 69, 69, 69, 56,113,226, 4, 58,116,232,128, + 69,139, 22, 69, 62,252,240,195, 57,229,229,229,253, 3,117,182,142, 28, 57, 50,241,198, 27,111,252,180,190,190,190,186,190,190, +254, 83, 0, 75, 1,212,156, 57,115,166,243,153, 51,103,230,174, 95,191,190,223,228,201,147, 37,110,125,116, 36,222,236, 81,171, +213, 6,131,193,228, 83, 96,137,191, 9, 17, 2,138, 56,195, 48,164, 99,199,142,184,235,174,187,192,243, 60,148, 74, 37,212,106, +117,163,102, 51,119,193,229,171,254, 0, 32, 48, 12,131,184,184, 56, 12, 31, 62, 28, 82,169,180, 17,167,152, 15,135, 15, 31,142, + 23,222,155,132,255,190,112, 43,190,120,172, 3,134,188, 95,230, 51,156,122,189,190,126,243,230,205,138, 87,159,122, 10, 55,182, +111,143, 86, 26, 13,218, 68, 71, 66, 33,151, 65,234, 26, 38, 38, 32,147,157, 0, 16, 36, 18, 9,186,116,233,130,178,178, 50, 20, + 20, 20,160,160,160, 0, 44,203,162,111,223,190, 78, 23,230,244,233,211,120,239,189,247, 96, 50,153, 2,142,123,251,246,237,113, +235,173,183, 66, 38,147, 65,169, 84, 54,106, 50, 20,211,180,174,174, 14,237,218,181,195,202,149, 43,145,154,154,234,151,179, 83, +167, 78, 24, 48, 96, 64,163,244, 84, 40, 20, 78, 81, 4, 0, 69,123,234,157,215,136,143,143,111, 18,231,134,189,231,241,229,198, +205, 48,153, 5,104,245,214, 70, 39,196,182,210, 96,251,146, 55, 2,138,187,200,185, 96,193, 2,212,212,212, 56,141, 3,241,165, + 92, 52, 81, 90,183,110,141,121,243, 60, 59,153,110, 90,196,211, 51, 47, 51,192,231,173,120,156,152,185,228, 89, 89, 89,211,221, +207,247,199,231,250,191,219,249,102, 55,113, 86,214,164,166, 67,185, 92,254,230,230,205,155,195,107,107,107,113,250,244,105,176, + 44,235,108, 83,231, 56, 14, 22,139, 5,103,207,158, 69,120,120, 56,202,203,203, 33,151,203, 33,145, 72, 96, 54,155, 1,160,187, +183, 7, 56, 33, 4, 47, 84, 52,116, 17, 90, 23, 39, 69, 33,128, 59, 43, 26, 10,134,216, 33,254,135, 31,126,128, 90,173, 70,112, +112,176,243,211, 95, 51,210,145,130, 51, 40,227, 25,176,187,182,129, 97, 1,150, 1, 24, 9,192,178, 4, 44,195,128,221,149, 3, +134, 1, 84, 17, 97, 77,173,128,253,117,140,247,217, 1,222,155,251,228,201,197,114,255,190,101,203, 22, 4,202,217,174, 93, 59, +168,213,106,231,182,126,253,250, 70,142,150,221,110, 71, 68, 68, 68, 32,156,164,193,141, 16, 16, 21, 21, 5,158,231,153, 69,139, + 22, 77, 76,249,127,246,174, 59, 60,138,106,125,191, 51,219,119,147,108, 54, 61, 33, 33,148, 0, 82, 34, 77,225,194,165,151, 0, + 66,104, 34, 69, 46, 4, 17, 81,138,168, 40, 17,129, 31, 42, 32,161, 73,147, 42,200, 37, 32, 72,151, 46, 69,164,131, 5, 20, 36, +129, 64, 8, 9,164,111,234,246, 50,237,247, 71,118,227,102,179, 73, 54, 33,194, 5,231,125,158,121,118,167,189,115,206,156, 51, +103,222,243,157,239,124,211,176, 97,200,244,233,211, 73,129, 64,128,235,215,175, 35, 33, 33, 1,245,235,215,119,219,103,171,168, +168, 40,235,147, 79, 62, 97, 62,249,164,100, 14, 69,100,100, 36,138,138,138,114,237,251, 53, 26, 77,126,159, 62,125,202,248,109, +228,229,229, 61,219,158,240,182,251, 72, 91,105, 24, 76, 38,232,180,134, 82,235, 80,110,102,142,234,227, 15, 63, 16, 45,155,250, + 6, 0,224,195,149,107,160,221,248, 87, 67,118,224,195, 81,129, 67,191,220, 53, 19,192,224,202,248,117, 58, 29, 76, 38, 19, 34, + 34, 34,112,249,242,101,104,181, 90,244,235,215, 15, 4, 65,148,206, 16,173, 6, 44, 25, 25, 25,157,162,163,163,127, 93,177, 98, + 69, 68,243,230,205, 9,189, 94, 15,131,193, 0,199,223,155, 55,111,114, 59,119,238, 76, 49, 24, 12,255,182,153,206, 93,226, 68, +198, 55,201,125, 67,223,220,251,227,117, 65,116, 96,163, 36,101, 70, 97, 4,157,159, 33,213,107,140,119, 76, 12,151, 0,142, 1, + 24,176,224,104, 22,140,109,216,235,105, 65, 46,151,127,117,241,226, 69, 63,147,201,132,107,215,174, 97,204,152, 49,150,188,188, + 60, 9, 0,252,231, 63,255,177,108,223,190, 93,210,168, 81, 35,108,219,182, 45,224,213, 87, 95,221,163,215,235, 95,116,147,250, +219,172,172,172,111,157, 55,250,249,249,173,126,248,240, 97,119, 71,159, 31,154,166, 75,147,227,242,193,100, 1,138,162, 96, 52, +154, 81, 92,172,133,197, 74,217,218, 76, 22, 12, 67,219,126, 89,208,182,118, 84, 34, 22,122,181,125, 49, 88,199,113, 28, 72,130, + 40,186,246,103,118,221,202, 68,187,171, 33, 46, 55,173, 89,206, 96,236,179,204,252,252,252, 32, 18,137,240,237,183,223,226,198, +165, 19,144, 8, 56, 48, 52, 5,154,178,130,161, 44, 16, 9, 4,248,241,250, 3, 68, 53,243,114, 75, 16,250,251,251, 99, 64,199, +142,136,238,216,177,100,122,155, 80, 8, 79,169, 20, 10,177,172,196,146, 5,128, 99, 72,119,131, 8,176,246,116, 6, 5, 5,225, +183,223,126,195,180,105,211,176,120,241, 98,200,229,242,210,217,207,183,111,223,198,238,221,187, 17, 21, 21, 85,237,188,219, 45, +120, 51,103,206, 68,102,102, 38, 86,174, 92,137,151, 94,122, 9, 34,145, 8, 69, 69, 69,248,247,191,255,141,156,156, 28,183, 56, + 29,135,247, 36, 18, 73, 25,235,147, 93, 0, 86,183,140, 28, 57,223, 24, 18,130, 67,151,118,130, 0,129,171, 59, 62, 40, 35, 10, +215,239,186, 80,109,206,185,115,231,150, 73,167, 59,214, 44,119,225,100,117,170,242, 56,130, 32,174,217,141,173, 51,103,206,156, + 69, 16,196,145,153, 51,103,206,138,139,139,187,229, 14,159,171,253, 4, 65, 28,181,137,176, 1, 14,219,174, 85, 75,104, 41, 20, +138,246,158,158,158,184,119,239, 30,250,245,235,103,201,207,207, 79, 18,137, 68, 77,242,242,242,164,185,185,185, 48, 24, 12,186, +249,243,231, 63, 0, 32,239,208,161, 67,163, 31,127,252, 17,143, 30, 61,194,246,237,219, 1,224,128,107,159, 13, 18, 44,203,150, + 86, 10,231,110,155, 64, 32,192,149, 43, 87,112,229, 74, 89,215,175,205,155, 55, 87,249,194,120,245,251,195,184,126,253, 58, 28, +195, 3,216,255, 59,110,147,201,100, 64,229, 51, 60,202,160, 42,199,248,170, 28,224, 93,193, 93,223, 47, 87, 51,115, 42, 66, 70, + 70, 70,133,231, 95,185,114,165,140, 69,171, 42, 78,129, 64, 0,134, 97, 32,151,203, 9,177, 88, 76,136,197,226, 48,187,200, 18, + 8, 4,165, 15,140, 84, 42,133, 84, 42, 45,211, 75,173, 8,153,153,153, 61, 50, 51, 51, 43,220,175, 86,171, 59,169,213,106, 60, +143,176, 82, 20,140, 6, 11,180, 58, 35, 62,143,251,111,201,198,207,241, 51,128,159, 59,189, 51, 13,147,251, 70,245,172,238, 48, +181,253,126, 7, 6, 6,226,220,185,115, 32, 8, 2,123,246,236,129,183,183, 55,250,246,237, 11,165, 82,137,153, 51,103, 98,248, +240,225,213,109,204,138,243,243,243, 59,189,255,254,251,191, 46, 93,186, 52,188,110,221,186,176, 88, 44,176, 90,173,176, 88, 44, + 72, 78, 78,198,206,157, 59, 31, 25, 12,134, 78, 0,138,171, 34, 59,145,241, 77,242,254,243, 31,102,246, 30,249,170,241,118,206, + 15,200,206,206, 7, 77,103,128,101,104, 88,105,166,196,194, 71,211,160,105, 6, 98,177, 64,185,244,139, 15, 78,177,224, 64,146, +132, 5,192, 43, 79,170,140, 84, 42, 85,164, 90,173,198,221,187,119, 17, 19, 19,147,157,159,159,159, 8,160, 23, 0,228,231,231, + 95, 28, 51,102, 76,243,248,248,248,224, 6, 13, 26,192,211,211, 83,169,215,235,171,162,244, 4, 48, 25, 64, 31,148,248,129,216, + 81, 0, 96, 62, 73,146,210,107,215,174,149,155,105,119,254,252,121, 0,248,217,117, 15,200,102,209, 50,153,160,206, 47,196,132, +119,230,252,213, 51, 2, 87, 70, 92,112,224, 48,233, 93,200, 0, 32, 47, 39, 25,111, 76,152, 38,173,170, 67,224,234, 69, 88, 13, + 31,157, 50, 29, 53,123, 29,245,244,244, 44, 25,126, 59,184, 19, 71,191,124, 7, 96,172,224, 40, 35, 96, 53, 0, 86, 29, 88,139, + 1,132, 88, 14, 80, 70,183,132,150,167,167, 39, 60,229,114, 4,170, 84,224, 56, 14, 66,129, 0, 34,145, 16, 44, 5, 16, 12, 81, + 42, 72, 89,247, 2,131,148,118, 42,229,114, 57, 82, 83, 83, 49,121,242,100, 88,173, 86, 12, 25, 50, 4, 22,139, 5, 38,147, 9, + 70,163, 17, 13, 27, 54,132,193, 96,112,139,207, 62, 91,209,211,211, 19, 98,177, 24, 31,124,240, 1, 94,126,249,101,204,155, 55, + 15,177,177,177,104,216,176, 33, 38, 77,154,132,157, 59,119, 34, 50, 50,178, 42, 94,206,177,140,236,247,211, 46,182, 28,135,248, + 0, 84,187,140,156, 57, 9,130, 44, 35,216,236,203,123, 99,123, 85,155,115,209,162, 69, 80,171,213,229, 44, 89,246,255,161,161, +161, 88,183,110, 93, 77, 71,134,236,214,163, 32, 23,251, 6, 56, 91,162, 56,142,107,103,243,157, 50,199,197,197,221,138,139,139, +139, 38, 8,226, 72, 92, 92, 92,116, 69, 22, 45, 87, 60, 46,246,187,253,210, 18, 58,141,141,118,119,220,105,191,209,190,190,190, +130,240,240,112, 82,169, 84,162,168,168, 8, 1, 1, 1,156, 90,173, 30,169, 80, 40, 62,251,238,187,239, 26,233,116, 58,220,190, +125, 27,171, 87,175,254, 25,192,170,202,132,214,177, 0,155,233,216,102,201,114, 92, 31, 56,112, 32, 26, 52,104, 80,198,154, 37, +151,203, 43,173, 60,246,125,118,139,144, 64, 32,192, 11, 47,188, 32, 79, 73, 73, 49,138,197, 98,132,133,133,201,179,179,179,141, + 98,177,184,218, 51, 93,170,114,140,175,202, 1,222,149,240,105,215,174, 93, 25, 11,150,227,175,227,255, 67,135, 14, 85, 57,116, +104,231,108,222,188,121,233,253,242,242,242,178,159, 11, 0,232,215,175, 31, 88,150,133,191,191,191, 91,156,118, 81,107,115,128, +135,201,100, 98,181, 90, 45,121,237,218, 53, 72, 36, 18,120,121,121,149,250,234,200,100,178, 82,107, 38, 15, 87, 13, 2, 11, 11, + 69,193,104, 52, 66,167,211, 1, 0,146,255,220, 87, 86,136,153, 53, 53,230,183, 55,176, 5, 5, 5, 56,113,226, 4,126,248,225, + 7,188,252,242,203, 46, 69,117, 53, 4,151,186,160,160,160,243,140, 25, 51,174, 46, 88,176,160,142,175,175, 47,172, 86, 43, 30, + 62,124,136, 45, 91,182,100, 26, 12,134,206,213,105, 96,192, 1, 20, 69,195,100, 48,163, 88,163,197,103, 95,108,173,176,234, 1, + 64, 65,238, 29, 12, 28, 52, 92,242, 36,203, 41, 51, 51,115,122,231,206,157,191,208,106,181, 69, 6,131, 97, 56,128,101,142,253, +169,252,252,252, 46,131, 6, 13, 90,225,235,235,251, 82,110,110,238, 44, 55, 40,103,166,166,166,206,170, 87,175, 94,153,141,102, +179, 25,245,234,213,123, 33, 55, 55,119,116,215,174, 93,255, 15,128,175,195,110, 47, 0, 39, 1,172,171,168, 46,217,135, 14,117, + 58, 35,148,170, 16,100, 60, 56, 87,101, 66,196, 2, 19, 56,150,173,180, 13,177,119,128, 43, 90,170,152, 25, 87, 46,169,246, 99, +237, 47,236, 87,134,141,197, 43,147, 23, 65, 33, 2, 22,190,209, 9, 13, 85, 0,228,190, 16,119,253, 24,132,202,118,143, 38, 31, +118,139, 60,118,195, 6, 92,183,181,199, 97, 1, 1,152, 49,114, 36, 56, 10,184,156,144,128, 93, 63,253,132,145, 61,122, 64, 33, +147,185,221, 97, 97, 89, 22, 98,177, 24,201,201,201,184,124,249, 50,154, 53,107,134,123,247,238,149, 9, 67,193,113,156,187,249, + 47,205,187, 84, 42,133, 72, 36, 66,118,118, 54,162,163,163, 33, 22,139,177,117,235, 86,156, 59,119, 14, 51,102,204,192,248,241, +227,209,189,123,119, 36, 38, 38,186,197,201,113, 92,185,217,138,206,195,185,213, 45, 35,103, 78,231,247,126, 77,202,221,206,185, + 96,193, 2,151, 19, 42,220,225,116,165, 69, 92,148,221, 53, 71, 49,100,183, 60, 57, 10, 35,231,117, 0, 62,246,109, 51,103,206, +156,229,238,121,142,235,118,139, 88,117,134, 48, 75,133, 86,116,116,116,153,156, 23, 20, 20, 92,189,122,245,106, 11, 15, 15, 15, +220,185,115, 71,162, 84, 42, 91,216, 27,116,146, 36,177,103,207, 30,175,254,253,251,159, 90,182,108, 89, 24,203,178,200,201,201, +193, 71, 31,125,164,163,105,122, 20, 0,186,162, 23,120, 85,150,169,195,135,203, 63,108, 7, 15, 30,116,107, 8,196, 46,164,132, + 66, 33,124,124,124,140, 70,163, 17, 10,133, 2, 62, 62, 62, 70,131,193, 0, 15, 15, 15,251, 88, 49,137,191,102, 42, 84,101,125, +170,202, 49,222,217, 1,190, 74, 36, 36, 36,184,117,156,109,168,213,173, 90,158,154,154, 90, 97, 67,114,238,220, 57,176,182,134, +214, 93, 78, 91, 47,143,179, 11, 63,133, 66, 1, 95, 95, 95, 72,165, 82,200,229,242, 50, 34, 75, 42,149, 86,249,224, 84, 21,144, + 84, 38,147,253,226,225,225,161,178,239, 23,137, 68,208,106,181, 69, 5, 5, 5,237,159,233,161, 67,112,160,173, 52,140, 70, 19, +116, 90, 99,173,243, 91, 44, 22, 72,165, 82,236,220,185, 19,157, 58,117, 66,135, 14, 29,202,137,172, 26,154,231,211, 11, 10, 10, +186,175, 90,181,234,231,229,203,151,251,232,116, 58,252,247,191,255, 45,214,233,116,221, 1,164, 87, 75,108,178, 28, 40,171, 21, + 6,147, 25,122, 93,201, 61,184,127,107,223,255, 90, 81,237,204,206,206,222, 89,201,254,251, 52, 77, 71,219,227,190,185,129,127, +213,171, 87, 15,217,217,217,101, 54,166,165,165,129, 97, 24, 51, 74,226,100,189,233,104, 72,198, 95,209,179, 43,234,197,151, 88, + 71,141,102,232,116, 37, 86, 16,147, 62,175,118,234,169, 77,108, 84,228,147, 85,147, 58, 68, 16, 68,169,211,247,212,169, 83,113, +243,198, 13,244,170,163, 65,195, 96, 47,112,154, 12,136,123,126,138, 63,212,114, 44, 91,113,172,218,220,187, 29, 92, 32,150,237, +222,237,114,223,253,193,131,171,149,247,164,164, 36,200,229,114, 48, 12, 83,238,125, 83,221,252, 59, 10,152, 21, 43, 86, 96,198, +140, 25,216,186,117, 43,110,222,188,137,214,173, 91,163,119,239,222,200,205,205,197,141, 27, 55, 96, 54,155,221, 78,167,163,223, + 92, 82, 74, 2, 78, 95, 62,142,180,244, 7,200,204,126, 84,227,114,119,228,116, 22, 90,251, 79,255,142, 97, 81,109,107,196,249, +217,103,159, 33, 55, 55,183,140, 37,203,177, 93,170,200,162,229,172, 69,156,144,231,228, 11,101, 95,183, 56,137, 30,231,117,231, +227, 1, 32, 23,128,160,138,243,156,215,243,226,226,226,206,218, 45, 97, 54, 94, 65, 85,254, 89,101, 44, 90, 78, 88, 52,120,240, +224, 65,171, 87,175, 14,144,201,100,165, 51,144,102,206,156,137, 25, 51,102, 32, 34, 34, 2,254,254,254,161, 42,149, 10,249,249, +249, 88,188,120, 49, 82, 83, 83, 39,194, 69,160, 61,103,161,213, 37, 69, 11,137,228,175, 14,171,221,178, 5, 0,227,199,143, 47, +103,209,178, 23, 80,101,160, 40, 10,126,126,126, 48, 24, 12, 16, 8, 4, 24, 50,100,136,224,207, 63,255,100,250,246,237,139,161, + 67,135, 10,110,220,184,193, 12, 24, 48, 0, 2,129, 0, 61,123,246,212,236,223,191,255, 67, 0, 95,186, 33,182,106,205, 49,222, + 94,201,220,141,125,228,142,184,172,140,147, 32, 8, 24, 12, 6, 8,133,194, 82, 71,121,119, 56,237, 67,135,142, 15, 32, 73,146, + 80,169, 84,165,141,135,221,162,101, 23, 90, 85,241, 86, 21,144, 84,161, 80, 40,239,220,185,211,200, 62,241, 34, 47, 47, 15, 61, +123,246,188, 91, 80, 80,240,108,155,180, 88,192, 74, 51,208, 25, 77,208, 25, 13,181, 70,107,127, 30, 54,110,220,136,196,196, 68, +152, 76, 38,124,245,213, 87,165,147, 10, 28, 69,214, 99, 8,174,100,185, 92,206,246,235,215, 15, 87,175, 94,133, 84, 42,165, 80, +131,248, 87, 44,199,194, 74,211, 48, 25,141,208, 85, 61,228,246,188,160, 84, 85, 39, 38, 38,194, 98,177, 96,222,188,121,204,175, +191,254,122, 22, 37, 1, 80,237, 22,188,209,221,186,117,155,239,225,225,161, 58,122,244,232,123, 0,182, 86,246,242,166,104,155, +104,175,197,251,232, 56, 34,224,202, 39,171, 38, 97, 86, 28, 95,172, 44,203, 98,226, 91,111,161,119, 29, 13,134,190, 20, 0,125, +214, 93, 40,188, 3, 64,168,234, 99,217,138, 99,184,149,226,182, 43, 38, 7, 0,253,186, 13, 70,171,102,229,195,131,117,238, 85, +210, 39,187,248,227, 47,200,201,203,172,118,222,245,122,125,133,150,171,106, 88,180, 74,159, 57,251,253,107,211,166, 13,154, 52, +105,130,179,103,207,162,109,219,182,184,119,239, 30,238,221,187,135,212,212, 84,220,188,121, 19,133,133,133,213, 46,163,239, 79, +238, 66,161,182, 0, 18,177, 4, 5, 69,121, 72,203,120,128, 32,191,224,199, 46,119, 59,154, 14,248, 12, 0, 80, 39,192,187, 90, + 66,203,145,115,201,146, 37,229,196,251,227,134,236, 33, 8,226,151,202,214,171,123,254,147, 68, 69, 66,235,129, 90,173,238, 48, +114,228,200,153, 0,218,217,182, 21, 3,216,125,234,212,169,193,129,129,129, 61, 58,118,236, 40,148, 72, 36,184,124,249, 50,246, +239,223,191, 21,192,174,202, 46, 36,145, 72,140,245,235,215,151,219, 43,162,253, 65, 84, 42,149,130,197,139, 23, 19,155, 55,111, +174,208,202, 85, 85, 1, 21, 23, 23, 67,175,215,195,219,219, 27, 86,171, 21,253,250,245, 99, 18, 19, 19, 33, 22,139, 49,104,208, + 32, 38, 33, 33,161,180,160, 55,109,218, 20,102, 52, 26,255,253,195, 15, 63,244, 1,208,181, 26,247,202,238, 24,239, 9, 55, 29, +224, 43,234,229,185, 3,119,135,227, 42,226,156, 54,109, 90,141, 56,197, 98, 49,109,143,252, 78,146, 36,172, 86, 43,218,182,109, +139,220,220,220,210,135,198,195,195,163, 84,100,185, 35,180,170, 10, 72, 42, 20, 10, 97,177, 88,208,181,107, 87, 16, 4,129, 53, +107,214, 60, 31,195,145, 44, 75,120,122,250,161, 78,157, 23, 16, 16,104, 2,203,214,238, 87,101, 98, 99, 99,203,136, 41, 87,145, +151,237,247,191, 38,176,115,185, 51, 75,182,178,183,163,125,200, 75,175, 55, 61,115, 69, 24, 24, 24,216, 33, 55, 55,247,160,211, +230, 2, 0,243, 43,233, 88,150, 22,244,163, 71,143,208,183,111, 95, 28, 63,126, 92,112,224,192,129, 94,135, 14, 29, 74,184,123, +247,238,163,182,109,219,214,125,251,237,183,165, 93,187,118, 69, 94, 94, 30, 94,122,233,165,207, 51, 50, 50, 42, 17, 90,182,251, +104, 50, 67,175,175,125,235,168, 43,107,214,227,188, 24,237,117,114,238,220,255, 67,239,144, 34, 12,105,237,141,248, 35,151, 48, +186,141, 28,176, 72,171,205,103, 79,139,111,157, 6,168, 31,217,161,220,126,169,178, 36,150,107,253,200, 14, 32, 31,221,171,118, +222, 29,211,236, 44,170,106, 98,209,115,188,159, 19, 38, 76,192,199, 31,127,140, 62,125,250,224,222,189,123, 56,127,254, 60,238, +221,187,135,105,211,166, 33, 50, 50, 18,173, 91,183,174, 22,231,161,211,123,161,209, 21,131, 36, 72, 20, 20,231,195,100, 54, 34, +118,210,220,199, 46,247,210,151,255,233, 56, 0,192,190, 83,215,107,204, 57,123,246,108,100,103,103,151,177,100, 61,142, 95,214, +179,142,202,162,165, 61, 0, 48,209,121,163,197, 98,241,154, 55,111, 94,148,191,191, 63, 8,130,192,138, 21, 43,224,235,235,219, + 9,192, 45,139,197,146,167,215,235,103, 56,136,144,222,176,197,218,200,201,201,113, 57,111, 95,175,215, 91,163,162,162, 68, 33, + 33, 33,101,102, 27,122,120,120, 84,100,221, 41,229,180,239,163,105, 26,177,177,177, 88,184,112, 33,194,195,195, 49, 96,192, 0, + 68, 71, 71,131, 32, 8,244,235,215, 15, 3, 6,252, 53,148,171, 82,169,196,199,143, 31,239, 70,146,100,130,195, 11,164, 12,167, + 43,216, 29,227, 41,138,114,215, 1,190, 12,167,189,178, 77,155, 54, 13, 11, 23, 46,196,172, 89,149,187,122,108,216,176, 1, 40, +239, 79,245,183,115, 22, 20, 20,148,105,236, 21, 10,197,154,161, 67,135, 10, 31, 61,122, 84, 70, 92, 57, 46, 46, 26,162, 50,156, + 85, 5, 36, 21, 8, 4, 8, 10, 10,194,130, 5, 11,224,231,231,135,224,224, 96, 87,129,252,170, 44,163, 26,224,111,229,100, 56, +246,218,210, 69,255,215,249,191,219, 15,137,164, 18,224,202,249,125,208, 20,150, 29, 78, 50, 91,255,154, 74, 45,105,219, 11,150, +235, 63,186, 85,151,236, 98,250,179,207, 62,195,103,159,125, 86,105,130, 54,110,220,248,216,121,119, 83,108,149,231,100, 57, 66, +225,225, 3,153, 71, 29,180,136,244, 1,203,209,255, 83,101, 84, 1,126,253,229,151, 95, 6,249,249,249, 33, 61, 61, 61, 64, 36, + 18, 13, 42, 99,174, 50, 26, 81,191,126,253, 23,212,106,245,191,171,226,156, 54,109,154,121,206,156, 57,210, 81,163, 70, 97,232, +208,161, 24, 53,106,148, 84, 44, 22, 55,230, 56, 14, 86,171, 21,233,233,233,248,241,199, 31,161, 86,171,111, 87,150, 78,150,227, + 8,185, 66, 5,153, 71, 8, 90,188,168, 2,203,210,181,146,119, 71,171,184,163, 53,171,154, 34,203,101,253, 4,128, 95,127, 60, +136,185, 31,188,136,173, 71,127,198,234, 95,128, 86,170, 92,180, 8, 80,131, 85,223,198, 71,163, 95,198,178, 29,191, 1, 0,206, +159,171,178,140,184,202,234,160,201,104,125,172,188, 59, 90,174, 28,175,227,134,143, 86, 57, 78,123, 39, 81,171,213,162,168,168, + 8,241,241,241,120,227,141, 55,144,155,155,139,212,212, 84,220,189,123, 23,223,125,247, 29, 20, 10, 69,141,202,232,195,183,102, + 99,206,178,233,224,192,161,105,163, 22,152, 57,249, 51,180,107,213,241,177,203,221, 25,110, 88,179, 42,228, 92,185,114,101, 77, +235,210, 63, 78,104,185,132,191,191,255,168,110,221,186,193,100, 50, 33, 32, 32, 0,169,169,169, 32, 73, 50, 2, 40, 25,194, 11, + 13, 13,221,173, 86,171, 35,220,229, 19, 8, 4,160,105,186,212,247,199,190, 0,192,192,129, 3,113,248,240,225, 42,123, 20,193, +193,193,168, 91,183, 46,222,127,255,253,114,179, 28, 28,103, 58,200,229,114, 28, 61,122, 52,187,160,160,160,128,227,184,106, 77, +115,179, 59,198, 95,188,120,209,109, 7,120, 71, 88,173,214, 71,119,239,222, 13,217,184,113,163,160,146,151, 95, 41,206,159, 63, + 79,163,138,161,154,191,131,211, 85,207,148,227,184, 10, 69,150, 59, 97, 4,170, 10, 72, 42, 20, 10,145,148,148,132,185,115,231, +130, 32, 8,236,219,183,239,185,120,184,254,188,147,191,153, 36, 73,159,129,175,116,110, 9,130,128,213, 82,126,164,218,179, 80, + 87, 42,178,134,126,185, 11, 7, 62, 28,233,142,232, 73,190,112,225,130,239,198,141, 27,133,238,148,251,133, 11, 23,104,142,227, +170, 61,236,103,127,225, 88,173, 86, 24,141, 53,179,162,112, 28,119, 57,238,139, 57, 81,219,190, 61, 38, 34, 8, 11,174,156,219, +135,226, 34,215,238, 12, 18,145, 16,155,227,247,211, 98,145,224,209, 83, 46,186,181, 67,134, 12, 25,245,213, 87, 95,181,112,181, +211,141, 73, 48,169, 38,147, 9, 25, 25, 25, 48, 24, 12,123, 63,249,228, 19,235,177, 99,199,222,124,245,213, 87,209,186,117,107, +132,132,132, 32, 43, 43, 11,201,201,201,136,143,143,231, 46, 93,186,180, 23,192,148, 42,238,227,193, 69, 95,204,137,137,223,113, + 76, 66, 18, 86, 92, 57,191, 15,197, 78,162,189,188,117, 90,132,111,182,238,183,138,197,162, 59, 85, 89,139, 28,173, 89,181,249, + 98, 28, 52,102, 50,134,174, 90,141,136,118,125,177,104,113,111,124,243,197,112, 44,239, 39,134,117,207,104,180,122,109, 27,118, +206,235, 15, 0,168,243,141,155,214, 18,161, 24, 15, 93, 88,172,138,138,101, 54,113, 83, 61,171,169, 61,239,149, 89,174,170,107, +209, 34, 73, 18, 13, 26, 52, 64, 68, 68, 4, 58,117,234,132,182,109,219,162, 71,143, 30,184,113,227, 6,110,220,184,129,105,211, +166, 85, 38,178,170, 44,163,238,255,142,194,207, 93,238, 60,118,217, 56,151,123,109,192,157,186, 52,121,242,100, 0,248, 71, 89, +183,170, 45,180, 52, 26,205, 13,150,101, 91,122,123,123,219, 45, 82,165,251,210,210,210,192,178,172,161,186, 5, 99,177, 88,236, +193, 49,203,196,101,178, 59,199, 87,246,224,115, 28,199, 20, 20, 20,160, 91,183,110,232,210,165, 75,233,240,137,227,226, 32, 76, +112,224,192, 1,112, 28, 87,109, 39,107, 7,199,120, 29,170,233, 0, 15, 0,185,185,185,125,187,118,237,122, 74, 40, 20,186,245, + 21, 77,150,101, 83,115,114,114, 94,121,210,156,174,202,135,101,217, 10, 69,150, 59, 13, 81, 85, 1, 73,133, 66, 33, 60, 60, 60, +240,253,247,223,195,223,223,255,185,122,192,110, 36,170,151, 84,182,191,155,159,228, 28,128,128,161, 95,238,122,120, 46,223, 90, +111,232,151,187,210, 14,124, 56, 50,188,178,115,178,179,179,251,140, 28, 57,242,184,187,229, 78,211,244,131,236,236,236,106,135, + 75,224, 56, 14,119,238,220, 97, 39, 76,152,144,167, 86,171,135,215, 36,255, 51,231,174, 94,190,240,243,169,126,253,162, 58,180, + 3, 9, 88, 42,118,254,229, 8,128, 19,138, 4,143,102,204, 90,249,214,240,225,195,159,102,177,105,178,179,179, 59, 13, 27, 54, +108, 10,254,114,157, 40, 35,164, 80,193,236,106, 27, 86,213,173, 91,247, 69,129, 64, 32, 5, 48, 23, 64,218,165, 75,151,214, 94, +186,116,169, 15,128,127, 9, 4,130, 16,134, 97, 50,108,157,158, 93, 0,254,168,186, 30,229,190, 13,142, 13,235,215,251, 95,125, + 65, 16,156,197, 98,174,162,131, 4, 14, 28,199,137,197,162, 59,191,222,200,106, 85, 89, 71,202,225, 11, 28,181, 62,100, 63,101, +202, 20, 76,153, 50,165,180, 62,173, 89,211, 5,123,255,188,136,215, 90,165,195,252,117,103, 16,202,112,183, 59,124, 0, 48,251, +255, 38,212, 90,218, 28,243,238,104,209,114,245, 28, 84,199, 71, 75, 32, 16, 32, 47, 47, 15, 73, 73, 73,200,201,201,129,193, 96, + 64, 98, 98, 34,172, 86, 43, 10, 11, 11,241,226,139, 47,214, 56,157,181, 85, 70, 79,147,243,159, 56,124, 88,109,161,101,181, 90, + 63,109,208,160,129, 72, 38,147,181, 96, 24, 6, 28,199,129, 97, 24,206, 38,106,170, 61, 11, 79, 36, 18,153,154, 52,105, 66,184, +154,157, 96,255,239,225,225, 97,172,196, 90, 18, 87,191,126,253, 79, 8,130, 16, 84,212, 11,177,255,103, 89,150, 17, 10,133,113, + 53,188, 87,143,235, 24,175, 87,171,213, 29,107,185,252,254, 14, 78,231,242,209, 55,107,214,172,244,139,246,206, 49, 81,108, 31, + 91,213, 87, 33,206, 43, 13, 72,170,215,235,179,250,246,237,203, 56,238,119, 12,104,250, 92,131,224,210,250,143,122,179,222,185, +124,107, 61, 0,176,139, 45,112, 92, 90, 37,103, 25,179,179,179,187,253,221, 73, 75, 73, 73,177,252,235, 95,255,250, 86,171,213, + 78, 6, 80, 99,111,254, 89,159,174,153,245, 12,150,140, 6,192,194, 26,158,155,150,159,159,223,211,105,219, 31,118, 65,101,143, +107, 87,109,209,126, 59,175,214, 99,139,209, 52,157, 30, 17, 17, 81, 45,203, 13, 69, 81,233, 85,237,119,142, 17,230,136, 91,240, +198,172,171, 64,201,228,239,124,183, 56, 77, 38, 83, 65,199,142, 29, 69,213,204, 91,174,187,121, 15, 9, 9, 65,157, 58,117, 74, +127,237,112,222, 94, 85, 58,105,154, 78, 15, 11, 11,131,191,191,127,133, 17,223,157,125,178,220,225,172,237, 50,170,140,179, 78, +157,109,181,206, 89,211,116,242,112, 15,189,121, 78,158,147,231,124,102, 57, 5,252,253,228, 57,121, 78,158,243, 9,114, 62,151, +224,189,212,120,240,224, 81, 17, 24,254, 22,240,224,193,131,199,227,129,168, 68,149, 86,103,166, 79, 77,148,237,105,158,147,231, +228, 57,121, 78,158,147,231,228, 57,255,113,156, 85,113,215,246, 76,227,231, 26,188, 89,149,231,228, 57,121, 78,158,147,231,228, + 57,121,206,127, 44,248,161, 67, 30, 60,120,240,224,193,131, 7, 15, 94,104,241,224,193,131, 7, 15, 30, 60,120,240, 66,139, 7, + 15, 30, 60,120,240,224,193,131, 7, 47,180,120,240,224,193,131, 7, 15, 30, 60,120,161,197,131, 7, 15, 30, 60,120,240,224,193, +131, 7, 15, 30, 60,120,240,224,193,131, 71, 9, 8, 0, 56,114,228, 72,233, 7, 1,163,163,163, 9,254,182,240,224,193,131, 7, + 15, 30, 60,158, 36,158,107, 45,226,152, 57, 30, 60,120,240,224,193,131, 7, 15, 94,139,212, 14, 72, 94,108,241,224,193,131, 7, + 15, 30, 60,120,177,197,103,140, 7, 15, 30, 60,120,240,224,193,139,172,103, 10,101, 44, 90,188,224,226,193,131, 7, 15, 30, 60, +120, 60, 77,177,245,140,106, 17,206,182, 56,174,243,224,193,131, 7, 15, 30, 60,120,240,120, 76,129, 85,217, 47, 15, 30, 60,120, +240,224,193,131, 7,143, 90, 18, 92,246,255, 79, 76,104,241, 95, 54,231, 57,121, 78,158,147,231,228, 57,121, 78,158,243, 31, 11, + 33,127, 11,120,240,224,193,131, 7, 15, 30, 60, 30, 27,142, 86, 44,130, 23, 90, 60,120,240,224,193,131, 7, 15, 30,181, 39,178, + 8, 87,235,252,183, 14,121,240,224,193,131, 7, 15, 30, 60,254, 38,240, 22, 45, 30, 60,120,240,224,193,131, 7,143,199, 3, 1, +126,232,144, 7, 15, 30, 60,120,240,224,193,227,111, 21, 91, 46, 55, 86, 52,115,224,116, 53,200,107, 50,251,224, 52,207,201,115, +242,156, 60, 39,207,201,115,242,156,255, 56,206,170,184, 79,227,217, 67, 55, 0,103, 1,116,183,253, 86, 40,188,106, 27,252,212, + 87,158,147,231,228, 57,121, 78,158,147,231,228, 57,159,119, 84, 24,168,148,119,134,231, 81, 21,132,168,124,136,185,170,253, 60, +120,240,224,193,131,199, 63, 77,108, 17,225, 72,218, 0, 0, 32, 0, 73, 68, 65, 84,113,142, 47, 73, 87,104, 12, 96, 22, 0,111, +135,109,191, 0,136,115, 58,110, 7, 0,133,195,186, 30,192, 60, 0,247,170, 76, 13,199,137,109,252, 82,219,194, 2, 48, 1, 48, + 3,208, 18, 4, 65,241,101,246,212,209, 17, 64,180,237,255, 17, 0, 87,170,185,255,185, 66, 72, 72,136,220,199,199,167,207,245, +235,215, 37,137,137,137,184,112,225, 2,183,121,243,102,107, 97, 97,225,201,172,172, 44, 35, 95, 93,158, 11,244, 5, 48,211,246, +127, 17,128, 19,143,201, 71, 40, 20,138,105, 30, 30, 30,253,165, 82,105, 29,154,166, 9,131,193,144,169,215,235, 79,209, 52,253, +165,173,221,171, 46, 6,251,250,250,190,217,180,105,211,198,169,169,169, 25,153,153,153, 59, 0,236, 1, 48,188, 78,157, 58,163, +235,215,175, 31,122,231,206,157,123, 5, 5, 5,223, 0, 56,248, 20,211,201,131,199, 63, 9, 68,101,214, 8, 87,152,203,113,220, +232, 50, 12, 68,121,142,158, 61,123, 14, 58,121,242,164,130,101, 89,216, 23,185, 92, 78, 3, 24, 87,133,200,242,187,124,249,114, +189,201,147, 39, 15,205,204,204,124, 89,171,213,182, 7, 0,133, 66,241,115, 96, 96,224,175,171, 86,173,250,142,227,184,116,130, + 32,180,213,204,168, 80, 36, 18,189,225,227,227,211,159,166,233,182, 28,199, 65, 36, 18, 93, 47, 44, 44, 60, 65, 81,212, 55, 0, +106, 34,222, 36, 66,161,112,138, 84, 42,237, 75,211,116, 75, 0, 16, 10,133, 55,205,102,243, 9,154,166,215, 2,176,212,128, 83, + 38,145, 72,166, 40,149,202, 40,139,197,210, 18, 0, 36, 18,201, 77,141, 70,115,202, 98,177,172,181, 9,206,167, 13, 33,128,104, +142,227, 68, 0, 32, 16, 8, 6,183,111,223,190, 30, 65, 16, 44, 65, 16, 28,199,113,196,207, 63,255,220,134, 97, 24,210, 86, 63, +162, 1,252, 10,128,126, 22,159, 16,127,127,255,133, 44,203,214,169,180,208,100,178,151,175, 95,191,222,116,247,238,221,204,215, + 95,127, 93, 52,126,252,120,207,201,147, 39, 11,215,172, 89,179, 54, 43, 43,235, 61,231,227,253,252,252,150,147, 36,233,239,206, +245, 89,150,205,203,207,207,159,254,180,242, 31, 19, 99, 42, 99,238,142,143,151, 53, 2,144, 94,195,250,253,247,113,154, 98, 56, + 0,136,151,197, 55,138, 49,197, 36,219,255, 63, 46,175, 3,102,174, 59,173,237,202,113,192,148, 40, 47,242,113,133, 86,104,104, +104,124, 76, 76,204,168,150, 45, 91, 10, 57,142, 3, 69, 81, 48,155,205, 77,175, 92,185,210,125,223,190,125, 47,107,181,218,225, +213,164,124,235,227,143, 63, 94, 48,127,254,124,127,145, 72, 68, 80, 20,213,104,247,238,221,109,223,126,251,237,247, 55,110,220, + 88,119,196,136, 17, 94,246,237,115,231,206,109,183,104,209,162,134, 0,190,124, 10,233,228,193,227,159,134,110, 40,235,163,245, + 57,128,207, 42, 19, 90, 30,182,151,103,142,205,146, 5,135,223, 82,156, 57,115,230,144, 80, 40,180, 91,180,218,235,245,250, 32, + 39, 43,152, 43,145, 85,127,204,152, 49, 29,247,238,221,187,112,196,136, 17,217, 10,133,162,201,171,175,190,170, 37, 8, 66,176, +123,247,238, 54, 17, 17, 17,242,129, 3, 7,142,233,217,179,231,135, 28,199, 93, 32, 8, 66,237,102, 38, 91,248,250,250,238, 95, +178,100, 73,189,190,125,251,138,253,253,253,193,113, 28, 50, 51, 51, 67,143, 30, 61,218,239,243,207, 63,255,176,160,160, 96, 8, +128,132,106,220,184,118,114,185,124,239,231,159,127, 30,210,175, 95, 63, 97,112,112, 48, 76, 38, 19, 18, 19, 19,123,159, 56,113, +162,235,198,141, 27,223, 51, 26,141,175,217, 4,134,187,104,239,237,237,189,239,191, 31,127, 28,212,225,141, 55,132,190,190,190, +224, 56, 14,106,181,186,247,197,109,219,186, 79, 90,178,228,189,226,226,226, 97,174,238,247,211,132, 68, 34, 33,183,111,223,222, + 90, 34,145, 0, 0, 44, 22, 11, 34, 35, 35,137,231,229, 9, 33, 8, 34, 44, 51, 51,211, 91, 44, 22,187,220,207, 48, 12,186,118, +237,218, 64, 44, 22,227,203, 47,191,164,242,242,242,218,124,245,213, 87,215,119,238,220,233,191,118,237,218,215, 0,148, 19, 90, + 36, 73,250,167,167,167,187,228,100, 24, 6, 86,171, 21, 52, 77,195, 98,177,160,121,243,230, 79, 53,255,241,241,178, 48, 0,211, + 99, 98, 76, 31,216, 54,125, 9,224, 67, 0, 41,168,225, 55,187,254, 6, 78,199,250,182,220,225,255, 99,167,213, 1,245, 0,224, +216, 13, 19, 0,248, 62,238,125,245,240,240,104,246,250,235,175, 11,213,106, 53, 68, 34, 17,172, 86, 43,178,179,179, 17, 25, 25, + 41,248,246,219,111, 95,168, 46, 95,163, 70,141,198, 47, 90,180, 40,224,216,177, 99,214,237,219,183, 91,162,162,162, 68,227,199, +143, 87,118,237,218,181,121, 88, 88, 24,185,101,203, 22,243,169, 83,167,168, 49, 99,198, 72,226,226,226, 2,142, 30, 61, 58, 48, + 33, 33,225,203, 39,157, 78, 30, 60,254,129, 56,139,191, 66, 60,216,127, 43, 21, 90,112, 16, 87,131, 1, 64, 36, 18,181, 9, 10, + 10,138,167,105, 58,216,102,213,201,206,201,201,249,146,162,168,223,109,199, 30,100, 89,118, 80, 85,150,172, 49, 99,198,116, 60, +126,252,248,178, 43, 87,174, 20,231,231,231, 7, 31, 58,116,200,244,225,135, 31,166, 2, 64, 74, 74, 74,195,129, 3, 7,134, 78, +157, 58, 53,189, 79,159, 62,171,122,244,232,241, 46,199,113,167, 8,130,208, 87, 37,178, 34, 35, 35, 47,159, 63,127,222, 75,165, + 82,149,217, 81,191,126,125,188,251,238,187,226, 65,131, 6, 69,244,234,213,235, 82,114,114,114, 23, 0,127,186, 35,136, 26, 55, +110,124,250,204,153, 51,158, 62, 62, 62, 40, 42, 42, 66,118,118, 54, 12, 6, 3,148, 74, 37, 70,140, 24, 33,238,214,185, 83,221, +169,211,222, 59,157,158,145,209,219, 77,177,213,190, 83,139, 22,167,119,198,197,121, 82, 15, 31, 66, 46,151, 67,167,211, 1, 0, +188,188,188,240,114,131, 6,194,223,182,109, 11, 29, 29, 27,123,250,215,164,164,222, 79, 73,108, 73,109,191,102, 0, 71, 4, 2, +193, 96,137, 68, 66, 14, 30, 60, 24,167, 79,159, 38, 76, 38,147,208,102,221,161, 7, 15, 30, 12,185, 92, 14,139,197,194,162,100, +232,144,126,150,159, 18,137, 68,130,228,228,228, 50,219,180, 90, 45,212,106, 53,242,243,243, 97, 54,155, 81, 84, 84, 4,150,101, + 9,185, 92,174,102, 89, 22, 36, 73, 58, 11,128, 50, 16,139,197, 72, 74, 74, 42,179,141,166,105,232,245,122,152,205,102, 88,173, + 86,104,181, 90,185,151,151, 87, 99,127,127,255,116, 0, 7, 11, 10, 10,190,204,201,201, 73,123,194,217,207,179, 11,162,248,120, +217,125, 0,146,255, 69, 78, 7, 75, 86,168,109,253,143, 90, 74,171, 29, 15,143,252,110, 10,183, 89,199, 30,212, 2, 31, 11, 0, + 23, 46, 92, 64, 78, 78, 14,242,242,242,160, 86,171, 17, 22, 22, 6,142,227,170, 61, 28,151,156,156,188,238,197, 23, 95, 36,110, +221,186,117, 2,192,154,221,187,119,143, 43, 40, 40,152, 57, 99,198, 12,223,165, 75,151, 22,196,198,198, 46, 2,176,117,247,238, +221,239, 52,107,214,172,255,237,219,183, 55, 62,141,116,242,224, 81,219,224, 56,174, 29,128, 0,123,219, 98,107,119,253, 28,214, +111, 16, 4, 97,113, 56,206, 98,107, 27,156,127,237,176,175,171, 9,130,248,213,225, 60, 53, 65, 16,191,214, 52,153, 78,191, 37, +157,110, 0, 56,114,228, 8,103, 95, 92,157, 25, 24, 24, 56,173,103,207,158,203,174, 93,187,214, 60, 43, 43,203, 39, 43, 43,203, +231,218,181,107,205,123,246,236,185, 44, 48, 48,112,154,195,141,112, 62,245,180,195, 62,241,229,203,151,235,237,223,191,127,209, +233,211,167,139,219,180,105, 99, 57,115,230, 12,221,167, 79,159, 92,219, 11,154,238,211,167, 79,238, 79, 63,253,196,116,232,208, + 65,126,252,248,241, 71,151, 46, 93, 90,190,119,239,222, 32,142,227, 4,174, 56,109, 16,169, 84,170,239,207,157, 59, 87, 78,100, + 57,162,110,221,186, 56,114,228,136, 82,165, 82, 29, 4, 32,174, 40,157, 54,200,100, 50,217,190,159,126,250,201,211,203,203, 11, +185,185,185, 16,137, 68, 8, 12, 12, 68,113,113, 49,178,179,178,144,118,247, 46, 72,139, 5, 43,190,152,239, 37,151,203,247,186, +104,236,203,113,122,123,123,239,219,185,112,161,103,254,233,211,248, 99,193, 2, 88,173,214,210, 33, 87,171,213,138, 75,147, 39, + 67,253,227,143,216, 50,119,174,167,183,183,247, 62, 0,178, 42, 56,107, 3,142,156,147, 1, 20,216,150,201, 0,174, 68, 70, 70, + 94, 75, 76, 76, 68,151, 46, 93,176,103,207,158, 86, 51,102,204,152, 60, 99,198,140,201,123,246,236,105,213,165, 75, 23, 36, 38, + 38, 34, 50, 50,242, 26,202,250,103,253,221,233,252,219, 56, 25,134, 41,179,176,236, 95,239,152, 58,117,234,228,238,223,191, 31, + 35, 70,140, 32, 37, 18, 73,214,200,145, 35,165, 23, 47, 94,228,108, 34,211,237,116,154, 76, 38, 24,141, 70,232,245,122,164,164, +164,200,151, 44, 89,210,249,179,207, 62,107,116,250,244,233,208, 89,179,102, 77, 10, 8, 8,184, 30, 20, 20, 84,239, 9,231,221, +234,244,127, 5,128,140,106, 90,136,254,110, 78,206,118, 62, 98, 76, 49,173, 29, 26,216,234,242, 86,118, 63,179,109,105,213, 3, + 72,123,156,186,212,179,103,207, 23, 27, 53,106, 20,180,251,150, 15, 10,197, 77,193,138, 85, 96,197, 42, 48,126,237,144, 44,121, + 5,225,225,225, 65,158,158,158, 29,171,153,206,237,183,110,221,250,151,173,167,156, 15, 96, 89,108,108,236,231, 4, 65, 92,136, +141,141,157, 15, 96,153,109,251,130,219,183,111,119, 0,176,243, 41,165,243,153,120,222,121,206,255, 45,206, 42,180, 72, 0, 65, + 16, 71, 8,130, 56,242,201, 39,159,244, 0,224,231,180,254,111,199,227, 0, 72, 92,253,218, 23,135,237, 1, 28,199, 13,112, 56, + 47,160,134,201, 39, 92, 44,127, 9, 45, 0,136,142,142, 38,162,163,163,237, 59,126, 33, 8,226, 16,128, 95, 68, 34, 81,155,214, +173, 91, 15,254,225,135, 31,188, 2, 2,254,186,126, 64, 64, 0,246,238,221,235,213,162, 69,139,193, 34,145,168, 13,128, 95,148, + 74,229,161, 74,172, 48,170,201,147, 39, 15, 29, 59,118,172,166, 77,155, 54, 0, 80,148,144,144,160,232,208,161,131,158,166,105, +130,166,105,162, 67,135, 14,250,132,132, 4, 5, 69, 81,218,118,237,218,121,244,234,213, 43,117,250,244,233, 99, 92, 8, 14, 71, +188,190,120,241,226, 48, 31, 31,159,202,148, 48,180, 90, 45,130,130,130, 48,121,242,228, 96,145, 72,244,102,101,119, 75, 40, 20, + 78, 89,188,120,113,160, 74,165, 66, 97, 97, 33,194,194,194, 96,177, 88,144,148,148, 4,147, 94, 7, 74,171, 1,165, 41,130,250, +254, 61,168, 68, 66,140, 25, 20, 29, 36, 20, 10,167, 84, 97, 45,153,242, 77,108,108,144, 37, 53, 21, 41,123,246,128,161,203, 27, +127,104,171, 21, 55, 55,109,130, 41, 61, 29,139, 38, 76, 8,146, 72, 36, 83,158,176, 37,107, 41,199,113,114,142,227,228, 4, 65, +172,234,216,177,227,183,114,185,124,114, 92, 92, 92,223,147, 39, 79,246, 59,127,254,124,119,154,166, 69, 52, 77,139, 46, 92,184, +208,197,100, 50, 9,165, 82, 41,132, 66, 33,135,231, 20, 34,145, 8, 98,177, 24,114,185, 28,157, 59,119,190,191,121,243,102, 42, + 44, 44, 76,180,111,223, 62,159, 58,117,234,120,172, 89,179,166, 72,171,213, 46,118,151,207,106,181,194,108, 54,195,104, 52,194, +100, 50,225,204,153, 51, 13,166, 78,157, 42, 52,153, 76,204,192,129, 3, 11, 40,138, 50,199,198,198, 42,125,125,125, 63,124,146, +249,140,137, 49,177, 54,203,211,109,155,104,121,128,199,244,121,250, 59, 56, 1, 88,108, 62, 89,118,248,219,184, 45,181,116, 43, +104, 0, 58,155,208, 50, 59, 61, 31, 45, 29, 44,190, 85,162,168,168,104,227, 55,223,124, 19, 70, 74, 85,184,104,233,143,239,216, +207,113,210,123, 13,114,235,125,132,192,176, 70, 24, 53,106, 84, 32,199,113,107,106, 33,205, 95, 1,232, 10, 96, 85, 77, 78,126, + 2,233,172,231,225,225,177,199,203,203,235,162,135,135,199, 30,216,134,103, 31, 7, 81,141,208,123, 80, 51, 50, 61, 42, 2,220, +160,102,100,122, 84, 35, 62,212,192,243, 2, 39, 45,226, 8, 53,199,113,209, 28,199, 69, 47, 90,180,104,161,195,251,221,190, 46, +119,211, 50, 22,205,113, 92,116, 25,133, 84, 34,176, 30,219,232,230, 98, 41,209, 20,142, 74,210, 33,115,165,179, 11,131,130,130, +226,227,227,227,189,156, 25,179,178,178,160,209,104, 48,103,206, 28,175,177, 99,199,190,151,158,158, 30, 83, 69, 34, 36,217,217, +217,109, 71,143, 30, 45,179, 90,173,133, 44,203,146, 26,141, 70,232,237,237,205,216, 15,240,246,246,102,138,139,139, 69,122,189, + 94,192, 48,140,121,236,216,177,146, 9, 19, 38,188, 12, 64, 80, 17,105, 64, 64, 64, 84,255,254,253, 43, 28, 58,160, 40, 10,122, +189, 30,122,189, 30, 86,171, 21,157, 59,119,150,110,222,188,185, 79,110,110,238,250, 10, 21,135, 84, 26, 21, 21, 21, 37, 42, 40, + 40,128,183,183, 55,210,210,210,240,224,193, 3,152,117, 58, 88,117, 26, 88,117, 90,208, 90, 13, 56, 77, 49,242,239,221, 65,135, +102, 77,197, 59,164,210,190,122,189,126,121, 69,156, 74,165, 50,170,195,184,113, 66, 15, 15, 15,116, 31, 93, 50,207,224,120,179, +102,224, 24, 6, 44,195,128,161,105,244, 77, 74, 2, 69, 81, 32, 73, 18,237, 10, 10,132,202,109,219,162,212,106,245,178,167, 81, +217,165, 82,169,112,251,246,237,175, 75, 36, 18,112, 28, 71, 88, 44, 22,156, 60,121,242, 31,247,208, 75, 36, 18,200,100, 50, 88, +173, 86,212,175, 95,223, 56,122,244,232,203, 95,124,241, 69, 56, 73,146, 30, 98,177,248,135,252,252,252,133, 89, 89, 89, 41,238, +242, 81, 20, 5,139,197, 2,139,197, 2,163,209,136,251,247,239, 7, 55,104,208,128,152, 60,121, 50, 99, 48, 24, 26,174, 94,189, + 58,249,228,201,147,138,197,139, 23,191, 10,224,221, 39,157,223,152, 24, 83, 51, 0,205,226,227,101, 98,155,229,215,242, 63,198, +201,161,196,241, 29,241,178,248, 68, 0,234, 90, 20, 89, 18, 0,222,225,126, 66,189, 72, 0, 29, 0, 47,155, 40,120,149, 32,136, + 14,205,155, 55,247, 73, 76, 76, 44,228, 56,238, 42,128,239, 0,100, 85, 70,198,178, 44,193,178, 44,222,110, 95,132,201, 29, 5, +160,168, 98, 20, 23, 23, 35, 45, 45, 13, 9, 9, 9,248,249,231,132,154, 62,155,111,122,122,122,246,145,201,100,245,105,154, 38, +117, 58, 93,154,193, 96, 56,205,178,236, 70,212,192, 71,237,239, 74,167, 29, 30, 30, 30, 75,102,205,154,213,201,219,219, 27,191, +255,254,123,195, 93,187,118, 45,209,235,245,143,229, 92, 47, 19,145, 91,150,175, 92, 19, 26, 26,168,194,141,243,135, 67, 23,110, +216,189, 5, 96,195,120,153,242,236,195, 73,139, 56,138,161, 95, 57,142, 27, 64, 16,196, 17,103,161, 84, 45,179,211, 99,158, 95, +133, 69,203,249,195,210,101,133, 86, 5, 10, 18, 52, 77, 7, 59, 90,178, 56,142, 67, 86, 86, 22, 50, 50, 50,160, 86,171,225,227, +227, 3,171,213, 26,236, 78,251,160,213,106,219,251,249,249, 25, 68, 34,145,217,104, 52, 66,161, 80,176, 34,145,136,179, 93,135, +176,205, 90,100,204,102, 51, 33, 20, 10, 41, 47, 47, 47, 79,179,217,220, 20,149,248,146,113, 28,215,222,207,207,207,229, 62,179, +217, 12,157, 78, 7,189, 94, 15,157, 78, 7,179,217,140,160,160, 32,208, 52,221,182,210, 46, 45, 77,183, 12, 8, 8, 64,102,102, + 38,228,114, 57,210,211,211, 97,209,105, 97,213,106, 65,235, 53, 96,138,139,193,106, 52, 96,245, 26, 80, 22, 3, 66,155, 52,131, +125, 70, 98,133,221,112,139,165,165,159,159, 31,244,250,191,220,205, 56,155,192,162,105, 26,180,205, 57,218, 62,156,232,239,239, + 15,251,140,196, 39, 4, 51,128, 25, 36, 73,174,146, 74,165,194, 73,147, 38, 33, 43, 43,171, 76,157,152, 52,105, 82,169, 79, 86, +215,174, 93, 47,200,100, 50, 90,173, 86,195,108, 54,139,158,215,135,158, 32, 8, 16, 4, 81, 82, 70, 52, 13,127,127,127,125, 94, + 94,222,207, 69, 69, 69,175,215,132,143,162, 40,251,140, 46, 24,141, 70,112, 28,135,223,127,255, 29, 50,153, 76,196, 48,204, 45, +154,166, 21, 34,145, 8,164,205,249,235, 73,193, 54, 35,240, 75, 0, 97, 54, 11,209,155, 40,113, 56,207,112,209,144,184,117,235, +220,228,172,190,112, 51,197,216, 45, 77, 25,168,217,112,164, 43,116,111,170,146, 44,143,235, 16,168,106, 61,208, 67,175,144, 8, +244,108, 90,235,250,255, 93,154,176,107,236,152, 55,189,230,205,155, 87,207,223,223, 95,150,156,156,108,154, 63,127,126,131,237, +219,183, 19, 40, 25,166,171, 16, 15, 31, 62, 60, 48,107,214, 44,223,254,253,251, 55,148, 74,165, 68,113,113, 49,212,106, 53,114, +114,114,240,224,193, 3,238,198,141, 27,247,205,102,243,158,234, 36, 50, 36, 36,100,243,235,175,191, 62,246,165,151, 94, 18,217, + 45,164,122,189,190,205,185,115,231, 6, 29, 63,126,188,139, 94,175,175,118,189,124,244,232,209,158,217,179,103,123,188,242,202, + 43, 77,165, 82, 41, 89, 27,233,116, 4, 73,146, 65,158,158,158, 56,125,250, 52, 84, 42, 21, 72,146, 12,122,220,250,106,178,178, +161,117,130,253, 96,186,180, 28, 77, 3,234,193,100,101, 67,121,137,242,252, 88,180, 42,120,215,183,179, 91,164,170, 16, 75,198, +153, 51,103,206, 34, 8,226,200,204,153, 51,103,185,178,104,217,254, 50,142,199, 57, 28,111,174,109,177, 85,173, 64,147, 44,203, + 34, 35, 35, 3,153,153,153,200,200,200, 64,126,126, 62, 72,146, 4,199,113,238,204, 62,227, 8,130, 96, 79,157, 58,229,115,249, +242,101,125,187,118,237,138,236,254, 47, 52, 77, 19, 20, 69, 17, 54,191, 24, 34, 45, 45, 77,124,241,226, 69,213,237,219,183,131, +108,189, 85,182, 10, 83, 96,185,109,118,129,229,184,152, 76, 38,200,100, 50,247, 84,135,237, 69,248,251,181,107, 37, 34, 75,167, +181, 13, 25, 22,131,209, 20,131,211,107, 33, 97, 40, 72,192,129, 48, 25,220,190,127,142,176,139, 44,171, 77,104, 89, 44, 22, 80, + 20, 5,150,101, 65,211, 79,197,175,124, 93,171, 86,173,218, 30, 56,112, 96,124, 70, 70,249,119,225,144, 33, 67,240,238,187,239, + 98,234,212,169,183, 7, 12, 24,112,227,240,225,195,152, 50,101, 10, 88,150,109, 13,160, 24,192,241,231,237,161, 55,155,205,165, + 22, 40,147,201, 4,171,213, 10, 84,227,179, 10,206,117,211, 94,182, 52, 77,219,185,137, 3, 7,246,227,194,133, 11,100, 66,194, +173,176, 73,147, 38,219, 29,238,159,116, 86,211, 81, 50,115, 79, 98,107, 40, 44, 40,241,127,170, 40,164, 66, 4, 42, 31,178,227, + 42,227,124, 28,180,218,208,106,196, 7, 31,124, 16,133,146, 25,206, 41,143,105,209,122, 69, 66, 18, 95, 79,107,233, 43,251,176, +149,159, 94, 34, 36,116, 73, 95,207,210, 61, 8, 87,234,131,234, 42, 44, 97, 13, 84,117, 22, 46,252, 34,228,246,237, 59,230, 57, +115,230, 36,142, 28, 57, 50,240,195, 15, 63,108,190,111,223,190, 46, 38,147,233, 27, 0, 69, 21, 25, 93, 6, 13, 26,116, 53, 48, + 48,176,193,134, 13, 27,114, 31, 61,122,228, 67, 81,148,135,213,106,101,245,122,253, 3,163,209,120,218,106,181,158, 6,112,173, + 58,137,245,242,242,106, 53,110,220, 56, 81, 81, 81, 17,132, 66, 33,172, 86, 43,114,115,115,209,169, 83, 39,193,161, 67,135, 90, +212,228, 6, 20, 22, 22, 46,255,230,155,111,206,238,220,185,179,143, 82,169,124, 73, 42,149, 6, 3, 96,180, 90,109,142, 94,175, +255,163, 38,233, 44,211,206, 49, 76,206,181,107,215, 34,148, 74, 37, 30, 62,124, 8,134, 97,114, 30,183, 14,200,196,228,163,155, +231, 15,213,109,230,223, 0, 23, 47, 95,133, 76, 76, 62,226, 67,125, 61,247,176,251, 80,193, 81, 64,185, 16, 72,151,227,226,226, +228,139, 22, 45, 66, 92, 92,220, 45, 87, 22, 45,187,224,138,139,139,187,101, 63,206,225,248,243,143,145,198,138, 45, 90, 21, 41, + 72,160,100,118,161, 90,173,246, 81,169, 84,165, 2, 43, 51, 51, 19,153,153,153,144, 72, 36, 72, 75, 75,131, 68, 34,201,114,167, + 19, 34,151,203,127,107,211,166,205, 11, 41, 41, 41,226,249,243,231,215,189,118,237,154,178, 83,167, 78, 47,202,229,114,134,227, + 56,152, 76, 38, 50, 49, 49,209,115,217,178,101,161,237,219,183,183,180,111,223,254,250,238,221,187,141,168, 36,254, 21, 65, 16, +191,100,101,101, 53,172, 95,191,190, 93,180,149, 17, 87,142,130, 11, 40, 25,242, 20, 10,133,215, 43, 75,168, 80, 40,188,153,148, +148,212, 91, 33,147,194,162,213,192,170,211,128,214,106,193,104,139,193, 20, 23, 3,122, 13, 36, 52, 13, 17, 67, 65, 46,147, 33, + 35, 61, 29, 66,161,240,102,101,156, 18,137,228,102, 78, 78, 78,111,149, 74, 85,250, 18,165,104,186,100, 97, 24, 88,104,186,212, +162, 37, 18,137,240,232,209, 35, 72, 36,146,155, 79,186, 38,147, 36,201,216, 67, 56, 84,144, 15, 4, 5, 5,177, 29, 58,116,192, +148, 41, 83,192, 48,140,173, 24,136,238, 0, 46,162,196,191,229,153,132, 43,113,107,119, 90, 55, 26,141,208,233,116, 40, 44, 44, + 20,202,229,242, 23, 66, 67, 67,175, 90, 44,150, 61, 52, 77,111,121,240,224,129,166, 34, 78,155, 48, 43, 21, 93, 44,203,130,227, + 56, 48, 12, 3,138,162, 32, 22,139,217,115,231,206, 99,217,138, 37,136,223,178,157, 27, 52,104, 16,113,232,208, 33,176, 44,155, +254,132,179,111,177,137,150,202, 26, 13,231,144, 10, 31,161,242,144, 10, 21,113, 58,246,254, 28,183, 17, 46,142, 41,135, 15, 62, +248,224, 4, 74,134, 12,243,108, 98,238,113, 56,191, 44,250,238, 11, 25,104, 70,111, 62,183, 83,247,237, 93,141,126,222,183, 43, +127,179, 72, 4,154,151,187, 5,181,108,216,224, 5,129, 74,229, 67,174,223,184, 42,127,199,246,189,201, 15, 31, 62,212,172, 93, +187,182,227, 11, 47,188,224,253,199, 31,127,132, 86, 36,180, 20, 10, 69,227, 55,223,124,115, 92, 97, 97,161, 56, 62, 62,126,119, + 86, 86,214,111, 40, 9, 45,227, 56,131,122, 0,128,173, 54, 33, 26,100,107,231, 46, 2,152, 95, 89,127,141, 32, 8,252,244,211, + 79,229,102, 7,178,143,167,206, 85,141, 26, 53, 26,145,146,146,114, 33, 39, 39,103,152,243, 78,177, 88, 60,175, 73,147, 38,125, +111,221,186,245, 57,128, 99,213, 33, 54, 24, 12,177,123,247,238, 93, 42, 16, 8,234, 48, 12,147,105, 52, 26, 99, 31,219,162, 69, +177, 19,226,214,239,218,100,180, 48,225,114,137,224,161,137, 98,223,226,117,200,243,107,205,178, 65,237, 96,141, 82, 3, 32,156, +214,255,176,189,140, 44, 28,199,217,143, 85, 59, 88,177, 44, 78, 86, 48, 87,251,212,143, 17, 44,157,171,168,141,171,200,162,245, + 9,128,246, 0,126,201,201,201, 89, 53,118,236,216,101, 59,118,236,240,210,104, 52,200,201,201, 65,110,110, 46,132, 66, 33,148, + 74, 37,214,173, 91,103,204,201,201, 89,229,120, 14,202, 71,144, 7, 0,147,191,191,255,111,219,183,111, 15,254,250,235,175,133, + 49, 49, 49,105, 3, 6, 12,104,186,110,221,186, 20,177, 88,204, 49, 12, 67,152,205,102,226,237,183,223,142, 88,177, 98, 69,170, + 64, 32, 80,140, 24, 49,130,240,240,240,248, 5,149,132, 13, 80,171,213,167,190,255,254,251,161,211,167, 79,151, 90, 44, 22,151, +150, 44,251, 54,149, 74,133, 75,151, 46, 89, 10, 11, 11, 79, 86, 97,197, 56,245,195,177,163, 93,255, 51,114,164,152,210,106, 64, +105, 53,160, 53, 26, 48,218, 34, 16, 58, 13, 68, 12, 13,185,152, 69,112,152, 12,180,209, 19, 71,127,253,131, 50,155,205,149, 6, + 54,212,104, 52,167, 46,198,199,119,111, 95,175,158,240,210,180,105,176, 82, 20, 94, 73, 74, 42, 21, 87, 86,171, 21, 7, 91,182, + 4, 67, 16,104, 61,113, 34,238,209, 52,173,209,104, 78,253, 47, 62, 12, 55,110,220,200, 29, 61,122,244, 53,150,101,219,226, 9, +125, 52,243, 73,128,162,168,114,214, 40,134, 97, 74,172,142, 37,150, 3,201,209,163, 71,187, 38, 38, 38,138,255,252,243, 79, 92, +184,112,161,245,142, 29, 59, 62, 9, 15, 15,111,249,240,225,195,236,170,196,155,171,160,191,176,249, 31,238,222,185, 7,239,188, +243, 14,145,157,157,141,239,190,251, 14, 85, 5, 79,253, 59, 16, 19, 99, 98,227,227,101,117,225,228,247,228, 34,164,194,239,112, + 51,164, 66, 69,156,166,152, 18, 43,153, 44,190, 36,216,168, 41,166,100, 56, 80, 22, 95,165,165, 12, 49,166, 24,141,205, 33, 62, +171, 22, 56,245,160, 25,185,229,220, 78,221,128, 99, 15,181, 87,178,140,243, 1,156,128,137,225,238, 93,231,110,188,244,146,143, + 63, 0,152, 77, 76,112,227,198,141,187, 9,133, 66, 9, 0,120,122,122,190,228,231,231,183, 46, 63, 63,191,179,171, 50,141,142, +142,238, 16, 24, 24,216,230,248,241,227,127,100,101,101,221, 2,240,179,243, 65, 17, 17, 17,115,110,223,190,221, 78, 36, 18, 17, + 85,212, 17, 0, 64,183,110,221, 94,144, 74,165,126,199,238,122, 67, 35,110, 4, 78, 80, 12, 8,101, 96, 84,173,144, 38,110,142, +176,176,171,126,133,133,133,173,139,139,139,255,168,102,209,247, 24, 58,116,232,150,248,248,248,176,110,221,186,113,215,175, 95, + 39,157, 71, 17, 34, 34, 34,250, 92,185,114,165,237, 91,111,189,181, 97,215,174, 93,147, 81,118,166,109, 85, 72,179,197, 27,172, + 53,156, 74,198,105,128,169,103,179,153,241, 10,229, 31,128,234,132, 92,120,140,240, 12,143,149,196, 10, 13, 24, 21,108,111,111, +139,137,213,158,162,168,223,111,220,184,113,112,196,136, 17,186,252,252,124,248,249,249,161,126,253,250, 32, 8, 2,235,214,173, + 51, 62,120,240, 96,159, 45,150, 86,251,204,204,204, 65, 54,177,229, 10,218,213,171, 87,239,218,182,109,155,234,218,181,107, 2, +154,166,149, 77,155, 54, 53, 92,190,124,217, 83, 36, 18,113, 98,177,152,189,118,237,154, 34, 34, 34,194, 68, 16,132,244,199, 31, +127,204,191,122,245,106,248,140, 25, 51,190, 65,217,105,226,206,216,185, 96,193,130,140,148,148, 20,152,205,102,104, 52, 26, 20, + 23, 23,151, 46, 69, 69, 69, 40, 46, 46,134, 72, 36, 66,118,118, 54,246,239,223,159,101,139, 18, 95,153,101, 99,237,154,117,235, +213, 89, 15,211,160, 84,200, 65,107,138,192, 20,231, 3,218, 98, 72, 40, 43, 60, 68, 12,234, 54,146, 67,166, 80, 34, 71,163, 67, +252,229, 95,179,109, 81,226, 43, 54, 23, 88, 44,107,223, 93,177, 34,135, 22,139, 81,111,248,112, 88,109, 67,133,142, 66,139, 33, + 8,132,247,234, 5,210,219, 27, 11,247,237,203,177, 69,137,127,162, 96, 89, 86, 96,177, 88, 42,203, 7, 88,150, 77, 79, 76, 76, +220, 5,224, 44, 65, 16, 28, 65, 16, 28, 74,130,181,233,158,229, 7,153,162, 40,204,157, 59, 23, 98,177, 24,115,231,206,197,167, +159,126,138,101,203,150, 97,253,250,245,248,246,219,111,113,244,232,209, 6, 23, 47, 94, 20,159, 63,127,158,139,139,139,203,139, +136,136, 16, 76,156, 56, 81, 37,151,203, 63,168,140, 51, 54, 54, 22, 94, 94, 94,136,141,141,197,146, 37, 75,176,121,243,102, 28, + 60,120, 16,151, 46, 93,130, 64, 32, 96,211,211, 31,193,100, 50,113,171, 87,175,206, 56,120,240,160,113,213,170, 85, 16, 10,133, +196, 83,106, 36, 62,176, 9, 42, 71, 75,144,115, 72,133,124, 0, 43, 81,181,111, 84, 69,156,144,197,199,215,181,137,163,100, 7, + 65,116, 24,192,116, 84, 62,189,218,206, 49, 25, 64,112, 45,112,206,150,143,254,191, 68,213,166, 59,247,175,100, 25,103, 3,248, +193,158, 39,165, 82, 41, 63,112,224,123, 33, 0,236,219,187, 95,148,148,148,228,253,253,247,223,203, 2, 3, 3,241,237,183,223, +202,228,114,121, 96, 5,156,204,193,131, 7,205, 18,137,196,111,194,132, 9,253,218,181,107,247,190,173, 35,218, 11, 64, 11,148, +204, 94,140,186,127,255,126,130,191,191,255,221,147, 39, 79,234,221, 41, 32,173, 86,251,205,214,173, 91,235, 23, 48,190, 56,166, + 31,138,120,118, 41,142,170,182, 32,173,222,167, 80,212,121, 25,175,191,254,122, 29,134, 97, 54, 85,179,220, 95, 31, 50,100,200, +214,248,248,248,176, 9, 19, 38,100, 95,191,126, 61, 7, 64, 60,128,237,142,203,237,219,183,243,198,142, 29,155,181,105,211,166, +144, 17, 35, 70,172, 7, 48,140,127,245,243,224, 81,182, 47,132,170,102, 29,186,120,225,150,254,207,205,205, 93, 93, 88, 88,120, +233,222,189,123,239, 89, 44,150, 16,130, 32, 56,177, 88,156,157,147,147,179,202, 33, 96,169, 43,191,146,222,176,197,218, 32, 8, +130,226, 56, 46,189, 71,143, 30, 31,244,234,213,235,171, 35, 71,142,152,186,119,239,142,189,123,247,250,247,232,209,195,192,178, + 44,119,236,216, 49,255,190,125,251, 26,206,158, 61,171,127,251,237,183,155, 54,105,210,100, 98,108,108,172,154, 32, 8,214, 21, +167,253, 93, 86, 84, 84, 52,164, 95,191,126,151,246,237,219,167, 84,169, 84,160,105, 26, 6,131, 1, 6,131, 1, 28,199,193,219, +219, 27,106,181, 26,243,231,207,215, 20, 23, 23, 15,118, 33,220,156, 57, 77, 38,147,105,216,228,247,167,159, 90,245,249, 92,175, +240, 6, 13,144,127,199, 4,218,100,128,136, 35, 81,247, 5,111,136, 37,114,220, 75,210,226,163, 93, 7,180, 70,147,233, 53, 23, +189,229,114,156,197,197,197,195, 98, 62,253,244,244,134, 25, 51, 60,219, 4, 5, 65, 32, 16,192,108, 54,131, 97, 24,136, 68, 34, + 68,198,196, 64, 28, 16,128, 57,187,118,233, 53, 26,205, 48,148,255, 20,143, 51,103,109,192,145,115,242,141, 27, 55,198, 54,107, +214, 12,147, 38, 77,194,144, 33, 67,202, 28,248,253,247,223, 99,253,250,245, 48,155,205, 99, 1, 92, 7,176, 14, 37, 67, 29,112, + 18, 89,127,119, 58,107,157,147, 97,152,194,164,164, 36,229,210,165, 75, 9,171,213,138,207, 63,255, 28,118,193,105,175,215, 83, +166, 76,169,227,229,229,133,207, 62,251,204,146,151,151,215,115,201,146, 37,103,182,111,223,238,255,205, 55,223,188, 14, 32,214, +153,147,101,217,220,155, 55,111,122,109,216,176,129,164,105, 26,203,151, 47, 47, 55, 60, 57,126,252,120, 88,173, 20, 4, 2,161, +197,100, 50,183,144,203,229,201,126,126,126,114,174,172,115,215,147,188,159,161, 40, 9, 97,224,232,248,110,113,244,207, 66,197, + 33, 21,170,195,169,150,197,199,119, 55,197,196,156,181, 9,162, 68,219, 49,123,237, 38,253,106,112,218, 5, 97, 77, 56, 79,217, +150, 42, 97, 50,153,160, 86,171,145,151,151, 7,149, 74, 5,129, 64, 64, 84,148, 78,179,217,252,231, 71, 31,125,116, 99,211,166, + 77,189,175, 92,185, 50,240,252,249,243, 61, 78,159, 62,109, 74, 75, 75,163, 41,138,226, 66, 66, 66,132,157, 59,119,150,245,239, +223,223, 67, 42,149,146,179,103,207,206,251,226,139, 47,252, 81,214,135,205, 57,239, 2,130, 32,240, 97, 87, 45, 98,123, 8, 96, +177, 88, 81, 84, 84,132,140,140,116, 36, 36, 36,224,202,149, 59,224, 56,142,172, 70,185,251, 1,152,253,221,119,223,133, 74, 36, + 18, 98,215,174, 93,117,118,237,218, 85,165, 37,117,199,142, 29,117,118,239,222, 61,207, 54,122,145,254, 44, 62,239, 60,231,255, + 44,231,179, 12,231,200,240,168, 82,104,217,218,249,246,176,125,148,148,162,168, 95, 92,132,112,248, 4,192, 92, 7, 43, 88, 85, +230, 60, 13,199,113, 23,122,247,238, 61,165, 87,175, 94, 43,250,244,233,147,149,149,149,213,112,249,242,229, 97, 52, 77, 91, 19, + 18, 18,200,228,228,228,180,223,126,251,173, 81,147, 38, 77, 38,222,190,125,251, 28, 65, 16, 86, 55, 50,152,144,156,156,220,169, + 71,143, 30,251, 39, 78,156, 24,222,161, 67, 7,137, 74,165,130, 80, 40, 68, 74, 74, 10,254,248,227, 15,203,238,221,187,211,139, +138,138,170,243, 9,158, 95, 82, 51, 50,162, 70, 76,125,111,223,196, 33, 3,253,255,213,244, 5, 73, 72, 72, 8, 96, 52,226,206, +195,108, 92,189,243,135,117,243,133,171,106,179,217, 60, 12,238,127,130,231,151,223,238,221,235,221,115,198,140,125,243,254,243, +159, 32,100,101, 9, 67, 66, 66, 32,145, 72,240,224,193, 3, 36,179, 44,189,120,227,198, 28,155,200,122,210, 81,225,165, 0,150, +178, 44, 43, 4, 0,185, 92,142,119,223,125, 23,142,159,220, 89,191,126, 61,140, 70, 35, 0, 8, 9,130, 88, 10, 96,203,179,110, +197,178,163,160,160, 96,206, 43,175,188, 18, 39, 20, 10, 43,140,122,235,227,227, 3,173, 86, 11,154,166,153,140,140,140, 59, 62, + 62, 62, 16,137, 68,224, 56,206,229,115,148,159,159, 63,103,216,176, 97, 11, 72,146,172,200,242, 1,165, 82,153,118,230,204,153, +198,111,189,245, 22,249,223,255,254, 55,101,194,132, 9,210, 51,103,206, 48, 28,199,237,127,210,247,160, 75,151,157,192,134,152, +215, 0,188, 6,148,115,120,207,176,109,171, 86, 72,133, 46, 93,118, 98, 3,254,226,116, 28,198,179, 11, 34,155, 21,170,185, 44, + 62,126, 5, 74,252, 44, 42,229,238,178,179, 11, 54,196,160, 86, 57,221,129,163,246,213,235,245, 96, 24,166, 50,107,222,239,123, +247,238, 93,241,219,111,191, 5, 76,153, 50,165,225,127,254,243, 31,101,143, 30, 61, 60, 29, 15, 48, 26,141,236,225,195,135,245, +235,215,175, 47,190,112,225, 66,234,248,241,227, 59, 84,150,206,135, 15, 31, 30, 93,184,112,161,119,255,254,253,155, 0, 40,245, +207, 82,171,213, 72, 75, 75,195,159,127,254,153,102,181, 90, 15, 85, 35, 75,249, 0,230,141, 26, 53,106,233,182,109,219,234, 76, +152, 48, 33,123,247,238,221,127,162, 36, 96,177, 51, 84, 67,134, 12,105,185,109,219,182,144, 9, 19, 38,100,163,196,143, 44, 29, + 60,120,240,176,163, 59,202,251,105, 85, 58, 50,177,213, 98,177,112, 38,147,137, 51, 24, 12,156, 78,167,227,224,250, 43,240, 7, + 51, 51, 51,185,244,244,116,238,225,195,135, 92,106,106, 42, 7,224, 91, 39,197,235,170,193,242,216,177, 99, 71,163,208,208,208, +207, 21, 10,197, 9,129, 64,160, 17, 8, 4, 26,169, 84,250,131,159,159,223,167,139, 23, 47, 14,229, 56, 78, 92,137,138,174, 8, + 66,145, 72,244, 86, 96, 96,224, 65, 95, 95,223,116, 31, 31,159,244,192,192,192,131, 34,145,232, 29, 0,162, 42,148,121, 69,144, + 9,133,194,143, 60, 60, 60, 78, 73,165,210, 92,169, 84,154,235,225,225,113, 74, 40, 20,126,132,202, 3,169, 86,202, 41,145, 72, + 62, 10, 8, 8, 56,165, 84, 42,115,149, 74,101,110, 64, 64,192, 41,137, 68,242, 56,156,143,211, 43,177, 11, 45, 3,103, 3, 65, + 16, 84,235,214,173, 55,180,109,219,118, 93,219,182,109,215,181,106,213,234,107,155, 85,146,179, 89, 91, 12,168, 56,120,227,223, +153,206,167,198, 25, 25, 25,185,125,219,182,109,236,156, 57,115, 52, 77,154, 52, 41,152, 51,103,142,102,219,182,109,108,100,100, +228,246,154,114, 6, 5, 5,213,139,140,140, 44,216,180,105, 19,157,148,148,196,109,218,180,137,142,140,140, 44,112,138, 12,255, + 36,242, 78, 0,136,176, 89,127, 14, 1,216,131, 18,231,247, 80, 0, 68,140, 41,134,179,205, 62, 60, 1,160, 79, 5,101,239, 46, +103,152, 41, 38,134,179,249, 84,157, 4,144,232,176,222, 13,101,253,191,158, 4,167, 75,180,104,209,226, 30,231, 0,139,197,194, +169,213,106, 46, 41, 41,137,187,112,225, 2, 23, 22, 22,118,207, 13, 78, 63, 0,111, 3, 56, 28, 28, 28,124,187, 99,199,142, 15, + 59,117,234,244,176, 94,189,122, 41, 34,145,232, 10, 74, 34,188, 71,218,150,165, 0,154, 84,193,217, 81,165, 82, 45, 12, 11, 11, + 59,212,184,113,227, 75,245,235,215,191,226,235,235,123, 68, 38,147, 45,194, 95,145,177,171, 91,231,123, 12, 29, 58, 52, 77,167, +211, 49, 47,189,244,210,109, 87, 39, 53,107,214,236,162, 78,167, 99, 70,142, 28,153, 14, 32,250,159,240,188,243,156, 79,133,243, + 31,133,198, 54,193,116,208, 97,249,196,197,113,159, 56, 29,179,213,118,110,149, 5,193,113,156,128,227, 56, 15,142,227,188, 57, +142,243,229, 56, 78,197,113,156, 39,199,113,210, 42,204,223,124,197,254,251, 56, 39,219, 4,148,193,246,223, 25, 85,237,127,174, +239,103,104,104,168, 79,187,118,237,166, 30, 56,112,224,163,251,247,239,127,116,224,192,129,143,218,181,107, 55, 53, 52, 52,212, +231,113,210, 25, 20, 20, 84,175,121,243,230, 95, 53,107,214, 44,189,121,243,230, 95, 57,137,172, 39,153,119,137, 77,196, 52,179, + 45, 13,109,219, 8,148,196,194, 90,107, 19, 54, 17, 21,244,212,170,195,105,231, 59, 4,160,175,109, 57,100,219, 22,246, 20, 56, +203,161, 65,131, 6,199, 91,182,108,121,175, 85,171, 86,201,173, 90,181,186,215,162, 69,139,123, 77,155, 54,189, 23, 17, 17,113, +175,110,221,186,247,252,253,253,143,215,160,140,124, 1,132,160,252,103,192,158,118,157,239, 30, 25, 25,121, 85, 38,147,185,140, + 13, 38, 20, 10,231,181,106,213,234, 38, 74,102, 74,242,237, 39,207,201, 11,173,255, 33,240,149,240,217,227,148,162,242,207,140, + 84,181,159,191,159,207, 54,167,203,111,117,217,132, 76, 67,155,192,145,212, 2,167, 35,159,189, 78, 69, 56,136,166,167,193,201, +215, 37,158,147,231,228,133, 86,173, 67,200,223, 2, 30, 78, 48, 63,230,126, 30,207,197,104, 60,126, 0, 0, 32, 0, 73, 68, 65, + 84, 54,170, 19, 19,235,113, 56, 93,241,221,127,202,156, 60,120,240,224, 81, 91,109,103,119, 0,231,236,189,194,138, 84,105,117, +102, 19,212, 68,217,158,230, 57,121, 78,158,147,231,228, 57,121, 78,158,243, 31,199,105,199,138, 10,182,223,113, 90,255,250, 25, + 21, 94, 79, 36, 76, 15,111, 86,229, 57,121, 78,158,147,231,228, 57,121, 78,158,179,166,152,248,140,138,172,110,246, 21,126,232, +144, 7, 15, 30, 60,120,240,224,193,163,246, 80,117, 28,173, 61,123,246, 8,236,255, 71,141, 26, 53,158, 97,152,169,246,117,129, + 64,176,230,187,239,190,219, 82,217, 21,134, 15, 31,206, 84,198,233, 10, 85, 93,199, 21,103,139, 38,202, 73,126,222,138,247,138, +138, 13, 43, 83, 50,153, 11, 38,147,169,185,125,159, 76, 38, 75,220,178,101,203,221,218, 78,231,248,241,227,155, 56, 95,167,126, +152,168,187,175,151,236,221,130, 34,221,242, 91,247,116, 95,243,117,236,169,192, 31, 64,180,151, 76, 60,168,133, 74,220,241,207, +124,211,101,189,149, 57,140,146,217,176,133,207, 99,134,131,131,131,155, 42,149,202, 49, 0, 90, 24, 12,134, 64,133, 66,145, 11, + 32, 65,163,209,108,207,206,206,190,227, 46, 79,183,250, 72, 3, 16,110, 91,125,120, 46, 21,245,220,217, 87, 21,250, 68,192,196, + 1, 82,130,128,245,100,242, 95,206,232,125, 27,193,196,114,229,183,247,105, 4, 11,199, 65, 76, 0,230,147,247, 33,123,142,138, + 74, 9, 32, 10, 37, 33, 28,110,160, 36,252,132,129,127,100,121,240,120,174,224, 60, 84, 88,186, 46,172, 64, 76,116, 21, 11,137, +175, 56,112, 42,128,243, 51,155,205, 34,137, 68, 2,139,197, 2,133, 66,190,246,237, 9,227, 63, 7,137, 34,138,198,187, 91,182, +108,169,241,151,174,171,115, 29, 0, 63, 57,159,239,163,148, 47, 56,123,248, 99,159,174, 3, 22, 47,178, 60,200,139,213,106,181, +164, 84, 42,133,217,108,134,183,183,119,167, 73, 19, 39,190, 68,138, 56,139, 88,236,113,121,197,138, 21,217, 53, 77,231, 7, 31, +124, 16,108,181,154,254,205,178,172,196, 98,177, 72,157,175,227,173,240, 88,124,246,240,199,138,110,209,139, 62, 7,120,161,245, + 20, 32,169,231,227,113,110,229,168,238,205, 58,182,104, 12, 54,225, 60, 76, 22,235,160,179,233,186, 65,159, 94,201,156,158,174, +179,182, 69, 45, 4,172,252, 31,130,160, 97,195,134, 83, 2, 2, 2, 70,110,220,184, 81,220,176, 97, 67,200,100, 50, 24,141,198, +144,251,247,239,135, 76,154, 52,169,155, 92, 46,223,149,146,146,178, 22,238,125, 8, 46,252,236,214,255, 3, 0,116, 26, 51, 63, + 28, 37, 31,139, 54, 56,239,235, 62,110,126, 56,128, 25, 40,251, 97,228, 44,148,132, 80,112,213,234, 72,142,108, 91,134, 65, 99, + 63, 18, 2,152, 84,154,120, 18,248,225,219, 85,232, 55,234,189, 50,219, 9, 14,194,195,219,150, 33,122,236, 71, 21,126, 71,177, +111, 99,130, 98, 89,174, 66, 75, 60, 73, 18,244,137,123,156,171, 15, 12,231,160, 36, 6, 88, 57, 74,148,124,208,217,229,241, 3, +154, 10,114,172, 20,227, 50,224,172, 88, 36,200, 61,122,135, 41,119,110, 76, 27, 80, 20, 83,210,182,138,133, 96, 14,166,120,159, +157, 61,123,182, 48, 58, 58, 26,155, 55,111,238,252,245,215, 95, 79,212,106,181, 63,218,238, 91, 50,255,248,242,224,241, 92, 11, + 46,215, 66, 75, 40,192,134, 67,251,182, 52,202,201,205, 67,204, 91, 31, 98,231,206,157, 40, 44, 44,132,143,143, 15, 36, 98,177, +104,229,210,255, 11, 86, 42, 61,130, 99, 38,198,110, 0,208,180,166,169,169,230,117, 26, 59,159, 79,216, 62,165, 35, 20,144, 34, +137, 68, 66,238,218,181, 11, 69, 69, 69, 80,169, 84,144, 72, 68,228,138, 69,159,200,149, 74, 79,249,155,147,103,118, 70, 73,252, +159, 26,193, 98,209,117, 62,176,115,139, 82,173, 86, 99,220, 59,177,112,190,142, 88, 44,102,236, 47, 22,190,142, 61, 21,204,222, +248,238,216,102, 47,122, 1,214, 91,151, 32, 18, 8,160,240,246, 65,148, 80, 0, 1,129,230, 49, 39, 82,103, 1,248,244,121,201, +108,195,134, 13,167, 12, 31, 62,124,228,130, 5, 11,196, 36, 89, 18,114, 78,175,215,195,104, 52, 34, 52, 52, 20,103,207,158, 21, +207,153, 51,103,228,247,223,127,143,148,148,148,213,213,229,191,117,235, 86,253,240,240,112, 19, 0, 12,108,233,229,188,175,158, +125, 31, 0,120,121,121, 85,201,231,167,242, 48,223,186,117,181,133,253,188, 41,189, 66,153, 10,182,155, 0, 40, 42,227, 98, 89, + 78,120,242,171, 73, 21,238,127,107,193, 14,250,198,158, 11, 77, 27, 54,108,104,116,220,238,233,233, 89,209, 41, 65, 58,157, 46, +220,121,163,253,120, 43,197, 4, 86,116,189, 62,239,174,119, 41,192, 40, 6,194, 29, 59,118, 0, 0,190,252,104,180, 96,211,207, +121, 66,161,176,164,169, 93,186,116, 41,230,205,155, 39, 57,113,226, 68,255,109,219,182,245, 63,120,240,224,202,138,132, 42, 15, + 30, 60,158, 73,145,229,248, 91,177,208, 34, 9,194, 75,233,229,137,215, 94,127, 27,199,143,255,128,174, 93,187,150,238,107,208, +160, 1,134, 15, 27,140,239,182,174, 0, 0,175,199, 73,209,227, 94,167,176, 88,255,105,191,145, 95,205,127,152,173,187,114,228, +200, 17,116,233,210,165,204,249,175,143,120, 13,223,126,179, 20,149, 68,153,119, 11, 4, 71,138,189,148, 30, 24, 21,243, 14, 92, + 93,103,226,184, 33, 71,250, 14, 95,213, 59, 39, 95,191,130,175,103, 79, 30,141,130,253,250,180,108,214, 20,133,251,215,226,143, + 34, 19,142,103,154,240,102,212,191, 16,233, 43, 71, 23,154, 65,176,135,168,103,182,158,122, 46,132, 86,112,112,112,211,128,128, +128, 50, 34, 75,171,213, 66,167,211, 65,163,209, 64,171,213,130, 36, 73,196,198,198,138,207,157, 59, 55, 50, 56, 56,248,180, 27, +195,136, 15,109,150, 44, 64, 32,210,205,157, 59,215, 28, 24, 24,104, 86, 40, 20,156, 80, 44,213,118, 31, 55,223, 11, 0, 72,161, + 88,187,114,229, 74, 75,104,104,168, 73, 40, 20, 74,222,123,239, 61,210,157, 52,155,205,102,206,145,211, 98, 49,151,110, 95,188, +120,177, 37, 40, 40,200,172, 80, 40, 56,171,213,125,163,227,205, 7, 5,144,138, 5,144,138, 5,144, 73, 68,240,170,223, 14,210, +194, 63, 65,211, 52,150, 44, 89, 98, 13, 14, 14,182, 40, 20, 10, 78, 34,145,136,167, 77,155, 86,101, 58,199,143, 31,207,169, 84, + 42,171, 66,161, 16,207,155, 55,175,220, 76,161, 51, 55, 50, 32,151,136,160,144, 10,209,184, 65, 24,164,156,209,237,180, 10, 4, +101,189, 17,164, 82, 41, 58,119,238,140, 22, 45, 90,224,224,193,131,221,121,161,197,131,199,115,129, 10,103, 24, 10, 1,224,200, +145, 35,221, 80,242, 65, 68, 68, 71, 71, 19, 37,103,112,152, 49,101, 24,222, 28, 55, 10, 12,195,150,126,231,139, 32, 9, 76,126, +163, 63, 88,214,157, 17,137,170,167,120,214,224, 58,165,156, 28, 65, 10, 0,160, 81,189, 16,110,226,155,255, 1,195,178,127, 13, +148, 8,128,183,199,245, 43,217, 86, 11,233, 20,128,193,135,147, 94,133,171,235, 52,109, 84,135,164,173, 38, 16,101, 63,246,248, +119,124,108,147,231,116,129, 22,117, 67, 34, 40,163, 17, 38, 19,133,248, 59, 5,198, 83, 25,250, 64, 82,149,170, 94,245, 90, 7, +153, 64,157,137,122, 94,146,198,217,122,234,185,200,187, 82,169, 28,179,113,227,198,114, 34, 43, 39, 39,135,212,233,116,176, 90, +173,172, 86,171, 5,195, 48,152, 57,115,166,104,206,156, 57, 99,178,179,179,231,217, 53,143, 43, 78,155,223,213,140, 91,183,110, +213,155, 61,123,182,181,103,207,158, 15, 27, 52,104,160, 23, 8, 4, 8, 9, 9, 89, 21, 21, 21,229,187, 96,193, 2,107,255,254, +253, 83, 5, 2, 1, 26, 55,110,172,255,243,207, 63,235, 1,144,187,155,119, 71,206, 45,103,214,112, 0, 64, 16, 4,162,162,162, +210, 26, 55,110,172, 23, 8, 4,184,123,120, 49,231,238,253, 20, 9, 73, 52, 9,245,182, 53, 34, 4, 32,247, 44,245,196,139,138, +138, 74,111,218,180,169,142, 36, 73,220,188,121, 51, 12,229, 63,107, 85,142, 83, 46,151, 83,175,191,254,250,195, 59,119,238,184, + 58, 30, 66, 1,137, 14, 77,109, 6,172,208,182, 64,250,197, 10,211, 41, 18,128,158, 51,101,180, 80, 37, 3,164, 94,254,102,141, + 70, 3,165, 82, 89, 98, 33,179, 90,241,251,239,191,163, 99,199,142,221,246,236,217,115,142,127,222,121, 78,158,243, 47,184,210, + 34,207,160, 53,203,241, 67,247,101,124,180,206, 58,103,138, 97,104, 52, 8, 15,194,226,255, 27, 15,134, 97,193, 48, 12,104,219, + 47,195, 48,160,172,214, 90, 73,217,227, 92,199, 71, 41, 95,240,195,174,119,125,122, 14, 89,218, 43,110,246,184, 83, 12, 3,176, + 44, 5,138, 2, 24,150, 2,203, 48,160,168,218,113,205,161, 88, 22,245,194,130, 17, 55,123, 28,156,175,179,253,187, 61, 3,207, + 28,138, 85,116,141, 94,244,225,221, 52,195, 18, 94,216, 63, 89,200,196, 82, 33, 39,148,193, 98,161,161,181,176, 22, 0,122, 19, +197, 90, 57, 15,127, 25, 0, 8, 73,226,121,154, 93,219,162, 97,195,134,101, 68,214,178,101,203,252,215,173, 91, 23, 10, 0,195, +134, 13,203,232,213,171, 87, 94, 82, 82, 18, 66, 66, 66,136,188,188,188, 1, 0,222,179,157, 59, 3,192,186, 10,120,245,225,225, +225,166,128,128, 0,179, 93, 16,145, 36, 9,161, 80,136,240,240,112, 83, 96, 96,160,185,113,227,198,122,177, 88, 12,146, 36, 97, + 23,122,110,117,243, 8, 2, 2,129, 0,118, 78,103,107,143,157,179, 58, 16, 9,201,242,205,155, 3, 39, 73,146, 46,175, 87, 97, + 29,146,201, 56, 0, 21, 30, 47, 32, 29,154, 71, 97,229, 30, 2,241,191, 67, 4,224, 44,199,113,184,126,253, 58, 82, 82, 82, 32, + 22,139, 17, 28, 28,140,121,243,230,193,108, 46,209,187,195,135, 15,239, 6,224, 38,255, 4,243,224, 81,138,179,207,160,192,114, +182,106, 85,238,163,117,228,200,145,110,209,209,209,231,236, 2,168, 68,236,184, 16, 63, 20, 13,138,178, 2, 28, 87, 43, 66,171, +162,235, 48, 12, 91,233,117,236, 62, 90, 44,203, 9, 93,138, 44,150, 5, 77, 81,181,114,247, 88,134, 2,203, 82,112,117, 29,130, + 32, 25, 91,131, 47,230,159,147, 39,143,224,240,122, 36, 21,222, 0, 23,104, 19, 66,253,164, 18,228, 25,209,240,133,102,130,223, + 13, 20, 46,221, 72,132,191,167,242,185, 41, 23,131,193, 16, 40,147,201,160,215,235, 75, 45, 89,235,214,173, 11,181, 88, 44, 36, + 0, 8,133,162, 48, 53, 27, 42, 99, 88,192, 91,153,133,194,194, 98, 63,142,227, 8,155,224, 89, 10, 96, 11, 42,137,238, 47, 22, +139, 75, 5,138,163, 0,146, 74,165, 53, 18, 48,118,216,197,153, 88, 44,118,185,221,121,120,173, 42,136, 29,133, 22,184, 18,171, +150,147,216, 18, 8, 4,176,251, 70, 85, 5,137, 68, 82,154,119, 87, 16, 10, 28,174, 39,168,190, 43,166,213,106,133, 78,167, 67, + 81, 81, 17,100,178, 18,131, 25,199,113, 32, 8,226, 61, 0,239,243, 79, 49, 15, 30,174,181,200, 51, 44,182, 92, 11, 45,148,152, +236, 8, 0,160, 41,171, 75,241,179,231,240, 37, 60,204,214, 35,216,255, 23,112,213,140,122, 58,114,228,200,173, 33, 33, 33, 29, +236,235, 82,185,167,223,196,119, 63, 3, 77, 91,225, 37, 39,241,214,152,126,101, 68, 86,137, 69,203, 82,225, 55, 65, 10,139,245, +159,246, 27,190,122,190,183,210,239,138,179,248,137,139,191,246, 90,161,198, 28, 70,146,191,162,144, 8, 97,134,191,253,217,120, +135,198,253,198,174,245,115,167,187,109, 15, 36, 72,209,107,147, 86, 77,228,132,158,205, 21,164,246,252,199,227,254,117,192, 81, +204,249,250,250, 30,233,243,218,202,222, 57, 5,188,143,214,211,128,151,183,138, 12,123,185, 59, 94,126,239, 43,156,249,228, 99, + 14, 40,132, 95, 72, 40,217, 99,202, 23,240,124,121, 32,174,190, 53,134, 5, 10,158,139,188, 42, 20,138, 92,131,193, 16, 98, 52, + 26,161,209,104,160,209,104,202, 10, 2,145,136,152,248,206, 84,127,145, 88, 2,202,106,193,241,237, 95, 84,201,105, 15,225, 48, +176,165, 23, 4, 34,137, 54,161, 97,195, 85, 66,161, 16, 36, 73,226,240,218,143,223,219,191,252, 93, 47, 0,184,113,100,173,102, + 84,236,154,213, 36, 73,194,108, 54, 75,171,147,238, 71,143, 30,133,153,205,102,147, 77,160,217,133, 31, 30, 60,120, 80,215,108, + 54, 27, 29,183,187, 3,185,194, 11, 80, 53, 0, 20,129,229,172,103,169,169,169,117, 40,138, 50, 8,133, 66, 88, 44, 22,183, 84, + 17, 73,146,226,155, 55,111,134,177, 44,235,242,248, 22, 17,117,128,224,150,128,196,219,237, 60,115,110,116, 68,109, 98,235,137, + 69,144,230,193,227, 89,177,108, 61,131,207, 4, 81,193,255, 82,161,213,253,200,145, 35,156, 99, 15,145,166, 40,155,200,250, 75, +244, 48, 12,139, 76,181, 9, 73, 73,119,177,114,229, 74, 92,186,250,145,247,130, 5, 11,164,115,230,204, 49,143, 28, 57,114, 57, +203,178,173, 72,146,188,129,191,134, 42,202, 90,133, 88,182,238,181,107,215, 26,218,215, 41,138,130,151,151, 23,188,188,188,208, +180,113, 88, 57,145,197, 48, 12,172,149, 12, 29,218,125,180, 8,142,229, 40,138, 1,195,178,165,226,167, 80, 99, 14, 59,116,250, +122, 35,135,195, 95,176,255,233,220,174,121,197, 98,112,210,188,210,124,236, 90, 63,119,250,130,205,155,165,133, 76,192,180, 81, +175,189, 25, 57,124,212, 24,188,254,234, 43,221,204, 22,203, 65, 1,201,177, 84,233,245, 64,130,131,179,143, 22,143, 39,132,228, + 34, 61, 37,146,202,225, 25, 92, 31,119,117,140, 88, 32, 16,252,114,191,200, 32, 38, 5, 66,144, 66, 49, 18, 10, 77,212,115,148, +221,132,228,228,228,144,186,117,235, 66,163,209,128,166,105,118,216,176, 97, 25, 66,161, 40, 76, 40, 18, 17,209,163,166,178,217, +217,153, 20, 73, 10,192,113, 12, 94, 25, 62,137,144,202,228, 98,171,197, 66,163,100,232,208,149, 53,203, 49,132,131, 87, 84, 84, +148,175,125, 38,224,254,229,239,122, 57,236, 83,190,244,210, 75,190,142,179, 14,221,180, 22, 17, 35, 71,142,148,135,135,135, 19, + 0,240,235,246,217,118,235, 25, 49,112,224, 64, 89,120,120,137, 31,254,143,107,223,117,155,211, 95,193, 1,197, 15,128,226,212, +114,150,172,129, 3, 7, 74, 27, 54,108, 88,173,103,209,230, 0, 95, 97,236, 46, 15, 33, 13,100, 95,119,139, 43,166, 13,168, 80, + 79, 8,151,191, 66, 66,226,233,103,238,240,241,137,159,121,177,197,131,135, 91,112,210, 34,207, 20,186,217, 4, 98,119,219,111, +169,224, 18, 2,128,205, 68, 71, 56,232, 44, 80,180,181,156,200, 98, 24, 6, 34,194,140,149, 43, 87,226,253,247,223, 7, 0,241, +244,233,211, 15, 44, 88,176, 96, 40,203,178,173, 56,142,235, 66, 16, 68,101,189,198,179, 33, 33, 33, 57, 28,199,137, 72,146,236, +178,118,237, 90,223,254,253,251,195,203,203, 11, 28,203,149, 19, 89, 12,195,194,106,181, 84,248,153, 91, 31,165,124,193, 15,123, +166,249,244, 28,188,180, 23,195,178,167,236, 34,139,101, 24,128, 45, 57, 41, 63, 55, 3, 39,143, 31,196,134,245, 27, 10, 65,112, +183,193,129,181,137, 65, 84, 32, 6, 91, 93,252, 53,177, 75,231,118,205,177, 96,243,102,233,173,107, 89, 7,166,126, 48, 43,114, +248,168, 49,216,243,221,118,144,116,209,117, 71,145,197, 80, 44,138, 11,243, 6,254,196,251,104, 61, 45,248,158, 60,117,138, 24, + 51,102, 12,171,213,106, 33,150, 72, 88,138,162, 4,255,254,247,191,153,247,223,127,159,204,206,206,134, 70,171, 19, 2,240,197, +115, 96,214,210,104, 52,219, 39, 77,154,212,237,252,249,243, 98,146, 36,161,209,104,208,163, 71,143, 60, 53, 27, 42,155,248,206, + 84,255,204,204, 12, 90, 41, 23,154,197, 98, 17,114,115,115,217,110,253, 71, 27, 71,141,127,191,206,251,179,227, 54,102, 93, 94, +191,206,157,107, 56,206, 4,116,222,183,105,211, 38, 75,104,104,168, 73, 42,149, 74,198,141, 27,231,214,248,161,197, 98,225, 22, + 47, 94,108,118,158, 93,104,177, 88,184,149, 43, 87, 90,194,194,194,204,114,185,156,163,168,170,253, 62, 73,146,160,223, 90,176, +131,166,105,186,140, 21,203, 46,178, 40,150,208,125,245,213, 87,214,176,176, 48,139, 66,161,224,164, 82,169,216,157,116, 78,157, + 58,149,243,241,241,177,122,120,120,136, 99, 99, 99, 31,107,214, 33,197, 64,184, 96,109,105,120, 7,169,151,151, 23,180, 90,109, +105, 90, 67, 66, 66,120,177,197,131,135, 11,148,211, 34,207,166, 21,206,189, 56, 90, 44,160,203,201,205, 11,244, 15,170, 15,154, +166,109, 11, 5,154,162, 48,237,237, 81, 88,190,254, 43, 0,176,139,173,168,233,211,167, 31, 0, 80,101, 99,182,107,215,174,249, +211,167, 79, 87,230,228,228,156,216,186,117,171,239,232,209,163, 49, 99,198, 12, 44, 93,186, 20, 34,137, 12,190, 1,117, 75,175, + 99,191,110,158,186, 0, 28, 56, 93, 5,118, 58,107, 73, 35, 5,161, 95, 64, 61, 80, 12, 5,150,162, 64, 81, 20, 8, 65, 73,214, + 78, 30, 63,136,209,111, 76,133, 72,170,244, 89,179,114,137, 49,242,229,144,161,115, 38, 76, 48,187, 97, 4, 36,111, 93,203, 58, + 48,245,253,216, 40,187,200,218,183,125,253,237, 47,103, 14,222, 41,149, 8, 75,175, 67,177, 44, 72, 82,192,251,104, 61, 37,145, + 37,149, 74,247, 30, 59,118,236, 94,219,182,109, 9,189, 94, 15,138,162,144,151,151,135, 3, 7, 14, 36,112, 28, 7, 31, 31, 31, + 28, 59,118,140, 29, 61,122,244, 94,179,217,252,218,179, 46,182,178,179,179,239,200,229,242, 93,179,102,205, 26, 53,115,230, 76, + 17,203,178, 72, 74, 74, 2, 8,130, 19,137, 37, 32, 73, 18, 34,145, 16,197,197, 26, 86,225,169,202,178,114, 2,133, 72, 44, 1, + 41, 16, 87, 54, 77,248,161, 45, 24, 41, 72,161, 88,107,159, 9, 40, 22,139,113,117,207, 50, 77,247,113,243,149, 0, 32,150,202, + 11,251,244,233,147,214,188,121,115,253,111,191,253, 86, 15,229,103, 29, 58, 63,159,244,144,113,177, 2,133, 92,166,143,138,138, +122,104,231, 76, 61,181, 70, 51,102,242,108,130, 16, 72,244,209,209,209,105,145,145,145,122,129, 64,128,196,131, 75, 52, 67,198, +197,202,136, 74,130,172,158,184,199,189,117, 99,207,133,166, 95,124,241, 5,213,191,127,255, 71,118,127,177,212,212,212, 58, 3, + 6, 12,144,174, 88,177,130, 26, 48, 96, 64,250,139,255,207,222,117,199, 53,113,254,225,231, 46,155,189, 71, 16, 68, 69, 81, 20, +112,139, 11,197, 58,107, 29,173,226,194,189, 71,157,173,179, 14,220, 74,221,168,117,214, 90,220, 84,171,162,214, 81, 23, 42, 46, + 16, 7, 67, 69, 1, 25, 97, 67,128,144,157,187,223, 31, 36, 52, 32, 35, 65, 91,107,127,121, 62,159,124,146,220,189,247,220,123, +251,185,239,251, 29, 94, 94,197, 36, 73, 34, 50, 50,210,185, 58, 75,149, 6, 70, 70, 70,138, 9, 19, 38,188,123,254,252,121,109, +163, 14,171,133,139,139, 11, 40,138, 66,183,110,221, 32,145, 72, 12,150, 45, 3, 12,248,111,162, 98, 30,173,170, 51,195, 43,148, +138,111,167,204, 94,185, 19, 32, 76,181,238, 2,127, 25,150,104, 16,223,127,255,157, 9, 0, 35,141,216,154, 59,119,110,141,101, + 78,180, 68, 86,155,128,128, 0, 44, 94,188, 24,155, 55,111, 86,253,248,227,143,140,248, 87,137,242,177,211, 87, 20, 84, 88, 15, +104,208,197,148,130,250,182, 50,190,124,161,104,133,239, 87, 27, 86,166,101,150,220, 25, 59,109,105,217,221, 75, 5,160,144,224, +171, 0, 96,207, 79, 63,137, 88, 92,115,147, 33,195, 71, 1, 64,207,157,219,130,206,172,193,129,154,197, 22, 77,120,124, 59,119, +129,149, 70,100,237,218,186,246,185, 5,145, 25, 60,243,187, 24,133,246,122, 0,192,218, 12,103,124,191,218,208, 59, 43, 79,180, +221,112,158,253,115,224,112, 56,171,175, 95,191,110,226,237,237, 77,228,230,230, 66,165, 42, 61, 34,114,185, 28, 66,161, 16, 69, + 69, 69,144, 74,165,104,221,186, 53,185, 99,199, 14,147,153, 51,103,174,150,201,100,211, 63,247,237,126,251,246,237,174,115,231, +206,225,214,173, 91,195, 22, 45, 90,196,114,116,116, 36, 44, 44, 50, 9,133, 92, 6,128,166,179,179,179, 41, 99, 83, 75,129,173, +131,243,187,244,140, 44, 15,133, 92, 6, 74, 37,175,210,219, 92,157,222,225,251, 23, 47, 94,212,219,180,105,147, 76, 59, 18,112, +248,130,157, 59, 90,183,110,109, 29, 28, 28, 44,235,215,175, 95,178,198,121, 93, 23,103,248, 43,111, 48,251,197,139,103,205, 42, +114,250, 77,222,116, 80,195,169, 29,141,216,255,187,189, 7, 27, 53,106,100,237,233,233,153, 92, 29,111,131, 6, 13,196,124, 62, + 95,214,164, 73,147, 98, 22,139, 85,106,201, 82, 40, 74, 26, 52,104, 64, 57, 56, 56,200,154, 54,109, 90,172,175,211,190,145,145, + 17,173,177,138, 85, 6,125,162, 14, 89, 12, 40, 3, 2, 2,202, 50,195,127,223,168,145, 96,212,168, 81,252,121,243,230,225,224, +193,131,184,123,247,238,123, 98,191,107,215,174,184,125,251,246, 74,252,135, 18,235, 26, 96,192,255, 25,170,207,163, 85, 17,135, + 14,133,252, 9, 45,159,166,202,176,102,205, 26,174,218,146,213,115,206,156, 57, 16,139,197, 86,149, 52,235, 1,117,174,141,202, + 68, 86, 80, 80,208, 49,154,166,157, 1,116, 86,169,168, 7,251, 15, 28,234, 86,213,250,134, 12, 25,242, 30, 39, 77,144, 12,146, + 36,138, 57, 44,250,201, 79,251, 14, 30, 41,215,190,212,249,189, 49, 8, 60,221,185, 45, 72, 12,160,103, 69,177,133,191,202,140, +148,113,106, 48,117,218,212, 50,145,181,115, 91,208, 85,207, 54,117,191, 89, 58,113,117,165,226,108,245,138, 41, 38, 36, 73,116, +172,224,163,245, 30,231, 71,128,129,243, 47,116, 11, 8, 8,104,238,227,227, 67,106,139, 44,153, 76, 86,150,184, 83,227, 44,158, +150,150,134,174, 93,187,146,205,155, 55,247,122,248,240, 97, 55,252, 85,206,233,115,221,118,213,219,183,111,119, 56, 58, 58, 94, + 91,190,124,249,168,156,156,156,175,242,243, 11,108,194, 14,173, 70,159, 33,211,136,174,125, 71,136,100, 52,147,151, 42,200,108, +114,243,226, 81,235, 75, 39,118, 65, 46,147, 77, 1, 16,135,191,210, 59, 84,228, 44,209,164,113,104,210,164,137, 72, 91,168,212, +173, 91, 87,226,228,228, 36,245,244,244, 44,155, 94, 69, 52,223,123,219,174, 47,167,218,255, 75, 84,211,254,212,136,182,138,105, + 35,140,141,141,161, 17, 95,250,244, 83, 59,218,178,210, 27,101,205, 81,135,101,156,234,244, 14,229,116, 90, 72, 72, 72,143,144, +144,144, 54, 0,158,160,180,214,161, 2, 40, 29, 74,212,114,154, 15, 84,127, 12,215,187,129,243,255,149,243,115, 70, 87,252,229, +155, 5,148,250,106,221,170, 82,104,213, 4,141,227, 59, 0,114,238,220,185,249, 98,177,216,106,212,168, 81,213, 46,147,145,145, +113,240,240,225,195,229, 68,214,160, 65,131,198,133,134,134, 94,203,202,202,170,213, 86, 89,153, 27,173,185,117,126,161, 85,215, +126, 27,230, 0,248,177, 10, 67, 30,229,217,134,255,205,206,109, 65,103, 42,136,173, 95, 1, 12,170, 74,149,246,250,114, 32,142, + 30,218,169,241,237, 50,122,254, 56,237,210,176,168, 85,149, 70, 43, 90,154,114, 87,169,251, 49,207,224,163,245,207,128,205,102, +251, 45, 90,180,136, 45, 18,137,222, 19, 89, 21,133, 86, 97, 97, 33,158, 62,125,138,177, 99,199,114,163,163,163,253,228,114,249, +141,255,194, 62,200,200,200,136, 87, 39, 35,157,173, 73,225,192,229, 25,177, 71,140,159,227, 92, 22,117,120, 98, 23,164, 18, 49, + 0, 48,117, 73,239,192,100, 50,217,209,209,209,174, 26,171,149, 92, 46,231,106,166, 63,126,252,216, 85,147, 91, 75, 34,145,232, + 28,117,248,119,113, 62,123,246,204, 89, 19, 29,169,137, 46,100, 50,153,236,200,200, 72,103, 13,167, 84, 42,213, 41,234,144,195, +225,176,163,163,163,157, 85, 42,213, 71,139, 58,212, 22,198, 40,173,179, 88,174,214,162,218,183,140, 32, 8,130, 54, 12, 27, 26, + 96,192,103,143,138,145,146,213, 23,149,174, 9, 26,199,119, 61, 22, 97,186,184,184,244, 26, 62,124,120, 57,145,229,239,239,175, + 58,125,250,244, 77, 62,159,159, 73,146,100,188,190,253, 40,243,209,194,123,111,144, 32, 73,242,105,231,182, 77, 65,146,228,211, +165, 19, 39, 74,215,224, 64, 57,177,117,246,204,201,222,169,249, 49,149, 75, 51, 0, 54,246,117, 16, 48,238, 91, 4,140,251,214, + 10, 64, 39,160,234,104,197,234,250, 97,192,223, 3,130, 32, 56, 78, 78, 78,207, 37, 18, 9, 8,130,128, 84, 42, 45, 19, 88, 69, + 69, 69, 16, 10,133,101,255,229,114, 57,178,179,179, 81,183,110, 93, 16, 4,241,159,246,163,147,203,229,202, 69, 43, 55, 29,102, + 48,217, 74,138,146, 19,114,185,124,188, 62,215,249,162, 69,139, 72, 84,226,123, 53,115,230,204, 74,167,127, 42,206, 37, 75,150, + 84, 26, 37, 56,115,230,204,106,163, 7,171,194,119,223,125,247,209,162, 14,117,191,125, 25, 96,128, 1,255, 49, 84, 26,186, 87, + 43,161, 69,146,228,211, 74,162, 11, 9, 0, 52, 73,146, 79, 43,201,114,160,124,247,238,221, 74, 75, 75,203, 41, 34,145,232,143, + 65,131, 6,205,245,247,247, 87, 1,165, 14,242,181,221,162,124,161,104,133, 95,255,141,243, 10,138,165,193, 21,231, 85,180, 60, +105,196,214,174,237, 65,187,207,132, 30,247,207, 72, 79,221, 93,213,182, 85, 37,168,170,138, 86, 20, 22,138, 87,250,245,223, 56, + 39,191, 80,108,240,209,250,135,160, 82,169,174, 24, 25, 25, 17,154, 98,202,218,214,171,194,194, 66,148,148,148, 64, 93,146, 6, + 0, 80, 92, 92, 12, 11, 11, 11,168, 84, 42,250, 63,182, 43,164, 0,230,171,173, 85, 0, 48, 63,241,230, 14,237,115,251,153,246, +188,106,172, 89, 2, 93, 10, 68, 87,182, 92,117,243,254, 6,206,204,106, 10, 68, 87,135, 76, 61,249, 50, 1,128,205, 98,100, 85, + 85, 60,154,205, 98,100, 85,227,183,175,231,123, 3, 65, 3, 88,105,184,178, 13, 48,224,243,125,255,255, 84, 43,238, 97,224, 52, +112, 26, 56,255, 17, 78,174,250,163,235, 60,195,254, 52,112, 26, 56, 13,156,255, 54,206,202, 48,249, 51, 17, 90,116, 37, 31, 0, +181,180,104, 25, 96,128, 1,255, 58, 72,107, 57,207, 0, 3, 12, 48,192,128, 15,199,123,197,164,181,103, 84,165, 74,245,137, 38, +168,141,178,189,102,224, 52,112, 26, 56, 13,156, 6, 78, 3,167,129,243,255,142,179, 38,110,237,229, 39, 3,216,247,153,136,173, + 79, 18,208, 98, 48,171, 26, 56, 13,156, 6, 78, 3,167,129,211,192,105,224,172, 45, 12, 67,135, 6, 24, 96,128, 1, 6, 24, 96, +128, 1,255,231,208, 47, 97,169, 1,149,160,238,192,165,160,176, 68,189, 59,131,144,114, 54,240,191,182,137,254,254,254, 12,125, +218, 39, 38, 90,146, 81,224,111, 54, 55, 97,247, 47, 22, 41, 54, 83, 81, 43,130,107, 58, 17,109, 27,180, 26,109,204, 51,158, 46, +147,201,234,155,154,153,101,229,229,102,239,201,123,247,108,151, 86, 27,243, 7, 15, 30,240,125,124,124,210, 1, 20,105,189, 41, + 24, 96,128, 1, 31, 19,150, 77, 93, 64, 16,227, 1,250,175,176, 75,138,142,129, 48,238, 80,185,118, 22, 30,227, 64, 18,205,180, +166,136, 65, 99, 63, 10, 98, 83,106,120,224, 88, 38, 36, 36,184, 54,108,216, 48, 25, 64, 65,197,181, 87, 50,207,112,157, 27,240, + 57,163, 43,202, 39, 44, 45,187, 22, 62, 92,104, 53, 26, 84, 31, 74,114, 12,104,140, 4,129,104, 36,134, 14,174, 21,143,219, 55, +117, 64, 49,219, 1,104, 5,208,173, 76,140,120, 45,197, 50,121, 22, 69,211,163,241,230,228, 19,189,249,234,251, 79, 67,213,229, + 44, 86, 34, 49,244, 39,189,248, 40,250,135, 71,183, 79,115, 45,141, 9, 52,108, 61,104, 1,202,103,112,174, 45, 56, 0,124, 73, +146,108,102,108,108,204, 47, 41, 41,201,166, 40, 42, 5,165,227,211,249,181,228, 36, 1, 76, 48, 53, 49,233,227,106,198,105,245, + 46, 71,152, 86,164, 80,133,163, 52,161,107,254,199, 58,163, 74, 69,150,227,190, 57, 35,124,198, 6,205,234, 1, 75,191,141, 11, + 74,128,234,132, 22,225,220,184,227,217, 97,195,135,248,205,152, 60,214,180,142,157, 41, 4, 57, 34,155,159, 14,134,108, 10, 9, + 57,218,111,226,176,158,125, 0, 96,245,234,213, 95,187,184,184,212, 99, 48, 24,137,203,150, 45,251,117,197,138, 21, 52, 81,117, +165,114,190,250, 28,214,220,240, 77, 0,120, 2,104, 0,224, 45,128, 23, 40,159,101,188, 54,248, 44, 56,235,212,169,227, 68, 81, +212, 68, 7, 7,135,175, 50, 51, 51, 47,144, 36,121, 32, 45, 45, 45,253, 83,222,117,104,154,222, 75, 16,196,100,154,166,247,233, +241, 61, 69,159,117,240,120,188, 76,137, 68, 98,175,254,157, 37,145, 72, 28,254,174,237,249, 39,215,245, 15,189,127, 79,186,114, +231, 69, 31,237, 73,189, 58, 55,171,228,142, 66, 52,187,114, 39,166, 75,249,118,158,170, 42,238,129, 4, 77,211, 88,185,114, 37, +177,106,213,170,113,110,110,110,141, 72,146,124,185,124,249,242,114,169,111, 42,206,211,186,206, 13, 98,203,128,207, 21,250, 21, +149,174, 17, 77,253, 77, 32,161,253, 1, 98,108,215,182, 45, 59, 79, 25,221,159,160, 25, 60,140,152,180, 80,169, 55,151,235, 88, + 46, 24,226, 53,222,205, 26,207, 29,210,191, 7,217,198,179, 30,248,118, 22, 0,201,194,222,139, 73, 54,193, 65,203,118, 3,240, +169, 69, 47, 87,188,137, 56,102, 47, 40, 80,129, 32, 0,130, 0, 72, 2, 40,150, 80,232,245,245,152, 21, 0,126,210,243,174, 68, + 90, 26, 19,152,123, 76, 2, 0,140,143,112, 80,234,217,217,217,141,155, 61,123,182,137,167,167,167, 37,143,199,227, 72, 36, 18, +135,132,132, 4,187,101,203,150,121,138,197,226,243, 0, 30,233,201, 89,183,161,179,211,201,224,185, 19,218, 53,111,224, 10,150, +172, 24,148, 84,228,242, 42,225,117,135,169,187, 79, 77,138,201,147, 12, 71, 45, 74, 38,228,228,228, 16, 0, 96,107,107, 75,151, + 23, 89,237,199,110,157,215, 11,115,183, 92, 65,137, 68,118,164, 58, 14,235,122, 45, 70,125,243,205, 64,191,181, 63,204, 52, 77, +203,149, 35, 58, 81, 12,107, 83, 54, 86,204,159,198,145, 74, 21, 29,118,255, 26, 50,121,231,134,133,251, 85, 42,213, 23, 0,218, +168, 84,170,199, 0,126, 93,185,114,101, 85, 55,223, 85, 0,150,168, 79,232,163, 12, 6,227,106,183,110,221,234, 79,156, 56,145, +104,221,186, 53, 34, 35, 35, 27, 28, 59,118,172,199,133, 11, 23, 18, 85, 42,213, 51, 0, 47,161, 46,123,162, 3, 88, 0, 26, 51, + 24, 12,239,127, 51, 39,159,207, 55,146,201,100, 99,156,157,157, 39,119,236,216,209,187,127,255,254, 68,227,198,141, 17, 31, 31, +223,250,210,165, 75, 43,194,195,195,159,165,166,166,238,227,112, 56,135, 5, 2,129,248, 31,127,142, 19,196,100, 0, 78,106,157, +188, 82,135,239,116,148,230,146, 18,232,186, 14,137, 68, 98,175, 41, 97, 67, 16,132,253,223,185, 61,122,174, 43,150, 32, 8,107, +117, 91, 84,247, 77,146, 36,148, 74,165, 72,165, 82,185,213,192,217, 88,253, 34,165,179,214, 5, 80, 93, 34,104, 35, 0,232,213, +169, 89, 30, 8,196,148, 89,180,222,127,201,140, 41, 19, 96, 52,154, 93,185, 27, 99, 93,206, 10, 86,241, 45,118,229, 74, 98,197, +138, 21, 8, 12, 12,236, 15,192,151,162,168,112, 15, 15,143, 29,229, 40, 41,170,108,222,138, 21, 43,182, 87,115,157, 27, 96,192, +231, 2, 63,232, 83, 84,186,202,247, 31,183,193, 93,160,194, 88, 87, 27,123,255, 89, 19,135, 26,121,122, 52,132, 4,166, 72,202, + 81,225, 98,216, 37, 0, 56,161,159,213,105,104, 27, 38, 83,114, 56, 40,112,126, 19,223,118,158,120,158,166,192,227, 52, 21, 74, + 18, 21, 96,144, 10,168, 40, 26,160, 33,169,237, 86,167,230, 43,113,231,165, 12, 36, 1, 48, 72,128, 36, 9, 48,200, 90,146, 81, +178, 87,171, 15, 69,121,230,100, 82, 0, 37,123,245,129, 7,164,153,187,187,251,168, 85,171, 86, 89,102,100,100,152, 68, 70, 70, +130,203,229,194,202,202,138,193,231,243,157,182,108,217, 34,158, 53,107,214, 87,114,185, 60, 9, 64,142,142,156, 30,125,219,120, +223,219, 23,180,218, 66,241,224, 18, 10,142,255, 6, 6, 73,131,109, 98,138,250, 70, 70,184,244, 77, 67,107,255,176,196,211, 15, + 51, 69, 30, 0,210,106, 34,139,139,139, 99, 72,165,210,225,230,230,230,237, 89, 44,150, 3,207,170, 30,149,206,108,147,155, 77, + 52,120,155,101, 95,210,101, 94, 15,135, 62,155,231,116,195,220, 45, 87,176,237,216,253, 95, 90, 33, 99,121,117,121,179,141,141, + 77,167,204,154, 62,209, 52, 53, 71,142, 53,167,115,112,232,118, 33,198,248,154, 97,238,151, 22, 8, 24, 49,204,228,212,111,161, + 83, 0,236,215, 90, 36,222,195,195,131,136,139,139,171,236,230,107, 5, 96,161, 76, 38, 35,217,108, 54,193,227,241, 70,173, 93, +187, 86, 62, 98,196,136, 84, 77, 3, 95, 95, 95,248,250,250, 18, 69, 69, 69, 13,110,220,184,209, 32, 36, 36, 68, 25, 17, 17, 17, + 11,224,108,213, 22, 11,163,119, 18,137,216,133,103,100, 84,242,211,238,221,155,187,116,233, 66,113,185,127,165,159,170, 13, 39, + 0, 88, 88, 88,236,183,183,183, 39, 22, 47, 94,156,254,177, 56,235,213,171,119,165, 93,187,118,221,122,245,234,197,236,212,169, + 19,156,156,156,202,230,217,218,218,194,215,215,151, 72, 73, 73,105, 30, 30, 30,190,251,202,149, 43, 59,158, 60,121,114, 35, 41, + 41,169,215, 63,108,209,218,167, 22, 19, 2, 61,219,127,246, 32, 8,194,116,239,222,189,246,154,154,140, 10,133, 2, 42,149,170, +236, 91,243,161, 40, 10, 42,149, 10,107,215,174, 85,137, 68, 34, 93,246,145, 72,235,173, 89,243,161, 42,251,230,112, 56,182,154, +132,189, 53,220,217, 99,248,220,130,166, 38, 38, 38,174, 0,250,194,174,209,194,242, 13, 74,223,159, 69, 34, 81,178, 64,106, 25, + 3,160, 75, 53,108,150,171, 86,173, 26, 19, 24, 24, 56, 80,203, 74,235, 61,100,200,144,138,101,175,188,213,223, 34,130, 32,110, +146, 36,121, 30,192, 33,124, 68,171,187, 1,255, 45,208, 52,221, 22,128,157,214, 36, 25, 74, 71,133,160,126, 78, 18, 0,108, 42, + 76,215,110,167,249,206, 86, 79,183, 83, 47, 71,107,241,102, 19, 4,241,168,150, 93,188,133, 42,252,180,152, 0, 16, 22, 22, 70, +247,235,215,143,208,124, 87, 46,138,252, 47, 78, 24, 49,160,207, 87,221, 59,130,228, 89,225, 85, 22, 16,241,142, 6,147, 84,128, + 4,141, 7,119,111,208, 96, 82,135, 43, 44, 85,181,245,164,222,224,239,188, 61, 61, 54, 30, 8,154,205,136,205, 98,226, 80,120, + 9,228,146, 98,100,103,188, 67, 86,122, 50, 4,169,111,145,246,238,237, 51,128, 88,161, 51,231,123, 7, 6, 80, 81,234,119, 64, + 10,168, 38,242,178,102, 78,185, 40,174, 65, 99, 79,207,124,142, 10,144,139,226,116, 88,125, 85,156, 94,141, 26, 53, 26,241,195, + 15, 63, 88,191,120,241,194,168,164,164, 68,122,233,210,165,248,164,164, 36,115, 62,159,159, 55,109,218,180, 70, 78, 78, 78,230, +131, 6, 13,226, 28, 63,126,252,107,148, 15,107,173,138,211,115, 64,251,150, 17, 7,119,108, 53,201, 61, 21, 12, 89,194, 83, 92, + 20,136,112, 55,179,132,110, 96,193, 37,190,109,110, 7, 83, 46, 19,171, 59, 57,153,246, 61,147,176, 81, 65, 81, 1,213,113,222, +187,119,143,111,108,108,188,101,228,200,145,252,153, 51,103,114, 85, 76, 75,102,104, 68,174,197,194,221, 17, 78, 37, 82, 57, 99, + 68,183,122,152, 55,210, 27,243,182, 93,215,136,172,201,245,235, 23, 80, 81, 81, 85,115, 42,228,242,250,206,246,230,136, 78, 18, +227,208,237, 66,252,249,131, 19,186,175, 77,199,160, 86, 76,120,212, 53,133, 82,174,104, 60,100,200,144,195,234,183,246, 71, 0, +190, 30, 50,100, 72, 19, 6,131,113, 29,192,239, 53, 29, 35, 30,175,242,234, 41, 86, 86, 86,232,218,181, 43, 60, 60, 60,152, 93, +186,116,241,174, 32, 96,202,113,202,229, 50, 62, 69,209, 48, 51, 51, 51,178,177,177,177, 50, 51, 51,203,173,236, 65,165, 15, 39, + 0, 88, 91, 91, 15,238,218,181, 43,243,216,177, 99, 57,137,137,137, 15, 70,140, 24,241,214,220,220,188,156,245,215,196,196, 4, +141, 26, 53,194,178,101,203,152,125,250,244,169,145,211,193,193,161,103, 72, 72, 8, 8,130, 40,123,104,191,103, 44,118,117,133, +163,163, 35,250,246,237,203, 28, 60,120,112,207,164,164,164, 90, 93, 71,122,224, 90, 37, 22,173,149, 21,142, 83,149,195,111,149, +181,215,225,184,103,105,172, 75,106, 62,124,192,181, 89,237,112, 39,143,199, 43,179, 66, 85,178,174,247, 56, 73,146,196,210,165, + 75, 65, 16, 4, 88, 44, 22,216,108,118,165,223,126,126,126,250,246, 51,133, 32, 8,146,205,102, 47,100, 50,153, 19,165, 82,169, + 51,143,199, 75, 87,169, 84,191, 72,165,210,181, 0, 20, 52, 77, 91, 86, 33,178, 42,229, 52, 49, 49,113,125,245,234,149,123, 85, + 29,145, 74,165,240,246,246, 6,164,136,173,142, 51, 33, 33,193,213,205,205,173, 49, 0, 77,137,182,219, 52, 77,119,209,250,175, +141,219, 52, 77,127,169,254,253,242,205,155, 55,174, 13, 27, 54,204,255,167,206, 79, 3,231,191,143,179, 6, 45, 98, 71, 16, 68, +152,113, 48, 25,151, 0, 0, 32, 0, 73, 68, 65, 84,214,181,218, 79,243,127,209,162, 69, 75,214,175, 95,255,130, 32,136, 48,237, +233,218,237,180,191,213,247,155, 48,154,166,251, 45, 94,188,216,115,195,134, 13,235, 52,109,255, 14,145,168,143, 69,203, 60, 91, + 98,130,240,119,230, 96, 50, 84, 96,146, 4,152, 12, 0, 52,129,228,164, 4, 20, 21, 22,220, 65,226,233, 68,221, 44, 89,254,157, + 90,180,240, 10, 58,186,109, 1,249,115,120, 9, 10, 68, 18,196, 61,185,137, 71, 55,127,207, 80, 41, 85,191,131,160, 31, 3,100, + 36,222, 82,241, 64,104,237,106, 92, 16, 52,179, 84,104,169,197, 85, 57,177,245,201,208,188, 73,147, 38,195,150, 45, 91,102, 27, + 21, 21,197, 19, 10,133, 69, 71,143, 30, 77,151, 74,165, 73, 0, 46, 39, 39, 39, 55,217,190,125, 59, 39, 40, 40,200,203,203,203, +139,127,242,228, 73, 89, 37,229,140,222,227,156, 63, 54, 32, 98,226,172, 57,188,216,147,187,192,137,141,196,210,167, 57,170, 63, + 5, 37, 63, 0,216,134,148,226, 78,217, 18,229,213,173, 93, 93,200,122,102,108, 52,180,228,248,197,229, 73,170,181,100, 25, 27, + 27,111, 9, 9, 9,113,109,219,182, 45, 9, 0,225, 47,149,220,133,187, 35,156, 46,175,239, 68,116,106,102,131,172, 2, 41,102, +239,138,198,165,136,172, 63, 52, 34,171,166, 78,154,153,153,101,167,102, 21, 58,216,152,242, 48,186,179, 41,186,175, 77,135,127, + 27, 46,184,108, 2,241,137, 25,104,232, 86,143,136,190,115,182,141, 90,100,181, 21, 8, 4, 0,208, 6, 64, 98, 74, 74, 10,223, +199,199, 71,168, 69,151, 15, 96, 35,135,195, 89, 74, 16, 4,221,182,109,219,104, 47, 47,175, 98, 43, 43, 43,136,197, 98, 72,165, + 82,176,217,108,136,197, 98, 36, 39, 39,227,193,131, 7,176,178,178,210,235, 64, 21, 23, 23,195,204,204, 12, 20, 69,125, 48,167, + 74,165, 34,246,236,217, 99,242,226,197, 11,147,208,208, 80,135,185,115,231,230, 54,109,218,244,241,176, 97,195, 94,219,219,219, + 75,159, 62,125,138,123,247,238, 33, 63, 63, 31,237,219,183,215,137, 83, 38,147,129,201,100, 66, 44, 22,131,203,229,130,201,100, + 66,169, 84,130,162,168, 50,241, 85, 92, 92,140,188,188, 60,176,217,108,200,100,178, 79,241, 6,250,158,133,170,186,225,183,218, + 88,180,180,133,154,142, 34,171, 38, 75, 84,149,195,157, 5, 5, 5, 70,150,150,150, 11, 1, 8,106, 90, 23, 65, 16, 96, 48, 24, + 96,179,217, 32, 8, 2, 93,186,116,193,132, 9, 19,208,170, 85, 43, 36, 36, 36,224,248,241,227,120,244,232, 17, 88, 44, 86, 89, +123,157,199, 39,252,252, 24, 60, 30,239,222,128, 1, 3, 60,127,248,225, 7, 94,189,122,245, 16, 27, 27, 91,119,195,134, 13, 11, +175, 93,187, 54, 80, 36, 18,181,209,220,237,170,183,210,171,135, 4, 75,135, 11,251, 74,165, 82,196,198,198,234,179,204,123,104, +216,176, 97, 50, 73,146,175, 41,138, 10, 7,224, 77,211,116, 23,130, 32, 46,161,212, 47, 81, 27, 34,154,166,191, 36, 8,162, 16, +192, 51,146, 36, 95, 82, 20,149,108,176,219, 24,160,195,125,165, 95,197,255, 4, 65,132,173, 95,191,190, 95,101,226,170,146,107, +179,220,244, 13, 27, 54,172,211,250,255, 33, 22,213,174, 40,239, 12,239,167,182,114,253, 37,180,194,194,194,170, 87, 32, 20, 6, +133,157, 62,118,191,187, 28,174,158,173,125,181,172, 67, 52, 34, 31,220, 3, 64,255,162, 83, 87,248,253,140, 72, 6,243,151, 61, +235,102,146,123,111,150, 32, 37, 61, 11,247, 46,254,130,108, 65,210, 33,128,158,139,196,208,194, 15, 62, 18,245, 6,121,217,219, +216, 90, 74,228, 52, 40, 26,192,123, 98,235,147,160, 85,227,198,141, 7, 71, 68, 68,216, 74, 36, 18,222,157, 59,119, 74, 66, 66, + 66, 50,228,114,249, 77, 0,119,213,109,162,178,179,179,135,168,133, 9,131,201,100,114,228,114,121,117,190, 11,173,230, 79, 28, +115,103,227,158,131,188,215,207,163,177, 61,244, 34, 10, 74, 74, 84, 55,179,196, 95, 3,208, 40,250,235, 81, 57,226, 52, 26,180, + 11,139, 36,192, 55, 97, 57,198,229, 73,120, 64,229, 67,178, 82,169,116,196,200,145, 35,249, 26,145, 5, 0, 57, 69, 10,102,137, + 84,193,232,212,204, 6,173,187, 13, 65,228,141, 83, 56,121, 59, 13,110,118,198,183,235,155, 20,232,180, 71,179,179, 4,123,182, + 6,239,221,186,113,229,124,206,188,190, 22,240,111,195, 2,143, 77,192,220,152,133,181, 59,246, 43,162, 30,220,126,202,231,243, +195, 0,124, 45, 16, 8,192,231,243,139, 1,188,100, 48, 24,137, 42,149,170, 50,167,238,229, 0, 28, 14, 31, 62, 76, 42, 20,138, +226,132,132, 4, 56, 58, 58,194,193,193, 1, 22, 22, 22,136,139,139,195,159,127,254,137,248,248,120, 80, 20,133, 22, 45, 90,232, +117,176,114,115,115,241,244,233, 83,244,237,251,213,220,236,236, 44,115, 43,107, 27,209,157,240,219,155,106,195, 73, 81, 20, 1, + 0,158,158,158,240,244,244,228,165,165,165, 57,135,133,133,217,175, 89,179,230,157,171,171,235, 81,177, 88, 92,206,114,160,171, +208,210,136, 11,141, 8,228,241,120, 96,179,217, 40, 44, 44, 68,102,102, 38,138,138, 74,131, 54, 45, 45, 45, 63,137,208,170,194, + 66,245,209,218,255,205,226,240,189,225, 78, 75, 75,203,145, 0, 22,234,184, 45, 80, 42,149, 96,179,217,240,241,241, 65,112,112, + 48, 30, 61,122,132,223,127,255, 29,117,235,214,197,216,177, 99, 65,146, 36, 94,188,120,161,111, 23,169,136,136,136,133, 95,127, +253,181,231,225,195,135,121,201,201,201,136,143,143,135,165,165, 37,130,131,131,185,147, 39, 79,110,120,227,198,141,229, 40, 13, +126,169, 30, 90,209,133, 34, 35,254, 80,111,111,239,247,154, 56, 58, 58, 90, 92,190,124,217,190, 76,128, 85,140, 72,124, 31, 5, +203,151, 47,223,234,225,225,177, 77, 61, 92,232, 11,192,132,166,105,191,208,208, 80, 2, 0,252,253,253,105,130, 32, 52, 15,164, +103,167, 78,157,234, 22, 23, 23, 71, 7, 6, 6, 26,124,180, 12,168, 74,139, 76,214, 92,147, 85, 9, 40,125,132,154,182,197, 75, +131,197,139, 23,123,174, 95,191,254,225, 7,138, 44,237, 55, 38, 90, 35,182,202, 30,166, 85, 14, 25,150,217,190, 72,190,163,189, +141,245,162,177,157, 64, 81,128, 82, 5, 40, 85, 52, 68, 37, 98,196, 62,127, 84, 2, 30, 17,170, 83,119,184,156,160, 53, 63,204, +105, 16,157, 74, 34, 61, 95,142, 91,103,247,210,217,130,164,193, 72, 60, 53,254,227,136,172,161,222,142, 14,246,183,142,237, 93, + 77, 62,122, 43,131,138, 42,213, 89, 20, 69,151,253,254, 4,112,180,179,179, 11,184,127,255,190, 29,151,203,229,189,122,245,138, + 58,117,234, 84,190, 92, 46,191,166, 37,178, 0,160, 83,155, 54,109,148,166,166,166, 16,137, 68,114,185, 92, 46,169, 70,100, 57, +251,181,106,126,123,227,158,131, 60,137, 76, 6,161, 88, 10,134,141,125, 69,145, 5, 0, 29,187,185,215,169, 67,240,204, 64, 3, + 72, 42,148,167, 87, 37,178, 0,128,203,229,246,152, 57,115,102,185,186,120,182,102, 44,165, 49,151,165,186, 27,147, 67, 69,222, + 56,133,240, 23, 57, 20,143,205, 80,217,209,111, 27,232,186, 3, 10, 82, 99,246,252,126, 46,236,234,119,203,130,138, 75, 68, 69, +112,115, 50, 66,113,145, 16,107,215,111, 84, 68, 68,132,223, 92, 56,119,106,135, 83,167, 78,109, 64,169, 51, 56, 0,188, 60,117, +234,212,152,101,203,150,253,138,191,210, 60, 84, 68,122, 64, 64, 64,106,179,102,205,132, 30, 30, 30,194,220,220, 92,196,196,196, + 32, 63, 63, 31,219,183,111, 71,108,108, 44, 52, 22, 65,157,124, 85,222, 23, 72,200,207,207, 51,165,105, 26,249,121,185, 38, 63, +252,240,131, 69,109, 56, 85, 42, 85,185,107,171, 78,157, 58,152, 54,109, 26,187,164,164,196,242,221,187,119,230,218,243,116,229, +148,201,100,208, 88,134,104,154,134, 76, 38,131, 80, 40,132, 76, 38,195,235,215,175,203, 68,150,122,253,159,204,162,165,249,205, +227,241, 50, 53,231,178,102, 8,142,199,227,101, 85,213,254, 67,160,181, 46, 90,253, 91, 95,113, 88,227,246,232,120,220,193,102, +179, 49, 97,194, 4, 60,124,248, 16, 9, 9, 9, 96, 48, 24, 16,137, 68, 40, 41, 41, 65,207,158, 61,193,225,112,244,181,104,209, +108, 54,123,228,146, 37, 75,120,137,137,137,200,201,201,209, 56,211, 67,165, 82, 97,238,220,185, 70, 92, 46,119,164,190,166,123, +129, 64,208,251,245,235,215,141, 43,126, 50, 50, 50,132,218, 62,133,181, 69,104,104, 40,225,239,239, 79,251,251,251,211, 26,193, +101,128, 1,149,161, 10, 45,178,175, 42,139,214,199,176,138,105, 44, 91, 80, 7,136,212, 2, 26,145,213, 85, 75,120, 17, 26, 11, +151,110, 67,135,110, 67, 91, 58,216, 88,223, 56,188,107,149,105,216,115, 2,169, 41, 73,200, 22, 36,163, 77, 7, 63,196, 62,143, + 6,165, 80,157,198,235,208,154, 61, 57,235,249,187,123,120, 52,157,222,181,131, 23,130,194,138,241, 42,242, 50, 10,178, 5, 59, +145,116,234,244, 71, 57, 66,174,254,205, 29,236,173,111,252,186,107,149,229,165, 24, 18, 41, 41, 73, 56,251,235, 86, 90, 33,151, + 22,160,124, 36,151,222,111,205, 70,148,140, 83, 92,144, 9, 89,145, 10, 60,178,132,167,231, 32, 69, 6,128,240,173, 91,183,118, +111,223,190, 61, 39, 32, 32, 32, 35, 63, 63,255, 44,128,251, 90,109,154,185,187,187,247, 13, 14, 14,118, 72, 73, 73,193,181,107, +215, 50, 80, 26,250, 95, 21, 82,111, 71, 63,223,253,231,175,251,231, 27, 53,104,130,237, 75,190, 83,134, 62,138, 25, 0,224,146, + 86, 27,143, 30,222,238, 97,107,190,159, 65, 82, 81,127,224,105,114, 38,222, 10,165,127, 86, 69,152,147,147, 67,148,148,148,184, + 90, 90, 90,106,159,144,224,155,136,164, 11,134,186,167,247, 92,120,199, 73, 34, 87,129,203, 34,233,217, 3, 93,211, 31,158, 13, +181,201,145,228, 16,154,104,196,154, 48,105, 88,143,129,187, 66,206,140, 14, 11,187, 48, 93, 46,149,120, 53,105,210,152,126, 28, +113,227,233,194,185, 83,251,212,242,136,155, 62,124,248,144,100, 48, 24,229, 4,186,182,133, 72, 95, 75,145, 62,208,149,179,162, +208,210, 64,169, 84, 18,181,229,148, 74,165,101, 66,171,226,195,189, 50,193,248,119,108,191, 62, 22, 42,237, 33, 67,141, 63,157, + 68, 34,177, 87,251,108, 57,124, 76,139,214,135, 68, 34, 86, 55,124,169, 79,255, 72,146, 4, 69, 81, 96,179,217,104,209,162, 5, +194,194,194, 96,109,109, 13,115,115,115,152,155,155,195,200,200, 8, 54, 54, 54,101, 66,139, 36,117,142,210,161,165, 82,105,221, +186,117,235,226,245,235,215,224,241,120,101, 31, 46,151, 11, 79, 79, 79,136, 68,162, 58,248,148,182,123, 3, 12,248,123,239, 43, + 97,218, 98,137, 32,136,176, 69,139, 22, 45,169, 45,223,162, 69,139,150, 84,102,225,250, 64,193, 85,206,186,197,212, 86,144,149, + 42, 73,181,200, 58,180,115,165,249,153, 39, 64,106,106, 34,174,158,220, 81,164,144,203,242, 41, 74,225,250, 54, 62, 26, 32,241, +139, 78, 93, 32,233,118, 3,251,118, 35,174,190,144,161,176, 32, 27, 47, 31, 95, 78,130,152,179,248,163,137, 44, 7,219, 27,135, +119,173,180, 60,255,156, 64, 74, 74, 18, 46, 29,219, 94,168,144,203,123, 32, 49,244,241,135, 80,143,100,179, 7,178, 93,222,245, +155,232,155, 14, 21,161,194,200,216,184, 47,179, 50, 48, 80,112,167,250,200, 48,109,100,103,103,159,221,186,117, 43,241,227,143, + 63,118,149, 72, 36,191, 1,208, 54, 81,122,185,185,185, 13,223,183,111,159,117, 74, 74, 10,235,206,157, 59,162, 27, 55,110,208, + 0,206,215, 96,113, 89,208,115,252, 52, 70,171,122,117,102, 70, 37,165, 13, 0,240,135,214,108,207,126,173,155,221, 61,184,126, +185,153,226,110, 40,138, 5, 41, 88,124, 55,181, 16,128,206,251, 91,161, 80, 64, 40, 20, 66, 81,156,171,108,195, 23, 9, 3,135, +216, 75, 51,243, 37, 76, 22, 85,162,244, 48,207,146,222,200,125,203, 48, 54, 54,214,107, 95,238, 90, 63, 63, 4, 64,200,144, 33, + 67, 14, 63,139,184,208,134,207,231, 95,240,240,240, 32, 0,160,138, 8,195,170,176, 10,192,220,142, 29, 59, 18, 62, 62, 62, 15, +182,109,219,118,165, 58,177, 82, 27,139, 86, 77,208,149,147,162, 40,178,138,253, 75,212,150, 83,219,162, 85,147,208,250,148, 22, +173,202, 68,139,182, 72,212, 22, 66,255,134,168,195,234,196,148, 62,253,211,248,201,177,217,108, 68, 71, 71,195,197,197, 5,114, +185, 28,102,102,102, 48, 51, 51,131,169,169, 41,138,138,138,192, 98,177,160,231, 54, 83, 60, 30,239, 93, 76, 76, 76, 99, 59, 59, + 59,168, 84,170,114, 98,235,213,171, 87, 48, 49, 49, 73,211,215,162,197,231,243, 47,171,163, 14,203,193,209,209,209,226, 99,236, + 87,109, 75,150,191,191,191, 97,136,208,128,106,173, 89, 85, 88,181,178, 43, 88,162,100, 90,255,179, 81,154,195,173,159,250, 55, + 42,249, 45,171,100, 90,238,250,245,235,111,104,249,119,101,127,224, 38,104, 82, 60,148,139,112, 97,214,100,201,178,183,182,186, +113, 96,123,160,249,201, 72, 32, 45, 37, 17,183, 78, 7, 11,149, 42,249, 23,160,104, 65,196,181,211,161, 32, 80,130,183,161,183, +116,187, 69,160, 85,171,166,174,248,253,133, 2,217,169,175, 64,211,212, 33,100,133,148,124,240,209,113, 27,212,194,222,218,246, +198,161,224, 64,139, 51,209, 4, 82, 83, 18,113,245,100,112,161, 82, 81,210, 29,137,167, 35,107, 75, 59, 1,176, 98,152,240,118, + 15,246,107, 53,212,213,205, 25, 20,173, 0,197,166, 49,104,129, 45,243,101, 84,201,239,225, 60,225, 73,170,152,154,158,118, 95, + 55, 7,186,226,226,226,223, 1, 60, 70,249,244, 10,205, 27, 53,106, 52,116,247,238,221,118,169,169,169,188,168,168, 40,241,222, +189,123,179, 40,138, 58, 3, 64,151,161,212,239,162,146,210, 14,160,124,190,156,230,243,199, 7, 68, 4,140,155,200, 75,188, 22, + 2,171,196, 88,124,127, 55, 93,245, 50, 95, 54, 66,109, 93,171, 20,182,182,182,116, 78, 78, 78,114, 65, 65, 65, 99, 19, 19, 19, +228,230,230, 34, 47, 47, 15, 66,161, 16,210,194, 60,165,141,170, 64, 68, 40,243,192, 98,177,144,149,162,128, 74,165,202,208,213, +154, 5,192,106,213,170, 85,147, 40,138,210,100, 68, 44, 23, 93,168,213, 78,115, 62, 52, 30, 50,100,200, 97,173,168, 67,109,103, +120, 77,122, 7, 66,157,222,161,253, 31,127,252, 17,215,167, 79,159,212,202,196, 10,151,203,213,219, 81,186,170, 40,198,218,112, + 86,101,209,170, 56, 93, 31, 78,205,240,165,198, 9,190,226,116, 13, 24, 12, 6, 40,138,130, 14, 65, 21,127,171,104,209,142, 14, +172,141,200,169,112,108,170, 77, 28, 90,203, 72,196,143,106,209,210, 28, 11, 54,155,141,115,231,206, 97,220,184,113, 80,169, 84, + 48, 54, 54,134,169,169, 41, 76, 76, 76,112,250,244,105,104,210, 63,232,163, 95, 21, 10,197,145,245,235,215, 47,217,179,103,143, + 17, 77,211,224,112, 56,101, 66, 43, 48, 48, 80, 44,151,203,143,232, 36,180, 52, 25,223, 41, 58,198,196, 68, 89,109,212, 97,101, +203, 84,225,175,101,185,106,213,170, 49, 20, 69, 13, 68,133, 20, 14, 21,218,149, 75,253, 96, 72,239, 96,128, 14,247,147, 71,255, +226,238,105, 4, 22,161,101,201, 42, 19, 92,100,117,226,197,206,202,242,198,254,237,129,230, 71, 31, 17, 72,124,251, 22, 55,127, +219, 81, 42,178,222,156,124,130,228,208, 76, 36,134,118,198,219,208,222, 58,191, 61, 17, 68, 43, 39,123, 75,228,137, 40, 20,230, +188, 3,104, 68,125, 12,145,101,103,101,119,227,231,224, 64,139, 83, 79, 72, 36, 38, 38,226,234,201, 29, 66,165, 82,242,197,135, +136,172,145,108,246,192, 70,238,206, 9, 75, 39, 13, 28,234,211,208, 17, 54,239,226,112,126,236, 80,172, 62,254, 13,204,236, 24, +104,215,215, 12, 19,214, 58, 14,229,123,114, 95,243, 59, 99,160, 30,212,218, 34,171, 85,253,250,245,135,222,191,127,223,214,219, +219,155, 23, 31, 31, 47,217,187,119,111,150, 88, 44,190, 2, 32, 90, 15, 78,109,145,213,106,209,228,177, 17, 27,247, 31,230,145, +108, 14,130,142,156,199,172,219,169,170, 11,201,133, 67, 80,126, 88,177, 82, 72,165,210,107,193,193,193, 82,146, 36,145,151,151, +135,156,156, 28,100,101,101,149,125, 23, 20, 20,128,193, 96,224,250,245,235,178,194,194,194,251,186,118,240,222,189,123,245,211, +210,210, 60, 4, 2, 65, 27,245, 39, 30,165,209,133,166, 90,211,218, 8, 4,130,174, 0, 30,105,166,167,166,166,214,123,240,224, + 1,191, 38,126, 51, 51, 51,176,217,236,114, 22, 45, 46,151, 11, 7, 7, 7, 40,149, 74,156, 56,113, 2, 0,242,170,227, 96,179, + 57, 2,146, 36, 64,209,148,148,199,227, 81,124, 62,191, 82,129,165, 15,167, 26,169, 95,126,249,165, 36, 50, 50,178, 82,139, 86, +109, 56,105,154, 46,233,213,171, 23,210,211,211,193,227,241,202, 30,214, 26, 65, 69,146, 36,184, 92, 46, 50, 50, 50, 48,101,202, + 20,208, 52, 93,242, 79,223,121,180,125,154,212, 98,136, 0, 64,168,133,208,123,126, 90,186,250, 64,105,134, 6,105,154,134, 70, +112, 85,152, 95,182, 46, 93,178,183, 87,240,233,154, 92, 80, 80,176,177,180, 59,244,222, 10,223,251,244,120, 40,148, 9,173,216, +216, 88, 28, 62,124, 24, 5, 5, 5,224,112, 56,200,207,207,199,193,131, 7, 17, 19, 19, 3, 14,135, 3,205,190,208, 85,191,249, +248,248,108, 12, 15, 15,143, 25, 49, 98,132, 56, 58, 58, 26, 98,177, 24,209,209,209,232,221,187,183,228,238,221,187, 9, 98,177, +120, 21,116, 25, 58,212,100,124, 87,151,215,145, 74,165,136,138,138,170,244, 83,213, 50, 21,145,144,144,224,170, 82,169, 26,211, + 52,237, 75,211,180, 57,212, 41, 28,212,255,181, 63, 95,170,231,153,211, 52,237,171, 82,169, 26, 37, 36, 36,184, 26,228,132, 1, +159, 41,110,105,137, 45, 90, 75,100,221,170,222,162, 69,145,193, 7,118,172, 52, 63,242,144, 68, 74,114, 2, 30, 95,220, 45, 84, + 81,138, 47,244, 44,135,211, 3, 90,185, 54,120, 70, 38, 94, 20, 81, 26,206, 92,152,147, 2,208,140,218, 8,173,114,156,160,200, +224,131, 59, 2, 45,142, 61, 38,144,158,242, 6,119,207,238, 18, 42,149,210,238,120, 27, 26, 85, 27,206,145,108,246, 50, 22,131, + 88,218,171, 83, 75,118,231,150,238, 48,201, 74, 66, 70,106, 58, 78,196,102,231, 37,228, 75, 39,222, 37,228, 72,126, 35, 61,208, +119,146,181,181,149, 35, 11,253,166,218, 88,223, 63, 95,248, 59,193, 18,201,105, 57,189, 94,112,183,172, 44, 69,249,126,190, 15, + 71, 51, 51,179, 17,143, 31, 63, 54,231,241,120, 70,143, 31, 63,166,246,238,221,155, 43, 22,139, 47, 2,136,208,105,219,223,135, +115, 91,119,183, 91,235,118,237,231, 21,139, 74, 32,146,201,193,117,224,171,206, 68, 60, 31,140,170, 19, 96,150,227,228,114,185, +199,142, 29, 59,214,183, 75,151, 46,174, 94, 94, 94,100, 94, 94, 30,138,139,139,203,156,171,237,236,236, 16, 27, 27, 75, 37, 38, + 38,166,115,185,220,227,186,246,179, 99,199,142,137, 36, 73,198,171,135,209,226, 81, 33,186, 80,171,105, 99,129, 64,208,150,207, +231,223, 2, 96,172, 21,117,168,205,169, 73,239,176, 4, 0, 73, 16,196,163,232,232,232,226, 62,125,250,192,200,200, 8, 34,145, + 8,117,235,214,133, 82,169,196,197,139, 23, 17, 25, 25, 41,162, 40,234, 86, 37,226,181, 92, 63, 37, 18,113, 93, 0,164,184,164, +164,197,152, 49, 99,186,206,155, 55,175, 92, 72,186,189,189, 61,172,173,173,245,226, 4,128,188,188,188,166,127,252,241,199,156, +232,232,232,239,250,246,237,107,177,100,201, 18,110,253,250,245,161, 82,169,200,218,114,230,231,231, 91, 68, 69, 69,109,234,220, +185,243,140, 62,125,250, 48,215,173, 91, 7, 11, 11, 11,168, 84, 42, 24, 25, 25,161,176,176, 16,171, 86,173,194,157, 59,119,148, + 52, 77,239, 18, 10,133,223,235,121, 46,225, 67,175,205,170, 44, 64, 85,165,100,168,162,253,223,222,207, 10, 62, 93, 80,167,112, + 88, 88, 69, 6,123,232,122,206,107,132, 22,131,193, 64, 82, 82, 18,246,238,221,251, 94, 30, 45, 77,250,135, 42,184, 43,219,118, +250,230,205,155, 42,130, 32, 58, 60,126,252,120,225,232,209,163, 39,138, 68, 34,103, 19, 19,147,116,133, 66,241,139, 88, 44, 94, +139, 82,127, 84,182, 62,247, 16,145, 72,148, 92, 89,212, 97,197, 54,128,101,181,156, 21,210, 59,148, 75,225, 80, 97,153,114,169, + 31, 42, 73,239,240,183, 31,119, 3,231,191,146,243,115, 23, 91, 85, 39, 44,125, 15,173, 38,179, 88, 98,133,119,120, 2,241, 33, + 34,235,125,107,137,164, 36, 97,249,177,119, 45,101, 82, 9, 68,194,204,151, 72, 58,145,245, 65,155,165,238,231,237, 4, 2, 73, +137,111,240, 48,108, 87,105, 63,223,134,214,186,159, 4,176,248,167, 75,161,108,194,194, 26, 79,231,140, 67,122,129, 8,151,222, +230,159,164, 75,164,211,143, 0,249,184, 3,144, 74,105,248,193, 31, 50,118,251, 14,178, 24,106, 91,135,133, 45,243,127, 1,111, +145, 13,187, 93,247, 46,250,212, 64,204,224,241,120,225,219,183,111,239,225,235,235,203, 29, 50,100, 72,101, 14,242,250, 34,245, +209,171, 55, 63, 93,216,179,121,190,141,119,123,236, 92,182, 64,117, 44,226,121,197, 40,196,106,225,225,225,161,186,119,239,222, +188, 41, 83,166,108,233,209,163,135,211,128, 1, 3, 56,117,235,214, 5,151,203,197,155, 55,111, 16, 30, 30, 46,123,251,246,109, +122, 73, 73,201,188,230,205,155,235,147,227, 44,127,249,242,229, 27,213,235, 32,212,195,133,109,160,142, 46,212, 52, 82, 39, 45, +109, 3,192, 56, 48, 48,112, 52, 0, 84, 17,246,189, 28,192, 30, 0, 76,154,166, 51, 66, 66, 66, 58,156, 61,123,182,195,220,185, +115,217,125,251,246,197,253,251,247,113,245,234, 85,185, 92, 46,143, 80, 11, 87, 93, 75,229, 80, 0,162,148, 74,229,243,160,160, +160, 14, 12, 6, 99,185,102, 70, 76, 76, 12, 14, 29, 58, 84, 27, 78, 37,128, 77,153,153,153, 63,133,132,132, 44,191,118,237,218, +248, 49, 99,198,152, 43, 20, 10,196,198,198,226,231,159,127,174, 21,167, 80, 40,156, 99,107,107,187,244,226,197,139,191, 92,185, +114,229,235, 81,163, 70,145,179,102,205, 66,112,112, 48,126,251,237, 55, 74,165, 82,157,101,177, 88, 99,114,114,114, 68,159,226, +174,163, 30,134, 75,215,179,214, 97,141,188, 31, 50, 52,168, 35, 4, 31, 74,160,217, 14, 63, 63,191, 50, 43,163,198, 10,167,221, +134, 32, 8,189,135, 14, 1, 88,210, 52, 77, 1,216,133,210,250,162,218, 89,225, 25,248, 43,115,188,174,140,205, 4, 82,203, 24, + 72, 17, 91,125, 81,105, 75,128, 70,179, 26,216, 10,150, 47, 95,190,117,197,138, 21, 91, 43,166,112,208,110, 84, 49,245,195,202, +149, 43, 97, 72,239, 96,192,127, 21,149, 11,173,168,125, 10, 69,131,193, 75,182,175, 91,176, 66,169,144, 9,105,200,253,241,230, +116,244,135,174,140,166,232, 69,215,143, 6, 6,131, 70, 62,173, 82, 46,252,224,222,255, 77,253, 36, 44,172, 81,180,106, 26,126, +123,145, 78,103,136, 20,223, 28,145,203,203, 89,131, 74,125,178,168, 97, 55, 36,249, 39,172,156, 88,103,230,124, 97, 67, 92,200, + 27,173,247,122,178,178,178,206,109,221,186,149,220,188,121,115,215,146,146,146,138, 14,242,181,197,130,254, 51, 23, 49,218, 53, +114,157,249,240,117,242, 64,232, 48, 92, 88, 17, 29, 59,118, 20,196,197,197, 5, 92,185,114,101,196,237,219,183,123,136, 68, 34, + 87,130, 32, 96,108,108,156, 44,149, 74,175,113,185,220, 99,122,138, 44, 0,192,138, 21, 43,232,149, 43, 87, 18,113,113,113, 52, +131,193,248, 19, 64, 34,131,193, 72,210,118,130,215,158,174, 89, 38, 48, 48, 80,151, 7,226,237,226,226,226,200, 85,171, 86,117, + 89,181,106, 85, 11,181, 85,232, 54,254,242,249,210, 23, 10, 0,183,217,108, 78, 58, 65, 16,206,108, 14, 87,116,239,222,189,107, + 31,200, 89, 34,151,203, 23,166,164,164,108,217,178,101,203, 90, 19, 19,147,182, 49, 49, 49,127,126, 8,167, 90, 68, 13,182,182, +182,118, 58,124,248,240,169,131, 7, 15,182,103, 50,153,247, 9,130, 24, 34, 20, 10, 63,105, 81,105,117,129,232,149,122,212, 58, +212,137,247, 99, 39, 41,253, 59,132,155, 74,165, 42, 94,186,116,105, 86, 69,225, 85,209,122,165,249,175, 78,229,162,203, 62,213, + 39,138,178, 6,225, 66, 20, 3, 64,105,237,194,210,178, 58,186, 22,149, 6, 32,174,233, 58, 39, 73,242, 44,128,151, 36, 73,190, +174, 24,232,162, 61,111,229,202,149, 53, 93,231, 6, 24,240, 89, 67,135, 59, 91, 32, 9, 4,214,214,147,246, 31, 52, 87,126,156, +126, 6,176,217, 43, 73, 96, 62, 0,130, 6,182, 28,145,203,127,168,110, 65,199,142, 88, 75, 19,152,171,222,153,235, 50,238, 98, + 77, 45,182,189, 14,116,168, 63,168, 39,103, 19, 84, 95, 80,246, 61, 78,127,127,127, 70, 21, 15,243,114, 69,165,171, 66,104,104, + 89, 22,255,170,250,169,125,190,153, 61,120,240,192,201,199,199, 71,128,242, 78,255,149, 77,167,245,220,118, 6, 0,213, 71,222, +159,159, 5,167,155,155, 27,231,205,155, 55,178,127,215,181,105,224,252, 87,114, 90, 54,117, 1,129, 73,208,206, 29, 84,173, 69, + 75, 75,160,209,244,207, 40,136, 77,169,162,159,154,235,220, 50, 33, 33,193,181, 97,195,134,201, 0, 10, 42,244,163,178,121,180, +225, 24,253,223,115, 86,134,201, 40, 95,138,206,128, 74, 14,132,129,211,192,105,224, 52,112, 26, 56, 13,156, 6, 78, 3,103,109, +133,214,103, 13, 18, 6, 24, 96,128, 1, 6, 24, 96,128, 1, 6,252, 45, 32,170, 81,165,250,152, 4,107,163,108,175, 25, 56, 13, +156, 6, 78, 3,167,129,211,192,105,224,252,191,227,172,137, 91,123,249,207,117,232,240, 31,235,183,193,172,106,224, 52,112, 26, + 56, 13,156, 6, 78, 3,167,129,243, 67, 4,203,103, 13, 38, 12, 48,192, 0, 3, 12, 48,192,128,207, 6, 61,220,193,103,170, 64, +254,241, 70,167, 32,170, 26,209,199, 13,117, 0,224, 99,241,253,159,130, 15,224, 43,173,255, 23,160,142,140, 55, 8,173,207, 23, +141, 0, 44, 1,160, 93,139,236, 33,128,245, 21,218, 29, 5,160, 93,144, 80,132,210, 58,129,175,245, 89, 25, 73,146,235,187,116, +233, 50,253,206,157, 59,155,149, 74,229,170, 90,244,215,149,207,231,111, 36, 8,162, 53, 0, 22, 65, 16,111, 50, 51, 51,215, 43, +149,202, 15,137, 90,105,224,232,232,184, 1, 64, 75,146, 36, 89, 4, 65, 36,100,102,102,174, 81, 42,149, 55, 63,128,211,204,193, +193,161, 19, 77,211,142, 0, 24, 44, 22, 43, 55, 45, 45,237, 1,106,153, 91,201, 63, 48,150, 93, 40, 82,178, 0,192,220,132,169, + 8, 13,108, 42,215,117,154,225, 20, 55,192,128,255,111,208,165,145,201,229,208,219, 13,107,105, 37,190, 87, 1, 68,175,250,216, +113, 57, 17,223, 87,181, 60, 81, 73, 84,115, 69,206,222,110, 88,171,162, 75, 57,122,185, 97,211,229, 55,168, 54,210, 94, 23, 78, + 13,246, 1,228,100, 29,170, 20, 16,186, 69, 95,255,219,241, 21,202, 15, 21,150, 13, 29, 86, 43,180,134,185,131,175, 98,130, 25, + 26, 11, 77, 24,175, 25,128, 22,234,135,252,107,148,230, 42, 42,250,192,206,125, 46,156,255, 54, 44,167,105, 58,160,220,201, 90, + 73, 30,162, 47,190,248, 98,192,149, 43, 87,140, 53,245,238, 40,138,130,145,145,145, 18,192, 88, 61,214,101, 63,108,216,176, 69, + 7, 14, 28,192,208,161, 67,151,134,133,133,109, 5, 80,172,235,194, 86, 86, 86,254,150,150,150,193,251,247,239,183,107,223,190, + 3,193,225,112,240,230, 77,130,243,148, 41, 83,188,226,226,226,206,102,101,101, 77,212,119,227,173,173,173, 71, 90, 90, 90,110, +217,187,119,175,109,231,206,157, 65, 16, 4, 34, 35, 35,157,231,204,153,211,226,221,187,119,199, 51, 51, 51,103,232,203,105, 99, + 99,227,110, 97, 97,209,109,231,206,157, 70,157, 58,117, 2,143,199, 67,116,116,180,233,212,169, 83, 29,211,210,210, 98, 51, 51, + 51,111,233, 43,178,158, 69,158,255, 90, 41,151, 6, 1, 0,147,205, 93,208,126, 75,196,249,103, 55,206,247,175,105,154,127, 96, +236,239, 6,177,101,128, 1, 6,104, 99,164, 19, 28,105, 26,243,175,252,188,140, 4,128, 94,227, 87,207, 26,233,132,205, 71,210, +171,174, 97,171, 39,223,247, 99,234, 32,248,112, 26, 50, 63,164,159,251, 0,114, 14,147, 57,171,157,143,143,237,183,119,239, 38, +200,129, 95,254, 79, 14, 81,165,195,156, 85, 10,173,193, 77,177, 74, 89,106, 49, 33,250, 52,196,241,171,137,140,240, 47,190,248, +162,225,132, 9, 19,136, 86,173, 90, 33, 50, 50,210,253,248,241,227, 95, 93,184,112, 33, 65,165, 82, 69, 2,120, 1,221,179, 90, +179, 0,120, 50, 24,140,214,255,114,206,127, 51, 76,212,226, 42, 19,127, 37, 58,125, 47,225,233,245,235,215,207, 49,153, 76,141, + 69,171,157, 72, 36,114,168, 96, 5,211, 5,245, 20, 10, 5,226,227,227, 65,146, 36, 11, 64,125,188, 95, 82,163, 42, 56, 27, 27, + 27,239,142,120, 24,105, 67, 48,141,144, 47, 1, 32,145,131, 99,234,128, 3,135, 66,172,231,205,158, 49,248,230,205,155,225, 69, + 69, 69,191,234,209,159,250, 38, 38, 38, 91,159, 62,125,106, 99,108,108, 12,138,162, 80, 84, 84, 4, 71, 71, 71,236,223,191,223, +114,222,188,121, 1,133,133,133, 55, 37, 18,201,111,250,136,115, 11, 11,139,110,207,159, 63, 55,210, 20,148,150,201,100,112,118, +118,198,209,163, 71,185,179,102,205,106, 90, 80, 80,144, 42,147,201,222,234, 74, 88, 40, 82,178,148,114,105,208,225, 93,129, 46, + 0, 48,102, 70, 96, 16,167,200,252,162, 46,211, 10, 69,202, 11, 0, 12, 66,203,128,127, 26,173,109,109,109, 67,115,114,114,110, + 1,152,136,143, 99,105,112,231,241,120,205, 41,138,114, 36, 73, 18, 12, 6, 35, 67, 36, 18, 61, 5,240,170,182,132, 54,110,126, +253,193, 53, 30, 7,154,106, 65, 2, 32, 72, 50, 90, 37, 47, 57,148,251,234,230,249, 15,226,228, 24,141, 7,232, 22, 36, 64, 17, + 36,249,148, 82,150,236,207,137,191,121,233,223,114,112,238, 11,209,216,205, 81,247,194,152, 31,131,111,120, 3,240, 73, 10,228, +209, 36,221,135, 21,103, 2,125,103,207,158,237, 56, 99,250,116, 98,220,216,177,141,110,221,185, 67,116,213,167, 90,193,231,137, + 42, 29,223, 43, 21, 90,254, 77, 97, 69, 3, 11,143, 7, 47, 33,153, 12, 6, 49, 98,246,250,128,131,187, 54,145, 61,251, 15, 41, + 27, 62,241,245,245,133,175,175, 47, 17, 20, 20,212,232,207, 63,255,108,116,244,232, 81,101, 68, 68,196, 83, 0, 39,170, 90, 89, +111, 55,136, 41,128,199,102, 49, 69, 35,150,253,186,215,199,199, 7, 92, 46, 23, 31,194, 9, 0, 61, 27,146,111, 89,214, 13,158, +142,152,185, 60,185,125,251,142,244,199,224,252,140,240, 16, 40, 43,106,109,229,226,226,210, 73,169, 84,242, 0,128,201,100, 74, + 82, 82, 82,102,162,180, 54, 32, 0,156,165, 40,106,128, 30,220, 36,128, 21, 3, 6, 12, 88,250,237,183,223,162,110,221,186,152, + 53,107, 22, 20, 10, 69,228,165, 75,151,150, 3,216,128, 26, 46, 30,123,123,251,229,187,119,239,182,102,114, 76,208,106, 97, 34, + 4, 5, 74, 0,128, 41, 23, 56, 55,141,198,172, 89,179,204, 31, 63,126,188, 70, 31,161,101,111,111,191,106,255,254,253,214,198, +198,198,160,105,186,172, 22, 99,113,113, 49,138,139,139, 49, 99,198, 12,243,216,216,216,141,250, 8, 45, 7, 7,135, 78, 59,119, +238, 52,226,241,120, 40, 46, 46,102,203,229,114,162,168,168, 8, 37, 37, 37,180, 76, 38,147,207,156, 57,147,251,226,197, 11, 63, +129, 64,240, 22, 6,252, 91,192, 0,240, 13,139,197, 26,212,176, 97,195, 54,175, 95,191,126,162, 84, 42, 79, 3, 56,253, 17, 94, +166,186, 59, 57, 57,173, 77, 79, 79,223, 9, 32,228,255,101,135, 58, 56, 56,156,190,119,239,158,203,238,221,187,199,110,222,188, +249, 34,128,223, 62,128,142,205,102,179, 7,119,237,218,213,101,204,152, 49, 28, 7, 7, 7, 72,165, 82, 36, 38, 38,154,159, 60, +121,210, 53, 58, 58, 58, 85, 93, 17, 67,231, 23, 10, 27,247,142,166, 96,154, 31,239,208,177, 83,231,161,131,191, 49,115,176,177, +128, 88,166,194,235,100, 65,221, 63, 46,158,235, 26,199, 54,186, 39,151, 11,135,231,190,186, 87,172, 47,103,183,110,221, 59,247, +232,222,221,204,194,210, 2, 66,145, 28,111,146,210, 92,111, 92, 61,239,203,100, 26,221,166, 8,197,168,172,231, 87, 75, 62,229, +177,153, 5, 48, 69, 60,155,230, 45, 58,182,122,220,107,194,154, 54, 52, 77,131,164,177,163,162, 53,107, 22,192,220, 81, 90,246, + 75, 47, 62,208, 52, 77, 16,216,164,109,205,234,237,134,181, 52,141,239, 65,130,232, 93,195, 48,165, 6,189, 0,174,165,181,181, +207,212,201,147,137,162,194, 66, 68, 71, 71,151, 84, 20, 89, 91,235,128,125,155, 68,189,179, 41,181, 23,219,255, 82,107, 86,165, + 67,135, 58,231,209, 50, 54, 54,174,116,186,133,133, 5,186,117,235,134,245,235,215, 51, 1,180,174, 48,187,124,145, 85,128, 27, +182,103, 49, 44, 76,184,100,221,186,117,205,204,205,205, 63,152, 19, 0, 64, 83,245, 59,214,165,191,124,244,235,146,177,215,142, +110,241, 20, 21, 21,176, 42, 54, 49, 53, 53, 69,227,198,141,177,116,233, 82,221, 56, 63, 28,255, 40,167,163,163, 99, 19, 95, 95, +223,214,215,111,221,178, 76, 79, 79,231,166,167,167,115,175, 92,191,110,217,161, 67,135,214,142,142,142, 77,202,118, 21, 77,235, +211,207,213,187,118,237, 90,126,246,236, 89,210,215,215, 23, 86, 86, 86,232,214,173, 27, 46, 94,188,200,220,188,121,243, 58, 0, + 75,107,234, 39, 73,146,157,125,125,125, 9,208, 52, 50,132, 74, 60, 88,223, 4,209,155, 60, 80, 36,161,145, 39, 44,132, 88, 44, +129,177,177, 49, 15,165,195,189,186,110,123,199, 14, 29, 58, 16, 0,202,196, 85, 81, 81,233,167,184, 88, 4,153, 76, 14, 46,151, +107, 6,128,167, 43, 39, 77,211,142,157, 58,117, 2, 0,200,229,242,178, 55,188,130,130, 2, 66, 40, 20, 66, 38,147,129,197, 98, +177, 81,179, 95, 99, 25,167,185, 9, 83,193,100,115, 23,140,153, 17,152, 50,102, 70, 96, 10,147,205, 93, 32, 51, 43, 84,233, 50, +205,220,132,169,248,196,231,167, 29, 73,146, 63,187,185,185,197,146, 36,121, 24,128,227, 7,114,182, 5,176,206,200,200,232,154, +135,135, 71,138,177,177,241,117,181, 80,239, 80, 75, 78,142,177,177,241,245,117,235,214,157,122,242,228,201,208, 63,255,252,179, +254,179,103,207, 6, 7, 5, 5, 29, 55, 53, 53, 13, 71,121,191, 68,189,175,205,250,245,235, 31,124,240,224, 65,219,142, 29, 59, + 30, 0,192,253, 72,215, 59, 3, 64, 75,232, 84,145,227,147, 28,119,167, 86,173, 90,185,240,120, 60,244,232,209, 3, 0,252, 62, +132,147,205,102, 15, 94,186,116,169,219,178,101,203, 56, 2,129, 0,215,175, 95,199,195,135, 15,161, 84, 42, 49,109,218, 52,238, +152, 49, 99, 26,152,153,153, 13,214,171,159, 76,243,227,179,231,204,237, 51,127,214, 36,179,167,239,228, 56,116,237, 29,126,143, + 16, 32,171,132,131,254,131,199, 88,244, 30, 56,172, 55,135,107,113, 92, 95,206, 69, 11, 23,246,153, 60, 62,192, 44, 70, 64,225, +220,253, 12,220,143, 23, 66,201,178, 68,223,193, 19,173, 90,116,234,243, 21, 19,172, 95, 62,245, 49,218, 15,180,159, 61,123,182, +221,130, 77, 71,238, 58,181,253,102, 71,118, 62,124,181,133,143, 59, 96,105,109, 98,242, 77,124,215,174,147,140, 74,235,197, 86, +203, 89,142,175,245,192,224,172,124,116,209,246,207,234, 98,141, 70,234, 97, 69,198,149,159,151,145, 52,129, 89, 35,157,202,221, + 7, 42,237,231, 77, 96,232,236,185,115, 89, 22, 86, 86,216,181,107, 23,164, 34, 81, 57,159,217,238, 46,232,115,205,152,153,218, +192,195, 57,182,155, 43, 17,254, 31,124, 95,153, 92,165, 69, 43, 44, 44,140,238,215,175, 31, 1, 0,161,177,200, 31,220, 20, 27, +135,125,187,110, 41, 65, 18,116, 61,207,142, 49,117,220,154,137,108,108,108, 80, 82, 82, 2,169, 84, 10, 54,155, 13,137, 68,130, +119,239,222,225,254,253,251,176,178,178,210,171, 39,133,133,133, 48, 53, 53,133,169,169,233, 71,225, 92, 60,182, 7,247, 77, 74, + 54,247,242,253,155, 93,183, 79,255,173,189, 91, 75,191,103,221,135,205,122,110,110,231, 36,121,246,236, 25,238,221,187,135,252, +252,124,248,248,248,252, 87, 14,230, 67,181, 79,214, 67, 0, 86, 13, 27, 54,116,190,124,237,182, 85,177,132, 50, 79,202, 84,176, + 40,138,130,177, 49, 95,121, 34,244,156,112,232,224,254, 68, 70, 70, 70, 22,128,135,106,113, 91, 83, 77, 69, 30,128, 38,254,254, +254,139,166, 79,159,142,132,132, 4, 76,154, 52, 73,252,240,225,195,220,142, 29, 59,218,236,223,191,223,104,222,188,121,184,117, +235,214,138,176,176,176, 51, 0, 18, 1, 84, 90,171,141,166,105, 54,155,205,134, 82, 45, 27,228, 42,170, 76,223, 23, 22, 22,130, + 22,231,131,205,102, 51, 0,216, 65, 71, 63, 58,138,162,216, 44, 22,171, 76,100,189,203, 44,196,187,172, 18, 20, 22,203, 32, 22, + 43, 33, 19,211, 96, 24,219, 48,129, 36, 7, 0, 73, 80,170, 87, 0, 0, 0, 32, 0, 73, 68, 65, 84,186, 90, 71,120, 60, 30,148, + 74, 37,138,138, 74,187,161,177,148,201,100, 50, 8,133, 66, 48, 24, 12, 83, 0,230, 0,242,116, 33, 84, 59,185,255,174, 30, 6, +196,163, 35, 3,108, 95, 95, 88, 92,110,154,185, 9, 83, 17, 58,175, 41,195,198,185,197,157,150, 67,127,241, 40,155,246,105,253, +179,184,118,118,118, 55, 78,157, 58,213,180, 81,163, 70, 72, 76, 76,244, 24, 50,100,136,143, 64, 32,104, 9,253,107, 50, 26,147, + 36,185,113,204,152, 49,211, 71,140, 24, 65,184,187,187,131,201,100, 66,169, 84, 58, 39, 36, 36,116, 59,121,242,228,194,131, 7, + 15,238, 87,169, 84,223, 65,119,191, 63,146,195,225,156,216,187,119,111, 23, 31, 31, 31, 28, 62,124, 24, 15, 31, 62,164,218,182, +109, 75,142, 30, 61, 26,174,174,174, 62,163, 71,143,254, 93, 42,149,246,173,165,101,203,181, 67,135, 14, 46, 12, 6, 3, 29, 59, +118,100,223,187,119,175, 21,128,123, 31,184, 79, 77,157,157,157,111,249,249,249,181,188,118,237, 90, 84, 70, 70,134,159, 30,219, + 11, 0, 3,157,156,156,130, 44, 44, 44,172,244,184,199,150,164,165,165,125, 15, 32, 84,199, 69,218,183,110,221, 26,201,201,201, +104,210,164, 9,216,108,118, 7,185, 92, 62, 5, 64, 31, 0, 63, 0,136,213,163,191,238,221,187,119,119,241,243,243, 35, 66, 67, + 67,203,252, 67, 73,146,132, 82,169, 4,155,205, 70,251,246,237,201,200,200,200, 58,143, 30, 61,114,135, 14,195,136, 54,110,126, +253, 59,118,238,218,185,139, 79,115,114,115,232,107,168, 40, 21, 24,132, 18, 76,130, 2,165,224,130,203,102,192,221,179, 13, 35, +254,197, 83, 31,153, 84,222, 63,247,213,181,243,186,112,246,233,213,211,183,105, 19,119,114,251,239,111, 80,144, 22,171, 74,139, +187,157, 67, 50, 72, 52,109,253,133,173,123,179,150,140,150, 62,126,172,244,196, 23,221, 36,146, 46, 61,242, 19,110, 95,251, 20, + 23,228, 74,128,225, 92,199,246,155,126, 61,253,216,130,244,116,209,201,208,243,207, 75, 20,184, 15, 0,183, 0,162, 47,208,220, +187, 93,187,174,251, 55,108,176,225,243,249,172, 81, 35, 70, 40,247, 69, 69, 69,161,138,161,223,149, 0,195,214,209,177,199,212, +169, 83, 25,130,244,116,250,228,233, 11,207, 52,124, 40,125, 75,241,110,238,236,209, 15,162,120,189,134, 41,251, 3, 28, 7, 71, +199,166, 83,166, 76, 65, 70,122, 58, 14,135,132, 20, 75,128, 8,141, 21,235, 28, 3, 59,155,185, 57,142, 91, 48,113, 0,225,194, +183,197,212, 21,251, 58,116,147,103,185, 65,240,215,241,215,214, 34,159,177,200,154, 92,169,208,170,136,223, 98,177,220,140,141, +250, 39, 79, 30, 35,179,139,228,162,132,132, 4,216,218,218,130,207,231,195,194,194, 2, 49, 49, 49,184,126,253, 58, 94,190,124, + 9,138,162,208,162, 69, 11,189,122,147,147,147,131,167, 79,159,194,202,202,234,163,113,186,185,216,225, 91, 23, 59,118,102,110, + 33,251,218,195,151, 62,251, 22, 15,110, 70,122, 12, 62,168, 93, 36, 86, 38,147,225, 63,130,178,232, 66, 23, 23,151, 78,135, 14, + 29, 98, 75,149, 48,115,159, 18,241,163, 72,162, 50, 1, 0, 19, 30, 67, 20, 25,212,248,187,213,171, 87,139,198,143, 31,239,145, +146,146,178, 94, 7, 91,255,218,238,221,187,207,167,105,154, 53,123,246,108, 0,192,152, 49, 99, 10,239,223,191,239, 14, 32,235, +250,245,235, 78, 19, 38, 76,120,117,227,198, 13,227,185,115,231, 50,148, 74,101, 12,147,201,164,195,194,194, 86, 1, 8,124,239, +137, 72,146,143,163,162,162,234, 57,185, 54,134,171, 13, 9,223,165, 47, 75,111,112,198, 20, 82,147,222, 32,238,217, 67, 56, 58, + 58, 90,240,249,252,216,212,212, 84,121, 90, 90,218, 66,145, 72,180,187,134, 62, 70, 71, 70, 70,242, 93, 93, 93, 81, 92, 92,140, +212,236, 18,204, 58,109,140, 66,113,169, 17,131, 5, 49, 90,186, 52, 54, 51, 34,101, 15,179,178,178,228, 50,153,108,153, 80, 40, + 60, 84, 29, 39,139,197,202,125,246,236,153,105,221,186,117, 33,145, 72,232,188,188, 60, 66, 36, 18,161,168,168,136,184,112,225, +194,215, 2,129,160,109,253,250,245, 9,103,103,231, 85, 2,129, 64,156,150,150, 54, 73,151,161, 73,181, 96, 82, 49,153,204,205, +147, 39, 79, 30,122,230,204,153,199,161,129, 77, 7,106, 13,151, 88,120,122,122, 94,110,222,188,153, 83,200, 38,239, 29, 0,126, +252, 23,156, 91,227,150, 44, 89,210,212,218,218, 26, 83,167, 78,197,202,149, 43,177,124,249,242, 70, 83,167, 78,157, 12, 96,171, + 30, 60, 70,142,142,142,143,182,111,223,238,209,169, 83, 39, 92,188,120, 17,199,142, 29,195,219,183,111,149,245,235,215,103,250, +248,248, 96,197,138, 21,232,221,187,247,164,153, 51,103,118, 77, 79, 79,111,165,163,248, 24,191, 98,197,138,129,157, 59,119,198, +216,177, 99,165, 55,111,222, 28, 10,224,202,213,171, 87,191,184,117,235, 86,232,145, 35, 71,140,214,173, 91,215, 99,222,188,121, + 83, 1, 4,215, 98,251,191,238,210,165,180,134,114,231,206,157, 17, 20, 20,212,251, 3,133, 22,199,198,198,230,194,225,195,135, + 91, 54,110,220, 24,163, 70,141,106, 53,116,232,208, 11,249,249,249, 61, 1,232,116, 67,170, 83,167,206,198,179,103,207, 54,172, +106,100,161, 50, 72,165, 82,235,111,190,249,102, 67, 82, 82,146, 94, 66,235,232,209,163,248,254,251,239,209,162, 69,139,230,237, +219,183,223, 51,101,202, 20,248,251,251,119,143,137,137,113, 64,105,212,114,141,224,241,120,205,135, 15, 31,206,121,240,224, 1, + 0,192,211,211, 19, 45, 91,182, 68,114,114, 50, 30, 63,126, 12,169, 84, 10, 7, 7, 7, 12, 26, 52,136,151,148,148,212, 60, 39, + 39,167, 70,161, 69,114,141,199, 13,236,215,215,236,220,125, 1, 84,148, 18,109, 26,154,195,199,195, 30,241,169,133,136,140, 77, +133, 74,198,134,185,181, 13, 58,116,237,101,157,145,246,118, 92, 46, 80,179,191, 22,215,120,220,160,129, 95,153,158,139, 72, 71, + 65,122, 28,253,250,225,153,235, 10,137,104, 18, 0, 60,254,243,248, 30, 71, 27,163,158,238,173,219, 48,252,122, 14,176, 58,125, + 44, 99, 92,254, 63, 83,219,239, 61,220,114,193, 94, 87, 86,206,152, 5, 1,190, 52,203,202,249,161,153, 66,177, 83, 51,175, 55, +208,107,225,146, 37,237, 39, 78,158,204,163, 40, 10, 71,126,253,181,240,105, 84, 84,252,100,128,154, 82, 5,223, 78,192,117,232, +192,129, 92, 51,115,115,204,153, 53, 11,102, 10,197,141,178, 93, 2,116,159, 51,127,126,167, 25, 51,102, 24,237, 89, 53,253,113, +239, 9,107, 90, 83, 52, 77,104,134, 41,143, 86,111,138,107, 59, 97,224, 64,152,153,155, 99,246,236,217, 32,228,242,203,101, 2, +138,137, 27,227,191,246,245, 9,232,223, 25, 4, 8, 28, 11,187,131,215,201,217,207,110, 8,240,230,115, 85, 85, 21, 80,165,143, + 86,181, 67,135, 69,114,100,118,255,106,176,192,221,221,189,168, 81,163, 70, 69,185,185,185,120,254,252, 57,242,243,243, 17, 28, + 28,140,184,184, 56, 80, 20, 85,107, 1, 67, 81, 20, 62, 54, 39, 0, 56,216,152, 99, 84,223,118, 76,169, 68,196,203,206,206, 46, + 55,124,244, 31, 18, 90,101, 80, 42,149,188,250,245,235,131, 4, 8, 97,137,194, 52,227,104, 23, 34,227,104, 23, 66, 88,162, 48, +149,201,100,164,169,169, 41,164, 82, 41, 79, 7, 42,214,151, 95,126, 57,255,204,153, 51,172,181,107,215,194,203,203, 11,114,185, + 28,247,239,223, 79, 5,144,165,110,147,126,251,246,237,116,141, 16, 94,191,126, 61, 78,159, 62, 77,244,232,209, 99, 97,101,231, +147, 64, 32,216, 56,101,202,148,188,146,162, 60,236, 29, 38, 70,232,168,108,252, 60,240, 45, 70,216,156, 66, 94,230, 59,236,219, +183, 15, 87,175, 94, 35,174, 92,185,202,190,121,243,166,201, 87, 95,125,181,163, 78,157, 58, 97,213,117, 50, 61, 61,125,237,140, + 25, 51, 10,138,138,138, 80, 84, 84, 4,177, 88,130, 60, 17,240,108, 75, 83, 60,219,210, 20, 18,202, 8,187,118,238, 38,159, 61, +123,102,251,246,237, 91,167,254,253,251,111,225,243,249, 7,171,227, 76, 75, 75,123,240,237,183,223, 74, 10, 11, 11, 33,147,201, +228, 42,149, 74, 38, 22,139, 21,199,143, 31,159,107, 99, 99,211,225,226,197,139,172,171, 87,175, 49,111,222,188,197,190,126,253, +186, 69,183,110,221, 78, 56, 56, 56,252,162,139,165,140,193, 96,108, 11, 9, 9, 25,183,107,215, 46, 7, 31, 31,159,102, 21,134, +162,248, 61,123,246,172,247,235,175,191,214, 9, 10, 10, 90,136,210, 0,148, 79, 10, 91, 91,219,153, 3, 7, 14,196,174, 93,187, +112,254,252,249,121, 59,118,236,192,151, 95,126, 9, 39, 39,167,111,161,251,176, 23, 0,252,184,117,235, 86, 15, 15, 15, 15,140, + 25, 51, 70, 54,105,210,164,239, 14, 29, 58, 84, 63, 60, 60,156,253,203, 47,191,212,155, 58,117,234,236,128,128, 0, 73,131, 6, + 13, 16, 28, 28,220,144, 36,201,109, 58, 93,223, 14, 14,115, 71,140, 24,129, 77,155, 54,225,230,205,155,131, 81,250, 64,149, 1, +184,116,247,238,221,254,235,214,173,195,224,193,131,225,236,236, 60,187, 54,150,167,166, 77,155, 46,235,211,167, 15,194,195,195, +209,170, 85, 43,116,232,208, 97, 30, 0,219, 90,238, 78,210,212,212,244,196,161, 67,135,124,235,213,171,135, 53,107,214,192,205, +205, 13, 7, 15, 30,244, 53, 49, 49, 57, 1, 29,221, 55, 44, 44, 44, 76,141,141,141,177,112,225, 66,122,240,224,193,121, 53,125, +230,205,155, 71,115,185, 92, 88, 89, 89,233, 26,248, 98,196,227,241, 58,122,121,121,225,254,253,251,184,122,245, 42,150, 46, 93, +138,185,115,231, 34, 59, 59, 27,195,135, 15, 55, 6,224,175,199,118,219,219,217,217,161,176,176,180, 46,188,151,151, 23,158, 60, +121,130,236,236,108, 56, 59, 59, 35, 35, 35, 3, 54, 54, 54,104,220,184, 49, 40,138,178,215,141,146,246,178,181,182, 64, 86,190, + 20, 76, 40,209,218,221, 22, 55,158,231,226, 93,182, 12,246, 54,150,200,200,202, 70, 29, 27, 30, 92, 92,234,130,166, 41, 47,157, + 20, 48,131,108,205,229, 25, 33,175, 72,142,180,216,155,185,114,149,116, 74, 65,226,221,148,130,196,187, 41,114,169,100,202,227, + 59, 87,115,235, 57, 24,193,197,197, 5, 4, 77,181,251, 20,215,227,144,186,112, 49, 49, 98,142,185,250,243, 50, 34,108,255, 98, + 66,154,251,174,109, 31,135, 82,203,178, 29, 80,127,200,240,225, 29,191,251,238, 59, 94,102,102, 38, 21, 48,108, 88,222,218,192, +192,107,127,212,240, 98, 80, 12, 52,234,217,179, 39, 72, 0,127, 92,185, 34,202, 0, 82, 1,192, 1,112, 25,240,205, 55, 93,150, + 44, 90,100,148,147,155, 75,221, 79, 40, 62, 23,151, 69, 15,178, 86,161,190, 46,254, 89, 42,192, 91,195,123,249,242,101, 90, 12, + 60, 6, 0, 63, 23,124,219,171,147,167,207,232,129, 93, 32,200,202,199,236,181, 63, 99,207,201, 91,151, 45, 20,244, 23,255,161, + 71,241,228, 90, 9, 45,245,208,207,123,211, 74, 74,222, 31, 61,248, 80, 1,243,119,112, 86,134,255,162,208,210, 64,161, 40, 29, + 37,145, 41, 40,200, 20,148,230,173, 22, 98,177, 88,103,138,203,151, 47, 31,158, 53,107, 22,182,108,217,130, 87,175, 94,129,205, +102,195,203,203,139, 15,192, 84,115,207,111,221,186,181, 61, 73,146,136,143,143,199,230,205,155, 49,126,252,120,250,222,189,123, + 7, 81,121,190,148, 39,121,121,121, 59,167, 76, 26, 95,144,159,249, 14, 10,113, 62,178,210,222, 64, 42, 42,192,154,245, 27, 81, +162, 96, 34, 67, 40, 71,134, 80, 14,146,107,141, 61,251, 15, 49,154, 54,109,218,135,193, 96,244,171,166,159,247, 51, 51, 51,247, + 79,155, 54,173, 32, 35, 35,163,108,251,100, 10, 26, 50, 69,249,243,213,216,216, 24,219,182,109,179,112,119,119, 31,200,100, 50, +187, 85,195, 41, 72, 73, 73,137,155, 54,109,154, 44, 51, 51, 19, 66,161, 16,231,206,157,235, 95,175, 94, 61,171, 13, 63,110, 33, + 68,114, 38, 50, 10,228,200, 40,144,131, 99,106,143, 19,161,103, 24,141, 27, 55, 14, 96, 50,153, 29,106, 18, 89, 71,142, 28, 25, + 61,108,216, 48,179, 31,127,252, 49,239,236,217,179,187, 0,104, 31,144,248,109,219,182,157, 60,113,226, 68,209,252,249,243,173, +131,130,130,230,125, 98,177,213,109,216,176, 97, 77, 40,138,194,169, 83,167,158, 1,216,122,230,204,153, 71, 82,169, 20,195,135, + 15,175,175, 30, 70,210, 5,109, 3, 2, 2,166,251,250,250, 98,206,156, 57,242,107,215,174,181, 6,176, 5,165, 67,185, 52,128, +100, 0, 59,110,221,186,213, 98,230,204,153,210,118,237,218, 97,236,216,177,227, 1,248,214,192,219,113,196,136, 17, 30, 20, 69, +225,248,241,227, 79, 1, 92,172, 48,255,122,104,104,232,125,153, 76,134,145, 35, 71, 54, 0,160,207,141,156,205,229,114, 79,173, + 94,189,218, 50, 45, 45, 13,163, 71,143,150,198,199,199, 35, 48, 48,208,200,194,194,226,162,214, 53,160, 51,184, 92,238,190,159, +126,250,105,160,183,183, 55,166, 77,155, 38,219,189,123,247,172,233,211,167,203, 90,183,110,141, 93,187,118, 13,228,112, 56,122, +149,232, 72, 79, 79, 47,136,141,141,181,169,233,147,154,154,170,107,120,190,177,169,169,105,132,167,167,103,161,151,151, 87, 27, +165, 82,137,152,152,152, 55,135, 15, 31,166,188,188,188,176,115,231, 78, 4, 5, 5,161, 95,191,126, 96, 48, 24, 58, 11, 45, 6, +131, 1,185, 92, 14, 99, 99, 99, 48,153, 76,188,121,243, 70,147, 90, 6,108, 54, 27, 0, 96, 98, 98, 2, 35, 35, 35,144, 36,169, + 83, 52, 26, 65,128, 46, 44, 81,128,197, 34,193, 36, 41,196, 37, 11, 33, 87, 80,224,177, 25, 96, 49, 9,128,166, 96,105,194, 2, +143,195, 0, 73, 16,148,142,156, 16,138,228,224,176, 73,176,216, 28,130, 84,170,140,202, 30,142, 76,149,145,145, 17,135,176, 53, +231,130,199,254, 23,149, 5, 38, 74, 29,203,199, 1, 44,147,186,117,135,110,218,188,153, 83, 88, 92,140,193,131, 7,231, 37, 61, +122, 20, 34, 6, 30,117,173, 33, 72,137,100, 50,221,253,186,118, 69,100, 84, 20,138,242,243, 95, 3,165,206,241, 28, 39,167, 97, +219,182,109,227,136, 37, 18, 12, 30, 52,168,224,213,157, 59, 71, 82,138, 17,118, 60,185, 84,136,213,120,220,217,108, 71, 13,175, + 48, 63, 63, 31, 40, 77, 33,225, 96,103,186, 97, 70, 64,111, 20,149, 72,176, 96, 99, 8, 21, 21, 39,248, 54, 60, 21, 95,157, 73, +135,240, 63,246, 24,158, 92,225, 3, 64,135,132,165, 26,235, 82, 77, 98, 69, 42,149,126,116, 1,244,161,156,149,137,196, 15,229, +252, 55,130,201,100, 74, 94,190,124,201, 49,183,113,162,108,204, 88,249,245,198,223,177, 0, 0,107, 83,166, 80,174, 82, 80,233, +233,233,224,114,185, 18, 29,135, 27, 38,237,219,183,111, 13,128,102, 76, 38, 51,236,208,161, 67, 68, 72, 72,136,213,136, 17, 35, + 18, 98, 99, 99,211, 60, 61, 61, 93, 15, 29, 58,100, 14, 0, 59,118,236,160, 79,156, 56,209, 27,165, 41, 51,170,204,227,146,153, +153, 25,152,155,155,123,111,198,140, 25,193, 28, 14,199,202,196,196,196, 38, 60, 60,156,144,200,105,180, 93,146, 92, 22,137,104, +110, 68,226,246, 98,115, 76,158, 60,153, 17, 27, 27,187, 62, 45, 45, 45,172, 26,206,133, 5, 5, 5,225,175, 94,189,218, 98,225, +220,210,206,196,117,137,133,207,226,120, 0,128,171, 45, 11,164,250,190, 88, 80, 80,128,236,236,108, 76,159, 62,221, 42, 33, 33, + 97, 97, 90, 90,218,141,106,172, 90,183,114,114,114, 82, 95,188,120,225,199, 98,177, 56, 38, 38, 38,109, 35, 34, 34, 8,137,140, + 66,243,133,201,200, 43, 46,237,167,181, 41, 19,143, 87, 59,224,219,111,191,101,190,126,253,122,163, 64, 32,232, 92,233,205,140, + 36,131,180, 69,214,130, 5, 11,162, 1, 52, 0, 80,110,104, 84,165, 82, 17, 35, 71,142,124, 14,192,107,254,252,249,214, 52, 77, +207, 91,184,112, 97, 30,128,189,255,244,185,100,110,110,190, 97,202,148, 41, 56,113,226, 4,242,243,243,183, 1, 64, 97, 97,225, +214,163, 71,143, 30,159, 52,105, 18,126,253,245,215, 13,217,217,217,127,160,230, 80,237, 47,135, 15, 31,142, 75,151, 46,225,207, + 63,255, 92, 6, 32,166,138,118,175,194,195,195, 23,158, 61,123,118,251,136, 17, 35,240,243,207, 63,247, 1, 80,157,131,108,207, +222,189,123,227,226,197,139,200,205,205,221, 85, 89,131,130,130,130,221,231,206,157,107,223,187,119,111,172, 95,191,190, 39,128, +235, 58,108,186,135,133,133,197,161,237,219,183,183,245,246,246, 70, 64, 64,128, 68, 46,151,247,153, 63,127,254,249, 99,199,142, +153, 29, 62,124,184,205,228,201,147, 31,168,115,190,221,215,201,148, 69,146,235, 54,111,222, 60,193,207,207, 15,243,230,205, 83, + 94,190,124,121, 0,128, 43,127,252,241, 71,194,130, 5, 11, 46,108,222,188,153,177,105,211,166, 9,179,103,207,206,166, 40,234, + 83,137,235,213, 59,118,236,104,223,171, 87, 47,188,121,243, 6,247,239,223,135, 92, 46,255, 53, 34, 34,226,118,163, 70,141, 86, +203,100,178,243, 38, 38, 38, 99,204,204,204, 60, 91,182,108,249,197,227,199,143,141,161,155,159, 94,102, 98, 98,162,165,133,133, + 5,148, 74, 37,158, 61,123,134,186,117,235, 66, 46,151,227,237,219,183,240,246,246, 6,155,205, 70,102,102, 38,180,172,229, 53, +136, 34,242, 89, 66, 82,122, 3,107, 51, 19, 64,197,195,147,248, 84,216,217, 90, 65, 69,144,200,200, 16,160,101, 19,103, 16, 4, +129,130,220, 12, 16, 4,241, 92, 23, 78, 21, 77, 69,190, 75,207,170, 99, 99,198,133,119,251, 94, 54, 17,127,100,135,152, 55,232, + 52,153,201, 32, 24, 28,174,233,222, 9, 99,199,218, 82, 20,141,130,220, 76, 48, 73,242,225,167, 56, 64,167,222, 33,165,171, 27, +239, 73,175, 9,107, 90, 18, 52,104,177, 28,135,127,206, 68,190, 49,208,114,199, 15, 63, 88,218,216,218, 34, 32, 32,128,202, 77, + 75,187, 86,162, 99, 98,229, 6,141, 26, 57,152,154,153,225,238,221,187, 96,148,250,216,226, 32,224, 17,180, 96,129,141,189,163, + 35,198, 79,152, 64,101,190,123,119, 93, 12,164,235,211,215, 6,110,110, 44, 13, 47,169,230, 21, 48, 48,107,254, 0, 95,174,137, + 17, 23,235,246,156, 65, 74,142,232,120,132, 0,123,254,163,246,142,125,213, 90,180,170,114, 62, 43,117,170, 54,174, 86,172,240, +120,188, 50,107,138, 30,111,122, 31,157,179, 38,252, 29,156,159, 16,139, 1,156, 5,176, 56, 37, 37, 37,110,194,132, 9,114,165, + 92, 90,116,111, 77,131, 69, 81,235,235, 77,139, 8,228, 79,251,125,150,197,162, 18, 97, 94,209,142, 29, 59, 20, 41, 41, 41,113, +218,203,212,192,253, 14,192,197, 95,126,249,101,247,169, 83,167,224,229,229,133,152,152, 24,123,145, 72,212,234,249,243,231,214, + 30, 30, 30, 8, 9, 9,193,137, 19, 39,182, 0,184, 90,157,200,210, 64,169, 84, 94,203,200,200,104,156,156,156,220,208,210,210, + 82, 97,105,105,137,138,145,136,133, 98, 10,185, 5, 66, 88, 91,219,192,220,220,188,190, 14,226,252, 98, 70, 70,134, 59,101,213, +164,139,123,206, 54, 97,228, 58, 23, 68,174,115,193,197,133, 78,224, 91,114,144,159,159,143,236,236,108,100,103,103,131, 32, 8, + 40, 20,138,166, 58,112,190, 21, 8, 4, 7,222,189,123,119,214,193,193, 1,102,102,102,160, 1,100, 20, 40, 16,189,201, 3,209, +155, 60,144, 81,160, 64, 97, 81, 17,234,213,171, 7, 51, 51,179,170,134, 40,200, 58,117,234,244, 29, 54,108,152, 25, 0,168, 5, + 84,119,154,166,167, 85,242,153,170, 84, 42, 59,105,218,126,255,253,247,214, 0,122,255,195,231, 19, 3,192,140, 73,147, 38,181, +225,241,120,216,185,115,231, 91, 0, 71, 52,247,250,221,187,119,199, 3,192,172, 89,179, 60, 1,204, 67, 21,153,160,203, 76, 67, +108,118,235,166, 77,155, 34, 34, 34, 2, 0,206,212,176,238,208,123,247,238,161, 81,163, 70,224,241,120,109,107,104, 91,223,197, +197, 5,241,241,241, 0,240,164,138, 54, 79,226,227,227, 75,135,123, 8,162,190, 14,219, 62,176, 87,175, 94,207,110,220,184,209, +182, 99,199,142,152, 48, 97,130,236,193,131, 7,125, 1,220,126,242,228, 73,183,145, 35, 71,138,220,221,221,113,235,214, 45,143, +145, 35, 71,222, 35, 73,114,141, 14,156,227, 87,173, 90,181,248,235,175,191,198,170, 85,171,232,147, 39, 79, 6, 0,184,162,158, +119,249,248,241,227,163,215,174, 93, 75, 15, 26, 52, 8, 43, 87,174, 92, 12, 96, 90,117,100, 34,145, 72,168, 82,169, 32, 18,137, +116, 50,201,235,218,222,214,214,246,203, 94,189,122, 97,233,210,165,168, 83,167, 14,206,159, 63, 79, 3, 8, 3, 16, 46,147,201, +186, 0,216, 44, 18,137,126,143,136,136, 64,207,158, 61,217, 40, 95, 98,164,186,245, 63, 59,122,244,168,212,194,194, 2,174,174, +174,104,208,160, 1, 50, 50, 50,144,148,148, 4,111,111,111,180,110,221, 26, 74,165, 18, 7, 14, 28,144, 20, 21, 21,233,148,147, + 79, 41, 19, 29,190,122,225,180,208,198,140, 11,103,123, 11,212,171, 99,141,226,130, 28,100,103,164,163,117,211,186,232,218,186, + 30,114,132, 50, 92, 14, 59,157, 95, 84, 84,114, 88, 39, 19,190,180,228,208,181, 63,206, 11,173,204,216,104,220,196, 19, 35, 39, +204,106,217,178,149,207,213,118,237, 58, 93,254,113,195,186,230,221, 59, 52, 37, 82,115, 36,184, 20,118, 38, 95, 88, 88,120,232, + 83,220,232, 87, 2, 12,137,133,251,237, 93,103, 35, 15, 52,235, 51,233, 64, 92, 42,182, 1,128,130,193,240,232,251,229,151, 72, + 77, 77,197,233, 83,167, 4, 37,192, 83, 93,249,140,140,140, 72, 0, 16, 10,133,224,170,253,238,148, 64,147,175,190,250, 10,217, + 57, 57, 56,122,228, 72,246, 37, 32, 74,159,126,246, 7, 56,198, 70,165, 6, 65,161, 80, 8, 2, 40, 4, 0,130,137,190,237,188, + 26, 33, 59,175, 16, 55, 30,198, 21,215, 19, 99,122,117, 60,159,177, 35,124,237,124,180, 0,228,204,155, 55, 15, 92, 46, 23,124, + 62,191, 76, 28,105,196, 10,135,195, 1,159,207,135, 82,169,196,241,227,199, 1, 32,167,218, 55, 60, 64, 58, 96,218,122, 74,170, +160, 75, 88, 44,214, 71,225, 84,191, 57, 74, 7, 47,248,153,250,227, 94,229, 65, 49,181,225,252, 12,208, 78,157, 19,171, 29,128, +252,164,164,164,212,161,131, 7, 8,147, 19, 94,100,136, 10,210, 5,133,185, 41,130,148,183,207, 51,150, 44,156, 39, 76, 77, 77, + 77, 65,105, 46,173,118,233,233,233,154,101,116,193,188,161, 67,135,254, 52,105,210, 36, 58, 58, 58, 26, 0, 16, 25, 25,137,177, + 99,199,210,163, 71,143,222, 6, 96, 81, 45,250, 45, 18,139,197,229,172, 33,114, 21, 85, 54,228, 87, 88, 88,136,244,244,116,200, +100, 50,157, 21,241,171,203,155, 94,230, 37, 61, 86,120,186,154,192,211,213, 4, 30, 46,198, 32,148,197,101, 34, 43, 59, 59, 91, +243,230, 44,209,163,159,133, 82,169,180, 92, 63,181,135, 38, 11, 11, 11,145,145,145, 1,149, 74, 85,213,131,140, 74, 75, 75,187, +124,226,196,137, 34, 0,248,241,199, 31,243, 8,130,248,147, 32,136,159, 42,249,236, 97, 50,153,119, 53,109, 55,109,218,148,135, +247,135,196,254, 78,124,237,237,237,157,191,120,241,226,157,179,103,207,198,158, 61,123, 32, 16, 8, 22,225,175, 92, 60, 84, 78, + 78,206,130, 93,187,118, 97,220,184,113, 88,190,124,249,166, 86,173, 90, 21, 2, 24, 89, 21,161,157,157,157, 51,147,201, 68, 84, + 84, 84, 33,128, 55, 53,172, 63, 35, 42, 42, 42,147, 32, 8,240,249,124,183,234, 26, 90, 91, 91, 55, 52, 51, 51, 67, 90, 90, 26, +160,126, 99,174, 4, 73,233,233,233, 52,135,195,129,147,147, 83,163,154, 54,222,202,202,106,193,129, 3, 7,152, 47, 94,188, 64, +247,238,221, 83,111,221,186,213, 19,128, 38, 36, 61, 42, 50, 50,210,183, 91,183,110, 47,175, 94,189,138,141, 27, 55, 18, 45, 90, +180,152, 86, 19,167,171,171,235,212,241,227,199, 35, 56, 56, 24,123,247,238,157, 6,224, 84,133, 38,199,118,237,218, 53,107,239, +222,189,152, 48, 97, 2,234,215,175, 63,178, 58,190,228,228,228,133,126,126,126,145,175, 94,189,210,169,226,129,142,237,187,249, +248,248, 52, 20,139,197, 56,116,232,208,155,134, 13, 27, 62, 58,117,234,212, 60,188,255,192,254,253,244,233,211, 24, 53,106, 20, + 90,180,104,113, 8,192, 8, 93, 46,203,216,216,216,148,235,215,175, 83,108, 54, 27,174,174,174,232,215,175, 31, 2, 2, 2,208, +188,121,115,200,229,114,156, 62,125,154,122,254,252,121,170, 76, 38,211, 41,151, 82,238,171,155,231, 19, 19,255,199,222,121,135, + 55, 85,253, 97,252,189,217, 59,233, 74,218,210,210,210, 50, 58,217,200,144, 13,101,200, 22, 81,100,136, 19, 81, 65, 20,112,240, + 19,113, 34,200, 18, 65,100, 40, 10, 34,160, 32,178, 42,224, 64,169,108, 90,160, 20, 40,109,233,158,233, 30,105,118,114,207,239, +143,182, 88, 74, 71,210,162,128,158,207,243,220, 39,237, 73,238,155,115,247,155,239, 57,231,123, 18, 78, 94, 56, 27,101,229,113, + 57,240,243,118,195,195, 17, 93,241,236,164,190,232, 30,226,131,244,124, 3,142, 29,251,197,154,154,154,124,218,145, 17,135, 53, +154,241, 87, 99, 79, 93,185,112,194,198,231, 49, 8, 9,238,128, 69,255,123,221,117,201, 59,111,184,116,104,235,135,216,148, 50, +252,242,243, 97,107, 78, 86,230,239,119,107,196,225,113, 64, 32, 23, 49, 50, 46,135, 3, 59, 71, 84,201,173, 30, 72,211, 49, 44, + 44,200,211,203, 11,145,145,145,224, 56, 49, 34,244, 56, 32,144,203,171, 90,193,117, 58, 29,106,244,218, 5, 7, 7,251,249,251, +227,167,200, 72,112, 89,246,218, 64, 39, 19,140, 94,175,106,134,190,169,203, 0,198, 23, 91, 67,209,174,181, 38,216, 85, 37,195, +217,216, 36,152,172,228,220,183, 37,184,171,249,200,254, 70,102,162,153, 77,135, 43, 54,110,220,216,243,203, 47,191, 28, 54,111, +222, 60,249,140, 25, 51, 32, 22,139,161,215,235,225,235,235, 11,187,221,142, 35, 71,142, 32, 58, 58, 90,199,178,236, 47,184, 61, +109, 64, 4,106,141,210, 56,154, 12, 73,149,223,210,247,220,255,232,163,119, 68, 19, 0,228, 73,172,178,168,141,121,251,218,221, + 39, 38,238, 56,122,129,121,101,202, 64, 78,247,224,214, 0, 0, 79, 79, 79, 40,149, 74,167, 53,239, 0,127,187,102,237,102,221, +188,188,188,235,121,121,121,249,207, 61,247, 92, 72, 77,199,119,145, 72,100,172,142,100,149,212,183,142, 3,245,180, 0,120,241, +203, 47,191, 60, 80, 86, 86,118,244,181,215, 94,195,146, 37, 75,112,240,224,193,254, 0, 78, 54,115,219,237, 37, 37, 37,165,231, +206,157,243,108, 31,218, 13,129, 26, 62, 6,188,157, 8, 66, 8,220,165, 4, 21,165,197,184,120,241, 2, 42, 42, 42,206, 58, 83, + 79,139,197, 82,154,159,159,239,161,209,104, 80, 92, 92,140,194,194,194,155, 38,171,164,164, 4,197,197,197,132, 97,110,203,217, +210,152,102,101,126,126,190, 62, 62, 62, 94,232,217,186, 61,218,106, 4,232,245,191,235, 0, 33,240,115,227,160,162,188, 20,167, + 79,159, 70, 89, 89,217, 31, 13,105,178, 44, 59,127,218,180,105, 92, 0, 79,188,246,218,107,110, 0,186,188,254,250,235,191,160, +206,200, 66, 30,143,247,201,246,237,219, 59,214, 52, 49,190,241,198, 27,171, 1,124,249, 79,157, 75,238,238,238,243, 35, 35, 35, + 21, 22,139, 5,107,215,174,197,234,213,171,183,224,246, 68,149,145,159,125,246,217,122, 14,135,243,210,236,217,179,241,252,243, +207, 75,123,244,232, 49, 47, 55, 55,247,219,250, 52,179,179,179, 23,117,239,222,125,113,126,126,254, 71, 14,153,229,196,196,153, +221,187,119, 95,148,159,159,191,188,177, 99, 36,147,201,100,118,187, 29,169,169,169, 37, 64,131,253, 59,140,169,169,169,217,118, +187,221, 87, 42,149,186, 53,117,126,150,148,148,124,212,163, 71,143,119,181, 90,237,207, 0, 62,172,199,144, 95,202,205,205, 13, +159, 59,119,238,156,101,203,150, 77,204,203,203,219,213,148,102,122,122,250, 71,131, 7, 15,126, 59, 33, 33, 97, 43, 26,110, 2, +254,236,189,247,222,179,108,223,190,253,133,212,212,212,165, 77,104, 30, 42, 44, 44, 60,228,196,241,109,232,243, 55, 53,185, 92, +238,235,203,150, 45,227,108,220,184, 17,132,144,149,118,187,189,161,122,198,238,219,183,111, 91,223,190,125,103,236,222,189, 91, + 28, 30, 30,254,188,201,100,218,217,212,249,169,215,235,247,238,222,189,123, 98,108,108,172,239,140, 25, 51,196, 65, 65, 65,176, + 88, 44,200,205,205,197,198,141, 27,141,113,113,113, 89,165,165,165,123,157,185,135,216,204,229, 83, 78, 29,219,191, 51, 45, 49, +174,207,160,145,227, 93,205, 22, 95,136,138,184, 40, 45,202,195,145, 67,123, 75, 82, 83,147, 79,235,245,165, 83,156,209,180,152, +202, 30, 63,253,251,129, 93, 89,169,241,189, 7, 12, 30,229,106, 52,251, 67, 36,224,160, 72,155,141, 35,145,251,139, 83, 83, 83, +254, 52, 90, 77, 79,222,173,251, 60, 55, 0, 31,114,243,162,159,155, 53,182, 43, 36,174,190, 23,249,192,218,190,128,196,195,211, + 83, 80,125,237, 64, 94,213,231,209, 33, 77, 45, 32,108, 95,221, 74,165,215,235,193, 7,204, 79, 1,124,181, 90, 45, 1,128,132, +132, 4, 72,171, 90, 53,156,170,167, 14,144, 73,107,233,114, 0,125, 17, 15, 62,237,148, 50, 6, 0,178,242,138, 96,182, 54,250, +220,184,223,217, 92,203,112,109,110,142,128, 0, 64,132, 92, 46, 95,178,120,241,226,149,103,207,158, 93, 57,102,204,152,149, 34, +145,104, 73,245,206, 22, 52,114, 32,254, 49,205, 7, 90,193,109,112, 91, 38,106,120, 59,134,157,213,223,213,254,100, 47,153,121, +200,144, 33,235, 91, 88,207,150, 92, 44,127,167,230,126,171,213, 74, 80,213,108,183, 31, 13, 55, 9, 46,172,245,126, 94, 70, 70, + 6,169,254,219,153,122,122, 76,158, 60,153,173,168,168, 32,143, 61,246, 24, 65,211, 83,248, 52,170, 41, 18,137, 6, 15, 24, 48, +192,170, 45, 40, 38,215, 83,178,201,153,152,171,228,232,177, 83,100,215,222, 72,178,110,253, 38,210,185,115,103, 51, 0,127,103, + 52,121, 60,222,144,193,131, 7, 23,105,181, 90, 18, 31, 31, 79,162,162,162,200,158, 61,123,200,166, 77,155,200,134, 13, 27, 72, +235,214,173,181, 0, 60,157,209,148, 72, 36,227, 31,122,232, 33,107,105,185,158,164,102, 23,145,203,241,169,228,228,185,203,228, +200,177,147,228,219,157,187, 73, 88, 88,152,209, 1, 77, 46,151,203, 93,183,107,215,174,114, 66, 8, 25, 63,126,124, 22,110, 77, +164, 26, 56,127,254,252,124, 66, 8, 89,190,124,121, 17,234,239, 8,255,119,159, 75, 35,125,124,124,174, 11, 4,130, 72, 0, 79, + 52,177,222,227, 60, 30,239,160,151,151,215,121, 0, 15,223,133,235,104,140, 70,163, 57, 3,160,169, 25, 14,106, 62, 55,225, 95, +114,189,255, 29,154, 67,120, 60, 94, 20,208,248, 36,194,181,238,215, 31,112,185,220,159, 0, 12,117,178,158, 29, 60, 60, 60, 30, +115,117,117,125,197,213,213,245, 21,141, 70,243,152, 80, 40,236,208,146,109,119,239, 16, 49,214,175,219,184,125,173,187,140, 78, +247,235, 58, 38, 61,160,251,248,125,238, 29, 34,198,182, 84,211,191,251,248,253,126, 93,199,100,248,117, 29,155, 22,248,192,248, +125, 30,193, 17, 15,221,205, 99,244,132, 15, 90, 13, 11,132,141, 68,189, 77, 72,212,219, 36, 34, 16,108, 31, 23,132,245, 4, 20, + 35, 34, 34, 86, 17,187,125,213,196, 9, 19, 86,181, 7,220, 9,192,173,187,212,167,217, 13, 80,222, 92,119,252,248, 85,109, 1, +143, 97,128,116, 96,255,254, 43,137,221,190,106,218,227,143,175,242, 3,188,234,211,107, 72,147, 0, 92, 31,160, 85,109, 93, 15, +160,221,164, 0,132, 47, 28, 27, 64, 72,212,219,228,189, 71,131, 72,119, 79, 60,209,132,102, 67,145,162,251, 58,162,229, 44,178, +234,155,235,210,234, 87,217, 29, 56, 9,239,184,102,111,111, 4, 69,180, 99,226, 71, 5,243,138, 81, 53, 36, 89,246, 47,188, 73, +110, 53,155,205,196,104, 52, 18,189, 94, 79,116, 58, 93, 93, 3,117,211,144,229,228,228,144,172,172, 44,146,145,145, 65,210,210, +210, 8,254,234,123,227,112, 61,149, 74,229,151,143, 62,250,168,157,207,231,175,187, 19,219,238,230,230,182,180, 87,175, 94,150, + 79, 63,253,148,236,219,183,143,124,241,197, 23,100,246,236,217,164, 99,199,142, 38, 23, 23,151, 41,205,209,244,242,242, 90, 20, + 28, 28, 92,180,101,203, 22,242,237,183,223,146, 53,107,214,144,183,222,122,203,238,235,235,155,167, 80, 40, 70, 52, 71, 83,163, +209,108,238,215,175,159,101,243,230,205,228,151, 95,126, 33, 59,118,236, 32,243,231,207, 39, 33, 33, 33, 38,153, 76,246,136,131, +154, 92, 30,143,183,106,214,172, 89,121,173, 90,181,138,172,243,158, 52, 44, 44,236,252,180,105,211,114, 0,188,241, 47, 58, 63, +169, 38,213,164,154,127,131,209,154,218, 10, 62, 4,224, 74, 5,130,199, 7,246,239,191, 82, 0, 60,238,172, 41, 18,115,185,147, +250,246,234,181, 82, 0, 76,169,249,172,152,203,157, 52,176,127,255,149,124, 46,119,122, 67,122,141,105, 18,128, 43,224,241,222, +232,219,167,207, 42, 30,240,191,154,178, 33,129,204,181,249, 35, 91,147,254,254, 76,210,116, 13,164,255, 98,163,117,199,225,253, + 13, 39,225,253,162,121,175, 92,212,237,171, 13,211,126, 39, 34, 90,251, 81, 53,139,122,251,102,214, 83,114,135,183,189,147,135, +135,199,225,246,237,219, 23,180,105,211, 38,199,213,213,117, 39, 0,223, 22,106,134,123,121,121,125,227,233,233,153,232,237,237, + 29,235,225,225,241, 9,170,178,206, 55, 91,147,207,231,247,242,244,244,252, 35, 32, 32,160,212,223,223, 95,235,225,225,177,171, +158, 72,150, 35,154,222,168,255,166, 34,168,126,143, 62,116,168, 38,213,164,154,183, 24,152,225,109,177,108, 88, 32,108,195, 2, + 97, 31, 30,128, 79,106, 27,148, 49,128,164,185,166,232, 73, 64, 84,247,243, 77,233, 53,165, 73, 0,238,131,128,188,238, 58,163, +124, 17,230,160,230,253, 30,209,170,185,207, 59,151,222,161, 1,108,127, 67, 37,239, 23,205,123,133, 36, 52,210, 25,185, 22, 75, +239,224,119, 26,238,240, 54, 92, 46, 44, 44,124,168,176,240,142,142, 77,184,146,151,151,247,196,157, 20,180, 90,173,103,181, 90, +237,160, 59, 32,213,208,208,107, 11, 28, 28,150, 77,161, 80,254, 59, 48,128, 29,201,120, 51,162, 3,214,242,236,224, 28, 73, 65, +118,157, 33,121, 6,166, 57,154, 85,216,183,214,115,143,103,154, 91,207,191,208,221,166,145,133,171,204,127,231,176,229,162,170, +143, 86,139,141, 22,133, 66,161, 80, 40,148,127,128, 95, 19,233, 15,177,251,128, 72,220, 26,125,139,172,101, 68, 27, 12,125, 58, + 51,146,162, 57,225,211, 95,169, 38,213,164,154, 84,147,106, 82, 77,170,249,159,211,172,161,161,185, 83,175,215,249,191, 89,163, +248,254, 43,208,118,118,170, 73, 53,169, 38,213,164,154, 84,147,106,254,219,105,118, 30, 45, 10,133, 66,161, 80, 40, 20, 74,227, + 52, 24,117,163, 70,139, 66,161, 80, 40, 20, 10,165,101,120,163,106,138,170, 72,252, 53, 85,213,102,106,180, 40, 20, 10,133, 66, +161, 80, 90,206,104,252, 53,218,240,150,232, 22,135,238, 27, 10,133, 66,161, 80, 40,148, 22, 51,179,214, 43,237,163, 69,161, 80, + 40, 20, 10,133,114,135,112,108,100,228,161, 67,135, 8,221, 87, 20, 10,133, 66,161, 80,238, 22,247,169, 23,169,137, 98,221, 54, +203, 7,141,104, 81, 40, 20, 10,133, 66,161,180,140,205,181, 12,215, 45,101,212,104, 81, 40, 20, 10,133, 66,161,180,140, 26,131, + 21,137, 58, 83,170,113, 0,218,100, 72,161, 80, 40, 20, 10,229,238,114,159,123,145,205,213,203,109,211, 37,213,140, 58, 28, 84, +189,129,131,232,161,166, 80, 40, 20, 10,133,114, 23,184,159,189,136, 55, 26,232,163, 69,161, 80, 40, 20, 10,133, 66,105, 25, 51, +235,188,222,132,161,251,134, 66,161, 80, 40, 20, 10,229,142, 24,173,218,208,201,176, 41, 20, 10,133, 66,161, 80,238,103,232,204, +230, 84,147,106, 82, 77,170, 73, 53,169, 38,213,252, 47, 48, 19,117,178,194, 3, 52,189, 3,133, 66,161, 80, 40, 20,202,157, 48, + 89,155,235,251,159,206,117, 72,161, 80, 40, 20, 10,133,242, 55, 65, 35, 90, 20, 10,133, 66,161, 80, 40, 45, 99, 51,234,201, 10, + 79,141, 22,133, 66,161, 80, 40, 20,202,157, 51, 91,183, 65,155, 14, 41, 20, 10,133, 66,161, 80, 90,198,204,134,254,103,208,240, +200,129, 95,157,248,130,230,140, 62,248,149,106, 82, 77,170, 73, 53,169, 38,213,164,154,255, 57,205,166,180,127,197,253, 71,131, +157,225,255,110,232,208, 87,170, 73, 53,169, 38,213,164,154, 84,147,106,254,219,169,153,130,167,102,185, 57, 21, 15,237,163, 69, +161,220,231,144,221,224,162, 36, 56, 0,132,180, 2, 87,152,139,220,203,201,204,187, 96, 91,172,169, 13,243,135,196,234, 9,155, +184, 0,218,216,148,150,106, 82, 40, 20,202,191,152, 92, 52, 16,193,162, 70,139, 66,185,223, 41, 8, 9, 2, 15, 75,193,129, 55, +136,229, 6,212, 97, 75,129,171,113, 45,214, 20,176, 31,194,206,241, 5,177, 36, 64, 19,188, 12,184,141, 68, 38, 31, 0, 0, 32, + 0, 73, 68, 65, 84,126,149,238,108, 10,133, 66,113,142,127,188, 51, 60,159,207,215, 2, 96,197, 98,241, 94,208, 89,174, 41,127, + 47,222,213,231, 25, 91,125,222, 57,131,156,199,227, 45,150, 74,165,191,139, 68,162,124,145, 72,148, 47,147,201,126,231,241,120, +139, 1,200,239,149, 13, 36,223,116,148,130, 99,127,200,108,101,125,142, 92, 46,213,232, 77,246, 32,112,108,163,200,150, 14,242, + 22,105,242,152,225, 70, 11,235,247,237, 57,189,103,165,217, 22, 10,130, 22,105,214,194, 69, 32, 16, 28, 1,224, 65, 79,207,127, + 39,161, 64,143, 30, 60,222,130, 16, 96, 8,232,124,186, 20,202, 63,111,180,172, 86,171,166,176,176,144,217,182,109,219, 56,149, + 74,117,131,199,227, 45, 4, 32,248,175,236,112,185, 92,126, 74,169, 84,106, 85, 42,149, 86,169, 84, 94,104,170,252, 95, 74,144, + 90,173, 78,119,115,115, 75,168, 93,168,238,252,240,131,237,251, 62,241,142,123,216,248,129, 45,212, 23,240,120,188,133, 42,149, +234,198,182,109,219,198,101,103,103, 51, 86,171, 85,227,196,250, 3, 92, 93, 93,175,157, 61,123,246,237,194,194,194,129,153,103, +182,168,243,206,110, 82,167,255,177,106, 80,244, 79,235,222,118,113, 81, 93, 5, 48,224,158,216,147, 70,214, 19, 28,238,224, 43, +185,122,105,110,185,213, 51, 38, 77,175, 0,184,131, 96,110,193,143,152, 50,214, 19, 32, 67, 46,101, 25,100,167,138,213,158,127, + 38,155,148,224,112, 6,195,200,120,181,248,134,195,225,188,192,178,236, 48,129, 64,240, 10,189,253,254, 59, 17,114, 56,125, 79, +141, 27,247,225, 27,157, 59,207, 9, 1,198, 54, 96,182, 24, 0, 47,135,132,132, 28, 6,240,248, 29,252,250,143,131,131,131,179, + 1,204,165, 71,130,242, 15,211,173,230, 7, 62,234,244,209,114,216,104, 77, 10, 64,223, 41,129, 56,254, 88, 0, 42, 38, 7, 66, + 55, 61, 16, 39, 30, 9,192,144,230,212,198,221,221, 29, 3, 6, 12,224,102,103,103, 75,230,207,159,255,142, 88, 44, 78, 5, 48, +162, 57, 90, 18,137, 36, 90, 42,149,102,242,120,188, 91,234, 34,149, 74,163,101, 50, 89, 38,143,199, 27, 90,187, 92,161, 80,156, + 82, 42,149, 90,133, 66,113,161, 1, 35, 20,173, 84, 42,181,114,185, 60,186,118, 57,143,199, 27, 42,151,203,179, 20, 10, 69,221, +242, 33, 10,133, 34,179,110,121, 67,240,249,124,223,204,204, 76, 77, 86, 86,150, 70, 40, 20,122,214, 46,207,200,200,208,100,102, +102,222, 82,238, 12, 60, 30,111,136, 76, 38,203,148, 74,165,209,245,149,215,221,166,134,168,181,239,134, 56, 82,238,172,201, 26, + 62,124,248,137,220,220, 92, 63, 23, 23, 23,151,218,111,184,169, 92, 70,124,179,101,253,188,241,163,134,191,160, 14,157,208,169, +153,250, 35,196, 98,113,234,252,249,243,223,201,206,206,150,244,233,211,135,203,225, 56,245,123, 34, 98,252,248,241,251,181, 90, +173, 79,151, 46, 93,184, 54,155, 13, 87, 14, 44,134, 52,246, 21,136, 83, 55,162,181,164,128,119,227,151,101,190,195, 7,245,216, +143,187,220, 25,148,236, 14, 21,128, 97, 7,176,132,168,175,101, 27,213,163,199, 61,202,187,152,105, 80, 91,237,118, 55,128, 59, +136,124,237, 47,106,150, 38,207,218,159, 37,196,243,183, 52,190,122,240, 99,115,184,199,210,120,106,171,221,238, 14, 14, 6, 54, + 71,179,246,233,207,229,114,231,173, 90,181,138, 3, 96, 54, 0,225,127,233, 46,220,179, 21,124,134,180,227,158,235,230,141,190, +119, 80, 54,188,250,122, 15,186, 87,182,211,204,178,215,119,165,164, 28,157,222,174,221,152, 55, 58,119,126,170, 30,179,197, 0, +120, 99,217,178,101, 79, 92,185,114, 69, 29, 24, 24,248,252, 29,250,209,191,102,217,178,101,175, 95,185,114,165, 85, 64, 64,192, +123,160,233,139,254, 85, 16, 66,132,132,144,193,132,144,209,132,144,161,132,144,158,213,127, 63, 80,189,140, 38,132, 68,212,121, +125,160,122,221,154,247,123, 53,160, 49,186,238,122,181,214,169,251,255, 45,127,215, 99,180, 70,163,170,175,214,232, 91, 54,224, +208,161, 67,164,246,107, 93, 38, 7,224,221, 57, 15,250,232,175, 29,220, 65,116,153, 41,164, 36,254, 34,185,184,249, 35, 50,231, + 1,181,126,106, 32, 62,118,126,127, 17,114,242,228, 73,114,229,202, 21,162,211,233, 72, 98, 98, 34,233,213,171,151, 65, 42,149, +254, 6, 32,192, 25, 49,133, 66,161,253,237,183,223,200,240,225,195,203,228,114,249,202,154,139, 75,169, 84,106, 79,158, 60, 73, +134, 15, 31, 94,166, 80, 40,214, 0,224, 2,192, 35,143, 60,146, 79, 8, 33,106,181, 58,167, 62,189,241,227,199,151, 16, 66,136, + 74,165,170,105,106,226, 42, 20,138, 53, 47,189,244,146,238,252,249,243,196,213,213,181,166,156,163, 84, 42, 87,206,158, 61, 91, + 23, 19, 19, 83,187,188, 81,220,220,220, 50,237,118, 59, 57,120,240, 32,209,104, 52, 55,235,224,234,234,154,105,183,219,201,254, +253,251, 27,172, 91, 99,129, 2,185, 92,190, 98,250,244,233, 21,105,105,105,196,221,221, 93, 91,171,124,229,140, 25, 51, 42, 50, + 50, 50,136,135,135,135, 67,117,116,119,119,215,158, 58,117,138, 76,156, 56,177,188,246, 62,117,119,119,215,158, 62,125,186,166, +124,133, 35, 55,178, 86,173, 90, 61,175,209,104,114, 52, 26, 77,142,139,139,203, 18,111,111,239,188,130,130, 2, 66, 8, 33,109, +219,182,205,175, 29,201,210,132,143,123,117,227,238,211,103,163,226,138, 10, 58, 15,123, 97,133,170,243,120,149, 19,251, 32, 64, + 42,149,254, 54,112,224, 64, 67,102,102, 38,169,172,172, 36,177,177,177,228,228,201,147, 36, 41, 41,137, 0, 32,142,156, 78,114, +185, 60,219,100, 50,177, 38,147,137, 45, 40, 40,176,231,231,231,219,227, 87,122, 19,242, 21,255,230, 82,186,127, 44,201,139, 90, +202, 42,229,210, 44, 0,138,187,118,227, 89, 31,230, 75, 54, 5,239,186,186,216, 47, 62,106,217, 72, 43, 73, 59, 70,118, 60,165, +182, 30,127,213,231, 6,217, 16,242, 3,217, 20,218,186, 89,154, 27, 66,119,196,190,229,119,125,221,123, 47, 91,211,211,211,201, +130, 25, 35,109, 63,207,241, 73, 38, 27, 67,118, 55, 71,179, 22, 83, 30,126,248, 97, 93, 70, 70, 6, 9, 11, 11,171,228,114,185, +207,252,151, 76, 86, 68,144, 48, 59,246,219, 5,236,216,112,105,209, 29, 50, 91,225, 26,141,166,112,235,214,173, 68,161, 80,228, +223, 67,102,139, 9, 1,198,109,235,220,121, 63, 59,105,146,125, 91,231,206,251, 67,128,113,213, 6,139, 1,240,230,242,229,203, + 99,172, 86,107,204,215, 95,127, 29, 51,110,220,184, 24, 0, 11, 90,248,157,159,126,252,241,199,196,106,181,146,175,191,254,154, +140, 27, 55,142, 0, 88,235,232,202,114,185,188,125,167, 78,157,182,135,133,133,101,116,233,210,197, 28, 26, 26,106, 12, 10, 10, + 74, 11, 15, 15,223, 42, 18,137, 2, 64,249, 71,104,204,139, 16, 66,122,190,249,230,155, 11, 1,144, 55,223,124,115, 33, 33,100, +116,181,159, 24, 93,251,239,186,175, 53,230,169,230,255,250, 52,106,150,250, 52,235,251,142, 58,223,131, 6, 34, 89, 51,111,219, +184, 67,135, 14, 13, 60,116,232,208,241,186, 27,247,104, 32, 30,156,243,160,143,193, 80,144, 75,226, 62,122,133,252, 62,216,151, +156, 28,228, 69, 18,230, 61, 76,114,191, 93, 67, 94,236,234,170,159, 20,136,193,206, 26,173,152,152, 24, 18, 19, 19, 67, 46, 92, +184, 64, 82, 83, 83, 73, 89, 89, 25,249,238,187,239,236,238,238,238, 6,145, 72,180, 12,128,196, 17, 49,165, 82,169, 37,132, 16, +147,201, 68,150, 44, 89, 98,172,142, 84,121,170, 84, 42, 45, 33,132,148,150,150,146,101,203,150, 25, 85, 42, 85, 44,128, 86, 30, + 30, 30,153, 41, 41, 41,196,211,211,179, 94, 51,227,234,234,170,189,126,253,122,141,113,242,113,117,117,141, 59,112,224,128,133, + 16, 66,178,178,178,136,155,155,155, 22,128,167,187,187,251,197, 67,135, 14, 89, 8, 33, 36, 39, 39,167,166,220, 33,163,101, 48, + 24,200,207, 63,255,124, 75, 29,106,202, 15, 31, 62,124,139, 1,115, 0, 79,149, 74, 21,243,221,119,223,153,237,118, 59,137,139, +139,171, 49,137,158, 46, 46, 46, 23,118,239,222,109,182,219,237, 36, 62, 62,222, 97, 51,216,166, 77,155,124, 66, 8,177,217,108, +100,227,198,141,166,154,125, 90, 83,110, 54,155,201,231,159,127,110, 82, 42,149, 49, 0, 26,141,190,121,120,120,228,152,205,102, + 82, 90, 90, 74,122,245,234,165, 59,121,242, 36, 41, 47, 47, 39,132, 16,210,166, 77,155,124, 0, 8, 30,248,204, 7,103, 19,117, +229, 79,191,190,254,251,128,158, 83, 63, 58,122, 46, 59,235,203,125,209, 49, 30,225,227, 71, 58, 18,212, 20,137, 68,203,188,189, +189,141,127,254,249,167,221, 98,177,144,140,140, 12,114,225,194,133,155,231,216,229,203,151, 29, 50, 90, 60, 30,111,241,217,179, +103, 45,118,187,157, 45, 44, 44,180,231,231,231,219,243,243,243,109,117,141, 22,249,138, 79, 10, 15, 63, 71, 34, 55,207, 53, 11, + 4,130,197,119, 39,154, 5, 46,217, 20, 60,158,108, 10,142,217, 58,221,163,176,226,194, 78, 66,126,153, 75,146, 63, 8, 36,139, + 71, 42, 42,216, 77,193, 49,100, 83,200, 36,242,238, 64,158, 83,154,155, 67,199,146, 77,193, 49, 31, 63,234, 95,116, 49,230, 60, + 57,126,252, 56,249,124,205,114, 50, 39,194,167,146,221, 20, 28, 67, 54,132, 78,116, 70,179, 54, 34,145, 40,241,196,137, 19, 36, + 42, 42,138,188,247,222,123, 68, 42,149,102,220,137,168, 30,217, 16,228, 79,190, 8, 26, 72,182,116,240, 38,127, 12,188,231, 6, +248,244,108, 5,159, 97, 65,194,172,194,139,251, 8, 41, 78, 34,121, 43,195,200,200, 96,126, 75,205, 86,184, 70,163, 41, 72, 75, + 75, 35,121,121,121,100,245,234,213, 68,169, 84,222,211,102, 43, 24, 24, 15, 96,225,138, 21, 43,110,154,172,245,235,215,199, 92, +190,124, 57,198,207,207,239,167, 22,124,215,218, 21, 43, 86,220, 52, 89,235,215,175, 39,151, 47, 95, 38,254,254,254,153, 77,173, + 56,125,250,116,233,131, 15, 62, 24, 51,109,218, 52,253,214,173, 91, 73, 90, 90, 26,137,141,141, 37, 43, 86,172, 32,239,188,243, + 14,249,234,171,175,200,196,137, 19, 43,123,245,234,117,118,210,164, 73, 98, 39, 35, 10,188,234, 40,140,144, 16,194, 39,132,212, + 24, 77, 30, 0,126,205,143,127,138, 99, 94,164, 33, 51,213,144,193,170,251, 94, 35, 70,172, 81,195,230,192,247,221,110,170,234, + 70, 66,106,253,253,199,152, 49, 99, 6,222,246,240, 33,120,127,230,252, 15,196,169, 91, 87, 67,251,221,103,224,150,106,193,175, + 40,130,233, 68, 36,172, 39, 14,224,137, 62,125, 36, 18,134,249,208,217, 29, 42, 20, 10, 33, 20, 10, 33, 16, 8,160,215,235,145, +147,147,131,126,253,250,113, 46, 92,184, 32,126,254,249,231,231, 74, 36,146, 12, 0, 19,154,188,154,153,170,136,244,169, 83,167, +240,220,115,207,137,182,111,223,222, 69,173, 86, 95,178,219,237, 66, 0,136,143,143,199,228,201,147, 69, 59,119,238,236,216,170, + 85,171, 11, 22,139, 69, 42, 18,137,192,229,114, 27,212, 19, 10,133,176, 90,173,162, 14, 29, 58,196, 94,186,116, 41,124,204,152, + 49,252,244,244,116,164,164,164,192,106,181, 10,131,130,130, 46, 95,184,112,161,203,232,209,163,249,153,153,153, 72, 79, 79,191, + 89, 15, 71,234,107, 54,155, 33, 18,137, 80,187, 73,139, 97, 24,152, 76, 38, 8,133, 66,135,181,120, 60,222,144,144,144,144,203, +151, 46, 93,234, 54,126,252,120,193,249,243,231,145,149,149, 5,187,221, 46, 12, 13, 13,189,124,233,210,165,174,227,198,141, 19, +196,198,198, 66,171,213,194,209, 38,180,154,207, 93,186,116, 9,211,166, 77, 19, 30, 57,114,164,171,183,183,119,172,205,102, 19, + 2,192,229,203,151, 49,121,242,100,225,209,163, 71,187,181,110,221, 58,182,137,166, 68, 46, 0, 88,173, 86, 60,255,252,243, 50, +165, 82,137,204,204, 76,176, 44, 11,187,221, 14, 0, 40, 42, 41,186,124,233,114, 92,252, 19, 83, 30, 29,104,176,152, 76,167,207, + 69, 95,107,219,198,223,151, 97, 72,155, 38,170, 58, 65, 38,147,101,172, 92,185,242,213,180,180, 52, 81, 72, 72, 8, 39, 57, 57, + 25, 21, 21, 21, 16, 8, 4, 55,207, 49, 71,183, 91, 40, 20, 14, 10, 11, 11,227, 25,141, 70,176, 44, 11, 0,132,195,225,212,123, + 48,196,165, 39, 16,234,105,227, 75, 36,146, 65,119,229,142, 84, 30,230, 14, 22,195,210, 11,204, 34,145,139,175, 66,238, 29, 4, +100, 68, 33, 80, 45, 2,151,195, 21,159, 79,209,203, 0, 50, 12,126,133,238,206,105,178,195, 82,242,205, 34,171, 91, 71,121, 43, + 95, 63, 20, 21, 21,161,117,219, 16, 24,133,106,225,169,164, 74, 57, 24, 39, 53,255,162,127,135, 14, 29,188,218,183,111,143,194, +194, 66,116,235,214, 13,174,174,174,174, 0,134, 53,219,100,125,237, 47, 66, 57,250, 2,156,149,176, 51,239,193,202, 91,138,164, +130,110,100, 83, 55,254,189,100,178,148,114,225,153,157,187,190,243,113,247, 11, 5, 34,159,134,167,139, 8, 91, 94,232,230,166, + 86,137,246, 55,211,108,133,123,122,122, 30, 59,123,246,172,135, 88, 44,198,133, 11, 23, 16, 22, 22,134,213,171, 87,171, 93, 93, + 93,163,238, 17,179, 69,226,129,131, 31,199,198,126,189,253,198,141, 67,211,219,181, 27, 51, 45, 40,104,201,172,199, 31,127,230, +229,151, 95,198,242,229,203,177,127,255,126,244,237,219, 23, 51,103,206,180,102,100,100,108,107,230,247,124,182,114,229,202, 57, +115,231,206,173,171,105, 73, 79, 79,111,180,181, 37, 44, 44,204, 55, 49, 49, 49,123,222,188,121,221,182,111,223, 46,145, 74,165, + 40, 45, 45,197, 23, 95,124,129,133, 11, 23,130, 97, 24, 16, 66,240,213, 87, 95, 73,159,122,234,169,158, 55,110,220,200,246,247, +247,111,178, 91, 7, 33,132, 33,132,136, 1, 72,171, 23, 25, 0,233,206,157, 59, 85,227,199,143, 87, 86,151, 73,170, 23, 17, 40, +117,169,215,139,212,122, 86, 30,170,179,191,199,212, 45,171,251, 30, 33,100, 76, 99, 26, 78, 26,232,250,190, 47,178, 49,179, 85, +251, 9, 52,168, 94, 23, 9,116,246, 10, 8, 70,217, 47,187, 33,225, 49,144,112,171, 23, 30, 3, 78,242,101,180, 22,243, 97, 37, + 36,188,185, 70,171,102,225,243,249,208,235,245,176,219,237, 88,184,112,161,232,231,159,127,118,231,112, 56, 63, 52,165, 83,219, + 48, 37, 36, 36, 32, 52, 52,148, 57,120,240,160,231,236,217,179, 37, 53,223, 83, 86, 86,134,246,237,219, 51,135, 15, 31,214,188, +245,214, 91,242,198,204, 12,195, 48, 16, 8, 4,152, 59,119,174,228,220,185,115,110,173, 90,181, 66,114,114, 50,138,139,139, 33, +151,203, 49,119,238, 92,201,217,179,103,213,173, 90,181, 66, 90, 90, 26,202,202,202, 32,151,203,157, 54, 90, 2,129,224,150,117, + 24,134,129,197, 98,113,202, 24,168, 84,170, 29, 49, 49, 49,106,149, 74,133,216,216, 88,216,108, 54,168, 84, 42,204,153, 51, 71, + 18, 19, 19,163,118,113,113, 65,124,124, 60, 8, 33, 80, 42,149, 78,213, 17, 0, 88,150, 69,124,124, 60,218,180,105,131,168,168, + 40,205,172, 89,179,196, 53,229, 73, 73, 73,240,245,245, 69, 84, 84,148, 70, 38,147,237,104, 72,139,101, 89,228,230,230,226,202, +149, 43, 72, 78, 78, 70, 65, 65, 1, 10, 11, 11, 81, 81, 81, 1,155,205, 6, 0,144, 86,148, 71,238,252,254,224, 37,137, 68, 34, + 13, 11,234,224,119, 57,238,106,190, 68, 34,145,250,251,249, 5, 1,239,114, 26, 49,132, 63,164,167,167,187, 63,245,212, 83,130, +188,188, 60,148,148,148,128,199,227,221,118,110, 9,133,142,117, 5,178,217,108,161, 98,177,152,177, 88, 44, 55, 35, 96, 66,161, + 16,175,238,208, 35,108, 49,110, 89, 30, 95,147, 15, 98,183,194,108, 54,135,254,227, 79, 48,128, 1, 99,238, 0,134,233,118, 38, +185,210,173,255,152, 41, 2,164, 28, 1, 88, 43,192,225, 97, 80,103, 95,222,254,203,149,158, 32,232, 12, 19, 66, 8,105,122,228, + 23, 1, 24,192,210, 30, 96,122,252,156,104,115,239,251,240, 11,130,236,236,108, 8, 4, 2,136, 68, 34,116, 27,242, 8,111,231, + 37,171, 23, 24,116,129, 5,193,142,104,222, 18,118,148, 72,222,126,231,157,119,100,181, 53,159,121,230, 25,153, 74,165,122,167, +217, 38,171, 82,218, 7, 54, 50,247, 74,182,190,205,146,200,188,208, 27,249,134, 96, 16, 50, 15,176,118,189, 3,102,107,144, 72, + 36, 74, 1,208,175, 69, 38, 75, 33, 60,189,107,215,119, 62,110,173,171, 76, 22,108, 70,128, 47,129,151,218, 5, 91, 94, 29,236, +166,118,145, 56,107,182,194, 61, 61, 61,127, 59,115,230,140,135, 88, 44, 70, 76, 76, 12, 4, 2, 1,196, 98, 49, 58,117,234,132, + 77,155, 54,169,221,220,220,238, 41,179,181, 44, 54,118,235,210, 43, 87, 18,222, 12, 15, 15,153, 32,147,185,189, 52,109,154,234, +173,183,222, 58,116,224,192,129,175, 71,143, 30, 93,120,238,220,185, 79, 0,236,118, 54, 98, 6, 96,253,170, 85,171, 94,170, 49, +110,111,189,245,214, 87, 7, 14, 28, 88, 58,122,244,232,220,115,231,206,205, 3,176,190, 49, 1,157, 78,119, 96,209,162, 69,170, +135, 31,126,184,230,127,156, 56,113, 2,219,182,109,131, 76, 38,187,229,179,227,198,141,195,115,207, 61,231,106, 54,155, 27,125, + 38,105, 52,154,161,103,206,156, 9, 67,213, 0, 47, 81,141,209,138,139,139,115, 41, 47, 47,119,145,203,229, 46,222,222,222,138, + 26,179,245,240,195, 15,187,240,120,188,126,160,160, 41, 47, 82,219,232, 56, 82,214,220,207, 59,106,182,234, 20, 53,152, 67,235, + 22,163, 53,102,204,152,227,104, 96, 36,149,165, 88, 11, 17,236,144,112, 25, 72,185,181,204, 22, 88,240,202,242,193, 52, 99, 0, +111,125, 15, 67,161, 80, 8, 46,151, 11,179,217,140,162,162, 34,167, 76,129, 82,169,132, 92, 46,135,193, 96,128,205,102,131, 88, + 44,174, 49, 35, 80, 42,149,224,243,249,224,243,249, 16,139,197,183, 69,147,234, 70,115, 4, 2, 1,100, 50, 25,114,115,115,145, +158,158, 14,150,101, 33,151,203, 33,147,201, 32, 20, 10,145,147,147,131,156,156, 28, 16, 66, 32,147,201, 32,147,201,224, 76,135, +107,187,221, 94,239,195,223,106,181, 58, 21,209,178,217,108,184,118,237, 26, 50, 50, 50, 32, 22,139,111,110,171, 72, 36, 66, 82, + 82, 18,242,242,242, 32,149, 74,161, 84, 42,161, 82,169, 28,214,173,217, 22,133, 66, 1,137, 68,130,146,146, 18,232,245,250,155, +251, 84,169, 84, 66, 38,147,161,172,172, 12,249,249,249,141,110,187,221,110, 71, 78, 78, 14, 10, 10, 10,144,153,153,137,194,194, +194,155,102,171, 58,106,212,178,192, 78,121, 57,138,138,138,110, 70, 34, 27, 90, 28,129,101, 89, 84, 84, 84,224,204,153, 51, 12, +203,178, 40, 45, 45,101, 11,242,242,236, 47,230, 8,177,255,221, 13,228,187, 35, 23,141, 59,127,138, 49,236,253,237,138, 97,253, +222,203, 6,113,175,247,108,119,229, 54,244,121,184, 10, 86,254,240, 66,157, 85, 84, 96, 17,168, 60,195, 35,128,148,195, 0,135, + 7,136, 93,209,187, 99, 32,210, 75,236,178,235, 90,179, 24, 12, 70, 96,125,144,171, 67,154,118,254,176,130, 10,171, 40,205,162, + 86,134,118,238, 14,173, 86, 11,145, 72, 4,145, 72,132, 30,125, 35,144, 82,100,151, 94,205, 54, 72, 65, 48,220, 33,205,191,104, + 43,151,203,251,244,235,215,143,169,173, 57,106,212, 40, 48, 12,211, 9, 64,136, 83, 55,185,181,109,133,176, 72,123,131, 71,230, + 94,205,213,183,218, 31,103, 12, 26, 59,225, 17,183, 79,127,205, 15,189,150,103, 10, 0,177,206, 7,177,116,111,129,217, 26,168, + 80, 40, 14,173, 91,183, 46, 64, 44, 22, 31, 6,208,191, 57, 34,114, 9,119,227,219, 47, 77,241,113,173, 49, 89, 86, 61,192,147, + 0,124, 9,192,147,192, 75,227,129, 15,159, 27,230, 38, 21,243,247, 58, 97, 88,119,174, 95,191, 94, 93,215,100,213, 44,221,186, +117,195,226,197,139,213,110,110,110, 59,238,242,195,114,184, 74,165,218, 30, 17, 17,113, 38, 71,161,120, 46,183,123,119,225,111, + 42, 85,217,208,178, 50,149,127, 92,156, 37, 24,184, 12,224,243,172,172,172,145, 78,152,172,199,149, 74,101,204,208,161, 67, 45, + 10,133, 34, 99,245,234,213, 47,206,158, 61, 27,203,151, 47,199,162, 69,139,190, 0,240, 44,128,255,101,101,101,181,106,202,100, + 1, 64, 94, 94,222,212, 55,222,120,163,176,176,176, 16, 0,208,169, 83, 39,148,150,150, 98,193,130, 5,120,229,149,170, 65,177, + 93,187,118, 5, 33, 4, 90,173, 22, 43, 87,174,212,230,229,229, 61,217,196,189, 61,115,247,238,221, 61, 45, 22,139, 47,170,154, + 7, 69,165,165,165,202,226,226, 98,133,197, 98,145,177, 44, 43,115,113,113,145, 3,144, 62,241,196, 19,188,171, 87,175,134,218, +108,182,108,234,173,254,162, 49, 47,210, 28, 24,134,137,108, 73,228,170,190,136, 88, 3, 52, 30,209, 26, 51,102, 12, 83,251,245, +150,136, 17,131,216,140,232, 40,184,133,119,191, 37,154, 37,229, 50,144, 40, 85, 72,201, 76,135, 0,204,149, 59,101,180, 74, 74, + 74,240,226,139, 47, 26,166, 78,157, 90,196,178,236, 35,142,154, 2,149, 74, 5,149, 74,133,171, 87,175,146,137, 19, 39,106, 87, +175, 94,109,168,109,180, 18, 18, 18,200,240,225,195,243,223,121,231, 29, 93, 99, 70,171, 38,162,181,108,217, 50,195,160, 65,131, + 10,174, 92,185, 66,106,204,148, 92, 46,199,202,149, 43, 13,131, 7, 15,214,158, 63,127,158,212,148, 57, 19,209,226,112, 56, 55, +141, 86,237,117, 56, 28, 14, 88,150,117,202,104, 85, 86, 86, 78, 29, 61,122,180, 54, 62, 62,158,212,108,167, 74,165,194,234,213, +171, 13,195,134, 13,211, 94,185,114,133,212,148, 41,149, 74,135,205, 96,205,247, 43, 20, 10, 40,149, 74, 92,189,122,149, 12, 31, + 62, 92,187,118,237, 90, 99,237,242,107,215,174,145,113,227,198,105, 43, 42, 42,166, 54,102, 94,106,154,243,108, 54, 27,140, 70, + 35, 10, 11, 11,145,153,153,121,179,233,208, 32, 83,142,156,242,216,216, 46, 6,131, 65,127, 53, 33, 49,163, 83,199, 48,141,193, + 96,208,167,103,100, 36, 0,239,178,141,104, 63, 18, 30, 30, 94,244,226,139, 47, 26, 74, 74, 74, 90,108,180,132, 66, 97, 60,143, +199, 35,253,251,247, 39,102,179,153,100,102,102, 90, 11, 75, 74,108, 33, 31,125, 68,174,188,250, 42, 35,137,142, 22,201,229,114, +166, 90,147,147,156,156,204, 74, 36,146,248,127,252, 78,196, 97,189,192,144,126,127, 38,234, 92,134,141,157, 44,100,242,206, 1, + 22, 29, 32,114, 5, 68,174,224,201,220,241, 80,255,174,220,173,103,202,189, 64,216, 7, 33, 16,249, 54,169,201, 39,158, 0,219, +255,151, 4,163,107,191, 73,115,132,197,197,197,224,114,185, 55, 77,145, 84, 38,195,208, 9, 79,112,190, 58,103,242, 2, 72, 95, + 48, 92, 95, 39,174,245,215,223,126,251,109, 65, 73, 73, 9, 56, 28,206, 95,154, 82, 41,102,205,154, 37, 82, 42,149,139, 28,190, +249,237, 14, 21,128, 47,234, 13,144, 87,174,231, 25, 91, 29,184,108, 8,158,191,108,139, 36,188,107, 79, 60, 63, 72, 35, 89, 22, +153, 31,126, 41,211, 16, 8,216, 95,133,205,220,163, 25,102,171,191, 66,161,136,140,142,142,150,142, 26, 53, 10, 43, 87,174,148, + 73, 36,146,195,205,185,241, 87,234,236,179,223, 95,251,141, 54,246,147, 17,128,165,178,202, 96,213, 90,242,117, 44, 22,111, 57, + 86,102,181,146, 41,142,106, 26, 12,134, 25,207, 62,251,108,209,222,189,123,111, 51, 89, 98,177, 24,169,169,169, 88,178,100, 73, +113,113,113,241,147,119,211,100,205,158, 61,123, 73, 86, 86, 86,240, 47,191,252,194, 43, 40, 40,208,172,250,242,203,178, 61,101, +101,197, 75,227,226,174,255,175, 99,199, 14,111,118,238,252,100, 35,169, 31,234, 53, 89, 47,189,244,210,206,172,172,172,110,191, +254,250, 43,191,160,160,192,247,165,151, 94,194,138, 21, 43,176,104,209,162, 77, 0,158,135, 99, 3, 94,254, 10, 32, 88, 44,215, + 75, 74, 74,198,140, 24, 49,162,180,164,164, 4,157, 59,119,198,216,177, 99,225,229,229,133, 86,173, 90, 97,252,248,241, 8, 10, + 10, 66, 81, 81, 17,166, 76,153, 82, 92, 80, 80, 48, 2, 64,114, 99,154, 69, 69, 69, 55,118,236,216,145, 48,103,206,156,110, 89, + 89, 89,161, 0,220, 43, 42, 42,100, 21, 21, 21, 34,179,217, 44,113,117,117,117,237,218,181,171,199,204,153, 51,229, 23, 47, 94, + 12,205,202,202,210, 1, 72,167,246,234,166,201,106,208,139, 0, 40,168, 54, 60,230, 58,175, 5, 77,188,231,232,186,245,254,237, +192,231,234,154,173,218,203,109, 77,135,245,159,140,192,226,109,187,183, 26,133,126,237,161, 10,238, 2,169, 88, 12,137, 80, 8, +137,171, 59, 76, 44,139, 47, 83,243,244,149,132, 44,114,118,135,214,125, 16, 50, 12,131,207, 62,251,204,214,167, 79, 31,227,177, + 99,199,214, 25, 12, 6, 63, 0,251,156, 49, 5,107,215,174,213,207,157, 59,247, 82,126,126,126, 23,177, 88,108,174, 41, 95,183, +110,157,254,137, 39,158,136,203,202,202,234, 38,149, 74,245, 13,245,207,170,109,180, 68, 34,145, 41, 63, 63,191,231, 51,207, 60, + 19,255,249,231,159, 87, 74,165, 82,200,100, 50,136, 68, 34,115,126,126,126,151, 23, 95,124,241,210,138, 21, 43,244, 18,137, 4, + 50,153,204,169,102, 57, 66,200,109,134,170,118,185,163,216,108,182, 99,249,249,249, 93,230,206,157,123,241,211, 79, 63,173,172, + 49, 64,181,235,184,106,213, 42,189, 92, 46,119, 42,162, 85,243, 57,153, 76,134, 53,107,214,232,231,204,153,115, 41, 63, 63,191, +139, 72, 36, 50,215, 42,175,156, 61,123,246,197,252,252,252, 46, 54,155,237, 88, 35,191,240,236,229,229,229,224,241,120,136,139, +139, 51, 9, 4, 2,112, 56, 28, 36, 37, 37,221, 52, 90,110,110,110, 97, 93, 58,117, 12,249,102,231,238,227, 18,129, 72,212,167, +103,143,208,228,180,244, 44, 66,152,180, 38,170,186,207, 96, 48,248, 29, 59,118,108, 93,159, 62,125,140,159,125,246,153,173,161, +200,150, 35,152, 76,166,227, 23, 46, 92,176,138,197, 98, 38, 55, 55,215,198,229,114, 97,183,219,137,169,103, 79, 83,167, 79, 63, + 37, 87,223,124,147, 81,202,100, 60,129, 64, 0,169, 84,202, 28, 57,114,196,172,215,235,143,255,243, 70, 11, 82, 48,144, 36,230, +155, 20, 98,142,141, 65,194,190, 42,147, 37,118, 1,196,174,128,216, 21, 62, 62,190, 56,151,170, 87,128, 3, 33,236, 14,228, 16, + 35, 68, 6, 6,210, 56, 45, 20,124,161,132,201,203,203,187,105,136,106,150,128,246,161,184,144,174,147,131, 33, 34,112,225, 76, + 10,146, 49,238,238,238,188,220,220,220,219, 52,195,194,194,184, 86,171,213,241,212, 46, 57,118,111,128,125, 41, 33,207,232,253, +227,165,202,224, 87,151,126, 37,145,216, 75,129,232,181, 8,111,219, 10,175, 78,234, 42,124,235, 64, 65,248,249, 52,125, 91,112, +201,243, 96,117,106, 39,234,217, 79,161, 80, 28, 62,127,254,188, 84,161, 80, 32, 57, 57, 25, 61,123,246,196,230,205,155,165, 82, +169,244, 39, 0, 78,245,199, 59,171, 69,186,174,194,222,231,245,221, 25,121,177,185,182, 91, 76, 86, 65, 37,193,179, 31, 31, 40, + 45, 41, 55, 62,114, 38,179,225,235,167, 30, 46,150,150,150, 14, 95,180,104, 81, 81, 65, 65,193, 45, 38, 43, 61, 61,189,198, 16, + 12, 2,112,229,110, 61, 44, 85, 42,213,180,165, 75,151,226,252,249,243, 24, 53,106, 20,162,162,162, 80, 92, 92,140, 93,135, 15, + 39,238, 72, 76,252, 95, 77,159,173, 6, 82, 63,212,139, 82,169,156,191,116,233, 82, 68, 71, 71,223,212, 44, 42, 42,194,210,165, + 75,179, 0,188,224,172,201,170, 33, 63, 63,255,220,245,235,215, 71,116,238,220,249,218,186,117,235,178,188,189,189,217,153, 51, +103,226,217,103,159,133, 90,173,182,175, 89,179, 38,163,127,255,254,113, 55,110,220,136,208,235,245,151, 29,249, 45, 80, 88, 88, +120,106,243,230,205,103,134, 12, 25, 34,157, 49, 99,134,122,255,254,253,238,122,189,190,149, 72, 36,210,152,205,102,225,181,107, +215,184,123,246,236,241,186,122,245,106,170,209,104, 60,215,220,186,255,215, 96, 24,230, 60,195, 48,145, 12,195,252, 90,231,245, +124, 99,239, 57,177,110, 67,127, 55,250,185, 58,213,220, 92,103,113,156,105,109,241,238,172,142, 10,253,169,233,189, 73,222,204, +126, 68, 59, 57,148,156, 24,232, 70,158,105,199, 84,206,104,102,122, 7,131,193,112,115,217,187,119, 47,241,242,242,170, 84, 40, + 20, 78,167,119,240,242,242,210,150,151,151,147, 7, 30,120,160, 88,173, 86,223, 76, 69,224,237,237,173,173,172,172, 36,189,123, +247, 46,214,104, 52, 55,211, 59,248,250,250,102, 18, 66,136,191,191,127, 78, 67,122, 54,155,141,120,121,121,213,140,208,227,187, +185,185,109,232,213,171, 87,177, 86,171, 37,222,222,222, 55, 83, 39,168,213,234,149, 61,123,246,172, 91,222, 84,125, 51,179,178, +178, 72, 86, 86, 22,105,221,186,117, 78,237,242,244,244,116,146,158,158, 78,124,125,125,157, 78,239,160, 86,171, 87,212, 83,151, +102,213,209,207,207, 79,107, 48, 24,200,131, 15, 62,120,203, 62,245,243,243,211, 26,141,198,154,114,135,210, 59, 72, 36,146,231, +197, 98,113,142, 88, 44,206, 17,137, 68, 75,218,180,105,147,255,253,247,223,147, 53,107,214,212, 12, 73,135, 58,108, 92,159,246, + 15, 62,249, 63,117,216,248,249, 45, 73,239,160, 80, 40,126,243,242,242,170,220,187,119,239, 45,231,151,193, 96,112, 56,189,131, + 68, 34,201,210,233,116,172, 86,171,181,158, 60,121, 82, 31, 29, 29,173,143,139,139,211,167,166,166, 26,138,242,243, 45, 90,173, +214, 80, 86, 86,102,186,116,233,146, 73, 42,189, 59,233, 29,200,230,160,246,100, 67,200,129, 27,239, 7, 92,157, 59, 64,106,188, +252, 97, 23, 66,126,120,152,144,159,158, 37,228,216,235,228,220,166,153,228,193, 0,145,253,228,130,214, 9,100, 99,240,143,142, +164,100, 32,155, 59,181, 39, 27, 66,126, 74,124, 47,224,234,140,254,173,140, 95,126,190,134,156, 61,123,150,196,197,197,145,228, +228,100,242,211,190,239,201,131,109,165, 85,154, 27, 66, 14, 56,153,230,161,175, 72, 36,210,173, 94,189,154,156, 57,115,230,166, +230,129, 3, 7,136, 84, 42,213, 3,142,141, 90, 38, 0, 67, 54,132, 77,176,125, 30,252,231, 91,195,228, 21, 69,135, 94, 39,228, +242, 86, 66, 54,135, 19,242,117, 47, 66,190, 31, 77,200,193, 39,201,153, 53,147, 72,223, 0,129,149,108, 12,142, 34,155,194, 28, +238,108,207,231,243,203,247,238,221, 75,114,114,114, 72, 84, 84, 20,137,142,142, 38,241,241,241, 36, 35, 35,131, 68, 70, 70, 18, + 62,159,111, 68, 51,166, 45,235,229, 9,255,136, 14,130,220, 75,203,250, 18,178,127, 10, 41,216, 49,141,140,233,168, 40,238,221, +186, 69,249,232,186,186,187,187, 23, 70, 70, 70,146,212,212, 84,114,252,248,113,162,209,104, 10, 1,132,223,237, 7, 98, 68, 68, +196, 89, 66, 72,204,168, 81,163, 98, 0, 28,137,136,136,136, 73, 73, 73,137,233,217,179,231, 25, 52,158,250,161, 65,134, 14, 29, +106, 33,132,144, 81,163, 70, 17, 0, 57, 17, 17, 17, 36, 37, 37,133,244,236,217,211,124,135,170,205, 5,240, 36,159,207,255,210, +205,205,237,119, 87, 87,215, 99, 92, 46,119, 51,128,233,104,126, 62, 46, 46,128, 86, 0,194, 0,244,168, 94, 66,171,203,232,136, + 67,202,237, 76, 10, 64,223,167,218, 50,199,167, 6,162, 98, 74, 32,116, 79,183, 99, 28, 73, 88, 26,209,144,209, 98, 89,150, 36, + 36, 36,144,193,131, 7, 87,202,100,178,108, 56,158,176,244, 22, 77, 15, 15,143,104,141, 70,115, 91, 18,205, 90,229,183, 36, 44, +213,104, 52,167,188,189,189,181,106,181,250, 66,125,154, 30, 30, 30,209,222,222,222, 90, 15, 15,143, 91,146,123,114,185,220, 81, + 30, 30, 30,217,117,203,121, 60,222, 16,141, 70,147, 89,183,188,129,109,135,151,151, 87,102, 78, 78, 14, 41, 40, 40, 32,126,126, +126, 57,117, 13, 88, 94, 94,222, 45, 6,204, 17,205,166,234,210, 72, 29,235,213,116, 96,159, 54,231,184,215, 16,228,227,227,147, +191,106,213, 42, 34,151,203,243,107,191, 17, 60,224,233,183,207, 38,234,202,159,125, 99,195,247,245, 36, 44,117, 52, 57,232, 8, +153, 76,150, 61,120,240,224,202,132,132, 4,194,178, 44, 97, 89,182, 33,163, 85,159,230,200, 30, 61,122, 20, 21, 22, 22,218, 43, + 42, 42,108,153,153,153,166,148,148, 20,195,135, 31,126,104, 41, 40, 40, 48,234,116, 58,115,108,108,172,201,219,219,187, 0,192, + 72,103,143, 81,115,159, 93,117,155,207,200,166,208,190,100, 99,104,100,252, 59,254,215,158,236, 37, 51,197,172, 26, 69,200,177, +215,201,153, 13,207,146, 62, 1,194, 42, 67,180, 41,228, 48,249, 42,104, 0, 89,219, 86,232,144,230,151,237,250,147, 77, 33,135, +175, 46,246,191,246,112,119,181,121,231,214, 77, 36, 41, 41,137, 28,216,179,131,244, 14,172, 54, 89, 27, 67,127, 38, 27, 66, 7, + 59,162, 89,159,217,218,178,101, 11, 73, 74, 74, 34, 63,254,248,163,163, 38, 43,162, 62,163,181, 48, 66, 94,250,108, 47,177,105, + 74, 87,161,121,124,184,192, 50,188,189,192,246,160, 63,207,222,197,155,195,134,170, 65,134, 7, 75, 76,100, 99,112, 20,217, 24, + 58,194,209,122, 10,133,194, 12,212,202,169, 83,119, 17,137, 68, 5,141, 24,173,136, 38,205, 86,144, 40,247,183,247,135,144,177, +157, 21, 69, 14,154,172,166,206,165,174, 30, 30, 30,133, 95,127,253, 53,241,244,244, 44,112,208,100,253,237,231,167, 74,165,218, +174,211,233, 98,142, 30, 61, 26, 19, 17, 17, 17,179,125,251,246,152, 19, 39, 78,196, 72,165,210,237, 53,193,137,186,102, 43,244, +246,251,127, 68,157,136, 86, 76, 69, 69, 5, 57,122,244, 40,137,136,136, 32,219,183,111, 39, 39, 78,156, 32, 82,169, 52,166,185, +245,252, 59,182,157,106,254,167,153,137, 6,154, 14,255,246, 31, 55,245, 25, 45,163,209, 72, 22, 44, 88, 96, 22,139,197,122,129, + 64,224,236, 20, 60,247,245, 73,232,225,225,113,202,211,211, 83,235,233,233,121,139,217,171, 93,238,225,225,113,225, 95,126, 1, + 6, 9, 4,130,116, 62,159,127,235, 20, 60, 97,227,250,180,235, 59, 99,145,103,248,184,135, 90, 88, 79,129, 64, 32, 88, 40, 22, +139,245, 11, 22, 44, 48,235,116, 58,103,140, 22, 0, 12,147, 74,165,217,219,182,109, 51, 36, 38, 38, 90,139,139,139,109,103,207, +158,181, 70, 71, 71,155,223,125,247,221, 10,169, 84,154,141,134,211, 18,252, 35,251,147,172,109, 43,172, 49, 91,151, 23,249,199, +143,237, 40,181,108,158, 55,156,244,105, 83,199,100, 53,156,201,189,126,205,106,179,117,241, 45,191,248,193, 65,114,219,210, 69, +175,146,222,129,146, 91, 77,150, 19,154,117,205,150, 84, 42,173,120,231,157,119,156,137,100,221,106, 8,191, 12,246, 35,155, 66, +182, 87,153,168, 38,150, 13,193, 95,144,207,130,253,238,149,235,168,151, 39,252,135, 6,137,174, 56, 17,201,114,164,158, 93, 93, + 93, 93,175, 57, 17,201,250, 39,182,125,248,172, 89,179, 98, 82, 82, 82, 98,146,147,147, 99, 78,156, 56, 17, 51, 97,194,132, 24, + 0,195,107,125,230,166,217,178, 76,156,104,234,202,225,188,218,132,230,227,179,102,205, 34, 41, 41, 41, 36, 57, 57,153,156, 56, +113,130, 76,152, 48,129,192,185,233,123,168, 41,162, 70,235,174,240,119, 79,248, 25, 1,224,215,218, 5, 98,177, 88,107, 52, 26, +213,114,185,124,159, 78,167,155,131,170, 97,145, 45,210,252, 59,234, 73, 53,255, 21,154,222,114,185,124,157, 78,167,155, 32, 22, +139, 11,140, 70,163,167, 19,154, 46, 34,145,232, 85,177, 88, 60, 88,175,215, 7, 1,128, 76, 38, 75, 48,153, 76,191, 27, 12,134, + 79, 0,148,222,237,109, 39,107,219, 10, 33, 20,246, 0,193,155, 49, 25,149,129, 75,143, 22,251,207, 27,226,154,241, 96, 59, 89, + 42,248,236,199, 96, 76,231,152,167,210, 77, 78,107, 74,152,158,176,243,223, 60,151,166,111,243,241, 47, 21,254,243, 7,203, 51, + 30,108, 43,207, 0,193,199, 16,233, 79, 59,171, 89,215,108,201,100,178,109,149,149,149,207, 1,248,221,217,109, 39,187, 67, 5, +168,180,250,192,202,237, 8,210,200, 20, 62,132,232,193,225,198, 33, 15, 90,230,221,107, 22,122, 29,253,227,154,195,229,114,249, +180,144,144,144,182, 87,175, 94, 77,214,235,245,223, 2,248,185,238,243, 39, 4, 24, 44,229,241,186, 24,108,182,168,107, 64,116, + 19,154,143,203,229,242,249, 33, 33, 33,225, 87,175, 94,189,162,215,235, 87, 1,216, 69,143,209,191, 74,243, 95,201, 63,158, 69, +185,230, 97,167,211,233,232,222,167,252,221,228,234,116,186,137,213,231,157,179,235,150,154, 76,166,197, 38,147,105,113,205, 15, +146,146,146,146,123,170,211, 42,243,114,178,153,172,109, 27, 13,161,112, 89,119, 63,201,156,189,179, 36,122, 16, 38, 11,124,118, + 77, 19, 38,171, 41,205,115,144, 88,151,245,244,151,188,242,227,243, 18, 61, 8,242, 64,240, 73, 19, 38,203, 81, 78, 86, 86, 86, + 6, 54,123,155, 31,189,102, 1,144, 74,128, 52,188,219,200, 15,197,119, 65, 24,218,201,248,110,242,179, 78,167,251,249,220,185, +115,141,125,134,196,103, 89, 53, 32, 0, 0, 32, 0, 73, 68, 65, 84, 3,199, 96,115,120, 48,192, 46,157, 78,183,171, 9, 77, 10, +133, 26, 45, 10,229, 62,228,158,125, 96, 51, 47, 39,155,201,238,208,243, 40,228, 46, 0, 7,129,128, 45, 29,149,182, 60,230,229, +116,115, 11, 53,207,162,144,153, 11, 46,130, 32,180,221,128,206,156,199,188,144,110,190,103,182, 27, 32,120,151, 26, 41, 10,133, +114,207, 48, 19,183,142, 52,188,249, 63, 53, 90, 20,202,125, 78,117,148, 39,171,122,185,103, 53, 41, 20, 10,229, 63,104,184,192, +160,225, 14,109,206,180,189, 54,167, 83,220,175, 84,179, 89,154, 92, 0, 42, 0, 46,168,154,198,161,102,152,112, 83,105, 54, 30, + 2, 96,165,251,147,106, 82, 77,170, 73, 53,169,230, 93,214,108, 74,251,126,236,251, 85,223, 40,195,205,255,196, 23,211, 17, 25, +119,150, 17,255,154,109, 39,232, 2,130, 53,213, 75, 23,122,220,169, 38,213,164,154, 84,243, 63,175,249,175,132, 54, 29,222, 95, +136,239,219,154, 19,226, 13,160, 38,201,101, 28,140, 76, 8,196,152, 11, 0,168,192, 5, 66,144, 8,160, 99,245,251,153, 12,227, +244,104, 84, 10,133, 66,161, 80,238, 22,221, 0, 92, 0,224, 13, 96, 52,128, 72, 84,103, 85,184,171, 70, 75,226,222,193, 27, 60, + 78,103,134, 37, 33, 0, 64, 56, 76, 60,108,108,172,161, 40,177,197, 15, 89,121,171, 32, 55, 2,225,110, 6,230, 71,117, 57, 9, +197, 45,213,235, 24,164,156,232,233,161,152,150, 87, 84,182,237,202,117,221,126,103,214, 85,169,252, 85, 98, 55,215, 73, 38,139, +181,163, 80, 32,200,176,148,150,111, 46, 41, 73,174,104, 70, 53,220, 26,123,243,221,119, 9,115, 40,247, 2, 35,144, 90, 56,238, + 74, 1,163,131,142,232,114,229,108, 64,105, 42,217,179,231, 81,226,236,177, 97, 56, 24, 36, 83, 40,186,139,196,210,158, 82,133, +107, 7,150, 0,197,218,236, 52,179,213,118,194,110,214,199, 16, 22,127, 56,113,172,158, 0,176, 20, 0, 48,100,200,175,232, 8, + 37, 62,169,169, 56, 94, 24,114, 25, 79, 28, 59,134,154,228,178, 11, 1, 44,163,215, 45,133, 66,161, 80,238, 51,163, 53, 26, 85, + 77,134, 77,119,134,247, 15,235,119, 94, 44,150, 4, 0, 0, 75, 8, 88, 2, 84,150,151,198,228, 37, 71,143, 0, 0,143, 54,221, +142,242,197,202,238, 44,169,122,223,206, 2, 54,139, 49,181, 60,253,236, 3,142,212, 72,166, 14,122,120, 72,196,208,137, 99,198, +140, 14,238,212,177, 83, 59, 0,184, 28,119,249,198,161, 67,145,215,143,253,202,236,173, 44, 72,248,177, 69, 1, 20,136, 63,232, +209,163,107,191,232,232, 11,239, 3,120,169,165,123,208,221, 93, 62,231,231, 31, 22, 12, 24, 58,113,165, 12,112,206,104,137,221, + 92, 39,141, 31, 59,178,235,107, 47,207,226, 60,187,224,163,128,243, 39,255, 88, 46,247, 14, 47, 37,172,245,231, 74,237,228, 63, + 27,155, 56,185,174,127,108,200, 96,125, 91,124,132,179,230,235, 62,174,134,226, 27,147, 9,107,159,204, 48, 12,184, 66,233, 30, +117,219,126,223,187, 12,154, 87, 2,192,225, 17, 99, 74,239,176, 8,141,183,239,222,201, 79,191, 42,150,170, 60,121,224, 10, 0, + 48,200, 73,187,134, 99,187,150,186,190,242,222,150,110, 39, 99,211,109,191,253,176,222,200, 8,248, 19,245,185, 87,155,110, 79, + 79, 79,119,129,191,127,213,223, 95,124,241, 54, 2, 2, 47,163,170,175, 25,176, 26,101,223,228,160, 35, 80,101,180,210,210,224, + 74,175, 89, 10,133, 66,161,220, 71, 68, 86,155,171,200,186,111, 52,104,180,196, 98, 73,192,153, 63, 14,185,253,120, 34, 19, 0, + 16,209,205, 11,255,251,112,221,240,237,107,163,175, 3, 64,159, 33, 99,130,222, 95,248, 50, 78, 93,201, 7, 33, 4, 93,219,187, +227,161,241,143, 58,102, 60, 60, 67, 31,152, 52,233,145,169, 11, 22,204, 31,151,148,148,148,182,115,231,206, 63, 1,160,255,128, + 1,237, 63,250,232,163,199, 86,186,186,137,190,219,243, 67,182, 81,123,237,124,115,182, 86,220,170,173, 79,112,135,192,105,223, +125,181,142, 51,104,196, 35, 83,210, 80,185,212,152,147,156,237,200,186, 30, 30, 30,115,249,124,190, 10, 0, 88,246, 47,255, 99, +177, 16, 47, 0,176,217, 89,133,107,171,224, 10,174, 64,108, 23,137, 4, 87, 43,116,186,109,229,217,215,190,108, 76,211,100,181, +134,191,242,194, 83,156,139,201, 69, 8, 8,239,207, 93,179,244, 45,176,118,171,235,171, 11, 63,156, 20,125,246, 59, 84,106,113, +220,193, 77,227,215, 45,240,241,233,205,253, 96,169,124, 24,195,224, 73,255, 62, 79, 79,120,127,235, 30,126,143,246, 74,152,172, + 44, 14,199, 20,245,217,240,201, 7, 43, 78,110, 24,125, 16,192, 38, 0,191, 1,104,210,212,185,185,187,125, 59,119,209, 39,242, + 74,243, 95,105,138,170, 77, 22,190,216,182, 27,151, 50, 89,132, 4,135,240,188,230, 46,151,111,250,112,230, 86,125,213,220, 93, +245,217,221,182, 0,250, 2,241,110,120,254,189,161,248,102,217, 18,104, 52,149, 80, 40, 50,192,192, 19, 64,135,234, 15, 38, 10, + 11,145, 9, 96, 97,126, 62,100,239,207,194,136,139,192, 27, 93,128,124, 0, 39, 25, 32,153, 94,195, 20, 10,133, 66,185,135,201, +197,173,157,223, 55, 55,105,180, 0, 64, 46,225,225,122, 74, 30, 0,192, 69, 2,204,121,126, 6,138, 10, 11,130,204, 54, 22, 79, +207,152,142, 11,241,185,184,158, 90, 0, 66, 8,130,124,165, 14,215,134, 11,182,199,211,207, 60, 61,240,232,207, 63,159,123,123, +209,219,223, 48, 12, 78, 3,192,166,205, 95,244, 89,252,206,226,231,166,207,152, 62,108,207,158, 61, 87, 0, 52,203,104,241, 24, +197,186, 21,203,150, 8,179, 10,141,198,185, 11,222,100,231,207,155,187, 6,192, 35, 14, 57, 25, 62, 95,149,149,149, 37,231,112, +110,157, 71,244,227, 37,111, 70, 13,155,184, 50, 49, 45,163,244,226,209, 3, 7, 30, 8, 11, 11, 67, 86,118, 94,223,229,159,110, +236,114,248,168,228,169,138,114,195, 68,125,225,181,122, 39,109, 22,241,249, 87,222, 91,190,161, 43,235,210,158,243,191,231, 70, + 33,188, 93, 43,100,231,151, 98,192,136,113,188,152,243,231,135, 3, 14, 27,173,186, 9, 26, 39,153,217,252, 46, 31,109, 59, 59, +116,194,131,173,122,112, 56, 92,232, 12, 86, 20,148,153, 96,103,129,254,161, 42,140,220,254, 41,175,184,210,250,240,135, 63,100, + 62,124,122,237, 24,173,177, 44,103, 54,128,189,141,127, 13,113,243,213, 40,113, 61,179,162, 94,147, 85,105,180, 1, 0, 4, 92, + 59, 24, 16,247, 70,132,250, 2,248, 26, 8, 1,126,153, 61, 21,158,158, 59, 61, 61, 61, 39,105, 60,189, 98,130,166, 62,197,248, + 4,132, 42,116, 6, 11,174, 94,185, 92, 17,214, 61,142, 84, 20,231,191,106,172, 44,217,115, 13,136, 11, 1,190,175,214,120, 10, +212,104, 81, 40, 20, 10,229,222,166,193, 81,135, 60, 0, 56,116,232, 16, 25, 51,102,204,109, 89,150,237,118,130,235,169, 85, 93, +112,184, 92, 46, 70,247,107,143, 53,203,223,131,193,108,195,165,148, 50,252,120, 42, 19,230,202, 82, 16, 66, 80, 24,174,169,239, +139,111,105, 82, 90,185, 84,210,141, 43,226, 79, 62,121, 86,214,198,205,213,213, 53,241,202, 55,149,139,231,105, 67,121,196, 18, +243,225,199,237, 83, 4,110,188, 7,119,239,254, 62,108,236,152, 49, 66,185, 92,241, 58,225,117,241,229, 87,146,249,101,101,177, +101, 13,105,214, 69,162, 9, 25, 55,110,244,200, 33, 94, 94,158,236,212,143,206,198,175,155,221,205,175, 67,251, 14,125,175, 91, + 13,227, 12,249,137, 7, 26, 88,237,166, 38,203,178,224,112, 56,208,106,181,176,219,237, 48,153, 76,176, 90,173,200,204, 76,211, +178,132,248,218,193,114,188,189,125,193,227, 9, 17,208,198, 31, 27,214, 44,149,110,255,238, 64,207, 55,222,254, 96,191,190, 16, +189,241, 87,114,203,155,154,198,226,146, 61, 63, 29,249, 89, 77,112,172,213,255,158, 27,197,205, 47,209,225,216,249, 36, 92,184, +154,233,236,129,172,155,194,161, 77,118,122, 82,249,202,149, 43,185,239, 31, 78,202, 28,242,208, 35,118,255,118,157,219,152,236, + 4, 0, 3,145,128, 7, 1,143, 3,127,181, 24,251,222,236,136,179,227, 99, 61,135,119, 83,127, 66, 8,217,219,216,254, 52,153, +172,246,126, 33, 50,110,151,182, 42,196,222, 40,193,185,195,167, 49,119,209, 39,136, 78, 49,161, 66,167, 7, 99, 55,129, 75, 76, + 40, 76, 79,134,205,110, 39, 77, 29,247, 42,186,149, 0,128, 72, 36, 90,248,227,193, 35,173, 76,172, 24,121,165, 38,104, 75, 76, +104,223,123,162, 44, 61,187, 0, 95,191,247,216, 66, 0,123, 66,128, 10,199, 52, 91, 12,213,164,154, 84,147,106, 82,205,123, 68, +179, 33, 47,114,159,208, 96, 42, 7, 78, 99,107,221,200, 44,198,245,148, 60,116, 15,241, 65,187, 54,222, 56,151, 80,130,111,143, +101, 98,203,209,116, 28,187, 84, 0,150,167, 64, 94, 57,144,152,166, 69, 98,122, 97,147,249,179,185, 34,254,228, 87, 94, 41, 91, +208, 41,172,188,247, 31,135,231,192, 71,157, 24,246,198, 27,165,115,184, 34,254,100,215,214,138,157,111, 46,120,117,154, 66, 42, + 21,154, 77,102,180, 13,244, 23,191, 60,123,206, 83,140,171,104,167,163, 91,169,240, 9,117, 21, 73, 36, 95,126,248,238,235,162, + 79,126, 76,204,168, 52,163,114,239,105,109,242,252, 55, 23, 23,243,248,226, 13, 10,159, 80,135,251,254, 88,173, 86,152, 76, 38, +152,205,102, 88, 44, 22,100,103, 94, 27,247,219,143,175,141, 8,108,237, 54, 66, 36, 22,131, 0, 40, 55,216,144,146,171,199,224, +161,195,184,221,187,117, 11,151,123,135, 62, 83,159, 86, 89, 89,122, 25, 75,184,138, 67,251,118,112,191,255,229, 34,190, 57,116, + 30,251,127,191,136,115,199, 15,219, 8,107,189, 57,255,151,220,187,125,144,220,187, 83,186,188, 85,103,237,205,197,167, 99,116, +163,251,148,203, 33,131,135, 70,252,250,252, 75, 47,255,161,175, 40,202,255,114,221,123,217, 5, 57,105,215, 68, 2,198, 38, 21, +113,161, 51,218,176,245,183, 28, 76, 90,122, 9, 87, 51,116, 32,132, 52, 57,129, 55, 11,204,155,252,204,107,118,171,197,130, 96, + 63, 57,118,108, 94,134,113,131,187, 96, 72, 39, 87, 60,208, 78, 6, 41,207,132, 43,241,215,177,107,199, 86, 27,203,114,230, 55, +113, 33,142,172, 94, 98, 0, 64,167,211,189,246,198,235,243, 11,204, 54, 22, 22, 43, 11, 75,245,235,111,187, 62, 46,176, 27,245, +175, 85,175, 23, 83,107, 61, 58,151, 22,133, 66,161, 80,238,135,136, 86,205,226, 93,251,141, 6,155, 14,141, 70, 67,234, 35,147, +167,195, 91,227, 37, 31, 63,232, 73, 65,204,141, 82, 20,228,166, 35, 41, 33, 14,122,163, 21, 2,215, 64, 64,236,133, 54, 1,254, +136,189,190,223,178,118, 69,164,142,181,153, 82, 27,210, 27, 55,206,219, 55, 41,158,225,172, 88,238,119, 38,225,122, 73,247, 29, +139,190,198,212,169,114,143, 21,203,253,206,164, 37,203, 56, 82, 49,121,240,169, 25, 83, 24, 14, 67,240,198, 27, 11, 48,126,204, + 72, 60,253,212, 19,204,182,109, 91,123,151, 58,184,149, 44,248,159, 45,124,235, 61,161,182,212,102, 62,151,160, 51, 73,101, 18, +201,201, 68, 93,101,120,128,159,100,212,196, 39,115, 34,119,127,249, 9,128, 25,142,104,213, 24, 44,171,213, 10,139,197, 2, 0, +118, 0,224,112,170, 94,139, 42,204,200, 47, 53, 65, 91,106,130,205,206, 98,226,228, 25,146,243,209,151,102, 0,104,160,191, 22, +203, 90,109, 86,236,253,229, 2,178,207,239, 97, 25, 14,183,172, 86,103,120,200,189,219, 7,121,121,249, 69,141,153,248,132, 90, + 40,174,106,134,173,168, 52, 97,219,198,229,141,214,147,195, 48,132,181,219, 74,109, 86,107,101,219,192,182,217, 33, 97, 93,196, + 39,254, 56, 58,238,228,175,123,117,182,182, 79,184,220, 72,203, 5,151, 47, 2, 87, 32,134,201,226,216,192, 67,109,210,153,245, + 0,152,103, 94, 92,176,230,213,215,254,199,157,183,246, 79,152,141,122,152, 12,149, 40, 47, 43,129,132,103,197,149, 83, 7,108, +196,110,125,181, 50,247,226,250,134,149,152, 28, 0, 57,181, 75,138,139,139,143,157,250, 51,234,224,217, 83,127, 62,237,213,182, + 59,199,108,101,145, 20,119,150,205, 78,140, 62,104, 50,149, 31, 3, 0, 6, 40, 2,112,148, 94,183, 20, 10,133, 66,185, 15, 35, + 90, 51,107,151, 53,104,180,210,175,158,120, 0, 0,130,122, 12, 47,146,139,121,110, 60, 14, 3,109,214, 13,108, 91, 57, 23, 44, + 75, 48,234,185, 21, 80, 4,120, 65, 34,224,194,164, 43,210, 21,223, 56,222, 88, 95, 29, 48,140,117,216,250, 77,217, 1, 47,190, +208, 86,185, 99,135,142, 15, 0, 59,118,232,248, 47,204,106,173,252,124, 83,106, 64,175,126,221, 65,236,118,140, 25,255, 8, 38, + 63, 62, 25,105,121,122,252, 16,149,129, 74,131,217,161,209,114, 18,143,144, 46, 30,238,234,145,175, 60, 57, 82,198,227, 50, 76, + 7,127, 21, 55,179,192,106,227,114,249,246,131,231,203,114, 38, 78,124,220,227,216, 79,223, 15,177,123,132,116, 49, 20,198, 95, +106, 74,207,100, 50,221,210,116,232,230, 17,248,211,176, 71, 86,102,229,230, 85, 68,230,149, 24,123, 85, 90,109,208,150,154,144, + 95,106, 66,105,165, 5, 94, 10, 87,216,172,230, 78, 13,233, 17, 66,190,153,240,200,244, 39, 0,112, 24,142,237,107, 93,110,124, + 66,213, 59,127,153,172,145,227,167,170,163, 98,110, 32, 41,250,112, 9, 97,109, 85, 89,220, 25, 54,171,241,253, 10,194,101,192, + 10,120,140,149,203,225,176, 22,139,206,170,209,168,143, 29, 63,118,100,172,209,150, 12,174, 64,116,243,179, 6,179,221,225, 51, + 70,155,116,230, 51, 0,248,116,237,154, 85, 15, 14,155, 42, 56,126, 33, 21, 6, 43,208,167, 91, 16,246,125,247,133,137, 16,235, +107,149,185, 23, 63,115,226, 36,116,105,221,186,245, 92,190, 80, 56, 68, 34, 85,180, 86,123,251,113, 44, 54, 59, 44, 86, 59,100, +238, 62, 28,145,220,109, 24,203, 17,156,176, 89,204,199, 44,149, 5,159, 2, 40,165,215, 45,133, 66,161, 80,238,179,168, 22, 80, + 43,135,214, 45, 70,235,208,161, 67, 4, 0,234,107, 31,205,214, 22,195, 93,206,131,186, 85, 0,166,205, 93,133,111, 62,153, 7, +187,221, 10, 66, 0,155,221,177,204, 4,132,240,127,121,233,133,128,144, 54, 1, 92,245,180,169, 82,195,183, 59,244,146,105, 83, +165,134,142,157,220,203, 94,122, 33, 32,181,194,232,215,215,102,183,227,228,149,124,196,165,150, 33, 46,173, 28,114,137,227,105, +190,184, 66,193, 11,203,151, 45, 21,240,184, 12,115, 37, 93,167,203, 42,178,233,184,124,190, 69, 42, 17, 18, 51,225,153,210, 10, + 73,209,208, 9, 79, 25, 14,110,255,244, 25, 0,179, 27,140,138, 85,143, 52,172,137,100,213,188, 18, 66, 8, 3,176, 44, 99,183, +103, 21, 26,161,179, 88,161, 45,249,203,104, 49,182,134, 91, 78,229,222,237,131,148, 10,249, 17, 46,151, 43, 34, 4,176, 90,108, +143,193,187,253, 8, 93,110, 82, 66,109,147,117,230, 74, 14,110, 92,252, 85,107,183,232,167,235,243,175,255,230,232,182, 51, 12, + 8,151, 11,150,203, 97, 88,134, 1,203,231, 16, 51, 8, 97,235,214, 72,239,132,209,170, 49, 91, 66, 62,119,209,207,187, 62,209, + 60, 61, 58, 20,223, 69, 85,121, 62, 99, 69, 65,121,101,182, 83, 38, 11,238,238,238, 51, 94,127,253,245,119,198, 61, 50, 21,101, + 70, 6,218,146,170,104,160,217,202, 66, 32,243,192,176,151,190,106,157, 91, 80,222, 58,233,220,193,190,133, 23,119,148, 89,141, +101,107,232, 53, 75,161, 80, 40,255, 45, 26,243, 34,247, 81, 84,235,246,136, 86, 99, 27, 68, 8,144,152, 94,136, 54,190,106,248, +182,105,135,132,107,177,127,189, 7,192,102,119,172, 57,234,192,129,220,172, 85,171,148,236,188,121,101,125,150, 47,247, 59,253, +194,172,214,170,142,157,220,203, 94,127, 61,163,207,234,213,170,211,191,156,225,219, 73,117,190,174,154,220, 92,132, 56,147, 99, +147,211,179, 75, 88, 32,247,189, 29,137, 25,191, 93,174,200, 23, 8, 4, 86, 47, 87, 49,163,144, 11,185, 92, 14, 95,104,178,114, + 76, 65,225,221,184, 7, 57, 76,183,198, 84,106,140, 86,221,166,195,162,130, 27,227,126,254, 97, 65,199, 65, 19, 86,184,101, 23, + 24, 80,102,230,222,108, 58,228,114, 24, 92,190,150, 14,112, 5,113,245,105, 42, 21,110, 71,119,126,251,141,223,234,229, 75, 96, +177,217,241,210,188,183,241,212,140,233, 71,225,221,126,132, 95, 64,112,204,159, 7,191,150,142,152,181, 1,233,215,163,243,108, +166,242, 93,206,152,172,155,102, 11, 32,118,194,114,138, 75,202,229, 38, 27,196,168,199,247,153, 44,108,179,206, 28,157,193,134, +131,103,243,112,232,199, 93, 80, 41,100,205,210, 80,169, 84,161, 3, 6, 12, 4,195, 19,194,108, 53,193,108, 99, 97,174,213, 71, +203, 98,101, 97, 37,124, 72,189, 59,163,248,234,190, 80, 24,203,232, 29,135, 66,161, 80,254, 67,220,199, 29,225,107,155,171,134, + 35, 90,141,225,239,235,137,179,113,169,232, 20, 18, 8,149, 82,129,248, 27, 89,224,114,248,224, 48,128,213,230,184, 25, 34, 22, +235,119,171, 87,171,144,158, 42,227,124,190, 33, 53,224,165, 23, 2, 82, 87,175, 86,157, 38, 22,235,119, 0,166, 19, 2, 84,153, +173, 42,195,101,119,194, 23, 16,214,218,218,211, 77,202,141, 78,174, 44,226,112,184, 38,119,149,152,117, 87,137, 56,238, 10, 33, + 95,192,231,178, 54,194,177,248,106, 2,140,132,101, 29,153, 87,239,150,166, 67,187,221, 14,134,225,216,171,141,152, 44,179,200, +128, 50, 35, 23,218, 82, 19, 74, 42, 44,232,224, 35,195,175,199,246,232,237, 86,195,142,250,180,184,124,129,170, 93,128, 47,254, +247,193,106, 24, 76,118, 36,102,235, 32, 16,137,188, 60,189,194, 47, 77,127,241, 77,209,203,155,111,224,153, 33,238,152,247,231, +141,108,189, 86,252,166, 51, 71,214,110,183,195, 96, 52, 11,180,133, 37,174,229, 21,149, 74,137, 88,100, 80,187,169, 10,235,251, +172,209,201,136, 86, 13, 82, 49, 15, 99,123,123,193,104,153, 2,131,201,134, 83,191,237,109,142, 76,160,103, 43, 95,232,204,181, +204, 85,181,217,170,109,186,248,114, 53, 0, 38,144,222,114, 40, 20, 10,133,114, 31,209,224,168, 67,135,140,150, 92, 42, 6,225, +138,241,103,204, 13, 4,135,117,198,214, 3,231,208,190, 83,111,228, 86,216, 64,192,105,114,180, 97, 13, 11, 22, 26, 46, 0,184, + 48,110,156,212,247,225,135,125,134, 17,194,255,101,195,166,242, 44, 0, 8,236, 88, 37,195,178, 4,132, 0,132,173, 50, 92,142, +135,116,120,233,169,185,229,109, 2,188,100,184,154,101, 49,201, 68, 2,142,171, 76,200, 85,171,132, 2, 1,143, 7, 59, 97, 76, +185,185, 55, 76, 12,144,230,136, 92,221,166, 67,169,220,251,167,161, 19, 86, 20,164,101,148, 69,119, 40,214,119, 41,179, 8, 65, + 8,208,193, 71,134,184, 51,145,118,109,118, 82,162, 65,123,125, 99,125, 90, 44, 11,174,197,198,226, 82,114, 25, 74, 43,173, 40, +213, 89,208,119,240, 88, 65,223,136,113,248, 51,174, 16,172,205,138,229, 95, 68, 86,216,137,117, 50,112,205,234,196, 70,115,206, + 94,184,226, 91, 80, 82, 41,226,243,120,165, 33,237,253, 83,132, 2,190,173,188,188, 92,120,235,167,184,144, 73,132, 40,214, 89, + 1,192,234,236,217, 83, 86,105,197,129, 51,121, 56,184,119, 39, 36, 18, 9, 72, 51,206, 64,129, 64,224,194, 23,136, 97,169,172, +106, 46,172, 89, 44,117, 22, 14, 79, 4,112,120, 46,244,154,165, 80, 40, 20,202,125, 68,237, 57, 14, 71,215, 54, 95, 28,135,162, + 38, 44,129,135,187, 27,196, 50, 37, 82,181, 22, 84, 48, 26,148,232, 9,236,246,170,136, 86, 35,129,167,122,103,247, 62,112, 32, + 55,107,255,254,194, 45, 7, 14,228,214,234,232,253, 87, 36,235,230, 43, 75, 28,214,100,136,253,215, 3,135,255, 40, 27,215, 75, +237,202,225,114, 13, 2, 62,199,196, 19,112, 45, 2, 30,199, 42,224,113,204,158, 74, 62,247,143,131,187,132,132,193, 31, 77,105, + 26,141, 70, 68, 68, 68, 96,212,168, 81, 24, 63,126, 60, 30,125,244, 81, 4, 5,133,106, 56, 92,198, 76, 24,150, 85, 11, 43,208, + 78,205,128,103,204,196,111,187, 62,214,199,157,220,119,201,110, 50,142,197,173,150,243, 47, 77, 66,216,226, 50, 19,140, 22, 59, + 74,116, 22,148, 84, 90, 96, 83,247,193,190, 83, 57, 48,152,237, 72,143,217, 99, 40,200,203,154,107,202, 79, 74,109,226, 80,188, +113,235,191, 36,235,217,167,103, 20, 40,196,156,164,254, 15, 62, 80,224,225,238,102, 99,152,191, 34,175, 12,195, 64,172,212,192, +213, 69,129,212, 11,135,241,243,242,161, 6, 0,111, 57,178, 63,107,163,148,242, 48,174,151, 23,198, 78,156,130, 78,189, 71, 56, + 98,172,111,211,148, 74,165,146,154,232, 85,237,180, 14,230, 90, 81, 45,123,245,241,230,240, 68, 18, 71,143,123, 11,161,154, 84, +147,106, 82, 77,170,121,239,104,222,207,212,204,113, 88,243,234, 88,102,248, 26, 3,212,214, 91,134,246, 62, 50, 24, 45, 26, 24, +205,118, 84, 26,237, 40,215, 91, 80,174,183, 34, 53, 79,143,184, 3, 45,175, 97, 85, 20,171, 42,245, 57,169,202,183, 9, 59, 75, + 28,142,158, 8, 45,230, 15, 86, 45,255,232,177, 93,221,186,154, 95, 30,237,221, 58, 54,213,156,195, 48, 28, 3,135,203,179,186, + 41,120,252,248,248,216,130,211, 81, 63, 13, 16,219,236, 79,232, 27,209,177,217,108,101, 62, 62, 62,213,145,168,191, 44,100,104, + 59,201,248,147,145,111, 4, 14, 28,183, 92,253,201,146, 5,122, 14, 87,192, 50, 60, 65,156,221,106,216,105,208, 94,223,128, 70, +236, 7, 71, 32,190,118,246,226,213,222, 46,110,173,145,148, 93,137, 74,163, 13, 22, 27, 11, 87,185, 0, 89,151,143, 90, 82,227, +163,191,215,229,196,110,109,198,110,219,145,112, 45,206,119,228,200, 17,143,244,238,221,135,187,120,241,219, 8, 14, 14,134,193, + 96, 0,135,195, 65,235, 54,237,144,154,112, 17,103, 34, 63,176,235,139,210, 54, 2,120, 31, 64,129,179, 95, 82, 88,110,198,225, +232,124, 68,254,248, 29,184,124, 97,115, 14, 47, 71, 34,145,136,235, 51, 87,181, 77,215,205, 15,243,133,226,234, 31, 1, 44,189, +118, 41, 20, 10,133,114,159, 48,179,206,235,102,135,140,150,209,104, 76,237, 23, 49, 22, 44, 75, 96, 39, 0,107,175,142, 60,177, +127, 69,159,236, 86, 99,106, 75,107,199,178,246,115,159,109,222, 50,170, 91,207,129,220, 48, 63, 57,202,139,242,112,230,228,239, + 54,176,228,180, 35,235, 23, 21, 37,234, 36,158,237, 31,121,108,210,195,187,103, 60, 61,171,116,192,224,193, 50,141,198,203,148, +149,157,165,255,106,251,183,214,163, 63,237, 31,192,194,246,120, 81, 81,146,174, 49,157,178,178,178, 79,235, 43, 23, 9,229,125, + 1, 4,114,121,140,217, 80,144,232, 84,143,240,194,236,204,137, 31,125,240,110,218,212,231, 94, 21,182,245,105,135,252, 50, 46, + 82,179,242, 16, 31,181,223,148,157,112,254,199,242,172, 11,207, 56, 40,149, 91, 79, 89, 22,128, 79,206,156, 57, 29, 62,114,228, +200, 17, 67,134, 12, 33, 51,103,206, 4, 33,192,111,155, 95, 32,197,169,103,246,160, 42,138,149,220,204,227,146, 30,117,250,162, +219,163, 3,122,240,220, 21,207, 96,203,119, 63, 89, 65,216,116, 39,101, 60,125,253,218,240,170,154, 11,171, 82, 58,212, 93,204, +214,191,250,143, 9,228,158, 60, 61,226, 60, 27,216, 94, 10,133, 66,161, 80,238, 53,154,223, 71, 43,243, 90, 85, 62,173,191,155, +138,188,252,233, 91,183,126,243,225, 55,219,119,245, 53,154,205, 62, 4,130, 76,187,205,124, 92,103,199, 98, 71, 53, 12,218,164, +104,119,247, 14, 29,191,250,226,179,183,190,218,242,249, 64,176,246, 16, 6, 72, 35, 12,254, 16, 91,237, 51,154, 50, 89,141,154, +165,194,138, 77,195, 30, 89,105, 40, 42,210,125,227,236,186,134,162,235,121, 28,174,165,245,166, 53, 31,172,224,112,184,195,237, +118,150,207,218,173, 73,118,139,241, 99, 67,193,245, 3,112,184,151, 27,138, 27,121,239, 10,128, 43,199,142, 29,235,127,236,216, +177,158, 0, 62, 69,213, 28,138,209, 45, 57, 46,166,162,138,161,175, 45,120,237,183,249, 96,252, 89,150,192,102,103,211, 5, 6, +253, 80, 39,101, 90,183,109,219, 78,106,177,218,111,235, 0, 95,187, 35,252, 77,163,165,242,149, 2,104, 77,141, 22,133, 66,161, + 80,238, 19,102,226,246,164,165,142, 69,180,254, 41, 74, 74,146, 43, 80,130,151, 91,170, 83, 84,148,168, 3,112,219,200, 61,125, + 11,117,227, 18,203,127, 64, 98,249, 15,205, 93,191, 50, 63,165, 0, 72,153,209,194,106, 56,210,145,253,207,234,229,142, 80, 88, +120,173, 18,133,232,213,210,195,178,227,219,237,241,187,118,125,199, 39, 28, 46,159, 37, 92,129,141, 48,124, 27,203,240,173, 86, + 22, 38,139,213,106,177,217,172,176,219, 44, 96,237, 86,194, 90,172,168,202, 14, 79,161, 80, 40, 20,202,253,108,184,238, 29,163, + 69,249, 87,147,124, 35, 41,161, 55,221, 13, 20, 10,133, 66,249,151,155,172,218,175, 0,170,250,158, 55, 52,114,192,153,201,124, +155, 51,250,224, 87,170,217, 98, 77, 62, 0, 33, 0, 57,128,166,154, 52, 71,160,122,190, 70,186, 63,169, 38,213,164,154, 84,147, +106,222, 69,205,166,180,127, 5,229,111, 53, 96, 84,147,106, 82, 77,170, 73, 53,169, 38,213,252,239,105,222,207,204,172,103, 1, + 64,155, 14, 41, 20, 10,133,242, 31,196,221,189,131, 28,184,217,175,183, 73,164, 30,161,158, 0,160, 47,188,166,165,123,143, 82, + 15,181,231, 57,188,165,143, 22,167,153,130,124, 14, 79,248,154, 84,225,126, 77,166,114,207,254,143,239, 92, 38,168,141,108,206, +176, 1, 1,251,130, 3, 37,227,157, 89, 81,170, 14,250,218,171, 93,175, 12,153, 38,104, 14,188,187, 73, 90, 82, 9,153, 38, 80, + 45,111,221,227,164,194, 39,252,161,191, 97, 27, 69, 97, 97, 97,125,194,194,194,250, 0, 16,221, 9, 65,169, 38,104,138,111,251, +222, 81,154,182, 93,127,151,121,118,152,116,167, 43, 44,247,110,239, 46,111,221,253, 7,121,171,206, 37,114,239,206,229,114,223, +238,199, 21, 30,161,109,155, 90,175,245,184,143, 66,222,219, 25,183,179,245,184,143, 66,234,123,223,117,228, 90,197, 59,187, 18, +151,184,143,253, 88, 78,239, 43,205,163,117,223, 41, 46,222, 3,231,187, 59,187,158, 79, 80,239, 43,109,194,251,231,183,234,208, + 43,206,209,117,124,131,251, 92,240, 15,235,171,245, 13,234, 19, 77,247,188, 99,136,213,129,125,196,174,126,145, 34, 87,191,159, + 68,110,129,131, 91,170,231,237,237, 45, 9, 9, 9, 25,217,187,119,239,231,135, 14, 29,250, 74,215,174, 93,103,250,251,251, 15, +191,155, 63,244,165,154,160,133, 38, 62, 83,104,226, 51,133, 82, 77,208,194,166,239,175,193, 31, 50, 28,123, 14,195,177,231,200, + 52,193, 31,222, 43,199, 74,228, 25,228, 47,213, 4,173, 86,120,133,157,147,104, 58,140,117,118,125, 87, 87,215,225,106,181,122, + 66,205,226,234,234, 58,156, 94, 1,205,166,118, 20,171,197, 17, 45, 46, 95, 36, 61, 49,245,233,151, 58, 46,123,247, 77,241,154, + 45,251,176,102,201,130,171,166,202,210,176,123,113,203, 61, 2,123, 70,115, 57, 92,223,218,101,118,214,158, 85,152,114,174,199, +157,208, 15,110, 35,121,230,173,215,167,207,155,242, 88,132,127,196,152,185,204,245, 20,195,126,199, 45, 26,186,124,255,195,143, +173,163,254,248,125,237,150, 45,155,223, 47,176, 5,175,230,139,120,159,149,103, 94, 41,117,166, 14, 74,117,219, 64,158,204, 35, +170,223,248,151,188, 98,126,253,118,171,221,204, 14,211, 23,214,154,253,187,249,168,219,181,107,247, 0,151,203,117,159, 51,103, +142, 0, 0, 62,249,228,147,246,118,187,189,232,198,141, 27,231,209,140,228,167, 85, 6, 51,120,250,167, 43,222,251,230,161,135, + 70, 33,167,176, 18,203, 87,175, 31,116,228,208,247,143, 86,106, 19,247,220,137, 99,226,226, 18,160,132, 64,113,121,238,235,239, +107, 70, 14,122,128,171, 51,218,112, 36,234, 98,255,111,215,191,127, 14, 8,237, 89, 81,120,173,193,156, 98,172,190,108,145,167, +156,140,100,245,101, 0, 48,229,182,135,189,220, 26,161,150,216, 71,122,139,120, 23,139,128, 38, 39,125,116,105,211,247, 40, 95, + 36,242,231,112, 56,224, 48, 0,135,195,128,203, 48, 85,243,132, 90, 12,233,217,241,127,142,184, 23,174, 19,133, 95,207, 60,112, +121,238, 28,230,175,250, 49,156,234, 87, 66,202,243, 18, 79,184,223,129,175, 81,117,108,239, 18,222,183,125,229, 87,199, 83,138, +101,188, 1,175, 68, 50,132,243,121,198,159,171, 47, 57,100, 0,196, 98,215,131, 7, 15,170, 71,142, 28,169,210,132,143, 63,238, +200, 58, 66,174, 46,236,208,161, 3,130,145, 35, 71, 56,113,126, 6, 13, 3,135,179,157, 1,248, 44, 75, 62,225,178,228,123, 93, + 81,194, 13,192,185,217,167, 36,154,224,103, 56, 32, 14,223,103, 88, 48,209,134,252,235, 91,154,187,115,121, 34,229, 80,190, 64, +240, 74, 96, 80,167,110,217,105, 73,209,149,186,138,213, 54, 83,217,113,167,133,172,182,215,126,253, 51,230, 33, 30,159,207,140, + 28,218,139,107, 2,126,111,201, 65,247,244,244,156,176,110,221,186,182,125,250,244, 1, 0,216,108, 54,229,238,221,187,189, 62, +248,224, 3, 89, 66, 66,194,222,102,202,250,168,213,106, 63,161, 80,232, 3, 0,102,179, 57,187,160,160, 32, 3, 64,147, 63,252, +101,158,109, 61, 64,240,254,159, 81, 81, 60, 0,232,223,127,192,135,126,253,102,187,114, 5,114, 67,189,187,227,255,236,157,117, +120, 84, 71,219,198,239,115,214, 45,238, 9,193, 3, 65,131,187,123,209,226, 90,220, 42, 20, 90,138,180,180,120,161, 45, 78, 41, + 45, 80,160,184, 91,176,224,208,226, 1, 2, 1,146, 16,247,100,163,187,155,245,221, 51,223, 31,155, 80, 36,178, 1,250,245,109, + 59,191,235,218,107,115, 54,155, 59,115,108,206, 61,207, 60, 51, 99, 84,203,243,162, 47,205,184,121,235, 6, 3, 0, 45,154,183, +156, 35,115,175,253,227,223, 25,217,146,120, 6, 54,103,129,207, 90,180,237, 50, 96,232,176, 81,108,221, 26, 21,209,173,107,167, +217, 58,224, 68,185,174, 25, 62, 95,122,251,246,237,234, 44,203,242, 44, 22,139,190, 69,139, 22,137,111, 83, 46,223,154, 45,175, + 51, 96,253, 77, 22,227,102,101,204,221, 37,120,125,210,105,158,147,127,163,175,192,227, 79,228, 56, 46, 73,157,120,183,213,191, + 48,162,245,250,113, 46,175, 18,203, 23, 77, 31, 62,246,195,122, 51, 62,255, 82,242,233,154,139, 56,185, 97, 78,214,255,170,201, + 2, 0, 30,203,171,112, 54,228,172,167, 76,196, 3, 0,104,244, 22,188,215,163, 71,217, 79,132,202,205, 46,179, 12, 19, 88,180, +160,141,213, 98,146,240, 5, 34, 61, 99, 51, 72, 96, 0,184,251, 86,190,232,101,249, 93, 54,124, 72,151, 74, 59,247,158, 75, 78, + 76,206, 46,119,165,198,240,132,104,209,174, 27,186,116,237,238,116,251,214,245, 69,155,126,222, 56,215, 98, 50,111,228,204,220, + 42,125,206,179,212, 50, 43,115,239, 26,141, 69, 10,247, 51, 3, 38, 47,118,211,179,174,248,102,233, 90,247,171,167,119, 95, 73, + 73,106,192, 37, 36, 36,233, 9,195, 60,206,205, 73,155, 94,144, 30, 29, 97,239, 33, 83, 40, 20,213, 20, 10, 69,131,160,160, 32, +201,204,153, 51, 5, 29, 58,116,248,211,178, 79,154, 36,188,124,249,178,207,138, 21, 43,122,134,133,133,233, 53, 26,205, 3,141, + 70, 19,131,114, 36,218,123,123,123,124, 60,176,127, 31,116, 26,240, 17,172, 28,131, 73, 31,206,192,217,211,135,167, 0,120, 39, + 70,203, 44,115, 92, 60,113,242, 76,143, 22, 77, 27,242, 22,237,142,128, 84,196, 71,247, 38,129,204,216, 79,230, 57,255,186,110, +209, 22,100,161,125,113,145, 44, 78,155, 63,175,158,187,113, 88,223,150, 85,113,124,143,113, 24, 58,207, 2, 43,115, 90,146,116, +252,203,167, 0, 80,173,199, 39, 14, 98,171,114,189,175, 51,207, 83,108, 85,174,175,214,227,147,243, 49,103,214,171, 75, 43,139, + 64, 44,174,180,103,247,238, 26, 46, 14, 66,240, 89, 6, 60, 30, 3, 62,143,133,222,104,197,224, 33,195,222,217,101, 46,245,172, +209,147, 5,198,218, 30,216,216,166,203,140, 58, 85,158,115,194,240,132,110,193,199,143,240, 61,157,196,224,241, 24,240, 88,128, +199, 50,136,207,208, 97,252,248,177, 78,111,107,216,223,107,237,217,244,139,161,129,221, 91,212,115, 13,218,119,131,113,106,241, +222, 80,183, 44,189,108,204,222, 99,151,134,145,182, 51,110, 17,194,253,144,252,251,218,144,210, 68, 12, 6, 67, 70,247, 30,239, + 57, 50,124,185,236,252,209,237,237,248, 44, 3,179,149,192, 98, 37,176, 22,174,141,202, 20,182, 96, 88,150, 1,225, 8, 38, 78, + 28,143,238, 61,222,211,114, 22, 46,217,254, 74,142,221,121,230,252, 31, 30, 6, 51,135, 21,235,127, 93, 84,144,175, 92, 20,251, +212, 45, 94,147,159, 53, 67,151, 25,101,247, 58, 24, 44, 72,147,164,152, 71,147,119, 7,223, 68,189, 58,181, 97,229,108,229, 12, +172, 32,199,238,147, 55, 81, 43,176,150,173,220, 28, 65, 77,127, 5,154, 54,105, 10, 0,111,100,180,248, 98,135,111,218,247, 26, +181,176,247,224,113,240,244,240, 0, 75,204,189,207,159,220,221,123,219, 79, 63,124, 97,209,171, 86,148, 75,140, 88,159, 63, 23, + 8,199,189,117,212,201,215,215,215,163,105,211, 63,167, 99,180, 88, 44,168, 82,165, 10, 82, 82, 82, 2,223,164,157,230,227,227, +211,107,254,252,249,158, 61,123,246, 20,120,123,123, 3, 0,210,211,211,253,206,156, 57,211,104,254,252,249,153,105,105,105, 39, + 81,202,140, 62, 86, 51, 43,100,249,224, 73, 36, 50,219, 62,130, 97,103,126,252, 65,144,151,143,175,161,184,239, 43,149,233,162, + 89, 31, 93, 98,248,124, 97,225,247,193, 18,194, 49,165, 68,137,186, 8, 4,130, 98,123, 40, 76, 60,199, 22, 68,224, 52,129,229, +177,182,139,213, 98, 86,230, 38,222,171, 93,142, 72, 92, 93,129, 72,184,113,224,208,113,173, 6, 13,232, 7, 31, 15, 39,156,255, + 61, 12, 83, 62,254,204,108, 49,153, 87,189, 81,229,193,227,241, 51, 51, 51,227, 93, 92, 92,188,223,254,121,203, 84, 61,119,246, +180,231,249, 11, 23,231,172, 92,179,110,170,201,104, 49,115,132, 60, 95,199, 88, 42, 21, 11,186,246, 30,226,232, 89,189,133,100, +221,252, 9,130,127, 97, 68,107,211, 59, 49, 90, 34,169,195,144,175,103,125, 34, 89,188,235, 38, 78,110,152,146,165, 85,101,121, + 60,111, 41, 56, 58,223, 43, 80,229, 53,122,147, 18, 42, 60,106,182,100,120,252,201, 12,143, 39,103, 88, 70,196, 89,185, 36,139, +209,184, 68,151, 29,245,214,147, 86,114, 28,193,161,235,153,229, 51, 64, 4, 1, 59,247, 29,241,244,114, 22, 67,111,178, 98,232, +240, 81,216,177, 99,135,131,135,147, 8,122,163, 5, 63,172, 92,169,214,196,159,244,140, 79,202, 77,233,210,231,179,144,152,184, +204, 71,137,105,250,253,229, 45,155,193,100,133, 74,107,129,214,192,162, 70,221,166,248, 97, 85, 45, 73, 98, 66,236,103,219,183, +109,153,246,248, 49,111, 7,199, 99, 23,234,211,158, 36, 21,123,211,121,215,235,238,232,226,182,167,255,228,165,206, 81,153,124, + 16,152, 16,237, 40,193,144, 49,211, 28,171,121, 75, 33,151,240,156, 99, 19, 82,124,102,126,241,197,239, 49, 86,210, 76,165,140, +137, 45,171, 60,149, 43, 87, 30,208,187,119,111,217,231,159,127, 46,240,247,247,199,182,221, 7, 42,181,237, 62,184, 79,106, 90, +134, 63, 33, 4, 94,158,158, 73, 19,199, 14, 62,113,234,212,169,132,164,164, 36,193,247,223,127,223,252,200,145, 35,117,210,211, +211,237,110,153, 90, 9,129,222, 96,133,181,240, 1,169,204, 55,148,219,159,250,249,249,137, 83, 82, 82, 12, 47, 68, 25,152, 63, + 3,133, 76,247,206,237,155,243,127, 57, 29, 7,141,222, 10,185, 68,128,184, 12, 45,154, 52,172,207,108,182, 90, 26, 20, 39, 56, +126, 72,175,121, 94, 10,210,163,111,203,170,240,116,145, 97,235,143, 75,113,252, 70,108,143, 12, 13,131,245,132, 55,217, 71,204, +239, 42,231,210,214,119,104, 82,221,187, 83,227, 74,184,211,164,186,247,213,208,136, 72,233,224,149,159,164,104, 4,231,115,207, + 76, 83, 23, 95,241,176,112,117, 16,226,215,179, 9,144, 73,248,144, 75,248,144,139,109,239, 44,203,188, 93,171,214,167,182, 63, +143,179,142,231,241,248,227,135, 13, 25,236, 59, 98,216, 96, 2, 30,139, 3,135, 78,244,219,181,107,103,154,217,100,220, 98,101, +121,191,150,116,253,188,116, 64, 89,192,211, 73,132, 47,182, 60,130,163, 84, 0, 7,153, 0,142, 50, 1, 58, 5,121,128,199,190, +113, 17, 93,166,244,171,214,115, 74,255,202, 29, 3, 43, 42,106, 60,136,206,127, 60,126,201,221, 53,151,243, 58, 78,255,113,117, + 29, 55, 77,158,145,255,205,204,137,252,228,212,212,142, 7, 78, 92,233,100, 53,142,139,176,152, 10,190, 84,134, 29, 40, 54, 42, +156, 28,113,163,145, 95,139, 65, 18,147,198,252,240, 65, 68,114,245, 92,131, 24,225,241, 42,200, 37,124, 40,138,142,173,132, 15, +185, 68, 0,133,132,143,212,228, 56,228, 20,240,126, 79,113, 99, 59,250,120,192,212, 0, 0, 32, 0, 73, 68, 65, 84,226,202, 13, + 75,121, 10,174, 55, 89,113, 63, 86,131,202,129, 13,225,227,227, 11, 99,207,145,149,111, 93, 60,116,236,246,149,163,203,180,233, + 79,191,180, 87,103,119,240, 77,204,153, 49, 57,148, 1,238, 21, 62,164, 27,125,179,124, 67,227, 69,115, 62,122,233,179,153, 11, +215, 53,126,243, 72,150,195,188, 78,253, 63, 92,216,182,107,127,168,115, 50,112, 61,100, 63,186,247, 30,136,145,227, 62,133,179, +179,251, 15,171,150,204,122, 96, 49,168, 46,190, 86,231,122,215,106, 83,191, 94,237, 93,126,190,190,254, 28,103, 91,229,131, 16, + 64,163,206,199,172,233, 19,193, 17,130, 6,141,154,117,146,180,237, 74, 72,225,106, 32, 89,217, 89, 5, 17, 79, 31,119,209,103, + 70,220,178,251, 88,234,245,102,165, 82,137,251,247,239, 35, 50, 50, 18,225,225,225,200,206,206,134,147,147,147,166,160,160,160, + 92,193,251,160,160,160, 17, 23, 47, 94,148,184,184,184, 60,255,208,104, 52,194,193,193, 1, 35, 70,140, 16,116,235,214,205,175, + 87,175, 94,163, 31, 61,122,180, 27,128,170,216,242,228, 60, 75,117,240, 10,252,185,125,135,246, 83, 1, 64,234,232, 19,187,126, +219,137,240, 82, 27,180, 78,190,149, 90,181,106, 93, 29,132,128, 1, 89,171,205,142, 76, 47, 37, 74, 36,191,121,243,102, 53, 30, +143,199,255,243, 25,196,225,167,173,251,106,157,187,246,112,192,242, 31, 86, 72, 28,229, 98, 40,243,141,152, 48,178,191,221,207, + 96,169, 87, 96,207, 86,173,218, 29, 91,180,240,107,190, 66, 46, 71,200,173, 24,124, 50,253, 11,125, 90,252,163, 21,132, 19,108, +208, 42, 35, 51,223,242, 81, 73,240, 14,168, 81, 65, 1,135,190,221, 37, 83, 62,232, 43, 49,154,173,200, 43, 48,195, 96,178,194, +202, 17,228, 23,152,241, 56, 81, 13,119,199,242, 47,229, 70, 8,105, 10,192, 3,128,146, 97,152, 59, 47,110, 23, 53,232,138,188, +241, 43,219, 89,133,207, 7, 55, 0, 70,216, 70,234, 63,191,124, 10,183, 75,250,188,232,239, 31, 3,168, 93,168,105, 5,112,155, + 97,152,220, 18,204,214,107, 81, 46,126,112,112, 48,233,221,187,247,243, 26,255,213,237, 87, 17, 11, 5,190,114, 39, 15, 16,242, + 4, 47, 46, 96,236,233,237,151,189, 98,213, 26,215,143, 63,156,156,160,202,203,169, 84,248,241,121,123, 30, 22,124,134,183,170, +125,235, 22,221,166,126,248, 33, 2,171, 85, 16, 90,173, 86,242, 40, 50,214,188,253,215,173, 99,174,222, 16,173, 81, 37, 63,154, +247, 66, 8,178, 92,195, 62,173,156, 53,249,213, 8,150,149,179,190,218,186,125, 77,147, 97, 0,103,133, 8, 63,159,142, 3, 33, + 0, 3, 2, 39,185, 0,123, 47, 39, 35, 54,244,176,170,119, 3, 85,193,136,229, 11, 58,117,236, 57,237,226,227,104,253,254,204, + 76,253, 89, 0,233,165,105, 22, 95,161,115, 48,152,172, 48, 91, 44, 56,120,226, 4,122,116,106,142, 86,173,154,163, 93,219, 86, +252,187,161, 97,227, 62,156, 58,209, 31,127,142,238,120,174, 41,241, 10,104,170,112,114,223, 63, 96,234,247, 14, 15,147, 45,224, +243,128,170,222, 82,184, 58, 8, 97,180, 48,136, 87,154, 10,239, 28,103,124, 50,115,161,235,156,207,166,158, 82, 41, 69,245,128, + 39,166,210,246, 93,171,213,138, 70,141, 26, 37, 48,155,205,166, 17, 19, 62,237,150,158,174,236,247,211,218,239,196,158,158, 94, +208,234, 45, 8, 13,127, 86,123,209,162,133, 85, 79,156,185,124,116,193, 23, 83,142,245,232,209,195,105,223,190,125, 92, 89,199, +243,165, 22, 98, 70,214,143, 91,119, 29,220,177,122,197,183,136, 72,200,197,175,191,108, 0,177, 90,126, 46,227, 80,189,168, 73, + 70,141, 26, 37, 61,122,244,104,133,228,228,100,149, 86,171, 85,190, 20,143, 96, 25,126, 70,142, 22,238, 14, 34, 8,249, 44,188, + 92, 36,240,116, 18, 67,192, 3, 88,134,177, 22,167,249,235,254,147, 75, 56,109, 62,142,239, 49, 14,219,250,227, 82,140,251,248, + 43, 60,202, 18,157, 97,101, 78, 75, 62, 26, 54, 96,142,135,212,218,195,215,153,245,236,212,184, 50,228, 18, 33,230, 78, 27,133, +102,161,241,158, 41,121,220, 87, 74, 29,175,225,194, 51,207, 23,235, 62,255,114,112,196, 22,193,114,144, 9,112,102,215, 15,153, + 5,249,202,252,162, 46, 57,163, 65,159, 96,231,101,124,190,152,150,237,156,134,245,235, 46,157, 58,105, 60,219,186,101, 51,194, +178, 2,100,169,141, 12, 33,192,244, 79,166,224,163, 41, 19,189,147, 82, 51,191,217,176,225,231,121, 23,207,145,197, 5,202,167, + 11, 74,211,100, 25, 91, 20, 72, 33,225, 67, 33,181, 25, 23,133,132, 15,189,209, 10,134, 1,207,185, 98,163,124,198, 22,201, 77, +205, 73, 40,177, 5,254,146,166,107,197,186, 23,206,197, 58,212,202,221,159,123, 35, 46, 53,124, 73,104, 88,198,109, 0, 57,254, +237,156, 71,155, 44, 4, 26,189, 5,113, 25, 90, 88, 76,132, 25,247, 94, 37, 84, 25,196, 4,126,187,245,222,142,211, 97,112,124, +161,210,127, 73, 51,229,230, 65,189, 91,189,254, 67, 87,175,251,229,206,138,165, 95,241,178,242,141,224, 8,129, 68,196,131, 84, +196, 47,124,241,160, 43,200,199,134,141,155,211, 45, 96, 6,224,202, 21, 75,121,174, 79,112,100,100,255,158,237,246, 50,128,136, + 97,133,201,190,149, 42, 87,234,220,103,140,164,115,223, 81,176, 90,140,115, 66,175,145, 75,218,204,136, 11,246,104,214,171, 83, + 27, 12,112,175, 32, 51,114, 10, 0,200, 61,107,254, 92, 43,176, 86,227, 87, 63, 11, 8, 8,108,108,207,121,127, 30, 41,149, 56, +124,236,226,234,241, 85, 96,221,134,158, 25,185, 6,198,193,173, 2,226,162,238, 99,207,198,111,118,114,122,227,194, 11, 39,247, + 47, 93,243,235,145, 33,157,123,244,199,214,159,190,155,155,157,246,220,104,157,127, 33, 90, 53,114,251,150, 77,254, 2,145, 24, +102, 11, 7,179,149,216,222, 45, 86,228,228,228,194,108,225, 32,145, 57,192,194, 49, 48, 91, 57,152, 45, 28, 12, 70,139,124,202, +168, 94, 31,234,129, 91,197,149,211,175, 86,251,179, 66,177,184, 18,129,109,237, 90, 66, 8,226,210,117,172,143,143,207,110, 0, + 16,139,197, 16,139,197,224, 56, 14,161, 17,202,143,221, 3,107, 78, 69,161,193,179,154,140, 9,121,241,127,116, 47,105,223,189, +189,189,251,188,106,178,244,122, 61, 52, 26, 13,174,221,184,227,180,101,199,193, 30,113, 9,201,213, 56,226,100,112,240,172,214, + 93,157, 25,211,167,164,227,169,206,136,248,208,177,197, 68,246,243,143, 70, 7,172,219, 30,124,251,217,217, 37,165,230,105, 85, +233, 60,219,248,249,228,129, 77,150,175,253, 53, 42,247,143,159,103,148,117,142,248,124,190, 64,169, 84, 62,191,191,215,111,222, +211,228, 94, 68,202,251,107, 86,175,145,132,198,168,241, 48, 46, 21,163,187, 84,180,181,112,236, 56,239,114,175,106,238, 85,171, + 87,223,189, 97,237,114,126, 84,170, 30, 63, 30,190,141,139,199,126,190,150,158,121,171, 7, 50,210,116,111, 82,135,188, 3,163, + 85,162,230,165,176, 44,104,244, 22, 24,140, 22,152, 57, 2,149,214,140,204, 60, 35, 84, 90, 19, 52, 58, 11, 70,119,173, 88,236, +223,149,225, 71, 60, 24,134, 9, 38,132,244, 38,132,116, 1, 32, 42,218,182, 61,179,153,224, 66, 67,246,210,246,156, 57,115,190, + 92,182,108, 89,120,209,119,139, 62, 47,250,110,105,159,191,240,247,110,115,231,206,173,183,124,249,242,111, 91,182,108,185,247, +250,245,235,177, 0,114,237,237, 62,228,191,184, 51,193,193,193,101, 29,232,106, 38,179, 73,236, 40, 21,160,106,149,138, 24,251, +229, 86,247,223,150,143,207,148,136,248,188,211,167, 79,187,102, 27, 21, 96, 89,158,221, 77, 20,133, 71,141, 86, 66,161,232,228, +202,149, 43, 49,172, 79, 91,105, 98,150, 89, 19,150,168,203, 40, 48,194,226,233, 81, 83,180,228,219,229,138,229,223,255,240, 81, +240,113, 46, 79,147,241,248,135,226,187,248,154,220,229, 49, 47,228, 96, 49, 12, 8,103, 77,206,141,191,211, 4, 0,222, 38, 23, + 75,163, 55,131, 87,152, 91,195, 48,128, 86,111, 1,143,199,100,230, 69,236,127, 60, 98,241,146, 78, 59,247,158, 75, 37,172,179, +186,160, 32, 78, 6,219,154,131,229, 70,111,180,194, 96,182, 34,252, 65, 40,218,181,168,131, 86, 77,106, 65,171,183, 66,107,176, +160, 74,245, 64, 0,112, 47,246,196,241,216, 88, 98, 53,235, 9,177, 58,244,110,234, 1, 79,103, 17,124, 92,196, 16,139,248, 48, + 91, 0,157,145,131,222,104, 69,124,166, 14,106,157, 20,245,219, 15,174,234,230,115,215,144, 30, 47, 61,154,147,120,119, 64,169, +230,212,106,197,246,221, 7, 3, 82, 83, 51,250,157, 58,186, 75,172, 84,153, 17, 22, 95,128,204, 60, 3,192,243,192,252,111,127, + 20,207,158, 49,233,253,237,123, 14, 37,116,110,219, 60,161,188,251,172, 85, 70,236,220,127,224,224,207,189,123,191, 47, 13,191, +117, 10, 81,247, 47, 44, 45,200, 44, 87,126, 22,219,160, 65, 3,203,164, 73,147,212,223,126,251,173,255,241,227,199,171, 40,149, +202,251, 0,204,206,206,206,181,106, 6, 84,122, 16,114,230,180, 95,175,247, 7, 11,146,179,116,112,146, 9, 81,201, 83,134, 27, +215,206,154, 69, 34, 65,177,249, 38,133,221,131,195,209,121, 22,142,223,136,237, 17,158, 45,185, 60,113,252,232,132,144,171, 17, +217,235,119,132,124,231,167, 48,223,151,112,202,245,119,155, 84,247,158,243,201, 40, 44, 91,183, 19, 87, 66, 35, 50, 11, 88,159, +165,105, 6,203,185,146, 67,233, 0,159,199,192, 65, 42, 64,129, 74,153, 31,125,239, 76,205,119, 20,166, 30, 29,114,116, 39,155, +163, 54, 35, 41, 75,207,164,230,168, 97,229, 8,156,101, 66, 88, 56,130,188,156, 44,102,215,206, 29,184,115,231, 6, 11, 30, 59, + 1,192,130, 82, 15, 40, 99,235, 42, 84, 72, 4,182,136,144,212,246,110,182,114, 8, 12,168,142, 77,235, 87, 57,186,123,122,161, + 77, 59,251,115,163, 29,220, 42, 53,216,187,109, 61, 46, 95,191,215,225,202,154, 31,155, 42,124, 61,214, 49,140,117, 5, 8,244, + 6,147, 21,249,121,185, 16, 25,147,208,204, 79, 9, 87,153, 21,241, 42, 31, 60, 74,143, 82,148, 85,225,103, 63, 58,114,159, 33, +239,207, 59,120,226,226,178,238, 93, 59,224, 81,188, 10, 82, 17, 31, 18, 17, 15, 18, 17, 15, 2,198,138, 85, 27,127, 54,231,230, +171,123,103,135, 31,203,122,131,235,243,124, 97,235,215,102,238,172, 26,143,157,235,230,253, 54,113,214,247,221,123,244, 31,195, + 60,186,115,233, 75, 45,112,193,190,134, 30,177,235, 51,142,179,255, 25, 39,113,112, 95, 59,109,246,146,105,221,122, 15, 6,143, +199,135,217,108,198,161,125, 59,177,237,199,249, 79,141,154,236, 49, 0, 56, 99, 38,111,210,254,157, 27, 7,207,250,102, 21, 83, +175, 65,179,230,151,210, 94, 95,142,150,227, 49,191,124, 48,126,242, 80, 47, 47, 47,135, 63, 35, 90, 4, 53, 3,235,160,103,223, +129, 56,123,236, 8, 30,135,135,129, 35, 54,195,196,113, 4,121,185,217,233, 22,179,113,123,137, 61, 30, 18, 73,165,173,219,118, +212, 96, 89,230,249, 2,242, 51, 62, 28,107,156, 50,253,203, 54, 61,187,181, 15, 23,241,160,138, 79, 76,115,190,113,239, 73,125, + 78,160,240, 31, 63,115,149, 80,111,176, 34, 95,107,198,169, 95, 75,246, 58, 18,151,138, 45, 43, 55,238, 57,126,202,215,155,196, + 98, 30,107,170, 91,211, 63,182,125,139,186, 73, 21,125,221,213,139,150,255,216,236,247, 91,247,122, 14, 25, 49, 94, 50,186, 86, + 99,198,215, 77,234, 48,118, 68,255, 32,171,197,244,129, 54, 39,169,196,249, 5, 5, 50,151,188,138, 85, 2,180,127, 70,140,106, + 30,102, 8,170,190,228, 60, 24,196,234, 50, 34, 7, 0,128,143,111, 69,189, 64,236,168, 46, 71, 4,134, 0,192,186,205,123,154, + 60,136, 76,157,184,122,245, 26, 89,104,140, 26,247, 99,242, 33, 22,178, 48,153, 57, 48,118, 6,181, 57,194,155,252,213,220, 57, +142,185, 5, 86, 92, 14, 83, 34,252,238, 37, 98,212,232, 71,200, 44,142, 3,224,233,240, 1,128,234, 0,162, 25,134,252, 82,144, +225,125, 12,184, 98, 41,239,117,207,113,182,246,178,163, 71,181,170, 86,190,184,167, 64, 36,111,201, 48,164, 46, 67,224, 2,144, +148,156,194,103,170,189, 78,173, 32, 35, 18,223,127,251, 13,214,110, 57,130,212,108, 61,156,172, 73, 56,246,235, 18,124,190,108, + 55,116,134,146,179, 26,202,242, 35,197, 25,163, 87, 13, 87,209,207, 69,223, 91,182,108, 89,239, 87,206, 77,239, 18,206,217,107, +223, 43,250,251,229,203,151,127,251,194,239,181,246,154,172,231, 70,171,104,167,202, 48, 91, 53, 61,124, 42, 93, 63,118,244,176, + 75,174,198, 4,137,144,135,138, 85, 2,176, 96,253, 49,143,247,154,184, 35,203,228,132, 61,155, 86,228,232,181,234,125,118, 85, + 22,158,129,205,165, 10,249,169,195,135,142,160, 90, 69, 79,225,174,107, 57,113,247, 98,117,207, 67,189, 42,101,130,168,138,163, +150, 63,160,127,127,217,133,139,151,166,107,128, 98,141, 22,143,225, 85,216,188,227,144,167,131, 84, 0,134, 1,212, 58, 11, 38, +126, 48,240,237, 31, 99,132,227,141, 31, 51, 26, 76,161,201, 82,101,167,227,203,217, 31,234,229,230,168,199,137,241,137, 41, 93, +250,124,126, 65,165, 97,244, 67, 71,125,120,231,113,228,178, 92,173,246,205, 22,249, 49, 24,173, 48,152, 56,196,196, 68, 99,198, +232,174, 16,240, 88,240,120,156, 45, 89,218, 82,242,197,168, 73,141,204,129,183,112,208,206,149, 31,111,246,245,242,116, 83,200, +165, 68, 33, 19, 51,117,107,213, 16,182,104,209, 74, 84, 37, 48, 72,120,237,137, 14,137, 74, 29, 98, 83,243, 33,246,106,200, 31, +214,233, 61,236, 92, 51,179, 67, 78,226, 93, 22,175, 39, 41,190,196,185,203, 55,251,108,217,184, 90,156,145,103,194,211, 68, 13, +210,115,245, 72,203, 53, 32, 61, 71, 15,133, 84,128,118,125, 39,137, 79, 30,251,165, 79,231,182,205,215,189,201,126,199,198,198, +157,140, 79, 73, 27, 28,212,168, 25,118,254,182,173,173,179,115, 21,199,188,188, 56,149,189,103,103,201,146, 37,162,229,203,151, +243,215,175, 95,175,106,209,162,133,247,220,185,115,187,103,102,102,222,174, 92,185,114,224,217,195,219, 47, 54,108,215,175, 41, + 56,147, 71,219,246, 29,133, 98,142,143,144,224, 96,211,254,125,187,178,117, 58,245,148, 82, 13,135,204,105, 73,134,134,129,135, +159, 95,184, 66,100,237,202,103,243, 34,115,207, 76,219,145, 11, 28,174,214,227,147,243,151,238, 70, 68, 54, 9,141,247,188, 24, +250, 44, 51, 71,107,170, 25,115,230,243, 82, 43, 94, 30,195, 64,192, 99,225, 32,229,131, 45,172, 85, 21,190, 65,207,192, 48, 30, + 69,145, 83, 6, 76,225, 59,192, 48, 72,205, 77,188,111, 71,206, 6, 67, 56, 2, 68, 36, 23, 64,163,183,133,230, 43,184,203,160, +204, 72,198, 79,235,182,227,222,221, 59,232,246, 94, 95,108,216,188, 11, 19, 63, 24,172, 47,171,245,195,178,133, 17,173, 23,162, + 89, 10, 41, 31, 0,131,188, 2, 51, 14,253,158,132,234, 85, 89,187, 31, 12, 0,224,160,144, 33, 95,173, 3, 43,116, 64,116,232, + 41,217,233, 75,183,230,206, 91,188,250,139,220,180,176,196,103, 15,175, 33,208, 61, 31, 85,253, 76, 8, 79,119,196,221,236, 42, + 8, 12,168, 6, 86,120,199, 46,237,172,240,250,223, 31, 99, 15,245,110,210,176, 78,203, 74,158,206,208, 25,173,133, 81, 45, 30, +182,109,221,129,248,184,228,241,217,143,143,221,123, 23,142,182, 32, 51, 86, 41,246, 12,248,232,225,173, 11,177,253, 71,124, 4, + 31,191,138, 13,242, 18,239,219,157,182, 96,207,103, 86, 59,141,150, 80,230, 60,119,198, 87,223, 77,235,214,107, 16,110, 94,187, +128,251,225,209,104,222,188, 41,222,123,127, 24,212,170,156, 90, 7,118,172,233,106,209,170,207,242,197,150,105,205, 90,117, 98, + 56,171, 21, 81, 79, 31, 69, 23,167,165, 75,139,184,127, 35, 45,194,241,165,238, 41,247, 90, 13, 20, 78,174,247, 13, 38, 43, 82, + 82,146,241,199,245,203,141,116,105, 17,247,203,115,188,196, 66, 30, 66,238,101,194, 84,184,134,105,187,246, 93,141, 66,214,208, +118,233,234,173, 45,210, 82,211, 88,185,163, 59,231,234, 87, 91,232, 35, 54, 25, 30,196,228, 11, 77,102, 14,213,124,229,165,106, +122,248, 6,124, 59,115,230,140,218, 60,161, 20,234, 2,131, 49, 45, 53,197,123,211,158, 75,154, 39, 79, 31,250, 85,240,116,114, +252,110,205, 47, 66,149,158, 65,102,190, 1, 57,106, 21, 51, 98,242, 44,223, 45, 63, 46, 27, 89,154,209, 42, 38, 93,164,234,201, +144,107,181, 92, 28,132,140, 70,111,225,178, 85, 38,235,136,247,223,110,208,101,161,201,154,180,122,213, 26,217,189, 24, 53, 30, +196,228, 67, 34,228, 65, 36,100, 97, 52,115,176,243,118, 98,189, 61,189,167,180,106, 82, 31,103,239,103,129,199, 99,161, 83,231, +106,249,200,142,108,210,161,155,172,113,179, 22,232,216,161, 61,158, 69, 70, 84, 12, 62,126,168,243,141, 63,174,164, 91, 76, 53, + 63, 46, 80, 70, 30, 41, 87, 96, 65,171,229,153, 69,222, 99,125,252, 42,183, 30, 48,108,172, 83,165,138,126,140,167,187, 27, 44, +132,143, 73, 31, 12,180,251,206,183, 25,115, 96,249,226,185, 48, 24,140,240,112, 22,129, 16, 96,235,186, 5, 48, 26,141,240,117, + 19, 35,191,160,228,213,228,202,242, 35, 37, 69,161,202,149,123,242,130, 25, 43,237,115,134, 97,130,231,204,153,243, 37, 0, 50, +103,206,156, 47,139,182,151, 45, 91,166, 3,144, 90, 70,215,225,166,151,140, 86,209,206,149,124,119, 11, 3,221,221,124,110,132, +156, 61,227,116,244, 1,135,155, 71,238,162, 87,115, 31, 8,249, 44,100, 78,190,120, 16,151,143,147,135, 55,230, 29,219,251, 75, +138,193, 96,248,161,236,190,230,128, 38, 10,153,252,236,111, 59,247,113,238,110,110,236, 79, 33,202,152,108,181,229,121,151, 86, +228,173,227,220,221,179,155,124, 8,152, 51, 18,137, 36,192,104, 52,186,148,117, 98,183,134, 36, 20, 38,241, 50,239,162,110, 5, +195,227, 89,119,238,218, 9,119, 71, 17, 12,102, 14,115,190,248, 84, 55,186,155, 34,111,196,144, 97,157, 58,246,156,118, 81, 32, +175,113,161, 85,163, 26,164, 97,195,134,121, 60, 30,207,174, 84, 10, 79, 79,207, 5, 44,203, 14, 23,137, 68, 14, 70,163, 81,109, +228,244,178, 2,189, 17,122, 19,160,213,234, 33, 16,218,204,162,128,199, 64,167, 55, 66,171, 51,150,126, 99,164, 63,250, 29, 64, + 77,213, 11, 49,165, 11, 79,170,137,118, 31, 56,246,233,160, 33, 67,231,249, 53,120, 95, 17,151,150, 15, 33, 99, 66,211,218, 62, +184,116,230, 8, 73,142,143,156, 81,150,201, 2,128, 76,101,142,191,135,135, 23,238,197,106,144,146,173, 67,122,161,201, 74,203, + 53, 64,173, 83, 35,168,146, 47,242,242,243,253,223,248,248, 2, 71,206,158, 61, 59,184,103,191,161,152,246,197,194, 54,191,110, + 92, 17, 38, 23, 9,198, 21,100, 68, 93,182,199,104, 61,122,244, 40,103,246,236,217,213, 55,111,222,204,142, 28, 57, 82, 87,191, +126,125,201,168, 81,163,218,236,216,177, 67, 34,147, 73,116, 15,174, 29,159, 55,225,147, 57,253, 54,173, 93,210, 32, 55, 55,151, +177,152,205,167, 77,185,185,115, 52,101,152,185,164,227, 95, 62,157, 31, 99, 26,211,181,173,199,113, 87, 25, 91, 87, 76,140,195, + 80,123,193, 62, 60, 89, 96,138, 57,179, 94, 45, 29,188,242,147,212, 60,238, 43, 61,235,185,180, 44,147, 5, 0, 44,143,129,209, + 98,133,131, 84, 0,150,101,139, 76,188,207,182,125,167,101, 30, 78, 34, 8,120, 44,248, 60, 6, 42,173, 25, 89, 42, 19, 62, 26, +107,239, 12, 33,132,179, 88, 9,116, 70, 11,180,133,173, 67,181, 42, 11,115,191,248, 12,239,245,233,143, 9, 83, 62, 67,174, 14, +184, 27,171,134,201,108, 46,243,166, 96, 25, 22, 90,131, 5,227,186, 85, 66,142,198,132, 2,157, 5, 70, 11, 7,153,136, 15, 1, +159,133, 92,194,135,163, 76, 0, 16, 34, 44,170, 76, 4, 2,129,222,108, 54,239, 44,165, 69,143, 42,254, 94,208,153, 89, 52, 27, +186, 2, 93, 90,214, 68,248,239,135,248, 87,110, 62,172, 58,253,139,175,240,233,196, 62, 56,248,180, 58, 92, 61, 43, 65, 33,151, +194, 76, 88, 0,196,206,132,189, 5, 28,107,234, 63,252,231,205, 91, 35, 22,125, 51, 71,146, 87,192, 64, 44,228,225,226,133,243, +184,113,235,238,218,172,199,199,118,226, 29, 34, 32,172,151,163,163, 35, 36, 34, 30,140, 38,131,209,254,212, 5, 2, 2, 52,146, +123,214,252,185,176,197,223,200,202,161,152,207,202, 54, 90,124,137,227,156,143,191, 88,244,109,183, 94,131, 16, 18,124, 16, 7, + 14,238,179,182,236, 49,158,183,107,219, 70,180,233,210, 23,109,186, 13,197,233, 35, 59, 62, 43,224,152, 58,147,166,205, 91,220, +174, 83, 79,132,156, 60,136,140,244,228,149,246,150,151, 39, 96,166,117,234,218, 7,122,163, 21,109, 59,247,198,153, 19, 71, 62, + 65,225, 32, 11,251, 31, 98,175,212,207, 96, 45,159,205,152, 38,200,204, 51, 10,148, 42, 35,146,149, 90,196,101,104,113,108,239, +175,196,254,250,194,216,180, 93, 80, 5,193,164,239, 47, 38,249, 87,240, 49, 8, 12, 58,105,100,116, 76,173, 9, 99, 71, 11,170, + 6,212, 98, 51,243, 13, 80,230, 27,144,149,111,128, 70,111, 65, 64,133, 26,172,217,194,180, 44,239,121,118,119, 18, 9, 54,156, +136,133,163, 92,128, 86,181,222,124,160, 45,199,113,127,154,172,213, 54,147, 21, 22,155, 15,177,144, 7,177,144,133, 88,200,131, +197, 74,236,106,184, 72, 61,107,246,252,232,227, 15,125,141, 22, 32, 59,223, 8, 62,143,129,167,187,139,188,105,131,225,216,186, +226, 19, 0,192,196,217, 63, 97,194,184, 81,168, 93,183, 62,242,114,115,189,135, 15,234,185, 26,192, 17,123,203,122, 42,228,114, +197,144,171,247,102,127, 52,115,190, 98, 72,159,142,188,251, 49,249, 72,203, 49, 32, 58, 82, 93,174,200, 27, 0, 88,172, 28, 8, + 8,182,239, 11,134, 84,196,135, 50,223, 4, 66, 8,150,172,223, 15, 7,169, 0,105,185,182,238,254,210, 40,213,143,148, 18,145, + 42, 71,180,177, 55,108,185, 92, 30,246, 70,180,150, 45, 91, 22,190,108,217,178, 98, 35,100, 47,152,172, 55, 91, 84, 90, 40,148, +215,114,116,115,191, 25,114,230,148,195,145, 7, 86, 92,122,144,141, 65,109, 43, 64,147,147,136, 31,190, 24,146,195,128, 24, 89, + 30, 47,207,160,211, 30,214,233, 10,150, 2, 48,149,122,209,120,215,108, 36,151, 40,206,111,216,244,155,197,221,211, 19, 59,175, +229, 36,231, 22, 88,204,127,118, 91,153,153,187,103, 55, 85,181,112,230, 30,250,140,103,119,202,106,137,115, 4,194,101, 27,143, + 1, 32,224, 56, 14,132,227, 32,144, 40,228,238,213, 90,100, 20, 86,116, 18, 62,203,232, 95,172, 1, 8,103, 73,206,138, 45, 61, + 12,202, 0,112,146, 9,176,239, 74, 10, 0,100,240,212,161, 79, 70, 12,177,117, 23,234,141, 18, 85,221,234,213, 73,211,166, 77, +243,164, 82,187,166,191,226,121,121,121,221,158, 55,111, 94,173, 9, 19, 38,136, 69, 34, 17, 44, 22,139,235, 47,155, 54,113,155, +150, 78,196,128, 79, 54, 64, 40, 18, 67,167, 55, 65, 32,224, 35, 55, 95,131, 60,149, 22,106,173,185,252, 87, 80, 76,140, 81, 9, +124,127,244,136,168,127,119, 69, 80, 51, 17, 43, 68,227, 64, 31, 92, 58,123,148,220, 60,179,117,162, 46, 51,242, 55, 59, 47, 68, +104,244,102,164,102,235,145,146,173, 71,122,174, 30,233, 57, 6,164,231,234,193, 48, 12,244, 70,203, 91, 61,184, 10, 50, 35, 14, +236,252,109, 75, 95,131, 9,195,218,117,235,143,207,230,111,168,180,243,231,229,231, 99, 9,219,218,206, 68, 91,107,120,120,120, +252,216,177, 99, 27,236,217,179,135, 87,175, 94, 61,221,147, 39, 79,100,133, 38,210,164, 80,200,164,191,254,184,236,108,179,102, +205,246,166, 68, 62,189, 88,216,159, 94,102,197, 94,169,253, 24,177,212,116,111, 82, 69,121,171,238,213,188,101,168, 40, 87,119, +175,165,120,240, 67,118,167, 79,191, 85, 94, 92,155,153,102,176,156, 83,234,120, 13, 83, 52, 2,187,114,240,204, 6,125,194,128, + 65,195,192, 99, 88,152,244,218,132,162,139,203,211, 73,132, 5,187,158, 66, 33, 17,192, 65,202,135, 66, 42, 64,155, 58,174, 40, + 71,125, 70,204, 86, 14, 90,131, 21, 58,131, 5,122,163, 5,238,254, 46,216,188,243, 0, 18, 51,117, 56,118, 39, 11, 17, 9,106, +212,168, 32, 7, 33,101, 87,147,156,213, 92,208,103,224, 72, 7, 30,203,128,199, 50,108,157, 90, 53,145,163, 49, 65,200,103, 33, +148, 72, 33, 23,243,225, 40, 21, 64, 40, 20, 32, 51, 51, 19, 6,131, 1, 21, 43, 86,148,148,110, 5, 9, 28, 20, 82,212,168,234, + 11,147,217,130, 83, 87, 31, 99,233,140, 1,232,218,174, 9, 24,129, 2, 79, 13,141,224,224,234, 0,142,101, 97,178,112, 48,154, +172, 0, 88,125, 73,122,254,254,254,157,228,114,185, 92,171,213,170, 19, 19, 19, 47,167, 71, 28, 73,180,242,250, 77, 58, 19,114, +113,103,239,247,186,226, 94, 88, 56, 14, 30, 57,126, 45,203, 45,127,102,209,223,212,173, 91,183,133,187,187,187, 34, 59, 59, 91, +245,232,209,163,219,111,218, 46, 32, 44, 59,189,101,155, 14,208,228,101, 34, 35, 41,206,238, 86,116,237, 74, 14,248,122,217,134, +198,129, 53, 3, 27, 91,137,205,120,213,169,232,128,207,231,175,107, 92,189, 70,205,198, 69, 3, 66,106, 87, 44,125, 90, 54,190, +204,161,219, 7, 19, 62, 91,214,119,208, 24, 92, 12, 57,142, 85, 75,191,216, 41,119,242,168,237,234,226,212,176, 94,139,110,184, +118,254, 56, 36, 14,222,112,113,243,110, 51,114,220,199, 93, 6,141,156,140, 27,215,206, 99,237,242, 47,119, 88, 13,234,221,246, +148, 85,238, 89,213,163, 65,163,102, 35, 28, 92,189,144,151,175,134,131,139, 39,106, 7, 53, 29,241,248,129, 97,118, 65,102,172, +242,141, 77, 7, 33, 48,152, 8,114, 53, 38, 36, 41,117,136, 79,183, 25, 45,142, 43, 71, 78,144,149, 99, 20, 18, 62,223,213,252, +172,226,195,243, 23, 73, 37,127, 47,230,251,197, 95,240, 76,144, 64,153,103, 51, 89, 74,149, 17,202,124, 35, 52,122, 51, 92,229, +124,112, 86,174,220,173,238, 92,141, 9, 14, 50, 1,156,100, 66,187,163,140,197,177,113,219,190,192, 7,145,169,239,175, 90,181, + 70,118, 63,246, 5,147, 37,176, 69,179,196, 66, 30,172, 28, 7,216,113,199, 11,248,130,105,253,122,118, 65, 82,150,206, 54,106, +153,101, 80,163,126, 51,184, 75, 57,116, 30, 58, 7, 0,208,167,167, 45,181, 45, 54,173, 0, 39,110, 42,129,151, 19,187, 75,175, +139,117, 58,222,166, 93, 39,167, 31,216,191,215, 73,111,229,227,151,211,241,208, 26, 44,144, 8,121, 16, 11,121,144, 10,121, 47, +229, 99,151,109,180,108, 57,119,137, 89,102,104,245,122,168,116,102, 16, 0,183,159,105,160, 51, 90,144, 95, 96, 70,139, 90, 46, +111, 23, 8, 97,152,147,132,144, 94,175, 26,162, 87,205,210, 11, 17,169,226, 52,238,188,168, 81,244,253,146,140,220,139, 57, 91, + 0,202, 53,130,139,255,170,115,124,113, 91, 40,119,169,237,228,224,116,243,204,233, 96,197,145, 7, 28, 46,135,217, 76,150, 89, +151,133,149,179,135, 39,171,242,178, 58, 2,136,177,247,159,201,220,107, 7, 73, 68,226,139,223,173,249,197,228,233,229,199, 29, +190,153,151,153,175,181,190,228, 38,172, 6, 3, 75, 56, 34,212,103, 60,179,171, 15,129,101, 25,211,252, 79,250,131, 35, 4, 11, +214, 28,192,183, 51,135, 66, 33, 29, 41, 99, 24, 70, 86,160,183, 96,198,194, 45, 88,249,245,120, 7,153,152, 15,134,177,229, 68, +125, 48,172,191,125, 23,160,222,130,232, 91,123, 52,234,216,224, 39, 47,118, 23, 54,111,243,222,221,230,205,155,231,185,184,184, + 64, 42,149,254, 25,169, 40, 1, 47, 47,175,175,231,207,159, 31, 56,101,202,148,231,147,125,242,249,124,124,244,225,135,172,213, + 74,112,250,244, 86,120, 84,110,132,227,231,110,162, 71,167,166,208,104,245,200,201, 83,131, 3,239,141, 47, 68,117, 94,214,197, +244,248,135,205, 90,119,236,131,203,103,143,146,155,167,127,157, 88,158, 57,122, 92, 92, 93,146, 66, 31, 70,215,102, 24, 87, 91, + 68,171,208,100, 25,205, 28, 42,121,201,144, 20, 31, 13,103, 39,167, 36,123,245,164, 30,129,253, 24,150, 76, 97, 64,182, 22,100, + 68, 29, 0, 64, 10,210,158, 12, 63,176,123, 83, 88,248,163,251, 75,123,143,152,198,239, 54,232, 67,222,207,203, 62,254, 18,128, +189, 19,239,153, 34, 34, 34, 30,143, 31, 63,190,213,141, 27, 55,172, 0,180, 12,195,152,121, 60,158,204,104, 52, 10, 59,118,236, +152,255,244,233,211, 43, 40, 62,105,241, 37,218,140, 61,224,206,136,213,239,137, 56,211,240, 74, 14,234,174, 29,219,182, 68,203, +186,254, 72,106,219, 18, 0,166, 37,104, 20,129,250,234, 91,246,153, 45,210, 83, 63,111, 59,241,237,196,161, 93,102,236,228, 47, + 88,149, 22,188,160,212, 68,212,164, 39, 87,186, 23,103,227,249, 60, 22, 14, 82, 1, 20, 82, 62, 28,164, 2, 56, 72, 4, 48, 91, + 72,121, 90,142,196,108,225,108, 17, 45,163, 5, 26,157, 5, 23,239,103, 32, 61,223,136, 60,181, 9, 58,147, 21, 4,196,214, 26, +181,163, 54, 87, 62,251,195,185,232, 73,234, 92,177, 81,254,166,245, 43, 28, 15,253,158,252,124, 68,159,147, 76, 4, 7,153,109, + 52,246,213,171, 87,225,230, 86,118,107,159,227, 56, 28, 60,115, 27,171,182, 95,196,153,173,179, 32, 17,242, 16,212,111, 33,198, +188,223, 28, 28,225, 16, 29, 17,158, 81,163, 78, 3, 47,150,149,130,101, 24, 24,204, 28, 0, 82,226,241, 52, 26,141,110,137,137, +137,170,128,128, 0,111, 95, 95,223, 65, 60, 30,143, 64,125,223,112,116,111,142,246, 66,240,110, 89,129,206, 96,149, 89,242,183, + 6,164,233,122, 33, 32, 0, 12,195, 16, 71, 71, 71,225,197,139, 23, 53,245,235,215,247,120,195, 91,137,149,122,214, 92, 59, 97, +234,244, 65,213,171, 85,195,129,221, 91, 65, 8,115,200,222, 63,222,117,226, 6, 22,207,125,121,132,225,231,243,215, 53, 94,185, +112,218, 75,159, 77,157,187,170,212, 81,135, 82,177, 98,230,128,225,147,112,247,246,117,252,176,240,243,189, 6, 77,206, 24,179, +197, 60, 56, 39, 45,118,111,213, 58,205, 65, 76,106,132,236, 95,129,161,163, 38,138,187,245, 30,132, 27,215,206,227,219, 47,167, +238,210,230,101,142,133,157, 73,206, 28, 17, 76,233,216,253,125,129,206, 96,194,186,239,191,193,228,153, 75,209,162, 83, 31,193, +163,251, 55,167, 0, 88,100,119, 58,132,201,138,142,245,221,109,230,217,204,225,120, 44,143, 95,220, 21,200,231, 49,108,195,106, +206,208, 25, 45, 80,149,209,168,228, 11, 5,233,121,249,170,202, 63,126, 59,157, 87,160,183, 64,153,111, 68,102,190, 1, 89,121, +127, 26,172,172,124, 3,148,249, 70, 8,248, 12, 34, 99, 18,192, 10,248,229,206,207,203,213,152,209,172,166,139,237, 30,125,195, +222, 17, 51,223,177,249,153, 43, 15, 6,172, 90,181, 90,242, 32, 78,141,176, 88, 85, 97, 36,139, 7,177,128,133,168,240,103, 43, +103,203,141, 44, 13, 71,143,106, 85, 71,127, 48,178,179,163, 66,138,212,168, 76,240,121,182, 41, 98,156, 60,253,225, 36,214,227, +227,169,147,224,238,230,140,196, 44, 3,214, 30,137, 68,216,227,103,224,116,229,219,237,117,191,236,237, 49,225,163,207,157, 89, +129, 8, 59,206,198,217,202,201,179,226,233,205, 19,250,212,232,135, 5, 26, 85, 54, 1,177,218,153,131,204, 16,139,213,118,185, +125,187, 96, 14,246,110,255, 9,103, 67, 51,159, 95,129,191, 31, 90,137,233,115,151, 32, 75,101, 68,113,215,101,105,126, 4,128, +242,133, 72,212,107,219, 47,152,163,226,182,153,194,109, 99, 9, 26,198, 87,204,149,241,149,207,141,175,232, 21, 55,247,223,166, + 50,187, 14, 95, 51, 69,206, 30,245,100, 18,249,245,211,167, 79,200,143,134,145,231, 38,203,164,205, 34, 75,167,245, 73, 86,229, + 41,187,149,203,100,121,212,168, 39,150,137,175,204, 91,178,214,224,229, 87,217,114,234,190, 42, 91,173,183, 90, 94,207, 65,144, + 91,229, 78, 30,122,190, 72,188, 74,160, 51,126,147,149,245,164,160,172,200, 19, 71, 8,130,111,165,131, 16, 91, 19,105,255,213, + 20, 20,182,204, 97,229,108,221, 42,231,238,103,130, 95,152,135, 98,111,248,123,227, 47, 63,169,122,213,207, 47, 24,241,237,130, +231,221,133, 45, 26,216, 34, 89,142,142,142,112,118,118,134, 66,161, 64, 89, 93,135, 12,195,124, 48, 97,194,132,215, 90,255,153, +153,153,232,210,185, 35,214,255,180, 25, 13, 58,143,198,185, 63,206,194,100,230, 16, 84,167, 26, 42,251,186, 32, 41, 67,253, 70, + 55,186,220, 43,240,163,102, 29,223,255,178, 77,167, 62,184,120,230, 48,185,121,102,219,164,242, 78,132,216,171, 75,171, 19,139, + 23, 47,168, 58,111,233,143, 98, 7, 9, 31, 79, 52, 70,176, 12,131, 74, 94, 50,184,201, 89, 92, 62,186, 67, 63,180, 79, 43,187, + 39,199,243,247,247,219,185,114,253, 38,249,202,229, 11, 59,222, 13,101, 46,106, 82, 35,115, 0, 64,155, 17,241,253, 83,224,113, +133,235, 33,167, 26,180,239, 15, 47,223,106, 93, 99, 51,158,218,109, 54, 0,104, 99, 98, 98, 98,231,205,155, 23,184,124,249,114, +194,227,241, 56, 0,226, 53,107,214,104,163,162,162,238,195, 54, 52, 23,101, 61,108, 58,119,173, 59, 67, 33,178,182,112,149,177, +117,171,121,203,208,178,174,173, 87,116,104,175, 54,240,175, 88, 17, 49,233,218,134, 57, 90, 78,160, 49,242,170,109,248, 37,236, + 78, 21,119,222, 68,139,206,248, 24,192,177,242,158, 31, 6,127, 38,200, 23, 69,179, 28,164, 2,112,182,107,165, 92, 70,203, 96, +178, 66,103,176, 66,103,180,160,192,104,133,214,104, 5, 71,108,247, 4,195, 48, 48, 89, 56,216,213,108,126,229,218,119,116,117, + 71,181, 42, 12, 28,101,182,178, 57, 22, 78,247,192, 0,112,115,115,131,167,167,167, 93, 81, 81,163,201,118,139, 27,205,220,243, +110,125,163,201, 2, 66, 8, 34, 35, 35,102,197,199,198,246, 11,168, 17,208,174, 78, 80, 3, 87,153,152, 5,128, 18,141,150, 86, +171,181, 58, 56, 56,120,186,186,186,178, 41, 41, 41,207,205,115, 64,195,142,150, 35,135, 15, 97,192,128,254,154, 39,183, 31, 60, + 31,226,174,211,233,152,214,173, 91, 59,250,251,251,179, 6,131, 65, 85,222,211, 36,247,168,249,190,139,155,235,210, 15,198, 78, +174,217,177, 75, 15, 92,186, 16,130, 99,135,247,252,166, 85, 70,134,216, 43, 18, 24, 88,235,181, 81,135,213,107,212,124,109,212, + 97,229,170, 53, 74, 53, 90,117,130,154, 54, 39, 12, 31,103,131,247, 19, 61,107,154, 10,128,179,234,213,251,247,109,252,122,209, +240, 41,115,171,247,236, 59, 28, 31,140, 26, 3, 62,159,135,203,231, 78, 96,229,194,207, 78,106,242, 51, 71,219,147, 38, 96, 11, +189,213, 22,250, 73,253, 63,173, 88,189, 30, 66,111, 94, 67,116,228,163,240, 7,119,110,212, 13,168,223, 2, 30,190,149, 62, 77, +112,231, 45,199,147, 39,166,178,100,140,122,125,194,152,209,163,240,226,168,195,150,141, 2,221,152, 87,111, 0, 0, 90,117,166, +233,215, 21, 51,162,138, 70, 29,114, 38, 99, 66, 73,186,249,185,202,131,151,255,184, 53,179, 95,175, 30,108,150,202,104,139, 96, +229, 27, 11, 95, 6,100, 21,253,172, 50,160,134,175, 2, 17,225,161,156, 62, 63,235, 80, 57,239, 75,253,152,193,221, 31, 23, 93, +187, 28, 71,192, 0,250,114,119, 75, 9, 28, 39,125,255,195, 42,201,131, 88, 13,194,226, 84,182,174, 66, 1,207,102,176, 4,236, +115,211,101, 27,205, 94, 70,116,136,225,125, 59,110,244, 48,100,169, 76,224, 56,128,207, 99, 11, 95, 66, 36,170, 25, 36,169,181, +200,202, 85, 34, 54, 62, 1,121,233,209, 96, 89, 22,238,190, 53,237,158, 73,218, 74, 68, 62, 90, 35,169, 63,168, 87, 59,254,225, +235,105,144,137,249, 48,168, 51,112,122,223, 10,165, 65,163, 90,170,211,106, 14,219, 51,159,227,159, 41, 8,140, 82,165,209,123, +137, 5, 60, 28,216,254, 35, 6,143,153,250, 82,237, 59,235,171,197, 0,203, 32, 39, 87, 13,134, 97,148,229,171,151,152, 59,165, +109,191, 97,100,236,173, 53,138, 49, 91,175, 55, 20, 74,110,141,146,211, 33,103, 78,200,127,143, 23,227,118, 68, 90,161,201, 82, +114, 75, 62,233,149,172,206,207,233, 14, 32,178,124,237, 66,182,251,208,113, 51,195,171,213,172, 99,184,244, 72, 19,151, 87, 96, + 46, 49,207,161,229,160,121,225,119, 79,174,239,153,111,142,249, 80,238, 83,199,202, 89, 44,223,235,148,145, 11, 75,232, 58, 20, + 45, 92,123,224,121,183,225,236,229, 59,108, 63, 91,173,176, 18, 14,132, 3, 62,254,122, 35, 44,156, 21,156,213, 10,206, 74, 96, +182, 18, 89, 89,197,245,244,173,124, 56,247,233,254, 90, 35, 22,189,222, 93,232,236,236, 12, 55, 55, 55,184,185,185,193,209,209, +177, 76,163, 37, 16, 8, 20,124,254,203,135, 58, 33, 33, 1,241,241,241,112,116,116, 4,225,204, 48,154,129,122, 45,186,225, 97, +244, 35,156,255,253, 62, 8,103,133, 92, 81,254, 85, 94,228, 94,129, 31, 54,237,208,239,199, 78,125,199,227,220,225,253,123, 52, +228, 0, 0, 32, 0, 73, 68, 65, 84, 95,200,157,171, 39, 38,235, 50, 35,183,216, 29,161,183, 90, 25,179,217,140, 94,221, 58, 36, +220, 11,127,118,230,171,153, 83,122,180,234, 61, 89,220, 50,208, 15,122,163, 21,201,241,209,184,124,116,155,190,102, 85,159,179, +157,219, 54, 79, 48,155,205,176, 90,173,101, 62,200,245, 70, 83, 22, 79, 32,149, 15, 27, 54, 66,112,231,246,237, 67,114,143, 26, + 7,172, 12,251,128, 33, 92, 16, 67,200,128,160,160,218, 48,153, 57,104,181,170,220,242,238,179, 90,173,142,221,186,117,107,213, +209,163, 71,203,234,212,169, 35,136,142,142,198,202,149, 43,179,213,106,117,172,189, 26, 33, 87, 35,214,240,153,220,168,162,136, + 86, 98,155,150, 24,214,187, 13,246,158,252, 29,151,175,221, 64,130, 70,113, 95, 99,225, 31, 77, 74, 72, 53,212,117, 85, 29,234, +219,178, 50,239,192,246,220, 67,225, 29,230, 12, 33, 68, 28,146,117,101, 65,129,253, 55, 55,160,214,153,225, 40,179,205,247, 84, + 20,217,226, 49,140,221,142,136, 1, 98,175,221, 8,173,215,164, 70, 29,220,139,205, 71,102,158, 1, 58,131, 5, 28, 71,192,129, +192,205, 65, 4,137,144, 69, 98,124, 44, 56, 98,138, 43,231,163, 66,217,190, 93,123, 62,192,128, 97, 8, 95,192,231,131,192, 54, +191,162, 84, 42,213,120,122,122,218, 21,209, 50, 89, 44, 24,208,163, 57, 90, 52, 13, 66,191,201,182, 57, 51, 47,252, 54, 7, 46, + 10, 1,246,238,220,130,164,171,107,118, 86,109, 57, 37,228,209,195,240,129,225,247,174,143,120,175,177,180,161, 55, 63, 85, 88, + 82,152,180,160,160,224, 16, 0,145, 80, 40,236,209,174, 93, 59,215, 67,135, 14,229,185,187,187,115, 34,161, 80,217,183, 79,111, + 78, 32, 20,230, 20,125,247,143, 63,254, 16, 76,158, 60,217, 33, 55, 55, 55, 49, 35, 35,227, 6, 0,115,233, 13,193,192, 46, 96, +177, 7, 12, 35, 81, 72,101, 9, 85,170, 84,243,109,218,162,185,211,251, 3, 6, 67, 44, 18,227, 92,200, 25,172, 91,189,124,191, + 38,237,201,184,242, 28,201,119, 53,234, 48, 57, 49, 46, 86,171, 51,212,175,215,164, 3,115, 45,228,232, 52, 19,220, 87,243,196, +166, 21, 93, 6, 76,173, 30,155,170,193,186,101,179,224,226, 36, 71, 92,244, 83, 93,212,147,135, 27,205,122,213, 44,187, 77, 22, + 0, 89,182,117, 96,203, 81, 61, 92, 12, 38, 43,174, 94, 60,169,231, 44, 92,143, 27, 87, 78, 69, 87,168,217, 84, 82,175,105,103, +151,172, 99, 91, 6,104,129,189,101,233,164, 60,125, 61,130, 75,140,121,113, 23, 46,158,119,242,170, 84,151,199,128,129,201,160, +135, 50,230,142, 69,155,241, 84,165, 74,121,100,215, 40,220,236, 36,124, 61,119,254,119, 31, 54,109,210, 68, 78, 32,121, 41,130, + 85,100,176,178, 84, 70,184, 59,136,160, 83, 41, 17,117,231,140, 94,171,228,149, 58,223,153,197, 88, 32,203,202,204, 16,253,153, +206, 16,217,162,180,239,103,101,102,136, 44,198, 2, 89,217,143, 58, 30, 28,229, 34, 60,140, 75,121,158,248, 46, 22,216,114,179, + 68, 2,222,243, 60,173,162,186,160, 12, 58, 8, 37,206, 72,201,214,131, 1, 1,103,181,192, 98, 54, 66,173, 82, 33, 37, 53, 29, + 25,233, 25, 80,171,243, 32, 83,184,160, 94,195,102,112,144, 75,240,224,242,126, 16, 66,236,154,215,208,204, 8, 2,155,182,104, + 43,126, 20,111,203,197,146, 8, 8, 78,236, 89,158,173, 81,101,182,213,164, 69, 69,149,183, 46,182, 88,173,231,195, 30, 71,213, +173,224, 83,133,185, 31,157,143,157,155,215,195, 88, 24,217, 52,155,173,120,148, 88,128,180, 28, 45, 18, 99,158, 16,206,106, 61, +143,255, 8,252,146, 3,128,224, 7,213,171,141,110, 35,223,199, 79, 63,109, 68, 76,108, 60,183,116, 90,207, 68,141, 58,239,189, +114,152,172, 46, 40,156,107, 67,155, 17,241,189,206,165,105,242,241,123, 57,172,206, 72, 74, 77,240,145,120, 84, 66,219,113, 43, +207,234,212, 57, 34,171, 65,203, 63,177,115,220,158,226, 52,109, 14, 26,198,165,159, 15,133, 66,202, 7,195, 48, 40,234, 46,220, +176,120, 18,100, 98, 91,223,178,206, 96,193,200, 25,171,176,115,213,103, 32, 0,134, 15,254, 93, 91, 82, 57, 97, 91,187,240, 99, + 31,220,174,144, 16,159,153,210,165,207,231, 23,244, 38,177,161,119,255,209,119,155, 52,105,146, 39,149, 74, 33,149, 74,225,232, +232, 8, 23, 23, 23, 56, 59, 59,151,185,239,102,179, 89, 99, 52, 26,221, 68, 34, 17, 56,142, 67, 92, 92, 28,226,226,226,144,159, +159, 15,165, 82,137, 2,141,202,114,251,194, 1,126,189,150, 61,225, 91,173, 62, 42,213,104, 0, 1,143, 1,159,207,226,242,241, +205, 37,149,179,120,147,213,190,239,134,206,253, 38,224,220,225, 77,228,206,213, 19, 83,116,153,145,155,237, 61, 71,133,221, 61, + 15, 6, 12, 24, 80,127,242,228,201,194,249, 51, 39,159, 61, 25,114, 57,242, 64,240,166, 62,185,185,121,254,132, 16, 56, 59, 57, + 37, 13,237,211,234, 68,199,214, 77, 19, 46, 92,184,192,237,217,179,199,192, 48,204,195,210, 52,109,149, 84,230,111, 23,206, 95, + 92,208,182,125, 7,108,217,190,167,125,248,227, 39,237,163,163,163,224, 95,169, 26,170, 84,173, 1, 45,227,130,139, 87,174, 65, +147,151,249,155, 61,229,124, 37,170,197,228,230,230, 94, 31, 58,116,104,183,223,127,255,157, 29, 58,116,168, 54, 43, 43,235,143, + 23,162, 88,164, 44,205, 27, 63,247, 87, 2,248,173, 82,251, 49,251, 83, 76,121,159, 2, 88, 94,177, 82, 69, 92,190,118, 3, 55, +126,191,181, 49, 75, 86,113,225,184,145, 99, 39, 85,238,203,155,208,183,101,101,158,167,139, 12,187, 55,173,228, 29,191, 17,191, + 42, 62,219,186,101,249,149, 5,139,237, 57, 71,207, 31, 28,106, 19, 90,215,118,133,217, 74,192, 17, 91,133,235, 32, 17,148, 84, +241,190,166,201, 55,138,199, 77,153, 60, 57,186, 94, 80,195,233, 35,199, 78, 17, 54,172,230,143,219,207,242, 0,134,129,171,183, + 28,105,105,105,184,122,112,147, 37, 55,229,233, 70, 30,143, 91, 84,142,227,137,220,132,251, 1, 47,108, 78,202,202,202,194,229, +203,151, 81,100,176, 60, 60, 60, 74, 50, 90, 47,105,102,103,164,254,177,248,135, 95, 90, 79,252,160, 63,122,119,168,139, 43,119, +162, 97, 44,156,175,169,104, 40,121,236,141,159, 69,159, 14,173,102,252,112, 64, 77,149,206, 44,138,255, 58, 46,255, 42,108,107, +176,114, 37,148,211,152,147,147,115, 60, 34, 34,162, 77,131, 6, 13, 42,159, 58,117, 42, 39,252,214,217,105, 47, 22,226,243,207, + 63, 87,252,244,211, 79, 50, 66,200, 31, 70,163, 49,198,174,125,103,177, 59,244,238, 93, 55,147,153,195,181, 91, 15,106,119,110, +221, 16, 28, 1,238,220,185,131, 45,191,110,209, 63, 12,187,191,162, 32,195,123, 81, 41,230,165,216,227,105,125,187, 81,135,207, + 53,211, 82,226, 87,156, 59,121,112,103,211,246,125, 48,226,227, 69,139, 46,159,220,179,160,113,219,222,108,237,166,221, 16,122, +227, 34,206,159, 58,243,157, 73,147,179, 0,101,231,142, 20, 91, 78,177, 84,246, 73,157,198,237,145,152, 16,143,184,168, 71,191, +233,115,158,165, 38, 68,243,126, 75, 77, 78,152, 82,181,110,107,252,126,118,239,180, 82,140, 86,169,215,188,191,135,116,211,169, +224,227,195,146,147,127,246, 46,208,233,197,132, 16,189, 88,196, 79, 87,176,234,125, 42,187,203,249,196,164, 76,173, 60, 96,240, +200, 41, 39,215,173, 91, 45,240,114,150, 33, 61, 87, 15,149,206, 4,181,214, 4,150, 97, 16,224, 43,135, 86,157,131, 43, 7,127, + 48, 27, 53,185, 67,129,104, 83, 73,154,114,207,192, 37,185,207, 46,126,252,249,212, 75, 16, 57,249,251, 86,233, 52,183,212,104, +157, 58,229,126,159,207,167,158, 8, 36,132,116,150,123, 6,170, 11, 50, 35,230,149,180,239, 12, 99,187,191, 71,116,244,135,201, + 98,155,127,204,194, 1, 86,142, 43,140,242, 1,228,121,127, 62, 83,198,190, 51,220,190,147,127, 32, 53, 35, 15, 58,163, 25, 6, +163, 5, 38,179, 21, 44,143, 7,103, 23,103,212,168,210, 8, 78,206,142,200, 72, 79,197,141, 11,199, 17, 25,118,229, 15,134, 96, +161, 78, 25,117,193,158,115, 36,148, 58, 7,250,248,122,179,105, 42, 35,164, 34, 30,238, 95, 57,101, 50, 27, 13, 43,236, 52, 89, +175,105,230,101,231,172,154, 62,243,139,225,219,182,110,247,174, 95,213, 17,201, 89, 58, 36, 43,245, 80,235,205,133, 70,140,131, + 65,147,133,176,139,219,211,173,122,245, 42,252, 71, 40,209,104, 89, 76,122,245,161, 51,183,221,230, 44,248,129,247, 44, 58,198, +188,228,211, 94,201, 58,141,170,103,185, 35, 89, 47,176,237,163,170,123,255,138,157,120,173,187,144,112,224, 8,193,137, 91,233, +207,187, 11,185,194,204,203,123,209,165, 47, 35,248,226,218,133, 29,122, 78, 59, 23, 22,161,222,165,211,101, 56, 61,125,182, 34, + 23, 0,120, 60,222,243, 87, 81,110,150, 94,175, 55,150,209,133,178, 99,243,230,205,179,167, 76,153, 34, 78, 74, 74, 66,116,116, + 52,242,242,242, 32,145, 72,112,230,204, 25, 51, 56,203,138,176,223,143,196, 69,132,134,124, 19,216,164, 91,133,250, 45,123, 66, + 38,147,131, 79,236, 79,198,148,121,214, 28,214,164,125,223, 31, 59,191, 63, 17,231,143,108, 38,119,174, 28,159,170, 83, 70,110, + 42,239,177,204,203,203, 11, 7, 16,181, 98,197,138,134, 91,182,108,169, 58,115,230,204,152, 29, 63, 46, 88, 7, 0,217,217,217, + 0,128,123,247,238,145,169, 83,167, 26,244,122,125,108,110,110,110, 40,202, 24, 0, 1, 0, 58,165,236,219, 45, 27,150,215, 75, + 74, 73,235, 95,173, 94, 51,120, 84,109, 6,239,128,230,200, 85,155,112,251, 89, 42, 98,158, 92,192,147,107, 7, 79,105, 21,150, + 5, 40,231,252,198, 13, 26, 52,240,103, 89,182,138, 70,163,241,174, 83,167, 78, 3,185, 92,126,175, 65,131, 6,141,248,124,126, +242,221,187,119,227,203,163,149,112,101,187,161, 82,251, 49,107, 19,212, 14, 29, 99,210,181,141, 18,212, 14,247,180, 98,167,207, +148, 23,215, 26,182,241,252, 86, 17, 83, 86,248,129,237,170, 67,187, 55,173,228,141,156,244,185,245, 81,190,203,167,124,169,232, + 92,249,194,213,108,218,135,163,251,253, 57,189, 67, 97, 36,171,240,103,187,194,244,249,249, 97,249, 0,102,135, 61, 22,252,248, +232,211,201,139,131,154,182, 30,213,238,189,161,172, 69,168,192,217, 35, 63,147,216,176,139, 7,248,196,250,149,206,142,213, 0, +202,236, 14, 50, 26,237, 49, 89,175,151, 49, 73,222,225,192,158, 95,199, 28, 58,114,120,217,251,125,251,185,109,248,122, 8,126, +248,229, 40,228, 82, 49, 8,199, 97, 72, 71,255, 65,223, 76,168,213,199,223, 75,226,119,232, 82,242,213,143, 87, 63,154,173,213, +154, 34,237,136,196,144,172,172,172,107, 10,133, 66,217,166, 77,155, 22, 98,177,152,201,202,202,226,123,122,122, 90,156,156,156, +140,201,201,201, 90,131,193,112, 8, 64,185,166, 29, 55,153, 57,196,101,232,113,236,240, 33, 60,184,117, 1, 79,158, 68,168,159, + 60,126,178,158,225,147,213, 5, 25, 81, 57, 64,185, 27,248,224,138, 29,117, 72,202, 61,234,208,106, 80,239,222,177,113, 73, 39, +173,222, 48,166, 65,171, 94,168, 92,187, 53,107, 50, 91,241,240,206, 37, 92, 58,184,250, 7,147, 38,103,206,219,156, 99,223, 10, + 85,107, 16,158, 8,215, 47,159, 4,225,184,141, 0, 64, 56,110,227,189,223, 79, 77,105,222,115, 2, 92, 61, 43, 55,200, 75,188, +199,224, 13,102, 15, 23,242,217,130,211,135,182, 29,137,139,139,195,211,167, 79,241,236,217, 51,228,228,228, 96,247,238,184,114, +157, 31,109,110,252,185,200,199,108,247,129, 67, 70,156, 24, 52,236, 3, 73,213, 26,245,217,192, 10, 46,112, 83,240, 17,241, 44, + 30,145,119,195,184,136,219,167,244, 38, 85,230,251,186,220,248, 18,141,159,204,189,182, 23, 96,157, 83,180,118, 97,203,150,173, + 3,191, 88,186,172,133,155,135,103,177,245,120,182, 50, 83, 52,235,227,227,129, 55,110, 94,183,107,173, 67,206,106,205,158, 52, +102, 40,199,179, 45, 20,138,231,113,234,194,163,103,107, 76,217, 62, 39,156,165,204, 8,254,216,254,109, 97,225, 56, 20,232, 76, + 80, 21, 24,144,175,214, 35, 45, 51, 27, 15,194,194,112,229,196,113, 68, 71, 60,136, 53, 27,141, 33, 44,203, 28,212,101, 68, 94, + 41, 95, 79, 19,191,170,155,171, 43, 98,115, 52,144,136,248,136,143,188,107, 40, 80,229,239,122,211,235, 72,151, 29,149,150,201, + 99,186, 13, 29, 58,236, 76,167,238,125,157,154,182,234, 34,115,119,116,134,144, 79, 16, 21,151,138,208, 63,206, 20,196, 60,184, +170, 50, 27, 53, 61,222,197,170, 47,255,227,148, 61,234,208,100, 40,232, 51,188, 95,251,195, 60, 30, 95,196,113, 22,131,201,104, + 24,248, 54, 38,235,175,130, 16,107,242,152,225,253, 95,106, 27, 88, 56, 34, 29, 62,248,172,238,197,182,130,217, 74,100,195, 7, +255,161,181, 85, 32, 37, 39,246,249,248,184,246, 42, 90,187, 48, 33, 33,251, 78, 78,142,225, 18,128,100,189, 94,255,198,101,204, +200,200, 88,188,116,233,210,222, 90,173,182, 86,135, 14, 29,196,142,142,142,200,206,206, 70, 72, 72,136, 57, 56, 56,248,113,102, +102,230, 55, 64,166, 69,135, 70,191,133,233,143,140,142,184, 27,242, 77,173, 38,221, 43,212,111,213,211,254,202, 76, 44,157,216, +169,239,120,230,252,209,205,228,246,229,163, 31,234,148, 81,191,188,197, 97, 53,233,245,250, 91,122,189,254,209, 87, 95,125,213, +212,203,203,203,235,155,111,190,145,168, 84, 42,193,134, 13, 27,244, 89, 89, 89,233, 42,149,234, 6, 74,201,167,121,157,123,230, +252, 20, 12, 56,125,104,115, 71,114,104,115, 87,103,119,191,110, 78, 30, 21,170,231, 41, 83, 98,243,149,169, 33, 0,206, 23, 78, + 20, 89, 46, 26, 54,108, 88,141, 97,152,161, 0,234,201,229,242, 0,133, 66, 33, 38,132,212, 98, 24, 38,156,227,184,176, 58,117, +234, 4, 63,126,252,184, 92,147,201, 38, 92,217,110,240, 15,108,189, 39, 71,203, 9,141,172,112, 79,194,149,237, 6, 0,200, 60, +247,133, 22,192,177,199, 29,102, 15, 56,126, 35,126, 93,120,174,211, 52,229,229,101,199,203, 91,230,252,228, 7, 1,239,234,250, +215,167, 61, 78, 6, 48, 38,236, 46, 86, 62,188,119, 99, 62, 67, 32,176,194,178, 68,151,249,236,238,187,208, 23, 8, 4,122, 63, + 63,191, 98, 71, 23,138,197, 98,189,193, 80, 90, 0,229,138, 69,147,134, 45, 64,251,237,135,247,111, 31,115,244,248,177,101,237, + 58,191,239, 38,169, 80, 1, 85, 60, 25,108,159,211,120,218,133,123,202,219,125,191,184,250, 83, 76,170, 62, 12,229,204,135,209, +104, 52,145, 0,114, 53, 26, 77, 63, 66, 72, 18,195, 48,254,185,185,185,247,205,102,243,195,114, 27, 2, 14, 35, 90,182,108,182, +155, 97, 24, 62,177,112,223,223, 16,240,246,232,211,158, 36,227, 45,151, 37,169, 95,197, 17, 51,190, 89,219,184,122, 64,205,198, + 69,107, 29,214,173,236,128,201,179, 87, 54,174, 92,181, 70,227, 63,215, 63, 44, 51, 77,128,152,181,185,227, 14,255,250,253,213, +123, 55, 47,125,233,238, 83,185,114,122,114,204,147,164,103,247, 23, 91,245,170,195,111,123,158,227,158,133,175,222,178, 98,246, +204,180,148,216, 45, 90,101,212, 35, 0,208, 42,163, 30, 61, 9,197,215, 89,233,201, 51,179, 51, 99, 86,188,233,177, 40, 40, 40, + 72,221,181,107,151,115,235,214,173, 89, 47, 47, 47, 40,149, 74, 92,186,116,137,227, 56, 46,165,220, 90, 57,177,151, 10,114, 24, +215,223,126,249,241,123,161,220,161,167,197, 98,241, 37, 4,224,243,249,105, 70,173,234,140,154,149,127,129,220,120,125,233,207, + 12,142, 1,192, 22,173, 93,200,113, 28,243,253,186,237,241, 2,137, 67,177,147, 33,154,245,106, 25,199,113,118,175,117,152,151, + 24, 90,253, 93,221,223, 12, 33, 11, 27, 52,105,241,165,217,108,210, 23,222, 31,122, 0,122, 66,144,205,178,204, 21, 30,103, 62, +171,122,139,198, 20,195,192,145, 48,124, 56, 72,249, 96,192, 64,147,159, 67,202,147,147, 85,172, 33,206,140, 12,215,102,182,175, +116,218,184,127,244,197,115,167, 6, 91,173,214, 42,133, 49,131, 56,131,174,224,128, 38,205,229, 55,224,174, 5,255,126, 78, 22, +153, 45,230, 47,254, 71,118,117,163,252, 47,105, 6, 86,149,246,171,224,231, 53, 58, 46, 62,243,118, 76,146,246, 55,188,188,172, +206,219,148,147,231,229,229,245, 53,195, 48,163, 68, 34,145,194,104, 52, 22, 16, 66,118,100,100,100, 44,198,107,139,255, 54, 18, + 72, 61,117,163, 69, 18,217, 60,147,190,224,186, 54, 51,114, 68, 89,251, 46,243,168,217, 77, 34,151,207,214,235, 10,118,104, 51, + 34,183,191,227,227,233, 36, 22,139, 27, 41, 20, 10, 65, 86, 86,214, 45, 0,249,255, 75,231,189, 65,131, 6, 21, 89,150,173,194, +113,156, 23, 0, 39,216, 70,133,100,241,249,252,148,194,136, 22, 41,175,102,155,177, 7,220, 59,119,173, 59, 35,228,106,196,154, +194,110,197,231,248, 13, 90, 37, 25,213,179,227,231,191, 29, 62, 86,220,168,195,127,220, 53,255,255,167,217,158,175,240,201, 26, +195,138,156,150,116, 14,212,107,179, 82, 83,166, 94,123,168,188, 5, 64,253, 54,229, 20, 10,133, 35, 77, 38,147, 84, 40, 20,234, + 76, 38,211,174,255,149,125,151,122, 6,142,103, 65,236, 94,153,130, 3,115,247,149, 65, 43,255,150,107,137, 87,191,126,253,182, + 66,161,176,162,213,106,149, 25,141, 70,173, 78,167,139,139,143,143,191,142,146, 23, 62,255, 75,203, 41,247,172,177, 90, 40, 20, +127, 10, 0, 38,147, 97,109, 65,102,212,140,210,254,176,148,239,255,163,207,145,123,149, 38, 81,124,158,192, 3,133, 19,115,115, + 22,139, 50, 35,246, 78,141,191,177,156,148, 55, 60,185, 84,147,106, 82, 77,170,249, 42, 44, 61,158, 84,243,239,212,148,248,212, +246,151,248,212,182,123,210,229, 18,190, 79,143, 39,165,136, 73,197,188, 0,216, 49, 97, 41,133, 66,161,252, 5,112,244, 16, 80, +254, 78,244,105, 79,146,254,202,239, 83,254,115,148,152, 19,205,148,226, 74,203, 19, 18,124, 19,103,123,158,106, 82, 77,170, 73, + 53,169, 38,213,164,154,255, 57,205,178,180,255,137, 93,146,147, 94,217, 62, 9,224,255, 37,225,159,134, 85,169, 38,213,164,154, + 84,147,106, 82, 77,170,249, 95,227,185,241, 98,233,177,160, 80, 40, 20, 10,133, 66,249,107,160, 57, 90, 20, 10,133, 66,161, 80, + 40,111, 71,113, 93,135,212,104, 81, 40, 20, 10,133, 66,161,188, 3, 74, 76,134,167, 93,135, 20, 10,133, 66,161, 80, 40,111, 71, + 81, 68,203, 7,175, 76,239, 64,141, 22,133, 66,161, 80, 40, 20,202,187, 33, 13,197, 69,183,130,131,131, 73,113, 63, 83, 40, 20, + 10,133, 66,161,252,127,240, 15,247, 34, 47, 70,178, 38, 21,110, 3,120, 33,162, 69, 13, 22,133, 66,161, 80, 40,148,255, 21,179, +245, 15,163, 40,146, 85,244, 74,123,205,104,245,238,221,155,161,102,139, 66,161, 80, 40, 20,202,223,197,191,209,139,176,175,238, + 32, 61,205, 20, 10,133, 66,161, 80,254, 78,179,245,111,218, 31, 58,189, 3,133, 66,161, 80, 40, 20,202,219,225, 3,160,215, 11, +219,255,111, 75,240, 80, 40, 20, 10,133, 66,161,252,219,153, 84,210, 54,141,104, 81, 40, 20, 10,133, 66,161,188,123,179, 69,161, + 80, 40, 20, 10,133, 66,249, 39, 67, 87, 54,167,154, 84,147,106, 82, 77,170, 73, 53,169,230,191,157,162,121,180,128,146,230,209, +162, 80, 40, 20, 10,133, 66,161,188, 17,189, 96,155, 63,107, 82,225,123, 47,106,180, 40, 20, 10,133, 66,161, 80,222, 45,175, 45, +191, 67,141, 22,133, 66,161, 80, 40, 20,202,187, 53, 88,155,168,209,162, 80, 40, 20, 10,133, 66,249,139,161, 70,139, 66,161, 80, + 40, 20, 10,229, 47,130, 65,201, 35, 7,206,151, 67,231, 77, 70, 31,156,167,154, 84,147,106, 82, 77,170, 73, 53,169,230,127, 78, +179, 44,237,243,248,231, 81, 52, 51,252, 73,252,153, 8,191,233,255,227, 31,211,161,175, 84,147,106, 82, 77,170, 73, 53,169, 38, +213,252,183, 51,233,149,247,231,208,174, 67, 10,133, 66,161, 80, 40,148,119,107,182,232, 18, 60, 20, 10,133, 66,161, 80, 40,239, +136, 18,187, 9,105, 68,139, 66,161, 80, 40, 20, 10,229,237, 40,113, 81,105,106,180, 40, 20, 10,133, 66,161, 80,254, 26,195, 69, +141, 22,133, 66,161, 80, 40, 20,202, 59, 52, 89,147,138,253,109,112,112, 48,161,199,136, 66,161, 80, 40, 20,202,223,197,191,214, +139, 20,237, 24, 53, 91, 20, 10,133, 66,161, 80,168, 23, 41, 55, 62,248,115,180,225,164,194,109, 0,116,212, 33,133, 66,161, 80, + 40, 20,202,219,210, 11, 47,143, 60,156, 84,180, 77,141, 22,133, 66,161, 80, 40, 20,202,219, 51,169,212,223,210,110, 67, 10,133, + 66,161, 80, 40,127, 39,255, 70, 47,194,208,211, 74,161, 80, 40, 20, 10,133,242, 86, 20, 23,205,218, 68, 15, 11,133, 66,161, 80, + 40, 20,202, 95,107,184, 40, 20, 10,133, 66,161, 80, 40,127,133,201,250,171, 39, 44,165, 43,155, 83, 77,170, 73, 53,169, 38,213, +164,154, 84,243,191, 98,178, 94,156,226, 1, 0, 29,117, 72,161, 80, 40, 20, 10,133,242,182,208, 69,165, 41, 20, 10,133, 66,161, + 80,254, 34,232,162,210, 20, 10,133, 66,161, 80, 40,255,207,134,139, 26, 45, 10,133, 66,161, 80, 40,148,119,104,178, 94, 50, 91, + 52, 71,139, 66,161, 80, 40, 20, 10,229,237, 40, 49, 71,139, 65,201, 35, 7,206,151,227, 31,188,201,232,131,243, 84,147,106, 82, + 77,170, 73, 53,169, 38,213,252,207,105,150,165,125, 30,255,124, 38,225,255,105,194, 82, 58,244,149,106, 82, 77,170, 73, 53,169, + 38,213,164,154,255, 53,232,244, 14, 20, 10,133, 66,161, 80, 40,239,218, 88,189, 10, 53, 90, 20, 10,133, 66,161, 80, 40,111, 7, +157, 71,139, 66,161, 80, 40, 20, 10,229, 47,194, 7,182,168, 86,209,123, 35,106,180, 40, 20, 10,133, 66,161, 80,222, 13,189, 96, +139,106, 21,189, 83,163, 69,161, 80, 40, 20, 10,133,242, 14, 41,118, 30, 45, 6, 0,130,131,131, 73,225,118,135,222,189,123, 95, +161,199,138, 66,161, 80, 40, 20,202,255, 39,255, 86, 47,242, 60,162,213,187,119,111, 6,192,101,122,170, 41, 20, 10,133, 66,161, +252, 29,252, 27,189, 8,251,138,147,236, 64, 79, 51,133, 66,161, 80, 40,148,191,131,127,163, 23,225,191,226, 34, 41, 20, 10,133, + 66,161, 80,254, 22,254,193, 94,196, 7,182, 68,248,147,133,239, 64,225,148, 15,116, 30, 45, 10,133, 66,161, 80, 40,148,183,163, +104,180,225,107, 75,239,208, 40, 22,133, 66,161, 80, 40, 20,202,219, 81,220,204,240,155,232, 97,161, 80, 40, 20, 10,133, 66,249, + 11,161, 17, 45, 10,133, 66,161, 80, 40,148,183,231,197,168,214,255, 91, 52,139,174,108, 78, 53,169, 38,213,164,154, 84,147,106, + 82,205,255,146,201,122,105,155,206, 12, 79,161, 80, 40, 20, 10,133,242, 23, 65, 71, 29, 82, 40, 20, 10,133, 66,161,188, 29, 69, + 35, 14, 95,220,166, 70,139, 66,161, 80, 40, 20, 10,229, 29,154,173,215,160, 93,135, 20, 10,133, 66,161, 80, 40,111,199,164,146, +126, 65,141, 22,133, 66,161, 80, 40, 20,202, 95,100,184, 24,148, 60,114,224,124, 57,132,223,100,244,193,121,170, 73, 53,169, 38, +213,164,154, 84,147,106,254,231, 52,203,210, 62,143,127, 30,127,219,132,165,116,232, 43,213,164,154, 84,147,106, 82, 77,170, 73, + 53,255,179,208,174, 67, 10,133, 66,161, 80, 40,148,255, 1,163,229,193,231,243,191,148, 74,165, 63, 73,165,210, 95,248,124,254, + 10, 0, 46,229,253,135,114,185,124,154,183,183,247, 83,111,111,239,228,138, 21, 43,158,114,112,144, 77,175, 38, 70, 59, 0,130, +119,180, 63,129, 0,166, 75,165,210, 39, 18,137, 36, 30,192, 78, 0,211, 1,184,191,141,240, 98, 95, 12,124,244,105,191,163,139, +125, 49,240,149, 95,245,242,242,242,186, 6,160,219,187, 58, 41,195,100,232, 50, 72,142,196, 65,114, 36, 14,147,189,121,171,193, +193,193, 97,148,143,143,207, 13, 55, 55,183, 20, 31, 31,159, 63, 36, 18,201,160,114, 74,120,122,121,121,253,224,239,239, 31,233, +235,235,187, 6,182,213,201,255,103,105, 43, 70,219, 22, 98, 40, 91,138,160,110, 45,194, 79, 45, 69,232,218, 21,144,189,161, 92, + 27, 0, 7, 29, 29, 29,239,243,249,252, 96, 0, 3, 10,175,175, 1,124, 62, 63,216,209,209,241, 62,128,131,133,223,123,147,235, +244, 7, 0, 41, 0,190, 45,220,254,196,223,223, 95, 29, 20, 20, 20, 31, 20, 20,180, 45, 32, 32,224, 3,123,197,100, 50, 89, 87, +127,127,255, 67, 21, 43, 86,140,111,217,178,101,142,159,159, 95, 68,133, 10, 21,182,139,197,226, 14,180,138,163, 80, 40,148,255, +125,250, 0, 88, 6, 96,125, 88, 88, 88, 40, 33, 36,148, 16, 18, 26, 22, 22, 22, 10,224, 39, 0,203, 81,114, 8,241,165,207,221, +220,220, 22, 46, 89,178, 68,159,150,150, 70,148, 74, 37,137,140,140, 36,171,231,205,230,186,187,242, 73, 53, 15, 23,173,143,143, + 79,116,165, 10, 21,246,214, 85,176,179, 1, 84,183, 71,243, 5, 92,164, 82,233,173,121,243,230,105,174, 93,187,166, 49, 26,141, + 26,142,227, 52,169,169,169,154,243,231,207,107, 90,183,110,173, 1, 48, 3, 0,175, 28,154,207, 89,228,139, 43,228,215,175,201, + 34, 95, 92,121,241,243, 90,181,106, 61,230, 56,142, 12, 28, 56,208, 0,192,175, 60,154,175,226, 7, 72,234, 58,194,121,144, 2, + 25,150,237,139, 9,217, 48,147, 12,146, 35,241, 77, 52, 61, 61, 61,143, 77,155, 54, 77,149,146,146, 66, 12, 6, 3, 73, 76, 76, + 36,147, 39, 79,206,247,244,244,220,101,231,190,187,213,175, 95, 63,227,198,141, 27, 92, 94, 94, 30,185,124,249, 50, 87,175, 94, +189, 12, 59,205, 86,151, 87,202,178,201,215,215,247, 84,121, 94,158,158,158, 91,202,123,142,154,139,145,104, 10,189, 68,200,157, + 16,114,124, 96, 75,178,186, 73, 5, 50,192, 85,148,215, 70,132, 79,218, 23, 63,149, 73, 73,154,131,219,183,111, 95,240,240,225, + 67,107,118,118, 54,121,252,248, 49, 55,113,226, 68, 61,128,240,137, 19, 39,234, 31, 63,126,204,101,103,103,147,135, 15, 31, 90, +219,183,111, 95, 0, 96, 66, 57,202,201, 2,216,186, 96,193, 2, 66, 8, 33, 75,150, 44, 33, 65, 65, 65,164, 83,167, 78, 68,163, +209, 16, 66, 72, 60, 33,100,155,197, 98, 25, 99,143,166,147,147,211,168,105,211,166,105,180, 90, 45, 41,130,227, 56,146,151,151, + 71,214,175, 95, 95,224,237,237,125,170,132, 70, 6,237,242,160,154, 84,147,106,254,175,105,254,147,241,129, 45, 79,171,232,101, +119, 96, 98,248,236,217,179,139, 76,213,233, 54,109,218,220, 30, 51,102, 76,232,152, 49, 99, 66,219,180,105,115, 25,192,217,187, +119,239,134,206,154, 53, 43, 20,192,240, 50, 78,132, 75,171, 86,173,242,210,211,211, 73,141, 26, 53, 72,229,202,149, 73,122,122, + 58, 33,132,144, 59,131, 27,147, 11,181, 65,146,174,158, 38, 33, 71, 14,146,137, 62,124,210,214,199,201,236,227,237,157,237,238, +238,190, 20, 47,175,201, 88,220,201,237, 95,187,118,109,117,120,120,184, 38, 42, 42, 74,179,112,225, 66, 77,167, 78,157, 52,245, +235,215,215, 12, 24, 48, 64,179,110,221, 58,141,201,100,210,108,217,178, 69,227,232,232, 24, 94,140,217,122, 99,163,197,231,243, +215,134,133,133,145,232,232,104, 82, 24,165, 40, 73,211,201,217,217,185,135,139,139,203, 12,103,103,231, 30, 0,156, 0,160, 6, +160,104,224,132,138,159, 52,168, 86, 43,120,120,151,234,235,187, 52,109, 60,200,129,205, 51,255, 56,147,144,129, 21,223,200,104, + 57, 57, 57,141,154, 62,125,186,218, 96, 48, 16,173, 86, 75, 52, 26, 13,209,106,181, 68,173, 86,147,225,195,135,171, 36, 18, 73, +255,178, 52,221,221,221, 23, 95,189,122,213,146,158,158, 78,174, 94,189, 74, 78,157, 58, 69, 54,108,216,192,121,122,122,174, 42, +239, 13,232,237,237,125, 46, 36, 36, 36,244,222,189,123,161,183,110,221, 10, 53,155,205,161, 38,147, 41,212,100, 50,133, 6, 7, + 7,135, 30, 62,124, 56,116,223,190,125,161, 70,163, 49,212,104, 52,134, 26, 12,134,208,170, 85,171,158, 41,239, 57,106, 38, 70, +146,241,218,113, 66, 86,125, 68,242,191,155, 74,242, 62,235, 73, 50, 39,183, 35, 63, 53,173, 64,218, 73,113, 2,175,175,237, 89, +172,166, 64, 32,184, 18, 31, 31,207,205,157, 59,215, 88,167, 78,157,252,113,227,198,233, 13, 6, 3, 33,132, 16,131,193, 64,198, +141, 27,167,175, 83,167, 78,254,220,185,115,141,113,113,113, 28,159,207, 63, 95,142,114, 46, 47, 50, 89, 87,174, 92, 33, 47,162, +209,104, 72,167, 78,157,226,131,130,130,182, 85,169, 82,101, 68, 89,154, 10,133,162,223,156, 57,115, 52,164, 24,204,102, 51, 81, +171,213, 36, 46, 46,142,171, 92,185,114, 42, 0, 55, 90,153, 83, 77,170, 73, 53,169,209,250,203,152, 84,198,118,241, 7,113,214, +172, 89,161,132,144,208,175,190,250, 42,180, 48,178, 37, 4,160, 40,124,241, 1, 12,155, 51,103, 78, 40, 33, 36,116,246,236,217, + 69,223, 41,233, 68,244, 57,112,224,128,105,205,154, 53,196,203,203,139,120,123,123,147,181,107,215, 18,142,227, 72,122,240, 46, +114,161, 54,200,147, 47, 71, 19, 66, 8,137, 92,250, 49,185, 80, 27, 36,102,227, 34, 50,114,228, 72,173, 76, 38, 27, 94,202,201, +117,109,220,184,177, 90,167,211,105,182,111,223,174,145,201,100,119, 0,212,129,173, 43,146, 41, 44,235, 7,117,234,212, 81, 61, +122,244, 72,179,103,207, 30, 13,128,133,118, 94, 48,213, 1,116,148,203,229, 3,230,248, 9,162,200,175, 95,147, 57, 94,120, 8, +160, 30, 0,143,194,239,248,206,158, 61,155, 16, 66,136,191,191,255,213, 18, 52,157,234,215,175, 63, 59, 42, 42,106,190,217,108, +158,127,239,222,189,249, 53,107,214,156,219,183,170, 79,203,163,195,187, 54,202, 95, 52,181, 17, 89,249, 89,253, 21,239, 53,235, +178,119,104,135,225, 99,171,184, 95, 27,231, 41,209, 14,113,226,169, 95,233, 58,180,235,194,246,243,243,187,149,152,152,248,220, + 92,169,213,106,146,146,146, 66, 98, 99, 99,201,181,107,215,136,143,143,207,133,178, 52,189,189,189, 31, 39, 38, 38,146,141,171, + 87,147,129,245,106,145,118,206, 14,164,189,139, 3,105,162,144, 20,212, 6,154,148,215,104,221,191,127, 63, 20, 64, 40,128,208, +236,236,236,208,236,236,236,208,220,220,220,231,159, 1, 8,205,207,207, 15,205,207,207, 15, 53, 26,141,161,213,170, 85, 43,183, +209,106, 45, 65,235,230, 18,228,180, 20, 67,215,199,207, 61,117,106, 85,119,235,205,225, 45, 73,238, 71,157,200,154, 70,126,164, +141, 8,159,216,169,217, 71, 36, 18, 93, 6, 48,179,208,148,143,238,209,163,135,150, 16, 66,122,244,232,161, 5, 48,186,240,243, +233,133, 38,171,135,157,229,100, 3, 2, 2, 10,138, 34, 89, 0,174, 7, 4, 4, 20, 4, 5, 5,145,160,160, 32,226,239,239,175, + 46,212,182,171, 66,171, 94,189,122,164, 78,167,123,110, 0,243,242,242, 72,106,106, 42,137,137,137, 33,225,225,225,228,206,157, + 59, 36, 62, 62,158,236,223,191,223,234,236,236,124,146, 86,230, 84,147,106, 82, 77,106,180,254, 82,163,245,234,235,101,130,131, +131,201, 43, 31,125,119,247,238,221,208, 57,115,230,132,150,225,204, 38,125,245,213, 87, 69, 81,175,101,165, 60,252,183, 68, 70, + 70,146,209,163, 71,147,192,192, 64, 18, 24, 24, 72,198,140, 25, 67,242,243,243,137,230,217, 35,114,161, 54,200,157, 33, 77, 8, + 33,132,168,159,220, 35, 23,106,131,132,142,108, 69, 30, 60,120, 64, 42, 84,168, 16, 82,202,255, 63,241,199, 31,127, 40,119,237, +218,149, 14, 91, 62,150, 0, 64, 11, 0,107,165, 82,233, 86,216,186, 11, 43, 3,112,169, 81,163, 70,142, 86,171,213, 12, 28, 56, + 80, 3,160, 98, 41,154,237, 3, 3, 3,163,183,108,217, 66, 50, 51, 51, 73, 78, 78, 14,249,190,117, 77, 66,126,253,154, 44,105, + 82,153,219,184,113,163, 97,230,204,153, 5,174,174,174,193, 0,124, 7, 14, 28,104, 33,132,144,118,237,218,101, 20, 39,230,236, +236,220, 35, 42, 42,106,190, 94,175,159,159,151,151, 55, 63, 39, 39,103,254,241,163, 71,231,119,175, 87,115,116,254,162,169,141, +142, 14,239,218,232, 61, 63,151, 1,171,186, 53,157,146, 50,119,194,192,175, 90,213,121,162, 95,254,233,165,193, 85,189,126,120, +147,179,237,225,225,145,102, 48, 24, 8,128,215, 94,209,209,209,196,205,205, 45,177, 44, 13, 87, 87,215,175,166, 15, 27,106,237, + 95,217,143, 68,175,153, 71,204,231,246, 16,243,169,237,228,217,119,159,145,190,222,238,170, 22, 66,118,142,189,229,241,246,246, + 62,119,235,214,173,151,140, 86,110,110,110,177, 70, 75,165, 82,133, 26,141,198,208,128,128,128, 51,111,123,213,183, 16,161, 90, +123, 41,239,206,189,209,109,137,114,106, 39,210,195, 73, 16,255, 22,114,195, 0, 92, 6, 48,178,156,127,199, 2, 88, 94,100,168, +190,251,238, 59, 66, 8, 33, 1, 1, 1, 5,120,187,193, 40, 78,181,106,213,138,157, 48, 97,130,165,118,237,218,153,173, 91,183, +206,187,125,251, 54,185,114,229, 10, 57,117,234, 20, 57,120,240, 32,121,244,232, 17, 73, 73, 73, 33,145,145,145,164, 87,175, 94, +121, 0,218,211,186,144, 66,161,252, 47, 83,140, 23,249,199,195, 22,237, 88,239,222,189,153, 23,118,208, 9,128,164, 73,147, 38, +202,229,203,151,175,132,109, 46, 8,166, 62, 15,131, 59, 73,249, 15, 58, 73,249, 15,234,243, 48,184, 48, 98,180,105,233,210,165, +139,131,130,130,210, 0, 72, 1,120, 23,247,143, 8, 33,109,221,220,220,144,152,152, 8, 39, 39, 39, 56, 57, 57, 33, 49, 49, 17, +132, 16, 88, 8, 96, 38,128,193,100,130, 78,167,131,158, 35,208,113,128, 74,163,129,183,183, 55, 76, 38, 83,181, 18,202,223, 96, +200,144, 33,213,234,215,175,175,156, 53,107, 86, 42,108,185, 50, 91,199,143, 31,127,238,250,245,235,245, 53, 26, 77, 78,120,120, +184,190, 94,189,122, 61, 0,252, 31,123,223, 29, 22,197,213,190,125,207,246,101,119, 97,151,190,116,149, 34, 88, 64,209,216,197, +222,177, 19,187, 70, 99,137,229,213,104,140,177,133, 98,212, 88, 98,143,137, 38,182,136,198,130, 88,130,177, 97,195,174,128,162, + 40, 8,130, 52, 41, 75, 91,182,192,238,194,238,158,239, 15,132, 16, 67, 53,121,127,223,155,100,238,235,218,107, 97,231,204, 61, +231,204,156, 51,115,207,115,158,243, 60,210,164,164,164, 41,187,118,237,194,180,105,211, 80,207, 67,167,237,176, 97,195,126,125, +246,236,153,235,228,201,147,113,227,198, 13,108,218,180, 9, 5, 5, 5, 4, 0,180, 90, 45, 49, 24, 12,229,221,186,117, 43,223, +190,125,123, 39, 63, 63,191, 7, 45, 90,180, 96, 2, 64,106,106,106,114,109,132, 20, 69,181,116,113,113,129, 86,171, 69,126,126, + 62,158, 61,123, 6, 83,177, 24,113,217, 5,182,189,183,126, 95,184,242,204, 21,246,132, 78,222, 22,139, 7,116,215,174,191,124, +195,163,181,189,173,173,174,188, 66,250, 50, 39, 47,251,125, 46, 42,135,195,201, 40, 40, 40,128, 78,167, 67, 89, 89, 25, 20, 10, + 5, 10, 11, 11, 81, 80, 80,128,236,236,108,112, 56,156, 87, 13,113,152, 21, 21, 69,165,222,185, 73,157,216,179, 17,174,250, 34, +176, 78,237, 0,235,236,119,112,211,229, 99,239,234, 57,166, 58, 75,235, 96, 51, 83,211, 98,137, 68,242, 3, 0,247,134,248,124, +125,125, 81, 88, 88,136,194,194, 66, 88, 90, 90,194,220,220, 28,230,230,230,144,203,229, 40, 41, 41,129, 66,161,128,135,135, 7, +218,181,107,135,195,135, 15,255, 37,157,251,190, 14, 41,122, 24,230, 94, 73,204, 6, 71, 40, 68, 11,115,145,203, 7, 34, 88,212, +179, 75, 95, 54,155,125,210,194,194,226, 50,128,249, 0,132, 0,230, 91, 88, 88, 92,102,179,217,163, 0,172, 5,112,164,137,213, + 88, 31, 28, 28,252, 69, 82, 82,146,224,201,147, 39, 88,182,108, 25, 66, 66, 66,144,156,156,252, 45, 0,227,219, 50,243, 44, 45, + 45, 35, 24, 12,198,143, 0,134, 2, 24,108,103,103,215,175, 1,222, 81, 75,151, 46,213,116,232,208,225,229,139, 23, 47, 70,221, +185,115,167,227,146, 37, 75, 74,210,211,211,241,242,229, 75,216,217,217,193,201,201, 9, 42,149, 10,197,197,197, 24, 53,106,148, +216,204,204,108, 34,125, 27,167, 65,131,198,255,178,200,122, 71,139,252,221, 44, 90,181,254, 95,235, 27,181, 64, 32, 8,142,137, +137,233,234,227,227,195, 2,112, 2, 0,188,153, 8, 24,213,173,253,129, 51, 63,108,244, 9,223,190,218,103,144,143,199, 1,111, + 38,170, 86,177, 69,116,236,216,209, 60, 38, 38,166, 27,143,199,251, 79, 29,149, 32, 0, 96,110,110, 14,177, 88, 12,137, 68, 2, +115,115,115, 24,141, 70,168, 74, 53, 80, 27, 0,165, 70,135,146,146, 18, 40,223,254,175,210,150, 67,173, 86, 87,239, 91, 11,122, +207,156, 57, 51,127,215,174, 93,178,156,156,156,141, 0,218, 78,155, 54,109,228,206,157, 59,113,237,218, 53,205, 80, 79, 55,203, +117, 61,219,127,213, 58, 39, 57,200,147,141, 89, 0,162,162,162,162,208,173, 91, 55, 80, 20, 53,190, 54, 66, 19, 19,147,239,142, + 29, 59,102, 18, 31, 31, 15, 55, 55,156,238, 33, 20, 0, 0, 32, 0, 73, 68, 65, 84,183,248,241,227,199,127,184,113,227, 70, 87, +161,170,232, 54, 0,232, 11,115,227, 23, 44, 88,240,229,186,117,235,242,243,243,243,203, 75, 75, 75,109, 70,140, 24,129,140,140, + 12,188,121,243,230,110, 29, 34,243,101,108,108, 44, 41, 41, 41, 65, 74, 74, 10, 98, 99, 99, 77,190,252,242,203, 78, 6, 6, 99, +100, 22, 76,167, 79,235,222,177,211,228, 46,237,113,228,222, 19,206,173,196, 84, 73,199,102, 14,230,143, 51,115,154, 87, 80,120, +245, 62, 87, 91,169, 84,238,248,234,171,175, 84, 42,149, 10, 89, 89, 89,120,250,244, 41, 94,188,120,129,180,180, 52,108,218,180, + 73, 85, 84, 84,180,179, 33, 14,123, 62,235,179,205, 75, 62,166, 88,207,239, 2, 79,110, 2,165, 74,160, 76, 5,109, 66, 12, 14, + 38,228, 98,247,169,211,220,244,140, 12,201,241,227,199,103, 58, 59, 59,199, 0,240,168,143,143,144,202, 75,200, 96, 48,222, 21, +161, 96, 48, 24, 74, 0,185, 66,161, 48,211,212,212, 52,147,193, 96,228, 18, 66,212,127,201,155,132, 30,229, 96, 50, 1,174, 9, + 24,236,122, 83,123,126, 56,126,252,248, 99,153,153,153,131, 82, 82, 82,186,238,220,185,243, 43, 62,159, 31,183,115,231,206,175, + 82, 82, 82,186,102,102,102, 14, 26, 63,126,252, 49, 0, 83,155,114,124,119,119,247, 5, 65, 65, 65,216,180,105, 19,218,181,107, + 7, 15, 15,143,210,224,224,224, 29, 0, 86, 3,248,143,187,187,251,237, 5, 11, 22,204,144,201,100,210,172,172,172,118,223,126, +251,237,156, 29, 59,118,124,144,157,157,205,111,128,186,199,192,129, 3,113,225,194, 5, 0,200, 1,144, 82, 88, 88,168,207,206, +206,134,151,151, 23, 58,117,234, 4,149, 74, 5,149, 74, 5,185, 92, 14, 23, 23, 23, 24,141,198,174,244,173,156, 6, 13, 26, 52, +254, 79, 5, 87,237, 66,139,207,231,155,251,250,250,162, 69,139, 22,230,120,187, 90,203,146,203, 90,177,120,230, 4,129, 40,230, + 34,168,216,171, 24,223,179,141,192,146,203, 90,241,118, 23,150,139,139, 11,207,215,215, 23, 66,161,208,161,142,131,223,200,205, +205,133,175,175, 47, 36, 18, 9,196, 98, 49,124,125,125, 81, 94, 94,142, 18,165, 18,106, 3, 80, 90, 97, 68, 73, 73, 9,138,242, +243, 80,106, 0,244,166,150, 72, 75, 75, 3,147,201, 76,173,131,211,206,205,205, 45, 63, 46, 46, 46, 31, 64, 20,128, 79, 66, 66, + 66,176,124,249,114, 4, 6, 6, 30, 19,228,188, 30,120,236,194, 89,203,163,193,243,172, 61,184,212, 4, 0,229,153,153,153,144, + 72, 36, 16, 10,133,181, 10, 3, 63, 63,191, 14, 66,161, 16,135, 14, 29, 34, 89, 89, 89,221, 81,185,132, 63,149,162, 42,197,158, + 9, 3, 37, 0,118,196,196,196,116,254,242,203, 47, 19,251,247,239,207,238,210,165, 11,214,174, 93, 11, 0, 17,181,113,202,229, +242,251, 83,167, 78,213, 93,191,126, 29, 9, 9, 9,194, 51,103,206, 4,172, 93,187,182, 77,122,122, 58,239,151, 95, 47, 14, 9, +205, 84, 4,108,188,124,139,191,238,210,141,251, 86,102,194,214,205,173, 44, 16,155,254,134, 99, 96,226, 97, 67, 87,180, 51,155, + 57,179, 55,159, 21,219,147,199,200,233,205,103,197,124,192,102,126,172, 84, 42,143,159, 59,119,238,210,146, 37, 75, 84, 50,153, + 12,166,166,166, 40, 44, 44,196,250,245,235, 85,177,177,177,167,116, 58,221, 47, 13,241, 26,140,164,131, 83, 51,103,224, 85, 92, +245,111,229, 70,130,135, 58, 14,252, 63, 89, 4, 79, 47, 47,232,116, 58,180,109,219,150, 10, 9, 9, 17,138,197,226,207, 27, 20, + 61,140, 63,116, 55, 61, 69, 81,185,132,144, 55, 42,149, 42,203,196,196, 36,157,195,225,164, 23, 21, 21,101, 17, 66,242,254, 10, +157, 69, 24,248,172, 91, 91,119,128,103,130,244, 66, 85,246, 35, 21,138,106, 43,104,106,106,250,241,238,221,187,249,251,247,239, +175, 88,176, 96,129,118,206,156, 57,236,178,178, 50,155, 57,115,230,176, 23, 44, 88,160,221,191,127,127,197,238,221,187,249, 34, +145,104,204,251, 84,164,162,162, 2,113,113,113, 27,147,147,147,133,168, 12, 55,178, 40, 56, 56,120, 90, 82, 82, 18,127,215,174, + 93, 8, 11, 11, 67, 88, 88, 24, 70,142, 28,137,133, 11, 23, 34, 40, 40,168, 62, 58,129,143,143,143,175,165,165, 37,110,222,188, +153, 13, 32, 29, 64, 7,145, 72,100, 58,114,228, 72, 12, 26, 52, 8, 26,141, 6,229,229,229,213, 66,139,201,100, 66, 34,145, 88, +210,247, 64, 26, 52,104,208,248,175,139,172,223,137, 45, 22, 0, 84,153,234,252,253,253,169,250, 30,140,134, 98, 25,228,234, 82, +164,149,148, 34,163,216,248,187,109, 70,163,177,222,163,103,103,103,255,114,239,222,189,143,125,125,125, 89,217,217,149, 51, 98, +190,190,190, 40, 45, 45, 69,246,147, 7, 80, 27, 1,161,155, 55,212,106, 53,138, 95, 60,134,200,167, 43, 44,135, 77,198,214, 93, +187,180,133,133,133,123,106,227,228,114,185,108, 71, 71,199,252,212,212, 84, 61,128, 34,177, 88, 60,208,217,217, 25, 55,110,220, + 0,128, 35, 4,216,140,216,235,192,205,112,144, 74,147,138,200,197,197, 5, 50,153, 12, 42,149,234, 70,109,156,247,238,221, 75, +170,168,168,104, 59, 98,196, 8,234,167,159,126, 58,161, 80, 40, 2, 1, 60,213, 26,193,124,146,153, 7,181, 1,124, 0, 3,204, +205,205, 63, 13, 10, 10,234,183, 96,193, 2,156, 59,119, 14,151, 47, 95, 46, 71,165, 47,216,189, 90,104, 75, 82, 82, 82,246, 46, + 93,186,180, 11,131,193,248,228,202,149, 43,122, 15, 15, 15, 69,121,121,185,161,165,167, 39, 35, 48,100, 13,103,254, 39,179, 37, +133,165,120, 62,168,165, 93, 55,138, 2,158,191,145,165, 39,171, 80, 88,223, 57,245,227, 50, 35, 70,117,247,241,251,120,252,112, +145,208,173, 53,212,207, 30, 72,247,158,252,117,171, 73,108,146,255, 77,153,108,228,185,115,231, 2,110,220,184, 49, 95,167,211, +181,224,241,120,175,228,114,249,118,149, 74,213,160,200, 98, 50,153,195,180,118,142,230,242,162, 34,240,223, 90,162, 20, 21, 70, + 20,104,245, 72,144,120, 96,162,163, 83,245, 52,104,110,110, 46,164, 82, 41,101, 48, 24,134,215,199,121,249,242,101,248,251,251, + 87, 9, 79, 80, 20, 5,138,162, 10, 60, 61, 61,243,120, 60, 94, 33,135,195, 81,108,222,188, 89,163,209,104,192, 98,177,248, 6, +131,129,249,103,122,123, 39, 1,108,120,132,250,110,206,136, 62,253,219,181,246, 34, 81,143,158, 80,197,165,154,131,245, 88, 1, +191,117,119,119,103, 21, 21, 21,253, 2, 32,161,162,162,226,232,137, 19, 39,248, 83,166, 76,209,156, 60,121,114, 18, 0,215, 45, + 91,182, 4,168, 84,170, 38,165, 84, 72, 78, 78,254,118,221,186,117, 95,172, 90,181, 10,135, 15, 31, 94,144,156,156,188,252,173, +165,107,100, 80, 80, 16, 54,111,222,140,195,135, 15, 27, 19, 18, 18,126, 53, 26,141,201, 75,150, 44,241,177,181,181, 45,200,201, +201, 73,174,135,182,227,224,193,131,181,183,111,223,230, 42,149,202, 91, 0, 62,157, 59,119,238,204,206,157, 59, 43,198,143, 31, + 47, 42, 42, 42,146, 11, 4, 2,238,190,125,251,204, 89, 44, 22,212,106, 53, 40,138,130, 82,169,212,209,247, 65, 26, 52,104,252, +175,162, 46, 45,242, 55, 65,157,207, 6, 86,109, 13, 44, 45, 45,205,203,200,200,240,122,243,230,141, 30,128, 30, 0, 10,117,250, +175,215,237, 11,223, 63,166,139,187, 48,167,162, 2,103, 30,197,151, 22,234,244, 85,206,239,250, 55,111,222, 40,211,211,211, 77, +203,202,202, 84,117, 28,235,238,119,223,125, 87,118,253,250,117,211,148,148, 20, 24, 12, 6,116,232,208, 1, 47, 95,190, 68,113, + 66, 28,132, 94, 29, 32,236,229,143,248,152, 71,136,189, 28,137,215, 42,157, 62,113,245,186, 18,149, 90, 29, 84, 94, 94,126,166, + 54, 66, 54,155, 93, 4,128, 16, 66, 12, 0,160, 80, 40,158,170, 84,170,158,182,182,182,120,254,252,185, 80,109,192,194,128, 21, + 91,119, 18, 66, 12,156,202,213, 92,139,199,143, 31,143,232,232,104, 0,136,174,141, 83,161, 80, 44,152, 53,107,214,245, 67,135, + 14,177, 82, 82, 82, 6,237,223,191,127, 80, 98, 98, 34,161,138, 50, 12,183, 75,217,112,157,182,240,131,239, 93, 60, 47,251,251, +251,195,206,206, 14,251,246,237,195,246,237,219, 43,230,205,155,151,180,125,251,246, 15,100, 50,217,209, 58,218, 95, 34,151,203, + 47, 90, 90, 90,206,111,211,166,141, 82,173, 86,163,176,176, 16,217,217,217,176,176,180,100,232,193,232,102, 45,145, 28,253, 37, + 87, 41,100, 93,188,143, 7, 89, 57,245, 90,179,186,176,153, 83,199,248,181,247,251,207,170, 21, 34,220, 62, 3,106, 86, 16,200, +254,175,176,232,163, 0, 83,141,246,104, 47,245,147,180, 41, 49, 10, 69,168, 66,161, 8,107, 98,103, 25,220,173, 91,183, 99,235, +214,173, 51, 89,185,105, 29,182,120, 57, 64, 95, 88,136,124,173, 1, 5, 90, 61, 20,197, 9,120,254, 60, 30,150,150, 86,120,253, +250, 53, 52, 26, 13, 94,188,120, 65,152, 76,230, 47, 13, 89,116,170, 80, 99,186, 80,206,227,241, 10,217,108,118, 30,139,197, 42, + 74, 73, 73, 81,107, 52, 26, 48, 24, 12,161,193, 96, 48,105, 68, 93, 29,173,172,172,150,160, 50,152,232, 57,101, 65,193, 14, 95, + 54, 36, 96,161,183,139,149,229,144,213,115,166, 88, 57,219,219,200, 83,146, 94, 85,236,185,116,167, 64,163,173,123,177, 6,128, +136,162,162,162,106,139,228,201,147, 39, 23,157, 60,121,114, 38,128, 3,168,204,187, 21, 41,151,203,191,127,143,193,183,250,212, +169, 83, 95,172, 90,181, 10, 38, 38, 38,213,193, 83, 77, 76, 76,248, 0,240,243,207, 63,227,249,243,231,157,241,214, 95,203,104, + 52, 30,203,201,201,105,136,211,213,219,219, 59, 37, 60, 60,156, 11,192,126,238,220,185, 93,119,238,220,137,143, 62,250, 40, 63, + 62, 62,190, 11,128, 84, 0,174,159,124,242,201,195,195,135, 15,155, 27,141, 70, 20, 23, 23, 67,167,211,165,210,183,114, 26, 52, +104,208, 98,235,191, 2, 95, 0,177,168,140,159, 53, 12,192,121, 84,186,117,212, 9,167,183,234,236, 18,128, 17, 85,207,199, 58, +156,225,129,202, 21, 89, 23, 1,252, 8,192,182, 46, 82, 75, 75,203,207,167, 77,155, 86,145,149,149, 69,114,115,115, 73, 88, 88, + 24, 89,252,241, 52,195, 0, 55,123,163,155,189,173,218,218,218,250,165,157,149,197,193,246, 2, 44, 6,224,216,136,134, 77, 75, + 76, 76,156, 61,109,218,180,143,223, 30,247,227, 99,199,142,169,174, 92,185,162, 98, 50,153, 17,168, 12,237, 80, 37, 40,167, 14, + 31, 62, 92,165,213,106, 85,158,158,158, 69,168,116,220,175, 11, 1,189,123,247, 46,190,112,225, 2, 49, 24, 12,127,136, 81,148, +159,159, 79, 46, 95,190, 76,186,119,239, 46, 7, 48,165, 95,191,126, 55,238,220,185,115,163, 71,143, 30,167, 26,170,176,149,149, +213,138, 39, 79,158, 68,167,165,165,197,156, 63,127, 62,230,232,209,163, 49,159,124,242,201, 83, 31, 31,159,178,164,164, 36,163, + 94,175, 39, 79, 30, 63, 38,158, 45, 91,170, 1,184,212,197,211,215,132,245, 80,177,239, 43,162, 89,251, 17,209,140,114, 34, 0, +136,114,235,231, 36,111, 65,127,242,114,254, 16,210,135,207,188,247, 62, 61,197,194,194,226, 82,116,116, 52, 81, 42,149,228,217, +179,103,100,170,255, 32,114,111,102,127,114,113,144, 59, 57,220,171, 57,217, 58,208,135, 12,234,213,147,124,247,221,119, 36, 60, + 60,156,172, 88,177,194,104,101,101,165, 68, 61, 62, 90, 82,169,244,202,137, 19, 39, 98, 0,196, 48,153,204, 24,133, 66, 17,163, + 84, 42,127,201,204,204,220,237,233,233,249, 69,155, 54,109, 38,121,121,121,245,237,211,220,229,139,126,166,188,151,253,205,248, +175, 90,138, 4, 91,241,199,184, 87,213, 16, 3, 46,110,174,174,202,155, 55,111, 26,181, 90, 45,185,117,235,150,177, 85, 75, 15, +205,150,113,131, 79,189,222,183,225,148,230,194, 79,151, 74,207,254,112,231,228,116,255,184,222, 2,198, 79, 93,133,213,225, 56, +222, 23, 19, 0,156,193,111,171, 14,167, 1, 56,139,250, 87, 33, 50, 0, 28, 88,187,118,109,205,149,134, 0,192,240,241,241,137, + 33,132,196,248,248,248,196, 52,181, 34, 2,129, 96,201,185,115,231,130,157,157,157, 55,141, 31, 63,126,159, 92, 46, 63, 63,105, +210,164, 56, 84, 46, 6,161, 80,153, 29, 97,184,163,163, 99,126,108,108, 44,185,113,227, 6, 25, 59,118,172,146,195,225, 76,166, +111,227, 52,104,208,160,241, 95,193,236, 58,190,235,197,186,184,184,184,170, 24, 90,115,235, 35, 95,190,124,121, 76,116,116,116, + 12, 42,163,196,215, 11, 22,139,117,122,222,188,121,196,214,214, 86,101, 99, 99,115,154,205,100,206,116, 50,129, 47,222,111,169, +123,207,208,208,208,145,223,126,251,237, 48, 0,157, 1,176, 29, 28, 28,178,115,115,115, 85,119,238,220, 81,117,239,222, 93,101, +101,101, 37,243,246,246, 86,109,217,178, 69, 85, 81, 81,161, 90,178,100,137, 10,127,140,247, 85, 27,248, 0,230,115,185,220,211, +173, 90,181,138, 91, 61,162,111,197,166,133, 51,201, 52,119,107, 21,128,111, 1,204, 3, 32, 1,192, 14, 8, 8,184,250,226,197, +139, 75,222,222,222,123, 27,193,107,223,166, 77,155,107,199,142, 29,139, 14, 15, 15,143,249,252,243,207,163, 45, 45, 45,179,146, +146,146,140, 26,141,134, 20, 23, 23, 19,185, 92, 78,206,159, 63,111,176,176,176,216, 85,103,195,121,204, 28,114,249, 72,173, 33, + 28, 50, 87, 77, 38,221,185,140, 55,239,211, 83,132, 66, 97, 81, 97, 97, 33,201,205,205, 37, 41, 41, 41,228,212,169, 83,100,112, +183, 78,228,248, 39, 99,200,145,143, 71,146,205,131, 59,145,206,166,124,181,212, 84, 20,109,106,106, 42,107,204,170, 67,169, 84, +122, 69,171,213, 86,135,111,112,116,116,140,241,244,244, 12,247,246,246,222,122,238,220,185, 69,219,182,109, 27,217,167,185,203, + 23,235, 7,117, 43, 43,141, 60, 73,148, 39,190, 37,203, 59,120,104,222,138,249, 90,225, 96,105, 17,122,243,198, 13, 99,149,248, +213,235,245,228,204,233,211,100,220,144, 1,113, 37, 23,127,254,241, 86,208,130, 99, 75, 58,120,156,233,206,199,132,250, 4, 91, +245,171,136, 8,150,126,102,140,221, 67,157, 45,114,122,138, 25,223,118, 49,253, 93,122,169,113, 30, 30, 30, 41,132,144, 28, 47, + 47,175, 20, 0, 71,188,188,188,106,254, 63,189, 14,218,234,224,164,193,193,193,228,237,248, 96, 0, 8, 92,183,110, 93, 12, 33, + 36,198,221,221,253, 54, 0,180, 19,194,170,151,152,241,227, 8, 87,219,194, 94, 98,198,143,237,132,181,167,140,114,225,160,101, + 79,107,193,173,145,238,118,202,222, 14,226,168, 35, 7,247,111, 26, 58,116,232, 62, 0,187, 0,124,101,105,105,121,107,194,132, + 9,207, 15, 31, 62,252,124,203,150, 45,229, 73, 73, 73,100,198,140, 25,106, 30,143,247, 21,125, 31,164, 65,131, 6,141,255, 26, +170, 34,195,219, 53, 69,104, 13,255,226,139, 47, 98, 8, 33, 85,177,180,166,212, 82,102,196,170, 85,171, 98, 8, 33, 85,209,225, +223, 13, 96, 86, 91, 64,179,224,221,187,119, 19, 30,143,247,227,123, 54,166, 38,167,116,212,168, 81, 93, 20, 10,197, 7,182,182, +182, 31,188,181, 92, 57, 89, 89, 89,165, 28, 61,122, 84, 85, 86, 86,166, 34,132,168,244,122,189, 42, 58, 58, 90,213,187,119,111, + 85,141,183,254,134,234,249, 59,172,148,226,246,163,213, 31,147,149, 82,220,126,103,211,228, 3, 7, 14, 92, 72, 77, 77,253,197, +204,204,108, 89, 35, 57,157,172,173,173, 3, 45, 44, 44, 46, 89, 89, 89,173,180,176,176,200, 41, 47, 47, 39,197,197,197,228,229, +203,151,228,198,141, 27,228,222,189,123,196,194,194, 34,171,174,122,246, 51, 97,221, 47,222, 52,159, 24, 15,172, 35,186,157, 43, + 8, 0, 34,223,182,156, 20,124, 23, 66, 30,205, 26, 68,122,243,153,119,223,227,124, 66, 34,145,252,112,250,244,105, 99,114,114, + 50,137,136,136, 32,231,207,159, 39, 11, 23, 46, 36, 45,237,237,180, 93,184,140,188,158, 60,214,165,247, 9, 88,170,213,106, 99, + 20, 10, 69,140, 74,165,138,105,213,170, 85, 76,167, 78,157,194,187,116,233,178,245,228,201,147,139,214,175, 95, 63,178,159, 41, +239,101,105,228, 73, 66, 62, 31, 66,200,252, 30,228,213,204,222,164,175, 9,235, 73,157,156,182,182, 89, 85,209,218,213,106, 53, +137,138,138, 34,215,174, 93, 35, 82, 43, 43,133,159, 9,115,118,119, 30,122,117, 55,131,164,177,245,236, 35,102, 28,188,255,221, +215,134,178, 11,135,201,207,211,134,232,123, 75, 24,187,107,148, 59, 78, 8,201, 25, 59,118,236,107, 66, 72,206,169, 83,167, 50, + 9, 33, 57, 99,198,140,121, 77, 8,201, 1,112,172, 54,206,119,130,147, 30,120, 43,178,230, 7, 7, 7,199, 16, 66, 98,130,131, +131, 99,128,202, 32,170,189,196,140, 67, 15,246,110, 54,106,207, 31, 34, 39,103, 12, 51,244, 18, 51, 14,213, 90, 79, 9,235,151, +216, 3,219,136,238,210, 17,114,122,225, 36, 67, 15,169,217, 77, 15, 15,143,205,139, 22, 45, 10,191,119,239,222, 83,131,193,240, + 60, 37, 37,229,249,174, 93,187,158,119,237,218,245,182,165,165,101, 28,151,203,157,215,208, 53,250,139, 64,115,210,156, 52, 39, +205, 73,227, 93, 3, 83, 61,219,126,217,184,113,163,144, 16,178, 36, 32, 32, 0, 27, 54,108, 24,215,166, 77,155, 9, 14, 14, 14, +214, 0,144,157,157, 93,250,236,217, 51, 69, 64, 64, 0, 2, 3, 3,177,105,211,166,173,168,244,101,249,191, 68,238,153, 51,103, + 28, 23, 44, 88, 32, 91,191,126,189,113,198,140, 25, 94, 0,158, 21, 20, 20,180,156, 52,105,210,124, 22,139, 21,224,226,226,226, +157,147,147,147, 95, 86, 86,118, 4,192, 94, 52, 48,103, 90, 23,120, 12, 24, 58, 54,179,195, 37, 6, 12, 53,126, 30, 18, 24, 24, + 56,126,204,152, 49,229,219,182,109,211, 43, 20,138,115,141,164,203,204,207,207, 95, 83,245,143,133,133,133,244,201,147, 39,243, +108,108,108, 24, 41, 41, 41,208,106,181, 72, 78, 78, 54,162,114,106,170, 86,168,244,100,199,247,167,174,120, 46,153,236,111, 86, +154,240, 24, 28, 38, 19, 21,108, 46,114,239, 95,194,129,168, 4,133,186, 28, 59,223,167,157,114,185,252,155,133, 11, 23, 78, 90, +182,108, 25,223,197,197,133,186,123,247, 46, 78,156, 56,161,149,201,100,131, 1,220,252, 45,244, 83,211, 96, 52, 26,193,229,114, + 1, 0,203,151, 47, 7,131,193, 96,203,100, 50, 46, 69, 81, 60,138,162, 4, 20, 69, 49, 43, 82,159,195,168, 40, 70, 94,177, 28, +153,121,242,122,249, 12, 70,227,137, 7, 15, 30, 44,110,223,190, 61,227,209,163, 71,200,207,207, 71,114,114, 50, 49, 16,114, 44, +170,204, 80,233,148,168,109,124,253, 4, 22,150,163,218,153,243, 24,220,131,129,240,211, 49,152,123,140, 24,139,202, 88, 90, 0, +112,128,162, 40, 14,128,194, 86,173, 90,245,121,241,226,133, 73,171, 86,173,202, 18, 18, 18, 46, 80, 20,229, 0,224, 80,109,156, + 38, 38, 38, 5, 0, 10, 78,157, 58, 5, 0,179, 80,121,242, 58, 4, 5, 5,229, 68, 69, 69, 33, 56, 56, 56, 15,192,110, 0, 16, +153, 91,142,240, 22,115, 40,238, 79,193,232,170, 5, 99,167,145,212,106,117, 21,217,216,246,109, 35,100,128,189,255, 75,124, 32, +245,100,112,245,229,109, 67, 66, 66,162, 84, 42,149,246,248,241,227,186,233,211,167, 51,147,146,146, 30, 2,184, 5,224, 20,222, +250, 88,210,160, 65,131, 6,141,255, 42,222,181, 96, 53,232,163,245,174,106,221, 0,224,251,196,196,196,234,164,210,137,137,137, + 49, 0,246,160, 50, 26,252,240, 38, 40,222,213,111, 45, 90,123,223,179, 49,239,114,242,125,125,125, 77, 94,188,120,193, 65,237, + 73, 28,169,247,224,252, 3,106,203,117,232,225,225,177,189,162,162, 34,124,207,158, 61, 39,153, 76,230,164, 63,161,246, 93,220, +221,221,139,143, 30, 61,106,140,136,136, 32,171, 87,175, 54,216,217,217, 21,227,143, 62, 90,191,227,244,227, 50,195,150,122, 57, + 40,162,167,244, 32,175, 22,141, 32,183, 38,247, 38,179, 29, 68, 10, 63, 62,243,196,159,124, 43,113, 23,139,197, 7, 76, 76, 76, + 20,102,102,102, 87, 0,116,251, 51,215,200,210,210,242,176, 84, 42,189, 82,243, 99,107,107, 27,110,109,109,253,173,149,149,213, +106,137, 68, 50,199,149,207,221,182,168,165,189, 38,110, 84, 43, 18,217,221,154, 76,182,226,190, 59,117,248,110, 61,237, 92, 93, + 93, 11, 67, 67, 67,141,191,252,242, 11, 89,177, 98,133,177, 89,179,102, 10,212,227,215, 86,175, 69, 75,194, 60, 17, 54,166,139, + 49,111,152, 3,217,224,101,106,236, 99,206,172,107,133,226,228,183, 2,120, 90, 67,156,110,110,110,123, 8, 33, 7,215,174, 93, +123, 16,191,229, 2, 29, 16, 18, 18, 18, 68, 8, 9, 10, 9, 9, 9, 2, 48, 8, 0,252,196,140,208, 35, 35, 59, 26,178,135,218, +147,175,189, 68, 6, 63, 49, 35,180, 86, 75,166, 5,235,204,217,153,195,140, 57, 51,187,147, 64,119,161,161,139, 5,239, 42,151, +203, 93,132, 74,139,115, 39, 0, 92,250,173,153,230,164, 57,105, 78,218,162,245, 63, 39,188, 26, 5,169,133,133,197,129, 22, 45, + 90,156,116,113,113, 57, 41, 18,137,182,162,210,105,190,169, 23,194,117,221,186,117, 10,177, 88,220,238, 47,188,184, 54, 0, 28, +240,199,196,185,127, 89,135, 89, 99,135, 5, 73,203,198, 61, 89, 99,135, 5, 53,126,238,228,229,229,245, 53, 42,163,121,255,217, + 78,232, 98, 97, 97,177,203,194,194, 34,235,173,111,150, 75, 99, 56, 59, 50,153,147,250,240,153,119,187,113, 25,185,125,248,172, + 59, 31, 48,153, 19,255,166, 3,176,190,197, 22,117,113, 58, 90, 89, 89,109,179,176,176,200,182,178,178,218,213, 68,145,245, 59, +206,118, 38,176,235, 43, 97,158,233,102, 74,169,251,138,153,167, 58, 10,234, 94,212,209,132,182,251, 6, 7, 7,127, 68, 8,249, +200,222,222, 62,160,134,240,247, 14, 12, 12,244, 39,132,248, 87, 69,128,239, 36,128, 77,111, 9,243,104,119, 51, 74,222, 91,194, + 60,218, 73, 0,155,186,234,217, 71,194, 60,209,221,140,146,251,153, 49,142, 58,243,208,140,190,153,211,156, 52, 39,205, 73, 11, +173,127,134,208,162, 59, 12,205, 73,115,210,156, 52, 39,205, 73,115,210,156,180,208,170, 93, 88,213,252, 84,207,176,177,232,115, + 67,131, 6, 13, 26, 52,104,208,160,241,167, 80,103,192, 82,170, 30, 85,218, 20,199,246,247, 81,182,145, 52, 39,205, 73,115,210, +156, 52, 39,205, 73,115,254,235, 56, 27,226,254,191, 94, 88,247,183, 6,109, 86,165, 57,105, 78,154,147,230,164, 57,105, 78,154, +243, 95, 11, 6,125, 10,104,208,160, 65,131, 6, 13, 26, 52,254, 20,124,223,126,191, 27,184,180,118, 31, 45, 86,167,181,121,122, +189,222, 6, 0, 88, 44,150,172,226,225,106,187,250,216,217, 64, 63,125,101,250, 29,176,128, 89,122,224, 74, 45,156, 87,244,122, +189,249, 91,206,226,138,135,171, 7,213,203,217,105,237,165,154,229,245, 15, 87, 15,120,183, 12, 1,152,236, 78,107,179,223,169, +171,125, 99,207, 10,133,223,197,196,250,175,213,243,239,194,249,111, 6,187,243,218,188,138,138,202,126,196,102,179,100,229, 15, +234,239, 71,156,206,107,179,107,150,175,120,176,218,182, 62, 78,129, 9,175,208,205,193,122,107,125,156, 41,217, 5, 75,212,165, + 26,203,250, 56,155, 58, 54,157,236,236,250, 25,222,142, 77, 38, 48, 43, 43, 39,231,202,255, 88, 95,234, 8, 96, 53, 0,179, 26, +191,197, 1,248,148,238,149, 52,104,208,248,155, 9,173, 88, 84,230, 57,252,225,173,216,250,161, 78,161,165,215,235,109, 98, 78, + 7, 65,173, 5,250, 77, 93,107,227, 58,106,239, 31, 18, 37,235, 53,197, 92,121,252,113,111,102,133,194,220,154, 85,110,150,157, +157, 77, 1, 0, 69, 81, 63, 2,112,174,133,211, 60,230,116, 16, 74,117,128,223,132, 16,115,103,192, 44,159,195,249,204, 68, 40, +236, 83, 86, 86,214, 6, 0, 76, 76, 76,226,203,212,234,235,214,229,229, 91,222, 45, 95, 87,203,106,214,181,239,148,181, 54, 94, +163,246, 46, 52, 24,141,220, 55,143,246,248,105, 10,146, 88,108,189,118,247, 74,224, 66, 80, 45,162,170, 14,190,223,142,251,225, + 10, 75, 54,208,151,203,231,183,147,152,155,247, 52, 18,210,202,104, 52, 82, 6,189,254,185,162,164,228,150, 81,175,127,162,215, +169, 45, 99,206,125,109,172,175,158,239,182,229, 67,128,117, 26, 8, 16,138, 68,125,152,108,118, 55, 0, 48, 84, 84,220, 85,171, + 84,215, 71, 3, 97,141,105,123, 99,207,207,251,150,255,183,161,162, 66,111,147,122, 41, 8,218, 10,192,119,236,215, 54, 62,147, +126, 58, 10, 0, 58,217, 19, 91, 85,210,185,206, 0, 32,116,243,127,192,147,250,230, 1, 0, 43, 61,199,230,101,196, 42,104, 43, +128, 86,254, 33, 54, 13,113, 78, 15, 60, 97,185,108,246, 24, 30, 0, 92, 62,245,109,203,107,225,223, 15, 1,128,190, 99,230, 94, + 24, 56,118,193, 75, 0,216,244, 67,184,229,177,175,199,213,203,217,184,177, 89,194, 41, 73,138,112,215, 41,114, 36, 78, 66,150, + 52, 41, 41,137, 1, 0,246,246,246,141, 26,155,142,128, 56, 7,152,207, 96, 50,123,186,185,187,251, 2, 32, 41,175, 94,197, 26, +244,250,219,118,192,238,191,184, 47, 45, 36,228,247,193, 89, 41,138,162, 59, 36, 13, 26, 52,254,110, 56,255, 86, 92,157,255,195, +203,108, 93,123,168,181,192,205,100,160, 87, 23, 31,204,158, 52, 84, 84,115, 91,216,222, 16,231,164, 71,103,189,246,255,180,133, +225,227,227,131,212,212,212, 70,213,162, 84, 7,220, 72, 2, 32,127, 97, 90, 44, 20,190,218,182,121,179,217,128, 1, 3, 88,246, +246,246,160, 40, 10,185,185,185, 93, 34, 35, 35, 59, 46, 94,188,248, 19,200, 95, 20,151,234,160,188,145,212, 48,111, 85, 93,219, +180,108,134,213, 11,198,137, 1, 96,229,212,221, 29, 31, 37,230, 89,188,122,245,170,223, 23, 95,124, 81,200,188,126,253,123, 43, +224, 96, 30,144,217,152,122, 30,254,229, 1, 95,156,243,179,235,228, 5, 11, 78,185,187,187,139, 92, 92, 92, 40, 83, 83, 83, 48, +153, 76, 20, 23, 23, 59, 63,123,246,108,200,195,135, 15,213,145, 55,127,228, 70, 63, 28,145, 34,227,119,214, 52,170,237,101,217, +252,203,166,166,241, 83, 70,143,118, 28, 55,110, 28,223,205,205, 13, 0,240,234,213, 43,143,176,176,176, 9,167, 78,157, 10, 68, + 89,182,190, 84, 7, 77, 67,109,175,230, 4,192, 7,186, 73,108,108, 38, 51,217,236, 54,122,189,222,225,173,181,225,141,161,162, + 34, 94, 46,147, 29,121,183, 60,141, 63, 66, 91, 1,188,200, 1,250,247,244,197,148, 49,253,133, 0,240,197,248,117, 93,210, 95, + 39,115,116, 58, 29, 90,122,182,234,254,213,215, 91, 47,129,193, 64,104,120,100,117,249,198,112,198,189, 72, 69,208, 87,219,144, +253, 52,172,139,161, 36,185,143, 82, 81,194, 4, 0, 51,177,120, 76,216,241,159,175,219,123, 7,220, 79, 46, 40,111, 20,103,125, + 99,243,226,241, 93,118, 89,207,174,183,254,238,242, 1,182,179,179, 51,158, 62,125,218,180,177, 89,146,104,106,180,179,123,190, +229,243,207,165,126,126,126, 16,137, 68, 96,177, 88,208,235,245,253,111,223,190,221, 63, 40, 40,104, 46, 74, 18,213,141, 29,155, +141,192, 22,138,162,250, 76,159,189,208,110,232,200, 0,140, 25,220,157,238,136, 52,104,208,248,187,161,202,122, 85,115,229,225, + 15,245, 10, 45, 22,139, 37, 27, 48,109,189, 77,207,206,109,241,232,201,203,146,180,140, 28, 85,213,182,162,248,176,150, 35,187, + 59,180,142,138,186, 9,173, 86,139,187,119,239,226,201,147, 39,120,253,250, 53,230,204,153,163,125, 59,117, 88, 27,103,177,223, +132, 16,115,148, 36,137, 60,184,137,205, 35, 19, 18,152, 26,141, 6, 81, 81, 81, 40, 46, 46, 6,151,203,133,163,163, 35, 6, 14, + 28,200, 74, 72, 72,176,232, 55, 96,176,216,111,240,196, 84,136, 61, 84, 44, 22,171,184,174, 60, 34, 44, 22, 75,214,111,234, 90, +155,214, 30,205,240, 42, 45,187,100,245,215,251, 85, 70, 35, 97,165,188, 78, 47,191,121,243, 38,124,125,125,113,229,202, 21,203, +162,162,162, 47,119,239,222,189,154,189,241,187, 29, 21,186,194,165,168,155,175,216,111, 66,136,185,165,236,164,203,181,139,103, + 56,241,241,241,156, 61,123,246,160,176,176, 16, 92, 46, 23, 18,137, 4, 82,169, 20, 45, 91,182,164, 86,174, 92, 41,242,247,143, +199,127,102, 5,184,148,187,206, 76,172,171,158,213,109, 87,165, 11,172, 20,151,221,194,207,159,103,244,232,209,227,119,175,237, + 45, 90,180,192,160, 65,131,248,147, 39, 79,118, 27, 55, 97,146,209,111,216,244, 87, 16,185,148, 54,200,169,206, 52,177, 44,189, +103,223,127,194,132,115, 33, 33, 33, 18,169, 84, 10,161, 80, 8, 0, 40, 41, 41,113, 76, 75, 75,235, 18, 24, 24, 56,246, 65,220, +113,150,159,127,102, 54,132, 78,101,245,157,207,127, 43,216,108,150,172,202,138,100, 42, 52, 41,206,204,202, 83, 3,128, 78,167, +131, 78,167,131, 86,171,197,188,185,115,152,179,198,118,114,119,233,185,240,241,235, 55,121, 69,173, 34,239, 91, 84,237, 91,209, + 0, 39,171,244,181, 92,158,113,117, 86,208,231,159, 75,109,109,127,155, 17, 12, 61,124,152, 89, 84, 84,212, 63, 40, 40,168, 53, + 17,244,150,183,242, 15,145,212,199, 89,223,216,148,191, 60,223,252,171, 5,131,218,237,253, 58, 2, 6,131, 1,247,238,221, 67, + 84, 84, 20,182,110,221, 74, 46, 92,184, 80, 98, 38, 20,206, 66,189, 99, 51,209,180,135, 93,174,235,198,141,167, 40, 30,143,135, +179,103,207, 34, 33, 33, 1, 12, 6, 3, 62, 62, 62,152, 50,101, 10,250,247,239, 47,157, 61,123, 14,241, 27, 60, 62, 5, 98, 79, +229,159,236, 75, 12, 0, 11, 87, 4,109,180,155, 58,115, 62, 54,125,181,146, 22, 90, 52,104,208,248, 59, 91,179,234, 12,241,128, +136,136, 8,242,246,211, 11, 0, 8,192,104, 49,106,239,177,147,209,198,243, 45, 70,237, 61, 70, 0, 6, 1, 24,102, 64,179,246, +237,219, 87,200,229,114,242,240,225, 67, 50,111,222, 60,245,142, 29, 59,174,159, 63,127, 62, 76, 95, 94,190,207,222,206,238, 27, + 82,135,131, 61, 1, 24, 46,128, 88, 32, 16,228,103,100,100,144, 95,127,253,149, 4, 7, 7,147, 35, 71,142,144, 11, 23, 46,144, +200,200, 72,114,225,194, 5,114,236,216, 49, 18, 23, 23, 71, 94,190,124, 73,132, 66, 97,190, 11, 32,174,135,147, 73, 0,102,203, + 81,123,150,158,122, 84, 17,226, 57,106,239, 98, 2, 48,205, 1,175,246,237,219, 27,194,194,194, 72,104,104, 40,249,233,167,159, + 72, 92, 92, 28, 41, 40, 40, 32, 44,158, 48,191,106,191,186,234, 73, 0,134,131,131, 67,190, 92, 46, 39, 78, 78, 78,132,203,229, + 18, 91, 91, 91,210,178,101, 75,210,165, 75, 23, 50,100,200, 16, 50,105,210, 36,242,229,151, 95, 18,185, 92, 78,248,124,126, 94, +213,126,117,113,250, 2, 38, 66,161, 48, 35, 38, 38,134,212,133,178,178, 50, 82, 80, 80, 64, 46, 93,186, 68,132, 66, 97,134, 47, + 96, 82, 31,167, 9,208,193,219,219, 59,191,160,160,128,148,151,151,147,140,140, 12,242,236,217, 51,146,144,144, 64, 50, 50, 50, + 72, 89, 89, 89, 53,247,203,151, 47,137,171,171,107,190, 9,208,129,208,139, 32,234,236, 75,239,126,156,109,109,135, 72,165,210, +178, 83,167, 78,145, 55,111,222,144, 67,135, 14, 17, 6,176,238,221,114,245,113,114,129,129, 61,122,244, 48,220,187,119,143, 60, +126,252,152, 44, 95,190,156, 12, 26, 52,136, 12, 30, 60,152, 4, 5, 5,145,172,172, 44,146,149,149, 69,134, 12, 25, 98,224, 2, + 3, 27,234,159,181,141, 77, 49,224,236,239,239, 95, 86, 94, 94, 78, 82, 82, 82, 72,155, 54,109,178,152,192,100, 33,208,186, 23, +192,107,168,127, 58, 0,230,118,118,118, 57,247,238,221, 35,225,225,225,196,197,197, 37,159, 9, 76, 55, 3, 90,152, 1, 45,152, +192,244, 22, 45, 90,228,223,187,119,143, 20, 22, 22, 18,103,103,231, 28, 7,192,252, 79,244, 37, 6,128, 3, 43,130, 54,146,196, + 44, 53, 89, 17,180,145, 0,200, 32,132, 16,212,226,227, 73,131, 6,141,127, 62,222,213, 34,255, 20, 84,223, 36,253,253,253, 41, + 0, 55,234, 43, 92,198,100,174,223,180,105, 19, 75,163,209, 96,255,254,253,202, 15,199,142, 61,217,171,103,207,148,230, 46, 46, +114,138,193,104, 48,219,112, 62,143,183,104,211,166, 77, 18,157, 78,135,232,232,104,116,236,216, 17, 82,169, 20, 34,145, 8, 34, +145, 8, 54, 54, 54,240,244,244,132, 76, 38,131,169,169, 41,150, 45, 91, 38,206,231,241, 22, 53,196,107, 52, 18, 22, 0, 24,140, + 70, 46, 7,152,237,250,193, 7,209,129,129,129, 12, 75, 75, 75, 88, 88, 88, 64, 36, 18, 33, 33, 33, 1, 58,157, 14, 2, 19, 65, +163,130,180, 50, 24, 12,134, 72, 36,194,181,107,215,176,112,225, 66,116,235,214, 13, 18,137, 4,166,166,166,104,211,166, 13, 6, + 14, 28,136, 89,179,102, 33, 37, 37, 5, 84, 35,156, 74,158,179, 88,243,103,205,154,101,227,235,235, 91,235,118,141, 70, 3,185, + 92,142,252,252,124, 56, 58, 58, 34, 32, 32,192,230, 57,139, 53,191, 46, 62, 75, 64,234,232,225,113,238,225,195,135, 86, 66,161, + 16,161,161,161, 56,115,230, 12, 46, 94,188,136, 95,127,253, 21, 17, 17, 17, 56,123,246, 44,242,243,243, 1, 0, 30, 30, 30, 56, +113,226,132,149,200,198, 38,194, 18,144,210, 67,186,113, 72,207,203,187,220, 38, 55,215,106,242,164, 73,183, 84, 42, 21, 38, 79, +158,140,245, 27, 54,172,100, 3,139, 27,179,191, 39, 32,182,176,179, 59,184,113,227, 70, 70,110,110, 46, 70,143, 30, 93,176,101, +195,134,143, 99, 47, 93,114,139,185,120,209,109,125, 72,200,199,189,122,245, 42,200,202,202,194,225,195,135, 25,182,206,206, 7, + 61, 1,113, 83,235,169, 4, 22,110,223,190,157,175,209,104, 48, 96,192,128, 20, 99,124,188,167, 30,248, 89, 5, 36,220, 0,202, + 27,218, 63, 7,152,191,108,217, 50, 41,143,199,195,103,159,125, 86, 80,154,158,222, 86, 15,252, 84, 2,164,149, 0,105,122,224, + 39,101,106,106,219,169, 83,167, 22,240,120, 60,108,219,182, 77,154,243, 91,210,237,198,162, 35,128,115, 0,110, 2,200,158, 62, +123,225,116,223, 78, 93,113,120,223,110,124, 29,242,197, 65, 0, 31, 82, 20,117, 4,192, 82,186,231,209,160,241,239, 68, 99,180, +200,255, 40,234, 76,185,195,170,169, 36, 1,244,174,143,197,220,210,178, 99,219,182,109, 17, 21, 21, 5,111,111,239,135, 18,137, + 68,207,225,241,192,102,179, 65,140, 13,234, 44,152, 8,133,253,250,247,239,207,186,127,255, 62, 92, 93, 93, 97, 98, 98, 2, 54, +155,253,187, 15,135,195,129,157,157, 29, 20, 10, 5,250,245,235,199,222,185,115,103, 63,104,181, 95, 53,248, 64, 76,122, 38,202, +191,191,113,210,143,135, 14,182,240,243,243, 67, 73,137, 2, 70,163, 17, 2,129, 0, 58,157, 14, 44, 22,171,114, 10,168,130, 40, + 26,115,198, 12, 6,131,129,201,100,194,213,213, 21,235,215,175,135, 70,163, 1,135,195, 1, 0, 40, 20, 10,200,229,114, 60,123, +246, 12,105,105,105,120,251, 22, 94, 47, 76,197,226,161,227,198,141,171, 53,225,175, 86,171, 69, 73, 73, 9, 74, 74, 74, 32,151, +203,161,209,104,208,181,107, 87,238,249,136,136,161, 40, 44,220, 82,235, 62,124,254,216,195,135, 15,219,112,185, 92,148,149,149, + 65,169, 84, 34, 51, 51, 19,233,233,233, 26,153, 76,166, 55, 53, 53,101,184,184,184, 48,120, 60, 30,111,212,168, 81,148, 66,161, + 0, 69, 81,240,247,247,183, 60, 26, 26, 58, 14, 58,221, 86,122, 72, 55, 14,151, 1,109, 7,157,110,120,231, 78,157,174, 61,124, +244,200,119,209,162, 69,136,139,139,219, 40, 56,126,252,102, 41,240,164,190,125, 83,128,249,223,212, 16, 48, 36, 61,221,187, 28, +200,175, 81, 36,205, 37, 53,245,226,212,169, 83,159,198,197,197, 89,109,219,182, 77,250,225,232,209,243, 1,172,107, 74, 29, 77, +197,226, 15,236,236,236,112,225,194, 5,100,188,126,253,133, 30, 40,107,210, 27, 23,147,217,195,207,207, 15,103,207,158, 69, 86, +122,250, 23,250,223,215,177,242, 69, 9,200,103,165,164,124,113,240,224,193, 3, 51,102,204, 0,147,197,234, 1,125,147, 38, 14, +255,224,248, 62, 99,206, 34, 28,252, 97,231, 65, 0, 51, 1, 24, 1, 60,164,123, 28, 13, 26,255,110,171, 86, 67, 90,228,111, 36, +182,126,104,178, 69,203,198,198,198, 65, 36, 18, 33, 59, 59, 27,173,188,188,100, 60, 30, 15, 92, 54, 27,124, 46,183, 81, 53, 40, + 45, 45,245,182,183,183, 71, 73, 73, 9,172,172,172,192,225,112,170, 63, 92, 46,183,250,111, 83, 83, 83, 48, 24, 12, 56, 59, 59, +163,180,180,212,187, 65,222,188,103, 54,199,119,206,157,119,239,230,133, 22,163, 71,143,129,185,185, 5,156,156, 28, 97, 99, 99, + 3, 19, 19, 19, 56, 57, 57,193,205,205,141,108,217,178, 5, 2, 27,159, 70,221,200,107,138, 39, 22,139, 5,131,193,128,188,188, + 60, 36, 38, 38, 34, 46, 46, 14,247,238,221,195,227,199,143,161, 84, 42,209, 8,157,133,210,178,178,118, 44, 22,171, 86,145, 37, +151,203, 33,151,203,171,133, 86,126,126, 62,210,210,210,160, 82,171,219,215, 35,122,212,246,224,254, 0, 0, 32, 0, 73, 68, 65, + 84,199,180,109,219,150, 9, 0, 38, 38, 38,104,223,190, 61,246,238,221,171,255,229,204,153,241,173,239,221,179,112,186,116, 73, +242,227,158, 61,227, 3, 2, 2, 12,247,239,223,135, 66,161,192,139, 23, 47, 96,109,109,205,226,242,249,227,232,225,220, 52,196, + 0,106, 43,165,114,112,183,110,221, 82, 75, 74, 74,176,121,243,102, 6,219,212,244,135,144, 58,166,248,170,193,100,118,247,243, +243,195,185,115,231,144,157,158,190, 60,189, 22, 1,147, 14,228,103,164,164, 44, 63,120,240, 32, 6, 14, 28, 8,138,197,106,178, +163, 82,151, 46, 93,218, 26,141, 70, 60,125,250, 20, 18,224, 65, 83,247,119,115,119,247,173,178,252, 10,129, 91,117,149, 19, 2, +183, 98, 99, 99, 97, 98, 98,130, 86,173, 91,119,104,226, 97,182, 80, 20,149, 51, 99,206, 34,132, 95,188, 3, 0, 56,248,195,206, +188, 26, 34,139, 6, 13, 26,180, 69,235,239,106,209,170, 18, 86, 53, 63,248,157,208,106,164,248, 0, 0,176,217,108,112,121, 60, +112,185,220, 74,129,196,227, 53,154,131,162, 40,240,249,252,106, 97, 85, 83, 96,213,252, 91, 32, 16, 52, 74,192, 0, 64,113,242, +197,158, 51, 63,158,193,229,241,120,208,233,180, 32,132,128,199,227, 67, 34,145,192,213,213, 21, 10,133, 2,221,186,247,210,102, +202, 57, 17,150,173, 70,197,189,207,217,211,235,245, 80,171,213, 40, 46, 46, 70, 81, 81, 17, 20, 10, 5,202,202,202, 26,189, 20, +221,104, 52, 50, 51, 51, 51,241,243,207, 63,163,176,176, 16, 64,165,163,117,149,184,170,250, 78, 77, 77, 69,104,104, 40, 94,191, +126,221,164,235,211,179,103, 79, 68, 68, 68, 48,123,247,235,183,239,138,139, 75,246, 21, 23,151,236,222,253,250,237, 59,119,238, + 28,211,193,193, 1,105,105,105,136,142,142, 70,113,113, 49, 8, 33,244,250,249,247,192, 43,160,184,180,168,104,198,202,149, 43, +137, 72, 36,194,230,111,190,105,183, 14,152,216, 88, 1, 35,174, 71,192,136,255,156,128, 1, 33, 4, 70,163, 17, 6,131,225,189, +218, 70, 81, 20,197,102,179,155, 26, 90,161, 41,133,171, 29,223,151,125,185, 30,191,158, 13,171,250, 61,137, 22, 89, 52,104,208, +248, 7,160, 78, 71,120, 86, 13, 5, 89,253, 93, 23,242,242,242,222,168,213,234, 22, 46, 46, 46,200,202,202,178,113,118,118, 78, +231,178,217,224,112,185,160, 24, 13,107, 2,129, 64,240, 52, 59, 59,187,187,131,131, 3,244,122,125,181,168,122,119,234,176,202, + 74,243,248,241, 99, 8, 4,130,167,208,212, 27, 57, 1, 6, 93,113,179, 14, 29, 58, 84, 91,134, 36, 18, 9, 36, 18, 49,120, 60, + 62, 86,173, 90,101,220,182,101,203,110,231,190, 33, 37, 31, 45, 94, 73, 86,174,219,247,151,158,217,198, 62,152, 4, 2,193, 83, + 39, 39,167,174, 98,177, 24,225,225,225, 72, 75, 75, 67,113,113, 49, 74, 75, 75,161,213,106, 81, 90, 90, 10,157, 78, 7, 62,159, +143,214,173, 91,195,204,204, 12,145,145,145, 79,161,213,214, 46, 46, 11, 11,195,159, 62,125,218,181, 83,167, 78,213, 22,149, 62, +125,250, 80,125,250,244,177,170,182,162,149,150,162,160,160, 0, 15, 31, 62, 68,100,100, 36, 40,138, 66, 82, 82,146, 65, 91, 86, +118,140, 30, 19,239, 7, 13,112,151,121,240,224,129, 79, 62,249,228,227,238,221,187,195, 0, 12, 1, 16,250,255, 81,192, 0, 0, +238,221,187,247,204, 96, 48,116,111,217,178, 37,228, 64,103, 0,103,155, 36, 34,147,147, 99,245,122,125,191,118,237,218, 33,252, +228,201,158, 0,210,106, 43,167, 6,122,250,250,250,162,172,172, 12, 47,158, 63,143,105,130,200,218,183, 34,104,227,244,169, 51, +231,227,240,190,221, 56,248,195,206,204, 3,123,119, 56,161, 17,254, 99, 52,104,208,248, 87, 89,179, 26,212, 34,255,163,152, 93, +151,248, 98, 53,133,165,164,184, 56, 38, 54, 54,182, 69,135, 14, 29,176,111,223,190, 78,221,186,118,125,195,225,114,245, 92, 14, + 7,140, 70, 60, 72,202,212,234,171, 87,175, 94,237, 60,106,212, 40,214,253,251,247, 33,149, 74,171,133, 86,213, 55,139,197, 2, + 33, 4, 2,129, 0,167, 79,159, 46, 47, 83,171,175, 54,104, 45, 50, 24, 13,140,183, 66,143, 16, 2,185, 92, 14, 14,135,131,173, + 91,183, 97,215,150, 45,147, 12, 64,152,135,208,250,115, 0,252,255,111, 15,232,210,210,107,191,254,250,107,199,192,192, 64,182, +163,163, 35,228,114, 57,138,139,139, 81, 88, 88, 8,133, 66, 1,133, 66,129,226,226, 98,200,229,114,240,249,124,196,197,197, 85, +104, 74, 75,175,213,197,199,211,104, 78, 77,155, 54,109, 89,108,108,172, 29,139,197, 66, 69, 69, 5,140, 70, 35,140, 70, 35,202, +203,203,145,156,156,140,248,248,120, 36, 36, 36,160,168,168, 8,108, 54, 27, 76, 38, 19,143, 31, 63, 46, 22, 86, 84,156,212,209, + 99,250,189,193, 6,194,111,223,190,253,241,148, 41, 83, 96,239,232,216, 11, 89, 89,141, 18, 48,103,234, 17, 48, 37,239, 39, 96, +126, 19, 64, 74,229,163,212,212,212,238,189,123,247,134,157,163,227,198,214, 89, 89, 87,158, 55,193, 79,203,160,215,223,186,125, +251,118,191,169, 83,167, 98,223,190,125, 27,173, 83, 83, 47,230,191, 51,205,105, 13, 88, 55,119,115,219, 56,125,250,116, 92,190, +124, 25, 6,189,254, 86, 61,148, 53, 35,190, 55,155, 62,123,161,211, 59,142,239,123, 41,138, 90, 0, 96, 51,221,163,104,208,160, +241, 79,182,104, 53,105,234,208,196, 96, 88,177,116,233,210, 10, 6,131,129, 49, 99,198,152,158, 61,119, 46,224,241,147, 39,174, + 50,153, 76, 98, 48, 24, 26,228,178,214,106,119, 44, 93,186, 84,174,211,233,224,233,233,137,162,162, 34, 24, 12, 6,176, 88, 44, +176, 88, 44, 80, 20, 5, 6,131, 1,145, 72,132,216,216, 88, 28, 56,112, 64, 97,173,213,238,104,240, 33, 97, 48, 60, 13, 13, 13, + 5,147,201, 36,124, 62, 31, 20, 69,129,197, 98, 97,219,182,109,178, 93, 64, 56, 0, 48, 25, 12, 29, 0, 48, 24, 84, 99,189,119, + 27,156,183,228,114,185, 48, 86, 46, 2,104,176,172,185, 86,187,125,211,166, 77,202, 23, 47, 94, 64,173, 86, 87, 91,223, 84, 42, + 85,181,115,189, 92, 46, 7, 69, 81, 80,171,213, 56,119,238,156,210, 92,171,221, 94, 23, 95, 33,144,155,149,148, 52,162, 83,167, + 78,133,169,169,169, 40, 41, 41,193,211,167, 79, 17, 25, 25,137, 19, 39, 78,224,242,229,203, 72, 78, 78,134, 94,175,135,131,131, + 3, 8, 33, 56,115,230, 76,137, 94,169, 28, 82, 8,228,210, 99,162,110, 52,147, 74,251,217,218,216,100, 88, 91, 89,101, 53,147, + 74,251,189,187, 93, 12,188,124,249,242, 37,244,122, 61, 92, 93, 93, 45,234,243,211, 34,122,253,237,219,183,111, 99,234,212,169, +112,106,209, 98,131, 11, 96,253,110, 25, 23,192,218,197,205,109, 67,149,128, 33,122,253,237,166,214,217, 20,216,249,249,231,159, +151,113, 56, 28, 28, 63,126,220,181,194,221, 61,129, 5, 76, 20, 1, 94,189, 1, 78, 67,251,219, 1,187,191,252,242,203, 92,138, +162,112,228,200, 17, 43,177,155,219, 51, 22, 48, 77, 12, 52, 19, 3,205, 88,192, 52,177,155,219,179,227,199,143, 91,233,245,122, + 44, 94,188, 56,215, 14,216, 93, 15,229, 66, 66,200,112, 66,136, 31, 33,196,233,192,222, 29,248,245,108, 88,149,200,154,137, 74, +167,247, 41, 0,158,209, 61,142, 6, 13, 26,255,100,212,106,134, 98,117, 90,155, 7, 16,155, 94, 93,124,240,232, 73, 98,137,149, +185,217,165,170,109, 69,241, 97, 45,251,122,155,249,124,247,221,119, 96,179,217,200,204,204,196,243,231,207, 97,102,102,134, 73, +147, 38,105,203,148,202, 17, 53,114, 29,246, 7, 16,249,150,179, 50,159, 90, 73,146,200,141, 21,215,226,226,175, 17, 76,177, 88, + 12,149, 74, 5, 6,131, 1, 62,159, 15,129, 64, 0, 19, 19, 19, 68, 71, 71, 99,216,240,145,134,124,129,223,111, 1, 75,127,203, +167, 86,205, 89, 21,107,168, 51, 32,136, 5, 62,179,177,183, 95,186,122,245,106,147, 65,131, 6,129,195,225,192,177,153, 71,174, +235,224,205, 59, 25, 12, 74,159, 85,168, 88,229,214,204, 94,252, 60, 41, 13, 0, 37,171,120,184,218,190, 70,174,195, 63,212,211, + 89,119,211,245,244, 79, 91,204,218,183,175,244, 71,151,203,229,200,203,203,131, 76, 38,131, 92, 46,135, 90,173, 6, 0, 68, 68, + 68,224,215,168, 4, 69,153, 99, 64, 74, 93,245,252,173,237,137,166,246,229, 15,154, 31, 13,253,137,105,109,109,141,188,188, 60, +228,231,231, 67, 46,151,163,172,172, 12, 6,131, 1, 69, 69, 69,216,127,240, 39, 67,161,200,239,117,117, 64,200,250, 56,213,153, + 38, 22,170, 59, 14,190,173, 93,200,199, 31,127,108,106,102,102, 6,163,209,136,226,226, 98,100,100,100, 32, 53, 53, 21, 81, 81, + 81,106,153, 92, 7,181,213,128,172,234,128,165,181,112,254,133,248,219,113,214,140, 91,101,111,103,151,157,158,158,110, 99, 48, + 24,224,224,224,160,151, 23, 21,109,224, 2,151, 77,129, 28, 0,164, 0, 88,189,125,231,206, 25, 35, 71,142,196, 7, 31,124,144, +153,155,151,215,188,182,190, 68, 0,166, 39, 32, 46,117,116,140,127,248,240,161, 52, 35, 35, 3, 83,167, 78, 45, 72,127,245,106, +121,149,191, 86, 9,208,211,197,205,109,195,241,227,199,173, 90,180,104, 1,111,111,239, 92,126, 70, 70,155, 68,160,164,142,254, + 89,231,216,148,191, 60,223,124,238,232,182, 31,204,155, 55, 15,122,189, 30, 81, 81, 81,120,240,224, 1,210,211,211,113,231,206, + 29,185,153, 80, 56,190, 70,174,195, 90,251,231, 16, 15,181,235,145, 35,161, 20,135,195,193,193,131, 7, 17, 27, 27, 11, 0,240, +245,245,197,244,233,211,161,215,235, 49,121,242, 20,114, 62,209, 36,165,190,254, 9,160, 45,128,111, 80, 41,242, 62, 32,132,240, + 41,138,202, 6,224,132,166,249,100,209,253,147,230,164, 57,255, 61,156,255, 72, 52,152,235,112,237,247, 16,255, 62,205,199,172, +236,176,189, 33,172, 30, 61,253,188, 66,130,131, 24,157, 58,117,130,147,147, 19,124,125,125,145,145,145,193,147, 72, 36, 13,229, + 83, 83,249, 13,158,152,234,227,227, 35, 89,190,124,185,120,224,192,129,108, 39, 39, 39, 16, 66, 16, 27, 27,139,240,240,240,242, +125,251,246, 41, 74,109,135,203, 99,174,255,172,106, 76, 62,181, 7, 64, 41,128, 53,142,217,217, 63,204,159, 59, 55,168,125,135, + 14, 31, 7, 7, 7, 51, 68, 2, 19,246,250, 85, 51,249, 0,176,246,219, 19,226,145, 1,147,176,221, 29,232, 53,177,246, 60,114, + 53,235,153,145, 53, 43,125,232,232,126,238,159, 45,152, 97, 24, 55,110,156,208,204,204, 12, 78, 78, 78, 48, 55, 55, 71, 74, 74, + 10,178,178,178,200, 47,191,252,162,186,247,248, 37,251,204,229, 71,233,124,177, 93, 99,242, 18, 42,253, 6,125,248,122,232,208, +161,230,211,166, 77, 51,237,216,177, 35,155,199,227,129,199,227, 33, 47, 47, 15,201,201,201,229,191,252,242,139,170,212,102, 72, +113,204,245,227,202, 70,230, 58, 44,243,155, 16,146,124,235, 74,240,226,248,167, 79,167, 24,129,118,229,229,229, 14, 6,131,129, + 98, 48, 24, 57, 70,163,241,105,185, 82,121, 64,235, 27,188,141,206,117,216, 56, 24, 12, 6,142,193, 96,128, 92, 46,199,149, 43, + 87, 88,175, 94,189, 90,253,228,201,147,213,217,217,217,168,168,168,192,216,177, 99,225,235,235,139,235,215,175, 35, 63, 47,239, +151,250,184, 18,129, 18, 94, 86,214,244, 89,179,102, 93, 8, 13, 13,101, 60,121,242,196,234,224,193,131,251,107, 19, 48, 83,166, + 76, 49,230,101,100, 76,215, 2, 37,245,244,207,250,198,102,193,197,227,187,158,140, 26, 19,208, 58, 56,112, 53,187, 91,183,110, +176,178,178, 66,207,158, 61, 81, 94, 94, 46,105,213,170, 85, 67, 99, 83,233, 55,120,124, 74,187,118,237,132,219,182,109,147,206, +152, 49, 3, 11, 22, 44, 0, 0,148,149,149,225,242,229,203, 88,188,120,113,110, 6,171,179,186,161,254,249,214, 82, 85, 37,192, +110, 2,240, 3,144, 2,218,241,157, 6, 13, 26,255, 76, 84, 37,149,182, 67,101, 98,233,243,168,124, 57,111, 56,215,225,173, 7, +207, 80, 51,205, 71, 37,236,158,235,157,167,189,154,179,116,131, 55,179, 66, 97,206,166, 52,102, 73, 47, 95, 82, 13,229, 60,172, +206,167, 38,246, 80, 89,166, 30,235,180,126,237,218, 69,219,183,111,239, 87, 21,194, 65, 32, 16, 60, 45, 83,171,175, 90,107,181, + 59, 74,197, 30, 87,155,154,155, 47, 11,200, 3, 48,215, 60, 38,102,167,255,200,177,155,248, 22,174,236,149,235,246,105,152, 12, +134, 46, 57, 59, 31,219,221, 1, 97, 35, 22, 72,150,234,128,120,185,157, 62,207, 50, 32,241,203,207, 63,255,108,237,154, 53,157, + 68, 34, 81,175,114,189,222,195,104, 52, 2, 70, 99, 82,169, 90,125,147,148,151, 63,212,250, 6,110,225,139,237, 72,163,243, 18, + 74, 90, 41, 45, 94,135,117, 58,116,224,192,194,147, 39, 79,254,161,237,150, 90,237,206, 82, 73,171,200,198,180,189,102, 25, 13, +112, 23, 50,217,221,250, 76,151,116,174,195, 70,190,125, 24,141,179,205,205,205, 15,247,235,215,143,223,191,127,127, 12, 27, 54, + 12,221,186,117,131,209,104, 4, 33, 4, 74,165, 18, 39, 78,156,192,166, 77,155,146,154, 3,107, 26,226,211, 2, 87,121,191,254, + 58,164, 93,187,118, 7,235, 19, 48,111, 69, 86,131, 62,137,245,143, 77, 94,146, 94, 60, 34,109,194,252,245,238, 58, 69,142,196, + 82,160,151,198, 63,123,202,104,252,216,244, 84, 26, 98, 79,116, 30, 59,122,244,124, 38,139,213,243,237, 10, 72,242,226,249,243, +152,170,164,210,240,157,126,165,137,125,169, 42,118, 29,237,248, 78,131, 6,141,127,186,208, 26,134, 74,127,173,234,148, 60,117, +230, 58,172,178,250,176, 88, 44, 89,202,153, 57,147,234, 99,103, 3,253,222, 90,178,208, 96,174,195,183,127,167, 1, 74,104,181, + 95,253, 46, 24,105,141,213,133,236,119,202, 55, 37, 44, 98, 49,144, 8,189,214, 31,178,231,192,185,185,149,124,157,214,126, 81, +179, 77,117, 62,100,127,119, 92, 78,145, 6,184, 5,149,234, 22, 84,170, 90,157,118,217, 44, 78, 81, 67,245,124,183,237, 25,128, +226,207,182,253, 93,206, 6,197,195,159, 56,159,255, 54,188, 41, 40, 56, 3, 64,228, 24, 17, 97,123, 49, 34, 98,220,103, 75,150, +140,181,179,183,119,179,178,178, 50, 55, 53, 53,101,220,191,127, 63, 85,175,209,236,108, 15, 28,122,107, 77,109, 16, 90,224,170, +103, 70, 70,155, 15, 71,143,158, 79,177, 88, 61,106, 10, 24,162,215,223,113, 5,118,215,103,201,122,223,177,233,196,179,235,247, +214,146, 5, 38, 48,171, 49,125, 35,171,178, 30,235,160,215,175, 67, 92, 92, 45,125,190,201,125,105, 45, 69, 81, 74,208,142,239, + 52,104,208,248,231,162, 42,223,225,249,255,235, 3,247,167, 57,105,206,127, 16, 39, 19,149,171,232,232,243, 73,115,210,156, 52, + 39,205, 73,163, 81, 96,209,167,128, 6,141, 70,195,128,223,166,193,104,208,160, 65,131, 6,141, 42, 84,249,102,213,196, 15, 64, +165,235, 78, 93,170,180, 41,171, 9,222, 71,217, 70,210,156, 52, 39,205, 73,115,210,156, 52, 39,205,249,175,227,108,136,251,239, +184,154,177,202, 39,171,218, 55,235,255, 10,180, 89,149,230,164, 57,105, 78,154,147,230,164, 57,105,206,127, 58,236,222,138,172, +154, 31, 0, 77, 12, 88, 74,131, 6, 13, 26,255, 84, 4, 7,131, 65, 8, 40, 66,130, 25,132,156,100, 18, 18,192, 36, 4,127, 42, + 21, 72, 64, 64,237,193,108,255, 51,201,220,148, 62,227, 52,104,252,163,144,131, 58,146, 74,211, 62, 90,255,127,225, 44,149, 74, +247, 2,160,114,115,115,103, 3,200,160, 79,201,255, 30, 44, 44, 44,250,233,245,122, 40, 20,138,171,255,196,246,181,118,195,104, +194, 64,171,234, 31, 8, 50, 94, 36,227,112,109,101, 91,185, 99, 42,168,223, 98,113, 81, 70,188,120,254, 10,167,155,112, 56,198, +144,254, 78,187, 1,224, 66,100,230,124,252,119,226,106,181,180,182,182,190,196, 98,177, 88, 6,131, 97,174, 76, 38,139,168, 91, + 8, 5, 48, 1,128, 77,174,175,144,231,218, 44,255,244, 19,138, 93,170, 61, 32,215,150,169, 75,152,108,230,107, 30, 91,122,123, +206, 12,198,133, 98, 85,215,231,181,237, 31, 22, 22, 86,103, 22,239, 54,238, 24,194, 48,180, 30,238,219, 54, 53,229,155, 29,157, +182,247,114,181, 98,167,102, 62, 22,109,220, 83,178,151, 43,113, 25, 62,117, 28, 21,193, 18, 80, 83, 14, 28, 40, 84,209,163,172, +241, 88, 15, 88,148, 3,222,108, 30,207,201,160,215,219, 82, 0, 97,178, 88,121, 21, 90,109, 38, 7,136, 91, 1,200,255,233,156, + 28, 30,207,209,160,215,219, 2,192,255, 98, 61,105,252, 30,117, 10, 45,145, 72, 20,205, 96, 48, 28,107, 38,195,173,202, 39, 88, +245, 91,205,109, 20, 69,193, 96, 48,100, 21, 23, 23,119,108,194,241,205, 0,140, 3, 80,181, 68,253, 40,128, 19,120,127,135, 99, + 51, 14,135,179, 84, 40, 20,246, 45, 43, 43,107, 3, 0, 38, 38, 38,241,106,181,250, 90,121,121,249, 55,239,201,203, 2,240,161, + 72, 36,234,195, 96, 48,250, 16, 66, 40, 66,200,117,149, 74,117, 13,192, 73, 0,239, 19, 41,193,196,198,198,102,157,133,133,197, +196, 21, 43, 86, 20, 90, 90, 90,122, 46, 94,188,248, 81, 81, 81,209,207, 5, 5, 5,171,208,132, 28,117,255,101,184, 73,165,210, +163,108, 54,155,153,153,153,217, 7, 0,156,156,156,174,235,116, 58,131, 76, 38,155, 4,224, 85, 19,249,132, 0,186,136, 68,162, +142, 34,145,200,207, 96, 48,180,122,155,159,241,133, 74,165,138, 42, 47, 47,143, 6,112, 31,128,250,127,104,140,152,178, 88,172, +208,183,125,221, 3,128,242,159,118, 19, 32, 12,180,122, 30,159,224, 89, 45,188,218,120,213, 93,152,130,115, 45,101, 27, 45,180, +250,246,178, 27, 62, 98,196, 0, 6, 0,232, 42, 46, 12,191,118, 51,231,236, 95,220,156,150, 99,198,140,185, 27, 26, 26,106,174, +213,106, 49,123,246,236,163,145,145,145,187, 21, 10,197,138,122,111, 28, 34,243,197,155,183, 93, 22, 80, 20, 3, 0,108,140, 70, +131,205,155, 55,175, 60,158, 63,187, 59, 56, 62,254,222,250,178,132,107,247,141, 20,123, 78, 57,122, 38, 52,166, 18,173, 92,225, + 63,124,236,232, 97,107,214, 4, 99,226,248,137,205,226,227, 53, 38, 14,102, 41,220,162, 50,161,187,165,181,205,136, 53,107,195, +168,219,183,206,140, 8, 61, 24,114,109,198, 12,203,190,180,216,106, 20,168,181, 44, 86, 23,177,187,187,223,248, 51,103, 32,114, +114, 98,177,120, 60, 6, 0,232,181, 90, 39, 85,102,166,221,241, 17, 35, 58, 7,191,124,121, 35, 24,120, 64,115,254,127,225,164, +209, 20,161,197, 96, 48, 28,223,188,121, 99, 35, 20, 10, 43,111,198,132,192, 96, 48,192, 96, 48, 84, 39, 47, 38,132, 84,127,235, +245,122,120,121,121, 53,234,141, 22, 64, 95, 0, 31,245,238,221, 59,224,155,111,190, 97,123,123,123, 87,165, 12,233,185,114,229, +202,111, 99, 99, 99, 79, 1, 56,132,202,224,141,141,125,227, 29, 36, 20, 10,143,108,222,188,217,108,192,128, 1, 44,123,123,123, + 80, 20,133,220,220,220, 46,145,145,145, 29, 23, 47, 94, 60, 87,173, 86, 79, 6,112,169, 9,231,167,173,169,169,105,216,232,209, +163, 29,123,245,234,197,111,221,186, 53, 12, 6, 3, 30, 63,126, 60, 35, 58, 58,122,194,169, 83,167,130,148, 74,101, 0, 26,159, +175,141, 18,137, 68,211,204,204,204,214, 5, 6, 6, 90, 76,158, 60,153,251,236,217,179, 98, 87, 87, 87,234,246,237,219,214, 39, + 78,156,152,187, 97,195,134, 15, 21, 10,197, 42,149, 74,245, 19, 26,145, 67,209,212,212, 52,154,193, 96, 56, 54, 70, 8, 3,104, +138, 24,110,223,188,121,243, 19,183,110,221,106,158,150,150,102, 24, 53,106,212, 97, 0,184,118,237,154,119, 69, 69, 5, 53,112, +224,192, 11, 89, 89, 89,227, 0, 60,110,100,219,125, 44, 44, 44,206, 78,156, 56,209,194,205,205, 77,208,188,121,115, 74, 40, 20, +130,201,100,162,164,164,196,254,217,179,103,253, 31, 60,120, 80, 22, 25, 25, 89,164,213,106, 71, 0,136,107,194,117,234,102, 99, + 99, 51,133,205,102,183,213,235,245, 14, 0,192, 98,177,222, 84, 84, 84, 60,147,201,100,161, 0,238,190,239, 0,177,181,181,221, +181,110,221, 58, 43,153, 76, 70, 54,108,216,176, 75,169, 84, 78,251,167,222, 12,142,254,124, 18,209,143, 30, 0,149,105,115,168, + 90,250, 31, 5,128,243,233,167, 75,208,241,131,206,152, 52,241,195, 6, 57,135,246,115,220,204,230,114, 44, 53, 26,205,221,146, + 82,237, 73,161,128, 63,110,226, 4,255, 36, 0,184,112,241,198,184, 78,157,204,175,139, 5,188, 15,249,124,126,183, 10, 93,121, +225,175, 87,179, 62,111,138,168,114,112,112,184,100,110,110, 46, 40, 42, 42,202,205,207,207,255,126,248,240,225,107, 15, 29, 58, +100,158,154,154,138,204,204, 76, 44, 90,180, 72,148,149,149, 53, 63, 46, 46,238,158, 78,167,171,211,178,165, 84, 22,237, 88,185, +124,100,160, 88,108,197, 20, 10,204, 96, 42,182,128,171, 91, 59,116,233, 54, 28, 67,134,125,140,228,164,216, 46,135, 14,174,137, +125,243, 38,242,107,145, 69,139,181,114,121,243, 58,239, 75,173, 91,162,215,136,209,149, 34, 43, 48, 48, 24, 47, 19, 18,148,105, +175, 25,255, 57,127,134, 37, 24,210,207,139,167,215,229,166,221,190,117,166,121,143,158,163, 0,160, 99,232,193,144,107,255,153, +100,222,111,215,209, 98, 37,253, 72,170,251,222,185,134,205,158, 54,104,219, 54, 27,223,185,115, 57,170,215,175,203, 83,246,236, + 41,205,139,138, 50,176,120, 60,226, 52,120, 48,101,221,167, 15,127,238,139, 23,156, 59, 27, 54,248,177, 67, 66, 92, 87,149,151, + 31,161, 57,255, 79, 57,255,237,168,114,130,175,185,250,240,135,122,133, 22, 69, 81, 16, 10,133, 56,126,252, 56,216,108, 54, 88, + 44, 22,216,108,118,157,127, 59, 59, 59, 55,166, 34, 99,164, 82,233,183,187,119,239,182, 29, 52,104, 16,248,124,126,245, 6, 38, +147,137, 1, 3, 6,160,127,255,254,236,236,236,236, 9,199,143, 31,159,176,126,253,250, 60,185, 92,190, 0,111, 19, 67,215,131, + 62,158,158,158,225,151, 47, 95, 54,209,104, 52,136,138,138, 66,113,113, 49,184, 92, 46, 28, 29, 29, 49,112,224, 64, 86, 66, 66, +130,197,128, 1, 3,194, 95,190,124,233, 15,224,122, 35,234,218,209,198,198,230,230,201,147, 39,249,237,218,181,163,146,147,147, +225,235,235, 11, 0, 40, 41, 41,193,168, 81,163,248,147, 39, 79,118,155, 48, 97,194,125,153, 76,214, 11, 64,116, 3,124, 29,164, + 82,233, 79,163, 71,143,182, 95,191,126,189,153,169,169, 41,210,210,210,114,164, 82,169, 71,213,249,158, 48, 97, 2,119,248,240, +225,118,155, 54,109,218, 17, 22, 22,246,185, 76, 38,155, 6, 32,166, 94,213,250, 86, 16, 11, 4, 2,228,229,229,225,232,209,163, +152, 63,127, 62,152, 76, 38,100, 50, 25, 78,156, 56,129,255,252,231, 63, 85,130,166, 81, 98, 88, 32, 16,244,119,119,119,223,127, +237,218, 53, 71,137, 68, 2,123,123,123,198,151, 95,126,217,214,213,213,213,164, 89,179,102,204,156,156, 28,132,135,135,187, 78, +153, 50,229,108, 70, 70,198, 12,173, 86,219,224,148,154,173,173,237,129,243,231,207, 59,199,199,199, 99,207,158, 61, 40, 42, 42, + 2,151,203,133, 68, 34,129, 84, 42,133,135,135, 7,181,124,249,114,193,240,225,195, 5, 11, 22, 44, 56,160,211,233,218, 55,226, + 26,181,179,177,177,217,219,167, 79, 31,215,144,144, 16,137, 84, 42, 69,213,139, 65, 73, 73,137, 99, 90, 90, 90,151,192,192,192, +128,232,232,232, 84,153, 76, 54, 7,192,147, 38, 14,156,246,173, 91,183,246, 31, 53,106, 20, 51, 39, 39, 7,161,161,161,254, 74, +165,178,125, 19,196,229,223, 10,209,143, 30, 96,246,188, 69, 42,123, 39, 39,206,229, 75,251,199,132,157,110,249, 72, 98, 82,153, +144, 90, 94,134,242,128,209, 47, 63, 24, 56,232, 99,206,208, 97,163, 84, 63,124,183, 67,212, 24,161,197,230,114, 44,143, 30,217, +154,113,235,118,116,219, 43,145, 15, 6,143, 25, 49,130,112, 56, 18, 87, 0,248,124,241,167,236,240,115,231, 14, 14,232,223, 57, +187,103,143,142, 25,147, 38, 47,113,110, 66,117, 91,182,108,217,242, 70,108,108,172, 45,143,199, 67, 81, 81,145,229, 15, 63,252, +176,181, 71,143, 30,140,148,148, 20, 36, 36, 36,224,245,235,215, 40, 41, 41,193,128, 1, 3, 68, 49, 49, 49,223, 3,168, 83,104, +149, 51,250,174,179,111, 86,177,211,210, 68,216,188,220,160,176, 33, 21, 57,173,175,156,191,226,115, 44,180,204,215,214,206,203, +227,163,233, 65, 88,179,246, 20,251,231,163, 27, 3,175, 70, 30, 3, 24,205,235,206, 8, 64,208,109,229,170, 21, 80, 40,181,152, + 60,113, 22,166, 76,156,101, 73,160,179, 35, 6,141, 80, 87, 86, 44, 49,229,188,136,216,189,111,235,104, 0,142, 53,196,214, 85, + 90,108,213,141, 53, 44, 86,103,255,111,191,181,110, 59,115, 38,239, 73, 72,136,186, 32, 42,170,204,125,232,208, 98,223, 79, 62, +209, 2,128,242,245,107,206,203,160, 32,129,181,159,159, 73,215,165, 75,205, 13, 58,157,116,205,154, 53,157, 2, 43,147,151, 55, +137,211,121,220, 56, 67,224,193,131, 31, 68, 45, 89,210,155,170,168, 96, 14,238,218,245,241,134,208,208, 55,127,134,243,175,172, +103,246,205,155,218, 34, 87, 87,248,142, 26, 85,232,108, 99,163,253, 43,219,254,103,234, 73,163, 26, 85,190, 90,179,107,190,161, + 34, 34, 34,162, 23,128, 27, 0, 66,252,253,253,131, 1, 64, 44, 22,231,201,229,114,155,240,240,240, 6, 69, 22,155,205,134,157, +157, 29, 60, 60, 60,100, 50,153,204,182,158, 10,100, 26,141, 70, 71, 66, 72,181,245,165, 46,104,181, 90, 36, 37, 37,193,199,199, + 39, 11,149,137,104,235, 52,234, 8, 4,130,148,132,132, 4,171,231,207,159, 35, 58, 58, 26,174,174,174, 48, 55, 55, 7,155,205, + 70, 69, 69, 5, 20, 10, 5, 60, 61, 61,193,227,241,208,161, 67,135, 2,181, 90,237,218,192, 20, 16, 79, 40, 20, 38,221,188,121, +211,201,215,215, 23, 15, 31, 62,132,147,147, 19,164, 82, 41, 0,224,245,235,215,184,125,251, 54,134, 14, 29,138,216,216, 88,140, + 29, 59, 54, 83,173, 86,123, 0,208,214, 69,104, 97, 97,145,115,237,218,181, 44,111,111,111,141, 90,173,102,228,229,229,177,163, +162,162,244, 74,165, 82, 84, 82, 82,194,150,203,229,108,133, 66,193, 82,171,213,108, 6,131,193, 41, 43, 43, 99, 95,189,122,149, + 89, 94, 94, 94,111,128,204,170,235,116,238,220, 57,120,123,123, 35, 60, 60, 28,159,125,246, 25,238,220,185, 3, 39, 39, 39,156, + 60,121, 18, 75,151, 46, 69, 98, 98, 34,172,172,172,208,186,117,235,134,174, 17,220,220,220,146,159, 62,125,234,198,225,112,170, +242, 58, 86,229,203, 67,126,126, 62, 94,189,122,133, 55,111,222,192,221,221, 29, 19, 39, 78,124,245,230,205, 27,247,134,122,158, +131,131, 67,126,124,124,188,149,143,143, 15,242,242,242, 32,145, 72, 32, 22,139, 33,145, 72,170,255,118,117,117,197,146, 37, 75, + 32,149, 74,101, 26,141,198,182, 33, 17,228,237,237,125,233,234,213,171, 86,102,102,102,200,205,205,133, 66,161, 0,139,197,130, + 64, 32,128,149,149, 85,181,144, 79, 74, 74,194,176, 97,195, 10, 82, 82, 82, 6, 53, 65, 36, 49,108,109,109, 19,226,226,226, 60, + 8, 33,200,200,200, 64, 98, 98, 34,230,205,155,151,164,209,104,188,240, 15,202,217, 87,195,239,138, 51,109,250,108,206,232,145, +221,116, 47,226, 35, 40,158, 49, 17,237,219,154,149, 0,192,227,103, 10,177,150,225,137, 86,109,252,201,233,179,119,185, 63, 29, +250,129, 13, 35,108, 65, 33,241, 69, 18,190,170,139,123, 96, 31,187,153,159,126, 58,163,109,239, 30,189, 24, 74,181,218,230,251, +239,183,117, 72, 73,121, 97, 3, 0,174,174,173,100,115,231, 46,142, 49, 21, 10,101, 55,110,223, 52,110,223,126,224,217,229,235, + 57,251, 26, 81,101, 87, 15, 15,143,123,231,206,157,179,178,177,177,129, 88, 44,134, 90,173, 70,121,121, 57,158, 63,127,174, 57, +126,252,120,133,153,153,153,105,110,110, 46,228,114, 57, 40,138,194,185,115,231, 50, 0,184,188, 75, 84,229,163, 5, 0,243,134, +180, 98,183,238,235, 97,206,225,233, 77, 76,216, 47,237, 64, 25,120, 20, 17,217, 94,184,244,216,231,194,149,135,147, 70,143,249, +204,186,103,175,209, 8, 92, 29, 80,145,157,157,225, 91,142,158, 9,181,249,104,121,185,163,239,168,177,163, 63, 92,179, 38, 24, +193,129, 33,136, 56,119,166, 68, 36,100,104,205, 36,108,177, 95,151,238,154, 37,243, 71,102,170, 84,217, 78,107, 54, 29,159, 56, +108,228, 18,199, 30, 61, 71,225,246,173, 51, 8, 61, 24, 18, 77,153, 16,122, 26,241, 29, 4, 3,230, 18, 87,215, 57, 11,147,146, + 56, 79,130,131, 85,250,236,236,226,142,139, 23, 23,212, 86, 54,235,202, 21, 33,215,222,222,204,124,196, 8,139, 29, 46, 46,164, + 66, 38,219, 91,155,143, 81,109,156,145, 34,145,228,216,133, 11,253, 8,155,221,107,217, 23, 95,152,248,251,251, 67,161, 80,224, +212,169, 83,216,187,103,143,214,206,206,238,169,253,179,103,177,109, 21,138,213,141,229,236,184,120,113,129,193, 96,160, 62, 92, +186,116, 64,252,235,215,125,115,101,178,102, 0, 96,103, 97,145,217,209,213, 53,250, 64, 68, 68,226,174,230,205,141,141,173,231, +143, 23, 47,218,134,165,165,205,180,176,176, 48,201,147,201, 88, 60, 46,183,176, 75,235,214, 39,191, 91,181,234,134, 62, 46,142, +195,119,116, 52, 19,251,251, 55,185,237, 29, 23, 47, 46, 40, 82, 42, 89, 11,215,174,237,158,158,151,215, 76,165,213,186,203,149, + 74,169,161,162,130, 97, 38, 16, 20,182,240,244,148,149, 69, 69,229,180, 40, 45, 93,180, 15,144,253,183,174,117,109, 90,228,111, +132,119,227,104,253, 33,215,225, 13,127,127,255, 63,172,174, 33,132, 52,202,154,197,102,179,127, 55, 77, 85, 15, 56, 20, 69, 33, + 38, 38, 6,150,150,150,144, 74,165,224,241,126,159,124, 48, 63, 63, 31,119,238,220,193,139, 23, 47,208,174, 93,187,170,105,140, +186, 21, 17,143,247,233,166, 77,155, 36, 58,157, 14,209,209,209,232,216,177, 35,120, 60, 30, 56, 28,206,239, 68,160, 76, 38, 67, +155, 54,109,176,108,217, 50,241,250,245,235, 63,213,106,181,117,190,145,178, 88,172, 5,179,102,205,178,169,178, 96,101,102,102, +162, 67,135, 14,213,219,173,173,173,241,248,241, 99,116,236,216, 17,142,142,142, 8, 8, 8,176, 9, 13, 13, 93,160,215,235,191, +169,139,147,203,229, 50,188,189,189, 63, 0, 0,161, 80, 8, 6,131,241,210,204,204,204,218,214,214, 86,104,102,102,246,135, 54, + 30, 60,120, 80,206, 96, 48, 42, 26, 84, 3, 12, 6,114,115,115,209,182,109, 91,148,148, 84,102,112, 81,171,213,112,119,119,135, + 66,161,168, 22,173,246,246,246, 40, 43,171,223,245,203,199,199, 39,216,203,203,107,160, 80, 40,228,177,217,108, 60,121,242, 4, +190,190,190, 56,126,252, 56,156,157,157, 33, 16, 8,144,148,148, 4,111,111,111,220,188,121, 19,214,214,214,104,211,166, 13,207, +198,198,230, 86, 81, 81,209,245,244,244,244,224,122,234,201, 16,137, 68,184,121,243, 38, 14, 28, 56,128,215,175, 95, 35, 59, 59, + 27,166,166,166,104,223,190, 61, 90,183,110,141,110,221,186, 33, 41, 41, 9, 84,195,157, 73,234,225,225, 17,241,240,225, 67, 43, + 66, 8, 66, 67, 67,161, 82,169,160,211,233,192, 96, 48,192,231,243, 97,110,110,142,190,125,251,194,218,218, 26, 30, 30, 30, 56, +113,226,132,213,144, 33, 67,126,149,201,100,237, 1,228, 54,116, 94,205,205,205, 23, 5, 5, 5, 57,217,216,216, 32, 45, 45, 13, + 37, 37, 37,176,181,181, 69,239,222,189, 29, 34, 35, 35, 23, 85, 84, 84,108,251,167, 60,200,106, 56,190, 83,151, 47,237, 31,227, +209,162,216,187,157,167,192, 41, 60,194,214,233,120,132,172, 13, 0,180,109,101, 27, 63,198, 95,144,249, 36, 62, 34,243,242,165, + 51,209, 47, 94, 34, 28,141,152,218, 46, 41,213,158,188, 18,249, 96,176,111,187, 14,198, 77, 27,151, 14,155, 63,111, 38,207,198, +246, 99,228,101,156, 65,228,181, 24,231,165,159,205,178,254,102,203,143, 23,174, 68, 62, 96,148,148,106, 87, 55,206,148,229,188, +235,208,119,221,172,148, 5, 97, 72, 78,224,194,196,180, 45, 92, 93, 91, 66,161, 80,128,207,231,243, 39, 78,156,104, 88,177, 98, + 69,169,153,153,153,128,162, 40, 92,191,126, 93, 6, 96, 80, 67,188, 26, 27,115, 98, 40,175,208, 19, 46,211, 72, 40,211, 50,202, + 80,196,125,246, 60, 21, 3,251,247,201,235,209,185,237,250, 21,107,182,172,244,104,233,107, 61, 99,102, 8,123,109,240,164, 61, +160,208,179, 54,158,132,100, 92,163, 78,158, 54, 1, 48,108,205, 87,193, 72, 73, 73, 50,159,253,145, 60,132,197, 51,177,247,114, +233,110,186,231,192,245,193,238,238,205,155, 45, 89, 16,112,126,235,183, 91,135,213,180,108, 29, 58, 24,116, 22, 64,191,198,156, +219,127, 17,124,166, 68, 68, 64,149,145, 81, 81,116,235,150,166,223,183,223, 22, 56, 13, 26,180, 77, 87, 94,110, 85,117,171, 96, + 80, 20,168, 42,215, 9,163,145, 98, 45, 91,198, 32, 44, 22, 42,204,205, 63, 66,113,113,203,134, 56, 63,203,201, 25, 51,105,230, +204, 97,103, 47, 94, 68,243,230,205,171,159,103, 18,137, 4, 75,151, 46,197,226,197,139,121,143, 31, 63,238, 20, 22, 22,214,233, +155,205,155,109, 1,140,105, 76, 61, 47,223,191,111,254,201,154, 53,171,218,117,236,232,124,248,232, 81,158,155,155, 27, 0,224, +213,171, 87, 30, 27, 55,108,112,105,235,237,157,183,254,211, 79, 15,197,175, 88,209, 6,192,173,250, 56,115,163,162,116, 97,105, +105, 51,175, 93,191, 46,105,219,182, 45, 0, 32, 49, 49,209,102,199,142, 29,179,218, 4, 4, 76, 94, 51,119,238,106,127,141, 70, +110,150,159,207,243,223,181,139,117,236,195, 15, 27,228,172,170, 39, 0,244,158, 49,227,211,158,125,250,180, 30, 51,115,166,133, +179,179, 51, 37, 18,137, 80, 94, 94,142,236,236,108,243,248,248,120,183, 8,165, 82,113,250,254,253, 80, 24, 12, 3,254,139,215, +186, 86, 45,242, 55,179,100,253, 81, 83,188,253,238, 29, 17, 17, 65, 0,244,246,247,247,191, 89,245, 0, 55, 24, 12,141, 18, 89, + 44, 22, 11, 20, 69, 53, 86,108,129, 16,130,130,130, 2, 20, 20, 20, 84, 79, 29,201,100, 50, 92,187,118, 13, 73, 73, 73, 96,179, +217,224,112, 56, 40, 47,111, 56, 7,173, 80, 40,236,223,191,127,127,214,253,251,247,225,234,234, 10, 19, 19,147,234,122, 85,125, + 56, 28, 14,236,236,236,160, 80, 40,208,175, 95, 63,246,206,157, 59,251,215, 39,180,196, 98,241,208,113,227,198,113,171,254, 87, +169, 84, 96, 50,153,213,162, 69,165, 82,161,168,168, 8,114,185, 28, 26,141, 6, 93,187,118,229, 70, 68, 68, 12, 45, 44, 44,252, +166, 49,237, 47, 45, 45, 85,201,100, 50, 73,207,158, 61,205, 15, 29, 58,148,216,181,107, 87,207,223,245,180, 27, 55, 52, 26,141, +134,205, 96, 48, 26,149, 71,239,200,145, 35,213,231,254,205,155, 55,216,179,103, 79,245,182,164,164, 36,236,220,185, 19,132, 16, + 16, 66,234,189, 70, 94, 94, 94, 67, 66, 67, 67, 59, 30, 62,124,184,152,201,100, 34, 49, 49, 17, 71,143, 30, 5, 33, 4,214,214, +214, 40, 45, 45, 69, 94, 94, 30,174, 95,191, 14,189, 94, 15,145, 72, 4, 7, 7, 7,254,130, 5, 11,122,132,132,132,176,235, 19, + 90, 6,131,193,192,100, 50,225,226,226,130,192,192, 64,104, 52, 26,112, 56,149,250, 82,161, 80, 64, 46,151, 35, 54, 54, 22,105, +105,105, 32,132,212,251,144,225,243,249, 1,135, 15, 31,182,225,114,185, 40, 43, 43,131, 82,169, 68,102,102, 38,210,211,211, 53, + 50,153, 76,111,106,106,202,112,113,113, 97,240,120, 60,222,168, 81,163,168, 42,193,233,239,239,111, 25, 26, 26, 58, 94,167,211, + 53, 36,146,172,165, 82,233,202, 89,179,102,241,107,246,217,220,220, 92,140, 25, 51, 70,112,247,238,221, 21, 10,133,226, 40,128, +252,127,216, 3,141,132,157,110,249, 40, 58, 50,209, 59, 60,194,214, 41, 61,203,208,125,233,231, 91, 88, 0,240,195,222,175,187, +135, 71,188,185,227,213, 60, 47, 51,236,116,203, 71,230,230, 47, 26, 18, 2,140,190,189,236,134, 11, 5,252,113, 99, 70,140, 32, +223,127,191,173,195,252,121, 51,121, 46, 45,151, 86, 90, 56,217, 54,232,167,255,138, 42, 45,123,197,255,254,251,109, 29,198,252, + 63,246,174, 59, 60,170,162,253,158,187,189,164, 87, 82, 72, 40, 17, 18, 82,104, 6, 80,122, 73,104, 9,130, 52, 81,170, 40,197, +134, 10, 34,136, 2, 98, 9,160, 40,160, 32, 77, 5, 12,210,107,168,161, 4, 68,138, 16, 66, 73,135,144,190,155,108,178, 73,118, +147,237,183,253,254, 32,201, 23, 98,146,221, 4,252,126,234,119,207,243,236,179,187,119,231,158,157,185, 51,119,238,153,119,222, +121,231,133,113,183,178,179,115, 54, 15, 30, 32,217,123,254,162,242, 88, 83, 22, 67, 79, 55,169,175, 92,162,131,111, 64, 8,130, +130,237,144,116, 59, 29, 7,246, 93, 69,112,232,115, 48,153, 76,160, 40,202,110,212,168, 81,250, 61,123,246, 24, 51, 50, 50, 42, + 13,203,227, 38,192, 0, 0, 32, 0, 73, 68, 65, 84, 6,195, 0, 0, 25,214, 10, 95, 80,144,194, 4,121, 61,103, 17,201, 36, 84, +165, 70,164, 95,244,241,254, 9,207,246, 26, 26,238,226,237, 43,244,176, 99,142,141,136,236,185,235,167,109, 75,223,251,120,217, + 46,244,232, 57,244,249,212,244,223, 66, 0,220,109, 80,188,102, 33,142,119,224, 16,149,117,255,126, 84,110, 78, 78, 65, 96, 43, + 47,243,131, 10,150,156,183,104,107,100,191, 1,227,187, 60, 19,220, 95,156,154,114,145, 88,186,240,165, 95, 87,172,254,230,229, + 26,177,117, 46,254,215, 1,211,167, 95, 21,111,223,222,184,117,252,127, 13, 34,137,164,181,125,155, 54,130,236,237,219, 13, 1, +163, 70,149, 3,128,217, 98,113,207,206,201,113,146,203,229, 96, 89, 22, 36, 73, 62,230, 67, 92,227, 55, 28, 22, 20,212,202, 22, +206,236, 79, 62,233,178,112,225, 66, 20, 21, 21,129,162, 40, 8,133,194,250,125, 54,116, 58, 29,166, 79,159,142,239,190,250,234, + 57, 91, 56,105,154, 38,230,172, 88,177,228,195, 37, 75,158,153, 61,123, 54,175,110,223,235,234,234,138,253, 7, 14,136, 55,108, +216,208,250,163,239,190,155,254,138, 68,146, 5,147,169, 73,206,210, 14, 29,224, 90, 92, 44,171, 17, 89, 0, 16, 20, 20,132, 77, +155, 54, 73,102,206,156, 41, 30, 53,106,212,154,164,174, 93,215,125,219,183,239,125,183,192, 64, 71,177, 68,210,218, 26,103,205, +245, 4,128, 74,163, 49,236,219,117,235, 92,174, 95,191,142,226,226, 98, 20, 21, 61, 26,143, 18, 4,129, 30, 61,122, 16, 83,166, + 76,113,106,239,231,215, 19, 52,253, 87, 86,247,159,180,200, 63, 8,179, 26, 56,246, 31, 31,173,234, 2, 17,213, 5, 36,234, 60, + 28, 31, 19, 44,214,132, 86, 75, 80, 81, 81,129,138,138, 10,108,219,182, 13, 34,145,168,246,225, 11, 0,102,179,217, 22,209,210, +217,199,199, 7, 26,141, 6,129,129,129,143, 89,178, 68, 34, 17, 4, 2, 1, 68, 34, 17, 36, 18, 9, 76, 38, 19,252,253,253,161, +215,235, 59, 55,197,105, 48, 24,186,185,186,186,214, 62, 96, 77,213,141,213,100, 50,213,230,215,108, 54,163,188,188, 28, 85, 85, + 85,168,172,172,132, 78,167,235,110, 75,121, 25,134,193,189,123,247, 30, 4, 5, 5,117,227,243,249,176,183,183,183,211,233,116, +181,190, 69,101,101,101,216,177, 99,135,110,234,212,169,238, 71,143, 30,181, 42,180, 8,130,192,219,111,191, 13,137, 68, 2,189, + 94,143, 31,126,248, 1,239,188,243, 14, 68, 34, 17, 42, 43, 43,177,105,211, 38,188,255,254,251, 16, 8, 4, 48,155,205, 88,183, +110, 93,163, 92, 41, 41, 41,217,215,174, 93,235,254,236,179,207,186, 28, 58,116,168, 36, 50, 50,210, 99,216,176, 97,144,201,100, + 48, 24, 12, 32, 73, 18,207, 61,247, 28, 58,117,234, 4,149, 74,133,147, 39, 79,150,118,236,216,209,253,250,245,235, 76, 81, 81, + 81,174, 21,113,205,214,177, 24,130,166,105, 20, 23, 23,163,162,162, 2, 37, 37, 37, 80, 40, 20, 40, 40, 40,128, 64, 32,128, 21, +157, 5, 55, 55,183,113, 97, 97, 97,124, 0,144,201,100,232,214,173, 27,150, 44, 89, 66, 25, 12,134,137, 0, 78, 86, 39, 27,177, +117,235,214, 67,151, 47, 95, 22,248,248,248, 32, 45, 45, 13, 30, 30, 30, 2,169, 84,106, 85,104,121,121,121,253,124,236,216, 49, +215, 26,113, 93,115,157,245,250, 71,213, 49,118,236, 88,215,157, 59,119,254, 76, 81,212,200,127,219, 67,205, 89, 6, 81,183, 48, + 71,205,158, 56, 85,232,130, 15,214, 8, 58,133, 61, 26,188,206,154, 13,193,215, 95,205, 15,157, 60,218,241,184,179, 76, 43,178, +198, 51, 34,194,111,195, 11, 47, 68,242, 94,158, 20,157, 41, 18, 57, 7,108,222,242,169,167,103,171,153,117,100,152, 35,220,220, + 29, 17,208, 70, 76,236, 63,158,234,185,104,241,103,166,216,157,223,100,253,186, 59,110,184, 88, 24, 63,244,228,217,252,185,141, +113,103, 60,168, 56,170, 55, 73,131,181,234, 59,132,107,171, 62,232,214, 53, 8,158, 30,229,216,250,243, 30,180,107,223, 3, 38, +147, 9,142,142,142,114,154,166, 45,124, 62, 63,214, 22,145, 5, 0,231,206, 85, 48,161,161, 21,102,126, 37, 67,189,249,206,215, + 47, 70,142,120, 33,100,240,224, 8,230, 76,252, 25, 75,159,238, 22,229,136, 97,221,138, 79,197,111,200, 84, 42, 30,118, 12,237, +220, 23, 41,201, 23,134,179, 44,238, 17, 68,195,214,167,228,251, 56,101,100, 82, 46,236,217, 51,139, 49, 48,183,100,159,127,113, +119, 68, 84,212,180,176,254,253,250, 51,241,103,207,155,197, 40, 77,117,236,219,187,240,205,215, 70, 28,250, 49,118,221,208, 83, + 39,127,238,160,209,230,198,113, 34,171,222, 32,141,162, 90, 9, 36, 18, 94,201,133, 11, 84,231,153, 51, 77, 53,247,163, 92, 46, +199,145, 35, 71, 32, 22,139,107, 95, 34,145,168,246,115,171, 86,173, 64, 84, 47, 35,181,133, 19, 0,148, 74, 37,138,138,138,224, +228,228, 4, 15, 15, 15, 20, 21, 21,225,202,149, 43,200,200,200,128, 80, 40,196,240,225,195,193,107,196,183,185, 62,231,132, 5, + 11, 34,131, 59,119,246,175, 47,178, 0,192, 98,177,160,172,172, 12,163, 71,143,230,157, 60,121,210,235, 84, 94,222, 11, 0, 98, +155,226,236, 30, 21,165, 46,222,191,191,193,255,126,246,217,103,137,223,127,255, 93, 50,124,216,176,247,230,127,241,197,134,239, +118,238,204,167, 41,202,171, 57,101,231,241,120, 60,130, 32,224,231,231,135,178,178, 50, 84, 85, 61,154,193,182,183,183,135,139, +139, 11, 72,146, 4,195,178,194,191,178,174, 27,211, 34,255, 16,108,169, 35,184,182,252,201,162, 85, 93, 40, 0, 24, 88,247,193, +194, 48,140, 77, 34, 75, 40, 20, 90,245,185,178,197,202, 85, 31,182, 8,173,154,188, 74,165,210,218, 27,173,174,192,170,201, 39, +143,199, 3,159,207,183,250, 16,175, 22, 67,252,202,202, 74, 28, 56,112, 0, 3, 6, 12,168,157,150,210,104, 52,168,168,168,128, + 70,163,129,209,104, 68,118,118, 54,206,157, 59,135, 14, 29, 58, 0, 54, 6,127,205,202,202,186,217,174, 93,187,240,154,135,248, +160, 65,131, 90,111,223,190, 93, 49,114,228, 72, 31,150,101,241,241,199, 31,151, 62,247,220,115,238,117, 31,242,214,192,231,243, +113,229,202, 21,116,232,208, 1, 44,203, 66, 36, 18, 33, 61, 61, 29,158,158,158, 96, 24, 6, 2,129, 0, 37, 37, 37,112,112,104, + 58, 70,226,189,123,247,102,188,250,234,171, 10, 39, 39,167, 46,106,181, 90, 41,145, 72,250, 93,186,116,201,207, 98,177,192,209, +209, 17,142,142,142, 56,113,226, 4,156,157,157,241,238,187,239,230, 25, 12,134, 43,118,118,118,173, 12, 6,195,157,162,162,162, +143,155, 83,223, 20, 69, 65,167,211,161,188,188, 28,101,101,101,208,106,181, 48, 26,141, 86,243,216, 16,250,245,235,135,184,184, + 56,126, 76, 76,204,143, 89, 89, 89, 0,128,128,128, 0,188,251,238,187,124, 95, 95, 95,100,103,103,227,230,205,155,176, 88, 44, + 96, 89,182,201,155, 87, 32, 16, 12,154, 58,117,106, 95,127,127,127,194, 98,177,128, 97, 24,152, 76, 38,212,124,206,203,203, 67, +112,112, 48,175, 77,155, 54,207,103,101,101, 13,130,109, 11, 43, 56, 0, 40,206, 59, 12, 95,161, 39,192,115, 4,107, 56, 12,117, +105,203,162,184,168, 84,170, 47, 22,126,242,251,204,239, 86, 91, 90, 21, 40,129,160,176, 49,232, 24, 50, 4, 51,166, 80,136,249, +234, 0,252,219, 4, 33, 55, 55, 23,131, 6, 13, 18, 41, 20,138, 87,171,170,170, 22,216,202, 29, 31,127,141, 62,115,226,228,248, + 9, 47, 77, 11,143,136, 24, 73,157, 62,125, 2,247,238,156, 78,126,245,165,113, 42,150,169, 34, 92,157,101,183,210,211,110,116, +236,210,109, 32,204, 20,221, 15, 88,190, 26, 88,206, 54,126,191,195,124,252,184, 55,239,248,225,159,167,188, 60,121,122,215, 33, + 67,134,146,167,227,143,225,230,213,248,219,107, 86,191,126, 49,102,221,222, 65,145,195,199,133,122,180,186,114, 34, 44,208,244, +154,159,155,211,131,173,219,203,184,198,210,208,189, 41,149, 50,168,238, 23,121, 4, 1,150,101, 31, 19, 89,245,133, 22,143,199, +179,106, 0,168,203, 89,247, 89, 84, 51,160,222,188,121, 51, 36, 18, 9,196, 98, 49,132, 66,161, 85,247,139,186,156,201,217,217, +131,119,196,198, 74, 26, 18, 89,106,181, 26,106,181, 26, 85, 85, 85,152, 52,105,146,232,211, 27, 55,158, 69,181,235, 71, 99,156, +254,222,222, 38, 59,153,172, 56, 37, 37,197, 39, 36, 36,228,177,252,106,181, 90,200,100, 50,196,238,218, 37,138,142,138,122, 99, +200,137, 19,107, 96, 37,254, 85, 67,101, 39, 8, 2,158,158,158,112,113,113, 1, 65, 16,160, 40, 10, 69, 69, 69, 72, 78, 78,198, +141, 27, 55,192, 39, 8,234,175,172,227,134,180,200, 63,208,170,181,165,193,169,195,198,230, 68,155, 35,180,248,124,126,139,173, + 90,141,193,150,169, 67,185, 92,126, 87,161, 80,244,241,245,245, 5, 69, 81,181, 66,171,254,212, 97,141,245, 35, 41, 41, 9,114, +185,252,174,209,104,108,146,147,101,217,231,123,246,236,137,131, 7, 15,226,194,133, 11,120,248,240, 33,244,122, 61, 76, 38, 19, + 12, 6, 3,146,147,147,193, 48, 12,194,194,194, 96,103,103, 7,185, 92,126,215,100,106,122, 32,170,211,233,148, 66,161, 48, 72, + 38,147,213, 30,243,246,246,134, 90,173,102, 72,146,196,142, 29, 59,180, 94, 94, 94,118, 50,153,204,102,225, 74, 16, 4, 84, 42, + 21, 90,183,110, 93,235,163, 85, 89, 89, 9, 79, 79,207, 26, 97, 1,147,201, 4, 7, 7, 7,171, 83,135, 0,140,247,239,223,159, + 95,231,123,143, 9, 19, 38,252,186,103,207,158,246,103,207,158,197,245,235,215,225,225,225,129, 47,191,252,242, 97, 78, 78,206, +203, 0,110,168, 84, 79,215, 47,210,150, 54,164, 86,171, 15,220,189,123,247,249,158, 61,123,214,246, 18,131, 6, 13, 34, 6, 13, + 26,228, 94,215,212, 95, 82, 82,130, 63,254,248, 3,103,207,158, 5, 65, 16,200,204,204,164, 13, 6,195,175, 77,205, 82,248,250, +250,110, 95,178,100,137, 61, 69, 81,181,109, 91, 38,147, 65, 42,149, 66, 36, 18,129,207,231, 35, 39, 39, 7,163, 71,143,118,250, +254,251,239,127, 54,153, 76,207, 0,176,224, 95,130, 10, 3, 44, 73,247,180, 78, 97,193,173,146,183,108,142,233, 51,107, 54,106, +166, 14,169,176, 96,207,228,164,123,197, 78,225,158,214,203,123,242,108,254,155,102,242,228,168,147,167, 18, 38,126,240,222,187, +194,128,128, 96,213,217,243,137,254, 67,168,207, 8, 55,119, 71,168, 75,181,200,201, 43, 70, 86,174,153, 13, 8, 8, 86,221,252, +227,174,228,171,111,215,118,212,233,141, 53, 83,135, 77,182,211,223,174, 60, 28,179,102,189,228,226,180, 87,123,136,101, 50, 31, +148,149,222,133,191,191, 7, 70, 71,119,193, 79, 59,175,192,201,201, 21,173, 90,181, 2,143,199,179,179,181,236,165,165,165,196, +129,221,191,205,156, 58,253,245,231,134, 13,141,162, 78,157, 62, 46,184,112,230,232,149,159,183,124,116,136,229,235,228, 4, 91, + 41,107,219,206,235,206,131,251, 73, 47, 15,142,152, 4,153,200,161, 3,208,169,193, 6, 91,187,192,128, 69,222,193, 61,203,165, + 83,167,207,234, 61,108,216, 11,212,233,211,135,113,250,196,206,107,203,150,181, 61,241,176,112,151,232,234,141, 2,233,152,241, +115,203,227, 78,166,154,199,141,106,151,225, 99,215,205, 0, 60,228, 84, 85,221,129,164, 64, 80, 76,153, 76,126,173,135, 13,227, +235,115,115,133,246,173, 90, 81, 0, 64,146,164, 85,161,133, 70,166,160,235,115,218,154, 23,189, 94, 15,166,145,216,137,245, 57, +139, 84,170,182,213,131,240, 90,144, 36, 89, 43,178,212,106, 53, 42, 42, 42, 96,103,103,135, 18,147,169,149, 45,156, 67,123,245, +218,241,233,242,229, 11,246, 31, 56, 32,170, 43,178,106, 94, 66,161, 16,171, 86,175, 22,189,243,193, 7,115,223, 16, 8,230,129, +162,108,190,158, 53,131,118, 62,159, 15,129, 64,128,220,220, 92,228,229,229, 33, 55, 55, 23,185,185,185,144,201,100, 96,255,226, + 69, 64,255, 96,255,172, 26,145, 85,247,189,214,202,213,100,120,135,230, 56,195,219, 42, 12,232,102,204,239,218, 34,180,116, 58, +221,217,115,231,206,245, 26, 51,102,140,224,218,181,107,240,242,242,170, 21, 90, 53,239, 53,211, 81,114,185, 28,135, 14, 29,178, +232,116,186,179, 86,110,166,115, 39, 78,156, 8, 95,186,116,169,112,198,140, 25, 72, 73, 73,193,236,217,179, 81, 81, 81, 1,173, + 86, 11,181, 90, 13,189, 94,143, 94,189,122, 65, 42,149,226,206,157, 59,164, 94,175, 63,103,197, 98,199,170, 84,170, 42, 15, 15, + 15,239,250,191,141, 31, 63,190,213,198,141, 27,245,105,105,105,100,159, 62,125, 28,109, 21, 28, 53,216,189,123,119,173,165, 46, + 35, 35, 3, 27, 55,110,172,245,201, 74, 76, 76,196,215, 95,127, 93, 27,251,172,153,184, 81, 90, 90, 74,145, 36,137, 14, 29, 58, +192,215,215, 23, 70,163, 17,107,215,174,165, 0,220,248,255,106,205, 70,163,113,255,180,105,211, 62,188,117,235,150,183, 64, 32, +120,100,210,174, 46,159,197, 98,193,253,251,247,145,156,156,140,180,180, 52,148,149,149,213, 14, 4,146,146,146,202, 73,146,220, +219, 24,175,135,135,199,199, 63,253,244,147,151, 92, 46,127,172, 61,215, 88, 67,107,172,164, 37, 37, 37,112,118,118,198,144, 33, + 67, 60,207,157, 59,247,177,201,100, 90,250, 47,121,166, 17,227, 95,204,232,241,206,155, 99, 48, 54, 90,158,127, 48,174,240,247, +175,191,154, 95,237, 12,239,153, 60, 54,218, 55,255,118,186, 51,198,191,120,184, 7,128, 2, 52,237,176,205,156,191,168, 60,210, +179,167,203,133,131, 71,143,254,188,120,225,123,137, 11,230,191,238,161, 55, 60,144, 6,180, 17, 19, 0,144,149,107,102,239,164, + 48,198,175,215,188,151, 24,179,250,123, 94,177,186, 98,246, 31,127, 52, 30,222,160,174,120,225,241, 32, 13,232, 52, 64,209, 49, +176,111,187,107, 87, 98, 97, 47, 55, 32,168, 83, 15, 12, 27,250, 60, 46, 36, 36,161,168,196, 8,165, 82, 9,147,201,212,100,184, +132,180, 59,135,166,176, 4,235, 79,176, 68, 30,193, 99,165, 83,166,189,214, 47, 42,234, 5, 54, 46,238, 40,117,248, 80,236,229, +189,191,172,223,207, 19, 9, 5, 6,179,147,153, 32,140, 26,240,238,165, 84,233, 30, 13,104,132, 18, 81,227,230,215,234,192,174, + 33,161,157,188,166, 76,155,237, 52,114,196,104,246,196,137,195,204,222, 61, 59, 46,236,221,214, 57,150,225,105, 69,202,124,189, + 68,163, 37, 53, 44, 33,118,174,210, 50,250,226,172,103,140, 62, 81,227, 45,192,126, 78, 93,213,125, 14,152, 76, 5, 85,249,249, +222,174, 3, 6, 72,238, 47, 95, 46,111,213,171,151,145,168,246, 33,110, 74,104,241,249,124,128,199, 99,108,225,180, 53, 47, 6, +131, 1, 12, 64,182,132,147,162,168,199, 68, 86,141,208,170,185, 95,108,225,220,178,108,217, 53,255, 97,195,202, 18, 18, 18, 90, + 13, 28, 56,144,168,172,172, 68,101,101,229, 99, 98,203,199,199,135, 8, 9, 11,147,239,190,112, 33,192,214,235,105, 75,217,121, + 60,222, 95, 46,180,254,225,104,116, 35,233, 38,183,224,169,177,104,217, 34,180,108,180,104,145, 36, 73,194,211,211, 19,165,165, +165,141, 62,248,121, 60, 30,100, 50, 89,205, 28,113,147, 43,239, 76, 38,211,218, 5, 11, 22,188, 53, 98,196, 8,247,160,160, 32, +148,148,148,160, 85,171, 86,144, 74,165,181,190, 99, 53,124,137,137,137,248,233,167,159,180, 38,147,105,173, 21,206,111, 87,175, + 94,253,230,216,177, 99, 93,189,188,188,224,226,226,130, 59,119,238,192,197,197, 5, 90,173, 22,233,233,233,112,112,112,168,245, +219, 57,122,244,104,165,201,100,250,214,138,120, 99, 47, 93,186,100,113,112,112,184, 83, 82, 82,194, 47, 43, 43, 19,148,151,151, + 11,180, 90,173, 80,163,209, 8, 79,157, 58,229,238,228,228,164, 63,127,254,124,137,191,191, 63,255,225,195,135,124,146, 36,173, +170, 87,130, 32, 48,111,222, 60,136, 68, 34,152, 76, 38,172, 93,187, 22, 11, 22, 44,168,245,201, 90,189,122, 53,150, 44, 89, 82, + 43,156,183,110,221,218,172,150,195,178, 44, 44, 22, 11, 72,146, 4, 73,146, 54,137,223, 39,129,141,130,189, 40, 51, 51, 51,186, +103,207,158,103,246,237,219,231, 86, 29,147, 12,197,197,197, 40, 46, 46, 70, 73, 73, 9,170,170,170, 64, 81, 20,124,125,125, 81, + 92, 92,140,195,135, 15,107, 42, 43, 43,135,161,137, 21,135,124, 62,127, 90,191,126,253, 4,245,243, 80, 51,202,171, 17,239, 18, +137, 4, 10,133, 2,131, 6, 13, 18, 39, 36, 36, 76, 3,240,143, 22, 90,117,195, 59, 12, 29, 54, 83, 20, 28,218,219,124, 59, 57, + 46,191, 83,187,226,252,201,163, 29,143, 3, 64,210,189, 98,167,219,233,206, 8, 14,141,102,135, 14,115, 9, 47, 46,218,210, 25, +128,165,169,237,122, 0,192, 73, 46,153, 16, 25,209, 75,225, 96,103,199,251,122,205,214,147, 63,252,240,237,179,251,143,255, 39, +188,195,215,107, 30,133,119,136,140,232,197,164,165,166, 77, 0,176,205, 86,241, 18, 29, 61,234,214, 79,219,127, 66, 90,242,121, +159, 15,231,117, 17,151, 21,147,144,217,251, 33,188, 91, 43,108,217,126, 23,183,111,223, 46, 50,155,205,131,154,108,223, 4,235, +159,156,114, 47,176,115,104,136,215,148,105,179, 28,163,163, 71, 35, 46,238, 8,126,217,177,237,210,184, 73, 99,127, 44, 44,215, +242, 61,133,114,145,156,101,196,124,145,147, 64, 36,145,169,204,230, 71,107, 32,132, 66,169, 35, 48,161,201, 7,207,156, 89,147, +157, 6, 71,140,198,241, 19, 71,240,203,142, 45, 23, 63, 9, 29,191,173, 93,247, 96,162,215,179, 95,205,109,215,190, 93, 27, 93, + 85,177,150, 71,136, 45, 70, 35,227,240,213,142,156,111,178,150, 76,203, 2,176, 6,220,170,195,186,184,243,203,200,145, 61,223, +121,240, 64,228,209,183,175, 76,113,225,130,188,122, 39,146, 38,133,150, 64, 32, 0,219,248, 84,215, 99,156,196,206,157, 60, 0, + 77, 46,194, 18,137, 68,208,235,245, 32, 27,183, 96, 63,198,233,125,250,116,254,131, 7, 15, 58,186,186,186, 62, 38,178,202,202, +202,106, 63, 27,141, 70,232,245,122,200,100,178,100, 67,195, 51, 34,143,113, 22, 95,186,100, 92, 57,111,222,210,151, 39, 77, 90, +127,246,220, 57,169,155,155, 27, 52, 26,205, 99, 66,203,108, 54, 99,240,144, 33,162,213,183,110, 77,129, 86,187,204,150,235,217, +106,208, 32,171,254,192,124, 62, 31,204, 95, 60,117,248, 47,192,172,134,132, 23,207,218, 20,142,173,171, 14, 27,121, 64,214,223, +221,123, 73,120,120,184, 49, 35, 35, 3,254,254,254,181, 98,165,238,127, 58, 58, 58,194,217,217, 25,137,137,137,248,226,139, 47, + 12, 0,150, 88,225,172,212,235,245, 47, 69, 70, 70, 26, 4, 2, 1, 58,117,234, 84, 27, 63,139, 97, 24,136,197, 98,216,217,217, +225,214,173, 91, 24, 53,106,148, 94,175,215,191,132, 63,199,208,170,207,169,209,235,245,175, 12, 29, 58, 84,159,146,146,130,126, +253,250,225,246,237,219,168,170,170, 66, 85, 85, 21,178,179,179, 17, 18, 18, 2,189, 94,143,141, 27, 55, 26,244,122,253, 43, 0, + 52, 77,113, 86, 86, 86,142, 90,176, 96, 1,255,215, 95,127,109,231,235,235, 27,218,163, 71,143,160, 33, 67,134, 60,243,226,139, + 47,182, 25, 57,114,164,119,199,142, 29,141,195,134, 13,243, 24, 49, 98,132,135, 94,175, 23,254,254,251,239, 74,146, 36, 71, 88, +201,103,173, 56,201,200,200,168,157, 42, 20, 8, 4, 40, 45, 45,173,141,220, 95,211, 41, 53, 34,132, 35,172,137,237, 26,129, 85, + 35,184,108,240,115,107,136,211,234, 73, 98,177,184,198,226,201,218,192,153,148,154,154, 26, 57, 96,192,128,164,153, 51,103, 86, + 22, 21, 21,193,193,193, 1, 1, 1, 1, 8, 12, 12,132,187,187, 59, 44, 22, 11, 14, 29, 58,164, 59,124,248,240, 93,141, 70, 51, + 8,127,142,161, 21, 81,239, 58,102, 55,212,201,214, 88,179,106,132,150, 84, 42,133,175,175,111,205,181,205,110,206,245,108, 33, +254, 90,206,106, 1, 51,100,240,176,246, 35,163,198, 56, 29, 58,114, 69,188,126,195,225,187,225, 17,216,234,214, 86,123,212,173, +173,246,104,120, 4,182,174,223,112,248,238,161, 35, 87,196, 35,163,198, 56, 13, 25, 60,172,125, 74,114, 90, 80,221,125, 15, 27, +202,167, 84, 42,237,221,175,111,120,121,194,229,139, 76,204,234,239,121,131, 7,141,187,181,237,199, 67,135,182,253,120,232,208, +224, 65,227,110,197,172,254,158,151,112,249, 34,211,175,111,120,185, 84, 42,237,109, 75,217,231,204,154,236, 20, 53,114, 52,226, +226, 14, 81,251,119,111, 92,189,231, 64,230,128,215,222,186, 84,156,145,113,155, 85, 21,156,134,144,151,139,212,212, 84, 77,181, +200,202,176,133,115,246,235,147,235,138,172,223,220,188,250,109, 77, 77, 5, 29, 31,127,140, 60,119,238,150,225,183, 36,149,230, +102, 74,105,153,162,164,236,161, 86,171, 54, 51, 12, 13,154,166,249,159,126, 90,235,176,219, 96, 29,245,233, 51, 16,231,207,238, +194,142,237,155, 53, 12, 3,227,132,253,251,233, 9, 19,150,179,109,218,182,109, 19,187,123, 23, 17,253,194, 24, 39, 22, 96, 70, +141, 29,237,252,235,158, 95,137,246, 29,218,183, 13, 8,168, 13,105,243,207,107, 75,127, 1,231,114,160, 92,155,155,123, 49,241, +251,239, 77,173, 94,122,201, 85,220,170,149, 35,104,154,168,233,223, 27,123, 9, 4,130,250, 22,152, 70, 57,125,221,221, 11,143, + 30, 61,138,192,192, 64,248,250,250,162,174,143,108, 77, 64,110, 55, 55, 55, 28, 56,112, 0,236,227,193,169, 27,229,236,222,174, + 93,226,170,149, 43,205, 12,195,160,188,188,252, 79,214,172,242,242,114, 48, 12,131, 19,199,143,155,181,143,118, 2,177,169,236, +131,248,252,170,151,251,247,143,137,138,138,178, 60,120,240, 0, 12,195,160,174,101, 75,165, 82,193,222,222, 30, 70,147,201, 15, +128,220, 22, 78,213,169, 83,118,176,210,175, 55, 96,209,250, 43,234,253,159, 46,178,234,110, 40, 61,203, 38,139, 22, 69, 81,240, +243,243,123,108, 75, 23, 30,143,247,216,171,153, 43, 14,119,166,164,164,156, 30, 54,108,216,210,231,158,123,110,206,210,165, 75, +249, 65, 65, 65,208,104, 52,112,113,113,129,167,167, 39,210,211,211,113,244,232, 81,186,180,180,116, 19,128, 21,176,109, 9,253, +133,204,204,204,232, 46, 93,186,236, 89,180,104,145,211,208,161, 67,133,126,126,126, 96, 89, 22,183,110,221,194,193,131, 7, 45, +219,182,109,211, 86,139, 44, 91,157,151,207, 40, 20,138,113, 35, 70,140,136,157, 54,109,154, 3, 77,211,194,236,236,108,152, 76, + 38,144, 36,137,188,188, 60, 75, 92, 92, 92,149, 94,175,159, 12,224,140, 13,124,137, 21, 21, 21, 33,241,241,241,211,126,255,253, +247, 47,102,206,156,233, 54,100,200, 16, 17, 69, 81,184,124,249,114, 73,247,238,221, 61, 85, 42,149,229,192,129, 3,106,163,209, +184,132,166,105,155,182,224, 33, 8, 2, 90,173, 22,238,238,238, 48,153, 76, 96, 24, 6,102,179, 25,246,246,246,181,219, 38,177, + 44,139,230, 56,215,215,107, 3,124,139,197,130, 73,147, 38,129, 97, 24,172, 93,187, 22, 20, 69, 53,155,204,201,201,233,102, 82, + 82, 82,116,183,110,221,106,197, 75, 77, 27,146, 72, 36,112,119,119,135,155,155, 27,226,226,226, 32, 20, 10,111, 90,243,119,171, +198,237,210,210,210,238,241,241,241,189,239,222,189, 59, 21, 64, 55,139,197,226, 75,211, 52,193,227,241,148, 44,203,222,209,106, +181, 63,194,198, 45,120, 84, 42,213, 23,211,167, 79,239,190,107,215, 46,123,129,224, 63,183,134, 64, 32,128, 68, 34, 65, 77,112, + 76,150,101, 97, 54,155,241,241,199, 31,107,117, 58,221, 23,255,150, 94, 34,188, 71, 47,108,217,184,206,254,220,249,211, 37,169, +153, 56,216, 64, 8,135,130,226,162, 45,157, 21,249,249,246,225, 61,122,217,196, 73,154, 45,234, 87, 38,191,239, 95,189, 5,207, +199,217,217, 57,155, 99,119,126,147, 5, 0, 95,125,187,182, 99,177,186, 98,118, 90,106,218,132,205,155,119,247, 38,205, 22,181, + 45,156,255, 17, 47,177, 26,176, 48, 2,184,126,235,110,113,187, 81, 47,157, 90,210,161,189,227, 11, 42,181,161,176,170, 74,255, + 54,128, 44, 91,203,222,183,207, 0,156, 63,243, 43,126,217, 17,171,101, 25,190,209,221,221,157, 5,128,212, 84,119, 54, 53,181, +130,253,143, 95,177,179, 78,200,222, 94,241,254,219, 67,222,215,104,203,190, 93,187,177,233,169,148, 46, 93,159, 67,151,174,207, +225,173,183, 63,114, 10, 9,237,228, 15, 0,251,247,131, 14,237,144,114,108,233, 39,203, 95, 88,177, 98, 57,180,149, 38,212,108, +215,147,126, 47,229,120, 86, 22,204,220, 51,235,113, 44,165,168,235,120,255,253,142,250,178, 50,143,190, 31,126,232, 46,248,224, + 3, 94, 83,206,240,117,239, 95, 91, 56,111,220,185,115,124,246,107,175, 21, 46, 91,186,116,216,166,205,155,101,157, 59,119, 70, + 81, 81, 17, 58,117,234, 4, 95, 95, 95,196,199,199,227,192,222,189,186,138,202,202, 37, 0,126,176,133,115,231,137, 19,233, 65, +161,161,165,155, 55,111,246,137,138,138, 34,116, 58, 29, 52, 26, 13, 52, 26, 13, 76, 38, 19,170, 3, 66,179, 25,153,153,169, 36, + 73,110,178,181,236,116, 73,137,116, 69,175, 94, 5, 34,134, 89, 53,110,236,216, 5, 43, 62,251, 76,210,190,125,123,194,100, 50, +213, 90,181, 44, 22, 11,236,237,237, 45,102,179,217, 13,128,222, 22, 78,201,182,109, 84, 73, 73, 9, 60, 60, 60,106,195, 53,213, +141, 75, 88, 89, 89, 9,150,101,185, 96,186, 45, 64,163, 10,201,197,197,229,166, 64, 32,104, 93,215,186,213,208,222,121,117,143, +145, 36, 89, 80, 90, 90, 26, 94, 79,241, 54,230, 15, 21, 0,224,203,193,131, 7,143,155, 63,127, 62,145,144,144,128,195,135, 15, +179, 89, 89, 89,251,171,173, 88, 89, 77,140,116, 26,227,116,144, 72, 36,239,218,217,217, 69,212,132,112,144,203,229,119,117, 58, +221,217,234,233,194,202, 22,112, 58, 74, 36,146,121,118,118,118,145,213,219,175,192,193,193, 33, 73,167,211,197,155, 76,166,117, +104,124,163,234,166, 56,101, 78, 78, 78, 95,184,187,187,191,242,193, 7, 31,184, 93,186,116, 73,121,254,252,121, 81, 69, 69,197, + 46,179,217,220,212,166,210,127,226,116,117,117,189,201,231,243, 91,255, 69,117,132, 46, 93,186,196,141, 26, 53, 42,106,242,228, +201, 32, 73, 18, 63,252,240, 3,226,227,227,143,223,191,127, 63,218,202,104,180, 62,167,123,235,214,173, 19,230,204,153,211,102, +210,164, 73,114, 23, 23, 23, 8, 4, 2,232,116, 58,220,191,127, 31,183,110,221, 98,143, 28, 57, 82,149,152,152, 88,160,215,235, + 7, 2, 40,109,198,245,124,146, 81,243, 99,156, 2,129, 96,128,159,159,223,238,101,203,150, 57, 68, 70, 70,202,220,220,220,192, +231,243, 65,146, 36,148, 74, 37,238,221,187,135,211,167, 79,235,246,239,223,175, 83,171,213,147, 0, 92,252,255,200,231,211,228, + 12,238,136, 79,234,109, 20,221,104,180,119, 43,105,173,230,115,240, 0,239,209, 19,198,141, 24, 14, 0,251, 14,156, 60,101,195, +166,210,141,230,211, 90, 94,109,225,236,212,129,183, 44, 57,229,222, 99, 1, 45, 67, 67,194, 50,130, 59,143,253,220, 22,162, 58, +145,225, 31, 43,123,157,233,216,186, 54,221,199,166, 89,131, 3, 16, 61,122,194,139, 81, 31, 45, 89,140, 47,191,136,193,145,125, +135,142,167,102, 61,182, 77,208, 63,174, 45,253,197,156,196,231, 2,193,115,114,111,239,254,107, 25,102,241,237,123,247,236,235, + 14,216,106, 44,207,117, 7,149, 62, 62, 62, 42,165, 82,217,202, 22,206,232,239,190,179,232,237,236, 36,139, 87,173, 26, 80,101, + 52, 14, 88,177, 98,133,224,198,141, 27,216,248,253,247,148,177,160, 32,182, 4,152,215,200,108, 72,163,156,109,230,205,147, 46, +220,184,113, 70, 64,135, 14,158, 83,167, 78, 21, 10,133, 66,232,116, 58,228,231,231,227,204,233,211,230,148,212,212, 20,173, 86, +251, 2, 0,133,173,156,209,223,125,103,113, 14, 8,128,220,195,131, 61,119,225,130,211,236,119,223,157,211,182, 93, 59,167, 97, +195,135, 11, 29, 29, 29, 81, 94, 94,142,236,236,108, 28, 58,116, 72, 85, 85, 85,229, 3,128,182,133, 51,246,247,223,187,156,184, +120,113,252,231,159,127, 46, 14, 11, 11,131,147,147, 19, 42, 43, 43,113,239,222, 61, 92,188,120,209,180,105,211, 38,141, 70,163, +153, 67,211,244,209,191,176,222,255, 13, 86,173, 26,108,177, 42,180,254,139, 55, 96, 56,128, 79,170, 63,127, 6,235,123, 6,254, +155, 58, 31,127, 87, 87,215, 45, 70,163,145, 53, 24, 12,179, 1,228,253, 13,243, 41, 8, 15, 15,223,168, 82,169,122,179, 44, 11, + 39, 39,167, 43,201,201,201,111,160,145,149, 55, 86, 56,249, 0,122,219,219,219,247,114,112,112, 24, 96, 50,153,130,171,167,223, + 82,117, 58,221, 69,139,197,114,189,218,250, 68,255, 63,151,157, 15, 32,210,199,199,231, 53,134, 97, 58, 16, 4,225, 76,211, 52, + 72,146,172, 96, 24,230,190, 70,163,217, 6, 32,254,111,144,207,167,194, 25,242, 12, 94,100,121, 8,110, 76, 16, 60, 38,180,234, + 9, 8,130, 65,106,202, 3, 28,106, 70, 62,121, 35, 34,252, 54, 0,143, 86, 38,194,186,115,237,127,132,150, 13,226,165,217, 34, +243, 25,254,116,150, 96, 31,227, 36, 88, 34,175, 83,151, 23,127,121, 18,161,101, 43, 66, 2, 49, 0, 44,122, 51, 44,174,167,221, +199,249,127,113, 95,247,212, 56,191, 4, 92,191,119,113,185,194, 19, 8,188, 0,240,170,173, 47, 12, 67, 16, 52, 75, 16, 84,221, +233,173,122, 3,203, 38, 57, 45, 64,103,161, 68,226, 71, 83, 84,171, 34,192,254, 4, 77, 63,107,100,217,170,214,192, 39, 73, 64, +122, 75,242,105, 1, 58,243, 37, 18,255, 19, 44, 59,186,196,206,174,139,202, 96,240, 0,192,218,219,217,165,106,117,186, 29, 70, +163,113, 3,254, 60,115, 97,149, 83, 36,145,180,166, 41,170, 21, 0,240, 4, 2,213, 30,147,201,175,192,209,113,170,209,100,106, + 99,111,111, 79,154,205,102,173,209,104,156, 76, 81,212,185,230,148,253, 62, 69,133,252,206,227,245,179,216,217,185, 89, 8,194, +206, 76, 81, 22,179,197,146,111, 52, 26,239, 2,248, 6,192,131,191,184,222, 57,180,240,102,225, 56, 57, 78,142,147,227,228, 56, + 57, 78,142,243,175,231,148, 3,240,175, 30, 44,254, 19,203,254,111,130,109, 62, 90, 28, 56,112,224,192,129, 3,135,127, 12,244, +104,192, 39,139,195,255, 47,136, 38, 84,105,115, 76,130, 45, 81,182,103, 57, 78,142,147,227,228, 56, 57, 78,142,147,227,252,159, +227,180,198,253, 79,156,146,108,116,175,195,191, 26,156,249,151,227,228, 56, 57, 78,142,147,227,228, 56, 57,206,255, 89,240,184, + 75,208, 40, 90, 85,191,158,118, 90, 14,255,238,182, 80, 31,190,213,175,230,164,247,230, 46, 57, 7, 14, 28, 56,112, 66,235,175, +126,104, 61,201,195,237, 73,133, 79, 12, 65, 64, 65, 16, 80, 0,136,121,138,105,173,193,199,221,221,253,157,144,144,144,216, 86, +173, 90,189, 5,192,179,153,231,119,148,203,229,235,236,236,236, 18,236,236,236, 18,228,114,249, 58, 0, 29,159, 82,189, 17, 0, +102, 75, 36,146, 11,222,222,222,133, 98,177,248, 2,128, 57,104,249,202,213, 32, 60,138,147,246, 25,128, 46,205, 57,209, 51,116, +244, 94,143,208,209,119, 60, 66, 71,223,115, 11, 27,213,209, 35,116,244, 61,143,208,209,119, 60, 67, 71,239,253, 11,218,235,147, +212,111, 12, 65, 32,143, 32,144,103,227,185,223, 16, 64, 62, 65,160,224, 41,180, 37, 14, 28, 56,112,224,240, 79,131,143,143,207, + 56,111,111,239,179,222,222,222,241, 62, 62, 62,227,108, 56, 37,162,129, 7, 15, 77, 16,160,173, 60, 72,154, 74,103,205, 92, 89, +247,220,175,109, 44, 90, 93,206, 86, 4, 1,154,173, 6, 65,128,241,244,244, 92,239,237,237, 29, 83,255,229,233,233,185,158, 32, +192,212, 73, 75,215, 17,120,205, 53,171,182,154, 50,101,202,190,242,242,242, 56,179,217, 28,151,153,153, 25, 55,112,224,192, 61, +245,172, 27,141,114, 74,165,210,151,123,246,234,157,120,241,242,245,204,140,251, 57,138,148,244,135, 57,199, 78,157,187, 17,214, +185,203, 31, 82,169,244,229,102,212, 17, 1, 96,182, 64, 32,184, 96,111,111, 95, 32, 16, 8, 46, 0,152,203,231,243,143,174, 92, +185, 50, 39, 57, 57,185,248,247,223,127,175,184,120,241, 98,225,204,153, 51,239, 19, 4,113,172, 1,193, 30,209,128,149,166,190, + 85,103,105,110,110,238, 41,165, 82,121, 90, 38,147,125, 97, 67,250, 90, 78,143,208,209,119, 84, 26, 11,171,210, 88, 88,143,208, +209,108,157,207,119,154,121,205,173,213,209,159,218,130, 68, 34,241,183, 34,232, 35, 26, 59, 23,128, 87,245,111,225, 0,190,171, +126,213, 44, 61,247,146, 74, 36, 79,171, 45, 61,141,178,115,156, 28, 39,199,201,113,254,183, 57,255,201,232, 94,253,238,141, 71, +254, 90,181,207,238,230,174, 58,124, 51, 51, 51,211, 30, 0, 2, 3, 3,223, 0,112,160, 57, 66,130, 32,176,144, 97, 88, 30, 0, +240,120,196,135,131, 6, 13,238, 46,147,201, 30,139,130,108, 48, 24,196, 23, 46,156, 31,194, 48, 44, 81,157,110, 33,203, 98, 29, +128, 98, 91,255,195,108, 54,241,132, 66, 49,120, 60,226,253,176,176,206,109, 75, 75, 75, 47,241,120,188,216,194,194,194,242,102, +155,113, 8, 2, 91,183,110, 13,244,246,246,254, 83,180,102,165, 82, 41, 30, 61,250,133,102,241, 77, 7, 36, 38,137,164,151,136, + 32,188,105,138,114, 6, 0,129, 64, 80,126, 67, 44, 14,255,242,243,207,229, 4, 65, 48,106,181, 26, 6,131, 1,239,189,247,158, + 44, 37, 37,101, 76,105,105,233, 6, 43,180,129, 93,186,118,127,239,244,233, 83,193,218,178,114,227,214,111, 55, 39, 26, 4, 34, +125,187,144, 78,162,141, 91,118,184,204,154, 49,249,237,180,180,228, 36, 52,188, 29, 73, 93,240, 0, 28,122,247,221,119, 67,163, +163,163,197,149,149,149, 82,131,193,208, 54, 54, 54,246,227,240,240,112,251,110,221,186,137,119,239,222, 77,104, 52, 26,176, 44, + 43,239,212,169, 19, 59,113,226, 68,227,158, 61,123,222, 2,176,190, 9,225,187,240,209,181,228,173, 13, 10, 10, 90, 6, 0,153, +153,153,162, 58,215, 88, 24, 28, 28,108, 7, 0,233,233,233,159,178, 44,243, 46, 0,176, 44, 86, 3, 88,220,128,105, 45, 51,180, +239, 4,128, 64,135,228,203,251,164,161,253, 38, 24,193,226, 62, 1,100, 86, 15, 8, 86, 0,117,226, 66, 61,142, 84,133, 66,209, +162,189, 9,163,162,162, 9,130, 32,246, 39, 38, 38, 30, 80,169, 84,237, 24,134,126,189,169,124,214,107, 71,132,155,155,219,244, +210,210,210, 24, 0,175,165,166,166,118, 7,128,224,224, 96, 17,128,155,142,142,142,125, 44,102, 51,193,245, 85, 28, 56,112,224, +240,143, 21, 90,183, 0, 68,225, 63, 91,240,108,105,137,208, 18, 3,192,165, 75,151, 0, 64,210,130,140, 16,117, 5,204,188,121, +243,224,237,237, 93, 95,188, 32, 33,225,194,147, 20,246,177,255,248,236,179,207,236, 43, 42, 42, 34,126,252,241,199,254, 44,203, +126,173, 80, 40,174, 89, 57,191,152,101,177,154,199, 35, 62, 36, 8, 2, 18,137, 52, 99,206,156, 57,183,170,127,107,123,236,216, + 49,249,168, 81,163,244, 0,114, 0, 64, 34,145,250,242,249,188, 64,150,101,107, 30,184,141, 10,194,241, 64, 0, 37, 22, 15,158, +253,221,119,212,179,163, 70, 9,236, 60, 60, 8, 0,200, 73, 75,115, 91,253,213, 87,125,202,179,178,196, 6, 55, 55,181, 90,167, + 51,100,100,100, 64, 34,145, 16,124, 62,255, 89,107, 5,182,179,179,123,231,243, 47, 87,217,105,203, 42, 12, 70,109,165,153, 79, +145, 38, 7,153,156, 46, 46, 82,169,237,101,118,250, 15, 63, 89, 46,126,243,245,105,239,232,116,186, 55,172, 80,189,245,254,251, +239, 7,247,236,217,211,119,239,222,189,132, 70,163,129, 64, 32,176,239,214,173, 27,194,195,195,233,243,231,207, 19,237,218,181, + 67, 88, 88, 24, 46, 95,190,140, 43, 87,174, 16,221,187,119,151, 31, 60,120,112, 10, 73,146,235,173,137,107, 62,159,247, 94,167, + 78,157,186,217,217,217,153, 3, 3, 3,241,250,235,175,131,101, 89, 68, 68, 68,132,217,219,219, 31,208,233,116,226,244,244,180, +254,214, 68,182, 42,249,200,196, 26,203, 22,128,206, 96,113,191, 36,249, 72,221,233,199,224,244,244,244,231,202,203,203,241,168, + 94,216,218, 13,204,251,247,239,223,156,182, 84,204,178, 88, 61,106, 84,244,135, 0, 65, 68, 68, 68, 84,188,245,214, 91,188,180, +180,180, 87, 94,124,113, 76, 88,102,230,125, 52,145,207,186,237,136,152, 62,125, 70,177,189,189,253,216,253,251,247,167, 43,149, + 74,129, 72, 84,171, 51,249,158,158,158, 30,129,129,129,115, 93, 93, 93, 85,124, 30,207,147, 5,203, 90,107, 75, 28, 56,112,224, +192,225,111,133,227,213,226,234,120,253, 31, 4, 0, 16, 23, 23, 87, 27,153, 54, 58, 58,186,209, 81, 53,203,178,197,183,111,223, +246,211,235,245, 96, 89,214,150,135, 64,221, 37,154,197, 4,193,219,200,227, 17,111, 16, 4,129,176,176,206, 15,215,174, 93,219, +208,158, 94,230,176,176,206, 15,249,124, 94,123,150,126, 35, 16,153, 0, 0, 32, 0, 73, 68, 65, 84,101, 65, 16,188, 31, 88,150, + 41,110,132,179,193, 7,163, 88, 44, 89, 8, 0, 94, 94,222, 89, 39, 79,158, 52,143, 31, 63, 30, 95,125,245,149,104,209,162, 69, + 11, 4, 2,193, 91,121,121,121, 69, 77,228, 19, 0, 22,123,120,120,202,183,110,221, 26, 56,103,206,156, 91, 74,165,114, 49, 0, +120,123,123,199, 0, 8, 1,144, 83,231, 24, 54,109,218, 83,248,250,235,175,103,168, 84,170,197,141,113,142, 5,158,241,235,212, +105,240,138, 75,151, 88,158,201, 68,148,254,246,155,182,164,184,152,124, 80, 82, 34,223,126,243,102,244,199, 49, 49, 66, 63,127, +127, 36, 28, 61,234, 94,170,215,151,104, 76, 38, 99,113,113, 49, 75, 81,212, 21, 27,202, 30,234,233,225, 41,223,252,205, 15, 55, + 28,132,124,198,179,181, 47, 33,116,117, 21,240,228,142, 98,190,128,103,106,223,182,163, 24, 64,168,181, 58, 18,137, 68, 83,134, + 14, 29, 42,223,179,103, 15, 17, 22, 22, 6,103,103,103,252,246,219,111, 72, 74, 74, 66,121,121, 57,143, 36, 73,244,232,209, 3, +171, 86,173,130,191,191, 63, 42, 42, 42,144,151,151,231, 46, 22,139, 61, 72,146,108,236,122, 62,214,158, 22, 46, 92, 8,111,111, +111, 80, 20,133,178,178, 50, 80, 20, 5,123,123,123, 0, 64, 65, 65, 1,142, 30, 61, 98, 75, 91,178, 10,150,101,241,252,243,207, + 87, 18, 4,145, 90,223,162,213, 28, 78, 95, 95,223,221, 37, 37,165, 35, 6, 15, 30,140,242,242,114,114,249,242,229,232,210,165, + 11, 2, 3, 3,109,201,231, 98,145, 72,252, 99,155, 54,109,190,153, 55,111,158,183,171,171, 43, 76, 38,211,199, 69, 69, 69,152, + 59,119, 46, 0, 96,228,200,145, 93,132, 66,225,201,153, 51,103,162, 93,187,118,133,101,101,101,121,137,137,137,175,235,245,250, +123, 45, 45,187,141,224, 56, 57, 78,142,147,227,252, 91,113,218,170, 69,254,166, 80,226,241,112, 14, 91, 30, 19, 90,209,209,209, + 68, 92, 92, 28,107, 67,193,212,173, 91,183,246,147,201,100, 0,160,110,110, 46, 24,134,121,203,205,205, 77,181,120,241,226,190, +129,129,129,230,183,222,122,235, 94, 78, 78,206,146,186,105,218,182,109,251,197,247,223,127,143,140,140,140,156,152,152,152,203, +106,181,186,185,251,152, 45, 98, 89,172,173,182,142,149, 30, 61,122,180,203,165, 75,151,222,248,246,219,111, 61,222,124,243, 77, +209, 59,239,188, 51, 25,192, 87,214, 72,248,124,190,190,161,233,194,134,224,237,237,109,230,243,249,141, 6,137,139, 6,100, 82, +177,120,208,138, 75,151, 88,115, 78,142,254,167, 53,107, 28, 54,255,241,199, 50,146,101, 91,121,122,122,162, 95,159, 62, 85, 82, + 62,191, 84, 85, 84,196,120, 62,243, 12, 63,251,228, 73,119,131, 88,172,216,179,103,143, 70,173, 86, 31,182,106,194, 35, 8, 45, +195,178,102,251,214,254,228,248, 49,145, 97, 55,174, 39,165, 57,120,186,243,186,119, 11,235,146,150,145,147, 8,134,177, 16, 4, +161,181,198,227,228,228, 20,168, 86,171,161,213,106,225,225,225,129,181,107,215,194,203,203, 11,122,189, 30,201,201,201,108,235, +214,173,137, 75,151, 46,161,117,235,214, 40, 41, 41,129,217,108, 70,101,101,165,202,100, 50, 53,182, 55, 99, 49,143,199,255,153, +199, 35,102, 16, 4,129,246,237, 3,114, 55,108,216, 96,102, 24, 6,193,193,193,120,241,197, 23,113,240,224, 65, 36, 39, 39,215, + 88,158,204,109,218,180,205,229,241,136, 54,213, 90,169,197, 86,157,154,173,125, 20, 10,197,216, 22,222, 52, 60, 31, 31,159,201, + 29, 58,116,120,227,229,151, 95, 38,197, 98, 49,116, 58, 93,205,181, 32, 71,140, 24, 89, 49,106, 84,180,211,241,227,199,155,204, +167,217,108,206,210,104, 52,175,189,255,254,251,177,155, 54,109,114, 89,178,100, 9, 24,134, 1,203,178,160, 40,170,118,211,111, +134, 97,112,232,208, 33, 60,120,240,224,139,122, 34,139, 3, 7, 14, 28,254, 39,208, 12, 45,242,119,132, 55, 30, 77, 27,162,190, +216,250,175, 71,134,231,243,249,155,207,156, 57,211,173,127,255,254,130, 33, 67,134,132,157, 58,117, 42,172,176,176,240, 94,181, +245, 32,108,200,144, 33, 97,158,158,158, 88,183,110,157,158,207,231,111,110,225,223,212, 62,244,138,138,138,110, 1,248,250,224, +193,131,171,103,207,158, 13, 47, 47,175, 16,165, 82,249, 95, 45,179,163, 68,210,125,230,218,181,148,144, 36,121,223,125,253,181, +227,154, 11, 23, 86,239,221,183, 79,240,252,243,207, 19, 44,203,226,238,157, 59,178, 85,235,215,203, 39,141, 25,147,147,158,149, + 69, 29, 57,125,154, 44, 46, 44, 44, 43, 44, 41, 89, 10,160,204, 26, 63, 73,146, 87, 51, 51, 51,125,250, 13,120,222,247,226, 31, +247,146,198,143, 25, 57, 88, 40,224, 17,247,115, 10,110,122,123,185, 59, 37, 92, 56,107, 32, 73,242,170, 53, 30,157, 78,151, 77, + 81,148, 43,203,178, 30, 9, 9, 9,240,240,240, 64,121,121, 57, 72,146,132,217,108, 54,235,245,122,169, 90,173,134,209,104,132, +201,100,130,163,163, 35,238,222,189, 91, 76, 81,212,249,198, 56,105,154,158, 41,145, 72, 62, 19, 10,133, 98,145, 72,164,184,121, +243, 38,180, 90,109, 91,103,103,231,175, 40,138,130, 66,161,192,165, 75,151, 62,112,116,116,204, 1, 0,169, 84, 10,177, 88,226, +102, 50,153, 40, 0,133, 45,189,230, 44,203,182,184,190,188,188,188,252,101, 50,217,138, 15, 63, 92, 24,220,181,107, 55,148,148, +148,128, 97, 24,216,217,217, 65,175,215,195,209,209, 17,189,123,247,206, 94,177, 98,133,146,101, 49,203,154, 24, 84,169, 84, 37, + 2,129,224,173,217,179,103,127, 22, 24, 24,216,158,101, 89,116,236,216, 17, 67,135, 14,197,201,147, 39,145,145,145, 1,157, 78, + 71, 95,187,118,237, 87,165, 82,121,140,235,110, 57,112,224,192,225, 31,135, 63,249,102, 61,102,209,250,111, 66,165, 82,149,164, +165,165,157, 74, 76, 76,140,158, 56,113, 34, 18, 18, 18,166, 3,120, 31, 0, 36, 18,201,244,137, 19, 39, 34, 49, 49, 17,105,105, +105,167, 84, 42, 85,201,211,248, 79,177, 88,108, 52,155, 31, 25,167,164, 82,169,180,153,167,183,173,158, 50, 4,128,182, 77, 28, +107,220, 52, 34, 16,120,119, 30, 62, 92, 80,158,148,164,221,122,253,250,103,177,177,177,130,190,125,251, 18,164,197, 2,154, 97, + 16, 16, 16, 64, 12,137,136,176,251, 57, 54,214,149,214,233, 46,125,254,225,135,191,109,153, 57,179, 42,179,218, 15,204, 26, 76, + 38,211,250, 55,230,190, 22,113, 33,225, 55,223,144, 78,207,184,158, 58,115,225,150,155,155,147, 60,176, 67, 7, 59,117,121, 25, +189,100,209, 7, 2,147,201,244,157, 53, 30,131,193,112,232,236,217,179, 99,252,252,252, 60,238,221,187, 7,179,217, 12,154,166, + 49,100,200, 16,176, 44, 43, 1,192, 8, 4, 2,164,165,165,193, 98,177,168, 50, 51, 51, 21,247,239,223,151, 0, 88,105, 37,127, +185, 38,147, 9,169,169,143,102,237, 90,183,110, 29, 25, 21, 21, 5,138,162, 48,124,248,112, 28, 57,114, 36, 50, 53, 53,117, 77, + 93,205,247,164,117, 94,109, 33, 11,246,241,241, 57, 88,125,200, 38, 39,120, 95, 95,223,176,128,128,128, 77, 43, 87,174, 20,181, +110,221, 26, 44,203,194,197,197, 25,122,189, 30,165,165,106,132,132,132,192,207,207, 15, 43, 87,174, 4,128, 95,109,181,184, 41, + 20,138,251, 10,133, 98,162, 74,165, 18, 85, 84, 84,132, 71, 70, 70,174,139,136,136,192,173, 91,183,240,219,111,191, 77,146, 72, + 36, 42,139,197, 66,121,121,121,205, 34, 8,194,209, 98,177,236, 82,171,213, 74,174,239,226,192,129, 3,135,127, 4,106,124,180, + 80,231,189,121, 22,173,224,224, 96,187,156,156,156,169,109,219,182, 21, 3,128, 76, 38, 11, 9, 8, 8, 88,144,149,149, 85,217, +220,220,232,245,250,189,177,177,177, 67,191,249,230, 27,209,200,145, 35,159, 57,120,240, 96, 79, 0, 24, 57,114,228, 51, 14, 14, + 14,136,141,141,181,232,245,250,167, 22, 19,137, 36,201,254, 61,122,244, 64, 89, 89, 25,114,114,114,154, 53, 45,115,236,216, 49, + 57, 30,249,101, 53,121,172, 41, 80,102,179,139,179,175, 47,175,240,194, 5, 75,153, 86,235,221,127,192, 0,130,180, 88,192,227, +241,160, 86,171,145,151,151, 7, 39,103,103, 34, 45, 51,211,126,219,194,133,199,218,118,237, 42,166,205,102,183,102,100, 83, 87, +170, 42,158,241,246, 91,111, 30,218,181,235, 87,143, 10,173,246,129, 76, 38, 55, 73, 36, 34,175,121,111,191, 77,151,149,149, 77, + 3, 80,101, 3,207,202, 93,187,118, 13, 31, 62,124,248, 29,127,127,127,207,146,146, 18,175,138,138, 10,186,172,172,140,143, 71, +190, 86, 4, 0, 92,184,112, 1, 90,173,150,162,105,250, 18, 30,197,194, 50,219,154,209, 54,109,218, 56,133,135,135, 15,244,240, +240,128, 70,163,129,155,155, 27,186,117,235, 54,144,207,231,255,152,155,155,171,121,154,173, 62, 62, 62,222,129,101,217,231, 88, +150,197,240,225,195,109, 58,135,166,233, 87,163,162,162, 68, 4, 65,192, 96,208, 67, 42,149,193,206,206, 30, 14, 14,142, 8, 12, + 12,130, 66,161,192,176, 97,195,204, 15, 30, 60,216,168, 84, 42,155,221, 70, 53, 26,205,232,222,189,123,207,159, 59,119, 46, 40, +138,194,232,209,163,145,159,159,191, 38, 59, 59,123,143,143,143,207,228, 87, 95,125,213,195,205,205, 13,243,231,207,151, 1,248, +148,235,187, 56,112,224,192,225, 31,129,250, 62, 90,127,182,104, 53, 53, 39,234,229,229,213,143, 32,136,143, 13, 6,131,184,102, + 74,134, 32, 8,177,135,135,199, 17,131,193, 16,163, 84, 42,155,229, 20, 87, 81, 81,161,125,248,240,225,145,171, 87,175, 78, 24, + 59,118, 44,226,227,227,167, 1,192,216,177, 99,113,245,234, 85, 60,124,248,240, 72, 69, 69,133,246,105,148,220,215,215,119,196, +128, 1, 3,198,246,232,209, 3,113,113,113,160,105,250, 74,115,206,175,187,194, 16, 13,172, 58,172, 57,102, 19, 25,159, 15,130, + 32, 64, 81, 20, 0,160,180,164, 4, 25,233,233, 40, 43, 47,135,201,104,132, 78,175,167, 3,219,181, 51,104,204,102, 33, 1, 52, +119,238, 43, 55,241,198,181, 60,189, 78,231,233,230,226,106,144,203, 37,168,208,106, 68, 55,111, 92,171, 2,240,192, 70, 14, 51, +203,178, 3, 78,158, 60,185,148,207,231, 79,180,183,183,199, 27,111,188,193, 31, 56,112, 32, 68, 34, 17, 76, 38, 19, 42, 42, 42, + 16, 27, 27, 91, 66,211,116,251,234,115,236,229,114,249, 14, 62,159, 95, 80, 89, 89,249,177,213, 63, 48,155, 71, 70, 71, 71, 11, +204,102, 51, 62,255,252,115, 44, 91,182, 12,195,135, 15, 23,220,184,113, 99, 36,128, 93, 79,171,197, 51, 12,131,200,200,200,186, +206,240,169,182,156, 39, 20, 10,195, 58,116,232,128,146,146, 18,148,148,148,192,195,195, 3, 62, 62, 62,240,242,242,194,154, 53, +107,216,117,235,214,157,178, 88, 44, 27, 75, 75, 75,139, 91,208, 22,103, 77,155, 54,109,214,132, 9, 19, 80, 85, 85,133,171, 87, +175,162, 79,159, 62, 88,189,122,181,247,165, 75,151,222,239,209,163, 7,132, 66, 33, 18, 18, 18, 64, 81, 84, 62,215,111,113,224, +192,225,127, 13,255, 80,255,172, 38,209,164, 69,203,207,207,207,153,166,233, 15,162,162,162, 34,199,140, 25,131, 97,195,134, 61, +246,251,174, 93,187, 28, 14, 28, 56, 16,179,126,253,250,225, 22,139,101,101,115,166,250, 24,134, 57,180,107,215,174,145,207, 63, +255,188,124,208,160, 65, 1, 0, 32,145, 72,204,187,118,237,210, 51, 12,115,168, 5,101,169, 9,238, 88, 12, 0, 62, 62, 62, 93, + 4, 2,193,216, 17, 35, 70,116,153, 49, 99, 6,146,147,147, 17, 27, 27,123, 63, 48, 48,240,114,113,113,179,158,145, 57, 86, 86, + 29,198, 88,179,110,241,197, 98,117, 69, 81,145,179,189,191,191,208,197,193, 65, 25, 23, 23,231, 23, 17, 17, 65,228,231,231,163, +188,188, 28, 70,163, 17, 55,110,220, 96, 4, 64,174,192,197,133,200,189,122,149,224,139,197,106, 60,190,146,207, 42,252,188, 93, + 58,126,178,104, 78, 91,163,201, 24,170,209,104, 40,129, 80, 40,108,237,229,156,159,254,160, 89, 51,113, 38,185, 92, 30, 14, 64, +192, 48,140,222,213,213, 85,126,230,204, 25,136,197, 98, 16, 4,129,206,157, 59, 67, 42,149,138, 88,150,205, 3, 0, 7, 7, 7, +241,230,205,155,157, 38, 79,158,252,155, 53,226,238,221,187, 11, 37, 18,201, 11,129,129,129,184,122,245, 42,238,221,187,151,123, +245,234,213, 54,221,187,119,135,191,191,255, 11,222,222,222,251,110,221,186, 69, 62,141,134,253,104,197,106,243,157,225,105,154, +102, 8,130, 0,143,199, 3,195, 48, 40, 41, 41, 65,251,246,237,177, 97,195, 6,172, 93,187,246,115,165, 82,121,180, 37,249, 9, + 14, 14, 22,181,111,223,126,218,132, 9, 19,144,149,149,133,152,152,152, 82,165, 82,121,225,244,233,211,227,230,206,157,203,239, +211,167, 15,212,106, 53,126,254,249,103,234,230,205,155, 63, 21, 21, 21,237,228,186, 92, 14, 28, 56,112,248, 23, 11, 45, 63, 63, +191, 9, 34,145,104,254, 75, 47,189,196, 15, 10, 10, 66,113,113, 49, 28, 29, 29, 73,130, 32,132, 0,224,236,236, 76,202,100, 50, +204,153, 51, 7, 93,187,118,237,183,112,225,194, 62, 2,129, 96,131, 66,161,216, 97,203, 31,171, 84, 42, 61,143,199,219,255,198, + 27,111,172, 76, 74,186,213, 30, 0,254,248,227,143,135, 10,133, 98,145, 74,165,210, 55,179, 28, 53, 65, 49, 9,137, 68,122,189, + 99,199,142,217,225,225,225,142, 99,198,140,129,135,135, 7, 18, 19, 19,177,106,213,170, 76,179,217,188,244,226,197,139,212,127, +251, 34, 83, 38, 83,209,205,195,135, 29, 6,190,242,138,227,188,168,168,175,223,124,227,141,111, 62,249,228, 19, 65, 80, 80, 16, +161,215,235,113,253,250,117,246,192,129, 3,228,207,159,125,182, 22,118,118,194,171, 7, 14,136,205,102,115,110, 51,173, 37, 3, +250,246,239, 23,244,245, 55,235, 97, 52, 84,225,250,149,227, 40, 47, 47,193,230, 45, 7,131,124,125,217, 1,133,133,133, 23,109, +229, 34, 8, 34, 48, 62, 62,222,147,101, 89,136,197, 98,172, 88,177, 2, 62, 62, 62,112,116,116, 68,101,101, 37,222,127,255,125, +167,119,223,125,215, 9, 0,146,147,147,107,195, 51, 88,131, 66,161,232, 61,103,206, 28, 7,138,162,112,234,212, 41, 51, 65, 16, + 31,159, 61,123,246,199,206,157, 59,139,251,245,235,231,176,115,231,206, 62, 0, 18,158,150,208,106,225,121,247,207,156, 57,211, + 99,226,196,137,172, 80, 40, 36, 42, 42, 42,224,236,236,140, 13, 27, 54,232,148, 74,229,241, 22,183, 1,138, 18,203,229,114, 49, +203,178,216,191,127, 63,114,115,115, 95, 85,171,213, 69, 52, 77, 31,252,224,131, 15, 22, 4, 5, 5,181, 75, 79, 79,207,173,172, +172, 92,173, 82,169,178,185,174,137, 3, 7, 14, 28,254, 81,168,113,130,175, 89,125,120, 28,143,166, 19, 27, 23, 90, 52, 77,207, + 57,125,250, 52,159, 97, 24,108,217,178, 5, 55,111,222,100,229,114,249,199,114,185,252,123,153, 76, 70, 27, 12,134,217,175,191, +254,250,228,101,203,150,241,250,245,235,135,171, 87,175,242,218,183,111, 63, 13, 64, 93,161, 21,129, 38, 98,109,104, 52,154, 27, +197,197, 69,237,235, 4,168,108, 47,145, 72,111, 88, 41, 76,125,206,250, 65, 49,123,173, 88,177, 66,231,237,237,109,190,119,239, + 30, 54,109,218,196,220,188,121,243,130, 88, 44,222,172, 84, 42, 77, 54,114, 62, 13,212,114,138, 41, 42,241,151, 5, 11,130,159, + 29, 61,154,121,109,254,252, 42,145, 76,246,206,215,235,215, 47,172,168,172,244, 1, 65,176,110, 78, 78,185, 91, 86,172,136, 25, +254,194, 11, 85,201, 23, 47, 74,147,226,227,133, 30, 36,121,187, 57,249, 44, 44, 44,188,152,144,240, 27,182,111,253, 6, 22,139, + 9,202,194, 71, 58,173, 84,173,129, 21,145,245, 39, 78,138,162, 52,227,198,141, 19, 1,144, 77,153, 50, 69,172, 82,169,240,204, + 51,207, 0, 0,180, 90, 45,142, 31, 63,142, 78,157, 58, 1, 0,238,222,189, 91,251,217, 90, 62,237,236,236, 94,232,211,167, 15, +114,115,115,145,156,156,124, 78,169, 84,170, 1,156,203,207,207, 31,217,163, 71, 15, 28, 58,116,104, 84, 19, 66,171, 89,117,100, +163,208,250, 19,167, 76, 38, 91,116,240,224,193, 87,175, 92,185, 50,113,193,130, 5,194, 33, 67,134, 0, 0, 42, 43, 43,245, 0, +232,150,112,214,205, 19, 73,146, 96, 24, 6,174,174,174, 58,181, 90, 13,149, 74,149,173, 82,169,222,120,240,224, 65,139, 56,159, + 70,251,228, 56, 57, 78,142,147,227,252,155,112,254, 27, 96,123,100,120,150,101, 41,134, 97,144,144,144,128,131, 7, 15,210, 22, +139,101,150, 82,169,188, 91, 39,201,250,196,196,196,248,113,227,198,237, 72, 79, 79,231,167,164,164,128,101, 89,186, 57,185, 49, + 26,141, 36, 65,252,249,216,147,150,114,251,246,237, 40, 42, 42,178,228,231,231,159,165, 40,234,208, 19,174, 94,124,226, 85,135, +219, 1,211,203,102,243,217,101,125,251, 70, 46,141,143,151,188,246,209, 71,166,233, 51,102,124, 64,155,205, 36, 95, 36, 98,196, +118,118, 60, 90, 34, 17, 38, 95,188, 40, 93, 55,119,174,171,193,100, 58, 21,219, 12, 7,243, 26,139,214,192,129,253, 48,253,181, +247, 96,168, 99,209,186,122, 35, 3, 38, 11,154,101,209, 50,153, 76,161, 74,165, 18, 82,169, 52, 15,128,215,212,169, 83,193, 48, + 12, 12, 6, 3, 42, 43, 43,161, 80, 40, 52, 51,102,204,160,171,197,147, 96,236,216,177,142,182,240, 6, 4, 4,248, 8,133, 66, +156, 58,117, 10, 66,161,240, 56, 0, 8,133,194,227,241,241,241, 35, 39, 77,154, 4, 95, 95,223,128,172,172, 44, 2, 86,252,211, + 60, 67, 71,239,101,129,142, 32,208,225,145, 9, 14, 29, 60, 66, 71,223, 33,128,204,234,168,241,169,221,187,119, 7,108,244,203, +170,139,234,197, 29,107, 73,146,220,183,112,225,194, 55,122,245,234, 53,116,217,178,101, 4, 0,254,211,184, 3, 41,138,122,162, +208, 19, 28, 56,112,224,192,225,111,109,213,250, 19, 26, 21, 90, 4, 65,108, 25, 48, 96,192, 44, 0,124,130, 32, 54, 41, 20,138, +187,245,211, 40,149,202, 12, 31, 31,159,175,218,181,107, 55, 27, 0, 75, 16,196,150,102,102,170,152,101,177,138,199, 35, 22, 62, + 18,119, 45, 10, 80, 89,179,213,201, 66, 0, 4,143,199,223,113,235,214,173,143,242,242,242, 74,108,180, 64, 52,137,167,177,234, + 16, 0,126, 5,178, 95,202,205, 61, 61, 63, 44, 44, 98,248,220,185,232, 50,124,184,163, 79,155, 54,180,193, 98, 97,238, 94,190, + 76, 92,217,191, 95,148, 20, 31, 47, 52,152, 76,167, 14, 1,121,205,205,103, 97, 97,225,197,243, 23, 46,158, 25, 63,118,228,208, +128,118, 62,143, 68, 67,182, 2,165,101,154, 51,205, 17, 89,245, 68,239,232, 13, 27, 54, 28, 21,137, 68,130,186, 91,217, 88, 44, +150, 50,147,201, 20, 10, 0,229,229,229, 62, 91,182,108,217,205,227,241,114,173,241,165,164,164, 28, 89,186,116,233,216,156,156, +156, 51,249,249,249, 57, 0,144,151,151,151, 67,146,228, 14,165, 82, 57, 54, 55, 55,247, 0,108, 88, 4,192, 2, 29,147, 47,239, +235, 12, 0,161,125, 39, 32,249,242, 62, 41,128,206,161,125, 39, 0, 0, 90,186,151, 97, 93, 84,135, 86,248,248,234,213,171,187, +134, 14, 29,250, 58,158, 32,166, 23, 0,152,205,102,210, 96, 48, 80, 52, 77, 11, 44, 22, 11,107, 54,155, 73,174, 79,226,192,129, + 3, 7,219,193,178,108, 15, 0, 30,213, 95,107, 12, 40, 30,245, 62,155, 81,189, 93, 96, 77,247, 91,253,189,132, 32,136, 27,117, + 56,106,143,219,112, 46, 0,148, 2,184, 67, 16, 68, 99, 70,144, 45,141,125,111, 84,104, 41, 20,138, 3,176, 97,211,104, 91,211, + 53,129,197,213,251,196, 1, 45,223,219,173,150,131,166,233,226,188,188,188, 39,174, 80, 30,143,151, 61,106,212,168,102,165,183, +150,102, 15,144,251,182,201,180, 51,238,187,239,186,157,218,180,201,151,166, 40, 55, 2, 96,249, 98,177,218,108, 54,231,120,144, +228,237,230, 90,178, 30,179,198, 60, 44, 28,150,245,176, 16, 29, 58,116, 96,239,223,191,255,200,214,243,100,184,173,211,233,252, +172, 53, 1,189, 94,223,207, 70, 49,248,107, 97, 97,225,175, 13, 8,246,221, 74,165,114,183,173,153,170,221, 84, 26,224, 49, 4, + 51, 62,180,239,132,253, 0,152,154, 77,165,159, 38,138,138,138,210, 81, 29,231,237, 73,144,155,155,107, 34, 8,226,151, 85,171, + 86, 77, 73, 74, 74,218,163, 80, 40, 76, 92,183,201,129, 3, 7, 14,205, 19, 89, 4, 65,196, 85,127,143,174, 54, 10,197,213,255, + 92,147,166, 38, 93,221, 52, 53, 28,245,143, 55,117, 46, 0, 44, 90,180,232,163,152,152, 24, 57, 0, 91, 55, 99,110,241,166,210, +127, 21,138,255, 38, 28,117, 69,193,214,191,162,160,223, 1,102, 80,212, 53, 80,117,124,242,201,167,107,220,184,127,255, 62,241, +111,190,225,106, 54,149,174,131,176,127, 66,190,115,114,114, 54,248,251,251,111, 86, 40, 20, 20, 56,112,224,192,129, 67,115,224, +209,144, 48,106, 68,148, 69, 55,245,251, 99, 3,247, 6,210, 53,244,157, 32,136,184,152,152,152,232,102,228,183,214,162,197,227, +234,142, 3,135,255, 30,254, 63, 86,189,114,224,192,129, 3,135,134, 81,223,138, 85, 35,190,234,127, 95,180,104,209, 71,104,122, +198,201, 27,143,172, 88,222,213,223,107,253,181, 8, 60, 90, 57,208, 16,154,179,154, 32,162, 5,229, 59,203,113,114,156, 28, 39, +199,201,113,114,156, 28,231,255, 28,167, 53,238,179, 13, 8,162,168,198,166,250,154,154, 70,172,255,217,218,185,214,210, 18, 4, +209, 88,152,159,154,169,194,250,239,127, 57, 34, 56, 78,142,147,227,228, 56, 57, 78,142,147,227,228, 56,159, 4, 44,203,246, 96, + 89, 54, 10,143, 22, 76,177, 44,203, 70,177, 44, 59,124,209,162, 69,139,107,142, 45, 90,180,104, 49,203,178, 67,106,210, 85,167, +169, 61,167,230, 88,253,247,250,199,154, 74,219, 68, 22,103,213,251, 92,251,253,239,226,163,197,129, 3, 7, 14, 28, 56,112,224, +208, 32,106, 86, 12,214,177, 54,149, 0,184, 27, 19, 19, 83, 94,199,119,170, 4,192,109, 0, 93,171,211,149, 84,139,180,186,190, + 85,230,234,239,230, 6,210,152,109, 73,219, 8,182, 52,242,153, 19, 90,141,161,171, 23,239, 51,255,214,158,225,213, 21, 0,150, + 97, 0, 0, 76,117, 12, 36,182, 38, 24, 18,195,128,101, 89, 40, 84, 21,137,119, 85,248,164,165,255, 23,232, 3, 87, 79,169,116, + 45,195,178,125,171, 15, 93,212,168, 77,239, 37,107, 81, 97, 43, 71,167, 86, 8,150,242,240, 1,195,162, 11, 0,240, 8,220, 49, + 50,248, 42,173,184,249,241,164, 26,106,231,161, 30,152, 37,150,201, 95,114,114,118,233, 80, 94, 94,154,105, 49,154,246,165,148, + 96, 51,154,191, 47, 35, 2, 92,240, 28,195,226, 35, 0, 60, 33, 15,107, 50,203,108, 94,201,193,129, 3, 7, 14, 79,106, 29,121, +162,184,120, 4, 65,208, 13,112, 18, 79,200,201, 5,216,179, 65,108, 53,112,248,143, 6,142,221,248, 59,229,187, 89, 66, 43,196, + 3,115, 65, 96, 57, 0, 22, 44, 62, 77, 41,193, 15,205, 58,223, 27, 17, 82, 62,127, 27, 0,190,209, 66,207,103, 25, 92,106,240, + 98,242,208, 95, 42,226,175, 1,192, 24,105,122,102,138,210,118,127,177, 80, 95, 12, 23, 48,188, 95, 24,150, 21,210, 12,187, 3, + 44,226,236, 69,248,253, 90, 33,140,205,201,171,127,107,207,240,195,127, 40,135, 94,248, 97, 30,122,117,121, 6, 44, 77, 1, 12, + 9,121,191, 15,112,238,219,169,232, 21,236, 15,150, 33, 1,134,130,253,136,175, 49, 34,204,137,189,171,106,217, 62,216,129, 62, +112,109,227,238,121,111,235,214,109, 94, 62, 1, 33, 4, 67, 89,144,254,199,153,201,239, 46, 92, 58, 56, 20,154, 48, 91,196, 86, + 23,111,188,230,223, 54,232,131,247,150,127,195,247,246,241,179, 99, 72, 19, 85,148,157,218,125,253,234,165, 7, 68,188,220, 53, +119,148,216,102,107, 91, 14,241,192,108,129, 68, 60, 65, 38,181,235,160,215, 87,222,167, 45,228, 62,158, 80, 48,252,171,175,215, +118, 27, 24, 57,210,158,174, 44,226,145, 12, 66,246,238,217,221,230,187, 13, 27, 71,222, 83,210, 47, 0, 96,154, 83,102,134,197, +194,140,157,179, 70, 10, 5,124, 34,248,213,173,124,128,106,145,208, 10,246,196,203, 4, 11,171,225, 37, 88, 2,191,165,170,240, +107, 75,254,163,147, 39,126, 36, 88, 4,130,192,126,130,197,238,148, 18,168,184, 46,143, 3,135,127, 23,120, 60,222, 5,134, 97, + 6, 61,101, 97,240, 28,203,178,215,184,171,251,191,141,230, 89,180, 8,124,158,252, 32,223, 5,180, 5,161,129, 1,159, 1,205, + 19, 90, 82, 62,127,199,141,204, 98, 47, 80, 22,108,253,226,141, 61,102, 18,160, 72, 11,104,138, 4, 77,145,160, 40, 11,104,146, + 4, 75,154,176,244,167, 11,128,185, 18,225, 97, 29,119, 0,180,183,173,255, 33,100,121,191, 36, 94, 62,227, 74,152, 53,248,245, +135,152,183,243, 75,170,222, 62,123, 71, 81, 26,226,105, 88,156,162,194,207,205, 17, 4, 23, 54,205, 67,236,161,227, 5,235,126, +212,165, 49, 44, 11, 87, 71, 89,208,228,232,100,191,157, 71, 46,228,175,221, 97, 76, 3, 0, 39, 59,113,208,180, 59,153,254, 79, + 82, 9,158, 82,233,218,205, 27,191,243,242,118,147, 17,212,149,149,160,104, 26,126,109,162,248,139,223,154,236,253,249,183,219, +190,133,214, 52,189,169,243,131, 60, 17,210,182, 93,240,252, 29,199,175,248,235,180, 42,243,153, 93, 31, 61,128, 9,164,151,111, +176,240,179,152,111,248, 75, 62,156,247,190,153, 46,184,158,174, 66,138,181,190, 38,216, 19, 71, 98, 86,126,221,101,240,136,104, +123,166,170,132,111,212, 85, 5,110,253,105,219,242, 78, 93,122,202,251,133,181, 22,169,246,205, 33, 12,149,101,176,240,164,146, +193,161, 17,142,134, 41,147,200,173,219, 99,223, 74, 81, 97,125,115,202, 76,179,255,105,123, 12,211,242,168,235, 4,139,126, 73, +215, 46,204,166, 21, 55,192,210, 36, 64, 91,106,223, 65,147, 96,153, 71,239,189,230,252, 4,160,101, 66,139,199, 98,232,217,203, + 55,188,139,139,148, 61,190,253,250,203,197,236,141, 27, 39, 65,227,151,212, 50, 92,108,174,192,228,192,129,195,223,218, 98, 66, +177, 44, 43,120,202,156, 35, 89,150, 61,241,132, 52, 31, 0,120,173,250,243, 54, 0, 95, 61,133,172,181, 6,224, 85,253,185, 8, + 64, 1,215, 2,158, 8,245,157,223, 91, 28, 71, 75, 10,150, 1,246,143, 1, 0, 89,115,115,193, 2, 82, 16,124,128,212, 97,244, +136, 72,184,123,122, 1,164, 30,176,232, 1,210, 0,144, 58,128, 52,160, 84,153, 11, 88,116, 64,214, 73, 80, 44, 43,105,118,113, + 77, 26, 32, 99, 31,134,116,247,135,135,147, 20,243, 70,135,184,111, 57,149,177,109,219,153,244,136, 20, 21, 94,178, 41,175, 44, +139, 94,157, 59, 96,221, 54, 93,218,177, 91, 37,195, 0, 96,100, 87,183, 83,189, 66,218,248,173,221, 97, 76, 59,113,183,124, 56, + 0, 12, 15,117, 60,217, 51,200,219,159, 65,203,173,190, 12,203,246,243,105,219,129,160,147, 54,131,209, 22, 64,171, 53,160, 32, +123, 39, 92,124,159,229,209, 12, 6, 88, 59, 95,198,199,162,119,150,172, 18,234,181,197,102,198, 82, 66,123,240,203,249, 2, 49, + 67,160,240,162,169,138,169,160,223,155, 53,149,154,255,201, 23,139, 0, 76,110,138, 39,196, 19,111,173, 89,179,182,115,159,240, + 78,158, 69, 7,230, 17, 85,229,197,160,248,114,201,232,231,251,192,185, 99, 8, 83,156,176,134, 16, 7, 68,192,217, 45, 0,133, + 87,118, 33,231,218, 65,162,111,247,177,146,159,127, 21, 77, 1, 44, 13, 10,173, 14,238,232, 59,172,127,207, 61, 1,254, 62,222, + 44,203,128, 97, 88,176, 12,141, 42, 35,137,197,123,179, 64,211, 52,198, 13,235, 59,196, 78, 76,176, 12,195,128,101, 25,228, 23, +169,245,231,175,167, 13,201, 42,199,117, 91, 44, 85, 93,159, 27,212,247, 78,226,181, 78,100,198, 49,132, 79,142, 73, 35,128,203, +117,218, 92,223, 91,167,127,238, 4,252,212,114, 45, 71,128,206, 57,181, 18,254,253,103,241, 55,255,122,202, 67, 83, 82, 56,237, +192,206,141,227,127,216,188, 57, 54, 77,133, 57, 92,255,194,129,195,191, 3, 44,203, 62,117,177,149,155,155,171,120, 18,177,229, +235,235,219,191,176,176,112,117,141,183, 10, 65, 16,171,219,182,109,187,244, 63, 3,213,199,198,122, 26,154,166, 39, 23, 22, 22, + 94,106,138, 51, 42, 42,202,231,248,241,227,237,234,112,182, 3,208,174,161,180,206,206,206,116,239,222,189,115,142, 31, 63,174, +224, 90, 72,139, 4, 87,179,133, 86, 90,222,190,121,221, 77,202, 42, 0, 72,179, 33,253, 99, 83,126, 70,146, 94,185,125,249,212, +149,161,109, 93, 81,169, 51,227,204,205, 28,208, 52, 9,154,162,170, 45, 91, 20,104,138,196,176,174,238,232,109,156,131,245,113, +233,160,104, 38,166, 41,206,250,176,176,204,203,221, 34, 38,238,101, 24, 86, 44, 17,242, 52,129,126,110,158,243,199,117,229,205, + 27, 29, 10,131,133,154,184, 43,225,193,249, 84, 21,182,218,196,201,252, 57,228, 17,219,208, 49,154,178, 90,246, 38,172, 81,189, + 34, 6,246,115,100, 77, 26,144,165, 89,168,212,147,200, 82,147, 40, 50, 86, 64, 66, 40,109,226,100, 88,116,105,237,235, 45,255, +125,207,135,217,110,124,173,192,147, 79,137,196, 60, 10, 52,195,242,217,138, 20,147,107,167, 72, 97,141,223, 86, 83,249,148,201, + 29,166,246, 31, 26,229,148,183,107, 22, 33, 11, 28, 6,207,238,126,200,190,180, 29,170,155,113, 80, 43,114, 8, 71, 99, 5, 90, +185, 61,131, 17,147, 95,194, 87, 47,245, 64,165,182, 18,124,229, 3, 39,177, 80,226, 12, 88, 26,228,100,105, 76, 94,179,234, 11, +111, 1,159,247,232,122,214,188,104, 18, 6,147, 9,160, 41, 72, 5, 12, 8,182,230, 55, 18, 52,105,145,119, 25,251,225, 27, 0, +125,221, 90,217, 83, 85,248, 53,196, 3,253,192,144,157, 88,210, 0, 2,184,156, 82,242, 31,241, 19,236,137,151,159, 29, 54,163, + 31, 75,224,183,150,212, 81,152, 27,162,195,219,217,219,217,105,211, 80,176,255,109, 60,128,148,109,213,231, 53,188,252,234, 91, +242, 45, 91,182,140, 2,216,185,120,220, 71,237,175,216,100,149,227,228, 56,255,145,156,142,142,142,237,219,182,109,187,148, 36, +201,254, 34,145,168,149,197, 98, 1,195, 48, 69, 98,177,248,183,156,156,156, 21, 90,173,246,225,223,173,236,119,238,220,105,142, +216,178,202, 41, 20, 10,145,158,158,126,191, 25, 98,235,108,189,243,127,185,124,249, 50,246,238,221, 11, 0,200,200,200, 64,199, +142, 29,237, 26, 58, 49, 59, 59,219,110,224,192,129,191, 0,240,107,138,243,238,221,187,237,143, 29, 59,134,253,251,247, 3, 0, +210,211,211, 17, 24, 24,216, 96,102, 46, 95,190,204,127,229,149, 87,218, 3, 80,252, 23,234,232,223, 32,178,234,190,255, 71,104, +197,197,197,177,209,209,209, 68,253,207, 13, 32,203,223, 69,220, 29, 70, 26, 0,178,154,155,131,212, 98,172, 90,183,243,244,240, +115,251, 55,244,151,138,120, 88,182,117,126,126, 73, 89,229,115, 2,226,209,244, 11,197,130,231, 98, 47,190, 26, 51,173,171,127, +121,149, 17, 71,255, 40,188,148,162,106,158,137, 52, 69,137,120,128,113,126,244,141,134,209,160, 10,156,246, 85,252,238,221,139, +134,119,121,111,116, 23, 28,185,146,243, 30, 64, 89,141,250,206, 50, 12, 88,134,170,117,126,175, 30, 58, 0,204,227,155, 2, 51, + 96, 31, 29, 99,154,103,209, 26, 0, 8,202, 61, 49,194, 65, 46,254,126,246,236,215, 29,201,146, 76,148,153, 69,200, 47, 55,162, +200, 32, 68,149,192, 19,133,105,119,105, 30,129,120,171, 38, 23, 2, 90,150, 50, 58,187,136,237,121, 97,145,111,248,106, 79,125, + 84, 46, 38, 40,190,227,139,159, 59,151,158,251, 38,135,210,149,232, 8, 2, 86,195,207, 59, 57, 57,119, 52,170,115,248,154,242, + 82, 56,123,133, 98,248,196,104,124, 26, 21,130, 74,173, 14, 37,101, 87,217, 14,222,142, 68,238,111,177, 88, 50, 34, 24,234, 98, + 37, 76, 36, 64,232, 76,101, 70,179,177,170,209,235,200,195,230,119, 23, 44,124,185,141,183,135, 93,205,162, 2,150,161,209, 53, + 56, 0,145,253,123, 33,254,242,239,184,113, 55, 3, 76,245,162, 2,150, 97, 80,160, 42, 47, 54, 90,232,237,205,186,160, 52, 5, +150, 52, 54, 40,196,208,130, 41,195, 48, 79,200,105,224,147, 30,237, 29,102, 46,138,110,227, 96, 39, 33, 96, 36,105, 24,205, 36, + 42,127,255, 30,110,109, 59, 67, 46,149, 18,221, 97, 16,220, 2,184,125, 11, 57,112,168,131,241,227,199, 75,139,139,139, 19,252, +252,252, 66, 34, 35, 35,229,253,250,245,131, 78,167,195,153, 51,103,160,211,233,218,248,249,249,181, 57,115,230,204,216,188,188, +188,148,214,173, 91, 15,220,191,127,191,205, 62,180,213, 2,136, 95,219, 5, 3, 20, 65, 16,168, 62, 70, 84, 31,107,241, 62,183, + 98,177, 24,185,185,185, 79,221,178, 85, 88, 88,120,191, 37,150,173,170,170, 42,145,175,175, 47, 60, 60, 60, 64,211, 52,116, 58, + 29, 14, 31, 62, 12,141, 70, 3,134, 97, 32,147,201,240,249,154,173, 72,187,149,128,235,215,175, 67,163,209,136,172,113, 22, 20, + 20, 16, 93,187,118,133,201,100, 2, 69, 81, 48, 26,141, 56,123,246,108,237,119,129, 64,128,133,159,125,139,140,155, 9, 72, 74, + 74, 66, 65, 65,193,127,101,183,145,102,104,145,191, 35, 26,141,153,245, 95, 95,117, 72,211,212,226, 45, 59,118, 95, 93, 60,231, + 37,188, 53, 41,194,111,197,134,131, 17,169,165,216, 1, 0,193,238,152, 54,101, 80, 7,127,103,185, 16,159,238,186, 9,176,236, +226, 39,253,191,228, 50,100,132,180, 98,222, 59,116, 61, 55,225,163,151,186, 35,192,219,177, 99,185,184, 76,156,149,101,195,158, +130, 12, 5, 23,123, 73,208,200,174,110,167,192, 48,112,118,144,116, 2, 77,193,217, 94, 18, 52, 60,212,241, 36, 0, 56,202,133, +157, 26,178,124, 53,134,112, 63,225, 44,185, 68, 48,203,206,193,217,127,250,168, 72,217,200, 81, 99,101,246, 66, 10,234,235,103, +160, 21,182, 6,233,218, 6, 38,178, 12, 5, 15, 31,208,231,174,165, 22,150, 86,154,230, 91,205, 38,139, 75,133, 15,211, 61,218, +119,137,116, 41,141, 91,162,106, 63, 99, 87, 59, 30, 24, 94,101,236,139,197,118,158, 61,101,127,100, 61,172, 98,216, 6, 45, 58, +143, 65,171,209,228,144, 52,188, 13,180,192,225,193,133,159,177,104, 68,103,148,151,169, 96,180, 80,208, 24, 40,139,151,179, 84, + 98,122,120, 15, 38, 11, 5, 51,201, 64,232,236,139, 51, 87,239,150, 50, 36,121,178, 49,206, 44, 53,146,178, 14, 39,217,215, 61, + 22,224,142,174, 31, 58,202,146, 64, 26,144, 91,160,192,142,227, 87,187,103,169,145,244, 36,245,204, 50,212,163,233,231, 58,150, + 44,130, 69,191,150, 56,193,119,242, 68, 79,145, 84,244,221,234,247, 94, 9,121, 62,208, 85,194, 20, 92, 5,193, 88, 96, 71, 11, + 96, 16,211,112,242, 11, 0, 99,174,100,245, 70, 99, 69, 50,192, 69,122,231,192,161, 14,130,130,130,188, 10, 11, 11,147, 23, 44, + 88,224,250,226,139, 47,226,208,161, 67,208,106,181,216,190,125, 59,214,174, 93,139,229,203,151,131, 36, 73,108,217,178, 69,126, +224,192,129,158, 27, 55,110, 44,240,247,247, 15,205,203,203, 43,178, 34,176, 8, 0, 18, 0,194,234,103, 23, 1,128, 57,113,226, + 4, 70,142, 28,137, 19, 39, 78, 48,213,199,104, 60, 26,252,180,104, 63, 81,177, 88, 12,177, 88, 12,141, 70,243, 84,196,150, 80, + 40,132,189,189, 61,196, 98, 49, 42, 43, 43,155, 45,182, 40,138,226, 23, 20, 20, 64,163,209, 32,114,212, 40,124, 27, 19,131, 65, +131, 6, 33, 50, 50, 18, 44,203,226,236,217,179,136,232, 19,134,151, 94, 24,136,212,212, 84, 80, 20,101, 83,126,139,138,138, 80, + 92, 92,140,225,163, 70, 97,235,198,141,232,213,171, 23,130,130,130, 64, 81, 20, 18, 18, 18, 48,126, 88, 31, 72,199, 68, 32, 35, + 35,131,107,212,182, 91,179,158,138,143,214, 19, 35,185, 4,215,152, 35, 23,227, 38, 13,235, 25, 61,170,111, 8,182,238, 57,247, + 5, 60,180,187, 1,192,205, 36,249,124,234,160, 0,164,228,149,227, 92,146, 34, 46,181, 20, 79,101,181, 6, 67,195,221,205, 81, + 14,240,197, 48, 88, 24,202, 49,203,186, 3, 51,195,178,144,247,255, 16, 83, 70,165,248,245, 10,241,243,171, 89,117,104, 63,242, + 27, 76,187,123,223,191, 71,144,151, 63,104, 18,160, 73, 56,190,180, 11,248,204,206,106, 62,250,180, 19,199,191, 59,111, 94,239, + 17, 99, 38,202,196,114, 39,208,218,124,144, 69,119,161,206,188, 4,157,188, 35,138,114,179,176,247,244,117, 77,102,129, 90,203, +227,225, 76,177,198,244, 65, 86, 57,170,172,241, 26, 73,196, 44, 93, 50, 63,106,239,238, 61, 14,146,128,190,196,131,239, 71,106, +196, 2, 74,226,209,238, 89,158, 94,234,206,126,185,125,143,163,206,140,149,214,120,244, 58,237,193,179,103, 78,189,212,161,125, + 95,135,236, 27,199, 97, 48,154, 96, 34,129,208,158, 3, 65,211,172,152,224, 17,140, 35,159, 79,168,212,229, 32, 72,186,248,183, +219,217,202,203,183,179,248, 38, 7,172,108, 50,186, 72,125,117, 79,240,223, 25, 53,176, 27, 64, 26, 70, 17,235,254, 0, 0, 32, + 0, 73, 68, 65, 84,240, 66,255,206,248, 54,246,220,219, 0, 61,227,201, 42,249,145, 69,139, 5,250,134,120, 96, 19,203,162,239, +205,195,107, 59,133,143,121, 23,205,177,104,133,186, 99, 68,112,123,159,159,191,253,252, 67, 87,183,214, 29,249, 4, 67,130,245, +234, 2,104, 11, 88,162,224, 42,156,124,123,129,246,233,131, 45,235,191,174, 98, 24,118, 55, 0,110, 73, 54, 7, 14,117,251, 35, +163,241,224,170, 85,171, 92,163,163,163,107, 44, 50,184,122,245, 42,182,109,219, 6, 59,187,199,251,201,145, 35, 71,130,101, 89, +215,101,203,150, 29, 4,240,124, 99,156,189,123,247, 30,149,148,148,164,232,214,173, 91, 86,181,216, 18, 1,224,221,187,119,143, +151,159,159, 79,184,184,184,176, 62, 62, 62,164, 66,161, 96, 0,208,175,190,250, 42,127,223,190,125, 29,116, 58,221,197,150, 10, + 45,177, 88,252, 84,124,182,132, 66, 33, 8,130,128, 88, 44,134, 72, 36, 2,203,178,205, 18, 91, 52, 77, 11, 78,156, 56,129,155, + 55,111, 98,121,183,110,120,207,215, 23,174,174,174, 72, 72, 72, 0,203,178,176,179,179, 67, 89, 89, 25,118,239,222,141,193,131, + 7,131,162, 40,145, 45,188,251,247,239, 71, 98, 98, 34, 62, 11, 15,199,123, 78, 78,176,183,183,199,217,179,143,102, 3, 37, 18, + 9,114,115,115,113,246,236, 89, 12, 28, 56,144,107,212, 79, 8,155, 27,207, 0, 64, 80, 70,192,203, 98, 54,128,165, 88,128,128, + 79,112, 48, 68,169,169,143, 59,231,216, 2, 30, 15, 75,214,239,136,139,250,230,221, 81,196,172,209,221,125, 86,252,124, 97, 46, + 0,204, 28, 23,232, 43,151, 8,176,238, 72, 10,203,227, 97,201,211, 40, 96,112, 48, 68,132, 26,115, 35,123, 5, 65, 81, 97,198, + 3, 69,197,249, 84, 27,167,122,206,125, 51, 5, 59,143, 38,228,175,221,105, 76, 99, 89, 22,206,246,146,160,105,119, 30,248,255, +124, 34, 49,111,205, 94, 99, 26,203,176,112,150, 11, 59,205, 72,237, 99,117,213, 97,184,159,112,214,251,243,231,247, 25, 61, 99, +129,148, 74,219, 7,243,131,211, 96, 44, 6,104, 45, 34, 84,240,189, 80,144,151,135, 47,183,196,229,107,117,230,151,146, 75,154, + 39, 48, 51,213,168, 18, 16,218, 23,191,252,244,163,248,152,207,151,217, 27,178, 18,170,248, 4,101,224,183, 29, 32,248,124,249, + 55, 68,165,201, 60, 49,171, 28,149,214,120, 76, 14, 88,185,106,205,250,168,215, 39,143, 77, 11,236, 56,192,141, 86, 60,116, 51, +106,181,170, 93,167, 18,189,170, 71,138, 4, 0, 60, 40, 80,163, 68,163,163,104,138,188,232, 32,196,138, 20, 91,172,131,213,104, +239, 9,143,232,190,161,175,120, 56,136, 96,168,170,128,167,131, 16,195,122, 61,243, 10,249, 71,198,135, 15, 85,205,145,107,245, +133, 22, 9,150, 52,224,218,202,193,157, 88,154,236, 4,154,132,229,206, 47,205,183,140, 17,120,239,173,254,246,142, 46,230,108, + 30,116,118,128,204, 29,132, 99, 27,192,169, 29, 33, 12,158, 8, 69, 86, 50,245,246, 43,147,213, 15,115, 10,126,116,151, 61,149, +149, 63, 28, 56,252,171,144,155,155, 59,117,241,226,197,151,123,245,234,213,202,221,221, 29,157, 59,119,198,209,163, 71,177, 96, +193,130,218, 52,221,186,117, 3,203,178, 40, 43, 43,195,170, 85,171,138, 20, 10,197,212, 38, 7,232,201,201,105, 59,119,238,236, + 31, 18, 18, 98, 17,137, 68, 21, 0, 36, 21, 21, 21,210,178,178,178,255, 99,239,188,195,162,184,218, 40,126,166,108, 99,233,101, +233, 69, 69, 65, 81, 20,123,195,168,177, 69,197, 88, 98,141,198, 22, 21,141,137, 26, 19,187,209,152,196,110,212,196,174, 73,236, +189, 99, 98, 33,177, 23,236,130,128, 40, 42, 74, 89,122,103,251,148,239, 15,202, 7, 74,217, 5,211,204,252,158,103,158,217, 50, +123,118,102,238,204,220, 51,239,189,247, 29, 66,163,209,128,227, 56,206,218,218,154, 77, 74, 74, 50, 12, 25, 50, 68,123,237,218, +181,186, 5, 5, 5, 47,106, 18,209,242,240,240,136,200,200,200,200, 33, 8,162,198,169, 31,138, 77,150,131,131,131, 34, 63, 63, +159, 3,144, 85,157,212, 15, 12,195,160, 69,139, 22, 56,115,233, 46,126,253,253, 26,114,147, 30, 97,226,184,143,208,184,113, 99, +156, 57,115,166,218,101, 22, 16, 16,128,211,161, 87,112,229,246,125,188,136,121,128, 79, 39,142, 67,163, 70,141,112,250,244,105, +225,128, 54,158, 83, 40,219, 55,235,212,171, 70,171, 83, 72, 72, 72,241,157,249,107,246,181,129, 3, 2, 68, 54,146, 93, 11,122, +214,245, 19,117, 91, 0, 66,100,134,131, 62,167,219,207, 93,188, 46,154,114,124, 49, 60, 34,181,234,209, 97,101, 78,154, 84, 60, +228,195,162,247,222,143,106,240,225,251,173, 61,176,245,132,124, 62, 0, 12,238, 80, 7, 55, 31,167, 33, 44, 38,117,111,100, 26, + 30,214,116,171,253, 29, 33,103,211,177,119,217,103,125, 59,121,185, 59, 99,219,209, 43, 32, 8, 28, 49,170,194,229,121,190,117, + 67, 47,172,217,249,234, 8, 67,103,207, 85, 7, 52,209,103, 31,230,245, 4,128,110, 13,228,191,181,172,107,235,201,151,238,184, + 85, 14,102, 18,122, 66,207, 1, 35,100, 76,204, 9, 32, 46, 20, 4,163,133, 90,207, 65,153,158, 7,149,181, 7, 46, 92,191,175, +206,209,232,166, 70,166, 85, 47,138, 23,149,142,167,226, 91,247, 95,230, 23,168, 93,228,138,186, 26,138,228,184,124, 45,143,155, +145,113,185,145,201,120,100,140,198,211,167,208,181,113, 99, 58,108,218,113,224, 43,145, 88, 50,152, 34, 64, 56,218,152, 43, 54, +125,255, 13, 44, 45, 45,192,233,242,129,130, 52,244,255,100,113, 90, 68,146,161, 14, 0,248,216,195,162, 67, 29,209, 14,154, 36, + 18,206,199,234,231, 85,245, 31,132, 1,193,195,123, 52, 21,113,186, 2,124,182,108, 63, 54,207,236,139, 17, 93,252, 68,167,174, +198, 4, 3, 88, 84,221,178,230, 89, 6,188, 65,141,182,115, 46, 69, 19,192, 21, 30, 8,188,125,224,219, 6,192, 93,163, 53,154, + 1, 34,150, 38,252,154,120,154,139,185,132,171,224, 18,174,242,148, 71,123, 16,158,239, 16,132,115, 11,254,199,229, 11, 11,182, +110,221,118,150, 35,241,181, 17,169, 50, 4, 4,254,171, 60, 77, 74, 74,122,175, 87,175, 94,191,159, 57,115,198,206,223,223, 31, + 0,112,251,246,237,194,155,206, 22, 45,224,235,235,139,148,148, 20, 12, 29, 58, 52, 93,169, 84,190,135, 42,250,252,230,229,229, + 61, 59,116,232,144, 83, 65, 65, 65,211,121,243,230,165,122,121,121,229,106, 52, 26, 34, 59, 59,155, 99, 24, 6,182,182,182,146, +166, 77,155,162, 93,187,118,249,215,175, 95,175, 21, 31, 31,159, 7, 32,174, 58, 43,223,183,111, 95, 92,186, 84, 56,104,239, 77, +228,213, 18,139,197,240,247,247,119,123,250,244,105, 98, 81,221, 98,242, 53,190,116,245,114,255,254,125, 92,188,155, 0, 90,167, +134, 36, 45, 9, 55,142, 30, 66,159, 9,147,192, 48,213,239,197,112,255,254,125, 28, 11,189, 1,115, 41,141, 71,143, 30,226,208, +161, 67,152, 56,113, 98,141, 52,171, 73,165, 94,228, 31,142, 18, 21,244,211,162, 1, 32, 40, 40,232, 98,113,180,162, 52,222,222, +144, 72,243,177,160, 91, 51,183, 25,131, 3,235, 82,134,220, 36,112, 44, 7, 74, 4, 56, 58, 88, 97,215,174,189,117,246,238,223, +127,125,195,250, 13, 63,112, 12, 51, 55, 34, 21, 42, 19, 86,106,193,247,251,175, 12,222, 53,189, 19, 61,177,103, 3, 59, 0, 16, +211, 36,214,158,120,200, 0, 88, 80,147,173,109,227, 6, 89,190, 1,227, 29,237,173,231,207,254,184,183, 93,167, 22,190,184, 24, + 22,129, 31, 14, 93,191, 36, 73,197, 78,163, 15,110,206,128, 87,253, 83,121,163, 14,193, 85,221,239,146,101,121,103,177,185, 45, +244,113,231, 1,189, 6, 26,173, 30,241, 25, 44,226, 51, 53,160,229, 98,220,142, 73, 80,219, 39, 35,164, 6,155, 77,152,203,101, +174, 95,125,183,202, 93,163,206,103,114,179,210, 25,177,228,134, 72,110, 38, 85,154,210, 85,225, 70, 34, 52,239,212, 22, 53, 7, + 56, 74, 34,227, 85,115, 62, 31,101,158, 24,121, 6,245,200, 36, 16, 60, 15, 51,191,222,176, 52,163,196,129,181, 68, 47, 1,192, +220, 92, 46, 89,246,245, 23,214, 83,103,126, 93,101, 31, 48, 63, 64,236,235,237, 60,213,223,203, 22,151,238, 68,227, 82,248,139, +135,151,110, 63,106,212,185,177, 43,124,221,109,166, 72,178,178,151, 70,193,244, 8,105, 97,193, 48,128, 65, 83, 50,234,208,207, + 17,195, 90, 14,158, 87,209,104,195,114,169, 13,112, 49, 44, 15,130,162, 0,130, 44, 28, 1, 25,127, 21,180,141, 55,191,247,192, + 49,213,182,109, 59,191,137, 74, 23,162, 88, 2, 2, 85,145,147,147,243, 32, 42, 42,170, 71,147, 38, 77,182,127,246,217,103,150, +195,135, 15,119, 29, 55,110, 28, 9, 0, 41, 41, 41,220,154, 53,107,146,126,252,241,199,156,244,244,244,209, 6,131, 33,220,152, + 51, 92,169, 84, 94,251,233,167,159,210, 46, 95,190,220,168, 85,171, 86,210,230,205,155,115,182,182,182,180, 84, 42,101,117, 58, +157, 38, 38, 38,134,125,250,244,169, 75,118,118,246, 19, 0,177,168, 70,179,126, 81,244,106, 17, 69, 81, 95,241, 60,239,255, 38, +250,104,201,229,114, 87, 0, 79, 8,130,168,103,106,179,225,107, 21, 54, 77, 35, 43, 43, 11,170,228,135,144, 37, 60, 70, 19,115, + 18, 13,109, 45, 96,101,101, 85, 35, 83,148,147,147, 3, 20, 36,226,202,149,251, 0,195,192,218,218, 26,214,214,214,127,185,209, +170,200,139,252, 75, 24, 95,206,103,149,247,209,106,168,192, 68, 51, 29,214, 76,232, 93, 87, 92,219,211, 29,218,132,219,184, 31, +159,143,185,109, 90, 69, 82, 82, 75,205,132,143,250,182, 24, 48,176, 22, 58,181,107, 73,212,118,177,158,178,244,251,141,159, 52, + 68,250, 23,145,169, 88,107,204, 26, 69,166,225, 25,135,212,109,231, 31, 36, 4,187,203,213,224, 56, 30,231,195,149, 8,143,203, +218, 22,157,134,103,166,108, 93, 67, 23,116,165, 65,238,231,121, 94,102,109,110,158,215,208,215,221,161,107,219, 0,242,189,142, + 45, 32,166,128, 43, 55,239, 99,218,247, 71,110,112, 28,223,219,232, 17, 98, 28,247,154,129, 42, 28, 97,104, 40, 51,194,144,231, +121,190,112,212, 97,229,221,190, 40,138, 72, 86,189,184,229, 44,178,247,129, 58,246, 60,226,178, 56,188, 72,205, 67, 46,237, 12, +109, 98, 34,192,115, 47, 47,214,160, 99,181,131,131,131, 99,157,134,190,117,215,237, 56, 4,189, 42, 7,207, 46,108, 71,126,150, + 18,223,110, 58, 81,215,205,205,190, 99, 98, 98,226, 69, 19, 46, 54,190,191,135,236,117, 4, 15, 80, 34, 41, 78,109, 56,128,116, +123, 51, 56,200,197,224,212,105,152, 48,117,184,117,207,110,195,173, 1,224,197,163,123,240,146,171,141,210,213,219, 99,192,224, +206,245,109, 96, 80, 99,199,233,123, 26, 18,120,111,231,217,135,177,157, 27,216,200, 6, 7,122,217, 46, 74,202,254, 0, 25,213, + 75, 42, 90, 28,209, 42,137,240, 85, 99,180,225, 33,128,109,192, 33,118,255,181, 84,243,129,221,154,203,197, 52, 65,240,249,137, +224,205, 28,176,113,199,193,124,137,225,175,121, 18,187,128,192,219,128, 90,173,190,163, 86,171, 27,127,249,229,151,195,230,204, +153,243,142,185,185,121, 29, 0, 40, 40, 40,120,102, 48, 24, 46, 21,157,159,166,140, 14,228, 1, 60,137,141,141,125, 22, 27, 27, +235,180,123,247,110, 27, 0,178,162,239, 52, 0,178, 1,164,160, 6, 35, 14,139, 77, 21, 65, 16, 95,189,169,253, 80,108,170, 8, +130,168, 87,157,223,147, 36,201, 18, 4, 1,130, 32, 32,149, 74,113,249,242,101, 12,234,221, 13, 81,167,178,225,111, 99,129, 86, +163, 39, 96,255,185,115,160, 40, 10, 4, 65,128,162, 40,147,234, 17,154,166,113,229,202, 21,140, 24, 58, 16, 82, 26,176,182,182, +198,151, 95,126,137,227,199,143,131,166,133,167,244,153,192,150, 82,134,203,200, 60, 90, 4, 22,157,219,190, 88, 12,214,128,147, +219, 87, 34, 36, 34, 95,247, 40, 13,115,235,167, 97,205, 33,228,113,105,223,239, 12, 62,119, 37, 98,197,152, 33, 65,242,119, 59, +119,195,187,157, 58,211,141, 90,118,156, 15,148, 49, 90, 93, 81, 73,174, 13,150,195, 55, 91, 78, 71, 79,216,127, 33,134,128, 62, + 15, 67,186,183,228, 89, 14,223, 84,177, 49,175,105, 90,155, 89,236,191,114,253,186, 45,244,249,136,187,247,135,172, 86,157,186, + 0,171,199,147, 39,143,241,227,142,163,220,133,155,143,118,233, 24,124,246, 52, 11, 5,198,106, 22, 58, 43, 6,214,230,146,250, +239, 53,178,250,141, 3, 15, 27,185,184, 1,207,177,176,145,139, 26,116,107, 32,255,141,231,121,222,210, 76,212,128,103, 13, 85, +106,170,117,204,230, 29, 63,111, 91, 53,118,236, 88,243,244,132,100, 36,229, 70, 32, 95,226, 6,131,220, 3,177,247, 46,169, 85, + 90,198,152, 74,188,194,253,153,158,158,158,122, 39, 44, 19,251, 55, 45,129, 65,167, 69,106, 66,161, 87, 77, 74,207,133,149,131, +219,245,196,196, 68,163, 53,245, 12,151, 51, 96,248,120,177,153, 37,204, 70, 12, 8,146,196,102,104,209,204,213,178,240,162,145, +159,134,168,208, 43,232, 84,212,199,244,105, 60, 9,175, 0, 87,163,214,211, 82, 38,254,172,103,115, 55, 60,123,169,196,229,135, +137, 59,158,101, 34,137,141, 86,238,136, 77,202, 14,238,219,198, 19,171,143, 71,126, 10, 24,246,154,178,237,126,142, 24,198,243, + 8, 44,236, 12,175, 6, 15, 4,250, 57, 98,152,145, 35, 13, 95,211,164,197,248,112,213,111, 47,230, 29,188,149,222,119,198,135, + 29,172,218,181,235, 37, 1,163, 67,158, 90,107,136,202, 70,110, 77,202,168, 6, 8,154,130,230,191, 85,147, 5,176,203, 96, 48, +236,202,206,206,126,147,154, 73,120, 61,175, 83,141,182,189,116, 51, 33,207,243,116, 81, 52,171,170,206,240,149,106,150,110, 38, +228,121,254,215,162,104, 86, 85, 81,173, 50,154, 28,199, 37,181,104,209,194,174, 79,159, 62, 96, 89, 22,143, 31, 63,198,139,248, +120,116, 13,254, 20, 54, 54, 54,184,244,224, 1, 30, 61,122,132,175,190,250, 10, 6,131, 1,199,142, 29, 75,168, 74,147,166,105, +125,221,186,117,197,253,250,245, 3,195, 48,120,250,244, 41, 18, 19, 19, 49,109,218, 52, 88, 91, 91,227,206,157, 59, 37,154,233, +233,233,160,105, 90, 95, 78,116,235,207, 56,150,254,237,188,102,178, 42, 55, 90, 0, 11,214,128,156,115, 11,176,246, 50,244,122, + 3, 26, 68,166,225,121,228,255, 35, 82, 27,169,176, 7, 39, 31, 68, 68, 63,187,115,245, 93, 9, 82,195, 97,234,157,196,227, 12, + 40, 45,101,121,121,208,231, 89,225,233,111,120,158,146,151,255, 56, 3, 74,147,239, 24, 56,150,128, 94, 5, 40,111,227,218,165, +139,184,112,227, 62,110,133, 71,179,215,238,196,236, 39, 57,124, 19,149,129,199,213,184, 11,129, 69,239,213, 24, 21,254,196,179, +165,175,147, 39, 88, 6, 60,103,128,245,144,189, 24, 29,217,206,179,165,183,141,103, 97, 36,203, 0,219,143,255, 0, 86,201, 42, +213,187, 29,111,216, 34, 57,126,230,131,188,236,140, 54, 93, 58,182, 53,183,246,235,137,244, 39, 49,120,124,255,138,250, 78, 68, +236,181,219,241,134, 26, 69, 75,220,220,220,222,233,210,177, 62,134, 76,152, 13,189, 42, 7, 79, 47,252,140,252,204,100, 92,190, +110,129,232,220,220,182, 0,140,142,104, 93,127,201, 52,194,203, 44,180,175, 37,122,105, 9,173,243, 71, 65,125, 32, 37, 52,224, +180,185, 32, 84,233,136, 77,212,229,124,176, 41,158, 5, 0,185,148,160,205,249, 28, 43,163, 34,143, 94,246, 62,114,202,128,157, +231, 30,130,227, 10, 31,223,196,113,216,184,243,143,216,224,111, 70, 52, 67, 67, 79,219,128,123,137,169, 4, 76, 8,249, 19, 60, + 58,220,218,255,117, 3,205,239,243, 1, 78,143, 43, 83,236, 26,116, 88,155,217, 1,213,124,220, 78, 68, 18, 18, 1, 4,131, 86, +109,158,178,246,244,252, 22,231, 34, 3,167,127,220,215, 10,188,240, 0,118, 1, 1,129,191,158,252,252,252, 9,163, 71,143,222, + 44, 18,137, 20, 0, 8,142,227,192,113, 28,189, 98,197, 10, 17,203,178, 36, 73,146, 44, 69, 81,204,175,191,254,106, 96, 89, 54, + 77,163,209, 76,168, 74,147, 97,152,216, 73,147, 38,213,173,106,132,226,190,125,251,138, 77, 86,172, 80, 18, 70,153,172,210,243, +146, 40, 87,197,149, 7,143,175,219,143, 88,176, 0, 0, 1, 30, 11, 35,211,240,252,213, 69,194, 51,145,212,144,210, 79,107,212, +178,227,130,226,223,152,186,102, 26,150, 29,216,178,177,239, 62, 0,208,242,236,136,234,108, 93,174, 86, 61,184,105,203,182,251, + 57,158,167, 25,158,223, 70,114, 56,172, 97, 16,101,204, 72,187,138, 72, 74,205,190,211,211,223,154, 7, 10,155, 12, 75,154, 11, +139,210, 56,240, 60,207,151, 52, 23,174,148, 33, 61, 71, 91,101, 30,168,171,207,117,221,116,204,173,241,103,175,222,155,192,178, +188, 51, 69, 17,201,106, 29,179,185,166, 38, 11, 0, 18, 19, 19, 47,134,158, 75, 60,251, 32,192,169,187,131,188, 40,202,165, 2, +210, 85, 56,155,152,150,127,177, 58,154, 89, 5,134,190,115,214, 28, 63, 33, 17, 81, 52,120,190, 48,161, 40,207, 67,163,103, 51, +175,191,100, 26, 1, 64, 99, 59,184,126,121,140,217, 71, 81,196,139,170,244,194, 30, 41, 87, 15, 89, 26,250,197,195,184,172,109, +113,217,136, 0,128,184,108, 68, 28,184,242,124,126,108,114,222, 23, 17, 47,178, 86,194,196,126, 21, 60,129,203, 45,135, 44,120, +237,179,154,238,207,104, 37,238, 3,232, 15, 36,116, 27, 50,253,199,233, 4, 1,225,241, 19, 2, 2,255, 33,138,163, 90, 36, 73, + 46,122,131,154,191, 18, 4,209, 11,192, 19, 19,126, 22,150,159,159,223,248, 13,111, 94, 6,195, 48, 25,198, 44,248, 55,116,136, +255,183,242,183,117, 45,233, 42,104,254,245,154,245,234,213,227, 77, 48, 44,194,254, 20, 52, 5, 77, 65,243, 63,165,201,243, 60, + 85,147,169, 2, 77,162, 38,147, 80, 70,255,122,198, 87,244, 94,104, 14,121, 11,121,242,228, 9, 33,236, 5, 1, 1, 1,129,242, + 33, 8,130,253, 19, 52,133,228,197, 2,197, 6,171, 76,116,139, 20,246,137,128,128,128,128,128,128,128,192, 27, 49, 89,165,231, +133, 38, 28, 21,135,255, 76, 25, 77, 80,157, 16, 98,168,160, 41,104, 10,154,130,166,160, 41,104, 10,154,255, 57,205,170,180,133, +209,140,127,178, 1, 19, 52, 5, 77, 65, 83,208, 20, 52, 5, 77, 65,243,191,167,249,111,166,194, 62, 90, 66,211,161,128,128,128, +128,128,128,128,192,159,132,208, 25, 94, 64, 64, 64, 64, 64, 64, 64,160,102, 84,249, 80,105, 1, 1, 1, 1, 1, 1, 1, 1,129, +234, 81,249, 67,165, 5, 4, 4, 4, 4, 4, 4, 4, 4,170,141,233, 15,149, 22, 16, 16, 16, 16, 16, 16, 16, 16, 48,138, 45,194, + 46, 16, 16, 16, 16, 16, 16, 16, 16,248,107, 40, 59,234, 48, 36, 36,132, 47, 61, 23, 16, 16, 16, 16, 16, 16, 16,248, 43,121, 91, +189,136,208,116, 40, 32, 32, 32, 32, 32, 32, 32, 80, 51,198, 11, 70, 75, 64, 64, 64, 64, 64, 64, 64,224,207,161,194, 62, 90,197, + 9, 75, 59, 21,133,234, 58, 9,251, 74, 64, 64, 64, 64, 64, 64,224,111,224,237,246, 34, 66,255, 44, 1, 1, 1, 1, 1, 1, 1, +193,139, 8, 8, 8, 8, 8, 8, 8, 8, 8,252,147, 16,158,117, 40, 32, 32, 32, 32, 32, 32, 32,240, 23, 27,174, 63,221,104, 9, + 79, 54, 23, 52, 5, 77, 65, 83,208, 20, 52, 5, 77, 65,243,191,100,178,202,152, 45, 97,212,161,128,128,128,128,128,128,128, 64, +205,168,114,212,161,128,128,128,128,128,128,128,128, 64,245, 24, 15, 32,168,232,117, 16, 74, 69,181,132,136,150,128,128,128,128, +128,128,128, 64,205,216, 2,192,165,200, 96,157, 2,160, 20,140,150,128,128,128,128,128,128,128,192,155,161,116,191,172,222,165, +204,151, 96,180, 4, 4, 4, 4, 4, 4, 4, 4,106, 72,133,125,180, 8, 84, 60,114, 32,212,132, 63,168,206,232,131, 80, 65, 83, +208, 20, 52, 5, 77, 65, 83,208, 20, 52,255,115,154, 85,105,135,226,223,199,120, 83,204,215,155, 68, 24,250, 42,104, 10,154,130, +166,160, 41,104, 10,154,130,230,127,150, 55, 62,234,176, 25, 96, 38,236,214,183, 18,167,162, 73, 64, 64, 64, 64, 64, 64,160,114, +254,156, 81,135,126,192,199,195,253, 21,155, 12, 17,105, 86, 17,128,170,178,101, 21, 10,197,102,185, 92, 62, 92,165, 82, 21, 16, + 4,193, 21,127,206,243, 60, 0,148,126,214,209,211,180,180,180, 14, 85,253,183, 68, 34, 89,227,228,228,244,113,126,126,190,138, + 32, 8,158, 32, 8, 16, 4, 1, 0,175,205, 89,150, 77,200,200,200,104,241,175, 46, 66,158,167, 28,156,156,110,138, 40,202,205, +212,159,178, 28,247, 60, 53, 37,165,173, 9, 63, 89, 66, 16,152, 81,248,183, 88, 14, 96,246,219,118, 70,240, 0,101,204,114,254, +128,101, 12, 48,132, 37,201, 79, 69,192,122, 45,199,109, 2, 0, 2, 96,171,251,223,218, 48,212, 37,120, 4, 16, 4,172,121, 30, + 57, 60,129,251,210,214,136,253,155,118,197, 0,145, 72,212,215,202,202,202, 34, 35, 35,227, 34,128,125, 0,134,218,219,219,119, +204,205,205,205, 55, 24, 12,199, 1, 28,169,142,112,135, 0,204,148,136, 69, 99, 52,122,195,178,171,247,241,115,199,102,176,103, + 56, 44,149,137,233, 14, 90, 29,179,252,202, 3,108, 51, 81,146, 40,154,138,175, 25, 38, 63, 35,237,160,145,229, 14, 0,199,108, +109,125,165, 10,171,223, 69, 18,234,121,118, 74,254,240,129,169,169,241,131,106, 80,238,255, 68, 28, 28, 28, 70,145, 36,249, 29, +207,243, 96, 89,118,110,102,102,230,246, 55, 36, 61, 23,128, 77,209,235,108, 0,223,213, 80,239, 5, 0,207,162,215, 47, 1,120, + 9,245,122,181,217,120,244,232,209,224,206,157, 59, 99,245,234,213,216,184,113, 99, 92, 90, 90,218, 82, 0, 59, 0,232,254, 6, + 29,129,138,104, 8,244, 90,209,163, 53,107,248,229, 27,174,212,199, 93, 43, 56,153,127,250,232,163,143,244, 60,207,243,143, 30, + 61,226,117, 58, 29,111, 48, 24,120,134, 97,120,134, 97,120,131,193, 80, 50,185,185,185, 37,190,242,243,215, 52, 73,146, 92,251, +193, 7, 31,228,241, 60,207,223,190,125,155, 87,171,213,188, 86,171,229,117, 58, 29,175,209,104,120,181, 90, 93,102,114,114,114, + 74,169, 76,211,202,202,234,182,173,173,109,138,173,173,109,138,157,157, 93,138,157,157, 93,138,189,189,125,201,228,224,224, 80, + 50, 41, 20,138, 20,133, 66,145, 98,103,103,119,187,170,245, 44,162, 7,128,139, 70, 76, 61,202,249,109,215,210, 70,203,197,197, + 37,133,175, 6,238,238,238,241, 70,172,103, 49, 78, 4, 1,182,248,183, 4, 1, 78, 42,149,122,150,254, 30,175, 71,186,170, 12, + 41,187,186,186,126,224,226,226, 18,234,226,226,114,206,213,213,245, 3, 35, 14,177, 50,154,150,150,150,183, 29, 28, 28, 82,156, +157,157, 83,139, 39, 23, 23,151, 50,147,171,171,107,201,228,228,228,148, 98,107,107, 91, 97, 25,241, 0, 85,209,116, 1,160,165, +192,187, 52, 69,133, 56, 57, 57,229,134,135,135,179, 60,207,243, 36, 73, 38, 22, 47, 99,202,182,191,106,178, 84, 87, 48, 55,253, +188, 52, 44,255,249,210,156,244,243,210, 48,213, 21,204,213,134,161,110,117, 53,141,164, 60,205,145, 35, 71,142,188,159,146,146, +146,152,157,157,173,220,180,105, 83,140, 76, 38,187,178,105,211,166,152,236,236,108,101, 74, 74, 74,226,200,145, 35,239, 3,152, +100,130, 38, 0,160,109, 0,218,140, 29,224,162,186,127,108,132,234,221,150,244,189,246,254, 8,234,214, 86,156,184,110,150,159, +234,210,214, 64, 85,231,230,100,132,137,154, 4, 77,211,237, 60, 61, 61,199, 40, 20,138,143,138,166, 17,197,147,179,179,243, 8, +103,103,231, 17,182,182,182,131, 42,211, 60, 8, 80,198, 76, 30, 50, 89,187, 65,117, 60, 85, 47, 22, 45,228,195,167,126,202,143, +241,246,200, 29,232,232, 88,235,111, 40,163, 63, 85,211,209,209, 49,201, 96, 48,240,122,189,158,183,183,183, 79,122,131,235,185, +146,231,249,149, 60,207,175, 4,176,242, 13,104,150, 92,207, 76, 48,216,149,105,202,104,146,156, 46,151, 72,206, 73,105, 58, 85, + 74,211,169,114,137,228, 28, 77,146, 95, 0,144,253,147,202,232, 79,208,180, 80, 40, 20,207,214,172, 89,195,171, 84, 42, 94,165, + 82,241,107,214,172,225, 21, 10,197, 51, 0, 22, 38,104, 86, 87,231,109,138, 96,189, 58,189,185,136,150, 31,208,226,221,128,122, +135,167,140, 26, 2,238,208, 26,162,138, 59,166,159,218,182,104, 49,102,199,142, 29, 0,128,225,125,251,162,123,171, 86,176,180, + 48,135, 68, 82,184, 58, 4, 79, 64, 44, 18,163,223,180,207,141,249,251,229,253,250,245,251,240,208,161, 67, 22, 0,176,113,227, + 70, 12, 24, 48, 0,118,118,118,144,203,229, 16,139,197, 16,137, 68,101,230, 85, 65, 81,148,123, 98, 98,162,163, 76, 38, 43,137, +178,113, 28, 87,102,226,121,190, 56,250, 6,134, 97,224,227,227, 99,236,238,154,149,147,147,243, 78, 65, 65, 65,137, 70,121, 83, +157, 58,117, 0,224,140, 49,130,223,125,251, 13, 56,166, 0, 52, 13, 48, 12,160,213,147,224,248,114,205, 13, 38, 77,154, 84,178, +222,213,161,119,239, 32,130, 32,136, 67,119,238,220, 57,156,154,154, 90,155,227,216,113,213,140,116,125,242,248,241, 99, 11, 0, +240,245,245,157, 4,224,176, 41,235, 65,211,180,251,131, 7, 15, 28,165, 82,105,133,145,203, 82, 17, 76,232,245,122, 52,107,214, +140, 49,229, 63,156, 0,207, 76,146, 28,215,180,121,243,241, 11,250,245,147,221,188,121, 83, 70,146, 36, 24,134,193,138, 21, 43, + 24,158,231,109, 26, 2, 86,145, 64,110, 37, 50,115, 0,140, 42,170, 12,182, 1, 88, 81,198, 45,240, 8, 80, 27,164, 65, 79,243, +251,181,106, 93,107, 38, 34, 31,134,183,242,182, 56, 6, 75, 90, 27, 11,252,181, 81, 45, 43, 43,171,190,171, 87,175, 86,108,219, +182, 45,247,209,163, 71,250, 77,155, 54, 41, 38, 76,152, 96,169,215,235, 17, 28, 28,156, 86,191,126,125,241,234,213,171, 21, 71, +142, 28,121,183,160,160, 96,131, 73,229, 69,224,155,161,125,187, 67, 99, 32, 97, 48, 48, 10, 23,133,229,174, 41, 35, 59,137,120, + 94,135,157,199,239,192,192,112, 63,155, 24,201,106, 59,112,224, 64,239,189,123,247,210,209,209,209,116,131, 6, 13,192,113, 28, + 88,150,133,193, 96, 0, 0,112, 28,135,122,245,234,213,120,191,140, 1,124, 29,156,236,206,181,237,213,211,204, 69, 38,133, 93, + 86, 26,198,138,105,203,237,114,237,110, 0,237,222,170,200, 46,207,131,166,105,196,199,199,195,209,209,209,140,227, 56, 37,128, +133, 89, 89, 89, 91,240,246,210, 74, 66,211,135,119,254,188,214,185,117,187,118,148,147,139, 35, 98, 30,191, 4, 77,176, 93, 31, +220,186,211,105,204,196,233, 83,116, 12,243, 1,128,155,111,219,134, 59,183,155,212,159, 32,169,141, 4,207,225,235,117, 39,242, +150, 44, 95, 35, 15, 30, 55,146,154, 54,109, 26, 60, 60, 60,106,247,239,223,127, 57,128,137, 85,234,180,158,212, 31, 20,185, 17, + 60,143, 5, 63,158,200, 91,188,124,141,124, 98, 53,116,254,229, 84,120,142,212,216,104,249, 1,222,141, 60, 28,207, 46,153, 49, + 81,196,255,246, 11,169,202, 72,173,112, 89,133, 66,177,249,189,247,222, 27,190,125,251,255,163,209,109,253,253,209,255,221, 64, + 56,218, 91, 67,110, 46, 41,172,142, 56, 2,247, 31, 61, 55,202, 16,120,120,120, 4, 31, 62,124,216,162,180,153, 16,139,197, 37, + 83,105,147, 85, 60, 21, 87,192,149, 33,147,201, 16, 26, 26, 10,154,166, 65, 81, 20,104,154, 46,153, 74,191,167, 40, 10, 78, 78, + 38,117, 93, 90,106,109,109,221, 36, 47, 47,207, 42, 59, 59, 27,158,158,158,185, 0, 30,148,250,190, 73, 90, 90,154,149, 41,130, + 28, 83,128,105, 99,253, 32,210,221,128, 78,212, 10,106,186, 61,174,221,138, 66,200,153,139, 72, 76, 74, 70, 96,155,166,248,104, +216, 64,156, 59,119, 14, 44,107,114, 75, 71, 10,207, 99,121,159, 62, 65, 51, 1,130,232,218,181,107,246,228,201,147,201,232,232, +232, 15,251,247,239,231,255,248,241,147,162,168, 34, 49,131,231,177, 22, 64,138,145,186, 18, 0,184,116,233, 18, 0, 72,171,115, +236, 73,165, 82, 92,191,126, 29,197,205,196, 36, 73,130, 36, 73, 80, 20,133,147, 79, 28, 80,160, 35,161, 74,137,192,167, 65,158, +168, 83,167, 14, 72,178,234, 46,137,157, 0,217, 53,160, 63, 33, 18, 77,115,113,117,173,221,209,219, 91, 30, 26, 26, 74, 1,128, +151,151, 23,175, 84, 42,179,143, 31, 63,158, 71, 3, 27,189,120,126, 71,101, 38,203,195,195,163,125, 98, 98,226,119,197,251,156, + 32,136,229,181,106,213,250,170,164,220, 56, 14, 11,127, 46, 16, 77,153, 50, 85,220,186,211, 60, 0, 64,235, 62,123,145,251,116, +137, 31,145, 57,199,250,175,190, 74,228,230,230,238,175, 87,175, 30,149,145,145,113, 13,192, 11,131,193, 48,107,215,174, 93,142, + 99,199,142, 77,221,189,123,247, 82, 0,174,203,150, 45,235, 84, 80, 80,112,192, 20,221,192, 38,232,213,188,137,127, 27, 79, 15, + 15, 92,188,118, 19, 98,137,200,102,210,168, 32, 88, 88,208, 88,185,237, 20,247, 34, 33,115,242,149, 7,216, 97,130,201,106, 53, +112,224,192,218,123,247,238,149, 0,192,131, 7, 15,144,156,156, 12,133, 66, 1, 51, 51, 51,136, 68, 34, 80, 20, 5,145, 72,244, + 70, 76,150,181,135,125,216,177, 99,199,205,236,236,108,176,238,243, 41,248, 40, 53, 5, 54,150, 22, 48,228, 23,212,126,203, 42, + 10,223, 14, 29, 58,200, 88,150, 69, 65, 65, 1, 46, 92,184, 96,109,102,102,102,237,238,238,190, 0, 38,140,158,146,201,100, 41, + 26,141,198,177,232,117,170, 70,163,113, 2,144, 43,149, 74,139,175,211,249, 69,115, 99,155, 19, 95,224,245,102,194,151, 4, 65, +148,254,172,186,180,108,213,178, 73,232,145, 67,123, 44,114,242,146, 97, 99,155, 10, 18, 57,216,178,101, 61,204,204,172,176, 96, +193, 28,250,121,215,119,221,122,244,250, 32,244, 97, 84, 76,215,183,206,108,241,196,150,174,125,134,219,153,201, 45,139,234, 18, + 3,182,111,157, 2,146, 36,241,213, 87, 95,161, 81,163, 70,227, 31, 62,124, 56, 15, 64,102,229, 50,216,210,248,157,193,118, 18, + 89, 97, 17,115,172, 1,155,246,125, 81,168, 51,123, 2,134,246,169, 51,254,203,129,207, 78, 55,242, 70, 94,209,141,185, 90, 68, +226, 37,209, 26, 37,134, 33, 36, 36,164, 99, 80, 80,208,197,138,222,255, 11,112,193,255,243,103,149, 49, 95,116, 72, 72, 8, 31, + 20, 20, 68,148,218,184, 50,239, 43, 35, 0,112,176,181,150,135,110, 92, 56,197,130,190,113,138, 82,191,124,130, 36, 77,153,138, +188,204, 16, 77,185, 92, 62,124,251,246,237,101, 66, 74,158, 78,142, 16,139, 69, 16,137, 9,216,116, 40,204, 94,159,125, 57, 4, + 4, 81,161,201, 42,163, 89, 80, 80,160,185,119,239,158,197,182,109,219,224,232,232,136,218,181,107, 67, 46,151, 67, 38,147,149, + 49, 87,165, 13, 87, 57, 70,171,140,102,241,247, 52, 77,131, 36, 73,156, 59,119, 14, 12,195, 96,224,192,129,175,153, 44,154,166, + 43, 50,110, 21, 13, 79, 61, 3,224, 1,207,243,239, 20, 85,192, 15, 0,116, 44,245,125, 15,133, 66, 49, 11,192, 82, 99, 53, 41, +138, 7,165,185, 6,206,125, 13,232,248, 41,208,137, 2,112,254,202, 29,108,223,188, 26, 0, 80,187, 65, 75, 12,234, 31, 84, 18, +141, 51,114, 61, 75,112,115,115,219,151,150,150,222,243,221,119,223, 69, 86, 86,150, 97,225,194,133,104,210,164, 9,124,125,125, +141, 42,163, 10,238,156, 83, 30, 60,120,224,161, 86,171,193,243,188, 49,230,236, 53, 77,130, 32,176,107,215, 46,104, 52,154,215, + 22,182,237,184, 24, 95, 12,240,194,232, 79,119, 96,249,163, 3,216,176, 97, 67,165,219, 46, 7,154,104,172,235,173,149, 80, 76, +147,165,115, 62,145,126,244,209, 71,212,232,209,163,241,242,229, 75,140, 29, 59, 86,115,238,220, 57, 93,178, 82,121, 92,194,113, +235,244,101,141,113,133,154, 82,169,116,231,153, 51,103,112,224, 64,161, 47,137,137,137,129,143,143,143,121, 25,147,156,121, 16, +121, 47,214, 33,236,100, 52, 90,247,217,139,176,147,195,192,102,159, 18,181,240, 65,142, 41,251,179, 26,148,167,121, 32, 35, 35, +163,196, 68,237,222,189,219,108,247,238,221,253, 0,156, 0,112, 0, 0, 50, 51, 51,191, 55, 81, 19, 32, 48,122,240,128,126,160, +197,150,136,126,146,128,142,109,155,193,201,209, 17, 15,162, 98,241, 34, 49, 51,133, 32, 48,170, 71, 59,201, 82,181, 90, 55,239, +242,125,252, 84,133, 38,225,238,238,238,123,240,224, 65,113,169, 8,116,201, 57, 78, 81, 84,201,251, 98,227, 93,157,227,179,216, +100, 89,186, 91,132,125,179,190,189,121, 88,248,110,248,120,245,130,109,175, 32,252,116,246, 44, 30, 63,140,212,232, 84, 76,151, +191,161,140,254, 44, 77,223, 1, 3, 6, 92,219,179,103,143, 77,124,124, 60, 46, 93,186,132,218,181,107, 67,165, 82, 25,115,195, + 91, 70, 83,163,209, 56, 22,255,134, 32, 8,199,226,192,187, 78,167, 43, 46,140,226, 19,209,166,212,114, 54,149,104,122,150, 90, +174,216, 92,121,189,129,109,151,200,196,226,131,199,142,236,179,136,140,190,132,166, 1,109, 96, 97,221, 16, 28,155,140,140,204, +124,100, 61, 73,194,183,223, 46,199,130,133,115,113,226,232, 33,139,250,126, 1,135,117, 12, 83, 15,128,230,173, 41,119,130, 31, + 31,122,114,247, 70,130,231,160, 78,137,150,138, 10,158,201,135, 15,251,128, 26, 50,100, 8, 78,156, 56,129,135, 15, 31,110,172, +196,100,133,150,138,204,143,143,184,116, 96, 35,120, 30,234,212,104,169, 88,253, 76, 62,242,195, 65,212, 71, 67,187,227,198, 31, +107,209,189,233,179, 8, 87, 71,244,207, 42,178,216, 52,133, 12,169, 12, 87,249, 48,220, 40,101,182, 46, 0, 32, 74, 25,172, 11, +248,127, 31,204,127, 3,189,139,140,213,248, 87,111, 76,232,234, 24, 44, 0,240, 1, 44, 8,137, 56,108,251,130, 79, 92,229, 47, + 31,210,218,136,235, 72,210,114,252,166, 56,134,107, 6,152,221, 5,212,175,254, 70,165, 82, 21,196,198,198,154,141,234,223, 31, +237,252,253,225, 98,111,143,122,238,238, 48,147, 74, 32, 17,139,202,220,178, 26,221,134, 64, 16,124,253,250,245,209,167, 79, 31, +136, 68, 34,200,229,114, 88, 88, 88, 64, 34,145,148, 27,205, 50,246, 46,151,231,121, 80, 20,133,136,136, 8,188,120,241, 2, 54, + 54, 54,184,122,245, 42,186,116,233,242, 90, 84,171,180, 57, 51, 37, 68, 95, 78,197, 95,108,196,206,152,162,197,178, 4,242,249, + 0,200,226, 38, 67, 69, 52,131, 86,203, 64,171,213,226,167, 43,122,220,140, 45,128, 94,175,131, 86,171,173,236, 63, 43,130,116, +117,117, 29, 94,175, 94,189, 73,195,134, 13, 51, 72, 36, 18, 20, 20, 20, 64,165, 82,225,225,195,135,134,158, 61,123,101,247,233, + 19,100,125,234,212, 41,190,168,233, 48,197, 4,237, 12, 55, 55, 55,143,162,230,217,140,234, 28,213, 4, 65,148,152,152, 87, 25, +245,125, 36,104,170,176, 76, 54,110,220, 8,150,101,193,243,124,133,133,164, 33,136,223, 23, 46, 94,101,189,108,205,207,176,182, +115,194,197,139, 23,217,211,167, 79,231, 17, 64,204,227,135, 15,191,127, 31,248,245, 32,160, 55,101,253,178,178,178,204,106,215, +174, 13,119,119,119,112, 28, 7,131,193, 80, 18,125,201,200,200,128, 90,173,134,157,121, 54,234,218,187,131,201,187, 0,101,196, +215,112,177,136,198,142, 51, 58, 67,115, 95,220,255, 7, 92, 56,126, 41,154,106,120,215, 12, 55, 71,103, 15,144,188, 1, 73,169, + 25,232,215,187, 59, 40,177, 5,158,199,167, 35,160,161,183,203,135,239,183,119,161, 8, 6, 51,150,238,157, 4,112, 63, 85, 37, +151,159,159,207, 70, 71, 71,227,193,131, 66,191,107,101,101, 5,115,115,243, 50,231, 56, 73,146, 53,138,104, 21,155,172,197, 27, +187,152,147,162, 2,228,178,161,216,182,235, 14, 2,234, 7, 97, 83,216, 45, 13,155,146,217,117,165, 70, 19,179,239, 95, 28,204, +112,118,118,158,192,113,220, 2,158,231,179, 3, 3, 3,157,246,238,221,107,155,152,152,136, 59,119,238,224,171,175,190, 74, 99, + 89,150,225,121,158,224,121,254,235, 55,240,119, 92, 41,131,245, 38, 17,201,101,248,212,193,138,232, 75,147, 86,181,153,220,252, +231,233, 58,254,184,138,225,126, 4, 96,168,244,226, 70,146, 31, 31,218,191,209,213, 65,193,161,147,226, 93, 40, 83,244, 88,252, +249, 72,100,100,228,225,167,173, 75, 0, 72,160,103, 40,188,211,233, 3, 56, 58,186, 97,252,184,241,206, 27, 55,111,250,132,225, +184,149,120, 75, 72,190,182,225, 40,128, 80,133, 66,241,240,147,241,227, 21,181,107,143,128, 76, 38,195,190,125,251,176,119,221, + 58,118, 13, 48, 72, 10,156, 15, 6,142, 86,170, 19,246,127,157, 41,193,193, 10, 63,191, 96, 72,165, 82,252,113,250, 23,104,146, +119,229,245,110, 7,189, 74,131,222,181,250,240,118,113, 39,137, 76,145, 8, 79, 0, 64, 36,131, 18,192,171,205, 96,255, 54,131, + 85,204, 41,252,191, 95,214,248, 50, 17,173,106, 95, 59, 69,146,240,173, 83,135,122, 57, 65, 75,232,174,156, 68,162,150, 99,151, + 61,214, 83,119,115, 32,223,157, 35, 0, 0, 32, 0, 73, 68, 65, 84,248, 47,162,202, 49, 89, 69, 7, 54,231,233,233,137,119, 91, +180, 64,255, 14, 29, 64,211, 52,100, 18, 49, 44,101,102,224,217,194, 72, 86,113,211, 97, 37,117, 34,202,139, 62,217,219,219, 67, + 44, 22,151, 24, 44, 19,162, 89,229,106,114, 28, 7,154,166,241,224,193, 3, 4, 6, 6,194,195,195, 3, 7, 14, 28, 64,143, 30, + 61, 94,107, 74, 52,213,100, 21, 27,173, 87,154,241,122, 0, 40,142,100,153,100,180, 52, 58, 2,233,186, 0, 16,132, 63, 24, 6, + 96,121, 64,171,209,128,231, 1,158, 7, 12,122, 29, 52, 26, 77,201,127, 26,211, 36,235,236,236,236,105,102,102,182,104,230,204, + 25,126, 1, 1, 77,145,150,150, 6,142,227, 96,110,110, 14,149, 74, 5, 43, 43, 43,180,107,215,238,249,162, 69,139,148, 60,143, +241, 38,154,172, 26, 83,188,207,207,158, 61, 91,166,217,176,120, 42, 80, 38, 96,244,103,187, 33,161, 11,155,150,138,251,240, 84, +118,221,237,252, 78,123, 92,187, 27,195,124, 60, 99,173, 86,148,113,103,169, 51,199,109, 79,168,193,118,241, 60,143,244,244,116, +164,164,164,160,111,191,126,216,187,103, 15,226,226,226,208,176, 97, 67,116,238,220, 25,142,142,142,136,139,139,195,205,203, 90, +104,179, 50,145,169,187, 3,185,101,107, 28,187, 24,171,253,106,163, 62,246,111,188, 96,244, 5, 48,210,202,202,170,142, 74,165, + 82, 50, 12,115, 16,192, 65, 0,131,104,154, 30, 36,151,203, 93,114,115,115,159,161,112, 52,209,241,170,196,204,100, 50,123,169, +204, 10, 28,163, 5, 77,211,240,240,168, 13,158,213, 33, 43, 87,141, 81, 67,250,224,238,131, 40,156, 62,127,131, 49, 24,184, 31, +140,217,173, 20, 69,241,190,190,190, 72, 77, 77,133, 72, 36,130,153,153, 25, 44, 44, 44, 48,123,246,108,172, 91,183,174,196,100, + 85,215,104,141, 1,124,173, 60, 45,110,124,183,190,208,100, 37, 39, 41,145,146, 32,130,194,222, 9, 63,172, 91, 83,144, 21,151, +220,250,103, 32,230,223, 94,201,114, 28,247,117, 98, 98,162, 35, 77,211,206, 12,195, 32, 62, 62, 30,183,111,223,198,228,201,147, + 83, 50, 50, 50, 58,161,154,219, 40,147,201, 82,139, 35, 89, 69, 77,135, 21, 53, 39,102,151,138,100,101, 87, 34, 89, 81, 51,161, +119,109,119,203,115, 91, 87, 79,243,108,217,186, 29, 41,167,173,178,242,159, 36, 7, 94,185,116,177,221,228,213, 63,125,242, 34, + 43,191, 59,128,167, 21,137, 74, 69,162,158,109,218,183,167,193,167,128,150, 4, 98,249,178, 33, 72, 75,207, 69, 86,102, 30,196, + 98,115,232, 12, 20, 88,142, 64,187,192, 14,248,101,199,126, 52, 26, 55,150,146,136, 68,221, 24,157,238,173, 49, 90, 69, 44,249, +241,199, 31, 61,235,215,175,143,237,219,183,227,252,206,157,248, 40, 39, 7, 23, 73,146, 50,136, 68, 14,191, 26, 12, 91, 80,133, +209, 42,173,211,168, 81, 35,252,252,243,207,216,181,107,215,203,225, 93, 82, 15, 79, 27, 14, 71,189, 30,239,221,121, 4,187, 90, +125,128, 59,143, 96,215,188, 62,234, 49, 52,158, 16, 68,217,116, 80, 33, 33, 33, 29, 75,207,255,101, 40, 81, 65, 19, 59, 13,160, + 83, 72, 72, 8, 95,122, 94,229,133, 83,225, 19,188,164,123, 29, 47,255,186,158,132,225,192, 90,196, 23, 48,186,121,143,244,146, +199,249,252,180, 40, 96, 77, 37,119, 16, 60, 69, 81,176, 52, 51,131,194,198,166, 48,204, 79,146, 0, 7,112, 6,128, 96, 11, 13, + 0,207, 17,224, 89,147, 46, 24,144, 72, 36,229,118,124, 55,181,111, 86,105,205,188,188, 60, 60,127,254, 28,227,199,143,135, 92, + 46, 47,116,238,201,201,240,242,242, 2, 77,211, 72, 76, 76,196, 31,127,252,129, 58,117,234, 64, 42,149,154,228,182, 74, 69,151, +154,160,112,148, 97, 19,165, 82,105,229,226,226, 2,147, 35, 90, 28, 15,149,150,128, 78,199,226,241,227,199, 72, 74, 74,194,243, +103, 79,208,178, 32, 23, 60, 40,240, 60,111, 82, 68,203,205,205,205,223,219,219,123,211,210,165, 75,197,238,238,238,224,121, 30, +182,182, 54, 80,169, 84, 72, 79,207, 64,195,134, 13,225,225,225,129,165, 75,151, 2,192,222,191,218,100,189,114, 76,149, 24,173, +210,134,235,179,247, 61,145,153,105, 1,138, 34, 75,140,115, 21,125,180,196, 0,208,169,251, 0,250,220,233, 95,205, 25, 96, 81, + 50, 69, 45,162,171, 46, 71, 3,203,113,242,138,190,143,143,143,135, 72, 36,194,161,131, 7,145,153,146,130,128,128, 0,180,106, +213, 10, 79,158, 60,193,221,187,119, 97,111,111, 15,133,123, 91, 92,124,166, 71,100,146, 26,214,214,214,136, 77, 32,255,206,148, + 1,227,186,118,237,250,213,247,223,127,239,232,236,236, 44, 74, 75, 75,171,191,126,253,250,128,245,235,215, 79,249,228,147, 79, +156, 62,249,228, 19, 91,133, 66, 65, 39, 39, 39,251,126,254,249,231,205, 67, 67, 67,235, 0, 88, 85,153,160,185,185,165, 29, 37, + 54, 7, 65,208,176,177,182, 5, 45, 49, 7,199,208, 96, 57,192,202, 90,129,107,119, 15,225,106,120,222,132,212, 12, 28, 52, 42, + 62, 86, 84,238,246,246,246,175, 69,170, 39, 79,158,140,173, 91,183,150, 52, 35, 86,215,100, 45, 94,223,197,130, 40, 50, 89,201, +241, 52, 8,109, 29,156, 60,122, 61, 59, 43, 46, 57,240,109, 48, 89,197,215, 56,158,231,241,236,217, 51,168, 84, 42, 92,190,124, + 25, 95,127,253,117,218,171, 38,203,209,209,113,156,149,149,213,194,252,252,252,229,201,201,201,107,171,188,241, 43, 52, 81,197, +175,139,231,229, 54, 39, 26,185,170, 94,229, 69,178, 60, 92,100,103,238, 94,222,237,101,205,223, 39,240, 98, 60,240, 56,247,161, +101,152,227, 59,189, 90,246, 38,155,109,248,166, 86,171, 9,179,207,196,231,106,234, 87, 20,217,226, 88,182,153,185,133, 37,128, + 84,220,185,125,161,196,100,101,100,230, 64,171,167,160,213, 17,208,232, 73,188,219,245, 61,172,219,180, 11,137,169,153, 96, 89, +182,241, 91,102,178,236,252,253,253,131, 7, 13, 26,132, 69,139, 22, 33,244,251,239,117, 19, 9, 34,151, 6,248, 83, 44, 11,142, +231, 9,210,184, 78,236,101,116, 86,174, 92,121, 20,192,208,165,147,209, 54, 43, 31,163, 92,251,240,118,181,250, 20, 46, 56,112, + 38, 15, 0,118,105,161,101,171,204,160,160, 32,162,184,101,205,212, 22,182,127, 58,116, 80, 80,208,197,144,144, 16,148,158, 87, +246, 3, 75,167,250,189,190,156, 62,105, 89,203, 30, 29, 8,229,244,110,200,204,213, 48,115, 34,245,146, 4,117,229, 38,171, 52, + 95,174, 95,143,187, 49,133,231,177,187,163, 35,102,124,248, 33,120, 6,184,250, 48, 18,251, 67, 67, 49,164,107, 87,152,203,100, + 70, 71, 54, 56,142, 43, 55,138, 85, 58,154,101,106,212, 41, 59, 59, 27, 7, 15, 30, 68,171, 86,173, 32,151,203, 65,211, 52,154, + 52,105,130,168,168, 40,120,123,123,131, 32, 8, 28, 59,118, 12,253,251,247,199,211,167, 79,209,182,109, 91,139, 23, 47, 94,152, +108,180, 34, 35, 35,173,120,158,127,167, 56,250, 81, 93,180, 90, 45,162,163,163,209,167, 79, 31,216,218,218,194,205,109, 47, 66, +207,236,134,220,255, 35, 16, 4, 76, 50, 90, 44,203,142,233,221,187,183,152, 32, 8,168,213, 42,200,100,102, 48, 55,183,128,165, +165, 21,124,125,235, 35, 41, 41, 9, 61,122,244,208,197,198,198,110, 80, 42,149, 7, 76, 93, 87, 63, 63, 63,243,184,184,184,143, +106,213,170, 37, 1, 0, 51, 51,179,134,222,222,222, 95, 60,125,250, 52,207,212,168, 86,177,193, 34, 8, 2, 20, 69,149, 24, 45, +154, 36,225,226,236, 88,242,190,168,127, 26, 81,137, 86,110, 98,134, 86, 10, 0,158,158,158, 88,183,249, 4,217,187,119,111, 76, +153, 50, 5, 6,131, 1, 27, 54, 20, 14,178, 27, 54,108, 24,244,122, 61, 14, 31, 46, 28, 36, 73,211,116,165, 97,147,219,183,111, +227,206,157, 59, 48, 24, 12,200,201,201,193,111,191,253,134,139,151, 46, 97,223,177,223, 17,247,236, 9,154,212,247,194,216,177, + 99, 32, 18,137,176, 99,199, 14, 4, 6, 6,254,173, 23, 4,145, 72, 52,124,235,214,173, 46,219,183,111,207, 62,118,236, 88, 65, +155, 54,109,164,107,214,172,113, 92,183,110,157, 66,167,211, 97,234,212,169,169, 55,110,220,208,246,235,215,207,124,203,150, 45, + 46,117,235,214,237,198, 48, 76,121, 70,203, 28,192, 16, 0, 35,178,242,116,116,118,158, 26, 28,163,195,179,184,231,200,201,215, +129, 99,245,120,153,144,132,124, 13,139,140,204, 60, 52,105,214,253,199, 11, 23, 46,204,213,235,245,115, 0,132, 84,181,158, 15, + 31, 62,196,141, 27, 55, 16, 23, 23,135,103,207,158,149,117,138,227,198, 97,215,174, 93, 38, 71,180,202, 55, 89, 20, 8,173, 55, + 66,142,133,101,167, 62, 81,190, 53, 38,171,232, 26,180,192,197,197,101,129,139,139,139,236,236,217,179,214,181,106,213, 2,195, + 48,186, 87, 35, 89,157, 58,117,154,183,117,235, 86, 23,111,111,239,201, 0,214,254, 19,214,157, 36, 49,110,249,198, 96, 7, 75, +201,203, 36, 60, 94, 85,148, 75,144, 2, 84,185,192,133, 61,160,219,207,127, 62,185,223, 76,219, 89,219, 23,141,227,192, 85, 56, + 66, 54,246,105, 60, 54,110, 92,135,105, 83, 71,225,151,159,150,131,227,104,104, 13, 20, 60,107,183,129, 86,207,129, 32,105, 4, + 52,107,129,243, 23, 46, 67, 68, 2, 7,183,111,124,203,124, 22, 50, 35, 34, 34, 54, 28, 59,118,236,211, 41, 83,166,128,227, 56, +201,194,141, 27,213,105,105,105, 75, 96, 90,254,171, 87,117,250,111,220,184, 49,102,214,186,180,163,211,134,131,138, 59, 73,100, +222,121, 4,187,129, 51,121, 28, 90, 70,160,121,125,100,202,203,175,226, 47,189, 50,127, 59,140, 86,177,147, 44, 61, 47,143,102, + 62,117,190,177,182,179, 29, 67, 90,186, 57,204,152, 50,145,126,154,172,193,225, 90, 31,230,255,177,243, 7,243,100, 70,250, 99, + 44, 52,107, 76,249,227,253,127,252, 81,242,122,197,222,189,229,126,167, 28, 56,208,232, 59,179,138,162, 88,166, 70,178, 0, 64, + 46,151,219,116,235,214, 13, 93,186,116,193, 7, 31,124, 80,210, 39,171,105,211,166,216,183,111, 31, 6, 12, 24,128,123,247,238, +193,197,197, 5, 13, 26, 52, 64,131, 6, 13,240,235,175,191,154,122,145, 3,203,178,240,247,247, 47, 30,117,216, 36, 33, 33,193, +170,186, 5,169,213,106,145,145,145, 1, 59, 59, 59, 72, 36, 18,180,110,221, 10,159,126,214, 26, 14, 46, 63,195,223,175, 62, 10, + 10, 10, 74,134,191, 27, 81,217,250,215,171, 87, 15,105,105,105, 72, 75, 75,131, 66,161,128,171,171, 43,156,157,157,177,106,213, + 42,126,237,218,181,167,245,122,253,134,244,244,116,147, 35, 89,206,206,206, 29, 8,130,152,167, 86,171, 37,165,238,112, 37, 10, +133,226,184, 90,173, 94,162, 84, 42,141,238, 8, 74, 16, 4,244,122, 61, 8,130,192,169,103,174, 40,208, 17,200, 77,184,131, 41, +239,123,149, 49, 94, 34,145,168,202,230, 82,158,231, 11,134, 14, 29,234,232,225,225,142,248,216,135, 56,116,136,199,247,223,127, + 95, 60, 42, 18, 49, 69, 55, 6,197,239, 59,119,238,140,218,181,107,131, 55, 33, 87, 6,199,113,120,240,224, 1,246, 30,191, 8, + 23, 47, 63,188,124, 28,141,187,191,158, 68, 45,133, 29, 26, 53,107, 1,131,193, 80,163,212, 27,111, 2,131,193,176,205,199,199, +135,215,233,116, 23, 1,172, 11, 15, 15, 31,165, 84, 42,167,158, 56,113,194,117,208,160, 65, 73, 39, 79,158, 92, 3, 96,123,120, +120,120,240,183,223,126,219,133, 97,152,114, 71, 11, 82, 20,245,203,231,159,127,222,105,208,160, 65,132,152, 52,232,206,158,217, + 65, 51,140,129,248,114,206, 54,246,194,149,139, 36,195, 24,136, 15,134,126,206,253,250, 71, 56, 57,225,179, 21,108,211, 54,189, + 17, 17, 17,225, 28, 20, 20,244,173,193, 96,168,212,104, 21, 71,170, 42,138, 80, 82, 20,133, 81,163, 70, 97,223, 62,227,123, 80, +141, 5,188,173,188, 44,110, 44, 94,223,213,130,160,243, 75,153,172,186, 8, 57, 22,150,157,242, 56,233,173, 50, 89, 0,144,145, +145,177, 25,192,102,142,227, 82,204,205,205,145,151,151, 87,222,241, 39, 11, 15, 15,151, 73, 36, 18,116,239,222,221, 46, 52, 52, + 52,134, 36,201,181, 73, 73, 73, 21, 58,142,242,154, 9,203,107, 78, 68, 13, 70, 29,218, 42, 16,212,186, 67, 51,203, 71,214,139, + 44,101,180,230, 94,173, 24,153, 21, 1, 32, 71,235,244,236,218,139, 33,185, 68,170,180,105,139,206,205, 97, 69,155, 7,101, 51, +121,229, 26, 45,146,162,238,230,100,101,247,204,205,211,225,202,213, 8, 12, 29, 82, 15, 90, 61, 1,142, 35,145, 95,160, 5, 40, + 17, 72, 0,195, 62, 28, 9,158,160,145,153,146, 4,138,162,194,193, 48,120,203,152, 29, 28, 28,220,115,206,156, 57,117,102,204, +152,129, 25, 51,102,120,109,221,186,117,243,226,197,139,103,164,165,165, 53, 70, 21,201,199, 43,209,169,117,114,223,252,233,199, + 47,111,202,233,221, 78,253,184,121,253,194,200, 87,243,250,200, 20,137,240,132,166,144,193,243,101,187, 25, 5, 5, 5,117, 44, + 61,255,151,241,106, 39,248,146,247, 70,245,209,170, 87,199,237,189,102, 77,253, 63,155, 59,103,174,101,212,181, 11,152,245,205, + 58,222,167, 69,183,188,205,151,239,234,242,205,107,247,204, 79,127,114,213, 88,127, 1, 0,239,189, 59, 0, 77, 26,182,122,237, +203,192,206,133,201,218,175,156,191,141,148,180, 68,163, 43,219, 34,115, 80,110,159, 44, 99,134,244,191,138, 90,173,206,142,136, +136,112, 76, 72, 72, 40,211,241,189,118,237,218, 32, 8, 2, 97, 97, 97,184,113,227, 6,134, 14, 29, 10,154,166, 33, 18,137,112, +241,226, 69,147,162, 49,165,162, 75,197,163, 14,123,184,187,187, 87, 52,218,176, 74, 45,181, 90,141,156,156, 28,156, 57,115, 6, +245,234,213,195,226,197,139,225,234,226,132,185,115,167,131,227, 56,228,230,230,130,101, 89, 99, 35, 90, 92,113,180,136,227, 56, +164,165,165,161, 78,157, 58, 88,191,126, 61,214,172, 89,243,173, 82,169, 60, 97,234, 58,122,120,120,216,176, 44,251,101,239,222, +189,187,245,235,215, 15, 61,122,148,205,199,186,103,207, 30,203,195,135, 15, 47,249,225,135, 31,222,211,235,245, 75, 83, 83, 83, +211,140,209,253,249,231,194,244, 75,242, 54, 11, 48,107, 80, 45,140,152,180, 3,171, 86, 29,129, 84, 42, 45, 83,241, 46, 90,180, +168, 82, 19,195,241,188,143, 56,253, 90,210,244,153, 43, 29,151, 44, 9, 69,104,104, 42, 72,146,132,139,139, 11, 72,146,196,243, +231,207, 65,146, 36,188,188,188, 64,146, 36, 18, 19, 19,139,251, 4,102,161,156, 81,143,229,223,133,147,208,104, 52,136,127, 25, +135,132,216, 24, 88,228, 38, 67, 97, 37, 71,214,195, 7,104, 50,118, 92, 73,254,167,191,153, 93, 58,157,110, 87,169,247, 43, 79, +158, 60,169, 35, 8,226, 3, 20,246,211, 40,142,104,124,203, 48,204,183, 21,137,180,105,211,166,233,156, 57,115, 68,197,233, 54, + 92, 61,191, 99,244,122, 61, 7, 0,245,155,188, 83,198,237, 63,121,242, 4,171, 86,173, 66, 65, 65, 1,196, 98,177,216,152,253, +192,113, 92,201, 8,195,242, 76,152, 41, 38, 11, 0,236,189,220,127, 12,187,115,145,189, 31,187, 73, 29,254,232, 55, 51,229, 75, + 18,164,238,237, 53, 89,175, 70,182,220,221,221, 23,112, 28,199,243, 60, 63,191,212, 87, 82, 79, 79,207,203,103,207,158,181,103, + 24, 6, 63,252,240,131, 77,114,114,178,205, 59,239,188, 51, 11, 64,133, 70,171,188,102,194,242,154, 19, 81,106,212,161, 84, 42, +181,211,233, 42, 12,158,188, 54,234,144,101,225,107,101,105,131, 44, 36, 64,235, 96,104,154,109,207,100,158, 83,142,187,231,250, +162, 89, 67,115,214, 80,135,204,213,193, 77,110, 3,142,231, 43, 28, 26,173, 53, 24,126,187,119,231,110,119, 79,143,122,212,137, +144, 75,232,219,127, 16,180, 90, 18, 26, 3, 1,130, 18,129,160,196,104,220,164, 25, 26, 52,106, 2, 30,192,237,155,215, 24,157, +193,112,238,109, 42,123,151,246,159, 14, 37, 8,172, 5,207,241,229,228,209,170,211,191,127,255, 37, 0, 62,171, 74,199,177,205, +167, 67, 73,178, 80,167,116, 30,173,207, 63, 13,198,195,155, 34,235, 75,119,150,137,123,180,193,169,180, 80, 2,114,217,255, 71, + 29,138,200, 26,165,230,248,183, 24,174,170,141,150,135,135,135,141,149, 84,246,243, 39, 99,199, 88,190,184,127, 29,201,145, 97, +184,122, 41, 38,107,255,225, 35,153, 5, 25,169, 99, 77, 48, 89, 37,205,124,246,206,181, 80,219,239,117,163, 37,179, 80, 0, 0, +106,251,181, 2,101,110, 90, 26,161,242,162, 89,213, 49, 89,165, 47,216,229,229,208,154, 48, 97, 2,182,110,221,138,246,237,219, +195,199,199,167,228, 98,111,106,212,172,156,232,146,201,163, 13, 75,147,151,151, 7, 47, 47, 47,108,217,178, 5,225,225,225,176, +180,180,196,208,161, 67,145,151,151, 87, 98,176,140,237, 12,207,243,252,147,179,103,207,182, 28, 60,120, 48, 47, 18,137,136,236, +236,108,216,216,216, 96,253,250,245, 5, 74,165,242, 84, 53, 76,214, 32,177, 88, 60,125,200,144, 33, 84,253,250,245,145,146,146, + 2, 43, 43, 43, 3, 65, 16, 34, 0,176,177,177, 49,152,153,153, 33, 56, 56, 24, 1, 1, 1, 29,102,204,152,209,158,166,233,245, + 73, 73, 73, 59, 42, 59,150, 8,130, 40,169, 80,199,174,141,134, 78, 87, 88, 65,111,216,176, 1, 69,125,221,254,223, 68, 16, 27, + 11, 24, 49,146,197,194,194, 2, 62, 62, 62,229,150,125,135, 14, 29,112,251,246,237,194,166, 73,154,134,163,163, 35,174, 94,189, +106,212, 72,170,226, 68,144, 17, 17, 17,240,171,237,128,240,208,179,112,144,139, 16,224,234, 12,247, 14, 29, 17, 19, 19,243,119, + 70,179, 8, 20,246,195,232, 90,116, 12,110, 3, 48,161,212,251,245, 0,126, 52, 69,144, 97, 24,158, 36, 73, 34, 62, 62, 94, 47, +151,203, 9, 59, 59, 59, 90, 42,149, 66,171,213,150, 24,174, 39, 79,158, 32, 36, 36, 4, 9, 9, 9,176,179,179, 35,173,173,173, +161,215,235,179,140,209,247,245,245,133,179,179,115,153,142,239, 99,199,142,173,150,201, 26, 5,248,111,253,110,105, 45, 41, 73, + 89,251, 57,188,135,103,209,207, 53,164, 14,178,255,130,201, 2,128,236,236,236,205, 0, 54, 23,191,119,112,112, 24, 77, 81,212, + 92,173, 86,107,125,241,226, 69, 27,133, 66, 65,236,216,177,195, 48,127,254,252,108,138,162,178, 8,130, 88,253,247,155, 67, 68, +166,231,196,122,137,108, 93,185,251, 26,254,218,212,248, 89, 13,178, 68,245, 20, 68, 35,127,244, 79,141,186, 50,154,137,109,151, +162, 76, 38,121,112,145,149, 92,131,183,205,154,179,232,203,152,232,187,158, 50, 43, 25, 38, 4,207,193,169,211,231, 65,144, 34, + 92,190, 22, 6,157,158, 69,122,102, 14,134, 12, 27, 14,119, 23, 7, 68,222, 56,147,198,112,220,250,183,203,100,115,235,186,247, + 29,109, 43, 53,147, 23,237, 19, 22,187,126,154, 14,146, 92,139,175,190,250, 10,254,254,254,147, 34, 34, 34,190, 70, 21,121,180, + 8,130, 91,215,184,227, 48, 91,177,180, 80,135,231, 88,108, 57, 56,171, 40,143,214, 52,172,223,124,184,113,163,218,207, 22, 86, +150, 71,235, 45, 50, 89,165,231,149, 27, 45, 47, 47, 47,169,185, 8,227, 69, 20, 61,227,147, 15,251, 41, 82, 99, 31, 34, 33,234, +110, 97,243,130, 94,173, 79,126, 28,101, 76, 42,244,174, 40,155,191,131,175,172,233, 74,163, 49,234,142,190,140,102,113,133,251, +106, 52,203, 68,147,245,154,102,105,179, 85, 58,111,150,135,135, 7,150, 44, 89, 98, 76, 30,173, 87,183,189,152, 30, 40,236, 0, + 95,186, 51,124, 15, 35, 77, 86,185,154, 10,133, 2, 25, 25,133, 25, 18, 58,117,234,132, 78,157,254, 63,158, 65,175,215,151, 68, +177, 44, 45, 45,203,139,104,189,166,105,102,102, 54,235,200,145, 35, 99,174, 93,187, 54,248,139, 47,190, 16,117,233,210,165,216, +204,169, 96,220,179,221,202,104,178, 44, 27,124,230,204, 25,138,227, 56,108,217,178, 5,183,111,223,230,229,114,249, 60,185, 92, +190,206,204,204,140, 85,171,213, 19,198,141, 27, 55,124,225,194,133,100,135, 14, 29,112,253,250,117,178, 78,157, 58, 35,129, 50, + 73, 44,203,221,246,176,176, 48,144, 36, 9, 38,243, 37, 38,205,218, 15,115, 51, 26,209,209,209,200,204,204,124, 45,137,169, 49, +251,179,116,164,164,120,234,208,161, 67, 73, 51,100,235,214,173, 65, 81, 20,238,221,187, 87, 81, 51,108,105, 77,222,222,222,190, +228,248, 16,139,197, 56,127,254, 60,190,249,230, 27,120,218,217, 32, 43, 42, 28,206,157,222, 69,183, 49,227, 48,116,232, 80, 80, + 20, 5, 59, 59,187,146,200,175, 17,199, 82, 77, 40,173, 57,198,207,207,111,100,100,100,164,123,227,198,141, 93, 34, 34, 34, 58, +251,251,251,123,133,135,135, 23,191,151,194,184,190, 57, 37,154,183,110,221, 58,180,110,221,186,224, 81,163, 70,137, 57,142, 99, + 95,188,120, 97, 0, 64, 56, 59, 59, 83,183,110,221,226, 78,156, 56, 1,181, 90, 13,119,119,119,210,205,205,141, 56,119,238, 28, + 23, 21, 21, 21,198,243,252, 28, 99,182,157,101,217, 50,105, 28,138, 95,239,217,179,199,228,243,189, 86, 3,223,197, 93,222,169, +239,145,158,116, 15,202,196, 88,176, 57, 10,125,200,177,147, 90, 19, 77,214,159, 93, 70,127,165,230,162,199,143, 31,187,105,181, + 90, 72, 36, 18,108,216,176, 65,191,100,201,146,200,244,244,244, 64,148, 63,162,188,140,102, 53, 71, 29,102, 86,162,249,218,168, +195,156, 12,156, 58,118,252, 86, 75,139,254,219, 48, 41, 41,173,164, 99, 35, 79, 16,118, 71,156, 26, 6,202, 91, 53, 78, 36,127, + 93, 64,230,177,170, 83,149,108,187, 78,173,211, 13,234, 63, 96,216,239,251,246,237,181,152,191, 96, 1,174,134,133, 35, 35, 59, + 31, 28, 79,129, 35, 8,204,157, 59, 31,206, 14,118,200, 77,122,172,210,234,245,253, 81, 54,135,214,191,190,220, 9,130,156,124, +238,196,142,181, 36, 1,174, 32,229,145,148,202,139,149,143, 24,218,159, 30, 52,104, 16,142, 28, 57,130,136,136,136, 77,149,152, +172, 18, 77,158, 39, 39,135, 95,220,191,150, 0, 56,117,218, 35, 41,157,255, 76, 62,242,195,254,244,208,161, 67,113, 52,228, 26, +246,157,124,182,113,223, 73,156,196,219,141,233,153,225, 45,105, 68, 4, 54,244,118,235,208,172,145,140,102,213, 72,136,138, 69, +102,129, 6,231, 30,190,200, 38,121,178,218,185,117, 10, 47,144, 98,188,124,249,184,156, 59, 43, 89, 81,133,174, 49, 73,147, 36, +201, 50,209,172,154, 68,178, 74,175,167,147,147, 83,153,199,185,148,174,184,139,251, 0, 85, 35,181,195,172,151, 47, 95, 90,189, +124,249, 18, 60,207, 35, 44, 44,204,170,117,235,214,179,106, 18,205,154, 62,125,122, 73,212,234,213,121,121,159, 85, 69, 81,167, +244, 53, 6,131,225,224,140, 25, 51, 38,181,110,221,186,251,130, 5, 11, 8,152,240, 0,222, 87,162, 57, 12,199,113,184,112,225, + 2,142, 28, 57,194,234,245,250,241, 74,165, 50,188,212, 34, 63,220,185,115,231,220,128, 1, 3,118, 60,122,244,136,138,140,140, + 4,207, 87, 61,238, 84,173, 86,195,199,199, 7, 12,195, 96,217, 36, 15,228,229, 53, 6,195, 48, 96, 89, 22,230,230,230, 37, 81, +188,210,230,185,170,227,136,101,217,215,140, 86, 88, 88, 24, 40,138, 66, 96, 96, 32,238,222,189, 91, 18,209,170, 42, 2,165,215, +235, 95, 58, 57, 57, 57, 45, 90,180,168,100,189,210,210,210,112,246,236, 89,180,105,219, 14, 13,199, 79, 64, 82, 82, 18, 86,175, + 94, 13, 87, 87, 87, 44, 94,188, 24,153,153,153, 96, 24,230,175, 14,167,247,140,140,140,116,255,240,195, 15, 83,195,195,195,221, + 67, 66, 66,108,130,130,130,204,135, 13, 27,150, 26, 30, 30,238, 78, 16, 68, 59,152,216, 9,154,227,184,217,115,231,206, 61,189, +120,241,226, 89,159,125,246, 89,235, 81,163, 70,137, 68, 34, 17,151,152,152,200,236,221,187,151,240,241,241, 33,197, 98, 49,113, +230,204, 25,238,230,205,155, 55, 24,134, 89, 6,224,178, 41, 17,231,210, 38,139,162, 40, 99, 77, 86, 25,166, 58, 74, 71, 90,146, +105,129,235, 54, 44, 33,235,215,118,215,239,220,123, 54,254,242,245,199, 79, 41, 45, 51,245,231, 74, 82, 3,188,205, 80, 20,117, +192,207,207,111,244,228,201,147,205,122,244,232, 33, 93,184,112, 97, 78, 94, 94, 94, 69, 38,171,156, 27,230,191,100,212,225, 79, +179,191, 8,153,250,121,227,209,222, 31, 59,215, 66,104, 65, 42,178,104,138,180,178, 33,209,204,139, 66, 94,250, 19,197,201,223, +183, 63, 7, 80, 85, 94,182, 91,119, 30, 68,116,109,212,184,233,225,101,139,151, 57,206,155, 57, 67,116, 56,228, 55,240,140, 30, + 97, 23, 47,194, 66,204,242, 81,119, 66, 83,180,122, 93, 63,188,133,143,224, 81, 94,253,113, 31,128,227,118,118,118,247,199,140, + 26,229,227,231, 55, 12,114,185, 28,135, 14, 29,194,174, 31,126, 96,215, 0,131,165,192,221,224, 42,242,233,165,222, 40,209,185, + 55,110,204, 24,223,102,205, 62,134, 92, 46,199,193,131, 7,177, 99,205, 26,163,117,254,229, 20,103,134, 63,133,255,103,136,175, +162,143, 22, 73,228,221,120,252, 34, 63,236,241,139,124,112, 60,207,241,188,150, 36, 17, 95,160,215, 47,126,252, 44,177, 90,166, +160,184,233,240,219,239, 38,191,185, 54,143, 82,230,167,186, 67,186,203, 49, 89, 9,165,159,145, 86,186,146,174,232,181,193, 96, + 72, 48, 82,126,169,167,167,231,107,159, 85, 63,244,203,155,100,178,140,205,163, 5, 0, 25, 25, 25, 74, 0,243,174, 95,191,190, +167,123,247,238,227, 0, 36, 86,179,140,182,116,236,216,113, 60, 0,138, 32,136, 77, 73, 73, 73,225,175,157,240, 74,101,140,171, +171,235,138,218,181,107, 79, 40,188, 49, 37,182, 84, 81,145, 63,107,220,184,177,190,188,178,168,232, 61,199,113, 85,150, 81,118, +118, 54, 90,181,106,245,218, 51, 45,121,158,199,139, 23, 47,138, 35, 78, 37,251,190, 50, 3,151,159,159, 63,225,211, 79, 63,221, + 44, 18,137, 60, 1, 16,197, 38,151,101, 89,234,199, 31,127,148,177, 44, 75, 1, 32, 72,146,100, 68, 34,145,230,200,145, 35, 12, +195, 48, 47,181, 90,237,132,191,248, 2,113,144, 40,124, 20, 67, 65,100,100,100,253,162, 72, 86, 66, 68, 68,196,189,125,251,246, + 41, 0,236,175,166,238,101,149, 74,117,121,201,146, 37, 29, 54,108,216, 48,123,194,132, 9,173,134, 14, 29, 74,119,234,212, 9, +167, 78,157, 98, 47, 92,184, 16,166, 86,171,151,154, 98,176,138,202, 50,199,195,195,163,196,112, 85,113, 46, 87,218,145,215,222, + 75,186,110,248, 68, 87,217,150,165,103,243,211,147,116,215, 12,249,186, 57,219,129, 8,252,135, 73, 73, 73,249, 2,192,252,213, +171, 87, 39, 5, 4, 4, 72,197, 98,177,206, 88,147,245, 23,194,112,217,249,189,190,239, 54,240,120,199,185,159,214,238,214, 57, + 80,238, 81,203,209, 45, 42, 54, 5, 79,174,159, 42,184,127,242,187, 56, 94,155,213, 23,128, 49, 61,215,111,106,245,250,122,211, +103, 76,159, 36, 17,137,186,179, 44,219,164,203,185, 99, 60, 69, 81,225, 58,131,225, 92, 81,115,161,230, 45, 46,242,111, 87,172, + 88,225,227,231,231,135, 67,135, 14,225,220,238,221, 24,146,158,142,243, 20, 69,145, 98,177,253, 73,189,126, 37,140, 51, 72,223, +174, 90,181,202,215,223,223, 31, 7, 14, 28,192,153, 29, 59, 48,184,122, 58, 21,213,117, 45, 1, 40,138,222,166, 3,120, 4,160, + 57, 0, 51, 0, 90, 20, 62,218,201,161,116, 21, 86,244, 93,241,247,151, 8,130,248, 51, 59,194, 86,157, 25,254, 85, 34,158,196, + 53,127,211,107,161, 86,171, 51,125,124,124, 76, 26,115,109, 48, 24, 42,109,195,101, 24, 38,193,219,219,219,232,168,133, 49,166, + 40, 51, 51,179,197,159, 88, 24, 53,234,139, 85,166, 18,225,184, 56, 23, 23, 23,174,184,210, 47,207,132,149,247, 25, 15, 60, 55, +229,127,146,147,147, 31, 1,248,188,186,235,153,148,148,116, 24, 70, 60, 52,218,216,229, 0, 32, 43, 43,235,141, 63,204,151,224, +249,196,133, 11, 23,154,100,176,193,243,149,153,207,240,252,252,252,214,198,252,183, 94,175,199,223,200,129,162,137,140,136,136, + 24, 71, 16, 68, 15, 20, 54, 9,108,194,155,201,230,125, 57, 55, 55,247,242,242,229,203, 59,108,217,178,101, 42,207,243,200,205, +205, 93, 99,170,193, 42,185,123, 78, 77, 61,245,166, 54, 60, 51, 69,247,199,222, 77, 9,239,170,179,245, 83,183,230,235,118, 64, +160, 36, 24,197,243,252, 47, 35, 70,140,104, 3, 96,123, 77,197, 42, 24,117, 88, 83,158,115, 89, 57, 1,231,167,127, 51,230,188, +141,101,111,176,116,125,232,200,147,208,101,156, 2,240, 51,140,235,230, 80,178,189, 12,199,173, 98,116,186, 85,165, 42,151,255, + 66, 57,219,249,251,251, 79, 29, 61,122, 52,230,207,159,143, 51, 43, 87,234, 39, 18, 68,142, 8,224, 79, 23,222,104,146, 4, 48, +211, 88,157,145, 35, 71, 98,254,252,249,248,117,217,178,234,234, 84,134,130, 32,136, 16, 0,152, 53,107,214,156, 37, 75,150,216, +206,158, 61,187,201,210,165, 75, 23, 23,189,127, 88,252,125, 81, 93, 23, 52,123,246,236, 70,165,190,207, 3,112,235, 79,222,159, +229,102,134,255,179,233, 42,104, 10,154,130,166,160, 41,104, 10,154,130,166,160, 89, 19,120,158,239, 93, 56,171,120, 94,209,235, + 82,243,191, 5, 26, 2, 2, 2, 2, 2, 2, 2, 2,255, 66, 74, 71,177,170,243,253, 27,164,184,143, 86,105,182, 0,133,195,186, + 43,114,165,166,140,122,168,142,179, 13, 21, 52, 5, 77, 65, 83,208, 20, 52, 5, 77, 65,243, 63,167, 89,149,246,107,191,231,121, +190, 55, 65, 16, 33, 60,207, 7, 85, 52, 47, 54, 86,175,190, 46, 53,127, 99,221, 14,202,161,184,111,214,107,125,180,254,108,132, +176,170,160, 41,104, 10,154,130,166,160, 41,104, 10,154, 53,162,184, 9, 16, 0, 63,107,214,172,217,255,192,166, 67,151, 34,147, + 85,122, 2, 80, 73,211, 33,207, 31,164, 18, 19, 97, 37,145,200,197, 0,160,211,169,244,110,110,200, 37,136, 65,127,231, 3,111, + 5,254,157, 20, 15,247, 78,121,195,203, 10, 8, 8, 8, 8,252, 55, 72, 43,142, 84, 1, 72, 3, 64, 20,189,215, 21,205,211,138, + 12,217,171,175,203,124,255, 39,162, 68, 5,145, 44,186, 34,147,149,158, 46,119,160,233, 44, 95,150,213, 52, 0, 0,154, 38,163, +211,211,109, 99,120,254, 96,122,117,204,150,131,163,227, 29, 17, 69,185, 25,179,172,129,101, 19,211, 83, 82,202,166,142, 39,136, +183,193,224, 25,107, 34,106, 98, 54,254,116,163,226,224,224,224,228,228,228,244,190,149,149, 85,219,236,236,236,155,105,105,105, + 71, 43,121,238,225, 18,130,192,140,194,227, 10,203, 1,204,174, 68,218,148,101, 95,197, 71, 46,151, 79, 34, 8,194,191,232, 4, +139, 80,169, 84, 27, 0, 60,254, 15, 94,144,204, 0,244,163,105,122,164,131,131, 67,171,228,228,228,133, 0,170,155,205,155, 6, + 48,221,198,198,102,136,141,141,141,119,102,102,230,211,220,220,220, 3, 0, 86, 1,168,114,168,244,194,207, 92,218,118,234,209, +105,222,133, 51, 23,190, 93,248,131,242,250,107,223, 79,119,177,239,222,173,253,252, 11, 39,175, 45,154,179, 62, 41,211,196,117, + 35,139, 38,160,112,116, 36,143,215,147,189,214, 20, 17,128, 62, 0, 58, 1,184, 0,224,164, 49,219, 93, 1,109, 0,204, 41, 90, +231, 85, 0,206,255,195,143, 35,115, 39, 39,167,101, 0,250,208, 52, 29,153,152,152, 56, 30, 64,194,223,188, 78, 52,128,150, 0, +252, 81,152,134,227, 22,140, 75,225, 80, 37,246,246,246, 65, 52, 77, 79, 42, 74,237,178, 33, 35, 35, 35,228,159, 90, 48, 18,137, +100,141,179,179,243,199,106,181, 90, 69, 16, 4, 95, 58,223, 35,195, 48, 9,233,233,233, 45,222,182,139, 26, 65, 16,183,254,225, +171, 56,190,156,207, 42,206,163,149,152, 8, 43,154,206,242, 77, 77, 14, 31,146,164,124, 48, 24, 0, 92, 93,154, 28,112,116,110, +188, 63, 49, 81,162,119,174,223,223, 66, 36,167, 55, 80,148,168,169, 70,167,117, 16,209,162,116, 61, 99,184, 71,234,248, 73,201, +143,142,150,155,108, 81, 68, 81,110,113, 49,231, 29, 25,125, 38, 68, 50, 87,136,204, 60, 43, 92, 91, 87, 87,215,106,109,165,173, +173,183,165, 94, 42,155, 42, 18, 81,221, 56,158,241,231, 57,128, 36, 68, 17, 12,107,248, 93,172,213,126,159,149,245, 52,175,186, +123,176,190, 61,156,121, 96, 40, 8,116, 3,143,115, 4,176,239, 81, 6,146, 77,144, 48,214, 68,212,196,108,148,254,237,106, 0, + 95,188,233, 35,201,205,205,205, 54, 40, 40,104,205, 55,223,124, 99,102, 97, 97, 65,188,124,249,178,199,204,153, 51,223,185,125, +251,246,231,137,137,137, 73,175,154, 62,130,192, 12,142,227, 73, 0, 32, 73, 98,166, 66,225, 40,167, 40,234,181,220, 70, 44,203, +202,211,210, 82, 39,115, 28, 79, 20, 45, 59,131,231,177,214, 24,195, 40,147,201,134,249, 55,110,250,249,178, 21,171, 44,156, 28, + 29,205, 25,150,211, 63,127, 17, 39,159, 55,235,139,214,177, 79, 30,175,213,104, 52,123,171,115, 94, 83, 20, 53, 68, 42,149, 6, + 1,240, 43,250, 44, 74,171,213,134,176, 44,187,223,216, 10,221,201,201,233, 18, 69, 81,181, 76,249, 99,150,101, 95,166,164,164, + 4, 86,179,136, 6,121,122,122,254,220,177, 99, 71,121,171, 86,173, 32,145, 72, 48,127,254,252,233, 74,165,178, 42,163, 69, 3, +152, 46,151,203,135,152,155,155,123,231,231,231,199,170,213,234,195, 18,137,164,235,218,181,107, 61,218,183,111,111,153,146,146, + 66, 80, 20,229,244,235,175,191,126,180,102,205,154, 30, 12,195,116,169,170,146,203,137,229,231, 73,251,248,117,200,137, 61, 63, + 15, 64,207, 87,191,103, 52,178,145, 60,229, 17,164,230,239,198, 23,153, 15,163, 77,150, 72, 36, 90,235,236,236, 60, 90, 83,152, + 43,128,127,181,194, 1, 0,157, 78,151,149,157,157, 93,191, 58,167, 60,128,177, 54, 54, 54,163,191,252,242, 75,219,158, 61,123, + 98,247,238,221,159,108,221,186, 53, 43, 55, 55,247, 23, 20, 38,194,124,100,162,230,140,228,228,228, 94, 34,145,136,240,240,240, +160,212,106,181, 41, 70,203, 23,133, 15, 97,190, 5, 96, 3, 10, 83, 23,116, 6, 10,207,119, 0,203,139,141, 27, 73,146, 27,234, +215,175,255,126, 84, 84,212, 70, 0,223, 86,247, 92,119,118,118,222,188,126,253,250,193,125,251,246,165,210,210,210,220, 2, 2, + 2,246, 36, 39, 39,119,120, 3,151,145, 49, 82,169,116, 90,147, 38, 77, 26, 62,122,244, 40, 38, 55, 55,119, 85,209,254,172,236, +156,114, 7,208,213,198,198,166,203,220,185,115, 45,130,130,130,176,101,203,150, 94, 91,183,110,205,207,203,203,251, 29,133,125, +122,106,100, 2,105,154,158,148,144,144,224,192,243, 60, 92, 92, 92, 38, 1,248, 71, 26, 45,146, 36,215, 14, 24, 48, 96,244,158, + 61,123,228,113,113,113,114, 55, 55,183,146,228,217, 4, 65, 84,187,254, 20,168, 49, 91, 74, 25,174,170,243,104, 73, 36,114, 49, +203,106, 26, 36, 41, 31, 12,126,167,227,143,214, 0,112,233,226,167,131, 29,157, 27, 69, 72, 36,242, 24,169,149,236,200,128, 62, + 93,155, 14, 12,234, 72,184,187, 56, 34, 65,153,234,244,211,190, 51,239,133,156, 57,127, 4,133, 9,196,202,133,209,103,194, 76, + 31,138, 71, 87,126,128, 67,167, 36,172,251, 53, 1,215,239, 63,135, 42, 39, 29,181,156,205,176, 98,106,119, 56,219,202,171,119, +235,229,232,211,153,161,165,251, 63, 28, 54,194,250,253,126,126, 34, 47,103,103,240,188, 20, 49,177,249,237,126, 59,123,190,229, +225,131,123, 39,153,139,124,134, 20,164, 62, 54,250,226,214,204, 5,102, 5,122,244,163, 41,226,163,246, 45, 26,118, 25,214,171, + 3,217,208,175, 30, 34, 31, 70,117, 63,254, 71,216, 10,242,218,195,223, 25,150,223,105, 46,198,177,187,202, 74, 19,250,189,102, + 56,186,116,233,218, 65, 42,149,150, 73,158,164,213,106,197,191,255, 30,218,166, 58,102,163,248, 63,116, 58, 45, 41, 18, 73, 64, +146,196,231,254,254,141,253,210,211,211,207, 19, 4,241,115, 82,146,105,209,130, 79, 1, 73, 22, 77, 55, 39,165, 82, 23, 86,167, +179, 7, 0, 66, 34,201,122, 78,146,141,231,206,153, 99, 65, 81, 20,151,145,145, 1,149, 74, 69,140, 27, 55, 78, 22, 27, 27, 59, + 32, 49, 49,241,135, 42,238, 72,176,117,235, 86, 95, 23, 23,151,215,158, 30,171, 84, 42, 37,125,251,190, 95,157,162,247,109, 18, +208,108,218,153, 51,167,253,114, 51,179, 52, 91, 87,111,190, 99,144,201,181,117,252,234,139, 54,108,217, 97, 61,126,244,240, 79, +163,163, 31,222,131,105,207,171,243, 52, 51, 51, 59,178,114,229, 74,255,206,157, 59,139, 28, 29, 29,145,146,146,130,168,168, 40, +255, 63,254,248,163,223,142, 29, 59,166,171,213,234, 1,128, 81, 15, 68,245,249,125,231,207,142,230,118,246, 96, 13, 6,184, 54, +105, 86,146,223,236,201, 31,103,193,232,245,224, 12, 6,248, 5,245, 43,138, 38,243,240,243,243,171,110,214, 93,215, 70,141, 26, +237, 90,188,120,177, 88,171,213, 34, 44, 44, 12,231,207,159,231,148, 74,101, 85, 9,113,105,130, 32,206, 46, 88,176,192, 61, 48, + 48,208, 50, 61, 61, 29, 44,203, 58, 28, 59,118,108, 82,211,166, 77, 49,184,186, 36, 0, 0, 32, 0, 73, 68, 65, 84,173, 60, 60, + 60, 36, 59,119,238, 68,126,126, 62, 24,134,177,243,246,246,182, 27, 54,108,152,110,231,206,157,211, 1, 44,171, 40,146,149, 27, +203,207, 83, 18,222,239,213,111, 62, 18,201,196,233,247,166,189,135,223,172,234, 18, 37,145,173,247,188,189, 45,115, 19,229, 51, + 45,172, 26,219,229, 38,134,206,124,207,219,123,235,233,167, 70,221, 12,145, 69,149,205,135,251,246,237,147, 71, 69, 69,201,253, +252,252,192,113, 92, 73, 6,254,226,132,179, 62, 62, 62,213,217,143, 75,131,131,131,103, 14, 30, 60, 24, 77,154, 52, 41, 73,138, +250,213, 87, 95, 97,230,204,153,182,151, 46, 93,154,190,119,239,222,233, 71,143, 30, 93, 6, 96,150,137,209,152, 98, 76, 45,227, +175,159, 61,123, 54,232,200,145, 35,195,103,204,152,225, 3, 96, 50,128,249, 25, 25, 25, 29,139,162, 49,146, 34,163, 53,102,250, +244,233, 19,103,205,154,133, 94,189,122,205, 15, 11, 11,251,174,154, 81, 62,138, 97,152, 94,125,251,246,165, 12, 6, 3,204,205, +205, 97, 48, 24,234,214, 52, 40, 1, 96,253,132, 9, 19, 38, 6, 7, 7,195,214,214, 22, 6,131,193,119,223,190,125, 91,231,207, +159,223, 22,192,216, 10,214,117,228,196,137, 19, 63, 24, 49, 98, 4, 90,180,104, 1,154, 46,220,141, 43, 87,174,196,162, 69,139, + 44,206,158, 61,219,111,231,206,157,253,142, 31, 63,126, 24,101, 31,219,101, 18, 28,199,129,166,105,196,199,199,195,209,209, 81, +202,113,220, 25,130, 32,182,100,102,102, 30,253, 7, 85,230,203, 7, 13, 26,244,225,158, 61,123, 44, 0, 96,197,138, 21,152, 54, +109, 26,156,156,156, 96, 97, 97, 33, 88,157,127, 78, 68,107,124,149, 17,173,170, 80,169, 84,205,102,127,246, 17, 72,178,240,174, +177, 94, 29, 79, 44,153, 51,158, 56, 30,114,166, 89,165, 49,120,153, 43, 30, 93,249, 1, 82,143,169,208, 26, 24,220,184,255, 12, +231, 86,244, 40,172, 45,123,206,133, 86,223,165,184,178,177,147,152,153, 45,215,177,236, 85, 56, 59,135,225,197,139,180,170, 76, +150,194,217, 41,100,211,166,101,102,254,117,235, 67,207, 24,144,152,154, 8,130,144,194,221,205, 18, 99, 70,246, 20,117,236,232, +234,240,245,215,155, 79, 37,115,232,175, 74,127, 92,101,194, 80, 95, 7,108,111,230,239, 51,120, 88,239, 64,105, 99,255, 70, 16, + 75,205, 74,190,107,222,162, 5,154,183,104, 65,206,202,207,235,118,243,214,157,110,135,206,222,208,170, 12, 47, 14,196,164, 99, + 84, 21, 23,153, 18,195, 49,101,202, 20, 56, 57, 57,149, 89, 32, 37, 37, 5,127,252,241,123,185,191, 49,225, 66, 86,242, 31,223, +125,247,157,101, 86, 86, 86,207,109,219,182,189,203,113,220,119,201,201,201, 87,140, 17, 25, 1,212,202,145, 74,187,140, 94,181, +138,107,250,254,251,148,141,179, 51,201,177, 44,145,244,244,169,253,234, 31,126,232,148,249,228,137, 89,129,157, 93,102,150, 90, +173,138,137,137,129, 76, 38, 35,104,154,110, 89,142, 84, 10,207, 99, 57, 73, 18, 51, 9,130,128, 84, 42,139, 9, 14, 14,190, 91, +244, 93,173,147, 39, 79,202,251,244,233,163, 2, 16, 7, 0, 82,169,204,141,162, 72,223,194, 76,236, 88,110,140,193, 52, 55, 55, +255,236,219,197,203,204,115, 51,179,213,250,130, 2,131,194,202,130, 32, 44, 44,169,220,156,188,188, 68,101,154,118,238,194, 69, +212,132, 49, 35, 62, 43, 40, 40,152,100,172,201, 10, 8, 8,184,121,228,200, 17, 71,123,123,123,100,103,103, 35, 35, 35, 3, 55, +111,222, 4,199,113, 24, 48, 96,128,180, 93,235, 86,205,230,204,157,119, 61, 62, 49,177,173, 49,102,203,220,206, 1, 43, 2,155, + 22, 86,214,113, 25, 37,229,179,101, 80, 80,201, 50,139, 18,114,138,163,115, 53,121,132, 84,219, 46, 93,186,136, 1, 96,236,216, +177,185,121,121,121, 75, 0,236, 65,213, 25,253,167,207,155, 55,207,173, 78,157, 58, 94,123,246,236, 65,126,126, 62, 0, 56,214, +169, 83, 7,190,190,190,236,133, 11, 23,224,235,235, 11, 75, 75, 75, 92,186,116, 9,215,175, 95, 71,139, 22, 45, 44,197, 98,241, + 96,189, 94, 95,174,209,234,212,163,211, 60,105, 31,191, 14,245,155,143,132,133,149, 11,182,238,221,143, 71,119,118,116,208,234, +163,230,137,217,139, 35,212,188,116, 84,218, 75,139, 89,181, 90,116,180,175,215,232,125,120, 53,191,235,160, 97, 47, 63,155,215, +173,206, 82, 90,166,217,177,112,149, 50,163, 34,147, 5, 96,197,128, 1, 3, 6,237,219,183,207, 6, 0,194,195,195,145,146,146, + 2,133, 66, 1,153, 76, 6,145, 72, 84,242,124,210,106, 50,106,195,134, 13, 37,166,141, 97,152,146,167, 0,200,229,114,188,243, +206, 59,104,218,180, 41,142, 30, 61, 58,170, 2,163, 21,216,186,117,235,221, 94, 94, 94, 30,165, 63, 44, 40, 40,192,208,161, 67, + 1, 0, 29, 59,118,236, 98,102,102,198, 23, 27, 66,165, 82,153,127,235,214,173,110, 0,194, 42,112,150,234,196,196, 68,124,249, +229,151,120,254,252,249, 39,155, 54,109,122, 1, 64, 38,145, 72, 74,238,143, 1,248, 54,106,212,104,237,180,105,211, 16, 27, 27, +139,200,200,200,155,168,126, 83, 42,107,110,110,254,196, 96, 48,180, 96, 24, 6,106,181, 26,253,251,247,151, 29, 62,124, 56,133, +162,168,232,244,244,244,225, 40,236,147, 98, 44, 50, 0,171,130,131,131, 39,206,152, 49, 3,191,255,254, 59,142, 31, 63,142, 17, + 35, 70, 96,234,212,169,176,176,176, 24, 61,117,234,212,235, 40,124,160,249,171,116,217,176, 97, 3, 88,150,125,237,220,144,201, +100, 8, 12, 12, 68,195,134, 13,113,252,248,241, 46, 53, 48, 90, 94,129,129,129, 18,142,227, 80, 80, 80,128, 11, 23, 46, 88,152, +153,153, 89,184,187,187,143, 3,240,143, 49, 90, 94, 94, 94,193,251,246,237,179, 40,221,250, 35,149, 74, 81,234, 56, 16,248,251, + 35, 90,149,222, 97,149,160,211,169,244, 52, 77, 70,187,186, 52, 57,112,233,226,167, 37, 77,135, 0, 25,173,211,169,244, 0,192, +114, 60,114, 85, 12,204,164, 36,226,146,243,240,240,105,122,121, 82,101,134,104,138,204, 60, 33,109, 21, 7,158,231,161,211,179, +208,230, 36, 99,201, 41, 21,162, 18, 52,208, 21,100, 65,167, 47,236,134,229,224,224, 64,159, 57,243,219,180,208,208, 63, 38,254, +242,203, 47, 84,130,181,117,100, 30,208,172, 60, 77, 91, 91,111, 75, 78, 34, 57,176,113,211,124, 51,158,122,138,152,151, 5,168, +231,222, 10, 14, 54, 30, 72, 78, 47,192,213,200, 95, 17,253, 56, 4,117, 92,188, 48,245,179,247,100,223, 46,222,179, 95,204,212, +246,204,206,126,158, 91,209,122, 22,223, 69,109, 62, 29, 3, 38,243, 41,216,140, 88,176,121, 73,175, 45, 96,161,240, 68,243,206, +110, 80,120,212,149,142,154,186,104, 36, 80,198,104,149,214, 76, 33, 8,114, 35, 73, 18, 19, 9,130, 64,147, 38, 1, 9,171, 86, +173, 42, 47, 21,184,190, 73,147,128, 4,138, 34,221, 11, 47,236,228, 6,158,231, 82,170, 88,207, 50,166, 70, 34,145,206, 40, 12, +251,187,196,159, 58,117, 74, 63,104,208, 32,172, 92,185, 82, 50,115,230,204,185, 20, 69,141, 45,167,121,175,140,102,127,192,211, +166,110,221,238,223, 93,189,202,139, 12, 6, 34,243,230,205,220,108,165,146, 73,206,203,147, 28,140,142,238,245,241, 23, 95, 72, + 60, 60, 60,112, 37, 36,196, 62,173,160,128,207,214,106,213,217,217,217, 60,195, 48, 55, 43,208,156,173, 80, 56,202,183,110,221, +234, 27, 28, 28,124, 87,169, 84,206, 6, 0, 23, 23,151, 37, 0, 26, 2,136, 43,245, 25, 54,109,218,159, 56,110,220,184,152,212, +212,212,217,149,173,103, 41, 26, 57, 42, 28,229,123, 55,239,124, 96,103,105, 70, 42,220, 93, 73,145,141, 13,205, 72,204,196, 28, +160,174,227, 81,215, 28, 64,163, 10,126,251,170, 38, 97,102,102,118,228,196,137, 19,142, 34,145, 8, 44,203, 66,161, 80,224,249, +243,231,200,206,206, 70, 94, 94, 30,158, 69, 71,161,182,135, 7,190,158, 53,211,101,242,204, 89, 71, 84, 42, 85,139,255,177,119, +221, 97, 77,100,237,247, 76, 18, 66, 32, 9, 77,186,160,136, 5,236,189,139, 34, 54,236,187,246,186,246,142,117, 45,168,107, 93, +235,170,107, 87,172,235, 98,239,174,172, 29, 21, 11,118,186, 8, 34, 32, 37, 32, 53,148,244,100, 50,247,247, 7,101, 17, 41, 1, +221,239,247,237,126, 57,207,147, 39,153,100,230,228,157,123,239,204, 61,243,222,123,223,183, 84,103,246,101, 2,100,141,250, 11, +207, 94, 89, 89, 12, 74, 15,123,233, 88,239, 37, 17,159,152,152, 8,161, 80,136,102,205,154, 9,159, 62,125,250,184, 2,145, 85, + 50, 9,240,200, 46, 93,186,152,156, 62,125, 26,109,219,182,133,153,153, 25, 30, 62,124,136,176,176, 48,168,213,106,150, 68, 34, +129, 80, 40,196,150, 45, 91, 80,187,118,109,228,231,231,227,227,199,143,150, 6, 6, 6, 86,165, 34,218, 23,115, 62,188,253,112, + 67,238,135, 7, 63,125,162,110,245, 61,114,230, 28,166,141, 25, 5, 59, 18,251,216,172, 62,181,161,207,160, 46,171, 9,187,214, + 64,129, 73, 11, 11,151,102,131,192, 53, 20,194,107,233,122, 68,135, 95,183,144,229,135,206,161,180, 73,181,214,238,184, 48,191, +140,115,167, 0,176,106,213,170, 53,245,194,133, 11, 38,197,174, 23, 54,187, 56,231, 97,201, 36,240, 21, 36,124,175,180, 60, 41, +138, 66,124,124, 60,108,108,108, 32, 20, 10,139, 19,136, 71, 70, 70,226,249,243,231, 40,202, 70, 81, 14,231,184,123,247,238,213, + 18, 8, 4,159,237, 64, 8, 65,102,102, 38,104,154, 6,159,207,135, 86,171,133, 90,173,134, 70,163,129, 66,161, 16, 54,105,210, +100,182, 70,163,121, 81, 22, 39,195, 48,139, 70,142, 28,217,229,197,139, 23,245,246,236,217, 3,149, 74,181,237,211,167, 79, 24, + 54,108, 24, 24,134, 65,207,158, 61, 59, 18, 66,162, 86,174, 92, 9, 0, 88,184,112,161, 70, 42,149,206,172,206,185, 23,162, 73, +155, 54,109,234,249,251,251,163,107,215,174, 80, 42,149,216,190,125,187,169,143,143,143,169,175,175,175,245,210,165, 75,143,103, +100,100,120, 86,194, 73, 1,216,102,103,103, 55,171,123,247,238,198,133, 57, 76,241,251,239,191, 99,221,186,117,103, 1,172,188, +121,243,230,154,107,215,174, 77,152, 58,117, 42,214,173, 91,183, 32, 39, 39,231,104,121,156,113,113,113,176,182,182,134,169,169, +105,193,205, 82,173, 70,112,112, 48,238,222,189,139, 70,141, 26,233,114, 78,229,217,233, 52,116,232,208,227,103,206,156, 49, 73, + 74, 74,194,163, 71,143,224,236,236, 12,153, 76,166, 75,110,216,123,127, 67,135, 93, 46,167, 92, 46, 87, 36, 38, 38, 10,183,110, +221, 10,123,123,123, 56, 57, 57,193,200,200, 8, 20, 69, 65,163,209, 84,148, 94,173, 82, 59,221,221,193,201, 20, 89,124,103,102, +110, 49,135, 16,194,201,205, 21, 31, 82, 35,231, 98,108, 44, 84,255,193,115,255, 39,163, 53,128, 32,124,158,243, 48,181, 88,104, +249,249,249,145,129, 3, 7, 82, 69,239, 14, 14,200,203,204,180,136,182,177,107,126,206,198,174,105, 97,222, 47,214, 59, 54,219, + 34,218,214, 86,150, 7, 0,106,154, 32,240, 93, 14, 66, 99, 62, 33, 44,230, 19, 4, 60,221,156, 47, 74, 53, 93, 48, 99,149, 16, + 40, 36,127, 61,180,170,101, 98, 40,213, 5,211, 61, 84, 74, 25,114, 51,222, 82, 35,134,244, 54,154, 53,107, 6,236,237, 29,172, +203,227, 83,243,140, 22,120, 45,236,111, 94,195,220, 0,126, 79,111,161, 99,163, 33, 48,226, 25, 32, 43, 87, 1, 80,192,251,216, +187, 0, 99,130,240,232, 68,116,104,202,135,103,159,198,194, 43, 23,163, 22, 3, 88,165,139,189,116,242, 75,112, 93,250,193, 64, +171,129, 38, 51, 10, 76, 78, 2, 32,176,131,156, 18, 34, 43, 53, 1,239, 30, 95,210,233,153,145, 97,152, 57, 86, 86, 86, 57, 43, + 87,174,236,222,160, 65, 3,245,236,217,179, 67, 18, 18, 18, 22,149,122, 90,249,245,192,129, 3,136,137,137, 17,109,220,184,241, + 97,102,102,230, 79, 85,172,104,111, 66,176,171,112, 40, 46,243,234,213,171,109, 2, 2, 2, 22,236,218,181,203,118,238,220,185, +134,115,231,206,157, 12,224,231,138,134, 11,243,120,188, 94, 27, 31, 61, 34,116,114,178,242,228,222,189,134,251, 3, 3, 87,170, + 25,166,166,149,141, 13,213,185, 67, 7, 41,159,197,202,204, 74, 75,163,173,235,213, 99,199,223,189,107, 73,140,141, 83,110,222, +188,153, 39,145, 72,202, 77,157,195,102,179,101,101, 13, 23,150, 5,123,123,123, 85, 89,115,184, 42,232, 16,243, 24, 66,212,230, +117,235,146, 62, 61, 59, 53,136,137,138,141, 53, 50, 55,103,187, 52,112,110, 24,241, 46,254, 37,209,106, 21, 20, 69,229,233, 52, + 86,194,102,143,218,181,107, 87,115, 83, 83, 83, 48, 12, 3, 51, 51, 51,100,100,100, 64,165, 82, 33, 47, 47, 15,170,252, 92,168, +114,115, 17,150, 16,143, 46,221,187, 99, 68,223, 62,141,125,175,254, 49, 74,171,213,158,173,112, 60,175, 69,235, 98, 79,214,250, + 58,150,127,141, 5, 37,229, 20,139,174,173,173, 93,192, 21, 10,209,123,145,247,215, 92,232, 65,127,254,249,231,141,161, 67,135, +246, 95,188,120, 49, 43, 53, 53,245, 86,124,124,124, 23, 0,111, 43, 58, 72, 40, 20,214,207,204,204,132, 68, 34,129,153,153, 25, +118,237,218, 5, 91, 91, 91,200,100, 50,188,122,245,138, 56, 58, 58, 82, 15, 31, 62,132,163,163, 35,178,178,178,160, 86,171, 33, +151,203, 63,169, 84,170,114,135,203, 11,135, 7,251, 45,236,139,155, 81,111,126,239,234, 64,197,189, 26,249,163,123, 76, 84,216, +187,196, 59,119,159,254, 76, 43,140,146,114,146,239, 45,171,219, 46,200,106,206,146,117,216,183,109, 13,162, 94, 60,202,182,173, +157,183,223,152, 82,158,168,200, 94,169, 84,170,120,247,238,157, 73, 72, 72, 8, 40,138,130,153,153, 25,248,124,126,153, 98,171, + 26, 96,149,244, 64, 73,165, 82,112,185, 92, 88, 90, 90,226,232,209,163,197, 29,175,179,179,115, 69, 28,135,122,247,238, 61,170, +118,237,218, 38, 37,191,108,215,174, 29,102,204,152,129,131, 7, 15, 34, 48, 48,240,179,124,154,159, 62,125, 74,213,104, 52, 21, +157,119, 78, 90, 90, 90,223, 33, 67,134,188,121,252,248,177,233,209,163, 71, 65,211,116,153,175, 35, 71,142,224,249,243,231,171, + 0,188,171,102, 59,106, 52,108,216,176, 71,167, 78,157, 50,207,200,200, 64, 81,219,144, 74,165,208,106,181,104,216,176, 33, 69, +211,116,101,243,222, 88,108, 54,251,234,222,189,123, 7, 77,155, 54, 13, 28, 14, 7, 42,149, 10,123,247,238,197,178,101,203,210, + 10, 31, 74,213, 0, 86,158, 56,113, 98,194,224,193,131,209,178,101,203,198, 15, 30,148, 63,179, 67, 34,145, 64, 34,145,192,192, +192, 0,118,118,118,216,176, 97, 3, 84,170,130,219,138,171,171,107,241,101, 12,224,144,171,171,235,160,232,232,232,237, 40,152, +187,246, 5,236,236,236,134, 16, 66,166,107,181,218,252,174, 93,187, 90,158, 57,115,198, 68, 36, 18,225,205,155, 55, 88,181,106, +149,152, 97, 24, 45,195, 48,148, 92, 46,143,179,177,177,121,195,227,241,140,101, 50, 89,118, 86, 86,214, 38, 0,183,254,191,122, +114,138,162, 40, 3, 3, 3, 76,153, 50, 5, 28, 14, 7,198,198,198, 80, 40, 20,208,104, 52,197, 98, 30, 85, 28,150,110,208, 64, +104,201, 1,119,154,133, 73,147, 5, 35,230, 15,180,182,175,233, 0,115, 83, 30, 34, 35,223,118,185,239,127,119,175, 33, 39,202, +135, 81,105,124,162, 62,230,254,237,201,238, 75,107,145,127,168,208,250, 34,231, 33,167,236,202, 28,161, 37,228, 66,166, 72,100, +168, 54, 52,228, 71, 23,121,185,108,109,101,121, 20, 53, 66,107,221,244, 59,208,106, 77,225,141,130, 20,190,116, 20, 90, 26, 45, + 98,162,194,241,248,206, 31,176,146,137,144, 25,215, 10,224, 54,135, 74,158, 11,133, 74, 93, 40, 74,180, 8,121,227,143,188,220, +108, 52,107, 59, 16, 96,177,158,151,199,103,102, 73, 13,236,220,166, 5, 59, 38, 49, 28,237, 92,135,163,158, 99, 87, 36,164,230, + 33, 71,162,132, 56, 79,129, 86,205,188,145, 33,150, 35, 79,166,192,219, 24, 95, 56,212,172,199,162, 56,177, 61,117, 21, 90,202, +183,151,161,124,119, 13, 92,167, 46, 48,108, 56, 24,108, 39, 55, 36,134, 62, 64,200,205,157, 72,142,120, 2,194,104, 97,239,218, + 94,215,139,100,239,173, 91,183,218,119,233,210,133,211,171, 87,175,150, 55,110,220,104,153,154,154, 26, 82, 40, 48, 90,246,234, +213,171,165,181,181, 53,118,239,222, 45,167, 40,106,111, 53, 43,187,216, 3,150,158,158,254, 18,192,198,203,151, 47,239,157, 49, + 99, 6,108,108,108,154,167,164,164,148,123, 96,134,129, 65,203,137,155, 54, 17, 3, 54,155,156,221,183,143,187,238,214,173, 29, +191,157, 56,193,237,225,225, 65, 17, 66, 16, 28, 28,204,223,186,111, 31,127,236,119,223,125, 76, 72, 79,167, 3, 2, 3,213,169, +201,201,249,233, 82,233,186,212,212,212, 79,255, 31, 45, 91,163,209, 60,139,139,143,115,104,219,161,149,117, 80,100, 92,132,103, +143,206,157, 89, 44, 22, 43, 42, 54, 33,208,218,218,148,127,247,206, 93,181, 70,163,121,166, 11, 23,143,199, 27,216,163, 71, 15, +142, 88, 44, 70,205,154, 53,145,145,145, 1,145, 72, 84,224,113,200, 21, 67,157,155, 11, 77, 94, 14,180, 82, 9,226, 94,189, 68, +171,122,117,121, 23,120,188,129, 50,153,172, 66,161, 85,244,148, 89, 86,162,235,162,239, 12, 77, 76, 96, 40, 20,130,170,250,176, +225,119,230,230,230,203,114,114,114,110, 0,216,160, 86,171,189,150, 45, 91,214,110,207,158, 61, 86, 27, 55,110, 52,157, 62,125, +250, 5,137, 68,210, 10, 5, 73, 85,203,235,192, 62,208, 52,109, 9,192,214,223,223, 31, 54, 54, 54,200,205,205, 45,242,180,168, +100, 50,153, 81, 86, 86, 22,148, 74, 37, 84, 42, 21, 76, 77, 77,241,250,245,235,108,154,166,175, 87,102,156,105,125,106,131, 82, + 29,249,147,101, 99, 65,138,154,182,112, 79,207,102,196,107,119,164,174, 7,176,163,111,189,122, 71,212,204,163,184,247,225,215, + 45,226, 95, 61,204, 78,121, 47,173,119,244, 70, 92, 69,115,180, 8, 0,134,162, 40,226,234,234,138,140,140, 12,176,217,108,240, +249,124, 8,133, 66, 44, 95,190, 28,123,247,238,173,142,208, 50, 18, 8, 4,155, 88, 44,214, 40, 22,139,101,173,213,106,225,237, +237,141, 65,131, 6,193,208,208, 16,106,181,186,216,163, 89,228,165,170,196,211, 17,252,252,249,115,211,231,207, 63,187,109,121, + 88, 89, 89,221, 87, 42,149,136,141,141,197,213,171, 87,187, 3, 8,168, 98, 93,199, 6, 7, 7,247,117,115,115,251,189, 77,155, + 54,245, 9, 33,104,222,188, 57, 70,143, 30, 13, 95, 95, 95,132,132,132, 32, 55, 55,151,185,123,247,238,111, 0,182, 87,181, 15, + 47, 44,223,134,195,134, 13,123,114,250,244,105,139,172,172, 44,200,229,114, 72,165, 82, 92,184,112, 1, 93,186,116,129,149,149, + 21, 78,157, 58, 69, 19, 66, 42,170,123, 22,139,197, 58,234,227,227, 51,104,234,212,169,216,191,127, 63,206,158, 61,139,193,131, + 7, 99,212,168, 81,200,200,200,176,221,182,109,219,132,194, 97,194, 53,163, 71,143,134, 68, 34,193,171, 87,175, 34,117,188,230, +145,147,147,131,156,156, 28, 24, 27, 27,151,188,198, 40, 0,190, 59,119,238, 28,179, 96,193, 2,212,171, 87,111, 77, 92, 92,220, + 78,148,177, 74,148, 97,152,153, 34,145,200,130,195,225, 88,210, 52,141,164,164, 36,188,126,253, 26,115,230,204,201,206,206,206, +158, 1, 32, 1,192,202, 41, 83,166,108, 88,180,104, 81,113, 91, 90,180,104,145,223,141, 27, 55,250,254,167,189, 57,174,174,230, + 77, 13,217,188,249,226,124,182,165, 88, 44, 46,190,119,168, 84, 42, 40,149,202,207, 60, 89, 92,174,129,101,187, 86,181,255,148, +203,242, 87,188,125,159, 83,110,130,244,198,245,205, 90,240, 5,102, 11,186,116,237, 49,174, 79,223,239,217,180, 70,131,219,183, +175,227,216,177, 3,240,112,115, 69,189, 6,205, 49,119,222,124, 51,165,138,246,190,123,247,214, 50,243,231,143,111,229,231,229, + 44,175,136,243,127, 28,127, 22,138,171, 63,203, 28, 58, 44, 75, 65, 22,134,112, 16, 23,110, 90, 89, 88, 88,236,211,106,181, 30, +166,166,166, 96,114,162,241,246,245, 11,100,139, 13,160,148,107,193,144, 2,177,165,147,112, 81,170,240,232,246, 53,236,218,185, + 3, 89, 89, 89,112,235,214, 29, 18, 78, 45,212,174, 85, 27, 10,185,172,240,162, 1,212, 42, 13,172,109,157, 16, 20, 20,162,201, +147, 74,203,189, 33,113,141,212,141,107,219,186, 66,169,238, 4, 35, 67, 67,228,230,171, 32, 46, 20, 89,167, 46,142,132, 82, 38, + 7,173, 82,131, 86,105, 96, 93,123, 24, 26,217,246, 0,163,189,222,180, 74,197,199,104,161,142,127, 4,117,252, 35, 24,119,154, +135, 63, 54,143, 41,213,145,234,150,119, 55, 35, 35, 35, 61, 34, 34,226,122,112,112,240,144,145, 35, 71,226,193,131, 7,211, 1, +204, 42, 28,190,153, 62,114,228, 72, 4, 7, 7, 35, 34, 34,226,122, 70, 70, 70,250,183,168,121, 67, 67, 67,185, 82, 89,208,199, +242,249,124,163, 74,246,117,104, 55,116, 40, 43, 55, 40, 40,111,231,211,167,107,142, 28, 61,202,237,213,179, 39,165,161,105, 48, + 90, 45, 26,184,184, 80,125,250,244, 17,248,158, 63,111,201,214,104,158, 47,241,242,242, 63, 56,126,124,254, 75,169, 84,215,137, +230,117, 10,135, 12, 1,160, 78, 5,223,233, 12,165, 82,185,103,230,180, 73,189, 2, 30, 61,169, 85,187,150,131,233,237,187, 1, + 33, 60, 99, 67, 86, 61,231,250,108,113,110, 54,103,253,154, 21,198, 74,165, 82, 87,209,218,216,202,202, 10,159, 62,125, 66, 76, + 76, 12,148, 74, 37, 52, 26, 13, 24,153, 20, 42,113, 14, 84,185,217,160, 20,114,240,180, 90, 40, 50,211, 80,167, 94, 93,224,175, + 21,137,149, 14, 69,149, 37,180,138,222,141, 76, 77,193, 21, 8,193, 50, 48,208, 57, 57, 58,128, 54,237,219,183, 63,127,233,210, + 37,238,228,201,147, 59,220,187,119,111, 31,128, 4,145, 72,212,115,213,170, 85, 47,247,237,219,199,155, 49, 99, 70,195,237,219, +183, 79, 0,112,168, 60, 18,133, 66,113,254,207, 63,255, 28,235,228,228,100, 27, 22, 22, 6,133, 66, 1,134, 97,208,175, 95, 63, +160, 96,110, 13, 0, 32, 42, 42, 74,174, 80, 40,210,195,195,195,243, 18, 18, 18,212,208, 97,149,224,218, 61,169,207,242, 62, 61, + 26,106,107,231,240,220,200,184,142, 51,145, 4, 13, 89, 56,220, 97,219,206,139, 34,197,173,216,216,252,159,122,215,221, 34,205, + 15,157, 99,238, 40,217,127,203, 47, 78,151,137,240,197,171, 11, 45, 45, 45,193,225,112, 96, 96, 96, 0, 46,151, 11,138,162, 48, +111,222, 60, 28, 62,124,184,178,161,195,207, 68,150,137,137, 73,196,186,117,235, 28,103,204,152,193, 53, 50, 50,130, 88, 44,198, +169, 83,167, 48,101,202, 20, 28, 59,118,172,204,249, 47, 58, 12, 41,149,246,150, 46, 24, 63,126, 60, 84, 42, 21, 70,143, 30,141, + 35, 71,142, 44,208,106,181, 1,213,184,164,159,135,132,132,184,132,132,132,152, 2, 24, 60,106,212,168, 19,195,134, 13, 67, 64, + 64, 0,174, 95,191,222, 29, 5,139, 62,228, 0, 54, 3,176, 41,124,175,232,250, 20,216,218,218, 30, 96, 24,102,176,181,181,117, +136,171,171,107,179,211,167, 79,155,167,167,167, 23, 45,126, 64,124,124, 60,142, 31, 63,158,122,244,232,209, 60,173, 86,107,201, + 98,177,254,204,201,201, 89, 94,129, 96, 59,186,115,231,206, 73,133,195,129,184,116,233, 18,217,177, 99, 7,181,106,213, 42,136, +197, 98,120,120,120,192,199,199,103,190, 68, 34,105,185, 99,199,142,105, 35, 70,140,192,250,245,235, 33,149, 74,119, 86,246,176, + 82,129,248,162, 0,116,222,185,115,167,211,130, 5, 11,112,233,210, 37,180,105,211,198, 56, 46, 46,238, 32,128,169,101,213, 31, + 33, 4,113,113,113,144,201,100,120,242,228, 9,214,172, 89, 35, 46, 33,178,230,207,154, 53,107,195,252,249,243,177,105,211, 38, + 18, 22, 22,150, 62,108,216, 48,219,195,135, 15,179, 27, 52,104, 48, 95, 38,147,253,199,132, 86,195, 6, 53,182,180,107,211,117, +153,189, 67, 3,156, 58,125, 6,217,217,217,197,101, 82, 84, 46,132, 16,228,231,231,227,211,167, 79, 48, 51, 53,193,182,237, 27, +250,207,158, 62,169, 22, 10,194, 96,124,233,178,172,103,177,125,216,168,201, 63,142, 30, 59, 9, 97, 33,111,224,123,226, 16,194, +195,130,139,249,104,141, 26,209,145,175, 17, 29,249, 26,182,118, 78,232,211,171, 59, 53,102,204,152,126,227,199,142,178, 6,240, +183,133,142,248, 7,123,179,128, 47,227,104, 29,254, 76,104, 85,226,174,179,178,176,176,136, 56,119,238,156,165,155,155, 27,155, +166,105,220,186,125, 27,115,102,253,128, 9,227,189,161,134, 5,104, 21, 23, 12,215, 72, 39, 75,228,114, 25, 8, 8,164, 82, 41, + 2, 3, 3, 65, 24, 26,190,135,119,128, 16,166, 88,104, 1, 4, 42,181, 26, 14,181, 27,226,192,145,141, 52, 12, 12, 94, 66, 83, +118,232,154,188, 44,182, 86, 67, 19,136,210, 19,145,152, 26, 14, 51,147,218,224, 24,212, 70, 86,142, 12, 28,150, 29, 52,138, 40, +104, 11,143,149, 73,147, 33, 87,127, 93,253,105,203,240,158,146, 42,220,116,229,114,249,201,147, 39, 79,246,255,245,215, 95, 13, + 7, 12, 24,224,122,241,226,197,206, 0, 48, 96,192, 0, 87, 83, 83, 83,156, 60,121, 82, 37,151,203, 79,126, 67,143, 79,143,246, +237,219, 67, 44, 22, 35, 62, 62, 62,164,194,115, 83,169, 44,133, 54, 54,236,244, 7, 15, 52, 25, 98,113,173, 30, 61,122, 80, 26, +154, 6,139,162,144,157,155,139,132,143, 31, 97,110,110, 78, 69, 68, 69, 9,247,206,157,123,197,181, 89, 51, 78,209,138, 68, 93, +112,253,250,117, 62, 10,230,101, 85,248, 93, 21, 33, 77, 79,251, 52,201,203,203,235,202,201,147,167,204,210,210,211,162,121,134, +134,180, 80,104, 84,115,252,184,217,156,156,156,156,177, 0, 36,186,146,137,197, 98,196,197,197,193,216,216, 24, 92, 3, 3, 48, +114, 25,180, 82, 9, 20,217, 25, 96,171, 85, 48,212,106, 81,131,207, 67, 45, 91, 91,212,182,182,210,137, 51,230,254,157,226,137, +239, 37,135, 11,183,181,111, 12, 67,129, 16,134, 38, 66,204,246,123, 88,248, 52,202, 5, 86,253,172, 11,173,149,131,131,195, 31, +167, 79,159,230,102,100,100, 32, 56, 56, 56, 4, 64, 46, 0, 19, 0, 76,100,100,228,189,240,240,240,129,133,171,238, 42, 91, 45, +182,227,242,229,203,189,221,220,220,104,103,103,103, 65,122,122,122, 45,177, 88,204,164,166,166,126,230, 18,186,115,231, 14, 47, + 63, 63, 95,202, 48,204,149, 66,145, 85,105,252,162,133,195, 29,140, 2,131, 48,207,221,179, 78,115, 83,171, 22,200,166,131,154, + 63, 15, 73,157,183,112,184,195,158,157, 23, 69, 10, 99, 74,121,130,210, 38,213,226, 24, 41,116,157,196, 76,128,130,185, 82,129, +129,129, 72, 72, 72, 64, 92, 92,220,103,130,106,250,244,233,240,245,245,213,201,163, 37, 16, 8, 54,173, 93,187,214,113,193,130, + 5,220, 18,162, 8, 94, 94, 94,200,205,205,197,145, 35, 71,224,229,229, 85,229,142,191, 20,234,246,232,209, 99,128,189,189, 61, +178,178,178, 96,103,103, 7, 55, 55,183, 65, 1, 1, 1,206, 0,226,171,217,238,103,123,122,122,110, 88,183,110, 29, 52, 26, 13, +166, 76,153,130,247,239,223,159,127,255,254,253,174,218,181,107,207, 91,186,116,169,173,173,173, 45, 70,142, 28, 41,160,105,122, +104,121, 36, 53,106,212,216,124,232,208,161,177, 3, 6, 12, 96,169,213,234,110,247,239,223,199,199,143, 31,161, 82,169, 64,211, + 52, 62,124,248, 0, 47, 47,175,212,194,213,141, 31,116,176,107,242,202,149, 43, 39,205,155, 55, 15, 91,183,110,197,218,181,107, +127, 51, 51, 51,107,214,170, 85,171,214,107,215,174,197,146, 37, 75,224,228,228, 4, 75, 75,203, 70,171, 86,173,106,188,104,209, + 34,236,217,179, 7,107,214,172,249, 13,192,241,234, 20, 4,195, 48,212,150, 45, 91, 90,238,220,185,211,190, 72,100,177, 88, 44, +156, 59,119, 14, 65, 65, 65,131, 98, 99, 99,203, 58,198,199,206,206,110,186,189,189,189,225,221,187,119,133, 78, 78, 78,160,105, + 90, 83, 40,178,246,214,174, 93,123,206,135, 15, 31, 48, 96,192, 0,196,198,198,158, 4, 48,193,204,204, 76,186,104,209, 34,190, +177,177,177,153, 76, 38,251, 79,117,222, 96,179,168,137,155,214, 47,193,171,160, 40, 92,190,204,197,171, 87,175, 96,107,107, 11, + 30,143, 7, 66, 8,148, 74, 37, 50, 50, 50,160, 81, 43,209,188,105, 93,252,126,116, 11,210,211, 51, 0, 22, 85,238,148, 27,138, + 69,141,155,244,195, 16, 60,126,114, 27, 7, 15, 30,130, 68, 34, 45,231,225,219, 8, 13, 92, 27,195,161,166, 13,146,146,147, 64, +177, 96,245,119,158,235, 63,124,232,176,248, 22, 4, 93,194, 59,148,132,185,185,249,174,179,103,207, 90,122,120,120,176,165, 82, + 41, 24,134, 65, 87, 55, 55,204, 91,176, 0,215, 79,159,134, 75,135,209,160, 84, 66,208,124,221, 86, 61, 40,228, 50, 52,105,221, + 25, 35, 70,142, 66, 98, 66, 2, 60, 7, 14,131, 66, 33, 43,126,194, 40,242,104,169, 84,106, 88,217,212,194,157, 59,119,216,152, + 50,229, 45,246,150,237,148,208,170, 13, 67,163, 63, 40,186,228,200,131, 16,248,202, 23,106,165, 26,205,155,175,130,154,177,132, +141,227,116,104, 52, 87,145,151,113,191, 96, 24,195,210, 3,201,137,137, 96,177,185, 17,213, 45, 65, 70,154,241, 85, 55,221,220, +220,220,220,184,184,184,139,129,129,129,227,134, 14, 29,138, 59,119,238, 76, 3,128,161, 67,135, 34, 48, 48, 16,113,113,113, 23, +115,115,115,115,191, 69,109,219,219,219, 15,238,222,189,251,232,118,237,218,193,207,207, 15,132,144,199, 58, 93,216, 6, 6,132, +197, 98,129, 97, 24, 80, 0,178,114,114,240,254,253,123,100,101,102, 66,163,209, 64, 42,145, 48,141, 93, 93, 37,132, 97, 76,170, + 98, 79,201, 21,134, 40, 99,213, 97,209,119,213, 56,213,132,151,207,159, 38,230, 75, 36,214, 22,230, 22,249,134,134,134, 90,113, + 78, 78,238,219,136, 48,149,142,157, 67, 17, 34,195,195,195,155,165,164,164, 32, 49, 49, 17,180, 52, 31,108,165, 10, 44,165, 12, + 61, 59,119,130, 49, 8,140,192,192,128,209,192,128,109,128,252,130,213,121,149, 14,119,104, 75, 60, 36, 20,137, 44,138,162, 10, +134, 11, 5, 2, 24, 10, 77, 62,243,112,233,210,158,120, 60,222,233, 11, 23, 46,216, 59, 56, 56, 96,253,250,245,112,116,116,108, + 84,179,102, 77,153,153,153,153,177,173,173, 45,154, 52,105,130,206,157, 59,227,230,205,155,208,161, 12,104, 66, 72,159,199,143, + 31,255,248,244,233,211, 17, 2,129,128,154, 59,119, 46,167, 95,191,126,224,241,120,144,201,100, 16,139,197, 56,115,230, 76, 38, +195, 48, 69,139, 82, 44,249,124,254,113,138,162,226,165, 82,233,130,210,132,191,255,218,188,102,122, 54, 51,133, 72,248, 67,220, + 61,235, 52,239,225,217, 11,117, 93,122,160,135,103, 34, 0,108,169,193,249, 56,250,151,149,230, 87,204, 77,168,227,119,110,221, + 93,227,230,222, 99,229, 50,201,131, 13, 91, 15,231, 84, 58,159,142,162, 40, 48, 12,243, 89,236,160,210,191, 79,152, 48, 1,231, +206,157,171,180, 28, 89, 44,214,168, 25, 51,102,112, 75,121,158, 33, 18,137, 48,112,224, 64, 12, 29, 58,244, 51,161,101,101,101, + 5, 59, 59, 59,124,252,248, 17, 0,178,116,108, 87,243, 38, 79,158, 76,201,229,114, 76,157, 58, 21, 71,142, 28,193,232,209,163, +169,128,128,128,121, 0, 22, 84,181,177,179, 88,172,109, 75,151, 46,253,209,203,203, 11,217,217,217,184,113,227, 6,250,245,235, +135,115,231,206, 89,223,184,113, 99,147,135,135, 7,216,108, 54,252,252,252, 64,211,116,133,177,190,184, 92,238,224, 1, 3, 6, +176,146,146,146,192,229,114,209,182,109, 91, 36, 39, 39, 67, 38,147, 65, 36, 18, 97,254,252,249,159,178,178,178,186,235,122, 29, +113,185,220, 5,243,230,205,195,217,179,103,225,237,237,125, 2,192,212,220,220,220, 17, 79,159, 62, 61,251,221,119,223, 65, 36, + 18,225,202,149, 43, 88,179,102, 13, 53, 97,194, 4,236,223,191, 31,243,231,207,255,173,208,235, 84, 94,195,207, 79, 79, 79, 55, +171, 95,191, 62,210,210,210, 32,145, 72,112,229,202, 21,155,155, 55,111, 58, 59, 56, 56,152,198,197,197,105,127,254,249,103,195, + 5, 11, 22, 96,215,174, 93, 8, 14, 14,134,175,175, 47,122,244,232, 65,199,198,198,150,233, 37, 43, 12,217,112,133, 16,114, 87, + 32, 16, 32, 63, 63,191,232,186, 91,236,237,237,237,181,121,115,129,147, 61, 37, 37, 5, 19, 39, 78, 28,239,239,239,207,120,120, +120,240,185, 92, 46, 20, 10,133,244, 63,217,107, 51, 90, 6, 0, 3,231, 90, 66,220,190,126, 20,111, 66, 98,241, 38, 36, 28,134, +188,130, 73,240,114,185, 12,173,155, 55, 64,135,182,237,145,146, 42,194, 73,223,163,168, 97,229, 80,225,125,132, 16, 2, 46, 71, +139,198,174,118, 56,237,123, 8,126, 55,252,225,123,242, 76,241,156, 55, 14,199, 0,173, 90,119, 64,219,182,110,136,141,251,128, +163, 71, 15,194,218,166,150,126,112,176,154, 40, 30, 58, 44,249, 94, 74,249,247,112,115,115, 99, 75, 36, 18, 40, 20, 10,124,250, +244, 9, 31, 63,126,132,185,133, 57, 98, 83,226,209,157,175,198, 39, 38, 15,145, 33, 17, 90,138,109, 16, 92,217, 31, 14,112,111, + 5,184,183,194,156,201,163, 43,120,100, 37, 16,152, 90, 21, 12,221,208,116, 12,246,236,161,203, 19, 90,180, 86,115,239,246,221, +251,237, 39, 79, 24,108,112,231,254, 17,104, 84, 12,228, 26, 51, 72, 21, 42, 72,213, 6, 96,153,245, 3, 50, 3,192,230,240,208, +177,101, 3, 92,185,124, 83, 77,104,141,191,206, 5,100,219, 12,116, 90,120, 9,161,149, 94,106,220,161,134,206, 67,135,197, 29, +175, 86,123,238,212,169, 83,223,119,234,212,137,239,225,225, 81,191,176,227, 84,159, 58,117, 74, 86, 24, 12,179,170,248, 44, 26, +188,157,157, 93,107, 46,151, 59,186, 95,191,126,173, 39, 77,154,132,183,111,223,226,228,201,147,209, 13, 26, 52,120,144,154, 90, +254,138,108,182,161, 97,150, 36, 61,221, 92,232,236,204,177, 48, 49, 73,185,121,227,134, 83,175,222,189,169,196,196, 68,100,101, +101, 65,161, 80, 32, 56, 36,132, 24,176,217,201,148,169, 41, 43, 42, 40,136,197, 54, 52,204, 42,207,219, 88, 6, 62, 86,178,234, +112,115,117,189, 91,181,236, 45,234,175,241,158, 89, 87,161, 84, 52,203,203,203,163, 57, 6, 6, 6,142,118,230, 9, 81, 31,116, +191, 39, 42,149, 74,191,123,247,238,125,223,171, 87, 47, 94,116,104, 48,232,220, 92,168,114,197,224, 50, 90,212,104,221, 18,108, +181, 18, 80,105,224,208,152, 64,145,195, 71,192,139, 40,141, 82,169,172, 52,168, 97,145,208, 98,149, 18, 6,134, 66, 33,120, 38, +166,224, 9,133,165, 5, 67,101, 79,114,252, 62,125,250,244,236,216,177, 35, 8, 33, 56,124,248, 48,212,106,181,161, 90,173,134, + 74,165,130, 90,173, 70, 94, 94, 30,124,125,125,113,224,192,129,167, 0,126,211,225,244,105, 99, 99,227,239, 40,138,178,225,112, + 56, 50,107,107,107,193,185,115,231,138,195, 77,180,106,213, 10, 38, 38, 38, 92, 20, 6,133,180,177,177, 49, 56,118,236,152,249, +160, 65,131, 30,149, 57,220,209,188,209,146,186,180,133,187,145,113, 29,103, 83,171, 22,168,235,210, 3, 0,208,123,224,100,212, +109, 80, 27,121,153,161,206, 10,249,199, 33, 92,142,216, 34, 98,143,232,173,241,128,102,147,164,233, 15,223,163,236,229,253,101, +118, 20, 44, 22,171,220,225, 88, 93, 68, 86,129,102, 97, 89, 23,205,243, 1,128,172,172, 44,164,166,166, 34, 50, 50, 18, 13, 27, + 54, 68,118,118, 54, 28, 28, 28,160, 82,169,208,174, 93, 59,200,229,114,236,220,185, 19, 79,158, 60,121, 10, 96,190, 14,255, 97, +236,226,226, 50,177,117,235,214,184,113,227, 6, 94,189,122, 37,186,125,251,182,131,155,155, 27,156,157,157, 39,197,199,199,175, + 40, 28,234,211, 21, 2, 55, 55,183,185, 94, 94, 94, 8, 15, 15,199,204,153, 51,179,146,146,146,174,156, 63,127,126,234,154, 53, +107, 88,158,158,158, 72, 77, 77,197,182,109,219,180, 79,158, 60,217, 14, 96,125, 37,229,248, 46, 41, 41,201, 81,161, 80, 32, 59, + 59, 27, 52, 77, 67, 38,147,225,230,205,155,240,245,245, 77, 43, 20, 89, 49,186, 26,215,178,101,203, 38, 44, 22, 11,103,207,158, + 5,128,159, 80, 16,177,255,202,144, 33, 67, 68, 63,255,252,179,195,242,229,203, 49,109,218, 52,168,213,106,108,221,186, 21,203, +151, 47,255,179, 80,100, 85,116, 19,253,213,206,206,110,250,204,153, 51, 27, 45, 90,180, 8,129,129,129, 54,175, 95,191,110, 27, + 28, 28,140, 90,181,106, 33, 43, 43,139, 99,105,105,137, 93,187,118, 97,225,194,133,151, 0,100, 62,123,246,108, 84, 92, 92,220, +102, 0,219, 42, 17,237, 62, 14, 14, 14,211, 9, 33, 68, 38,147,125,244,246,246,222,182,113,227, 70, 44, 92,184, 16, 17, 17, 17, +200,205,205,133,137,137, 9,181,116,233,210,137, 63,253,244, 19,166, 76,153, 66,164, 82,233,129,255,116, 71, 77,136,133, 81, 18, +228, 0, 0, 32, 0, 73, 68, 65, 84, 22, 50,113, 56,180, 74, 11,180,106,222, 16,173,154,213,193,237,251,111, 0, 0, 61,135,185, + 65, 38,205,199,137, 19,135, 17, 19,243, 30, 28, 3, 3,152,215,176,211,197, 19, 8, 85,222, 59,228,168, 83,209,203,163, 45,250, +121,118,199,111,191,159, 3,173, 81, 99,234,228,177, 16,231,228,224,247,223,143, 34, 54,238, 3, 56, 6, 6,176,180,250,251, 3, +161, 86,164, 69,254,241, 66, 75,135,225, 39, 48, 12, 3,145, 72,132,215,175, 95, 35, 62, 62, 30,124, 62, 31,114, 90,203, 28,188, +247,132,161, 40,110, 50, 67,200, 83, 66, 23, 71, 41,254,146, 67,171, 21,149,136, 88,107,102, 97, 97, 97,168, 84,202, 65,211,154, + 18,189, 10, 5, 80, 0,151, 3,216,215,172,139,164,196, 36,162, 80, 40, 30, 86,248, 4,165, 84,236,186,118,229,130, 87,231, 46, +110, 86,253,122,174,195,149,171,171, 32,206,203,131, 66,109, 0,169, 66, 13,153, 2, 48,175,225,138,118,205, 91, 32, 37, 37, 11, +161,175, 2, 36, 28,165, 76,151,137,162,239,247,174,156,236, 50,121,206, 18, 24, 59,117,129, 50,242, 10, 24, 73, 90,177, 71,203, + 72,104,129, 26,181, 27, 35, 71,170,196, 5,255, 55, 64, 21, 82,189,164,167,167,203,216,108,246, 41, 47, 47,175,173,111,222,188, +118, 4,128, 55,111,222, 36,167,166,166, 46, 75, 79, 79,175,170, 79,186, 40, 26, 60,101,100,100,252,166, 65,131, 6, 41,109,219, +182, 53, 27, 50,100, 8,172,172,172, 16, 28, 28,140,205,155, 55,191, 83,171,213, 75, 2, 2, 2, 42, 28,234, 81,169, 84,162, 55, + 87,175,154,118,255,225, 7,243, 37,131, 6,109,243,242,242,218,181,126,253,122, 3, 23, 23, 23, 74,163, 86, 35, 44, 44,140,156, + 62,117, 74,115, 96,249,242,157,134, 2, 1,231,229,181,107, 6,180, 82, 41,250,255,110,196, 14, 14, 14,238,110,221,186, 54,222, +254,235, 30, 40,228, 18,188, 8,252, 19, 98,113, 6, 14, 29,190,220,216,193,129,184,139, 68,162, 0, 93, 5,240,241,227,199,127, +236,208,186,117,235,122,181,106, 33, 44, 33, 30,134,140, 22, 92,154, 6, 91,173, 4,139, 86,160, 86, 51, 2,138,101,130,212, 79, +121,216,120,246, 98,184, 46,194,184, 81,255,193, 88,159,156, 11,138,162,176,163, 83, 51, 24,154, 8,193, 21, 8, 49,251,143,251, +197,194,192,111,253,114, 24, 10,133,168,223, 65,167,128,240,178, 7, 15, 30,188, 14, 11, 11,107,215,172, 89, 51,252,248,227,143, +248,248,241, 35, 24,134, 65, 90, 90,154, 34, 53, 53, 85,148,145,145,241, 17, 5,241,127,142, 84,210,137,149, 84, 29, 14, 1, 1, + 1,197,195, 13,254,254,254,168, 89,179, 38,204,204,204,144,151,151,135, 25, 51,102,152,175, 94,189, 26, 0,240,250,245,107,148, + 20, 40,165, 17,246, 38,114,123, 78, 62, 17, 19, 73,208,144,108, 58,168,121, 15,207, 36,244, 30, 56, 9,119,253,126,195,253,219, +247, 80,131,243, 49, 30,130,252,155,153,241,153,121,201, 82, 23,159,198,109,166,178, 83,165,183,125,230, 14,142,102,219,219, 51, + 23,150, 31,204,203,169,200, 86, 23, 23, 23,216,218,218, 22,207,209,226,112, 56,152, 50,101, 10, 8, 33,186,138,172,194,190,134, +201, 80, 40, 20,182, 70, 70, 70,248,244,233, 19, 62,124,248,128,216,216,216,226,208, 1, 12,195,104, 22, 47, 94,108, 48,119,238, + 92, 28, 60,120, 16, 15, 31, 62,124, 10, 96, 29, 0, 93, 31,214,198,142, 28, 57,210, 68,165, 82,225,204,153, 51, 52,128,129, 23, + 46, 92,120,221,174, 93, 59, 78,223,190,125, 77,246,239,223, 63,182,176,142,116, 22, 90,166,166,166, 92,181, 90,141,253,251,247, + 35, 41, 41,201, 29, 64,228,203,151, 47,125, 70,142, 28,121,160, 89,179,102, 13,194,195,195,223, 75, 36,146,217, 0, 66, 43, 35, + 75, 75, 75,155,220,182,109,219, 11, 12,195, 56,245,234,213, 75,240,235,175,191,154, 70, 69, 69,193,209,209, 17, 12,195,132,161, +138, 41,172,222,191,127, 31,153,154,154,218,184,123,247,238,184,121,243,230, 22,173, 86,187, 9,192,214, 89,179,102, 57, 36, 36, + 36,160,117,235,214,168, 81,163, 6,162,162,162,242, 83, 83, 83, 15,160, 32, 37, 81,101, 46,220, 56, 0,203,124,124,124, 90,248, +248,248,140,174, 81,163, 70,199,224,224, 96, 60,126,252, 24,219,183,111,199,234,213,171,209,181,107, 87,252,248,227,143,153, 0, + 70, 3,160,227,226,226,116,138,155, 87,228,217, 2,128, 54,109,218,164,108,222,188, 25, 83,167, 78, 37,199,142, 29,219,125,234, +212,169, 5, 99,199,142, 45,238, 3, 39, 78,156, 72, 78,158, 60, 57, 17, 5,105,152,254,147,208,168,213, 42,152,214,168, 11, 73, + 78, 34, 50,146, 2,193, 55,177,131,103,143,150,144,201, 85,184,126,237, 18, 66,195, 66,192, 98,177, 96,107, 87, 11,230, 22, 86, +136,142,126, 15, 84,188,218, 88,163, 86,171, 97, 98, 81, 7,146,220, 36,168,210,223,192, 88,104,131, 73, 63, 12,129, 76,174,198, +229, 43,151, 16, 30, 30, 10, 54,155, 13, 59,251, 90, 48, 51, 47,224,164, 72,197, 43,152,245, 0, 80, 70, 60,173, 74,133, 22,155, +205,126,112,235,214,173,225, 29, 58,116,224,196,196,196, 32, 38,166,224,225, 70, 44, 22,211, 20,180, 23,211,195,174,141,169,224, +240, 94, 40, 92,157, 81, 50,119,161,208,196, 68, 20,245, 46,210, 86,156,157,134,144,160, 39,136,137, 14, 67,124,108, 36,212,106, + 5,216, 44, 22, 88,108, 22,234,212,109,138, 39, 79, 3, 85, 10,154, 14, 44,143,179,192,142,216,124,129,141,203,168, 13,235, 87, +248, 45, 92,178,214,120,196,240,131, 8,141,122, 11, 9,109, 7, 66, 0, 59, 75, 1, 90,213, 91, 10, 81, 74, 6,206,254,182, 95, +198,168,213,227, 74,197,208,250,130, 19, 0,108, 51,209,228,192,225,223,166, 28,241, 61,189,118,201,220, 25,182,223, 13, 29, 7, +195,236,183,208,164,188, 65,221,118,253, 64,241,204,113,227,206,125, 4,188,126,155,198,104,201, 90,219, 44, 28,139,174,132,179, + 36,114,114,114,158,125,250,148,234, 88, 34, 10,188, 35,143,103, 84,217,234,184,210,156,159, 69,156,103,179, 89,109, 54,108,216, +160,177,181,181, 85,135,135,135,227,224,193,131,204,155, 55,111,238,176, 88,172,189,169,169,169,138,202, 56,173, 53,154,144,211, +222,222, 77,218, 15, 29, 74,198,204,157, 43, 3,143, 55,111,219,142, 29,222, 25, 98,113, 77,194, 48,176,174, 81, 35,121,219,242, +229,155,135,143, 28, 41,142,120,242,196, 56,240,234, 85, 99, 67,154,126,163,131,157,223, 2,229,114,138, 68,162,128,135, 15, 31, +227,196,145, 95,161, 86, 43,145, 42, 74, 0, 0,100,102,229,162, 18,145, 85,154,147,200,100,178,161, 63,173, 94,253,252,167,133, + 11,236,186,245,236,133,196,144, 96,168,179, 51, 64,105,104, 24, 80, 28, 72,211,249, 72, 79,147, 96,217,201,243,233, 18,153,108, +104, 25,157, 68,153,118, 22,121,172,120,166, 38,224, 10,132, 48, 20,154,124,230,197, 50, 50, 53,133,161, 64, 8,142,161, 97, 89, + 19,184,191,224,148, 72, 36,195,134, 15, 31, 30,250,242,229, 75,139,169, 83,167,162,115,231,206, 65,114,185,220, 3, 64,126,117, +203,147, 97, 24, 81,183,110,221, 88, 20, 69, 9,199,141, 27,199,203,200,200, 40,142,172, 46,145, 72,112,243,230, 77, 52,108, 88, +176,170, 63, 34, 34, 2, 77,155, 54, 45,151,115,218,178,112, 17,128,245, 11,135, 59,108,123, 30,146, 58, 15,192,150,186, 13,106, +225,254,237,123,120,124, 63,208,187, 99, 51,102, 79,255,113,237,126,230,123,140, 92,210,184,205, 84,182,208,212, 30,191, 95,190, +196,142,124,115,116,163, 76, 22, 86, 31, 7,175, 44, 46,207, 78,138,162, 64, 8,249, 34,148, 3,155,205,198,169, 83,167,170,122, +238,231,143, 28, 57, 50,107,230,204,153,220,212,212, 84,188,123,247, 14, 82,169, 20, 70, 70, 70,184,125,251, 54, 13, 96,255,169, + 83,167,110,159, 58,117,170, 47, 10, 86, 19,249, 87,165,125, 10, 4, 2, 47, 79, 79, 79,188,123,247, 14,175, 94,189,186, 4, 32, + 52, 40, 40,232, 82, 76, 76,204,168,174, 93,187,226,183,223,126,243,146,203,229, 71,170,194,201, 48, 76,201,152, 73, 69, 25, 31, + 66, 36, 18, 73,199,192,192,192,170,214,123,106, 86, 86, 86,151, 66, 97,157,100,107,107,107, 26, 18, 18,130,218,181,107, 67,173, + 86,119,168,106, 91,202,205,205,253,117,239,222,189,199, 38, 79,158,140,159,127,254,121,220,249,243,231,199,245,239,223, 31, 3, + 6, 12,192,241,227,199, 17, 26, 26,186, 5,186,165, 21, 43,235,220, 67, 1,132,218,218,218,206,169, 85,171, 22,182,111,223,142, +176,176,176,205,235,215,175, 95, 30, 26, 26,138,134, 13, 27,242, 34, 35, 35,233,234,220, 67, 0,192,212,212,212, 84,163,209,224, +234,213,171, 47, 0, 44, 28, 55,110,156,205,174, 93,187, 70, 11,133, 66,100,103,103,203,195,195,195,199, 2,184,246,159,190,215, + 17,138, 90, 57,117,218, 60,159,105, 83,199, 26,181,109,211, 10,178,188,100,200, 37,105,144,229,127,194,222, 35,119, 64, 81, 44, + 88, 91,219,195,198,206, 17, 9, 9,137,120,250,231, 13,149, 84, 38,223,101,168, 97,182, 84,204, 57,183,128,179,117, 1,167, 76, +154, 14,185, 36,189,152,211,198,166,102, 33,103, 2,158, 4,222, 80,200,165,210, 95, 85,132,250,229,111, 62,247,127, 50,170,150, +235,176, 36,196, 98,241,252, 25, 51,102,120, 44, 91,182,204,146,166,105,118,141, 26, 53,144,144,144, 64, 95,188,120, 49, 91, 34, +145,204,175,142, 53, 28, 3,131, 80, 23,215,134, 30,223,125,247, 29, 61,120,240, 32,238,248,201,125, 57,214, 54, 54,200,205,201, + 66,244,187, 96, 68,189,125, 3,151,134, 45,177,102,253, 78,192,220,188,210, 68,146,133,105,117, 6,174,251,105,241,185, 46,238, +125, 76, 27, 54,109,201,109, 85,223, 12,106, 13,141,228,228,100, 92,187, 26,162, 14,127,253, 56,143,161, 85,163,100,153,186,165, +224, 9, 0,104,100,225, 80, 51, 27,245,169, 77,219,246,254,184,255,208,137, 37,203,230, 77, 21,116,117,235,141,176,123,191,225, +146,223, 57,169, 66,169,218,198,101, 99, 71,120, 22,100,209, 85, 44, 3,133, 66,161, 46,221,159, 42, 20, 10,245,215,214,244,241, +227,199,145,150,150,166,250,248,241,227, 45,154,166,207, 87,144,236,249, 11,236, 5, 84, 67,148,202,123, 63,185,185,245,253,233, +246,109,163,137, 75,151,170,198,141, 31,191, 24, 74,165, 26,134,134,132, 35, 16,176,192,227, 25, 68, 60,121, 98,188,123,214,172, + 26,148, 74,117,247, 68, 5, 97, 3,202,192, 55, 95,117, 88,228,209,234,222,189, 43, 38, 78, 93, 8,121, 9,143,214,179, 87,209, + 80,170,161,179, 71,171, 16,137, 31,147,146, 58,206, 91,249,211,229, 81,158, 61, 27, 55,115,170,195,179,118,174, 3,161,157, 29, +178, 50, 50,240,228, 85,148,102,253,185,203,225,133, 34, 75,167,184, 50, 12,195, 20, 76,114, 7,208,115,254, 50, 80,108, 54, 80, + 24,198,161,104,229,144,115,187,206,160, 56, 28,104, 9, 3,165, 82,169,203,164,191,228, 15, 31, 62, 12, 27, 55,110,156,191,159, +159, 31,203,211,211,179,213,149, 43, 87,152,175,105, 59,114,185,188, 35, 0, 24, 25, 25,197,155,155,155, 59, 76,158, 60, 25, 26, +141, 6, 50,153, 12,185,185,185, 72, 78, 78,206,153, 60,121,178, 26, 0,140,141,141, 13,135, 15, 31,110, 90, 25,231,206,139, 34, +197,194,225, 14,123,106,112, 62,142,206,203, 12,117,174,193,249, 24,223,177, 25,179,103,231, 69,145,194,180,166,116, 67,230,199, +128,232, 84,233,109,159,223, 47, 95, 98, 79, 24, 50, 76,235, 40,124,239,109,100, 67, 46, 86,198, 75, 81,212, 23,193, 73,117, 20, + 89,159, 33, 63, 63,127,249,170, 85,171, 6,136,197, 98,199,190,125,251,114, 27, 55,110,140,231,207,159,195,207,207,143,126,246, +236, 89,146, 84, 42, 93, 1, 64, 1,224, 78,117,202,212,213,213,213,153,195,225, 20, 13,165,237, 43,252,122,223,149, 43, 87, 70, + 77,157, 58, 21,117,234,212,105, 18, 25, 25,201, 67, 21,174, 35, 66, 72,241, 40,195,183, 4, 69, 81,177,187,119,239,118,176,179, +179,163,110,222,188, 73,179,217,236,234,120,110,142, 31, 61,122,180,131, 70,163,153, 54,125,250,116,184,187,187,131,166,105,156, + 60,121, 18, 71,143, 30,213, 85,100, 85,136,232,232,232, 55, 73, 73, 73,221, 22, 47, 94,140,237,219,183, 47, 95,188,120, 49,146, +146,146, 16, 29, 29, 29,252, 53,188,121,121,121,242,196,196, 68,126,167, 78,157,218,134,135,135,135,123,120,120, 52,157, 58,117, + 42,182,108,217, 66, 30, 62,124, 56, 28,192,205,255,143,222, 59, 42, 38,219,215, 64,203,185,189,126,195,175,171,235,215,115,158, + 57,101,210, 72,182,171, 75, 83, 72,115,147, 97,105,101, 11,199, 90,117,145,145,158,137, 91,183,110,106, 51, 51,115,142,107, 89, +212,186,152,152,236,148,175,225,116,112,172,139,244,244,116,220,184,113, 67,155, 35,206, 59, 12, 13,107,125,100, 66, 78, 26,244, +208,197,147, 53, 29, 21, 68,137,175, 8, 86, 22, 22, 22,103, 76, 77, 77,211, 76, 77, 77,211, 44, 44, 44,206, 0, 58,173, 62,232, + 85,226,238,192,254,236, 53,124,184, 17,140,140, 58,130,195, 89,100,110, 97,113,211,204,204, 44,171,123,247,238, 42, 31, 31, 31, + 69,100,100, 4, 35, 18, 37, 17, 51, 51,179,220,226,253,203,226, 44, 5, 11,139,122, 38, 2,251,166,171,205, 28, 91, 61, 17,218, + 55,201, 23,218, 55,201, 55,115,108,249, 84, 96,223,100,173,133, 69, 61, 19,157,236, 44, 7,117,109, 96,237, 98,133,253, 13,173, + 41,185,139, 21,246,215,181,129,181,206,231, 94,241,176,159,150,162,160, 69,193, 50,108, 84,131,179,136,131, 97,179,217, 39, 28, + 29, 29,237, 81,181,128,117, 95,112,142, 7,234,140,231,241,166, 93,240,246,158, 24,255,240,225,184,188,184,184, 49,185,177,177, + 35,131,207,157, 27,181,111,212,168,241, 99,120,188,233,195,129,122,186,114,218,219,219,111,126,243,230,141,159,174,175, 18,194, + 75,231,242,172, 87,215,225,182,103,175, 14,196,107,198, 80,226, 53, 99, 40,241,236,213,129,212,171,235,112,251, 43,234,136, 98, +179,217,163,249,124,254, 25, 1,159, 31, 38,224,243,195,248,124,254, 25, 54,155, 61, 26, 21,207,161,250,140,211,210,210,242,181, +173,173,109, 90, 85, 94, 86, 86, 86, 65, 85,176,115,140,179,179,115, 18,139,197,218, 89,197,107,186, 34, 78, 23, 99, 99,227, 88, +129, 64,144, 92,242,101,108,108, 92, 50, 48,148, 37,159,207,191, 46, 16, 8,118,233,194,249,203,202,166,171,159,222,153, 19,250, +203,202,166,171, 75,255, 54,247,123,139,201,207,253,215,101,205,253,222, 98,178, 46,118,218,216,216, 60,180,177,177, 73,181,177, +177, 73,181,181,181,173,240,101,101,101,245, 90, 7, 78, 35, 19, 19,147, 93, 38, 38, 38,105, 2,129, 64, 43, 20, 10,211, 4, 2, +193, 78,148, 8,109, 81,221,242,100,177, 88, 91,154, 52,105,162, 96,179,217,199, 74,253,180,189,126,253,250, 10, 14,135,179,173, +138,156,166, 93,187,118,213,134,132,132, 16,119,119,119, 2,192,226, 27,214,187,157,133,133,197, 77, 83, 83,211, 68, 19, 19,147, +189, 0, 4,213,228,164, 0,140,118,112,112, 8,238,209,163,135,204,193,193, 33, 16,192,119,223,208,206, 1,223,127,255, 61,147, +152,152, 72, 8, 33, 36, 49, 49,145,124,255,253,247, 12, 10, 2, 69,126,205, 61,121,229,172, 89,179,200,179,103,207,200,179,103, +207, 72, 96, 96, 32, 25, 48, 96, 0, 3,224,135,175,188,207,227, 91,157,123,227,186, 86,245, 26, 53,176, 56, 63,118,152, 27,115, +231,218, 78,178,102,197, 76,210,219,189, 41,105, 88,223,226,178,139,139,165,203,183,224, 92,189, 98, 6,233,213,173, 9,211,184, +158,197,185,198,117,173,234,253,135,207,253,223,232,213,194,223, 61,225,236, 47,215,226,231, 98,169,108,212,172, 89, 19, 89, 89, + 29,140, 56, 28, 55, 30,143,231,193, 98,179, 31,100,103,100, 44, 40,124,220,210,254,167, 92,181, 21,118,232,245, 96, 88, 65, 74, +130,234,112,126, 54,145,189,154,156, 85,225,208,137,179,188,164,210,140, 82,153, 98, 73,211,175,247,162,194, 50,248,140,211,193, +193, 97, 26,195, 48,206,186, 26,196, 98,177,226, 69, 34,209,145,234,148,103,131, 6, 13, 72,225,240, 54,245, 45,235,253,239,104, + 75,255, 75,156,191,255,218,188,102,195,230,141,150,132,189,137,220, 94, 56,172, 88,140,181,115, 45, 76,220,122,116, 95,245,228, +254,195,159,215,238, 21,231,255, 63,159, 59, 11, 58,206,105,251, 6,156, 69, 65, 66,171,196,105, 96, 96,224,211,190,125,251,105, +207,159, 63, 63,166,213,106,167,255,143,182,207, 1,108, 54,123,177,171,171,107,171,232,232,232, 96,173, 86,187, 29,101, 4,138, +172,134,157, 43,156,157,157,103,115,185, 92,158, 68, 34, 17,167,164,164,172, 2,112,254,191,173, 60, 27, 55,168,209,150,144,226, +160,219, 27,223,125,200,126,249,205, 56, 9,163,101, 8,123, 67,116, 92, 86,208,255, 67,189,255,219, 68,214,225,255,196, 31,247, +210,115,234, 57,245,156,122, 78, 61,231, 55,231, 52,214,151,167,158,243, 95,200,249,175, 4, 71, 95, 4,122,232,161,135, 30,255, + 56,200,245, 69,160,135, 30,255,117, 40,233,213, 42,246,102, 81, 21,168,210,170,184, 4,171,163,108,239,233, 57,245,156,122, 78, + 61,167,158, 83,207,169,231,252,159,227,252,183,138,172,195, 21,108,255,109,208,187, 85,245,156,122, 78, 61,167,158, 83,207,169, +231,212,115,254, 47, 8,173, 50,183,245, 67,135,122,252,237,216, 51, 4, 14, 0, 48,239, 10, 68,127,199,254,122,232,161,135, 30, +122,232,241,255,140,195, 40,103,232,240,191, 65,104,213, 4,208, 17, 5,137,111,163, 0, 60, 6, 32,254, 10, 62, 43, 0, 35, 41, +138, 26, 1, 0,132,144, 11, 40, 88, 53,146,169,203,193, 70, 70, 70,105, 10,133,194,166,240,115,186, 66,161, 40,153,203,128,194, +151,171,217, 72,137, 87,153,112,118,118, 78, 83, 42,149, 54, 58,252,125, 46, 33, 36,148,197, 98,133, 9,133,194,251,209,209,209, +126, 85, 57,113, 15, 15,143,137,108, 54,123, 35, 0,104,181,218,149, 15, 30, 60, 56,241, 55,214, 91,135, 90, 53,237,126, 83,107, +212,116, 90, 70,246, 42,124, 25,200, 15, 0,176,127, 32, 54, 83, 52,150, 20,126,222, 54,199,175,226, 56, 58, 85,221,191, 2,180, + 53, 48, 48,240,178,181,181,237,151,156,156,252, 26,192, 82,160,242,168,198,181,106,213,250,129,195,225,140,211,106,181,245,216, +108,118, 44, 77,211,167,146,146,146,124,245,247, 16, 61,244,208, 67, 15, 61,116, 16, 91, 95,160, 74, 66,171,161, 37,236, 8, 48, + 26, 20,122,131,224, 46, 5,156,141,202,194, 39, 93,143,239,223, 16, 26, 13, 93,240,159, 92, 22,180, 55, 63,176, 14,247,235,215, +207,113,238,220,185,232,220,185, 51,158, 63,127,222,233,248,241,227,147,207,159, 63, 31,202, 48,204, 3, 0,207, 1,157, 66, 41, + 8, 80, 16,167,101,108,191,126,253,122,109,220,184,145,221,180,105, 83,200,229,114, 60,124,248,208,109,219,182,109,187,158, 62, +125,122, 15,192,233, 66, 65, 80,110, 2, 60,133, 66, 97, 83,148,140,147,162, 40,155,225,195,135,191, 44, 41,174, 10,243,171, 81, +132,144,103, 20, 69, 5,106,181,218,231, 23, 47, 94, 76,106, 8,116,152,225,204,189,184, 32, 94,237, 88,154, 83,169, 84,218, 92, +253,101, 19, 56, 60, 30,148,249,121,232, 52,233, 47,209,123,119,245, 18, 80, 12, 13, 54,136,216, 99,195,174, 80, 0, 97, 41, 41, + 41,161,238,238,238,241, 85,173, 97, 54,155,189,241,214,173, 91,246,132, 16,120,122,122,110, 4,240,119, 9, 45, 94,199,182, 45, + 31, 92,191,116,198, 72,146,157,134,190,223,141, 58,245, 62, 41,125, 34,128, 75,159,137,166,126,176,165, 40, 44,153,181,233, 52, + 27, 0, 14,172, 24,187,116,103, 31,236, 89,120, 7,159, 0,120, 20,138, 31, 0,248, 5,192,131,253,253, 96, 11, 96,217,172, 77, +167, 41, 0, 56,184, 98,236,146,253,253,176,123,206,205, 42,135,173,152, 61,113,226,196, 61, 27, 55,110,100,219,219,219, 67, 36, + 18,245,109,210,164,137,107, 94, 94, 94, 19, 84, 48,137,184, 78,157, 58,231,186,246, 24, 84,119,232,136,209,124,107, 43, 11,164, +164,102,154,158, 59,115,108, 6,251,217,195,126, 31, 63,126, 28,165,191,135,232,161,135, 30,122,232, 81, 14,170, 31, 25,190,181, + 61,140,165,106,124,207, 97, 83, 63,116,105,219,164,231,152,254, 93, 89, 77, 26, 55,192,219,136,200, 62,215,238,191,216,198, 10, +140,240,167,181,196, 87,192,197,213,160,212,138, 87,194,104,104,112,238, 92, 61, 93,208, 19, 78, 30,203,126,249,242,101,131, 54, +109,218, 20,167,134,233,217,179, 39,122,246,236, 73, 29, 56,112,160,229,157, 59,119, 90, 30, 61,122, 84,237,239,239,255, 27, 42, +142,143,226, 85,191,126,253,109,123,246,236,225,185,187,187,131,199,227, 21,255, 32, 20, 10, 49,104,208, 32, 12, 26, 52,136,157, +146,146,226,121,253,250,117,207, 95,126,249, 69,149,144,144,176, 24,127, 69,105,174, 16,171, 86,173,106, 91,198,215,183, 40,138, +250, 64,211,116,112,203,150, 45,147, 92,129, 6, 51,250,119,190, 59,187,139,139, 96,193,242,227,101,242,112, 12, 13,241,251,196, +130,190,186,164,208,138,191,127, 19, 66, 83,147, 44,190,137, 73, 40,128, 48, 0,161,132,144,176,216,216,216,200, 70, 64,203,142, + 22,172,223,142,137,153, 22, 85, 16, 91, 72, 74, 74,130,153,153,153,177,187,187,123, 42, 69, 81,107, 31, 62,124,248,173, 39,228, +117, 88,187,100, 54, 87,252, 49, 20,159,222, 61,195,162, 17,110,252, 5,123,255,248, 89,161,210, 92,170,232, 32,138, 98,177,126, + 9,100,188, 81,144,140,119, 85, 86, 86,150, 59, 0, 88, 90, 90, 26, 2,120,176,243, 5,250, 47,236, 66,125, 77,108, 55, 46,155, +205,222,127,252,248,241,169, 63,252,240, 67, 65,234,136, 39, 79, 32, 20, 10,177,126,253,250, 58, 63,254,248,227,102,154,166,231, +151,231,201,234,218, 99, 80,221,221,219,127,110,146,159,157,171, 60,180,255,252,171,154,205, 26,178,102,121,253,104,178, 91,173, +180,211,106,181, 63,232, 61, 91,122,232,161,135, 30,122, 84,197,155, 85,169,208,114,181,194,137,214,205, 92, 70,142, 25,224,198, +107,222,172, 41,184,188,191, 66,183,180,105,219, 22,109,218,182,101,121, 75,242,123,191,124,245,166,247,197, 59,207,149, 50, 77, +194,249,232, 76, 76,212,213,170,162,164,180, 27,191,179,237, 33,205, 73, 55, 2, 0,129,185,141, 98,197,213, 79,247,187,116,233, + 2, 71, 71, 71,174,191,191,255,148, 74,132,214,138,168,168, 40, 30,155, 93,113, 60,212,154, 53,107, 98,248,240,225,104,216,176, +161, 97,247,238,221, 87,148, 39,180,140,140,140,210, 41,138,178, 1,128, 26, 53,106,104,215,174, 93, 27, 76, 10, 0, 0,132, 16, +242,140,197, 98, 61,103, 24,230,197, 31,127,252,145,220, 4,176,233,219,166,225,227,217,227,135,243,201,197, 93,229,138, 4, 69, + 94, 94,153,223,243,133,130, 12, 99,129, 32,148,199, 55, 10, 67, 65, 46,175, 48, 71, 71,199,200, 38,128, 99,251,134,206,119, 14, + 44, 28,107,114,108,250,207,149,150,101,235,214,173, 93, 91,180,104, 97,164,213,106, 33,149, 74,113,240,224, 65, 51, 99, 99, 99, +179,126,253,250,173, 41,217, 0, 26, 3,205,135,213,100, 79, 95,151,162,157, 83,141,134,100,222,181, 83,219,143,195, 7,245, 51, +109,219,177, 43,222, 63, 56,137,236,236,124,228,230, 72,192, 48,204, 23,113,125,230,220, 68,218,254,129,216,118, 96,249,216,101, + 20,139, 69,181, 28,178, 20,131,237,114,231,249,248,248, 68, 0, 48, 48, 52, 52, 44,217, 14,107, 26, 59, 52,219,214,160, 79, 87, + 28, 92, 57, 30,132, 97, 8,128,109, 85,240,102,217,152,152,152, 92,187,115,231, 78,135,118,237,218,225,249,243,231,136,139,139, +195,236,217,179, 85,115,230,204,225, 78,152, 48,129, 90,180,104,209,220, 95,126,249,229, 34,128,167, 95, 92, 8, 28,206,184,239, +134,142, 50,148,228,228, 41, 84, 74,181,170,134,149, 57,163,148, 42,100,153,226, 60,197,168,177,211, 84, 17, 65, 47,198, 1,248, + 66,104,125,101,121,234,161,135, 30,122,232,161, 3, 8, 33,237, 0, 88, 3,200,160, 40,234, 85,201,237,194, 93,138,178,181,148, +222,206, 68,193,168,148,101, 9,186, 76, 20, 76,247,177, 6,160, 5,240,146,162, 40,241, 87,154, 88,241, 42, 67, 63, 63, 63, 82, +242,189,132,208, 34,132, 16,162,201,250, 64,148,209, 55,137,236,213,145, 47, 94,242,136, 75, 36,245,229,121,242,226,244,106,226, +106, 85,113, 22,246,254, 13,161, 25,219, 2,100, 86, 59,144,249,221,205, 21, 47, 95,190,244,103, 24,198,207,187, 43, 8,121,123, +154,144,183,167,201,194, 78, 32, 23, 47, 94,188,181,121,243,102, 63, 95, 95, 95, 63, 0,149,205, 83, 74,203,127, 21, 72, 94,216, +128,148,135,168,168, 40,226,227,227, 67,150, 47, 95, 78,142, 29, 59, 70, 80, 73, 4,117, 79, 79,207,135,225,225,225,100,194,132, + 9,193,168, 32, 48, 96, 99, 64, 48,174,142,221, 59,229,185, 93,106,213, 15,205,137,184,155, 81,153,231,111,111,111,255,153, 61, + 91, 92,236,200,190,246, 46,228, 68,239, 54,159, 8, 33,183, 8, 33, 91, 8, 33,163, 8, 33, 13, 1,160, 53, 96,250,157,189,101, +140,226,252,110,185,106,122,199, 74,243,222,181,110,221,218,117,241,226,197,217, 42,149,138,196,199,199,147, 67,135, 14,145,187, +119,239,146,171, 87,175, 18, 55, 55,183,148, 18,246,218, 78,110,232,148,166, 58,186, 78, 89,157, 86,100,192,102,239,123,117,247, + 34,137,121,124,129,188, 60,187,153,156,250,105, 12,153,251, 93, 7,181,169, 49, 79, 1,160, 71,121,199,205,233,130, 6, 13,235, + 88, 71, 39, 36, 36, 16,181, 90, 77, 38, 77,154, 68, 60, 61, 61, 73,159, 62,125, 72,175, 94,189, 72,207,158, 61, 73,143, 30, 61, +200,253,251,247, 73, 74, 74, 10,233,213,181,141,116, 96, 99,180,173,130,105,205,156,156,156, 62,197,199,199, 19,181, 90, 77,252, +253,253,201,201,147, 39,137,191,191, 63,241,246,246, 38, 0, 78,204,154, 53, 75, 46, 22,139,137,167,167,103, 50,202,136, 26,239, +228,228, 20, 25, 30,157,148,180,115,211,145,251,191,239, 59,115,255,242,197,187,247,175,221,126,249,231,213,219,175,206,191, 8, +137,189,234,228,228, 20, 89, 70,253,127, 85,121,234,161,135, 30,122,232, 81,185, 22, 41, 20, 90, 3, 10,157, 29, 3, 8, 33,189, + 74,109, 15, 40, 20, 78, 95,108,123,123,123, 47, 47,185, 93,180,143,183,183,247,114, 0,164, 83,167, 78,103, 8, 33, 13,190,129, +249,211,203,120, 85,238,209, 42, 2,157,252, 18, 92,151,126, 48,208,106,160,201,140, 2,147,147, 0, 8,236, 32,167,132,200, 74, + 77,192,187,199,151, 42, 78, 36, 81,136, 27, 81, 48, 0,224, 31, 25, 25,137,119,239,222, 33, 41, 41, 9,124, 62,255,139,253,158, + 60,121, 2, 99, 99, 99,216,219,219,235,166,116, 85,159,247,115,161,109,156, 32,236,228,142,204, 49, 51,225,239,239,143,244,244, +116,112,185, 92, 24, 26, 26,130,166,233, 74,249, 88,172,130,140,191, 69, 94,172,178,246,113, 7, 56,188, 26,194,235, 7,214,204, +119,102, 61,243, 51,144, 39,198, 32, 69,161,213,205,147, 39, 20,128, 47,224,167, 26, 27,243,139,135, 11, 1,132, 81, 20,245,190, + 53, 96, 32, 16, 26, 93,255,109,195, 34, 59,118,144,191,145, 60, 38,180, 76,142, 94,189,122,205, 0,176,134, 16,146,211,162, 69, + 11,219,141, 27, 55, 90,136, 68, 34,188,125,251, 22,231,207,159,207,160, 11, 78,148, 34,132,172, 3,128,142,128,145,185,181,249, +237,125,171,231,155,224,193, 57,195,234,180, 34,179,198,131,254, 28, 54, 97,214,156, 61,243, 7, 65,154, 47,199,233,187, 65,184, +245,230,195, 96, 0, 79, 80,193,188,183,253, 79, 17, 3,100,244, 28, 58,116,104,240,163, 71,143,172,142, 30, 61, 10,154,166,203, +124, 29, 61,122, 20,247, 30,191,153, 7,224,181,142,102,213,116,118,118,190,247,226,197, 11,107, 62,159,143,187,119,239, 34, 39, + 39,167,216,147, 53,113,226, 68, 42, 39, 39,103,244,193,131, 7,135,125,252,248,113,251,227,199,143,179, 80,144, 11,242,179,134, +192,102,179, 63,208,180,186,145,125,227, 6,156, 17,131,186,118,149,100,133, 66,104,217, 2,207, 66, 62, 92,207, 17,103,201,217, +108,246,135,146,251,127,139,242,212, 67, 15, 61,244,208,163,106,160, 40,202,143, 16, 50,144,162, 40,191,210,223,149,254, 92,180, +223,230,205,155,139,183,139,142,217,178,101,203,166, 18,219,178,111,100, 94,133,147,225,187, 23, 42,200,238,101,237,164,124,123, + 25,202,119,215,192,117,234, 2,195,134,131,193,118,114, 67, 98,232, 3,132,220,220,137,228,136, 39, 32,140, 22,246,174,237,117, + 53, 68,209,168, 81, 35, 40, 20, 5, 83,179,148, 74, 37,184, 2, 11,197,162,233, 99,141, 0,128,225, 24, 41, 75, 40, 88,157, 8, + 77,186,120,160,125, 26,193, 75,219, 2, 71, 69,251,180,130,227, 54, 76,154, 4, 46,151, 11, 46,151, 11,170,112,234,143, 46, 66, +139, 42,220,153, 41, 24,190, 42,203, 8, 74,198, 51, 56,125,118,141, 87,123,222,199, 48, 67,101,248, 51,164, 40, 25,114, 61, 77, +251,167, 46,246,242, 5,124,145, 49,159, 31,102, 44, 20, 20, 11, 45,138,162, 62, 0, 0, 49, 48,240, 61,185,206,171,133, 32, 45, + 86,160,120,229,143, 84, 5,163, 46,135,102,221,205,155, 55,109, 56, 28,142,157, 86,171, 69, 98, 98, 34, 34, 34, 34,176,123,247, +238,180,252,252,252,238, 65, 65, 65,209, 37,181,163,214,216,240,188,239,250,249,117, 57,161, 1, 70,202, 15,225, 85,110, 61, 86, +205,190,247, 28,220,189,229,159, 51,198,175,196,247,253,251, 96, 66,247, 38, 36, 62, 37, 91, 1,224,110,161,235,181, 50,136,130, +130,130,122,119,235,214,237, 84,171, 86,173, 26, 19, 66,208,188,121,115,140, 30, 61, 26,190,190,190, 8, 9, 9, 65, 94, 94,158, +250,206,157, 59,187, 0, 28,215,209, 44,190,133,133,197,173,251,247,239, 91,243,249,124,220,185,115, 7,114,185, 28,246,246,246, +152, 51,103,142,225,150, 45, 91,126,207,203,203, 27,177,121,243,102,163,248,248,248,125,183,111,223,174,131,130,188,115, 95, 52, + 2,149, 74,117,248,180,239,137, 61,115,188,230, 58,220,127,254,214, 95, 41,201, 55,115,114, 74,202,179,182, 16,154,236,218,186, +174,182, 74,165,154, 81,118,121, 62,172, 86,121,234,161,135, 30,122,232,241, 5, 42,212, 34, 37,197, 83,105,177, 85, 21,145, 6, + 64,238,237,237,189,130,162, 40, 63,111,111,239, 21,155, 55,111,150, 3, 72,249, 59, 68, 86,177,208, 26, 56,112, 96,128,159,159, + 31, 6, 14, 28, 24, 80, 46, 5,163,133, 58,254, 17,212,241,143, 96,220,105, 30,254,216, 60,166,212,201, 51,213,182,110,208,250, +187,247,149, 74, 37,231,196,137, 19,197,243,182, 0, 64,171,213,126,243, 90,172,138,208, 42, 20,122, 95, 24,225,204, 19, 6, 28, + 94, 56,162,163,165, 86,102,160,122,114, 29, 34, 37, 67,111,143, 81,203, 94,229,144, 95,202,227,188,186, 96, 6,146, 30,223, 3, + 95, 40, 76,154,250, 40,172,216,139, 85, 40,178,226, 0,160, 14,207,196,223,103,254,247,110,118, 92,112, 85,127, 94, 64,138,146, + 81,250,124,212, 28, 47,167,177,129, 16,130,184,184, 56,200,100, 50, 4, 6, 6,226,210,165, 75, 25,101,136, 44, 56,243,132, 15, +143, 45, 29,215,193, 52,255, 19, 87,245,234, 30, 82,148,140, 78, 67, 93, 86,205,191,239,194,101, 81,119, 40, 22,219,184,103, 71, + 87, 44,152, 54, 4, 59,143,253, 65,171,108,186, 14,220,115,237,198, 72,137, 82,189, 66, 71,145, 85,236,108, 12, 10, 10,106, 18, + 20, 20,196, 3,224, 49,122,244,232, 27,195,134, 13, 67, 64, 64, 0,174, 95,191,238, 2, 32,181,112,191,245, 40, 72,148,253, 11, +128,216,242, 28,143, 92, 46,247,236,189,123,247,154,214,172, 89, 19,247,238,221,131, 92, 46,199,172, 89,179, 84, 94, 94, 94,220, +137, 19, 39, 82,185,185,185,197,158,172,192,192,192,172,242, 68, 22, 0,136, 68,162,155,151,206,159,236,220,173, 91,183, 33,117, + 93, 26,154,198,230,231,165,243,249, 70,198,143, 3, 30,112, 95,189,120,186, 79, 36, 18,189, 44,187, 60,253,117, 46, 79, 61,244, +208, 67, 15, 61,202,135, 78, 90,164,148,103,170, 42, 40,113,156,193,230,205,155, 35, 54,111,222,252,153,199,235, 43, 81,122,213, +225,159, 69,125, 90,181,226,104,105,115, 19,191, 60, 1,134,169,202,201,126,241,157,133,133, 5,109,108,108,252,153,208, 98,116, +228,204,190,114, 6,177,179,199, 22,123,178,138, 60, 91,232, 59,241,171,132, 22,195, 48,129, 0, 62, 51,130,111,227, 58,102,215, +160,198, 93,154,212,117, 96,105,206,239, 70,178,140, 86,172,137, 82, 43,222,229,147,193,145,101, 76,178, 46,230,164, 53, 48, 18, + 24, 39, 24, 11, 5,165, 69,214, 71, 0, 16,216,186, 12,219,222,175, 97,247,150, 13,235,179,232,115,191, 66, 36,211, 72,188, 35, +213,234, 88, 41,185, 92, 78, 25,174,233,211,167,207, 26, 75, 75, 75,163, 61,123,246,152, 57, 57, 57,129,166,105, 85,105,145,197, +183,113, 29,179,251,251,102, 93, 92,237, 44, 88,154,139,123,145, 36,215,202,118,199,106,126,215, 69,100, 89,153, 9,111,251,108, +154,109,204,231, 25, 64,161, 80, 96,203,129,139,184,243, 52,124, 96,102,248,213,219, 0,110,127, 69,131,156, 58,112,224,192,157, +235,215,175,135, 70,163,193,148, 41, 83,240,225,195,135, 59, 81, 81, 81,187,107,215,174,189,120,233,210,165, 53,237,236,236, 48, +114,228, 72,174, 70,163,153, 88, 14,199,214,211,167, 79, 15,108,217,178, 37, 2, 2, 2,144,147,147, 3,123,123,123,120,121,121, + 25,110,222,188,249,247,188,188,188, 17,155, 54,109, 50,138,139,139,171,208,147,245, 89,187,214,106, 55, 28,218, 57,123,113,187, +142,110,172,152,152,104, 58,177,189, 59,235,193,189,235,143, 44, 45, 45,127, 79, 76, 76,252,171, 60,135, 52,175,114,121,234,161, +135, 30,122,232,241,109, 64, 81,212,159,133,243,174, 62,243,114,149, 22, 97, 69, 30,171,146,219,165,247, 47,252,253, 91, 60, 44, + 31, 46, 67,120,125, 30,222, 97,224,192,129, 58, 47,171,103,164, 25, 58,137,167,210,232,223, 16, 26, 7, 33, 56, 43,220, 89,224, + 10, 44, 20,131,214,223,189, 95,222,190, 2,129, 64,103,143, 22,163, 84, 84, 86, 41, 85, 18, 90,133,115,180,110, 17, 66, 62, 19, + 90,102,182,174,238,203,150,206,223,229, 54,172, 47, 43,109, 90, 39,228, 72,148,202,165,111,105, 38, 89, 86,177,200, 42,232,197, + 53,241,124,129, 48,204, 72,192, 47, 41,178, 18, 1,192,200,166,126,251, 37, 11,230, 28,232, 49,102, 16,149, 49,203, 13,226, 28, +185,114,113, 4, 77,137,228,100, 68, 36,240,160, 44,186,251,247,239, 31, 2,112,200,221,221, 61, 77, 32, 16, 64, 34,145,124, 81, + 7, 69,246,118, 25,214,151,149, 54,181, 3,178,165,106,229,210, 8, 26, 41,114,230,108,101, 34,203,218,220,228,182,207,198,217, +252,148,228,143,224,114,185, 16, 10,133,184,251, 36, 12,153, 17,215,190, 70, 96,129,197, 98,173,245,246,246, 94, 51,103,206, 28, +100,101,101,225,250,245,235,232,223,191, 63,206,156, 57,227,116,227,198,141,157, 30, 30, 30, 96,179,217,240,243,243,131, 70,163, +121, 95, 14,205,144,233,211,167, 47, 30, 54,108, 24, 94,190,124,137,212,212,212,207, 60, 89, 57, 57, 57,163, 15, 28, 56, 48, 44, + 62, 62,190, 82, 79, 86, 41,180,119,174,223,154,187,124,213, 14, 40,101,233,156, 12,209,243, 0,255,187,172,103,217,217,217,124, + 0,185,213, 45, 79, 61,244,208, 67, 15, 61,116,246,106,149,167, 69, 50, 10, 69, 84, 70, 89,219, 37, 4, 86, 89,219, 84, 41, 47, +152,170,212,239, 33,127,231, 57,233,228,209,226,216, 54, 3,157, 22, 94, 66,104,165,127,246,187,145, 73, 13,157,134, 14, 53, 52, + 56, 62,199,139,227,104, 25,101,101,101, 25, 89, 89, 89, 41, 74, 10, 4, 62,159,143,154, 53,107, 66, 44, 22,227,240,225,195, 64, +229,147,162,105,211, 97,227,209,126,204, 20,188,114, 52, 4,209,168,139, 61, 91, 62,147, 38,125, 38,182,184, 92,110,209,220,176, +202, 58,221, 23,133,158,166,103, 0, 72,107,151,186, 63, 27, 9, 4,147,140,172,106, 89, 45,152, 61,213, 32, 62, 93,137,251,110, +203,115, 46,110, 93, 38, 76, 34,194, 57,137,200,125, 90, 9, 95,236,119, 7, 79,150,246,100, 37,183,114,169,187,210,136,111, 52, +205,176, 70, 29, 59,239, 69,179, 13,226,211,148,212,253,246, 75,243, 46,253,178,148, 31, 7,147,197,201,200,121,160, 67,245,172, +233,223,191,255, 26, 66, 8, 97, 24,102, 21, 0,148,180,119,145,215, 52,131,216, 79, 10,248,187,173, 20, 95,218,186,204, 36, 9, + 21,219,107,213,252,251, 46,182, 22,166,183,125, 54,205,225,167,138, 18,192,227,241, 96, 98, 98,130,164,180, 92, 24,112,216,242, +175,108,111,188,174, 93,187, 46,155, 61,123, 54,194,194,194, 48,107,214,172,212,196,196,196,203,231,206,157,155,181,122,245,106, +142,167,167, 39, 82, 83, 83,177,109,219, 54,205,147, 39, 79, 54, 1,216, 86,102,123,228,112,166,254,252,243,207, 36, 37, 37,133, +138,139,139,131,189,189, 61,230,206,215,143,113,139, 0, 0, 32, 0, 73, 68, 65, 84,157,107,184,105,211,166,226, 57, 89, 85,241, +100, 21, 65, 36, 18, 5,220,185,247, 12,131,111,238, 2,173, 81, 6,228,100, 37, 62,122, 23, 43, 14,168, 97,104,248,163, 67,235, +230,213, 42, 79, 61,244,208, 67, 15, 61,190,137, 23,235, 85, 69,219,255, 5, 40,107,232, 80, 39,161,245,126,239,202,201, 46,147, +231, 44,129,177, 83, 23, 40, 35,175,128,145,164, 21,123,180,140,132, 22,168, 81,187, 49,114,164, 74, 92,240,127, 3, 0,239,171, + 98, 85,126,126, 62,218,180,105,131,253, 19, 93,123, 40,242,179,140,140, 1, 40,121,166,138,171,134, 93,239,223,184,113, 67,198, + 48,204, 89, 0, 55, 42,161, 89,219,180,105,211,125, 59,118,236, 48,108, 60,102, 50, 36,207, 31,151,246,160,192,216,216, 24, 60, + 30, 15,161,161,161,184,127,255,190, 10,192,218, 74, 42,244, 5, 77,211, 33,231,206,157, 75,110, 80,215,161,111,155, 86, 45,230, +173, 88,238,109,242,246,241, 29,172,218,180,143,105,208,214, 51,119,203,153,171,249,185,194,218, 61,229,169, 81,193, 58,156,106, + 72, 41,145,149,210,200,185, 86,143, 86,205,154, 46, 89,181,106,165,105,196,227,187, 88,253,139, 15,113,105,217, 43,247,151, 75, +215,242, 50,249,117,250, 40,210,223,189,212,165, 12, 3, 2, 2, 14, 1, 56, 84,180, 93,218, 94,239,245,187, 25,215,118,125,197, + 91,206, 92,146,230,153,212,238, 85,145,189,214,141,135,116,118,180,182,184,189,119,195, 76,254, 39, 81, 34,120, 60, 30,132, 66, + 33, 18, 83,115,176,102,215,121,169,154, 97,250,126,173,208, 50, 49, 49,225,169,213,106,236,223,191, 31,137,137,137,157, 0, 36, +190,126,253,218,103,212,168, 81,123,154, 55,111,222, 40, 34, 34,226,189, 68, 34,153, 3,224, 93,121, 36,230,230,230,157,172,173, +173,169,103,207,158, 97,230,204,153,170,185,115,231,114, 39, 76,152, 64,137,197,226,234,122,178, 0, 0, 14, 14, 14,238,189,123, +118, 68,151,222,179, 2, 84,138,156, 71,241,239,126, 15, 96,145,167, 70,213, 45, 79, 61,244,208, 67, 15, 61,254,103, 80,189,192, +224,238, 0,199,213, 18, 51,154, 58,112, 63,249,110,157, 75,242, 99, 3,137,252,229, 33,146,119,101, 26,249,115,219, 4,114, 99, +239, 2, 50,107, 64, 83,210,200,134,250,228,106,137, 25,238, 95, 10,183,207,178,123,247,111, 8, 77,239,250, 32,189,235,131, 12, +112,133, 6,192,138,214,173, 91, 95,245,106,255, 87, 28, 45,175,246, 32, 0,102, 2, 16,150, 99, 86, 89, 25,195,237, 1, 28,110, +211,166, 13,253,224,193, 3, 18, 53,162, 23, 9,106,100, 69,230,204,153, 67, 86,175, 94, 77,198,142, 29, 75,172,173,173,233,194, +130,176,175,140,115,240,224,193,142, 0, 80,171, 86, 45,243,182,141, 27,124, 10,245,191, 78, 30,249,238, 33,199,188,134,146, 14, +205, 27,103,218, 53,234, 22, 98,108,223,176, 85, 37,197, 87,204,105,103,103,183,156, 16,210,151, 16, 98, 15, 0, 46, 46,150,194, +214,141, 26,164,132,220,187, 78, 30,159,220, 71,142,121, 13, 37, 29, 91, 52,201,114,108,236,241,206,200,166, 81,123, 93, 56,203, + 66,153,246, 54,107,148,105,219,160,115,112, 5,246, 22,115,214,109, 63,242, 90,114, 74, 26,121,241,226, 5,185,113,227, 6,121, +252,248, 49,241, 61,119,141,212,110, 55, 66, 98,213,252,251, 46, 85,104, 58,229,217,105, 54, 96,192, 0,242,254,253,123,210,175, + 95, 63, 2,192,172,154,156, 87,227,227,227, 73,120,120, 56, 89,177, 98, 5, 1,112, 98,246,236,217,242,220,220, 92,210,171, 87, +175,196, 66,129,197,169,142,157,245,156, 29,182, 12, 25,212,117,173,215,204, 97,238, 95, 91,158,223, 16,122, 78, 61,167,158, 83, +207,249,191,192,249, 79,134,125,161, 87,171,232,189,181, 78, 30,173, 0,128, 70, 22, 14, 53,179, 81,159,218,180,109,239,143,251, + 15,157, 88,178,108,222, 84, 65, 87,183,222, 8,187,247, 27, 46,249,157,147, 42,148,170,109, 92, 54,118,132,103, 65, 22, 93,137, + 21,133,113,180, 62, 67, 80, 80, 16,191, 70,253,191, 98, 48,197, 20,196,102,245,169,226, 9,166, 2,152,254,230,205,155, 29, 30, + 30, 30, 27,167,117,105, 63,212,171,115, 15,104, 52, 26,248,250,250, 34, 33, 33,225, 50,128,149,186,122,220,194,194,194, 50,155, +212,119,154,111,192,230, 44,153, 51,118,136,117,198,135,183, 72,142, 12, 2, 0, 40,149,114,205,167,247,143, 90, 86,197, 56, 99, + 99,227, 23,214,214,214, 81,214,214,214, 98,215,186,181,166,243, 96,176,106,214,232,239,108,178,226,223, 33, 41,162, 96,100, 84, +169,144,169,147,223, 63,104, 84,157,218,117,114,114,226, 9, 12, 48,163, 76,123, 85, 10, 77, 90,204,187, 86,186,240,200,148,170, + 77,235,118,250,246,217,176,100, 18,207,212,212, 20,111,194, 99,176,234,215, 51, 82,185, 74,211, 55, 51,236,234, 55, 25, 30, 35, +132, 64,163,209,232,188,208,161, 28, 44,107,217,178,101,195,141, 27, 55,186, 76,156, 56, 17, 95,235,201, 42,137,216,120,145,183, + 67,173,122, 77, 98,162,222,120,212, 48,230,158,250,154,242,212, 67, 15, 61,244,208,227,127, 6, 3, 10,157, 57,211, 75,188, 7, + 85, 42,180,138, 16,158, 14, 25,128,245,117,217, 18,159,229, 27,119,174, 97, 81,187, 38, 49,132,252, 70,179,176, 46, 46, 11, 25, + 95,105,156,204,128, 3,186,207,247, 99, 57, 0, 96,192,169, 94, 7, 89,136,247, 0,134, 29,121,250,178,221,145,167, 47,127, 42, +252,110, 3,128, 42,141,229,154,112, 16,238,214,164,158, 67,215,214, 77,141,216, 90, 57,146, 35, 63, 32, 91,170,192,221,136,132, + 28, 22, 97,253, 86, 85,163,226,226,226, 30, 2,128,173, 25, 63,178,107,147,250,181,187,181,105,202, 55,160, 84, 72,126,251, 6, +185,114, 21,238, 68, 36,228,130,162,170, 61,161,250, 91,217,155, 22,118,237,213, 31,160,122, 81, 20,117,111,133,215, 24,222,154, + 95,207,126, 83,145, 5, 64, 38, 18,137,178,100, 50,153,101, 74, 74,138, 10,213, 15, 18, 23,147,151,151,215,124,193,130, 5,235, + 23, 47, 94,188,100,235,214,173,220,234,204,201, 42, 15, 98, 81,194,149,110, 77,191, 93,253,235,161,135, 30,122,232,241, 63,129, +233,165,222,161,179,208, 42, 22, 12,233,200, 0, 48,167, 94, 61,178, 40, 54, 22,170,111,101, 89, 89,158,174,175,196, 43, 0,131, +170,125, 52,139,202,127,254, 62, 65,242,226,125,130, 4, 12, 33, 12, 33, 74, 22, 11, 73, 82,181,122,211,251, 56, 81,245, 87,221, + 81,148,246, 85, 76,162,252,245,135, 36, 5, 97, 24,194, 16,162,162, 40,124,210,104,152, 77, 17,113, 9,215,254, 27,236,205, 12, +187,250,212,143,166,186, 62,125, 17,190, 72, 42, 85,239,203,140,188, 26,248, 13,235, 69, 19, 22, 22, 54,174, 83,167, 78,147,181, + 90,173, 15, 0,205, 87,112,169,104,154, 94,182,101,203,150,203, 97, 97, 97,231, 3, 3, 3, 83,191,133,200,250, 91,235, 95, 15, + 61,244,208, 67,143,127, 43,170,151, 84,186, 60,124, 75,145,245,223,136,240,152,143,109,254, 14,222,136,152,143,205,254, 9,246, +166, 69, 94,121,157, 6,140,254,155,138,247,142, 86,171,189,243, 45, 69,245,173, 91,183,156, 81, 70, 90,157,255,182,250,215, 67, + 15, 61,244,208,227, 95,139,233,229,137, 47,142,190,108,244,248, 23,128,124, 43,145,165,135, 30,122,232,161,135, 30,213, 64,185, + 30, 45, 10,229,175, 28,184, 87,133, 63,168,206,234,131,123,122, 78, 61,167,158, 83,207,169,231,212,115,234, 57,255,231, 56,255, +141,176, 71,193,132,248, 63, 11,223, 43, 20, 95,223, 18,250,165,175,122, 78, 61,167,158, 83,207,169,231,212,115,234, 57,255,237, + 40,115, 34, 60, 80, 48,121, 88, 15, 61,244,208, 67, 15, 61,254, 46,240, 10, 95,213,253, 93, 15, 61,254,137, 98,171, 88,112, 85, +103,142, 86,131,194,247,152,191,209, 88, 47,123,123,251,233, 45, 90,180,104,204,229,114, 89,249,249,249,235, 30, 60,120,176,182, +244, 78, 93,155,112, 94,179, 89,112,252,235, 27, 10,160,216, 0,139, 5, 45, 65,242,227, 80,121, 91,125,189,255, 87,195,201,216, +212,250, 15,138,197, 54,212,210,106,104, 53,106, 20, 76,183, 42, 0,195,208, 9, 90,181,210,179,188,131,237, 90, 14,169, 77,107, +153,173, 0,217, 15,176,102, 3,204, 1, 10,156, 89, 4,244, 65, 10,236,153, 96,147, 95,160,165,150,114, 12,216,203, 83,131, 46, + 38,253, 27, 10,236,194,133, 11,236,175, 57,126,196,136, 17,101, 38, 16,173, 89,179,166, 31,159,207,175, 95,222,113, 82,169, 52, + 53, 53, 53,213,227, 95,222, 30,187, 1,216, 11,160,105,169,239,223, 1,152, 15,192,255,107,255,192, 29,224,216, 2, 51,184,192, + 82, 0, 80, 3,191,164, 1,135, 2,254,139,230, 24, 90, 91, 91, 63,226,112, 56, 46, 82,169, 84,154,159,159, 95,207,196,196, 36, + 86, 32, 16, 8,104,154,126,159,145,145,209,173,138,116,179,241, 87, 42,173, 37, 0, 14, 84,241,119, 61,244,248,167,224,171, 86, + 29,186, 22,220, 31,224, 14,160, 91,187,118,237,108,165, 82, 41,222,189,123,151, 6,224, 17,128,128,194, 87,244,183,176,148,197, + 98,109,223,185,115,231,143,115,231,206, 45, 78, 6, 29, 26, 26,138,150, 45,191,140, 17,202,102,193,241,193,245,123, 54,175,194, +162,209,174,215,240, 66,161,197, 2,164,169,240,232,221,190,186, 38,152, 88, 88, 88,172,163, 40,106, 4,139,197,170,180, 83, 99, + 24, 70, 75, 8,185, 32, 22,139,215, 0,200,175,202, 31, 9,248, 60, 13,173,213,150,249, 31, 28, 54, 91, 43,149, 41,203, 13,123, + 81,163, 70,141, 64, 22,139, 85,183,100,194,108,224,243, 4,218,229,253, 70,211,116,114,102,102,166, 46, 34,212,136,197,225,206, +167, 40,110,111,176, 24, 87,128, 2, 5, 86, 52,163, 85,221,101,104,245,110, 0,138,175, 17, 89,246,181,234, 61, 94,184,114,139, + 99,120,228, 59,172,240, 26,139,173,123, 79, 96,249,252,201,216,125,248, 12,230, 79, 31,131, 38, 77,154,162,162,180,226, 12,184, +155, 86,206, 27,209,107,243,254,243,110,203,231,140,224,109,222,127,161,235, 10,175, 81,134,155,246,157,239,186,194,107, 36,111, +243,190,243,110,203,231,141, 48,222,116,224, 34, 3, 96,124,117,140, 28,227, 82, 83, 74,209,116,153, 79,219,132,195, 81,158,121, +159, 34,248,255,184,162, 39, 78,156,216, 66, 46,151,191, 25,219,187,245,150, 86,174, 14,162,178,246,201,250, 36,114,136,141, 10, +242, 54,224, 26,183,249,206,251, 68,104,133, 46, 7, 30,175,238,187,119,239, 92, 24,134,129, 86,171, 5, 77,211,197,239, 42,149, + 10,221,186,117,251, 86, 11,103, 6, 1, 88, 87,112,177, 98, 51,128,243, 95,193, 37,228,112, 56, 11, 13, 13, 13,221,105,154,110, + 12, 0, 6, 6, 6,145, 74,165, 50,128,166,233,157, 0, 36, 85,228,219, 37, 18,137,154, 8,133, 66,168,213,234,226, 4,244,108, + 54,187, 81,237,218,181,247, 43, 20, 10,151,175, 61,121, 91, 96, 70,103, 55,183,221, 19,126,252,145, 45,127,244, 8,187,143, 31, +223,133,188, 60, 0,216, 95,217,177,134,134,134,183, 89, 44,150, 83, 85,254,143, 97,152, 4,149, 74,229, 89,149, 99, 56, 28,142, + 75, 74, 74,138, 77,205,154, 53,145,159,159, 15,129, 64, 32, 40,218,174,134, 39,107, 27, 33,196,184,240,222,190,187, 99,199,142, +157, 40,138,162, 1, 16,134, 97, 88, 47, 94,188, 24,195, 48, 12,167,240,254,180, 13,192,113, 0, 74,125,159,173,199, 63,212,155, +117,184,170, 66,235, 6, 0,247,118,237,218, 25,143, 30, 61, 26,238,238,238,112,113,113,129,145,145, 81,193, 77, 60, 43,203, 54, + 56, 56,120,228,163, 71,143, 70, 94,191,126, 29,111,223,190,149, 3,120, 2,160,204,139,186,231, 64,183,185, 70, 66,222, 30, 0, +200, 72,206, 74, 77,142, 75,223,147,154,154,186, 13, 64,201, 16,225,245,198,143, 31,191,104,222,188,121,240,243,243,195,153, 51, +103,160, 84, 42,145,159, 95,129,126,145,165, 67,124,127, 11, 32,136, 7, 18, 3, 0,190, 13, 32,176,173,118, 73, 89, 88, 88,172, +155, 63,127,254,130, 38, 77,154, 20, 71, 49,215,104, 52,160,105, 26, 26,141, 6, 98,177, 24,139, 22, 45, 42,232,104, 9, 1,195, + 48,248, 63,246,190, 59, 44,138,171,109,255,158,217,190, 44,189,131, 34, 42,138,130, 32, 86, 4, 44,216, 75, 68, 99,141,177, 39, +154,248, 38,177,196,146,136, 45, 26, 27, 36,214, 24, 53,106,212, 88, 94, 27,118,177,183,104, 98, 71, 4, 41, 10,138, 52,169, 75, +221,133,109,179, 59, 51,191, 63,128, 21, 17,118, 23,147,239,247,189,223,155,189,175,107,175,217,217,153,121,246,204, 57, 51,231, +220,231,126,206,121,206,197,139, 23,103,125,254,249,231, 40, 45, 45,157, 91,159,205,160,206, 30, 49, 36, 65, 54,173,209,106, 88, +154,126,125,255,201,235, 46, 58,154,230,168, 84, 84,189, 43,149,139, 68,124,131, 36,143,199,227, 53, 77, 58,123,214,153, 20, 8, +192,210, 52,192, 48, 96, 25,166, 58, 59,171, 63,108,213,111, 44,205,128,213,210, 96,116, 12,116, 74, 53, 2,191,252,210,148,172, + 8,225, 9,196,135, 39,126, 54,223,181, 91, 80, 16,175,185,135, 59,116, 52,131,151,233,175, 93, 31,199,220,239, 30,181,127,219, + 23, 26,165,124, 60,128,247,138,179, 37,176,176,190,178,245,151, 95,155, 62,122,146,128,235, 55,111,227,218,141, 91, 0,128,203, + 55,239,214, 16,110,163, 69, 5, 93, 69,251, 57,211, 70, 8, 35,183, 30,225,205,153, 54,146,243,195,214,163,188,217,159,126,200, +137,220,114,152, 63,251,211, 15, 57,145, 63, 31,230,207,158, 54,130, 19,241,211,158, 0, 0,118, 0, 74, 27, 50,214, 80, 25, 17, + 58,157,240,223,105, 5, 28, 0,144,238,216, 1,109, 97, 33,220,151, 47, 7, 0, 76,244,114, 49,217,221,225,232,232, 24,195,227, +241,154, 26, 59, 79,171,213, 26, 37,193, 83,167, 78,237,160, 84, 42, 99,116, 58, 29,203,229,114,195, 39,140, 28,120,122,112,207, + 14,197,181,207,137,143,143,115, 88,187,246,236,136, 99,143,229,236, 71,157,173, 30, 71,175,159,218, 37,108,193,190, 56, 3, 13, + 50,169, 86,171,145,154,154,138,218,139,188,215, 2,253,190,125, 39, 0, 63, 57, 56, 56,116, 43, 46, 46,158, 8, 96,177, 76, 38, + 11,224,112, 56,176,183,183, 95,172,209,104, 94,218,216,216,236, 46, 47, 47,191, 91,173, 26,153,186,100, 64, 47,107,107,235, 3, +167, 78,157,178,235,212,169, 19, 89, 84, 84,132, 22, 45, 90,160,164,164, 36,240,246,237,219,157,167, 77,155, 54, 77, 46,151, 79, +174,238, 12,154,138,182, 22, 22, 22,236,148, 41, 83, 8,154,126,115,187,123,246,236,193, 32,127, 93, 43, 39, 91, 11,133, 74,195, +150, 95, 79,181,249, 23,159,207,255, 51, 51, 51,179,188,177,153,193, 7,190,157, 50,127, 62,199, 50, 35, 3,150,113,113,152, 40, +147,113,127,168, 82,183,140, 18, 45,146, 36, 61, 15, 28,254,205, 91, 32, 16, 64,167,211,233,201, 96, 77, 29,165,213,106, 65, 81, + 20,180, 90, 45,104,154,134,150,210, 34, 98,245,143,239, 93, 23, 90, 88, 88, 88,184,185,185, 21, 88, 88, 88, 88,252, 29,173,144, + 80, 40,228,238,223,191,127,188, 64, 32, 0, 0,104, 52, 26,248,251,251, 19,230,246,217,140,255, 50,178,245,142,202,101,136,104, + 13,145,201,100,160,105, 26, 86, 86, 86,224,112,222,110,247, 29, 28, 28, 48, 96,192, 0,244,234,213, 11, 31,127,252, 49,146,146, +146,196, 31,127,252,241,128,134,140, 77,152, 31, 6, 15,111,151,234,198,132,113,187,115,254, 73,228,158, 85,199,157,242,243,243, +231,215, 58,109,218,140, 25, 51,136,226,226, 98,140, 29, 59,246,182, 90,173, 30, 14, 64,214,144, 77,154,193,235, 62, 31, 79, 4, +195, 18,226, 77, 15,126, 37, 52, 42, 37, 75,146,164,178,198,117,248, 62,185, 68, 16,196, 88,119,119,119, 28, 57,114, 4, 26,205, +187,225,194,172,173,173,145,152,152,248, 70, 85,227,112, 16, 20, 20,196, 33, 8, 98, 44,128,185,245,219, 36,155,222,121,148,225, + 92,179, 31, 54,192,143, 31,212,153, 44,200, 45,168,100, 1, 16, 75,150, 44,209, 19, 55, 0,248,254,251,239, 77, 73, 39, 72, 30, + 15,210, 91,183,222, 84,196, 92, 18, 36,159, 0,193, 3, 72,110,149, 23, 21, 44,192,210, 0,163, 3, 24, 45, 32,114,243, 48, 37, + 27, 2,155, 52,243,142, 94,187,113,187,173, 90,203,226,200,153,235, 72, 79,127, 5, 14, 73,194,171,149, 55, 6,246,238,201,235, +220, 53,216,227,199, 21,243,207,229,102,189, 24, 2,224, 97,163, 51,154, 97, 69,173,154, 57, 98,247,158,199,112,178,179,196,216, + 17, 31, 64, 44, 18,226,135,159,127,195,234, 69, 51,225,237,229,137,157,155,215, 52,120,185,141,141,205, 74, 95,239, 86,158,219, +247,159,135,175,143, 15,103,251,129,243,240,109, 87,189,245,243,229,108, 63,112, 30,237,252,218,113,182, 31, 56,143, 0,191,182, +205, 99,242, 30,172, 44, 41, 41,153,217,112,126,214, 41,163,129, 85,101,196,171, 96,244, 13, 65,198, 23, 95, 0,128,158,104, 53, + 6, 60, 30,175,105,110,110,174,179,177,243,140,169, 6,213, 74, 86,140, 78,167, 67, 97, 97, 33, 81, 86, 86,198,218,218,218,142, +184,180,115,241,169, 65, 61, 58,148, 0, 64, 92, 92,156,125, 68,196,218, 17, 71, 99,100, 80,222,223, 74,252,251,236, 45,102,226, +240,208,152, 51,145, 83, 59,163,122, 73,136,186, 80,171,213,233, 29, 59,118,100,171,191, 55, 17, 10,133,252, 58,207,155,123,235, +214,173,223, 81,173, 77,112, 41,254,116,239,222,189,153,237,218,181,131,143,143,207,221,110,221,186, 89, 75, 36, 18, 92,186,116, + 9,190,190,190,126,214,214,214, 15,162,162,162,120, 11, 23, 46,236,176,119,239, 94, 0,152,101, 66,118,246,239,211,167,207,145, +232,232,104, 17,159,207,135, 82,169, 68, 98, 98, 34,108,108,108, 32, 16, 8,240,225,135, 31,114,186,119,239,238,208,187,119,239, + 19, 41, 41, 41,227,209,136, 25, 80, 42,149,138, 93,188,120, 49, 44, 44, 44, 96, 97, 97, 1,137, 68, 2,137, 68, 2, 75, 17,136, + 29,115,154,137,103,239, 42, 19,207, 93,190, 35,242,192,246, 21, 55, 61, 60,152,239,178,179,179,203, 26,251, 44, 40,111,223,134, +101, 92, 28, 80,235,221, 53, 21, 54, 18,123,132,135,135, 27, 83,164,192,231,243, 17, 18, 18, 98,212,158,189,189,253, 73, 46,151, +251, 86,207, 84,167,211,137,194,195,195,233,148,148, 20, 9, 73,146, 18,134, 97, 16, 30, 30, 78,235,116, 58,145,179,179,243, 93, +134, 97, 10,138,138,138, 70,153,144, 92, 53,128,111, 72,146,252, 73, 40, 20,114,155, 55,111,158,185,108,217,178,123,213,106, 38, + 88,150, 37,155, 55,111, 30, 40, 22,139, 61,213,106,181, 14, 85,174, 67,179,154,101, 70,189, 96, 89,182,115,149, 40,172,135, 6, +128,160,250,123,113, 85,107, 7,199, 58,191, 3, 64, 81,117, 71,209,165,129,253, 98, 0, 73, 0,218, 2,112,174, 62,246,136, 32, +136,146,247, 72,102,195,138, 86,116,116,180,190, 11, 27, 22, 22,166,111, 88,172,172,172,240,232,209, 35, 16, 4, 1, 43, 43, 43, + 88, 91, 91,195,198,198, 6, 50,153, 12, 73, 73, 73,120,246,236, 25, 50, 50, 50, 64, 16, 4,188,188,188, 80,243, 2,213,130,190, +130, 59,180, 33, 26, 34, 75, 33, 8, 2,232,212, 55, 0, 1,189,252,209,245, 97,218,156,152,107,196,174,188,188,188, 84, 0, 92, +127,127,255,105, 65, 65, 65,216,184,113, 35,212,106,245,198, 6, 72,150,222,230, 31, 73,186, 46, 0,224,230,230,182,224,224,165, +151, 22,147, 6,183, 82,228,229,229,173,127,143,204,121,171, 34, 46, 42, 42, 50,121, 45, 62,134, 97, 80, 90, 90,106,208,102, 93, +133, 96,211, 79, 91,109,229,229, 5, 88,245,195, 65,104,181, 90,204,159, 63, 31, 12,195,232, 63,101,101,101, 38,165,147,165,233, +119,181, 3,178,202,123, 74,112,129,102,227,170,120, 69,214,145,173, 32, 88,128,160, 1,188,123, 95,117, 27, 33, 17,135, 47, 62, +186,226,135, 45,182,177,207, 94,227,204,245, 88, 80,178, 28,228,197,157,170,146, 28, 67,198,227,152,154,131,110, 1,173,240,245, +146, 31,237,150,126, 61,249,168, 70, 41,247,193,219,110,196,107,198, 95, 26, 26,171, 86,174,196,174, 45, 27,241,227,198, 45,144, +149,151,129,199,115,172,174,232,105,208, 52,109,248,222, 89,118,112,248,156, 79,136, 31,126, 57,137,192,118,110, 56,113,233, 33, +122,116,244,196,169, 43, 49,232,213,185, 5,206, 92,139, 69,223,110,173,112,225, 86, 2,190,158, 49,158, 24,127,121,239,224,198, +148,209,230,205, 91,109,229,178, 2, 68,175,217,143,194,109,219,144, 57,115, 38, 2,171,207,121, 72, 16,224, 55,109, 10,240,141, +151, 81, 93, 36, 39, 39, 67,173, 86,215,215,219,135,175,175,175,209,114, 87, 42,149,143,117, 58, 29, 91, 80, 80, 64, 20, 20, 20, + 64, 34,145, 16,137,137, 9,180,159,159,255, 72,246,217,241, 95, 1, 32, 34, 98,237,200, 99,143,101, 80,220,221, 2,229,189,159, +193,111, 17, 79,238,250,126, 6,245,249,242,157,143,107,189,163,111,165, 51, 63, 63,127, 72,126,126, 62, 0,160,101,203,150,207, + 82, 82, 82,218,214,184,154,171, 93,136,124,157, 78,231, 93,227, 78,212,233,116, 80,171,213,232,223,191, 63,199,208,189,219,217, +217, 5,249,250,250, 34, 54, 54, 22, 91,182,108,177,239,211,167, 15, 94,188,120, 1,130, 32,176,118,237, 90,162, 93,187,118,188, +162,162, 34, 12, 26, 52, 8, 39, 79,158, 12,145,201,100,198,242,211, 74, 34,145,236, 61,119,238,156,136, 36, 73,200,229,114, 48, + 12,131,238,221,187,131, 36, 73, 36, 36, 36, 96,201,146, 37, 56,121,242, 36, 78,159, 62, 45,238,220,185,243, 94,133, 66,225,139, +183,221,250, 13,149, 17,171, 82,169, 88,161, 80, 8,161, 80, 8,145, 72, 4,145, 72, 4,129, 64,128, 10, 21,240,249,166, 76, 53, + 71,228,200,248,117,236,209,234,147,217,107,201,245,203, 62,189, 1,224,140,169,207, 60, 80, 53, 38,235,167,223,126,219, 50,177, +188,156, 4,128,221, 4,193, 80, 44,251,163, 41,239, 59, 0, 84,168,202,225,233,213, 20, 39,142,158,198,232,113, 35,234, 37, 89, + 60, 30, 31,124, 30, 15,214,246, 18,163, 54,249,124,190,203,179,103,207, 28,120, 60, 30, 88,150, 5, 77,211,160, 40,170, 96,233, +210,165, 78, 67,135, 14,181,186,120,241, 34, 57,116,232, 80,198,206,206,174,242,225,195,135,133, 58,157,206,161,103,207,158,141, +121,230,183, 7, 4, 4,116, 58,117,234,212,167,225,225,225, 49, 11, 22, 44, 88, 85,251,224,186,117,235, 86, 94,184,112,193,115, +228,200,145, 7,226,226,226,182, 55,166, 14,249,171,245,188,217,230,127,158,205,134,184, 72, 53, 92, 8,130,136,174, 85,103,135, +213,236,135,135,135, 47,142,136,136, 72, 36, 8, 34,186,246,239, 53,231, 85,119, 22,163,235,219,175,190,214,126,209,162, 69,254, +145,145,145,107,131,131,131,143,220,189,123,247, 21,128,198, 18, 45,195, 99,180,106,110,168,246, 77,214,105,212, 32,147,201, 32, +147,201,144,157,157,141, 29, 59,118, 84,191,208, 60,112,185, 92,112,185, 92,253,120,134,134,112, 61,250,207,159, 1,252,220,169, + 83, 39,222,211,123, 81, 23,191,221, 53,187, 95,151,254,157, 56,143,175, 63, 29,131,170,245, 8,135, 76,153, 50,197, 17, 0,246, +239,223, 95, 4,224,226,255, 18,107,142, 74, 77, 77,253,218,205,205, 77, 63, 70,165,182,251, 80,167,211, 65, 36, 18,161,102, 44, +139, 74,165,194,142, 29, 59,116, 44,203, 70, 25,176,137,148,196, 27, 72, 77,188, 89,117, 29,195,128,161,223, 92,191, 98,197, 10, +176, 44,171,111,236,191,168, 86, 78,140,146,188,250,242,156,173,179,173,243, 59, 75,211, 70,220, 19,252,217, 99, 38,207,116, 99, + 8, 46,206,222,120, 2, 30,143, 7,166,150,154,201,227, 84,245,150, 19, 95,228,194,221,197, 15,195,199,207,112, 61,117, 96,235, +108, 29,165,250,161,177,121,237, 19, 16,140, 57, 95,127,141, 95,119,237,194,146,229, 43,245, 12, 64, 71,211,208, 25, 77, 39, 73, +246,239,238, 15, 93, 69, 46, 56, 28, 14,250, 6,182, 2,135,195,193,128,224, 54,224,112, 56, 24,212,221, 7, 92, 46, 23,131,123, +180, 67,235,214,173,193,229,114, 73, 35,229,142,148,196,235, 72, 77,252,189, 22,233,101,193, 2,160,242,242,222, 57, 95,155,151, + 7,182,153, 67, 99,159, 45, 76,155, 54,173, 44, 59, 59,155,170,123,204,195,195,131,127,251,246,109,219, 6,220,118,122,136,197, +226,206, 92, 46,247,113, 73, 73, 9, 99, 97, 97, 65, 50, 12,205,248,249,249,115, 46,237, 92,124,170,230,156, 69,139, 22,159,250, +168,179,245,200,131, 81,209, 44,191,121, 15,130,224, 9,117,159, 45,223,201,231,241,197,157, 1,165, 41,157, 7, 82,173, 86,227, +249,243,231, 48,150, 30,150,101, 13,186,126, 74, 75, 75,167,248,250,250,222,254,249,231,159,237, 9,130,192, 31,127,252, 1, 14, +135,163,255,164,165,165,129, 36, 73,124,251,237,183,148, 76, 38,155,110, 44,109, 92, 46,247,235, 19, 39, 78,216, 8, 4, 2,200, +229,114,253,123,195,225,112,240,236,217, 51,172, 95,191, 30, 83,166, 76, 65, 86, 86, 22,220,221,221, 49,127,254,124,203,200,200, +200,175, 41,138, 90,105, 66, 17,197,107, 52,154, 46, 22, 22, 22, 16,137, 68,168, 33, 92, 0,112, 37,145,151,160, 84, 42,219, 59, + 56, 40, 92,157,110, 69,159, 13,233, 51,188,131,131,147, 91,112, 94, 94, 94,163,150,206,122, 9,236, 74,167,233,165, 67, 78,157, +114,190,115,234, 20,115,255,220,185,215, 66,185,124,167,201,207,144,150, 68,102,218,107,116,238,220, 25,143, 31, 63, 70,231,206, +157,107,147, 38, 8, 4, 2,240,249,124,240,249,124, 56,218,153, 52,132,130, 37, 73, 18,119,238,220, 1, 77,211,208,104, 52,208, +104, 52,104,215,174, 93,201,205,155, 55, 45, 1, 32, 45, 45,141,157, 52,105, 82,217,131, 7, 15,208,177,163,225,245,212, 93, 92, + 92,110,115, 56,156,230,181,127, 43, 46, 46,182, 27, 53,106, 20, 74, 75, 75, 63, 24, 53,106, 84,143,234,247, 55,231,248,241,227, +147, 0, 64, 32, 16,128, 36, 73, 26,102,252,227, 97,140,139,212, 38, 74,117, 9, 87, 68, 68, 68, 88,221,223,106,147,170,250,190, +215,190, 54, 50, 50,114,109, 45,219,202,247, 72,190,241, 49, 90,209,209,209,108, 61, 12,210,100, 24, 35, 90, 53,136,141,141,213, +186,187,187,255,154,250, 36,163, 95,171, 0, 47,136, 37,194,129, 0,126, 22, 10,133,243, 38, 79,158,140,251,247,239, 35, 33, 33, + 97, 15,254,226, 44, 28,127,127,255,203, 66,161,208,179, 1, 55, 73,102, 66, 66,194,160, 6, 26,134,229,231,206,157,131,161,193, +240, 55,110,220,168,221, 40,213, 30, 12, 95,255,131,193,176,208, 82, 90, 84, 42,148,111, 26,241,106,162, 85, 89, 89,137,113,227, +198,189,165,104, 21, 22, 22, 26,189, 63,130, 32,176,254,204, 25, 92,141,138,194, 7, 29, 58,224,228,195,135,136,156, 60, 1, 62, +158, 77,192,210, 4, 88, 2,200, 58,188, 21,197,178, 10, 28,186,126, 7, 37,114, 5, 38,246,236, 9,111,107, 71,195,118,121,252, + 1,129, 65,193,252,107,119,147,192,227,113, 65,130, 1,171, 85,192,221,183, 55, 56, 36, 9, 27,151, 22,224,243,120,224,241,184, + 72,203, 46,130,175,127, 87, 65,180, 64, 52,224,125,136,150,135,103, 11,208, 52,141, 41, 83,166,224,200,145, 35,112,112,245,132, +141,135, 63, 86,111,220,133, 15,250,247, 52,122,255, 53, 61,120, 46,151, 11, 14,135,243,206,182,230,187, 41,234, 36,203,176,160, +234,150, 17,195, 2, 44,139,166,107,214,160,233,154, 53,120, 88,253,159,237, 42, 43,161, 84, 42,129,110,126,141, 34, 89, 26,141, + 6,217,217,217, 84,126,126,190, 75, 61,199, 11, 52, 26,141, 81, 98,179,111,223,190,248,169, 83,167,118,177,183,183,143,137,143, +139,211, 6,116,232,192,187,184, 99,241,233, 26,183, 33, 0,116,232,208,161,100,241,226,197,167, 39,141, 13, 27,177, 61,252, 99, +250,203,149, 7,184, 66,177,184, 75,216,130,125,241,135,199,142, 53,238,239, 81,171,211, 3, 2, 2, 88, 83,238, 75,161, 80,228, + 27, 56, 60, 12,192,247,157, 58,117,178,238,211,167, 15,110,223,190,141,209,163, 71,171, 41,138, 74, 5,128,161, 67,135,182, 57, +116,232,144, 32, 41, 41, 9, 78, 78, 78,188,204,204,204,189, 48, 50, 64, 94, 32, 16,244,238,218,181, 43,169, 86,171,223, 33, 89, +145,145,145, 24, 63,126, 60,218,180,105, 3,134, 97, 80, 81, 81,129, 62,125,250,240,182,108,217,210,219, 68,162, 53,199,199,199, +103, 61,170,102, 29,214,174, 11,147, 81,229,214, 66,113,113,113,254,147, 7,215, 19,123,246, 31,213,165,121,107,127,183,132,248, +199, 6, 13, 58, 59, 59, 47, 34, 73,242, 35,134, 97, 56, 50,153, 44,251,137, 70,211,186,157,167,167, 75,247, 17, 35, 80,206,227, +113,126,186,126,157, 44,144,203, 45, 1,152,228,130, 84,105, 43,225,233, 85, 53,212,111,244,184, 17,120,252,248, 49,198,124, 60, + 18,124, 62, 31, 92, 46,175,234,221,228, 87, 41, 90,182,142,214, 38, 61,155, 90,173, 86, 95,135,215,140,243,162, 40, 10, 53, 67, +179, 44, 44, 44,244,199,212,106, 53, 8,130, 48,244,108,120, 31, 91,185,204, 89,108,109, 3, 90,171,133,223,136, 49,250,103,250, +193,238,237, 98, 48,140,184, 44, 51, 29,179,162,206,241, 96,134, 25, 13,168, 90,134,184, 72,109,162,244, 87, 65, 16, 68,116,120, +120,248, 98, 0,108,120,120,248,226,154,253,136,136, 8, 37,128,156,247, 36, 91,239,168, 92,220,191,131,100,213,184, 23, 12,161, + 79,159, 62,179,172,172,172,182,212,236,103,223,207, 65,246,253, 28,248,182,245,235,222,169, 67,151,242,241,227,199,195,193,193, + 1, 11, 22, 44, 96, 1,236,105,236,255,167,165, 36, 90, 2, 96,221,220,220, 22, 84, 87,200, 29, 30, 62,124,232,244,232,209, 35, +116,237,218,245,141,116, 79, 81,232,209,163,135, 33, 83,242,234, 65,237,115,255, 62,149,140, 1, 69, 81, 80, 40,148,208,104, 40, +232,180, 12,116, 58, 29, 58,251, 89,225,192,174,240,170,223,116, 53,234, 89,149,106,214,212,213, 10, 86,150, 60, 45, 73, 18,202, +152,248,252,122,107, 76,141, 70,131,248,204, 76,196,101,100, 0, 0,134, 71, 24, 30,248,122,224,250,109,180,107,215,206, 88,106, + 91, 53,117,119, 69,238,213,248,170,202, 91,153,141, 71,127, 30,131,149,149, 37, 0,192, 47,116, 34,248,252, 42,162, 85,169,164, +224,216,214, 3, 4,203, 54, 24, 22,192,194,206,245, 50,151, 47,242,100,105, 6, 44,203,128,101,104,176, 44, 3, 14,143,111, 49, +235,139, 79,193, 48, 52, 2, 3, 3, 65,112, 56,160,181,106,140, 29, 54, 0,165,229,114, 56,216,154,214, 72,240,249,124,132,134, +134,138, 27, 58,254,226,197, 11,101,109, 98,102,184,140,180,168,172, 84, 66,173, 86,131,210,232, 64,105,117,160, 91,242,177,106, +233, 4,232, 40, 29, 20, 31, 7,131,210,234,192,124, 61, 18,148, 70,139, 44, 11,146, 12,240,117,212,146, 32,148, 79,146,165,214, +198,136, 86, 13, 57,104, 8,245,141, 9,108,128,108,197, 77,157, 58,181,115, 64,135, 14,143, 63,234,223, 97,195,211,132,196,220, +167, 9,137,239,156,231,217,166, 67,250,151,145, 71,230,243,248,226,206, 97, 11, 12,207, 58,172,141,218,110,196,191,136,197,114, +185, 60,192,210,210, 18, 41, 41, 41,224,112, 56, 32, 8,226, 5,128, 0, 0,112,115,115,123,201,229,114,189, 56, 28, 14,182,109, +219, 70,112,185,220,246,193,193,193,139, 85, 42,213, 49, 3, 29, 58, 95, 43, 43,171,183,212, 44, 62,159,143,240,240,112, 76,154, + 52, 73, 79,178,248,124, 62,246,237,219,135, 46, 93,186, 64,163,209,248,154,152,222, 71, 0,122,154,160,248, 17,213,228,220, 40, + 25,213,233,116, 83,139, 63,250,168, 53,110,221, 66,119, 47,175,118,157, 59,119, 6, 69,189, 17, 52,189,188,188, 60,228,114,121, +190, 82,169,252, 55,170, 66, 27, 60, 49, 72,138, 84, 12, 50,211,170,134,159, 62,126,252, 24,129,129,129,122, 5,171,182,154,197, +231,243, 33, 22, 88, 54,138,104, 49, 76, 85,189, 36,151,203,201, 91,183,110, 57,250,248,248, 16, 0,224,227,227, 67, 60,121,242, +196,222,194,194,162,168, 85,171, 86, 70, 59,192, 98,107, 27,236,155, 58, 14, 0,240, 93,255,193,250,142,209,165,239, 23,131,199, +227,161,223,130,197,239, 60,247, 12,195,112, 96,134,153,100,153,192, 69,254, 46,146, 85, 87,209,138,136,136, 72,140,136,136,120, + 71, 29,107, 36,140, 43, 90,181,165,187,198,162,230,101,109, 8, 27, 55,110, 68,251,246,237, 13, 54, 68, 91,182,108,193,193,131, + 7, 55, 2, 72,107,180,228,216,175,147, 31, 54,157, 74,244,106,227, 71, 0,192,202,175,135,145,149,149,149,184,115,231, 14,108, +108,108,240,226,133,201, 97,191,172,108,108,108,190, 39, 73,114, 44,167,238, 12,128,250, 9, 38,205, 48, 76, 84,121,121,121,131, +225, 29, 88, 22,160,180, 58, 84, 42, 84,208,104, 52,248,250,219,173, 70, 19, 17, 1, 16,148, 70,206, 13,237, 21, 44,110, 72,209, + 9,108,223, 27, 95, 77,182,124,167,241,230,144, 0, 73, 2, 29, 3,171, 20,151, 39, 15, 19,193, 48, 0,205, 0,142,206,118,216, +115,120,131, 65,146,175,163,153,234,222, 49,141, 10, 53, 13,223,160, 48,188, 78,190,165, 87,144, 4,252, 42,151, 49,159,199, 3, +195, 18, 85, 81, 31, 26, 34, 66, 2,177,103,105, 94,154,247,174,232,167,248, 60,172, 61,142, 95,139,199,152,254, 1,184,249, 32, + 9,125,186,181, 67, 98,106, 6,252,188,155, 99,219,222, 40,176, 44,228,191,108, 90,157,255,166, 65,211,101,154,162,104,221,191, +127, 95, 89, 87,197,170,189,101,141,183,135, 96,217, 55,138,150, 82,165,198,130, 69, 38,133,243,169, 42,163,158, 65, 98, 83, 78, + 54,164, 88,153, 66,196,234, 42, 91, 48, 18,158,165, 37,128, 46,192,194,255,205,138,147,166,105,156, 63,127, 94, 95, 30,245,149, + 99,237,178, 51,129,228, 32, 51, 51, 19,137,137,137, 8, 10, 10, 66,121,121, 57,120, 36,137,249, 79,159,162,221,228,201,208,240, +249, 96, 24, 6, 2,129, 0, 51,102,204, 48, 57, 63, 27, 89, 59, 87, 15,230,166,141, 25,223, 16, 28, 28,220, 58,165,178, 18,137, +207,158,161,255,138, 21, 0,128, 11, 23, 46,188,245, 76,204,155, 55, 79,144,148,148, 52, 45, 38, 38,102, 90,110,110,238, 70, 0, +243, 27,172,103, 89,181,126,140,214, 71, 19, 70,163,181, 79, 75, 28,252,237,176,254,248,188,111,230,128,199,227,131,199,231,193, +214,198,214,164,187,209,106,181,122,210,170, 80, 40,200, 11, 23, 46, 52, 29, 48, 96, 0,127,206,156, 57, 4, 0, 28, 60,120,144, +252,249,231,159, 37, 87,175, 94,229, 55,105,210, 36,207, 40,185,164,168,119,202,152, 32, 8,240,120, 60,240, 5,124,128, 97, 64, + 16,132,100,221,186,117, 43, 19, 19, 19,187,250,248,248, 64,173, 86, 79, 70,213, 68, 13,115, 28, 45, 51,217, 50,200, 69,234, 27, +107, 85,173, 74, 53, 4,105,237,113, 91, 13, 17,181,218, 99,182,240,126,147, 50, 76, 27,163, 85, 31, 56, 28,142, 81,181,138, 36, + 73,163,174,195,121,243,230,193,202,202,170,161, 6,136,125,250,244,105, 82, 94, 94,222, 46, 0, 91,223,171,112,174,199, 38,126, + 63,119,164, 28,213,190, 85, 91, 91,219,162,190,125,251, 86, 0,160,142, 29,123,187,131,172, 86,171, 27,108,192,109,108,108,190, +223,189,123,247,236, 17, 35, 70,144,117, 67, 12,212,118,239,213,124,180, 90, 45,142, 29, 59, 54,123,225,194,133, 40, 47, 47,159, +107,168, 17, 87, 84, 42,161,172, 30, 8,253, 50,225,184,169,149,122,131,135, 44,109,221,208,180,101, 64,131,141, 9,201,175, 26, + 67,228,210,236, 77, 3,102,101, 37, 2,109,192, 38, 65,144,105, 25, 89,185, 77, 60, 92,237,241, 50, 91, 10,151,230,237, 81,154, +243, 38, 31,184, 92, 14,120,213,174, 67, 91,107, 9,164,133,133, 32, 73,142, 65, 98,188,250, 80, 44, 30, 36,100,224,196,181, 39, +160, 84,149,216,180,255, 18, 40,117, 5, 40, 85, 37, 40, 85,213,118,237,194,207, 64, 16,200,215,170, 43,219, 52,166,220,185, 92, + 46,186,117,235,214, 32,209,201,201,201, 49, 81,209, 98,245,138,150, 82,213,200, 50, 50,173,231,100, 80,177,170, 57,254,190,196, +160, 38,228,131, 88, 44,238,178,111, 95,195, 97, 28,234,131,171,171,235, 69, 75, 75,203, 22,166,158,223,136,224,165,107,109,109, +109,191,247,241,241,241,221,180,105, 19,143,195,225,160, 95,191,126,109, 92, 93, 93, 51, 1,192,207,207,207,189,166,142,249,242, +203, 47,217,251,247,239, 39, 84,245, 49, 26,134, 64, 32,120,102, 99, 99,211,165, 79,159, 62, 40, 47, 47, 71,118,118, 54, 36, 18, + 9,218,109,216,128,167, 95,126,137, 14, 59,118,128,236,219, 23, 4, 65, 64, 32, 16,224,233,211,167, 16,139,197,207, 84,170, 6, + 67,190,117, 3,240, 35,128,238,120,227, 46,100, 1,220, 65, 85,216,133, 7,245,212,119, 36, 0,208, 12, 99,172,176, 38, 44, 88, +176, 0,101, 60, 30, 48,116, 40,248,105,105,160, 40, 10, 65, 65, 65,122,149, 61, 40, 40, 8, 92, 46, 23, 1, 1, 1,112,119,119, +199,182,109,219, 38, 24, 34, 90,170, 10, 10,153,105,175, 17, 28, 28,172, 87,174,134, 14, 29,170, 87,180,120, 60,158, 94,217, 34, +104,227,196,149, 32, 8,182,118, 39,153,166,105,130,203,229,114,231,206,157, 75,140, 15,140, 57,212, 0, 0, 32, 0, 73, 68, 65, + 84, 30, 61,154,213,104, 52,140, 64, 32, 32, 79,156, 56, 65,220,188,121,147, 91, 89, 89,105,180, 35,238, 63,114, 44,190, 27, 48, +164,234,221,111,225, 4, 30,159, 7, 1,159,143, 5,207, 94,235,203,197,122,223, 17, 65,100,100,228, 24, 31, 31,159, 42, 55, 60, +192, 53,199,209, 50,195,136,208, 35,173, 67,146, 52,181,246,165, 0,136,234,125,105, 45, 66, 37, 37, 8,226, 17,203,178, 93,235, +156, 91,115, 92, 83,103, 91,115, 60,238, 61,146, 95,179,214,225, 59,228,203, 80,143, 56,245,222,189,123,222,157, 59,119, 70, 86, + 86,214, 59, 51,225,106, 26, 46,137, 68, 2,177, 88,140,187,119,239, 2, 64,106, 67,198,110,222,188,249, 51,170,162, 46, 87,165, +200,205, 45,184,207, 71,189,239, 6, 14,238,138, 67, 17,135,203,243,242,242, 2,240, 38,134, 14,225,238,238, 62,137, 39,224,142, +243,242,111, 22, 10,134,249,241,250,185, 59, 43, 12,221,161, 87, 27,191, 10, 0,202,154, 89,135,239, 57,251, 16, 36, 73,142, 29, + 49, 98, 4,153,148,148,132,113,227,198,225,224,193,131, 13,158, 59,105,210, 36, 28, 57,114, 4, 35, 70,140, 32, 23, 45, 90,212, + 96,120,135,183,213, 18,205,223,246, 80,166,188,136,195,129, 35,187, 27, 28,131,228,236, 92, 53, 30,171,176,176, 72,255, 91,215, +206,134, 61, 35,140, 78,115, 53, 54,230, 97,112, 72,175,126,252,236,130, 50, 48, 58, 53, 84,242, 55,215, 43,202, 10,192,234, 84, +224, 91,216,195,213,209, 6,143,239, 93,209, 80, 26,213, 85, 67, 54,103,143,240,195,151,195,124, 1,150,193,200,249,123, 16,189, +117,150,190, 7,221, 99,244, 28, 92, 63,246,147,201, 99,252,234,130,199,227,225,233,211,167,202,134,212, 44, 14,135, 99, 74, 76, +174,106,213, 81, 11,133, 66, 9,133, 82,245,119,214, 29, 78, 46, 46, 46,191,216,217,217,137, 26, 32, 82, 78, 78, 78, 78,191, 56, + 56, 56,136, 76,117, 29, 54, 68,178,170,227,106,197, 76,157, 58,181, 81,100, 75, 40, 20,182, 72, 77, 77,213, 7, 43, 53,180,213, +104, 52,232,211,167,143,169,193, 75,207, 1,120,229,230,230,118,167, 93,187,118, 54, 47, 95,190,196,225,195,135,249, 60, 30,175, + 89, 77,253, 33,151,203,193,225,112, 80, 88, 88,168, 5,240, 41,140,184,206,212,106,245,173, 91,183,110,117, 28, 54,108, 24,231, +217,179,103,224,112, 56, 85,233, 10, 14, 70,135, 29, 59,144, 48,119, 46, 66, 51, 50,160,162, 40,136, 68, 34, 92,190,124,153, 82, + 40, 20,183, 26,178, 39, 22,139,119,165,167,167,251,137, 68, 34, 80, 20, 5,134, 97, 64,146, 36,193,229,114,123,216,218,218,110, + 1,208,181, 78, 97, 57,119,232,218,167, 45,173,211,209,121, 89, 47,165,198, 50,160,184,184, 24,231,206,157, 67, 80, 80, 16, 66, + 67, 67,145,147,147,131,180,180, 52,124,240,193, 7,250,115,226,226,226, 16, 27, 27,139, 86,173, 90, 25, 87,244, 72, 45, 90,181, +109, 1, 62,159, 95,165, 16,241,248,213, 29, 31,158, 94,201,226,243,248,224,113,121, 16,137, 69, 38, 43, 90, 4, 65,128, 36, 73, + 16, 4, 1,177, 88, 92,211,201,102,154, 54,109,154, 87, 82, 82,226, 6,128, 35, 22,139, 65,211,180, 73,157,150,154, 54,162,134, +100,241, 5,124,189,178, 5, 0,101,101,101,170, 17, 35, 70,252, 91,173, 86,127,130,247, 91,161,196,140,127, 24, 8,130,120,244, +191,113,109, 35, 48,180,154, 88,189, 51, 40,222,208, 3,254, 65, 72, 72,200,142,241,227,199,247,219,188,121, 51, 44, 45, 45,145, +151,151,167,111, 16, 5, 2, 1, 60, 60, 60, 80, 82, 82,130,157, 59,119,226,245,235,215, 55, 0,204, 48, 53, 69,121,121,121,247, + 95, 60, 73, 45,238, 51, 38,196,193, 47,164,173,109,118,234,235,160,188,188,188,187,213, 36,107,207,248,121, 31,124,210,103, 84, + 32,248, 2, 30,178, 95,228,227,250,185, 59,255, 95, 10,147,195,225,112, 8,130,192,184,113,227, 76, 58,255,227,143, 63,198,173, + 91,183, 96,200,205,200,212, 40, 90, 10, 21, 42,149,127, 95,103,237,171, 89,147,240,213,172, 73,122, 50, 97,138,235, 5, 0,220, +221,143, 26, 32, 90,212,230,232,163, 59, 63,239, 20, 24,236,217,197,175, 5, 30,196, 60,193,161, 29,111, 68,134,189, 63,175,196, + 15,123,111,192,195,197, 14,148,186, 18, 23,143,255,154, 79,169, 21,155,223, 83,148,171, 34,183, 4, 1,150,101, 26,117,239, 53, +228,137,199,227,193,223,223,191, 65, 69,171,164,164, 68,105,172, 97,208,151,145, 70,139,138, 74, 37,148,138,191,141,104,117,232, +209,163,199,213,168,168, 40, 7,103,103,103,228,230,230,214, 37, 90, 29,186,119,239,126, 53, 42, 42,202,193,197,197, 5,217,217, +217, 38,135, 21,169,135,100, 65, 42,149, 18,165,165,165,140,157,157, 93,163,200, 22, 73,146, 80,171,213, 72, 78, 78, 54,245,111, + 77,158, 33,102, 99, 99,179,239,200,145, 35, 54, 69, 69, 69,224,112, 56, 72, 78, 78,126,107,214, 97,205,103,207,158, 61,252,145, + 35, 71,238, 46, 43, 43, 51, 56,173, 77,167,211,109,156, 52,105,210,180,156,156, 28, 59,103,103,103,228,229,229, 65, 32, 16,128, +101, 89, 16,125,250,160,231,171, 87,160,104, 26, 98,177, 24, 41, 41, 41,216,181,107, 87,101,117,168,152,122, 5, 50,130, 32,188, +249,124, 62, 38, 78,156,248,214,129,253,251,247, 99,120, 23, 78, 23, 39, 27,110,133, 14, 34,117,129,120,200, 69, 14,135, 67,116, +232,214,183, 77,183, 94, 67,253,159, 39, 60,120, 41, 45,120,109,172, 82,210,106, 52, 26,248,248,248,224,209,163, 71,184,118,237, + 26,250,246,237,139,208,208, 80,196,199,199,227,202,149, 43,136,141,141, 5, 65, 16,112,112,112,168, 25,126, 97,112, 12,134, 70, +161, 67, 97,110,241, 59,234, 85,221,125, 62,159, 15,181,146, 50,169,140,158, 61,123,134, 71,143, 30,233, 67,203,112, 56, 28,221, +228,201,147,193,178, 44,155,158,158, 14, 43, 43, 43,118,234,212,169, 52,151,203,213,229,228,152, 54, 62,184,134, 84,213,144, 44, + 46,159,247, 22, 65, 99, 24, 70, 30, 31, 31,255, 57,128,248,106, 37, 11, 48,199,209, 50,227,255, 54,206,227,221,133,165,141, 42, + 90,175, 0,244, 63,124,248,240,132,211,167, 79,111,220,178,101,139, 83, 88, 88, 24, 74, 75, 75,225,233,233, 9, 55, 55, 55, 68, + 71, 71,227,194,133, 11, 69, 52, 77,207, 7, 80,159,244,211, 31, 6, 98,214,228,188,204,139, 82, 87, 84,124,217, 57,212, 23, 55, +142,253, 17,225,234,234, 58,131,195,225,124, 61,117,241,135,159,244, 30,209, 21, 41,177,233,184,127,229, 41, 10,178,138,140,218, +172, 59, 24,222,214,214,118,154,133,133,133, 0, 0, 85, 79,175,184,238,172, 67,189, 77,154,166,105,141, 70,131,163, 71,143,154, + 68,182, 14, 31, 62, 12,149, 74, 5,250, 93,255,170,222, 38,203,176, 4,151, 39,132,187,135, 15, 40,170, 18, 12,243,222, 19, 42, +245, 54,107,122,160, 47, 5, 2, 56, 23, 21,225,193,131, 7,166, 81,238,161, 67,141,149,145, 74,163,146, 79,252,105,205,130,232, +153,225, 63,218,246, 13,233,136,239, 54,236, 7, 69,237, 5,201, 33, 33, 22,242,209, 57,176, 59, 56, 80,227,151,200,111,202, 20, +178,210,137,120,119, 41,158,183,108,178,134, 60, 44, 44, 64, 51, 12,174,221,126,104,242,189,235, 91,123,154, 6,151,203,197,139, + 23, 47,148,245,205, 54,228,112,170,220,156, 53, 61,117, 67, 54, 89,134, 33,120,124, 17, 60, 60,219, 65,163,174,248, 91,202,200, +217,217,249,155, 83,167, 78, 57,212,132, 74,136,143,143, 7, 65, 16,201,111, 20,199,170,227, 74,165, 18, 9, 9, 9,136,143,143, + 7,170,102,184,153,252, 30,213, 40, 89, 82,169,148,200,203,203,131,133,133, 5, 25, 31, 31,175, 14, 8, 8,136, 49,242,126,235, +109,170, 84,170,140,134,198, 79,170, 84,170, 38, 34,145,136, 87,167, 17,117,111,221,186,117, 74, 61, 46,196,119,210, 89, 94, 94, +254, 96,225,194,133,157, 7, 15, 30,140,111,190,249,166,196,206,206,206,234,151, 95,126,225,114, 56, 28, 98,230,204,153,116, 97, + 97, 97,197,175,191,254,106,115,250,244,105,148,149,149,221, 53,225,222,229, 42,149,234,243,144,144,144,253,151, 46, 93,178,240, +246,246,134, 76, 38, 3,203,178,216,183,111, 31,102,206,156, 9,145, 72,132,148,148, 20, 12, 31, 62, 92,161, 80, 40, 62,199,187, + 99, 39,107,108, 18, 4, 65,176, 12,195, 96,217,178,101,250,224,164, 53,193, 74,173,196, 4,118,205,107, 41,153,243,107,185,100, +194,119,191, 78, 6, 0, 90,167,163,159, 39, 60,120,185,111,235,119, 55,249,124,254,109, 35,101,180,100,206,156, 57,191, 12, 29, + 58, 84,108,105,105,137,146,146, 18,220,185,115, 7,247,238,221,195,253,251,247,161,209,104,224,224,224, 0, 59, 59, 59,228,229, +229,225,217,179,103, 74, 0, 75, 12,217, 20, 88,240,224,213,166,102,230,111,149,130,197,171, 53,219,176,182,186,197,231,241, 76, +122,143,122,245,234,133,110,221,186,213, 16, 32, 58, 51, 51, 51, 79,173, 86, 19,181, 72,127, 78, 13, 33,111,214,172,153,238,224, +193,131,172, 33,155,247,119,109,195,165, 85, 75, 32,224,243, 49, 63, 57, 91, 79,186,246,247,237, 4,158,128, 15,223, 97,163,107, + 95,187, 29, 85,238, 66,212, 33, 89,134,218,142,191,252,110,154,109,254,199,218,252,191,140, 60,188,199, 18, 60, 53, 56,164, 82, +169, 46,126,246,217,103,145, 29, 58,116,248,108,211,166, 77, 4,159,207,199,138, 21, 43,216,220,220,220,223,170,123, 33,165,239, +147, 42,150,101,127,251,253,228,221, 47,166,132,143, 32,230,109,158,218, 35,230,122,194,179,246, 33,222,104, 31,226,141,152, 27, + 73,216,186,248,240, 65, 90, 75, 47,203,207,207,207, 50, 98, 74,221,191,123,219,186,131,225, 29,110,221,188,238,208,216, 89,135, + 12,195, 68, 29, 62,124,120,246,168, 81,163,200,135, 15, 31,190, 51, 38,171,102,217, 29,134, 97,112,245,234, 85, 80, 20,133,223, +126,251,141, 97, 24,166,225, 56, 90, 96,207,252,180, 57,114,202,111, 7,206, 8, 4,124, 2,247,110,159, 64,121,169,225, 89, 93, +124, 62, 15,123,246,157,164,248,124,222,243,250,142, 83, 20,149,125,253,250,117,151, 65, 52,205, 35, 73,178, 62, 2, 85, 47,162, +162,162,180, 12,195,100, 26, 57,237,110,193,235,172, 97,171,191,249,244,240,208,143, 62,115, 9, 9,233,193,115,116,118, 1, 65, + 16, 40, 44, 40, 68, 74,194, 67,237,197, 19,187, 11, 42, 21,166, 45,193,243,233,250,223,245, 99,178, 0, 32,108,230, 22,253,248, + 44, 0, 24, 54,117, 33,250, 4,249,129, 48, 69,122,122, 67,178, 24,157, 78, 7,137, 68, 2,157, 78, 87,111,136, 7, 27, 27, 27, +177, 74,165, 82, 86, 7, 98, 52, 40, 21,177,192,223, 94, 70, 52, 77,251,150,150,150,162,178,178, 18,247,238,221, 99,215,172, 89, + 35,149, 74,165,250, 65,155, 90,173,214,183,164,164, 4, 21, 21, 21,184,123,247, 46, 27, 25, 25, 41, 45, 46, 46, 94,220,152,119, + 72, 44, 22,119,225,114,185, 49,165,165,165,140,133,133, 5,169,213,106,181, 1, 1, 1, 66,177, 88,108,242,130,234,121,121,121, +131, 27, 58,230,229,229,149,154,154,154,218,154,166,233,218,107, 32,242, 85, 42,149,119, 72, 72,136, 41,245,199,156,189,123,247, +226,228,201,147,129, 50,153,108, 82,102,102,230,126, 0,129, 92, 46, 23, 79,158, 60, 73, 86,169, 84,227, 71,141, 26,181,175,180, +180,244, 1,170,150,224, 49, 5,151, 82, 82, 82, 38,250,250,250,238,253,254,251,239, 45, 67, 67, 67,185,238,238,238,232,218,181, + 43, 82, 82, 82,112,254,252,121,237,246,237,219, 43, 21, 10,197,167, 0,174, 26, 46,118, 16, 58,157, 14, 2,129, 64,255, 17, 10, +133,224,243,249,144, 43, 89, 76,223,144,166,212, 65,172,220,184,226,243,243, 44, 64,228,103,167, 21, 21,230,103, 63, 32, 8,226, +118, 94, 94, 94,121, 3,121, 38, 80,169, 84, 29, 89,150,229, 16, 4,177,153,162,168,169,179,102,205,114, 91,187,118, 45,218,182, +109,139,162,162, 34, 72, 36, 18,120,123,123, 67, 42,149,226,225,195,135,180, 66,161,216, 1, 96, 37,170,199,143, 52,132,178, 34, + 25,154,186, 54,123, 75,249,100, 89, 22, 44, 13,104,213, 52,104,138,133,134,208,130,199,211,130,207,231,155,162, 60,177, 12,195, +160,212,205, 13, 76, 66, 2,238,223,191, 15,150,101, 27, 84,213,124,124,124, 76,168,216, 25, 8,132,130,183,220,133, 4, 65,128, + 47, 16,128, 39,224,215, 55,115,198,172, 98,153,241, 95, 13, 83,125,227,101, 0,102,196,197,197,237,239,221,187,119, 52,203,178, + 60, 84,249, 35,255,248, 43,127,158,159,159,255,248,238,249,199,139, 92,154,218, 69, 14,153,212, 3,109, 59,122,130,214,209,184, +115,225, 9,126, 91,123,250, 72, 78,118,206, 84,152,176,246, 25,195, 48, 55,187,119,105, 75,162, 86,172,110,119,119,119,230,125, +102, 29,150,151,151, 47,159, 63,127, 62,190,249,230,155,247,153,117, 88, 47,158, 62,147,206, 32,192, 54, 29, 54,164,231, 32, 16, + 36,171,209,168, 13, 84,124,208, 71, 46,229,243,121,207, 31,197,231, 5,212,119,158, 84, 42, 29,244,201, 39,159, 92,229,114,185, + 45, 26,147,231, 12,195,100, 22, 20, 20,244, 51,126,166,238,142, 90, 41,243, 62,119,100,231,220, 75, 39,247, 14, 98, 24,186, 21, + 1,128,195,229,191,212, 82,212,101,181, 82,182, 9, 38, 46, 42,189,110, 70, 48,230,252,116, 5,219,190, 25,134, 89,145,199,176, +123,217,116, 44,218,112, 24, 63,126, 51, 7,107,182,252, 27,223,205,153,136, 49, 19, 62, 97, 88,130,252,211,212,251,224,112, 56, +151,118,238,220, 57,101,250,244,233,250, 73, 11, 44,203,190, 85,177,107,181, 90, 37,195, 48,216,177, 99, 7, 3,224,146, 33,123, +111,151, 17,193, 26, 26, 47,101,106, 25,201,100,178, 79,131,131,131,247, 1, 16,178, 44,251,162,180,180,244, 95,192,155,165,161, + 42, 42, 42, 62, 13, 9, 9,217,199,178,172,144, 32,136,119,142,155,130,234, 80, 15, 93,236,236,236, 98,170,149, 44,225,251, 12, +136, 55,148,213, 6,220,138,166,184, 16, 25, 0,179,106, 69,124, 95, 27, 24, 24, 88,123, 81,233,228,210,210,210, 46,239,145,174, +171, 74,165,210,111,217,178,101,115, 69, 34, 81, 31,133, 66,209, 6, 0, 36, 18, 73,138, 90,173,190,169, 84, 42, 55,193,120,108, + 42, 13,195, 48, 41, 58,157,206,223,201,201,169,106, 70,109, 53,217, 2,128,179, 49,116, 12, 64,119,173, 18,197, 15,153,156,176, + 11, 23, 46, 52,183,179,179, 27, 72, 16,196, 24,150,101,125,228,114,185,122,217,178,101,119,163,162,162,202, 91,180,104, 49,100, +232,208,161,132,189,189, 61, 30, 61,122,196, 22, 23, 23,159, 0,176, 24, 38,204,180,102, 24, 38,115,221,186,117,104,236,251,110, +232, 56, 69, 81,249, 23, 46, 92,112, 28, 92, 88,200,101, 24, 6,195,134, 13,123,139,192,213,197,243,231,207,161, 86,171, 13, 6, +115, 84,151,151,162,239,220,133, 64,245,236,207, 26, 84, 41, 89, 44, 88,141,153, 87,153,241,207,194,255,244,130,158, 38, 73,139, +110,110,110,227, 68, 18,225, 87,158,109,220, 2,114,211, 10,147,228,229,138,131,121,121,121, 59, 27,168,200, 77,178,217,200,128, +165,102,249,247,127,200,230,155, 56, 90, 52, 88,150, 6,203,176, 96, 89, 6, 12, 67, 87, 45,120,205, 50, 96,105,154, 32, 8,252, +169, 81, 26,140, 12, 94, 55,157,118,142,142,142, 43, 89,150, 29,204,225,112,200,218, 98, 88,237,239,213, 74,214, 37,169, 84,250, + 93, 61,202,235,255,185,252,140,138,138,170,151,252,155, 58,235,112,236,216,177,116, 35,223,205,155, 18,137,196,173,190, 99,149, +149,149, 89,121,121,121, 3,255, 67,242,179,246,140,193,198,216,108,244,172, 67, 99, 54, 61, 61, 61,133, 20, 69,117, 2,224, 77, + 16,132, 45,128, 18,138,162, 46, 23, 21, 21, 21, 0,232, 2, 96, 89,245, 53,171, 0,196,252, 47,191,239, 98, 71, 71,199,189, 36, + 73, 54, 53,229, 98,157, 78,167, 41, 41, 41,153, 82,167, 67,160,183,233,224,224, 16,195,229,114,155,154, 96,231,117,113,113,113, + 23,115,253,105,182,249, 95,132,186,131,224, 27,140, 20,255, 63, 65,180,204, 54,205, 54,205, 54,205, 54,205, 54,205, 54,205, 54, +205, 54,255,219,137, 86,189,251,230,105,181,102,152, 97,134, 25,102,152, 97,134, 25,127, 13,231,235,144,173,243, 53, 95, 8, 3, +172,180, 49,146,224,251, 48,219,107,102,155,102,155,102,155,102,155,102,155,102,155,102,155,255, 56,155,102,252,141, 48,203,170, +102,155,102,155,102,155,102,155,102,155,102,155,102,155,255,237,104,208,117, 72,154,243,198, 12, 51,204, 48,195, 12, 51,204, 48, +227,127, 6, 38, 19, 45,137,139,143,175,163,103,192, 62,187,166,237,227,237,154,182,143,119,244, 12,216, 39,113,241,241,253,135, +230,155, 24,192, 4, 46,151,123,213,213,213, 85,134, 6,150,222,249, 47,128, 53,128, 49,168,138,239, 51, 18,128,197,223,105, 60, + 20,224,142, 3,190,154, 12,100, 77, 6,178,198, 1, 95,133,254, 23,142, 27, 92, 49,219, 45,248,246,197, 9, 23, 87,204,118, 11, +174,247,248,124, 55,135,251, 87,198,254,180,246, 43,119,251,191,233, 47,173,156,157,157,119,185,184,184,100, 56, 59, 59,103, 58, + 59, 59,239, 5, 96, 99,174,238,204, 48,195, 12, 51,254,199, 80, 51, 70,171,230,163, 31,163,197, 5,128,232,232,232, 80, 0,191, + 3,232, 29, 22, 22,118,171,238,213,118,205,252,167,183,106,217,234,155,213, 43, 22, 19,174,206,142, 22, 58,154,161,210, 51,178, +219, 45, 95, 29,121, 60, 87,192,221, 88,154,149,176,251, 61, 18, 69,112, 56,156,113, 66,161, 48, 12, 64, 13, 97, 75, 86,171,213, +209, 52, 77, 31,133,105,211,180,225,226,226,114,155,195,225, 52,111,204, 31,211, 52,157, 85, 80, 80,208,227, 61, 51,115,108,179, +102,205,246,134,134,134, 90, 4, 6, 6, 66, 32, 16, 96,217,178,101,243,243,242,242, 54,153,106,192,206,206,203,138, 18,138,190, +230, 10, 4, 3, 88,173,198,159, 5, 11,144,194, 4, 70,167,190,206, 87,171, 55,150,150,166,201, 77, 52,181, 24,192,212,234,188, +218, 13, 96,221, 95,121, 74,166,116,132, 86, 75, 87, 61, 19,124, 46,232, 51,175,108,126, 95,178,100, 9, 55, 44, 44, 12,187,119, +239,238,177,107,215,174,207,229,114,249,117, 0,103, 1,188,252,171, 79,165, 11, 48, 35,164, 71,143,159,166,204,159,207, 81,222, +190,141,159,246,238,221,140,170,120, 75,219, 26,251, 44,241,249, 24,227,232,200, 11, 99, 89,116, 34, 0,130, 0,158, 72,139,153, + 11, 20, 69, 31,133, 9,177,216, 12, 96, 2,222,158,142,127,168,177, 6,202, 95,178, 75,133,195,124,123,150,191,188,185, 20,192, +144,186,199,117, 42,209, 20,150,227, 17,166,100, 99,179, 1,108,248,139,217,106,225,228,228, 20,127,230,204,153,166,129,129,129, + 92, 0,136,137,137,153, 28, 22, 22,214, 87, 42,149,250, 3,144,253, 47, 85, 66, 34, 46, 73,126, 37,224,241, 6,208, 52,221, 30, + 0, 56, 28,206, 83,141, 86,123, 85,199, 48,219, 96, 98, 76, 54, 51,204, 48,227,191, 23,198,184,200,127, 56, 26,140, 12, 95,115, +115,108,237,109,109, 72,156,219,182, 11,234, 55,250,121,185, 92,161,202,200,200, 41,157,247,213,154,171,159,207, 89,127,122,195, +175,209, 23,110, 61, 72,190,239, 27, 56, 48, 73,226,220,182, 93, 3,166, 27,242,225, 54, 19,139,197,143,183,111,223, 78,165,164, +164,176,101,101,101,236,243,231,207,217, 19, 39, 78,176, 95,124,241,133, 74, 44, 22, 63, 6,208,204, 20,155, 46, 46, 46, 5,207, +111, 92, 97, 95,199,199,178,153, 49, 15, 88,173, 86,203, 82, 20,197, 82, 20,197, 38, 93,138,102,227,207,158,100,159,156, 56,202, +106, 52, 26, 86,163,209,176,106,181,154,109,217,178,101,174,137,233,172, 11,119, 63, 63, 63, 77,116,116, 52,123,252,248,113,118, +254,252,249,108,135, 14, 29,104, 0, 51, 77,189,119,137,179,119, 31,171, 38, 1,210,233,225,219,168,243,119, 47,179,137,175,158, +176,137,175, 82,217,168,107,201,236,212, 5, 91, 40,171, 38, 29,164, 18,103,239, 62,198,238,221,206,206, 46,136, 32, 8,182, 6, + 0,216,230,205,155, 87,212,254, 52,107,214,236,173,143,135,135, 71, 69,139, 22, 45, 94, 58, 56, 56,116,170,207,230,248,246, 96, +217,164, 67, 44,155,116,136, 93,210, 11,108, 98, 98,226,125,150,101,127,175,249, 40,149,202,223, 79,157, 58,245,251,135, 31,126, +248, 59,128,225, 6,242,201,164,252,156, 12,100,201,207,156, 97,217, 77,155, 88, 54, 52,148, 77, 6,216,201, 64, 86, 35,109,182, +116,117,229, 61, 89,191,238,115,205,153, 51,191,177, 23, 47,158,103, 47, 92,136,102, 79,159,218,203,110,222,244, 21,229,226,194, + 75, 0,208,186, 17, 54,185, 0,214, 0,216,136, 42,229, 50, 69, 42,149,178,249,249,249, 44,128,148,234,223, 54, 58, 57, 57,109, + 64,253,234, 91,255,218, 74,214,220,193,174, 23, 63, 26,210,131,149,151,231,178, 31, 13,233,193,206, 29,236,250,150,178, 53,216, +203,203,106,214,176,246,210,196,152,131,244,172, 97,237,165,131,189,188,172,222, 51, 63, 9, 84,173, 19,186,253,198,141, 27, 58, +182, 22,180, 90, 45,187,127,255,126,218,206,206,238,183, 70,216,108,227,228,228,148,105,111,111,159, 82,251, 71,167,128,145, 33, + 62, 61, 39, 47,119,104,247, 97,104, 35,210, 25, 40,226,243, 95, 95, 61,246, 11, 93,156,245,148,213, 40, 11,216,242, 23,177,236, +235,228,251,236,254,157, 27,181, 2, 46,247, 53,128,192,191,242, 44, 53, 18,102,155,102,155,102,155,255,129, 54, 13,113,145,255, +203,224,214,189,193,186, 16, 10, 5,225,203,151, 44, 36,202,138,203,148, 42,153, 92,163, 85,169, 84, 36,159, 85, 61, 77,122, 85, + 72,114, 57,101,115,231,204,182, 10, 95,180, 36,188, 18,152,104,226,127, 54,235,208,161,195,195,147, 39, 79, 58,219,219,219,163, +188,188, 28,197,197,197,120,248,240, 33, 88,150,197,168, 81,163,132,221,186,118,237,180,116,217,178,123,175,115,114,130,209,112, +195,251,134,188,216, 59, 98, 93,143,170,181,104,191,203, 40,174,106,117, 8, 2,187,198,134,233,207, 89,249,186,106,181, 12,145, + 72,164, 95,144,248, 61, 16,220,175, 95, 63, 62, 0, 76,155, 54, 77, 38,151,203, 35,170, 21, 14,147, 86, 90,149, 56,123,247,113, +116,115,143,254,101,199, 58,113,251, 86,222,160,180, 58,100,230,231,130,203,179, 69,211,166,124,124, 50,113, 0,175, 87,136,189, +227,154, 85,187,206,231, 51, 24,169, 40, 74,189,220,144, 45, 91, 91,219,253, 71,143, 30,197,177, 99,199, 0, 0, 41, 41, 41,240, +246,246,150, 24, 75, 67, 66, 66,130,215,240,225,195,143, 20, 23, 23,183, 54,118,110,221,192,248, 66,161, 16, 61,122,244, 64,187, +118,237,112,230,204,153,222,213,202,214, 95,130,242,246,109, 88,198,197, 1,183,222,171,243,210,178,115,103,207,251, 23,206, 31, +116, 60,127, 33, 25, 27, 54,236,197,203,151, 85, 66,155,151,151, 23, 38,140, 31,203,123,250,244,174,223,152, 49, 19,238,254,241, +199,203, 30,213, 68,201, 24,190,255,245,215, 95, 23,183,104,209, 2, 99,198,140, 25,235,231,231,231,106,109,109,141,157, 59,119, +194,205,205,205, 75,163,209,188, 56,115,230,140,123,126,126, 62,102,207,158,141,130,130,130,249, 13, 25,234, 61,168,247, 82,225, + 48,223,158,109, 59, 79,129,165,181, 27,126, 61,124, 20,207, 31,239,239,169,166,146,151,242,233, 91,147,148,172,112,170, 52,203, + 50,188,121,151, 80,135,214,126,195,225,217, 57,214, 81, 69,255,241,106,233,128,150,145, 92,145,106,255,138, 13,121,197,239, 24, + 29, 19,197,241,151, 61,179, 79,184,138, 98, 96, 5, 83, 67,176,244,106, 45,139,225,189,122,245,210, 23, 92, 70, 70, 6,212,106, + 53,124,125,125, 73,141, 70,211,199,196,124,109, 51,112,224,192, 63, 47, 92,184,224,208,166, 77, 27,105, 73, 73,137,254,128,171, +131,237,160, 91, 39, 55,207, 94,243,211,191,125, 14,176, 68,153, 52,249,244, 83, 35,182, 2,187, 7,117,190,118,241,228, 65, 75, +162, 34, 27, 2,219, 34,128, 41, 70,218,145, 61, 32, 44,236, 49,238,139,121,220, 62,253,250, 54, 25, 48,100,244,181,231,169, 47, +251, 1,120,100,238,215,155, 97,198, 63, 90,213, 98,255,219,238, 73, 79,180,194,194,194,136,250,110,144, 97,153, 0, 23,103, 7, +241,230,245,251, 30,113, 40,141, 70, 98,107,163,225,217, 88, 51,132,149, 13,135,210,104, 43, 60,189, 60, 5, 12,203, 4, 52, 96, +191,238, 20, 79, 66, 44, 22,159, 60,123,246,172, 51,143,199, 3,195, 48,112,114,114, 66,122,122, 58,202,202,202, 32,151,203,241, + 50, 57, 25, 45,154,121, 96, 69,248, 66,183,217, 11,195, 79, 42, 20,138, 46,120,219,141,248,206,180, 81, 90,251,246,186,209, 53, + 75,176,188,211,229,175,254,173,158, 99,166, 78, 69, 77,207,202,202,130,165,165, 37,252,253,253, 45,239,220,185,243,135, 1,146, +245,150, 77, 59, 59, 47, 43, 70, 40, 56,182,253,151,101, 98, 74,155,128,164,180, 18,180,109,209, 19, 46, 14,205,144, 91,162,193, +253,135,103,145, 16,127, 8,173,154, 52,195,204, 47,250,138, 34,215, 29, 63,202,215,181,104, 86, 86,150, 46,171,207,166, 76, 38, +179,108,217,178, 37,154, 53,171, 90,247,140,166,105, 36, 37, 37,129,166,105,253,126,237,237,190, 19, 55,160,147,101, 98,202,228, +201, 40, 46, 46,182,172,207, 38,143, 3,221,188,207, 39,112,197, 60, 64, 32,177,215, 84, 84, 84,232,151,225,160, 40, 10, 79,158, + 60, 65,112,112,112,104, 84, 84,148, 49, 86,100, 82,126, 82,192,143, 63,253,246,219,150,137,229,229, 36, 0,236, 38, 8,134, 98, +217, 31, 77,125,150,156,157,121, 39, 46, 93, 60,224,200, 33,159,193,222,230, 7, 60,124,152, 9,138,170, 74,111,113,113, 33,102, +125, 37, 3,159,103,133, 51,103,254,237,224,235,219,227, 68,126, 62,229,143,183,221,136,245,165, 83,116,241,226, 69,204,154, 53, + 11, 73, 73, 73,238, 28, 14, 7, 15, 30, 60,128, 88, 44,198,250,245,235, 57,190,190,190,238, 18,137, 4,151, 46, 93, 66, 65, 65, + 1, 97, 40,157,191, 95,254,125,117,249,203,155, 75,243,137, 75,131,127, 61,124, 20,159,141, 31, 7, 87, 54,237, 15,155, 86,196, +234,129,195,186,127,199,114, 60,194, 36, 86, 1,118,222,254,195,192, 23, 88, 98,230,183, 43,145,146,112,206, 78, 33,143,255,138, +160,179, 61, 86,108,136,154,243, 78, 58,143,143,165,167, 29,186,211,249,106,179, 71,158,113, 79, 62,127,144, 23,187, 43,254, 13, +209,242,226, 18, 36,109, 3, 84, 45,159,242,226,197, 11,188,124,249, 18, 92, 46, 23, 74,165, 18, 58,157,174,222,116,186,187,187, +207,208,233,116,223, 85,151,243, 62,145, 72,244,233,193,131, 7, 29,106, 19,109,167,128,145, 33, 14, 86,146,126, 5,133,197,165, +119, 31, 37, 62,159, 55, 99, 76,239,219,247, 19,178, 41,222,135, 89,229,241,103,202, 27,200, 79,145, 88, 32, 56,113,233,212,191, + 45,181,175,110, 64,226,219, 27, 60, 75,111,208,218, 28, 40, 74, 43, 33,127,153, 7,245, 47, 91,209,241,171,185, 56,119,250,184, +165, 95,251, 46, 81,106,173,214, 27,128,230, 61,222,205,198,192,108,211,108,211,108,243, 63,211,102,131, 92,132,101,217,206, 0, + 92,170,119,139,171,121,129, 35,128, 34, 84,173, 34,227, 82, 93,119, 8,106, 93, 86,119,191,246,185,117,247,107,127, 47,174,254, +238, 92,189,125, 68, 16, 68,137,145,164,187,161,106,105,194,243,213, 91,160,218,149,104,116,224, 49, 65,144, 50,154,102,132,124, + 39,103,213,180,143,250,181,191,114, 45,230,137,133,163, 53,119, 80,239, 78,161, 15,159,190,186, 71,144,132,150, 32, 72,147,198, +125,112, 56,156,113,155, 55,111,110,111,109,109, 13,134, 97, 96, 99, 99, 3,169, 84, 10,141, 70,131,242,242,114,168,229, 50, 80, +114, 25,226,178, 51,208, 61,180, 55, 70, 15, 30,232,251,239,211,103,199,209, 52,125,196,144, 93,247,128, 78,122, 37,107,101,115, +135, 55,210, 68,118,153,158,116,253,208,201, 27,124, 75, 75, 12,152, 23,254, 87,158,129,216,243,231,207, 95, 28, 53,106,212,144, + 5, 11, 22,144,121,121,121,151,210,211,211,187, 3, 72, 50, 74, 42,132,162,175,191,252, 58,204,206,206,146, 69,212,213,179,232, +213,105, 60, 44, 4, 28, 20,203, 40, 16, 4,144,156,120, 18, 4, 97,143,248,148, 60,244,236,104,141,129,131,124, 45, 79, 31, 79, + 94,128, 55,227,131,222, 41,154,210,210, 82, 20, 22, 22, 66,171,213, 66,171,213, 98,204,216,177, 56,176,127, 63, 42, 43, 43,161, + 84, 42,161,209,104, 64,211, 52, 72,146,196,213,232, 40,100,191, 74, 70, 72,112, 48,208,192,210, 75,251,159,128, 7,224,254,243, +231,207,145,156,156,140,215,175, 95, 67, 36, 18,193,213,213, 21, 43, 87,174,132, 90, 93,181, 70,217,216,177, 99, 67, 1, 60,253, +171, 47,212, 75, 96, 87, 58, 77, 47, 29,114,234,148,243,157, 83,167,152,251,231,206,189, 22,202,229, 59, 77,185,150,207,199,152, +117, 63,126,209, 86, 34,145,224,117,214,102,248,248,240, 49,127,174, 3, 34,126, 40, 2, 0,204,158,213, 20, 93,187, 56, 66, 86, +118, 28,142,206,139,177,101,203,156, 86, 83,167,110,156,172, 80,208,251,140,152, 94,122,246,236,217,209,222,222,222, 77, 98, 99, + 99, 9,129, 64, 0,177, 88, 12,177, 88, 12,145, 72,132,194,194, 66,164,167,167,179,235,214,173,203, 1,176,212,144,161, 21, 91, +242,238, 1, 24, 50,119, 48, 46, 62,127,188,191,103, 19,206,171,184,209, 51,123,100,196,223,143,149, 95,185,122,103,149, 78, 37, +202, 46,123,125,109, 97,203,174,177,142, 95,125,243, 61,182,174, 91,142,231, 15,110,151,184, 52,147,109, 19, 19,234,122,211, 25, + 26,186,130,235,230, 98,175,155, 49,117,180,237, 57,151,187, 51, 46,112, 9,105,126,209,227,245, 72,143, 85, 10, 91,119,154,212, +198,139,212,220,184,113, 67,220,171, 87, 47,168, 84, 42,189, 50,121,240,224, 65, 70,167,211,221,172,247,217,164,168,239,114,114, +114,220,148, 74, 37, 6, 15, 30, 60,123,253,250,245,146,154, 53,234,104,154,126, 75,201, 90,189,233,192,229,175,191,219,118,243, +242,145, 31,220, 87,135,127,218,123,226,204, 53, 55,209,192, 58,146, 92,146,252,234,220,169,189,174, 34, 59, 45,196,246, 3,161, + 42, 80,226,249,174,207,160,144,169,208,117,245,247, 0, 4,208,104, 73,236, 28, 54, 6, 60, 7,119, 44,159,254,169,251,146,157, +191,126,193, 48,204,102,115,191,222, 12, 51,204,168, 3, 23,130, 32,162, 1, 32, 60, 60,124,113, 68, 68, 68, 34, 65, 16,209, 44, +203,134, 85, 11, 40,209, 44,203,134,213,156, 83, 77,206,222,217,175, 57,183,238,126,221,239,139, 22, 45,242,139,140,140, 92, 27, + 28, 28,124,228,238,221,187,175, 0, 24, 35, 90, 67,171,137,213, 59, 75,239,144, 53, 12,178,246,246, 45, 69,139, 97,110,191,120, +149,161, 24,216,191, 91,211,232, 91, 79, 31,125,242,201,208,126,227,134,245, 26,148,158, 85,156,220,202,211,213, 49, 49,241,169, + 53,195, 48,183, 77,201, 37,161, 80, 24,214,183,111, 95,110,105,105, 41, 44, 44, 44, 32,149, 74,145,147,147, 3,138,162,160, 42, + 47,131,186,188, 12,170,178, 82, 80,229,165,120, 25,243, 16, 1,173,188,132,213,131,229, 13,162, 70,117,169,171, 84,213, 86,182, + 4, 86, 86, 16, 90, 89,129,104,188,219,240, 67, 91, 91,219,251, 53,141, 42, 69, 81, 95, 45, 92,184,176,136, 97, 24,172, 89,179, +198,218,210,210, 50, 10,128,208,152, 17, 43, 39, 78, 88,112, 71,127,242, 89,122, 60,122,116,152,130, 54, 45, 63, 64,122,129, 18, + 69,114, 10,133,101, 20,186,246,250, 25,205, 59,124, 15,143,142, 17, 72,206, 44,129,123, 19,111, 18, 92,161,193,197,159,179,179, +179,223,218, 63,114,248, 48, 20, 10, 5, 90,181,106,133,241,227,199, 99,225,194,133, 24, 63,126, 60,220,221,221, 49,241,163,225, + 88,190,124, 57,242,243,243,141, 37, 85,221,166, 77, 27,181,167,167,167,218,211,211, 83, 77, 81, 20, 42, 42, 42, 80, 86, 86, 86, + 55,191,231, 52, 54, 35,157,157,157, 23,185,186,186,198, 59, 59, 59, 39, 10,133,194, 11, 79, 8,226,153,202,211,211,165,251,136, + 17, 68,187,143, 62,226,100,138,197,196, 45,192,210, 20, 91,142,246,188,161,125,250, 14, 17,148,149,238,213,139, 84,159,126,226, +132, 63,111,249,225,206, 31, 93, 48,235,171, 86, 32, 72, 17, 8, 82, 0, 69,229, 13,116, 11, 12,230,219,218, 18,198,158,165, 9, + 0,158,116,239,222,221,125,230,204,153,132, 80, 40,196,236,217,179,169,233,211,167,167,142, 31, 63, 62,245,250,245,235,180,167, +167, 39, 60, 60, 60, 8, 15, 15, 15, 55, 0, 79,170,175, 49, 8,235, 86,196,106, 53,149,252,135,173,183,228, 21, 13,199,144, 10, +173,112,204,138, 13,121,197,171,183,191,218,144,254, 92,225,245,252,193,237,226,212,132,115, 76,250,163,223,139,114, 83,229, 94, +171,183,191,218,176,120, 91,110,189, 47,245,173, 91, 96, 78, 70,223,162, 20,149, 10,238,136, 97,125, 20, 51,166,141,107, 99,111, +233,119, 16, 77, 6,118,104,222,172,233,196,229,107,183, 80,211,191,248,154,218,189,103, 47, 43,151,203, 33,147,201,176,101,203, + 22,221,185,115,231,114,104,154,254,186,161, 62, 16, 0,104,181, 90,204,152, 49, 67, 98,109,109,141,236,236,108,189, 34, 10, 0, +121,210,226,167,119, 30, 37, 60,155,247,175,177,161,149,106,181,250,242,239, 49,201,237,188, 61,155, 18, 4,219,224, 68, 20, 1, +143, 55,160, 75,183,110, 28,150, 45, 3,193,109,134,151,251,215, 65,150, 95, 2, 89, 97, 9, 56, 60, 9,116, 16, 66,203, 8, 96, + 27, 16,136,148, 71,177,104,226,228,194, 21,242,120,131,204,237,137, 25,102,252, 51, 97,136,139,212, 38, 75,145,145,145,107, 13, + 29,175,181,213,212,217,215, 19,169,186, 36,172,246,119, 0,136,140,140, 92,203,178,108,216,221,187,119, 15, 3, 80,154,120, 11, +159,215,218,154, 30, 71,139,163,210, 68, 44, 88,184, 20,118, 54, 98,155,192, 78,222,174,103, 46,221,138,185,125, 55, 38,185,185, +135,163, 19,171,213,216,253,184,113,107, 83, 66,161,140, 52, 49, 17,190,142,142,142,160, 40, 10, 47, 94,188,192,235,215,175, 65, + 81, 20,116,149,149, 80,151,149, 65, 85, 90, 10,186, 82, 14, 62, 77, 67, 41, 45,132,131,133, 8,120, 51, 35,209,136,242, 70,212, + 75,180,106,182, 34,107,107, 8,173,172, 65,242,120,245,186, 21, 27, 64,231,192,192,192, 99, 9, 9, 9,221,250,247,239,191, 10, + 85, 83,228, 51,115,114,114,250, 45, 91,182, 76,237,226,226,130, 25, 51,102,180, 5, 48,197, 40,201, 20,104,124, 61, 93,219,162, +141,215, 20, 52,247,232,139,178, 74, 45,164, 50, 45, 10,203, 40,236,252, 57, 24, 39,118, 7,226,207, 19, 61,145,112,121, 0,202, +180,174,176,116,255, 16, 44,173,241, 51,100,243,234,213,171, 88,185,114, 37, 86,173, 90,133, 53,107,214, 96,213,170, 85,200,201, +201,129,191,191, 63,178,178,178,112,241,226, 69,228,229,229,193,209,209, 17, 15, 31, 62,196,166, 77,155,240,231,159,127, 26,189, +233, 26,226,106,194, 57,141,242,165,235,116,186,169,121, 35, 70,180, 47,176,183,111,215,169, 83,167, 33,179,103,207,246,234,222, +189,187,254,184,151,151, 87, 51,177, 88,156,143,170, 25,148, 29, 13,217, 98,128, 78, 78, 78,254,208,168,159, 85,151, 49, 15, 4, + 33, 66,223, 1,201,232,222, 51, 6,148,150, 15,146, 16,130, 36, 69,208,233,138, 97,103,231, 14,150, 37,252,141, 36,113,153, 84, + 42,245,190,118,237, 26,153,158,158, 14,145, 72, 4, 0, 25, 43, 86,172,216,186, 97,195,134, 36, 7, 7, 7, 58, 58, 58, 26,167, + 79,159, 70, 88, 88, 24,103,250,244,233,222, 30, 30, 30, 59,140,221,247,138, 45,121,247, 14,109,188,248, 49, 79,107,215, 81, 36, +110,222, 2,149,150, 31,126, 25,234, 40, 1,128, 75,105,105,114,231,102,178,200, 74,121,124,150,109,211,138, 31, 46,165, 25,155, +113,186,130,121,156,250,236,254,161, 83,151,202, 11, 11, 74,121,157,218,251, 41, 35, 86,126,195,111,222,162,245,143,203, 23,254, +203, 53, 71, 38, 42, 27, 48,251,226,179,147,151, 30, 86, 76,250,228, 51,221,180,207,103,170, 46, 94,186,122,138, 97,152,246,104, + 96,198, 33,195, 48,200,203,203, 67, 98, 98, 34,210,210,210, 32,149, 74, 81, 84, 84, 4,185, 92,174,119, 55, 90,200,101,231,183, +254,118, 46, 78, 34, 22, 91,116,107,239,221,236, 65,108, 82,161, 68, 44,182,240,110,209,172, 13,176,162,222,122,132,166,233,246, + 34, 11, 49, 0, 2,101, 9,183, 81, 81, 90,129,138,178, 10,200, 75, 42,160,166, 56, 80,169, 73, 40, 53, 36, 60, 67, 7,162,162, + 82,133,138,226,114, 48, 52,221,193,220,220,152, 97,134, 25, 6,218,250,232,240,240,240,197, 38,158,107,178,123,179, 46,241, 10, + 15, 15, 95, 76, 16, 68,244,162, 69,139,252,208,240,132,170,218,216, 85,207, 7,128, 9,225, 29,138,139, 83, 43,172, 8,223, 81, +115,191,253,238,226,225, 61, 63, 59,171,213,138, 44, 7, 59, 75,218,210, 66,224, 56,109,198, 26,200, 43, 74, 71, 86,154, 30,142, + 0,165,165,165,120,245,234, 21,196, 98, 49,248, 60, 30,104,165, 18,180,178, 18,202,210, 98,144,148, 26,124,154,134,189,133, 24, +158,145,229, 2,183, 0, 0, 32, 0, 73, 68, 65, 84,238,174,104,238,226,106,146,205, 23, 55,174,232, 7,190,215,118, 23,174, 11, +244,133, 64, 98, 9,129,149, 37,190,140,254, 29, 0,192,231,243,129,101,171, 76, 18, 77,154, 52,105,114,246,208,161, 67,124,169, + 84,138, 39, 79,158,196, 1, 40, 7, 96, 5,128, 73, 78, 78,190,150,144,144, 16,230,237,237, 13, 0,173,140, 25,147, 21,145,180, + 86,199, 34, 59, 63, 3,233,175, 99, 97,111,211, 18, 60,139, 54, 40, 44,163, 32, 20,183,132, 86,253,198,251,168,146,101, 66, 73, +113, 76,186,119,141, 70, 3,157, 78, 7,157, 78, 7,141, 70,131,207, 63,255, 28,119,238,222,197,145,211,215,241,234,101, 10,218, +182,112,197,228,201,147, 16, 24, 24,136,187,119,239, 26,180, 53,165, 35,180, 77, 44,193,221, 56,132,132,192,210, 65, 29,180,240, +242, 3, 99,100,139, 32, 8, 22, 13,184, 34,235, 96, 67,112,112,112,235,148,202, 74, 36, 62,123,134,254, 43, 86, 0, 0, 46, 92, +184,240,214,189,204,155, 55, 79,144,148,148, 52, 45, 38, 38,102, 90,110,110,238, 70, 0,245, 15, 54,103,129,243,231,239,225, 95, +255, 74,130, 84, 42, 5, 0, 28, 61,252,134,151,166,191,162, 48,120,104,149, 71,203,214,214, 22, 27, 55,250,155,148,159, 52, 77, + 99,215,174, 93,122,119, 33, 0,112,185,220,238,243,230,205, 27, 85,223,249,173, 91,183,230, 27,179, 57,119, 76, 19,209,159,113, +236, 87, 54,173,155,251, 89, 59, 6,160, 88, 27,235, 31,155,147, 55,107,238,152, 38,155, 55, 29,207, 81,137, 9,245, 62,130,206, +246,224,138, 84,251, 77, 73, 99,218,165,159, 53,197,158, 83,247,231, 75,101, 75,102,126, 54,193,193,218,214,185,114,247,214, 8, + 59,146, 67,178,103, 99,168, 50, 63, 47, 7,219, 15,131,126,170,248,215,220,101,177, 26, 93,246, 76,100,159, 77,129,129, 16, 23, + 52, 77, 35, 55, 55, 23, 82,169, 20, 89, 89, 89, 40, 42,170,114,191, 22, 21, 21,129, 97,152,191, 82, 33, 66,153,149,133,204, 83, +187,209,124,210, 36,116, 93,181, 18, 52,195,133, 82, 65, 99, 99, 72, 63,148,150, 43,161,102, 8,184,119, 14,193,103, 23,254, 0, +201,210,192,206,109,230,150,196, 12, 51,254,161, 48, 37,188, 67, 13, 33,138,136,136, 8,251,187,255,191, 54,217,138,136,136, 72, +140,136,136,104,204,127,213,117, 25,234,247,107,198,104,253, 94,107, 0,218, 59,141,166,188, 40, 57, 45, 41,137,155, 91,169,172, +180,112,113,118, 82, 91,136,132, 76,185, 76,206,137,125, 26, 71, 85,230,191,124,222,136,251, 72, 78, 72, 72,240,207,205,205, 69, + 86,102, 38,116,202, 74,144,106, 13, 88,149, 2,253,123,132, 64, 4, 64, 68, 18,224, 51, 20,184, 28, 1,228, 21, 50, 0, 72, 54, +218, 56,106,181,239, 40, 91, 4, 65, 64, 96,101, 5,129, 68, 2,129,165,213, 91, 10,151, 41,138,141, 80, 40, 60, 20, 21, 21,229, +214,164, 73, 19,172, 92,185, 18, 77,155, 54,245,113,119,119, 87,216,216,216,136, 93, 92, 92,208,174, 93, 59,132,132,132,224,226, +197,139,128, 9, 49,165,180, 58, 81,252,243, 12,116, 47, 42,185,139, 63,126,255, 5, 26,165, 26,157, 66,127, 1,197,109, 14, 39, +191,239,193,188, 56, 8, 69,254,153, 42,245,192,117, 24, 94,103,101,128,224, 8, 18, 77, 85,158,106,190,199,197,197,225,240,153, + 91,112,243,244, 69, 86,234, 51, 60,187,121, 13,119,156, 28,224,233,219, 78,239, 6,106, 48,141, 52,184,171,183, 85,133,137, 90, +250,213, 4, 97, 73, 73,137,208,222,222, 94, 93,147,119,110,110,110,127,133,108, 77, 88,176, 96, 1,202,120, 60, 96,232, 80,240, +211,210, 64, 81, 20,130,130,130,208,181,107, 87, 0, 64, 80, 80, 16,184, 92, 46, 2, 2, 2,224,238,238,142,109,219,182, 77,104, +136,104,145, 4,158,232,116,197, 62, 94, 94, 94,122,162,181,255,128, 20,177, 49, 3, 64, 64,128, 45, 91, 95,232,207,109,214,172, + 25,242,243,210, 64, 16,108,130,145, 52,174,114,117,117, 93,230,230,230,230,181, 97,195, 6,142, 72, 36,194, 23, 95,124,209,178, +162,162,162,121,181,148,140, 69,139, 22, 1, 0,150, 47, 95,142, 21, 43, 86, 64,173, 86, 43, 26, 50,182,127, 99,123,247,194, 18, +102, 26, 91, 97, 49,178,143, 99,243,246,125, 7,245, 71, 75,239,190,232, 59, 40, 11, 0,214,218,115, 51, 62,250,113,137,237, 41, + 91, 43, 98,239,149, 75, 87,151,247, 8,237,187,100, 97,197,205,213, 63,236, 42, 51, 58,230,177, 60,115,159,252,185, 96,220,166, +159,119, 28,216,244,221,162, 57,162, 44,169,166, 52,167,148,173,176, 20,114, 45, 91,185, 16,150,179,190, 93,245, 42, 55, 55,109, + 62,178, 47, 25,157,105,201, 48, 12,210,210,210,244, 99,250, 84, 42, 21, 42, 43, 43,145,157,157,173,127,102,148, 18,235,193, 51, + 63, 25,214,161, 82,169, 84, 60,120,154,154,181,116,246,196,224, 74,165, 82,145,154,158,149, 2,108,169,151,141,145, 36,249, 84, + 33, 87,244, 87,148,169, 32,125,242, 28, 77,251,121, 66,171, 35,160,209,209,144, 22,203,161,214, 1, 52,201,131,223, 71,147, 65, + 19, 92, 20,229,230,128,228,112,226,240,246,160,125, 51,204, 48,227,159, 3,131, 92,164, 70,209, 10, 14, 14, 62, 82, 91,117,170, +249, 14, 64, 13,195, 67,121,164,181,201, 84,141, 59,177,161,255,169, 99,215, 84,188, 51, 70,203,104,120,135,154,255,244,176,145, +185,175, 91, 62,177, 41,163,211,181, 45, 44, 42,208,113,185, 66,158,135,141, 50,175, 36,203,244,127, 87,171,213,209,215,174, 93, + 27, 49, 96,192, 0, 97,234,211, 56,104,202,203,161, 41, 47, 3,143,209,193, 94,220, 5, 36,165, 6,161,209,160,137, 15, 3,149, + 92,140, 91,119, 18,180,106,181, 58,218, 84,162, 69,114, 56,111,143,203,178,180,132,208,202, 26, 66, 75,203,186,174, 69, 99,164, +192, 98,224,192,129,253,130,130,130,192,178, 44,118,237,218, 5,138,162, 4, 20, 69, 65,163,209,128,162, 40,200,100, 50, 28, 56, +112, 0,219,183,111,191, 3,224, 55,163,141,153, 78,115,237,242,213, 27,129,159, 78, 12,227, 93,136,222, 8,157,134,134,146,104, +138,202, 74, 45, 42, 52, 22,160, 29, 38, 1, 5,231,193,225,138, 16, 28,208, 18,103,142,159,164,160, 83, 95, 55,145,133,191,165, + 10,101,103,101,224,245,203, 20, 88,202,242,225,100,109, 1, 69, 90, 10, 58, 77,158,242, 94,234,132,135,135, 7, 24,134, 65,159, + 62,125,244,131,171,223,151,108, 21, 23, 23,227,220,185,115, 8, 10, 10, 66,104,104, 40,114,114,114,144,150,150,134, 15, 62,248, + 64,127, 78, 92, 92, 28, 98, 99, 99,209,170,149, 97,145,176,168, 68,123,225,117,246,147,177, 31,126,248, 33,255,254,253,251, 96, + 89, 22,222,222,214,176,182,146,128, 32,133,240,245,117, 6, 80,213, 7,232,221,187, 55,100,178, 52, 93,105, 41,123,193,200,237, + 30, 2,112, 90,163,209,188,232,213,171,151,251,203,151, 47, 49,119,238, 92,238,209,163, 71,107,164,100,132,135,191, 61,153, 66, +169,108,216,117,223,182,189,207, 55, 45,117,118,161, 34,113,243, 22,214,142, 1,104,233,221, 23, 0, 48, 32,236, 83,180,108,221, + 12,178,162,248, 22, 42,101,198, 72, 62,183,212, 46,126, 75, 78,146,120,168,255, 39,170,194,223, 83, 81,229, 58, 53, 90,236,202, +212,163, 5, 89,188, 73,199, 78,159,189, 56,227,131,176,225, 60, 45,173,211,249,123,242,108,163, 78,157, 47,204,201,204,250, 9, + 89,151, 18,222,232,127, 6, 85, 60, 90, 38,147, 65, 34,145, 32, 33, 33, 65, 61,116,232, 80, 33, 73,146,120,241,226,133,158,104, + 57, 59,218,183,235,222,213,223,103,245,166, 3,151, 37, 66,161,112, 80,239, 46,190, 73,169,153,175, 89,150,200,104, 80,109,213, +106,175, 62,125, 18,215,199,201,189, 53, 39,237,247,251,112,232,249, 1,212,106, 18, 74, 13, 3,181, 14,208,113,248,112,235,216, + 13,182,173,124,193, 2,120,116,255,142, 86,173,213, 94, 54,183, 53,102,152,241,143, 86,181, 88, 67, 36,169,250,123, 9,128,140, +136,136,136,162, 90,106,147, 20, 64, 28,128, 14,213,231, 73,235, 92, 39, 37, 8,226, 17,203,178, 93,107,217,145,214, 34, 92,181, +191,107,234,156, 19,215, 8,146, 85,123,251, 54,209,106,104, 74, 37, 0, 56, 58, 58, 58,119,234,212,165,213,175,123,142,129,101, + 89, 60,143, 93,143,210,194,103, 88,182,246, 94,171, 38, 77,154,132,230,228,228,220, 50, 37, 5, 52, 77, 31,221,187,119,239,252, +110,157, 59,117,106,209,180, 41,226, 50,210,193,103,105,240,105, 26, 36,165, 6,151,214,160,169, 63, 13,146,176, 68,110,110, 57, + 34, 15, 29, 75,168,142, 18,111, 16, 62, 31, 12,199,202,215,229, 32, 8, 2, 27,130,253, 33,176,178, 4, 95, 98,137, 47,207,222, +208,147,171,232,149,139, 32,176,180, 68,171,110, 38, 5,132, 87,220,188,121, 51,230,233,211,167, 93,253,253,253, 49,127,254,124, +100,100,100,128, 97, 24, 20, 20, 20,168,242,242,242,114,164, 82,105, 6,128, 83, 0,126,133, 9,145,199,249,106,213,230,232, 19, +251,103, 6,247, 8,117,252,112,228,118,156, 62, 62, 15,101,229, 50, 40,116, 98, 84,170,116,168, 84,115, 96,239,208, 30,221, 2, + 2,144,155, 83,136,196,251,151, 43,184,106,197,250,198, 60,160, 4, 65, 32, 54, 54, 22, 94,238, 86, 72,249,227, 22, 28, 45,120, +232,224,238, 10,247,238, 61,244,241,165, 12,129,199,129,110,194,132, 9,250,200,240, 3, 7, 14, 76,159, 52,105,146,219,188,121, +243,176,103,207, 30,220,185,115,231,157, 1,218,161,161,161,184,125,251,246,247, 0,150, 27, 19,245, 52, 26, 13,124,124,124,240, +232,209, 35, 92,187,118, 13,125,251,246, 69,104,104, 40,226,227,227,113,229,202, 21,196,198,198,130, 32, 8, 56, 56, 56, 64, 91, + 69,158,181, 13, 25,163, 40, 68,253,240,227,222,197,155, 54,109,247,155, 56,113, 34, 78,156, 56,130, 79, 63,105, 11,130, 20,130, + 32,132, 24, 62,172, 45, 86,174,122,132,110,221,122,195,209,145,135, 77, 27,207,188, 82, 42,233, 3, 38,100,227,234, 43, 87,174, +184,171, 84, 42,148,149,149,177,150,150,150, 68,113,113,213,140,214,250, 20, 45,133, 66, 33,106,200,208,211,199,201,235,203,228, +108, 41, 91, 17, 59,178, 68, 23,219,190,239,160,108, 12, 8,251, 4, 87,163,127,195,141,203,215, 96,207,205, 72,135, 68,126,177, + 40,189, 72,150, 87,233,189,195,183,243,116,206,235,202,203, 59,102, 13, 79,225,184,185, 49, 81,139,126,145,149, 25, 34, 90, 0, +136,146,164,131,103, 79,177, 24, 30, 18,220,173,181,127, 51, 55, 65,105, 81, 33,123,252,204,197, 4, 42,253,196,185, 90, 4,139, + 53, 66,212, 87,134,135,135,127, 87,253,125,223,210,165, 75,167, 71, 70, 70, 58,229,231,231,235,199,104, 21, 22,149,220, 8, 25, + 58,139, 46, 46, 43,215,236,221,244,237, 24,177, 72, 40, 88, 26,185,247,119, 45, 7,247, 27,178,171, 99,152,109, 31,205, 93, 54, + 39,245,121,108,147,230, 98, 1,206,124,187, 28,113, 87,110, 66, 75,242,241,175,107, 15,160,166,104,148, 21, 21,227,250,180,175, + 96,233, 98,135,237,191,159, 40, 96, 24,230, 23,115, 83, 99,134, 25,255, 92, 52,196, 69, 8,130,168, 47,198, 94, 65, 61,191, 61, + 50,116, 93, 3,118,254, 14, 52, 24, 21,222,164, 41,120, 69, 69, 69,133,183,111, 63,192,239,209,171,113, 43,122, 53, 18, 99,227, +144,155,163, 65, 78,129, 10,214,214,214,247, 12, 92, 90, 55,114, 44,171, 80, 40, 70, 45, 93,246, 93,190, 72,108,129, 94,253,250, +193,213,201, 25, 22,124, 30, 56, 58, 6, 28,130,135, 10,169, 45, 82,226, 21, 88,184,247, 96, 97,133, 66, 49,170,158, 70,162,127, + 67, 36,131, 32, 8, 8,173,173, 32,176,180,130,208,202,250, 45, 55,162,200,218, 26, 34, 43,107,112, 5,130,250, 6,195,191, 99, +179,162,162, 98,244,152, 49, 99, 74,203,203,203, 49,125,250,116,220,186,117, 43,246,242,229,203,214,241,241,241, 98,169, 84,218, + 26,192, 64, 0, 59, 13,144,172,183,108,150,150,166,201, 89,157,122, 92,196,119, 95, 43, 85, 58, 7,140,157,114, 20, 18, 50, 27, + 58,154, 1, 11,192,221, 94,128,238,253, 87,161, 80, 19,130,163, 59,214, 40, 24, 74, 53,177, 78, 12,173,183,108,178, 44,203,186, +184,184,188,147, 7,215,174, 93,195,216, 49,163, 49,104,228, 8, 56,181,240,130,115,255, 15, 48,104,250,191,176, 99,199, 14,144, + 36, 9, 71, 71,199,186, 13,175,222,230,254, 39,224, 29,126, 10,226,240, 83, 16,251, 98,193, 5, 48,249,224,193,131, 63,116,232, +208,225,230,157, 59,119,214, 3, 24, 87,251,191,106, 97, 69, 29, 53,171,190, 50, 90, 50,103,206, 28,101,106,106, 42, 36, 18, 9, +116, 58, 29,238,220,185,131,237,219,183, 99,195,134, 13,136,141,141,133,131,131, 3, 90,181,106, 5,181, 90,141, 71,143, 30, 41, + 1, 44, 49, 96,147,145, 74,117,163,183,108,137, 44, 14, 11,235,137,189,123,183,194,213, 53, 4, 60,174, 43,184, 60, 39, 72, 44, +125,176,251,215, 31, 48,100, 72, 39,156, 61,115,172,164,168, 88, 55, 26,128,206,132,103, 73,245,224,193, 3,236,216,177, 3, 99, +198,140,201, 25, 59,118, 44, 93, 94, 94,174, 87,180, 88,150, 5,203,178, 88, 81, 61,198, 76,173, 86, 11, 27,178,249,217,194,132, +156,111,215, 36,174, 44,200,207, 9,186,117,243,222,132, 27,151,175,225, 85,234, 13,220,184,124, 13,127,220,184, 27, 94,144,159, + 19,212, 41,176, 13,127,212,244,153,223,236, 63,121,130, 99,105,237,134,253, 39, 79,112,198,207,250,122, 77,151, 65,125,151, 24, +123,230,171,203,145,173, 40, 44, 88,180,118,253,207, 21, 58, 74, 69,174,251,105, 91,174, 82,154,183,164,214,115,201, 26,123, 62, +149, 74,229, 78,149, 74,229,174, 82,169,220,213,106,245,146,140,140,140, 94,243,231,207,151,210, 52,173, 87, 75,165, 73,103,239, + 61,251,115,223, 90,103, 71, 59,113, 72, 87,191,182, 27,119, 30,255, 61, 43,187,224,223,181, 98,104,213,151, 78, 85,133, 82, 53, +122,196,168, 73,149,101,165,106, 4,127, 29, 14, 70,100, 9, 53, 13,104, 89, 14,116, 4, 23, 79, 87,111,132,216,222, 10,135,210, + 31, 43,202,181,212,104,188, 29, 67,203,208,189,255, 21,152,109,154,109,154,109,254,103,218,252,191, 12, 55,188,189,214,161,219, + 91,138,150,177, 41,149, 77,154, 52,233,245,225,240,254,232, 29,182, 20, 44,203,226,217,227, 31, 81, 42,125,142, 38,174, 66,164, +101,201,130, 1,220,106, 68, 98,178, 50,178,179,131,230, 44, 89,122,114,236,192,126,190,254, 45, 90, 8,155, 55,247,132,196,217, + 25, 69, 69, 82,252,121, 63, 73,187,230,112, 84, 66, 53,201, 50,201, 49,201, 48, 76,213, 32,119, 0,253,230, 44, 4,193,225, 0, +213, 97, 28,106, 26,198, 22, 93, 67, 64,112,185,160, 89, 6,106,181,218,148,217,114,175, 95,190,124, 57,122,226,196,137,215,163, +163,163,201, 65,131, 6,117, 60,117,234,212, 95, 89, 51, 15,149,133,169, 55, 1,132,173, 89, 52,227,104, 80,223, 17,214,222,126, + 93,248, 93,154,115, 64,105, 9,228,230,100, 34,250,228, 67, 42,233,193,101, 25,171, 83,141, 83, 20,165,222, 52,100,139,162,168, +172,214,173, 91,187,236,216,177, 67, 63, 24,158,166,105, 20, 21, 21,225,222,189,123,104,223,181, 27,124, 63,153, 6,169, 84,138, + 45, 91,182,160, 89,179,102, 24, 54,108, 24, 74, 74, 74,160,211,233, 76,117,248,210, 0, 46, 87,127, 80,135,100, 17,213, 75, 0, + 25,116, 27,122,121,121, 9, 84, 42, 85, 71,150,101, 57, 4, 65,108,214,104, 52, 83, 23, 45, 90,228,182,118,237, 90,180,109,219, + 22, 69, 69, 69,144, 72, 36,240,246,246,134, 84, 42,197,195,135, 15,105,133, 66,177, 3, 85, 11, 89, 75,141,164,239,197,195,135, +233, 65,179,103,127,121,242,135,200, 25,222, 42,117,111,129,189,125, 15,176,172, 14, 82,105, 6,228,178, 59,212,170,149,191,189, + 44, 40,212,142, 2,144,106,226, 61, 47,159, 57,115, 38, 0,136, 0, 44, 77, 75, 75,123,226,235,235,235,221,144,162,101, 10, 54, + 29,207, 81, 1, 56, 60,122,144,251, 92, 89, 81,188,183, 61, 55, 35, 61,200,159,217,178,233,120,206,255, 99,239,186,227,162,184, +218,238,153,217,157,237,187,192,210,171, 10, 40,136, 8, 2,162,136, 45,162, 38,198, 94,177, 68,197, 94, 98, 75,140, 26, 53,154, +216, 53,126, 38,198,150,216,123, 87,140,130,198,222,187, 98, 67, 69, 65,122,239,117, 97,251,204,247, 7, 44, 65,165,236,162,201, +155,188,239,158,223,111, 92,119,216, 61,123,239,157,153,123,207,125,238,115,159, 71,110, 98, 47, 91,150,147,112,237,117,186,236, +220,230, 61,161,199, 89, 33,253, 7,106, 29,197,209,115,249,214,204, 49, 61,168, 25, 31, 31, 31, 39,130,200,115,201,202,125,245, +112,204,184,137,131, 77, 57,101,103,124, 28,115, 27,147, 13,252,248,143, 30, 61,138,135,129, 59, 67, 43,240, 58, 53, 53,181,227, +188,121,243,206, 49, 12,243,150,111, 66, 86, 78,222,229,192, 94, 83,153,130,130,194,199,217, 47, 79,233, 19, 75,237,254,253,136, + 71, 93,188,188,253,142,255,184, 98,149, 77,167, 25,223,176, 95, 95,185, 10,104,213, 72,188,118, 21, 90,158,146,254,249,246,133, +204, 66,149,170, 63,140, 81,225,141, 48,226,127,222,154, 85,155, 22,249,135,163, 39,106,112,134,215,187, 50,174, 46, 14,231,154, +186, 53,250,172,129,163, 21, 0, 32, 54, 62, 13,177,241,169,231, 99,227, 82,187,213,161,120,107,218, 94, 89,153, 84,154,168, 8, +225,192,232,151, 84,250, 45, 78, 11, 11,139,135,108, 54,219,209,144,214,208,106,181,105, 57, 57, 57,126,122,150,115,152,179,179, +243,170,196,196,196, 80,154,166,191, 54, 80,237, 87,203,169, 75, 42, 77,178,185, 93, 25,141,210, 27, 0, 8, 54, 87,159,164,210, + 85, 57,189,197, 98,241, 22,138,162, 26,232,174,163,206, 7, 75,171,213,178, 84, 42, 21, 95,171,213,178, 0, 16, 36, 73,106, 40, +138,146, 19, 4,161,209,104, 52, 73, 10,133, 98, 34,254, 12, 56, 90, 91,221,235, 28,232, 43,132, 22,170,177,104, 93, 4,128,232, +232,104,119,169, 84, 58,132, 32,136, 65, 12,195,120, 20, 23, 23, 43, 22, 46, 92,248,232,232,209,163, 69,206,206,206,159,247,236, +217,147,120,250,244, 41, 34, 35, 35,153,220,220,220, 99, 21, 86,172, 88, 3,239, 37,146,199, 99, 13, 53, 55, 39,123, 50, 12,124, +192,128, 32, 72, 60, 43, 44,164,207,148,150,106,247, 87, 8, 70, 67,239, 79, 29,190,104,212,168,209,174,248,248,120,170, 38, 75, +106, 77,117,127, 23,171,191,107,190, 32,176, 67,135,129,119,110,220, 56, 49,103,249,243, 37, 85,255, 54,173,159,116,204,176, 41, + 51, 86, 31,220,180,110,206,134,223,243,119,234, 83, 78, 95, 95, 95, 87,130, 32,134, 0,240, 98, 24,166, 9,195, 16,124,130, 96, +242, 9,130,120, 14,224,169, 82,169, 12,127,241,226, 69,202, 7,212,189, 62, 51,220,154, 56, 43,147, 74, 67,171,109,161, 5, 24, + 61,147, 74,255,221,229, 52,114, 26, 57,141,156,255, 57,206,127, 51, 38, 84,115, 78,191,200,240, 58,196,198,165,118,139,141, 75, + 69,147, 38, 77,152,152,152, 24,131, 68, 90, 77,131,180, 86,171, 61, 84, 90, 90,122,232, 67, 72,114,115,115,253,255,226,198, 59, + 24, 31, 31,127,240, 99, 18, 86, 8,169, 37, 21, 71,125,241,172,164,164, 36, 64,223, 15,171, 84,170,191,162,109,136, 10,107,214, +226,154, 62,240,217,103,159, 37,170, 84,170,139, 0,146, 9,130, 48, 3,144,167, 82,169,206,105, 52,154,204,152,152, 24,255,159, +127,254, 89, 23,249,126, 41,128,135,245, 44, 7,173, 80,104, 15,164,165,105, 15,252, 5,117, 60,160, 84, 42,103, 90, 88, 88, 52, +150,203,229, 92,185, 92,206,169,186,249, 64, 32, 16,100,215,230, 16, 95, 21,102, 18, 98, 55,135,157,111, 97, 38, 33,222, 21, 82, + 48,119,192,241, 50, 89,100, 83,115, 7, 28,215,183, 96,143, 31, 63,142,245,241,241,217, 71,146,164, 51,195, 48, 54, 0, 99,202, + 48,200,102, 24, 38,135,205,102,167,190,120,241, 34,245, 31,212, 9,201, 53, 52,189, 70,163, 84,254,233,119,104,220, 93,104,132, + 17, 70,252,247,160, 70, 31, 45,182,161, 76, 49, 49, 49,132,177, 61,141,168, 42,182,106,251, 99, 98, 98,162, 2,192,237,138,227, + 93, 60, 4,208,251,159, 94,193,244,244,116,191,154,254,166,175,200, 2,202,125,182,128,200,106,163,179, 47,218,144, 95,140, 13, +161,179, 13, 45,219,147, 39, 79,146,160,231, 18,187, 17, 70, 24, 97,132, 17,127, 25, 62,220,162,101,132, 17, 70, 24, 97,132, 17, + 70, 24, 97, 68,181,216, 90, 69,112,189,101,221, 34, 80,243,206, 1, 67,214, 94,235,179,251,224,162,145,211,200,105,228, 52,114, + 26, 57,141,156, 70,206,255, 57,206,255, 86,188, 39,178,254, 14, 24,183,190, 26, 57,141,156, 70, 78, 35,167,145,211,200,105,228, +252, 95, 16, 89,239, 30, 0,140, 75,135, 70, 24, 97,196,255, 48,142, 30, 61,170, 87, 82,209,161,115,182,247, 18,139,165, 11, 75, +138, 10, 87, 29, 90, 51,230,132,238,124,112,112,176,214,216,138, 70, 24, 97, 4,234,227, 12,239,226,226,232, 73,106,233,118, 12, + 67,178, 24,146, 81, 19, 69,101,135, 99,243,243,223, 10, 59,224,228,228,100, 70,145,232, 77, 48,140,136, 32,104, 45,205, 34,111, +197,197,165,188, 48,160, 96, 92,169, 84, 58,149,195,225,116, 85, 42,149,142, 36, 73,166, 40, 20,138,139,165,165,165, 27,241,126, +224,194,255, 24,220,221,221,135, 93,189,122,213,172,125,251,246, 10,129, 64,160, 41, 43, 43, 99,159, 61,123,150,215,189,123,247, +130, 55,111,222,212,107, 71,162,189,189,125,231,237,219,183,187,116,235,214, 13, 77,154, 52,145, 13, 25, 50,132, 19, 24, 24,200, + 25, 55,110, 92, 92, 90, 90,218,101, 3,233, 60, 9,130,216, 75, 16, 4,139,166,233,145,248, 51,116,195,199, 6, 73,146,228, 68, +130, 32,250, 51, 12,227, 74, 16, 68, 44,195, 48, 39,104,154,174, 45,112,107,109, 24, 8,160, 7, 73,146,126, 0, 64,211,244, 35, + 0,103, 0,253,119,222,253,157,156, 66,161,208, 23, 0, 74, 75, 75, 31,127, 44, 78,130, 32,124, 1,128, 97,152,250,114,142, 22, + 8, 4,227, 1,160,172,172,108, 27,244, 72, 7,245, 46,152,205, 30,140,223,226, 40, 0,192,163, 31, 60, 0, 0,134,188, 39, 38, + 69, 17,134,252, 86,117,124,134,112, 84,131, 30,195,135, 15, 95,177,127,255,254, 31, 0,156,252, 43,110,124, 91, 91,167,141, 63, +173,219,106,255,213,212,177,171, 80,158, 17,162,246, 7, 18,248,148,203, 98,245, 81,106,181, 55, 94, 0, 71, 1,176,205,205,205, +135,113,185,220,142, 74,165,210,142,205,102,167, 43,149,202,235,133,133,133, 7, 81, 75, 6, 4,189,219,245, 37,164,170, 82,216, + 18,244,159,121,222, 24, 18, 10,142, 16, 25, 68, 51,228,255, 3,186, 81, 18,192,140,138,186,238, 64,205,225, 60,106,235,124,190, +178,183,183,239, 95, 84, 84, 84,202, 98,177, 24,148,239,122, 46,255,167,252,239, 4, 77,211, 89,121,121,121, 35,235,226, 18, 53, + 64, 83,174,136,216,171, 85,163, 76,163, 96, 38,203,146, 17, 37,118, 66, 91, 6, 24,201, 0,206, 36,139,180,162,105, 58, 29,192, +101, 82,131,176,146, 52,196,252, 67, 7,247,134, 21,237,218,168,226, 61, 5,192, 6,192, 83, 0, 95, 1, 40, 49,234,159,191, 13, +239, 58,195,159, 6,144, 94, 41,180,170,132,187,239,212,171, 87,175,107, 46, 46,142,158,131,250, 13, 88, 49,105,226,100,130,197, + 34, 17,249,252, 57,251,139,145,163, 63,147, 74,165, 14, 98,133,162, 25, 8,130, 46,229,243, 35,139,138, 10, 83,143, 30,220, 47, +241,104,218, 84,171,213,210,216,188,229,183,238,199,126, 15,157,175,167,216,114,183,181,181,221, 59,119,238, 92,219, 62,125,250, +176,108,109,109,145,144,144, 96,118,232,208,161,166, 27, 54,108, 24,156,159,159, 63, 18,192,235,122, 84,182,131,173, 57,249,153, + 68, 64,116, 65,177, 22,197,106, 92,202, 40,195,121, 0, 55,234,219,122,165,165,165,211, 74, 75, 75, 3, 90,181,106,197,236,216, +177,131, 24, 53,106, 20, 67, 16, 4, 81, 86, 86,182, 27, 64,189,132,150, 72, 36,218,212,173, 91, 55, 55, 55, 55,183,216, 55,111, +222,244, 56,114,228,200,153,144,144, 16, 87,145, 72, 20, 13,192,221, 64,186, 93,185,185,185, 62,101,101,101,112,116,116,220, 1, +160,229, 95,112, 19, 17, 44, 22,235,132,131,131, 3,179,122,245,234,147, 62, 62, 62, 54,121,121,121,154,217,179,103,119,189,123, +247,110,119,173, 86,219,199, 0,177, 37, 37, 8, 98,139,141,141,141,229,170, 85,171, 98,252,253,253,159,242,120, 60,110,116,116, +180,112,230,204,153, 95,191,126,253,122, 48,195, 48, 19, 1,131, 6, 8, 41, 65, 16, 91,236,237,237, 45, 87,172, 88,145,224,231, +231, 23,201,225,112, 56,209,209,209,162,111,191,253,246,171,168,168,168,122,113,146, 36,185, 57, 32, 32, 64,250,195, 15, 63,188, +108,218,180,233,109, 22,139,197, 77, 73, 73, 33, 23, 45, 90, 52,245,194,133, 11,193, 52, 77, 79,170, 79, 57,173,173,173,165,139, + 22, 45,122, 25, 24, 24,120,151,195,225,112, 94,189,122, 69,206,157, 59,119,106, 76, 76,140,222,229, 52, 55, 55, 15, 34, 8, 98, +107, 70, 70, 6, 27, 0,236,236,236, 90,155,152,152,108,168,154,211, 82, 23,138, 66,173, 86, 23,203,229,242,225,121,121,121,213, + 6,194, 29, 53,111,125,111, 0,216,160,210,189, 47,127,173,235, 61,176, 57, 76,159, 74,251,218,150,199,197,251, 73, 54,166, 31, + 0, 12,171, 72, 21,254,147, 12, 96,179,217,180,175,237, 87,204,227, 12,131, 66,198,244,237,220,185,243,162,203,151, 47,255,214, +169, 83,167,111,247,237,219,103,157,156,156,252,227,141, 27, 55,156,134, 14, 29, 58,234,210,165, 75, 43,115,114,114,142,125,172, +155,159,203,225,241, 8,146,128,128, 47, 52,209,231,243, 20, 73,246,186,221,183,239,248,109,175, 94,249,109,136,138,114,145,217, +217, 5, 76,159, 62,221,102,192,128, 1,164,147,147, 19, 98, 98, 98, 44,246,237,219,215,108,219,182,109,253, 11, 10, 10,102, 0, + 72,252, 16,145, 37, 43,128,183, 66, 9, 63,134,129, 89,229, 3, 75,160,128,167,194, 35,230, 37,158,253, 3,196,214,247,187,118, +237,250, 33, 38, 38, 6, 43, 87,174, 4,128,141, 6,126,127,102,223,190,125,123,134,134,134, 10,142, 30, 61, 42,104,213,170, 21, +108,109,109, 81, 49,153,170, 12, 76,237,226,226,162, 95,155,209,248,233,151, 51, 99, 90, 70,230,253,129, 77, 3, 50, 86, 10, 28, +161,105,219,215,173,127,175, 81,126, 48,181, 18,130, 47,102,163, 32,183,200,235,213,163,228,110, 87,142,196,252, 24, 19,145,189, + 74,150,132,239, 81,115, 76,190,255, 8, 44, 44, 44,118,196,197,197, 5,137, 68,162,183,206,199,198,198,250,186,185,185, 21, 2, +248,198, 80,225,102,101,101,117,128,166,105, 69,110,110,238, 88, 0,144, 72, 36,251, 69, 34,145, 52, 61, 61,125,254, 95, 53,145, +209,225, 93, 45,242, 47,183,104, 85,250,107, 85,151,235,144, 32,181,116,187, 73, 19, 39, 19, 67,134, 13,205,136,137,141,163,217, + 20,119,216,217,115,231,132,158,158,158,164, 98,227, 70,104,178,179,161,254,250,235,182, 23, 47, 94, 84, 7, 15, 27, 81, 70,177, +136, 93,174, 46,206,194,195, 7, 15,217,134, 30, 63,214, 14, 64, 93, 66,139,107,107,107,187,247,234,213,171, 14, 46, 46, 46, 40, + 40, 40, 64, 66, 66, 2,100, 50, 25, 6, 15, 30, 76,181,107,215,206, 97,208,160, 65,123, 11, 11, 11,219, 27, 96,217,178,105,226, +200, 14,159, 56,122,128,123,247,207,218,137, 28,156, 26,131,201,144, 35,249, 77, 84,171,240,171,119,167,239, 58,126,230,117, 76, + 33,211, 11,213,231, 70,170, 21, 57, 57, 57,115,250,247,239,127, 60, 40, 40,200,138,199,227,193,222,222,158,232,211,167, 79, 86, + 90, 90,218,226,122,171,150,138, 20, 54, 36, 73,106,171,190, 86,147, 30, 72, 31, 56, 74,165, 82, 72,165, 82, 0,112,248,208,153, +167,153,153,217, 70,137, 68, 50,168,168,168,168,140, 36, 73,134, 32, 8, 70,169, 84, 10,164, 82,233,147,151, 81,175,237, 21, 10, + 69,147, 53,191,108, 91,215,185,131,143,201,133, 11, 23, 48, 96,192, 0,230,252,249,243, 19,245,205, 83, 71, 16,196,150,254,253, +251,151, 46, 92,184, 80, 30, 19,155,224,240,242,117, 44, 33,226,115,105, 75, 75, 75,234,254,253,251,236,181,107,215,242, 23, 45, + 90,180,133, 97,152, 65, 6,180,231,150,161, 67,135,170,102,205,154,149,254, 42, 38,206,250,217,203, 24, 70,204,167, 52,150,150, + 22,172,187,119,239,210,245,225, 36, 73,114,243,156, 57,115,138, 38, 78,156,152,159,155, 87,104,155, 95, 84,194,240, 40,150,218, +214,214,150,125,242,228, 73,197,129, 3, 7,200,241,227,199,111,166,105, 58,216,128,246,221,220,167, 79,159,226,185,115,231, 22, + 68,199,198,219, 62,123,241, 26, 66, 30,165,182,177,177,102, 61,120,240, 64,181,102,205, 26,114,217,178,101,122,149, 83, 36, 18, +237, 57,114,228, 8,251,228,201,242,190,239,206,157, 59,164,171,171,171,176,234,103,202,228, 10,144, 4,144,147,147, 35, 12, 12, + 12,220, 3,224,189,224,190,126,139,163, 48,106, 30, 48,109,218,180,116, 67,111, 22, 63,187,233,117,126, 70,251,155, 7,179,182, +116, 76, 63, 54,155, 77,143, 31, 63, 62,227,221,191,203,229,114, 2, 64, 31,252,168,191,216,234,209,163,199,119,167, 79,159,110, +188,111,223,190,159, 15, 28, 56,160, 4, 0, 62,159,111,121,232,208,161,149,131, 7, 15,198,224,193,131, 23, 30, 59,118,236,163, + 9, 45, 45,163, 85, 1, 0,143,207,227, 69, 69, 69, 17, 30, 30, 30,181, 70,220, 87,209,244,195,109,175, 94,249,127,233,225,209, + 42,143,166,155,112,186,119, 47,153, 57,115,102, 78, 81, 81, 17, 18, 18, 18,160, 82,169, 48,106,212, 40, 86,167, 78,157,236, 7, + 15, 30,188,190,184,184,120, 32, 0,149, 30,247,228, 26, 7, 7,135, 9,133,133,133, 37, 58,171, 78,251,145, 90,118, 71, 95, 13, +175, 69, 19, 53,151,195,210,112,122,127, 77, 19,231, 55, 18, 50, 15, 23,220, 4, 0, 78, 41,178, 13,156, 12, 84, 11, 19, 71,184, +104, 41, 44,179,114, 20,116,206, 78, 44, 91, 34, 75,170, 85, 44, 13, 20,137, 68,253,100, 50,217,177,138,193,217,189, 87,175, 94, +184,123,247, 46, 0,180,171, 16, 90,157, 73,146,252,130,166,233,237, 0,106, 75,229, 54,189,111,223,190,159,134,134,134, 74, 0, +224,216,177, 99, 80,171,213,112,117,117, 5,135,195, 1,151,203, 5, 69, 81,149,217, 65,244,132,157,149,149, 37, 44, 77, 41, 72, +205, 69,221,191,253,181, 47,187,129,167, 9,178,180,207,145,199, 20, 64,195, 40,192,177, 16,161,105, 55, 51,248,125,214,153, 12, +219, 28, 57, 63,108,211, 75,255, 82, 18,189,145, 8,197, 63,101,100, 39, 73,146,247,244,233, 83,216,219,219,191,117,158,197, 98, + 1, 64,199,122, 80, 46,140,141,141, 13,140,136,136, 64, 80, 80,208, 66,111,111,239,207,175, 93,187,102,155,155,155,139,160,160, +160,245, 41, 41, 41, 39,255,234, 58, 85,213, 34,255, 45,166, 46,242, 29, 37,217,169,124, 22, 76,178, 88, 44, 18,113,177, 9,234, +160,160, 46, 33, 73, 73, 73,226,128,128, 0,146,162, 40,200, 46, 95,134,252,193, 3,136,197, 98,244,239,223,159,186,126,253,186, +137,137,216,100, 92,124, 92,124, 49,139, 69,130, 97,200, 58,125, 30,164, 82,233,212,249,243,231,219,186,185,185, 65,163,209, 84, + 70, 52,215,104, 52, 72, 78, 78,134, 88, 44,198,200,145, 35,173,133, 66,225, 84, 61,235,209,200,221,213,250,209,213, 51, 91, 90, +206,156,212, 67,228, 46,188, 0, 81,242, 12,136,143,125,137,102,105,103, 49,183, 95,128,232,252,166,133,126,141,237,205, 31, 85, + 49,177,234, 13,133, 66,113, 51, 50, 50,114,220,181,107,215,104, 0,184,114,229, 10,243,242,229,203,137, 31, 50, 11,165,105, 26, + 5, 5, 5,160,105,154, 85,241, 94,247,250, 31,189, 31, 76, 76, 76, 54,127,254,249,231, 67, 19, 19, 19, 5,127,252,241,135, 69, + 82, 82,146,101,124,124,188,149,187,187, 59,123,229,202,149,167,229, 10, 21, 75,173,101,148, 26,173,186, 56,253,249,243,216,252, +204,204, 71, 59,119,238, 44, 35, 8,162,191,158,191, 49,208,206,206,206, 98,222,188,121, 32, 40, 97,235,166,205,188,221, 88,148, +192,148,164,184,166,101,101,114,109, 92, 92, 92,242,188,121,243,156,125,124,124,236, 81,190,188,166, 23,167,189,189,189,229,172, + 89,179,192,230, 73,124, 91,248,248, 53,230,242, 68, 18, 22, 37,144, 4, 4, 4,116,138,141,141, 77,155, 59,119,174, 93,171, 86, +173, 12,226,108,213,170,149,116,252,248,241, 26,190, 64, 18,232,226,226,218,172, 69,243,102, 61,221,221,221,251,177,217,108, 77, +118,118,118,226,200,145, 35,237,122,247,238,109, 99, 8,167,181,181,181,116,238,220,185, 26,167,134,174,221,186,125,250, 89, 27, +142, 64, 98,202,230,138,204, 74, 75,229,218, 87,175, 94, 37, 46, 88,176,192,206,215,215,215, 90, 31,206,210,210, 82,202,210,210, + 18, 94, 94, 94,240,116,117, 69, 97, 97, 33, 66, 67, 67,177,107,215, 46,108,223,190, 29, 7, 15, 30,132,127,251,207, 32,145, 72, +144,150,150,134,162,162, 34,234,239,190,161,180,191,121, 48, 27,148, 19,250, 76,158, 60, 57,109,252,248,241, 25, 2,129,128,126, +247, 48, 55, 55,215, 14, 31, 62, 60,115,228,183,191,244,209, 45, 45,214, 97,201,122,122,230,204,153, 55,251,246,237,131,167,167, + 39,186,117,235,198, 5,128,169, 83,167,114, 7, 15, 30,140, 35, 71,142,224,216,177, 99, 47,220,220,220,110, 1,232,171, 79, 57, + 71,142, 28,217, 62, 56, 56,248, 70,112,112,240,227, 33, 67,134,108,157, 56,113,226, 91, 35, 87,122, 90,202, 67,165, 82, 9, 31, +191, 86,194,165, 59,238, 13,175,139,239, 37,176,111,107, 84,212,174, 85,207,159, 39, 46,244,244, 52,107, 24, 31,111,190,123,205, + 26, 75, 93,146,110,181, 90,141,228,228,100, 72,165, 82, 12, 31, 62,220,146,199,227,141,212,163,152,107,251,246,237, 59, 58, 41, + 41, 73,188,109,219, 54,187,199,143, 31,219,167,167,167,219, 93,186,120,206,106,246, 55, 83, 37,166, 98, 46, 55, 45,155, 33, 0, + 32, 62, 13,162,168, 56,180,103, 24,152, 85, 93, 78,172, 23,236, 32, 16, 56, 98, 67,227,246,102,175,103, 29,241, 29, 50, 55,220, +207, 82,106,199,155, 87,203, 55, 90,172, 94,189,250,104, 88, 88,216,176,246,237,219, 31, 7, 32,168,230, 51,124,127,127,255,208, + 35, 71,142,140,238,208,161,195, 77, 0, 94, 53,206, 34, 29, 29,251,255,254,251,239, 22,186,247,150,150,150,224,243,249,239,137, + 44, 14,135, 3,146, 36, 13,174,222,242, 67,195,216,230,205, 20,136,204, 63,131, 35,171,159, 98,117,247, 87,244,138,182,241,138, +141, 35,163,112,254,200, 83,100,225, 41,122,124,217, 24,195, 22,248,116, 21,106,177,236,159, 52,128,103,103,103,127,209,177, 99, +199,163, 61,122,244, 80, 68, 68, 68, 32, 59, 59, 27, 14, 14,149,115,237,140,122, 80,154, 11,133, 66, 56, 57, 57,193,205,205,109, +216,245,235,215,109,213,106, 53,226,227,227,145,149,149,245,232,239,168, 83, 85, 45,242, 47,195,187,142,240,167,223, 19, 90, 21, +185,133,174, 2, 0, 67, 16,178,167,145,145, 20,139,203, 29,177,255,192, 1, 30,135,195, 65, 98, 98, 34, 94,188,120,129,210, 75, +151, 80,118,251, 54, 50, 51, 51, 81, 82, 82, 2, 27, 27, 27,108,217,177, 67,164,212, 50, 99, 94,189,126,205, 98, 72,166,170,191, + 65,181, 91, 60,121, 60, 94,215, 1, 3, 6,212, 40,200,210,210,210,208,163, 71, 15,138,197, 98, 85,183,171,225, 93, 78,194,222, +138, 8,187,116,124,169,157, 29,247, 5, 16, 51, 19, 40,126, 4, 48, 10, 64,163, 4, 82,159, 1,167, 23,163, 97, 73, 20,113,110, +105,136,173,131,144, 29, 86,141, 82,174,107, 43,170,171,135,135,199,246, 17, 35, 70,144, 0,208,185,115,103,194,195,195, 99, 43, + 0,215, 90,190,115,177,142, 65,242,110,126,126, 62, 6, 15, 30,108,209,184,113,227,139,131, 7, 15,182,208,157,175, 47,167,206, +154,236,233,233,153,203,231,243, 15, 2,122,117,176,149,156,102,102,102, 27,123,244,232, 49,232,192,129, 3, 28, 0,184,122,245, + 42,194,194,194,240,252,249,115, 68, 71, 71,211,126,126,126, 86,191,108, 63,186,121,227,111,123,214,246,107,231, 99,223,169,181, + 95, 51,113, 73,126,137,141,141, 77, 59,134, 97, 92,245, 44,103,143,197,139, 23,191,120,249, 38,209,148,100, 83,108, 14,197,230, +153,152,136,108,164, 18,145,163,185,144,239,192, 35, 9,113,105,105,105,198,193,131, 7,105, 0, 61,244,229, 92,186,116,105,220, +203,152, 68, 51,130,100,179, 41, 54,197, 17,139,133,102,221,187, 5,181, 2, 0, 14, 24, 78, 81, 81, 81,230,174, 93,187, 84,134, +112,254,240,195, 15,145,121, 5, 37, 82, 54, 69, 81,108, 54,171,178, 45, 69, 2,129,149,144,199,227, 42, 20,138,212,117,235,214, +149, 25,194,185,120,241,226, 23,175,222, 36,153,147, 4,193, 34, 8,146,109, 34, 17, 89, 88,152, 10,173,172,196, 2, 75, 33,155, +197, 45, 42, 42, 74,221,187,119,175, 94,156, 42,149,138,147,153,153,137,151, 47, 95,194,169, 85, 43, 92,184,112, 1, 13, 26, 52, +192,224,193,131, 49,116,232, 80, 8, 4, 2,116, 14, 5,205, 58,102, 0, 0, 32, 0, 73, 68, 65, 84,244,198,188,121,243,240,230, +205, 27,168, 84, 42, 94,117,156, 58, 63,169,119, 97,111,111, 31, 81,215,205,243,206,119,223, 42,167,175, 45,152, 13,202, 9,125, +170, 10,172,154,248,205,205,205,181,213, 89,187,222,229,236,209,163,199,119,151, 46, 93,106,188,119,239,222, 62, 35, 71,142,188, +185,119,239, 94,180,105,211, 6, 47, 95,190,132,179,179, 51,118,239,222,141,161, 67,135,222, 92,191,126,125,159,136,136, 8, 31, + 23, 23,151,249,117,113, 14, 25, 50,100,138,175,175,239,229,140,140,140,192,188,188, 60,175,208,208,208, 49,253,251,247,143, 27, + 54,108, 88,151, 74,193,168, 86, 31, 56,125,234, 56,122,246, 25,128,166,205,189, 54,143,154,191,207,187,142,103,147,121, 14,108, +221,149,158,158,125, 64, 46, 47, 29, 76, 81, 66,225,189,123,230,199,126,251,205,178,106,102,129,212,212, 84,244,238,221,155,226, +112, 56, 29,234, 40,231,234,126,253,250, 13, 14, 13, 13,149,234,172, 58,183,111,223,198,179,103,207,144,144,144,128,130,130, 2, +116,153, 88,130,201, 43,203,185, 39,175,100,240,217, 84, 70, 84,207, 62,164, 18,130, 6,176,181, 48, 97,223, 26,179,174,233,212, + 9,155, 61,217, 98,115, 10,251,191,141, 70, 78,188,226, 88, 13,156, 68, 96, 96,224,190,224,224, 96, 66,169, 84, 66,169, 84, 42, + 1, 84, 27,213,215,193,193,129,223,162, 69, 11, 76,156, 56,145, 52, 49, 49, 89, 95, 83, 57,101, 50,153,226,204,153, 51, 24, 57, +114, 36,102,204,152,129, 38, 77,154, 64, 42,149,130,162, 40,236,217,119,216,114,232,152, 73,238, 45,219,119,244,241,108,217,166, + 69,177,130,213,138, 18, 72,199,215, 96, 13,169,182,238, 37,214, 17,136,140,191,131, 13,125, 82,232,251,187, 75, 75,102,127,241, +127, 81,175,174,101, 62,159, 31,188, 53,146,185,211, 54,103,223, 87, 73,200, 84,191, 68,135,193, 13,225,226, 43,253, 90,228, 4, +143,250,182,167,158, 48,136,211,219,219,187,253,253,251,247,121, 29, 59,118, 68, 98, 98, 34, 40,170,114, 62,165,253,144,114, 46, + 94,188,152, 39,151,203,241,228,201, 19,132,132,132,164,170, 84,170,175, 63,164,156,134, 88,180,116, 90,228, 95,134,173,239, 28, +233, 53, 89,180, 22, 3,128,154, 70,216,136,144, 49,165,225,225,225, 66, 46,151,139,196,196, 68,164,167,167, 99,207,174, 93,218, +206,214,214,197,221, 28, 28,138,246,236,218,197, 40,149, 74, 48, 12, 3, 15, 15, 15, 12, 26, 52, 72, 48,112,240,176, 44,162,168, +236,176, 30,203, 60,118,186,245,245, 49, 99,198,188,247,247,217,179,103,195,196,196, 4, 4, 65,216,234, 81,185,224,233,139,251, + 57, 74, 93,204, 50,153,140, 61,121, 96,241, 1,182, 4, 96,155, 0,124, 83,128, 39, 1,184, 66, 40, 34, 46,231,145, 76,183,132, + 1, 29,198, 58, 0, 48,100,169, 7,246,246,246, 11, 47, 95,190,108, 21, 17, 17,193, 20, 21, 21, 33, 61, 61,157, 89,177, 98,133, +149,189,189,253,194,250, 94,145,180,180,180,165, 61,123,246,204, 12, 9, 9, 49, 61,123,246,172, 83, 72, 72,136,105,207,158, 61, + 51,211,210,210,150,126,200,149,230,112, 56,172,231,207,159,155, 47, 91,182,108, 40,128,135,205,155, 55,207,117,112,112,120,136, +114,167,201, 90, 33,145, 72, 42, 69,150,206,186,198,102,179, 65, 81, 20,236,237,237,149,121,121,121,218, 14, 45, 93, 5, 30,166, +164,218,158,199, 17,152, 11,248,142, 18, 19,211,128,220,220,220,167, 4, 65,196,234,185,196,231,219,186,117,107, 74,203, 80,244, +228, 17,157,237,167,142, 14,178,254,117,217,248, 6,235,150, 78,112, 88,189,104,156,199,210, 57,195,131, 72,154,150, 59, 59, 59, +219,234, 28,218,245, 48,159,251,249,251,251,179,105, 80,120,249, 58, 33, 51, 49, 37,181,248,211, 78,129,149,150, 75, 79, 95,191, +110, 86, 86, 86, 29, 61, 60, 60,252, 9,130,208,107, 75,178, 64, 32,240,109,218,180, 41,155,100, 81,132,133, 84,226, 36, 17, 11, +108, 42,151, 80,204,204,218,154, 91, 89, 5,147, 12, 83,104,103,103,103, 45, 16, 8,124, 13,168, 59,155, 6, 7, 54,214,230,166, + 86,150,102,226,110, 65,237,154, 4,182, 13,116,247, 14,104, 19,216,188,165,255, 64, 66,163, 41,114,117,117,181,214, 57,201,215, + 97,105,229, 31, 56,112, 0,203,150, 45, 67,139,134, 13,225,224,224, 0,107,107,107,220,190,125, 27,247,239,223,135, 84, 42, 69, + 86, 86, 22,214,172, 89,131, 19, 39, 78, 64,165, 82, 73, 12,189,159,244, 17, 91,181, 65,163,209,144,239, 10,172,154,248, 5, 2, + 1,173,115,146,175, 9,103,206,156,217,167,179,100,125,245,213, 87,237,127,249,229,151,155, 81, 81, 81, 16,139,197,184,127,255, + 62,198,140, 25,115,115,253,250,245,237, 39, 77,154,132, 93,187,118, 33, 46, 46,110, 71,109,124, 67,134, 12, 89, 52,110,220,184, +117,215,174, 93, 35,109,108,108, 32,149, 74,209,175, 95, 63,236,216,177,131,173,209,104,118, 6, 7, 7, 63, 14, 14, 14,126,172, + 77, 62,255,221,209,237, 43,110, 71, 62,125,140, 41,211,103,113,149, 26,245, 92, 61,170,207,148,137,197,197,154,142, 29,243,142, +168,213,165, 67, 56, 28,161,233,227,199,230, 97, 59,119, 86,138,173,121,243,230,193,212,212, 20, 40,119, 96, 70, 45, 86,157, 9, + 39, 78,156,168,236, 15, 45, 44, 44,192,229,114,193,225,112, 64, 81, 20, 88, 44, 22, 46,110, 22,225,183,121,229,250,226,183,121, + 4,206,111, 36,100, 31,114,237,132, 14,240,146,218,112, 31,127,185,187,185,143, 87, 23, 11,220, 62,148,129, 21, 61, 35, 82,238, + 31,201,158, 41,207,194, 79, 53,124,173,229,236,217,179, 61,179,178,178,240,224,193, 3, 60,120,240,160, 38, 11,144,252,212,169, + 83, 63,150,148,148,192,197,197, 5,125,251,246,237, 8,160, 85, 13,207, 13,252,253,253,209,187,119,111, 4, 5, 5,161, 69,139, + 22, 80,170, 52, 84,240,136, 9, 77,159,199,101, 59,172, 88,179, 66,120,249, 74, 40,121,243,230, 53,214,190,227,231, 77, 3,131, + 62, 91,199,145,216,221,133,192,194, 78,159,122,150,106,115,225,107,215, 29, 91, 47, 77, 39, 55, 92, 13, 17,239, 9,219,224, 42, +145, 72,136, 71, 15, 30,171,247,108, 58,146,228, 37,234,155,117,247, 80, 46, 74,137, 12,116, 25,237, 66,210,192,160,127,202,200, +206,231,243,127,185,118,237,154,173, 74,165, 66,100,100, 36,102,204,152, 33,255, 64,202, 74, 3,136,147,147, 19,174, 94,189,138, +225,195,135,203, 51, 51, 51,239,252, 93,117,170,170, 69,254, 91,192,174,162, 32, 43,145,156,156, 92, 32,149, 74, 29,154, 54,109, + 74, 42,149,202,242, 37,137, 99,199,180,219,119,238, 60, 45,151,203,167, 3,224,108,252,245,215,205, 14,142,142, 65, 35, 70,142, + 36,212,106, 53,122,246,236,201, 13, 15, 15,183,136,205,202, 42,214, 99,192,121,235,247, 70,141, 26,133, 95,126,249, 5, 0, 48, +109,218,180, 74,211, 58,161,135,195,146,216, 20, 61,186,245,242, 55, 73, 22,109, 48, 81,181, 85,151, 52,122, 35,185, 43, 42, 17, +248,131,228,178,193,103,129, 86,169, 53,209, 89,253, 31,190,137,110,230, 41,200,203,117,238,218,252, 19,108,191,176,183, 71,169, + 86,126, 68,239, 14, 71, 40,108, 45, 22,139,241,240,225,195, 60,127,127,255, 2,134, 97, 76,151, 46, 93,106, 41, 20, 10, 91,127, + 64,219,199,191,126,253,186, 99,187,118,237,166,146, 36,217,149,166,233,139,153,153,153, 27, 1,196,235,249,253,201, 0,126, 0, + 80, 57,179, 84, 42,149, 32, 73, 18, 12,195, 96,200,144, 33,152, 55,111,158,231,179,103,207,112,249,242,101,243,174, 93,187,222, + 5, 80, 0, 96, 44,128,106,173,102, 69, 69, 69,101,247,239,223, 23, 92,190,124, 25, 52, 77,195,220,220, 28, 38, 38, 38,224,241, +120,232,215,175,159,120,238,220,185, 93,206,157, 59,151, 85,212,168, 1,139,159,158, 42,227,137,197, 18,216, 58,116,152, 52,236, +139, 40,134, 97, 78, 24,208, 57,112, 5,108,141,156,208, 42,200,213,223,175, 39,133, 28, 14,193,231,176,193,163, 75,241,221,143, +203, 9, 14,163,101,195,192,245,121, 14,135,195,145,240,160,100,113, 89,106, 33, 1,230, 99, 60, 28, 44, 22,139,203,231,212,236, +143, 65,145, 36, 73,146, 36, 7,128,222, 73,251,120, 60, 30, 71,194, 99,106,228, 20,176, 8, 22, 65, 16, 92,212,176, 19,205,215, + 22,140,206,138,196,157, 30,171,168, 42,138, 59,116,232,128,211,151, 31,226, 88,216, 69,228, 36, 62,197,130,111,191, 66,171, 86, +173, 16, 30, 30, 94,107,153,116, 62, 90, 53, 89,151,237,237,237, 35,210,210,210, 90,214,244,221,218,150, 12,107,176, 82,189,207, +255,189, 41,252, 22, 71,161, 14, 31,173,190, 29, 58,116,152,114,224,192, 1,229,231,159,127,206, 29, 50,100, 8,188,188,188,218, +143, 30, 61, 26, 0,208,181,107, 87,252,242,203, 47,237, 71,143, 30,141,195,135, 15, 35, 52, 52, 84,209,169, 83,167,111,175, 94, +189,154,138,242, 29,157,239,129,166,233,222, 91,182,108,121,215, 82, 8,141, 70, 3,181, 90,109,167,209,104,236, 42,250, 34,172, + 91,183, 62,231,252,185,112,124, 59,127, 49,172,173,108,125,245,188,135,136, 81,179,102,229,236, 94,179, 6,107, 14, 31,198, 44, +103,103,225,222, 23, 47,112, 94, 46,199,145,203,151,115, 42,126,167, 78,223, 76,153, 76, 86,118,230,204, 25,147, 35, 71,142,192, +204,204, 12, 77,154, 52,129,185,185, 57, 40,138, 2,201, 18,128,197,145,162,105,243,214, 0,238, 3, 0,156,237, 33,243,112,193, + 77,130, 64, 1, 67, 26,238, 83,196,107,128, 70,150,142,252,107, 83,118,121,153,153, 88,115,112,118, 99, 18,206,109, 72, 62, 33, +207,193,207,208,224, 21,106,246,249,242,119,113,113, 65, 86, 86, 22,206,156, 57, 35, 3,106, 20,100,160,105,250,199, 95,127,253, +117,246,252,249,243,121, 30, 30, 30, 0,224, 11,224, 65,117,159, 21,137, 68,112,112,112,168, 20,150, 67, 66, 38,185, 78,156, 57, + 73,208,255,179, 32,176,217,150, 40,144,169,145, 91,172,134,212, 82,140,111,103, 6,243, 47,250, 59,180,218,178,126,255,169,178, + 50,180, 2,222,239, 15, 8, 2, 15,238, 61,189,233,205,247, 0, 8, 18, 72, 38,175,128, 0,129, 18, 66, 13,130,197, 98,180, 90, + 45,146,146,146,192, 48, 12,134,247, 31,147, 60, 97, 69,168,117,251,225, 69,112,106,106, 15,130,193, 39,255, 20, 33, 96, 97, 97, +225,155,155,155,139,248,248,120,132,132,132,164,230,228,228, 92,144,201,100, 99,210,210,210, 0, 32,175, 30,148,149, 98,222,215, +215, 23,173, 91,183,198,224,193,131,249,165,165,165,193,174,174,174, 14,217,217,217,109,255,202,250,188,171, 69,254,171,132, 86, +181, 15,154, 90,221, 84,177,121, 51,100, 23, 47,130,123,254, 60,142,216,219,151,200,229,242,111, 0, 36, 87, 60,248, 95,237,218, +189,251, 86,159, 59,119, 76,148, 81, 81,112,125,246, 12,148,153,153,175,161, 5,216,185,115, 39,138,138,138, 80, 88, 88, 8, 0, +216,176, 97, 3,138,138,138,160,209, 51,225, 44,155,131,246,182,214,206,200, 64, 52,104, 54, 41, 78,104, 90,218, 70, 44,151,164, + 57, 36,217,200, 10, 73, 7, 68, 37, 6,136,202,114,149,109, 8,150, 18,242,156, 82, 56,180,107, 2, 54,216,237, 13, 41,163,110, +221,159,205,102,231,189,126,253,186,183,187,187,123, 24, 0,203,250,248, 3,188,131,152,204,204,204,233,245,249, 34,139,197,250, + 33, 46, 46,206,122,199,142, 29, 83,151, 46, 93,202, 84, 21, 90,186,255,179,217,108, 48, 12, 3, 83, 83, 83, 80, 20,101,115,251, +246,109,155,128,128,128, 77, 52, 77,251,214, 80, 79,198,203,203, 11,113,113,113, 96,179,217, 48, 53, 53, 5,173, 81, 97,241,204, + 73,208,178,120,236, 57,115,230,248, 14, 24, 48, 32,114,199,142, 29,106,147,192,118,109,115,115,115,159, 79, 25, 62, 34,242,228, +201,147,202,138, 16, 15,117, 79,241, 25,230,113,116,116, 52,203,209,222,134,197,104, 74,105, 17, 7,224, 63, 93,199,112,197,182, +224,179, 89, 12,135, 32,193,227, 11, 76,227, 83, 82,114,105,154,126,169, 15, 39, 77,211,143,226,226,226, 4, 54,214, 22,236,210, + 50,101,137,128, 98,184, 9,143, 30,198, 54,242,243,119, 5, 0,249,163,251, 87,121, 77,155, 9, 18, 50,179, 69,206,206,206,122, +113,150,149,149, 61, 78, 77, 77,101,217,216,216,176, 19,147, 83, 78,153,137, 69, 86, 38,102,102,109, 0, 64, 85, 92,120,159, 84, + 40,178, 89, 20,219, 38, 59, 55, 55,175,172,172, 44, 78,223,186,191,121,243,134,109,103,103,205, 58,123,254, 82,152,141,144,103, + 45,225,178, 77,120, 4, 65, 8, 89, 68, 17, 71, 67,231,240,133, 66,235,248,148,148, 60,134, 97,106,180, 16,174, 42, 24,209,191, +252,122, 45, 62, 92,133, 27, 79,159, 62,197, 31, 55, 95, 66,196, 40, 65,200, 11,113,126,215, 54, 12,159, 51,255,131,253,254,234, + 18, 91,245,178,102,109,105, 22,241, 14, 63,210,235,112,132, 31, 62,124,248,226,125,251,246, 85, 58,160,188,124,249, 18,157, 59, +119,214, 45,115,160, 91,183,110, 8, 8, 8,192,203,151, 47,225,230,230,134,203,151, 47,243, 88, 44, 22,111,196,136, 17, 43,246, +239,223,127,166, 78,187,255,214,173, 24, 51,102, 76,117,142,213,111, 0,200, 9,169, 71,201,188, 85,123, 44,243,114,115,144,149, +157,241, 88,223,118, 32, 8, 2,163,102,205,202,217,162, 84,226,192,189,123, 24, 41, 18, 9,119,199,196,160,103, 64, 0,188, 59, +119,206,209,167,175,211, 89,117,228,114, 57, 40,138,130,137,137, 9, 44, 44, 44,192,225,112,192,162,236,193,230,250,128,228,112, +224,215,193, 7,107,190, 17,149,134,116,199,122,130, 64, 1,143,139, 71, 28, 97,141,190, 58,132,168, 1,250, 49, 12,138, 74,147, +113, 69, 39, 72, 76, 27,194,148,146, 80,231,199,109,242, 48, 51,177,230,224,143,245,137, 56,191, 41,229,184, 60, 3, 11, 42,218, +130,174,101, 34,225,109,102,102,134,228,228,100, 36, 37, 37,189, 64,237, 14,254,165, 47, 95,190,140,229,241,120,158, 86, 86, 86, + 0,224, 82,211,196,156,166,233, 74, 63,172,189, 7,142, 90,250,118,116,229,127,218,222, 19,123,194,150,227,203,224,245,160, 88, + 4,180, 90, 21,126,254,165, 23,180,138, 18, 4,247,153, 64,124,210,213,205,231, 98,152,114,156,186, 44,127,219,123, 19, 1, 54, +150,253,223,208,219,102, 60, 49,233, 13,154, 48,179,180,180, 22,113, 56, 28, 88,152,216, 41,231, 79,252, 58,157, 97,152,202,231, +134, 98,113,212,100,177,121, 89,110, 70,137,192,140, 42, 3, 24,178, 81,253,162,217,124,124,164,164,164, 76,239,216,177,227,138, +226,226,226,124,153, 76, 54, 28, 0, 92, 92, 92, 26,146, 36,201, 3, 80,219,234, 72, 67, 84, 31, 22,130,243,236,217, 51, 72, 36, + 18,164,166,166, 86, 53,190,128,166,233,127,204, 38,128,127, 40,252, 0, 60, 2, 96, 7,160, 39,170,132,119, 32, 43, 76,117,159, +132,135,135, 51,225,225,225,159, 84, 14, 94, 12, 67,107,242,242,192, 40,202,219,150,162, 40, 6, 64,213, 29, 77, 66, 51, 51, 51, +130,114,116, 4,193, 43,119,253, 96, 62,226,214, 87,181, 90,191,208, 50,180, 22, 44, 16, 42, 48, 85, 38, 45, 50, 62,129,229,150, + 93, 48,157,187, 16, 25, 92,179,170, 35, 29,160, 97,160, 5,205, 50,176, 56,140, 76, 38,131, 70,163,145, 54,110,220,248,180, 70, +163,145, 86, 12,110,204,127,234,138,106,181,218, 88, 22,139,133,169, 83,167, 66,103,253, 81, 42,149,200,200,200,128, 66,161,128, + 82,169, 68, 92, 92, 28, 10, 11, 11,161, 84, 42,241,252,249,115,184,184,184,128,197, 98,217,213,210,153, 51, 12,195,192,201,201, + 9,141, 26, 53, 2,139, 96,176,125,245, 34,124, 55, 99, 18,134,186,208,216,185,241,103,116,234,212,169,153,179,179,115, 32,155, +205,214,218,218,218,114, 66, 67, 67, 79,105,181,218,126,208,191,231, 57, 51,111,222,188, 70,205,155, 55,183, 54, 51,145,168,121, + 92, 22,184,106, 25,195, 83,228, 50,236,210, 28, 56, 57, 53,212, 64, 32,116, 27, 57,114,164,182, 38, 43, 68,117,156,223,124,243, +141,157,135,135,135,169,212, 76, 34,227, 82,172, 44, 14,152,156,194,167, 15,238, 2, 0,215,202, 90, 14,190,208, 51, 36, 36, 68, + 99, 8,231,194,133, 11, 93,172,172,172,204, 72, 48,197, 90,149,234,207,245,118,133, 50,151,160,168, 50,112,184,254,211,166, 77, + 35, 12,225,156, 61,123,182,179,167,167,167,153,153,137,168,132, 77,177,210, 57, 52,157,206, 7,157, 65, 41, 85,249,124, 43,203, + 82, 8,197,126, 35, 71,142,172,145, 83,103,205,154, 59,119,110,242, 59,194, 27,121,121,121,144,103, 68,130,147, 26, 5, 31, 49, +133, 86, 86, 82,240,120,188,202,173,239, 53,221,174, 53,249,104, 85, 39,182,244,253,174,255,146, 90,150, 0,183, 52,139,120, 55, +110, 86, 90, 90, 26,236,236,236,106,125,158,246,239,223, 63, 63, 40, 40, 40,171, 91,183,110,202,211,167, 79,131, 32, 8, 92,190, +124, 25,169,169,169,232,214,173, 27, 24,134,209,237,106,195,227,199,143,209,181,107, 87,101,199,142, 29, 83, 43,226,107,213,137, + 49, 99,198, 64,173, 86,163,164,164, 4,121,121,121, 8, 15, 15,135,143,143, 15, 35, 20, 10, 7,176,156, 62, 91, 30, 60,110,126, + 91,175, 22,190,216,180,126,141,146,203,166, 86, 25,242,188, 18, 4,129,144,111,190,201, 41,244,243,203,219, 43,147,149,142, 50, + 49, 17, 54, 78, 78, 54,127,120,238,156,165, 74,165,210,139, 67,103,213,113,116,116,172, 20, 89, 28, 14, 7,108,174, 21, 88, 34, +111,112, 45,186, 65,104, 59, 0, 87, 30,241, 20,166, 34,156,144,136,113, 86,100, 86,115,104, 7,161, 19,150,183, 29, 98, 23,218, +110,168,221, 37, 97, 3,236,168, 24, 15, 72,134, 77,132,142,254,217,189,177, 85, 35, 1,238, 28,205,192,249, 77, 41,191,203, 51, +176, 8, 64, 76, 93,207,185, 74,165,146,107,181, 90,144, 36, 9, 54,155, 93,213, 39,240,214,239,191,255,142,135, 15, 31, 2, 85, +194,246, 20, 23, 23,107, 89, 44, 22,248,124, 62, 0,136,107,233,239, 64, 81, 20, 40,138,194,213,187,215, 45,134, 14,236, 69,220, +126,114, 1,237,124,134, 33,183, 68,133,204, 66, 21, 10, 74,129,230,173, 22,192,171,235, 9, 60,141, 43,134,111, 11, 47, 22,139, + 43, 10,169,142, 79, 30,143,100, 89, 18, 6,229,190,160,155, 40, 83, 4,127,220, 57,249,242,197,245, 99, 79,159, 31,250, 53, 44, +166,109,171,142,178, 10, 99, 2, 74, 74, 74, 24,130, 32,152,175,199,207,143,221, 59, 38, 95,187,126,248, 83,154,173,224,191,249, + 27,187,250,134, 86, 86, 86,183, 45, 44, 44, 46, 87,136,163,134, 18,137,228,150,157,157, 93, 20,202, 55,122,156, 76, 79, 79,247, +144,201,100,237, 80,190, 57, 43, 49, 55, 55,183,115,133,229, 41,177, 22, 75,216,142,162,162,162,175,180, 90,109,159,138,163,187, + 86,171,245,141,142,142,246,244,245,245,125,225,234,234,250,216,213,213,245, 15, 87, 87,215, 83,174,174,174,167,130,130,130,126, +209,133,123,248,139,151, 13,223,211, 34,255, 50,161,133, 10,145,181,181,226, 21,149, 66, 11,192,213,119, 29,208, 52, 60,222,115, +205,148, 41, 48, 59,117, 10, 84,116, 52, 70,135,132,152, 8,133,194,245, 40,143,209,212, 78, 44, 22,111, 90,180,104,145,196,114, +229, 74,216, 95,191,142,132,240,112,168, 41,234, 65,125, 74, 87, 86, 86, 6, 54,155, 93,105,137, 17,137, 68,208,106,181,168,206, +228,251,222, 3,168,193,157,212,204, 40,112,209, 8, 52,152,146,179, 69, 29,239, 13,139, 93, 96, 29, 94,228,226, 22, 35,227,184, + 45,177,106, 99,189,190, 97,251,123, 50,130, 93,194, 53,227, 35, 41, 41, 25, 90,208, 6,173, 55,203,229,242, 66,153, 76, 6, 95, + 95, 95,139,135, 15, 31, 54,246,241,241, 49,175, 56,127,255, 3, 47, 76,160,189,189,253, 81, 7, 7,135,120,123,123,251,163, 0, + 2, 13,248,238,142, 27, 55,110,128,197, 98, 97,209,162, 69, 40, 46, 46,134, 74,165, 66,110,110, 46,146,146,146,160, 84, 42,145, +146,146,130, 87,175, 94, 65,169, 84, 34, 33, 33, 1, 10, 69,221, 19, 18,154,166, 97, 98, 98, 2,121, 89, 9,126, 91,254, 29, 22, +206,157,137,194, 55, 17, 72, 73,203,132,153,169, 8,211,167, 79,103, 73,165, 82,154,166,233, 70, 90,173,182, 43, 77,211,155,245, +185, 78, 85,238,183,155, 78, 78, 78, 94,171, 87,175,246,252,110,249,102,142, 9,187,132,225, 73,248, 52, 87,194, 99,184,205,218, + 96,204,130,245,156,117,107,127,122,125,231,206,157, 84,232, 23,188,147, 4,112,211,207,207,207, 61, 53, 53,213,199,195,195,163, +169,101, 67,103, 30,207,206,161,128, 99,215,160,136, 81,200,239, 17, 14, 13, 58,108,222,188, 57,242,214,173, 91,105,134,112,138, + 68,162,102,123,246,236,241,178,177,177,241,162, 4, 2,126,105, 97,225, 17, 77,169,236, 40,203, 76,202, 39, 77,204,186,159, 56, +113, 34,226,248,241,227, 25,134,112,186,185,185,121, 44, 95,190,188,185,183,183,119,115, 91,151,198, 60,129,131, 83, 46,223,177, + 97,174,192,219,135, 7,199, 70,159,111,218,180,233,241,157, 59,119,244,226,100,177, 88, 26,146, 36, 65, 81, 20,132, 66, 33,206, +158, 61,139, 41,227,134,193,201,193, 2, 77, 61, 60,208,229,203,175,112,252,248,241, 74, 31, 30, 22,139, 85,227,136,190,123,229, +244, 48, 63, 59, 34, 2, 91,154, 69, 96, 75,179, 8, 63, 59, 34,162, 70,177, 85,241,247,234, 62,163, 87,111, 84,195,114,163, 30, + 98,235,204,213,171, 87,127, 28, 53,106, 20,183, 71,143, 30,184,119,239, 30,198,140, 25,115, 51, 52, 52, 20, 0,112,239,222, 61, +124,253,245,215, 55, 47, 93,186,132, 73,147, 38,161,115,231,206,220, 27, 55,110,108,130, 30,177,127, 52, 26, 13,118,238,220, 9, +141, 70, 3,177, 88, 12,115,115,115,244,234,213, 11,145,145,145,147,118,237,218, 21,197,162,168, 47,122,246, 25,136,211,167, 66, +241,234,121,228,164,221, 43, 70, 24, 28, 20,152, 36, 73,244, 8, 9,201,201,105,222, 60,111,119, 81, 81,233, 88,169, 84,232,145, +145, 97,126,229,232, 81, 75, 61,132, 26,161,213,106, 43,197,149, 78,116,232, 14, 54,215, 10,108,145, 23,216,146, 86,120, 26,195, + 81,115, 2,240,136,219, 10, 47,107,139,159, 69,113,201, 49, 3,190,115,193,128,239, 92,208,119,142,243,104, 97, 3,108, 23, 53, +192,228, 30, 51, 26, 5,185,182, 50, 69, 81,150, 10,225, 63, 39, 36,202,115,177, 18,192, 43,125,158,115,154,166, 95,164,166,166, +130,203,229,162, 65,131, 6,238, 0,116,126,129, 59,198,143, 31, 63,109,201,146, 37, 51, 1, 44,169, 56, 39, 14, 10, 10,106, 94, + 82, 82,130,232,232,104, 0,120, 88,139, 53,184,114,151, 97, 94, 81, 2,207,217,222, 27, 62,205, 38, 66, 42,109,129,212, 60, 37, +210,242,148,216,254, 91, 63, 68,220, 88,134,135,231, 71, 34, 49, 35, 3, 2,219,254,208,106, 20, 94,122, 76,234,237,159, 60,121, + 66,220,184,113,131,160,105, 26,106,181,154, 41, 46, 42, 98, 30,221,188,137,178,107,215, 8, 19, 19, 19,162,125,235,142, 37,187, +151,157,190,127, 98,227,205,135,170, 82,131, 39,234, 31,130,133,177,177,177,129, 71,143, 30, 13, 2,176,208,219,219,251, 78, 82, + 82, 82,219,235,215,175, 55,117,116,116, 92, 95, 95, 82, 93, 88,136,132,132,132,183,142,138,176, 16,202, 10,209,208,163, 66,204, +245, 5,240, 53, 62, 96,151,189, 1,184,250, 47,118,134, 63,141,119,118, 27,190, 43,180,170, 6, 10,131,171, 84, 42, 81,171, 85, + 41, 23, 46, 92, 80,145, 36, 9,161, 80,136, 81, 99,198,144,191,253,250,107,135, 97,129,129,151, 39,124,250,233, 31,151, 47, 93, +242, 11, 8, 8, 0,195, 48, 32, 73, 18,135, 15, 31, 46,147,203,203,114,157,156,156,204,244,233, 52,170, 62, 64, 69, 69, 69,149, + 66,171,176,176, 16, 54, 54, 54,122, 47, 29,202,138,112,241,210,217,136,124, 70,251,101, 82,143,152,181,170, 85, 25,253, 2, 10, +104, 45,187, 80,171, 70, 97, 25,131, 98, 57,216,247, 72,243,128, 81,110,253, 85,113, 93, 3, 94, 93,139,186,157, 43,215,202, 13, +218, 45,145,149,149,245, 93,112,112,112,174,157,157, 29, 97, 98, 98, 2, 7, 7, 7,178,111,223,190, 57,201,201,201, 75,234,123, + 69, 44, 44, 44,134, 6, 5, 5,133,165,166,166, 14,186,118,237, 90,163,235,215,175, 15, 10, 10, 10, 10,179,176,176, 24,170, 39, +197,145,249,243,231,203,184, 92, 46,218,180,105,131,226,226, 98, 84,236,242,169,245,208,103,137,148,195,225, 96,203,234, 31,176, +112,238, 76,228, 69,221,195,211,155, 23,112, 53,131,192,130,229, 63,129,195,225,212, 43,214, 87, 19, 43,161,183,183,189,228,229, +215, 99,134,164,205,155, 59, 87,242,248,241, 99,106,218,140,175,153,132,244, 60,112,123,172, 97,225,147,239,200, 39, 50, 43,244, +236,222, 5,139, 22,206,242,174, 8,218, 89, 43,154, 89, 9,189,189,236, 37, 47,102, 77, 24, 22, 59, 99,198, 12,193,170, 85,171, +228,129,129,129,101,153,153,153, 2,145,212,220,131,109,106,230,149,144,158, 33, 14, 12, 12,140,251,242,203, 47, 11, 12,229, 92, +176, 96,129,240,220,185,115,236,224,224, 96, 77,126,126,190,152, 18, 8,124, 9, 30,191,117,118,126,190,233,160,224,224,152, 65, +131, 6,149, 86, 4, 44,213,155,243,251,239,191, 23,190,122,245,138, 29, 24, 24,168,206,200,200,144,136, 44, 44,125, 88,102,230, +173,226,211, 51, 77, 90, 7, 4,188,153, 54,109,154,172,182,114, 86, 21, 41, 18,137, 36,181, 93,187,118,248,249,231,159,177,110, +221, 58,124,254,249,231,136,124, 30,137,158,211,102,194,115,242,215, 56,117,251, 46, 82, 83, 83,177,116,233, 82,248,248,248,128, +195,225,188,170,246,121,156, 20, 69, 60,206, 0,241, 56, 3, 4, 49, 41,138,208,189,175,209,178,181,164, 16, 85, 63, 95,221,231, + 30,126, 95,189,165,203,207,142,136,168,205, 15,171, 46,177, 53,104,208,160, 41,186, 16, 14, 99,199,142,189,185,126,253,250,246, + 99,199,150, 79,180,219,180,105,131,101,203,150,181, 95,176, 96,193,205,229,203,151,163, 75,151, 46,112,117,117,173,115,227,139, + 86,171,133, 70,163,193,176, 97,195,160,209,104,144,157,157,141,215,175, 95, 99,235,214,173, 96, 24,134, 15, 0,118,246,142,254, + 92, 46, 23, 79, 30, 61, 40, 93, 56, 54, 96,191, 1,150, 44,162,234, 36,166,164,164, 4,131, 38, 79,206, 73,105,210, 36,111,115, + 78, 78,233, 56,169, 84,232,156,152,104, 46, 81, 42, 29, 80,139, 95, 34, 65, 16,160,105,186, 82, 88,233, 4,215,187, 71,197, 64, +169, 23, 84,165,244,153,235,251,210, 0, 0, 29, 71,216,163,239, 28,231,209,118,110,194, 13, 29,134,151, 27,189,143, 47,139,101, +138,211,180,171,160,198, 11, 3, 44,214,247,238,221,187, 7, 51, 51, 51, 4, 7, 7,243, 72,146, 92,169,155,175,162, 60,118,214, + 90, 29, 23,143,199, 91, 51,114,228, 72,178,160,160, 0, 79,159, 62, 5,128, 75, 53,245, 75, 12,195, 84,214,189, 36,143,128,150, +230,226,214,163,179, 56,127,253, 24,226, 83,179,145,152, 37, 7,216,166,144,203, 82,160, 42, 75,133,178,224, 17,138, 20, 66,189, + 10,204,225,112,178,189,189,189,153, 86,173, 90, 49, 12,195,224,205,155, 55,154,132,196, 68,205,131, 95,126, 97,158, 77,156, 72, + 72, 94,191,230, 8, 4, 2,194,197,197, 5,124, 62,159,230,243,249,185,127,227,224,253,151,132, 91,248, 11,194, 66,124, 76,171, + 22,131,127, 39,210,241,246,110,195,202, 0,166,213, 5, 44, 5, 99, 34, 24,114,108,211,111,166,193,195, 70,200,124,124,124,164, + 14, 14, 14, 32, 8, 2,253,250,247, 39,130,174, 93,147, 80,246,246,176,104,217,178,114, 57,226,226,133, 11, 56,123,246,172,236, +244,239, 39, 28,198,140, 27,215, 27,192,158, 90, 10,195,230,241,120,149,191,155,158,158, 14, 30,143, 87,233, 19, 81, 84, 84, 4, + 43, 43, 43,164,167,167, 67,207,149,185,189,243,230,222,157,155, 21,240,157, 75,128,132, 34,254,144,101, 64,203, 48,160, 8, 45, + 80,198, 64,173, 5, 20,106, 6,254,206, 44,243,243,101, 26,105,248,189,208, 56, 0,123, 13,105, 61,133, 66,113,229,241,227,199, + 19,105,154, 62, 6,128,188,118,237, 26,253,226,197,139, 41,208,223,113,253,125,179,189, 80, 56,231,242,229,203,230,115,230,204, +201, 15, 15, 15, 47,236,213,171,151,233,214,173, 91,205, 59,119,238, 60, 39, 55, 55,247,144, 62,134,192,164,164,164, 61,201,201, +201, 83, 90,181,106,133,188,188, 60,168, 84, 42, 68, 68, 68,192,205,205, 13, 15, 31, 62,132,187,187, 59, 30, 60,120,128,166, 77, +155, 66,171,213, 66, 46,151,131,166,105,109, 93,157,121, 94, 78, 54,144,155,132,180,123,127,224,245,179, 8, 92, 78, 35,176,241, + 80, 24, 26, 52,114,169, 87,156, 26,119,107, 97,115, 59, 43,139,243,171, 22,127,111,157,112,229, 48, 66,119,110,164,175,254,241, +135, 39, 87,130,137,159, 12,251,106,160, 82,141,134, 0,184,109, 3, 90,161,135,244,149, 86,216, 8, 25,151, 95,212, 30, 96,209, +221, 90,216,220,198,210,226,220,255,173, 92, 34,121,115,118, 55,142,108,249,153, 57,190,239,160,143, 28, 8,104,222,188,121, 15, +146, 36,205, 0,200, 43,252,188,244, 74,109, 83, 29,231,197,176, 48, 63, 57, 16,112,242,228,201, 30, 66,161,208, 22,128,186,180, +180, 52,246, 67, 56, 47,133,135,251,233,202, 73, 16,132, 53, 0, 21,195, 48,111, 96, 96, 10,158,193,131, 7, 47,251,250,235,175, +231,106,181, 90,171, 42,179,115,214,154, 53,107,216, 52, 77,179, 24,134, 81,145, 36,169, 58,119,238,156, 86,163,209,164,201,229, +242,201, 31,210,139, 12, 28, 56, 16,119,239,222, 93,140,242, 77, 24,250, 90,171,223,242,211,170, 72,217, 83,111,254,107,215,174, + 45,253,226,139, 47,230, 29, 58,116,232,245,250,245,235,251, 76,154, 52, 9,135, 15, 31, 70,147, 38, 77,240,228,201, 19,124,247, +221,119, 0,208,126,193,130, 5,167,118,236,216,225,154,144,144,176, 70, 15,139, 6, 52, 26, 13, 14, 30, 60,136,126,253,250,193, +202,202, 10,246,246,246, 32, 8,226,202,184,113,227,126, 5, 0, 22,193,226, 0,128, 66,174, 80,120,120,180,210,219,130,203,225, +112, 42,251,186,140,140,140,202,157,130,159,125,241, 69,206,246, 85,171,176,191,172, 12,227,164, 82, 97,138,163,163,221,169, 55, +111, 38, 60, 47,239,156,153,218,172, 58,117,137, 44,125, 93, 26,202,210, 49,255,247, 21,241,182, 0, 62,239, 56,194, 30, 29, 71, +216,163, 85, 95,107,130,100, 17,120,118, 62, 23,145, 23,243,142,171,139,112, 5,134,165,203,121,177,114,229,202, 83,159,124,242, + 73,159,102,205,154, 97,252,248,241, 95,238,220,185,147,163, 86,171,103,224,207, 48, 15,166, 36, 73, 46,217,178,101,203, 4,115, +115,115,220,184,113, 3,215,175, 95,191, 2, 32,169,166,126, 9, 64,101,204,172, 6, 78,238,242, 87, 9, 37,194,172,212, 91,184, +121,227,119, 52,241,249, 10, 2,219,222, 48,247, 88, 14, 85,212, 58, 40,115,207,195,220,169, 23, 82, 18,222,128,197,230, 69,214, +229,132,194, 48,204,243,148,148, 20, 87, 87, 87, 87, 34, 62, 62, 94, 3,128,209,106,181,140,170, 67, 7,181,231,170, 85, 84,228, +151, 95, 18,109, 95,189, 98, 49, 4, 65, 71, 68, 68, 0,192,203,255,196, 40,174, 11,183, 16, 25, 25, 89, 83,184, 5,131,224,237, +237,221,254,250,245,235, 60,185, 92,142,171, 87,175,162,117,235,202,189, 93,255,209,232,247, 85,181,200,191, 12, 19,170, 57,183, +245, 45,139,214, 91, 55, 54, 77, 80, 77,221,221,181, 28, 18,187,250,245,238, 93,250,248,241,227,202, 89,159,252,254,125,200,206, +158,133, 86,171, 5,195, 48,184,126,237, 26, 70,142, 24, 81, 66,177,136,237,206,206,141, 24,130,121, 43,118, 75,215,106,102, 15, +193,193,193,193,149,157, 79,114,114, 50, 68, 34, 17,184, 92, 46,104,154,134, 70,163, 1,139,197,130,169,169, 41, 52, 26, 77,117, + 38,152,119, 57,213,218, 60,217,160, 29, 61,135,167,219,151,168,152,137,102,206,104,200, 17, 84, 62,156,182, 38, 4,250,248, 80, +176,100,103, 49,151,214,124,154, 70, 43,114, 7,225,253, 29, 93,117,109,249,119,111,209,162,197,175, 35, 71,142, 36, 1,160,107, +215,174,100,139, 22, 45, 54,160,246, 84, 57,181,114,242,249,124, 30, 0,132,133,133,229,189,126,253,250,243,176,176,176,188,170, +231,245,228,220,186,122,245,106, 8,133, 66,104, 52, 26, 40,149,202, 74,255,172,170,175, 42,149, 10,150,150,150, 56,125,250, 52, +180, 90,237,233,186,202,233,212,176, 17, 8,171,198,216, 19,118, 25,215,115, 56,245, 17, 89,149,156,141,109, 69, 77,109, 45, 45, + 46,252,223,138,165, 86,249, 49, 17, 72, 73, 73, 97,206,157, 61,125, 71, 14,164, 22, 22, 99, 97,129, 12, 77,203,148,224,183,118, + 69,210,133, 45,223, 50, 11, 58, 66,141,234,119, 13, 86,114,122,218,138,154, 58, 88, 89,156,251,233,255, 86, 72, 10, 98, 34,144, +158,145,129, 51,167,195, 30,203, 1,221,114,227,104,154,166,189,104,154,246, 2, 48,186, 22,241, 98, 16,103,105,105,169,119,105, +105,169,247,199,228,100, 24,198,155, 97, 24,189, 57,171,250, 68,173, 93,187, 54, 42, 61, 61,125,100, 86, 86, 86, 55,221,145,159, +159,223,181,164,164,164, 83,105,105,105,135,178,181,141, 76, 75, 75, 75,173, 75, 74, 74,236,228,114,185, 63,128, 8, 3,238,249, + 74, 84,141, 58,157,158,158,190, 40, 61, 61,157,168,171,156,172,201, 81,196,129,159,102,253,190,101,203, 22,187, 15,228,127,171, +156, 57, 57, 57,199, 14, 29, 58,228,235,226,226,226, 58,122,244,104,108,222,188, 25,235,215,175, 87, 0,192,142, 29, 59, 20, 85, + 44, 89, 78, 9, 9, 9,173,106, 88, 54,236, 90,197, 90,178,247,179,207, 62, 99,174, 95,191,142,126,253,250, 85, 6, 18,221,182, +109, 27, 52, 26, 77, 81,151, 46, 93,104, 0, 40,147,151, 22, 49, 52, 3,165,170,198,245,247,247,218,147,203,229,118,175, 26, 47, + 80, 23,140,153,203,229,130, 97, 24, 52,109,223, 62,167,192,199, 39,111,103, 97, 97,233, 34,111,111,147, 9, 30, 30,163,155, 1, + 35,170,227, 36, 8,226, 45,171,206,187,135, 1,150,172,170,229,204, 42, 75,195,248,223, 87,196,159,213, 89,182,248, 98, 54,228, +197, 26,156, 88, 21,159, 45,207,198,182,154,196, 79,109,117,207,203,203,155,182,106,213, 42,133, 84, 42,197,192,129, 3,177,124, +249,242,113,237,219,183, 47,180,182,182,190,219,164, 73,147,103, 67,134, 12, 73,143,136,136,152, 22, 20, 20,132,232,232,104,252, +244,211, 79, 5,249,249,249,195,107,227, 36, 8,162,210,146,215,183,103,215,188,223, 54,252, 76,119,249,100, 10,132, 2, 19,168, + 41, 39,228,149,168,145, 47, 99,160,228, 5,128,203,225,161, 91, 96,115,220, 61,183,187, 84,171,148,237,169,235,158, 47, 41, 41, + 57, 62,106,212,168, 34, 14,135, 3,165, 82,201, 80, 20, 5, 94,185,223, 49, 77,125,254,185,170,237,139, 23, 26, 45,195,208, 4, + 65,224,155,111,190,145,229,231,231, 31,170,207,115,100, 0,170,114,126,172,112, 11, 93,223, 25,127, 62, 70, 88,136,191,162,238, +255,102,108,173,230,248,211,162,165,219, 82,169,123, 37, 8, 90,171,213,210,112,118,113,150, 36,196, 39,109, 28, 60, 56,120,108, +143, 30, 61,133, 61,123,246,228, 55,143, 42,159,141,134,133,133, 33, 52, 52,180,244,252,249,243, 69, 60,138,181,195,169,129,147, +141, 86, 75,131, 32,232, 90,213,176, 68, 34,153, 49,127,254,124, 65, 97, 97, 33,214,175, 95, 79,251,250,250,146, 34,145, 8, 42, +149, 10, 59,118,236, 80, 55,111,222,156, 34, 73, 18,133,133,133, 32, 73,242,149,158, 21,124, 90,152,148,218,237,215,160, 1,161, +173,166,142,177,240, 12,106, 43,237,228,228, 0,117, 75, 6,105,201,241,120,125,233,124,254,243,115,191,228, 66,158, 57, 0,117, +167, 7,170,110, 32,248,225,252,249,243,214,211,166, 77, 99,228,114, 57,145,148,148,196,172, 88,177,194,122,252,248,241, 63,164, +165,165, 13,173,231, 69, 33, 10, 10, 10, 64, 16, 4, 93,209,145,232,102,253,134,172,203, 69,238,217,179,231,100,255,254,253,251, +118,233,210, 5, 81, 81, 81,149, 75,132, 85,133,150,110,247,225,202,149, 43, 11, 0,204,171,139,148,162, 40,172,223,115, 12, 5, +249, 57,176,177,177, 7, 95, 32, 64,125,119, 88,114, 73,114,209,143, 75,191,183,206,121,121,151,136,188,115,153, 62,250, 52, 51, + 75,163,101,170,143,248, 95,156,198, 84,168,255,218,103, 51, 36,107,209,143, 43,150,152,234,150, 53, 15, 61, 74, 47, 34,180,204, +180, 15,122, 68,254, 45,156,127, 51,236,237,237,145,158,158, 78,216,219,219, 51, 21, 62, 90, 76, 45, 66,235,237, 27,188,124,185, +140,168,109,217,176,190,252,113,113,113, 43, 90,182,108, 57, 43, 58, 58,250,168,167,167,231, 36, 0, 13, 20, 10, 69,193,130, 5, + 11,254,111,199,142, 29, 99,245,177,100, 1,192,225,195,135,127, 25, 51,102,204,217,222,189,123,127, 75,211,116,139, 42, 3,123, +156,181,181,117,229, 18,110,118,102,198,220,137, 99,135,205, 45, 41,201,215, 59,206,157, 88, 44,158,176, 96,193, 2,190, 76, 38, +195,166, 77,155,232,230,205,155,147,186, 73,209,190,125,251, 52,238,238,238,236,224, 41, 83,114,214, 95,111, 53, 45, 0, 0, 32, + 0, 73, 68, 65, 84,102,100, 96,217,141, 27,178,185, 94, 94,190, 59, 95,191,246, 7, 77,239,173,201,170, 83,157, 37, 75,231,118, + 81, 79,164, 85,136,173,109, 0, 62,111, 59,216, 22, 39, 87,199, 35, 63, 65,249,127,208,224, 13,244, 72, 11, 84, 13, 82,142, 31, + 63,222, 45, 51, 51,243,228,247,223,127,111,234,239,239, 15, 47, 47, 47, 74, 44, 22, 7,232,194,197, 20, 22, 22,226,226,197,139, +216,188,121,179,242,249,243,231,253,107, 91,174,210,106,181, 89,238,238,238,186,118, 96, 8,130,200, 45, 82, 16,166, 71,154, 5, +136, 71, 79, 60, 74,220,124,112, 27,105, 42, 26, 10, 53, 13,103, 23, 63,116,250,124, 45, 78,253,241, 76,155,150,240,226,133,186, + 44,127,187, 30,229,125, 19, 19, 19,115, 98,233,210,165,131,191,253,246, 91, 65, 78, 78,142, 86,161, 80,208,199,142, 29, 99,141, + 30, 61, 90,203,176,217, 52,135,205,198,140, 25, 51,202, 10, 10, 10,126, 7,254,214, 4,211,127, 73,184,133,191, 32, 44,196, 71, +179,102, 85,125,253,111, 65,181, 79, 40,205, 34,111,109,222,242, 91,247,195, 7, 15,217,178, 88,164,237,155,216,216, 7,125, 6, + 12, 74,189,112,225,130, 57,199,212,180, 53, 0, 90, 57,105,210, 29,149,162, 44, 47,252,228,201,134,206,206,141,124, 42,146, 74, + 51, 52,139,188, 85,219, 15,150,148,148,200,110,220,184, 81, 58,111,222, 60, 34, 57, 57,249,128,141,141,205,144, 63,254,248, 67, + 60, 96,192,128,178,168,168,168,227,182,182,182,125,131,130,130, 36,179,102,205, 82,148,148,148, 24,146,120,244, 5,147,157,223, +236,254,247,107,190,184,191,250,183, 79,193,102,181,131,130, 2,104,245, 45,168,138, 47, 0, 56, 0, 3,226, 29, 85,133, 72, 36, +242, 17, 10,133,120,252,248,113,126, 64, 64,128, 82, 46,151,115,150, 47, 95,110, 33, 18,137,124,234,219,240, 12,195, 48,249,249, +249,160,105,154, 13,128,168,120, 5,109,248, 94,252,161,125,250,244, 57,121,228,200,145,207,122,246,236, 9, 87, 87, 87,168,213, +106,184,187,187, 67,169, 84,194,205,205, 13, 10,133, 2,139, 23, 47, 70, 97, 97,225, 76,212,146,243,140, 32, 8,104, 52,154, 74, +103, 91, 7,199,134,229,113,122, 62, 32,140,133,136, 34, 93, 95,133,239, 68, 86,110, 14,125,228, 73,102,102,169, 74,219, 45, 38, +187,244,249,187,159, 43,213, 66, 22, 52,122,122, 42, 0, 40,232,218, 51,206,139,184,112,125,125,122, 27, 50,179,114,112,248, 81, +122,129, 76, 69,127,254,186, 26, 78,131,202,249, 47,225,244, 91, 28,133, 65,211,245,255,236,135, 64, 95, 65, 85, 19, 30,103,128, +120, 40,220,201, 96,203,206,106, 99,100,125, 32,255,201,232,232,232,147, 0,240,226,197,139,228, 97,195,134,205,141,143,143, 95, + 10,224, 76, 66, 66,194, 22, 67,136,118,238,220, 25, 13, 96, 76,109,159, 57,180,102,204, 9, 0, 39, 12,225, 45, 46, 46,150, 71, + 68, 68,200,103,205,154, 69, 36, 39, 39,255, 97,107,107,251,217,217,179,103,133, 3, 6, 12, 80, 68, 70, 70, 94,178,183,183,239, +216,181,107, 87,241,153,123,247, 82, 75,223,188, 9, 15,143,143,119, 84,211,116,120,109,207,231, 71, 22, 89,111,137,173, 19,203, +226,127, 60,249, 99,124, 87, 90,129,227,202,124,220, 1,144,242, 1,156,215,111,221,186,229, 57, 98,196,136, 35,189,122,245,106, +235,233,233,137, 6, 13, 26,224,245,235,215,200,206,206,198,211,167, 79, 17, 22, 22, 22, 38,151,203,235, 76,168,157,151,151,247, +126,122, 34,190,185,253,238, 77,139,194, 30,220,108,237,222,161,231, 40,129,151, 61, 13,165,138, 65,114,226, 27, 44, 94,184,189, + 52, 61, 49,250,133, 74,163,234, 15, 61, 55,234,148,149,149,109, 93,183,110, 29, 21, 30, 30,222,115,227,198,141,146,134, 13, 27, +178, 56, 28, 14, 9,128,121,248,240, 33, 51,125,250,116, 89, 78, 78,206,233,162,162,162,173,127,243, 24,125, 61, 54, 54,214,143, +197, 98,125,212,112, 11, 31, 16, 22,194,136,143, 9, 23, 23, 71,207,198, 13,237, 39,185, 54,112,156,226,210,208, 41,164, 58, 39, +119, 87,169, 84,226,210,200, 97,130,107, 3,199, 41,141, 27,218, 79,114,113,113,244,212,195,180,232,106, 98, 98,242,135,157,157, +157, 47, 0,152,154,154,246, 53, 51, 51,123,110,106,106,218,183, 98, 22,216, 87, 44, 22,191,108,222,188,249,248,191,209, 92, 89, + 43,167,187,187,251,176,146,146,146, 47,221,221,221,135,233,222,191,121,243,166,242,125,125, 56,157,156,156,186, 60,124,248,112, +232,154, 53,107, 6, 54,105,210,164,239,138, 21, 43, 6,254,254,251,239, 67, 29, 29, 29,253,235,193,201, 3,176,159,162,168, 76, + 46,151,155, 69, 81, 84,166,238, 96,179,217,153, 44, 22, 43, 19,192,150, 26,172,101, 93,171,204,114,110,218,216,216, 36,216,216, +216, 36,216,218,218, 38,216,218,218, 38,216,217,217,189,119, 88, 90, 90,222,212,183, 61, 61,108,197,237, 3, 26, 72,110,121,219, +137,111, 54,179, 17,121,124,140,107,228, 97, 43,110,223,186,129,233, 45,111, 59,201,141,255, 53, 78, 95, 91, 48,204,102, 15,134, +217,236,193,248,218,130,169,235,253,199, 52,251,219,217,217, 49,118,118,118,139,254,170,165,132, 26,248,255,246,231,253, 35,114, +186, 74, 36,146, 67, 13, 26, 52,208,245,117,189, 77, 76, 76,174,136,197,226,222, 21,125, 93,111,145, 72,116,173,121,243,230,163, +234,226, 52, 55, 55,127,104,109,109,157, 81,113,164,219,216,216,164,219,216,216,164, 91, 91, 91,167, 89, 91, 91,167, 89, 89, 89, +165,234, 14, 51, 51,179,187,245,172,187, 53,128, 54, 0,252, 1,152,124,196,246,116, 1, 48,177,162, 15, 90, 5, 96, 60,128, 22, + 31,225, 26, 17,148,192,124, 50,207,204,233, 22, 37,182, 42,166,196, 86,197, 60, 83,199, 91,181,164,224,209,135,179,169,185,185, +249,114, 19, 19,147,223, 37, 18,201, 13,137, 68,114,210,210,210,114, 5,128,166,255,161,123, 73, 12, 96, 7,202,227, 51,157, 65, +249, 82,248, 73,148,111, 42,104,248, 15,188,231,255,151, 49,225, 63,245,195, 93,141,156, 70, 78, 35,167,145,211,200,105,228,252, + 23,114,146,198,246, 52, 10, 45, 3,133,214,187, 7,128, 90, 34,195, 27, 97,132, 17, 70, 24, 97,196,255, 48,104, 99, 19, 24, 97, + 32,170, 93, 90, 38,106, 81,165,134,196,154,170,143,178,189,104,228, 52,114, 26, 57,141,156, 70, 78, 35,167,145,243,127,142,211, +136,143, 8,163, 89,213,200,105,228, 52,114, 26, 57,141,156, 70, 78, 35,231,127, 59,140, 75,135, 70, 24, 97,132, 17, 70, 24, 97, +132, 17,127, 17,182, 86, 17, 92,111, 45, 33, 26,133,150,225, 32, 1,124, 9, 96, 16,128,198, 40,207,102,127, 12,192,175,168,223, +154,190, 9,128,185, 0,218,161,124,119, 78, 28,128, 27, 40,223,157, 83, 98,108,238,234, 97,105,105, 57,159,162, 40, 51,160, 60, +181,137,238,181,234,255,181, 90,109, 65, 81, 81,209,138,191,168, 8, 44,232, 25, 65, 89, 87,214,170,101,171,250,170, 86,171,255, +202,114, 26,241,207,132,187,185,185,249,254,188,188,188,225,168,146,100,217, 8, 35,254, 27, 96,101,101, 53, 73,165, 82, 45,224, +112, 56,203,179,179,179,127,251, 31,170,250,123, 34,235, 45,161, 21, 30, 30,126, 13, 0,122,245,234,245, 9, 0,152,153,153,221, + 38, 73,210,197,144, 95,160,105, 58,174,160,160,160,198, 0,106,102,102,102,183, 89, 44,214,123,156,106,181, 90,194,102,179,139, +171,251,142, 70,163, 73, 41, 42, 42,242,255,135, 52, 34, 1, 32, 92, 42,149,202,151, 46, 93,250,107,167, 78,157,156,210,210,210, + 52,115,230,204,233,248,228,201,147,158, 0,186, 27, 40,182, 2, 9,130,216,237,235,235,123, 34, 36, 36,228, 72, 64, 64, 0, 55, + 55, 55, 87,114,236,216, 49,135, 61,123,246, 68,208, 52, 61, 28,181, 36, 90,253, 95, 6, 69, 81,102, 41, 41, 41, 18,160, 60, 53, + 73,133,176,130, 90,173,134, 90,173,134, 76, 38,131,143,143,207, 71,255, 93, 91, 91, 91, 63,130, 32, 54,138,197, 98,255,146,146, +146, 7, 0,166,164,167,167, 63, 49,164,172, 26,141, 6, 12,195, 84,150,211,211,211,211,120, 65, 13,195, 56, 46,151,251,185,155, +155, 91,107,133, 66,145, 31, 23, 23,119, 95,171,213,126,143,143,151,163,205, 20,192,247, 60, 30, 47,160,113,227,198, 78,209,209, +209,201, 42,149,234, 30,202,147, 33, 23,126, 12,145,245,201, 39,159,220,220,180,105,147,197,228,201,147,111,222,184,113,163,189, + 81,108, 25,241,159,130,147,147,147,153, 76, 38,219, 14,192,143,162, 40, 91, 62,159, 15,129, 64,144,193,227,241, 30, 11, 4,130, +177,183,110,221, 42, 48,148, 83,171,213,126,159,144,144, 96,219,166, 77,155,213,214,214,214,139,115,114,114,228, 42,149,234, 82, +126,126,254, 76, 0, 69,181,125,247, 93, 45,242, 47, 19, 89, 85, 95,161, 19, 93,236,138,138, 49, 0, 58,189,165,192,216,108,199, +196,196, 68,107, 62,159, 15,154,166, 43, 7,179,119, 15,221,121,165, 82, 9, 47, 47, 47, 85, 29, 3,142, 83,114,114,178, 53,151, +203,173, 60,167, 84, 42,225,224,224, 64,167,164,164, 88, 87,164, 61,168,132, 66,161,128,163,163,227, 63, 41,231,209,151,230,230, +230,133, 73, 73,201, 62,114,133,106,201,248,105,243,230, 15, 31,244,169,244,246,237,219,116,247,238,221, 21,215,174, 93,251, 18, +229,137, 83,245,234,204, 9,130,216, 51,103,206,156,197,124,161,137,197,229,219, 47, 20,123,142,157, 78,245,117,119, 38,102,206, +156,201,154, 62,125,250,117, 63, 63,191,253, 52, 77,183,132, 1,150, 45,169, 84,122,150,199,227, 53,170,104,191,164,252,252,252, +207,254,129, 55, 36, 27,239, 7,143,173,238, 92,157,200,205,205, 69, 89, 89,217,123,135,167,167,167,190,185, 50, 13, 42, 55, 69, + 81, 39, 87,174, 92,233,144,145,158,142,159,215,174,109,131,114, 75,102, 27,125,190,156,149,149,245, 94, 57, 61, 60, 60, 96,132, + 65,152,187,120,241,226,149, 95,124,241, 5,180, 90, 45,202,202,202,236, 99, 98, 98,154, 47, 88,176,160,255,155, 55,111, 90, 3, +136,253,208,201,184,155,155, 91,212, 87, 95,125,101,222,186,117,107, 84,100,169,176,191,113,227, 70,155, 29, 59,118,140, 76, 74, + 74,242, 0,144,253, 33, 63, 96,110,110,190,127,219,182,109, 22, 66,161, 16,167, 78,157,178,232,210,165,203,141, 71,143, 30,117, +248, 0,177, 69, 90, 88, 88, 76, 7,208,153,166,105, 46,128,123,249,249,249,203, 96,120, 84,119, 59,177, 88,124,156, 36, 73,103, +224,207,104,244, 36, 73, 90, 18, 4,145,163, 59, 71, 16,132, 53, 77,211,119,242,242,242,218, 26,111,199,127, 55, 44, 44, 44,198, +101,102,102,110,226,241,120, 28,169, 84, 10,161, 80, 8, 54,155, 13, 54,155,221,128,199,227, 53,224,241,120, 61,130,130,130,166, + 92,185,114,165,214, 8,251,129,190, 54,163, 65, 18, 75, 88, 4,201, 2, 0,146, 18,153,152,154,154, 98,201,146, 37,162,190,125, +251,138, 0,224,230,205,155, 33,163, 70,141,234,146,146,146,226, 85,147,216,170, 78,139,252,139,176,181,182, 1, 15, 21,234,241, +218, 91, 79, 46, 73,130,203,229,226,238,221,187,208, 39, 88,185, 46, 69, 66,173,189, 65, 69,132,241, 39, 79,254, 52, 0,232, 6, + 26, 46,151,139, 91,183,222, 14, 42, 31, 24, 24, 88,249,176,255, 93, 24,228, 89, 30,228,241,232,212,242,114, 5,111, 44,143,174, +125,116,170, 7, 58,254,148,136, 65,211, 23, 13, 41,149,171, 90, 1,144, 21,228,231,231, 63, 8, 13, 77,243,117,119,231,236,223, +191,191,181,131,131,195, 32, 3,132,214,220,150, 45, 91, 30,103, 9, 76, 45, 67, 70,141, 14, 25,203, 38, 85, 35, 39,206, 90,158, +156,158, 35,155, 48, 97, 66,232,169, 83,167, 66,126,252,241,199,151,179,103,207,158, 11,224, 59,125,203,207,231,243, 27,189,122, +245,202, 77,171,213,194,211,211,243,159,152,198,192, 23,229,193,247,190, 0,112,176,226,220, 48,148, 71,238,247, 3,240,216, 16, + 50,157, 5,171,186,227, 99,195,193,193,193, 99,196,136, 17,150,121, 57, 57,248,121,237, 90,221,105,127,212,177,140,168,123,126, +148, 74, 37, 6, 14, 28, 56, 66,171,213,178,117, 34, 80,161, 80, 40, 11, 11, 11,229,248,211,177, 52, 27,192,167,122, 20,199, 69, + 36, 18,253, 31, 0,191,178,178, 50, 7, 0, 16,137, 68,169, 52, 77,159,144,201,100,223,225,207, 4,190, 6, 79,112, 1, 52, 71, +205,169,160,152,149, 43, 87, 70,207,155, 55, 47,246, 63,192,217,200,198,198,102, 69,112,112, 48, 78,159, 62,141, 51,103,206,168, + 5, 2, 1,123,212,168, 81,196,148, 41, 83,164, 95,125,245, 85, 15, 0,235, 62,240, 50,247, 88,188,120,177,121,179,102,205,112, +236,216, 49, 60,125,250,180,204,205,205, 77,208,169, 83, 39,176,217,108,243,249,243,231,119, 7,176,251, 67,126, 32, 47, 47,111, +217,172, 89,179,246, 28, 60,120, 80, 18, 23, 23,135,141, 27, 55, 90, 14, 25, 50,228, 90, 82, 82,210, 39, 6,136, 45, 30,128,233, + 0,130, 88, 44, 86,135, 81,163, 70,105,166, 77,155, 70,145, 36,169, 94,187,118,173,213,142, 29, 59,134, 80, 20,229,151,155,155, +171,207, 36,141, 4,176,100,236,216,177, 99,174, 92,185, 34,189,127,255, 62,215,194,194, 2, 90,173,182,210, 82, 76,211,180,181, +238,158,213,104, 52,240,240,240,112,172,242,125,193,191, 85,104,144, 36,169,162,105,154, 2,192, 7,160,168,235,253,127,147,200, + 50, 55, 55,159,156,151,151,247,171,173,173, 45,108,108,108,222, 27,107, 21, 10, 5,248,124, 62,199,214,214,118, 91,223,190,125, +169,147, 39, 79,214,184, 4, 72,176,136,239, 79, 29, 90,234, 96, 46,149, 0, 0,126,217,124,174, 20, 0,126,255,253,119,164,165, +165, 65, 42,149,194,203,203,139,181,116,233, 82,187,153, 51,103,254,156,159,159, 63,182, 38,174,119,181,200,191,204,162,181,181, +186,247,181,250,104, 49, 12, 83,153, 39, 79,207,155,246,221, 83, 23,223,225, 35,148, 74, 37,222,181,104,233, 30, 94,138,162,222, + 53, 63,130, 32, 8,166, 54,206,106, 48, 74, 36, 18,249,200,100,178, 13, 6,204,110, 43, 57,143, 78,245,192, 30,222,156, 97,186, + 76,164, 61,102,149,191,238, 1,112, 59,126,236,198, 77,159,124,226, 48,125,225,250, 69,101,185,105, 57,243, 71,244,110,228,102, +107, 33, 16, 21,100, 21,154, 55,109,218,237, 29,139, 76, 93,229,236, 24, 18, 18,178,247,252,221, 4,130,207,231,112,216, 44, 22, +213,222,219,221,194,201,148,101, 42, 1, 76,147, 99,163,111,143, 30, 61,218,123,246,236,217, 29, 12,224, 68,197,128,139,125,251, +246,129, 32, 8,210,144,186,127, 68, 92,172, 77,100, 49, 12, 3,130, 32, 14, 84, 25, 84, 14, 84,156,123, 84, 69,108,177,107,107, + 79,157, 53, 85, 39,170, 70,141, 26, 53, 66,163,209,176,171,116, 18,239, 10,152,234, 68,140, 94,117,183,179,179, 59, 15,224, 83, +130, 32,160,148,203,149,255,247,211, 79, 85,255,252,240, 29,145,117,177,166,103, 73,173, 86, 67,171,213,178, 31, 61,122, 68, 85, +185,215, 41, 0, 34, 0,150, 12,195,128, 36,201,103,122,180,167,135, 80, 40,188, 29, 22, 22,102,226,239,239, 79,112,185, 92,104, + 52, 26, 68, 70, 70, 58,253,248,227,143, 19, 47, 94,188,216, 93, 38,147,121,226,253,228,233,250, 92,163,230, 55,110,220,144,185, +186,186, 86, 43, 28,139,138,138,216,238,238,238,159,212, 32,138,254,106,206,148,204,204,204,126,159,126,250,233,164,140,140,140, + 40,141, 70,243, 45, 0, 47, 75, 75,203, 71, 3, 6, 12,128, 64, 32, 8, 42, 43, 43, 91,247, 33,247,188,181,181,117,223,182,109, +219, 98,227,198,141,248,241,199, 31,187, 2,184, 4,160, 75, 81, 81,209,197, 62,125,250,192,204,204,172, 95, 65, 65,193,238, 15, +120,142,220, 59,118,236,184,109,201,146, 37,146,211,167, 79,195,205,205, 13,197,197,197,248,230,155,111,172,127,248,225,135,171, + 5, 5, 5,157,170, 60, 23, 53,113,122,242,120,188,221, 7, 15, 30, 20,187,186,186,186,114, 56, 28,210,213,213, 21,121,121,121, +144,203,229,188,229,203,151,123, 11, 4,130, 39,235,214,173,219, 13, 96, 64, 29,229, 36, 1, 44,219,178,101,203,164, 9, 19, 38, +152,141, 24, 49, 66,171, 84, 42,113,228,200, 17,176, 88, 44, 80, 20, 5,161, 80, 88,153,188,154,195,225,160,105,211,247,130,164, +159,170,165,190,133, 40,247, 67, 53,131, 97,203,174, 23,107,225,171, 92,250,160, 40, 10,124, 62, 31,124, 62, 31, 60, 30, 15,175, + 94,189, 90,200,231,243,215, 18, 4,161,209,135,147,248, 83, 93,248, 0,184, 95,215,123,188,239, 26,242,119,246,159, 58, 56, 18, + 4,241, 11,128,160,242, 97,151,188,102,105,105, 57, 35, 51, 51, 51, 81, 95, 78, 59, 59, 59,139,220,220,220,117,118,118,118,176, +177,177,169, 28,191, 29, 28, 28,160, 86,171,145,153,153, 9,134, 97, 80, 80, 80, 0,161, 80, 8,123,123,251,117, 19, 38, 76, 56, +182,117,235,214,220,106, 57,105,252,216,103,200,130,239, 89, 44, 22, 9, 0, 44,182, 88,252,213, 60,160, 81,163, 70,104,223,190, + 61,228,114, 57, 10, 11, 11,209,188,121,115, 54, 65, 16, 33, 4, 65,152, 48, 12,243, 27,128,203,255,133,134,194, 26,157,225, 23, +191,187, 46,170,203, 22,207,225,112,244, 18, 90, 21,159,175,203,130, 66,170,213,106,112, 56,156,183, 44, 18, 4, 65, 64,171,213, +190,117, 94, 39,180,234, 35,212,167, 76,153, 66,111,219,182,109, 82,126,126,254,102,212,115, 41, 33, 36, 36,228, 61,127,143,153, + 51,103,166,100,101,101, 49, 3,187,249,136,162,254, 72, 75,111, 44, 21, 11,172, 36, 18,103,190,212,220, 44, 55, 55,247, 78, 69, +103,162, 47,154,180,108,217, 82,176, 39,244, 70,202,248,175, 87, 46,245,119,181, 48,105,225,104, 41,181, 53, 21,112,197, 36, 33, +227,107,212, 41,230,230,230,110,134,150, 91,215, 47, 8,133, 66,144, 36,249, 79,178,104,177,117, 34, 43, 47, 47, 15,167, 79,159, + 70,207,158, 61, 31,233, 68, 72, 81, 81, 17,210,211,211, 97,103,103,247,168,194,242, 81,231, 50, 34, 77,211, 80,169, 84, 80,169, + 84,149, 2,166,202, 61, 84, 41, 96,116,159,101,177, 88,207,234, 89,246,165, 82,169,180, 99, 80, 80, 16,247,208,145, 35, 92,134, + 97,100, 40,207,161, 86,194, 48, 53, 36,200,126, 7, 26,141,166,210,202, 70, 81, 20,146,146,146, 42, 7, 46, 93,110, 73, 62,159, +175,159, 41,131,199,155,117,248,240, 97,147,214,173, 91, 19,185,185,185,160,105,186,178,147,252,245,215, 95,249,131, 6, 13,114, +136,136,136,152,175, 80, 40, 22,215,163,174, 68, 77,130, 8, 0, 76, 76, 76, 52,208, 47, 98,118,157,156, 26,141,134,104,215,174, +221,236,156,156, 28,239,178,178,178,229,250, 52, 35,128, 83, 41, 41, 41, 85, 7,246, 39, 81, 81, 81,101,131, 7, 15, 22, 56, 59, + 59, 7,188,120,241,226,131,110, 82,119,119,247, 64,138,162,112,239,222, 61, 5, 0,221,204,250,218,211,167, 79, 21, 3, 6, 12, +224, 57, 57, 57, 5, 22, 20,232,237,178,226,238,225,225,113,193,218,218, 90,160,235, 67,173,172,172,168,173, 91,183, 74, 82, 83, + 83,161, 82,169, 48,119,238, 92,244,234,213, 11,150,150,150,152, 57,115,166,205,234,213,171,247,151,148,148,180,172,205,104,205, +229,114,247,198,196,196,184,217,217,217, 9,238,222,189,139, 22, 45, 90, 32, 39, 39, 7, 25, 25, 25, 40, 41, 41, 65, 70, 70, 6, +198,142, 29,107,253,243,207, 63,219,235, 97,201,170, 20, 89, 91,183,110, 45, 56,126,252, 56,107,251,246,237, 18,138,162, 42,133, + 22,155,205,174, 20, 90,186,220,138,245, 88,105, 40,168, 16,109,102,133,133,133, 31,226,231,198, 3,192,173, 42,178,120, 60, 30, +120, 60, 30,248,124,254, 7,229,101,253,151,192,129, 32,136, 23, 28, 14,135, 39, 20, 10, 57, 36, 73,130,199,227,117, 51, 55, 55, +127,238,229,229,229,117,225,194,133, 4,125, 72,228,114,249, 94, 30,143, 71, 89, 91, 91, 3, 0,220,220,220,208,162, 69, 11,200, +100, 50,186,176,176, 16,102,102,102,100, 98, 98, 34,202,202,202,144,158,158,142,134, 13, 27, 82, 36, 73,238, 69,185, 31,242,123, +184,253, 40, 99, 51,128,205,186,247,150,150,150,153, 85, 45,157,124, 62, 31, 14, 14, 14, 72, 77, 77,133, 68, 34, 97,253,240,195, + 15, 3,142, 28, 57,210,255,246,237,219, 33, 0,246, 85,161, 90,252, 47,246,209,210,137,172,170,175,127, 10,173, 94,189,122, 45, + 10, 15, 15,255,164,186, 89, 56, 69, 81, 31,205,215, 69, 39,168, 76, 76, 76,222,181, 90,129,166,233,154, 44, 90, 6,255, 14,159, +207, 23, 76,158, 60,185,248,183,223,126, 51, 88,108, 5,111,140,170,180, 98,189, 55,141,244,244,188, 61,127,254,252,190, 87,174, + 92, 73,245,119,117,102,139,210, 18, 75,248, 38,102,102,112,108,208,115, 84,191, 1, 79, 81,190,251, 80, 95,196, 20, 23, 23, 11, + 26, 59, 10,149, 36, 41, 39, 26,240,216, 18, 59, 17,135,103, 43,149, 58,112,148,138, 44, 19,169,148,171, 80, 40, 10,254,191,189, +235, 14,143,162,122,215,239,204,108, 47,217,244, 74, 32, 1,164,135, 22,122,175, 2, 2,138,133,242, 83,234, 15, 8, 34, 22, 80, + 65,189, 88, 48, 82, 4,225,130,130,148, 8,210, 4,149, 38, 29,164,152, 64,164, 39, 32, 33, 9, 9, 32,132,244,100,179,217,154, +205,150,153,157,251, 71,118,215, 77, 72,217, 77, 54, 20,111,222,231,153, 39, 59, 59,179,111,206,156, 57,229, 61,223,249,206,119, + 80,205, 38,208, 0, 16, 24, 24,120, 82, 36, 18,133,217,206,189,189,189, 61, 89,150,133, 88, 44, 70,112,112,176,148,162,168, 52, +135,202,149,145,159,159, 63,188,166,132,121,121,121,157, 20, 8, 4, 97, 36, 73,130, 32, 8, 80, 20, 5,146, 36, 65,146,164,253, + 51, 69, 81, 32, 8, 2, 37, 37, 37, 25, 15, 30, 60, 24,238,196,243,210, 0, 34, 9,130, 72, 60,122,244, 40,122,244,232,129,227, +199,143, 99,196,136, 17, 80,169, 84, 72, 74, 74, 66,255,254,253,129,178, 41, 69,167,224,232,252,110, 27, 20,220,190,125,219, 46, + 92, 28, 15, 15, 15,143,186,152,216,227,199,141, 27,135, 31,126,248,129,181, 14, 38, 36, 4, 65,116,244,244,244,188,157,146,146, +226,148, 31, 12,203,178, 48,153,254,185,213,214,121, 89,253, 33, 92,218, 28,152,162,168,225, 93,186,116, 33, 84, 42,149, 77, 64, +130,195,225,128,162, 40, 80, 20,133,239,191,255, 94,212,189,123,247, 79, 5, 2,193,124, 30,143,167, 54,155,205, 63,151,150,150, + 46, 1,160,124,154, 90,164,126,253,250,205,203,204,204, 28, 29, 22, 22,118,184, 14, 52,172,217,108, 54, 2, 16, 81, 20,197,117, + 67, 27, 69, 89,203, 86,169,131,216,167,173,231, 2,148, 77, 19, 59, 5, 63, 63,191,159,142, 29, 59, 22, 26, 22, 22, 6,179,217, + 12,154,166,161,213,106, 17, 23, 23, 7,131,193, 0,154,166,209,178,101, 75,124,254,249,231,165,239,189,247,158,112,211,166, 77, + 5, 90,173,118, 98, 13,180,239,237,221,187, 87, 18, 28, 28, 44,210,235,245,184,119,239, 30,186,116,233, 2,141, 70, 3,157, 78, +135,146,146, 18,152, 76, 38,168,213,106, 47,134, 97,140, 53,112,125,230, 40,178,102,205,154,117,147,207,231,119,121,231,157,119, +144,149,149,101,175,243, 51,103,206, 68, 96, 96,160,189, 46, 89,219,100,151, 26,102, 14,135, 3,129, 64, 0, 30,143,167,108,210, +164, 9, 8,130, 16,102,100,100,212,102, 42, 78, 6, 64,205,229,114,249,142, 2, 75, 32, 16,224,242,229,203,255,195,231,243,171, +178,102, 85, 85, 47, 89, 87,206,159, 52, 8,130, 88,195,227,241, 4, 62, 62, 62, 60,135, 1, 39, 79, 42,149, 34, 32, 32, 96, 29, +128,145, 78, 62,119,103, 31, 31, 31,123,251,222,169, 83, 39,100,102,102, 30, 80,169, 84,147, 11, 10, 10, 64,146,228, 14,146, 36, + 95,177, 13, 82,139,139,139,209,184,113,227,206, 85,241,245,142, 12,122, 19, 4, 91,206,162, 85, 97,128, 6,153, 76,134,251,247, +239, 67,167,211,177,233,233,233,196,236,217,179, 9,163,209,184, 53, 33, 33,225, 34,202, 86,219, 87,169, 69,158, 17,184,238,163, +101,179,104, 57,219, 1, 16, 4, 81,227,104,194,108, 54, 75, 35, 34, 34, 42,115,248, 34, 42, 19, 90,214,233,164, 90, 21,116, 46, +151,235, 81, 91,177, 85, 17,135,247,237, 14, 92,254,249,199,159,251,132, 52,125,110,254,252,207, 56, 47,190,248,226,165,237,219, +183, 51, 62,109, 71, 14, 57,123,114,103,224,183, 31, 44, 56,126,236,216, 49,160,204, 49,218, 89,196, 31, 57,114, 36,232,253,119, +231,224,243, 15,223, 59, 33,107,233,199,151, 18, 62, 18,161, 65, 87, 40, 5,171, 23,180,104, 51,122,255,225,195,185, 0, 18,170, + 35, 17,139,197, 97,201,201,201, 45, 29, 23, 18, 24,141, 70,136,197, 98,156, 61,123,214, 95, 36, 18,249, 3,128, 94,175, 71,251, +246,237,157,181,152,132,165,165,165,181,244,240,240, 64, 73, 73, 9, 12, 6, 3,204,102, 51, 44, 22, 11, 8,130, 0,151,203, 5, +159,207,135, 68, 34,113,117,101,223,117, 0,111,140, 26, 53,106,215,241,227,199, 17, 17, 17,129,226,226, 98,164,166,166,218, 68, +150, 75, 62, 90, 54, 43,145,163, 63, 22,135,195,193, 79,205,155, 99,102, 78,142, 93,192,172,241,244,196,231,150,218,237,166,209, +190,125,123, 54, 62, 62, 30, 39, 78,156,192, 75, 47,189, 68, 28, 60,120,208,196, 48, 12, 47, 39, 39,231,102, 78, 78,142, 83, 28, + 22,139,197,158, 86, 91,187,237, 40,176, 92, 21, 90, 52, 77,123,240,249,124,148,150,150,194,102,121,112, 60,154, 53,107, 6,133, + 66,193, 81,171,213,156,156,156, 28,241,226,197,139,223,137,141,141, 13,214,104, 52,175, 63,201, 86,104,195,134, 13, 97, 51,103, +206,124,200,225,112,216, 17, 35, 70, 76,202,200,200,120, 57, 56, 56,248,204, 31,127,252,177, 10, 64, 43, 87,249,252,252,252,174, +113, 56,156, 80,181, 90,205,219,179,103,143, 89,163,209,240,252,253,253,243,109,109,135, 45,175,205,102,179, 83, 43,151,253,252, +252,174,201,229,114,222,218,181,107,205, 69, 69, 69,188,192,192,192,124, 27,143, 82,169,228,237,217,179,199,172, 86,171,121,158, +158,158,215, 84, 42, 85,141,124,114,185,124,226,148, 41, 83,206,159, 57,115,198,143,162, 40,100,100,100,160,168,168, 8, 94, 94, + 94,216,177, 99, 7,194,194,194,176,119,239, 94,133, 66,161,152,241,205, 55,223,124,106, 21, 89, 53,249,104,245,239,209,163, 71, +152, 82,169,132,151,151, 23,116, 58, 29,174, 93,187,134,118,237,218, 33, 39, 39, 7, 36, 73,194,203,203, 11,235,215,175, 47, 33, + 8, 66, 81, 29,145, 72, 36,122, 57, 42, 42,202, 11, 0,162,162,162,188,162,162,162, 42,237,224,122,245,234,133,117,235,214, 85, + 20, 90,174, 12, 12,236, 86, 39, 7,113, 84,218,179,103, 79,196,198,198, 46,112, 81, 28, 25,109,162,173,162, 53, 75, 32, 16,184, +188,152,198, 98,177,240, 80,230,210, 64, 56,115,254, 20, 96,128, 72, 36,226, 85,252,178,164,164,132, 23, 28, 28,220,207, 5,225, +235, 43, 18,149, 25,156,194,194,194,160, 82,169, 24,163,209, 56, 97,231,206,157,102, 0,136,140,140,156,192, 48, 76, 41, 77,211, + 20,159,207,135, 78,167, 67, 64, 64,128,111, 53,182,209,143, 14,253,188, 56,168,162,143, 86,112,112, 48, 34, 35, 35, 97, 48, 24, +144,155,155,139,184,184, 56, 51,195, 48,187, 54,108,216, 96,241,247,247,255,239,107,175,189, 70, 37, 36, 36,188, 13, 96, 94, 85, + 90,228, 25,179,102,197, 84, 41,180,172, 10, 50, 22,192,192,138, 15, 89, 81,252, 84, 39,180,106,154, 58,228,243,249,202,135, 15, + 31, 74, 28, 59, 21,154,166, 17, 18, 18, 98, 97, 89,150,168, 76,104,213,197, 20,204,229,114, 61, 62,249,228, 19,229,134, 13, 27, + 38,222,191,127,127,145, 51,191,217,243,118, 27,108,175, 32,178, 54, 46,143, 94,183,118,249, 98,159,187, 39,182, 98,243,119, 43, + 25,134, 65, 66,135, 14, 29,250,105,181, 90,142,167,196, 12,185, 18,199,173, 34,203, 89, 81, 72, 2,248,241,202,149, 43, 9, 35, + 71,142,252,243,199, 95,246,251,228,220,187,119, 81,160,150,231,202, 90,180,228,240, 26,133,189,162, 41, 45,229, 77,152, 48,193, + 31,192,107, 53, 53, 98, 74,165, 18,121,121,121, 21, 5, 24,110,223,190,253,200,189, 78, 37,142, 36,193, 48, 12,246,237,219, 7, +177, 88, 12,137, 68, 82,238,176,137,172, 90, 46, 84, 72, 3,128, 17, 35, 70, 64,161, 80, 64, 42,149, 58,157,174,138,226,133,101, + 89, 24,141, 70, 24,141, 70,152, 76, 38, 6, 0,151,195,225, 96,122, 86,150,221,202,227,138,128,169,136, 14, 29, 58,176, 23, 46, + 92,192,159,127,254, 9,157, 78,135,181,107,215, 34, 56, 56,120, 48,128,207, 92,229,114,112,210,103,212,106, 53, 87,173, 86,219, +173,131, 92, 46,215,110, 61,112,210,146,199,227,112, 56,246,209,168,237,112,180,106, 81, 20,133,192,192, 64, 4, 5, 5, 97,227, +198,141,188,166, 77,155,142,126,146, 45,208,138, 21, 43, 90,172, 89,179,102,203,246,237,219,143, 79,156, 56,241,215,164,164,164, +105,158,158,158, 55,207,158, 61,187, 88, 32, 16, 88,106, 89,191, 67,115,114,114, 2, 28,191,178, 88, 44, 98,154,166,237,194,182, +164,164,196,233, 1, 6,151,203, 13, 77, 78, 78, 22, 3,192,226,197,139,185, 0,196, 54,103,112, 27,103, 73, 73, 9,183, 93,187, +118,161,206,150,245,243,231,207,247, 27, 58,116,232,133, 83,167, 78,121,135,133,133, 33, 59, 59, 27,217,217,217,104,209,162, 5, +150, 46, 93,170, 83,171,213,125, 0,164,105,181,218,131, 78,114,134,120,123,123,115, 31, 62,124, 8,154,166,209,185,115,103,172, + 95,191, 30, 19, 38, 76, 64,251,246,237,161, 86,171,145,156,156,140,109,219,182,121,243,120,188,106,219, 14,189, 94,127, 48, 38, + 38,166,113, 69,139,214,164, 73,147, 36,249,249,249,246, 50, 25, 29, 29, 93,110, 10,209,149, 54,217, 58,181, 85,229, 81, 27,208, + 52, 45, 19, 10,133,106,129, 64,192,183,249,103,197,197,197,185,108,205,170, 48, 0,116,229,252,137,193, 38, 90, 43,233, 91, 17, + 20, 20,228, 52,143, 64, 32, 32,108,109, 35, 77,211, 80,169, 84, 76,112,112,176,125,122, 63, 49, 49,145, 9, 15, 15,103, 40,138, +162,248,124, 62, 8,130,128, 88, 44,174,178,193,103, 25, 54,250,197, 9,159,149, 91,117, 56,247, 19,192,100, 50, 33, 49, 49, 17, + 38,147, 9,113,113,113,230,111,190,249, 38, 71,169, 84,206, 5,192, 57,121,242,228,148, 5, 11, 22, 80, 1, 1, 1, 67, 11, 10, + 10, 80,147, 22,121,134,196,214, 35, 86, 46, 91, 47, 20, 59,122,244,104,194,186,180,146,176, 9, 39, 87,132,150,181,242,213,216, +243, 18, 4,129,220,220, 92,251,121, 64, 64,128,203,255,203, 89,248,250,250,234,122,245,234,229, 33,151,203, 15,174, 88,177,162, + 86,150,172,141,203,163,215, 45,251,234, 11, 31, 69,202, 37,100,229,228, 66, 81, 96, 78,136,191,121,255, 0,128, 3, 0,128, 77, +109, 99,137, 55, 83,191,119,150,179,141,159,168, 19,151,199, 57,240,252,200,209,141,199, 71,205, 35,223,122,235,173,190, 83,166, + 76, 81, 77,156, 56,241, 93,169, 84,218,202,100, 50, 21,239, 63,122,244,193,248,241,227,155, 50, 12, 51, 5, 53,196, 28,209,235, +245, 25, 3, 7, 14,116,204, 79,217,233,211,167, 3, 31, 60,120,128, 57,115,230, 20,102,103,103, 43, 29,239,117, 38,141, 38,147, + 41,163, 83,167, 78, 85, 78, 23,218,166, 20, 1, 64,163,209,100,184,144,165,175,195,234,248, 94, 84, 84,132,219,183,111,131,195, +225,160,103,207,158,136,143,143, 71,223,190,125, 19, 93,177,106,149,150,150, 34, 44, 44, 12,165,165,165,208,233,116, 37, 0, 4, + 59,154, 54, 5, 0,188, 93, 84,132,107,223,124,131, 75,203,150,193,177, 60, 59,139,142, 29, 59,178,151, 46, 93,194,205,155, 55, + 97, 48, 24, 48, 99,198, 12, 0, 32,172,101,215,149,144, 25,205, 41,138, 26, 49,114,228,200, 16, 0,208,233,116,196,149, 43, 87, + 32, 20, 10,237,117,225,240,225,195,200,206,206, 6, 65, 16,240,246,246, 14, 45, 46, 46,110, 10,224,126, 53,102,127,226,254,253, +251,248,250,235,175, 97,177, 88,176, 96,193, 2,180,108,217,210, 46,176, 50, 50, 50,176,120,241, 98, 48, 12,131, 47,190,248, 2, + 45, 90,180,128,217,108, 22,162,150, 33, 52,220,129,247,223,127,255,238,129, 3, 7,142,103,102,102,190,176,124,249,242, 1, 4, + 65, 88,230,207,159,255,181, 76, 38, 99,234,194, 91,172,210,224,246,157, 12,187, 16,170,120,248,251,249,184,204,151,126, 47,211, +254,123,134,113,228, 99,224,235,227,237,106, 18, 75,204,102,179,238,149, 87, 94,241,218,183,111, 31,209,162, 69, 11,252,253,247, +223, 54,203, 80, 9, 92, 15,233,144,173, 80, 40, 90, 82, 20,197,187,115,231, 14,194,195,195,209,163, 71, 15, 44, 89,178, 4,114, +185, 28, 52, 77, 35, 32, 32,192, 98, 54,155, 19, 77, 38,211,185, 26,184,162,103,205,154,197, 3,240,166,213,178,213, 97,238,220, +185,150,149, 43, 87, 34, 49, 49,209,110,193,114,116,134,119,117,234,208,209,234,228,120,196,197,197, 45,224,243,249, 44,128,203, +112, 61,208,179,177,162, 69,171, 54,214,172,250, 66,125,174,100, 12, 14, 14,142,243,240,240, 24, 93, 92, 92, 92,206,170,213,167, + 79, 31, 83, 96, 96,224,121,103,121,164, 82,105, 49, 69, 81,190, 0,144,157,157, 13,137, 68,194,187,119,239,222, 50,148, 5,207, + 70,211,166, 77,151, 41, 20, 10, 94, 83,107,123, 26, 20, 20, 4,163,209, 88,165, 27,203,197,235,249, 91, 1,108,181,157,251,248, +248,228,170, 84, 42,209,202,149, 43,181,203,150, 45,211, 51, 12, 99, 0,112, 86,169, 84,218,227,104,229,229,229,169,184, 92,174, +143,151,151, 87, 35,155,208,170, 76,139, 60, 99,168,218,162,101, 85,146,108, 69, 65, 68, 16,196, 35, 14,234, 53, 8,173, 26, 69, + 22,195, 48,229,172, 12, 54,135,247,202,254,151,181, 83,175,213,212,161, 85,100, 9,247,239,223,191, 99,197,138, 21,151,157,253, +157,163,143,214,166, 85, 95, 45,183,137,172,191,254, 60,133,131,169, 42,249,130,101,171,215,212,246, 13,180,245, 19,119, 12, 12, +244,141,253,102,105,180,236,238,137,109,248,117,211,255,178,127, 93,189,218,253,234,213,171,147,231,204,153,211,196, 90,176, 20, + 0,110, 0, 24, 15, 39, 86,233,100,103,103, 15,175,208, 9,167,241,120,188, 64,177, 88,140,236,236,108,109,122,122,186,203, 83, + 50,114,185,124,120, 61, 20, 64,142, 77,100,201,229,114, 36, 39, 39, 99,208,160, 65, 0,128,248,248,120,244,233,211, 7, 9, 9, + 9,232,210,165, 75, 34,128,110,168, 33, 80,171,217,108, 86,182,109,219,214,110,221, 82,169, 84, 22, 0,136,202,205, 69, 76,112, + 48, 56, 28, 14, 46, 45, 91,134,133,102, 51,150,184, 40,224, 59,117,234,196, 94,185,114, 5, 15, 30, 60, 0, 77,211, 24, 51,102, + 12,106, 89,233,219,183,105,211,230,244,217,179,103,253,165, 82, 41,116, 58, 29,180, 90, 45,166, 78,157,138, 9, 19, 38,192, 96, + 48, 96,207,158, 61, 56,116,232, 16, 60, 60, 60,160,211,233,160,211,233,188, 71,141, 26,117, 33, 45, 45,173, 63,128, 59, 85, 8, + 45,118,248,240,225, 56,127,254, 60, 40,138, 66,247,238,221, 81, 84,244,207, 98,160,192,192,192,202,174, 81, 79, 82,104,113, 56, + 28, 54, 46, 46,110,249,128, 1, 3,144,153,153,249, 66,151, 46, 93,214, 78,155, 54, 45,187,174,188,222,158, 30,232,212,174, 57, + 12, 6, 3, 12, 6, 3, 66, 66, 66,160,209,104,112,247,238, 93, 24, 12, 6, 4, 6,120,185,204, 23,217,190,133,157, 47, 32, 32, + 0, 58,157, 14,247,239,223,135,209,104,132,159,159, 75, 66,171,241,240,225,195,255,216,181,107,151,239,182,109,219,140, 3, 7, + 14,228,175, 93,187,150,144,201,100,112,232, 88, 92, 69, 92,124,124,124,216,208,161, 67, 91,167,164,164, 32, 46, 46, 14, 70,163, + 17,145,145,145, 72, 79, 79, 71,175, 94,189,160,213,106, 47, 95,189,122,245,144, 51,134, 97, 0,159,206,154, 53, 11, 54,177,117, +254,252,121,228,230,230,194,195,195,227, 17,161,101,243,125,180,174, 26, 15,113, 38,177, 54, 65,228, 96,121, 90,232,229,229,101, + 2,176,166,150,214, 39, 0, 64,102,102,166,160, 67,135, 14, 6,161, 80,200,183,138,182,213,117,225,115, 39,220,176,146,177, 74, + 4, 5, 5,205,245,243,243, 27,218,172, 89, 51,228,231,231,243,248,124, 62,250,244,233, 99,234,214,173,155, 41, 40, 40,232,109, +103,121, 4, 2, 65, 10,143,199,235, 95, 54,152, 96,240,240,225, 67,176, 44,187,160,125,251,246,239,105, 52, 26, 20, 21, 21,241, +101, 50,153,125, 80,221,186,117,107, 24, 12,134, 20, 23, 44,111,209,225,225,225,159,242,120,188, 37,114,185,188,178,176, 16,124, + 47, 47, 47, 25,143,199,131,201,100, 42, 39, 54, 43,106,145,103, 93,100,149, 19, 90, 14, 42,178,156,208,113,197,162,229,140,213, +192,230, 96,239,120,110, 19,117, 21,255, 87,109, 99,104,121,122,122, 26,108, 34,107,201,146, 37,151,107,195,177,119,215,206, 96, + 79, 75, 73,227,156,203,199,144,118, 51, 1, 7,146,149,242, 5,203, 86,191,251,226,107,175,231, 87, 20,102,206,160,165,191,184, +125, 96,128,111,236,170, 21,203,100,138,148, 75,200,205,203,195,177,203, 87, 19, 76, 64, 50,128, 5,238, 52, 45, 3,101, 83,135, + 20, 69, 61, 77, 5,152, 75, 45,125, 0, 0, 32, 0, 73, 68, 65, 84,214,238, 12,159,155,155,107, 19, 89,145, 0,208,183,111,223, + 68,171,200,130,179, 22, 45,165, 82, 89,113,203,154,161, 0,252,108,207,207,225,112,208,231,211, 79, 93, 22, 89, 0,216,132,132, + 4, 40, 20, 10,219, 72,177,182, 34, 11, 65, 65, 65, 31,158, 61,123,214,255,199, 31,127, 84,111,223,190,189,200, 98,177,112, 59, +117,234, 20,218,181,107, 87, 98,199,142, 29, 0,128,241,227,199, 99,193,130, 5,184,117,235, 22, 36, 18, 9,250,246,237,203, 44, + 90,180, 40, 96,238,220,185,111,231,231,231,191, 91,105,239,104,177,240,132, 66,225, 25, 0,131, 83, 82, 82, 0,224, 2,202,182, +112,178, 89, 17,170,188,230, 76,231,171,209,104,184, 30, 30, 30,149,134,134,224,149,141,134, 92,181, 64,216, 57,255,252,243,207, +175, 87,173, 90,117,224,131, 15, 62,184, 83, 71,206, 74, 45, 90,163, 71,143,134,222, 96, 66, 86,190, 10, 12, 67, 67,111, 42,112, +153,207,209,162, 53,122,244,104,148,148, 26,241, 48, 87, 1,154,102,160,209, 59,221,151,139,159,127,254,249,147, 63,255,252,115, +208,197,139, 23,193, 48,140, 37, 61, 61,253,254, 43,175,188, 34,155, 63,127,190,111, 29, 22, 25,125,247,250,235,175,143,253,243, +207, 63, 21,173, 91,183,246,185,124,249, 50, 10, 10, 10, 64,211, 52, 6, 15, 30, 12, 62,159,255,112,217,178,101, 60, 0,223, 57, +251,110,172, 98,203,116,245,234,213,153,151, 46, 93,242,241,241,241,225, 91,218,180, 65,238,169, 83,216,183,111,223, 35, 63,216, +180,105, 19,224,100, 20,126,155,197,233,202,149, 43,110, 17, 88,229,122,106, 62,191,214,211,143,207, 42,174, 92,185,146,253,214, + 91,111,181,147,201,100,107,250,245,235, 55,200,215,215,151,244,246,246,142,107,212,168,209,123,157, 58,117,114,122,118,129,203, +229, 78,147, 72, 36,119,105,154,166,180, 90, 45,116, 58, 93, 89, 35, 77,211,124,146, 36,209,180,105, 83,123, 95,210,189,123,119, + 4, 5, 5, 49,169,169,169,211,156,229, 47, 44, 44, 44,183, 10,177, 18,204,234,211,167, 15,199, 96, 48,224,193,131, 7,241,142, + 23, 42,211, 34,207, 8,162,170, 21, 95,182,135,114,124,184, 70,141, 26,101,154,205,102, 54, 25, 96,111,220,184,193, 70, 69, 69, + 85,123,148,150,150,178, 1, 1, 1,185,149,116,126,112,228, 52, 24, 12,229,126,103, 48, 24,216,192,192, 64, 70,175,215, 63,194, +169,215,235,217,208,208,208,236,234, 56, 43,193,212,235,215,175,111, 88,184,112, 97, 15, 23, 50,200,206,201,110,108,195,110,219, +182,237, 63, 44,203, 14,232,215, 46,236,230,184, 78,129,108,159,150, 1, 57,135,246,238,154,192,178,236,128,138,135, 45,192,105, +117,156,109, 2, 37,109,135, 68, 52, 41,254,235,196,110,246,236,202,119,216, 85, 99, 90,178, 93, 66, 61,148,109,252, 68,174,238, + 17, 83,227,110,233, 17, 17, 17,105, 22,139,133, 53, 26,141,108, 68, 68, 68,186, 59, 56,107,129,234, 56, 59,163,204,151,237,245, + 74,190,235, 92,135,116,254,197,178, 44,171, 80, 40, 88,173, 86,203, 26, 12, 6,150, 97, 24,214, 17, 0,254,114,130,147, 53,153, + 76,108,113,113, 49, 11,231,125,238, 42,229, 12, 14, 14,190,127,239,222, 61,246,185,231,158,203,180,154,227,231,234,116, 58,182, + 34,116, 58, 29, 59,104,208, 32, 54, 61, 61,157, 13, 15, 15, 47, 77, 79, 79,103,131,131,131,111,215,144,206,102,141, 27, 55, 62, +227,231,231, 23, 7,160,165, 11,215,170,205,207, 61,123,246, 52,103, 89,118, 6,203,178, 81, 85, 28, 51, 88,150,109,243,164, 57, +173,249,155,207,178, 44, 91, 82, 82,194, 42, 20, 10, 54, 39, 39,135, 45, 41, 41, 97,181, 90, 45,123,253,250,117,246,226,197,139, +236,205,155, 55, 89, 31, 31,159,124,103, 56,109,124, 70,163,145, 85,171,213,108, 65, 65, 1,171,215,235, 89,157, 78,199, 38, 37, + 37,177,215,174, 93, 99, 83, 82, 82, 42,227,123,132,211,215,215,119, 83, 94, 94,158,246,194,133, 11, 37, 27, 55,110, 44, 9, 10, + 10, 74, 1, 16, 6,160,149,183,183,119,222, 59,239,188,195, 74,165,210,140, 90,214,163,118, 92, 46,247,250,242,229,203,175, 28, + 57,114, 36,255,208,161, 67,198, 45, 91,182,100,205,153, 51,231, 28,135,195,185, 14,160, 93, 45,235, 81,128,151,151,215,133,203, +151, 47,211,197,197,197,172, 82,169,100,213,106, 53,171,211,233, 88,189, 94,207, 26,141, 70,214,108, 54,179,231,206,157, 99, 3, + 3, 3, 29,167, 37, 63,170,102, 96, 61,143,101,217, 15, 89,150,229,184,187,173,115,224,238,231, 46, 78,119,180,117, 36, 73,154, +172,109, 71,207,178,211,234,207,159, 84, 58,135, 12, 25,242,197,132, 9, 19,216, 17, 35, 70,176,145,145,145,143, 28, 93,186,116, + 97,103,207,158,205, 30, 57,114,132,253,230,155,111,190,112, 67, 58, 57, 40, 91,244,178,116,200,144, 33,230,243,231,207,179,227, +199,143,103, 1, 12,175, 78,139,252, 27, 4,151, 45,188, 3,225,248, 23, 0, 76, 38, 83,102, 90, 90, 90,112,107,154,166, 0,224, +251,239,191,127,196, 50,229,136,243,231,207,211, 4, 65,220,173,238,191,155, 76,166,204,179,103,207, 6,174, 91,183,142,235, 96, + 2, 6, 77,211,150,156,156, 28,114,237,218,181,229,238,143,141,141,165,105,154,126,232,226, 67,110,235,220,185,243, 54,119,228, +214,185, 91, 15,222, 59,121,236, 55,191,158, 61,250, 41,101, 62, 62,149,142,194,246,188,221, 6,196,155,213, 91,181, 8, 14,185, +100,249,210,104, 47,219, 20,228, 47,137,121,202, 82, 3, 51, 40, 85,174,255,203,221,111, 88,171,213, 62,176,173, 4,212,233,116, + 15,159,194, 66,120, 29,101, 49,174,232, 10,223,117, 67, 29,157, 78, 45, 22, 11, 60, 61, 61,237,214,208, 90, 88, 68, 89,155,133, +213,246,234,234,146, 30,150,101,255, 76, 74, 74, 10,159, 58,117,170,199,246,237,219,239, 49, 12,195,157, 62,125,186, 41, 40, 40, +136, 23, 31, 31,111, 6, 64, 12, 24, 48,128,147,151,151,199,102,103,103, 43, 94,122,233, 37,205,204,153, 51,125,111,220,184,193, +183, 88, 44, 53, 5, 45,252, 59, 51, 51,115, 72, 45,174, 85,139,113,227,198,221, 67,221,183,177,169,119, 78, 27, 20, 74, 53,238, + 61,200,182, 70, 48,183,128,201,200,183,251, 85,153,205, 52, 20,234, 34,151, 45, 90,119,239,103, 91,183, 24, 99,192, 48, 57, 86, +190, 50,135,120,182,184,164,230,222,132,195,233,187,104,209,162,145, 36, 73,146,151, 46, 93, 50,172, 88,177, 34,179,176,176,112, + 12,128,135, 0, 80, 92, 92, 60,112,219,182,109, 63, 57, 17,202,161, 42, 36,155,205,230, 94, 31,125,244,209,187, 0,250, 2,104, + 98,229,142,183, 90,178,106, 27,193,188, 64,169, 84, 14, 27, 57,114,228, 41,138,162,154, 58,212, 35, 63, 0,114, 91,189, 96, 89, + 54, 32, 63, 63,255, 5,103, 8, 9,130, 88, 93, 95, 13, 73,125,114,215,177, 29,122, 38, 86, 50,158, 57,115,230,203, 49, 99,198, +112,194,194,194,254, 39, 44, 44,140, 44, 46, 46,134, 86,171, 5, 73,146, 8, 10, 10, 66, 68, 68, 4,130,130,130, 44, 41, 41, 41, + 75, 63,254,248,227, 26, 99,242,181,109,219,182,185,217,108,126,142, 36,201,230, 0,154,179, 44,219,156, 32,136,230, 0,124, 0, + 64, 38,147,201,194,195,195, 57, 61,123,246, 68,143, 30, 61, 16, 27, 27,139,189,123,247,110, 5,112,210,209,154, 85, 81,139, 60, + 13, 72,238, 12,182,221,117, 16,183,186, 96, 0, 97, 65, 44, 75, 98, 96, 68,130, 61,206, 94, 69,145, 85,245,166,210,149,152,254, +134, 15, 30, 60,216, 94,225,156,232, 84, 30,212, 84,249, 10, 11, 11,135, 79,155, 54,173, 28, 39,195, 48,134,162,162,162,183,122, +247,238,189,158,162, 40, 65,133, 2,155, 81, 80, 80,240, 88,247,234,171, 24, 71,107,248,200,151,229,117,229,148,242,200,231,210, +142,254,128,252, 2, 57,126, 73,204, 43,214, 24,153,129,233,242,146,164,250, 72,127, 70, 70,198,136,103, 64,241, 87, 38, 90,235, +186,121,118,161, 19, 1, 73,107,218,163,142,176,134, 19,113, 75, 37,207,203,203, 91,249,233,167,159, 14, 91,186,116,169,255,241, +227,199,101,182, 1,202,171,175,190, 90,144,148,148,212, 15,128,160,180,180,244,244,210,165, 75,253,163,163,163,125, 1,248, 2, +192,168, 81,163,242,243,243,243,215,161, 1,213,194,108, 54,103, 69,180,109,109, 31,248, 57,134,116,112,252, 76,211,116,150, 43, +124,149,241, 56,158, 51, 12, 83, 45, 31, 69, 81, 31,244,232,209,131,250,224,131, 15,242,143, 31, 63,110,219, 72,215, 81,161,165, +213, 16,148,212, 25, 24, 0,172,176, 30,238,132, 78,161, 80,244,114,241, 55, 76, 67,105,172,116, 64,233,202,249, 19,193,193,131, + 7, 63, 27, 63,126,252, 54, 31, 31,159,157,205,155, 55,111, 29, 24, 24, 40, 19,137, 68, 48, 24, 12, 26,163,209,120, 59, 45, 45, +109,226,103,159,125,246,183, 83, 22,142,109,219, 40, 0, 60,139,197, 34, 36, 73, 82, 2, 64, 70, 16,132,183, 77,104, 17, 4, 1, +147,201,132, 7, 15, 30, 96,225,194,133,204,153, 51,103,190, 1,240,133, 11, 3,215,110, 0,252, 29,218,113,127, 0, 70,148, 5, +176, 45, 36, 8,226,106,125,231, 23, 97, 65,108,187,235, 32,146, 59,163,178,126,162,250, 77,165,171,170,112,133,133,133,189,220, + 93,137,171,226, 44, 44, 44, 12,123, 90,106,200, 20,195,138,221,216,180,162,220, 62,135, 54, 17, 86,217,121, 77, 80,233,233, 57, +223,157,188,181,210, 64,179, 22, 19,109,249,111,122, 97, 73,114, 67, 59,228,118, 60,239,174,186,228,198, 52, 37,165,166,166,246, +158, 51,103,206,103, 98,177,184, 59, 0,148,148,148, 92,202,201,201,249, 10,214, 85,133, 53, 93,111, 64,213,144,203,229, 93,159, + 70, 62,163,209,248, 94,239,222,189,191,101, 24,102, 21, 77,211,241,255, 15, 94, 69,105, 67,105,124,118,241,235,175,191,254, 13, +160, 23, 0,140, 29, 59,150, 2,128,189,123,247,186, 44,158,167, 78,157,202,176, 44,107,178,150, 7, 29,202, 86, 23, 22,219,218, + 84,157, 78, 87,156,147,147,147,194, 48, 76, 10,128,159,224,250,138, 91,127,130, 32,142,176, 44, 59,218, 42,220,142,176, 44, 59, +218,241,187,250,182,106,213,112, 75,205,206,240, 13, 40,195,222,100, 16, 21,167, 2,107, 58,175, 9,105,249,186, 56, 0, 93, 26, +114,247,255, 37,238,229,228,228, 76,169,195,245, 6, 60,123,120,104, 52, 26,199,252, 63,122, 94, 85,195, 43,255,151,244,127,181, + 16, 88, 54,164,164,164,212,155,139,192,147, 70,187,235,229, 7,224, 21,207, 29, 16, 85,153,240,106, 16, 90, 13,104, 64, 3, 26, +208,128,186, 64,217,144, 5, 13,248, 55,195,230,155,101, 59,175,194, 71,171,162,127,150,253,156, 64,213, 43, 7, 92,217,149,188, + 54,171, 36, 78, 55,112, 54,112, 54,112, 54,112, 54,112, 62,113, 78, 47, 0,225, 0,150,215,112, 95,197,213,133,249, 0,228, 0, +204, 13,249,217,192, 89, 7,253,224, 20, 88,150, 29, 85,221,212, 33, 65, 16, 71,235, 75,104,217,157,225, 59, 99, 81,196,117, 44, +178,157, 59, 43,180,234, 27, 67, 27, 56, 27, 56, 27, 56, 27, 56, 27, 56, 27, 56, 27, 56, 27, 56,235, 40,180, 6,125,252,241,199, +159,160, 44, 52, 6,251,241,199, 31,127,194,178,236,168,178, 75,236,168,250,252,223,183,186, 96, 64,114,103,176,182,227, 86, 23, + 12,168,226,214, 40,135,195,142,134,169,195, 6, 52,160, 1, 13,104, 64, 3, 26,240,180,227,194,178,101,203, 74,150, 45, 91,102, +115,124, 47, 4, 64, 88, 45, 92,133,245,249,143,173,211,132,206, 44,148,170,126, 11,158, 39,128, 16,146,195,155,196,229, 9, 6, +129,181, 68, 0, 0, 72,234, 22, 99, 44,253,131,166, 77, 59, 1,228,212,150,184, 13,208,182,133,151,232,144,129, 97,120,153, 26, +227,216,212,178,109, 14, 92,198, 88,160,143,128,207,255, 93,224,229, 37,170,236,186, 65,169,212, 27,140,198, 97,123,129, 63, 27, +234, 64, 3, 26,208,128, 6, 52,224, 25,129,196,219,219,251, 12, 73,146, 97,182, 47, 28,227, 14, 86,140, 65,200, 48, 76,174, 66, +161, 24,134,178,169,226,199,201,233,248,123, 35,106,217,151,187, 27,174, 78, 29,114,128,114, 81, 88, 31,203,142,217, 20, 87, 48, +211,195,211,107,201,127,166,189,231,219,178, 85,107,162,113,227, 70, 0, 11, 60,204,204, 10,188,123, 39,125,200,175,219,191,123, + 95,173, 82, 44, 52, 27, 12, 63,184,202,221, 22,144, 52,145, 10,226,127,248,248, 13, 47, 14,104,188,190,120,215, 9, 66,107,106, +156, 82,182,220,212, 37,145,229,229,235,123,114,217,233,211, 34,239,142, 29,203, 93, 99, 89,182,108,127,189,191,254, 18,253,207, +176, 97, 39,199, 42, 20,195, 27,196,214,191, 18, 65, 50,153,108, 46,151,203, 29,104, 50,153,194,248,124,126, 38,195, 48,113,197, +197,197,107, 0,100, 55,100,207,191, 27,173,131, 36,253, 90, 55, 15,219,149,147,151,159,168, 46, 53, 78, 79,203,209, 42, 26,114, +197,101, 84,183,191,230, 19,219,123, 19, 0,164, 82,233, 53,146, 36, 67, 29, 69,128,109,207, 94,219,121,197,191, 22,139,229,111, +133, 66,209,187, 26,218,230, 62, 62, 62,235, 1,116,171, 41, 96,178, 53, 54,219, 85,133, 66,241, 22,170, 94,173,231,225,237,237, +253, 37, 65, 16,227, 72,146,164,106,122, 38,139,197,194,176, 44,187,167,184,184,248, 11, 0,154,170,238,243,246,246, 62,157,154, +154,218, 45, 32, 32,160, 70, 43, 13, 77,211,120,248,240,161,127,247,238,221,207, 41, 20,138, 54,245,201,249,184,181, 72,109, 81, +205,170,195, 42, 11, 58,128,114,251, 11,213,107, 68, 86,158, 80,122,168, 87,255,225,131,102,191,251,129,228,122,210,109,252, 30, +123, 17,106,157, 1, 20, 73,194,203, 67,140, 86,173,158, 35, 86,199,236,243,219,186,113,245,170, 75,231, 79,141, 42,213,169, 94, +114, 73,166,139, 57, 11, 23,188,210, 93,226,235,195, 0, 22, 6, 31,142,236, 36,249,159, 35,137, 11, 81, 66,127,226,178,200, 58, +115, 70, 92,144,159,143,232,144, 16,112,104, 26, 66,146,132,144, 32, 32, 36, 73, 72,132, 66,140,216,178, 5, 95, 29, 63, 46,254, +236,133, 23, 26,196,214,191, 12, 82,169,116, 90, 72, 72,200,138,205,155, 55,251, 54,107,214, 12, 18,137, 4, 10,133,194, 47, 45, + 45,173,243,188,121,243,166,228,230,230,126,170, 86,171, 55, 53,228,212,191, 23, 22, 11, 38,253,184,228,173, 70,185, 25,119, 26, +205, 90,186,187, 21,225,203, 12,188, 93,164,207,107,200, 25,167,209, 25, 64, 34, 42,223,191,180,186,107, 85, 66, 40, 20,230,151, +150,150, 6, 84,119, 15,159,207, 47, 48, 26,141,129, 53,113,145, 36, 25,154,157,157, 29, 32, 22,139,193, 48,140,117, 55, 0,139, +125, 32,237,184,251,137, 53, 80, 45,218,180,105, 99,170,142,211,195,195,227,251,130,130,130,161,182,125, 2, 29, 4, 85,165,200, +206,206, 30,218,174, 93,187,239, 53, 26,205,176, 42,196,203,151,239,190,251,238,220,246,237,219,219,172, 64,214, 93, 16,202,254, +202,229,114,204,153, 51,199,254, 63, 44, 22, 11, 78,157, 58,245,238,180,105,211, 80, 92, 92, 60,175,154,103, 15, 11, 8, 8, 32, +172, 27,138, 87,137, 69,139, 22, 97,209,162, 69,248,238,187,239, 8, 46,151,235, 85, 67,126,186,133,243,113,105,145,218, 88,176, +106,136, 12,127, 20,229,125,179,142, 62, 34,180, 30, 7, 40,174,224,191,221,122, 15, 29, 56,103,238, 2,201,238,223,206, 34, 45, +229, 47,164,198,255, 92,238,158,174,195,166, 33, 79,174,193,180,217, 31, 74, 9,138, 51,240,252,233,131,255, 53, 27,244, 63, 58, +105,205, 10, 12, 19,240,223,233,217, 61,130,155, 45, 74, 67,144,183, 8,125,187,180,224, 54, 62,121,243, 29, 29,232,111, 83,202, + 86,201,184, 36,178, 54,191,241, 6,250,153,205, 8,160, 40, 80, 4, 1, 10, 0, 73, 16, 40, 53, 24,112,117,210, 36,116,223,177, + 3, 95, 28, 62, 44,254,242,197, 23, 93, 18, 91, 18,137,228, 58, 65, 16,222, 90,173,118, 20,202, 54,150,126, 22,208, 78, 42,149, + 30,101, 89,182, 88,167,211,117,126,138,210, 21,140,178, 57,250,138,163, 99, 30,202, 86, 84,185,180,179,176, 64, 32,152, 57,118, +236,216,213,235,214,173, 19,231,231,231, 35, 39, 39, 7, 12,195, 64, 40, 20,162,101,203,150,196,233,211,167,125, 23, 44, 88,176, +242,232,209,163, 2,141, 70,243,173, 43, 3, 27, 46,151, 27,227,227,227,243, 66, 96, 96,160,164,160,160,160, 68,169, 84,158, 50, + 24, 12, 51, 81,251,109, 83, 72, 46,151, 59, 49, 60, 60,252,229,144,144,144,192,236,236,108,121, 86, 86,214, 33,131,193,176, 21, +181,220,168,217, 33, 79, 59,194, 26,173, 30, 64,110,120,120,248,173, 7, 15, 30, 20,184,145, 51, 39, 60, 60, 60,185, 22,156, 18, + 0,191, 2, 8,169,225,190, 28, 0,227,225,162, 53,219,158,177,172,229,216,226, 53,155,167, 71, 79,237, 75,252, 56,111,104,203, + 55,191, 59,125,145,228,177,253, 83,114, 75, 51, 27, 52,148,115, 34,203,186,165, 85, 69, 65, 85,221,181,106, 97, 48, 24,252, 77, + 38, 19,184, 85,108, 22,175,211,233,224,225,225,225,239,108, 34, 69, 34, 17,126,254,249,103,112,185, 92,112,185, 92, 20, 23, 23, + 35, 52, 52,212,126,206,227,241,236,159,155, 52,105, 82, 35, 31,195, 48,221, 41,138,130, 86,171, 5,195, 48,246, 67,169, 84,130, +101, 89, 8, 4, 2, 48, 76,217,118, 78, 14,215,187, 87,197, 71, 16,196,184,144,144, 16,236,222,189, 27, 70,163,241,145,235, 50, +153, 12, 73, 73,255,108, 50, 66, 81, 20,122,244,232, 65, 18, 4, 49, 14,192,188,106,120, 89, 0,136,138,138, 2, 69, 81,160, 40, + 10, 36, 73,218, 63,219, 14,134, 97,176,104,209, 34, 84,216,154,236,177,113, 62,109,168, 33, 50,124, 46,170,240,209, 34,235, 57, + 93,142, 75, 60, 67,196, 18,217,215,111,189,247,161,244,232,185,155,120,152,249,240, 17,145, 5, 0,215,126,223,138,220,156,108, + 36,166,102, 97,226,127,223,150,202,100, 94, 95, 87,104, 80,171, 92, 54,234,233,193,251,230,227,241,125,133, 90,115, 14, 52,222, + 0,213,156, 15,174, 88,135, 5,163, 59, 10,100, 30,188, 21,206,164, 83,192,231,255,190,236,244,105,187,200,234, 99, 48, 64,192, + 48,160, 25,198, 46,178,140, 52, 13,189,209,136, 96,173, 22,119,167, 77, 3,107, 54,227,211, 3, 7,196, 2, 62,255,119,103,210, + 9, 0, 60, 30, 47,248,208,161, 67, 77, 58,116,232, 16, 11,231,131,153,158,174,231,119, 84, 29,186,116,234,212, 41,110,199,142, + 29, 77,120, 60, 94,176, 59, 56,133, 66,225,107, 18,137,164, 80, 40, 20,190, 86,203,116,146, 0, 22, 79,159, 62, 61,225,185,231, +158, 59,107, 21, 86,118, 81,243,220,115,207,157,158, 62,125,250,117, 0,139,170, 40,235,149,113, 54, 10, 9, 9, 89,178,110,221, + 58,113,122,122, 58,178,179,179, 97, 54,155,241,250,235,175,131, 97, 24,232,245,122, 24,141, 70, 44, 95,190, 92,226,235,235,187, + 16,101, 27, 5, 59,243,236, 60, 79, 79,207,244,237,219,183,143,189,127,255,190,244,236,217,179, 68, 82, 82,146,100,229,202,149, + 99,124,125,125,211, 0, 8,106,145,159,100,112,112,240,143, 7, 15, 30,124, 43, 41, 41, 41,116,255,254,253,220, 75,151, 46, 5, +111,220,184,113, 70,112,112,240, 14, 0, 84, 45,223, 81,103,177, 88, 60,100,254,252,249,150, 11, 23, 46,100, 95,184,112, 33,123, +245,234,213,232,215,175, 95,159,232,232,232,200, 90,114,118,241,240,240, 24, 60,127,254,124,203,249,243,231,115, 46, 95,190,156, +181,114,229, 74,114,240,224,193,125,151, 44, 89,210,209, 69,206, 95, 47, 92,184, 48, 32, 51, 51,179, 89, 86, 86, 86,211,172,172, +172,240,172,172,172,240,236,236,236,176,220,220,220, 38,121,121,121,141, 11, 10, 10, 26,199,197,197,245, 5,176,203, 25,206,214, +129,146,183,230,189, 62,180,100,225,127, 71,178,159, 76,126,158, 93,240,250, 0,246,133,254, 29,126,163, 56, 28,226,114,242, 67, +132,122, 2, 91,231,116, 11,107,236, 39, 73,138,240,145,182,122,202,234,230,211,198,201,177, 9, 41,133, 66,129,163, 71,143,194, +106,189,234,236, 40,178,212,106, 53,114,115,115,109,215, 56,206,164, 83, 38,147,157,217,188,121, 51, 91, 90, 90, 10,149, 74,133, +130,130, 2,100,102,102,226,238,221,187, 40, 42, 42,194,237,219,183, 33, 22,139,207, 56,147, 78,130, 32,192, 48,140, 93, 72,157, + 58,117, 10,211,167, 79,135, 66,161,176,127,199,225,112,236,159,109,191,169,137,211,102,121, 98, 24, 6,151, 47, 95,198,172, 89, +179,176,122,245,106,236,218,181, 11, 71,142, 28,129, 66,161,176,139, 45,154,166,107,228,148,203,229,176, 88,156, 27, 51,177, 44, + 11,149, 74,229,244,123,119, 20, 64, 28, 14,231, 17, 81,100, 59, 92, 41, 75,117,228,124,106,225, 68,100,248,170, 71,216,182, 15, + 86, 83,221,192,250, 74, 36,201,225, 77, 28, 55,245, 93,223,172, 2, 53,178,243, 85,160,200,127,250,189,200,161, 83,193,161, 72, + 92, 57, 89,102,184, 34, 41, 10, 42,157, 1, 74,173, 9, 99,167,206,245,249, 97,245,231, 19,105, 83,105,181, 49, 94,218, 3, 45, + 35,164,210, 87,218,181,107, 66,166, 8, 82, 17,249, 66, 60, 24, 11,192,158,127, 17,157,139, 3,168, 54,191,243, 95,209,105, 76, + 75,146,128,244,106,173, 25, 94, 94, 34,239,142, 29, 17, 29, 18,130,254,102, 51,120, 44,139,231,243,243,241,215,220,185, 48,236, +219, 7, 18, 0,239,181,215, 48,104,205, 26,156, 11, 9, 65,144, 94, 15,229,251,239,195,255,196, 9,240,100, 50, 17, 10,157, 91, +252, 64, 16, 4, 6, 14, 28,136,211,167, 79,251,142, 24, 49,226,228,205,155, 55, 95,165,105,250, 92,109,242,214,211,211,243, 26, +135,195, 9,173,233, 62,154,166,179, 84, 42,149,203,219,140,112, 56,156,254, 61,122,244, 56,176,127,255,126,111,147,201,228,150, + 81, 8,159,207, 31, 49,102,204,152,205, 27, 54,108,144,205,152, 49, 99,243,145, 35, 71, 74,140, 70,227, 9, 87,138, 20,128,197, +155, 54,109,122, 51, 42, 42,202,107,198,140, 25,236,221,187,119, 29,173, 87,254,253,250,245,123,110,243,230,205, 65,221,186,117, +123,119,214,172, 89, 60, 0,159,214,100,229,145, 74,165,179, 55,111,222,236, 39,151,203,161,213,106,237,141,108, 86, 86, 22, 68, + 34, 17, 72,146, 4, 73,146,224,114,185,248,250,235,175,125,103,207,158, 61, 87,161, 80,204,117,194, 74, 22,179,126,253,122,255, + 97,195,134,145,247,239,223, 7, 73,146, 16, 10,133,120,227,141, 55, 72,189, 94,239, 29, 29, 29,189, 77,167,211, 77,112, 37, 15, +185, 92,238,196,152,152,152, 86,125,250,244,225,164,166,166,162, 87,175, 94,184,114,229, 10, 94,123,237, 53,174, 70,163,105,186, + 96,193,130,233, 6,131,193,213, 56, 46,193, 98,177,184,253, 31,127,252,145,217,184,113, 99,123,195,210,180,105, 83,102,212,168, + 81,138,212,212,212,214, 23, 46, 92, 40,234,221,187,183, 43, 27,150, 55, 18,139,197,109,142, 29, 59,150, 27, 29, 29, 61,100,211, +166, 77, 99, 0,160,123,247,238,135,190,250,234,171,179, 10,133, 34,226,220,185,115,138,254,253,251,103, 57,201, 23, 18, 28, 28, +204,204,153, 51, 71, 90,221, 77, 91,182,108, 81,162,108,195,229,102, 0,170,221,175,173,117,120,208,194, 21,115,199,137,192,152, +192,154,245,128,169, 4, 48,105, 97, 49,150,128,224,137, 0,179, 30,254, 2, 5,126,157,221, 90,246,209,238,123, 41,204,109, 98, + 84,170, 92,115, 2, 13,168,180,169, 1, 16, 73, 16, 68,226,209,163, 71,209,163, 71, 15, 28, 61,122, 20,163, 70,141, 74,116, 20, + 3, 73, 73, 73,232,223,191, 63,172, 22, 45,167,124,181, 84, 42,213,199,139, 22, 45, 58, 63,113,226, 68,113,185,198,128, 36,225, +229,229,133,145, 35, 71,150,234,116,186,143,157, 77, 40,195, 48,224,112, 56,200,202,202,194,150, 45, 91,176,116,233, 82,180,108, +217, 18,102,179,249, 17,177,101,109,247,156,106,252,104,154,198,213,171, 87,177,115,199, 14,124,186,112, 33, 60, 60, 60, 0, 0, + 38,147, 9,138,226, 98, 8,133, 66,187, 24,171, 65, 56,237,185,115,231,206,220,208,208,208,114, 83,134,182,191,214, 54, 11, 22, +139, 5, 52, 77,163,180,180, 20,171, 87,175,166, 89,150,221, 83, 83,255, 99, 19, 69,115,231,206,133,193,240,143, 65,189,163,213, + 39, 57, 60, 60, 28,157, 58,117,178,159,147, 36,201, 58,203,249, 67,239,246,208, 59,220,221,122,209, 74, 0, 64,104,104, 40, 90, +183,110,141,224,224,224, 42, 57,235, 91,139,212, 6, 46, 68,134,175, 90,104, 61,142,157,178,185, 60,225,160,230, 45, 90, 17, 15, +115, 21,224,112, 56,144,120,250,161,247,203,243, 64, 81, 36,164, 94,126, 32, 24,253, 63,138,152,164,192,161, 56, 80,104,244, 8, +111,214,130, 20, 8, 69,131,116, 53, 8, 45,153, 39,119,253,252, 9,189,133, 69,116, 22, 68, 77,132, 96,108,221,105, 8, 31,164, +175, 6, 31,140,104, 41,138, 58,116,115, 61, 84,230,193,206,164,151,162,105, 4, 80, 20, 76, 44,139,191,230,206, 69,100, 76, 12, + 18,109,194, 48, 38, 6,137, 81, 81,240,225,114, 33, 32, 73,176,102,243, 35,115,250,206, 8, 45, 0,200,204,204,196,190,125,251, +124,198,141, 27,119, 32, 41, 41,105,162,139, 98,195,198,229,119,249,242,229,128,102,205,154, 85,121,207,223,127,255,141,174, 93, +187,186, 60, 61,197,231,243, 71, 12, 30, 60,120,247,190,125,251, 60,147,147,147, 17, 16, 16, 80,103,161, 37, 16, 8,250, 15, 29, + 58,116,247,246,237,219,101,133,133,133,136,137,137,145,189,248,226,139,187, 18, 18, 18, 94, 54, 24, 12,206,136,205,114, 34, 43, + 38, 38, 70,185,101,203,150, 31, 80,126,138, 48,119,203,150, 45, 63,118,235,214,237,173,168,168, 40, 47, 0,111, 90,125, 7,170, + 21, 91, 2,129, 96, 96,243,230,205,203,141,106, 5,130, 50, 99,147, 68, 34,129,167,167, 39,120, 60, 30, 12, 6, 3, 34, 35, 35, + 9, 62,159,223,215,153,103,246,240,240, 24,250,202, 43,175,144,241,241,241,200,203,203,131,151,151, 23,164, 82, 41, 24,134,193, +140, 25, 51,168,213,171, 87, 15,212,233, 92,155,225,106,220,184,241,152, 33, 67,134,112,110,221,186,133,251,247,239,195, 96, 48, + 32, 45, 45, 13, 50,153, 12,147, 39, 79,230,173, 88,177,226,197,236,236,108, 87,133, 86,251,168,168,168,124, 71,145,101,131, 68, + 34, 33, 90,181,106,165,240,245,245,237, 2,192, 21,161,213,254,237,183,223, 46, 88,182,108, 89,255,211,167, 79,219,131, 94,158, + 62,125,122, 1, 0,124,251,237,183,231,253,253,253,187, 0,112, 86,104,129,101, 89,203,127,254,243,159, 12, 62,159, 15, 46,151, + 11, 62,159, 95,238,224,241,120, 32, 73,210,195, 86,157,107,226, 75,185,159,183,124,198,130,149, 43, 37, 66,138,251,222,203, 29, +208,196,139, 7,136,124,192,235,255, 17, 8,175, 50,163, 37,171,248, 27,248,253, 35,172,122, 69, 65, 70,253, 84,250,155,137,241, +246,191, 87, 92,172,121,194,125, 64, 55, 0,255,139,178,205,117, 23, 2,184,252,148,244, 77,215, 1, 68,142, 26, 53,202, 46,182, +142, 31, 63,142, 17, 35, 70, 64,169, 84,226,214,173, 91,142, 34,203,149, 13,150,175,155,205,230, 27, 63,255,252,115,239,113,227, +198, 17, 14,245, 11,201,201,201,184,125,251,118,162,179,124, 36, 73,194, 98,177,128,203,229, 98,229,202,149, 48,153, 76,248,233, +167,159,176,119,239, 94,144, 36, 9,130, 32, 64, 16, 4,100, 50, 25,190,251,238, 59,151,218, 61,134, 97,176,109,219, 54,124,180, + 96,129, 93,100, 89,103, 50, 16, 20, 24, 8, 95, 63, 63,220,187,119,175, 70,161, 85, 92, 92,252,197,225,195,135, 81,157, 51,252, +225,195,135,237,159, 43, 56,195,215,220,207, 81, 20, 12, 6, 3,158,127,254,159,173, 98,223,126,251,109,251,103,133, 66, 1,138, +162,108,121, 65, 56,203,169,103,129,151,133,255,124, 55,242,131, 15,202, 89,232,170,226,124, 28, 90,196, 93,214,173, 74,196, 86, +164,213, 58, 27, 12, 96, 20,202,124,180,114,129,199,232,163,197,178,150, 54,161,141, 66,112,227,110, 18, 56, 20, 5,190,167, 31, + 60,125, 2, 97,161,141, 80, 21,220, 71,236,254,239, 1, 0,155,182,237, 1, 73,146,224,112, 40, 24,140, 12, 90, 54, 9,129,197, + 98,105, 83, 29,119, 91,160,247,192, 64,191, 30,141,195,188,136, 91,222,247,209, 42,192,183,194, 68,136, 0, 45,115,164, 68, 47, +169,168,123,177, 74,221, 59, 5,184, 80,163, 24, 32, 73,144, 4, 1, 49,143, 7,195,190,125,101, 94,155, 49,101,125, 86, 98, 84, + 20,200,223,126,131,135, 64, 0,138, 32,192,177,154,160,107, 3,181, 90, 13,130, 32,176,115,231, 78,239,201,147, 39,239,186,117, +235, 86, 84,105,105,233, 62, 87, 56,148, 74,229,168, 62,125,250,156,221,182,109,155,127, 80, 80,208, 35,215,243,242,242, 48,117, +234,212, 66,165, 82,233, 82, 80, 55,161, 80,248,218,152, 49, 99, 54,111,221,186, 85,118,231,206, 29,104,181, 90,248,251,251,215, +181, 40,116,233,217,179,231,129,125,251,246,121,230,229,229, 65,165, 82,193, 96, 48, 96,231,206,157, 94, 35, 71,142,220,151,154, +154, 58, 2, 64, 66, 13, 28,159, 57,138,172, 89,179,102,221, 4, 16, 0, 96,125, 69, 13,106,189,214,193, 65,108,169, 0,172,168, +102, 36, 26, 38,145, 72, 80, 80, 80,128,169, 83,167, 34, 61,253, 31, 3,104, 72, 72,136,125,164,119,239,222, 61,248,251,251,131, + 32,136, 0,103, 30,218,223,223, 95,106, 52, 26, 49,125,250,116,100,102,102,150,227,204,202,202, 2, 65, 16, 98, 87, 51, 50, 48, + 48, 48, 80,175,215,163, 95,191,126, 40, 45, 45,219,215,119,252,248,241,224,114,185, 40, 40, 40, 0,151,203,245,171,197,251,241, + 27, 53,106, 84,149,161, 85,100, 50,153,201,219,219,187,173,139,156,190, 47,190,248, 98,118, 76, 76,204, 35, 11, 91,174, 92,185, +242,146,143,143,207,105, 31, 31,159, 86, 46,114, 90, 28, 69, 21,143,199, 43, 39,180,184, 92, 46, 72,146,116,218, 71, 45,189, 64, +183,142, 67,228,118, 90, 54,103,216,212, 38, 1,158, 96,181,249,224, 13,254, 2, 55, 10, 69, 88,185,250, 24, 0,224,195, 55,186, +162,227,208,197, 48,110, 29,134,185,189, 40,254,164, 44,195,124, 0,159, 61,225, 54,255, 27, 0,182, 85,112, 27, 0,116,122,138, +250, 35,187,216, 58,126,252, 56, 34, 34, 34, 80, 92, 92,140,212,212,212,218,138, 44, 91,123,247,209,151, 95,126,249,251,171,175, +190, 42,177, 13, 90, 69, 34, 17,222,127,255,125,189, 86,171,253,200,165, 66,100,177,128,195,225,216, 7,201, 66,161, 16,145,145, +145,118,145, 69, 16, 4, 74, 74, 74,192,225,112,108, 43, 18, 9, 39,211,136,224,160, 32,120,120,120,160, 69,203,150,184, 99,109, + 71,108,159, 5, 2, 1, 8,130, 0, 77,215,104,200,211, 88,157,218,231,185,187, 75,182,137,162,106, 77,199, 33, 33,176, 88, 44, + 54,145,201,186,131,211,207,207, 15, 90,173,214, 89,206,167, 18, 85, 88,180,108, 66,107, 20,202,124,181, 30, 9,239, 48, 0, 64, + 44,234,113, 73, 37, 1,150,176,176, 44, 56, 20,105,157,187,165, 64, 81, 36, 20,133,185, 88,243,197,155, 86,145,181, 23, 71,207, +167, 34,180,121,196, 63,243,184, 4, 1,176,213, 23,110,127, 79, 94,204,236, 87,123,138,242,137, 92,120,133,136, 33, 20, 86,208, +143,222, 60, 16,225, 36,230, 12, 12, 21, 95, 61, 92, 26,147,162, 50,213,216, 81, 8, 73,178,204,249,157, 32, 42,117,238, 33,173, +215, 40,130, 0,203,178, 96, 45,174,249, 29,219,132,188, 72, 36,130,201,100, 2, 69, 81, 88,187,118,173,215,208,161, 67,215,187, + 42,180, 0, 36,231,231,231,143,156, 49, 99,198,241, 61,123,246,248,249,249,249,149, 27, 61,204,152, 49, 67,158,159,159, 63, 18, + 46, 58,221,115,185,220,245, 27, 54,108,144, 61,120,240, 0, 37, 37, 37, 16,137, 68,246,198,167,182,229,179,123,247,238, 39, 79, +156, 56,225,173, 82,169, 96, 50,153, 32, 18,137,192,178, 44, 40,138,194, 47,191,252,226, 59,122,244,232, 99, 15, 31, 62, 28, 92, + 93, 90, 69, 34,209,203, 86,225,132,168,168, 40,175,168,168,168, 1, 64,149,145,122,237,136,138,138,242,154, 55,111,222,139,122, +189,126, 69, 53,207,156,169, 80, 40,130, 68, 34, 17,246,239,223, 15,169, 84, 10,177, 88,140,144,144, 16, 40, 20, 10,136,197, 98, +176, 44, 11,179,217,108,107, 44,138,156,121,240,194,194, 66, 45, 77,211,158,199,143, 31, 71, 81,209, 63, 63,105,210,164, 9,148, + 74, 37, 44, 22, 75,137,171,153,153,147,147,147, 79, 16, 68,227, 27, 55,110,224,193,131, 7, 24, 49, 98, 4,126,251,237, 55,116, +237, 90, 54, 59,108, 52, 26,107, 19,196,143,161, 40,138,173,166,220, 18, 0,188,221,201,105,237,188, 92,226,180, 88, 44, 22,155, +200,114,252,235, 40,190,106,248,159,229,170,115,219, 64,233,150,101,179,135, 76, 29, 22,225, 7,125,225,125, 8, 61,252, 64,120, +133, 99,229,234, 99,184,245,119,217,251, 90,185,235, 26,118, 71,143, 4, 68, 62,104,237, 41, 71,144, 7,231,149,219, 5, 79, 92, +104,121, 58,142, 19,158,214,142,105,196,136, 17, 80, 40, 20,144, 74,165,238,240,207,185,168,215,235,211, 14, 30, 60,216,101,212, +168, 81,224,243,249, 72, 75, 75, 67, 66, 66, 66, 42,128,139,174, 10, 45, 46,151,139, 47,191,252, 18,111,190,249, 38, 2, 3, 3, +241,209, 71, 31,129,195,225,216, 15,130, 32,236, 22, 46, 87, 16, 16, 88,253,194, 71,155, 67,124, 77,198,112, 79, 79,207, 47, 73, +146, 28, 71, 57,145,113, 12,195, 48, 22,139,101,143, 74,165,170, 54,188,131,205,113,221,153,119,225,152, 7, 53,244,105,117,230, +124, 28, 90,164, 54,168,184,218,176, 10,139,150,109,213,225, 35, 91, 1,217,158, 50,214,106,178,139,173,175,132, 18, 36,117, 59, + 43, 59, 7,190,222, 82,171,200,178, 30, 36,137,142, 17,101,131,217,163,231, 83, 17,218, 44, 2, 28,138, 2,135,162, 32, 21, 9, +144,159,151, 11, 14,135,188, 93, 21,111,123, 10,175,190,218,170,113,184,183, 47, 23,114,127, 35,130, 3,171, 48, 12,116,241, 64, +104, 48, 31,195,125,133, 97,237, 41,188, 90,189,245,141,181, 11, 45, 19, 77,131,247,218,107,246,233,194,196,168, 40, 68,198,196, +128, 25, 51, 6, 58,147,169,156,169,184,182, 66, 75, 36, 18, 65,163,209, 96,226,196,137, 10,179,217,252, 86, 45,179, 56,161,168, +168,104,236,164, 73,147,138,108, 2,198,100, 50, 97,210,164, 73, 69, 69, 69, 69, 99,157,176, 18, 61, 2,179,217,252, 86,215,174, + 93, 21,114,185,220,158,206,218, 52, 56, 54,248,248,248, 28,221,178,101,139,143,193, 96, 0, 77,211,118, 78,145, 72, 4,138,162, +224,239,239,143,221,187,119,251,251,248,248, 84,187,103,149, 94,175, 63, 24, 19, 19,163, 4,128,152,152, 24, 37, 65, 16,113, 4, + 65,108, 36, 8, 98, 67,133, 99, 35, 65, 16,113,142,247,234,245,250, 3,213,113, 27,141,198,184,212,212, 84, 86, 44, 22,131,162, + 40,152, 76, 38, 8,133, 66,187, 73, 92,173, 86, 67,175, 47,155,230, 78, 72, 72,128,217,108,142,119,230,217, 53, 26,205,153,109, +219,182, 89,154, 52,105,130,136,136, 8, 68, 70, 70,162,103,207,158, 8, 11, 11,195, 87, 95,125,197,232,116, 58,151,235, 94, 78, + 78,206,209, 95,127,253,213,220,184,113, 99,116,233,210, 5, 2,129, 0, 29, 59,118, 68, 72, 72, 8,150, 46, 93,106, 84,169, 84, +199,107,241,154, 30, 38, 37, 37, 81,213,136, 92, 25,156, 88,189, 91, 1,153, 87,175, 94,165,122,246,236,121,168,226,133,238,221, +187, 31,146, 74,165,158, 54, 19,187, 43, 35,114, 71,113, 37, 16, 8,236,135,237,123, 14,135,227,204,232,135,108, 27, 40,221,242, +245,155,131,166, 14,139,240,198,161, 51,151,193, 51, 41, 1, 99, 53, 51,130,140, 25, 4, 79,130, 64, 79,110,232, 83,208, 7,204, + 5,112, 19,101,113,152, 62,194,211, 5,187,227,123, 81, 81, 17, 82, 83, 83,145,144,144,128,158, 61,123, 34, 62, 62, 30,248,199, + 65,222,101,168, 84,170,143,162,163,163,117,182,149,124, 11, 23, 46,212,107, 52,154,143, 92,109,131, 89,150, 5,151,203, 69,235, +214,173, 49,111,222, 60, 28, 59,118, 12,105,105,105, 48,155,205,118, 33,100,243,201,116,197,162,197,227,241, 16, 24, 24, 8,179, +217,108,183,102, 1,192,157,244,116,112, 56, 28, 88, 44, 22, 24,141,198, 26, 45, 90,158,158,158, 95,110,222,188,249, 93,185, 92, + 30, 92, 88, 88, 24,224,120,228,231,231, 7,228,230,230, 6,100,103,103, 7,100,102,102, 6,100,100,100, 4,220,191,127, 63,120, +249,242,229,239,122,122,122,126,233, 76, 58, 41,138, 66,199,142, 29,241,246,219,111,219,143,117,235,214,217,143,216,216, 88,151, +157,215, 41,138, 66,235, 69, 43, 49,178,144,181, 31,199,252, 9,251,113,235,195, 89,213,113,214,187, 22,169,149,126,177,174, 54, +116,220, 88,186, 18,216, 86, 29,218,218, 50,187,219, 70, 69,103,248,122, 3,109, 44, 61,251,247,221,244, 65,173,219,119, 35,243, +228,218,114,203, 63, 35, 7,142, 5, 65, 16,104,212, 44, 2, 20,135, 3,138, 34,193,161, 40,120,201,132, 72,189,113,195, 98,208, +235,207, 86,198, 57, 0,224,240, 69,252,117,111, 12,239, 40,204,225, 23,192, 63, 88, 2, 30,183, 76, 59,178,127,143,173,208, 67, +112,128,246, 30,152,150,237, 43, 58,155, 95,186,206, 91,103, 58, 20,187, 59, 11,174, 0, 0, 12, 83, 73, 68, 65, 84, 87,197, 8, +208, 98,177, 64, 42, 16,160,212, 96,128,158,166, 49,112,205, 26,251,116, 33, 73, 16,184, 14,160,195,154, 53,184,176,111, 31,100, +124, 62, 32, 16, 56,189, 42,164, 50,161, 37,151,203, 49,101,202,148,162,220,220,220,201,181,241,209,178,193, 96, 48,156,203,203, +203,155, 60,118,236,216,157,251,247,239,247, 25, 59,118,172, 34, 47, 47,111,178,147,126, 79,143,160,180,180,116, 95,102,102,102, +201,148, 41, 83,118,236,218,181,203,215,207,207,207, 62, 18,169, 85, 97, 37, 8,249,144, 33, 67, 4,206,220, 87,195, 45,209, 86, +231,246, 55,173,150,173, 14,179,102,205,186,128, 50,255, 43, 71, 44,218,180,105,211,120,135, 41,198,141, 0,214, 84, 71,172, 86, +171, 55,204,155, 55,239,191,231,206,157,243, 19, 10,133, 32, 8, 2, 60, 30, 15, 45, 90,180,176,175,162,225,114,185, 96, 89, 22, + 31,124,240,129,188,160,160,224, 91, 39,223,205,172,232,232,232,254,165,165,165,222, 83,166, 76,161,132, 66, 33,242,243,243,177, +122,245,106,102,235,214,173, 74,157, 78, 55,181, 22, 66,120,219,231,159,127, 62, 80,171,213, 54,155, 49, 99, 6, 79,165, 82, 65, +175,215, 99,254,252,249,198, 31,127,252, 49, 75,175,215,187, 28,240,183, 87,175, 94,119, 51, 50, 50,250,150,148,148, 20,139,197, +226,138,214, 62, 66, 34,145,116, 3,176,195, 21,206,200,200,200,123, 15, 31, 62,236,185,120,241,226, 56,179,217,204,189,114,229, +138,221, 25,126,237,218,181,177, 66,161,112, 8, 92,220,124,149, 32, 8,139, 64, 32, 40,103,193,170,248,153,195,225,212,216,166, +181, 9, 18, 47,254,122,102,255,169,207,183,245,196,193, 51,215, 16,125,224,239,219, 45,167,250,183,126,206,187, 16,150,194, 84, +124,248, 70, 87,172,220,117, 13, 64,217,212,161,165,224, 22,216,226,123, 96, 61, 26,227,190, 66,158,243, 20,244, 1,177, 40, 11, +153,241,180,161,156,200,186,117,235, 22, 6, 13, 26, 4, 0,136,143,143, 71,159, 62,125, 16, 31, 31,143,190,125,251,186, 28, 75, +203,138, 63,212,106,117, 70,108,108,108,187,198,141, 27,227,226,197,139,247, 1,252,225,106, 34,109, 66,139,195,225,224,245,215, + 95,199,208,161, 67,209,164, 73,147,114,171, 13,109,159, 93, 17, 27, 52, 77,163,125,251,246, 48, 24,141,224,241,120,246,169, 73, + 14,135, 3,255,128, 0,220,189,123,215, 41,139, 22, 73,146,227, 94,126,249,101, 50, 57, 57, 25, 19, 38, 76,192,206,157, 59,171, +188,119,210,164, 73,248,249,231,159,241,242,203, 47,147,159,124,242, 73,181,225, 29,108, 78,232,206, 60,147,173,159,174,169,221, +119, 23,103,125,107,145,186,192, 33,180, 67,165,147, 38,149,124, 23, 83, 78,104, 57, 4, 9,171, 31,161, 69,155,118,254,246,211, +247,243,122,174,239,235, 31, 28,224, 9,133, 74,111, 23, 91,137,177,123, 1, 0,175,206, 90, 2, 14, 85, 54,165, 40,147, 10, 33, +226, 81,216,183,253, 91,185,201, 84, 90,105,233,210,112,201, 55, 63,233,221,194,147, 47, 49, 67, 29,196, 34,194,255,159,157,114, +136,102,123, 31, 21, 92,157,189,225,119,171, 24,111, 60, 39,149,125,155,172,124, 19,102,203,186, 71, 58, 68,165, 82,175,188,113, + 67, 52, 98,243,102, 92,153, 60, 25,141, 24, 6,113, 33, 33,240,225,114,225, 41, 16,128, 36, 8,232,143, 28,193,133,253,251, 17, + 40, 16, 0, 30, 30,160,191,250, 10,134,212, 84,152, 53, 26,125, 45, 70,102, 24, 63,126,188, 92, 46,151,143, 53, 26,141,231,234, +154,207,122,189,254, 68,102,102,230,155,189,122,245, 90,111, 54,155,223,210,235,245,117, 90, 25,101, 52, 26, 79,228,229,229,189, + 54,126,252,248,189, 7, 14, 28,240,243,242,242,170, 53, 87, 81, 81, 81, 87, 55, 21, 39, 11,128, 79,173,206,237,111, 70, 69, 69, +121, 93,189,122,245,191, 91,182,108, 89,239, 48,154, 8,152, 62,125,250,204, 10, 34,171,198, 85,135, 0, 30, 22, 20, 20,124,245, +254,251,239, 47, 89,181,106,149,212,230,248,254,215, 95,127,129,166,105,112,185, 92, 48, 12,131,233,211,167,107,139,138,138, 86, +162,234,136,206,143, 20, 45,181, 90,221, 98,241,226,197, 91,214,172, 89, 51,148,162, 40, 9,195, 48,186,146,146,146,184,210,210, +210,169,168, 93, 28, 45, 75, 97, 97,225,148,207, 62,251,108,202,234,213,171, 95, 38, 73, 50,128,166,105,185, 70,163, 57,172,215, +235,127, 68, 45,166,146, 46, 94,188, 88,248,198, 27,111,252, 93, 88, 88,216, 38, 52, 52, 84, 37,149, 74,141, 70,163,145, 18,137, + 68, 50,137, 68, 18, 9,224, 34, 65, 16, 41,174,112, 38, 38, 38,230,205,152, 49,227,129,193, 96,104,189,113,227,198,243, 50,153, +236, 12, 65, 16, 4,143,199,243, 22,137, 68,131, 0,196, 17, 4,113,199, 21, 78,146, 36, 45,142,214,171,138,254, 89,124, 62,223, + 41, 31,173,102,254,226,105, 67, 91,112,112,240,236, 53, 68, 31,124,184,141, 97,217,253,251, 19,139,143,124,212, 7, 48,237,121, + 3, 29,199,238, 40,155, 46, 4, 96, 41,184, 5,211,158, 73, 32,196,126, 56,159,205,133, 74,111, 58,138, 6, 84, 6,123,120, 7, +185, 92,142,228,228,100,155,200,138, 4,128,190,125,251, 38,218,196, 86, 66, 66, 2,186,116,233,146, 8,128,235,106,121, 85,171, +213,239, 79,156, 56,241,132,117,112,252,126, 45, 6,126,118,161,101, 19, 84, 77,154, 52,177,159, 59, 30, 14, 62, 90, 78,129, 97, + 24,240,120, 60,112, 56, 28, 4,135,132,216,255, 23,203,178,184,123,247, 46, 20, 10,133, 83, 66,139,162, 40,138, 32, 8, 76,152, +224,220,130,228,255,252,231, 63,136,139,139, 3,229,164, 42,164, 40, 10,225,225,225, 53,222, 99,211,165,206,114,134,134,134,214, +154,179,190,181, 72,109, 5, 86,101,159, 43, 19, 85, 85, 85,136,199,133, 28,173, 86,245,233,246,205,107, 87, 77,159,253,129,244, +214,189,124,168,180, 6, 80, 20,233,216,120,130,195,161, 32,147, 8,209, 56,200, 19,187,126,248, 95,141, 70,173,252, 12, 85,236, +123,216,196,131, 55,107, 72,183,231, 4,188, 96, 29, 90,119, 24, 15, 74,248,143, 8, 96,243,170,152, 29,236,243, 59, 94,120,168, + 19,254,246, 80, 55,235,122,177,241, 81,161,101, 52, 14, 91, 56,124,248,201,232, 99,199,196,221,183,109,195,189,233,211, 17,162, +215, 67, 96,157, 74, 36, 9, 2, 82, 30, 15, 82, 30,175, 76,100,173, 94, 13, 61, 77, 99,205,228,201, 37, 6,163,113,184, 43,149, +188,168,168, 8, 99,198,140, 41,204,201,201, 25,137, 90, 76,237, 85, 5,157, 78,183, 15,192, 62,119,241, 25, 12,134,115, 89, 89, + 89, 47,140, 25, 51,230,216,137, 19, 39,252,159,146, 32,115, 54,177,101,186,122,245,234,204,243,231,207,223, 67,249,141, 69,149, +231,207,159,191, 55, 99,198, 12, 98,203,150, 45, 63, 2,248, 28, 78, 6,240,212,233,116,107, 79,157, 58,133,254,253,251,127,190, +108,217, 50,223,174, 93,187, 34, 32, 32, 0, 26,141, 6, 9, 9, 9,152, 59,119,174, 66,173, 86, 47, 83, 42,149,171, 92, 76,179, +201, 96, 48, 76,114, 92, 74,237,142,124, 48, 24, 12, 91,115,115,115,183,186,139,112,206,156, 57,127,221,189,123,183,200,223,223, +191, 7,143,199,235,128, 50, 63,160, 60, 0, 63,186, 42,136,108,152, 61,123,246,141,187,119,239,202, 27, 53,106,212,211,202,233, +133,178,109,140, 54,215,130, 51,231,218,181,107,161,221,186,117, 35,185, 92, 46, 75, 81, 20,184, 92, 46,203,225,112, 88,171, 95, + 13, 11, 0,135, 15, 31, 22, 0,168,118,219,156,123, 5,250,197,147,254,247,207, 79, 82,242, 74,247,167,230,151,204, 3,192,238, +185, 37,254,189,163, 63, 53,108, 88,171, 44, 24, 98,250,130,144,149, 5,170,100,181,185, 32, 36,129,200,178, 52,194,162, 67,183, +243,104, 16, 43, 26, 52, 85,229,227,106, 88,195, 59,228,230,230, 58,138, 44,155,213, 42,178,111,223,190,137, 86,145,101,187, 86, + 27,255,178,211, 22,139,165, 78,125, 24,203,178,136,142,142,198,166, 77,155, 80, 83, 68,115,235,234, 62,162, 38, 62,155, 69,139, + 97, 24,152, 76, 38,220,186,117,203, 30,179,203, 54, 93,104, 11,237, 64,211,116,181,171,213, 25,134, 97,140, 70, 35,126,249,229, + 23,167,196,214,238,221,187, 81, 90, 90, 10,166, 6, 5,231, 24,138,161, 83,167, 78, 80, 40, 20,246,197, 62,145,145,255,132,202, + 51,153, 76, 46, 9, 87, 27,103,235,214,173, 33,151,203, 97,243, 23,110, 60,249, 31, 99, 15,173,211,253, 91,203,125,149, 22,173, +199,222, 99, 10,196,178, 19, 93,123, 15,237, 51,121,230, 92,137,214,192,224,193,131, 12, 20, 22,228,130, 36, 72, 4, 55, 10, 69, + 88, 88, 56, 68,124, 18, 59, 99, 86,233, 18, 47,156,249, 83,171, 41, 30, 81, 21,215, 40, 79,222,133,213,175,245,233,217,188,185, + 7, 1,218, 12, 48,102,128, 54, 3, 22,235, 95,219,119,150,242,101, 46, 57, 89,201,126,114, 93,113,233,168,202, 84,233,158, 85, + 99,129, 62, 94, 62, 62, 39, 23, 29, 62, 44,182,152, 76, 40,122,255,125,136,105, 26, 66,235,168,164,236, 65, 4,160,191,250,170, + 76,100, 77,154, 84,162, 82, 42, 93,218,130,199,207,207,239, 26, 65, 16,126,133,133,133,207, 84,100,120,127,127,255,163, 44,203, +202,229,114,121,215,167, 40, 93, 1, 0,148, 0, 76,149, 12, 36,252,225,186,255,143, 13,225,254,254,254,159,144, 36,217,139,101, + 89, 95,146, 36,139, 45, 22,203,197,130,130,130,229, 0,238, 54,244,167, 79, 12,182,200,240, 77,107,184,175, 0,192,123, 40,115, + 10,126,224, 44,121, 71, 79, 79, 79, 3,223,124,224,165, 8,193,192,113,145,158,104, 22,228, 1, 46, 79,136, 28, 53,141,211, 41, +106,108,142,205,203,212,155,153,209,233,133, 37, 73, 13,175,162, 90,184,125, 11, 30,119,194,199,199,231,242,201,147, 39,187, 54, +107,214,140,116,116,120,183,197,202,179, 77,111,113, 56,101, 90,238,220,185,115,244,132, 9, 19, 46,230,231,231,247,175,138,211, +195,195,227,247,155, 55,111, 62,175, 82,169, 30, 17, 84,142,145,226,109,231, 58,157, 14,179,103,207, 62, 85,213, 22, 60,158,158, +158,171, 87,173, 90,245,238,171,175,190, 74,218,194, 81, 56, 30,182,237,130,108,135,201,100,194,142, 29, 59, 44,223,126,251,237, +119, 42,149,170,202,169,195,224,224,224,204,156,156,156, 80, 91,168, 5,103,130,138,134,135,135,231,102,100,100,132, 60, 78,206, +103, 88,112,149,179,110, 61, 17,211, 4, 87, 36,154,227, 33,245,254,226,213,137,111,251,134, 55,111, 73, 4, 6, 55, 2, 1, 18, +249,121,217,200,248, 59,157, 61,240,211,247, 69, 58,181,226, 75,189, 94,247,125,117, 60,109,129,230, 77,101,188, 61,124, 6,173, + 96, 19, 64, 21,246,167,122,100,196, 1,192,196, 37,111, 63,208,152,199,167, 84, 51,237, 99, 19, 91,159, 30, 56, 32,230,183,106, +245, 72,160, 56,139,197, 2, 67,106, 42,214, 76,158,236,178,200,106, 64, 3, 26,224, 22, 52, 67,205, 49,178,204, 40,139,207,229, +170,197,132,104, 29, 32, 25,207, 2,227, 72, 88,218,147, 4,193,167, 89,164,129,197,239, 98, 78,201,250,196, 92,232, 27,178,223, + 41, 60,181,155, 74, 3,144,248,248,248,156,161, 40, 42,204,102,145,113,180,214, 87,178,161,244,131,252,252,252, 33, 0,170, 91, + 33,220,220,195,195,227,123,134, 97,186, 59,179,169, 52, 69, 81, 87, 52, 26,205, 28, 84,179,169,116,125,172, 58,244,245,245,189, +155,145,145,209,220,182,138,218,177,175,172,108,101,249,157, 59,119, 48, 96,192,128,140,188,188,188,240,199,201,249,180,162,138, + 85,135, 79,143, 69,203, 1, 33, 60,129,116, 10, 95, 36, 28,108, 49,211,173, 65, 0, 28, 46,247,182,177, 84,127,214,160,215,110, + 71, 21,211,133,143, 19, 99,129, 62, 2, 62,255,119,158, 76, 38,170, 76,180,153, 53, 26,189,193,104, 28,214, 32,178, 26,208,128, + 6, 52,160, 1,207, 16, 90,249,248,248,156,228,114,185, 2, 71, 49, 89,241,179, 13, 52, 77,151, 22, 22, 22,142, 0,144,246,152, + 57,255,127,194, 69, 39,181,161,206,114, 90,143, 1, 79, 59,103, 61, 62, 59,235, 70,206, 1, 86,206, 69,207, 72, 58, 7, 60,173, +156,182,231,117,129,119,168, 43,229,200, 93,249,233,144, 78,214,221,233,172, 47, 78,119,213,163, 74,210,201,214,195,123, 95,244, +140,164,115,192,211,198, 89,177,252, 56,201,235, 18,167,147,101,202,213,116,178,238, 78,103,125,113,214,181, 30, 85,147, 78,182, +174,101,169,138,119,191, 8,207, 32,146, 59,131, 77,238, 12,246, 86,151, 74,227, 54, 70, 85,245, 59,151, 28, 9,235,107, 37,128, + 45,236,190,149,159,120, 90, 57, 29,243,193,157, 91, 5,212,195,182, 3,177,238,230,172,144,159,238,194, 34,235, 10,147, 56, 56, + 17,112,212,149,103,119,199,123,175,240,172,110,225,173,133,200,114,137,211, 93,229,190,190, 57,221, 85,151, 42,114,186,163,220, + 87,246,222,235,241, 29,185, 43,157,110,169, 75,245, 81,230, 43, 41, 63,117,230,173,200,233,142,186, 84,145,211, 29,229,254,113, +112,186,163, 46, 85,198,233,142,114, 95,213,187,127, 86, 13, 77,182,233, 66,107,136, 7,194, 9,177, 21, 3, 0,100,109, 50,173, + 30, 45,101, 3,221,205,233,238, 52,215,135,216,116,193, 2,243,196, 57,221,252,142, 22, 89, 57,221, 57,186, 25,232,174,119, 84, + 31,229,221,145,211, 93,252, 21,121,220,241,158, 42,227,172,107,122,171, 72,167,219,159,189,174,229,254,113,113,186,249, 29,185, +165, 46, 85,224, 28,232,230,193,192, 64,135,243, 69,238,228,116, 87, 93,170, 36,157,117,126, 79,149,113,214, 53,189, 85,164,211, +237,207,238,142, 62,164,190,120,159,164, 69,139, 37,171, 44, 19, 49, 21,142,199, 34, 52,158,216,148,156,139,220,255, 42, 78, 23, +167,103,134,214,195,187,127,162,233,116, 39,103,197, 52,186,115,186,167, 62,211,233, 78, 78, 23,210,250,175,227,124,214,222,251, +211,152,159, 85,241,213,101, 90,170, 42,235,104,125,164,211,157,156, 78,114,255, 43, 56,235,240,238,255,117,224, 60, 45, 9,177, +101,188,155, 71, 38,112,179, 5,166,222,158,219,205,233, 28, 88, 31, 22,194,122,128,219,211,105, 29, 41,127, 81, 15,207,254,172, +228,105, 67, 93,106,168, 75, 79, 93, 93,170, 80, 38, 7,186,209, 82,228, 86,203,115, 69, 78,119,252, 15, 71, 14,119,149,209,250, +126,118,119,214,165,250,120,247,207, 26,254, 15,219, 91,208, 7,192,137,204,236, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, 0}; diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 25e20909f34..dc1c20dcca5 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -589,8 +589,9 @@ DEF_ICON(MOD_MULTIRES) DEF_ICON(MOD_SMOKE) DEF_ICON(MOD_SOLIDIFY) DEF_ICON(MOD_SCREW) +DEF_ICON(MOD_WEIGHTVG) #ifndef DEF_ICON_BLANK_SKIP - DEF_ICON(BLANK160) +/* DEF_ICON(BLANK160)*/ DEF_ICON(BLANK161) DEF_ICON(BLANK162) DEF_ICON(BLANK163) diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 93dc96cf9c0..d39a8fe4a87 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -4424,6 +4424,10 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto UI_icon_draw(x, y, ICON_MOD_SOLIDIFY); break; case eModifierType_Screw: UI_icon_draw(x, y, ICON_MOD_SCREW); break; + case eModifierType_WeightVGEdit: + case eModifierType_WeightVGMix: + case eModifierType_WeightVGProximity: + UI_icon_draw(x, y, ICON_MOD_WEIGHTVG); break; default: UI_icon_draw(x, y, ICON_DOT); break; } diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index d2d8e014015..2b1111e1308 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -71,6 +71,9 @@ typedef enum ModifierType { eModifierType_Solidify, eModifierType_Screw, eModifierType_Warp, + eModifierType_WeightVGEdit, + eModifierType_WeightVGMix, + eModifierType_WeightVGProximity, NUM_MODIFIER_TYPES } ModifierType; @@ -674,7 +677,6 @@ typedef struct ShrinkwrapModifierData { #define MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS (1<<2) #define MOD_SHRINKWRAP_PROJECT_OVER_NORMAL 0 /* projection over normal is used if no axis is selected */ - typedef struct SimpleDeformModifierData { ModifierData modifier; @@ -784,4 +786,167 @@ typedef enum { /* PROP_RANDOM not used */ } WarpModifierFalloff; +typedef struct WeightVGEditModifierData { + ModifierData modifier; + + /* XXX Note: I tried to keep everything logically ordered – provided the + * alignment constraints… + */ + + char defgrp_name[32]; /* Name of vertex group to edit. */ + + /* Flags (MOD_WVG_EDIT_MAP, MOD_WVG_EDIT_CMAP, MOD_WVG_EDIT_REVERSE_WEIGHTS, + * MOD_WVG_EDIT_ADD2VG, MOD_WVG_EDIT_REMFVG, MOD_WVG_EDIT_CLAMP). + */ + int edit_flags; + float default_weight; /* Weight for vertices not in vgroup. */ + + /* Mapping stuff. */ + float map_org_min, map_org_max; + float map_new_min, map_new_max; + struct CurveMapping *cmap_curve; /* The custom mapping curve! */ + + /* The add/remove vertices weight thresholds. */ + float add_threshold, rem_threshold; + + /* Clamping options. */ + float clamp_min_weight, clamp_max_weight; + + /* Masking options. */ + float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */ + /* Name of mask vertex group from which to get weight factors. */ + char mask_defgrp_name[32]; + + /* Texture masking. */ + int mask_tex_use_channel; /* Which channel to use as weightf. */ + struct Tex *mask_texture; /* The texture. */ + struct Object *mask_tex_map_obj; /* Name of the map object. */ + /* How to map the texture (using MOD_DISP_MAP_xxx constants). */ + int mask_tex_mapping; + char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */ + + /* Padding… */ + int pad_i1; +} WeightVGEditModifierData; + +/* WeightVGEdit flags. */ +/* Use parametric mapping. */ +#define MOD_WVG_EDIT_MAP (1 << 0) +/* Use curve mapping. */ +#define MOD_WVG_EDIT_CMAP (1 << 1) +/* Reverse weights (in the [0.0, 1.0] standard range). */ +#define MOD_WVG_EDIT_REVERSE_WEIGHTS (1 << 2) +/* Add vertices with higher weight than threshold to vgroup. */ +#define MOD_WVG_EDIT_ADD2VG (1 << 3) +/* Remove vertices with lower weight than threshold from vgroup. */ +#define MOD_WVG_EDIT_REMFVG (1 << 4) +/* Clamp weights. */ +#define MOD_WVG_EDIT_CLAMP (1 << 5) + +typedef struct WeightVGMixModifierData { + ModifierData modifier; + + /* XXX Note: I tried to keep everything logically ordered – provided the + * alignment constraints… + */ + + char defgrp_name[32]; /* Name of vertex group to modify/weight. */ + char defgrp_name2[32]; /* Name of other vertex group to mix in. */ + float default_weight; /* Default weight value for first vgroup. */ + float default_weight2; /* Default weight value to mix in. */ + char mix_mode; /* How second vgroup’s weights affect first ones */ + char mix_set; /* What vertices to affect. */ + + char pad_c1, pad_c2; + int pad_i1; + + /* Masking options. */ + float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */ + /* Name of mask vertex group from which to get weight factors. */ + char mask_defgrp_name[32]; + + /* Texture masking. */ + int mask_tex_use_channel; /* Which channel to use as weightf. */ + struct Tex *mask_texture; /* The texture. */ + struct Object *mask_tex_map_obj; /* Name of the map object. */ + int mask_tex_mapping; /* How to map the texture! */ + char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */ + + /* Padding… */ + int pad_i2; +} WeightVGMixModifierData; + +/* How second vgroup’s weights affect first ones. */ +#define MOD_WVG_MIX_SET 1 /* Second weights replace weights. */ +#define MOD_WVG_MIX_ADD 2 /* Second weights are added to weights. */ +#define MOD_WVG_MIX_SUB 3 /* Second weights are subtracted from weights. */ +#define MOD_WVG_MIX_MUL 4 /* Second weights are multiplied with weights. */ +#define MOD_WVG_MIX_DIV 5 /* Second weights divide weights. */ +#define MOD_WVG_MIX_DIF 6 /* Difference between second weights and weights. */ +#define MOD_WVG_MIX_AVG 7 /* Average of both weights. */ + +/* What vertices to affect. */ +#define MOD_WVG_SET_ALL 1 /* Affect all vertices. */ +#define MOD_WVG_SET_ORG 2 /* Affect only vertices in first vgroup. */ +#define MOD_WVG_SET_NEW 3 /* Affect only vertices in second vgroup. */ +#define MOD_WVG_SET_UNION 4 /* Affect only vertices in one vgroup or the other. */ +#define MOD_WVG_SET_INTER 5 /* Affect only vertices in both vgroups. */ + +typedef struct WeightVGProximityModifierData { + ModifierData modifier; + + /* XXX Note: I tried to keep everything logically ordered – provided the + * alignment constraints… + */ + + char defgrp_name[32]; /* Name of vertex group to modify/weight. */ + + /* Proximity modes. */ + int proximity_mode; + int proximity_flags; + + /* Target object from which to calculate vertices’ distances. */ + struct Object *proximity_ob_target; + + /* Masking options. */ + float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */ + /* Name of mask vertex group from which to get weight factors. */ + char mask_defgrp_name[32]; + + /* Texture masking. */ + int mask_tex_use_channel; /* Which channel to use as weightf. */ + struct Tex *mask_texture; /* The texture. */ + struct Object *mask_tex_map_obj; /* Name of the map object. */ + int mask_tex_mapping; /* How to map the texture! */ + char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */ + + /* Padding… */ + int pad_i2; +} WeightVGProximityModifierData; + +/* Modes of proximity weighting. */ +/* Dist from target object to affected object. */ +#define MOD_WVG_PROXIMITY_OBJ2OBJDIST 1 +/* Dist from target object to vertex. */ +#define MOD_WVG_PROXIMITY_OBJ2VERTDIST 2 + +/* Flags options for proximity weighting. */ +/* Use nearest vertices of target obj, in OVJ2VERTDIST mode. */ +#define MOD_WVG_PROXIMITY_O2VD_VERTS (1 << 0) +/* Use nearest edges of target obj, in OVJ2VERTDIST mode. */ +#define MOD_WVG_PROXIMITY_O2VD_EDGES (1 << 1) +/* Use nearest faces of target obj, in OVJ2VERTDIST mode. */ +#define MOD_WVG_PROXIMITY_O2VD_FACES (1 << 2) + +/* Defines common to all WeightVG modifiers. */ +/* Tex channel to be used as mask. */ +#define MOD_WVG_MASK_TEX_USE_INT 1 +#define MOD_WVG_MASK_TEX_USE_RED 2 +#define MOD_WVG_MASK_TEX_USE_GREEN 3 +#define MOD_WVG_MASK_TEX_USE_BLUE 4 +#define MOD_WVG_MASK_TEX_USE_HUE 5 +#define MOD_WVG_MASK_TEX_USE_SAT 6 +#define MOD_WVG_MASK_TEX_USE_VAL 7 +#define MOD_WVG_MASK_TEX_USE_ALPHA 8 + #endif diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 882fbce9271..f0e196686e0 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -562,6 +562,9 @@ extern StructRNA RNA_VoxelData; extern StructRNA RNA_VoxelDataTexture; extern StructRNA RNA_WarpModifier; extern StructRNA RNA_WaveModifier; +extern StructRNA RNA_WeightVGEditModifier; +extern StructRNA RNA_WeightVGMixModifier; +extern StructRNA RNA_WeightVGProximityModifier; extern StructRNA RNA_Window; extern StructRNA RNA_WindowManager; extern StructRNA RNA_WipeSequence; diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index d2c1b862fee..fff99cbdf15 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -68,6 +68,9 @@ EnumPropertyItem modifier_type_items[] ={ {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""}, {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""}, {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""}, + {eModifierType_WeightVGEdit, "WEIGHT_VGEDIT", ICON_MOD_WEIGHTVG, "Edit Vertex Group Weights", ""}, + {eModifierType_WeightVGMix, "WEIGHT_VGMIX", ICON_MOD_WEIGHTVG, "Mix Two Vertex Groups", ""}, + {eModifierType_WeightVGProximity, "WEIGHT_VGPROXIMITY", ICON_MOD_WEIGHTVG, "Weight Vertex Group - Poximity", ""}, {0, "", 0, "Deform", ""}, {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""}, {eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""}, @@ -183,6 +186,12 @@ static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr) return &RNA_ScrewModifier; case eModifierType_Warp: return &RNA_WarpModifier; + case eModifierType_WeightVGEdit: + return &RNA_WeightVGEditModifier; + case eModifierType_WeightVGMix: + return &RNA_WeightVGMixModifier; + case eModifierType_WeightVGProximity: + return &RNA_WeightVGProximityModifier; default: return &RNA_Modifier; } @@ -375,6 +384,46 @@ static void rna_SolidifyModifier_vgroup_set(PointerRNA *ptr, const char *value) rna_object_vgroup_name_set(ptr, value, smd->defgrp_name, sizeof(smd->defgrp_name)); } +static void rna_WeightVGModifier_vgroup_set(PointerRNA *ptr, const char *value) +{ + ModifierData *md = (ModifierData*)ptr->data; + if (md->type == eModifierType_WeightVGEdit) { + WeightVGEditModifierData *wmd= (WeightVGEditModifierData*)md; + rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name, sizeof(wmd->defgrp_name)); + } + else if (md->type == eModifierType_WeightVGMix) { + WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)md; + rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name, sizeof(wmd->defgrp_name)); + } + else if (md->type == eModifierType_WeightVGProximity) { + WeightVGProximityModifierData *wmd= (WeightVGProximityModifierData*)md; + rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name, sizeof(wmd->defgrp_name)); + } +} + +static void rna_WeightVGModifier_mask_vgroup_set(PointerRNA *ptr, const char *value) +{ + ModifierData *md = (ModifierData*)ptr->data; + if (md->type == eModifierType_WeightVGEdit) { + WeightVGEditModifierData *wmd= (WeightVGEditModifierData*)md; + rna_object_vgroup_name_set(ptr, value, wmd->mask_defgrp_name, sizeof(wmd->mask_defgrp_name)); + } + else if (md->type == eModifierType_WeightVGMix) { + WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)md; + rna_object_vgroup_name_set(ptr, value, wmd->mask_defgrp_name, sizeof(wmd->mask_defgrp_name)); + } + else if (md->type == eModifierType_WeightVGProximity) { + WeightVGProximityModifierData *wmd= (WeightVGProximityModifierData*)md; + rna_object_vgroup_name_set(ptr, value, wmd->mask_defgrp_name, sizeof(wmd->mask_defgrp_name)); + } +} + +static void rna_WeightVGMixModifier_vgroup2_set(PointerRNA *ptr, const char *value) +{ + WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)ptr->data; + rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name2, sizeof(wmd->defgrp_name2)); +} + static void rna_MappingInfo_uvlayer_set(PointerRNA *ptr, const char *value) { MappingInfoModifierData *mmd= (MappingInfoModifierData *)ptr->data; @@ -399,6 +448,23 @@ static void rna_WaveModifier_uvlayer_set(PointerRNA *ptr, const char *value) rna_object_uvlayer_name_set(ptr, value, wmd->uvlayer_name, sizeof(wmd->uvlayer_name)); } +static void rna_WeightVGModifier_mask_uvlayer_set(PointerRNA *ptr, const char *value) +{ + ModifierData *md = (ModifierData*)ptr->data; + if (md->type == eModifierType_WeightVGEdit) { + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*)md; + rna_object_uvlayer_name_set(ptr, value, wmd->mask_tex_uvlayer_name, sizeof(wmd->mask_tex_uvlayer_name)); + } + else if (md->type == eModifierType_WeightVGMix) { + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*)md; + rna_object_uvlayer_name_set(ptr, value, wmd->mask_tex_uvlayer_name, sizeof(wmd->mask_tex_uvlayer_name)); + } + else if (md->type == eModifierType_WeightVGProximity) { + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*)md; + rna_object_uvlayer_name_set(ptr, value, wmd->mask_tex_uvlayer_name, sizeof(wmd->mask_tex_uvlayer_name)); + } +} + static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max) { MultiresModifierData *mmd = (MultiresModifierData*)ptr->data; @@ -2407,6 +2473,314 @@ static void rna_def_modifier_screw(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ } +static void rna_def_modifier_weightvg_mask(BlenderRNA *brna, StructRNA *srna) +{ + static EnumPropertyItem weightvg_mask_tex_map_items[] = { + {MOD_DISP_MAP_LOCAL, "LOCAL", 0, "Local", ""}, + {MOD_DISP_MAP_GLOBAL, "GLOBAL", 0, "Global", ""}, + {MOD_DISP_MAP_OBJECT, "OBJECT", 0, "Object", ""}, + {MOD_DISP_MAP_UV, "UV", 0, "UV", ""}, + {0, NULL, 0, NULL, NULL}}; + + static EnumPropertyItem weightvg_mask_tex_used_items[] = { + {MOD_WVG_MASK_TEX_USE_INT, "INT", 0, "Intensity", ""}, + {MOD_WVG_MASK_TEX_USE_RED, "RED", 0, "Red", ""}, + {MOD_WVG_MASK_TEX_USE_GREEN, "GREEN", 0, "Green", ""}, + {MOD_WVG_MASK_TEX_USE_BLUE, "BLUE", 0, "Blue", ""}, + {MOD_WVG_MASK_TEX_USE_HUE, "HUE", 0, "Hue", ""}, + {MOD_WVG_MASK_TEX_USE_SAT, "SAT", 0, "Saturation", ""}, + {MOD_WVG_MASK_TEX_USE_VAL, "VAL", 0, "Value", ""}, + {MOD_WVG_MASK_TEX_USE_ALPHA, "ALPHA", 0, "Alpha", ""}, + {0, NULL, 0, NULL, NULL}}; + + PropertyRNA *prop; + + prop= RNA_def_property(srna, "mask_constant", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Influence", "Global influence of current modifications on vgroup."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "mask_vertex_group", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "mask_defgrp_name"); + RNA_def_property_ui_text(prop, "Mask VGroup", "Masking vertex group name."); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_mask_vgroup_set"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "mask_texture", PROP_POINTER, PROP_NONE); + RNA_def_property_ui_text(prop, "Masking Tex", "Masking texture."); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "mask_tex_use_channel", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, weightvg_mask_tex_used_items); + RNA_def_property_ui_text(prop, "Use Channel", "Which texture channel to use for masking."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "mask_tex_mapping", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, weightvg_mask_tex_map_items); + RNA_def_property_ui_text(prop, "Texture Coordinates", "Which texture coordinates " + "to use for mapping."); + RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); + + prop= RNA_def_property(srna, "mask_tex_uv_layer", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "mask_tex_uvlayer_name"); + RNA_def_property_ui_text(prop, "UV Layer", "UV layer name"); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_mask_uvlayer_set"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "mask_tex_map_obj", PROP_POINTER, PROP_NONE); + RNA_def_property_ui_text(prop, "Texture Coordinate Object", "Which object to take texture " + "coordinates from."); + RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); + RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); +} + +static void rna_def_modifier_weightvgedit(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "WeightVGEditModifier", "Modifier"); + RNA_def_struct_ui_text(srna, "Edit Vertex Group Weights Modifier", + "Edit the weights of vertices in a group."); + RNA_def_struct_sdna(srna, "WeightVGEditModifierData"); + RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); + + prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); + RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name."); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "flag_map", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_MAP); + RNA_def_property_ui_text(prop, "Map", "Map vertex group weights."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "flag_curve_map", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_CMAP); + RNA_def_property_ui_text(prop, "Curve Map", "Map vertex group weights with a curve."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "flag_reverse", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REVERSE_WEIGHTS); + RNA_def_property_ui_text(prop, "Reverse", "Reverse vertex group weights."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "flag_add2vg", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_ADD2VG); + RNA_def_property_ui_text(prop, "Add to VG", "Add vertices with weight over threshold " + "to vgroup."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "flag_remfvg", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REMFVG); + RNA_def_property_ui_text(prop, "Rem from VG", "Remove vertices with weight below threshold " + "from vgroup."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "flag_clamp", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_CLAMP); + RNA_def_property_ui_text(prop, "Clamp", "Clamp vertex group weights."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Default Weight", "Default weight a vertex will have if " + "it is not in the vgroup."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "map_input_low", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "map_org_min"); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Input Low Weight", "Low input mapping value."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "map_input_high", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "map_org_max"); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Input High Weight", "High input mapping value."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "map_output_low", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "map_new_min"); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Output Low Weight", "Low output mapping value."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "map_output_high", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "map_new_max"); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Output High Weight", "High output mapping value."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "cmap_curve", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve"); + RNA_def_property_ui_text(prop, "Mapping Curve", "Custom mapping curve."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "add_threshold", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Add Threshold", "Lower bound for a vertex’s weight " + "to be added to the vgroup."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "rem_threshold", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Rem Threshold", "Upper bound for a vertex’s weight " + "to be removed from the vgroup."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "clamp_min_weight", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Min Weight", "Lowest weight a vertex can get."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "clamp_max_weight", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Max Weight", "Highest weight a vertex can get."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + /* Common masking properties. */ + rna_def_modifier_weightvg_mask(brna, srna); +} + +static void rna_def_modifier_weightvgmix(BlenderRNA *brna) +{ + static EnumPropertyItem weightvg_mix_modes_items[] = { + {MOD_WVG_MIX_SET, "SET", 0, "Replace weights", ""}, + {MOD_WVG_MIX_ADD, "ADD", 0, "Add to weights", ""}, + {MOD_WVG_MIX_SUB, "SUB", 0, "Subtract from weights", ""}, + {MOD_WVG_MIX_MUL, "MUL", 0, "Multiply weights", ""}, + {MOD_WVG_MIX_DIV, "DIV", 0, "Divide weights", ""}, + {MOD_WVG_MIX_DIF, "DIF", 0, "Difference", ""}, + {MOD_WVG_MIX_AVG, "AVG", 0, "Average", ""}, + {0, NULL, 0, NULL, NULL}}; + + static EnumPropertyItem weightvg_mix_set_items[] = { + {MOD_WVG_SET_ALL, "ALL", 0, "All vertices", ""}, + {MOD_WVG_SET_ORG, "ORG", 0, "Vertices from vgroup 1", ""}, + {MOD_WVG_SET_NEW, "NEW", 0, "Vertices from vgroup 2", ""}, + {MOD_WVG_SET_UNION, "UNION", 0, "Vertices from one group", ""}, + {MOD_WVG_SET_INTER, "INTER", 0, "Vertices from both groups", ""}, + {0, NULL, 0, NULL, NULL}}; + + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "WeightVGMixModifier", "Modifier"); + RNA_def_struct_ui_text(srna, "Weight Vertex Group Modifier", + "Mix the weights of two vertex groups."); + RNA_def_struct_sdna(srna, "WeightVGMixModifierData"); + RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); + + prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); + RNA_def_property_ui_text(prop, "Vertex Group", "First vertex group name."); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "vertex_group2", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "defgrp_name2"); + RNA_def_property_ui_text(prop, "Vertex Group 2", "Second vertex group name."); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGMixModifier_vgroup2_set"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Default Weight", "Default weight a vertex will have if " + "it is not in the first vgroup."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "default_weight2", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Default Weight 2", "Default weight a vertex will have if " + "it is not in the second vgroup."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "mix_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, weightvg_mix_modes_items); + RNA_def_property_ui_text(prop, "Mix Mode", "How weights from vgroup 2 affect weights " + "of vgroup 1."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "mix_set", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, weightvg_mix_set_items); + RNA_def_property_ui_text(prop, "Vertex Set", "Which vertices should be affected."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + /* Common masking properties. */ + rna_def_modifier_weightvg_mask(brna, srna); +} + +static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) +{ + static EnumPropertyItem weightvg_proximity_modes_items[] = { + {MOD_WVG_PROXIMITY_OBJ2OBJDIST, "OBJ2OBJDIST", 0, "O2O Distance", ""}, + {MOD_WVG_PROXIMITY_OBJ2VERTDIST, "OBJ2VERTDIST", 0, "O2V Distance", ""}, + {0, NULL, 0, NULL, NULL}}; + + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "WeightVGProximityModifier", "Modifier"); + RNA_def_struct_ui_text(srna, "Weight Vertex Group - Proximity Modifier", + "Set the weights of vertices in a group from a target object’s " + "distance."); + RNA_def_struct_sdna(srna, "WeightVGProximityModifierData"); + RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); + + prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); + RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name."); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "proximity_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, weightvg_proximity_modes_items); + RNA_def_property_ui_text(prop, "Proximity Mode", "Which distances to target object to use."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "obj2vert_verts", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_VERTS); + RNA_def_property_ui_text(prop, "Use Target Vertices", + "Use shortest distance to target object’s vertices as weight."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "obj2vert_edges", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_EDGES); + RNA_def_property_ui_text(prop, "Use Target Edges", + "Use shortest distance to target object’s edges as weight."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "obj2vert_faces", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_FACES); + RNA_def_property_ui_text(prop, "Use Target Faces", + "Use shortest distance to target object’s faces as weight."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "ob_target", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "proximity_ob_target"); + RNA_def_property_ui_text(prop, "Target Object", "Object to calculate vertices’ distances from."); + RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); + RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); + + /* Common masking properties. */ + rna_def_modifier_weightvg_mask(brna, srna); +} + void RNA_def_modifier(BlenderRNA *brna) { StructRNA *srna; @@ -2504,6 +2878,9 @@ void RNA_def_modifier(BlenderRNA *brna) rna_def_modifier_smoke(brna); rna_def_modifier_solidify(brna); rna_def_modifier_screw(brna); + rna_def_modifier_weightvgedit(brna); + rna_def_modifier_weightvgmix(brna); + rna_def_modifier_weightvgproximity(brna); } #endif diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index d1f153265ac..4c3a7423aba 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -80,11 +80,16 @@ set(SRC intern/MOD_uvproject.c intern/MOD_warp.c intern/MOD_wave.c + intern/MOD_weightvg_util.c + intern/MOD_weightvgedit.c + intern/MOD_weightvgmix.c + intern/MOD_weightvgproximity.c MOD_modifiertypes.h intern/MOD_boolean_util.h intern/MOD_fluidsim_util.h intern/MOD_util.h + intern/MOD_weightvg_util.h ) if(WITH_MOD_BOOLEAN) diff --git a/source/blender/modifiers/MOD_modifiertypes.h b/source/blender/modifiers/MOD_modifiertypes.h index 4e44a226c64..0ba906a433b 100644 --- a/source/blender/modifiers/MOD_modifiertypes.h +++ b/source/blender/modifiers/MOD_modifiertypes.h @@ -72,6 +72,9 @@ extern ModifierTypeInfo modifierType_ShapeKey; extern ModifierTypeInfo modifierType_Solidify; extern ModifierTypeInfo modifierType_Screw; extern ModifierTypeInfo modifierType_Warp; +extern ModifierTypeInfo modifierType_WeightVGEdit; +extern ModifierTypeInfo modifierType_WeightVGMix; +extern ModifierTypeInfo modifierType_WeightVGProximity; /* MOD_util.c */ void modifier_type_init(ModifierTypeInfo *types[]); diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index e9b835eab81..26e9d48cd0a 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -295,5 +295,8 @@ void modifier_type_init(ModifierTypeInfo *types[]) INIT_TYPE(Solidify); INIT_TYPE(Screw); INIT_TYPE(Warp); + INIT_TYPE(WeightVGEdit); + INIT_TYPE(WeightVGMix); + INIT_TYPE(WeightVGProximity); #undef INIT_TYPE } diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c new file mode 100644 index 00000000000..c18fceb1e3f --- /dev/null +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -0,0 +1,246 @@ +/* +* $Id$ +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* The Original Code is Copyright (C) 2011 by Bastien Montagne. +* All rights reserved. +* +* Contributor(s): None yet. +* +* ***** END GPL LICENSE BLOCK ***** +* +*/ + +/* + * XXX I’d like to make modified weights visible in WeightPaint mode, + * but couldn’t figure a way to do this… + * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? + * Or the WeightPaint mode code itself? + */ + +#include "BLI_utildefines.h" +#include "BLI_math.h" +#include "BLI_string.h" + +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_modifier_types.h" +#include "DNA_object_types.h" + +#include "BKE_cdderivedmesh.h" +#include "BKE_deform.h" +#include "BKE_mesh.h" +#include "BKE_modifier.h" +#include "BKE_texture.h" /* Texture masking. */ + +#include "depsgraph_private.h" +#include "MEM_guardedalloc.h" +#include "MOD_util.h" +#include "MOD_weightvg_util.h" +#include "RE_shader_ext.h" /* Texture masking. */ + +/* Applies new_w weights to org_w ones, using either a texture, vgroup or constant value as factor. + * Return values are in org_w. + * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real + * vertex index (in case the weight tables do not cover the whole vertices...). + * XXX The standard “factor” value is assumed in [0.0, 1.0] range. Else, weird results might appear. + */ +void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object *ob, + DerivedMesh *dm, float fact, const char *defgrp_name, Tex *texture, + int tex_use_channel, int tex_mapping, Object *tex_map_object, + const char *tex_uvlayer_name) { + int ref_didx; + MDeformVert *dvert = NULL; + int i; + + /* If influence factor is null, nothing to do! */ + if (fact == 0.0) return; + + /* If we want to mask vgroup weights from a texture. */ + if (texture) { + /* The texture coordinates. */ + float (*tex_co)[3]; + /* See mapping note below… */ + MappingInfoModifierData t_map; + float (*v_co)[3]; + + /* Use new generic get_texture_coords, but do not modify our DNA struct for it… + * XXX Why use a ModifierData stuff here ? Why not a simple, generic struct for parameters ? + * What e.g. if a modifier wants to use several textures ? + * Why use only v_co, and not MVert (or both) ? + */ + t_map.texture = texture; + t_map.map_object = tex_map_object; + BLI_strncpy(t_map.uvlayer_name, tex_uvlayer_name, sizeof(t_map.uvlayer_name)); + t_map.texmapping = tex_mapping; + v_co = MEM_mallocN(sizeof(*v_co) * num, "WeightVG Modifier, TEX mode, v_co"); + dm->getVertCos(dm, v_co); + tex_co = MEM_callocN(sizeof(*tex_co) * num, "WeightVG Modifier, TEX mode, tex_co"); + get_texture_coords(&t_map, ob, dm, v_co, tex_co, num); + MEM_freeN(v_co); + + /* For each weight (vertex), make the mix between org and new weights. */ + for(i = 0; i < num; ++i) { + int idx = indices ? indices[i] : i; + TexResult texres; + float h, s, v; /* For HSV color space. */ + + texres.nor = NULL; + get_texture_value(texture, tex_co[idx], &texres); + /* Get the good channel value… */ + switch(tex_use_channel) { + case MOD_WVG_MASK_TEX_USE_INT: + org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0 - (texres.tin*fact))); + break; + case MOD_WVG_MASK_TEX_USE_RED: + org_w[i] = (new_w[i] * texres.tr * fact) + (org_w[i] * (1.0 - (texres.tr*fact))); + break; + case MOD_WVG_MASK_TEX_USE_GREEN: + org_w[i] = (new_w[i] * texres.tg * fact) + (org_w[i] * (1.0 - (texres.tg*fact))); + break; + case MOD_WVG_MASK_TEX_USE_BLUE: + org_w[i] = (new_w[i] * texres.tb * fact) + (org_w[i] * (1.0 - (texres.tb*fact))); + break; + case MOD_WVG_MASK_TEX_USE_HUE: + rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v); + org_w[i] = (new_w[i] * h * fact) + (org_w[i] * (1.0 - (h*fact))); + break; + case MOD_WVG_MASK_TEX_USE_SAT: + rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v); + org_w[i] = (new_w[i] * s * fact) + (org_w[i] * (1.0 - (s*fact))); + break; + case MOD_WVG_MASK_TEX_USE_VAL: + rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v); + org_w[i] = (new_w[i] * v * fact) + (org_w[i] * (1.0 - (v*fact))); + break; + case MOD_WVG_MASK_TEX_USE_ALPHA: + org_w[i] = (new_w[i] * texres.ta * fact) + (org_w[i] * (1.0 - (texres.ta*fact))); + break; + default: + org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0 - (texres.tin*fact))); + break; + } + } + + MEM_freeN(tex_co); + return; + } + + /* Check whether we want to set vgroup weights from a constant weight factor or a vertex + * group. + */ + /* Get vgroup idx from its name. */ + ref_didx = defgroup_name_index(ob, defgrp_name); + /* Proceed only if vgroup is valid, else use constant factor. */ + if (ref_didx >= 0) { + /* Get actual dverts (ie vertex group data). */ + dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT); + /* Proceed only if vgroup is valid, else assume factor = O. */ + if (dvert == NULL) return; + + /* For each weight (vertex), make the mix between org and new weights. */ + for (i = 0; i < num; i++) { + int idx = indices ? indices[i] : i; + int j; + for (j = 0; j < dvert[idx].totweight; j++) { + if(dvert[idx].dw[j].def_nr == ref_didx) { + float f = dvert[idx].dw[j].weight * fact; + org_w[i] = (new_w[i] * f) + (org_w[i] * (1.0-f)); + break; + } + } + /* If that vertex is not in ref vgroup, assume null factor, and hence do nothing! */ + } + return; + } + + /* Default "influence" behavior. */ + /* For each weight (vertex), make the mix between org and new weights. */ + for (i = 0; i < num; i++) { + org_w[i] = (new_w[i] * fact) + (org_w[i] * (1.0-fact)); + } +} + +/* Applies weights to given vgroup (defgroup), and optionnaly add/remove vertices from the group. + * If indices is not NULL, it must be a table of same length as weights, mapping to the real + * vertex index (in case the weight table does not cover the whole vertices...). + */ +void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indices, + float *weights, int do_add, float add_thresh, int do_rem, + float rem_thresh){ + int i; + + for (i = 0; i < num; i++) { + int j; + float w = weights[i]; + MDeformVert *dv = &dvert[indices ? indices[i] : i]; + MDeformWeight *newdw; + + /* Let’s first check to see if this vert is already in the weight group – if so + * let’s update it, or remove it if needed. + */ + for (j = 0; j < dv->totweight; j++) { + /* If this weight corresponds to the deform group, update the value or, + * if lower than rem_threshold, remove the vertex from the vgroup. + */ + if (dv->dw[j].def_nr == defgrp_idx) { + /* Remove the vertex from this vgroup if needed. */ + if (do_rem && w < rem_thresh) { + dv->totweight--; + /* If there are still other deform weights attached to this vert then remove + * this deform weight, and reshuffle the others. + */ + if(dv->totweight) { + newdw = MEM_mallocN(sizeof(MDeformWeight)*(dv->totweight), "deformWeight"); + if(dv->dw){ + memcpy(newdw, dv->dw, sizeof(MDeformWeight)*j); + memcpy(newdw+j, dv->dw+j+1, sizeof(MDeformWeight)*(dv->totweight-j)); + MEM_freeN(dv->dw); + } + dv->dw = newdw; + } + /* If there are no other deform weights left then just remove this one. */ + else { + MEM_freeN(dv->dw); + dv->dw = NULL; + } + } + /* Else, just set the new computed weight. */ + else + dv->dw[j].weight = w; + break; + } + continue; + } + + /* If the vert wasn’t in the deform group, add it if needed! + */ + if (do_add && w > add_thresh) { + newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "WeightVGEdit Modifier, deformWeight"); + if(dv->dw) { + memcpy(newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight); + MEM_freeN(dv->dw); + } + dv->dw = newdw; + dv->dw[dv->totweight].weight = w; + dv->dw[dv->totweight].def_nr = defgrp_idx; + dv->totweight++; + } + } +} + diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h new file mode 100644 index 00000000000..1bd40e3879f --- /dev/null +++ b/source/blender/modifiers/intern/MOD_weightvg_util.h @@ -0,0 +1,82 @@ +/* +* $Id$ +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* The Original Code is Copyright (C) 2011 by Bastien Montagne. +* All rights reserved. +* +* Contributor(s): None yet. +* +* ***** END GPL LICENSE BLOCK ***** +* +*/ + +/** \file blender/modifiers/intern/MOD_util.h + * \ingroup modifiers + */ + + +#ifndef MOD_WEIGHTVG_UTIL_H +#define MOD_WEIGHTVG_UTIL_H + +/* so modifier types match their defines */ +#include "MOD_modifiertypes.h" + +struct Tex; +struct DerivedMesh; +struct Object; +/*struct ModifierData; +struct MappingInfoModifierData;*/ + +/* + * XXX I’d like to make modified weights visible in WeightPaint mode, + * but couldn’t figure a way to do this… + * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? + * Or the WeightPaint mode code itself? + */ + +/************************************** + * Util functions. * + **************************************/ + +/* We cannot divide by zero (what a surprise…). + * So if -MOD_WEIGHTVGROUP_DIVMODE_ZEROFLOOR < weightf < MOD_WEIGHTVGROUP_DIVMODE_ZEROFLOOR, + * we clamp weightf to this value (or its negative version). + * Also used to avoid null power factor. + */ +#define MOD_WVG_ZEROFLOOR 1.0e-32f + +/* Applies new_w weights to org_w ones, using either a texture, vgroup or constant value as factor. + * Return values are in org_w. + * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real + * vertex index (in case the weight tables do not cover the whole vertices...). + * XXX The standard “factor” value is assumed in [0.0, 1.0] range. Else, weird results might appear. + */ +void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object *ob, + struct DerivedMesh *dm, float fact, const char *defgrp_name, Tex *texture, + int tex_use_channel, int tex_mapping, Object *tex_map_object, + const char *tex_uvlayer_name); + +/* Applies weights to given vgroup (defgroup), and optionnaly add/remove vertices from the group. + * If indices is not NULL, it must be a table of same length as weights, mapping to the real + * vertex index (in case the weight table does not cover the whole vertices...). + */ +void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indices, float *weights, + int do_add, float add_thresh, int do_rem, float rem_thresh); + +#endif /* MOD_WEIGHTVG_UTIL_H */ diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c new file mode 100644 index 00000000000..c8d7ab52ce8 --- /dev/null +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -0,0 +1,343 @@ +/* +* $Id$ +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* The Original Code is Copyright (C) 2011 by Bastien Montagne. +* All rights reserved. +* +* Contributor(s): None yet. +* +* ***** END GPL LICENSE BLOCK ***** +* +*/ + +/* + * XXX I’d like to make modified weights visible in WeightPaint mode, + * but couldn’t figure a way to do this… + * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? + * Or the WeightPaint mode code itself? + */ + +#include "BLI_utildefines.h" +#include "BLI_math.h" +#include "BLI_string.h" + +#include "DNA_color_types.h" /* CurveMapping. */ +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_modifier_types.h" +#include "DNA_object_types.h" + +#include "BKE_cdderivedmesh.h" +#include "BKE_colortools.h" /* CurveMapping. */ +#include "BKE_deform.h" +#include "BKE_mesh.h" +#include "BKE_modifier.h" +#include "BKE_texture.h" /* Texture masking. */ + +#include "depsgraph_private.h" +#include "MEM_guardedalloc.h" +#include "MOD_util.h" +#include "MOD_weightvg_util.h" + +/************************************** + * Modifiers functions. * + **************************************/ +static void initData(ModifierData *md) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + wmd->edit_flags = MOD_WVG_EDIT_CLAMP; + wmd->default_weight = 0.0f; + + wmd->map_org_min = 0.0f; + wmd->map_org_max = 1.0f; + wmd->map_new_min = 0.0f; + wmd->map_new_max = 1.0f; + wmd->cmap_curve = curvemapping_add(1, 0.0, 0.0, 1.0, 1.0); + curvemapping_initialize(wmd->cmap_curve); + + wmd->clamp_min_weight = 0.0f; + wmd->clamp_max_weight = 1.0f; + + wmd->add_threshold = 0.01f; + wmd->rem_threshold = 0.01f; + + wmd->mask_constant = 1.0f; + wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ + wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL; +} + +static void freeData(ModifierData *md) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + curvemapping_free(wmd->cmap_curve); +} + +static void copyData(ModifierData *md, ModifierData *target) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + WeightVGEditModifierData *twmd = (WeightVGEditModifierData*) target; + + BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name)); + + twmd->edit_flags = wmd->edit_flags; + twmd->default_weight = wmd->default_weight; + + twmd->map_org_min = wmd->map_org_min; + twmd->map_org_max = wmd->map_org_max; + twmd->map_new_min = wmd->map_new_min; + twmd->map_new_max = wmd->map_new_max; + twmd->cmap_curve = curvemapping_copy(wmd->cmap_curve); + + twmd->clamp_min_weight = wmd->clamp_min_weight; + twmd->clamp_max_weight = wmd->clamp_max_weight; + + twmd->add_threshold = wmd->add_threshold; + twmd->rem_threshold = wmd->rem_threshold; + + twmd->mask_constant = wmd->mask_constant; + BLI_strncpy(twmd->mask_defgrp_name, wmd->mask_defgrp_name, sizeof(twmd->mask_defgrp_name)); + twmd->mask_texture = wmd->mask_texture; + twmd->mask_tex_use_channel = wmd->mask_tex_use_channel; + twmd->mask_tex_mapping = wmd->mask_tex_mapping; + twmd->mask_tex_map_obj = wmd->mask_tex_map_obj; + BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, + sizeof(twmd->mask_tex_uvlayer_name)); +} + +static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + CustomDataMask dataMask = 0; + + /* We need vertex groups! */ + dataMask |= CD_MASK_MDEFORMVERT; + + /* Ask for UV coordinates if we need them. */ + if(wmd->mask_tex_mapping == MOD_DISP_MAP_UV) + dataMask |= CD_MASK_MTFACE; + + return dataMask; +} + +static int dependsOnTime(ModifierData *md) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + + if(wmd->mask_texture) + return BKE_texture_dependsOnTime(wmd->mask_texture); + return 0; +} + +static void foreachObjectLink(ModifierData *md, Object *ob, + void (*walk)(void *userData, Object *ob, Object **obpoin), + void *userData) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + walk(userData, ob, &wmd->mask_tex_map_obj); +} + +static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + + walk(userData, ob, (ID **)&wmd->mask_texture); + + foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); +} + +static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), + Object *UNUSED(ob), DagNode *obNode) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + DagNode *curNode; + + if(wmd->mask_tex_map_obj && wmd->mask_tex_mapping == MOD_DISP_MAP_OBJECT) { + curNode = dag_get_node(forest, wmd->mask_tex_map_obj); + + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, + "WeightVGEdit Modifier"); + } + + if(wmd->mask_tex_mapping == MOD_DISP_MAP_GLOBAL) + dag_add_relation(forest, obNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, + "WeightVGEdit Modifier"); +} + +static int isDisabled(ModifierData *md, int UNUSED(useRenderParams)) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + /* If no vertex group, bypass. */ + return (wmd->defgrp_name == NULL); +} + +static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData, + int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) +{ + WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; + DerivedMesh *dm = derivedData; + DerivedMesh *ret; + MDeformVert *dvert = NULL; + float *org_w = NULL; /* Array original weights. */ + float *new_w = NULL; /* Array new weights. */ + int numVerts; + int defgrp_idx; + int i; + char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */ + float *mapf = NULL; /* Cache for mapping factors. */ + /* Flags. */ + char do_map = wmd->edit_flags & MOD_WVG_EDIT_MAP; + char do_cmap = wmd->edit_flags & MOD_WVG_EDIT_CMAP; + char do_rev = wmd->edit_flags & MOD_WVG_EDIT_REVERSE_WEIGHTS; + char do_add = wmd->edit_flags & MOD_WVG_EDIT_ADD2VG; + char do_rem = wmd->edit_flags & MOD_WVG_EDIT_REMFVG; + char do_clamp = wmd->edit_flags & MOD_WVG_EDIT_CLAMP; + + /* Get number of verts. */ + numVerts = dm->getNumVerts(dm); + + /* Check if we can just return the original mesh. + * Must have verts and therefore verts assigned to vgroups to do anything useful! + */ + if ((numVerts == 0) || (ob->defbase.first == NULL)) + return dm; + + /* Create a copy of our dmesh. + * TODO: This should be done only if needed, i.e. if dm has the org data ! + */ + if (1) { + /* XXX Seems to create problems with weightpaint mode... */ +// DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ + ret = CDDM_copy(dm); + rel_ret = 1; + } + else + ret = dm; + + /* Get vgroup idx from its name. */ + defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); + + /* Get actual dverts (ie vertex group data). */ + if (defgrp_idx >= 0) + dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); + /* If no dverts, return unmodified data… */ + if ((defgrp_idx < 0) || (dvert == NULL)) { + if (rel_ret) + ret->release(ret); + return dm; + } + + /* Get org weights, assuming 0.0 for vertices not in given vgroup. */ + org_w = MEM_mallocN(sizeof(float) * numVerts, "WeightVGEdit Modifier, org_w"); + new_w = MEM_mallocN(sizeof(float) * numVerts, "WeightVGEdit Modifier, org_w"); + for (i = 0; i < numVerts; i++) { + int j; + org_w[i] = new_w[i] = wmd->default_weight; + for (j = 0; j < dvert[i].totweight; j++) { + if(dvert[i].dw[j].def_nr == defgrp_idx) { + org_w[i] = new_w[i] = dvert[i].dw[j].weight; + break; + } + } + /* Do mapping. */ + if (do_map) { + /* This mapping is a simple func: a*in + b. + * with a = (out_min - out_max)/(in_min - in_max) + * and b = out_max - a*in_max + * Note a and b are cached! + */ + if (mapf == NULL) { + float denom = wmd->map_org_min - wmd->map_org_max; + mapf = MEM_mallocN(sizeof(float) * 2, "WeightVGEdit, mapf"); + if (denom > 0.0 && denom < MOD_WVG_ZEROFLOOR) + denom = MOD_WVG_ZEROFLOOR; + else if (denom < 0.0 && denom > -MOD_WVG_ZEROFLOOR) + denom = -MOD_WVG_ZEROFLOOR; + mapf[0] = (wmd->map_new_min - wmd->map_new_max) / denom; + mapf[1] = wmd->map_new_max - (mapf[0] * wmd->map_org_max); + } + new_w[i] = (mapf[0] * new_w[i]) + mapf[1]; + } + if (do_cmap) + new_w[i] = curvemapping_evaluateF(wmd->cmap_curve, 0, new_w[i]); + if (do_rev) + new_w[i] = (-1.0 * new_w[i]) + 1.0; + } + + /* Do masking. */ + weightvg_do_mask(numVerts, NULL, org_w, new_w, ob, ret, wmd->mask_constant, + wmd->mask_defgrp_name, wmd->mask_texture, wmd->mask_tex_use_channel, + wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name); + + /* Do clamping. */ + if (do_clamp) { + for (i = 0; i < numVerts; i++) + CLAMP(org_w[i], wmd->clamp_min_weight, wmd->clamp_max_weight); + } + + /* Update/add/remove from vgroup. */ + weightvg_update_vg(dvert, defgrp_idx, numVerts, NULL, org_w, do_add, wmd->add_threshold, + do_rem, wmd->rem_threshold); + + /* Freeing stuff. */ + if (org_w) + MEM_freeN(org_w); + if (new_w) + MEM_freeN(new_w); + if (mapf) + MEM_freeN(mapf); + + /* Return the vgroup-modified mesh. */ + return ret; +} + +static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, + struct EditMesh *UNUSED(editData), + DerivedMesh *derivedData) +{ + return applyModifier(md, ob, derivedData, 0, 1); +} + + +ModifierTypeInfo modifierType_WeightVGEdit = { + /* name */ "WeightVGEdit", + /* structName */ "WeightVGEditModifierData", + /* structSize */ sizeof(WeightVGEditModifierData), + /* type */ eModifierTypeType_Nonconstructive, + /* flags */ eModifierTypeFlag_AcceptsMesh + |eModifierTypeFlag_SupportsMapping + |eModifierTypeFlag_SupportsEditmode, + + /* copyData */ copyData, + /* deformVerts */ NULL, + /* deformMatrices */ NULL, + /* deformVertsEM */ NULL, + /* deformMatricesEM */ NULL, + /* applyModifier */ applyModifier, + /* applyModifierEM */ applyModifierEM, + /* initData */ initData, + /* requiredDataMask */ requiredDataMask, + /* freeData */ freeData, + /* isDisabled */ isDisabled, + /* updateDepgraph */ updateDepgraph, + /* dependsOnTime */ dependsOnTime, + /* dependsOnNormals */ NULL, + /* foreachObjectLink */ foreachObjectLink, + /* foreachIDLink */ foreachIDLink, +}; + diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c new file mode 100644 index 00000000000..c4f107de72e --- /dev/null +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -0,0 +1,433 @@ +/* +* $Id$ +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* The Original Code is Copyright (C) 2011 by Bastien Montagne. +* All rights reserved. +* +* Contributor(s): None yet. +* +* ***** END GPL LICENSE BLOCK ***** +* +*/ + +/* + * XXX I’d like to make modified weights visible in WeightPaint mode, + * but couldn’t figure a way to do this… + * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? + * Or the WeightPaint mode code itself? + */ + +#include "BLI_utildefines.h" +#include "BLI_math.h" +#include "BLI_string.h" + +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_modifier_types.h" +#include "DNA_object_types.h" + +#include "BKE_cdderivedmesh.h" +#include "BKE_deform.h" +#include "BKE_mesh.h" +#include "BKE_modifier.h" +#include "BKE_texture.h" /* Texture masking. */ + +#include "depsgraph_private.h" +#include "MEM_guardedalloc.h" +#include "MOD_util.h" +#include "MOD_weightvg_util.h" + + +/** + * This mixes the old weight with the new weight factor. + */ +static float mix_weight(float weight, float weight2, char mix_mode) +{ +#if 0 + /* + * XXX Don’t know why, but the switch version takes many CPU time, + * and produces lag in realtime playback… + */ + switch (mix_mode) + { + case MOD_WVG_MIX_ADD: + return (weight + weight2); + case MOD_WVG_MIX_SUB: + return (weight - weight2); + case MOD_WVG_MIX_MUL: + return (weight * weight2); + case MOD_WVG_MIX_DIV: + /* Avoid dividing by zero (or really small values). */ + if (0.0 <= weight2 < MOD_WVG_ZEROFLOOR) + weight2 = MOD_WVG_ZEROFLOOR; + else if (-MOD_WVG_ZEROFLOOR < weight2) + weight2 = -MOD_WVG_ZEROFLOOR; + return (weight / weight2); + case MOD_WVG_MIX_DIF: + return (weight < weight2 ? weight2 - weight : weight - weight2); + case MOD_WVG_MIX_AVG: + return (weight + weight2) / 2.0; + case MOD_WVG_MIX_SET: + default: + return weight2; + } +#endif + if (mix_mode == MOD_WVG_MIX_SET) + return weight2; + else if (mix_mode == MOD_WVG_MIX_ADD) + return (weight + weight2); + else if (mix_mode == MOD_WVG_MIX_SUB) + return (weight - weight2); + else if (mix_mode == MOD_WVG_MIX_MUL) + return (weight * weight2); + else if (mix_mode == MOD_WVG_MIX_DIV) { + /* Avoid dividing by zero (or really small values). */ + if (weight2 < 0.0 && weight2 > -MOD_WVG_ZEROFLOOR) + weight2 = -MOD_WVG_ZEROFLOOR; + else if (weight2 >= 0.0 && weight2 < MOD_WVG_ZEROFLOOR) + weight2 = MOD_WVG_ZEROFLOOR; + return (weight / weight2); + } + else if (mix_mode == MOD_WVG_MIX_DIF) + return (weight < weight2 ? weight2 - weight : weight - weight2); + else if (mix_mode == MOD_WVG_MIX_AVG) + return (weight + weight2) / 2.0; + else return weight2; +} + +/************************************** + * Modifiers functions. * + **************************************/ +static void initData(ModifierData *md) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; + + wmd->default_weight = 0.0; + wmd->default_weight2 = 0.0; + wmd->mix_mode = MOD_WVG_MIX_SET; + wmd->mix_set = MOD_WVG_SET_INTER; + + wmd->mask_constant = 1.0f; + wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ + wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL; +} + +static void copyData(ModifierData *md, ModifierData *target) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; + WeightVGMixModifierData *twmd = (WeightVGMixModifierData*) target; + + BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name)); + BLI_strncpy(twmd->defgrp_name2, wmd->defgrp_name2, sizeof(twmd->defgrp_name2)); + twmd->default_weight = wmd->default_weight; + twmd->default_weight2 = wmd->default_weight2; + twmd->mix_mode = wmd->mix_mode; + twmd->mix_set = wmd->mix_set; + + twmd->mask_constant = wmd->mask_constant; + BLI_strncpy(twmd->mask_defgrp_name, wmd->mask_defgrp_name, sizeof(twmd->mask_defgrp_name)); + twmd->mask_texture = wmd->mask_texture; + twmd->mask_tex_use_channel = wmd->mask_tex_use_channel; + twmd->mask_tex_mapping = wmd->mask_tex_mapping; + twmd->mask_tex_map_obj = wmd->mask_tex_map_obj; + BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, + sizeof(twmd->mask_tex_uvlayer_name)); +} + +static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; + CustomDataMask dataMask = 0; + + /* We need vertex groups! */ + dataMask |= CD_MASK_MDEFORMVERT; + + /* Ask for UV coordinates if we need them. */ + if(wmd->mask_tex_mapping == MOD_DISP_MAP_UV) + dataMask |= CD_MASK_MTFACE; + + return dataMask; +} + +static int dependsOnTime(ModifierData *md) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; + + if(wmd->mask_texture) + return BKE_texture_dependsOnTime(wmd->mask_texture); + return 0; +} + +static void foreachObjectLink(ModifierData *md, Object *ob, + void (*walk)(void *userData, Object *ob, Object **obpoin), + void *userData) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; + walk(userData, ob, &wmd->mask_tex_map_obj); +} + +static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; + + walk(userData, ob, (ID **)&wmd->mask_texture); + + foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); +} + +static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), + Object *UNUSED(ob), DagNode *obNode) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; + DagNode *curNode; + + if(wmd->mask_tex_map_obj && wmd->mask_tex_mapping == MOD_DISP_MAP_OBJECT) { + curNode = dag_get_node(forest, wmd->mask_tex_map_obj); + + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, + "WeightVGMix Modifier"); + } + + if(wmd->mask_tex_mapping == MOD_DISP_MAP_GLOBAL) + dag_add_relation(forest, obNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, + "WeightVGMix Modifier"); +} + +static int isDisabled(ModifierData *md, int UNUSED(useRenderParams)) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; + /* If no vertex group, bypass. */ + return (wmd->defgrp_name == NULL); +} + +static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData, + int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) +{ + WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; + DerivedMesh *dm = derivedData; + DerivedMesh *ret; + MDeformVert *dvert = NULL; + int numVerts; + int defgrp_idx, defgrp_idx2 = -1; + float *org_w = NULL; + float *new_w = NULL; + int *tidx, *indices = NULL; + int numIdx = 0; + int i, j; + char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */ + + /* Get number of verts. */ + numVerts = dm->getNumVerts(dm); + + /* Check if we can just return the original mesh. + * Must have verts and therefore verts assigned to vgroups to do anything useful! + */ + if ((numVerts == 0) || (ob->defbase.first == NULL)) + return dm; + + /* Create a copy of our dmesh. + * TODO: This should be done only if needed ! + */ + if (1) { + /* XXX Seems to create problems with weightpaint mode... */ +// DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ + ret = CDDM_copy(dm); + rel_ret = 1; + } + else + ret = dm; + + /* Get first vgroup idx from its name. */ + defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); + + /* Get seconf vgroup idx from its name, if given. */ + if (wmd->defgrp_name2) + defgrp_idx2 = defgroup_name_index(ob, wmd->defgrp_name2); + + /* Get actual dverts (ie vertex group data). */ + if (defgrp_idx >= 0) + dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); + /* If no dverts, return unmodified data… */ + if ((defgrp_idx < 0) || (dvert == NULL)) { + if (rel_ret) + ret->release(ret); + return dm; + } + + /* Find out which vertices to work on. */ + tidx = MEM_mallocN(sizeof(int) * numVerts, "WeightVGMix Modifier, tidx"); + switch (wmd->mix_set) { + case MOD_WVG_SET_ORG: + /* All vertices in first vgroup. */ + for (i = 0; i < numVerts; i++) { + for (j = 0; j < dvert[i].totweight; j++) { + if(dvert[i].dw[j].def_nr == defgrp_idx) { + tidx[numIdx++] = i; + break; + } + } + } + break; + case MOD_WVG_SET_NEW: + /* All vertices in second vgroup. */ + for (i = 0; i < numVerts; i++) { + for (j = 0; j < dvert[i].totweight; j++) { + if(dvert[i].dw[j].def_nr == defgrp_idx2) { + tidx[numIdx++] = i; + break; + } + } + } + break; + case MOD_WVG_SET_UNION: + /* All vertices in one vgroup or the other. */ + for (i = 0; i < numVerts; i++) { + for (j = 0; j < dvert[i].totweight; j++) { + if(dvert[i].dw[j].def_nr == defgrp_idx || dvert[i].dw[j].def_nr == defgrp_idx2) { + tidx[numIdx++] = i; + break; + } + } + } + break; + case MOD_WVG_SET_INTER: + /* All vertices in both vgroups. */ + for (i = 0; i < numVerts; i++) { + char idx1 = 0; + char idx2 = 0; + for (j = 0; j < dvert[i].totweight; j++) { + if(dvert[i].dw[j].def_nr == defgrp_idx) { + if (idx2) { + tidx[numIdx++] = i; + break; + } + else + idx1 = 1; + } + else if(dvert[i].dw[j].def_nr == defgrp_idx2) { + if (idx1) { + tidx[numIdx++] = i; + break; + } + else + idx2 = 1; + } + } + } + break; + case MOD_WVG_SET_ALL: + default: + /* Use all vertices, no need to do anything here. */ + break; + } + if (numIdx) { + indices = MEM_mallocN(sizeof(int) * numIdx, "WeightVGMix Modifier, indices"); + memcpy(indices, tidx, sizeof(int) * numIdx); + } + else + numIdx = numVerts; + MEM_freeN(tidx); + + org_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGMix Modifier, org_w"); + new_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGMix Modifier, new_w"); + + /* Mix weights. */ + for (i = 0; i < numIdx; i++) { + float weight2 = 0.0; + char w1 = 0; + char w2 = 0; + int idx = indices ? indices[i] : i; + for (j = 0; j < dvert[idx].totweight; j++) { + if(dvert[idx].dw[j].def_nr == defgrp_idx) { + org_w[i] = dvert[idx].dw[j].weight; + w1 = 1; + if (w2) + break; + } + else if(dvert[idx].dw[j].def_nr == defgrp_idx2) { + weight2 = dvert[idx].dw[j].weight; + w2 = 1; + if (w1) + break; + } + } + if (w1 == 0) + org_w[i] = wmd->default_weight; + if (w2 == 0) + weight2 = wmd->default_weight2; + new_w[i] = mix_weight(org_w[i], weight2, wmd->mix_mode); + } + + /* Do masking. */ + weightvg_do_mask(numIdx, indices, org_w, new_w, ob, ret, wmd->mask_constant, + wmd->mask_defgrp_name, wmd->mask_texture, wmd->mask_tex_use_channel, + wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name); + + /* Update (add to) vgroup. + * XXX Depending on the MOD_WVG_SET_xxx option chosen, we might have to add vertices to vgroup. + */ + weightvg_update_vg(dvert, defgrp_idx, numIdx, indices, org_w, 1, -FLT_MAX, 0, 0.0f); + + /* Freeing stuff. */ + if (org_w) + MEM_freeN(org_w); + if (new_w) + MEM_freeN(new_w); + if (indices) + MEM_freeN(indices); + + /* Return the vgroup-modified mesh. */ + return ret; +} + +static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, + struct EditMesh *UNUSED(editData), + DerivedMesh *derivedData) +{ + return applyModifier(md, ob, derivedData, 0, 1); +} + + +ModifierTypeInfo modifierType_WeightVGMix = { + /* name */ "WeightVGMix", + /* structName */ "WeightVGMixModifierData", + /* structSize */ sizeof(WeightVGMixModifierData), + /* type */ eModifierTypeType_Nonconstructive, + /* flags */ eModifierTypeFlag_AcceptsMesh + |eModifierTypeFlag_SupportsMapping + |eModifierTypeFlag_SupportsEditmode, + + /* copyData */ copyData, + /* deformVerts */ NULL, + /* deformMatrices */ NULL, + /* deformVertsEM */ NULL, + /* deformMatricesEM */ NULL, + /* applyModifier */ applyModifier, + /* applyModifierEM */ applyModifierEM, + /* initData */ initData, + /* requiredDataMask */ requiredDataMask, + /* freeData */ NULL, + /* isDisabled */ isDisabled, + /* updateDepgraph */ updateDepgraph, + /* dependsOnTime */ dependsOnTime, + /* dependsOnNormals */ NULL, + /* foreachObjectLink */ foreachObjectLink, + /* foreachIDLink */ foreachIDLink, +}; + diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c new file mode 100644 index 00000000000..7349d90c1ec --- /dev/null +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -0,0 +1,512 @@ +/* +* $Id$ +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* The Original Code is Copyright (C) 2011 by Bastien Montagne. +* All rights reserved. +* +* Contributor(s): None yet. +* +* ***** END GPL LICENSE BLOCK ***** +* +*/ + +/* + * XXX I’d like to make modified weights visible in WeightPaint mode, + * but couldn’t figure a way to do this… + * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? + * Or the WeightPaint mode code itself? + */ + +#include "BLI_utildefines.h" +#include "BLI_math.h" +#include "BLI_string.h" +#include "BLI_editVert.h" + +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_modifier_types.h" +#include "DNA_object_types.h" + +#include "BKE_cdderivedmesh.h" +#include "BKE_deform.h" +#include "BKE_mesh.h" +#include "BKE_modifier.h" +#include "BKE_shrinkwrap.h" /* For SpaceTransform stuff. */ +#include "BKE_texture.h" /* Texture masking. */ + +#include "depsgraph_private.h" +#include "MEM_guardedalloc.h" +#include "MOD_util.h" +#include "MOD_weightvg_util.h" + +/************************************** + * Util functions. * + **************************************/ + +/* Util macro. */ +#define OUT_OF_MEMORY() ((void)printf("WeightVGProximity: Out of memory.\n")) + +/** + * Returns the squared distance between two given points. + */ +static float squared_dist(const float *a, const float *b) +{ + float tmp[3]; + VECSUB(tmp, a, b); + return INPR(tmp, tmp); +} + +/** + * Find nearest vertex and/or edge and/or face, for each vertex (adapted from shrinkwrap.c). + */ +static void get_vert2geom_distance(int numVerts, float (*v_cos)[3], + float *dist_v, float *dist_e, float *dist_f, + DerivedMesh *target, const SpaceTransform *loc2trgt) +{ + int i; + BVHTreeFromMesh treeData_v = NULL_BVHTreeFromMesh; + BVHTreeFromMesh treeData_e = NULL_BVHTreeFromMesh; + BVHTreeFromMesh treeData_f = NULL_BVHTreeFromMesh; + BVHTreeNearest nearest_v = NULL_BVHTreeNearest; + BVHTreeNearest nearest_e = NULL_BVHTreeNearest; + BVHTreeNearest nearest_f = NULL_BVHTreeNearest; + + if (dist_v) { + /* Create a bvh-tree of the given target's verts. */ + bvhtree_from_mesh_verts(&treeData_v, target, 0.0, 2, 6); + if(treeData_v.tree == NULL) { + OUT_OF_MEMORY(); + return; + } + } + if (dist_e) { + /* Create a bvh-tree of the given target's edges. */ + bvhtree_from_mesh_edges(&treeData_e, target, 0.0, 2, 6); + if(treeData_e.tree == NULL) { + OUT_OF_MEMORY(); + return; + } + } + if (dist_f) { + /* Create a bvh-tree of the given target's faces. */ + bvhtree_from_mesh_faces(&treeData_f, target, 0.0, 2, 6); + if(treeData_f.tree == NULL) { + OUT_OF_MEMORY(); + return; + } + } + + /* Setup nearest. */ + nearest_v.index = nearest_e.index = nearest_f.index = -1; + /*nearest_v.dist = nearest_e.dist = nearest_f.dist = FLT_MAX;*/ + /* Find the nearest vert/edge/face. */ +#ifndef __APPLE__ +#pragma omp parallel for default(none) private(i) firstprivate(nearest_v,nearest_e,nearest_f) \ + shared(treeData_v,treeData_e,treeData_f,numVerts,v_cos,dist_v,dist_e, \ + dist_f,loc2trgt) \ + schedule(static) +#endif + for (i = 0; i < numVerts; ++i) { + float tmp_co[3]; + + /* Convert the vertex to tree coordinates. */ + VECCOPY(tmp_co, v_cos[i]); + space_transform_apply(loc2trgt, tmp_co); + + /* Use local proximity heuristics (to reduce the nearest search). + * + * If we already had an hit before, we assume this vertex is going to have a close hit to + * that other vertex, so we can initiate the "nearest.dist" with the expected value to that + * last hit. + * This will lead in prunning of the search tree. + */ + if (dist_v) { + nearest_v.dist = nearest_v.index != -1 ? squared_dist(tmp_co, nearest_v.co) : FLT_MAX; + /* Compute and store result. If invalid (-1 idx), keep FLT_MAX dist. */ + BLI_bvhtree_find_nearest(treeData_v.tree, tmp_co, &nearest_v, treeData_v.nearest_callback, &treeData_v); + dist_v[i] = sqrtf(nearest_v.dist); + } + if (dist_e) { + nearest_e.dist = nearest_e.index != -1 ? squared_dist(tmp_co, nearest_e.co) : FLT_MAX; + /* Compute and store result. If invalid (-1 idx), keep FLT_MAX dist. */ + BLI_bvhtree_find_nearest(treeData_e.tree, tmp_co, &nearest_e, treeData_e.nearest_callback, &treeData_e); + dist_e[i] = sqrtf(nearest_e.dist); + } + if (dist_f) { + nearest_f.dist = nearest_f.index != -1 ? squared_dist(tmp_co, nearest_f.co) : FLT_MAX; + /* Compute and store result. If invalid (-1 idx), keep FLT_MAX dist. */ + BLI_bvhtree_find_nearest(treeData_f.tree, tmp_co, &nearest_f, treeData_f.nearest_callback, &treeData_f); + dist_f[i] = sqrtf(nearest_f.dist); + } + } + + if (dist_v) + free_bvhtree_from_mesh(&treeData_v); + if (dist_e) + free_bvhtree_from_mesh(&treeData_e); + if (dist_f) + free_bvhtree_from_mesh(&treeData_f); +} + +/** + * Returns the real distance between a vertex and another reference object. + * Note that it works in final world space (i.e. with constraints etc. applied). + */ +static void get_vert2ob_distance(int numVerts, float (*v_cos)[3], float *dist, + const Object* ob, const Object* obr) +{ + /* Vertex and ref object coordinates. */ + float v_wco[3], + or_wco[3], + or_wro[3][3], /*unused*/ + or_wsz[3]; /*unused*/ + int i; + + /* Get world-coordinates of the reference object (constraints and anim included). + * We also get rotation and scale, even though we do not want them… + */ + mat4_to_loc_rot_size(or_wco, or_wro, or_wsz, (float (*)[4])obr->obmat); + + for (i = 0; i < numVerts; i++) { + /* Get world-coordinates of the vertex (constraints and anim included). */ + mul_v3_m4v3(v_wco, (float (*)[4])ob->obmat, v_cos[i]); + /* Return distance between both coordinates. */ + dist[i] = len_v3v3(v_wco, or_wco); + } +} + +/** + * Returns the real distance between an object and another reference object. + * Note that it works in final world space (i.e. with constraints etc. applied). + */ +static float get_ob2ob_distance(const Object* ob, const Object* obr) +{ + /* Both objects coordinates. */ + float o_wco[3], + o_wro[3][3], /*unused*/ + o_wsz[3], /*unused*/ + or_wco[3], + or_wro[3][3],/*unused*/ + or_wsz[3]; /*unused*/ + /* Get world-coordinates of both objects (constraints and anim included). + * We also get rotation and scale, even though we do not want them… + */ + mat4_to_loc_rot_size(o_wco, o_wro, o_wsz, (float (*)[4])ob->obmat); + mat4_to_loc_rot_size(or_wco, or_wro, or_wsz, (float (*)[4])obr->obmat); + /* Return distance between both coordinates. */ + return len_v3v3(o_wco, or_wco); +} + +/************************************** + * Modifiers functions. * + **************************************/ +static void initData(ModifierData *md) +{ + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; + + wmd->proximity_mode = MOD_WVG_PROXIMITY_OBJ2OBJDIST; + wmd->proximity_flags = MOD_WVG_PROXIMITY_O2VD_VERTS; + + wmd->mask_constant = 1.0f; + wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ + wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL; +} + +static void copyData(ModifierData *md, ModifierData *target) +{ + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; + WeightVGProximityModifierData *twmd = (WeightVGProximityModifierData*) target; + + BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name)); + twmd->proximity_mode = wmd->proximity_mode; + twmd->proximity_flags = wmd->proximity_flags; + twmd->proximity_ob_target = wmd->proximity_ob_target; + + twmd->mask_constant = wmd->mask_constant; + BLI_strncpy(twmd->mask_defgrp_name, wmd->mask_defgrp_name, sizeof(twmd->mask_defgrp_name)); + twmd->mask_texture = wmd->mask_texture; + twmd->mask_tex_use_channel = wmd->mask_tex_use_channel; + twmd->mask_tex_mapping = wmd->mask_tex_mapping; + twmd->mask_tex_map_obj = wmd->mask_tex_map_obj; + BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, + sizeof(twmd->mask_tex_uvlayer_name)); +} + +static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) +{ + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; + CustomDataMask dataMask = 0; + + /* We need vertex groups! */ + dataMask |= CD_MASK_MDEFORMVERT; + + /* Ask for UV coordinates if we need them. */ + if(wmd->mask_tex_mapping == MOD_DISP_MAP_UV) + dataMask |= CD_MASK_MTFACE; + + return dataMask; +} + +static int dependsOnTime(ModifierData *md) +{ + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; + + if(wmd->mask_texture) + return BKE_texture_dependsOnTime(wmd->mask_texture); + return 0; +} + +static void foreachObjectLink(ModifierData *md, Object *ob, + void (*walk)(void *userData, Object *ob, Object **obpoin), + void *userData) +{ + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; + walk(userData, ob, &wmd->proximity_ob_target); + walk(userData, ob, &wmd->mask_tex_map_obj); +} + +static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData) +{ + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; + + walk(userData, ob, (ID **)&wmd->mask_texture); + + foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); +} + +static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), + Object *UNUSED(ob), DagNode *obNode) +{ + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; + DagNode *curNode; + + if (wmd->proximity_ob_target) { + curNode = dag_get_node(forest, wmd->proximity_ob_target); + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, + "WeightVGProximity Modifier"); + } + + if(wmd->mask_tex_map_obj && wmd->mask_tex_mapping == MOD_DISP_MAP_OBJECT) { + curNode = dag_get_node(forest, wmd->mask_tex_map_obj); + + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, + "WeightVGProximity Modifier"); + } + + if(wmd->mask_tex_mapping == MOD_DISP_MAP_GLOBAL) + dag_add_relation(forest, obNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, + "WeightVGProximity Modifier"); +} + +static int isDisabled(ModifierData *md, int UNUSED(useRenderParams)) +{ + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; + /* If no vertex group, bypass. */ + if (wmd->defgrp_name == NULL) return 1; + /* If no target object, bypass. */ + return (wmd->proximity_ob_target == NULL); +} + +static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData, + int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) +{ + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; + DerivedMesh *dm = derivedData; + DerivedMesh *ret; + MDeformVert *dvert = NULL; + int numVerts; + float (*v_cos)[3] = NULL; /* The vertices coordinates. */ + Object *obr; /* Our target object. */ + int defgrp_idx; + float *tw = NULL; + float *org_w = NULL; + float *new_w =NULL; + int *tidx, *indices = NULL; + int numIdx = 0; + int i, j; + char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */ + + /* Get number of verts. */ + numVerts = dm->getNumVerts(dm); + + /* Check if we can just return the original mesh. + * Must have verts and therefore verts assigned to vgroups to do anything useful! + */ + if ((numVerts == 0) || (ob->defbase.first == NULL)) + return dm; + + /* Create a copy of our dmesh. + * TODO: This should be done only if needed ! + */ + if (1) { + /* XXX Seems to create problems with weightpaint mode... */ +// DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ + ret = CDDM_copy(dm); + rel_ret = 1; + } + else + ret = dm; + + /* Get vgroup idx from its name. */ + defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); + + /* Get actual dverts (ie vertex group data). */ + if (defgrp_idx >= 0) + dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); + /* Get our target object. */ + obr = wmd->proximity_ob_target; + /* If no dverts or target object, return unmodified data… */ + if ((defgrp_idx < 0) || (dvert == NULL) || (!obr)) { + if (rel_ret) + ret->release(ret); + return dm; + } + + /* Find out which vertices to work on (all vertices in vgroup), and get their relevant weight. + */ + tidx = MEM_mallocN(sizeof(int) * numVerts, "WeightVGProximity Modifier, tidx"); + tw = MEM_mallocN(sizeof(float) * numVerts, "WeightVGProximity Modifier, tw"); + for (i = 0; i < numVerts; i++) { + for (j = 0; j < dvert[i].totweight; j++) { + if(dvert[i].dw[j].def_nr == defgrp_idx) { + tidx[numIdx] = i; + tw[numIdx++] = dvert[i].dw[j].weight; + break; + } + } + } + indices = MEM_mallocN(sizeof(int) * numIdx, "WeightVGProximity Modifier, indices"); + memcpy(indices, tidx, sizeof(int) * numIdx); + org_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, org_w"); + new_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, new_w"); + memcpy(org_w, tw, sizeof(float) * numIdx); + MEM_freeN(tidx); + MEM_freeN(tw); + + /* Get our vertex coordinates. */ + v_cos = MEM_mallocN(sizeof(float[3]) * numIdx, "WeightVGProximity Modifier, v_cos"); + for (i = 0; i < numIdx; i++) + ret->getVertCo(ret, indices[i], v_cos[i]); + + /* Compute wanted distances. */ + if (wmd->proximity_mode == MOD_WVG_PROXIMITY_OBJ2OBJDIST) { + float dist = get_ob2ob_distance(ob, obr); + for(i = 0; i < numIdx; i++) + new_w[i] = dist; + } + else if (wmd->proximity_mode == MOD_WVG_PROXIMITY_OBJ2VERTDIST) { + char use_trgt_verts = (wmd->proximity_flags & MOD_WVG_PROXIMITY_O2VD_VERTS); + char use_trgt_edges = (wmd->proximity_flags & MOD_WVG_PROXIMITY_O2VD_EDGES); + char use_trgt_faces = (wmd->proximity_flags & MOD_WVG_PROXIMITY_O2VD_FACES); + + if (use_trgt_verts || use_trgt_edges || use_trgt_faces) { + DerivedMesh *target_dm = obr->derivedFinal; + if (!target_dm) { + if (ELEM3(obr->type, OB_CURVE, OB_SURF, OB_FONT)) + target_dm = CDDM_from_curve(obr); + else if (obr->type == OB_MESH) { + Mesh *me = (Mesh*)obr->data; + if (me->edit_mesh) + target_dm = CDDM_from_editmesh((EditMesh*)me->edit_mesh, me); + else + target_dm = CDDM_from_mesh(me, obr); + } + } + + /* We must check that we do have a valid target_dm! */ + if (target_dm) { + SpaceTransform loc2trgt; + float *dists_v = use_trgt_verts ? MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, dists_v") : NULL; + float *dists_e = use_trgt_edges ? MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, dists_e") : NULL; + float *dists_f = use_trgt_faces ? MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, dists_f") : NULL; + + space_transform_setup(&loc2trgt, ob, obr); + get_vert2geom_distance(numIdx, v_cos, dists_v, dists_e, dists_f, + target_dm, &loc2trgt); + for(i = 0; i < numIdx; i++) { + new_w[i] = dists_v ? dists_v[i] : FLT_MAX; + new_w[i] = dists_e ? minf(dists_e[i], new_w[i]) : new_w[i]; + new_w[i] = dists_f ? minf(dists_f[i], new_w[i]) : new_w[i]; + } + } + /* Else, fall back to default obj2vert behavior. */ + else + get_vert2ob_distance(numIdx, v_cos, new_w, ob, obr); + } + else + get_vert2ob_distance(numIdx, v_cos, new_w, ob, obr); + } + + /* Do masking. */ + weightvg_do_mask(numIdx, indices, org_w, new_w, ob, ret, wmd->mask_constant, + wmd->mask_defgrp_name, wmd->mask_texture, wmd->mask_tex_use_channel, + wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name); + + /* Update vgroup. Note we never add nor remove vertices from vgroup here. */ + weightvg_update_vg(dvert, defgrp_idx, numIdx, indices, org_w, 0, 0.0f, 0, 0.0f); + + /* Freeing stuff. */ + if (org_w) + MEM_freeN(org_w); + if (new_w) + MEM_freeN(new_w); + if (indices) + MEM_freeN(indices); + if (v_cos) + MEM_freeN(v_cos); + + /* Return the vgroup-modified mesh. */ + return ret; +} + +static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, + struct EditMesh *UNUSED(editData), + DerivedMesh *derivedData) +{ + return applyModifier(md, ob, derivedData, 0, 1); +} + + +ModifierTypeInfo modifierType_WeightVGProximity = { + /* name */ "WeightVGProximity", + /* structName */ "WeightVGProximityModifierData", + /* structSize */ sizeof(WeightVGProximityModifierData), + /* type */ eModifierTypeType_Nonconstructive, + /* flags */ eModifierTypeFlag_AcceptsMesh + |eModifierTypeFlag_SupportsMapping + |eModifierTypeFlag_SupportsEditmode, + + /* copyData */ copyData, + /* deformVerts */ NULL, + /* deformMatrices */ NULL, + /* deformVertsEM */ NULL, + /* deformMatricesEM */ NULL, + /* applyModifier */ applyModifier, + /* applyModifierEM */ applyModifierEM, + /* initData */ initData, + /* requiredDataMask */ requiredDataMask, + /* freeData */ NULL, + /* isDisabled */ isDisabled, + /* updateDepgraph */ updateDepgraph, + /* dependsOnTime */ dependsOnTime, + /* dependsOnNormals */ NULL, + /* foreachObjectLink */ foreachObjectLink, + /* foreachIDLink */ foreachIDLink, +}; + -- cgit v1.2.3 From af286ac95b5dbd0a09e433ba672c75f126b206c2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 26 Jul 2011 18:51:35 +0000 Subject: =?UTF-8?q?vgroup=5Fmodifiers:=20Addressed=20most=20ideasman?= =?UTF-8?q?=E2=80=99s=20remarks=20and=20suggestions=20in=20his=20last=20re?= =?UTF-8?q?view.=20*Removed=20curve=20init=20code=20in=20readfile=20(no=20?= =?UTF-8?q?more=20needed=20since=20the=20split=20broke=20anyway=20compatib?= =?UTF-8?q?ility=20with=20earlier=20WeightVGroup=20files=E2=80=A6).=20*Upd?= =?UTF-8?q?ated=20get=5Fob2ob=5Fdistance()=20code=20(much=20simpler=20?= =?UTF-8?q?=E2=80=93=C2=A0I=E2=80=99m=20not=20a=20matrices=E2=80=99=20god!?= =?UTF-8?q?).=20*Enhanced=20a=20few=20RNA=20names=20(Campbell=20has=20othe?= =?UTF-8?q?rs=20in=20mind=20here,=20though,=20I=20think).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/blender/blenloader/intern/readfile.c | 18 +----------------- source/blender/makesrna/intern/rna_modifier.c | 12 +++++++----- .../blender/modifiers/intern/MOD_weightvgproximity.c | 15 +-------------- 3 files changed, 9 insertions(+), 36 deletions(-) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e21a132d16d..ce4a5d21759 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -11714,24 +11714,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* put compatibility code here until next subversion bump */ { - Object *ob; - ModifierData *md; - - /* WeightVGEdit modifier: CurveMapping pointer… */ - for(ob = main->object.first; ob; ob = ob->id.next) { - for(md = ob->modifiers.first; md; md = md->next) { - if(md->type == eModifierType_WeightVGEdit) { - WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; - if (wmd->cmap_curve == NULL) { - wmd->cmap_curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); - curvemapping_initialize(wmd->cmap_curve); - } - } - } - } - } - + /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */ diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index fff99cbdf15..39d3e5873bb 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2728,8 +2728,10 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna) static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) { static EnumPropertyItem weightvg_proximity_modes_items[] = { - {MOD_WVG_PROXIMITY_OBJ2OBJDIST, "OBJ2OBJDIST", 0, "O2O Distance", ""}, - {MOD_WVG_PROXIMITY_OBJ2VERTDIST, "OBJ2VERTDIST", 0, "O2V Distance", ""}, + {MOD_WVG_PROXIMITY_OBJ2OBJDIST, "OBJ2OBJDIST", 0, "Object Distance", + "Use distance between affected and target objects."}, + {MOD_WVG_PROXIMITY_OBJ2VERTDIST, "OBJ2VERTDIST", 0, "Verts Distance", + "Use distance between affected object’s vertices and target object, or target object’s geometry."}, {0, NULL, 0, NULL, NULL}}; StructRNA *srna; @@ -2755,19 +2757,19 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) prop= RNA_def_property(srna, "obj2vert_verts", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_VERTS); - RNA_def_property_ui_text(prop, "Use Target Vertices", + RNA_def_property_ui_text(prop, "Verts as Target", "Use shortest distance to target object’s vertices as weight."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "obj2vert_edges", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_EDGES); - RNA_def_property_ui_text(prop, "Use Target Edges", + RNA_def_property_ui_text(prop, "Edges as Target", "Use shortest distance to target object’s edges as weight."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "obj2vert_faces", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_FACES); - RNA_def_property_ui_text(prop, "Use Target Faces", + RNA_def_property_ui_text(prop, "Faces as Target", "Use shortest distance to target object’s faces as weight."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 7349d90c1ec..06ffb5e4510 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -197,20 +197,7 @@ static void get_vert2ob_distance(int numVerts, float (*v_cos)[3], float *dist, */ static float get_ob2ob_distance(const Object* ob, const Object* obr) { - /* Both objects coordinates. */ - float o_wco[3], - o_wro[3][3], /*unused*/ - o_wsz[3], /*unused*/ - or_wco[3], - or_wro[3][3],/*unused*/ - or_wsz[3]; /*unused*/ - /* Get world-coordinates of both objects (constraints and anim included). - * We also get rotation and scale, even though we do not want them… - */ - mat4_to_loc_rot_size(o_wco, o_wro, o_wsz, (float (*)[4])ob->obmat); - mat4_to_loc_rot_size(or_wco, or_wro, or_wsz, (float (*)[4])obr->obmat); - /* Return distance between both coordinates. */ - return len_v3v3(o_wco, or_wco); + return len_v3v3(ob->obmat[3], obr->obmat[3]); } /************************************** -- cgit v1.2.3 From 048eabf302b024a6f98907ece0d22c63b1c95dca Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 27 Jul 2011 18:48:23 +0000 Subject: vgroup_modifiers: coded a way to test whether the dm needs to be copied (i.e. if the affected cdata layer is or not the original one). However, as this piece of code tends to slow down things (see e.g. scene 5 of WeightVG test blend file), I deactivated it for now... --- source/blender/modifiers/intern/MOD_weightvgedit.c | 54 +++++++++++++----- source/blender/modifiers/intern/MOD_weightvgmix.c | 64 +++++++++++++++------- .../modifiers/intern/MOD_weightvgproximity.c | 63 +++++++++++++++------ 3 files changed, 129 insertions(+), 52 deletions(-) diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index c8d7ab52ce8..e84ecffa74b 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -190,8 +190,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) { WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; - DerivedMesh *dm = derivedData; - DerivedMesh *ret; + DerivedMesh *dm = derivedData, *ret = NULL; + Mesh *ob_m = NULL; MDeformVert *dvert = NULL; float *org_w = NULL; /* Array original weights. */ float *new_w = NULL; /* Array new weights. */ @@ -217,30 +217,54 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der if ((numVerts == 0) || (ob->defbase.first == NULL)) return dm; - /* Create a copy of our dmesh. - * TODO: This should be done only if needed, i.e. if dm has the org data ! + /* Get vgroup idx from its name. */ + defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); + if (defgrp_idx < 0) + return dm; + + /* XXX All this to avoid copying dm when not needed… However, it nearly doubles compute + * time! See scene 5 of the WeighVG test file… */ - if (1) { - /* XXX Seems to create problems with weightpaint mode... */ +#if 0 + /* Get actual dverts (ie vertex group data). */ + dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT); + /* If no dverts, return unmodified data… */ + if (dvert == NULL) + return dm; + + /* Get org mesh, only to test whether affected cdata layer has already been copied + * somewhere up in the modifiers stack. + */ + ob_m = get_mesh(ob); + if (ob_m == NULL) + return dm; + + /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */ + if (dvert == CustomData_get_layer(&ob_m->vdata, CD_MDEFORMVERT)) { + /* XXX Seems to create problems with weightpaint mode??? + * I’m missing something here, I guess… + */ // DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ ret = CDDM_copy(dm); + dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); + if (dvert == NULL) { + ret->release(ret); + return dm; + } rel_ret = 1; } else ret = dm; - - /* Get vgroup idx from its name. */ - defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); - - /* Get actual dverts (ie vertex group data). */ - if (defgrp_idx >= 0) - dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); - /* If no dverts, return unmodified data… */ - if ((defgrp_idx < 0) || (dvert == NULL)) { +#else + ret = CDDM_copy(dm); + rel_ret = 1; + dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); + if (dvert == NULL) { if (rel_ret) ret->release(ret); return dm; } +#endif /* Get org weights, assuming 0.0 for vertices not in given vgroup. */ org_w = MEM_mallocN(sizeof(float) * numVerts, "WeightVGEdit Modifier, org_w"); diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index c4f107de72e..f99060bdf63 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -220,8 +220,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) { WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; - DerivedMesh *dm = derivedData; - DerivedMesh *ret; + DerivedMesh *dm = derivedData, *ret = NULL; + Mesh *ob_m = NULL; MDeformVert *dvert = NULL; int numVerts; int defgrp_idx, defgrp_idx2 = -1; @@ -241,34 +241,60 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der if ((numVerts == 0) || (ob->defbase.first == NULL)) return dm; - /* Create a copy of our dmesh. - * TODO: This should be done only if needed ! + /* Get vgroup idx from its name. */ + defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); + if (defgrp_idx < 0) + return dm; + /* Get seconf vgroup idx from its name, if given. */ + if (wmd->defgrp_name2[0] != (char)0) { + defgrp_idx2 = defgroup_name_index(ob, wmd->defgrp_name2); + if (defgrp_idx2 < 0) + return dm; + } + + /* XXX All this to avoid copying dm when not needed… However, it nearly doubles compute + * time! See scene 5 of the WeighVG test file… + */ +#if 0 + /* Get actual dverts (ie vertex group data). */ + dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT); + /* If no dverts, return unmodified data… */ + if (dvert == NULL) + return dm; + + /* Get org mesh, only to test whether affected cdata layer has already been copied + * somewhere up in the modifiers stack. */ - if (1) { - /* XXX Seems to create problems with weightpaint mode... */ + ob_m = get_mesh(ob); + if (ob_m == NULL) + return dm; + + /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */ + if (dvert == CustomData_get_layer(&ob_m->vdata, CD_MDEFORMVERT)) { + /* XXX Seems to create problems with weightpaint mode??? + * I’m missing something here, I guess… + */ // DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ ret = CDDM_copy(dm); + dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); + if (dvert == NULL) { + ret->release(ret); + return dm; + } rel_ret = 1; } else ret = dm; - - /* Get first vgroup idx from its name. */ - defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); - - /* Get seconf vgroup idx from its name, if given. */ - if (wmd->defgrp_name2) - defgrp_idx2 = defgroup_name_index(ob, wmd->defgrp_name2); - - /* Get actual dverts (ie vertex group data). */ - if (defgrp_idx >= 0) - dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); - /* If no dverts, return unmodified data… */ - if ((defgrp_idx < 0) || (dvert == NULL)) { +#else + ret = CDDM_copy(dm); + rel_ret = 1; + dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); + if (dvert == NULL) { if (rel_ret) ret->release(ret); return dm; } +#endif /* Find out which vertices to work on. */ tidx = MEM_mallocN(sizeof(int) * numVerts, "WeightVGMix Modifier, tidx"); diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 06ffb5e4510..80524eec9af 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -314,12 +314,12 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) { WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; - DerivedMesh *dm = derivedData; - DerivedMesh *ret; + DerivedMesh *dm = derivedData, *ret = NULL; + Mesh *ob_m = NULL; MDeformVert *dvert = NULL; int numVerts; float (*v_cos)[3] = NULL; /* The vertices coordinates. */ - Object *obr; /* Our target object. */ + Object *obr = NULL; /* Our target object. */ int defgrp_idx; float *tw = NULL; float *org_w = NULL; @@ -338,32 +338,59 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der if ((numVerts == 0) || (ob->defbase.first == NULL)) return dm; - /* Create a copy of our dmesh. - * TODO: This should be done only if needed ! + /* Get our target object. */ + obr = wmd->proximity_ob_target; + if (obr == NULL) + return dm; + + /* Get vgroup idx from its name. */ + defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); + if (defgrp_idx < 0) + return dm; + + /* XXX All this to avoid copying dm when not needed… However, it nearly doubles compute + * time! See scene 5 of the WeighVG test file… */ - if (1) { - /* XXX Seems to create problems with weightpaint mode... */ +#if 0 + /* Get actual dverts (ie vertex group data). */ + dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT); + /* If no dverts, return unmodified data… */ + if (dvert == NULL) + return dm; + + /* Get org mesh, only to test whether affected cdata layer has already been copied + * somewhere up in the modifiers stack. + */ + ob_m = get_mesh(ob); + if (ob_m == NULL) + return dm; + + /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */ + if (dvert == CustomData_get_layer(&ob_m->vdata, CD_MDEFORMVERT)) { + /* XXX Seems to create problems with weightpaint mode??? + * I’m missing something here, I guess… + */ // DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ ret = CDDM_copy(dm); + dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); + if (dvert == NULL) { + ret->release(ret); + return dm; + } rel_ret = 1; } else ret = dm; - - /* Get vgroup idx from its name. */ - defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); - - /* Get actual dverts (ie vertex group data). */ - if (defgrp_idx >= 0) - dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); - /* Get our target object. */ - obr = wmd->proximity_ob_target; - /* If no dverts or target object, return unmodified data… */ - if ((defgrp_idx < 0) || (dvert == NULL) || (!obr)) { +#else + ret = CDDM_copy(dm); + rel_ret = 1; + dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT); + if (dvert == NULL) { if (rel_ret) ret->release(ret); return dm; } +#endif /* Find out which vertices to work on (all vertices in vgroup), and get their relevant weight. */ -- cgit v1.2.3 From fb99e23205aa1eb7b3f47b8f43e8b812f598a574 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 28 Jul 2011 01:38:48 +0000 Subject: minor cleanup of rna - use an rna enum-set for proximity vert/edge/face options. - rename some flags. - better conform to rna naming conventions. --- .../startup/bl_ui/properties_data_modifier.py | 40 ++++++++-------- source/blender/makesdna/DNA_modifier_types.h | 20 ++++---- source/blender/makesrna/intern/rna_modifier.c | 55 ++++++++++------------ source/blender/modifiers/intern/MOD_weightvgedit.c | 10 ++-- .../modifiers/intern/MOD_weightvgproximity.c | 22 +++++---- 5 files changed, 73 insertions(+), 74 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 18ae7ec2be6..a789a65c0f8 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -777,8 +777,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): col.label(text="Default Weight:") col.prop(md, "default_weight", text="") - layout.prop(md, "flag_map") - if md.flag_map: + layout.prop(md, "use_map") + if md.use_map: split = layout.split() col = split.column() col.label("Input:") @@ -790,27 +790,27 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): col.prop(md, "map_input_high", text="Max") col.prop(md, "map_output_high", text="Max") - layout.prop(md, "flag_curve_map") - if md.flag_curve_map: - row = layout.row() - row.template_curve_mapping(md, "cmap_curve") + layout.prop(md, "use_map_curve") + if md.use_map_curve: + col = layout.column() + col.template_curve_mapping(md, "map_curve") - layout.prop(md, "flag_reverse") + layout.prop(md, "use_reverse") - layout.prop(md, "flag_clamp") - if md.flag_clamp: + layout.prop(md, "use_clamp") + if md.use_clamp: row = layout.row() - row.prop(md, "clamp_min_weight") - row.prop(md, "clamp_max_weight") + row.prop(md, "clamp_weight_min") + row.prop(md, "clamp_weight_max") row = layout.row() - row.prop(md, "flag_add2vg") - row.prop(md, "flag_remfvg") + row.prop(md, "use_add") + row.prop(md, "use_remove") row = layout.row() - if md.flag_add2vg: + if md.use_add: row.prop(md, "add_threshold") - if md.flag_remfvg: - row.prop(md, "rem_threshold") + if md.use_remove: + row.prop(md, "remove_threshold") # Common mask options… layout.separator() @@ -850,15 +850,13 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): col = split.column() col.label(text="Target Object:") - col.prop(md, "ob_target", text="") + col.prop(md, "target", text="") row = layout.row() row.prop(md, "proximity_mode", expand=True) - if md.proximity_mode == 'OBJ2VERTDIST': + if md.proximity_mode == 'GEOMETRY': row = layout.row() - row.prop(md, "obj2vert_verts") - row.prop(md, "obj2vert_edges") - row.prop(md, "obj2vert_faces") + row.prop(md, "proximity_geometry", expand=True) # Common mask options… layout.separator() diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 2b1111e1308..cc8da863c44 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -810,7 +810,7 @@ typedef struct WeightVGEditModifierData { float add_threshold, rem_threshold; /* Clamping options. */ - float clamp_min_weight, clamp_max_weight; + float clamp_weight_min, clamp_weight_max; /* Masking options. */ float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */ @@ -846,7 +846,7 @@ typedef struct WeightVGEditModifierData { typedef struct WeightVGMixModifierData { ModifierData modifier; - /* XXX Note: I tried to keep everything logically ordered – provided the + /* XXX Note: I tried to keep everything logically ordered – provided the * alignment constraints… */ @@ -926,17 +926,17 @@ typedef struct WeightVGProximityModifierData { /* Modes of proximity weighting. */ /* Dist from target object to affected object. */ -#define MOD_WVG_PROXIMITY_OBJ2OBJDIST 1 +#define MOD_WVG_PROXIMITY_OBJECT 1 /* source vertex to other location */ /* Dist from target object to vertex. */ -#define MOD_WVG_PROXIMITY_OBJ2VERTDIST 2 +#define MOD_WVG_PROXIMITY_GEOMETRY 2 /* source vertex to other geometry */ /* Flags options for proximity weighting. */ -/* Use nearest vertices of target obj, in OVJ2VERTDIST mode. */ -#define MOD_WVG_PROXIMITY_O2VD_VERTS (1 << 0) -/* Use nearest edges of target obj, in OVJ2VERTDIST mode. */ -#define MOD_WVG_PROXIMITY_O2VD_EDGES (1 << 1) -/* Use nearest faces of target obj, in OVJ2VERTDIST mode. */ -#define MOD_WVG_PROXIMITY_O2VD_FACES (1 << 2) +/* Use nearest vertices of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */ +#define MOD_WVG_PROXIMITY_GEOM_VERTS (1 << 0) +/* Use nearest edges of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */ +#define MOD_WVG_PROXIMITY_GEOM_EDGES (1 << 1) +/* Use nearest faces of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */ +#define MOD_WVG_PROXIMITY_GEOM_FACES (1 << 2) /* Defines common to all WeightVG modifiers. */ /* Tex channel to be used as mask. */ diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 39d3e5873bb..75449382c5e 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2553,34 +2553,34 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "flag_map", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_map", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_MAP); RNA_def_property_ui_text(prop, "Map", "Map vertex group weights."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "flag_curve_map", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_map_curve", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_CMAP); RNA_def_property_ui_text(prop, "Curve Map", "Map vertex group weights with a curve."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "flag_reverse", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_reverse", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REVERSE_WEIGHTS); RNA_def_property_ui_text(prop, "Reverse", "Reverse vertex group weights."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "flag_add2vg", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_ADD2VG); RNA_def_property_ui_text(prop, "Add to VG", "Add vertices with weight over threshold " "to vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "flag_remfvg", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_remove", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REMFVG); RNA_def_property_ui_text(prop, "Rem from VG", "Remove vertices with weight below threshold " "from vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "flag_clamp", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_CLAMP); RNA_def_property_ui_text(prop, "Clamp", "Clamp vertex group weights."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2620,32 +2620,34 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Output High Weight", "High output mapping value."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "cmap_curve", PROP_POINTER, PROP_NONE); + prop= RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve"); RNA_def_property_ui_text(prop, "Mapping Curve", "Custom mapping curve."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "add_threshold", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "add_threshold"); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); RNA_def_property_ui_text(prop, "Add Threshold", "Lower bound for a vertex’s weight " "to be added to the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "rem_threshold", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "remove_threshold", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rem_threshold"); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); RNA_def_property_ui_text(prop, "Rem Threshold", "Upper bound for a vertex’s weight " "to be removed from the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "clamp_min_weight", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "clamp_weight_min", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); RNA_def_property_ui_text(prop, "Min Weight", "Lowest weight a vertex can get."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "clamp_max_weight", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "clamp_weight_max", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); RNA_def_property_ui_text(prop, "Max Weight", "Highest weight a vertex can get."); @@ -2728,12 +2730,18 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna) static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) { static EnumPropertyItem weightvg_proximity_modes_items[] = { - {MOD_WVG_PROXIMITY_OBJ2OBJDIST, "OBJ2OBJDIST", 0, "Object Distance", + {MOD_WVG_PROXIMITY_OBJECT, "OBJECT", 0, "Object Distance", "Use distance between affected and target objects."}, - {MOD_WVG_PROXIMITY_OBJ2VERTDIST, "OBJ2VERTDIST", 0, "Verts Distance", + {MOD_WVG_PROXIMITY_GEOMETRY, "GEOMETRY", 0, "Geometry Distance", "Use distance between affected object’s vertices and target object, or target object’s geometry."}, {0, NULL, 0, NULL, NULL}}; + static EnumPropertyItem proximity_geometry_items[] = { + {MOD_WVG_PROXIMITY_GEOM_VERTS, "VERTEX", ICON_VERTEXSEL, "Vertex", ""}, + {MOD_WVG_PROXIMITY_GEOM_EDGES, "EDGE", ICON_EDGESEL, "Edge", ""}, + {MOD_WVG_PROXIMITY_GEOM_FACES, "FACE", ICON_FACESEL, "Face", ""}, + {0, NULL, 0, NULL, NULL}}; + StructRNA *srna; PropertyRNA *prop; @@ -2755,25 +2763,14 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Proximity Mode", "Which distances to target object to use."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "obj2vert_verts", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_VERTS); - RNA_def_property_ui_text(prop, "Verts as Target", - "Use shortest distance to target object’s vertices as weight."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); - - prop= RNA_def_property(srna, "obj2vert_edges", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_EDGES); - RNA_def_property_ui_text(prop, "Edges as Target", - "Use shortest distance to target object’s edges as weight."); + prop= RNA_def_property(srna, "proximity_geometry", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "proximity_flags"); + RNA_def_property_enum_items(prop, proximity_geometry_items); + RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */ + RNA_def_property_ui_text(prop, "Proximity Geometry", "Use shortest distance to target object’s geometry as weight"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "obj2vert_faces", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_FACES); - RNA_def_property_ui_text(prop, "Faces as Target", - "Use shortest distance to target object’s faces as weight."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); - - prop= RNA_def_property(srna, "ob_target", PROP_POINTER, PROP_NONE); + prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "proximity_ob_target"); RNA_def_property_ui_text(prop, "Target Object", "Object to calculate vertices’ distances from."); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index e84ecffa74b..5bc185a40af 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -71,8 +71,8 @@ static void initData(ModifierData *md) wmd->cmap_curve = curvemapping_add(1, 0.0, 0.0, 1.0, 1.0); curvemapping_initialize(wmd->cmap_curve); - wmd->clamp_min_weight = 0.0f; - wmd->clamp_max_weight = 1.0f; + wmd->clamp_weight_min = 0.0f; + wmd->clamp_weight_max = 1.0f; wmd->add_threshold = 0.01f; wmd->rem_threshold = 0.01f; @@ -104,8 +104,8 @@ static void copyData(ModifierData *md, ModifierData *target) twmd->map_new_max = wmd->map_new_max; twmd->cmap_curve = curvemapping_copy(wmd->cmap_curve); - twmd->clamp_min_weight = wmd->clamp_min_weight; - twmd->clamp_max_weight = wmd->clamp_max_weight; + twmd->clamp_weight_min = wmd->clamp_weight_min; + twmd->clamp_weight_max = wmd->clamp_weight_max; twmd->add_threshold = wmd->add_threshold; twmd->rem_threshold = wmd->rem_threshold; @@ -311,7 +311,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der /* Do clamping. */ if (do_clamp) { for (i = 0; i < numVerts; i++) - CLAMP(org_w[i], wmd->clamp_min_weight, wmd->clamp_max_weight); + CLAMP(org_w[i], wmd->clamp_weight_min, wmd->clamp_weight_max); } /* Update/add/remove from vgroup. */ diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 80524eec9af..84de87a4662 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -207,8 +207,8 @@ static void initData(ModifierData *md) { WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; - wmd->proximity_mode = MOD_WVG_PROXIMITY_OBJ2OBJDIST; - wmd->proximity_flags = MOD_WVG_PROXIMITY_O2VD_VERTS; + wmd->proximity_mode = MOD_WVG_PROXIMITY_OBJECT; + wmd->proximity_flags = MOD_WVG_PROXIMITY_GEOM_VERTS; wmd->mask_constant = 1.0f; wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ @@ -315,7 +315,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der { WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; DerivedMesh *dm = derivedData, *ret = NULL; +#if 0 Mesh *ob_m = NULL; +#endif MDeformVert *dvert = NULL; int numVerts; float (*v_cos)[3] = NULL; /* The vertices coordinates. */ @@ -419,15 +421,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der ret->getVertCo(ret, indices[i], v_cos[i]); /* Compute wanted distances. */ - if (wmd->proximity_mode == MOD_WVG_PROXIMITY_OBJ2OBJDIST) { + if (wmd->proximity_mode == MOD_WVG_PROXIMITY_OBJECT) { float dist = get_ob2ob_distance(ob, obr); for(i = 0; i < numIdx; i++) new_w[i] = dist; } - else if (wmd->proximity_mode == MOD_WVG_PROXIMITY_OBJ2VERTDIST) { - char use_trgt_verts = (wmd->proximity_flags & MOD_WVG_PROXIMITY_O2VD_VERTS); - char use_trgt_edges = (wmd->proximity_flags & MOD_WVG_PROXIMITY_O2VD_EDGES); - char use_trgt_faces = (wmd->proximity_flags & MOD_WVG_PROXIMITY_O2VD_FACES); + else if (wmd->proximity_mode == MOD_WVG_PROXIMITY_GEOMETRY) { + const short use_trgt_verts = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_VERTS); + const short use_trgt_edges = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_EDGES); + const short use_trgt_faces = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_FACES); if (use_trgt_verts || use_trgt_edges || use_trgt_faces) { DerivedMesh *target_dm = obr->derivedFinal; @@ -460,11 +462,13 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der } } /* Else, fall back to default obj2vert behavior. */ - else + else { get_vert2ob_distance(numIdx, v_cos, new_w, ob, obr); + } } - else + else { get_vert2ob_distance(numIdx, v_cos, new_w, ob, obr); + } } /* Do masking. */ -- cgit v1.2.3 From a22f75606e2c179460bfa36a9a4afd4b9548d5f5 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 29 Jul 2011 13:25:58 +0000 Subject: =?UTF-8?q?vgroup=5Fmodifiers:=20Fixed=20last=20problems=20with=20?= =?UTF-8?q?WP=20mode,=20plus=20a=20small=20fix=20in=20weightvg=5Futil.c.?= =?UTF-8?q?=20It=20seems=20WeightVG=20modifiers=20can=E2=80=99t=20enable?= =?UTF-8?q?=20the=20eModifierTypeFlag=5FSupportsMapping=20flag...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/blender/modifiers/intern/MOD_weightvg_util.c | 8 +++++--- source/blender/modifiers/intern/MOD_weightvgedit.c | 4 +++- source/blender/modifiers/intern/MOD_weightvgmix.c | 4 +++- source/blender/modifiers/intern/MOD_weightvgproximity.c | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index c18fceb1e3f..1fe1a96c2e5 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -187,6 +187,7 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indice for (i = 0; i < num; i++) { int j; + char add2vg = do_add; float w = weights[i]; MDeformVert *dv = &dvert[indices ? indices[i] : i]; MDeformWeight *newdw; @@ -221,16 +222,17 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indice } } /* Else, just set the new computed weight. */ - else + else { dv->dw[j].weight = w; + } + add2vg = 0; break; } - continue; } /* If the vert wasn’t in the deform group, add it if needed! */ - if (do_add && w > add_thresh) { + if (add2vg && w > add_thresh) { newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "WeightVGEdit Modifier, deformWeight"); if(dv->dw) { memcpy(newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight); diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index 5bc185a40af..57c93cdfddf 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -191,7 +191,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der { WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; DerivedMesh *dm = derivedData, *ret = NULL; +#if 0 Mesh *ob_m = NULL; +#endif MDeformVert *dvert = NULL; float *org_w = NULL; /* Array original weights. */ float *new_w = NULL; /* Array new weights. */ @@ -344,7 +346,7 @@ ModifierTypeInfo modifierType_WeightVGEdit = { /* structSize */ sizeof(WeightVGEditModifierData), /* type */ eModifierTypeType_Nonconstructive, /* flags */ eModifierTypeFlag_AcceptsMesh - |eModifierTypeFlag_SupportsMapping +/* |eModifierTypeFlag_SupportsMapping*/ |eModifierTypeFlag_SupportsEditmode, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index f99060bdf63..29e00040bf6 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -221,7 +221,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der { WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; DerivedMesh *dm = derivedData, *ret = NULL; +#if 0 Mesh *ob_m = NULL; +#endif MDeformVert *dvert = NULL; int numVerts; int defgrp_idx, defgrp_idx2 = -1; @@ -436,7 +438,7 @@ ModifierTypeInfo modifierType_WeightVGMix = { /* structSize */ sizeof(WeightVGMixModifierData), /* type */ eModifierTypeType_Nonconstructive, /* flags */ eModifierTypeFlag_AcceptsMesh - |eModifierTypeFlag_SupportsMapping +/* |eModifierTypeFlag_SupportsMapping*/ |eModifierTypeFlag_SupportsEditmode, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 84de87a4662..537c5784d29 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -507,7 +507,7 @@ ModifierTypeInfo modifierType_WeightVGProximity = { /* structSize */ sizeof(WeightVGProximityModifierData), /* type */ eModifierTypeType_Nonconstructive, /* flags */ eModifierTypeFlag_AcceptsMesh - |eModifierTypeFlag_SupportsMapping +/* |eModifierTypeFlag_SupportsMapping*/ |eModifierTypeFlag_SupportsEditmode, /* copyData */ copyData, -- cgit v1.2.3 From e2c24bac6c56df6a54c37233d43f609f86d868d5 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 8 Aug 2011 21:12:51 +0000 Subject: vgroup_modifiers: Now clamping output values to [0.0, 1.0] range (and added min/max mapping values for Prowimity modif). --- .../startup/bl_ui/properties_data_modifier.py | 4 ++++ source/blender/makesdna/DNA_modifier_types.h | 2 ++ source/blender/makesrna/intern/rna_modifier.c | 12 +++++++++++ .../blender/modifiers/intern/MOD_weightvg_util.c | 3 +++ .../modifiers/intern/MOD_weightvgproximity.c | 24 ++++++++++++++++++++++ 5 files changed, 45 insertions(+) diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 6680d118a75..5654ecd6b2c 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -859,6 +859,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): row = layout.row() row.prop(md, "proximity_geometry", expand=True) + row = layout.split() + row.prop(md, "min_dist") + row.prop(md, "max_dist") + # Common mask options… layout.separator() self.weight_vg_mask(layout, ob, md) diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index a693277b786..7f43659d8de 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -921,6 +921,8 @@ typedef struct WeightVGProximityModifierData { int mask_tex_mapping; /* How to map the texture! */ char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */ + float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */ + /* Padding… */ int pad_i2; } WeightVGProximityModifierData; diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index a6ba56cc590..17cf30d390f 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2781,6 +2781,18 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); + prop= RNA_def_property(srna, "min_dist", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Lowest Dist", "Distance mapping to weight 0.0."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "max_dist", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_text(prop, "Highest Dist", "Distance mapping to weight 1.0."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + /* Common masking properties. */ rna_def_modifier_weightvg_mask(brna, srna); } diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 1fe1a96c2e5..43cc3081199 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -192,6 +192,9 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indice MDeformVert *dv = &dvert[indices ? indices[i] : i]; MDeformWeight *newdw; + /* Never allow weights out of [0.0, 1.0] range. */ + CLAMP(w, 0.0, 1.0); + /* Let’s first check to see if this vert is already in the weight group – if so * let’s update it, or remove it if needed. */ diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 537c5784d29..7272878b5b5 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -200,6 +200,27 @@ static float get_ob2ob_distance(const Object* ob, const Object* obr) return len_v3v3(ob->obmat[3], obr->obmat[3]); } +/** + * Maps distances to weights. + */ +void do_map(float *weights, const int nidx, const float min_d, const float max_d) +{ + int i; + float b = min_d / (min_d - max_d); + float a = -b / min_d; + for (i = 0; i < nidx; i++) + weights[i] = a * weights[i] + b; +} + +/*a min_d + b = 0.0*/ +/*a max_d + b = 1.0*/ +/*a min_d = -b*/ +/*a = -b / min_d*/ + +/*max_d(-b/min_d) + b = 1.0*/ +/*b((-max_d/min_d)+1.0) = 1.0*/ +/*b = 1.0 / ((min_d-max_d)/min_d)*/ +/*b = min_d/(min_d-max_d)*/ /************************************** * Modifiers functions. * **************************************/ @@ -476,6 +497,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der wmd->mask_defgrp_name, wmd->mask_texture, wmd->mask_tex_use_channel, wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name); + /* Map distances to weights. */ + do_map(org_w, numIdx, wmd->min_dist, wmd->max_dist); + /* Update vgroup. Note we never add nor remove vertices from vgroup here. */ weightvg_update_vg(dvert, defgrp_idx, numIdx, indices, org_w, 0, 0.0f, 0, 0.0f); -- cgit v1.2.3 From 58af2c36aca4e2092e699dead2bd2ea2347b5622 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 17 Aug 2011 13:07:51 +0000 Subject: vgroup_modifiers: Removed (commented out, for now) addtionnal mapping/clamping options in WeightVGEdit mod, leaving the only curve mapping stuff. Also, updated all three modifiers with new foreachTexLink walking func. --- .../startup/bl_ui/properties_data_modifier.py | 36 ++++---- source/blender/makesdna/DNA_modifier_types.h | 12 +-- source/blender/makesrna/intern/rna_modifier.c | 98 +++++++++++----------- source/blender/modifiers/intern/MOD_weightvgedit.c | 52 +++++++----- source/blender/modifiers/intern/MOD_weightvgmix.c | 6 ++ .../modifiers/intern/MOD_weightvgproximity.c | 6 ++ 6 files changed, 115 insertions(+), 95 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 30600d5534c..6370cc8942a 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -779,31 +779,31 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.label(text="Default Weight:") col.prop(md, "default_weight", text="") - layout.prop(md, "use_map") - if md.use_map: - split = layout.split() - col = split.column() - col.label("Input:") - col.label("Output:") - col = split.column() - col.prop(md, "map_input_low", text="Min") - col.prop(md, "map_output_low", text="Min") - col = split.column() - col.prop(md, "map_input_high", text="Max") - col.prop(md, "map_output_high", text="Max") +# layout.prop(md, "use_map") +# if md.use_map: +# split = layout.split() +# col = split.column() +# col.label("Input:") +# col.label("Output:") +# col = split.column() +# col.prop(md, "map_input_low", text="Min") +# col.prop(md, "map_output_low", text="Min") +# col = split.column() +# col.prop(md, "map_input_high", text="Max") +# col.prop(md, "map_output_high", text="Max") layout.prop(md, "use_map_curve") if md.use_map_curve: col = layout.column() col.template_curve_mapping(md, "map_curve") - layout.prop(md, "use_reverse") +# layout.prop(md, "use_reverse") - layout.prop(md, "use_clamp") - if md.use_clamp: - row = layout.row() - row.prop(md, "clamp_weight_min") - row.prop(md, "clamp_weight_max") +# layout.prop(md, "use_clamp") +# if md.use_clamp: +# row = layout.row() +# row.prop(md, "clamp_weight_min") +# row.prop(md, "clamp_weight_max") row = layout.row() row.prop(md, "use_add") diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 9411d3370ba..61db9230b66 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -803,15 +803,15 @@ typedef struct WeightVGEditModifierData { float default_weight; /* Weight for vertices not in vgroup. */ /* Mapping stuff. */ - float map_org_min, map_org_max; - float map_new_min, map_new_max; + float map_org_min, map_org_max; /* Deprecated, keeping for file compatibility for now... */ + float map_new_min, map_new_max; /* Deprecated, keeping for file compatibility for now... */ struct CurveMapping *cmap_curve; /* The custom mapping curve! */ /* The add/remove vertices weight thresholds. */ float add_threshold, rem_threshold; /* Clamping options. */ - float clamp_weight_min, clamp_weight_max; + float clamp_weight_min, clamp_weight_max; /* Deprecated, keeping for file compatibility for now... */ /* Masking options. */ float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */ @@ -832,17 +832,17 @@ typedef struct WeightVGEditModifierData { /* WeightVGEdit flags. */ /* Use parametric mapping. */ -#define MOD_WVG_EDIT_MAP (1 << 0) +//#define MOD_WVG_EDIT_MAP (1 << 0) /* Use curve mapping. */ #define MOD_WVG_EDIT_CMAP (1 << 1) /* Reverse weights (in the [0.0, 1.0] standard range). */ -#define MOD_WVG_EDIT_REVERSE_WEIGHTS (1 << 2) +//#define MOD_WVG_EDIT_REVERSE_WEIGHTS (1 << 2) /* Add vertices with higher weight than threshold to vgroup. */ #define MOD_WVG_EDIT_ADD2VG (1 << 3) /* Remove vertices with lower weight than threshold from vgroup. */ #define MOD_WVG_EDIT_REMFVG (1 << 4) /* Clamp weights. */ -#define MOD_WVG_EDIT_CLAMP (1 << 5) +//#define MOD_WVG_EDIT_CLAMP (1 << 5) typedef struct WeightVGMixModifierData { ModifierData modifier; diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 6294f149b68..533baf98915 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2565,20 +2565,20 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "use_map", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_MAP); - RNA_def_property_ui_text(prop, "Map", "Map vertex group weights."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); +/* prop= RNA_def_property(srna, "use_map", PROP_BOOLEAN, PROP_NONE);*/ +/* RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_MAP);*/ +/* RNA_def_property_ui_text(prop, "Map", "Map vertex group weights.");*/ +/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ prop= RNA_def_property(srna, "use_map_curve", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_CMAP); RNA_def_property_ui_text(prop, "Curve Map", "Map vertex group weights with a curve."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "use_reverse", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REVERSE_WEIGHTS); - RNA_def_property_ui_text(prop, "Reverse", "Reverse vertex group weights."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); +/* prop= RNA_def_property(srna, "use_reverse", PROP_BOOLEAN, PROP_NONE);*/ +/* RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REVERSE_WEIGHTS);*/ +/* RNA_def_property_ui_text(prop, "Reverse", "Reverse vertex group weights.");*/ +/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ prop= RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_ADD2VG); @@ -2592,10 +2592,10 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) "from vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_CLAMP); - RNA_def_property_ui_text(prop, "Clamp", "Clamp vertex group weights."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); +/* prop= RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE);*/ +/* RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_CLAMP);*/ +/* RNA_def_property_ui_text(prop, "Clamp", "Clamp vertex group weights.");*/ +/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ prop= RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); @@ -2604,33 +2604,33 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) "it is not in the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "map_input_low", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "map_org_min"); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Input Low Weight", "Low input mapping value."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); - - prop= RNA_def_property(srna, "map_input_high", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "map_org_max"); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Input High Weight", "High input mapping value."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); - - prop= RNA_def_property(srna, "map_output_low", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "map_new_min"); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Output Low Weight", "Low output mapping value."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); - - prop= RNA_def_property(srna, "map_output_high", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "map_new_max"); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Output High Weight", "High output mapping value."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); +/* prop= RNA_def_property(srna, "map_input_low", PROP_FLOAT, PROP_NONE);*/ +/* RNA_def_property_float_sdna(prop, NULL, "map_org_min");*/ +/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ +/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ +/* RNA_def_property_ui_text(prop, "Input Low Weight", "Low input mapping value.");*/ +/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ + +/* prop= RNA_def_property(srna, "map_input_high", PROP_FLOAT, PROP_NONE);*/ +/* RNA_def_property_float_sdna(prop, NULL, "map_org_max");*/ +/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ +/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ +/* RNA_def_property_ui_text(prop, "Input High Weight", "High input mapping value.");*/ +/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ + +/* prop= RNA_def_property(srna, "map_output_low", PROP_FLOAT, PROP_NONE);*/ +/* RNA_def_property_float_sdna(prop, NULL, "map_new_min");*/ +/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ +/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ +/* RNA_def_property_ui_text(prop, "Output Low Weight", "Low output mapping value.");*/ +/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ + +/* prop= RNA_def_property(srna, "map_output_high", PROP_FLOAT, PROP_NONE);*/ +/* RNA_def_property_float_sdna(prop, NULL, "map_new_max");*/ +/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ +/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ +/* RNA_def_property_ui_text(prop, "Output High Weight", "High output mapping value.");*/ +/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ prop= RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve"); @@ -2653,17 +2653,17 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) "to be removed from the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "clamp_weight_min", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Min Weight", "Lowest weight a vertex can get."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); +/* prop= RNA_def_property(srna, "clamp_weight_min", PROP_FLOAT, PROP_NONE);*/ +/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ +/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ +/* RNA_def_property_ui_text(prop, "Min Weight", "Lowest weight a vertex can get.");*/ +/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - prop= RNA_def_property(srna, "clamp_weight_max", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Max Weight", "Highest weight a vertex can get."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); +/* prop= RNA_def_property(srna, "clamp_weight_max", PROP_FLOAT, PROP_NONE);*/ +/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ +/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ +/* RNA_def_property_ui_text(prop, "Max Weight", "Highest weight a vertex can get.");*/ +/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ /* Common masking properties. */ rna_def_modifier_weightvg_mask(brna, srna); diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index 57c93cdfddf..a8d51cee092 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -61,18 +61,18 @@ static void initData(ModifierData *md) { WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; - wmd->edit_flags = MOD_WVG_EDIT_CLAMP; + wmd->edit_flags = 0; wmd->default_weight = 0.0f; - wmd->map_org_min = 0.0f; - wmd->map_org_max = 1.0f; - wmd->map_new_min = 0.0f; - wmd->map_new_max = 1.0f; +/* wmd->map_org_min = 0.0f;*/ +/* wmd->map_org_max = 1.0f;*/ +/* wmd->map_new_min = 0.0f;*/ +/* wmd->map_new_max = 1.0f;*/ wmd->cmap_curve = curvemapping_add(1, 0.0, 0.0, 1.0, 1.0); curvemapping_initialize(wmd->cmap_curve); - wmd->clamp_weight_min = 0.0f; - wmd->clamp_weight_max = 1.0f; +/* wmd->clamp_weight_min = 0.0f;*/ +/* wmd->clamp_weight_max = 1.0f;*/ wmd->add_threshold = 0.01f; wmd->rem_threshold = 0.01f; @@ -98,14 +98,14 @@ static void copyData(ModifierData *md, ModifierData *target) twmd->edit_flags = wmd->edit_flags; twmd->default_weight = wmd->default_weight; - twmd->map_org_min = wmd->map_org_min; - twmd->map_org_max = wmd->map_org_max; - twmd->map_new_min = wmd->map_new_min; - twmd->map_new_max = wmd->map_new_max; +/* twmd->map_org_min = wmd->map_org_min;*/ +/* twmd->map_org_max = wmd->map_org_max;*/ +/* twmd->map_new_min = wmd->map_new_min;*/ +/* twmd->map_new_max = wmd->map_new_max;*/ twmd->cmap_curve = curvemapping_copy(wmd->cmap_curve); - twmd->clamp_weight_min = wmd->clamp_weight_min; - twmd->clamp_weight_max = wmd->clamp_weight_max; +/* twmd->clamp_weight_min = wmd->clamp_weight_min;*/ +/* twmd->clamp_weight_max = wmd->clamp_weight_max;*/ twmd->add_threshold = wmd->add_threshold; twmd->rem_threshold = wmd->rem_threshold; @@ -161,6 +161,11 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); } +static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData) +{ + walk(userData, ob, md, "mask_texture"); +} + static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode) { @@ -203,12 +208,12 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */ float *mapf = NULL; /* Cache for mapping factors. */ /* Flags. */ - char do_map = wmd->edit_flags & MOD_WVG_EDIT_MAP; +/* char do_map = wmd->edit_flags & MOD_WVG_EDIT_MAP;*/ char do_cmap = wmd->edit_flags & MOD_WVG_EDIT_CMAP; - char do_rev = wmd->edit_flags & MOD_WVG_EDIT_REVERSE_WEIGHTS; +/* char do_rev = wmd->edit_flags & MOD_WVG_EDIT_REVERSE_WEIGHTS;*/ char do_add = wmd->edit_flags & MOD_WVG_EDIT_ADD2VG; char do_rem = wmd->edit_flags & MOD_WVG_EDIT_REMFVG; - char do_clamp = wmd->edit_flags & MOD_WVG_EDIT_CLAMP; +/* char do_clamp = wmd->edit_flags & MOD_WVG_EDIT_CLAMP;*/ /* Get number of verts. */ numVerts = dm->getNumVerts(dm); @@ -281,6 +286,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der } } /* Do mapping. */ +#if 0 if (do_map) { /* This mapping is a simple func: a*in + b. * with a = (out_min - out_max)/(in_min - in_max) @@ -299,10 +305,11 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der } new_w[i] = (mapf[0] * new_w[i]) + mapf[1]; } +#endif if (do_cmap) new_w[i] = curvemapping_evaluateF(wmd->cmap_curve, 0, new_w[i]); - if (do_rev) - new_w[i] = (-1.0 * new_w[i]) + 1.0; +/* if (do_rev)*/ +/* new_w[i] = (-1.0 * new_w[i]) + 1.0;*/ } /* Do masking. */ @@ -311,10 +318,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name); /* Do clamping. */ - if (do_clamp) { - for (i = 0; i < numVerts; i++) - CLAMP(org_w[i], wmd->clamp_weight_min, wmd->clamp_weight_max); - } +/* if (do_clamp) {*/ +/* for (i = 0; i < numVerts; i++)*/ +/* CLAMP(org_w[i], wmd->clamp_weight_min, wmd->clamp_weight_max);*/ +/* }*/ /* Update/add/remove from vgroup. */ weightvg_update_vg(dvert, defgrp_idx, numVerts, NULL, org_w, do_add, wmd->add_threshold, @@ -365,5 +372,6 @@ ModifierTypeInfo modifierType_WeightVGEdit = { /* dependsOnNormals */ NULL, /* foreachObjectLink */ foreachObjectLink, /* foreachIDLink */ foreachIDLink, + /* foreachTexLink */ foreachTexLink, }; diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 29e00040bf6..8b0e598962e 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -191,6 +191,11 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); } +static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData) +{ + walk(userData, ob, md, "mask_texture"); +} + static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode) { @@ -457,5 +462,6 @@ ModifierTypeInfo modifierType_WeightVGMix = { /* dependsOnNormals */ NULL, /* foreachObjectLink */ foreachObjectLink, /* foreachIDLink */ foreachIDLink, + /* foreachTexLink */ foreachTexLink, }; diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 7272878b5b5..c4f0c2b214c 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -298,6 +298,11 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); } +static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData) +{ + walk(userData, ob, md, "mask_texture"); +} + static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode) { @@ -550,5 +555,6 @@ ModifierTypeInfo modifierType_WeightVGProximity = { /* dependsOnNormals */ NULL, /* foreachObjectLink */ foreachObjectLink, /* foreachIDLink */ foreachIDLink, + /* foreachTexLink */ foreachTexLink, }; -- cgit v1.2.3 From 2dee23fad42616ac149f01bc23126365e3b18995 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 18 Aug 2011 06:30:59 +0000 Subject: vgroup_modifiers: Minor update (names...). --- source/blender/makesrna/intern/rna_modifier.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 533baf98915..390c4ae3e9b 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -68,9 +68,9 @@ EnumPropertyItem modifier_type_items[] ={ {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""}, {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""}, {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""}, - {eModifierType_WeightVGEdit, "WEIGHT_VGEDIT", ICON_MOD_WEIGHTVG, "Edit Vertex Group Weights", ""}, - {eModifierType_WeightVGMix, "WEIGHT_VGMIX", ICON_MOD_WEIGHTVG, "Mix Two Vertex Groups", ""}, - {eModifierType_WeightVGProximity, "WEIGHT_VGPROXIMITY", ICON_MOD_WEIGHTVG, "Weight Vertex Group - Poximity", ""}, + {eModifierType_WeightVGEdit, "WEIGHT_VGEDIT", ICON_MOD_WEIGHTVG, "WeightVG Edit", ""}, + {eModifierType_WeightVGMix, "WEIGHT_VGMIX", ICON_MOD_WEIGHTVG, "WeightVG Mix", ""}, + {eModifierType_WeightVGProximity, "WEIGHT_VGPROXIMITY", ICON_MOD_WEIGHTVG, "WeightVG Proximity", ""}, {0, "", 0, "Deform", ""}, {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""}, {eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""}, @@ -2554,7 +2554,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "WeightVGEditModifier", "Modifier"); - RNA_def_struct_ui_text(srna, "Edit Vertex Group Weights Modifier", + RNA_def_struct_ui_text(srna, "WeightVG Edit Modifier", "Edit the weights of vertices in a group."); RNA_def_struct_sdna(srna, "WeightVGEditModifierData"); RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); @@ -2693,7 +2693,7 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "WeightVGMixModifier", "Modifier"); - RNA_def_struct_ui_text(srna, "Weight Vertex Group Modifier", + RNA_def_struct_ui_text(srna, "WeightVG Mix Modifier", "Mix the weights of two vertex groups."); RNA_def_struct_sdna(srna, "WeightVGMixModifierData"); RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); @@ -2758,7 +2758,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "WeightVGProximityModifier", "Modifier"); - RNA_def_struct_ui_text(srna, "Weight Vertex Group - Proximity Modifier", + RNA_def_struct_ui_text(srna, "WeightVG Proximity Modifier", "Set the weights of vertices in a group from a target object’s " "distance."); RNA_def_struct_sdna(srna, "WeightVGProximityModifierData"); -- cgit v1.2.3 From cd6f93bdc905e811da79df64f8016d5d27b6ad72 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 23 Aug 2011 12:33:45 +0000 Subject: vgroup_modifiers: Definitively removed addtionnal mapping/clamping options in WeightVGEdit mod, including from DNA struct. --- source/blender/makesdna/DNA_modifier_types.h | 5 -- source/blender/modifiers/intern/MOD_weightvgedit.c | 55 ++-------------------- 2 files changed, 5 insertions(+), 55 deletions(-) diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 61db9230b66..83b82972cef 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -803,16 +803,11 @@ typedef struct WeightVGEditModifierData { float default_weight; /* Weight for vertices not in vgroup. */ /* Mapping stuff. */ - float map_org_min, map_org_max; /* Deprecated, keeping for file compatibility for now... */ - float map_new_min, map_new_max; /* Deprecated, keeping for file compatibility for now... */ struct CurveMapping *cmap_curve; /* The custom mapping curve! */ /* The add/remove vertices weight thresholds. */ float add_threshold, rem_threshold; - /* Clamping options. */ - float clamp_weight_min, clamp_weight_max; /* Deprecated, keeping for file compatibility for now... */ - /* Masking options. */ float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */ /* Name of mask vertex group from which to get weight factors. */ diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index a8d51cee092..a1057bdbbbb 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -64,18 +64,11 @@ static void initData(ModifierData *md) wmd->edit_flags = 0; wmd->default_weight = 0.0f; -/* wmd->map_org_min = 0.0f;*/ -/* wmd->map_org_max = 1.0f;*/ -/* wmd->map_new_min = 0.0f;*/ -/* wmd->map_new_max = 1.0f;*/ wmd->cmap_curve = curvemapping_add(1, 0.0, 0.0, 1.0, 1.0); curvemapping_initialize(wmd->cmap_curve); -/* wmd->clamp_weight_min = 0.0f;*/ -/* wmd->clamp_weight_max = 1.0f;*/ - - wmd->add_threshold = 0.01f; wmd->rem_threshold = 0.01f; + wmd->add_threshold = 0.01f; wmd->mask_constant = 1.0f; wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ @@ -98,15 +91,8 @@ static void copyData(ModifierData *md, ModifierData *target) twmd->edit_flags = wmd->edit_flags; twmd->default_weight = wmd->default_weight; -/* twmd->map_org_min = wmd->map_org_min;*/ -/* twmd->map_org_max = wmd->map_org_max;*/ -/* twmd->map_new_min = wmd->map_new_min;*/ -/* twmd->map_new_max = wmd->map_new_max;*/ twmd->cmap_curve = curvemapping_copy(wmd->cmap_curve); -/* twmd->clamp_weight_min = wmd->clamp_weight_min;*/ -/* twmd->clamp_weight_max = wmd->clamp_weight_max;*/ - twmd->add_threshold = wmd->add_threshold; twmd->rem_threshold = wmd->rem_threshold; @@ -208,12 +194,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */ float *mapf = NULL; /* Cache for mapping factors. */ /* Flags. */ -/* char do_map = wmd->edit_flags & MOD_WVG_EDIT_MAP;*/ - char do_cmap = wmd->edit_flags & MOD_WVG_EDIT_CMAP; -/* char do_rev = wmd->edit_flags & MOD_WVG_EDIT_REVERSE_WEIGHTS;*/ - char do_add = wmd->edit_flags & MOD_WVG_EDIT_ADD2VG; - char do_rem = wmd->edit_flags & MOD_WVG_EDIT_REMFVG; -/* char do_clamp = wmd->edit_flags & MOD_WVG_EDIT_CLAMP;*/ + char do_map = wmd->edit_flags & MOD_WVG_EDIT_CMAP; + char do_add = wmd->edit_flags & MOD_WVG_EDIT_ADD2VG; + char do_rem = wmd->edit_flags & MOD_WVG_EDIT_REMFVG; /* Get number of verts. */ numVerts = dm->getNumVerts(dm); @@ -286,30 +269,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der } } /* Do mapping. */ -#if 0 - if (do_map) { - /* This mapping is a simple func: a*in + b. - * with a = (out_min - out_max)/(in_min - in_max) - * and b = out_max - a*in_max - * Note a and b are cached! - */ - if (mapf == NULL) { - float denom = wmd->map_org_min - wmd->map_org_max; - mapf = MEM_mallocN(sizeof(float) * 2, "WeightVGEdit, mapf"); - if (denom > 0.0 && denom < MOD_WVG_ZEROFLOOR) - denom = MOD_WVG_ZEROFLOOR; - else if (denom < 0.0 && denom > -MOD_WVG_ZEROFLOOR) - denom = -MOD_WVG_ZEROFLOOR; - mapf[0] = (wmd->map_new_min - wmd->map_new_max) / denom; - mapf[1] = wmd->map_new_max - (mapf[0] * wmd->map_org_max); - } - new_w[i] = (mapf[0] * new_w[i]) + mapf[1]; - } -#endif - if (do_cmap) + if (do_map) new_w[i] = curvemapping_evaluateF(wmd->cmap_curve, 0, new_w[i]); -/* if (do_rev)*/ -/* new_w[i] = (-1.0 * new_w[i]) + 1.0;*/ } /* Do masking. */ @@ -317,12 +278,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der wmd->mask_defgrp_name, wmd->mask_texture, wmd->mask_tex_use_channel, wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name); - /* Do clamping. */ -/* if (do_clamp) {*/ -/* for (i = 0; i < numVerts; i++)*/ -/* CLAMP(org_w[i], wmd->clamp_weight_min, wmd->clamp_weight_max);*/ -/* }*/ - /* Update/add/remove from vgroup. */ weightvg_update_vg(dvert, defgrp_idx, numVerts, NULL, org_w, do_add, wmd->add_threshold, do_rem, wmd->rem_threshold); -- cgit v1.2.3 From 103b06d4dfe0c5cda0eed2dad8d077e32aa056df Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sun, 4 Sep 2011 01:42:47 +0000 Subject: BGE animations: fixing initialization order issues for BL_ActionActuator and BL_ArmatureObject. Thanks to z0r for pointing them out and providing a fix. --- source/gameengine/Converter/BL_ActionActuator.cpp | 2 +- source/gameengine/Converter/BL_ArmatureObject.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 063544932de..895def17e8e 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -88,10 +88,10 @@ BL_ActionActuator::BL_ActionActuator(SCA_IObject* gameobj, m_blendin(blendin), m_blendstart(0), m_stridelength(stride), + m_layer_weight(layer_weight), m_playtype(playtype), m_priority(priority), m_layer(layer), - m_layer_weight(layer_weight), m_ipo_flags(ipo_flags), m_pose(NULL), m_blendpose(NULL), diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index 395cae4ba87..684bd3f341e 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -231,10 +231,10 @@ BL_ArmatureObject::BL_ArmatureObject( m_timestep(0.040), m_activeAct(NULL), m_activePriority(999), + m_vert_deform_type(vert_deform_type), m_constraintNumber(0), m_channelNumber(0), - m_lastapplyframe(0.0), - m_vert_deform_type(vert_deform_type) + m_lastapplyframe(0.0) { m_armature = (bArmature *)armature->data; -- cgit v1.2.3 From caa1acb6b1d6b908e34be31c4b9bd026066b820f Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Sun, 4 Sep 2011 02:12:03 +0000 Subject: Prevent potential crasher, commonEffects could be empty. --- source/blender/collada/AnimationImporter.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index db32664f736..29c356ed8f0 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -1059,12 +1059,14 @@ AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLAD const COLLADAFW::UniqueId & matuid = matBinds[j].getReferencedMaterial(); const COLLADAFW::Effect *ef = (COLLADAFW::Effect *) (FW_object_map[matuid]); const COLLADAFW::CommonEffectPointerArray& commonEffects = ef->getCommonEffects(); - COLLADAFW::EffectCommon *efc = commonEffects[0]; - types->material = setAnimType(&(efc->getShininess()),(types->material), MATERIAL_SHININESS); - types->material = setAnimType(&(efc->getSpecular().getColor()),(types->material), MATERIAL_SPEC_COLOR); - types->material = setAnimType(&(efc->getDiffuse().getColor()),(types->material), MATERIAL_DIFF_COLOR); - // types->material = setAnimType(&(efc->get()),(types->material), MATERIAL_TRANSPARENCY); - types->material = setAnimType(&(efc->getIndexOfRefraction()),(types->material), MATERIAL_IOR); + if(!commonEffects.empty()) { + COLLADAFW::EffectCommon *efc = commonEffects[0]; + types->material = setAnimType(&(efc->getShininess()),(types->material), MATERIAL_SHININESS); + types->material = setAnimType(&(efc->getSpecular().getColor()),(types->material), MATERIAL_SPEC_COLOR); + types->material = setAnimType(&(efc->getDiffuse().getColor()),(types->material), MATERIAL_DIFF_COLOR); + // types->material = setAnimType(&(efc->get()),(types->material), MATERIAL_TRANSPARENCY); + types->material = setAnimType(&(efc->getIndexOfRefraction()),(types->material), MATERIAL_IOR); + } } } return types; -- cgit v1.2.3 From 317908a330184799eecfe34ed47648d5323b43de Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 4 Sep 2011 11:13:41 +0000 Subject: Fix #28423: Screw-modifier crash in cunjunction with subsurf modifier Problems was caused by angle=2*pi and steps=2 in screw modifier. Such configuration produced duplicated geometry to close object and it was confusing for subsurf cache. Restrict steps=2 for screw modifier now, so now 3<=steps<=512. --- source/blender/makesrna/intern/rna_modifier.c | 2 +- source/blender/modifiers/intern/MOD_screw.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 37a629f46d0..22fdfcea29c 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2366,7 +2366,7 @@ static void rna_def_modifier_screw(BlenderRNA *brna) prop= RNA_def_property(srna, "steps", PROP_INT, PROP_UNSIGNED); RNA_def_property_range(prop, 2, 10000); - RNA_def_property_ui_range(prop, 2, 512, 1, 0); + RNA_def_property_ui_range(prop, 3, 512, 1, 0); RNA_def_property_ui_text(prop, "Steps", "Number of steps in the revolution"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index c5fdf465a0a..486c98f82a0 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -275,7 +275,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, if (fabsf(screw_ofs) <= (FLT_EPSILON*100.0f) && fabsf(fabsf(angle) - ((float)M_PI * 2.0f)) <= (FLT_EPSILON*100.0f)) { close= 1; step_tot--; - if(step_tot < 2) step_tot= 2; + if(step_tot < 3) step_tot= 3; maxVerts = totvert * step_tot; /* -1 because we're joining back up */ maxEdges = (totvert * step_tot) + /* these are the edges between new verts */ @@ -286,7 +286,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } else { close= 0; - if(step_tot < 2) step_tot= 2; + if(step_tot < 3) step_tot= 3; maxVerts = totvert * step_tot; /* -1 because we're joining back up */ maxEdges = (totvert * (step_tot-1)) + /* these are the edges between new verts */ -- cgit v1.2.3 From 7f5c5f8ecaf6d366293cadbd8db08d4516a9499f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 4 Sep 2011 11:38:53 +0000 Subject: Fix #28500: Reshape in multires modifier makes blender crash Multires doesn't store displacement for base mesh and reshaping when multires subdivision level is set to zero is crappy. Add report that reshape can't work with base level and cancel reshape operator. --- source/blender/editors/object/object_modifier.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index c96d7c1fd10..8813b0027cd 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -1066,7 +1066,12 @@ static int multires_reshape_exec(bContext *C, wmOperator *op) if (!mmd) return OPERATOR_CANCELLED; - + + if(mmd->lvl==0) { + BKE_report(op->reports, RPT_ERROR, "Reshape can work only with higher levels of subdivisions."); + return OPERATOR_CANCELLED; + } + CTX_DATA_BEGIN(C, Object*, selob, selected_editable_objects) { if(selob->type == OB_MESH && selob != ob) { secondob= selob; -- cgit v1.2.3 From 1cada203bcae3a65f34e5631f8e8e1ae22ce4415 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Sun, 4 Sep 2011 14:31:23 +0000 Subject: [#27884] Collada import: materials mismatch when 2 instance_geometry reference the same material Reported by David Roy Multi-materials used on different meshes would get ignored (resulting in white faces in textured view). --- source/blender/collada/MeshImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index e9086f05628..01eff8069c1 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -796,7 +796,7 @@ MTFace *MeshImporter::assign_material_to_geom(COLLADAFW::MaterialBinding cmateri std::multimap::iterator it; it=materials_mapped_to_geom.find(*geom_uid); while(it!=materials_mapped_to_geom.end()) { - if(it->second == ma_uid) return NULL; // do nothing if already found + if(it->second == ma_uid && it->first == *geom_uid) return NULL; // do nothing if already found it++; } // first time we get geom_uid, ma_uid pair. Save for later check. -- cgit v1.2.3 From f1eab8e85365a91592bf0f369d173e4b9854619d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 4 Sep 2011 15:53:12 +0000 Subject: Fix #28503: Selecting a Grease Pencil from the Properties panel does not update 3D View Added missing notifiers. --- source/blender/makesrna/intern/rna_nodetree.c | 1 + source/blender/makesrna/intern/rna_object.c | 1 + source/blender/makesrna/intern/rna_scene.c | 1 + source/blender/makesrna/intern/rna_space.c | 1 + 4 files changed, 4 insertions(+) diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 56492a52da9..d6e475fdbad 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2736,6 +2736,7 @@ static void rna_def_nodetree(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "GreasePencil"); RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock"); + RNA_def_property_update(prop, NC_NODE, NULL); prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index ad323b0aba4..4e2be7682f8 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -2297,6 +2297,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "GreasePencil"); RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); /* pose */ prop= RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index cc1e7d9390b..3c60a3b4cd7 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -3517,6 +3517,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "GreasePencil"); RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock"); + RNA_def_property_update(prop, NC_SCENE, NULL); /* Transform Orientations */ prop= RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 7a7debe1bf5..35360910015 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1622,6 +1622,7 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "GreasePencil"); RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DISPGP); -- cgit v1.2.3 From 5c5b9cf4d793e4169147201dae701ab7aef36c86 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Sun, 4 Sep 2011 22:14:28 +0000 Subject: Remove NULL-checks, as they might cause infinite loops while reading a DAE containing unsupported data, i.e. geometry. --- source/blender/collada/DocumentImporter.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 3a92c95e7ee..1a91e185bac 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -410,18 +410,15 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren while (geom_done < geom.getCount()) { ob = mesh_importer.create_mesh_object(node, geom[geom_done], false, uid_material_map, material_texture_mapping_map); - if ( ob != NULL ) - ++geom_done; + ++geom_done; } while (camera_done < camera.getCount()) { ob = create_camera_object(camera[camera_done], sce); - if ( ob != NULL ) - ++camera_done; + ++camera_done; } while (lamp_done < lamp.getCount()) { ob = create_lamp_object(lamp[lamp_done], sce); - if ( ob != NULL ) - ++lamp_done; + ++lamp_done; } while (controller_done < controller.getCount()) { COLLADAFW::InstanceGeometry *geom = (COLLADAFW::InstanceGeometry*)controller[controller_done]; -- cgit v1.2.3 From 57411d1c5f1e1043643bf7e5dbd98803c8ff7311 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Sep 2011 03:09:49 +0000 Subject: minor edits. - init proximity to 1.0f - min/max proximity dist were not being copied. - minor edits to comments - use ascii chars in a few places. --- source/blender/makesdna/DNA_modifier_types.h | 44 +++++++++------------- source/blender/makesrna/intern/rna_modifier.c | 12 +++--- .../blender/modifiers/intern/MOD_weightvg_util.c | 28 +++++++------- .../blender/modifiers/intern/MOD_weightvg_util.h | 11 +++--- source/blender/modifiers/intern/MOD_weightvgedit.c | 9 ++--- source/blender/modifiers/intern/MOD_weightvgmix.c | 11 +++--- .../modifiers/intern/MOD_weightvgproximity.c | 12 +++--- 7 files changed, 61 insertions(+), 66 deletions(-) diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 83b82972cef..d3c3ba2f93b 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -790,16 +790,13 @@ typedef enum { typedef struct WeightVGEditModifierData { ModifierData modifier; - /* XXX Note: I tried to keep everything logically ordered – provided the - * alignment constraints… - */ + /* Note: I tried to keep everything logically ordered - provided the + * alignment constraints... */ char defgrp_name[32]; /* Name of vertex group to edit. */ - /* Flags (MOD_WVG_EDIT_MAP, MOD_WVG_EDIT_CMAP, MOD_WVG_EDIT_REVERSE_WEIGHTS, - * MOD_WVG_EDIT_ADD2VG, MOD_WVG_EDIT_REMFVG, MOD_WVG_EDIT_CLAMP). - */ - int edit_flags; + short edit_flags; /* using MOD_WVG_EDIT_* flags */ + short pad1; float default_weight; /* Weight for vertices not in vgroup. */ /* Mapping stuff. */ @@ -809,7 +806,7 @@ typedef struct WeightVGEditModifierData { float add_threshold, rem_threshold; /* Masking options. */ - float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */ + float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */ /* Name of mask vertex group from which to get weight factors. */ char mask_defgrp_name[32]; @@ -817,10 +814,9 @@ typedef struct WeightVGEditModifierData { int mask_tex_use_channel; /* Which channel to use as weightf. */ struct Tex *mask_texture; /* The texture. */ struct Object *mask_tex_map_obj; /* Name of the map object. */ - /* How to map the texture (using MOD_DISP_MAP_xxx constants). */ + /* How to map the texture (using MOD_DISP_MAP_* constants). */ int mask_tex_mapping; char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */ - /* Padding… */ int pad_i1; } WeightVGEditModifierData; @@ -843,21 +839,19 @@ typedef struct WeightVGMixModifierData { ModifierData modifier; /* XXX Note: I tried to keep everything logically ordered – provided the - * alignment constraints… - */ + * alignment constraints... */ char defgrp_name[32]; /* Name of vertex group to modify/weight. */ char defgrp_name2[32]; /* Name of other vertex group to mix in. */ float default_weight; /* Default weight value for first vgroup. */ float default_weight2; /* Default weight value to mix in. */ - char mix_mode; /* How second vgroup’s weights affect first ones */ + char mix_mode; /* How second vgroups weights affect first ones */ char mix_set; /* What vertices to affect. */ - char pad_c1, pad_c2; - int pad_i1; + char pad[6]; /* Masking options. */ - float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */ + float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */ /* Name of mask vertex group from which to get weight factors. */ char mask_defgrp_name[32]; @@ -867,12 +861,11 @@ typedef struct WeightVGMixModifierData { struct Object *mask_tex_map_obj; /* Name of the map object. */ int mask_tex_mapping; /* How to map the texture! */ char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */ - /* Padding… */ - int pad_i2; + int pad2; } WeightVGMixModifierData; -/* How second vgroup’s weights affect first ones. */ +/* How second vgroup's weights affect first ones. */ #define MOD_WVG_MIX_SET 1 /* Second weights replace weights. */ #define MOD_WVG_MIX_ADD 2 /* Second weights are added to weights. */ #define MOD_WVG_MIX_SUB 3 /* Second weights are subtracted from weights. */ @@ -891,9 +884,8 @@ typedef struct WeightVGMixModifierData { typedef struct WeightVGProximityModifierData { ModifierData modifier; - /* XXX Note: I tried to keep everything logically ordered – provided the - * alignment constraints… - */ + /* Note: I tried to keep everything logically ordered - provided the + * alignment constraints... */ char defgrp_name[32]; /* Name of vertex group to modify/weight. */ @@ -901,11 +893,11 @@ typedef struct WeightVGProximityModifierData { int proximity_mode; int proximity_flags; - /* Target object from which to calculate vertices’ distances. */ + /* Target object from which to calculate vertices distances. */ struct Object *proximity_ob_target; /* Masking options. */ - float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */ + float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */ /* Name of mask vertex group from which to get weight factors. */ char mask_defgrp_name[32]; @@ -918,8 +910,8 @@ typedef struct WeightVGProximityModifierData { float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */ - /* Padding… */ - int pad_i2; + /* Padding... */ + int pad; } WeightVGProximityModifierData; /* Modes of proximity weighting. */ diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index b30c4f84a9e..8dff0e376cb 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2642,7 +2642,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "add_threshold"); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Add Threshold", "Lower bound for a vertex’s weight " + RNA_def_property_ui_text(prop, "Add Threshold", "Lower bound for a vertex's weight " "to be added to the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2650,7 +2650,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "rem_threshold"); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Rem Threshold", "Upper bound for a vertex’s weight " + RNA_def_property_ui_text(prop, "Rem Threshold", "Upper bound for a vertex's weight " "to be removed from the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2746,7 +2746,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) {MOD_WVG_PROXIMITY_OBJECT, "OBJECT", 0, "Object Distance", "Use distance between affected and target objects."}, {MOD_WVG_PROXIMITY_GEOMETRY, "GEOMETRY", 0, "Geometry Distance", - "Use distance between affected object’s vertices and target object, or target object’s geometry."}, + "Use distance between affected object's vertices and target object, or target object's geometry."}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem proximity_geometry_items[] = { @@ -2760,7 +2760,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) srna= RNA_def_struct(brna, "WeightVGProximityModifier", "Modifier"); RNA_def_struct_ui_text(srna, "WeightVG Proximity Modifier", - "Set the weights of vertices in a group from a target object’s " + "Set the weights of vertices in a group from a target object's " "distance."); RNA_def_struct_sdna(srna, "WeightVGProximityModifierData"); RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); @@ -2780,12 +2780,12 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "proximity_flags"); RNA_def_property_enum_items(prop, proximity_geometry_items); RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */ - RNA_def_property_ui_text(prop, "Proximity Geometry", "Use shortest distance to target object’s geometry as weight"); + RNA_def_property_ui_text(prop, "Proximity Geometry", "Use shortest distance to target object's geometry as weight"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "proximity_ob_target"); - RNA_def_property_ui_text(prop, "Target Object", "Object to calculate vertices’ distances from."); + RNA_def_property_ui_text(prop, "Target Object", "Object to calculate vertices distances from."); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 43cc3081199..d688da4ba80 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -27,8 +27,8 @@ */ /* - * XXX I’d like to make modified weights visible in WeightPaint mode, - * but couldn’t figure a way to do this… + * XXX I'd like to make modified weights visible in WeightPaint mode, + * but couldn't figure a way to do this… * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? * Or the WeightPaint mode code itself? */ @@ -61,9 +61,10 @@ * XXX The standard “factor” value is assumed in [0.0, 1.0] range. Else, weird results might appear. */ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object *ob, - DerivedMesh *dm, float fact, const char *defgrp_name, Tex *texture, + DerivedMesh *dm, float fact, const char defgrp_name[32], Tex *texture, int tex_use_channel, int tex_mapping, Object *tex_map_object, - const char *tex_uvlayer_name) { + const char *tex_uvlayer_name) +{ int ref_didx; MDeformVert *dvert = NULL; int i; @@ -80,9 +81,9 @@ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object float (*v_co)[3]; /* Use new generic get_texture_coords, but do not modify our DNA struct for it… - * XXX Why use a ModifierData stuff here ? Why not a simple, generic struct for parameters ? - * What e.g. if a modifier wants to use several textures ? - * Why use only v_co, and not MVert (or both) ? + * XXX Why use a ModifierData stuff here ? Why not a simple, generic struct for parameters ? + * What e.g. if a modifier wants to use several textures ? + * Why use only v_co, and not MVert (or both) ? */ t_map.texture = texture; t_map.map_object = tex_map_object; @@ -180,9 +181,10 @@ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object * If indices is not NULL, it must be a table of same length as weights, mapping to the real * vertex index (in case the weight table does not cover the whole vertices...). */ -void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indices, - float *weights, int do_add, float add_thresh, int do_rem, - float rem_thresh){ +void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, + const int *indices, const float *weights, int do_add, + float add_thresh, int do_rem, float rem_thresh) +{ int i; for (i = 0; i < num; i++) { @@ -195,8 +197,8 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indice /* Never allow weights out of [0.0, 1.0] range. */ CLAMP(w, 0.0, 1.0); - /* Let’s first check to see if this vert is already in the weight group – if so - * let’s update it, or remove it if needed. + /* Let's first check to see if this vert is already in the weight group – if so + * let's update it, or remove it if needed. */ for (j = 0; j < dv->totweight; j++) { /* If this weight corresponds to the deform group, update the value or, @@ -233,7 +235,7 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indice } } - /* If the vert wasn’t in the deform group, add it if needed! + /* If the vert wasn't in the deform group, add it if needed! */ if (add2vg && w > add_thresh) { newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "WeightVGEdit Modifier, deformWeight"); diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h index 1bd40e3879f..b42e9c20035 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.h +++ b/source/blender/modifiers/intern/MOD_weightvg_util.h @@ -44,8 +44,8 @@ struct Object; struct MappingInfoModifierData;*/ /* - * XXX I’d like to make modified weights visible in WeightPaint mode, - * but couldn’t figure a way to do this… + * XXX I'd like to make modified weights visible in WeightPaint mode, + * but couldn't figure a way to do this… * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? * Or the WeightPaint mode code itself? */ @@ -68,7 +68,7 @@ struct MappingInfoModifierData;*/ * XXX The standard “factor” value is assumed in [0.0, 1.0] range. Else, weird results might appear. */ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object *ob, - struct DerivedMesh *dm, float fact, const char *defgrp_name, Tex *texture, + struct DerivedMesh *dm, float fact, const char defgrp_name[32], Tex *texture, int tex_use_channel, int tex_mapping, Object *tex_map_object, const char *tex_uvlayer_name); @@ -76,7 +76,8 @@ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object * If indices is not NULL, it must be a table of same length as weights, mapping to the real * vertex index (in case the weight table does not cover the whole vertices...). */ -void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indices, float *weights, - int do_add, float add_thresh, int do_rem, float rem_thresh); +void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, + const int *indices, const float *weights, int do_add, + float add_thresh, int do_rem, float rem_thresh); #endif /* MOD_WEIGHTVG_UTIL_H */ diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index a1057bdbbbb..bcf2195d366 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -27,8 +27,8 @@ */ /* - * XXX I’d like to make modified weights visible in WeightPaint mode, - * but couldn’t figure a way to do this… + * XXX I'd like to make modified weights visible in WeightPaint mode, + * but couldn't figure a way to do this… * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? * Or the WeightPaint mode code itself? */ @@ -102,8 +102,7 @@ static void copyData(ModifierData *md, ModifierData *target) twmd->mask_tex_use_channel = wmd->mask_tex_use_channel; twmd->mask_tex_mapping = wmd->mask_tex_mapping; twmd->mask_tex_map_obj = wmd->mask_tex_map_obj; - BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, - sizeof(twmd->mask_tex_uvlayer_name)); + BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, sizeof(twmd->mask_tex_uvlayer_name)); } static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) @@ -232,7 +231,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */ if (dvert == CustomData_get_layer(&ob_m->vdata, CD_MDEFORMVERT)) { /* XXX Seems to create problems with weightpaint mode??? - * I’m missing something here, I guess… + * I'm missing something here, I guess… */ // DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ ret = CDDM_copy(dm); diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 8b0e598962e..ba5ae5a2d70 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -27,8 +27,8 @@ */ /* - * XXX I’d like to make modified weights visible in WeightPaint mode, - * but couldn’t figure a way to do this… + * XXX I'd like to make modified weights visible in WeightPaint mode, + * but couldn't figure a way to do this… * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? * Or the WeightPaint mode code itself? */ @@ -61,7 +61,7 @@ static float mix_weight(float weight, float weight2, char mix_mode) { #if 0 /* - * XXX Don’t know why, but the switch version takes many CPU time, + * XXX Don't know why, but the switch version takes many CPU time, * and produces lag in realtime playback… */ switch (mix_mode) @@ -146,8 +146,7 @@ static void copyData(ModifierData *md, ModifierData *target) twmd->mask_tex_use_channel = wmd->mask_tex_use_channel; twmd->mask_tex_mapping = wmd->mask_tex_mapping; twmd->mask_tex_map_obj = wmd->mask_tex_map_obj; - BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, - sizeof(twmd->mask_tex_uvlayer_name)); + BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, sizeof(twmd->mask_tex_uvlayer_name)); } static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) @@ -279,7 +278,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */ if (dvert == CustomData_get_layer(&ob_m->vdata, CD_MDEFORMVERT)) { /* XXX Seems to create problems with weightpaint mode??? - * I’m missing something here, I guess… + * I'm missing something here, I guess… */ // DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ ret = CDDM_copy(dm); diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index c4f0c2b214c..1acb3035d2a 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -27,8 +27,8 @@ */ /* - * XXX I’d like to make modified weights visible in WeightPaint mode, - * but couldn’t figure a way to do this… + * XXX I'd like to make modified weights visible in WeightPaint mode, + * but couldn't figure a way to do this… * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? * Or the WeightPaint mode code itself? */ @@ -234,6 +234,7 @@ static void initData(ModifierData *md) wmd->mask_constant = 1.0f; wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL; + wmd->max_dist = 1.0f; /* vert arbitrary distance, but don't use 0 */ } static void copyData(ModifierData *md, ModifierData *target) @@ -252,8 +253,9 @@ static void copyData(ModifierData *md, ModifierData *target) twmd->mask_tex_use_channel = wmd->mask_tex_use_channel; twmd->mask_tex_mapping = wmd->mask_tex_mapping; twmd->mask_tex_map_obj = wmd->mask_tex_map_obj; - BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, - sizeof(twmd->mask_tex_uvlayer_name)); + BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, sizeof(twmd->mask_tex_uvlayer_name)); + twmd->min_dist = wmd->min_dist; + twmd->max_dist = wmd->max_dist; } static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) @@ -396,7 +398,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */ if (dvert == CustomData_get_layer(&ob_m->vdata, CD_MDEFORMVERT)) { /* XXX Seems to create problems with weightpaint mode??? - * I’m missing something here, I guess… + * I'm missing something here, I guess… */ // DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ ret = CDDM_copy(dm); -- cgit v1.2.3 From 5fd8ffd242da37ff12e56b05b0e44b0053e5143b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Sep 2011 03:26:49 +0000 Subject: - mask_tex_map_obj --> mask_tex_map_object - dont allow negative min distances --- release/scripts/startup/bl_ui/properties_data_modifier.py | 2 +- source/blender/makesrna/intern/rna_modifier.c | 11 ++++++----- source/blender/modifiers/intern/MOD_weightvg_util.c | 1 - source/blender/modifiers/intern/MOD_weightvgedit.c | 1 - source/blender/modifiers/intern/MOD_weightvgmix.c | 1 - source/blender/modifiers/intern/MOD_weightvgproximity.c | 1 - 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 6370cc8942a..4e1056549a7 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -764,7 +764,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "mask_tex_use_channel", text="") if md.mask_tex_mapping == 'OBJECT': - layout.prop(md, "mask_tex_map_obj", text="Object") + layout.prop(md, "mask_tex_map_object", text="Object") elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH': layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures") diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 8dff0e376cb..a071284467b 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2542,7 +2542,8 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *brna, StructRNA *srna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_mask_uvlayer_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "mask_tex_map_obj", PROP_POINTER, PROP_NONE); + prop= RNA_def_property(srna, "mask_tex_map_object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "mask_tex_map_obj"); RNA_def_property_ui_text(prop, "Texture Coordinate Object", "Which object to take texture " "coordinates from."); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); @@ -2790,14 +2791,14 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); prop= RNA_def_property(srna, "min_dist", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, 0); RNA_def_property_ui_text(prop, "Lowest Dist", "Distance mapping to weight 0.0."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "max_dist", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, 0); RNA_def_property_ui_text(prop, "Highest Dist", "Distance mapping to weight 1.0."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index d688da4ba80..dc6ec638b4c 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -250,4 +250,3 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, } } } - diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index bcf2195d366..55f8716e0b0 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -328,4 +328,3 @@ ModifierTypeInfo modifierType_WeightVGEdit = { /* foreachIDLink */ foreachIDLink, /* foreachTexLink */ foreachTexLink, }; - diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index ba5ae5a2d70..a26a3d1e7f4 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -463,4 +463,3 @@ ModifierTypeInfo modifierType_WeightVGMix = { /* foreachIDLink */ foreachIDLink, /* foreachTexLink */ foreachTexLink, }; - diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 1acb3035d2a..3bd39b0417f 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -559,4 +559,3 @@ ModifierTypeInfo modifierType_WeightVGProximity = { /* foreachIDLink */ foreachIDLink, /* foreachTexLink */ foreachTexLink, }; - -- cgit v1.2.3 From 1ba71e2caf0f7e425eaefc24891a1752247ef6bd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Sep 2011 03:53:26 +0000 Subject: change proximity method since minimum distance of 0.0 wasnt working at all. --- source/blender/modifiers/intern/MOD_weightvgproximity.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 3bd39b0417f..6519d781f05 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -205,11 +205,13 @@ static float get_ob2ob_distance(const Object* ob, const Object* obr) */ void do_map(float *weights, const int nidx, const float min_d, const float max_d) { - int i; - float b = min_d / (min_d - max_d); - float a = -b / min_d; - for (i = 0; i < nidx; i++) - weights[i] = a * weights[i] + b; + const float range_inv= 1.0f / (max_d - min_d); /* invert since multiplication is faster */ + unsigned int i= nidx; + while (i-- > 0) { + if (weights[i] >= max_d) weights[i]= 1.0f; /* most likely case first */ + else if(weights[i] <= min_d) weights[i]= 0.0f; + else weights[i]= (weights[i] - min_d) * range_inv; + } } /*a min_d + b = 0.0*/ -- cgit v1.2.3 From e8346fa84c68005a508b290cf3d255f4004157f1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Sep 2011 04:00:08 +0000 Subject: simplify get_vert2ob_distance, mat4_to_loc_rot_size isnt needed. --- .../blender/modifiers/intern/MOD_weightvgproximity.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 6519d781f05..36f749ab506 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -169,25 +169,17 @@ static void get_vert2geom_distance(int numVerts, float (*v_cos)[3], * Note that it works in final world space (i.e. with constraints etc. applied). */ static void get_vert2ob_distance(int numVerts, float (*v_cos)[3], float *dist, - const Object* ob, const Object* obr) + Object* ob, Object* obr) { /* Vertex and ref object coordinates. */ - float v_wco[3], - or_wco[3], - or_wro[3][3], /*unused*/ - or_wsz[3]; /*unused*/ - int i; - - /* Get world-coordinates of the reference object (constraints and anim included). - * We also get rotation and scale, even though we do not want them… - */ - mat4_to_loc_rot_size(or_wco, or_wro, or_wsz, (float (*)[4])obr->obmat); + float v_wco[3]; + unsigned int i= numVerts; - for (i = 0; i < numVerts; i++) { + while(i-- > 0) { /* Get world-coordinates of the vertex (constraints and anim included). */ - mul_v3_m4v3(v_wco, (float (*)[4])ob->obmat, v_cos[i]); + mul_v3_m4v3(v_wco, ob->obmat, v_cos[i]); /* Return distance between both coordinates. */ - dist[i] = len_v3v3(v_wco, or_wco); + dist[i] = len_v3v3(v_wco, obr->obmat[3]); } } -- cgit v1.2.3 From 2c740a9b5e07faec543d30c85f16f6bbe6fa0c77 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Sep 2011 04:53:23 +0000 Subject: rename vertex group mix "vgroup, vgroup2" to "vgroup_a, vgroup_b" also clamp more values between 0.0 and 1.0 --- .../startup/bl_ui/properties_data_modifier.py | 16 ++--- source/blender/makesdna/DNA_modifier_types.h | 16 ++--- source/blender/makesrna/intern/rna_modifier.c | 54 ++++++++--------- source/blender/modifiers/intern/MOD_weightvgmix.c | 68 +++++++++++----------- 4 files changed, 78 insertions(+), 76 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 4e1056549a7..a7e87c6ab62 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -822,19 +822,19 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if ob.type == 'MESH': split = layout.split() col = split.column() - col.label(text="Vertex Group 1:") - col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") - col.label(text="Default Weight 1:") - col.prop(md, "default_weight", text="") + col.label(text="Vertex Group A:") + col.prop_search(md, "vertex_group_a", ob, "vertex_groups", text="") + col.label(text="Default Weight A:") + col.prop(md, "default_weight_a", text="") col.label(text="Mix Mode:") col.prop(md, "mix_mode", text="") col = split.column() - col.label(text="Vertex Group 2:") - col.prop_search(md, "vertex_group2", ob, "vertex_groups", text="") - col.label(text="Default Weight 2:") - col.prop(md, "default_weight2", text="") + col.label(text="Vertex Group B:") + col.prop_search(md, "vertex_group_b", ob, "vertex_groups", text="") + col.label(text="Default Weight B:") + col.prop(md, "default_weight_b", text="") col.label(text="Mix Set:") col.prop(md, "mix_set", text="") diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index d3c3ba2f93b..1714ae2a018 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -841,10 +841,10 @@ typedef struct WeightVGMixModifierData { /* XXX Note: I tried to keep everything logically ordered – provided the * alignment constraints... */ - char defgrp_name[32]; /* Name of vertex group to modify/weight. */ - char defgrp_name2[32]; /* Name of other vertex group to mix in. */ - float default_weight; /* Default weight value for first vgroup. */ - float default_weight2; /* Default weight value to mix in. */ + char defgrp_name_a[32]; /* Name of vertex group to modify/weight. */ + char defgrp_name_b[32]; /* Name of other vertex group to mix in. */ + float default_weight_a; /* Default weight value for first vgroup. */ + float default_weight_b; /* Default weight value to mix in. */ char mix_mode; /* How second vgroups weights affect first ones */ char mix_set; /* What vertices to affect. */ @@ -876,10 +876,10 @@ typedef struct WeightVGMixModifierData { /* What vertices to affect. */ #define MOD_WVG_SET_ALL 1 /* Affect all vertices. */ -#define MOD_WVG_SET_ORG 2 /* Affect only vertices in first vgroup. */ -#define MOD_WVG_SET_NEW 3 /* Affect only vertices in second vgroup. */ -#define MOD_WVG_SET_UNION 4 /* Affect only vertices in one vgroup or the other. */ -#define MOD_WVG_SET_INTER 5 /* Affect only vertices in both vgroups. */ +#define MOD_WVG_SET_A 2 /* Affect only vertices in first vgroup. */ +#define MOD_WVG_SET_B 3 /* Affect only vertices in second vgroup. */ +#define MOD_WVG_SET_OR 4 /* Affect only vertices in one vgroup or the other. */ +#define MOD_WVG_SET_AND 5 /* Affect only vertices in both vgroups. */ typedef struct WeightVGProximityModifierData { ModifierData modifier; diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index a071284467b..169288cfed3 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -394,7 +394,7 @@ static void rna_WeightVGModifier_vgroup_set(PointerRNA *ptr, const char *value) } else if (md->type == eModifierType_WeightVGMix) { WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)md; - rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name, sizeof(wmd->defgrp_name)); + rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name_a, sizeof(wmd->defgrp_name_a)); } else if (md->type == eModifierType_WeightVGProximity) { WeightVGProximityModifierData *wmd= (WeightVGProximityModifierData*)md; @@ -422,7 +422,7 @@ static void rna_WeightVGModifier_mask_vgroup_set(PointerRNA *ptr, const char *va static void rna_WeightVGMixModifier_vgroup2_set(PointerRNA *ptr, const char *value) { WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)ptr->data; - rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name2, sizeof(wmd->defgrp_name2)); + rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name_b, sizeof(wmd->defgrp_name_b)); } static void rna_MappingInfo_uvlayer_set(PointerRNA *ptr, const char *value) @@ -2510,7 +2510,7 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *brna, StructRNA *srna) prop= RNA_def_property(srna, "mask_constant", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_ui_range(prop, -1.0, 1.0, 10, 0); RNA_def_property_ui_text(prop, "Influence", "Global influence of current modifications on vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2600,8 +2600,8 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) /* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ prop= RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_range(prop, 0.0, 1.0f); + RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0); RNA_def_property_ui_text(prop, "Default Weight", "Default weight a vertex will have if " "it is not in the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2641,16 +2641,16 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) prop= RNA_def_property(srna, "add_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "add_threshold"); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_range(prop, 0.0, 1.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0); RNA_def_property_ui_text(prop, "Add Threshold", "Lower bound for a vertex's weight " "to be added to the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "remove_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "rem_threshold"); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); + RNA_def_property_range(prop, 0.0, 1.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0); RNA_def_property_ui_text(prop, "Rem Threshold", "Upper bound for a vertex's weight " "to be removed from the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -2685,10 +2685,10 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna) static EnumPropertyItem weightvg_mix_set_items[] = { {MOD_WVG_SET_ALL, "ALL", 0, "All vertices", ""}, - {MOD_WVG_SET_ORG, "ORG", 0, "Vertices from vgroup 1", ""}, - {MOD_WVG_SET_NEW, "NEW", 0, "Vertices from vgroup 2", ""}, - {MOD_WVG_SET_UNION, "UNION", 0, "Vertices from one group", ""}, - {MOD_WVG_SET_INTER, "INTER", 0, "Vertices from both groups", ""}, + {MOD_WVG_SET_A, "A", 0, "Vertices from group A", ""}, + {MOD_WVG_SET_B, "B", 0, "Vertices from group B", ""}, + {MOD_WVG_SET_OR, "OR", 0, "Vertices from one group", ""}, + {MOD_WVG_SET_AND, "AND", 0, "Vertices from both groups", ""}, {0, NULL, 0, NULL, NULL}}; StructRNA *srna; @@ -2700,29 +2700,29 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna) RNA_def_struct_sdna(srna, "WeightVGMixModifierData"); RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); - prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); - RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); - RNA_def_property_ui_text(prop, "Vertex Group", "First vertex group name."); + prop= RNA_def_property(srna, "vertex_group_a", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "defgrp_name_a"); + RNA_def_property_ui_text(prop, "Vertex Group A", "First vertex group name."); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "vertex_group2", PROP_STRING, PROP_NONE); - RNA_def_property_string_sdna(prop, NULL, "defgrp_name2"); - RNA_def_property_ui_text(prop, "Vertex Group 2", "Second vertex group name."); + prop= RNA_def_property(srna, "vertex_group_b", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "defgrp_name_b"); + RNA_def_property_ui_text(prop, "Vertex Group B", "Second vertex group name."); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGMixModifier_vgroup2_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Default Weight", "Default weight a vertex will have if " + prop= RNA_def_property(srna, "default_weight_a", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0, 1.0f); + RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0); + RNA_def_property_ui_text(prop, "Default Weight A", "Default weight a vertex will have if " "it is not in the first vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "default_weight2", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0); - RNA_def_property_ui_text(prop, "Default Weight 2", "Default weight a vertex will have if " + prop= RNA_def_property(srna, "default_weight_b", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0, 1.0f); + RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0); + RNA_def_property_ui_text(prop, "Default Weight B", "Default weight a vertex will have if " "it is not in the second vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index a26a3d1e7f4..ad70e8ab55c 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -118,10 +118,10 @@ static void initData(ModifierData *md) { WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; - wmd->default_weight = 0.0; - wmd->default_weight2 = 0.0; + wmd->default_weight_a = 0.0f; + wmd->default_weight_b = 0.0f; wmd->mix_mode = MOD_WVG_MIX_SET; - wmd->mix_set = MOD_WVG_SET_INTER; + wmd->mix_set = MOD_WVG_SET_AND; wmd->mask_constant = 1.0f; wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ @@ -133,10 +133,10 @@ static void copyData(ModifierData *md, ModifierData *target) WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; WeightVGMixModifierData *twmd = (WeightVGMixModifierData*) target; - BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name)); - BLI_strncpy(twmd->defgrp_name2, wmd->defgrp_name2, sizeof(twmd->defgrp_name2)); - twmd->default_weight = wmd->default_weight; - twmd->default_weight2 = wmd->default_weight2; + BLI_strncpy(twmd->defgrp_name_a, wmd->defgrp_name_a, sizeof(twmd->defgrp_name_a)); + BLI_strncpy(twmd->defgrp_name_b, wmd->defgrp_name_b, sizeof(twmd->defgrp_name_b)); + twmd->default_weight_a = wmd->default_weight_a; + twmd->default_weight_b = wmd->default_weight_b; twmd->mix_mode = wmd->mix_mode; twmd->mix_set = wmd->mix_set; @@ -217,7 +217,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams)) { WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; /* If no vertex group, bypass. */ - return (wmd->defgrp_name == NULL); + return (wmd->defgrp_name_a == NULL); } static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData, @@ -248,12 +248,12 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der return dm; /* Get vgroup idx from its name. */ - defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name); + defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name_a); if (defgrp_idx < 0) return dm; /* Get seconf vgroup idx from its name, if given. */ - if (wmd->defgrp_name2[0] != (char)0) { - defgrp_idx2 = defgroup_name_index(ob, wmd->defgrp_name2); + if (wmd->defgrp_name_b[0] != (char)0) { + defgrp_idx2 = defgroup_name_index(ob, wmd->defgrp_name_b); if (defgrp_idx2 < 0) return dm; } @@ -305,7 +305,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der /* Find out which vertices to work on. */ tidx = MEM_mallocN(sizeof(int) * numVerts, "WeightVGMix Modifier, tidx"); switch (wmd->mix_set) { - case MOD_WVG_SET_ORG: + case MOD_WVG_SET_A: /* All vertices in first vgroup. */ for (i = 0; i < numVerts; i++) { for (j = 0; j < dvert[i].totweight; j++) { @@ -316,7 +316,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der } } break; - case MOD_WVG_SET_NEW: + case MOD_WVG_SET_B: /* All vertices in second vgroup. */ for (i = 0; i < numVerts; i++) { for (j = 0; j < dvert[i].totweight; j++) { @@ -327,7 +327,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der } } break; - case MOD_WVG_SET_UNION: + case MOD_WVG_SET_OR: /* All vertices in one vgroup or the other. */ for (i = 0; i < numVerts; i++) { for (j = 0; j < dvert[i].totweight; j++) { @@ -338,27 +338,29 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der } } break; - case MOD_WVG_SET_INTER: + case MOD_WVG_SET_AND: /* All vertices in both vgroups. */ for (i = 0; i < numVerts; i++) { - char idx1 = 0; - char idx2 = 0; + int idx1 = FALSE; + int idx2 = FALSE; for (j = 0; j < dvert[i].totweight; j++) { if(dvert[i].dw[j].def_nr == defgrp_idx) { - if (idx2) { + if (idx2 == TRUE) { tidx[numIdx++] = i; break; } - else - idx1 = 1; + else { + idx1 = TRUE; + } } else if(dvert[i].dw[j].def_nr == defgrp_idx2) { - if (idx1) { + if (idx1 == TRUE) { tidx[numIdx++] = i; break; } - else - idx2 = 1; + else { + idx2 = TRUE; + } } } } @@ -382,27 +384,27 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der /* Mix weights. */ for (i = 0; i < numIdx; i++) { float weight2 = 0.0; - char w1 = 0; - char w2 = 0; + int w1 = FALSE; + int w2 = FALSE; int idx = indices ? indices[i] : i; for (j = 0; j < dvert[idx].totweight; j++) { if(dvert[idx].dw[j].def_nr == defgrp_idx) { org_w[i] = dvert[idx].dw[j].weight; - w1 = 1; - if (w2) + w1 = TRUE; + if (w2 == TRUE) break; } else if(dvert[idx].dw[j].def_nr == defgrp_idx2) { weight2 = dvert[idx].dw[j].weight; - w2 = 1; - if (w1) + w2 = TRUE; + if (w1 == TRUE) break; } } - if (w1 == 0) - org_w[i] = wmd->default_weight; - if (w2 == 0) - weight2 = wmd->default_weight2; + if (w1 == FALSE) + org_w[i] = wmd->default_weight_a; + if (w2 == FALSE) + weight2 = wmd->default_weight_b; new_w[i] = mix_weight(org_w[i], weight2, wmd->mix_mode); } -- cgit v1.2.3 From e5209c205974b03f1090bf73414a82072a6a0d5b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Sep 2011 05:28:32 +0000 Subject: - vertex group modifiers isDisabled functions were incorrect, need to check if the string is set: == NULL will never be true. - was doing NULL checks on freeing memory in cases where the values were already accessed (blender would have crashed anyway), so remove the NULL checks. - use deform.c api weight functions to replace inline weight lookups in some cases. - change if checks in weightvg_do_mask() so its more obvious whats going on. --- .../blender/modifiers/intern/MOD_weightvg_util.c | 50 +++++++++++----------- source/blender/modifiers/intern/MOD_weightvgedit.c | 35 +++++++-------- source/blender/modifiers/intern/MOD_weightvgmix.c | 15 +++---- .../modifiers/intern/MOD_weightvgproximity.c | 14 +++--- 4 files changed, 51 insertions(+), 63 deletions(-) diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index dc6ec638b4c..8952d70d323 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -66,7 +66,6 @@ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object const char *tex_uvlayer_name) { int ref_didx; - MDeformVert *dvert = NULL; int i; /* If influence factor is null, nothing to do! */ @@ -139,16 +138,16 @@ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object } MEM_freeN(tex_co); - return; } + else if ((ref_didx = defgroup_name_index(ob, defgrp_name)) != -1) { + MDeformVert *dvert = NULL; - /* Check whether we want to set vgroup weights from a constant weight factor or a vertex - * group. - */ - /* Get vgroup idx from its name. */ - ref_didx = defgroup_name_index(ob, defgrp_name); - /* Proceed only if vgroup is valid, else use constant factor. */ - if (ref_didx >= 0) { + /* Check whether we want to set vgroup weights from a constant weight factor or a vertex + * group. + */ + /* Get vgroup idx from its name. */ + + /* Proceed only if vgroup is valid, else use constant factor. */ /* Get actual dverts (ie vertex group data). */ dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT); /* Proceed only if vgroup is valid, else assume factor = O. */ @@ -157,23 +156,18 @@ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object /* For each weight (vertex), make the mix between org and new weights. */ for (i = 0; i < num; i++) { int idx = indices ? indices[i] : i; - int j; - for (j = 0; j < dvert[idx].totweight; j++) { - if(dvert[idx].dw[j].def_nr == ref_didx) { - float f = dvert[idx].dw[j].weight * fact; - org_w[i] = (new_w[i] * f) + (org_w[i] * (1.0-f)); - break; - } - } + const float f= defvert_find_weight(&dvert[idx], ref_didx) * fact; + org_w[i] = (new_w[i] * f) + (org_w[i] * (1.0f-f)); /* If that vertex is not in ref vgroup, assume null factor, and hence do nothing! */ } - return; } - - /* Default "influence" behavior. */ - /* For each weight (vertex), make the mix between org and new weights. */ - for (i = 0; i < num; i++) { - org_w[i] = (new_w[i] * fact) + (org_w[i] * (1.0-fact)); + else { + /* Default "influence" behavior. */ + /* For each weight (vertex), make the mix between org and new weights. */ + const float ifact= 1.0-fact; + for (i = 0; i < num; i++) { + org_w[i] = (new_w[i] * fact) + (org_w[i] * ifact); + } } } @@ -189,7 +183,7 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, for (i = 0; i < num; i++) { int j; - char add2vg = do_add; + int add2vg = do_add; float w = weights[i]; MDeformVert *dv = &dvert[indices ? indices[i] : i]; MDeformWeight *newdw; @@ -207,6 +201,8 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, if (dv->dw[j].def_nr == defgrp_idx) { /* Remove the vertex from this vgroup if needed. */ if (do_rem && w < rem_thresh) { + /* TODO, move this into deform.c to make into a generic function */ + dv->totweight--; /* If there are still other deform weights attached to this vert then remove * this deform weight, and reshuffle the others. @@ -230,14 +226,16 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, else { dv->dw[j].weight = w; } - add2vg = 0; + add2vg = FALSE; break; } } /* If the vert wasn't in the deform group, add it if needed! */ - if (add2vg && w > add_thresh) { + if ((add2vg == TRUE) && w > add_thresh) { + /* TODO, mvoe into deform.c and make into a generic function, this assumes the vertex + * groups have already been checked, so this has to remain low level */ newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "WeightVGEdit Modifier, deformWeight"); if(dv->dw) { memcpy(newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight); diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index 55f8716e0b0..87747f255fd 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -173,7 +173,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams)) { WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; /* If no vertex group, bypass. */ - return (wmd->defgrp_name == NULL); + return (wmd->defgrp_name[0] == '\0'); } static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData, @@ -185,17 +185,16 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der Mesh *ob_m = NULL; #endif MDeformVert *dvert = NULL; - float *org_w = NULL; /* Array original weights. */ - float *new_w = NULL; /* Array new weights. */ + float *org_w; /* Array original weights. */ + float *new_w; /* Array new weights. */ int numVerts; int defgrp_idx; int i; char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */ - float *mapf = NULL; /* Cache for mapping factors. */ /* Flags. */ - char do_map = wmd->edit_flags & MOD_WVG_EDIT_CMAP; - char do_add = wmd->edit_flags & MOD_WVG_EDIT_ADD2VG; - char do_rem = wmd->edit_flags & MOD_WVG_EDIT_REMFVG; + int do_map = (wmd->edit_flags & MOD_WVG_EDIT_CMAP) != 0; + int do_add = (wmd->edit_flags & MOD_WVG_EDIT_ADD2VG) != 0; + int do_rem = (wmd->edit_flags & MOD_WVG_EDIT_REMFVG) != 0; /* Get number of verts. */ numVerts = dm->getNumVerts(dm); @@ -259,17 +258,17 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der org_w = MEM_mallocN(sizeof(float) * numVerts, "WeightVGEdit Modifier, org_w"); new_w = MEM_mallocN(sizeof(float) * numVerts, "WeightVGEdit Modifier, org_w"); for (i = 0; i < numVerts; i++) { - int j; + MDeformWeight *dw= defvert_find_index(&dvert[i], defgrp_idx); org_w[i] = new_w[i] = wmd->default_weight; - for (j = 0; j < dvert[i].totweight; j++) { - if(dvert[i].dw[j].def_nr == defgrp_idx) { - org_w[i] = new_w[i] = dvert[i].dw[j].weight; - break; - } + + if(dw) { + org_w[i] = new_w[i] = dw->weight; } + /* Do mapping. */ - if (do_map) + if (do_map) { new_w[i] = curvemapping_evaluateF(wmd->cmap_curve, 0, new_w[i]); + } } /* Do masking. */ @@ -282,12 +281,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der do_rem, wmd->rem_threshold); /* Freeing stuff. */ - if (org_w) - MEM_freeN(org_w); - if (new_w) - MEM_freeN(new_w); - if (mapf) - MEM_freeN(mapf); + MEM_freeN(org_w); + MEM_freeN(new_w); /* Return the vgroup-modified mesh. */ return ret; diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index ad70e8ab55c..a30afcb230f 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -217,7 +217,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams)) { WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md; /* If no vertex group, bypass. */ - return (wmd->defgrp_name_a == NULL); + return (wmd->defgrp_name_a[0] == '\0'); } static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData, @@ -231,8 +231,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der MDeformVert *dvert = NULL; int numVerts; int defgrp_idx, defgrp_idx2 = -1; - float *org_w = NULL; - float *new_w = NULL; + float *org_w; + float *new_w; int *tidx, *indices = NULL; int numIdx = 0; int i, j; @@ -416,13 +416,12 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der /* Update (add to) vgroup. * XXX Depending on the MOD_WVG_SET_xxx option chosen, we might have to add vertices to vgroup. */ - weightvg_update_vg(dvert, defgrp_idx, numIdx, indices, org_w, 1, -FLT_MAX, 0, 0.0f); + weightvg_update_vg(dvert, defgrp_idx, numIdx, indices, org_w, TRUE, -FLT_MAX, 0, 0.0f); /* Freeing stuff. */ - if (org_w) - MEM_freeN(org_w); - if (new_w) - MEM_freeN(new_w); + MEM_freeN(org_w); + MEM_freeN(new_w); + if (indices) MEM_freeN(indices); diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 36f749ab506..513ba9c815f 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -327,7 +327,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams)) { WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md; /* If no vertex group, bypass. */ - if (wmd->defgrp_name == NULL) return 1; + if (wmd->defgrp_name[0] == '\0') return 1; /* If no target object, bypass. */ return (wmd->proximity_ob_target == NULL); } @@ -505,14 +505,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der weightvg_update_vg(dvert, defgrp_idx, numIdx, indices, org_w, 0, 0.0f, 0, 0.0f); /* Freeing stuff. */ - if (org_w) - MEM_freeN(org_w); - if (new_w) - MEM_freeN(new_w); - if (indices) - MEM_freeN(indices); - if (v_cos) - MEM_freeN(v_cos); + MEM_freeN(org_w); + MEM_freeN(new_w); + MEM_freeN(indices); + MEM_freeN(v_cos); /* Return the vgroup-modified mesh. */ return ret; -- cgit v1.2.3 From 3b09c331faae4406d619bfb1fab28a01c77097b4 Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Mon, 5 Sep 2011 05:42:49 +0000 Subject: Adding noise module by default in driver_namespace http://www.pasteall.org/blend/8677 --- source/blender/python/intern/bpy_driver.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index d68fd9a9111..f3ef55d29c4 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -76,6 +76,13 @@ int bpy_pydriver_create_dict(void) Py_DECREF(mod); } + /* add noise to global namespace */ + mod= PyImport_ImportModuleLevel((char *)"noise", NULL, NULL, NULL, 0); + if (mod) { + PyDict_SetItemString(bpy_pydriver_Dict, "noise", mod); + Py_DECREF(mod); + } + return 0; } -- cgit v1.2.3 From cc906e0e2a1de9b19c6cefa1167332f348bb9e0f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Sep 2011 05:43:01 +0000 Subject: correct float -> double promotion warnings --- source/blender/makesrna/intern/rna_modifier.c | 4 ++-- .../blender/modifiers/intern/MOD_weightvg_util.c | 24 +++++++++++----------- source/blender/modifiers/intern/MOD_weightvgmix.c | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 169288cfed3..415900af6fc 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2584,13 +2584,13 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) prop= RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_ADD2VG); - RNA_def_property_ui_text(prop, "Add to VG", "Add vertices with weight over threshold " + RNA_def_property_ui_text(prop, "Group Add", "Add vertices with weight over threshold " "to vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "use_remove", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REMFVG); - RNA_def_property_ui_text(prop, "Rem from VG", "Remove vertices with weight below threshold " + RNA_def_property_ui_text(prop, "Group Remove", "Remove vertices with weight below threshold " "from vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 8952d70d323..93e1899ad60 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -69,7 +69,7 @@ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object int i; /* If influence factor is null, nothing to do! */ - if (fact == 0.0) return; + if (fact == 0.0f) return; /* If we want to mask vgroup weights from a texture. */ if (texture) { @@ -105,34 +105,34 @@ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object /* Get the good channel value… */ switch(tex_use_channel) { case MOD_WVG_MASK_TEX_USE_INT: - org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0 - (texres.tin*fact))); + org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0f - (texres.tin*fact))); break; case MOD_WVG_MASK_TEX_USE_RED: - org_w[i] = (new_w[i] * texres.tr * fact) + (org_w[i] * (1.0 - (texres.tr*fact))); + org_w[i] = (new_w[i] * texres.tr * fact) + (org_w[i] * (1.0f - (texres.tr*fact))); break; case MOD_WVG_MASK_TEX_USE_GREEN: - org_w[i] = (new_w[i] * texres.tg * fact) + (org_w[i] * (1.0 - (texres.tg*fact))); + org_w[i] = (new_w[i] * texres.tg * fact) + (org_w[i] * (1.0f - (texres.tg*fact))); break; case MOD_WVG_MASK_TEX_USE_BLUE: - org_w[i] = (new_w[i] * texres.tb * fact) + (org_w[i] * (1.0 - (texres.tb*fact))); + org_w[i] = (new_w[i] * texres.tb * fact) + (org_w[i] * (1.0f - (texres.tb*fact))); break; case MOD_WVG_MASK_TEX_USE_HUE: rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v); - org_w[i] = (new_w[i] * h * fact) + (org_w[i] * (1.0 - (h*fact))); + org_w[i] = (new_w[i] * h * fact) + (org_w[i] * (1.0f - (h*fact))); break; case MOD_WVG_MASK_TEX_USE_SAT: rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v); - org_w[i] = (new_w[i] * s * fact) + (org_w[i] * (1.0 - (s*fact))); + org_w[i] = (new_w[i] * s * fact) + (org_w[i] * (1.0f - (s*fact))); break; case MOD_WVG_MASK_TEX_USE_VAL: rgb_to_hsv(texres.tr, texres.tg, texres.tb, &h, &s, &v); - org_w[i] = (new_w[i] * v * fact) + (org_w[i] * (1.0 - (v*fact))); + org_w[i] = (new_w[i] * v * fact) + (org_w[i] * (1.0f - (v*fact))); break; case MOD_WVG_MASK_TEX_USE_ALPHA: - org_w[i] = (new_w[i] * texres.ta * fact) + (org_w[i] * (1.0 - (texres.ta*fact))); + org_w[i] = (new_w[i] * texres.ta * fact) + (org_w[i] * (1.0f - (texres.ta*fact))); break; default: - org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0 - (texres.tin*fact))); + org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0f - (texres.tin*fact))); break; } } @@ -164,7 +164,7 @@ void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object else { /* Default "influence" behavior. */ /* For each weight (vertex), make the mix between org and new weights. */ - const float ifact= 1.0-fact; + const float ifact= 1.0f - fact; for (i = 0; i < num; i++) { org_w[i] = (new_w[i] * fact) + (org_w[i] * ifact); } @@ -189,7 +189,7 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, MDeformWeight *newdw; /* Never allow weights out of [0.0, 1.0] range. */ - CLAMP(w, 0.0, 1.0); + CLAMP(w, 0.0f, 1.0f); /* Let's first check to see if this vert is already in the weight group – if so * let's update it, or remove it if needed. diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index a30afcb230f..7543b085b51 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -98,16 +98,16 @@ static float mix_weight(float weight, float weight2, char mix_mode) return (weight * weight2); else if (mix_mode == MOD_WVG_MIX_DIV) { /* Avoid dividing by zero (or really small values). */ - if (weight2 < 0.0 && weight2 > -MOD_WVG_ZEROFLOOR) + if (weight2 < 0.0f && weight2 > -MOD_WVG_ZEROFLOOR) weight2 = -MOD_WVG_ZEROFLOOR; - else if (weight2 >= 0.0 && weight2 < MOD_WVG_ZEROFLOOR) + else if (weight2 >= 0.0f && weight2 < MOD_WVG_ZEROFLOOR) weight2 = MOD_WVG_ZEROFLOOR; return (weight / weight2); } else if (mix_mode == MOD_WVG_MIX_DIF) return (weight < weight2 ? weight2 - weight : weight - weight2); else if (mix_mode == MOD_WVG_MIX_AVG) - return (weight + weight2) / 2.0; + return (weight + weight2) * 0.5f; else return weight2; } -- cgit v1.2.3 From 919bd181b764b0cf76b7e0fee76a07cc8126fc9a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 5 Sep 2011 08:20:11 +0000 Subject: Partial revert commit 39878 "Fix #28280: Insert Hook wrong index" Such load/make edit structures introduced regression into iterators via object's geometry (vertices, edges, control points and so) when adding hooks in the body of this iterator. Fix for wrong index should be non-destructable for geometry. This will fix #28506: Unusual behavior in curves. --- source/blender/editors/object/object_hook.c | 21 ++++---------------- source/blender/editors/object/object_relations.c | 25 ++++-------------------- 2 files changed, 8 insertions(+), 38 deletions(-) diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 266556773f0..bb32869469a 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -64,7 +64,6 @@ #include "ED_curve.h" #include "ED_mesh.h" -#include "ED_lattice.h" #include "ED_screen.h" #include "WM_types.h" @@ -293,7 +292,7 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo return totvert; } -static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int **indexar, char *name, float *cent_r) +static int object_hook_index_array(Object *obedit, int *tot, int **indexar, char *name, float *cent_r) { *indexar= NULL; *tot= 0; @@ -303,12 +302,7 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int * case OB_MESH: { Mesh *me= obedit->data; - EditMesh *em; - - load_editMesh(scene, obedit); - make_editMesh(scene, obedit); - - em = BKE_mesh_get_editmesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); /* check selected vertices first */ if( return_editmesh_indexar(em, tot, indexar, cent_r)) { @@ -322,17 +316,10 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int * } case OB_CURVE: case OB_SURF: - load_editNurb(obedit); - make_editNurb(obedit); - return return_editcurve_indexar(obedit, tot, indexar, cent_r); case OB_LATTICE: { Lattice *lt= obedit->data; - - load_editLatt(obedit); - make_editLatt(obedit); - return return_editlattice_indexar(lt->editlatt->latt, tot, indexar, cent_r); } default: @@ -440,7 +427,7 @@ static void add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *o int tot, ok, *indexar; char name[32]; - ok = object_hook_index_array(scene, obedit, &tot, &indexar, name, cent); + ok = object_hook_index_array(obedit, &tot, &indexar, name, cent); if (!ok) return; // XXX error("Requires selected vertices or active Vertex Group"); @@ -773,7 +760,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op) /* assign functionality */ - if(!object_hook_index_array(CTX_data_scene(C), ob, &tot, &indexar, name, cent)) { + if(!object_hook_index_array(ob, &tot, &indexar, name, cent)) { BKE_report(op->reports, RPT_WARNING, "Requires selected vertices or active vertex group"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index b9208e778c7..e9418ca9f9f 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -91,8 +91,6 @@ #include "ED_armature.h" #include "ED_curve.h" -#include "ED_lattice.h" -#include "ED_mesh.h" #include "ED_keyframing.h" #include "ED_object.h" #include "ED_screen.h" @@ -124,12 +122,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) if(obedit->type==OB_MESH) { Mesh *me= obedit->data; - EditMesh *em; - - load_editMesh(scene, obedit); - make_editMesh(scene, obedit); - - em = BKE_mesh_get_editmesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); eve= em->verts.first; while(eve) { @@ -147,12 +140,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(me, em); } else if(ELEM(obedit->type, OB_SURF, OB_CURVE)) { - ListBase *editnurb; - - load_editNurb(obedit); - make_editNurb(obedit); - - editnurb= curve_get_editcurve(obedit); + ListBase *editnurb= curve_get_editcurve(obedit); cu= obedit->data; @@ -192,13 +180,8 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) } } else if(obedit->type==OB_LATTICE) { - Lattice *lt; - - load_editLatt(obedit); - make_editLatt(obedit); - - lt= obedit->data; - + Lattice *lt= obedit->data; + a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw; bp= lt->editlatt->latt->def; while(a--) { -- cgit v1.2.3 From d91587752c1a27e0569dec4ea24a682e7ea51007 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 5 Sep 2011 13:19:19 +0000 Subject: Fix #28504: lib linking errors were not shown when opening a file from the splash screen. --- source/blender/windowmanager/intern/wm_event_system.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 27586525253..5711ec899bf 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -437,9 +437,18 @@ static void wm_operator_print(bContext *C, wmOperator *op) static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int popup) { - if(popup) - if(op->reports->list.first) + if(popup) { + if(op->reports->list.first) { + /* FIXME, temp setting window, see other call to uiPupMenuReports for why */ + wmWindow *win_prev= CTX_wm_window(C); + if(win_prev==NULL) + CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); + uiPupMenuReports(C, op->reports); + + CTX_wm_window_set(C, win_prev); + } + } if(retval & OPERATOR_FINISHED) { if(G.f & G_DEBUG) -- cgit v1.2.3 From cc1c8268f755adfcf02085251e095b0589548719 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Mon, 5 Sep 2011 15:03:31 +0000 Subject: Left debug print accidently enabled. --- source/blender/collada/MeshImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index 01eff8069c1..15bd9c48f12 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -220,7 +220,7 @@ void MeshImporter::set_face_uv(MTFace *mtface, UVDataWrapper &uvs, if (quad) uvs.getUV(indices[index + 3], mtface->uv[3]); -#if 1 // #ifdef COLLADA_DEBUG +#ifdef COLLADA_DEBUG if (quad) { fprintf(stderr, "face uv:\n" "((%d, %d, %d, %d))\n" -- cgit v1.2.3 From 59dbd53e72ae25edf247e49ea1e291af277fecc4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 5 Sep 2011 15:55:53 +0000 Subject: Fix #28389: UILayout.menu function didn't emboss menu button correct in the 3d view tools region. --- source/blender/editors/interface/interface_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index ef88bb0bbb6..a2e65f5e4ec 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1404,7 +1404,7 @@ static void ui_item_menu(uiLayout *layout, const char *name, int icon, uiMenuCre if(layout->root->type == UI_LAYOUT_HEADER) uiBlockSetEmboss(block, UI_EMBOSS); - else if(layout->root->type == UI_LAYOUT_PANEL) { + else if(ELEM(layout->root->type, UI_LAYOUT_PANEL, UI_LAYOUT_TOOLBAR)) { but->type= MENU; but->flag |= UI_TEXT_LEFT; } -- cgit v1.2.3 From 4393df93202198b5eaaff438e18060c66b98928d Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 5 Sep 2011 16:16:00 +0000 Subject: VGroup Modifiers: added mapping options to proximity and edit. *Added Smooth/Sharp/Root/etc. mappings to WeightVGEdit modifier, in addition to custom curve one. *Added Smooth/Sharp/Root/etc. mappings to WeightVGProximity modifier, without the custom curve one! *Factorized the common mapping code into MOD_weightvg_util. --- .../startup/bl_ui/properties_data_modifier.py | 27 +------ source/blender/makesdna/DNA_modifier_types.h | 29 +++++-- source/blender/makesrna/intern/rna_modifier.c | 88 ++++++++-------------- .../blender/modifiers/intern/MOD_weightvg_util.c | 66 ++++++++++++++-- .../blender/modifiers/intern/MOD_weightvg_util.h | 17 +++-- source/blender/modifiers/intern/MOD_weightvgedit.c | 11 +-- .../modifiers/intern/MOD_weightvgproximity.c | 27 ++++--- 7 files changed, 149 insertions(+), 116 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index a7e87c6ab62..8e7f50cd6f2 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -779,32 +779,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.label(text="Default Weight:") col.prop(md, "default_weight", text="") -# layout.prop(md, "use_map") -# if md.use_map: -# split = layout.split() -# col = split.column() -# col.label("Input:") -# col.label("Output:") -# col = split.column() -# col.prop(md, "map_input_low", text="Min") -# col.prop(md, "map_output_low", text="Min") -# col = split.column() -# col.prop(md, "map_input_high", text="Max") -# col.prop(md, "map_output_high", text="Max") - - layout.prop(md, "use_map_curve") - if md.use_map_curve: + layout.prop(md, "mapping_mode") + if md.mapping_mode == 'CURVE': col = layout.column() col.template_curve_mapping(md, "map_curve") -# layout.prop(md, "use_reverse") - -# layout.prop(md, "use_clamp") -# if md.use_clamp: -# row = layout.row() -# row.prop(md, "clamp_weight_min") -# row.prop(md, "clamp_weight_max") - row = layout.row() row.prop(md, "use_add") row.prop(md, "use_remove") @@ -864,6 +843,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row.prop(md, "min_dist") row.prop(md, "max_dist") + layout.prop(md, "mapping_mode") + # Common mask options… layout.separator() self.weight_vg_mask(layout, ob, md) diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 1714ae2a018..c4eef981669 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -795,8 +795,8 @@ typedef struct WeightVGEditModifierData { char defgrp_name[32]; /* Name of vertex group to edit. */ - short edit_flags; /* using MOD_WVG_EDIT_* flags */ - short pad1; + short edit_flags; /* Using MOD_WVG_EDIT_* flags. */ + short mapping_mode; /* Using MOD_WVG_MAPPING_* defines. */ float default_weight; /* Weight for vertices not in vgroup. */ /* Mapping stuff. */ @@ -817,6 +817,7 @@ typedef struct WeightVGEditModifierData { /* How to map the texture (using MOD_DISP_MAP_* constants). */ int mask_tex_mapping; char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */ + /* Padding… */ int pad_i1; } WeightVGEditModifierData; @@ -825,7 +826,7 @@ typedef struct WeightVGEditModifierData { /* Use parametric mapping. */ //#define MOD_WVG_EDIT_MAP (1 << 0) /* Use curve mapping. */ -#define MOD_WVG_EDIT_CMAP (1 << 1) +//#define MOD_WVG_EDIT_CMAP (1 << 1) /* Reverse weights (in the [0.0, 1.0] standard range). */ //#define MOD_WVG_EDIT_REVERSE_WEIGHTS (1 << 2) /* Add vertices with higher weight than threshold to vgroup. */ @@ -848,7 +849,7 @@ typedef struct WeightVGMixModifierData { char mix_mode; /* How second vgroups weights affect first ones */ char mix_set; /* What vertices to affect. */ - char pad[6]; + char pad_c1[6]; /* Masking options. */ float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */ @@ -861,8 +862,9 @@ typedef struct WeightVGMixModifierData { struct Object *mask_tex_map_obj; /* Name of the map object. */ int mask_tex_mapping; /* How to map the texture! */ char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */ + /* Padding… */ - int pad2; + int pad_i1; } WeightVGMixModifierData; /* How second vgroup's weights affect first ones. */ @@ -910,8 +912,11 @@ typedef struct WeightVGProximityModifierData { float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */ + /* Put here to avoid breaking existing struct... */ + short mapping_mode; /* Using MOD_WVG_MAPPING_* defines. */ + /* Padding... */ - int pad; + short pad_s1; } WeightVGProximityModifierData; /* Modes of proximity weighting. */ @@ -929,6 +934,18 @@ typedef struct WeightVGProximityModifierData { #define MOD_WVG_PROXIMITY_GEOM_FACES (1 << 2) /* Defines common to all WeightVG modifiers. */ +/* Mapping modes. */ +#define MOD_WVG_MAPPING_NONE 0 +#define MOD_WVG_MAPPING_CURVE 1 +#define MOD_WVG_MAPPING_SHARP 2 /* PROP_SHARP */ +#define MOD_WVG_MAPPING_SMOOTH 3 /* PROP_SMOOTH */ +#define MOD_WVG_MAPPING_ROOT 4 /* PROP_ROOT */ +/* PROP_LIN not used (same as NONE, here...). */ +/* PROP_CONST not used. */ +#define MOD_WVG_MAPPING_SPHERE 7 /* PROP_SPHERE */ +#define MOD_WVG_MAPPING_RANDOM 8 /* PROP_RANDOM */ +#define MOD_WVG_MAPPING_STEP 9 /* Median Step. */ + /* Tex channel to be used as mask. */ #define MOD_WVG_MASK_TEX_USE_INT 1 #define MOD_WVG_MASK_TEX_USE_RED 2 diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 415900af6fc..8700a6938ef 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2552,6 +2552,17 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *brna, StructRNA *srna) static void rna_def_modifier_weightvgedit(BlenderRNA *brna) { + static EnumPropertyItem weightvg_edit_mapping_mode_items[] = { + {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", ""}, + {MOD_WVG_MAPPING_CURVE, "CURVE", ICON_RNDCURVE, "Custom Curve", ""}, + {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""}, + {MOD_WVG_MAPPING_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""}, + {MOD_WVG_MAPPING_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""}, + {MOD_WVG_MAPPING_SPHERE, "ICON_SPHERECURVE", ICON_SPHERECURVE, "Sphere", ""}, + {MOD_WVG_MAPPING_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", ""}, + {MOD_WVG_MAPPING_STEP, "STEP", ICON_NOCURVE, "Median Step", ""}, /* Would need a better icon... */ + {0, NULL, 0, NULL, NULL}}; + StructRNA *srna; PropertyRNA *prop; @@ -2567,21 +2578,11 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); -/* prop= RNA_def_property(srna, "use_map", PROP_BOOLEAN, PROP_NONE);*/ -/* RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_MAP);*/ -/* RNA_def_property_ui_text(prop, "Map", "Map vertex group weights.");*/ -/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - - prop= RNA_def_property(srna, "use_map_curve", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_CMAP); - RNA_def_property_ui_text(prop, "Curve Map", "Map vertex group weights with a curve."); + prop= RNA_def_property(srna, "mapping_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, weightvg_edit_mapping_mode_items); + RNA_def_property_ui_text(prop, "Mapping Mode", "How weights are mapped to there new values."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); -/* prop= RNA_def_property(srna, "use_reverse", PROP_BOOLEAN, PROP_NONE);*/ -/* RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REVERSE_WEIGHTS);*/ -/* RNA_def_property_ui_text(prop, "Reverse", "Reverse vertex group weights.");*/ -/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - prop= RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_ADD2VG); RNA_def_property_ui_text(prop, "Group Add", "Add vertices with weight over threshold " @@ -2594,11 +2595,6 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) "from vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); -/* prop= RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE);*/ -/* RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_CLAMP);*/ -/* RNA_def_property_ui_text(prop, "Clamp", "Clamp vertex group weights.");*/ -/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - prop= RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 1.0f); RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0); @@ -2606,34 +2602,6 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) "it is not in the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); -/* prop= RNA_def_property(srna, "map_input_low", PROP_FLOAT, PROP_NONE);*/ -/* RNA_def_property_float_sdna(prop, NULL, "map_org_min");*/ -/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ -/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ -/* RNA_def_property_ui_text(prop, "Input Low Weight", "Low input mapping value.");*/ -/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - -/* prop= RNA_def_property(srna, "map_input_high", PROP_FLOAT, PROP_NONE);*/ -/* RNA_def_property_float_sdna(prop, NULL, "map_org_max");*/ -/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ -/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ -/* RNA_def_property_ui_text(prop, "Input High Weight", "High input mapping value.");*/ -/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - -/* prop= RNA_def_property(srna, "map_output_low", PROP_FLOAT, PROP_NONE);*/ -/* RNA_def_property_float_sdna(prop, NULL, "map_new_min");*/ -/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ -/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ -/* RNA_def_property_ui_text(prop, "Output Low Weight", "Low output mapping value.");*/ -/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - -/* prop= RNA_def_property(srna, "map_output_high", PROP_FLOAT, PROP_NONE);*/ -/* RNA_def_property_float_sdna(prop, NULL, "map_new_max");*/ -/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ -/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ -/* RNA_def_property_ui_text(prop, "Output High Weight", "High output mapping value.");*/ -/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - prop= RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve"); RNA_def_property_ui_text(prop, "Mapping Curve", "Custom mapping curve."); @@ -2655,18 +2623,6 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) "to be removed from the vgroup."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); -/* prop= RNA_def_property(srna, "clamp_weight_min", PROP_FLOAT, PROP_NONE);*/ -/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ -/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ -/* RNA_def_property_ui_text(prop, "Min Weight", "Lowest weight a vertex can get.");*/ -/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - -/* prop= RNA_def_property(srna, "clamp_weight_max", PROP_FLOAT, PROP_NONE);*/ -/* RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/ -/* RNA_def_property_ui_range(prop, -100000.0, 100000.0, 10, 0);*/ -/* RNA_def_property_ui_text(prop, "Max Weight", "Highest weight a vertex can get.");*/ -/* RNA_def_property_update(prop, 0, "rna_Modifier_update");*/ - /* Common masking properties. */ rna_def_modifier_weightvg_mask(brna, srna); } @@ -2756,6 +2712,17 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) {MOD_WVG_PROXIMITY_GEOM_FACES, "FACE", ICON_FACESEL, "Face", ""}, {0, NULL, 0, NULL, NULL}}; + static EnumPropertyItem weightvg_proximity_mapping_mode_items[] = { + {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", ""}, + /* No curve mapping here! */ + {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""}, + {MOD_WVG_MAPPING_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""}, + {MOD_WVG_MAPPING_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""}, + {MOD_WVG_MAPPING_SPHERE, "ICON_SPHERECURVE", ICON_SPHERECURVE, "Sphere", ""}, + {MOD_WVG_MAPPING_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", ""}, + {MOD_WVG_MAPPING_STEP, "STEP", ICON_NOCURVE, "Median Step", ""}, /* Would need a better icon... */ + {0, NULL, 0, NULL, NULL}}; + StructRNA *srna; PropertyRNA *prop; @@ -2802,6 +2769,11 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Highest Dist", "Distance mapping to weight 1.0."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop= RNA_def_property(srna, "mapping_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, weightvg_proximity_mapping_mode_items); + RNA_def_property_ui_text(prop, "Mapping Mode", "How weights are mapped to there new values."); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + /* Common masking properties. */ rna_def_modifier_weightvg_mask(brna, srna); } diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 93e1899ad60..675f0d76a48 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -33,16 +33,19 @@ * Or the WeightPaint mode code itself? */ -#include "BLI_utildefines.h" #include "BLI_math.h" +#include "BLI_rand.h" #include "BLI_string.h" +#include "BLI_utildefines.h" +#include "DNA_color_types.h" /* CurveMapping. */ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_modifier_types.h" #include "DNA_object_types.h" #include "BKE_cdderivedmesh.h" +#include "BKE_colortools.h" /* CurveMapping. */ #include "BKE_deform.h" #include "BKE_mesh.h" #include "BKE_modifier.h" @@ -54,16 +57,69 @@ #include "MOD_weightvg_util.h" #include "RE_shader_ext.h" /* Texture masking. */ +/* Maps new_w weights in place, using either one of the predifined functions, or a custom curve. + * Return values are in new_w. + * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real + * vertex index (in case the weight tables do not cover the whole vertices...). + * cmap might be NULL, in which case curve mapping mode will return unmodified data. + */ +void weightvg_do_map(int num, float *new_w, short mode, CurveMapping *cmap) +{ + int i; + + /* Return immediately, if we have nothing to do! */ + /* Also security checks... */ + if(((mode == MOD_WVG_MAPPING_CURVE) && (cmap == NULL)) + || !ELEM7(mode, MOD_WVG_MAPPING_CURVE, MOD_WVG_MAPPING_SHARP, MOD_WVG_MAPPING_SMOOTH, + MOD_WVG_MAPPING_ROOT, MOD_WVG_MAPPING_SPHERE, MOD_WVG_MAPPING_RANDOM, + MOD_WVG_MAPPING_STEP)) + return; + + /* Map each weight (vertex) to its new value, accordingly to the chosen mode. */ + for(i = 0; i < num; ++i) { + float fac = new_w[i]; + + /* Code borrowed from the warp modifier. */ + /* Closely matches PROP_SMOOTH and similar. */ + switch(mode) { + case MOD_WVG_MAPPING_CURVE: + fac = curvemapping_evaluateF(cmap, 0, fac); + break; + case MOD_WVG_MAPPING_SHARP: + fac = fac*fac; + break; + case MOD_WVG_MAPPING_SMOOTH: + fac = 3.0f*fac*fac - 2.0f*fac*fac*fac; + break; + case MOD_WVG_MAPPING_ROOT: + fac = (float)sqrt(fac); + break; + case MOD_WVG_MAPPING_SPHERE: + fac = (float)sqrt(2*fac - fac * fac); + break; + case MOD_WVG_MAPPING_RANDOM: + BLI_srand(BLI_rand()); /* random seed */ + fac = BLI_frand()*fac; + break; + case MOD_WVG_MAPPING_STEP: + fac = (fac >= 0.5f)?1.0f:0.0f; + break; + } + + new_w[i] = fac; + } +} + /* Applies new_w weights to org_w ones, using either a texture, vgroup or constant value as factor. * Return values are in org_w. * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real * vertex index (in case the weight tables do not cover the whole vertices...). * XXX The standard “factor” value is assumed in [0.0, 1.0] range. Else, weird results might appear. */ -void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object *ob, - DerivedMesh *dm, float fact, const char defgrp_name[32], Tex *texture, - int tex_use_channel, int tex_mapping, Object *tex_map_object, - const char *tex_uvlayer_name) +void weightvg_do_mask(int num, const int *indices, float *org_w, const float *new_w, + Object *ob, DerivedMesh *dm, float fact, const char defgrp_name[32], + Tex *texture, int tex_use_channel, int tex_mapping, + Object *tex_map_object, const char *tex_uvlayer_name) { int ref_didx; int i; diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h index b42e9c20035..3afff391943 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.h +++ b/source/blender/modifiers/intern/MOD_weightvg_util.h @@ -37,11 +37,10 @@ /* so modifier types match their defines */ #include "MOD_modifiertypes.h" -struct Tex; +struct CurveMapping; struct DerivedMesh; struct Object; -/*struct ModifierData; -struct MappingInfoModifierData;*/ +struct Tex; /* * XXX I'd like to make modified weights visible in WeightPaint mode, @@ -61,14 +60,22 @@ struct MappingInfoModifierData;*/ */ #define MOD_WVG_ZEROFLOOR 1.0e-32f +/* Maps new_w weights in place, using either one of the predifined functions, or a custom curve. + * Return values are in new_w. + * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real + * vertex index (in case the weight tables do not cover the whole vertices...). + * cmap might be NULL, in which case curve mapping mode will return unmodified data. + */ +void weightvg_do_map(int num, float *new_w, short mode, struct CurveMapping *cmap); + /* Applies new_w weights to org_w ones, using either a texture, vgroup or constant value as factor. * Return values are in org_w. * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real * vertex index (in case the weight tables do not cover the whole vertices...). * XXX The standard “factor” value is assumed in [0.0, 1.0] range. Else, weird results might appear. */ -void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object *ob, - struct DerivedMesh *dm, float fact, const char defgrp_name[32], Tex *texture, +void weightvg_do_mask(int num, const int *indices, float *org_w, const float *new_w, Object *ob, + DerivedMesh *dm, float fact, const char defgrp_name[32], Tex *texture, int tex_use_channel, int tex_mapping, Object *tex_map_object, const char *tex_uvlayer_name); diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index 87747f255fd..763a063567b 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -62,6 +62,7 @@ static void initData(ModifierData *md) { WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; wmd->edit_flags = 0; + wmd->mapping_mode = MOD_WVG_MAPPING_NONE; wmd->default_weight = 0.0f; wmd->cmap_curve = curvemapping_add(1, 0.0, 0.0, 1.0, 1.0); @@ -89,6 +90,7 @@ static void copyData(ModifierData *md, ModifierData *target) BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name)); twmd->edit_flags = wmd->edit_flags; + twmd->mapping_mode = wmd->mapping_mode; twmd->default_weight = wmd->default_weight; twmd->cmap_curve = curvemapping_copy(wmd->cmap_curve); @@ -192,7 +194,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der int i; char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */ /* Flags. */ - int do_map = (wmd->edit_flags & MOD_WVG_EDIT_CMAP) != 0; int do_add = (wmd->edit_flags & MOD_WVG_EDIT_ADD2VG) != 0; int do_rem = (wmd->edit_flags & MOD_WVG_EDIT_REMFVG) != 0; @@ -264,11 +265,11 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der if(dw) { org_w[i] = new_w[i] = dw->weight; } + } - /* Do mapping. */ - if (do_map) { - new_w[i] = curvemapping_evaluateF(wmd->cmap_curve, 0, new_w[i]); - } + /* Do mapping. */ + if (wmd->mapping_mode != MOD_WVG_MAPPING_NONE) { + weightvg_do_map(numVerts, new_w, wmd->mapping_mode, wmd->cmap_curve); } /* Do masking. */ diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 513ba9c815f..35f993e24b6 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -33,10 +33,10 @@ * Or the WeightPaint mode code itself? */ -#include "BLI_utildefines.h" +#include "BLI_editVert.h" #include "BLI_math.h" #include "BLI_string.h" -#include "BLI_editVert.h" +#include "BLI_utildefines.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -193,9 +193,9 @@ static float get_ob2ob_distance(const Object* ob, const Object* obr) } /** - * Maps distances to weights. + * Maps distances to weights, with an optionnal “smoothing” mapping. */ -void do_map(float *weights, const int nidx, const float min_d, const float max_d) +void do_map(float *weights, const int nidx, const float min_d, const float max_d, short mode) { const float range_inv= 1.0f / (max_d - min_d); /* invert since multiplication is faster */ unsigned int i= nidx; @@ -204,17 +204,12 @@ void do_map(float *weights, const int nidx, const float min_d, const float max_d else if(weights[i] <= min_d) weights[i]= 0.0f; else weights[i]= (weights[i] - min_d) * range_inv; } -} -/*a min_d + b = 0.0*/ -/*a max_d + b = 1.0*/ -/*a min_d = -b*/ -/*a = -b / min_d*/ + if(!ELEM(mode, MOD_WVG_MAPPING_NONE, MOD_WVG_MAPPING_CURVE)) { + weightvg_do_map(nidx, weights, mode, NULL); + } +} -/*max_d(-b/min_d) + b = 1.0*/ -/*b((-max_d/min_d)+1.0) = 1.0*/ -/*b = 1.0 / ((min_d-max_d)/min_d)*/ -/*b = min_d/(min_d-max_d)*/ /************************************** * Modifiers functions. * **************************************/ @@ -225,6 +220,8 @@ static void initData(ModifierData *md) wmd->proximity_mode = MOD_WVG_PROXIMITY_OBJECT; wmd->proximity_flags = MOD_WVG_PROXIMITY_GEOM_VERTS; + wmd->mapping_mode = MOD_WVG_MAPPING_NONE; + wmd->mask_constant = 1.0f; wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL; @@ -241,6 +238,8 @@ static void copyData(ModifierData *md, ModifierData *target) twmd->proximity_flags = wmd->proximity_flags; twmd->proximity_ob_target = wmd->proximity_ob_target; + twmd->mapping_mode = wmd->mapping_mode; + twmd->mask_constant = wmd->mask_constant; BLI_strncpy(twmd->mask_defgrp_name, wmd->mask_defgrp_name, sizeof(twmd->mask_defgrp_name)); twmd->mask_texture = wmd->mask_texture; @@ -499,7 +498,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name); /* Map distances to weights. */ - do_map(org_w, numIdx, wmd->min_dist, wmd->max_dist); + do_map(org_w, numIdx, wmd->min_dist, wmd->max_dist, wmd->mapping_mode); /* Update vgroup. Note we never add nor remove vertices from vgroup here. */ weightvg_update_vg(dvert, defgrp_idx, numIdx, indices, org_w, 0, 0.0f, 0, 0.0f); -- cgit v1.2.3 From 419042af55ddb789f29771886e0bb090ad757cad Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 5 Sep 2011 16:25:42 +0000 Subject: Fix #28394: clouds texture error with high noise depth and blender original noise, patch from Campbell, --- source/blender/blenlib/intern/noise.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index 9bc666dc971..9efe8dc9739 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -263,13 +263,21 @@ static float newPerlinU(float x, float y, float z) static float orgBlenderNoise(float x, float y, float z) { register float cn1, cn2, cn3, cn4, cn5, cn6, i, *h; - float ox, oy, oz, jx, jy, jz; + float fx, fy, fz, ox, oy, oz, jx, jy, jz; float n= 0.5; int ix, iy, iz, b00, b01, b10, b11, b20, b21; - ox= (x- (ix= (int)floor(x)) ); - oy= (y- (iy= (int)floor(y)) ); - oz= (z- (iz= (int)floor(z)) ); + fx= floor(x); + fy= floor(y); + fz= floor(z); + + ox= x- fx; + oy= y- fy; + oz= z- fz; + + ix= (int)fx; + iy= (int)fy; + iz= (int)fz; jx= ox-1; jy= oy-1; -- cgit v1.2.3 From 76ddf6d2ee97bf51290492d4c692dd8ca031182c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 5 Sep 2011 17:57:04 +0000 Subject: Fix #28404: certain keyboard shortcuts not shown in menus, e.g. move operators in graph editor > channel menu. Problem was these did not inherit operator execution context correctly. Fix found by Sergey, also needed to fix logic operators which were not working when invoked instead of executed. --- source/blender/editors/interface/interface_layout.c | 2 +- source/blender/editors/space_logic/logic_ops.c | 6 +++--- source/blender/windowmanager/intern/wm_event_system.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index a2e65f5e4ec..803da55cea6 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1526,7 +1526,7 @@ static void menu_item_enum_opname_menu(bContext *UNUSED(C), uiLayout *layout, vo { MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN); - uiLayoutSetOperatorContext(layout, WM_OP_EXEC_REGION_WIN); + uiLayoutSetOperatorContext(layout, lvl->opcontext); uiItemsEnumO(layout, lvl->opname, lvl->propname); } diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index 638bfe57608..60e9595b77a 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -322,7 +322,7 @@ static void LOGIC_OT_sensor_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add"); + ot->prop= prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add"); RNA_def_enum_funcs(prop, rna_Sensor_type_itemf); RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Sensor to add"); RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Sensor to"); @@ -437,7 +437,7 @@ static void LOGIC_OT_controller_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add"); + ot->prop= RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add"); RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Controller to add"); RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Controller to"); } @@ -539,7 +539,7 @@ static void LOGIC_OT_actuator_add(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add"); + ot->prop= prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add"); RNA_def_enum_funcs(prop, rna_Actuator_type_itemf); RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Actuator to add"); RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Actuator to"); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 5711ec899bf..8861f128c4b 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -886,8 +886,8 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA CTX_wm_region_set(C, NULL); CTX_wm_area_set(C, NULL); retval= wm_operator_invoke(C, ot, event, properties, reports, poll_only); - CTX_wm_region_set(C, ar); CTX_wm_area_set(C, area); + CTX_wm_region_set(C, ar); return retval; } -- cgit v1.2.3 From a6d9a5a972595c898e596deb95eb683430621188 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 5 Sep 2011 19:27:21 +0000 Subject: Code cleanup: warning fixes. --- source/blender/blenlib/BLI_math_inline.h | 2 +- source/blender/collada/AnimationExporter.cpp | 8 +- source/blender/collada/AnimationImporter.cpp | 11 +-- source/blender/collada/AnimationImporter.h | 4 +- source/blender/collada/ArmatureImporter.cpp | 5 -- source/blender/collada/DocumentImporter.cpp | 4 +- source/blender/collada/TransformReader.cpp | 1 - source/blender/editors/space_logic/logic_window.c | 34 -------- source/blender/imbuf/intern/cineon/cineonlib.c | 5 +- source/blender/imbuf/intern/cineon/logImageCore.h | 4 + source/blender/makesrna/intern/rna_actuator.c | 95 ----------------------- source/blender/makesrna/intern/rna_particle.c | 16 ++-- source/blender/makesrna/intern/rna_texture.c | 2 +- source/gameengine/VideoTexture/CMakeLists.txt | 1 - 14 files changed, 29 insertions(+), 163 deletions(-) diff --git a/source/blender/blenlib/BLI_math_inline.h b/source/blender/blenlib/BLI_math_inline.h index 0f8493e25a6..122b2679d5b 100644 --- a/source/blender/blenlib/BLI_math_inline.h +++ b/source/blender/blenlib/BLI_math_inline.h @@ -45,7 +45,7 @@ extern "C" { #define MALWAYS_INLINE MINLINE #else #define MINLINE static inline -#define MALWAYS_INLINE static __attribute__((always_inline)) +#define MALWAYS_INLINE static inline __attribute__((always_inline)) #endif #else #define MINLINE diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 4c20d1cf6c1..498ccb5709d 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -643,6 +643,8 @@ std::string AnimationExporter::create_source_from_fcurve(COLLADASW::InputSemanti case COLLADASW::InputSemantic::OUT_TANGENT: source.setAccessorStride(2); break; + default: + break; } @@ -913,7 +915,7 @@ std::string AnimationExporter::get_light_param_sid(char *rna_path, int tm_type, } if (tm_name.size()) { - if (axis_name != "") + if (axis_name[0]) return tm_name + "." + std::string(axis_name); else return tm_name; @@ -962,7 +964,7 @@ std::string AnimationExporter::get_camera_param_sid(char *rna_path, int tm_type, } if (tm_name.size()) { - if (axis_name != "") + if (axis_name[0]) return tm_name + "." + std::string(axis_name); else return tm_name; @@ -1041,7 +1043,7 @@ std::string AnimationExporter::get_transform_sid(char *rna_path, int tm_type, co if (is_rotation) return tm_name + std::string(axis_name) + ".ANGLE"; else - if (axis_name != "") + if (axis_name[0]) return tm_name + "." + std::string(axis_name); else return tm_name; diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 29c356ed8f0..43428f57d4f 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -90,12 +90,6 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) COLLADAFW::FloatOrDoubleArray& input = curve->getInputValues(); COLLADAFW::FloatOrDoubleArray& output = curve->getOutputValues(); - if( curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_BEZIER || - curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_STEP ) { - COLLADAFW::FloatOrDoubleArray& intan = curve->getInTangentValues(); - COLLADAFW::FloatOrDoubleArray& outtan = curve->getOutTangentValues(); - } - float fps = (float)FPS; size_t dim = curve->getOutDimension(); unsigned int i; @@ -572,7 +566,7 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation * } //creates the rna_paths and array indices of fcurves from animations using color and bound animation class of each animation. -void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,char * anim_type) +void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,const char * anim_type) { char rna_path[100]; BLI_strncpy(rna_path,anim_type, sizeof(rna_path)); @@ -615,7 +609,7 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list } -void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type) +void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type) { char rna_path[100]; if (animlist_map.find(listid) == animlist_map.end()) return ; @@ -803,7 +797,6 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node , } bAction * act; - bActionGroup *grp = NULL; if ( (animType->transform) != 0 ) { diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h index ed9a2171c87..9e8f7b42069 100644 --- a/source/blender/collada/AnimationImporter.h +++ b/source/blender/collada/AnimationImporter.h @@ -159,8 +159,8 @@ public: const COLLADAFW::AnimationList::AnimationBinding * binding, std::vector* curves, bool is_joint, char * joint_path); - void Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,char * anim_type); - void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type); + void Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type); + void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type); int setAnimType ( const COLLADAFW::Animatable * prop , int type, int addition); diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 27aee133557..19fa54c5044 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -95,8 +95,6 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p EditBone *bone = ED_armature_edit_bone_add((bArmature*)ob_arm->data, (char*)bc_get_joint_name(node)); totbone++; - bPoseChannel *pchan = get_pose_channel(ob_arm->pose, (char*)bc_get_joint_name(node)); - if (parent) bone->parent = parent; float angle = 0; @@ -280,8 +278,6 @@ void ArmatureImporter::add_leaf_bone(float mat[][4], EditBone *bone, COLLADAFW: copy_m4_m4(leaf.mat, mat); BLI_strncpy(leaf.name, bone->name, sizeof(leaf.name)); - float vec[3]; - TagsMap::iterator etit; ExtraTags *et = 0; etit = uid_tags_map.find(node->getUniqueId().toAscii()); @@ -579,7 +575,6 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node float mat[4][4]; float obmat[4][4]; - bArmature * arm = (bArmature * ) ob_arm-> data ; float ax[3]; float angle = NULL; diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 1a91e185bac..586c6ccfe82 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -240,15 +240,15 @@ void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node, COLLADAFW root_map[node->getUniqueId()] = root_map[par->getUniqueId()]; } - COLLADAFW::Transformation::TransformationType types[] = { + /*COLLADAFW::Transformation::TransformationType types[] = { COLLADAFW::Transformation::ROTATE, COLLADAFW::Transformation::SCALE, COLLADAFW::Transformation::TRANSLATE, COLLADAFW::Transformation::MATRIX }; + Object *ob;*/ unsigned int i; - Object *ob; //for (i = 0; i < 4; i++) //ob = diff --git a/source/blender/collada/TransformReader.cpp b/source/blender/collada/TransformReader.cpp index 0fd0c85aa09..625a0220830 100644 --- a/source/blender/collada/TransformReader.cpp +++ b/source/blender/collada/TransformReader.cpp @@ -37,7 +37,6 @@ void TransformReader::get_node_mat(float mat[][4], COLLADAFW::Node *node, std::m { float cur[4][4]; float copy[4][4]; - float eul[3]; unit_m4(mat); diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 920e93cc0fc..20b001965aa 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -3989,40 +3989,6 @@ static void draw_actuator_game(uiLayout *layout, PointerRNA *ptr) uiItemR(layout, ptr, "filename", 0, NULL, ICON_NONE); } -/* The IPO/Fcurve actuator has been deprecated, so this is no longer used */ -static void draw_actuator_ipo(uiLayout *layout, PointerRNA *ptr) -{ - Object *ob; - PointerRNA settings_ptr; - uiLayout *row, *subrow, *col; - - ob = (Object *)ptr->id.data; - RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr); - - row= uiLayoutRow(layout, 0); - uiItemR(row, ptr, "play_type", 0, "", ICON_NONE); - subrow= uiLayoutRow(row, 1); - uiItemR(subrow, ptr, "use_force", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - uiItemR(subrow, ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - - col = uiLayoutColumn(subrow, 0); - uiLayoutSetActive(col, (RNA_boolean_get(ptr, "use_additive") || RNA_boolean_get(ptr, "use_force"))); - uiItemR(col, ptr, "use_local", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - - row= uiLayoutRow(layout, 0); - if((RNA_enum_get(ptr, "play_type") == ACT_IPO_FROM_PROP)) - uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE); - - else { - uiItemR(row, ptr, "frame_start", 0, NULL, ICON_NONE); - uiItemR(row, ptr, "frame_end", 0, NULL, ICON_NONE); - } - uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NONE); - - row= uiLayoutRow(layout, 0); - uiItemPointerR(row, ptr, "frame_property", &settings_ptr, "properties", NULL, ICON_NONE); -} - static void draw_actuator_message(uiLayout *layout, PointerRNA *ptr, bContext *C) { Object *ob; diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c index 922cfcf9629..b4da39ac41e 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.c +++ b/source/blender/imbuf/intern/cineon/cineonlib.c @@ -36,6 +36,9 @@ #include /* htonl() */ #endif #include /* memset */ + +#include "BLI_utildefines.h" + #include "cin_debug_stuff.h" #include "logmemfile.h" @@ -288,7 +291,7 @@ initCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header, const c } static void -dumpCineonGenericHeader(CineonGenericHeader* header) { +UNUSED_FUNCTION(dumpCineonGenericHeader)(CineonGenericHeader* header) { dumpCineonFileInfo(&header->fileInfo); dumpCineonImageInfo(&header->imageInfo); dumpCineonFormatInfo(&header->formatInfo); diff --git a/source/blender/imbuf/intern/cineon/logImageCore.h b/source/blender/imbuf/intern/cineon/logImageCore.h index f05c19c4f47..cbc7cb9d64a 100644 --- a/source/blender/imbuf/intern/cineon/logImageCore.h +++ b/source/blender/imbuf/intern/cineon/logImageCore.h @@ -38,8 +38,12 @@ extern "C" { #endif #include "BLO_sys_types.h" // for intptr_t support + +#ifdef _MSC_VER #undef ntohl #undef htonl +#endif + typedef int (GetRowFn)(LogImageFile* logImage, unsigned short* row, int lineNum); typedef int (SetRowFn)(LogImageFile* logImage, const unsigned short* row, int lineNum); typedef void (CloseFn)(LogImageFile* logImage); diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 5eccba16c3d..3d0e177c94e 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -323,30 +323,6 @@ static void rna_Actuator_constraint_detect_material_set(struct PointerRNA *ptr, } } -static void rna_FcurveActuator_add_set(struct PointerRNA *ptr, int value) -{ - bActuator *act = (bActuator *)ptr->data; - bIpoActuator *ia = act->data; - - if(value == 1){ - ia->flag &= ~ACT_IPOFORCE; - ia->flag |= ACT_IPOADD; - }else - ia->flag &= ~ACT_IPOADD; -} - -static void rna_FcurveActuator_force_set(struct PointerRNA *ptr, int value) -{ - bActuator *act = (bActuator *)ptr->data; - bIpoActuator *ia = act->data; - - if(value == 1){ - ia->flag &= ~ACT_IPOADD; - ia->flag |= ACT_IPOFORCE; - }else - ia->flag &= ~ACT_IPOFORCE; -} - static void rna_ActionActuator_add_set(struct PointerRNA *ptr, int value) { bActuator *act = (bActuator *)ptr->data; @@ -858,77 +834,6 @@ static void rna_def_object_actuator(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); } -/* The fcurve actuator has been replace with the action actuator, so this is no longer used */ -static void rna_def_fcurve_actuator(BlenderRNA *brna) -{ - StructRNA *srna; - PropertyRNA *prop; - - static EnumPropertyItem prop_type_items[] ={ - {ACT_IPO_PLAY, "PLAY", 0, "Play", ""}, - {ACT_IPO_PINGPONG, "PINGPONG", 0, "Ping Pong", ""}, - {ACT_IPO_FLIPPER, "FLIPPER", 0, "Flipper", ""}, - {ACT_IPO_LOOP_STOP, "STOP", 0, "Loop Stop", ""}, - {ACT_IPO_LOOP_END, "END", 0, "Loop End", ""}, -// {ACT_IPO_KEY2KEY, "IPOCHILD", 0, "Key to Key", ""}, - {ACT_IPO_FROM_PROP, "PROP", 0, "Property", ""}, - {0, NULL, 0, NULL, NULL}}; - - srna= RNA_def_struct(brna, "FCurveActuator", "Actuator"); - RNA_def_struct_ui_text(srna, "F-Curve Actuator", "Actuator to animate the object"); - RNA_def_struct_sdna_from(srna, "bIpoActuator", "data"); - - prop= RNA_def_property(srna, "play_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, prop_type_items); - RNA_def_property_ui_text(prop, "F-Curve Type", "Specify the way you want to play the animation"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "sta"); - RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2); - RNA_def_property_ui_text(prop, "Start Frame", ""); - RNA_def_property_update(prop, NC_SCENE, NULL); - - prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "end"); - RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2); - RNA_def_property_ui_text(prop, "End Frame", ""); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE); - RNA_def_property_string_sdna(prop, NULL, "name"); - RNA_def_property_ui_text(prop, "Property", "Use this property to define the F-Curve position"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE); - RNA_def_property_string_sdna(prop, NULL, "frameProp"); - RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property"); - - /* booleans */ - prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOADD); - RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_add_set"); - RNA_def_property_ui_text(prop, "Add", "F-Curve is added to the current loc/rot/scale in global or local coordinate according to Local flag"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "use_force", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOFORCE); - RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_force_set"); - RNA_def_property_ui_text(prop, "Force", "Apply F-Curve as a global or local force depending on the local option (dynamic objects only)"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOLOCAL); - RNA_def_property_ui_text(prop, "L", "Let the F-Curve act in local coordinates, used in Force and Add mode"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOCHILD); - RNA_def_property_ui_text(prop, "Child", "Update F-Curve on all children Objects as well"); - RNA_def_property_update(prop, NC_LOGIC, NULL); -} - static void rna_def_camera_actuator(BlenderRNA *brna) { StructRNA *srna; diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index ba91fc3536b..77fa975761f 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -51,34 +51,34 @@ #include "WM_types.h" #include "WM_api.h" -static EnumPropertyItem part_from_items[] = { +EnumPropertyItem part_from_items[] = { {PART_FROM_VERT, "VERT", 0, "Verts", ""}, {PART_FROM_FACE, "FACE", 0, "Faces", ""}, {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_reactor_from_items[] = { +EnumPropertyItem part_reactor_from_items[] = { {PART_FROM_VERT, "VERT", 0, "Verts", ""}, {PART_FROM_FACE, "FACE", 0, "Faces", ""}, {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_dist_items[] = { +EnumPropertyItem part_dist_items[] = { {PART_DISTR_JIT, "JIT", 0, "Jittered", ""}, {PART_DISTR_RAND, "RAND", 0, "Random", ""}, {PART_DISTR_GRID, "GRID", 0, "Grid", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_hair_dist_items[] = { +EnumPropertyItem part_hair_dist_items[] = { {PART_DISTR_JIT, "JIT", 0, "Jittered", ""}, {PART_DISTR_RAND, "RAND", 0, "Random", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_draw_as_items[] = { +EnumPropertyItem part_draw_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_REND, "RENDER", 0, "Rendered", ""}, {PART_DRAW_DOT, "DOT", 0, "Point", ""}, @@ -88,14 +88,14 @@ static EnumPropertyItem part_draw_as_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_hair_draw_as_items[] = { +EnumPropertyItem part_hair_draw_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_REND, "RENDER", 0, "Rendered", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_ren_as_items[] = { +EnumPropertyItem part_ren_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_HALO, "HALO", 0, "Halo", ""}, {PART_DRAW_LINE, "LINE", 0, "Line", ""}, @@ -106,7 +106,7 @@ static EnumPropertyItem part_ren_as_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_hair_ren_as_items[] = { +EnumPropertyItem part_hair_ren_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, {PART_DRAW_OB, "OBJECT", 0, "Object", ""}, diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index a1ce77b061d..503212201c4 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -48,7 +48,7 @@ #include "BKE_node.h" -static EnumPropertyItem texture_filter_items[] = { +EnumPropertyItem texture_filter_items[] = { {TXF_BOX, "BOX", 0, "Box", ""}, {TXF_EWA, "EWA", 0, "EWA", ""}, {TXF_FELINE, "FELINE", 0, "FELINE", ""}, diff --git a/source/gameengine/VideoTexture/CMakeLists.txt b/source/gameengine/VideoTexture/CMakeLists.txt index 04683a5f99b..448fb307d2d 100644 --- a/source/gameengine/VideoTexture/CMakeLists.txt +++ b/source/gameengine/VideoTexture/CMakeLists.txt @@ -95,7 +95,6 @@ if(WITH_CODEC_FFMPEG) ${PTHREADS_INCLUDE_DIRS} ) add_definitions(-DWITH_FFMPEG) - add_definitions(-D__STDC_CONSTANT_MACROS) endif() blender_add_lib(ge_videotex "${SRC}" "${INC}" "${INC_SYS}") -- cgit v1.2.3 From 59a823c48aec80a48b39e27f8474302caf2dbf26 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 5 Sep 2011 19:34:27 +0000 Subject: Code cleanup: remove context from RNA update functions, only one left. --- source/blender/blenkernel/BKE_sound.h | 9 +- source/blender/blenkernel/intern/sequencer.c | 3 +- source/blender/blenkernel/intern/sound.c | 34 ++--- source/blender/editors/animation/anim_ops.c | 4 +- source/blender/editors/include/ED_sequencer.h | 4 - source/blender/editors/screen/screen_ops.c | 17 ++- source/blender/editors/sound/sound_ops.c | 2 +- source/blender/editors/space_graph/graph_ops.c | 4 +- .../editors/space_sequencer/sequencer_edit.c | 2 +- .../editors/space_sequencer/space_sequencer.c | 138 +++++++++++++-------- source/blender/makesrna/intern/rna_scene.c | 8 +- source/blender/makesrna/intern/rna_screen.c | 5 +- source/blender/makesrna/intern/rna_space.c | 16 +-- source/blender/makesrna/intern/rna_wm.c | 5 +- 14 files changed, 141 insertions(+), 110 deletions(-) diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index fac5bf1cfd2..3728dd41089 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -39,7 +39,6 @@ struct PackedFile; struct bSound; -struct bContext; struct ListBase; struct Main; struct Sequence; @@ -65,12 +64,12 @@ struct bSound* sound_new_file(struct Main *main, const char *filename); // XXX unused currently #if 0 -struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source); +struct bSound* sound_new_buffer(struct Main *bmain, struct bSound *source); -struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, float start, float end); +struct bSound* sound_new_limiter(struct Main *bmain, struct bSound *source, float start, float end); #endif -void sound_delete(struct bContext *C, struct bSound* sound); +void sound_delete(struct Main *bmain, struct bSound* sound); void sound_cache(struct bSound* sound); @@ -124,7 +123,7 @@ void sound_play_scene(struct Scene *scene); void sound_stop_scene(struct Scene *scene); -void sound_seek_scene(struct bContext *C); +void sound_seek_scene(struct Main *bmain, struct Scene *scene); float sound_sync_scene(struct Scene *scene); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 9ef30bdd49b..dbb2e7860c5 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3603,6 +3603,7 @@ Sequence *sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo #ifdef WITH_AUDASPACE Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); /* only for sound */ Editing *ed= seq_give_editing(scene, TRUE); bSound *sound; @@ -3624,7 +3625,7 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo info = AUD_getInfo(sound->playback_handle); if (info.specs.channels == AUD_CHANNELS_INVALID) { - sound_delete(C, sound); + sound_delete(bmain, sound); //if(op) // BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); return NULL; diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 74f4830b86c..ff518d69e21 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -203,7 +203,7 @@ void sound_exit(void) // XXX unused currently #if 0 -struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source) +struct bSound* sound_new_buffer(struct Main *bmain, struct bSound *source) { bSound* sound = NULL; @@ -211,23 +211,23 @@ struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source) strcpy(name, "buf_"); strcpy(name + 4, source->id.name); - sound = alloc_libblock(&CTX_data_main(C)->sound, ID_SO, name); + sound = alloc_libblock(&bmain->sound, ID_SO, name); sound->child_sound = source; sound->type = SOUND_TYPE_BUFFER; - sound_load(CTX_data_main(C), sound); + sound_load(bmain, sound); if(!sound->playback_handle) { - free_libblock(&CTX_data_main(C)->sound, sound); + free_libblock(&bmain->sound, sound); sound = NULL; } return sound; } -struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, float start, float end) +struct bSound* sound_new_limiter(struct Main *bmain, struct bSound *source, float start, float end) { bSound* sound = NULL; @@ -235,18 +235,18 @@ struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, floa strcpy(name, "lim_"); strcpy(name + 4, source->id.name); - sound = alloc_libblock(&CTX_data_main(C)->sound, ID_SO, name); + sound = alloc_libblock(&bmain->sound, ID_SO, name); sound->child_sound = source; sound->start = start; sound->end = end; sound->type = SOUND_TYPE_LIMITER; - sound_load(CTX_data_main(C), sound); + sound_load(bmain, sound); if(!sound->playback_handle) { - free_libblock(&CTX_data_main(C)->sound, sound); + free_libblock(&bmain->sound, sound); sound = NULL; } @@ -254,13 +254,13 @@ struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, floa } #endif -void sound_delete(struct bContext *C, struct bSound* sound) +void sound_delete(struct Main *bmain, struct bSound* sound) { if(sound) { sound_free(sound); - free_libblock(&CTX_data_main(C)->sound, sound); + free_libblock(&bmain->sound, sound); } } @@ -538,10 +538,11 @@ void sound_stop_scene(struct Scene *scene) } } -void sound_seek_scene(struct bContext *C) +void sound_seek_scene(struct Main *bmain, struct Scene *scene) { - struct Scene *scene = CTX_data_scene(C); AUD_Status status; + bScreen *screen; + int animation_playing; AUD_lock(); @@ -560,7 +561,12 @@ void sound_seek_scene(struct bContext *C) AUD_pause(scene->sound_scene_handle); } - if(scene->audio.flag & AUDIO_SCRUB && !CTX_wm_screen(C)->animtimer) + animation_playing = 0; + for(screen=bmain->screen.first; screen; screen=screen->id.next) + if(screen->animtimer) + animation_playing = 1; + + if(scene->audio.flag & AUDIO_SCRUB && !animation_playing) { if(scene->audio.flag & AUDIO_SYNC) { @@ -758,7 +764,7 @@ void sound_move_scene_sound(struct Scene *UNUSED(scene), void* UNUSED(handle), i static void sound_start_play_scene(struct Scene *UNUSED(scene)) {} void sound_play_scene(struct Scene *UNUSED(scene)) {} void sound_stop_scene(struct Scene *UNUSED(scene)) {} -void sound_seek_scene(struct bContext *UNUSED(C)) {} +void sound_seek_scene(struct Main *UNUSED(bmain), struct Scene *UNUSED(scene)) {} float sound_sync_scene(struct Scene *UNUSED(scene)) { return 0.0f; } int sound_scene_playing(struct Scene *UNUSED(scene)) { return -1; } int sound_read_sound_buffer(struct bSound* UNUSED(sound), float* UNUSED(buffer), int UNUSED(length), float UNUSED(start), float UNUSED(end)) { return 0; } diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index eaba8343f4d..aa61afbac78 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -41,6 +41,7 @@ #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_main.h" #include "BKE_sound.h" #include "UI_view2d.h" @@ -76,6 +77,7 @@ static int change_frame_poll(bContext *C) /* Set the new frame number */ static void change_frame_apply(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); /* set the new frame number */ @@ -84,7 +86,7 @@ static void change_frame_apply(bContext *C, wmOperator *op) SUBFRA = 0.f; /* do updates */ - sound_seek_scene(C); + sound_seek_scene(bmain, scene); WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); } diff --git a/source/blender/editors/include/ED_sequencer.h b/source/blender/editors/include/ED_sequencer.h index cd22a5c6ca4..5be1403c97b 100644 --- a/source/blender/editors/include/ED_sequencer.h +++ b/source/blender/editors/include/ED_sequencer.h @@ -31,8 +31,4 @@ #define SEQ_ZOOM_FAC(szoom) ((szoom) > 0.0f)? (szoom) : ((szoom) == 0.0f)? (1.0f) : (-1.0f/(szoom)) - -/* in space_sequencer.c, for rna update function */ -void ED_sequencer_update_view(bContext *C, int view); - #endif /* ED_SEQUENCER_H */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 66a67d7c4f2..b199f54cde1 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1732,14 +1732,16 @@ static void SCREEN_OT_region_scale(wmOperatorType *ot) /* function to be called outside UI context, or for redo */ static int frame_offset_exec(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); + Scene *scene= CTX_data_scene(C); int delta; delta = RNA_int_get(op->ptr, "delta"); - CTX_data_scene(C)->r.cfra += delta; - CTX_data_scene(C)->r.subframe = 0.f; + scene->r.cfra += delta; + scene->r.subframe = 0.f; - sound_seek_scene(C); + sound_seek_scene(bmain, scene); WM_event_add_notifier(C, NC_SCENE|ND_FRAME, CTX_data_scene(C)); @@ -1764,6 +1766,7 @@ static void SCREEN_OT_frame_offset(wmOperatorType *ot) /* function to be called outside UI context, or for redo */ static int frame_jump_exec(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); wmTimer *animtimer= CTX_wm_screen(C)->animtimer; @@ -1787,7 +1790,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op) else CFRA= PSFRA; - sound_seek_scene(C); + sound_seek_scene(bmain, scene); WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); } @@ -1816,6 +1819,7 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot) /* function to be called outside UI context, or for redo */ static int keyframe_jump_exec(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); Object *ob= CTX_data_active_object(C); bDopeSheet ads= {NULL}; @@ -1870,7 +1874,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) /* free temp stuff */ BLI_dlrbTree_free(&keys); - sound_seek_scene(C); + sound_seek_scene(bmain, scene); WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); @@ -2796,6 +2800,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e bScreen *screen= CTX_wm_screen(C); if(screen->animtimer && screen->animtimer==event->customdata) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); wmTimer *wt= screen->animtimer; ScreenAnimData *sad= wt->customdata; @@ -2872,7 +2877,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e } if (sad->flag & ANIMPLAY_FLAG_JUMPED) - sound_seek_scene(C); + sound_seek_scene(bmain, scene); /* since we follow drawflags, we can't send notifier but tag regions ourselves */ ED_update_for_newframe(CTX_data_main(C), scene, screen, 1); diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 70884d47c23..72dbbd9da9a 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -119,7 +119,7 @@ static int open_exec(bContext *C, wmOperator *op) info = AUD_getInfo(sound->playback_handle); if (info.specs.channels == AUD_CHANNELS_INVALID) { - sound_delete(C, sound); + sound_delete(bmain, sound); if(op->customdata) MEM_freeN(op->customdata); BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 0d7cdf94bc7..46918407447 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -41,6 +41,7 @@ #include "BLI_utildefines.h" #include "BKE_context.h" +#include "BKE_main.h" #include "BKE_sound.h" #include "UI_view2d.h" @@ -70,6 +71,7 @@ /* Set the new frame number */ static void graphview_cursor_apply(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); SpaceIpo *sipo= CTX_wm_space_graph(C); @@ -78,7 +80,7 @@ static void graphview_cursor_apply(bContext *C, wmOperator *op) */ CFRA= RNA_int_get(op->ptr, "frame"); SUBFRA=0.f; - sound_seek_scene(C); + sound_seek_scene(bmain, scene); /* set the cursor value */ sipo->cursorVal= RNA_float_get(op->ptr, "value"); diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index df347506e74..e7673651546 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2174,7 +2174,7 @@ static int sequencer_view_toggle_exec(bContext *C, wmOperator *UNUSED(op)) sseq->view++; if (sseq->view > SEQ_VIEW_SEQUENCE_PREVIEW) sseq->view = SEQ_VIEW_SEQUENCE; - ED_sequencer_update_view(C, sseq->view); + ED_area_tag_refresh(CTX_wm_area(C)); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 36471c7ffcf..5a0369ef80b 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -98,61 +98,6 @@ static ARegion *sequencer_find_region(ScrArea *sa, short type) return ar; } -void ED_sequencer_update_view(bContext *C, int view) -{ - ScrArea *sa= CTX_wm_area(C); - - ARegion *ar_main= sequencer_find_region(sa, RGN_TYPE_WINDOW); - ARegion *ar_preview= sequencer_find_region(sa, RGN_TYPE_PREVIEW); - - switch (view) { - case SEQ_VIEW_SEQUENCE: - if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) { - ar_main->flag &= ~RGN_FLAG_HIDDEN; - ar_main->v2d.flag &= ~V2D_IS_INITIALISED; - } - if (ar_preview && !(ar_preview->flag & RGN_FLAG_HIDDEN)) { - ar_preview->flag |= RGN_FLAG_HIDDEN; - ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; - WM_event_remove_handlers(C, &ar_preview->handlers); - } - if (ar_main) ar_main->alignment= RGN_ALIGN_NONE; - if (ar_preview) ar_preview->alignment= RGN_ALIGN_NONE; - break; - case SEQ_VIEW_PREVIEW: - if (ar_main && !(ar_main->flag & RGN_FLAG_HIDDEN)) { - ar_main->flag |= RGN_FLAG_HIDDEN; - ar_main->v2d.flag &= ~V2D_IS_INITIALISED; - WM_event_remove_handlers(C, &ar_main->handlers); - } - if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) { - ar_preview->flag &= ~RGN_FLAG_HIDDEN; - ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; - ar_preview->v2d.cur = ar_preview->v2d.tot; - } - if (ar_main) ar_main->alignment= RGN_ALIGN_NONE; - if (ar_preview) ar_preview->alignment= RGN_ALIGN_NONE; - break; - case SEQ_VIEW_SEQUENCE_PREVIEW: - if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) { - ar_main->flag &= ~RGN_FLAG_HIDDEN; - ar_main->v2d.flag &= ~V2D_IS_INITIALISED; - } - if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) { - ar_preview->flag &= ~RGN_FLAG_HIDDEN; - ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; - ar_preview->v2d.cur = ar_preview->v2d.tot; - } - if (ar_main) ar_main->alignment= RGN_ALIGN_NONE; - if (ar_preview) ar_preview->alignment= RGN_ALIGN_TOP; - break; - } - - ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa); - ED_area_tag_redraw(sa); -} - - /* ******************** default callbacks for sequencer space ***************** */ static SpaceLink *sequencer_new(const bContext *C) @@ -256,6 +201,88 @@ static void sequencer_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(s } +static void sequencer_refresh(const bContext *C, ScrArea *sa) +{ + wmWindowManager *wm= CTX_wm_manager(C); + wmWindow *window= CTX_wm_window(C); + SpaceSeq *sseq= (SpaceSeq *)sa->spacedata.first; + ARegion *ar_main= sequencer_find_region(sa, RGN_TYPE_WINDOW); + ARegion *ar_preview= sequencer_find_region(sa, RGN_TYPE_PREVIEW); + int view_changed= 0; + + switch (sseq->view) { + case SEQ_VIEW_SEQUENCE: + if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) { + ar_main->flag &= ~RGN_FLAG_HIDDEN; + ar_main->v2d.flag &= ~V2D_IS_INITIALISED; + view_changed= 1; + } + if (ar_preview && !(ar_preview->flag & RGN_FLAG_HIDDEN)) { + ar_preview->flag |= RGN_FLAG_HIDDEN; + ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; + WM_event_remove_handlers((bContext*)C, &ar_preview->handlers); + view_changed= 1; + } + if (ar_main && ar_main->alignment != RGN_ALIGN_TOP) { + ar_main->alignment= RGN_ALIGN_NONE; + view_changed= 1; + } + if (ar_preview && ar_preview->alignment != RGN_ALIGN_TOP) { + ar_preview->alignment= RGN_ALIGN_NONE; + view_changed= 1; + } + break; + case SEQ_VIEW_PREVIEW: + if (ar_main && !(ar_main->flag & RGN_FLAG_HIDDEN)) { + ar_main->flag |= RGN_FLAG_HIDDEN; + ar_main->v2d.flag &= ~V2D_IS_INITIALISED; + WM_event_remove_handlers((bContext*)C, &ar_main->handlers); + view_changed= 1; + } + if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) { + ar_preview->flag &= ~RGN_FLAG_HIDDEN; + ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; + ar_preview->v2d.cur = ar_preview->v2d.tot; + view_changed= 1; + } + if (ar_main && ar_main->alignment != RGN_ALIGN_TOP) { + ar_main->alignment= RGN_ALIGN_NONE; + view_changed= 1; + } + if (ar_preview && ar_preview->alignment != RGN_ALIGN_TOP) { + ar_preview->alignment= RGN_ALIGN_NONE; + view_changed= 1; + } + break; + case SEQ_VIEW_SEQUENCE_PREVIEW: + if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) { + ar_main->flag &= ~RGN_FLAG_HIDDEN; + ar_main->v2d.flag &= ~V2D_IS_INITIALISED; + view_changed= 1; + } + if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) { + ar_preview->flag &= ~RGN_FLAG_HIDDEN; + ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; + ar_preview->v2d.cur = ar_preview->v2d.tot; + view_changed= 1; + } + if (ar_main && ar_main->alignment != RGN_ALIGN_TOP) { + ar_main->alignment= RGN_ALIGN_NONE; + view_changed= 1; + } + if (ar_preview && ar_preview->alignment != RGN_ALIGN_TOP) { + ar_preview->alignment= RGN_ALIGN_TOP; + view_changed= 1; + } + break; + } + + if(view_changed) { + ED_area_initialize(wm, window, sa); + ED_area_tag_redraw(sa); + } +} + static SpaceLink *sequencer_duplicate(SpaceLink *sl) { SpaceSeq *sseqn= MEM_dupallocN(sl); @@ -516,6 +543,7 @@ void ED_spacetype_sequencer(void) st->operatortypes= sequencer_operatortypes; st->keymap= sequencer_keymap; st->dropboxes= sequencer_dropboxes; + st->refresh= sequencer_refresh; /* regions: main window */ art= MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 3c60a3b4cd7..8c2f473c65e 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -439,11 +439,10 @@ static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value) data->r.pefra= value; } -static void rna_Scene_frame_update(bContext *C, PointerRNA *UNUSED(ptr)) +static void rna_Scene_frame_update(Main *bmain, Scene *UNUSED(current_scene), PointerRNA *ptr) { - //Scene *scene= ptr->id.data; - //ED_update_for_newframe(C); - sound_seek_scene(C); + Scene *scene= (Scene*)ptr->id.data; + sound_seek_scene(bmain, scene); } static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr) @@ -3298,7 +3297,6 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_range(prop, MINAFRAME, MAXFRAME); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_current_frame_set", NULL); RNA_def_property_ui_text(prop, "Current Frame", "Current Frame, to update animation data from python frame_set() instead"); - RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update"); prop= RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME); diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index be4adb405e2..59707f05e6f 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -68,13 +68,13 @@ static void rna_Screen_scene_set(PointerRNA *ptr, PointerRNA value) sc->newscene= value.data; } -static void rna_Screen_scene_update(bContext *C, PointerRNA *ptr) +static void rna_Screen_scene_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { bScreen *sc= (bScreen*)ptr->data; /* exception: can't set screens inside of area/region handers */ if(sc->newscene) { - WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, sc->newscene); + WM_main_add_notifier(NC_SCENE|ND_SCENEBROWSE, sc->newscene); sc->newscene= NULL; } } @@ -231,7 +231,6 @@ static void rna_def_screen(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL); RNA_def_property_pointer_funcs(prop, NULL, "rna_Screen_scene_set", NULL, NULL); RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen"); - RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, 0, "rna_Screen_scene_update"); /* collections */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 35360910015..35115b40d59 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -805,10 +805,9 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), Scene *sce /* Space Graph Editor */ -static void rna_SpaceGraphEditor_display_mode_update(bContext *C, PointerRNA *UNUSED(ptr)) +static void rna_SpaceGraphEditor_display_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - //SpaceIpo *sipo= (SpaceIpo*)(ptr->data); - ScrArea *sa= CTX_wm_area(C); + ScrArea *sa= rna_area_from_space(ptr); /* after changing view mode, must force recalculation of F-Curve colors * which can only be achieved using refresh as opposed to redraw @@ -822,11 +821,10 @@ static int rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr) return (sipo->ghostCurves.first != NULL); } -static void rna_Sequencer_display_mode_update(bContext *C, PointerRNA *ptr) +static void rna_Sequencer_view_type_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - int view = RNA_enum_get(ptr, "view_type"); - - ED_sequencer_update_view(C, view); + ScrArea *sa= rna_area_from_space(ptr); + ED_area_tag_refresh(sa); } static float rna_BackgroundImage_opacity_get(PointerRNA *ptr) @@ -1689,8 +1687,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "view"); RNA_def_property_enum_items(prop, view_type_items); RNA_def_property_ui_text(prop, "View Type", "The type of the Sequencer view (sequencer, preview or both)"); - RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); - RNA_def_property_update(prop, 0, "rna_Sequencer_display_mode_update"); + RNA_def_property_update(prop, 0, "rna_Sequencer_view_type_update"); /* display type, fairly important */ prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); @@ -1987,7 +1984,6 @@ static void rna_def_space_graph(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, mode_items); RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed"); - RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update"); /* display */ diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 4c07a89a42f..a595b121d1a 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -482,13 +482,13 @@ static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value) win->newscreen= value.data; } -static void rna_Window_screen_update(bContext *C, PointerRNA *ptr) +static void rna_Window_screen_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { wmWindow *win= (wmWindow*)ptr->data; /* exception: can't set screens inside of area/region handers */ if(win->newscreen) { - WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, win->newscreen); + WM_main_add_notifier(NC_SCREEN|ND_SCREENBROWSE, win->newscreen); win->newscreen= NULL; } } @@ -1454,7 +1454,6 @@ static void rna_def_window(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Screen", "Active screen showing in the window"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, NULL, "rna_Window_screen_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, 0, "rna_Window_screen_update"); } -- cgit v1.2.3 From 6e9ff495eb082aeb49e6a1da23a7827d3fcd0fde Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Mon, 5 Sep 2011 20:41:58 +0000 Subject: Add parser error handler. OpenCOLLADA is a validating parser, so is pretty strict about document form. The added error handler will print out any errors the parser finds. A pop-up will be shown too, advising the user to check the console for the error log. --- source/blender/collada/CMakeLists.txt | 2 + source/blender/collada/DocumentImporter.cpp | 9 ++- source/blender/collada/ErrorHandler.cpp | 90 ++++++++++++++++++++++ source/blender/collada/ErrorHandler.h | 58 ++++++++++++++ source/blender/collada/collada.cpp | 4 +- source/blender/windowmanager/intern/wm_operators.c | 4 +- 6 files changed, 161 insertions(+), 6 deletions(-) create mode 100644 source/blender/collada/ErrorHandler.cpp create mode 100644 source/blender/collada/ErrorHandler.h diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt index ffe3d5f4f85..d73373aa901 100644 --- a/source/blender/collada/CMakeLists.txt +++ b/source/blender/collada/CMakeLists.txt @@ -51,6 +51,7 @@ set(SRC DocumentExporter.cpp DocumentImporter.cpp EffectExporter.cpp + ErrorHandler.cpp ExtraHandler.cpp ExtraTags.cpp GeometryExporter.cpp @@ -74,6 +75,7 @@ set(SRC DocumentExporter.h DocumentImporter.h EffectExporter.h + ErrorHandler.h ExtraHandler.h ExtraTags.h GeometryExporter.h diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 586c6ccfe82..366837421e3 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -76,6 +76,7 @@ #include "MEM_guardedalloc.h" #include "ExtraHandler.h" +#include "ErrorHandler.h" #include "DocumentImporter.h" #include "TransformReader.h" @@ -113,17 +114,19 @@ DocumentImporter::~DocumentImporter() bool DocumentImporter::import() { - /** TODO Add error handler (implement COLLADASaxFWL::IErrorHandler */ - COLLADASaxFWL::Loader loader; + ErrorHandler errorHandler; + COLLADASaxFWL::Loader loader(&errorHandler); COLLADAFW::Root root(&loader, this); ExtraHandler *ehandler = new ExtraHandler(this, &(this->anim_importer)); loader.registerExtraDataCallbackHandler(ehandler); - if (!root.loadDocument(mFilename)) return false; + if(errorHandler.hasError()) + return false; + /** TODO set up scene graph and such here */ mImportStage = Controller; diff --git a/source/blender/collada/ErrorHandler.cpp b/source/blender/collada/ErrorHandler.cpp new file mode 100644 index 00000000000..7108dbad18a --- /dev/null +++ b/source/blender/collada/ErrorHandler.cpp @@ -0,0 +1,90 @@ +/* + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Nathan Letwory. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/collada/ErrorHandler.cpp + * \ingroup collada + */ +#include "ErrorHandler.h" +#include + +#include "COLLADASaxFWLIError.h" +#include "COLLADASaxFWLSaxParserError.h" +#include "COLLADASaxFWLSaxFWLError.h" + +#include "GeneratedSaxParserParserError.h" + +#include + +//-------------------------------------------------------------------- +ErrorHandler::ErrorHandler() : mError(false) +{ +} + +//-------------------------------------------------------------------- +ErrorHandler::~ErrorHandler() +{ +} + +//-------------------------------------------------------------------- +bool ErrorHandler::handleError( const COLLADASaxFWL::IError* error ) +{ + if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXPARSER ) + { + COLLADASaxFWL::SaxParserError* saxParserError = (COLLADASaxFWL::SaxParserError*) error; + const GeneratedSaxParser::ParserError& parserError = saxParserError->getError(); + + // Workaround to avoid wrong error + if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_MIN_OCCURS_UNMATCHED) + { + if ( strcmp(parserError.getElement(), "effect") == 0 ) + { + return false; + } + } + if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_VALIDATION_SEQUENCE_PREVIOUS_SIBLING_NOT_PRESENT) + { + if ( (strcmp(parserError.getElement(), "extra") == 0) + && (strcmp(parserError.getAdditionalText().c_str(), "sibling: fx_profile_abstract") == 0)) + { + return false; + } + } + + if ( parserError.getErrorType() == GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE) + { + std::cout << "Couldn't open file" << std::endl; + mError = true; + } + + std::cout << "Schema validation error: " << parserError.getErrorMessage() << std::endl; + mError = true; + } + else if ( error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXFWL ) + { + COLLADASaxFWL::SaxFWLError* saxFWLError = (COLLADASaxFWL::SaxFWLError*) error; + std::cout << "Sax FWL Error: " << saxFWLError->getErrorMessage() << std::endl; + mError = true; + } + return false; +} diff --git a/source/blender/collada/ErrorHandler.h b/source/blender/collada/ErrorHandler.h new file mode 100644 index 00000000000..4064abb89f6 --- /dev/null +++ b/source/blender/collada/ErrorHandler.h @@ -0,0 +1,58 @@ +/* + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Nathan Letwory. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/collada/ErrorHandler.h + * \ingroup collada + */ + +#include +#include +#include +#include // sort() + +#include "COLLADASaxFWLIErrorHandler.h" + +/** \brief Handler class for parser errors + */ +class ErrorHandler : public COLLADASaxFWL::IErrorHandler +{ +public: + /** Constructor. */ + ErrorHandler(); + + /** Destructor. */ + virtual ~ErrorHandler(); + /** handle any error thrown by the parser. */ + bool virtual handleError(const COLLADASaxFWL::IError* error); + /** True if there was an error during parsing. */ + bool hasError() { return mError; } +private: + /** Disable default copy ctor. */ + ErrorHandler( const ErrorHandler& pre ); + /** Disable default assignment operator. */ + const ErrorHandler& operator= ( const ErrorHandler& pre ); + /** Hold error status. */ + bool mError; +}; + diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp index c15e608c360..4caca20531f 100644 --- a/source/blender/collada/collada.cpp +++ b/source/blender/collada/collada.cpp @@ -46,9 +46,9 @@ extern "C" int collada_import(bContext *C, const char *filepath) { DocumentImporter imp (C, filepath); - imp.import(); + if(imp.import()) return 1; - return 1; + return 0; } int collada_export(Scene *sce, const char *filepath, int selected) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 0e0203543a4..68a4eebf93f 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2082,7 +2082,9 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op) } RNA_string_get(op->ptr, "filepath", filename); - collada_import(C, filename); + if(collada_import(C, filename)) return OPERATOR_FINISHED; + + BKE_report(op->reports, RPT_ERROR, "Errors found during parsing COLLADA document. Please see console for error log."); return OPERATOR_FINISHED; } -- cgit v1.2.3 From 8e0fe8bff72e2dc2926618577eaffdd3417a8304 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Mon, 5 Sep 2011 21:01:50 +0000 Subject: Merged the particles-2010 branch with node improvements into trunk. This branch adds mostly organizational improvements to the node system by renaming the node folders and files. A couple of internal features have been added too. Detailed information can be found on the wiki page: http://wiki.blender.org/index.php/User:Phonybone/Particles2010 --- source/blender/blenkernel/BKE_blender.h | 2 +- source/blender/blenkernel/BKE_node.h | 344 +- source/blender/blenkernel/intern/material.c | 9 +- source/blender/blenkernel/intern/node.c | 3503 +++++--------------- source/blender/blenkernel/intern/texture.c | 4 +- source/blender/blenlib/BLI_math_matrix.h | 3 + source/blender/blenlib/BLI_math_vector.h | 1 + source/blender/blenlib/intern/math_matrix.c | 18 + source/blender/blenlib/intern/math_vector.c | 8 + source/blender/blenloader/CMakeLists.txt | 1 + source/blender/blenloader/SConscript | 2 +- source/blender/blenloader/intern/readfile.c | 255 +- source/blender/blenloader/intern/writefile.c | 26 +- source/blender/editors/include/ED_node.h | 5 +- source/blender/editors/sculpt_paint/paint_image.c | 5 +- source/blender/editors/sculpt_paint/sculpt.c | 5 +- source/blender/editors/space_node/drawnode.c | 750 ++++- source/blender/editors/space_node/node_buttons.c | 4 +- source/blender/editors/space_node/node_draw.c | 679 +--- source/blender/editors/space_node/node_edit.c | 672 ++-- source/blender/editors/space_node/node_header.c | 192 +- source/blender/editors/space_node/node_intern.h | 15 +- source/blender/editors/space_node/node_ops.c | 3 +- source/blender/editors/space_node/node_select.c | 24 +- source/blender/editors/space_node/node_state.c | 34 +- source/blender/editors/space_node/space_node.c | 22 +- .../editors/transform/transform_conversions.c | 19 +- source/blender/gpu/SConscript | 2 +- source/blender/makesdna/DNA_node_types.h | 171 +- source/blender/makesrna/RNA_access.h | 8 +- source/blender/makesrna/RNA_enum_types.h | 2 + source/blender/makesrna/RNA_types.h | 5 +- source/blender/makesrna/SConscript | 1 + source/blender/makesrna/intern/rna_access.c | 11 + source/blender/makesrna/intern/rna_main_api.c | 4 +- source/blender/makesrna/intern/rna_nodetree.c | 439 ++- .../blender/makesrna/intern/rna_nodetree_types.h | 10 +- source/blender/makesrna/intern/rna_object.c | 14 +- source/blender/makesrna/intern/rna_rna.c | 36 + source/blender/makesrna/intern/rna_space.c | 33 +- source/blender/modifiers/CMakeLists.txt | 1 + source/blender/modifiers/SConscript | 2 +- source/blender/nodes/CMP_node.h | 117 - source/blender/nodes/CMakeLists.txt | 230 +- source/blender/nodes/NOD_composite.h | 123 + source/blender/nodes/NOD_shader.h | 78 + source/blender/nodes/NOD_socket.h | 89 + source/blender/nodes/NOD_texture.h | 88 + source/blender/nodes/SConscript | 8 +- source/blender/nodes/SHD_node.h | 72 - source/blender/nodes/TEX_node.h | 82 - .../blender/nodes/composite/node_composite_tree.c | 811 +++++ .../blender/nodes/composite/node_composite_util.c | 1413 ++++++++ .../blender/nodes/composite/node_composite_util.h | 210 ++ .../composite/nodes/node_composite_alphaOver.c | 163 + .../composite/nodes/node_composite_bilateralblur.c | 271 ++ .../nodes/composite/nodes/node_composite_blur.c | 736 ++++ .../composite/nodes/node_composite_brightness.c | 110 + .../composite/nodes/node_composite_channelMatte.c | 217 ++ .../composite/nodes/node_composite_chromaMatte.c | 207 ++ .../composite/nodes/node_composite_colorMatte.c | 143 + .../composite/nodes/node_composite_colorSpill.c | 341 ++ .../composite/nodes/node_composite_colorbalance.c | 201 ++ .../nodes/composite/nodes/node_composite_common.c | 373 +++ .../composite/nodes/node_composite_composite.c | 113 + .../nodes/composite/nodes/node_composite_crop.c | 129 + .../nodes/composite/nodes/node_composite_curves.c | 209 ++ .../nodes/composite/nodes/node_composite_defocus.c | 892 +++++ .../composite/nodes/node_composite_diffMatte.c | 151 + .../nodes/composite/nodes/node_composite_dilate.c | 163 + .../nodes/node_composite_directionalblur.c | 146 + .../composite/nodes/node_composite_displace.c | 199 ++ .../composite/nodes/node_composite_distanceMatte.c | 148 + .../nodes/composite/nodes/node_composite_filter.c | 239 ++ .../nodes/composite/nodes/node_composite_flip.c | 106 + .../nodes/composite/nodes/node_composite_gamma.c | 90 + .../nodes/composite/nodes/node_composite_glare.c | 506 +++ .../composite/nodes/node_composite_hueSatVal.c | 122 + .../composite/nodes/node_composite_huecorrect.c | 170 + .../nodes/composite/nodes/node_composite_idMask.c | 125 + .../nodes/composite/nodes/node_composite_image.c | 452 +++ .../nodes/composite/nodes/node_composite_invert.c | 135 + .../composite/nodes/node_composite_lensdist.c | 207 ++ .../nodes/composite/nodes/node_composite_levels.c | 339 ++ .../composite/nodes/node_composite_lummaMatte.c | 125 + .../nodes/composite/nodes/node_composite_mapUV.c | 180 + .../composite/nodes/node_composite_mapValue.c | 103 + .../nodes/composite/nodes/node_composite_math.c | 214 ++ .../nodes/composite/nodes/node_composite_mixrgb.c | 99 + .../nodes/composite/nodes/node_composite_normal.c | 109 + .../composite/nodes/node_composite_normalize.c | 117 + .../composite/nodes/node_composite_outputFile.c | 127 + .../composite/nodes/node_composite_premulkey.c | 78 + .../nodes/composite/nodes/node_composite_rgb.c | 77 + .../nodes/composite/nodes/node_composite_rotate.c | 142 + .../nodes/composite/nodes/node_composite_scale.c | 134 + .../composite/nodes/node_composite_sepcombHSVA.c | 187 ++ .../composite/nodes/node_composite_sepcombRGBA.c | 162 + .../composite/nodes/node_composite_sepcombYCCA.c | 313 ++ .../composite/nodes/node_composite_sepcombYUVA.c | 187 ++ .../composite/nodes/node_composite_setalpha.c | 89 + .../composite/nodes/node_composite_splitViewer.c | 171 + .../nodes/composite/nodes/node_composite_texture.c | 160 + .../nodes/composite/nodes/node_composite_tonemap.c | 179 + .../composite/nodes/node_composite_translate.c | 76 + .../composite/nodes/node_composite_valToRgb.c | 152 + .../nodes/composite/nodes/node_composite_value.c | 72 + .../nodes/composite/nodes/node_composite_vecBlur.c | 113 + .../nodes/composite/nodes/node_composite_viewer.c | 148 + .../composite/nodes/node_composite_zcombine.c | 238 ++ .../blender/nodes/intern/CMP_nodes/CMP_alphaOver.c | 163 - .../nodes/intern/CMP_nodes/CMP_bilateralblur.c | 271 -- source/blender/nodes/intern/CMP_nodes/CMP_blur.c | 736 ---- .../nodes/intern/CMP_nodes/CMP_brightness.c | 110 - .../nodes/intern/CMP_nodes/CMP_channelMatte.c | 217 -- .../nodes/intern/CMP_nodes/CMP_chromaMatte.c | 207 -- .../nodes/intern/CMP_nodes/CMP_colorMatte.c | 143 - .../nodes/intern/CMP_nodes/CMP_colorSpill.c | 341 -- .../nodes/intern/CMP_nodes/CMP_colorbalance.c | 201 -- .../blender/nodes/intern/CMP_nodes/CMP_composite.c | 113 - source/blender/nodes/intern/CMP_nodes/CMP_crop.c | 129 - source/blender/nodes/intern/CMP_nodes/CMP_curves.c | 209 -- .../blender/nodes/intern/CMP_nodes/CMP_defocus.c | 892 ----- .../blender/nodes/intern/CMP_nodes/CMP_diffMatte.c | 151 - source/blender/nodes/intern/CMP_nodes/CMP_dilate.c | 163 - .../nodes/intern/CMP_nodes/CMP_directionalblur.c | 146 - .../blender/nodes/intern/CMP_nodes/CMP_displace.c | 199 -- .../nodes/intern/CMP_nodes/CMP_distanceMatte.c | 148 - source/blender/nodes/intern/CMP_nodes/CMP_filter.c | 239 -- source/blender/nodes/intern/CMP_nodes/CMP_flip.c | 106 - source/blender/nodes/intern/CMP_nodes/CMP_gamma.c | 90 - source/blender/nodes/intern/CMP_nodes/CMP_glare.c | 506 --- .../blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c | 122 - .../nodes/intern/CMP_nodes/CMP_huecorrect.c | 170 - source/blender/nodes/intern/CMP_nodes/CMP_idMask.c | 125 - source/blender/nodes/intern/CMP_nodes/CMP_image.c | 452 --- source/blender/nodes/intern/CMP_nodes/CMP_invert.c | 135 - .../blender/nodes/intern/CMP_nodes/CMP_lensdist.c | 207 -- source/blender/nodes/intern/CMP_nodes/CMP_levels.c | 350 -- .../nodes/intern/CMP_nodes/CMP_lummaMatte.c | 125 - source/blender/nodes/intern/CMP_nodes/CMP_mapUV.c | 180 - .../blender/nodes/intern/CMP_nodes/CMP_mapValue.c | 103 - source/blender/nodes/intern/CMP_nodes/CMP_math.c | 215 -- source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c | 99 - source/blender/nodes/intern/CMP_nodes/CMP_normal.c | 97 - .../blender/nodes/intern/CMP_nodes/CMP_normalize.c | 117 - .../nodes/intern/CMP_nodes/CMP_outputFile.c | 127 - .../blender/nodes/intern/CMP_nodes/CMP_premulkey.c | 78 - source/blender/nodes/intern/CMP_nodes/CMP_rgb.c | 64 - source/blender/nodes/intern/CMP_nodes/CMP_rotate.c | 142 - source/blender/nodes/intern/CMP_nodes/CMP_scale.c | 134 - .../nodes/intern/CMP_nodes/CMP_sepcombHSVA.c | 187 -- .../nodes/intern/CMP_nodes/CMP_sepcombRGBA.c | 162 - .../nodes/intern/CMP_nodes/CMP_sepcombYCCA.c | 313 -- .../nodes/intern/CMP_nodes/CMP_sepcombYUVA.c | 187 -- .../blender/nodes/intern/CMP_nodes/CMP_setalpha.c | 89 - .../nodes/intern/CMP_nodes/CMP_splitViewer.c | 171 - .../blender/nodes/intern/CMP_nodes/CMP_texture.c | 160 - .../blender/nodes/intern/CMP_nodes/CMP_tonemap.c | 179 - .../blender/nodes/intern/CMP_nodes/CMP_translate.c | 76 - .../blender/nodes/intern/CMP_nodes/CMP_valToRgb.c | 152 - source/blender/nodes/intern/CMP_nodes/CMP_value.c | 62 - .../blender/nodes/intern/CMP_nodes/CMP_vecBlur.c | 113 - source/blender/nodes/intern/CMP_nodes/CMP_viewer.c | 150 - .../blender/nodes/intern/CMP_nodes/CMP_zcombine.c | 238 -- source/blender/nodes/intern/CMP_util.c | 1413 -------- source/blender/nodes/intern/CMP_util.h | 211 -- source/blender/nodes/intern/SHD_nodes/SHD_camera.c | 76 - source/blender/nodes/intern/SHD_nodes/SHD_curves.c | 142 - .../blender/nodes/intern/SHD_nodes/SHD_dynamic.c | 792 ----- source/blender/nodes/intern/SHD_nodes/SHD_geom.c | 153 - .../blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c | 99 - source/blender/nodes/intern/SHD_nodes/SHD_invert.c | 90 - .../blender/nodes/intern/SHD_nodes/SHD_mapping.c | 104 - .../blender/nodes/intern/SHD_nodes/SHD_material.c | 336 -- source/blender/nodes/intern/SHD_nodes/SHD_math.c | 256 -- source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c | 91 - source/blender/nodes/intern/SHD_nodes/SHD_normal.c | 83 - source/blender/nodes/intern/SHD_nodes/SHD_output.c | 96 - source/blender/nodes/intern/SHD_nodes/SHD_rgb.c | 70 - .../nodes/intern/SHD_nodes/SHD_sepcombRGB.c | 112 - .../blender/nodes/intern/SHD_nodes/SHD_squeeze.c | 81 - .../blender/nodes/intern/SHD_nodes/SHD_texture.c | 149 - .../blender/nodes/intern/SHD_nodes/SHD_valToRgb.c | 129 - source/blender/nodes/intern/SHD_nodes/SHD_value.c | 71 - .../blender/nodes/intern/SHD_nodes/SHD_vectMath.c | 150 - source/blender/nodes/intern/SHD_util.c | 219 -- source/blender/nodes/intern/SHD_util.h | 125 - source/blender/nodes/intern/TEX_nodes/TEX_at.c | 72 - source/blender/nodes/intern/TEX_nodes/TEX_bricks.c | 133 - .../blender/nodes/intern/TEX_nodes/TEX_checker.c | 83 - .../blender/nodes/intern/TEX_nodes/TEX_compose.c | 71 - source/blender/nodes/intern/TEX_nodes/TEX_coord.c | 65 - source/blender/nodes/intern/TEX_nodes/TEX_curves.c | 127 - .../blender/nodes/intern/TEX_nodes/TEX_decompose.c | 92 - .../blender/nodes/intern/TEX_nodes/TEX_distance.c | 76 - .../blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c | 106 - source/blender/nodes/intern/TEX_nodes/TEX_image.c | 112 - source/blender/nodes/intern/TEX_nodes/TEX_invert.c | 78 - source/blender/nodes/intern/TEX_nodes/TEX_math.c | 201 -- source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c | 79 - source/blender/nodes/intern/TEX_nodes/TEX_output.c | 173 - source/blender/nodes/intern/TEX_nodes/TEX_proc.c | 325 -- source/blender/nodes/intern/TEX_nodes/TEX_rotate.c | 109 - source/blender/nodes/intern/TEX_nodes/TEX_scale.c | 82 - .../blender/nodes/intern/TEX_nodes/TEX_texture.c | 103 - .../blender/nodes/intern/TEX_nodes/TEX_translate.c | 78 - .../blender/nodes/intern/TEX_nodes/TEX_valToNor.c | 94 - .../blender/nodes/intern/TEX_nodes/TEX_valToRgb.c | 116 - source/blender/nodes/intern/TEX_nodes/TEX_viewer.c | 70 - source/blender/nodes/intern/TEX_util.c | 214 -- source/blender/nodes/intern/TEX_util.h | 126 - source/blender/nodes/intern/node_common.c | 982 ++++++ source/blender/nodes/intern/node_common.h | 65 + source/blender/nodes/intern/node_exec.c | 308 ++ source/blender/nodes/intern/node_exec.h | 89 + source/blender/nodes/intern/node_socket.c | 428 +++ source/blender/nodes/intern/node_util.c | 18 +- source/blender/nodes/intern/node_util.h | 13 + source/blender/nodes/shader/node_shader_tree.c | 212 ++ source/blender/nodes/shader/node_shader_util.c | 287 ++ source/blender/nodes/shader/node_shader_util.h | 130 + .../nodes/shader/nodes/node_shader_camera.c | 76 + .../nodes/shader/nodes/node_shader_common.c | 327 ++ .../nodes/shader/nodes/node_shader_curves.c | 142 + .../nodes/shader/nodes/node_shader_dynamic.c | 792 +++++ .../blender/nodes/shader/nodes/node_shader_geom.c | 153 + .../nodes/shader/nodes/node_shader_hueSatVal.c | 99 + .../nodes/shader/nodes/node_shader_invert.c | 90 + .../nodes/shader/nodes/node_shader_mapping.c | 104 + .../nodes/shader/nodes/node_shader_material.c | 336 ++ .../blender/nodes/shader/nodes/node_shader_math.c | 256 ++ .../nodes/shader/nodes/node_shader_mixRgb.c | 91 + .../nodes/shader/nodes/node_shader_normal.c | 95 + .../nodes/shader/nodes/node_shader_output.c | 96 + .../blender/nodes/shader/nodes/node_shader_rgb.c | 84 + .../nodes/shader/nodes/node_shader_sepcombRGB.c | 112 + .../nodes/shader/nodes/node_shader_squeeze.c | 81 + .../nodes/shader/nodes/node_shader_texture.c | 149 + .../nodes/shader/nodes/node_shader_valToRgb.c | 129 + .../blender/nodes/shader/nodes/node_shader_value.c | 82 + .../nodes/shader/nodes/node_shader_vectMath.c | 150 + source/blender/nodes/texture/node_texture_tree.c | 237 ++ source/blender/nodes/texture/node_texture_util.c | 172 + source/blender/nodes/texture/node_texture_util.h | 123 + .../blender/nodes/texture/nodes/node_texture_at.c | 72 + .../nodes/texture/nodes/node_texture_bricks.c | 134 + .../nodes/texture/nodes/node_texture_checker.c | 83 + .../nodes/texture/nodes/node_texture_common.c | 271 ++ .../nodes/texture/nodes/node_texture_compose.c | 71 + .../nodes/texture/nodes/node_texture_coord.c | 65 + .../nodes/texture/nodes/node_texture_curves.c | 127 + .../nodes/texture/nodes/node_texture_decompose.c | 92 + .../nodes/texture/nodes/node_texture_distance.c | 76 + .../nodes/texture/nodes/node_texture_hueSatVal.c | 106 + .../nodes/texture/nodes/node_texture_image.c | 112 + .../nodes/texture/nodes/node_texture_invert.c | 78 + .../nodes/texture/nodes/node_texture_math.c | 201 ++ .../nodes/texture/nodes/node_texture_mixRgb.c | 79 + .../nodes/texture/nodes/node_texture_output.c | 173 + .../nodes/texture/nodes/node_texture_proc.c | 326 ++ .../nodes/texture/nodes/node_texture_rotate.c | 109 + .../nodes/texture/nodes/node_texture_scale.c | 82 + .../nodes/texture/nodes/node_texture_texture.c | 103 + .../nodes/texture/nodes/node_texture_translate.c | 78 + .../nodes/texture/nodes/node_texture_valToNor.c | 94 + .../nodes/texture/nodes/node_texture_valToRgb.c | 116 + .../nodes/texture/nodes/node_texture_viewer.c | 70 + .../blender/render/intern/source/render_texture.c | 6 +- source/creator/CMakeLists.txt | 1 - 270 files changed, 26817 insertions(+), 22830 deletions(-) delete mode 100644 source/blender/nodes/CMP_node.h create mode 100644 source/blender/nodes/NOD_composite.h create mode 100644 source/blender/nodes/NOD_shader.h create mode 100644 source/blender/nodes/NOD_socket.h create mode 100644 source/blender/nodes/NOD_texture.h delete mode 100644 source/blender/nodes/SHD_node.h delete mode 100644 source/blender/nodes/TEX_node.h create mode 100644 source/blender/nodes/composite/node_composite_tree.c create mode 100644 source/blender/nodes/composite/node_composite_util.c create mode 100644 source/blender/nodes/composite/node_composite_util.h create mode 100644 source/blender/nodes/composite/nodes/node_composite_alphaOver.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_bilateralblur.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_blur.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_brightness.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_channelMatte.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_chromaMatte.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_colorMatte.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_colorSpill.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_colorbalance.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_common.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_composite.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_crop.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_curves.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_defocus.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_diffMatte.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_dilate.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_directionalblur.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_displace.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_distanceMatte.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_filter.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_flip.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_gamma.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_glare.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_hueSatVal.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_huecorrect.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_idMask.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_image.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_invert.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_lensdist.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_levels.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_lummaMatte.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_mapUV.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_mapValue.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_math.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_mixrgb.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_normal.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_normalize.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_outputFile.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_premulkey.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_rgb.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_rotate.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_scale.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_setalpha.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_splitViewer.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_texture.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_tonemap.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_translate.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_valToRgb.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_value.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_vecBlur.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_viewer.c create mode 100644 source/blender/nodes/composite/nodes/node_composite_zcombine.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_bilateralblur.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_blur.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_brightness.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_composite.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_crop.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_curves.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_defocus.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_dilate.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_directionalblur.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_displace.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_filter.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_flip.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_gamma.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_glare.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_idMask.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_image.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_invert.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_lensdist.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_levels.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_mapUV.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_math.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_normal.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_normalize.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_premulkey.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_rgb.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_rotate.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_scale.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_setalpha.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_texture.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_translate.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_value.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_viewer.c delete mode 100644 source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c delete mode 100644 source/blender/nodes/intern/CMP_util.c delete mode 100644 source/blender/nodes/intern/CMP_util.h delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_camera.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_curves.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_geom.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_invert.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_mapping.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_material.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_math.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_normal.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_output.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_rgb.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_texture.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_valToRgb.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_value.c delete mode 100644 source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c delete mode 100644 source/blender/nodes/intern/SHD_util.c delete mode 100644 source/blender/nodes/intern/SHD_util.h delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_at.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_bricks.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_checker.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_compose.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_coord.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_curves.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_decompose.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_distance.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_image.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_invert.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_math.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_output.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_proc.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_rotate.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_scale.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_texture.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_translate.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c delete mode 100644 source/blender/nodes/intern/TEX_nodes/TEX_viewer.c delete mode 100644 source/blender/nodes/intern/TEX_util.c delete mode 100644 source/blender/nodes/intern/TEX_util.h create mode 100644 source/blender/nodes/intern/node_common.c create mode 100644 source/blender/nodes/intern/node_common.h create mode 100644 source/blender/nodes/intern/node_exec.c create mode 100644 source/blender/nodes/intern/node_exec.h create mode 100644 source/blender/nodes/intern/node_socket.c create mode 100644 source/blender/nodes/shader/node_shader_tree.c create mode 100644 source/blender/nodes/shader/node_shader_util.c create mode 100644 source/blender/nodes/shader/node_shader_util.h create mode 100644 source/blender/nodes/shader/nodes/node_shader_camera.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_common.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_curves.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_dynamic.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_geom.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_hueSatVal.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_invert.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_mapping.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_material.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_math.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_mixRgb.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_normal.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_output.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_rgb.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_squeeze.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_texture.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_valToRgb.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_value.c create mode 100644 source/blender/nodes/shader/nodes/node_shader_vectMath.c create mode 100644 source/blender/nodes/texture/node_texture_tree.c create mode 100644 source/blender/nodes/texture/node_texture_util.c create mode 100644 source/blender/nodes/texture/node_texture_util.h create mode 100644 source/blender/nodes/texture/nodes/node_texture_at.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_bricks.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_checker.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_common.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_compose.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_coord.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_curves.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_decompose.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_distance.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_hueSatVal.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_image.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_invert.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_math.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_mixRgb.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_output.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_proc.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_rotate.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_scale.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_texture.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_translate.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_valToNor.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_valToRgb.c create mode 100644 source/blender/nodes/texture/nodes/node_texture_viewer.c diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 0f19cfbc481..742240d53b5 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -44,7 +44,7 @@ extern "C" { * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ #define BLENDER_VERSION 259 -#define BLENDER_SUBVERSION 1 +#define BLENDER_SUBVERSION 2 #define BLENDER_MINVERSION 250 #define BLENDER_MINSUBVERSION 0 diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index e44b5d96852..7207fb7d0fb 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -37,6 +37,10 @@ * \ingroup bke */ +#include "DNA_listBase.h" + +#include "RNA_types.h" + /* not very important, but the stack solver likes to know a maximum */ #define MAX_SOCKET 64 @@ -46,63 +50,151 @@ struct bNodeLink; struct bNodeSocket; struct bNodeStack; struct bNodeTree; +struct bNodeTreeExec; struct GPUMaterial; struct GPUNode; struct GPUNodeStack; struct ID; struct ListBase; struct Main; +struct uiBlock; +struct uiLayout; struct MTex; struct PointerRNA; struct rctf; struct RenderData; struct Scene; struct Tex; -struct uiLayout; - +struct SpaceNode; +struct ARegion; +struct Object; /* ************** NODE TYPE DEFINITIONS ***** */ -typedef struct bNodeSocketType { +/** Compact definition of a node socket. + * Can be used to quickly define a list of static sockets for a node, + * which are added to each new node of that type. + * + * \deprecated New nodes should add default sockets in the initialization + * function instead. This struct is mostly kept for old nodes and should + * be removed some time. + */ +typedef struct bNodeSocketTemplate { int type, limit; - const char *name; - float val1, val2, val3, val4; /* default alloc value for inputs */ - float min, max; /* default range for inputs */ + char name[32]; + float val1, val2, val3, val4; /* default alloc value for inputs */ + float min, max; + PropertySubType subtype; /* after this line is used internal only */ - struct bNodeSocket *sock; /* used during verify_types */ + struct bNodeSocket *sock; /* used to hold verified socket */ +} bNodeSocketTemplate; + +typedef void (*NodeSocketButtonFunction)(const struct bContext *C, struct uiBlock *block, + struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock, + const char *name, int x, int y, int width); + +/** Defines a socket type. + * Defines the appearance and behavior of a socket in the UI. + */ +typedef struct bNodeSocketType { + int type; + char ui_name[32]; + char ui_description[128]; + int ui_icon; + char ui_color[4]; + + const char *value_structname; + int value_structsize; + + NodeSocketButtonFunction buttonfunc; } bNodeSocketType; +/** Template for creating a node. + * Stored required parameters to make a new node of a specific type. + */ +typedef struct bNodeTemplate { + int type; + + /* group tree */ + struct bNodeTree *ngroup; +} bNodeTemplate; + +/** Defines a node type. + * Initial attributes and constants for a node as well as callback functions + * implementing the node behavior. + */ typedef struct bNodeType { void *next,*prev; + short needs_free; /* set for allocated types that need to be freed */ + int type; - const char *name; /* can be allocated too */ + char name[32]; float width, minwidth, maxwidth; + float height, minheight, maxheight; short nclass, flag; - bNodeSocketType *inputs, *outputs; + /* templates for static sockets */ + bNodeSocketTemplate *inputs, *outputs; char storagename[64]; /* struct name for DNA */ - void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **); - - /* this line is set on startup of blender */ + /// Main draw function for the node. + void (*drawfunc)(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node); + /// Updates the node geometry attributes according to internal state before actual drawing. + void (*drawupdatefunc)(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node); + /// Draw the option buttons on the node. void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr); + /// Additional parameters in the side panel. void (*uifuncbut)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr); + /// Optional custom label function for the node header. const char *(*labelfunc)(struct bNode *); - - void (*initfunc)(struct bNode *); - void (*freestoragefunc)(struct bNode *); - void (*copystoragefunc)(struct bNode *, struct bNode *); + /// Optional custom resize handle polling. + int (*resize_area_func)(struct bNode *node, int x, int y); - /* for use with dynamic typedefs */ - ID *id; - void *pynode; /* holds pointer to python script */ - void *pydict; /* holds pointer to python script dictionary (scope)*/ - + /// Called when the node is updated in the editor. + void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node); + /// Check and update if internal ID data has changed. + void (*verifyfunc)(struct bNodeTree *ntree, struct bNode *node, struct ID *id); + + /// Initialize a new node instance of this type after creation. + void (*initfunc)(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp); + /// Free the custom storage data. + void (*freestoragefunc)(struct bNode *node); + /// Make a copy of the custom storage data. + void (*copystoragefunc)(struct bNode *node, struct bNode *target); + + /// Create a template from an existing node. + struct bNodeTemplate (*templatefunc)(struct bNode *); + /** If a node can be made from the template in the given node tree. + * \example Node groups can not be created inside their own node tree. + */ + int (*validfunc)(struct bNodeTree *ntree, struct bNodeTemplate *ntemp); + + /// Initialize a node tree associated to this node type. + void (*inittreefunc)(struct bNodeTree *ntree); + /// Update a node tree associated to this node type. + void (*updatetreefunc)(struct bNodeTree *ntree); + + /* group edit callbacks for operators */ + /* XXX this is going to be changed as required by the UI */ + struct bNodeTree *(*group_edit_get)(struct bNode *node); + struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit); + void (*group_edit_clear)(struct bNode *node); + + + /* **** execution callbacks **** */ + void *(*initexecfunc)(struct bNode *node); + void (*freeexecfunc)(struct bNode *node, void *nodedata); + void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **); + /* XXX this alternative exec function has been added to avoid changing all node types. + * when a final generic version of execution code is defined, this will be changed anyway + */ + void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **); /* gpu */ int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out); - + /* extended gpu function */ + int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out); } bNodeType; /* node->exec, now in use for composites (#define for break is same as ready yes) */ @@ -113,72 +205,124 @@ typedef struct bNodeType { #define NODE_FREEBUFS 8 #define NODE_SKIPPED 16 +/* sim_exec return value */ +#define NODE_EXEC_FINISHED 0 +#define NODE_EXEC_SUSPEND 1 + /* nodetype->nclass, for add-menu and themes */ -#define NODE_CLASS_INPUT 0 -#define NODE_CLASS_OUTPUT 1 -#define NODE_CLASS_OP_COLOR 3 -#define NODE_CLASS_OP_VECTOR 4 -#define NODE_CLASS_OP_FILTER 5 -#define NODE_CLASS_GROUP 6 -#define NODE_CLASS_FILE 7 -#define NODE_CLASS_CONVERTOR 8 -#define NODE_CLASS_MATTE 9 -#define NODE_CLASS_DISTORT 10 -#define NODE_CLASS_OP_DYNAMIC 11 -#define NODE_CLASS_PATTERN 12 -#define NODE_CLASS_TEXTURE 13 +#define NODE_CLASS_INPUT 0 +#define NODE_CLASS_OUTPUT 1 +#define NODE_CLASS_OP_COLOR 3 +#define NODE_CLASS_OP_VECTOR 4 +#define NODE_CLASS_OP_FILTER 5 +#define NODE_CLASS_GROUP 6 +#define NODE_CLASS_FILE 7 +#define NODE_CLASS_CONVERTOR 8 +#define NODE_CLASS_MATTE 9 +#define NODE_CLASS_DISTORT 10 +#define NODE_CLASS_OP_DYNAMIC 11 +#define NODE_CLASS_PATTERN 12 +#define NODE_CLASS_TEXTURE 13 +#define NODE_CLASS_EXECUTION 14 +#define NODE_CLASS_GETDATA 15 +#define NODE_CLASS_SETDATA 16 +#define NODE_CLASS_MATH 17 +#define NODE_CLASS_MATH_VECTOR 18 +#define NODE_CLASS_MATH_ROTATION 19 +#define NODE_CLASS_PARTICLES 25 +#define NODE_CLASS_TRANSFORM 30 +#define NODE_CLASS_COMBINE 31 +#define NODE_CLASS_LAYOUT 100 /* enum values for input/output */ #define SOCK_IN 1 #define SOCK_OUT 2 +struct bNodeTreeExec; + +typedef void (*bNodeTreeCallback)(void *calldata, struct ID *owner_id, struct bNodeTree *ntree); +typedef struct bNodeTreeType +{ + int type; /* type identifier */ + char idname[64]; /* id name for RNA identification */ + + ListBase node_types; /* type definitions */ + + /* callbacks */ + void (*free_cache)(struct bNodeTree *ntree); + void (*free_node_cache)(struct bNodeTree *ntree, struct bNode *node); + void (*foreach_nodetree)(struct Main *main, void *calldata, bNodeTreeCallback func); /* iteration over all node trees */ + + /* calls allowing threaded composite */ + void (*localize)(struct bNodeTree *localtree, struct bNodeTree *ntree); + void (*local_sync)(struct bNodeTree *localtree, struct bNodeTree *ntree); + void (*local_merge)(struct bNodeTree *localtree, struct bNodeTree *ntree); + + /* Tree update. Overrides nodetype->updatetreefunc! */ + void (*update)(struct bNodeTree *ntree); + /* Node update. Overrides nodetype->updatefunc! */ + void (*update_node)(struct bNodeTree *ntree, struct bNode *node); + + int (*validate_link)(struct bNodeTree *ntree, struct bNodeLink *link); +} bNodeTreeType; + /* ************** GENERIC API, TREES *************** */ -void ntreeVerifyTypes(struct bNodeTree *ntree); +struct bNodeTreeType *ntreeGetType(int type); +struct bNodeType *ntreeGetNodeType(struct bNodeTree *ntree); +struct bNodeSocketType *ntreeGetSocketType(int type); -struct bNodeTree *ntreeAddTree(const char *name, int type, const short is_group); +struct bNodeTree *ntreeAddTree(const char *name, int type, int nodetype); void ntreeInitTypes(struct bNodeTree *ntree); -//void ntreeMakeGroupSockets(struct bNodeTree *ntree); -void ntreeUpdateType(struct bNodeTree *ntree, struct bNodeType *ntype); void ntreeFreeTree(struct bNodeTree *ntree); struct bNodeTree *ntreeCopyTree(struct bNodeTree *ntree); void ntreeSwitchID(struct bNodeTree *ntree, struct ID *sce_from, struct ID *sce_to); void ntreeMakeLocal(struct bNodeTree *ntree); +int ntreeHasType(struct bNodeTree *ntree, int type); void ntreeSocketUseFlags(struct bNodeTree *ntree); -void ntreeSolveOrder(struct bNodeTree *ntree); +void ntreeUpdateTree(struct bNodeTree *ntree); +/* XXX Currently each tree update call does call to ntreeVerifyNodes too. + * Some day this should be replaced by a decent depsgraph automatism! + */ +void ntreeVerifyNodes(struct Main *main, struct ID *id); -void ntreeBeginExecTree(struct bNodeTree *ntree); -void ntreeExecTree(struct bNodeTree *ntree, void *callerdata, int thread); -void ntreeCompositExecTree(struct bNodeTree *ntree, struct RenderData *rd, int do_previews); -void ntreeEndExecTree(struct bNodeTree *ntree); +void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes); +/* XXX old trees handle output flags automatically based on special output node types and last active selection. + * new tree types have a per-output socket flag to indicate the final output to use explicitly. + */ +void ntreeSetOutput(struct bNodeTree *ntree); void ntreeInitPreview(struct bNodeTree *, int xsize, int ysize); void ntreeClearPreview(struct bNodeTree *ntree); void ntreeFreeCache(struct bNodeTree *ntree); - - /* calls allowing threaded composite */ + +int ntreeNodeExists(struct bNodeTree *ntree, struct bNode *testnode); +int ntreeOutputExists(struct bNode *node, struct bNodeSocket *testsock); struct bNodeTree *ntreeLocalize(struct bNodeTree *ntree); void ntreeLocalSync(struct bNodeTree *localtree, struct bNodeTree *ntree); void ntreeLocalMerge(struct bNodeTree *localtree, struct bNodeTree *ntree); /* ************** GENERIC API, NODES *************** */ -void nodeVerifyType(struct bNodeTree *ntree, struct bNode *node); +struct bNodeSocket *nodeAddSocket(struct bNodeTree *ntree, struct bNode *node, int in_out, const char *name, int type); +struct bNodeSocket *nodeInsertSocket(struct bNodeTree *ntree, struct bNode *node, int in_out, struct bNodeSocket *next_sock, const char *name, int type); +void nodeRemoveSocket(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock); +void nodeRemoveAllSockets(struct bNodeTree *ntree, struct bNode *node); void nodeAddToPreview(struct bNode *, float *, int, int, int); +struct bNode *nodeAddNode(struct bNodeTree *ntree, struct bNodeTemplate *ntemp); void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node); void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node); -void nodeAddSockets(struct bNode *node, struct bNodeType *ntype); -struct bNode *nodeAddNodeType(struct bNodeTree *ntree, int type, struct bNodeTree *ngroup, struct ID *id); -void nodeRegisterType(struct ListBase *typelist, const struct bNodeType *ntype) ; -void nodeUpdateType(struct bNodeTree *ntree, struct bNode* node, struct bNodeType *ntype); + +void nodeRegisterType(struct ListBase *typelist, struct bNodeType *ntype) ; void nodeMakeDynamicType(struct bNode *node); int nodeDynamicUnlinkText(struct ID *txtid); + void nodeFreeNode(struct bNodeTree *ntree, struct bNode *node); struct bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node); @@ -186,6 +330,10 @@ struct bNodeLink *nodeAddLink(struct bNodeTree *ntree, struct bNode *fromnode, s void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link); void nodeRemSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock); +void nodeSpaceCoords(struct bNode *node, float *locx, float *locy); +void nodeAttachNode(struct bNode *node, struct bNode *parent); +void nodeDetachNode(struct bNode *node); + struct bNode *nodeFindNodebyName(struct bNodeTree *ntree, const char *name); int nodeFindNode(struct bNodeTree *ntree, struct bNodeSocket *sock, struct bNode **nodep, int *sockindex, int *in_out); @@ -202,41 +350,71 @@ void NodeTagChanged(struct bNodeTree *ntree, struct bNode *node); int NodeTagIDChanged(struct bNodeTree *ntree, struct ID *id); void ntreeClearTags(struct bNodeTree *ntree); -/* ************** Groups ****************** */ - -struct bNode *nodeMakeGroupFromSelected(struct bNodeTree *ntree); -int nodeGroupUnGroup(struct bNodeTree *ntree, struct bNode *gnode); - -void nodeGroupVerify(struct bNodeTree *ngroup); -void nodeGroupSocketUseFlags(struct bNodeTree *ngroup); - -void nodeGroupCopy(struct bNode *gnode); +void nodeFreePreview(struct bNode *node); -struct bNodeSocket *nodeGroupAddSocket(struct bNodeTree *ngroup, const char *name, int type, int in_out); -struct bNodeSocket *nodeGroupExposeSocket(struct bNodeTree *ngroup, struct bNodeSocket *sock, int in_out); -void nodeGroupExposeAllSockets(struct bNodeTree *ngroup); -void nodeGroupRemoveSocket(struct bNodeTree *ngroup, struct bNodeSocket *gsock, int in_out); +/* ************** NODE TYPE ACCESS *************** */ -/* ************** COMMON NODES *************** */ +struct bNodeTemplate nodeMakeTemplate(struct bNode *node); +int nodeValid(struct bNodeTree *ntree, struct bNodeTemplate *ntemp); +const char* nodeLabel(struct bNode *node); +struct bNodeTree *nodeGroupEditGet(struct bNode *node); +struct bNodeTree *nodeGroupEditSet(struct bNode *node, int edit); +void nodeGroupEditClear(struct bNode *node); /* Init a new node type struct with default values and callbacks */ -void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag, - struct bNodeSocketType *inputs, struct bNodeSocketType *outputs); +void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag); +void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs); void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth); -void node_type_init(struct bNodeType *ntype, void (*initfunc)(struct bNode *)); +void node_type_init(struct bNodeType *ntype, void (*initfunc)(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp)); +void node_type_valid(struct bNodeType *ntype, int (*validfunc)(struct bNodeTree *ntree, struct bNodeTemplate *ntemp)); void node_type_storage(struct bNodeType *ntype, const char *storagename, void (*freestoragefunc)(struct bNode *), void (*copystoragefunc)(struct bNode *, struct bNode *)); +void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *)); +void node_type_template(struct bNodeType *ntype, struct bNodeTemplate (*templatefunc)(struct bNode *)); +void node_type_update(struct bNodeType *ntype, + void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node), + void (*verifyfunc)(struct bNodeTree *ntree, struct bNode *node, struct ID *id)); +void node_type_tree(struct bNodeType *ntype, + void (*inittreefunc)(struct bNodeTree *), + void (*updatetreefunc)(struct bNodeTree *)); +void node_type_group_edit(struct bNodeType *ntype, + struct bNodeTree *(*group_edit_get)(struct bNode *node), + struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit), + void (*group_edit_clear)(struct bNode *node)); + void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **)); +void node_type_exec_new(struct bNodeType *ntype, + void *(*initexecfunc)(struct bNode *node), + void (*freeexecfunc)(struct bNode *node, void *nodedata), + void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **)); void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out)); -void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *)); +void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out)); + +/* ************** COMMON NODES *************** */ #define NODE_GROUP 2 -#define NODE_GROUP_MENU 1000 -#define NODE_DYNAMIC_MENU 4000 +#define NODE_FORLOOP 3 +#define NODE_WHILELOOP 4 +#define NODE_FRAME 5 +#define NODE_GROUP_MENU 10000 +#define NODE_DYNAMIC_MENU 20000 + +/* look up a socket on a group node by the internal group socket */ +struct bNodeSocket *node_group_find_input(struct bNode *gnode, struct bNodeSocket *gsock); +struct bNodeSocket *node_group_find_output(struct bNode *gnode, struct bNodeSocket *gsock); + +struct bNodeSocket *node_group_add_socket(struct bNodeTree *ngroup, const char *name, int type, int in_out); +struct bNodeSocket *node_group_expose_socket(struct bNodeTree *ngroup, struct bNodeSocket *sock, int in_out); +void node_group_expose_all_sockets(struct bNodeTree *ngroup); +void node_group_remove_socket(struct bNodeTree *ngroup, struct bNodeSocket *gsock, int in_out); -void register_node_type_group(ListBase *lb); +struct bNode *node_group_make_from_selected(struct bNodeTree *ntree); +int node_group_ungroup(struct bNodeTree *ntree, struct bNode *gnode); + +/* in node_common.c */ +void register_node_type_frame(ListBase *lb); /* ************** SHADER NODES *************** */ @@ -286,11 +464,10 @@ struct ShadeResult; #define NODE_DYNAMIC_REPARSE 6 /* 64 */ #define NODE_DYNAMIC_SET 15 /* sign */ -/* the type definitions array */ -extern struct ListBase node_all_shaders; - /* API */ +struct bNodeTreeExec *ntreeShaderBeginExecTree(struct bNodeTree *ntree); +void ntreeShaderEndExecTree(struct bNodeTreeExec *exec); void ntreeShaderExecTree(struct bNodeTree *ntree, struct ShadeInput *shi, struct ShadeResult *shr); void ntreeShaderGetTexcoMode(struct bNodeTree *ntree, int osa, short *texco, int *mode); void nodeShaderSynchronizeID(struct bNode *node, int copyto); @@ -415,11 +592,11 @@ void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat); #define CMP_SCALE_RENDERPERCENT 3 -/* the type definitions array */ -extern struct ListBase node_all_composit; - /* API */ struct CompBuf; +struct bNodeTreeExec *ntreeCompositBeginExecTree(struct bNodeTree *ntree); +void ntreeCompositEndExecTree(struct bNodeTreeExec *exec); +void ntreeCompositExecTree(struct bNodeTree *ntree, struct RenderData *rd, int do_previews); void ntreeCompositTagRender(struct Scene *sce); int ntreeCompositTagAnimated(struct bNodeTree *ntree); void ntreeCompositTagGenerators(struct bNodeTree *ntree); @@ -459,23 +636,22 @@ struct TexResult; #define TEX_NODE_PROC 500 #define TEX_NODE_PROC_MAX 600 -extern struct ListBase node_all_textures; - /* API */ int ntreeTexTagAnimated(struct bNodeTree *ntree); void ntreeTexSetPreviewFlag(int); -int ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, float *dxt, float *dyt, int osatex, short thread, struct Tex *tex, short which_output, int cfra, int preview, struct ShadeInput *shi, struct MTex *mtex); void ntreeTexCheckCyclics(struct bNodeTree *ntree); char* ntreeTexOutputMenu(struct bNodeTree *ntree); +struct bNodeTreeExec *ntreeTexBeginExecTree(struct bNodeTree *ntree); +void ntreeTexEndExecTree(struct bNodeTreeExec *exec); +int ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, float *dxt, float *dyt, int osatex, short thread, struct Tex *tex, short which_output, int cfra, int preview, struct ShadeInput *shi, struct MTex *mtex); + -/**/ +/*************************************************/ void init_nodesystem(void); void free_nodesystem(void); -/**/ - void clear_scene_in_nodes(struct Main *bmain, struct Scene *sce); #endif diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 29615986191..36631d5af90 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -925,7 +925,8 @@ void init_render_material(Material *mat, int r_mode, float *amb) if(mat->nodetree && mat->use_nodes) { init_render_nodetree(mat->nodetree, mat, r_mode, amb); - ntreeBeginExecTree(mat->nodetree); /* has internal flag to detect it only does it once */ + if (!mat->nodetree->execdata) + mat->nodetree->execdata = ntreeShaderBeginExecTree(mat->nodetree); } } @@ -957,8 +958,10 @@ void init_render_materials(Main *bmain, int r_mode, float *amb) /* only needed for nodes now */ void end_render_material(Material *mat) { - if(mat && mat->nodetree && mat->use_nodes) - ntreeEndExecTree(mat->nodetree); /* has internal flag to detect it only does it once */ + if(mat && mat->nodetree && mat->use_nodes) { + if (mat->nodetree->execdata) + ntreeShaderEndExecTree(mat->nodetree->execdata); + } } void end_render_materials(Main *bmain) diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 5f1a6c911bc..6f34383101d 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -46,84 +46,107 @@ #include #include "DNA_anim_types.h" -#include "DNA_action_types.h" #include "DNA_node_types.h" +#include "DNA_scene_types.h" +#include "DNA_action_types.h" +#include "BLI_string.h" +#include "BLI_math.h" #include "BLI_listbase.h" - -#include "RNA_access.h" +#include "BLI_path_util.h" +#include "BLI_utildefines.h" #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_fcurve.h" +#include "BKE_global.h" +#include "BKE_image.h" +#include "BKE_library.h" +#include "BKE_main.h" #include "BKE_node.h" #include "BKE_utildefines.h" +#include "BKE_utildefines.h" -#include "PIL_time.h" - -#include "CMP_node.h" -#include "intern/CMP_util.h" /* stupid include path... */ +#include "BLI_listbase.h" -#include "SHD_node.h" -#include "TEX_node.h" -#include "intern/TEX_util.h" +#include "RNA_access.h" -#include "GPU_material.h" +#include "NOD_socket.h" +#include "NOD_composite.h" +#include "NOD_shader.h" +#include "NOD_texture.h" -static ListBase empty_list = {NULL, NULL}; -ListBase node_all_composit = {NULL, NULL}; -ListBase node_all_shaders = {NULL, NULL}; -ListBase node_all_textures = {NULL, NULL}; -/* ************** Type stuff ********** */ +bNodeTreeType *ntreeGetType(int type) +{ + static bNodeTreeType *types[NUM_NTREE_TYPES]; + static int types_init = 1; + if (types_init) { + types[NTREE_SHADER] = &ntreeType_Shader; + types[NTREE_COMPOSIT] = &ntreeType_Composite; + types[NTREE_TEXTURE] = &ntreeType_Texture; + types_init = 0; + } + + if(type >= 0 && type < NUM_NTREE_TYPES) { + return types[type]; + } + else { + return NULL; + } +} -static bNodeType *node_get_type(bNodeTree *ntree, int type, ID *id) +static bNodeType *node_get_type(bNodeTree *ntree, int type) { - bNodeType *ntype = ntree->alltypes.first; + bNodeType *ntype = ntreeGetType(ntree->type)->node_types.first; for(; ntype; ntype= ntype->next) - if(ntype->type==type && id==ntype->id ) + if(ntype->type==type) return ntype; return NULL; } -void ntreeInitTypes(bNodeTree *ntree) +bNodeType *ntreeGetNodeType(bNodeTree *ntree) { - bNode *node, *next; - - if(ntree->type==NTREE_SHADER) - ntree->alltypes= node_all_shaders; - else if(ntree->type==NTREE_COMPOSIT) - ntree->alltypes= node_all_composit; - else if(ntree->type==NTREE_TEXTURE) - ntree->alltypes= node_all_textures; + return node_get_type(ntree, ntree->nodetype); +} + +bNodeSocketType *ntreeGetSocketType(int type) +{ + static bNodeSocketType *types[NUM_SOCKET_TYPES]= {NULL}; + static int types_init = 1; + + if (types_init) { + node_socket_type_init(types); + types_init= 0; + } + + if(type < NUM_SOCKET_TYPES) { + return types[type]; + } else { - ntree->alltypes= empty_list; - printf("Error: no type definitions for nodes\n"); + return NULL; } +} + +void ntreeInitTypes(bNodeTree *ntree) +{ + bNode *node, *next; for(node= ntree->nodes.first; node; node= next) { next= node->next; + + node->typeinfo= node_get_type(ntree, node->type); + if(node->type==NODE_DYNAMIC) { - bNodeType *stype= NULL; - if(node->id==NULL) { /* empty script node */ - stype= node_get_type(ntree, node->type, NULL); - } else { /* not an empty script node */ - stype= node_get_type(ntree, node->type, node->id); - if(!stype) { - stype= node_get_type(ntree, node->type, NULL); - /* needed info if the pynode script fails now: */ - if (node->id) node->storage= ntree; - } else { - node->custom1= 0; - node->custom1= BSET(node->custom1,NODE_DYNAMIC_ADDEXIST); - } + /* needed info if the pynode script fails now: */ + node->storage= ntree; + if(node->id!=NULL) { /* not an empty script node */ + node->custom1= 0; + node->custom1= BSET(node->custom1,NODE_DYNAMIC_ADDEXIST); } - node->typeinfo= stype; - if(node->typeinfo) - node->typeinfo->initfunc(node); - } else { - node->typeinfo= node_get_type(ntree, node->type, NULL); +// if(node->typeinfo) +// node->typeinfo->initfunc(node); } if(node->typeinfo==NULL) { @@ -135,66 +158,51 @@ void ntreeInitTypes(bNodeTree *ntree) ntree->init |= NTREE_TYPE_INIT; } -/* updates node with (modified) bNodeType.. this should be done for all trees */ -void ntreeUpdateType(bNodeTree *ntree, bNodeType *ntype) +static bNodeSocket *make_socket(bNodeTree *ntree, int in_out, const char *name, int type) { - bNode *node; - - for(node= ntree->nodes.first; node; node= node->next) { - if(node->typeinfo== ntype) { - nodeUpdateType(ntree, node, ntype); - } - } + bNodeSocketType *stype= ntreeGetSocketType(type); + bNodeSocket *sock; + + sock= MEM_callocN(sizeof(bNodeSocket), "sock"); + + BLI_strncpy(sock->name, name, NODE_MAXSTR); + sock->limit = (in_out==SOCK_IN ? 1 : 0xFFF); + sock->type= type; + sock->storage = NULL; + + if (stype->value_structsize > 0) + sock->default_value = MEM_callocN(stype->value_structsize, "default socket value"); + + return sock; } -/* only used internal... we depend on type definitions! */ -static bNodeSocket *node_add_socket_type(ListBase *lb, bNodeSocketType *stype) +bNodeSocket *nodeAddSocket(bNodeTree *ntree, bNode *node, int in_out, const char *name, int type) { - bNodeSocket *sock= MEM_callocN(sizeof(bNodeSocket), "sock"); + bNodeSocket *sock = make_socket(ntree, in_out, name, type); + if (in_out==SOCK_IN) + BLI_addtail(&node->inputs, sock); + else if (in_out==SOCK_OUT) + BLI_addtail(&node->outputs, sock); - BLI_strncpy(sock->name, stype->name, NODE_MAXSTR); - if(stype->limit==0) sock->limit= 0xFFF; - else sock->limit= stype->limit; - sock->type= stype->type; + ntree->update |= NTREE_UPDATE_NODES; - sock->ns.vec[0]= stype->val1; - sock->ns.vec[1]= stype->val2; - sock->ns.vec[2]= stype->val3; - sock->ns.vec[3]= stype->val4; - sock->ns.min= stype->min; - sock->ns.max= stype->max; - - if(lb) - BLI_addtail(lb, sock); - return sock; } -static bNodeSocket *node_add_group_socket(ListBase *lb, bNodeSocket *gsock) +bNodeSocket *nodeInsertSocket(bNodeTree *ntree, bNode *node, int in_out, bNodeSocket *next_sock, const char *name, int type) { - bNodeSocket *sock= MEM_callocN(sizeof(bNodeSocket), "sock"); + bNodeSocket *sock = make_socket(ntree, in_out, name, type); + if (in_out==SOCK_IN) + BLI_insertlinkbefore(&node->inputs, next_sock, sock); + else if (in_out==SOCK_OUT) + BLI_insertlinkbefore(&node->outputs, next_sock, sock); - /* make a copy of the group socket */ - *sock = *gsock; - sock->link = NULL; - sock->next = sock->prev = NULL; - sock->new_sock = NULL; - sock->ns.data = NULL; + ntree->update |= NTREE_UPDATE_NODES; - sock->own_index = gsock->own_index; - sock->groupsock = gsock; - /* XXX hack: group socket input/output roles are inverted internally, - * need to change the limit value when making actual node sockets from them. - */ - sock->limit = (gsock->limit==1 ? 0xFFF : 1); - - if(lb) - BLI_addtail(lb, sock); - return sock; } -static void node_rem_socket(bNodeTree *ntree, ListBase *lb, bNodeSocket *sock) +void nodeRemoveSocket(bNodeTree *ntree, bNode *node, bNodeSocket *sock) { bNodeLink *link, *next; @@ -205,428 +213,42 @@ static void node_rem_socket(bNodeTree *ntree, ListBase *lb, bNodeSocket *sock) } } - BLI_remlink(lb, sock); - MEM_freeN(sock); -} - -static bNodeSocket *verify_socket(ListBase *lb, bNodeSocketType *stype) -{ - bNodeSocket *sock; - - for(sock= lb->first; sock; sock= sock->next) { - if(strncmp(sock->name, stype->name, NODE_MAXSTR)==0) - break; - } - if(sock) { - sock->type= stype->type; /* in future, read this from tydefs! */ - if(stype->limit==0) sock->limit= 0xFFF; - else sock->limit= stype->limit; - - sock->ns.min= stype->min; - sock->ns.max= stype->max; - - BLI_remlink(lb, sock); - - return sock; - } - else { - return node_add_socket_type(NULL, stype); - } -} - -static bNodeSocket *verify_group_socket(ListBase *lb, bNodeSocket *gsock) -{ - bNodeSocket *sock; - - for(sock= lb->first; sock; sock= sock->next) { - if(sock->own_index==gsock->own_index) - break; - } - if(sock) { - sock->groupsock = gsock; - - strcpy(sock->name, gsock->name); - sock->type= gsock->type; - - /* XXX hack: group socket input/output roles are inverted internally, - * need to change the limit value when making actual node sockets from them. - */ - sock->limit = (gsock->limit==1 ? 0xFFF : 1); - - sock->ns.min= gsock->ns.min; - sock->ns.max= gsock->ns.max; - - BLI_remlink(lb, sock); - - return sock; - } - else { - return node_add_group_socket(NULL, gsock); - } -} - -static void verify_socket_list(bNodeTree *ntree, ListBase *lb, bNodeSocketType *stype_first) -{ - bNodeSocketType *stype; - - /* no inputs anymore? */ - if(stype_first==NULL) { - while(lb->first) - node_rem_socket(ntree, lb, lb->first); - } - else { - /* step by step compare */ - stype= stype_first; - while(stype->type != -1) { - stype->sock= verify_socket(lb, stype); - stype++; - } - /* leftovers are removed */ - while(lb->first) - node_rem_socket(ntree, lb, lb->first); - /* and we put back the verified sockets */ - stype= stype_first; - while(stype->type != -1) { - BLI_addtail(lb, stype->sock); - stype++; - } - } -} - -static void verify_group_socket_list(bNodeTree *ntree, ListBase *lb, ListBase *glb) -{ - bNodeSocket *gsock; - - /* step by step compare */ - for (gsock= glb->first; gsock; gsock=gsock->next) { - /* abusing new_sock pointer for verification here! only used inside this function */ - gsock->new_sock= verify_group_socket(lb, gsock); - } - /* leftovers are removed */ - while(lb->first) - node_rem_socket(ntree, lb, lb->first); - /* and we put back the verified sockets */ - for (gsock= glb->first; gsock; gsock=gsock->next) { - BLI_addtail(lb, gsock->new_sock); - gsock->new_sock = NULL; - } -} - -void nodeVerifyType(bNodeTree *ntree, bNode *node) -{ - /* node groups don't have static sock lists, but use external sockets from the tree instead */ - if (node->type==NODE_GROUP) { - bNodeTree *ngroup= (bNodeTree*)node->id; - if (ngroup) { - verify_group_socket_list(ntree, &node->inputs, &ngroup->inputs); - verify_group_socket_list(ntree, &node->outputs, &ngroup->outputs); - } - } - else { - bNodeType *ntype= node->typeinfo; - if(ntype) { - verify_socket_list(ntree, &node->inputs, ntype->inputs); - verify_socket_list(ntree, &node->outputs, ntype->outputs); - } - } -} - -void ntreeVerifyTypes(bNodeTree *ntree) -{ - bNode *node; - - /* if((ntree->init & NTREE_TYPE_INIT)==0) */ - ntreeInitTypes(ntree); - - /* check inputs and outputs, and remove or insert them */ - for(node= ntree->nodes.first; node; node= node->next) - nodeVerifyType(ntree, node); + /* this is fast, this way we don't need an in_out argument */ + BLI_remlink(&node->inputs, sock); + BLI_remlink(&node->outputs, sock); -} - -/* ************** Group stuff ********** */ - -/* XXX group typeinfo struct is used directly in ntreeMakeOwnType, needs cleanup */ -static bNodeType ntype_group; - -/* groups display their internal tree name as label */ -static const char *group_label(bNode *node) -{ - return (node->id)? node->id->name+2: "Missing Datablock"; -} - -void register_node_type_group(ListBase *lb) -{ - node_type_base(&ntype_group, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS, NULL, NULL); - node_type_size(&ntype_group, 120, 60, 200); - node_type_label(&ntype_group, group_label); + if (sock->default_value) + MEM_freeN(sock->default_value); + MEM_freeN(sock); - nodeRegisterType(lb, &ntype_group); + ntree->update |= NTREE_UPDATE_NODES; } -static bNodeSocket *find_group_node_input(bNode *gnode, bNodeSocket *gsock) +void nodeRemoveAllSockets(bNodeTree *ntree, bNode *node) { bNodeSocket *sock; - for (sock=gnode->inputs.first; sock; sock=sock->next) - if (sock->groupsock == gsock) - return sock; - return NULL; -} - -static bNodeSocket *find_group_node_output(bNode *gnode, bNodeSocket *gsock) -{ - bNodeSocket *sock; - for (sock=gnode->outputs.first; sock; sock=sock->next) - if (sock->groupsock == gsock) - return sock; - return NULL; -} - -bNode *nodeMakeGroupFromSelected(bNodeTree *ntree) -{ - bNodeLink *link, *linkn; - bNode *node, *gnode, *nextn; - bNodeTree *ngroup; - bNodeSocket *gsock; - ListBase anim_basepaths = {NULL, NULL}; - float min[2], max[2]; - int totnode=0; - - INIT_MINMAX2(min, max); - - /* is there something to group? also do some clearing */ - for(node= ntree->nodes.first; node; node= node->next) { - if(node->flag & NODE_SELECT) { - /* no groups in groups */ - if(node->type==NODE_GROUP) - return NULL; - DO_MINMAX2( (&node->locx), min, max); - totnode++; - } - node->done= 0; - } - if(totnode==0) return NULL; - - /* check if all connections are OK, no unselected node has both - inputs and outputs to a selection */ - for(link= ntree->links.first; link; link= link->next) { - if(link->fromnode && link->tonode && link->fromnode->flag & NODE_SELECT) - link->tonode->done |= 1; - if(link->fromnode && link->tonode && link->tonode->flag & NODE_SELECT) - link->fromnode->done |= 2; - } - - for(node= ntree->nodes.first; node; node= node->next) { - if((node->flag & NODE_SELECT)==0) - if(node->done==3) - break; - } - if(node) - return NULL; + bNodeLink *link, *next; - /* OK! new nodetree */ - ngroup= ntreeAddTree("NodeGroup", ntree->type, TRUE); - - /* move nodes over */ - for(node= ntree->nodes.first; node; node= nextn) { - nextn= node->next; - if(node->flag & NODE_SELECT) { - /* keep track of this node's RNA "base" path (the part of the pat identifying the node) - * if the old nodetree has animation data which potentially covers this node - */ - if (ntree->adt) { - PointerRNA ptr; - char *path; - - RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); - path = RNA_path_from_ID_to_struct(&ptr); - - if (path) - BLI_addtail(&anim_basepaths, BLI_genericNodeN(path)); - } - - /* change node-collection membership */ - BLI_remlink(&ntree->nodes, node); - BLI_addtail(&ngroup->nodes, node); - - node->locx-= 0.5f*(min[0]+max[0]); - node->locy-= 0.5f*(min[1]+max[1]); - } - } - - /* move animation data over */ - if (ntree->adt) { - LinkData *ld, *ldn=NULL; - - BKE_animdata_separate_by_basepath(&ntree->id, &ngroup->id, &anim_basepaths); - - /* paths + their wrappers need to be freed */ - for (ld = anim_basepaths.first; ld; ld = ldn) { - ldn = ld->next; - - MEM_freeN(ld->data); - BLI_freelinkN(&anim_basepaths, ld); + for(link= ntree->links.first; link; link= next) { + next= link->next; + if(link->fromnode==node || link->tonode==node) { + nodeRemLink(ntree, link); } } - /* make group node */ - gnode= nodeAddNodeType(ntree, NODE_GROUP, ngroup, NULL); - gnode->locx= 0.5f*(min[0]+max[0]); - gnode->locy= 0.5f*(min[1]+max[1]); + for (sock=node->inputs.first; sock; sock=sock->next) + if (sock->default_value) + MEM_freeN(sock->default_value); + BLI_freelistN(&node->inputs); + for (sock=node->outputs.first; sock; sock=sock->next) + if (sock->default_value) + MEM_freeN(sock->default_value); - /* relink external sockets */ - for(link= ntree->links.first; link; link= linkn) { - linkn= link->next; - - if(link->fromnode && link->tonode && (link->fromnode->flag & link->tonode->flag & NODE_SELECT)) { - BLI_remlink(&ntree->links, link); - BLI_addtail(&ngroup->links, link); - } - else if(link->tonode && (link->tonode->flag & NODE_SELECT)) { - gsock = nodeGroupExposeSocket(ngroup, link->tosock, SOCK_IN); - link->tosock->link = nodeAddLink(ngroup, NULL, gsock, link->tonode, link->tosock); - link->tosock = node_add_group_socket(&gnode->inputs, gsock); - link->tonode = gnode; - } - else if(link->fromnode && (link->fromnode->flag & NODE_SELECT)) { - /* search for existing group node socket */ - for (gsock=ngroup->outputs.first; gsock; gsock=gsock->next) - if (gsock->link && gsock->link->fromsock==link->fromsock) - break; - if (!gsock) { - gsock = nodeGroupExposeSocket(ngroup, link->fromsock, SOCK_OUT); - gsock->link = nodeAddLink(ngroup, link->fromnode, link->fromsock, NULL, gsock); - link->fromsock = node_add_group_socket(&gnode->outputs, gsock); - } - else - link->fromsock = find_group_node_output(gnode, gsock); - link->fromnode = gnode; - } - } - - /* update node levels */ - ntreeSolveOrder(ntree); - - return gnode; -} - -/* here's a nasty little one, need to check users... */ -/* should become callbackable... */ -void nodeGroupVerify(bNodeTree *ngroup) -{ - /* group changed, so we rebuild the type definition */ -// ntreeMakeGroupSockets(ngroup); + BLI_freelistN(&node->outputs); - if(ngroup->type==NTREE_SHADER) { - Material *ma; - for(ma= G.main->mat.first; ma; ma= ma->id.next) { - if(ma->nodetree) { - bNode *node; - for(node= ma->nodetree->nodes.first; node; node= node->next) - if(node->id == (ID *)ngroup) - nodeVerifyType(ma->nodetree, node); - } - } - } - else if(ngroup->type==NTREE_COMPOSIT) { - Scene *sce; - for(sce= G.main->scene.first; sce; sce= sce->id.next) { - if(sce->nodetree) { - bNode *node; - for(node= sce->nodetree->nodes.first; node; node= node->next) - if(node->id == (ID *)ngroup) - nodeVerifyType(sce->nodetree, node); - } - } - } - else if(ngroup->type==NTREE_TEXTURE) { - Tex *tx; - for(tx= G.main->tex.first; tx; tx= tx->id.next) { - if(tx->nodetree) { - bNode *node; - for(node= tx->nodetree->nodes.first; node; node= node->next) - if(node->id == (ID *)ngroup) - nodeVerifyType(tx->nodetree, node); - } - } - } + ntree->update |= NTREE_UPDATE_NODES; } -/* also to check all users of groups. Now only used in editor for hide/unhide */ -/* should become callbackable? */ -void nodeGroupSocketUseFlags(bNodeTree *ngroup) -{ - bNode *node; - bNodeSocket *sock; - - /* clear flags */ - for(node= ngroup->nodes.first; node; node= node->next) { - for(sock= node->inputs.first; sock; sock= sock->next) - sock->flag &= ~SOCK_IN_USE; - for(sock= node->outputs.first; sock; sock= sock->next) - sock->flag &= ~SOCK_IN_USE; - } - - /* tag all thats in use */ - if(ngroup->type==NTREE_SHADER) { - Material *ma; - for(ma= G.main->mat.first; ma; ma= ma->id.next) { - if(ma->nodetree) { - for(node= ma->nodetree->nodes.first; node; node= node->next) { - if(node->id==&ngroup->id) { - for(sock= node->inputs.first; sock; sock= sock->next) - if(sock->link) - if(sock->groupsock) - sock->groupsock->flag |= SOCK_IN_USE; - for(sock= node->outputs.first; sock; sock= sock->next) - if(nodeCountSocketLinks(ma->nodetree, sock)) - if(sock->groupsock) - sock->groupsock->flag |= SOCK_IN_USE; - } - } - } - } - } - else if(ngroup->type==NTREE_COMPOSIT) { - Scene *sce; - for(sce= G.main->scene.first; sce; sce= sce->id.next) { - if(sce->nodetree) { - for(node= sce->nodetree->nodes.first; node; node= node->next) { - if(node->id==(ID *)ngroup) { - for(sock= node->inputs.first; sock; sock= sock->next) - if(sock->link) - if(sock->groupsock) - sock->groupsock->flag |= SOCK_IN_USE; - for(sock= node->outputs.first; sock; sock= sock->next) - if(nodeCountSocketLinks(sce->nodetree, sock)) - if(sock->groupsock) - sock->groupsock->flag |= SOCK_IN_USE; - } - } - } - } - } - else if(ngroup->type==NTREE_TEXTURE) { - Tex *tx; - for(tx= G.main->tex.first; tx; tx= tx->id.next) { - if(tx->nodetree) { - for(node= tx->nodetree->nodes.first; node; node= node->next) { - if(node->id==(ID *)ngroup) { - for(sock= node->inputs.first; sock; sock= sock->next) - if(sock->link) - if(sock->groupsock) - sock->groupsock->flag |= SOCK_IN_USE; - for(sock= node->outputs.first; sock; sock= sock->next) - if(nodeCountSocketLinks(tx->nodetree, sock)) - if(sock->groupsock) - sock->groupsock->flag |= SOCK_IN_USE; - } - } - } - } - } - -} /* finds a node based on its name */ bNode *nodeFindNodebyName(bNodeTree *ntree, const char *name) { @@ -669,341 +291,70 @@ int nodeFindNode(bNodeTree *ntree, bNodeSocket *sock, bNode **nodep, int *sockin return 0; } -/* returns 1 if its OK */ -int nodeGroupUnGroup(bNodeTree *ntree, bNode *gnode) +/* ************** Add stuff ********** */ +static void node_add_sockets_from_type(bNodeTree *ntree, bNode *node, bNodeType *ntype) { - bNodeLink *link, *linkn; - bNode *node, *nextn; - bNodeTree *ngroup, *wgroup; - ListBase anim_basepaths = {NULL, NULL}; - - ngroup= (bNodeTree *)gnode->id; - if(ngroup==NULL) return 0; - - /* clear new pointers, set in copytree */ - for(node= ntree->nodes.first; node; node= node->next) - node->new_node= NULL; - - /* wgroup is a temporary copy of the NodeTree we're merging in - * - all of wgroup's nodes are transferred across to their new home - * - ngroup (i.e. the source NodeTree) is left unscathed - */ - wgroup= ntreeCopyTree(ngroup); - - /* add the nodes into the ntree */ - for(node= wgroup->nodes.first; node; node= nextn) { - nextn= node->next; - - /* keep track of this node's RNA "base" path (the part of the pat identifying the node) - * if the old nodetree has animation data which potentially covers this node - */ - if (wgroup->adt) { - PointerRNA ptr; - char *path; - - RNA_pointer_create(&wgroup->id, &RNA_Node, node, &ptr); - path = RNA_path_from_ID_to_struct(&ptr); + bNodeSocketTemplate *sockdef; + bNodeSocket *sock; + + if(ntype->inputs) { + sockdef= ntype->inputs; + while(sockdef->type != -1) { + sock = node_add_input_from_template(ntree, node, sockdef); - if (path) - BLI_addtail(&anim_basepaths, BLI_genericNodeN(path)); - } - - /* migrate node */ - BLI_remlink(&wgroup->nodes, node); - BLI_addtail(&ntree->nodes, node); - - node->locx+= gnode->locx; - node->locy+= gnode->locy; - - node->flag |= NODE_SELECT; - } - - /* restore external links to and from the gnode */ - for(link= ntree->links.first; link; link= link->next) { - if (link->fromnode==gnode) { - if (link->fromsock->groupsock) { - bNodeSocket *gsock= link->fromsock->groupsock; - if (gsock->link) { - if (gsock->link->fromnode) { - /* NB: using the new internal copies here! the groupsock pointer still maps to the old tree */ - link->fromnode = (gsock->link->fromnode ? gsock->link->fromnode->new_node : NULL); - link->fromsock = gsock->link->fromsock->new_sock; - } - else { - /* group output directly maps to group input */ - bNodeSocket *insock= find_group_node_input(gnode, gsock->link->fromsock); - if (insock->link) { - link->fromnode = insock->link->fromnode; - link->fromsock = insock->link->fromsock; - } - } - } - else { - /* constant group output: copy the stack value to the external socket. - * the link is kept here until all possible external users have been fixed. - */ - QUATCOPY(link->tosock->ns.vec, gsock->ns.vec); - } - } - } - } - /* remove internal output links, these are not used anymore */ - for(link=wgroup->links.first; link; link= linkn) { - linkn = link->next; - if (!link->tonode) - nodeRemLink(wgroup, link); - } - /* restore links from internal nodes */ - for(link= wgroup->links.first; link; link= link->next) { - /* indicates link to group input */ - if (!link->fromnode) { - /* NB: can't use find_group_node_input here, - * because gnode sockets still point to the old tree! - */ - bNodeSocket *insock; - for (insock= gnode->inputs.first; insock; insock= insock->next) - if (insock->groupsock->new_sock == link->fromsock) - break; - if (insock->link) { - link->fromnode = insock->link->fromnode; - link->fromsock = insock->link->fromsock; - } - else { - /* uses group constant input. copy the input value and remove the dead link. */ - QUATCOPY(link->tosock->ns.vec, insock->ns.vec); - nodeRemLink(wgroup, link); - } + sockdef++; } } - - /* add internal links to the ntree */ - for(link= wgroup->links.first; link; link= linkn) { - linkn= link->next; - BLI_remlink(&wgroup->links, link); - BLI_addtail(&ntree->links, link); - } - - /* and copy across the animation */ - if (wgroup->adt) { - LinkData *ld, *ldn=NULL; - bAction *waction; - - /* firstly, wgroup needs to temporary dummy action that can be destroyed, as it shares copies */ - waction = wgroup->adt->action = copy_action(wgroup->adt->action); - - /* now perform the moving */ - BKE_animdata_separate_by_basepath(&wgroup->id, &ntree->id, &anim_basepaths); - - /* paths + their wrappers need to be freed */ - for (ld = anim_basepaths.first; ld; ld = ldn) { - ldn = ld->next; + if(ntype->outputs) { + sockdef= ntype->outputs; + while(sockdef->type != -1) { + sock = node_add_output_from_template(ntree, node, sockdef); - MEM_freeN(ld->data); - BLI_freelinkN(&anim_basepaths, ld); + sockdef++; } - - /* free temp action too */ - free_libblock(&G.main->action, waction); } - - /* delete the group instance. this also removes old input links! */ - nodeFreeNode(ntree, gnode); - - /* free the group tree (takes care of user count) */ - free_libblock(&G.main->nodetree, wgroup); - - /* solve order goes fine, but the level tags not... doing it twice works for now. solve this once */ - /* XXX is this still necessary with new groups? it may have been caused by non-updated sock->link pointers. lukas */ - ntreeSolveOrder(ntree); - ntreeSolveOrder(ntree); - - return 1; } -void nodeGroupCopy(bNode *gnode) -{ - bNodeSocket *sock; - - gnode->id->us--; - gnode->id= (ID *)ntreeCopyTree((bNodeTree *)gnode->id); - - /* new_sock was set in nodeCopyNode */ - for(sock=gnode->inputs.first; sock; sock=sock->next) - if(sock->groupsock) - sock->groupsock= sock->groupsock->new_sock; - - for(sock=gnode->outputs.first; sock; sock=sock->next) - if(sock->groupsock) - sock->groupsock= sock->groupsock->new_sock; -} - -bNodeSocket *nodeGroupAddSocket(bNodeTree *ngroup, const char *name, int type, int in_out) -{ - bNodeSocket *gsock = MEM_callocN(sizeof(bNodeSocket), "bNodeSocket"); - - strncpy(gsock->name, name, sizeof(gsock->name)); - gsock->type = type; - gsock->ns.sockettype = type; - gsock->ns.min = INT_MIN; - gsock->ns.max = INT_MAX; - zero_v4(gsock->ns.vec); - gsock->ns.data = NULL; - gsock->flag = 0; - - gsock->next = gsock->prev = NULL; - gsock->new_sock = NULL; - gsock->link = NULL; - gsock->ns.data = NULL; - /* assign new unique index */ - gsock->own_index = ngroup->cur_index++; - gsock->limit = (in_out==SOCK_IN ? 0xFFF : 1); - - BLI_addtail(in_out==SOCK_IN ? &ngroup->inputs : &ngroup->outputs, gsock); - - return gsock; -} - -bNodeSocket *nodeGroupExposeSocket(bNodeTree *ngroup, bNodeSocket *sock, int in_out) -{ - bNodeSocket *gsock= nodeGroupAddSocket(ngroup, sock->name, sock->type, in_out); - /* initialize the default socket value */ - QUATCOPY(gsock->ns.vec, sock->ns.vec); - return gsock; -} - -void nodeGroupExposeAllSockets(bNodeTree *ngroup) -{ - bNode *node; - bNodeSocket *sock, *gsock; - - for (node=ngroup->nodes.first; node; node=node->next) { - for (sock=node->inputs.first; sock; sock=sock->next) { - if (!sock->link && !(sock->flag & SOCK_HIDDEN)) { - gsock = nodeGroupAddSocket(ngroup, sock->name, sock->type, SOCK_IN); - /* initialize the default socket value */ - QUATCOPY(gsock->ns.vec, sock->ns.vec); - sock->link = nodeAddLink(ngroup, NULL, gsock, node, sock); - } - } - for (sock=node->outputs.first; sock; sock=sock->next) { - if (nodeCountSocketLinks(ngroup, sock)==0 && !(sock->flag & SOCK_HIDDEN)) { - gsock = nodeGroupAddSocket(ngroup, sock->name, sock->type, SOCK_OUT); - /* initialize the default socket value */ - QUATCOPY(gsock->ns.vec, sock->ns.vec); - gsock->link = nodeAddLink(ngroup, node, sock, NULL, gsock); - } - } - } -} - -void nodeGroupRemoveSocket(bNodeTree *ngroup, bNodeSocket *gsock, int in_out) -{ - nodeRemSocketLinks(ngroup, gsock); - switch (in_out) { - case SOCK_IN: BLI_remlink(&ngroup->inputs, gsock); break; - case SOCK_OUT: BLI_remlink(&ngroup->outputs, gsock); break; - } - MEM_freeN(gsock); -} - -/* ************** Add stuff ********** */ -void nodeAddSockets(bNode *node, bNodeType *ntype) -{ - if (node->type==NODE_GROUP) { - bNodeTree *ntree= (bNodeTree*)node->id; - if (ntree) { - bNodeSocket *gsock; - for (gsock=ntree->inputs.first; gsock; gsock=gsock->next) - node_add_group_socket(&node->inputs, gsock); - for (gsock=ntree->outputs.first; gsock; gsock=gsock->next) - node_add_group_socket(&node->outputs, gsock); - } - } - else { - bNodeSocketType *stype; - - if(ntype->inputs) { - stype= ntype->inputs; - while(stype->type != -1) { - node_add_socket_type(&node->inputs, stype); - stype++; - } - } - if(ntype->outputs) { - stype= ntype->outputs; - while(stype->type != -1) { - node_add_socket_type(&node->outputs, stype); - stype++; - } - } - } -} - -/* Find the first available, non-duplicate name for a given node */ -void nodeUniqueName(bNodeTree *ntree, bNode *node) +/* Find the first available, non-duplicate name for a given node */ +void nodeUniqueName(bNodeTree *ntree, bNode *node) { BLI_uniquename(&ntree->nodes, node, "Node", '.', offsetof(bNode, name), sizeof(node->name)); } -bNode *nodeAddNodeType(bNodeTree *ntree, int type, bNodeTree *ngroup, ID *id) +bNode *nodeAddNode(bNodeTree *ntree, struct bNodeTemplate *ntemp) { - bNode *node= NULL; - bNodeType *ntype= NULL; - - if (ngroup && BLI_findindex(&G.main->nodetree, ngroup)==-1) { - printf("nodeAddNodeType() error: '%s' not in main->nodetree\n", ngroup->id.name); - return NULL; - } - - if(type>=NODE_DYNAMIC_MENU) { - int a=0, idx= type-NODE_DYNAMIC_MENU; - ntype= ntree->alltypes.first; - while(ntype) { - if(ntype->type==NODE_DYNAMIC) { - if(a==idx) - break; - a++; - } - ntype= ntype->next; - } - } else - ntype= node_get_type(ntree, type, id); - + bNode *node; + bNodeType *ntype; + + ntype= node_get_type(ntree, ntemp->type); if(ntype == NULL) { - printf("nodeAddNodeType() error: '%d' type invalid\n", type); + printf("nodeAddNodeType() error: '%d' type invalid\n", ntemp->type); return NULL; } - - node= MEM_callocN(sizeof(bNode), "new node"); - BLI_addtail(&ntree->nodes, node); - node->typeinfo= ntype; - if(type>=NODE_DYNAMIC_MENU) - node->custom2= type; /* for node_dynamic_init */ - - if(ngroup) - BLI_strncpy(node->name, ngroup->id.name+2, NODE_MAXSTR); - else if(type>NODE_DYNAMIC_MENU) { - BLI_strncpy(node->name, ntype->id->name+2, NODE_MAXSTR); - } - else - BLI_strncpy(node->name, ntype->name, NODE_MAXSTR); - - nodeUniqueName(ntree, node); + /* validity check */ + if (!nodeValid(ntree, ntemp)) + return NULL; + node= MEM_callocN(sizeof(bNode), "new node"); node->type= ntype->type; + node->typeinfo= ntype; node->flag= NODE_SELECT|ntype->flag; node->width= ntype->width; - node->miniwidth= 42.0f; /* small value only, allows print of first chars */ - - if(type==NODE_GROUP) - node->id= (ID *)ngroup; - - /* need init handler later? */ - /* got it-bob*/ + node->miniwidth= 42.0f; + node->height= ntype->height; + + node_add_sockets_from_type(ntree, node, ntype); + if(ntype->initfunc!=NULL) - ntype->initfunc(node); + ntype->initfunc(ntree, node, ntemp); - nodeAddSockets(node, ntype); + /* initialize the node name with the node label */ + BLI_strncpy(node->name, nodeLabel(node), NODE_MAXSTR); + nodeUniqueName(ntree, node); + + BLI_addtail(&ntree->nodes, node); + + ntree->update |= NTREE_UPDATE_NODES; return node; } @@ -1011,9 +362,9 @@ bNode *nodeAddNodeType(bNodeTree *ntree, int type, bNodeTree *ngroup, ID *id) void nodeMakeDynamicType(bNode *node) { /* find SH_DYNAMIC_NODE ntype */ - bNodeType *ntype= node_all_shaders.first; + bNodeType *ntype= ntreeGetType(NTREE_SHADER)->node_types.first; while(ntype) { - if(ntype->type==NODE_DYNAMIC && ntype->id==NULL) + if(ntype->type==NODE_DYNAMIC) break; ntype= ntype->next; } @@ -1023,17 +374,11 @@ void nodeMakeDynamicType(bNode *node) /*node->typeinfo= MEM_dupallocN(ntype);*/ bNodeType *newtype= MEM_callocN(sizeof(bNodeType), "dynamic bNodeType"); *newtype= *ntype; - newtype->name= BLI_strdup(ntype->name); + strcpy(newtype->name, ntype->name); node->typeinfo= newtype; } } -void nodeUpdateType(bNodeTree *ntree, bNode* node, bNodeType *ntype) -{ - verify_socket_list(ntree, &node->inputs, ntype->inputs); - verify_socket_list(ntree, &node->outputs, ntype->outputs); -} - /* keep socket listorder identical, for copying links */ /* ntree is the target tree */ bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node) @@ -1045,19 +390,23 @@ bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node) nodeUniqueName(ntree, nnode); BLI_addtail(&ntree->nodes, nnode); - + BLI_duplicatelist(&nnode->inputs, &node->inputs); oldsock= node->inputs.first; for(sock= nnode->inputs.first; sock; sock= sock->next, oldsock= oldsock->next) { oldsock->new_sock= sock; + sock->stack_index= 0; + + sock->default_value = (oldsock->default_value ? MEM_dupallocN(oldsock->default_value) : NULL); } BLI_duplicatelist(&nnode->outputs, &node->outputs); oldsock= node->outputs.first; for(sock= nnode->outputs.first; sock; sock= sock->next, oldsock= oldsock->next) { - sock->stack_index= 0; - sock->ns.data= NULL; oldsock->new_sock= sock; + sock->stack_index= 0; + + sock->default_value = (oldsock->default_value ? MEM_dupallocN(oldsock->default_value) : NULL); } /* don't increase node->id users, freenode doesn't decrement either */ @@ -1069,10 +418,11 @@ bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node) nnode->new_node= NULL; nnode->preview= NULL; + ntree->update |= NTREE_UPDATE_NODES; + return nnode; } -/* fromsock and tosock can be NULL */ /* also used via rna api, so we check for proper input output direction */ bNodeLink *nodeAddLink(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, bNode *tonode, bNodeSocket *tosock) { @@ -1095,6 +445,21 @@ bNodeLink *nodeAddLink(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, from= -1; /* OK but flip */ } } + else { + /* check tree sockets */ + for(sock= ntree->inputs.first; sock; sock= sock->next) + if(sock==fromsock) + break; + if(sock) + from= 1; /* OK */ + else { + for(sock= ntree->outputs.first; sock; sock= sock->next) + if(sock==fromsock) + break; + if(sock) + from= -1; /* OK but flip */ + } + } if(tonode) { for(sock= tonode->inputs.first; sock; sock= sock->next) if(sock==tosock) @@ -1109,8 +474,22 @@ bNodeLink *nodeAddLink(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, to= -1; /* OK but flip */ } } + else { + /* check tree sockets */ + for(sock= ntree->outputs.first; sock; sock= sock->next) + if(sock==tosock) + break; + if(sock) + to= 1; /* OK */ + else { + for(sock= ntree->inputs.first; sock; sock= sock->next) + if(sock==tosock) + break; + if(sock) + to= -1; /* OK but flip */ + } + } - /* this allows NULL sockets to work */ if(from >= 0 && to >= 0) { link= MEM_callocN(sizeof(bNodeLink), "link"); BLI_addtail(&ntree->links, link); @@ -1128,6 +507,8 @@ bNodeLink *nodeAddLink(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, link->tosock= fromsock; } + ntree->update |= NTREE_UPDATE_LINKS; + return link; } @@ -1137,6 +518,8 @@ void nodeRemLink(bNodeTree *ntree, bNodeLink *link) if(link->tosock) link->tosock->link= NULL; MEM_freeN(link); + + ntree->update |= NTREE_UPDATE_LINKS; } void nodeRemSocketLinks(bNodeTree *ntree, bNodeSocket *sock) @@ -1149,26 +532,73 @@ void nodeRemSocketLinks(bNodeTree *ntree, bNodeSocket *sock) nodeRemLink(ntree, link); } } + + ntree->update |= NTREE_UPDATE_LINKS; } +/* transforms node location to area coords */ +void nodeSpaceCoords(bNode *node, float *locx, float *locy) +{ + if (node->parent) { + nodeSpaceCoords(node->parent, locx, locy); + *locx += node->locx; + *locy += node->locy; + } + else { + *locx = node->locx; + *locy = node->locy; + } +} -bNodeTree *ntreeAddTree(const char *name, int type, const short is_group) +void nodeAttachNode(bNode *node, bNode *parent) { - bNodeTree *ntree; + float parentx, parenty; + + node->parent = parent; + /* transform to parent space */ + nodeSpaceCoords(parent, &parentx, &parenty); + node->locx -= parentx; + node->locy -= parenty; +} - if (is_group) - ntree= alloc_libblock(&G.main->nodetree, ID_NT, name); - else { +void nodeDetachNode(struct bNode *node) +{ + float parentx, parenty; + + if (node->parent) { + /* transform to "global" (area) space */ + nodeSpaceCoords(node->parent, &parentx, &parenty); + node->locx += parentx; + node->locy += parenty; + node->parent = NULL; + } +} + +bNodeTree *ntreeAddTree(const char *name, int type, int nodetype) +{ + bNodeTree *ntree; + bNodeType *ntype; + + /* trees are created as local trees if they of compositor, material or texture type, + * node groups and other tree types are created as library data. + */ + if (ELEM3(type, NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE) && nodetype==0) { ntree= MEM_callocN(sizeof(bNodeTree), "new node tree"); *( (short *)ntree->id.name )= ID_NT; /* not "type", as that is ntree->type */ BLI_strncpy(ntree->id.name+2, name, sizeof(ntree->id.name)); } - + else + ntree= alloc_libblock(&G.main->nodetree, ID_NT, name); + ntree->type= type; - ntree->alltypes.first = NULL; - ntree->alltypes.last = NULL; - + ntree->nodetype = nodetype; + ntreeInitTypes(ntree); + + ntype = node_get_type(ntree, ntree->nodetype); + if (ntype && ntype->inittreefunc) + ntype->inittreefunc(ntree); + return ntree; } @@ -1199,9 +629,7 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree) id_us_plus((ID *)newtree->gpd); /* in case a running nodetree is copied */ - newtree->init &= ~(NTREE_EXEC_INIT); - newtree->threadstack= NULL; - newtree->stack= NULL; + newtree->execdata= NULL; newtree->nodes.first= newtree->nodes.last= NULL; newtree->links.first= newtree->links.last= NULL; @@ -1210,7 +638,10 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree) for(node= ntree->nodes.first; node; node= node->next) { node->new_node= NULL; nnode= nodeCopyNode(newtree, node); /* sets node->new */ - if(node==last) break; + + /* make sure we don't copy new nodes again! */ + if (node==last) + break; } /* socket definition for group usage */ @@ -1218,14 +649,15 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree) for(gsock= newtree->inputs.first, oldgsock= ntree->inputs.first; gsock; gsock=gsock->next, oldgsock=oldgsock->next) { oldgsock->new_sock= gsock; gsock->groupsock = (oldgsock->groupsock ? oldgsock->groupsock->new_sock : NULL); + gsock->default_value = (oldgsock->default_value ? MEM_dupallocN(oldgsock->default_value) : NULL); } - BLI_duplicatelist(&newtree->outputs, &ntree->outputs); for(gsock= newtree->outputs.first, oldgsock= ntree->outputs.first; gsock; gsock=gsock->next, oldgsock=oldgsock->next) { oldgsock->new_sock= gsock; gsock->groupsock = (oldgsock->groupsock ? oldgsock->groupsock->new_sock : NULL); + gsock->default_value = (oldgsock->default_value ? MEM_dupallocN(oldgsock->default_value) : NULL); } - + /* copy links */ BLI_duplicatelist(&newtree->links, &ntree->links); for(link= newtree->links.first; link; link= link->next) { @@ -1237,7 +669,13 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree) if (link->tosock) link->tosock->link = link; } - + + /* update node->parent pointers */ + for (node=newtree->nodes.first; node; node=node->next) { + if (node->parent) + node->parent = node->parent->new_node; + } + return newtree; } @@ -1256,7 +694,7 @@ void ntreeSwitchID(bNodeTree *ntree, ID *id_from, ID *id_to) /* *************** preview *********** */ /* if node->preview, then we assume the rect to exist */ -static void node_free_preview(bNode *node) +void nodeFreePreview(bNode *node) { if(node->preview) { if(node->preview->rect) @@ -1360,7 +798,6 @@ void nodeAddToPreview(bNode *node, float *col, int x, int y, int do_manage) } } - /* ************** Free stuff ********** */ /* goes over entire tree */ @@ -1395,50 +832,84 @@ void nodeUnlinkNode(bNodeTree *ntree, bNode *node) } } -static void composit_free_node_cache(bNode *node) +static void node_unlink_attached(bNodeTree *ntree, bNode *parent) { - bNodeSocket *sock; - - for(sock= node->outputs.first; sock; sock= sock->next) { - if(sock->ns.data) { - free_compbuf(sock->ns.data); - sock->ns.data= NULL; - } + bNode *node; + for (node=ntree->nodes.first; node; node=node->next) { + if (node->parent == parent) + nodeDetachNode(node); } } void nodeFreeNode(bNodeTree *ntree, bNode *node) { + bNodeTreeType *treetype= ntreeGetType(ntree->type); + bNodeSocket *sock, *nextsock; + + /* remove all references to this node */ nodeUnlinkNode(ntree, node); + node_unlink_attached(ntree, node); + BLI_remlink(&ntree->nodes, node); /* since it is called while free database, node->id is undefined */ - if(ntree->type==NTREE_COMPOSIT) - composit_free_node_cache(node); - BLI_freelistN(&node->inputs); - BLI_freelistN(&node->outputs); + if (treetype->free_node_cache) + treetype->free_node_cache(ntree, node); - node_free_preview(node); + for (sock=node->inputs.first; sock; sock = nextsock) { + nextsock = sock->next; + if (sock->default_value) + MEM_freeN(sock->default_value); + MEM_freeN(sock); + } + for (sock=node->outputs.first; sock; sock = nextsock) { + nextsock = sock->next; + if (sock->default_value) + MEM_freeN(sock->default_value); + MEM_freeN(sock); + } + + nodeFreePreview(node); if(node->typeinfo && node->typeinfo->freestoragefunc) { node->typeinfo->freestoragefunc(node); } MEM_freeN(node); + + ntree->update |= NTREE_UPDATE_NODES; } /* do not free ntree itself here, free_libblock calls this function too */ void ntreeFreeTree(bNodeTree *ntree) { bNode *node, *next; + bNodeSocket *sock; if(ntree==NULL) return; - ntreeEndExecTree(ntree); /* checks for if it is still initialized */ + /* XXX hack! node trees should not store execution graphs at all. + * This should be removed when old tree types no longer require it. + * Currently the execution data for texture nodes remains in the tree + * after execution, until the node tree is updated or freed. + */ + if (ntree->execdata) { + switch (ntree->type) { + case NTREE_COMPOSIT: + ntreeCompositEndExecTree(ntree->execdata); + break; + case NTREE_SHADER: + ntreeShaderEndExecTree(ntree->execdata); + break; + case NTREE_TEXTURE: + ntreeTexEndExecTree(ntree->execdata); + break; + } + } BKE_free_animdata((ID *)ntree); - + id_us_min((ID *)ntree->gpd); BLI_freelistN(&ntree->links); /* do first, then unlink_node goes fast */ @@ -1448,25 +919,120 @@ void ntreeFreeTree(bNodeTree *ntree) nodeFreeNode(ntree, node); } + for (sock=ntree->inputs.first; sock; sock=sock->next) + if (sock->default_value) + MEM_freeN(sock->default_value); BLI_freelistN(&ntree->inputs); + for (sock=ntree->outputs.first; sock; sock=sock->next) + if (sock->default_value) + MEM_freeN(sock->default_value); BLI_freelistN(&ntree->outputs); } void ntreeFreeCache(bNodeTree *ntree) { - bNode *node; + bNodeTreeType *treetype; if(ntree==NULL) return; + + treetype= ntreeGetType(ntree->type); + if (treetype->free_cache) + treetype->free_cache(ntree); +} - if(ntree->type==NTREE_COMPOSIT) - for(node= ntree->nodes.first; node; node= node->next) - composit_free_node_cache(node); +void ntreeSetOutput(bNodeTree *ntree) +{ + bNode *node; + + /* find the active outputs, might become tree type dependant handler */ + for(node= ntree->nodes.first; node; node= node->next) { + if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) { + bNode *tnode; + int output= 0; + + /* we need a check for which output node should be tagged like this, below an exception */ + if(node->type==CMP_NODE_OUTPUT_FILE) + continue; + + /* there is more types having output class, each one is checked */ + for(tnode= ntree->nodes.first; tnode; tnode= tnode->next) { + if(tnode->typeinfo->nclass==NODE_CLASS_OUTPUT) { + + if(ntree->type==NTREE_COMPOSIT) { + + /* same type, exception for viewer */ + if(tnode->type==node->type || + (ELEM(tnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) && + ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))) { + if(tnode->flag & NODE_DO_OUTPUT) { + output++; + if(output>1) + tnode->flag &= ~NODE_DO_OUTPUT; + } + } + } + else { + /* same type */ + if(tnode->type==node->type) { + if(tnode->flag & NODE_DO_OUTPUT) { + output++; + if(output>1) + tnode->flag &= ~NODE_DO_OUTPUT; + } + } + } + } + } + if(output==0) + node->flag |= NODE_DO_OUTPUT; + } + } + + /* here we could recursively set which nodes have to be done, + might be different for editor or for "real" use... */ +} + +typedef struct MakeLocalCallData { + ID *group_id; + ID *new_id; + int lib, local; +} MakeLocalCallData; + +static void ntreeMakeLocal_CheckLocal(void *calldata, ID *owner_id, bNodeTree *ntree) +{ + MakeLocalCallData *cd= (MakeLocalCallData*)calldata; + bNode *node; + + /* find if group is in tree */ + for(node= ntree->nodes.first; node; node= node->next) { + if(node->id == cd->group_id) { + if(owner_id->lib) cd->lib= 1; + else cd->local= 1; + } + } +} +static void ntreeMakeLocal_LinkNew(void *calldata, ID *owner_id, bNodeTree *ntree) +{ + MakeLocalCallData *cd= (MakeLocalCallData*)calldata; + bNode *node; + + /* find if group is in tree */ + for(node= ntree->nodes.first; node; node= node->next) { + if(node->id == cd->group_id) { + if(owner_id->lib==NULL) { + node->id= cd->new_id; + cd->new_id->us++; + cd->group_id->us--; + } + } + } } void ntreeMakeLocal(bNodeTree *ntree) { - int local=0, lib=0; + bNodeTreeType *treetype= ntreeGetType(ntree->type); + MakeLocalCallData cd; /* - only lib users: do nothing * - only local users: set flag @@ -1475,138 +1041,146 @@ void ntreeMakeLocal(bNodeTree *ntree) if(ntree->id.lib==NULL) return; if(ntree->id.us==1) { - ntree->id.lib= NULL; + ntree->id.lib= 0; ntree->id.flag= LIB_LOCAL; - new_id(NULL, (ID *)ntree, NULL); + new_id(0, (ID *)ntree, 0); return; } /* now check users of groups... again typedepending, callback... */ - if(ntree->type==NTREE_SHADER) { - Material *ma; - for(ma= G.main->mat.first; ma; ma= ma->id.next) { - if(ma->nodetree) { - bNode *node; - - /* find if group is in tree */ - for(node= ma->nodetree->nodes.first; node; node= node->next) { - if(node->id == (ID *)ntree) { - if(ma->id.lib) lib= 1; - else local= 1; - } - } - } - } + cd.group_id = &ntree->id; + cd.new_id = NULL; + cd.local = 0; + cd.lib = 0; + + treetype->foreach_nodetree(G.main, &cd, &ntreeMakeLocal_CheckLocal); + + /* if all users are local, we simply make tree local */ + if(cd.local && cd.lib==0) { + ntree->id.lib= NULL; + ntree->id.flag= LIB_LOCAL; + new_id(0, (ID *)ntree, 0); } - else if(ntree->type==NTREE_COMPOSIT) { - Scene *sce; - for(sce= G.main->scene.first; sce; sce= sce->id.next) { - if(sce->nodetree) { - bNode *node; - - /* find if group is in tree */ - for(node= sce->nodetree->nodes.first; node; node= node->next) { - if(node->id == (ID *)ntree) { - if(sce->id.lib) lib= 1; - else local= 1; - } - } - } - } - } - else if(ntree->type==NTREE_TEXTURE) { - Tex *tx; - for(tx= G.main->tex.first; tx; tx= tx->id.next) { - if(tx->nodetree) { - bNode *node; - - /* find if group is in tree */ - for(node= tx->nodetree->nodes.first; node; node= node->next) { - if(node->id == (ID *)ntree) { - if(tx->id.lib) lib= 1; - else local= 1; - } - } - } - } - } - - /* if all users are local, we simply make tree local */ - if(local && lib==0) { - ntree->id.lib= NULL; - ntree->id.flag= LIB_LOCAL; - new_id(NULL, (ID *)ntree, NULL); - } - else if(local && lib) { + else if(cd.local && cd.lib) { /* this is the mixed case, we copy the tree and assign it to local users */ bNodeTree *newtree= ntreeCopyTree(ntree); newtree->id.us= 0; - if(ntree->type==NTREE_SHADER) { - Material *ma; - for(ma= G.main->mat.first; ma; ma= ma->id.next) { - if(ma->nodetree) { - bNode *node; - - /* find if group is in tree */ - for(node= ma->nodetree->nodes.first; node; node= node->next) { - if(node->id == (ID *)ntree) { - if(ma->id.lib==NULL) { - node->id= &newtree->id; - newtree->id.us++; - ntree->id.us--; - } - } - } - } - } - } - else if(ntree->type==NTREE_COMPOSIT) { - Scene *sce; - for(sce= G.main->scene.first; sce; sce= sce->id.next) { - if(sce->nodetree) { - bNode *node; - - /* find if group is in tree */ - for(node= sce->nodetree->nodes.first; node; node= node->next) { - if(node->id == (ID *)ntree) { - if(sce->id.lib==NULL) { - node->id= &newtree->id; - newtree->id.us++; - ntree->id.us--; - } - } - } - } - } - } - else if(ntree->type==NTREE_TEXTURE) { - Tex *tx; - for(tx= G.main->tex.first; tx; tx= tx->id.next) { - if(tx->nodetree) { - bNode *node; - - /* find if group is in tree */ - for(node= tx->nodetree->nodes.first; node; node= node->next) { - if(node->id == (ID *)ntree) { - if(tx->id.lib==NULL) { - node->id= &newtree->id; - newtree->id.us++; - ntree->id.us--; - } - } - } - } + + cd.new_id = &newtree->id; + treetype->foreach_nodetree(G.main, &cd, &ntreeMakeLocal_LinkNew); + } +} + +int ntreeNodeExists(bNodeTree *ntree, bNode *testnode) +{ + bNode *node= ntree->nodes.first; + for(; node; node= node->next) + if(node==testnode) + return 1; + return 0; +} + +int ntreeOutputExists(bNode *node, bNodeSocket *testsock) +{ + bNodeSocket *sock= node->outputs.first; + for(; sock; sock= sock->next) + if(sock==testsock) + return 1; + return 0; +} + +/* returns localized tree for execution in threads */ +bNodeTree *ntreeLocalize(bNodeTree *ntree) +{ + bNodeTreeType *ntreetype= ntreeGetType(ntree->type); + + bNodeTree *ltree; + bNode *node; + + bAction *action_backup= NULL, *tmpact_backup= NULL; + + /* Workaround for copying an action on each render! + * set action to NULL so animdata actions dont get copied */ + AnimData *adt= BKE_animdata_from_id(&ntree->id); + + if(adt) { + action_backup= adt->action; + tmpact_backup= adt->tmpact; + + adt->action= NULL; + adt->tmpact= NULL; + } + + /* node copy func */ + ltree= ntreeCopyTree(ntree); + + if(adt) { + AnimData *ladt= BKE_animdata_from_id(<ree->id); + + adt->action= ladt->action= action_backup; + adt->tmpact= ladt->tmpact= tmpact_backup; + + if(action_backup) action_backup->id.us++; + if(tmpact_backup) tmpact_backup->id.us++; + + } + /* end animdata uglyness */ + + /* ensures only a single output node is enabled */ + ntreeSetOutput(ntree); + + for(node= ntree->nodes.first; node; node= node->next) { + /* store new_node pointer to original */ + node->new_node->new_node= node; + } + + if (ntreetype->localize) + ntreetype->localize(ltree, ntree); + + return ltree; +} + +/* sync local composite with real tree */ +/* local tree is supposed to be running, be careful moving previews! */ +/* is called by jobs manager, outside threads, so it doesnt happen during draw */ +void ntreeLocalSync(bNodeTree *localtree, bNodeTree *ntree) +{ + bNodeTreeType *ntreetype= ntreeGetType(ntree->type); + + if (ntreetype->local_sync) + ntreetype->local_sync(localtree, ntree); +} + +/* merge local tree results back, and free local tree */ +/* we have to assume the editor already changed completely */ +void ntreeLocalMerge(bNodeTree *localtree, bNodeTree *ntree) +{ + bNodeTreeType *ntreetype= ntreeGetType(ntree->type); + bNode *lnode; + + /* move over the compbufs and previews */ + for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) { + if(ntreeNodeExists(ntree, lnode->new_node)) { + if(lnode->preview && lnode->preview->rect) { + nodeFreePreview(lnode->new_node); + lnode->new_node->preview= lnode->preview; + lnode->preview= NULL; } } } -} + if (ntreetype->local_merge) + ntreetype->local_merge(localtree, ntree); + + ntreeFreeTree(localtree); + MEM_freeN(localtree); +} /* ************ find stuff *************** */ -static int ntreeHasType(bNodeTree *ntree, int type) +int ntreeHasType(bNodeTree *ntree, int type) { bNode *node; @@ -1735,1662 +1309,360 @@ void nodeSetActive(bNodeTree *ntree, bNode *node) tnode->flag &= ~NODE_ACTIVE_ID; } } - - node->flag |= NODE_ACTIVE; - if(node->id) - node->flag |= NODE_ACTIVE_ID; -} - -/* use flags are not persistant yet, groups might need different tagging, so we do it each time - when we need to get this info */ -void ntreeSocketUseFlags(bNodeTree *ntree) -{ - bNode *node; - bNodeSocket *sock; - bNodeLink *link; - - /* clear flags */ - for(node= ntree->nodes.first; node; node= node->next) { - for(sock= node->inputs.first; sock; sock= sock->next) - sock->flag &= ~SOCK_IN_USE; - for(sock= node->outputs.first; sock; sock= sock->next) - sock->flag &= ~SOCK_IN_USE; - } - - /* tag all thats in use */ - for(link= ntree->links.first; link; link= link->next) { - - if(link->fromsock) // FIXME, see below - link->fromsock->flag |= SOCK_IN_USE; - if(link->tosock) // FIXME This can be NULL, when dragging a new link in the UI, should probably copy the node tree for preview render - campbell - link->tosock->flag |= SOCK_IN_USE; - } -} - -/* ************** dependency stuff *********** */ - -/* node is guaranteed to be not checked before */ -static int node_recurs_check(bNode *node, bNode ***nsort) -{ - bNode *fromnode; - bNodeSocket *sock; - int level = 0xFFF; - - node->done= 1; - - for(sock= node->inputs.first; sock; sock= sock->next) { - if(sock->link) { - fromnode= sock->link->fromnode; - if(fromnode) { - if (fromnode->done==0) - fromnode->level= node_recurs_check(fromnode, nsort); - if (fromnode->level <= level) - level = fromnode->level - 1; - } - } - } - **nsort= node; - (*nsort)++; - - return level; -} - - -static void ntreeSetOutput(bNodeTree *ntree) -{ - bNode *node; - - /* find the active outputs, might become tree type dependant handler */ - for(node= ntree->nodes.first; node; node= node->next) { - if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) { - bNode *tnode; - int output= 0; - - /* we need a check for which output node should be tagged like this, below an exception */ - if(node->type==CMP_NODE_OUTPUT_FILE) - continue; - - /* there is more types having output class, each one is checked */ - for(tnode= ntree->nodes.first; tnode; tnode= tnode->next) { - if(tnode->typeinfo->nclass==NODE_CLASS_OUTPUT) { - - if(ntree->type==NTREE_COMPOSIT) { - - /* same type, exception for viewer */ - if(tnode->type==node->type || - (ELEM(tnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) && - ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))) { - if(tnode->flag & NODE_DO_OUTPUT) { - output++; - if(output>1) - tnode->flag &= ~NODE_DO_OUTPUT; - } - } - } - else { - /* same type */ - if(tnode->type==node->type) { - if(tnode->flag & NODE_DO_OUTPUT) { - output++; - if(output>1) - tnode->flag &= ~NODE_DO_OUTPUT; - } - } - } - } - } - if(output==0) - node->flag |= NODE_DO_OUTPUT; - } - } - - /* here we could recursively set which nodes have to be done, - might be different for editor or for "real" use... */ -} - -void ntreeSolveOrder(bNodeTree *ntree) -{ - bNode *node, **nodesort, **nsort; - bNodeSocket *sock; - bNodeLink *link; - int a, totnode=0; - - /* the solve-order is called on each tree change, so we should be sure no exec can be running */ - ntreeEndExecTree(ntree); - - /* set links pointers the input sockets, to find dependencies */ - /* first clear data */ - for(node= ntree->nodes.first; node; node= node->next) { - node->done= 0; - totnode++; - for(sock= node->inputs.first; sock; sock= sock->next) - sock->link= NULL; - } - /* clear group socket links */ - for(sock= ntree->outputs.first; sock; sock= sock->next) - sock->link= NULL; - if(totnode==0) - return; - - for(link= ntree->links.first; link; link= link->next) { - link->tosock->link= link; - } - - nsort= nodesort= MEM_callocN(totnode*sizeof(void *), "sorted node array"); - - /* recursive check */ - for(node= ntree->nodes.first; node; node= node->next) { - if(node->done==0) { - node->level= node_recurs_check(node, &nsort); - } - } - - /* re-insert nodes in order, first a paranoia check */ - for(a=0; anodes.first= ntree->nodes.last= NULL; - for(a=0; anodes, nodesort[a]); - } - - MEM_freeN(nodesort); - - ntreeSetOutput(ntree); -} - - -/* Should be callback! */ -/* Do not call execs here */ -void NodeTagChanged(bNodeTree *ntree, bNode *node) -{ - if(ntree->type==NTREE_COMPOSIT) { - bNodeSocket *sock; - - for(sock= node->outputs.first; sock; sock= sock->next) { - if(sock->ns.data) { - //free_compbuf(sock->ns.data); - //sock->ns.data= NULL; - } - } - node->need_exec= 1; - } -} - -int NodeTagIDChanged(bNodeTree *ntree, ID *id) -{ - int change = FALSE; - - if(ELEM(NULL, id, ntree)) - return change; - - if(ntree->type==NTREE_COMPOSIT) { - bNode *node; - - for(node= ntree->nodes.first; node; node= node->next) { - if(node->id==id) { - change= TRUE; - NodeTagChanged(ntree, node); - } - } - } - - return change; -} - - - -/* ******************* executing ************* */ - -/* for a given socket, find the actual stack entry */ -static bNodeStack *get_socket_stack(bNodeStack *stack, bNodeSocket *sock, bNodeStack **gin) -{ - switch (sock->stack_type) { - case SOCK_STACK_LOCAL: - return stack + sock->stack_index; - case SOCK_STACK_EXTERN: - return (gin ? gin[sock->stack_index] : NULL); - case SOCK_STACK_CONST: - return sock->stack_ptr; - } - return NULL; -} - -/* see notes at ntreeBeginExecTree */ -static void node_get_stack(bNode *node, bNodeStack *stack, bNodeStack **in, bNodeStack **out, bNodeStack **gin) -{ - bNodeSocket *sock; - - /* build pointer stack */ - if (in) { - for(sock= node->inputs.first; sock; sock= sock->next) { - *(in++) = get_socket_stack(stack, sock, gin); - } - } - - if (out) { - for(sock= node->outputs.first; sock; sock= sock->next) { - *(out++) = get_socket_stack(stack, sock, gin); - } - } -} - -static void node_group_execute(bNodeStack *stack, void *data, bNode *gnode, bNodeStack **in) -{ - bNode *node; - bNodeTree *ntree= (bNodeTree *)gnode->id; - bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ - bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ - - if(ntree==NULL) return; - - stack+= gnode->stack_index; - - for(node= ntree->nodes.first; node; node= node->next) { - if(node->typeinfo->execfunc) { - node_get_stack(node, stack, nsin, nsout, in); - - /* for groups, only execute outputs for edited group */ - if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) { - if(node->type==CMP_NODE_OUTPUT_FILE || (gnode->flag & NODE_GROUP_EDIT)) - node->typeinfo->execfunc(data, node, nsin, nsout); - } - else - node->typeinfo->execfunc(data, node, nsin, nsout); - } - } - - /* free internal buffers */ - if (ntree->type==NTREE_COMPOSIT) { - bNodeSocket *sock; - bNodeStack *ns; - - /* clear hasoutput on all local stack data, - * only the group output will be used from now on - */ - for (node=ntree->nodes.first; node; node=node->next) { - for (sock=node->outputs.first; sock; sock=sock->next) { - if (sock->stack_type==SOCK_STACK_LOCAL) { - ns= get_socket_stack(stack, sock, in); - ns->hasoutput = 0; - } - } - } - /* use the hasoutput flag to tag external sockets */ - for (sock=ntree->outputs.first; sock; sock=sock->next) { - if (sock->stack_type==SOCK_STACK_LOCAL) { - ns= get_socket_stack(stack, sock, in); - ns->hasoutput = 1; - } - } - /* now free all stacks that are not used from outside */ - for (node=ntree->nodes.first; node; node=node->next) { - for (sock=node->outputs.first; sock; sock=sock->next) { - if (sock->stack_type==SOCK_STACK_LOCAL ) { - ns= get_socket_stack(stack, sock, in); - if (ns->hasoutput==0 && ns->data) { - free_compbuf(ns->data); - ns->data = NULL; - } - } - } - } - } -} - -static int set_stack_indexes_default(bNode *node, int index) -{ - bNodeSocket *sock; - - for (sock=node->inputs.first; sock; sock=sock->next) { - if (sock->link && sock->link->fromsock) { - sock->stack_type = sock->link->fromsock->stack_type; - sock->stack_index = sock->link->fromsock->stack_index; - sock->stack_ptr = sock->link->fromsock->stack_ptr; - } - else { - sock->stack_type = SOCK_STACK_CONST; - sock->stack_index = -1; - sock->stack_ptr = &sock->ns; - } - } - - for (sock=node->outputs.first; sock; sock=sock->next) { - sock->stack_type = SOCK_STACK_LOCAL; - sock->stack_index = index++; - sock->stack_ptr = NULL; - } - - return index; -} - -static int ntree_begin_exec_tree(bNodeTree *ntree); -static int set_stack_indexes_group(bNode *node, int index) -{ - bNodeTree *ngroup= (bNodeTree*)node->id; - bNodeSocket *sock; - - if(ngroup && (ngroup->init & NTREE_TYPE_INIT)==0) - ntreeInitTypes(ngroup); - - node->stack_index = index; - if(ngroup) - index += ntree_begin_exec_tree(ngroup); - - for (sock=node->inputs.first; sock; sock=sock->next) { - if (sock->link && sock->link->fromsock) { - sock->stack_type = sock->link->fromsock->stack_type; - sock->stack_index = sock->link->fromsock->stack_index; - sock->stack_ptr = sock->link->fromsock->stack_ptr; - } - else { - sock->stack_type = SOCK_STACK_CONST; - sock->stack_index = -1; - sock->stack_ptr = &sock->ns; - } - } - - /* identify group node outputs from internal group sockets */ - for(sock= node->outputs.first; sock; sock= sock->next) { - if (sock->groupsock) { - bNodeSocket *insock, *gsock = sock->groupsock; - switch (gsock->stack_type) { - case SOCK_STACK_EXTERN: - /* extern stack is resolved for this group node instance */ - insock= find_group_node_input(node, gsock->link->fromsock); - sock->stack_type = insock->stack_type; - sock->stack_index = insock->stack_index; - sock->stack_ptr = insock->stack_ptr; - break; - case SOCK_STACK_LOCAL: - sock->stack_type = SOCK_STACK_LOCAL; - /* local stack index must be offset by group node instance */ - sock->stack_index = gsock->stack_index + node->stack_index; - sock->stack_ptr = NULL; - break; - case SOCK_STACK_CONST: - sock->stack_type = SOCK_STACK_CONST; - sock->stack_index = -1; - sock->stack_ptr = gsock->stack_ptr; - break; - } - } - else { - sock->stack_type = SOCK_STACK_LOCAL; - sock->stack_index = index++; - sock->stack_ptr = NULL; - } - } - - return index; -} - -/* recursively called for groups */ -/* we set all trees on own local indices, but put a total counter - in the groups, so each instance of a group has own stack */ -static int ntree_begin_exec_tree(bNodeTree *ntree) -{ - bNode *node; - bNodeSocket *gsock; - int index= 0, i; - - if((ntree->init & NTREE_TYPE_INIT)==0) - ntreeInitTypes(ntree); - - /* group inputs are numbered 0..totinputs, so external stack can easily be addressed */ - i = 0; - for(gsock=ntree->inputs.first; gsock; gsock = gsock->next) { - gsock->stack_type = SOCK_STACK_EXTERN; - gsock->stack_index = i++; - gsock->stack_ptr = NULL; - } - - /* create indices for stack, check preview */ - for(node= ntree->nodes.first; node; node= node->next) { - /* XXX can this be done by a generic one-for-all function? - * otherwise should use node-type callback. - */ - if(node->type==NODE_GROUP) - index = set_stack_indexes_group(node, index); - else - index = set_stack_indexes_default(node, index); - } - - /* group outputs */ - for(gsock=ntree->outputs.first; gsock; gsock = gsock->next) { - if (gsock->link && gsock->link->fromsock) { - gsock->stack_type = gsock->link->fromsock->stack_type; - gsock->stack_index = gsock->link->fromsock->stack_index; - gsock->stack_ptr = gsock->link->fromsock->stack_ptr; - } - else { - gsock->stack_type = SOCK_STACK_CONST; - gsock->stack_index = -1; - gsock->stack_ptr = &gsock->ns; - } - } - - return index; -} - -/* copy socket compbufs to stack, initialize usage of curve nodes */ -static void composit_begin_exec(bNodeTree *ntree, bNodeStack *stack) -{ - bNode *node; - bNodeSocket *sock; - - for(node= ntree->nodes.first; node; node= node->next) { - - /* initialize needed for groups */ - node->exec= 0; - - for(sock= node->outputs.first; sock; sock= sock->next) { - bNodeStack *ns= get_socket_stack(stack, sock, NULL); - if(ns && sock->ns.data) { - ns->data= sock->ns.data; - sock->ns.data= NULL; - } - } - - /* cannot initialize them while using in threads */ - if(ELEM4(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) { - curvemapping_initialize(node->storage); - if(node->type==CMP_NODE_CURVE_RGB) - curvemapping_premultiply(node->storage, 0); - } - if(node->type==NODE_GROUP && node->id) - composit_begin_exec((bNodeTree *)node->id, stack + node->stack_index); - - } -} - -/* copy stack compbufs to sockets */ -static void composit_end_exec(bNodeTree *ntree, bNodeStack *stack) -{ - bNode *node; - bNodeStack *ns; - - for(node= ntree->nodes.first; node; node= node->next) { - bNodeSocket *sock; - - for(sock= node->outputs.first; sock; sock= sock->next) { - ns = get_socket_stack(stack, sock, NULL); - if(ns && ns->data) { - sock->ns.data= ns->data; - ns->data= NULL; - } - } - - if(node->type==CMP_NODE_CURVE_RGB) - curvemapping_premultiply(node->storage, 1); - - if(node->type==NODE_GROUP && node->id) - composit_end_exec((bNodeTree *)node->id, stack + node->stack_index); - - node->need_exec= 0; - } -} - -static void group_tag_used_outputs(bNode *gnode, bNodeStack *stack, bNodeStack **gin) -{ - bNodeTree *ntree= (bNodeTree *)gnode->id; - bNode *node; - bNodeSocket *sock; - - stack+= gnode->stack_index; - - for(node= ntree->nodes.first; node; node= node->next) { - if(node->typeinfo->execfunc) { - for(sock= node->inputs.first; sock; sock= sock->next) { - bNodeStack *ns = get_socket_stack(stack, sock, gin); - ns->hasoutput= 1; - } - } - - /* non-composite trees do all nodes by default */ - if (ntree->type!=NTREE_COMPOSIT) - node->need_exec = 1; - - for(sock= node->inputs.first; sock; sock= sock->next) { - bNodeStack *ns = get_socket_stack(stack, sock, gin); - if (ns) { - ns->hasoutput = 1; - - /* sock type is needed to detect rgba or value or vector types */ - if(sock->link && sock->link->fromsock) - ns->sockettype= sock->link->fromsock->type; - else - sock->ns.sockettype= sock->type; - } - - if(sock->link) { - bNodeLink *link= sock->link; - /* this is the test for a cyclic case */ - if(link->fromnode && link->tonode) { - if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF); - else { - node->need_exec= 0; - } - } - } - } - - /* set stack types (for local stack entries) */ - for(sock= node->outputs.first; sock; sock= sock->next) { - bNodeStack *ns = get_socket_stack(stack, sock, gin); - if (ns) - ns->sockettype = sock->type; - } - } -} - -/* notes below are ancient! (ton) */ -/* stack indices make sure all nodes only write in allocated data, for making it thread safe */ -/* only root tree gets the stack, to enable instances to have own stack entries */ -/* per tree (and per group) unique indices are created */ -/* the index_ext we need to be able to map from groups to the group-node own stack */ - -typedef struct bNodeThreadStack { - struct bNodeThreadStack *next, *prev; - bNodeStack *stack; - int used; -} bNodeThreadStack; - -static bNodeThreadStack *ntreeGetThreadStack(bNodeTree *ntree, int thread) -{ - ListBase *lb= &ntree->threadstack[thread]; - bNodeThreadStack *nts; - - for(nts=lb->first; nts; nts=nts->next) { - if(!nts->used) { - nts->used= 1; - return nts; - } - } - nts= MEM_callocN(sizeof(bNodeThreadStack), "bNodeThreadStack"); - nts->stack= MEM_dupallocN(ntree->stack); - nts->used= 1; - BLI_addtail(lb, nts); - - return nts; -} - -static void ntreeReleaseThreadStack(bNodeThreadStack *nts) -{ - nts->used= 0; -} - -/* free texture delegates */ -static void tex_end_exec(bNodeTree *ntree) -{ - bNodeThreadStack *nts; - bNodeStack *ns; - int th, a; - - if(ntree->threadstack) { - for(th=0; ththreadstack[th].first; nts; nts=nts->next) { - for(ns= nts->stack, a=0; astacksize; a++, ns++) { - if(ns->data) { - MEM_freeN(ns->data); - ns->data= NULL; - } - } - } - } - } -} - -void ntreeBeginExecTree(bNodeTree *ntree) -{ - bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ - - /* let's make it sure */ - if(ntree->init & NTREE_EXEC_INIT) - return; - - /* allocate the thread stack listbase array */ - if(ntree->type!=NTREE_COMPOSIT) - ntree->threadstack= MEM_callocN(BLENDER_MAX_THREADS*sizeof(ListBase), "thread stack array"); - - /* goes recursive over all groups */ - ntree->stacksize= ntree_begin_exec_tree(ntree); - - if(ntree->stacksize) { - bNode *node; - bNodeStack *ns; - int a; - - /* allocate the base stack */ - ns=ntree->stack= MEM_callocN(ntree->stacksize*sizeof(bNodeStack), "node stack"); - - /* tag inputs, the get_stack() gives own socket stackdata if not in use */ - for(a=0; astacksize; a++, ns++) ns->hasinput= 1; - - /* tag used outputs, so we know when we can skip operations */ - for(node= ntree->nodes.first; node; node= node->next) { - bNodeSocket *sock; - - /* non-composite trees do all nodes by default */ - if(ntree->type!=NTREE_COMPOSIT) - node->need_exec= 1; - - for(sock= node->inputs.first; sock; sock= sock->next) { - ns = get_socket_stack(ntree->stack, sock, NULL); - if (ns) { - ns->hasoutput = 1; - - /* sock type is needed to detect rgba or value or vector types */ - if(sock->link && sock->link->fromsock) - ns->sockettype= sock->link->fromsock->type; - else - sock->ns.sockettype= sock->type; - } - - if(sock->link) { - bNodeLink *link= sock->link; - /* this is the test for a cyclic case */ - if(link->fromnode && link->tonode) { - if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF); - else { - node->need_exec= 0; - } - } - } - } - - /* set stack types (for local stack entries) */ - for(sock= node->outputs.first; sock; sock= sock->next) { - ns = get_socket_stack(ntree->stack, sock, NULL); - if (ns) - ns->sockettype = sock->type; - } - - if(node->type==NODE_GROUP && node->id) { - node_get_stack(node, ntree->stack, nsin, NULL, NULL); - group_tag_used_outputs(node, ntree->stack, nsin); - } - } - - if(ntree->type==NTREE_COMPOSIT) - composit_begin_exec(ntree, ntree->stack); - - /* ensures only a single output node is enabled, texnode allows multiple though */ - if(ntree->type!=NTREE_TEXTURE) - ntreeSetOutput(ntree); - - } - - ntree->init |= NTREE_EXEC_INIT; -} - -void ntreeEndExecTree(bNodeTree *ntree) -{ - bNodeStack *ns; - - if(ntree->init & NTREE_EXEC_INIT) { - bNodeThreadStack *nts; - int a; - - /* another callback candidate! */ - if(ntree->type==NTREE_COMPOSIT) { - composit_end_exec(ntree, ntree->stack); - - for(ns= ntree->stack, a=0; astacksize; a++, ns++) { - if(ns->data) { - printf("freed leftover buffer from stack\n"); - free_compbuf(ns->data); - ns->data= NULL; - } - } - } - else if(ntree->type==NTREE_TEXTURE) - tex_end_exec(ntree); - - if(ntree->stack) { - MEM_freeN(ntree->stack); - ntree->stack= NULL; - } - - if(ntree->threadstack) { - for(a=0; athreadstack[a].first; nts; nts=nts->next) - if (nts->stack) MEM_freeN(nts->stack); - BLI_freelistN(&ntree->threadstack[a]); - } - - MEM_freeN(ntree->threadstack); - ntree->threadstack= NULL; - } - - ntree->init &= ~NTREE_EXEC_INIT; - } -} - -/* nodes are presorted, so exec is in order of list */ -void ntreeExecTree(bNodeTree *ntree, void *callerdata, int thread) -{ - bNode *node; - bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ - bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ - bNodeStack *stack; - bNodeThreadStack *nts = NULL; - - /* only when initialized */ - if((ntree->init & NTREE_EXEC_INIT)==0) - ntreeBeginExecTree(ntree); - - /* composite does 1 node per thread, so no multiple stacks needed */ - if(ntree->type==NTREE_COMPOSIT) { - stack= ntree->stack; - } - else { - nts= ntreeGetThreadStack(ntree, thread); - stack= nts->stack; - } - - for(node= ntree->nodes.first; node; node= node->next) { - if(node->need_exec) { - if(node->typeinfo->execfunc) { - node_get_stack(node, stack, nsin, nsout, NULL); - node->typeinfo->execfunc(callerdata, node, nsin, nsout); - } - else if(node->type==NODE_GROUP && node->id) { - node_get_stack(node, stack, nsin, NULL, NULL); - node_group_execute(stack, callerdata, node, nsin); - } - } - } - - if(nts) - ntreeReleaseThreadStack(nts); -} - - -/* ***************************** threaded version for execute composite nodes ************* */ -/* these are nodes without input, only giving values */ -/* or nodes with only value inputs */ -static int node_only_value(bNode *node) -{ - bNodeSocket *sock; - - if(ELEM3(node->type, CMP_NODE_TIME, CMP_NODE_VALUE, CMP_NODE_RGB)) - return 1; - - /* doing this for all node types goes wrong. memory free errors */ - if(node->inputs.first && node->type==CMP_NODE_MAP_VALUE) { - int retval= 1; - for(sock= node->inputs.first; sock; sock= sock->next) { - if(sock->link && sock->link->fromnode) - retval &= node_only_value(sock->link->fromnode); - } - return retval; - } - return 0; -} - - -/* not changing info, for thread callback */ -typedef struct ThreadData { - bNodeStack *stack; - RenderData *rd; -} ThreadData; - -static void *exec_composite_node(void *node_v) -{ - bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ - bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ - bNode *node= node_v; - ThreadData *thd= (ThreadData *)node->threaddata; - - node_get_stack(node, thd->stack, nsin, nsout, NULL); - - if((node->flag & NODE_MUTED) && (!node_only_value(node))) { - /* viewers we execute, for feedback to user */ - if(ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) - node->typeinfo->execfunc(thd->rd, node, nsin, nsout); - else - node_compo_pass_on(node, nsin, nsout); - } - else if(node->typeinfo->execfunc) { - node->typeinfo->execfunc(thd->rd, node, nsin, nsout); - } - else if(node->type==NODE_GROUP && node->id) { - node_group_execute(thd->stack, thd->rd, node, nsin); - } - - node->exec |= NODE_READY; - return NULL; -} - -/* return total of executable nodes, for timecursor */ -/* only compositor uses it */ -static int setExecutableNodes(bNodeTree *ntree, ThreadData *thd) -{ - bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ - bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ - bNode *node; - bNodeSocket *sock; - int totnode= 0, group_edit= 0; - - /* note; do not add a dependency sort here, the stack was created already */ - - /* if we are in group edit, viewer nodes get skipped when group has viewer */ - for(node= ntree->nodes.first; node; node= node->next) - if(node->type==NODE_GROUP && (node->flag & NODE_GROUP_EDIT)) - if(ntreeHasType((bNodeTree *)node->id, CMP_NODE_VIEWER)) - group_edit= 1; - - for(node= ntree->nodes.first; node; node= node->next) { - int a; - - node_get_stack(node, thd->stack, nsin, nsout, NULL); - - /* test the outputs */ - /* skip value-only nodes (should be in type!) */ - if(!node_only_value(node)) { - for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) { - if(nsout[a]->data==NULL && nsout[a]->hasoutput) { - node->need_exec= 1; - break; - } - } - } - - /* test the inputs */ - for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) { - /* skip viewer nodes in bg render or group edit */ - if( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) && (G.background || group_edit)) - node->need_exec= 0; - /* is sock in use? */ - else if(sock->link) { - bNodeLink *link= sock->link; - - /* this is the test for a cyclic case */ - if(link->fromnode==NULL || link->tonode==NULL); - else if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) { - if(link->fromnode->need_exec) { - node->need_exec= 1; - break; - } - } - else { - node->need_exec= 0; - printf("Node %s skipped, cyclic dependency\n", node->name); - } - } - } - - if(node->need_exec) { - - /* free output buffers */ - for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) { - if(nsout[a]->data) { - free_compbuf(nsout[a]->data); - nsout[a]->data= NULL; - } - } - totnode++; - /* printf("node needs exec %s\n", node->name); */ - - /* tag for getExecutableNode() */ - node->exec= 0; - } - else { - /* tag for getExecutableNode() */ - node->exec= NODE_READY|NODE_FINISHED|NODE_SKIPPED; - - } - } - - /* last step: set the stack values for only-value nodes */ - /* just does all now, compared to a full buffer exec this is nothing */ - if(totnode) { - for(node= ntree->nodes.first; node; node= node->next) { - if(node->need_exec==0 && node_only_value(node)) { - if(node->typeinfo->execfunc) { - node_get_stack(node, thd->stack, nsin, nsout, NULL); - node->typeinfo->execfunc(thd->rd, node, nsin, nsout); - } - } - } - } - - return totnode; -} - -/* while executing tree, free buffers from nodes that are not needed anymore */ -static void freeExecutableNode(bNodeTree *ntree) -{ - /* node outputs can be freed when: - - not a render result or image node - - when node outputs go to nodes all being set NODE_FINISHED - */ - bNode *node; - bNodeSocket *sock; - - /* set exec flag for finished nodes that might need freed */ - for(node= ntree->nodes.first; node; node= node->next) { - if(node->type!=CMP_NODE_R_LAYERS) - if(node->exec & NODE_FINISHED) - node->exec |= NODE_FREEBUFS; - } - /* clear this flag for input links that are not done yet */ - for(node= ntree->nodes.first; node; node= node->next) { - if((node->exec & NODE_FINISHED)==0) { - for(sock= node->inputs.first; sock; sock= sock->next) - if(sock->link && sock->link->fromnode) - sock->link->fromnode->exec &= ~NODE_FREEBUFS; - } - } - /* now we can free buffers */ - for(node= ntree->nodes.first; node; node= node->next) { - if(node->exec & NODE_FREEBUFS) { - for(sock= node->outputs.first; sock; sock= sock->next) { - bNodeStack *ns= get_socket_stack(ntree->stack, sock, NULL); - if(ns && ns->data) { - free_compbuf(ns->data); - ns->data= NULL; - // printf("freed buf node %s \n", node->name); - } - } - } - } -} - -static bNode *getExecutableNode(bNodeTree *ntree) -{ - bNode *node; - bNodeSocket *sock; - - for(node= ntree->nodes.first; node; node= node->next) { - if(node->exec==0) { - - /* input sockets should be ready */ - for(sock= node->inputs.first; sock; sock= sock->next) { - if(sock->link && sock->link->fromnode) - if((sock->link->fromnode->exec & NODE_READY)==0) - break; - } - if(sock==NULL) - return node; - } - } - return NULL; -} - -/* check if texture nodes need exec or end */ -static void ntree_composite_texnode(bNodeTree *ntree, int init) -{ - bNode *node; - - for(node= ntree->nodes.first; node; node= node->next) { - if(node->type==CMP_NODE_TEXTURE && node->id) { - Tex *tex= (Tex *)node->id; - if(tex->nodetree && tex->use_nodes) { - /* has internal flag to detect it only does it once */ - if(init) - ntreeBeginExecTree(tex->nodetree); - else - ntreeEndExecTree(tex->nodetree); - } - } - } - -} - -/* optimized tree execute test for compositing */ -void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview) -{ - bNode *node; - ListBase threads; - ThreadData thdata; - int totnode, curnode, rendering= 1; - - if(ntree==NULL) return; - - if(do_preview) - ntreeInitPreview(ntree, 0, 0); - - ntreeBeginExecTree(ntree); - ntree_composite_texnode(ntree, 1); - - /* prevent unlucky accidents */ - if(G.background) - rd->scemode &= ~R_COMP_CROP; - - /* setup callerdata for thread callback */ - thdata.rd= rd; - thdata.stack= ntree->stack; - - /* fixed seed, for example noise texture */ - BLI_srandom(rd->cfra); - - /* sets need_exec tags in nodes */ - curnode = totnode= setExecutableNodes(ntree, &thdata); - - BLI_init_threads(&threads, exec_composite_node, rd->threads); - - while(rendering) { - - if(BLI_available_threads(&threads)) { - node= getExecutableNode(ntree); - if(node) { - if(ntree->progress && totnode) - ntree->progress(ntree->prh, (1.0f - curnode/(float)totnode)); - if(ntree->stats_draw) { - char str[64]; - sprintf(str, "Compositing %d %s", curnode, node->name); - ntree->stats_draw(ntree->sdh, str); - } - curnode--; - - node->threaddata = &thdata; - node->exec= NODE_PROCESSING; - BLI_insert_thread(&threads, node); - } - else - PIL_sleep_ms(50); - } - else - PIL_sleep_ms(50); - - rendering= 0; - /* test for ESC */ - if(ntree->test_break && ntree->test_break(ntree->tbh)) { - for(node= ntree->nodes.first; node; node= node->next) - node->exec |= NODE_READY; - } - - /* check for ready ones, and if we need to continue */ - for(node= ntree->nodes.first; node; node= node->next) { - if(node->exec & NODE_READY) { - if((node->exec & NODE_FINISHED)==0) { - BLI_remove_thread(&threads, node); /* this waits for running thread to finish btw */ - node->exec |= NODE_FINISHED; - - /* freeing unused buffers */ - if(rd->scemode & R_COMP_FREE) - freeExecutableNode(ntree); - } - } - else rendering= 1; - } - } - - BLI_end_threads(&threads); - - ntreeEndExecTree(ntree); -} - - -/* ********** copy composite tree entirely, to allow threaded exec ******************* */ -/* ***************** do NOT execute this in a thread! ****************** */ - -/* returns localized tree for execution in threads */ -/* local tree then owns all compbufs (for composite) */ -bNodeTree *ntreeLocalize(bNodeTree *ntree) -{ - bNodeTree *ltree; - bNode *node; - bNodeSocket *sock; - - bAction *action_backup= NULL, *tmpact_backup= NULL; - - /* Workaround for copying an action on each render! - * set action to NULL so animdata actions dont get copied */ - AnimData *adt= BKE_animdata_from_id(&ntree->id); - - if(adt) { - action_backup= adt->action; - tmpact_backup= adt->tmpact; - - adt->action= NULL; - adt->tmpact= NULL; - } - - /* node copy func */ - ltree= ntreeCopyTree(ntree); - - if(adt) { - AnimData *ladt= BKE_animdata_from_id(<ree->id); - - adt->action= ladt->action= action_backup; - adt->tmpact= ladt->tmpact= tmpact_backup; - - if(action_backup) action_backup->id.us++; - if(tmpact_backup) tmpact_backup->id.us++; - - } - /* end animdata uglyness */ - - /* ensures only a single output node is enabled */ - ntreeSetOutput(ltree); - - for(node= ntree->nodes.first; node; node= node->next) { - - /* store new_node pointer to original */ - node->new_node->new_node= node; - - if(ntree->type==NTREE_COMPOSIT) { - /* ensure new user input gets handled ok, only composites (texture nodes will break, for painting since it uses no tags) */ - node->need_exec= 0; - - /* move over the compbufs */ - /* right after ntreeCopyTree() oldsock pointers are valid */ - - if(ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) { - if(node->id) { - if(node->flag & NODE_DO_OUTPUT) - node->new_node->id= (ID *)copy_image((Image *)node->id); - else - node->new_node->id= NULL; - } - } - - for(sock= node->outputs.first; sock; sock= sock->next) { - - sock->new_sock->ns.data= sock->ns.data; - compbuf_set_node(sock->new_sock->ns.data, node->new_node); - - sock->ns.data= NULL; - sock->new_sock->new_sock= sock; - } - } - } - - return ltree; -} - -static int node_exists(bNodeTree *ntree, bNode *testnode) -{ - bNode *node= ntree->nodes.first; - for(; node; node= node->next) - if(node==testnode) - return 1; - return 0; -} - -static int outsocket_exists(bNode *node, bNodeSocket *testsock) -{ - bNodeSocket *sock= node->outputs.first; - for(; sock; sock= sock->next) - if(sock==testsock) - return 1; - return 0; -} - - -/* sync local composite with real tree */ -/* local composite is supposed to be running, be careful moving previews! */ -/* is called by jobs manager, outside threads, so it doesnt happen during draw */ -void ntreeLocalSync(bNodeTree *localtree, bNodeTree *ntree) -{ - bNode *lnode; - - if(ntree->type==NTREE_COMPOSIT) { - /* move over the compbufs and previews */ - for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) { - if( (lnode->exec & NODE_READY) && !(lnode->exec & NODE_SKIPPED) ) { - if(node_exists(ntree, lnode->new_node)) { - - if(lnode->preview && lnode->preview->rect) { - node_free_preview(lnode->new_node); - lnode->new_node->preview= lnode->preview; - lnode->preview= NULL; - } - } - } - } - } - else if(ELEM(ntree->type, NTREE_SHADER, NTREE_TEXTURE)) { - /* copy over contents of previews */ - for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) { - if(node_exists(ntree, lnode->new_node)) { - bNode *node= lnode->new_node; - - if(node->preview && node->preview->rect) { - if(lnode->preview && lnode->preview->rect) { - int xsize= node->preview->xsize; - int ysize= node->preview->ysize; - memcpy(node->preview->rect, lnode->preview->rect, 4*xsize + xsize*ysize*sizeof(char)*4); - } - } - } - } - } -} - -/* merge local tree results back, and free local tree */ -/* we have to assume the editor already changed completely */ -void ntreeLocalMerge(bNodeTree *localtree, bNodeTree *ntree) -{ - bNode *lnode; - bNodeSocket *lsock; - - /* move over the compbufs and previews */ - for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) { - if(node_exists(ntree, lnode->new_node)) { - - if(lnode->preview && lnode->preview->rect) { - node_free_preview(lnode->new_node); - lnode->new_node->preview= lnode->preview; - lnode->preview= NULL; - } - - if(ELEM(lnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) { - if(lnode->id && (lnode->flag & NODE_DO_OUTPUT)) { - /* image_merge does sanity check for pointers */ - BKE_image_merge((Image *)lnode->new_node->id, (Image *)lnode->id); - } - } - - for(lsock= lnode->outputs.first; lsock; lsock= lsock->next) { - if(outsocket_exists(lnode->new_node, lsock->new_sock)) { - lsock->new_sock->ns.data= lsock->ns.data; - compbuf_set_node(lsock->new_sock->ns.data, lnode->new_node); - lsock->ns.data= NULL; - lsock->new_sock= NULL; - } - } - } - } - ntreeFreeTree(localtree); - MEM_freeN(localtree); + + node->flag |= NODE_ACTIVE; + if(node->id) + node->flag |= NODE_ACTIVE_ID; } -/* *********************************************** */ - -/* GPU material from shader nodes */ - -static void gpu_from_node_stack(ListBase *sockets, bNodeStack **ns, GPUNodeStack *gs) +/* use flags are not persistant yet, groups might need different tagging, so we do it each time + when we need to get this info */ +void ntreeSocketUseFlags(bNodeTree *ntree) { + bNode *node; bNodeSocket *sock; - int i; - - for (sock=sockets->first, i=0; sock; sock=sock->next, i++) { - memset(&gs[i], 0, sizeof(gs[i])); - - QUATCOPY(gs[i].vec, ns[i]->vec); - gs[i].link= ns[i]->data; - - if (sock->type == SOCK_VALUE) - gs[i].type= GPU_FLOAT; - else if (sock->type == SOCK_VECTOR) - gs[i].type= GPU_VEC3; - else if (sock->type == SOCK_RGBA) - gs[i].type= GPU_VEC4; - else - gs[i].type= GPU_NONE; - - gs[i].name = ""; - gs[i].hasinput= ns[i]->hasinput && ns[i]->data; - gs[i].hasoutput= ns[i]->hasoutput && ns[i]->data; - gs[i].sockettype= ns[i]->sockettype; + bNodeLink *link; + + /* clear flags */ + for(node= ntree->nodes.first; node; node= node->next) { + for(sock= node->inputs.first; sock; sock= sock->next) + sock->flag &= ~SOCK_IN_USE; + for(sock= node->outputs.first; sock; sock= sock->next) + sock->flag &= ~SOCK_IN_USE; + } + + /* tag all thats in use */ + for(link= ntree->links.first; link; link= link->next) { + + if(link->fromsock) // FIXME, see below + link->fromsock->flag |= SOCK_IN_USE; + if(link->tosock) // FIXME This can be NULL, when dragging a new link in the UI, should probably copy the node tree for preview render - campbell + link->tosock->flag |= SOCK_IN_USE; } - - gs[i].type= GPU_NONE; } -static void data_from_gpu_stack(ListBase *sockets, bNodeStack **ns, GPUNodeStack *gs) +/* ************** dependency stuff *********** */ + +/* node is guaranteed to be not checked before */ +static int node_get_deplist_recurs(bNode *node, bNode ***nsort) { + bNode *fromnode; bNodeSocket *sock; - int i; - - for (sock=sockets->first, i=0; sock; sock=sock->next, i++) { - ns[i]->data= gs[i].link; - ns[i]->sockettype= gs[i].sockettype; + int level = 0xFFF; + + node->done= 1; + + /* check linked nodes */ + for(sock= node->inputs.first; sock; sock= sock->next) { + if(sock->link) { + fromnode= sock->link->fromnode; + if(fromnode) { + if (fromnode->done==0) + fromnode->level= node_get_deplist_recurs(fromnode, nsort); + if (fromnode->level <= level) + level = fromnode->level - 1; + } + } + } + + /* check parent node */ + if (node->parent) { + if (node->parent->done==0) + node->parent->level= node_get_deplist_recurs(node->parent, nsort); + if (node->parent->level <= level) + level = node->parent->level - 1; + } + + if (nsort) { + **nsort= node; + (*nsort)++; } + + return level; } -static void gpu_node_group_execute(bNodeStack *stack, GPUMaterial *mat, bNode *gnode, bNodeStack **in) +void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes) { - bNode *node; - bNodeTree *ntree= (bNodeTree *)gnode->id; - bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ - bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ - GPUNodeStack gpuin[MAX_SOCKET+1], gpuout[MAX_SOCKET+1]; - int doit = 0; + bNode *node, **nsort; - if(ntree==NULL) return; + *totnodes=0; - stack+= gnode->stack_index; - + /* first clear data */ for(node= ntree->nodes.first; node; node= node->next) { - if(node->typeinfo->gpufunc) { - node_get_stack(node, stack, nsin, nsout, in); - - doit = 0; - - /* for groups, only execute outputs for edited group */ - if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) { - if(gnode->flag & NODE_GROUP_EDIT) - if(node->flag & NODE_DO_OUTPUT) - doit = 1; - } - else - doit = 1; - - if(doit) { - gpu_from_node_stack(&node->inputs, nsin, gpuin); - gpu_from_node_stack(&node->outputs, nsout, gpuout); - if(node->typeinfo->gpufunc(mat, node, gpuin, gpuout)) - data_from_gpu_stack(&node->outputs, nsout, gpuout); - } + node->done= 0; + (*totnodes)++; + } + if(*totnodes==0) { + *deplist = NULL; + return; + } + + nsort= *deplist= MEM_callocN((*totnodes)*sizeof(bNode*), "sorted node array"); + + /* recursive check */ + for(node= ntree->nodes.first; node; node= node->next) { + if(node->done==0) { + node->level= node_get_deplist_recurs(node, &nsort); } } } -void ntreeGPUMaterialNodes(bNodeTree *ntree, GPUMaterial *mat) +static void ntree_update_link_pointers(bNodeTree *ntree) { bNode *node; - bNodeStack *stack; - bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ - bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ - GPUNodeStack gpuin[MAX_SOCKET+1], gpuout[MAX_SOCKET+1]; - - if((ntree->init & NTREE_EXEC_INIT)==0) - ntreeBeginExecTree(ntree); - - stack= ntree->stack; - + bNodeSocket *sock; + bNodeLink *link; + + /* first clear data */ for(node= ntree->nodes.first; node; node= node->next) { - if(node->typeinfo->gpufunc) { - node_get_stack(node, stack, nsin, nsout, NULL); - gpu_from_node_stack(&node->inputs, nsin, gpuin); - gpu_from_node_stack(&node->outputs, nsout, gpuout); - if(node->typeinfo->gpufunc(mat, node, gpuin, gpuout)) - data_from_gpu_stack(&node->outputs, nsout, gpuout); - } - else if(node->type==NODE_GROUP && node->id) { - node_get_stack(node, stack, nsin, nsout, NULL); - gpu_node_group_execute(stack, mat, node, nsin); - } + for(sock= node->inputs.first; sock; sock= sock->next) + sock->link= NULL; } + /* clear socket links */ + for(sock= ntree->outputs.first; sock; sock= sock->next) + sock->link= NULL; - ntreeEndExecTree(ntree); + for(link= ntree->links.first; link; link= link->next) { + if (link->tosock) + link->tosock->link= link; + } } -/* **************** call to switch lamploop for material node ************ */ - -void (*node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *); - -void set_node_shader_lamp_loop(void (*lamp_loop_func)(ShadeInput *, ShadeResult *)) +void ntree_validate_links(bNodeTree *ntree) { - node_shader_lamp_loop= lamp_loop_func; + bNodeTreeType *ntreetype = ntreeGetType(ntree->type); + bNodeLink *link; + + for (link = ntree->links.first; link; link = link->next) { + link->flag |= NODE_LINK_VALID; + if (link->fromnode && link->tonode && link->fromnode->level <= link->tonode->level) + link->flag &= ~NODE_LINK_VALID; + else if (ntreetype->validate_link) { + if (!ntreetype->validate_link(ntree, link)) + link->flag &= ~NODE_LINK_VALID; + } + } } -/* clumsy checking... should do dynamic outputs once */ -static void force_hidden_passes(bNode *node, int passflag) -{ - bNodeSocket *sock; - - for(sock= node->outputs.first; sock; sock= sock->next) - sock->flag &= ~SOCK_UNAVAIL; - - sock= BLI_findlink(&node->outputs, RRES_OUT_Z); - if(!(passflag & SCE_PASS_Z)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_NORMAL); - if(!(passflag & SCE_PASS_NORMAL)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_VEC); - if(!(passflag & SCE_PASS_VECTOR)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_UV); - if(!(passflag & SCE_PASS_UV)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_RGBA); - if(!(passflag & SCE_PASS_RGBA)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_DIFF); - if(!(passflag & SCE_PASS_DIFFUSE)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_SPEC); - if(!(passflag & SCE_PASS_SPEC)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_SHADOW); - if(!(passflag & SCE_PASS_SHADOW)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_AO); - if(!(passflag & SCE_PASS_AO)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_REFLECT); - if(!(passflag & SCE_PASS_REFLECT)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_REFRACT); - if(!(passflag & SCE_PASS_REFRACT)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_INDIRECT); - if(!(passflag & SCE_PASS_INDIRECT)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXOB); - if(!(passflag & SCE_PASS_INDEXOB)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXMA); - if(!(passflag & SCE_PASS_INDEXMA)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_MIST); - if(!(passflag & SCE_PASS_MIST)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_EMIT); - if(!(passflag & SCE_PASS_EMIT)) sock->flag |= SOCK_UNAVAIL; - sock= BLI_findlink(&node->outputs, RRES_OUT_ENV); - if(!(passflag & SCE_PASS_ENVIRONMENT)) sock->flag |= SOCK_UNAVAIL; - -} - -/* based on rules, force sockets hidden always */ -void ntreeCompositForceHidden(bNodeTree *ntree, Scene *curscene) +static void ntree_verify_nodes_cb(void *calldata, struct ID *UNUSED(owner_id), struct bNodeTree *ntree) { + ID *id= (ID*)calldata; bNode *node; - if(ntree==NULL) return; - - for(node= ntree->nodes.first; node; node= node->next) { - if( node->type==CMP_NODE_R_LAYERS) { - Scene *sce= node->id?(Scene *)node->id:curscene; - SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1); - if(srl) - force_hidden_passes(node, srl->passflag); - } - else if( node->type==CMP_NODE_IMAGE) { - Image *ima= (Image *)node->id; - if(ima) { - if(ima->rr) { - ImageUser *iuser= node->storage; - RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer); - if(rl) - force_hidden_passes(node, rl->passflag); - else - force_hidden_passes(node, 0); - } - else if(ima->type!=IMA_TYPE_MULTILAYER) { /* if ->rr not yet read we keep inputs */ - force_hidden_passes(node, RRES_OUT_Z); - } - else - force_hidden_passes(node, 0); - } - else - force_hidden_passes(node, 0); - } - } - + for (node=ntree->nodes.first; node; node=node->next) + if (node->typeinfo->verifyfunc) + node->typeinfo->verifyfunc(ntree, node, id); } -/* called from render pipeline, to tag render input and output */ -/* need to do all scenes, to prevent errors when you re-render 1 scene */ -void ntreeCompositTagRender(Scene *curscene) +void ntreeVerifyNodes(struct Main *main, struct ID *id) { - Scene *sce; + bNodeTreeType *ntreetype; + bNodeTree *ntree; + int n; - for(sce= G.main->scene.first; sce; sce= sce->id.next) { - if(sce->nodetree) { - bNode *node; - - for(node= sce->nodetree->nodes.first; node; node= node->next) { - if(node->id==(ID *)curscene || node->type==CMP_NODE_COMPOSITE) - NodeTagChanged(sce->nodetree, node); - else if(node->type==CMP_NODE_TEXTURE) /* uses scene sizex/sizey */ - NodeTagChanged(sce->nodetree, node); - } - } + for (n=0; n < NUM_NTREE_TYPES; ++n) { + ntreetype= ntreeGetType(n); + if (ntreetype && ntreetype->foreach_nodetree) + ntreetype->foreach_nodetree(main, id, ntree_verify_nodes_cb); } + for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next) + ntree_verify_nodes_cb(id, NULL, ntree); } -static int node_animation_properties(bNodeTree *ntree, bNode *node) +void ntreeUpdateTree(bNodeTree *ntree) { - bNodeSocket *sock; - const ListBase *lb; - Link *link; - PointerRNA ptr; - PropertyRNA *prop; - - /* check to see if any of the node's properties have fcurves */ - RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr); - lb = RNA_struct_type_properties(ptr.type); - - for (link=lb->first; link; link=link->next) { - int driven, len=1, index; - prop = (PropertyRNA *)link; - - if (RNA_property_array_check(prop)) - len = RNA_property_array_length(&ptr, prop); - - for (index=0; indextype); + bNode *node; + bNode **deplist; + int totnodes, n; + + ntree_update_link_pointers(ntree); - /* now check node sockets */ - for (sock = node->inputs.first; sock; sock=sock->next) { - int driven, len=1, index; + /* also updates the node level! */ + ntreeGetDependencyList(ntree, &deplist, &totnodes); + + if (deplist) { + /* update individual nodes */ + for (n=0; n < totnodes; ++n) { + node = deplist[n]; + if (ntreetype->update_node) + ntreetype->update_node(ntree, node); + else if (node->typeinfo->updatefunc) + node->typeinfo->updatefunc(ntree, node); + } - RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr); - prop = RNA_struct_find_property(&ptr, "default_value"); + MEM_freeN(deplist); - if (RNA_property_array_check(prop)) - len = RNA_property_array_length(&ptr, prop); + /* ensures only a single output node is enabled, texnode allows multiple though */ + if(ntree->type!=NTREE_TEXTURE) + ntreeSetOutput(ntree); - for (index=0; indexupdate & (NTREE_UPDATE_LINKS|NTREE_UPDATE_NODES)) { + ntree_validate_links(ntree); + } + + /* update tree */ + if (ntreetype->update) + ntreetype->update(ntree); + else { + bNodeType *ntype= node_get_type(ntree, ntree->nodetype); + if (ntype && ntype->updatetreefunc) + ntype->updatetreefunc(ntree); + } + + /* XXX hack, should be done by depsgraph!! */ + ntreeVerifyNodes(G.main, &ntree->id); + + /* clear the update flag */ + ntree->update = 0; +} - return 0; +void NodeTagChanged(bNodeTree *ntree, bNode *node) +{ + bNodeTreeType *ntreetype = ntreeGetType(ntree->type); + + if (ntreetype->update_node) + ntreetype->update_node(ntree, node); + else if (node->typeinfo->updatefunc) + node->typeinfo->updatefunc(ntree, node); } -/* tags nodes that have animation capabilities */ -int ntreeCompositTagAnimated(bNodeTree *ntree) +int NodeTagIDChanged(bNodeTree *ntree, ID *id) { + bNodeTreeType *ntreetype = ntreeGetType(ntree->type); bNode *node; - int tagged= 0; - - if(ntree==NULL) return 0; + int change = FALSE; + + if(ELEM(NULL, id, ntree)) + return change; - for(node= ntree->nodes.first; node; node= node->next) { - - tagged = node_animation_properties(ntree, node); - - /* otherwise always tag these node types */ - if(node->type==CMP_NODE_IMAGE) { - Image *ima= (Image *)node->id; - if(ima && ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { - NodeTagChanged(ntree, node); - tagged= 1; + if (ntreetype->update_node) { + for(node= ntree->nodes.first; node; node= node->next) { + if(node->id==id) { + change = TRUE; + ntreetype->update_node(ntree, node); } } - else if(node->type==CMP_NODE_TIME) { - NodeTagChanged(ntree, node); - tagged= 1; - } - /* here was tag render layer, but this is called after a render, so re-composites fail */ - else if(node->type==NODE_GROUP) { - if( ntreeCompositTagAnimated((bNodeTree *)node->id) ) { - NodeTagChanged(ntree, node); + } + else { + for(node= ntree->nodes.first; node; node= node->next) { + if(node->id==id) { + change = TRUE; + if (node->typeinfo->updatefunc) + node->typeinfo->updatefunc(ntree, node); } } } - return tagged; + return change; } -/* called from image window preview */ -void ntreeCompositTagGenerators(bNodeTree *ntree) +/* ************* node type access ********** */ + +int nodeValid(bNodeTree *ntree, bNodeTemplate *ntemp) { - bNode *node; - - if(ntree==NULL) return; - - for(node= ntree->nodes.first; node; node= node->next) { - if( ELEM(node->type, CMP_NODE_R_LAYERS, CMP_NODE_IMAGE)) - NodeTagChanged(ntree, node); + bNodeType *ntype= node_get_type(ntree, ntemp->type); + if (ntype) { + if (ntype->validfunc) + return ntype->validfunc(ntree, ntemp); + else + return 1; } + else + return 0; } -/* XXX after render animation system gets a refresh, this call allows composite to end clean */ -void ntreeClearTags(bNodeTree *ntree) +const char* nodeLabel(bNode *node) { - bNode *node; - - if(ntree==NULL) return; - - for(node= ntree->nodes.first; node; node= node->next) { - node->need_exec= 0; - if(node->type==NODE_GROUP) - ntreeClearTags((bNodeTree *)node->id); - } + if (node->label[0]!='\0') + return node->label; + else if (node->typeinfo->labelfunc) + return node->typeinfo->labelfunc(node); + else + return node->typeinfo->name; } +struct bNodeTree *nodeGroupEditGet(struct bNode *node) +{ + if (node->typeinfo->group_edit_get) + return node->typeinfo->group_edit_get(node); + else + return NULL; +} -int ntreeTexTagAnimated(bNodeTree *ntree) +struct bNodeTree *nodeGroupEditSet(struct bNode *node, int edit) { - bNode *node; - - if(ntree==NULL) return 0; - - for(node= ntree->nodes.first; node; node= node->next) { - if(node->type==TEX_NODE_CURVE_TIME) { - NodeTagChanged(ntree, node); - return 1; - } - else if(node->type==NODE_GROUP) { - if( ntreeTexTagAnimated((bNodeTree *)node->id) ) { - return 1; - } - } - } - - return 0; + if (node->typeinfo->group_edit_set) + return node->typeinfo->group_edit_set(node, edit); + else if (node->typeinfo->group_edit_get) + return node->typeinfo->group_edit_get(node); + else + return NULL; +} + +void nodeGroupEditClear(struct bNode *node) +{ + if (node->typeinfo->group_edit_clear) + node->typeinfo->group_edit_clear(node); } -/* ************* node definition init ********** */ +struct bNodeTemplate nodeMakeTemplate(struct bNode *node) +{ + bNodeTemplate ntemp; + if (node->typeinfo->templatefunc) + return node->typeinfo->templatefunc(node); + else { + ntemp.type = node->type; + return ntemp; + } +} -void node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag, - struct bNodeSocketType *inputs, struct bNodeSocketType *outputs) +void node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag) { memset(ntype, 0, sizeof(bNodeType)); ntype->type = type; - ntype->name = name; + BLI_strncpy(ntype->name, name, sizeof(ntype->name)); ntype->nclass = nclass; ntype->flag = flag; - ntype->inputs = inputs; - ntype->outputs = outputs; - /* default size values */ ntype->width = 140; ntype->minwidth = 100; ntype->maxwidth = 320; + ntype->height = 100; + ntype->minheight = 30; + ntype->maxheight = FLT_MAX; +} + +void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs) +{ + ntype->inputs = inputs; + ntype->outputs = outputs; } -void node_type_init(bNodeType *ntype, void (*initfunc)(struct bNode *)) +void node_type_init(struct bNodeType *ntype, void (*initfunc)(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp)) { ntype->initfunc = initfunc; } +void node_type_valid(struct bNodeType *ntype, int (*validfunc)(struct bNodeTree *ntree, struct bNodeTemplate *ntemp)) +{ + ntype->validfunc = validfunc; +} + void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth) { ntype->width = width; ntype->minwidth = minwidth; - ntype->maxwidth = maxwidth; + if (maxwidth <= minwidth) + ntype->maxwidth = FLT_MAX; + else + ntype->maxwidth = maxwidth; } void node_type_storage(bNodeType *ntype, const char *storagename, void (*freestoragefunc)(struct bNode *), void (*copystoragefunc)(struct bNode *, struct bNode *)) @@ -3403,47 +1675,92 @@ void node_type_storage(bNodeType *ntype, const char *storagename, void (*freesto ntype->freestoragefunc = freestoragefunc; } +void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *)) +{ + ntype->labelfunc = labelfunc; +} + +void node_type_template(struct bNodeType *ntype, struct bNodeTemplate (*templatefunc)(struct bNode *)) +{ + ntype->templatefunc = templatefunc; +} + +void node_type_update(struct bNodeType *ntype, + void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node), + void (*verifyfunc)(struct bNodeTree *ntree, struct bNode *node, struct ID *id)) +{ + ntype->updatefunc = updatefunc; + ntype->verifyfunc = verifyfunc; +} + +void node_type_tree(struct bNodeType *ntype, void (*inittreefunc)(struct bNodeTree *), void (*updatetreefunc)(struct bNodeTree *)) +{ + ntype->inittreefunc = inittreefunc; + ntype->updatetreefunc = updatetreefunc; +} + +void node_type_group_edit(struct bNodeType *ntype, + struct bNodeTree *(*group_edit_get)(struct bNode *node), + struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit), + void (*group_edit_clear)(struct bNode *node)) +{ + ntype->group_edit_get = group_edit_get; + ntype->group_edit_set = group_edit_set; + ntype->group_edit_clear = group_edit_clear; +} + void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **)) { ntype->execfunc = execfunc; } +void node_type_exec_new(struct bNodeType *ntype, + void *(*initexecfunc)(struct bNode *node), + void (*freeexecfunc)(struct bNode *node, void *nodedata), + void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **)) +{ + ntype->initexecfunc = initexecfunc; + ntype->freeexecfunc = freeexecfunc; + ntype->newexecfunc = newexecfunc; +} + void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out)) { ntype->gpufunc = gpufunc; } -void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *)) +void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out)) { - ntype->labelfunc = labelfunc; + ntype->gpuextfunc = gpuextfunc; } -static bNodeType *is_nodetype_registered(ListBase *typelist, int type, ID *id) + +static bNodeType *is_nodetype_registered(ListBase *typelist, int type) { bNodeType *ntype= typelist->first; for(;ntype; ntype= ntype->next ) - if(ntype->type==type && ntype->id==id) + if(ntype->type==type) return ntype; return NULL; } -/* type can be from a static array, we make copy for duplicate types (like group) */ -void nodeRegisterType(ListBase *typelist, const bNodeType *ntype) +void nodeRegisterType(ListBase *typelist, bNodeType *ntype) { - bNodeType *found= is_nodetype_registered(typelist, ntype->type, ntype->id); + bNodeType *found= is_nodetype_registered(typelist, ntype->type); - if(found==NULL) { - bNodeType *ntypen= MEM_callocN(sizeof(bNodeType), "node type"); - *ntypen= *ntype; - BLI_addtail(typelist, ntypen); - } + if(found==NULL) + BLI_addtail(typelist, ntype); } static void registerCompositNodes(ListBase *ntypelist) { - register_node_type_group(ntypelist); + register_node_type_frame(ntypelist); + + register_node_type_cmp_group(ntypelist); +// register_node_type_cmp_forloop(ntypelist); +// register_node_type_cmp_whileloop(ntypelist); register_node_type_cmp_rlayers(ntypelist); register_node_type_cmp_image(ntypelist); @@ -3519,7 +1836,11 @@ static void registerCompositNodes(ListBase *ntypelist) static void registerShaderNodes(ListBase *ntypelist) { - register_node_type_group(ntypelist); + register_node_type_frame(ntypelist); + + register_node_type_sh_group(ntypelist); +// register_node_type_sh_forloop(ntypelist); +// register_node_type_sh_whileloop(ntypelist); register_node_type_sh_output(ntypelist); register_node_type_sh_mix_rgb(ntypelist); @@ -3548,7 +1869,11 @@ static void registerShaderNodes(ListBase *ntypelist) static void registerTextureNodes(ListBase *ntypelist) { - register_node_type_group(ntypelist); + register_node_type_frame(ntypelist); + + register_node_type_tex_group(ntypelist); +// register_node_type_tex_forloop(ntypelist); +// register_node_type_tex_whileloop(ntypelist); register_node_type_tex_math(ntypelist); register_node_type_tex_mix_rgb(ntypelist); @@ -3589,53 +1914,47 @@ static void registerTextureNodes(ListBase *ntypelist) register_node_type_tex_proc_distnoise(ntypelist); } -static void remove_dynamic_typeinfos(ListBase *list) +static void free_dynamic_typeinfo(bNodeType *ntype) { - bNodeType *ntype= list->first; - bNodeType *next= NULL; - while(ntype) { - next= ntype->next; - if(ntype->type==NODE_DYNAMIC && ntype->id!=NULL) { - BLI_remlink(list, ntype); - if(ntype->inputs) { - bNodeSocketType *sock= ntype->inputs; - while(sock->type!=-1) { - MEM_freeN((void *)sock->name); - sock++; - } - MEM_freeN(ntype->inputs); - } - if(ntype->outputs) { - bNodeSocketType *sock= ntype->outputs; - while(sock->type!=-1) { - MEM_freeN((void *)sock->name); - sock++; - } - MEM_freeN(ntype->outputs); - } - if(ntype->name) { - MEM_freeN((void *)ntype->name); - } - MEM_freeN(ntype); + if(ntype->type==NODE_DYNAMIC) { + if(ntype->inputs) { + MEM_freeN(ntype->inputs); + } + if(ntype->outputs) { + MEM_freeN(ntype->outputs); } - ntype= next; + if(ntype->name) { + MEM_freeN((void *)ntype->name); + } + } +} + +static void free_typeinfos(ListBase *list) +{ + bNodeType *ntype, *next; + for(ntype=list->first; ntype; ntype=next) { + next = ntype->next; + + if(ntype->type==NODE_DYNAMIC) + free_dynamic_typeinfo(ntype); + + if(ntype->needs_free) + MEM_freeN(ntype); } } void init_nodesystem(void) { - registerCompositNodes(&node_all_composit); - registerShaderNodes(&node_all_shaders); - registerTextureNodes(&node_all_textures); + registerCompositNodes(&ntreeGetType(NTREE_COMPOSIT)->node_types); + registerShaderNodes(&ntreeGetType(NTREE_SHADER)->node_types); + registerTextureNodes(&ntreeGetType(NTREE_TEXTURE)->node_types); } void free_nodesystem(void) { - /*remove_dynamic_typeinfos(&node_all_composit);*/ /* unused for now */ - BLI_freelistN(&node_all_composit); - remove_dynamic_typeinfos(&node_all_shaders); - BLI_freelistN(&node_all_shaders); - BLI_freelistN(&node_all_textures); + free_typeinfos(&ntreeGetType(NTREE_COMPOSIT)->node_types); + free_typeinfos(&ntreeGetType(NTREE_SHADER)->node_types); + free_typeinfos(&ntreeGetType(NTREE_TEXTURE)->node_types); } /* called from unlink_scene, when deleting a scene goes over all scenes diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 493baebd197..6119a855366 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -766,7 +766,9 @@ Tex *copy_texture(Tex *tex) if(tex->preview) texn->preview = BKE_previewimg_copy(tex->preview); if(tex->nodetree) { - ntreeEndExecTree(tex->nodetree); + if (tex->nodetree->execdata) { + ntreeTexEndExecTree(tex->nodetree->execdata); + } texn->nodetree= ntreeCopyTree(tex->nodetree); } diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index d8719f399ae..18955c158c6 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -66,6 +66,9 @@ void swap_m4m4(float A[4][4], float B[4][4]); void add_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]); void add_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]); +void sub_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]); +void sub_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]); + void mul_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]); void mul_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]); void mul_m4_m3m4(float R[4][4], float A[3][3], float B[4][4]); diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index c8b598a1e85..d30168c8657 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -124,6 +124,7 @@ void interp_v3_v3v3v3(float p[3], const float v1[3], const float v2[3], const fl void interp_v3_v3v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float w[4]); void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t); void interp_v4_v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float w[3]); +void interp_v4_v4v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float v4[4], const float w[4]); void mid_v3_v3v3(float r[3], const float a[3], const float b[3]); diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 3c79a77707a..e2f594376cb 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -451,6 +451,24 @@ void add_m4_m4m4(float m1[][4], float m2[][4], float m3[][4]) m1[i][j]= m2[i][j] + m3[i][j]; } +void sub_m3_m3m3(float m1[][3], float m2[][3], float m3[][3]) +{ + int i, j; + + for(i=0;i<3;i++) + for(j=0;j<3;j++) + m1[i][j]= m2[i][j] - m3[i][j]; +} + +void sub_m4_m4m4(float m1[][4], float m2[][4], float m3[][4]) +{ + int i, j; + + for(i=0;i<4;i++) + for(j=0;j<4;j++) + m1[i][j]= m2[i][j] - m3[i][j]; +} + int invert_m3(float m[3][3]) { float tmp[3][3]; diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 15d671e38d7..7dbceff46e4 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -96,6 +96,14 @@ void interp_v4_v4v4v4(float p[4], const float v1[4], const float v2[4], const fl p[3] = v1[3]*w[0] + v2[3]*w[1] + v3[3]*w[2]; } +void interp_v4_v4v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float v4[4], const float w[4]) +{ + p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2] + v4[0]*w[3]; + p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2] + v4[1]*w[3]; + p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2] + v4[2]*w[3]; + p[3] = v1[3]*w[0] + v2[3]*w[1] + v3[3]*w[2] + v4[3]*w[3]; +} + void mid_v3_v3v3(float v[3], const float v1[3], const float v2[3]) { v[0]= 0.5f*(v1[0] + v2[0]); diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index 4088481c844..ab00a8e90dd 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -30,6 +30,7 @@ set(INC ../blenlib ../makesdna ../makesrna + ../nodes ../render/extern/include ../../../intern/guardedalloc ) diff --git a/source/blender/blenloader/SConscript b/source/blender/blenloader/SConscript index be9908d84e6..d5d2df3ea35 100644 --- a/source/blender/blenloader/SConscript +++ b/source/blender/blenloader/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('intern/*.c') incs = '. #/intern/guardedalloc ../blenlib ../blenkernel' incs += ' ../makesdna ../editors/include' -incs += ' ../render/extern/include ../makesrna' +incs += ' ../render/extern/include ../makesrna ../nodes' incs += ' ' + env['BF_ZLIB_INC'] diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 363e98d7a4b..355fc14705a 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -134,6 +134,8 @@ #include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER TEST REND #include "BKE_sound.h" +#include "NOD_socket.h" + //XXX #include "BIF_butspace.h" // badlevel, for do_versions, patching event codes //XXX #include "BIF_filelist.h" // badlevel too, where to move this? - elubie //XXX #include "BIF_previewrender.h" // bedlelvel, for struct RenderInfo @@ -2052,10 +2054,21 @@ static void lib_link_nodetree(FileData *fd, Main *main) } } +static void lib_nodetree_init_types_cb(void *UNUSED(data), ID *UNUSED(id), bNodeTree *ntree) +{ + bNode *node; + + ntreeInitTypes(ntree); + + /* XXX could be replaced by do_versions for new nodes */ + for (node=ntree->nodes.first; node; node=node->next) + node_verify_socket_templates(ntree, node); +} + /* updates group node socket own_index so that * external links to/from the group node are preserved. */ -static void lib_node_do_versions_group(bNode *gnode) +static void lib_node_do_versions_group_indices(bNode *gnode) { bNodeTree *ngroup= (bNodeTree*)gnode->id; bNode *intnode; @@ -2088,92 +2101,101 @@ static void lib_node_do_versions_group(bNode *gnode) } /* updates external links for all group nodes in a tree */ -static void lib_nodetree_do_versions_group(bNodeTree *ntree) +static void lib_nodetree_do_versions_group_indices_cb(void *UNUSED(data), ID *UNUSED(id), bNodeTree *ntree) { bNode *node; for (node=ntree->nodes.first; node; node=node->next) { if (node->type==NODE_GROUP) { bNodeTree *ngroup= (bNodeTree*)node->id; - if (ngroup && (ngroup->flag & NTREE_DO_VERSIONS)) - lib_node_do_versions_group(node); + if (ngroup && (ngroup->flag & NTREE_DO_VERSIONS_GROUP_EXPOSE)) + lib_node_do_versions_group_indices(node); } } } +/* make an update call for the tree */ +static void lib_nodetree_do_versions_update_cb(void *UNUSED(data), ID *UNUSED(id), bNodeTree *ntree) +{ + if (ntree->update) + ntreeUpdateTree(ntree); +} + /* verify types for nodes and groups, all data has to be read */ /* open = 0: appending/linking, open = 1: open new file (need to clean out dynamic * typedefs*/ static void lib_verify_nodetree(Main *main, int UNUSED(open)) { - Scene *sce; - Material *ma; - Tex *tx; bNodeTree *ntree; - + int i; + bNodeTreeType *ntreetype; + /* this crashes blender on undo/redo if(open==1) { reinit_nodesystem(); }*/ - /* now create the own typeinfo structs an verify nodes */ - /* here we still assume no groups in groups */ - for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) { - ntreeVerifyTypes(ntree); /* internal nodes, no groups! */ + /* set node->typeinfo pointers */ + for (i=0; i < NUM_NTREE_TYPES; ++i) { + ntreetype= ntreeGetType(i); + if (ntreetype && ntreetype->foreach_nodetree) + ntreetype->foreach_nodetree(main, NULL, lib_nodetree_init_types_cb); } + for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) + ntreeInitTypes(ntree); { - /*int has_old_groups=0;*/ /*UNUSED*/ + int has_old_groups=0; /* XXX this should actually be part of do_versions, but since we need * finished library linking, it is not possible there. Instead in do_versions * we have set the NTREE_DO_VERSIONS flag, so at this point we can do the * actual group node updates. */ for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) { - if (ntree->flag & NTREE_DO_VERSIONS) { + if (ntree->flag & NTREE_DO_VERSIONS_GROUP_EXPOSE) { /* this adds copies and links from all unlinked internal sockets to group inputs/outputs. */ - nodeGroupExposeAllSockets(ntree); - /*has_old_groups = 1;*/ /*UNUSED*/ + node_group_expose_all_sockets(ntree); + has_old_groups = 1; } } - /* now verify all types in material trees, groups are set OK now */ - for(ma= main->mat.first; ma; ma= ma->id.next) { - if(ma->nodetree) - lib_nodetree_do_versions_group(ma->nodetree); - } - /* and scene trees */ - for(sce= main->scene.first; sce; sce= sce->id.next) { - if(sce->nodetree) - lib_nodetree_do_versions_group(sce->nodetree); - } - /* and texture trees */ - for(tx= main->tex.first; tx; tx= tx->id.next) { - if(tx->nodetree) - lib_nodetree_do_versions_group(tx->nodetree); + + if (has_old_groups) { + for (i=0; i < NUM_NTREE_TYPES; ++i) { + ntreetype= ntreeGetType(i); + if (ntreetype && ntreetype->foreach_nodetree) + ntreetype->foreach_nodetree(main, NULL, lib_nodetree_do_versions_group_indices_cb); + } } for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) - ntree->flag &= ~NTREE_DO_VERSIONS; + ntree->flag &= ~NTREE_DO_VERSIONS_GROUP_EXPOSE; } - - /* now verify all types in material trees, groups are set OK now */ - for(ma= main->mat.first; ma; ma= ma->id.next) { - if(ma->nodetree) - ntreeVerifyTypes(ma->nodetree); - } - /* and scene trees */ - for(sce= main->scene.first; sce; sce= sce->id.next) { - if(sce->nodetree) - ntreeVerifyTypes(sce->nodetree); + + /* verify all group user nodes */ + for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) { + ntreeVerifyNodes(main, &ntree->id); } - /* and texture trees */ - for(tx= main->tex.first; tx; tx= tx->id.next) { - if(tx->nodetree) - ntreeVerifyTypes(tx->nodetree); + + /* make update calls where necessary */ + { + for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) + if (ntree->update) + ntreeUpdateTree(ntree); + for (i=0; i < NUM_NTREE_TYPES; ++i) { + ntreetype= ntreeGetType(i); + if (ntreetype && ntreetype->foreach_nodetree) + ntreetype->foreach_nodetree(main, NULL, lib_nodetree_do_versions_update_cb); + } } } - +static void direct_link_node_socket(FileData *fd, bNodeSocket *sock) +{ + sock->link= newdataadr(fd, sock->link); + sock->storage= newdataadr(fd, sock->storage); + sock->default_value= newdataadr(fd, sock->default_value); + sock->cache= NULL; +} /* ntree itself has been read! */ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) @@ -2185,6 +2207,7 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) ntree->init= 0; /* to set callbacks and force setting types */ ntree->progress= NULL; + ntree->execdata= NULL; ntree->adt= newdataadr(fd, ntree->adt); direct_link_animdata(fd, ntree->adt); @@ -2197,9 +2220,11 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) node->typeinfo= NULL; } + link_list(fd, &node->inputs); + link_list(fd, &node->outputs); + node->storage= newdataadr(fd, node->storage); if(node->storage) { - /* could be handlerized at some point */ if(ntree->type==NTREE_SHADER && (node->type==SH_NODE_CURVE_VEC || node->type==SH_NODE_CURVE_RGB)) direct_link_curvemapping(fd, node->storage); @@ -2216,8 +2241,6 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) ((ImageUser *)node->storage)->ok= 1; } } - link_list(fd, &node->inputs); - link_list(fd, &node->outputs); } link_list(fd, &ntree->links); @@ -2227,15 +2250,19 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) /* and we connect the rest */ for(node= ntree->nodes.first; node; node= node->next) { + node->parent = newdataadr(fd, node->parent); node->preview= newimaadr(fd, node->preview); node->lasty= 0; + for(sock= node->inputs.first; sock; sock= sock->next) - sock->link= newdataadr(fd, sock->link); + direct_link_node_socket(fd, sock); for(sock= node->outputs.first; sock; sock= sock->next) - sock->ns.data= NULL; + direct_link_node_socket(fd, sock); } + for(sock= ntree->inputs.first; sock; sock= sock->next) + direct_link_node_socket(fd, sock); for(sock= ntree->outputs.first; sock; sock= sock->next) - sock->link= newdataadr(fd, sock->link); + direct_link_node_socket(fd, sock); for(link= ntree->links.first; link; link= link->next) { link->fromnode= newdataadr(fd, link->fromnode); @@ -4957,15 +4984,22 @@ static void lib_link_screen(FileData *fd, Main *main) SpaceNode *snode= (SpaceNode *)sl; snode->id= newlibadr(fd, sc->id.lib, snode->id); + snode->edittree= NULL; - /* internal data, a bit patchy */ - if(snode->id) { - if(GS(snode->id->name)==ID_MA) - snode->nodetree= ((Material *)snode->id)->nodetree; - else if(GS(snode->id->name)==ID_SCE) - snode->nodetree= ((Scene *)snode->id)->nodetree; - else if(GS(snode->id->name)==ID_TE) - snode->nodetree= ((Tex *)snode->id)->nodetree; + if (ELEM3(snode->treetype, NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE)) { + /* internal data, a bit patchy */ + snode->nodetree= NULL; + if(snode->id) { + if(GS(snode->id->name)==ID_MA) + snode->nodetree= ((Material *)snode->id)->nodetree; + else if(GS(snode->id->name)==ID_SCE) + snode->nodetree= ((Scene *)snode->id)->nodetree; + else if(GS(snode->id->name)==ID_TE) + snode->nodetree= ((Tex *)snode->id)->nodetree; + } + } + else { + snode->nodetree= newlibadr_us(fd, sc->id.lib, snode->nodetree); } snode->linkdrag.first = snode->linkdrag.last = NULL; @@ -5185,15 +5219,19 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) snode->id= restore_pointer_by_name(newmain, snode->id, 1); snode->edittree= NULL; - if(snode->id==NULL) + if (ELEM3(snode->treetype, NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE)) { snode->nodetree= NULL; + if(snode->id) { + if(GS(snode->id->name)==ID_MA) + snode->nodetree= ((Material *)snode->id)->nodetree; + else if(GS(snode->id->name)==ID_SCE) + snode->nodetree= ((Scene *)snode->id)->nodetree; + else if(GS(snode->id->name)==ID_TE) + snode->nodetree= ((Tex *)snode->id)->nodetree; + } + } else { - if(GS(snode->id->name)==ID_MA) - snode->nodetree= ((Material *)snode->id)->nodetree; - else if(GS(snode->id->name)==ID_SCE) - snode->nodetree= ((Scene *)snode->id)->nodetree; - else if(GS(snode->id->name)==ID_TE) - snode->nodetree= ((Tex *)snode->id)->nodetree; + snode->nodetree= restore_pointer_by_name(newmain, &snode->nodetree->id, 1); } } } @@ -5422,7 +5460,6 @@ static void direct_link_screen(FileData *fd, bScreen *sc) snode->gpd= newdataadr(fd, snode->gpd); direct_link_gpencil(fd, snode->gpd); } - snode->nodetree= snode->edittree= NULL; } else if(sl->spacetype==SPACE_TIME) { SpaceTime *stime= (SpaceTime *)sl; @@ -6931,6 +6968,53 @@ static void do_version_bone_roll_256(Bone *bone) do_version_bone_roll_256(child); } +static void do_versions_socket_default_value(bNodeSocket *sock) +{ + bNodeSocketValueFloat *valfloat; + bNodeSocketValueVector *valvector; + bNodeSocketValueRGBA *valrgba; + + if (sock->default_value) + return; + + switch (sock->type) { + case SOCK_FLOAT: + valfloat = sock->default_value = MEM_callocN(sizeof(bNodeSocketValueFloat), "default socket value"); + valfloat->value = sock->ns.vec[0]; + valfloat->min = sock->ns.min; + valfloat->max = sock->ns.max; + valfloat->subtype = PROP_NONE; + break; + case SOCK_VECTOR: + valvector = sock->default_value = MEM_callocN(sizeof(bNodeSocketValueVector), "default socket value"); + copy_v3_v3(valvector->value, sock->ns.vec); + valvector->min = sock->ns.min; + valvector->max = sock->ns.max; + valvector->subtype = PROP_NONE; + break; + case SOCK_RGBA: + valrgba = sock->default_value = MEM_callocN(sizeof(bNodeSocketValueRGBA), "default socket value"); + copy_v4_v4(valrgba->value, sock->ns.vec); + break; + } +} + +static void do_versions_nodetree_default_value(bNodeTree *ntree) +{ + bNode *node; + bNodeSocket *sock; + for (node=ntree->nodes.first; node; node=node->next) { + for (sock=node->inputs.first; sock; sock=sock->next) + do_versions_socket_default_value(sock); + for (sock=node->outputs.first; sock; sock=sock->next) + do_versions_socket_default_value(sock); + } + for (sock=ntree->inputs.first; sock; sock=sock->next) + do_versions_socket_default_value(sock); + for (sock=ntree->outputs.first; sock; sock=sock->next) + do_versions_socket_default_value(sock); +} + static void do_versions(FileData *fd, Library *lib, Main *main) { /* WATCH IT!!!: pointers from libdata have not been converted */ @@ -11582,7 +11666,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) * is done in lib_verify_nodetree, because at this point the internal * nodes may not be up-to-date! (missing lib-link) */ - ntree->flag |= NTREE_DO_VERSIONS; + ntree->flag |= NTREE_DO_VERSIONS_GROUP_EXPOSE; } } @@ -11707,10 +11791,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if(tex->pd) { if (tex->pd->falloff_speed_scale == 0.0f) tex->pd->falloff_speed_scale = 100.0f; - + if (!tex->pd->falloff_curve) { tex->pd->falloff_curve = curvemapping_add(1, 0, 0, 1, 1); - + tex->pd->falloff_curve->preset = CURVE_PRESET_LINE; tex->pd->falloff_curve->cm->flag &= ~CUMA_EXTEND_EXTRAPOLATE; curvemap_reset(tex->pd->falloff_curve->cm, &tex->pd->falloff_curve->clipr, tex->pd->falloff_curve->preset, CURVEMAP_SLOPE_POSITIVE); @@ -11861,6 +11945,35 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 2)){ + { + /* Convert default socket values from bNodeStack */ + Scene *sce; + Material *mat; + Tex *tex; + bNodeTree *ntree; + for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next) { + do_versions_nodetree_default_value(ntree); + ntree->update |= NTREE_UPDATE; + } + for (sce=main->scene.first; sce; sce=sce->id.next) + if (sce->nodetree) { + do_versions_nodetree_default_value(sce->nodetree); + sce->nodetree->update |= NTREE_UPDATE; + } + for (mat=main->mat.first; mat; mat=mat->id.next) + if (mat->nodetree) { + do_versions_nodetree_default_value(mat->nodetree); + mat->nodetree->update |= NTREE_UPDATE; + } + for (tex=main->tex.first; tex; tex=tex->id.next) + if (tex->nodetree) { + do_versions_nodetree_default_value(tex->nodetree); + tex->nodetree->update |= NTREE_UPDATE; + } + } + } + /* put compatibility code here until next subversion bump */ { diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 406a9bdc02e..b982630ec41 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -642,6 +642,14 @@ static void write_curvemapping(WriteData *wd, CurveMapping *cumap) writestruct(wd, DATA, "CurveMapPoint", cumap->cm[a].totpoint, cumap->cm[a].curve); } +static void write_node_socket(WriteData *wd, bNodeSocket *sock) +{ + bNodeSocketType *stype= ntreeGetSocketType(sock->type); + writestruct(wd, DATA, "bNodeSocket", 1, sock); + if (sock->default_value) + writestruct(wd, DATA, stype->value_structname, 1, sock->default_value); +} + /* this is only direct data, tree itself should have been written */ static void write_nodetree(WriteData *wd, bNodeTree *ntree) { @@ -657,6 +665,12 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree) writestruct(wd, DATA, "bNode", 1, node); for(node= ntree->nodes.first; node; node= node->next) { + for(sock= node->inputs.first; sock; sock= sock->next) + write_node_socket(wd, sock); + for(sock= node->outputs.first; sock; sock= sock->next) + write_node_socket(wd, sock); + + if(node->storage && node->type!=NODE_DYNAMIC) { /* could be handlerized at some point, now only 1 exception still */ if(ntree->type==NTREE_SHADER && (node->type==SH_NODE_CURVE_VEC || node->type==SH_NODE_CURVE_RGB)) @@ -665,13 +679,9 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree) write_curvemapping(wd, node->storage); else if(ntree->type==NTREE_TEXTURE && (node->type==TEX_NODE_CURVE_RGB || node->type==TEX_NODE_CURVE_TIME) ) write_curvemapping(wd, node->storage); - else + else writestruct(wd, DATA, node->typeinfo->storagename, 1, node->storage); } - for(sock= node->inputs.first; sock; sock= sock->next) - writestruct(wd, DATA, "bNodeSocket", 1, sock); - for(sock= node->outputs.first; sock; sock= sock->next) - writestruct(wd, DATA, "bNodeSocket", 1, sock); } for(link= ntree->links.first; link; link= link->next) @@ -679,9 +689,9 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree) /* external sockets */ for(sock= ntree->inputs.first; sock; sock= sock->next) - writestruct(wd, DATA, "bNodeSocket", 1, sock); + write_node_socket(wd, sock); for(sock= ntree->outputs.first; sock; sock= sock->next) - writestruct(wd, DATA, "bNodeSocket", 1, sock); + write_node_socket(wd, sock); } static void current_screen_compat(Main *mainvar, bScreen **screen) @@ -933,7 +943,7 @@ static void write_particlesystems(WriteData *wd, ListBase *particles) writestruct(wd, DATA, "ClothSimSettings", 1, psys->clmd->sim_parms); writestruct(wd, DATA, "ClothCollSettings", 1, psys->clmd->coll_parms); } - + write_pointcaches(wd, &psys->ptcaches); } } diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index cc4dd6330fb..1cbf45960d3 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -39,6 +39,7 @@ struct Material; struct Scene; struct Tex; struct bContext; +struct bNodeTree; struct bNode; struct bNodeTree; struct ScrArea; @@ -47,6 +48,7 @@ struct ScrArea; void ED_init_node_butfuncs(void); /* node_draw.c */ +void ED_node_tree_update(struct SpaceNode *snode, struct Scene *scene); void ED_node_changed_update(struct ID *id, struct bNode *node); void ED_node_generic_update(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node); @@ -57,8 +59,9 @@ void ED_node_texture_default(struct Tex *tex); void ED_node_link_intersect_test(struct ScrArea *sa, int test); void ED_node_link_insert(struct ScrArea *sa); -void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node); +void ED_node_update_hierarchy(struct bContext *C, struct bNodeTree *ntree); +void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node); /* node ops.c */ void ED_operatormacros_node(void); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index d69c1d9c447..9539706468f 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -60,6 +60,7 @@ #include "DNA_brush_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" +#include "DNA_node_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_texture_types.h" @@ -4663,7 +4664,7 @@ static void paint_brush_init_tex(Brush *brush) if(brush) { MTex *mtex= &brush->mtex; if(mtex->tex && mtex->tex->nodetree) - ntreeBeginExecTree(mtex->tex->nodetree); /* has internal flag to detect it only does it once */ + ntreeTexBeginExecTree(mtex->tex->nodetree); /* has internal flag to detect it only does it once */ } } @@ -4805,7 +4806,7 @@ static void paint_brush_exit_tex(Brush *brush) if(brush) { MTex *mtex= &brush->mtex; if(mtex->tex && mtex->tex->nodetree) - ntreeEndExecTree(mtex->tex->nodetree); + ntreeTexEndExecTree(mtex->tex->nodetree->execdata); } } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 2ee49f71a78..bf34a3b8c9f 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -48,6 +48,7 @@ #include "BLI_rand.h" #include "DNA_meshdata_types.h" +#include "DNA_node_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_brush_types.h" @@ -3273,7 +3274,7 @@ static void sculpt_brush_init_tex(Sculpt *sd, SculptSession *ss) /* init mtex nodes */ if(mtex->tex && mtex->tex->nodetree) - ntreeBeginExecTree(mtex->tex->nodetree); /* has internal flag to detect it only does it once */ + ntreeTexBeginExecTree(mtex->tex->nodetree); /* has internal flag to detect it only does it once */ /* TODO: Shouldn't really have to do this at the start of every stroke, but sculpt would need some sort of notification when @@ -3454,7 +3455,7 @@ static void sculpt_brush_exit_tex(Sculpt *sd) MTex *mtex= &brush->mtex; if(mtex->tex && mtex->tex->nodetree) - ntreeEndExecTree(mtex->tex->nodetree); + ntreeTexEndExecTree(mtex->tex->nodetree->execdata); } static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke)) diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 0474d1f3bb1..890b04dce91 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -53,9 +53,10 @@ #include "BKE_image.h" #include "BKE_library.h" #include "BKE_main.h" +#include "BKE_node.h" -#include "CMP_node.h" -#include "SHD_node.h" +#include "NOD_composite.h" +#include "NOD_shader.h" #include "BIF_gl.h" #include "BIF_glutil.h" @@ -81,6 +82,141 @@ #include "node_intern.h" +// XXX interface.h +extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select); + +/* ****************** SOCKET BUTTON DRAW FUNCTIONS ***************** */ + +static void node_sync_cb(bContext *UNUSED(C), void *snode_v, void *node_v) +{ + SpaceNode *snode= snode_v; + + if(snode->treetype==NTREE_SHADER) { + nodeShaderSynchronizeID(node_v, 1); + // allqueue(REDRAWBUTSSHADING, 0); + } +} + +void node_socket_button_default(const bContext *C, uiBlock *block, + bNodeTree *ntree, bNode *node, bNodeSocket *sock, + const char *name, int x, int y, int width) +{ + PointerRNA ptr; + uiBut *bt; + + RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr); + + bt = uiDefButR(block, NUM, B_NODE_EXEC, name, + x, y+1, width, NODE_DY-2, + &ptr, "default_value", 0, 0, 0, -1, -1, NULL); + if (node) + uiButSetFunc(bt, node_sync_cb, CTX_wm_space_node(C), node); +} + +typedef struct SocketComponentMenuArgs { + PointerRNA ptr; + int x, y, width; + uiButHandleFunc cb; + void *arg1, *arg2; +} SocketComponentMenuArgs; +/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */ +static uiBlock *socket_component_menu(bContext *C, ARegion *ar, void *args_v) +{ + SocketComponentMenuArgs *args= (SocketComponentMenuArgs*)args_v; + uiBlock *block; + uiLayout *layout; + + block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS); + uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN); + + layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, U.uistyles.first), 0); + + uiItemR(layout, &args->ptr, "default_value", UI_ITEM_R_EXPAND, "", ICON_NONE); + + return block; +} +void node_socket_button_components(const bContext *C, uiBlock *block, + bNodeTree *ntree, bNode *node, bNodeSocket *sock, + const char *name, int x, int y, int width) +{ + PointerRNA ptr; + SocketComponentMenuArgs *args; + + RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr); + + args= MEM_callocN(sizeof(SocketComponentMenuArgs), "SocketComponentMenuArgs"); + + args->ptr = ptr; + args->x = x; + args->y = y; + args->width = width; + args->cb = node_sync_cb; + args->arg1 = CTX_wm_space_node(C); + args->arg2 = node; + + uiDefBlockButN(block, socket_component_menu, args, name, x, y+1, width, NODE_DY-2, ""); +} + +void node_socket_button_color(const bContext *C, uiBlock *block, + bNodeTree *ntree, bNode *node, bNodeSocket *sock, + const char *name, int x, int y, int width) +{ + PointerRNA ptr; + uiBut *bt; + int labelw= width - 40; + + RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr); + + bt=uiDefButR(block, COL, B_NODE_EXEC, "", + x, y+2, (labelw>0 ? 40 : width), NODE_DY-2, + &ptr, "default_value", 0, 0, 0, -1, -1, NULL); + if (node) + uiButSetFunc(bt, node_sync_cb, CTX_wm_space_node(C), node); + + if (name[0]!='\0' && labelw>0) + uiDefBut(block, LABEL, 0, name, x + 40, y+2, labelw, NODE_DY-2, NULL, 0, 0, 0, 0, ""); +} + +/* ****************** BASE DRAW FUNCTIONS FOR NEW OPERATOR NODES ***************** */ + +void node_draw_socket_new(bNodeSocket *sock, float size) +{ + float x=sock->locx, y=sock->locy; + + /* 16 values of sin function */ + static float si[16] = { + 0.00000000f, 0.39435585f,0.72479278f,0.93775213f, + 0.99871650f,0.89780453f,0.65137248f,0.29936312f, + -0.10116832f,-0.48530196f,-0.79077573f,-0.96807711f, + -0.98846832f,-0.84864425f,-0.57126821f,-0.20129852f + }; + /* 16 values of cos function */ + static float co[16] ={ + 1.00000000f,0.91895781f,0.68896691f,0.34730525f, + -0.05064916f,-0.44039415f,-0.75875812f,-0.95413925f, + -0.99486932f,-0.87434661f,-0.61210598f,-0.25065253f, + 0.15142777f,0.52896401f,0.82076344f,0.97952994f, + }; + int a; + + glColor3ub(180, 180, 180); + + glBegin(GL_POLYGON); + for(a=0; a<16; a++) + glVertex2f(x+size*si[a], y+size*co[a]); + glEnd(); + + glColor4ub(0, 0, 0, 150); + glEnable(GL_BLEND); + glEnable( GL_LINE_SMOOTH ); + glBegin(GL_LINE_LOOP); + for(a=0; a<16; a++) + glVertex2f(x+size*si[a], y+size*co[a]); + glEnd(); + glDisable( GL_LINE_SMOOTH ); + glDisable(GL_BLEND); +} + /* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */ static void node_buts_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) @@ -192,11 +328,12 @@ static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA * bNode *node= ptr->data; rctf *butr= &node->butr; bNodeSocket *sock= node->outputs.first; /* first socket stores normal */ + float *nor= ((bNodeSocketValueVector*)sock->default_value)->value; uiBut *bt; bt= uiDefButF(block, BUT_NORMAL, B_NODE_EXEC, "", (short)butr->xmin, (short)butr->xmin, butr->xmax-butr->xmin, butr->xmax-butr->xmin, - sock->ns.vec, 0.0f, 1.0f, 0, 0, ""); + nor, 0.0f, 1.0f, 0, 0, ""); uiButSetFunc(bt, node_normal_cb, ntree, node); } #if 0 // not used in 2.5x yet @@ -287,6 +424,470 @@ static void node_buts_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *pt uiItemR(layout, ptr, "operation", 0, "", ICON_NONE); } +static int node_resize_area_default(bNode *node, int x, int y) +{ + if (node->flag & NODE_HIDDEN) { + rctf totr= node->totr; + /* right part of node */ + totr.xmin= node->totr.xmax-20.0f; + return BLI_in_rctf(&totr, x, y); + } + else { + /* rect we're interested in is just the bottom right corner */ + rctf totr= node->totr; + /* bottom right corner */ + totr.xmin= totr.xmax-10.0f; + totr.ymax= totr.ymin+10.0f; + return BLI_in_rctf(&totr, x, y); + } +} + +/* ****************** BUTTON CALLBACKS FOR COMMON NODES ***************** */ + +/* width of socket columns in group display */ +#define NODE_GROUP_FRAME 120 + +/* based on settings in node, sets drawing rect info. each redraw! */ +/* note: this assumes only 1 group at a time is drawn (linked data) */ +/* in node->totr the entire boundbox for the group is stored */ +static void node_update_group(const bContext *C, bNodeTree *ntree, bNode *gnode) +{ + if (!(gnode->flag & NODE_GROUP_EDIT)) { + node_update_default(C, ntree, gnode); + } + else { + bNodeTree *ngroup= (bNodeTree *)gnode->id; + bNode *node; + bNodeSocket *sock, *gsock; + float locx, locy; + rctf *rect= &gnode->totr; + float node_group_frame= U.dpi*NODE_GROUP_FRAME/72; + int counter; + int dy; + + /* get "global" coords */ + nodeSpaceCoords(gnode, &locx, &locy); + + /* center them, is a bit of abuse of locx and locy though */ + node_update_nodetree(C, ngroup, locx, locy); + + rect->xmin = rect->xmax = locx; + rect->ymin = rect->ymax = locy; + + counter= 1; + for(node= ngroup->nodes.first; node; node= node->next) { + if(counter) { + *rect= node->totr; + counter= 0; + } + else + BLI_union_rctf(rect, &node->totr); + } + + /* add some room for links to group sockets */ + rect->xmin -= 4*NODE_DY; + rect->xmax += 4*NODE_DY; + rect->ymin-= NODE_DY; + rect->ymax+= NODE_DY; + + /* input sockets */ + dy = 0.5f*(rect->ymin+rect->ymax) + NODE_DY*(BLI_countlist(&gnode->inputs)-1); + gsock=ngroup->inputs.first; + sock=gnode->inputs.first; + while (gsock || sock) { + while (sock && !sock->groupsock) { + sock->locx = rect->xmin - node_group_frame; + sock->locy = dy; + + /* prevent long socket lists from growing out of the group box */ + if (dy-3*NODE_DYS < rect->ymin) + rect->ymin = dy-3*NODE_DYS; + if (dy+3*NODE_DYS > rect->ymax) + rect->ymax = dy+3*NODE_DYS; + dy -= 2*NODE_DY; + + sock = sock->next; + } + while (gsock && (!sock || sock->groupsock!=gsock)) { + gsock->locx = rect->xmin; + gsock->locy = dy; + + /* prevent long socket lists from growing out of the group box */ + if (dy-3*NODE_DYS < rect->ymin) + rect->ymin = dy-3*NODE_DYS; + if (dy+3*NODE_DYS > rect->ymax) + rect->ymax = dy+3*NODE_DYS; + dy -= 2*NODE_DY; + + gsock = gsock->next; + } + while (sock && gsock && sock->groupsock==gsock) { + gsock->locx = rect->xmin; + sock->locx = rect->xmin - node_group_frame; + sock->locy = gsock->locy = dy; + + /* prevent long socket lists from growing out of the group box */ + if (dy-3*NODE_DYS < rect->ymin) + rect->ymin = dy-3*NODE_DYS; + if (dy+3*NODE_DYS > rect->ymax) + rect->ymax = dy+3*NODE_DYS; + dy -= 2*NODE_DY; + + sock = sock->next; + gsock = gsock->next; + } + } + + /* output sockets */ + dy = 0.5f*(rect->ymin+rect->ymax) + NODE_DY*(BLI_countlist(&gnode->outputs)-1); + gsock=ngroup->outputs.first; + sock=gnode->outputs.first; + while (gsock || sock) { + while (sock && !sock->groupsock) { + sock->locx = rect->xmax + node_group_frame; + sock->locy = dy - NODE_DYS; + + /* prevent long socket lists from growing out of the group box */ + if (dy-3*NODE_DYS < rect->ymin) + rect->ymin = dy-3*NODE_DYS; + if (dy+3*NODE_DYS > rect->ymax) + rect->ymax = dy+3*NODE_DYS; + dy -= 2*NODE_DY; + + sock = sock->next; + } + while (gsock && (!sock || sock->groupsock!=gsock)) { + gsock->locx = rect->xmax; + gsock->locy = dy - NODE_DYS; + + /* prevent long socket lists from growing out of the group box */ + if (dy-3*NODE_DYS < rect->ymin) + rect->ymin = dy-3*NODE_DYS; + if (dy+3*NODE_DYS > rect->ymax) + rect->ymax = dy+3*NODE_DYS; + dy -= 2*NODE_DY; + + gsock = gsock->next; + } + while (sock && gsock && sock->groupsock==gsock) { + gsock->locx = rect->xmax; + sock->locx = rect->xmax + node_group_frame; + sock->locy = gsock->locy = dy - NODE_DYS; + + /* prevent long socket lists from growing out of the group box */ + if (dy-3*NODE_DYS < rect->ymin) + rect->ymin = dy-3*NODE_DYS; + if (dy+3*NODE_DYS > rect->ymax) + rect->ymax = dy+3*NODE_DYS; + dy -= 2*NODE_DY; + + sock = sock->next; + gsock = gsock->next; + } + } + } +} + +static void update_group_input_cb(bContext *UNUSED(C), void *UNUSED(snode_v), void *ngroup_v) +{ + bNodeTree *ngroup= (bNodeTree*)ngroup_v; + + ngroup->update |= NTREE_UPDATE_GROUP_IN; + ntreeUpdateTree(ngroup); +} + +static void update_group_output_cb(bContext *UNUSED(C), void *UNUSED(snode_v), void *ngroup_v) +{ + bNodeTree *ngroup= (bNodeTree*)ngroup_v; + + ngroup->update |= NTREE_UPDATE_GROUP_OUT; + ntreeUpdateTree(ngroup); +} + +static void draw_group_socket_name(SpaceNode *snode, bNode *gnode, bNodeSocket *sock, int in_out, float xoffset, float yoffset) +{ + bNodeTree *ngroup= (bNodeTree*)gnode->id; + uiBut *bt; + + if (sock->flag & SOCK_DYNAMIC) { + bt = uiDefBut(gnode->block, TEX, 0, "", + sock->locx+xoffset, sock->locy+1+yoffset, 72, NODE_DY, + sock->name, 0, 31, 0, 0, ""); + if (in_out==SOCK_IN) + uiButSetFunc(bt, update_group_input_cb, snode, ngroup); + else + uiButSetFunc(bt, update_group_output_cb, snode, ngroup); + } + else { + uiDefBut(gnode->block, LABEL, 0, sock->name, + sock->locx+xoffset, sock->locy+1+yoffset, 72, NODE_DY, + NULL, 0, 31, 0, 0, ""); + } +} + +static void draw_group_socket(const bContext *C, SpaceNode *snode, bNodeTree *ntree, bNode *gnode, bNodeSocket *sock, bNodeSocket *gsock, int index, int in_out) +{ + bNodeTree *ngroup= (bNodeTree*)gnode->id; + bNodeSocketType *stype= ntreeGetSocketType(gsock ? gsock->type : sock->type); + uiBut *bt; + float offset; + int draw_value; + float node_group_frame= U.dpi*NODE_GROUP_FRAME/72; + float socket_size= NODE_SOCKSIZE*U.dpi/72; + float arrowbutw= 0.8f*UI_UNIT_X; + /* layout stuff for buttons on group left frame */ + float colw= 0.6f*node_group_frame; + float col1= 6; + float col2= col1 + colw+6; + float col3= node_group_frame - arrowbutw - 6; + /* layout stuff for buttons on group right frame */ + float cor1= 6; + float cor2= cor1 + arrowbutw + 6; + float cor3= cor2 + arrowbutw + 6; + + /* node and group socket circles */ + if (sock) + node_socket_circle_draw(ntree, sock, socket_size); + if (gsock) + node_socket_circle_draw(ngroup, gsock, socket_size); + + /* socket name */ + offset = (in_out==SOCK_IN ? col1 : cor3); + if (!gsock) + offset += (in_out==SOCK_IN ? node_group_frame : -node_group_frame); + + /* draw both name and value button if: + * 1) input: not internal + * 2) output: (node type uses const outputs) and (group output is unlinked) + */ + switch (in_out) { + case SOCK_IN: + draw_value = !(gsock && (gsock->flag & SOCK_INTERNAL)); + break; + case SOCK_OUT: + if (gnode->typeinfo->flag & NODE_CONST_OUTPUT) + draw_value = !(gsock && gsock->link); + else + draw_value = 0; + break; + } + if (draw_value) { + /* both name and value buttons */ + if (gsock) { + draw_group_socket_name(snode, gnode, gsock, in_out, offset, 0); + if (stype->buttonfunc) + stype->buttonfunc(C, gnode->block, ngroup, NULL, gsock, "", gsock->locx+offset, gsock->locy-NODE_DY, colw); + } + else { + draw_group_socket_name(snode, gnode, sock, in_out, offset, 0); + if (stype->buttonfunc) + stype->buttonfunc(C, gnode->block, ngroup, NULL, sock, "", sock->locx+offset, sock->locy-NODE_DY, colw); + } + } + else { + /* only name, no value button */ + if (gsock) + draw_group_socket_name(snode, gnode, gsock, in_out, offset, -NODE_DYS); + else + draw_group_socket_name(snode, gnode, sock, in_out, offset, -NODE_DYS); + } + + if (gsock && (gsock->flag & SOCK_DYNAMIC)) { + /* up/down buttons */ + offset = (in_out==SOCK_IN ? col2 : cor2); + uiBlockSetDirection(gnode->block, UI_TOP); + uiBlockBeginAlign(gnode->block); + bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_up", 0, ICON_TRIA_UP, + gsock->locx+offset, gsock->locy, arrowbutw, arrowbutw, ""); + if (!gsock->prev || !(gsock->prev->flag & SOCK_DYNAMIC)) + uiButSetFlag(bt, UI_BUT_DISABLED); + RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index); + RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", in_out); + bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_down", 0, ICON_TRIA_DOWN, + gsock->locx+offset, gsock->locy-arrowbutw, arrowbutw, arrowbutw, ""); + if (!gsock->next || !(gsock->next->flag & SOCK_DYNAMIC)) + uiButSetFlag(bt, UI_BUT_DISABLED); + RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index); + RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", in_out); + uiBlockEndAlign(gnode->block); + uiBlockSetDirection(gnode->block, 0); + + /* remove button */ + offset = (in_out==SOCK_IN ? col3 : col1); + uiBlockSetEmboss(gnode->block, UI_EMBOSSN); + bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_remove", 0, ICON_X, + gsock->locx+offset, gsock->locy-0.5f*arrowbutw, arrowbutw, arrowbutw, ""); + RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index); + RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", in_out); + uiBlockSetEmboss(gnode->block, UI_EMBOSS); + } +} + +/* groups are, on creation, centered around 0,0 */ +static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *gnode) +{ + if (!(gnode->flag & NODE_GROUP_EDIT)) { + node_draw_default(C, ar, snode, ntree, gnode); + } + else { + bNodeTree *ngroup= (bNodeTree *)gnode->id; + bNodeSocket *sock, *gsock; + uiLayout *layout; + PointerRNA ptr; + rctf rect= gnode->totr; + float node_group_frame= U.dpi*NODE_GROUP_FRAME/72; + float group_header= 26*U.dpi/72; + + int index; + + /* backdrop header */ + glEnable(GL_BLEND); + uiSetRoundBox(3); + UI_ThemeColorShadeAlpha(TH_NODE_GROUP, 0, -70); + uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymax, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD); + + /* backdrop body */ + UI_ThemeColorShadeAlpha(TH_BACK, -8, -70); + uiSetRoundBox(0); + uiDrawBox(GL_POLYGON, rect.xmin, rect.ymin, rect.xmax, rect.ymax, BASIS_RAD); + + /* input column */ + UI_ThemeColorShadeAlpha(TH_BACK, 10, -50); + uiSetRoundBox(8); + uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymin, rect.xmin, rect.ymax, BASIS_RAD); + + /* output column */ + UI_ThemeColorShadeAlpha(TH_BACK, 10, -50); + uiSetRoundBox(4); + uiDrawBox(GL_POLYGON, rect.xmax, rect.ymin, rect.xmax+node_group_frame, rect.ymax, BASIS_RAD); + + /* input column separator */ + glColor4ub(200, 200, 200, 140); + glBegin(GL_LINES); + glVertex2f(rect.xmin, rect.ymin); + glVertex2f(rect.xmin, rect.ymax); + glEnd(); + + /* output column separator */ + glColor4ub(200, 200, 200, 140); + glBegin(GL_LINES); + glVertex2f(rect.xmax, rect.ymin); + glVertex2f(rect.xmax, rect.ymax); + glEnd(); + + /* group node outline */ + uiSetRoundBox(15); + glColor4ub(200, 200, 200, 140); + glEnable( GL_LINE_SMOOTH ); + uiDrawBox(GL_LINE_LOOP, rect.xmin-node_group_frame, rect.ymin, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD); + glDisable( GL_LINE_SMOOTH ); + glDisable(GL_BLEND); + + /* backdrop title */ + UI_ThemeColor(TH_TEXT_HI); + + layout = uiBlockLayout(gnode->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, (short)(rect.xmin+15), (short)(rect.ymax+group_header), + MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, U.uistyles.first); + RNA_pointer_create(&ntree->id, &RNA_Node, gnode, &ptr); + uiTemplateIDBrowse(layout, (bContext*)C, &ptr, "node_tree", NULL, NULL, NULL); + uiBlockLayoutResolve(gnode->block, NULL, NULL); + + /* draw the internal tree nodes and links */ + node_draw_nodetree(C, ar, snode, ngroup); + + /* group sockets */ + gsock=ngroup->inputs.first; + sock=gnode->inputs.first; + index = 0; + while (gsock || sock) { + while (sock && !sock->groupsock) { + draw_group_socket(C, snode, ntree, gnode, sock, NULL, index, SOCK_IN); + sock = sock->next; + } + while (gsock && (!sock || sock->groupsock!=gsock)) { + draw_group_socket(C, snode, ntree, gnode, NULL, gsock, index, SOCK_IN); + gsock = gsock->next; + ++index; + } + while (sock && gsock && sock->groupsock==gsock) { + draw_group_socket(C, snode, ntree, gnode, sock, gsock, index, SOCK_IN); + sock = sock->next; + gsock = gsock->next; + ++index; + } + } + gsock=ngroup->outputs.first; + sock=gnode->outputs.first; + index = 0; + while (gsock || sock) { + while (sock && !sock->groupsock) { + draw_group_socket(C, snode, ntree, gnode, sock, NULL, index, SOCK_OUT); + sock = sock->next; + } + while (gsock && (!sock || sock->groupsock!=gsock)) { + draw_group_socket(C, snode, ntree, gnode, NULL, gsock, index, SOCK_OUT); + gsock = gsock->next; + ++index; + } + while (sock && gsock && sock->groupsock==gsock) { + draw_group_socket(C, snode, ntree, gnode, sock, gsock, index, SOCK_OUT); + sock = sock->next; + gsock = gsock->next; + ++index; + } + } + + uiEndBlock(C, gnode->block); + uiDrawBlock(C, gnode->block); + gnode->block= NULL; + } +} + +static void node_common_buts_whileloop(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "max_iterations", 0, NULL, 0); +} + +static void node_update_frame(const bContext *UNUSED(C), bNodeTree *UNUSED(ntree), bNode *node) +{ + float locx, locy; + + /* get "global" coords */ + nodeSpaceCoords(node, &locx, &locy); + + node->prvr.xmin= locx + NODE_DYS; + node->prvr.xmax= locx + node->width- NODE_DYS; + + node->totr.xmin= locx; + node->totr.xmax= locx + node->width; + node->totr.ymax= locy; + node->totr.ymin= locy - node->height; +} + +static void node_common_set_butfunc(bNodeType *ntype) +{ + switch(ntype->type) { + case NODE_GROUP: +// ntype->uifunc= node_common_buts_group; + ntype->drawfunc= node_draw_group; + ntype->drawupdatefunc= node_update_group; + break; + case NODE_FORLOOP: +// ntype->uifunc= node_common_buts_group; + ntype->drawfunc= node_draw_group; + ntype->drawupdatefunc= node_update_group; + break; + case NODE_WHILELOOP: + ntype->uifunc= node_common_buts_whileloop; + ntype->drawfunc= node_draw_group; + ntype->drawupdatefunc= node_update_group; + break; + case NODE_FRAME: + ntype->drawupdatefunc= node_update_frame; + break; + } +} + /* ****************** BUTTON CALLBACKS FOR SHADER NODES ***************** */ static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v) @@ -470,8 +1071,6 @@ static void node_shader_set_butfunc(bNodeType *ntype) case NODE_DYNAMIC: ntype->uifunc= node_shader_buts_dynamic; break; - default: - ntype->uifunc= NULL; } if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc; } @@ -1225,8 +1824,6 @@ static void node_composit_set_butfunc(bNodeType *ntype) case CMP_NODE_SEPYCCA: ntype->uifunc=node_composit_buts_ycc; break; - default: - ntype->uifunc= NULL; } if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc; @@ -1381,9 +1978,6 @@ static void node_texture_set_butfunc(bNodeType *ntype) case TEX_NODE_OUTPUT: ntype->uifunc = node_texture_buts_output; break; - - default: - ntype->uifunc= NULL; } if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc; } @@ -1392,24 +1986,60 @@ static void node_texture_set_butfunc(bNodeType *ntype) void ED_init_node_butfuncs(void) { + bNodeTreeType *treetype; bNodeType *ntype; - - /* shader nodes */ - ntype= node_all_shaders.first; - while(ntype) { - node_shader_set_butfunc(ntype); - ntype= ntype->next; - } - /* composit nodes */ - ntype= node_all_composit.first; - while(ntype) { - node_composit_set_butfunc(ntype); - ntype= ntype->next; + bNodeSocketType *stype; + int i; + + /* node type ui functions */ + for (i=0; i < NUM_NTREE_TYPES; ++i) { + treetype = ntreeGetType(i); + if (treetype) { + for (ntype= treetype->node_types.first; ntype; ntype= ntype->next) { + /* default ui functions */ + ntype->drawfunc = node_draw_default; + ntype->drawupdatefunc = node_update_default; + ntype->uifunc = NULL; + ntype->uifuncbut = NULL; + ntype->resize_area_func = node_resize_area_default; + + node_common_set_butfunc(ntype); + + switch (i) { + case NTREE_COMPOSIT: + node_composit_set_butfunc(ntype); + break; + case NTREE_SHADER: + node_shader_set_butfunc(ntype); + break; + case NTREE_TEXTURE: + node_texture_set_butfunc(ntype); + break; + } + } + } } - ntype = node_all_textures.first; - while(ntype) { - node_texture_set_butfunc(ntype); - ntype= ntype->next; + + /* socket type ui functions */ + for (i=0; i < NUM_SOCKET_TYPES; ++i) { + stype = ntreeGetSocketType(i); + if (stype) { + switch(stype->type) { + case SOCK_FLOAT: + case SOCK_INT: + case SOCK_BOOLEAN: + stype->buttonfunc = node_socket_button_default; + break; + case SOCK_VECTOR: + stype->buttonfunc = node_socket_button_components; + break; + case SOCK_RGBA: + stype->buttonfunc = node_socket_button_color; + break; + default: + stype->buttonfunc = NULL; + } + } } } @@ -1840,6 +2470,69 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int t } } +static void node_link_straight_points(View2D *UNUSED(v2d), SpaceNode *snode, bNodeLink *link, float coord_array[][2]) +{ + if(link->fromsock) { + coord_array[0][0]= link->fromsock->locx; + coord_array[0][1]= link->fromsock->locy; + } + else { + if(snode==NULL) return; + coord_array[0][0]= snode->mx; + coord_array[0][1]= snode->my; + } + if(link->tosock) { + coord_array[1][0]= link->tosock->locx; + coord_array[1][1]= link->tosock->locy; + } + else { + if(snode==NULL) return; + coord_array[1][0]= snode->mx; + coord_array[1][1]= snode->my; + } +} + +void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 ) +{ + float coord_array[2][2]; + float linew; + int i; + + node_link_straight_points(v2d, snode, link, coord_array); + + /* store current linewidth */ + glGetFloatv(GL_LINE_WIDTH, &linew); + + glEnable(GL_LINE_SMOOTH); + + if(do_triple) { + UI_ThemeColorShadeAlpha(th_col3, -80, -120); + glLineWidth(4.0f); + + glBegin(GL_LINES); + glVertex2fv(coord_array[0]); + glVertex2fv(coord_array[1]); + glEnd(); + } + + UI_ThemeColor(th_col1); + glLineWidth(1.5f); + + glBegin(GL_LINE_STRIP); + for (i=0; i < LINK_RESOL; ++i) { + float t= (float)i/(float)(LINK_RESOL-1); + if(do_shaded) + UI_ThemeColorBlend(th_col1, th_col2, t); + glVertex2f((1.0f-t)*coord_array[0][0]+t*coord_array[1][0], (1.0f-t)*coord_array[0][1]+t*coord_array[1][1]); + } + glEnd(); + + glDisable(GL_LINE_SMOOTH); + + /* restore previuos linewidth */ + glLineWidth(linew); +} + /* note; this is used for fake links in groups too */ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) { @@ -1868,7 +2561,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) } else { /* check cyclic */ - if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) { + if((link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) && (link->flag & NODE_LINK_VALID)) { /* special indicated link, on drop-node */ if(link->flag & NODE_LINKFLAG_HILITE) { th_col1= th_col2= TH_ACTIVE; @@ -1890,6 +2583,5 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) } node_draw_link_bezier(v2d, snode, link, th_col1, do_shaded, th_col2, do_triple, th_col3); +// node_draw_link_straight(v2d, snode, link, th_col1, do_shaded, th_col2, do_triple, th_col3); } - - diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c index 4b989a78fab..7b14e35e8fe 100644 --- a/source/blender/editors/space_node/node_buttons.c +++ b/source/blender/editors/space_node/node_buttons.c @@ -116,10 +116,12 @@ static void active_node_panel(const bContext *C, Panel *pa) uiItemS(layout); uiItemR(layout, &ptr, "name", 0, NULL, ICON_NODE); uiItemS(layout); - + /* draw this node's settings */ if (node->typeinfo && node->typeinfo->uifuncbut) node->typeinfo->uifuncbut(layout, (bContext *)C, &ptr); + else if (node->typeinfo && node->typeinfo->uifunc) + node->typeinfo->uifunc(layout, (bContext *)C, &ptr); } /* ******************* node buttons registration ************** */ diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 950b3c72fe7..ec118bb3ca2 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -70,8 +70,8 @@ #include "RNA_access.h" -#include "CMP_node.h" -#include "SHD_node.h" +#include "NOD_composite.h" +#include "NOD_shader.h" #include "node_intern.h" @@ -81,6 +81,15 @@ // XXX interface.h extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select); +/* XXX update functions for node editor are a mess, needs a clear concept */ +void ED_node_tree_update(SpaceNode *snode, Scene *scene) +{ + snode_set_context(snode, scene); + + if(snode->nodetree && snode->nodetree->id.us==0) + snode->nodetree->id.us= 1; +} + void ED_node_changed_update(ID *id, bNode *node) { bNodeTree *nodetree, *edittree; @@ -123,24 +132,25 @@ static int has_nodetree(bNodeTree *ntree, bNodeTree *lookup) return 0; } +typedef struct NodeUpdateCalldata { + bNodeTree *ntree; + bNode *node; +} NodeUpdateCalldata; +static void node_generic_update_cb(void *calldata, ID *owner_id, bNodeTree *ntree) +{ + NodeUpdateCalldata *cd= (NodeUpdateCalldata*)calldata; + /* check if nodetree uses the group stored in calldata */ + if (has_nodetree(ntree, cd->ntree)) + ED_node_changed_update(owner_id, cd->node); +} void ED_node_generic_update(Main *bmain, bNodeTree *ntree, bNode *node) { - Material *ma; - Tex *tex; - Scene *sce; - + bNodeTreeType *tti= ntreeGetType(ntree->type); + NodeUpdateCalldata cd; + cd.ntree = ntree; + cd.node = node; /* look through all datablocks, to support groups */ - for(ma=bmain->mat.first; ma; ma=ma->id.next) - if(ma->nodetree && ma->use_nodes && has_nodetree(ma->nodetree, ntree)) - ED_node_changed_update(&ma->id, node); - - for(tex=bmain->tex.first; tex; tex=tex->id.next) - if(tex->nodetree && tex->use_nodes && has_nodetree(tex->nodetree, ntree)) - ED_node_changed_update(&tex->id, node); - - for(sce=bmain->scene.first; sce; sce=sce->id.next) - if(sce->nodetree && sce->use_nodes && has_nodetree(sce->nodetree, ntree)) - ED_node_changed_update(&sce->id, node); + tti->foreach_nodetree(bmain, &cd, node_generic_update_cb); if(ntree->type == NTREE_TEXTURE) ntreeTexCheckCyclics(ntree); @@ -204,14 +214,19 @@ static void node_uiblocks_init(const bContext *C, bNodeTree *ntree) } /* based on settings in node, sets drawing rect info. each redraw! */ -static void node_update(const bContext *C, bNodeTree *ntree, bNode *node) +static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node) { uiLayout *layout; PointerRNA ptr; bNodeSocket *nsock; - float dy= node->locy; + float locx, locy; + float dy= locy; int buty; + /* get "global" coords */ + nodeSpaceCoords(node, &locx, &locy); + dy= locy; + /* header */ dy-= NODE_DY; @@ -222,14 +237,14 @@ static void node_update(const bContext *C, bNodeTree *ntree, bNode *node) /* output sockets */ for(nsock= node->outputs.first; nsock; nsock= nsock->next) { if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) { - nsock->locx= node->locx + node->width; + nsock->locx= locx + node->width; nsock->locy= dy - NODE_DYS; dy-= NODE_DY; } } - node->prvr.xmin= node->locx + NODE_DYS; - node->prvr.xmax= node->locx + node->width- NODE_DYS; + node->prvr.xmin= locx + NODE_DYS; + node->prvr.xmax= locx + node->width- NODE_DYS; /* preview rect? */ if(node->flag & NODE_PREVIEW) { @@ -286,21 +301,22 @@ static void node_update(const bContext *C, bNodeTree *ntree, bNode *node) node->butr.ymax= 0; RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); - + layout= uiBlockLayout(node->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, - node->locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, U.uistyles.first); - + locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, U.uistyles.first); + node->typeinfo->uifunc(layout, (bContext *)C, &ptr); + uiBlockEndAlign(node->block); uiBlockLayoutResolve(node->block, NULL, &buty); - + dy= buty - NODE_DYS/2; } /* input sockets */ for(nsock= node->inputs.first; nsock; nsock= nsock->next) { if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) { - nsock->locx= node->locx; + nsock->locx= locx; nsock->locy= dy - NODE_DYS; dy-= NODE_DY; } @@ -310,19 +326,23 @@ static void node_update(const bContext *C, bNodeTree *ntree, bNode *node) if(node->inputs.first || (node->flag & (NODE_OPTIONS|NODE_PREVIEW))==0 ) dy-= NODE_DYS/2; - node->totr.xmin= node->locx; - node->totr.xmax= node->locx + node->width; - node->totr.ymax= node->locy; - node->totr.ymin= MIN2(dy, node->locy-2*NODE_DY); + node->totr.xmin= locx; + node->totr.xmax= locx + node->width; + node->totr.ymax= locy; + node->totr.ymin= MIN2(dy, locy-2*NODE_DY); } /* based on settings in node, sets drawing rect info. each redraw! */ static void node_update_hidden(bNode *node) { bNodeSocket *nsock; + float locx, locy; float rad, drad, hiddenrad= HIDDEN_RAD; int totin=0, totout=0, tot; + /* get "global" coords */ + nodeSpaceCoords(node, &locx, &locy); + /* calculate minimal radius */ for(nsock= node->inputs.first; nsock; nsock= nsock->next) if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) @@ -336,9 +356,9 @@ static void node_update_hidden(bNode *node) hiddenrad += 5.0f*(float)(tot-4); } - node->totr.xmin= node->locx; - node->totr.xmax= node->locx + 3*hiddenrad + node->miniwidth; - node->totr.ymax= node->locy + (hiddenrad - 0.5f*NODE_DY); + node->totr.xmin= locx; + node->totr.xmax= locx + 3*hiddenrad + node->miniwidth; + node->totr.ymax= locy + (hiddenrad - 0.5f*NODE_DY); node->totr.ymin= node->totr.ymax - 2*hiddenrad; /* output sockets */ @@ -364,6 +384,14 @@ static void node_update_hidden(bNode *node) } } +void node_update_default(const bContext *C, bNodeTree *ntree, bNode *node) +{ + if(node->flag & NODE_HIDDEN) + node_update_hidden(node); + else + node_update_basis(C, ntree, node); +} + static int node_get_colorid(bNode *node) { if(node->typeinfo->nclass==NODE_CLASS_INPUT) @@ -383,138 +411,42 @@ static int node_get_colorid(bNode *node) return TH_NODE; } -/* based on settings in node, sets drawing rect info. each redraw! */ -/* note: this assumes only 1 group at a time is drawn (linked data) */ -/* in node->totr the entire boundbox for the group is stored */ -static void node_update_group(const bContext *C, bNodeTree *UNUSED(ntree), bNode *gnode) -{ - bNodeTree *ngroup= (bNodeTree *)gnode->id; - bNode *node; - bNodeSocket *sock, *gsock; - rctf *rect= &gnode->totr; - float node_group_frame= U.dpi*NODE_GROUP_FRAME/72; - int counter; - int dy; - - rect->xmin = rect->xmax = gnode->locx; - rect->ymin = rect->ymax = gnode->locy; - - /* center them, is a bit of abuse of locx and locy though */ - for(node= ngroup->nodes.first; node; node= node->next) { - node->locx+= gnode->locx; - node->locy+= gnode->locy; - - if(node->flag & NODE_HIDDEN) - node_update_hidden(node); - else - node_update(C, ngroup, node); - node->locx-= gnode->locx; - node->locy-= gnode->locy; - } - counter= 1; - for(node= ngroup->nodes.first; node; node= node->next) { - if(counter) { - *rect= node->totr; - counter= 0; - } - else - BLI_union_rctf(rect, &node->totr); - } - - /* add some room for links to group sockets */ - rect->xmin -= 4*NODE_DY; - rect->xmax += 4*NODE_DY; - rect->ymin-= NODE_DY; - rect->ymax+= NODE_DY; - - /* input sockets */ - dy = 0.5f*(rect->ymin+rect->ymax) + NODE_DY*(BLI_countlist(&gnode->inputs)-1); - for(gsock=ngroup->inputs.first, sock=gnode->inputs.first; gsock; gsock=gsock->next, sock=sock->next) { - gsock->locx = rect->xmin; - sock->locx = rect->xmin - node_group_frame; - sock->locy = gsock->locy = dy; - - /* prevent long socket lists from growing out of the group box */ - if (dy-3*NODE_DYS < rect->ymin) - rect->ymin = dy-3*NODE_DYS; - if (dy+3*NODE_DYS > rect->ymax) - rect->ymax = dy+3*NODE_DYS; - - dy -= 2*NODE_DY; - } - - /* output sockets */ - dy = 0.5f*(rect->ymin+rect->ymax) + NODE_DY*(BLI_countlist(&gnode->outputs)-1); - for(gsock=ngroup->outputs.first, sock=gnode->outputs.first; gsock; gsock=gsock->next, sock=sock->next) { - gsock->locx = rect->xmax; - sock->locx = rect->xmax + node_group_frame; - sock->locy = gsock->locy = dy - NODE_DYS; - - /* prevent long socket lists from growing out of the group box */ - if (dy-3*NODE_DYS < rect->ymin) - rect->ymin = dy-3*NODE_DYS; - if (dy+3*NODE_DYS > rect->ymax) - rect->ymax = dy+3*NODE_DYS; - - dy -= 2*NODE_DY; - } -} - /* note: in cmp_util.c is similar code, for node_compo_pass_on() */ /* note: in node_edit.c is similar code, for untangle node */ static void node_draw_mute_line(View2D *v2d, SpaceNode *snode, bNode *node) { - bNodeSocket *valsock= NULL, *colsock= NULL, *vecsock= NULL; - bNodeSocket *sock; + static int types[]= { SOCK_FLOAT, SOCK_VECTOR, SOCK_RGBA }; bNodeLink link= {NULL}; - int a; + int i; - /* connect the first value buffer in with first value out */ - /* connect the first RGBA buffer in with first RGBA out */ + /* connect the first input of each type with first output of the same type */ - /* test the inputs */ - for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) { - if(nodeCountSocketLinks(snode->edittree, sock)) { - if(sock->type==SOCK_VALUE && valsock==NULL) valsock= sock; - if(sock->type==SOCK_VECTOR && vecsock==NULL) vecsock= sock; - if(sock->type==SOCK_RGBA && colsock==NULL) colsock= sock; - } - } - - /* outputs, draw lines */ glEnable(GL_BLEND); glEnable( GL_LINE_SMOOTH ); - if(valsock || colsock || vecsock) { - for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) { - if(nodeCountSocketLinks(snode->edittree, sock)) { - link.tosock= sock; - - if(sock->type==SOCK_VALUE && valsock) { - link.fromsock= valsock; - node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE); - valsock= NULL; - } - if(sock->type==SOCK_VECTOR && vecsock) { - link.fromsock= vecsock; - node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE); - vecsock= NULL; - } - if(sock->type==SOCK_RGBA && colsock) { - link.fromsock= colsock; - node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE); - colsock= NULL; - } + link.fromnode = link.tonode = node; + for (i=0; i < 3; ++i) { + /* find input socket */ + for (link.fromsock=node->inputs.first; link.fromsock; link.fromsock=link.fromsock->next) + if (link.fromsock->type==types[i] && nodeCountSocketLinks(snode->edittree, link.fromsock)) + break; + if (link.fromsock) { + for (link.tosock=node->outputs.first; link.tosock; link.tosock=link.tosock->next) + if (link.tosock->type==types[i] && nodeCountSocketLinks(snode->edittree, link.tosock)) + break; + + if (link.tosock) { + node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE); } } } + glDisable(GL_BLEND); glDisable( GL_LINE_SMOOTH ); } -/* nice AA filled circle */ /* this might have some more generic use */ -static void circle_draw(float x, float y, float size, int col[3]) +static void node_circle_draw(float x, float y, float size, char *col) { /* 16 values of sin function */ static float si[16] = { @@ -550,37 +482,10 @@ static void circle_draw(float x, float y, float size, int col[3]) glDisable(GL_BLEND); } -static void socket_circle_draw(bNodeSocket *sock, float size) -{ - int col[3]; - - if(sock->type==-1) { - col[0]= 0; col[1]= 0; col[2]= 0; - } - else if(sock->type==SOCK_VALUE) { - col[0]= 160; col[1]= 160; col[2]= 160; - } - else if(sock->type==SOCK_VECTOR) { - col[0]= 100; col[1]= 100; col[2]= 200; - } - else if(sock->type==SOCK_RGBA) { - col[0]= 200; col[1]= 200; col[2]= 40; - } - else { - col[0]= 100; col[1]= 200; col[2]= 100; - } - - circle_draw(sock->locx, sock->locy, size, col); -} - -static void node_sync_cb(bContext *UNUSED(C), void *snode_v, void *node_v) +void node_socket_circle_draw(bNodeTree *UNUSED(ntree), bNodeSocket *sock, float size) { - SpaceNode *snode= snode_v; - - if(snode->treetype==NTREE_SHADER) { - nodeShaderSynchronizeID(node_v, 1); - // allqueue(REDRAWBUTSSHADING, 0); - } + bNodeSocketType *stype = ntreeGetSocketType(sock->type); + node_circle_draw(sock->locx, sock->locy, size, stype->ui_color); } /* ************** Socket callbacks *********** */ @@ -639,83 +544,6 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv) } -typedef struct SocketVectorMenuArgs { - PointerRNA ptr; - int x, y, width; - uiButHandleFunc cb; - void *arg1, *arg2; -} SocketVectorMenuArgs; - -/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */ -static uiBlock *socket_vector_menu(bContext *C, ARegion *ar, void *args_v) -{ - SocketVectorMenuArgs *args= (SocketVectorMenuArgs*)args_v; - uiBlock *block; - uiLayout *layout; - - block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS); - uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN); - - layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, U.uistyles.first), 0); - - uiItemR(layout, &args->ptr, "default_value", UI_ITEM_R_EXPAND, "", ICON_NONE); - - return block; -} - -static void node_draw_socket_button(bNodeTree *ntree, bNodeSocket *sock, const char *name, - uiBlock *block, int x, int y, int width, - uiButHandleFunc cb, void *arg1, void *arg2) -{ - uiBut *bt= NULL; - PointerRNA ptr; - int labelw; - SocketVectorMenuArgs *args; - - RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr); - - switch (sock->type) { - case SOCK_VALUE: - bt=uiDefButR(block, NUM, B_NODE_EXEC, name, - x, y+1, width, NODE_DY-2, - &ptr, "default_value", 0, sock->ns.min, sock->ns.max, -1, -1, NULL); - if (cb) - uiButSetFunc(bt, cb, arg1, arg2); - break; - - case SOCK_VECTOR: - args= MEM_callocN(sizeof(SocketVectorMenuArgs), "SocketVectorMenuArgs"); - - args->ptr = ptr; - args->x = x; - args->y = y; - args->width = width; - args->cb = cb; - args->arg1 = arg1; - args->arg2 = arg2; - - uiDefBlockButN(block, socket_vector_menu, args, name, - x, y+1, width, NODE_DY-2, - ""); - break; - - case SOCK_RGBA: - labelw= width - 40; - - bt=uiDefButR(block, COL, B_NODE_EXEC, "", - x, y+2, (labelw>0 ? 40 : width), NODE_DY-2, - &ptr, "default_value", 0, sock->ns.min, sock->ns.max, -1, -1, NULL); - if (cb) - uiButSetFunc(bt, cb, arg1, arg2); - - if (name[0]!='\0' && labelw>0) - uiDefBut(block, LABEL, 0, name, - x + 40, y+2, labelw, NODE_DY-2, - NULL, 0, 0, 0, 0, ""); - break; - } -} - static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node) { bNodeSocket *sock; @@ -809,13 +637,8 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN else UI_ThemeColor(TH_TEXT); */ - if (node->label[0]!='\0') - BLI_strncpy(showname, node->label, sizeof(showname)); - else if (node->typeinfo->labelfunc) - BLI_strncpy(showname, node->typeinfo->labelfunc(node), sizeof(showname)); - else - BLI_strncpy(showname, node->typeinfo->name, sizeof(showname)); - + BLI_strncpy(showname, nodeLabel(node), sizeof(showname)); + //if(node->flag & NODE_MUTED) // sprintf(showname, "[%s]", showname); @@ -855,37 +678,45 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN /* socket inputs, buttons */ for(sock= node->inputs.first; sock; sock= sock->next) { - if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) { - socket_circle_draw(sock, socket_size); - - if(node->block && sock->link==NULL) { - node_draw_socket_button(ntree, sock, sock->name, node->block, sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY, node_sync_cb, snode, node); - } - else { - uiDefBut(node->block, LABEL, 0, sock->name, (short)(sock->locx+7), (short)(sock->locy-9.0f), - (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, ""); - } + bNodeSocketType *stype= ntreeGetSocketType(sock->type); + + if(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL)) + continue; + + node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE); + + if (sock->link) { + uiDefBut(node->block, LABEL, 0, sock->name, sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY, NODE_DY, + NULL, 0, 0, 0, 0, ""); + } + else { + if (stype->buttonfunc) + stype->buttonfunc(C, node->block, ntree, node, sock, sock->name, sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY); } } /* socket outputs */ for(sock= node->outputs.first; sock; sock= sock->next) { - if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) { - float slen; - int ofs= 0; - - socket_circle_draw(sock, socket_size); - - UI_ThemeColor(TH_TEXT); - slen= snode->aspect*UI_GetStringWidth(sock->name); - while(slen > node->width) { - ofs++; - slen= snode->aspect*UI_GetStringWidth(sock->name+ofs); - } - - uiDefBut(node->block, LABEL, 0, sock->name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f), - (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, ""); + PointerRNA sockptr; + float slen; + int ofs; + + RNA_pointer_create((ID*)ntree, &RNA_NodeSocket, sock, &sockptr); + + if(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL)) + continue; + + node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE); + + ofs= 0; + UI_ThemeColor(TH_TEXT); + slen= snode->aspect*UI_GetStringWidth(sock->name); + while(slen > node->width) { + ofs++; + slen= snode->aspect*UI_GetStringWidth(sock->name+ofs); } + uiDefBut(node->block, LABEL, 0, sock->name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f), + (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, ""); } /* preview */ @@ -956,12 +787,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b UI_ThemeColor(TH_TEXT); if(node->miniwidth>0.0f) { - if (node->label[0]!='\0') - BLI_strncpy(showname, node->label, sizeof(showname)); - else if (node->typeinfo->labelfunc) - BLI_strncpy(showname, node->typeinfo->labelfunc(node), sizeof(showname)); - else - BLI_strncpy(showname, node->typeinfo->name, sizeof(showname)); + BLI_strncpy(showname, nodeLabel(node), sizeof(showname)); //if(node->flag & NODE_MUTED) // sprintf(showname, "[%s]", showname); @@ -984,12 +810,12 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b /* sockets */ for(sock= node->inputs.first; sock; sock= sock->next) { if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) - socket_circle_draw(sock, socket_size); + node_socket_circle_draw(snode->nodetree, sock, socket_size); } for(sock= node->outputs.first; sock; sock= sock->next) { if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) - socket_circle_draw(sock, socket_size); + node_socket_circle_draw(snode->nodetree, sock, socket_size); } uiEndBlock(C, node->block); @@ -997,7 +823,43 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b node->block= NULL; } -static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree) +void node_draw_default(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node) +{ + if(node->flag & NODE_HIDDEN) + node_draw_hidden(C, ar, snode, node); + else + node_draw_basis(C, ar, snode, ntree, node); +} + +static void node_update(const bContext *C, bNodeTree *ntree, bNode *node) +{ + if (node->typeinfo->drawupdatefunc) + node->typeinfo->drawupdatefunc(C, ntree, node); +} + +void node_update_nodetree(const bContext *C, bNodeTree *ntree, float offsetx, float offsety) +{ + bNode *node; + + for(node= ntree->nodes.first; node; node= node->next) { + /* XXX little hack */ + node->locx += offsetx; + node->locy += offsety; + + node_update(C, ntree, node); + + node->locx -= offsetx; + node->locy -= offsety; + } +} + +static void node_draw(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node) +{ + if (node->typeinfo->drawfunc) + node->typeinfo->drawfunc(C, ar, snode, ntree, node); +} + +void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree) { bNode *node; bNodeLink *link; @@ -1013,212 +875,11 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, glDisable(GL_LINE_SMOOTH); glDisable(GL_BLEND); - /* not selected first */ - for(a=0, node= ntree->nodes.first; node; node= node->next, a++) { + /* draw nodes, last nodes in front */ + for(a=0, node= ntree->nodes.first; node; node=node->next, a++) { node->nr= a; /* index of node in list, used for exec event code */ - if(!(node->flag & SELECT)) { - if(node->flag & NODE_GROUP_EDIT); - else if(node->flag & NODE_HIDDEN) - node_draw_hidden(C, ar, snode, node); - else - node_draw_basis(C, ar, snode, ntree, node); - } - } - - /* selected */ - for(node= ntree->nodes.first; node; node= node->next) { - if(node->flag & SELECT) { - if(node->flag & NODE_GROUP_EDIT); - else if(node->flag & NODE_HIDDEN) - node_draw_hidden(C, ar, snode, node); - else - node_draw_basis(C, ar, snode, ntree, node); - } - } -} - -static void group_verify_cb(bContext *UNUSED(C), void *UNUSED(snode_v), void *ngroup_v) -{ - bNodeTree *ngroup= (bNodeTree*)ngroup_v; - - nodeGroupVerify(ngroup); -} - -/* groups are, on creation, centered around 0,0 */ -static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *gnode) -{ - bNodeTree *ngroup= (bNodeTree *)gnode->id; - bNodeSocket *sock; - uiLayout *layout; - PointerRNA ptr; - uiBut *bt; - rctf rect= gnode->totr; - float socket_size= NODE_SOCKSIZE*U.dpi/72; - float node_group_frame= U.dpi*NODE_GROUP_FRAME/72; - float group_header= 26*U.dpi/72; - float arrowbutw= 0.8f*UI_UNIT_X; - /* layout stuff for buttons on group left frame */ - float col1= 6, colw1= 0.6f*node_group_frame; - float col2= col1 + colw1+6; - float col3= node_group_frame - arrowbutw - 6; - /* layout stuff for buttons on group right frame */ - float cor1= 6; - float cor2= cor1 + arrowbutw + 6; - float cor3= cor2 + arrowbutw + 6, corw3= node_group_frame - cor3-6; - - int index; - - /* backdrop header */ - glEnable(GL_BLEND); - uiSetRoundBox(3); - UI_ThemeColorShadeAlpha(TH_NODE_GROUP, 0, -70); - uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymax, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD); - - /* backdrop body */ - UI_ThemeColorShadeAlpha(TH_BACK, -8, -70); - uiSetRoundBox(0); - uiDrawBox(GL_POLYGON, rect.xmin, rect.ymin, rect.xmax, rect.ymax, BASIS_RAD); - - /* input column */ - UI_ThemeColorShadeAlpha(TH_BACK, 10, -50); - uiSetRoundBox(8); - uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymin, rect.xmin, rect.ymax, BASIS_RAD); - - /* output column */ - UI_ThemeColorShadeAlpha(TH_BACK, 10, -50); - uiSetRoundBox(4); - uiDrawBox(GL_POLYGON, rect.xmax, rect.ymin, rect.xmax+node_group_frame, rect.ymax, BASIS_RAD); - - /* input column separator */ - glColor4ub(200, 200, 200, 140); - glBegin(GL_LINES); - glVertex2f(rect.xmin, rect.ymin); - glVertex2f(rect.xmin, rect.ymax); - glEnd(); - - /* output column separator */ - glColor4ub(200, 200, 200, 140); - glBegin(GL_LINES); - glVertex2f(rect.xmax, rect.ymin); - glVertex2f(rect.xmax, rect.ymax); - glEnd(); - - /* group node outline */ - uiSetRoundBox(15); - glColor4ub(200, 200, 200, 140); - glEnable( GL_LINE_SMOOTH ); - uiDrawBox(GL_LINE_LOOP, rect.xmin-node_group_frame, rect.ymin, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD); - glDisable( GL_LINE_SMOOTH ); - glDisable(GL_BLEND); - - /* backdrop title */ - UI_ThemeColor(TH_TEXT_HI); - - layout = uiBlockLayout(gnode->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, (short)(rect.xmin+15), (short)(rect.ymax+group_header), - MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, U.uistyles.first); - RNA_pointer_create(&ntree->id, &RNA_Node, gnode, &ptr); - uiTemplateIDBrowse(layout, (bContext*)C, &ptr, "node_tree", NULL, NULL, NULL); - uiBlockLayoutResolve(gnode->block, NULL, NULL); - - /* draw the internal tree nodes and links */ - node_draw_nodetree(C, ar, snode, ngroup); - - /* group sockets */ - for(sock=ngroup->inputs.first, index=0; sock; sock=sock->next, ++index) { - float locx= sock->locx - node_group_frame; - - socket_circle_draw(sock, socket_size); - /* small hack to use socket_circle_draw function with offset */ - sock->locx -= node_group_frame; - socket_circle_draw(sock, socket_size); - sock->locx += node_group_frame; - - bt = uiDefBut(gnode->block, TEX, 0, "", - locx+col1, sock->locy+1, colw1, NODE_DY, - sock->name, 0, 31, 0, 0, ""); - uiButSetFunc(bt, group_verify_cb, snode, ngroup); - - node_draw_socket_button(ngroup, sock, "", gnode->block, - locx+col1, sock->locy-NODE_DY, colw1, - NULL, NULL, NULL); - - uiBlockSetDirection(gnode->block, UI_TOP); - uiBlockBeginAlign(gnode->block); - bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_up", 0, ICON_TRIA_UP, - locx+col2, sock->locy, arrowbutw, arrowbutw, ""); - if (!sock->prev) - uiButSetFlag(bt, UI_BUT_DISABLED); - RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index); - RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_IN); - bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_down", 0, ICON_TRIA_DOWN, - locx+col2, sock->locy-arrowbutw, arrowbutw, arrowbutw, ""); - if (!sock->next) - uiButSetFlag(bt, UI_BUT_DISABLED); - RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index); - RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_IN); - uiBlockEndAlign(gnode->block); - uiBlockSetDirection(gnode->block, 0); - - uiBlockSetEmboss(gnode->block, UI_EMBOSSN); - bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_remove", 0, ICON_X, - locx+col3, sock->locy-0.5f*arrowbutw, arrowbutw, arrowbutw, ""); - RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index); - RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_IN); - uiBlockSetEmboss(gnode->block, UI_EMBOSS); - } - - for(sock=ngroup->outputs.first, index=0; sock; sock=sock->next, ++index) { - float locx= sock->locx; - - socket_circle_draw(sock, socket_size); - /* small hack to use socket_circle_draw function with offset */ - sock->locx += node_group_frame; - socket_circle_draw(sock, socket_size); - sock->locx -= node_group_frame; - - uiBlockSetEmboss(gnode->block, UI_EMBOSSN); - bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_remove", 0, ICON_X, - locx+col1, sock->locy-0.5f*arrowbutw, arrowbutw, arrowbutw, ""); - RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index); - RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_OUT); - uiBlockSetEmboss(gnode->block, UI_EMBOSS); - - uiBlockSetDirection(gnode->block, UI_TOP); - uiBlockBeginAlign(gnode->block); - bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_up", 0, ICON_TRIA_UP, - locx+cor2, sock->locy, arrowbutw, arrowbutw, ""); - if (!sock->prev) - uiButSetFlag(bt, UI_BUT_DISABLED); - RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index); - RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_OUT); - bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_down", 0, ICON_TRIA_DOWN, - locx+cor2, sock->locy-arrowbutw, arrowbutw, arrowbutw, ""); - if (!sock->next) - uiButSetFlag(bt, UI_BUT_DISABLED); - RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index); - RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_OUT); - uiBlockEndAlign(gnode->block); - uiBlockSetDirection(gnode->block, 0); - - if (sock->link) { - bt = uiDefBut(gnode->block, TEX, 0, "", - locx+cor3, sock->locy-NODE_DYS+1, corw3, NODE_DY, - sock->name, 0, 31, 0, 0, ""); - uiButSetFunc(bt, group_verify_cb, snode, ngroup); - } - else { - bt = uiDefBut(gnode->block, TEX, 0, "", - locx+cor3, sock->locy+1, corw3, NODE_DY, - sock->name, 0, 31, 0, 0, ""); - uiButSetFunc(bt, group_verify_cb, snode, ngroup); - - node_draw_socket_button(ngroup, sock, "", gnode->block, locx+cor3, sock->locy-NODE_DY, corw3, NULL, NULL, NULL); - } + node_draw(C, ar, snode, ntree, node); } - - uiEndBlock(C, gnode->block); - uiDrawBlock(C, gnode->block); - gnode->block= NULL; } void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) @@ -1260,27 +921,19 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) if(node->flag & NODE_GROUP_EDIT) node_uiblocks_init(C, (bNodeTree *)node->id); } - - node_uiblocks_init(C, snode->nodetree); + node_uiblocks_init(C, snode->nodetree); - /* for now, we set drawing coordinates on each redraw */ - for(node= snode->nodetree->nodes.first; node; node= node->next) { - if(node->flag & NODE_GROUP_EDIT) - node_update_group(C, snode->nodetree, node); - else if(node->flag & NODE_HIDDEN) - node_update_hidden(node); - else - node_update(C, snode->nodetree, node); - } - + node_update_nodetree(C, snode->nodetree, 0.0f, 0.0f); node_draw_nodetree(C, ar, snode, snode->nodetree); - + + #if 0 /* active group */ for(node= snode->nodetree->nodes.first; node; node= node->next) { if(node->flag & NODE_GROUP_EDIT) node_draw_group(C, ar, snode, snode->nodetree, node); } + #endif } /* temporary links */ diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 508cb82ee1b..214f375855d 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -40,9 +40,11 @@ #include "MEM_guardedalloc.h" +#include "DNA_ID.h" #include "DNA_object_types.h" #include "DNA_material_types.h" #include "DNA_node_types.h" +#include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "BLI_math.h" @@ -58,11 +60,17 @@ #include "BKE_main.h" #include "BKE_node.h" #include "BKE_material.h" +#include "BKE_modifier.h" #include "BKE_paint.h" #include "BKE_screen.h" #include "BKE_texture.h" #include "BKE_report.h" + +#include "BLI_math.h" +#include "BLI_blenlib.h" +#include "BLI_storage_types.h" + #include "RE_pipeline.h" #include "IMB_imbuf_types.h" @@ -74,11 +82,13 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "RNA_enum_types.h" #include "WM_api.h" #include "WM_types.h" #include "UI_interface.h" +#include "UI_resources.h" #include "UI_view2d.h" #include "IMB_imbuf.h" @@ -88,9 +98,9 @@ #include "node_intern.h" static EnumPropertyItem socket_in_out_items[] = { - { SOCK_IN, "IN", 0, "In", "" }, - { SOCK_OUT, "OUT", 0, "Out", "" }, - { 0, NULL, 0, NULL, NULL} + { SOCK_IN, "SOCK_IN", 0, "Input", "" }, + { SOCK_OUT, "SOCK_OUT", 0, "Output", "" }, + { 0, NULL, 0, NULL, NULL }, }; /* ***************** composite job manager ********************** */ @@ -227,7 +237,7 @@ static bNode *editnode_get_active(bNodeTree *ntree) /* check for edited group */ for(node= ntree->nodes.first; node; node= node->next) - if(node->flag & NODE_GROUP_EDIT) + if(nodeGroupEditGet(node)) break; if(node) return nodeGetActive((bNodeTree *)node->id); @@ -258,7 +268,7 @@ bNode *node_tree_get_editgroup(bNodeTree *nodetree) /* get the groupnode */ for(gnode= nodetree->nodes.first; gnode; gnode= gnode->next) - if(gnode->flag & NODE_GROUP_EDIT) + if(nodeGroupEditGet(gnode)) break; return gnode; } @@ -269,6 +279,7 @@ void ED_node_shader_default(Material *ma) { bNode *in, *out; bNodeSocket *fromsock, *tosock; + bNodeTemplate ntemp; /* but lets check it anyway */ if(ma->nodetree) { @@ -277,12 +288,14 @@ void ED_node_shader_default(Material *ma) return; } - ma->nodetree= ntreeAddTree("Shader Nodetree", NTREE_SHADER, FALSE); + ma->nodetree= ntreeAddTree("Shader Nodetree", NTREE_SHADER, 0); - out= nodeAddNodeType(ma->nodetree, SH_NODE_OUTPUT, NULL, NULL); + ntemp.type = SH_NODE_OUTPUT; + out= nodeAddNode(ma->nodetree, &ntemp); out->locx= 300.0f; out->locy= 300.0f; - in= nodeAddNodeType(ma->nodetree, SH_NODE_MATERIAL, NULL, NULL); + ntemp.type = SH_NODE_MATERIAL; + in= nodeAddNode(ma->nodetree, &ntemp); in->locx= 10.0f; in->locy= 300.0f; nodeSetActive(ma->nodetree, in); @@ -291,7 +304,7 @@ void ED_node_shader_default(Material *ma) tosock= out->inputs.first; nodeAddLink(ma->nodetree, in, fromsock, out, tosock); - ntreeSolveOrder(ma->nodetree); /* needed for pointers */ + ntreeUpdateTree(ma->nodetree); } /* assumes nothing being done in ntree yet, sets the default in/out node */ @@ -300,6 +313,7 @@ void ED_node_composit_default(Scene *sce) { bNode *in, *out; bNodeSocket *fromsock, *tosock; + bNodeTemplate ntemp; /* but lets check it anyway */ if(sce->nodetree) { @@ -308,14 +322,16 @@ void ED_node_composit_default(Scene *sce) return; } - sce->nodetree= ntreeAddTree("Compositing Nodetree", NTREE_COMPOSIT, FALSE); + sce->nodetree= ntreeAddTree("Compositing Nodetree", NTREE_COMPOSIT, 0); - out= nodeAddNodeType(sce->nodetree, CMP_NODE_COMPOSITE, NULL, NULL); + ntemp.type = CMP_NODE_COMPOSITE; + out= nodeAddNode(sce->nodetree, &ntemp); out->locx= 300.0f; out->locy= 400.0f; out->id= &sce->id; id_us_plus(out->id); - in= nodeAddNodeType(sce->nodetree, CMP_NODE_R_LAYERS, NULL, NULL); + ntemp.type = CMP_NODE_R_LAYERS; + in= nodeAddNode(sce->nodetree, &ntemp); in->locx= 10.0f; in->locy= 400.0f; in->id= &sce->id; id_us_plus(in->id); @@ -326,7 +342,7 @@ void ED_node_composit_default(Scene *sce) tosock= out->inputs.first; nodeAddLink(sce->nodetree, in, fromsock, out, tosock); - ntreeSolveOrder(sce->nodetree); /* needed for pointers */ + ntreeUpdateTree(sce->nodetree); // XXX ntreeCompositForceHidden(sce->nodetree); } @@ -337,6 +353,7 @@ void ED_node_texture_default(Tex *tx) { bNode *in, *out; bNodeSocket *fromsock, *tosock; + bNodeTemplate ntemp; /* but lets check it anyway */ if(tx->nodetree) { @@ -345,12 +362,14 @@ void ED_node_texture_default(Tex *tx) return; } - tx->nodetree= ntreeAddTree("Texture Nodetree", NTREE_TEXTURE, FALSE); + tx->nodetree= ntreeAddTree("Texture Nodetree", NTREE_TEXTURE, 0); - out= nodeAddNodeType(tx->nodetree, TEX_NODE_OUTPUT, NULL, NULL); + ntemp.type = TEX_NODE_OUTPUT; + out= nodeAddNode(tx->nodetree, &ntemp); out->locx= 300.0f; out->locy= 300.0f; - in= nodeAddNodeType(tx->nodetree, TEX_NODE_CHECKER, NULL, NULL); + ntemp.type = TEX_NODE_CHECKER; + in= nodeAddNode(tx->nodetree, &ntemp); in->locx= 10.0f; in->locy= 300.0f; nodeSetActive(tx->nodetree, in); @@ -358,43 +377,53 @@ void ED_node_texture_default(Tex *tx) tosock= out->inputs.first; nodeAddLink(tx->nodetree, in, fromsock, out, tosock); - ntreeSolveOrder(tx->nodetree); /* needed for pointers */ + ntreeUpdateTree(tx->nodetree); } /* id is supposed to contain a node tree */ void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *treetype) { - bNode *node= NULL; - short idtype= GS(id->name); - - if(idtype == ID_MA) { - *ntree= ((Material*)id)->nodetree; - if(treetype) *treetype= NTREE_SHADER; - } - else if(idtype == ID_SCE) { - *ntree= ((Scene*)id)->nodetree; - if(treetype) *treetype= NTREE_COMPOSIT; - } - else if(idtype == ID_TE) { - *ntree= ((Tex*)id)->nodetree; - if(treetype) *treetype= NTREE_TEXTURE; + if (id) { + bNode *node= NULL; + short idtype= GS(id->name); + + if(idtype == ID_NT) { + *ntree= (bNodeTree*)id; + if(treetype) *treetype= (*ntree)->type; + } + else if(idtype == ID_MA) { + *ntree= ((Material*)id)->nodetree; + if(treetype) *treetype= NTREE_SHADER; + } + else if(idtype == ID_SCE) { + *ntree= ((Scene*)id)->nodetree; + if(treetype) *treetype= NTREE_COMPOSIT; + } + else if(idtype == ID_TE) { + *ntree= ((Tex*)id)->nodetree; + if(treetype) *treetype= NTREE_TEXTURE; + } + else { + if(treetype) *treetype= 0; + return; + } + + /* find editable group */ + if(edittree) { + if(*ntree) + for(node= (*ntree)->nodes.first; node; node= node->next) + if(nodeGroupEditGet(node)) + break; + + if(node && node->id) + *edittree= (bNodeTree *)node->id; + else + *edittree= *ntree; + } } else { + *ntree= NULL; if(treetype) *treetype= 0; - return; - } - - /* find editable group */ - if(edittree) { - if(*ntree) - for(node= (*ntree)->nodes.first; node; node= node->next) - if(node->flag & NODE_GROUP_EDIT) - break; - - if(node && node->id) - *edittree= (bNodeTree *)node->id; - else - *edittree= *ntree; } } @@ -403,8 +432,6 @@ void snode_set_context(SpaceNode *snode, Scene *scene) { Object *ob= OBACT; - snode->nodetree= NULL; - snode->edittree= NULL; snode->id= snode->from= NULL; if(snode->treetype==NTREE_SHADER) { @@ -418,7 +445,6 @@ void snode_set_context(SpaceNode *snode, Scene *scene) } } else if(snode->treetype==NTREE_COMPOSIT) { - snode->from= NULL; snode->id= &scene->id; /* bit clumsy but reliable way to see if we draw first time */ @@ -461,9 +487,14 @@ void snode_set_context(SpaceNode *snode, Scene *scene) } } } + else { + if (snode->nodetree && snode->nodetree->type == snode->treetype) + snode->id = &snode->nodetree->id; + else + snode->id = NULL; + } - if(snode->id) - node_tree_from_ID(snode->id, &snode->nodetree, &snode->edittree, NULL); + node_tree_from_ID(snode->id, &snode->nodetree, &snode->edittree, NULL); } static void snode_tag_changed(SpaceNode *snode, bNode *node) @@ -574,17 +605,199 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node) } } -/* when links in groups change, inputs/outputs change, nodes added/deleted... */ -void node_tree_verify_groups(bNodeTree *nodetree) +static int compare_nodes(bNode *a, bNode *b) { - bNode *gnode; + bNode *parent; - gnode= node_tree_get_editgroup(nodetree); + /* if one is an ancestor of the other */ + /* XXX there might be a better sorting algorithm for stable topological sort, this is O(n^2) worst case */ + for (parent = a->parent; parent; parent=parent->parent) { + if (parent==b) + return 1; + } + for (parent = b->parent; parent; parent=parent->parent) { + if (parent==a) + return 0; + } + + /* if one of the nodes is in the background and the other not */ + if ((a->flag & NODE_BACKGROUND) && !(b->typeinfo->flag & NODE_BACKGROUND)) + return 0; + else if (!(a->flag & NODE_BACKGROUND) && (b->typeinfo->flag & NODE_BACKGROUND)) + return 1; - /* does all materials */ - if(gnode) - nodeGroupVerify((bNodeTree *)gnode->id); + /* if one has a higher selection state (active > selected > nothing) */ + if (!(b->flag & NODE_ACTIVE) && (a->flag & NODE_ACTIVE)) + return 1; + else if (!(b->flag & NODE_SELECT) && ((a->flag & NODE_ACTIVE) || (a->flag & NODE_SELECT))) + return 1; + return 0; +} +/* Sorts nodes by selection: unselected nodes first, then selected, + * then the active node at the very end. Relative order is kept intact! + */ +void node_sort(bNodeTree *ntree) +{ + /* merge sort is the algorithm of choice here */ + bNode *first_a, *first_b, *node_a, *node_b, *tmp; + int totnodes= BLI_countlist(&ntree->nodes); + int k, a, b; + + k = 1; + while (k < totnodes) { + first_a = first_b = ntree->nodes.first; + + do { + /* setup first_b pointer */ + for (b=0; b < k && first_b; ++b) { + first_b = first_b->next; + } + /* all batches merged? */ + if (first_b==NULL) + break; + + /* merge batches */ + node_a = first_a; + node_b = first_b; + a = b = 0; + while (a < k && b < k && node_b) { + if (compare_nodes(node_a, node_b)==0) { + node_a = node_a->next; + ++a; + } + else { + tmp = node_b; + node_b = node_b->next; + ++b; + BLI_remlink(&ntree->nodes, tmp); + BLI_insertlinkbefore(&ntree->nodes, node_a, tmp); + } + } + + /* setup first pointers for next batch */ + first_b = node_b; + for (; b < k; ++b) { + /* all nodes sorted? */ + if (first_b==NULL) + break; + first_b = first_b->next; + } + first_a = first_b; + } while (first_b); + + k = k << 1; + } +} + +static int inside_rctf(rctf *bounds, rctf *rect) +{ + return (bounds->xmin <= rect->xmin && bounds->xmax >= rect->xmax + && bounds->ymin <= rect->ymin && bounds->ymax >= rect->ymax); +} + +static void node_frame_attach_nodes(bNodeTree *UNUSED(ntree), bNode *frame) +{ + bNode *node; + + /* only check nodes on top of the frame for attaching */ + for (node=frame->next; node; node=node->next) { + if (node->parent==frame) { + /* detach nodes that went outside the frame */ + if (!inside_rctf(&frame->totr, &node->totr)) + nodeDetachNode(node); + } + else if (node->flag & NODE_SELECT && node->parent==NULL) { + /* attach selected, still unparented nodes */ + if (inside_rctf(&frame->totr, &node->totr)) + nodeAttachNode(node, frame); + } + } +} + +void ED_node_update_hierarchy(bContext *UNUSED(C), bNodeTree *ntree) +{ + bNode *node; + + /* XXX This does not work due to layout functions relying on node->block, + * which only exists during actual drawing. Can we rely on valid totr rects? + */ + /* make sure nodes have correct bounding boxes after transform */ +// node_update_nodetree(C, ntree, 0.0f, 0.0f); + + /* all selected nodes are re-parented */ + for (node=ntree->nodes.last; node; node=node->prev) { + if (node->flag & NODE_SELECT && node->parent) + nodeDetachNode(node); + } + + /* update higher Z-level nodes first */ + for (node=ntree->nodes.last; node; node=node->prev) { + /* XXX callback? */ + if (node->type==NODE_FRAME) + node_frame_attach_nodes(ntree, node); + } +} + +/* ***************** generic operator functions for nodes ***************** */ + +static int edit_node_poll(bContext *C) +{ + return ED_operator_node_active(C); +} + +static void edit_node_properties(wmOperatorType *ot) +{ + /* XXX could node be a context pointer? */ + RNA_def_string(ot->srna, "node", "", 32, "Node", ""); + RNA_def_int(ot->srna, "socket", 0, 0, MAX_SOCKET, "Socket", "", 0, MAX_SOCKET); + RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Side", ""); +} + +static int edit_node_invoke_properties(bContext *C, wmOperator *op) +{ + if (!RNA_property_is_set(op->ptr, "node")) { + bNode *node= CTX_data_pointer_get_type(C, "node", &RNA_Node).data; + if (!node) + return 0; + else + RNA_string_set(op->ptr, "node", node->name); + } + + if (!RNA_property_is_set(op->ptr, "in_out")) + RNA_enum_set(op->ptr, "in_out", SOCK_IN); + + if (!RNA_property_is_set(op->ptr, "socket")) + RNA_int_set(op->ptr, "socket", 0); + + return 1; +} + +static void edit_node_properties_get(wmOperator *op, bNodeTree *ntree, bNode **rnode, bNodeSocket **rsock, int *rin_out) +{ + bNode *node; + bNodeSocket *sock; + char nodename[32]; + int sockindex; + int in_out; + + RNA_string_get(op->ptr, "node", nodename); + node = nodeFindNodebyName(ntree, nodename); + + in_out = RNA_enum_get(op->ptr, "in_out"); + + sockindex = RNA_int_get(op->ptr, "socket"); + switch (in_out) { + case SOCK_IN: sock = BLI_findlink(&node->inputs, sockindex); break; + case SOCK_OUT: sock = BLI_findlink(&node->outputs, sockindex); break; + } + + if (rnode) + *rnode = node; + if (rsock) + *rsock = sock; + if (rin_out) + *rin_out = in_out; } /* ***************** Edit Group operator ************* */ @@ -594,8 +807,8 @@ void snode_make_group_editable(SpaceNode *snode, bNode *gnode) bNode *node; /* make sure nothing has group editing on */ - for(node= snode->nodetree->nodes.first; node; node= node->next) - node->flag &= ~NODE_GROUP_EDIT; + for(node=snode->nodetree->nodes.first; node; node=node->next) + nodeGroupEditClear(node); if(gnode==NULL) { /* with NULL argument we do a toggle */ @@ -603,34 +816,30 @@ void snode_make_group_editable(SpaceNode *snode, bNode *gnode) gnode= nodeGetActive(snode->nodetree); } - if(gnode && gnode->type==NODE_GROUP && gnode->id) { - if(gnode->id->lib) - ntreeMakeLocal((bNodeTree *)gnode->id); - - gnode->flag |= NODE_GROUP_EDIT; - snode->edittree= (bNodeTree *)gnode->id; + if (gnode) { + snode->edittree = nodeGroupEditSet(gnode, 1); /* deselect all other nodes, so we can also do grabbing of entire subtree */ for(node= snode->nodetree->nodes.first; node; node= node->next) node->flag &= ~SELECT; gnode->flag |= SELECT; - } else snode->edittree= snode->nodetree; - - ntreeSolveOrder(snode->nodetree); } static int node_group_edit_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceNode *snode = CTX_wm_space_node(C); - bNode *gnode; ED_preview_kill_jobs(C); - gnode= nodeGetActive(snode->edittree); - snode_make_group_editable(snode, gnode); + if (snode->nodetree==snode->edittree) { + bNode *gnode= nodeGetActive(snode->nodetree); + snode_make_group_editable(snode, gnode); + } + else + snode_make_group_editable(snode, NULL); WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL); @@ -643,7 +852,8 @@ static int node_group_edit_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e bNode *gnode; gnode= nodeGetActive(snode->edittree); - if(gnode && gnode->type==NODE_GROUP && gnode->id && gnode->id->lib) { + /* XXX callback? */ + if(gnode && gnode->id && GS(gnode->id->name)==ID_NT && gnode->id->lib) { uiPupMenuOkee(C, op->type->idname, "Make group local?"); return OPERATOR_CANCELLED; } @@ -674,7 +884,7 @@ static int node_group_socket_add_exec(bContext *C, wmOperator *op) SpaceNode *snode = CTX_wm_space_node(C); int in_out= -1; char name[32]= ""; - int type= SOCK_VALUE; + int type= SOCK_FLOAT; bNodeTree *ngroup= snode->edittree; bNodeSocket *sock; @@ -691,9 +901,10 @@ static int node_group_socket_add_exec(bContext *C, wmOperator *op) else return OPERATOR_CANCELLED; - sock = nodeGroupAddSocket(ngroup, name, type, in_out); + /* using placeholder subtype first */ + sock = node_group_add_socket(ngroup, name, type, in_out); - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(ngroup); snode_notify(C, snode); @@ -716,7 +927,7 @@ void NODE_OT_group_socket_add(wmOperatorType *ot) RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output"); RNA_def_string(ot->srna, "name", "", 32, "Name", "Group socket name"); - RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_VALUE, "Type", "Type of the group socket"); + RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_FLOAT, "Type", "Type of the group socket"); } /* ***************** Remove Group Socket operator ************* */ @@ -743,8 +954,8 @@ static int node_group_socket_remove_exec(bContext *C, wmOperator *op) sock = (bNodeSocket*)BLI_findlink(in_out==SOCK_IN ? &ngroup->inputs : &ngroup->outputs, index); if (sock) { - nodeGroupRemoveSocket(ngroup, sock, in_out); - node_tree_verify_groups(snode->nodetree); + node_group_remove_socket(ngroup, sock, in_out); + ntreeUpdateTree(ngroup); snode_notify(C, snode); } @@ -801,6 +1012,8 @@ static int node_group_socket_move_up_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; BLI_remlink(&ngroup->inputs, sock); BLI_insertlinkbefore(&ngroup->inputs, prev, sock); + + ngroup->update |= NTREE_UPDATE_GROUP_IN; } else if (in_out==SOCK_OUT) { sock = (bNodeSocket*)BLI_findlink(&ngroup->outputs, index); @@ -810,8 +1023,10 @@ static int node_group_socket_move_up_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; BLI_remlink(&ngroup->outputs, sock); BLI_insertlinkbefore(&ngroup->outputs, prev, sock); + + ngroup->update |= NTREE_UPDATE_GROUP_OUT; } - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(ngroup); snode_notify(C, snode); @@ -867,6 +1082,8 @@ static int node_group_socket_move_down_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; BLI_remlink(&ngroup->inputs, sock); BLI_insertlinkafter(&ngroup->inputs, next, sock); + + ngroup->update |= NTREE_UPDATE_GROUP_IN; } else if (in_out==SOCK_OUT) { sock = (bNodeSocket*)BLI_findlink(&ngroup->outputs, index); @@ -876,8 +1093,10 @@ static int node_group_socket_move_down_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; BLI_remlink(&ngroup->outputs, sock); BLI_insertlinkafter(&ngroup->outputs, next, sock); + + ngroup->update |= NTREE_UPDATE_GROUP_OUT; } - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(ngroup); snode_notify(C, snode); @@ -924,7 +1143,7 @@ static int node_group_ungroup_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_WARNING, "Not a group"); return OPERATOR_CANCELLED; } - else if(!nodeGroupUnGroup(snode->edittree, gnode)) { + else if(!node_group_ungroup(snode->edittree, gnode)) { BKE_report(op->reports, RPT_WARNING, "Can't ungroup"); return OPERATOR_CANCELLED; } @@ -952,70 +1171,16 @@ void NODE_OT_group_ungroup(wmOperatorType *ot) /* ************************** Node generic ************** */ -/* allows to walk the list in order of visibility */ -bNode *next_node(bNodeTree *ntree) -{ - static bNode *current=NULL, *last= NULL; - - if(ntree) { - /* set current to the first selected node */ - for(current= ntree->nodes.last; current; current= current->prev) - if(current->flag & NODE_SELECT) - break; - - /* set last to the first unselected node */ - for(last= ntree->nodes.last; last; last= last->prev) - if((last->flag & NODE_SELECT)==0) - break; - - if(current==NULL) - current= last; - - return NULL; - } - /* no nodes, or we are ready */ - if(current==NULL) - return NULL; - - /* now we walk the list backwards, but we always return current */ - if(current->flag & NODE_SELECT) { - bNode *node= current; - - /* find previous selected */ - current= current->prev; - while(current && (current->flag & NODE_SELECT)==0) - current= current->prev; - - /* find first unselected */ - if(current==NULL) - current= last; - - return node; - } - else { - bNode *node= current; - - /* find previous unselected */ - current= current->prev; - while(current && (current->flag & NODE_SELECT)) - current= current->prev; - - return node; - } - - return NULL; -} - /* is rct in visible part of node? */ static bNode *visible_node(SpaceNode *snode, rctf *rct) { - bNode *tnode; + bNode *node; - for(next_node(snode->edittree); (tnode=next_node(NULL));) { - if(BLI_isect_rctf(&tnode->totr, rct, NULL)) + for(node=snode->edittree->nodes.last; node; node=node->prev) { + if(BLI_isect_rctf(&node->totr, rct, NULL)) break; } - return tnode; + return node; } /* **************************** */ @@ -1318,8 +1483,9 @@ void NODE_OT_backimage_sample(wmOperatorType *ot) /* ********************** size widget operator ******************** */ typedef struct NodeSizeWidget { - float mxstart; - float oldwidth; + float mxstart, mystart; + float oldwidth, oldheight; + float oldminiwidth; } NodeSizeWidget; static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event) @@ -1338,13 +1504,16 @@ static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event) if (node) { if(node->flag & NODE_HIDDEN) { - node->miniwidth= nsw->oldwidth + mx - nsw->mxstart; + node->miniwidth= nsw->oldminiwidth + mx - nsw->mxstart; CLAMP(node->miniwidth, 0.0f, 100.0f); } else { node->width= nsw->oldwidth + mx - nsw->mxstart; CLAMP(node->width, UI_DPI_FAC*node->typeinfo->minwidth, UI_DPI_FAC*node->typeinfo->maxwidth); } + /* height works the other way round ... */ + node->height= nsw->oldheight - my + nsw->mystart; + CLAMP(node->height, node->typeinfo->minheight, node->typeinfo->maxheight); } ED_region_tag_redraw(ar); @@ -1358,6 +1527,8 @@ static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event) MEM_freeN(nsw); op->customdata= NULL; + ED_node_update_hierarchy(C, snode->edittree); + return OPERATOR_FINISHED; } @@ -1371,35 +1542,21 @@ static int node_resize_invoke(bContext *C, wmOperator *op, wmEvent *event) bNode *node= editnode_get_active(snode->edittree); if(node) { - rctf totr; - /* convert mouse coordinates to v2d space */ UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &snode->mx, &snode->my); - totr= node->totr; - - if(node->flag & NODE_HIDDEN) { - /* right part of node */ - totr.xmin= node->totr.xmax-20.0f; - } - else { - /* bottom right corner */ - totr.xmin= totr.xmax-10.0f; - totr.ymax= totr.ymin+10.0f; - } - - if(BLI_in_rctf(&totr, snode->mx, snode->my)) { + if(node->typeinfo->resize_area_func(node, snode->mx, snode->my)) { NodeSizeWidget *nsw= MEM_callocN(sizeof(NodeSizeWidget), "size widget op data"); op->customdata= nsw; nsw->mxstart= snode->mx; + nsw->mystart= snode->my; /* store old */ - if(node->flag & NODE_HIDDEN) - nsw->oldwidth= node->miniwidth; - else - nsw->oldwidth= node->width; + nsw->oldwidth= node->width; + nsw->oldheight= node->height; + nsw->oldminiwidth= node->miniwidth; /* add modal handler */ WM_event_add_modal_handler(C, op); @@ -1598,7 +1755,7 @@ static void node_link_viewer(SpaceNode *snode, bNode *tonode) link->fromnode= tonode; link->fromsock= sock; } - ntreeSolveOrder(snode->edittree); + ntreeUpdateTree(snode->edittree); snode_tag_changed(snode, node); } } @@ -1905,6 +2062,7 @@ void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace) ListBase *nodelist = MEM_callocN(sizeof(ListBase), "items_list"); bNodeListItem *nli; bNode *node; + bNodeLink *link; int i, numlinks=0; for(node= snode->edittree->nodes.first; node; node= node->next) { @@ -1941,7 +2099,15 @@ void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace) /* then we can connect */ if (replace) nodeRemSocketLinks(snode->edittree, sock_to); - nodeAddLink(snode->edittree, node_fr, sock_fr, node_to, sock_to); + + link = nodeAddLink(snode->edittree, node_fr, sock_fr, node_to, sock_to); + /* validate the new link */ + ntreeUpdateTree(snode->edittree); + if (!(link->flag & NODE_LINK_VALID)) { + nodeRemLink(snode->edittree, link); + continue; + } + snode_tag_changed(snode, node_to); ++numlinks; break; @@ -1949,8 +2115,7 @@ void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace) } if (numlinks > 0) { - node_tree_verify_groups(snode->nodetree); - ntreeSolveOrder(snode->edittree); + ntreeUpdateTree(snode->edittree); } BLI_freelistN(nodelist); @@ -1958,28 +2123,13 @@ void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace) } /* can be called from menus too, but they should do own undopush and redraws */ -bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, int type, float locx, float locy) +bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, bNodeTemplate *ntemp, float locx, float locy) { bNode *node= NULL, *gnode; node_deselectall(snode); - if(type>=NODE_DYNAMIC_MENU) { - node= nodeAddNodeType(snode->edittree, type, NULL, NULL); - } - else if(type>=NODE_GROUP_MENU) { - if(snode->edittree!=snode->nodetree) { - // XXX error("Can not add a Group in a Group"); - return NULL; - } - else { - bNodeTree *ngroup= BLI_findlink(&bmain->nodetree, type-NODE_GROUP_MENU); - if(ngroup) - node= nodeAddNodeType(snode->edittree, NODE_GROUP, ngroup, NULL); - } - } - else - node= nodeAddNodeType(snode->edittree, type, NULL, NULL); + node = nodeAddNode(snode->edittree, ntemp); /* generics */ if(node) { @@ -1993,7 +2143,7 @@ bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, int type, floa node->locy -= gnode->locy; } - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(snode->edittree); ED_node_set_active(bmain, snode->edittree, node); if(snode->nodetree->type==NTREE_COMPOSIT) { @@ -2025,6 +2175,7 @@ static int node_duplicate_exec(bContext *C, wmOperator *op) bNode *node, *newnode, *lastnode; bNodeLink *link, *newlink, *lastlink; int keep_inputs = RNA_boolean_get(op->ptr, "keep_inputs"); + bNodeSocket *sock; ED_preview_kill_jobs(C); @@ -2094,9 +2245,8 @@ static int node_duplicate_exec(bContext *C, wmOperator *op) break; } - ntreeSolveOrder(ntree); + ntreeUpdateTree(snode->edittree); - node_tree_verify_groups(snode->nodetree); snode_notify(C, snode); snode_dag_update(C, snode); @@ -2185,17 +2335,25 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event) if( link->tosock!= tsock && (!tnode || (tnode!=node && link->tonode!=tnode)) ) { link->tonode= tnode; link->tosock= tsock; - if (link->prev==NULL && link->next==NULL) + if (link->prev==NULL && link->next==NULL) { BLI_addtail(&snode->edittree->links, link); - ntreeSolveOrder(snode->edittree); /* for interactive red line warning */ + } + + snode->edittree->update |= NTREE_UPDATE_LINKS; + ntreeUpdateTree(snode->edittree); } } } else { - BLI_remlink(&snode->edittree->links, link); - link->prev = link->next = NULL; - link->tonode= NULL; - link->tosock= NULL; + if (link->tonode || link->tosock) { + BLI_remlink(&snode->edittree->links, link); + link->prev = link->next = NULL; + link->tonode= NULL; + link->tosock= NULL; + + snode->edittree->update |= NTREE_UPDATE_LINKS; + ntreeUpdateTree(snode->edittree); + } } } else { @@ -2205,18 +2363,25 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event) if( link->fromsock!= tsock && (!tnode || (tnode!=node && link->fromnode!=tnode)) ) { link->fromnode= tnode; link->fromsock= tsock; - if (link->prev==NULL && link->next==NULL) + if (link->prev==NULL && link->next==NULL) { BLI_addtail(&snode->edittree->links, link); - ntreeSolveOrder(snode->edittree); /* for interactive red line warning */ + } + + snode->edittree->update |= NTREE_UPDATE_LINKS; + ntreeUpdateTree(snode->edittree); } } } } else { - BLI_remlink(&snode->edittree->links, link); - link->prev = link->next = NULL; - link->fromnode= NULL; - link->fromsock= NULL; + if (link->tonode || link->tosock) { + BLI_remlink(&snode->edittree->links, link); + link->prev = link->next = NULL; + link->fromnode= NULL; + link->fromsock= NULL; + snode->edittree->update |= NTREE_UPDATE_LINKS; + ntreeUpdateTree(snode->edittree); + } } } /* hilight target sockets only */ @@ -2244,23 +2409,26 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event) else if (outside_group_rect(snode) && (link->tonode || link->fromnode)) { /* automatically add new group socket */ if (link->tonode && link->tosock) { - link->fromsock = nodeGroupExposeSocket(snode->edittree, link->tosock, SOCK_IN); + link->fromsock = node_group_expose_socket(snode->edittree, link->tosock, SOCK_IN); link->fromnode = NULL; - if (link->prev==NULL && link->next==NULL) + if (link->prev==NULL && link->next==NULL) { BLI_addtail(&snode->edittree->links, link); + } + snode->edittree->update |= NTREE_UPDATE_GROUP_IN | NTREE_UPDATE_LINKS; } else if (link->fromnode && link->fromsock) { - link->tosock = nodeGroupExposeSocket(snode->edittree, link->fromsock, SOCK_OUT); + link->tosock = node_group_expose_socket(snode->edittree, link->fromsock, SOCK_OUT); link->tonode = NULL; - if (link->prev==NULL && link->next==NULL) + if (link->prev==NULL && link->next==NULL) { BLI_addtail(&snode->edittree->links, link); + } + snode->edittree->update |= NTREE_UPDATE_GROUP_OUT | NTREE_UPDATE_LINKS; } } else nodeRemLink(snode->edittree, link); - ntreeSolveOrder(snode->edittree); - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(snode->edittree); snode_notify(C, snode); snode_dag_update(C, snode); @@ -2335,7 +2503,7 @@ static int node_link_invoke(bContext *C, wmOperator *op, wmEvent *event) ED_preview_kill_jobs(C); nldrag->in_out= node_link_init(snode, nldrag); - + if(nldrag->in_out) { op->customdata= nldrag; @@ -2408,7 +2576,7 @@ static int node_make_link_exec(bContext *C, wmOperator *op) snode_autoconnect(snode, 1, replace); - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(snode->edittree); snode_notify(C, snode); snode_dag_update(C, snode); @@ -2482,8 +2650,7 @@ static int cut_links_exec(bContext *C, wmOperator *op) } } - ntreeSolveOrder(snode->edittree); - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(snode->edittree); snode_notify(C, snode); snode_dag_update(C, snode); @@ -2608,7 +2775,7 @@ void ED_node_link_insert(ScrArea *sa) link->flag &= ~NODE_LINKFLAG_HILITE; nodeAddLink(snode->edittree, select, socket_best_match(&select->outputs, sockto->type), node, sockto); - ntreeSolveOrder(snode->edittree); /* needed for pointers */ + ntreeUpdateTree(snode->edittree); /* needed for pointers */ snode_tag_changed(snode, select); ED_node_changed_update(snode->id, select); } @@ -2819,14 +2986,14 @@ static int node_group_make_exec(bContext *C, wmOperator *op) ED_preview_kill_jobs(C); - gnode= nodeMakeGroupFromSelected(snode->nodetree); + gnode= node_group_make_from_selected(snode->nodetree); if(gnode==NULL) { BKE_report(op->reports, RPT_WARNING, "Can not make Group"); return OPERATOR_CANCELLED; } else { nodeSetActive(snode->nodetree, gnode); - ntreeSolveOrder(snode->nodetree); + ntreeUpdateTree(snode->nodetree); } snode_notify(C, snode); @@ -2972,7 +3139,7 @@ static int node_socket_toggle_exec(bContext *C, wmOperator *UNUSED(op)) } } - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(snode->edittree); snode_notify(C, snode); @@ -3056,7 +3223,7 @@ static int node_delete_exec(bContext *C, wmOperator *UNUSED(op)) } } - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(snode->edittree); snode_notify(C, snode); snode_dag_update(C, snode); @@ -3126,7 +3293,7 @@ static void node_delete_reconnect(bNodeTree* tree, bNode* node) deliveringvecsocket = link->fromsock; } break; - case SOCK_VALUE: + case SOCK_FLOAT: if (valsocket == NULL) { valsocket = link->tosock; deliveringvalnode = link->fromnode; @@ -3147,7 +3314,7 @@ static void node_delete_reconnect(bNodeTree* tree, bNode* node) numberOfConnectedOutputSockets ++; if (!first) first = link; switch(sock->type) { - case SOCK_VALUE: + case SOCK_FLOAT: if (deliveringvalsocket) { link->fromnode = deliveringvalnode; link->fromsock = deliveringvalsocket; @@ -3205,7 +3372,7 @@ static int node_delete_reconnect_exec(bContext *C, wmOperator *UNUSED(op)) } } - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(snode->edittree); snode_notify(C, snode); snode_dag_update(C, snode); @@ -3235,7 +3402,7 @@ static int node_show_cycles_exec(bContext *C, wmOperator *UNUSED(op)) SpaceNode *snode= CTX_wm_space_node(C); /* this is just a wrapper around this call... */ - ntreeSolveOrder(snode->edittree); + ntreeUpdateTree(snode->nodetree); snode_notify(C, snode); return OPERATOR_FINISHED; @@ -3265,7 +3432,9 @@ static int node_add_file_exec(bContext *C, wmOperator *op) SpaceNode *snode= CTX_wm_space_node(C); bNode *node; Image *ima= NULL; - int ntype=0; + bNodeTemplate ntemp; + + ntemp.type = -1; /* check input variables */ if (RNA_property_is_set(op->ptr, "filepath")) @@ -3297,11 +3466,14 @@ static int node_add_file_exec(bContext *C, wmOperator *op) node_deselectall(snode); if (snode->nodetree->type==NTREE_COMPOSIT) - ntype = CMP_NODE_IMAGE; + ntemp.type = CMP_NODE_IMAGE; + if (ntemp.type < 0) + return OPERATOR_CANCELLED; + ED_preview_kill_jobs(C); - node = node_add_node(snode, bmain, scene, ntype, snode->mx, snode->my); + node = node_add_node(snode, bmain, scene, &ntemp, snode->mx, snode->my); if (!node) { BKE_report(op->reports, RPT_WARNING, "Could not add an image node."); @@ -3350,5 +3522,67 @@ void NODE_OT_add_file(wmOperatorType *ot) RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Datablock name to assign."); } +/********************** New node tree operator *********************/ +static int new_node_tree_exec(bContext *C, wmOperator *op) +{ + SpaceNode *snode; + bNodeTree *ntree; + PointerRNA ptr, idptr; + PropertyRNA *prop; + int treetype; + char treename[MAX_ID_NAME-2] = "NodeTree"; + + /* retrieve state */ + snode= CTX_wm_space_node(C); + + if (RNA_property_is_set(op->ptr, "type")) + treetype = RNA_enum_get(op->ptr, "type"); + else + treetype = snode->treetype; + + if (RNA_property_is_set(op->ptr, "name")) + RNA_string_get(op->ptr, "name", treename); + + ntree = ntreeAddTree(treename, treetype, 0); + if(!ntree) + return OPERATOR_CANCELLED; + + /* hook into UI */ + uiIDContextProperty(C, &ptr, &prop); + if(prop) { + RNA_id_pointer_create(&ntree->id, &idptr); + RNA_property_pointer_set(&ptr, prop, idptr); + /* RNA_property_pointer_set increases the user count, + * fixed here as the editor is the initial user. + */ + --ntree->id.us; + RNA_property_update(C, &ptr, prop); + } + else if(snode) { + Scene *scene= CTX_data_scene(C); + snode->nodetree = ntree; + + ED_node_tree_update(snode, scene); + } + + return OPERATOR_FINISHED; +} + +void NODE_OT_new_node_tree(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "New node tree"; + ot->idname= "NODE_OT_new_node_tree"; + + /* api callbacks */ + ot->exec= new_node_tree_exec; + ot->poll= ED_operator_node_active; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_enum(ot->srna, "type", nodetree_type_items, NTREE_COMPOSIT, "Tree Type", ""); + RNA_def_string(ot->srna, "name", "NodeTree", MAX_ID_NAME-2, "Name", ""); +} diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c index 634e49dc515..5c921d40344 100644 --- a/source/blender/editors/space_node/node_header.c +++ b/source/blender/editors/space_node/node_header.c @@ -45,24 +45,26 @@ #include "BLI_utildefines.h" #include "BKE_context.h" +#include "BKE_global.h" #include "BKE_screen.h" #include "BKE_node.h" #include "BKE_main.h" +#include "RNA_access.h" + #include "WM_api.h" #include "WM_types.h" - #include "UI_interface.h" -#include "UI_resources.h" #include "UI_interface_icons.h" +#include "UI_resources.h" #include "UI_view2d.h" #include "node_intern.h" /* ************************ add menu *********************** */ -static void do_node_add(bContext *C, void *UNUSED(arg), int event) +static void do_node_add(bContext *C, bNodeTemplate *ntemp) { Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); @@ -89,7 +91,7 @@ static void do_node_add(bContext *C, void *UNUSED(arg), int event) else node->flag &= ~NODE_TEST; } - node= node_add_node(snode, bmain, scene, event, snode->mx, snode->my); + node= node_add_node(snode, bmain, scene, ntemp, snode->mx, snode->my); /* select previous selection before autoconnect */ for(node= snode->edittree->nodes.first; node; node= node->next) { @@ -105,69 +107,111 @@ static void do_node_add(bContext *C, void *UNUSED(arg), int event) snode_dag_update(C, snode); } -static void node_auto_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass) +static void do_node_add_static(bContext *C, void *UNUSED(arg), int event) +{ + bNodeTemplate ntemp; + ntemp.type = event; + do_node_add(C, &ntemp); +} + +static void do_node_add_group(bContext *C, void *UNUSED(arg), int event) +{ + SpaceNode *snode= CTX_wm_space_node(C); + bNodeTemplate ntemp; + + if (event>=0) { + ntemp.ngroup= BLI_findlink(&G.main->nodetree, event); + ntemp.type = ntemp.ngroup->nodetype; + } + else { + ntemp.type = -event; + switch (ntemp.type) { + case NODE_GROUP: + ntemp.ngroup = ntreeAddTree("Group", snode->treetype, ntemp.type); + break; + case NODE_FORLOOP: + ntemp.ngroup = ntreeAddTree("For Loop", snode->treetype, ntemp.type); + break; + case NODE_WHILELOOP: + ntemp.ngroup = ntreeAddTree("While Loop", snode->treetype, ntemp.type); + break; + default: + ntemp.ngroup = NULL; + } + } + if (!ntemp.ngroup) + return; + + do_node_add(C, &ntemp); +} + +#if 0 /* disabled */ +static void do_node_add_dynamic(bContext *C, void *UNUSED(arg), int event) +{ + bNodeTemplate ntemp; + ntemp.type = NODE_DYNAMIC; + do_node_add(C, &ntemp); +} +#endif + +static int node_tree_has_type(int treetype, int nodetype) +{ + bNodeTreeType *ttype= ntreeGetType(treetype); + bNodeType *ntype; + for (ntype=ttype->node_types.first; ntype; ntype=ntype->next) { + if (ntype->type==nodetype) + return 1; + } + return 0; +} + +static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass) { Main *bmain= CTX_data_main(C); SpaceNode *snode= CTX_wm_space_node(C); bNodeTree *ntree; int nodeclass= GET_INT_FROM_POINTER(arg_nodeclass); - int tot= 0, a; + int event; ntree = snode->nodetree; - + if(!ntree) { uiItemS(layout); return; } - - /* mostly taken from toolbox.c, node_add_sublevel() */ - if(nodeclass==NODE_CLASS_GROUP) { - bNodeTree *ngroup= bmain->nodetree.first; - for(; ngroup; ngroup= ngroup->id.next) - if(ngroup->type==ntree->type) - tot++; - } - else { - bNodeType *type = ntree->alltypes.first; - while(type) { - if(type->nclass == nodeclass) - tot++; - type= type->next; - } - } - if(tot==0) { + if (nodeclass==NODE_CLASS_GROUP) { + bNodeTree *ngroup; + + uiLayoutSetFunc(layout, do_node_add_group, NULL); + + /* XXX hack: negative numbers used for empty group types */ + if (node_tree_has_type(ntree->type, NODE_GROUP)) + uiItemV(layout, "New Group", 0, -NODE_GROUP); + if (node_tree_has_type(ntree->type, NODE_FORLOOP)) + uiItemV(layout, "New For Loop", 0, -NODE_FORLOOP); + if (node_tree_has_type(ntree->type, NODE_WHILELOOP)) + uiItemV(layout, "New While Loop", 0, -NODE_WHILELOOP); uiItemS(layout); - return; - } - - uiLayoutSetFunc(layout, do_node_add, NULL); - - if(nodeclass==NODE_CLASS_GROUP) { - bNodeTree *ngroup= bmain->nodetree.first; - - for(tot=0, a=0; ngroup; ngroup= ngroup->id.next, tot++) { - if(ngroup->type==ntree->type) { - uiItemV(layout, ngroup->id.name+2, ICON_NONE, NODE_GROUP_MENU+tot); - a++; + + for(ngroup=bmain->nodetree.first, event=0; ngroup; ngroup= ngroup->id.next, ++event) { + /* only use group trees */ + if (ngroup->type==ntree->type && ELEM3(ngroup->nodetype, NODE_GROUP, NODE_FORLOOP, NODE_WHILELOOP)) { + uiItemV(layout, ngroup->id.name+2, 0, event); } } } + else if (nodeclass==NODE_DYNAMIC) { + /* disabled */ + } else { - bNodeType *type; - int script=0; - - for(a=0, type= ntree->alltypes.first; type; type=type->next) { - if(type->nclass == nodeclass && type->name) { - if(type->type == NODE_DYNAMIC) { - uiItemV(layout, type->name, ICON_NONE, NODE_DYNAMIC_MENU+script); - script++; - } - else - uiItemV(layout, type->name, ICON_NONE, type->type); - - a++; - } + bNodeType *ntype; + + uiLayoutSetFunc(layout, do_node_add_static, NULL); + + for (ntype=ntreeGetType(ntree->type)->node_types.first; ntype; ntype=ntype->next) { + if(ntype->nclass==nodeclass && ntype->name) + uiItemV(layout, ntype->name, 0, ntype->type); } } } @@ -181,34 +225,34 @@ static void node_menu_add(const bContext *C, Menu *menu) uiLayoutSetActive(layout, 0); if(snode->treetype==NTREE_SHADER) { - uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); - uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); - uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); - uiItemMenuF(layout, "Vector", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR)); - uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); - uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); - uiItemMenuF(layout, "Dynamic", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC)); + uiItemMenuF(layout, "Input", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); + uiItemMenuF(layout, "Output", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); + uiItemMenuF(layout, "Color", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); + uiItemMenuF(layout, "Vector", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR)); + uiItemMenuF(layout, "Convertor", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); + uiItemMenuF(layout, "Group", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); + uiItemMenuF(layout, "Dynamic", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC)); } else if(snode->treetype==NTREE_COMPOSIT) { - uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); - uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); - uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); - uiItemMenuF(layout, "Vector", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR)); - uiItemMenuF(layout, "Filter", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER)); - uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); - uiItemMenuF(layout, "Matte", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE)); - uiItemMenuF(layout, "Distort", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); - uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); + uiItemMenuF(layout, "Input", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); + uiItemMenuF(layout, "Output", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); + uiItemMenuF(layout, "Color", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); + uiItemMenuF(layout, "Vector", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR)); + uiItemMenuF(layout, "Filter", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER)); + uiItemMenuF(layout, "Convertor", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); + uiItemMenuF(layout, "Matte", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE)); + uiItemMenuF(layout, "Distort", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); + uiItemMenuF(layout, "Group", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); } else if(snode->treetype==NTREE_TEXTURE) { - uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); - uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); - uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); - uiItemMenuF(layout, "Patterns", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN)); - uiItemMenuF(layout, "Textures", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE)); - uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); - uiItemMenuF(layout, "Distort", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); - uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); + uiItemMenuF(layout, "Input", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); + uiItemMenuF(layout, "Output", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT)); + uiItemMenuF(layout, "Color", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR)); + uiItemMenuF(layout, "Patterns", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN)); + uiItemMenuF(layout, "Textures", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE)); + uiItemMenuF(layout, "Convertor", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); + uiItemMenuF(layout, "Distort", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); + uiItemMenuF(layout, "Group", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); } } diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 4cfde22b8a0..3751d8efae8 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -33,6 +33,8 @@ #ifndef ED_NODE_INTERN_H #define ED_NODE_INTERN_H +#include "UI_interface.h" + /* internal exports only */ struct ARegion; @@ -40,6 +42,7 @@ struct ARegionType; struct View2D; struct bContext; struct wmWindowManager; +struct bNodeTemplate; struct bNode; struct bNodeSocket; struct bNodeLink; @@ -64,6 +67,11 @@ void node_header_buttons(const bContext *C, ARegion *ar); void node_menus_register(void); /* node_draw.c */ +void node_socket_circle_draw(struct bNodeTree *ntree, struct bNodeSocket *sock, float size); +void node_draw_default(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node); +void node_update_default(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node); +void node_update_nodetree(const struct bContext *C, struct bNodeTree *ntree, float offsetx, float offsety); +void node_draw_nodetree(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree); void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d); /* node_buttons.c */ @@ -90,6 +98,7 @@ void NODE_OT_select_same_type_prev(wmOperatorType *ot); void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link); void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 ); int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, float coord_array[][2], int resol); +void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 ); void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage); void draw_nodespace_color_info(struct ARegion *ar, int color_manage, int channels, int x, int y, char *cp, float *fp); @@ -97,10 +106,10 @@ void draw_nodespace_color_info(struct ARegion *ar, int color_manage, int channel void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *treetype); void snode_notify(bContext *C, SpaceNode *snode); void snode_dag_update(bContext *C, SpaceNode *snode); -bNode *next_node(bNodeTree *ntree); -bNode *node_add_node(SpaceNode *snode, struct Main *bmain, Scene *scene, int type, float locx, float locy); +bNode *node_add_node(struct SpaceNode *snode, struct Main *bmain, struct Scene *scene, struct bNodeTemplate *ntemp, float locx, float locy); void snode_set_context(SpaceNode *snode, Scene *scene); void snode_make_group_editable(SpaceNode *snode, bNode *gnode); +void node_sort(struct bNodeTree *ntree); void node_deselectall(SpaceNode *snode); int node_select_same_type(SpaceNode *snode); int node_select_same_type_np(SpaceNode *snode, int dir); @@ -146,6 +155,8 @@ void NODE_OT_backimage_sample(wmOperatorType *ot); void NODE_OT_add_file(struct wmOperatorType *ot); +void NODE_OT_new_node_tree(struct wmOperatorType *ot); + extern const char *node_context_dir[]; // XXXXXX diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c index 4bb0283690b..153d703ddf6 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -96,6 +96,8 @@ void node_operatortypes(void) WM_operatortype_append(NODE_OT_backimage_sample); WM_operatortype_append(NODE_OT_add_file); + + WM_operatortype_append(NODE_OT_new_node_tree); } void ED_operatormacros_node(void) @@ -193,6 +195,5 @@ void node_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "NODE_OT_read_fullsamplelayers", RKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "NODE_OT_render_changed", ZKEY, KM_PRESS, 0, 0); - transform_keymap_for_space(keyconf, keymap, SPACE_NODE); } diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index ca673277739..3d8b1676ea5 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -62,7 +62,7 @@ static bNode *node_under_mouse(bNodeTree *ntree, int mx, int my) { bNode *node; - for(next_node(ntree); (node=next_node(NULL));) { + for(node=ntree->nodes.last; node; node=node->prev) { /* node body (header and scale are in other operators) */ if (BLI_in_rctf(&node->totr, mx, my)) return node; @@ -93,8 +93,10 @@ static bNode *node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, cons } else node->flag ^= SELECT; - + ED_node_set_active(bmain, snode->edittree, node); + + node_sort(snode->edittree); } return node; @@ -182,6 +184,8 @@ static int node_borderselect_exec(bContext *C, wmOperator *op) } } + node_sort(snode->edittree); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; @@ -252,6 +256,8 @@ static int node_select_all_exec(bContext *C, wmOperator *UNUSED(op)) node->flag |= NODE_SELECT; } + node_sort(snode->edittree); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -292,6 +298,8 @@ static int node_select_linked_to_exec(bContext *C, wmOperator *UNUSED(op)) node->flag |= NODE_SELECT; } + node_sort(snode->edittree); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -332,6 +340,8 @@ static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op)) node->flag |= NODE_SELECT; } + node_sort(snode->edittree); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -358,6 +368,9 @@ static int node_select_same_type_exec(bContext *C, wmOperator *UNUSED(op)) SpaceNode *snode = CTX_wm_space_node(C); node_select_same_type(snode); + + node_sort(snode->edittree); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -384,7 +397,11 @@ static int node_select_same_type_next_exec(bContext *C, wmOperator *UNUSED(op)) SpaceNode *snode = CTX_wm_space_node(C); node_select_same_type_np(snode, 0); + + node_sort(snode->edittree); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); + return OPERATOR_FINISHED; } @@ -408,6 +425,9 @@ static int node_select_same_type_prev_exec(bContext *C, wmOperator *UNUSED(op)) SpaceNode *snode = CTX_wm_space_node(C); node_select_same_type_np(snode, 1); + + node_sort(snode->edittree); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c index 601ffbd313d..c4567bea648 100644 --- a/source/blender/editors/space_node/node_state.c +++ b/source/blender/editors/space_node/node_state.c @@ -69,30 +69,14 @@ void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set) sock->flag &= ~SOCK_HIDDEN; } else { - bNode *gnode= node_tree_get_editgroup(snode->nodetree); - - /* hiding inside group should not break links in other group users */ - if(gnode) { - nodeGroupSocketUseFlags((bNodeTree *)gnode->id); - for(sock= node->inputs.first; sock; sock= sock->next) - if(!(sock->flag & SOCK_IN_USE)) - if(sock->link==NULL) - sock->flag |= SOCK_HIDDEN; - for(sock= node->outputs.first; sock; sock= sock->next) - if(!(sock->flag & SOCK_IN_USE)) - if(nodeCountSocketLinks(snode->edittree, sock)==0) - sock->flag |= SOCK_HIDDEN; + /* hide unused sockets */ + for(sock= node->inputs.first; sock; sock= sock->next) { + if(sock->link==NULL) + sock->flag |= SOCK_HIDDEN; } - else { - /* hide unused sockets */ - for(sock= node->inputs.first; sock; sock= sock->next) { - if(sock->link==NULL) - sock->flag |= SOCK_HIDDEN; - } - for(sock= node->outputs.first; sock; sock= sock->next) { - if(nodeCountSocketLinks(snode->edittree, sock)==0) - sock->flag |= SOCK_HIDDEN; - } + for(sock= node->outputs.first; sock; sock= sock->next) { + if(nodeCountSocketLinks(snode->edittree, sock)==0) + sock->flag |= SOCK_HIDDEN; } } } @@ -100,7 +84,7 @@ void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set) static void node_hide_unhide_sockets(SpaceNode *snode, bNode *node) { node_set_hidden_sockets(snode, node, !node_has_hidden_sockets(node)); - node_tree_verify_groups(snode->nodetree); + ntreeUpdateTree(snode->edittree); } static int do_header_node(SpaceNode *snode, bNode *node, float mx, float my) @@ -168,7 +152,7 @@ static int node_toggle_visibility(SpaceNode *snode, ARegion *ar, const int mval[ UI_view2d_region_to_view(&ar->v2d, mval[0], mval[1], &mx, &my); - for(next_node(snode->edittree); (node=next_node(NULL));) { + for(node=snode->edittree->nodes.last; node; node=node->prev) { if(node->flag & NODE_HIDDEN) { if(do_header_hidden_node(node, mx, my)) { ED_region_tag_redraw(ar); diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index 3c5f4a163a2..0990afa4fe6 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -439,14 +439,30 @@ static int node_context(const bContext *C, const char *member, bContextDataResul else if(CTX_data_equals(member, "selected_nodes")) { bNode *node; - for(next_node(snode->edittree); (node=next_node(NULL));) { - if(node->flag & NODE_SELECT) { - CTX_data_list_add(result, &snode->edittree->id, &RNA_Node, node); + if(snode->edittree) { + for(node=snode->edittree->nodes.last; node; node=node->prev) { + if(node->flag & NODE_SELECT) { + CTX_data_list_add(result, &snode->edittree->id, &RNA_Node, node); + } } } CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } + else if(CTX_data_equals(member, "active_node")) { + bNode *node; + + if(snode->edittree) { + for(node=snode->edittree->nodes.last; node; node=node->prev) { + if(node->flag & NODE_ACTIVE) { + CTX_data_pointer_set(result, &snode->edittree->id, &RNA_Node, node); + break; + } + } + } + CTX_data_type_set(result, CTX_DATA_TYPE_POINTER); + return 1; + } return 0; } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 7b43d0955a7..cae64899aeb 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4771,12 +4771,14 @@ void special_aftertrans_update(bContext *C, TransInfo *t) } else if (t->spacetype == SPACE_NODE) { + SpaceNode *snode= (SpaceNode *)t->sa->spacedata.first; + ED_node_update_hierarchy(C, snode->edittree); + if(cancelled == 0) ED_node_link_insert(t->sa); /* clear link line */ ED_node_link_intersect_test(t->sa, 0); - } else if (t->spacetype == SPACE_ACTION) { SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first; @@ -5194,6 +5196,11 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node) td2d->loc2d = &node->locx; /* current location */ td->flag = 0; + /* exclude nodes whose parent is also transformed */ + if (node->parent && (node->parent->flag & NODE_TRANSFORM)) { + td->flag |= TD_SKIP; + } + td->loc = td2d->loc; VECCOPY(td->center, td->loc); VECCOPY(td->iloc, td->loc); @@ -5214,6 +5221,16 @@ static void createTransNodeData(bContext *C, TransInfo *t) { TransData *td; TransData2D *td2d; + SpaceNode *snode= t->sa->spacedata.first; + bNode *node; + + /* set transform flags on nodes */ + for (node=snode->edittree->nodes.first; node; node=node->next) { + if ((node->flag & NODE_SELECT) || (node->parent && (node->parent->flag & NODE_TRANSFORM))) + node->flag |= NODE_TRANSFORM; + else + node->flag &= ~NODE_TRANSFORM; + } t->total= CTX_DATA_COUNT(C, selected_nodes); diff --git a/source/blender/gpu/SConscript b/source/blender/gpu/SConscript index b48e1d5a8e2..adb52d577a1 100644 --- a/source/blender/gpu/SConscript +++ b/source/blender/gpu/SConscript @@ -5,7 +5,7 @@ sources = env.Glob('intern/*.c') defs = [ 'GLEW_STATIC' ] -incs = '../blenlib ../blenkernel ../makesdna ../include ../blenloader' +incs = '../blenlib ../blenkernel ../makesdna ../makesrna ../include ../blenloader' incs += ' #/extern/glew/include #intern/guardedalloc #intern/smoke/extern ../imbuf .' if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index efaf30b02f6..3a51a6a56a4 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -38,26 +38,29 @@ #include "DNA_vec_types.h" #include "DNA_listBase.h" +struct ID; struct ListBase; struct SpaceNode; struct bNodeLink; struct bNodeType; -struct bNodeGroup; +struct bNodeTreeExec; struct AnimData; struct bGPdata; struct uiBlock; #define NODE_MAXSTR 32 - typedef struct bNodeStack { float vec[4]; - float min, max; /* min/max for values (UI writes it, execute might use it) */ + float min, max; void *data; short hasinput; /* when input has link, tagged before executing */ short hasoutput; /* when output is linked, tagged before executing */ short datatype; /* type of data pointer */ short sockettype; /* type of socket stack comes from, to remap linking different sockets */ + short is_copy; /* data is a copy of external data (no freeing) */ + short external; /* data is used by external nodes (no freeing) */ + short pad[2]; } bNodeStack; /* ns->datatype, shadetree only */ @@ -68,50 +71,58 @@ typedef struct bNodeSocket { struct bNodeSocket *next, *prev, *new_sock; char name[32]; - bNodeStack ns; /* custom data for inputs, only UI writes in this */ + + void *storage; /* custom storage */ short type, flag; short limit; /* max. number of links */ - - /* stack data info (only during execution!) */ - short stack_type; /* type of stack reference */ - /* XXX only one of stack_ptr or stack_index is used (depending on stack_type). - * could store the index in the pointer with SET_INT_IN_POINTER (a bit ugly). - * (union won't work here, not supported by DNA) - */ - struct bNodeStack *stack_ptr; /* constant input value */ - short stack_index; /* local stack index or external input number */ short pad1; float locx, locy; - /* internal data to retrieve relations and groups */ + void *default_value; /* default input value used for unlinked sockets */ + + /* execution data */ + short stack_index; /* local stack index */ + short pad2; + int pad3; + void *cache; /* cached data from execution */ + /* internal data to retrieve relations and groups */ int own_index; /* group socket identifiers, to find matching pairs after reading files */ - struct bNodeSocket *groupsock; int to_index; /* XXX deprecated, only used for restoring old group node links */ - int pad2; + struct bNodeSocket *groupsock; - struct bNodeLink *link; /* a link pointer, set in nodeSolveOrder() */ + struct bNodeLink *link; /* a link pointer, set in ntreeUpdateTree */ + + /* DEPRECATED only needed for do_versions */ + bNodeStack ns; /* custom data for inputs, only UI writes in this */ } bNodeSocket; /* sock->type */ -#define SOCK_VALUE 0 -#define SOCK_VECTOR 1 -#define SOCK_RGBA 2 +#define SOCK_FLOAT 0 +#define SOCK_VECTOR 1 +#define SOCK_RGBA 2 +#define SOCK_INT 3 +#define SOCK_BOOLEAN 4 +#define SOCK_MESH 5 +#define NUM_SOCKET_TYPES 6 /* must be last! */ + +/* socket side (input/output) */ +#define SOCK_IN 1 +#define SOCK_OUT 2 /* sock->flag, first bit is select */ - /* hidden is user defined, to hide unused */ + /* hidden is user defined, to hide unused */ #define SOCK_HIDDEN 2 - /* only used now for groups... */ -#define SOCK_IN_USE 4 - /* unavailable is for dynamic sockets */ + /* only used now for groups... */ +#define SOCK_IN_USE 4 /* XXX deprecated */ + /* unavailable is for dynamic sockets */ #define SOCK_UNAVAIL 8 - -/* sock->stack_type */ -#define SOCK_STACK_LOCAL 1 /* part of the local tree stack */ -#define SOCK_STACK_EXTERN 2 /* use input stack pointer */ -#define SOCK_STACK_CONST 3 /* use pointer to constant input value */ + /* dynamic socket (can be modified by user) */ +#define SOCK_DYNAMIC 16 + /* group socket should not be exposed */ +#define SOCK_INTERNAL 32 typedef struct bNodePreview { unsigned char *rect; @@ -119,7 +130,6 @@ typedef struct bNodePreview { int pad; } bNodePreview; - /* limit data in bNode to what we want to see saved? */ typedef struct bNode { struct bNode *next, *prev, *new_node; @@ -132,11 +142,14 @@ typedef struct bNode { short nr; /* number of this node in list, used for UI exec events */ ListBase inputs, outputs; + struct bNode *parent; /* parent node */ struct ID *id; /* optional link to libdata */ void *storage; /* custom data, must be struct, for storage in file */ float locx, locy; /* root offset for drawing */ - float width, miniwidth; + float width, height; /* node custom width and height */ + float miniwidth; /* node width if hidden */ + int pad; char label[32]; /* custom user-defined label */ short custom1, custom2; /* to be abused for buttons */ float custom3, custom4; @@ -151,7 +164,6 @@ typedef struct bNode { struct uiBlock *block; /* runtime during drawing */ struct bNodeType *typeinfo; /* lookup of callbacks and defaults */ - } bNode; /* node->flag */ @@ -163,11 +175,17 @@ typedef struct bNode { #define NODE_ACTIVE_ID 32 #define NODE_DO_OUTPUT 64 #define NODE_GROUP_EDIT 128 - /* free test flag, undefined */ + /* free test flag, undefined */ #define NODE_TEST 256 - /* composite: don't do node but pass on buffer(s) */ + /* composite: don't do node but pass on buffer(s) */ #define NODE_MUTED 512 -#define NODE_CUSTOM_NAME 1024 /* deprecated! */ +#define NODE_CUSTOM_NAME 1024 /* deprecated! */ + /* group node types: use const outputs by default */ +#define NODE_CONST_OUTPUT (1<<11) + /* node is always behind others */ +#define NODE_BACKGROUND (1<<12) + /* automatic flag for nodes included in transforms */ +#define NODE_TRANSFORM (1<<13) typedef struct bNodeLink { struct bNodeLink *next, *prev; @@ -175,13 +193,13 @@ typedef struct bNodeLink { bNode *fromnode, *tonode; bNodeSocket *fromsock, *tosock; - int flag, pad; - + int flag; + int pad; } bNodeLink; - /* link->flag */ -#define NODE_LINKFLAG_HILITE 1 +#define NODE_LINK_VALID 1 /* link has been successfully validated */ +#define NODE_LINKFLAG_HILITE 2 /* the basis for a Node tree, all links and nodes reside internal here */ /* only re-usable node trees are in the library though, materials and textures allocate own tree struct */ @@ -193,19 +211,24 @@ typedef struct bNodeTree { ListBase nodes, links; - bNodeStack *stack; /* stack is only while executing, no read/write in file */ - struct ListBase *threadstack; /* same as above */ - int type, init; /* set init on fileread */ - int stacksize; /* amount of elements in stack */ int cur_index; /* sockets in groups have unique identifiers, adding new sockets always will increase this counter */ - int flag, pad; + int flag; + int update; /* update flags */ + + int nodetype; /* specific node type this tree is used for */ - ListBase alltypes; /* type definitions */ ListBase inputs, outputs; /* external sockets for group nodes */ - - int pad2[2]; + + /* execution data */ + /* XXX It would be preferable to completely move this data out of the underlying node tree, + * so node tree execution could finally run independent of the tree itself. This would allow node trees + * to be merely linked by other data (materials, textures, etc.), as ID data is supposed to. + * Execution data is generated from the tree once at execution start and can then be used + * as long as necessary, even while the tree is being modified. + */ + struct bNodeTreeExec *execdata; /* callbacks */ void (*progress)(void *, float progress); @@ -216,20 +239,59 @@ typedef struct bNodeTree { } bNodeTree; /* ntree->type, index */ -#define NTREE_SHADER 0 -#define NTREE_COMPOSIT 1 -#define NTREE_TEXTURE 2 +#define NTREE_SHADER 0 +#define NTREE_COMPOSIT 1 +#define NTREE_TEXTURE 2 +#define NUM_NTREE_TYPES 3 /* ntree->init, flag */ -#define NTREE_TYPE_INIT 1 -#define NTREE_EXEC_INIT 2 +#define NTREE_TYPE_INIT 1 /* ntree->flag */ #define NTREE_DS_EXPAND 1 /* for animation editors */ -/* XXX not nice, but needed as a temporary flag +/* XXX not nice, but needed as a temporary flags * for group updates after library linking. */ -#define NTREE_DO_VERSIONS 1024 +#define NTREE_DO_VERSIONS_GROUP_EXPOSE 1024 + +/* ntree->update */ +#define NTREE_UPDATE 0xFFFF /* generic update flag (includes all others) */ +#define NTREE_UPDATE_LINKS 1 /* links have been added or removed */ +#define NTREE_UPDATE_NODES 2 /* nodes or sockets have been added or removed */ +#define NTREE_UPDATE_GROUP_IN 16 /* group inputs have changed */ +#define NTREE_UPDATE_GROUP_OUT 32 /* group outputs have changed */ +#define NTREE_UPDATE_GROUP 48 /* group has changed (generic flag including all other group flags) */ + + +/* socket value structs for input buttons */ + +typedef struct bNodeSocketValueInt { + int subtype; /* RNA subtype */ + int value; + int min, max; +} bNodeSocketValueInt; + +typedef struct bNodeSocketValueFloat { + int subtype; /* RNA subtype */ + float value; + float min, max; +} bNodeSocketValueFloat; + +typedef struct bNodeSocketValueBoolean { + char value; + char pad[3]; +} bNodeSocketValueBoolean; + +typedef struct bNodeSocketValueVector { + int subtype; /* RNA subtype */ + float value[3]; + float min, max; +} bNodeSocketValueVector; + +typedef struct bNodeSocketValueRGBA { + float value[4]; +} bNodeSocketValueRGBA; + /* data structs, for node->storage */ @@ -354,7 +416,6 @@ typedef struct TexNodeOutput { char name[32]; } TexNodeOutput; - /* comp channel matte */ #define CMP_NODE_CHANNEL_MATTE_CS_RGB 1 #define CMP_NODE_CHANNEL_MATTE_CS_HSV 2 diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 259c7de5cd4..477ee2fe43e 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -327,10 +327,13 @@ extern StructRNA RNA_NearSensor; extern StructRNA RNA_NlaStrip; extern StructRNA RNA_NlaTrack; extern StructRNA RNA_Node; +extern StructRNA RNA_NodeForLoop; extern StructRNA RNA_NodeGroup; extern StructRNA RNA_NodeLink; extern StructRNA RNA_NodeSocket; +extern StructRNA RNA_NodeSocketPanel; extern StructRNA RNA_NodeTree; +extern StructRNA RNA_NodeWhileLoop; extern StructRNA RNA_NoiseTexture; extern StructRNA RNA_NorController; extern StructRNA RNA_Object; @@ -376,7 +379,6 @@ extern StructRNA RNA_PropertyGroupItem; extern StructRNA RNA_PropertySensor; extern StructRNA RNA_PythonConstraint; extern StructRNA RNA_PythonController; -extern StructRNA RNA_RGBANodeSocket; extern StructRNA RNA_RadarSensor; extern StructRNA RNA_RandomSensor; extern StructRNA RNA_RaySensor; @@ -553,9 +555,7 @@ extern StructRNA RNA_UserPreferencesFilePaths; extern StructRNA RNA_UserPreferencesSystem; extern StructRNA RNA_UserPreferencesView; extern StructRNA RNA_UserSolidLight; -extern StructRNA RNA_ValueNodeSocket; extern StructRNA RNA_VectorFont; -extern StructRNA RNA_VectorNodeSocket; extern StructRNA RNA_VertexGroup; extern StructRNA RNA_VertexGroupElement; extern StructRNA RNA_VertexPaint; @@ -599,6 +599,8 @@ extern const PointerRNA PointerRNA_NULL; /* Structs */ +StructRNA *RNA_struct_find(const char *identifier); + const char *RNA_struct_identifier(StructRNA *type); const char *RNA_struct_ui_name(StructRNA *type); const char *RNA_struct_ui_description(StructRNA *type); diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index 0b63bb02436..2300b72910d 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -102,10 +102,12 @@ extern EnumPropertyItem transform_mode_types[]; extern EnumPropertyItem posebone_rotmode_items[]; extern EnumPropertyItem property_type_items[]; +extern EnumPropertyItem property_subtype_items[]; extern EnumPropertyItem property_unit_items[]; extern EnumPropertyItem viewport_shade_items[]; +extern EnumPropertyItem nodetree_type_items[]; extern EnumPropertyItem node_socket_type_items[]; extern EnumPropertyItem node_math_items[]; diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index f8199074f27..4a18518dde9 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -99,7 +99,10 @@ typedef enum PropertyUnit { #define RNA_ENUM_BITFLAG_SIZE 32 -/* also update enums in bpy_props.c when adding items here */ +/* also update enums in bpy_props.c when adding items here + * watch it: these values are written to files as part of + * node socket button subtypes! + */ typedef enum PropertySubType { PROP_NONE = 0, diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index 1cb24630fbe..10b20fc795a 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -9,6 +9,7 @@ objs += o incs = '#/intern/guardedalloc #/intern/memutil #/intern/audaspace/intern ../blenkernel ../blenlib ../makesdna intern .' incs += ' ../windowmanager ../editors/include ../gpu ../imbuf ../ikplugin ../blenfont ../blenloader' incs += ' ../render/extern/include' +incs += ' ../nodes' incs += ' #/extern/glew/include' defs = [] diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index ad79771416d..936f2e5e40c 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -475,6 +475,17 @@ static const char *rna_ensure_property_name(PropertyRNA *prop) /* Structs */ +StructRNA *RNA_struct_find(const char *identifier) +{ + StructRNA *type; + if (identifier) { + for (type = BLENDER_RNA.structs.first; type; type = type->cont.next) + if (strcmp(type->identifier, identifier)==0) + return type; + } + return NULL; +} + const char *RNA_struct_identifier(StructRNA *type) { return type->identifier; diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index d69cb2063ab..1ba6905ea37 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -214,9 +214,7 @@ void rna_Main_materials_remove(Main *bmain, ReportList *reports, struct Material struct bNodeTree *rna_Main_nodetree_new(Main *UNUSED(bmain), const char *name, int type) { - bNodeTree *tree = ntreeAddTree(name, type, TRUE); - -// ntreeMakeGroupSockets(tree); + bNodeTree *tree = ntreeAddTree(name, type, NODE_GROUP); id_us_min(&tree->id); return tree; diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index d6e475fdbad..49a0458977a 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -30,13 +30,17 @@ #include #include +#include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" #include "rna_internal.h" +#include "rna_internal_types.h" #include "DNA_material_types.h" +#include "DNA_mesh_types.h" #include "DNA_node_types.h" +#include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_texture_types.h" @@ -53,9 +57,16 @@ #include "MEM_guardedalloc.h" +EnumPropertyItem nodetree_type_items[] = { + {NTREE_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes" }, + {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes" }, + {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes" }, + {0, NULL, 0, NULL, NULL} +}; + EnumPropertyItem node_socket_type_items[] = { - {SOCK_VALUE, "VALUE", 0, "Value", ""}, + {SOCK_FLOAT, "VALUE", 0, "Value", ""}, {SOCK_VECTOR, "VECTOR", 0, "Vector", ""}, {SOCK_RGBA, "RGBA", 0, "RGBA", ""}, {0, NULL, 0, NULL, NULL}}; @@ -99,6 +110,41 @@ EnumPropertyItem node_filter_items[] = { {6, "SHADOW", 0, "Shadow", ""}, {0, NULL, 0, NULL, NULL}}; + +/* Add any new socket value subtype here. + * When adding a new subtype here, make sure you also add it + * to the subtype definitions in DNA_node_types.h. + * This macro is used by the RNA and the internal converter functions + * to define all socket subtypes. The SUBTYPE macro must be defined + * before using this macro, and undefined afterwards. + */ +#define NODE_DEFINE_SUBTYPES_INT \ +SUBTYPE(INT, Int, NONE, None) \ +SUBTYPE(INT, Int, UNSIGNED, Unsigned) + +#define NODE_DEFINE_SUBTYPES_FLOAT \ +SUBTYPE(FLOAT, Float, NONE, None) \ +SUBTYPE(FLOAT, Float, UNSIGNED, Unsigned) \ +SUBTYPE(FLOAT, Float, PERCENTAGE, Percentage) \ +SUBTYPE(FLOAT, Float, FACTOR, Factor) \ +SUBTYPE(FLOAT, Float, ANGLE, Angle) \ +SUBTYPE(FLOAT, Float, TIME, Time) \ +SUBTYPE(FLOAT, Float, DISTANCE, Distance) + +#define NODE_DEFINE_SUBTYPES_VECTOR \ +SUBTYPE(VECTOR, Vector, NONE, None) \ +SUBTYPE(VECTOR, Vector, TRANSLATION, Translation) \ +SUBTYPE(VECTOR, Vector, DIRECTION, Direction) \ +SUBTYPE(VECTOR, Vector, VELOCITY, Velocity) \ +SUBTYPE(VECTOR, Vector, ACCELERATION, Acceleration) \ +SUBTYPE(VECTOR, Vector, EULER, Euler) \ +SUBTYPE(VECTOR, Vector, XYZ, XYZ) + +#define NODE_DEFINE_SUBTYPES \ +NODE_DEFINE_SUBTYPES_INT \ +NODE_DEFINE_SUBTYPES_FLOAT \ +NODE_DEFINE_SUBTYPES_VECTOR + #ifdef RNA_RUNTIME #include "BLI_linklist.h" @@ -121,32 +167,18 @@ static StructRNA *rna_Node_refine(struct PointerRNA *ptr) #include "rna_nodetree_types.h" - #undef DefNode - case NODE_GROUP: return &RNA_NodeGroup; + case NODE_FORLOOP: + return &RNA_NodeForLoop; + case NODE_WHILELOOP: + return &RNA_NodeWhileLoop; default: return &RNA_Node; } } -static StructRNA *rna_NodeSocketType_refine(struct PointerRNA *ptr) -{ - bNodeSocket *ns= (bNodeSocket*)ptr->data; - - switch(ns->type) { - case SOCK_VALUE: - return &RNA_ValueNodeSocket; - case SOCK_VECTOR: - return &RNA_VectorNodeSocket; - case SOCK_RGBA: - return &RNA_RGBANodeSocket; - default: - return &RNA_UnknownType; - } -} - static StructRNA *rna_NodeTree_refine(struct PointerRNA *ptr) { bNodeTree *ntree= (bNodeTree*)ptr->data; @@ -170,6 +202,46 @@ static char *rna_Node_path(PointerRNA *ptr) return BLI_sprintfN("nodes[\"%s\"]", node->name); } +static StructRNA *rna_NodeSocket_refine(PointerRNA *ptr) +{ + bNodeSocket *sock= (bNodeSocket*)ptr->data; + + if (sock->default_value) { + /* This returns the refined socket type with the full definition + * of the default input value with type and subtype. + */ + + #define SUBTYPE(socktype, stypename, id, idname) \ + { \ + bNodeSocketValue##stypename *value= (bNodeSocketValue##stypename*)sock->default_value; \ + if (value->subtype==PROP_##id) \ + return &RNA_NodeSocket##stypename##idname; \ + } + + switch (sock->type) { + case SOCK_FLOAT: + NODE_DEFINE_SUBTYPES_FLOAT + break; + case SOCK_INT: + NODE_DEFINE_SUBTYPES_INT + break; + case SOCK_BOOLEAN: + return &RNA_NodeSocketBoolean; + break; + case SOCK_VECTOR: + NODE_DEFINE_SUBTYPES_VECTOR + break; + case SOCK_RGBA: + return &RNA_NodeSocketRGBA; + break; + } + + #undef SUBTYPE + } + + return &RNA_NodeSocket; +} + static char *rna_NodeSocket_path(PointerRNA *ptr) { bNodeTree *ntree= (bNodeTree*)ptr->id.data; @@ -275,7 +347,7 @@ static void rna_NodeGroup_update(Main *bmain, Scene *scene, PointerRNA *ptr) bNodeTree *ntree= (bNodeTree*)ptr->id.data; bNode *node= (bNode*)ptr->data; - nodeGroupVerify((bNodeTree *)node->id); + ntreeUpdateTree((bNodeTree *)node->id); node_update(bmain, scene, ntree, node); } @@ -313,18 +385,42 @@ static void rna_NodeGroupSocket_update(Main *bmain, Scene *scene, PointerRNA *pt bNodeSocket *sock= (bNodeSocket*)ptr->data; bNode *node; - nodeGroupVerify(ntree); + ntreeUpdateTree(ntree); if (nodeFindNode(ntree, sock, &node, NULL, NULL)) node_update(bmain, scene, ntree, node); } -static void rna_NodeSocket_defvalue_range(PointerRNA *ptr, float *min, float *max) +static void rna_NodeLink_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + bNodeTree *ntree= (bNodeTree*)ptr->id.data; + + ntree->update |= NTREE_UPDATE_LINKS; + ntreeUpdateTree(ntree); +} + +static void rna_NodeSocketInt_range(PointerRNA *ptr, int *min, int *max) { bNodeSocket *sock= (bNodeSocket*)ptr->data; + bNodeSocketValueInt *val= (bNodeSocketValueInt*)sock->default_value; + *min = val->min; + *max = val->max; +} - *min = sock->ns.min; - *max = sock->ns.max; +static void rna_NodeSocketFloat_range(PointerRNA *ptr, float *min, float *max) +{ + bNodeSocket *sock= (bNodeSocket*)ptr->data; + bNodeSocketValueFloat *val= (bNodeSocketValueFloat*)sock->default_value; + *min = val->min; + *max = val->max; +} + +static void rna_NodeSocketVector_range(PointerRNA *ptr, float *min, float *max) +{ + bNodeSocket *sock= (bNodeSocket*)ptr->data; + bNodeSocketValueVector *val= (bNodeSocketValueVector*)sock->default_value; + *min = val->min; + *max = val->max; } static void rna_Node_mapping_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -454,18 +550,22 @@ static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *UNUSED(C), ReportList *reports, int type, bNodeTree *group) { bNode *node; + bNodeTemplate ntemp; if (type == NODE_GROUP && group == NULL) { BKE_reportf(reports, RPT_ERROR, "node type \'GROUP\' missing group argument"); return NULL; } - node = nodeAddNodeType(ntree, type, group, NULL); - + + ntemp.type = type; + ntemp.ngroup = group; + node = nodeAddNode(ntree, &ntemp); + if (node == NULL) { BKE_reportf(reports, RPT_ERROR, "Unable to create node"); } else { - nodeGroupVerify(ntree); /* update group node socket links*/ + ntreeUpdateTree(ntree); /* update group node socket links*/ NodeTagChanged(ntree, node); WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); @@ -495,7 +595,7 @@ static bNode *rna_NodeTree_node_composite_new(bNodeTree *ntree, bContext *C, Rep } ntreeCompositForceHidden(ntree, CTX_data_scene(C)); - ntreeSolveOrder(ntree); + ntreeUpdateTree(ntree); } return node; @@ -523,7 +623,7 @@ static void rna_NodeTree_node_remove(bNodeTree *ntree, ReportList *reports, bNod id_us_min(node->id); nodeFreeNode(ntree, node); - nodeGroupVerify(ntree); /* update group node socket links*/ + ntreeUpdateTree(ntree); /* update group node socket links*/ WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); } @@ -551,9 +651,7 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, b if(ret) { NodeTagChanged(ntree, tonode); - nodeGroupVerify(ntree); /* update group node socket links*/ - - ntreeSolveOrder(ntree); + ntreeUpdateTree(ntree); WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); } @@ -567,8 +665,7 @@ static void rna_NodeTree_link_remove(bNodeTree *ntree, ReportList *reports, bNod } else { nodeRemLink(ntree, link); - ntreeSolveOrder(ntree); - nodeGroupVerify(ntree); /* update group node socket links*/ + ntreeUpdateTree(ntree); WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); } @@ -577,9 +674,10 @@ static void rna_NodeTree_link_remove(bNodeTree *ntree, ReportList *reports, bNod static bNodeSocket *rna_NodeTree_input_new(bNodeTree *ntree, ReportList *UNUSED(reports), const char *name, int type) { /* XXX should check if tree is a group here! no good way to do this currently. */ - bNodeSocket *gsock= nodeGroupAddSocket(ntree, name, type, SOCK_IN); + bNodeSocket *gsock= node_group_add_socket(ntree, name, type, SOCK_IN); - nodeGroupVerify(ntree); /* update group node socket links*/ + ntree->update |= NTREE_UPDATE_GROUP_IN; + ntreeUpdateTree(ntree); WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); return gsock; } @@ -587,9 +685,10 @@ static bNodeSocket *rna_NodeTree_input_new(bNodeTree *ntree, ReportList *UNUSED( static bNodeSocket *rna_NodeTree_output_new(bNodeTree *ntree, ReportList *UNUSED(reports), const char *name, int type) { /* XXX should check if tree is a group here! no good way to do this currently. */ - bNodeSocket *gsock= nodeGroupAddSocket(ntree, name, type, SOCK_OUT); + bNodeSocket *gsock= node_group_add_socket(ntree, name, type, SOCK_OUT); - nodeGroupVerify(ntree); /* update group node socket links*/ + ntree->update |= NTREE_UPDATE_GROUP_OUT; + ntreeUpdateTree(ntree); WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); return gsock; } @@ -606,11 +705,12 @@ static bNodeSocket *rna_NodeTree_input_expose(bNodeTree *ntree, ReportList *repo BKE_reportf(reports, RPT_ERROR, "Socket is not an input"); else { /* XXX should check if tree is a group here! no good way to do this currently. */ - gsock = nodeGroupAddSocket(ntree, sock->name, sock->type, SOCK_IN); + gsock = node_group_add_socket(ntree, sock->name, sock->type, SOCK_IN); if (add_link) nodeAddLink(ntree, NULL, gsock, node, sock); - nodeGroupVerify(ntree); /* update group node socket links*/ + ntree->update |= NTREE_UPDATE_GROUP_IN; + ntreeUpdateTree(ntree); WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); return gsock; } @@ -629,11 +729,12 @@ static bNodeSocket *rna_NodeTree_output_expose(bNodeTree *ntree, ReportList *rep BKE_reportf(reports, RPT_ERROR, "Socket is not an output"); else { /* XXX should check if tree is a group here! no good way to do this currently. */ - gsock = nodeGroupAddSocket(ntree, sock->name, sock->type, SOCK_OUT); + gsock = node_group_add_socket(ntree, sock->name, sock->type, SOCK_OUT); if (add_link) nodeAddLink(ntree, node, sock, NULL, gsock); - nodeGroupVerify(ntree); /* update group node socket links*/ + ntree->update |= NTREE_UPDATE_GROUP_OUT; + ntreeUpdateTree(ntree); WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); return gsock; } @@ -668,14 +769,16 @@ static EnumPropertyItem node_ycc_items[] = { { 2, "JFIF", 0, "Jpeg", ""}, {0, NULL, 0, NULL, NULL}}; -#define MaxNodes 1000 +#define MaxNodes 50000 enum { Category_GroupNode, + Category_LoopNode, + Category_LayoutNode, Category_ShaderNode, Category_CompositorNode, - Category_TextureNode + Category_TextureNode, }; typedef struct NodeInfo @@ -715,9 +818,10 @@ static void init(void) #include "rna_nodetree_types.h" - #undef DefNode - reg_node(NODE_GROUP, Category_GroupNode, "GROUP", "NodeGroup", "Node", "Group", ""); + reg_node(NODE_FORLOOP, Category_LoopNode, "FORLOOP", "NodeForLoop", "Node", "ForLoop", ""); + reg_node(NODE_WHILELOOP, Category_LoopNode, "WHILELOOP", "NodeWhileLoop", "Node", "WhileLoop", ""); + reg_node(NODE_FRAME, Category_LayoutNode, "FRAME", "NodeFrame", "Node", "Frame", ""); } static StructRNA* def_node(BlenderRNA *brna, int node_id) @@ -793,6 +897,41 @@ static void def_group(StructRNA *srna) RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroup_update"); } +static void def_forloop(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "id"); + RNA_def_property_struct_type(prop, "NodeTree"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Node Tree", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroup_update"); +} + +static void def_whileloop(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "id"); + RNA_def_property_struct_type(prop, "NodeTree"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Node Tree", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroup_update"); + + prop = RNA_def_property(srna, "max_iterations", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "custom1"); + RNA_def_property_range(prop, 0.0f, 10000000.0f); + RNA_def_property_ui_text(prop, "Max. Iterations", "Limit for number of iterations"); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroup_update"); +} + +static void def_frame(StructRNA *srna) +{ +// PropertyRNA *prop; + +} static void def_math(StructRNA *srna) { @@ -2510,94 +2649,112 @@ static void rna_def_node_socket(BlenderRNA *brna) srna = RNA_def_struct(brna, "NodeSocket", NULL); RNA_def_struct_ui_text(srna, "Node Socket", "Input or output socket of a node"); - RNA_def_struct_refine_func(srna, "rna_NodeSocketType_refine"); RNA_def_struct_sdna(srna, "bNodeSocket"); + RNA_def_struct_refine_func(srna, "rna_NodeSocket_refine"); RNA_def_struct_ui_icon(srna, ICON_PLUG); RNA_def_struct_path_func(srna, "rna_NodeSocket_path"); + prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "type"); + RNA_def_property_enum_items(prop, node_socket_type_items); + RNA_def_property_enum_default(prop, 0); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Type", "Node Socket type"); + prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); /* XXX must be editable for group sockets. if necessary use a special rna definition for these */ // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Name", "Socket name"); RNA_def_struct_name_property(srna, prop); RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroupSocket_update"); - - /* can add back if there is any use in reading them */ -#if 0 - prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "ns.min"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Minimum Value", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); - - prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "ns.max"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Maximum Value", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); -#endif - - prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_enum_items(prop, node_socket_type_items); - RNA_def_property_ui_text(prop, "Type", "Node Socket type"); } -static void rna_def_node_socket_value(BlenderRNA *brna) +static void rna_def_node_socket_subtype(BlenderRNA *brna, int type, int subtype, const char *name, const char *ui_name) { StructRNA *srna; - PropertyRNA *prop; - - srna = RNA_def_struct(brna, "ValueNodeSocket", "NodeSocket"); - RNA_def_struct_ui_text(srna, "Value Node Socket", "Input or output socket of a node"); + PropertyRNA *prop=NULL; + PropertySubType propsubtype= PROP_NONE; + + #define SUBTYPE(socktype, stypename, id, idname) { PROP_##id, #id, 0, #idname, ""}, + static EnumPropertyItem subtype_items[] = { + NODE_DEFINE_SUBTYPES + {0, NULL, 0, NULL, NULL} + }; + #undef SUBTYPE + + #define SUBTYPE(socktype, stypename, id, idname) if (subtype==PROP_##id) propsubtype = PROP_##id; + NODE_DEFINE_SUBTYPES + #undef SUBTYPE + + srna = RNA_def_struct(brna, name, "NodeSocket"); + RNA_def_struct_ui_text(srna, ui_name, "Input or output socket of a node"); RNA_def_struct_sdna(srna, "bNodeSocket"); RNA_def_struct_ui_icon(srna, ICON_PLUG); RNA_def_struct_path_func(srna, "rna_NodeSocket_path"); - - prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "ns.vec"); - RNA_def_property_array(prop, 1); - RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); - RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range"); -} - -static void rna_def_node_socket_vector(BlenderRNA *brna) -{ - StructRNA *srna; - PropertyRNA *prop; - - srna = RNA_def_struct(brna, "VectorNodeSocket", "NodeSocket"); - RNA_def_struct_ui_text(srna, "Vector Node Socket", "Input or output socket of a node"); - RNA_def_struct_sdna(srna, "bNodeSocket"); - RNA_def_struct_ui_icon(srna, ICON_PLUG); - RNA_def_struct_path_func(srna, "rna_NodeSocket_path"); - - prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_XYZ); - RNA_def_property_float_sdna(prop, NULL, "ns.vec"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); - RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range"); -} - -static void rna_def_node_socket_rgba(BlenderRNA *brna) -{ - StructRNA *srna; - PropertyRNA *prop; - - srna = RNA_def_struct(brna, "RGBANodeSocket", "NodeSocket"); - RNA_def_struct_ui_text(srna, "RGBA Node Socket", "Input or output socket of a node"); - RNA_def_struct_sdna(srna, "bNodeSocket"); - RNA_def_struct_ui_icon(srna, ICON_PLUG); - RNA_def_struct_path_func(srna, "rna_NodeSocket_path"); - - prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_COLOR); - RNA_def_property_float_sdna(prop, NULL, "ns.vec"); - RNA_def_property_array(prop, 4); - RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); - RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range"); + + switch (type) { + case SOCK_INT: + RNA_def_struct_sdna_from(srna, "bNodeSocketValueInt", "default_value"); + + prop = RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "subtype"); + RNA_def_property_enum_items(prop, subtype_items); + RNA_def_property_ui_text(prop, "Subtype", "Subtype defining the socket value details"); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); + + prop = RNA_def_property(srna, "default_value", PROP_INT, propsubtype); + RNA_def_property_int_sdna(prop, NULL, "value"); + RNA_def_property_int_funcs(prop, NULL, NULL, "rna_NodeSocketInt_range"); + RNA_def_property_ui_text(prop, "Default Value", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); + break; + case SOCK_FLOAT: + RNA_def_struct_sdna_from(srna, "bNodeSocketValueFloat", "default_value"); + + prop = RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "subtype"); + RNA_def_property_enum_items(prop, subtype_items); + RNA_def_property_ui_text(prop, "Subtype", "Subtype defining the socket value details"); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); + + prop = RNA_def_property(srna, "default_value", PROP_FLOAT, propsubtype); + RNA_def_property_float_sdna(prop, NULL, "value"); + RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocketFloat_range"); + RNA_def_property_ui_text(prop, "Default Value", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); + break; + case SOCK_BOOLEAN: + RNA_def_struct_sdna_from(srna, "bNodeSocketValueBoolean", "default_value"); + + prop = RNA_def_property(srna, "default_value", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "value", 1); + RNA_def_property_ui_text(prop, "Default Value", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); + break; + case SOCK_VECTOR: + RNA_def_struct_sdna_from(srna, "bNodeSocketValueVector", "default_value"); + + prop = RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "subtype"); + RNA_def_property_enum_items(prop, subtype_items); + RNA_def_property_ui_text(prop, "Subtype", "Subtype defining the socket value details"); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); + + prop = RNA_def_property(srna, "default_value", PROP_FLOAT, propsubtype); + RNA_def_property_float_sdna(prop, NULL, "value"); + RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocketVector_range"); + RNA_def_property_ui_text(prop, "Default Value", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); + break; + case SOCK_RGBA: + RNA_def_struct_sdna_from(srna, "bNodeSocketValueRGBA", "default_value"); + + prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_COLOR); + RNA_def_property_float_sdna(prop, NULL, "value"); + RNA_def_property_ui_text(prop, "Default Value", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update"); + break; + } } static void rna_def_node(BlenderRNA *brna) @@ -2625,6 +2782,11 @@ static void rna_def_node(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Node_name_set"); RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + prop = RNA_def_property(srna, "label", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "label"); + RNA_def_property_ui_text(prop, "Label", "Optional custom node label"); + RNA_def_property_update(prop, NC_NODE, "rna_Node_update"); + prop = RNA_def_property(srna, "inputs", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "inputs", NULL); RNA_def_property_struct_type(prop, "NodeSocket"); @@ -2634,18 +2796,19 @@ static void rna_def_node(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "outputs", NULL); RNA_def_property_struct_type(prop, "NodeSocket"); RNA_def_property_ui_text(prop, "Outputs", ""); - - prop = RNA_def_property(srna, "label", PROP_STRING, PROP_NONE); - RNA_def_property_string_sdna(prop, NULL, "label"); - RNA_def_property_ui_text(prop, "Label", "Optional custom node label"); - RNA_def_property_update(prop, NC_NODE, "rna_Node_update"); + + prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "parent"); + RNA_def_property_struct_type(prop, "Node"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Parent", "Parent this node is attached to"); } static void rna_def_node_link(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + srna = RNA_def_struct(brna, "NodeLink", NULL); RNA_def_struct_ui_text(srna, "NodeLink", "Link between nodes in a node tree"); RNA_def_struct_sdna(srna, "bNodeLink"); @@ -2687,7 +2850,7 @@ static void rna_def_group_sockets_api(BlenderRNA *brna, PropertyRNA *cprop, int RNA_def_function_ui_description(func, "Add a socket to the group tree."); RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_string(func, "name", "Socket", 32, "Name", "Name of the socket"); - RNA_def_enum(func, "type", node_socket_type_items, SOCK_VALUE, "Type", "Type of socket"); + RNA_def_enum(func, "type", node_socket_type_items, SOCK_FLOAT, "Type", "Type of socket"); /* return value */ parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket."); RNA_def_function_return(func, parm); @@ -2708,12 +2871,6 @@ static void rna_def_nodetree(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem nodetree_type_items[] = { - {NTREE_SHADER, "SHADER", 0, "Shader", ""}, - {NTREE_COMPOSIT, "COMPOSITE", 0, "Composite", ""}, - {NTREE_TEXTURE, "TEXTURE", 0, "Texture", ""}, - {0, NULL, 0, NULL, NULL}}; - srna = RNA_def_struct(brna, "NodeTree", "ID"); RNA_def_struct_ui_text(srna, "Node Tree", "Node tree consisting of linked nodes used for materials, textures and compositing"); RNA_def_struct_sdna(srna, "bNodeTree"); @@ -2826,15 +2983,23 @@ void RNA_def_nodetree(BlenderRNA *brna) { init(); rna_def_nodetree(brna); + rna_def_node_socket(brna); - rna_def_node_socket_value(brna); - rna_def_node_socket_vector(brna); - rna_def_node_socket_rgba(brna); + + /* Generate RNA definitions for all socket subtypes */ + #define SUBTYPE(socktype, stypename, id, idname) \ + rna_def_node_socket_subtype(brna, SOCK_##socktype, PROP_##id, "NodeSocket"#stypename#idname, #idname" "#stypename" Node Socket"); + NODE_DEFINE_SUBTYPES + #undef SUBTYPE + rna_def_node_socket_subtype(brna, SOCK_BOOLEAN, 0, "NodeSocketBoolean", "Boolean Node Socket"); + rna_def_node_socket_subtype(brna, SOCK_RGBA, 0, "NodeSocketRGBA", "RGBA Node Socket"); + rna_def_node(brna); rna_def_node_link(brna); rna_def_shader_node(brna); rna_def_compositor_node(brna); rna_def_texture_node(brna); + rna_def_composite_nodetree(brna); rna_def_shader_nodetree(brna); rna_def_texture_nodetree(brna); @@ -2843,10 +3008,14 @@ void RNA_def_nodetree(BlenderRNA *brna) #include "rna_nodetree_types.h" - #undef DefNode - define_specific_node(brna, NODE_GROUP, def_group); + define_specific_node(brna, NODE_FORLOOP, def_forloop); + define_specific_node(brna, NODE_WHILELOOP, def_whileloop); + define_specific_node(brna, NODE_FRAME, def_frame); } +/* clean up macro definition */ +#undef NODE_DEFINE_SUBTYPES + #endif diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h index d48df85697a..a624d1d6403 100644 --- a/source/blender/makesrna/intern/rna_nodetree_types.h +++ b/source/blender/makesrna/intern/rna_nodetree_types.h @@ -26,7 +26,12 @@ * \ingroup RNA */ - + +/* Empty definitions for undefined macros to avoid warnings */ +#ifndef DefNode +#define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) +#endif + /* Tree type Node ID RNA def function Enum name Struct name UI Name UI Description */ DefNode( ShaderNode, SH_NODE_OUTPUT, 0, "OUTPUT", Output, "Output", "" ) DefNode( ShaderNode, SH_NODE_MATERIAL, def_sh_material, "MATERIAL", Material, "Material", "" ) @@ -138,3 +143,6 @@ DefNode( TextureNode, TEX_NODE_DECOMPOSE, 0, "DECOM DefNode( TextureNode, TEX_NODE_VALTONOR, 0, "VALTONOR", ValToNor, "Val to Nor", "" ) DefNode( TextureNode, TEX_NODE_SCALE, 0, "SCALE", Scale, "Scale", "" ) + +/* undefine macros */ +#undef DefNode diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 4e2be7682f8..83efd9d1a9f 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -132,6 +132,7 @@ EnumPropertyItem object_type_curve_items[] = { #include "DNA_key_types.h" #include "DNA_constraint_types.h" #include "DNA_lattice_types.h" +#include "DNA_node_types.h" #include "BKE_armature.h" #include "BKE_bullet.h" @@ -2035,18 +2036,19 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Matrix", "Inverse of object's parent matrix at time of parenting"); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); - /* collections */ + /* modifiers */ + prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE); + RNA_def_property_struct_type(prop, "Modifier"); + RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the object"); + rna_def_object_modifiers(brna, prop); + + /* constraints */ prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "Constraint"); RNA_def_property_ui_text(prop, "Constraints", "Constraints affecting the transformation of the object"); // RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, 0, "constraints__add", "constraints__remove"); rna_def_object_constraints(brna, prop); - prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE); - RNA_def_property_struct_type(prop, "Modifier"); - RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the object"); - rna_def_object_modifiers(brna, prop); - /* game engine */ prop= RNA_def_property(srna, "game", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index e063f8ec85a..7f85a2fa1d7 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -46,6 +46,42 @@ EnumPropertyItem property_type_items[] = { {PROP_COLLECTION, "COLLECTION", 0, "Collection", ""}, {0, NULL, 0, NULL, NULL}}; +EnumPropertyItem property_subtype_items[] = { + {PROP_NONE, "NONE", 0, "None", ""}, + + /* strings */ + {PROP_FILEPATH, "FILEPATH", 0, "File Path", ""}, + {PROP_DIRPATH, "DIRPATH", 0, "Directory Path", ""}, + {PROP_FILENAME, "FILENAME", 0, "File Name", ""}, + + /* numbers */ + {PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned", ""}, + {PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", ""}, + {PROP_FACTOR, "FACTOR", 0, "Factor", ""}, + {PROP_ANGLE, "ANGLE", 0, "Angle", ""}, + {PROP_TIME, "TIME", 0, "Time", ""}, + {PROP_DISTANCE, "DISTANCE", 0, "Distance", ""}, + + /* number arrays */ + {PROP_COLOR, "COLOR", 0, "Color", ""}, + {PROP_TRANSLATION, "TRANSLATION", 0, "Translation", ""}, + {PROP_DIRECTION, "DIRECTION", 0, "Direction", ""}, + {PROP_VELOCITY, "VELOCITY", 0, "Velocity", ""}, + {PROP_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""}, + {PROP_MATRIX, "MATRIX", 0, "Matrix", ""}, + {PROP_EULER, "EULER", 0, "Euler Angles", ""}, + {PROP_QUATERNION, "QUATERNION", 0, "Quaternion", ""}, + {PROP_AXISANGLE, "AXISANGLE", 0, "Axis-Angle", ""}, + {PROP_XYZ, "XYZ", 0, "XYZ", ""}, + {PROP_XYZ_LENGTH, "XYZ_LENGTH", 0, "XYZ Length", ""}, + {PROP_COLOR_GAMMA, "COLOR_GAMMA", 0, "Color", ""}, + {PROP_COORDS, "COORDS", 0, "Coordinates", ""}, + + /* booleans */ + {PROP_LAYER, "LAYER", 0, "Layer", ""}, + {PROP_LAYER_MEMBER, "LAYER_MEMBER", 0, "Layer Member", ""}, + {0, NULL, 0, NULL, NULL}}; + EnumPropertyItem property_unit_items[] = { {PROP_UNIT_NONE, "NONE", 0, "None", ""}, {PROP_UNIT_LENGTH, "LENGTH", 0, "Length", ""}, diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 35115b40d59..249cdb28ae1 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -48,6 +48,8 @@ #include "WM_api.h" #include "WM_types.h" +#include "RNA_enum_types.h" + EnumPropertyItem space_type_items[] = { {SPACE_EMPTY, "EMPTY", 0, "Empty", ""}, {SPACE_VIEW3D, "VIEW_3D", 0, "3D View", ""}, @@ -119,6 +121,7 @@ EnumPropertyItem viewport_shade_items[] = { #include "BKE_paint.h" #include "ED_image.h" +#include "ED_node.h" #include "ED_screen.h" #include "ED_view3d.h" #include "ED_sequencer.h" @@ -839,6 +842,24 @@ static void rna_BackgroundImage_opacity_set(PointerRNA *ptr, float value) bgpic->blend = 1.0f - value; } +/* Space Node Editor */ + +static int rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, PointerRNA value) +{ + SpaceNode *snode= (SpaceNode*)ptr->data; + bNodeTree *ntree= (bNodeTree*)value.data; + + /* exclude group trees, only trees of the active type */ + return (ntree->nodetype==0 && ntree->type == snode->treetype); +} + +static void rna_SpaceNodeEditor_node_tree_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + SpaceNode *snode= (SpaceNode*)ptr->data; + + ED_node_tree_update(snode, scene); +} + static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free) { Scene *scene = CTX_data_scene(C); @@ -2414,12 +2435,6 @@ static void rna_def_space_node(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem tree_type_items[] = { - {NTREE_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes"}, - {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes"}, - {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes"}, - {0, NULL, 0, NULL, NULL}}; - static EnumPropertyItem texture_type_items[] = { {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"}, {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"}, @@ -2438,7 +2453,7 @@ static void rna_def_space_node(BlenderRNA *brna) prop= RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "treetype"); - RNA_def_property_enum_items(prop, tree_type_items); + RNA_def_property_enum_items(prop, nodetree_type_items); RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL); @@ -2459,8 +2474,10 @@ static void rna_def_space_node(BlenderRNA *brna) prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_SpaceNodeEditor_node_tree_poll"); + RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited"); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_update"); prop= RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW); diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index d1f153265ac..1d942de348b 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -32,6 +32,7 @@ set(INC ../blenlib ../blenloader ../makesdna + ../makesrna ../render/extern/include ../../../intern/elbeem/extern ../../../intern/guardedalloc diff --git a/source/blender/modifiers/SConscript b/source/blender/modifiers/SConscript index d1bb95761ff..66dd00f0248 100644 --- a/source/blender/modifiers/SConscript +++ b/source/blender/modifiers/SConscript @@ -6,7 +6,7 @@ sources = env.Glob('intern/*.c') incs = '. ./intern' incs += ' #/intern/guardedalloc #/intern/decimation/extern #/intern/bsp/extern #/intern/elbeem/extern' incs += ' ../render/extern/include ../blenloader' -incs += ' ../include ../blenlib ../makesdna ../blenkernel ../blenkernel/intern' +incs += ' ../include ../blenlib ../makesdna ../makesrna ../blenkernel ../blenkernel/intern' incs += ' ' + env['BF_ZLIB_INC'] diff --git a/source/blender/nodes/CMP_node.h b/source/blender/nodes/CMP_node.h deleted file mode 100644 index 65c9236710f..00000000000 --- a/source/blender/nodes/CMP_node.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software(ListBase *lb); you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation(ListBase *lb); either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY(ListBase *lb); without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program(ListBase *lb); if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Bob Holcomb. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file CMP_node.h - * \ingroup nodes - */ - -#ifndef CMP_NODE_H -#define CMP_NODE_H - -#include "BKE_node.h" - - -/* ****************** types array for all composite nodes ****************** */ - -void register_node_type_cmp_rlayers(ListBase *lb); -void register_node_type_cmp_image(ListBase *lb); -void register_node_type_cmp_texture(ListBase *lb); -void register_node_type_cmp_value(ListBase *lb); -void register_node_type_cmp_rgb(ListBase *lb); -void register_node_type_cmp_curve_time(ListBase *lb); - -void register_node_type_cmp_composite(ListBase *lb); -void register_node_type_cmp_viewer(ListBase *lb); -void register_node_type_cmp_splitviewer(ListBase *lb); -void register_node_type_cmp_output_file(ListBase *lb); -void register_node_type_cmp_view_levels(ListBase *lb); - -void register_node_type_cmp_curve_rgb(ListBase *lb); -void register_node_type_cmp_mix_rgb(ListBase *lb); -void register_node_type_cmp_hue_sat(ListBase *lb); -void register_node_type_cmp_brightcontrast(ListBase *lb); -void register_node_type_cmp_gamma(ListBase *lb); -void register_node_type_cmp_invert(ListBase *lb); -void register_node_type_cmp_alphaover(ListBase *lb); -void register_node_type_cmp_zcombine(ListBase *lb); -void register_node_type_cmp_colorbalance(ListBase *lb); -void register_node_type_cmp_huecorrect(ListBase *lb); - -void register_node_type_cmp_normal(ListBase *lb); -void register_node_type_cmp_curve_vec(ListBase *lb); -void register_node_type_cmp_map_value(ListBase *lb); -void register_node_type_cmp_normalize(ListBase *lb); - -void register_node_type_cmp_filter(ListBase *lb); -void register_node_type_cmp_blur(ListBase *lb); -void register_node_type_cmp_dblur(ListBase *lb); -void register_node_type_cmp_bilateralblur(ListBase *lb); -void register_node_type_cmp_vecblur(ListBase *lb); -void register_node_type_cmp_dilateerode(ListBase *lb); -void register_node_type_cmp_defocus(ListBase *lb); - -void register_node_type_cmp_valtorgb(ListBase *lb); -void register_node_type_cmp_rgbtobw(ListBase *lb); -void register_node_type_cmp_setalpha(ListBase *lb); -void register_node_type_cmp_idmask(ListBase *lb); -void register_node_type_cmp_math(ListBase *lb); -void register_node_type_cmp_seprgba(ListBase *lb); -void register_node_type_cmp_combrgba(ListBase *lb); -void register_node_type_cmp_sephsva(ListBase *lb); -void register_node_type_cmp_combhsva(ListBase *lb); -void register_node_type_cmp_sepyuva(ListBase *lb); -void register_node_type_cmp_combyuva(ListBase *lb); -void register_node_type_cmp_sepycca(ListBase *lb); -void register_node_type_cmp_combycca(ListBase *lb); -void register_node_type_cmp_premulkey(ListBase *lb); - -void register_node_type_cmp_diff_matte(ListBase *lb); -void register_node_type_cmp_distance_matte(ListBase *lb); -void register_node_type_cmp_chroma_matte(ListBase *lb); -void register_node_type_cmp_color_matte(ListBase *lb); -void register_node_type_cmp_channel_matte(ListBase *lb); -void register_node_type_cmp_color_spill(ListBase *lb); -void register_node_type_cmp_luma_matte(ListBase *lb); - -void register_node_type_cmp_translate(ListBase *lb); -void register_node_type_cmp_rotate(ListBase *lb); -void register_node_type_cmp_scale(ListBase *lb); -void register_node_type_cmp_flip(ListBase *lb); -void register_node_type_cmp_crop(ListBase *lb); -void register_node_type_cmp_displace(ListBase *lb); -void register_node_type_cmp_mapuv(ListBase *lb); - -void register_node_type_cmp_glare(ListBase *lb); -void register_node_type_cmp_tonemap(ListBase *lb); -void register_node_type_cmp_lensdist(ListBase *lb); - -#endif diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index c3bd37c18ee..82848c6a5d7 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -38,117 +38,137 @@ set(INC set(INC_SYS ${GLEW_INCLUDE_PATH} + intern + composite + shader + texture ) set(SRC - intern/CMP_nodes/CMP_alphaOver.c - intern/CMP_nodes/CMP_bilateralblur.c - intern/CMP_nodes/CMP_blur.c - intern/CMP_nodes/CMP_brightness.c - intern/CMP_nodes/CMP_channelMatte.c - intern/CMP_nodes/CMP_chromaMatte.c - intern/CMP_nodes/CMP_colorMatte.c - intern/CMP_nodes/CMP_colorSpill.c - intern/CMP_nodes/CMP_colorbalance.c - intern/CMP_nodes/CMP_composite.c - intern/CMP_nodes/CMP_crop.c - intern/CMP_nodes/CMP_curves.c - intern/CMP_nodes/CMP_defocus.c - intern/CMP_nodes/CMP_diffMatte.c - intern/CMP_nodes/CMP_dilate.c - intern/CMP_nodes/CMP_directionalblur.c - intern/CMP_nodes/CMP_displace.c - intern/CMP_nodes/CMP_distanceMatte.c - intern/CMP_nodes/CMP_filter.c - intern/CMP_nodes/CMP_flip.c - intern/CMP_nodes/CMP_gamma.c - intern/CMP_nodes/CMP_glare.c - intern/CMP_nodes/CMP_hueSatVal.c - intern/CMP_nodes/CMP_huecorrect.c - intern/CMP_nodes/CMP_idMask.c - intern/CMP_nodes/CMP_image.c - intern/CMP_nodes/CMP_invert.c - intern/CMP_nodes/CMP_lensdist.c - intern/CMP_nodes/CMP_levels.c - intern/CMP_nodes/CMP_lummaMatte.c - intern/CMP_nodes/CMP_mapUV.c - intern/CMP_nodes/CMP_mapValue.c - intern/CMP_nodes/CMP_math.c - intern/CMP_nodes/CMP_mixrgb.c - intern/CMP_nodes/CMP_normal.c - intern/CMP_nodes/CMP_normalize.c - intern/CMP_nodes/CMP_outputFile.c - intern/CMP_nodes/CMP_premulkey.c - intern/CMP_nodes/CMP_rgb.c - intern/CMP_nodes/CMP_rotate.c - intern/CMP_nodes/CMP_scale.c - intern/CMP_nodes/CMP_sepcombHSVA.c - intern/CMP_nodes/CMP_sepcombRGBA.c - intern/CMP_nodes/CMP_sepcombYCCA.c - intern/CMP_nodes/CMP_sepcombYUVA.c - intern/CMP_nodes/CMP_setalpha.c - intern/CMP_nodes/CMP_splitViewer.c - intern/CMP_nodes/CMP_texture.c - intern/CMP_nodes/CMP_tonemap.c - intern/CMP_nodes/CMP_translate.c - intern/CMP_nodes/CMP_valToRgb.c - intern/CMP_nodes/CMP_value.c - intern/CMP_nodes/CMP_vecBlur.c - intern/CMP_nodes/CMP_viewer.c - intern/CMP_nodes/CMP_zcombine.c - intern/CMP_util.c - intern/SHD_nodes/SHD_camera.c - intern/SHD_nodes/SHD_curves.c - intern/SHD_nodes/SHD_dynamic.c - intern/SHD_nodes/SHD_geom.c - intern/SHD_nodes/SHD_hueSatVal.c - intern/SHD_nodes/SHD_invert.c - intern/SHD_nodes/SHD_mapping.c - intern/SHD_nodes/SHD_material.c - intern/SHD_nodes/SHD_math.c - intern/SHD_nodes/SHD_mixRgb.c - intern/SHD_nodes/SHD_normal.c - intern/SHD_nodes/SHD_output.c - intern/SHD_nodes/SHD_rgb.c - intern/SHD_nodes/SHD_sepcombRGB.c - intern/SHD_nodes/SHD_squeeze.c - intern/SHD_nodes/SHD_texture.c - intern/SHD_nodes/SHD_valToRgb.c - intern/SHD_nodes/SHD_value.c - intern/SHD_nodes/SHD_vectMath.c - intern/SHD_util.c - intern/TEX_nodes/TEX_at.c - intern/TEX_nodes/TEX_bricks.c - intern/TEX_nodes/TEX_checker.c - intern/TEX_nodes/TEX_compose.c - intern/TEX_nodes/TEX_coord.c - intern/TEX_nodes/TEX_curves.c - intern/TEX_nodes/TEX_decompose.c - intern/TEX_nodes/TEX_distance.c - intern/TEX_nodes/TEX_hueSatVal.c - intern/TEX_nodes/TEX_image.c - intern/TEX_nodes/TEX_invert.c - intern/TEX_nodes/TEX_math.c - intern/TEX_nodes/TEX_mixRgb.c - intern/TEX_nodes/TEX_output.c - intern/TEX_nodes/TEX_proc.c - intern/TEX_nodes/TEX_rotate.c - intern/TEX_nodes/TEX_scale.c - intern/TEX_nodes/TEX_texture.c - intern/TEX_nodes/TEX_translate.c - intern/TEX_nodes/TEX_valToNor.c - intern/TEX_nodes/TEX_valToRgb.c - intern/TEX_nodes/TEX_viewer.c - intern/TEX_util.c + composite/nodes/node_composite_alphaOver.c + composite/nodes/node_composite_bilateralblur.c + composite/nodes/node_composite_blur.c + composite/nodes/node_composite_brightness.c + composite/nodes/node_composite_channelMatte.c + composite/nodes/node_composite_chromaMatte.c + composite/nodes/node_composite_colorMatte.c + composite/nodes/node_composite_colorSpill.c + composite/nodes/node_composite_colorbalance.c + composite/nodes/node_composite_common.c + composite/nodes/node_composite_composite.c + composite/nodes/node_composite_crop.c + composite/nodes/node_composite_curves.c + composite/nodes/node_composite_defocus.c + composite/nodes/node_composite_diffMatte.c + composite/nodes/node_composite_dilate.c + composite/nodes/node_composite_directionalblur.c + composite/nodes/node_composite_displace.c + composite/nodes/node_composite_distanceMatte.c + composite/nodes/node_composite_filter.c + composite/nodes/node_composite_flip.c + composite/nodes/node_composite_gamma.c + composite/nodes/node_composite_glare.c + composite/nodes/node_composite_hueSatVal.c + composite/nodes/node_composite_huecorrect.c + composite/nodes/node_composite_idMask.c + composite/nodes/node_composite_image.c + composite/nodes/node_composite_invert.c + composite/nodes/node_composite_lensdist.c + composite/nodes/node_composite_levels.c + composite/nodes/node_composite_lummaMatte.c + composite/nodes/node_composite_mapUV.c + composite/nodes/node_composite_mapValue.c + composite/nodes/node_composite_math.c + composite/nodes/node_composite_mixrgb.c + composite/nodes/node_composite_normal.c + composite/nodes/node_composite_normalize.c + composite/nodes/node_composite_outputFile.c + composite/nodes/node_composite_premulkey.c + composite/nodes/node_composite_rgb.c + composite/nodes/node_composite_rotate.c + composite/nodes/node_composite_scale.c + composite/nodes/node_composite_sepcombHSVA.c + composite/nodes/node_composite_sepcombRGBA.c + composite/nodes/node_composite_sepcombYCCA.c + composite/nodes/node_composite_sepcombYUVA.c + composite/nodes/node_composite_setalpha.c + composite/nodes/node_composite_splitViewer.c + composite/nodes/node_composite_texture.c + composite/nodes/node_composite_tonemap.c + composite/nodes/node_composite_translate.c + composite/nodes/node_composite_valToRgb.c + composite/nodes/node_composite_value.c + composite/nodes/node_composite_vecBlur.c + composite/nodes/node_composite_viewer.c + composite/nodes/node_composite_zcombine.c + composite/node_composite_tree.c + composite/node_composite_util.c + + shader/nodes/node_shader_camera.c + shader/nodes/node_shader_common.c + shader/nodes/node_shader_curves.c + shader/nodes/node_shader_dynamic.c + shader/nodes/node_shader_geom.c + shader/nodes/node_shader_hueSatVal.c + shader/nodes/node_shader_invert.c + shader/nodes/node_shader_mapping.c + shader/nodes/node_shader_material.c + shader/nodes/node_shader_math.c + shader/nodes/node_shader_mixRgb.c + shader/nodes/node_shader_normal.c + shader/nodes/node_shader_output.c + shader/nodes/node_shader_rgb.c + shader/nodes/node_shader_sepcombRGB.c + shader/nodes/node_shader_squeeze.c + shader/nodes/node_shader_texture.c + shader/nodes/node_shader_valToRgb.c + shader/nodes/node_shader_value.c + shader/nodes/node_shader_vectMath.c + shader/node_shader_tree.c + shader/node_shader_util.c + + texture/nodes/node_texture_at.c + texture/nodes/node_texture_bricks.c + texture/nodes/node_texture_checker.c + texture/nodes/node_texture_common.c + texture/nodes/node_texture_compose.c + texture/nodes/node_texture_coord.c + texture/nodes/node_texture_curves.c + texture/nodes/node_texture_decompose.c + texture/nodes/node_texture_distance.c + texture/nodes/node_texture_hueSatVal.c + texture/nodes/node_texture_image.c + texture/nodes/node_texture_invert.c + texture/nodes/node_texture_math.c + texture/nodes/node_texture_mixRgb.c + texture/nodes/node_texture_output.c + texture/nodes/node_texture_proc.c + texture/nodes/node_texture_rotate.c + texture/nodes/node_texture_scale.c + texture/nodes/node_texture_texture.c + texture/nodes/node_texture_translate.c + texture/nodes/node_texture_valToNor.c + texture/nodes/node_texture_valToRgb.c + texture/nodes/node_texture_viewer.c + texture/node_texture_tree.c + texture/node_texture_util.c + intern/node_util.c + intern/node_exec.c + intern/node_common.c + intern/node_socket.c + + composite/node_composite_util.h + shader/node_shader_util.h + texture/node_texture_util.h - CMP_node.h - SHD_node.h - TEX_node.h - intern/CMP_util.h - intern/SHD_util.h - intern/TEX_util.h + NOD_composite.h + NOD_shader.h + NOD_texture.h + NOD_socket.h intern/node_util.h + intern/node_exec.h + intern/node_common.h ) if(WITH_PYTHON) diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h new file mode 100644 index 00000000000..ab56199079e --- /dev/null +++ b/source/blender/nodes/NOD_composite.h @@ -0,0 +1,123 @@ +/* + * $Id: CMP_node.h 36550 2011-05-08 16:08:08Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software(ListBase *lb); you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation(ListBase *lb); either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY(ListBase *lb); without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program(ListBase *lb); if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Bob Holcomb. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file NOD_composite.h + * \ingroup nodes + */ + +#ifndef NOD_composite_H +#define NOD_composite_H + +#include "BKE_node.h" + +extern bNodeTreeType ntreeType_Composite; + + +/* ****************** types array for all composite nodes ****************** */ + +void register_node_type_cmp_group(ListBase *lb); +void register_node_type_cmp_forloop(ListBase *lb); +void register_node_type_cmp_whileloop(ListBase *lb); + +void register_node_type_cmp_rlayers(ListBase *lb); +void register_node_type_cmp_image(ListBase *lb); +void register_node_type_cmp_texture(ListBase *lb); +void register_node_type_cmp_value(ListBase *lb); +void register_node_type_cmp_rgb(ListBase *lb); +void register_node_type_cmp_curve_time(ListBase *lb); + +void register_node_type_cmp_composite(ListBase *lb); +void register_node_type_cmp_viewer(ListBase *lb); +void register_node_type_cmp_splitviewer(ListBase *lb); +void register_node_type_cmp_output_file(ListBase *lb); +void register_node_type_cmp_view_levels(ListBase *lb); + +void register_node_type_cmp_curve_rgb(ListBase *lb); +void register_node_type_cmp_mix_rgb(ListBase *lb); +void register_node_type_cmp_hue_sat(ListBase *lb); +void register_node_type_cmp_brightcontrast(ListBase *lb); +void register_node_type_cmp_gamma(ListBase *lb); +void register_node_type_cmp_invert(ListBase *lb); +void register_node_type_cmp_alphaover(ListBase *lb); +void register_node_type_cmp_zcombine(ListBase *lb); +void register_node_type_cmp_colorbalance(ListBase *lb); +void register_node_type_cmp_huecorrect(ListBase *lb); + +void register_node_type_cmp_normal(ListBase *lb); +void register_node_type_cmp_curve_vec(ListBase *lb); +void register_node_type_cmp_map_value(ListBase *lb); +void register_node_type_cmp_normalize(ListBase *lb); + +void register_node_type_cmp_filter(ListBase *lb); +void register_node_type_cmp_blur(ListBase *lb); +void register_node_type_cmp_dblur(ListBase *lb); +void register_node_type_cmp_bilateralblur(ListBase *lb); +void register_node_type_cmp_vecblur(ListBase *lb); +void register_node_type_cmp_dilateerode(ListBase *lb); +void register_node_type_cmp_defocus(ListBase *lb); + +void register_node_type_cmp_valtorgb(ListBase *lb); +void register_node_type_cmp_rgbtobw(ListBase *lb); +void register_node_type_cmp_setalpha(ListBase *lb); +void register_node_type_cmp_idmask(ListBase *lb); +void register_node_type_cmp_math(ListBase *lb); +void register_node_type_cmp_seprgba(ListBase *lb); +void register_node_type_cmp_combrgba(ListBase *lb); +void register_node_type_cmp_sephsva(ListBase *lb); +void register_node_type_cmp_combhsva(ListBase *lb); +void register_node_type_cmp_sepyuva(ListBase *lb); +void register_node_type_cmp_combyuva(ListBase *lb); +void register_node_type_cmp_sepycca(ListBase *lb); +void register_node_type_cmp_combycca(ListBase *lb); +void register_node_type_cmp_premulkey(ListBase *lb); + +void register_node_type_cmp_diff_matte(ListBase *lb); +void register_node_type_cmp_distance_matte(ListBase *lb); +void register_node_type_cmp_chroma_matte(ListBase *lb); +void register_node_type_cmp_color_matte(ListBase *lb); +void register_node_type_cmp_channel_matte(ListBase *lb); +void register_node_type_cmp_color_spill(ListBase *lb); +void register_node_type_cmp_luma_matte(ListBase *lb); + +void register_node_type_cmp_translate(ListBase *lb); +void register_node_type_cmp_rotate(ListBase *lb); +void register_node_type_cmp_scale(ListBase *lb); +void register_node_type_cmp_flip(ListBase *lb); +void register_node_type_cmp_crop(ListBase *lb); +void register_node_type_cmp_displace(ListBase *lb); +void register_node_type_cmp_mapuv(ListBase *lb); + +void register_node_type_cmp_glare(ListBase *lb); +void register_node_type_cmp_tonemap(ListBase *lb); +void register_node_type_cmp_lensdist(ListBase *lb); + +#endif diff --git a/source/blender/nodes/NOD_shader.h b/source/blender/nodes/NOD_shader.h new file mode 100644 index 00000000000..5bc0c381f0b --- /dev/null +++ b/source/blender/nodes/NOD_shader.h @@ -0,0 +1,78 @@ +/* + * $Id: SHD_node.h 36550 2011-05-08 16:08:08Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file NOD_shader.h + * \ingroup nodes + */ + +#ifndef NOD_SHADER_H +#define NOD_SHADER_H + +#include "BKE_node.h" + +extern struct bNodeTreeType ntreeType_Shader; + + +/* the type definitions array */ +/* ****************** types array for all shaders ****************** */ + +void register_node_type_sh_group(ListBase *lb); +void register_node_type_sh_forloop(ListBase *lb); +void register_node_type_sh_whileloop(ListBase *lb); + +void register_node_type_sh_output(ListBase *lb); +void register_node_type_sh_material(ListBase *lb); +void register_node_type_sh_camera(ListBase *lb); +void register_node_type_sh_value(ListBase *lb); +void register_node_type_sh_rgb(ListBase *lb); +void register_node_type_sh_mix_rgb(ListBase *lb); +void register_node_type_sh_valtorgb(ListBase *lb); +void register_node_type_sh_rgbtobw(ListBase *lb); +void register_node_type_sh_texture(ListBase *lb); +void register_node_type_sh_normal(ListBase *lb); +void register_node_type_sh_geom(ListBase *lb); +void register_node_type_sh_mapping(ListBase *lb); +void register_node_type_sh_curve_vec(ListBase *lb); +void register_node_type_sh_curve_rgb(ListBase *lb); +void register_node_type_sh_math(ListBase *lb); +void register_node_type_sh_vect_math(ListBase *lb); +void register_node_type_sh_squeeze(ListBase *lb); +void register_node_type_sh_dynamic(ListBase *lb); +void register_node_type_sh_material_ext(ListBase *lb); +void register_node_type_sh_invert(ListBase *lb); +void register_node_type_sh_seprgb(ListBase *lb); +void register_node_type_sh_combrgb(ListBase *lb); +void register_node_type_sh_hue_sat(ListBase *lb); + +#endif + + diff --git a/source/blender/nodes/NOD_socket.h b/source/blender/nodes/NOD_socket.h new file mode 100644 index 00000000000..92e8a8e058d --- /dev/null +++ b/source/blender/nodes/NOD_socket.h @@ -0,0 +1,89 @@ +/** + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Lukas Toenne + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file NOD_socket.h + * \ingroup nodes + */ + + +#ifndef NOD_SOCKET_H_ +#define NOD_SOCKET_H_ + +#include "DNA_listBase.h" + +#include "BLI_utildefines.h" + +#include "BKE_node.h" + +#include "RNA_types.h" + +struct bNodeTree; +struct bNode; +struct bNodeStack; + +void node_socket_type_init(struct bNodeSocketType *types[]); + +struct bNodeSocket *nodeAddInputInt(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, int value, int min, int max); +struct bNodeSocket *nodeAddOutputInt(struct bNodeTree *ntree, struct bNode *node, const char *name); + +struct bNodeSocket *nodeAddInputFloat(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, float value, float min, float max); +struct bNodeSocket *nodeAddOutputFloat(struct bNodeTree *ntree, struct bNode *node, const char *name); + +struct bNodeSocket *nodeAddInputBoolean(struct bNodeTree *ntree, struct bNode *node, const char *name, char value); +struct bNodeSocket *nodeAddOutputBoolean(struct bNodeTree *ntree, struct bNode *node, const char *name); + +struct bNodeSocket *nodeAddInputVector(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, float x, float y, float z, float min, float max); +struct bNodeSocket *nodeAddOutputVector(struct bNodeTree *ntree, struct bNode *node, const char *name); + +struct bNodeSocket *nodeAddInputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name, float r, float g, float b, float a); +struct bNodeSocket *nodeAddOutputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name); + +struct bNodeSocket *nodeAddInputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name); +struct bNodeSocket *nodeAddOutputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name); + +struct bNodeSocket *node_add_input_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp); +struct bNodeSocket *node_add_output_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp); + +void node_verify_socket_templates(struct bNodeTree *ntree, struct bNode *node); + + +/* Socket Converters */ + +#define SOCK_VECTOR_X 1 +#define SOCK_VECTOR_Y 2 +#define SOCK_VECTOR_Z 3 + +#define SOCK_RGBA_R 1 +#define SOCK_RGBA_G 2 +#define SOCK_RGBA_B 3 +#define SOCK_RGBA_A 4 + +#define SOCK_MESH_VERT_CO 1 +#define SOCK_MESH_VERT_NO 2 + +#endif diff --git a/source/blender/nodes/NOD_texture.h b/source/blender/nodes/NOD_texture.h new file mode 100644 index 00000000000..6f30685aff1 --- /dev/null +++ b/source/blender/nodes/NOD_texture.h @@ -0,0 +1,88 @@ +/* + * $Id: TEX_node.h 36550 2011-05-08 16:08:08Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file NOD_texture.h + * \ingroup nodes + */ + +#ifndef NOD_TEXTURE_H +#define NOD_TEXTURE_H + +#include "BKE_node.h" + +extern bNodeTreeType ntreeType_Texture; + + +/* ****************** types array for all texture nodes ****************** */ + +void register_node_type_tex_group(ListBase *lb); +void register_node_type_tex_forloop(ListBase *lb); +void register_node_type_tex_whileloop(ListBase *lb); + +void register_node_type_tex_math(ListBase *lb); +void register_node_type_tex_mix_rgb(ListBase *lb); +void register_node_type_tex_valtorgb(ListBase *lb); +void register_node_type_tex_valtonor(ListBase *lb); +void register_node_type_tex_rgbtobw(ListBase *lb); +void register_node_type_tex_output(ListBase *lb); +void register_node_type_tex_viewer(ListBase *lb); +void register_node_type_tex_checker(ListBase *lb); +void register_node_type_tex_texture(ListBase *lb); +void register_node_type_tex_bricks(ListBase *lb); +void register_node_type_tex_image(ListBase *lb); +void register_node_type_tex_curve_rgb(ListBase *lb); +void register_node_type_tex_curve_time(ListBase *lb); +void register_node_type_tex_invert(ListBase *lb); +void register_node_type_tex_hue_sat(ListBase *lb); +void register_node_type_tex_coord(ListBase *lb); +void register_node_type_tex_distance(ListBase *lb); + +void register_node_type_tex_rotate(ListBase *lb); +void register_node_type_tex_translate(ListBase *lb); +void register_node_type_tex_scale(ListBase *lb); +void register_node_type_tex_at(ListBase *lb); + +void register_node_type_tex_compose(ListBase *lb); +void register_node_type_tex_decompose(ListBase *lb); + +void register_node_type_tex_proc_voronoi(ListBase *lb); +void register_node_type_tex_proc_blend(ListBase *lb); +void register_node_type_tex_proc_magic(ListBase *lb); +void register_node_type_tex_proc_marble(ListBase *lb); +void register_node_type_tex_proc_clouds(ListBase *lb); +void register_node_type_tex_proc_wood(ListBase *lb); +void register_node_type_tex_proc_musgrave(ListBase *lb); +void register_node_type_tex_proc_noise(ListBase *lb); +void register_node_type_tex_proc_stucci(ListBase *lb); +void register_node_type_tex_proc_distnoise(ListBase *lb); + +#endif diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript index 8d17c6f5e16..0cbc7b80933 100644 --- a/source/blender/nodes/SConscript +++ b/source/blender/nodes/SConscript @@ -2,11 +2,11 @@ Import ('env') sources = env.Glob('intern/*.c') -cmpsources = env.Glob('intern/CMP_nodes/*.c') -shdsources = env.Glob('intern/SHD_nodes/*.c') -texsources = env.Glob('intern/TEX_nodes/*.c') - +cmpsources = env.Glob('composite/*.c') + env.Glob('composite/nodes/*.c') +shdsources = env.Glob('shader/*.c') + env.Glob('shader/nodes/*.c') +texsources = env.Glob('texture/*.c') + env.Glob('texture/nodes/*.c') incs = '. ./intern ' +incs += './composite ./shader ./texture ' incs += '#/intern/guardedalloc ../editors/include ../blenlib ../makesdna' incs += ' ../render/extern/include ../makesrna ' incs += ' ../imbuf ../avi ' diff --git a/source/blender/nodes/SHD_node.h b/source/blender/nodes/SHD_node.h deleted file mode 100644 index 80e5eec6893..00000000000 --- a/source/blender/nodes/SHD_node.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file SHD_node.h - * \ingroup nodes - */ - -#ifndef SHD_NODE_H -#define SHD_NODE_H - -#include "BKE_node.h" - - -/* the type definitions array */ -/* ****************** types array for all shaders ****************** */ - -void register_node_type_sh_output(ListBase *lb); -void register_node_type_sh_material(ListBase *lb); -void register_node_type_sh_camera(ListBase *lb); -void register_node_type_sh_value(ListBase *lb); -void register_node_type_sh_rgb(ListBase *lb); -void register_node_type_sh_mix_rgb(ListBase *lb); -void register_node_type_sh_valtorgb(ListBase *lb); -void register_node_type_sh_rgbtobw(ListBase *lb); -void register_node_type_sh_texture(ListBase *lb); -void register_node_type_sh_normal(ListBase *lb); -void register_node_type_sh_geom(ListBase *lb); -void register_node_type_sh_mapping(ListBase *lb); -void register_node_type_sh_curve_vec(ListBase *lb); -void register_node_type_sh_curve_rgb(ListBase *lb); -void register_node_type_sh_math(ListBase *lb); -void register_node_type_sh_vect_math(ListBase *lb); -void register_node_type_sh_squeeze(ListBase *lb); -void register_node_type_sh_dynamic(ListBase *lb); -void register_node_type_sh_material_ext(ListBase *lb); -void register_node_type_sh_invert(ListBase *lb); -void register_node_type_sh_seprgb(ListBase *lb); -void register_node_type_sh_combrgb(ListBase *lb); -void register_node_type_sh_hue_sat(ListBase *lb); - -#endif - - diff --git a/source/blender/nodes/TEX_node.h b/source/blender/nodes/TEX_node.h deleted file mode 100644 index 23a6b4427af..00000000000 --- a/source/blender/nodes/TEX_node.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file TEX_node.h - * \ingroup nodes - */ - -#ifndef TEX_NODE_H -#define TEX_NODE_H - -#include "BKE_node.h" - - -/* ****************** types array for all texture nodes ****************** */ - -void register_node_type_tex_math(ListBase *lb); -void register_node_type_tex_mix_rgb(ListBase *lb); -void register_node_type_tex_valtorgb(ListBase *lb); -void register_node_type_tex_valtonor(ListBase *lb); -void register_node_type_tex_rgbtobw(ListBase *lb); -void register_node_type_tex_output(ListBase *lb); -void register_node_type_tex_viewer(ListBase *lb); -void register_node_type_tex_checker(ListBase *lb); -void register_node_type_tex_texture(ListBase *lb); -void register_node_type_tex_bricks(ListBase *lb); -void register_node_type_tex_image(ListBase *lb); -void register_node_type_tex_curve_rgb(ListBase *lb); -void register_node_type_tex_curve_time(ListBase *lb); -void register_node_type_tex_invert(ListBase *lb); -void register_node_type_tex_hue_sat(ListBase *lb); -void register_node_type_tex_coord(ListBase *lb); -void register_node_type_tex_distance(ListBase *lb); - -void register_node_type_tex_rotate(ListBase *lb); -void register_node_type_tex_translate(ListBase *lb); -void register_node_type_tex_scale(ListBase *lb); -void register_node_type_tex_at(ListBase *lb); - -void register_node_type_tex_compose(ListBase *lb); -void register_node_type_tex_decompose(ListBase *lb); - -void register_node_type_tex_proc_voronoi(ListBase *lb); -void register_node_type_tex_proc_blend(ListBase *lb); -void register_node_type_tex_proc_magic(ListBase *lb); -void register_node_type_tex_proc_marble(ListBase *lb); -void register_node_type_tex_proc_clouds(ListBase *lb); -void register_node_type_tex_proc_wood(ListBase *lb); -void register_node_type_tex_proc_musgrave(ListBase *lb); -void register_node_type_tex_proc_noise(ListBase *lb); -void register_node_type_tex_proc_stucci(ListBase *lb); -void register_node_type_tex_proc_distnoise(ListBase *lb); - -#endif diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c new file mode 100644 index 00000000000..1a2fb04be8c --- /dev/null +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -0,0 +1,811 @@ +/** + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/node_composite_tree.c + * \ingroup nodes + */ + + +#include + +#include "DNA_anim_types.h" +#include "DNA_scene_types.h" +#include "DNA_node_types.h" + +#include "BLI_listbase.h" +#include "BLI_threads.h" + +#include "BKE_animsys.h" +#include "BKE_colortools.h" +#include "BKE_fcurve.h" +#include "BKE_global.h" +#include "BKE_main.h" +#include "BKE_node.h" +#include "BKE_utildefines.h" + +#include "node_exec.h" +#include "node_util.h" + +#include "PIL_time.h" + +#include "RNA_access.h" + +#include "NOD_composite.h" +#include "node_composite_util.h" + +static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func) +{ + Scene *sce; + for(sce= main->scene.first; sce; sce= sce->id.next) { + if(sce->nodetree) { + func(calldata, &sce->id, sce->nodetree); + } + } +} + +static void free_node_cache(bNodeTree *UNUSED(ntree), bNode *node) +{ + bNodeSocket *sock; + + for(sock= node->outputs.first; sock; sock= sock->next) { + if(sock->cache) { + free_compbuf(sock->cache); + sock->cache= NULL; + } + } +} + +static void free_cache(bNodeTree *ntree) +{ + bNode *node; + for(node= ntree->nodes.first; node; node= node->next) + free_node_cache(ntree, node); +} + +static void update_node(bNodeTree *ntree, bNode *node) +{ + bNodeSocket *sock; + + for(sock= node->outputs.first; sock; sock= sock->next) { + if(sock->cache) { + //free_compbuf(sock->cache); + //sock->cache= NULL; + } + } + node->need_exec= 1; + + /* individual node update call */ + if (node->typeinfo->updatefunc) + node->typeinfo->updatefunc(ntree, node); +} + +/* local tree then owns all compbufs */ +static void localize(bNodeTree *UNUSED(localtree), bNodeTree *ntree) +{ + bNode *node; + bNodeSocket *sock; + + for(node= ntree->nodes.first; node; node= node->next) { + /* ensure new user input gets handled ok */ + node->need_exec= 0; + + /* move over the compbufs */ + /* right after ntreeCopyTree() oldsock pointers are valid */ + + if(ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) { + if(node->id) { + if(node->flag & NODE_DO_OUTPUT) + node->new_node->id= (ID *)copy_image((Image *)node->id); + else + node->new_node->id= NULL; + } + } + + for(sock= node->outputs.first; sock; sock= sock->next) { + sock->new_sock->cache= sock->cache; + compbuf_set_node(sock->new_sock->cache, node->new_node); + + sock->cache= NULL; + sock->new_sock->new_sock= sock; + } + } +} + +static void local_sync(bNodeTree *localtree, bNodeTree *ntree) +{ + bNode *lnode; + + /* move over the compbufs and previews */ + for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) { + if( (lnode->exec & NODE_READY) && !(lnode->exec & NODE_SKIPPED) ) { + if(ntreeNodeExists(ntree, lnode->new_node)) { + + if(lnode->preview && lnode->preview->rect) { + nodeFreePreview(lnode->new_node); + lnode->new_node->preview= lnode->preview; + lnode->preview= NULL; + } + } + } + } +} + +static void local_merge(bNodeTree *localtree, bNodeTree *ntree) +{ + bNode *lnode; + bNodeSocket *lsock; + + /* move over the compbufs and previews */ + for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) { + if(ntreeNodeExists(ntree, lnode->new_node)) { + if(ELEM(lnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) { + if(lnode->id && (lnode->flag & NODE_DO_OUTPUT)) { + /* image_merge does sanity check for pointers */ + BKE_image_merge((Image *)lnode->new_node->id, (Image *)lnode->id); + } + } + + for(lsock= lnode->outputs.first; lsock; lsock= lsock->next) { + if(ntreeOutputExists(lnode->new_node, lsock->new_sock)) { + lsock->new_sock->cache= lsock->cache; + compbuf_set_node(lsock->new_sock->cache, lnode->new_node); + lsock->cache= NULL; + lsock->new_sock= NULL; + } + } + } + } +} + +bNodeTreeType ntreeType_Composite = { + /* type */ NTREE_COMPOSIT, + /* idname */ "NTCompositing Nodetree", + + /* node_types */ { NULL, NULL }, + + /* free_cache */ free_cache, + /* free_node_cache */ free_node_cache, + /* foreach_nodetree */ foreach_nodetree, + /* localize */ localize, + /* local_sync */ local_sync, + /* local_merge */ local_merge, + /* update */ NULL, + /* update_node */ update_node +}; + + +struct bNodeTreeExec *ntreeCompositBeginExecTree(bNodeTree *ntree) +{ + bNodeTreeExec *exec; + bNode *node; + bNodeSocket *sock; + + /* XXX hack: prevent exec data from being generated twice. + * this should be handled by the renderer! + */ + if (ntree->execdata) + return ntree->execdata; + + /* ensures only a single output node is enabled */ + ntreeSetOutput(ntree); + + exec = ntree_exec_begin(ntree); + + for(node= exec->nodetree->nodes.first; node; node= node->next) { + /* initialize needed for groups */ + node->exec= 0; + + for(sock= node->outputs.first; sock; sock= sock->next) { + bNodeStack *ns= node_get_socket_stack(exec->stack, sock); + if(ns && sock->cache) { + ns->data= sock->cache; + sock->cache= NULL; + } + } + /* cannot initialize them while using in threads */ + if(ELEM4(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) { + curvemapping_initialize(node->storage); + if(node->type==CMP_NODE_CURVE_RGB) + curvemapping_premultiply(node->storage, 0); + } + } + + /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, + * which only store the ntree pointer. Should be fixed at some point! + */ + ntree->execdata = exec; + + return exec; +} + +void ntreeCompositEndExecTree(bNodeTreeExec *exec) +{ + if(exec) { + bNodeTree *ntree= exec->nodetree; + bNode *node; + bNodeStack *ns; + + for(node= exec->nodetree->nodes.first; node; node= node->next) { + bNodeSocket *sock; + + for(sock= node->outputs.first; sock; sock= sock->next) { + ns = node_get_socket_stack(exec->stack, sock); + if(ns && ns->data) { + sock->cache= ns->data; + ns->data= NULL; + } + } + if(node->type==CMP_NODE_CURVE_RGB) + curvemapping_premultiply(node->storage, 1); + + node->need_exec= 0; + } + + ntree_exec_end(exec); + + /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ + ntree->execdata = NULL; + } +} + +/* ***************************** threaded version for execute composite nodes ************* */ +/* these are nodes without input, only giving values */ +/* or nodes with only value inputs */ +static int node_only_value(bNode *node) +{ + bNodeSocket *sock; + + if(ELEM3(node->type, CMP_NODE_TIME, CMP_NODE_VALUE, CMP_NODE_RGB)) + return 1; + + /* doing this for all node types goes wrong. memory free errors */ + if(node->inputs.first && node->type==CMP_NODE_MAP_VALUE) { + int retval= 1; + for(sock= node->inputs.first; sock; sock= sock->next) { + if(sock->link) + retval &= node_only_value(sock->link->fromnode); + } + return retval; + } + return 0; +} + +/* not changing info, for thread callback */ +typedef struct ThreadData { + bNodeStack *stack; + RenderData *rd; +} ThreadData; + +static void *exec_composite_node(void *nodeexec_v) +{ + bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ + bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ + bNodeExec *nodeexec= nodeexec_v; + bNode *node= nodeexec->node; + ThreadData *thd= (ThreadData *)node->threaddata; + + node_get_stack(node, thd->stack, nsin, nsout); + + if((node->flag & NODE_MUTED) && (!node_only_value(node))) { + /* viewers we execute, for feedback to user */ + if(ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) + node->typeinfo->execfunc(thd->rd, node, nsin, nsout); + else + node_compo_pass_on(node, nsin, nsout); + } + else if(node->typeinfo->execfunc) + node->typeinfo->execfunc(thd->rd, node, nsin, nsout); + else if (node->typeinfo->newexecfunc) + node->typeinfo->newexecfunc(thd->rd, 0, node, nodeexec->data, nsin, nsout); + + node->exec |= NODE_READY; + return 0; +} + +/* return total of executable nodes, for timecursor */ +static int setExecutableNodes(bNodeTree *ntree, ThreadData *thd) +{ + bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ + bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ + bNode *node; + bNodeSocket *sock; + int totnode= 0, group_edit= 0; + + /* note; do not add a dependency sort here, the stack was created already */ + + /* if we are in group edit, viewer nodes get skipped when group has viewer */ + for(node= ntree->nodes.first; node; node= node->next) + if(node->type==NODE_GROUP && (node->flag & NODE_GROUP_EDIT)) + if(ntreeHasType((bNodeTree *)node->id, CMP_NODE_VIEWER)) + group_edit= 1; + + for(node= ntree->nodes.first; node; node= node->next) { + int a; + + node_get_stack(node, thd->stack, nsin, nsout); + + /* test the outputs */ + /* skip value-only nodes (should be in type!) */ + if(!node_only_value(node)) { + for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) { + if(nsout[a]->data==NULL && nsout[a]->hasoutput) { + node->need_exec= 1; + break; + } + } + } + + /* test the inputs */ + for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) { + /* skip viewer nodes in bg render or group edit */ + if( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) && (G.background || group_edit)) + node->need_exec= 0; + /* is sock in use? */ + else if(sock->link) { + bNodeLink *link= sock->link; + + /* this is the test for a cyclic case */ + if(link->fromnode==NULL || link->tonode==NULL); + else if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) { + if(link->fromnode->need_exec) { + node->need_exec= 1; + break; + } + } + else { + node->need_exec= 0; + printf("Node %s skipped, cyclic dependency\n", node->name); + } + } + } + + if(node->need_exec) { + + /* free output buffers */ + for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) { + if(nsout[a]->data) { + free_compbuf(nsout[a]->data); + nsout[a]->data= NULL; + } + } + totnode++; + /* printf("node needs exec %s\n", node->name); */ + + /* tag for getExecutableNode() */ + node->exec= 0; + } + else { + /* tag for getExecutableNode() */ + node->exec= NODE_READY|NODE_FINISHED|NODE_SKIPPED; + + } + } + + /* last step: set the stack values for only-value nodes */ + /* just does all now, compared to a full buffer exec this is nothing */ + if(totnode) { + for(node= ntree->nodes.first; node; node= node->next) { + if(node->need_exec==0 && node_only_value(node)) { + if(node->typeinfo->execfunc) { + node_get_stack(node, thd->stack, nsin, nsout); + node->typeinfo->execfunc(thd->rd, node, nsin, nsout); + } + } + } + } + + return totnode; +} + +/* while executing tree, free buffers from nodes that are not needed anymore */ +static void freeExecutableNode(bNodeTree *ntree, bNodeTreeExec *exec) +{ + /* node outputs can be freed when: + - not a render result or image node + - when node outputs go to nodes all being set NODE_FINISHED + */ + bNode *node; + bNodeSocket *sock; + + /* set exec flag for finished nodes that might need freed */ + for(node= ntree->nodes.first; node; node= node->next) { + if(node->type!=CMP_NODE_R_LAYERS) + if(node->exec & NODE_FINISHED) + node->exec |= NODE_FREEBUFS; + } + /* clear this flag for input links that are not done yet */ + for(node= ntree->nodes.first; node; node= node->next) { + if((node->exec & NODE_FINISHED)==0) { + for(sock= node->inputs.first; sock; sock= sock->next) + if(sock->link) + sock->link->fromnode->exec &= ~NODE_FREEBUFS; + } + } + /* now we can free buffers */ + for(node= ntree->nodes.first; node; node= node->next) { + if(node->exec & NODE_FREEBUFS) { + for(sock= node->outputs.first; sock; sock= sock->next) { + bNodeStack *ns= node_get_socket_stack(exec->stack, sock); + if(ns && ns->data) { + free_compbuf(ns->data); + ns->data= NULL; + // printf("freed buf node %s \n", node->name); + } + } + } + } +} + +static bNodeExec *getExecutableNode(bNodeTreeExec *exec) +{ + bNodeExec *nodeexec; + bNodeSocket *sock; + int n; + + for(n=0, nodeexec=exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { + if(nodeexec->node->exec==0) { + /* input sockets should be ready */ + for(sock= nodeexec->node->inputs.first; sock; sock= sock->next) { + if(sock->link && sock->link->fromnode) + if((sock->link->fromnode->exec & NODE_READY)==0) + break; + } + if(sock==NULL) + return nodeexec; + } + } + return NULL; +} + +/* check if texture nodes need exec or end */ +static void ntree_composite_texnode(bNodeTree *ntree, int init) +{ + bNode *node; + + for(node= ntree->nodes.first; node; node= node->next) { + if(node->type==CMP_NODE_TEXTURE && node->id) { + Tex *tex= (Tex *)node->id; + if(tex->nodetree && tex->use_nodes) { + /* has internal flag to detect it only does it once */ + if(init) { + if (!tex->nodetree->execdata) + tex->nodetree->execdata = ntreeTexBeginExecTree(tex->nodetree); + } + else + ntreeTexEndExecTree(tex->nodetree->execdata); + tex->nodetree->execdata = NULL; + } + } + } + +} + +/* optimized tree execute test for compositing */ +void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview) +{ + bNodeExec *nodeexec; + bNode *node; + ListBase threads; + ThreadData thdata; + int totnode, curnode, rendering= 1, n; + bNodeTreeExec *exec= NULL; + + if(ntree==NULL) return; + + if(do_preview) + ntreeInitPreview(ntree, 0, 0); + + if (!ntree->execdata) + exec = ntreeCompositBeginExecTree(ntree); + ntree_composite_texnode(ntree, 1); + + /* prevent unlucky accidents */ + if(G.background) + rd->scemode &= ~R_COMP_CROP; + + /* setup callerdata for thread callback */ + thdata.rd= rd; + thdata.stack= exec->stack; + + /* fixed seed, for example noise texture */ + BLI_srandom(rd->cfra); + + /* sets need_exec tags in nodes */ + curnode = totnode= setExecutableNodes(ntree, &thdata); + + BLI_init_threads(&threads, exec_composite_node, rd->threads); + + while(rendering) { + + if(BLI_available_threads(&threads)) { + nodeexec= getExecutableNode(exec); + if(nodeexec) { + node = nodeexec->node; + if(ntree->progress && totnode) + ntree->progress(ntree->prh, (1.0 - curnode/(float)totnode)); + if(ntree->stats_draw) { + char str[64]; + sprintf(str, "Compositing %d %s", curnode, node->name); + ntree->stats_draw(ntree->sdh, str); + } + curnode--; + + node->threaddata = &thdata; + node->exec= NODE_PROCESSING; + BLI_insert_thread(&threads, nodeexec); + } + else + PIL_sleep_ms(50); + } + else + PIL_sleep_ms(50); + + rendering= 0; + /* test for ESC */ + if(ntree->test_break && ntree->test_break(ntree->tbh)) { + for(node= ntree->nodes.first; node; node= node->next) + node->exec |= NODE_READY; + } + + /* check for ready ones, and if we need to continue */ + for(n=0, nodeexec=exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { + node = nodeexec->node; + if(node->exec & NODE_READY) { + if((node->exec & NODE_FINISHED)==0) { + BLI_remove_thread(&threads, nodeexec); /* this waits for running thread to finish btw */ + node->exec |= NODE_FINISHED; + + /* freeing unused buffers */ + if(rd->scemode & R_COMP_FREE) + freeExecutableNode(ntree, exec); + } + } + else rendering= 1; + } + } + + BLI_end_threads(&threads); + + ntreeCompositEndExecTree(exec); +} + +/* *********************************************** */ + +/* clumsy checking... should do dynamic outputs once */ +static void force_hidden_passes(bNode *node, int passflag) +{ + bNodeSocket *sock; + + for(sock= node->outputs.first; sock; sock= sock->next) + sock->flag &= ~SOCK_UNAVAIL; + + sock= BLI_findlink(&node->outputs, RRES_OUT_Z); + if(!(passflag & SCE_PASS_Z)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_NORMAL); + if(!(passflag & SCE_PASS_NORMAL)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_VEC); + if(!(passflag & SCE_PASS_VECTOR)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_UV); + if(!(passflag & SCE_PASS_UV)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_RGBA); + if(!(passflag & SCE_PASS_RGBA)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_DIFF); + if(!(passflag & SCE_PASS_DIFFUSE)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_SPEC); + if(!(passflag & SCE_PASS_SPEC)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_SHADOW); + if(!(passflag & SCE_PASS_SHADOW)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_AO); + if(!(passflag & SCE_PASS_AO)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_REFLECT); + if(!(passflag & SCE_PASS_REFLECT)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_REFRACT); + if(!(passflag & SCE_PASS_REFRACT)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_INDIRECT); + if(!(passflag & SCE_PASS_INDIRECT)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXOB); + if(!(passflag & SCE_PASS_INDEXOB)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXMA); + if(!(passflag & SCE_PASS_INDEXMA)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_MIST); + if(!(passflag & SCE_PASS_MIST)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_EMIT); + if(!(passflag & SCE_PASS_EMIT)) sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_ENV); + if(!(passflag & SCE_PASS_ENVIRONMENT)) sock->flag |= SOCK_UNAVAIL; + +} + +/* based on rules, force sockets hidden always */ +void ntreeCompositForceHidden(bNodeTree *ntree, Scene *curscene) +{ + bNode *node; + + if(ntree==NULL) return; + + for(node= ntree->nodes.first; node; node= node->next) { + if( node->type==CMP_NODE_R_LAYERS) { + Scene *sce= node->id?(Scene *)node->id:curscene; + SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1); + if(srl) + force_hidden_passes(node, srl->passflag); + } + else if( node->type==CMP_NODE_IMAGE) { + Image *ima= (Image *)node->id; + if(ima) { + if(ima->rr) { + ImageUser *iuser= node->storage; + RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer); + if(rl) + force_hidden_passes(node, rl->passflag); + else + force_hidden_passes(node, 0); + } + else if(ima->type!=IMA_TYPE_MULTILAYER) { /* if ->rr not yet read we keep inputs */ + force_hidden_passes(node, RRES_OUT_Z); + } + else + force_hidden_passes(node, 0); + } + else + force_hidden_passes(node, 0); + } + } + +} + +/* called from render pipeline, to tag render input and output */ +/* need to do all scenes, to prevent errors when you re-render 1 scene */ +void ntreeCompositTagRender(Scene *curscene) +{ + Scene *sce; + + for(sce= G.main->scene.first; sce; sce= sce->id.next) { + if(sce->nodetree) { + bNode *node; + + for(node= sce->nodetree->nodes.first; node; node= node->next) { + if(node->id==(ID *)curscene || node->type==CMP_NODE_COMPOSITE) + NodeTagChanged(sce->nodetree, node); + else if(node->type==CMP_NODE_TEXTURE) /* uses scene sizex/sizey */ + NodeTagChanged(sce->nodetree, node); + } + } + } +} + +static int node_animation_properties(bNodeTree *ntree, bNode *node) +{ + bNodeSocket *sock; + const ListBase *lb; + Link *link; + PointerRNA ptr; + PropertyRNA *prop; + + /* check to see if any of the node's properties have fcurves */ + RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr); + lb = RNA_struct_type_properties(ptr.type); + + for (link=lb->first; link; link=link->next) { + int driven, len=1, index; + prop = (PropertyRNA *)link; + + if (RNA_property_array_check(prop)) + len = RNA_property_array_length(&ptr, prop); + + for (index=0; indexinputs.first; sock; sock=sock->next) { + int driven, len=1, index; + + RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr); + prop = RNA_struct_find_property(&ptr, "default_value"); + if (prop) { + if (RNA_property_array_check(prop)) + len = RNA_property_array_length(&ptr, prop); + + for (index=0; indexnodes.first; node; node= node->next) { + + tagged = node_animation_properties(ntree, node); + + /* otherwise always tag these node types */ + if(node->type==CMP_NODE_IMAGE) { + Image *ima= (Image *)node->id; + if(ima && ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { + NodeTagChanged(ntree, node); + tagged= 1; + } + } + else if(node->type==CMP_NODE_TIME) { + NodeTagChanged(ntree, node); + tagged= 1; + } + /* here was tag render layer, but this is called after a render, so re-composites fail */ + else if(node->type==NODE_GROUP) { + if( ntreeCompositTagAnimated((bNodeTree *)node->id) ) { + NodeTagChanged(ntree, node); + } + } + } + + return tagged; +} + + +/* called from image window preview */ +void ntreeCompositTagGenerators(bNodeTree *ntree) +{ + bNode *node; + + if(ntree==NULL) return; + + for(node= ntree->nodes.first; node; node= node->next) { + if( ELEM(node->type, CMP_NODE_R_LAYERS, CMP_NODE_IMAGE)) + NodeTagChanged(ntree, node); + } +} + +/* XXX after render animation system gets a refresh, this call allows composite to end clean */ +void ntreeClearTags(bNodeTree *ntree) +{ + bNode *node; + + if(ntree==NULL) return; + + for(node= ntree->nodes.first; node; node= node->next) { + node->need_exec= 0; + if(node->type==NODE_GROUP) + ntreeClearTags((bNodeTree *)node->id); + } +} diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c new file mode 100644 index 00000000000..f7759775af0 --- /dev/null +++ b/source/blender/nodes/composite/node_composite_util.c @@ -0,0 +1,1413 @@ +/* + * $Id: CMP_util.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/node_composite_util.c + * \ingroup nodes + */ + + +#include "node_composite_util.h" + +CompBuf *alloc_compbuf(int sizex, int sizey, int type, int alloc) +{ + CompBuf *cbuf= MEM_callocN(sizeof(CompBuf), "compbuf"); + + cbuf->x= sizex; + cbuf->y= sizey; + cbuf->xrad= sizex/2; + cbuf->yrad= sizey/2; + + cbuf->type= type; + if(alloc) { + if(cbuf->type==CB_RGBA) + cbuf->rect= MEM_mapallocN(4*sizeof(float)*sizex*sizey, "compbuf RGBA rect"); + else if(cbuf->type==CB_VEC3) + cbuf->rect= MEM_mapallocN(3*sizeof(float)*sizex*sizey, "compbuf Vector3 rect"); + else if(cbuf->type==CB_VEC2) + cbuf->rect= MEM_mapallocN(2*sizeof(float)*sizex*sizey, "compbuf Vector2 rect"); + else + cbuf->rect= MEM_mapallocN(sizeof(float)*sizex*sizey, "compbuf Fac rect"); + cbuf->malloc= 1; + } + cbuf->disprect.xmin= 0; + cbuf->disprect.ymin= 0; + cbuf->disprect.xmax= sizex; + cbuf->disprect.ymax= sizey; + + return cbuf; +} + +CompBuf *dupalloc_compbuf(CompBuf *cbuf) +{ + CompBuf *dupbuf= alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1); + if(dupbuf) { + memcpy(dupbuf->rect, cbuf->rect, cbuf->type*sizeof(float)*cbuf->x*cbuf->y); + + dupbuf->xof= cbuf->xof; + dupbuf->yof= cbuf->yof; + } + return dupbuf; +} + +/* instead of reference counting, we create a list */ +CompBuf *pass_on_compbuf(CompBuf *cbuf) +{ + CompBuf *dupbuf= (cbuf)? alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 0): NULL; + CompBuf *lastbuf; + + if(dupbuf) { + dupbuf->rect= cbuf->rect; + dupbuf->xof= cbuf->xof; + dupbuf->yof= cbuf->yof; + dupbuf->malloc= 0; + + /* get last buffer in list, and append dupbuf */ + for(lastbuf= cbuf; lastbuf; lastbuf= lastbuf->next) + if(lastbuf->next==NULL) + break; + lastbuf->next= dupbuf; + dupbuf->prev= lastbuf; + } + return dupbuf; +} + + +void free_compbuf(CompBuf *cbuf) +{ + /* check referencing, then remove from list and set malloc tag */ + if(cbuf->prev || cbuf->next) { + if(cbuf->prev) + cbuf->prev->next= cbuf->next; + if(cbuf->next) + cbuf->next->prev= cbuf->prev; + if(cbuf->malloc) { + if(cbuf->prev) + cbuf->prev->malloc= 1; + else + cbuf->next->malloc= 1; + cbuf->malloc= 0; + } + } + + if(cbuf->malloc && cbuf->rect) + MEM_freeN(cbuf->rect); + + MEM_freeN(cbuf); +} + +void print_compbuf(char *str, CompBuf *cbuf) +{ + printf("Compbuf %s %d %d %p\n", str, cbuf->x, cbuf->y, (void *)cbuf->rect); + +} + +void compbuf_set_node(CompBuf *cbuf, bNode *node) +{ + if (cbuf) cbuf->node = node; +} + +/* used for disabling node (similar code in node_draw.c for disable line and node_edit for untangling nodes) */ +void node_compo_pass_on(bNode *node, bNodeStack **nsin, bNodeStack **nsout) +{ + CompBuf *valbuf= NULL, *colbuf= NULL, *vecbuf= NULL; + bNodeSocket *sock; + int a; + + /* connect the first value buffer in with first value out */ + /* connect the first RGBA buffer in with first RGBA out */ + + /* test the inputs */ + for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) { + if(nsin[a]->data) { + CompBuf *cbuf= nsin[a]->data; + if(cbuf->type==1 && valbuf==NULL) valbuf= cbuf; + if(cbuf->type==3 && vecbuf==NULL) vecbuf= cbuf; + if(cbuf->type==4 && colbuf==NULL) colbuf= cbuf; + } + } + + /* outputs */ + if(valbuf || colbuf || vecbuf) { + for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) { + if(nsout[a]->hasoutput) { + if(sock->type==SOCK_FLOAT && valbuf) { + nsout[a]->data= pass_on_compbuf(valbuf); + valbuf= NULL; + } + if(sock->type==SOCK_VECTOR && vecbuf) { + nsout[a]->data= pass_on_compbuf(vecbuf); + vecbuf= NULL; + } + if(sock->type==SOCK_RGBA && colbuf) { + nsout[a]->data= pass_on_compbuf(colbuf); + colbuf= NULL; + } + } + } + } +} + + +CompBuf *get_cropped_compbuf(rcti *drect, float *rectf, int rectx, int recty, int type) +{ + CompBuf *cbuf; + rcti disprect= *drect; + float *outfp; + int dx, y; + + if(disprect.xmax>rectx) disprect.xmax= rectx; + if(disprect.ymax>recty) disprect.ymax= recty; + if(disprect.xmin>= disprect.xmax) return NULL; + if(disprect.ymin>= disprect.ymax) return NULL; + + cbuf= alloc_compbuf(disprect.xmax-disprect.xmin, disprect.ymax-disprect.ymin, type, 1); + outfp= cbuf->rect; + rectf += type*(disprect.ymin*rectx + disprect.xmin); + dx= type*cbuf->x; + for(y=cbuf->y; y>0; y--, outfp+=dx, rectf+=type*rectx) + memcpy(outfp, rectf, sizeof(float)*dx); + + return cbuf; +} + +CompBuf *scalefast_compbuf(CompBuf *inbuf, int newx, int newy) +{ + CompBuf *outbuf; + float *rectf, *newrectf, *rf; + int x, y, c, pixsize= inbuf->type; + int ofsx, ofsy, stepx, stepy; + + if(inbuf->x==newx && inbuf->y==newy) + return dupalloc_compbuf(inbuf); + + outbuf= alloc_compbuf(newx, newy, inbuf->type, 1); + newrectf= outbuf->rect; + + stepx = (65536.0 * (inbuf->x - 1.0) / (newx - 1.0)) + 0.5; + stepy = (65536.0 * (inbuf->y - 1.0) / (newy - 1.0)) + 0.5; + ofsy = 32768; + + for (y = newy; y > 0 ; y--){ + rectf = inbuf->rect; + rectf += pixsize * (ofsy >> 16) * inbuf->x; + + ofsy += stepy; + ofsx = 32768; + + for (x = newx ; x>0 ; x--) { + + rf= rectf + pixsize*(ofsx >> 16); + for(c=0; ctype!=type) { + CompBuf *outbuf; + float *inrf, *outrf; + int x; + + outbuf= alloc_compbuf(inbuf->x, inbuf->y, type, 1); + + /* warning note: xof and yof are applied in pixelprocessor, but should be copied otherwise? */ + outbuf->xof= inbuf->xof; + outbuf->yof= inbuf->yof; + + if(inbuf->rect_procedural) { + outbuf->rect_procedural= inbuf->rect_procedural; + VECCOPY(outbuf->procedural_size, inbuf->procedural_size); + VECCOPY(outbuf->procedural_offset, inbuf->procedural_offset); + outbuf->procedural_type= inbuf->procedural_type; + outbuf->node= inbuf->node; + return outbuf; + } + + inrf= inbuf->rect; + outrf= outbuf->rect; + x= inbuf->x*inbuf->y; + + if(type==CB_VAL) { + if(inbuf->type==CB_VEC2) { + for(; x>0; x--, outrf+= 1, inrf+= 2) + *outrf= 0.5f*(inrf[0]+inrf[1]); + } + else if(inbuf->type==CB_VEC3) { + for(; x>0; x--, outrf+= 1, inrf+= 3) + *outrf= 0.333333f*(inrf[0]+inrf[1]+inrf[2]); + } + else if(inbuf->type==CB_RGBA) { + for(; x>0; x--, outrf+= 1, inrf+= 4) + *outrf= inrf[0]*0.35f + inrf[1]*0.45f + inrf[2]*0.2f; + } + } + else if(type==CB_VEC2) { + if(inbuf->type==CB_VAL) { + for(; x>0; x--, outrf+= 2, inrf+= 1) { + outrf[0]= inrf[0]; + outrf[1]= inrf[0]; + } + } + else if(inbuf->type==CB_VEC3) { + for(; x>0; x--, outrf+= 2, inrf+= 3) { + outrf[0]= inrf[0]; + outrf[1]= inrf[1]; + } + } + else if(inbuf->type==CB_RGBA) { + for(; x>0; x--, outrf+= 2, inrf+= 4) { + outrf[0]= inrf[0]; + outrf[1]= inrf[1]; + } + } + } + else if(type==CB_VEC3) { + if(inbuf->type==CB_VAL) { + for(; x>0; x--, outrf+= 3, inrf+= 1) { + outrf[0]= inrf[0]; + outrf[1]= inrf[0]; + outrf[2]= inrf[0]; + } + } + else if(inbuf->type==CB_VEC2) { + for(; x>0; x--, outrf+= 3, inrf+= 2) { + outrf[0]= inrf[0]; + outrf[1]= inrf[1]; + outrf[2]= 0.0f; + } + } + else if(inbuf->type==CB_RGBA) { + for(; x>0; x--, outrf+= 3, inrf+= 4) { + outrf[0]= inrf[0]; + outrf[1]= inrf[1]; + outrf[2]= inrf[2]; + } + } + } + else if(type==CB_RGBA) { + if(inbuf->type==CB_VAL) { + for(; x>0; x--, outrf+= 4, inrf+= 1) { + outrf[0]= inrf[0]; + outrf[1]= inrf[0]; + outrf[2]= inrf[0]; + outrf[3]= 1.0f; + } + } + else if(inbuf->type==CB_VEC2) { + for(; x>0; x--, outrf+= 4, inrf+= 2) { + outrf[0]= inrf[0]; + outrf[1]= inrf[1]; + outrf[2]= 0.0f; + outrf[3]= 1.0f; + } + } + else if(inbuf->type==CB_VEC3) { + for(; x>0; x--, outrf+= 4, inrf+= 3) { + outrf[0]= inrf[0]; + outrf[1]= inrf[1]; + outrf[2]= inrf[2]; + outrf[3]= 1.0f; + } + } + } + + return outbuf; + } + return inbuf; +} + +static float *compbuf_get_pixel(CompBuf *cbuf, float *defcol, float *use, int x, int y, int xrad, int yrad) +{ + if(cbuf) { + if(cbuf->rect_procedural) { + cbuf->rect_procedural(cbuf, use, (float)x/(float)xrad, (float)y/(float)yrad); + return use; + } + else { + static float col[4]= {0.0f, 0.0f, 0.0f, 0.0f}; + + /* map coords */ + x-= cbuf->xof; + y-= cbuf->yof; + + if(y<-cbuf->yrad || y>= -cbuf->yrad+cbuf->y) return col; + if(x<-cbuf->xrad || x>= -cbuf->xrad+cbuf->x) return col; + + return cbuf->rect + cbuf->type*( (cbuf->yrad+y)*cbuf->x + (cbuf->xrad+x) ); + } + } + else return defcol; +} + +/* **************************************************** */ + +/* Pixel-to-Pixel operation, 1 Image in, 1 out */ +void composit1_pixel_processor(bNode *node, CompBuf *out, CompBuf *src_buf, float *src_col, + void (*func)(bNode *, float *, float *), + int src_type) +{ + CompBuf *src_use; + float *outfp=out->rect, *srcfp; + float color[4]; /* local color if compbuf is procedural */ + int xrad, yrad, x, y; + + src_use= typecheck_compbuf(src_buf, src_type); + + xrad= out->xrad; + yrad= out->yrad; + + for(y= -yrad; y<-yrad+out->y; y++) { + for(x= -xrad; x<-xrad+out->x; x++, outfp+=out->type) { + srcfp= compbuf_get_pixel(src_use, src_col, color, x, y, xrad, yrad); + func(node, outfp, srcfp); + } + } + + if(src_use!=src_buf) + free_compbuf(src_use); +} + +/* Pixel-to-Pixel operation, 2 Images in, 1 out */ +void composit2_pixel_processor(bNode *node, CompBuf *out, CompBuf *src_buf, float *src_col, + CompBuf *fac_buf, float *fac, void (*func)(bNode *, float *, float *, float *), + int src_type, int fac_type) +{ + CompBuf *src_use, *fac_use; + float *outfp=out->rect, *srcfp, *facfp; + float color[4]; /* local color if compbuf is procedural */ + int xrad, yrad, x, y; + + src_use= typecheck_compbuf(src_buf, src_type); + fac_use= typecheck_compbuf(fac_buf, fac_type); + + xrad= out->xrad; + yrad= out->yrad; + + for(y= -yrad; y<-yrad+out->y; y++) { + for(x= -xrad; x<-xrad+out->x; x++, outfp+=out->type) { + srcfp= compbuf_get_pixel(src_use, src_col, color, x, y, xrad, yrad); + facfp= compbuf_get_pixel(fac_use, fac, color, x, y, xrad, yrad); + + func(node, outfp, srcfp, facfp); + } + } + if(src_use!=src_buf) + free_compbuf(src_use); + if(fac_use!=fac_buf) + free_compbuf(fac_use); +} + +/* Pixel-to-Pixel operation, 3 Images in, 1 out */ +void composit3_pixel_processor(bNode *node, CompBuf *out, CompBuf *src1_buf, float *src1_col, CompBuf *src2_buf, float *src2_col, + CompBuf *fac_buf, float *fac, void (*func)(bNode *, float *, float *, float *, float *), + int src1_type, int src2_type, int fac_type) +{ + CompBuf *src1_use, *src2_use, *fac_use; + float *outfp=out->rect, *src1fp, *src2fp, *facfp; + float color[4]; /* local color if compbuf is procedural */ + int xrad, yrad, x, y; + + src1_use= typecheck_compbuf(src1_buf, src1_type); + src2_use= typecheck_compbuf(src2_buf, src2_type); + fac_use= typecheck_compbuf(fac_buf, fac_type); + + xrad= out->xrad; + yrad= out->yrad; + + for(y= -yrad; y<-yrad+out->y; y++) { + for(x= -xrad; x<-xrad+out->x; x++, outfp+=out->type) { + src1fp= compbuf_get_pixel(src1_use, src1_col, color, x, y, xrad, yrad); + src2fp= compbuf_get_pixel(src2_use, src2_col, color, x, y, xrad, yrad); + facfp= compbuf_get_pixel(fac_use, fac, color, x, y, xrad, yrad); + + func(node, outfp, src1fp, src2fp, facfp); + } + } + + if(src1_use!=src1_buf) + free_compbuf(src1_use); + if(src2_use!=src2_buf) + free_compbuf(src2_use); + if(fac_use!=fac_buf) + free_compbuf(fac_use); +} + +/* Pixel-to-Pixel operation, 4 Images in, 1 out */ +void composit4_pixel_processor(bNode *node, CompBuf *out, CompBuf *src1_buf, float *src1_col, CompBuf *fac1_buf, float *fac1, + CompBuf *src2_buf, float *src2_col, CompBuf *fac2_buf, float *fac2, + void (*func)(bNode *, float *, float *, float *, float *, float *), + int src1_type, int fac1_type, int src2_type, int fac2_type) +{ + CompBuf *src1_use, *src2_use, *fac1_use, *fac2_use; + float *outfp=out->rect, *src1fp, *src2fp, *fac1fp, *fac2fp; + float color[4]; /* local color if compbuf is procedural */ + int xrad, yrad, x, y; + + src1_use= typecheck_compbuf(src1_buf, src1_type); + src2_use= typecheck_compbuf(src2_buf, src2_type); + fac1_use= typecheck_compbuf(fac1_buf, fac1_type); + fac2_use= typecheck_compbuf(fac2_buf, fac2_type); + + xrad= out->xrad; + yrad= out->yrad; + + for(y= -yrad; y<-yrad+out->y; y++) { + for(x= -xrad; x<-xrad+out->x; x++, outfp+=out->type) { + src1fp= compbuf_get_pixel(src1_use, src1_col, color, x, y, xrad, yrad); + src2fp= compbuf_get_pixel(src2_use, src2_col, color, x, y, xrad, yrad); + fac1fp= compbuf_get_pixel(fac1_use, fac1, color, x, y, xrad, yrad); + fac2fp= compbuf_get_pixel(fac2_use, fac2, color, x, y, xrad, yrad); + + func(node, outfp, src1fp, fac1fp, src2fp, fac2fp); + } + } + + if(src1_use!=src1_buf) + free_compbuf(src1_use); + if(src2_use!=src2_buf) + free_compbuf(src2_use); + if(fac1_use!=fac1_buf) + free_compbuf(fac1_use); + if(fac2_use!=fac2_buf) + free_compbuf(fac2_use); +} + + +CompBuf *valbuf_from_rgbabuf(CompBuf *cbuf, int channel) +{ + CompBuf *valbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); + float *valf, *rectf; + int tot; + + /* warning note: xof and yof are applied in pixelprocessor, but should be copied otherwise? */ + valbuf->xof= cbuf->xof; + valbuf->yof= cbuf->yof; + + valf= valbuf->rect; + + /* defaults to returning alpha channel */ + if ((channel < CHAN_R) || (channel > CHAN_A)) channel = CHAN_A; + + rectf= cbuf->rect + channel; + + for(tot= cbuf->x*cbuf->y; tot>0; tot--, valf++, rectf+=4) + *valf= *rectf; + + return valbuf; +} + +static CompBuf *generate_procedural_preview(CompBuf *cbuf, int newx, int newy) +{ + CompBuf *outbuf; + float *outfp; + int xrad, yrad, x, y; + + outbuf= alloc_compbuf(newx, newy, CB_RGBA, 1); + + outfp= outbuf->rect; + xrad= outbuf->xrad; + yrad= outbuf->yrad; + + for(y= -yrad; y<-yrad+outbuf->y; y++) + for(x= -xrad; x<-xrad+outbuf->x; x++, outfp+=outbuf->type) + cbuf->rect_procedural(cbuf, outfp, (float)x/(float)xrad, (float)y/(float)yrad); + + return outbuf; +} + +void generate_preview(void *data, bNode *node, CompBuf *stackbuf) +{ + RenderData *rd= data; + bNodePreview *preview= node->preview; + int xsize, ysize; + int color_manage= rd->color_mgt_flag & R_COLOR_MANAGEMENT; + unsigned char *rect; + + if(preview && stackbuf) { + CompBuf *cbuf, *stackbuf_use; + + if(stackbuf->rect==NULL && stackbuf->rect_procedural==NULL) return; + + stackbuf_use= typecheck_compbuf(stackbuf, CB_RGBA); + + if(stackbuf->x > stackbuf->y) { + xsize= 140; + ysize= (140*stackbuf->y)/stackbuf->x; + } + else { + ysize= 140; + xsize= (140*stackbuf->x)/stackbuf->y; + } + + if(stackbuf_use->rect_procedural) + cbuf= generate_procedural_preview(stackbuf_use, xsize, ysize); + else + cbuf= scalefast_compbuf(stackbuf_use, xsize, ysize); + + /* convert to byte for preview */ + rect= MEM_callocN(sizeof(unsigned char)*4*xsize*ysize, "bNodePreview.rect"); + + if(color_manage) + floatbuf_to_srgb_byte(cbuf->rect, rect, 0, xsize, 0, ysize, xsize); + else + floatbuf_to_byte(cbuf->rect, rect, 0, xsize, 0, ysize, xsize); + + free_compbuf(cbuf); + if(stackbuf_use!=stackbuf) + free_compbuf(stackbuf_use); + + BLI_lock_thread(LOCK_PREVIEW); + + if(preview->rect) + MEM_freeN(preview->rect); + preview->xsize= xsize; + preview->ysize= ysize; + preview->rect= rect; + + BLI_unlock_thread(LOCK_PREVIEW); + } +} + +void do_rgba_to_yuva(bNode *UNUSED(node), float *out, float *in) +{ + rgb_to_yuv(in[0],in[1],in[2], &out[0], &out[1], &out[2]); + out[3]=in[3]; +} + +void do_rgba_to_hsva(bNode *UNUSED(node), float *out, float *in) +{ + rgb_to_hsv(in[0],in[1],in[2], &out[0], &out[1], &out[2]); + out[3]=in[3]; +} + +void do_rgba_to_ycca(bNode *UNUSED(node), float *out, float *in) +{ + rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); + out[3]=in[3]; +} + +void do_yuva_to_rgba(bNode *UNUSED(node), float *out, float *in) +{ + yuv_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2]); + out[3]=in[3]; +} + +void do_hsva_to_rgba(bNode *UNUSED(node), float *out, float *in) +{ + hsv_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2]); + out[3]=in[3]; +} + +void do_ycca_to_rgba(bNode *UNUSED(node), float *out, float *in) +{ + ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); + out[3]=in[3]; +} + +void do_copy_rgba(bNode *UNUSED(node), float *out, float *in) +{ + QUATCOPY(out, in); +} + +void do_copy_rgb(bNode *UNUSED(node), float *out, float *in) +{ + VECCOPY(out, in); + out[3]= 1.0f; +} + +void do_copy_value(bNode *UNUSED(node), float *out, float *in) +{ + out[0]= in[0]; +} + +void do_copy_a_rgba(bNode *UNUSED(node), float *out, float *in, float *fac) +{ + VECCOPY(out, in); + out[3]= *fac; +} + +/* only accepts RGBA buffers */ +void gamma_correct_compbuf(CompBuf *img, int inversed) +{ + float *drect; + int x; + + if(img->type!=CB_RGBA) return; + + drect= img->rect; + if(inversed) { + for(x=img->x*img->y; x>0; x--, drect+=4) { + if(drect[0]>0.0f) drect[0]= sqrt(drect[0]); else drect[0]= 0.0f; + if(drect[1]>0.0f) drect[1]= sqrt(drect[1]); else drect[1]= 0.0f; + if(drect[2]>0.0f) drect[2]= sqrt(drect[2]); else drect[2]= 0.0f; + } + } + else { + for(x=img->x*img->y; x>0; x--, drect+=4) { + if(drect[0]>0.0f) drect[0]*= drect[0]; else drect[0]= 0.0f; + if(drect[1]>0.0f) drect[1]*= drect[1]; else drect[1]= 0.0f; + if(drect[2]>0.0f) drect[2]*= drect[2]; else drect[2]= 0.0f; + } + } +} + +void premul_compbuf(CompBuf *img, int inversed) +{ + float *drect; + int x; + + if(img->type!=CB_RGBA) return; + + drect= img->rect; + if(inversed) { + for(x=img->x*img->y; x>0; x--, drect+=4) { + if(fabs(drect[3]) < 1e-5f) { + drect[0]= 0.0f; + drect[1]= 0.0f; + drect[2]= 0.0f; + } + else { + drect[0] /= drect[3]; + drect[1] /= drect[3]; + drect[2] /= drect[3]; + } + } + } + else { + for(x=img->x*img->y; x>0; x--, drect+=4) { + drect[0] *= drect[3]; + drect[1] *= drect[3]; + drect[2] *= drect[3]; + } + } +} + + + +/* + * 2D Fast Hartley Transform, used for convolution + */ + +typedef float fREAL; + +// returns next highest power of 2 of x, as well it's log2 in L2 +static unsigned int nextPow2(unsigned int x, unsigned int* L2) +{ + unsigned int pw, x_notpow2 = x & (x-1); + *L2 = 0; + while (x>>=1) ++(*L2); + pw = 1 << (*L2); + if (x_notpow2) { (*L2)++; pw<<=1; } + return pw; +} + +//------------------------------------------------------------------------------ + +// from FXT library by Joerg Arndt, faster in order bitreversal +// use: r = revbin_upd(r, h) where h = N>>1 +static unsigned int revbin_upd(unsigned int r, unsigned int h) +{ + while (!((r^=h)&h)) h >>= 1; + return r; +} +//------------------------------------------------------------------------------ +static void FHT(fREAL* data, unsigned int M, unsigned int inverse) +{ + double tt, fc, dc, fs, ds, a = M_PI; + fREAL t1, t2; + int n2, bd, bl, istep, k, len = 1 << M, n = 1; + + int i, j = 0; + unsigned int Nh = len >> 1; + for (i=1;i<(len-1);++i) { + j = revbin_upd(j, Nh); + if (j>i) { + t1 = data[i]; + data[i] = data[j]; + data[j] = t1; + } + } + + do { + fREAL* data_n = &data[n]; + + istep = n << 1; + for (k=0; k> 1; + if (n>2) { + fc = dc = cos(a); + fs = ds = sqrt(1.0 - fc*fc); //sin(a); + bd = n-2; + for (bl=1; bl1) { + for (k=n2; k log2 of width/height, + nzp -> the row where zero pad data starts, + inverse -> see above */ +static void FHT2D(fREAL *data, unsigned int Mx, unsigned int My, + unsigned int nzp, unsigned int inverse) +{ + unsigned int i, j, Nx, Ny, maxy; + fREAL t; + + Nx = 1 << Mx; + Ny = 1 << My; + + // rows (forward transform skips 0 pad data) + maxy = inverse ? Ny : nzp; + for (j=0; j0; i++) { + #define pred(k) (((k & Nym) << Mx) + (k >> My)) + for (j=pred(i); j>i; j=pred(j)); + if (j < i) continue; + for (k=i, j=pred(i); j!=i; k=j, j=pred(j), stm--) + { t=data[j], data[j]=data[k], data[k]=t; } + #undef pred + stm--; + } + } + // swap Mx/My & Nx/Ny + i = Nx, Nx = Ny, Ny = i; + i = Mx, Mx = My, My = i; + + // now columns == transposed rows + for (j=0; j> 1); j++) { + unsigned int jm = (Ny - j) & (Ny-1); + unsigned int ji = j << Mx; + unsigned int jmi = jm << Mx; + for (i=0; i<=(Nx >> 1); i++) { + unsigned int im = (Nx - i) & (Nx-1); + fREAL A = data[ji + i]; + fREAL B = data[jmi + i]; + fREAL C = data[ji + im]; + fREAL D = data[jmi + im]; + fREAL E = (fREAL)0.5*((A + D) - (B + C)); + data[ji + i] = A - E; + data[jmi + i] = B + E; + data[ji + im] = C + E; + data[jmi + im] = D - E; + } + } + +} + +//------------------------------------------------------------------------------ + +/* 2D convolution calc, d1 *= d2, M/N - > log2 of width/height */ +static void fht_convolve(fREAL* d1, fREAL* d2, unsigned int M, unsigned int N) +{ + fREAL a, b; + unsigned int i, j, k, L, mj, mL; + unsigned int m = 1 << M, n = 1 << N; + unsigned int m2 = 1 << (M-1), n2 = 1 << (N-1); + unsigned int mn2 = m << (N-1); + + d1[0] *= d2[0]; + d1[mn2] *= d2[mn2]; + d1[m2] *= d2[m2]; + d1[m2 + mn2] *= d2[m2 + mn2]; + for (i=1; ix, in1->y, in1->type, 1); + + // convolution result width & height + w2 = 2*in2->x - 1; + h2 = 2*in2->y - 1; + // FFT pow2 required size & log2 + w2 = nextPow2(w2, &log2_w); + h2 = nextPow2(h2, &log2_h); + + // alloc space + data1 = (fREAL*)MEM_callocN(3*w2*h2*sizeof(fREAL), "convolve_fast FHT data1"); + data2 = (fREAL*)MEM_callocN(w2*h2*sizeof(fREAL), "convolve_fast FHT data2"); + + // normalize convolutor + wt[0] = wt[1] = wt[2] = 0.f; + for (y=0; yy; y++) { + colp = (fRGB*)&in2->rect[y*in2->x*in2->type]; + for (x=0; xx; x++) + fRGB_add(wt, colp[x]); + } + if (wt[0] != 0.f) wt[0] = 1.f/wt[0]; + if (wt[1] != 0.f) wt[1] = 1.f/wt[1]; + if (wt[2] != 0.f) wt[2] = 1.f/wt[2]; + for (y=0; yy; y++) { + colp = (fRGB*)&in2->rect[y*in2->x*in2->type]; + for (x=0; xx; x++) + fRGB_colormult(colp[x], wt); + } + + // copy image data, unpacking interleaved RGBA into separate channels + // only need to calc data1 once + + // block add-overlap + hw = in2->x >> 1; + hh = in2->y >> 1; + xbsz = (w2 + 1) - in2->x; + ybsz = (h2 + 1) - in2->y; + nxb = in1->x / xbsz; + if (in1->x % xbsz) nxb++; + nyb = in1->y / ybsz; + if (in1->y % ybsz) nyb++; + for (ybl=0; ybl data1 + for (y=0; yy; y++) { + fp = &data1ch[y*w2]; + colp = (fRGB*)&in2->rect[y*in2->x*in2->type]; + for (x=0; xx; x++) + fp[x] = colp[x][ch]; + } + } + + // in1, channel ch -> data2 + memset(data2, 0, w2*h2*sizeof(fREAL)); + for (y=0; y= in1->y) continue; + fp = &data2[y*w2]; + colp = (fRGB*)&in1->rect[yy*in1->x*in1->type]; + for (x=0; x= in1->x) continue; + fp[x] = colp[xx][ch]; + } + } + + // forward FHT + // zero pad data start is different for each == height+1 + if (!in2done) FHT2D(data1ch, log2_w, log2_h, in2->y+1, 0); + FHT2D(data2, log2_w, log2_h, in2->y+1, 0); + + // FHT2D transposed data, row/col now swapped + // convolve & inverse FHT + fht_convolve(data2, data1ch, log2_h, log2_w); + FHT2D(data2, log2_h, log2_w, 0, 1); + // data again transposed, so in order again + + // overlap-add result + for (y=0; y<(int)h2; y++) { + const int yy = ybl*ybsz + y - hh; + if ((yy < 0) || (yy >= in1->y)) continue; + fp = &data2[y*w2]; + colp = (fRGB*)&rdst->rect[yy*in1->x*in1->type]; + for (x=0; x<(int)w2; x++) { + const int xx = xbl*xbsz + x - hw; + if ((xx < 0) || (xx >= in1->x)) continue; + colp[xx][ch] += fp[x]; + } + } + + } + in2done = 1; + } + } + + MEM_freeN(data2); + MEM_freeN(data1); + memcpy(dst->rect, rdst->rect, sizeof(float)*dst->x*dst->y*dst->type); + free_compbuf(rdst); +} + + +/* + * + * Utility functions qd_* should probably be intergrated better with other functions here. + * + */ +// sets fcol to pixelcolor at (x, y) +void qd_getPixel(CompBuf* src, int x, int y, float* col) +{ + if(src->rect_procedural) { + float bc[4]; + src->rect_procedural(src, bc, (float)x/(float)src->xrad, (float)y/(float)src->yrad); + + switch(src->type){ + /* these fallthrough to get all the channels */ + case CB_RGBA: col[3]=bc[3]; + case CB_VEC3: col[2]=bc[2]; + case CB_VEC2: col[1]=bc[1]; + case CB_VAL: col[0]=bc[0]; + } + } + else if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { + float* bc = &src->rect[(x + y*src->x)*src->type]; + switch(src->type){ + /* these fallthrough to get all the channels */ + case CB_RGBA: col[3]=bc[3]; + case CB_VEC3: col[2]=bc[2]; + case CB_VEC2: col[1]=bc[1]; + case CB_VAL: col[0]=bc[0]; + } + } + else { + switch(src->type){ + /* these fallthrough to get all the channels */ + case CB_RGBA: col[3]=0.0; + case CB_VEC3: col[2]=0.0; + case CB_VEC2: col[1]=0.0; + case CB_VAL: col[0]=0.0; + } + } +} + +// sets pixel (x, y) to color col +void qd_setPixel(CompBuf* src, int x, int y, float* col) +{ + if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { + float* bc = &src->rect[(x + y*src->x)*src->type]; + switch(src->type){ + /* these fallthrough to get all the channels */ + case CB_RGBA: bc[3]=col[3]; + case CB_VEC3: bc[2]=col[2]; + case CB_VEC2: bc[1]=col[1]; + case CB_VAL: bc[0]=col[0]; + } + } +} + +// adds fcol to pixelcolor (x, y) +void qd_addPixel(CompBuf* src, int x, int y, float* col) +{ + if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { + float* bc = &src->rect[(x + y*src->x)*src->type]; + bc[0] += col[0], bc[1] += col[1], bc[2] += col[2]; + } +} + +// multiplies pixel by factor value f +void qd_multPixel(CompBuf* src, int x, int y, float f) +{ + if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { + float* bc = &src->rect[(x + y*src->x)*src->type]; + bc[0] *= f, bc[1] *= f, bc[2] *= f; + } +} + +// bilinear interpolation with wraparound +void qd_getPixelLerpWrap(CompBuf* src, float u, float v, float* col) +{ + const float ufl = floor(u), vfl = floor(v); + const int nx = (int)ufl % src->x, ny = (int)vfl % src->y; + const int x1 = (nx < 0) ? (nx + src->x) : nx; + const int y1 = (ny < 0) ? (ny + src->y) : ny; + const int x2 = (x1 + 1) % src->x, y2 = (y1 + 1) % src->y; + const float* c00 = &src->rect[(x1 + y1*src->x)*src->type]; + const float* c10 = &src->rect[(x2 + y1*src->x)*src->type]; + const float* c01 = &src->rect[(x1 + y2*src->x)*src->type]; + const float* c11 = &src->rect[(x2 + y2*src->x)*src->type]; + const float uf = u - ufl, vf = v - vfl; + const float w00=(1.f-uf)*(1.f-vf), w10=uf*(1.f-vf), w01=(1.f-uf)*vf, w11=uf*vf; + col[0] = w00*c00[0] + w10*c10[0] + w01*c01[0] + w11*c11[0]; + if (src->type != CB_VAL) { + col[1] = w00*c00[1] + w10*c10[1] + w01*c01[1] + w11*c11[1]; + col[2] = w00*c00[2] + w10*c10[2] + w01*c01[2] + w11*c11[2]; + col[3] = w00*c00[3] + w10*c10[3] + w01*c01[3] + w11*c11[3]; + } +} + +// as above, without wrap around +void qd_getPixelLerp(CompBuf* src, float u, float v, float* col) +{ + const float ufl = floor(u), vfl = floor(v); + const int x1 = (int)ufl, y1 = (int)vfl; + const int x2 = (int)ceil(u), y2 = (int)ceil(v); + if ((x2 >= 0) && (y2 >= 0) && (x1 < src->x) && (y1 < src->y)) { + const float B[4] = {0,0,0,0}; + const int ox1 = (x1 < 0), oy1 = (y1 < 0), ox2 = (x2 >= src->x), oy2 = (y2 >= src->y); + const float* c00 = (ox1 || oy1) ? B : &src->rect[(x1 + y1*src->x)*src->type]; + const float* c10 = (ox2 || oy1) ? B : &src->rect[(x2 + y1*src->x)*src->type]; + const float* c01 = (ox1 || oy2) ? B : &src->rect[(x1 + y2*src->x)*src->type]; + const float* c11 = (ox2 || oy2) ? B : &src->rect[(x2 + y2*src->x)*src->type]; + const float uf = u - ufl, vf = v - vfl; + const float w00=(1.f-uf)*(1.f-vf), w10=uf*(1.f-vf), w01=(1.f-uf)*vf, w11=uf*vf; + col[0] = w00*c00[0] + w10*c10[0] + w01*c01[0] + w11*c11[0]; + if (src->type != CB_VAL) { + col[1] = w00*c00[1] + w10*c10[1] + w01*c01[1] + w11*c11[1]; + col[2] = w00*c00[2] + w10*c10[2] + w01*c01[2] + w11*c11[2]; + col[3] = w00*c00[3] + w10*c10[3] + w01*c01[3] + w11*c11[3]; + } + } + else col[0] = col[1] = col[2] = col[3] = 0.f; +} + +// as above, sampling only one channel +void qd_getPixelLerpChan(CompBuf* src, float u, float v, int chan, float* out) +{ + const float ufl = floor(u), vfl = floor(v); + const int x1 = (int)ufl, y1 = (int)vfl; + const int x2 = (int)ceil(u), y2 = (int)ceil(v); + if (chan >= src->type) chan = 0; + if ((x2 >= 0) && (y2 >= 0) && (x1 < src->x) && (y1 < src->y)) { + const float B[4] = {0,0,0,0}; + const int ox1 = (x1 < 0), oy1 = (y1 < 0), ox2 = (x2 >= src->x), oy2 = (y2 >= src->y); + const float* c00 = (ox1 || oy1) ? B : &src->rect[(x1 + y1*src->x)*src->type + chan]; + const float* c10 = (ox2 || oy1) ? B : &src->rect[(x2 + y1*src->x)*src->type + chan]; + const float* c01 = (ox1 || oy2) ? B : &src->rect[(x1 + y2*src->x)*src->type + chan]; + const float* c11 = (ox2 || oy2) ? B : &src->rect[(x2 + y2*src->x)*src->type + chan]; + const float uf = u - ufl, vf = v - vfl; + const float w00=(1.f-uf)*(1.f-vf), w10=uf*(1.f-vf), w01=(1.f-uf)*vf, w11=uf*vf; + out[0] = w00*c00[0] + w10*c10[0] + w01*c01[0] + w11*c11[0]; + } + else *out = 0.f; +} + + +CompBuf* qd_downScaledCopy(CompBuf* src, int scale) +{ + CompBuf* fbuf; + if (scale <= 1) + fbuf = dupalloc_compbuf(src); + else { + int nw = src->x/scale, nh = src->y/scale; + if ((2*(src->x % scale)) > scale) nw++; + if ((2*(src->y % scale)) > scale) nh++; + fbuf = alloc_compbuf(nw, nh, src->type, 1); + { + int x, y, xx, yy, sx, sy, mx, my; + float colsum[4] = {0.0f, 0.0f, 0.0f, 0.0f}; + float fscale = 1.f/(float)(scale*scale); + for (y=0; yrect[y*fbuf->x*fbuf->type]; + yy = y*scale; + my = yy + scale; + if (my > src->y) my = src->y; + for (x=0; x src->x) mx = src->x; + colsum[0] = colsum[1] = colsum[2] = 0.f; + for (sy=yy; syrect[sy*src->x*src->type]; + for (sx=xx; sx 3)) xy = 3; + + // XXX The YVV macro defined below explicitely expects sources of at least 3x3 pixels, + // so just skiping blur along faulty direction if src's def is below that limit! + if (src->x < 3) xy &= ~(int) 1; + if (src->y < 3) xy &= ~(int) 2; + if (xy < 1) return; + + // see "Recursive Gabor Filtering" by Young/VanVliet + // all factors here in double.prec. Required, because for single.prec it seems to blow up if sigma > ~200 + if (sigma >= 3.556) + q = 0.9804*(sigma - 3.556) + 2.5091; + else // sigma >= 0.5 + q = (0.0561*sigma + 0.5784)*sigma - 0.2568; + q2 = q*q; + sc = (1.1668 + q)*(3.203729649 + (2.21566 + q)*q); + // no gabor filtering here, so no complex multiplies, just the regular coefs. + // all negated here, so as not to have to recalc Triggs/Sdika matrix + cf[1] = q*(5.788961737 + (6.76492 + 3.0*q)*q)/ sc; + cf[2] = -q2*(3.38246 + 3.0*q)/sc; + // 0 & 3 unchanged + cf[3] = q2*q/sc; + cf[0] = 1.0 - cf[1] - cf[2] - cf[3]; + + // Triggs/Sdika border corrections, + // it seems to work, not entirely sure if it is actually totally correct, + // Besides J.M.Geusebroek's anigauss.c (see http://www.science.uva.nl/~mark), + // found one other implementation by Cristoph Lampert, + // but neither seem to be quite the same, result seems to be ok sofar anyway. + // Extra scale factor here to not have to do it in filter, + // though maybe this had something to with the precision errors + sc = cf[0]/((1.0 + cf[1] - cf[2] + cf[3])*(1.0 - cf[1] - cf[2] - cf[3])*(1.0 + cf[2] + (cf[1] - cf[3])*cf[3])); + tsM[0] = sc*(-cf[3]*cf[1] + 1.0 - cf[3]*cf[3] - cf[2]); + tsM[1] = sc*((cf[3] + cf[1])*(cf[2] + cf[3]*cf[1])); + tsM[2] = sc*(cf[3]*(cf[1] + cf[3]*cf[2])); + tsM[3] = sc*(cf[1] + cf[3]*cf[2]); + tsM[4] = sc*(-(cf[2] - 1.0)*(cf[2] + cf[3]*cf[1])); + tsM[5] = sc*(-(cf[3]*cf[1] + cf[3]*cf[3] + cf[2] - 1.0)*cf[3]); + tsM[6] = sc*(cf[3]*cf[1] + cf[2] + cf[1]*cf[1] - cf[2]*cf[2]); + tsM[7] = sc*(cf[1]*cf[2] + cf[3]*cf[2]*cf[2] - cf[1]*cf[3]*cf[3] - cf[3]*cf[3]*cf[3] - cf[3]*cf[2] + cf[3]); + tsM[8] = sc*(cf[3]*(cf[1] + cf[3]*cf[2])); + +#define YVV(L)\ +{\ + W[0] = cf[0]*X[0] + cf[1]*X[0] + cf[2]*X[0] + cf[3]*X[0];\ + W[1] = cf[0]*X[1] + cf[1]*W[0] + cf[2]*X[0] + cf[3]*X[0];\ + W[2] = cf[0]*X[2] + cf[1]*W[1] + cf[2]*W[0] + cf[3]*X[0];\ + for (i=3; i=0; i--)\ + Y[i] = cf[0]*W[i] + cf[1]*Y[i+1] + cf[2]*Y[i+2] + cf[3]*Y[i+3];\ +} + + // intermediate buffers + sz = MAX2(src->x, src->y); + X = MEM_callocN(sz*sizeof(double), "IIR_gauss X buf"); + Y = MEM_callocN(sz*sizeof(double), "IIR_gauss Y buf"); + W = MEM_callocN(sz*sizeof(double), "IIR_gauss W buf"); + if (xy & 1) { // H + for (y=0; yy; ++y) { + const int yx = y*src->x; + for (x=0; xx; ++x) + X[x] = src->rect[(x + yx)*src->type + chan]; + YVV(src->x); + for (x=0; xx; ++x) + src->rect[(x + yx)*src->type + chan] = Y[x]; + } + } + if (xy & 2) { // V + for (x=0; xx; ++x) { + for (y=0; yy; ++y) + X[y] = src->rect[(x + y*src->x)*src->type + chan]; + YVV(src->y); + for (y=0; yy; ++y) + src->rect[(x + y*src->x)*src->type + chan] = Y[y]; + } + } + + MEM_freeN(X); + MEM_freeN(W); + MEM_freeN(Y); +#undef YVV +} + diff --git a/source/blender/nodes/composite/node_composite_util.h b/source/blender/nodes/composite/node_composite_util.h new file mode 100644 index 00000000000..e3158b2a286 --- /dev/null +++ b/source/blender/nodes/composite/node_composite_util.h @@ -0,0 +1,210 @@ +/* + * $Id: CMP_util.h 35562 2011-03-15 20:10:32Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/node_composite_util.h + * \ingroup nodes + */ + + +#ifndef NODE_COMPOSITE_UTIL_H_ +#define NODE_COMPOSITE_UTIL_H_ + +#include +#include +#include + +#include "MEM_guardedalloc.h" + +#include "DNA_camera_types.h" /* qdn: defocus node, need camera info */ +#include "DNA_color_types.h" +#include "DNA_ID.h" +#include "DNA_image_types.h" +#include "DNA_material_types.h" +#include "DNA_node_types.h" +#include "DNA_object_types.h" +#include "DNA_scene_types.h" +#include "DNA_texture_types.h" + +#include "BLI_math.h" +#include "BLI_blenlib.h" +#include "BLI_rand.h" +#include "BLI_threads.h" +#include "BLI_utildefines.h" +#include "BLI_utildefines.h" + +#include "BKE_blender.h" +#include "BKE_colortools.h" +#include "BKE_global.h" +#include "BKE_image.h" +#include "BKE_main.h" +#include "BKE_material.h" +#include "BKE_node.h" +#include "BKE_texture.h" + +#include "BKE_library.h" +#include "BKE_object.h" + +#include "node_util.h" + +#include "IMB_imbuf_types.h" +#include "IMB_imbuf.h" + +#include "RE_pipeline.h" +#include "RE_shader_ext.h" +#include "RE_render_ext.h" + +/* *************************** operations support *************************** */ + +/* general signal that's in output sockets, and goes over the wires */ +typedef struct CompBuf { + float *rect; + int x, y, xrad, yrad; + short type, malloc; + rcti disprect; /* cropped part of image */ + int xof, yof; /* relative to center of target image */ + + void (*rect_procedural)(struct CompBuf *, float *, float, float); + float procedural_size[3], procedural_offset[3]; + int procedural_type; + bNode *node; /* only in use for procedural bufs */ + + struct CompBuf *next, *prev; /* for pass-on, works nicer than reference counting */ +} CompBuf; + +/* defines also used for pixel size */ +#define CB_RGBA 4 +#define CB_VEC4 4 +#define CB_VEC3 3 +#define CB_VEC2 2 +#define CB_VAL 1 + +/* defines for RGBA channels */ +#define CHAN_R 0 +#define CHAN_G 1 +#define CHAN_B 2 +#define CHAN_A 3 + + + +CompBuf *alloc_compbuf(int sizex, int sizey, int type, int alloc); +CompBuf *dupalloc_compbuf(CompBuf *cbuf); +CompBuf *pass_on_compbuf(CompBuf *cbuf); +void free_compbuf(CompBuf *cbuf); +void print_compbuf(char *str, CompBuf *cbuf); +void compbuf_set_node(struct CompBuf *cbuf, struct bNode *node); +void node_compo_pass_on(struct bNode *node, struct bNodeStack **nsin, struct bNodeStack **nsout); + +CompBuf *get_cropped_compbuf(rcti *drect, float *rectf, int rectx, int recty, int type); +CompBuf *scalefast_compbuf(CompBuf *inbuf, int newx, int newy); +CompBuf *typecheck_compbuf(CompBuf *inbuf, int type); +void typecheck_compbuf_color(float *out, float *in, int outtype, int intype); + +/* **************************************************** */ + +/* Pixel-to-Pixel operation, 1 Image in, 1 out */ +void composit1_pixel_processor(bNode *node, CompBuf *out, CompBuf *src_buf, float *src_col, + void (*func)(bNode *, float *, float *), + int src_type); +/* Pixel-to-Pixel operation, 2 Images in, 1 out */ +void composit2_pixel_processor(bNode *node, CompBuf *out, CompBuf *src_buf, float *src_col, + CompBuf *fac_buf, float *fac, void (*func)(bNode *, float *, float *, float *), + int src_type, int fac_type); + +/* Pixel-to-Pixel operation, 3 Images in, 1 out */ +void composit3_pixel_processor(bNode *node, CompBuf *out, CompBuf *src1_buf, float *src1_col, CompBuf *src2_buf, float *src2_col, + CompBuf *fac_buf, float *fac, void (*func)(bNode *, float *, float *, float *, float *), + int src1_type, int src2_type, int fac_type); + +/* Pixel-to-Pixel operation, 4 Images in, 1 out */ +void composit4_pixel_processor(bNode *node, CompBuf *out, CompBuf *src1_buf, float *src1_col, CompBuf *fac1_buf, float *fac1, + CompBuf *src2_buf, float *src2_col, CompBuf *fac2_buf, float *fac2, + void (*func)(bNode *, float *, float *, float *, float *, float *), + int src1_type, int fac1_type, int src2_type, int fac2_type); + +CompBuf *valbuf_from_rgbabuf(CompBuf *cbuf, int channel); +void generate_preview(void *data, bNode *node, CompBuf *stackbuf); + +void do_copy_rgba(bNode *node, float *out, float *in); +void do_copy_rgb(bNode *node, float *out, float *in); +void do_copy_value(bNode *node, float *out, float *in); +void do_copy_a_rgba(bNode *node, float *out, float *in, float *fac); + +void do_rgba_to_yuva(bNode *node, float *out, float *in); +void do_rgba_to_hsva(bNode *node, float *out, float *in); +void do_rgba_to_ycca(bNode *node, float *out, float *in); +void do_yuva_to_rgba(bNode *node, float *out, float *in); +void do_hsva_to_rgba(bNode *node, float *out, float *in); +void do_ycca_to_rgba(bNode *node, float *out, float *in); + +void gamma_correct_compbuf(CompBuf *img, int inversed); +void premul_compbuf(CompBuf *img, int inversed); +void convolve(CompBuf* dst, CompBuf* in1, CompBuf* in2); + +extern void node_ID_title_cb(void *node_v, void *unused_v); + + +/* utility functions used by glare, tonemap and lens distortion */ +/* soms macros for color handling */ +typedef float fRGB[4]; +/* clear color */ +#define fRGB_clear(c) { c[0]=c[1]=c[2]=0.f; } +/* copy c2 to c1 */ +#define fRGB_copy(c1, c2) { c1[0]=c2[0]; c1[1]=c2[1]; c1[2]=c2[2]; c1[3]=c2[3]; } +/* add c2 to c1 */ +#define fRGB_add(c1, c2) { c1[0]+=c2[0]; c1[1]+=c2[1]; c1[2]+=c2[2]; } +/* subtract c2 from c1 */ +#define fRGB_sub(c1, c2) { c1[0]-=c2[0]; c1[1]-=c2[1]; c1[2]-=c2[2]; } +/* multiply c by float value s */ +#define fRGB_mult(c, s) { c[0]*=s; c[1]*=s; c[2]*=s; } +/* multiply c2 by s and add to c1 */ +#define fRGB_madd(c1, c2, s) { c1[0]+=c2[0]*s; c1[1]+=c2[1]*s; c1[2]+=c2[2]*s; } +/* multiply c2 by color c1 */ +#define fRGB_colormult(c, cs) { c[0]*=cs[0]; c[1]*=cs[1]; c[2]*=cs[2]; } +/* multiply c2 by color c3 and add to c1 */ +#define fRGB_colormadd(c1, c2, c3) { c1[0]+=c2[0]*c3[0]; c1[1]+=c2[1]*c3[1]; c1[2]+=c2[2]*c3[2]; } +/* multiply c2 by color rgb, rgb as separate arguments */ +#define fRGB_rgbmult(c, r, g, b) { c[0]*=(r); c[1]*=(g); c[2]*=(b); } +/* swap colors c1 & c2 */ +#define fRGB_swap(c1, c2) { float _t=c1[0]; c1[0]=c2[0]; c2[0]=_t;\ + _t=c1[1]; c1[1]=c2[1]; c2[1]=_t;\ + _t=c1[2]; c1[2]=c2[2]; c2[2]=_t;\ + _t=c1[3]; c1[3]=c2[3]; c3[3]=_t;} + +void qd_getPixel(CompBuf* src, int x, int y, float* col); +void qd_setPixel(CompBuf* src, int x, int y, float* col); +void qd_addPixel(CompBuf* src, int x, int y, float* col); +void qd_multPixel(CompBuf* src, int x, int y, float f); +void qd_getPixelLerpWrap(CompBuf* src, float u, float v, float* col); +void qd_getPixelLerp(CompBuf* src, float u, float v, float* col); +void qd_getPixelLerpChan(CompBuf* src, float u, float v, int chan, float* out); +CompBuf* qd_downScaledCopy(CompBuf* src, int scale); +void IIR_gauss(CompBuf* src, float sigma, int chan, int xy); +/* end utility funcs */ + +#endif diff --git a/source/blender/nodes/composite/nodes/node_composite_alphaOver.c b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c new file mode 100644 index 00000000000..400bdd92b6f --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c @@ -0,0 +1,163 @@ +/* + * $Id: CMP_alphaOver.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_alphaOver.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** ALPHAOVER ******************** */ +static bNodeSocketTemplate cmp_node_alphaover_in[]= { + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_alphaover_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_alphaover_premul(bNode *UNUSED(node), float *out, float *src, float *over, float *fac) +{ + + if(over[3]<=0.0f) { + QUATCOPY(out, src); + } + else if(fac[0]==1.0f && over[3]>=1.0f) { + QUATCOPY(out, over); + } + else { + float mul= 1.0f - fac[0]*over[3]; + + out[0]= (mul*src[0]) + fac[0]*over[0]; + out[1]= (mul*src[1]) + fac[0]*over[1]; + out[2]= (mul*src[2]) + fac[0]*over[2]; + out[3]= (mul*src[3]) + fac[0]*over[3]; + } +} + +/* result will be still premul, but the over part is premulled */ +static void do_alphaover_key(bNode *UNUSED(node), float *out, float *src, float *over, float *fac) +{ + + if(over[3]<=0.0f) { + QUATCOPY(out, src); + } + else if(fac[0]==1.0f && over[3]>=1.0f) { + QUATCOPY(out, over); + } + else { + float premul= fac[0]*over[3]; + float mul= 1.0f - premul; + + out[0]= (mul*src[0]) + premul*over[0]; + out[1]= (mul*src[1]) + premul*over[1]; + out[2]= (mul*src[2]) + premul*over[2]; + out[3]= (mul*src[3]) + fac[0]*over[3]; + } +} + +/* result will be still premul, but the over part is premulled */ +static void do_alphaover_mixed(bNode *node, float *out, float *src, float *over, float *fac) +{ + + if(over[3]<=0.0f) { + QUATCOPY(out, src); + } + else if(fac[0]==1.0f && over[3]>=1.0f) { + QUATCOPY(out, over); + } + else { + NodeTwoFloats *ntf= node->storage; + float addfac= 1.0f - ntf->x + over[3]*ntf->x; + float premul= fac[0]*addfac; + float mul= 1.0f - fac[0]*over[3]; + + out[0]= (mul*src[0]) + premul*over[0]; + out[1]= (mul*src[1]) + premul*over[1]; + out[2]= (mul*src[2]) + premul*over[2]; + out[3]= (mul*src[3]) + fac[0]*over[3]; + } +} + + + + +static void node_composit_exec_alphaover(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: col col */ + /* stack order out: col */ + if(out[0]->hasoutput==0) + return; + + /* input no image? then only color operation */ + if(in[1]->data==NULL && in[2]->data==NULL) { + do_alphaover_premul(node, out[0]->vec, in[1]->vec, in[2]->vec, in[0]->vec); + } + else { + /* make output size of input image */ + CompBuf *cbuf= in[1]->data?in[1]->data:in[2]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + NodeTwoFloats *ntf= node->storage; + + if(ntf->x != 0.0f) + composit3_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, in[0]->data, in[0]->vec, do_alphaover_mixed, CB_RGBA, CB_RGBA, CB_VAL); + else if(node->custom1) + composit3_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, in[0]->data, in[0]->vec, do_alphaover_key, CB_RGBA, CB_RGBA, CB_VAL); + else + composit3_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, in[0]->data, in[0]->vec, do_alphaover_premul, CB_RGBA, CB_RGBA, CB_VAL); + + out[0]->data= stackbuf; + } +} + +static void node_alphaover_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats"); +} + +void register_node_type_cmp_alphaover(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_ALPHAOVER, "AlphaOver", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_alphaover_in, cmp_node_alphaover_out); + node_type_size(&ntype, 80, 40, 120); + node_type_init(&ntype, node_alphaover_init); + node_type_storage(&ntype, "NodeTwoFloats", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_alphaover); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c new file mode 100644 index 00000000000..e7a9ee12ca1 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c @@ -0,0 +1,271 @@ +/* + * + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Vilem Novak + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_bilateralblur.c + * \ingroup cmpnodes + */ + +#include "node_composite_util.h" + +/* **************** BILATERALBLUR ******************** */ +static bNodeSocketTemplate cmp_node_bilateralblur_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_RGBA, 1, "Determinator", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_bilateralblur_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +#define INIT_C3\ + mean0 = 1; mean1[0] = src[0];mean1[1] = src[1];mean1[2] = src[2];mean1[3] = src[3]; + +/* finds color distances */ +#define COLOR_DISTANCE_C3(c1, c2)\ + ((c1[0] - c2[0])*(c1[0] - c2[0]) + \ + (c1[1] - c2[1])*(c1[1] - c2[1]) + \ + (c1[2] - c2[2])*(c1[2] - c2[2]) + \ + (c1[3] - c2[3])*(c1[3] - c2[3])) + +/* this is the main kernel function for comparing color distances + and adding them weighted to the final color */ +#define KERNEL_ELEMENT_C3(k)\ + temp_color = src + deltas[k];\ + ref_color = ref + deltas[k];\ + w = weight_tab[k] + COLOR_DISTANCE_C3(ref, ref_color )*i2sigma_color;\ + w = 1./(w*w + 1); \ + mean0 += w;\ + mean1[0] += temp_color[0]*w; \ + mean1[1] += temp_color[1]*w; \ + mean1[2] += temp_color[2]*w; \ + mean1[3] += temp_color[3]*w; + +/* write blurred values to image */ +#define UPDATE_OUTPUT_C3\ + mean0 = 1./mean0;\ + dest[x*pix + 0] = mean1[0]*mean0; \ + dest[x*pix + 1] = mean1[1]*mean0; \ + dest[x*pix + 2] = mean1[2]*mean0; \ + dest[x*pix + 3] = mean1[3]*mean0; + +/* initializes deltas for fast access to neighbour pixels */ +#define INIT_3X3_DELTAS( deltas, step, nch ) \ + ((deltas)[0] = (nch), (deltas)[1] = -(step) + (nch), \ + (deltas)[2] = -(step), (deltas)[3] = -(step) - (nch), \ + (deltas)[4] = -(nch), (deltas)[5] = (step) - (nch), \ + (deltas)[6] = (step), (deltas)[7] = (step) + (nch)); + + +/* code of this node was heavily inspired by the smooth function of opencv library. +The main change is an optional image input */ +static void node_composit_exec_bilateralblur(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + NodeBilateralBlurData *nbbd= node->storage; + CompBuf *new, *source, *img= in[0]->data , *refimg= in[1]->data; + double mean0, w, i2sigma_color, i2sigma_space; + double mean1[4]; + double weight_tab[8]; + float *src, *dest, *ref, *temp_color, *ref_color; + float sigma_color, sigma_space; + int imgx, imgy, x, y, pix, i, step; + int deltas[8]; + short found_determinator= 0; + + if(img == NULL || out[0]->hasoutput == 0) + return; + + if(img->type != CB_RGBA) { + img= typecheck_compbuf(in[0]->data, CB_RGBA); + } + + imgx= img->x; + imgy= img->y; + pix= img->type; + step= pix * imgx; + + if(refimg) { + if(refimg->x == imgx && refimg->y == imgy) { + if(ELEM3(refimg->type, CB_VAL, CB_VEC2, CB_VEC3)) { + refimg= typecheck_compbuf(in[1]->data, CB_RGBA); + found_determinator= 1; + } + } + } + else { + refimg= img; + } + + /* allocs */ + source= dupalloc_compbuf(img); + new= alloc_compbuf(imgx, imgy, pix, 1); + + /* accept image offsets from other nodes */ + new->xof= img->xof; + new->yof= img->yof; + + /* bilateral code properties */ + sigma_color= nbbd->sigma_color; + sigma_space= nbbd->sigma_space; + + i2sigma_color= 1. / (sigma_color * sigma_color); + i2sigma_space= 1. / (sigma_space * sigma_space); + + INIT_3X3_DELTAS(deltas, step, pix); + + weight_tab[0] = weight_tab[2] = weight_tab[4] = weight_tab[6] = i2sigma_space; + weight_tab[1] = weight_tab[3] = weight_tab[5] = weight_tab[7] = i2sigma_space * 2; + + /* iterations */ + for(i= 0; i < nbbd->iter; i++) { + src= source->rect; + ref= refimg->rect; + dest= new->rect; + /*goes through image, there are more loops for 1st/last line and all other lines*/ + /*kernel element accumulates surrounding colors, which are then written with the update_output function*/ + for(x= 0; x < imgx; x++, src+= pix, ref+= pix) { + INIT_C3; + + KERNEL_ELEMENT_C3(6); + + if(x > 0) { + KERNEL_ELEMENT_C3(5); + KERNEL_ELEMENT_C3(4); + } + + if(x < imgx - 1) { + KERNEL_ELEMENT_C3(7); + KERNEL_ELEMENT_C3(0); + } + + UPDATE_OUTPUT_C3; + } + + dest+= step; + + for(y= 1; y < imgy - 1; y++, dest+= step, src+= pix, ref+= pix) { + x= 0; + + INIT_C3; + + KERNEL_ELEMENT_C3(0); + KERNEL_ELEMENT_C3(1); + KERNEL_ELEMENT_C3(2); + KERNEL_ELEMENT_C3(6); + KERNEL_ELEMENT_C3(7); + + UPDATE_OUTPUT_C3; + + src+= pix; + ref+= pix; + + for(x= 1; x < imgx - 1; x++, src+= pix, ref+= pix) { + INIT_C3; + + KERNEL_ELEMENT_C3(0); + KERNEL_ELEMENT_C3(1); + KERNEL_ELEMENT_C3(2); + KERNEL_ELEMENT_C3(3); + KERNEL_ELEMENT_C3(4); + KERNEL_ELEMENT_C3(5); + KERNEL_ELEMENT_C3(6); + KERNEL_ELEMENT_C3(7); + + UPDATE_OUTPUT_C3; + } + + INIT_C3; + + KERNEL_ELEMENT_C3(2); + KERNEL_ELEMENT_C3(3); + KERNEL_ELEMENT_C3(4); + KERNEL_ELEMENT_C3(5); + KERNEL_ELEMENT_C3(6); + + UPDATE_OUTPUT_C3; + } + + for(x= 0; x < imgx; x++, src+= pix, ref+= pix) { + INIT_C3; + + KERNEL_ELEMENT_C3(2); + + if(x > 0) { + KERNEL_ELEMENT_C3(3); + KERNEL_ELEMENT_C3(4); + } + if(x < imgx - 1) { + KERNEL_ELEMENT_C3(1); + KERNEL_ELEMENT_C3(0); + } + + UPDATE_OUTPUT_C3; + } + + if(node->exec & NODE_BREAK) break; + + SWAP(CompBuf, *source, *new); + } + + if(img != in[0]->data) + free_compbuf(img); + + if(found_determinator == 1) { + if(refimg != in[1]->data) + free_compbuf(refimg); + } + + out[0]->data= source; + + free_compbuf(new); +} + +static void node_composit_init_bilateralblur(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeBilateralBlurData *nbbd= MEM_callocN(sizeof(NodeBilateralBlurData), "node bilateral blur data"); + node->storage= nbbd; + nbbd->sigma_color= 0.3; + nbbd->sigma_space= 5.0; +} + +void register_node_type_cmp_bilateralblur(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_BILATERALBLUR, "Bilateral Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_bilateralblur_in, cmp_node_bilateralblur_out); + node_type_size(&ntype, 150, 120, 200); + node_type_init(&ntype, node_composit_init_bilateralblur); + node_type_storage(&ntype, "NodeBilateralBlurData", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_bilateralblur); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_blur.c b/source/blender/nodes/composite/nodes/node_composite_blur.c new file mode 100644 index 00000000000..7b1a9623845 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_blur.c @@ -0,0 +1,736 @@ +/* + * $Id: CMP_blur.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Campbell Barton, Alfredo de Greef, David Millan Escriva, + * Juho Vepsäläinen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_blur.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** BLUR ******************** */ +static bNodeSocketTemplate cmp_node_blur_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Size", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_blur_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static float *make_gausstab(int filtertype, int rad) +{ + float *gausstab, sum, val; + int i, n; + + n = 2 * rad + 1; + + gausstab = (float *) MEM_mallocN(n * sizeof(float), "gauss"); + + sum = 0.0f; + for (i = -rad; i <= rad; i++) { + val= RE_filter_value(filtertype, (float)i/(float)rad); + sum += val; + gausstab[i+rad] = val; + } + + sum= 1.0f/sum; + for(i=0; istorage; + CompBuf *work; + register float sum, val; + float rval, gval, bval, aval; + float *gausstab, *gausstabcent; + int rad, imgx= img->x, imgy= img->y; + int x, y, pix= img->type; + int i, bigstep; + float *src, *dest; + + /* helper image */ + work= alloc_compbuf(imgx, imgy, img->type, 1); /* allocs */ + + /* horizontal */ + if(nbd->sizex == 0) { + memcpy(work->rect, img->rect, sizeof(float) * img->type * imgx * imgy); + } + else { + rad = scale*(float)nbd->sizex; + if(rad>imgx/2) + rad= imgx/2; + else if(rad<1) + rad= 1; + + gausstab= make_gausstab(nbd->filtertype, rad); + gausstabcent= gausstab+rad; + + for (y = 0; y < imgy; y++) { + float *srcd= img->rect + pix*(y*img->x); + + dest = work->rect + pix*(y * img->x); + + for (x = 0; x < imgx ; x++) { + int minr= x-rad<0?-x:-rad; + int maxr= x+rad>imgx?imgx-x:rad; + + src= srcd + pix*(x+minr); + + sum= gval = rval= bval= aval= 0.0f; + for (i= minr; i < maxr; i++) { + val= gausstabcent[i]; + sum+= val; + rval += val * (*src++); + if(pix==4) { + gval += val * (*src++); + bval += val * (*src++); + aval += val * (*src++); + } + } + sum= 1.0f/sum; + *dest++ = rval*sum; + if(pix==4) { + *dest++ = gval*sum; + *dest++ = bval*sum; + *dest++ = aval*sum; + } + } + if(node->exec & NODE_BREAK) + break; + } + + /* vertical */ + MEM_freeN(gausstab); + } + + if(nbd->sizey == 0) { + memcpy(new->rect, work->rect, sizeof(float) * img->type * imgx * imgy); + } + else { + rad = scale*(float)nbd->sizey; + if(rad>imgy/2) + rad= imgy/2; + else if(rad<1) + rad= 1; + + gausstab= make_gausstab(nbd->filtertype, rad); + gausstabcent= gausstab+rad; + + bigstep = pix*imgx; + for (x = 0; x < imgx; x++) { + float *srcd= work->rect + pix*x; + + dest = new->rect + pix*x; + + for (y = 0; y < imgy ; y++) { + int minr= y-rad<0?-y:-rad; + int maxr= y+rad>imgy?imgy-y:rad; + + src= srcd + bigstep*(y+minr); + + sum= gval = rval= bval= aval= 0.0f; + for (i= minr; i < maxr; i++) { + val= gausstabcent[i]; + sum+= val; + rval += val * src[0]; + if(pix==4) { + gval += val * src[1]; + bval += val * src[2]; + aval += val * src[3]; + } + src += bigstep; + } + sum= 1.0f/sum; + dest[0] = rval*sum; + if(pix==4) { + dest[1] = gval*sum; + dest[2] = bval*sum; + dest[3] = aval*sum; + } + dest+= bigstep; + } + if(node->exec & NODE_BREAK) + break; + } + MEM_freeN(gausstab); + } + + free_compbuf(work); +} + +/* reference has to be mapped 0-1, and equal in size */ +static void bloom_with_reference(CompBuf *new, CompBuf *img, CompBuf *UNUSED(ref), float UNUSED(fac), NodeBlurData *nbd) +{ + CompBuf *wbuf; + register float val; + float radxf, radyf; + float **maintabs; + float *gausstabx, *gausstabcenty; + float *gausstaby, *gausstabcentx; + int radx, rady, imgx= img->x, imgy= img->y; + int x, y; + int i, j; + float *src, *dest, *wb; + + wbuf= alloc_compbuf(imgx, imgy, CB_VAL, 1); + + /* horizontal */ + radx = (float)nbd->sizex; + if(radx>imgx/2) + radx= imgx/2; + else if(radx<1) + radx= 1; + + /* vertical */ + rady = (float)nbd->sizey; + if(rady>imgy/2) + rady= imgy/2; + else if(rady<1) + rady= 1; + + x= MAX2(radx, rady); + maintabs= MEM_mallocN(x*sizeof(void *), "gauss array"); + for(i= 0; irect; + src= img->rect; + + radxf= (float)radx; + radyf= (float)rady; + + for (y = 0; y < imgy; y++) { + for (x = 0; x < imgx ; x++, src+=4) {//, refd++) { + +// int refradx= (int)(refd[0]*radxf); +// int refrady= (int)(refd[0]*radyf); + + int refradx= (int)(radxf*0.3f*src[3]*(src[0]+src[1]+src[2])); + int refrady= (int)(radyf*0.3f*src[3]*(src[0]+src[1]+src[2])); + + if(refradx>radx) refradx= radx; + else if(refradx<1) refradx= 1; + if(refrady>rady) refrady= rady; + else if(refrady<1) refrady= 1; + + if(refradx==1 && refrady==1) { + wb= wbuf->rect + ( y*imgx + x); + dest= new->rect + 4*( y*imgx + x); + wb[0]+= 1.0f; + dest[0] += src[0]; + dest[1] += src[1]; + dest[2] += src[2]; + dest[3] += src[3]; + } + else { + int minxr= x-refradx<0?-x:-refradx; + int maxxr= x+refradx>imgx?imgx-x:refradx; + int minyr= y-refrady<0?-y:-refrady; + int maxyr= y+refrady>imgy?imgy-y:refrady; + + float *destd= new->rect + 4*( (y + minyr)*imgx + x + minxr); + float *wbufd= wbuf->rect + ( (y + minyr)*imgx + x + minxr); + + gausstabx= maintabs[refradx-1]; + gausstabcentx= gausstabx+refradx; + gausstaby= maintabs[refrady-1]; + gausstabcenty= gausstaby+refrady; + + for (i= minyr; i < maxyr; i++, destd+= 4*imgx, wbufd+= imgx) { + dest= destd; + wb= wbufd; + for (j= minxr; j < maxxr; j++, dest+=4, wb++) { + + val= gausstabcenty[i]*gausstabcentx[j]; + wb[0]+= val; + dest[0] += val * src[0]; + dest[1] += val * src[1]; + dest[2] += val * src[2]; + dest[3] += val * src[3]; + } + } + } + } + } + + x= imgx*imgy; + dest= new->rect; + wb= wbuf->rect; + while(x--) { + val= 1.0f/wb[0]; + dest[0]*= val; + dest[1]*= val; + dest[2]*= val; + dest[3]*= val; + wb++; + dest+= 4; + } + + free_compbuf(wbuf); + + x= MAX2(radx, rady); + for(i= 0; i0.33f) { + fj= (fj-0.33f)/0.66f; + if(fi+fj>1.0f) + return 0.0f; + else + return 1.0f; + } + else return 1.0f; +} +#endif + +/* uses full filter, no horizontal/vertical optimize possible */ +/* both images same type, either 1 or 4 channels */ +static void bokeh_single_image(bNode *node, CompBuf *new, CompBuf *img, float fac) +{ + NodeBlurData *nbd= node->storage; + register float val; + float radxf, radyf; + float *gausstab, *dgauss; + int radx, rady, imgx= img->x, imgy= img->y; + int x, y, pix= img->type; + int i, j, n; + float *src= NULL, *dest, *srcd= NULL; + + /* horizontal */ + radxf = fac*(float)nbd->sizex; + if(radxf>imgx/2.0f) + radxf= imgx/2.0f; + else if(radxf<1.0f) + radxf= 1.0f; + + /* vertical */ + radyf = fac*(float)nbd->sizey; + if(radyf>imgy/2.0f) + radyf= imgy/2.0f; + else if(radyf<1.0f) + radyf= 1.0f; + + radx= ceil(radxf); + rady= ceil(radyf); + + n = (2*radx+1)*(2*rady+1); + + /* create a full filter image */ + gausstab= MEM_mallocN(sizeof(float)*n, "filter tab"); + dgauss= gausstab; + val= 0.0f; + for(j=-rady; j<=rady; j++) { + for(i=-radx; i<=radx; i++, dgauss++) { + float fj= (float)j/radyf; + float fi= (float)i/radxf; + float dist= sqrt(fj*fj + fi*fi); + + //*dgauss= hexagon_filter(fi, fj); + *dgauss= RE_filter_value(nbd->filtertype, dist); + + val+= *dgauss; + } + } + + if(val!=0.0f) { + val= 1.0f/val; + for(j= n -1; j>=0; j--) + gausstab[j]*= val; + } + else gausstab[4]= 1.0f; + + for (y = -rady+1; y < imgy+rady-1; y++) { + + if(y<=0) srcd= img->rect; + else if(yrect + pix*(imgy-1)*imgx; + + for (x = -radx+1; x < imgx+radx-1 ; x++) { + int minxr= x-radx<0?-x:-radx; + int maxxr= x+radx>=imgx?imgx-x-1:radx; + int minyr= y-rady<0?-y:-rady; + int maxyr= y+rady>imgy-1?imgy-y-1:rady; + + float *destd= new->rect + pix*( (y + minyr)*imgx + x + minxr); + float *dgausd= gausstab + (minyr+rady)*(2*radx+1) + minxr+radx; + + if(x<=0) src= srcd; + else if(x1) { + dest[1] += val * src[1]; + dest[2] += val * src[2]; + dest[3] += val * src[3]; + } + } + } + } + } + if(node->exec & NODE_BREAK) + break; + } + + MEM_freeN(gausstab); +} + + +/* reference has to be mapped 0-1, and equal in size */ +static void blur_with_reference(bNode *node, CompBuf *new, CompBuf *img, CompBuf *ref) +{ + NodeBlurData *nbd= node->storage; + CompBuf *blurbuf, *ref_use; + register float sum, val; + float rval, gval, bval, aval, radxf, radyf; + float **maintabs; + float *gausstabx, *gausstabcenty; + float *gausstaby, *gausstabcentx; + int radx, rady, imgx= img->x, imgy= img->y; + int x, y, pix= img->type; + int i, j; + float *src, *dest, *refd, *blurd; + + if(ref->x!=img->x && ref->y!=img->y) + return; + + ref_use= typecheck_compbuf(ref, CB_VAL); + + /* trick is; we blur the reference image... but only works with clipped values*/ + blurbuf= alloc_compbuf(imgx, imgy, CB_VAL, 1); + blurd= blurbuf->rect; + refd= ref_use->rect; + for(x= imgx*imgy; x>0; x--, refd++, blurd++) { + if(refd[0]<0.0f) blurd[0]= 0.0f; + else if(refd[0]>1.0f) blurd[0]= 1.0f; + else blurd[0]= refd[0]; + } + + blur_single_image(node, blurbuf, blurbuf, 1.0f); + + /* horizontal */ + radx = (float)nbd->sizex; + if(radx>imgx/2) + radx= imgx/2; + else if(radx<1) + radx= 1; + + /* vertical */ + rady = (float)nbd->sizey; + if(rady>imgy/2) + rady= imgy/2; + else if(rady<1) + rady= 1; + + x= MAX2(radx, rady); + maintabs= MEM_mallocN(x*sizeof(void *), "gauss array"); + for(i= 0; ifiltertype, i+1); + + refd= blurbuf->rect; + dest= new->rect; + radxf= (float)radx; + radyf= (float)rady; + + for (y = 0; y < imgy; y++) { + for (x = 0; x < imgx ; x++, dest+=pix, refd++) { + int refradx= (int)(refd[0]*radxf); + int refrady= (int)(refd[0]*radyf); + + if(refradx>radx) refradx= radx; + else if(refradx<1) refradx= 1; + if(refrady>rady) refrady= rady; + else if(refrady<1) refrady= 1; + + if(refradx==1 && refrady==1) { + src= img->rect + pix*( y*imgx + x); + if(pix==1) + dest[0]= src[0]; + else + QUATCOPY(dest, src); + } + else { + int minxr= x-refradx<0?-x:-refradx; + int maxxr= x+refradx>imgx?imgx-x:refradx; + int minyr= y-refrady<0?-y:-refrady; + int maxyr= y+refrady>imgy?imgy-y:refrady; + + float *srcd= img->rect + pix*( (y + minyr)*imgx + x + minxr); + + gausstabx= maintabs[refradx-1]; + gausstabcentx= gausstabx+refradx; + gausstaby= maintabs[refrady-1]; + gausstabcenty= gausstaby+refrady; + + sum= gval = rval= bval= aval= 0.0f; + + for (i= minyr; i < maxyr; i++, srcd+= pix*imgx) { + src= srcd; + for (j= minxr; j < maxxr; j++, src+=pix) { + + val= gausstabcenty[i]*gausstabcentx[j]; + sum+= val; + rval += val * src[0]; + if(pix>1) { + gval += val * src[1]; + bval += val * src[2]; + aval += val * src[3]; + } + } + } + sum= 1.0f/sum; + dest[0] = rval*sum; + if(pix>1) { + dest[1] = gval*sum; + dest[2] = bval*sum; + dest[3] = aval*sum; + } + } + } + if(node->exec & NODE_BREAK) + break; + } + + free_compbuf(blurbuf); + + x= MAX2(radx, rady); + for(i= 0; idata; + NodeBlurData *nbd= node->storage; + + if(img==NULL) return; + + /* store image in size that is needed for absolute/relative conversions on ui level */ + nbd->image_in_width= img->x; + nbd->image_in_height= img->y; + + if(out[0]->hasoutput==0) return; + + if(nbd->relative) { + if (nbd->aspect==CMP_NODE_BLUR_ASPECT_NONE) { + nbd->sizex= (int)(nbd->percentx*0.01f*nbd->image_in_width); + nbd->sizey= (int)(nbd->percenty*0.01f*nbd->image_in_height); + } + else if (nbd->aspect==CMP_NODE_BLUR_ASPECT_Y) { + nbd->sizex= (int)(nbd->percentx*0.01f*nbd->image_in_width); + nbd->sizey= (int)(nbd->percenty*0.01f*nbd->image_in_width); + } + else if (nbd->aspect==CMP_NODE_BLUR_ASPECT_X) { + nbd->sizex= (int)(nbd->percentx*0.01f*nbd->image_in_height); + nbd->sizey= (int)(nbd->percenty*0.01f*nbd->image_in_height); + } + } + + if (nbd->sizex==0 && nbd->sizey==0) { + new= pass_on_compbuf(img); + out[0]->data= new; + } + else if (nbd->filtertype == R_FILTER_FAST_GAUSS) { + CompBuf *new, *img = in[0]->data; + // TODO: can this be mapped with reference, too? + const float sx = ((float)nbd->sizex*in[1]->vec[0])/2.0f, sy = ((float)nbd->sizey*in[1]->vec[0])/2.0f; + int c; + + if ((img==NULL) || (out[0]->hasoutput==0)) return; + + if (img->type == CB_VEC2) + new = typecheck_compbuf(img, CB_VAL); + else if (img->type == CB_VEC3) + new = typecheck_compbuf(img, CB_RGBA); + else + new = dupalloc_compbuf(img); + + if ((sx == sy) && (sx > 0.f)) { + for (c=0; ctype; ++c) + IIR_gauss(new, sx, c, 3); + } + else { + if (sx > 0.f) { + for (c=0; ctype; ++c) + IIR_gauss(new, sx, c, 1); + } + if (sy > 0.f) { + for (c=0; ctype; ++c) + IIR_gauss(new, sy, c, 2); + } + } + out[0]->data = new; + + } else { + /* All non fast gauss blur methods */ + if(img->type==CB_VEC2 || img->type==CB_VEC3) { + img= typecheck_compbuf(in[0]->data, CB_RGBA); + } + + /* if fac input, we do it different */ + if(in[1]->data) { + CompBuf *gammabuf; + + /* make output size of input image */ + new= alloc_compbuf(img->x, img->y, img->type, 1); /* allocs */ + + /* accept image offsets from other nodes */ + new->xof = img->xof; + new->yof = img->yof; + + if(nbd->gamma) { + gammabuf= dupalloc_compbuf(img); + gamma_correct_compbuf(gammabuf, 0); + } + else gammabuf= img; + + blur_with_reference(node, new, gammabuf, in[1]->data); + + if(nbd->gamma) { + gamma_correct_compbuf(new, 1); + free_compbuf(gammabuf); + } + if(node->exec & NODE_BREAK) { + free_compbuf(new); + new= NULL; + } + out[0]->data= new; + } + else { + + if(in[1]->vec[0]<=0.001f) { /* time node inputs can be a tiny value */ + new= pass_on_compbuf(img); + } + else { + CompBuf *gammabuf; + + /* make output size of input image */ + new= alloc_compbuf(img->x, img->y, img->type, 1); /* allocs */ + + /* accept image offsets from other nodes */ + new->xof = img->xof; + new->yof = img->yof; + + if(nbd->gamma) { + gammabuf= dupalloc_compbuf(img); + gamma_correct_compbuf(gammabuf, 0); + } + else gammabuf= img; + + if(nbd->bokeh) + bokeh_single_image(node, new, gammabuf, in[1]->vec[0]); + else if(1) + blur_single_image(node, new, gammabuf, in[1]->vec[0]); + else /* bloom experimental... */ + bloom_with_reference(new, gammabuf, NULL, in[1]->vec[0], nbd); + + if(nbd->gamma) { + gamma_correct_compbuf(new, 1); + free_compbuf(gammabuf); + } + if(node->exec & NODE_BREAK) { + free_compbuf(new); + new= NULL; + } + } + out[0]->data= new; + } + if(img!=in[0]->data) + free_compbuf(img); + } + + generate_preview(data, node, out[0]->data); +} + +static void node_composit_init_blur(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= MEM_callocN(sizeof(NodeBlurData), "node blur data"); +} + +void register_node_type_cmp_blur(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_BLUR, "Blur", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_blur_in, cmp_node_blur_out); + node_type_size(&ntype, 120, 80, 200); + node_type_init(&ntype, node_composit_init_blur); + node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_blur); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_brightness.c b/source/blender/nodes/composite/nodes/node_composite_brightness.c new file mode 100644 index 00000000000..1a5cf956a52 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_brightness.c @@ -0,0 +1,110 @@ +/* +* $Id: CMP_brightness.c 36593 2011-05-10 11:19:26Z lukastoenne $ +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* The Original Code is Copyright (C) 2006 Blender Foundation. +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): none yet. +* +* ***** END GPL LICENSE BLOCK ***** + +*/ + +/** \file blender/nodes/composite/nodes/node_composite_brightness.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** Brigh and contrsast ******************** */ + +static bNodeSocketTemplate cmp_node_brightcontrast_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Bright", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Contrast", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_brightcontrast_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_brightnesscontrast(bNode *UNUSED(node), float *out, float *in, float *in_brightness, float *in_contrast) +{ + float i; + int c; + float a, b, v; + float brightness = (*in_brightness) / 100.0f; + float contrast = *in_contrast; + float delta = contrast / 200.0f; + a = 1.0f - delta * 2.0f; + /* + * The algorithm is by Werner D. Streidt + * (http://visca.com/ffactory/archives/5-99/msg00021.html) + * Extracted of OpenCV demhist.c + */ + if( contrast > 0 ) +{ + a = 1.0f / a; + b = a * (brightness - delta); + } + else + { + delta *= -1; + b = a * (brightness + delta); + } + + for(c=0; c<3; c++){ + i = in[c]; + v = a*i + b; + out[c] = v; + } +} + +static void node_composit_exec_brightcontrast(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + if(out[0]->hasoutput==0) + return; + + if(in[0]->data) { + CompBuf *stackbuf, *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); + stackbuf= dupalloc_compbuf(cbuf); + composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, do_brightnesscontrast, CB_RGBA, CB_VAL, CB_VAL); + out[0]->data = stackbuf; + if(cbuf != in[0]->data) + free_compbuf(cbuf); + } +} + +void register_node_type_cmp_brightcontrast(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_brightcontrast_in, cmp_node_brightcontrast_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_brightcontrast); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c new file mode 100644 index 00000000000..afdbe82aebc --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c @@ -0,0 +1,217 @@ +/* + * $Id: CMP_channelMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Bob Holcomb + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_channelMatte.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* ******************* Channel Matte Node ********************************* */ +static bNodeSocketTemplate cmp_node_channel_matte_in[]={ + {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f}, + {-1,0,""} +}; + +static bNodeSocketTemplate cmp_node_channel_matte_out[]={ + {SOCK_RGBA,0,"Image"}, + {SOCK_FLOAT,0,"Matte"}, + {-1,0,""} +}; + +static void do_normalized_rgba_to_ycca2(bNode *UNUSED(node), float *out, float *in) +{ + /*normalize to the range 0.0 to 1.0) */ + rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); + out[0]=(out[0])/255.0; + out[1]=(out[1])/255.0; + out[2]=(out[2])/255.0; + out[3]=in[3]; +} + +static void do_normalized_ycca_to_rgba2(bNode *UNUSED(node), float *out, float *in) +{ + /*un-normalize the normalize from above */ + in[0]=in[0]*255.0; + in[1]=in[1]*255.0; + in[2]=in[2]*255.0; + ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); + out[3]=in[3]; +} + + +static void do_channel_matte(bNode *node, float *out, float *in) +{ + NodeChroma *c=(NodeChroma *)node->storage; + float alpha=0.0; + + switch(c->algorithm) { + case 0: { /* Alpha=key_channel-limit channel */ + int key_channel=node->custom2-1; + int limit_channel=c->channel-1; + alpha=in[key_channel]-in[limit_channel]; + break; + } + case 1: { /* Alpha=G-MAX(R, B) */ + switch(node->custom2) { + case 1: { + alpha=in[0]-MAX2(in[1],in[2]); + break; + } + case 2: { + alpha=in[1]-MAX2(in[0],in[2]); + break; + } + case 3: { + alpha=in[2]-MAX2(in[0],in[1]); + break; + } + default: + break; + } + break; + } + default: + break; + } + + /*flip because 0.0 is transparent, not 1.0*/ + alpha=1-alpha; + + /* test range*/ + if(alpha>c->t1) { + alpha=in[3]; /*whatever it was prior */ + } + else if(alphat2){ + alpha=0.0; + } + else {/*blend */ + alpha=(alpha-c->t2)/(c->t1-c->t2); + } + + + /* don't make something that was more transparent less transparent */ + if (alphahasinput==0) return; + if(in[0]->data==NULL) return; + if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; + + cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); + + outbuf=dupalloc_compbuf(cbuf); + + /*convert to colorspace*/ + switch(node->custom1) { + case CMP_NODE_CHANNEL_MATTE_CS_RGB: + break; + case CMP_NODE_CHANNEL_MATTE_CS_HSV: /*HSV*/ + composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_hsva, CB_RGBA); + break; + case CMP_NODE_CHANNEL_MATTE_CS_YUV: /*YUV*/ + composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_yuva, CB_RGBA); + break; + case CMP_NODE_CHANNEL_MATTE_CS_YCC: /*YCC*/ + composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_normalized_rgba_to_ycca2, CB_RGBA); + break; + default: + break; + } + + /*use the selected channel information to do the key */ + composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_channel_matte, CB_RGBA); + + /*convert back to RGB colorspace in place*/ + switch(node->custom1) { + case CMP_NODE_CHANNEL_MATTE_CS_RGB: /*RGB*/ + break; + case CMP_NODE_CHANNEL_MATTE_CS_HSV: /*HSV*/ + composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_hsva_to_rgba, CB_RGBA); + break; + case CMP_NODE_CHANNEL_MATTE_CS_YUV: /*YUV*/ + composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_yuva_to_rgba, CB_RGBA); + break; + case CMP_NODE_CHANNEL_MATTE_CS_YCC: /*YCC*/ + composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_normalized_ycca_to_rgba2, CB_RGBA); + break; + default: + break; + } + + generate_preview(data, node, outbuf); + out[0]->data=outbuf; + if(out[1]->hasoutput) + out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A); + + if(cbuf!=in[0]->data) + free_compbuf(cbuf); + +} + +static void node_composit_init_channel_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); + node->storage=c; + c->t1= 1.0f; + c->t2= 0.0f; + c->t3= 0.0f; + c->fsize= 0.0f; + c->fstrength= 0.0f; + c->algorithm=1; /*max channel limiting */ + c->channel=1; /* limit by red */ + node->custom1= 1; /* RGB channel */ + node->custom2= 2; /* Green Channel */ +} + +void register_node_type_cmp_channel_matte(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_CHANNEL_MATTE, "Channel Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_channel_matte_in, cmp_node_channel_matte_out); + node_type_size(&ntype, 200, 80, 250); + node_type_init(&ntype, node_composit_init_channel_matte); + node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_channel_matte); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c new file mode 100644 index 00000000000..db5e6d93856 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c @@ -0,0 +1,207 @@ +/* + * $Id: CMP_chromaMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_chromaMatte.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* ******************* Chroma Key ********************************************************** */ +static bNodeSocketTemplate cmp_node_chroma_in[]={ + {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f}, + {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f}, + {-1,0,""} +}; + +static bNodeSocketTemplate cmp_node_chroma_out[]={ + {SOCK_RGBA,0,"Image"}, + {SOCK_FLOAT,0,"Matte"}, + {-1,0,""} +}; + +static void do_rgba_to_ycca_normalized(bNode *UNUSED(node), float *out, float *in) +{ + rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); + + //normalize to 0..1.0 + out[0]=out[0]/255.0; + out[1]=out[1]/255.0; + out[2]=out[2]/255.0; + + //rescale to -1.0..1.0 + out[0]=(out[0]*2.0)-1.0; + out[1]=(out[1]*2.0)-1.0; + out[2]=(out[2]*2.0)-1.0; + +// out[0]=((out[0])-16)/255.0; +// out[1]=((out[1])-128)/255.0; +// out[2]=((out[2])-128)/255.0; + out[3]=in[3]; +} + +static void do_ycca_to_rgba_normalized(bNode *UNUSED(node), float *out, float *in) +{ + /*un-normalize the normalize from above */ + in[0]=(in[0]+1.0)/2.0; + in[1]=(in[1]+1.0)/2.0; + in[2]=(in[2]+1.0)/2.0; + + in[0]=(in[0]*255.0); + in[1]=(in[1]*255.0); + in[2]=(in[2]*255.0); + + // in[0]=(in[0]*255.0)+16; +// in[1]=(in[1]*255.0)+128; +// in[2]=(in[2]*255.0)+128; + ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); + out[3]=in[3]; +} + +static void do_chroma_key(bNode *node, float *out, float *in) +{ + NodeChroma *c; + float x, z, alpha; + float theta, beta, angle, angle2; + float kfg; + + c=node->storage; + + /* Algorithm from book "Video Demistified," does not include the spill reduction part */ + + /* find theta, the angle that the color space should be rotated based on key*/ + theta=atan2(c->key[2], c->key[1]); + + /*rotate the cb and cr into x/z space */ + x=in[1]*cos(theta)+in[2]*sin(theta); + z=in[2]*cos(theta)-in[1]*sin(theta); + + /*if within the acceptance angle */ + angle=c->t1*M_PI/180.0; /* convert to radians */ + + /* if kfg is <0 then the pixel is outside of the key color */ + kfg=x-(fabs(z)/tan(angle/2.0)); + + out[0]=in[0]; + out[1]=in[1]; + out[2]=in[2]; + + if(kfg>0.0) { /* found a pixel that is within key color */ + alpha=(1.0-kfg)*(c->fstrength); + + beta=atan2(z,x); + angle2=c->t2*M_PI/180.0; + + /* if beta is within the cutoff angle */ + if(fabs(beta)<(angle2/2.0)) { + alpha=0.0; + } + + /* don't make something that was more transparent less transparent */ + if (alphahasinput==0) return; + if(in[0]->data==NULL) return; + if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; + + cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); + + chromabuf= dupalloc_compbuf(cbuf); + + c=node->storage; + + /*convert rgbbuf to normalized chroma space*/ + composit1_pixel_processor(node, chromabuf, cbuf, in[0]->vec, do_rgba_to_ycca_normalized, CB_RGBA); + /*convert key to normalized chroma color space */ + do_rgba_to_ycca_normalized(node, c->key, in[1]->vec); + + /*per pixel chroma key*/ + composit1_pixel_processor(node, chromabuf, chromabuf, in[0]->vec, do_chroma_key, CB_RGBA); + + /*convert back*/ + composit1_pixel_processor(node, chromabuf, chromabuf, in[0]->vec, do_ycca_to_rgba_normalized, CB_RGBA); + + out[0]->data= chromabuf; + if(out[1]->hasoutput) + out[1]->data= valbuf_from_rgbabuf(chromabuf, CHAN_A); + + generate_preview(data, node, chromabuf); + + if(cbuf!=in[0]->data) + free_compbuf(cbuf); +} + + +static void node_composit_init_chroma_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); + node->storage= c; + c->t1= 30.0f; + c->t2= 10.0f; + c->t3= 0.0f; + c->fsize= 0.0f; + c->fstrength= 1.0f; +} + +void register_node_type_cmp_chroma_matte(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_chroma_in, cmp_node_chroma_out); + node_type_size(&ntype, 200, 80, 300); + node_type_init(&ntype, node_composit_init_chroma_matte); + node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_chroma_matte); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_colorMatte.c b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c new file mode 100644 index 00000000000..7f687240daf --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c @@ -0,0 +1,143 @@ +/* + * $Id: CMP_colorMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Bob Holcomb + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_colorMatte.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* ******************* Color Key ********************************************************** */ +static bNodeSocketTemplate cmp_node_color_in[]={ + {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f}, + {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f}, + {-1,0,""} +}; + +static bNodeSocketTemplate cmp_node_color_out[]={ + {SOCK_RGBA,0,"Image"}, + {SOCK_FLOAT,0,"Matte"}, + {-1,0,""} +}; + +static void do_color_key(bNode *node, float *out, float *in) +{ + float h_wrap; + NodeChroma *c; + c=node->storage; + + + VECCOPY(out, in); + + if( + /* do hue last because it needs to wrap, and does some more checks */ + + /* sat */ (fabs(in[1]-c->key[1]) < c->t2) && + /* val */ (fabs(in[2]-c->key[2]) < c->t3) && + + /* multiply by 2 because it wraps on both sides of the hue, + * otherwise 0.5 would key all hue's */ + + /* hue */ ((h_wrap= 2.0f * fabs(in[0]-c->key[0])) < c->t1 || (2.0f - h_wrap) < c->t1) + ) { + out[3]=0.0; /*make transparent*/ + } + + else { /*pixel is outside key color */ + out[3]=in[3]; /* make pixel just as transparent as it was before */ + } +} + +static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf *cbuf; + CompBuf *colorbuf; + NodeChroma *c; + + if(in[0]->hasinput==0) return; + if(in[0]->data==NULL) return; + if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; + + cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); + + colorbuf= dupalloc_compbuf(cbuf); + + c=node->storage; + + /*convert rgbbuf to hsv*/ + composit1_pixel_processor(node, colorbuf, cbuf, in[0]->vec, do_rgba_to_hsva, CB_RGBA); + + /*convert key to hsv*/ + do_rgba_to_hsva(node, c->key, in[1]->vec); + + + /*per pixel color key*/ + composit1_pixel_processor(node, colorbuf, colorbuf, in[0]->vec, do_color_key, CB_RGBA); + + /*convert back*/ + composit1_pixel_processor(node, colorbuf, colorbuf, in[0]->vec, do_hsva_to_rgba, CB_RGBA); + + out[0]->data= colorbuf; + if(out[1]->hasoutput) + out[1]->data= valbuf_from_rgbabuf(colorbuf, CHAN_A); + + generate_preview(data, node, colorbuf); + + if(cbuf!=in[0]->data) + free_compbuf(cbuf); +} + +static void node_composit_init_color_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node color"); + node->storage= c; + c->t1= 0.01f; + c->t2= 0.1f; + c->t3= 0.1f; + c->fsize= 0.0f; + c->fstrength= 1.0f; +} + +void register_node_type_cmp_color_matte(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_COLOR_MATTE, "Color Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_color_in, cmp_node_color_out); + node_type_size(&ntype, 200, 80, 300); + node_type_init(&ntype, node_composit_init_color_matte); + node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_color_matte); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c new file mode 100644 index 00000000000..18b6d806c82 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c @@ -0,0 +1,341 @@ +/* + * $Id: CMP_colorSpill.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Bob Holcomb, Xavier Thomas + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_colorSpill.c + * \ingroup cmpnodes + */ + + + +#include "node_composite_util.h" + +#define avg(a,b) ((a+b)/2) + +/* ******************* Color Spill Supression ********************************* */ +static bNodeSocketTemplate cmp_node_color_spill_in[]={ + {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f}, + {SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + {-1,0,""} +}; + +static bNodeSocketTemplate cmp_node_color_spill_out[]={ + {SOCK_RGBA,0,"Image"}, + {-1,0,""} +}; + +static void do_simple_spillmap_red(bNode *node, float* out, float *in) +{ + NodeColorspill *ncs; + ncs=node->storage; + out[0]=in[0]-( ncs->limscale * in[ncs->limchan] ); +} + +static void do_simple_spillmap_red_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[0]-( ncs->limscale * in[ncs->limchan])); +} + +static void do_simple_spillmap_green(bNode *node, float* out, float *in) +{ + NodeColorspill *ncs; + ncs=node->storage; + out[0]=in[1]-( ncs->limscale * in[ncs->limchan] ); +} + +static void do_simple_spillmap_green_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[1]-( ncs->limscale * in[ncs->limchan])); +} + +static void do_simple_spillmap_blue(bNode *node, float* out, float *in) +{ + NodeColorspill *ncs; + ncs=node->storage; + out[0]=in[2]-( ncs->limscale * in[ncs->limchan] ); +} + +static void do_simple_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[2]-( ncs->limscale * in[ncs->limchan])); +} + +static void do_average_spillmap_red(bNode *node, float* out, float *in) +{ + NodeColorspill *ncs; + ncs=node->storage; + out[0]=in[0]-(ncs->limscale * avg(in[1], in[2]) ); +} + +static void do_average_spillmap_red_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[0]-(ncs->limscale * avg(in[1], in[2]) )); +} + +static void do_average_spillmap_green(bNode *node, float* out, float *in) +{ + NodeColorspill *ncs; + ncs=node->storage; + out[0]=in[1]-(ncs->limscale * avg(in[0], in[2]) ); +} + +static void do_average_spillmap_green_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[2]) )); +} + +static void do_average_spillmap_blue(bNode *node, float* out, float *in) +{ + NodeColorspill *ncs; + ncs=node->storage; + out[0]=in[2]-(ncs->limscale * avg(in[0], in[1]) ); +} + +static void do_average_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorspill *ncs; + ncs=node->storage; + + out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[1]) )); +} + +static void do_apply_spillmap_red(bNode *node, float* out, float *in, float *map) +{ + NodeColorspill *ncs; + ncs=node->storage; + if(map[0]>0) { + out[0]=in[0]-(ncs->uspillr*map[0]); + out[1]=in[1]+(ncs->uspillg*map[0]); + out[2]=in[2]+(ncs->uspillb*map[0]); + } + else { + out[0]=in[0]; + out[1]=in[1]; + out[2]=in[2]; + } +} + +static void do_apply_spillmap_green(bNode *node, float* out, float *in, float *map) +{ + NodeColorspill *ncs; + ncs=node->storage; + if(map[0]>0) { + out[0]=in[0]+(ncs->uspillr*map[0]); + out[1]=in[1]-(ncs->uspillg*map[0]); + out[2]=in[2]+(ncs->uspillb*map[0]); + } + else { + out[0]=in[0]; + out[1]=in[1]; + out[2]=in[2]; + } +} + +static void do_apply_spillmap_blue(bNode *node, float* out, float *in, float *map) +{ + NodeColorspill *ncs; + ncs=node->storage; + if(map[0]>0) { + out[0]=in[0]+(ncs->uspillr*map[0]); + out[1]=in[1]+(ncs->uspillg*map[0]); + out[2]=in[2]-(ncs->uspillb*map[0]); + } + else { + out[0]=in[0]; + out[1]=in[1]; + out[2]=in[2]; + } +} + +static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* Originally based on the information from the book "The Art and Science of Digital Composition" and + * discussions from vfxtalk.com .*/ + CompBuf *cbuf; + CompBuf *mask; + CompBuf *rgbbuf; + CompBuf *spillmap; + NodeColorspill *ncs; + ncs=node->storage; + + /* early out for missing connections */ + if(out[0]->hasoutput==0 ) return; + if(in[0]->hasinput==0) return; + if(in[0]->data==NULL) return; + + cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); + mask=typecheck_compbuf(in[1]->data, CB_VAL); + spillmap=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); + rgbbuf=dupalloc_compbuf(cbuf); + + switch(node->custom1) + { + case 1: /*red spill*/ + { + switch(node->custom2) + { + case 0: /* simple limit */ + { + if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { + composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_red, CB_RGBA); + } else { + composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_red_fac, CB_RGBA, CB_VAL); + } + break; + } + case 1: /* average limit */ + { + if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { + composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_red, CB_RGBA); + } else { + composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_red_fac, CB_RGBA, CB_VAL); + } + break; + } + } + if(ncs->unspill==0) { + ncs->uspillr=1.0f; + ncs->uspillg=0.0f; + ncs->uspillb=0.0f; + } + composit2_pixel_processor(node, rgbbuf, cbuf, in[0]->vec, spillmap, NULL, do_apply_spillmap_red, CB_RGBA, CB_VAL); + break; + } + case 2: /*green spill*/ + { + switch(node->custom2) + { + case 0: /* simple limit */ + { + if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { + composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_green, CB_RGBA); + } else { + composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_green_fac, CB_RGBA, CB_VAL); + } + break; + } + case 1: /* average limit */ + { + if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { + composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_green, CB_RGBA); + } else { + composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_green_fac, CB_RGBA, CB_VAL); + } + break; + } + } + if(ncs->unspill==0) { + ncs->uspillr=0.0f; + ncs->uspillg=1.0f; + ncs->uspillb=0.0f; + } + composit2_pixel_processor(node, rgbbuf, cbuf, in[0]->vec, spillmap, NULL, do_apply_spillmap_green, CB_RGBA, CB_VAL); + break; + } + case 3: /*blue spill*/ + { + switch(node->custom2) + { + case 0: /* simple limit */ + { + if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { + composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_blue, CB_RGBA); + } else { + composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_blue_fac, CB_RGBA, CB_VAL); + } + break; + } + case 1: /* average limit */ + { + if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { + composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_blue, CB_RGBA); + } else { + composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_blue_fac, CB_RGBA, CB_VAL); + } + break; + } + } + if(ncs->unspill==0) { + ncs->uspillr=0.0f; + ncs->uspillg=0.0f; + ncs->uspillb=1.0f; + } + composit2_pixel_processor(node, rgbbuf, cbuf, in[0]->vec, spillmap, NULL, do_apply_spillmap_blue, CB_RGBA, CB_VAL); + break; + } + default: + break; + } + + out[0]->data=rgbbuf; + + if(cbuf!=in[0]->data) + free_compbuf(cbuf); + + free_compbuf(spillmap); +} + +static void node_composit_init_color_spill(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeColorspill *ncs= MEM_callocN(sizeof(NodeColorspill), "node colorspill"); + node->storage=ncs; + node->custom1= 2; /* green channel */ + node->custom2= 0; /* simple limit algo*/ + ncs->limchan= 0; /* limit by red */ + ncs->limscale= 1.0f; /* limit scaling factor */ + ncs->unspill=0; /* do not use unspill */ +} + +void register_node_type_cmp_color_spill(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_COLOR_SPILL, "Color Spill", NODE_CLASS_MATTE, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_color_spill_in, cmp_node_color_spill_out); + node_type_size(&ntype, 140, 80, 200); + node_type_init(&ntype, node_composit_init_color_spill); + node_type_storage(&ntype, "NodeColorspill", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_color_spill); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c new file mode 100644 index 00000000000..7ebceb5c206 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c @@ -0,0 +1,201 @@ +/* + * + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Matt Ebb. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_colorbalance.c + * \ingroup cmpnodes + */ + + + +#include "node_composite_util.h" + + +/* ******************* Color Balance ********************************* */ +static bNodeSocketTemplate cmp_node_colorbalance_in[]={ + {SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f}, + {-1,0,""} +}; + +static bNodeSocketTemplate cmp_node_colorbalance_out[]={ + {SOCK_RGBA,0,"Image"}, + {-1,0,""} +}; + +/* this function implements ASC-CDL according to the spec at http://www.asctech.org/ + Slope + S = in * slope + Offset + O = S + offset + = (in * slope) + offset + Power + out = Clamp(O) ^ power + = Clamp((in * slope) + offset) ^ power + */ +DO_INLINE float colorbalance_cdl(float in, float offset, float power, float slope) +{ + float x = in * slope + offset; + + /* prevent NaN */ + CLAMP(x, 0.0, 1.0); + + return powf(x, power); +} + +/* note: lift_lgg is just 2-lift, gamma_inv is 1.0/gamma */ +DO_INLINE float colorbalance_lgg(float in, float lift_lgg, float gamma_inv, float gain) +{ + /* 1:1 match with the sequencer with linear/srgb conversions, the conversion isnt pretty + * but best keep it this way, sice testing for durian shows a similar calculation + * without lin/srgb conversions gives bad results (over-saturated shadows) with colors + * slightly below 1.0. some correction can be done but it ends up looking bad for shadows or lighter tones - campbell */ + float x= (((linearrgb_to_srgb(in) - 1.0f) * lift_lgg) + 1.0f) * gain; + + /* prevent NaN */ + if (x < 0.f) x = 0.f; + + return powf(srgb_to_linearrgb(x), gamma_inv); +} + +static void do_colorbalance_cdl(bNode *node, float* out, float *in) +{ + NodeColorBalance *n= (NodeColorBalance *)node->storage; + + out[0] = colorbalance_cdl(in[0], n->lift[0], n->gamma[0], n->gain[0]); + out[1] = colorbalance_cdl(in[1], n->lift[1], n->gamma[1], n->gain[1]); + out[2] = colorbalance_cdl(in[2], n->lift[2], n->gamma[2], n->gain[2]); + out[3] = in[3]; +} + +static void do_colorbalance_cdl_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorBalance *n= (NodeColorBalance *)node->storage; + const float mfac= 1.0f - *fac; + + out[0] = mfac*in[0] + *fac * colorbalance_cdl(in[0], n->lift[0], n->gamma[0], n->gain[0]); + out[1] = mfac*in[1] + *fac * colorbalance_cdl(in[1], n->lift[1], n->gamma[1], n->gain[1]); + out[2] = mfac*in[2] + *fac * colorbalance_cdl(in[2], n->lift[2], n->gamma[2], n->gain[2]); + out[3] = in[3]; +} + +static void do_colorbalance_lgg(bNode *node, float* out, float *in) +{ + NodeColorBalance *n= (NodeColorBalance *)node->storage; + + out[0] = colorbalance_lgg(in[0], n->lift_lgg[0], n->gamma_inv[0], n->gain[0]); + out[1] = colorbalance_lgg(in[1], n->lift_lgg[1], n->gamma_inv[1], n->gain[1]); + out[2] = colorbalance_lgg(in[2], n->lift_lgg[2], n->gamma_inv[2], n->gain[2]); + out[3] = in[3]; +} + +static void do_colorbalance_lgg_fac(bNode *node, float* out, float *in, float *fac) +{ + NodeColorBalance *n= (NodeColorBalance *)node->storage; + const float mfac= 1.0f - *fac; + + out[0] = mfac*in[0] + *fac * colorbalance_lgg(in[0], n->lift_lgg[0], n->gamma_inv[0], n->gain[0]); + out[1] = mfac*in[1] + *fac * colorbalance_lgg(in[1], n->lift_lgg[1], n->gamma_inv[1], n->gain[1]); + out[2] = mfac*in[2] + *fac * colorbalance_lgg(in[2], n->lift_lgg[2], n->gamma_inv[2], n->gain[2]); + out[3] = in[3]; +} + +static void node_composit_exec_colorbalance(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf *cbuf= in[1]->data; + CompBuf *stackbuf; + + /* stack order input: fac, image */ + /* stack order output: image */ + if(out[0]->hasoutput==0) return; + + if(in[0]->vec[0] == 0.f && in[0]->data == NULL) { + out[0]->data = pass_on_compbuf(cbuf); + return; + } + + { + NodeColorBalance *n= (NodeColorBalance *)node->storage; + int c; + + for (c = 0; c < 3; c++) { + n->lift_lgg[c] = 2.0f - n->lift[c]; + n->gamma_inv[c] = (n->gamma[c] != 0.0f) ? 1.0f/n->gamma[c] : 1000000.0f; + } + } + + if (cbuf) { + stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* create output based on image input */ + + if (node->custom1 == 0) { + /* lift gamma gain */ + if ((in[0]->data==NULL) && (in[0]->vec[0] >= 1.f)) { + composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_colorbalance_lgg, CB_RGBA); + } + else { + composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, in[0]->vec, do_colorbalance_lgg_fac, CB_RGBA, CB_VAL); + } + } else { + /* offset/power/slope : ASC-CDL */ + if ((in[0]->data==NULL) && (in[0]->vec[0] >= 1.f)) { + composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_colorbalance_cdl, CB_RGBA); + } + else { + composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, in[0]->vec, do_colorbalance_cdl_fac, CB_RGBA, CB_VAL); + } + + } + + out[0]->data=stackbuf; + } +} + +static void node_composit_init_colorbalance(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeColorBalance *n= node->storage= MEM_callocN(sizeof(NodeColorBalance), "node colorbalance"); + + n->lift[0] = n->lift[1] = n->lift[2] = 1.0f; + n->gamma[0] = n->gamma[1] = n->gamma[2] = 1.0f; + n->gain[0] = n->gain[1] = n->gain[2] = 1.0f; +} + +void register_node_type_cmp_colorbalance(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_COLORBALANCE, "Color Balance", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_colorbalance_in, cmp_node_colorbalance_out); + node_type_size(&ntype, 400, 200, 400); + node_type_init(&ntype, node_composit_init_colorbalance); + node_type_storage(&ntype, "NodeColorBalance", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_colorbalance); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c new file mode 100644 index 00000000000..ab8cf663ef2 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_common.c @@ -0,0 +1,373 @@ +/* + * $Id: CMP_blur.c 35562 2011-03-15 20:10:32Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Campbell Barton, Alfredo de Greef, David Millan Escriva, + * Juho Vepsäläinen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_common.c + * \ingroup cmpnodes + */ + + +#include "DNA_node_types.h" + +#include "BKE_node.h" + +#include "node_composite_util.h" +#include "node_common.h" +#include "node_exec.h" + +#if 0 +static void PRINT_BUFFERS(bNodeTreeExec *exec) +{ + bNodeTree *ntree= exec->nodetree; + bNode *node; + bNodeSocket *sock; + bNodeStack *ns; + int i; + + printf("-------------- DEBUG --------------\n"); + for (sock=ntree->inputs.first, i=0; sock; sock=sock->next, ++i) { + ns = node_get_socket_stack(exec->stack, sock); + printf("%d. Tree Input %s", i, sock->name); + if (ns->external) + printf(" (external)"); + printf(": data=%p\n", ns->data); + } + for (sock=ntree->outputs.first, i=0; sock; sock=sock->next, ++i) { + ns = node_get_socket_stack(exec->stack, sock); + printf("%d. Tree Output %s", i, sock->name); + if (ns->external) + printf(" (external)"); + printf(": data=%p\n", ns->data); + } + for (node=ntree->nodes.first; node; node=node->next) { + printf("Node %s:\n", node->name); + for (sock=node->inputs.first, i=0; sock; sock=sock->next, ++i) { + ns = node_get_socket_stack(exec->stack, sock); + printf("\t%d. Input %s", i, sock->name); + if (ns->external) + printf(" (external)"); + printf(": data=%p\n", ns->data); + } + for (sock=node->outputs.first, i=0; sock; sock=sock->next, ++i) { + ns = node_get_socket_stack(exec->stack, sock); + printf("\t%d. Output %s", i, sock->name); + if (ns->external) + printf(" (external)"); + printf(": data=%p\n", ns->data); + } + } +} +#endif + +static void copy_stack(bNodeStack *to, bNodeStack *from) +{ + if (to != from) { + copy_v4_v4(to->vec, from->vec); + to->data = from->data; + to->datatype = from->datatype; + + /* tag as copy to prevent freeing */ + to->is_copy = 1; + } +} + +static void move_stack(bNodeStack *to, bNodeStack *from) +{ + if (to != from) { + copy_v4_v4(to->vec, from->vec); + to->data = from->data; + to->datatype = from->datatype; + to->is_copy = from->is_copy; + + zero_v4(from->vec); + from->data = NULL; + from->datatype = 0; + from->is_copy = 0; + } +} + +/**** GROUP ****/ + +static void *group_initexec(bNode *node) +{ + bNodeTree *ngroup= (bNodeTree*)node->id; + bNodeTreeExec *exec; + bNodeSocket *sock; + bNodeStack *ns; + + /* initialize the internal node tree execution */ + exec = ntreeCompositBeginExecTree(ngroup); + + /* tag group outputs as external to prevent freeing */ + for (sock=ngroup->outputs.first; sock; sock=sock->next) { + if (!(sock->flag & SOCK_INTERNAL)) { + ns = node_get_socket_stack(exec->stack, sock); + ns->external = 1; + } + } + + return exec; +} + +static void group_freeexec(bNode *UNUSED(node), void *nodedata) +{ + bNodeTreeExec *gexec= (bNodeTreeExec*)nodedata; + + ntreeCompositEndExecTree(gexec); +} + +/* Copy inputs to the internal stack. + * This is a shallow copy, no buffers are duplicated here! + */ +static void group_copy_inputs(bNode *node, bNodeStack **in, bNodeStack *gstack) +{ + bNodeSocket *sock; + bNodeStack *ns; + int a; + for (sock=node->inputs.first, a=0; sock; sock=sock->next, ++a) { + if (sock->groupsock) { + ns = node_get_socket_stack(gstack, sock->groupsock); + copy_stack(ns, in[a]); + } + } +} + +/* Copy internal results to the external outputs. + */ +static void group_move_outputs(bNode *node, bNodeStack **out, bNodeStack *gstack) +{ + bNodeSocket *sock; + bNodeStack *ns; + int a; + for (sock=node->outputs.first, a=0; sock; sock=sock->next, ++a) { + if (sock->groupsock) { + ns = node_get_socket_stack(gstack, sock->groupsock); + move_stack(out[a], ns); + } + } +} + +/* Free internal buffers */ +static void group_free_internal(bNodeTreeExec *gexec) { + bNodeStack *ns; + int i; + + for (i=0, ns=gexec->stack; i < gexec->stacksize; ++i, ++ns) { + if (!ns->external && !ns->is_copy) { + if (ns->data) { + free_compbuf(ns->data); + ns->data = NULL; + } + } + } +} + +static void group_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + + /* XXX same behavior as trunk: all nodes inside group are executed. + * it's stupid, but just makes it work. compo redesign will do this better. + */ + { + bNode *inode; + for (inode=exec->nodetree->nodes.first; inode; inode=inode->next) + inode->need_exec = 1; + } + + group_copy_inputs(node, in, exec->stack); + ntreeExecNodes(exec, data, thread); + group_free_internal(exec); + group_move_outputs(node, out, exec->stack); +} + +void register_node_type_cmp_group(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT); + node_type_socket_templates(&ntype, NULL, NULL); + node_type_size(&ntype, 120, 60, 200); + node_type_label(&ntype, node_group_label); + node_type_init(&ntype, node_group_init); + node_type_valid(&ntype, node_group_valid); + node_type_template(&ntype, node_group_template); + node_type_update(&ntype, NULL, node_group_verify); + node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear); + node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute); + + nodeRegisterType(lb, &ntype); +} + + +/**** FOR LOOP ****/ + +#if 0 /* XXX loop nodes don't work nicely with current trees */ +/* Move the results from the previous iteration back to the input sockets. */ +static void loop_iteration_reset(bNodeTree *ngroup, bNodeStack *gstack) +{ + bNodeSocket *gin, *gout; + bNodeStack *nsin, *nsout; + + gin = ngroup->inputs.first; + gout = ngroup->outputs.first; + + while (gin && gout) { + /* skip static (non-looping) sockets */ + while (gin && !(gin->flag & SOCK_DYNAMIC)) + gin=gin->next; + while (gout && !(gout->flag & SOCK_DYNAMIC)) + gout=gout->next; + + if (gin && gout) { + nsin = node_get_socket_stack(gstack, gin); + nsout = node_get_socket_stack(gstack, gout); + + move_stack(nsin, nsout); + + gin=gin->next; + gout=gout->next; + } + } +} + +static void forloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + int totiterations= (int)in[0]->vec[0]; + bNodeSocket *sock; + bNodeStack *ns; + int iteration; + + /* XXX same behavior as trunk: all nodes inside group are executed. + * it's stupid, but just makes it work. compo redesign will do this better. + */ + { + bNode *inode; + for (inode=exec->nodetree->nodes.first; inode; inode=inode->next) + inode->need_exec = 1; + } + + /* "Iteration" socket */ + sock = exec->nodetree->inputs.first; + ns = node_get_socket_stack(exec->stack, sock); + + group_copy_inputs(node, in, exec->stack); + for (iteration=0; iteration < totiterations; ++iteration) { + /* first input contains current iteration counter */ + ns->vec[0] = (float)iteration; + + if (iteration > 0) + loop_iteration_reset(exec->nodetree, exec->stack); + ntreeExecNodes(exec, data, thread); + group_free_internal(exec); + } + group_move_outputs(node, out, exec->stack); +} + +void register_node_type_cmp_forloop(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, NULL); + node_type_size(&ntype, 120, 60, 200); + node_type_label(&ntype, node_group_label); + node_type_init(&ntype, node_forloop_init); + node_type_valid(&ntype, node_group_valid); + node_type_template(&ntype, node_forloop_template); + node_type_update(&ntype, NULL, node_group_verify); + node_type_tree(&ntype, node_forloop_init_tree, node_loop_update_tree); + node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear); + node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute); + + nodeRegisterType(lb, &ntype); +} +#endif + + +/**** WHILE LOOP ****/ + +#if 0 /* XXX loop nodes don't work nicely with current trees */ +static void whileloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + int condition= (in[0]->vec[0] > 0.0f); + bNodeSocket *sock; + bNodeStack *ns; + int iteration; + + /* XXX same behavior as trunk: all nodes inside group are executed. + * it's stupid, but just makes it work. compo redesign will do this better. + */ + { + bNode *inode; + for (inode=exec->nodetree->nodes.first; inode; inode=inode->next) + inode->need_exec = 1; + } + + /* "Condition" socket */ + sock = exec->nodetree->outputs.first; + ns = node_get_socket_stack(exec->stack, sock); + + iteration = 0; + group_copy_inputs(node, in, exec->stack); + while (condition && iteration < node->custom1) { + if (iteration > 0) + loop_iteration_reset(exec->nodetree, exec->stack); + ntreeExecNodes(exec, data, thread); + group_free_internal(exec); + +// PRINT_BUFFERS(exec); + + condition = (ns->vec[0] > 0.0f); + ++iteration; + } + group_move_outputs(node, out, exec->stack); +} + +void register_node_type_cmp_whileloop(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, NULL); + node_type_size(&ntype, 120, 60, 200); + node_type_label(&ntype, node_group_label); + node_type_init(&ntype, node_whileloop_init); + node_type_valid(&ntype, node_group_valid); + node_type_template(&ntype, node_whileloop_template); + node_type_update(&ntype, NULL, node_group_verify); + node_type_tree(&ntype, node_whileloop_init_tree, node_loop_update_tree); + node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear); + node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute); + + nodeRegisterType(lb, &ntype); +} +#endif diff --git a/source/blender/nodes/composite/nodes/node_composite_composite.c b/source/blender/nodes/composite/nodes/node_composite_composite.c new file mode 100644 index 00000000000..be6246b42d8 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_composite.c @@ -0,0 +1,113 @@ +/* + * $Id: CMP_composite.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_composite.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + + +/* **************** COMPOSITE ******************** */ +static bNodeSocketTemplate cmp_node_composite_in[]= { + { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { -1, 0, "" } +}; + +/* applies to render pipeline */ +static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) +{ + /* image assigned to output */ + /* stack order input sockets: col, alpha, z */ + + if(node->flag & NODE_DO_OUTPUT) { /* only one works on out */ + Scene *scene= (Scene *)node->id; + RenderData *rd= data; + + if(scene && (rd->scemode & R_DOCOMP)) { + Render *re= RE_GetRender(scene->id.name); + RenderResult *rr= RE_AcquireResultWrite(re); + if(rr) { + CompBuf *outbuf, *zbuf=NULL; + + if(rr->rectf) + MEM_freeN(rr->rectf); + outbuf= alloc_compbuf(rr->rectx, rr->recty, CB_RGBA, 1); + + if(in[1]->data==NULL) + composit1_pixel_processor(node, outbuf, in[0]->data, in[0]->vec, do_copy_rgba, CB_RGBA); + else + composit2_pixel_processor(node, outbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, do_copy_a_rgba, CB_RGBA, CB_VAL); + + if(in[2]->data) { + if(rr->rectz) + MEM_freeN(rr->rectz); + zbuf= alloc_compbuf(rr->rectx, rr->recty, CB_VAL, 1); + composit1_pixel_processor(node, zbuf, in[2]->data, in[2]->vec, do_copy_value, CB_VAL); + rr->rectz= zbuf->rect; + zbuf->malloc= 0; + free_compbuf(zbuf); + } + generate_preview(data, node, outbuf); + + /* we give outbuf to rr... */ + rr->rectf= outbuf->rect; + outbuf->malloc= 0; + free_compbuf(outbuf); + + /* signal for imageviewer to refresh (it converts to byte rects...) */ + BKE_image_signal(BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"), NULL, IMA_SIGNAL_FREE); + + RE_ReleaseResult(re); + return; + } + else + RE_ReleaseResult(re); + } + } + if(in[0]->data) + generate_preview(data, node, in[0]->data); +} + +void register_node_type_cmp_composite(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW); + node_type_socket_templates(&ntype, cmp_node_composite_in, NULL); + node_type_size(&ntype, 80, 60, 200); + node_type_exec(&ntype, node_composit_exec_composite); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_crop.c b/source/blender/nodes/composite/nodes/node_composite_crop.c new file mode 100644 index 00000000000..332ecf39616 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_crop.c @@ -0,0 +1,129 @@ +/* + * + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Juho Vepsäläinen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_crop.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** Crop ******************** */ + +static bNodeSocketTemplate cmp_node_crop_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_crop_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void node_composit_exec_crop(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + if(in[0]->data) { + NodeTwoXYs *ntxy= node->storage; + CompBuf *cbuf= in[0]->data; + CompBuf *stackbuf; + int x, y; + float *srcfp, *outfp; + rcti outputrect; + + if(node->custom2) { + ntxy->x1= cbuf->x* ntxy->fac_x1; + ntxy->x2= cbuf->x* ntxy->fac_x2; + ntxy->y1= cbuf->y* ntxy->fac_y1; + ntxy->y2= cbuf->y* ntxy->fac_y2; + } + + /* check input image size */ + if(cbuf->x <= ntxy->x1 + 1) + ntxy->x1= cbuf->x - 1; + + if(cbuf->y <= ntxy->y1 + 1) + ntxy->y1= cbuf->y - 1; + + if(cbuf->x <= ntxy->x2 + 1) + ntxy->x2= cbuf->x - 1; + + if(cbuf->y <= ntxy->y2 + 1) + ntxy->y2= cbuf->y - 1; + + /* figure out the minimums and maximums */ + outputrect.xmax=MAX2(ntxy->x1, ntxy->x2) + 1; + outputrect.xmin=MIN2(ntxy->x1, ntxy->x2); + outputrect.ymax=MAX2(ntxy->y1, ntxy->y2) + 1; + outputrect.ymin=MIN2(ntxy->y1, ntxy->y2); + + if(node->custom1) { + /* this option crops the image size too */ + stackbuf= get_cropped_compbuf(&outputrect, cbuf->rect, cbuf->x, cbuf->y, cbuf->type); + } + else { + /* this option won't crop the size of the image as well */ + /* allocate memory for the output image */ + stackbuf = alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1); + + /* select the cropped part of the image and set it to the output */ + for(y=outputrect.ymin; yrect + (y * cbuf->x + outputrect.xmin) * cbuf->type; + outfp= stackbuf->rect + (y * stackbuf->x + outputrect.xmin) * stackbuf->type; + for(x=outputrect.xmin; xtype, srcfp+= cbuf->type) + memcpy(outfp, srcfp, sizeof(float)*stackbuf->type); + } + } + + out[0]->data= stackbuf; + } +} + +static void node_composit_init_crop(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeTwoXYs *nxy= MEM_callocN(sizeof(NodeTwoXYs), "node xy data"); + node->storage= nxy; + nxy->x1= 0; + nxy->x2= 0; + nxy->y1= 0; + nxy->y2= 0; +} + +void register_node_type_cmp_crop(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_CROP, "Crop", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_crop_in, cmp_node_crop_out); + node_type_size(&ntype, 140, 100, 320); + node_type_init(&ntype, node_composit_init_crop); + node_type_storage(&ntype, "NodeTwoXYs", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_crop); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_curves.c b/source/blender/nodes/composite/nodes/node_composite_curves.c new file mode 100644 index 00000000000..a830b595321 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_curves.c @@ -0,0 +1,209 @@ +/* + * $Id: CMP_curves.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Björn C. Schaefer + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_curves.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** CURVE Time ******************** */ + +/* custom1 = sfra, custom2 = efra */ +static bNodeSocketTemplate cmp_node_time_out[]= { + { SOCK_FLOAT, 0, "Fac"}, + { -1, 0, "" } +}; + +static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) +{ + RenderData *rd= data; + /* stack order output: fac */ + float fac= 0.0f; + + if(node->custom1 < node->custom2) + fac= (rd->cfra - node->custom1)/(float)(node->custom2-node->custom1); + + fac= curvemapping_evaluateF(node->storage, 0, fac); + out[0]->vec[0]= CLAMPIS(fac, 0.0f, 1.0f); +} + + +static void node_composit_init_curves_time(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->custom1= 1; + node->custom2= 250; + node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); +} + +void register_node_type_cmp_curve_time(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, cmp_node_time_out); + node_type_size(&ntype, 140, 100, 320); + node_type_init(&ntype, node_composit_init_curves_time); + node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); + node_type_exec(&ntype, node_composit_exec_curves_time); + + nodeRegisterType(lb, &ntype); +} + + + + +/* **************** CURVE VEC ******************** */ +static bNodeSocketTemplate cmp_node_curve_vec_in[]= { + { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_curve_vec_out[]= { + { SOCK_VECTOR, 0, "Vector"}, + { -1, 0, "" } +}; + +static void node_composit_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order input: vec */ + /* stack order output: vec */ + + curvemapping_evaluate_premulRGBF(node->storage, out[0]->vec, in[0]->vec); +} + +static void node_composit_init_curve_vec(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f); +} + +void register_node_type_cmp_curve_vec(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_curve_vec_in, cmp_node_curve_vec_out); + node_type_size(&ntype, 200, 140, 320); + node_type_init(&ntype, node_composit_init_curve_vec); + node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); + node_type_exec(&ntype, node_composit_exec_curve_vec); + + nodeRegisterType(lb, &ntype); +} + + +/* **************** CURVE RGB ******************** */ +static bNodeSocketTemplate cmp_node_curve_rgb_in[]= { + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 1, "Black Level", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 1, "White Level", 1.0f, 1.0f, 1.0f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_curve_rgb_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_curves(bNode *node, float *out, float *in) +{ + curvemapping_evaluate_premulRGBF(node->storage, out, in); + out[3]= in[3]; +} + +static void do_curves_fac(bNode *node, float *out, float *in, float *fac) +{ + + if(*fac>=1.0) + curvemapping_evaluate_premulRGBF(node->storage, out, in); + else if(*fac<=0.0) { + VECCOPY(out, in); + } + else { + float col[4], mfac= 1.0f-*fac; + curvemapping_evaluate_premulRGBF(node->storage, col, in); + out[0]= mfac*in[0] + *fac*col[0]; + out[1]= mfac*in[1] + *fac*col[1]; + out[2]= mfac*in[2] + *fac*col[2]; + } + out[3]= in[3]; +} + +static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order input: fac, image, black level, white level */ + /* stack order output: image */ + + if(out[0]->hasoutput==0) + return; + + /* input no image? then only color operation */ + if(in[1]->data==NULL) { + curvemapping_evaluateRGBF(node->storage, out[0]->vec, in[1]->vec); + } + else { + /* make output size of input image */ + CompBuf *cbuf= in[1]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + curvemapping_set_black_white(node->storage, in[2]->vec, in[3]->vec); + + if(in[0]->vec[0] == 1.0) + composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_curves, CB_RGBA); + else + composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, in[0]->vec, do_curves_fac, CB_RGBA, CB_VAL); + + out[0]->data= stackbuf; + } + +} + +static void node_composit_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); +} + +void register_node_type_cmp_curve_rgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_curve_rgb_in, cmp_node_curve_rgb_out); + node_type_size(&ntype, 200, 140, 320); + node_type_init(&ntype, node_composit_init_curve_rgb); + node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); + node_type_exec(&ntype, node_composit_exec_curve_rgb); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_defocus.c b/source/blender/nodes/composite/nodes/node_composite_defocus.c new file mode 100644 index 00000000000..a218bfb009d --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_defocus.c @@ -0,0 +1,892 @@ +/* + * $Id: CMP_defocus.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_defocus.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* ************ qdn: Defocus node ****************** */ +static bNodeSocketTemplate cmp_node_defocus_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_defocus_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + + +// line coefs for point sampling & scancon. data. +typedef struct BokehCoeffs { + float x0, y0, dx, dy; + float ls_x, ls_y; + float min_x, min_y, max_x, max_y; +} BokehCoeffs; + +// returns array of BokehCoeffs +// returns length of array in 'len_bkh', +// radius squared of inscribed disk in 'inradsq', needed in getWeight() test, +// BKH[8] is the data returned for the bokeh shape & bkh_b[4] is it's 2d bound +static void makeBokeh(char bktype, char ro, int* len_bkh, float* inradsq, BokehCoeffs BKH[8], float bkh_b[4]) +{ + float x0, x1, y0, y1, dx, dy, iDxy; + float w = MAX2(1e-5f, ro)*M_PI/180.f; // never reported stangely enough, but a zero offset causes missing center line... + float wi = (360.f/bktype)*M_PI/180.f; + int i, ov, nv; + + // bktype must be at least 3 & <= 8 + bktype = (bktype<3) ? 3 : ((bktype>8) ? 8 : bktype); + *len_bkh = bktype; + *inradsq = -1.f; + + for (i=0; i<(*len_bkh); i++) { + x0 = cos(w); + y0 = sin(w); + w += wi; + x1 = cos(w); + y1 = sin(w); + if ((*inradsq)<0.f) { + // radius squared of inscribed disk + float idx=(x0+x1)*0.5f, idy=(y0+y1)*0.5f; + *inradsq = idx*idx + idy*idy; + } + BKH[i].x0 = x0; + BKH[i].y0 = y0; + dx = x1-x0, dy = y1-y0; + iDxy = 1.f / sqrt(dx*dx + dy*dy); + dx *= iDxy; + dy *= iDxy; + BKH[i].dx = dx; + BKH[i].dy = dy; + } + + // precalc scanconversion data + // bokeh bound, not transformed, for scanconvert + bkh_b[0] = bkh_b[2] = 1e10f; // xmin/ymin + bkh_b[1] = bkh_b[3] = -1e10f; // xmax/ymax + ov = (*len_bkh) - 1; + for (nv=0; nv<(*len_bkh); nv++) { + bkh_b[0] = MIN2(bkh_b[0], BKH[nv].x0); // xmin + bkh_b[1] = MAX2(bkh_b[1], BKH[nv].x0); // xmax + bkh_b[2] = MIN2(bkh_b[2], BKH[nv].y0); // ymin + bkh_b[3] = MAX2(bkh_b[3], BKH[nv].y0); // ymax + BKH[nv].min_x = MIN2(BKH[ov].x0, BKH[nv].x0); + BKH[nv].max_x = MAX2(BKH[ov].x0, BKH[nv].x0); + BKH[nv].min_y = MIN2(BKH[ov].y0, BKH[nv].y0); + BKH[nv].max_y = MAX2(BKH[ov].y0, BKH[nv].y0); + dy = BKH[nv].y0 - BKH[ov].y0; + BKH[nv].ls_x = (BKH[nv].x0 - BKH[ov].x0) / ((dy==0.f) ? 1.f : dy); + BKH[nv].ls_y = (BKH[nv].ls_x==0.f) ? 1.f : (1.f/BKH[nv].ls_x); + ov = nv; + } +} + +// test if u/v inside shape & returns weight value +static float getWeight(BokehCoeffs* BKH, int len_bkh, float u, float v, float rad, float inradsq) +{ + BokehCoeffs* bc = BKH; + float cdist, irad = (rad==0.f) ? 1.f : (1.f/rad); + u *= irad; + v *= irad; + + // early out test1: if point outside outer unit disk, it cannot be inside shape + cdist = u*u + v*v; + if (cdist>1.f) return 0.f; + + // early out test2: if point inside or on inner disk, point must be inside shape + if (cdist<=inradsq) return 1.f; + + while (len_bkh--) { + if ((bc->dy*(u - bc->x0) - bc->dx*(v - bc->y0)) > 0.f) return 0.f; + bc++; + } + return 1.f; +} + +// QMC.seq. for sampling, A.Keller, EMS +static float RI_vdC(unsigned int bits, unsigned int r) +{ + bits = ( bits << 16) | ( bits >> 16); + bits = ((bits & 0x00ff00ff) << 8) | ((bits & 0xff00ff00) >> 8); + bits = ((bits & 0x0f0f0f0f) << 4) | ((bits & 0xf0f0f0f0) >> 4); + bits = ((bits & 0x33333333) << 2) | ((bits & 0xcccccccc) >> 2); + bits = ((bits & 0x55555555) << 1) | ((bits & 0xaaaaaaaa) >> 1); + bits ^= r; + return (float)((double)bits / 4294967296.0); +} + +// single channel IIR gaussian filtering +// much faster than anything else, constant time independent of width +// should extend to multichannel and make this a node, could be useful +static void IIR_gauss_single(CompBuf* buf, float sigma) +{ + double q, q2, sc, cf[4], tsM[9], tsu[3], tsv[3]; + float *X, *Y, *W; + int i, x, y, sz; + + // single channel only for now + if (buf->type != CB_VAL) return; + + // <0.5 not valid, though can have a possibly useful sort of sharpening effect + if (sigma < 0.5) return; + + // see "Recursive Gabor Filtering" by Young/VanVliet + // all factors here in double.prec. Required, because for single.prec it seems to blow up if sigma > ~200 + if (sigma >= 3.556) + q = 0.9804*(sigma - 3.556) + 2.5091; + else // sigma >= 0.5 + q = (0.0561*sigma + 0.5784)*sigma - 0.2568; + q2 = q*q; + sc = (1.1668 + q)*(3.203729649 + (2.21566 + q)*q); + // no gabor filtering here, so no complex multiplies, just the regular coefs. + // all negated here, so as not to have to recalc Triggs/Sdika matrix + cf[1] = q*(5.788961737 + (6.76492 + 3.0*q)*q)/ sc; + cf[2] = -q2*(3.38246 + 3.0*q)/sc; + // 0 & 3 unchanged + cf[3] = q2*q/sc; + cf[0] = 1.0 - cf[1] - cf[2] - cf[3]; + + // Triggs/Sdika border corrections, + // it seems to work, not entirely sure if it is actually totally correct, + // Besides J.M.Geusebroek's anigauss.c (see http://www.science.uva.nl/~mark), + // found one other implementation by Cristoph Lampert, + // but neither seem to be quite the same, result seems to be ok sofar anyway. + // Extra scale factor here to not have to do it in filter, + // though maybe this had something to with the precision errors + sc = cf[0]/((1.0 + cf[1] - cf[2] + cf[3])*(1.0 - cf[1] - cf[2] - cf[3])*(1.0 + cf[2] + (cf[1] - cf[3])*cf[3])); + tsM[0] = sc*(-cf[3]*cf[1] + 1.0 - cf[3]*cf[3] - cf[2]); + tsM[1] = sc*((cf[3] + cf[1])*(cf[2] + cf[3]*cf[1])); + tsM[2] = sc*(cf[3]*(cf[1] + cf[3]*cf[2])); + tsM[3] = sc*(cf[1] + cf[3]*cf[2]); + tsM[4] = sc*(-(cf[2] - 1.0)*(cf[2] + cf[3]*cf[1])); + tsM[5] = sc*(-(cf[3]*cf[1] + cf[3]*cf[3] + cf[2] - 1.0)*cf[3]); + tsM[6] = sc*(cf[3]*cf[1] + cf[2] + cf[1]*cf[1] - cf[2]*cf[2]); + tsM[7] = sc*(cf[1]*cf[2] + cf[3]*cf[2]*cf[2] - cf[1]*cf[3]*cf[3] - cf[3]*cf[3]*cf[3] - cf[3]*cf[2] + cf[3]); + tsM[8] = sc*(cf[3]*(cf[1] + cf[3]*cf[2])); + +#define YVV(L)\ +{\ + W[0] = cf[0]*X[0] + cf[1]*X[0] + cf[2]*X[0] + cf[3]*X[0];\ + W[1] = cf[0]*X[1] + cf[1]*W[0] + cf[2]*X[0] + cf[3]*X[0];\ + W[2] = cf[0]*X[2] + cf[1]*W[1] + cf[2]*W[0] + cf[3]*X[0];\ + for (i=3; i=0; i--)\ + Y[i] = cf[0]*W[i] + cf[1]*Y[i+1] + cf[2]*Y[i+2] + cf[3]*Y[i+3];\ +} + + // intermediate buffers + sz = MAX2(buf->x, buf->y); + Y = MEM_callocN(sz*sizeof(float), "IIR_gauss Y buf"); + W = MEM_callocN(sz*sizeof(float), "IIR_gauss W buf"); + // H + for (y=0; yy; y++) { + X = &buf->rect[y*buf->x]; + YVV(buf->x); + memcpy(X, Y, sizeof(float)*buf->x); + } + // V + X = MEM_callocN(buf->y*sizeof(float), "IIR_gauss X buf"); + for (x=0; xx; x++) { + for (y=0; yy; y++) + X[y] = buf->rect[x + y*buf->x]; + YVV(buf->y); + for (y=0; yy; y++) + buf->rect[x + y*buf->x] = Y[y]; + } + MEM_freeN(X); + + MEM_freeN(W); + MEM_freeN(Y); +#undef YVV +} + +static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf, float inpval, int no_zbuf) +{ + NodeDefocus *nqd = node->storage; + CompBuf *wts; // weights buffer + CompBuf *crad; // CoC radius buffer + BokehCoeffs BKH[8]; // bokeh shape data, here never > 8 pts. + float bkh_b[4] = {0}; // shape 2D bound + float cam_fdist=1, cam_invfdist=1, cam_lens=35; + float dof_sp, maxfgc, bk_hn_theta=0, inradsq=0; + int y, len_bkh=0, ydone=0; + float aspect, aperture; + int minsz; + //float bcrad, nmaxc, scf; + + // get some required params from the current scene camera + // (ton) this is wrong, needs fixed + Scene *scene= (Scene*)node->id; + Object* camob = (scene)? scene->camera: NULL; + if (camob && camob->type==OB_CAMERA) { + Camera* cam = (Camera*)camob->data; + cam_lens = cam->lens; + cam_fdist = dof_camera(camob); + if (cam_fdist==0.0) cam_fdist = 1e10f; /* if the dof is 0.0 then set it be be far away */ + cam_invfdist = 1.f/cam_fdist; + } + + // guess work here.. best match with raytraced result + minsz = MIN2(img->x, img->y); + dof_sp = (float)minsz / (16.f / cam_lens); // <- == aspect * MIN2(img->x, img->y) / tan(0.5f * fov); + + // aperture + aspect = (img->x > img->y) ? (img->y / (float)img->x) : (img->x / (float)img->y); + aperture = 0.5f*(cam_lens / (aspect*32.f)) / nqd->fstop; + + // if not disk, make bokeh coefficients and other needed data + if (nqd->bktype!=0) { + makeBokeh(nqd->bktype, nqd->rotation, &len_bkh, &inradsq, BKH, bkh_b); + bk_hn_theta = 0.5 * nqd->bktype * sin(2.0 * M_PI / nqd->bktype); // weight factor + } + + // accumulated weights + wts = alloc_compbuf(img->x, img->y, CB_VAL, 1); + // CoC radius buffer + crad = alloc_compbuf(img->x, img->y, CB_VAL, 1); + + // if 'no_zbuf' flag set (which is always set if input is not an image), + // values are instead interpreted directly as blur radius values + if (no_zbuf) { + // to prevent *reaaallly* big radius values and impossible calculation times, + // limit the maximum to half the image width or height, whichever is smaller + float maxr = 0.5f*(float)MIN2(img->x, img->y); + unsigned int p; + + for (p=0; p<(unsigned int)(img->x*img->y); p++) { + crad->rect[p] = zbuf ? (zbuf->rect[p]*nqd->scale) : inpval; + // bug #5921, limit minimum + crad->rect[p] = MAX2(1e-5f, crad->rect[p]); + crad->rect[p] = MIN2(crad->rect[p], maxr); + // if maxblur!=0, limit maximum + if (nqd->maxblur != 0.f) crad->rect[p] = MIN2(crad->rect[p], nqd->maxblur); + } + } + else { + float wt; + + // actual zbuffer. + // separate foreground from background CoC's + // then blur background and blend in again with foreground, + // improves the 'blurred foreground overlapping in-focus midground' sharp boundary problem. + // wts buffer here used for blendmask + maxfgc = 0.f; // maximum foreground CoC radius + for (y=0; yy; y++) { + unsigned int p = y * img->x; + int x; + for (x=0; xx; x++) { + unsigned int px = p + x; + float iZ = (zbuf->rect[px]==0.f) ? 0.f : (1.f/zbuf->rect[px]); + crad->rect[px] = 0.5f*(aperture*(dof_sp*(cam_invfdist - iZ) - 1.f)); + if (crad->rect[px] <= 0.f) { + wts->rect[px] = 1.f; + crad->rect[px] = -crad->rect[px]; + if (crad->rect[px] > maxfgc) maxfgc = crad->rect[px]; + } + else crad->rect[px] = wts->rect[px] = 0; + } + } + + // fast blur... + // bug #6656 part 1, probably when previous node_composite.c was split into separate files, it was not properly updated + // to include recent cvs commits (well, at least not defocus node), so this part was missing... + wt = aperture*128.f; + IIR_gauss_single(crad, wt); + IIR_gauss_single(wts, wt); + + // bug #6656 part 2a, although foreground blur is not based anymore on closest object, + // the rescaling op below was still based on that anyway, and unlike the comment in below code, + // the difference is therefore not always that small at all... + // so for now commented out, not sure if this is going to cause other future problems, lets just wait and see... + /* + // find new maximum to scale it back to original + // (could skip this, not strictly necessary, in general, difference is quite small, but just in case...) + nmaxc = 0; + for (p=0; p<(img->x*img->y); p++) + if (crad->rect[p] > nmaxc) nmaxc = crad->rect[p]; + // rescale factor + scf = (nmaxc==0.f) ? 1.f: (maxfgc / nmaxc); + */ + + // and blend... + for (y=0; yy; y++) { + unsigned int p = y*img->x; + int x; + + for (x=0; xx; x++) { + unsigned px = p + x; + if (zbuf->rect[px]!=0.f) { + float iZ = (zbuf->rect[px]==0.f) ? 0.f : (1.f/zbuf->rect[px]); + + // bug #6656 part 2b, do not rescale + /* + bcrad = 0.5f*fabs(aperture*(dof_sp*(cam_invfdist - iZ) - 1.f)); + // scale crad back to original maximum and blend + crad->rect[px] = bcrad + wts->rect[px]*(scf*crad->rect[px] - bcrad); + */ + crad->rect[px] = 0.5f*fabs(aperture*(dof_sp*(cam_invfdist - iZ) - 1.f)); + + // 'bug' #6615, limit minimum radius to 1 pixel, not really a solution, but somewhat mitigates the problem + crad->rect[px] = MAX2(crad->rect[px], 0.5f); + // if maxblur!=0, limit maximum + if (nqd->maxblur != 0.f) crad->rect[px] = MIN2(crad->rect[px], nqd->maxblur); + } + else crad->rect[px] = 0.f; + // clear weights for next part + wts->rect[px] = 0.f; + } + // esc set by main calling process + if(node->exec & NODE_BREAK) + break; + } + } + + //------------------------------------------------------------------ + // main loop +#ifndef __APPLE__ /* can crash on Mac, see bug #22856, disabled for now */ +#ifdef __INTEL_COMPILER /* icc doesn't like the compound statement -- internal error: 0_1506 */ + #pragma omp parallel for private(y) if(!nqd->preview) schedule(guided) +#else + #pragma omp parallel for private(y) if(!nqd->preview && img->y*img->x > 16384) schedule(guided) +#endif +#endif + for (y=0; yy; y++) { + unsigned int p, p4, zp, cp, cp4; + float *ctcol, u, v, ct_crad, cR2=0; + int x, sx, sy; + + // some sort of visual feedback would be nice, or at least this text in the renderwin header + // but for now just print some info in the console every 8 scanlines. + #pragma omp critical + { + if (((ydone & 7)==0) || (ydone==(img->y-1))) { + if(G.background==0) { + printf("\rdefocus: Processing Line %d of %d ... ", ydone+1, img->y); + fflush(stdout); + } + } + + ydone++; + } + + // esc set by main calling process. don't break because openmp doesn't + // allow it, just continue and do nothing + if(node->exec & NODE_BREAK) + continue; + + zp = y * img->x; + for (x=0; xx; x++) { + cp = zp + x; + cp4 = cp * img->type; + + // Circle of Confusion radius for current pixel + cR2 = ct_crad = crad->rect[cp]; + // skip if zero (border render) + if (ct_crad==0.f) { + // related to bug #5921, forgot output image when skipping 0 radius values + new->rect[cp4] = img->rect[cp4]; + if (new->type != CB_VAL) { + new->rect[cp4+1] = img->rect[cp4+1]; + new->rect[cp4+2] = img->rect[cp4+2]; + new->rect[cp4+3] = img->rect[cp4+3]; + } + continue; + } + cR2 *= cR2; + + // pixel color + ctcol = &img->rect[cp4]; + + if (!nqd->preview) { + int xs, xe, ys, ye; + float lwt, wtcol[4] = {0}, aacol[4] = {0}; + float wt; + + // shape weight + if (nqd->bktype==0) // disk + wt = 1.f/((float)M_PI*cR2); + else + wt = 1.f/(cR2*bk_hn_theta); + + // weighted color + wtcol[0] = wt*ctcol[0]; + if (new->type != CB_VAL) { + wtcol[1] = wt*ctcol[1]; + wtcol[2] = wt*ctcol[2]; + wtcol[3] = wt*ctcol[3]; + } + + // macro for background blur overlap test + // unfortunately, since this is done per pixel, + // it has a very significant negative impact on processing time... + // (eg. aa disk blur without test: 112 sec, vs with test: 176 sec...) + // iff center blur radius > threshold + // and if overlap pixel in focus, do nothing, else add color/weigbt + // (threshold constant is dependant on amount of blur) + #define TESTBG1(c, w) {\ + if (ct_crad > nqd->bthresh) {\ + if (crad->rect[p] > nqd->bthresh) {\ + new->rect[p] += c[0];\ + wts->rect[p] += w;\ + }\ + }\ + else {\ + new->rect[p] += c[0];\ + wts->rect[p] += w;\ + }\ + } + #define TESTBG4(c, w) {\ + if (ct_crad > nqd->bthresh) {\ + if (crad->rect[p] > nqd->bthresh) {\ + new->rect[p4] += c[0];\ + new->rect[p4+1] += c[1];\ + new->rect[p4+2] += c[2];\ + new->rect[p4+3] += c[3];\ + wts->rect[p] += w;\ + }\ + }\ + else {\ + new->rect[p4] += c[0];\ + new->rect[p4+1] += c[1];\ + new->rect[p4+2] += c[2];\ + new->rect[p4+3] += c[3];\ + wts->rect[p] += w;\ + }\ + } + if (nqd->bktype == 0) { + // Disk + int _x, i, j, di; + float Dj, T; + // AA pixel + #define AAPIX(a, b) {\ + int _ny = b;\ + if ((_ny >= 0) && (_ny < new->y)) {\ + int _nx = a;\ + if ((_nx >=0) && (_nx < new->x)) {\ + p = _ny*new->x + _nx;\ + if (new->type==CB_VAL) {\ + TESTBG1(aacol, lwt);\ + }\ + else {\ + p4 = p * new->type;\ + TESTBG4(aacol, lwt);\ + }\ + }\ + }\ + } + // circle scanline + #define CSCAN(a, b) {\ + int _ny = y + b;\ + if ((_ny >= 0) && (_ny < new->y)) {\ + xs = x - a + 1;\ + if (xs < 0) xs = 0;\ + xe = x + a;\ + if (xe > new->x) xe = new->x;\ + p = _ny*new->x + xs;\ + if (new->type==CB_VAL) {\ + for (_x=xs; _xtype;\ + for (_x=xs; _xtype) TESTBG4(wtcol, wt);\ + }\ + }\ + } + i = ceil(ct_crad); + j = 0; + T = 0; + while (i > j) { + Dj = sqrt(cR2 - j*j); + Dj -= floor(Dj); + di = 0; + if (Dj > T) { i--; di = 1; } + T = Dj; + aacol[0] = wtcol[0]*Dj; + if (new->type != CB_VAL) { + aacol[1] = wtcol[1]*Dj; + aacol[2] = wtcol[2]*Dj; + aacol[3] = wtcol[3]*Dj; + } + lwt = wt*Dj; + if (i!=j) { + // outer pixels + AAPIX(x+j, y+i); + AAPIX(x+j, y-i); + if (j) { + AAPIX(x-j, y+i); // BL + AAPIX(x-j, y-i); // TL + } + if (di) { // only when i changed, interior of outer section + CSCAN(j, i); // bottom + CSCAN(j, -i); // top + } + } + // lower mid section + AAPIX(x+i, y+j); + if (i) AAPIX(x-i, y+j); + CSCAN(i, j); + // upper mid section + if (j) { + AAPIX(x+i, y-j); + if (i) AAPIX(x-i, y-j); + CSCAN(i, -j); + } + j++; + } + #undef CSCAN + #undef AAPIX + } + else { + // n-agonal + int ov, nv; + float mind, maxd, lwt; + ys = MAX2((int)floor(bkh_b[2]*ct_crad + y), 0); + ye = MIN2((int)ceil(bkh_b[3]*ct_crad + y), new->y - 1); + for (sy=ys; sy<=ye; sy++) { + float fxs = 1e10f, fxe = -1e10f; + float yf = (sy - y)/ct_crad; + int found = 0; + ov = len_bkh - 1; + mind = maxd = 0; + for (nv=0; nv= yf) && (BKH[nv].min_y <= yf)) { + float tx = BKH[ov].x0 + BKH[nv].ls_x*(yf - BKH[ov].y0); + if (tx < fxs) { fxs = tx; mind = BKH[nv].ls_x; } + if (tx > fxe) { fxe = tx; maxd = BKH[nv].ls_x; } + if (++found == 2) break; + } + ov = nv; + } + if (found) { + fxs = fxs*ct_crad + x; + fxe = fxe*ct_crad + x; + xs = (int)floor(fxs), xe = (int)ceil(fxe); + // AA hack for first and last x pixel, near vertical edges only + if (fabs(mind) <= 1.f) { + if ((xs >= 0) && (xs < new->x)) { + lwt = 1.f-(fxs - xs); + aacol[0] = wtcol[0]*lwt; + p = xs + sy*new->x; + if (new->type==CB_VAL) { + lwt *= wt; + TESTBG1(aacol, lwt); + } + else { + p4 = p * new->type; + aacol[1] = wtcol[1]*lwt; + aacol[2] = wtcol[2]*lwt; + aacol[3] = wtcol[3]*lwt; + lwt *= wt; + TESTBG4(aacol, lwt); + } + } + } + if (fabs(maxd) <= 1.f) { + if ((xe >= 0) && (xe < new->x)) { + lwt = 1.f-(xe - fxe); + aacol[0] = wtcol[0]*lwt; + p = xe + sy*new->x; + if (new->type==CB_VAL) { + lwt *= wt; + TESTBG1(aacol, lwt); + } + else { + p4 = p * new->type; + aacol[1] = wtcol[1]*lwt; + aacol[2] = wtcol[2]*lwt; + aacol[3] = wtcol[3]*lwt; + lwt *= wt; + TESTBG4(aacol, lwt); + } + } + } + xs = MAX2(xs+1, 0); + xe = MIN2(xe, new->x); + // remaining interior scanline + p = sy*new->x + xs; + if (new->type==CB_VAL) { + for (sx=xs; sxtype; + for (sx=xs; sxtype) TESTBG4(wtcol, wt); + } + } + } + + // now traverse in opposite direction, y scanlines, + // but this time only draw the near horizontal edges, + // applying same AA hack as above + xs = MAX2((int)floor(bkh_b[0]*ct_crad + x), 0); + xe = MIN2((int)ceil(bkh_b[1]*ct_crad + x), img->x - 1); + for (sx=xs; sx<=xe; sx++) { + float xf = (sx - x)/ct_crad; + float fys = 1e10f, fye = -1e10f; + int found = 0; + ov = len_bkh - 1; + mind = maxd = 0; + for (nv=0; nv= xf) && (BKH[nv].min_x <= xf)) { + float ty = BKH[ov].y0 + BKH[nv].ls_y*(xf - BKH[ov].x0); + if (ty < fys) { fys = ty; mind = BKH[nv].ls_y; } + if (ty > fye) { fye = ty; maxd = BKH[nv].ls_y; } + if (++found == 2) break; + } + ov = nv; + } + if (found) { + fys = fys*ct_crad + y; + fye = fye*ct_crad + y; + // near horizontal edges only, line slope <= 1 + if (fabs(mind) <= 1.f) { + int iys = (int)floor(fys); + if ((iys >= 0) && (iys < new->y)) { + lwt = 1.f - (fys - iys); + aacol[0] = wtcol[0]*lwt; + p = sx + iys*new->x; + if (new->type==CB_VAL) { + lwt *= wt; + TESTBG1(aacol, lwt); + } + else { + p4 = p * new->type; + aacol[1] = wtcol[1]*lwt; + aacol[2] = wtcol[2]*lwt; + aacol[3] = wtcol[3]*lwt; + lwt *= wt; + TESTBG4(aacol, lwt); + } + } + } + if (fabs(maxd) <= 1.f) { + int iye = ceil(fye); + if ((iye >= 0) && (iye < new->y)) { + lwt = 1.f - (iye - fye); + aacol[0] = wtcol[0]*lwt; + p = sx + iye*new->x; + if (new->type==CB_VAL) { + lwt *= wt; + TESTBG1(aacol, lwt); + } + else { + p4 = p * new->type; + aacol[1] = wtcol[1]*lwt; + aacol[2] = wtcol[2]*lwt; + aacol[3] = wtcol[3]*lwt; + lwt *= wt; + TESTBG4(aacol, lwt); + } + } + } + } + } + + } + #undef TESTBG4 + #undef TESTBG1 + + } + else { + // sampled, simple rejection sampling here, good enough + unsigned int maxsam, s, ui = BLI_rand()*BLI_rand(); + float wcor, cpr = BLI_frand(), lwt; + if (no_zbuf) + maxsam = nqd->samples; // no zbuffer input, use sample value directly + else { + // depth adaptive sampling hack, the more out of focus, the more samples taken, 16 minimum. + maxsam = (int)(0.5f + nqd->samples*(1.f-(float)exp(-fabs(zbuf->rect[cp] - cam_fdist)))); + if (maxsam < 16) maxsam = 16; + } + wcor = 1.f/(float)maxsam; + for (s=0; s= new->x) || (sy<0) || (sy >= new->y)) continue; + p = sx + sy*new->x; + p4 = p * new->type; + if (nqd->bktype==0) // Disk + lwt = ((u*u + v*v)<=cR2) ? wcor : 0.f; + else // AA not needed here + lwt = wcor * getWeight(BKH, len_bkh, u, v, ct_crad, inradsq); + // prevent background bleeding onto in-focus pixels, user-option + if (ct_crad > nqd->bthresh) { // if center blur > threshold + if (crad->rect[p] > nqd->bthresh) { // if overlap pixel in focus, do nothing, else add color/weigbt + new->rect[p4] += ctcol[0] * lwt; + if (new->type != CB_VAL) { + new->rect[p4+1] += ctcol[1] * lwt; + new->rect[p4+2] += ctcol[2] * lwt; + new->rect[p4+3] += ctcol[3] * lwt; + } + wts->rect[p] += lwt; + } + } + else { + new->rect[p4] += ctcol[0] * lwt; + if (new->type != CB_VAL) { + new->rect[p4+1] += ctcol[1] * lwt; + new->rect[p4+2] += ctcol[2] * lwt; + new->rect[p4+3] += ctcol[3] * lwt; + } + wts->rect[p] += lwt; + } + } + } + + } + } + + // finally, normalize + for (y=0; yy; y++) { + unsigned int p = y * new->x; + unsigned int p4 = p * new->type; + int x; + + for (x=0; xx; x++) { + float dv = (wts->rect[p]==0.f) ? 1.f : (1.f/wts->rect[p]); + new->rect[p4] *= dv; + if (new->type!=CB_VAL) { + new->rect[p4+1] *= dv; + new->rect[p4+2] *= dv; + new->rect[p4+3] *= dv; + } + p++; + p4 += new->type; + } + } + + free_compbuf(crad); + free_compbuf(wts); + + printf("Done\n"); +} + + +static void node_composit_exec_defocus(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf *new, *old, *zbuf_use = NULL, *img = in[0]->data, *zbuf = in[1]->data; + NodeDefocus *nqd = node->storage; + int no_zbuf = nqd->no_zbuf; + + if ((img==NULL) || (out[0]->hasoutput==0)) return; + + // if image not valid type or fstop==infinite (128), nothing to do, pass in to out + if (((img->type!=CB_RGBA) && (img->type!=CB_VAL)) || ((no_zbuf==0) && (nqd->fstop==128.f))) { + out[0]->data = pass_on_compbuf(img); + return; + } + + if (zbuf!=NULL) { + // Zbuf input, check to make sure, single channel, same size + // doesn't have to be actual zbuffer, but must be value type + if ((zbuf->x != img->x) || (zbuf->y != img->y)) { + // could do a scale here instead... + printf("Z input must be same size as image !\n"); + return; + } + zbuf_use = typecheck_compbuf(zbuf, CB_VAL); + } + else no_zbuf = 1; // no zbuffer input + + // ok, process + old = img; + if (nqd->gamco) { + // gamma correct, blender func is simplified, fixed value & RGBA only, + // should make user param. also depremul and premul afterwards, gamma + // correction can't work with premul alpha + old = dupalloc_compbuf(img); + premul_compbuf(old, 1); + gamma_correct_compbuf(old, 0); + premul_compbuf(old, 0); + } + + new = alloc_compbuf(old->x, old->y, old->type, 1); + defocus_blur(node, new, old, zbuf_use, in[1]->vec[0]*nqd->scale, no_zbuf); + + if (nqd->gamco) { + premul_compbuf(new, 1); + gamma_correct_compbuf(new, 1); + premul_compbuf(new, 0); + free_compbuf(old); + } + if(node->exec & NODE_BREAK) { + free_compbuf(new); + new= NULL; + } + out[0]->data = new; + if (zbuf_use && (zbuf_use != zbuf)) free_compbuf(zbuf_use); +} + +static void node_composit_init_defocus(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + /* qdn: defocus node */ + NodeDefocus *nbd = MEM_callocN(sizeof(NodeDefocus), "node defocus data"); + nbd->bktype = 0; + nbd->rotation = 0.f; + nbd->preview = 1; + nbd->gamco = 0; + nbd->samples = 16; + nbd->fstop = 128.f; + nbd->maxblur = 0; + nbd->bthresh = 1.f; + nbd->scale = 1.f; + nbd->no_zbuf = 1; + node->storage = nbd; +} + +void register_node_type_cmp_defocus(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_DEFOCUS, "Defocus", NODE_CLASS_OP_FILTER, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_defocus_in, cmp_node_defocus_out); + node_type_size(&ntype, 150, 120, 200); + node_type_init(&ntype, node_composit_init_defocus); + node_type_storage(&ntype, "NodeDefocus", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_defocus); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_diffMatte.c b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c new file mode 100644 index 00000000000..a0fff88f5dc --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c @@ -0,0 +1,151 @@ +/* + * $Id: CMP_diffMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Bob Holcomb + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_diffMatte.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* ******************* channel Difference Matte ********************************* */ +static bNodeSocketTemplate cmp_node_diff_matte_in[]={ + {SOCK_RGBA,1,"Image 1", 0.8f, 0.8f, 0.8f, 1.0f}, + {SOCK_RGBA,1,"Image 2", 0.8f, 0.8f, 0.8f, 1.0f}, + {-1,0,""} +}; + +static bNodeSocketTemplate cmp_node_diff_matte_out[]={ + {SOCK_RGBA,0,"Image"}, + {SOCK_FLOAT,0,"Matte"}, + {-1,0,""} +}; + +static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float *inColor2) +{ + NodeChroma *c= (NodeChroma *)node->storage; + float tolerence=c->t1; + float falloff=c->t2; + float difference; + float alpha; + + difference= fabs(inColor2[0]-inColor1[0])+ + fabs(inColor2[1]-inColor1[1])+ + fabs(inColor2[2]-inColor1[2]); + + /*average together the distances*/ + difference=difference/3.0; + + VECCOPY(outColor, inColor1); + + /*make 100% transparent*/ + if(difference < tolerence) { + outColor[3]=0.0; + } + /*in the falloff region, make partially transparent */ + else if(difference < falloff+tolerence) { + difference=difference-tolerence; + alpha=difference/falloff; + /*only change if more transparent than before */ + if(alpha < inColor1[3]) { + outColor[3]=alpha; + } + else { /* leave as before */ + outColor[3]=inColor1[3]; + } + } + else { + /*foreground object*/ + outColor[3]= inColor1[3]; + } +} + +static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf *outbuf=0; + CompBuf *imbuf1=0; + CompBuf *imbuf2=0; + NodeChroma *c; + + /*is anything connected?*/ + if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; + + /*must have an image imput*/ + if(in[0]->data==NULL) return; + + + imbuf1=typecheck_compbuf(in[0]->data, CB_RGBA); + + /* if there's an image, use that, if not use the color */ + if(in[1]->data) { + imbuf2=typecheck_compbuf(in[1]->data, CB_RGBA); + } + + c=node->storage; + outbuf=dupalloc_compbuf(imbuf1); + + /* note, processor gets a keyvals array passed on as buffer constant */ + composit2_pixel_processor(node, outbuf, imbuf1, in[0]->vec, imbuf2, in[1]->vec, do_diff_matte, CB_RGBA, CB_RGBA); + + out[0]->data=outbuf; + if(out[1]->hasoutput) + out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A); + generate_preview(data, node, outbuf); + + if(imbuf1!=in[0]->data) + free_compbuf(imbuf1); + + if(imbuf2!=in[1]->data) + free_compbuf(imbuf2); +} + +static void node_composit_init_diff_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); + node->storage= c; + c->t1= 0.1f; + c->t2= 0.1f; +} + +void register_node_type_cmp_diff_matte(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_DIFF_MATTE, "Difference Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_diff_matte_in, cmp_node_diff_matte_out); + node_type_size(&ntype, 200, 80, 250); + node_type_init(&ntype, node_composit_init_diff_matte); + node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_diff_matte); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_dilate.c b/source/blender/nodes/composite/nodes/node_composite_dilate.c new file mode 100644 index 00000000000..ef47fdbfef0 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_dilate.c @@ -0,0 +1,163 @@ +/* + * $Id: CMP_dilate.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_dilate.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** Dilate/Erode ******************** */ + +static bNodeSocketTemplate cmp_node_dilateerode_in[]= { + { SOCK_FLOAT, 1, "Mask", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_dilateerode_out[]= { + { SOCK_FLOAT, 0, "Mask"}, + { -1, 0, "" } +}; + +static void morpho_dilate(CompBuf *cbuf) +{ + int x, y; + float *p, *rectf = cbuf->rect; + + for (y=0; y < cbuf->y; y++) { + for (x=0; x < cbuf->x-1; x++) { + p = rectf + cbuf->x*y + x; + *p = MAX2(*p, *(p + 1)); + } + } + + for (y=0; y < cbuf->y; y++) { + for (x=cbuf->x-1; x >= 1; x--) { + p = rectf + cbuf->x*y + x; + *p = MAX2(*p, *(p - 1)); + } + } + + for (x=0; x < cbuf->x; x++) { + for (y=0; y < cbuf->y-1; y++) { + p = rectf + cbuf->x*y + x; + *p = MAX2(*p, *(p + cbuf->x)); + } + } + + for (x=0; x < cbuf->x; x++) { + for (y=cbuf->y-1; y >= 1; y--) { + p = rectf + cbuf->x*y + x; + *p = MAX2(*p, *(p - cbuf->x)); + } + } +} + +static void morpho_erode(CompBuf *cbuf) +{ + int x, y; + float *p, *rectf = cbuf->rect; + + for (y=0; y < cbuf->y; y++) { + for (x=0; x < cbuf->x-1; x++) { + p = rectf + cbuf->x*y + x; + *p = MIN2(*p, *(p + 1)); + } + } + + for (y=0; y < cbuf->y; y++) { + for (x=cbuf->x-1; x >= 1; x--) { + p = rectf + cbuf->x*y + x; + *p = MIN2(*p, *(p - 1)); + } + } + + for (x=0; x < cbuf->x; x++) { + for (y=0; y < cbuf->y-1; y++) { + p = rectf + cbuf->x*y + x; + *p = MIN2(*p, *(p + cbuf->x)); + } + } + + for (x=0; x < cbuf->x; x++) { + for (y=cbuf->y-1; y >= 1; y--) { + p = rectf + cbuf->x*y + x; + *p = MIN2(*p, *(p - cbuf->x)); + } + } + +} + +static void node_composit_exec_dilateerode(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: mask */ + /* stack order out: mask */ + if(out[0]->hasoutput==0) + return; + + /* input no image? then only color operation */ + if(in[0]->data==NULL) { + out[0]->vec[0] = out[0]->vec[1] = out[0]->vec[2] = 0.0f; + out[0]->vec[3] = 0.0f; + } + else { + /* make output size of input image */ + CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_VAL); + CompBuf *stackbuf= dupalloc_compbuf(cbuf); + short i; + + if (node->custom2 > 0) { // positive, dilate + for (i = 0; i < node->custom2; i++) + morpho_dilate(stackbuf); + } else if (node->custom2 < 0) { // negative, erode + for (i = 0; i > node->custom2; i--) + morpho_erode(stackbuf); + } + + if(cbuf!=in[0]->data) + free_compbuf(cbuf); + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_dilateerode(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_DILATEERODE, "Dilate/Erode", NODE_CLASS_OP_FILTER, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_dilateerode_in, cmp_node_dilateerode_out); + node_type_size(&ntype, 130, 100, 320); + node_type_exec(&ntype, node_composit_exec_dilateerode); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_directionalblur.c b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c new file mode 100644 index 00000000000..3d541120a61 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c @@ -0,0 +1,146 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Alfredo de Greef (eeshlo) + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_directionalblur.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +static bNodeSocketTemplate cmp_node_dblur_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_dblur_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static CompBuf *dblur(bNode *node, CompBuf *img, int iterations, int wrap, + float center_x, float center_y, float dist, float angle, float spin, float zoom) +{ + if ((dist != 0.f) || (spin != 0.f) || (zoom != 0.f)) { + void (*getpix)(CompBuf*, float, float, float*) = wrap ? qd_getPixelLerpWrap : qd_getPixelLerp; + const float a= angle * (float)M_PI / 180.f; + const float itsc= 1.f / pow(2.f, (float)iterations); + float D; + float center_x_pix, center_y_pix; + float tx, ty; + float sc, rot; + CompBuf *tmp; + int i, j; + + tmp= dupalloc_compbuf(img); + + D= dist * sqrtf(img->x * img->x + img->y * img->y); + center_x_pix= center_x * img->x; + center_y_pix= center_y * img->y; + + tx= itsc * D * cos(a); + ty= -itsc * D * sin(a); + sc= itsc * zoom; + rot= itsc * spin * (float)M_PI / 180.f; + + /* blur the image */ + for(i= 0; i < iterations; ++i) { + const float cs= cos(rot), ss= sin(rot); + const float isc= 1.f / (1.f + sc); + unsigned int x, y; + float col[4]= {0,0,0,0}; + + for(y= 0; y < img->y; ++y) { + const float v= isc * (y - center_y_pix) + ty; + + for(x= 0; x < img->x; ++x) { + const float u= isc * (x - center_x_pix) + tx; + unsigned int p= (x + y * img->x) * img->type; + + getpix(tmp, cs * u + ss * v + center_x_pix, cs * v - ss * u + center_y_pix, col); + + /* mix img and transformed tmp */ + for(j= 0; j < 4; ++j) + img->rect[p + j]= AVG2(img->rect[p + j], col[j]); + } + } + + /* copy img to tmp */ + if(i != (iterations - 1)) + memcpy(tmp->rect, img->rect, sizeof(float) * img->x * img->y * img->type); + + /* double transformations */ + tx *= 2.f, ty *= 2.f; + sc *= 2.f, rot *= 2.f; + + if(node->exec & NODE_BREAK) break; + } + + free_compbuf(tmp); + } + + return img; +} + +static void node_composit_exec_dblur(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + NodeDBlurData *ndbd= node->storage; + CompBuf *new, *img= in[0]->data; + + if((img == NULL) || (out[0]->hasoutput == 0)) return; + + if (img->type != CB_RGBA) + new = typecheck_compbuf(img, CB_RGBA); + else + new = dupalloc_compbuf(img); + + out[0]->data= dblur(node, new, ndbd->iter, ndbd->wrap, ndbd->center_x, ndbd->center_y, ndbd->distance, ndbd->angle, ndbd->spin, ndbd->zoom); +} + +static void node_composit_init_dblur(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeDBlurData *ndbd= MEM_callocN(sizeof(NodeDBlurData), "node dblur data"); + node->storage= ndbd; + ndbd->center_x= 0.5; + ndbd->center_y= 0.5; +} + +void register_node_type_cmp_dblur(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_dblur_in, cmp_node_dblur_out); + node_type_size(&ntype, 150, 120, 200); + node_type_init(&ntype, node_composit_init_dblur); + node_type_storage(&ntype, "NodeDBlurData", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_dblur); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_displace.c b/source/blender/nodes/composite/nodes/node_composite_displace.c new file mode 100644 index 00000000000..4688553d27f --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_displace.c @@ -0,0 +1,199 @@ +/* + * $Id: CMP_displace.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_displace.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** Displace ******************** */ + +static bNodeSocketTemplate cmp_node_displace_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_VECTOR, 1, "Vector", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_TRANSLATION}, + { SOCK_FLOAT, 1, "X Scale", 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, "Y Scale", 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f, PROP_FACTOR}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_displace_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +/* minimum distance (in pixels) a pixel has to be displaced + * in order to take effect */ +#define DISPLACE_EPSILON 0.01 + +static void do_displace(bNode *node, CompBuf *stackbuf, CompBuf *cbuf, CompBuf *vecbuf, float *UNUSED(veccol), CompBuf *xbuf, CompBuf *ybuf, float *xscale, float *yscale) +{ + ImBuf *ibuf; + int x, y; + float p_dx, p_dy; /* main displacement in pixel space */ + float d_dx, d_dy; + float dxt, dyt; + float u, v; + float xs, ys; + float vec[3], vecdx[3], vecdy[3]; + float col[3]; + + ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); + ibuf->rect_float= cbuf->rect; + + for(y=0; y < stackbuf->y; y++) { + for(x=0; x < stackbuf->x; x++) { + /* calc pixel coordinates */ + qd_getPixel(vecbuf, x-vecbuf->xof, y-vecbuf->yof, vec); + + if (xbuf) + qd_getPixel(xbuf, x-xbuf->xof, y-xbuf->yof, &xs); + else + xs = xscale[0]; + + if (ybuf) + qd_getPixel(ybuf, x-ybuf->xof, y-ybuf->yof, &ys); + else + ys = yscale[0]; + + /* clamp x and y displacement to triple image resolution - + * to prevent hangs from huge values mistakenly plugged in eg. z buffers */ + CLAMP(xs, -stackbuf->x*4, stackbuf->x*4); + CLAMP(ys, -stackbuf->y*4, stackbuf->y*4); + + p_dx = vec[0] * xs; + p_dy = vec[1] * ys; + + /* if no displacement, then just copy this pixel */ + if (fabsf(p_dx) < DISPLACE_EPSILON && fabsf(p_dy) < DISPLACE_EPSILON) { + qd_getPixel(cbuf, x-cbuf->xof, y-cbuf->yof, col); + qd_setPixel(stackbuf, x, y, col); + continue; + } + + /* displaced pixel in uv coords, for image sampling */ + u = (x - cbuf->xof - p_dx + 0.5f) / (float)stackbuf->x; + v = (y - cbuf->yof - p_dy + 0.5f) / (float)stackbuf->y; + + + /* calc derivatives */ + qd_getPixel(vecbuf, x-vecbuf->xof+1, y-vecbuf->yof, vecdx); + qd_getPixel(vecbuf, x-vecbuf->xof, y-vecbuf->yof+1, vecdy); + d_dx = vecdx[0] * xs; + d_dy = vecdy[0] * ys; + + /* clamp derivatives to minimum displacement distance in UV space */ + dxt = p_dx - d_dx; + dyt = p_dy - d_dy; + + dxt = signf(dxt)*maxf(fabsf(dxt), DISPLACE_EPSILON)/(float)stackbuf->x; + dyt = signf(dyt)*maxf(fabsf(dyt), DISPLACE_EPSILON)/(float)stackbuf->y; + + ibuf_sample(ibuf, u, v, dxt, dyt, col); + qd_setPixel(stackbuf, x, y, col); + + if(node->exec & NODE_BREAK) break; + } + + if(node->exec & NODE_BREAK) break; + } + IMB_freeImBuf(ibuf); + + +/* simple method for reference, linear interpolation */ +/* + int x, y; + float dx, dy; + float u, v; + float vec[3]; + float col[3]; + + for(y=0; y < stackbuf->y; y++) { + for(x=0; x < stackbuf->x; x++) { + qd_getPixel(vecbuf, x, y, vec); + + dx = vec[0] * (xscale[0]); + dy = vec[1] * (yscale[0]); + + u = (x - dx + 0.5f) / (float)stackbuf->x; + v = (y - dy + 0.5f) / (float)stackbuf->y; + + qd_getPixelLerp(cbuf, u*cbuf->x - 0.5f, v*cbuf->y - 0.5f, col); + qd_setPixel(stackbuf, x, y, col); + } + } +*/ +} + + +static void node_composit_exec_displace(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + if(out[0]->hasoutput==0) + return; + + if(in[0]->data && in[1]->data) { + CompBuf *cbuf= in[0]->data; + CompBuf *vecbuf= in[1]->data; + CompBuf *xbuf= in[2]->data; + CompBuf *ybuf= in[3]->data; + CompBuf *stackbuf; + + cbuf= typecheck_compbuf(cbuf, CB_RGBA); + vecbuf= typecheck_compbuf(vecbuf, CB_VEC3); + xbuf= typecheck_compbuf(xbuf, CB_VAL); + ybuf= typecheck_compbuf(ybuf, CB_VAL); + + stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + do_displace(node, stackbuf, cbuf, vecbuf, in[1]->vec, xbuf, ybuf, in[2]->vec, in[3]->vec); + + out[0]->data= stackbuf; + + + if(cbuf!=in[0]->data) + free_compbuf(cbuf); + if(vecbuf!=in[1]->data) + free_compbuf(vecbuf); + } +} + +void register_node_type_cmp_displace(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_displace_in, cmp_node_displace_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_displace); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c new file mode 100644 index 00000000000..c895eab391c --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c @@ -0,0 +1,148 @@ +/* + * $Id: CMP_distanceMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Bob Holcomb + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_distanceMatte.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* ******************* channel Distance Matte ********************************* */ +static bNodeSocketTemplate cmp_node_distance_matte_in[]={ + {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f}, + {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f}, + {-1,0,""} +}; + +static bNodeSocketTemplate cmp_node_distance_matte_out[]={ + {SOCK_RGBA,0,"Image"}, + {SOCK_FLOAT,0,"Matte"}, + {-1,0,""} +}; + +/* note, keyvals is passed on from caller as stack array */ +/* might have been nicer as temp struct though... */ +static void do_distance_matte(bNode *node, float *out, float *in) +{ + NodeChroma *c= (NodeChroma *)node->storage; + float tolerence=c->t1; + float falloff=c->t2; + float distance; + float alpha; + + distance=sqrt((c->key[0]-in[0])*(c->key[0]-in[0]) + + (c->key[1]-in[1])*(c->key[1]-in[1]) + + (c->key[2]-in[2])*(c->key[2]-in[2])); + + VECCOPY(out, in); + + /*make 100% transparent */ + if(distance < tolerence) { + out[3]=0.0; + } + /*in the falloff region, make partially transparent */ + else if(distance < falloff+tolerence){ + distance=distance-tolerence; + alpha=distance/falloff; + /*only change if more transparent than before */ + if(alpha < in[3]) { + out[3]=alpha; + } + else { /* leave as before */ + out[3]=in[3]; + } + } + else { + out[3]=in[3]; + } +} + +static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* + Loosely based on the Sequencer chroma key plug-in, but enhanced to work in other color spaces and + uses a different difference function (suggested in forums of vfxtalk.com). + */ + CompBuf *workbuf; + CompBuf *inbuf; + NodeChroma *c; + + /*is anything connected?*/ + if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; + /*must have an image imput*/ + if(in[0]->data==NULL) return; + + inbuf=typecheck_compbuf(in[0]->data, CB_RGBA); + + c=node->storage; + workbuf=dupalloc_compbuf(inbuf); + + /*use the input color*/ + c->key[0]= in[1]->vec[0]; + c->key[1]= in[1]->vec[1]; + c->key[2]= in[1]->vec[2]; + + /* note, processor gets a keyvals array passed on as buffer constant */ + composit1_pixel_processor(node, workbuf, workbuf, in[0]->vec, do_distance_matte, CB_RGBA); + + + out[0]->data=workbuf; + if(out[1]->hasoutput) + out[1]->data=valbuf_from_rgbabuf(workbuf, CHAN_A); + generate_preview(data, node, workbuf); + + if(inbuf!=in[0]->data) + free_compbuf(inbuf); +} + +static void node_composit_init_distance_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); + node->storage= c; + c->t1= 0.1f; + c->t2= 0.1f; +} + +void register_node_type_cmp_distance_matte(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_DIST_MATTE, "Distance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_distance_matte_in, cmp_node_distance_matte_out); + node_type_size(&ntype, 200, 80, 250); + node_type_init(&ntype, node_composit_init_distance_matte); + node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_distance_matte); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_filter.c b/source/blender/nodes/composite/nodes/node_composite_filter.c new file mode 100644 index 00000000000..6beeec49c63 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_filter.c @@ -0,0 +1,239 @@ +/* + * $Id: CMP_filter.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_filter.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** FILTER ******************** */ +static bNodeSocketTemplate cmp_node_filter_in[]= { + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_filter_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_filter_edge(CompBuf *out, CompBuf *in, float *filter, float fac) +{ + float *row1, *row2, *row3; + float *fp, f1, f2, mfac= 1.0f-fac; + int rowlen, x, y, c, pix= in->type; + + rowlen= in->x; + + for(y=0; yy; y++) { + /* setup rows */ + if(y==0) row1= in->rect; + else row1= in->rect + pix*(y-1)*rowlen; + + row2= in->rect + y*pix*rowlen; + + if(y==in->y-1) row3= row2; + else row3= row2 + pix*rowlen; + + fp= out->rect + pix*y*rowlen; + + if(pix==CB_RGBA) { + QUATCOPY(fp, row2); + fp+= pix; + + for(x=2; xtype; + + rowlen= in->x; + + for(y=0; yy; y++) { + /* setup rows */ + if(y==0) row1= in->rect; + else row1= in->rect + pixlen*(y-1)*rowlen; + + row2= in->rect + y*pixlen*rowlen; + + if(y==in->y-1) row3= row2; + else row3= row2 + pixlen*rowlen; + + fp= out->rect + pixlen*(y)*rowlen; + + if(pixlen==1) { + fp[0]= row2[0]; + fp+= 1; + + for(x=2; xhasoutput==0) return; + + /* stack order in: Image */ + /* stack order out: Image */ + + if(in[1]->data) { + /* make output size of first available input image */ + CompBuf *cbuf= in[1]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1); /* allocs */ + + /* warning note: xof and yof are applied in pixelprocessor, but should be copied otherwise? */ + stackbuf->xof= cbuf->xof; + stackbuf->yof= cbuf->yof; + + switch(node->custom1) { + case CMP_FILT_SOFT: + do_filter3(stackbuf, cbuf, soft, in[0]->vec[0]); + break; + case CMP_FILT_SHARP: + do_filter3(stackbuf, cbuf, sharp, in[0]->vec[0]); + break; + case CMP_FILT_LAPLACE: + do_filter3(stackbuf, cbuf, laplace, in[0]->vec[0]); + break; + case CMP_FILT_SOBEL: + do_filter_edge(stackbuf, cbuf, sobel, in[0]->vec[0]); + break; + case CMP_FILT_PREWITT: + do_filter_edge(stackbuf, cbuf, prewitt, in[0]->vec[0]); + break; + case CMP_FILT_KIRSCH: + do_filter_edge(stackbuf, cbuf, kirsch, in[0]->vec[0]); + break; + case CMP_FILT_SHADOW: + do_filter3(stackbuf, cbuf, shadow, in[0]->vec[0]); + break; + } + + out[0]->data= stackbuf; + + generate_preview(data, node, out[0]->data); + } +} + + +void register_node_type_cmp_filter(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_FILTER, "Filter", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_filter_in, cmp_node_filter_out); + node_type_size(&ntype, 80, 40, 120); + node_type_label(&ntype, node_filter_label); + node_type_exec(&ntype, node_composit_exec_filter); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_flip.c b/source/blender/nodes/composite/nodes/node_composite_flip.c new file mode 100644 index 00000000000..026130641a3 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_flip.c @@ -0,0 +1,106 @@ +/* + * $Id: CMP_flip.c 36333 2011-04-26 09:27:43Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_flip.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** Flip ******************** */ +static bNodeSocketTemplate cmp_node_flip_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_flip_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void node_composit_exec_flip(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + if(in[0]->data) { + CompBuf *cbuf= in[0]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1); /* note, this returns zero'd image */ + int i, src_pix, src_width, src_height, srcydelt, outydelt, x, y; + float *srcfp, *outfp; + + src_pix= cbuf->type; + src_width= cbuf->x; + src_height= cbuf->y; + srcfp= cbuf->rect; + outfp= stackbuf->rect; + srcydelt= src_width*src_pix; + outydelt= srcydelt; + + if(node->custom1) { /*set up output pointer for y flip*/ + outfp+= (src_height-1)*outydelt; + outydelt= -outydelt; + } + + for(y=0; ycustom1 == 1) { /* no x flip so just copy line*/ + memcpy(outfp, srcfp, sizeof(float) * src_pix * src_width); + srcfp+=srcydelt; + } + else { + outfp += (src_width-1)*src_pix; + for(x=0; xdata= stackbuf; + + } +} + +void register_node_type_cmp_flip(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_FLIP, "Flip", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_flip_in, cmp_node_flip_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_flip); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_gamma.c b/source/blender/nodes/composite/nodes/node_composite_gamma.c new file mode 100644 index 00000000000..d191f649f1f --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_gamma.c @@ -0,0 +1,90 @@ +/* +* $Id: CMP_gamma.c 36593 2011-05-10 11:19:26Z lukastoenne $ +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* The Original Code is Copyright (C) 2006 Blender Foundation. +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): none yet. +* +* ***** END GPL LICENSE BLOCK ***** + +*/ + +/** \file blender/nodes/composite/nodes/node_composite_gamma.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** Gamma Tools ******************** */ + +static bNodeSocketTemplate cmp_node_gamma_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Gamma", 1.0f, 0.0f, 0.0f, 0.0f, 0.001f, 10.0f, PROP_UNSIGNED}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_gamma_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_gamma(bNode *UNUSED(node), float *out, float *in, float *fac) +{ + int i=0; + for(i=0; i<3; i++) { + /* check for negative to avoid nan's */ + out[i] = (in[i] > 0.0f)? pow(in[i],fac[0]): in[i]; + } + out[3] = in[3]; +} +static void node_composit_exec_gamma(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: Fac, Image */ + /* stack order out: Image */ + if(out[0]->hasoutput==0) return; + + /* input no image? then only color operation */ + if(in[0]->data==NULL) { + do_gamma(node, out[0]->vec, in[0]->vec, in[1]->vec); + } + else { + /* make output size of input image */ + CompBuf *cbuf= in[0]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); // allocs + + composit2_pixel_processor(node, stackbuf, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_gamma, CB_RGBA, CB_VAL); + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_gamma(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_gamma_in, cmp_node_gamma_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_gamma); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/composite/nodes/node_composite_glare.c b/source/blender/nodes/composite/nodes/node_composite_glare.c new file mode 100644 index 00000000000..0890b9ba24b --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_glare.c @@ -0,0 +1,506 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Alfredo de Greef (eeshlo) + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_glare.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +static bNodeSocketTemplate cmp_node_glare_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_glare_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + + +// mix two images, src buffer does not have to be same size, +static void mixImages(CompBuf *dst, CompBuf *src, float mix) +{ + int x, y; + fRGB c1, c2, *dcolp, *scolp; + const float mf = 2.f - 2.f*fabsf(mix - 0.5f); + if ((dst->x == src->x) && (dst->y == src->y)) { + for (y=0; yy; y++) { + dcolp = (fRGB*)&dst->rect[y*dst->x*dst->type]; + scolp = (fRGB*)&src->rect[y*dst->x*dst->type]; + for (x=0; xx; x++) { + fRGB_copy(c1, dcolp[x]); + fRGB_copy(c2, scolp[x]); + c1[0] += mix*(c2[0] - c1[0]); + c1[1] += mix*(c2[1] - c1[1]); + c1[2] += mix*(c2[2] - c1[2]); + if (c1[0] < 0.f) c1[0] = 0.f; + if (c1[1] < 0.f) c1[1] = 0.f; + if (c1[2] < 0.f) c1[2] = 0.f; + fRGB_mult(c1, mf); + fRGB_copy(dcolp[x], c1); + } + } + } + else { + float xr = src->x / (float)dst->x; + float yr = src->y / (float)dst->y; + for (y=0; yy; y++) { + dcolp = (fRGB*)&dst->rect[y*dst->x*dst->type]; + for (x=0; xx; x++) { + fRGB_copy(c1, dcolp[x]); + qd_getPixelLerp(src, (x + 0.5f)*xr - 0.5f, (y + 0.5f)*yr - 0.5f, c2); + c1[0] += mix*(c2[0] - c1[0]); + c1[1] += mix*(c2[1] - c1[1]); + c1[2] += mix*(c2[2] - c1[2]); + if (c1[0] < 0.f) c1[0] = 0.f; + if (c1[1] < 0.f) c1[1] = 0.f; + if (c1[2] < 0.f) c1[2] = 0.f; + fRGB_mult(c1, mf); + fRGB_copy(dcolp[x], c1); + } + } + } +} + + +// adds src to dst image, must be of same size +static void addImage(CompBuf* dst, CompBuf* src, float scale) +{ + if ((dst->x == src->x) && (dst->y == src->y)) { + int p = dst->x*dst->y*dst->type; + float *dcol = dst->rect, *scol = src->rect; + while (p--) *dcol++ += *scol++ * scale; + } +} + + +// returns possibly downscaled copy of all pixels above threshold +static CompBuf* BTP(CompBuf* src, float threshold, int scaledown) +{ + int x, y; + CompBuf* bsrc = qd_downScaledCopy(src, scaledown); + float* cr = bsrc->rect; + for (y=0; yy; ++y) + for (x=0; xx; ++x, cr+=4) { + if ((0.212671f*cr[0] + 0.71516f*cr[1] + 0.072169f*cr[2]) >= threshold) { + cr[0] -= threshold, cr[1] -= threshold, cr[2] -= threshold; + cr[0] = MAX2(cr[0], 0.f); + cr[1] = MAX2(cr[1], 0.f); + cr[2] = MAX2(cr[2], 0.f); + } + else cr[0] = cr[1] = cr[2] = 0.f; + } + return bsrc; +} + +//-------------------------------------------------------------------------------------------- +// simple 4-point star filter + +static void star4(NodeGlare* ndg, CompBuf* dst, CompBuf* src) +{ + int x, y, i, xm, xp, ym, yp; + float c[4] = {0,0,0,0}, tc[4] = {0,0,0,0}; + CompBuf *tbuf1, *tbuf2, *tsrc; + const float f1 = 1.f - ndg->fade, f2 = (1.f - f1)*0.5f; + //const float t3 = ndg->threshold*3.f; + const float sc = (float)(1 << ndg->quality); + const float isc = 1.f/sc; + + tsrc = BTP(src, ndg->threshold, (int)sc); + + tbuf1 = dupalloc_compbuf(tsrc); + tbuf2 = dupalloc_compbuf(tsrc); + + for (i=0; iiter; i++) { + // (x || x-1, y-1) to (x || x+1, y+1) + // F + for (y=0; yy; y++) { + ym = y - i; + yp = y + i; + for (x=0; xx; x++) { + xm = x - i; + xp = x + i; + qd_getPixel(tbuf1, x, y, c); + fRGB_mult(c, f1); + qd_getPixel(tbuf1, (ndg->angle ? xm : x), ym, tc); + fRGB_madd(c, tc, f2); + qd_getPixel(tbuf1, (ndg->angle ? xp : x), yp, tc); + fRGB_madd(c, tc, f2); + qd_setPixel(tbuf1, x, y, c); + } + } + // B + for (y=tbuf1->y-1; y>=0; y--) { + ym = y - i; + yp = y + i; + for (x=tbuf1->x-1; x>=0; x--) { + xm = x - i; + xp = x + i; + qd_getPixel(tbuf1, x, y, c); + fRGB_mult(c, f1); + qd_getPixel(tbuf1, (ndg->angle ? xm : x), ym, tc); + fRGB_madd(c, tc, f2); + qd_getPixel(tbuf1, (ndg->angle ? xp : x), yp, tc); + fRGB_madd(c, tc, f2); + qd_setPixel(tbuf1, x, y, c); + } + } + // (x-1, y || y+1) to (x+1, y || y-1) + // F + for (y=0; yy; y++) { + ym = y - i; + yp = y + i; + for (x=0; xx; x++) { + xm = x - i; + xp = x + i; + qd_getPixel(tbuf2, x, y, c); + fRGB_mult(c, f1); + qd_getPixel(tbuf2, xm, (ndg->angle ? yp : y), tc); + fRGB_madd(c, tc, f2); + qd_getPixel(tbuf2, xp, (ndg->angle ? ym : y), tc); + fRGB_madd(c, tc, f2); + qd_setPixel(tbuf2, x, y, c); + } + } + // B + for (y=tbuf2->y-1; y>=0; y--) { + ym = y - i; + yp = y + i; + for (x=tbuf2->x-1; x>=0; x--) { + xm = x - i; + xp = x + i; + qd_getPixel(tbuf2, x, y, c); + fRGB_mult(c, f1); + qd_getPixel(tbuf2, xm, (ndg->angle ? yp : y), tc); + fRGB_madd(c, tc, f2); + qd_getPixel(tbuf2, xp, (ndg->angle ? ym : y), tc); + fRGB_madd(c, tc, f2); + qd_setPixel(tbuf2, x, y, c); + } + } + } + + for (y=0; yy; ++y) + for (x=0; xx; ++x) { + unsigned int p = (x + y*tbuf1->x)*tbuf1->type; + tbuf1->rect[p] += tbuf2->rect[p]; + tbuf1->rect[p+1] += tbuf2->rect[p+1]; + tbuf1->rect[p+2] += tbuf2->rect[p+2]; + } + + for (y=0; yy; ++y) { + const float m = 0.5f + 0.5f*ndg->mix; + for (x=0; xx; ++x) { + unsigned int p = (x + y*dst->x)*dst->type; + qd_getPixelLerp(tbuf1, x*isc, y*isc, tc); + dst->rect[p] = src->rect[p] + m*(tc[0] - src->rect[p]); + dst->rect[p+1] = src->rect[p+1] + m*(tc[1] - src->rect[p+1]); + dst->rect[p+2] = src->rect[p+2] + m*(tc[2] - src->rect[p+2]); + } + } + + free_compbuf(tbuf1); + free_compbuf(tbuf2); + free_compbuf(tsrc); +} + +//-------------------------------------------------------------------------------------------- +// streak filter + +static void streaks(NodeGlare* ndg, CompBuf* dst, CompBuf* src) +{ + CompBuf *bsrc, *tsrc, *tdst, *sbuf; + int x, y, n; + unsigned int nump=0; + fRGB c1, c2, c3, c4; + float a, ang = 360.f/(float)ndg->angle; + + bsrc = BTP(src, ndg->threshold, 1 << ndg->quality); + tsrc = dupalloc_compbuf(bsrc); // sample from buffer + tdst = alloc_compbuf(tsrc->x, tsrc->y, tsrc->type, 1); // sample to buffer + sbuf = alloc_compbuf(tsrc->x, tsrc->y, tsrc->type, 1); // streak sum buffer + + + for (a=0.f; a<360.f; a+=ang) { + const float an = (a + (float)ndg->angle_ofs)*(float)M_PI/180.f; + const float vx = cos((double)an), vy = sin((double)an); + for (n=0; niter; ++n) { + const float p4 = pow(4.0, (double)n); + const float vxp = vx*p4, vyp = vy*p4; + const float wt = pow((double)ndg->fade, (double)p4); + const float cmo = 1.f - pow((double)ndg->colmod, (double)n+1); // colormodulation amount relative to current pass + float* tdstcol = tdst->rect; + for (y=0; yy; ++y) { + for (x=0; xx; ++x, tdstcol+=4) { + // first pass no offset, always same for every pass, exact copy, + // otherwise results in uneven brightness, only need once + if (n==0) qd_getPixel(tsrc, x, y, c1); else c1[0]=c1[1]=c1[2]=0; + qd_getPixelLerp(tsrc, x + vxp, y + vyp, c2); + qd_getPixelLerp(tsrc, x + vxp*2.f, y + vyp*2.f, c3); + qd_getPixelLerp(tsrc, x + vxp*3.f, y + vyp*3.f, c4); + // modulate color to look vaguely similar to a color spectrum + fRGB_rgbmult(c2, 1.f, cmo, cmo); + fRGB_rgbmult(c3, cmo, cmo, 1.f); + fRGB_rgbmult(c4, cmo, 1.f, cmo); + tdstcol[0] = 0.5f*(tdstcol[0] + c1[0] + wt*(c2[0] + wt*(c3[0] + wt*c4[0]))); + tdstcol[1] = 0.5f*(tdstcol[1] + c1[1] + wt*(c2[1] + wt*(c3[1] + wt*c4[1]))); + tdstcol[2] = 0.5f*(tdstcol[2] + c1[2] + wt*(c2[2] + wt*(c3[2] + wt*c4[2]))); + } + } + memcpy(tsrc->rect, tdst->rect, sizeof(float)*tdst->x*tdst->y*tdst->type); + } + + addImage(sbuf, tsrc, 1.f/(float)(6 - ndg->iter)); + memset(tdst->rect, 0, tdst->x*tdst->y*tdst->type*sizeof(float)); + memcpy(tsrc->rect, bsrc->rect, bsrc->x*bsrc->y*bsrc->type*sizeof(float)); + nump++; + } + + mixImages(dst, sbuf, 0.5f + 0.5f*ndg->mix); + + free_compbuf(tsrc); + free_compbuf(tdst); + free_compbuf(sbuf); + free_compbuf(bsrc); +} + + +//-------------------------------------------------------------------------------------------- +// Ghosts (lensflare) + +static float smoothMask(float x, float y) +{ + float t; + x = 2.f*x - 1.f, y = 2.f*y - 1.f; + if ((t = 1.f - sqrtf(x*x + y*y)) <= 0.f) return 0.f; + return t; +} + +static void ghosts(NodeGlare* ndg, CompBuf* dst, CompBuf* src) +{ + // colormodulation and scale factors (cm & scalef) for 16 passes max: 64 + int x, y, n, p, np; + fRGB c, tc, cm[64]; + float sc, isc, u, v, sm, s, t, ofs, scalef[64]; + CompBuf *tbuf1, *tbuf2, *gbuf; + const float cmo = 1.f - ndg->colmod; + const int qt = 1 << ndg->quality; + const float s1 = 4.f/(float)qt, s2 = 2.f*s1; + + gbuf = BTP(src, ndg->threshold, qt); + tbuf1 = dupalloc_compbuf(gbuf); + IIR_gauss(tbuf1, s1, 0, 3); + IIR_gauss(tbuf1, s1, 1, 3); + IIR_gauss(tbuf1, s1, 2, 3); + tbuf2 = dupalloc_compbuf(tbuf1); + IIR_gauss(tbuf2, s2, 0, 3); + IIR_gauss(tbuf2, s2, 1, 3); + IIR_gauss(tbuf2, s2, 2, 3); + + if (ndg->iter & 1) ofs = 0.5f; else ofs = 0.f; + for (x=0; x<(ndg->iter*4); x++) { + y = x & 3; + cm[x][0] = cm[x][1] = cm[x][2] = 1; + if (y==1) fRGB_rgbmult(cm[x], 1.f, cmo, cmo); + if (y==2) fRGB_rgbmult(cm[x], cmo, cmo, 1.f); + if (y==3) fRGB_rgbmult(cm[x], cmo, 1.f, cmo); + scalef[x] = 2.1f*(1.f-(x+ofs)/(float)(ndg->iter*4)); + if (x & 1) scalef[x] = -0.99f/scalef[x]; + } + + sc = 2.13; + isc = -0.97; + for (y=0; yy; y++) { + v = (float)(y+0.5f) / (float)gbuf->y; + for (x=0; xx; x++) { + u = (float)(x+0.5f) / (float)gbuf->x; + s = (u-0.5f)*sc + 0.5f, t = (v-0.5f)*sc + 0.5f; + qd_getPixelLerp(tbuf1, s*gbuf->x, t*gbuf->y, c); + sm = smoothMask(s, t); + fRGB_mult(c, sm); + s = (u-0.5f)*isc + 0.5f, t = (v-0.5f)*isc + 0.5f; + qd_getPixelLerp(tbuf2, s*gbuf->x - 0.5f, t*gbuf->y - 0.5f, tc); + sm = smoothMask(s, t); + fRGB_madd(c, tc, sm); + qd_setPixel(gbuf, x, y, c); + } + } + + memset(tbuf1->rect, 0, tbuf1->x*tbuf1->y*tbuf1->type*sizeof(float)); + for (n=1; niter; n++) { + for (y=0; yy; y++) { + v = (float)(y+0.5f) / (float)gbuf->y; + for (x=0; xx; x++) { + u = (float)(x+0.5f) / (float)gbuf->x; + tc[0] = tc[1] = tc[2] = 0.f; + for (p=0;p<4;p++) { + np = (n<<2) + p; + s = (u-0.5f)*scalef[np] + 0.5f; + t = (v-0.5f)*scalef[np] + 0.5f; + qd_getPixelLerp(gbuf, s*gbuf->x - 0.5f, t*gbuf->y - 0.5f, c); + fRGB_colormult(c, cm[np]); + sm = smoothMask(s, t)*0.25f; + fRGB_madd(tc, c, sm); + } + p = (x + y*tbuf1->x)*tbuf1->type; + tbuf1->rect[p] += tc[0]; + tbuf1->rect[p+1] += tc[1]; + tbuf1->rect[p+2] += tc[2]; + } + } + memcpy(gbuf->rect, tbuf1->rect, tbuf1->x*tbuf1->y*tbuf1->type*sizeof(float)); + } + + free_compbuf(tbuf1); + free_compbuf(tbuf2); + + mixImages(dst, gbuf, 0.5f + 0.5f*ndg->mix); + free_compbuf(gbuf); +} + +//-------------------------------------------------------------------------------------------- +// Fog glow (convolution with kernel of exponential falloff) + +static void fglow(NodeGlare* ndg, CompBuf* dst, CompBuf* src) +{ + int x, y; + float scale, u, v, r, w, d; + fRGB fcol; + CompBuf *tsrc, *ckrn; + unsigned int sz = 1 << ndg->size; + const float cs_r = 1.f, cs_g = 1.f, cs_b = 1.f; + + // temp. src image + tsrc = BTP(src, ndg->threshold, 1 << ndg->quality); + // make the convolution kernel + ckrn = alloc_compbuf(sz, sz, CB_RGBA, 1); + + scale = 0.25f*sqrtf(sz*sz); + + for (y=0; ymix); + free_compbuf(tsrc); +} + +//-------------------------------------------------------------------------------------------- + +static void node_composit_exec_glare(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf *new, *src, *img = in[0]->data; + NodeGlare* ndg = node->storage; + + if ((img == NULL) || (out[0]->hasoutput == 0)) return; + + if (img->type != CB_RGBA) { + new = typecheck_compbuf(img, CB_RGBA); + src = typecheck_compbuf(img, CB_RGBA); + } else { + new = dupalloc_compbuf(img); + src = dupalloc_compbuf(img); + } + + { + int x, y; + for (y=0; yy; ++y) { + fRGB* col = (fRGB*)&new->rect[y*new->x*new->type]; + for (x=0; xx; ++x) { + col[x][0] = MAX2(col[x][0], 0.f); + col[x][1] = MAX2(col[x][1], 0.f); + col[x][2] = MAX2(col[x][2], 0.f); + } + } + } + + switch (ndg->type) { + case 0: + star4(ndg, new, src); + break; + case 1: + fglow(ndg, new, src); + break; + case 3: + ghosts(ndg, new, src); + break; + case 2: + default: + streaks(ndg, new, src); + break; + } + + free_compbuf(src); + out[0]->data = new; +} + +static void node_composit_init_glare(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeGlare *ndg = MEM_callocN(sizeof(NodeGlare), "node glare data"); + ndg->quality = 1; + ndg->type = 2; + ndg->iter = 3; + ndg->colmod = 0.25; + ndg->mix = 0; + ndg->threshold = 1; + ndg->angle = 4; + ndg->angle_ofs = 0; + ndg->fade = 0.9; + ndg->size = 8; + node->storage = ndg; +} + +void register_node_type_cmp_glare(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_GLARE, "Glare", NODE_CLASS_OP_FILTER, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_glare_in, cmp_node_glare_out); + node_type_size(&ntype, 150, 120, 200); + node_type_init(&ntype, node_composit_init_glare); + node_type_storage(&ntype, "NodeGlare", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_glare); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c new file mode 100644 index 00000000000..525728ade31 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c @@ -0,0 +1,122 @@ +/* + * $Id: CMP_hueSatVal.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_hueSatVal.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** Hue Saturation ******************** */ +static bNodeSocketTemplate cmp_node_hue_sat_in[]= { + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_hue_sat_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_hue_sat_fac(bNode *node, float *out, float *in, float *fac) +{ + NodeHueSat *nhs= node->storage; + + if(*fac!=0.0f && (nhs->hue!=0.5f || nhs->sat!=1.0 || nhs->val!=1.0)) { + float col[3], hsv[3], mfac= 1.0f - *fac; + + rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); + hsv[0]+= (nhs->hue - 0.5f); + if(hsv[0]>1.0) hsv[0]-=1.0; else if(hsv[0]<0.0) hsv[0]+= 1.0; + hsv[1]*= nhs->sat; + hsv[2]*= nhs->val; + hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); + + out[0]= mfac*in[0] + *fac*col[0]; + out[1]= mfac*in[1] + *fac*col[1]; + out[2]= mfac*in[2] + *fac*col[2]; + out[3]= in[3]; + } + else { + QUATCOPY(out, in); + } +} + +static void node_composit_exec_hue_sat(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: Fac, Image */ + /* stack order out: Image */ + if(out[0]->hasoutput==0) return; + + /* input no image? then only color operation */ + if(in[1]->data==NULL) { + do_hue_sat_fac(node, out[0]->vec, in[1]->vec, in[0]->vec); + } + else { + /* make output size of input image */ + CompBuf *cbuf= dupalloc_compbuf(in[1]->data); + CompBuf *stackbuf=typecheck_compbuf(cbuf,CB_RGBA); + + composit2_pixel_processor(node, stackbuf, stackbuf, in[1]->vec, in[0]->data, in[0]->vec, do_hue_sat_fac, CB_RGBA, CB_VAL); + + out[0]->data= stackbuf; + + /* get rid of intermediary cbuf if it's extra */ + if(stackbuf!=cbuf) + free_compbuf(cbuf); + } +} + +static void node_composit_init_hue_sat(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeHueSat *nhs= MEM_callocN(sizeof(NodeHueSat), "node hue sat"); + node->storage= nhs; + nhs->hue= 0.5f; + nhs->sat= 1.0f; + nhs->val= 1.0f; +} + +void register_node_type_cmp_hue_sat(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_hue_sat_in, cmp_node_hue_sat_out); + node_type_size(&ntype, 150, 80, 250); + node_type_init(&ntype, node_composit_init_hue_sat); + node_type_storage(&ntype, "NodeHueSat", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_hue_sat); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_huecorrect.c b/source/blender/nodes/composite/nodes/node_composite_huecorrect.c new file mode 100644 index 00000000000..edf26aed882 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_huecorrect.c @@ -0,0 +1,170 @@ +/* + * $Id: CMP_huecorrect.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Matt Ebb + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_huecorrect.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +static bNodeSocketTemplate cmp_node_huecorrect_in[]= { + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_huecorrect_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_huecorrect(bNode *node, float *out, float *in) +{ + float hsv[3], f; + + rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); + + /* adjust hue, scaling returned default 0.5 up to 1 */ + f = curvemapping_evaluateF(node->storage, 0, hsv[0]); + hsv[0] += f-0.5f; + + /* adjust saturation, scaling returned default 0.5 up to 1 */ + f = curvemapping_evaluateF(node->storage, 1, hsv[0]); + hsv[1] *= (f * 2.f); + + /* adjust value, scaling returned default 0.5 up to 1 */ + f = curvemapping_evaluateF(node->storage, 2, hsv[0]); + hsv[2] *= (f * 2.f); + + hsv[0] = hsv[0] - floor(hsv[0]); /* mod 1.0 */ + CLAMP(hsv[1], 0.f, 1.f); + + /* convert back to rgb */ + hsv_to_rgb(hsv[0], hsv[1], hsv[2], out, out+1, out+2); + + out[3]= in[3]; +} + +static void do_huecorrect_fac(bNode *node, float *out, float *in, float *fac) +{ + float hsv[3], rgb[3], f; + const float mfac = 1.f-*fac; + + rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); + + /* adjust hue, scaling returned default 0.5 up to 1 */ + f = curvemapping_evaluateF(node->storage, 0, hsv[0]); + hsv[0] += f-0.5f; + + /* adjust saturation, scaling returned default 0.5 up to 1 */ + f = curvemapping_evaluateF(node->storage, 1, hsv[0]); + hsv[1] *= (f * 2.f); + + /* adjust value, scaling returned default 0.5 up to 1 */ + f = curvemapping_evaluateF(node->storage, 2, hsv[0]); + hsv[2] *= (f * 2.f); + + hsv[0] = hsv[0] - floor(hsv[0]); /* mod 1.0 */ + CLAMP(hsv[1], 0.f, 1.f); + + /* convert back to rgb */ + hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2); + + out[0]= mfac*in[0] + *fac*rgb[0]; + out[1]= mfac*in[1] + *fac*rgb[1]; + out[2]= mfac*in[2] + *fac*rgb[2]; + out[3]= in[3]; +} + +static void node_composit_exec_huecorrect(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf *cbuf= in[1]->data; + CompBuf *stackbuf; + + /* stack order input: fac, image, black level, white level */ + /* stack order output: image */ + + if(out[0]->hasoutput==0) + return; + + if(in[0]->vec[0] == 0.f && in[0]->data == NULL) { + out[0]->data = pass_on_compbuf(cbuf); + return; + } + + /* input no image? then only color operation */ + if(in[1]->data==NULL) { + do_huecorrect_fac(node, out[0]->vec, in[1]->vec, in[0]->vec); + } + + if (cbuf) { + stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* make output size of input image */ + + if ((in[0]->data==NULL) && (in[0]->vec[0] >= 1.f)) + composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_huecorrect, CB_RGBA); + else + composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, in[0]->vec, do_huecorrect_fac, CB_RGBA, CB_VAL); + + out[0]->data= stackbuf; + } + +} + +static void node_composit_init_huecorrect(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + CurveMapping *cumapping = node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); + int c; + + cumapping->preset = CURVE_PRESET_MID9; + + for (c=0; c<3; c++) { + CurveMap *cuma = &cumapping->cm[c]; + curvemap_reset(cuma, &cumapping->clipr, cumapping->preset, CURVEMAP_SLOPE_POSITIVE); + } + + /* default to showing Saturation */ + cumapping->cur = 1; +} + +void register_node_type_cmp_huecorrect(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_HUECORRECT, "Hue Correct", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_huecorrect_in, cmp_node_huecorrect_out); + node_type_size(&ntype, 320, 140, 400); + node_type_init(&ntype, node_composit_init_huecorrect); + node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); + node_type_exec(&ntype, node_composit_exec_huecorrect); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_idMask.c b/source/blender/nodes/composite/nodes/node_composite_idMask.c new file mode 100644 index 00000000000..97d84997697 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_idMask.c @@ -0,0 +1,125 @@ +/* + * $Id: CMP_idMask.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_idMask.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** ID Mask ******************** */ + +static bNodeSocketTemplate cmp_node_idmask_in[]= { + { SOCK_FLOAT, 1, "ID value", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_idmask_out[]= { + { SOCK_FLOAT, 0, "Alpha"}, + { -1, 0, "" } +}; + +/* stackbuf should be zeroed */ +static void do_idmask(CompBuf *stackbuf, CompBuf *cbuf, float idnr) +{ + float *rect; + int x; + char *abuf= MEM_mapallocN(cbuf->x*cbuf->y, "anti ali buf"); + + rect= cbuf->rect; + for(x= cbuf->x*cbuf->y - 1; x>=0; x--) + if(rect[x]==idnr) + abuf[x]= 255; + + antialias_tagbuf(cbuf->x, cbuf->y, abuf); + + rect= stackbuf->rect; + for(x= cbuf->x*cbuf->y - 1; x>=0; x--) + if(abuf[x]>1) + rect[x]= (1.0f/255.0f)*(float)abuf[x]; + + MEM_freeN(abuf); +} + +/* full sample version */ +static void do_idmask_fsa(CompBuf *stackbuf, CompBuf *cbuf, float idnr) +{ + float *rect, *rs; + int x; + + rect= cbuf->rect; + rs= stackbuf->rect; + for(x= cbuf->x*cbuf->y - 1; x>=0; x--) + if(rect[x]==idnr) + rs[x]= 1.0f; + +} + + +static void node_composit_exec_idmask(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + RenderData *rd= data; + + if(out[0]->hasoutput==0) + return; + + if(in[0]->data) { + CompBuf *cbuf= in[0]->data; + CompBuf *stackbuf; + + if(cbuf->type!=CB_VAL) + return; + + stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */; + + if(rd->scemode & R_FULL_SAMPLE) + do_idmask_fsa(stackbuf, cbuf, (float)node->custom1); + else + do_idmask(stackbuf, cbuf, (float)node->custom1); + + out[0]->data= stackbuf; + } +} + + +void register_node_type_cmp_idmask(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_idmask_in, cmp_node_idmask_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_idmask); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c new file mode 100644 index 00000000000..1278202d5b5 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_image.c @@ -0,0 +1,452 @@ +/* + * $Id: CMP_image.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_image.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** IMAGE (and RenderResult, multilayer image) ******************** */ + +static bNodeSocketTemplate cmp_node_rlayers_out[]= { + { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 0, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_VECTOR, 0, "UV", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_VECTOR, 0, "Speed", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "Diffuse", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "Specular", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "Shadow", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "AO", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "Reflect", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "Refract", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "Indirect", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 0, "IndexOB", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 0, "IndexMA", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 0, "Mist", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "Emit", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 0, "Environment",0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + + +/* note: this function is used for multilayer too, to ensure uniform + handling with BKE_image_get_ibuf() */ +static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *iuser) +{ + ImBuf *ibuf; + CompBuf *stackbuf; + int type; + + float *rect; + int alloc= FALSE; + + ibuf= BKE_image_get_ibuf(ima, iuser); + if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL)) { + return NULL; + } + + if (ibuf->rect_float == NULL) { + IMB_float_from_rect(ibuf); + } + + /* now we need a float buffer from the image with matching color management */ + /* XXX weak code, multilayer is excluded from this */ + if(ibuf->channels == 4 && ima->rr==NULL) { + if(rd->color_mgt_flag & R_COLOR_MANAGEMENT) { + if(ibuf->profile != IB_PROFILE_NONE) { + rect= ibuf->rect_float; + } + else { + rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image"); + srgb_to_linearrgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y); + alloc= TRUE; + } + } + else { + if(ibuf->profile == IB_PROFILE_NONE) { + rect= ibuf->rect_float; + } + else { + rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image"); + linearrgb_to_srgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y); + alloc= TRUE; + } + } + } + else { + /* non-rgba passes can't use color profiles */ + rect= ibuf->rect_float; + } + /* done coercing into the correct color management */ + + + type= ibuf->channels; + + if(rd->scemode & R_COMP_CROP) { + stackbuf= get_cropped_compbuf(&rd->disprect, rect, ibuf->x, ibuf->y, type); + if(alloc) + MEM_freeN(rect); + } + else { + /* we put imbuf copy on stack, cbuf knows rect is from other ibuf when freed! */ + stackbuf= alloc_compbuf(ibuf->x, ibuf->y, type, FALSE); + stackbuf->rect= rect; + stackbuf->malloc= alloc; + } + + /*code to respect the premul flag of images; I'm + not sure if this is a good idea for multilayer images, + since it never worked before for them. + if (type==CB_RGBA && ima->flag & IMA_DO_PREMUL) { + //premul the image + int i; + float *pixel = stackbuf->rect; + + for (i=0; ix*stackbuf->y; i++, pixel += 4) { + pixel[0] *= pixel[3]; + pixel[1] *= pixel[3]; + pixel[2] *= pixel[3]; + } + } + */ + return stackbuf; +} + +static CompBuf *node_composit_get_zimage(bNode *node, RenderData *rd) +{ + ImBuf *ibuf= BKE_image_get_ibuf((Image *)node->id, node->storage); + CompBuf *zbuf= NULL; + + if(ibuf && ibuf->zbuf_float) { + if(rd->scemode & R_COMP_CROP) { + zbuf= get_cropped_compbuf(&rd->disprect, ibuf->zbuf_float, ibuf->x, ibuf->y, CB_VAL); + } + else { + zbuf= alloc_compbuf(ibuf->x, ibuf->y, CB_VAL, 0); + zbuf->rect= ibuf->zbuf_float; + } + } + return zbuf; +} + +/* check if layer is available, returns pass buffer */ +static CompBuf *compbuf_multilayer_get(RenderData *rd, RenderLayer *rl, Image *ima, ImageUser *iuser, int passtype) +{ + RenderPass *rpass; + short index; + + for(index=0, rpass= rl->passes.first; rpass; rpass= rpass->next, index++) + if(rpass->passtype==passtype) + break; + + if(rpass) { + CompBuf *cbuf; + + iuser->pass= index; + BKE_image_multilayer_index(ima->rr, iuser); + cbuf= node_composit_get_image(rd, ima, iuser); + + return cbuf; + } + return NULL; +} + +static void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack **out, Image *ima, ImageUser *iuser) +{ + if(out[RRES_OUT_Z]->hasoutput) + out[RRES_OUT_Z]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_Z); + if(out[RRES_OUT_VEC]->hasoutput) + out[RRES_OUT_VEC]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_VECTOR); + if(out[RRES_OUT_NORMAL]->hasoutput) + out[RRES_OUT_NORMAL]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_NORMAL); + if(out[RRES_OUT_UV]->hasoutput) + out[RRES_OUT_UV]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_UV); + + if(out[RRES_OUT_RGBA]->hasoutput) + out[RRES_OUT_RGBA]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_RGBA); + if(out[RRES_OUT_DIFF]->hasoutput) + out[RRES_OUT_DIFF]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_DIFFUSE); + if(out[RRES_OUT_SPEC]->hasoutput) + out[RRES_OUT_SPEC]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_SPEC); + if(out[RRES_OUT_SHADOW]->hasoutput) + out[RRES_OUT_SHADOW]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_SHADOW); + if(out[RRES_OUT_AO]->hasoutput) + out[RRES_OUT_AO]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_AO); + if(out[RRES_OUT_REFLECT]->hasoutput) + out[RRES_OUT_REFLECT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_REFLECT); + if(out[RRES_OUT_REFRACT]->hasoutput) + out[RRES_OUT_REFRACT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_REFRACT); + if(out[RRES_OUT_INDIRECT]->hasoutput) + out[RRES_OUT_INDIRECT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDIRECT); + if(out[RRES_OUT_INDEXOB]->hasoutput) + out[RRES_OUT_INDEXOB]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXOB); + if(out[RRES_OUT_INDEXMA]->hasoutput) + out[RRES_OUT_INDEXMA]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXMA); + if(out[RRES_OUT_MIST]->hasoutput) + out[RRES_OUT_MIST]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_MIST); + if(out[RRES_OUT_EMIT]->hasoutput) + out[RRES_OUT_EMIT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_EMIT); + if(out[RRES_OUT_ENV]->hasoutput) + out[RRES_OUT_ENV]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_ENVIRONMENT); +} + + +static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) +{ + + /* image assigned to output */ + /* stack order input sockets: col, alpha */ + if(node->id) { + RenderData *rd= data; + Image *ima= (Image *)node->id; + ImageUser *iuser= (ImageUser *)node->storage; + CompBuf *stackbuf= NULL; + + /* first set the right frame number in iuser */ + BKE_image_user_calc_frame(iuser, rd->cfra, 0); + + /* force a load, we assume iuser index will be set OK anyway */ + if(ima->type==IMA_TYPE_MULTILAYER) + BKE_image_get_ibuf(ima, iuser); + + if(ima->type==IMA_TYPE_MULTILAYER && ima->rr) { + RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer); + + if(rl) { + out[0]->data= stackbuf= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_COMBINED); + + /* go over all layers */ + outputs_multilayer_get(rd, rl, out, ima, iuser); + } + } + else { + stackbuf= node_composit_get_image(rd, ima, iuser); + + if (stackbuf) { + /*respect image premul option*/ + if (stackbuf->type==CB_RGBA && ima->flag & IMA_DO_PREMUL) { + int i; + float *pixel; + + /*first duplicate stackbuf->rect, since it's just a pointer + to the source imbuf, and we don't want to change that.*/ + stackbuf->rect = MEM_dupallocN(stackbuf->rect); + + /* since stackbuf now has allocated memory, rather than just a pointer, + * mark it as allocated so it can be freed properly */ + stackbuf->malloc=1; + + /*premul the image*/ + pixel = stackbuf->rect; + for (i=0; ix*stackbuf->y; i++, pixel += 4) { + pixel[0] *= pixel[3]; + pixel[1] *= pixel[3]; + pixel[2] *= pixel[3]; + } + } + + /* put image on stack */ + out[0]->data= stackbuf; + + if(out[2]->hasoutput) + out[2]->data= node_composit_get_zimage(node, rd); + } + } + + /* alpha and preview for both types */ + if(stackbuf) { + if(out[1]->hasoutput) + out[1]->data= valbuf_from_rgbabuf(stackbuf, CHAN_A); + + generate_preview(data, node, stackbuf); + } + } +} + +static void node_composit_init_image(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user"); + node->storage= iuser; + iuser->frames= 1; + iuser->sfra= 1; + iuser->fie_ima= 2; + iuser->ok= 1; +} + +void register_node_type_cmp_image(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, cmp_node_rlayers_out); + node_type_size(&ntype, 120, 80, 300); + node_type_init(&ntype, node_composit_init_image); + node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_image); + + nodeRegisterType(lb, &ntype); +} + + +/* **************** RENDER RESULT ******************** */ + +static CompBuf *compbuf_from_pass(RenderData *rd, RenderLayer *rl, int rectx, int recty, int passcode) +{ + float *fp= RE_RenderLayerGetPass(rl, passcode); + if(fp) { + CompBuf *buf; + int buftype= CB_VEC3; + + if(ELEM4(passcode, SCE_PASS_Z, SCE_PASS_INDEXOB, SCE_PASS_MIST, SCE_PASS_INDEXMA)) + buftype= CB_VAL; + else if(passcode==SCE_PASS_VECTOR) + buftype= CB_VEC4; + else if(ELEM(passcode, SCE_PASS_COMBINED, SCE_PASS_RGBA)) + buftype= CB_RGBA; + + if(rd->scemode & R_COMP_CROP) + buf= get_cropped_compbuf(&rd->disprect, fp, rectx, recty, buftype); + else { + buf= alloc_compbuf(rectx, recty, buftype, 0); + buf->rect= fp; + } + return buf; + } + return NULL; +} + +static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStack **out, int rectx, int recty) +{ + if(out[RRES_OUT_Z]->hasoutput) + out[RRES_OUT_Z]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_Z); + if(out[RRES_OUT_VEC]->hasoutput) + out[RRES_OUT_VEC]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_VECTOR); + if(out[RRES_OUT_NORMAL]->hasoutput) + out[RRES_OUT_NORMAL]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_NORMAL); + if(out[RRES_OUT_UV]->hasoutput) + out[RRES_OUT_UV]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_UV); + + if(out[RRES_OUT_RGBA]->hasoutput) + out[RRES_OUT_RGBA]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_RGBA); + if(out[RRES_OUT_DIFF]->hasoutput) + out[RRES_OUT_DIFF]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_DIFFUSE); + if(out[RRES_OUT_SPEC]->hasoutput) + out[RRES_OUT_SPEC]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_SPEC); + if(out[RRES_OUT_SHADOW]->hasoutput) + out[RRES_OUT_SHADOW]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_SHADOW); + if(out[RRES_OUT_AO]->hasoutput) + out[RRES_OUT_AO]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_AO); + if(out[RRES_OUT_REFLECT]->hasoutput) + out[RRES_OUT_REFLECT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_REFLECT); + if(out[RRES_OUT_REFRACT]->hasoutput) + out[RRES_OUT_REFRACT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_REFRACT); + if(out[RRES_OUT_INDIRECT]->hasoutput) + out[RRES_OUT_INDIRECT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDIRECT); + if(out[RRES_OUT_INDEXOB]->hasoutput) + out[RRES_OUT_INDEXOB]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDEXOB); + if(out[RRES_OUT_INDEXMA]->hasoutput) + out[RRES_OUT_INDEXMA]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDEXMA); + if(out[RRES_OUT_MIST]->hasoutput) + out[RRES_OUT_MIST]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_MIST); + if(out[RRES_OUT_EMIT]->hasoutput) + out[RRES_OUT_EMIT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_EMIT); + if(out[RRES_OUT_ENV]->hasoutput) + out[RRES_OUT_ENV]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_ENVIRONMENT); +} + +static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) +{ + Scene *sce= (Scene *)node->id; + Render *re= (sce)? RE_GetRender(sce->id.name): NULL; + RenderData *rd= data; + RenderResult *rr= NULL; + + if(re) + rr= RE_AcquireResultRead(re); + + if(rr) { + SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1); + if(srl) { + RenderLayer *rl= RE_GetRenderLayer(rr, srl->name); + if(rl && rl->rectf) { + CompBuf *stackbuf; + + /* we put render rect on stack, cbuf knows rect is from other ibuf when freed! */ + if(rd->scemode & R_COMP_CROP) + stackbuf= get_cropped_compbuf(&rd->disprect, rl->rectf, rr->rectx, rr->recty, CB_RGBA); + else { + stackbuf= alloc_compbuf(rr->rectx, rr->recty, CB_RGBA, 0); + stackbuf->rect= rl->rectf; + } + if(stackbuf==NULL) { + printf("Error; Preview Panel in UV Window returns zero sized image\n"); + } + else { + stackbuf->xof= rr->xof; + stackbuf->yof= rr->yof; + + /* put on stack */ + out[RRES_OUT_IMAGE]->data= stackbuf; + + if(out[RRES_OUT_ALPHA]->hasoutput) + out[RRES_OUT_ALPHA]->data= valbuf_from_rgbabuf(stackbuf, CHAN_A); + + node_composit_rlayers_out(rd, rl, out, rr->rectx, rr->recty); + + generate_preview(data, node, stackbuf); + } + } + } + } + + if(re) + RE_ReleaseResult(re); +} + + +void register_node_type_cmp_rlayers(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_R_LAYERS, "Render Layers", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, cmp_node_rlayers_out); + node_type_size(&ntype, 150, 100, 300); + node_type_exec(&ntype, node_composit_exec_rlayers); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_invert.c b/source/blender/nodes/composite/nodes/node_composite_invert.c new file mode 100644 index 00000000000..1f7589cae8f --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_invert.c @@ -0,0 +1,135 @@ +/* + * $Id: CMP_invert.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_invert.c + * \ingroup cmpnodes + */ + +#include "node_composite_util.h" + +/* **************** INVERT ******************** */ +static bNodeSocketTemplate cmp_node_invert_in[]= { + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_invert_out[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void do_invert(bNode *node, float *out, float *in) +{ + if(node->custom1 & CMP_CHAN_RGB) { + out[0] = 1.0f - in[0]; + out[1] = 1.0f - in[1]; + out[2] = 1.0f - in[2]; + } else + VECCOPY(out, in); + + if(node->custom1 & CMP_CHAN_A) + out[3] = 1.0f - in[3]; + else + out[3] = in[3]; +} + +static void do_invert_fac(bNode *node, float *out, float *in, float *fac) +{ + float col[4], facm; + + do_invert(node, col, in); + + /* blend inverted result against original input with fac */ + facm = 1.0 - fac[0]; + + if(node->custom1 & CMP_CHAN_RGB) { + col[0] = fac[0]*col[0] + (facm*in[0]); + col[1] = fac[0]*col[1] + (facm*in[1]); + col[2] = fac[0]*col[2] + (facm*in[2]); + } + if(node->custom1 & CMP_CHAN_A) + col[3] = fac[0]*col[3] + (facm*in[3]); + + QUATCOPY(out, col); +} + +static void node_composit_exec_invert(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: fac, Image, Image */ + /* stack order out: Image */ + float *fac= in[0]->vec; + + if(out[0]->hasoutput==0) return; + + /* input no image? then only color operation */ + if(in[1]->data==NULL && in[0]->data==NULL) { + do_invert_fac(node, out[0]->vec, in[1]->vec, fac); + } + else { + /* make output size of first available input image, or then size of fac */ + CompBuf *cbuf= in[1]->data?in[1]->data:in[0]->data; + + /* if neither RGB or A toggled on, pass through */ + if (node->custom1 != 0) { + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + if (fac[0] < 1.0f || in[0]->data!=NULL) + composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, fac, do_invert_fac, CB_RGBA, CB_VAL); + else + composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_invert, CB_RGBA); + out[0]->data= stackbuf; + return; + + } else { + out[0]->data = pass_on_compbuf(cbuf); + return; + } + } +} + +static void node_composit_init_invert(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->custom1 |= CMP_CHAN_RGB; +} + +/* custom1 = mix type */ +void register_node_type_cmp_invert(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_invert_in, cmp_node_invert_out); + node_type_size(&ntype, 120, 120, 140); + node_type_init(&ntype, node_composit_init_invert); + node_type_exec(&ntype, node_composit_exec_invert); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_lensdist.c b/source/blender/nodes/composite/nodes/node_composite_lensdist.c new file mode 100644 index 00000000000..85578deecbb --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_lensdist.c @@ -0,0 +1,207 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Alfredo de Greef (eeshlo) + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_lensdist.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +static bNodeSocketTemplate cmp_node_lensdist_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Distort", 0.f, 0.f, 0.f, 0.f, -0.999f, 1.f, PROP_NONE}, + { SOCK_FLOAT, 1, "Dispersion", 0.f, 0.f, 0.f, 0.f, 0.f, 1.f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_lensdist_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +/* assumes *dst is type RGBA */ +static void lensDistort(CompBuf *dst, CompBuf *src, float kr, float kg, float kb, int jit, int proj, int fit) +{ + int x, y, z; + const float cx = 0.5f*(float)dst->x, cy = 0.5f*(float)dst->y; + + if (proj) { + // shift + CompBuf *tsrc = dupalloc_compbuf(src); + + for (z=0; ztype; ++z) + IIR_gauss(tsrc, (kr+0.5f)*(kr+0.5f), z, 1); + kr *= 20.f; + + for (y=0; yy; y++) { + fRGB *colp = (fRGB*)&dst->rect[y*dst->x*dst->type]; + const float v = (y + 0.5f)/(float)dst->y; + + for (x=0; xx; x++) { + const float u = (x + 0.5f)/(float)dst->x; + + qd_getPixelLerpChan(tsrc, (u*dst->x + kr) - 0.5f, v*dst->y - 0.5f, 0, colp[x]); + if (tsrc->type == CB_VAL) + colp[x][1] = tsrc->rect[x + y*tsrc->x]; + else + colp[x][1] = tsrc->rect[(x + y*tsrc->x)*tsrc->type + 1]; + qd_getPixelLerpChan(tsrc, (u*dst->x - kr) - 0.5f, v*dst->y - 0.5f, 2, colp[x]+2); + + /* set alpha */ + colp[x][3]= 1.0f; + } + } + free_compbuf(tsrc); + } + else { + // Spherical + // Scale factor to make bottom/top & right/left sides fit in window after deform + // so in the case of pincushion (kn < 0), corners will be outside window. + // Now also optionally scales image such that black areas are not visible when distort factor is positive + // (makes distorted corners match window corners, but really only valid if mk<=0.5) + const float mk = MAX3(kr, kg, kb); + const float sc = (fit && (mk > 0.f)) ? (1.f/(1.f + 2.f*mk)) : (1.f/(1.f + mk)); + const float drg = 4.f*(kg - kr), dgb = 4.f*(kb - kg); + + kr *= 4.f, kg *= 4.f, kb *= 4.f; + + for (y=0; yy; y++) { + fRGB *colp = (fRGB*)&dst->rect[y*dst->x*dst->type]; + const float v = sc*((y + 0.5f) - cy)/cy; + + for (x=0; xx; x++) { + int dr = 0, dg = 0, db = 0; + float d, t, ln[6] = {0, 0, 0, 0, 0, 0}; + fRGB c1, tc = {0, 0, 0, 0}; + const float u = sc*((x + 0.5f) - cx)/cx; + int sta = 0, mid = 0, end = 0; + + if ((t = 1.f - kr*(u*u + v*v)) >= 0.f) { + d = 1.f/(1.f + sqrtf(t)); + ln[0] = (u*d + 0.5f)*dst->x - 0.5f, ln[1] = (v*d + 0.5f)*dst->y - 0.5f; + sta = 1; + } + if ((t = 1.f - kg*(u*u + v*v)) >= 0.f) { + d = 1.f/(1.f + sqrtf(t)); + ln[2] = (u*d + 0.5f)*dst->x - 0.5f, ln[3] = (v*d + 0.5f)*dst->y - 0.5f; + mid = 1; + } + if ((t = 1.f - kb*(u*u + v*v)) >= 0.f) { + d = 1.f/(1.f + sqrtf(t)); + ln[4] = (u*d + 0.5f)*dst->x - 0.5f, ln[5] = (v*d + 0.5f)*dst->y - 0.5f; + end = 1; + } + + if (sta && mid && end) { + // RG + const int dx = ln[2] - ln[0], dy = ln[3] - ln[1]; + const float dsf = sqrtf(dx*dx + dy*dy) + 1.f; + const int ds = (int)(jit ? ((dsf < 4.f) ? 2.f : sqrtf(dsf)) : dsf); + const float sd = 1.f/(float)ds; + + for (z=0; zx - 0.5f, (v*d + 0.5f)*dst->y - 0.5f, c1); + if (src->type == CB_VAL) c1[1] = c1[2] = c1[0]; + tc[0] += (1.f-tz)*c1[0], tc[1] += tz*c1[1]; + dr++, dg++; + } + // GB + { + const int dx = ln[4] - ln[2], dy = ln[5] - ln[3]; + const float dsf = sqrtf(dx*dx + dy*dy) + 1.f; + const int ds = (int)(jit ? ((dsf < 4.f) ? 2.f : sqrtf(dsf)) : dsf); + const float sd = 1.f/(float)ds; + + for (z=0; zx - 0.5f, (v*d + 0.5f)*dst->y - 0.5f, c1); + if (src->type == CB_VAL) c1[1] = c1[2] = c1[0]; + tc[1] += (1.f-tz)*c1[1], tc[2] += tz*c1[2]; + dg++, db++; + } + } + } + + if (dr) colp[x][0] = 2.f*tc[0] / (float)dr; + if (dg) colp[x][1] = 2.f*tc[1] / (float)dg; + if (db) colp[x][2] = 2.f*tc[2] / (float)db; + + /* set alpha */ + colp[x][3]= 1.0f; + } + } + } +} + + +static void node_composit_exec_lensdist(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf *new, *img = in[0]->data; + NodeLensDist *nld = node->storage; + const float k = MAX2(MIN2(in[1]->vec[0], 1.f), -0.999f); + // smaller dispersion range for somewhat more control + const float d = 0.25f*MAX2(MIN2(in[2]->vec[0], 1.f), 0.f); + const float kr = MAX2(MIN2((k+d), 1.f), -0.999f), kb = MAX2(MIN2((k-d), 1.f), -0.999f); + + if ((img==NULL) || (out[0]->hasoutput==0)) return; + + new = alloc_compbuf(img->x, img->y, CB_RGBA, 1); + + lensDistort(new, img, (nld->proj ? d : kr), k, kb, nld->jit, nld->proj, nld->fit); + + out[0]->data = new; +} + + +static void node_composit_init_lensdist(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeLensDist *nld = MEM_callocN(sizeof(NodeLensDist), "node lensdist data"); + nld->jit = nld->proj = nld->fit = 0; + node->storage = nld; +} + + +void register_node_type_cmp_lensdist(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_LENSDIST, "Lens Distortion", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_lensdist_in, cmp_node_lensdist_out); + node_type_size(&ntype, 150, 120, 200); + node_type_init(&ntype, node_composit_init_lensdist); + node_type_storage(&ntype, "NodeLensDist", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_lensdist); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_levels.c b/source/blender/nodes/composite/nodes/node_composite_levels.c new file mode 100644 index 00000000000..673ffe4cbef --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_levels.c @@ -0,0 +1,339 @@ +/* + * $Id: CMP_levels.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Bob Holcomb. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_levels.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** LEVELS ******************** */ +static bNodeSocketTemplate cmp_node_view_levels_in[]= { + { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_view_levels_out[]={ + {SOCK_FLOAT, 0,"Mean"}, + {SOCK_FLOAT, 0,"Std Dev"}, + {-1,0,""} +}; + +static void rgb_tobw(float r, float g, float b, float* out) +{ + *out= r*0.35f + g*0.45f + b*0.2f; +} + +static void fill_bins(bNode* node, CompBuf* in, int* bins) +{ + float value[4]; + int ivalue=0; + int x,y; + + /*fill bins */ + for(y=0; yy; y++) { + for(x=0; xx; x++) { + + /* get the pixel */ + qd_getPixel(in, x, y, value); + + if(value[3] > 0.0) { /* don't count transparent pixels */ + switch(node->custom1) { + case 1: { /* all colors */ + rgb_tobw(value[0],value[1],value[2], &value[0]); + value[0]=value[0]*255; /* scale to 0-255 range */ + ivalue=(int)value[0]; + break; + } + case 2: { /* red channel */ + value[0]=value[0]*255; /* scale to 0-255 range */ + ivalue=(int)value[0]; + break; + } + case 3: { /* green channel */ + value[1]=value[1]*255; /* scale to 0-255 range */ + ivalue=(int)value[1]; + break; + } + case 4: /*blue channel */ + { + value[2]=value[2]*255; /* scale to 0-255 range */ + ivalue=(int)value[2]; + break; + } + case 5: /* luminence */ + { + rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]); + value[0]=value[0]*255; /* scale to 0-255 range */ + ivalue=(int)value[0]; + break; + } + } /*end switch */ + + /*clip*/ + if(ivalue<0) ivalue=0; + if(ivalue>255) ivalue=255; + + /*put in the correct bin*/ + bins[ivalue]+=1; + } /*end if alpha */ + } + } +} + +static float brightness_mean(bNode* node, CompBuf* in) +{ + float sum=0.0; + int numPixels=0.0; + int x,y; + float value[4]; + + for(x=0; x< in->x; x++) { + for(y=0; y < in->y; y++) { + + /* get the pixel */ + qd_getPixel(in, x, y, value); + + if(value[3] > 0.0) { /* don't count transparent pixels */ + numPixels++; + switch(node->custom1) + { + case 1: + { + rgb_tobw(value[0],value[1],value[2], &value[0]); + sum+=value[0]; + break; + } + case 2: + { + sum+=value[0]; + break; + } + case 3: + { + sum+=value[1]; + break; + } + case 4: + { + sum+=value[2]; + break; + } + case 5: + { + rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]); + sum+=value[0]; + break; + } + } + } + } + } + + return sum/numPixels; +} + +static float brightness_standard_deviation(bNode* node, CompBuf* in, float mean) +{ + float sum=0.0; + int numPixels=0.0; + int x,y; + float value[4]; + + for(x=0; x< in->x; x++) { + for(y=0; y < in->y; y++) { + + /* get the pixel */ + qd_getPixel(in, x, y, value); + + if(value[3] > 0.0) { /* don't count transparent pixels */ + numPixels++; + switch(node->custom1) + { + case 1: + { + rgb_tobw(value[0],value[1],value[2], &value[0]); + sum+=(value[0]-mean)*(value[0]-mean); + break; + } + case 2: + { + sum+=value[0]; + sum+=(value[0]-mean)*(value[0]-mean); + break; + } + case 3: + { + sum+=value[1]; + sum+=(value[1]-mean)*(value[1]-mean); + break; + } + case 4: + { + sum+=value[2]; + sum+=(value[2]-mean)*(value[2]-mean); + break; + } + case 5: + { + rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]); + sum+=(value[0]-mean)*(value[0]-mean); + break; + } + } + } + } + } + + + return sqrt(sum/(float)(numPixels-1)); +} + +static void draw_histogram(bNode *node, CompBuf *out, int* bins) +{ + int x,y; + float color[4]; + float value; + int max; + + /* find max value */ + max=0; + for(x=0; x<256; x++) { + if(bins[x]>max) max=bins[x]; + } + + /*draw histogram in buffer */ + for(x=0; xx; x++) { + for(y=0;yy; y++) { + + /* get normalized value (0..255) */ + value=((float)bins[x]/(float)max)*255.0; + + if(y < (int)value) { /*if the y value is below the height of the bar for this line then draw with the color */ + switch (node->custom1) { + case 1: { /* draw in black */ + color[0]=0.0; color[1]=0.0; color[2]=0.0; color[3]=1.0; + break; + } + case 2: { /* draw in red */ + color[0]=1.0; color[1]=0.0; color[2]=0.0; color[3]=1.0; + break; + } + case 3: { /* draw in green */ + color[0]=0.0; color[1]=1.0; color[2]=0.0; color[3]=1.0; + break; + } + case 4: { /* draw in blue */ + color[0]=0.0; color[1]=0.0; color[2]=1.0; color[3]=1.0; + break; + } + case 5: { /* draw in white */ + color[0]=1.0; color[1]=1.0; color[2]=1.0; color[3]=1.0; + break; + } + } + } + else{ + color[0]=0.8; color[1]=0.8; color[2]=0.8; color[3]=1.0; + } + + /* set the color */ + qd_setPixel(out, x, y, color); + } + } +} + +static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf* cbuf; + CompBuf* histogram; + float mean, std_dev; + int bins[256]; + int x; + + if(in[0]->hasinput==0) return; + if(in[0]->data==NULL) return; + + histogram=alloc_compbuf(256, 256, CB_RGBA, 1); + cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); + + /*initalize bins*/ + for(x=0; x<256; x++) { + bins[x]=0; + } + + /*fill bins */ + fill_bins(node, in[0]->data, bins); + + /* draw the histogram chart */ + draw_histogram(node, histogram, bins); + + /* calculate the average brightness and contrast */ + mean=brightness_mean(node, in[0]->data); + std_dev=brightness_standard_deviation(node, in[0]->data, mean); + + /* Printf debuging ;) + printf("Mean: %f\n", mean); + printf("Std Dev: %f\n", std_dev); + */ + + if(out[0]->hasoutput) + out[0]->vec[0]= mean; + if(out[1]->hasoutput) + out[1]->vec[0]= std_dev; + + generate_preview(data, node, histogram); + + if(cbuf!=in[0]->data) + free_compbuf(cbuf); + free_compbuf(histogram); +} + +static void node_composit_init_view_levels(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->custom1=1; /*All channels*/ +} + +void register_node_type_cmp_view_levels(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_VIEW_LEVELS, "Levels", NODE_CLASS_OUTPUT, NODE_OPTIONS|NODE_PREVIEW); + node_type_socket_templates(&ntype, cmp_node_view_levels_in, cmp_node_view_levels_out); + node_type_size(&ntype, 140, 100, 320); + node_type_init(&ntype, node_composit_init_view_levels); + node_type_storage(&ntype, "ImageUser", NULL, NULL); + node_type_exec(&ntype, node_composit_exec_view_levels); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c new file mode 100644 index 00000000000..bc7676934fa --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c @@ -0,0 +1,125 @@ +/* + * $Id: CMP_lummaMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Bob Holcomb . + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_lummaMatte.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* ******************* Luma Matte Node ********************************* */ +static bNodeSocketTemplate cmp_node_luma_matte_in[]={ + {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f}, + {-1,0,""} +}; + +static bNodeSocketTemplate cmp_node_luma_matte_out[]={ + {SOCK_RGBA,0,"Image"}, + {SOCK_FLOAT,0,"Matte"}, + {-1,0,""} +}; + +static void do_luma_matte(bNode *node, float *out, float *in) +{ + NodeChroma *c=(NodeChroma *)node->storage; + float alpha; + + alpha=0.0; + + /* test range*/ + if(in[0]>c->t1) { + alpha=1.0; + } + else if(in[0]t2){ + alpha=0.0; + } + else {/*blend */ + alpha=(in[0]-c->t2)/(c->t1-c->t2); + } + + /* don't make something that was more transparent less transparent */ + if (alphahasinput==0) return; + if(in[0]->data==NULL) return; + if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; + + cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); + + outbuf=dupalloc_compbuf(cbuf); + + composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_yuva, CB_RGBA); + composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_luma_matte, CB_RGBA); + composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_yuva_to_rgba, CB_RGBA); + + generate_preview(data, node, outbuf); + out[0]->data=outbuf; + if (out[1]->hasoutput) + out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A); + if(cbuf!=in[0]->data) + free_compbuf(cbuf); +} + +static void node_composit_init_luma_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); + node->storage=c; + c->t1= 1.0f; + c->t2= 0.0f; +} + +void register_node_type_cmp_luma_matte(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_luma_matte_in, cmp_node_luma_matte_out); + node_type_size(&ntype, 200, 80, 250); + node_type_init(&ntype, node_composit_init_luma_matte); + node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_luma_matte); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_mapUV.c b/source/blender/nodes/composite/nodes/node_composite_mapUV.c new file mode 100644 index 00000000000..2d92c26b554 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_mapUV.c @@ -0,0 +1,180 @@ +/* + * $Id: CMP_mapUV.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_mapUV.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** Map UV ******************** */ + +static bNodeSocketTemplate cmp_node_mapuv_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_VECTOR, 1, "UV", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_mapuv_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +/* foreach UV, use these values to read in cbuf and write to stackbuf */ +/* stackbuf should be zeroed */ +static void do_mapuv(CompBuf *stackbuf, CompBuf *cbuf, CompBuf *uvbuf, float threshold) +{ + ImBuf *ibuf; + float *out= stackbuf->rect, *uv, *uvnext, *uvprev; + float dx, dy, alpha; + int x, y, sx, sy, row= 3*stackbuf->x; + + /* ibuf needed for sampling */ + ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); + ibuf->rect_float= cbuf->rect; + + /* vars for efficient looping */ + uv= uvbuf->rect; + uvnext= uv+row; + uvprev= uv-row; + sx= stackbuf->x; + sy= stackbuf->y; + + for(y=0; y0 && x0 && y 0.20f) dx= 0.20f; + if(dy > 0.20f) dy= 0.20f; + + ibuf_sample(ibuf, uv[0], uv[1], dx, dy, out); + /* premul */ + if(alpha<1.0f) { + out[0]*= alpha; + out[1]*= alpha; + out[2]*= alpha; + out[3]*= alpha; + } + } + } + } + } + + IMB_freeImBuf(ibuf); +} + + +static void node_composit_exec_mapuv(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + if(out[0]->hasoutput==0) + return; + + if(in[0]->data && in[1]->data) { + CompBuf *cbuf= in[0]->data; + CompBuf *uvbuf= in[1]->data; + CompBuf *stackbuf; + + cbuf= typecheck_compbuf(cbuf, CB_RGBA); + uvbuf= typecheck_compbuf(uvbuf, CB_VEC3); + stackbuf= alloc_compbuf(uvbuf->x, uvbuf->y, CB_RGBA, 1); /* allocs */; + + do_mapuv(stackbuf, cbuf, uvbuf, 0.05f*(float)node->custom1); + + out[0]->data= stackbuf; + + if(cbuf!=in[0]->data) + free_compbuf(cbuf); + if(uvbuf!=in[1]->data) + free_compbuf(uvbuf); + } +} + +void register_node_type_cmp_mapuv(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_mapuv_in, cmp_node_mapuv_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_mapuv); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_mapValue.c b/source/blender/nodes/composite/nodes/node_composite_mapValue.c new file mode 100644 index 00000000000..0d38aca4ce3 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_mapValue.c @@ -0,0 +1,103 @@ +/* + * $Id: CMP_mapValue.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_mapValue.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** MAP VALUE ******************** */ +static bNodeSocketTemplate cmp_node_map_value_in[]= { + { SOCK_FLOAT, 1, "Value", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_map_value_out[]= { + { SOCK_FLOAT, 0, "Value"}, + { -1, 0, "" } +}; + +static void do_map_value(bNode *node, float *out, float *src) +{ + TexMapping *texmap= node->storage; + + out[0]= (src[0] + texmap->loc[0])*texmap->size[0]; + if(texmap->flag & TEXMAP_CLIP_MIN) + if(out[0]min[0]) + out[0]= texmap->min[0]; + if(texmap->flag & TEXMAP_CLIP_MAX) + if(out[0]>texmap->max[0]) + out[0]= texmap->max[0]; +} + +static void node_composit_exec_map_value(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: valbuf */ + /* stack order out: valbuf */ + if(out[0]->hasoutput==0) return; + + /* input no image? then only value operation */ + if(in[0]->data==NULL) { + do_map_value(node, out[0]->vec, in[0]->vec); + } + else { + /* make output size of input image */ + CompBuf *cbuf= in[0]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */ + + composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_map_value, CB_VAL); + + out[0]->data= stackbuf; + } +} + + +static void node_composit_init_map_value(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= add_mapping(); +} + +void register_node_type_cmp_map_value(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_MAP_VALUE, "Map Value", NODE_CLASS_OP_VECTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_map_value_in, cmp_node_map_value_out); + node_type_size(&ntype, 100, 60, 150); + node_type_init(&ntype, node_composit_init_map_value); + node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_map_value); + + nodeRegisterType(lb, &ntype); +} + + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_math.c b/source/blender/nodes/composite/nodes/node_composite_math.c new file mode 100644 index 00000000000..2489491fdd8 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_math.c @@ -0,0 +1,214 @@ +/* + * $Id: CMP_math.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_math.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** SCALAR MATH ******************** */ +static bNodeSocketTemplate cmp_node_math_in[]= { + { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_math_out[]= { + { SOCK_FLOAT, 0, "Value"}, + { -1, 0, "" } +}; + +static void do_math(bNode *node, float *out, float *in, float *in2) +{ + switch(node->custom1) + { + case 0: /* Add */ + out[0]= in[0] + in2[0]; + break; + case 1: /* Subtract */ + out[0]= in[0] - in2[0]; + break; + case 2: /* Multiply */ + out[0]= in[0] * in2[0]; + break; + case 3: /* Divide */ + { + if(in2[0]==0) /* We don't want to divide by zero. */ + out[0]= 0.0; + else + out[0]= in[0] / in2[0]; + } + break; + case 4: /* Sine */ + out[0]= sin(in[0]); + break; + case 5: /* Cosine */ + out[0]= cos(in[0]); + break; + case 6: /* Tangent */ + out[0]= tan(in[0]); + break; + case 7: /* Arc-Sine */ + { + /* Can't do the impossible... */ + if(in[0] <= 1 && in[0] >= -1 ) + out[0]= asin(in[0]); + else + out[0]= 0.0; + } + break; + case 8: /* Arc-Cosine */ + { + /* Can't do the impossible... */ + if( in[0] <= 1 && in[0] >= -1 ) + out[0]= acos(in[0]); + else + out[0]= 0.0; + } + break; + case 9: /* Arc-Tangent */ + out[0]= atan(in[0]); + break; + case 10: /* Power */ + { + /* Only raise negative numbers by full integers */ + if( in[0] >= 0 ) { + out[0]= pow(in[0], in2[0]); + } else { + float y_mod_1 = fmod(in2[0], 1); + /* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */ + if (y_mod_1 > 0.999 || y_mod_1 < 0.001) { + out[0]= pow(in[0], floor(in2[0] + 0.5)); + } else { + out[0] = 0.0; + } + } + } + break; + case 11: /* Logarithm */ + { + /* Don't want any imaginary numbers... */ + if( in[0] > 0 && in2[0] > 0 ) + out[0]= log(in[0]) / log(in2[0]); + else + out[0]= 0.0; + } + break; + case 12: /* Minimum */ + { + if( in[0] < in2[0] ) + out[0]= in[0]; + else + out[0]= in2[0]; + } + break; + case 13: /* Maximum */ + { + if( in[0] > in2[0] ) + out[0]= in[0]; + else + out[0]= in2[0]; + } + break; + case 14: /* Round */ + { + /* round by the second value */ + if( in2[0] != 0.0f ) + out[0]= floorf(in[0] / in2[0] + 0.5f) * in2[0]; + else + out[0]= floorf(in[0] + 0.5f); + } + break; + case 15: /* Less Than */ + { + if( in[0] < in2[0] ) + out[0]= 1.0f; + else + out[0]= 0.0f; + } + break; + case 16: /* Greater Than */ + { + if( in[0] > in2[0] ) + out[0]= 1.0f; + else + out[0]= 0.0f; + } + break; + } +} + +static void node_composit_exec_math(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf *cbuf=in[0]->data; + CompBuf *cbuf2=in[1]->data; + CompBuf *stackbuf; + + /* check for inputs and outputs for early out*/ + if(out[0]->hasoutput==0) return; + + /* no image-color operation */ + if(in[0]->data==NULL && in[1]->data==NULL) { + do_math(node, out[0]->vec, in[0]->vec, in[1]->vec); + return; + } + + /*create output based on first input */ + if(cbuf) { + stackbuf=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); + } + /* and if it doesn't exist use the second input since we + know that one of them must exist at this point*/ + else { + stackbuf=alloc_compbuf(cbuf2->x, cbuf2->y, CB_VAL, 1); + } + + /* operate in case there's valid size */ + composit2_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, do_math, CB_VAL, CB_VAL); + out[0]->data= stackbuf; +} + +void register_node_type_cmp_math(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_math_in, cmp_node_math_out); + node_type_size(&ntype, 120, 110, 160); + node_type_label(&ntype, node_math_label); + node_type_exec(&ntype, node_composit_exec_math); + + nodeRegisterType(lb, &ntype); +} + + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_mixrgb.c b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c new file mode 100644 index 00000000000..a5dcfcc44da --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c @@ -0,0 +1,99 @@ +/* + * $Id: CMP_mixrgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_mixrgb.c + * \ingroup cmpnodes + */ + +#include "node_composite_util.h" + +/* **************** MIX RGB ******************** */ +static bNodeSocketTemplate cmp_node_mix_rgb_in[]= { + { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_mix_rgb_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_mix_rgb(bNode *node, float *out, float *in1, float *in2, float *fac) +{ + float col[3]; + + VECCOPY(col, in1); + if(node->custom2) + ramp_blend(node->custom1, col, col+1, col+2, in2[3]*fac[0], in2); + else + ramp_blend(node->custom1, col, col+1, col+2, fac[0], in2); + VECCOPY(out, col); + out[3]= in1[3]; +} + +static void node_composit_exec_mix_rgb(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: fac, Image, Image */ + /* stack order out: Image */ + float *fac= in[0]->vec; + + if(out[0]->hasoutput==0) return; + + /* input no image? then only color operation */ + if(in[1]->data==NULL && in[2]->data==NULL) { + do_mix_rgb(node, out[0]->vec, in[1]->vec, in[2]->vec, fac); + } + else { + /* make output size of first available input image */ + CompBuf *cbuf= in[1]->data?in[1]->data:in[2]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + composit3_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, in[0]->data, fac, do_mix_rgb, CB_RGBA, CB_RGBA, CB_VAL); + + out[0]->data= stackbuf; + + generate_preview(data, node, out[0]->data); + } +} + +/* custom1 = mix type */ +void register_node_type_cmp_mix_rgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_mix_rgb_in, cmp_node_mix_rgb_out); + node_type_size(&ntype, 110, 60, 120); + node_type_label(&ntype, node_blend_label); + node_type_exec(&ntype, node_composit_exec_mix_rgb); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_normal.c b/source/blender/nodes/composite/nodes/node_composite_normal.c new file mode 100644 index 00000000000..5f3c848903c --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_normal.c @@ -0,0 +1,109 @@ +/* + * $Id: CMP_normal.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_normal.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** NORMAL ******************** */ +static bNodeSocketTemplate cmp_node_normal_in[]= { + { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate cmp_node_normal_out[]= { + { SOCK_VECTOR, 0, "Normal"}, + { SOCK_FLOAT, 0, "Dot"}, + { -1, 0, "" } +}; + +static void do_normal(bNode *node, float *out, float *in) +{ + bNodeSocket *sock= node->outputs.first; + float *nor= ((bNodeSocketValueVector*)sock->default_value)->value; + + /* render normals point inside... the widget points outside */ + out[0]= -INPR(nor, in); +} + +/* generates normal, does dot product */ +static void node_composit_exec_normal(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + bNodeSocket *sock= node->outputs.first; + float *nor= ((bNodeSocketValueVector*)sock->default_value)->value; + /* stack order input: normal */ + /* stack order output: normal, value */ + + /* input no image? then only vector op */ + if(in[0]->data==NULL) { + VECCOPY(out[0]->vec, nor); + /* render normals point inside... the widget points outside */ + out[1]->vec[0]= -INPR(out[0]->vec, in[0]->vec); + } + else if(out[1]->hasoutput) { + /* make output size of input image */ + CompBuf *cbuf= in[0]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */ + + composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_normal, CB_VEC3); + + out[1]->data= stackbuf; + } + + +} + +static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) +{ + bNodeSocket *sock= node->outputs.first; + float *nor= ((bNodeSocketValueVector*)sock->default_value)->value; + + nor[0] = 0.0f; + nor[1] = 0.0f; + nor[2] = 1.0f; +} + +void register_node_type_cmp_normal(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_normal_in, cmp_node_normal_out); + node_type_init(&ntype, init); + node_type_size(&ntype, 100, 60, 200); + node_type_exec(&ntype, node_composit_exec_normal); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_normalize.c b/source/blender/nodes/composite/nodes/node_composite_normalize.c new file mode 100644 index 00000000000..1c5c3b57b80 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_normalize.c @@ -0,0 +1,117 @@ +/* + * $Id: CMP_normalize.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): gsr b3d, and a very minor edit from Robert Holcomb + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_normalize.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** NORMALIZE single channel, useful for Z buffer ******************** */ +static bNodeSocketTemplate cmp_node_normalize_in[]= { + { SOCK_FLOAT, 1, "Value", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_normalize_out[]= { + { SOCK_FLOAT, 0, "Value"}, + { -1, 0, "" } +}; + +static void do_normalize(bNode *UNUSED(node), float *out, float *src, float *min, float *mult) +{ + float res; + res = (src[0] - min[0]) * mult[0]; + if (res > 1.0f) { + out[0] = 1.0f; + } + else if (res < 0.0f) { + out[0] = 0.0f; + } + else { + out[0] = res; + } +} + +/* The code below assumes all data is inside range +- this, and that input buffer is single channel */ +#define BLENDER_ZMAX 10000.0f + +static void node_composit_exec_normalize(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: valbuf */ + /* stack order out: valbuf */ + if(out[0]->hasoutput==0) return; + + /* Input has no image buffer? Then pass the value */ + if(in[0]->data==NULL) { + QUATCOPY(out[0]->vec, in[0]->vec); + } + else { + float min = 1.0f+BLENDER_ZMAX; + float max = -1.0f-BLENDER_ZMAX; + float mult = 1.0f; + float *val; + /* make output size of input image */ + CompBuf *cbuf= in[0]->data; + int tot= cbuf->x*cbuf->y; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */ + + for (val = cbuf->rect; tot; tot--, val++) { + if ((*val > max) && (*val <= BLENDER_ZMAX)) { + max = *val; + } + if ((*val < min) && (*val >= -BLENDER_ZMAX)) { + min = *val; + } + } + /* In the rare case of flat buffer, which would cause a divide by 0, just pass the input to the output */ + if ((max-min) != 0.0f) { + mult = 1.0f/(max-min); + composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, NULL, &min, NULL, &mult, do_normalize, CB_VAL, CB_VAL, CB_VAL); + } else { + memcpy(stackbuf->rect, cbuf->rect, sizeof(float) * cbuf->x * cbuf->y); + } + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_normalize(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_normalize_in, cmp_node_normalize_out); + node_type_size(&ntype, 100, 60, 150); + node_type_exec(&ntype, node_composit_exec_normalize); + node_type_storage(&ntype, "TexMapping", NULL, NULL); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c new file mode 100644 index 00000000000..13391a4a790 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c @@ -0,0 +1,127 @@ +/* + * $Id: CMP_outputFile.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_outputFile.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** OUTPUT FILE ******************** */ +static bNodeSocketTemplate cmp_node_output_file_in[]= { + { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 1, "Z", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) +{ + /* image assigned to output */ + /* stack order input sockets: col, alpha */ + + if(in[0]->data) { + RenderData *rd= data; + NodeImageFile *nif= node->storage; + if(nif->sfra!=nif->efra && (rd->cfrasfra || rd->cfra>nif->efra)) { + return; /* BAIL OUT RETURN */ + } + else if (!G.rendering) { + /* only output files when rendering a sequence - + * otherwise, it overwrites the output files just + * scrubbing through the timeline when the compositor updates */ + return; + } else { + CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); + ImBuf *ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); + char string[256]; + + ibuf->rect_float= cbuf->rect; + ibuf->dither= rd->dither_intensity; + + if (rd->color_mgt_flag & R_COLOR_MANAGEMENT) + ibuf->profile = IB_PROFILE_LINEAR_RGB; + + if(in[1]->data) { + CompBuf *zbuf= in[1]->data; + if(zbuf->type==CB_VAL && zbuf->x==cbuf->x && zbuf->y==cbuf->y) { + nif->subimtype|= R_OPENEXR_ZBUF; + ibuf->zbuf_float= zbuf->rect; + } + } + + BKE_makepicstring(string, nif->name, rd->cfra, nif->imtype, (rd->scemode & R_EXTENSION), TRUE); + + if(0 == BKE_write_ibuf(ibuf, string, nif->imtype, nif->subimtype, nif->imtype==R_OPENEXR?nif->codec:nif->quality)) + printf("Cannot save Node File Output to %s\n", string); + else + printf("Saved: %s\n", string); + + IMB_freeImBuf(ibuf); + + generate_preview(data, node, cbuf); + + if(in[0]->data != cbuf) + free_compbuf(cbuf); + } + } +} + +static void node_composit_init_output_file(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + Scene *scene= (Scene *)node->id; + NodeImageFile *nif= MEM_callocN(sizeof(NodeImageFile), "node image file"); + node->storage= nif; + + if(scene) { + BLI_strncpy(nif->name, scene->r.pic, sizeof(nif->name)); + nif->imtype= scene->r.imtype; + nif->subimtype= scene->r.subimtype; + nif->quality= scene->r.quality; + nif->sfra= scene->r.sfra; + nif->efra= scene->r.efra; + } +} + +void register_node_type_cmp_output_file(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_OUTPUT_FILE, "File Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_output_file_in, NULL); + node_type_size(&ntype, 140, 80, 300); + node_type_init(&ntype, node_composit_init_output_file); + node_type_storage(&ntype, "NodeImageFile", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_output_file); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_premulkey.c b/source/blender/nodes/composite/nodes/node_composite_premulkey.c new file mode 100644 index 00000000000..066a8a81891 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_premulkey.c @@ -0,0 +1,78 @@ +/* +* $Id: CMP_premulkey.c 36333 2011-04-26 09:27:43Z lukastoenne $ +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* The Original Code is Copyright (C) 2006 Blender Foundation. +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): none yet. +* +* ***** END GPL LICENSE BLOCK ***** + +*/ + +/** \file blender/nodes/composite/nodes/node_composite_premulkey.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** Premul and Key Alpha Convert ******************** */ + +static bNodeSocketTemplate cmp_node_premulkey_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_premulkey_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void node_composit_exec_premulkey(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + if(out[0]->hasoutput==0) + return; + + if(in[0]->data) { + CompBuf *stackbuf, *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); + + stackbuf= dupalloc_compbuf(cbuf); + premul_compbuf(stackbuf, node->custom1 == 1); + + out[0]->data = stackbuf; + if(cbuf != in[0]->data) + free_compbuf(cbuf); + } +} + +void register_node_type_cmp_premulkey(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_premulkey_in, cmp_node_premulkey_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_premulkey); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_rgb.c b/source/blender/nodes/composite/nodes/node_composite_rgb.c new file mode 100644 index 00000000000..41a13487edd --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_rgb.c @@ -0,0 +1,77 @@ +/* + * $Id: CMP_rgb.c 36333 2011-04-26 09:27:43Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_rgb.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** RGB ******************** */ +static bNodeSocketTemplate cmp_node_rgb_out[]= { + { SOCK_RGBA, 0, "RGBA", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; + +static void node_composit_init_rgb(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) +{ + bNodeSocket *sock= node->outputs.first; + float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value; + /* uses the default value of the output socket, must be initialized here */ + col[0] = 0.5f; + col[1] = 0.5f; + col[2] = 0.5f; + col[3] = 1.0f; +} + +static void node_composit_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) +{ + bNodeSocket *sock= node->outputs.first; + float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value; + + QUATCOPY(out[0]->vec, col); +} + +void register_node_type_cmp_rgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, cmp_node_rgb_out); + node_type_init(&ntype, node_composit_init_rgb); + node_type_size(&ntype, 140, 80, 140); + node_type_exec(&ntype, node_composit_exec_rgb); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_rotate.c b/source/blender/nodes/composite/nodes/node_composite_rotate.c new file mode 100644 index 00000000000..4ece562c508 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_rotate.c @@ -0,0 +1,142 @@ +/* + * $Id: CMP_rotate.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_rotate.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** Rotate ******************** */ + +static bNodeSocketTemplate cmp_node_rotate_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Degr", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_ANGLE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_rotate_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +/* only supports RGBA nodes now */ +static void node_composit_exec_rotate(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + + if(out[0]->hasoutput==0) + return; + + if(in[0]->data) { + CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* note, this returns zero'd image */ + float rad, u, v, s, c, centx, centy, miny, maxy, minx, maxx; + int x, y, yo, xo; + ImBuf *ibuf, *obuf; + + rad= (M_PI*in[1]->vec[0])/180.0f; + + s= sin(rad); + c= cos(rad); + centx= cbuf->x/2; + centy= cbuf->y/2; + + minx= -centx; + maxx= -centx + (float)cbuf->x; + miny= -centy; + maxy= -centy + (float)cbuf->y; + + + ibuf=IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); + obuf=IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0); + + if(ibuf && obuf){ + ibuf->rect_float=cbuf->rect; + obuf->rect_float=stackbuf->rect; + + for(y=miny; ycustom1) { + case 0: + neareast_interpolation(ibuf, obuf, u, v, xo, yo); + break ; + case 1: + bilinear_interpolation(ibuf, obuf, u, v, xo, yo); + break; + case 2: + bicubic_interpolation(ibuf, obuf, u, v, xo, yo); + break; + } + + } + } + + /* rotate offset vector too, but why negative rad, ehh?? Has to be replaced with [3][3] matrix once (ton) */ + s= sin(-rad); + c= cos(-rad); + centx= (float)cbuf->xof; centy= (float)cbuf->yof; + stackbuf->xof= (int)( c*centx + s*centy); + stackbuf->yof= (int)(-s*centx + c*centy); + + IMB_freeImBuf(ibuf); + IMB_freeImBuf(obuf); + } + + /* pass on output and free */ + out[0]->data= stackbuf; + if(cbuf!=in[0]->data) { + free_compbuf(cbuf); + } + } +} + +static void node_composit_init_rotate(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->custom1= 1; /* Bilinear Filter*/ +} + +void register_node_type_cmp_rotate(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_rotate_in, cmp_node_rotate_out); + node_type_size(&ntype, 140, 100, 320); + node_type_init(&ntype, node_composit_init_rotate); + node_type_exec(&ntype, node_composit_exec_rotate); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_scale.c b/source/blender/nodes/composite/nodes/node_composite_scale.c new file mode 100644 index 00000000000..4ba654e82d4 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_scale.c @@ -0,0 +1,134 @@ +/* + * $Id: CMP_scale.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_scale.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** Scale ******************** */ + +#define CMP_SCALE_MAX 12000 + +static bNodeSocketTemplate cmp_node_scale_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "X", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, CMP_SCALE_MAX, PROP_FACTOR}, + { SOCK_FLOAT, 1, "Y", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, CMP_SCALE_MAX, PROP_FACTOR}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_scale_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +/* only supports RGBA nodes now */ +/* node->custom1 stores if input values are absolute or relative scale */ +static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + if(out[0]->hasoutput==0) + return; + + if(in[0]->data) { + RenderData *rd= data; + CompBuf *stackbuf, *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); + ImBuf *ibuf; + int newx, newy; + + if(node->custom1==CMP_SCALE_RELATIVE) { + newx= MAX2((int)(in[1]->vec[0]*cbuf->x), 1); + newy= MAX2((int)(in[2]->vec[0]*cbuf->y), 1); + } + else if(node->custom1==CMP_SCALE_SCENEPERCENT) { + newx = cbuf->x * (rd->size / 100.0f); + newy = cbuf->y * (rd->size / 100.0f); + } + else if (node->custom1==CMP_SCALE_RENDERPERCENT) { + newx= (rd->xsch * rd->size)/100; + newy= (rd->ysch * rd->size)/100; + } else { /* CMP_SCALE_ABSOLUTE */ + newx= MAX2((int)in[1]->vec[0], 1); + newy= MAX2((int)in[2]->vec[0], 1); + } + newx= MIN2(newx, CMP_SCALE_MAX); + newy= MIN2(newy, CMP_SCALE_MAX); + + ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); + if(ibuf) { + ibuf->rect_float= cbuf->rect; + IMB_scaleImBuf(ibuf, newx, newy); + + if(ibuf->rect_float == cbuf->rect) { + /* no scaling happened. */ + stackbuf= pass_on_compbuf(in[0]->data); + } + else { + stackbuf= alloc_compbuf(newx, newy, CB_RGBA, 0); + stackbuf->rect= ibuf->rect_float; + stackbuf->malloc= 1; + } + + ibuf->rect_float= NULL; + ibuf->mall &= ~IB_rectfloat; + IMB_freeImBuf(ibuf); + + /* also do the translation vector */ + stackbuf->xof = (int)(((float)newx/(float)cbuf->x) * (float)cbuf->xof); + stackbuf->yof = (int)(((float)newy/(float)cbuf->y) * (float)cbuf->yof); + } + else { + stackbuf= dupalloc_compbuf(cbuf); + printf("Scaling to %dx%d failed\n", newx, newy); + } + + out[0]->data= stackbuf; + if(cbuf!=in[0]->data) + free_compbuf(cbuf); + } +} + +void register_node_type_cmp_scale(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_scale_in, cmp_node_scale_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_scale); + + nodeRegisterType(lb, &ntype); +} + + + + + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c new file mode 100644 index 00000000000..5460427fd73 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c @@ -0,0 +1,187 @@ +/* + * $Id: CMP_sepcombHSVA.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_sepcombHSVA.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** SEPARATE HSVA ******************** */ +static bNodeSocketTemplate cmp_node_sephsva_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_sephsva_out[]= { + { SOCK_FLOAT, 0, "H"}, + { SOCK_FLOAT, 0, "S"}, + { SOCK_FLOAT, 0, "V"}, + { SOCK_FLOAT, 0, "A"}, + { -1, 0, "" } +}; + +static void do_sephsva(bNode *UNUSED(node), float *out, float *in) +{ + float h, s, v; + + rgb_to_hsv(in[0], in[1], in[2], &h, &s, &v); + + out[0]= h; + out[1]= s; + out[2]= v; + out[3]= in[3]; +} + +static void node_composit_exec_sephsva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order out: bw channels */ + /* stack order in: col */ + + /* input no image? then only color operation */ + if(in[0]->data==NULL) { + float h, s, v; + + rgb_to_hsv(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &h, &s, &v); + + out[0]->vec[0] = h; + out[1]->vec[0] = s; + out[2]->vec[0] = v; + out[3]->vec[0] = in[0]->vec[3]; + } + else if ((out[0]->hasoutput) || (out[1]->hasoutput) || (out[2]->hasoutput) || (out[3]->hasoutput)) { + /* create new buffer so input buffer doesn't get corrupted */ + CompBuf *cbuf= dupalloc_compbuf(in[0]->data); + CompBuf *cbuf2= typecheck_compbuf(cbuf, CB_RGBA); + + /* convert the RGB stackbuf to an HSV representation */ + composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sephsva, CB_RGBA); + + /* separate each of those channels */ + if(out[0]->hasoutput) + out[0]->data= valbuf_from_rgbabuf(cbuf2, CHAN_R); + if(out[1]->hasoutput) + out[1]->data= valbuf_from_rgbabuf(cbuf2, CHAN_G); + if(out[2]->hasoutput) + out[2]->data= valbuf_from_rgbabuf(cbuf2, CHAN_B); + if(out[3]->hasoutput) + out[3]->data= valbuf_from_rgbabuf(cbuf2, CHAN_A); + + /*not used anymore */ + if(cbuf2!=cbuf) + free_compbuf(cbuf2); + free_compbuf(cbuf); + } +} + +void register_node_type_cmp_sephsva(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTOR, 0); + node_type_socket_templates(&ntype, cmp_node_sephsva_in, cmp_node_sephsva_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_sephsva); + + nodeRegisterType(lb, &ntype); +} + + +/* **************** COMBINE HSVA ******************** */ +static bNodeSocketTemplate cmp_node_combhsva_in[]= { + { SOCK_FLOAT, 1, "H", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "S", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_combhsva_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_comb_hsva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) +{ + float r,g,b; + hsv_to_rgb(in1[0], in2[0], in3[0], &r, &g, &b); + + out[0] = r; + out[1] = g; + out[2] = b; + out[3] = in4[0]; +} + +static void node_composit_exec_combhsva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order out: 1 rgba channels */ + /* stack order in: 4 value channels */ + + /* input no image? then only color operation */ + if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) { + out[0]->vec[0] = in[0]->vec[0]; + out[0]->vec[1] = in[1]->vec[0]; + out[0]->vec[2] = in[2]->vec[0]; + out[0]->vec[3] = in[3]->vec[0]; + } + else { + /* make output size of first available input image */ + CompBuf *cbuf; + CompBuf *stackbuf; + + /* allocate a CompBuf the size of the first available input */ + if (in[0]->data) cbuf = in[0]->data; + else if (in[1]->data) cbuf = in[1]->data; + else if (in[2]->data) cbuf = in[2]->data; + else cbuf = in[3]->data; + + stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, + in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, + do_comb_hsva, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_combhsva(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_combhsva_in, cmp_node_combhsva_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_combhsva); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c new file mode 100644 index 00000000000..a074d895acb --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c @@ -0,0 +1,162 @@ +/* + * $Id: CMP_sepcombRGBA.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_sepcombRGBA.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** SEPARATE RGBA ******************** */ +static bNodeSocketTemplate cmp_node_seprgba_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_seprgba_out[]= { + { SOCK_FLOAT, 0, "R"}, + { SOCK_FLOAT, 0, "G"}, + { SOCK_FLOAT, 0, "B"}, + { SOCK_FLOAT, 0, "A"}, + { -1, 0, "" } +}; + +static void node_composit_exec_seprgba(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) +{ + /* stack order out: bw channels */ + /* stack order in: col */ + + /* input no image? then only color operation */ + if(in[0]->data==NULL) { + out[0]->vec[0] = in[0]->vec[0]; + out[1]->vec[0] = in[0]->vec[1]; + out[2]->vec[0] = in[0]->vec[2]; + out[3]->vec[0] = in[0]->vec[3]; + } + else { + /* make sure we get right rgba buffer */ + CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); + + /* don't do any pixel processing, just copy the stack directly (faster, I presume) */ + if(out[0]->hasoutput) + out[0]->data= valbuf_from_rgbabuf(cbuf, CHAN_R); + if(out[1]->hasoutput) + out[1]->data= valbuf_from_rgbabuf(cbuf, CHAN_G); + if(out[2]->hasoutput) + out[2]->data= valbuf_from_rgbabuf(cbuf, CHAN_B); + if(out[3]->hasoutput) + out[3]->data= valbuf_from_rgbabuf(cbuf, CHAN_A); + + if(cbuf!=in[0]->data) + free_compbuf(cbuf); + + } +} + +void register_node_type_cmp_seprgba(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTOR, 0); + node_type_socket_templates(&ntype, cmp_node_seprgba_in, cmp_node_seprgba_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_seprgba); + + nodeRegisterType(lb, &ntype); +} + + + +/* **************** COMBINE RGBA ******************** */ +static bNodeSocketTemplate cmp_node_combrgba_in[]= { + { SOCK_FLOAT, 1, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_combrgba_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_combrgba(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) +{ + out[0] = in1[0]; + out[1] = in2[0]; + out[2] = in3[0]; + out[3] = in4[0]; +} + +static void node_composit_exec_combrgba(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order out: 1 rgba channels */ + /* stack order in: 4 value channels */ + + /* input no image? then only color operation */ + if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) { + out[0]->vec[0] = in[0]->vec[0]; + out[0]->vec[1] = in[1]->vec[0]; + out[0]->vec[2] = in[2]->vec[0]; + out[0]->vec[3] = in[3]->vec[0]; + } + else { + /* make output size of first available input image */ + CompBuf *cbuf; + CompBuf *stackbuf; + + /* allocate a CompBuf the size of the first available input */ + if (in[0]->data) cbuf = in[0]->data; + else if (in[1]->data) cbuf = in[1]->data; + else if (in[2]->data) cbuf = in[2]->data; + else cbuf = in[3]->data; + + stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, + in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, + do_combrgba, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_combrgba(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_combrgba_in, cmp_node_combrgba_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_combrgba); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c new file mode 100644 index 00000000000..61e88418e59 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c @@ -0,0 +1,313 @@ +/* + * $Id: CMP_sepcombYCCA.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_sepcombYCCA.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** SEPARATE YCCA ******************** */ +static bNodeSocketTemplate cmp_node_sepycca_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_sepycca_out[]= { + { SOCK_FLOAT, 0, "Y"}, + { SOCK_FLOAT, 0, "Cb"}, + { SOCK_FLOAT, 0, "Cr"}, + { SOCK_FLOAT, 0, "A"}, + { -1, 0, "" } +}; + +static void do_sepycca_601(bNode *UNUSED(node), float *out, float *in) +{ + float y, cb, cr; + + rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_ITU_BT601); + + /*divided by 255 to normalize for viewing in */ + out[0]= y/255.0; + out[1]= cb/255.0; + out[2]= cr/255.0; + out[3]= in[3]; +} + +static void do_sepycca_709(bNode *UNUSED(node), float *out, float *in) +{ + float y, cb, cr; + + rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_ITU_BT709); + + /*divided by 255 to normalize for viewing in */ + out[0]= y/255.0; + out[1]= cb/255.0; + out[2]= cr/255.0; + out[3]= in[3]; +} + +static void do_sepycca_jfif(bNode *UNUSED(node), float *out, float *in) +{ + float y, cb, cr; + + rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_JFIF_0_255); + + /*divided by 255 to normalize for viewing in */ + out[0]= y/255.0; + out[1]= cb/255.0; + out[2]= cr/255.0; + out[3]= in[3]; +} + +static void node_composit_exec_sepycca(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* input no image? then only color operation */ + if(in[0]->data==NULL) { + float y, cb, cr; + + switch(node->custom1) + { + case 1: + rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_ITU_BT709); + break; + case 2: + rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_JFIF_0_255); + break; + case 0: + default: + rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_ITU_BT601); + break; + } + + /*divided by 255 to normalize for viewing in */ + out[0]->vec[0] = y/255.0; + out[1]->vec[0] = cb/255.0; + out[2]->vec[0] = cr/255.0; + out[3]->vec[0] = in[0]->vec[3]; + } + else if ((out[0]->hasoutput) || (out[1]->hasoutput) || (out[2]->hasoutput) || (out[3]->hasoutput)) { + /* make copy of buffer so input buffer doesn't get corrupted */ + CompBuf *cbuf= dupalloc_compbuf(in[0]->data); + CompBuf *cbuf2=typecheck_compbuf(cbuf, CB_RGBA); + + /* convert the RGB stackbuf to an HSV representation */ + switch(node->custom1) + { + case 1: + composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_709, CB_RGBA); + break; + case 2: + composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_jfif, CB_RGBA); + break; + case 0: + default: + composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_601, CB_RGBA); + break; + } + + /* separate each of those channels */ + if(out[0]->hasoutput) + out[0]->data= valbuf_from_rgbabuf(cbuf2, CHAN_R); + if(out[1]->hasoutput) + out[1]->data= valbuf_from_rgbabuf(cbuf2, CHAN_G); + if(out[2]->hasoutput) + out[2]->data= valbuf_from_rgbabuf(cbuf2, CHAN_B); + if(out[3]->hasoutput) + out[3]->data= valbuf_from_rgbabuf(cbuf2, CHAN_A); + + /*not used anymore */ + if(cbuf2!=cbuf) + free_compbuf(cbuf2); + free_compbuf(cbuf); + } +} + +void register_node_type_cmp_sepycca(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_sepycca_in, cmp_node_sepycca_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_sepycca); + + nodeRegisterType(lb, &ntype); +} + + + +/* **************** COMBINE YCCA ******************** */ +static bNodeSocketTemplate cmp_node_combycca_in[]= { + { SOCK_FLOAT, 1, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Cb", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Cr", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_combycca_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_comb_ycca_601(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) +{ + float r,g,b; + float y, cb, cr; + + /*need to un-normalize the data*/ + y=in1[0]*255; + cb=in2[0]*255; + cr=in3[0]*255; + + ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_ITU_BT601); + + out[0] = r; + out[1] = g; + out[2] = b; + out[3] = in4[0]; +} + +static void do_comb_ycca_709(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) +{ + float r,g,b; + float y, cb, cr; + + /*need to un-normalize the data*/ + y=in1[0]*255; + cb=in2[0]*255; + cr=in3[0]*255; + + ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_ITU_BT709); + + out[0] = r; + out[1] = g; + out[2] = b; + out[3] = in4[0]; +} + +static void do_comb_ycca_jfif(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) +{ + float r,g,b; + float y, cb, cr; + + /*need to un-normalize the data*/ + y=in1[0]*255; + cb=in2[0]*255; + cr=in3[0]*255; + + ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_JFIF_0_255); + + out[0] = r; + out[1] = g; + out[2] = b; + out[3] = in4[0]; +} + +static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order out: 1 ycca channels */ + /* stack order in: 4 value channels */ + + /* input no image? then only color operation */ + if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) { + float y = in[0]->vec[0] * 255; + float cb = in[1]->vec[0] * 255; + float cr = in[2]->vec[0] * 255; + + switch(node->custom1) + { + case 1: + ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_ITU_BT709); + break; + case 2: + ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_JFIF_0_255); + break; + case 0: + default: + ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_ITU_BT601); + break; + } + + out[0]->vec[3] = in[3]->vec[0]; + } + else { + /* make output size of first available input image */ + CompBuf *cbuf; + CompBuf *stackbuf; + + /* allocate a CompBuf the size of the first available input */ + if (in[0]->data) cbuf = in[0]->data; + else if (in[1]->data) cbuf = in[1]->data; + else if (in[2]->data) cbuf = in[2]->data; + else cbuf = in[3]->data; + + stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + + switch(node->custom1) + { + case 1: + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, + in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, + do_comb_ycca_709, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + break; + + case 2: + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, + in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, + do_comb_ycca_jfif, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + break; + case 0: + default: + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, + in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, + do_comb_ycca_601, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + break; + } + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_combycca(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_combycca_in, cmp_node_combycca_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_combycca); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c new file mode 100644 index 00000000000..14f086300c0 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c @@ -0,0 +1,187 @@ +/* + * $Id: CMP_sepcombYUVA.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_sepcombYUVA.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** SEPARATE YUVA ******************** */ +static bNodeSocketTemplate cmp_node_sepyuva_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_sepyuva_out[]= { + { SOCK_FLOAT, 0, "Y"}, + { SOCK_FLOAT, 0, "U"}, + { SOCK_FLOAT, 0, "V"}, + { SOCK_FLOAT, 0, "A"}, + { -1, 0, "" } +}; + +static void do_sepyuva(bNode *UNUSED(node), float *out, float *in) +{ + float y, u, v; + + rgb_to_yuv(in[0], in[1], in[2], &y, &u, &v); + + out[0]= y; + out[1]= u; + out[2]= v; + out[3]= in[3]; +} + +static void node_composit_exec_sepyuva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order out: bw channels */ + /* stack order in: col */ + + /* input no image? then only color operation */ + if(in[0]->data==NULL) { + float y, u, v; + + rgb_to_yuv(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &u, &v); + + out[0]->vec[0] = y; + out[1]->vec[0] = u; + out[2]->vec[0] = v; + out[3]->vec[0] = in[0]->vec[3]; + } + else if ((out[0]->hasoutput) || (out[1]->hasoutput) || (out[2]->hasoutput) || (out[3]->hasoutput)) { + /* make copy of buffer so input image doesn't get corrupted */ + CompBuf *cbuf= dupalloc_compbuf(in[0]->data); + CompBuf *cbuf2=typecheck_compbuf(cbuf, CB_RGBA); + + /* convert the RGB stackbuf to an YUV representation */ + composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepyuva, CB_RGBA); + + /* separate each of those channels */ + if(out[0]->hasoutput) + out[0]->data= valbuf_from_rgbabuf(cbuf2, CHAN_R); + if(out[1]->hasoutput) + out[1]->data= valbuf_from_rgbabuf(cbuf2, CHAN_G); + if(out[2]->hasoutput) + out[2]->data= valbuf_from_rgbabuf(cbuf2, CHAN_B); + if(out[3]->hasoutput) + out[3]->data= valbuf_from_rgbabuf(cbuf2, CHAN_A); + + /*not used anymore */ + if(cbuf2!=cbuf) + free_compbuf(cbuf2); + free_compbuf(cbuf); + } +} + +void register_node_type_cmp_sepyuva(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_SEPYUVA, "Separate YUVA", NODE_CLASS_CONVERTOR, 0); + node_type_socket_templates(&ntype, cmp_node_sepyuva_in, cmp_node_sepyuva_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_sepyuva); + + nodeRegisterType(lb, &ntype); +} + + + +/* **************** COMBINE YUVA ******************** */ +static bNodeSocketTemplate cmp_node_combyuva_in[]= { + { SOCK_FLOAT, 1, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "U", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_combyuva_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void do_comb_yuva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) +{ + float r,g,b; + yuv_to_rgb(in1[0], in2[0], in3[0], &r, &g, &b); + + out[0] = r; + out[1] = g; + out[2] = b; + out[3] = in4[0]; +} + +static void node_composit_exec_combyuva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order out: 1 rgba channels */ + /* stack order in: 4 value channels */ + + /* input no image? then only color operation */ + if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) { + out[0]->vec[0] = in[0]->vec[0]; + out[0]->vec[1] = in[1]->vec[0]; + out[0]->vec[2] = in[2]->vec[0]; + out[0]->vec[3] = in[3]->vec[0]; + } + else { + /* make output size of first available input image */ + CompBuf *cbuf; + CompBuf *stackbuf; + + /* allocate a CompBuf the size of the first available input */ + if (in[0]->data) cbuf = in[0]->data; + else if (in[1]->data) cbuf = in[1]->data; + else if (in[2]->data) cbuf = in[2]->data; + else cbuf = in[3]->data; + + stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, + in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, + do_comb_yuva, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_combyuva(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_COMBYUVA, "Combine YUVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_combyuva_in, cmp_node_combyuva_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_combyuva); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_setalpha.c b/source/blender/nodes/composite/nodes/node_composite_setalpha.c new file mode 100644 index 00000000000..781d6f11614 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_setalpha.c @@ -0,0 +1,89 @@ +/* + * $Id: CMP_setalpha.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_setalpha.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** SET ALPHA ******************** */ +static bNodeSocketTemplate cmp_node_setalpha_in[]= { + { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_setalpha_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void node_composit_exec_setalpha(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order out: RGBA image */ + /* stack order in: col, alpha */ + + /* input no image? then only color operation */ + if(in[0]->data==NULL && in[1]->data==NULL) { + out[0]->vec[0] = in[0]->vec[0]; + out[0]->vec[1] = in[0]->vec[1]; + out[0]->vec[2] = in[0]->vec[2]; + out[0]->vec[3] = in[1]->vec[0]; + } + else { + /* make output size of input image */ + CompBuf *cbuf= in[0]->data?in[0]->data:in[1]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + if(in[1]->data==NULL && in[1]->vec[0]==1.0f) { + /* pass on image */ + composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_copy_rgb, CB_RGBA); + } + else { + /* send an compbuf or a value to set as alpha - composit2_pixel_processor handles choosing the right one */ + composit2_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, do_copy_a_rgba, CB_RGBA, CB_VAL); + } + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_setalpha(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_setalpha_in, cmp_node_setalpha_out); + node_type_size(&ntype, 120, 40, 140); + node_type_exec(&ntype, node_composit_exec_setalpha); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_splitViewer.c b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c new file mode 100644 index 00000000000..d78faf69e26 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c @@ -0,0 +1,171 @@ +/* + * $Id: CMP_splitViewer.c 36340 2011-04-26 13:24:20Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_splitViewer.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** SPLIT VIEWER ******************** */ +static bNodeSocketTemplate cmp_node_splitviewer_in[]= { + { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + +static void do_copy_split_rgba(bNode *UNUSED(node), float *out, float *in1, float *in2, float *fac) +{ + if(*fac==0.0f) { + QUATCOPY(out, in1); + } + else { + QUATCOPY(out, in2); + } +} + +static void node_composit_exec_splitviewer(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) +{ + /* image assigned to output */ + /* stack order input sockets: image image */ + + if(in[0]->data==NULL || in[1]->data==NULL) + return; + + if(node->id && (node->flag & NODE_DO_OUTPUT)) { /* only one works on out */ + Image *ima= (Image *)node->id; + RenderData *rd= data; + ImBuf *ibuf; + CompBuf *cbuf, *buf1, *buf2, *mask; + int x, y; + float offset; + void *lock; + + buf1= typecheck_compbuf(in[0]->data, CB_RGBA); + buf2= typecheck_compbuf(in[1]->data, CB_RGBA); + + BKE_image_user_calc_frame(node->storage, rd->cfra, 0); + + /* always returns for viewer image, but we check nevertheless */ + ibuf= BKE_image_acquire_ibuf(ima, node->storage, &lock); + if(ibuf==NULL) { + printf("node_composit_exec_viewer error\n"); + BKE_image_release_ibuf(ima, lock); + return; + } + + /* free all in ibuf */ + imb_freerectImBuf(ibuf); + imb_freerectfloatImBuf(ibuf); + IMB_freezbuffloatImBuf(ibuf); + + /* make ibuf, and connect to ima */ + ibuf->x= buf1->x; + ibuf->y= buf1->y; + imb_addrectfloatImBuf(ibuf); + + ima->ok= IMA_OK_LOADED; + + /* output buf */ + cbuf= alloc_compbuf(buf1->x, buf1->y, CB_RGBA, 0); /* no alloc*/ + cbuf->rect= ibuf->rect_float; + + /* mask buf */ + mask= alloc_compbuf(buf1->x, buf1->y, CB_VAL, 1); + + + /* Check which offset mode is selected and limit offset if needed */ + if(node->custom2 == 0) { + offset = buf1->x / 100.0f * node->custom1; + CLAMP(offset, 0, buf1->x); + } + else { + offset = buf1->y / 100.0f * node->custom1; + CLAMP(offset, 0, buf1->y); + } + + if(node->custom2 == 0) { + for(y=0; yy; y++) { + float *fac= mask->rect + y*buf1->x; + for(x=offset; x>0; x--, fac++) + *fac= 1.0f; + } + } + else { + for(y=0; yrect + y*buf1->x; + for(x=buf1->x; x>0; x--, fac++) + *fac= 1.0f; + } + } + + composit3_pixel_processor(node, cbuf, buf1, in[0]->vec, buf2, in[1]->vec, mask, NULL, do_copy_split_rgba, CB_RGBA, CB_RGBA, CB_VAL); + + BKE_image_release_ibuf(ima, lock); + + generate_preview(data, node, cbuf); + free_compbuf(cbuf); + free_compbuf(mask); + + if(in[0]->data != buf1) + free_compbuf(buf1); + if(in[1]->data != buf2) + free_compbuf(buf2); + } +} + +static void node_composit_init_splitviewer(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user"); + node->storage= iuser; + iuser->sfra= 1; + iuser->fie_ima= 2; + iuser->ok= 1; + node->custom1= 50; /* default 50% split */ +} + +void register_node_type_cmp_splitviewer(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_SPLITVIEWER, "SplitViewer", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_splitviewer_in, NULL); + node_type_size(&ntype, 140, 100, 320); + node_type_init(&ntype, node_composit_init_splitviewer); + node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_splitviewer); + + nodeRegisterType(lb, &ntype); +} + + + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_texture.c b/source/blender/nodes/composite/nodes/node_composite_texture.c new file mode 100644 index 00000000000..bdeef74c617 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_texture.c @@ -0,0 +1,160 @@ +/* + * $Id: CMP_texture.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_texture.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** TEXTURE ******************** */ +static bNodeSocketTemplate cmp_node_texture_in[]= { + { SOCK_VECTOR, 1, "Offset", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_TRANSLATION}, + { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 1.0f, -10.0f, 10.0f, PROP_XYZ}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_texture_out[]= { + { SOCK_FLOAT, 0, "Value"}, + { SOCK_RGBA , 0, "Color"}, + { -1, 0, "" } +}; + +/* called without rect allocated */ +static void texture_procedural(CompBuf *cbuf, float *out, float xco, float yco) +{ + bNode *node= cbuf->node; + TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL}; + float vec[3], *size, nor[3]={0.0f, 0.0f, 0.0f}, col[4]; + int retval, type= cbuf->procedural_type; + + size= cbuf->procedural_size; + + vec[0]= size[0]*(xco + cbuf->procedural_offset[0]); + vec[1]= size[1]*(yco + cbuf->procedural_offset[1]); + vec[2]= size[2]*cbuf->procedural_offset[2]; + + retval= multitex_ext((Tex *)node->id, vec, NULL, NULL, 0, &texres); + + if(type==CB_VAL) { + if(texres.talpha) + col[0]= texres.ta; + else + col[0]= texres.tin; + } + else if(type==CB_RGBA) { + if(texres.talpha) + col[3]= texres.ta; + else + col[3]= texres.tin; + + if((retval & TEX_RGB)) { + col[0]= texres.tr; + col[1]= texres.tg; + col[2]= texres.tb; + } + else col[0]= col[1]= col[2]= col[3]; + } + else { + VECCOPY(col, nor); + } + + typecheck_compbuf_color(out, col, cbuf->type, cbuf->procedural_type); +} + +/* texture node outputs get a small rect, to make sure all other nodes accept it */ +/* only the pixel-processor nodes do something with it though */ +static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* outputs: value, color, normal */ + + if(node->id) { + RenderData *rd= data; + short sizex, sizey; + + /* first make the preview image */ + CompBuf *prevbuf= alloc_compbuf(140, 140, CB_RGBA, 1); /* alloc */ + + prevbuf->rect_procedural= texture_procedural; + prevbuf->node= node; + VECCOPY(prevbuf->procedural_offset, in[0]->vec); + VECCOPY(prevbuf->procedural_size, in[1]->vec); + prevbuf->procedural_type= CB_RGBA; + composit1_pixel_processor(node, prevbuf, prevbuf, out[0]->vec, do_copy_rgba, CB_RGBA); + + generate_preview(data, node, prevbuf); + free_compbuf(prevbuf); + + /* texture procedural buffer type doesnt work well, we now render a buffer in scene size */ + sizex = (rd->size*rd->xsch)/100; + sizey = (rd->size*rd->ysch)/100; + + if(out[0]->hasoutput) { + CompBuf *stackbuf= alloc_compbuf(sizex, sizey, CB_VAL, 1); /* alloc */ + + stackbuf->rect_procedural= texture_procedural; + stackbuf->node= node; + VECCOPY(stackbuf->procedural_offset, in[0]->vec); + VECCOPY(stackbuf->procedural_size, in[1]->vec); + stackbuf->procedural_type= CB_VAL; + composit1_pixel_processor(node, stackbuf, stackbuf, out[0]->vec, do_copy_value, CB_VAL); + stackbuf->rect_procedural= NULL; + + out[0]->data= stackbuf; + } + if(out[1]->hasoutput) { + CompBuf *stackbuf= alloc_compbuf(sizex, sizey, CB_RGBA, 1); /* alloc */ + + stackbuf->rect_procedural= texture_procedural; + stackbuf->node= node; + VECCOPY(stackbuf->procedural_offset, in[0]->vec); + VECCOPY(stackbuf->procedural_size, in[1]->vec); + stackbuf->procedural_type= CB_RGBA; + composit1_pixel_processor(node, stackbuf, stackbuf, out[0]->vec, do_copy_rgba, CB_RGBA); + stackbuf->rect_procedural= NULL; + + out[1]->data= stackbuf; + } + } +} + +void register_node_type_cmp_texture(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW); + node_type_socket_templates(&ntype, cmp_node_texture_in, cmp_node_texture_out); + node_type_size(&ntype, 120, 80, 240); + node_type_exec(&ntype, node_composit_exec_texture); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/composite/nodes/node_composite_tonemap.c b/source/blender/nodes/composite/nodes/node_composite_tonemap.c new file mode 100644 index 00000000000..31ffed08c95 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_tonemap.c @@ -0,0 +1,179 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Alfredo de Greef (eeshlo) + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_tonemap.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +static bNodeSocketTemplate cmp_node_tonemap_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_tonemap_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + + +static float avgLogLum(CompBuf *src, float* auto_key, float* Lav, float* Cav) +{ + float lsum = 0; + int p = src->x*src->y; + fRGB* bc = (fRGB*)src->rect; + float avl, maxl = -1e10f, minl = 1e10f; + const float sc = 1.f/(src->x*src->y); + *Lav = 0.f; + while (p--) { + float L = 0.212671f*bc[0][0] + 0.71516f*bc[0][1] + 0.072169f*bc[0][2]; + *Lav += L; + fRGB_add(Cav, bc[0]); + lsum += (float)log((double)MAX2(L, 0.0) + 1e-5); + maxl = (L > maxl) ? L : maxl; + minl = (L < minl) ? L : minl; + bc++; + } + *Lav *= sc; + fRGB_mult(Cav, sc); + maxl = log((double)maxl + 1e-5); minl = log((double)minl + 1e-5f); avl = lsum*sc; + *auto_key = (maxl > minl) ? ((maxl - avl) / (maxl - minl)) : 1.f; + return exp((double)avl); +} + + +static void tonemap(NodeTonemap* ntm, CompBuf* dst, CompBuf* src) +{ + int x, y; + float dr, dg, db, al, igm = (ntm->gamma==0.f) ? 1 : (1.f / ntm->gamma); + float auto_key, Lav, Cav[3] = {0, 0, 0}; + + al = avgLogLum(src, &auto_key, &Lav, Cav); + al = (al == 0.f) ? 0.f : (ntm->key / al); + + if (ntm->type == 1) { + // Reinhard/Devlin photoreceptor + const float f = exp((double)-ntm->f); + const float m = (ntm->m > 0.f) ? ntm->m : (0.3f + 0.7f*pow((double)auto_key, 1.4)); + const float ic = 1.f - ntm->c, ia = 1.f - ntm->a; + if (ntm->m == 0.f) printf("tonemap node, M: %g\n", m); + for (y=0; yy; ++y) { + fRGB* sp = (fRGB*)&src->rect[y*src->x*src->type]; + fRGB* dp = (fRGB*)&dst->rect[y*src->x*src->type]; + for (x=0; xx; ++x) { + const float L = 0.212671f*sp[x][0] + 0.71516f*sp[x][1] + 0.072169f*sp[x][2]; + float I_l = sp[x][0] + ic*(L - sp[x][0]); + float I_g = Cav[0] + ic*(Lav - Cav[0]); + float I_a = I_l + ia*(I_g - I_l); + dp[x][0] /= (dp[x][0] + pow((double)f*I_a, (double)m)); + I_l = sp[x][1] + ic*(L - sp[x][1]); + I_g = Cav[1] + ic*(Lav - Cav[1]); + I_a = I_l + ia*(I_g - I_l); + dp[x][1] /= (dp[x][1] + pow((double)f*I_a,(double)m)); + I_l = sp[x][2] + ic*(L - sp[x][2]); + I_g = Cav[2] + ic*(Lav - Cav[2]); + I_a = I_l + ia*(I_g - I_l); + dp[x][2] /= (dp[x][2] + pow((double)f*I_a, (double)m)); + } + } + return; + } + + // Reinhard simple photographic tm (simplest, not using whitepoint var) + for (y=0; yy; y++) { + fRGB* sp = (fRGB*)&src->rect[y*src->x*src->type]; + fRGB* dp = (fRGB*)&dst->rect[y*src->x*src->type]; + for (x=0; xx; x++) { + fRGB_copy(dp[x], sp[x]); + fRGB_mult(dp[x], al); + dr = dp[x][0] + ntm->offset; + dg = dp[x][1] + ntm->offset; + db = dp[x][2] + ntm->offset; + dp[x][0] /= ((dr == 0.f) ? 1.f : dr); + dp[x][1] /= ((dg == 0.f) ? 1.f : dg); + dp[x][2] /= ((db == 0.f) ? 1.f : db); + if (igm != 0.f) { + dp[x][0] = pow((double)MAX2(dp[x][0], 0.), igm); + dp[x][1] = pow((double)MAX2(dp[x][1], 0.), igm); + dp[x][2] = pow((double)MAX2(dp[x][2], 0.), igm); + } + } + } +} + + +static void node_composit_exec_tonemap(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + CompBuf *new, *img = in[0]->data; + + if ((img==NULL) || (out[0]->hasoutput==0)) return; + + if (img->type != CB_RGBA) + img = typecheck_compbuf(img, CB_RGBA); + + new = dupalloc_compbuf(img); + + tonemap(node->storage, new, img); + + out[0]->data = new; + + if(img!=in[0]->data) + free_compbuf(img); +} + +static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeTonemap *ntm = MEM_callocN(sizeof(NodeTonemap), "node tonemap data"); + ntm->type = 1; + ntm->key = 0.18; + ntm->offset = 1; + ntm->gamma = 1; + ntm->f = 0; + ntm->m = 0; // actual value is set according to input + // default a of 1 works well with natural HDR images, but not always so for cgi. + // Maybe should use 0 or at least lower initial value instead + ntm->a = 1; + ntm->c = 0; + node->storage = ntm; +} + +void register_node_type_cmp_tonemap(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_tonemap_in, cmp_node_tonemap_out); + node_type_size(&ntype, 150, 120, 200); + node_type_init(&ntype, node_composit_init_tonemap); + node_type_storage(&ntype, "NodeTonemap", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_tonemap); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/composite/nodes/node_composite_translate.c b/source/blender/nodes/composite/nodes/node_composite_translate.c new file mode 100644 index 00000000000..a07dfb936ae --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_translate.c @@ -0,0 +1,76 @@ +/* + * $Id: CMP_translate.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_translate.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** Translate ******************** */ + +static bNodeSocketTemplate cmp_node_translate_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "X", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Y", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_translate_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void node_composit_exec_translate(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) +{ + if(in[0]->data) { + CompBuf *cbuf= in[0]->data; + CompBuf *stackbuf= pass_on_compbuf(cbuf); + + stackbuf->xof+= (int)floor(in[1]->vec[0]); + stackbuf->yof+= (int)floor(in[2]->vec[0]); + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_translate(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_translate_in, cmp_node_translate_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_translate); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_valToRgb.c b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c new file mode 100644 index 00000000000..9481d769557 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c @@ -0,0 +1,152 @@ +/* + * $Id: CMP_valToRgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_valToRgb.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** VALTORGB ******************** */ +static bNodeSocketTemplate cmp_node_valtorgb_in[]= { + { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_valtorgb_out[]= { + { SOCK_RGBA, 0, "Image"}, + { SOCK_FLOAT, 0, "Alpha"}, + { -1, 0, "" } +}; + +static void do_colorband_composit(bNode *node, float *out, float *in) +{ + do_colorband(node->storage, in[0], out); +} + +static void node_composit_exec_valtorgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: fac */ + /* stack order out: col, alpha */ + + if(out[0]->hasoutput==0 && out[1]->hasoutput==0) + return; + + if(node->storage) { + /* input no image? then only color operation */ + if(in[0]->data==NULL) { + do_colorband(node->storage, in[0]->vec[0], out[0]->vec); + } + else { + /* make output size of input image */ + CompBuf *cbuf= in[0]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + + composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_colorband_composit, CB_VAL); + + out[0]->data= stackbuf; + + if(out[1]->hasoutput) + out[1]->data= valbuf_from_rgbabuf(stackbuf, CHAN_A); + + } + } +} + +static void node_composit_init_valtorgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= add_colorband(1); +} + +void register_node_type_cmp_valtorgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_valtorgb_in, cmp_node_valtorgb_out); + node_type_size(&ntype, 240, 200, 300); + node_type_init(&ntype, node_composit_init_valtorgb); + node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_valtorgb); + + nodeRegisterType(lb, &ntype); +} + + + +/* **************** RGBTOBW ******************** */ +static bNodeSocketTemplate cmp_node_rgbtobw_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_rgbtobw_out[]= { + { SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + +static void do_rgbtobw(bNode *UNUSED(node), float *out, float *in) +{ + out[0]= in[0]*0.35f + in[1]*0.45f + in[2]*0.2f; +} + +static void node_composit_exec_rgbtobw(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order out: bw */ + /* stack order in: col */ + + if(out[0]->hasoutput==0) + return; + + /* input no image? then only color operation */ + if(in[0]->data==NULL) { + do_rgbtobw(node, out[0]->vec, in[0]->vec); + } + else { + /* make output size of input image */ + CompBuf *cbuf= in[0]->data; + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */ + + composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_rgbtobw, CB_RGBA); + + out[0]->data= stackbuf; + } +} + +void register_node_type_cmp_rgbtobw(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0); + node_type_socket_templates(&ntype, cmp_node_rgbtobw_in, cmp_node_rgbtobw_out); + node_type_size(&ntype, 80, 40, 120); + node_type_exec(&ntype, node_composit_exec_rgbtobw); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/composite/nodes/node_composite_value.c b/source/blender/nodes/composite/nodes/node_composite_value.c new file mode 100644 index 00000000000..e99b665f2ae --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_value.c @@ -0,0 +1,72 @@ +/* + * $Id: CMP_value.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_value.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + +/* **************** VALUE ******************** */ +static bNodeSocketTemplate cmp_node_value_out[]= { + { SOCK_FLOAT, 0, "Value"}, + { -1, 0, "" } +}; + +static void node_composit_init_value(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) +{ + bNodeSocket *sock= node->outputs.first; + bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value; + /* uses the default value of the output socket, must be initialized here */ + dval->value = 0.5f; +} + +static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) +{ + bNodeSocket *sock= node->outputs.first; + float val= ((bNodeSocketValueFloat*)sock->default_value)->value; + + out[0]->vec[0]= val; +} + +void register_node_type_cmp_value(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, cmp_node_value_out); + node_type_init(&ntype, node_composit_init_value); + node_type_size(&ntype, 80, 40, 120); + node_type_exec(&ntype, node_composit_exec_value); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_vecBlur.c b/source/blender/nodes/composite/nodes/node_composite_vecBlur.c new file mode 100644 index 00000000000..e730728d077 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_vecBlur.c @@ -0,0 +1,113 @@ +/* + * $Id: CMP_vecBlur.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_vecBlur.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** VECTOR BLUR ******************** */ +static bNodeSocketTemplate cmp_node_vecblur_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Z", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_VECTOR, 1, "Speed", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_VELOCITY}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_vecblur_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + + + +static void node_composit_exec_vecblur(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + NodeBlurData *nbd= node->storage; + CompBuf *new, *img= in[0]->data, *vecbuf= in[2]->data, *zbuf= in[1]->data; + + if(img==NULL || vecbuf==NULL || zbuf==NULL || out[0]->hasoutput==0) + return; + if(vecbuf->x!=img->x || vecbuf->y!=img->y) { + printf("ERROR: cannot do different sized vecbuf yet\n"); + return; + } + if(vecbuf->type!=CB_VEC4) { + printf("ERROR: input should be vecbuf\n"); + return; + } + if(zbuf->type!=CB_VAL) { + printf("ERROR: input should be zbuf\n"); + return; + } + if(zbuf->x!=img->x || zbuf->y!=img->y) { + printf("ERROR: cannot do different sized zbuf yet\n"); + return; + } + + /* allow the input image to be of another type */ + img= typecheck_compbuf(in[0]->data, CB_RGBA); + + new= dupalloc_compbuf(img); + + /* call special zbuffer version */ + RE_zbuf_accumulate_vecblur(nbd, img->x, img->y, new->rect, img->rect, vecbuf->rect, zbuf->rect); + + out[0]->data= new; + + if(img!=in[0]->data) + free_compbuf(img); +} + +static void node_composit_init_vecblur(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + NodeBlurData *nbd= MEM_callocN(sizeof(NodeBlurData), "node blur data"); + node->storage= nbd; + nbd->samples= 32; + nbd->fac= 1.0f; +} + +/* custom1: itterations, custom2: maxspeed (0 = nolimit) */ +void register_node_type_cmp_vecblur(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_vecblur_in, cmp_node_vecblur_out); + node_type_size(&ntype, 120, 80, 200); + node_type_init(&ntype, node_composit_init_vecblur); + node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_vecblur); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/composite/nodes/node_composite_viewer.c b/source/blender/nodes/composite/nodes/node_composite_viewer.c new file mode 100644 index 00000000000..bcfb45411f1 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_viewer.c @@ -0,0 +1,148 @@ +/* + * $Id: CMP_viewer.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_viewer.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** VIEWER ******************** */ +static bNodeSocketTemplate cmp_node_viewer_in[]= { + { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; + + +static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) +{ + /* image assigned to output */ + /* stack order input sockets: col, alpha, z */ + + if(node->id && (node->flag & NODE_DO_OUTPUT)) { /* only one works on out */ + RenderData *rd= data; + Image *ima= (Image *)node->id; + ImBuf *ibuf; + CompBuf *cbuf, *tbuf; + int rectx, recty; + void *lock; + + BKE_image_user_calc_frame(node->storage, rd->cfra, 0); + + /* always returns for viewer image, but we check nevertheless */ + ibuf= BKE_image_acquire_ibuf(ima, node->storage, &lock); + if(ibuf==NULL) { + printf("node_composit_exec_viewer error\n"); + BKE_image_release_ibuf(ima, lock); + return; + } + + /* free all in ibuf */ + imb_freerectImBuf(ibuf); + imb_freerectfloatImBuf(ibuf); + IMB_freezbuffloatImBuf(ibuf); + + /* get size */ + tbuf= in[0]->data?in[0]->data:(in[1]->data?in[1]->data:in[2]->data); + if(tbuf==NULL) { + rectx= 320; recty= 256; + } + else { + rectx= tbuf->x; + recty= tbuf->y; + } + + /* make ibuf, and connect to ima */ + ibuf->x= rectx; + ibuf->y= recty; + imb_addrectfloatImBuf(ibuf); + + ima->ok= IMA_OK_LOADED; + + /* now we combine the input with ibuf */ + cbuf= alloc_compbuf(rectx, recty, CB_RGBA, 0); /* no alloc*/ + cbuf->rect= ibuf->rect_float; + + /* when no alpha, we can simply copy */ + if(in[1]->data==NULL) { + composit1_pixel_processor(node, cbuf, in[0]->data, in[0]->vec, do_copy_rgba, CB_RGBA); + } + else + composit2_pixel_processor(node, cbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, do_copy_a_rgba, CB_RGBA, CB_VAL); + + /* zbuf option */ + if(in[2]->data) { + CompBuf *zbuf= alloc_compbuf(rectx, recty, CB_VAL, 1); + ibuf->zbuf_float= zbuf->rect; + ibuf->mall |= IB_zbuffloat; + + composit1_pixel_processor(node, zbuf, in[2]->data, in[2]->vec, do_copy_value, CB_VAL); + + /* free compbuf, but not the rect */ + zbuf->malloc= 0; + free_compbuf(zbuf); + } + + BKE_image_release_ibuf(ima, lock); + + generate_preview(data, node, cbuf); + free_compbuf(cbuf); + + } + else if(in[0]->data) { + generate_preview(data, node, in[0]->data); + } +} + +static void node_composit_init_viewer(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user"); + node->storage= iuser; + iuser->sfra= 1; + iuser->fie_ima= 2; + iuser->ok= 1; +} + +void register_node_type_cmp_viewer(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW); + node_type_socket_templates(&ntype, cmp_node_viewer_in, NULL); + node_type_size(&ntype, 80, 60, 200); + node_type_init(&ntype, node_composit_init_viewer); + node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_composit_exec_viewer); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/composite/nodes/node_composite_zcombine.c b/source/blender/nodes/composite/nodes/node_composite_zcombine.c new file mode 100644 index 00000000000..dfed26be343 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_zcombine.c @@ -0,0 +1,238 @@ +/* + * $Id: CMP_zcombine.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_zcombine.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** Z COMBINE ******************** */ + /* lazy coder note: node->custom2 is abused to send signal */ +static bNodeSocketTemplate cmp_node_zcombine_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f, PROP_NONE}, + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f, PROP_NONE}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_zcombine_out[]= { + { SOCK_RGBA, 0, "Image"}, + { SOCK_FLOAT, 0, "Z"}, + { -1, 0, "" } +}; + +static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *src2, float *z2) +{ + float alpha; + float malpha; + + if(*z1 <= *z2) { + if (node->custom1) { + // use alpha in combine operation + alpha= src1[3]; + malpha= 1.0f - alpha; + out[0]= malpha*src2[0] + alpha*src1[0]; + out[1]= malpha*src2[1] + alpha*src1[1]; + out[2]= malpha*src2[2] + alpha*src1[2]; + out[3]= malpha*src2[3] + alpha*src1[3]; + } + else { + // do combination based solely on z value + QUATCOPY(out, src1); + } + } + else { + if (node->custom1) { + // use alpha in combine operation + alpha= src2[3]; + malpha= 1.0f - alpha; + out[0]= malpha*src1[0] + alpha*src2[0]; + out[1]= malpha*src1[1] + alpha*src2[1]; + out[2]= malpha*src1[2] + alpha*src2[2]; + out[3]= malpha*src1[3] + alpha*src2[3]; + } + else { + // do combination based solely on z value + QUATCOPY(out, src1); + } + + if(node->custom2) + *z1= *z2; + } +} + +static void do_zcombine_mask(bNode *node, float *out, float *z1, float *z2) +{ + if(*z1 > *z2) { + *out= 1.0f; + if(node->custom2) + *z1= *z2; + } +} + +static void do_zcombine_add(bNode *node, float *out, float *col1, float *col2, float *acol) +{ + float alpha; + float malpha; + + if (node->custom1) { + // use alpha in combine operation, antialiased mask in used here just as hint for the z value + if (*acol>0.0f) { + alpha= col2[3]; + malpha= 1.0f - alpha; + + + out[0]= malpha*col1[0] + alpha*col2[0]; + out[1]= malpha*col1[1] + alpha*col2[1]; + out[2]= malpha*col1[2] + alpha*col2[2]; + out[3]= malpha*col1[3] + alpha*col2[3]; + } + else { + alpha= col1[3]; + malpha= 1.0f - alpha; + + + out[0]= malpha*col2[0] + alpha*col1[0]; + out[1]= malpha*col2[1] + alpha*col1[1]; + out[2]= malpha*col2[2] + alpha*col1[2]; + out[3]= malpha*col2[3] + alpha*col1[3]; + } + } + else { + // do combination based solely on z value but with antialiased mask + alpha = *acol; + malpha= 1.0f - alpha; + + out[0]= malpha*col1[0] + alpha*col2[0]; + out[1]= malpha*col1[1] + alpha*col2[1]; + out[2]= malpha*col1[2] + alpha*col2[2]; + out[3]= malpha*col1[3] + alpha*col2[3]; + } +} + +static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + RenderData *rd= data; + CompBuf *cbuf= in[0]->data; + CompBuf *zbuf; + + /* stack order in: col z col z */ + /* stack order out: col z */ + if(out[0]->hasoutput==0 && out[1]->hasoutput==0) + return; + + /* no input image; do nothing now */ + if(in[0]->data==NULL) { + return; + } + + if(out[1]->hasoutput) { + /* copy or make a buffer for for the first z value, here we write result in */ + if(in[1]->data) + zbuf= dupalloc_compbuf(in[1]->data); + else { + float *zval; + int tot= cbuf->x*cbuf->y; + + zbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); + for(zval= zbuf->rect; tot; tot--, zval++) + *zval= in[1]->vec[0]; + } + /* lazy coder hack */ + node->custom2= 1; + out[1]->data= zbuf; + } + else { + node->custom2= 0; + zbuf= in[1]->data; + } + + if(rd->scemode & R_FULL_SAMPLE) { + /* make output size of first input image */ + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); // allocs + + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, zbuf, in[1]->vec, in[2]->data, in[2]->vec, + in[3]->data, in[3]->vec, do_zcombine, CB_RGBA, CB_VAL, CB_RGBA, CB_VAL); + + out[0]->data= stackbuf; + } + else { + /* make output size of first input image */ + CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ + CompBuf *mbuf; + float *fp; + int x; + char *aabuf; + + + /* make a mask based on comparison, optionally write zvalue */ + mbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); + composit2_pixel_processor(node, mbuf, zbuf, in[1]->vec, in[3]->data, in[3]->vec, do_zcombine_mask, CB_VAL, CB_VAL); + + /* convert to char */ + aabuf= MEM_mallocN(cbuf->x*cbuf->y, "aa buf"); + fp= mbuf->rect; + for(x= cbuf->x*cbuf->y-1; x>=0; x--) + if(fp[x]==0.0f) aabuf[x]= 0; + else aabuf[x]= 255; + + antialias_tagbuf(cbuf->x, cbuf->y, aabuf); + + /* convert to float */ + fp= mbuf->rect; + for(x= cbuf->x*cbuf->y-1; x>=0; x--) + if(aabuf[x]>1) + fp[x]= (1.0f/255.0f)*(float)aabuf[x]; + + composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[2]->data, in[2]->vec, mbuf, NULL, + do_zcombine_add, CB_RGBA, CB_RGBA, CB_VAL); + /* free */ + free_compbuf(mbuf); + MEM_freeN(aabuf); + + out[0]->data= stackbuf; + } + +} + +void register_node_type_cmp_zcombine(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_zcombine_in, cmp_node_zcombine_out); + node_type_size(&ntype, 80, 40, 120); + node_type_exec(&ntype, node_composit_exec_zcombine); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c b/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c deleted file mode 100644 index 9dcdfaf21e6..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_alphaOver.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** ALPHAOVER ******************** */ -static bNodeSocketType cmp_node_alphaover_in[]= { - { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_alphaover_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_alphaover_premul(bNode *UNUSED(node), float *out, float *src, float *over, float *fac) -{ - - if(over[3]<=0.0f) { - QUATCOPY(out, src); - } - else if(fac[0]==1.0f && over[3]>=1.0f) { - QUATCOPY(out, over); - } - else { - float mul= 1.0f - fac[0]*over[3]; - - out[0]= (mul*src[0]) + fac[0]*over[0]; - out[1]= (mul*src[1]) + fac[0]*over[1]; - out[2]= (mul*src[2]) + fac[0]*over[2]; - out[3]= (mul*src[3]) + fac[0]*over[3]; - } -} - -/* result will be still premul, but the over part is premulled */ -static void do_alphaover_key(bNode *UNUSED(node), float *out, float *src, float *over, float *fac) -{ - - if(over[3]<=0.0f) { - QUATCOPY(out, src); - } - else if(fac[0]==1.0f && over[3]>=1.0f) { - QUATCOPY(out, over); - } - else { - float premul= fac[0]*over[3]; - float mul= 1.0f - premul; - - out[0]= (mul*src[0]) + premul*over[0]; - out[1]= (mul*src[1]) + premul*over[1]; - out[2]= (mul*src[2]) + premul*over[2]; - out[3]= (mul*src[3]) + fac[0]*over[3]; - } -} - -/* result will be still premul, but the over part is premulled */ -static void do_alphaover_mixed(bNode *node, float *out, float *src, float *over, float *fac) -{ - - if(over[3]<=0.0f) { - QUATCOPY(out, src); - } - else if(fac[0]==1.0f && over[3]>=1.0f) { - QUATCOPY(out, over); - } - else { - NodeTwoFloats *ntf= node->storage; - float addfac= 1.0f - ntf->x + over[3]*ntf->x; - float premul= fac[0]*addfac; - float mul= 1.0f - fac[0]*over[3]; - - out[0]= (mul*src[0]) + premul*over[0]; - out[1]= (mul*src[1]) + premul*over[1]; - out[2]= (mul*src[2]) + premul*over[2]; - out[3]= (mul*src[3]) + fac[0]*over[3]; - } -} - - - - -static void node_composit_exec_alphaover(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: col col */ - /* stack order out: col */ - if(out[0]->hasoutput==0) - return; - - /* input no image? then only color operation */ - if(in[1]->data==NULL && in[2]->data==NULL) { - do_alphaover_premul(node, out[0]->vec, in[1]->vec, in[2]->vec, in[0]->vec); - } - else { - /* make output size of input image */ - CompBuf *cbuf= in[1]->data?in[1]->data:in[2]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - NodeTwoFloats *ntf= node->storage; - - if(ntf->x != 0.0f) - composit3_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, in[0]->data, in[0]->vec, do_alphaover_mixed, CB_RGBA, CB_RGBA, CB_VAL); - else if(node->custom1) - composit3_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, in[0]->data, in[0]->vec, do_alphaover_key, CB_RGBA, CB_RGBA, CB_VAL); - else - composit3_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, in[0]->data, in[0]->vec, do_alphaover_premul, CB_RGBA, CB_RGBA, CB_VAL); - - out[0]->data= stackbuf; - } -} - -static void node_alphaover_init(bNode* node) -{ - node->storage= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats"); -} - -void register_node_type_cmp_alphaover(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_ALPHAOVER, "AlphaOver", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_alphaover_in, cmp_node_alphaover_out); - node_type_size(&ntype, 80, 40, 120); - node_type_init(&ntype, node_alphaover_init); - node_type_storage(&ntype, "NodeTwoFloats", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_alphaover); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_bilateralblur.c b/source/blender/nodes/intern/CMP_nodes/CMP_bilateralblur.c deleted file mode 100644 index c106b437e17..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_bilateralblur.c +++ /dev/null @@ -1,271 +0,0 @@ -/* - * - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Vilem Novak - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_bilateralblur.c - * \ingroup cmpnodes - */ - -#include "../CMP_util.h" - -/* **************** BILATERALBLUR ******************** */ -static bNodeSocketType cmp_node_bilateralblur_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Determinator", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_bilateralblur_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -#define INIT_C3\ - mean0 = 1; mean1[0] = src[0];mean1[1] = src[1];mean1[2] = src[2];mean1[3] = src[3]; - -/* finds color distances */ -#define COLOR_DISTANCE_C3(c1, c2)\ - ((c1[0] - c2[0])*(c1[0] - c2[0]) + \ - (c1[1] - c2[1])*(c1[1] - c2[1]) + \ - (c1[2] - c2[2])*(c1[2] - c2[2]) + \ - (c1[3] - c2[3])*(c1[3] - c2[3])) - -/* this is the main kernel function for comparing color distances - and adding them weighted to the final color */ -#define KERNEL_ELEMENT_C3(k)\ - temp_color = src + deltas[k];\ - ref_color = ref + deltas[k];\ - w = weight_tab[k] + COLOR_DISTANCE_C3(ref, ref_color )*i2sigma_color;\ - w = 1./(w*w + 1); \ - mean0 += w;\ - mean1[0] += temp_color[0]*w; \ - mean1[1] += temp_color[1]*w; \ - mean1[2] += temp_color[2]*w; \ - mean1[3] += temp_color[3]*w; - -/* write blurred values to image */ -#define UPDATE_OUTPUT_C3\ - mean0 = 1./mean0;\ - dest[x*pix + 0] = mean1[0]*mean0; \ - dest[x*pix + 1] = mean1[1]*mean0; \ - dest[x*pix + 2] = mean1[2]*mean0; \ - dest[x*pix + 3] = mean1[3]*mean0; - -/* initializes deltas for fast access to neighbour pixels */ -#define INIT_3X3_DELTAS( deltas, step, nch ) \ - ((deltas)[0] = (nch), (deltas)[1] = -(step) + (nch), \ - (deltas)[2] = -(step), (deltas)[3] = -(step) - (nch), \ - (deltas)[4] = -(nch), (deltas)[5] = (step) - (nch), \ - (deltas)[6] = (step), (deltas)[7] = (step) + (nch)); - - -/* code of this node was heavily inspired by the smooth function of opencv library. -The main change is an optional image input */ -static void node_composit_exec_bilateralblur(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - NodeBilateralBlurData *nbbd= node->storage; - CompBuf *new, *source, *img= in[0]->data , *refimg= in[1]->data; - double mean0, w, i2sigma_color, i2sigma_space; - double mean1[4]; - double weight_tab[8]; - float *src, *dest, *ref, *temp_color, *ref_color; - float sigma_color, sigma_space; - int imgx, imgy, x, y, pix, i, step; - int deltas[8]; - short found_determinator= 0; - - if(img == NULL || out[0]->hasoutput == 0) - return; - - if(img->type != CB_RGBA) { - img= typecheck_compbuf(in[0]->data, CB_RGBA); - } - - imgx= img->x; - imgy= img->y; - pix= img->type; - step= pix * imgx; - - if(refimg) { - if(refimg->x == imgx && refimg->y == imgy) { - if(ELEM3(refimg->type, CB_VAL, CB_VEC2, CB_VEC3)) { - refimg= typecheck_compbuf(in[1]->data, CB_RGBA); - found_determinator= 1; - } - } - } - else { - refimg= img; - } - - /* allocs */ - source= dupalloc_compbuf(img); - new= alloc_compbuf(imgx, imgy, pix, 1); - - /* accept image offsets from other nodes */ - new->xof= img->xof; - new->yof= img->yof; - - /* bilateral code properties */ - sigma_color= nbbd->sigma_color; - sigma_space= nbbd->sigma_space; - - i2sigma_color= 1. / (sigma_color * sigma_color); - i2sigma_space= 1. / (sigma_space * sigma_space); - - INIT_3X3_DELTAS(deltas, step, pix); - - weight_tab[0] = weight_tab[2] = weight_tab[4] = weight_tab[6] = i2sigma_space; - weight_tab[1] = weight_tab[3] = weight_tab[5] = weight_tab[7] = i2sigma_space * 2; - - /* iterations */ - for(i= 0; i < nbbd->iter; i++) { - src= source->rect; - ref= refimg->rect; - dest= new->rect; - /*goes through image, there are more loops for 1st/last line and all other lines*/ - /*kernel element accumulates surrounding colors, which are then written with the update_output function*/ - for(x= 0; x < imgx; x++, src+= pix, ref+= pix) { - INIT_C3; - - KERNEL_ELEMENT_C3(6); - - if(x > 0) { - KERNEL_ELEMENT_C3(5); - KERNEL_ELEMENT_C3(4); - } - - if(x < imgx - 1) { - KERNEL_ELEMENT_C3(7); - KERNEL_ELEMENT_C3(0); - } - - UPDATE_OUTPUT_C3; - } - - dest+= step; - - for(y= 1; y < imgy - 1; y++, dest+= step, src+= pix, ref+= pix) { - x= 0; - - INIT_C3; - - KERNEL_ELEMENT_C3(0); - KERNEL_ELEMENT_C3(1); - KERNEL_ELEMENT_C3(2); - KERNEL_ELEMENT_C3(6); - KERNEL_ELEMENT_C3(7); - - UPDATE_OUTPUT_C3; - - src+= pix; - ref+= pix; - - for(x= 1; x < imgx - 1; x++, src+= pix, ref+= pix) { - INIT_C3; - - KERNEL_ELEMENT_C3(0); - KERNEL_ELEMENT_C3(1); - KERNEL_ELEMENT_C3(2); - KERNEL_ELEMENT_C3(3); - KERNEL_ELEMENT_C3(4); - KERNEL_ELEMENT_C3(5); - KERNEL_ELEMENT_C3(6); - KERNEL_ELEMENT_C3(7); - - UPDATE_OUTPUT_C3; - } - - INIT_C3; - - KERNEL_ELEMENT_C3(2); - KERNEL_ELEMENT_C3(3); - KERNEL_ELEMENT_C3(4); - KERNEL_ELEMENT_C3(5); - KERNEL_ELEMENT_C3(6); - - UPDATE_OUTPUT_C3; - } - - for(x= 0; x < imgx; x++, src+= pix, ref+= pix) { - INIT_C3; - - KERNEL_ELEMENT_C3(2); - - if(x > 0) { - KERNEL_ELEMENT_C3(3); - KERNEL_ELEMENT_C3(4); - } - if(x < imgx - 1) { - KERNEL_ELEMENT_C3(1); - KERNEL_ELEMENT_C3(0); - } - - UPDATE_OUTPUT_C3; - } - - if(node->exec & NODE_BREAK) break; - - SWAP(CompBuf, *source, *new); - } - - if(img != in[0]->data) - free_compbuf(img); - - if(found_determinator == 1) { - if(refimg != in[1]->data) - free_compbuf(refimg); - } - - out[0]->data= source; - - free_compbuf(new); -} - -static void node_composit_init_bilateralblur(bNode* node) -{ - NodeBilateralBlurData *nbbd= MEM_callocN(sizeof(NodeBilateralBlurData), "node bilateral blur data"); - node->storage= nbbd; - nbbd->sigma_color= 0.3; - nbbd->sigma_space= 5.0; -} - -void register_node_type_cmp_bilateralblur(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_BILATERALBLUR, "Bilateral Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS, - cmp_node_bilateralblur_in, cmp_node_bilateralblur_out); - node_type_size(&ntype, 150, 120, 200); - node_type_init(&ntype, node_composit_init_bilateralblur); - node_type_storage(&ntype, "NodeBilateralBlurData", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_bilateralblur); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c deleted file mode 100644 index 718578a921b..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c +++ /dev/null @@ -1,736 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Campbell Barton, Alfredo de Greef, David Millan Escriva, - * Juho Vepsäläinen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_blur.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** BLUR ******************** */ -static bNodeSocketType cmp_node_blur_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Size", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_blur_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static float *make_gausstab(int filtertype, int rad) -{ - float *gausstab, sum, val; - int i, n; - - n = 2 * rad + 1; - - gausstab = (float *) MEM_mallocN(n * sizeof(float), "gauss"); - - sum = 0.0f; - for (i = -rad; i <= rad; i++) { - val= RE_filter_value(filtertype, (float)i/(float)rad); - sum += val; - gausstab[i+rad] = val; - } - - sum= 1.0f/sum; - for(i=0; istorage; - CompBuf *work; - register float sum, val; - float rval, gval, bval, aval; - float *gausstab, *gausstabcent; - int rad, imgx= img->x, imgy= img->y; - int x, y, pix= img->type; - int i, bigstep; - float *src, *dest; - - /* helper image */ - work= alloc_compbuf(imgx, imgy, img->type, 1); /* allocs */ - - /* horizontal */ - if(nbd->sizex == 0) { - memcpy(work->rect, img->rect, sizeof(float) * img->type * imgx * imgy); - } - else { - rad = scale*(float)nbd->sizex; - if(rad>imgx/2) - rad= imgx/2; - else if(rad<1) - rad= 1; - - gausstab= make_gausstab(nbd->filtertype, rad); - gausstabcent= gausstab+rad; - - for (y = 0; y < imgy; y++) { - float *srcd= img->rect + pix*(y*img->x); - - dest = work->rect + pix*(y * img->x); - - for (x = 0; x < imgx ; x++) { - int minr= x-rad<0?-x:-rad; - int maxr= x+rad>imgx?imgx-x:rad; - - src= srcd + pix*(x+minr); - - sum= gval = rval= bval= aval= 0.0f; - for (i= minr; i < maxr; i++) { - val= gausstabcent[i]; - sum+= val; - rval += val * (*src++); - if(pix==4) { - gval += val * (*src++); - bval += val * (*src++); - aval += val * (*src++); - } - } - sum= 1.0f/sum; - *dest++ = rval*sum; - if(pix==4) { - *dest++ = gval*sum; - *dest++ = bval*sum; - *dest++ = aval*sum; - } - } - if(node->exec & NODE_BREAK) - break; - } - - /* vertical */ - MEM_freeN(gausstab); - } - - if(nbd->sizey == 0) { - memcpy(new->rect, work->rect, sizeof(float) * img->type * imgx * imgy); - } - else { - rad = scale*(float)nbd->sizey; - if(rad>imgy/2) - rad= imgy/2; - else if(rad<1) - rad= 1; - - gausstab= make_gausstab(nbd->filtertype, rad); - gausstabcent= gausstab+rad; - - bigstep = pix*imgx; - for (x = 0; x < imgx; x++) { - float *srcd= work->rect + pix*x; - - dest = new->rect + pix*x; - - for (y = 0; y < imgy ; y++) { - int minr= y-rad<0?-y:-rad; - int maxr= y+rad>imgy?imgy-y:rad; - - src= srcd + bigstep*(y+minr); - - sum= gval = rval= bval= aval= 0.0f; - for (i= minr; i < maxr; i++) { - val= gausstabcent[i]; - sum+= val; - rval += val * src[0]; - if(pix==4) { - gval += val * src[1]; - bval += val * src[2]; - aval += val * src[3]; - } - src += bigstep; - } - sum= 1.0f/sum; - dest[0] = rval*sum; - if(pix==4) { - dest[1] = gval*sum; - dest[2] = bval*sum; - dest[3] = aval*sum; - } - dest+= bigstep; - } - if(node->exec & NODE_BREAK) - break; - } - MEM_freeN(gausstab); - } - - free_compbuf(work); -} - -/* reference has to be mapped 0-1, and equal in size */ -static void bloom_with_reference(CompBuf *new, CompBuf *img, CompBuf *UNUSED(ref), float UNUSED(fac), NodeBlurData *nbd) -{ - CompBuf *wbuf; - register float val; - float radxf, radyf; - float **maintabs; - float *gausstabx, *gausstabcenty; - float *gausstaby, *gausstabcentx; - int radx, rady, imgx= img->x, imgy= img->y; - int x, y; - int i, j; - float *src, *dest, *wb; - - wbuf= alloc_compbuf(imgx, imgy, CB_VAL, 1); - - /* horizontal */ - radx = (float)nbd->sizex; - if(radx>imgx/2) - radx= imgx/2; - else if(radx<1) - radx= 1; - - /* vertical */ - rady = (float)nbd->sizey; - if(rady>imgy/2) - rady= imgy/2; - else if(rady<1) - rady= 1; - - x= MAX2(radx, rady); - maintabs= MEM_mallocN(x*sizeof(void *), "gauss array"); - for(i= 0; irect; - src= img->rect; - - radxf= (float)radx; - radyf= (float)rady; - - for (y = 0; y < imgy; y++) { - for (x = 0; x < imgx ; x++, src+=4) {//, refd++) { - -// int refradx= (int)(refd[0]*radxf); -// int refrady= (int)(refd[0]*radyf); - - int refradx= (int)(radxf*0.3f*src[3]*(src[0]+src[1]+src[2])); - int refrady= (int)(radyf*0.3f*src[3]*(src[0]+src[1]+src[2])); - - if(refradx>radx) refradx= radx; - else if(refradx<1) refradx= 1; - if(refrady>rady) refrady= rady; - else if(refrady<1) refrady= 1; - - if(refradx==1 && refrady==1) { - wb= wbuf->rect + ( y*imgx + x); - dest= new->rect + 4*( y*imgx + x); - wb[0]+= 1.0f; - dest[0] += src[0]; - dest[1] += src[1]; - dest[2] += src[2]; - dest[3] += src[3]; - } - else { - int minxr= x-refradx<0?-x:-refradx; - int maxxr= x+refradx>imgx?imgx-x:refradx; - int minyr= y-refrady<0?-y:-refrady; - int maxyr= y+refrady>imgy?imgy-y:refrady; - - float *destd= new->rect + 4*( (y + minyr)*imgx + x + minxr); - float *wbufd= wbuf->rect + ( (y + minyr)*imgx + x + minxr); - - gausstabx= maintabs[refradx-1]; - gausstabcentx= gausstabx+refradx; - gausstaby= maintabs[refrady-1]; - gausstabcenty= gausstaby+refrady; - - for (i= minyr; i < maxyr; i++, destd+= 4*imgx, wbufd+= imgx) { - dest= destd; - wb= wbufd; - for (j= minxr; j < maxxr; j++, dest+=4, wb++) { - - val= gausstabcenty[i]*gausstabcentx[j]; - wb[0]+= val; - dest[0] += val * src[0]; - dest[1] += val * src[1]; - dest[2] += val * src[2]; - dest[3] += val * src[3]; - } - } - } - } - } - - x= imgx*imgy; - dest= new->rect; - wb= wbuf->rect; - while(x--) { - val= 1.0f/wb[0]; - dest[0]*= val; - dest[1]*= val; - dest[2]*= val; - dest[3]*= val; - wb++; - dest+= 4; - } - - free_compbuf(wbuf); - - x= MAX2(radx, rady); - for(i= 0; i0.33f) { - fj= (fj-0.33f)/0.66f; - if(fi+fj>1.0f) - return 0.0f; - else - return 1.0f; - } - else return 1.0f; -} -#endif - -/* uses full filter, no horizontal/vertical optimize possible */ -/* both images same type, either 1 or 4 channels */ -static void bokeh_single_image(bNode *node, CompBuf *new, CompBuf *img, float fac) -{ - NodeBlurData *nbd= node->storage; - register float val; - float radxf, radyf; - float *gausstab, *dgauss; - int radx, rady, imgx= img->x, imgy= img->y; - int x, y, pix= img->type; - int i, j, n; - float *src= NULL, *dest, *srcd= NULL; - - /* horizontal */ - radxf = fac*(float)nbd->sizex; - if(radxf>imgx/2.0f) - radxf= imgx/2.0f; - else if(radxf<1.0f) - radxf= 1.0f; - - /* vertical */ - radyf = fac*(float)nbd->sizey; - if(radyf>imgy/2.0f) - radyf= imgy/2.0f; - else if(radyf<1.0f) - radyf= 1.0f; - - radx= ceil(radxf); - rady= ceil(radyf); - - n = (2*radx+1)*(2*rady+1); - - /* create a full filter image */ - gausstab= MEM_mallocN(sizeof(float)*n, "filter tab"); - dgauss= gausstab; - val= 0.0f; - for(j=-rady; j<=rady; j++) { - for(i=-radx; i<=radx; i++, dgauss++) { - float fj= (float)j/radyf; - float fi= (float)i/radxf; - float dist= sqrt(fj*fj + fi*fi); - - //*dgauss= hexagon_filter(fi, fj); - *dgauss= RE_filter_value(nbd->filtertype, dist); - - val+= *dgauss; - } - } - - if(val!=0.0f) { - val= 1.0f/val; - for(j= n -1; j>=0; j--) - gausstab[j]*= val; - } - else gausstab[4]= 1.0f; - - for (y = -rady+1; y < imgy+rady-1; y++) { - - if(y<=0) srcd= img->rect; - else if(yrect + pix*(imgy-1)*imgx; - - for (x = -radx+1; x < imgx+radx-1 ; x++) { - int minxr= x-radx<0?-x:-radx; - int maxxr= x+radx>=imgx?imgx-x-1:radx; - int minyr= y-rady<0?-y:-rady; - int maxyr= y+rady>imgy-1?imgy-y-1:rady; - - float *destd= new->rect + pix*( (y + minyr)*imgx + x + minxr); - float *dgausd= gausstab + (minyr+rady)*(2*radx+1) + minxr+radx; - - if(x<=0) src= srcd; - else if(x1) { - dest[1] += val * src[1]; - dest[2] += val * src[2]; - dest[3] += val * src[3]; - } - } - } - } - } - if(node->exec & NODE_BREAK) - break; - } - - MEM_freeN(gausstab); -} - - -/* reference has to be mapped 0-1, and equal in size */ -static void blur_with_reference(bNode *node, CompBuf *new, CompBuf *img, CompBuf *ref) -{ - NodeBlurData *nbd= node->storage; - CompBuf *blurbuf, *ref_use; - register float sum, val; - float rval, gval, bval, aval, radxf, radyf; - float **maintabs; - float *gausstabx, *gausstabcenty; - float *gausstaby, *gausstabcentx; - int radx, rady, imgx= img->x, imgy= img->y; - int x, y, pix= img->type; - int i, j; - float *src, *dest, *refd, *blurd; - - if(ref->x!=img->x && ref->y!=img->y) - return; - - ref_use= typecheck_compbuf(ref, CB_VAL); - - /* trick is; we blur the reference image... but only works with clipped values*/ - blurbuf= alloc_compbuf(imgx, imgy, CB_VAL, 1); - blurd= blurbuf->rect; - refd= ref_use->rect; - for(x= imgx*imgy; x>0; x--, refd++, blurd++) { - if(refd[0]<0.0f) blurd[0]= 0.0f; - else if(refd[0]>1.0f) blurd[0]= 1.0f; - else blurd[0]= refd[0]; - } - - blur_single_image(node, blurbuf, blurbuf, 1.0f); - - /* horizontal */ - radx = (float)nbd->sizex; - if(radx>imgx/2) - radx= imgx/2; - else if(radx<1) - radx= 1; - - /* vertical */ - rady = (float)nbd->sizey; - if(rady>imgy/2) - rady= imgy/2; - else if(rady<1) - rady= 1; - - x= MAX2(radx, rady); - maintabs= MEM_mallocN(x*sizeof(void *), "gauss array"); - for(i= 0; ifiltertype, i+1); - - refd= blurbuf->rect; - dest= new->rect; - radxf= (float)radx; - radyf= (float)rady; - - for (y = 0; y < imgy; y++) { - for (x = 0; x < imgx ; x++, dest+=pix, refd++) { - int refradx= (int)(refd[0]*radxf); - int refrady= (int)(refd[0]*radyf); - - if(refradx>radx) refradx= radx; - else if(refradx<1) refradx= 1; - if(refrady>rady) refrady= rady; - else if(refrady<1) refrady= 1; - - if(refradx==1 && refrady==1) { - src= img->rect + pix*( y*imgx + x); - if(pix==1) - dest[0]= src[0]; - else - QUATCOPY(dest, src); - } - else { - int minxr= x-refradx<0?-x:-refradx; - int maxxr= x+refradx>imgx?imgx-x:refradx; - int minyr= y-refrady<0?-y:-refrady; - int maxyr= y+refrady>imgy?imgy-y:refrady; - - float *srcd= img->rect + pix*( (y + minyr)*imgx + x + minxr); - - gausstabx= maintabs[refradx-1]; - gausstabcentx= gausstabx+refradx; - gausstaby= maintabs[refrady-1]; - gausstabcenty= gausstaby+refrady; - - sum= gval = rval= bval= aval= 0.0f; - - for (i= minyr; i < maxyr; i++, srcd+= pix*imgx) { - src= srcd; - for (j= minxr; j < maxxr; j++, src+=pix) { - - val= gausstabcenty[i]*gausstabcentx[j]; - sum+= val; - rval += val * src[0]; - if(pix>1) { - gval += val * src[1]; - bval += val * src[2]; - aval += val * src[3]; - } - } - } - sum= 1.0f/sum; - dest[0] = rval*sum; - if(pix>1) { - dest[1] = gval*sum; - dest[2] = bval*sum; - dest[3] = aval*sum; - } - } - } - if(node->exec & NODE_BREAK) - break; - } - - free_compbuf(blurbuf); - - x= MAX2(radx, rady); - for(i= 0; idata; - NodeBlurData *nbd= node->storage; - - if(img==NULL) return; - - /* store image in size that is needed for absolute/relative conversions on ui level */ - nbd->image_in_width= img->x; - nbd->image_in_height= img->y; - - if(out[0]->hasoutput==0) return; - - if(nbd->relative) { - if (nbd->aspect==CMP_NODE_BLUR_ASPECT_NONE) { - nbd->sizex= (int)(nbd->percentx*0.01f*nbd->image_in_width); - nbd->sizey= (int)(nbd->percenty*0.01f*nbd->image_in_height); - } - else if (nbd->aspect==CMP_NODE_BLUR_ASPECT_Y) { - nbd->sizex= (int)(nbd->percentx*0.01f*nbd->image_in_width); - nbd->sizey= (int)(nbd->percenty*0.01f*nbd->image_in_width); - } - else if (nbd->aspect==CMP_NODE_BLUR_ASPECT_X) { - nbd->sizex= (int)(nbd->percentx*0.01f*nbd->image_in_height); - nbd->sizey= (int)(nbd->percenty*0.01f*nbd->image_in_height); - } - } - - if (nbd->sizex==0 && nbd->sizey==0) { - new= pass_on_compbuf(img); - out[0]->data= new; - } - else if (nbd->filtertype == R_FILTER_FAST_GAUSS) { - CompBuf *new, *img = in[0]->data; - // TODO: can this be mapped with reference, too? - const float sx = ((float)nbd->sizex*in[1]->vec[0])/2.0f, sy = ((float)nbd->sizey*in[1]->vec[0])/2.0f; - int c; - - if ((img==NULL) || (out[0]->hasoutput==0)) return; - - if (img->type == CB_VEC2) - new = typecheck_compbuf(img, CB_VAL); - else if (img->type == CB_VEC3) - new = typecheck_compbuf(img, CB_RGBA); - else - new = dupalloc_compbuf(img); - - if ((sx == sy) && (sx > 0.f)) { - for (c=0; ctype; ++c) - IIR_gauss(new, sx, c, 3); - } - else { - if (sx > 0.f) { - for (c=0; ctype; ++c) - IIR_gauss(new, sx, c, 1); - } - if (sy > 0.f) { - for (c=0; ctype; ++c) - IIR_gauss(new, sy, c, 2); - } - } - out[0]->data = new; - - } else { - /* All non fast gauss blur methods */ - if(img->type==CB_VEC2 || img->type==CB_VEC3) { - img= typecheck_compbuf(in[0]->data, CB_RGBA); - } - - /* if fac input, we do it different */ - if(in[1]->data) { - CompBuf *gammabuf; - - /* make output size of input image */ - new= alloc_compbuf(img->x, img->y, img->type, 1); /* allocs */ - - /* accept image offsets from other nodes */ - new->xof = img->xof; - new->yof = img->yof; - - if(nbd->gamma) { - gammabuf= dupalloc_compbuf(img); - gamma_correct_compbuf(gammabuf, 0); - } - else gammabuf= img; - - blur_with_reference(node, new, gammabuf, in[1]->data); - - if(nbd->gamma) { - gamma_correct_compbuf(new, 1); - free_compbuf(gammabuf); - } - if(node->exec & NODE_BREAK) { - free_compbuf(new); - new= NULL; - } - out[0]->data= new; - } - else { - - if(in[1]->vec[0]<=0.001f) { /* time node inputs can be a tiny value */ - new= pass_on_compbuf(img); - } - else { - CompBuf *gammabuf; - - /* make output size of input image */ - new= alloc_compbuf(img->x, img->y, img->type, 1); /* allocs */ - - /* accept image offsets from other nodes */ - new->xof = img->xof; - new->yof = img->yof; - - if(nbd->gamma) { - gammabuf= dupalloc_compbuf(img); - gamma_correct_compbuf(gammabuf, 0); - } - else gammabuf= img; - - if(nbd->bokeh) - bokeh_single_image(node, new, gammabuf, in[1]->vec[0]); - else if(1) - blur_single_image(node, new, gammabuf, in[1]->vec[0]); - else /* bloom experimental... */ - bloom_with_reference(new, gammabuf, NULL, in[1]->vec[0], nbd); - - if(nbd->gamma) { - gamma_correct_compbuf(new, 1); - free_compbuf(gammabuf); - } - if(node->exec & NODE_BREAK) { - free_compbuf(new); - new= NULL; - } - } - out[0]->data= new; - } - if(img!=in[0]->data) - free_compbuf(img); - } - - generate_preview(data, node, out[0]->data); -} - -static void node_composit_init_blur(bNode* node) -{ - node->storage= MEM_callocN(sizeof(NodeBlurData), "node blur data"); -} - -void register_node_type_cmp_blur(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_BLUR, "Blur", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_blur_in, cmp_node_blur_out); - node_type_size(&ntype, 120, 80, 200); - node_type_init(&ntype, node_composit_init_blur); - node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_blur); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_brightness.c b/source/blender/nodes/intern/CMP_nodes/CMP_brightness.c deleted file mode 100644 index 50a8d05b03d..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_brightness.c +++ /dev/null @@ -1,110 +0,0 @@ -/* -* $Id$ -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* The Original Code is Copyright (C) 2006 Blender Foundation. -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** - -*/ - -/** \file blender/nodes/intern/CMP_nodes/CMP_brightness.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** Brigh and contrsast ******************** */ - -static bNodeSocketType cmp_node_brightcontrast_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Bright", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f}, - { SOCK_VALUE, 1, "Contrast", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_brightcontrast_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_brightnesscontrast(bNode *UNUSED(node), float *out, float *in, float *in_brightness, float *in_contrast) -{ - float i; - int c; - float a, b, v; - float brightness = (*in_brightness) / 100.0f; - float contrast = *in_contrast; - float delta = contrast / 200.0f; - a = 1.0f - delta * 2.0f; - /* - * The algorithm is by Werner D. Streidt - * (http://visca.com/ffactory/archives/5-99/msg00021.html) - * Extracted of OpenCV demhist.c - */ - if( contrast > 0 ) -{ - a = 1.0f / a; - b = a * (brightness - delta); - } - else - { - delta *= -1; - b = a * (brightness + delta); - } - - for(c=0; c<3; c++){ - i = in[c]; - v = a*i + b; - out[c] = v; - } -} - -static void node_composit_exec_brightcontrast(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - if(out[0]->hasoutput==0) - return; - - if(in[0]->data) { - CompBuf *stackbuf, *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); - stackbuf= dupalloc_compbuf(cbuf); - composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, do_brightnesscontrast, CB_RGBA, CB_VAL, CB_VAL); - out[0]->data = stackbuf; - if(cbuf != in[0]->data) - free_compbuf(cbuf); - } -} - -void register_node_type_cmp_brightcontrast(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_brightcontrast_in, cmp_node_brightcontrast_out); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, node_composit_exec_brightcontrast); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c deleted file mode 100644 index e395716f36d..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c +++ /dev/null @@ -1,217 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Bob Holcomb - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_channelMatte.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* ******************* Channel Matte Node ********************************* */ -static bNodeSocketType cmp_node_channel_matte_in[]={ - {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static bNodeSocketType cmp_node_channel_matte_out[]={ - {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static void do_normalized_rgba_to_ycca2(bNode *UNUSED(node), float *out, float *in) -{ - /*normalize to the range 0.0 to 1.0) */ - rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); - out[0]=(out[0])/255.0; - out[1]=(out[1])/255.0; - out[2]=(out[2])/255.0; - out[3]=in[3]; -} - -static void do_normalized_ycca_to_rgba2(bNode *UNUSED(node), float *out, float *in) -{ - /*un-normalize the normalize from above */ - in[0]=in[0]*255.0; - in[1]=in[1]*255.0; - in[2]=in[2]*255.0; - ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); - out[3]=in[3]; -} - - -static void do_channel_matte(bNode *node, float *out, float *in) -{ - NodeChroma *c=(NodeChroma *)node->storage; - float alpha=0.0; - - switch(c->algorithm) { - case 0: { /* Alpha=key_channel-limit channel */ - int key_channel=node->custom2-1; - int limit_channel=c->channel-1; - alpha=in[key_channel]-in[limit_channel]; - break; - } - case 1: { /* Alpha=G-MAX(R, B) */ - switch(node->custom2) { - case 1: { - alpha=in[0]-MAX2(in[1],in[2]); - break; - } - case 2: { - alpha=in[1]-MAX2(in[0],in[2]); - break; - } - case 3: { - alpha=in[2]-MAX2(in[0],in[1]); - break; - } - default: - break; - } - break; - } - default: - break; - } - - /*flip because 0.0 is transparent, not 1.0*/ - alpha=1-alpha; - - /* test range*/ - if(alpha>c->t1) { - alpha=in[3]; /*whatever it was prior */ - } - else if(alphat2){ - alpha=0.0; - } - else {/*blend */ - alpha=(alpha-c->t2)/(c->t1-c->t2); - } - - - /* don't make something that was more transparent less transparent */ - if (alphahasinput==0) return; - if(in[0]->data==NULL) return; - if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; - - cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); - - outbuf=dupalloc_compbuf(cbuf); - - /*convert to colorspace*/ - switch(node->custom1) { - case CMP_NODE_CHANNEL_MATTE_CS_RGB: - break; - case CMP_NODE_CHANNEL_MATTE_CS_HSV: /*HSV*/ - composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_hsva, CB_RGBA); - break; - case CMP_NODE_CHANNEL_MATTE_CS_YUV: /*YUV*/ - composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_yuva, CB_RGBA); - break; - case CMP_NODE_CHANNEL_MATTE_CS_YCC: /*YCC*/ - composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_normalized_rgba_to_ycca2, CB_RGBA); - break; - default: - break; - } - - /*use the selected channel information to do the key */ - composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_channel_matte, CB_RGBA); - - /*convert back to RGB colorspace in place*/ - switch(node->custom1) { - case CMP_NODE_CHANNEL_MATTE_CS_RGB: /*RGB*/ - break; - case CMP_NODE_CHANNEL_MATTE_CS_HSV: /*HSV*/ - composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_hsva_to_rgba, CB_RGBA); - break; - case CMP_NODE_CHANNEL_MATTE_CS_YUV: /*YUV*/ - composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_yuva_to_rgba, CB_RGBA); - break; - case CMP_NODE_CHANNEL_MATTE_CS_YCC: /*YCC*/ - composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_normalized_ycca_to_rgba2, CB_RGBA); - break; - default: - break; - } - - generate_preview(data, node, outbuf); - out[0]->data=outbuf; - if(out[1]->hasoutput) - out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A); - - if(cbuf!=in[0]->data) - free_compbuf(cbuf); - -} - -static void node_composit_init_channel_matte(bNode *node) -{ - NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); - node->storage=c; - c->t1= 1.0f; - c->t2= 0.0f; - c->t3= 0.0f; - c->fsize= 0.0f; - c->fstrength= 0.0f; - c->algorithm=1; /*max channel limiting */ - c->channel=1; /* limit by red */ - node->custom1= 1; /* RGB channel */ - node->custom2= 2; /* Green Channel */ -} - -void register_node_type_cmp_channel_matte(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_CHANNEL_MATTE, "Channel Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_channel_matte_in, cmp_node_channel_matte_out); - node_type_size(&ntype, 200, 80, 250); - node_type_init(&ntype, node_composit_init_channel_matte); - node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_channel_matte); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c deleted file mode 100644 index 03230f2e212..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c +++ /dev/null @@ -1,207 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* ******************* Chroma Key ********************************************************** */ -static bNodeSocketType cmp_node_chroma_in[]={ - {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static bNodeSocketType cmp_node_chroma_out[]={ - {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static void do_rgba_to_ycca_normalized(bNode *UNUSED(node), float *out, float *in) -{ - rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); - - //normalize to 0..1.0 - out[0]=out[0]/255.0; - out[1]=out[1]/255.0; - out[2]=out[2]/255.0; - - //rescale to -1.0..1.0 - out[0]=(out[0]*2.0)-1.0; - out[1]=(out[1]*2.0)-1.0; - out[2]=(out[2]*2.0)-1.0; - -// out[0]=((out[0])-16)/255.0; -// out[1]=((out[1])-128)/255.0; -// out[2]=((out[2])-128)/255.0; - out[3]=in[3]; -} - -static void do_ycca_to_rgba_normalized(bNode *UNUSED(node), float *out, float *in) -{ - /*un-normalize the normalize from above */ - in[0]=(in[0]+1.0)/2.0; - in[1]=(in[1]+1.0)/2.0; - in[2]=(in[2]+1.0)/2.0; - - in[0]=(in[0]*255.0); - in[1]=(in[1]*255.0); - in[2]=(in[2]*255.0); - - // in[0]=(in[0]*255.0)+16; -// in[1]=(in[1]*255.0)+128; -// in[2]=(in[2]*255.0)+128; - ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); - out[3]=in[3]; -} - -static void do_chroma_key(bNode *node, float *out, float *in) -{ - NodeChroma *c; - float x, z, alpha; - float theta, beta, angle, angle2; - float kfg; - - c=node->storage; - - /* Algorithm from book "Video Demistified," does not include the spill reduction part */ - - /* find theta, the angle that the color space should be rotated based on key*/ - theta=atan2(c->key[2], c->key[1]); - - /*rotate the cb and cr into x/z space */ - x=in[1]*cos(theta)+in[2]*sin(theta); - z=in[2]*cos(theta)-in[1]*sin(theta); - - /*if within the acceptance angle */ - angle=c->t1*M_PI/180.0; /* convert to radians */ - - /* if kfg is <0 then the pixel is outside of the key color */ - kfg=x-(fabs(z)/tan(angle/2.0)); - - out[0]=in[0]; - out[1]=in[1]; - out[2]=in[2]; - - if(kfg>0.0) { /* found a pixel that is within key color */ - alpha=(1.0-kfg)*(c->fstrength); - - beta=atan2(z,x); - angle2=c->t2*M_PI/180.0; - - /* if beta is within the cutoff angle */ - if(fabs(beta)<(angle2/2.0)) { - alpha=0.0; - } - - /* don't make something that was more transparent less transparent */ - if (alphahasinput==0) return; - if(in[0]->data==NULL) return; - if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; - - cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); - - chromabuf= dupalloc_compbuf(cbuf); - - c=node->storage; - - /*convert rgbbuf to normalized chroma space*/ - composit1_pixel_processor(node, chromabuf, cbuf, in[0]->vec, do_rgba_to_ycca_normalized, CB_RGBA); - /*convert key to normalized chroma color space */ - do_rgba_to_ycca_normalized(node, c->key, in[1]->vec); - - /*per pixel chroma key*/ - composit1_pixel_processor(node, chromabuf, chromabuf, in[0]->vec, do_chroma_key, CB_RGBA); - - /*convert back*/ - composit1_pixel_processor(node, chromabuf, chromabuf, in[0]->vec, do_ycca_to_rgba_normalized, CB_RGBA); - - out[0]->data= chromabuf; - if(out[1]->hasoutput) - out[1]->data= valbuf_from_rgbabuf(chromabuf, CHAN_A); - - generate_preview(data, node, chromabuf); - - if(cbuf!=in[0]->data) - free_compbuf(cbuf); -} - - -static void node_composit_init_chroma_matte(bNode *node) -{ - NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); - node->storage= c; - c->t1= 30.0f; - c->t2= 10.0f; - c->t3= 0.0f; - c->fsize= 0.0f; - c->fstrength= 1.0f; -} - -void register_node_type_cmp_chroma_matte(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_chroma_in, cmp_node_chroma_out); - node_type_size(&ntype, 200, 80, 300); - node_type_init(&ntype, node_composit_init_chroma_matte); - node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_chroma_matte); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c deleted file mode 100644 index 55d77a902b9..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Bob Holcomb - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_colorMatte.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* ******************* Color Key ********************************************************** */ -static bNodeSocketType cmp_node_color_in[]={ - {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static bNodeSocketType cmp_node_color_out[]={ - {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static void do_color_key(bNode *node, float *out, float *in) -{ - float h_wrap; - NodeChroma *c; - c=node->storage; - - - VECCOPY(out, in); - - if( - /* do hue last because it needs to wrap, and does some more checks */ - - /* sat */ (fabs(in[1]-c->key[1]) < c->t2) && - /* val */ (fabs(in[2]-c->key[2]) < c->t3) && - - /* multiply by 2 because it wraps on both sides of the hue, - * otherwise 0.5 would key all hue's */ - - /* hue */ ((h_wrap= 2.0f * fabs(in[0]-c->key[0])) < c->t1 || (2.0f - h_wrap) < c->t1) - ) { - out[3]=0.0; /*make transparent*/ - } - - else { /*pixel is outside key color */ - out[3]=in[3]; /* make pixel just as transparent as it was before */ - } -} - -static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf *cbuf; - CompBuf *colorbuf; - NodeChroma *c; - - if(in[0]->hasinput==0) return; - if(in[0]->data==NULL) return; - if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; - - cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); - - colorbuf= dupalloc_compbuf(cbuf); - - c=node->storage; - - /*convert rgbbuf to hsv*/ - composit1_pixel_processor(node, colorbuf, cbuf, in[0]->vec, do_rgba_to_hsva, CB_RGBA); - - /*convert key to hsv*/ - do_rgba_to_hsva(node, c->key, in[1]->vec); - - - /*per pixel color key*/ - composit1_pixel_processor(node, colorbuf, colorbuf, in[0]->vec, do_color_key, CB_RGBA); - - /*convert back*/ - composit1_pixel_processor(node, colorbuf, colorbuf, in[0]->vec, do_hsva_to_rgba, CB_RGBA); - - out[0]->data= colorbuf; - if(out[1]->hasoutput) - out[1]->data= valbuf_from_rgbabuf(colorbuf, CHAN_A); - - generate_preview(data, node, colorbuf); - - if(cbuf!=in[0]->data) - free_compbuf(cbuf); -} - -static void node_composit_init_color_matte(bNode *node) -{ - NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node color"); - node->storage= c; - c->t1= 0.01f; - c->t2= 0.1f; - c->t3= 0.1f; - c->fsize= 0.0f; - c->fstrength= 1.0f; -} - -void register_node_type_cmp_color_matte(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_COLOR_MATTE, "Color Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_color_in, cmp_node_color_out); - node_type_size(&ntype, 200, 80, 300); - node_type_init(&ntype, node_composit_init_color_matte); - node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_color_matte); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c deleted file mode 100644 index 905d97709c3..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c +++ /dev/null @@ -1,341 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Bob Holcomb, Xavier Thomas - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_colorSpill.c - * \ingroup cmpnodes - */ - - - -#include "../CMP_util.h" - -#define avg(a,b) ((a+b)/2) - -/* ******************* Color Spill Supression ********************************* */ -static bNodeSocketType cmp_node_color_spill_in[]={ - {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static bNodeSocketType cmp_node_color_spill_out[]={ - {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static void do_simple_spillmap_red(bNode *node, float* out, float *in) -{ - NodeColorspill *ncs; - ncs=node->storage; - out[0]=in[0]-( ncs->limscale * in[ncs->limchan] ); -} - -static void do_simple_spillmap_red_fac(bNode *node, float* out, float *in, float *fac) -{ - NodeColorspill *ncs; - ncs=node->storage; - - out[0] = *fac * (in[0]-( ncs->limscale * in[ncs->limchan])); -} - -static void do_simple_spillmap_green(bNode *node, float* out, float *in) -{ - NodeColorspill *ncs; - ncs=node->storage; - out[0]=in[1]-( ncs->limscale * in[ncs->limchan] ); -} - -static void do_simple_spillmap_green_fac(bNode *node, float* out, float *in, float *fac) -{ - NodeColorspill *ncs; - ncs=node->storage; - - out[0] = *fac * (in[1]-( ncs->limscale * in[ncs->limchan])); -} - -static void do_simple_spillmap_blue(bNode *node, float* out, float *in) -{ - NodeColorspill *ncs; - ncs=node->storage; - out[0]=in[2]-( ncs->limscale * in[ncs->limchan] ); -} - -static void do_simple_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac) -{ - NodeColorspill *ncs; - ncs=node->storage; - - out[0] = *fac * (in[2]-( ncs->limscale * in[ncs->limchan])); -} - -static void do_average_spillmap_red(bNode *node, float* out, float *in) -{ - NodeColorspill *ncs; - ncs=node->storage; - out[0]=in[0]-(ncs->limscale * avg(in[1], in[2]) ); -} - -static void do_average_spillmap_red_fac(bNode *node, float* out, float *in, float *fac) -{ - NodeColorspill *ncs; - ncs=node->storage; - - out[0] = *fac * (in[0]-(ncs->limscale * avg(in[1], in[2]) )); -} - -static void do_average_spillmap_green(bNode *node, float* out, float *in) -{ - NodeColorspill *ncs; - ncs=node->storage; - out[0]=in[1]-(ncs->limscale * avg(in[0], in[2]) ); -} - -static void do_average_spillmap_green_fac(bNode *node, float* out, float *in, float *fac) -{ - NodeColorspill *ncs; - ncs=node->storage; - - out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[2]) )); -} - -static void do_average_spillmap_blue(bNode *node, float* out, float *in) -{ - NodeColorspill *ncs; - ncs=node->storage; - out[0]=in[2]-(ncs->limscale * avg(in[0], in[1]) ); -} - -static void do_average_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac) -{ - NodeColorspill *ncs; - ncs=node->storage; - - out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[1]) )); -} - -static void do_apply_spillmap_red(bNode *node, float* out, float *in, float *map) -{ - NodeColorspill *ncs; - ncs=node->storage; - if(map[0]>0) { - out[0]=in[0]-(ncs->uspillr*map[0]); - out[1]=in[1]+(ncs->uspillg*map[0]); - out[2]=in[2]+(ncs->uspillb*map[0]); - } - else { - out[0]=in[0]; - out[1]=in[1]; - out[2]=in[2]; - } -} - -static void do_apply_spillmap_green(bNode *node, float* out, float *in, float *map) -{ - NodeColorspill *ncs; - ncs=node->storage; - if(map[0]>0) { - out[0]=in[0]+(ncs->uspillr*map[0]); - out[1]=in[1]-(ncs->uspillg*map[0]); - out[2]=in[2]+(ncs->uspillb*map[0]); - } - else { - out[0]=in[0]; - out[1]=in[1]; - out[2]=in[2]; - } -} - -static void do_apply_spillmap_blue(bNode *node, float* out, float *in, float *map) -{ - NodeColorspill *ncs; - ncs=node->storage; - if(map[0]>0) { - out[0]=in[0]+(ncs->uspillr*map[0]); - out[1]=in[1]+(ncs->uspillg*map[0]); - out[2]=in[2]-(ncs->uspillb*map[0]); - } - else { - out[0]=in[0]; - out[1]=in[1]; - out[2]=in[2]; - } -} - -static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* Originally based on the information from the book "The Art and Science of Digital Composition" and - * discussions from vfxtalk.com .*/ - CompBuf *cbuf; - CompBuf *mask; - CompBuf *rgbbuf; - CompBuf *spillmap; - NodeColorspill *ncs; - ncs=node->storage; - - /* early out for missing connections */ - if(out[0]->hasoutput==0 ) return; - if(in[0]->hasinput==0) return; - if(in[0]->data==NULL) return; - - cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); - mask=typecheck_compbuf(in[1]->data, CB_VAL); - spillmap=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); - rgbbuf=dupalloc_compbuf(cbuf); - - switch(node->custom1) - { - case 1: /*red spill*/ - { - switch(node->custom2) - { - case 0: /* simple limit */ - { - if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_red, CB_RGBA); - } else { - composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_red_fac, CB_RGBA, CB_VAL); - } - break; - } - case 1: /* average limit */ - { - if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_red, CB_RGBA); - } else { - composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_red_fac, CB_RGBA, CB_VAL); - } - break; - } - } - if(ncs->unspill==0) { - ncs->uspillr=1.0f; - ncs->uspillg=0.0f; - ncs->uspillb=0.0f; - } - composit2_pixel_processor(node, rgbbuf, cbuf, in[0]->vec, spillmap, NULL, do_apply_spillmap_red, CB_RGBA, CB_VAL); - break; - } - case 2: /*green spill*/ - { - switch(node->custom2) - { - case 0: /* simple limit */ - { - if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_green, CB_RGBA); - } else { - composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_green_fac, CB_RGBA, CB_VAL); - } - break; - } - case 1: /* average limit */ - { - if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_green, CB_RGBA); - } else { - composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_green_fac, CB_RGBA, CB_VAL); - } - break; - } - } - if(ncs->unspill==0) { - ncs->uspillr=0.0f; - ncs->uspillg=1.0f; - ncs->uspillb=0.0f; - } - composit2_pixel_processor(node, rgbbuf, cbuf, in[0]->vec, spillmap, NULL, do_apply_spillmap_green, CB_RGBA, CB_VAL); - break; - } - case 3: /*blue spill*/ - { - switch(node->custom2) - { - case 0: /* simple limit */ - { - if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_simple_spillmap_blue, CB_RGBA); - } else { - composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_simple_spillmap_blue_fac, CB_RGBA, CB_VAL); - } - break; - } - case 1: /* average limit */ - { - if ((in[1]->data==NULL) && (in[1]->vec[0] >= 1.f)) { - composit1_pixel_processor(node, spillmap, cbuf, in[0]->vec, do_average_spillmap_blue, CB_RGBA); - } else { - composit2_pixel_processor(node, spillmap, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_average_spillmap_blue_fac, CB_RGBA, CB_VAL); - } - break; - } - } - if(ncs->unspill==0) { - ncs->uspillr=0.0f; - ncs->uspillg=0.0f; - ncs->uspillb=1.0f; - } - composit2_pixel_processor(node, rgbbuf, cbuf, in[0]->vec, spillmap, NULL, do_apply_spillmap_blue, CB_RGBA, CB_VAL); - break; - } - default: - break; - } - - out[0]->data=rgbbuf; - - if(cbuf!=in[0]->data) - free_compbuf(cbuf); - - free_compbuf(spillmap); -} - -static void node_composit_init_color_spill(bNode *node) -{ - NodeColorspill *ncs= MEM_callocN(sizeof(NodeColorspill), "node colorspill"); - node->storage=ncs; - node->custom1= 2; /* green channel */ - node->custom2= 0; /* simple limit algo*/ - ncs->limchan= 0; /* limit by red */ - ncs->limscale= 1.0f; /* limit scaling factor */ - ncs->unspill=0; /* do not use unspill */ -} - -void register_node_type_cmp_color_spill(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_COLOR_SPILL, "Color Spill", NODE_CLASS_MATTE, NODE_OPTIONS, - cmp_node_color_spill_in, cmp_node_color_spill_out); - node_type_size(&ntype, 140, 80, 200); - node_type_init(&ntype, node_composit_init_color_spill); - node_type_storage(&ntype, "NodeColorspill", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_color_spill); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c deleted file mode 100644 index 4074ea2fa29..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c +++ /dev/null @@ -1,201 +0,0 @@ -/* - * - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Matt Ebb. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_colorbalance.c - * \ingroup cmpnodes - */ - - - -#include "../CMP_util.h" - - -/* ******************* Color Balance ********************************* */ -static bNodeSocketType cmp_node_colorbalance_in[]={ - {SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static bNodeSocketType cmp_node_colorbalance_out[]={ - {SOCK_RGBA,0,"Image", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - {-1,0,""} -}; - -/* this function implements ASC-CDL according to the spec at http://www.asctech.org/ - Slope - S = in * slope - Offset - O = S + offset - = (in * slope) + offset - Power - out = Clamp(O) ^ power - = Clamp((in * slope) + offset) ^ power - */ -DO_INLINE float colorbalance_cdl(float in, float offset, float power, float slope) -{ - float x = in * slope + offset; - - /* prevent NaN */ - CLAMP(x, 0.0, 1.0); - - return powf(x, power); -} - -/* note: lift_lgg is just 2-lift, gamma_inv is 1.0/gamma */ -DO_INLINE float colorbalance_lgg(float in, float lift_lgg, float gamma_inv, float gain) -{ - /* 1:1 match with the sequencer with linear/srgb conversions, the conversion isnt pretty - * but best keep it this way, sice testing for durian shows a similar calculation - * without lin/srgb conversions gives bad results (over-saturated shadows) with colors - * slightly below 1.0. some correction can be done but it ends up looking bad for shadows or lighter tones - campbell */ - float x= (((linearrgb_to_srgb(in) - 1.0f) * lift_lgg) + 1.0f) * gain; - - /* prevent NaN */ - if (x < 0.f) x = 0.f; - - return powf(srgb_to_linearrgb(x), gamma_inv); -} - -static void do_colorbalance_cdl(bNode *node, float* out, float *in) -{ - NodeColorBalance *n= (NodeColorBalance *)node->storage; - - out[0] = colorbalance_cdl(in[0], n->lift[0], n->gamma[0], n->gain[0]); - out[1] = colorbalance_cdl(in[1], n->lift[1], n->gamma[1], n->gain[1]); - out[2] = colorbalance_cdl(in[2], n->lift[2], n->gamma[2], n->gain[2]); - out[3] = in[3]; -} - -static void do_colorbalance_cdl_fac(bNode *node, float* out, float *in, float *fac) -{ - NodeColorBalance *n= (NodeColorBalance *)node->storage; - const float mfac= 1.0f - *fac; - - out[0] = mfac*in[0] + *fac * colorbalance_cdl(in[0], n->lift[0], n->gamma[0], n->gain[0]); - out[1] = mfac*in[1] + *fac * colorbalance_cdl(in[1], n->lift[1], n->gamma[1], n->gain[1]); - out[2] = mfac*in[2] + *fac * colorbalance_cdl(in[2], n->lift[2], n->gamma[2], n->gain[2]); - out[3] = in[3]; -} - -static void do_colorbalance_lgg(bNode *node, float* out, float *in) -{ - NodeColorBalance *n= (NodeColorBalance *)node->storage; - - out[0] = colorbalance_lgg(in[0], n->lift_lgg[0], n->gamma_inv[0], n->gain[0]); - out[1] = colorbalance_lgg(in[1], n->lift_lgg[1], n->gamma_inv[1], n->gain[1]); - out[2] = colorbalance_lgg(in[2], n->lift_lgg[2], n->gamma_inv[2], n->gain[2]); - out[3] = in[3]; -} - -static void do_colorbalance_lgg_fac(bNode *node, float* out, float *in, float *fac) -{ - NodeColorBalance *n= (NodeColorBalance *)node->storage; - const float mfac= 1.0f - *fac; - - out[0] = mfac*in[0] + *fac * colorbalance_lgg(in[0], n->lift_lgg[0], n->gamma_inv[0], n->gain[0]); - out[1] = mfac*in[1] + *fac * colorbalance_lgg(in[1], n->lift_lgg[1], n->gamma_inv[1], n->gain[1]); - out[2] = mfac*in[2] + *fac * colorbalance_lgg(in[2], n->lift_lgg[2], n->gamma_inv[2], n->gain[2]); - out[3] = in[3]; -} - -static void node_composit_exec_colorbalance(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf *cbuf= in[1]->data; - CompBuf *stackbuf; - - /* stack order input: fac, image */ - /* stack order output: image */ - if(out[0]->hasoutput==0) return; - - if(in[0]->vec[0] == 0.f && in[0]->data == NULL) { - out[0]->data = pass_on_compbuf(cbuf); - return; - } - - { - NodeColorBalance *n= (NodeColorBalance *)node->storage; - int c; - - for (c = 0; c < 3; c++) { - n->lift_lgg[c] = 2.0f - n->lift[c]; - n->gamma_inv[c] = (n->gamma[c] != 0.0f) ? 1.0f/n->gamma[c] : 1000000.0f; - } - } - - if (cbuf) { - stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* create output based on image input */ - - if (node->custom1 == 0) { - /* lift gamma gain */ - if ((in[0]->data==NULL) && (in[0]->vec[0] >= 1.f)) { - composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_colorbalance_lgg, CB_RGBA); - } - else { - composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, in[0]->vec, do_colorbalance_lgg_fac, CB_RGBA, CB_VAL); - } - } else { - /* offset/power/slope : ASC-CDL */ - if ((in[0]->data==NULL) && (in[0]->vec[0] >= 1.f)) { - composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_colorbalance_cdl, CB_RGBA); - } - else { - composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, in[0]->vec, do_colorbalance_cdl_fac, CB_RGBA, CB_VAL); - } - - } - - out[0]->data=stackbuf; - } -} - -static void node_composit_init_colorbalance(bNode *node) -{ - NodeColorBalance *n= node->storage= MEM_callocN(sizeof(NodeColorBalance), "node colorbalance"); - - n->lift[0] = n->lift[1] = n->lift[2] = 1.0f; - n->gamma[0] = n->gamma[1] = n->gamma[2] = 1.0f; - n->gain[0] = n->gain[1] = n->gain[2] = 1.0f; -} - -void register_node_type_cmp_colorbalance(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_COLORBALANCE, "Color Balance", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_colorbalance_in, cmp_node_colorbalance_out); - node_type_size(&ntype, 400, 200, 400); - node_type_init(&ntype, node_composit_init_colorbalance); - node_type_storage(&ntype, "NodeColorBalance", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_colorbalance); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_composite.c b/source/blender/nodes/intern/CMP_nodes/CMP_composite.c deleted file mode 100644 index fb68f56ae64..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_composite.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_composite.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - - -/* **************** COMPOSITE ******************** */ -static bNodeSocketType cmp_node_composite_in[]= { - { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* applies to render pipeline */ -static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) -{ - /* image assigned to output */ - /* stack order input sockets: col, alpha, z */ - - if(node->flag & NODE_DO_OUTPUT) { /* only one works on out */ - Scene *scene= (Scene *)node->id; - RenderData *rd= data; - - if(scene && (rd->scemode & R_DOCOMP)) { - Render *re= RE_GetRender(scene->id.name); - RenderResult *rr= RE_AcquireResultWrite(re); - if(rr) { - CompBuf *outbuf, *zbuf=NULL; - - if(rr->rectf) - MEM_freeN(rr->rectf); - outbuf= alloc_compbuf(rr->rectx, rr->recty, CB_RGBA, 1); - - if(in[1]->data==NULL) - composit1_pixel_processor(node, outbuf, in[0]->data, in[0]->vec, do_copy_rgba, CB_RGBA); - else - composit2_pixel_processor(node, outbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, do_copy_a_rgba, CB_RGBA, CB_VAL); - - if(in[2]->data) { - if(rr->rectz) - MEM_freeN(rr->rectz); - zbuf= alloc_compbuf(rr->rectx, rr->recty, CB_VAL, 1); - composit1_pixel_processor(node, zbuf, in[2]->data, in[2]->vec, do_copy_value, CB_VAL); - rr->rectz= zbuf->rect; - zbuf->malloc= 0; - free_compbuf(zbuf); - } - generate_preview(data, node, outbuf); - - /* we give outbuf to rr... */ - rr->rectf= outbuf->rect; - outbuf->malloc= 0; - free_compbuf(outbuf); - - /* signal for imageviewer to refresh (it converts to byte rects...) */ - BKE_image_signal(BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"), NULL, IMA_SIGNAL_FREE); - - RE_ReleaseResult(re); - return; - } - else - RE_ReleaseResult(re); - } - } - if(in[0]->data) - generate_preview(data, node, in[0]->data); -} - -void register_node_type_cmp_composite(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW, - cmp_node_composite_in, NULL); - node_type_size(&ntype, 80, 60, 200); - node_type_exec(&ntype, node_composit_exec_composite); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_crop.c b/source/blender/nodes/intern/CMP_nodes/CMP_crop.c deleted file mode 100644 index 0331217f0cb..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_crop.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Juho Vepsäläinen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_crop.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** Crop ******************** */ - -static bNodeSocketType cmp_node_crop_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_crop_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_crop(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - if(in[0]->data) { - NodeTwoXYs *ntxy= node->storage; - CompBuf *cbuf= in[0]->data; - CompBuf *stackbuf; - int x, y; - float *srcfp, *outfp; - rcti outputrect; - - if(node->custom2) { - ntxy->x1= cbuf->x* ntxy->fac_x1; - ntxy->x2= cbuf->x* ntxy->fac_x2; - ntxy->y1= cbuf->y* ntxy->fac_y1; - ntxy->y2= cbuf->y* ntxy->fac_y2; - } - - /* check input image size */ - if(cbuf->x <= ntxy->x1 + 1) - ntxy->x1= cbuf->x - 1; - - if(cbuf->y <= ntxy->y1 + 1) - ntxy->y1= cbuf->y - 1; - - if(cbuf->x <= ntxy->x2 + 1) - ntxy->x2= cbuf->x - 1; - - if(cbuf->y <= ntxy->y2 + 1) - ntxy->y2= cbuf->y - 1; - - /* figure out the minimums and maximums */ - outputrect.xmax=MAX2(ntxy->x1, ntxy->x2) + 1; - outputrect.xmin=MIN2(ntxy->x1, ntxy->x2); - outputrect.ymax=MAX2(ntxy->y1, ntxy->y2) + 1; - outputrect.ymin=MIN2(ntxy->y1, ntxy->y2); - - if(node->custom1) { - /* this option crops the image size too */ - stackbuf= get_cropped_compbuf(&outputrect, cbuf->rect, cbuf->x, cbuf->y, cbuf->type); - } - else { - /* this option won't crop the size of the image as well */ - /* allocate memory for the output image */ - stackbuf = alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1); - - /* select the cropped part of the image and set it to the output */ - for(y=outputrect.ymin; yrect + (y * cbuf->x + outputrect.xmin) * cbuf->type; - outfp= stackbuf->rect + (y * stackbuf->x + outputrect.xmin) * stackbuf->type; - for(x=outputrect.xmin; xtype, srcfp+= cbuf->type) - memcpy(outfp, srcfp, sizeof(float)*stackbuf->type); - } - } - - out[0]->data= stackbuf; - } -} - -static void node_composit_init_crop(bNode* node) -{ - NodeTwoXYs *nxy= MEM_callocN(sizeof(NodeTwoXYs), "node xy data"); - node->storage= nxy; - nxy->x1= 0; - nxy->x2= 0; - nxy->y1= 0; - nxy->y2= 0; -} - -void register_node_type_cmp_crop(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_CROP, "Crop", NODE_CLASS_DISTORT, NODE_OPTIONS, - cmp_node_crop_in, cmp_node_crop_out); - node_type_size(&ntype, 140, 100, 320); - node_type_init(&ntype, node_composit_init_crop); - node_type_storage(&ntype, "NodeTwoXYs", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_crop); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c b/source/blender/nodes/intern/CMP_nodes/CMP_curves.c deleted file mode 100644 index 921c5e21fea..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Björn C. Schaefer - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_curves.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** CURVE Time ******************** */ - -/* custom1 = sfra, custom2 = efra */ -static bNodeSocketType cmp_node_time_out[]= { - { SOCK_VALUE, 0, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) -{ - RenderData *rd= data; - /* stack order output: fac */ - float fac= 0.0f; - - if(node->custom1 < node->custom2) - fac= (rd->cfra - node->custom1)/(float)(node->custom2-node->custom1); - - fac= curvemapping_evaluateF(node->storage, 0, fac); - out[0]->vec[0]= CLAMPIS(fac, 0.0f, 1.0f); -} - - -static void node_composit_init_curves_time(bNode* node) -{ - node->custom1= 1; - node->custom2= 250; - node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); -} - -void register_node_type_cmp_curve_time(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS, - NULL, cmp_node_time_out); - node_type_size(&ntype, 140, 100, 320); - node_type_init(&ntype, node_composit_init_curves_time); - node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, node_composit_exec_curves_time); - - nodeRegisterType(lb, &ntype); -} - - - - -/* **************** CURVE VEC ******************** */ -static bNodeSocketType cmp_node_curve_vec_in[]= { - { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_curve_vec_out[]= { - { SOCK_VECTOR, 0, "Vector", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order input: vec */ - /* stack order output: vec */ - - curvemapping_evaluate_premulRGBF(node->storage, out[0]->vec, in[0]->vec); -} - -static void node_composit_init_curve_vec(bNode* node) -{ - node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f); -} - -void register_node_type_cmp_curve_vec(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS, - cmp_node_curve_vec_in, cmp_node_curve_vec_out); - node_type_size(&ntype, 200, 140, 320); - node_type_init(&ntype, node_composit_init_curve_vec); - node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, node_composit_exec_curve_vec); - - nodeRegisterType(lb, &ntype); -} - - -/* **************** CURVE RGB ******************** */ -static bNodeSocketType cmp_node_curve_rgb_in[]= { - { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_RGBA, 1, "Black Level", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_RGBA, 1, "White Level", 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_curve_rgb_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_curves(bNode *node, float *out, float *in) -{ - curvemapping_evaluate_premulRGBF(node->storage, out, in); - out[3]= in[3]; -} - -static void do_curves_fac(bNode *node, float *out, float *in, float *fac) -{ - - if(*fac>=1.0) - curvemapping_evaluate_premulRGBF(node->storage, out, in); - else if(*fac<=0.0) { - VECCOPY(out, in); - } - else { - float col[4], mfac= 1.0f-*fac; - curvemapping_evaluate_premulRGBF(node->storage, col, in); - out[0]= mfac*in[0] + *fac*col[0]; - out[1]= mfac*in[1] + *fac*col[1]; - out[2]= mfac*in[2] + *fac*col[2]; - } - out[3]= in[3]; -} - -static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order input: fac, image, black level, white level */ - /* stack order output: image */ - - if(out[0]->hasoutput==0) - return; - - /* input no image? then only color operation */ - if(in[1]->data==NULL) { - curvemapping_evaluateRGBF(node->storage, out[0]->vec, in[1]->vec); - } - else { - /* make output size of input image */ - CompBuf *cbuf= in[1]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - curvemapping_set_black_white(node->storage, in[2]->vec, in[3]->vec); - - if(in[0]->vec[0] == 1.0) - composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_curves, CB_RGBA); - else - composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, in[0]->vec, do_curves_fac, CB_RGBA, CB_VAL); - - out[0]->data= stackbuf; - } - -} - -static void node_composit_init_curve_rgb(bNode* node) -{ - node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); -} - -void register_node_type_cmp_curve_rgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_curve_rgb_in, cmp_node_curve_rgb_out); - node_type_size(&ntype, 200, 140, 320); - node_type_init(&ntype, node_composit_init_curve_rgb); - node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, node_composit_exec_curve_rgb); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c deleted file mode 100644 index f249e2cff6c..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c +++ /dev/null @@ -1,892 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_defocus.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* ************ qdn: Defocus node ****************** */ -static bNodeSocketType cmp_node_defocus_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_defocus_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - - -// line coefs for point sampling & scancon. data. -typedef struct BokehCoeffs { - float x0, y0, dx, dy; - float ls_x, ls_y; - float min_x, min_y, max_x, max_y; -} BokehCoeffs; - -// returns array of BokehCoeffs -// returns length of array in 'len_bkh', -// radius squared of inscribed disk in 'inradsq', needed in getWeight() test, -// BKH[8] is the data returned for the bokeh shape & bkh_b[4] is it's 2d bound -static void makeBokeh(char bktype, char ro, int* len_bkh, float* inradsq, BokehCoeffs BKH[8], float bkh_b[4]) -{ - float x0, x1, y0, y1, dx, dy, iDxy; - float w = MAX2(1e-5f, ro)*M_PI/180.f; // never reported stangely enough, but a zero offset causes missing center line... - float wi = (360.f/bktype)*M_PI/180.f; - int i, ov, nv; - - // bktype must be at least 3 & <= 8 - bktype = (bktype<3) ? 3 : ((bktype>8) ? 8 : bktype); - *len_bkh = bktype; - *inradsq = -1.f; - - for (i=0; i<(*len_bkh); i++) { - x0 = cos(w); - y0 = sin(w); - w += wi; - x1 = cos(w); - y1 = sin(w); - if ((*inradsq)<0.f) { - // radius squared of inscribed disk - float idx=(x0+x1)*0.5f, idy=(y0+y1)*0.5f; - *inradsq = idx*idx + idy*idy; - } - BKH[i].x0 = x0; - BKH[i].y0 = y0; - dx = x1-x0, dy = y1-y0; - iDxy = 1.f / sqrt(dx*dx + dy*dy); - dx *= iDxy; - dy *= iDxy; - BKH[i].dx = dx; - BKH[i].dy = dy; - } - - // precalc scanconversion data - // bokeh bound, not transformed, for scanconvert - bkh_b[0] = bkh_b[2] = 1e10f; // xmin/ymin - bkh_b[1] = bkh_b[3] = -1e10f; // xmax/ymax - ov = (*len_bkh) - 1; - for (nv=0; nv<(*len_bkh); nv++) { - bkh_b[0] = MIN2(bkh_b[0], BKH[nv].x0); // xmin - bkh_b[1] = MAX2(bkh_b[1], BKH[nv].x0); // xmax - bkh_b[2] = MIN2(bkh_b[2], BKH[nv].y0); // ymin - bkh_b[3] = MAX2(bkh_b[3], BKH[nv].y0); // ymax - BKH[nv].min_x = MIN2(BKH[ov].x0, BKH[nv].x0); - BKH[nv].max_x = MAX2(BKH[ov].x0, BKH[nv].x0); - BKH[nv].min_y = MIN2(BKH[ov].y0, BKH[nv].y0); - BKH[nv].max_y = MAX2(BKH[ov].y0, BKH[nv].y0); - dy = BKH[nv].y0 - BKH[ov].y0; - BKH[nv].ls_x = (BKH[nv].x0 - BKH[ov].x0) / ((dy==0.f) ? 1.f : dy); - BKH[nv].ls_y = (BKH[nv].ls_x==0.f) ? 1.f : (1.f/BKH[nv].ls_x); - ov = nv; - } -} - -// test if u/v inside shape & returns weight value -static float getWeight(BokehCoeffs* BKH, int len_bkh, float u, float v, float rad, float inradsq) -{ - BokehCoeffs* bc = BKH; - float cdist, irad = (rad==0.f) ? 1.f : (1.f/rad); - u *= irad; - v *= irad; - - // early out test1: if point outside outer unit disk, it cannot be inside shape - cdist = u*u + v*v; - if (cdist>1.f) return 0.f; - - // early out test2: if point inside or on inner disk, point must be inside shape - if (cdist<=inradsq) return 1.f; - - while (len_bkh--) { - if ((bc->dy*(u - bc->x0) - bc->dx*(v - bc->y0)) > 0.f) return 0.f; - bc++; - } - return 1.f; -} - -// QMC.seq. for sampling, A.Keller, EMS -static float RI_vdC(unsigned int bits, unsigned int r) -{ - bits = ( bits << 16) | ( bits >> 16); - bits = ((bits & 0x00ff00ff) << 8) | ((bits & 0xff00ff00) >> 8); - bits = ((bits & 0x0f0f0f0f) << 4) | ((bits & 0xf0f0f0f0) >> 4); - bits = ((bits & 0x33333333) << 2) | ((bits & 0xcccccccc) >> 2); - bits = ((bits & 0x55555555) << 1) | ((bits & 0xaaaaaaaa) >> 1); - bits ^= r; - return (float)((double)bits / 4294967296.0); -} - -// single channel IIR gaussian filtering -// much faster than anything else, constant time independent of width -// should extend to multichannel and make this a node, could be useful -static void IIR_gauss_single(CompBuf* buf, float sigma) -{ - double q, q2, sc, cf[4], tsM[9], tsu[3], tsv[3]; - float *X, *Y, *W; - int i, x, y, sz; - - // single channel only for now - if (buf->type != CB_VAL) return; - - // <0.5 not valid, though can have a possibly useful sort of sharpening effect - if (sigma < 0.5) return; - - // see "Recursive Gabor Filtering" by Young/VanVliet - // all factors here in double.prec. Required, because for single.prec it seems to blow up if sigma > ~200 - if (sigma >= 3.556) - q = 0.9804*(sigma - 3.556) + 2.5091; - else // sigma >= 0.5 - q = (0.0561*sigma + 0.5784)*sigma - 0.2568; - q2 = q*q; - sc = (1.1668 + q)*(3.203729649 + (2.21566 + q)*q); - // no gabor filtering here, so no complex multiplies, just the regular coefs. - // all negated here, so as not to have to recalc Triggs/Sdika matrix - cf[1] = q*(5.788961737 + (6.76492 + 3.0*q)*q)/ sc; - cf[2] = -q2*(3.38246 + 3.0*q)/sc; - // 0 & 3 unchanged - cf[3] = q2*q/sc; - cf[0] = 1.0 - cf[1] - cf[2] - cf[3]; - - // Triggs/Sdika border corrections, - // it seems to work, not entirely sure if it is actually totally correct, - // Besides J.M.Geusebroek's anigauss.c (see http://www.science.uva.nl/~mark), - // found one other implementation by Cristoph Lampert, - // but neither seem to be quite the same, result seems to be ok sofar anyway. - // Extra scale factor here to not have to do it in filter, - // though maybe this had something to with the precision errors - sc = cf[0]/((1.0 + cf[1] - cf[2] + cf[3])*(1.0 - cf[1] - cf[2] - cf[3])*(1.0 + cf[2] + (cf[1] - cf[3])*cf[3])); - tsM[0] = sc*(-cf[3]*cf[1] + 1.0 - cf[3]*cf[3] - cf[2]); - tsM[1] = sc*((cf[3] + cf[1])*(cf[2] + cf[3]*cf[1])); - tsM[2] = sc*(cf[3]*(cf[1] + cf[3]*cf[2])); - tsM[3] = sc*(cf[1] + cf[3]*cf[2]); - tsM[4] = sc*(-(cf[2] - 1.0)*(cf[2] + cf[3]*cf[1])); - tsM[5] = sc*(-(cf[3]*cf[1] + cf[3]*cf[3] + cf[2] - 1.0)*cf[3]); - tsM[6] = sc*(cf[3]*cf[1] + cf[2] + cf[1]*cf[1] - cf[2]*cf[2]); - tsM[7] = sc*(cf[1]*cf[2] + cf[3]*cf[2]*cf[2] - cf[1]*cf[3]*cf[3] - cf[3]*cf[3]*cf[3] - cf[3]*cf[2] + cf[3]); - tsM[8] = sc*(cf[3]*(cf[1] + cf[3]*cf[2])); - -#define YVV(L)\ -{\ - W[0] = cf[0]*X[0] + cf[1]*X[0] + cf[2]*X[0] + cf[3]*X[0];\ - W[1] = cf[0]*X[1] + cf[1]*W[0] + cf[2]*X[0] + cf[3]*X[0];\ - W[2] = cf[0]*X[2] + cf[1]*W[1] + cf[2]*W[0] + cf[3]*X[0];\ - for (i=3; i=0; i--)\ - Y[i] = cf[0]*W[i] + cf[1]*Y[i+1] + cf[2]*Y[i+2] + cf[3]*Y[i+3];\ -} - - // intermediate buffers - sz = MAX2(buf->x, buf->y); - Y = MEM_callocN(sz*sizeof(float), "IIR_gauss Y buf"); - W = MEM_callocN(sz*sizeof(float), "IIR_gauss W buf"); - // H - for (y=0; yy; y++) { - X = &buf->rect[y*buf->x]; - YVV(buf->x); - memcpy(X, Y, sizeof(float)*buf->x); - } - // V - X = MEM_callocN(buf->y*sizeof(float), "IIR_gauss X buf"); - for (x=0; xx; x++) { - for (y=0; yy; y++) - X[y] = buf->rect[x + y*buf->x]; - YVV(buf->y); - for (y=0; yy; y++) - buf->rect[x + y*buf->x] = Y[y]; - } - MEM_freeN(X); - - MEM_freeN(W); - MEM_freeN(Y); -#undef YVV -} - -static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf, float inpval, int no_zbuf) -{ - NodeDefocus *nqd = node->storage; - CompBuf *wts; // weights buffer - CompBuf *crad; // CoC radius buffer - BokehCoeffs BKH[8]; // bokeh shape data, here never > 8 pts. - float bkh_b[4] = {0}; // shape 2D bound - float cam_fdist=1, cam_invfdist=1, cam_lens=35; - float dof_sp, maxfgc, bk_hn_theta=0, inradsq=0; - int y, len_bkh=0, ydone=0; - float aspect, aperture; - int minsz; - //float bcrad, nmaxc, scf; - - // get some required params from the current scene camera - // (ton) this is wrong, needs fixed - Scene *scene= (Scene*)node->id; - Object* camob = (scene)? scene->camera: NULL; - if (camob && camob->type==OB_CAMERA) { - Camera* cam = (Camera*)camob->data; - cam_lens = cam->lens; - cam_fdist = dof_camera(camob); - if (cam_fdist==0.0) cam_fdist = 1e10f; /* if the dof is 0.0 then set it be be far away */ - cam_invfdist = 1.f/cam_fdist; - } - - // guess work here.. best match with raytraced result - minsz = MIN2(img->x, img->y); - dof_sp = (float)minsz / (16.f / cam_lens); // <- == aspect * MIN2(img->x, img->y) / tan(0.5f * fov); - - // aperture - aspect = (img->x > img->y) ? (img->y / (float)img->x) : (img->x / (float)img->y); - aperture = 0.5f*(cam_lens / (aspect*32.f)) / nqd->fstop; - - // if not disk, make bokeh coefficients and other needed data - if (nqd->bktype!=0) { - makeBokeh(nqd->bktype, nqd->rotation, &len_bkh, &inradsq, BKH, bkh_b); - bk_hn_theta = 0.5 * nqd->bktype * sin(2.0 * M_PI / nqd->bktype); // weight factor - } - - // accumulated weights - wts = alloc_compbuf(img->x, img->y, CB_VAL, 1); - // CoC radius buffer - crad = alloc_compbuf(img->x, img->y, CB_VAL, 1); - - // if 'no_zbuf' flag set (which is always set if input is not an image), - // values are instead interpreted directly as blur radius values - if (no_zbuf) { - // to prevent *reaaallly* big radius values and impossible calculation times, - // limit the maximum to half the image width or height, whichever is smaller - float maxr = 0.5f*(float)MIN2(img->x, img->y); - unsigned int p; - - for (p=0; p<(unsigned int)(img->x*img->y); p++) { - crad->rect[p] = zbuf ? (zbuf->rect[p]*nqd->scale) : inpval; - // bug #5921, limit minimum - crad->rect[p] = MAX2(1e-5f, crad->rect[p]); - crad->rect[p] = MIN2(crad->rect[p], maxr); - // if maxblur!=0, limit maximum - if (nqd->maxblur != 0.f) crad->rect[p] = MIN2(crad->rect[p], nqd->maxblur); - } - } - else { - float wt; - - // actual zbuffer. - // separate foreground from background CoC's - // then blur background and blend in again with foreground, - // improves the 'blurred foreground overlapping in-focus midground' sharp boundary problem. - // wts buffer here used for blendmask - maxfgc = 0.f; // maximum foreground CoC radius - for (y=0; yy; y++) { - unsigned int p = y * img->x; - int x; - for (x=0; xx; x++) { - unsigned int px = p + x; - float iZ = (zbuf->rect[px]==0.f) ? 0.f : (1.f/zbuf->rect[px]); - crad->rect[px] = 0.5f*(aperture*(dof_sp*(cam_invfdist - iZ) - 1.f)); - if (crad->rect[px] <= 0.f) { - wts->rect[px] = 1.f; - crad->rect[px] = -crad->rect[px]; - if (crad->rect[px] > maxfgc) maxfgc = crad->rect[px]; - } - else crad->rect[px] = wts->rect[px] = 0; - } - } - - // fast blur... - // bug #6656 part 1, probably when previous node_composite.c was split into separate files, it was not properly updated - // to include recent cvs commits (well, at least not defocus node), so this part was missing... - wt = aperture*128.f; - IIR_gauss_single(crad, wt); - IIR_gauss_single(wts, wt); - - // bug #6656 part 2a, although foreground blur is not based anymore on closest object, - // the rescaling op below was still based on that anyway, and unlike the comment in below code, - // the difference is therefore not always that small at all... - // so for now commented out, not sure if this is going to cause other future problems, lets just wait and see... - /* - // find new maximum to scale it back to original - // (could skip this, not strictly necessary, in general, difference is quite small, but just in case...) - nmaxc = 0; - for (p=0; p<(img->x*img->y); p++) - if (crad->rect[p] > nmaxc) nmaxc = crad->rect[p]; - // rescale factor - scf = (nmaxc==0.f) ? 1.f: (maxfgc / nmaxc); - */ - - // and blend... - for (y=0; yy; y++) { - unsigned int p = y*img->x; - int x; - - for (x=0; xx; x++) { - unsigned px = p + x; - if (zbuf->rect[px]!=0.f) { - float iZ = (zbuf->rect[px]==0.f) ? 0.f : (1.f/zbuf->rect[px]); - - // bug #6656 part 2b, do not rescale - /* - bcrad = 0.5f*fabs(aperture*(dof_sp*(cam_invfdist - iZ) - 1.f)); - // scale crad back to original maximum and blend - crad->rect[px] = bcrad + wts->rect[px]*(scf*crad->rect[px] - bcrad); - */ - crad->rect[px] = 0.5f*fabs(aperture*(dof_sp*(cam_invfdist - iZ) - 1.f)); - - // 'bug' #6615, limit minimum radius to 1 pixel, not really a solution, but somewhat mitigates the problem - crad->rect[px] = MAX2(crad->rect[px], 0.5f); - // if maxblur!=0, limit maximum - if (nqd->maxblur != 0.f) crad->rect[px] = MIN2(crad->rect[px], nqd->maxblur); - } - else crad->rect[px] = 0.f; - // clear weights for next part - wts->rect[px] = 0.f; - } - // esc set by main calling process - if(node->exec & NODE_BREAK) - break; - } - } - - //------------------------------------------------------------------ - // main loop -#ifndef __APPLE__ /* can crash on Mac, see bug #22856, disabled for now */ -#ifdef __INTEL_COMPILER /* icc doesn't like the compound statement -- internal error: 0_1506 */ - #pragma omp parallel for private(y) if(!nqd->preview) schedule(guided) -#else - #pragma omp parallel for private(y) if(!nqd->preview && img->y*img->x > 16384) schedule(guided) -#endif -#endif - for (y=0; yy; y++) { - unsigned int p, p4, zp, cp, cp4; - float *ctcol, u, v, ct_crad, cR2=0; - int x, sx, sy; - - // some sort of visual feedback would be nice, or at least this text in the renderwin header - // but for now just print some info in the console every 8 scanlines. - #pragma omp critical - { - if (((ydone & 7)==0) || (ydone==(img->y-1))) { - if(G.background==0) { - printf("\rdefocus: Processing Line %d of %d ... ", ydone+1, img->y); - fflush(stdout); - } - } - - ydone++; - } - - // esc set by main calling process. don't break because openmp doesn't - // allow it, just continue and do nothing - if(node->exec & NODE_BREAK) - continue; - - zp = y * img->x; - for (x=0; xx; x++) { - cp = zp + x; - cp4 = cp * img->type; - - // Circle of Confusion radius for current pixel - cR2 = ct_crad = crad->rect[cp]; - // skip if zero (border render) - if (ct_crad==0.f) { - // related to bug #5921, forgot output image when skipping 0 radius values - new->rect[cp4] = img->rect[cp4]; - if (new->type != CB_VAL) { - new->rect[cp4+1] = img->rect[cp4+1]; - new->rect[cp4+2] = img->rect[cp4+2]; - new->rect[cp4+3] = img->rect[cp4+3]; - } - continue; - } - cR2 *= cR2; - - // pixel color - ctcol = &img->rect[cp4]; - - if (!nqd->preview) { - int xs, xe, ys, ye; - float lwt, wtcol[4] = {0}, aacol[4] = {0}; - float wt; - - // shape weight - if (nqd->bktype==0) // disk - wt = 1.f/((float)M_PI*cR2); - else - wt = 1.f/(cR2*bk_hn_theta); - - // weighted color - wtcol[0] = wt*ctcol[0]; - if (new->type != CB_VAL) { - wtcol[1] = wt*ctcol[1]; - wtcol[2] = wt*ctcol[2]; - wtcol[3] = wt*ctcol[3]; - } - - // macro for background blur overlap test - // unfortunately, since this is done per pixel, - // it has a very significant negative impact on processing time... - // (eg. aa disk blur without test: 112 sec, vs with test: 176 sec...) - // iff center blur radius > threshold - // and if overlap pixel in focus, do nothing, else add color/weigbt - // (threshold constant is dependant on amount of blur) - #define TESTBG1(c, w) {\ - if (ct_crad > nqd->bthresh) {\ - if (crad->rect[p] > nqd->bthresh) {\ - new->rect[p] += c[0];\ - wts->rect[p] += w;\ - }\ - }\ - else {\ - new->rect[p] += c[0];\ - wts->rect[p] += w;\ - }\ - } - #define TESTBG4(c, w) {\ - if (ct_crad > nqd->bthresh) {\ - if (crad->rect[p] > nqd->bthresh) {\ - new->rect[p4] += c[0];\ - new->rect[p4+1] += c[1];\ - new->rect[p4+2] += c[2];\ - new->rect[p4+3] += c[3];\ - wts->rect[p] += w;\ - }\ - }\ - else {\ - new->rect[p4] += c[0];\ - new->rect[p4+1] += c[1];\ - new->rect[p4+2] += c[2];\ - new->rect[p4+3] += c[3];\ - wts->rect[p] += w;\ - }\ - } - if (nqd->bktype == 0) { - // Disk - int _x, i, j, di; - float Dj, T; - // AA pixel - #define AAPIX(a, b) {\ - int _ny = b;\ - if ((_ny >= 0) && (_ny < new->y)) {\ - int _nx = a;\ - if ((_nx >=0) && (_nx < new->x)) {\ - p = _ny*new->x + _nx;\ - if (new->type==CB_VAL) {\ - TESTBG1(aacol, lwt);\ - }\ - else {\ - p4 = p * new->type;\ - TESTBG4(aacol, lwt);\ - }\ - }\ - }\ - } - // circle scanline - #define CSCAN(a, b) {\ - int _ny = y + b;\ - if ((_ny >= 0) && (_ny < new->y)) {\ - xs = x - a + 1;\ - if (xs < 0) xs = 0;\ - xe = x + a;\ - if (xe > new->x) xe = new->x;\ - p = _ny*new->x + xs;\ - if (new->type==CB_VAL) {\ - for (_x=xs; _xtype;\ - for (_x=xs; _xtype) TESTBG4(wtcol, wt);\ - }\ - }\ - } - i = ceil(ct_crad); - j = 0; - T = 0; - while (i > j) { - Dj = sqrt(cR2 - j*j); - Dj -= floor(Dj); - di = 0; - if (Dj > T) { i--; di = 1; } - T = Dj; - aacol[0] = wtcol[0]*Dj; - if (new->type != CB_VAL) { - aacol[1] = wtcol[1]*Dj; - aacol[2] = wtcol[2]*Dj; - aacol[3] = wtcol[3]*Dj; - } - lwt = wt*Dj; - if (i!=j) { - // outer pixels - AAPIX(x+j, y+i); - AAPIX(x+j, y-i); - if (j) { - AAPIX(x-j, y+i); // BL - AAPIX(x-j, y-i); // TL - } - if (di) { // only when i changed, interior of outer section - CSCAN(j, i); // bottom - CSCAN(j, -i); // top - } - } - // lower mid section - AAPIX(x+i, y+j); - if (i) AAPIX(x-i, y+j); - CSCAN(i, j); - // upper mid section - if (j) { - AAPIX(x+i, y-j); - if (i) AAPIX(x-i, y-j); - CSCAN(i, -j); - } - j++; - } - #undef CSCAN - #undef AAPIX - } - else { - // n-agonal - int ov, nv; - float mind, maxd, lwt; - ys = MAX2((int)floor(bkh_b[2]*ct_crad + y), 0); - ye = MIN2((int)ceil(bkh_b[3]*ct_crad + y), new->y - 1); - for (sy=ys; sy<=ye; sy++) { - float fxs = 1e10f, fxe = -1e10f; - float yf = (sy - y)/ct_crad; - int found = 0; - ov = len_bkh - 1; - mind = maxd = 0; - for (nv=0; nv= yf) && (BKH[nv].min_y <= yf)) { - float tx = BKH[ov].x0 + BKH[nv].ls_x*(yf - BKH[ov].y0); - if (tx < fxs) { fxs = tx; mind = BKH[nv].ls_x; } - if (tx > fxe) { fxe = tx; maxd = BKH[nv].ls_x; } - if (++found == 2) break; - } - ov = nv; - } - if (found) { - fxs = fxs*ct_crad + x; - fxe = fxe*ct_crad + x; - xs = (int)floor(fxs), xe = (int)ceil(fxe); - // AA hack for first and last x pixel, near vertical edges only - if (fabs(mind) <= 1.f) { - if ((xs >= 0) && (xs < new->x)) { - lwt = 1.f-(fxs - xs); - aacol[0] = wtcol[0]*lwt; - p = xs + sy*new->x; - if (new->type==CB_VAL) { - lwt *= wt; - TESTBG1(aacol, lwt); - } - else { - p4 = p * new->type; - aacol[1] = wtcol[1]*lwt; - aacol[2] = wtcol[2]*lwt; - aacol[3] = wtcol[3]*lwt; - lwt *= wt; - TESTBG4(aacol, lwt); - } - } - } - if (fabs(maxd) <= 1.f) { - if ((xe >= 0) && (xe < new->x)) { - lwt = 1.f-(xe - fxe); - aacol[0] = wtcol[0]*lwt; - p = xe + sy*new->x; - if (new->type==CB_VAL) { - lwt *= wt; - TESTBG1(aacol, lwt); - } - else { - p4 = p * new->type; - aacol[1] = wtcol[1]*lwt; - aacol[2] = wtcol[2]*lwt; - aacol[3] = wtcol[3]*lwt; - lwt *= wt; - TESTBG4(aacol, lwt); - } - } - } - xs = MAX2(xs+1, 0); - xe = MIN2(xe, new->x); - // remaining interior scanline - p = sy*new->x + xs; - if (new->type==CB_VAL) { - for (sx=xs; sxtype; - for (sx=xs; sxtype) TESTBG4(wtcol, wt); - } - } - } - - // now traverse in opposite direction, y scanlines, - // but this time only draw the near horizontal edges, - // applying same AA hack as above - xs = MAX2((int)floor(bkh_b[0]*ct_crad + x), 0); - xe = MIN2((int)ceil(bkh_b[1]*ct_crad + x), img->x - 1); - for (sx=xs; sx<=xe; sx++) { - float xf = (sx - x)/ct_crad; - float fys = 1e10f, fye = -1e10f; - int found = 0; - ov = len_bkh - 1; - mind = maxd = 0; - for (nv=0; nv= xf) && (BKH[nv].min_x <= xf)) { - float ty = BKH[ov].y0 + BKH[nv].ls_y*(xf - BKH[ov].x0); - if (ty < fys) { fys = ty; mind = BKH[nv].ls_y; } - if (ty > fye) { fye = ty; maxd = BKH[nv].ls_y; } - if (++found == 2) break; - } - ov = nv; - } - if (found) { - fys = fys*ct_crad + y; - fye = fye*ct_crad + y; - // near horizontal edges only, line slope <= 1 - if (fabs(mind) <= 1.f) { - int iys = (int)floor(fys); - if ((iys >= 0) && (iys < new->y)) { - lwt = 1.f - (fys - iys); - aacol[0] = wtcol[0]*lwt; - p = sx + iys*new->x; - if (new->type==CB_VAL) { - lwt *= wt; - TESTBG1(aacol, lwt); - } - else { - p4 = p * new->type; - aacol[1] = wtcol[1]*lwt; - aacol[2] = wtcol[2]*lwt; - aacol[3] = wtcol[3]*lwt; - lwt *= wt; - TESTBG4(aacol, lwt); - } - } - } - if (fabs(maxd) <= 1.f) { - int iye = ceil(fye); - if ((iye >= 0) && (iye < new->y)) { - lwt = 1.f - (iye - fye); - aacol[0] = wtcol[0]*lwt; - p = sx + iye*new->x; - if (new->type==CB_VAL) { - lwt *= wt; - TESTBG1(aacol, lwt); - } - else { - p4 = p * new->type; - aacol[1] = wtcol[1]*lwt; - aacol[2] = wtcol[2]*lwt; - aacol[3] = wtcol[3]*lwt; - lwt *= wt; - TESTBG4(aacol, lwt); - } - } - } - } - } - - } - #undef TESTBG4 - #undef TESTBG1 - - } - else { - // sampled, simple rejection sampling here, good enough - unsigned int maxsam, s, ui = BLI_rand()*BLI_rand(); - float wcor, cpr = BLI_frand(), lwt; - if (no_zbuf) - maxsam = nqd->samples; // no zbuffer input, use sample value directly - else { - // depth adaptive sampling hack, the more out of focus, the more samples taken, 16 minimum. - maxsam = (int)(0.5f + nqd->samples*(1.f-(float)exp(-fabs(zbuf->rect[cp] - cam_fdist)))); - if (maxsam < 16) maxsam = 16; - } - wcor = 1.f/(float)maxsam; - for (s=0; s= new->x) || (sy<0) || (sy >= new->y)) continue; - p = sx + sy*new->x; - p4 = p * new->type; - if (nqd->bktype==0) // Disk - lwt = ((u*u + v*v)<=cR2) ? wcor : 0.f; - else // AA not needed here - lwt = wcor * getWeight(BKH, len_bkh, u, v, ct_crad, inradsq); - // prevent background bleeding onto in-focus pixels, user-option - if (ct_crad > nqd->bthresh) { // if center blur > threshold - if (crad->rect[p] > nqd->bthresh) { // if overlap pixel in focus, do nothing, else add color/weigbt - new->rect[p4] += ctcol[0] * lwt; - if (new->type != CB_VAL) { - new->rect[p4+1] += ctcol[1] * lwt; - new->rect[p4+2] += ctcol[2] * lwt; - new->rect[p4+3] += ctcol[3] * lwt; - } - wts->rect[p] += lwt; - } - } - else { - new->rect[p4] += ctcol[0] * lwt; - if (new->type != CB_VAL) { - new->rect[p4+1] += ctcol[1] * lwt; - new->rect[p4+2] += ctcol[2] * lwt; - new->rect[p4+3] += ctcol[3] * lwt; - } - wts->rect[p] += lwt; - } - } - } - - } - } - - // finally, normalize - for (y=0; yy; y++) { - unsigned int p = y * new->x; - unsigned int p4 = p * new->type; - int x; - - for (x=0; xx; x++) { - float dv = (wts->rect[p]==0.f) ? 1.f : (1.f/wts->rect[p]); - new->rect[p4] *= dv; - if (new->type!=CB_VAL) { - new->rect[p4+1] *= dv; - new->rect[p4+2] *= dv; - new->rect[p4+3] *= dv; - } - p++; - p4 += new->type; - } - } - - free_compbuf(crad); - free_compbuf(wts); - - printf("Done\n"); -} - - -static void node_composit_exec_defocus(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf *new, *old, *zbuf_use = NULL, *img = in[0]->data, *zbuf = in[1]->data; - NodeDefocus *nqd = node->storage; - int no_zbuf = nqd->no_zbuf; - - if ((img==NULL) || (out[0]->hasoutput==0)) return; - - // if image not valid type or fstop==infinite (128), nothing to do, pass in to out - if (((img->type!=CB_RGBA) && (img->type!=CB_VAL)) || ((no_zbuf==0) && (nqd->fstop==128.f))) { - out[0]->data = pass_on_compbuf(img); - return; - } - - if (zbuf!=NULL) { - // Zbuf input, check to make sure, single channel, same size - // doesn't have to be actual zbuffer, but must be value type - if ((zbuf->x != img->x) || (zbuf->y != img->y)) { - // could do a scale here instead... - printf("Z input must be same size as image !\n"); - return; - } - zbuf_use = typecheck_compbuf(zbuf, CB_VAL); - } - else no_zbuf = 1; // no zbuffer input - - // ok, process - old = img; - if (nqd->gamco) { - // gamma correct, blender func is simplified, fixed value & RGBA only, - // should make user param. also depremul and premul afterwards, gamma - // correction can't work with premul alpha - old = dupalloc_compbuf(img); - premul_compbuf(old, 1); - gamma_correct_compbuf(old, 0); - premul_compbuf(old, 0); - } - - new = alloc_compbuf(old->x, old->y, old->type, 1); - defocus_blur(node, new, old, zbuf_use, in[1]->vec[0]*nqd->scale, no_zbuf); - - if (nqd->gamco) { - premul_compbuf(new, 1); - gamma_correct_compbuf(new, 1); - premul_compbuf(new, 0); - free_compbuf(old); - } - if(node->exec & NODE_BREAK) { - free_compbuf(new); - new= NULL; - } - out[0]->data = new; - if (zbuf_use && (zbuf_use != zbuf)) free_compbuf(zbuf_use); -} - -static void node_composit_init_defocus(bNode* node) -{ - /* qdn: defocus node */ - NodeDefocus *nbd = MEM_callocN(sizeof(NodeDefocus), "node defocus data"); - nbd->bktype = 0; - nbd->rotation = 0.f; - nbd->preview = 1; - nbd->gamco = 0; - nbd->samples = 16; - nbd->fstop = 128.f; - nbd->maxblur = 0; - nbd->bthresh = 1.f; - nbd->scale = 1.f; - nbd->no_zbuf = 1; - node->storage = nbd; -} - -void register_node_type_cmp_defocus(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_DEFOCUS, "Defocus", NODE_CLASS_OP_FILTER, NODE_OPTIONS, - cmp_node_defocus_in, cmp_node_defocus_out); - node_type_size(&ntype, 150, 120, 200); - node_type_init(&ntype, node_composit_init_defocus); - node_type_storage(&ntype, "NodeDefocus", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_defocus); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c deleted file mode 100644 index 296053298da..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Bob Holcomb - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_diffMatte.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* ******************* channel Difference Matte ********************************* */ -static bNodeSocketType cmp_node_diff_matte_in[]={ - {SOCK_RGBA,1,"Image 1", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_RGBA,1,"Image 2", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static bNodeSocketType cmp_node_diff_matte_out[]={ - {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float *inColor2) -{ - NodeChroma *c= (NodeChroma *)node->storage; - float tolerence=c->t1; - float falloff=c->t2; - float difference; - float alpha; - - difference= fabs(inColor2[0]-inColor1[0])+ - fabs(inColor2[1]-inColor1[1])+ - fabs(inColor2[2]-inColor1[2]); - - /*average together the distances*/ - difference=difference/3.0; - - VECCOPY(outColor, inColor1); - - /*make 100% transparent*/ - if(difference < tolerence) { - outColor[3]=0.0; - } - /*in the falloff region, make partially transparent */ - else if(difference < falloff+tolerence) { - difference=difference-tolerence; - alpha=difference/falloff; - /*only change if more transparent than before */ - if(alpha < inColor1[3]) { - outColor[3]=alpha; - } - else { /* leave as before */ - outColor[3]=inColor1[3]; - } - } - else { - /*foreground object*/ - outColor[3]= inColor1[3]; - } -} - -static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf *outbuf=0; - CompBuf *imbuf1=0; - CompBuf *imbuf2=0; - NodeChroma *c; - - /*is anything connected?*/ - if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; - - /*must have an image imput*/ - if(in[0]->data==NULL) return; - - - imbuf1=typecheck_compbuf(in[0]->data, CB_RGBA); - - /* if there's an image, use that, if not use the color */ - if(in[1]->data) { - imbuf2=typecheck_compbuf(in[1]->data, CB_RGBA); - } - - c=node->storage; - outbuf=dupalloc_compbuf(imbuf1); - - /* note, processor gets a keyvals array passed on as buffer constant */ - composit2_pixel_processor(node, outbuf, imbuf1, in[0]->vec, imbuf2, in[1]->vec, do_diff_matte, CB_RGBA, CB_RGBA); - - out[0]->data=outbuf; - if(out[1]->hasoutput) - out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A); - generate_preview(data, node, outbuf); - - if(imbuf1!=in[0]->data) - free_compbuf(imbuf1); - - if(imbuf2!=in[1]->data) - free_compbuf(imbuf2); -} - -static void node_composit_init_diff_matte(bNode *node) -{ - NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); - node->storage= c; - c->t1= 0.1f; - c->t2= 0.1f; -} - -void register_node_type_cmp_diff_matte(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_DIFF_MATTE, "Difference Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_diff_matte_in, cmp_node_diff_matte_out); - node_type_size(&ntype, 200, 80, 250); - node_type_init(&ntype, node_composit_init_diff_matte); - node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_diff_matte); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_dilate.c b/source/blender/nodes/intern/CMP_nodes/CMP_dilate.c deleted file mode 100644 index f5d16ff0ab8..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_dilate.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_dilate.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** Dilate/Erode ******************** */ - -static bNodeSocketType cmp_node_dilateerode_in[]= { - { SOCK_VALUE, 1, "Mask", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_dilateerode_out[]= { - { SOCK_VALUE, 0, "Mask", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void morpho_dilate(CompBuf *cbuf) -{ - int x, y; - float *p, *rectf = cbuf->rect; - - for (y=0; y < cbuf->y; y++) { - for (x=0; x < cbuf->x-1; x++) { - p = rectf + cbuf->x*y + x; - *p = MAX2(*p, *(p + 1)); - } - } - - for (y=0; y < cbuf->y; y++) { - for (x=cbuf->x-1; x >= 1; x--) { - p = rectf + cbuf->x*y + x; - *p = MAX2(*p, *(p - 1)); - } - } - - for (x=0; x < cbuf->x; x++) { - for (y=0; y < cbuf->y-1; y++) { - p = rectf + cbuf->x*y + x; - *p = MAX2(*p, *(p + cbuf->x)); - } - } - - for (x=0; x < cbuf->x; x++) { - for (y=cbuf->y-1; y >= 1; y--) { - p = rectf + cbuf->x*y + x; - *p = MAX2(*p, *(p - cbuf->x)); - } - } -} - -static void morpho_erode(CompBuf *cbuf) -{ - int x, y; - float *p, *rectf = cbuf->rect; - - for (y=0; y < cbuf->y; y++) { - for (x=0; x < cbuf->x-1; x++) { - p = rectf + cbuf->x*y + x; - *p = MIN2(*p, *(p + 1)); - } - } - - for (y=0; y < cbuf->y; y++) { - for (x=cbuf->x-1; x >= 1; x--) { - p = rectf + cbuf->x*y + x; - *p = MIN2(*p, *(p - 1)); - } - } - - for (x=0; x < cbuf->x; x++) { - for (y=0; y < cbuf->y-1; y++) { - p = rectf + cbuf->x*y + x; - *p = MIN2(*p, *(p + cbuf->x)); - } - } - - for (x=0; x < cbuf->x; x++) { - for (y=cbuf->y-1; y >= 1; y--) { - p = rectf + cbuf->x*y + x; - *p = MIN2(*p, *(p - cbuf->x)); - } - } - -} - -static void node_composit_exec_dilateerode(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: mask */ - /* stack order out: mask */ - if(out[0]->hasoutput==0) - return; - - /* input no image? then only color operation */ - if(in[0]->data==NULL) { - out[0]->vec[0] = out[0]->vec[1] = out[0]->vec[2] = 0.0f; - out[0]->vec[3] = 0.0f; - } - else { - /* make output size of input image */ - CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_VAL); - CompBuf *stackbuf= dupalloc_compbuf(cbuf); - short i; - - if (node->custom2 > 0) { // positive, dilate - for (i = 0; i < node->custom2; i++) - morpho_dilate(stackbuf); - } else if (node->custom2 < 0) { // negative, erode - for (i = 0; i > node->custom2; i--) - morpho_erode(stackbuf); - } - - if(cbuf!=in[0]->data) - free_compbuf(cbuf); - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_dilateerode(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_DILATEERODE, "Dilate/Erode", NODE_CLASS_OP_FILTER, NODE_OPTIONS, - cmp_node_dilateerode_in, cmp_node_dilateerode_out); - node_type_size(&ntype, 130, 100, 320); - node_type_exec(&ntype, node_composit_exec_dilateerode); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_directionalblur.c b/source/blender/nodes/intern/CMP_nodes/CMP_directionalblur.c deleted file mode 100644 index 2a8bbcc9ad5..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_directionalblur.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Alfredo de Greef (eeshlo) - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_directionalblur.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -static bNodeSocketType cmp_node_dblur_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.f, 0.f, 1.f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_dblur_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static CompBuf *dblur(bNode *node, CompBuf *img, int iterations, int wrap, - float center_x, float center_y, float dist, float angle, float spin, float zoom) -{ - if ((dist != 0.f) || (spin != 0.f) || (zoom != 0.f)) { - void (*getpix)(CompBuf*, float, float, float*) = wrap ? qd_getPixelLerpWrap : qd_getPixelLerp; - const float a= angle * (float)M_PI / 180.f; - const float itsc= 1.f / pow(2.f, (float)iterations); - float D; - float center_x_pix, center_y_pix; - float tx, ty; - float sc, rot; - CompBuf *tmp; - int i, j; - - tmp= dupalloc_compbuf(img); - - D= dist * sqrtf(img->x * img->x + img->y * img->y); - center_x_pix= center_x * img->x; - center_y_pix= center_y * img->y; - - tx= itsc * D * cos(a); - ty= -itsc * D * sin(a); - sc= itsc * zoom; - rot= itsc * spin * (float)M_PI / 180.f; - - /* blur the image */ - for(i= 0; i < iterations; ++i) { - const float cs= cos(rot), ss= sin(rot); - const float isc= 1.f / (1.f + sc); - unsigned int x, y; - float col[4]= {0,0,0,0}; - - for(y= 0; y < img->y; ++y) { - const float v= isc * (y - center_y_pix) + ty; - - for(x= 0; x < img->x; ++x) { - const float u= isc * (x - center_x_pix) + tx; - unsigned int p= (x + y * img->x) * img->type; - - getpix(tmp, cs * u + ss * v + center_x_pix, cs * v - ss * u + center_y_pix, col); - - /* mix img and transformed tmp */ - for(j= 0; j < 4; ++j) - img->rect[p + j]= AVG2(img->rect[p + j], col[j]); - } - } - - /* copy img to tmp */ - if(i != (iterations - 1)) - memcpy(tmp->rect, img->rect, sizeof(float) * img->x * img->y * img->type); - - /* double transformations */ - tx *= 2.f, ty *= 2.f; - sc *= 2.f, rot *= 2.f; - - if(node->exec & NODE_BREAK) break; - } - - free_compbuf(tmp); - } - - return img; -} - -static void node_composit_exec_dblur(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - NodeDBlurData *ndbd= node->storage; - CompBuf *new, *img= in[0]->data; - - if((img == NULL) || (out[0]->hasoutput == 0)) return; - - if (img->type != CB_RGBA) - new = typecheck_compbuf(img, CB_RGBA); - else - new = dupalloc_compbuf(img); - - out[0]->data= dblur(node, new, ndbd->iter, ndbd->wrap, ndbd->center_x, ndbd->center_y, ndbd->distance, ndbd->angle, ndbd->spin, ndbd->zoom); -} - -static void node_composit_init_dblur(bNode* node) -{ - NodeDBlurData *ndbd= MEM_callocN(sizeof(NodeDBlurData), "node dblur data"); - node->storage= ndbd; - ndbd->center_x= 0.5; - ndbd->center_y= 0.5; -} - -void register_node_type_cmp_dblur(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS, - cmp_node_dblur_in, cmp_node_dblur_out); - node_type_size(&ntype, 150, 120, 200); - node_type_init(&ntype, node_composit_init_dblur); - node_type_storage(&ntype, "NodeDBlurData", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_dblur); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_displace.c b/source/blender/nodes/intern/CMP_nodes/CMP_displace.c deleted file mode 100644 index 9139edf8560..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_displace.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_displace.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** Displace ******************** */ - -static bNodeSocketType cmp_node_displace_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, "Vector", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "X Scale", 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f}, - { SOCK_VALUE, 1, "Y Scale", 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_displace_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* minimum distance (in pixels) a pixel has to be displaced - * in order to take effect */ -#define DISPLACE_EPSILON 0.01 - -static void do_displace(bNode *node, CompBuf *stackbuf, CompBuf *cbuf, CompBuf *vecbuf, float *UNUSED(veccol), CompBuf *xbuf, CompBuf *ybuf, float *xscale, float *yscale) -{ - ImBuf *ibuf; - int x, y; - float p_dx, p_dy; /* main displacement in pixel space */ - float d_dx, d_dy; - float dxt, dyt; - float u, v; - float xs, ys; - float vec[3], vecdx[3], vecdy[3]; - float col[3]; - - ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); - ibuf->rect_float= cbuf->rect; - - for(y=0; y < stackbuf->y; y++) { - for(x=0; x < stackbuf->x; x++) { - /* calc pixel coordinates */ - qd_getPixel(vecbuf, x-vecbuf->xof, y-vecbuf->yof, vec); - - if (xbuf) - qd_getPixel(xbuf, x-xbuf->xof, y-xbuf->yof, &xs); - else - xs = xscale[0]; - - if (ybuf) - qd_getPixel(ybuf, x-ybuf->xof, y-ybuf->yof, &ys); - else - ys = yscale[0]; - - /* clamp x and y displacement to triple image resolution - - * to prevent hangs from huge values mistakenly plugged in eg. z buffers */ - CLAMP(xs, -stackbuf->x*4, stackbuf->x*4); - CLAMP(ys, -stackbuf->y*4, stackbuf->y*4); - - p_dx = vec[0] * xs; - p_dy = vec[1] * ys; - - /* if no displacement, then just copy this pixel */ - if (fabsf(p_dx) < DISPLACE_EPSILON && fabsf(p_dy) < DISPLACE_EPSILON) { - qd_getPixel(cbuf, x-cbuf->xof, y-cbuf->yof, col); - qd_setPixel(stackbuf, x, y, col); - continue; - } - - /* displaced pixel in uv coords, for image sampling */ - u = (x - cbuf->xof - p_dx + 0.5f) / (float)stackbuf->x; - v = (y - cbuf->yof - p_dy + 0.5f) / (float)stackbuf->y; - - - /* calc derivatives */ - qd_getPixel(vecbuf, x-vecbuf->xof+1, y-vecbuf->yof, vecdx); - qd_getPixel(vecbuf, x-vecbuf->xof, y-vecbuf->yof+1, vecdy); - d_dx = vecdx[0] * xs; - d_dy = vecdy[0] * ys; - - /* clamp derivatives to minimum displacement distance in UV space */ - dxt = p_dx - d_dx; - dyt = p_dy - d_dy; - - dxt = signf(dxt)*maxf(fabsf(dxt), DISPLACE_EPSILON)/(float)stackbuf->x; - dyt = signf(dyt)*maxf(fabsf(dyt), DISPLACE_EPSILON)/(float)stackbuf->y; - - ibuf_sample(ibuf, u, v, dxt, dyt, col); - qd_setPixel(stackbuf, x, y, col); - - if(node->exec & NODE_BREAK) break; - } - - if(node->exec & NODE_BREAK) break; - } - IMB_freeImBuf(ibuf); - - -/* simple method for reference, linear interpolation */ -/* - int x, y; - float dx, dy; - float u, v; - float vec[3]; - float col[3]; - - for(y=0; y < stackbuf->y; y++) { - for(x=0; x < stackbuf->x; x++) { - qd_getPixel(vecbuf, x, y, vec); - - dx = vec[0] * (xscale[0]); - dy = vec[1] * (yscale[0]); - - u = (x - dx + 0.5f) / (float)stackbuf->x; - v = (y - dy + 0.5f) / (float)stackbuf->y; - - qd_getPixelLerp(cbuf, u*cbuf->x - 0.5f, v*cbuf->y - 0.5f, col); - qd_setPixel(stackbuf, x, y, col); - } - } -*/ -} - - -static void node_composit_exec_displace(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - if(out[0]->hasoutput==0) - return; - - if(in[0]->data && in[1]->data) { - CompBuf *cbuf= in[0]->data; - CompBuf *vecbuf= in[1]->data; - CompBuf *xbuf= in[2]->data; - CompBuf *ybuf= in[3]->data; - CompBuf *stackbuf; - - cbuf= typecheck_compbuf(cbuf, CB_RGBA); - vecbuf= typecheck_compbuf(vecbuf, CB_VEC3); - xbuf= typecheck_compbuf(xbuf, CB_VAL); - ybuf= typecheck_compbuf(ybuf, CB_VAL); - - stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - do_displace(node, stackbuf, cbuf, vecbuf, in[1]->vec, xbuf, ybuf, in[2]->vec, in[3]->vec); - - out[0]->data= stackbuf; - - - if(cbuf!=in[0]->data) - free_compbuf(cbuf); - if(vecbuf!=in[1]->data) - free_compbuf(vecbuf); - } -} - -void register_node_type_cmp_displace(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT, NODE_OPTIONS, - cmp_node_displace_in, cmp_node_displace_out); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, node_composit_exec_displace); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c deleted file mode 100644 index 5f7613464c1..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Bob Holcomb - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* ******************* channel Distance Matte ********************************* */ -static bNodeSocketType cmp_node_distance_matte_in[]={ - {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static bNodeSocketType cmp_node_distance_matte_out[]={ - {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -/* note, keyvals is passed on from caller as stack array */ -/* might have been nicer as temp struct though... */ -static void do_distance_matte(bNode *node, float *out, float *in) -{ - NodeChroma *c= (NodeChroma *)node->storage; - float tolerence=c->t1; - float falloff=c->t2; - float distance; - float alpha; - - distance=sqrt((c->key[0]-in[0])*(c->key[0]-in[0]) + - (c->key[1]-in[1])*(c->key[1]-in[1]) + - (c->key[2]-in[2])*(c->key[2]-in[2])); - - VECCOPY(out, in); - - /*make 100% transparent */ - if(distance < tolerence) { - out[3]=0.0; - } - /*in the falloff region, make partially transparent */ - else if(distance < falloff+tolerence){ - distance=distance-tolerence; - alpha=distance/falloff; - /*only change if more transparent than before */ - if(alpha < in[3]) { - out[3]=alpha; - } - else { /* leave as before */ - out[3]=in[3]; - } - } - else { - out[3]=in[3]; - } -} - -static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* - Loosely based on the Sequencer chroma key plug-in, but enhanced to work in other color spaces and - uses a different difference function (suggested in forums of vfxtalk.com). - */ - CompBuf *workbuf; - CompBuf *inbuf; - NodeChroma *c; - - /*is anything connected?*/ - if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; - /*must have an image imput*/ - if(in[0]->data==NULL) return; - - inbuf=typecheck_compbuf(in[0]->data, CB_RGBA); - - c=node->storage; - workbuf=dupalloc_compbuf(inbuf); - - /*use the input color*/ - c->key[0]= in[1]->vec[0]; - c->key[1]= in[1]->vec[1]; - c->key[2]= in[1]->vec[2]; - - /* note, processor gets a keyvals array passed on as buffer constant */ - composit1_pixel_processor(node, workbuf, workbuf, in[0]->vec, do_distance_matte, CB_RGBA); - - - out[0]->data=workbuf; - if(out[1]->hasoutput) - out[1]->data=valbuf_from_rgbabuf(workbuf, CHAN_A); - generate_preview(data, node, workbuf); - - if(inbuf!=in[0]->data) - free_compbuf(inbuf); -} - -static void node_composit_init_distance_matte(bNode *node) -{ - NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); - node->storage= c; - c->t1= 0.1f; - c->t2= 0.1f; -} - -void register_node_type_cmp_distance_matte(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_DIST_MATTE, "Distance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_distance_matte_in, cmp_node_distance_matte_out); - node_type_size(&ntype, 200, 80, 250); - node_type_init(&ntype, node_composit_init_distance_matte); - node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_distance_matte); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c b/source/blender/nodes/intern/CMP_nodes/CMP_filter.c deleted file mode 100644 index 915cb01d2d4..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_filter.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** FILTER ******************** */ -static bNodeSocketType cmp_node_filter_in[]= { - { SOCK_VALUE, 1, "Fac", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_filter_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_filter_edge(CompBuf *out, CompBuf *in, float *filter, float fac) -{ - float *row1, *row2, *row3; - float *fp, f1, f2, mfac= 1.0f-fac; - int rowlen, x, y, c, pix= in->type; - - rowlen= in->x; - - for(y=0; yy; y++) { - /* setup rows */ - if(y==0) row1= in->rect; - else row1= in->rect + pix*(y-1)*rowlen; - - row2= in->rect + y*pix*rowlen; - - if(y==in->y-1) row3= row2; - else row3= row2 + pix*rowlen; - - fp= out->rect + pix*y*rowlen; - - if(pix==CB_RGBA) { - QUATCOPY(fp, row2); - fp+= pix; - - for(x=2; xtype; - - rowlen= in->x; - - for(y=0; yy; y++) { - /* setup rows */ - if(y==0) row1= in->rect; - else row1= in->rect + pixlen*(y-1)*rowlen; - - row2= in->rect + y*pixlen*rowlen; - - if(y==in->y-1) row3= row2; - else row3= row2 + pixlen*rowlen; - - fp= out->rect + pixlen*(y)*rowlen; - - if(pixlen==1) { - fp[0]= row2[0]; - fp+= 1; - - for(x=2; xhasoutput==0) return; - - /* stack order in: Image */ - /* stack order out: Image */ - - if(in[1]->data) { - /* make output size of first available input image */ - CompBuf *cbuf= in[1]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1); /* allocs */ - - /* warning note: xof and yof are applied in pixelprocessor, but should be copied otherwise? */ - stackbuf->xof= cbuf->xof; - stackbuf->yof= cbuf->yof; - - switch(node->custom1) { - case CMP_FILT_SOFT: - do_filter3(stackbuf, cbuf, soft, in[0]->vec[0]); - break; - case CMP_FILT_SHARP: - do_filter3(stackbuf, cbuf, sharp, in[0]->vec[0]); - break; - case CMP_FILT_LAPLACE: - do_filter3(stackbuf, cbuf, laplace, in[0]->vec[0]); - break; - case CMP_FILT_SOBEL: - do_filter_edge(stackbuf, cbuf, sobel, in[0]->vec[0]); - break; - case CMP_FILT_PREWITT: - do_filter_edge(stackbuf, cbuf, prewitt, in[0]->vec[0]); - break; - case CMP_FILT_KIRSCH: - do_filter_edge(stackbuf, cbuf, kirsch, in[0]->vec[0]); - break; - case CMP_FILT_SHADOW: - do_filter3(stackbuf, cbuf, shadow, in[0]->vec[0]); - break; - } - - out[0]->data= stackbuf; - - generate_preview(data, node, out[0]->data); - } -} - - -void register_node_type_cmp_filter(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_FILTER, "Filter", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_filter_in, cmp_node_filter_out); - node_type_size(&ntype, 80, 40, 120); - node_type_label(&ntype, node_filter_label); - node_type_exec(&ntype, node_composit_exec_filter); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_flip.c b/source/blender/nodes/intern/CMP_nodes/CMP_flip.c deleted file mode 100644 index b5fd7b46e03..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_flip.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_flip.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** Flip ******************** */ -static bNodeSocketType cmp_node_flip_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_flip_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_flip(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - if(in[0]->data) { - CompBuf *cbuf= in[0]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1); /* note, this returns zero'd image */ - int i, src_pix, src_width, src_height, srcydelt, outydelt, x, y; - float *srcfp, *outfp; - - src_pix= cbuf->type; - src_width= cbuf->x; - src_height= cbuf->y; - srcfp= cbuf->rect; - outfp= stackbuf->rect; - srcydelt= src_width*src_pix; - outydelt= srcydelt; - - if(node->custom1) { /*set up output pointer for y flip*/ - outfp+= (src_height-1)*outydelt; - outydelt= -outydelt; - } - - for(y=0; ycustom1 == 1) { /* no x flip so just copy line*/ - memcpy(outfp, srcfp, sizeof(float) * src_pix * src_width); - srcfp+=srcydelt; - } - else { - outfp += (src_width-1)*src_pix; - for(x=0; xdata= stackbuf; - - } -} - -void register_node_type_cmp_flip(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_FLIP, "Flip", NODE_CLASS_DISTORT, NODE_OPTIONS, - cmp_node_flip_in, cmp_node_flip_out); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, node_composit_exec_flip); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c b/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c deleted file mode 100644 index 261257d3b5f..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c +++ /dev/null @@ -1,90 +0,0 @@ -/* -* $Id$ -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* The Original Code is Copyright (C) 2006 Blender Foundation. -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** - -*/ - -/** \file blender/nodes/intern/CMP_nodes/CMP_gamma.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** Gamma Tools ******************** */ - -static bNodeSocketType cmp_node_gamma_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Gamma", 1.0f, 0.0f, 0.0f, 0.0f, 0.001f, 10.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_gamma_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_gamma(bNode *UNUSED(node), float *out, float *in, float *fac) -{ - int i=0; - for(i=0; i<3; i++) { - /* check for negative to avoid nan's */ - out[i] = (in[i] > 0.0f)? pow(in[i],fac[0]): in[i]; - } - out[3] = in[3]; -} -static void node_composit_exec_gamma(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: Fac, Image */ - /* stack order out: Image */ - if(out[0]->hasoutput==0) return; - - /* input no image? then only color operation */ - if(in[0]->data==NULL) { - do_gamma(node, out[0]->vec, in[0]->vec, in[1]->vec); - } - else { - /* make output size of input image */ - CompBuf *cbuf= in[0]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); // allocs - - composit2_pixel_processor(node, stackbuf, cbuf, in[0]->vec, in[1]->data, in[1]->vec, do_gamma, CB_RGBA, CB_VAL); - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_gamma(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_gamma_in, cmp_node_gamma_out); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, node_composit_exec_gamma); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_glare.c b/source/blender/nodes/intern/CMP_nodes/CMP_glare.c deleted file mode 100644 index 2e0822a4511..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_glare.c +++ /dev/null @@ -1,506 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Alfredo de Greef (eeshlo) - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_glare.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -static bNodeSocketType cmp_node_glare_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_glare_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - - -// mix two images, src buffer does not have to be same size, -static void mixImages(CompBuf *dst, CompBuf *src, float mix) -{ - int x, y; - fRGB c1, c2, *dcolp, *scolp; - const float mf = 2.f - 2.f*fabsf(mix - 0.5f); - if ((dst->x == src->x) && (dst->y == src->y)) { - for (y=0; yy; y++) { - dcolp = (fRGB*)&dst->rect[y*dst->x*dst->type]; - scolp = (fRGB*)&src->rect[y*dst->x*dst->type]; - for (x=0; xx; x++) { - fRGB_copy(c1, dcolp[x]); - fRGB_copy(c2, scolp[x]); - c1[0] += mix*(c2[0] - c1[0]); - c1[1] += mix*(c2[1] - c1[1]); - c1[2] += mix*(c2[2] - c1[2]); - if (c1[0] < 0.f) c1[0] = 0.f; - if (c1[1] < 0.f) c1[1] = 0.f; - if (c1[2] < 0.f) c1[2] = 0.f; - fRGB_mult(c1, mf); - fRGB_copy(dcolp[x], c1); - } - } - } - else { - float xr = src->x / (float)dst->x; - float yr = src->y / (float)dst->y; - for (y=0; yy; y++) { - dcolp = (fRGB*)&dst->rect[y*dst->x*dst->type]; - for (x=0; xx; x++) { - fRGB_copy(c1, dcolp[x]); - qd_getPixelLerp(src, (x + 0.5f)*xr - 0.5f, (y + 0.5f)*yr - 0.5f, c2); - c1[0] += mix*(c2[0] - c1[0]); - c1[1] += mix*(c2[1] - c1[1]); - c1[2] += mix*(c2[2] - c1[2]); - if (c1[0] < 0.f) c1[0] = 0.f; - if (c1[1] < 0.f) c1[1] = 0.f; - if (c1[2] < 0.f) c1[2] = 0.f; - fRGB_mult(c1, mf); - fRGB_copy(dcolp[x], c1); - } - } - } -} - - -// adds src to dst image, must be of same size -static void addImage(CompBuf* dst, CompBuf* src, float scale) -{ - if ((dst->x == src->x) && (dst->y == src->y)) { - int p = dst->x*dst->y*dst->type; - float *dcol = dst->rect, *scol = src->rect; - while (p--) *dcol++ += *scol++ * scale; - } -} - - -// returns possibly downscaled copy of all pixels above threshold -static CompBuf* BTP(CompBuf* src, float threshold, int scaledown) -{ - int x, y; - CompBuf* bsrc = qd_downScaledCopy(src, scaledown); - float* cr = bsrc->rect; - for (y=0; yy; ++y) - for (x=0; xx; ++x, cr+=4) { - if ((0.212671f*cr[0] + 0.71516f*cr[1] + 0.072169f*cr[2]) >= threshold) { - cr[0] -= threshold, cr[1] -= threshold, cr[2] -= threshold; - cr[0] = MAX2(cr[0], 0.f); - cr[1] = MAX2(cr[1], 0.f); - cr[2] = MAX2(cr[2], 0.f); - } - else cr[0] = cr[1] = cr[2] = 0.f; - } - return bsrc; -} - -//-------------------------------------------------------------------------------------------- -// simple 4-point star filter - -static void star4(NodeGlare* ndg, CompBuf* dst, CompBuf* src) -{ - int x, y, i, xm, xp, ym, yp; - float c[4] = {0,0,0,0}, tc[4] = {0,0,0,0}; - CompBuf *tbuf1, *tbuf2, *tsrc; - const float f1 = 1.f - ndg->fade, f2 = (1.f - f1)*0.5f; - //const float t3 = ndg->threshold*3.f; - const float sc = (float)(1 << ndg->quality); - const float isc = 1.f/sc; - - tsrc = BTP(src, ndg->threshold, (int)sc); - - tbuf1 = dupalloc_compbuf(tsrc); - tbuf2 = dupalloc_compbuf(tsrc); - - for (i=0; iiter; i++) { - // (x || x-1, y-1) to (x || x+1, y+1) - // F - for (y=0; yy; y++) { - ym = y - i; - yp = y + i; - for (x=0; xx; x++) { - xm = x - i; - xp = x + i; - qd_getPixel(tbuf1, x, y, c); - fRGB_mult(c, f1); - qd_getPixel(tbuf1, (ndg->angle ? xm : x), ym, tc); - fRGB_madd(c, tc, f2); - qd_getPixel(tbuf1, (ndg->angle ? xp : x), yp, tc); - fRGB_madd(c, tc, f2); - qd_setPixel(tbuf1, x, y, c); - } - } - // B - for (y=tbuf1->y-1; y>=0; y--) { - ym = y - i; - yp = y + i; - for (x=tbuf1->x-1; x>=0; x--) { - xm = x - i; - xp = x + i; - qd_getPixel(tbuf1, x, y, c); - fRGB_mult(c, f1); - qd_getPixel(tbuf1, (ndg->angle ? xm : x), ym, tc); - fRGB_madd(c, tc, f2); - qd_getPixel(tbuf1, (ndg->angle ? xp : x), yp, tc); - fRGB_madd(c, tc, f2); - qd_setPixel(tbuf1, x, y, c); - } - } - // (x-1, y || y+1) to (x+1, y || y-1) - // F - for (y=0; yy; y++) { - ym = y - i; - yp = y + i; - for (x=0; xx; x++) { - xm = x - i; - xp = x + i; - qd_getPixel(tbuf2, x, y, c); - fRGB_mult(c, f1); - qd_getPixel(tbuf2, xm, (ndg->angle ? yp : y), tc); - fRGB_madd(c, tc, f2); - qd_getPixel(tbuf2, xp, (ndg->angle ? ym : y), tc); - fRGB_madd(c, tc, f2); - qd_setPixel(tbuf2, x, y, c); - } - } - // B - for (y=tbuf2->y-1; y>=0; y--) { - ym = y - i; - yp = y + i; - for (x=tbuf2->x-1; x>=0; x--) { - xm = x - i; - xp = x + i; - qd_getPixel(tbuf2, x, y, c); - fRGB_mult(c, f1); - qd_getPixel(tbuf2, xm, (ndg->angle ? yp : y), tc); - fRGB_madd(c, tc, f2); - qd_getPixel(tbuf2, xp, (ndg->angle ? ym : y), tc); - fRGB_madd(c, tc, f2); - qd_setPixel(tbuf2, x, y, c); - } - } - } - - for (y=0; yy; ++y) - for (x=0; xx; ++x) { - unsigned int p = (x + y*tbuf1->x)*tbuf1->type; - tbuf1->rect[p] += tbuf2->rect[p]; - tbuf1->rect[p+1] += tbuf2->rect[p+1]; - tbuf1->rect[p+2] += tbuf2->rect[p+2]; - } - - for (y=0; yy; ++y) { - const float m = 0.5f + 0.5f*ndg->mix; - for (x=0; xx; ++x) { - unsigned int p = (x + y*dst->x)*dst->type; - qd_getPixelLerp(tbuf1, x*isc, y*isc, tc); - dst->rect[p] = src->rect[p] + m*(tc[0] - src->rect[p]); - dst->rect[p+1] = src->rect[p+1] + m*(tc[1] - src->rect[p+1]); - dst->rect[p+2] = src->rect[p+2] + m*(tc[2] - src->rect[p+2]); - } - } - - free_compbuf(tbuf1); - free_compbuf(tbuf2); - free_compbuf(tsrc); -} - -//-------------------------------------------------------------------------------------------- -// streak filter - -static void streaks(NodeGlare* ndg, CompBuf* dst, CompBuf* src) -{ - CompBuf *bsrc, *tsrc, *tdst, *sbuf; - int x, y, n; - unsigned int nump=0; - fRGB c1, c2, c3, c4; - float a, ang = 360.f/(float)ndg->angle; - - bsrc = BTP(src, ndg->threshold, 1 << ndg->quality); - tsrc = dupalloc_compbuf(bsrc); // sample from buffer - tdst = alloc_compbuf(tsrc->x, tsrc->y, tsrc->type, 1); // sample to buffer - sbuf = alloc_compbuf(tsrc->x, tsrc->y, tsrc->type, 1); // streak sum buffer - - - for (a=0.f; a<360.f; a+=ang) { - const float an = (a + (float)ndg->angle_ofs)*(float)M_PI/180.f; - const float vx = cos((double)an), vy = sin((double)an); - for (n=0; niter; ++n) { - const float p4 = pow(4.0, (double)n); - const float vxp = vx*p4, vyp = vy*p4; - const float wt = pow((double)ndg->fade, (double)p4); - const float cmo = 1.f - pow((double)ndg->colmod, (double)n+1); // colormodulation amount relative to current pass - float* tdstcol = tdst->rect; - for (y=0; yy; ++y) { - for (x=0; xx; ++x, tdstcol+=4) { - // first pass no offset, always same for every pass, exact copy, - // otherwise results in uneven brightness, only need once - if (n==0) qd_getPixel(tsrc, x, y, c1); else c1[0]=c1[1]=c1[2]=0; - qd_getPixelLerp(tsrc, x + vxp, y + vyp, c2); - qd_getPixelLerp(tsrc, x + vxp*2.f, y + vyp*2.f, c3); - qd_getPixelLerp(tsrc, x + vxp*3.f, y + vyp*3.f, c4); - // modulate color to look vaguely similar to a color spectrum - fRGB_rgbmult(c2, 1.f, cmo, cmo); - fRGB_rgbmult(c3, cmo, cmo, 1.f); - fRGB_rgbmult(c4, cmo, 1.f, cmo); - tdstcol[0] = 0.5f*(tdstcol[0] + c1[0] + wt*(c2[0] + wt*(c3[0] + wt*c4[0]))); - tdstcol[1] = 0.5f*(tdstcol[1] + c1[1] + wt*(c2[1] + wt*(c3[1] + wt*c4[1]))); - tdstcol[2] = 0.5f*(tdstcol[2] + c1[2] + wt*(c2[2] + wt*(c3[2] + wt*c4[2]))); - } - } - memcpy(tsrc->rect, tdst->rect, sizeof(float)*tdst->x*tdst->y*tdst->type); - } - - addImage(sbuf, tsrc, 1.f/(float)(6 - ndg->iter)); - memset(tdst->rect, 0, tdst->x*tdst->y*tdst->type*sizeof(float)); - memcpy(tsrc->rect, bsrc->rect, bsrc->x*bsrc->y*bsrc->type*sizeof(float)); - nump++; - } - - mixImages(dst, sbuf, 0.5f + 0.5f*ndg->mix); - - free_compbuf(tsrc); - free_compbuf(tdst); - free_compbuf(sbuf); - free_compbuf(bsrc); -} - - -//-------------------------------------------------------------------------------------------- -// Ghosts (lensflare) - -static float smoothMask(float x, float y) -{ - float t; - x = 2.f*x - 1.f, y = 2.f*y - 1.f; - if ((t = 1.f - sqrtf(x*x + y*y)) <= 0.f) return 0.f; - return t; -} - -static void ghosts(NodeGlare* ndg, CompBuf* dst, CompBuf* src) -{ - // colormodulation and scale factors (cm & scalef) for 16 passes max: 64 - int x, y, n, p, np; - fRGB c, tc, cm[64]; - float sc, isc, u, v, sm, s, t, ofs, scalef[64]; - CompBuf *tbuf1, *tbuf2, *gbuf; - const float cmo = 1.f - ndg->colmod; - const int qt = 1 << ndg->quality; - const float s1 = 4.f/(float)qt, s2 = 2.f*s1; - - gbuf = BTP(src, ndg->threshold, qt); - tbuf1 = dupalloc_compbuf(gbuf); - IIR_gauss(tbuf1, s1, 0, 3); - IIR_gauss(tbuf1, s1, 1, 3); - IIR_gauss(tbuf1, s1, 2, 3); - tbuf2 = dupalloc_compbuf(tbuf1); - IIR_gauss(tbuf2, s2, 0, 3); - IIR_gauss(tbuf2, s2, 1, 3); - IIR_gauss(tbuf2, s2, 2, 3); - - if (ndg->iter & 1) ofs = 0.5f; else ofs = 0.f; - for (x=0; x<(ndg->iter*4); x++) { - y = x & 3; - cm[x][0] = cm[x][1] = cm[x][2] = 1; - if (y==1) fRGB_rgbmult(cm[x], 1.f, cmo, cmo); - if (y==2) fRGB_rgbmult(cm[x], cmo, cmo, 1.f); - if (y==3) fRGB_rgbmult(cm[x], cmo, 1.f, cmo); - scalef[x] = 2.1f*(1.f-(x+ofs)/(float)(ndg->iter*4)); - if (x & 1) scalef[x] = -0.99f/scalef[x]; - } - - sc = 2.13; - isc = -0.97; - for (y=0; yy; y++) { - v = (float)(y+0.5f) / (float)gbuf->y; - for (x=0; xx; x++) { - u = (float)(x+0.5f) / (float)gbuf->x; - s = (u-0.5f)*sc + 0.5f, t = (v-0.5f)*sc + 0.5f; - qd_getPixelLerp(tbuf1, s*gbuf->x, t*gbuf->y, c); - sm = smoothMask(s, t); - fRGB_mult(c, sm); - s = (u-0.5f)*isc + 0.5f, t = (v-0.5f)*isc + 0.5f; - qd_getPixelLerp(tbuf2, s*gbuf->x - 0.5f, t*gbuf->y - 0.5f, tc); - sm = smoothMask(s, t); - fRGB_madd(c, tc, sm); - qd_setPixel(gbuf, x, y, c); - } - } - - memset(tbuf1->rect, 0, tbuf1->x*tbuf1->y*tbuf1->type*sizeof(float)); - for (n=1; niter; n++) { - for (y=0; yy; y++) { - v = (float)(y+0.5f) / (float)gbuf->y; - for (x=0; xx; x++) { - u = (float)(x+0.5f) / (float)gbuf->x; - tc[0] = tc[1] = tc[2] = 0.f; - for (p=0;p<4;p++) { - np = (n<<2) + p; - s = (u-0.5f)*scalef[np] + 0.5f; - t = (v-0.5f)*scalef[np] + 0.5f; - qd_getPixelLerp(gbuf, s*gbuf->x - 0.5f, t*gbuf->y - 0.5f, c); - fRGB_colormult(c, cm[np]); - sm = smoothMask(s, t)*0.25f; - fRGB_madd(tc, c, sm); - } - p = (x + y*tbuf1->x)*tbuf1->type; - tbuf1->rect[p] += tc[0]; - tbuf1->rect[p+1] += tc[1]; - tbuf1->rect[p+2] += tc[2]; - } - } - memcpy(gbuf->rect, tbuf1->rect, tbuf1->x*tbuf1->y*tbuf1->type*sizeof(float)); - } - - free_compbuf(tbuf1); - free_compbuf(tbuf2); - - mixImages(dst, gbuf, 0.5f + 0.5f*ndg->mix); - free_compbuf(gbuf); -} - -//-------------------------------------------------------------------------------------------- -// Fog glow (convolution with kernel of exponential falloff) - -static void fglow(NodeGlare* ndg, CompBuf* dst, CompBuf* src) -{ - int x, y; - float scale, u, v, r, w, d; - fRGB fcol; - CompBuf *tsrc, *ckrn; - unsigned int sz = 1 << ndg->size; - const float cs_r = 1.f, cs_g = 1.f, cs_b = 1.f; - - // temp. src image - tsrc = BTP(src, ndg->threshold, 1 << ndg->quality); - // make the convolution kernel - ckrn = alloc_compbuf(sz, sz, CB_RGBA, 1); - - scale = 0.25f*sqrtf(sz*sz); - - for (y=0; ymix); - free_compbuf(tsrc); -} - -//-------------------------------------------------------------------------------------------- - -static void node_composit_exec_glare(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf *new, *src, *img = in[0]->data; - NodeGlare* ndg = node->storage; - - if ((img == NULL) || (out[0]->hasoutput == 0)) return; - - if (img->type != CB_RGBA) { - new = typecheck_compbuf(img, CB_RGBA); - src = typecheck_compbuf(img, CB_RGBA); - } else { - new = dupalloc_compbuf(img); - src = dupalloc_compbuf(img); - } - - { - int x, y; - for (y=0; yy; ++y) { - fRGB* col = (fRGB*)&new->rect[y*new->x*new->type]; - for (x=0; xx; ++x) { - col[x][0] = MAX2(col[x][0], 0.f); - col[x][1] = MAX2(col[x][1], 0.f); - col[x][2] = MAX2(col[x][2], 0.f); - } - } - } - - switch (ndg->type) { - case 0: - star4(ndg, new, src); - break; - case 1: - fglow(ndg, new, src); - break; - case 3: - ghosts(ndg, new, src); - break; - case 2: - default: - streaks(ndg, new, src); - break; - } - - free_compbuf(src); - out[0]->data = new; -} - -static void node_composit_init_glare(bNode* node) -{ - NodeGlare *ndg = MEM_callocN(sizeof(NodeGlare), "node glare data"); - ndg->quality = 1; - ndg->type = 2; - ndg->iter = 3; - ndg->colmod = 0.25; - ndg->mix = 0; - ndg->threshold = 1; - ndg->angle = 4; - ndg->angle_ofs = 0; - ndg->fade = 0.9; - ndg->size = 8; - node->storage = ndg; -} - -void register_node_type_cmp_glare(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_GLARE, "Glare", NODE_CLASS_OP_FILTER, NODE_OPTIONS, - cmp_node_glare_in, cmp_node_glare_out); - node_type_size(&ntype, 150, 120, 200); - node_type_init(&ntype, node_composit_init_glare); - node_type_storage(&ntype, "NodeGlare", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_glare); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c b/source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c deleted file mode 100644 index 7b5511c699c..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** Hue Saturation ******************** */ -static bNodeSocketType cmp_node_hue_sat_in[]= { - { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_hue_sat_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_hue_sat_fac(bNode *node, float *out, float *in, float *fac) -{ - NodeHueSat *nhs= node->storage; - - if(*fac!=0.0f && (nhs->hue!=0.5f || nhs->sat!=1.0 || nhs->val!=1.0)) { - float col[3], hsv[3], mfac= 1.0f - *fac; - - rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); - hsv[0]+= (nhs->hue - 0.5f); - if(hsv[0]>1.0) hsv[0]-=1.0; else if(hsv[0]<0.0) hsv[0]+= 1.0; - hsv[1]*= nhs->sat; - hsv[2]*= nhs->val; - hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); - - out[0]= mfac*in[0] + *fac*col[0]; - out[1]= mfac*in[1] + *fac*col[1]; - out[2]= mfac*in[2] + *fac*col[2]; - out[3]= in[3]; - } - else { - QUATCOPY(out, in); - } -} - -static void node_composit_exec_hue_sat(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: Fac, Image */ - /* stack order out: Image */ - if(out[0]->hasoutput==0) return; - - /* input no image? then only color operation */ - if(in[1]->data==NULL) { - do_hue_sat_fac(node, out[0]->vec, in[1]->vec, in[0]->vec); - } - else { - /* make output size of input image */ - CompBuf *cbuf= dupalloc_compbuf(in[1]->data); - CompBuf *stackbuf=typecheck_compbuf(cbuf,CB_RGBA); - - composit2_pixel_processor(node, stackbuf, stackbuf, in[1]->vec, in[0]->data, in[0]->vec, do_hue_sat_fac, CB_RGBA, CB_VAL); - - out[0]->data= stackbuf; - - /* get rid of intermediary cbuf if it's extra */ - if(stackbuf!=cbuf) - free_compbuf(cbuf); - } -} - -static void node_composit_init_hue_sat(bNode* node) -{ - NodeHueSat *nhs= MEM_callocN(sizeof(NodeHueSat), "node hue sat"); - node->storage= nhs; - nhs->hue= 0.5f; - nhs->sat= 1.0f; - nhs->val= 1.0f; -} - -void register_node_type_cmp_hue_sat(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_hue_sat_in, cmp_node_hue_sat_out); - node_type_size(&ntype, 150, 80, 250); - node_type_init(&ntype, node_composit_init_hue_sat); - node_type_storage(&ntype, "NodeHueSat", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_hue_sat); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c b/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c deleted file mode 100644 index edf6c454285..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Matt Ebb - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_huecorrect.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -static bNodeSocketType cmp_node_huecorrect_in[]= { - { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_huecorrect_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_huecorrect(bNode *node, float *out, float *in) -{ - float hsv[3], f; - - rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); - - /* adjust hue, scaling returned default 0.5 up to 1 */ - f = curvemapping_evaluateF(node->storage, 0, hsv[0]); - hsv[0] += f-0.5f; - - /* adjust saturation, scaling returned default 0.5 up to 1 */ - f = curvemapping_evaluateF(node->storage, 1, hsv[0]); - hsv[1] *= (f * 2.f); - - /* adjust value, scaling returned default 0.5 up to 1 */ - f = curvemapping_evaluateF(node->storage, 2, hsv[0]); - hsv[2] *= (f * 2.f); - - hsv[0] = hsv[0] - floor(hsv[0]); /* mod 1.0 */ - CLAMP(hsv[1], 0.f, 1.f); - - /* convert back to rgb */ - hsv_to_rgb(hsv[0], hsv[1], hsv[2], out, out+1, out+2); - - out[3]= in[3]; -} - -static void do_huecorrect_fac(bNode *node, float *out, float *in, float *fac) -{ - float hsv[3], rgb[3], f; - const float mfac = 1.f-*fac; - - rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); - - /* adjust hue, scaling returned default 0.5 up to 1 */ - f = curvemapping_evaluateF(node->storage, 0, hsv[0]); - hsv[0] += f-0.5f; - - /* adjust saturation, scaling returned default 0.5 up to 1 */ - f = curvemapping_evaluateF(node->storage, 1, hsv[0]); - hsv[1] *= (f * 2.f); - - /* adjust value, scaling returned default 0.5 up to 1 */ - f = curvemapping_evaluateF(node->storage, 2, hsv[0]); - hsv[2] *= (f * 2.f); - - hsv[0] = hsv[0] - floor(hsv[0]); /* mod 1.0 */ - CLAMP(hsv[1], 0.f, 1.f); - - /* convert back to rgb */ - hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2); - - out[0]= mfac*in[0] + *fac*rgb[0]; - out[1]= mfac*in[1] + *fac*rgb[1]; - out[2]= mfac*in[2] + *fac*rgb[2]; - out[3]= in[3]; -} - -static void node_composit_exec_huecorrect(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf *cbuf= in[1]->data; - CompBuf *stackbuf; - - /* stack order input: fac, image, black level, white level */ - /* stack order output: image */ - - if(out[0]->hasoutput==0) - return; - - if(in[0]->vec[0] == 0.f && in[0]->data == NULL) { - out[0]->data = pass_on_compbuf(cbuf); - return; - } - - /* input no image? then only color operation */ - if(in[1]->data==NULL) { - do_huecorrect_fac(node, out[0]->vec, in[1]->vec, in[0]->vec); - } - - if (cbuf) { - stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* make output size of input image */ - - if ((in[0]->data==NULL) && (in[0]->vec[0] >= 1.f)) - composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_huecorrect, CB_RGBA); - else - composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, in[0]->vec, do_huecorrect_fac, CB_RGBA, CB_VAL); - - out[0]->data= stackbuf; - } - -} - -static void node_composit_init_huecorrect(bNode* node) -{ - CurveMapping *cumapping = node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); - int c; - - cumapping->preset = CURVE_PRESET_MID9; - - for (c=0; c<3; c++) { - CurveMap *cuma = &cumapping->cm[c]; - curvemap_reset(cuma, &cumapping->clipr, cumapping->preset, CURVEMAP_SLOPE_POSITIVE); - } - - /* default to showing Saturation */ - cumapping->cur = 1; -} - -void register_node_type_cmp_huecorrect(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_HUECORRECT, "Hue Correct", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_huecorrect_in, cmp_node_huecorrect_out); - node_type_size(&ntype, 320, 140, 400); - node_type_init(&ntype, node_composit_init_huecorrect); - node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, node_composit_exec_huecorrect); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_idMask.c b/source/blender/nodes/intern/CMP_nodes/CMP_idMask.c deleted file mode 100644 index 72d0de7d15e..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_idMask.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_idMask.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** ID Mask ******************** */ - -static bNodeSocketType cmp_node_idmask_in[]= { - { SOCK_VALUE, 1, "ID value", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_idmask_out[]= { - { SOCK_VALUE, 0, "Alpha", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* stackbuf should be zeroed */ -static void do_idmask(CompBuf *stackbuf, CompBuf *cbuf, float idnr) -{ - float *rect; - int x; - char *abuf= MEM_mapallocN(cbuf->x*cbuf->y, "anti ali buf"); - - rect= cbuf->rect; - for(x= cbuf->x*cbuf->y - 1; x>=0; x--) - if(rect[x]==idnr) - abuf[x]= 255; - - antialias_tagbuf(cbuf->x, cbuf->y, abuf); - - rect= stackbuf->rect; - for(x= cbuf->x*cbuf->y - 1; x>=0; x--) - if(abuf[x]>1) - rect[x]= (1.0f/255.0f)*(float)abuf[x]; - - MEM_freeN(abuf); -} - -/* full sample version */ -static void do_idmask_fsa(CompBuf *stackbuf, CompBuf *cbuf, float idnr) -{ - float *rect, *rs; - int x; - - rect= cbuf->rect; - rs= stackbuf->rect; - for(x= cbuf->x*cbuf->y - 1; x>=0; x--) - if(rect[x]==idnr) - rs[x]= 1.0f; - -} - - -static void node_composit_exec_idmask(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - RenderData *rd= data; - - if(out[0]->hasoutput==0) - return; - - if(in[0]->data) { - CompBuf *cbuf= in[0]->data; - CompBuf *stackbuf; - - if(cbuf->type!=CB_VAL) - return; - - stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */; - - if(rd->scemode & R_FULL_SAMPLE) - do_idmask_fsa(stackbuf, cbuf, (float)node->custom1); - else - do_idmask(stackbuf, cbuf, (float)node->custom1); - - out[0]->data= stackbuf; - } -} - - -void register_node_type_cmp_idmask(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_idmask_in, cmp_node_idmask_out); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, node_composit_exec_idmask); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c deleted file mode 100644 index a5f256054cd..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c +++ /dev/null @@ -1,452 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_image.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** IMAGE (and RenderResult, multilayer image) ******************** */ - -static bNodeSocketType cmp_node_rlayers_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 0, "UV", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 0, "Speed", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Diffuse", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Specular", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Shadow", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "AO", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Reflect", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Refract", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Indirect", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "IndexOB", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "IndexMA", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Mist", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Emit", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Environment",0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - - -/* note: this function is used for multilayer too, to ensure uniform - handling with BKE_image_get_ibuf() */ -static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *iuser) -{ - ImBuf *ibuf; - CompBuf *stackbuf; - int type; - - float *rect; - int alloc= FALSE; - - ibuf= BKE_image_get_ibuf(ima, iuser); - if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL)) { - return NULL; - } - - if (ibuf->rect_float == NULL) { - IMB_float_from_rect(ibuf); - } - - /* now we need a float buffer from the image with matching color management */ - /* XXX weak code, multilayer is excluded from this */ - if(ibuf->channels == 4 && ima->rr==NULL) { - if(rd->color_mgt_flag & R_COLOR_MANAGEMENT) { - if(ibuf->profile != IB_PROFILE_NONE) { - rect= ibuf->rect_float; - } - else { - rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image"); - srgb_to_linearrgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y); - alloc= TRUE; - } - } - else { - if(ibuf->profile == IB_PROFILE_NONE) { - rect= ibuf->rect_float; - } - else { - rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image"); - linearrgb_to_srgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y); - alloc= TRUE; - } - } - } - else { - /* non-rgba passes can't use color profiles */ - rect= ibuf->rect_float; - } - /* done coercing into the correct color management */ - - - type= ibuf->channels; - - if(rd->scemode & R_COMP_CROP) { - stackbuf= get_cropped_compbuf(&rd->disprect, rect, ibuf->x, ibuf->y, type); - if(alloc) - MEM_freeN(rect); - } - else { - /* we put imbuf copy on stack, cbuf knows rect is from other ibuf when freed! */ - stackbuf= alloc_compbuf(ibuf->x, ibuf->y, type, FALSE); - stackbuf->rect= rect; - stackbuf->malloc= alloc; - } - - /*code to respect the premul flag of images; I'm - not sure if this is a good idea for multilayer images, - since it never worked before for them. - if (type==CB_RGBA && ima->flag & IMA_DO_PREMUL) { - //premul the image - int i; - float *pixel = stackbuf->rect; - - for (i=0; ix*stackbuf->y; i++, pixel += 4) { - pixel[0] *= pixel[3]; - pixel[1] *= pixel[3]; - pixel[2] *= pixel[3]; - } - } - */ - return stackbuf; -} - -static CompBuf *node_composit_get_zimage(bNode *node, RenderData *rd) -{ - ImBuf *ibuf= BKE_image_get_ibuf((Image *)node->id, node->storage); - CompBuf *zbuf= NULL; - - if(ibuf && ibuf->zbuf_float) { - if(rd->scemode & R_COMP_CROP) { - zbuf= get_cropped_compbuf(&rd->disprect, ibuf->zbuf_float, ibuf->x, ibuf->y, CB_VAL); - } - else { - zbuf= alloc_compbuf(ibuf->x, ibuf->y, CB_VAL, 0); - zbuf->rect= ibuf->zbuf_float; - } - } - return zbuf; -} - -/* check if layer is available, returns pass buffer */ -static CompBuf *compbuf_multilayer_get(RenderData *rd, RenderLayer *rl, Image *ima, ImageUser *iuser, int passtype) -{ - RenderPass *rpass; - short index; - - for(index=0, rpass= rl->passes.first; rpass; rpass= rpass->next, index++) - if(rpass->passtype==passtype) - break; - - if(rpass) { - CompBuf *cbuf; - - iuser->pass= index; - BKE_image_multilayer_index(ima->rr, iuser); - cbuf= node_composit_get_image(rd, ima, iuser); - - return cbuf; - } - return NULL; -} - -static void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack **out, Image *ima, ImageUser *iuser) -{ - if(out[RRES_OUT_Z]->hasoutput) - out[RRES_OUT_Z]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_Z); - if(out[RRES_OUT_VEC]->hasoutput) - out[RRES_OUT_VEC]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_VECTOR); - if(out[RRES_OUT_NORMAL]->hasoutput) - out[RRES_OUT_NORMAL]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_NORMAL); - if(out[RRES_OUT_UV]->hasoutput) - out[RRES_OUT_UV]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_UV); - - if(out[RRES_OUT_RGBA]->hasoutput) - out[RRES_OUT_RGBA]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_RGBA); - if(out[RRES_OUT_DIFF]->hasoutput) - out[RRES_OUT_DIFF]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_DIFFUSE); - if(out[RRES_OUT_SPEC]->hasoutput) - out[RRES_OUT_SPEC]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_SPEC); - if(out[RRES_OUT_SHADOW]->hasoutput) - out[RRES_OUT_SHADOW]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_SHADOW); - if(out[RRES_OUT_AO]->hasoutput) - out[RRES_OUT_AO]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_AO); - if(out[RRES_OUT_REFLECT]->hasoutput) - out[RRES_OUT_REFLECT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_REFLECT); - if(out[RRES_OUT_REFRACT]->hasoutput) - out[RRES_OUT_REFRACT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_REFRACT); - if(out[RRES_OUT_INDIRECT]->hasoutput) - out[RRES_OUT_INDIRECT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDIRECT); - if(out[RRES_OUT_INDEXOB]->hasoutput) - out[RRES_OUT_INDEXOB]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXOB); - if(out[RRES_OUT_INDEXMA]->hasoutput) - out[RRES_OUT_INDEXMA]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXMA); - if(out[RRES_OUT_MIST]->hasoutput) - out[RRES_OUT_MIST]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_MIST); - if(out[RRES_OUT_EMIT]->hasoutput) - out[RRES_OUT_EMIT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_EMIT); - if(out[RRES_OUT_ENV]->hasoutput) - out[RRES_OUT_ENV]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_ENVIRONMENT); -} - - -static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) -{ - - /* image assigned to output */ - /* stack order input sockets: col, alpha */ - if(node->id) { - RenderData *rd= data; - Image *ima= (Image *)node->id; - ImageUser *iuser= (ImageUser *)node->storage; - CompBuf *stackbuf= NULL; - - /* first set the right frame number in iuser */ - BKE_image_user_calc_frame(iuser, rd->cfra, 0); - - /* force a load, we assume iuser index will be set OK anyway */ - if(ima->type==IMA_TYPE_MULTILAYER) - BKE_image_get_ibuf(ima, iuser); - - if(ima->type==IMA_TYPE_MULTILAYER && ima->rr) { - RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer); - - if(rl) { - out[0]->data= stackbuf= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_COMBINED); - - /* go over all layers */ - outputs_multilayer_get(rd, rl, out, ima, iuser); - } - } - else { - stackbuf= node_composit_get_image(rd, ima, iuser); - - if (stackbuf) { - /*respect image premul option*/ - if (stackbuf->type==CB_RGBA && ima->flag & IMA_DO_PREMUL) { - int i; - float *pixel; - - /*first duplicate stackbuf->rect, since it's just a pointer - to the source imbuf, and we don't want to change that.*/ - stackbuf->rect = MEM_dupallocN(stackbuf->rect); - - /* since stackbuf now has allocated memory, rather than just a pointer, - * mark it as allocated so it can be freed properly */ - stackbuf->malloc=1; - - /*premul the image*/ - pixel = stackbuf->rect; - for (i=0; ix*stackbuf->y; i++, pixel += 4) { - pixel[0] *= pixel[3]; - pixel[1] *= pixel[3]; - pixel[2] *= pixel[3]; - } - } - - /* put image on stack */ - out[0]->data= stackbuf; - - if(out[2]->hasoutput) - out[2]->data= node_composit_get_zimage(node, rd); - } - } - - /* alpha and preview for both types */ - if(stackbuf) { - if(out[1]->hasoutput) - out[1]->data= valbuf_from_rgbabuf(stackbuf, CHAN_A); - - generate_preview(data, node, stackbuf); - } - } -} - -static void node_composit_init_image(bNode* node) -{ - ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user"); - node->storage= iuser; - iuser->frames= 1; - iuser->sfra= 1; - iuser->fie_ima= 2; - iuser->ok= 1; -} - -void register_node_type_cmp_image(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS, - NULL, cmp_node_rlayers_out); - node_type_size(&ntype, 120, 80, 300); - node_type_init(&ntype, node_composit_init_image); - node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_image); - - nodeRegisterType(lb, &ntype); -} - - -/* **************** RENDER RESULT ******************** */ - -static CompBuf *compbuf_from_pass(RenderData *rd, RenderLayer *rl, int rectx, int recty, int passcode) -{ - float *fp= RE_RenderLayerGetPass(rl, passcode); - if(fp) { - CompBuf *buf; - int buftype= CB_VEC3; - - if(ELEM4(passcode, SCE_PASS_Z, SCE_PASS_INDEXOB, SCE_PASS_MIST, SCE_PASS_INDEXMA)) - buftype= CB_VAL; - else if(passcode==SCE_PASS_VECTOR) - buftype= CB_VEC4; - else if(ELEM(passcode, SCE_PASS_COMBINED, SCE_PASS_RGBA)) - buftype= CB_RGBA; - - if(rd->scemode & R_COMP_CROP) - buf= get_cropped_compbuf(&rd->disprect, fp, rectx, recty, buftype); - else { - buf= alloc_compbuf(rectx, recty, buftype, 0); - buf->rect= fp; - } - return buf; - } - return NULL; -} - -static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStack **out, int rectx, int recty) -{ - if(out[RRES_OUT_Z]->hasoutput) - out[RRES_OUT_Z]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_Z); - if(out[RRES_OUT_VEC]->hasoutput) - out[RRES_OUT_VEC]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_VECTOR); - if(out[RRES_OUT_NORMAL]->hasoutput) - out[RRES_OUT_NORMAL]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_NORMAL); - if(out[RRES_OUT_UV]->hasoutput) - out[RRES_OUT_UV]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_UV); - - if(out[RRES_OUT_RGBA]->hasoutput) - out[RRES_OUT_RGBA]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_RGBA); - if(out[RRES_OUT_DIFF]->hasoutput) - out[RRES_OUT_DIFF]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_DIFFUSE); - if(out[RRES_OUT_SPEC]->hasoutput) - out[RRES_OUT_SPEC]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_SPEC); - if(out[RRES_OUT_SHADOW]->hasoutput) - out[RRES_OUT_SHADOW]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_SHADOW); - if(out[RRES_OUT_AO]->hasoutput) - out[RRES_OUT_AO]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_AO); - if(out[RRES_OUT_REFLECT]->hasoutput) - out[RRES_OUT_REFLECT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_REFLECT); - if(out[RRES_OUT_REFRACT]->hasoutput) - out[RRES_OUT_REFRACT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_REFRACT); - if(out[RRES_OUT_INDIRECT]->hasoutput) - out[RRES_OUT_INDIRECT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDIRECT); - if(out[RRES_OUT_INDEXOB]->hasoutput) - out[RRES_OUT_INDEXOB]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDEXOB); - if(out[RRES_OUT_INDEXMA]->hasoutput) - out[RRES_OUT_INDEXMA]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_INDEXMA); - if(out[RRES_OUT_MIST]->hasoutput) - out[RRES_OUT_MIST]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_MIST); - if(out[RRES_OUT_EMIT]->hasoutput) - out[RRES_OUT_EMIT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_EMIT); - if(out[RRES_OUT_ENV]->hasoutput) - out[RRES_OUT_ENV]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_ENVIRONMENT); -} - -static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) -{ - Scene *sce= (Scene *)node->id; - Render *re= (sce)? RE_GetRender(sce->id.name): NULL; - RenderData *rd= data; - RenderResult *rr= NULL; - - if(re) - rr= RE_AcquireResultRead(re); - - if(rr) { - SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1); - if(srl) { - RenderLayer *rl= RE_GetRenderLayer(rr, srl->name); - if(rl && rl->rectf) { - CompBuf *stackbuf; - - /* we put render rect on stack, cbuf knows rect is from other ibuf when freed! */ - if(rd->scemode & R_COMP_CROP) - stackbuf= get_cropped_compbuf(&rd->disprect, rl->rectf, rr->rectx, rr->recty, CB_RGBA); - else { - stackbuf= alloc_compbuf(rr->rectx, rr->recty, CB_RGBA, 0); - stackbuf->rect= rl->rectf; - } - if(stackbuf==NULL) { - printf("Error; Preview Panel in UV Window returns zero sized image\n"); - } - else { - stackbuf->xof= rr->xof; - stackbuf->yof= rr->yof; - - /* put on stack */ - out[RRES_OUT_IMAGE]->data= stackbuf; - - if(out[RRES_OUT_ALPHA]->hasoutput) - out[RRES_OUT_ALPHA]->data= valbuf_from_rgbabuf(stackbuf, CHAN_A); - - node_composit_rlayers_out(rd, rl, out, rr->rectx, rr->recty); - - generate_preview(data, node, stackbuf); - } - } - } - } - - if(re) - RE_ReleaseResult(re); -} - - -void register_node_type_cmp_rlayers(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_R_LAYERS, "Render Layers", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS, - NULL, cmp_node_rlayers_out); - node_type_size(&ntype, 150, 100, 300); - node_type_exec(&ntype, node_composit_exec_rlayers); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_invert.c b/source/blender/nodes/intern/CMP_nodes/CMP_invert.c deleted file mode 100644 index 27b0324dfe0..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_invert.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_invert.c - * \ingroup cmpnodes - */ - -#include "../CMP_util.h" - -/* **************** INVERT ******************** */ -static bNodeSocketType cmp_node_invert_in[]= { - { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_invert_out[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_invert(bNode *node, float *out, float *in) -{ - if(node->custom1 & CMP_CHAN_RGB) { - out[0] = 1.0f - in[0]; - out[1] = 1.0f - in[1]; - out[2] = 1.0f - in[2]; - } else - VECCOPY(out, in); - - if(node->custom1 & CMP_CHAN_A) - out[3] = 1.0f - in[3]; - else - out[3] = in[3]; -} - -static void do_invert_fac(bNode *node, float *out, float *in, float *fac) -{ - float col[4], facm; - - do_invert(node, col, in); - - /* blend inverted result against original input with fac */ - facm = 1.0 - fac[0]; - - if(node->custom1 & CMP_CHAN_RGB) { - col[0] = fac[0]*col[0] + (facm*in[0]); - col[1] = fac[0]*col[1] + (facm*in[1]); - col[2] = fac[0]*col[2] + (facm*in[2]); - } - if(node->custom1 & CMP_CHAN_A) - col[3] = fac[0]*col[3] + (facm*in[3]); - - QUATCOPY(out, col); -} - -static void node_composit_exec_invert(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: fac, Image, Image */ - /* stack order out: Image */ - float *fac= in[0]->vec; - - if(out[0]->hasoutput==0) return; - - /* input no image? then only color operation */ - if(in[1]->data==NULL && in[0]->data==NULL) { - do_invert_fac(node, out[0]->vec, in[1]->vec, fac); - } - else { - /* make output size of first available input image, or then size of fac */ - CompBuf *cbuf= in[1]->data?in[1]->data:in[0]->data; - - /* if neither RGB or A toggled on, pass through */ - if (node->custom1 != 0) { - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - if (fac[0] < 1.0f || in[0]->data!=NULL) - composit2_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[0]->data, fac, do_invert_fac, CB_RGBA, CB_VAL); - else - composit1_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, do_invert, CB_RGBA); - out[0]->data= stackbuf; - return; - - } else { - out[0]->data = pass_on_compbuf(cbuf); - return; - } - } -} - -static void node_composit_init_invert(bNode *node) -{ - node->custom1 |= CMP_CHAN_RGB; -} - -/* custom1 = mix type */ -void register_node_type_cmp_invert(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_invert_in, cmp_node_invert_out); - node_type_size(&ntype, 120, 120, 140); - node_type_init(&ntype, node_composit_init_invert); - node_type_exec(&ntype, node_composit_exec_invert); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_lensdist.c b/source/blender/nodes/intern/CMP_nodes/CMP_lensdist.c deleted file mode 100644 index 3a005210c6a..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_lensdist.c +++ /dev/null @@ -1,207 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Alfredo de Greef (eeshlo) - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_lensdist.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -static bNodeSocketType cmp_node_lensdist_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Distort", 0.f, 0.f, 0.f, 0.f, -0.999f, 1.f}, - { SOCK_VALUE, 1, "Dispersion", 0.f, 0.f, 0.f, 0.f, 0.f, 1.f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_lensdist_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* assumes *dst is type RGBA */ -static void lensDistort(CompBuf *dst, CompBuf *src, float kr, float kg, float kb, int jit, int proj, int fit) -{ - int x, y, z; - const float cx = 0.5f*(float)dst->x, cy = 0.5f*(float)dst->y; - - if (proj) { - // shift - CompBuf *tsrc = dupalloc_compbuf(src); - - for (z=0; ztype; ++z) - IIR_gauss(tsrc, (kr+0.5f)*(kr+0.5f), z, 1); - kr *= 20.f; - - for (y=0; yy; y++) { - fRGB *colp = (fRGB*)&dst->rect[y*dst->x*dst->type]; - const float v = (y + 0.5f)/(float)dst->y; - - for (x=0; xx; x++) { - const float u = (x + 0.5f)/(float)dst->x; - - qd_getPixelLerpChan(tsrc, (u*dst->x + kr) - 0.5f, v*dst->y - 0.5f, 0, colp[x]); - if (tsrc->type == CB_VAL) - colp[x][1] = tsrc->rect[x + y*tsrc->x]; - else - colp[x][1] = tsrc->rect[(x + y*tsrc->x)*tsrc->type + 1]; - qd_getPixelLerpChan(tsrc, (u*dst->x - kr) - 0.5f, v*dst->y - 0.5f, 2, colp[x]+2); - - /* set alpha */ - colp[x][3]= 1.0f; - } - } - free_compbuf(tsrc); - } - else { - // Spherical - // Scale factor to make bottom/top & right/left sides fit in window after deform - // so in the case of pincushion (kn < 0), corners will be outside window. - // Now also optionally scales image such that black areas are not visible when distort factor is positive - // (makes distorted corners match window corners, but really only valid if mk<=0.5) - const float mk = MAX3(kr, kg, kb); - const float sc = (fit && (mk > 0.f)) ? (1.f/(1.f + 2.f*mk)) : (1.f/(1.f + mk)); - const float drg = 4.f*(kg - kr), dgb = 4.f*(kb - kg); - - kr *= 4.f, kg *= 4.f, kb *= 4.f; - - for (y=0; yy; y++) { - fRGB *colp = (fRGB*)&dst->rect[y*dst->x*dst->type]; - const float v = sc*((y + 0.5f) - cy)/cy; - - for (x=0; xx; x++) { - int dr = 0, dg = 0, db = 0; - float d, t, ln[6] = {0, 0, 0, 0, 0, 0}; - fRGB c1, tc = {0, 0, 0, 0}; - const float u = sc*((x + 0.5f) - cx)/cx; - int sta = 0, mid = 0, end = 0; - - if ((t = 1.f - kr*(u*u + v*v)) >= 0.f) { - d = 1.f/(1.f + sqrtf(t)); - ln[0] = (u*d + 0.5f)*dst->x - 0.5f, ln[1] = (v*d + 0.5f)*dst->y - 0.5f; - sta = 1; - } - if ((t = 1.f - kg*(u*u + v*v)) >= 0.f) { - d = 1.f/(1.f + sqrtf(t)); - ln[2] = (u*d + 0.5f)*dst->x - 0.5f, ln[3] = (v*d + 0.5f)*dst->y - 0.5f; - mid = 1; - } - if ((t = 1.f - kb*(u*u + v*v)) >= 0.f) { - d = 1.f/(1.f + sqrtf(t)); - ln[4] = (u*d + 0.5f)*dst->x - 0.5f, ln[5] = (v*d + 0.5f)*dst->y - 0.5f; - end = 1; - } - - if (sta && mid && end) { - // RG - const int dx = ln[2] - ln[0], dy = ln[3] - ln[1]; - const float dsf = sqrtf(dx*dx + dy*dy) + 1.f; - const int ds = (int)(jit ? ((dsf < 4.f) ? 2.f : sqrtf(dsf)) : dsf); - const float sd = 1.f/(float)ds; - - for (z=0; zx - 0.5f, (v*d + 0.5f)*dst->y - 0.5f, c1); - if (src->type == CB_VAL) c1[1] = c1[2] = c1[0]; - tc[0] += (1.f-tz)*c1[0], tc[1] += tz*c1[1]; - dr++, dg++; - } - // GB - { - const int dx = ln[4] - ln[2], dy = ln[5] - ln[3]; - const float dsf = sqrtf(dx*dx + dy*dy) + 1.f; - const int ds = (int)(jit ? ((dsf < 4.f) ? 2.f : sqrtf(dsf)) : dsf); - const float sd = 1.f/(float)ds; - - for (z=0; zx - 0.5f, (v*d + 0.5f)*dst->y - 0.5f, c1); - if (src->type == CB_VAL) c1[1] = c1[2] = c1[0]; - tc[1] += (1.f-tz)*c1[1], tc[2] += tz*c1[2]; - dg++, db++; - } - } - } - - if (dr) colp[x][0] = 2.f*tc[0] / (float)dr; - if (dg) colp[x][1] = 2.f*tc[1] / (float)dg; - if (db) colp[x][2] = 2.f*tc[2] / (float)db; - - /* set alpha */ - colp[x][3]= 1.0f; - } - } - } -} - - -static void node_composit_exec_lensdist(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf *new, *img = in[0]->data; - NodeLensDist *nld = node->storage; - const float k = MAX2(MIN2(in[1]->vec[0], 1.f), -0.999f); - // smaller dispersion range for somewhat more control - const float d = 0.25f*MAX2(MIN2(in[2]->vec[0], 1.f), 0.f); - const float kr = MAX2(MIN2((k+d), 1.f), -0.999f), kb = MAX2(MIN2((k-d), 1.f), -0.999f); - - if ((img==NULL) || (out[0]->hasoutput==0)) return; - - new = alloc_compbuf(img->x, img->y, CB_RGBA, 1); - - lensDistort(new, img, (nld->proj ? d : kr), k, kb, nld->jit, nld->proj, nld->fit); - - out[0]->data = new; -} - - -static void node_composit_init_lensdist(bNode* node) -{ - NodeLensDist *nld = MEM_callocN(sizeof(NodeLensDist), "node lensdist data"); - nld->jit = nld->proj = nld->fit = 0; - node->storage = nld; -} - - -void register_node_type_cmp_lensdist(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_LENSDIST, "Lens Distortion", NODE_CLASS_DISTORT, NODE_OPTIONS, - cmp_node_lensdist_in, cmp_node_lensdist_out); - node_type_size(&ntype, 150, 120, 200); - node_type_init(&ntype, node_composit_init_lensdist); - node_type_storage(&ntype, "NodeLensDist", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_lensdist); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c b/source/blender/nodes/intern/CMP_nodes/CMP_levels.c deleted file mode 100644 index 2c9f7d97f09..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c +++ /dev/null @@ -1,350 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Bob Holcomb. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_levels.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** LEVELS ******************** */ -static bNodeSocketType cmp_node_view_levels_in[]= { - { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_view_levels_out[]={ - {SOCK_VALUE, 0,"Mean",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {SOCK_VALUE, 0,"Std Dev",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static void rgb_tobw(float r, float g, float b, float* out) -{ - *out= r*0.35f + g*0.45f + b*0.2f; -} - -static void fill_bins(bNode* node, CompBuf* in, int* bins, int colorcor) -{ - float value[4]; - int ivalue=0; - int x,y; - - /*fill bins */ - for(y=0; yy; y++) { - for(x=0; xx; x++) { - - /* get the pixel */ - qd_getPixel(in, x, y, value); - - if(value[3] > 0.0) { /* don't count transparent pixels */ - switch(node->custom1) { - case 1: { /* all colors */ - if(colorcor) - linearrgb_to_srgb_v3_v3(&value[0],&value[0]); - rgb_tobw(value[0],value[1],value[2], &value[0]); - value[0]=value[0]*255; /* scale to 0-255 range */ - ivalue=(int)value[0]; - break; - } - case 2: { /* red channel */ - if(colorcor) - value[0]=linearrgb_to_srgb(value[0]); - value[0]=value[0]*255; /* scale to 0-255 range */ - ivalue=(int)value[0]; - break; - } - case 3: { /* green channel */ - if(colorcor) - value[1]=linearrgb_to_srgb(value[1]); - value[1]=value[1]*255; /* scale to 0-255 range */ - ivalue=(int)value[1]; - break; - } - case 4: /*blue channel */ - { - if(colorcor) - value[2]=linearrgb_to_srgb(value[2]); - value[2]=value[2]*255; /* scale to 0-255 range */ - ivalue=(int)value[2]; - break; - } - case 5: /* luminence */ - { - if(colorcor) - linearrgb_to_srgb_v3_v3(&value[0],&value[0]); - rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]); - value[0]=value[0]*255; /* scale to 0-255 range */ - ivalue=(int)value[0]; - break; - } - } /*end switch */ - - /*clip*/ - if(ivalue<0) ivalue=0; - if(ivalue>255) ivalue=255; - - /*put in the correct bin*/ - bins[ivalue]+=1; - } /*end if alpha */ - } - } -} - -static float brightness_mean(bNode* node, CompBuf* in) -{ - float sum=0.0; - int numPixels=0.0; - int x,y; - float value[4]; - - for(x=0; x< in->x; x++) { - for(y=0; y < in->y; y++) { - - /* get the pixel */ - qd_getPixel(in, x, y, value); - - if(value[3] > 0.0) { /* don't count transparent pixels */ - numPixels++; - switch(node->custom1) - { - case 1: - { - rgb_tobw(value[0],value[1],value[2], &value[0]); - sum+=value[0]; - break; - } - case 2: - { - sum+=value[0]; - break; - } - case 3: - { - sum+=value[1]; - break; - } - case 4: - { - sum+=value[2]; - break; - } - case 5: - { - rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]); - sum+=value[0]; - break; - } - } - } - } - } - - return sum/numPixels; -} - -static float brightness_standard_deviation(bNode* node, CompBuf* in, float mean) -{ - float sum=0.0; - int numPixels=0.0; - int x,y; - float value[4]; - - for(x=0; x< in->x; x++) { - for(y=0; y < in->y; y++) { - - /* get the pixel */ - qd_getPixel(in, x, y, value); - - if(value[3] > 0.0) { /* don't count transparent pixels */ - numPixels++; - switch(node->custom1) - { - case 1: - { - rgb_tobw(value[0],value[1],value[2], &value[0]); - sum+=(value[0]-mean)*(value[0]-mean); - break; - } - case 2: - { - sum+=value[0]; - sum+=(value[0]-mean)*(value[0]-mean); - break; - } - case 3: - { - sum+=value[1]; - sum+=(value[1]-mean)*(value[1]-mean); - break; - } - case 4: - { - sum+=value[2]; - sum+=(value[2]-mean)*(value[2]-mean); - break; - } - case 5: - { - rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]); - sum+=(value[0]-mean)*(value[0]-mean); - break; - } - } - } - } - } - - - return sqrt(sum/(float)(numPixels-1)); -} - -static void draw_histogram(bNode *node, CompBuf *out, int* bins) -{ - int x,y; - float color[4]; - float value; - int max; - - /* find max value */ - max=0; - for(x=0; x<256; x++) { - if(bins[x]>max) max=bins[x]; - } - - /*draw histogram in buffer */ - for(x=0; xx; x++) { - for(y=0;yy; y++) { - - /* get normalized value (0..255) */ - value=((float)bins[x]/(float)max)*255.0; - - if(y < (int)value) { /*if the y value is below the height of the bar for this line then draw with the color */ - switch (node->custom1) { - case 1: { /* draw in black */ - color[0]=0.0; color[1]=0.0; color[2]=0.0; color[3]=1.0; - break; - } - case 2: { /* draw in red */ - color[0]=1.0; color[1]=0.0; color[2]=0.0; color[3]=1.0; - break; - } - case 3: { /* draw in green */ - color[0]=0.0; color[1]=1.0; color[2]=0.0; color[3]=1.0; - break; - } - case 4: { /* draw in blue */ - color[0]=0.0; color[1]=0.0; color[2]=1.0; color[3]=1.0; - break; - } - case 5: { /* draw in white */ - color[0]=1.0; color[1]=1.0; color[2]=1.0; color[3]=1.0; - break; - } - } - } - else{ - color[0]=0.8; color[1]=0.8; color[2]=0.8; color[3]=1.0; - } - - /* set the color */ - qd_setPixel(out, x, y, color); - } - } -} - -static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf* cbuf; - CompBuf* histogram; - RenderData *rd=data; - float mean, std_dev; - int bins[256]; - int x; - - if(in[0]->hasinput==0) return; - if(in[0]->data==NULL) return; - - histogram=alloc_compbuf(256, 256, CB_RGBA, 1); - cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); - - /*initalize bins*/ - for(x=0; x<256; x++) { - bins[x]=0; - } - - /*fill bins */ - fill_bins(node, in[0]->data, bins, rd->color_mgt_flag & R_COLOR_MANAGEMENT); - - /* draw the histogram chart */ - draw_histogram(node, histogram, bins); - - /* calculate the average brightness and contrast */ - mean=brightness_mean(node, in[0]->data); - std_dev=brightness_standard_deviation(node, in[0]->data, mean); - - /* Printf debuging ;) - printf("Mean: %f\n", mean); - printf("Std Dev: %f\n", std_dev); - */ - - if(out[0]->hasoutput) - out[0]->vec[0]= mean; - if(out[1]->hasoutput) - out[1]->vec[0]= std_dev; - - generate_preview(data, node, histogram); - - if(cbuf!=in[0]->data) - free_compbuf(cbuf); - free_compbuf(histogram); -} - -static void node_composit_init_view_levels(bNode* node) -{ - node->custom1=1; /*All channels*/ -} - -void register_node_type_cmp_view_levels(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_VIEW_LEVELS, "Levels", NODE_CLASS_OUTPUT, NODE_OPTIONS|NODE_PREVIEW, - cmp_node_view_levels_in, cmp_node_view_levels_out); - node_type_size(&ntype, 140, 100, 320); - node_type_init(&ntype, node_composit_init_view_levels); - node_type_storage(&ntype, "ImageUser", NULL, NULL); - node_type_exec(&ntype, node_composit_exec_view_levels); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c deleted file mode 100644 index 34e58791932..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Bob Holcomb . - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* ******************* Luma Matte Node ********************************* */ -static bNodeSocketType cmp_node_luma_matte_in[]={ - {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static bNodeSocketType cmp_node_luma_matte_out[]={ - {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - {-1,0,""} -}; - -static void do_luma_matte(bNode *node, float *out, float *in) -{ - NodeChroma *c=(NodeChroma *)node->storage; - float alpha; - - alpha=0.0; - - /* test range*/ - if(in[0]>c->t1) { - alpha=1.0; - } - else if(in[0]t2){ - alpha=0.0; - } - else {/*blend */ - alpha=(in[0]-c->t2)/(c->t1-c->t2); - } - - /* don't make something that was more transparent less transparent */ - if (alphahasinput==0) return; - if(in[0]->data==NULL) return; - if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return; - - cbuf=typecheck_compbuf(in[0]->data, CB_RGBA); - - outbuf=dupalloc_compbuf(cbuf); - - composit1_pixel_processor(node, outbuf, cbuf, in[1]->vec, do_rgba_to_yuva, CB_RGBA); - composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_luma_matte, CB_RGBA); - composit1_pixel_processor(node, outbuf, outbuf, in[1]->vec, do_yuva_to_rgba, CB_RGBA); - - generate_preview(data, node, outbuf); - out[0]->data=outbuf; - if (out[1]->hasoutput) - out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A); - if(cbuf!=in[0]->data) - free_compbuf(cbuf); -} - -static void node_composit_init_luma_matte(bNode *node) -{ - NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma"); - node->storage=c; - c->t1= 1.0f; - c->t2= 0.0f; -} - -void register_node_type_cmp_luma_matte(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_luma_matte_in, cmp_node_luma_matte_out); - node_type_size(&ntype, 200, 80, 250); - node_type_init(&ntype, node_composit_init_luma_matte); - node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_luma_matte); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mapUV.c b/source/blender/nodes/intern/CMP_nodes/CMP_mapUV.c deleted file mode 100644 index 6b2c561b14a..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_mapUV.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_mapUV.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** Map UV ******************** */ - -static bNodeSocketType cmp_node_mapuv_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, "UV", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_mapuv_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* foreach UV, use these values to read in cbuf and write to stackbuf */ -/* stackbuf should be zeroed */ -static void do_mapuv(CompBuf *stackbuf, CompBuf *cbuf, CompBuf *uvbuf, float threshold) -{ - ImBuf *ibuf; - float *out= stackbuf->rect, *uv, *uvnext, *uvprev; - float dx, dy, alpha; - int x, y, sx, sy, row= 3*stackbuf->x; - - /* ibuf needed for sampling */ - ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); - ibuf->rect_float= cbuf->rect; - - /* vars for efficient looping */ - uv= uvbuf->rect; - uvnext= uv+row; - uvprev= uv-row; - sx= stackbuf->x; - sy= stackbuf->y; - - for(y=0; y0 && x0 && y 0.20f) dx= 0.20f; - if(dy > 0.20f) dy= 0.20f; - - ibuf_sample(ibuf, uv[0], uv[1], dx, dy, out); - /* premul */ - if(alpha<1.0f) { - out[0]*= alpha; - out[1]*= alpha; - out[2]*= alpha; - out[3]*= alpha; - } - } - } - } - } - - IMB_freeImBuf(ibuf); -} - - -static void node_composit_exec_mapuv(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - if(out[0]->hasoutput==0) - return; - - if(in[0]->data && in[1]->data) { - CompBuf *cbuf= in[0]->data; - CompBuf *uvbuf= in[1]->data; - CompBuf *stackbuf; - - cbuf= typecheck_compbuf(cbuf, CB_RGBA); - uvbuf= typecheck_compbuf(uvbuf, CB_VEC3); - stackbuf= alloc_compbuf(uvbuf->x, uvbuf->y, CB_RGBA, 1); /* allocs */; - - do_mapuv(stackbuf, cbuf, uvbuf, 0.05f*(float)node->custom1); - - out[0]->data= stackbuf; - - if(cbuf!=in[0]->data) - free_compbuf(cbuf); - if(uvbuf!=in[1]->data) - free_compbuf(uvbuf); - } -} - -void register_node_type_cmp_mapuv(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT, NODE_OPTIONS, - cmp_node_mapuv_in, cmp_node_mapuv_out); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, node_composit_exec_mapuv); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c b/source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c deleted file mode 100644 index f14e0fbd804..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_mapValue.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** MAP VALUE ******************** */ -static bNodeSocketType cmp_node_map_value_in[]= { - { SOCK_VALUE, 1, "Value", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_map_value_out[]= { - { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_map_value(bNode *node, float *out, float *src) -{ - TexMapping *texmap= node->storage; - - out[0]= (src[0] + texmap->loc[0])*texmap->size[0]; - if(texmap->flag & TEXMAP_CLIP_MIN) - if(out[0]min[0]) - out[0]= texmap->min[0]; - if(texmap->flag & TEXMAP_CLIP_MAX) - if(out[0]>texmap->max[0]) - out[0]= texmap->max[0]; -} - -static void node_composit_exec_map_value(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: valbuf */ - /* stack order out: valbuf */ - if(out[0]->hasoutput==0) return; - - /* input no image? then only value operation */ - if(in[0]->data==NULL) { - do_map_value(node, out[0]->vec, in[0]->vec); - } - else { - /* make output size of input image */ - CompBuf *cbuf= in[0]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */ - - composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_map_value, CB_VAL); - - out[0]->data= stackbuf; - } -} - - -static void node_composit_init_map_value(bNode* node) -{ - node->storage= add_mapping(); -} - -void register_node_type_cmp_map_value(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_MAP_VALUE, "Map Value", NODE_CLASS_OP_VECTOR, NODE_OPTIONS, - cmp_node_map_value_in, cmp_node_map_value_out); - node_type_size(&ntype, 100, 60, 150); - node_type_init(&ntype, node_composit_init_map_value); - node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_map_value); - - nodeRegisterType(lb, &ntype); -} - - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_math.c b/source/blender/nodes/intern/CMP_nodes/CMP_math.c deleted file mode 100644 index b7a67f3563b..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_math.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_math.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** SCALAR MATH ******************** */ -static bNodeSocketType cmp_node_math_in[]= { - { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f}, - { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_math_out[]= { - { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_math(bNode *node, float *out, float *in, float *in2) -{ - switch(node->custom1) - { - case 0: /* Add */ - out[0]= in[0] + in2[0]; - break; - case 1: /* Subtract */ - out[0]= in[0] - in2[0]; - break; - case 2: /* Multiply */ - out[0]= in[0] * in2[0]; - break; - case 3: /* Divide */ - { - if(in2[0]==0) /* We don't want to divide by zero. */ - out[0]= 0.0; - else - out[0]= in[0] / in2[0]; - } - break; - case 4: /* Sine */ - out[0]= sin(in[0]); - break; - case 5: /* Cosine */ - out[0]= cos(in[0]); - break; - case 6: /* Tangent */ - out[0]= tan(in[0]); - break; - case 7: /* Arc-Sine */ - { - /* Can't do the impossible... */ - if(in[0] <= 1 && in[0] >= -1 ) - out[0]= asin(in[0]); - else - out[0]= 0.0; - } - break; - case 8: /* Arc-Cosine */ - { - /* Can't do the impossible... */ - if( in[0] <= 1 && in[0] >= -1 ) - out[0]= acos(in[0]); - else - out[0]= 0.0; - } - break; - case 9: /* Arc-Tangent */ - out[0]= atan(in[0]); - break; - case 10: /* Power */ - { - /* Only raise negative numbers by full integers */ - if( in[0] >= 0 ) { - out[0]= pow(in[0], in2[0]); - } else { - float y_mod_1 = fmod(in2[0], 1); - /* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */ - if (y_mod_1 > 0.999 || y_mod_1 < 0.001) { - out[0]= pow(in[0], floor(in2[0] + 0.5)); - } else { - out[0] = 0.0; - } - } - } - break; - case 11: /* Logarithm */ - { - /* Don't want any imaginary numbers... */ - if( in[0] > 0 && in2[0] > 0 ) - out[0]= log(in[0]) / log(in2[0]); - else - out[0]= 0.0; - } - break; - case 12: /* Minimum */ - { - if( in[0] < in2[0] ) - out[0]= in[0]; - else - out[0]= in2[0]; - } - break; - case 13: /* Maximum */ - { - if( in[0] > in2[0] ) - out[0]= in[0]; - else - out[0]= in2[0]; - } - break; - case 14: /* Round */ - { - /* round by the second value */ - if( in2[0] != 0.0f ) - out[0]= floorf(in[0] / in2[0] + 0.5f) * in2[0]; - else - out[0]= floorf(in[0] + 0.5f); - - } - break; - case 15: /* Less Than */ - { - if( in[0] < in2[0] ) - out[0]= 1.0f; - else - out[0]= 0.0f; - } - break; - case 16: /* Greater Than */ - { - if( in[0] > in2[0] ) - out[0]= 1.0f; - else - out[0]= 0.0f; - } - break; - } -} - -static void node_composit_exec_math(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf *cbuf=in[0]->data; - CompBuf *cbuf2=in[1]->data; - CompBuf *stackbuf; - - /* check for inputs and outputs for early out*/ - if(out[0]->hasoutput==0) return; - - /* no image-color operation */ - if(in[0]->data==NULL && in[1]->data==NULL) { - do_math(node, out[0]->vec, in[0]->vec, in[1]->vec); - return; - } - - /*create output based on first input */ - if(cbuf) { - stackbuf=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); - } - /* and if it doesn't exist use the second input since we - know that one of them must exist at this point*/ - else { - stackbuf=alloc_compbuf(cbuf2->x, cbuf2->y, CB_VAL, 1); - } - - /* operate in case there's valid size */ - composit2_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, do_math, CB_VAL, CB_VAL); - out[0]->data= stackbuf; -} - -void register_node_type_cmp_math(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_math_in, cmp_node_math_out); - node_type_size(&ntype, 120, 110, 160); - node_type_label(&ntype, node_math_label); - node_type_exec(&ntype, node_composit_exec_math); - - nodeRegisterType(lb, &ntype); -} - - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c b/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c deleted file mode 100644 index d2454b37c29..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_mixrgb.c - * \ingroup cmpnodes - */ - -#include "../CMP_util.h" - -/* **************** MIX RGB ******************** */ -static bNodeSocketType cmp_node_mix_rgb_in[]= { - { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f}, - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_mix_rgb_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_mix_rgb(bNode *node, float *out, float *in1, float *in2, float *fac) -{ - float col[3]; - - VECCOPY(col, in1); - if(node->custom2) - ramp_blend(node->custom1, col, col+1, col+2, in2[3]*fac[0], in2); - else - ramp_blend(node->custom1, col, col+1, col+2, fac[0], in2); - VECCOPY(out, col); - out[3]= in1[3]; -} - -static void node_composit_exec_mix_rgb(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: fac, Image, Image */ - /* stack order out: Image */ - float *fac= in[0]->vec; - - if(out[0]->hasoutput==0) return; - - /* input no image? then only color operation */ - if(in[1]->data==NULL && in[2]->data==NULL) { - do_mix_rgb(node, out[0]->vec, in[1]->vec, in[2]->vec, fac); - } - else { - /* make output size of first available input image */ - CompBuf *cbuf= in[1]->data?in[1]->data:in[2]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - composit3_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, in[0]->data, fac, do_mix_rgb, CB_RGBA, CB_RGBA, CB_VAL); - - out[0]->data= stackbuf; - - generate_preview(data, node, out[0]->data); - } -} - -/* custom1 = mix type */ -void register_node_type_cmp_mix_rgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_mix_rgb_in, cmp_node_mix_rgb_out); - node_type_size(&ntype, 110, 60, 120); - node_type_label(&ntype, node_blend_label); - node_type_exec(&ntype, node_composit_exec_mix_rgb); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_normal.c b/source/blender/nodes/intern/CMP_nodes/CMP_normal.c deleted file mode 100644 index f53d3041947..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_normal.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_normal.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** NORMAL ******************** */ -static bNodeSocketType cmp_node_normal_in[]= { - { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType cmp_node_normal_out[]= { - { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_VALUE, 0, "Dot", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_normal(bNode *node, float *out, float *in) -{ - bNodeSocket *sock= node->outputs.first; - float *nor= sock->ns.vec; - - /* render normals point inside... the widget points outside */ - out[0]= -INPR(nor, in); -} - -/* generates normal, does dot product */ -static void node_composit_exec_normal(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - bNodeSocket *sock= node->outputs.first; - /* stack order input: normal */ - /* stack order output: normal, value */ - - /* input no image? then only vector op */ - if(in[0]->data==NULL) { - VECCOPY(out[0]->vec, sock->ns.vec); - /* render normals point inside... the widget points outside */ - out[1]->vec[0]= -INPR(out[0]->vec, in[0]->vec); - } - else if(out[1]->hasoutput) { - /* make output size of input image */ - CompBuf *cbuf= in[0]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */ - - composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_normal, CB_VEC3); - - out[1]->data= stackbuf; - } - - -} - -void register_node_type_cmp_normal(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS, - cmp_node_normal_in, cmp_node_normal_out); - node_type_size(&ntype, 100, 60, 200); - node_type_exec(&ntype, node_composit_exec_normal); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c b/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c deleted file mode 100644 index 22ebd924f09..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): gsr b3d, and a very minor edit from Robert Holcomb - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_normalize.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** NORMALIZE single channel, useful for Z buffer ******************** */ -static bNodeSocketType cmp_node_normalize_in[]= { - { SOCK_VALUE, 1, "Value", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_normalize_out[]= { - { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_normalize(bNode *UNUSED(node), float *out, float *src, float *min, float *mult) -{ - float res; - res = (src[0] - min[0]) * mult[0]; - if (res > 1.0f) { - out[0] = 1.0f; - } - else if (res < 0.0f) { - out[0] = 0.0f; - } - else { - out[0] = res; - } -} - -/* The code below assumes all data is inside range +- this, and that input buffer is single channel */ -#define BLENDER_ZMAX 10000.0f - -static void node_composit_exec_normalize(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: valbuf */ - /* stack order out: valbuf */ - if(out[0]->hasoutput==0) return; - - /* Input has no image buffer? Then pass the value */ - if(in[0]->data==NULL) { - QUATCOPY(out[0]->vec, in[0]->vec); - } - else { - float min = 1.0f+BLENDER_ZMAX; - float max = -1.0f-BLENDER_ZMAX; - float mult = 1.0f; - float *val; - /* make output size of input image */ - CompBuf *cbuf= in[0]->data; - int tot= cbuf->x*cbuf->y; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */ - - for (val = cbuf->rect; tot; tot--, val++) { - if ((*val > max) && (*val <= BLENDER_ZMAX)) { - max = *val; - } - if ((*val < min) && (*val >= -BLENDER_ZMAX)) { - min = *val; - } - } - /* In the rare case of flat buffer, which would cause a divide by 0, just pass the input to the output */ - if ((max-min) != 0.0f) { - mult = 1.0f/(max-min); - composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, NULL, &min, NULL, &mult, do_normalize, CB_VAL, CB_VAL, CB_VAL); - } else { - memcpy(stackbuf->rect, cbuf->rect, sizeof(float) * cbuf->x * cbuf->y); - } - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_normalize(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR, NODE_OPTIONS, - cmp_node_normalize_in, cmp_node_normalize_out); - node_type_size(&ntype, 100, 60, 150); - node_type_exec(&ntype, node_composit_exec_normalize); - node_type_storage(&ntype, "TexMapping", NULL, NULL); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c b/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c deleted file mode 100644 index 1d52e694ea9..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_outputFile.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** OUTPUT FILE ******************** */ -static bNodeSocketType cmp_node_output_file_in[]= { - { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Z", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) -{ - /* image assigned to output */ - /* stack order input sockets: col, alpha */ - - if(in[0]->data) { - RenderData *rd= data; - NodeImageFile *nif= node->storage; - if(nif->sfra!=nif->efra && (rd->cfrasfra || rd->cfra>nif->efra)) { - return; /* BAIL OUT RETURN */ - } - else if (!G.rendering) { - /* only output files when rendering a sequence - - * otherwise, it overwrites the output files just - * scrubbing through the timeline when the compositor updates */ - return; - } else { - CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); - ImBuf *ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); - char string[256]; - - ibuf->rect_float= cbuf->rect; - ibuf->dither= rd->dither_intensity; - - if (rd->color_mgt_flag & R_COLOR_MANAGEMENT) - ibuf->profile = IB_PROFILE_LINEAR_RGB; - - if(in[1]->data) { - CompBuf *zbuf= in[1]->data; - if(zbuf->type==CB_VAL && zbuf->x==cbuf->x && zbuf->y==cbuf->y) { - nif->subimtype|= R_OPENEXR_ZBUF; - ibuf->zbuf_float= zbuf->rect; - } - } - - BKE_makepicstring(string, nif->name, rd->cfra, nif->imtype, (rd->scemode & R_EXTENSION), TRUE); - - if(0 == BKE_write_ibuf(ibuf, string, nif->imtype, nif->subimtype, nif->imtype==R_OPENEXR?nif->codec:nif->quality)) - printf("Cannot save Node File Output to %s\n", string); - else - printf("Saved: %s\n", string); - - IMB_freeImBuf(ibuf); - - generate_preview(data, node, cbuf); - - if(in[0]->data != cbuf) - free_compbuf(cbuf); - } - } -} - -static void node_composit_init_output_file(bNode *node) -{ - Scene *scene= (Scene *)node->id; - NodeImageFile *nif= MEM_callocN(sizeof(NodeImageFile), "node image file"); - node->storage= nif; - - if(scene) { - BLI_strncpy(nif->name, scene->r.pic, sizeof(nif->name)); - nif->imtype= scene->r.imtype; - nif->subimtype= scene->r.subimtype; - nif->quality= scene->r.quality; - nif->sfra= scene->r.sfra; - nif->efra= scene->r.efra; - } -} - -void register_node_type_cmp_output_file(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_OUTPUT_FILE, "File Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_output_file_in, NULL); - node_type_size(&ntype, 140, 80, 300); - node_type_init(&ntype, node_composit_init_output_file); - node_type_storage(&ntype, "NodeImageFile", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_output_file); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_premulkey.c b/source/blender/nodes/intern/CMP_nodes/CMP_premulkey.c deleted file mode 100644 index 15d2ac25180..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_premulkey.c +++ /dev/null @@ -1,78 +0,0 @@ -/* -* $Id$ -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* The Original Code is Copyright (C) 2006 Blender Foundation. -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** - -*/ - -/** \file blender/nodes/intern/CMP_nodes/CMP_premulkey.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** Premul and Key Alpha Convert ******************** */ - -static bNodeSocketType cmp_node_premulkey_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_premulkey_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_premulkey(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - if(out[0]->hasoutput==0) - return; - - if(in[0]->data) { - CompBuf *stackbuf, *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); - - stackbuf= dupalloc_compbuf(cbuf); - premul_compbuf(stackbuf, node->custom1 == 1); - - out[0]->data = stackbuf; - if(cbuf != in[0]->data) - free_compbuf(cbuf); - } -} - -void register_node_type_cmp_premulkey(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_premulkey_in, cmp_node_premulkey_out); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, node_composit_exec_premulkey); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_rgb.c b/source/blender/nodes/intern/CMP_nodes/CMP_rgb.c deleted file mode 100644 index 36b7988c4e0..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_rgb.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_rgb.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** RGB ******************** */ -static bNodeSocketType cmp_node_rgb_out[]= { - { SOCK_RGBA, 0, "RGBA", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) -{ - bNodeSocket *sock= node->outputs.first; - - QUATCOPY(out[0]->vec, sock->ns.vec); -} - -void register_node_type_cmp_rgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS, - NULL, cmp_node_rgb_out); - node_type_size(&ntype, 140, 80, 140); - node_type_exec(&ntype, node_composit_exec_rgb); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c b/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c deleted file mode 100644 index eccac4f0e6d..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_rotate.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** Rotate ******************** */ - -static bNodeSocketType cmp_node_rotate_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Degr", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_rotate_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* only supports RGBA nodes now */ -static void node_composit_exec_rotate(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - - if(out[0]->hasoutput==0) - return; - - if(in[0]->data) { - CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* note, this returns zero'd image */ - float rad, u, v, s, c, centx, centy, miny, maxy, minx, maxx; - int x, y, yo, xo; - ImBuf *ibuf, *obuf; - - rad= (M_PI*in[1]->vec[0])/180.0f; - - s= sin(rad); - c= cos(rad); - centx= cbuf->x/2; - centy= cbuf->y/2; - - minx= -centx; - maxx= -centx + (float)cbuf->x; - miny= -centy; - maxy= -centy + (float)cbuf->y; - - - ibuf=IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); - obuf=IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0); - - if(ibuf && obuf){ - ibuf->rect_float=cbuf->rect; - obuf->rect_float=stackbuf->rect; - - for(y=miny; ycustom1) { - case 0: - neareast_interpolation(ibuf, obuf, u, v, xo, yo); - break ; - case 1: - bilinear_interpolation(ibuf, obuf, u, v, xo, yo); - break; - case 2: - bicubic_interpolation(ibuf, obuf, u, v, xo, yo); - break; - } - - } - } - - /* rotate offset vector too, but why negative rad, ehh?? Has to be replaced with [3][3] matrix once (ton) */ - s= sin(-rad); - c= cos(-rad); - centx= (float)cbuf->xof; centy= (float)cbuf->yof; - stackbuf->xof= (int)( c*centx + s*centy); - stackbuf->yof= (int)(-s*centx + c*centy); - - IMB_freeImBuf(ibuf); - IMB_freeImBuf(obuf); - } - - /* pass on output and free */ - out[0]->data= stackbuf; - if(cbuf!=in[0]->data) { - free_compbuf(cbuf); - } - } -} - -static void node_composit_init_rotate(bNode *node) -{ - node->custom1= 1; /* Bilinear Filter*/ -} - -void register_node_type_cmp_rotate(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS, - cmp_node_rotate_in, cmp_node_rotate_out); - node_type_size(&ntype, 140, 100, 320); - node_type_init(&ntype, node_composit_init_rotate); - node_type_exec(&ntype, node_composit_exec_rotate); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c b/source/blender/nodes/intern/CMP_nodes/CMP_scale.c deleted file mode 100644 index b6030cc5a5f..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_scale.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** Scale ******************** */ - -#define CMP_SCALE_MAX 12000 - -static bNodeSocketType cmp_node_scale_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "X", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, CMP_SCALE_MAX}, - { SOCK_VALUE, 1, "Y", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, CMP_SCALE_MAX}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_scale_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* only supports RGBA nodes now */ -/* node->custom1 stores if input values are absolute or relative scale */ -static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - if(out[0]->hasoutput==0) - return; - - if(in[0]->data) { - RenderData *rd= data; - CompBuf *stackbuf, *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); - ImBuf *ibuf; - int newx, newy; - - if(node->custom1==CMP_SCALE_RELATIVE) { - newx= MAX2((int)(in[1]->vec[0]*cbuf->x), 1); - newy= MAX2((int)(in[2]->vec[0]*cbuf->y), 1); - } - else if(node->custom1==CMP_SCALE_SCENEPERCENT) { - newx = cbuf->x * (rd->size / 100.0f); - newy = cbuf->y * (rd->size / 100.0f); - } - else if (node->custom1==CMP_SCALE_RENDERPERCENT) { - newx= (rd->xsch * rd->size)/100; - newy= (rd->ysch * rd->size)/100; - } else { /* CMP_SCALE_ABSOLUTE */ - newx= MAX2((int)in[1]->vec[0], 1); - newy= MAX2((int)in[2]->vec[0], 1); - } - newx= MIN2(newx, CMP_SCALE_MAX); - newy= MIN2(newy, CMP_SCALE_MAX); - - ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); - if(ibuf) { - ibuf->rect_float= cbuf->rect; - IMB_scaleImBuf(ibuf, newx, newy); - - if(ibuf->rect_float == cbuf->rect) { - /* no scaling happened. */ - stackbuf= pass_on_compbuf(in[0]->data); - } - else { - stackbuf= alloc_compbuf(newx, newy, CB_RGBA, 0); - stackbuf->rect= ibuf->rect_float; - stackbuf->malloc= 1; - } - - ibuf->rect_float= NULL; - ibuf->mall &= ~IB_rectfloat; - IMB_freeImBuf(ibuf); - - /* also do the translation vector */ - stackbuf->xof = (int)(((float)newx/(float)cbuf->x) * (float)cbuf->xof); - stackbuf->yof = (int)(((float)newy/(float)cbuf->y) * (float)cbuf->yof); - } - else { - stackbuf= dupalloc_compbuf(cbuf); - printf("Scaling to %dx%d failed\n", newx, newy); - } - - out[0]->data= stackbuf; - if(cbuf!=in[0]->data) - free_compbuf(cbuf); - } -} - -void register_node_type_cmp_scale(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS, - cmp_node_scale_in, cmp_node_scale_out); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, node_composit_exec_scale); - - nodeRegisterType(lb, &ntype); -} - - - - - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c deleted file mode 100644 index 87c4ed1dac0..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** SEPARATE HSVA ******************** */ -static bNodeSocketType cmp_node_sephsva_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_sephsva_out[]= { - { SOCK_VALUE, 0, "H", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "S", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "A", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_sephsva(bNode *UNUSED(node), float *out, float *in) -{ - float h, s, v; - - rgb_to_hsv(in[0], in[1], in[2], &h, &s, &v); - - out[0]= h; - out[1]= s; - out[2]= v; - out[3]= in[3]; -} - -static void node_composit_exec_sephsva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order out: bw channels */ - /* stack order in: col */ - - /* input no image? then only color operation */ - if(in[0]->data==NULL) { - float h, s, v; - - rgb_to_hsv(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &h, &s, &v); - - out[0]->vec[0] = h; - out[1]->vec[0] = s; - out[2]->vec[0] = v; - out[3]->vec[0] = in[0]->vec[3]; - } - else if ((out[0]->hasoutput) || (out[1]->hasoutput) || (out[2]->hasoutput) || (out[3]->hasoutput)) { - /* create new buffer so input buffer doesn't get corrupted */ - CompBuf *cbuf= dupalloc_compbuf(in[0]->data); - CompBuf *cbuf2= typecheck_compbuf(cbuf, CB_RGBA); - - /* convert the RGB stackbuf to an HSV representation */ - composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sephsva, CB_RGBA); - - /* separate each of those channels */ - if(out[0]->hasoutput) - out[0]->data= valbuf_from_rgbabuf(cbuf2, CHAN_R); - if(out[1]->hasoutput) - out[1]->data= valbuf_from_rgbabuf(cbuf2, CHAN_G); - if(out[2]->hasoutput) - out[2]->data= valbuf_from_rgbabuf(cbuf2, CHAN_B); - if(out[3]->hasoutput) - out[3]->data= valbuf_from_rgbabuf(cbuf2, CHAN_A); - - /*not used anymore */ - if(cbuf2!=cbuf) - free_compbuf(cbuf2); - free_compbuf(cbuf); - } -} - -void register_node_type_cmp_sephsva(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTOR, 0, - cmp_node_sephsva_in, cmp_node_sephsva_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_composit_exec_sephsva); - - nodeRegisterType(lb, &ntype); -} - - -/* **************** COMBINE HSVA ******************** */ -static bNodeSocketType cmp_node_combhsva_in[]= { - { SOCK_VALUE, 1, "H", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "S", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_combhsva_out[]= { - { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_comb_hsva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) -{ - float r,g,b; - hsv_to_rgb(in1[0], in2[0], in3[0], &r, &g, &b); - - out[0] = r; - out[1] = g; - out[2] = b; - out[3] = in4[0]; -} - -static void node_composit_exec_combhsva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order out: 1 rgba channels */ - /* stack order in: 4 value channels */ - - /* input no image? then only color operation */ - if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) { - out[0]->vec[0] = in[0]->vec[0]; - out[0]->vec[1] = in[1]->vec[0]; - out[0]->vec[2] = in[2]->vec[0]; - out[0]->vec[3] = in[3]->vec[0]; - } - else { - /* make output size of first available input image */ - CompBuf *cbuf; - CompBuf *stackbuf; - - /* allocate a CompBuf the size of the first available input */ - if (in[0]->data) cbuf = in[0]->data; - else if (in[1]->data) cbuf = in[1]->data; - else if (in[2]->data) cbuf = in[2]->data; - else cbuf = in[3]->data; - - stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, - in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, - do_comb_hsva, CB_VAL, CB_VAL, CB_VAL, CB_VAL); - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_combhsva(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_combhsva_in, cmp_node_combhsva_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_composit_exec_combhsva); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c deleted file mode 100644 index 11afd1eaaef..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** SEPARATE RGBA ******************** */ -static bNodeSocketType cmp_node_seprgba_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_seprgba_out[]= { - { SOCK_VALUE, 0, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "A", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_seprgba(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) -{ - /* stack order out: bw channels */ - /* stack order in: col */ - - /* input no image? then only color operation */ - if(in[0]->data==NULL) { - out[0]->vec[0] = in[0]->vec[0]; - out[1]->vec[0] = in[0]->vec[1]; - out[2]->vec[0] = in[0]->vec[2]; - out[3]->vec[0] = in[0]->vec[3]; - } - else { - /* make sure we get right rgba buffer */ - CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA); - - /* don't do any pixel processing, just copy the stack directly (faster, I presume) */ - if(out[0]->hasoutput) - out[0]->data= valbuf_from_rgbabuf(cbuf, CHAN_R); - if(out[1]->hasoutput) - out[1]->data= valbuf_from_rgbabuf(cbuf, CHAN_G); - if(out[2]->hasoutput) - out[2]->data= valbuf_from_rgbabuf(cbuf, CHAN_B); - if(out[3]->hasoutput) - out[3]->data= valbuf_from_rgbabuf(cbuf, CHAN_A); - - if(cbuf!=in[0]->data) - free_compbuf(cbuf); - - } -} - -void register_node_type_cmp_seprgba(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTOR, 0, - cmp_node_seprgba_in, cmp_node_seprgba_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_composit_exec_seprgba); - - nodeRegisterType(lb, &ntype); -} - - - -/* **************** COMBINE RGBA ******************** */ -static bNodeSocketType cmp_node_combrgba_in[]= { - { SOCK_VALUE, 1, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_combrgba_out[]= { - { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_combrgba(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) -{ - out[0] = in1[0]; - out[1] = in2[0]; - out[2] = in3[0]; - out[3] = in4[0]; -} - -static void node_composit_exec_combrgba(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order out: 1 rgba channels */ - /* stack order in: 4 value channels */ - - /* input no image? then only color operation */ - if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) { - out[0]->vec[0] = in[0]->vec[0]; - out[0]->vec[1] = in[1]->vec[0]; - out[0]->vec[2] = in[2]->vec[0]; - out[0]->vec[3] = in[3]->vec[0]; - } - else { - /* make output size of first available input image */ - CompBuf *cbuf; - CompBuf *stackbuf; - - /* allocate a CompBuf the size of the first available input */ - if (in[0]->data) cbuf = in[0]->data; - else if (in[1]->data) cbuf = in[1]->data; - else if (in[2]->data) cbuf = in[2]->data; - else cbuf = in[3]->data; - - stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, - in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, - do_combrgba, CB_VAL, CB_VAL, CB_VAL, CB_VAL); - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_combrgba(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_combrgba_in, cmp_node_combrgba_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_composit_exec_combrgba); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c deleted file mode 100644 index 81591602dae..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c +++ /dev/null @@ -1,313 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** SEPARATE YCCA ******************** */ -static bNodeSocketType cmp_node_sepycca_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_sepycca_out[]= { - { SOCK_VALUE, 0, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Cb", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Cr", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "A", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_sepycca_601(bNode *UNUSED(node), float *out, float *in) -{ - float y, cb, cr; - - rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_ITU_BT601); - - /*divided by 255 to normalize for viewing in */ - out[0]= y/255.0; - out[1]= cb/255.0; - out[2]= cr/255.0; - out[3]= in[3]; -} - -static void do_sepycca_709(bNode *UNUSED(node), float *out, float *in) -{ - float y, cb, cr; - - rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_ITU_BT709); - - /*divided by 255 to normalize for viewing in */ - out[0]= y/255.0; - out[1]= cb/255.0; - out[2]= cr/255.0; - out[3]= in[3]; -} - -static void do_sepycca_jfif(bNode *UNUSED(node), float *out, float *in) -{ - float y, cb, cr; - - rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_JFIF_0_255); - - /*divided by 255 to normalize for viewing in */ - out[0]= y/255.0; - out[1]= cb/255.0; - out[2]= cr/255.0; - out[3]= in[3]; -} - -static void node_composit_exec_sepycca(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* input no image? then only color operation */ - if(in[0]->data==NULL) { - float y, cb, cr; - - switch(node->custom1) - { - case 1: - rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_ITU_BT709); - break; - case 2: - rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_JFIF_0_255); - break; - case 0: - default: - rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_ITU_BT601); - break; - } - - /*divided by 255 to normalize for viewing in */ - out[0]->vec[0] = y/255.0; - out[1]->vec[0] = cb/255.0; - out[2]->vec[0] = cr/255.0; - out[3]->vec[0] = in[0]->vec[3]; - } - else if ((out[0]->hasoutput) || (out[1]->hasoutput) || (out[2]->hasoutput) || (out[3]->hasoutput)) { - /* make copy of buffer so input buffer doesn't get corrupted */ - CompBuf *cbuf= dupalloc_compbuf(in[0]->data); - CompBuf *cbuf2=typecheck_compbuf(cbuf, CB_RGBA); - - /* convert the RGB stackbuf to an HSV representation */ - switch(node->custom1) - { - case 1: - composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_709, CB_RGBA); - break; - case 2: - composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_jfif, CB_RGBA); - break; - case 0: - default: - composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_601, CB_RGBA); - break; - } - - /* separate each of those channels */ - if(out[0]->hasoutput) - out[0]->data= valbuf_from_rgbabuf(cbuf2, CHAN_R); - if(out[1]->hasoutput) - out[1]->data= valbuf_from_rgbabuf(cbuf2, CHAN_G); - if(out[2]->hasoutput) - out[2]->data= valbuf_from_rgbabuf(cbuf2, CHAN_B); - if(out[3]->hasoutput) - out[3]->data= valbuf_from_rgbabuf(cbuf2, CHAN_A); - - /*not used anymore */ - if(cbuf2!=cbuf) - free_compbuf(cbuf2); - free_compbuf(cbuf); - } -} - -void register_node_type_cmp_sepycca(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_sepycca_in, cmp_node_sepycca_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_composit_exec_sepycca); - - nodeRegisterType(lb, &ntype); -} - - - -/* **************** COMBINE YCCA ******************** */ -static bNodeSocketType cmp_node_combycca_in[]= { - { SOCK_VALUE, 1, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Cb", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Cr", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_combycca_out[]= { - { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_comb_ycca_601(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) -{ - float r,g,b; - float y, cb, cr; - - /*need to un-normalize the data*/ - y=in1[0]*255; - cb=in2[0]*255; - cr=in3[0]*255; - - ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_ITU_BT601); - - out[0] = r; - out[1] = g; - out[2] = b; - out[3] = in4[0]; -} - -static void do_comb_ycca_709(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) -{ - float r,g,b; - float y, cb, cr; - - /*need to un-normalize the data*/ - y=in1[0]*255; - cb=in2[0]*255; - cr=in3[0]*255; - - ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_ITU_BT709); - - out[0] = r; - out[1] = g; - out[2] = b; - out[3] = in4[0]; -} - -static void do_comb_ycca_jfif(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) -{ - float r,g,b; - float y, cb, cr; - - /*need to un-normalize the data*/ - y=in1[0]*255; - cb=in2[0]*255; - cr=in3[0]*255; - - ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_JFIF_0_255); - - out[0] = r; - out[1] = g; - out[2] = b; - out[3] = in4[0]; -} - -static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order out: 1 ycca channels */ - /* stack order in: 4 value channels */ - - /* input no image? then only color operation */ - if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) { - float y = in[0]->vec[0] * 255; - float cb = in[1]->vec[0] * 255; - float cr = in[2]->vec[0] * 255; - - switch(node->custom1) - { - case 1: - ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_ITU_BT709); - break; - case 2: - ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_JFIF_0_255); - break; - case 0: - default: - ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_ITU_BT601); - break; - } - - out[0]->vec[3] = in[3]->vec[0]; - } - else { - /* make output size of first available input image */ - CompBuf *cbuf; - CompBuf *stackbuf; - - /* allocate a CompBuf the size of the first available input */ - if (in[0]->data) cbuf = in[0]->data; - else if (in[1]->data) cbuf = in[1]->data; - else if (in[2]->data) cbuf = in[2]->data; - else cbuf = in[3]->data; - - stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - - switch(node->custom1) - { - case 1: - composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, - in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, - do_comb_ycca_709, CB_VAL, CB_VAL, CB_VAL, CB_VAL); - break; - - case 2: - composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, - in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, - do_comb_ycca_jfif, CB_VAL, CB_VAL, CB_VAL, CB_VAL); - break; - case 0: - default: - composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, - in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, - do_comb_ycca_601, CB_VAL, CB_VAL, CB_VAL, CB_VAL); - break; - } - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_combycca(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_combycca_in, cmp_node_combycca_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_composit_exec_combycca); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c deleted file mode 100644 index 8687e307df3..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** SEPARATE YUVA ******************** */ -static bNodeSocketType cmp_node_sepyuva_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_sepyuva_out[]= { - { SOCK_VALUE, 0, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "U", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "A", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_sepyuva(bNode *UNUSED(node), float *out, float *in) -{ - float y, u, v; - - rgb_to_yuv(in[0], in[1], in[2], &y, &u, &v); - - out[0]= y; - out[1]= u; - out[2]= v; - out[3]= in[3]; -} - -static void node_composit_exec_sepyuva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order out: bw channels */ - /* stack order in: col */ - - /* input no image? then only color operation */ - if(in[0]->data==NULL) { - float y, u, v; - - rgb_to_yuv(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &u, &v); - - out[0]->vec[0] = y; - out[1]->vec[0] = u; - out[2]->vec[0] = v; - out[3]->vec[0] = in[0]->vec[3]; - } - else if ((out[0]->hasoutput) || (out[1]->hasoutput) || (out[2]->hasoutput) || (out[3]->hasoutput)) { - /* make copy of buffer so input image doesn't get corrupted */ - CompBuf *cbuf= dupalloc_compbuf(in[0]->data); - CompBuf *cbuf2=typecheck_compbuf(cbuf, CB_RGBA); - - /* convert the RGB stackbuf to an YUV representation */ - composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepyuva, CB_RGBA); - - /* separate each of those channels */ - if(out[0]->hasoutput) - out[0]->data= valbuf_from_rgbabuf(cbuf2, CHAN_R); - if(out[1]->hasoutput) - out[1]->data= valbuf_from_rgbabuf(cbuf2, CHAN_G); - if(out[2]->hasoutput) - out[2]->data= valbuf_from_rgbabuf(cbuf2, CHAN_B); - if(out[3]->hasoutput) - out[3]->data= valbuf_from_rgbabuf(cbuf2, CHAN_A); - - /*not used anymore */ - if(cbuf2!=cbuf) - free_compbuf(cbuf2); - free_compbuf(cbuf); - } -} - -void register_node_type_cmp_sepyuva(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_SEPYUVA, "Separate YUVA", NODE_CLASS_CONVERTOR, 0, - cmp_node_sepyuva_in, cmp_node_sepyuva_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_composit_exec_sepyuva); - - nodeRegisterType(lb, &ntype); -} - - - -/* **************** COMBINE YUVA ******************** */ -static bNodeSocketType cmp_node_combyuva_in[]= { - { SOCK_VALUE, 1, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "U", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_combyuva_out[]= { - { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_comb_yuva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) -{ - float r,g,b; - yuv_to_rgb(in1[0], in2[0], in3[0], &r, &g, &b); - - out[0] = r; - out[1] = g; - out[2] = b; - out[3] = in4[0]; -} - -static void node_composit_exec_combyuva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order out: 1 rgba channels */ - /* stack order in: 4 value channels */ - - /* input no image? then only color operation */ - if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) { - out[0]->vec[0] = in[0]->vec[0]; - out[0]->vec[1] = in[1]->vec[0]; - out[0]->vec[2] = in[2]->vec[0]; - out[0]->vec[3] = in[3]->vec[0]; - } - else { - /* make output size of first available input image */ - CompBuf *cbuf; - CompBuf *stackbuf; - - /* allocate a CompBuf the size of the first available input */ - if (in[0]->data) cbuf = in[0]->data; - else if (in[1]->data) cbuf = in[1]->data; - else if (in[2]->data) cbuf = in[2]->data; - else cbuf = in[3]->data; - - stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, - in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, - do_comb_yuva, CB_VAL, CB_VAL, CB_VAL, CB_VAL); - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_combyuva(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_COMBYUVA, "Combine YUVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_combyuva_in, cmp_node_combyuva_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_composit_exec_combyuva); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_setalpha.c b/source/blender/nodes/intern/CMP_nodes/CMP_setalpha.c deleted file mode 100644 index bb8533a79f6..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_setalpha.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_setalpha.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** SET ALPHA ******************** */ -static bNodeSocketType cmp_node_setalpha_in[]= { - { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_setalpha_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_setalpha(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order out: RGBA image */ - /* stack order in: col, alpha */ - - /* input no image? then only color operation */ - if(in[0]->data==NULL && in[1]->data==NULL) { - out[0]->vec[0] = in[0]->vec[0]; - out[0]->vec[1] = in[0]->vec[1]; - out[0]->vec[2] = in[0]->vec[2]; - out[0]->vec[3] = in[1]->vec[0]; - } - else { - /* make output size of input image */ - CompBuf *cbuf= in[0]->data?in[0]->data:in[1]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - if(in[1]->data==NULL && in[1]->vec[0]==1.0f) { - /* pass on image */ - composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_copy_rgb, CB_RGBA); - } - else { - /* send an compbuf or a value to set as alpha - composit2_pixel_processor handles choosing the right one */ - composit2_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, do_copy_a_rgba, CB_RGBA, CB_VAL); - } - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_setalpha(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_setalpha_in, cmp_node_setalpha_out); - node_type_size(&ntype, 120, 40, 140); - node_type_exec(&ntype, node_composit_exec_setalpha); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c b/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c deleted file mode 100644 index 13cb3bcfed5..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_splitViewer.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** SPLIT VIEWER ******************** */ -static bNodeSocketType cmp_node_splitviewer_in[]= { - { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_copy_split_rgba(bNode *UNUSED(node), float *out, float *in1, float *in2, float *fac) -{ - if(*fac==0.0f) { - QUATCOPY(out, in1); - } - else { - QUATCOPY(out, in2); - } -} - -static void node_composit_exec_splitviewer(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) -{ - /* image assigned to output */ - /* stack order input sockets: image image */ - - if(in[0]->data==NULL || in[1]->data==NULL) - return; - - if(node->id && (node->flag & NODE_DO_OUTPUT)) { /* only one works on out */ - Image *ima= (Image *)node->id; - RenderData *rd= data; - ImBuf *ibuf; - CompBuf *cbuf, *buf1, *buf2, *mask; - int x, y; - float offset; - void *lock; - - buf1= typecheck_compbuf(in[0]->data, CB_RGBA); - buf2= typecheck_compbuf(in[1]->data, CB_RGBA); - - BKE_image_user_calc_frame(node->storage, rd->cfra, 0); - - /* always returns for viewer image, but we check nevertheless */ - ibuf= BKE_image_acquire_ibuf(ima, node->storage, &lock); - if(ibuf==NULL) { - printf("node_composit_exec_viewer error\n"); - BKE_image_release_ibuf(ima, lock); - return; - } - - /* free all in ibuf */ - imb_freerectImBuf(ibuf); - imb_freerectfloatImBuf(ibuf); - IMB_freezbuffloatImBuf(ibuf); - - /* make ibuf, and connect to ima */ - ibuf->x= buf1->x; - ibuf->y= buf1->y; - imb_addrectfloatImBuf(ibuf); - - ima->ok= IMA_OK_LOADED; - - /* output buf */ - cbuf= alloc_compbuf(buf1->x, buf1->y, CB_RGBA, 0); /* no alloc*/ - cbuf->rect= ibuf->rect_float; - - /* mask buf */ - mask= alloc_compbuf(buf1->x, buf1->y, CB_VAL, 1); - - - /* Check which offset mode is selected and limit offset if needed */ - if(node->custom2 == 0) { - offset = buf1->x / 100.0f * node->custom1; - CLAMP(offset, 0, buf1->x); - } - else { - offset = buf1->y / 100.0f * node->custom1; - CLAMP(offset, 0, buf1->y); - } - - if(node->custom2 == 0) { - for(y=0; yy; y++) { - float *fac= mask->rect + y*buf1->x; - for(x=offset; x>0; x--, fac++) - *fac= 1.0f; - } - } - else { - for(y=0; yrect + y*buf1->x; - for(x=buf1->x; x>0; x--, fac++) - *fac= 1.0f; - } - } - - composit3_pixel_processor(node, cbuf, buf1, in[0]->vec, buf2, in[1]->vec, mask, NULL, do_copy_split_rgba, CB_RGBA, CB_RGBA, CB_VAL); - - BKE_image_release_ibuf(ima, lock); - - generate_preview(data, node, cbuf); - free_compbuf(cbuf); - free_compbuf(mask); - - if(in[0]->data != buf1) - free_compbuf(buf1); - if(in[1]->data != buf2) - free_compbuf(buf2); - } -} - -static void node_composit_init_splitviewer(bNode* node) -{ - ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user"); - node->storage= iuser; - iuser->sfra= 1; - iuser->fie_ima= 2; - iuser->ok= 1; - node->custom1= 50; /* default 50% split */ -} - -void register_node_type_cmp_splitviewer(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_SPLITVIEWER, "SplitViewer", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS, - cmp_node_splitviewer_in, NULL); - node_type_size(&ntype, 140, 100, 320); - node_type_init(&ntype, node_composit_init_splitviewer); - node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_splitviewer); - - nodeRegisterType(lb, &ntype); -} - - - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c deleted file mode 100644 index 46e71b8b8e5..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_texture.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** TEXTURE ******************** */ -static bNodeSocketType cmp_node_texture_in[]= { - { SOCK_VECTOR, 1, "Offset", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f}, - { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 1.0f, -10.0f, 10.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_texture_out[]= { - { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA , 0, "Color", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* called without rect allocated */ -static void texture_procedural(CompBuf *cbuf, float *out, float xco, float yco) -{ - bNode *node= cbuf->node; - TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL}; - float vec[3], *size, nor[3]={0.0f, 0.0f, 0.0f}, col[4]; - int retval, type= cbuf->procedural_type; - - size= cbuf->procedural_size; - - vec[0]= size[0]*(xco + cbuf->procedural_offset[0]); - vec[1]= size[1]*(yco + cbuf->procedural_offset[1]); - vec[2]= size[2]*cbuf->procedural_offset[2]; - - retval= multitex_ext((Tex *)node->id, vec, NULL, NULL, 0, &texres); - - if(type==CB_VAL) { - if(texres.talpha) - col[0]= texres.ta; - else - col[0]= texres.tin; - } - else if(type==CB_RGBA) { - if(texres.talpha) - col[3]= texres.ta; - else - col[3]= texres.tin; - - if((retval & TEX_RGB)) { - col[0]= texres.tr; - col[1]= texres.tg; - col[2]= texres.tb; - } - else col[0]= col[1]= col[2]= col[3]; - } - else { - VECCOPY(col, nor); - } - - typecheck_compbuf_color(out, col, cbuf->type, cbuf->procedural_type); -} - -/* texture node outputs get a small rect, to make sure all other nodes accept it */ -/* only the pixel-processor nodes do something with it though */ -static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* outputs: value, color, normal */ - - if(node->id) { - RenderData *rd= data; - short sizex, sizey; - - /* first make the preview image */ - CompBuf *prevbuf= alloc_compbuf(140, 140, CB_RGBA, 1); /* alloc */ - - prevbuf->rect_procedural= texture_procedural; - prevbuf->node= node; - VECCOPY(prevbuf->procedural_offset, in[0]->vec); - VECCOPY(prevbuf->procedural_size, in[1]->vec); - prevbuf->procedural_type= CB_RGBA; - composit1_pixel_processor(node, prevbuf, prevbuf, out[0]->vec, do_copy_rgba, CB_RGBA); - - generate_preview(data, node, prevbuf); - free_compbuf(prevbuf); - - /* texture procedural buffer type doesnt work well, we now render a buffer in scene size */ - sizex = (rd->size*rd->xsch)/100; - sizey = (rd->size*rd->ysch)/100; - - if(out[0]->hasoutput) { - CompBuf *stackbuf= alloc_compbuf(sizex, sizey, CB_VAL, 1); /* alloc */ - - stackbuf->rect_procedural= texture_procedural; - stackbuf->node= node; - VECCOPY(stackbuf->procedural_offset, in[0]->vec); - VECCOPY(stackbuf->procedural_size, in[1]->vec); - stackbuf->procedural_type= CB_VAL; - composit1_pixel_processor(node, stackbuf, stackbuf, out[0]->vec, do_copy_value, CB_VAL); - stackbuf->rect_procedural= NULL; - - out[0]->data= stackbuf; - } - if(out[1]->hasoutput) { - CompBuf *stackbuf= alloc_compbuf(sizex, sizey, CB_RGBA, 1); /* alloc */ - - stackbuf->rect_procedural= texture_procedural; - stackbuf->node= node; - VECCOPY(stackbuf->procedural_offset, in[0]->vec); - VECCOPY(stackbuf->procedural_size, in[1]->vec); - stackbuf->procedural_type= CB_RGBA; - composit1_pixel_processor(node, stackbuf, stackbuf, out[0]->vec, do_copy_rgba, CB_RGBA); - stackbuf->rect_procedural= NULL; - - out[1]->data= stackbuf; - } - } -} - -void register_node_type_cmp_texture(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW, - cmp_node_texture_in, cmp_node_texture_out); - node_type_size(&ntype, 120, 80, 240); - node_type_exec(&ntype, node_composit_exec_texture); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c b/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c deleted file mode 100644 index f15811ec790..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Alfredo de Greef (eeshlo) - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_tonemap.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -static bNodeSocketType cmp_node_tonemap_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_tonemap_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - - -static float avgLogLum(CompBuf *src, float* auto_key, float* Lav, float* Cav) -{ - float lsum = 0; - int p = src->x*src->y; - fRGB* bc = (fRGB*)src->rect; - float avl, maxl = -1e10f, minl = 1e10f; - const float sc = 1.f/(src->x*src->y); - *Lav = 0.f; - while (p--) { - float L = 0.212671f*bc[0][0] + 0.71516f*bc[0][1] + 0.072169f*bc[0][2]; - *Lav += L; - fRGB_add(Cav, bc[0]); - lsum += (float)log((double)MAX2(L, 0.0) + 1e-5); - maxl = (L > maxl) ? L : maxl; - minl = (L < minl) ? L : minl; - bc++; - } - *Lav *= sc; - fRGB_mult(Cav, sc); - maxl = log((double)maxl + 1e-5); minl = log((double)minl + 1e-5f); avl = lsum*sc; - *auto_key = (maxl > minl) ? ((maxl - avl) / (maxl - minl)) : 1.f; - return exp((double)avl); -} - - -static void tonemap(NodeTonemap* ntm, CompBuf* dst, CompBuf* src) -{ - int x, y; - float dr, dg, db, al, igm = (ntm->gamma==0.f) ? 1 : (1.f / ntm->gamma); - float auto_key, Lav, Cav[3] = {0, 0, 0}; - - al = avgLogLum(src, &auto_key, &Lav, Cav); - al = (al == 0.f) ? 0.f : (ntm->key / al); - - if (ntm->type == 1) { - // Reinhard/Devlin photoreceptor - const float f = exp((double)-ntm->f); - const float m = (ntm->m > 0.f) ? ntm->m : (0.3f + 0.7f*pow((double)auto_key, 1.4)); - const float ic = 1.f - ntm->c, ia = 1.f - ntm->a; - if (ntm->m == 0.f) printf("tonemap node, M: %g\n", m); - for (y=0; yy; ++y) { - fRGB* sp = (fRGB*)&src->rect[y*src->x*src->type]; - fRGB* dp = (fRGB*)&dst->rect[y*src->x*src->type]; - for (x=0; xx; ++x) { - const float L = 0.212671f*sp[x][0] + 0.71516f*sp[x][1] + 0.072169f*sp[x][2]; - float I_l = sp[x][0] + ic*(L - sp[x][0]); - float I_g = Cav[0] + ic*(Lav - Cav[0]); - float I_a = I_l + ia*(I_g - I_l); - dp[x][0] /= (dp[x][0] + pow((double)f*I_a, (double)m)); - I_l = sp[x][1] + ic*(L - sp[x][1]); - I_g = Cav[1] + ic*(Lav - Cav[1]); - I_a = I_l + ia*(I_g - I_l); - dp[x][1] /= (dp[x][1] + pow((double)f*I_a,(double)m)); - I_l = sp[x][2] + ic*(L - sp[x][2]); - I_g = Cav[2] + ic*(Lav - Cav[2]); - I_a = I_l + ia*(I_g - I_l); - dp[x][2] /= (dp[x][2] + pow((double)f*I_a, (double)m)); - } - } - return; - } - - // Reinhard simple photographic tm (simplest, not using whitepoint var) - for (y=0; yy; y++) { - fRGB* sp = (fRGB*)&src->rect[y*src->x*src->type]; - fRGB* dp = (fRGB*)&dst->rect[y*src->x*src->type]; - for (x=0; xx; x++) { - fRGB_copy(dp[x], sp[x]); - fRGB_mult(dp[x], al); - dr = dp[x][0] + ntm->offset; - dg = dp[x][1] + ntm->offset; - db = dp[x][2] + ntm->offset; - dp[x][0] /= ((dr == 0.f) ? 1.f : dr); - dp[x][1] /= ((dg == 0.f) ? 1.f : dg); - dp[x][2] /= ((db == 0.f) ? 1.f : db); - if (igm != 0.f) { - dp[x][0] = pow((double)MAX2(dp[x][0], 0.), igm); - dp[x][1] = pow((double)MAX2(dp[x][1], 0.), igm); - dp[x][2] = pow((double)MAX2(dp[x][2], 0.), igm); - } - } - } -} - - -static void node_composit_exec_tonemap(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - CompBuf *new, *img = in[0]->data; - - if ((img==NULL) || (out[0]->hasoutput==0)) return; - - if (img->type != CB_RGBA) - img = typecheck_compbuf(img, CB_RGBA); - - new = dupalloc_compbuf(img); - - tonemap(node->storage, new, img); - - out[0]->data = new; - - if(img!=in[0]->data) - free_compbuf(img); -} - -static void node_composit_init_tonemap(bNode* node) -{ - NodeTonemap *ntm = MEM_callocN(sizeof(NodeTonemap), "node tonemap data"); - ntm->type = 1; - ntm->key = 0.18; - ntm->offset = 1; - ntm->gamma = 1; - ntm->f = 0; - ntm->m = 0; // actual value is set according to input - // default a of 1 works well with natural HDR images, but not always so for cgi. - // Maybe should use 0 or at least lower initial value instead - ntm->a = 1; - ntm->c = 0; - node->storage = ntm; -} - -void register_node_type_cmp_tonemap(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_tonemap_in, cmp_node_tonemap_out); - node_type_size(&ntype, 150, 120, 200); - node_type_init(&ntype, node_composit_init_tonemap); - node_type_storage(&ntype, "NodeTonemap", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_tonemap); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_translate.c b/source/blender/nodes/intern/CMP_nodes/CMP_translate.c deleted file mode 100644 index eb69523e7a9..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_translate.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_translate.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** Translate ******************** */ - -static bNodeSocketType cmp_node_translate_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "X", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f}, - { SOCK_VALUE, 1, "Y", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_translate_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_translate(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) -{ - if(in[0]->data) { - CompBuf *cbuf= in[0]->data; - CompBuf *stackbuf= pass_on_compbuf(cbuf); - - stackbuf->xof+= (int)floor(in[1]->vec[0]); - stackbuf->yof+= (int)floor(in[2]->vec[0]); - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_translate(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS, - cmp_node_translate_in, cmp_node_translate_out); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, node_composit_exec_translate); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c b/source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c deleted file mode 100644 index 1e1c8c61b46..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_valToRgb.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** VALTORGB ******************** */ -static bNodeSocketType cmp_node_valtorgb_in[]= { - { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_valtorgb_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_colorband_composit(bNode *node, float *out, float *in) -{ - do_colorband(node->storage, in[0], out); -} - -static void node_composit_exec_valtorgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: fac */ - /* stack order out: col, alpha */ - - if(out[0]->hasoutput==0 && out[1]->hasoutput==0) - return; - - if(node->storage) { - /* input no image? then only color operation */ - if(in[0]->data==NULL) { - do_colorband(node->storage, in[0]->vec[0], out[0]->vec); - } - else { - /* make output size of input image */ - CompBuf *cbuf= in[0]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - - composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_colorband_composit, CB_VAL); - - out[0]->data= stackbuf; - - if(out[1]->hasoutput) - out[1]->data= valbuf_from_rgbabuf(stackbuf, CHAN_A); - - } - } -} - -static void node_composit_init_valtorgb(bNode* node) -{ - node->storage= add_colorband(1); -} - -void register_node_type_cmp_valtorgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - cmp_node_valtorgb_in, cmp_node_valtorgb_out); - node_type_size(&ntype, 240, 200, 300); - node_type_init(&ntype, node_composit_init_valtorgb); - node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_valtorgb); - - nodeRegisterType(lb, &ntype); -} - - - -/* **************** RGBTOBW ******************** */ -static bNodeSocketType cmp_node_rgbtobw_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_rgbtobw_out[]= { - { SOCK_VALUE, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void do_rgbtobw(bNode *UNUSED(node), float *out, float *in) -{ - out[0]= in[0]*0.35f + in[1]*0.45f + in[2]*0.2f; -} - -static void node_composit_exec_rgbtobw(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order out: bw */ - /* stack order in: col */ - - if(out[0]->hasoutput==0) - return; - - /* input no image? then only color operation */ - if(in[0]->data==NULL) { - do_rgbtobw(node, out[0]->vec, in[0]->vec); - } - else { - /* make output size of input image */ - CompBuf *cbuf= in[0]->data; - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */ - - composit1_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, do_rgbtobw, CB_RGBA); - - out[0]->data= stackbuf; - } -} - -void register_node_type_cmp_rgbtobw(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0, - cmp_node_rgbtobw_in, cmp_node_rgbtobw_out); - node_type_size(&ntype, 80, 40, 120); - node_type_exec(&ntype, node_composit_exec_rgbtobw); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_value.c b/source/blender/nodes/intern/CMP_nodes/CMP_value.c deleted file mode 100644 index 46762065bb4..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_value.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_value.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - -/* **************** VALUE ******************** */ -static bNodeSocketType cmp_node_value_out[]= { - { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f}, - { -1, 0, "" } -}; - -static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) -{ - bNodeSocket *sock= node->outputs.first; - - out[0]->vec[0]= sock->ns.vec[0]; -} - -void register_node_type_cmp_value(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS, - NULL, cmp_node_value_out); - node_type_size(&ntype, 80, 40, 120); - node_type_exec(&ntype, node_composit_exec_value); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c b/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c deleted file mode 100644 index c43bfa2435a..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_vecBlur.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** VECTOR BLUR ******************** */ -static bNodeSocketType cmp_node_vecblur_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Z", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, "Speed", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_vecblur_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - - - -static void node_composit_exec_vecblur(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - NodeBlurData *nbd= node->storage; - CompBuf *new, *img= in[0]->data, *vecbuf= in[2]->data, *zbuf= in[1]->data; - - if(img==NULL || vecbuf==NULL || zbuf==NULL || out[0]->hasoutput==0) - return; - if(vecbuf->x!=img->x || vecbuf->y!=img->y) { - printf("ERROR: cannot do different sized vecbuf yet\n"); - return; - } - if(vecbuf->type!=CB_VEC4) { - printf("ERROR: input should be vecbuf\n"); - return; - } - if(zbuf->type!=CB_VAL) { - printf("ERROR: input should be zbuf\n"); - return; - } - if(zbuf->x!=img->x || zbuf->y!=img->y) { - printf("ERROR: cannot do different sized zbuf yet\n"); - return; - } - - /* allow the input image to be of another type */ - img= typecheck_compbuf(in[0]->data, CB_RGBA); - - new= dupalloc_compbuf(img); - - /* call special zbuffer version */ - RE_zbuf_accumulate_vecblur(nbd, img->x, img->y, new->rect, img->rect, vecbuf->rect, zbuf->rect); - - out[0]->data= new; - - if(img!=in[0]->data) - free_compbuf(img); -} - -static void node_composit_init_vecblur(bNode* node) -{ - NodeBlurData *nbd= MEM_callocN(sizeof(NodeBlurData), "node blur data"); - node->storage= nbd; - nbd->samples= 32; - nbd->fac= 1.0f; -} - -/* custom1: itterations, custom2: maxspeed (0 = nolimit) */ -void register_node_type_cmp_vecblur(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS, - cmp_node_vecblur_in, cmp_node_vecblur_out); - node_type_size(&ntype, 120, 80, 200); - node_type_init(&ntype, node_composit_init_vecblur); - node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_vecblur); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c b/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c deleted file mode 100644 index c4e719efbf9..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_viewer.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** VIEWER ******************** */ -static bNodeSocketType cmp_node_viewer_in[]= { - { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - - -static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) -{ - /* image assigned to output */ - /* stack order input sockets: col, alpha, z */ - - if(node->id && (node->flag & NODE_DO_OUTPUT)) { /* only one works on out */ - RenderData *rd= data; - Image *ima= (Image *)node->id; - ImBuf *ibuf; - CompBuf *cbuf, *tbuf; - int rectx, recty; - void *lock; - - BKE_image_user_calc_frame(node->storage, rd->cfra, 0); - - /* always returns for viewer image, but we check nevertheless */ - ibuf= BKE_image_acquire_ibuf(ima, node->storage, &lock); - if(ibuf==NULL) { - printf("node_composit_exec_viewer error\n"); - BKE_image_release_ibuf(ima, lock); - return; - } - - /* free all in ibuf */ - imb_freerectImBuf(ibuf); - imb_freerectfloatImBuf(ibuf); - IMB_freezbuffloatImBuf(ibuf); - - /* get size */ - tbuf= in[0]->data?in[0]->data:(in[1]->data?in[1]->data:in[2]->data); - if(tbuf==NULL) { - rectx= 320; recty= 256; - } - else { - rectx= tbuf->x; - recty= tbuf->y; - } - - /* make ibuf, and connect to ima */ - ibuf->x= rectx; - ibuf->y= recty; - imb_addrectfloatImBuf(ibuf); - - ima->ok= IMA_OK_LOADED; - - /* now we combine the input with ibuf */ - cbuf= alloc_compbuf(rectx, recty, CB_RGBA, 0); /* no alloc*/ - cbuf->rect= ibuf->rect_float; - - /* when no alpha, we can simply copy */ - if(in[1]->data==NULL) { - composit1_pixel_processor(node, cbuf, in[0]->data, in[0]->vec, do_copy_rgba, CB_RGBA); - } - else - composit2_pixel_processor(node, cbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, do_copy_a_rgba, CB_RGBA, CB_VAL); - - /* zbuf option */ - if(in[2]->data) { - CompBuf *zbuf= alloc_compbuf(rectx, recty, CB_VAL, 1); - ibuf->zbuf_float= zbuf->rect; - ibuf->mall |= IB_zbuffloat; - - composit1_pixel_processor(node, zbuf, in[2]->data, in[2]->vec, do_copy_value, CB_VAL); - - /* free compbuf, but not the rect */ - zbuf->malloc= 0; - free_compbuf(zbuf); - } - - BKE_image_release_ibuf(ima, lock); - - generate_preview(data, node, cbuf); - free_compbuf(cbuf); - - } - else if(in[0]->data) { - generate_preview(data, node, in[0]->data); - } -} - -static void node_composit_init_viewer(bNode* node) -{ - ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user"); - node->storage= iuser; - iuser->sfra= 1; - iuser->fie_ima= 2; - iuser->ok= 1; -} - -void register_node_type_cmp_viewer(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW, - cmp_node_viewer_in, NULL); - node_type_size(&ntype, 80, 60, 200); - node_type_init(&ntype, node_composit_init_viewer); - node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_composit_exec_viewer); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c b/source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c deleted file mode 100644 index 0fae0fcd4d5..00000000000 --- a/source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_nodes/CMP_zcombine.c - * \ingroup cmpnodes - */ - - -#include "../CMP_util.h" - - -/* **************** Z COMBINE ******************** */ - /* lazy coder note: node->custom2 is abused to send signal */ -static bNodeSocketType cmp_node_zcombine_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f}, - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f}, - { -1, 0, "" } -}; -static bNodeSocketType cmp_node_zcombine_out[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f}, - { -1, 0, "" } -}; - -static void do_zcombine(bNode *node, float *out, float *src1, float *z1, float *src2, float *z2) -{ - float alpha; - float malpha; - - if(*z1 <= *z2) { - if (node->custom1) { - // use alpha in combine operation - alpha= src1[3]; - malpha= 1.0f - alpha; - out[0]= malpha*src2[0] + alpha*src1[0]; - out[1]= malpha*src2[1] + alpha*src1[1]; - out[2]= malpha*src2[2] + alpha*src1[2]; - out[3]= malpha*src2[3] + alpha*src1[3]; - } - else { - // do combination based solely on z value - QUATCOPY(out, src1); - } - } - else { - if (node->custom1) { - // use alpha in combine operation - alpha= src2[3]; - malpha= 1.0f - alpha; - out[0]= malpha*src1[0] + alpha*src2[0]; - out[1]= malpha*src1[1] + alpha*src2[1]; - out[2]= malpha*src1[2] + alpha*src2[2]; - out[3]= malpha*src1[3] + alpha*src2[3]; - } - else { - // do combination based solely on z value - QUATCOPY(out, src1); - } - - if(node->custom2) - *z1= *z2; - } -} - -static void do_zcombine_mask(bNode *node, float *out, float *z1, float *z2) -{ - if(*z1 > *z2) { - *out= 1.0f; - if(node->custom2) - *z1= *z2; - } -} - -static void do_zcombine_add(bNode *node, float *out, float *col1, float *col2, float *acol) -{ - float alpha; - float malpha; - - if (node->custom1) { - // use alpha in combine operation, antialiased mask in used here just as hint for the z value - if (*acol>0.0f) { - alpha= col2[3]; - malpha= 1.0f - alpha; - - - out[0]= malpha*col1[0] + alpha*col2[0]; - out[1]= malpha*col1[1] + alpha*col2[1]; - out[2]= malpha*col1[2] + alpha*col2[2]; - out[3]= malpha*col1[3] + alpha*col2[3]; - } - else { - alpha= col1[3]; - malpha= 1.0f - alpha; - - - out[0]= malpha*col2[0] + alpha*col1[0]; - out[1]= malpha*col2[1] + alpha*col1[1]; - out[2]= malpha*col2[2] + alpha*col1[2]; - out[3]= malpha*col2[3] + alpha*col1[3]; - } - } - else { - // do combination based solely on z value but with antialiased mask - alpha = *acol; - malpha= 1.0f - alpha; - - out[0]= malpha*col1[0] + alpha*col2[0]; - out[1]= malpha*col1[1] + alpha*col2[1]; - out[2]= malpha*col1[2] + alpha*col2[2]; - out[3]= malpha*col1[3] + alpha*col2[3]; - } -} - -static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - RenderData *rd= data; - CompBuf *cbuf= in[0]->data; - CompBuf *zbuf; - - /* stack order in: col z col z */ - /* stack order out: col z */ - if(out[0]->hasoutput==0 && out[1]->hasoutput==0) - return; - - /* no input image; do nothing now */ - if(in[0]->data==NULL) { - return; - } - - if(out[1]->hasoutput) { - /* copy or make a buffer for for the first z value, here we write result in */ - if(in[1]->data) - zbuf= dupalloc_compbuf(in[1]->data); - else { - float *zval; - int tot= cbuf->x*cbuf->y; - - zbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); - for(zval= zbuf->rect; tot; tot--, zval++) - *zval= in[1]->vec[0]; - } - /* lazy coder hack */ - node->custom2= 1; - out[1]->data= zbuf; - } - else { - node->custom2= 0; - zbuf= in[1]->data; - } - - if(rd->scemode & R_FULL_SAMPLE) { - /* make output size of first input image */ - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); // allocs - - composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, zbuf, in[1]->vec, in[2]->data, in[2]->vec, - in[3]->data, in[3]->vec, do_zcombine, CB_RGBA, CB_VAL, CB_RGBA, CB_VAL); - - out[0]->data= stackbuf; - } - else { - /* make output size of first input image */ - CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - CompBuf *mbuf; - float *fp; - int x; - char *aabuf; - - - /* make a mask based on comparison, optionally write zvalue */ - mbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); - composit2_pixel_processor(node, mbuf, zbuf, in[1]->vec, in[3]->data, in[3]->vec, do_zcombine_mask, CB_VAL, CB_VAL); - - /* convert to char */ - aabuf= MEM_mallocN(cbuf->x*cbuf->y, "aa buf"); - fp= mbuf->rect; - for(x= cbuf->x*cbuf->y-1; x>=0; x--) - if(fp[x]==0.0f) aabuf[x]= 0; - else aabuf[x]= 255; - - antialias_tagbuf(cbuf->x, cbuf->y, aabuf); - - /* convert to float */ - fp= mbuf->rect; - for(x= cbuf->x*cbuf->y-1; x>=0; x--) - if(aabuf[x]>1) - fp[x]= (1.0f/255.0f)*(float)aabuf[x]; - - composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[2]->data, in[2]->vec, mbuf, NULL, - do_zcombine_add, CB_RGBA, CB_RGBA, CB_VAL); - /* free */ - free_compbuf(mbuf); - MEM_freeN(aabuf); - - out[0]->data= stackbuf; - } - -} - -void register_node_type_cmp_zcombine(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - cmp_node_zcombine_in, cmp_node_zcombine_out); - node_type_size(&ntype, 80, 40, 120); - node_type_exec(&ntype, node_composit_exec_zcombine); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/intern/CMP_util.c deleted file mode 100644 index a763f34a644..00000000000 --- a/source/blender/nodes/intern/CMP_util.c +++ /dev/null @@ -1,1413 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_util.c - * \ingroup nodes - */ - - -#include "CMP_util.h" - -CompBuf *alloc_compbuf(int sizex, int sizey, int type, int alloc) -{ - CompBuf *cbuf= MEM_callocN(sizeof(CompBuf), "compbuf"); - - cbuf->x= sizex; - cbuf->y= sizey; - cbuf->xrad= sizex/2; - cbuf->yrad= sizey/2; - - cbuf->type= type; - if(alloc) { - if(cbuf->type==CB_RGBA) - cbuf->rect= MEM_mapallocN(4*sizeof(float)*sizex*sizey, "compbuf RGBA rect"); - else if(cbuf->type==CB_VEC3) - cbuf->rect= MEM_mapallocN(3*sizeof(float)*sizex*sizey, "compbuf Vector3 rect"); - else if(cbuf->type==CB_VEC2) - cbuf->rect= MEM_mapallocN(2*sizeof(float)*sizex*sizey, "compbuf Vector2 rect"); - else - cbuf->rect= MEM_mapallocN(sizeof(float)*sizex*sizey, "compbuf Fac rect"); - cbuf->malloc= 1; - } - cbuf->disprect.xmin= 0; - cbuf->disprect.ymin= 0; - cbuf->disprect.xmax= sizex; - cbuf->disprect.ymax= sizey; - - return cbuf; -} - -CompBuf *dupalloc_compbuf(CompBuf *cbuf) -{ - CompBuf *dupbuf= alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1); - if(dupbuf) { - memmove(dupbuf->rect, cbuf->rect, cbuf->type*sizeof(float)*cbuf->x*cbuf->y); - - dupbuf->xof= cbuf->xof; - dupbuf->yof= cbuf->yof; - } - return dupbuf; -} - -/* instead of reference counting, we create a list */ -CompBuf *pass_on_compbuf(CompBuf *cbuf) -{ - CompBuf *dupbuf= (cbuf)? alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 0): NULL; - CompBuf *lastbuf; - - if(dupbuf) { - dupbuf->rect= cbuf->rect; - dupbuf->xof= cbuf->xof; - dupbuf->yof= cbuf->yof; - dupbuf->malloc= 0; - - /* get last buffer in list, and append dupbuf */ - for(lastbuf= cbuf; lastbuf; lastbuf= lastbuf->next) - if(lastbuf->next==NULL) - break; - lastbuf->next= dupbuf; - dupbuf->prev= lastbuf; - } - return dupbuf; -} - - -void free_compbuf(CompBuf *cbuf) -{ - /* check referencing, then remove from list and set malloc tag */ - if(cbuf->prev || cbuf->next) { - if(cbuf->prev) - cbuf->prev->next= cbuf->next; - if(cbuf->next) - cbuf->next->prev= cbuf->prev; - if(cbuf->malloc) { - if(cbuf->prev) - cbuf->prev->malloc= 1; - else - cbuf->next->malloc= 1; - cbuf->malloc= 0; - } - } - - if(cbuf->malloc && cbuf->rect) - MEM_freeN(cbuf->rect); - - MEM_freeN(cbuf); -} - -void print_compbuf(char *str, CompBuf *cbuf) -{ - printf("Compbuf %s %d %d %p\n", str, cbuf->x, cbuf->y, (void *)cbuf->rect); - -} - -void compbuf_set_node(CompBuf *cbuf, bNode *node) -{ - if (cbuf) cbuf->node = node; -} - -/* used for disabling node (similar code in node_draw.c for disable line and node_edit for untangling nodes) */ -void node_compo_pass_on(bNode *node, bNodeStack **nsin, bNodeStack **nsout) -{ - CompBuf *valbuf= NULL, *colbuf= NULL, *vecbuf= NULL; - bNodeSocket *sock; - int a; - - /* connect the first value buffer in with first value out */ - /* connect the first RGBA buffer in with first RGBA out */ - - /* test the inputs */ - for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) { - if(nsin[a]->data) { - CompBuf *cbuf= nsin[a]->data; - if(cbuf->type==1 && valbuf==NULL) valbuf= cbuf; - if(cbuf->type==3 && vecbuf==NULL) vecbuf= cbuf; - if(cbuf->type==4 && colbuf==NULL) colbuf= cbuf; - } - } - - /* outputs */ - if(valbuf || colbuf || vecbuf) { - for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) { - if(nsout[a]->hasoutput) { - if(sock->type==SOCK_VALUE && valbuf) { - nsout[a]->data= pass_on_compbuf(valbuf); - valbuf= NULL; - } - if(sock->type==SOCK_VECTOR && vecbuf) { - nsout[a]->data= pass_on_compbuf(vecbuf); - vecbuf= NULL; - } - if(sock->type==SOCK_RGBA && colbuf) { - nsout[a]->data= pass_on_compbuf(colbuf); - colbuf= NULL; - } - } - } - } -} - - -CompBuf *get_cropped_compbuf(rcti *drect, float *rectf, int rectx, int recty, int type) -{ - CompBuf *cbuf; - rcti disprect= *drect; - float *outfp; - int dx, y; - - if(disprect.xmax>rectx) disprect.xmax= rectx; - if(disprect.ymax>recty) disprect.ymax= recty; - if(disprect.xmin>= disprect.xmax) return NULL; - if(disprect.ymin>= disprect.ymax) return NULL; - - cbuf= alloc_compbuf(disprect.xmax-disprect.xmin, disprect.ymax-disprect.ymin, type, 1); - outfp= cbuf->rect; - rectf += type*(disprect.ymin*rectx + disprect.xmin); - dx= type*cbuf->x; - for(y=cbuf->y; y>0; y--, outfp+=dx, rectf+=type*rectx) - memcpy(outfp, rectf, sizeof(float)*dx); - - return cbuf; -} - -CompBuf *scalefast_compbuf(CompBuf *inbuf, int newx, int newy) -{ - CompBuf *outbuf; - float *rectf, *newrectf, *rf; - int x, y, c, pixsize= inbuf->type; - int ofsx, ofsy, stepx, stepy; - - if(inbuf->x==newx && inbuf->y==newy) - return dupalloc_compbuf(inbuf); - - outbuf= alloc_compbuf(newx, newy, inbuf->type, 1); - newrectf= outbuf->rect; - - stepx = (65536.0 * (inbuf->x - 1.0) / (newx - 1.0)) + 0.5; - stepy = (65536.0 * (inbuf->y - 1.0) / (newy - 1.0)) + 0.5; - ofsy = 32768; - - for (y = newy; y > 0 ; y--){ - rectf = inbuf->rect; - rectf += pixsize * (ofsy >> 16) * inbuf->x; - - ofsy += stepy; - ofsx = 32768; - - for (x = newx ; x>0 ; x--) { - - rf= rectf + pixsize*(ofsx >> 16); - for(c=0; ctype!=type) { - CompBuf *outbuf; - float *inrf, *outrf; - int x; - - outbuf= alloc_compbuf(inbuf->x, inbuf->y, type, 1); - - /* warning note: xof and yof are applied in pixelprocessor, but should be copied otherwise? */ - outbuf->xof= inbuf->xof; - outbuf->yof= inbuf->yof; - - if(inbuf->rect_procedural) { - outbuf->rect_procedural= inbuf->rect_procedural; - VECCOPY(outbuf->procedural_size, inbuf->procedural_size); - VECCOPY(outbuf->procedural_offset, inbuf->procedural_offset); - outbuf->procedural_type= inbuf->procedural_type; - outbuf->node= inbuf->node; - return outbuf; - } - - inrf= inbuf->rect; - outrf= outbuf->rect; - x= inbuf->x*inbuf->y; - - if(type==CB_VAL) { - if(inbuf->type==CB_VEC2) { - for(; x>0; x--, outrf+= 1, inrf+= 2) - *outrf= 0.5f*(inrf[0]+inrf[1]); - } - else if(inbuf->type==CB_VEC3) { - for(; x>0; x--, outrf+= 1, inrf+= 3) - *outrf= 0.333333f*(inrf[0]+inrf[1]+inrf[2]); - } - else if(inbuf->type==CB_RGBA) { - for(; x>0; x--, outrf+= 1, inrf+= 4) - *outrf= inrf[0]*0.35f + inrf[1]*0.45f + inrf[2]*0.2f; - } - } - else if(type==CB_VEC2) { - if(inbuf->type==CB_VAL) { - for(; x>0; x--, outrf+= 2, inrf+= 1) { - outrf[0]= inrf[0]; - outrf[1]= inrf[0]; - } - } - else if(inbuf->type==CB_VEC3) { - for(; x>0; x--, outrf+= 2, inrf+= 3) { - outrf[0]= inrf[0]; - outrf[1]= inrf[1]; - } - } - else if(inbuf->type==CB_RGBA) { - for(; x>0; x--, outrf+= 2, inrf+= 4) { - outrf[0]= inrf[0]; - outrf[1]= inrf[1]; - } - } - } - else if(type==CB_VEC3) { - if(inbuf->type==CB_VAL) { - for(; x>0; x--, outrf+= 3, inrf+= 1) { - outrf[0]= inrf[0]; - outrf[1]= inrf[0]; - outrf[2]= inrf[0]; - } - } - else if(inbuf->type==CB_VEC2) { - for(; x>0; x--, outrf+= 3, inrf+= 2) { - outrf[0]= inrf[0]; - outrf[1]= inrf[1]; - outrf[2]= 0.0f; - } - } - else if(inbuf->type==CB_RGBA) { - for(; x>0; x--, outrf+= 3, inrf+= 4) { - outrf[0]= inrf[0]; - outrf[1]= inrf[1]; - outrf[2]= inrf[2]; - } - } - } - else if(type==CB_RGBA) { - if(inbuf->type==CB_VAL) { - for(; x>0; x--, outrf+= 4, inrf+= 1) { - outrf[0]= inrf[0]; - outrf[1]= inrf[0]; - outrf[2]= inrf[0]; - outrf[3]= 1.0f; - } - } - else if(inbuf->type==CB_VEC2) { - for(; x>0; x--, outrf+= 4, inrf+= 2) { - outrf[0]= inrf[0]; - outrf[1]= inrf[1]; - outrf[2]= 0.0f; - outrf[3]= 1.0f; - } - } - else if(inbuf->type==CB_VEC3) { - for(; x>0; x--, outrf+= 4, inrf+= 3) { - outrf[0]= inrf[0]; - outrf[1]= inrf[1]; - outrf[2]= inrf[2]; - outrf[3]= 1.0f; - } - } - } - - return outbuf; - } - return inbuf; -} - -static float *compbuf_get_pixel(CompBuf *cbuf, float *defcol, float *use, int x, int y, int xrad, int yrad) -{ - if(cbuf) { - if(cbuf->rect_procedural) { - cbuf->rect_procedural(cbuf, use, (float)x/(float)xrad, (float)y/(float)yrad); - return use; - } - else { - static float col[4]= {0.0f, 0.0f, 0.0f, 0.0f}; - - /* map coords */ - x-= cbuf->xof; - y-= cbuf->yof; - - if(y<-cbuf->yrad || y>= -cbuf->yrad+cbuf->y) return col; - if(x<-cbuf->xrad || x>= -cbuf->xrad+cbuf->x) return col; - - return cbuf->rect + cbuf->type*( (cbuf->yrad+y)*cbuf->x + (cbuf->xrad+x) ); - } - } - else return defcol; -} - -/* **************************************************** */ - -/* Pixel-to-Pixel operation, 1 Image in, 1 out */ -void composit1_pixel_processor(bNode *node, CompBuf *out, CompBuf *src_buf, float *src_col, - void (*func)(bNode *, float *, float *), - int src_type) -{ - CompBuf *src_use; - float *outfp=out->rect, *srcfp; - float color[4]; /* local color if compbuf is procedural */ - int xrad, yrad, x, y; - - src_use= typecheck_compbuf(src_buf, src_type); - - xrad= out->xrad; - yrad= out->yrad; - - for(y= -yrad; y<-yrad+out->y; y++) { - for(x= -xrad; x<-xrad+out->x; x++, outfp+=out->type) { - srcfp= compbuf_get_pixel(src_use, src_col, color, x, y, xrad, yrad); - func(node, outfp, srcfp); - } - } - - if(src_use!=src_buf) - free_compbuf(src_use); -} - -/* Pixel-to-Pixel operation, 2 Images in, 1 out */ -void composit2_pixel_processor(bNode *node, CompBuf *out, CompBuf *src_buf, float *src_col, - CompBuf *fac_buf, float *fac, void (*func)(bNode *, float *, float *, float *), - int src_type, int fac_type) -{ - CompBuf *src_use, *fac_use; - float *outfp=out->rect, *srcfp, *facfp; - float color[4]; /* local color if compbuf is procedural */ - int xrad, yrad, x, y; - - src_use= typecheck_compbuf(src_buf, src_type); - fac_use= typecheck_compbuf(fac_buf, fac_type); - - xrad= out->xrad; - yrad= out->yrad; - - for(y= -yrad; y<-yrad+out->y; y++) { - for(x= -xrad; x<-xrad+out->x; x++, outfp+=out->type) { - srcfp= compbuf_get_pixel(src_use, src_col, color, x, y, xrad, yrad); - facfp= compbuf_get_pixel(fac_use, fac, color, x, y, xrad, yrad); - - func(node, outfp, srcfp, facfp); - } - } - if(src_use!=src_buf) - free_compbuf(src_use); - if(fac_use!=fac_buf) - free_compbuf(fac_use); -} - -/* Pixel-to-Pixel operation, 3 Images in, 1 out */ -void composit3_pixel_processor(bNode *node, CompBuf *out, CompBuf *src1_buf, float *src1_col, CompBuf *src2_buf, float *src2_col, - CompBuf *fac_buf, float *fac, void (*func)(bNode *, float *, float *, float *, float *), - int src1_type, int src2_type, int fac_type) -{ - CompBuf *src1_use, *src2_use, *fac_use; - float *outfp=out->rect, *src1fp, *src2fp, *facfp; - float color[4]; /* local color if compbuf is procedural */ - int xrad, yrad, x, y; - - src1_use= typecheck_compbuf(src1_buf, src1_type); - src2_use= typecheck_compbuf(src2_buf, src2_type); - fac_use= typecheck_compbuf(fac_buf, fac_type); - - xrad= out->xrad; - yrad= out->yrad; - - for(y= -yrad; y<-yrad+out->y; y++) { - for(x= -xrad; x<-xrad+out->x; x++, outfp+=out->type) { - src1fp= compbuf_get_pixel(src1_use, src1_col, color, x, y, xrad, yrad); - src2fp= compbuf_get_pixel(src2_use, src2_col, color, x, y, xrad, yrad); - facfp= compbuf_get_pixel(fac_use, fac, color, x, y, xrad, yrad); - - func(node, outfp, src1fp, src2fp, facfp); - } - } - - if(src1_use!=src1_buf) - free_compbuf(src1_use); - if(src2_use!=src2_buf) - free_compbuf(src2_use); - if(fac_use!=fac_buf) - free_compbuf(fac_use); -} - -/* Pixel-to-Pixel operation, 4 Images in, 1 out */ -void composit4_pixel_processor(bNode *node, CompBuf *out, CompBuf *src1_buf, float *src1_col, CompBuf *fac1_buf, float *fac1, - CompBuf *src2_buf, float *src2_col, CompBuf *fac2_buf, float *fac2, - void (*func)(bNode *, float *, float *, float *, float *, float *), - int src1_type, int fac1_type, int src2_type, int fac2_type) -{ - CompBuf *src1_use, *src2_use, *fac1_use, *fac2_use; - float *outfp=out->rect, *src1fp, *src2fp, *fac1fp, *fac2fp; - float color[4]; /* local color if compbuf is procedural */ - int xrad, yrad, x, y; - - src1_use= typecheck_compbuf(src1_buf, src1_type); - src2_use= typecheck_compbuf(src2_buf, src2_type); - fac1_use= typecheck_compbuf(fac1_buf, fac1_type); - fac2_use= typecheck_compbuf(fac2_buf, fac2_type); - - xrad= out->xrad; - yrad= out->yrad; - - for(y= -yrad; y<-yrad+out->y; y++) { - for(x= -xrad; x<-xrad+out->x; x++, outfp+=out->type) { - src1fp= compbuf_get_pixel(src1_use, src1_col, color, x, y, xrad, yrad); - src2fp= compbuf_get_pixel(src2_use, src2_col, color, x, y, xrad, yrad); - fac1fp= compbuf_get_pixel(fac1_use, fac1, color, x, y, xrad, yrad); - fac2fp= compbuf_get_pixel(fac2_use, fac2, color, x, y, xrad, yrad); - - func(node, outfp, src1fp, fac1fp, src2fp, fac2fp); - } - } - - if(src1_use!=src1_buf) - free_compbuf(src1_use); - if(src2_use!=src2_buf) - free_compbuf(src2_use); - if(fac1_use!=fac1_buf) - free_compbuf(fac1_use); - if(fac2_use!=fac2_buf) - free_compbuf(fac2_use); -} - - -CompBuf *valbuf_from_rgbabuf(CompBuf *cbuf, int channel) -{ - CompBuf *valbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); - float *valf, *rectf; - int tot; - - /* warning note: xof and yof are applied in pixelprocessor, but should be copied otherwise? */ - valbuf->xof= cbuf->xof; - valbuf->yof= cbuf->yof; - - valf= valbuf->rect; - - /* defaults to returning alpha channel */ - if ((channel < CHAN_R) || (channel > CHAN_A)) channel = CHAN_A; - - rectf= cbuf->rect + channel; - - for(tot= cbuf->x*cbuf->y; tot>0; tot--, valf++, rectf+=4) - *valf= *rectf; - - return valbuf; -} - -static CompBuf *generate_procedural_preview(CompBuf *cbuf, int newx, int newy) -{ - CompBuf *outbuf; - float *outfp; - int xrad, yrad, x, y; - - outbuf= alloc_compbuf(newx, newy, CB_RGBA, 1); - - outfp= outbuf->rect; - xrad= outbuf->xrad; - yrad= outbuf->yrad; - - for(y= -yrad; y<-yrad+outbuf->y; y++) - for(x= -xrad; x<-xrad+outbuf->x; x++, outfp+=outbuf->type) - cbuf->rect_procedural(cbuf, outfp, (float)x/(float)xrad, (float)y/(float)yrad); - - return outbuf; -} - -void generate_preview(void *data, bNode *node, CompBuf *stackbuf) -{ - RenderData *rd= data; - bNodePreview *preview= node->preview; - int xsize, ysize; - int color_manage= rd->color_mgt_flag & R_COLOR_MANAGEMENT; - unsigned char *rect; - - if(preview && stackbuf) { - CompBuf *cbuf, *stackbuf_use; - - if(stackbuf->rect==NULL && stackbuf->rect_procedural==NULL) return; - - stackbuf_use= typecheck_compbuf(stackbuf, CB_RGBA); - - if(stackbuf->x > stackbuf->y) { - xsize= 140; - ysize= (140*stackbuf->y)/stackbuf->x; - } - else { - ysize= 140; - xsize= (140*stackbuf->x)/stackbuf->y; - } - - if(stackbuf_use->rect_procedural) - cbuf= generate_procedural_preview(stackbuf_use, xsize, ysize); - else - cbuf= scalefast_compbuf(stackbuf_use, xsize, ysize); - - /* convert to byte for preview */ - rect= MEM_callocN(sizeof(unsigned char)*4*xsize*ysize, "bNodePreview.rect"); - - if(color_manage) - floatbuf_to_srgb_byte(cbuf->rect, rect, 0, xsize, 0, ysize, xsize); - else - floatbuf_to_byte(cbuf->rect, rect, 0, xsize, 0, ysize, xsize); - - free_compbuf(cbuf); - if(stackbuf_use!=stackbuf) - free_compbuf(stackbuf_use); - - BLI_lock_thread(LOCK_PREVIEW); - - if(preview->rect) - MEM_freeN(preview->rect); - preview->xsize= xsize; - preview->ysize= ysize; - preview->rect= rect; - - BLI_unlock_thread(LOCK_PREVIEW); - } -} - -void do_rgba_to_yuva(bNode *UNUSED(node), float *out, float *in) -{ - rgb_to_yuv(in[0],in[1],in[2], &out[0], &out[1], &out[2]); - out[3]=in[3]; -} - -void do_rgba_to_hsva(bNode *UNUSED(node), float *out, float *in) -{ - rgb_to_hsv(in[0],in[1],in[2], &out[0], &out[1], &out[2]); - out[3]=in[3]; -} - -void do_rgba_to_ycca(bNode *UNUSED(node), float *out, float *in) -{ - rgb_to_ycc(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); - out[3]=in[3]; -} - -void do_yuva_to_rgba(bNode *UNUSED(node), float *out, float *in) -{ - yuv_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2]); - out[3]=in[3]; -} - -void do_hsva_to_rgba(bNode *UNUSED(node), float *out, float *in) -{ - hsv_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2]); - out[3]=in[3]; -} - -void do_ycca_to_rgba(bNode *UNUSED(node), float *out, float *in) -{ - ycc_to_rgb(in[0],in[1],in[2], &out[0], &out[1], &out[2], BLI_YCC_ITU_BT601); - out[3]=in[3]; -} - -void do_copy_rgba(bNode *UNUSED(node), float *out, float *in) -{ - QUATCOPY(out, in); -} - -void do_copy_rgb(bNode *UNUSED(node), float *out, float *in) -{ - VECCOPY(out, in); - out[3]= 1.0f; -} - -void do_copy_value(bNode *UNUSED(node), float *out, float *in) -{ - out[0]= in[0]; -} - -void do_copy_a_rgba(bNode *UNUSED(node), float *out, float *in, float *fac) -{ - VECCOPY(out, in); - out[3]= *fac; -} - -/* only accepts RGBA buffers */ -void gamma_correct_compbuf(CompBuf *img, int inversed) -{ - float *drect; - int x; - - if(img->type!=CB_RGBA) return; - - drect= img->rect; - if(inversed) { - for(x=img->x*img->y; x>0; x--, drect+=4) { - if(drect[0]>0.0f) drect[0]= sqrt(drect[0]); else drect[0]= 0.0f; - if(drect[1]>0.0f) drect[1]= sqrt(drect[1]); else drect[1]= 0.0f; - if(drect[2]>0.0f) drect[2]= sqrt(drect[2]); else drect[2]= 0.0f; - } - } - else { - for(x=img->x*img->y; x>0; x--, drect+=4) { - if(drect[0]>0.0f) drect[0]*= drect[0]; else drect[0]= 0.0f; - if(drect[1]>0.0f) drect[1]*= drect[1]; else drect[1]= 0.0f; - if(drect[2]>0.0f) drect[2]*= drect[2]; else drect[2]= 0.0f; - } - } -} - -void premul_compbuf(CompBuf *img, int inversed) -{ - float *drect; - int x; - - if(img->type!=CB_RGBA) return; - - drect= img->rect; - if(inversed) { - for(x=img->x*img->y; x>0; x--, drect+=4) { - if(fabs(drect[3]) < 1e-5f) { - drect[0]= 0.0f; - drect[1]= 0.0f; - drect[2]= 0.0f; - } - else { - drect[0] /= drect[3]; - drect[1] /= drect[3]; - drect[2] /= drect[3]; - } - } - } - else { - for(x=img->x*img->y; x>0; x--, drect+=4) { - drect[0] *= drect[3]; - drect[1] *= drect[3]; - drect[2] *= drect[3]; - } - } -} - - - -/* - * 2D Fast Hartley Transform, used for convolution - */ - -typedef float fREAL; - -// returns next highest power of 2 of x, as well it's log2 in L2 -static unsigned int nextPow2(unsigned int x, unsigned int* L2) -{ - unsigned int pw, x_notpow2 = x & (x-1); - *L2 = 0; - while (x>>=1) ++(*L2); - pw = 1 << (*L2); - if (x_notpow2) { (*L2)++; pw<<=1; } - return pw; -} - -//------------------------------------------------------------------------------ - -// from FXT library by Joerg Arndt, faster in order bitreversal -// use: r = revbin_upd(r, h) where h = N>>1 -static unsigned int revbin_upd(unsigned int r, unsigned int h) -{ - while (!((r^=h)&h)) h >>= 1; - return r; -} -//------------------------------------------------------------------------------ -static void FHT(fREAL* data, unsigned int M, unsigned int inverse) -{ - double tt, fc, dc, fs, ds, a = M_PI; - fREAL t1, t2; - int n2, bd, bl, istep, k, len = 1 << M, n = 1; - - int i, j = 0; - unsigned int Nh = len >> 1; - for (i=1;i<(len-1);++i) { - j = revbin_upd(j, Nh); - if (j>i) { - t1 = data[i]; - data[i] = data[j]; - data[j] = t1; - } - } - - do { - fREAL* data_n = &data[n]; - - istep = n << 1; - for (k=0; k> 1; - if (n>2) { - fc = dc = cos(a); - fs = ds = sqrt(1.0 - fc*fc); //sin(a); - bd = n-2; - for (bl=1; bl1) { - for (k=n2; k log2 of width/height, - nzp -> the row where zero pad data starts, - inverse -> see above */ -static void FHT2D(fREAL *data, unsigned int Mx, unsigned int My, - unsigned int nzp, unsigned int inverse) -{ - unsigned int i, j, Nx, Ny, maxy; - fREAL t; - - Nx = 1 << Mx; - Ny = 1 << My; - - // rows (forward transform skips 0 pad data) - maxy = inverse ? Ny : nzp; - for (j=0; j0; i++) { - #define pred(k) (((k & Nym) << Mx) + (k >> My)) - for (j=pred(i); j>i; j=pred(j)); - if (j < i) continue; - for (k=i, j=pred(i); j!=i; k=j, j=pred(j), stm--) - { t=data[j], data[j]=data[k], data[k]=t; } - #undef pred - stm--; - } - } - // swap Mx/My & Nx/Ny - i = Nx, Nx = Ny, Ny = i; - i = Mx, Mx = My, My = i; - - // now columns == transposed rows - for (j=0; j> 1); j++) { - unsigned int jm = (Ny - j) & (Ny-1); - unsigned int ji = j << Mx; - unsigned int jmi = jm << Mx; - for (i=0; i<=(Nx >> 1); i++) { - unsigned int im = (Nx - i) & (Nx-1); - fREAL A = data[ji + i]; - fREAL B = data[jmi + i]; - fREAL C = data[ji + im]; - fREAL D = data[jmi + im]; - fREAL E = (fREAL)0.5*((A + D) - (B + C)); - data[ji + i] = A - E; - data[jmi + i] = B + E; - data[ji + im] = C + E; - data[jmi + im] = D - E; - } - } - -} - -//------------------------------------------------------------------------------ - -/* 2D convolution calc, d1 *= d2, M/N - > log2 of width/height */ -static void fht_convolve(fREAL* d1, fREAL* d2, unsigned int M, unsigned int N) -{ - fREAL a, b; - unsigned int i, j, k, L, mj, mL; - unsigned int m = 1 << M, n = 1 << N; - unsigned int m2 = 1 << (M-1), n2 = 1 << (N-1); - unsigned int mn2 = m << (N-1); - - d1[0] *= d2[0]; - d1[mn2] *= d2[mn2]; - d1[m2] *= d2[m2]; - d1[m2 + mn2] *= d2[m2 + mn2]; - for (i=1; ix, in1->y, in1->type, 1); - - // convolution result width & height - w2 = 2*in2->x - 1; - h2 = 2*in2->y - 1; - // FFT pow2 required size & log2 - w2 = nextPow2(w2, &log2_w); - h2 = nextPow2(h2, &log2_h); - - // alloc space - data1 = (fREAL*)MEM_callocN(3*w2*h2*sizeof(fREAL), "convolve_fast FHT data1"); - data2 = (fREAL*)MEM_callocN(w2*h2*sizeof(fREAL), "convolve_fast FHT data2"); - - // normalize convolutor - wt[0] = wt[1] = wt[2] = 0.f; - for (y=0; yy; y++) { - colp = (fRGB*)&in2->rect[y*in2->x*in2->type]; - for (x=0; xx; x++) - fRGB_add(wt, colp[x]); - } - if (wt[0] != 0.f) wt[0] = 1.f/wt[0]; - if (wt[1] != 0.f) wt[1] = 1.f/wt[1]; - if (wt[2] != 0.f) wt[2] = 1.f/wt[2]; - for (y=0; yy; y++) { - colp = (fRGB*)&in2->rect[y*in2->x*in2->type]; - for (x=0; xx; x++) - fRGB_colormult(colp[x], wt); - } - - // copy image data, unpacking interleaved RGBA into separate channels - // only need to calc data1 once - - // block add-overlap - hw = in2->x >> 1; - hh = in2->y >> 1; - xbsz = (w2 + 1) - in2->x; - ybsz = (h2 + 1) - in2->y; - nxb = in1->x / xbsz; - if (in1->x % xbsz) nxb++; - nyb = in1->y / ybsz; - if (in1->y % ybsz) nyb++; - for (ybl=0; ybl data1 - for (y=0; yy; y++) { - fp = &data1ch[y*w2]; - colp = (fRGB*)&in2->rect[y*in2->x*in2->type]; - for (x=0; xx; x++) - fp[x] = colp[x][ch]; - } - } - - // in1, channel ch -> data2 - memset(data2, 0, w2*h2*sizeof(fREAL)); - for (y=0; y= in1->y) continue; - fp = &data2[y*w2]; - colp = (fRGB*)&in1->rect[yy*in1->x*in1->type]; - for (x=0; x= in1->x) continue; - fp[x] = colp[xx][ch]; - } - } - - // forward FHT - // zero pad data start is different for each == height+1 - if (!in2done) FHT2D(data1ch, log2_w, log2_h, in2->y+1, 0); - FHT2D(data2, log2_w, log2_h, in2->y+1, 0); - - // FHT2D transposed data, row/col now swapped - // convolve & inverse FHT - fht_convolve(data2, data1ch, log2_h, log2_w); - FHT2D(data2, log2_h, log2_w, 0, 1); - // data again transposed, so in order again - - // overlap-add result - for (y=0; y<(int)h2; y++) { - const int yy = ybl*ybsz + y - hh; - if ((yy < 0) || (yy >= in1->y)) continue; - fp = &data2[y*w2]; - colp = (fRGB*)&rdst->rect[yy*in1->x*in1->type]; - for (x=0; x<(int)w2; x++) { - const int xx = xbl*xbsz + x - hw; - if ((xx < 0) || (xx >= in1->x)) continue; - colp[xx][ch] += fp[x]; - } - } - - } - in2done = 1; - } - } - - MEM_freeN(data2); - MEM_freeN(data1); - memcpy(dst->rect, rdst->rect, sizeof(float)*dst->x*dst->y*dst->type); - free_compbuf(rdst); -} - - -/* - * - * Utility functions qd_* should probably be intergrated better with other functions here. - * - */ -// sets fcol to pixelcolor at (x, y) -void qd_getPixel(CompBuf* src, int x, int y, float* col) -{ - if(src->rect_procedural) { - float bc[4]; - src->rect_procedural(src, bc, (float)x/(float)src->xrad, (float)y/(float)src->yrad); - - switch(src->type){ - /* these fallthrough to get all the channels */ - case CB_RGBA: col[3]=bc[3]; - case CB_VEC3: col[2]=bc[2]; - case CB_VEC2: col[1]=bc[1]; - case CB_VAL: col[0]=bc[0]; - } - } - else if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { - float* bc = &src->rect[(x + y*src->x)*src->type]; - switch(src->type){ - /* these fallthrough to get all the channels */ - case CB_RGBA: col[3]=bc[3]; - case CB_VEC3: col[2]=bc[2]; - case CB_VEC2: col[1]=bc[1]; - case CB_VAL: col[0]=bc[0]; - } - } - else { - switch(src->type){ - /* these fallthrough to get all the channels */ - case CB_RGBA: col[3]=0.0; - case CB_VEC3: col[2]=0.0; - case CB_VEC2: col[1]=0.0; - case CB_VAL: col[0]=0.0; - } - } -} - -// sets pixel (x, y) to color col -void qd_setPixel(CompBuf* src, int x, int y, float* col) -{ - if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { - float* bc = &src->rect[(x + y*src->x)*src->type]; - switch(src->type){ - /* these fallthrough to get all the channels */ - case CB_RGBA: bc[3]=col[3]; - case CB_VEC3: bc[2]=col[2]; - case CB_VEC2: bc[1]=col[1]; - case CB_VAL: bc[0]=col[0]; - } - } -} - -// adds fcol to pixelcolor (x, y) -void qd_addPixel(CompBuf* src, int x, int y, float* col) -{ - if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { - float* bc = &src->rect[(x + y*src->x)*src->type]; - bc[0] += col[0], bc[1] += col[1], bc[2] += col[2]; - } -} - -// multiplies pixel by factor value f -void qd_multPixel(CompBuf* src, int x, int y, float f) -{ - if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) { - float* bc = &src->rect[(x + y*src->x)*src->type]; - bc[0] *= f, bc[1] *= f, bc[2] *= f; - } -} - -// bilinear interpolation with wraparound -void qd_getPixelLerpWrap(CompBuf* src, float u, float v, float* col) -{ - const float ufl = floor(u), vfl = floor(v); - const int nx = (int)ufl % src->x, ny = (int)vfl % src->y; - const int x1 = (nx < 0) ? (nx + src->x) : nx; - const int y1 = (ny < 0) ? (ny + src->y) : ny; - const int x2 = (x1 + 1) % src->x, y2 = (y1 + 1) % src->y; - const float* c00 = &src->rect[(x1 + y1*src->x)*src->type]; - const float* c10 = &src->rect[(x2 + y1*src->x)*src->type]; - const float* c01 = &src->rect[(x1 + y2*src->x)*src->type]; - const float* c11 = &src->rect[(x2 + y2*src->x)*src->type]; - const float uf = u - ufl, vf = v - vfl; - const float w00=(1.f-uf)*(1.f-vf), w10=uf*(1.f-vf), w01=(1.f-uf)*vf, w11=uf*vf; - col[0] = w00*c00[0] + w10*c10[0] + w01*c01[0] + w11*c11[0]; - if (src->type != CB_VAL) { - col[1] = w00*c00[1] + w10*c10[1] + w01*c01[1] + w11*c11[1]; - col[2] = w00*c00[2] + w10*c10[2] + w01*c01[2] + w11*c11[2]; - col[3] = w00*c00[3] + w10*c10[3] + w01*c01[3] + w11*c11[3]; - } -} - -// as above, without wrap around -void qd_getPixelLerp(CompBuf* src, float u, float v, float* col) -{ - const float ufl = floor(u), vfl = floor(v); - const int x1 = (int)ufl, y1 = (int)vfl; - const int x2 = (int)ceil(u), y2 = (int)ceil(v); - if ((x2 >= 0) && (y2 >= 0) && (x1 < src->x) && (y1 < src->y)) { - const float B[4] = {0,0,0,0}; - const int ox1 = (x1 < 0), oy1 = (y1 < 0), ox2 = (x2 >= src->x), oy2 = (y2 >= src->y); - const float* c00 = (ox1 || oy1) ? B : &src->rect[(x1 + y1*src->x)*src->type]; - const float* c10 = (ox2 || oy1) ? B : &src->rect[(x2 + y1*src->x)*src->type]; - const float* c01 = (ox1 || oy2) ? B : &src->rect[(x1 + y2*src->x)*src->type]; - const float* c11 = (ox2 || oy2) ? B : &src->rect[(x2 + y2*src->x)*src->type]; - const float uf = u - ufl, vf = v - vfl; - const float w00=(1.f-uf)*(1.f-vf), w10=uf*(1.f-vf), w01=(1.f-uf)*vf, w11=uf*vf; - col[0] = w00*c00[0] + w10*c10[0] + w01*c01[0] + w11*c11[0]; - if (src->type != CB_VAL) { - col[1] = w00*c00[1] + w10*c10[1] + w01*c01[1] + w11*c11[1]; - col[2] = w00*c00[2] + w10*c10[2] + w01*c01[2] + w11*c11[2]; - col[3] = w00*c00[3] + w10*c10[3] + w01*c01[3] + w11*c11[3]; - } - } - else col[0] = col[1] = col[2] = col[3] = 0.f; -} - -// as above, sampling only one channel -void qd_getPixelLerpChan(CompBuf* src, float u, float v, int chan, float* out) -{ - const float ufl = floor(u), vfl = floor(v); - const int x1 = (int)ufl, y1 = (int)vfl; - const int x2 = (int)ceil(u), y2 = (int)ceil(v); - if (chan >= src->type) chan = 0; - if ((x2 >= 0) && (y2 >= 0) && (x1 < src->x) && (y1 < src->y)) { - const float B[4] = {0,0,0,0}; - const int ox1 = (x1 < 0), oy1 = (y1 < 0), ox2 = (x2 >= src->x), oy2 = (y2 >= src->y); - const float* c00 = (ox1 || oy1) ? B : &src->rect[(x1 + y1*src->x)*src->type + chan]; - const float* c10 = (ox2 || oy1) ? B : &src->rect[(x2 + y1*src->x)*src->type + chan]; - const float* c01 = (ox1 || oy2) ? B : &src->rect[(x1 + y2*src->x)*src->type + chan]; - const float* c11 = (ox2 || oy2) ? B : &src->rect[(x2 + y2*src->x)*src->type + chan]; - const float uf = u - ufl, vf = v - vfl; - const float w00=(1.f-uf)*(1.f-vf), w10=uf*(1.f-vf), w01=(1.f-uf)*vf, w11=uf*vf; - out[0] = w00*c00[0] + w10*c10[0] + w01*c01[0] + w11*c11[0]; - } - else *out = 0.f; -} - - -CompBuf* qd_downScaledCopy(CompBuf* src, int scale) -{ - CompBuf* fbuf; - if (scale <= 1) - fbuf = dupalloc_compbuf(src); - else { - int nw = src->x/scale, nh = src->y/scale; - if ((2*(src->x % scale)) > scale) nw++; - if ((2*(src->y % scale)) > scale) nh++; - fbuf = alloc_compbuf(nw, nh, src->type, 1); - { - int x, y, xx, yy, sx, sy, mx, my; - float colsum[4] = {0.0f, 0.0f, 0.0f, 0.0f}; - float fscale = 1.f/(float)(scale*scale); - for (y=0; yrect[y*fbuf->x*fbuf->type]; - yy = y*scale; - my = yy + scale; - if (my > src->y) my = src->y; - for (x=0; x src->x) mx = src->x; - colsum[0] = colsum[1] = colsum[2] = 0.f; - for (sy=yy; syrect[sy*src->x*src->type]; - for (sx=xx; sx 3)) xy = 3; - - // XXX The YVV macro defined below explicitely expects sources of at least 3x3 pixels, - // so just skiping blur along faulty direction if src's def is below that limit! - if (src->x < 3) xy &= ~(int) 1; - if (src->y < 3) xy &= ~(int) 2; - if (xy < 1) return; - - // see "Recursive Gabor Filtering" by Young/VanVliet - // all factors here in double.prec. Required, because for single.prec it seems to blow up if sigma > ~200 - if (sigma >= 3.556) - q = 0.9804*(sigma - 3.556) + 2.5091; - else // sigma >= 0.5 - q = (0.0561*sigma + 0.5784)*sigma - 0.2568; - q2 = q*q; - sc = (1.1668 + q)*(3.203729649 + (2.21566 + q)*q); - // no gabor filtering here, so no complex multiplies, just the regular coefs. - // all negated here, so as not to have to recalc Triggs/Sdika matrix - cf[1] = q*(5.788961737 + (6.76492 + 3.0*q)*q)/ sc; - cf[2] = -q2*(3.38246 + 3.0*q)/sc; - // 0 & 3 unchanged - cf[3] = q2*q/sc; - cf[0] = 1.0 - cf[1] - cf[2] - cf[3]; - - // Triggs/Sdika border corrections, - // it seems to work, not entirely sure if it is actually totally correct, - // Besides J.M.Geusebroek's anigauss.c (see http://www.science.uva.nl/~mark), - // found one other implementation by Cristoph Lampert, - // but neither seem to be quite the same, result seems to be ok sofar anyway. - // Extra scale factor here to not have to do it in filter, - // though maybe this had something to with the precision errors - sc = cf[0]/((1.0 + cf[1] - cf[2] + cf[3])*(1.0 - cf[1] - cf[2] - cf[3])*(1.0 + cf[2] + (cf[1] - cf[3])*cf[3])); - tsM[0] = sc*(-cf[3]*cf[1] + 1.0 - cf[3]*cf[3] - cf[2]); - tsM[1] = sc*((cf[3] + cf[1])*(cf[2] + cf[3]*cf[1])); - tsM[2] = sc*(cf[3]*(cf[1] + cf[3]*cf[2])); - tsM[3] = sc*(cf[1] + cf[3]*cf[2]); - tsM[4] = sc*(-(cf[2] - 1.0)*(cf[2] + cf[3]*cf[1])); - tsM[5] = sc*(-(cf[3]*cf[1] + cf[3]*cf[3] + cf[2] - 1.0)*cf[3]); - tsM[6] = sc*(cf[3]*cf[1] + cf[2] + cf[1]*cf[1] - cf[2]*cf[2]); - tsM[7] = sc*(cf[1]*cf[2] + cf[3]*cf[2]*cf[2] - cf[1]*cf[3]*cf[3] - cf[3]*cf[3]*cf[3] - cf[3]*cf[2] + cf[3]); - tsM[8] = sc*(cf[3]*(cf[1] + cf[3]*cf[2])); - -#define YVV(L)\ -{\ - W[0] = cf[0]*X[0] + cf[1]*X[0] + cf[2]*X[0] + cf[3]*X[0];\ - W[1] = cf[0]*X[1] + cf[1]*W[0] + cf[2]*X[0] + cf[3]*X[0];\ - W[2] = cf[0]*X[2] + cf[1]*W[1] + cf[2]*W[0] + cf[3]*X[0];\ - for (i=3; i=0; i--)\ - Y[i] = cf[0]*W[i] + cf[1]*Y[i+1] + cf[2]*Y[i+2] + cf[3]*Y[i+3];\ -} - - // intermediate buffers - sz = MAX2(src->x, src->y); - X = MEM_callocN(sz*sizeof(double), "IIR_gauss X buf"); - Y = MEM_callocN(sz*sizeof(double), "IIR_gauss Y buf"); - W = MEM_callocN(sz*sizeof(double), "IIR_gauss W buf"); - if (xy & 1) { // H - for (y=0; yy; ++y) { - const int yx = y*src->x; - for (x=0; xx; ++x) - X[x] = src->rect[(x + yx)*src->type + chan]; - YVV(src->x); - for (x=0; xx; ++x) - src->rect[(x + yx)*src->type + chan] = Y[x]; - } - } - if (xy & 2) { // V - for (x=0; xx; ++x) { - for (y=0; yy; ++y) - X[y] = src->rect[(x + y*src->x)*src->type + chan]; - YVV(src->y); - for (y=0; yy; ++y) - src->rect[(x + y*src->x)*src->type + chan] = Y[y]; - } - } - - MEM_freeN(X); - MEM_freeN(W); - MEM_freeN(Y); -#undef YVV -} - diff --git a/source/blender/nodes/intern/CMP_util.h b/source/blender/nodes/intern/CMP_util.h deleted file mode 100644 index 3f37eae2af9..00000000000 --- a/source/blender/nodes/intern/CMP_util.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/CMP_util.h - * \ingroup nodes - */ - - -#ifndef CMP_NODE_UTILS_H_ -#define CMP_NODE_UTILS_H_ - -#include -#include -#include - -#include "MEM_guardedalloc.h" - -#include "DNA_camera_types.h" /* qdn: defocus node, need camera info */ -#include "DNA_color_types.h" -#include "DNA_ID.h" -#include "DNA_image_types.h" -#include "DNA_material_types.h" -#include "DNA_node_types.h" -#include "DNA_object_types.h" -#include "DNA_scene_types.h" -#include "DNA_texture_types.h" - -#include "BLI_math.h" -#include "BLI_blenlib.h" -#include "BLI_rand.h" -#include "BLI_threads.h" -#include "BLI_utildefines.h" -#include "BLI_utildefines.h" - -#include "BKE_blender.h" -#include "BKE_colortools.h" -#include "BKE_global.h" -#include "BKE_image.h" -#include "BKE_main.h" -#include "BKE_material.h" -#include "BKE_node.h" -#include "BKE_texture.h" - -#include "BKE_library.h" -#include "BKE_object.h" - -#include "../CMP_node.h" -#include "node_util.h" - -#include "IMB_imbuf_types.h" -#include "IMB_imbuf.h" - -#include "RE_pipeline.h" -#include "RE_shader_ext.h" -#include "RE_render_ext.h" - -/* *************************** operations support *************************** */ - -/* general signal that's in output sockets, and goes over the wires */ -typedef struct CompBuf { - float *rect; - int x, y, xrad, yrad; - short type, malloc; - rcti disprect; /* cropped part of image */ - int xof, yof; /* relative to center of target image */ - - void (*rect_procedural)(struct CompBuf *, float *, float, float); - float procedural_size[3], procedural_offset[3]; - int procedural_type; - bNode *node; /* only in use for procedural bufs */ - - struct CompBuf *next, *prev; /* for pass-on, works nicer than reference counting */ -} CompBuf; - -/* defines also used for pixel size */ -#define CB_RGBA 4 -#define CB_VEC4 4 -#define CB_VEC3 3 -#define CB_VEC2 2 -#define CB_VAL 1 - -/* defines for RGBA channels */ -#define CHAN_R 0 -#define CHAN_G 1 -#define CHAN_B 2 -#define CHAN_A 3 - - - -CompBuf *alloc_compbuf(int sizex, int sizey, int type, int alloc); -CompBuf *dupalloc_compbuf(CompBuf *cbuf); -CompBuf *pass_on_compbuf(CompBuf *cbuf); -void free_compbuf(CompBuf *cbuf); -void print_compbuf(char *str, CompBuf *cbuf); -void compbuf_set_node(struct CompBuf *cbuf, struct bNode *node); -void node_compo_pass_on(struct bNode *node, struct bNodeStack **nsin, struct bNodeStack **nsout); - -CompBuf *get_cropped_compbuf(rcti *drect, float *rectf, int rectx, int recty, int type); -CompBuf *scalefast_compbuf(CompBuf *inbuf, int newx, int newy); -CompBuf *typecheck_compbuf(CompBuf *inbuf, int type); -void typecheck_compbuf_color(float *out, float *in, int outtype, int intype); - -/* **************************************************** */ - -/* Pixel-to-Pixel operation, 1 Image in, 1 out */ -void composit1_pixel_processor(bNode *node, CompBuf *out, CompBuf *src_buf, float *src_col, - void (*func)(bNode *, float *, float *), - int src_type); -/* Pixel-to-Pixel operation, 2 Images in, 1 out */ -void composit2_pixel_processor(bNode *node, CompBuf *out, CompBuf *src_buf, float *src_col, - CompBuf *fac_buf, float *fac, void (*func)(bNode *, float *, float *, float *), - int src_type, int fac_type); - -/* Pixel-to-Pixel operation, 3 Images in, 1 out */ -void composit3_pixel_processor(bNode *node, CompBuf *out, CompBuf *src1_buf, float *src1_col, CompBuf *src2_buf, float *src2_col, - CompBuf *fac_buf, float *fac, void (*func)(bNode *, float *, float *, float *, float *), - int src1_type, int src2_type, int fac_type); - -/* Pixel-to-Pixel operation, 4 Images in, 1 out */ -void composit4_pixel_processor(bNode *node, CompBuf *out, CompBuf *src1_buf, float *src1_col, CompBuf *fac1_buf, float *fac1, - CompBuf *src2_buf, float *src2_col, CompBuf *fac2_buf, float *fac2, - void (*func)(bNode *, float *, float *, float *, float *, float *), - int src1_type, int fac1_type, int src2_type, int fac2_type); - -CompBuf *valbuf_from_rgbabuf(CompBuf *cbuf, int channel); -void generate_preview(void *data, bNode *node, CompBuf *stackbuf); - -void do_copy_rgba(bNode *node, float *out, float *in); -void do_copy_rgb(bNode *node, float *out, float *in); -void do_copy_value(bNode *node, float *out, float *in); -void do_copy_a_rgba(bNode *node, float *out, float *in, float *fac); - -void do_rgba_to_yuva(bNode *node, float *out, float *in); -void do_rgba_to_hsva(bNode *node, float *out, float *in); -void do_rgba_to_ycca(bNode *node, float *out, float *in); -void do_yuva_to_rgba(bNode *node, float *out, float *in); -void do_hsva_to_rgba(bNode *node, float *out, float *in); -void do_ycca_to_rgba(bNode *node, float *out, float *in); - -void gamma_correct_compbuf(CompBuf *img, int inversed); -void premul_compbuf(CompBuf *img, int inversed); -void convolve(CompBuf* dst, CompBuf* in1, CompBuf* in2); - -extern void node_ID_title_cb(void *node_v, void *unused_v); - - -/* utility functions used by glare, tonemap and lens distortion */ -/* soms macros for color handling */ -typedef float fRGB[4]; -/* clear color */ -#define fRGB_clear(c) { c[0]=c[1]=c[2]=0.f; } -/* copy c2 to c1 */ -#define fRGB_copy(c1, c2) { c1[0]=c2[0]; c1[1]=c2[1]; c1[2]=c2[2]; c1[3]=c2[3]; } -/* add c2 to c1 */ -#define fRGB_add(c1, c2) { c1[0]+=c2[0]; c1[1]+=c2[1]; c1[2]+=c2[2]; } -/* subtract c2 from c1 */ -#define fRGB_sub(c1, c2) { c1[0]-=c2[0]; c1[1]-=c2[1]; c1[2]-=c2[2]; } -/* multiply c by float value s */ -#define fRGB_mult(c, s) { c[0]*=s; c[1]*=s; c[2]*=s; } -/* multiply c2 by s and add to c1 */ -#define fRGB_madd(c1, c2, s) { c1[0]+=c2[0]*s; c1[1]+=c2[1]*s; c1[2]+=c2[2]*s; } -/* multiply c2 by color c1 */ -#define fRGB_colormult(c, cs) { c[0]*=cs[0]; c[1]*=cs[1]; c[2]*=cs[2]; } -/* multiply c2 by color c3 and add to c1 */ -#define fRGB_colormadd(c1, c2, c3) { c1[0]+=c2[0]*c3[0]; c1[1]+=c2[1]*c3[1]; c1[2]+=c2[2]*c3[2]; } -/* multiply c2 by color rgb, rgb as separate arguments */ -#define fRGB_rgbmult(c, r, g, b) { c[0]*=(r); c[1]*=(g); c[2]*=(b); } -/* swap colors c1 & c2 */ -#define fRGB_swap(c1, c2) { float _t=c1[0]; c1[0]=c2[0]; c2[0]=_t;\ - _t=c1[1]; c1[1]=c2[1]; c2[1]=_t;\ - _t=c1[2]; c1[2]=c2[2]; c2[2]=_t;\ - _t=c1[3]; c1[3]=c2[3]; c3[3]=_t;} - -void qd_getPixel(CompBuf* src, int x, int y, float* col); -void qd_setPixel(CompBuf* src, int x, int y, float* col); -void qd_addPixel(CompBuf* src, int x, int y, float* col); -void qd_multPixel(CompBuf* src, int x, int y, float f); -void qd_getPixelLerpWrap(CompBuf* src, float u, float v, float* col); -void qd_getPixelLerp(CompBuf* src, float u, float v, float* col); -void qd_getPixelLerpChan(CompBuf* src, float u, float v, int chan, float* out); -CompBuf* qd_downScaledCopy(CompBuf* src, int scale); -void IIR_gauss(CompBuf* src, float sigma, int chan, int xy); -/* end utility funcs */ - -#endif diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_camera.c b/source/blender/nodes/intern/SHD_nodes/SHD_camera.c deleted file mode 100644 index eea572bf271..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_camera.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_camera.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** CAMERA INFO ******************** */ -static bNodeSocketType sh_node_camera_out[]= { - { SOCK_VECTOR, 0, "View Vector", 1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f}, /* None of these actually */ - { SOCK_VALUE, 0, "View Z Depth", 0.f, 0.0f, 0.0f, 0.0f, 0.0f, 99999999999.0f}, /* have any limits on their */ - { SOCK_VALUE, 0, "View Distance", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 99999999999.0f}, /* values. */ - { -1, 0, "" } -}; - - -static void node_shader_exec_camera(void *data, bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **out) -{ - if(data) { - ShadeInput *shi= ((ShaderCallData *)data)->shi; /* Data we need for shading. */ - - VECCOPY(out[0]->vec, shi->co); /* get view vector */ - out[1]->vec[0]= fabs(shi->co[2]); /* get view z-depth */ - out[2]->vec[0]= normalize_v3(out[0]->vec); /* get view distance */ - } -} - -static int gpu_shader_camera(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) -{ - return GPU_stack_link(mat, "camera", in, out, GPU_builtin(GPU_VIEW_POSITION)); -} - -void register_node_type_sh_camera(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_CAMERA, "Camera Data", NODE_CLASS_INPUT, 0, - NULL, sh_node_camera_out); - node_type_size(&ntype, 95, 95, 120); - node_type_storage(&ntype, "node_camera", NULL, NULL); - node_type_exec(&ntype, node_shader_exec_camera); - node_type_gpu(&ntype, gpu_shader_camera); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_curves.c b/source/blender/nodes/intern/SHD_nodes/SHD_curves.c deleted file mode 100644 index a39a639897e..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_curves.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_curves.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - - -/* **************** CURVE VEC ******************** */ -static bNodeSocketType sh_node_curve_vec_in[]= { - { SOCK_VALUE, 0, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_curve_vec_out[]= { - { SOCK_VECTOR, 0, "Vector", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - float vec[3]; - - /* stack order input: vec */ - /* stack order output: vec */ - nodestack_get_vec(vec, SOCK_VECTOR, in[1]); - curvemapping_evaluate3F(node->storage, out[0]->vec, vec); -} - -static void node_shader_init_curve_vec(bNode* node) -{ - node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f); -} - -static int gpu_shader_curve_vec(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - float *array; - int size; - - curvemapping_table_RGBA(node->storage, &array, &size); - return GPU_stack_link(mat, "curves_vec", in, out, GPU_texture(size, array)); -} - -void register_node_type_sh_curve_vec(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS, - sh_node_curve_vec_in, sh_node_curve_vec_out); - node_type_size(&ntype, 200, 140, 320); - node_type_init(&ntype, node_shader_init_curve_vec); - node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, node_shader_exec_curve_vec); - node_type_gpu(&ntype, gpu_shader_curve_vec); - - nodeRegisterType(lb, &ntype); -} - - -/* **************** CURVE RGB ******************** */ -static bNodeSocketType sh_node_curve_rgb_in[]= { - { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_curve_rgb_out[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - float vec[3]; - - /* stack order input: vec */ - /* stack order output: vec */ - nodestack_get_vec(vec, SOCK_VECTOR, in[1]); - curvemapping_evaluateRGBF(node->storage, out[0]->vec, vec); - if(in[0]->vec[0] != 1.0f) { - interp_v3_v3v3(out[0]->vec, vec, out[0]->vec, *in[0]->vec); - } -} - -static void node_shader_init_curve_rgb(bNode *node) -{ - node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); -} - -static int gpu_shader_curve_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - float *array; - int size; - curvemapping_table_RGBA(node->storage, &array, &size); - return GPU_stack_link(mat, "curves_rgb", in, out, GPU_texture(size, array)); -} - -void register_node_type_sh_curve_rgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - sh_node_curve_rgb_in, sh_node_curve_rgb_out); - node_type_size(&ntype, 200, 140, 320); - node_type_init(&ntype, node_shader_init_curve_rgb); - node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, node_shader_exec_curve_rgb); - node_type_gpu(&ntype, gpu_shader_curve_rgb); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c b/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c deleted file mode 100644 index d5e5d5eeb93..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c +++ /dev/null @@ -1,792 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2007 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Nathan Letwory - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_dynamic.c - * \ingroup shdnodes - */ - - -/* TODO, support python3.x */ -#undef WITH_PYTHON - -#ifdef WITH_PYTHON -#include -#include -#include -#endif - -#include "DNA_text_types.h" -#include "BKE_text.h" - - -// XXX -#if 0 -#ifdef WITH_PYTHON -#include "api2_2x/Node.h" -#include "api2_2x/gen_utils.h" -#include "BPY_extern.h" -#endif -#endif - -#include "../SHD_util.h" - -// XXX -#if 0 -static void node_dynamic_setup(bNode *node); -static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNodeStack **out); -static void node_dynamic_free_storage_cb(bNode *node); - -#ifdef WITH_PYTHON -static PyObject *init_dynamicdict(void) { - PyObject *newscriptdict, *item; - PyGILState_STATE gilstate = PyGILState_Ensure(); - - newscriptdict= PyDict_New(); - - PyDict_SetItemString(newscriptdict, "__builtins__", PyEval_GetBuiltins()); - item= PyString_FromString("__main__"); - PyDict_SetItemString(newscriptdict, "__name__", item); - Py_DECREF(item); - - PyGILState_Release(gilstate); - - return newscriptdict; -} -#endif - -static bNodeType *node_dynamic_find_typeinfo(ListBase *list, ID *id) -{ - bNodeType *ntype = list->first; - - while(ntype) { - if (ntype->type == NODE_DYNAMIC && ntype->id == id) - break; - ntype = ntype->next; - } - - return ntype; /* NULL if doesn't exist */ -} - -static void node_dynamic_free_typeinfo_sockets(bNodeType *tinfo) -{ - bNodeSocketType *sock; - - if (!tinfo) return; - - if (tinfo->inputs) { - sock = tinfo->inputs; - while (sock->type != -1) { - MEM_freeN(sock->name); - sock++; - } - MEM_freeN(tinfo->inputs); - tinfo->inputs = NULL; - } - if (tinfo->outputs) { - sock = tinfo->outputs; - while (sock->type != -1) { - MEM_freeN(sock->name); - sock++; - } - MEM_freeN(tinfo->outputs); - tinfo->outputs = NULL; - } -} - -static void node_dynamic_free_typeinfo(bNodeType *tinfo) -{ - if (!tinfo) return; - - node_dynamic_free_typeinfo_sockets(tinfo); - - if (tinfo->name) { MEM_freeN(tinfo->name); } - - MEM_freeN(tinfo); -} - -static void node_dynamic_free_sockets(bNode *node) -{ - BLI_freelistN(&node->inputs); - BLI_freelistN(&node->outputs); -} - -/* For now we just remove the socket links. It's the safest - * route, since an update in the script may change completely the - * inputs and outputs. Trying to recreate the node links would be - * nicer for pynode authors, though. */ -static void node_dynamic_update_socket_links(bNode *node, bNodeTree *ntree) -{ - if (ntree) { - nodeVerifyType(ntree, node); - } - else { - Material *ma; - - for (ma= G.main->mat.first; ma; ma= ma->id.next) { - if (ma->nodetree) { - bNode *nd; - for (nd= ma->nodetree->nodes.first; nd; nd = nd->next) { - if (nd == node) nodeVerifyType(ma->nodetree, node); - } - } - } - } -} - -static void node_dynamic_free_storage_cb(bNode *node) -{ -#ifdef WITH_PYTHON - NodeScriptDict *nsd; - PyObject *pydict; - BPy_Node *pynode; - - if (!node->storage) return; - nsd = (NodeScriptDict *)(node->storage); - pydict = nsd->dict; - if (pydict) { - Py_DECREF(pydict); - } - pynode = nsd->node; - if (pynode) { - Py_DECREF(pynode); - } -#endif - MEM_freeN(node->storage); - node->storage = NULL; -} - -/* Disable pynode when its script fails */ -static void node_dynamic_disable(bNode *node) -{ - node->custom1 = 0; - node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ERROR); -} - -/* Disable all pynodes using the given text (script) id */ -static void node_dynamic_disable_all_by_id(ID *id) -{ -#ifdef WITH_PYTHON - Material *ma; /* XXX hardcoded for shaders */ - - for (ma= G.main->mat.first; ma; ma= ma->id.next) { - if (ma->nodetree) { - bNode *nd; - bNodeTree *ntree = ma->nodetree; - for (nd= ntree->nodes.first; nd; nd= nd->next) { - if (nd->id == id) { - nd->custom1 = 0; - nd->custom1 = BSET(nd->custom1, NODE_DYNAMIC_ERROR); - } - } - } - } -#endif -} - -static void node_rem_socklist_links(bNodeTree *ntree, ListBase *lb) -{ - bNodeLink *link, *next; - bNodeSocket *sock; - - if (!lb) return; - - for (sock= lb->first; sock; sock= sock->next) { - for (link= ntree->links.first; link; link= next) { - next= link->next; - if (link->fromsock==sock || link->tosock==sock) { - nodeRemLink(ntree, link); - } - } - } -} - -/* XXX hardcoded for shaders */ -static void node_dynamic_rem_all_links(bNodeType *tinfo) -{ - Material *ma; - int in, out; - - in = tinfo->inputs ? 1 : 0; - out = tinfo->outputs ? 1 : 0; - - if (!in && !out) return; - - for (ma= G.main->mat.first; ma; ma= ma->id.next) { - if (ma->nodetree) { - bNode *nd; - bNodeTree *ntree = ma->nodetree; - for (nd= ntree->nodes.first; nd; nd= nd->next) { - if (nd->typeinfo == tinfo) { - if (in) - node_rem_socklist_links(ntree, &nd->inputs); - if (out) - node_rem_socklist_links(ntree, &nd->outputs); - } - } - } - } -} - -/* node_dynamic_reset: clean a pynode, getting rid of all - * data dynamically created for it. */ -static void node_dynamic_reset(bNode *node, int unlink_text) -{ - bNodeType *tinfo, *tinfo_default; - Material *ma; - - tinfo = node->typeinfo; - tinfo_default = node_dynamic_find_typeinfo(&node_all_shaders, NULL); - - if ((tinfo == tinfo_default) && unlink_text) { - ID *textID = node->id; - /* already at default (empty) state, which happens if this node's - * script failed to parse at the first stage: definition. We're here - * because its text was removed from Blender. */ - for (ma= G.main->mat.first; ma; ma= ma->id.next) { - if (ma->nodetree) { - bNode *nd; - for (nd= ma->nodetree->nodes.first; nd; nd = nd->next) { - if (nd->id == textID) { - nd->id = NULL; - nd->custom1 = 0; - nd->custom1 = BSET(nd->custom1, NODE_DYNAMIC_NEW); - BLI_strncpy(nd->name, "Dynamic", 8); - return; - } - } - } - } - } - - node_dynamic_rem_all_links(tinfo); - node_dynamic_free_typeinfo_sockets(tinfo); - - /* reset all other XXX shader nodes sharing this typeinfo */ - for (ma= G.main->mat.first; ma; ma= ma->id.next) { - if (ma->nodetree) { - bNode *nd; - for (nd= ma->nodetree->nodes.first; nd; nd = nd->next) { - if (nd->typeinfo == tinfo) { - node_dynamic_free_storage_cb(nd); - node_dynamic_free_sockets(nd); - //node_dynamic_update_socket_links(nd, ma->nodetree); - nd->typeinfo = tinfo_default; - if (unlink_text) { - nd->id = NULL; - nd->custom1 = 0; - nd->custom1 = BSET(nd->custom1, NODE_DYNAMIC_NEW); - BLI_strncpy(nd->name, "Dynamic", 8); - } - } - } - } - } - - /* XXX hardcoded for shaders: */ - if (tinfo->id) { BLI_remlink(&node_all_shaders, tinfo); } - node_dynamic_free_typeinfo(tinfo); -} - -/* Special case of the above function: for working pynodes - * that were saved on a .blend but fail for some reason when - * the file is opened. We need this because pynodes are initialized - * before G.main. */ -static void node_dynamic_reset_loaded(bNode *node) -{ - bNodeType *tinfo = node->typeinfo; - - node_dynamic_rem_all_links(tinfo); - node_dynamic_free_typeinfo_sockets(tinfo); - node_dynamic_free_storage_cb(node); - /* XXX hardcoded for shaders: */ - if (tinfo->id) { BLI_remlink(&node_all_shaders, tinfo); } - - node_dynamic_free_typeinfo(tinfo); - node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, NULL); -} - -int nodeDynamicUnlinkText(ID *txtid) { - Material *ma; - bNode *nd; - - /* find one node that uses this text */ - for (ma= G.main->mat.first; ma; ma= ma->id.next) { - if (ma->nodetree) { - for (nd= ma->nodetree->nodes.first; nd; nd = nd->next) { - if ((nd->type == NODE_DYNAMIC) && (nd->id == txtid)) { - node_dynamic_reset(nd, 1); /* found, reset all */ - return 1; - } - } - } - } - return 0; /* no pynodes used this text */ -} - -static void node_dynamic_pyerror_print(bNode *node) -{ -#ifdef WITH_PYTHON - PyGILState_STATE gilstate = PyGILState_Ensure(); - - fprintf(stderr, "\nError in dynamic node script \"%s\":\n", node->name); - if (PyErr_Occurred()) { - PyErr_Print(); - PyErr_Clear(); - PySys_SetObject("last_traceback", NULL); - } - else { fprintf(stderr, "Not a valid dynamic node Python script.\n"); } - - PyGILState_Release(gilstate); -#endif -} - -static void node_dynamic_register_type(bNode *node) -{ - nodeRegisterType(&node_all_shaders, node->typeinfo); - /* nodeRegisterType copied it to a new one, so we - * free the typeinfo itself, but not what it - * points to: */ - MEM_freeN(node->typeinfo); - node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, node->id); - MEM_freeN(node->typeinfo->name); - node->typeinfo->name = BLI_strdup(node->name); -} - -#ifdef WITH_PYTHON -/* node_dynamic_get_pynode: - * Find the pynode definition from the script */ -static PyObject *node_dynamic_get_pynode(PyObject *dict) -{ - PyObject *key= NULL; - Py_ssize_t pos = 0; - PyObject *value = NULL; - - /* script writer specified a node? */ - value = PyDict_GetItemString(dict, "__node__"); - - if (value) { - if (PyObject_TypeCheck(value, &PyType_Type)) { - Py_INCREF(value); - return value; - } - else { - PyErr_SetString(PyExc_TypeError, - "expected class object derived from Scripted node"); - return NULL; - } - } - - /* case not, search for it in the script's global dictionary */ - while (PyDict_Next(dict, &pos, &key, &value)) { - /* skip names we know belong to other available objects */ - if (strcmp("Socket", PyString_AsString(key)) == 0) - continue; - else if (strcmp("Scripted", PyString_AsString(key)) == 0) - continue; - /* naive: we grab the first ob of type 'type': */ - else if (PyObject_TypeCheck(value, &PyType_Type)) { - Py_INCREF(value); - return value; - } - } - - PyErr_SetString(PyExc_TypeError, - "no PyNode definition found in the script!"); - return NULL; -} -#endif /* WITH_PYTHON */ - -static int node_dynamic_parse(struct bNode *node) -{ -#ifndef WITH_PYTHON - return -1; -#else - PyObject *dict= NULL; - PyObject *pynode_data= NULL; - PyObject *pynode= NULL; - PyObject *args= NULL; - NodeScriptDict *nsd = NULL; - PyObject *pyresult = NULL; - char *buf = NULL; - int is_valid_script = 0; - PyGILState_STATE gilstate; - - if (!node->id || !node->storage) - return 0; - - /* READY, no need to be here */ - if (BTST(node->custom1, NODE_DYNAMIC_READY)) - return 0; - - /* for threading */ - gilstate = PyGILState_Ensure(); - - nsd = (NodeScriptDict *)node->storage; - - dict = (PyObject *)(nsd->dict); - buf = txt_to_buf((Text *)node->id); - - pyresult = PyRun_String(buf, Py_file_input, dict, dict); - - MEM_freeN(buf); - - if (!pyresult) { - if (BTST(node->custom1, NODE_DYNAMIC_LOADED)) { - node_dynamic_disable(node); - } else { - node_dynamic_disable_all_by_id(node->id); - } - node_dynamic_pyerror_print(node); - PyGILState_Release(gilstate); - return -1; - } - - Py_DECREF(pyresult); - - pynode_data = node_dynamic_get_pynode(dict); - - if (pynode_data) { - BPy_NodeSocketLists *socklists = Node_CreateSocketLists(node); - - args = Py_BuildValue("(O)", socklists); - - /* init it to get the input and output sockets */ - pynode = PyObject_Call(pynode_data, args, NULL); - - Py_DECREF(pynode_data); - Py_DECREF(socklists); - Py_DECREF(args); - - if (!PyErr_Occurred() && pynode && pytype_is_pynode(pynode)) { - InitNode((BPy_Node *)(pynode), node); - nsd->node = pynode; - node->typeinfo->execfunc = node_dynamic_exec_cb; - is_valid_script = 1; - - /* for NEW, LOADED, REPARSE */ - if (BNTST(node->custom1, NODE_DYNAMIC_ADDEXIST)) { - node->typeinfo->pydict = dict; - node->typeinfo->pynode = pynode; - node->typeinfo->id = node->id; - if (BNTST(node->custom1, NODE_DYNAMIC_LOADED)) - nodeAddSockets(node, node->typeinfo); - if (BNTST(node->custom1, NODE_DYNAMIC_REPARSE)) - node_dynamic_register_type(node); - } - - node->custom1 = 0; - node->custom1 = BSET(node->custom1, NODE_DYNAMIC_READY); - } - } - - PyGILState_Release(gilstate); - - if (!is_valid_script) { /* not a valid pynode script */ - node_dynamic_disable_all_by_id(node->id); - node_dynamic_pyerror_print(node); - return -1; - } - - return 0; -#endif -} - -/* node_dynamic_setup: prepare for execution (state: NODE_DYNAMIC_READY) - * pynodes already linked to a script (node->id != NULL). */ -static void node_dynamic_setup(bNode *node) -{ -#ifdef WITH_PYTHON - NodeScriptDict *nsd = NULL; - bNodeTree *nodetree = NULL; - bNodeType *ntype = NULL; - PyGILState_STATE gilstate; - - /* Possible cases: - * NEW - * ADDEXIST - * LOADED - * REPARSE - * ERROR - * READY - */ - - /* NEW, but not linked to a script: link default (empty) typeinfo */ - if (!node->id) { - node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, - NULL); - return; - } - - /* READY, no need to be here */ - if (BTST(node->custom1, NODE_DYNAMIC_READY)) - return; - - gilstate = PyGILState_Ensure(); - - /* ERROR, reset to (empty) defaults */ - if (BCLR(node->custom1, NODE_DYNAMIC_ERROR) == 0) { - node_dynamic_reset(node, 0); - PyGILState_Release(gilstate); - return; - } - - /* User asked to update this pynode, prepare it for reparsing */ - if (BTST(node->custom1, NODE_DYNAMIC_REPARSE)) { - int needs_parsing = 1; - - node->custom1 = BSET(node->custom1, NODE_DYNAMIC_NEW); - - if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) { - node->custom1 = BCLR(node->custom1, NODE_DYNAMIC_REPARSE); - ntype = node_dynamic_find_typeinfo(&node_all_shaders, node->id); - - if (ntype) { - node->typeinfo = ntype; - node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ADDEXIST); - node->custom1 = BCLR(node->custom1, NODE_DYNAMIC_ERROR); - needs_parsing = 0; - } - else { nodeMakeDynamicType(node); } - - } else { - node_dynamic_rem_all_links(node->typeinfo); - node_dynamic_free_typeinfo_sockets(node->typeinfo); - node_dynamic_update_socket_links(node, NULL); - node_dynamic_free_storage_cb(node); - } - - if (needs_parsing) { - nsd = MEM_callocN(sizeof(NodeScriptDict), "node script dictionary"); - nsd->dict = init_dynamicdict(); - node->storage = nsd; - /* prepared, now reparse: */ - node_dynamic_parse(node); - PyGILState_Release(gilstate); - return; - } - } - else if (BTST(node->custom1, NODE_DYNAMIC_LOADED)) { - /* when loading from a .blend we don't have G.main yet, so we - * quickly abuse node->storage in ntreeInitTypes (node.c) to have - * our nodetree ptr (needed if a pynode script that worked before - * saving the .blend for some reason fails upon loading): */ - nodetree = (bNodeTree *)node->storage; - node->storage = NULL; - } - - if (node->storage) - fprintf(stderr, "\nDEBUG: PYNODES ERROR: non NULL node->storage in node_dynamic_setup()\n"); - - nsd = MEM_callocN(sizeof(NodeScriptDict), "node script dictionary"); - node->storage = nsd; - - /* NEW, LOADED or REPARSE */ - if (BNTST(node->custom1, NODE_DYNAMIC_ADDEXIST)) { - /* check if there's already a bNodeType linked to this script */ - /* (XXX hardcoded for shader nodes for now) */ - ntype = node_dynamic_find_typeinfo(&node_all_shaders, node->id); - - if (ntype) { /* if so, reuse it */ - node->typeinfo = ntype; - /* so this is actually an ADDEXIST type */ - node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ADDEXIST); - } - else { /* create bNodeType for this pynode */ - nodeMakeDynamicType(node); - nsd->dict = init_dynamicdict(); - if ((node_dynamic_parse(node) == -1) && nodetree) { - node_dynamic_reset_loaded(node); - } - PyGILState_Release(gilstate); - return; - } - } - - /* ADDEXIST: new pynode linked to an already registered dynamic type, - * we just reuse existing py dict and pynode */ - nsd->dict = node->typeinfo->pydict; - nsd->node = node->typeinfo->pynode; - - Py_INCREF((PyObject *)(nsd->dict)); - Py_INCREF((PyObject *)(nsd->node)); - - if (BTST(node->custom1, NODE_DYNAMIC_NEW)) { - nodeAddSockets(node, node->typeinfo); - node->custom1 = BCLR(node->custom1, NODE_DYNAMIC_NEW); - } - - node->custom1 = BCLR(node->custom1, NODE_DYNAMIC_ADDEXIST); - node->custom1 = BSET(node->custom1, NODE_DYNAMIC_READY); - - PyGILState_Release(gilstate); -#endif /* WITH_PYTHON */ - return; -} - -/* node_dynamic_init_cb callback: called when a pynode is created. - * The pynode type is passed via node->custom2. It can be: - * 0: for loaded empty nodes - * NODE_DYNAMIC_MENU: for the default Dynamic node type - * > NODE_DYNAMIC_MENU: for the new types defined by scripts -*/ -static void node_dynamic_init_cb(bNode *node) { - int type = node->custom2; - - node->custom2 = 0; - - if (type >= NODE_DYNAMIC_MENU) { - node->custom1 = 0; - - if (type == NODE_DYNAMIC_MENU) { - node->custom1 = BSET(node->custom1, NODE_DYNAMIC_NEW); - return; - } - - node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ADDEXIST); - node->id = node->typeinfo->id; - } - - node_dynamic_setup(node); -} - -/* node_dynamic_copy_cb: pynode copy callback */ -static void node_dynamic_copy_cb(bNode *orig_node, bNode *new_node) -{ -#ifndef WITH_PYTHON - return; -#else - NodeScriptDict *nsd; - PyGILState_STATE gilstate; - - if (!orig_node->storage) return; - - nsd = (NodeScriptDict *)(orig_node->storage); - new_node->storage = MEM_dupallocN(orig_node->storage); - - gilstate = PyGILState_Ensure(); - - if (nsd->node) - Py_INCREF((PyObject *)(nsd->node)); - if (nsd->dict) - Py_INCREF((PyObject *)(nsd->dict)); - - PyGILState_Release(gilstate); -#endif -} - -/* node_dynamic_exec_cb: the execution callback called per pixel - * during rendering. */ -static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNodeStack **out) { -#ifndef WITH_PYTHON - return; -#else - BPy_Node *mynode = NULL; - NodeScriptDict *nsd = NULL; - PyObject *pyresult = NULL; - PyObject *args = NULL; - ShadeInput *shi; - PyGILState_STATE gilstate; - - if (!node->id) - return; - - /*if (G.scene->r.threads > 1) - return;*/ - - if (BTST2(node->custom1, NODE_DYNAMIC_NEW, NODE_DYNAMIC_REPARSE)) { - node_dynamic_setup(node); - return; - } - - if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) { - if (node->storage) node_dynamic_setup(node); - return; - } - - if (BTST(node->custom1, NODE_DYNAMIC_READY)) { - nsd = (NodeScriptDict *)node->storage; - mynode = (BPy_Node *)(nsd->node); - - - if (mynode && PyCallable_Check((PyObject *)mynode)) { - - gilstate = PyGILState_Ensure(); - - mynode->node = node; - shi = ((ShaderCallData *)data)->shi; - - Node_SetStack(mynode, in, NODE_INPUTSTACK); - Node_SetStack(mynode, out, NODE_OUTPUTSTACK); - Node_SetShi(mynode, shi); - - args=Py_BuildValue("()"); - pyresult= PyObject_Call((PyObject *)mynode, args, NULL); - Py_DECREF(args); - - if (!pyresult) { - PyGILState_Release(gilstate); - node_dynamic_disable_all_by_id(node->id); - node_dynamic_pyerror_print(node); - node_dynamic_setup(node); - return; - } - Py_DECREF(pyresult); - PyGILState_Release(gilstate); - } - } -#endif -} - -void register_node_type_sh_dynamic(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, NODE_OPTIONS, NULL, NULL); - node_type_size(&ntype, 150, 60, 300); - node_type_init(&ntype, node_dynamic_init_cb); - node_type_storage(&ntype, "NodeScriptDict", node_dynamic_free_storage_cb, node_dynamic_copy_cb); - node_type_exec(&ntype, node_dynamic_exec_cb); - - nodeRegisterType(lb, &ntype); -} - -#else - -void register_node_type_sh_dynamic(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, 0, NULL, NULL); - - nodeRegisterType(lb, &ntype); -} - -#endif - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_geom.c b/source/blender/nodes/intern/SHD_nodes/SHD_geom.c deleted file mode 100644 index 379f54bec57..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_geom.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_geom.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -#include "DNA_customdata_types.h" - -/* **************** GEOMETRY ******************** */ - -/* output socket type definition */ -static bNodeSocketType sh_node_geom_out[]= { - { SOCK_VECTOR, 0, "Global", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, /* btw; uses no limit */ - { SOCK_VECTOR, 0, "Local", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_VECTOR, 0, "View", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_VECTOR, 0, "Orco", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_VECTOR, 0, "UV", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_RGBA, 0, "Vertex Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Front/Back", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* node execute callback */ -static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) -{ - if(data) { - ShadeInput *shi= ((ShaderCallData *)data)->shi; - NodeGeometry *ngeo= (NodeGeometry*)node->storage; - ShadeInputUV *suv= &shi->uv[shi->actuv]; - static float defaultvcol[4] = {1.0f, 1.0f, 1.0f, 1.0f}; - int i; - - if(ngeo->uvname[0]) { - /* find uv layer by name */ - for(i = 0; i < shi->totuv; i++) { - if(strcmp(shi->uv[i].name, ngeo->uvname)==0) { - suv= &shi->uv[i]; - break; - } - } - } - - /* out: global, local, view, orco, uv, normal, vertex color */ - VECCOPY(out[GEOM_OUT_GLOB]->vec, shi->gl); - VECCOPY(out[GEOM_OUT_LOCAL]->vec, shi->co); - VECCOPY(out[GEOM_OUT_VIEW]->vec, shi->view); - VECCOPY(out[GEOM_OUT_ORCO]->vec, shi->lo); - VECCOPY(out[GEOM_OUT_UV]->vec, suv->uv); - VECCOPY(out[GEOM_OUT_NORMAL]->vec, shi->vno); - - if (shi->totcol) { - /* find vertex color layer by name */ - ShadeInputCol *scol= &shi->col[0]; - - if(ngeo->colname[0]) { - for(i = 0; i < shi->totcol; i++) { - if(strcmp(shi->col[i].name, ngeo->colname)==0) { - scol= &shi->col[i]; - break; - } - } - } - - VECCOPY(out[GEOM_OUT_VCOL]->vec, scol->col); - out[GEOM_OUT_VCOL]->vec[3]= 1.0f; - } - else - memcpy(out[GEOM_OUT_VCOL]->vec, defaultvcol, sizeof(defaultvcol)); - - if(shi->osatex) { - out[GEOM_OUT_GLOB]->data= shi->dxgl; - out[GEOM_OUT_GLOB]->datatype= NS_OSA_VECTORS; - out[GEOM_OUT_LOCAL]->data= shi->dxco; - out[GEOM_OUT_LOCAL]->datatype= NS_OSA_VECTORS; - out[GEOM_OUT_VIEW]->data= &shi->dxview; - out[GEOM_OUT_VIEW]->datatype= NS_OSA_VALUES; - out[GEOM_OUT_ORCO]->data= shi->dxlo; - out[GEOM_OUT_ORCO]->datatype= NS_OSA_VECTORS; - out[GEOM_OUT_UV]->data= suv->dxuv; - out[GEOM_OUT_UV]->datatype= NS_OSA_VECTORS; - out[GEOM_OUT_NORMAL]->data= shi->dxno; - out[GEOM_OUT_NORMAL]->datatype= NS_OSA_VECTORS; - } - - /* front/back, normal flipping was stored */ - out[GEOM_OUT_FRONTBACK]->vec[0]= (shi->flippednor)? 0.0f: 1.0f; - } -} - -static void node_shader_init_geometry(bNode *node) -{ - node->storage= MEM_callocN(sizeof(NodeGeometry), "NodeGeometry"); -} - -static int gpu_shader_geom(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - NodeGeometry *ngeo= (NodeGeometry*)node->storage; - GPUNodeLink *orco = GPU_attribute(CD_ORCO, ""); - GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, ngeo->uvname); - GPUNodeLink *mcol = GPU_attribute(CD_MCOL, ngeo->colname); - - return GPU_stack_link(mat, "geom", in, out, - GPU_builtin(GPU_VIEW_POSITION), GPU_builtin(GPU_VIEW_NORMAL), - GPU_builtin(GPU_INVERSE_VIEW_MATRIX), orco, mtface, mcol); -} - -/* node type definition */ -void register_node_type_sh_geom(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_GEOMETRY, "Geometry", NODE_CLASS_INPUT, NODE_OPTIONS, - NULL, sh_node_geom_out); - node_type_size(&ntype, 120, 80, 160); - node_type_init(&ntype, node_shader_init_geometry); - node_type_storage(&ntype, "NodeGeometry", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_shader_exec_geom); - node_type_gpu(&ntype, gpu_shader_geom); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c b/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c deleted file mode 100644 index 91fd995dbbe..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Juho Vepsäläinen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - - -/* **************** Hue Saturation ******************** */ -static bNodeSocketType sh_node_hue_sat_in[]= { - { SOCK_VALUE, 1, "Hue", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Saturation", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f}, - { SOCK_VALUE, 1, "Value", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f}, - { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType sh_node_hue_sat_out[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* note: it would be possible to use CMP version for both nodes */ -static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float *hue, float *sat, float *val, float *in, float *fac) -{ - if(*fac!=0.0f && (*hue!=0.5f || *sat!=1.0f || *val!=1.0f)) { - float col[3], hsv[3], mfac= 1.0f - *fac; - - rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); - hsv[0]+= (*hue - 0.5f); - if(hsv[0]>1.0f) hsv[0]-=1.0f; else if(hsv[0]<0.0f) hsv[0]+= 1.0f; - hsv[1]*= *sat; - hsv[2]*= *val; - hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); - - out[0]= mfac*in[0] + *fac*col[0]; - out[1]= mfac*in[1] + *fac*col[1]; - out[2]= mfac*in[2] + *fac*col[2]; - } - else { - QUATCOPY(out, in); - } -} - -static void node_shader_exec_hue_sat(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - do_hue_sat_fac(node, out[0]->vec, in[0]->vec, in[1]->vec, in[2]->vec, in[4]->vec, in[3]->vec); -} - - -static int gpu_shader_hue_sat(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) -{ - return GPU_stack_link(mat, "hue_sat", in, out); -} - -void register_node_type_sh_hue_sat(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - sh_node_hue_sat_in, sh_node_hue_sat_out); - node_type_size(&ntype, 150, 80, 250); - node_type_exec(&ntype, node_shader_exec_hue_sat); - node_type_gpu(&ntype, gpu_shader_hue_sat); - - nodeRegisterType(lb, &ntype); -} - - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_invert.c b/source/blender/nodes/intern/SHD_nodes/SHD_invert.c deleted file mode 100644 index f8d6e54859e..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_invert.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_invert.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - - - -/* **************** INVERT ******************** */ -static bNodeSocketType sh_node_invert_in[]= { - { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_invert_out[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_invert(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, -bNodeStack **out) -{ - float col[3], facm; - - col[0] = 1.0f - in[1]->vec[0]; - col[1] = 1.0f - in[1]->vec[1]; - col[2] = 1.0f - in[1]->vec[2]; - - /* if fac, blend result against original input */ - if (in[0]->vec[0] < 1.0f) { - facm = 1.0f - in[0]->vec[0]; - - col[0] = in[0]->vec[0]*col[0] + (facm*in[1]->vec[0]); - col[1] = in[0]->vec[0]*col[1] + (facm*in[1]->vec[1]); - col[2] = in[0]->vec[0]*col[2] + (facm*in[1]->vec[2]); - } - - VECCOPY(out[0]->vec, col); -} - -static int gpu_shader_invert(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) -{ - return GPU_stack_link(mat, "invert", in, out); -} - -void register_node_type_sh_invert(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - sh_node_invert_in, sh_node_invert_out); - node_type_size(&ntype, 90, 80, 100); - node_type_exec(&ntype, node_shader_exec_invert); - node_type_gpu(&ntype, gpu_shader_invert); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_mapping.c b/source/blender/nodes/intern/SHD_nodes/SHD_mapping.c deleted file mode 100644 index eb300301ce2..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_mapping.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_mapping.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** MAPPING ******************** */ -static bNodeSocketType sh_node_mapping_in[]= { - { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_mapping_out[]= { - { SOCK_VECTOR, 0, "Vector", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -/* do the regular mapping options for blender textures */ -static void node_shader_exec_mapping(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - TexMapping *texmap= node->storage; - float *vec= out[0]->vec; - - /* stack order input: vector */ - /* stack order output: vector */ - nodestack_get_vec(vec, SOCK_VECTOR, in[0]); - mul_m4_v3(texmap->mat, vec); - - if(texmap->flag & TEXMAP_CLIP_MIN) { - if(vec[0]min[0]) vec[0]= texmap->min[0]; - if(vec[1]min[1]) vec[1]= texmap->min[1]; - if(vec[2]min[2]) vec[2]= texmap->min[2]; - } - if(texmap->flag & TEXMAP_CLIP_MAX) { - if(vec[0]>texmap->max[0]) vec[0]= texmap->max[0]; - if(vec[1]>texmap->max[1]) vec[1]= texmap->max[1]; - if(vec[2]>texmap->max[2]) vec[2]= texmap->max[2]; - } -} - - -static void node_shader_init_mapping(bNode *node) -{ - node->storage= add_mapping(); -} - -static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - TexMapping *texmap= node->storage; - float domin= (texmap->flag & TEXMAP_CLIP_MIN) != 0; - float domax= (texmap->flag & TEXMAP_CLIP_MAX) != 0; - GPUNodeLink *tmat = GPU_uniform((float*)texmap->mat); - GPUNodeLink *tmin = GPU_uniform(texmap->min); - GPUNodeLink *tmax = GPU_uniform(texmap->max); - GPUNodeLink *tdomin = GPU_uniform(&domin); - GPUNodeLink *tdomax = GPU_uniform(&domax); - - return GPU_stack_link(mat, "mapping", in, out, tmat, tmin, tmax, tdomin, tdomax); -} - -void register_node_type_sh_mapping(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR, NODE_OPTIONS, - sh_node_mapping_in, sh_node_mapping_out); - node_type_size(&ntype, 240, 160, 320); - node_type_init(&ntype, node_shader_init_mapping); - node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_shader_exec_mapping); - node_type_gpu(&ntype, gpu_shader_mapping); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_material.c b/source/blender/nodes/intern/SHD_nodes/SHD_material.c deleted file mode 100644 index f78dd9ec727..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_material.c +++ /dev/null @@ -1,336 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_material.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** MATERIAL ******************** */ - -static bNodeSocketType sh_node_material_in[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_material_out[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -/* **************** EXTENDED MATERIAL ******************** */ - -static bNodeSocketType sh_node_material_ext_in[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_RGBA, 1, "Mirror", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Ambient", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Emit", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "SpecTra", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Ray Mirror", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Alpha", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Translucency", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_material_ext_out[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_RGBA, 0, "Diffuse", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "Spec", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 0, "AO", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - if(data && node->id) { - ShadeResult shrnode; - ShadeInput *shi; - ShaderCallData *shcd= data; - float col[4]; - bNodeSocket *sock; - char hasinput[NUM_MAT_IN]= {'\0'}; - int i; - - /* note: cannot use the in[]->hasinput flags directly, as these are not necessarily - * the constant input stack values (e.g. in case material node is inside a group). - * we just want to know if a node input uses external data or the material setting. - * this is an ugly hack, but so is this node as a whole. - */ - for (sock=node->inputs.first, i=0; sock; sock=sock->next, ++i) - hasinput[i] = (sock->link != NULL); - - shi= shcd->shi; - shi->mat= (Material *)node->id; - - /* copy all relevant material vars, note, keep this synced with render_types.h */ - memcpy(&shi->r, &shi->mat->r, 23*sizeof(float)); - shi->har= shi->mat->har; - - /* write values */ - if(hasinput[MAT_IN_COLOR]) - nodestack_get_vec(&shi->r, SOCK_VECTOR, in[MAT_IN_COLOR]); - - if(hasinput[MAT_IN_SPEC]) - nodestack_get_vec(&shi->specr, SOCK_VECTOR, in[MAT_IN_SPEC]); - - if(hasinput[MAT_IN_REFL]) - nodestack_get_vec(&shi->refl, SOCK_VALUE, in[MAT_IN_REFL]); - - /* retrieve normal */ - if(hasinput[MAT_IN_NORMAL]) { - nodestack_get_vec(shi->vn, SOCK_VECTOR, in[MAT_IN_NORMAL]); - normalize_v3(shi->vn); - } - else - VECCOPY(shi->vn, shi->vno); - - /* custom option to flip normal */ - if(node->custom1 & SH_NODE_MAT_NEG) { - shi->vn[0]= -shi->vn[0]; - shi->vn[1]= -shi->vn[1]; - shi->vn[2]= -shi->vn[2]; - } - - if (node->type == SH_NODE_MATERIAL_EXT) { - if(hasinput[MAT_IN_MIR]) - nodestack_get_vec(&shi->mirr, SOCK_VECTOR, in[MAT_IN_MIR]); - if(hasinput[MAT_IN_AMB]) - nodestack_get_vec(&shi->amb, SOCK_VALUE, in[MAT_IN_AMB]); - if(hasinput[MAT_IN_EMIT]) - nodestack_get_vec(&shi->emit, SOCK_VALUE, in[MAT_IN_EMIT]); - if(hasinput[MAT_IN_SPECTRA]) - nodestack_get_vec(&shi->spectra, SOCK_VALUE, in[MAT_IN_SPECTRA]); - if(hasinput[MAT_IN_RAY_MIRROR]) - nodestack_get_vec(&shi->ray_mirror, SOCK_VALUE, in[MAT_IN_RAY_MIRROR]); - if(hasinput[MAT_IN_ALPHA]) - nodestack_get_vec(&shi->alpha, SOCK_VALUE, in[MAT_IN_ALPHA]); - if(hasinput[MAT_IN_TRANSLUCENCY]) - nodestack_get_vec(&shi->translucency, SOCK_VALUE, in[MAT_IN_TRANSLUCENCY]); - } - - shi->nodes= 1; /* temp hack to prevent trashadow recursion */ - node_shader_lamp_loop(shi, &shrnode); /* clears shrnode */ - shi->nodes= 0; - - /* write to outputs */ - if(node->custom1 & SH_NODE_MAT_DIFF) { - VECCOPY(col, shrnode.combined); - if(!(node->custom1 & SH_NODE_MAT_SPEC)) { - sub_v3_v3(col, shrnode.spec); - } - } - else if(node->custom1 & SH_NODE_MAT_SPEC) { - VECCOPY(col, shrnode.spec); - } - else - col[0]= col[1]= col[2]= 0.0f; - - col[3]= shrnode.alpha; - - if(shi->do_preview) - nodeAddToPreview(node, col, shi->xs, shi->ys, shi->do_manage); - - VECCOPY(out[MAT_OUT_COLOR]->vec, col); - out[MAT_OUT_ALPHA]->vec[0]= shrnode.alpha; - - if(node->custom1 & SH_NODE_MAT_NEG) { - shi->vn[0]= -shi->vn[0]; - shi->vn[1]= -shi->vn[1]; - shi->vn[2]= -shi->vn[2]; - } - - VECCOPY(out[MAT_OUT_NORMAL]->vec, shi->vn); - - /* Extended material options */ - if (node->type == SH_NODE_MATERIAL_EXT) { - /* Shadow, Reflect, Refract, Radiosity, Speed seem to cause problems inside - * a node tree :( */ - VECCOPY(out[MAT_OUT_DIFFUSE]->vec, shrnode.diff); - VECCOPY(out[MAT_OUT_SPEC]->vec, shrnode.spec); - VECCOPY(out[MAT_OUT_AO]->vec, shrnode.ao); - } - - /* copy passes, now just active node */ - if(node->flag & NODE_ACTIVE_ID) { - float combined[4], alpha; - - copy_v4_v4(combined, shcd->shr->combined); - alpha= shcd->shr->alpha; - - *(shcd->shr)= shrnode; - - copy_v4_v4(shcd->shr->combined, combined); - shcd->shr->alpha= alpha; - } - } -} - - -static void node_shader_init_material(bNode* node) -{ - node->custom1= SH_NODE_MAT_DIFF|SH_NODE_MAT_SPEC; -} - -/* XXX this is also done as a local static function in gpu_codegen.c, - * but we need this to hack around the crappy material node. - */ -static GPUNodeLink *gpu_get_input_link(GPUNodeStack *in) -{ - if (in->link) - return in->link; - else - return GPU_uniform(in->vec); -} - -static int gpu_shader_material(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - if(node->id) { - GPUShadeInput shi; - GPUShadeResult shr; - bNodeSocket *sock; - char hasinput[NUM_MAT_IN]= {'\0'}; - int i; - - /* note: cannot use the in[]->hasinput flags directly, as these are not necessarily - * the constant input stack values (e.g. in case material node is inside a group). - * we just want to know if a node input uses external data or the material setting. - */ - for (sock=node->inputs.first, i=0; sock; sock=sock->next, ++i) - hasinput[i] = (sock->link != NULL); - - GPU_shadeinput_set(mat, (Material*)node->id, &shi); - - /* write values */ - if(hasinput[MAT_IN_COLOR]) - shi.rgb = gpu_get_input_link(&in[MAT_IN_COLOR]); - - if(hasinput[MAT_IN_SPEC]) - shi.specrgb = gpu_get_input_link(&in[MAT_IN_SPEC]); - - if(hasinput[MAT_IN_REFL]) - shi.refl = gpu_get_input_link(&in[MAT_IN_REFL]); - - /* retrieve normal */ - if(hasinput[MAT_IN_NORMAL]) { - GPUNodeLink *tmp; - shi.vn = gpu_get_input_link(&in[MAT_IN_NORMAL]); - GPU_link(mat, "vec_math_normalize", shi.vn, &shi.vn, &tmp); - } - - /* custom option to flip normal */ - if(node->custom1 & SH_NODE_MAT_NEG) - GPU_link(mat, "vec_math_negate", shi.vn, &shi.vn); - - if (node->type == SH_NODE_MATERIAL_EXT) { - if(hasinput[MAT_IN_AMB]) - shi.amb= gpu_get_input_link(&in[MAT_IN_AMB]); - if(hasinput[MAT_IN_EMIT]) - shi.emit= gpu_get_input_link(&in[MAT_IN_EMIT]); - if(hasinput[MAT_IN_ALPHA]) - shi.alpha= gpu_get_input_link(&in[MAT_IN_ALPHA]); - } - - GPU_shaderesult_set(&shi, &shr); /* clears shr */ - - /* write to outputs */ - if(node->custom1 & SH_NODE_MAT_DIFF) { - out[MAT_OUT_COLOR].link= shr.combined; - - if(!(node->custom1 & SH_NODE_MAT_SPEC)) { - GPUNodeLink *link; - GPU_link(mat, "vec_math_sub", shr.combined, shr.spec, &out[MAT_OUT_COLOR].link, &link); - } - } - else if(node->custom1 & SH_NODE_MAT_SPEC) { - out[MAT_OUT_COLOR].link= shr.spec; - } - else - GPU_link(mat, "set_rgb_zero", &out[MAT_OUT_COLOR].link); - - GPU_link(mat, "mtex_alpha_to_col", out[MAT_OUT_COLOR].link, shr.alpha, &out[MAT_OUT_COLOR].link); - - out[MAT_OUT_ALPHA].link = shr.alpha; // - - if(node->custom1 & SH_NODE_MAT_NEG) - GPU_link(mat, "vec_math_negate", shi.vn, &shi.vn); - out[MAT_OUT_NORMAL].link = shi.vn; - - if (node->type == SH_NODE_MATERIAL_EXT) { - out[MAT_OUT_DIFFUSE].link = shr.diff; - out[MAT_OUT_SPEC].link = shr.spec; - } - - return 1; - } - - return 0; -} - -void register_node_type_sh_material(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_MATERIAL, "Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW, - sh_node_material_in, sh_node_material_out); - node_type_size(&ntype, 120, 80, 240); - node_type_init(&ntype, node_shader_init_material); - node_type_exec(&ntype, node_shader_exec_material); - node_type_gpu(&ntype, gpu_shader_material); - - nodeRegisterType(lb, &ntype); -} - - -void register_node_type_sh_material_ext(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_MATERIAL_EXT, "Extended Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW, - sh_node_material_ext_in, sh_node_material_ext_out); - node_type_size(&ntype, 120, 80, 240); - node_type_init(&ntype, node_shader_init_material); - node_type_exec(&ntype, node_shader_exec_material); - node_type_gpu(&ntype, gpu_shader_material); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_math.c b/source/blender/nodes/intern/SHD_nodes/SHD_math.c deleted file mode 100644 index dd0a564dc4b..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_math.c +++ /dev/null @@ -1,256 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_math.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - - -/* **************** SCALAR MATH ******************** */ -static bNodeSocketType sh_node_math_in[]= { - { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f}, - { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_math_out[]= { - { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_math(void *UNUSED(data), bNode *node, bNodeStack **in, -bNodeStack **out) -{ - switch(node->custom1){ - - case 0: /* Add */ - out[0]->vec[0]= in[0]->vec[0] + in[1]->vec[0]; - break; - case 1: /* Subtract */ - out[0]->vec[0]= in[0]->vec[0] - in[1]->vec[0]; - break; - case 2: /* Multiply */ - out[0]->vec[0]= in[0]->vec[0] * in[1]->vec[0]; - break; - case 3: /* Divide */ - { - if(in[1]->vec[0]==0) /* We don't want to divide by zero. */ - out[0]->vec[0]= 0.0; - else - out[0]->vec[0]= in[0]->vec[0] / in[1]->vec[0]; - } - break; - case 4: /* Sine */ - { - if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - out[0]->vec[0]= sin(in[0]->vec[0]); - else - out[0]->vec[0]= sin(in[1]->vec[0]); - } - break; - case 5: /* Cosine */ - { - if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - out[0]->vec[0]= cos(in[0]->vec[0]); - else - out[0]->vec[0]= cos(in[1]->vec[0]); - } - break; - case 6: /* Tangent */ - { - if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - out[0]->vec[0]= tan(in[0]->vec[0]); - else - out[0]->vec[0]= tan(in[1]->vec[0]); - } - break; - case 7: /* Arc-Sine */ - { - if(in[0]->hasinput || !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ - /* Can't do the impossible... */ - if( in[0]->vec[0] <= 1 && in[0]->vec[0] >= -1 ) - out[0]->vec[0]= asin(in[0]->vec[0]); - else - out[0]->vec[0]= 0.0; - } - else { - /* Can't do the impossible... */ - if( in[1]->vec[0] <= 1 && in[1]->vec[0] >= -1 ) - out[0]->vec[0]= asin(in[1]->vec[0]); - else - out[0]->vec[0]= 0.0; - } - } - break; - case 8: /* Arc-Cosine */ - { - if(in[0]->hasinput || !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ - /* Can't do the impossible... */ - if( in[0]->vec[0] <= 1 && in[0]->vec[0] >= -1 ) - out[0]->vec[0]= acos(in[0]->vec[0]); - else - out[0]->vec[0]= 0.0; - } - else { - /* Can't do the impossible... */ - if( in[1]->vec[0] <= 1 && in[1]->vec[0] >= -1 ) - out[0]->vec[0]= acos(in[1]->vec[0]); - else - out[0]->vec[0]= 0.0; - } - } - break; - case 9: /* Arc-Tangent */ - { - if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - out[0]->vec[0]= atan(in[0]->vec[0]); - else - out[0]->vec[0]= atan(in[1]->vec[0]); - } - break; - case 10: /* Power */ - { - /* Don't want any imaginary numbers... */ - if( in[0]->vec[0] >= 0 ) - out[0]->vec[0]= pow(in[0]->vec[0], in[1]->vec[0]); - else - out[0]->vec[0]= 0.0; - } - break; - case 11: /* Logarithm */ - { - /* Don't want any imaginary numbers... */ - if( in[0]->vec[0] > 0 && in[1]->vec[0] > 0 ) - out[0]->vec[0]= log(in[0]->vec[0]) / log(in[1]->vec[0]); - else - out[0]->vec[0]= 0.0; - } - break; - case 12: /* Minimum */ - { - if( in[0]->vec[0] < in[1]->vec[0] ) - out[0]->vec[0]= in[0]->vec[0]; - else - out[0]->vec[0]= in[1]->vec[0]; - } - break; - case 13: /* Maximum */ - { - if( in[0]->vec[0] > in[1]->vec[0] ) - out[0]->vec[0]= in[0]->vec[0]; - else - out[0]->vec[0]= in[1]->vec[0]; - } - break; - case 14: /* Round */ - { - if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ - out[0]->vec[0]= (in[0]->vec[0]<0)?(int)(in[0]->vec[0] - 0.5f):(int)(in[0]->vec[0] + 0.5f); - else - out[0]->vec[0]= (in[1]->vec[0]<0)?(int)(in[1]->vec[0] - 0.5f):(int)(in[1]->vec[0] + 0.5f); - } - break; - case 15: /* Less Than */ - { - if( in[0]->vec[0] < in[1]->vec[0] ) - out[0]->vec[0]= 1.0f; - else - out[0]->vec[0]= 0.0f; - } - break; - case 16: /* Greater Than */ - { - if( in[0]->vec[0] > in[1]->vec[0] ) - out[0]->vec[0]= 1.0f; - else - out[0]->vec[0]= 0.0f; - } - break; - } -} - -static int gpu_shader_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - static const char *names[] = {"math_add", "math_subtract", "math_multiply", - "math_divide", "math_sine", "math_cosine", "math_tangent", "math_asin", - "math_acos", "math_atan", "math_pow", "math_log", "math_min", "math_max", - "math_round", "math_less_than", "math_greater_than"}; - - switch (node->custom1) { - case 0: - case 1: - case 2: - case 3: - case 10: - case 11: - case 12: - case 13: - case 15: - case 16: - GPU_stack_link(mat, names[node->custom1], NULL, out, - GPU_socket(&in[0]), GPU_socket(&in[1])); - break; - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 14: - if(in[0].hasinput || !in[1].hasinput) - GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[0])); - else - GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[1])); - break; - default: - return 0; - } - - return 1; -} - -void register_node_type_sh_math(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - sh_node_math_in, sh_node_math_out); - node_type_size(&ntype, 120, 110, 160); - node_type_label(&ntype, node_math_label); - node_type_storage(&ntype, "node_math", NULL, NULL); - node_type_exec(&ntype, node_shader_exec_math); - node_type_gpu(&ntype, gpu_shader_math); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c b/source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c deleted file mode 100644 index 8b3033a98ca..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_mixRgb.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** MIX RGB ******************** */ -static bNodeSocketType sh_node_mix_rgb_in[]= { - { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Color1", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA, 1, "Color2", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType sh_node_mix_rgb_out[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_mix_rgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: fac, col1, col2 */ - /* stack order out: col */ - float col[3]; - float fac; - float vec[3]; - - nodestack_get_vec(&fac, SOCK_VALUE, in[0]); - CLAMP(fac, 0.0f, 1.0f); - - nodestack_get_vec(col, SOCK_VECTOR, in[1]); - nodestack_get_vec(vec, SOCK_VECTOR, in[2]); - - ramp_blend(node->custom1, col, col+1, col+2, fac, vec); - VECCOPY(out[0]->vec, col); -} - -static int gpu_shader_mix_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - static const char *names[] = {"mix_blend", "mix_add", "mix_mult", "mix_sub", - "mix_screen", "mix_div", "mix_diff", "mix_dark", "mix_light", - "mix_overlay", "mix_dodge", "mix_burn", "mix_hue", "mix_sat", - "mix_val", "mix_color", "mix_soft", "mix_linear"}; - - return GPU_stack_link(mat, names[node->custom1], in, out); -} - - -void register_node_type_sh_mix_rgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - sh_node_mix_rgb_in, sh_node_mix_rgb_out); - node_type_size(&ntype, 100, 60, 150); - node_type_label(&ntype, node_blend_label); - node_type_exec(&ntype, node_shader_exec_mix_rgb); - node_type_gpu(&ntype, gpu_shader_mix_rgb); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_normal.c b/source/blender/nodes/intern/SHD_nodes/SHD_normal.c deleted file mode 100644 index a4e39935cea..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_normal.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_normal.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** NORMAL ******************** */ -static bNodeSocketType sh_node_normal_in[]= { - { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_normal_out[]= { - { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { SOCK_VALUE, 0, "Dot", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* generates normal, does dot product */ -static void node_shader_exec_normal(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - bNodeSocket *sock= node->outputs.first; - float vec[3]; - - /* stack order input: normal */ - /* stack order output: normal, value */ - - nodestack_get_vec(vec, SOCK_VECTOR, in[0]); - - VECCOPY(out[0]->vec, sock->ns.vec); - /* render normals point inside... the widget points outside */ - out[1]->vec[0]= -INPR(out[0]->vec, vec); -} - -static int gpu_shader_normal(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - bNodeSocket *sock= node->outputs.first; - GPUNodeLink *vec = GPU_uniform(sock->ns.vec); - - return GPU_stack_link(mat, "normal", in, out, vec); -} - -void register_node_type_sh_normal(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS, - sh_node_normal_in, sh_node_normal_out); - node_type_exec(&ntype, node_shader_exec_normal); - node_type_gpu(&ntype, gpu_shader_normal); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_output.c b/source/blender/nodes/intern/SHD_nodes/SHD_output.c deleted file mode 100644 index e42caabff34..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_output.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_output.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** OUTPUT ******************** */ -static bNodeSocketType sh_node_output_in[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_output(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) -{ - if(data) { - ShadeInput *shi= ((ShaderCallData *)data)->shi; - float col[4]; - - /* stack order input sockets: col, alpha, normal */ - nodestack_get_vec(col, SOCK_VECTOR, in[0]); - nodestack_get_vec(col+3, SOCK_VALUE, in[1]); - - if(shi->do_preview) { - nodeAddToPreview(node, col, shi->xs, shi->ys, shi->do_manage); - node->lasty= shi->ys; - } - - if(node->flag & NODE_DO_OUTPUT) { - ShadeResult *shr= ((ShaderCallData *)data)->shr; - - QUATCOPY(shr->combined, col); - shr->alpha= col[3]; - - // VECCOPY(shr->nor, in[3]->vec); - } - } -} - -static int gpu_shader_output(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) -{ - GPUNodeLink *outlink; - - /*if(in[1].hasinput) - GPU_material_enable_alpha(mat);*/ - - GPU_stack_link(mat, "output_node", in, out, &outlink); - GPU_material_output_link(mat, outlink); - - return 1; -} - -void register_node_type_sh_output(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW, - sh_node_output_in, NULL); - node_type_size(&ntype, 80, 60, 200); - node_type_exec(&ntype, node_shader_exec_output); - node_type_gpu(&ntype, gpu_shader_output); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_rgb.c b/source/blender/nodes/intern/SHD_nodes/SHD_rgb.c deleted file mode 100644 index 3d7f401b055..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_rgb.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_rgb.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** RGB ******************** */ -static bNodeSocketType sh_node_rgb_out[]= { - { SOCK_RGBA, 0, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) -{ - bNodeSocket *sock= node->outputs.first; - - VECCOPY(out[0]->vec, sock->ns.vec); -} - -static int gpu_shader_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - bNodeSocket *sock= node->outputs.first; - GPUNodeLink *vec = GPU_uniform(sock->ns.vec); - - return GPU_stack_link(mat, "set_rgba", in, out, vec); -} - -void register_node_type_sh_rgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS, - NULL, sh_node_rgb_out); - node_type_size(&ntype, 140, 80, 140); - node_type_exec(&ntype, node_shader_exec_rgb); - node_type_gpu(&ntype, gpu_shader_rgb); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c b/source/blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c deleted file mode 100644 index e4fa0b02521..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - * - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Juho Vepsäläinen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** SEPARATE RGBA ******************** */ -static bNodeSocketType sh_node_seprgb_in[]= { - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType sh_node_seprgb_out[]= { - { SOCK_VALUE, 0, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_seprgb(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) -{ - out[0]->vec[0] = in[0]->vec[0]; - out[1]->vec[0] = in[0]->vec[1]; - out[2]->vec[0] = in[0]->vec[2]; -} - -static int gpu_shader_seprgb(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) -{ - return GPU_stack_link(mat, "separate_rgb", in, out); -} - -void register_node_type_sh_seprgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_SEPRGB, "Separate RGB", NODE_CLASS_CONVERTOR, 0, - sh_node_seprgb_in, sh_node_seprgb_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_shader_exec_seprgb); - node_type_gpu(&ntype, gpu_shader_seprgb); - - nodeRegisterType(lb, &ntype); -} - - - -/* **************** COMBINE RGB ******************** */ -static bNodeSocketType sh_node_combrgb_in[]= { - { SOCK_VALUE, 1, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType sh_node_combrgb_out[]= { - { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_combrgb(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) -{ - out[0]->vec[0] = in[0]->vec[0]; - out[0]->vec[1] = in[1]->vec[0]; - out[0]->vec[2] = in[2]->vec[0]; -} - -static int gpu_shader_combrgb(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) -{ - return GPU_stack_link(mat, "combine_rgb", in, out); -} - -void register_node_type_sh_combrgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_COMBRGB, "Combine RGB", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - sh_node_combrgb_in, sh_node_combrgb_out); - node_type_size(&ntype, 80, 40, 140); - node_type_exec(&ntype, node_shader_exec_combrgb); - node_type_gpu(&ntype, gpu_shader_combrgb); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c b/source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c deleted file mode 100644 index 80693ff08f0..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_squeeze.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** VALUE SQUEEZE ******************** */ -static bNodeSocketType sh_node_squeeze_in[]= { - { SOCK_VALUE, 1, "Value", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f}, - { SOCK_VALUE, 1, "Width", 1.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f}, - { SOCK_VALUE, 1, "Center", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_squeeze_out[]= { - { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_squeeze(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, -bNodeStack **out) -{ - float vec[3]; - - nodestack_get_vec(vec, SOCK_VALUE, in[0]); - nodestack_get_vec(vec+1, SOCK_VALUE, in[1]); - nodestack_get_vec(vec+2, SOCK_VALUE, in[2]); - - out[0]->vec[0] = 1.0f / (1.0f + pow(2.71828183,-((vec[0]-vec[2])*vec[1]))) ; -} - -static int gpu_shader_squeeze(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) -{ - return GPU_stack_link(mat, "squeeze", in, out); -} - -void register_node_type_sh_squeeze(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - sh_node_squeeze_in, sh_node_squeeze_out); - node_type_size(&ntype, 120, 110, 160); - node_type_storage(&ntype, "node_squeeze", NULL, NULL); - node_type_exec(&ntype, node_shader_exec_squeeze); - node_type_gpu(&ntype, gpu_shader_squeeze); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_texture.c b/source/blender/nodes/intern/SHD_nodes/SHD_texture.c deleted file mode 100644 index 249e4eeca5d..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_texture.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_texture.c - * \ingroup shdnodes - */ - - -#include "DNA_texture_types.h" - -#include "../SHD_util.h" - -/* **************** TEXTURE ******************** */ -static bNodeSocketType sh_node_texture_in[]= { - { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, /* no limit */ - { -1, 0, "" } -}; -static bNodeSocketType sh_node_texture_out[]= { - { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_RGBA , 0, "Color", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - if(data && node->id) { - ShadeInput *shi= ((ShaderCallData *)data)->shi; - TexResult texres; - float vec[3], nor[3]={0.0f, 0.0f, 0.0f}; - int retval; - short which_output = node->custom1; - - short thread = shi->thread; - - /* out: value, color, normal */ - - /* we should find out if a normal as output is needed, for now we do all */ - texres.nor= nor; - texres.tr= texres.tg= texres.tb= 0.0f; - - if(in[0]->hasinput) { - nodestack_get_vec(vec, SOCK_VECTOR, in[0]); - - if(in[0]->datatype==NS_OSA_VECTORS) { - float *fp= in[0]->data; - retval= multitex_nodes((Tex *)node->id, vec, fp, fp+3, shi->osatex, &texres, thread, which_output, NULL, NULL); - } - else if(in[0]->datatype==NS_OSA_VALUES) { - float *fp= in[0]->data; - float dxt[3], dyt[3]; - - dxt[0]= fp[0]; dxt[1]= dxt[2]= 0.0f; - dyt[0]= fp[1]; dyt[1]= dyt[2]= 0.0f; - retval= multitex_nodes((Tex *)node->id, vec, dxt, dyt, shi->osatex, &texres, thread, which_output, NULL, NULL); - } - else - retval= multitex_nodes((Tex *)node->id, vec, NULL, NULL, 0, &texres, thread, which_output, NULL, NULL); - } - else { - VECCOPY(vec, shi->lo); - retval= multitex_nodes((Tex *)node->id, vec, NULL, NULL, 0, &texres, thread, which_output, NULL, NULL); - } - - /* stupid exception */ - if( ((Tex *)node->id)->type==TEX_STUCCI) { - texres.tin= 0.5f + 0.7f*texres.nor[0]; - CLAMP(texres.tin, 0.0f, 1.0f); - } - - /* intensity and color need some handling */ - if(texres.talpha) - out[0]->vec[0]= texres.ta; - else - out[0]->vec[0]= texres.tin; - - if((retval & TEX_RGB)==0) { - out[1]->vec[0]= out[0]->vec[0]; - out[1]->vec[1]= out[0]->vec[0]; - out[1]->vec[2]= out[0]->vec[0]; - out[1]->vec[3]= 1.0f; - } - else { - out[1]->vec[0]= texres.tr; - out[1]->vec[1]= texres.tg; - out[1]->vec[2]= texres.tb; - out[1]->vec[3]= 1.0f; - } - - VECCOPY(out[2]->vec, nor); - - if(shi->do_preview) - nodeAddToPreview(node, out[1]->vec, shi->xs, shi->ys, shi->do_manage); - - } -} - -static int gpu_shader_texture(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - Tex *tex = (Tex*)node->id; - - if(tex && tex->type == TEX_IMAGE && tex->ima) { - GPUNodeLink *texlink = GPU_image(tex->ima, NULL); - return GPU_stack_link(mat, "texture_image", in, out, texlink); - } - else - return 0; -} - -void register_node_type_sh_texture(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW, - sh_node_texture_in, sh_node_texture_out); - node_type_size(&ntype, 120, 80, 240); - node_type_exec(&ntype, node_shader_exec_texture); - node_type_gpu(&ntype, gpu_shader_texture); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_valToRgb.c b/source/blender/nodes/intern/SHD_nodes/SHD_valToRgb.c deleted file mode 100644 index 86f832c12ee..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_valToRgb.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_valToRgb.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** VALTORGB ******************** */ -static bNodeSocketType sh_node_valtorgb_in[]= { - { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType sh_node_valtorgb_out[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_valtorgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - /* stack order in: fac */ - /* stack order out: col, alpha */ - - if(node->storage) { - float fac; - nodestack_get_vec(&fac, SOCK_VALUE, in[0]); - - do_colorband(node->storage, fac, out[0]->vec); - out[1]->vec[0]= out[0]->vec[3]; - } -} - -static void node_shader_init_valtorgb(bNode *node) -{ - node->storage= add_colorband(1); -} - -static int gpu_shader_valtorgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - float *array; - int size; - - colorband_table_RGBA(node->storage, &array, &size); - return GPU_stack_link(mat, "valtorgb", in, out, GPU_texture(size, array)); -} - -void register_node_type_sh_valtorgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - sh_node_valtorgb_in, sh_node_valtorgb_out); - node_type_size(&ntype, 240, 200, 300); - node_type_init(&ntype, node_shader_init_valtorgb); - node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, node_shader_exec_valtorgb); - node_type_gpu(&ntype, gpu_shader_valtorgb); - - nodeRegisterType(lb, &ntype); -} - - -/* **************** RGBTOBW ******************** */ -static bNodeSocketType sh_node_rgbtobw_in[]= { - { SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType sh_node_rgbtobw_out[]= { - { SOCK_VALUE, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - - -static void node_shader_exec_rgbtobw(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) -{ - /* stack order out: bw */ - /* stack order in: col */ - - out[0]->vec[0]= in[0]->vec[0]*0.35f + in[0]->vec[1]*0.45f + in[0]->vec[2]*0.2f; -} - -static int gpu_shader_rgbtobw(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) -{ - return GPU_stack_link(mat, "rgbtobw", in, out); -} - -void register_node_type_sh_rgbtobw(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0, - sh_node_rgbtobw_in, sh_node_rgbtobw_out); - node_type_size(&ntype, 80, 40, 120); - node_type_exec(&ntype, node_shader_exec_rgbtobw); - node_type_gpu(&ntype, gpu_shader_rgbtobw); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_value.c b/source/blender/nodes/intern/SHD_nodes/SHD_value.c deleted file mode 100644 index 29a75bbf36d..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_value.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_value.c - * \ingroup shdnodes - */ - - -#include "../SHD_util.h" - -/* **************** VALUE ******************** */ -static bNodeSocketType sh_node_value_out[]= { - { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) -{ - bNodeSocket *sock= node->outputs.first; - - out[0]->vec[0]= sock->ns.vec[0]; -} - -static int gpu_shader_value(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - bNodeSocket *sock= node->outputs.first; - GPUNodeLink *vec = GPU_uniform(sock->ns.vec); - - return GPU_stack_link(mat, "set_value", in, out, vec); -} - -void register_node_type_sh_value(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS, - NULL, sh_node_value_out); - node_type_size(&ntype, 80, 50, 120); - node_type_exec(&ntype, node_shader_exec_value); - node_type_gpu(&ntype, gpu_shader_value); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c b/source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c deleted file mode 100644 index 9979e488a71..00000000000 --- a/source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_nodes/SHD_vectMath.c - * \ingroup shdnodes - */ - - - -#include "../SHD_util.h" - - -/* **************** VECTOR MATH ******************** */ -static bNodeSocketType sh_node_vect_math_in[]= { - { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType sh_node_vect_math_out[]= { - { SOCK_VECTOR, 0, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void node_shader_exec_vect_math(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) -{ - float vec1[3], vec2[3]; - - nodestack_get_vec(vec1, SOCK_VECTOR, in[0]); - nodestack_get_vec(vec2, SOCK_VECTOR, in[1]); - - if(node->custom1 == 0) { /* Add */ - out[0]->vec[0]= vec1[0] + vec2[0]; - out[0]->vec[1]= vec1[1] + vec2[1]; - out[0]->vec[2]= vec1[2] + vec2[2]; - - out[1]->vec[0]= (fabs(out[0]->vec[0]) + fabs(out[0]->vec[0]) + fabs(out[0]->vec[0])) / 3; - } - else if(node->custom1 == 1) { /* Subtract */ - out[0]->vec[0]= vec1[0] - vec2[0]; - out[0]->vec[1]= vec1[1] - vec2[1]; - out[0]->vec[2]= vec1[2] - vec2[2]; - - out[1]->vec[0]= (fabs(out[0]->vec[0]) + fabs(out[0]->vec[0]) + fabs(out[0]->vec[0])) / 3; - } - else if(node->custom1 == 2) { /* Average */ - out[0]->vec[0]= vec1[0] + vec2[0]; - out[0]->vec[1]= vec1[1] + vec2[1]; - out[0]->vec[2]= vec1[2] + vec2[2]; - - out[1]->vec[0] = normalize_v3( out[0]->vec ); - } - else if(node->custom1 == 3) { /* Dot product */ - out[1]->vec[0]= (vec1[0] * vec2[0]) + (vec1[1] * vec2[1]) + (vec1[2] * vec2[2]); - } - else if(node->custom1 == 4) { /* Cross product */ - out[0]->vec[0]= (vec1[1] * vec2[2]) - (vec1[2] * vec2[1]); - out[0]->vec[1]= (vec1[2] * vec2[0]) - (vec1[0] * vec2[2]); - out[0]->vec[2]= (vec1[0] * vec2[1]) - (vec1[1] * vec2[0]); - - out[1]->vec[0] = normalize_v3( out[0]->vec ); - } - else if(node->custom1 == 5) { /* Normalize */ - if(in[0]->hasinput || !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ - out[0]->vec[0]= vec1[0]; - out[0]->vec[1]= vec1[1]; - out[0]->vec[2]= vec1[2]; - } - else { - out[0]->vec[0]= vec2[0]; - out[0]->vec[1]= vec2[1]; - out[0]->vec[2]= vec2[2]; - } - - out[1]->vec[0] = normalize_v3( out[0]->vec ); - } - -} - -static int gpu_shader_vect_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) -{ - static const char *names[] = {"vec_math_add", "vec_math_sub", - "vec_math_average", "vec_math_dot", "vec_math_cross", - "vec_math_normalize"}; - - switch (node->custom1) { - case 0: - case 1: - case 2: - case 3: - case 4: - GPU_stack_link(mat, names[node->custom1], NULL, out, - GPU_socket(&in[0]), GPU_socket(&in[1])); - break; - case 5: - if(in[0].hasinput || !in[1].hasinput) - GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[0])); - else - GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[1])); - break; - default: - return 0; - } - - return 1; -} - -void register_node_type_sh_vect_math(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, SH_NODE_VECT_MATH, "Vector Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - sh_node_vect_math_in, sh_node_vect_math_out); - node_type_size(&ntype, 80, 75, 140); - node_type_label(&ntype, node_vect_math_label); - node_type_storage(&ntype, "node_vect_math", NULL, NULL); - node_type_exec(&ntype, node_shader_exec_vect_math); - node_type_gpu(&ntype, gpu_shader_vect_math); - - nodeRegisterType(lb, &ntype); -} - - diff --git a/source/blender/nodes/intern/SHD_util.c b/source/blender/nodes/intern/SHD_util.c deleted file mode 100644 index 190f68ce19a..00000000000 --- a/source/blender/nodes/intern/SHD_util.c +++ /dev/null @@ -1,219 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_util.c - * \ingroup nodes - */ - - -#include "SHD_util.h" - - - - - -/* ****** */ - -void nodestack_get_vec(float *in, short type_in, bNodeStack *ns) -{ - float *from= ns->vec; - - if(type_in==SOCK_VALUE) { - if(ns->sockettype==SOCK_VALUE) - *in= *from; - else - *in= 0.333333f*(from[0]+from[1]+from[2]); - } - else if(type_in==SOCK_VECTOR) { - if(ns->sockettype==SOCK_VALUE) { - in[0]= from[0]; - in[1]= from[0]; - in[2]= from[0]; - } - else { - VECCOPY(in, from); - } - } - else { /* type_in==SOCK_RGBA */ - if(ns->sockettype==SOCK_RGBA) { - QUATCOPY(in, from); - } - else if(ns->sockettype==SOCK_VALUE) { - in[0]= from[0]; - in[1]= from[0]; - in[2]= from[0]; - in[3]= 1.0f; - } - else { - VECCOPY(in, from); - in[3]= 1.0f; - } - } -} - - -/* ******************* execute and parse ************ */ - -void ntreeShaderExecTree(bNodeTree *ntree, ShadeInput *shi, ShadeResult *shr) -{ - ShaderCallData scd; - /* - @note: preserve material from ShadeInput for material id, nodetree execs change it - fix for bug "[#28012] Mat ID messy with shader nodes" - */ - Material *mat = shi->mat; - /* convert caller data to struct */ - scd.shi= shi; - scd.shr= shr; - - /* each material node has own local shaderesult, with optional copying */ - memset(shr, 0, sizeof(ShadeResult)); - - ntreeExecTree(ntree, &scd, shi->thread); /* threads */ - // @note: set material back to preserved material - shi->mat = mat; - /* better not allow negative for now */ - if(shr->combined[0]<0.0f) shr->combined[0]= 0.0f; - if(shr->combined[1]<0.0f) shr->combined[1]= 0.0f; - if(shr->combined[2]<0.0f) shr->combined[2]= 0.0f; - -} - -/* go over all used Geometry and Texture nodes, and return a texco flag */ -/* no group inside needed, this function is called for groups too */ -void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mode) -{ - bNode *node; - bNodeSocket *sock; - int a; - - ntreeSocketUseFlags(ntree); - - for(node= ntree->nodes.first; node; node= node->next) { - if(node->type==SH_NODE_TEXTURE) { - if((r_mode & R_OSA) && node->id) { - Tex *tex= (Tex *)node->id; - if ELEM3(tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP) - *texco |= TEXCO_OSA|NEED_UV; - } - /* usability exception... without input we still give the node orcos */ - sock= node->inputs.first; - if(sock==NULL || sock->link==NULL) - *texco |= TEXCO_ORCO|NEED_UV; - } - else if(node->type==SH_NODE_GEOMETRY) { - /* note; sockets always exist for the given type! */ - for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) { - if(sock->flag & SOCK_IN_USE) { - switch(a) { - case GEOM_OUT_GLOB: - *texco |= TEXCO_GLOB|NEED_UV; break; - case GEOM_OUT_VIEW: - *texco |= TEXCO_VIEW|NEED_UV; break; - case GEOM_OUT_ORCO: - *texco |= TEXCO_ORCO|NEED_UV; break; - case GEOM_OUT_UV: - *texco |= TEXCO_UV|NEED_UV; break; - case GEOM_OUT_NORMAL: - *texco |= TEXCO_NORM|NEED_UV; break; - case GEOM_OUT_VCOL: - *texco |= NEED_UV; *mode |= MA_VERTEXCOL; break; - } - } - } - } - } -} - -/* nodes that use ID data get synced with local data */ -void nodeShaderSynchronizeID(bNode *node, int copyto) -{ - if(node->id==NULL) return; - - if(ELEM(node->type, SH_NODE_MATERIAL, SH_NODE_MATERIAL_EXT)) { - bNodeSocket *sock; - Material *ma= (Material *)node->id; - int a; - - /* hrmf, case in loop isnt super fast, but we dont edit 100s of material at same time either! */ - for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) { - if(!(sock->flag & SOCK_HIDDEN)) { - if(copyto) { - switch(a) { - case MAT_IN_COLOR: - VECCOPY(&ma->r, sock->ns.vec); break; - case MAT_IN_SPEC: - VECCOPY(&ma->specr, sock->ns.vec); break; - case MAT_IN_REFL: - ma->ref= sock->ns.vec[0]; break; - case MAT_IN_MIR: - VECCOPY(&ma->mirr, sock->ns.vec); break; - case MAT_IN_AMB: - ma->amb= sock->ns.vec[0]; break; - case MAT_IN_EMIT: - ma->emit= sock->ns.vec[0]; break; - case MAT_IN_SPECTRA: - ma->spectra= sock->ns.vec[0]; break; - case MAT_IN_RAY_MIRROR: - ma->ray_mirror= sock->ns.vec[0]; break; - case MAT_IN_ALPHA: - ma->alpha= sock->ns.vec[0]; break; - case MAT_IN_TRANSLUCENCY: - ma->translucency= sock->ns.vec[0]; break; - } - } - else { - switch(a) { - case MAT_IN_COLOR: - VECCOPY(sock->ns.vec, &ma->r); break; - case MAT_IN_SPEC: - VECCOPY(sock->ns.vec, &ma->specr); break; - case MAT_IN_REFL: - sock->ns.vec[0]= ma->ref; break; - case MAT_IN_MIR: - VECCOPY(sock->ns.vec, &ma->mirr); break; - case MAT_IN_AMB: - sock->ns.vec[0]= ma->amb; break; - case MAT_IN_EMIT: - sock->ns.vec[0]= ma->emit; break; - case MAT_IN_SPECTRA: - sock->ns.vec[0]= ma->spectra; break; - case MAT_IN_RAY_MIRROR: - sock->ns.vec[0]= ma->ray_mirror; break; - case MAT_IN_ALPHA: - sock->ns.vec[0]= ma->alpha; break; - case MAT_IN_TRANSLUCENCY: - sock->ns.vec[0]= ma->translucency; break; - } - } - } - } - } - -} diff --git a/source/blender/nodes/intern/SHD_util.h b/source/blender/nodes/intern/SHD_util.h deleted file mode 100644 index e6b1377067d..00000000000 --- a/source/blender/nodes/intern/SHD_util.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/SHD_util.h - * \ingroup nodes - */ - - -#ifndef SHD_NODE_UTIL_H_ -#define SHD_NODE_UTIL_H_ - -#include -#include -#include - -#include "MEM_guardedalloc.h" - -#include "DNA_color_types.h" -#include "DNA_ID.h" -#include "DNA_image_types.h" -#include "DNA_material_types.h" -#include "DNA_node_types.h" -#include "DNA_object_types.h" -#include "DNA_scene_types.h" -#include "DNA_texture_types.h" - -#include "BKE_blender.h" -#include "BKE_colortools.h" -#include "BKE_global.h" -#include "BKE_image.h" -#include "BKE_main.h" -#include "BKE_material.h" -#include "BKE_node.h" -#include "BKE_texture.h" - -#include "BKE_library.h" - -#include "../SHD_node.h" -#include "node_util.h" - -#include "BLI_math.h" -#include "BLI_blenlib.h" -#include "BLI_rand.h" -#include "BLI_threads.h" -#include "BLI_utildefines.h" - -#include "IMB_imbuf_types.h" -#include "IMB_imbuf.h" - -#include "RE_pipeline.h" -#include "RE_shader_ext.h" - -#include "GPU_material.h" - -/* ********* exec data struct, remains internal *********** */ - -typedef struct ShaderCallData { - ShadeInput *shi; /* from render pipe */ - ShadeResult *shr; /* from render pipe */ -} ShaderCallData; - -/* output socket defines */ -#define GEOM_OUT_GLOB 0 -#define GEOM_OUT_LOCAL 1 -#define GEOM_OUT_VIEW 2 -#define GEOM_OUT_ORCO 3 -#define GEOM_OUT_UV 4 -#define GEOM_OUT_NORMAL 5 -#define GEOM_OUT_VCOL 6 -#define GEOM_OUT_FRONTBACK 7 - - -/* input socket defines */ -#define MAT_IN_COLOR 0 -#define MAT_IN_SPEC 1 -#define MAT_IN_REFL 2 -#define MAT_IN_NORMAL 3 -#define MAT_IN_MIR 4 -#define MAT_IN_AMB 5 -#define MAT_IN_EMIT 6 -#define MAT_IN_SPECTRA 7 -#define MAT_IN_RAY_MIRROR 8 -#define MAT_IN_ALPHA 9 -#define MAT_IN_TRANSLUCENCY 10 -#define NUM_MAT_IN 11 /* for array size */ - -/* output socket defines */ -#define MAT_OUT_COLOR 0 -#define MAT_OUT_ALPHA 1 -#define MAT_OUT_NORMAL 2 -#define MAT_OUT_DIFFUSE 3 -#define MAT_OUT_SPEC 4 -#define MAT_OUT_AO 5 - - -extern void node_ID_title_cb(void *node_v, void *unused_v); -void nodestack_get_vec(float *in, short type_in, bNodeStack *ns); - -#endif diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_at.c b/source/blender/nodes/intern/TEX_nodes/TEX_at.c deleted file mode 100644 index d5980b786b0..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_at.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): R Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_at.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Texture", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { SOCK_VECTOR, 1, "Coordinates", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f }, - { -1, 0, "" } -}; -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Texture", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - TexParams np = *p; - float new_co[3]; - np.co = new_co; - - tex_input_vec(new_co, in[1], p, thread); - tex_input_rgba(out, in[0], &np, thread); -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_at(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_AT, "At", NODE_CLASS_DISTORT, 0, - inputs, outputs); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c b/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c deleted file mode 100644 index 0eb982496a9..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_bricks.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -#include - -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Bricks 1", 0.596f, 0.282f, 0.0f, 1.0f, 0.0f, 1.0f }, - { SOCK_RGBA, 1, "Bricks 2", 0.632f, 0.504f, 0.05f, 1.0f, 0.0f, 1.0f }, - { SOCK_RGBA, 1, "Mortar", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 1, "Thickness", 0.02f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 1, "Bias", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f }, - { SOCK_VALUE, 1, "Brick Width", 0.5f, 0.0f, 0.0f, 0.0f, 0.001f, 99.0f }, - { SOCK_VALUE, 1, "Row Height", 0.25f, 0.0f, 0.0f, 0.0f, 0.001f, 99.0f }, - { -1, 0, "" } -}; -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void init(bNode *node) { - node->custom3 = 0.5; /* offset */ - node->custom4 = 1.0; /* squash */ -} - -static float noise(int n) /* fast integer noise */ -{ - int nn; - n = (n >> 13) ^ n; - nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff; - return 0.5f * ((float)nn / 1073741824.0f); -} - -static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) -{ - float *co = p->co; - - float x = co[0]; - float y = co[1]; - - int bricknum, rownum; - float offset = 0; - float ins_x, ins_y; - float tint; - - float bricks1[4]; - float bricks2[4]; - float mortar[4]; - - float mortar_thickness = tex_input_value(in[3], p, thread); - float bias = tex_input_value(in[4], p, thread); - float brick_width = tex_input_value(in[5], p, thread); - float row_height = tex_input_value(in[6], p, thread); - - tex_input_rgba(bricks1, in[0], p, thread); - tex_input_rgba(bricks2, in[1], p, thread); - tex_input_rgba(mortar, in[2], p, thread); - - rownum = (int)floor(y / row_height); - - if( node->custom1 && node->custom2 ) { - brick_width *= ((int)(rownum) % node->custom2 ) ? 1.0f : node->custom4; /* squash */ - offset = ((int)(rownum) % node->custom1 ) ? 0 : (brick_width*node->custom3); /* offset */ - } - - bricknum = (int)floor((x+offset) / brick_width); - - ins_x = (x+offset) - brick_width*bricknum; - ins_y = y - row_height*rownum; - - tint = noise((rownum << 16) + (bricknum & 0xFFFF)) + bias; - CLAMP(tint,0.0f,1.0f); - - if( ins_x < mortar_thickness || ins_y < mortar_thickness || - ins_x > (brick_width - mortar_thickness) || - ins_y > (row_height - mortar_thickness) ) { - QUATCOPY( out, mortar ); - } else { - QUATCOPY( out, bricks1 ); - ramp_blend( MA_RAMP_BLEND, out, out+1, out+2, tint, bricks2 ); - } -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_bricks(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_BRICKS, "Bricks", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 150, 60, 150); - node_type_init(&ntype, init); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_checker.c b/source/blender/nodes/intern/TEX_nodes/TEX_checker.c deleted file mode 100644 index c6c25ba1a8a..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_checker.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_checker.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" -#include - -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Color1", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { SOCK_RGBA, 1, "Color2", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 1, "Size", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 100.0f }, - { -1, 0, "" } -}; -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - float x = p->co[0]; - float y = p->co[1]; - float z = p->co[2]; - float sz = tex_input_value(in[2], p, thread); - - /* 0.00001 because of unit sized stuff */ - int xi = (int)fabs(floor(0.00001f + x / sz)); - int yi = (int)fabs(floor(0.00001f + y / sz)); - int zi = (int)fabs(floor(0.00001f + z / sz)); - - if( (xi % 2 == yi % 2) == (zi % 2) ) { - tex_input_rgba(out, in[0], p, thread); - } else { - tex_input_rgba(out, in[1], p, thread); - } -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_checker(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_CHECKER, "Checker", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 100, 60, 150); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_compose.c b/source/blender/nodes/intern/TEX_nodes/TEX_compose.c deleted file mode 100644 index 6eae78ec3de..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_compose.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_compose.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -static bNodeSocketType inputs[]= { - { SOCK_VALUE, 1, "Red", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 1, "Green", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 1, "Blue", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - int i; - for(i = 0; i < 4; i++) - out[i] = tex_input_value(in[i], p, thread); -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_compose(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_COMPOSE, "Compose RGBA", NODE_CLASS_OP_COLOR, 0, - inputs, outputs); - node_type_size(&ntype, 100, 60, 150); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_coord.c b/source/blender/nodes/intern/TEX_nodes/TEX_coord.c deleted file mode 100644 index 3c46971f0d4..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_coord.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Mathias Panzenböck (panzi) . - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_coord.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -static bNodeSocketType outputs[]= { - { SOCK_VECTOR, 0, "Coordinates", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f }, - { -1, 0, "" } -}; - -static void vectorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **UNUSED(in), short UNUSED(thread)) -{ - out[0] = p->co[0]; - out[1] = p->co[1]; - out[2] = p->co[2]; -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &vectorfn, data); -} - -void register_node_type_tex_coord(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT, NODE_OPTIONS, - NULL, outputs); - node_type_size(&ntype, 120, 110, 160); - node_type_storage(&ntype, "node_coord", NULL, NULL); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c b/source/blender/nodes/intern/TEX_nodes/TEX_curves.c deleted file mode 100644 index b7af6c748ff..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_curves.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -/* **************** CURVE Time ******************** */ - -/* custom1 = sfra, custom2 = efra */ -static bNodeSocketType time_outputs[]= { - { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void time_colorfn(float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(in), short UNUSED(thread)) -{ - /* stack order output: fac */ - float fac= 0.0f; - - if(node->custom1 < node->custom2) - fac = (p->cfra - node->custom1)/(float)(node->custom2-node->custom1); - - fac = curvemapping_evaluateF(node->storage, 0, fac); - out[0] = CLAMPIS(fac, 0.0f, 1.0f); -} - -static void time_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &time_colorfn, data); -} - - -static void time_init(bNode* node) -{ - node->custom1= 1; - node->custom2= 250; - node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); -} - -void register_node_type_tex_curve_time(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS, - NULL, time_outputs); - node_type_size(&ntype, 140, 100, 320); - node_type_init(&ntype, time_init); - node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, time_exec); - - nodeRegisterType(lb, &ntype); -} - -/* **************** CURVE RGB ******************** */ -static bNodeSocketType rgb_inputs[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType rgb_outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f}, - { -1, 0, "" } -}; - -static void rgb_colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) -{ - float cin[4]; - tex_input_rgba(cin, in[0], p, thread); - - curvemapping_evaluateRGBF(node->storage, out, cin); - out[3] = cin[3]; -} - -static void rgb_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &rgb_colorfn, data); -} - -static void rgb_init(bNode *node) -{ - node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); -} - -void register_node_type_tex_curve_rgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - rgb_inputs, rgb_outputs); - node_type_size(&ntype, 200, 140, 320); - node_type_init(&ntype, rgb_init); - node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); - node_type_exec(&ntype, rgb_exec); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_decompose.c b/source/blender/nodes/intern/TEX_nodes/TEX_decompose.c deleted file mode 100644 index f27d8c98716..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_decompose.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_decompose.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" -#include - -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; -static bNodeSocketType outputs[]= { - { SOCK_VALUE, 0, "Red", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 0, "Green", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 0, "Blue", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void valuefn_r(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - tex_input_rgba(out, in[0], p, thread); - *out = out[0]; -} - -static void valuefn_g(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - tex_input_rgba(out, in[0], p, thread); - *out = out[1]; -} - -static void valuefn_b(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - tex_input_rgba(out, in[0], p, thread); - *out = out[2]; -} - -static void valuefn_a(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - tex_input_rgba(out, in[0], p, thread); - *out = out[3]; -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &valuefn_r, data); - tex_output(node, in, out[1], &valuefn_g, data); - tex_output(node, in, out[2], &valuefn_b, data); - tex_output(node, in, out[3], &valuefn_a, data); -} - -void register_node_type_tex_decompose(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_DECOMPOSE, "Decompose RGBA", NODE_CLASS_OP_COLOR, 0, - inputs, outputs); - node_type_size(&ntype, 100, 60, 150); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c deleted file mode 100644 index b460844ba4a..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Mathias Panzenböck (panzi) . - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_distance.c - * \ingroup texnodes - */ - - -#include -#include "BLI_math.h" -#include "../TEX_util.h" -#include "TEX_node.h" - -static bNodeSocketType inputs[]= { - { SOCK_VECTOR, 1, "Coordinate 1", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f }, - { SOCK_VECTOR, 1, "Coordinate 2", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f }, - { -1, 0, "" } -}; - -static bNodeSocketType outputs[]= { - { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void valuefn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - float co1[3], co2[3]; - - tex_input_vec(co1, in[0], p, thread); - tex_input_vec(co2, in[1], p, thread); - - *out = len_v3v3(co2, co1); -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &valuefn, data); -} - -void register_node_type_tex_distance(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 120, 110, 160); - node_type_storage(&ntype, "node_distance", NULL, NULL); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c b/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c deleted file mode 100644 index 471d8db2c03..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Juho Vepsäläinen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - - -static bNodeSocketType inputs[]= { - { SOCK_VALUE, 1, "Hue", 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.5f }, - { SOCK_VALUE, 1, "Saturation", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f }, - { SOCK_VALUE, 1, "Value", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f }, - { SOCK_VALUE, 1, "Factor", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float hue, float sat, float val, float *in, float fac) -{ - if(fac != 0 && (hue != 0.5f || sat != 1 || val != 1)) { - float col[3], hsv[3], mfac= 1.0f - fac; - - rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); - hsv[0]+= (hue - 0.5f); - if(hsv[0]>1.0f) hsv[0]-=1.0f; else if(hsv[0]<0.0f) hsv[0]+= 1.0f; - hsv[1]*= sat; - if(hsv[1]>1.0f) hsv[1]= 1.0f; else if(hsv[1]<0.0f) hsv[1]= 0.0f; - hsv[2]*= val; - if(hsv[2]>1.0f) hsv[2]= 1.0f; else if(hsv[2]<0.0f) hsv[2]= 0.0f; - hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); - - out[0]= mfac*in[0] + fac*col[0]; - out[1]= mfac*in[1] + fac*col[1]; - out[2]= mfac*in[2] + fac*col[2]; - } - else { - QUATCOPY(out, in); - } -} - -static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) -{ - float hue = tex_input_value(in[0], p, thread); - float sat = tex_input_value(in[1], p, thread); - float val = tex_input_value(in[2], p, thread); - float fac = tex_input_value(in[3], p, thread); - - float col[4]; - tex_input_rgba(col, in[4], p, thread); - - hue += 0.5f; /* [-.5, .5] -> [0, 1] */ - - do_hue_sat_fac(node, out, hue, sat, val, col, fac); - - out[3] = col[3]; -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_hue_sat(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 150, 80, 250); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_image.c b/source/blender/nodes/intern/TEX_nodes/TEX_image.c deleted file mode 100644 index a54ca4bb119..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_image.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_image.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(in), short UNUSED(thread)) -{ - float x = p->co[0]; - float y = p->co[1]; - Image *ima= (Image *)node->id; - ImageUser *iuser= (ImageUser *)node->storage; - - if( ima ) { - ImBuf *ibuf = BKE_image_get_ibuf(ima, iuser); - if( ibuf ) { - float xsize, ysize; - float xoff, yoff; - int px, py; - - float *result; - - xsize = ibuf->x / 2; - ysize = ibuf->y / 2; - xoff = yoff = -1; - - px = (int)( (x-xoff) * xsize ); - py = (int)( (y-yoff) * ysize ); - - if( (!xsize) || (!ysize) ) return; - - if( !ibuf->rect_float ) { - BLI_lock_thread(LOCK_IMAGE); - if( !ibuf->rect_float ) - IMB_float_from_rect(ibuf); - BLI_unlock_thread(LOCK_IMAGE); - } - - while( px < 0 ) px += ibuf->x; - while( py < 0 ) py += ibuf->y; - while( px >= ibuf->x ) px -= ibuf->x; - while( py >= ibuf->y ) py -= ibuf->y; - - result = ibuf->rect_float + py*ibuf->x*4 + px*4; - QUATCOPY( out, result ); - } - } -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -static void init(bNode* node) -{ - ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user"); - node->storage= iuser; - iuser->sfra= 1; - iuser->fie_ima= 2; - iuser->ok= 1; -} - -void register_node_type_tex_image(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS, - NULL, outputs); - node_type_size(&ntype, 120, 80, 300); - node_type_init(&ntype, init); - node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_invert.c b/source/blender/nodes/intern/TEX_nodes/TEX_invert.c deleted file mode 100644 index e908bdcff07..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_invert.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_invert.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -/* **************** INVERT ******************** */ -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - float col[4]; - - tex_input_rgba(col, in[0], p, thread); - - col[0] = 1.0f - col[0]; - col[1] = 1.0f - col[1]; - col[2] = 1.0f - col[2]; - - VECCOPY(out, col); - out[3] = col[3]; -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_invert(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 90, 80, 100); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_math.c b/source/blender/nodes/intern/TEX_nodes/TEX_math.c deleted file mode 100644 index 18468bdd55c..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_math.c +++ /dev/null @@ -1,201 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_math.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - - -/* **************** SCALAR MATH ******************** */ -static bNodeSocketType inputs[]= { - { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f}, - { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f}, - { -1, 0, "" } -}; - -static bNodeSocketType outputs[]= { - { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) -{ - float in0 = tex_input_value(in[0], p, thread); - float in1 = tex_input_value(in[1], p, thread); - - switch(node->custom1){ - - case 0: /* Add */ - *out= in0 + in1; - break; - case 1: /* Subtract */ - *out= in0 - in1; - break; - case 2: /* Multiply */ - *out= in0 * in1; - break; - case 3: /* Divide */ - { - if(in1==0) /* We don't want to divide by zero. */ - *out= 0.0; - else - *out= in0 / in1; - } - break; - case 4: /* Sine */ - { - *out= sin(in0); - } - break; - case 5: /* Cosine */ - { - *out= cos(in0); - } - break; - case 6: /* Tangent */ - { - *out= tan(in0); - } - break; - case 7: /* Arc-Sine */ - { - /* Can't do the impossible... */ - if( in0 <= 1 && in0 >= -1 ) - *out= asin(in0); - else - *out= 0.0; - } - break; - case 8: /* Arc-Cosine */ - { - /* Can't do the impossible... */ - if( in0 <= 1 && in0 >= -1 ) - *out= acos(in0); - else - *out= 0.0; - } - break; - case 9: /* Arc-Tangent */ - { - *out= atan(in0); - } - break; - case 10: /* Power */ - { - /* Only raise negative numbers by full integers */ - if( in0 >= 0 ) { - out[0]= pow(in0, in1); - } else { - float y_mod_1 = fmod(in1, 1); - if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) { - *out = pow(in0, floor(in1 + 0.5f)); - } else { - *out = 0.0; - } - } - } - break; - case 11: /* Logarithm */ - { - /* Don't want any imaginary numbers... */ - if( in0 > 0 && in1 > 0 ) - *out= log(in0) / log(in1); - else - *out= 0.0; - } - break; - case 12: /* Minimum */ - { - if( in0 < in1 ) - *out= in0; - else - *out= in1; - } - break; - case 13: /* Maximum */ - { - if( in0 > in1 ) - *out= in0; - else - *out= in1; - } - break; - case 14: /* Round */ - { - *out= (in0<0)?(int)(in0 - 0.5f):(int)(in0 + 0.5f); - } - break; - - case 15: /* Less Than */ - { - if( in0 < in1 ) - *out= 1.0f; - else - *out= 0.0f; - } - break; - - case 16: /* Greater Than */ - { - if( in0 > in1 ) - *out= 1.0f; - else - *out= 0.0f; - } - break; - - default: - fprintf(stderr, - "%s:%d: unhandeld value in switch statement: %d\n", - __FILE__, __LINE__, node->custom1); - } -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &valuefn, data); -} - -void register_node_type_tex_math(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 120, 110, 160); - node_type_label(&ntype, node_math_label); - node_type_storage(&ntype, "node_math", NULL, NULL); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c b/source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c deleted file mode 100644 index c7668c27b99..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_mixRgb.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -/* **************** MIX RGB ******************** */ -static bNodeSocketType inputs[]= { - { SOCK_VALUE, 1, "Factor", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_RGBA, 1, "Color1", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f }, - { SOCK_RGBA , 1, "Color2", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) -{ - float fac = tex_input_value(in[0], p, thread); - float col1[4], col2[4]; - - tex_input_rgba(col1, in[1], p, thread); - tex_input_rgba(col2, in[2], p, thread); - - CLAMP(fac, 0.0f, 1.0f); - - QUATCOPY(out, col1); - ramp_blend(node->custom1, out, out+1, out+2, fac, col2); -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_mix_rgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 100, 60, 150); - node_type_label(&ntype, node_blend_label); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_output.c b/source/blender/nodes/intern/TEX_nodes/TEX_output.c deleted file mode 100644 index 046ad724507..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_output.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_output.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -/* **************** COMPOSITE ******************** */ -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -/* applies to render pipeline */ -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) -{ - TexCallData *cdata = (TexCallData *)data; - TexResult *target = cdata->target; - - if(cdata->do_preview) { - TexParams params; - params_from_cdata(¶ms, cdata); - - if(in[1] && in[1]->hasinput && !in[0]->hasinput) - tex_input_rgba(&target->tr, in[1], ¶ms, cdata->thread); - else - tex_input_rgba(&target->tr, in[0], ¶ms, cdata->thread); - tex_do_preview(node, params.co, &target->tr); - } - else { - /* 0 means don't care, so just use first */ - if(cdata->which_output == node->custom1 || (cdata->which_output == 0 && node->custom1 == 1)) { - TexParams params; - params_from_cdata(¶ms, cdata); - - tex_input_rgba(&target->tr, in[0], ¶ms, cdata->thread); - - target->tin = (target->tr + target->tg + target->tb) / 3.0f; - target->talpha = 1; - - if(target->nor) { - if(in[1] && in[1]->hasinput) - tex_input_vec(target->nor, in[1], ¶ms, cdata->thread); - else - target->nor = NULL; - } - } - } -} - -static void unique_name(bNode *node) -{ - TexNodeOutput *tno = (TexNodeOutput *)node->storage; - char *new_name = NULL; - int new_len = 0; - int suffix; - bNode *i; - char *name = tno->name; - - i = node; - while(i->prev) i = i->prev; - for(; i; i=i->next) { - if( - i == node || - i->type != TEX_NODE_OUTPUT || - strcmp(name, ((TexNodeOutput*)(i->storage))->name) - ) - continue; - - if(!new_name) { - int len = strlen(name); - if(len >= 4 && sscanf(name + len - 4, ".%03d", &suffix) == 1) { - new_len = len; - } else { - suffix = 0; - new_len = len + 4; - if(new_len > 31) - new_len = 31; - } - - new_name = MEM_mallocN(new_len + 1, "new_name"); - strcpy(new_name, name); - name = new_name; - } - sprintf(new_name + new_len - 4, ".%03d", ++suffix); - } - - if(new_name) { - strcpy(tno->name, new_name); - MEM_freeN(new_name); - } -} - -static void assign_index(struct bNode *node) -{ - bNode *tnode; - int index = 1; - - tnode = node; - while(tnode->prev) - tnode = tnode->prev; - - check_index: - for(; tnode; tnode= tnode->next) - if(tnode->type == TEX_NODE_OUTPUT && tnode != node) - if(tnode->custom1 == index) { - index ++; - goto check_index; - } - - node->custom1 = index; -} - -static void init(bNode *node) -{ - TexNodeOutput *tno = MEM_callocN(sizeof(TexNodeOutput), "TEX_output"); - node->storage= tno; - - strcpy(tno->name, "Default"); - unique_name(node); - assign_index(node); -} - -static void copy(bNode *orig, bNode *new) -{ - node_copy_standard_storage(orig, new); - unique_name(new); - assign_index(new); -} - -void register_node_type_tex_output(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS, - inputs, NULL); - node_type_size(&ntype, 150, 60, 200); - node_type_init(&ntype, init); - node_type_storage(&ntype, "TexNodeOutput", node_free_standard_storage, copy); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c b/source/blender/nodes/intern/TEX_nodes/TEX_proc.c deleted file mode 100644 index 294c1f7322f..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c +++ /dev/null @@ -1,325 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_proc.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -#include "RE_shader_ext.h" - -/* - In this file: wrappers to use procedural textures as nodes -*/ - - -static bNodeSocketType outputs_both[]= { - { SOCK_RGBA, 0, "Color", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; -static bNodeSocketType outputs_color_only[]= { - { SOCK_RGBA, 0, "Color", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -/* Inputs common to all, #defined because nodes will need their own inputs too */ -#define I 2 /* count */ -#define COMMON_INPUTS \ - { SOCK_RGBA, 1, "Color 1", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, \ - { SOCK_RGBA, 1, "Color 2", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f } - -/* Calls multitex and copies the result to the outputs. Called by xxx_exec, which handles inputs. */ -static void do_proc(float *result, TexParams *p, float *col1, float *col2, char is_normal, Tex *tex, short thread) -{ - TexResult texres; - int textype; - - if(is_normal) { - texres.nor = result; - } - else - texres.nor = NULL; - - textype = multitex_nodes(tex, p->co, p->dxt, p->dyt, p->osatex, - &texres, thread, 0, p->shi, p->mtex); - - if(is_normal) - return; - - if(textype & TEX_RGB) { - QUATCOPY(result, &texres.tr); - } - else { - QUATCOPY(result, col1); - ramp_blend(MA_RAMP_BLEND, result, result+1, result+2, texres.tin, col2); - } -} - -typedef void (*MapFn) (Tex *tex, bNodeStack **in, TexParams *p, short thread); - -static void texfn( - float *result, - TexParams *p, - bNode *node, - bNodeStack **in, - char is_normal, - MapFn map_inputs, - short thread) -{ - Tex tex = *((Tex*)(node->storage)); - float col1[4], col2[4]; - tex_input_rgba(col1, in[0], p, thread); - tex_input_rgba(col2, in[1], p, thread); - - map_inputs(&tex, in, p, thread); - - do_proc(result, p, col1, col2, is_normal, &tex, thread); -} - -static int count_outputs(bNode *node) -{ - bNodeSocket *sock; - int num = 0; - for(sock= node->outputs.first; sock; sock= sock->next) { - num++; - } - return num; -} - -/* Boilerplate generators */ - -#define ProcNoInputs(name) \ - static void name##_map_inputs(Tex *UNUSED(tex), bNodeStack **UNUSED(in), TexParams *UNUSED(p), short UNUSED(thread)) \ - {} - -#define ProcDef(name) \ - static void name##_colorfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \ - { \ - texfn(result, p, node, in, 0, &name##_map_inputs, thread); \ - } \ - static void name##_normalfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \ - { \ - texfn(result, p, node, in, 1, &name##_map_inputs, thread); \ - } \ - static void name##_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) \ - { \ - int outs = count_outputs(node); \ - if(outs >= 1) tex_output(node, in, out[0], &name##_colorfn, data); \ - if(outs >= 2) tex_output(node, in, out[1], &name##_normalfn, data); \ - } - - -/* --- VORONOI -- */ -static bNodeSocketType voronoi_inputs[]= { - COMMON_INPUTS, - { SOCK_VALUE, 1, "W1", 1.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f }, - { SOCK_VALUE, 1, "W2", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f }, - { SOCK_VALUE, 1, "W3", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f }, - { SOCK_VALUE, 1, "W4", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f }, - - { SOCK_VALUE, 1, "iScale", 1.0f, 0.0f, 0.0f, 0.0f, 0.01f, 10.0f }, - { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 4.0f }, - - { -1, 0, "" } -}; -static void voronoi_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) -{ - tex->vn_w1 = tex_input_value(in[I+0], p, thread); - tex->vn_w2 = tex_input_value(in[I+1], p, thread); - tex->vn_w3 = tex_input_value(in[I+2], p, thread); - tex->vn_w4 = tex_input_value(in[I+3], p, thread); - - tex->ns_outscale = tex_input_value(in[I+4], p, thread); - tex->noisesize = tex_input_value(in[I+5], p, thread); -} -ProcDef(voronoi) - -/* --- BLEND -- */ -static bNodeSocketType blend_inputs[]= { - COMMON_INPUTS, - { -1, 0, "" } -}; -ProcNoInputs(blend) -ProcDef(blend) - -/* -- MAGIC -- */ -static bNodeSocketType magic_inputs[]= { - COMMON_INPUTS, - { SOCK_VALUE, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f }, - { -1, 0, "" } -}; -static void magic_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) -{ - tex->turbul = tex_input_value(in[I+0], p, thread); -} -ProcDef(magic) - -/* --- MARBLE --- */ -static bNodeSocketType marble_inputs[]= { - COMMON_INPUTS, - { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f }, - { SOCK_VALUE, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f }, - { -1, 0, "" } -}; -static void marble_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) -{ - tex->noisesize = tex_input_value(in[I+0], p, thread); - tex->turbul = tex_input_value(in[I+1], p, thread); -} -ProcDef(marble) - -/* --- CLOUDS --- */ -static bNodeSocketType clouds_inputs[]= { - COMMON_INPUTS, - { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f }, - { -1, 0, "" } -}; -static void clouds_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) -{ - tex->noisesize = tex_input_value(in[I+0], p, thread); -} -ProcDef(clouds) - -/* --- DISTORTED NOISE --- */ -static bNodeSocketType distnoise_inputs[]= { - COMMON_INPUTS, - { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f }, - { SOCK_VALUE, 1, "Distortion", 1.00f, 0.0f, 0.0f, 0.0f, 0.0000f, 10.0f }, - { -1, 0, "" } -}; -static void distnoise_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) -{ - tex->noisesize = tex_input_value(in[I+0], p, thread); - tex->dist_amount = tex_input_value(in[I+1], p, thread); -} -ProcDef(distnoise) - -/* --- WOOD --- */ -static bNodeSocketType wood_inputs[]= { - COMMON_INPUTS, - { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f }, - { SOCK_VALUE, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f }, - { -1, 0, "" } -}; -static void wood_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) -{ - tex->noisesize = tex_input_value(in[I+0], p, thread); - tex->turbul = tex_input_value(in[I+1], p, thread); -} -ProcDef(wood) - -/* --- MUSGRAVE --- */ -static bNodeSocketType musgrave_inputs[]= { - COMMON_INPUTS, - { SOCK_VALUE, 1, "H", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f }, - { SOCK_VALUE, 1, "Lacunarity", 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f }, - { SOCK_VALUE, 1, "Octaves", 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 8.0f }, - - { SOCK_VALUE, 1, "iScale", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f }, - { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f }, - { -1, 0, "" } -}; -static void musgrave_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) -{ - tex->mg_H = tex_input_value(in[I+0], p, thread); - tex->mg_lacunarity = tex_input_value(in[I+1], p, thread); - tex->mg_octaves = tex_input_value(in[I+2], p, thread); - tex->ns_outscale = tex_input_value(in[I+3], p, thread); - tex->noisesize = tex_input_value(in[I+4], p, thread); -} -ProcDef(musgrave) - -/* --- NOISE --- */ -static bNodeSocketType noise_inputs[]= { - COMMON_INPUTS, - { -1, 0, "" } -}; -ProcNoInputs(noise) -ProcDef(noise) - -/* --- STUCCI --- */ -static bNodeSocketType stucci_inputs[]= { - COMMON_INPUTS, - { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f }, - { SOCK_VALUE, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f }, - { -1, 0, "" } -}; -static void stucci_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) -{ - tex->noisesize = tex_input_value(in[I+0], p, thread); - tex->turbul = tex_input_value(in[I+1], p, thread); -} -ProcDef(stucci) - -/* --- */ - -static void init(bNode *node) -{ - Tex *tex = MEM_callocN(sizeof(Tex), "Tex"); - node->storage= tex; - - default_tex(tex); - tex->type = node->type - TEX_NODE_PROC; - - if(tex->type == TEX_WOOD) - tex->stype = TEX_BANDNOISE; - -} - -/* Node type definitions */ -#define TexDef(TEXTYPE, outputs, name, Name) \ -void register_node_type_tex_proc_##name(ListBase *lb) \ -{ \ - static bNodeType ntype; \ - \ - node_type_base(&ntype, TEX_NODE_PROC+TEXTYPE, Name, NODE_CLASS_TEXTURE, NODE_PREVIEW|NODE_OPTIONS, name##_inputs, outputs); \ - node_type_size(&ntype, 140, 80, 140); \ - node_type_init(&ntype, init); \ - node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \ - node_type_exec(&ntype, name##_exec); \ - \ - nodeRegisterType(lb, &ntype); \ -} - -#define C outputs_color_only -#define CV outputs_both - -TexDef(TEX_VORONOI, CV, voronoi, "Voronoi" ) -TexDef(TEX_BLEND, C, blend, "Blend" ) -TexDef(TEX_MAGIC, C, magic, "Magic" ) -TexDef(TEX_MARBLE, CV, marble, "Marble" ) -TexDef(TEX_CLOUDS, CV, clouds, "Clouds" ) -TexDef(TEX_WOOD, CV, wood, "Wood" ) -TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave" ) -TexDef(TEX_NOISE, C, noise, "Noise" ) -TexDef(TEX_STUCCI, CV, stucci, "Stucci" ) -TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise" ) diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c b/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c deleted file mode 100644 index 1be6152a2b3..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_rotate.c - * \ingroup texnodes - */ - - -#include - -#include "../TEX_util.h" -#include "TEX_node.h" - -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Turns", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f }, - { SOCK_VECTOR, 1, "Axis", 0.0f, 0.0f, 1.0f, 0.0f, -1.0f, 1.0f }, - { -1, 0, "" } -}; - -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void rotate(float new_co[3], float a, float ax[3], float co[3]) -{ - float para[3]; - float perp[3]; - float cp[3]; - - float cos_a = cos(a * (float)(2*M_PI)); - float sin_a = sin(a * (float)(2*M_PI)); - - // x' = xcosa + n(n.x)(1-cosa) + (x*n)sina - - mul_v3_v3fl(perp, co, cos_a); - mul_v3_v3fl(para, ax, dot_v3v3(co, ax)*(1 - cos_a)); - - cross_v3_v3v3(cp, ax, co); - mul_v3_fl(cp, sin_a); - - new_co[0] = para[0] + perp[0] + cp[0]; - new_co[1] = para[1] + perp[1] + cp[1]; - new_co[2] = para[2] + perp[2] + cp[2]; -} - -static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - float new_co[3], new_dxt[3], new_dyt[3], a, ax[3]; - - a= tex_input_value(in[1], p, thread); - tex_input_vec(ax, in[2], p, thread); - - rotate(new_co, a, ax, p->co); - if (p->osatex) { - rotate(new_dxt, a, ax, p->dxt); - rotate(new_dyt, a, ax, p->dyt); - } - - { - TexParams np = *p; - np.co = new_co; - np.dxt = new_dxt; - np.dyt = new_dyt; - tex_input_rgba(out, in[0], &np, thread); - } -} -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_rotate(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 140, 100, 320); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_scale.c b/source/blender/nodes/intern/TEX_nodes/TEX_scale.c deleted file mode 100644 index cfffcfda2e5..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_scale.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_scale.c - * \ingroup texnodes - */ - - -#include -#include "../TEX_util.h" - -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f }, - { -1, 0, "" } -}; - -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - float scale[3], new_co[3], new_dxt[3], new_dyt[3]; - TexParams np = *p; - - np.co = new_co; - np.dxt = new_dxt; - np.dyt = new_dyt; - - tex_input_vec(scale, in[1], p, thread); - - mul_v3_v3v3(new_co, p->co, scale); - if (p->osatex) { - mul_v3_v3v3(new_dxt, p->dxt, scale); - mul_v3_v3v3(new_dyt, p->dyt, scale); - } - - tex_input_rgba(out, in[0], &np, thread); -} -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_scale(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 90, 80, 100); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c b/source/blender/nodes/intern/TEX_nodes/TEX_texture.c deleted file mode 100644 index c58595866af..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_texture.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -#include "RE_shader_ext.h" - -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Color1", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f }, - { SOCK_RGBA, 1, "Color2", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) -{ - Tex *nodetex = (Tex *)node->id; - static float red[] = {1,0,0,1}; - static float white[] = {1,1,1,1}; - float co[3], dxt[3], dyt[3]; - - copy_v3_v3(co, p->co); - copy_v3_v3(dxt, p->dxt); - copy_v3_v3(dyt, p->dyt); - - if(node->custom2 || node->need_exec==0) { - /* this node refers to its own texture tree! */ - QUATCOPY(out, (fabs(co[0] - co[1]) < .01) ? white : red ); - } - else if(nodetex) { - TexResult texres; - int textype; - float nor[] = {0,0,0}; - float col1[4], col2[4]; - - tex_input_rgba(col1, in[0], p, thread); - tex_input_rgba(col2, in[1], p, thread); - - texres.nor = nor; - textype = multitex_nodes(nodetex, co, dxt, dyt, p->osatex, - &texres, thread, 0, p->shi, p->mtex); - - if(textype & TEX_RGB) { - QUATCOPY(out, &texres.tr); - } - else { - QUATCOPY(out, col1); - ramp_blend(MA_RAMP_BLEND, out, out+1, out+2, texres.tin, col2); - } - } -} - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_texture(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 120, 80, 240); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_translate.c b/source/blender/nodes/intern/TEX_nodes/TEX_translate.c deleted file mode 100644 index 8f7d6d837d7..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_translate.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_translate.c - * \ingroup texnodes - */ - - -#include -#include "../TEX_util.h" -#include "TEX_node.h" - -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, "Offset", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f }, - { -1, 0, "" } -}; - -static bNodeSocketType outputs[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - float offset[3], new_co[3]; - TexParams np = *p; - np.co = new_co; - - tex_input_vec(offset, in[1], p, thread); - - new_co[0] = p->co[0] + offset[0]; - new_co[1] = p->co[1] + offset[1]; - new_co[2] = p->co[2] + offset[2]; - - tex_input_rgba(out, in[0], &np, thread); -} -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &colorfn, data); -} - -void register_node_type_tex_translate(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 90, 80, 100); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c b/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c deleted file mode 100644 index e430c0c9a95..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Jucas. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_valToNor.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -static bNodeSocketType inputs[]= { - { SOCK_VALUE, 1, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { SOCK_VALUE, 1, "Nabla", 0.025f, 0.0f, 0.0f, 0.0f, 0.001f, 0.1f }, - { -1, 0, "" } -}; - -static bNodeSocketType outputs[]= { - { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; - -static void normalfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - float new_co[3]; - float *co = p->co; - - float nabla = tex_input_value(in[1], p, thread); - float val; - float nor[3]; - - TexParams np = *p; - np.co = new_co; - - val = tex_input_value(in[0], p, thread); - - new_co[0] = co[0] + nabla; - new_co[1] = co[1]; - new_co[2] = co[2]; - nor[0] = tex_input_value(in[0], &np, thread); - - new_co[0] = co[0]; - new_co[1] = co[1] + nabla; - nor[1] = tex_input_value(in[0], &np, thread); - - new_co[1] = co[1]; - new_co[2] = co[2] + nabla; - nor[2] = tex_input_value(in[0], &np, thread); - - out[0] = val-nor[0]; - out[1] = val-nor[1]; - out[2] = val-nor[2]; -} -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &normalfn, data); -} - -void register_node_type_tex_valtonor(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - inputs, outputs); - node_type_size(&ntype, 90, 80, 100); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c b/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c deleted file mode 100644 index 8f59828081c..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_valToRgb.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" - -/* **************** VALTORGB ******************** */ -static bNodeSocketType valtorgb_in[]= { - { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType valtorgb_out[]= { - { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - -static void valtorgb_colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) -{ - if(node->storage) { - float fac = tex_input_value(in[0], p, thread); - - do_colorband(node->storage, fac, out); - } -} - -static void valtorgb_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &valtorgb_colorfn, data); -} - -static void valtorgb_init(bNode *node) -{ - node->storage = add_colorband(1); -} - -void register_node_type_tex_valtorgb(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS, - valtorgb_in, valtorgb_out); - node_type_size(&ntype, 240, 200, 300); - node_type_init(&ntype, valtorgb_init); - node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, valtorgb_exec); - - nodeRegisterType(lb, &ntype); -} - -/* **************** RGBTOBW ******************** */ -static bNodeSocketType rgbtobw_in[]= { - { SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; -static bNodeSocketType rgbtobw_out[]= { - { SOCK_VALUE, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { -1, 0, "" } -}; - - -static void rgbtobw_valuefn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) -{ - float cin[4]; - tex_input_rgba(cin, in[0], p, thread); - - *out = cin[0] * 0.35f + cin[1] * 0.45f + cin[2] * 0.2f; -} - -static void rgbtobw_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - tex_output(node, in, out[0], &rgbtobw_valuefn, data); -} - -void register_node_type_tex_rgbtobw(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0, - rgbtobw_in, rgbtobw_out); - node_type_size(&ntype, 80, 40, 120); - node_type_exec(&ntype, rgbtobw_exec); - - nodeRegisterType(lb, &ntype); -} - diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_viewer.c b/source/blender/nodes/intern/TEX_nodes/TEX_viewer.c deleted file mode 100644 index e917e525e17..00000000000 --- a/source/blender/nodes/intern/TEX_nodes/TEX_viewer.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): Robin Allen - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_nodes/TEX_viewer.c - * \ingroup texnodes - */ - - -#include "../TEX_util.h" -#include "TEX_node.h" -#include - -static bNodeSocketType inputs[]= { - { SOCK_RGBA, 1, "Color", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, - { -1, 0, "" } -}; -static bNodeSocketType outputs[]= { - { -1, 0, "" } -}; - -static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) -{ - TexCallData *cdata = (TexCallData *)data; - - if(cdata->do_preview) { - TexParams params; - float col[4]; - params_from_cdata(¶ms, cdata); - - tex_input_rgba(col, in[0], ¶ms, cdata->thread); - tex_do_preview(node, params.previewco, col); - } -} - -void register_node_type_tex_viewer(ListBase *lb) -{ - static bNodeType ntype; - - node_type_base(&ntype, TEX_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW, - inputs, outputs); - node_type_size(&ntype, 100, 60, 150); - node_type_exec(&ntype, exec); - - nodeRegisterType(lb, &ntype); -} diff --git a/source/blender/nodes/intern/TEX_util.c b/source/blender/nodes/intern/TEX_util.c deleted file mode 100644 index b5e27ca2ccb..00000000000 --- a/source/blender/nodes/intern/TEX_util.c +++ /dev/null @@ -1,214 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_util.c - * \ingroup nodes - */ - - -/* - HOW TEXTURE NODES WORK - - In contrast to Shader nodes, which place a color into the output - stack when executed, Texture nodes place a TexDelegate* there. To - obtain a color value from this, a node further up the chain reads - the TexDelegate* from its input stack, and uses tex_call_delegate to - retrieve the color from the delegate. - - comments: (ton) - - This system needs recode, a node system should rely on the stack, and - callbacks for nodes only should evaluate own node, not recursively go - over other previous ones. -*/ - -#include -#include "TEX_util.h" - -#define PREV_RES 128 /* default preview resolution */ - -void tex_call_delegate(TexDelegate *dg, float *out, TexParams *params, short thread) -{ - if(dg->node->need_exec) { - dg->fn(out, params, dg->node, dg->in, thread); - - if(dg->cdata->do_preview) - tex_do_preview(dg->node, params->previewco, out); - } -} - -static void tex_input(float *out, int sz, bNodeStack *in, TexParams *params, short thread) -{ - TexDelegate *dg = in->data; - if(dg) { - tex_call_delegate(dg, in->vec, params, thread); - - if(in->hasoutput && in->sockettype == SOCK_VALUE) - in->vec[1] = in->vec[2] = in->vec[0]; - } - memcpy(out, in->vec, sz * sizeof(float)); -} - -void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread) -{ - tex_input(out, 3, in, params, thread); -} - -void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread) -{ - tex_input(out, 4, in, params, thread); - - if(in->hasoutput && in->sockettype == SOCK_VALUE) - { - out[1] = out[2] = out[0]; - out[3] = 1; - } - - if(in->hasoutput && in->sockettype == SOCK_VECTOR) { - out[0] = out[0] * .5f + .5f; - out[1] = out[1] * .5f + .5f; - out[2] = out[2] * .5f + .5f; - out[3] = 1; - } -} - -float tex_input_value(bNodeStack *in, TexParams *params, short thread) -{ - float out[4]; - tex_input_vec(out, in, params, thread); - return out[0]; -} - -void params_from_cdata(TexParams *out, TexCallData *in) -{ - out->co = in->co; - out->dxt = in->dxt; - out->dyt = in->dyt; - out->previewco = in->co; - out->osatex = in->osatex; - out->cfra = in->cfra; - out->shi = in->shi; - out->mtex = in->mtex; -} - -void tex_do_preview(bNode *node, float *co, float *col) -{ - bNodePreview *preview= node->preview; - - if(preview) { - int xs= ((co[0] + 1.0f)*0.5f)*preview->xsize; - int ys= ((co[1] + 1.0f)*0.5f)*preview->ysize; - - nodeAddToPreview(node, col, xs, ys, 0); /* 0 = no color management */ - } -} - -void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata) -{ - TexDelegate *dg; - if(!out->data) - /* Freed in tex_end_exec (node.c) */ - dg = out->data = MEM_mallocN(sizeof(TexDelegate), "tex delegate"); - else - dg = out->data; - - dg->cdata= cdata; - dg->fn = texfn; - dg->node = node; - memcpy(dg->in, in, MAX_SOCKET * sizeof(bNodeStack*)); - dg->type = out->sockettype; -} - -void ntreeTexCheckCyclics(struct bNodeTree *ntree) -{ - bNode *node; - for(node= ntree->nodes.first; node; node= node->next) { - - if(node->type == TEX_NODE_TEXTURE && node->id) - { - /* custom2 stops the node from rendering */ - if(node->custom1) { - node->custom2 = 1; - node->custom1 = 0; - } else { - Tex *tex = (Tex *)node->id; - - node->custom2 = 0; - - node->custom1 = 1; - if(tex->use_nodes && tex->nodetree) { - ntreeTexCheckCyclics(tex->nodetree); - } - node->custom1 = 0; - } - } - - } -} - -int ntreeTexExecTree( - bNodeTree *nodes, - TexResult *texres, - float *co, - float *dxt, float *dyt, - int osatex, - short thread, - Tex *UNUSED(tex), - short which_output, - int cfra, - int preview, - ShadeInput *shi, - MTex *mtex -){ - TexCallData data; - float *nor= texres->nor; - int retval = TEX_INT; - - data.co = co; - data.dxt = dxt; - data.dyt = dyt; - data.osatex = osatex; - data.target = texres; - data.do_preview = preview; - data.thread = thread; - data.which_output = which_output; - data.cfra= cfra; - data.mtex= mtex; - data.shi= shi; - - ntreeExecTree(nodes, &data, thread); - - if(texres->nor) retval |= TEX_NOR; - retval |= TEX_RGB; - /* confusing stuff; the texture output node sets this to NULL to indicate no normal socket was set - however, the texture code checks this for other reasons (namely, a normal is required for material) */ - texres->nor= nor; - - return retval; -} - diff --git a/source/blender/nodes/intern/TEX_util.h b/source/blender/nodes/intern/TEX_util.h deleted file mode 100644 index 0875bcd52bf..00000000000 --- a/source/blender/nodes/intern/TEX_util.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 Blender Foundation. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/nodes/intern/TEX_util.h - * \ingroup nodes - */ - - -#ifndef TEX_NODE_UTIL_H_ -#define TEX_NODE_UTIL_H_ - -#include -#include - -#include "MEM_guardedalloc.h" - -#include "DNA_color_types.h" -#include "DNA_ipo_types.h" -#include "DNA_ID.h" -#include "DNA_image_types.h" -#include "DNA_material_types.h" -#include "DNA_node_types.h" -#include "DNA_object_types.h" -#include "DNA_scene_types.h" -#include "DNA_texture_types.h" - -#include "BKE_blender.h" -#include "BKE_colortools.h" -#include "BKE_global.h" -#include "BKE_image.h" -#include "BKE_main.h" -#include "BKE_material.h" -#include "BKE_node.h" -#include "BKE_texture.h" - -#include "BKE_library.h" - -#include "../SHD_node.h" -#include "node_util.h" - -#include "BLI_math.h" -#include "BLI_blenlib.h" -#include "BLI_rand.h" -#include "BLI_threads.h" -#include "BLI_utildefines.h" - -#include "IMB_imbuf_types.h" -#include "IMB_imbuf.h" - -#include "RE_pipeline.h" -#include "RE_shader_ext.h" - -typedef struct TexCallData { - TexResult *target; - float *co; - float *dxt, *dyt; - int osatex; - char do_preview; - short thread; - short which_output; - int cfra; - - ShadeInput *shi; - MTex *mtex; -} TexCallData; - -typedef struct TexParams { - float *co; - float *dxt, *dyt; - float *previewco; - int cfra; - int osatex; - - /* optional. we don't really want these here, but image - textures need to do mapping & color correction */ - ShadeInput *shi; - MTex *mtex; -} TexParams; - -typedef void(*TexFn) (float *out, TexParams *params, bNode *node, bNodeStack **in, short thread); - -typedef struct TexDelegate { - TexCallData *cdata; - TexFn fn; - bNode *node; - bNodeStack *in[MAX_SOCKET]; - int type; -} TexDelegate; - -void tex_call_delegate(TexDelegate*, float *out, TexParams *params, short thread); - -void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread); -void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread); -float tex_input_value(bNodeStack *in, TexParams *params, short thread); - -void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *data); -void tex_do_preview(bNode *node, float *coord, float *col); - -void params_from_cdata(TexParams *out, TexCallData *in); - -#endif diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c new file mode 100644 index 00000000000..76203c52293 --- /dev/null +++ b/source/blender/nodes/intern/node_common.c @@ -0,0 +1,982 @@ +/** + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Lukas Toenne. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/intern/node_common.c + * \ingroup nodes + */ + + +#include + +#include "DNA_action_types.h" +#include "DNA_anim_types.h" +#include "DNA_node_types.h" + +#include "BLI_listbase.h" +#include "BLI_string.h" +#include "BLI_utildefines.h" + +#include "BKE_action.h" +#include "BKE_animsys.h" +#include "BKE_global.h" +#include "BKE_library.h" +#include "BKE_main.h" +#include "BLI_math.h" +#include "BKE_node.h" +#include "BKE_utildefines.h" + +#include "RNA_access.h" +#include "RNA_types.h" + +#include "MEM_guardedalloc.h" + +#include "node_common.h" +#include "node_exec.h" +#include "NOD_socket.h" + +/**** Group ****/ + +bNodeSocket *node_group_find_input(bNode *gnode, bNodeSocket *gsock) +{ + bNodeSocket *sock; + for (sock=gnode->inputs.first; sock; sock=sock->next) + if (sock->groupsock == gsock) + return sock; + return NULL; +} + +bNodeSocket *node_group_find_output(bNode *gnode, bNodeSocket *gsock) +{ + bNodeSocket *sock; + for (sock=gnode->outputs.first; sock; sock=sock->next) + if (sock->groupsock == gsock) + return sock; + return NULL; +} + +bNodeSocket *node_group_add_extern_socket(bNodeTree *UNUSED(ntree), ListBase *lb, int in_out, bNodeSocket *gsock) +{ + bNodeSocket *sock; + + if (gsock->flag & SOCK_INTERNAL) + return NULL; + + sock= MEM_callocN(sizeof(bNodeSocket), "sock"); + + /* make a copy of the group socket */ + *sock = *gsock; + sock->link = NULL; + sock->next = sock->prev = NULL; + sock->new_sock = NULL; + + /* group sockets are dynamically added */ + sock->flag |= SOCK_DYNAMIC; + + sock->own_index = gsock->own_index; + sock->groupsock = gsock; + sock->limit = (in_out==SOCK_IN ? 1 : 0xFFF); + + if (gsock->default_value) + sock->default_value = MEM_dupallocN(gsock->default_value); + + if(lb) + BLI_addtail(lb, sock); + + return sock; +} + +bNode *node_group_make_from_selected(bNodeTree *ntree) +{ + bNodeLink *link, *linkn; + bNode *node, *gnode, *nextn; + bNodeTree *ngroup; + bNodeSocket *gsock; + ListBase anim_basepaths = {NULL, NULL}; + float min[2], max[2]; + int totnode=0; + bNodeTemplate ntemp; + + INIT_MINMAX2(min, max); + + /* is there something to group? also do some clearing */ + for(node= ntree->nodes.first; node; node= node->next) { + if(node->flag & NODE_SELECT) { + /* no groups in groups */ + if(node->type==NODE_GROUP) + return NULL; + DO_MINMAX2( (&node->locx), min, max); + totnode++; + } + node->done= 0; + } + if(totnode==0) return NULL; + + /* check if all connections are OK, no unselected node has both + inputs and outputs to a selection */ + for(link= ntree->links.first; link; link= link->next) { + if(link->fromnode && link->tonode && link->fromnode->flag & NODE_SELECT) + link->tonode->done |= 1; + if(link->fromnode && link->tonode && link->tonode->flag & NODE_SELECT) + link->fromnode->done |= 2; + } + + for(node= ntree->nodes.first; node; node= node->next) { + if((node->flag & NODE_SELECT)==0) + if(node->done==3) + break; + } + if(node) + return NULL; + + /* OK! new nodetree */ + ngroup= ntreeAddTree("NodeGroup", ntree->type, NODE_GROUP); + + /* move nodes over */ + for(node= ntree->nodes.first; node; node= nextn) { + nextn= node->next; + if(node->flag & NODE_SELECT) { + /* keep track of this node's RNA "base" path (the part of the pat identifying the node) + * if the old nodetree has animation data which potentially covers this node + */ + if (ntree->adt) { + PointerRNA ptr; + char *path; + + RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); + path = RNA_path_from_ID_to_struct(&ptr); + + if (path) + BLI_addtail(&anim_basepaths, BLI_genericNodeN(path)); + } + + /* change node-collection membership */ + BLI_remlink(&ntree->nodes, node); + BLI_addtail(&ngroup->nodes, node); + + node->locx-= 0.5f*(min[0]+max[0]); + node->locy-= 0.5f*(min[1]+max[1]); + } + } + + /* move animation data over */ + if (ntree->adt) { + LinkData *ld, *ldn=NULL; + + BKE_animdata_separate_by_basepath(&ntree->id, &ngroup->id, &anim_basepaths); + + /* paths + their wrappers need to be freed */ + for (ld = anim_basepaths.first; ld; ld = ldn) { + ldn = ld->next; + + MEM_freeN(ld->data); + BLI_freelinkN(&anim_basepaths, ld); + } + } + + /* make group node */ + ntemp.type = NODE_GROUP; + ntemp.ngroup = ngroup; + gnode= nodeAddNode(ntree, &ntemp); + gnode->locx= 0.5f*(min[0]+max[0]); + gnode->locy= 0.5f*(min[1]+max[1]); + + /* relink external sockets */ + for(link= ntree->links.first; link; link= linkn) { + linkn= link->next; + + if(link->fromnode && link->tonode && (link->fromnode->flag & link->tonode->flag & NODE_SELECT)) { + BLI_remlink(&ntree->links, link); + BLI_addtail(&ngroup->links, link); + } + else if(link->tonode && (link->tonode->flag & NODE_SELECT)) { + gsock = node_group_expose_socket(ngroup, link->tosock, SOCK_IN); + link->tosock->link = nodeAddLink(ngroup, NULL, gsock, link->tonode, link->tosock); + link->tosock = node_group_add_extern_socket(ntree, &gnode->inputs, SOCK_IN, gsock); + link->tonode = gnode; + } + else if(link->fromnode && (link->fromnode->flag & NODE_SELECT)) { + /* search for existing group node socket */ + for (gsock=ngroup->outputs.first; gsock; gsock=gsock->next) + if (gsock->link && gsock->link->fromsock==link->fromsock) + break; + if (!gsock) { + gsock = node_group_expose_socket(ngroup, link->fromsock, SOCK_OUT); + gsock->link = nodeAddLink(ngroup, link->fromnode, link->fromsock, NULL, gsock); + link->fromsock = node_group_add_extern_socket(ntree, &gnode->outputs, SOCK_OUT, gsock); + } + else + link->fromsock = node_group_find_output(gnode, gsock); + link->fromnode = gnode; + } + } + + ngroup->update |= NTREE_UPDATE; + ntreeUpdateTree(ngroup); + ntree->update |= NTREE_UPDATE_NODES|NTREE_UPDATE_LINKS; + ntreeUpdateTree(ntree); + + return gnode; +} + +/* XXX This is a makeshift function to have useful initial group socket values. + * In the end this should be implemented by a flexible socket data conversion system, + * which is yet to be implemented. The idea is that beside default standard conversions, + * such as int-to-float, it should be possible to quickly select a conversion method or + * a chain of conversions for each input, whenever there is more than one option. + * E.g. a vector-to-float conversion could use either of the x/y/z components or + * the vector length. + * + * In the interface this could be implemented by a pseudo-script textbox on linked inputs, + * with quick selection from a predefined list of conversion options. Some Examples: + * - vector component 'z' (vector->float): "z" + * - greyscale color (float->color): "grey" + * - color luminance (color->float): "lum" + * - matrix column 2 length (matrix->vector->float): "col[1].len" + * - mesh vertex coordinate 'y' (mesh->vertex->vector->float): "vertex.co.y" + * + * The actual conversion is then done by a series of conversion functions, + * which are defined in the socket type structs. + */ +static void convert_socket_value(bNodeSocket *from, bNodeSocket *to) +{ + /* XXX only one of these pointers is valid! just putting them here for convenience */ + bNodeSocketValueFloat *fromfloat= (bNodeSocketValueFloat*)from->default_value; + bNodeSocketValueInt *fromint= (bNodeSocketValueInt*)from->default_value; + bNodeSocketValueBoolean *frombool= (bNodeSocketValueBoolean*)from->default_value; + bNodeSocketValueVector *fromvector= (bNodeSocketValueVector*)from->default_value; + bNodeSocketValueRGBA *fromrgba= (bNodeSocketValueRGBA*)from->default_value; + + bNodeSocketValueFloat *tofloat= (bNodeSocketValueFloat*)to->default_value; + bNodeSocketValueInt *toint= (bNodeSocketValueInt*)to->default_value; + bNodeSocketValueBoolean *tobool= (bNodeSocketValueBoolean*)to->default_value; + bNodeSocketValueVector *tovector= (bNodeSocketValueVector*)to->default_value; + bNodeSocketValueRGBA *torgba= (bNodeSocketValueRGBA*)to->default_value; + + switch (from->type) { + case SOCK_FLOAT: + switch (to->type) { + case SOCK_FLOAT: + tofloat->value = fromfloat->value; + break; + case SOCK_INT: + toint->value = (int)fromfloat->value; + break; + case SOCK_BOOLEAN: + tobool->value = (fromfloat->value > 0.0f); + break; + case SOCK_VECTOR: + tovector->value[0] = tovector->value[1] = tovector->value[2] = fromfloat->value; + break; + case SOCK_RGBA: + torgba->value[0] = torgba->value[1] = torgba->value[2] = torgba->value[3] = fromfloat->value; + break; + } + break; + case SOCK_INT: + switch (to->type) { + case SOCK_FLOAT: + tofloat->value = (float)fromint->value; + break; + case SOCK_INT: + toint->value = fromint->value; + break; + case SOCK_BOOLEAN: + tobool->value = (fromint->value > 0); + break; + case SOCK_VECTOR: + tovector->value[0] = tovector->value[1] = tovector->value[2] = (float)fromint->value; + break; + case SOCK_RGBA: + torgba->value[0] = torgba->value[1] = torgba->value[2] = torgba->value[3] = (float)fromint->value; + break; + } + break; + case SOCK_BOOLEAN: + switch (to->type) { + case SOCK_FLOAT: + tofloat->value = (float)frombool->value; + break; + case SOCK_INT: + toint->value = (int)frombool->value; + break; + case SOCK_BOOLEAN: + tobool->value = frombool->value; + break; + case SOCK_VECTOR: + tovector->value[0] = tovector->value[1] = tovector->value[2] = (float)frombool->value; + break; + case SOCK_RGBA: + torgba->value[0] = torgba->value[1] = torgba->value[2] = torgba->value[3] = (float)frombool->value; + break; + } + break; + case SOCK_VECTOR: + switch (to->type) { + case SOCK_FLOAT: + tofloat->value = fromvector->value[0]; + break; + case SOCK_INT: + toint->value = (int)fromvector->value[0]; + break; + case SOCK_BOOLEAN: + tobool->value = (fromvector->value[0] > 0.0f); + break; + case SOCK_VECTOR: + copy_v3_v3(tovector->value, fromvector->value); + break; + case SOCK_RGBA: + copy_v3_v3(torgba->value, fromvector->value); + torgba->value[3] = 1.0f; + break; + } + break; + case SOCK_RGBA: + switch (to->type) { + case SOCK_FLOAT: + tofloat->value = fromrgba->value[0]; + break; + case SOCK_INT: + toint->value = (int)fromrgba->value[0]; + break; + case SOCK_BOOLEAN: + tobool->value = (fromrgba->value[0] > 0.0f); + break; + case SOCK_VECTOR: + copy_v3_v3(tovector->value, fromrgba->value); + break; + case SOCK_RGBA: + copy_v4_v4(torgba->value, fromrgba->value); + break; + } + break; + } +} + +static void copy_socket_value(bNodeSocket *from, bNodeSocket *to) +{ + /* XXX only one of these pointers is valid! just putting them here for convenience */ + bNodeSocketValueFloat *fromfloat= (bNodeSocketValueFloat*)from->default_value; + bNodeSocketValueInt *fromint= (bNodeSocketValueInt*)from->default_value; + bNodeSocketValueBoolean *frombool= (bNodeSocketValueBoolean*)from->default_value; + bNodeSocketValueVector *fromvector= (bNodeSocketValueVector*)from->default_value; + bNodeSocketValueRGBA *fromrgba= (bNodeSocketValueRGBA*)from->default_value; + + bNodeSocketValueFloat *tofloat= (bNodeSocketValueFloat*)to->default_value; + bNodeSocketValueInt *toint= (bNodeSocketValueInt*)to->default_value; + bNodeSocketValueBoolean *tobool= (bNodeSocketValueBoolean*)to->default_value; + bNodeSocketValueVector *tovector= (bNodeSocketValueVector*)to->default_value; + bNodeSocketValueRGBA *torgba= (bNodeSocketValueRGBA*)to->default_value; + + if (from->type != to->type) + return; + + switch (from->type) { + case SOCK_FLOAT: + *tofloat = *fromfloat; + break; + case SOCK_INT: + *toint = *fromint; + break; + case SOCK_BOOLEAN: + *tobool = *frombool; + break; + case SOCK_VECTOR: + *tovector = *fromvector; + break; + case SOCK_RGBA: + *torgba = *fromrgba; + break; + } +} + +/* returns 1 if its OK */ +int node_group_ungroup(bNodeTree *ntree, bNode *gnode) +{ + bNodeLink *link, *linkn; + bNode *node, *nextn; + bNodeTree *ngroup, *wgroup; + ListBase anim_basepaths = {NULL, NULL}; + + ngroup= (bNodeTree *)gnode->id; + if(ngroup==NULL) return 0; + + /* clear new pointers, set in copytree */ + for(node= ntree->nodes.first; node; node= node->next) + node->new_node= NULL; + + /* wgroup is a temporary copy of the NodeTree we're merging in + * - all of wgroup's nodes are transferred across to their new home + * - ngroup (i.e. the source NodeTree) is left unscathed + */ + wgroup= ntreeCopyTree(ngroup); + + /* add the nodes into the ntree */ + for(node= wgroup->nodes.first; node; node= nextn) { + nextn= node->next; + + /* keep track of this node's RNA "base" path (the part of the pat identifying the node) + * if the old nodetree has animation data which potentially covers this node + */ + if (wgroup->adt) { + PointerRNA ptr; + char *path; + + RNA_pointer_create(&wgroup->id, &RNA_Node, node, &ptr); + path = RNA_path_from_ID_to_struct(&ptr); + + if (path) + BLI_addtail(&anim_basepaths, BLI_genericNodeN(path)); + } + + /* migrate node */ + BLI_remlink(&wgroup->nodes, node); + BLI_addtail(&ntree->nodes, node); + + node->locx+= gnode->locx; + node->locy+= gnode->locy; + + node->flag |= NODE_SELECT; + } + + /* restore external links to and from the gnode */ + for(link= ntree->links.first; link; link= link->next) { + if (link->fromnode==gnode) { + if (link->fromsock->groupsock) { + bNodeSocket *gsock= link->fromsock->groupsock; + if (gsock->link) { + if (gsock->link->fromnode) { + /* NB: using the new internal copies here! the groupsock pointer still maps to the old tree */ + link->fromnode = (gsock->link->fromnode ? gsock->link->fromnode->new_node : NULL); + link->fromsock = gsock->link->fromsock->new_sock; + } + else { + /* group output directly maps to group input */ + bNodeSocket *insock= node_group_find_input(gnode, gsock->link->fromsock); + if (insock->link) { + link->fromnode = insock->link->fromnode; + link->fromsock = insock->link->fromsock; + } + } + } + else { + /* copy the default input value from the group socket default to the external socket */ + convert_socket_value(gsock, link->tosock); + } + } + } + } + /* remove internal output links, these are not used anymore */ + for(link=wgroup->links.first; link; link= linkn) { + linkn = link->next; + if (!link->tonode) + nodeRemLink(wgroup, link); + } + /* restore links from internal nodes */ + for(link= wgroup->links.first; link; link= link->next) { + /* indicates link to group input */ + if (!link->fromnode) { + /* NB: can't use find_group_node_input here, + * because gnode sockets still point to the old tree! + */ + bNodeSocket *insock; + for (insock= gnode->inputs.first; insock; insock= insock->next) + if (insock->groupsock->new_sock == link->fromsock) + break; + if (insock->link) { + link->fromnode = insock->link->fromnode; + link->fromsock = insock->link->fromsock; + } + else { + /* copy the default input value from the group node socket default to the internal socket */ + convert_socket_value(insock, link->tosock); + nodeRemLink(wgroup, link); + } + } + } + + /* add internal links to the ntree */ + for(link= wgroup->links.first; link; link= linkn) { + linkn= link->next; + BLI_remlink(&wgroup->links, link); + BLI_addtail(&ntree->links, link); + } + + /* and copy across the animation */ + if (wgroup->adt) { + LinkData *ld, *ldn=NULL; + bAction *waction; + + /* firstly, wgroup needs to temporary dummy action that can be destroyed, as it shares copies */ + waction = wgroup->adt->action = copy_action(wgroup->adt->action); + + /* now perform the moving */ + BKE_animdata_separate_by_basepath(&wgroup->id, &ntree->id, &anim_basepaths); + + /* paths + their wrappers need to be freed */ + for (ld = anim_basepaths.first; ld; ld = ldn) { + ldn = ld->next; + + MEM_freeN(ld->data); + BLI_freelinkN(&anim_basepaths, ld); + } + + /* free temp action too */ + free_libblock(&G.main->action, waction); + } + + /* delete the group instance. this also removes old input links! */ + nodeFreeNode(ntree, gnode); + + /* free the group tree (takes care of user count) */ + free_libblock(&G.main->nodetree, wgroup); + + ntree->update |= NTREE_UPDATE_NODES|NTREE_UPDATE_LINKS; + ntreeUpdateTree(ntree); + + return 1; +} + +bNodeSocket *node_group_add_socket(bNodeTree *ngroup, const char *name, int type, int in_out) +{ + bNodeSocketType *stype = ntreeGetSocketType(type); + bNodeSocket *gsock = MEM_callocN(sizeof(bNodeSocket), "bNodeSocket"); + + strncpy(gsock->name, name, sizeof(gsock->name)); + gsock->type = type; + /* group sockets are dynamically added */ + gsock->flag |= SOCK_DYNAMIC; + + gsock->next = gsock->prev = NULL; + gsock->new_sock = NULL; + gsock->link = NULL; + /* assign new unique index */ + gsock->own_index = ngroup->cur_index++; + gsock->limit = (in_out==SOCK_IN ? 0xFFF : 1); + + if (stype->value_structsize > 0) + gsock->default_value = MEM_callocN(stype->value_structsize, "default socket value"); + + BLI_addtail(in_out==SOCK_IN ? &ngroup->inputs : &ngroup->outputs, gsock); + + ngroup->update |= (in_out==SOCK_IN ? NTREE_UPDATE_GROUP_IN : NTREE_UPDATE_GROUP_OUT); + + return gsock; +} + +bNodeSocket *node_group_expose_socket(bNodeTree *ngroup, bNodeSocket *sock, int in_out) +{ + bNodeSocket *gsock= node_group_add_socket(ngroup, sock->name, sock->type, in_out); + + /* initialize the default value. */ + copy_socket_value(sock, gsock); + + return gsock; +} + +void node_group_expose_all_sockets(bNodeTree *ngroup) +{ + bNode *node; + bNodeSocket *sock, *gsock; + + for (node=ngroup->nodes.first; node; node=node->next) { + for (sock=node->inputs.first; sock; sock=sock->next) { + if (!sock->link && !(sock->flag & SOCK_HIDDEN)) { + gsock = node_group_add_socket(ngroup, sock->name, sock->type, SOCK_IN); + + /* initialize the default value. */ + copy_socket_value(sock, gsock); + + sock->link = nodeAddLink(ngroup, NULL, gsock, node, sock); + } + } + for (sock=node->outputs.first; sock; sock=sock->next) { + if (nodeCountSocketLinks(ngroup, sock)==0 && !(sock->flag & SOCK_HIDDEN)) { + gsock = node_group_add_socket(ngroup, sock->name, sock->type, SOCK_OUT); + + /* initialize the default value. */ + copy_socket_value(sock, gsock); + + gsock->link = nodeAddLink(ngroup, node, sock, NULL, gsock); + } + } + } +} + +void node_group_remove_socket(bNodeTree *ngroup, bNodeSocket *gsock, int in_out) +{ + nodeRemSocketLinks(ngroup, gsock); + + switch (in_out) { + case SOCK_IN: + BLI_remlink(&ngroup->inputs, gsock); + ngroup->update |= NTREE_UPDATE_GROUP_IN; + break; + case SOCK_OUT: + BLI_remlink(&ngroup->outputs, gsock); + ngroup->update |= NTREE_UPDATE_GROUP_OUT; + break; + } + + if (gsock->default_value) + MEM_freeN(gsock->default_value); + + MEM_freeN(gsock); +} + +/* groups display their internal tree name as label */ +const char *node_group_label(bNode *node) +{ + return (node->id)? node->id->name+2: "Missing Datablock"; +} + +int node_group_valid(bNodeTree *ntree, bNodeTemplate *ntemp) +{ + bNodeTemplate childtemp; + bNode *node; + + /* regular groups cannot be recursive */ + if (ntree == ntemp->ngroup) + return 0; + + /* make sure all children are valid */ + for (node=ntemp->ngroup->nodes.first; node; node=node->next) { + childtemp = nodeMakeTemplate(node); + if (!nodeValid(ntree, &childtemp)) + return 0; + } + + return 1; +} + +bNodeTemplate node_group_template(bNode *node) +{ + bNodeTemplate ntemp; + ntemp.type = NODE_GROUP; + ntemp.ngroup = (bNodeTree*)node->id; + return ntemp; +} + +void node_group_init(bNodeTree *ntree, bNode *node, bNodeTemplate *ntemp) +{ + node->id = (ID*)ntemp->ngroup; + + /* NB: group socket input/output roles are inverted internally! + * Group "inputs" work as outputs in links and vice versa. + */ + if (ntemp->ngroup) { + bNodeSocket *gsock; + for (gsock=ntemp->ngroup->inputs.first; gsock; gsock=gsock->next) + node_group_add_extern_socket(ntree, &node->inputs, SOCK_IN, gsock); + for (gsock=ntemp->ngroup->outputs.first; gsock; gsock=gsock->next) + node_group_add_extern_socket(ntree, &node->outputs, SOCK_OUT, gsock); + } +} + +static bNodeSocket *group_verify_socket(bNodeTree *ntree, ListBase *lb, int in_out, bNodeSocket *gsock) +{ + bNodeSocket *sock; + + /* group sockets tagged as internal are not exposed ever */ + if (gsock->flag & SOCK_INTERNAL) + return NULL; + + for(sock= lb->first; sock; sock= sock->next) { + if(sock->own_index==gsock->own_index) + break; + } + if(sock) { + sock->groupsock = gsock; + + strcpy(sock->name, gsock->name); + sock->type= gsock->type; + + /* XXX hack: group socket input/output roles are inverted internally, + * need to change the limit value when making actual node sockets from them. + */ + sock->limit = (in_out==SOCK_IN ? 1 : 0xFFF); + + BLI_remlink(lb, sock); + + return sock; + } + else { + return node_group_add_extern_socket(ntree, NULL, in_out, gsock); + } +} + +static void group_verify_socket_list(bNodeTree *ntree, bNode *node, ListBase *lb, int in_out, ListBase *glb) +{ + bNodeSocket *sock, *nextsock, *gsock; + + /* step by step compare */ + for (gsock= glb->first; gsock; gsock=gsock->next) { + /* abusing new_sock pointer for verification here! only used inside this function */ + gsock->new_sock= group_verify_socket(ntree, lb, in_out, gsock); + } + /* leftovers are removed */ + for (sock=lb->first; sock; sock=nextsock) { + nextsock=sock->next; + if (sock->flag & SOCK_DYNAMIC) + nodeRemoveSocket(ntree, node, sock); + } + /* and we put back the verified sockets */ + for (gsock= glb->first; gsock; gsock=gsock->next) { + if (gsock->new_sock) { + BLI_addtail(lb, gsock->new_sock); + gsock->new_sock = NULL; + } + } +} + +/* make sure all group node in ntree, which use ngroup, are sync'd */ +void node_group_verify(struct bNodeTree *ntree, struct bNode *node, struct ID *id) +{ + /* check inputs and outputs, and remove or insert them */ + if (node->id==id) { + bNodeTree *ngroup= (bNodeTree*)node->id; + group_verify_socket_list(ntree, node, &node->inputs, SOCK_IN, &ngroup->inputs); + group_verify_socket_list(ntree, node, &node->outputs, SOCK_OUT, &ngroup->outputs); + } +} + +struct bNodeTree *node_group_edit_get(bNode *node) +{ + if (node->flag & NODE_GROUP_EDIT) + return (bNodeTree*)node->id; + else + return NULL; +} + +struct bNodeTree *node_group_edit_set(bNode *node, int edit) +{ + if (edit) { + bNodeTree *ngroup= (bNodeTree*)node->id; + if (ngroup) { + if(ngroup->id.lib) + ntreeMakeLocal(ngroup); + + node->flag |= NODE_GROUP_EDIT; + } + return ngroup; + } + else { + node->flag &= ~NODE_GROUP_EDIT; + return NULL; + } +} + +void node_group_edit_clear(bNode *node) +{ + bNodeTree *ngroup= (bNodeTree*)node->id; + bNode *inode; + + node->flag &= ~NODE_GROUP_EDIT; + + if (ngroup) + for (inode=ngroup->nodes.first; inode; inode=inode->next) + nodeGroupEditClear(inode); +} + +void node_group_link(bNodeTree *ntree, bNodeSocket *sock, int in_out) +{ + node_group_expose_socket(ntree, sock, in_out); +} + +/**** For Loop ****/ + +/* Essentially a group node with slightly different behavior. + * The internal tree is executed several times, with each output being re-used + * as an input in the next iteration. For this purpose, input and output socket + * lists are kept identical! + */ + +bNodeTemplate node_forloop_template(bNode *node) +{ + bNodeTemplate ntemp; + ntemp.type = NODE_FORLOOP; + ntemp.ngroup = (bNodeTree*)node->id; + return ntemp; +} + +void node_forloop_init(bNodeTree *ntree, bNode *node, bNodeTemplate *ntemp) +{ + bNodeSocket *sock; + + node->id = (ID*)ntemp->ngroup; + + sock = nodeAddInputFloat(ntree, node, "Iterations", PROP_UNSIGNED, 1, 0, 10000); + + /* NB: group socket input/output roles are inverted internally! + * Group "inputs" work as outputs in links and vice versa. + */ + if (ntemp->ngroup) { + bNodeSocket *gsock; + for (gsock=ntemp->ngroup->inputs.first; gsock; gsock=gsock->next) + node_group_add_extern_socket(ntree, &node->inputs, SOCK_IN, gsock); + for (gsock=ntemp->ngroup->outputs.first; gsock; gsock=gsock->next) + node_group_add_extern_socket(ntree, &node->outputs, SOCK_OUT, gsock); + } +} + +void node_forloop_init_tree(bNodeTree *ntree) +{ + bNodeSocket *sock; + sock = node_group_add_socket(ntree, "Iteration", SOCK_FLOAT, SOCK_IN); + sock->flag |= SOCK_INTERNAL; +} + +static void loop_sync(bNodeTree *ntree, int sync_in_out) +{ + bNodeSocket *sock, *sync, *nsync, *mirror; + ListBase *sync_lb; + + if (sync_in_out==SOCK_IN) { + sock = ntree->outputs.first; + + sync = ntree->inputs.first; + sync_lb = &ntree->inputs; + } + else { + sock = ntree->inputs.first; + + sync = ntree->outputs.first; + sync_lb = &ntree->outputs; + } + + /* NB: the sock->storage pointer is used here directly to store the own_index int + * out the mirrored socket counterpart! + */ + + while (sock) { + /* skip static and internal sockets on the sync side (preserves socket order!) */ + while (sync && ((sync->flag & SOCK_INTERNAL) || !(sync->flag & SOCK_DYNAMIC))) + sync = sync->next; + + if (!(sync->flag & SOCK_INTERNAL) && (sync->flag & SOCK_DYNAMIC)) { + if (sock->storage==NULL) { + /* if mirror index is 0, the sockets is newly added and a new mirror must be created. */ + mirror = node_group_expose_socket(ntree, sock, sync_in_out); + /* store the mirror index */ + sock->storage = SET_INT_IN_POINTER(mirror->own_index); + mirror->storage = SET_INT_IN_POINTER(sock->own_index); + /* move mirror to the right place */ + BLI_remlink(sync_lb, mirror); + if (sync) + BLI_insertlinkbefore(sync_lb, sync, mirror); + else + BLI_addtail(sync_lb, mirror); + } + else { + /* look up the mirror socket */ + for (mirror=sync; mirror; mirror=mirror->next) + if (mirror->own_index == GET_INT_FROM_POINTER(sock->storage)) + break; + /* make sure the name is the same (only for identification by user, no deeper meaning) */ + strcpy(mirror->name, sock->name); + /* fix the socket order if necessary */ + if (mirror != sync) { + BLI_remlink(sync_lb, mirror); + BLI_insertlinkbefore(sync_lb, sync, mirror); + } + else + sync = sync->next; + } + } + + sock = sock->next; + } + + /* remaining sockets in sync_lb are leftovers from deleted sockets, remove them */ + while (sync) { + nsync = sync->next; + if (!(sync->flag & SOCK_INTERNAL) && (sync->flag & SOCK_DYNAMIC)) + node_group_remove_socket(ntree, sync, sync_in_out); + sync = nsync; + } +} + +void node_loop_update_tree(bNodeTree *ngroup) +{ + /* make sure inputs & outputs are identical */ + if (ngroup->update & NTREE_UPDATE_GROUP_IN) + loop_sync(ngroup, SOCK_OUT); + if (ngroup->update & NTREE_UPDATE_GROUP_OUT) + loop_sync(ngroup, SOCK_IN); +} + +void node_whileloop_init(bNodeTree *ntree, bNode *node, bNodeTemplate *ntemp) +{ + bNodeSocket *sock; + + node->id = (ID*)ntemp->ngroup; + + sock = nodeAddInputFloat(ntree, node, "Condition", PROP_NONE, 1, 0, 1); + + /* max iterations */ + node->custom1 = 10000; + + /* NB: group socket input/output roles are inverted internally! + * Group "inputs" work as outputs in links and vice versa. + */ + if (ntemp->ngroup) { + bNodeSocket *gsock; + for (gsock=ntemp->ngroup->inputs.first; gsock; gsock=gsock->next) + node_group_add_extern_socket(ntree, &node->inputs, SOCK_IN, gsock); + for (gsock=ntemp->ngroup->outputs.first; gsock; gsock=gsock->next) + node_group_add_extern_socket(ntree, &node->outputs, SOCK_OUT, gsock); + } +} + +void node_whileloop_init_tree(bNodeTree *ntree) +{ + bNodeSocket *sock; + sock = node_group_add_socket(ntree, "Condition", SOCK_FLOAT, SOCK_OUT); + sock->flag |= SOCK_INTERNAL; +} + +bNodeTemplate node_whileloop_template(bNode *node) +{ + bNodeTemplate ntemp; + ntemp.type = NODE_WHILELOOP; + ntemp.ngroup = (bNodeTree*)node->id; + return ntemp; +} + +/**** FRAME ****/ + +void register_node_type_frame(ListBase *lb) +{ + /* frame type is used for all tree types, needs dynamic allocation */ + bNodeType *ntype= MEM_callocN(sizeof(bNodeType), "frame node type"); + + node_type_base(ntype, NODE_FRAME, "Frame", NODE_CLASS_LAYOUT, NODE_BACKGROUND); + node_type_size(ntype, 150, 100, 0); + + ntype->needs_free = 1; + nodeRegisterType(lb, ntype); +} diff --git a/source/blender/nodes/intern/node_common.h b/source/blender/nodes/intern/node_common.h new file mode 100644 index 00000000000..31a13d8168d --- /dev/null +++ b/source/blender/nodes/intern/node_common.h @@ -0,0 +1,65 @@ +/** + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Lukas Toenne. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/intern/node_common.h + * \ingroup nodes + */ + + +#ifndef NODE_COMMON_H_ +#define NODE_COMMON_H_ + +#include "DNA_listBase.h" + +struct bNodeTree; + +struct bNodeSocket *node_group_add_extern_socket(struct bNodeTree *ntree, ListBase *lb, int in_out, struct bNodeSocket *gsock); + +void node_group_init(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp); +void node_forloop_init(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp); +void node_whileloop_init(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp); + +void node_forloop_init_tree(struct bNodeTree *ntree); +void node_whileloop_init_tree(struct bNodeTree *ntree); + +const char *node_group_label(struct bNode *node); + +struct bNodeTemplate node_group_template(struct bNode *node); +struct bNodeTemplate node_forloop_template(struct bNode *node); +struct bNodeTemplate node_whileloop_template(struct bNode *node); + +int node_group_valid(struct bNodeTree *ntree, struct bNodeTemplate *ntemp); +void node_group_verify(struct bNodeTree *ntree, struct bNode *node, struct ID *id); + +struct bNodeTree *node_group_edit_get(struct bNode *node); +struct bNodeTree *node_group_edit_set(struct bNode *node, int edit); +void node_group_edit_clear(bNode *node); + +void node_loop_update_tree(struct bNodeTree *ngroup); + +#endif diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c new file mode 100644 index 00000000000..0d688438cf9 --- /dev/null +++ b/source/blender/nodes/intern/node_exec.c @@ -0,0 +1,308 @@ +/** + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Nathan Letwory. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/intern/node_exec.c + * \ingroup nodes + */ + + +#include "DNA_node_types.h" + +#include "BLI_listbase.h" +#include "BLI_math.h" +#include "BLI_utildefines.h" + +#include "BKE_node.h" + +#include "MEM_guardedalloc.h" + +#include "node_exec.h" + + +/* for a given socket, find the actual stack entry */ +bNodeStack *node_get_socket_stack(bNodeStack *stack, bNodeSocket *sock) +{ + return stack + sock->stack_index; +} + +void node_get_stack(bNode *node, bNodeStack *stack, bNodeStack **in, bNodeStack **out) +{ + bNodeSocket *sock; + + /* build pointer stack */ + if (in) { + for(sock= node->inputs.first; sock; sock= sock->next) { + *(in++) = node_get_socket_stack(stack, sock); + } + } + + if (out) { + for(sock= node->outputs.first; sock; sock= sock->next) { + *(out++) = node_get_socket_stack(stack, sock); + } + } +} + +void node_init_input_index(bNodeSocket *sock, int *index) +{ + if (sock->link && sock->link->fromsock) { + sock->stack_index = sock->link->fromsock->stack_index; + } + else { + sock->stack_index = (*index)++; + } +} + +void node_init_output_index(bNodeSocket *sock, int *index) +{ + sock->stack_index = (*index)++; +} + +/* basic preparation of socket stacks */ +static struct bNodeStack *setup_stack(bNodeStack *stack, bNodeSocket *sock) +{ + bNodeStack *ns = node_get_socket_stack(stack, sock); + float null_value[4]= {0.0f, 0.0f, 0.0f, 0.0f}; + + /* don't mess with remote socket stacks, these are initialized by other nodes! */ + if (sock->link) + return ns; + + ns->sockettype = sock->type; + + if (sock->default_value) { + switch (sock->type) { + case SOCK_FLOAT: + ns->vec[0] = ((bNodeSocketValueFloat*)sock->default_value)->value; + break; + case SOCK_VECTOR: + copy_v3_v3(ns->vec, ((bNodeSocketValueVector*)sock->default_value)->value); + break; + case SOCK_RGBA: + copy_v4_v4(ns->vec, ((bNodeSocketValueRGBA*)sock->default_value)->value); + break; + } + } + else { + switch (sock->type) { + case SOCK_FLOAT: + ns->vec[0] = 0.0f; + break; + case SOCK_VECTOR: + copy_v3_v3(ns->vec, null_value); + break; + case SOCK_RGBA: + copy_v4_v4(ns->vec, null_value); + break; + } + } + + return ns; +} + +bNodeTreeExec *ntree_exec_begin(bNodeTree *ntree) +{ + bNodeTreeExec *exec; + bNode *node; + bNodeExec *nodeexec; + bNodeSocket *sock, *gsock; + bNodeStack *ns; + int index= 0; + bNode **nodelist; + int totnodes, n; + + if((ntree->init & NTREE_TYPE_INIT)==0) + ntreeInitTypes(ntree); + + /* get a dependency-sorted list of nodes */ + ntreeGetDependencyList(ntree, &nodelist, &totnodes); + + /* XXX could let callbacks do this for specialized data */ + exec = MEM_callocN(sizeof(bNodeTreeExec), "node tree execution data"); + /* backpointer to node tree */ + exec->nodetree = ntree; + + /* group inputs essentially work as outputs */ + for(gsock=ntree->inputs.first; gsock; gsock = gsock->next) + node_init_output_index(gsock, &index); + /* set stack indexes */ + for(n=0; n < totnodes; ++n) { + node = nodelist[n]; + + node->stack_index = index; + + /* init node socket stack indexes */ + for (sock=node->inputs.first; sock; sock=sock->next) + node_init_input_index(sock, &index); + for (sock=node->outputs.first; sock; sock=sock->next) + node_init_output_index(sock, &index); + } + /* group outputs essentially work as inputs */ + for(gsock=ntree->outputs.first; gsock; gsock = gsock->next) + node_init_input_index(gsock, &index); + + /* allocated exec data pointers for nodes */ + exec->totnodes = totnodes; + exec->nodeexec = MEM_callocN(exec->totnodes * sizeof(bNodeExec), "node execution data"); + /* allocate data pointer for node stack */ + exec->stacksize = index; + exec->stack = MEM_callocN(exec->stacksize * sizeof(bNodeStack), "bNodeStack"); + + /* prepare group tree inputs */ + for (sock=ntree->inputs.first; sock; sock=sock->next) { + ns = setup_stack(exec->stack, sock); + if (ns->hasoutput) + ns->hasinput = 1; + } + /* prepare all internal nodes for execution */ + for(n=0, nodeexec= exec->nodeexec; n < totnodes; ++n, ++nodeexec) { + node = nodeexec->node = nodelist[n]; + + /* tag inputs */ + for (sock=node->inputs.first; sock; sock=sock->next) { + /* disable the node if an input link is invalid */ + if(sock->link && !(sock->link->flag & NODE_LINK_VALID)) + node->need_exec= 0; + + ns = setup_stack(exec->stack, sock); + if (ns->hasoutput) + ns->hasinput = 1; + } + + /* tag all outputs */ + for (sock=node->outputs.first; sock; sock=sock->next) { + ns = setup_stack(exec->stack, sock); + ns->hasoutput = 1; + } + + if(node->typeinfo->initexecfunc) + nodeexec->data = node->typeinfo->initexecfunc(node); + } + /* prepare group tree outputs */ + for (sock=ntree->outputs.first; sock; sock=sock->next) { + ns = setup_stack(exec->stack, sock); + ns->hasoutput = 1; + } + + if (nodelist) + MEM_freeN(nodelist); + + return exec; +} + +void ntree_exec_end(bNodeTreeExec *exec) +{ + bNodeExec *nodeexec; + int n; + + if (exec->stack) + MEM_freeN(exec->stack); + + for(n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { + if (nodeexec->node->typeinfo->freeexecfunc) + nodeexec->node->typeinfo->freeexecfunc(nodeexec->node, nodeexec->data); + } + + if (exec->nodeexec) + MEM_freeN(exec->nodeexec); + + MEM_freeN(exec); +} + +/**** Compositor/Material/Texture trees ****/ + +bNodeThreadStack *ntreeGetThreadStack(bNodeTreeExec *exec, int thread) +{ + ListBase *lb= &exec->threadstack[thread]; + bNodeThreadStack *nts; + + for(nts=lb->first; nts; nts=nts->next) { + if(!nts->used) { + nts->used= 1; + break; + } + } + + if (!nts) { + nts= MEM_callocN(sizeof(bNodeThreadStack), "bNodeThreadStack"); + nts->stack= MEM_dupallocN(exec->stack); + nts->used= 1; + BLI_addtail(lb, nts); + } + + return nts; +} + +void ntreeReleaseThreadStack(bNodeThreadStack *nts) +{ + nts->used = 0; +} + +void ntreeExecNodes(bNodeTreeExec *exec, void *callerdata, int thread) +{ + bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ + bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ + bNodeExec *nodeexec; + bNode *node; + int n; + + /* nodes are presorted, so exec is in order of list */ + + for(n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { + node = nodeexec->node; + if(node->need_exec) { + node_get_stack(node, exec->stack, nsin, nsout); + if(node->typeinfo->execfunc) + node->typeinfo->execfunc(callerdata, node, nsin, nsout); + else if (node->typeinfo->newexecfunc) + node->typeinfo->newexecfunc(callerdata, thread, node, nodeexec->data, nsin, nsout); + } + } +} + +void ntreeExecThreadNodes(bNodeTreeExec *exec, bNodeThreadStack *nts, void *callerdata, int thread) +{ + bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ + bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ + bNodeExec *nodeexec; + bNode *node; + int n; + + /* nodes are presorted, so exec is in order of list */ + + for(n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { + node = nodeexec->node; + if(node->need_exec) { + node_get_stack(node, nts->stack, nsin, nsout); + if(node->typeinfo->execfunc) + node->typeinfo->execfunc(callerdata, node, nsin, nsout); + else if (node->typeinfo->newexecfunc) + node->typeinfo->newexecfunc(callerdata, thread, node, nodeexec->data, nsin, nsout); + } + } +} diff --git a/source/blender/nodes/intern/node_exec.h b/source/blender/nodes/intern/node_exec.h new file mode 100644 index 00000000000..457e119613b --- /dev/null +++ b/source/blender/nodes/intern/node_exec.h @@ -0,0 +1,89 @@ +/** + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Nathan Letwory. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/intern/node_exec.h + * \ingroup nodes + */ + + +#ifndef NODE_EXEC_H_ +#define NODE_EXEC_H_ + +#include "DNA_listBase.h" + +#include "BLI_utildefines.h" + +#include "BKE_node.h" + +#include "RNA_types.h" + +struct bNodeTree; +struct bNode; +struct bNodeStack; + +/* Node execution data */ +typedef struct bNodeExec { + struct bNode *node; /* backpointer to node */ + void *data; /* custom data storage */ +} bNodeExec; + +/* Execution Data for each instance of node tree execution */ +typedef struct bNodeTreeExec { + struct bNodeTree *nodetree; /* backpointer to node tree */ + + int totnodes; /* total node count */ + struct bNodeExec *nodeexec; /* per-node execution data */ + + int stacksize; + struct bNodeStack *stack; /* socket data stack */ + /* only used by material and texture trees to keep one stack for each thread */ + ListBase *threadstack; /* one instance of the stack for each thread */ +} bNodeTreeExec; + +/* stores one stack copy for each thread (material and texture trees) */ +typedef struct bNodeThreadStack { + struct bNodeThreadStack *next, *prev; + struct bNodeStack *stack; + int used; +} bNodeThreadStack; + +struct bNodeStack *node_get_socket_stack(struct bNodeStack *stack, struct bNodeSocket *sock); +void node_get_stack(struct bNode *node, struct bNodeStack *stack, struct bNodeStack **in, struct bNodeStack **out); +void node_init_input_index(struct bNodeSocket *sock, int *index); +void node_init_output_index(struct bNodeSocket *sock, int *index); + +struct bNodeTreeExec *ntree_exec_begin(struct bNodeTree *ntree); +void ntree_exec_end(struct bNodeTreeExec *exec); + +void ntreeExecNodes(struct bNodeTreeExec *exec, void *callerdata, int thread); + +struct bNodeThreadStack *ntreeGetThreadStack(struct bNodeTreeExec *exec, int thread); +void ntreeReleaseThreadStack(struct bNodeThreadStack *nts); +void ntreeExecThreadNodes(struct bNodeTreeExec *exec, struct bNodeThreadStack *nts, void *callerdata, int thread); + +#endif diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c new file mode 100644 index 00000000000..ef8b3e797ce --- /dev/null +++ b/source/blender/nodes/intern/node_socket.c @@ -0,0 +1,428 @@ +/** + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Lukas Toennne + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/intern/node_socket.c + * \ingroup nodes + */ + + +#include "DNA_node_types.h" + +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_object_types.h" +#include "DNA_scene_types.h" + +#include "BLI_listbase.h" +#include "BLI_math.h" +#include "BLI_utildefines.h" + +#include "BKE_DerivedMesh.h" +#include "BKE_node.h" + +#include "RNA_access.h" +#include "RNA_types.h" + +#include "MEM_guardedalloc.h" + +#include "NOD_socket.h" + +/****************** FLOAT ******************/ + +static bNodeSocketType node_socket_type_float = { + /* type */ SOCK_FLOAT, + /* ui_name */ "Float", + /* ui_description */ "Floating Point", + /* ui_icon */ 0, + /* ui_color */ {160,160,160,255}, + + /* value_structname */ "bNodeSocketValueFloat", + /* value_structsize */ sizeof(bNodeSocketValueFloat), + + /* buttonfunc */ NULL, +}; + +/****************** VECTOR ******************/ + +static bNodeSocketType node_socket_type_vector = { + /* type */ SOCK_VECTOR, + /* ui_name */ "Vector", + /* ui_description */ "3-dimensional floating point vector", + /* ui_icon */ 0, + /* ui_color */ {100,100,200,255}, + + /* value_structname */ "bNodeSocketValueVector", + /* value_structsize */ sizeof(bNodeSocketValueVector), + + /* buttonfunc */ NULL, +}; + +/****************** RGBA ******************/ + +static bNodeSocketType node_socket_type_rgba = { + /* type */ SOCK_RGBA, + /* ui_name */ "RGBA", + /* ui_description */ "RGBA color", + /* ui_icon */ 0, + /* ui_color */ {200,200,40,255}, + + /* value_structname */ "bNodeSocketValueRGBA", + /* value_structsize */ sizeof(bNodeSocketValueRGBA), + + /* buttonfunc */ NULL, +}; + +/****************** INT ******************/ + +static bNodeSocketType node_socket_type_int = { + /* type */ SOCK_INT, + /* ui_name */ "Int", + /* ui_description */ "Integer", + /* ui_icon */ 0, + /* ui_color */ {17,133,37,255}, + + /* value_structname */ "bNodeSocketValueInt", + /* value_structsize */ sizeof(bNodeSocketValueInt), + + /* buttonfunc */ NULL, +}; + +/****************** BOOLEAN ******************/ + +static bNodeSocketType node_socket_type_boolean = { + /* type */ SOCK_BOOLEAN, + /* ui_name */ "Boolean", + /* ui_description */ "Boolean", + /* ui_icon */ 0, + /* ui_color */ {158,139,63,255}, + + /* value_structname */ "bNodeSocketValueBoolean", + /* value_structsize */ sizeof(bNodeSocketValueBoolean), + + /* buttonfunc */ NULL, +}; + +/****************** MESH ******************/ + +static bNodeSocketType node_socket_type_mesh = { + /* type */ SOCK_MESH, + /* ui_name */ "Mesh", + /* ui_description */ "Mesh geometry data", + /* ui_icon */ 0, + /* ui_color */ {255,133,7,255}, + + /* value_structname */ NULL, + /* value_structsize */ 0, + + /* buttonfunc */ NULL, +}; + + +void node_socket_type_init(bNodeSocketType *types[]) +{ + #define INIT_TYPE(name) types[node_socket_type_##name.type] = &node_socket_type_##name; + + INIT_TYPE(float); + INIT_TYPE(vector); + INIT_TYPE(rgba); + INIT_TYPE(int); + INIT_TYPE(boolean); + INIT_TYPE(mesh); + + #undef INIT_TYPE +} + +struct bNodeSocket *nodeAddInputInt(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, + int value, int min, int max) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_INT); + bNodeSocketValueInt *dval= (bNodeSocketValueInt*)sock->default_value; + dval->subtype = subtype; + dval->value = value; + dval->min = min; + dval->max = max; + return sock; +} +struct bNodeSocket *nodeAddOutputInt(struct bNodeTree *ntree, struct bNode *node, const char *name) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_INT); + return sock; +} + +struct bNodeSocket *nodeAddInputFloat(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, + float value, float min, float max) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_FLOAT); + bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value; + dval->subtype = subtype; + dval->value = value; + dval->min = min; + dval->max = max; + return sock; +} +struct bNodeSocket *nodeAddOutputFloat(struct bNodeTree *ntree, struct bNode *node, const char *name) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_FLOAT); + return sock; +} + +struct bNodeSocket *nodeAddInputBoolean(struct bNodeTree *ntree, struct bNode *node, const char *name, char value) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_BOOLEAN); + bNodeSocketValueBoolean *dval= (bNodeSocketValueBoolean*)sock->default_value; + dval->value = value; + return sock; +} +struct bNodeSocket *nodeAddOutputBoolean(struct bNodeTree *ntree, struct bNode *node, const char *name) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_BOOLEAN); + return sock; +} + +struct bNodeSocket *nodeAddInputVector(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, + float x, float y, float z, float min, float max) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_VECTOR); + bNodeSocketValueVector *dval= (bNodeSocketValueVector*)sock->default_value; + dval->subtype = subtype; + dval->value[0] = x; + dval->value[1] = y; + dval->value[2] = z; + dval->min = min; + dval->max = max; + return sock; +} +struct bNodeSocket *nodeAddOutputVector(struct bNodeTree *ntree, struct bNode *node, const char *name) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_VECTOR); + return sock; +} + +struct bNodeSocket *nodeAddInputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name, + float r, float g, float b, float a) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_RGBA); + bNodeSocketValueRGBA *dval= (bNodeSocketValueRGBA*)sock->default_value; + dval->value[0] = r; + dval->value[1] = g; + dval->value[2] = b; + dval->value[3] = a; + return sock; +} +struct bNodeSocket *nodeAddOutputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_RGBA); + return sock; +} + +struct bNodeSocket *nodeAddInputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_MESH); + return sock; +} +struct bNodeSocket *nodeAddOutputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name) +{ + bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_MESH); + return sock; +} + +struct bNodeSocket *node_add_input_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp) +{ + bNodeSocket *sock; + switch (stemp->type) { + case SOCK_INT: + sock = nodeAddInputInt(ntree, node, stemp->name, stemp->subtype, (int)stemp->val1, (int)stemp->min, (int)stemp->max); + break; + case SOCK_FLOAT: + sock = nodeAddInputFloat(ntree, node, stemp->name, stemp->subtype, stemp->val1, stemp->min, stemp->max); + break; + case SOCK_BOOLEAN: + sock = nodeAddInputBoolean(ntree, node, stemp->name, (char)stemp->val1); + break; + case SOCK_VECTOR: + sock = nodeAddInputVector(ntree, node, stemp->name, stemp->subtype, stemp->val1, stemp->val2, stemp->val3, stemp->min, stemp->max); + break; + case SOCK_RGBA: + sock = nodeAddInputRGBA(ntree, node, stemp->name, stemp->val1, stemp->val2, stemp->val3, stemp->val4); + break; + case SOCK_MESH: + sock = nodeAddInputMesh(ntree, node, stemp->name); + break; + default: + sock = nodeAddSocket(ntree, node, SOCK_IN, stemp->name, stemp->type); + } + return sock; +} + +struct bNodeSocket *node_add_output_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp) +{ + bNodeSocket *sock; + switch (stemp->type) { + case SOCK_INT: + sock = nodeAddOutputInt(ntree, node, stemp->name); + break; + case SOCK_FLOAT: + sock = nodeAddOutputFloat(ntree, node, stemp->name); + break; + case SOCK_BOOLEAN: + sock = nodeAddOutputBoolean(ntree, node, stemp->name); + break; + case SOCK_VECTOR: + sock = nodeAddOutputVector(ntree, node, stemp->name); + break; + case SOCK_RGBA: + sock = nodeAddOutputRGBA(ntree, node, stemp->name); + break; + case SOCK_MESH: + sock = nodeAddOutputMesh(ntree, node, stemp->name); + break; + default: + sock = nodeAddSocket(ntree, node, SOCK_OUT, stemp->name, stemp->type); + } + return sock; +} + +static bNodeSocket *verify_socket_template(bNodeTree *ntree, bNode *node, int in_out, ListBase *socklist, bNodeSocketTemplate *stemp) +{ + bNodeSocket *sock; + + for(sock= socklist->first; sock; sock= sock->next) { + if(!(sock->flag & SOCK_DYNAMIC) && strncmp(sock->name, stemp->name, NODE_MAXSTR)==0) + break; + } + if(sock) { + sock->type= stemp->type; /* in future, read this from tydefs! */ + if(stemp->limit==0) sock->limit= 0xFFF; + else sock->limit= stemp->limit; + + /* Copy the property range and subtype parameters in case the template changed. + * NOT copying the actual value here, only button behavior changes! + */ + switch (sock->type) { + case SOCK_FLOAT: + { + bNodeSocketValueFloat *dval= sock->default_value; + dval->min = stemp->min; + dval->max = stemp->max; + dval->subtype = stemp->subtype; + } + break; + case SOCK_INT: + { + bNodeSocketValueInt *dval= sock->default_value; + dval->min = stemp->min; + dval->max = stemp->max; + dval->subtype = stemp->subtype; + } + break; + case SOCK_VECTOR: + { + bNodeSocketValueVector *dval= sock->default_value; + dval->min = stemp->min; + dval->max = stemp->max; + dval->subtype = stemp->subtype; + } + break; + } + + BLI_remlink(socklist, sock); + + return sock; + } + else { + /* no socket for this template found, make a new one */ + if (in_out==SOCK_IN) + sock = node_add_input_from_template(ntree, node, stemp); + else + sock = node_add_output_from_template(ntree, node, stemp); + /* remove the new socket from the node socket list first, + * will be added back after verification. + */ + BLI_remlink(socklist, sock); + } + + return sock; +} + +static void verify_socket_template_list(bNodeTree *ntree, bNode *node, int in_out, ListBase *socklist, bNodeSocketTemplate *stemp_first) +{ + bNodeSocket *sock; + bNodeSocketTemplate *stemp; + + /* no inputs anymore? */ + if(stemp_first==NULL) { + while(socklist->first) { + sock = (bNodeSocket*)socklist->first; + if (!(sock->flag & SOCK_DYNAMIC)) + nodeRemoveSocket(ntree, node, socklist->first); + } + } + else { + /* step by step compare */ + stemp= stemp_first; + while(stemp->type != -1) { + stemp->sock= verify_socket_template(ntree, node, in_out, socklist, stemp); + stemp++; + } + /* leftovers are removed */ + while(socklist->first) { + sock = (bNodeSocket*)socklist->first; + if (!(sock->flag & SOCK_DYNAMIC)) + nodeRemoveSocket(ntree, node, socklist->first); + } + + /* and we put back the verified sockets */ + stemp= stemp_first; + if (socklist->first) { + /* some dynamic sockets left, store the list start + * so we can add static sockets infront of it. + */ + sock = socklist->first; + while(stemp->type != -1) { + /* put static sockets infront of dynamic */ + BLI_insertlinkbefore(socklist, sock, stemp->sock); + stemp++; + } + } + else { + while(stemp->type != -1) { + BLI_addtail(socklist, stemp->sock); + stemp++; + } + } + } +} + +void node_verify_socket_templates(bNodeTree *ntree, bNode *node) +{ + bNodeType *ntype= node->typeinfo; + if(ntype) { + verify_socket_template_list(ntree, node, SOCK_IN, &node->inputs, ntype->inputs); + verify_socket_template_list(ntree, node, SOCK_OUT, &node->outputs, ntype->outputs); + } +} diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c index 1cc8c282179..bdf53df06af 100644 --- a/source/blender/nodes/intern/node_util.c +++ b/source/blender/nodes/intern/node_util.c @@ -32,12 +32,24 @@ */ -#include "CMP_util.h" -#include "SHD_util.h" +#include "DNA_action_types.h" +#include "DNA_node_types.h" + +#include "BLI_listbase.h" +#include "BLI_utildefines.h" + +#include "BKE_colortools.h" +#include "BKE_node.h" #include "RNA_access.h" #include "RNA_enum_types.h" +#include "MEM_guardedalloc.h" + +#include "node_util.h" + +/**** Storage Data ****/ + void node_free_curves(bNode *node) { curvemapping_free(node->storage); @@ -58,6 +70,8 @@ void node_copy_standard_storage(bNode *orig_node, bNode *new_node) new_node->storage= MEM_dupallocN(orig_node->storage); } +/**** Labels ****/ + const char *node_blend_label(bNode *node) { const char *name; diff --git a/source/blender/nodes/intern/node_util.h b/source/blender/nodes/intern/node_util.h index 5a78fc07883..8d38d57f577 100644 --- a/source/blender/nodes/intern/node_util.h +++ b/source/blender/nodes/intern/node_util.h @@ -35,14 +35,27 @@ #ifndef NODE_UTIL_H_ #define NODE_UTIL_H_ +#include "DNA_listBase.h" + +#include "BKE_node.h" + #include "MEM_guardedalloc.h" +#include "NOD_socket.h" + +struct bNodeTree; +struct bNode; + +/**** Storage Data ****/ + extern void node_free_curves(struct bNode *node); extern void node_free_standard_storage(struct bNode *node); extern void node_copy_curves(struct bNode *orig_node, struct bNode *new_node); extern void node_copy_standard_storage(struct bNode *orig_node, struct bNode *new_node); +/**** Labels ****/ + const char *node_blend_label(struct bNode *node); const char *node_math_label(struct bNode *node); const char *node_vect_math_label(struct bNode *node); diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c new file mode 100644 index 00000000000..620da7553b3 --- /dev/null +++ b/source/blender/nodes/shader/node_shader_tree.c @@ -0,0 +1,212 @@ +/** + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/node_shader_tree.c + * \ingroup nodes + */ + + +#include + +#include "DNA_material_types.h" +#include "DNA_node_types.h" + +#include "BLI_listbase.h" +#include "BLI_math.h" +#include "BLI_threads.h" +#include "BLI_utildefines.h" + +#include "BKE_global.h" +#include "BKE_main.h" +#include "BKE_node.h" +#include "BKE_utildefines.h" + +#include "GPU_material.h" + +#include "RE_shader_ext.h" + +#include "node_exec.h" +#include "node_util.h" +#include "node_shader_util.h" + +static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func) +{ + Material *ma; + for(ma= main->mat.first; ma; ma= ma->id.next) { + if(ma->nodetree) { + func(calldata, &ma->id, ma->nodetree); + } + } +} + +static void local_sync(bNodeTree *localtree, bNodeTree *ntree) +{ + bNode *lnode; + + /* copy over contents of previews */ + for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) { + if(ntreeNodeExists(ntree, lnode->new_node)) { + bNode *node= lnode->new_node; + + if(node->preview && node->preview->rect) { + if(lnode->preview && lnode->preview->rect) { + int xsize= node->preview->xsize; + int ysize= node->preview->ysize; + memcpy(node->preview->rect, lnode->preview->rect, 4*xsize + xsize*ysize*sizeof(char)*4); + } + } + } + } +} + +bNodeTreeType ntreeType_Shader = { + /* type */ NTREE_SHADER, + /* id_name */ "NTShader Nodetree", + + /* node_types */ { NULL, NULL }, + + /* free_cache */ NULL, + /* free_node_cache */ NULL, + /* foreach_nodetree */ foreach_nodetree, + /* localize */ NULL, + /* local_sync */ local_sync, + /* local_merge */ NULL, + /* update */ NULL, + /* update_node */ NULL +}; + +/* GPU material from shader nodes */ + +void ntreeGPUMaterialNodes(bNodeTree *ntree, GPUMaterial *mat) +{ + bNodeTreeExec *exec; + + if(!ntree->execdata) + exec = ntreeShaderBeginExecTree(ntree); + + ntreeExecGPUNodes(exec, mat, 1); + + ntreeShaderEndExecTree(exec); +} + +/* **************** call to switch lamploop for material node ************ */ + +void (*node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *); + +void set_node_shader_lamp_loop(void (*lamp_loop_func)(ShadeInput *, ShadeResult *)) +{ + node_shader_lamp_loop= lamp_loop_func; +} + + +bNodeTreeExec *ntreeShaderBeginExecTree(bNodeTree *ntree) +{ + bNodeTreeExec *exec; + bNode *node; + + /* XXX hack: prevent exec data from being generated twice. + * this should be handled by the renderer! + */ + if (ntree->execdata) + return ntree->execdata; + + /* ensures only a single output node is enabled */ + ntreeSetOutput(ntree); + + /* common base initialization */ + exec = ntree_exec_begin(ntree); + + /* allocate the thread stack listbase array */ + exec->threadstack= MEM_callocN(BLENDER_MAX_THREADS*sizeof(ListBase), "thread stack array"); + + for(node= exec->nodetree->nodes.first; node; node= node->next) + node->need_exec= 1; + + /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, + * which only store the ntree pointer. Should be fixed at some point! + */ + ntree->execdata = exec; + + return exec; +} + +void ntreeShaderEndExecTree(bNodeTreeExec *exec) +{ + if(exec) { + bNodeTree *ntree= exec->nodetree; + bNodeThreadStack *nts; + int a; + + if(exec->threadstack) { + for(a=0; athreadstack[a].first; nts; nts=nts->next) + if (nts->stack) MEM_freeN(nts->stack); + BLI_freelistN(&exec->threadstack[a]); + } + + MEM_freeN(exec->threadstack); + exec->threadstack= NULL; + } + + ntree_exec_end(exec); + + /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ + ntree->execdata = NULL; + } +} + +void ntreeShaderExecTree(bNodeTree *ntree, ShadeInput *shi, ShadeResult *shr) +{ + ShaderCallData scd; + /* + @note: preserve material from ShadeInput for material id, nodetree execs change it + fix for bug "[#28012] Mat ID messy with shader nodes" + */ + Material *mat = shi->mat; bNodeThreadStack *nts = NULL; + bNodeTreeExec *exec = ntree->execdata; + + /* convert caller data to struct */ + scd.shi= shi; + scd.shr= shr; + + /* each material node has own local shaderesult, with optional copying */ + memset(shr, 0, sizeof(ShadeResult)); + + if (!exec) + exec = ntree->execdata = ntreeShaderBeginExecTree(exec->nodetree); + + nts= ntreeGetThreadStack(exec, shi->thread); + ntreeExecThreadNodes(exec, nts, &scd, shi->thread); + ntreeReleaseThreadStack(nts); + + // @note: set material back to preserved material + shi->mat = mat; + /* better not allow negative for now */ + if(shr->combined[0]<0.0f) shr->combined[0]= 0.0f; + if(shr->combined[1]<0.0f) shr->combined[1]= 0.0f; + if(shr->combined[2]<0.0f) shr->combined[2]= 0.0f; +} diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c new file mode 100644 index 00000000000..cf910ba3f64 --- /dev/null +++ b/source/blender/nodes/shader/node_shader_util.c @@ -0,0 +1,287 @@ +/* + * $Id: SHD_util.c 36549 2011-05-08 14:23:38Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/node_shader_util.c + * \ingroup nodes + */ + + +#include "DNA_node_types.h" + +#include "node_shader_util.h" + +#include "node_exec.h" + +/* ****** */ + +void nodestack_get_vec(float *in, short type_in, bNodeStack *ns) +{ + float *from= ns->vec; + + if(type_in==SOCK_FLOAT) { + if(ns->sockettype==SOCK_FLOAT) + *in= *from; + else + *in= 0.333333f*(from[0]+from[1]+from[2]); + } + else if(type_in==SOCK_VECTOR) { + if(ns->sockettype==SOCK_FLOAT) { + in[0]= from[0]; + in[1]= from[0]; + in[2]= from[0]; + } + else { + VECCOPY(in, from); + } + } + else { /* type_in==SOCK_RGBA */ + if(ns->sockettype==SOCK_RGBA) { + QUATCOPY(in, from); + } + else if(ns->sockettype==SOCK_FLOAT) { + in[0]= from[0]; + in[1]= from[0]; + in[2]= from[0]; + in[3]= 1.0f; + } + else { + VECCOPY(in, from); + in[3]= 1.0f; + } + } +} + + +/* ******************* execute and parse ************ */ + +/* go over all used Geometry and Texture nodes, and return a texco flag */ +/* no group inside needed, this function is called for groups too */ +void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mode) +{ + bNode *node; + bNodeSocket *sock; + int a; + + ntreeSocketUseFlags(ntree); + + for(node= ntree->nodes.first; node; node= node->next) { + if(node->type==SH_NODE_TEXTURE) { + if((r_mode & R_OSA) && node->id) { + Tex *tex= (Tex *)node->id; + if ELEM3(tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP) + *texco |= TEXCO_OSA|NEED_UV; + } + /* usability exception... without input we still give the node orcos */ + sock= node->inputs.first; + if(sock==NULL || sock->link==NULL) + *texco |= TEXCO_ORCO|NEED_UV; + } + else if(node->type==SH_NODE_GEOMETRY) { + /* note; sockets always exist for the given type! */ + for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) { + if(sock->flag & SOCK_IN_USE) { + switch(a) { + case GEOM_OUT_GLOB: + *texco |= TEXCO_GLOB|NEED_UV; break; + case GEOM_OUT_VIEW: + *texco |= TEXCO_VIEW|NEED_UV; break; + case GEOM_OUT_ORCO: + *texco |= TEXCO_ORCO|NEED_UV; break; + case GEOM_OUT_UV: + *texco |= TEXCO_UV|NEED_UV; break; + case GEOM_OUT_NORMAL: + *texco |= TEXCO_NORM|NEED_UV; break; + case GEOM_OUT_VCOL: + *texco |= NEED_UV; *mode |= MA_VERTEXCOL; break; + } + } + } + } + } +} + +/* nodes that use ID data get synced with local data */ +void nodeShaderSynchronizeID(bNode *node, int copyto) +{ + if(node->id==NULL) return; + + if(ELEM(node->type, SH_NODE_MATERIAL, SH_NODE_MATERIAL_EXT)) { + bNodeSocket *sock; + Material *ma= (Material *)node->id; + int a; + + /* hrmf, case in loop isnt super fast, but we dont edit 100s of material at same time either! */ + for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) { + if(!(sock->flag & SOCK_HIDDEN)) { + if(copyto) { + switch(a) { + case MAT_IN_COLOR: + VECCOPY(&ma->r, ((bNodeSocketValueRGBA*)sock->default_value)->value); break; + case MAT_IN_SPEC: + VECCOPY(&ma->specr, ((bNodeSocketValueRGBA*)sock->default_value)->value); break; + case MAT_IN_REFL: + ma->ref= ((bNodeSocketValueFloat*)sock->default_value)->value; break; + case MAT_IN_MIR: + VECCOPY(&ma->mirr, ((bNodeSocketValueRGBA*)sock->default_value)->value); break; + case MAT_IN_AMB: + ma->amb= ((bNodeSocketValueFloat*)sock->default_value)->value; break; + case MAT_IN_EMIT: + ma->emit= ((bNodeSocketValueFloat*)sock->default_value)->value; break; + case MAT_IN_SPECTRA: + ma->spectra= ((bNodeSocketValueFloat*)sock->default_value)->value; break; + case MAT_IN_RAY_MIRROR: + ma->ray_mirror= ((bNodeSocketValueFloat*)sock->default_value)->value; break; + case MAT_IN_ALPHA: + ma->alpha= ((bNodeSocketValueFloat*)sock->default_value)->value; break; + case MAT_IN_TRANSLUCENCY: + ma->translucency= ((bNodeSocketValueFloat*)sock->default_value)->value; break; + } + } + else { + switch(a) { + case MAT_IN_COLOR: + VECCOPY(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->r); break; + case MAT_IN_SPEC: + VECCOPY(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->specr); break; + case MAT_IN_REFL: + ((bNodeSocketValueFloat*)sock->default_value)->value= ma->ref; break; + case MAT_IN_MIR: + VECCOPY(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->mirr); break; + case MAT_IN_AMB: + ((bNodeSocketValueFloat*)sock->default_value)->value= ma->amb; break; + case MAT_IN_EMIT: + ((bNodeSocketValueFloat*)sock->default_value)->value= ma->emit; break; + case MAT_IN_SPECTRA: + ((bNodeSocketValueFloat*)sock->default_value)->value= ma->spectra; break; + case MAT_IN_RAY_MIRROR: + ((bNodeSocketValueFloat*)sock->default_value)->value= ma->ray_mirror; break; + case MAT_IN_ALPHA: + ((bNodeSocketValueFloat*)sock->default_value)->value= ma->alpha; break; + case MAT_IN_TRANSLUCENCY: + ((bNodeSocketValueFloat*)sock->default_value)->value= ma->translucency; break; + } + } + } + } + } + +} + + +void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns) +{ + memset(gs, 0, sizeof(*gs)); + + QUATCOPY(gs->vec, ns->vec); + gs->link= ns->data; + + if (type == SOCK_FLOAT) + gs->type= GPU_FLOAT; + else if (type == SOCK_VECTOR) + gs->type= GPU_VEC3; + else if (type == SOCK_RGBA) + gs->type= GPU_VEC4; + else + gs->type= GPU_NONE; + + gs->name = ""; + gs->hasinput= ns->hasinput && ns->data; + gs->hasoutput= ns->hasoutput && ns->data; + gs->sockettype= ns->sockettype; +} + +void node_data_from_gpu_stack(bNodeStack *ns, GPUNodeStack *gs) +{ + ns->data= gs->link; + ns->sockettype= gs->sockettype; +} + +static void gpu_stack_from_data_list(GPUNodeStack *gs, ListBase *sockets, bNodeStack **ns) +{ + bNodeSocket *sock; + int i; + + for (sock=sockets->first, i=0; sock; sock=sock->next, i++) + node_gpu_stack_from_data(&gs[i], sock->type, ns[i]); + + gs[i].type= GPU_NONE; +} + +static void data_from_gpu_stack_list(ListBase *sockets, bNodeStack **ns, GPUNodeStack *gs) +{ + bNodeSocket *sock; + int i; + + for (sock=sockets->first, i=0; sock; sock=sock->next, i++) + node_data_from_gpu_stack(ns[i], &gs[i]); +} + +void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, int do_outputs) +{ + bNodeExec *nodeexec; + bNode *node; + int n; + bNodeStack *stack; + bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ + bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ + GPUNodeStack gpuin[MAX_SOCKET+1], gpuout[MAX_SOCKET+1]; + int doit; + + stack= exec->stack; + + for(n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { + node = nodeexec->node; + + doit = 0; + /* for groups, only execute outputs for edited group */ + if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) { + if(do_outputs && (node->flag & NODE_DO_OUTPUT)) + doit = 1; + } + else + doit = 1; + + if (doit) { + if(node->typeinfo->gpufunc) { + node_get_stack(node, stack, nsin, nsout); + gpu_stack_from_data_list(gpuin, &node->inputs, nsin); + gpu_stack_from_data_list(gpuout, &node->outputs, nsout); + if(node->typeinfo->gpufunc(mat, node, gpuin, gpuout)) + data_from_gpu_stack_list(&node->outputs, nsout, gpuout); + } + else if(node->typeinfo->gpuextfunc) { + node_get_stack(node, stack, nsin, nsout); + gpu_stack_from_data_list(gpuin, &node->inputs, nsin); + gpu_stack_from_data_list(gpuout, &node->outputs, nsout); + if(node->typeinfo->gpuextfunc(mat, node, nodeexec->data, gpuin, gpuout)) + data_from_gpu_stack_list(&node->outputs, nsout, gpuout); + } + } + } +} diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h new file mode 100644 index 00000000000..1cc04d95d6f --- /dev/null +++ b/source/blender/nodes/shader/node_shader_util.h @@ -0,0 +1,130 @@ +/* + * $Id: SHD_util.h 36549 2011-05-08 14:23:38Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/node_shader_util.h + * \ingroup nodes + */ + + +#ifndef NODE_SHADER_UTIL_H_ +#define NODE_SHADER_UTIL_H_ + +#include +#include +#include + +#include "MEM_guardedalloc.h" + +#include "DNA_color_types.h" +#include "DNA_ID.h" +#include "DNA_image_types.h" +#include "DNA_material_types.h" +#include "DNA_node_types.h" +#include "DNA_object_types.h" +#include "DNA_scene_types.h" +#include "DNA_texture_types.h" + +#include "BKE_blender.h" +#include "BKE_colortools.h" +#include "BKE_global.h" +#include "BKE_image.h" +#include "BKE_main.h" +#include "BKE_material.h" +#include "BKE_node.h" +#include "BKE_texture.h" + +#include "BKE_library.h" + +#include "NOD_shader.h" +#include "node_util.h" + +#include "BLI_math.h" +#include "BLI_blenlib.h" +#include "BLI_rand.h" +#include "BLI_threads.h" +#include "BLI_utildefines.h" + +#include "IMB_imbuf_types.h" +#include "IMB_imbuf.h" + +#include "RE_pipeline.h" +#include "RE_shader_ext.h" + +#include "GPU_material.h" + +/* ********* exec data struct, remains internal *********** */ + +typedef struct ShaderCallData { + ShadeInput *shi; /* from render pipe */ + ShadeResult *shr; /* from render pipe */ +} ShaderCallData; + +/* output socket defines */ +#define GEOM_OUT_GLOB 0 +#define GEOM_OUT_LOCAL 1 +#define GEOM_OUT_VIEW 2 +#define GEOM_OUT_ORCO 3 +#define GEOM_OUT_UV 4 +#define GEOM_OUT_NORMAL 5 +#define GEOM_OUT_VCOL 6 +#define GEOM_OUT_FRONTBACK 7 + + +/* input socket defines */ +#define MAT_IN_COLOR 0 +#define MAT_IN_SPEC 1 +#define MAT_IN_REFL 2 +#define MAT_IN_NORMAL 3 +#define MAT_IN_MIR 4 +#define MAT_IN_AMB 5 +#define MAT_IN_EMIT 6 +#define MAT_IN_SPECTRA 7 +#define MAT_IN_RAY_MIRROR 8 +#define MAT_IN_ALPHA 9 +#define MAT_IN_TRANSLUCENCY 10 +#define NUM_MAT_IN 11 /* for array size */ + +/* output socket defines */ +#define MAT_OUT_COLOR 0 +#define MAT_OUT_ALPHA 1 +#define MAT_OUT_NORMAL 2 +#define MAT_OUT_DIFFUSE 3 +#define MAT_OUT_SPEC 4 +#define MAT_OUT_AO 5 + + +extern void node_ID_title_cb(void *node_v, void *unused_v); +void nodestack_get_vec(float *in, short type_in, bNodeStack *ns); + +void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, struct bNodeStack *ns); +void node_data_from_gpu_stack(struct bNodeStack *ns, struct GPUNodeStack *gs); + +void ntreeExecGPUNodes(struct bNodeTreeExec *exec, struct GPUMaterial *mat, int do_outputs); + +#endif diff --git a/source/blender/nodes/shader/nodes/node_shader_camera.c b/source/blender/nodes/shader/nodes/node_shader_camera.c new file mode 100644 index 00000000000..ecb7c486dc4 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_camera.c @@ -0,0 +1,76 @@ +/* + * $Id: SHD_camera.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_camera.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** CAMERA INFO ******************** */ +static bNodeSocketTemplate sh_node_camera_out[]= { + { SOCK_VECTOR, 0, "View Vector"}, + { SOCK_FLOAT, 0, "View Z Depth"}, + { SOCK_FLOAT, 0, "View Distance"}, + { -1, 0, "" } +}; + + +static void node_shader_exec_camera(void *data, bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **out) +{ + if(data) { + ShadeInput *shi= ((ShaderCallData *)data)->shi; /* Data we need for shading. */ + + VECCOPY(out[0]->vec, shi->co); /* get view vector */ + out[1]->vec[0]= fabs(shi->co[2]); /* get view z-depth */ + out[2]->vec[0]= normalize_v3(out[0]->vec); /* get view distance */ + } +} + +static int gpu_shader_camera(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) +{ + return GPU_stack_link(mat, "camera", in, out, GPU_builtin(GPU_VIEW_POSITION)); +} + +void register_node_type_sh_camera(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_CAMERA, "Camera Data", NODE_CLASS_INPUT, 0); + node_type_socket_templates(&ntype, NULL, sh_node_camera_out); + node_type_size(&ntype, 95, 95, 120); + node_type_storage(&ntype, "node_camera", NULL, NULL); + node_type_exec(&ntype, node_shader_exec_camera); + node_type_gpu(&ntype, gpu_shader_camera); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/shader/nodes/node_shader_common.c b/source/blender/nodes/shader/nodes/node_shader_common.c new file mode 100644 index 00000000000..ab3638436f1 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_common.c @@ -0,0 +1,327 @@ +/* + * $Id: CMP_blur.c 35562 2011-03-15 20:10:32Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Campbell Barton, Alfredo de Greef, David Millan Escriva, + * Juho Vepsäläinen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_common.c + * \ingroup shdnodes + */ + + +#include "DNA_node_types.h" + +#include "BKE_node.h" + +#include "node_shader_util.h" +#include "node_common.h" +#include "node_exec.h" + +static void copy_stack(bNodeStack *to, bNodeStack *from) +{ + if (to != from) { + copy_v4_v4(to->vec, from->vec); + to->data = from->data; + to->datatype = from->datatype; + + /* tag as copy to prevent freeing */ + to->is_copy = 1; + } +} + +static void move_stack(bNodeStack *to, bNodeStack *from) +{ + if (to != from) { + copy_v4_v4(to->vec, from->vec); + to->data = from->data; + to->datatype = from->datatype; + to->is_copy = from->is_copy; + + zero_v4(from->vec); + from->data = NULL; + from->datatype = 0; + from->is_copy = 0; + } +} + +/**** GROUP ****/ + +static void *group_initexec(bNode *node) +{ + bNodeTree *ngroup= (bNodeTree*)node->id; + bNodeTreeExec *exec; + + /* initialize the internal node tree execution */ + exec = ntreeShaderBeginExecTree(ngroup); + + return exec; +} + +static void group_freeexec(bNode *UNUSED(node), void *nodedata) +{ + bNodeTreeExec*gexec= (bNodeTreeExec*)nodedata; + + ntreeShaderEndExecTree(gexec); +} + +/* Copy inputs to the internal stack. + */ +static void group_copy_inputs(bNode *node, bNodeStack **in, bNodeStack *gstack) +{ + bNodeSocket *sock; + bNodeStack *ns; + int a; + for (sock=node->inputs.first, a=0; sock; sock=sock->next, ++a) { + if (sock->groupsock) { + ns = node_get_socket_stack(gstack, sock->groupsock); + copy_stack(ns, in[a]); + } + } +} + +/* Copy internal results to the external outputs. + */ +static void group_move_outputs(bNode *node, bNodeStack **out, bNodeStack *gstack) +{ + bNodeSocket *sock; + bNodeStack *ns; + int a; + for (sock=node->outputs.first, a=0; sock; sock=sock->next, ++a) { + if (sock->groupsock) { + ns = node_get_socket_stack(gstack, sock->groupsock); + move_stack(out[a], ns); + } + } +} + +static void group_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + bNodeThreadStack *nts; + + /* XXX same behavior as trunk: all nodes inside group are executed. + * it's stupid, but just makes it work. compo redesign will do this better. + */ + { + bNode *inode; + for (inode=exec->nodetree->nodes.first; inode; inode=inode->next) + inode->need_exec = 1; + } + + nts = ntreeGetThreadStack(exec, thread); + + group_copy_inputs(node, in, nts->stack); + ntreeExecThreadNodes(exec, nts, data, thread); + group_move_outputs(node, out, nts->stack); + + ntreeReleaseThreadStack(nts); +} + +static void group_gpu_copy_inputs(bNode *node, GPUNodeStack *in, bNodeStack *gstack) +{ + bNodeSocket *sock; + bNodeStack *ns; + int a; + for (sock=node->inputs.first, a=0; sock; sock=sock->next, ++a) { + if (sock->groupsock) { + ns = node_get_socket_stack(gstack, sock->groupsock); + /* convert the external gpu stack back to internal node stack data */ + node_data_from_gpu_stack(ns, &in[a]); + } + } +} + +/* Copy internal results to the external outputs. + */ +static void group_gpu_move_outputs(bNode *node, GPUNodeStack *out, bNodeStack *gstack) +{ + bNodeSocket *sock; + bNodeStack *ns; + int a; + for (sock=node->outputs.first, a=0; sock; sock=sock->next, ++a) { + if (sock->groupsock) { + ns = node_get_socket_stack(gstack, sock->groupsock); + /* convert the node stack data result back to gpu stack */ + node_gpu_stack_from_data(&out[a], sock->type, ns); + } + } +} + +static int gpu_group_execute(GPUMaterial *mat, bNode *node, void *nodedata, GPUNodeStack *in, GPUNodeStack *out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + + group_gpu_copy_inputs(node, in, exec->stack); + ntreeExecGPUNodes(exec, mat, (node->flag & NODE_GROUP_EDIT)); + group_gpu_move_outputs(node, out, exec->stack); + + return 1; +} + +void register_node_type_sh_group(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT); + node_type_socket_templates(&ntype, NULL, NULL); + node_type_size(&ntype, 120, 60, 200); + node_type_label(&ntype, node_group_label); + node_type_init(&ntype, node_group_init); + node_type_valid(&ntype, node_group_valid); + node_type_template(&ntype, node_group_template); + node_type_update(&ntype, NULL, node_group_verify); + node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear); + node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute); + node_type_gpu_ext(&ntype, gpu_group_execute); + + nodeRegisterType(lb, &ntype); +} + + +/**** FOR LOOP ****/ + +#if 0 /* XXX loop nodes don't work nicely with current trees */ +static void forloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + bNodeThreadStack *nts; + int iterations= (int)in[0]->vec[0]; + bNodeSocket *sock; + bNodeStack *ns; + int iteration; + + /* XXX same behavior as trunk: all nodes inside group are executed. + * it's stupid, but just makes it work. compo redesign will do this better. + */ + { + bNode *inode; + for (inode=exec->nodetree->nodes.first; inode; inode=inode->next) + inode->need_exec = 1; + } + + nts = ntreeGetThreadStack(exec, thread); + + /* "Iteration" socket */ + sock = exec->nodetree->inputs.first; + ns = node_get_socket_stack(nts->stack, sock); + +// group_copy_inputs(node, in, nts->stack); + for (iteration=0; iteration < iterations; ++iteration) { + /* first input contains current iteration counter */ + ns->vec[0] = (float)iteration; + ns->vec[1]=ns->vec[2]=ns->vec[3] = 0.0f; + +// if (iteration > 0) +// loop_init_iteration(exec->nodetree, nts->stack); +// ntreeExecThreadNodes(exec, nts, data, thread); + } +// loop_copy_outputs(node, in, out, exec->stack); + + ntreeReleaseThreadStack(nts); +} + +void register_node_type_sh_forloop(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, NULL); + node_type_size(&ntype, 120, 60, 200); + node_type_label(&ntype, node_group_label); + node_type_init(&ntype, node_forloop_init); + node_type_valid(&ntype, node_group_valid); + node_type_template(&ntype, node_forloop_template); + node_type_update(&ntype, NULL, node_group_verify); + node_type_tree(&ntype, node_forloop_init_tree, node_loop_update_tree); + node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear); + node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute); + + nodeRegisterType(lb, &ntype); +} +#endif + +/**** WHILE LOOP ****/ + +#if 0 /* XXX loop nodes don't work nicely with current trees */ +static void whileloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + bNodeThreadStack *nts; + int condition= (in[0]->vec[0] > 0.0f); + bNodeSocket *sock; + bNodeStack *ns; + int iteration; + + /* XXX same behavior as trunk: all nodes inside group are executed. + * it's stupid, but just makes it work. compo redesign will do this better. + */ + { + bNode *inode; + for (inode=exec->nodetree->nodes.first; inode; inode=inode->next) + inode->need_exec = 1; + } + + nts = ntreeGetThreadStack(exec, thread); + + /* "Condition" socket */ + sock = exec->nodetree->outputs.first; + ns = node_get_socket_stack(nts->stack, sock); + + iteration = 0; +// group_copy_inputs(node, in, nts->stack); + while (condition && iteration < node->custom1) { +// if (iteration > 0) +// loop_init_iteration(exec->nodetree, nts->stack); +// ntreeExecThreadNodes(exec, nts, data, thread); + + condition = (ns->vec[0] > 0.0f); + ++iteration; + } +// loop_copy_outputs(node, in, out, exec->stack); + + ntreeReleaseThreadStack(nts); +} + +void register_node_type_sh_whileloop(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, NULL); + node_type_size(&ntype, 120, 60, 200); + node_type_label(&ntype, node_group_label); + node_type_init(&ntype, node_whileloop_init); + node_type_valid(&ntype, node_group_valid); + node_type_template(&ntype, node_whileloop_template); + node_type_update(&ntype, NULL, node_group_verify); + node_type_tree(&ntype, node_whileloop_init_tree, node_loop_update_tree); + node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear); + node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute); + + nodeRegisterType(lb, &ntype); +} +#endif diff --git a/source/blender/nodes/shader/nodes/node_shader_curves.c b/source/blender/nodes/shader/nodes/node_shader_curves.c new file mode 100644 index 00000000000..ded867ec441 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_curves.c @@ -0,0 +1,142 @@ +/* + * $Id: SHD_curves.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_curves.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + + +/* **************** CURVE VEC ******************** */ +static bNodeSocketTemplate sh_node_curve_vec_in[]= { + { SOCK_FLOAT, 0, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_curve_vec_out[]= { + { SOCK_VECTOR, 0, "Vector"}, + { -1, 0, "" } +}; + +static void node_shader_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + float vec[3]; + + /* stack order input: vec */ + /* stack order output: vec */ + nodestack_get_vec(vec, SOCK_VECTOR, in[1]); + curvemapping_evaluate3F(node->storage, out[0]->vec, vec); +} + +static void node_shader_init_curve_vec(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f); +} + +static int gpu_shader_curve_vec(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + float *array; + int size; + + curvemapping_table_RGBA(node->storage, &array, &size); + return GPU_stack_link(mat, "curves_vec", in, out, GPU_texture(size, array)); +} + +void register_node_type_sh_curve_vec(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_curve_vec_in, sh_node_curve_vec_out); + node_type_size(&ntype, 200, 140, 320); + node_type_init(&ntype, node_shader_init_curve_vec); + node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); + node_type_exec(&ntype, node_shader_exec_curve_vec); + node_type_gpu(&ntype, gpu_shader_curve_vec); + + nodeRegisterType(lb, &ntype); +} + + +/* **************** CURVE RGB ******************** */ +static bNodeSocketTemplate sh_node_curve_rgb_in[]= { + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_curve_rgb_out[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void node_shader_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + float vec[3]; + + /* stack order input: vec */ + /* stack order output: vec */ + nodestack_get_vec(vec, SOCK_VECTOR, in[1]); + curvemapping_evaluateRGBF(node->storage, out[0]->vec, vec); + if(in[0]->vec[0] != 1.0f) { + interp_v3_v3v3(out[0]->vec, vec, out[0]->vec, *in[0]->vec); + } +} + +static void node_shader_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); +} + +static int gpu_shader_curve_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + float *array; + int size; + curvemapping_table_RGBA(node->storage, &array, &size); + return GPU_stack_link(mat, "curves_rgb", in, out, GPU_texture(size, array)); +} + +void register_node_type_sh_curve_rgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_curve_rgb_in, sh_node_curve_rgb_out); + node_type_size(&ntype, 200, 140, 320); + node_type_init(&ntype, node_shader_init_curve_rgb); + node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); + node_type_exec(&ntype, node_shader_exec_curve_rgb); + node_type_gpu(&ntype, gpu_shader_curve_rgb); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/shader/nodes/node_shader_dynamic.c b/source/blender/nodes/shader/nodes/node_shader_dynamic.c new file mode 100644 index 00000000000..6490ee00787 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_dynamic.c @@ -0,0 +1,792 @@ +/* + * $Id: SHD_dynamic.c 35927 2011-03-31 20:59:55Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Nathan Letwory + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_dynamic.c + * \ingroup shdnodes + */ + + +/* TODO, support python3.x */ +#undef WITH_PYTHON + +#ifdef WITH_PYTHON +#include +#include +#include +#endif + +#include "DNA_text_types.h" +#include "BKE_text.h" + + +// XXX +#if 0 +#ifdef WITH_PYTHON +#include "api2_2x/Node.h" +#include "api2_2x/gen_utils.h" +#include "BPY_extern.h" +#endif +#endif + +#include "node_shader_util.h" + +// XXX +#if 0 +static void node_dynamic_setup(bNode *node); +static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNodeStack **out); +static void node_dynamic_free_storage_cb(bNode *node); + +#ifdef WITH_PYTHON +static PyObject *init_dynamicdict(void) { + PyObject *newscriptdict, *item; + PyGILState_STATE gilstate = PyGILState_Ensure(); + + newscriptdict= PyDict_New(); + + PyDict_SetItemString(newscriptdict, "__builtins__", PyEval_GetBuiltins()); + item= PyString_FromString("__main__"); + PyDict_SetItemString(newscriptdict, "__name__", item); + Py_DECREF(item); + + PyGILState_Release(gilstate); + + return newscriptdict; +} +#endif + +static bNodeType *node_dynamic_find_typeinfo(ListBase *list, ID *id) +{ + bNodeType *ntype = list->first; + + while(ntype) { + if (ntype->type == NODE_DYNAMIC && ntype->id == id) + break; + ntype = ntype->next; + } + + return ntype; /* NULL if doesn't exist */ +} + +static void node_dynamic_free_typeinfo_sockets(bNodeType *tinfo) +{ + bNodeSocketTemplate *sock; + + if (!tinfo) return; + + if (tinfo->inputs) { + sock = tinfo->inputs; + while (sock->type != -1) { + MEM_freeN(sock->name); + sock++; + } + MEM_freeN(tinfo->inputs); + tinfo->inputs = NULL; + } + if (tinfo->outputs) { + sock = tinfo->outputs; + while (sock->type != -1) { + MEM_freeN(sock->name); + sock++; + } + MEM_freeN(tinfo->outputs); + tinfo->outputs = NULL; + } +} + +static void node_dynamic_free_typeinfo(bNodeType *tinfo) +{ + if (!tinfo) return; + + node_dynamic_free_typeinfo_sockets(tinfo); + + if (tinfo->name) { MEM_freeN(tinfo->name); } + + MEM_freeN(tinfo); +} + +static void node_dynamic_free_sockets(bNode *node) +{ + BLI_freelistN(&node->inputs); + BLI_freelistN(&node->outputs); +} + +/* For now we just remove the socket links. It's the safest + * route, since an update in the script may change completely the + * inputs and outputs. Trying to recreate the node links would be + * nicer for pynode authors, though. */ +static void node_dynamic_update_socket_links(bNode *node, bNodeTree *ntree) +{ + if (ntree) { + nodeVerifyType(ntree, node); + } + else { + Material *ma; + + for (ma= G.main->mat.first; ma; ma= ma->id.next) { + if (ma->nodetree) { + bNode *nd; + for (nd= ma->nodetree->nodes.first; nd; nd = nd->next) { + if (nd == node) nodeVerifyType(ma->nodetree, node); + } + } + } + } +} + +static void node_dynamic_free_storage_cb(bNode *node) +{ +#ifdef WITH_PYTHON + NodeScriptDict *nsd; + PyObject *pydict; + BPy_Node *pynode; + + if (!node->storage) return; + nsd = (NodeScriptDict *)(node->storage); + pydict = nsd->dict; + if (pydict) { + Py_DECREF(pydict); + } + pynode = nsd->node; + if (pynode) { + Py_DECREF(pynode); + } +#endif + MEM_freeN(node->storage); + node->storage = NULL; +} + +/* Disable pynode when its script fails */ +static void node_dynamic_disable(bNode *node) +{ + node->custom1 = 0; + node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ERROR); +} + +/* Disable all pynodes using the given text (script) id */ +static void node_dynamic_disable_all_by_id(ID *id) +{ +#ifdef WITH_PYTHON + Material *ma; /* XXX hardcoded for shaders */ + + for (ma= G.main->mat.first; ma; ma= ma->id.next) { + if (ma->nodetree) { + bNode *nd; + bNodeTree *ntree = ma->nodetree; + for (nd= ntree->nodes.first; nd; nd= nd->next) { + if (nd->id == id) { + nd->custom1 = 0; + nd->custom1 = BSET(nd->custom1, NODE_DYNAMIC_ERROR); + } + } + } + } +#endif +} + +static void node_rem_socklist_links(bNodeTree *ntree, ListBase *lb) +{ + bNodeLink *link, *next; + bNodeSocket *sock; + + if (!lb) return; + + for (sock= lb->first; sock; sock= sock->next) { + for (link= ntree->links.first; link; link= next) { + next= link->next; + if (link->fromsock==sock || link->tosock==sock) { + nodeRemLink(ntree, link); + } + } + } +} + +/* XXX hardcoded for shaders */ +static void node_dynamic_rem_all_links(bNodeType *tinfo) +{ + Material *ma; + int in, out; + + in = tinfo->inputs ? 1 : 0; + out = tinfo->outputs ? 1 : 0; + + if (!in && !out) return; + + for (ma= G.main->mat.first; ma; ma= ma->id.next) { + if (ma->nodetree) { + bNode *nd; + bNodeTree *ntree = ma->nodetree; + for (nd= ntree->nodes.first; nd; nd= nd->next) { + if (nd->typeinfo == tinfo) { + if (in) + node_rem_socklist_links(ntree, &nd->inputs); + if (out) + node_rem_socklist_links(ntree, &nd->outputs); + } + } + } + } +} + +/* node_dynamic_reset: clean a pynode, getting rid of all + * data dynamically created for it. */ +static void node_dynamic_reset(bNode *node, int unlink_text) +{ + bNodeType *tinfo, *tinfo_default; + Material *ma; + + tinfo = node->typeinfo; + tinfo_default = node_dynamic_find_typeinfo(&node_all_shaders, NULL); + + if ((tinfo == tinfo_default) && unlink_text) { + ID *textID = node->id; + /* already at default (empty) state, which happens if this node's + * script failed to parse at the first stage: definition. We're here + * because its text was removed from Blender. */ + for (ma= G.main->mat.first; ma; ma= ma->id.next) { + if (ma->nodetree) { + bNode *nd; + for (nd= ma->nodetree->nodes.first; nd; nd = nd->next) { + if (nd->id == textID) { + nd->id = NULL; + nd->custom1 = 0; + nd->custom1 = BSET(nd->custom1, NODE_DYNAMIC_NEW); + BLI_strncpy(nd->name, "Dynamic", 8); + return; + } + } + } + } + } + + node_dynamic_rem_all_links(tinfo); + node_dynamic_free_typeinfo_sockets(tinfo); + + /* reset all other XXX shader nodes sharing this typeinfo */ + for (ma= G.main->mat.first; ma; ma= ma->id.next) { + if (ma->nodetree) { + bNode *nd; + for (nd= ma->nodetree->nodes.first; nd; nd = nd->next) { + if (nd->typeinfo == tinfo) { + node_dynamic_free_storage_cb(nd); + node_dynamic_free_sockets(nd); + //node_dynamic_update_socket_links(nd, ma->nodetree); + nd->typeinfo = tinfo_default; + if (unlink_text) { + nd->id = NULL; + nd->custom1 = 0; + nd->custom1 = BSET(nd->custom1, NODE_DYNAMIC_NEW); + BLI_strncpy(nd->name, "Dynamic", 8); + } + } + } + } + } + + /* XXX hardcoded for shaders: */ + if (tinfo->id) { BLI_remlink(&node_all_shaders, tinfo); } + node_dynamic_free_typeinfo(tinfo); +} + +/* Special case of the above function: for working pynodes + * that were saved on a .blend but fail for some reason when + * the file is opened. We need this because pynodes are initialized + * before G.main. */ +static void node_dynamic_reset_loaded(bNode *node) +{ + bNodeType *tinfo = node->typeinfo; + + node_dynamic_rem_all_links(tinfo); + node_dynamic_free_typeinfo_sockets(tinfo); + node_dynamic_free_storage_cb(node); + /* XXX hardcoded for shaders: */ + if (tinfo->id) { BLI_remlink(&node_all_shaders, tinfo); } + + node_dynamic_free_typeinfo(tinfo); + node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, NULL); +} + +int nodeDynamicUnlinkText(ID *txtid) { + Material *ma; + bNode *nd; + + /* find one node that uses this text */ + for (ma= G.main->mat.first; ma; ma= ma->id.next) { + if (ma->nodetree) { + for (nd= ma->nodetree->nodes.first; nd; nd = nd->next) { + if ((nd->type == NODE_DYNAMIC) && (nd->id == txtid)) { + node_dynamic_reset(nd, 1); /* found, reset all */ + return 1; + } + } + } + } + return 0; /* no pynodes used this text */ +} + +static void node_dynamic_pyerror_print(bNode *node) +{ +#ifdef WITH_PYTHON + PyGILState_STATE gilstate = PyGILState_Ensure(); + + fprintf(stderr, "\nError in dynamic node script \"%s\":\n", node->name); + if (PyErr_Occurred()) { + PyErr_Print(); + PyErr_Clear(); + PySys_SetObject("last_traceback", NULL); + } + else { fprintf(stderr, "Not a valid dynamic node Python script.\n"); } + + PyGILState_Release(gilstate); +#endif +} + +static void node_dynamic_register_type(bNode *node) +{ + nodeRegisterType(&node_all_shaders, node->typeinfo); + /* nodeRegisterType copied it to a new one, so we + * free the typeinfo itself, but not what it + * points to: */ + MEM_freeN(node->typeinfo); + node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, node->id); + MEM_freeN(node->typeinfo->name); + node->typeinfo->name = BLI_strdup(node->name); +} + +#ifdef WITH_PYTHON +/* node_dynamic_get_pynode: + * Find the pynode definition from the script */ +static PyObject *node_dynamic_get_pynode(PyObject *dict) +{ + PyObject *key= NULL; + Py_ssize_t pos = 0; + PyObject *value = NULL; + + /* script writer specified a node? */ + value = PyDict_GetItemString(dict, "__node__"); + + if (value) { + if (PyObject_TypeCheck(value, &PyType_Type)) { + Py_INCREF(value); + return value; + } + else { + PyErr_SetString(PyExc_TypeError, + "expected class object derived from Scripted node"); + return NULL; + } + } + + /* case not, search for it in the script's global dictionary */ + while (PyDict_Next(dict, &pos, &key, &value)) { + /* skip names we know belong to other available objects */ + if (strcmp("Socket", PyString_AsString(key)) == 0) + continue; + else if (strcmp("Scripted", PyString_AsString(key)) == 0) + continue; + /* naive: we grab the first ob of type 'type': */ + else if (PyObject_TypeCheck(value, &PyType_Type)) { + Py_INCREF(value); + return value; + } + } + + PyErr_SetString(PyExc_TypeError, + "no PyNode definition found in the script!"); + return NULL; +} +#endif /* WITH_PYTHON */ + +static int node_dynamic_parse(struct bNode *node) +{ +#ifndef WITH_PYTHON + return -1; +#else + PyObject *dict= NULL; + PyObject *pynode_data= NULL; + PyObject *pynode= NULL; + PyObject *args= NULL; + NodeScriptDict *nsd = NULL; + PyObject *pyresult = NULL; + char *buf = NULL; + int is_valid_script = 0; + PyGILState_STATE gilstate; + + if (!node->id || !node->storage) + return 0; + + /* READY, no need to be here */ + if (BTST(node->custom1, NODE_DYNAMIC_READY)) + return 0; + + /* for threading */ + gilstate = PyGILState_Ensure(); + + nsd = (NodeScriptDict *)node->storage; + + dict = (PyObject *)(nsd->dict); + buf = txt_to_buf((Text *)node->id); + + pyresult = PyRun_String(buf, Py_file_input, dict, dict); + + MEM_freeN(buf); + + if (!pyresult) { + if (BTST(node->custom1, NODE_DYNAMIC_LOADED)) { + node_dynamic_disable(node); + } else { + node_dynamic_disable_all_by_id(node->id); + } + node_dynamic_pyerror_print(node); + PyGILState_Release(gilstate); + return -1; + } + + Py_DECREF(pyresult); + + pynode_data = node_dynamic_get_pynode(dict); + + if (pynode_data) { + BPy_NodeSocketLists *socklists = Node_CreateSocketLists(node); + + args = Py_BuildValue("(O)", socklists); + + /* init it to get the input and output sockets */ + pynode = PyObject_Call(pynode_data, args, NULL); + + Py_DECREF(pynode_data); + Py_DECREF(socklists); + Py_DECREF(args); + + if (!PyErr_Occurred() && pynode && pytype_is_pynode(pynode)) { + InitNode((BPy_Node *)(pynode), node); + nsd->node = pynode; + node->typeinfo->execfunc = node_dynamic_exec_cb; + is_valid_script = 1; + + /* for NEW, LOADED, REPARSE */ + if (BNTST(node->custom1, NODE_DYNAMIC_ADDEXIST)) { + node->typeinfo->pydict = dict; + node->typeinfo->pynode = pynode; + node->typeinfo->id = node->id; + if (BNTST(node->custom1, NODE_DYNAMIC_LOADED)) + nodeAddSockets(node, node->typeinfo); + if (BNTST(node->custom1, NODE_DYNAMIC_REPARSE)) + node_dynamic_register_type(node); + } + + node->custom1 = 0; + node->custom1 = BSET(node->custom1, NODE_DYNAMIC_READY); + } + } + + PyGILState_Release(gilstate); + + if (!is_valid_script) { /* not a valid pynode script */ + node_dynamic_disable_all_by_id(node->id); + node_dynamic_pyerror_print(node); + return -1; + } + + return 0; +#endif +} + +/* node_dynamic_setup: prepare for execution (state: NODE_DYNAMIC_READY) + * pynodes already linked to a script (node->id != NULL). */ +static void node_dynamic_setup(bNode *node) +{ +#ifdef WITH_PYTHON + NodeScriptDict *nsd = NULL; + bNodeTree *nodetree = NULL; + bNodeType *ntype = NULL; + PyGILState_STATE gilstate; + + /* Possible cases: + * NEW + * ADDEXIST + * LOADED + * REPARSE + * ERROR + * READY + */ + + /* NEW, but not linked to a script: link default (empty) typeinfo */ + if (!node->id) { + node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, + NULL); + return; + } + + /* READY, no need to be here */ + if (BTST(node->custom1, NODE_DYNAMIC_READY)) + return; + + gilstate = PyGILState_Ensure(); + + /* ERROR, reset to (empty) defaults */ + if (BCLR(node->custom1, NODE_DYNAMIC_ERROR) == 0) { + node_dynamic_reset(node, 0); + PyGILState_Release(gilstate); + return; + } + + /* User asked to update this pynode, prepare it for reparsing */ + if (BTST(node->custom1, NODE_DYNAMIC_REPARSE)) { + int needs_parsing = 1; + + node->custom1 = BSET(node->custom1, NODE_DYNAMIC_NEW); + + if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) { + node->custom1 = BCLR(node->custom1, NODE_DYNAMIC_REPARSE); + ntype = node_dynamic_find_typeinfo(&node_all_shaders, node->id); + + if (ntype) { + node->typeinfo = ntype; + node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ADDEXIST); + node->custom1 = BCLR(node->custom1, NODE_DYNAMIC_ERROR); + needs_parsing = 0; + } + else { nodeMakeDynamicType(node); } + + } else { + node_dynamic_rem_all_links(node->typeinfo); + node_dynamic_free_typeinfo_sockets(node->typeinfo); + node_dynamic_update_socket_links(node, NULL); + node_dynamic_free_storage_cb(node); + } + + if (needs_parsing) { + nsd = MEM_callocN(sizeof(NodeScriptDict), "node script dictionary"); + nsd->dict = init_dynamicdict(); + node->storage = nsd; + /* prepared, now reparse: */ + node_dynamic_parse(node); + PyGILState_Release(gilstate); + return; + } + } + else if (BTST(node->custom1, NODE_DYNAMIC_LOADED)) { + /* when loading from a .blend we don't have G.main yet, so we + * quickly abuse node->storage in ntreeInitTypes (node.c) to have + * our nodetree ptr (needed if a pynode script that worked before + * saving the .blend for some reason fails upon loading): */ + nodetree = (bNodeTree *)node->storage; + node->storage = NULL; + } + + if (node->storage) + fprintf(stderr, "\nDEBUG: PYNODES ERROR: non NULL node->storage in node_dynamic_setup()\n"); + + nsd = MEM_callocN(sizeof(NodeScriptDict), "node script dictionary"); + node->storage = nsd; + + /* NEW, LOADED or REPARSE */ + if (BNTST(node->custom1, NODE_DYNAMIC_ADDEXIST)) { + /* check if there's already a bNodeType linked to this script */ + /* (XXX hardcoded for shader nodes for now) */ + ntype = node_dynamic_find_typeinfo(&node_all_shaders, node->id); + + if (ntype) { /* if so, reuse it */ + node->typeinfo = ntype; + /* so this is actually an ADDEXIST type */ + node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ADDEXIST); + } + else { /* create bNodeType for this pynode */ + nodeMakeDynamicType(node); + nsd->dict = init_dynamicdict(); + if ((node_dynamic_parse(node) == -1) && nodetree) { + node_dynamic_reset_loaded(node); + } + PyGILState_Release(gilstate); + return; + } + } + + /* ADDEXIST: new pynode linked to an already registered dynamic type, + * we just reuse existing py dict and pynode */ + nsd->dict = node->typeinfo->pydict; + nsd->node = node->typeinfo->pynode; + + Py_INCREF((PyObject *)(nsd->dict)); + Py_INCREF((PyObject *)(nsd->node)); + + if (BTST(node->custom1, NODE_DYNAMIC_NEW)) { + nodeAddSockets(node, node->typeinfo); + node->custom1 = BCLR(node->custom1, NODE_DYNAMIC_NEW); + } + + node->custom1 = BCLR(node->custom1, NODE_DYNAMIC_ADDEXIST); + node->custom1 = BSET(node->custom1, NODE_DYNAMIC_READY); + + PyGILState_Release(gilstate); +#endif /* WITH_PYTHON */ + return; +} + +/* node_dynamic_init_cb callback: called when a pynode is created. + * The pynode type is passed via node->custom2. It can be: + * 0: for loaded empty nodes + * NODE_DYNAMIC_MENU: for the default Dynamic node type + * > NODE_DYNAMIC_MENU: for the new types defined by scripts +*/ +static void node_dynamic_init_cb(bNode *node) { + int type = node->custom2; + + node->custom2 = 0; + + if (type >= NODE_DYNAMIC_MENU) { + node->custom1 = 0; + + if (type == NODE_DYNAMIC_MENU) { + node->custom1 = BSET(node->custom1, NODE_DYNAMIC_NEW); + return; + } + + node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ADDEXIST); + node->id = node->typeinfo->id; + } + + node_dynamic_setup(node); +} + +/* node_dynamic_copy_cb: pynode copy callback */ +static void node_dynamic_copy_cb(bNode *orig_node, bNode *new_node) +{ +#ifndef WITH_PYTHON + return; +#else + NodeScriptDict *nsd; + PyGILState_STATE gilstate; + + if (!orig_node->storage) return; + + nsd = (NodeScriptDict *)(orig_node->storage); + new_node->storage = MEM_dupallocN(orig_node->storage); + + gilstate = PyGILState_Ensure(); + + if (nsd->node) + Py_INCREF((PyObject *)(nsd->node)); + if (nsd->dict) + Py_INCREF((PyObject *)(nsd->dict)); + + PyGILState_Release(gilstate); +#endif +} + +/* node_dynamic_exec_cb: the execution callback called per pixel + * during rendering. */ +static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNodeStack **out) { +#ifndef WITH_PYTHON + return; +#else + BPy_Node *mynode = NULL; + NodeScriptDict *nsd = NULL; + PyObject *pyresult = NULL; + PyObject *args = NULL; + ShadeInput *shi; + PyGILState_STATE gilstate; + + if (!node->id) + return; + + /*if (G.scene->r.threads > 1) + return;*/ + + if (BTST2(node->custom1, NODE_DYNAMIC_NEW, NODE_DYNAMIC_REPARSE)) { + node_dynamic_setup(node); + return; + } + + if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) { + if (node->storage) node_dynamic_setup(node); + return; + } + + if (BTST(node->custom1, NODE_DYNAMIC_READY)) { + nsd = (NodeScriptDict *)node->storage; + mynode = (BPy_Node *)(nsd->node); + + + if (mynode && PyCallable_Check((PyObject *)mynode)) { + + gilstate = PyGILState_Ensure(); + + mynode->node = node; + shi = ((ShaderCallData *)data)->shi; + + Node_SetStack(mynode, in, NODE_INPUTSTACK); + Node_SetStack(mynode, out, NODE_OUTPUTSTACK); + Node_SetShi(mynode, shi); + + args=Py_BuildValue("()"); + pyresult= PyObject_Call((PyObject *)mynode, args, NULL); + Py_DECREF(args); + + if (!pyresult) { + PyGILState_Release(gilstate); + node_dynamic_disable_all_by_id(node->id); + node_dynamic_pyerror_print(node); + node_dynamic_setup(node); + return; + } + Py_DECREF(pyresult); + PyGILState_Release(gilstate); + } + } +#endif +} + +void register_node_type_sh_dynamic(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, NODE_OPTIONS, NULL, NULL); + node_type_size(&ntype, 150, 60, 300); + node_type_init(&ntype, node_dynamic_init_cb); + node_type_storage(&ntype, "NodeScriptDict", node_dynamic_free_storage_cb, node_dynamic_copy_cb); + node_type_exec(&ntype, node_dynamic_exec_cb); + + nodeRegisterType(lb, &ntype); +} + +#else + +void register_node_type_sh_dynamic(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, 0); + + nodeRegisterType(lb, &ntype); +} + +#endif + + diff --git a/source/blender/nodes/shader/nodes/node_shader_geom.c b/source/blender/nodes/shader/nodes/node_shader_geom.c new file mode 100644 index 00000000000..b88c5979b54 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_geom.c @@ -0,0 +1,153 @@ +/* + * $Id: SHD_geom.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_geom.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +#include "DNA_customdata_types.h" + +/* **************** GEOMETRY ******************** */ + +/* output socket type definition */ +static bNodeSocketTemplate sh_node_geom_out[]= { + { SOCK_VECTOR, 0, "Global"}, + { SOCK_VECTOR, 0, "Local"}, + { SOCK_VECTOR, 0, "View"}, + { SOCK_VECTOR, 0, "Orco"}, + { SOCK_VECTOR, 0, "UV"}, + { SOCK_VECTOR, 0, "Normal"}, + { SOCK_RGBA, 0, "Vertex Color"}, + { SOCK_FLOAT, 0, "Front/Back"}, + { -1, 0, "" } +}; + +/* node execute callback */ +static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) +{ + if(data) { + ShadeInput *shi= ((ShaderCallData *)data)->shi; + NodeGeometry *ngeo= (NodeGeometry*)node->storage; + ShadeInputUV *suv= &shi->uv[shi->actuv]; + static float defaultvcol[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + int i; + + if(ngeo->uvname[0]) { + /* find uv layer by name */ + for(i = 0; i < shi->totuv; i++) { + if(strcmp(shi->uv[i].name, ngeo->uvname)==0) { + suv= &shi->uv[i]; + break; + } + } + } + + /* out: global, local, view, orco, uv, normal, vertex color */ + VECCOPY(out[GEOM_OUT_GLOB]->vec, shi->gl); + VECCOPY(out[GEOM_OUT_LOCAL]->vec, shi->co); + VECCOPY(out[GEOM_OUT_VIEW]->vec, shi->view); + VECCOPY(out[GEOM_OUT_ORCO]->vec, shi->lo); + VECCOPY(out[GEOM_OUT_UV]->vec, suv->uv); + VECCOPY(out[GEOM_OUT_NORMAL]->vec, shi->vno); + + if (shi->totcol) { + /* find vertex color layer by name */ + ShadeInputCol *scol= &shi->col[0]; + + if(ngeo->colname[0]) { + for(i = 0; i < shi->totcol; i++) { + if(strcmp(shi->col[i].name, ngeo->colname)==0) { + scol= &shi->col[i]; + break; + } + } + } + + VECCOPY(out[GEOM_OUT_VCOL]->vec, scol->col); + out[GEOM_OUT_VCOL]->vec[3]= 1.0f; + } + else + memcpy(out[GEOM_OUT_VCOL]->vec, defaultvcol, sizeof(defaultvcol)); + + if(shi->osatex) { + out[GEOM_OUT_GLOB]->data= shi->dxgl; + out[GEOM_OUT_GLOB]->datatype= NS_OSA_VECTORS; + out[GEOM_OUT_LOCAL]->data= shi->dxco; + out[GEOM_OUT_LOCAL]->datatype= NS_OSA_VECTORS; + out[GEOM_OUT_VIEW]->data= &shi->dxview; + out[GEOM_OUT_VIEW]->datatype= NS_OSA_VALUES; + out[GEOM_OUT_ORCO]->data= shi->dxlo; + out[GEOM_OUT_ORCO]->datatype= NS_OSA_VECTORS; + out[GEOM_OUT_UV]->data= suv->dxuv; + out[GEOM_OUT_UV]->datatype= NS_OSA_VECTORS; + out[GEOM_OUT_NORMAL]->data= shi->dxno; + out[GEOM_OUT_NORMAL]->datatype= NS_OSA_VECTORS; + } + + /* front/back, normal flipping was stored */ + out[GEOM_OUT_FRONTBACK]->vec[0]= (shi->flippednor)? 0.0f: 1.0f; + } +} + +static void node_shader_init_geometry(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= MEM_callocN(sizeof(NodeGeometry), "NodeGeometry"); +} + +static int gpu_shader_geom(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + NodeGeometry *ngeo= (NodeGeometry*)node->storage; + GPUNodeLink *orco = GPU_attribute(CD_ORCO, ""); + GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, ngeo->uvname); + GPUNodeLink *mcol = GPU_attribute(CD_MCOL, ngeo->colname); + + return GPU_stack_link(mat, "geom", in, out, + GPU_builtin(GPU_VIEW_POSITION), GPU_builtin(GPU_VIEW_NORMAL), + GPU_builtin(GPU_INVERSE_VIEW_MATRIX), orco, mtface, mcol); +} + +/* node type definition */ +void register_node_type_sh_geom(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_GEOMETRY, "Geometry", NODE_CLASS_INPUT, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, sh_node_geom_out); + node_type_size(&ntype, 120, 80, 160); + node_type_init(&ntype, node_shader_init_geometry); + node_type_storage(&ntype, "NodeGeometry", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_shader_exec_geom); + node_type_gpu(&ntype, gpu_shader_geom); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c new file mode 100644 index 00000000000..ef1434b82ca --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c @@ -0,0 +1,99 @@ +/* + * + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Juho Vepsäläinen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_hueSatVal.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + + +/* **************** Hue Saturation ******************** */ +static bNodeSocketTemplate sh_node_hue_sat_in[]= { + { SOCK_FLOAT, 1, "Hue", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Saturation", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, "Value", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate sh_node_hue_sat_out[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +/* note: it would be possible to use CMP version for both nodes */ +static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float *hue, float *sat, float *val, float *in, float *fac) +{ + if(*fac!=0.0f && (*hue!=0.5f || *sat!=1.0f || *val!=1.0f)) { + float col[3], hsv[3], mfac= 1.0f - *fac; + + rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); + hsv[0]+= (*hue - 0.5f); + if(hsv[0]>1.0f) hsv[0]-=1.0f; else if(hsv[0]<0.0f) hsv[0]+= 1.0f; + hsv[1]*= *sat; + hsv[2]*= *val; + hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); + + out[0]= mfac*in[0] + *fac*col[0]; + out[1]= mfac*in[1] + *fac*col[1]; + out[2]= mfac*in[2] + *fac*col[2]; + } + else { + QUATCOPY(out, in); + } +} + +static void node_shader_exec_hue_sat(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + do_hue_sat_fac(node, out[0]->vec, in[0]->vec, in[1]->vec, in[2]->vec, in[4]->vec, in[3]->vec); +} + + +static int gpu_shader_hue_sat(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) +{ + return GPU_stack_link(mat, "hue_sat", in, out); +} + +void register_node_type_sh_hue_sat(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_hue_sat_in, sh_node_hue_sat_out); + node_type_size(&ntype, 150, 80, 250); + node_type_exec(&ntype, node_shader_exec_hue_sat); + node_type_gpu(&ntype, gpu_shader_hue_sat); + + nodeRegisterType(lb, &ntype); +} + + + diff --git a/source/blender/nodes/shader/nodes/node_shader_invert.c b/source/blender/nodes/shader/nodes/node_shader_invert.c new file mode 100644 index 00000000000..bd7e571f073 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_invert.c @@ -0,0 +1,90 @@ +/* + * $Id: SHD_invert.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_invert.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + + + +/* **************** INVERT ******************** */ +static bNodeSocketTemplate sh_node_invert_in[]= { + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_invert_out[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void node_shader_exec_invert(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, +bNodeStack **out) +{ + float col[3], facm; + + col[0] = 1.0f - in[1]->vec[0]; + col[1] = 1.0f - in[1]->vec[1]; + col[2] = 1.0f - in[1]->vec[2]; + + /* if fac, blend result against original input */ + if (in[0]->vec[0] < 1.0f) { + facm = 1.0f - in[0]->vec[0]; + + col[0] = in[0]->vec[0]*col[0] + (facm*in[1]->vec[0]); + col[1] = in[0]->vec[0]*col[1] + (facm*in[1]->vec[1]); + col[2] = in[0]->vec[0]*col[2] + (facm*in[1]->vec[2]); + } + + VECCOPY(out[0]->vec, col); +} + +static int gpu_shader_invert(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) +{ + return GPU_stack_link(mat, "invert", in, out); +} + +void register_node_type_sh_invert(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_invert_in, sh_node_invert_out); + node_type_size(&ntype, 90, 80, 100); + node_type_exec(&ntype, node_shader_exec_invert); + node_type_gpu(&ntype, gpu_shader_invert); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/shader/nodes/node_shader_mapping.c b/source/blender/nodes/shader/nodes/node_shader_mapping.c new file mode 100644 index 00000000000..21cea4853ad --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_mapping.c @@ -0,0 +1,104 @@ +/* + * $Id: SHD_mapping.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_mapping.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** MAPPING ******************** */ +static bNodeSocketTemplate sh_node_mapping_in[]= { + { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_mapping_out[]= { + { SOCK_VECTOR, 0, "Vector"}, + { -1, 0, "" } +}; + +/* do the regular mapping options for blender textures */ +static void node_shader_exec_mapping(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + TexMapping *texmap= node->storage; + float *vec= out[0]->vec; + + /* stack order input: vector */ + /* stack order output: vector */ + nodestack_get_vec(vec, SOCK_VECTOR, in[0]); + mul_m4_v3(texmap->mat, vec); + + if(texmap->flag & TEXMAP_CLIP_MIN) { + if(vec[0]min[0]) vec[0]= texmap->min[0]; + if(vec[1]min[1]) vec[1]= texmap->min[1]; + if(vec[2]min[2]) vec[2]= texmap->min[2]; + } + if(texmap->flag & TEXMAP_CLIP_MAX) { + if(vec[0]>texmap->max[0]) vec[0]= texmap->max[0]; + if(vec[1]>texmap->max[1]) vec[1]= texmap->max[1]; + if(vec[2]>texmap->max[2]) vec[2]= texmap->max[2]; + } +} + + +static void node_shader_init_mapping(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= add_mapping(); +} + +static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + TexMapping *texmap= node->storage; + float domin= (texmap->flag & TEXMAP_CLIP_MIN) != 0; + float domax= (texmap->flag & TEXMAP_CLIP_MAX) != 0; + GPUNodeLink *tmat = GPU_uniform((float*)texmap->mat); + GPUNodeLink *tmin = GPU_uniform(texmap->min); + GPUNodeLink *tmax = GPU_uniform(texmap->max); + GPUNodeLink *tdomin = GPU_uniform(&domin); + GPUNodeLink *tdomax = GPU_uniform(&domax); + + return GPU_stack_link(mat, "mapping", in, out, tmat, tmin, tmax, tdomin, tdomax); +} + +void register_node_type_sh_mapping(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_mapping_in, sh_node_mapping_out); + node_type_size(&ntype, 240, 160, 320); + node_type_init(&ntype, node_shader_init_mapping); + node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_shader_exec_mapping); + node_type_gpu(&ntype, gpu_shader_mapping); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/shader/nodes/node_shader_material.c b/source/blender/nodes/shader/nodes/node_shader_material.c new file mode 100644 index 00000000000..a0bfd430506 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_material.c @@ -0,0 +1,336 @@ +/* + * $Id: SHD_material.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_material.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** MATERIAL ******************** */ + +static bNodeSocketTemplate sh_node_material_in[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_material_out[]= { + { SOCK_RGBA, 0, "Color"}, + { SOCK_FLOAT, 0, "Alpha"}, + { SOCK_VECTOR, 0, "Normal"}, + { -1, 0, "" } +}; + +/* **************** EXTENDED MATERIAL ******************** */ + +static bNodeSocketTemplate sh_node_material_ext_in[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION}, + { SOCK_RGBA, 1, "Mirror", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 1, "Ambient", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, "Emit", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED}, + { SOCK_FLOAT, 1, "SpecTra", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, "Ray Mirror", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, "Alpha", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED}, + { SOCK_FLOAT, 1, "Translucency", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_material_ext_out[]= { + { SOCK_RGBA, 0, "Color"}, + { SOCK_FLOAT, 0, "Alpha"}, + { SOCK_VECTOR, 0, "Normal"}, + { SOCK_RGBA, 0, "Diffuse"}, + { SOCK_RGBA, 0, "Spec"}, + { SOCK_RGBA, 0, "AO"}, + { -1, 0, "" } +}; + +static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + if(data && node->id) { + ShadeResult shrnode; + ShadeInput *shi; + ShaderCallData *shcd= data; + float col[4]; + bNodeSocket *sock; + char hasinput[NUM_MAT_IN]= {'\0'}; + int i; + + /* note: cannot use the in[]->hasinput flags directly, as these are not necessarily + * the constant input stack values (e.g. in case material node is inside a group). + * we just want to know if a node input uses external data or the material setting. + * this is an ugly hack, but so is this node as a whole. + */ + for (sock=node->inputs.first, i=0; sock; sock=sock->next, ++i) + hasinput[i] = (sock->link != NULL); + + shi= shcd->shi; + shi->mat= (Material *)node->id; + + /* copy all relevant material vars, note, keep this synced with render_types.h */ + memcpy(&shi->r, &shi->mat->r, 23*sizeof(float)); + shi->har= shi->mat->har; + + /* write values */ + if(hasinput[MAT_IN_COLOR]) + nodestack_get_vec(&shi->r, SOCK_VECTOR, in[MAT_IN_COLOR]); + + if(hasinput[MAT_IN_SPEC]) + nodestack_get_vec(&shi->specr, SOCK_VECTOR, in[MAT_IN_SPEC]); + + if(hasinput[MAT_IN_REFL]) + nodestack_get_vec(&shi->refl, SOCK_FLOAT, in[MAT_IN_REFL]); + + /* retrieve normal */ + if(hasinput[MAT_IN_NORMAL]) { + nodestack_get_vec(shi->vn, SOCK_VECTOR, in[MAT_IN_NORMAL]); + normalize_v3(shi->vn); + } + else + VECCOPY(shi->vn, shi->vno); + + /* custom option to flip normal */ + if(node->custom1 & SH_NODE_MAT_NEG) { + shi->vn[0]= -shi->vn[0]; + shi->vn[1]= -shi->vn[1]; + shi->vn[2]= -shi->vn[2]; + } + + if (node->type == SH_NODE_MATERIAL_EXT) { + if(hasinput[MAT_IN_MIR]) + nodestack_get_vec(&shi->mirr, SOCK_VECTOR, in[MAT_IN_MIR]); + if(hasinput[MAT_IN_AMB]) + nodestack_get_vec(&shi->amb, SOCK_FLOAT, in[MAT_IN_AMB]); + if(hasinput[MAT_IN_EMIT]) + nodestack_get_vec(&shi->emit, SOCK_FLOAT, in[MAT_IN_EMIT]); + if(hasinput[MAT_IN_SPECTRA]) + nodestack_get_vec(&shi->spectra, SOCK_FLOAT, in[MAT_IN_SPECTRA]); + if(hasinput[MAT_IN_RAY_MIRROR]) + nodestack_get_vec(&shi->ray_mirror, SOCK_FLOAT, in[MAT_IN_RAY_MIRROR]); + if(hasinput[MAT_IN_ALPHA]) + nodestack_get_vec(&shi->alpha, SOCK_FLOAT, in[MAT_IN_ALPHA]); + if(hasinput[MAT_IN_TRANSLUCENCY]) + nodestack_get_vec(&shi->translucency, SOCK_FLOAT, in[MAT_IN_TRANSLUCENCY]); + } + + shi->nodes= 1; /* temp hack to prevent trashadow recursion */ + node_shader_lamp_loop(shi, &shrnode); /* clears shrnode */ + shi->nodes= 0; + + /* write to outputs */ + if(node->custom1 & SH_NODE_MAT_DIFF) { + VECCOPY(col, shrnode.combined); + if(!(node->custom1 & SH_NODE_MAT_SPEC)) { + sub_v3_v3(col, shrnode.spec); + } + } + else if(node->custom1 & SH_NODE_MAT_SPEC) { + VECCOPY(col, shrnode.spec); + } + else + col[0]= col[1]= col[2]= 0.0f; + + col[3]= shrnode.alpha; + + if(shi->do_preview) + nodeAddToPreview(node, col, shi->xs, shi->ys, shi->do_manage); + + VECCOPY(out[MAT_OUT_COLOR]->vec, col); + out[MAT_OUT_ALPHA]->vec[0]= shrnode.alpha; + + if(node->custom1 & SH_NODE_MAT_NEG) { + shi->vn[0]= -shi->vn[0]; + shi->vn[1]= -shi->vn[1]; + shi->vn[2]= -shi->vn[2]; + } + + VECCOPY(out[MAT_OUT_NORMAL]->vec, shi->vn); + + /* Extended material options */ + if (node->type == SH_NODE_MATERIAL_EXT) { + /* Shadow, Reflect, Refract, Radiosity, Speed seem to cause problems inside + * a node tree :( */ + VECCOPY(out[MAT_OUT_DIFFUSE]->vec, shrnode.diff); + VECCOPY(out[MAT_OUT_SPEC]->vec, shrnode.spec); + VECCOPY(out[MAT_OUT_AO]->vec, shrnode.ao); + } + + /* copy passes, now just active node */ + if(node->flag & NODE_ACTIVE_ID) { + float combined[4], alpha; + + copy_v4_v4(combined, shcd->shr->combined); + alpha= shcd->shr->alpha; + + *(shcd->shr)= shrnode; + + copy_v4_v4(shcd->shr->combined, combined); + shcd->shr->alpha= alpha; + } + } +} + + +static void node_shader_init_material(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->custom1= SH_NODE_MAT_DIFF|SH_NODE_MAT_SPEC; +} + +/* XXX this is also done as a local static function in gpu_codegen.c, + * but we need this to hack around the crappy material node. + */ +static GPUNodeLink *gpu_get_input_link(GPUNodeStack *in) +{ + if (in->link) + return in->link; + else + return GPU_uniform(in->vec); +} + +static int gpu_shader_material(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + if(node->id) { + GPUShadeInput shi; + GPUShadeResult shr; + bNodeSocket *sock; + char hasinput[NUM_MAT_IN]= {'\0'}; + int i; + + /* note: cannot use the in[]->hasinput flags directly, as these are not necessarily + * the constant input stack values (e.g. in case material node is inside a group). + * we just want to know if a node input uses external data or the material setting. + */ + for (sock=node->inputs.first, i=0; sock; sock=sock->next, ++i) + hasinput[i] = (sock->link != NULL); + + GPU_shadeinput_set(mat, (Material*)node->id, &shi); + + /* write values */ + if(hasinput[MAT_IN_COLOR]) + shi.rgb = gpu_get_input_link(&in[MAT_IN_COLOR]); + + if(hasinput[MAT_IN_SPEC]) + shi.specrgb = gpu_get_input_link(&in[MAT_IN_SPEC]); + + if(hasinput[MAT_IN_REFL]) + shi.refl = gpu_get_input_link(&in[MAT_IN_REFL]); + + /* retrieve normal */ + if(hasinput[MAT_IN_NORMAL]) { + GPUNodeLink *tmp; + shi.vn = gpu_get_input_link(&in[MAT_IN_NORMAL]); + GPU_link(mat, "vec_math_normalize", shi.vn, &shi.vn, &tmp); + } + + /* custom option to flip normal */ + if(node->custom1 & SH_NODE_MAT_NEG) + GPU_link(mat, "vec_math_negate", shi.vn, &shi.vn); + + if (node->type == SH_NODE_MATERIAL_EXT) { + if(hasinput[MAT_IN_AMB]) + shi.amb= gpu_get_input_link(&in[MAT_IN_AMB]); + if(hasinput[MAT_IN_EMIT]) + shi.emit= gpu_get_input_link(&in[MAT_IN_EMIT]); + if(hasinput[MAT_IN_ALPHA]) + shi.alpha= gpu_get_input_link(&in[MAT_IN_ALPHA]); + } + + GPU_shaderesult_set(&shi, &shr); /* clears shr */ + + /* write to outputs */ + if(node->custom1 & SH_NODE_MAT_DIFF) { + out[MAT_OUT_COLOR].link= shr.combined; + + if(!(node->custom1 & SH_NODE_MAT_SPEC)) { + GPUNodeLink *link; + GPU_link(mat, "vec_math_sub", shr.combined, shr.spec, &out[MAT_OUT_COLOR].link, &link); + } + } + else if(node->custom1 & SH_NODE_MAT_SPEC) { + out[MAT_OUT_COLOR].link= shr.spec; + } + else + GPU_link(mat, "set_rgb_zero", &out[MAT_OUT_COLOR].link); + + GPU_link(mat, "mtex_alpha_to_col", out[MAT_OUT_COLOR].link, shr.alpha, &out[MAT_OUT_COLOR].link); + + out[MAT_OUT_ALPHA].link = shr.alpha; // + + if(node->custom1 & SH_NODE_MAT_NEG) + GPU_link(mat, "vec_math_negate", shi.vn, &shi.vn); + out[MAT_OUT_NORMAL].link = shi.vn; + + if (node->type == SH_NODE_MATERIAL_EXT) { + out[MAT_OUT_DIFFUSE].link = shr.diff; + out[MAT_OUT_SPEC].link = shr.spec; + } + + return 1; + } + + return 0; +} + +void register_node_type_sh_material(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_MATERIAL, "Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW); + node_type_socket_templates(&ntype, sh_node_material_in, sh_node_material_out); + node_type_size(&ntype, 120, 80, 240); + node_type_init(&ntype, node_shader_init_material); + node_type_exec(&ntype, node_shader_exec_material); + node_type_gpu(&ntype, gpu_shader_material); + + nodeRegisterType(lb, &ntype); +} + + +void register_node_type_sh_material_ext(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_MATERIAL_EXT, "Extended Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW); + node_type_socket_templates(&ntype, sh_node_material_ext_in, sh_node_material_ext_out); + node_type_size(&ntype, 120, 80, 240); + node_type_init(&ntype, node_shader_init_material); + node_type_exec(&ntype, node_shader_exec_material); + node_type_gpu(&ntype, gpu_shader_material); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c new file mode 100644 index 00000000000..0618598379f --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_math.c @@ -0,0 +1,256 @@ +/* + * $Id: SHD_math.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_math.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + + +/* **************** SCALAR MATH ******************** */ +static bNodeSocketTemplate sh_node_math_in[]= { + { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_math_out[]= { + { SOCK_FLOAT, 0, "Value"}, + { -1, 0, "" } +}; + +static void node_shader_exec_math(void *UNUSED(data), bNode *node, bNodeStack **in, +bNodeStack **out) +{ + switch(node->custom1){ + + case 0: /* Add */ + out[0]->vec[0]= in[0]->vec[0] + in[1]->vec[0]; + break; + case 1: /* Subtract */ + out[0]->vec[0]= in[0]->vec[0] - in[1]->vec[0]; + break; + case 2: /* Multiply */ + out[0]->vec[0]= in[0]->vec[0] * in[1]->vec[0]; + break; + case 3: /* Divide */ + { + if(in[1]->vec[0]==0) /* We don't want to divide by zero. */ + out[0]->vec[0]= 0.0; + else + out[0]->vec[0]= in[0]->vec[0] / in[1]->vec[0]; + } + break; + case 4: /* Sine */ + { + if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ + out[0]->vec[0]= sin(in[0]->vec[0]); + else + out[0]->vec[0]= sin(in[1]->vec[0]); + } + break; + case 5: /* Cosine */ + { + if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ + out[0]->vec[0]= cos(in[0]->vec[0]); + else + out[0]->vec[0]= cos(in[1]->vec[0]); + } + break; + case 6: /* Tangent */ + { + if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ + out[0]->vec[0]= tan(in[0]->vec[0]); + else + out[0]->vec[0]= tan(in[1]->vec[0]); + } + break; + case 7: /* Arc-Sine */ + { + if(in[0]->hasinput || !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ + /* Can't do the impossible... */ + if( in[0]->vec[0] <= 1 && in[0]->vec[0] >= -1 ) + out[0]->vec[0]= asin(in[0]->vec[0]); + else + out[0]->vec[0]= 0.0; + } + else { + /* Can't do the impossible... */ + if( in[1]->vec[0] <= 1 && in[1]->vec[0] >= -1 ) + out[0]->vec[0]= asin(in[1]->vec[0]); + else + out[0]->vec[0]= 0.0; + } + } + break; + case 8: /* Arc-Cosine */ + { + if(in[0]->hasinput || !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ + /* Can't do the impossible... */ + if( in[0]->vec[0] <= 1 && in[0]->vec[0] >= -1 ) + out[0]->vec[0]= acos(in[0]->vec[0]); + else + out[0]->vec[0]= 0.0; + } + else { + /* Can't do the impossible... */ + if( in[1]->vec[0] <= 1 && in[1]->vec[0] >= -1 ) + out[0]->vec[0]= acos(in[1]->vec[0]); + else + out[0]->vec[0]= 0.0; + } + } + break; + case 9: /* Arc-Tangent */ + { + if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ + out[0]->vec[0]= atan(in[0]->vec[0]); + else + out[0]->vec[0]= atan(in[1]->vec[0]); + } + break; + case 10: /* Power */ + { + /* Don't want any imaginary numbers... */ + if( in[0]->vec[0] >= 0 ) + out[0]->vec[0]= pow(in[0]->vec[0], in[1]->vec[0]); + else + out[0]->vec[0]= 0.0; + } + break; + case 11: /* Logarithm */ + { + /* Don't want any imaginary numbers... */ + if( in[0]->vec[0] > 0 && in[1]->vec[0] > 0 ) + out[0]->vec[0]= log(in[0]->vec[0]) / log(in[1]->vec[0]); + else + out[0]->vec[0]= 0.0; + } + break; + case 12: /* Minimum */ + { + if( in[0]->vec[0] < in[1]->vec[0] ) + out[0]->vec[0]= in[0]->vec[0]; + else + out[0]->vec[0]= in[1]->vec[0]; + } + break; + case 13: /* Maximum */ + { + if( in[0]->vec[0] > in[1]->vec[0] ) + out[0]->vec[0]= in[0]->vec[0]; + else + out[0]->vec[0]= in[1]->vec[0]; + } + break; + case 14: /* Round */ + { + if(in[0]->hasinput || !in[1]->hasinput) /* This one only takes one input, so we've got to choose. */ + out[0]->vec[0]= (in[0]->vec[0]<0)?(int)(in[0]->vec[0] - 0.5f):(int)(in[0]->vec[0] + 0.5f); + else + out[0]->vec[0]= (in[1]->vec[0]<0)?(int)(in[1]->vec[0] - 0.5f):(int)(in[1]->vec[0] + 0.5f); + } + break; + case 15: /* Less Than */ + { + if( in[0]->vec[0] < in[1]->vec[0] ) + out[0]->vec[0]= 1.0f; + else + out[0]->vec[0]= 0.0f; + } + break; + case 16: /* Greater Than */ + { + if( in[0]->vec[0] > in[1]->vec[0] ) + out[0]->vec[0]= 1.0f; + else + out[0]->vec[0]= 0.0f; + } + break; + } +} + +static int gpu_shader_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + static const char *names[] = {"math_add", "math_subtract", "math_multiply", + "math_divide", "math_sine", "math_cosine", "math_tangent", "math_asin", + "math_acos", "math_atan", "math_pow", "math_log", "math_min", "math_max", + "math_round", "math_less_than", "math_greater_than"}; + + switch (node->custom1) { + case 0: + case 1: + case 2: + case 3: + case 10: + case 11: + case 12: + case 13: + case 15: + case 16: + GPU_stack_link(mat, names[node->custom1], NULL, out, + GPU_socket(&in[0]), GPU_socket(&in[1])); + break; + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 14: + if(in[0].hasinput || !in[1].hasinput) + GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[0])); + else + GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[1])); + break; + default: + return 0; + } + + return 1; +} + +void register_node_type_sh_math(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_math_in, sh_node_math_out); + node_type_size(&ntype, 120, 110, 160); + node_type_label(&ntype, node_math_label); + node_type_storage(&ntype, "node_math", NULL, NULL); + node_type_exec(&ntype, node_shader_exec_math); + node_type_gpu(&ntype, gpu_shader_math); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/shader/nodes/node_shader_mixRgb.c b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c new file mode 100644 index 00000000000..a89faa66fc0 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c @@ -0,0 +1,91 @@ +/* + * $Id: SHD_mixRgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_mixRgb.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** MIX RGB ******************** */ +static bNodeSocketTemplate sh_node_mix_rgb_in[]= { + { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Color1", 0.5f, 0.5f, 0.5f, 1.0f}, + { SOCK_RGBA, 1, "Color2", 0.5f, 0.5f, 0.5f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate sh_node_mix_rgb_out[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void node_shader_exec_mix_rgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: fac, col1, col2 */ + /* stack order out: col */ + float col[3]; + float fac; + float vec[3]; + + nodestack_get_vec(&fac, SOCK_FLOAT, in[0]); + CLAMP(fac, 0.0f, 1.0f); + + nodestack_get_vec(col, SOCK_VECTOR, in[1]); + nodestack_get_vec(vec, SOCK_VECTOR, in[2]); + + ramp_blend(node->custom1, col, col+1, col+2, fac, vec); + VECCOPY(out[0]->vec, col); +} + +static int gpu_shader_mix_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + static const char *names[] = {"mix_blend", "mix_add", "mix_mult", "mix_sub", + "mix_screen", "mix_div", "mix_diff", "mix_dark", "mix_light", + "mix_overlay", "mix_dodge", "mix_burn", "mix_hue", "mix_sat", + "mix_val", "mix_color", "mix_soft", "mix_linear"}; + + return GPU_stack_link(mat, names[node->custom1], in, out); +} + + +void register_node_type_sh_mix_rgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_mix_rgb_in, sh_node_mix_rgb_out); + node_type_size(&ntype, 100, 60, 150); + node_type_label(&ntype, node_blend_label); + node_type_exec(&ntype, node_shader_exec_mix_rgb); + node_type_gpu(&ntype, gpu_shader_mix_rgb); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/shader/nodes/node_shader_normal.c b/source/blender/nodes/shader/nodes/node_shader_normal.c new file mode 100644 index 00000000000..099a9bed10d --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_normal.c @@ -0,0 +1,95 @@ +/* + * $Id: SHD_normal.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_normal.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** NORMAL ******************** */ +static bNodeSocketTemplate sh_node_normal_in[]= { + { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_normal_out[]= { + { SOCK_VECTOR, 0, "Normal"}, + { SOCK_FLOAT, 0, "Dot"}, + { -1, 0, "" } +}; + +static void node_shader_init_normal(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) +{ + bNodeSocket *sock= node->outputs.first; + bNodeSocketValueVector *dval= (bNodeSocketValueVector*)sock->default_value; + + /* output value is used for normal vector */ + dval->value[0] = 0.0f; + dval->value[1] = 0.0f; + dval->value[2] = 1.0f; +} + +/* generates normal, does dot product */ +static void node_shader_exec_normal(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + bNodeSocket *sock= node->outputs.first; + float vec[3]; + + /* stack order input: normal */ + /* stack order output: normal, value */ + + nodestack_get_vec(vec, SOCK_VECTOR, in[0]); + + VECCOPY(out[0]->vec, ((bNodeSocketValueVector*)sock->default_value)->value); + /* render normals point inside... the widget points outside */ + out[1]->vec[0]= -INPR(out[0]->vec, vec); +} + +static int gpu_shader_normal(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + bNodeSocket *sock= node->outputs.first; + GPUNodeLink *vec = GPU_uniform(((bNodeSocketValueVector*)sock->default_value)->value); + + return GPU_stack_link(mat, "normal", in, out, vec); +} + +void register_node_type_sh_normal(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_normal_in, sh_node_normal_out); + node_type_init(&ntype, node_shader_init_normal); + node_type_exec(&ntype, node_shader_exec_normal); + node_type_gpu(&ntype, gpu_shader_normal); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/shader/nodes/node_shader_output.c b/source/blender/nodes/shader/nodes/node_shader_output.c new file mode 100644 index 00000000000..638af7d4eb3 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_output.c @@ -0,0 +1,96 @@ +/* + * $Id: SHD_output.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_output.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** OUTPUT ******************** */ +static bNodeSocketTemplate sh_node_output_in[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { -1, 0, "" } +}; + +static void node_shader_exec_output(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) +{ + if(data) { + ShadeInput *shi= ((ShaderCallData *)data)->shi; + float col[4]; + + /* stack order input sockets: col, alpha, normal */ + nodestack_get_vec(col, SOCK_VECTOR, in[0]); + nodestack_get_vec(col+3, SOCK_FLOAT, in[1]); + + if(shi->do_preview) { + nodeAddToPreview(node, col, shi->xs, shi->ys, shi->do_manage); + node->lasty= shi->ys; + } + + if(node->flag & NODE_DO_OUTPUT) { + ShadeResult *shr= ((ShaderCallData *)data)->shr; + + QUATCOPY(shr->combined, col); + shr->alpha= col[3]; + + // VECCOPY(shr->nor, in[3]->vec); + } + } +} + +static int gpu_shader_output(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) +{ + GPUNodeLink *outlink; + + /*if(in[1].hasinput) + GPU_material_enable_alpha(mat);*/ + + GPU_stack_link(mat, "output_node", in, out, &outlink); + GPU_material_output_link(mat, outlink); + + return 1; +} + +void register_node_type_sh_output(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW); + node_type_socket_templates(&ntype, sh_node_output_in, NULL); + node_type_size(&ntype, 80, 60, 200); + node_type_exec(&ntype, node_shader_exec_output); + node_type_gpu(&ntype, gpu_shader_output); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/shader/nodes/node_shader_rgb.c b/source/blender/nodes/shader/nodes/node_shader_rgb.c new file mode 100644 index 00000000000..c9bb78b45dd --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_rgb.c @@ -0,0 +1,84 @@ +/* + * $Id: SHD_rgb.c 36481 2011-05-04 11:42:25Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_rgb.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** RGB ******************** */ +static bNodeSocketTemplate sh_node_rgb_out[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void node_shader_init_rgb(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) +{ + bNodeSocket *sock= node->outputs.first; + bNodeSocketValueRGBA *dval= (bNodeSocketValueRGBA*)sock->default_value; + /* uses the default value of the output socket, must be initialized here */ + dval->value[0] = 0.5f; + dval->value[1] = 0.5f; + dval->value[2] = 0.5f; + dval->value[3] = 1.0f; +} + +static void node_shader_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) +{ + bNodeSocket *sock= node->outputs.first; + float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value; + + VECCOPY(out[0]->vec, col); +} + +static int gpu_shader_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + bNodeSocket *sock= node->outputs.first; + float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value; + GPUNodeLink *vec = GPU_uniform(col); + + return GPU_stack_link(mat, "set_rgba", in, out, vec); +} + +void register_node_type_sh_rgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, sh_node_rgb_out); + node_type_init(&ntype, node_shader_init_rgb); + node_type_size(&ntype, 140, 80, 140); + node_type_exec(&ntype, node_shader_exec_rgb); + node_type_gpu(&ntype, gpu_shader_rgb); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c new file mode 100644 index 00000000000..9528aca2574 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c @@ -0,0 +1,112 @@ +/* + * + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Juho Vepsäläinen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_sepcombRGB.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** SEPARATE RGBA ******************** */ +static bNodeSocketTemplate sh_node_seprgb_in[]= { + { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate sh_node_seprgb_out[]= { + { SOCK_FLOAT, 0, "R"}, + { SOCK_FLOAT, 0, "G"}, + { SOCK_FLOAT, 0, "B"}, + { -1, 0, "" } +}; + +static void node_shader_exec_seprgb(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) +{ + out[0]->vec[0] = in[0]->vec[0]; + out[1]->vec[0] = in[0]->vec[1]; + out[2]->vec[0] = in[0]->vec[2]; +} + +static int gpu_shader_seprgb(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) +{ + return GPU_stack_link(mat, "separate_rgb", in, out); +} + +void register_node_type_sh_seprgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_SEPRGB, "Separate RGB", NODE_CLASS_CONVERTOR, 0); + node_type_socket_templates(&ntype, sh_node_seprgb_in, sh_node_seprgb_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_shader_exec_seprgb); + node_type_gpu(&ntype, gpu_shader_seprgb); + + nodeRegisterType(lb, &ntype); +} + + + +/* **************** COMBINE RGB ******************** */ +static bNodeSocketTemplate sh_node_combrgb_in[]= { + { SOCK_FLOAT, 1, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED}, + { SOCK_FLOAT, 1, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED}, + { SOCK_FLOAT, 1, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED}, + { -1, 0, "" } +}; +static bNodeSocketTemplate sh_node_combrgb_out[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void node_shader_exec_combrgb(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) +{ + out[0]->vec[0] = in[0]->vec[0]; + out[0]->vec[1] = in[1]->vec[0]; + out[0]->vec[2] = in[2]->vec[0]; +} + +static int gpu_shader_combrgb(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) +{ + return GPU_stack_link(mat, "combine_rgb", in, out); +} + +void register_node_type_sh_combrgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_COMBRGB, "Combine RGB", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_combrgb_in, sh_node_combrgb_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_shader_exec_combrgb); + node_type_gpu(&ntype, gpu_shader_combrgb); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/shader/nodes/node_shader_squeeze.c b/source/blender/nodes/shader/nodes/node_shader_squeeze.c new file mode 100644 index 00000000000..305639dff21 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_squeeze.c @@ -0,0 +1,81 @@ +/* + * $Id: SHD_squeeze.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_squeeze.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** VALUE SQUEEZE ******************** */ +static bNodeSocketTemplate sh_node_squeeze_in[]= { + { SOCK_FLOAT, 1, "Value", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Width", 1.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Center", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_squeeze_out[]= { + { SOCK_FLOAT, 0, "Value"}, + { -1, 0, "" } +}; + +static void node_shader_exec_squeeze(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, +bNodeStack **out) +{ + float vec[3]; + + nodestack_get_vec(vec, SOCK_FLOAT, in[0]); + nodestack_get_vec(vec+1, SOCK_FLOAT, in[1]); + nodestack_get_vec(vec+2, SOCK_FLOAT, in[2]); + + out[0]->vec[0] = 1.0f / (1.0f + pow(2.71828183,-((vec[0]-vec[2])*vec[1]))) ; +} + +static int gpu_shader_squeeze(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) +{ + return GPU_stack_link(mat, "squeeze", in, out); +} + +void register_node_type_sh_squeeze(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_squeeze_in, sh_node_squeeze_out); + node_type_size(&ntype, 120, 110, 160); + node_type_storage(&ntype, "node_squeeze", NULL, NULL); + node_type_exec(&ntype, node_shader_exec_squeeze); + node_type_gpu(&ntype, gpu_shader_squeeze); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/shader/nodes/node_shader_texture.c b/source/blender/nodes/shader/nodes/node_shader_texture.c new file mode 100644 index 00000000000..a4957d8f683 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_texture.c @@ -0,0 +1,149 @@ +/* + * $Id: SHD_texture.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_texture.c + * \ingroup shdnodes + */ + + +#include "DNA_texture_types.h" + +#include "node_shader_util.h" + +/* **************** TEXTURE ******************** */ +static bNodeSocketTemplate sh_node_texture_in[]= { + { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE}, /* no limit */ + { -1, 0, "" } +}; +static bNodeSocketTemplate sh_node_texture_out[]= { + { SOCK_FLOAT, 0, "Value"}, + { SOCK_RGBA , 0, "Color"}, + { SOCK_VECTOR, 0, "Normal"}, + { -1, 0, "" } +}; + +static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + if(data && node->id) { + ShadeInput *shi= ((ShaderCallData *)data)->shi; + TexResult texres; + float vec[3], nor[3]={0.0f, 0.0f, 0.0f}; + int retval; + short which_output = node->custom1; + + short thread = shi->thread; + + /* out: value, color, normal */ + + /* we should find out if a normal as output is needed, for now we do all */ + texres.nor= nor; + texres.tr= texres.tg= texres.tb= 0.0f; + + if(in[0]->hasinput) { + nodestack_get_vec(vec, SOCK_VECTOR, in[0]); + + if(in[0]->datatype==NS_OSA_VECTORS) { + float *fp= in[0]->data; + retval= multitex_nodes((Tex *)node->id, vec, fp, fp+3, shi->osatex, &texres, thread, which_output, NULL, NULL); + } + else if(in[0]->datatype==NS_OSA_VALUES) { + float *fp= in[0]->data; + float dxt[3], dyt[3]; + + dxt[0]= fp[0]; dxt[1]= dxt[2]= 0.0f; + dyt[0]= fp[1]; dyt[1]= dyt[2]= 0.0f; + retval= multitex_nodes((Tex *)node->id, vec, dxt, dyt, shi->osatex, &texres, thread, which_output, NULL, NULL); + } + else + retval= multitex_nodes((Tex *)node->id, vec, NULL, NULL, 0, &texres, thread, which_output, NULL, NULL); + } + else { + VECCOPY(vec, shi->lo); + retval= multitex_nodes((Tex *)node->id, vec, NULL, NULL, 0, &texres, thread, which_output, NULL, NULL); + } + + /* stupid exception */ + if( ((Tex *)node->id)->type==TEX_STUCCI) { + texres.tin= 0.5f + 0.7f*texres.nor[0]; + CLAMP(texres.tin, 0.0f, 1.0f); + } + + /* intensity and color need some handling */ + if(texres.talpha) + out[0]->vec[0]= texres.ta; + else + out[0]->vec[0]= texres.tin; + + if((retval & TEX_RGB)==0) { + out[1]->vec[0]= out[0]->vec[0]; + out[1]->vec[1]= out[0]->vec[0]; + out[1]->vec[2]= out[0]->vec[0]; + out[1]->vec[3]= 1.0f; + } + else { + out[1]->vec[0]= texres.tr; + out[1]->vec[1]= texres.tg; + out[1]->vec[2]= texres.tb; + out[1]->vec[3]= 1.0f; + } + + VECCOPY(out[2]->vec, nor); + + if(shi->do_preview) + nodeAddToPreview(node, out[1]->vec, shi->xs, shi->ys, shi->do_manage); + + } +} + +static int gpu_shader_texture(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + Tex *tex = (Tex*)node->id; + + if(tex && tex->type == TEX_IMAGE && tex->ima) { + GPUNodeLink *texlink = GPU_image(tex->ima, NULL); + return GPU_stack_link(mat, "texture_image", in, out, texlink); + } + else + return 0; +} + +void register_node_type_sh_texture(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW); + node_type_socket_templates(&ntype, sh_node_texture_in, sh_node_texture_out); + node_type_size(&ntype, 120, 80, 240); + node_type_exec(&ntype, node_shader_exec_texture); + node_type_gpu(&ntype, gpu_shader_texture); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c new file mode 100644 index 00000000000..9353143095a --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c @@ -0,0 +1,129 @@ +/* + * $Id: SHD_valToRgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_valToRgb.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** VALTORGB ******************** */ +static bNodeSocketTemplate sh_node_valtorgb_in[]= { + { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { -1, 0, "" } +}; +static bNodeSocketTemplate sh_node_valtorgb_out[]= { + { SOCK_RGBA, 0, "Color"}, + { SOCK_FLOAT, 0, "Alpha"}, + { -1, 0, "" } +}; + +static void node_shader_exec_valtorgb(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + /* stack order in: fac */ + /* stack order out: col, alpha */ + + if(node->storage) { + float fac; + nodestack_get_vec(&fac, SOCK_FLOAT, in[0]); + + do_colorband(node->storage, fac, out[0]->vec); + out[1]->vec[0]= out[0]->vec[3]; + } +} + +static void node_shader_init_valtorgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= add_colorband(1); +} + +static int gpu_shader_valtorgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + float *array; + int size; + + colorband_table_RGBA(node->storage, &array, &size); + return GPU_stack_link(mat, "valtorgb", in, out, GPU_texture(size, array)); +} + +void register_node_type_sh_valtorgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_valtorgb_in, sh_node_valtorgb_out); + node_type_size(&ntype, 240, 200, 300); + node_type_init(&ntype, node_shader_init_valtorgb); + node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_shader_exec_valtorgb); + node_type_gpu(&ntype, gpu_shader_valtorgb); + + nodeRegisterType(lb, &ntype); +} + + +/* **************** RGBTOBW ******************** */ +static bNodeSocketTemplate sh_node_rgbtobw_in[]= { + { SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate sh_node_rgbtobw_out[]= { + { SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + + +static void node_shader_exec_rgbtobw(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **in, bNodeStack **out) +{ + /* stack order out: bw */ + /* stack order in: col */ + + out[0]->vec[0]= in[0]->vec[0]*0.35f + in[0]->vec[1]*0.45f + in[0]->vec[2]*0.2f; +} + +static int gpu_shader_rgbtobw(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out) +{ + return GPU_stack_link(mat, "rgbtobw", in, out); +} + +void register_node_type_sh_rgbtobw(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0); + node_type_socket_templates(&ntype, sh_node_rgbtobw_in, sh_node_rgbtobw_out); + node_type_size(&ntype, 80, 40, 120); + node_type_exec(&ntype, node_shader_exec_rgbtobw); + node_type_gpu(&ntype, gpu_shader_rgbtobw); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/shader/nodes/node_shader_value.c b/source/blender/nodes/shader/nodes/node_shader_value.c new file mode 100644 index 00000000000..21ff565306d --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_value.c @@ -0,0 +1,82 @@ +/* + * $Id: SHD_value.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_value.c + * \ingroup shdnodes + */ + + +#include "node_shader_util.h" + +/* **************** VALUE ******************** */ +static bNodeSocketTemplate sh_node_value_out[]= { + { SOCK_FLOAT, 0, "Value"}, + { -1, 0, "" } +}; + +static void node_shader_init_value(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp)) +{ + bNodeSocket *sock= node->outputs.first; + bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value; + /* uses the default value of the output socket, must be initialized here */ + dval->value = 0.5f; +} + +static void node_shader_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) +{ + bNodeSocket *sock= node->outputs.first; + float val= ((bNodeSocketValueFloat*)sock->default_value)->value; + + out[0]->vec[0]= val; +} + +static int gpu_shader_value(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + bNodeSocket *sock= node->outputs.first; + float *val= &((bNodeSocketValueFloat*)sock->default_value)->value; + GPUNodeLink *vec = GPU_uniform(val); + + return GPU_stack_link(mat, "set_value", in, out, vec); +} + +void register_node_type_sh_value(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, sh_node_value_out); + node_type_init(&ntype, node_shader_init_value); + node_type_size(&ntype, 80, 50, 120); + node_type_exec(&ntype, node_shader_exec_value); + node_type_gpu(&ntype, gpu_shader_value); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/shader/nodes/node_shader_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c new file mode 100644 index 00000000000..c6a081431a2 --- /dev/null +++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c @@ -0,0 +1,150 @@ +/* + * $Id: SHD_vectMath.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/shader/nodes/node_shader_vectMath.c + * \ingroup shdnodes + */ + + + +#include "node_shader_util.h" + + +/* **************** VECTOR MATH ******************** */ +static bNodeSocketTemplate sh_node_vect_math_in[]= { + { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate sh_node_vect_math_out[]= { + { SOCK_VECTOR, 0, "Vector"}, + { SOCK_FLOAT, 0, "Value"}, + { -1, 0, "" } +}; + +static void node_shader_exec_vect_math(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) +{ + float vec1[3], vec2[3]; + + nodestack_get_vec(vec1, SOCK_VECTOR, in[0]); + nodestack_get_vec(vec2, SOCK_VECTOR, in[1]); + + if(node->custom1 == 0) { /* Add */ + out[0]->vec[0]= vec1[0] + vec2[0]; + out[0]->vec[1]= vec1[1] + vec2[1]; + out[0]->vec[2]= vec1[2] + vec2[2]; + + out[1]->vec[0]= (fabs(out[0]->vec[0]) + fabs(out[0]->vec[0]) + fabs(out[0]->vec[0])) / 3; + } + else if(node->custom1 == 1) { /* Subtract */ + out[0]->vec[0]= vec1[0] - vec2[0]; + out[0]->vec[1]= vec1[1] - vec2[1]; + out[0]->vec[2]= vec1[2] - vec2[2]; + + out[1]->vec[0]= (fabs(out[0]->vec[0]) + fabs(out[0]->vec[0]) + fabs(out[0]->vec[0])) / 3; + } + else if(node->custom1 == 2) { /* Average */ + out[0]->vec[0]= vec1[0] + vec2[0]; + out[0]->vec[1]= vec1[1] + vec2[1]; + out[0]->vec[2]= vec1[2] + vec2[2]; + + out[1]->vec[0] = normalize_v3( out[0]->vec ); + } + else if(node->custom1 == 3) { /* Dot product */ + out[1]->vec[0]= (vec1[0] * vec2[0]) + (vec1[1] * vec2[1]) + (vec1[2] * vec2[2]); + } + else if(node->custom1 == 4) { /* Cross product */ + out[0]->vec[0]= (vec1[1] * vec2[2]) - (vec1[2] * vec2[1]); + out[0]->vec[1]= (vec1[2] * vec2[0]) - (vec1[0] * vec2[2]); + out[0]->vec[2]= (vec1[0] * vec2[1]) - (vec1[1] * vec2[0]); + + out[1]->vec[0] = normalize_v3( out[0]->vec ); + } + else if(node->custom1 == 5) { /* Normalize */ + if(in[0]->hasinput || !in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */ + out[0]->vec[0]= vec1[0]; + out[0]->vec[1]= vec1[1]; + out[0]->vec[2]= vec1[2]; + } + else { + out[0]->vec[0]= vec2[0]; + out[0]->vec[1]= vec2[1]; + out[0]->vec[2]= vec2[2]; + } + + out[1]->vec[0] = normalize_v3( out[0]->vec ); + } + +} + +static int gpu_shader_vect_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out) +{ + static const char *names[] = {"vec_math_add", "vec_math_sub", + "vec_math_average", "vec_math_dot", "vec_math_cross", + "vec_math_normalize"}; + + switch (node->custom1) { + case 0: + case 1: + case 2: + case 3: + case 4: + GPU_stack_link(mat, names[node->custom1], NULL, out, + GPU_socket(&in[0]), GPU_socket(&in[1])); + break; + case 5: + if(in[0].hasinput || !in[1].hasinput) + GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[0])); + else + GPU_stack_link(mat, names[node->custom1], NULL, out, GPU_socket(&in[1])); + break; + default: + return 0; + } + + return 1; +} + +void register_node_type_sh_vect_math(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_VECT_MATH, "Vector Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, sh_node_vect_math_in, sh_node_vect_math_out); + node_type_size(&ntype, 80, 75, 140); + node_type_label(&ntype, node_vect_math_label); + node_type_storage(&ntype, "node_vect_math", NULL, NULL); + node_type_exec(&ntype, node_shader_exec_vect_math); + node_type_gpu(&ntype, gpu_shader_vect_math); + + nodeRegisterType(lb, &ntype); +} + + diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c new file mode 100644 index 00000000000..75a57c64f2f --- /dev/null +++ b/source/blender/nodes/texture/node_texture_tree.c @@ -0,0 +1,237 @@ +/** + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/node_texture_tree.c + * \ingroup nodes + */ + + +#include + +#include "DNA_texture_types.h" +#include "DNA_node_types.h" + +#include "BLI_listbase.h" +#include "BLI_threads.h" +#include "BLI_utildefines.h" + +#include "BKE_global.h" +#include "BKE_main.h" +#include "BKE_node.h" + +#include "node_exec.h" +#include "node_util.h" +#include "NOD_texture.h" +#include "node_texture_util.h" + +#include "RE_pipeline.h" +#include "RE_shader_ext.h" + + +static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func) +{ + Tex *tx; + for(tx= main->tex.first; tx; tx= tx->id.next) { + if(tx->nodetree) { + func(calldata, &tx->id, tx->nodetree); + } + } +} + +static void local_sync(bNodeTree *localtree, bNodeTree *ntree) +{ + bNode *lnode; + + /* copy over contents of previews */ + for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) { + if(ntreeNodeExists(ntree, lnode->new_node)) { + bNode *node= lnode->new_node; + + if(node->preview && node->preview->rect) { + if(lnode->preview && lnode->preview->rect) { + int xsize= node->preview->xsize; + int ysize= node->preview->ysize; + memcpy(node->preview->rect, lnode->preview->rect, 4*xsize + xsize*ysize*sizeof(char)*4); + } + } + } + } +} + +bNodeTreeType ntreeType_Texture = { + /* type */ NTREE_TEXTURE, + /* id_name */ "NTTexture Nodetree", + + /* node_types */ { NULL, NULL }, + + /* free_cache */ NULL, + /* free_node_cache */ NULL, + /* foreach_nodetree */ foreach_nodetree, + /* localize */ NULL, + /* local_sync */ local_sync, + /* local_merge */ NULL, + /* update */ NULL, + /* update_node */ NULL +}; + +int ntreeTexTagAnimated(bNodeTree *ntree) +{ + bNode *node; + + if(ntree==NULL) return 0; + + for(node= ntree->nodes.first; node; node= node->next) { + if(node->type==TEX_NODE_CURVE_TIME) { + NodeTagChanged(ntree, node); + return 1; + } + else if(node->type==NODE_GROUP) { + if( ntreeTexTagAnimated((bNodeTree *)node->id) ) { + return 1; + } + } + } + + return 0; +} + +bNodeTreeExec *ntreeTexBeginExecTree(bNodeTree *ntree) +{ + bNodeTreeExec *exec; + bNode *node; + + /* XXX hack: prevent exec data from being generated twice. + * this should be handled by the renderer! + */ + if (ntree->execdata) + return ntree->execdata; + + /* common base initialization */ + exec = ntree_exec_begin(ntree); + + /* allocate the thread stack listbase array */ + exec->threadstack= MEM_callocN(BLENDER_MAX_THREADS*sizeof(ListBase), "thread stack array"); + + for(node= exec->nodetree->nodes.first; node; node= node->next) + node->need_exec= 1; + + /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, + * which only store the ntree pointer. Should be fixed at some point! + */ + ntree->execdata = exec; + + return exec; +} + +/* free texture delegates */ +static void tex_free_delegates(bNodeTreeExec *exec) +{ + bNodeThreadStack *nts; + bNodeStack *ns; + int th, a; + + for(th=0; ththreadstack[th].first; nts; nts=nts->next) + for(ns= nts->stack, a=0; astacksize; a++, ns++) + if(ns->data && !ns->is_copy) + MEM_freeN(ns->data); +} + +void ntreeTexEndExecTree(bNodeTreeExec *exec) +{ + if(exec) { + bNodeTree *ntree= exec->nodetree; + bNodeThreadStack *nts; + int a; + + if(exec->threadstack) { + tex_free_delegates(exec); + + for(a=0; athreadstack[a].first; nts; nts=nts->next) + if (nts->stack) MEM_freeN(nts->stack); + BLI_freelistN(&exec->threadstack[a]); + } + + MEM_freeN(exec->threadstack); + exec->threadstack= NULL; + } + + ntree_exec_end(exec); + + /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ + ntree->execdata = NULL; + } +} + +int ntreeTexExecTree( + bNodeTree *nodes, + TexResult *texres, + float *co, + float *dxt, float *dyt, + int osatex, + short thread, + Tex *UNUSED(tex), + short which_output, + int cfra, + int preview, + ShadeInput *shi, + MTex *mtex +){ + TexCallData data; + float *nor= texres->nor; + int retval = TEX_INT; + bNodeThreadStack *nts = NULL; + bNodeTreeExec *exec= nodes->execdata; + + data.co = co; + data.dxt = dxt; + data.dyt = dyt; + data.osatex = osatex; + data.target = texres; + data.do_preview = preview; + data.thread = thread; + data.which_output = which_output; + data.cfra= cfra; + data.mtex= mtex; + data.shi= shi; + + if (!exec) + exec = ntreeTexBeginExecTree(nodes); + + nts= ntreeGetThreadStack(exec, thread); + ntreeExecThreadNodes(exec, nts, &data, thread); + ntreeReleaseThreadStack(nts); + + if(texres->nor) retval |= TEX_NOR; + retval |= TEX_RGB; + /* confusing stuff; the texture output node sets this to NULL to indicate no normal socket was set + however, the texture code checks this for other reasons (namely, a normal is required for material) */ + texres->nor= nor; + + return retval; +} diff --git a/source/blender/nodes/texture/node_texture_util.c b/source/blender/nodes/texture/node_texture_util.c new file mode 100644 index 00000000000..5aedd8681ab --- /dev/null +++ b/source/blender/nodes/texture/node_texture_util.c @@ -0,0 +1,172 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/node_texture_util.c + * \ingroup nodes + */ + + +/* + HOW TEXTURE NODES WORK + + In contrast to Shader nodes, which place a color into the output + stack when executed, Texture nodes place a TexDelegate* there. To + obtain a color value from this, a node further up the chain reads + the TexDelegate* from its input stack, and uses tex_call_delegate to + retrieve the color from the delegate. + + comments: (ton) + + This system needs recode, a node system should rely on the stack, and + callbacks for nodes only should evaluate own node, not recursively go + over other previous ones. +*/ + +#include +#include "node_texture_util.h" + +#define PREV_RES 128 /* default preview resolution */ + +static void tex_call_delegate(TexDelegate *dg, float *out, TexParams *params, short thread) +{ + if(dg->node->need_exec) { + dg->fn(out, params, dg->node, dg->in, thread); + + if(dg->cdata->do_preview) + tex_do_preview(dg->node, params->previewco, out); + } +} + +static void tex_input(float *out, int sz, bNodeStack *in, TexParams *params, short thread) +{ + TexDelegate *dg = in->data; + if(dg) { + tex_call_delegate(dg, in->vec, params, thread); + + if(in->hasoutput && in->sockettype == SOCK_FLOAT) + in->vec[1] = in->vec[2] = in->vec[0]; + } + memcpy(out, in->vec, sz * sizeof(float)); +} + +void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread) +{ + tex_input(out, 3, in, params, thread); +} + +void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread) +{ + tex_input(out, 4, in, params, thread); + + if(in->hasoutput && in->sockettype == SOCK_FLOAT) + { + out[1] = out[2] = out[0]; + out[3] = 1; + } + + if(in->hasoutput && in->sockettype == SOCK_VECTOR) { + out[0] = out[0] * .5f + .5f; + out[1] = out[1] * .5f + .5f; + out[2] = out[2] * .5f + .5f; + out[3] = 1; + } +} + +float tex_input_value(bNodeStack *in, TexParams *params, short thread) +{ + float out[4]; + tex_input_vec(out, in, params, thread); + return out[0]; +} + +void params_from_cdata(TexParams *out, TexCallData *in) +{ + out->co = in->co; + out->dxt = in->dxt; + out->dyt = in->dyt; + out->previewco = in->co; + out->osatex = in->osatex; + out->cfra = in->cfra; + out->shi = in->shi; + out->mtex = in->mtex; +} + +void tex_do_preview(bNode *node, float *co, float *col) +{ + bNodePreview *preview= node->preview; + + if(preview) { + int xs= ((co[0] + 1.0f)*0.5f)*preview->xsize; + int ys= ((co[1] + 1.0f)*0.5f)*preview->ysize; + + nodeAddToPreview(node, col, xs, ys, 0); /* 0 = no color management */ + } +} + +void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata) +{ + TexDelegate *dg; + if(!out->data) + /* Freed in tex_end_exec (node.c) */ + dg = out->data = MEM_mallocN(sizeof(TexDelegate), "tex delegate"); + else + dg = out->data; + + dg->cdata= cdata; + dg->fn = texfn; + dg->node = node; + memcpy(dg->in, in, MAX_SOCKET * sizeof(bNodeStack*)); + dg->type = out->sockettype; +} + +void ntreeTexCheckCyclics(struct bNodeTree *ntree) +{ + bNode *node; + for(node= ntree->nodes.first; node; node= node->next) { + + if(node->type == TEX_NODE_TEXTURE && node->id) + { + /* custom2 stops the node from rendering */ + if(node->custom1) { + node->custom2 = 1; + node->custom1 = 0; + } else { + Tex *tex = (Tex *)node->id; + + node->custom2 = 0; + + node->custom1 = 1; + if(tex->use_nodes && tex->nodetree) { + ntreeTexCheckCyclics(tex->nodetree); + } + node->custom1 = 0; + } + } + + } +} diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h new file mode 100644 index 00000000000..867b4142052 --- /dev/null +++ b/source/blender/nodes/texture/node_texture_util.h @@ -0,0 +1,123 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/node_texture_util.h + * \ingroup nodes + */ + + +#ifndef NODE_TEXTURE_UTIL_H_ +#define NODE_TEXTURE_UTIL_H_ + +#include +#include + +#include "MEM_guardedalloc.h" + +#include "DNA_color_types.h" +#include "DNA_ipo_types.h" +#include "DNA_ID.h" +#include "DNA_image_types.h" +#include "DNA_material_types.h" +#include "DNA_node_types.h" +#include "DNA_object_types.h" +#include "DNA_scene_types.h" +#include "DNA_texture_types.h" + +#include "BKE_blender.h" +#include "BKE_colortools.h" +#include "BKE_global.h" +#include "BKE_image.h" +#include "BKE_main.h" +#include "BKE_material.h" +#include "BKE_node.h" +#include "BKE_texture.h" + +#include "BKE_library.h" + +#include "node_util.h" + +#include "BLI_math.h" +#include "BLI_blenlib.h" +#include "BLI_rand.h" +#include "BLI_threads.h" +#include "BLI_utildefines.h" + +#include "IMB_imbuf_types.h" +#include "IMB_imbuf.h" + +#include "RE_pipeline.h" +#include "RE_shader_ext.h" + +typedef struct TexCallData { + TexResult *target; + float *co; + float *dxt, *dyt; + int osatex; + char do_preview; + short thread; + short which_output; + int cfra; + + ShadeInput *shi; + MTex *mtex; +} TexCallData; + +typedef struct TexParams { + float *co; + float *dxt, *dyt; + float *previewco; + int cfra; + int osatex; + + /* optional. we don't really want these here, but image + textures need to do mapping & color correction */ + ShadeInput *shi; + MTex *mtex; +} TexParams; + +typedef void(*TexFn) (float *out, TexParams *params, bNode *node, bNodeStack **in, short thread); + +typedef struct TexDelegate { + TexCallData *cdata; + TexFn fn; + bNode *node; + bNodeStack *in[MAX_SOCKET]; + int type; +} TexDelegate; + +void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread); +void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread); +float tex_input_value(bNodeStack *in, TexParams *params, short thread); + +void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *data); +void tex_do_preview(bNode *node, float *coord, float *col); + +void params_from_cdata(TexParams *out, TexCallData *in); + +#endif diff --git a/source/blender/nodes/texture/nodes/node_texture_at.c b/source/blender/nodes/texture/nodes/node_texture_at.c new file mode 100644 index 00000000000..f3275f2bcdf --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_at.c @@ -0,0 +1,72 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): R Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_at.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Texture", 0.0f, 0.0f, 0.0f, 1.0f }, + { SOCK_VECTOR, 1, "Coordinates", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE }, + { -1, 0, "" } +}; +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Texture" }, + { -1, 0, "" } +}; + +static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + TexParams np = *p; + float new_co[3]; + np.co = new_co; + + tex_input_vec(new_co, in[1], p, thread); + tex_input_rgba(out, in[0], &np, thread); +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_at(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_AT, "At", NODE_CLASS_DISTORT, 0); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_bricks.c b/source/blender/nodes/texture/nodes/node_texture_bricks.c new file mode 100644 index 00000000000..060ed791871 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_bricks.c @@ -0,0 +1,134 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_bricks.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +#include + +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Bricks 1", 0.596f, 0.282f, 0.0f, 1.0f }, + { SOCK_RGBA, 1, "Bricks 2", 0.632f, 0.504f, 0.05f, 1.0f }, + { SOCK_RGBA, 1, "Mortar", 0.0f, 0.0f, 0.0f, 1.0f }, + { SOCK_FLOAT, 1, "Thickness", 0.02f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Bias", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE }, + { SOCK_FLOAT, 1, "Brick Width", 0.5f, 0.0f, 0.0f, 0.0f, 0.001f, 99.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Row Height", 0.25f, 0.0f, 0.0f, 0.0f, 0.001f, 99.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->custom3 = 0.5; /* offset */ + node->custom4 = 1.0; /* squash */ +} + +static float noise(int n) /* fast integer noise */ +{ + int nn; + n = (n >> 13) ^ n; + nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff; + return 0.5f * ((float)nn / 1073741824.0f); +} + +static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +{ + float *co = p->co; + + float x = co[0]; + float y = co[1]; + + int bricknum, rownum; + float offset = 0; + float ins_x, ins_y; + float tint; + + float bricks1[4]; + float bricks2[4]; + float mortar[4]; + + float mortar_thickness = tex_input_value(in[3], p, thread); + float bias = tex_input_value(in[4], p, thread); + float brick_width = tex_input_value(in[5], p, thread); + float row_height = tex_input_value(in[6], p, thread); + + tex_input_rgba(bricks1, in[0], p, thread); + tex_input_rgba(bricks2, in[1], p, thread); + tex_input_rgba(mortar, in[2], p, thread); + + rownum = (int)floor(y / row_height); + + if( node->custom1 && node->custom2 ) { + brick_width *= ((int)(rownum) % node->custom2 ) ? 1.0f : node->custom4; /* squash */ + offset = ((int)(rownum) % node->custom1 ) ? 0 : (brick_width*node->custom3); /* offset */ + } + + bricknum = (int)floor((x+offset) / brick_width); + + ins_x = (x+offset) - brick_width*bricknum; + ins_y = y - row_height*rownum; + + tint = noise((rownum << 16) + (bricknum & 0xFFFF)) + bias; + CLAMP(tint,0.0f,1.0f); + + if( ins_x < mortar_thickness || ins_y < mortar_thickness || + ins_x > (brick_width - mortar_thickness) || + ins_y > (row_height - mortar_thickness) ) { + QUATCOPY( out, mortar ); + } else { + QUATCOPY( out, bricks1 ); + ramp_blend( MA_RAMP_BLEND, out, out+1, out+2, tint, bricks2 ); + } +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_bricks(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_BRICKS, "Bricks", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 150, 60, 150); + node_type_init(&ntype, init); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_checker.c b/source/blender/nodes/texture/nodes/node_texture_checker.c new file mode 100644 index 00000000000..916ee80d66b --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_checker.c @@ -0,0 +1,83 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_checker.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" +#include + +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Color1", 1.0f, 0.0f, 0.0f, 1.0f }, + { SOCK_RGBA, 1, "Color2", 1.0f, 1.0f, 1.0f, 1.0f }, + { SOCK_FLOAT, 1, "Size", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 100.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color" }, + { -1, 0, "" } +}; + +static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + float x = p->co[0]; + float y = p->co[1]; + float z = p->co[2]; + float sz = tex_input_value(in[2], p, thread); + + /* 0.00001 because of unit sized stuff */ + int xi = (int)fabs(floor(0.00001f + x / sz)); + int yi = (int)fabs(floor(0.00001f + y / sz)); + int zi = (int)fabs(floor(0.00001f + z / sz)); + + if( (xi % 2 == yi % 2) == (zi % 2) ) { + tex_input_rgba(out, in[0], p, thread); + } else { + tex_input_rgba(out, in[1], p, thread); + } +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_checker(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_CHECKER, "Checker", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 100, 60, 150); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c new file mode 100644 index 00000000000..cb5102bae4e --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_common.c @@ -0,0 +1,271 @@ +/* + * $Id: CMP_blur.c 35562 2011-03-15 20:10:32Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Campbell Barton, Alfredo de Greef, David Millan Escriva, + * Juho Vepsäläinen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_common.c + * \ingroup texnodes + */ + + +#include "DNA_node_types.h" + +#include "BKE_node.h" + +#include "node_texture_util.h" +#include "node_common.h" +#include "node_exec.h" + +static void copy_stack(bNodeStack *to, bNodeStack *from) +{ + if (to != from) { + copy_v4_v4(to->vec, from->vec); + to->data = from->data; + to->datatype = from->datatype; + + /* tag as copy to prevent freeing */ + to->is_copy = 1; + } +} + +/**** GROUP ****/ + +static void *group_initexec(bNode *node) +{ + bNodeTree *ngroup= (bNodeTree*)node->id; + void *exec; + + /* initialize the internal node tree execution */ + exec = ntreeTexBeginExecTree(ngroup); + + return exec; +} + +static void group_freeexec(bNode *UNUSED(node), void *nodedata) +{ + bNodeTreeExec*gexec= (bNodeTreeExec*)nodedata; + + ntreeTexEndExecTree(gexec); +} + +/* Copy inputs to the internal stack. + * This is a shallow copy, no buffers are duplicated here! + */ +static void group_copy_inputs(bNode *node, bNodeStack **in, bNodeStack *gstack) +{ + bNodeSocket *sock; + bNodeStack *ns; + int a; + for (sock=node->inputs.first, a=0; sock; sock=sock->next, ++a) { + if (sock->groupsock) { + ns = node_get_socket_stack(gstack, sock->groupsock); + copy_stack(ns, in[a]); + } + } +} + +/* Copy internal results to the external outputs. + */ +static void group_copy_outputs(bNode *node, bNodeStack **out, bNodeStack *gstack) +{ + bNodeSocket *sock; + bNodeStack *ns; + int a; + for (sock=node->outputs.first, a=0; sock; sock=sock->next, ++a) { + if (sock->groupsock) { + ns = node_get_socket_stack(gstack, sock->groupsock); + copy_stack(out[a], ns); + } + } +} + +static void group_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + bNodeThreadStack *nts; + + /* XXX same behavior as trunk: all nodes inside group are executed. + * it's stupid, but just makes it work. compo redesign will do this better. + */ + { + bNode *inode; + for (inode=exec->nodetree->nodes.first; inode; inode=inode->next) + inode->need_exec = 1; + } + + nts = ntreeGetThreadStack(exec, thread); + + group_copy_inputs(node, in, nts->stack); + ntreeExecThreadNodes(exec, nts, data, thread); + group_copy_outputs(node, out, nts->stack); + + ntreeReleaseThreadStack(nts); +} + +void register_node_type_tex_group(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT); + node_type_socket_templates(&ntype, NULL, NULL); + node_type_size(&ntype, 120, 60, 200); + node_type_label(&ntype, node_group_label); + node_type_init(&ntype, node_group_init); + node_type_valid(&ntype, node_group_valid); + node_type_template(&ntype, node_group_template); + node_type_update(&ntype, NULL, node_group_verify); + node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear); + node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute); + + nodeRegisterType(lb, &ntype); +} + + +/**** FOR LOOP ****/ + +#if 0 /* XXX loop nodes don't work nicely with current trees */ +static void forloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + bNodeThreadStack *nts; + int iterations= (int)in[0]->vec[0]; + bNodeSocket *sock; + bNodeStack *ns; + int iteration; + + /* XXX same behavior as trunk: all nodes inside group are executed. + * it's stupid, but just makes it work. compo redesign will do this better. + */ + { + bNode *inode; + for (inode=exec->nodetree->nodes.first; inode; inode=inode->next) + inode->need_exec = 1; + } + + nts = ntreeGetThreadStack(exec, thread); + + /* "Iteration" socket */ + sock = exec->nodetree->inputs.first; + ns = node_get_socket_stack(nts->stack, sock); + +// group_copy_inputs(node, in, nts->stack); + for (iteration=0; iteration < iterations; ++iteration) { + /* first input contains current iteration counter */ + ns->vec[0] = (float)iteration; + ns->vec[1]=ns->vec[2]=ns->vec[3] = 0.0f; + +// if (iteration > 0) +// loop_init_iteration(exec->nodetree, nts->stack); +// ntreeExecThreadNodes(exec, nts, data, thread); + } +// loop_copy_outputs(node, in, out, exec->stack); + + ntreeReleaseThreadStack(nts); +} + +void register_node_type_tex_forloop(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, NULL); + node_type_size(&ntype, 120, 60, 200); + node_type_label(&ntype, node_group_label); + node_type_init(&ntype, node_forloop_init); + node_type_valid(&ntype, node_group_valid); + node_type_template(&ntype, node_forloop_template); + node_type_update(&ntype, NULL, node_group_verify); + node_type_tree(&ntype, node_forloop_init_tree, node_loop_update_tree); + node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear); + node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute); + + nodeRegisterType(lb, &ntype); +} +#endif + +/**** WHILE LOOP ****/ + +#if 0 /* XXX loop nodes don't work nicely with current trees */ +static void whileloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out) +{ + bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + bNodeThreadStack *nts; + int condition= (in[0]->vec[0] > 0.0f); + bNodeSocket *sock; + bNodeStack *ns; + int iteration; + + /* XXX same behavior as trunk: all nodes inside group are executed. + * it's stupid, but just makes it work. compo redesign will do this better. + */ + { + bNode *inode; + for (inode=exec->nodetree->nodes.first; inode; inode=inode->next) + inode->need_exec = 1; + } + + nts = ntreeGetThreadStack(exec, thread); + + /* "Condition" socket */ + sock = exec->nodetree->outputs.first; + ns = node_get_socket_stack(nts->stack, sock); + + iteration = 0; +// group_copy_inputs(node, in, nts->stack); + while (condition && iteration < node->custom1) { +// if (iteration > 0) +// loop_init_iteration(exec->nodetree, nts->stack); +// ntreeExecThreadNodes(exec, nts, data, thread); + + condition = (ns->vec[0] > 0.0f); + ++iteration; + } +// loop_copy_outputs(node, in, out, exec->stack); + + ntreeReleaseThreadStack(nts); +} + +void register_node_type_tex_whileloop(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, NULL); + node_type_size(&ntype, 120, 60, 200); + node_type_label(&ntype, node_group_label); + node_type_init(&ntype, node_whileloop_init); + node_type_valid(&ntype, node_group_valid); + node_type_template(&ntype, node_whileloop_template); + node_type_update(&ntype, NULL, node_group_verify); + node_type_tree(&ntype, node_whileloop_init_tree, node_loop_update_tree); + node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear); + node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute); + + nodeRegisterType(lb, &ntype); +} +#endif diff --git a/source/blender/nodes/texture/nodes/node_texture_compose.c b/source/blender/nodes/texture/nodes/node_texture_compose.c new file mode 100644 index 00000000000..a11769173a3 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_compose.c @@ -0,0 +1,71 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_compose.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +static bNodeSocketTemplate inputs[]= { + { SOCK_FLOAT, 1, "Red", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Green", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Blue", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color" }, + { -1, 0, "" } +}; + +static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + int i; + for(i = 0; i < 4; i++) + out[i] = tex_input_value(in[i], p, thread); +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_compose(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_COMPOSE, "Compose RGBA", NODE_CLASS_OP_COLOR, 0); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 100, 60, 150); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_coord.c b/source/blender/nodes/texture/nodes/node_texture_coord.c new file mode 100644 index 00000000000..b2d9cecc164 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_coord.c @@ -0,0 +1,65 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Mathias Panzenböck (panzi) . + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_coord.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +static bNodeSocketTemplate outputs[]= { + { SOCK_VECTOR, 0, "Coordinates" }, + { -1, 0, "" } +}; + +static void vectorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **UNUSED(in), short UNUSED(thread)) +{ + out[0] = p->co[0]; + out[1] = p->co[1]; + out[2] = p->co[2]; +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &vectorfn, data); +} + +void register_node_type_tex_coord(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, outputs); + node_type_size(&ntype, 120, 110, 160); + node_type_storage(&ntype, "node_coord", NULL, NULL); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_curves.c b/source/blender/nodes/texture/nodes/node_texture_curves.c new file mode 100644 index 00000000000..af6d880cc18 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_curves.c @@ -0,0 +1,127 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_curves.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +/* **************** CURVE Time ******************** */ + +/* custom1 = sfra, custom2 = efra */ +static bNodeSocketTemplate time_outputs[]= { + { SOCK_FLOAT, 0, "Value" }, + { -1, 0, "" } +}; + +static void time_colorfn(float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(in), short UNUSED(thread)) +{ + /* stack order output: fac */ + float fac= 0.0f; + + if(node->custom1 < node->custom2) + fac = (p->cfra - node->custom1)/(float)(node->custom2-node->custom1); + + fac = curvemapping_evaluateF(node->storage, 0, fac); + out[0] = CLAMPIS(fac, 0.0f, 1.0f); +} + +static void time_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &time_colorfn, data); +} + + +static void time_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->custom1= 1; + node->custom2= 250; + node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); +} + +void register_node_type_tex_curve_time(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, time_outputs); + node_type_size(&ntype, 140, 100, 320); + node_type_init(&ntype, time_init); + node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); + node_type_exec(&ntype, time_exec); + + nodeRegisterType(lb, &ntype); +} + +/* **************** CURVE RGB ******************** */ +static bNodeSocketTemplate rgb_inputs[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate rgb_outputs[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void rgb_colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +{ + float cin[4]; + tex_input_rgba(cin, in[0], p, thread); + + curvemapping_evaluateRGBF(node->storage, out, cin); + out[3] = cin[3]; +} + +static void rgb_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &rgb_colorfn, data); +} + +static void rgb_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); +} + +void register_node_type_tex_curve_rgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, rgb_inputs, rgb_outputs); + node_type_size(&ntype, 200, 140, 320); + node_type_init(&ntype, rgb_init); + node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); + node_type_exec(&ntype, rgb_exec); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/texture/nodes/node_texture_decompose.c b/source/blender/nodes/texture/nodes/node_texture_decompose.c new file mode 100644 index 00000000000..312765f866e --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_decompose.c @@ -0,0 +1,92 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_decompose.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" +#include + +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f }, + { -1, 0, "" } +}; +static bNodeSocketTemplate outputs[]= { + { SOCK_FLOAT, 0, "Red" }, + { SOCK_FLOAT, 0, "Green" }, + { SOCK_FLOAT, 0, "Blue" }, + { SOCK_FLOAT, 0, "Alpha" }, + { -1, 0, "" } +}; + +static void valuefn_r(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + tex_input_rgba(out, in[0], p, thread); + *out = out[0]; +} + +static void valuefn_g(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + tex_input_rgba(out, in[0], p, thread); + *out = out[1]; +} + +static void valuefn_b(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + tex_input_rgba(out, in[0], p, thread); + *out = out[2]; +} + +static void valuefn_a(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + tex_input_rgba(out, in[0], p, thread); + *out = out[3]; +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &valuefn_r, data); + tex_output(node, in, out[1], &valuefn_g, data); + tex_output(node, in, out[2], &valuefn_b, data); + tex_output(node, in, out[3], &valuefn_a, data); +} + +void register_node_type_tex_decompose(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_DECOMPOSE, "Decompose RGBA", NODE_CLASS_OP_COLOR, 0); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 100, 60, 150); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_distance.c b/source/blender/nodes/texture/nodes/node_texture_distance.c new file mode 100644 index 00000000000..fe524baaa96 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_distance.c @@ -0,0 +1,76 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Mathias Panzenböck (panzi) . + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_distance.c + * \ingroup texnodes + */ + + +#include +#include "BLI_math.h" +#include "node_texture_util.h" +#include "NOD_texture.h" + +static bNodeSocketTemplate inputs[]= { + { SOCK_VECTOR, 1, "Coordinate 1", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE }, + { SOCK_VECTOR, 1, "Coordinate 2", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE }, + { -1, 0, "" } +}; + +static bNodeSocketTemplate outputs[]= { + { SOCK_FLOAT, 0, "Value" }, + { -1, 0, "" } +}; + +static void valuefn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + float co1[3], co2[3]; + + tex_input_vec(co1, in[0], p, thread); + tex_input_vec(co2, in[1], p, thread); + + *out = len_v3v3(co2, co1); +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &valuefn, data); +} + +void register_node_type_tex_distance(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 120, 110, 160); + node_type_storage(&ntype, "node_distance", NULL, NULL); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c new file mode 100644 index 00000000000..ebc2501cee3 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c @@ -0,0 +1,106 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Juho Vepsäläinen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_hueSatVal.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + + +static bNodeSocketTemplate inputs[]= { + { SOCK_FLOAT, 1, "Hue", 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.5f, PROP_NONE }, + { SOCK_FLOAT, 1, "Saturation", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR }, + { SOCK_FLOAT, 1, "Value", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR }, + { SOCK_FLOAT, 1, "Factor", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR }, + { SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f }, + { -1, 0, "" } +}; +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color" }, + { -1, 0, "" } +}; + +static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float hue, float sat, float val, float *in, float fac) +{ + if(fac != 0 && (hue != 0.5f || sat != 1 || val != 1)) { + float col[3], hsv[3], mfac= 1.0f - fac; + + rgb_to_hsv(in[0], in[1], in[2], hsv, hsv+1, hsv+2); + hsv[0]+= (hue - 0.5f); + if(hsv[0]>1.0f) hsv[0]-=1.0f; else if(hsv[0]<0.0f) hsv[0]+= 1.0f; + hsv[1]*= sat; + if(hsv[1]>1.0f) hsv[1]= 1.0f; else if(hsv[1]<0.0f) hsv[1]= 0.0f; + hsv[2]*= val; + if(hsv[2]>1.0f) hsv[2]= 1.0f; else if(hsv[2]<0.0f) hsv[2]= 0.0f; + hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); + + out[0]= mfac*in[0] + fac*col[0]; + out[1]= mfac*in[1] + fac*col[1]; + out[2]= mfac*in[2] + fac*col[2]; + } + else { + QUATCOPY(out, in); + } +} + +static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +{ + float hue = tex_input_value(in[0], p, thread); + float sat = tex_input_value(in[1], p, thread); + float val = tex_input_value(in[2], p, thread); + float fac = tex_input_value(in[3], p, thread); + + float col[4]; + tex_input_rgba(col, in[4], p, thread); + + hue += 0.5f; /* [-.5, .5] -> [0, 1] */ + + do_hue_sat_fac(node, out, hue, sat, val, col, fac); + + out[3] = col[3]; +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_hue_sat(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 150, 80, 250); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_image.c b/source/blender/nodes/texture/nodes/node_texture_image.c new file mode 100644 index 00000000000..1359cf4275f --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_image.c @@ -0,0 +1,112 @@ +/* + * $Id: TEX_image.c 36481 2011-05-04 11:42:25Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_image.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Image"}, + { -1, 0, "" } +}; + +static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(in), short UNUSED(thread)) +{ + float x = p->co[0]; + float y = p->co[1]; + Image *ima= (Image *)node->id; + ImageUser *iuser= (ImageUser *)node->storage; + + if( ima ) { + ImBuf *ibuf = BKE_image_get_ibuf(ima, iuser); + if( ibuf ) { + float xsize, ysize; + float xoff, yoff; + int px, py; + + float *result; + + xsize = ibuf->x / 2; + ysize = ibuf->y / 2; + xoff = yoff = -1; + + px = (int)( (x-xoff) * xsize ); + py = (int)( (y-yoff) * ysize ); + + if( (!xsize) || (!ysize) ) return; + + if( !ibuf->rect_float ) { + BLI_lock_thread(LOCK_IMAGE); + if( !ibuf->rect_float ) + IMB_float_from_rect(ibuf); + BLI_unlock_thread(LOCK_IMAGE); + } + + while( px < 0 ) px += ibuf->x; + while( py < 0 ) py += ibuf->y; + while( px >= ibuf->x ) px -= ibuf->x; + while( py >= ibuf->y ) py -= ibuf->y; + + result = ibuf->rect_float + py*ibuf->x*4 + px*4; + QUATCOPY( out, result ); + } + } +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user"); + node->storage= iuser; + iuser->sfra= 1; + iuser->fie_ima= 2; + iuser->ok= 1; +} + +void register_node_type_tex_image(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, NULL, outputs); + node_type_size(&ntype, 120, 80, 300); + node_type_init(&ntype, init); + node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_invert.c b/source/blender/nodes/texture/nodes/node_texture_invert.c new file mode 100644 index 00000000000..8ba4f292fec --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_invert.c @@ -0,0 +1,78 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_invert.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +/* **************** INVERT ******************** */ +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + float col[4]; + + tex_input_rgba(col, in[0], p, thread); + + col[0] = 1.0f - col[0]; + col[1] = 1.0f - col[1]; + col[2] = 1.0f - col[2]; + + VECCOPY(out, col); + out[3] = col[3]; +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_invert(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 90, 80, 100); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c new file mode 100644 index 00000000000..182bc37978f --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_math.c @@ -0,0 +1,201 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_math.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + + +/* **************** SCALAR MATH ******************** */ +static bNodeSocketTemplate inputs[]= { + { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, + { -1, 0, "" } +}; + +static bNodeSocketTemplate outputs[]= { + { SOCK_FLOAT, 0, "Value"}, + { -1, 0, "" } +}; + +static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +{ + float in0 = tex_input_value(in[0], p, thread); + float in1 = tex_input_value(in[1], p, thread); + + switch(node->custom1){ + + case 0: /* Add */ + *out= in0 + in1; + break; + case 1: /* Subtract */ + *out= in0 - in1; + break; + case 2: /* Multiply */ + *out= in0 * in1; + break; + case 3: /* Divide */ + { + if(in1==0) /* We don't want to divide by zero. */ + *out= 0.0; + else + *out= in0 / in1; + } + break; + case 4: /* Sine */ + { + *out= sin(in0); + } + break; + case 5: /* Cosine */ + { + *out= cos(in0); + } + break; + case 6: /* Tangent */ + { + *out= tan(in0); + } + break; + case 7: /* Arc-Sine */ + { + /* Can't do the impossible... */ + if( in0 <= 1 && in0 >= -1 ) + *out= asin(in0); + else + *out= 0.0; + } + break; + case 8: /* Arc-Cosine */ + { + /* Can't do the impossible... */ + if( in0 <= 1 && in0 >= -1 ) + *out= acos(in0); + else + *out= 0.0; + } + break; + case 9: /* Arc-Tangent */ + { + *out= atan(in0); + } + break; + case 10: /* Power */ + { + /* Only raise negative numbers by full integers */ + if( in0 >= 0 ) { + out[0]= pow(in0, in1); + } else { + float y_mod_1 = fmod(in1, 1); + if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) { + *out = pow(in0, floor(in1 + 0.5f)); + } else { + *out = 0.0; + } + } + } + break; + case 11: /* Logarithm */ + { + /* Don't want any imaginary numbers... */ + if( in0 > 0 && in1 > 0 ) + *out= log(in0) / log(in1); + else + *out= 0.0; + } + break; + case 12: /* Minimum */ + { + if( in0 < in1 ) + *out= in0; + else + *out= in1; + } + break; + case 13: /* Maximum */ + { + if( in0 > in1 ) + *out= in0; + else + *out= in1; + } + break; + case 14: /* Round */ + { + *out= (in0<0)?(int)(in0 - 0.5f):(int)(in0 + 0.5f); + } + break; + + case 15: /* Less Than */ + { + if( in0 < in1 ) + *out= 1.0f; + else + *out= 0.0f; + } + break; + + case 16: /* Greater Than */ + { + if( in0 > in1 ) + *out= 1.0f; + else + *out= 0.0f; + } + break; + + default: + fprintf(stderr, + "%s:%d: unhandeld value in switch statement: %d\n", + __FILE__, __LINE__, node->custom1); + } +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &valuefn, data); +} + +void register_node_type_tex_math(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 120, 110, 160); + node_type_label(&ntype, node_math_label); + node_type_storage(&ntype, "node_math", NULL, NULL); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c new file mode 100644 index 00000000000..8baac682b18 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c @@ -0,0 +1,79 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_mixRgb.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +/* **************** MIX RGB ******************** */ +static bNodeSocketTemplate inputs[]= { + { SOCK_FLOAT, 1, "Factor", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR }, + { SOCK_RGBA, 1, "Color1", 0.5f, 0.5f, 0.5f, 1.0f }, + { SOCK_RGBA , 1, "Color2", 0.5f, 0.5f, 0.5f, 1.0f }, + { -1, 0, "" } +}; +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color" }, + { -1, 0, "" } +}; + +static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +{ + float fac = tex_input_value(in[0], p, thread); + float col1[4], col2[4]; + + tex_input_rgba(col1, in[1], p, thread); + tex_input_rgba(col2, in[2], p, thread); + + CLAMP(fac, 0.0f, 1.0f); + + QUATCOPY(out, col1); + ramp_blend(node->custom1, out, out+1, out+2, fac, col2); +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_mix_rgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 100, 60, 150); + node_type_label(&ntype, node_blend_label); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c new file mode 100644 index 00000000000..c321f5738a1 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_output.c @@ -0,0 +1,173 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_output.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +/* **************** COMPOSITE ******************** */ +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, PROP_DIRECTION}, + { -1, 0, "" } +}; + +/* applies to render pipeline */ +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) +{ + TexCallData *cdata = (TexCallData *)data; + TexResult *target = cdata->target; + + if(cdata->do_preview) { + TexParams params; + params_from_cdata(¶ms, cdata); + + if(in[1] && in[1]->hasinput && !in[0]->hasinput) + tex_input_rgba(&target->tr, in[1], ¶ms, cdata->thread); + else + tex_input_rgba(&target->tr, in[0], ¶ms, cdata->thread); + tex_do_preview(node, params.co, &target->tr); + } + else { + /* 0 means don't care, so just use first */ + if(cdata->which_output == node->custom1 || (cdata->which_output == 0 && node->custom1 == 1)) { + TexParams params; + params_from_cdata(¶ms, cdata); + + tex_input_rgba(&target->tr, in[0], ¶ms, cdata->thread); + + target->tin = (target->tr + target->tg + target->tb) / 3.0f; + target->talpha = 1; + + if(target->nor) { + if(in[1] && in[1]->hasinput) + tex_input_vec(target->nor, in[1], ¶ms, cdata->thread); + else + target->nor = NULL; + } + } + } +} + +static void unique_name(bNode *node) +{ + TexNodeOutput *tno = (TexNodeOutput *)node->storage; + char *new_name = NULL; + int new_len = 0; + int suffix; + bNode *i; + char *name = tno->name; + + i = node; + while(i->prev) i = i->prev; + for(; i; i=i->next) { + if( + i == node || + i->type != TEX_NODE_OUTPUT || + strcmp(name, ((TexNodeOutput*)(i->storage))->name) + ) + continue; + + if(!new_name) { + int len = strlen(name); + if(len >= 4 && sscanf(name + len - 4, ".%03d", &suffix) == 1) { + new_len = len; + } else { + suffix = 0; + new_len = len + 4; + if(new_len > 31) + new_len = 31; + } + + new_name = MEM_mallocN(new_len + 1, "new_name"); + strcpy(new_name, name); + name = new_name; + } + sprintf(new_name + new_len - 4, ".%03d", ++suffix); + } + + if(new_name) { + strcpy(tno->name, new_name); + MEM_freeN(new_name); + } +} + +static void assign_index(struct bNode *node) +{ + bNode *tnode; + int index = 1; + + tnode = node; + while(tnode->prev) + tnode = tnode->prev; + + check_index: + for(; tnode; tnode= tnode->next) + if(tnode->type == TEX_NODE_OUTPUT && tnode != node) + if(tnode->custom1 == index) { + index ++; + goto check_index; + } + + node->custom1 = index; +} + +static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + TexNodeOutput *tno = MEM_callocN(sizeof(TexNodeOutput), "TEX_output"); + node->storage= tno; + + strcpy(tno->name, "Default"); + unique_name(node); + assign_index(node); +} + +static void copy(bNode *orig, bNode *new) +{ + node_copy_standard_storage(orig, new); + unique_name(new); + assign_index(new); +} + +void register_node_type_tex_output(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, NULL); + node_type_size(&ntype, 150, 60, 200); + node_type_init(&ntype, init); + node_type_storage(&ntype, "TexNodeOutput", node_free_standard_storage, copy); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c new file mode 100644 index 00000000000..8b4c25d85c9 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_proc.c @@ -0,0 +1,326 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_proc.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +#include "RE_shader_ext.h" + +/* + In this file: wrappers to use procedural textures as nodes +*/ + + +static bNodeSocketTemplate outputs_both[]= { + { SOCK_RGBA, 0, "Color", 1.0f, 0.0f, 0.0f, 1.0f }, + { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, PROP_DIRECTION }, + { -1, 0, "" } +}; +static bNodeSocketTemplate outputs_color_only[]= { + { SOCK_RGBA, 0, "Color" }, + { -1, 0, "" } +}; + +/* Inputs common to all, #defined because nodes will need their own inputs too */ +#define I 2 /* count */ +#define COMMON_INPUTS \ + { SOCK_RGBA, 1, "Color 1", 0.0f, 0.0f, 0.0f, 1.0f }, \ + { SOCK_RGBA, 1, "Color 2", 1.0f, 1.0f, 1.0f, 1.0f } + +/* Calls multitex and copies the result to the outputs. Called by xxx_exec, which handles inputs. */ +static void do_proc(float *result, TexParams *p, float *col1, float *col2, char is_normal, Tex *tex, short thread) +{ + TexResult texres; + int textype; + + if(is_normal) { + texres.nor = result; + } + else + texres.nor = NULL; + + textype = multitex_nodes(tex, p->co, p->dxt, p->dyt, p->osatex, + &texres, thread, 0, p->shi, p->mtex); + + if(is_normal) + return; + + if(textype & TEX_RGB) { + QUATCOPY(result, &texres.tr); + } + else { + QUATCOPY(result, col1); + ramp_blend(MA_RAMP_BLEND, result, result+1, result+2, texres.tin, col2); + } +} + +typedef void (*MapFn) (Tex *tex, bNodeStack **in, TexParams *p, short thread); + +static void texfn( + float *result, + TexParams *p, + bNode *node, + bNodeStack **in, + char is_normal, + MapFn map_inputs, + short thread) +{ + Tex tex = *((Tex*)(node->storage)); + float col1[4], col2[4]; + tex_input_rgba(col1, in[0], p, thread); + tex_input_rgba(col2, in[1], p, thread); + + map_inputs(&tex, in, p, thread); + + do_proc(result, p, col1, col2, is_normal, &tex, thread); +} + +static int count_outputs(bNode *node) +{ + bNodeSocket *sock; + int num = 0; + for(sock= node->outputs.first; sock; sock= sock->next) { + num++; + } + return num; +} + +/* Boilerplate generators */ + +#define ProcNoInputs(name) \ + static void name##_map_inputs(Tex *UNUSED(tex), bNodeStack **UNUSED(in), TexParams *UNUSED(p), short UNUSED(thread)) \ + {} + +#define ProcDef(name) \ + static void name##_colorfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \ + { \ + texfn(result, p, node, in, 0, &name##_map_inputs, thread); \ + } \ + static void name##_normalfn(float *result, TexParams *p, bNode *node, bNodeStack **in, short thread) \ + { \ + texfn(result, p, node, in, 1, &name##_map_inputs, thread); \ + } \ + static void name##_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) \ + { \ + int outs = count_outputs(node); \ + if(outs >= 1) tex_output(node, in, out[0], &name##_colorfn, data); \ + if(outs >= 2) tex_output(node, in, out[1], &name##_normalfn, data); \ + } + + +/* --- VORONOI -- */ +static bNodeSocketTemplate voronoi_inputs[]= { + COMMON_INPUTS, + { SOCK_FLOAT, 1, "W1", 1.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE }, + { SOCK_FLOAT, 1, "W2", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE }, + { SOCK_FLOAT, 1, "W3", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE }, + { SOCK_FLOAT, 1, "W4", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE }, + + { SOCK_FLOAT, 1, "iScale", 1.0f, 0.0f, 0.0f, 0.0f, 0.01f, 10.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 4.0f, PROP_UNSIGNED }, + + { -1, 0, "" } +}; +static void voronoi_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) +{ + tex->vn_w1 = tex_input_value(in[I+0], p, thread); + tex->vn_w2 = tex_input_value(in[I+1], p, thread); + tex->vn_w3 = tex_input_value(in[I+2], p, thread); + tex->vn_w4 = tex_input_value(in[I+3], p, thread); + + tex->ns_outscale = tex_input_value(in[I+4], p, thread); + tex->noisesize = tex_input_value(in[I+5], p, thread); +} +ProcDef(voronoi) + +/* --- BLEND -- */ +static bNodeSocketTemplate blend_inputs[]= { + COMMON_INPUTS, + { -1, 0, "" } +}; +ProcNoInputs(blend) +ProcDef(blend) + +/* -- MAGIC -- */ +static bNodeSocketTemplate magic_inputs[]= { + COMMON_INPUTS, + { SOCK_FLOAT, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static void magic_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) +{ + tex->turbul = tex_input_value(in[I+0], p, thread); +} +ProcDef(magic) + +/* --- MARBLE --- */ +static bNodeSocketTemplate marble_inputs[]= { + COMMON_INPUTS, + { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static void marble_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) +{ + tex->noisesize = tex_input_value(in[I+0], p, thread); + tex->turbul = tex_input_value(in[I+1], p, thread); +} +ProcDef(marble) + +/* --- CLOUDS --- */ +static bNodeSocketTemplate clouds_inputs[]= { + COMMON_INPUTS, + { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static void clouds_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) +{ + tex->noisesize = tex_input_value(in[I+0], p, thread); +} +ProcDef(clouds) + +/* --- DISTORTED NOISE --- */ +static bNodeSocketTemplate distnoise_inputs[]= { + COMMON_INPUTS, + { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Distortion", 1.00f, 0.0f, 0.0f, 0.0f, 0.0000f, 10.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static void distnoise_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) +{ + tex->noisesize = tex_input_value(in[I+0], p, thread); + tex->dist_amount = tex_input_value(in[I+1], p, thread); +} +ProcDef(distnoise) + +/* --- WOOD --- */ +static bNodeSocketTemplate wood_inputs[]= { + COMMON_INPUTS, + { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static void wood_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) +{ + tex->noisesize = tex_input_value(in[I+0], p, thread); + tex->turbul = tex_input_value(in[I+1], p, thread); +} +ProcDef(wood) + +/* --- MUSGRAVE --- */ +static bNodeSocketTemplate musgrave_inputs[]= { + COMMON_INPUTS, + { SOCK_FLOAT, 1, "H", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Lacunarity", 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Octaves", 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 8.0f, PROP_UNSIGNED }, + + { SOCK_FLOAT, 1, "iScale", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static void musgrave_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) +{ + tex->mg_H = tex_input_value(in[I+0], p, thread); + tex->mg_lacunarity = tex_input_value(in[I+1], p, thread); + tex->mg_octaves = tex_input_value(in[I+2], p, thread); + tex->ns_outscale = tex_input_value(in[I+3], p, thread); + tex->noisesize = tex_input_value(in[I+4], p, thread); +} +ProcDef(musgrave) + +/* --- NOISE --- */ +static bNodeSocketTemplate noise_inputs[]= { + COMMON_INPUTS, + { -1, 0, "" } +}; +ProcNoInputs(noise) +ProcDef(noise) + +/* --- STUCCI --- */ +static bNodeSocketTemplate stucci_inputs[]= { + COMMON_INPUTS, + { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED }, + { SOCK_FLOAT, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED }, + { -1, 0, "" } +}; +static void stucci_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread) +{ + tex->noisesize = tex_input_value(in[I+0], p, thread); + tex->turbul = tex_input_value(in[I+1], p, thread); +} +ProcDef(stucci) + +/* --- */ + +static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + Tex *tex = MEM_callocN(sizeof(Tex), "Tex"); + node->storage= tex; + + default_tex(tex); + tex->type = node->type - TEX_NODE_PROC; + + if(tex->type == TEX_WOOD) + tex->stype = TEX_BANDNOISE; + +} + +/* Node type definitions */ +#define TexDef(TEXTYPE, outputs, name, Name) \ +void register_node_type_tex_proc_##name(ListBase *lb) \ +{ \ + static bNodeType ntype; \ + \ + node_type_base(&ntype, TEX_NODE_PROC+TEXTYPE, Name, NODE_CLASS_TEXTURE, NODE_PREVIEW|NODE_OPTIONS); \ + node_type_socket_templates(&ntype, name##_inputs, outputs); \ + node_type_size(&ntype, 140, 80, 140); \ + node_type_init(&ntype, init); \ + node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \ + node_type_exec(&ntype, name##_exec); \ + \ + nodeRegisterType(lb, &ntype); \ +} + +#define C outputs_color_only +#define CV outputs_both + +TexDef(TEX_VORONOI, CV, voronoi, "Voronoi" ) +TexDef(TEX_BLEND, C, blend, "Blend" ) +TexDef(TEX_MAGIC, C, magic, "Magic" ) +TexDef(TEX_MARBLE, CV, marble, "Marble" ) +TexDef(TEX_CLOUDS, CV, clouds, "Clouds" ) +TexDef(TEX_WOOD, CV, wood, "Wood" ) +TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave" ) +TexDef(TEX_NOISE, C, noise, "Noise" ) +TexDef(TEX_STUCCI, CV, stucci, "Stucci" ) +TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise" ) diff --git a/source/blender/nodes/texture/nodes/node_texture_rotate.c b/source/blender/nodes/texture/nodes/node_texture_rotate.c new file mode 100644 index 00000000000..a788b9cbbde --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_rotate.c @@ -0,0 +1,109 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_rotate.c + * \ingroup texnodes + */ + + +#include + +#include "node_texture_util.h" +#include "NOD_texture.h" + +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 1, "Turns", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE }, + { SOCK_VECTOR, 1, "Axis", 0.0f, 0.0f, 1.0f, 0.0f, -1.0f, 1.0f, PROP_DIRECTION }, + { -1, 0, "" } +}; + +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void rotate(float new_co[3], float a, float ax[3], float co[3]) +{ + float para[3]; + float perp[3]; + float cp[3]; + + float cos_a = cos(a * (float)(2*M_PI)); + float sin_a = sin(a * (float)(2*M_PI)); + + // x' = xcosa + n(n.x)(1-cosa) + (x*n)sina + + mul_v3_v3fl(perp, co, cos_a); + mul_v3_v3fl(para, ax, dot_v3v3(co, ax)*(1 - cos_a)); + + cross_v3_v3v3(cp, ax, co); + mul_v3_fl(cp, sin_a); + + new_co[0] = para[0] + perp[0] + cp[0]; + new_co[1] = para[1] + perp[1] + cp[1]; + new_co[2] = para[2] + perp[2] + cp[2]; +} + +static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + float new_co[3], new_dxt[3], new_dyt[3], a, ax[3]; + + a= tex_input_value(in[1], p, thread); + tex_input_vec(ax, in[2], p, thread); + + rotate(new_co, a, ax, p->co); + if (p->osatex) { + rotate(new_dxt, a, ax, p->dxt); + rotate(new_dyt, a, ax, p->dyt); + } + + { + TexParams np = *p; + np.co = new_co; + np.dxt = new_dxt; + np.dyt = new_dyt; + tex_input_rgba(out, in[0], &np, thread); + } +} +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_rotate(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c new file mode 100644 index 00000000000..136dde0d52f --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_scale.c @@ -0,0 +1,82 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_scale.c + * \ingroup texnodes + */ + + +#include +#include "node_texture_util.h" + +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f }, + { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f, PROP_FACTOR }, + { -1, 0, "" } +}; + +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + float scale[3], new_co[3], new_dxt[3], new_dyt[3]; + TexParams np = *p; + + np.co = new_co; + np.dxt = new_dxt; + np.dyt = new_dyt; + + tex_input_vec(scale, in[1], p, thread); + + mul_v3_v3v3(new_co, p->co, scale); + if (p->osatex) { + mul_v3_v3v3(new_dxt, p->dxt, scale); + mul_v3_v3v3(new_dyt, p->dyt, scale); + } + + tex_input_rgba(out, in[0], &np, thread); +} +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_scale(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 90, 80, 100); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c new file mode 100644 index 00000000000..10b9b8979f8 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_texture.c @@ -0,0 +1,103 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_texture.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +#include "RE_shader_ext.h" + +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Color1", 1.0f, 1.0f, 1.0f, 1.0f }, + { SOCK_RGBA, 1, "Color2", 0.0f, 0.0f, 0.0f, 1.0f }, + { -1, 0, "" } +}; + +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color" }, + { -1, 0, "" } +}; + +static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +{ + Tex *nodetex = (Tex *)node->id; + static float red[] = {1,0,0,1}; + static float white[] = {1,1,1,1}; + float co[3], dxt[3], dyt[3]; + + copy_v3_v3(co, p->co); + copy_v3_v3(dxt, p->dxt); + copy_v3_v3(dyt, p->dyt); + + if(node->custom2 || node->need_exec==0) { + /* this node refers to its own texture tree! */ + QUATCOPY(out, (fabs(co[0] - co[1]) < .01) ? white : red ); + } + else if(nodetex) { + TexResult texres; + int textype; + float nor[] = {0,0,0}; + float col1[4], col2[4]; + + tex_input_rgba(col1, in[0], p, thread); + tex_input_rgba(col2, in[1], p, thread); + + texres.nor = nor; + textype = multitex_nodes(nodetex, co, dxt, dyt, p->osatex, + &texres, thread, 0, p->shi, p->mtex); + + if(textype & TEX_RGB) { + QUATCOPY(out, &texres.tr); + } + else { + QUATCOPY(out, col1); + ramp_blend(MA_RAMP_BLEND, out, out+1, out+2, texres.tin, col2); + } + } +} + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_texture(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 120, 80, 240); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_translate.c b/source/blender/nodes/texture/nodes/node_texture_translate.c new file mode 100644 index 00000000000..395404a9411 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_translate.c @@ -0,0 +1,78 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_translate.c + * \ingroup texnodes + */ + + +#include +#include "node_texture_util.h" +#include "NOD_texture.h" + +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_VECTOR, 1, "Offset", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_TRANSLATION }, + { -1, 0, "" } +}; + +static bNodeSocketTemplate outputs[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + float offset[3], new_co[3]; + TexParams np = *p; + np.co = new_co; + + tex_input_vec(offset, in[1], p, thread); + + new_co[0] = p->co[0] + offset[0]; + new_co[1] = p->co[1] + offset[1]; + new_co[2] = p->co[2] + offset[2]; + + tex_input_rgba(out, in[0], &np, thread); +} +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &colorfn, data); +} + +void register_node_type_tex_translate(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 90, 80, 100); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_valToNor.c b/source/blender/nodes/texture/nodes/node_texture_valToNor.c new file mode 100644 index 00000000000..62b457bc862 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_valToNor.c @@ -0,0 +1,94 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Jucas. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_valToNor.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +static bNodeSocketTemplate inputs[]= { + { SOCK_FLOAT, 1, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE }, + { SOCK_FLOAT, 1, "Nabla", 0.025f, 0.0f, 0.0f, 0.0f, 0.001f, 0.1f, PROP_UNSIGNED }, + { -1, 0, "" } +}; + +static bNodeSocketTemplate outputs[]= { + { SOCK_VECTOR, 0, "Normal" }, + { -1, 0, "" } +}; + +static void normalfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + float new_co[3]; + float *co = p->co; + + float nabla = tex_input_value(in[1], p, thread); + float val; + float nor[3]; + + TexParams np = *p; + np.co = new_co; + + val = tex_input_value(in[0], p, thread); + + new_co[0] = co[0] + nabla; + new_co[1] = co[1]; + new_co[2] = co[2]; + nor[0] = tex_input_value(in[0], &np, thread); + + new_co[0] = co[0]; + new_co[1] = co[1] + nabla; + nor[1] = tex_input_value(in[0], &np, thread); + + new_co[1] = co[1]; + new_co[2] = co[2] + nabla; + nor[2] = tex_input_value(in[0], &np, thread); + + out[0] = val-nor[0]; + out[1] = val-nor[1]; + out[2] = val-nor[2]; +} +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &normalfn, data); +} + +void register_node_type_tex_valtonor(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 90, 80, 100); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c new file mode 100644 index 00000000000..caca6fa97a4 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c @@ -0,0 +1,116 @@ +/* + * $Id: TEX_valToRgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_valToRgb.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" + +/* **************** VALTORGB ******************** */ +static bNodeSocketTemplate valtorgb_in[]= { + { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { -1, 0, "" } +}; +static bNodeSocketTemplate valtorgb_out[]= { + { SOCK_RGBA, 0, "Color"}, + { -1, 0, "" } +}; + +static void valtorgb_colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +{ + if(node->storage) { + float fac = tex_input_value(in[0], p, thread); + + do_colorband(node->storage, fac, out); + } +} + +static void valtorgb_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &valtorgb_colorfn, data); +} + +static void valtorgb_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->storage = add_colorband(1); +} + +void register_node_type_tex_valtorgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS); + node_type_socket_templates(&ntype, valtorgb_in, valtorgb_out); + node_type_size(&ntype, 240, 200, 300); + node_type_init(&ntype, valtorgb_init); + node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, valtorgb_exec); + + nodeRegisterType(lb, &ntype); +} + +/* **************** RGBTOBW ******************** */ +static bNodeSocketTemplate rgbtobw_in[]= { + { SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate rgbtobw_out[]= { + { SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, + { -1, 0, "" } +}; + + +static void rgbtobw_valuefn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) +{ + float cin[4]; + tex_input_rgba(cin, in[0], p, thread); + + *out = cin[0] * 0.35f + cin[1] * 0.45f + cin[2] * 0.2f; +} + +static void rgbtobw_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +{ + tex_output(node, in, out[0], &rgbtobw_valuefn, data); +} + +void register_node_type_tex_rgbtobw(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0); + node_type_socket_templates(&ntype, rgbtobw_in, rgbtobw_out); + node_type_size(&ntype, 80, 40, 120); + node_type_exec(&ntype, rgbtobw_exec); + + nodeRegisterType(lb, &ntype); +} + diff --git a/source/blender/nodes/texture/nodes/node_texture_viewer.c b/source/blender/nodes/texture/nodes/node_texture_viewer.c new file mode 100644 index 00000000000..01734f56937 --- /dev/null +++ b/source/blender/nodes/texture/nodes/node_texture_viewer.c @@ -0,0 +1,70 @@ +/* + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2005 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Robin Allen + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/texture/nodes/node_texture_viewer.c + * \ingroup texnodes + */ + + +#include "node_texture_util.h" +#include "NOD_texture.h" +#include + +static bNodeSocketTemplate inputs[]= { + { SOCK_RGBA, 1, "Color", 1.0f, 0.0f, 0.0f, 1.0f }, + { -1, 0, "" } +}; +static bNodeSocketTemplate outputs[]= { + { -1, 0, "" } +}; + +static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out)) +{ + TexCallData *cdata = (TexCallData *)data; + + if(cdata->do_preview) { + TexParams params; + float col[4]; + params_from_cdata(¶ms, cdata); + + tex_input_rgba(col, in[0], ¶ms, cdata->thread); + tex_do_preview(node, params.previewco, col); + } +} + +void register_node_type_tex_viewer(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_size(&ntype, 100, 60, 150); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index fbbb33d0172..e35b3e53f5b 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -125,7 +125,7 @@ static void init_render_texture(Render *re, Tex *tex) } if(tex->nodetree && tex->use_nodes) { - ntreeBeginExecTree(tex->nodetree); /* has internal flag to detect it only does it once */ + ntreeTexBeginExecTree(tex->nodetree); /* has internal flag to detect it only does it once */ } } @@ -144,8 +144,8 @@ void init_render_textures(Render *re) static void end_render_texture(Tex *tex) { - if(tex && tex->use_nodes && tex->nodetree) - ntreeEndExecTree(tex->nodetree); + if(tex && tex->use_nodes && tex->nodetree && tex->nodetree->execdata) + ntreeTexEndExecTree(tex->nodetree->execdata); } void end_render_textures(Render *re) diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 315cd5312cf..bf2808ba4c0 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -718,7 +718,6 @@ if(WITH_MOD_FLUID) list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem) endif() - #if(UNIX) # Sort libraries set(BLENDER_SORTED_LIBS -- cgit v1.2.3 From 3efe8670515a05215b7da427aee52605582e6acf Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Mon, 5 Sep 2011 21:52:06 +0000 Subject: Put dead zone printout behind debug. --- intern/ghost/intern/GHOST_NDOFManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp index a24ccc3ff6c..51525df003e 100644 --- a/intern/ghost/intern/GHOST_NDOFManager.cpp +++ b/intern/ghost/intern/GHOST_NDOFManager.cpp @@ -366,11 +366,11 @@ void GHOST_NDOFManager::setDeadZone(float dz) } else if (dz > 0.5f) { // warn the rogue user/programmer, but allow it - printf("ndof: dead zone of %.2f is rather high...\n", dz); + GHOST_PRINT("ndof: dead zone of %.2f is rather high...\n", dz); } m_deadZone = dz; - printf("ndof: dead zone set to %.2f\n", dz); + GHOST_PRINT("ndof: dead zone set to %.2f\n", dz); } static bool atHomePosition(GHOST_TEventNDOFMotionData* ndof) -- cgit v1.2.3 From 82f19e8df217f62931b8f8a68725fcdea13fcbe2 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Mon, 5 Sep 2011 22:04:23 +0000 Subject: Fix for blender player linker bug, missing a stub function used in RNA. --- source/blenderplayer/bad_level_call_stubs/stubs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index a04fdfa0f74..56ebb71a7ac 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -247,6 +247,7 @@ void WM_cursor_wait (int val) {} void ED_node_texture_default(struct Tex *tx){} void ED_node_changed_update(struct bContext *C, struct bNode *node){} void ED_node_generic_update(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node){} +void ED_node_tree_update(struct SpaceNode *snode, struct Scene *scene){} void ED_view3d_scene_layers_update(struct Main *bmain, struct Scene *scene){} int ED_view3d_scene_layer_set(int lay, const int *values){return 0;} void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar){} -- cgit v1.2.3 From 271f069b8531b1fa01539dcab4675ff3b8e4485b Mon Sep 17 00:00:00 2001 From: "Guillermo S. Romero" Date: Mon, 5 Sep 2011 22:04:30 +0000 Subject: SVN maintenance. --- source/blender/nodes/NOD_composite.h | 2 +- source/blender/nodes/NOD_shader.h | 2 +- source/blender/nodes/NOD_socket.h | 1 + source/blender/nodes/NOD_texture.h | 2 +- source/blender/nodes/composite/node_composite_tree.c | 2 ++ source/blender/nodes/composite/node_composite_util.c | 2 +- source/blender/nodes/composite/node_composite_util.h | 2 +- source/blender/nodes/composite/nodes/node_composite_alphaOver.c | 2 +- source/blender/nodes/composite/nodes/node_composite_bilateralblur.c | 2 +- source/blender/nodes/composite/nodes/node_composite_blur.c | 2 +- source/blender/nodes/composite/nodes/node_composite_brightness.c | 2 +- source/blender/nodes/composite/nodes/node_composite_channelMatte.c | 2 +- source/blender/nodes/composite/nodes/node_composite_chromaMatte.c | 2 +- source/blender/nodes/composite/nodes/node_composite_colorMatte.c | 2 +- source/blender/nodes/composite/nodes/node_composite_colorSpill.c | 2 +- source/blender/nodes/composite/nodes/node_composite_colorbalance.c | 2 +- source/blender/nodes/composite/nodes/node_composite_common.c | 2 +- source/blender/nodes/composite/nodes/node_composite_composite.c | 2 +- source/blender/nodes/composite/nodes/node_composite_crop.c | 2 +- source/blender/nodes/composite/nodes/node_composite_curves.c | 2 +- source/blender/nodes/composite/nodes/node_composite_defocus.c | 2 +- source/blender/nodes/composite/nodes/node_composite_diffMatte.c | 2 +- source/blender/nodes/composite/nodes/node_composite_dilate.c | 2 +- source/blender/nodes/composite/nodes/node_composite_directionalblur.c | 1 + source/blender/nodes/composite/nodes/node_composite_displace.c | 2 +- source/blender/nodes/composite/nodes/node_composite_distanceMatte.c | 2 +- source/blender/nodes/composite/nodes/node_composite_filter.c | 2 +- source/blender/nodes/composite/nodes/node_composite_flip.c | 2 +- source/blender/nodes/composite/nodes/node_composite_gamma.c | 2 +- source/blender/nodes/composite/nodes/node_composite_glare.c | 1 + source/blender/nodes/composite/nodes/node_composite_hueSatVal.c | 2 +- source/blender/nodes/composite/nodes/node_composite_huecorrect.c | 2 +- source/blender/nodes/composite/nodes/node_composite_idMask.c | 2 +- source/blender/nodes/composite/nodes/node_composite_image.c | 2 +- source/blender/nodes/composite/nodes/node_composite_invert.c | 2 +- source/blender/nodes/composite/nodes/node_composite_lensdist.c | 1 + source/blender/nodes/composite/nodes/node_composite_levels.c | 2 +- source/blender/nodes/composite/nodes/node_composite_lummaMatte.c | 2 +- source/blender/nodes/composite/nodes/node_composite_mapUV.c | 2 +- source/blender/nodes/composite/nodes/node_composite_mapValue.c | 2 +- source/blender/nodes/composite/nodes/node_composite_math.c | 2 +- source/blender/nodes/composite/nodes/node_composite_mixrgb.c | 2 +- source/blender/nodes/composite/nodes/node_composite_normal.c | 2 +- source/blender/nodes/composite/nodes/node_composite_normalize.c | 2 +- source/blender/nodes/composite/nodes/node_composite_outputFile.c | 2 +- source/blender/nodes/composite/nodes/node_composite_premulkey.c | 2 +- source/blender/nodes/composite/nodes/node_composite_rgb.c | 2 +- source/blender/nodes/composite/nodes/node_composite_rotate.c | 2 +- source/blender/nodes/composite/nodes/node_composite_scale.c | 2 +- source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c | 2 +- source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c | 2 +- source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c | 2 +- source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c | 2 +- source/blender/nodes/composite/nodes/node_composite_setalpha.c | 2 +- source/blender/nodes/composite/nodes/node_composite_splitViewer.c | 2 +- source/blender/nodes/composite/nodes/node_composite_texture.c | 2 +- source/blender/nodes/composite/nodes/node_composite_tonemap.c | 1 + source/blender/nodes/composite/nodes/node_composite_translate.c | 2 +- source/blender/nodes/composite/nodes/node_composite_valToRgb.c | 2 +- source/blender/nodes/composite/nodes/node_composite_value.c | 2 +- source/blender/nodes/composite/nodes/node_composite_vecBlur.c | 2 +- source/blender/nodes/composite/nodes/node_composite_viewer.c | 2 +- source/blender/nodes/composite/nodes/node_composite_zcombine.c | 2 +- source/blender/nodes/intern/node_common.c | 1 + source/blender/nodes/intern/node_common.h | 1 + source/blender/nodes/intern/node_exec.c | 1 + source/blender/nodes/intern/node_exec.h | 1 + source/blender/nodes/intern/node_socket.c | 1 + source/blender/nodes/shader/node_shader_tree.c | 2 ++ source/blender/nodes/shader/node_shader_util.c | 2 +- source/blender/nodes/shader/node_shader_util.h | 2 +- source/blender/nodes/shader/nodes/node_shader_camera.c | 2 +- source/blender/nodes/shader/nodes/node_shader_common.c | 2 +- source/blender/nodes/shader/nodes/node_shader_curves.c | 2 +- source/blender/nodes/shader/nodes/node_shader_dynamic.c | 2 +- source/blender/nodes/shader/nodes/node_shader_geom.c | 2 +- source/blender/nodes/shader/nodes/node_shader_hueSatVal.c | 2 +- source/blender/nodes/shader/nodes/node_shader_invert.c | 2 +- source/blender/nodes/shader/nodes/node_shader_mapping.c | 2 +- source/blender/nodes/shader/nodes/node_shader_material.c | 2 +- source/blender/nodes/shader/nodes/node_shader_math.c | 2 +- source/blender/nodes/shader/nodes/node_shader_mixRgb.c | 2 +- source/blender/nodes/shader/nodes/node_shader_normal.c | 2 +- source/blender/nodes/shader/nodes/node_shader_output.c | 2 +- source/blender/nodes/shader/nodes/node_shader_rgb.c | 2 +- source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c | 2 +- source/blender/nodes/shader/nodes/node_shader_squeeze.c | 2 +- source/blender/nodes/shader/nodes/node_shader_texture.c | 2 +- source/blender/nodes/shader/nodes/node_shader_valToRgb.c | 2 +- source/blender/nodes/shader/nodes/node_shader_value.c | 2 +- source/blender/nodes/shader/nodes/node_shader_vectMath.c | 2 +- source/blender/nodes/texture/node_texture_tree.c | 2 ++ source/blender/nodes/texture/node_texture_util.c | 1 + source/blender/nodes/texture/node_texture_util.h | 1 + source/blender/nodes/texture/nodes/node_texture_at.c | 1 + source/blender/nodes/texture/nodes/node_texture_bricks.c | 1 + source/blender/nodes/texture/nodes/node_texture_checker.c | 1 + source/blender/nodes/texture/nodes/node_texture_common.c | 2 +- source/blender/nodes/texture/nodes/node_texture_compose.c | 1 + source/blender/nodes/texture/nodes/node_texture_coord.c | 1 + source/blender/nodes/texture/nodes/node_texture_curves.c | 1 + source/blender/nodes/texture/nodes/node_texture_decompose.c | 1 + source/blender/nodes/texture/nodes/node_texture_distance.c | 1 + source/blender/nodes/texture/nodes/node_texture_hueSatVal.c | 1 + source/blender/nodes/texture/nodes/node_texture_image.c | 2 +- source/blender/nodes/texture/nodes/node_texture_invert.c | 1 + source/blender/nodes/texture/nodes/node_texture_math.c | 1 + source/blender/nodes/texture/nodes/node_texture_mixRgb.c | 1 + source/blender/nodes/texture/nodes/node_texture_output.c | 1 + source/blender/nodes/texture/nodes/node_texture_proc.c | 1 + source/blender/nodes/texture/nodes/node_texture_rotate.c | 1 + source/blender/nodes/texture/nodes/node_texture_scale.c | 1 + source/blender/nodes/texture/nodes/node_texture_texture.c | 1 + source/blender/nodes/texture/nodes/node_texture_translate.c | 1 + source/blender/nodes/texture/nodes/node_texture_valToNor.c | 1 + source/blender/nodes/texture/nodes/node_texture_valToRgb.c | 2 +- source/blender/nodes/texture/nodes/node_texture_viewer.c | 1 + 117 files changed, 120 insertions(+), 82 deletions(-) diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h index ab56199079e..11ffcc9027f 100644 --- a/source/blender/nodes/NOD_composite.h +++ b/source/blender/nodes/NOD_composite.h @@ -1,5 +1,5 @@ /* - * $Id: CMP_node.h 36550 2011-05-08 16:08:08Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/NOD_shader.h b/source/blender/nodes/NOD_shader.h index 5bc0c381f0b..6c5ea79e1ee 100644 --- a/source/blender/nodes/NOD_shader.h +++ b/source/blender/nodes/NOD_shader.h @@ -1,5 +1,5 @@ /* - * $Id: SHD_node.h 36550 2011-05-08 16:08:08Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/NOD_socket.h b/source/blender/nodes/NOD_socket.h index 92e8a8e058d..9ddf159cd9c 100644 --- a/source/blender/nodes/NOD_socket.h +++ b/source/blender/nodes/NOD_socket.h @@ -1,4 +1,5 @@ /** + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/NOD_texture.h b/source/blender/nodes/NOD_texture.h index 6f30685aff1..d098c241583 100644 --- a/source/blender/nodes/NOD_texture.h +++ b/source/blender/nodes/NOD_texture.h @@ -1,5 +1,5 @@ /* - * $Id: TEX_node.h 36550 2011-05-08 16:08:08Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index 1a2fb04be8c..0ea62b0aa5f 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -1,4 +1,6 @@ /** + * $Id$ + * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c index f7759775af0..78f97c5289e 100644 --- a/source/blender/nodes/composite/node_composite_util.c +++ b/source/blender/nodes/composite/node_composite_util.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_util.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/node_composite_util.h b/source/blender/nodes/composite/node_composite_util.h index e3158b2a286..57ebe2191dd 100644 --- a/source/blender/nodes/composite/node_composite_util.h +++ b/source/blender/nodes/composite/node_composite_util.h @@ -1,5 +1,5 @@ /* - * $Id: CMP_util.h 35562 2011-03-15 20:10:32Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_alphaOver.c b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c index 400bdd92b6f..551f716e72b 100644 --- a/source/blender/nodes/composite/nodes/node_composite_alphaOver.c +++ b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_alphaOver.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c index e7a9ee12ca1..e8e6e164983 100644 --- a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c +++ b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c @@ -1,5 +1,5 @@ /* - * + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_blur.c b/source/blender/nodes/composite/nodes/node_composite_blur.c index 7b1a9623845..cd37404e677 100644 --- a/source/blender/nodes/composite/nodes/node_composite_blur.c +++ b/source/blender/nodes/composite/nodes/node_composite_blur.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_blur.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_brightness.c b/source/blender/nodes/composite/nodes/node_composite_brightness.c index 1a5cf956a52..55d890e6d31 100644 --- a/source/blender/nodes/composite/nodes/node_composite_brightness.c +++ b/source/blender/nodes/composite/nodes/node_composite_brightness.c @@ -1,5 +1,5 @@ /* -* $Id: CMP_brightness.c 36593 2011-05-10 11:19:26Z lukastoenne $ +* $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c index afdbe82aebc..1e3992a7185 100644 --- a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_channelMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c index db5e6d93856..49c90e85621 100644 --- a/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_chromaMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_colorMatte.c b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c index 7f687240daf..b17052ed542 100644 --- a/source/blender/nodes/composite/nodes/node_composite_colorMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_colorMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c index 18b6d806c82..418d6802cec 100644 --- a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c +++ b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_colorSpill.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c index 7ebceb5c206..6bce18c14ef 100644 --- a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c +++ b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c @@ -1,5 +1,5 @@ /* - * + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c index ab8cf663ef2..fbff8198dde 100644 --- a/source/blender/nodes/composite/nodes/node_composite_common.c +++ b/source/blender/nodes/composite/nodes/node_composite_common.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_blur.c 35562 2011-03-15 20:10:32Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_composite.c b/source/blender/nodes/composite/nodes/node_composite_composite.c index be6246b42d8..492e5c28459 100644 --- a/source/blender/nodes/composite/nodes/node_composite_composite.c +++ b/source/blender/nodes/composite/nodes/node_composite_composite.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_composite.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_crop.c b/source/blender/nodes/composite/nodes/node_composite_crop.c index 332ecf39616..b8c539b6d66 100644 --- a/source/blender/nodes/composite/nodes/node_composite_crop.c +++ b/source/blender/nodes/composite/nodes/node_composite_crop.c @@ -1,5 +1,5 @@ /* - * + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_curves.c b/source/blender/nodes/composite/nodes/node_composite_curves.c index a830b595321..58074eaca57 100644 --- a/source/blender/nodes/composite/nodes/node_composite_curves.c +++ b/source/blender/nodes/composite/nodes/node_composite_curves.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_curves.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_defocus.c b/source/blender/nodes/composite/nodes/node_composite_defocus.c index a218bfb009d..84a084591c5 100644 --- a/source/blender/nodes/composite/nodes/node_composite_defocus.c +++ b/source/blender/nodes/composite/nodes/node_composite_defocus.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_defocus.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_diffMatte.c b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c index a0fff88f5dc..23bcf57e2bc 100644 --- a/source/blender/nodes/composite/nodes/node_composite_diffMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_diffMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_dilate.c b/source/blender/nodes/composite/nodes/node_composite_dilate.c index ef47fdbfef0..c774045a12f 100644 --- a/source/blender/nodes/composite/nodes/node_composite_dilate.c +++ b/source/blender/nodes/composite/nodes/node_composite_dilate.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_dilate.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_directionalblur.c b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c index 3d541120a61..1a5e3150f53 100644 --- a/source/blender/nodes/composite/nodes/node_composite_directionalblur.c +++ b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_displace.c b/source/blender/nodes/composite/nodes/node_composite_displace.c index 4688553d27f..28d220eb4c9 100644 --- a/source/blender/nodes/composite/nodes/node_composite_displace.c +++ b/source/blender/nodes/composite/nodes/node_composite_displace.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_displace.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c index c895eab391c..b186be5500b 100644 --- a/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_distanceMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_filter.c b/source/blender/nodes/composite/nodes/node_composite_filter.c index 6beeec49c63..64a4c69b671 100644 --- a/source/blender/nodes/composite/nodes/node_composite_filter.c +++ b/source/blender/nodes/composite/nodes/node_composite_filter.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_filter.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_flip.c b/source/blender/nodes/composite/nodes/node_composite_flip.c index 026130641a3..931aacbe6fd 100644 --- a/source/blender/nodes/composite/nodes/node_composite_flip.c +++ b/source/blender/nodes/composite/nodes/node_composite_flip.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_flip.c 36333 2011-04-26 09:27:43Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_gamma.c b/source/blender/nodes/composite/nodes/node_composite_gamma.c index d191f649f1f..f1dd3d40c09 100644 --- a/source/blender/nodes/composite/nodes/node_composite_gamma.c +++ b/source/blender/nodes/composite/nodes/node_composite_gamma.c @@ -1,5 +1,5 @@ /* -* $Id: CMP_gamma.c 36593 2011-05-10 11:19:26Z lukastoenne $ +* $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_glare.c b/source/blender/nodes/composite/nodes/node_composite_glare.c index 0890b9ba24b..98a41e4af69 100644 --- a/source/blender/nodes/composite/nodes/node_composite_glare.c +++ b/source/blender/nodes/composite/nodes/node_composite_glare.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c index 525728ade31..1d060726b67 100644 --- a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c +++ b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_hueSatVal.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_huecorrect.c b/source/blender/nodes/composite/nodes/node_composite_huecorrect.c index edf26aed882..13a606e2c68 100644 --- a/source/blender/nodes/composite/nodes/node_composite_huecorrect.c +++ b/source/blender/nodes/composite/nodes/node_composite_huecorrect.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_huecorrect.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_idMask.c b/source/blender/nodes/composite/nodes/node_composite_idMask.c index 97d84997697..43f78a90add 100644 --- a/source/blender/nodes/composite/nodes/node_composite_idMask.c +++ b/source/blender/nodes/composite/nodes/node_composite_idMask.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_idMask.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c index 1278202d5b5..6149947233e 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.c +++ b/source/blender/nodes/composite/nodes/node_composite_image.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_image.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_invert.c b/source/blender/nodes/composite/nodes/node_composite_invert.c index 1f7589cae8f..fa64c9ec1b1 100644 --- a/source/blender/nodes/composite/nodes/node_composite_invert.c +++ b/source/blender/nodes/composite/nodes/node_composite_invert.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_invert.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_lensdist.c b/source/blender/nodes/composite/nodes/node_composite_lensdist.c index 85578deecbb..7d6c945a9e3 100644 --- a/source/blender/nodes/composite/nodes/node_composite_lensdist.c +++ b/source/blender/nodes/composite/nodes/node_composite_lensdist.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_levels.c b/source/blender/nodes/composite/nodes/node_composite_levels.c index 673ffe4cbef..e34788ff62b 100644 --- a/source/blender/nodes/composite/nodes/node_composite_levels.c +++ b/source/blender/nodes/composite/nodes/node_composite_levels.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_levels.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c index bc7676934fa..cac2a386801 100644 --- a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_lummaMatte.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_mapUV.c b/source/blender/nodes/composite/nodes/node_composite_mapUV.c index 2d92c26b554..b1cae62274b 100644 --- a/source/blender/nodes/composite/nodes/node_composite_mapUV.c +++ b/source/blender/nodes/composite/nodes/node_composite_mapUV.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_mapUV.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_mapValue.c b/source/blender/nodes/composite/nodes/node_composite_mapValue.c index 0d38aca4ce3..95e0f3dadd1 100644 --- a/source/blender/nodes/composite/nodes/node_composite_mapValue.c +++ b/source/blender/nodes/composite/nodes/node_composite_mapValue.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_mapValue.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_math.c b/source/blender/nodes/composite/nodes/node_composite_math.c index 2489491fdd8..a8a631bdbad 100644 --- a/source/blender/nodes/composite/nodes/node_composite_math.c +++ b/source/blender/nodes/composite/nodes/node_composite_math.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_math.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_mixrgb.c b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c index a5dcfcc44da..eaab24d628a 100644 --- a/source/blender/nodes/composite/nodes/node_composite_mixrgb.c +++ b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_mixrgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_normal.c b/source/blender/nodes/composite/nodes/node_composite_normal.c index 5f3c848903c..adf087019dc 100644 --- a/source/blender/nodes/composite/nodes/node_composite_normal.c +++ b/source/blender/nodes/composite/nodes/node_composite_normal.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_normal.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_normalize.c b/source/blender/nodes/composite/nodes/node_composite_normalize.c index 1c5c3b57b80..3a913b1a0a2 100644 --- a/source/blender/nodes/composite/nodes/node_composite_normalize.c +++ b/source/blender/nodes/composite/nodes/node_composite_normalize.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_normalize.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c index 13391a4a790..20203f66b5a 100644 --- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c +++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_outputFile.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_premulkey.c b/source/blender/nodes/composite/nodes/node_composite_premulkey.c index 066a8a81891..a3f958e04d9 100644 --- a/source/blender/nodes/composite/nodes/node_composite_premulkey.c +++ b/source/blender/nodes/composite/nodes/node_composite_premulkey.c @@ -1,5 +1,5 @@ /* -* $Id: CMP_premulkey.c 36333 2011-04-26 09:27:43Z lukastoenne $ +* $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_rgb.c b/source/blender/nodes/composite/nodes/node_composite_rgb.c index 41a13487edd..b9287a4978e 100644 --- a/source/blender/nodes/composite/nodes/node_composite_rgb.c +++ b/source/blender/nodes/composite/nodes/node_composite_rgb.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_rgb.c 36333 2011-04-26 09:27:43Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_rotate.c b/source/blender/nodes/composite/nodes/node_composite_rotate.c index 4ece562c508..2bbb77cd1da 100644 --- a/source/blender/nodes/composite/nodes/node_composite_rotate.c +++ b/source/blender/nodes/composite/nodes/node_composite_rotate.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_rotate.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_scale.c b/source/blender/nodes/composite/nodes/node_composite_scale.c index 4ba654e82d4..b6ad36f957f 100644 --- a/source/blender/nodes/composite/nodes/node_composite_scale.c +++ b/source/blender/nodes/composite/nodes/node_composite_scale.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_scale.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c index 5460427fd73..6b1813d2142 100644 --- a/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_sepcombHSVA.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c index a074d895acb..a60f6b81c95 100644 --- a/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_sepcombRGBA.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c index 61e88418e59..5e042f54fb0 100644 --- a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_sepcombYCCA.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c index 14f086300c0..70bc36a020d 100644 --- a/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_sepcombYUVA.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_setalpha.c b/source/blender/nodes/composite/nodes/node_composite_setalpha.c index 781d6f11614..8264d4d4dea 100644 --- a/source/blender/nodes/composite/nodes/node_composite_setalpha.c +++ b/source/blender/nodes/composite/nodes/node_composite_setalpha.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_setalpha.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_splitViewer.c b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c index d78faf69e26..e73caa542b7 100644 --- a/source/blender/nodes/composite/nodes/node_composite_splitViewer.c +++ b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_splitViewer.c 36340 2011-04-26 13:24:20Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_texture.c b/source/blender/nodes/composite/nodes/node_composite_texture.c index bdeef74c617..1dbbd56d2f1 100644 --- a/source/blender/nodes/composite/nodes/node_composite_texture.c +++ b/source/blender/nodes/composite/nodes/node_composite_texture.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_texture.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_tonemap.c b/source/blender/nodes/composite/nodes/node_composite_tonemap.c index 31ffed08c95..ba2dc9c5c79 100644 --- a/source/blender/nodes/composite/nodes/node_composite_tonemap.c +++ b/source/blender/nodes/composite/nodes/node_composite_tonemap.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_translate.c b/source/blender/nodes/composite/nodes/node_composite_translate.c index a07dfb936ae..872667a4e17 100644 --- a/source/blender/nodes/composite/nodes/node_composite_translate.c +++ b/source/blender/nodes/composite/nodes/node_composite_translate.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_translate.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_valToRgb.c b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c index 9481d769557..edd315e5a92 100644 --- a/source/blender/nodes/composite/nodes/node_composite_valToRgb.c +++ b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_valToRgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_value.c b/source/blender/nodes/composite/nodes/node_composite_value.c index e99b665f2ae..0bb558cfa9d 100644 --- a/source/blender/nodes/composite/nodes/node_composite_value.c +++ b/source/blender/nodes/composite/nodes/node_composite_value.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_value.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_vecBlur.c b/source/blender/nodes/composite/nodes/node_composite_vecBlur.c index e730728d077..26fcffa93ac 100644 --- a/source/blender/nodes/composite/nodes/node_composite_vecBlur.c +++ b/source/blender/nodes/composite/nodes/node_composite_vecBlur.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_vecBlur.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_viewer.c b/source/blender/nodes/composite/nodes/node_composite_viewer.c index bcfb45411f1..8b052c5db35 100644 --- a/source/blender/nodes/composite/nodes/node_composite_viewer.c +++ b/source/blender/nodes/composite/nodes/node_composite_viewer.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_viewer.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/composite/nodes/node_composite_zcombine.c b/source/blender/nodes/composite/nodes/node_composite_zcombine.c index dfed26be343..220b770198a 100644 --- a/source/blender/nodes/composite/nodes/node_composite_zcombine.c +++ b/source/blender/nodes/composite/nodes/node_composite_zcombine.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_zcombine.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c index 76203c52293..07f3eb943cc 100644 --- a/source/blender/nodes/intern/node_common.c +++ b/source/blender/nodes/intern/node_common.c @@ -1,4 +1,5 @@ /** + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/intern/node_common.h b/source/blender/nodes/intern/node_common.h index 31a13d8168d..2723c595380 100644 --- a/source/blender/nodes/intern/node_common.h +++ b/source/blender/nodes/intern/node_common.h @@ -1,4 +1,5 @@ /** + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c index 0d688438cf9..608347bc258 100644 --- a/source/blender/nodes/intern/node_exec.c +++ b/source/blender/nodes/intern/node_exec.c @@ -1,4 +1,5 @@ /** + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/intern/node_exec.h b/source/blender/nodes/intern/node_exec.h index 457e119613b..567c6ae56cf 100644 --- a/source/blender/nodes/intern/node_exec.h +++ b/source/blender/nodes/intern/node_exec.h @@ -1,4 +1,5 @@ /** + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c index ef8b3e797ce..3ea34dd094a 100644 --- a/source/blender/nodes/intern/node_socket.c +++ b/source/blender/nodes/intern/node_socket.c @@ -1,4 +1,5 @@ /** + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c index 620da7553b3..8cb1ebeb15f 100644 --- a/source/blender/nodes/shader/node_shader_tree.c +++ b/source/blender/nodes/shader/node_shader_tree.c @@ -1,4 +1,6 @@ /** + * $Id$ + * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c index cf910ba3f64..01dd0f7d5a1 100644 --- a/source/blender/nodes/shader/node_shader_util.c +++ b/source/blender/nodes/shader/node_shader_util.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_util.c 36549 2011-05-08 14:23:38Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h index 1cc04d95d6f..4c929c93517 100644 --- a/source/blender/nodes/shader/node_shader_util.h +++ b/source/blender/nodes/shader/node_shader_util.h @@ -1,5 +1,5 @@ /* - * $Id: SHD_util.h 36549 2011-05-08 14:23:38Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_camera.c b/source/blender/nodes/shader/nodes/node_shader_camera.c index ecb7c486dc4..c1e737fcb53 100644 --- a/source/blender/nodes/shader/nodes/node_shader_camera.c +++ b/source/blender/nodes/shader/nodes/node_shader_camera.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_camera.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_common.c b/source/blender/nodes/shader/nodes/node_shader_common.c index ab3638436f1..aa8e8241bf8 100644 --- a/source/blender/nodes/shader/nodes/node_shader_common.c +++ b/source/blender/nodes/shader/nodes/node_shader_common.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_blur.c 35562 2011-03-15 20:10:32Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_curves.c b/source/blender/nodes/shader/nodes/node_shader_curves.c index ded867ec441..9dedeba6d39 100644 --- a/source/blender/nodes/shader/nodes/node_shader_curves.c +++ b/source/blender/nodes/shader/nodes/node_shader_curves.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_curves.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_dynamic.c b/source/blender/nodes/shader/nodes/node_shader_dynamic.c index 6490ee00787..5aae54d858b 100644 --- a/source/blender/nodes/shader/nodes/node_shader_dynamic.c +++ b/source/blender/nodes/shader/nodes/node_shader_dynamic.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_dynamic.c 35927 2011-03-31 20:59:55Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_geom.c b/source/blender/nodes/shader/nodes/node_shader_geom.c index b88c5979b54..585d1e59d15 100644 --- a/source/blender/nodes/shader/nodes/node_shader_geom.c +++ b/source/blender/nodes/shader/nodes/node_shader_geom.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_geom.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c index ef1434b82ca..f4f69cf56fe 100644 --- a/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c +++ b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c @@ -1,5 +1,5 @@ /* - * + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_invert.c b/source/blender/nodes/shader/nodes/node_shader_invert.c index bd7e571f073..5347d98b42e 100644 --- a/source/blender/nodes/shader/nodes/node_shader_invert.c +++ b/source/blender/nodes/shader/nodes/node_shader_invert.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_invert.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_mapping.c b/source/blender/nodes/shader/nodes/node_shader_mapping.c index 21cea4853ad..05432708b29 100644 --- a/source/blender/nodes/shader/nodes/node_shader_mapping.c +++ b/source/blender/nodes/shader/nodes/node_shader_mapping.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_mapping.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_material.c b/source/blender/nodes/shader/nodes/node_shader_material.c index a0bfd430506..984bfed3ff9 100644 --- a/source/blender/nodes/shader/nodes/node_shader_material.c +++ b/source/blender/nodes/shader/nodes/node_shader_material.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_material.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c index 0618598379f..592779d6803 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.c +++ b/source/blender/nodes/shader/nodes/node_shader_math.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_math.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_mixRgb.c b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c index a89faa66fc0..a9e4f2129be 100644 --- a/source/blender/nodes/shader/nodes/node_shader_mixRgb.c +++ b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_mixRgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_normal.c b/source/blender/nodes/shader/nodes/node_shader_normal.c index 099a9bed10d..1ce7c61c593 100644 --- a/source/blender/nodes/shader/nodes/node_shader_normal.c +++ b/source/blender/nodes/shader/nodes/node_shader_normal.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_normal.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_output.c b/source/blender/nodes/shader/nodes/node_shader_output.c index 638af7d4eb3..94990bd9cf1 100644 --- a/source/blender/nodes/shader/nodes/node_shader_output.c +++ b/source/blender/nodes/shader/nodes/node_shader_output.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_output.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_rgb.c b/source/blender/nodes/shader/nodes/node_shader_rgb.c index c9bb78b45dd..d612e5c228f 100644 --- a/source/blender/nodes/shader/nodes/node_shader_rgb.c +++ b/source/blender/nodes/shader/nodes/node_shader_rgb.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_rgb.c 36481 2011-05-04 11:42:25Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c index 9528aca2574..15a8a4952fb 100644 --- a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c +++ b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c @@ -1,5 +1,5 @@ /* - * + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_squeeze.c b/source/blender/nodes/shader/nodes/node_shader_squeeze.c index 305639dff21..b9eb116b866 100644 --- a/source/blender/nodes/shader/nodes/node_shader_squeeze.c +++ b/source/blender/nodes/shader/nodes/node_shader_squeeze.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_squeeze.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_texture.c b/source/blender/nodes/shader/nodes/node_shader_texture.c index a4957d8f683..09716820800 100644 --- a/source/blender/nodes/shader/nodes/node_shader_texture.c +++ b/source/blender/nodes/shader/nodes/node_shader_texture.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_texture.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c index 9353143095a..5c1d3096a6e 100644 --- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c +++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_valToRgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_value.c b/source/blender/nodes/shader/nodes/node_shader_value.c index 21ff565306d..bbd3f8fc242 100644 --- a/source/blender/nodes/shader/nodes/node_shader_value.c +++ b/source/blender/nodes/shader/nodes/node_shader_value.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_value.c 36536 2011-05-07 13:27:27Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/shader/nodes/node_shader_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c index c6a081431a2..ca31d879e3e 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vectMath.c +++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c @@ -1,5 +1,5 @@ /* - * $Id: SHD_vectMath.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c index 75a57c64f2f..3ea15a316ab 100644 --- a/source/blender/nodes/texture/node_texture_tree.c +++ b/source/blender/nodes/texture/node_texture_tree.c @@ -1,4 +1,6 @@ /** + * $Id$ + * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/nodes/texture/node_texture_util.c b/source/blender/nodes/texture/node_texture_util.c index 5aedd8681ab..7b8f42aa925 100644 --- a/source/blender/nodes/texture/node_texture_util.c +++ b/source/blender/nodes/texture/node_texture_util.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h index 867b4142052..ccaf5df9897 100644 --- a/source/blender/nodes/texture/node_texture_util.h +++ b/source/blender/nodes/texture/node_texture_util.h @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_at.c b/source/blender/nodes/texture/nodes/node_texture_at.c index f3275f2bcdf..34993a93092 100644 --- a/source/blender/nodes/texture/nodes/node_texture_at.c +++ b/source/blender/nodes/texture/nodes/node_texture_at.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_bricks.c b/source/blender/nodes/texture/nodes/node_texture_bricks.c index 060ed791871..a9a82fe4d65 100644 --- a/source/blender/nodes/texture/nodes/node_texture_bricks.c +++ b/source/blender/nodes/texture/nodes/node_texture_bricks.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_checker.c b/source/blender/nodes/texture/nodes/node_texture_checker.c index 916ee80d66b..7762c9ef992 100644 --- a/source/blender/nodes/texture/nodes/node_texture_checker.c +++ b/source/blender/nodes/texture/nodes/node_texture_checker.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c index cb5102bae4e..afb24226416 100644 --- a/source/blender/nodes/texture/nodes/node_texture_common.c +++ b/source/blender/nodes/texture/nodes/node_texture_common.c @@ -1,5 +1,5 @@ /* - * $Id: CMP_blur.c 35562 2011-03-15 20:10:32Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_compose.c b/source/blender/nodes/texture/nodes/node_texture_compose.c index a11769173a3..d224ae793e2 100644 --- a/source/blender/nodes/texture/nodes/node_texture_compose.c +++ b/source/blender/nodes/texture/nodes/node_texture_compose.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_coord.c b/source/blender/nodes/texture/nodes/node_texture_coord.c index b2d9cecc164..2bfa2ff2314 100644 --- a/source/blender/nodes/texture/nodes/node_texture_coord.c +++ b/source/blender/nodes/texture/nodes/node_texture_coord.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_curves.c b/source/blender/nodes/texture/nodes/node_texture_curves.c index af6d880cc18..dd65f979bbe 100644 --- a/source/blender/nodes/texture/nodes/node_texture_curves.c +++ b/source/blender/nodes/texture/nodes/node_texture_curves.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_decompose.c b/source/blender/nodes/texture/nodes/node_texture_decompose.c index 312765f866e..016ee5498d8 100644 --- a/source/blender/nodes/texture/nodes/node_texture_decompose.c +++ b/source/blender/nodes/texture/nodes/node_texture_decompose.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_distance.c b/source/blender/nodes/texture/nodes/node_texture_distance.c index fe524baaa96..ef3f701d8f3 100644 --- a/source/blender/nodes/texture/nodes/node_texture_distance.c +++ b/source/blender/nodes/texture/nodes/node_texture_distance.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c index ebc2501cee3..cd7ebb18018 100644 --- a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c +++ b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_image.c b/source/blender/nodes/texture/nodes/node_texture_image.c index 1359cf4275f..6e749a80d99 100644 --- a/source/blender/nodes/texture/nodes/node_texture_image.c +++ b/source/blender/nodes/texture/nodes/node_texture_image.c @@ -1,5 +1,5 @@ /* - * $Id: TEX_image.c 36481 2011-05-04 11:42:25Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_invert.c b/source/blender/nodes/texture/nodes/node_texture_invert.c index 8ba4f292fec..d18bb86d5fa 100644 --- a/source/blender/nodes/texture/nodes/node_texture_invert.c +++ b/source/blender/nodes/texture/nodes/node_texture_invert.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c index 182bc37978f..04f399069c1 100644 --- a/source/blender/nodes/texture/nodes/node_texture_math.c +++ b/source/blender/nodes/texture/nodes/node_texture_math.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c index 8baac682b18..933a0302df8 100644 --- a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c +++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c index c321f5738a1..3095e224446 100644 --- a/source/blender/nodes/texture/nodes/node_texture_output.c +++ b/source/blender/nodes/texture/nodes/node_texture_output.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c index 8b4c25d85c9..237e4d6923d 100644 --- a/source/blender/nodes/texture/nodes/node_texture_proc.c +++ b/source/blender/nodes/texture/nodes/node_texture_proc.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_rotate.c b/source/blender/nodes/texture/nodes/node_texture_rotate.c index a788b9cbbde..afba9f199f9 100644 --- a/source/blender/nodes/texture/nodes/node_texture_rotate.c +++ b/source/blender/nodes/texture/nodes/node_texture_rotate.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c index 136dde0d52f..e3aee35977a 100644 --- a/source/blender/nodes/texture/nodes/node_texture_scale.c +++ b/source/blender/nodes/texture/nodes/node_texture_scale.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c index 10b9b8979f8..96d6325671a 100644 --- a/source/blender/nodes/texture/nodes/node_texture_texture.c +++ b/source/blender/nodes/texture/nodes/node_texture_texture.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_translate.c b/source/blender/nodes/texture/nodes/node_texture_translate.c index 395404a9411..b970bfbff76 100644 --- a/source/blender/nodes/texture/nodes/node_texture_translate.c +++ b/source/blender/nodes/texture/nodes/node_texture_translate.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_valToNor.c b/source/blender/nodes/texture/nodes/node_texture_valToNor.c index 62b457bc862..523f416568c 100644 --- a/source/blender/nodes/texture/nodes/node_texture_valToNor.c +++ b/source/blender/nodes/texture/nodes/node_texture_valToNor.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c index caca6fa97a4..6398a398b32 100644 --- a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c +++ b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c @@ -1,5 +1,5 @@ /* - * $Id: TEX_valToRgb.c 36593 2011-05-10 11:19:26Z lukastoenne $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/nodes/texture/nodes/node_texture_viewer.c b/source/blender/nodes/texture/nodes/node_texture_viewer.c index 01734f56937..b0aa74a83b2 100644 --- a/source/blender/nodes/texture/nodes/node_texture_viewer.c +++ b/source/blender/nodes/texture/nodes/node_texture_viewer.c @@ -1,4 +1,5 @@ /* + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * -- cgit v1.2.3 From 0c992c73a1d85ad63ad80cc93c3e716577f5566e Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Mon, 5 Sep 2011 22:15:07 +0000 Subject: Typofix --- intern/ghost/intern/GHOST_NDOFManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp index 51525df003e..c2e6f278c6b 100644 --- a/intern/ghost/intern/GHOST_NDOFManager.cpp +++ b/intern/ghost/intern/GHOST_NDOFManager.cpp @@ -366,11 +366,11 @@ void GHOST_NDOFManager::setDeadZone(float dz) } else if (dz > 0.5f) { // warn the rogue user/programmer, but allow it - GHOST_PRINT("ndof: dead zone of %.2f is rather high...\n", dz); + GHOST_PRINTF("ndof: dead zone of %.2f is rather high...\n", dz); } m_deadZone = dz; - GHOST_PRINT("ndof: dead zone set to %.2f\n", dz); + GHOST_PRINTF("ndof: dead zone set to %.2f\n", dz); } static bool atHomePosition(GHOST_TEventNDOFMotionData* ndof) -- cgit v1.2.3 From 0991bed4139e4a77ba81514ad1dfb6a852a41fa5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Sep 2011 23:40:52 +0000 Subject: fix some complier warnings and add -Wundef to CMake's default GCC warnings. --- CMakeLists.txt | 2 ++ intern/opennl/CMakeLists.txt | 7 +++++++ source/blender/blenkernel/intern/node.c | 2 +- source/blender/editors/space_node/node_draw.c | 2 +- source/blender/editors/space_node/node_edit.c | 1 - source/gameengine/Converter/BL_SkinDeformer.cpp | 2 -- source/gameengine/Converter/KX_BlenderSceneConverter.cpp | 6 ++++++ 7 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38ce8689855..b54b18aab37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1267,6 +1267,7 @@ if(CMAKE_COMPILER_IS_GNUCC) ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_POINTER_ARITH -Wpointer-arith) ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter) ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_WRITE_STRINGS -Wwrite-strings) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNDEFINED -Wundef) # disable because it gives warnings for printf() & friends. # ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DOUBLE_PROMOTION -Wdouble-promotion -Wno-error=double-promotion) ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable) @@ -1274,6 +1275,7 @@ if(CMAKE_COMPILER_IS_GNUCC) ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall) ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof) ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare) + ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEFINED -Wundef) elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") diff --git a/intern/opennl/CMakeLists.txt b/intern/opennl/CMakeLists.txt index 55b0bc5855f..7d6a579819e 100644 --- a/intern/opennl/CMakeLists.txt +++ b/intern/opennl/CMakeLists.txt @@ -31,6 +31,13 @@ remove_strict_flags() # and debug gives a lot of prints on UV unwrapping. developers can enable if they need to. remove_flag("-DDEBUG") + +# quiet compiler warnings about undefined defines +add_definitions( + -DDEBUGlevel=0 + -DPRNTlevel=0 +) + set(INC extern superlu diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 6f34383101d..481893b86a8 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -158,7 +158,7 @@ void ntreeInitTypes(bNodeTree *ntree) ntree->init |= NTREE_TYPE_INIT; } -static bNodeSocket *make_socket(bNodeTree *ntree, int in_out, const char *name, int type) +static bNodeSocket *make_socket(bNodeTree *UNUSED(ntree), int in_out, const char *name, int type) { bNodeSocketType *stype= ntreeGetSocketType(type); bNodeSocket *sock; diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index ec118bb3ca2..6be8978cb5b 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -549,7 +549,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN bNodeSocket *sock; rctf *rct= &node->totr; float iconofs; - float socket_size= NODE_SOCKSIZE*U.dpi/72; + /* float socket_size= NODE_SOCKSIZE*U.dpi/72; */ /* UNUSED */ float iconbutw= 0.8f*UI_UNIT_X; int color_id= node_get_colorid(node); char showname[128]; /* 128 used below */ diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 214f375855d..b5633d50997 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -2175,7 +2175,6 @@ static int node_duplicate_exec(bContext *C, wmOperator *op) bNode *node, *newnode, *lastnode; bNodeLink *link, *newlink, *lastlink; int keep_inputs = RNA_boolean_get(op->ptr, "keep_inputs"); - bNodeSocket *sock; ED_preview_kill_jobs(C); diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp index 3a379e8b0ed..98afcf877a1 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.cpp +++ b/source/gameengine/Converter/BL_SkinDeformer.cpp @@ -243,7 +243,6 @@ void BL_SkinDeformer::BGEDeformVerts() for (int i=0; itotvert; ++i) { float contrib = 0.f, weight, max_weight=0.f; - Bone *bone; bPoseChannel *pchan=NULL; MDeformVert *dvert; Eigen::Map norm(m_transnors[i]); @@ -266,7 +265,6 @@ void BL_SkinDeformer::BGEDeformVerts() if (index < numGroups && (pchan=m_dfnrToPC[index])) { weight = dvert->dw[j].weight; - bone = pchan->bone; if (weight) { diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 7191730187c..656dcfa3220 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -385,6 +385,12 @@ void KX_BlenderSceneConverter::ConvertScene(class KX_Scene* destinationscene, //This cache mecanism is buggy so I leave it disable and the memory leak //that would result from this is fixed in RemoveScene() m_map_mesh_to_gamemesh.clear(); + +#ifndef USE_BULLET + /* quiet compiler warning */ + (void)useDbvtCulling; +#endif + } // This function removes all entities stored in the converter for that scene -- cgit v1.2.3 From bf5a6531a61638b74b9e80e055e00c2b97483fdf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Sep 2011 23:46:08 +0000 Subject: replace define '#if FFTW3==1' --> '#ifdef WITH_FFTW3' --- intern/smoke/CMakeLists.txt | 2 +- intern/smoke/SConscript | 2 +- intern/smoke/intern/FFT_NOISE.h | 2 +- intern/smoke/intern/WTURBULENCE.cpp | 2 +- source/blender/makesrna/intern/CMakeLists.txt | 2 +- source/blender/makesrna/intern/SConscript | 2 +- source/blender/makesrna/intern/rna_smoke.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/intern/smoke/CMakeLists.txt b/intern/smoke/CMakeLists.txt index 094d398a83c..228ff6ec389 100644 --- a/intern/smoke/CMakeLists.txt +++ b/intern/smoke/CMakeLists.txt @@ -88,7 +88,7 @@ if(WITH_OPENMP) endif() if(WITH_FFTW3) - add_definitions(-DFFTW3=1) + add_definitions(-DWITH_FFTW3) list(APPEND INC ${FFTW3_INCLUDE_DIRS} ) diff --git a/intern/smoke/SConscript b/intern/smoke/SConscript index fa32c5f36c3..0511257d319 100644 --- a/intern/smoke/SConscript +++ b/intern/smoke/SConscript @@ -16,7 +16,7 @@ incs += ' ' + env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] incs += ' intern ../../extern/bullet2/src ../memutil ../guardealloc ' if env['WITH_BF_FFTW3']: - defs += ' FFTW3=1' + defs += ' WITH_FFTW3' incs += env['BF_FFTW3_INC'] env.BlenderLib ('bf_intern_smoke', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] ) diff --git a/intern/smoke/intern/FFT_NOISE.h b/intern/smoke/intern/FFT_NOISE.h index b0597d7b20c..a087b4e1391 100644 --- a/intern/smoke/intern/FFT_NOISE.h +++ b/intern/smoke/intern/FFT_NOISE.h @@ -25,7 +25,7 @@ #ifndef FFT_NOISE_H_ #define FFT_NOISE_H_ -#if FFTW3==1 +#ifdef WITH_FFTW3 #include #include #include diff --git a/intern/smoke/intern/WTURBULENCE.cpp b/intern/smoke/intern/WTURBULENCE.cpp index 9934e3017cf..cd18cf7b344 100644 --- a/intern/smoke/intern/WTURBULENCE.cpp +++ b/intern/smoke/intern/WTURBULENCE.cpp @@ -155,7 +155,7 @@ void WTURBULENCE::setNoise(int type) if(type == (1<<1)) // FFT { // needs fft - #if FFTW3==1 + #ifdef WITH_FFTW3 std::string noiseTileFilename = std::string("noise.fft"); generatTile_FFT(_noiseTile, noiseTileFilename); #endif diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 0307b5222d7..c2b46a3b69a 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -200,7 +200,7 @@ if(NOT WITH_MOD_FLUID) endif() if(WITH_FFTW3) - add_definitions(-DFFTW3=1) + add_definitions(-DWITH_FFTW3) endif() if(WITH_SDL) diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 24c892b96c4..5c2580e4b90 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -71,7 +71,7 @@ if env['WITH_BF_GAMEENGINE']: defs.append('WITH_GAMEENGINE') if env['WITH_BF_FFTW3']: - defs.append('FFTW3=1') + defs.append('WITH_FFTW3') if env['WITH_BF_SDL']: defs.append('WITH_SDL') diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index d439c2551f1..93ffa62a4c6 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -121,7 +121,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) static EnumPropertyItem prop_noise_type_items[] = { {MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""}, -#if FFTW3 == 1 +#ifdef WITH_FFTW3 {MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""}, #endif /* {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""}, */ -- cgit v1.2.3 From 67712c10c4ff3cad574c5daed0e22b30dc769bad Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 6 Sep 2011 00:12:34 +0000 Subject: fix for doc building after pepper merge, also WIP tips/tricks. --- doc/python_api/rst/info_tips_and_tricks.rst | 118 +++++++++++++++++++++++----- doc/python_api/sphinx_doc_gen.py | 1 + 2 files changed, 98 insertions(+), 21 deletions(-) diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst index bd5faf000c8..f4e68a4516c 100644 --- a/doc/python_api/rst/info_tips_and_tricks.rst +++ b/doc/python_api/rst/info_tips_and_tricks.rst @@ -1,34 +1,112 @@ -############### +*************** Tips and Tricks -############### +*************** Some of these are just python features that scripters may not have thaught to use with blender. -**************** Use The Terminal -**************** +================ + +When writing python scripts, its useful to have a terminal open, this is not the built-in python console but a terminal application which is used to start blender. + +There are 3 main uses for the terminal, these are: + +* You can see the output of `print()` as you're script runs, which is useful to view debug info. + +* The error tracebacks are printed in full to the terminal which wont always generate an error popup in blenders user interface (depending on how the script is executed). + +* If the script runs for too long or you accidentally enter an infinate loop, Ctrl+C in the terminal (Ctrl+Break on Windows) will quit the script early. + +.. note:: + For Linux and OSX users this means starting the terminal first, then running blender from within it. On Windows the terminal can be enabled from the help menu. -For Linux and OSX users this means starting the terminal first, then running blender from within it. on Windows the terminal can be enabled from the help menu. -******************** Run External Scripts -******************** +==================== + +Blenders text editor is fine for edits and writing small tests but it is not a full featured editor so for larger projects you'll probably want to use an external editor. + +Editing a text file externally and having the same text open in blender does work but isn't that optimal so here are 2 ways you can easily use an external file from blender. + + +Executing External Scripts +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This is the equivilent to running the script directly, referencing a scripts path from a 2 line textblock. + +.. code-block:: + + filename = "/full/path/to/myscript.py" + exec(compile(open(filename).read(), filename, 'exec')) + + +You might also want to reference the file relative to the blend file. + +.. code-block:: + + filename = "/full/path/to/script.py" + exec(compile(open(filename).read(), filename, 'exec')) + + +You might want to reference a script thats at the same location as the blend file. + +.. code-block:: + + import bpy + import os + + filename = os.path.join(os.path.basename(bpy.data.filepath), "myscript.py") + exec(compile(open(filename).read(), filename, 'exec')) + + +Executing Modules +^^^^^^^^^^^^^^^^^ + +This example shows loading a script in as a module and executing a module function. + +.. code-block:: + + import myscript + import imp + + imp.reload(myscript) + myscript.main() + + +Notice that the script is reloaded every time, this forces an update, normally the module stays cached in `sys.modules`. + +The main difference between this and executing the script directly is it has to call a function in the module, in this case `main()` but it can be any function, an advantage with this is you can pass argumnents to the function from this small script which is often useful for testing differnt settings quickly. + +The other issue with this is the script has to be in pythons module search path. +While this is not best practice - for testing you can extend the search path, this example adds the current blend files directory to the search path, then loads the script as a module. + +.. code-block:: + + import sys + import os + impory bpy + + blend_dir = os.path.basename(bpy.data.filepath) + if blend_dir not in sys.path: + sys.path.append(blend_dir) + + import myscript + import imp + imp.reload(myscript) + myscript.main() -****************** Don't Use Blender! -****************** +================== -****************** Use External Tools -****************** +================== -************** Bundled Python -************** +============== Blender from blender.org includes a compleate python installation on all platforms, this has the disadvantage that any extensions you have installed in you're systems python wont be found by blender. @@ -38,20 +116,18 @@ There are 2 ways around this: * copy the extensions into blender's python subdirectry so blender can access them, you could also copy the entire python installation into blenders subdirectory, replacing the one blender comes with. This works as long as the python versions match and the paths are created in the same location relative locations. Doing this has the advantage that you can redistribute this bundle to others with blender and/or the game player, including any extensions you rely on. -******** + Advanced -******** +======== -=================== Blender as a module -=================== +------------------- -============================ Python Safety (Build Option) -============================ +---------------------------- + -================= CTypes in Blender -================= +----------------- diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index e378dd19e73..661d41af4ef 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -578,6 +578,7 @@ def pycontext2sphinx(BASEPATH): "sequences": ("Sequence", True), "smoke": ("SmokeModifier", False), "soft_body": ("SoftBodyModifier", False), + "speaker": ("Speaker", False), "texture": ("Texture", False), "texture_slot": ("MaterialTextureSlot", False), "vertex_paint_object": ("Object", False), -- cgit v1.2.3 From fa32395b33f084d5c6c9d8026fd7d53335c9b41a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 6 Sep 2011 00:41:28 +0000 Subject: more minor doc fixes --- doc/python_api/rst/bgl.rst | 90 +++++++++++++++++----------------- doc/python_api/rst/info_quickstart.rst | 2 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/doc/python_api/rst/bgl.rst b/doc/python_api/rst/bgl.rst index 5f3158bf5dd..61400351d16 100644 --- a/doc/python_api/rst/bgl.rst +++ b/doc/python_api/rst/bgl.rst @@ -56,9 +56,9 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type n: int :arg n: Specifies the number of textures to be queried. - :type textures: :class:`Buffer` object I{type GL_INT} + :type textures: :class:`bgl.Buffer` object I{type GL_INT} :arg textures: Specifies an array containing the names of the textures to be queried - :type residences: :class:`Buffer` object I{type GL_INT}(boolean) + :type residences: :class:`bgl.Buffer` object I{type GL_INT}(boolean) :arg residences: An array in which the texture residence status in returned. The residence status of a texture named by an element of textures is returned in the corresponding element of residences. @@ -101,7 +101,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type xmove, ymove: float :arg xmove, ymove: Specify the x and y offsets to be added to the current raster position after the bitmap is drawn. - :type bitmap: :class:`Buffer` object I{type GL_BYTE} + :type bitmap: :class:`bgl.Buffer` object I{type GL_BYTE} :arg bitmap: Specifies the address of the bitmap image. @@ -139,7 +139,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg n: Specifies the number of display lists to be executed. :type type: Enumerated constant :arg type: Specifies the type of values in lists. - :type lists: :class:`Buffer` object + :type lists: :class:`bgl.Buffer` object :arg lists: Specifies the address of an array of name offsets in the display list. The pointer type is void because the offsets can be bytes, shorts, ints, or floats, depending on the value of type. @@ -217,7 +217,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type plane: Enumerated constant :arg plane: Specifies which clipping plane is being positioned. - :type equation: :class:`Buffer` object I{type GL_FLOAT}(double) + :type equation: :class:`bgl.Buffer` object I{type GL_FLOAT}(double) :arg equation: Specifies the address of an array of four double- precision floating-point values. These values are interpreted as a plane equation. @@ -340,7 +340,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type n: int :arg n: Specifies the number of textures to be deleted - :type textures: :class:`Buffer` I{GL_INT} + :type textures: :class:`bgl.Buffer` I{GL_INT} :arg textures: Specifies an array of textures to be deleted @@ -413,7 +413,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg format: Specifies the format of the pixel data. :type type: Enumerated constant :arg type: Specifies the data type for pixels. - :type pixels: :class:`Buffer` object + :type pixels: :class:`bgl.Buffer` object :arg pixels: Specifies a pointer to the pixel data. @@ -512,7 +512,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type type: Enumerated constant :arg type: Specifies a symbolic constant that describes the information that will be returned for each vertex. - :type buffer: :class:`Buffer` object I{GL_FLOAT} + :type buffer: :class:`bgl.Buffer` object I{GL_FLOAT} :arg buffer: Returns the feedback data. @@ -592,7 +592,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type n: int :arg n: Specifies the number of textures name to be generated. - :type textures: :class:`Buffer` object I{type GL_INT} + :type textures: :class:`bgl.Buffer` object I{type GL_INT} :arg textures: Specifies an array in which the generated textures names are stored. @@ -620,7 +620,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg plane: Specifies a clipping plane. The number of clipping planes depends on the implementation, but at least six clipping planes are supported. They are identified by symbolic names of the form GL_CLIP_PLANEi where 0 < i < GL_MAX_CLIP_PLANES. - :type equation: :class:`Buffer` object I{type GL_FLOAT} + :type equation: :class:`bgl.Buffer` object I{type GL_FLOAT} :arg equation: Returns four float (double)-precision values that are the coefficients of the plane equation of plane in eye coordinates. The initial value is (0, 0, 0, 0). @@ -646,7 +646,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. names of the form GL_LIGHTi where 0 < i < GL_MAX_LIGHTS. :type pname: Enumerated constant :arg pname: Specifies a light source parameter for light. - :type params: :class:`Buffer` object. Depends on function prototype. + :type params: :class:`bgl.Buffer` object. Depends on function prototype. :arg params: Returns the requested data. @@ -662,7 +662,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg target: Specifies the symbolic name of a map. :type query: Enumerated constant :arg query: Specifies which parameter to return. - :type v: :class:`Buffer` object. Depends on function prototype. + :type v: :class:`bgl.Buffer` object. Depends on function prototype. :arg v: Returns the requested data. @@ -679,7 +679,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. representing the front and back materials, respectively. :type pname: Enumerated constant :arg pname: Specifies the material parameter to return. - :type params: :class:`Buffer` object. Depends on function prototype. + :type params: :class:`bgl.Buffer` object. Depends on function prototype. :arg params: Returns the requested data. @@ -693,7 +693,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type map: Enumerated constant :arg map: Specifies the name of the pixel map to return. - :type values: :class:`Buffer` object. Depends on function prototype. + :type values: :class:`bgl.Buffer` object. Depends on function prototype. :arg values: Returns the pixel map contents. @@ -703,7 +703,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. .. seealso:: `OpenGL Docs `_ - :type mask: :class:`Buffer` object I{type GL_BYTE} + :type mask: :class:`bgl.Buffer` object I{type GL_BYTE} :arg mask: Returns the stipple pattern. The initial value is all 1's. @@ -730,7 +730,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV. :type pname: Enumerated constant :arg pname: Specifies the symbolic name of a texture environment parameter. - :type params: :class:`Buffer` object. Depends on function prototype. + :type params: :class:`bgl.Buffer` object. Depends on function prototype. :arg params: Returns the requested data. @@ -746,7 +746,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg coord: Specifies a texture coordinate. :type pname: Enumerated constant :arg pname: Specifies the symbolic name of the value(s) to be returned. - :type params: :class:`Buffer` object. Depends on function prototype. + :type params: :class:`bgl.Buffer` object. Depends on function prototype. :arg params: Returns the requested data. @@ -765,7 +765,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg format: Specifies a pixel format for the returned data. :type type: Enumerated constant :arg type: Specifies a pixel type for the returned data. - :type pixels: :class:`Buffer` object. + :type pixels: :class:`bgl.Buffer` object. :arg pixels: Returns the texture image. Should be a pointer to an array of the type specified by type @@ -785,7 +785,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. Level 0 is the base image level. Level n is the nth mipmap reduction image. :type pname: Enumerated constant :arg pname: Specifies the symbolic name of a texture parameter. - :type params: :class:`Buffer` object. Depends on function prototype. + :type params: :class:`bgl.Buffer` object. Depends on function prototype. :arg params: Returns the requested data. @@ -801,7 +801,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg target: Specifies the symbolic name of the target texture. :type pname: Enumerated constant :arg pname: Specifies the symbolic name the target texture. - :type params: :class:`Buffer` object. Depends on function prototype. + :type params: :class:`bgl.Buffer` object. Depends on function prototype. :arg params: Returns the texture parameters. @@ -826,7 +826,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. .. seealso:: `OpenGL Docs `_ - :type c: :class:`Buffer` object. Depends on function prototype. + :type c: :class:`bgl.Buffer` object. Depends on function prototype. :arg c: Specifies a pointer to a one element array that contains the new value for the current color index. @@ -956,7 +956,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. .. seealso:: `OpenGL Docs `_ - :type m: :class:`Buffer` object. Depends on function prototype. + :type m: :class:`bgl.Buffer` object. Depends on function prototype. :arg m: Specifies a pointer to 16 consecutive values, which are used as the elements of a 4x4 column-major matrix. @@ -1002,7 +1002,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. occupy contiguous memory locations. :type order: int :arg order: Specifies the number of control points. Must be positive. - :type points: :class:`Buffer` object. Depends on function prototype. + :type points: :class:`bgl.Buffer` object. Depends on function prototype. :arg points: Specifies a pointer to the array of control points. @@ -1043,7 +1043,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type vorder: int :arg vorder: Specifies the dimension of the control point array in the v axis. Must be positive. The initial value is 1. - :type points: :class:`Buffer` object. Depends on function prototype. + :type points: :class:`bgl.Buffer` object. Depends on function prototype. :arg points: Specifies a pointer to the array of control points. @@ -1103,7 +1103,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. .. seealso:: `OpenGL Docs `_ - :type m: :class:`Buffer` object. Depends on function prototype. + :type m: :class:`bgl.Buffer` object. Depends on function prototype. :arg m: Points to 16 consecutive values that are used as the elements of a 4x4 column major matrix. @@ -1132,7 +1132,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type nx, ny, nz: Depends on function prototype. (non - 'v' prototypes only) :arg nx, ny, nz: Specify the x, y, and z coordinates of the new current normal. The initial value of the current normal is the unit vector, (0, 0, 1). - :type v: :class:`Buffer` object. Depends on function prototype. ('v' prototypes) + :type v: :class:`bgl.Buffer` object. Depends on function prototype. ('v' prototypes) :arg v: Specifies a pointer to an array of three elements: the x, y, and z coordinates of the new current normal. @@ -1177,7 +1177,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg map: Specifies a symbolic map name. :type mapsize: int :arg mapsize: Specifies the size of the map being defined. - :type values: :class:`Buffer` object. Depends on function prototype. + :type values: :class:`bgl.Buffer` object. Depends on function prototype. :arg values: Specifies an array of mapsize values. @@ -1266,7 +1266,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. .. seealso:: `OpenGL Docs `_ - :type mask: :class:`Buffer` object I{type GL_BYTE} + :type mask: :class:`bgl.Buffer` object I{type GL_BYTE} :arg mask: Specifies a pointer to a 32x32 stipple pattern that will be unpacked from memory in the same way that glDrawPixels unpacks pixels. @@ -1307,9 +1307,9 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type n: int :arg n: Specifies the number of textures to be prioritized. - :type textures: :class:`Buffer` I{type GL_INT} + :type textures: :class:`bgl.Buffer` I{type GL_INT} :arg textures: Specifies an array containing the names of the textures to be prioritized. - :type priorities: :class:`Buffer` I{type GL_FLOAT} + :type priorities: :class:`bgl.Buffer` I{type GL_FLOAT} :arg priorities: Specifies an array containing the texture priorities. A priority given in an element of priorities applies to the texture named by the corresponding element of textures. @@ -1417,7 +1417,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg format: Specifies the format of the pixel data. :type type: Enumerated constant :arg type: Specifies the data type of the pixel data. - :type pixels: :class:`Buffer` object + :type pixels: :class:`bgl.Buffer` object :arg pixels: Returns the pixel data. @@ -1496,7 +1496,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type size: int :arg size: Specifies the size of buffer - :type buffer: :class:`Buffer` I{type GL_INT} + :type buffer: :class:`bgl.Buffer` I{type GL_INT} :arg buffer: Returns the selection data @@ -1575,7 +1575,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type s, t, r, q: Depends on function prototype. (r and q for '3' and '4' prototypes only) :arg s, t, r, q: Specify s, t, r, and q texture coordinates. Not all parameters are present in all forms of the command. - :type v: :class:`Buffer` object. Depends on function prototype. (for 'v' prototypes only) + :type v: :class:`bgl.Buffer` object. Depends on function prototype. (for 'v' prototypes only) :arg v: Specifies a pointer to an array of one, two, three, or four elements, which in turn specify the s, t, r, and q texture coordinates. @@ -1642,7 +1642,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg format: Specifies the format of the pixel data. :type type: Enumerated constant :arg type: Specifies the data type of the pixel data. - :type pixels: :class:`Buffer` object. + :type pixels: :class:`bgl.Buffer` object. :arg pixels: Specifies a pointer to the image data in memory. @@ -1673,7 +1673,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg format: Specifies the format of the pixel data. :type type: Enumerated constant :arg type: Specifies the data type of the pixel data. - :type pixels: :class:`Buffer` object. + :type pixels: :class:`bgl.Buffer` object. :arg pixels: Specifies a pointer to the image data in memory. @@ -1720,7 +1720,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type x, y, z, w: Depends on function prototype (z and w for '3' and '4' prototypes only) :arg x, y, z, w: Specify x, y, z, and w coordinates of a vertex. Not all parameters are present in all forms of the command. - :type v: :class:`Buffer` object. Depends of function prototype (for 'v' + :type v: :class:`bgl.Buffer` object. Depends of function prototype (for 'v' prototypes only) :arg v: Specifies a pointer to an array of two, three, or four elements. The elements of a two-element array are x and y; of a three-element array, @@ -1795,7 +1795,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :arg x, y: Specify the center of a picking region in window coordinates. :type width, height: double :arg width, height: Specify the width and height, respectively, of the picking region in window coordinates. - :type viewport: :class:`Buffer` object. [int] + :type viewport: :class:`bgl.Buffer` object. [int] :arg viewport: Specifies the current viewport. @@ -1807,13 +1807,13 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type objx, objy, objz: double :arg objx, objy, objz: Specify the object coordinates. - :type modelMatrix: :class:`Buffer` object. [double] + :type modelMatrix: :class:`bgl.Buffer` object. [double] :arg modelMatrix: Specifies the current modelview matrix (as from a glGetDoublev call). - :type projMatrix: :class:`Buffer` object. [double] + :type projMatrix: :class:`bgl.Buffer` object. [double] :arg projMatrix: Specifies the current projection matrix (as from a glGetDoublev call). - :type viewport: :class:`Buffer` object. [int] + :type viewport: :class:`bgl.Buffer` object. [int] :arg viewport: Specifies the current viewport (as from a glGetIntegerv call). - :type winx, winy, winz: :class:`Buffer` object. [double] + :type winx, winy, winz: :class:`bgl.Buffer` object. [double] :arg winx, winy, winz: Return the computed window coordinates. @@ -1825,13 +1825,13 @@ OpenGL}" and the online NeHe tutorials are two of the best resources. :type winx, winy, winz: double :arg winx, winy, winz: Specify the window coordinates to be mapped. - :type modelMatrix: :class:`Buffer` object. [double] + :type modelMatrix: :class:`bgl.Buffer` object. [double] :arg modelMatrix: Specifies the current modelview matrix (as from a glGetDoublev call). - :type projMatrix: :class:`Buffer` object. [double] + :type projMatrix: :class:`bgl.Buffer` object. [double] :arg projMatrix: Specifies the current projection matrix (as from a glGetDoublev call). - :type viewport: :class:`Buffer` object. [int] + :type viewport: :class:`bgl.Buffer` object. [int] :arg viewport: Specifies the current viewport (as from a glGetIntegerv call). - :type objx, objy, objz: :class:`Buffer` object. [double] + :type objx, objy, objz: :class:`bgl.Buffer` object. [double] :arg objx, objy, objz: Return the computed object coordinates. diff --git a/doc/python_api/rst/info_quickstart.rst b/doc/python_api/rst/info_quickstart.rst index e77e9a76d7f..751e5e1ec61 100644 --- a/doc/python_api/rst/info_quickstart.rst +++ b/doc/python_api/rst/info_quickstart.rst @@ -156,7 +156,7 @@ Note that these properties can only be assigned basic Python types. * array of ints/floats -* dictionary (only string keys types on this list) +* dictionary (only string keys are supported, values must be basic types too) These properties are valid outside of Python. They can be animated by curves or used in driver paths. -- cgit v1.2.3 From a41f45946f8bf7b58e2b6bc048bfa30015e4ba2f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 6 Sep 2011 07:08:20 +0000 Subject: fix for error in strinc.c's BLI_strescape --- source/blender/blenlib/intern/string.c | 4 +++- source/blender/makesrna/intern/rna_access.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index c4ed44f0cdb..ae5fa40f3b9 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -129,7 +129,7 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen) while(len < maxlen) { switch(*src) { case '\0': - break; + goto escape_finish; case '\\': case '"': @@ -154,6 +154,8 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen) len++; } +escape_finish: + *dst= '\0'; return len; diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 936f2e5e40c..e7d0c5cdec2 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4407,7 +4407,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop) buf= MEM_mallocN(sizeof(char)*(length+1), "RNA_property_as_string"); buf_esc= MEM_mallocN(sizeof(char)*(length*2+1), "RNA_property_as_string esc"); RNA_property_string_get(ptr, prop, buf); - BLI_strescape(buf_esc, buf, length*2); + BLI_strescape(buf_esc, buf, length*2+1); MEM_freeN(buf); BLI_dynstr_appendf(dynstr, "\"%s\"", buf_esc); MEM_freeN(buf_esc); -- cgit v1.2.3 From c94fe5e2995873536cbdb180652b1aa027e4ef8d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 6 Sep 2011 07:59:18 +0000 Subject: Grease pencil: non-blocking sketch sessions - Implement own undo stack for grease pencil, so now there'll be no keymaps conflicts. - Supported redo's during sketch session. - Get rid of flag stored in Globals -- use undo stack to check if grease pencil session is active. --- source/blender/blenkernel/BKE_global.h | 2 +- source/blender/editors/gpencil/CMakeLists.txt | 1 + source/blender/editors/gpencil/drawgpencil.c | 2 +- source/blender/editors/gpencil/gpencil_intern.h | 6 + source/blender/editors/gpencil/gpencil_paint.c | 136 ++++++++++--------- source/blender/editors/gpencil/gpencil_undo.c | 168 ++++++++++++++++++++++++ source/blender/editors/include/ED_gpencil.h | 4 + source/blender/editors/util/undo.c | 6 + 8 files changed, 263 insertions(+), 62 deletions(-) create mode 100644 source/blender/editors/gpencil/gpencil_undo.c diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 17876c6ec9d..0e48673f1b1 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -111,7 +111,7 @@ typedef struct Global { #define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */ /* #define G_NOFROZEN (1 << 17) also removed */ -#define G_GREASEPENCIL (1 << 17) +/* #define G_GREASEPENCIL (1 << 17) also removed */ /* #define G_AUTOMATKEYS (1 << 30) also removed */ diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt index 7a2f196fd6d..b312f397939 100644 --- a/source/blender/editors/gpencil/CMakeLists.txt +++ b/source/blender/editors/gpencil/CMakeLists.txt @@ -42,6 +42,7 @@ set(SRC gpencil_edit.c gpencil_ops.c gpencil_paint.c + gpencil_undo.c gpencil_intern.h ) diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 440d5ee7c4d..cfa9585868e 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -644,7 +644,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy /* Check if may need to draw the active stroke cache, only if this layer is the active layer * that is being edited. (Stroke buffer is currently stored in gp-data) */ - if ((G.f & G_GREASEPENCIL) && (gpl->flag & GP_LAYER_ACTIVE) && + if (ED_gpencil_session_active() && (gpl->flag & GP_LAYER_ACTIVE) && (gpf->flag & GP_FRAME_PAINT)) { /* Buffer stroke needs to be drawn with a different linestyle to help differentiate them from normal strokes. */ diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index c31de8d30a7..db4315a8ca6 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -37,6 +37,7 @@ /* ***************************************************** */ /* Operator Defines */ +struct bGPdata; struct wmOperatorType; /* drawing ---------- */ @@ -61,6 +62,11 @@ void GPENCIL_OT_active_frame_delete(struct wmOperatorType *ot); void GPENCIL_OT_convert(struct wmOperatorType *ot); +/* undo stack ---------- */ + +void gpencil_undo_init(struct bGPdata *gpd); +void gpencil_undo_push(struct bGPdata *gpd); +void gpencil_undo_finish(void); /******************************************************* */ /* FILTERED ACTION DATA - TYPES ---> XXX DEPRECEATED OLD ANIM SYSTEM CODE! */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 04565eab155..df5fa65c980 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -152,7 +152,7 @@ static int gpencil_draw_poll (bContext *C) /* check if current context can support GPencil data */ if (gpencil_data_get_pointers(C, NULL) != NULL) { /* check if Grease Pencil isn't already running */ - if ((G.f & G_GREASEPENCIL) == 0) + if (ED_gpencil_session_active() == 0) return 1; else CTX_wm_operator_poll_msg_set(C, "Grease Pencil operator is already active"); @@ -893,8 +893,10 @@ static void gp_session_validatebuffer (tGPsdata *p) /* clear memory of buffer (or allocate it if starting a new session) */ if (gpd->sbuffer) memset(gpd->sbuffer, 0, sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX); - else + else { + //printf("\t\tGP - allocate sbuffer\n"); gpd->sbuffer= MEM_callocN(sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX, "gp_session_strokebuffer"); + } /* reset indices */ gpd->sbuffer_size = 0; @@ -1051,8 +1053,11 @@ static tGPsdata *gp_session_initpaint (bContext *C) p->gpd= *gpd_ptr; } - /* set edit flags - so that buffer will get drawn */ - G.f |= G_GREASEPENCIL; + if(ED_gpencil_session_active()==0) { + /* initialize undo stack, + also, existing undo stack would make buffer drawn */ + gpencil_undo_init(p->gpd); + } /* clear out buffer (stored in gp-data), in case something contaminated it */ gp_session_validatebuffer(p); @@ -1078,6 +1083,7 @@ static void gp_session_cleanup (tGPsdata *p) /* free stroke buffer */ if (gpd->sbuffer) { + //printf("\t\tGP - free sbuffer\n"); MEM_freeN(gpd->sbuffer); gpd->sbuffer= NULL; } @@ -1247,7 +1253,8 @@ static void gp_paint_strokeend (tGPsdata *p) static void gp_paint_cleanup (tGPsdata *p) { /* finish off a stroke */ - gp_paint_strokeend(p); + if(p->gpd) + gp_paint_strokeend(p); /* "unlock" frame */ if (p->gpf) @@ -1260,8 +1267,8 @@ static void gpencil_draw_exit (bContext *C, wmOperator *op) { tGPsdata *p= op->customdata; - /* clear edit flags */ - G.f &= ~G_GREASEPENCIL; + /* clear undo stack */ + gpencil_undo_finish(); /* restore cursor to indicate end of drawing */ WM_cursor_restore(CTX_wm_window(C)); @@ -1592,6 +1599,7 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event) //printf("\tGP - hotkey invoked... waiting for click-drag\n"); } + WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL, NULL); /* add a modal handler for this operator, so that we can then draw continuous strokes */ WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; @@ -1609,16 +1617,60 @@ static int gpencil_area_exists(bContext *C, ScrArea *satest) return 0; } +static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op) +{ + tGPsdata *p= op->customdata; + + /* we must check that we're still within the area that we're set up to work from + * otherwise we could crash (see bug #20586) + */ + if (CTX_wm_area(C) != p->sa) { + printf("\t\t\tGP - wrong area execution abort! \n"); + p->status= GP_STATUS_ERROR; + } + + /* free pointer used by previous stroke */ + if(p) + MEM_freeN(p); + + //printf("\t\tGP - start stroke \n"); + + /* we may need to set up paint env again if we're resuming */ + // XXX: watch it with the paintmode! in future, it'd be nice to allow changing paint-mode when in sketching-sessions + // XXX: with tablet events, we may event want to check for eraser here, for nicer tablet support + + gpencil_draw_init(C, op); + + p= op->customdata; + + if(p->status != GP_STATUS_ERROR) + p->status= GP_STATUS_PAINTING; + + return op->customdata; +} + +static void gpencil_stroke_end(wmOperator *op) +{ + tGPsdata *p= op->customdata; + + gp_paint_cleanup(p); + + gpencil_undo_push(p->gpd); + + gp_session_cleanup(p); + + p->status= GP_STATUS_IDLING; + + p->gpd= NULL; + p->gpl= NULL; + p->gpf= NULL; +} + /* events handling during interactive drawing part of operator */ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) { tGPsdata *p= op->customdata; - //int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */ - /* currently, grease pencil conflicts with such operators as undo and set object mode - which makes behavior of operator totally unpredictable and crash for some cases. - the only way to solve this proper is to ger rid of pointers to data which can - chage stored in operator custom data (sergey) */ - int estate = OPERATOR_RUNNING_MODAL; + int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */ // if (event->type == NDOF_MOTION) // return OPERATOR_PASS_THROUGH; @@ -1652,11 +1704,13 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) if (GPENCIL_SKETCH_SESSIONS_ON(p->scene)) { /* end stroke only, and then wait to resume painting soon */ //printf("\t\tGP - end stroke only\n"); - gp_paint_cleanup(p); - p->status= GP_STATUS_IDLING; + gpencil_stroke_end(op); /* we've just entered idling state, so this event was processed (but no others yet) */ estate = OPERATOR_RUNNING_MODAL; + + /* stroke could be smoothed, send notifier to refresh screen */ + ED_region_tag_redraw(p->ar); } else { //printf("\t\tGP - end of stroke + op\n"); @@ -1664,35 +1718,19 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) estate = OPERATOR_FINISHED; } } - else { + else if (event->val == KM_PRESS) { /* not painting, so start stroke (this should be mouse-button down) */ - /* we must check that we're still within the area that we're set up to work from - * otherwise we could crash (see bug #20586) - */ - if (CTX_wm_area(C) != p->sa) { - //printf("\t\t\tGP - wrong area execution abort! \n"); - p->status= GP_STATUS_ERROR; + p= gpencil_stroke_begin(C, op); + + if (p->status == GP_STATUS_ERROR) { estate = OPERATOR_CANCELLED; } - else { - //printf("\t\tGP - start stroke \n"); - p->status= GP_STATUS_PAINTING; - - /* we may need to set up paint env again if we're resuming */ - // XXX: watch it with the paintmode! in future, it'd be nice to allow changing paint-mode when in sketching-sessions - // XXX: with tablet events, we may event want to check for eraser here, for nicer tablet support - gp_paint_initstroke(p, p->paintmode); - - if (p->status == GP_STATUS_ERROR) { - estate = OPERATOR_CANCELLED; - } - } + } else { + p->status = GP_STATUS_IDLING; } } - - /* handle mode-specific events */ if (p->status == GP_STATUS_PAINTING) { /* handle painting mouse-movements? */ @@ -1704,7 +1742,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) /* finish painting operation if anything went wrong just now */ if (p->status == GP_STATUS_ERROR) { - //printf("\t\t\t\tGP - add error done! \n"); + printf("\t\t\t\tGP - add error done! \n"); estate = OPERATOR_CANCELLED; } else { @@ -1721,28 +1759,6 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) estate = OPERATOR_RUNNING_MODAL; } } - else if (p->status == GP_STATUS_IDLING) { - /* standard undo/redo shouldn't be allowed to execute or else it causes crashes, so catch it here */ - // FIXME: this is a hardcoded hotkey that can't be changed - // TODO: catch redo as well, but how? - if (event->type == ZKEY && event->val == KM_RELEASE) { - /* oskey = cmd key on macs as they seem to use cmd-z for undo as well? */ - if ((event->ctrl) || (event->oskey)) { - /* just delete last stroke, which will look like undo to the end user */ - //printf("caught attempted undo event... deleting last stroke \n"); - gpencil_frame_delete_laststroke(p->gpl, p->gpf); - /* undoing the last line can free p->gpf - * note, could do this in a bit more of an elegant way then a search but it at least prevents a crash */ - if(BLI_findindex(&p->gpl->frames, p->gpf) == -1) { - p->gpf= NULL; - } - - /* event handled, so force refresh */ - ED_region_tag_redraw(p->ar); /* just active area for now, since doing whole screen is too slow */ - estate = OPERATOR_RUNNING_MODAL; - } - } - } /* gpencil modal operator stores area, which can be removed while using it (like fullscreen) */ if(0==gpencil_area_exists(C, p->sa)) diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c new file mode 100644 index 00000000000..1154975e3cc --- /dev/null +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -0,0 +1,168 @@ +/* + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 Blender Foundation. + * All rights reserved. + * + * + * Contributor(s): Blender Foundation, + * Sergey Sharybin + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include +#include + +#include "MEM_guardedalloc.h" + +#include "DNA_gpencil_types.h" +#include "DNA_listBase.h" +#include "DNA_windowmanager_types.h" + +#include "BKE_context.h" +#include "BKE_gpencil.h" + +#include "BLI_listbase.h" + +#include "ED_gpencil.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "gpencil_intern.h" + +#define MAXUNDONAME 64 + +typedef struct bGPundonode { + struct bGPundonode *next, *prev; + + char name[MAXUNDONAME]; + struct bGPdata *gpd; +} bGPundonode; + +static ListBase undo_nodes = {NULL, NULL}; +static bGPundonode *cur_node = NULL; + +int ED_gpencil_session_active(void) +{ + return undo_nodes.first != NULL; +} + +int ED_undo_gpencil_step(bContext *C, int step, const char *name) +{ + bGPdata **gpd_ptr= NULL, *new_gpd= NULL; + + gpd_ptr= gpencil_data_get_pointers(C, NULL); + + if(step==1) { /* undo */ + //printf("\t\tGP - undo step\n"); + if(cur_node->prev) { + if(!name || strcmp(cur_node->name, name) == 0) { + cur_node= cur_node->prev; + new_gpd= cur_node->gpd; + } + } + } + else if (step==-1) { + //printf("\t\tGP - redo step\n"); + if(cur_node->next) { + if(!name || strcmp(cur_node->name, name) == 0) { + cur_node= cur_node->next; + new_gpd= cur_node->gpd; + } + } + } + + if(new_gpd) { + if(gpd_ptr) { + if(*gpd_ptr) { + bGPdata *gpd= *gpd_ptr; + bGPDlayer *gpl, *gpld; + + free_gpencil_layers(&gpd->layers); + + /* copy layers */ + gpd->layers.first= gpd->layers.last= NULL; + + for (gpl= new_gpd->layers.first; gpl; gpl= gpl->next) { + /* make a copy of source layer and its data */ + gpld= gpencil_layer_duplicate(gpl); + BLI_addtail(&gpd->layers, gpld); + } + } + } + } + + WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); + + return OPERATOR_FINISHED; +} + +void gpencil_undo_init(bGPdata *gpd) +{ + gpencil_undo_push(gpd); +} + +void gpencil_undo_push(bGPdata *gpd) +{ + bGPundonode *undo_node; + + //printf("\t\tGP - undo push\n"); + + if(cur_node) { + /* remove all un-done nodes from stack */ + undo_node= cur_node->next; + + while(undo_node) { + bGPundonode *next_node= undo_node->next; + + free_gpencil_data(undo_node->gpd); + MEM_freeN(undo_node->gpd); + + BLI_freelinkN(&undo_nodes, undo_node); + + undo_node= next_node; + } + } + + /* create new undo node */ + undo_node= MEM_callocN(sizeof(bGPundonode), "gpencil undo node"); + undo_node->gpd= gpencil_data_duplicate(gpd); + + cur_node= undo_node; + + BLI_addtail(&undo_nodes, undo_node); +} + +void gpencil_undo_finish(void) +{ + bGPundonode *undo_node= undo_nodes.first; + + while(undo_node) { + free_gpencil_data(undo_node->gpd); + MEM_freeN(undo_node->gpd); + + undo_node= undo_node->next; + } + + BLI_freelistN(&undo_nodes); + + cur_node= NULL; +} diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 07dcc959e32..bfd16487ae5 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -106,4 +106,8 @@ void paste_gpdata(void); void snap_gplayer_frames(struct bGPDlayer *gpl, short mode); void mirror_gplayer_frames(struct bGPDlayer *gpl, short mode); +/* ------------ Grease-Pencil Undo System ------------------ */ +int ED_gpencil_session_active(void); +int ED_undo_gpencil_step(struct bContext *C, int step, const char *name); + #endif /* ED_GPENCIL_H */ diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index a2381a208ef..c1aca61f795 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -54,6 +54,7 @@ #include "ED_armature.h" #include "ED_particle.h" #include "ED_curve.h" +#include "ED_gpencil.h" #include "ED_mball.h" #include "ED_mesh.h" #include "ED_object.h" @@ -126,6 +127,11 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) Object *obact= CTX_data_active_object(C); ScrArea *sa= CTX_wm_area(C); + /* grease pencil can be can be used in plenty of spaces, so check it first */ + if(ED_gpencil_session_active()) { + return ED_undo_gpencil_step(C, step, undoname); + } + if(sa && sa->spacetype==SPACE_IMAGE) { SpaceImage *sima= (SpaceImage *)sa->spacedata.first; -- cgit v1.2.3 From 82f7a5e3a25492eb58a0c0ec1933309c37d17e28 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Tue, 6 Sep 2011 08:28:06 +0000 Subject: Fix for #28517, group nodes losing all links from older files. The reason was that group nodes tried to reconstruct sockets from the template lists, which are empty. Now the verification function checks if there are any sockets in the template lists, which are always empty for group nodes. --- source/blender/nodes/intern/node_socket.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c index 3ea34dd094a..aabaf5b86de 100644 --- a/source/blender/nodes/intern/node_socket.c +++ b/source/blender/nodes/intern/node_socket.c @@ -422,7 +422,11 @@ static void verify_socket_template_list(bNodeTree *ntree, bNode *node, int in_ou void node_verify_socket_templates(bNodeTree *ntree, bNode *node) { bNodeType *ntype= node->typeinfo; - if(ntype) { + /* XXX Small trick: don't try to match socket lists when there are no templates. + * This also prevents group node sockets from being removed, without the need to explicitly + * check the node type here. + */ + if(ntype && ((ntype->inputs && ntype->inputs[0].type>=0) || (ntype->outputs && ntype->outputs[0].type>=0))) { verify_socket_template_list(ntree, node, SOCK_IN, &node->inputs, ntype->inputs); verify_socket_template_list(ntree, node, SOCK_OUT, &node->outputs, ntype->outputs); } -- cgit v1.2.3 From 32287bebe82615b8500ef0196b7b780745147835 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 6 Sep 2011 08:30:17 +0000 Subject: New grease pencil mode: poly line drawing - It's like sketch mode for lines, but you're specifying line knots by clicking on position you want to add next knot. - View can be navigated between knots creation. - Holding LMB down and sliding mouse will lead to new segment preview so it can be created more accurate. Additional change: fixed GP->Bezier conversion. Last point used to be ignored in this operator. --- .../scripts/startup/bl_ui/space_view3d_toolbar.py | 3 + source/blender/editors/gpencil/gpencil_edit.c | 4 +- source/blender/editors/gpencil/gpencil_intern.h | 1 + source/blender/editors/gpencil/gpencil_ops.c | 3 + source/blender/editors/gpencil/gpencil_paint.c | 130 ++++++++++++++++----- 5 files changed, 112 insertions(+), 29 deletions(-) diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index b71593add96..aa26cb43eed 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -54,6 +54,9 @@ def draw_gpencil_tools(context, layout): row = col.row() row.operator("gpencil.draw", text="Draw").mode = 'DRAW' row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT' + + row = col.row() + row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY' row.operator("gpencil.draw", text="Erase").mode = 'ERASER' row = col.row() diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 9dc764b7aac..1cd8b1f05db 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -511,8 +511,8 @@ static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, C copy_v3_v3(p3d_prev, p3d_cur); copy_v3_v3(p3d_cur, p3d_next); - if (i + 1 < tot) { - gp_strokepoint_convertcoords(C, gps, pt+1, p3d_next, subrect); + if (i + 2 < tot) { + gp_strokepoint_convertcoords(C, gps, pt + 2, p3d_next, subrect); } } diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index db4315a8ca6..8000af54f53 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -49,6 +49,7 @@ typedef enum eGPencil_PaintModes { GP_PAINTMODE_DRAW = 0, GP_PAINTMODE_ERASER, GP_PAINTMODE_DRAW_STRAIGHT, + GP_PAINTMODE_DRAW_POLY } eGPencil_PaintModes; /* buttons editing --- */ diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index e1e4c8d5457..150e0ba90e4 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -59,6 +59,9 @@ void ED_keymap_gpencil(wmKeyConfig *keyconf) /* draw - straight lines */ kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, KM_CTRL, DKEY); RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_STRAIGHT); + /* draw - poly lines */ + kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, KM_CTRL, DKEY); + RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_POLY); /* erase */ kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, 0, DKEY); RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_ERASER); diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index df5fa65c980..460408c6269 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -124,6 +124,7 @@ enum { /* Runtime flags */ enum { GP_PAINTFLAG_FIRSTRUN = (1<<0), /* operator just started */ + GP_PAINTFLAG_STROKEADDED = (1<<1) /* stroke was already added during draw session */ }; /* ------ */ @@ -375,6 +376,43 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure) else return GP_STROKEADD_NORMAL; } + else if (p->paintmode == GP_PAINTMODE_DRAW_POLY) { + /* get pointer to destination point */ + pt= (tGPspoint *)(gpd->sbuffer); + + /* store settings */ + pt->x= mval[0]; + pt->y= mval[1]; + pt->pressure= pressure; + + /* if there's stroke fir this poly line session add (or replace last) point + to stroke. This allows to draw lines more interactively (see new segment + during mouse slide, i.e.) */ + if (p->flags & GP_PAINTFLAG_STROKEADDED) { + bGPDstroke *gps= p->gpf->strokes.last; + bGPDspoint *pts; + + /* first time point is adding to temporary buffer -- need to allocate new point in stroke */ + if (gpd->sbuffer_size == 0) { + gps->points = MEM_reallocN(gps->points, sizeof(bGPDspoint)*(gps->totpoints+1)); + gps->totpoints++; + } + + pts = &gps->points[gps->totpoints-1]; + + /* convert screen-coordinates to appropriate coordinates (and store them) */ + gp_stroke_convertcoords(p, &pt->x, &pts->x, NULL); + + /* copy pressure */ + pts->pressure= pt->pressure; + } + + /* increment counters */ + if (gpd->sbuffer_size == 0) + gpd->sbuffer_size++; + + return GP_STROKEADD_NORMAL; + } /* return invalid state for now... */ return GP_STROKEADD_INVALID; @@ -395,7 +433,7 @@ static void gp_stroke_smooth (tGPsdata *p) int i=0, cmx=gpd->sbuffer_size; /* only smooth if smoothing is enabled, and we're not doing a straight line */ - if (!(U.gp_settings & GP_PAINT_DOSMOOTH) || (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT)) + if (!(U.gp_settings & GP_PAINT_DOSMOOTH) || ELEM(p->paintmode, GP_PAINTMODE_DRAW_STRAIGHT, GP_PAINTMODE_DRAW_POLY)) return; /* don't try if less than 2 points in buffer */ @@ -527,17 +565,28 @@ static void gp_stroke_newfrombuffer (tGPsdata *p) return; } + /* special case for poly line -- for already added stroke during session + coordinates are getting added to stroke immediatelly to allow more + interactive behavior */ + if (p->paintmode == GP_PAINTMODE_DRAW_POLY) { + if (p->flags & GP_PAINTFLAG_STROKEADDED) + return; + } + /* allocate memory for a new stroke */ gps= MEM_callocN(sizeof(bGPDstroke), "gp_stroke"); - /* allocate enough memory for a continuous array for storage points */ - pt= gps->points= MEM_callocN(sizeof(bGPDspoint)*totelem, "gp_stroke_points"); - /* copy appropriate settings for stroke */ gps->totpoints= totelem; gps->thickness= p->gpl->thickness; gps->flag= gpd->sbuffer_sflag; + /* allocate enough memory for a continuous array for storage points */ + gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points"); + + /* set pointer to first non-initialized point */ + pt= gps->points + (gps->totpoints - totelem); + /* copy points from the buffer to the stroke */ if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT) { /* straight lines only -> only endpoints */ @@ -565,6 +614,16 @@ static void gp_stroke_newfrombuffer (tGPsdata *p) pt->pressure= ptc->pressure; } } + else if (p->paintmode == GP_PAINTMODE_DRAW_POLY) { + /* first point */ + ptc= gpd->sbuffer; + + /* convert screen-coordinates to appropriate coordinates (and store them) */ + gp_stroke_convertcoords(p, &ptc->x, &pt->x, NULL); + + /* copy pressure */ + pt->pressure= ptc->pressure; + } else { float *depth_arr= NULL; @@ -643,6 +702,8 @@ static void gp_stroke_newfrombuffer (tGPsdata *p) MEM_freeN(depth_arr); } + p->flags |= GP_PAINTFLAG_STROKEADDED; + /* add stroke to frame */ BLI_addtail(&p->gpf->strokes, gps); } @@ -891,8 +952,10 @@ static void gp_session_validatebuffer (tGPsdata *p) bGPdata *gpd= p->gpd; /* clear memory of buffer (or allocate it if starting a new session) */ - if (gpd->sbuffer) + if (gpd->sbuffer) { + //printf("\t\tGP - reset sbuffer\n"); memset(gpd->sbuffer, 0, sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX); + } else { //printf("\t\tGP - allocate sbuffer\n"); gpd->sbuffer= MEM_callocN(sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX, "gp_session_strokebuffer"); @@ -905,24 +968,21 @@ static void gp_session_validatebuffer (tGPsdata *p) gpd->sbuffer_sflag= 0; } -/* init new painting session */ -static tGPsdata *gp_session_initpaint (bContext *C) +/* (re)init new painting data */ +static int gp_session_initdata (bContext *C, tGPsdata *p) { - tGPsdata *p = NULL; bGPdata **gpd_ptr = NULL; ScrArea *curarea= CTX_wm_area(C); ARegion *ar= CTX_wm_region(C); /* make sure the active view (at the starting time) is a 3d-view */ if (curarea == NULL) { + p->status= GP_STATUS_ERROR; if (G.f & G_DEBUG) printf("Error: No active view for painting \n"); - return NULL; + return 0; } - /* create new context data */ - p= MEM_callocN(sizeof(tGPsdata), "GPencil Drawing Data"); - /* pass on current scene and window */ p->scene= CTX_data_scene(C); p->win= CTX_wm_window(C); @@ -944,7 +1004,7 @@ static tGPsdata *gp_session_initpaint (bContext *C) p->status= GP_STATUS_ERROR; if (G.f & G_DEBUG) printf("Error: 3D-View active region doesn't have any region data, so cannot be drawable \n"); - return p; + return 0; } #if 0 // XXX will this sort of antiquated stuff be restored? @@ -953,7 +1013,7 @@ static tGPsdata *gp_session_initpaint (bContext *C) p->status= GP_STATUS_ERROR; if (G.f & G_DEBUG) printf("Error: In active view, Grease Pencil not shown \n"); - return p; + return 0; } #endif } @@ -974,7 +1034,7 @@ static tGPsdata *gp_session_initpaint (bContext *C) p->status= GP_STATUS_ERROR; if (G.f & G_DEBUG) printf("Error: In active view, Grease Pencil not shown \n"); - return; + return 0; } #endif } @@ -994,13 +1054,13 @@ static tGPsdata *gp_session_initpaint (bContext *C) p->status= GP_STATUS_ERROR; if (G.f & G_DEBUG) printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil \n"); - return; + return 0; } if ((sseq->flag & SEQ_DRAW_GPENCIL)==0) { p->status= GP_STATUS_ERROR; if (G.f & G_DEBUG) printf("Error: In active view, Grease Pencil not shown \n"); - return; + return 0; } } break; @@ -1021,7 +1081,7 @@ static tGPsdata *gp_session_initpaint (bContext *C) p->status= GP_STATUS_ERROR; if (G.f & G_DEBUG) printf("Error: In active view, Grease Pencil not shown \n"); - return p; + return 0; } #endif } @@ -1033,7 +1093,7 @@ static tGPsdata *gp_session_initpaint (bContext *C) p->status= GP_STATUS_ERROR; if (G.f & G_DEBUG) printf("Error: Active view not appropriate for Grease Pencil drawing \n"); - return p; + return 0; } break; } @@ -1044,7 +1104,7 @@ static tGPsdata *gp_session_initpaint (bContext *C) p->status= GP_STATUS_ERROR; if (G.f & G_DEBUG) printf("Error: Current context doesn't allow for any Grease Pencil data \n"); - return p; + return 0; } else { /* if no existing GPencil block exists, add one */ @@ -1067,6 +1127,19 @@ static tGPsdata *gp_session_initpaint (bContext *C) p->im2d_settings.sizex= 1; p->im2d_settings.sizey= 1; #endif + + return 1; +} + +/* init new painting session */ +static tGPsdata *gp_session_initpaint (bContext *C) +{ + tGPsdata *p = NULL; + + /* create new context data */ + p= MEM_callocN(sizeof(tGPsdata), "GPencil Drawing Data"); + + gp_session_initdata(C, p); /* return context data for running paint operator */ return p; @@ -1629,17 +1702,14 @@ static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op) p->status= GP_STATUS_ERROR; } - /* free pointer used by previous stroke */ - if(p) - MEM_freeN(p); - //printf("\t\tGP - start stroke \n"); /* we may need to set up paint env again if we're resuming */ // XXX: watch it with the paintmode! in future, it'd be nice to allow changing paint-mode when in sketching-sessions // XXX: with tablet events, we may event want to check for eraser here, for nicer tablet support - gpencil_draw_init(C, op); + if (gp_session_initdata(C, p)) + gp_paint_initstroke(p, p->paintmode); p= op->customdata; @@ -1698,10 +1768,15 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE)) { /* if painting, end stroke */ if (p->status == GP_STATUS_PAINTING) { + int sketch= 0; /* basically, this should be mouse-button up = end stroke * BUT what happens next depends on whether we 'painting sessions' is enabled */ - if (GPENCIL_SKETCH_SESSIONS_ON(p->scene)) { + sketch|= GPENCIL_SKETCH_SESSIONS_ON(p->scene); + /* polyline drawig is also 'sketching' -- all knots should be added during one session */ + sketch|= p->paintmode == GP_PAINTMODE_DRAW_POLY; + + if (sketch) { /* end stroke only, and then wait to resume painting soon */ //printf("\t\tGP - end stroke only\n"); gpencil_stroke_end(op); @@ -1710,7 +1785,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) estate = OPERATOR_RUNNING_MODAL; /* stroke could be smoothed, send notifier to refresh screen */ - ED_region_tag_redraw(p->ar); + WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); } else { //printf("\t\tGP - end of stroke + op\n"); @@ -1794,6 +1869,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) static EnumPropertyItem prop_gpencil_drawmodes[] = { {GP_PAINTMODE_DRAW, "DRAW", 0, "Draw Freehand", ""}, {GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, "Draw Straight Lines", ""}, + {GP_PAINTMODE_DRAW_POLY, "DRAW_POLY", 0, "Dtaw Poly Line", ""}, {GP_PAINTMODE_ERASER, "ERASER", 0, "Eraser", ""}, {0, NULL, 0, NULL, NULL} }; -- cgit v1.2.3 From 7062788017cfb2841596d15f7c37612312692195 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 6 Sep 2011 10:49:55 +0000 Subject: texture evaluation function (like we had in 2.4x api), requested by Lee. eg: red, green, blue, intensity = texture.evaluate(vec) --- source/blender/makesrna/intern/rna_internal.h | 1 + source/blender/makesrna/intern/rna_texture.c | 2 + source/blender/makesrna/intern/rna_texture_api.c | 54 ++++++++++++++++++------ 3 files changed, 45 insertions(+), 12 deletions(-) diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 9e98f166875..78b8c67d92c 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -261,6 +261,7 @@ void RNA_api_wm(struct StructRNA *srna); void RNA_api_sensor(struct StructRNA *srna); void RNA_api_controller(struct StructRNA *srna); void RNA_api_actuator(struct StructRNA *srna); +void RNA_api_texture(struct StructRNA *srna); void RNA_api_environment_map(struct StructRNA *srna); /* main collection functions */ diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 503212201c4..890be76c49a 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -1820,6 +1820,8 @@ static void rna_def_texture(BlenderRNA *brna) rna_def_texture_pointdensity(brna); rna_def_texture_voxeldata(brna); /* XXX add more types here .. */ + + RNA_api_texture(srna); } void RNA_def_texture(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c index 8d4b73f1f0c..8c63d5da8fd 100644 --- a/source/blender/makesrna/intern/rna_texture_api.c +++ b/source/blender/makesrna/intern/rna_texture_api.c @@ -43,6 +43,7 @@ #include "BKE_context.h" #include "BKE_global.h" #include "RE_pipeline.h" +#include "RE_shader_ext.h" void save_envmap(struct EnvMap *env, bContext *C, ReportList *reports, const char* filepath, struct Scene *scene, float layout[12]) { @@ -67,30 +68,59 @@ void clear_envmap(struct EnvMap *env, bContext *C) } } +void texture_evaluate(struct Tex *tex, float value[3], float color_r[3]) +{ + TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL}; + multitex_ext(tex, value, NULL, NULL, 1, &texres); + + color_r[0] = texres.tr; + color_r[1] = texres.tg; + color_r[2] = texres.tb; + color_r[3] = texres.tin; +} + #else +void RNA_api_texture(StructRNA *srna) +{ + FunctionRNA *func; + PropertyRNA *parm; + + func= RNA_def_function(srna, "evaluate", "texture_evaluate"); + RNA_def_function_ui_description(func, "Evaluate the texture at the coordinates given"); + + parm= RNA_def_float_vector(func, "value", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4); + RNA_def_property_flag(parm, PROP_REQUIRED); + + /* return location and normal */ + parm= RNA_def_float_vector(func, "result", 4, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4); + RNA_def_property_flag(parm, PROP_THICK_WRAP); + RNA_def_function_output(func, parm); + +} + void RNA_api_environment_map(StructRNA *srna) { FunctionRNA *func; PropertyRNA *parm; - + static const float default_layout[] = { 0,0, 1,0, 2,0, 0,1, 1,1, 2,1 }; - + func= RNA_def_function(srna, "clear", "clear_envmap"); - RNA_def_function_ui_description(func, "Discard the environment map and free it from memory."); - RNA_def_function_flag(func, FUNC_USE_CONTEXT); + RNA_def_function_ui_description(func, "Discard the environment map and free it from memory."); + RNA_def_function_flag(func, FUNC_USE_CONTEXT); func= RNA_def_function(srna,"save", "save_envmap"); - RNA_def_function_ui_description(func, "Save the environment map to disc using the scene render settings."); - RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); - - parm= RNA_def_string_file_name(func,"filepath","",FILE_MAX,"File path","Location of the output file"); - RNA_def_property_flag(parm, PROP_REQUIRED); - - RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken."); + RNA_def_function_ui_description(func, "Save the environment map to disc using the scene render settings."); + RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); + + parm= RNA_def_string_file_name(func,"filepath","",FILE_MAX,"File path","Location of the output file"); + RNA_def_property_flag(parm, PROP_REQUIRED); + + RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken."); - parm = RNA_def_float_array(func, "layout", 12, default_layout, 0.0f, 0.0f, "File layout", "Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face. Order is [+Z -Z +Y -X -Y +X]. Use -1 to skip a face.", 0.0f, 0.0f); + parm = RNA_def_float_array(func, "layout", 12, default_layout, 0.0f, 0.0f, "File layout", "Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face. Order is [+Z -Z +Y -X -Y +X]. Use -1 to skip a face.", 0.0f, 0.0f); } #endif -- cgit v1.2.3 From aabd702dbdbba5af116f37c401f6a17f0ac714ca Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Tue, 6 Sep 2011 11:17:29 +0000 Subject: fix link issues with MinGW - a substitute declaration(correctByteOrder) for itoln that was not present in MinGW was being used. Duplicated the declaration from (tried including but gave some errors) and added the appropriate link library, wsock32, according to MinGW documentation. --- CMakeLists.txt | 2 +- build_files/scons/config/win32-mingw-config.py | 2 +- intern/guardedalloc/MEM_sys_types.h | 5 ++++- source/blender/blenloader/BLO_sys_types.h | 9 ++++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b54b18aab37..8b5693fb1aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -797,7 +797,7 @@ elseif(WIN32) else() # keep GCC spesific stuff here if(CMAKE_COMPILER_IS_GNUCC) - set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid") + set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32") set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE) diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py index c815b76ef73..37d693db560 100644 --- a/build_files/scons/config/win32-mingw-config.py +++ b/build_files/scons/config/win32-mingw-config.py @@ -174,7 +174,7 @@ C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-pro CC_WARN = [ '-Wall' ] -LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid'] +LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32'] PLATFORM_LINKFLAGS = ['--stack,2097152'] diff --git a/intern/guardedalloc/MEM_sys_types.h b/intern/guardedalloc/MEM_sys_types.h index 48230db23a3..4debb32b5c4 100644 --- a/intern/guardedalloc/MEM_sys_types.h +++ b/intern/guardedalloc/MEM_sys_types.h @@ -98,7 +98,8 @@ typedef unsigned long uintptr_t; #include #elif defined(FREE_WINDOWS) - +/* define htoln here, there must be a syntax error in winsock2.h in MinGW */ +unsigned long __attribute__((__stdcall__)) htonl(unsigned long); #include #else @@ -109,12 +110,14 @@ typedef unsigned long uintptr_t; #endif /* ifdef platform for types */ #ifdef _WIN32 +#ifndef FREE_WINDOWS #ifndef htonl #define htonl(x) correctByteOrder(x) #endif #ifndef ntohl #define ntohl(x) correctByteOrder(x) #endif +#endif #elif defined (__FreeBSD__) || defined (__OpenBSD__) #include #elif defined (__APPLE__) diff --git a/source/blender/blenloader/BLO_sys_types.h b/source/blender/blenloader/BLO_sys_types.h index 2114fc34bf1..4b3902dca43 100644 --- a/source/blender/blenloader/BLO_sys_types.h +++ b/source/blender/blenloader/BLO_sys_types.h @@ -93,7 +93,8 @@ typedef unsigned long uintptr_t; #include #elif defined(FREE_WINDOWS) - +/* define htoln here, there must be a syntax error in winsock2.h in MinGW */ +unsigned long __attribute__((__stdcall__)) htonl(unsigned long); #include #else @@ -105,8 +106,14 @@ typedef unsigned long uintptr_t; #ifdef _WIN32 +#ifndef FREE_WINDOWS +#ifndef htonl #define htonl(x) correctByteOrder(x) +#endif +#ifndef ntohl #define ntohl(x) correctByteOrder(x) +#endif +#endif #elif defined (__FreeBSD__) || defined (__OpenBSD__) #include #elif defined (__APPLE__) -- cgit v1.2.3 From c6002873fa5b967ce30b9fc827fb6abc0931ef3c Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Tue, 6 Sep 2011 11:38:44 +0000 Subject: Backward compatibility fix for SOCK_DYNAMICS flag on group sockets. This is currently only needed for displaying the up/down buttons of group sockets. All regular group sockets should have this flag to indicate they are added by the user. More complex "group-type" trees may use non-dynamic sockets in the future for sockets that are not supposed to be manipulated. --- source/blender/blenloader/intern/readfile.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 355fc14705a..66e38f1c5f8 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7015,6 +7015,15 @@ static void do_versions_nodetree_default_value(bNodeTree *ntree) do_versions_socket_default_value(sock); } +static void do_versions_nodetree_dynamic_sockets(bNodeTree *ntree) +{ + bNodeSocket *sock; + for (sock=ntree->inputs.first; sock; sock=sock->next) + sock->flag |= SOCK_DYNAMIC; + for (sock=ntree->outputs.first; sock; sock=sock->next) + sock->flag |= SOCK_DYNAMIC; +} + static void do_versions(FileData *fd, Library *lib, Main *main) { /* WATCH IT!!!: pointers from libdata have not been converted */ @@ -11972,6 +11981,16 @@ static void do_versions(FileData *fd, Library *lib, Main *main) tex->nodetree->update |= NTREE_UPDATE; } } + + /* add SOCK_DYNAMIC flag to existing group sockets */ + { + bNodeTree *ntree; + /* only need to do this for trees in main, local trees are not used as groups */ + for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next) { + do_versions_nodetree_dynamic_sockets(ntree); + ntree->update |= NTREE_UPDATE; + } + } } /* put compatibility code here until next subversion bump */ -- cgit v1.2.3 From 71abf218f0dcc8e2b038de3672a8332fd3e544af Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Tue, 6 Sep 2011 11:42:20 +0000 Subject: Fix for wrong offset of the input socket column in group node tree display. --- source/blender/editors/space_node/drawnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 890b04dce91..0d2ec7c646f 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -637,7 +637,7 @@ static void draw_group_socket(const bContext *C, SpaceNode *snode, bNodeTree *nt float arrowbutw= 0.8f*UI_UNIT_X; /* layout stuff for buttons on group left frame */ float colw= 0.6f*node_group_frame; - float col1= 6; + float col1= 6 - node_group_frame; float col2= col1 + colw+6; float col3= node_group_frame - arrowbutw - 6; /* layout stuff for buttons on group right frame */ -- cgit v1.2.3 From 47ffe63c86eb495aa5556939467692484aea8322 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 6 Sep 2011 13:00:46 +0000 Subject: remove -Wundef for code we don't maintain & generated code. --- build_files/cmake/macros.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 58938c8b0b0..d09215d040d 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -392,6 +392,7 @@ macro(remove_strict_flags) remove_flag("-Wstrict-prototypes") remove_flag("-Wunused-parameter") remove_flag("-Wwrite-strings") + remove_flag("-Wundef") remove_flag("-Wshadow") remove_flag("-Werror=[^ ]+") remove_flag("-Werror") -- cgit v1.2.3 From 0c15f834e49b2e1c43c0e06f1fd8a7e7f5faa83f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 6 Sep 2011 14:02:28 +0000 Subject: Fix for poly line grease pencil and surface drawing. --- source/blender/editors/gpencil/gpencil_paint.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 460408c6269..a23f2064a9e 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -400,6 +400,15 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure) pts = &gps->points[gps->totpoints-1]; + /* special case for poly lines: normally, depth is needed only when creating new stroke from buffer, + but poly lines are converting to stroke instantly, so initialize depth buffer before converting coordinates */ + if (gpencil_project_check(p)) { + View3D *v3d= p->sa->spacedata.first; + + view3d_region_operator_needs_opengl(p->win, p->ar); + ED_view3d_autodist_init(p->scene, p->ar, v3d, (p->gpd->flag & GP_DATA_DEPTH_STROKE) ? 1:0); + } + /* convert screen-coordinates to appropriate coordinates (and store them) */ gp_stroke_convertcoords(p, &pt->x, &pts->x, NULL); -- cgit v1.2.3 From d4ce95d1dc9103c018b17f42872d231cece33383 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 6 Sep 2011 14:59:55 +0000 Subject: Fix #28524: Push/Pull Assert when using Operator Panel to Alter Distance value Some transform operators (like push/pull, shrink/fatten, to sphere and so) were creating "value" as single scalar value. This used to confuse RNA_float_get_array used in initTransform. Use RNA_float_get_array for array values and RNA_float_get for scalar value in transform initi function. --- source/blender/editors/transform/transform.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 09507194969..1796bd4e928 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1678,7 +1678,14 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int if (RNA_property_is_set(op->ptr, "value")) { float values[4]= {0}; /* incase value isn't length 4, avoid uninitialized memory */ - RNA_float_get_array(op->ptr, "value", values); + PropertyRNA *prop= RNA_struct_find_property(op->ptr, "value"); + + if(RNA_property_array_check(prop)) { + RNA_float_get_array(op->ptr, "value", values); + } else { + values[0]= RNA_float_get(op->ptr, "value"); + } + QUATCOPY(t->values, values); QUATCOPY(t->auto_values, values); t->flag |= T_AUTOVALUES; -- cgit v1.2.3 From e79d16270bc29f44431689fdb1b362b1866ab8c3 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Tue, 6 Sep 2011 15:44:44 +0000 Subject: Ambient Occlusion: * Increase max. samples from 32 to 128. --- source/blender/makesrna/intern/rna_world.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c index 72b54dce473..11ec327c306 100644 --- a/source/blender/makesrna/intern/rna_world.c +++ b/source/blender/makesrna/intern/rna_world.c @@ -360,7 +360,7 @@ static void rna_def_lighting(BlenderRNA *brna) prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "aosamp"); - RNA_def_property_range(prop, 1, 32); + RNA_def_property_range(prop, 1, 128); RNA_def_property_ui_text(prop, "Samples", "Amount of ray samples. Higher values give smoother results and longer rendering times"); RNA_def_property_update(prop, 0, "rna_World_update"); -- cgit v1.2.3 From 884fc84793be1c5fdd6643ad267331381f8e1c6b Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Tue, 6 Sep 2011 16:32:51 +0000 Subject: Fix for multiple parallel group node executions. This would previously break because begin/end functions for each tree type still have some checks of the ntree->execdata pointer in them, despite the intended use of execdata instances instead of trees themselves for execution data storage. This is an artifact of the old execution system that required these checks to be made in the functions to avoid multiple execution of top-level trees. Now these functions take an additional argument, so group nodes can prevent them from setting and checking the nodetree->execdata pointers. --- source/blender/blenkernel/BKE_node.h | 12 +++--- source/blender/blenkernel/intern/material.c | 4 +- source/blender/blenkernel/intern/node.c | 6 +-- source/blender/blenkernel/intern/texture.c | 2 +- source/blender/editors/sculpt_paint/paint_image.c | 4 +- source/blender/editors/sculpt_paint/sculpt.c | 4 +- .../blender/nodes/composite/node_composite_tree.c | 47 ++++++++++++++-------- .../nodes/composite/nodes/node_composite_common.c | 6 +-- source/blender/nodes/shader/node_shader_tree.c | 44 ++++++++++++-------- .../nodes/shader/nodes/node_shader_common.c | 4 +- source/blender/nodes/texture/node_texture_tree.c | 40 +++++++++++------- .../nodes/texture/nodes/node_texture_common.c | 4 +- .../blender/render/intern/source/render_texture.c | 4 +- 13 files changed, 110 insertions(+), 71 deletions(-) diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 7207fb7d0fb..1de3c295f4d 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -466,8 +466,8 @@ struct ShadeResult; /* API */ -struct bNodeTreeExec *ntreeShaderBeginExecTree(struct bNodeTree *ntree); -void ntreeShaderEndExecTree(struct bNodeTreeExec *exec); +struct bNodeTreeExec *ntreeShaderBeginExecTree(struct bNodeTree *ntree, int use_tree_data); +void ntreeShaderEndExecTree(struct bNodeTreeExec *exec, int use_tree_data); void ntreeShaderExecTree(struct bNodeTree *ntree, struct ShadeInput *shi, struct ShadeResult *shr); void ntreeShaderGetTexcoMode(struct bNodeTree *ntree, int osa, short *texco, int *mode); void nodeShaderSynchronizeID(struct bNode *node, int copyto); @@ -594,8 +594,8 @@ void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat); /* API */ struct CompBuf; -struct bNodeTreeExec *ntreeCompositBeginExecTree(struct bNodeTree *ntree); -void ntreeCompositEndExecTree(struct bNodeTreeExec *exec); +struct bNodeTreeExec *ntreeCompositBeginExecTree(struct bNodeTree *ntree, int use_tree_data); +void ntreeCompositEndExecTree(struct bNodeTreeExec *exec, int use_tree_data); void ntreeCompositExecTree(struct bNodeTree *ntree, struct RenderData *rd, int do_previews); void ntreeCompositTagRender(struct Scene *sce); int ntreeCompositTagAnimated(struct bNodeTree *ntree); @@ -642,8 +642,8 @@ void ntreeTexSetPreviewFlag(int); void ntreeTexCheckCyclics(struct bNodeTree *ntree); char* ntreeTexOutputMenu(struct bNodeTree *ntree); -struct bNodeTreeExec *ntreeTexBeginExecTree(struct bNodeTree *ntree); -void ntreeTexEndExecTree(struct bNodeTreeExec *exec); +struct bNodeTreeExec *ntreeTexBeginExecTree(struct bNodeTree *ntree, int use_tree_data); +void ntreeTexEndExecTree(struct bNodeTreeExec *exec, int use_tree_data); int ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, float *dxt, float *dyt, int osatex, short thread, struct Tex *tex, short which_output, int cfra, int preview, struct ShadeInput *shi, struct MTex *mtex); diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 36631d5af90..aab8e1abbea 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -926,7 +926,7 @@ void init_render_material(Material *mat, int r_mode, float *amb) init_render_nodetree(mat->nodetree, mat, r_mode, amb); if (!mat->nodetree->execdata) - mat->nodetree->execdata = ntreeShaderBeginExecTree(mat->nodetree); + mat->nodetree->execdata = ntreeShaderBeginExecTree(mat->nodetree, 1); } } @@ -960,7 +960,7 @@ void end_render_material(Material *mat) { if(mat && mat->nodetree && mat->use_nodes) { if (mat->nodetree->execdata) - ntreeShaderEndExecTree(mat->nodetree->execdata); + ntreeShaderEndExecTree(mat->nodetree->execdata, 1); } } diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 481893b86a8..cd1a6e61151 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -897,13 +897,13 @@ void ntreeFreeTree(bNodeTree *ntree) if (ntree->execdata) { switch (ntree->type) { case NTREE_COMPOSIT: - ntreeCompositEndExecTree(ntree->execdata); + ntreeCompositEndExecTree(ntree->execdata, 1); break; case NTREE_SHADER: - ntreeShaderEndExecTree(ntree->execdata); + ntreeShaderEndExecTree(ntree->execdata, 1); break; case NTREE_TEXTURE: - ntreeTexEndExecTree(ntree->execdata); + ntreeTexEndExecTree(ntree->execdata, 1); break; } } diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 6119a855366..38165182d83 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -767,7 +767,7 @@ Tex *copy_texture(Tex *tex) if(tex->nodetree) { if (tex->nodetree->execdata) { - ntreeTexEndExecTree(tex->nodetree->execdata); + ntreeTexEndExecTree(tex->nodetree->execdata, 1); } texn->nodetree= ntreeCopyTree(tex->nodetree); } diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 9539706468f..79a3251cdf1 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -4664,7 +4664,7 @@ static void paint_brush_init_tex(Brush *brush) if(brush) { MTex *mtex= &brush->mtex; if(mtex->tex && mtex->tex->nodetree) - ntreeTexBeginExecTree(mtex->tex->nodetree); /* has internal flag to detect it only does it once */ + ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */ } } @@ -4806,7 +4806,7 @@ static void paint_brush_exit_tex(Brush *brush) if(brush) { MTex *mtex= &brush->mtex; if(mtex->tex && mtex->tex->nodetree) - ntreeTexEndExecTree(mtex->tex->nodetree->execdata); + ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1); } } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index bf34a3b8c9f..ced3dd00a9c 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3274,7 +3274,7 @@ static void sculpt_brush_init_tex(Sculpt *sd, SculptSession *ss) /* init mtex nodes */ if(mtex->tex && mtex->tex->nodetree) - ntreeTexBeginExecTree(mtex->tex->nodetree); /* has internal flag to detect it only does it once */ + ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */ /* TODO: Shouldn't really have to do this at the start of every stroke, but sculpt would need some sort of notification when @@ -3455,7 +3455,7 @@ static void sculpt_brush_exit_tex(Sculpt *sd) MTex *mtex= &brush->mtex; if(mtex->tex && mtex->tex->nodetree) - ntreeTexEndExecTree(mtex->tex->nodetree->execdata); + ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1); } static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke)) diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index 0ea62b0aa5f..4fc5e23e26a 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -200,17 +200,22 @@ bNodeTreeType ntreeType_Composite = { }; -struct bNodeTreeExec *ntreeCompositBeginExecTree(bNodeTree *ntree) +/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes. + * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees. + */ +struct bNodeTreeExec *ntreeCompositBeginExecTree(bNodeTree *ntree, int use_tree_data) { bNodeTreeExec *exec; bNode *node; bNodeSocket *sock; - /* XXX hack: prevent exec data from being generated twice. - * this should be handled by the renderer! - */ - if (ntree->execdata) - return ntree->execdata; + if (use_tree_data) { + /* XXX hack: prevent exec data from being generated twice. + * this should be handled by the renderer! + */ + if (ntree->execdata) + return ntree->execdata; + } /* ensures only a single output node is enabled */ ntreeSetOutput(ntree); @@ -236,15 +241,20 @@ struct bNodeTreeExec *ntreeCompositBeginExecTree(bNodeTree *ntree) } } - /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, + if (use_tree_data) { + /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, * which only store the ntree pointer. Should be fixed at some point! */ - ntree->execdata = exec; + ntree->execdata = exec; + } return exec; } -void ntreeCompositEndExecTree(bNodeTreeExec *exec) +/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes. + * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees. + */ +void ntreeCompositEndExecTree(bNodeTreeExec *exec, int use_tree_data) { if(exec) { bNodeTree *ntree= exec->nodetree; @@ -269,8 +279,10 @@ void ntreeCompositEndExecTree(bNodeTreeExec *exec) ntree_exec_end(exec); - /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ - ntree->execdata = NULL; + if (use_tree_data) { + /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ + ntree->execdata = NULL; + } } } @@ -495,10 +507,10 @@ static void ntree_composite_texnode(bNodeTree *ntree, int init) /* has internal flag to detect it only does it once */ if(init) { if (!tex->nodetree->execdata) - tex->nodetree->execdata = ntreeTexBeginExecTree(tex->nodetree); + tex->nodetree->execdata = ntreeTexBeginExecTree(tex->nodetree, 1); } else - ntreeTexEndExecTree(tex->nodetree->execdata); + ntreeTexEndExecTree(tex->nodetree->execdata, 1); tex->nodetree->execdata = NULL; } } @@ -521,8 +533,10 @@ void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview) if(do_preview) ntreeInitPreview(ntree, 0, 0); - if (!ntree->execdata) - exec = ntreeCompositBeginExecTree(ntree); + if (!ntree->execdata) { + /* XXX this is the top-level tree, so we use the ntree->execdata pointer. */ + exec = ntreeCompositBeginExecTree(ntree, 1); + } ntree_composite_texnode(ntree, 1); /* prevent unlucky accidents */ @@ -592,7 +606,8 @@ void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview) BLI_end_threads(&threads); - ntreeCompositEndExecTree(exec); + /* XXX top-level tree uses the ntree->execdata pointer */ + ntreeCompositEndExecTree(exec, 1); } /* *********************************************** */ diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c index fbff8198dde..8067f7e92be 100644 --- a/source/blender/nodes/composite/nodes/node_composite_common.c +++ b/source/blender/nodes/composite/nodes/node_composite_common.c @@ -122,7 +122,7 @@ static void *group_initexec(bNode *node) bNodeStack *ns; /* initialize the internal node tree execution */ - exec = ntreeCompositBeginExecTree(ngroup); + exec = ntreeCompositBeginExecTree(ngroup, 0); /* tag group outputs as external to prevent freeing */ for (sock=ngroup->outputs.first; sock; sock=sock->next) { @@ -135,11 +135,11 @@ static void *group_initexec(bNode *node) return exec; } -static void group_freeexec(bNode *UNUSED(node), void *nodedata) +static void group_freeexec(bNode *node, void *nodedata) { bNodeTreeExec *gexec= (bNodeTreeExec*)nodedata; - ntreeCompositEndExecTree(gexec); + ntreeCompositEndExecTree(gexec, 0); } /* Copy inputs to the internal stack. diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c index 8cb1ebeb15f..642e4be10d7 100644 --- a/source/blender/nodes/shader/node_shader_tree.c +++ b/source/blender/nodes/shader/node_shader_tree.c @@ -108,11 +108,11 @@ void ntreeGPUMaterialNodes(bNodeTree *ntree, GPUMaterial *mat) bNodeTreeExec *exec; if(!ntree->execdata) - exec = ntreeShaderBeginExecTree(ntree); + exec = ntreeShaderBeginExecTree(ntree, 1); ntreeExecGPUNodes(exec, mat, 1); - ntreeShaderEndExecTree(exec); + ntreeShaderEndExecTree(exec, 1); } /* **************** call to switch lamploop for material node ************ */ @@ -125,16 +125,21 @@ void set_node_shader_lamp_loop(void (*lamp_loop_func)(ShadeInput *, ShadeResult } -bNodeTreeExec *ntreeShaderBeginExecTree(bNodeTree *ntree) +/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes. + * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees. + */ +bNodeTreeExec *ntreeShaderBeginExecTree(bNodeTree *ntree, int use_tree_data) { bNodeTreeExec *exec; bNode *node; - /* XXX hack: prevent exec data from being generated twice. - * this should be handled by the renderer! - */ - if (ntree->execdata) - return ntree->execdata; + if (use_tree_data) { + /* XXX hack: prevent exec data from being generated twice. + * this should be handled by the renderer! + */ + if (ntree->execdata) + return ntree->execdata; + } /* ensures only a single output node is enabled */ ntreeSetOutput(ntree); @@ -148,15 +153,20 @@ bNodeTreeExec *ntreeShaderBeginExecTree(bNodeTree *ntree) for(node= exec->nodetree->nodes.first; node; node= node->next) node->need_exec= 1; - /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, - * which only store the ntree pointer. Should be fixed at some point! - */ - ntree->execdata = exec; + if (use_tree_data) { + /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, + * which only store the ntree pointer. Should be fixed at some point! + */ + ntree->execdata = exec; + } return exec; } -void ntreeShaderEndExecTree(bNodeTreeExec *exec) +/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes. + * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees. + */ +void ntreeShaderEndExecTree(bNodeTreeExec *exec, int use_tree_data) { if(exec) { bNodeTree *ntree= exec->nodetree; @@ -176,8 +186,10 @@ void ntreeShaderEndExecTree(bNodeTreeExec *exec) ntree_exec_end(exec); - /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ - ntree->execdata = NULL; + if (use_tree_data) { + /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ + ntree->execdata = NULL; + } } } @@ -199,7 +211,7 @@ void ntreeShaderExecTree(bNodeTree *ntree, ShadeInput *shi, ShadeResult *shr) memset(shr, 0, sizeof(ShadeResult)); if (!exec) - exec = ntree->execdata = ntreeShaderBeginExecTree(exec->nodetree); + exec = ntree->execdata = ntreeShaderBeginExecTree(exec->nodetree, 1); nts= ntreeGetThreadStack(exec, shi->thread); ntreeExecThreadNodes(exec, nts, &scd, shi->thread); diff --git a/source/blender/nodes/shader/nodes/node_shader_common.c b/source/blender/nodes/shader/nodes/node_shader_common.c index aa8e8241bf8..2dd15ab1e99 100644 --- a/source/blender/nodes/shader/nodes/node_shader_common.c +++ b/source/blender/nodes/shader/nodes/node_shader_common.c @@ -76,7 +76,7 @@ static void *group_initexec(bNode *node) bNodeTreeExec *exec; /* initialize the internal node tree execution */ - exec = ntreeShaderBeginExecTree(ngroup); + exec = ntreeShaderBeginExecTree(ngroup, 0); return exec; } @@ -85,7 +85,7 @@ static void group_freeexec(bNode *UNUSED(node), void *nodedata) { bNodeTreeExec*gexec= (bNodeTreeExec*)nodedata; - ntreeShaderEndExecTree(gexec); + ntreeShaderEndExecTree(gexec, 0); } /* Copy inputs to the internal stack. diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c index 3ea15a316ab..603aa7ceb77 100644 --- a/source/blender/nodes/texture/node_texture_tree.c +++ b/source/blender/nodes/texture/node_texture_tree.c @@ -121,16 +121,21 @@ int ntreeTexTagAnimated(bNodeTree *ntree) return 0; } -bNodeTreeExec *ntreeTexBeginExecTree(bNodeTree *ntree) +/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes. + * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees. + */ +bNodeTreeExec *ntreeTexBeginExecTree(bNodeTree *ntree, int use_tree_data) { bNodeTreeExec *exec; bNode *node; - /* XXX hack: prevent exec data from being generated twice. - * this should be handled by the renderer! - */ - if (ntree->execdata) - return ntree->execdata; + if (use_tree_data) { + /* XXX hack: prevent exec data from being generated twice. + * this should be handled by the renderer! + */ + if (ntree->execdata) + return ntree->execdata; + } /* common base initialization */ exec = ntree_exec_begin(ntree); @@ -141,10 +146,12 @@ bNodeTreeExec *ntreeTexBeginExecTree(bNodeTree *ntree) for(node= exec->nodetree->nodes.first; node; node= node->next) node->need_exec= 1; - /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, - * which only store the ntree pointer. Should be fixed at some point! - */ - ntree->execdata = exec; + if (use_tree_data) { + /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, + * which only store the ntree pointer. Should be fixed at some point! + */ + ntree->execdata = exec; + } return exec; } @@ -163,7 +170,10 @@ static void tex_free_delegates(bNodeTreeExec *exec) MEM_freeN(ns->data); } -void ntreeTexEndExecTree(bNodeTreeExec *exec) +/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes. + * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees. + */ +void ntreeTexEndExecTree(bNodeTreeExec *exec, int use_tree_data) { if(exec) { bNodeTree *ntree= exec->nodetree; @@ -185,8 +195,10 @@ void ntreeTexEndExecTree(bNodeTreeExec *exec) ntree_exec_end(exec); - /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ - ntree->execdata = NULL; + if (use_tree_data) { + /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */ + ntree->execdata = NULL; + } } } @@ -223,7 +235,7 @@ int ntreeTexExecTree( data.shi= shi; if (!exec) - exec = ntreeTexBeginExecTree(nodes); + exec = ntreeTexBeginExecTree(nodes, 1); nts= ntreeGetThreadStack(exec, thread); ntreeExecThreadNodes(exec, nts, &data, thread); diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c index afb24226416..1b46b830909 100644 --- a/source/blender/nodes/texture/nodes/node_texture_common.c +++ b/source/blender/nodes/texture/nodes/node_texture_common.c @@ -61,7 +61,7 @@ static void *group_initexec(bNode *node) void *exec; /* initialize the internal node tree execution */ - exec = ntreeTexBeginExecTree(ngroup); + exec = ntreeTexBeginExecTree(ngroup, 0); return exec; } @@ -70,7 +70,7 @@ static void group_freeexec(bNode *UNUSED(node), void *nodedata) { bNodeTreeExec*gexec= (bNodeTreeExec*)nodedata; - ntreeTexEndExecTree(gexec); + ntreeTexEndExecTree(gexec, 0); } /* Copy inputs to the internal stack. diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index e35b3e53f5b..cf1fae81eb5 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -125,7 +125,7 @@ static void init_render_texture(Render *re, Tex *tex) } if(tex->nodetree && tex->use_nodes) { - ntreeTexBeginExecTree(tex->nodetree); /* has internal flag to detect it only does it once */ + ntreeTexBeginExecTree(tex->nodetree, 1); /* has internal flag to detect it only does it once */ } } @@ -145,7 +145,7 @@ void init_render_textures(Render *re) static void end_render_texture(Tex *tex) { if(tex && tex->use_nodes && tex->nodetree && tex->nodetree->execdata) - ntreeTexEndExecTree(tex->nodetree->execdata); + ntreeTexEndExecTree(tex->nodetree->execdata, 1); } void end_render_textures(Render *re) -- cgit v1.2.3 From 84b8ec2ec37e21f6672044c4bff1339365d76b55 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Tue, 6 Sep 2011 16:48:28 +0000 Subject: Fix for node group add menu, groups from old files wouldn't show up there. Reason was that node trees are now associated to specific node types (NODE_GROUP in particular) by the ntree->nodetype id. --- source/blender/blenloader/intern/readfile.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 66e38f1c5f8..d1a19f24b97 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -11991,6 +11991,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main) ntree->update |= NTREE_UPDATE; } } + + { + /* Initialize group tree nodetypes. + * These are used to distinguish tree types and + * associate them with specific node types for polling. + */ + bNodeTree *ntree; + /* all node trees in main->nodetree are considered groups */ + for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next) + ntree->nodetype = NODE_GROUP; + } } /* put compatibility code here until next subversion bump */ -- cgit v1.2.3 From c8a092789f5e53ebf418457bd2f7ea1a3818d0b7 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 6 Sep 2011 16:51:10 +0000 Subject: Node merge: some forward compatibility code to avoid crash loading files with node groups in older version, and to keep unconnected/default socket values. --- source/blender/blenloader/intern/writefile.c | 33 ++++++++++++++++++++++++++++ source/blender/makesdna/DNA_node_types.h | 6 ++--- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index b982630ec41..5c2d3e0c458 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -135,6 +135,7 @@ Any case: direct data is ALWAYS after the lib block #include "BLI_blenlib.h" #include "BLI_linklist.h" #include "BLI_bpath.h" +#include "BLI_math.h" #include "BLI_utildefines.h" #include "BKE_action.h" @@ -645,6 +646,38 @@ static void write_curvemapping(WriteData *wd, CurveMapping *cumap) static void write_node_socket(WriteData *wd, bNodeSocket *sock) { bNodeSocketType *stype= ntreeGetSocketType(sock->type); + + /* forward compatibility code, so older blenders still open */ + sock->stack_type = 1; + + if(sock->default_value) { + bNodeSocketValueFloat *valfloat; + bNodeSocketValueVector *valvector; + bNodeSocketValueRGBA *valrgba; + + switch (sock->type) { + case SOCK_FLOAT: + valfloat = sock->default_value; + sock->ns.vec[0] = valfloat->value; + sock->ns.min = valfloat->min; + sock->ns.max = valfloat->max; + break; + case SOCK_VECTOR: + valvector = sock->default_value; + copy_v3_v3(sock->ns.vec, valvector->value); + sock->ns.min = valvector->min; + sock->ns.max = valvector->max; + break; + case SOCK_RGBA: + valrgba = sock->default_value; + copy_v4_v4(sock->ns.vec, valrgba->value); + sock->ns.min = 0.0f; + sock->ns.max = 1.0f; + break; + } + } + + /* actual socket writing */ writestruct(wd, DATA, "bNodeSocket", 1, sock); if (sock->default_value) writestruct(wd, DATA, stype->value_structname, 1, sock->default_value); diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 3a51a6a56a4..bac1e3cd8ca 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -84,7 +84,7 @@ typedef struct bNodeSocket { /* execution data */ short stack_index; /* local stack index */ - short pad2; + short stack_type; /* deprecated, kept for forward compatibility */ int pad3; void *cache; /* cached data from execution */ @@ -198,8 +198,8 @@ typedef struct bNodeLink { } bNodeLink; /* link->flag */ -#define NODE_LINK_VALID 1 /* link has been successfully validated */ -#define NODE_LINKFLAG_HILITE 2 +#define NODE_LINKFLAG_HILITE 1 /* link has been successfully validated */ +#define NODE_LINK_VALID 2 /* the basis for a Node tree, all links and nodes reside internal here */ /* only re-usable node trees are in the library though, materials and textures allocate own tree struct */ -- cgit v1.2.3 From 2ebc534900ab7ccaa37ec25dcc1aa24230fb1426 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 6 Sep 2011 17:18:50 +0000 Subject: Fix screen/scene browsing in info header not working right, mistake in code cleanup. --- source/blender/makesrna/intern/rna_screen.c | 8 +++++--- source/blender/makesrna/intern/rna_wm.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 59707f05e6f..bd1021f038a 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -68,13 +68,14 @@ static void rna_Screen_scene_set(PointerRNA *ptr, PointerRNA value) sc->newscene= value.data; } -static void rna_Screen_scene_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Screen_scene_update(bContext *C, PointerRNA *ptr) { bScreen *sc= (bScreen*)ptr->data; - /* exception: can't set screens inside of area/region handers */ + /* exception: can't set screens inside of area/region handers, and must + use context so notifier gets to the right window */ if(sc->newscene) { - WM_main_add_notifier(NC_SCENE|ND_SCENEBROWSE, sc->newscene); + WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, sc->newscene); sc->newscene= NULL; } } @@ -231,6 +232,7 @@ static void rna_def_screen(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL); RNA_def_property_pointer_funcs(prop, NULL, "rna_Screen_scene_set", NULL, NULL); RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen"); + RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, 0, "rna_Screen_scene_update"); /* collections */ diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index a595b121d1a..7ce1e1ab88f 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -482,13 +482,14 @@ static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value) win->newscreen= value.data; } -static void rna_Window_screen_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Window_screen_update(bContext *C, PointerRNA *ptr) { wmWindow *win= (wmWindow*)ptr->data; - /* exception: can't set screens inside of area/region handers */ + /* exception: can't set screens inside of area/region handers, and must + use context so notifier gets to the right window */ if(win->newscreen) { - WM_main_add_notifier(NC_SCREEN|ND_SCREENBROWSE, win->newscreen); + WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, win->newscreen); win->newscreen= NULL; } } @@ -1454,6 +1455,7 @@ static void rna_def_window(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Screen", "Active screen showing in the window"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, NULL, "rna_Window_screen_set", NULL, NULL); + RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, 0, "rna_Window_screen_update"); } -- cgit v1.2.3 From 5700b1b1b24c42ac5c02b1da622d28bfefef6154 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 6 Sep 2011 17:27:18 +0000 Subject: Fix missing warning message when reading files that are not forward compatible, it seems this never worked in 2.5. --- source/blender/blenkernel/intern/blender.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 5f33059e117..2d4354bdd9f 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -324,17 +324,14 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath MEM_freeN(bfd); } -static int handle_subversion_warning(Main *main) +static int handle_subversion_warning(Main *main, ReportList *reports) { if(main->minversionfile > BLENDER_VERSION || (main->minversionfile == BLENDER_VERSION && main->minsubversionfile > BLENDER_SUBVERSION)) { - - char str[128]; - - BLI_snprintf(str, sizeof(str), "File written by newer Blender binary: %d.%d , expect loss of data!", main->minversionfile, main->minsubversionfile); -// XXX error(str); + BKE_reportf(reports, RPT_ERROR, "File written by newer Blender binary: %d.%d , expect loss of data!", main->minversionfile, main->minsubversionfile); } + return 1; } @@ -392,7 +389,7 @@ int BKE_read_file(bContext *C, const char *filepath, ReportList *reports) if (bfd) { if(bfd->user) retval= BKE_READ_FILE_OK_USERPREFS; - if(0==handle_subversion_warning(bfd->main)) { + if(0==handle_subversion_warning(bfd->main, reports)) { free_main(bfd->main); MEM_freeN(bfd); bfd= NULL; -- cgit v1.2.3 From f2e236e312eb2e441e9869120165b316f0fddb44 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Tue, 6 Sep 2011 17:28:26 +0000 Subject: Enabled the 'Layout' node category, currently only containing the 'Frame' node. Both the category and the node could be renamed as needed. The frame node is largely experimental and not totally useful yet, but much asked for, so can't hurt to let people try it out. --- source/blender/editors/space_node/node_header.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c index 5c921d40344..7077f4a7497 100644 --- a/source/blender/editors/space_node/node_header.c +++ b/source/blender/editors/space_node/node_header.c @@ -232,6 +232,7 @@ static void node_menu_add(const bContext *C, Menu *menu) uiItemMenuF(layout, "Convertor", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); uiItemMenuF(layout, "Group", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); uiItemMenuF(layout, "Dynamic", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC)); + uiItemMenuF(layout, "Layout", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT)); } else if(snode->treetype==NTREE_COMPOSIT) { uiItemMenuF(layout, "Input", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); @@ -243,6 +244,7 @@ static void node_menu_add(const bContext *C, Menu *menu) uiItemMenuF(layout, "Matte", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE)); uiItemMenuF(layout, "Distort", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); uiItemMenuF(layout, "Group", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); + uiItemMenuF(layout, "Layout", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT)); } else if(snode->treetype==NTREE_TEXTURE) { uiItemMenuF(layout, "Input", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT)); @@ -253,6 +255,7 @@ static void node_menu_add(const bContext *C, Menu *menu) uiItemMenuF(layout, "Convertor", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR)); uiItemMenuF(layout, "Distort", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT)); uiItemMenuF(layout, "Group", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP)); + uiItemMenuF(layout, "Layout", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT)); } } -- cgit v1.2.3 From decc2c2e774d11126d6006f9c4d4f37f2a09099d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 6 Sep 2011 17:34:56 +0000 Subject: Node merge: fix crash loading files with unknown nodes (e.g. cycles files). --- source/blender/blenkernel/intern/node.c | 6 ++++-- source/blender/blenloader/intern/readfile.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index cd1a6e61151..47fc72f5e52 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1524,9 +1524,11 @@ void NodeTagChanged(bNodeTree *ntree, bNode *node) { bNodeTreeType *ntreetype = ntreeGetType(ntree->type); - if (ntreetype->update_node) + /* extra null pointer checks here because this is called when unlinking + unknown nodes on file load, so typeinfo pointers may not be set */ + if (ntreetype && ntreetype->update_node) ntreetype->update_node(ntree, node); - else if (node->typeinfo->updatefunc) + else if (node->typeinfo && node->typeinfo->updatefunc) node->typeinfo->updatefunc(ntree, node); } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d1a19f24b97..664148157cb 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2217,8 +2217,9 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) if(node->type == NODE_DYNAMIC) { node->custom1= 0; node->custom1= BSET(node->custom1, NODE_DYNAMIC_LOADED); - node->typeinfo= NULL; } + + node->typeinfo= NULL; link_list(fd, &node->inputs); link_list(fd, &node->outputs); -- cgit v1.2.3 From 53671577a4ead5e96889a5fcd5a04255f8c948de Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 6 Sep 2011 18:15:34 +0000 Subject: Fixed potential crash in NodeTagIDChanged. Discovered after merge trunk into tomato where there were no check for tree before calling this function. Old design worked fine with this. Mark some arguments as UNUSED. --- source/blender/blenkernel/intern/node.c | 4 +++- source/blender/nodes/composite/nodes/node_composite_common.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 47fc72f5e52..292f38b9472 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1534,13 +1534,15 @@ void NodeTagChanged(bNodeTree *ntree, bNode *node) int NodeTagIDChanged(bNodeTree *ntree, ID *id) { - bNodeTreeType *ntreetype = ntreeGetType(ntree->type); + bNodeTreeType *ntreetype; bNode *node; int change = FALSE; if(ELEM(NULL, id, ntree)) return change; + ntreetype = ntreeGetType(ntree->type); + if (ntreetype->update_node) { for(node= ntree->nodes.first; node; node= node->next) { if(node->id==id) { diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c index 8067f7e92be..d5ae442c25f 100644 --- a/source/blender/nodes/composite/nodes/node_composite_common.c +++ b/source/blender/nodes/composite/nodes/node_composite_common.c @@ -135,7 +135,7 @@ static void *group_initexec(bNode *node) return exec; } -static void group_freeexec(bNode *node, void *nodedata) +static void group_freeexec(bNode *UNUSED(node), void *nodedata) { bNodeTreeExec *gexec= (bNodeTreeExec*)nodedata; -- cgit v1.2.3 From 813d09cb5904bd435a6eefa328314d3cb9076be8 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Tue, 6 Sep 2011 21:02:26 +0000 Subject: BGE fix: ignore sounds that cannot be opened instead of crashing. ;-) --- source/gameengine/Converter/KX_ConvertActuators.cpp | 21 ++++++++++++++------- source/gameengine/Ketsji/KX_SoundActuator.cpp | 10 +++++++++- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 8fc224fba6f..6ba178cbb2f 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -413,14 +413,21 @@ void BL_ConvertActuators(char* maggiename, // if sound shall be 3D but isn't mono, we have to make it mono! if(is3d) { - AUD_Reference reader = snd_sound->createReader(); - if(reader->getSpecs().channels != AUD_CHANNELS_MONO) + try { - AUD_DeviceSpecs specs; - specs.channels = AUD_CHANNELS_MONO; - specs.rate = AUD_RATE_INVALID; - specs.format = AUD_FORMAT_INVALID; - snd_sound = new AUD_ChannelMapperFactory(snd_sound, specs); + AUD_Reference reader = snd_sound->createReader(); + if(reader->getSpecs().channels != AUD_CHANNELS_MONO) + { + AUD_DeviceSpecs specs; + specs.channels = AUD_CHANNELS_MONO; + specs.rate = AUD_RATE_INVALID; + specs.format = AUD_FORMAT_INVALID; + snd_sound = new AUD_ChannelMapperFactory(snd_sound, specs); + } + } + catch(AUD_Exception&) + { + // sound cannot be played... ignore } } } diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index 6c7b515c095..f24243fcdfc 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -108,7 +108,15 @@ void KX_SoundActuator::play() break; } - m_handle = AUD_getDevice()->play(sound, 0); + try + { + m_handle = AUD_getDevice()->play(sound, 0); + } + catch(AUD_Exception&) + { + // cannot play back, ignore + return; + } AUD_Reference handle3d = AUD_Reference(m_handle); -- cgit v1.2.3 From 9baff83d72ccb287e2e6011c648877b96790e9a9 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Tue, 6 Sep 2011 22:18:12 +0000 Subject: Split off scene export code. --- source/blender/collada/CMakeLists.txt | 2 + source/blender/collada/DocumentExporter.cpp | 162 +--------------------------- source/blender/collada/SceneExporter.cpp | 161 +++++++++++++++++++++++++++ source/blender/collada/SceneExporter.h | 101 +++++++++++++++++ 4 files changed, 267 insertions(+), 159 deletions(-) create mode 100644 source/blender/collada/SceneExporter.cpp create mode 100644 source/blender/collada/SceneExporter.h diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt index d73373aa901..cc7229383e3 100644 --- a/source/blender/collada/CMakeLists.txt +++ b/source/blender/collada/CMakeLists.txt @@ -61,6 +61,7 @@ set(SRC MaterialExporter.cpp MeshImporter.cpp SkinInfo.cpp + SceneExporter.cpp TransformReader.cpp TransformWriter.cpp collada.cpp @@ -85,6 +86,7 @@ set(SRC MaterialExporter.h MeshImporter.h SkinInfo.h + SceneExporter.h TransformReader.h TransformWriter.h collada.h diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp index 6e780889d16..85f37d29f22 100644 --- a/source/blender/collada/DocumentExporter.cpp +++ b/source/blender/collada/DocumentExporter.cpp @@ -34,6 +34,7 @@ extern "C" { #include "DNA_scene_types.h" #include "DNA_object_types.h" +#include "DNA_group_types.h" #include "DNA_meshdata_types.h" #include "DNA_mesh_types.h" #include "DNA_image_types.h" @@ -104,6 +105,7 @@ extern char build_rev[]; #include "COLLADASWConstants.h" #include "COLLADASWLibraryControllers.h" #include "COLLADASWInstanceController.h" +#include "COLLADASWInstanceNode.h" #include "COLLADASWBaseInputElement.h" #include "collada_internal.h" @@ -113,6 +115,7 @@ extern char build_rev[]; #include "InstanceWriter.h" #include "TransformWriter.h" +#include "SceneExporter.h" #include "ArmatureExporter.h" #include "AnimationExporter.h" #include "CameraExporter.h" @@ -142,165 +145,6 @@ char *bc_CustomData_get_active_layer_name(const CustomData *data, int type) return data->layers[layer_index].name; } - -/* - Utilities to avoid code duplication. - Definition can take some time to understand, but they should be useful. -*/ - - -template -void forEachObjectInScene(Scene *sce, Functor &f) -{ - Base *base= (Base*) sce->base.first; - while(base) { - Object *ob = base->object; - - f(ob); - - base= base->next; - } -} - - - -class SceneExporter: COLLADASW::LibraryVisualScenes, protected TransformWriter, protected InstanceWriter -{ - ArmatureExporter *arm_exporter; -public: - SceneExporter(COLLADASW::StreamWriter *sw, ArmatureExporter *arm) : COLLADASW::LibraryVisualScenes(sw), - arm_exporter(arm) {} - - void exportScene(Scene *sce, bool export_selected) { - // - std::string id_naming = id_name(sce); - openVisualScene(translate_id(id_naming), id_naming); - - // write s - //forEachMeshObjectInScene(sce, *this); - //forEachCameraObjectInScene(sce, *this); - //forEachLampObjectInScene(sce, *this); - exportHierarchy(sce, export_selected); - - // - closeVisualScene(); - - closeLibrary(); - } - - void exportHierarchy(Scene *sce, bool export_selected) - { - Base *base= (Base*) sce->base.first; - while(base) { - Object *ob = base->object; - - if (!ob->parent) { - if(sce->lay & ob->lay) { - switch(ob->type) { - case OB_MESH: - case OB_CAMERA: - case OB_LAMP: - case OB_ARMATURE: - case OB_EMPTY: - if (export_selected && !(ob->flag & SELECT)) { - break; - } - // write nodes.... - writeNodes(ob, sce); - break; - } - } - } - - base= base->next; - } - } - - - // called for each object - //void operator()(Object *ob) { - void writeNodes(Object *ob, Scene *sce) - { - COLLADASW::Node node(mSW); - node.setNodeId(translate_id(id_name(ob))); - node.setType(COLLADASW::Node::NODE); - - node.start(); - - bool is_skinned_mesh = arm_exporter->is_skinned_mesh(ob); - - if (ob->type == OB_MESH && is_skinned_mesh) - // for skinned mesh we write obmat in - TransformWriter::add_node_transform_identity(node); - else - TransformWriter::add_node_transform_ob(node, ob); - - // - if (ob->type == OB_MESH) { - if (is_skinned_mesh) { - arm_exporter->add_instance_controller(ob); - } - else { - COLLADASW::InstanceGeometry instGeom(mSW); - instGeom.setUrl(COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_geometry_id(ob))); - - InstanceWriter::add_material_bindings(instGeom.getBindMaterial(), ob); - - instGeom.add(); - } - } - - // - else if (ob->type == OB_ARMATURE) { - arm_exporter->add_armature_bones(ob, sce); - - // XXX this looks unstable... - node.end(); - } - - // - else if (ob->type == OB_CAMERA) { - COLLADASW::InstanceCamera instCam(mSW, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_camera_id(ob))); - instCam.add(); - } - - // - else if (ob->type == OB_LAMP) { - COLLADASW::InstanceLight instLa(mSW, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_light_id(ob))); - instLa.add(); - } - - // empty object - else if (ob->type == OB_EMPTY) { - } - - // write nodes for child objects - Base *b = (Base*) sce->base.first; - while(b) { - // cob - child object - Object *cob = b->object; - - if (cob->parent == ob) { - switch(cob->type) { - case OB_MESH: - case OB_CAMERA: - case OB_LAMP: - case OB_EMPTY: - case OB_ARMATURE: - // write node... - writeNodes(cob, sce); - break; - } - } - - b = b->next; - } - - if (ob->type != OB_ARMATURE) - node.end(); - } -}; - // TODO: it would be better to instantiate animations rather than create a new one per object // COLLADA allows this through multiple s in . // For this to work, we need to know objects that use a certain action. diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp new file mode 100644 index 00000000000..96f20ac21c3 --- /dev/null +++ b/source/blender/collada/SceneExporter.cpp @@ -0,0 +1,161 @@ +/* + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Chingiz Dyussenov, Arystanbek Dyussenov, Jan Diederich, Tod Liverseed. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/collada/SceneExporter.cpp + * \ingroup collada + */ + +#include "SceneExporter.h" + +SceneExporter::SceneExporter(COLLADASW::StreamWriter *sw, ArmatureExporter *arm) + : COLLADASW::LibraryVisualScenes(sw), arm_exporter(arm) +{} + +void SceneExporter::exportScene(Scene *sce, bool export_selected) +{ + // + std::string id_naming = id_name(sce); + openVisualScene(translate_id(id_naming), id_naming); + exportHierarchy(sce, export_selected); + closeVisualScene(); + closeLibrary(); +} + +void SceneExporter::exportHierarchy(Scene *sce, bool export_selected) +{ + Base *base= (Base*) sce->base.first; + while(base) { + Object *ob = base->object; + + if (!ob->parent) { + if(sce->lay & ob->lay) { + switch(ob->type) { + case OB_MESH: + case OB_CAMERA: + case OB_LAMP: + case OB_ARMATURE: + case OB_EMPTY: + if (export_selected && !(ob->flag & SELECT)) { + break; + } + // write nodes.... + writeNodes(ob, sce); + break; + } + } + } + + base= base->next; + } +} + +void SceneExporter::writeNodes(Object *ob, Scene *sce) +{ + COLLADASW::Node node(mSW); + node.setNodeId(translate_id(id_name(ob))); + node.setType(COLLADASW::Node::NODE); + + node.start(); + + bool is_skinned_mesh = arm_exporter->is_skinned_mesh(ob); + + if (ob->type == OB_MESH && is_skinned_mesh) + // for skinned mesh we write obmat in + TransformWriter::add_node_transform_identity(node); + else + TransformWriter::add_node_transform_ob(node, ob); + + // + if (ob->type == OB_MESH) { + if (is_skinned_mesh) { + arm_exporter->add_instance_controller(ob); + } + else { + COLLADASW::InstanceGeometry instGeom(mSW); + instGeom.setUrl(COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_geometry_id(ob))); + + InstanceWriter::add_material_bindings(instGeom.getBindMaterial(), ob); + + instGeom.add(); + } + } + + // + else if (ob->type == OB_ARMATURE) { + arm_exporter->add_armature_bones(ob, sce); + + // XXX this looks unstable... + node.end(); + } + + // + else if (ob->type == OB_CAMERA) { + COLLADASW::InstanceCamera instCam(mSW, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_camera_id(ob))); + instCam.add(); + } + + // + else if (ob->type == OB_LAMP) { + COLLADASW::InstanceLight instLa(mSW, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_light_id(ob))); + instLa.add(); + } + + // empty object + else if (ob->type == OB_EMPTY) { // TODO: handle groups (OB_DUPLIGROUP + if((ob->transflag & OB_DUPLIGROUP) == OB_DUPLIGROUP && ob->dup_group) { + GroupObject *go = NULL; + Group *gr = ob->dup_group; + printf("group detected %u\n", gr); + for(go = (GroupObject*)(gr->gobject.first); go; go=go->next) { + printf("\t%s\n", go->ob->id.name); + } + } + } + + // write nodes for child objects + Base *b = (Base*) sce->base.first; + while(b) { + // cob - child object + Object *cob = b->object; + + if (cob->parent == ob) { + switch(cob->type) { + case OB_MESH: + case OB_CAMERA: + case OB_LAMP: + case OB_EMPTY: + case OB_ARMATURE: + // write node... + writeNodes(cob, sce); + break; + } + } + + b = b->next; + } + + if (ob->type != OB_ARMATURE) + node.end(); +} + diff --git a/source/blender/collada/SceneExporter.h b/source/blender/collada/SceneExporter.h new file mode 100644 index 00000000000..30fef924ffd --- /dev/null +++ b/source/blender/collada/SceneExporter.h @@ -0,0 +1,101 @@ +/* + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Chingiz Dyussenov, Arystanbek Dyussenov. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file SceneExporter.h + * \ingroup collada + */ + +#ifndef __SCENEEXPORTER_H__ +#define __SCENEEXPORTER_H__ + +extern "C" { +#include "DNA_scene_types.h" +#include "DNA_object_types.h" +#include "DNA_group_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_mesh_types.h" +#include "DNA_image_types.h" +#include "DNA_material_types.h" +#include "DNA_texture_types.h" +#include "DNA_anim_types.h" +#include "DNA_action_types.h" +#include "DNA_curve_types.h" +#include "DNA_armature_types.h" +#include "DNA_modifier_types.h" +#include "DNA_userdef_types.h" + +#include "BKE_DerivedMesh.h" +#include "BKE_fcurve.h" +#include "BKE_animsys.h" +#include "BLI_path_util.h" +#include "BLI_fileops.h" +#include "ED_keyframing.h" +} + +#include "COLLADASWAsset.h" +#include "COLLADASWLibraryVisualScenes.h" +#include "COLLADASWNode.h" +#include "COLLADASWSource.h" +#include "COLLADASWInstanceGeometry.h" +#include "COLLADASWInputList.h" +#include "COLLADASWPrimitves.h" +#include "COLLADASWVertices.h" +#include "COLLADASWLibraryAnimations.h" +#include "COLLADASWLibraryImages.h" +#include "COLLADASWLibraryEffects.h" +#include "COLLADASWImage.h" +#include "COLLADASWEffectProfile.h" +#include "COLLADASWColorOrTexture.h" +#include "COLLADASWParamTemplate.h" +#include "COLLADASWParamBase.h" +#include "COLLADASWSurfaceInitOption.h" +#include "COLLADASWSampler.h" +#include "COLLADASWScene.h" +#include "COLLADASWTechnique.h" +#include "COLLADASWTexture.h" +#include "COLLADASWLibraryMaterials.h" +#include "COLLADASWBindMaterial.h" +#include "COLLADASWInstanceCamera.h" +#include "COLLADASWInstanceLight.h" +#include "COLLADASWConstants.h" +#include "COLLADASWLibraryControllers.h" +#include "COLLADASWInstanceController.h" +#include "COLLADASWInstanceNode.h" +#include "COLLADASWBaseInputElement.h" + +#include "ArmatureExporter.h" + +class SceneExporter: COLLADASW::LibraryVisualScenes, protected TransformWriter, protected InstanceWriter +{ + ArmatureExporter *arm_exporter; +public: + SceneExporter(COLLADASW::StreamWriter *sw, ArmatureExporter *arm); + void exportScene(Scene *sce, bool export_selected); + +private: + void exportHierarchy(Scene *sce, bool export_selected); + void writeNodes(Object *ob, Scene *sce); +}; + +#endif -- cgit v1.2.3 From 9161d3ce4bdd7c838751462b47eb045ea33a686e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 6 Sep 2011 23:46:20 +0000 Subject: use Py_ssize_t rather than int when dealing with list sizes (original patch from Fedora but applied changes elsewhere too), also replace PyList_Size with PyList_GET_SIZE where typechecking is already done. --- source/blender/python/generic/bpy_internal_import.c | 4 ++-- source/blender/python/intern/bpy_rna.c | 2 +- source/blender/python/mathutils/mathutils_geometry.c | 12 ++++++------ source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp | 5 +++-- source/gameengine/Expressions/ListValue.cpp | 4 ++-- source/gameengine/Expressions/Value.cpp | 4 ++-- source/gameengine/Ketsji/KX_PythonInit.cpp | 6 +++--- source/gameengine/Ketsji/KX_Scene.cpp | 4 ++-- 8 files changed, 21 insertions(+), 20 deletions(-) diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c index f0158fe72c3..67ed90c79eb 100644 --- a/source/blender/python/generic/bpy_internal_import.c +++ b/source/blender/python/generic/bpy_internal_import.c @@ -344,7 +344,7 @@ void bpy_text_clear_modules(int clear_all) /* looping over the dict */ PyObject *key, *value; - int pos= 0; + Py_ssize_t pos= 0; /* new list */ PyObject *list; @@ -374,7 +374,7 @@ void bpy_text_clear_modules(int clear_all) } /* remove all our modules */ - for(pos=0; pos < PyList_Size(list); pos++) { + for(pos=0; pos < PyList_GET_SIZE(list); pos++) { /* PyObject_Print(key, stderr, 0); */ key= PyList_GET_ITEM(list, pos); PyDict_DelItem(modules, key); diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index d10c8c843e8..2212499d842 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -4608,7 +4608,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject #ifdef DEBUG_STRING_FREE - // if(PyList_Size(string_free_ls)) printf("%.200s.%.200s(): has %d strings\n", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), (int)PyList_Size(string_free_ls)); + // if(PyList_GET_SIZE(string_free_ls)) printf("%.200s.%.200s(): has %d strings\n", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), (int)PyList_GET_SIZE(string_free_ls)); Py_DECREF(string_free_ls); #undef DEBUG_STRING_FREE #endif diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c index bcdfe020e1a..0394d732ae3 100644 --- a/source/blender/python/mathutils/mathutils_geometry.c +++ b/source/blender/python/mathutils/mathutils_geometry.c @@ -983,7 +983,7 @@ static PyObject *M_Geometry_tesselate_polygon(PyObject *UNUSED(self), PyObject * static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray) { - int len, i; + Py_ssize_t len, i; PyObject *list_item, *item_1, *item_2; boxPack *box; @@ -995,14 +995,14 @@ static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray) return -1; } - len= PyList_Size(value); + len= PyList_GET_SIZE(value); (*boxarray)= MEM_mallocN(len*sizeof(boxPack), "boxPack box"); for(i= 0; i < len; i++) { list_item= PyList_GET_ITEM(value, i); - if(!PyList_Check(list_item) || PyList_Size(list_item) < 4) { + if(!PyList_Check(list_item) || PyList_GET_SIZE(list_item) < 4) { MEM_freeN(*boxarray); PyErr_SetString(PyExc_TypeError, "can only pack a list of [x, y, w, h]"); @@ -1034,11 +1034,11 @@ static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray) static void boxPack_ToPyObject(PyObject *value, boxPack **boxarray) { - int len, i; + Py_ssize_t len, i; PyObject *list_item; boxPack *box; - len= PyList_Size(value); + len= PyList_GET_SIZE(value); for(i= 0; i < len; i++) { box= (*boxarray)+i; @@ -1062,7 +1062,7 @@ PyDoc_STRVAR(M_Geometry_box_pack_2d_doc, static PyObject *M_Geometry_box_pack_2d(PyObject *UNUSED(self), PyObject *boxlist) { float tot_width= 0.0f, tot_height= 0.0f; - int len; + Py_ssize_t len; PyObject *ret; diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 40f1701e44a..810e9b6ddfb 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -507,9 +507,10 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c //PyDict_Clear(PyModule_GetDict(gameLogic)); // Keep original items, means python plugins will autocomplete members - int listIndex; PyObject *gameLogic_keys_new = PyDict_Keys(PyModule_GetDict(gameLogic)); - for (listIndex=0; listIndex < PyList_Size(gameLogic_keys_new); listIndex++) { + const Py_ssize_t numitems= PyList_GET_SIZE(gameLogic_keys_new); + Py_ssize_t listIndex; + for (listIndex=0; listIndex < numitems; listIndex++) { PyObject* item = PyList_GET_ITEM(gameLogic_keys_new, listIndex); if (!PySequence_Contains(gameLogic_keys, item)) { PyDict_DelItem( PyModule_GetDict(gameLogic), item); diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp index 271d5067dd9..934f2a8dd87 100644 --- a/source/gameengine/Expressions/ListValue.cpp +++ b/source/gameengine/Expressions/ListValue.cpp @@ -387,7 +387,7 @@ PyObject* listvalue_buffer_slice(PyObject* self,Py_ssize_t ilow, Py_ssize_t ihig static PyObject *listvalue_buffer_concat(PyObject * self, PyObject * other) { CListValue *listval= static_cast(BGE_PROXY_REF(self)); - int i, numitems, numitems_orig; + Py_ssize_t i, numitems, numitems_orig; if (listval==NULL) { PyErr_SetString(PyExc_SystemError, "CList+other, "BGE_PROXY_ERROR_MSG); @@ -408,7 +408,7 @@ static PyObject *listvalue_buffer_concat(PyObject * self, PyObject * other) CValue* listitemval; bool error = false; - numitems = PyList_Size(other); + numitems = PyList_GET_SIZE(other); /* copy the first part of the list */ listval_new->Resize(numitems_orig + numitems); diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp index e60b380e95c..41c0850a779 100644 --- a/source/gameengine/Expressions/Value.cpp +++ b/source/gameengine/Expressions/Value.cpp @@ -546,8 +546,8 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix) CListValue* listval = new CListValue(); bool error = false; - int i; - int numitems = PyList_Size(pyobj); + Py_ssize_t i; + Py_ssize_t numitems = PyList_GET_SIZE(pyobj); for (i=0;iGetSceneConverter()->ConvertMeshSpecial(kx_scene, maggie, name); @@ -1751,7 +1751,7 @@ static void initPySysObjects(Main *maggie) initPySysObjects__append(sys_path, gp_GamePythonPath); -// fprintf(stderr, "\nNew Path: %d ", PyList_Size(sys_path)); +// fprintf(stderr, "\nNew Path: %d ", PyList_GET_SIZE(sys_path)); // PyObject_Print(sys_path, stderr, 0); } @@ -1775,7 +1775,7 @@ static void restorePySysObjects(void) gp_OrigPythonSysModules= NULL; -// fprintf(stderr, "\nRestore Path: %d ", PyList_Size(sys_path)); +// fprintf(stderr, "\nRestore Path: %d ", PyList_GET_SIZE(sys_path)); // PyObject_Print(sys_path, stderr, 0); } diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 06e343cedb2..7c76ab01e93 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1916,7 +1916,7 @@ void KX_Scene::Render2DFilters(RAS_ICanvas* canvas) void KX_Scene::RunDrawingCallbacks(PyObject* cb_list) { - int len; + Py_ssize_t len; if (cb_list && (len=PyList_GET_SIZE(cb_list))) { @@ -1925,7 +1925,7 @@ void KX_Scene::RunDrawingCallbacks(PyObject* cb_list) PyObject* ret; // Iterate the list and run the callbacks - for (int pos=0; pos < len; pos++) + for (Py_ssize_t pos=0; pos < len; pos++) { func= PyList_GET_ITEM(cb_list, pos); ret= PyObject_Call(func, args, NULL); -- cgit v1.2.3 From 527907662822fea5727bb5deecb96c9f1017adbd Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Wed, 7 Sep 2011 06:17:28 +0000 Subject: Fix for value node limits. The value input nodes (like rgb input nodes) use the output value out their first socket for the button value. This needs explicitly set range limits to allow meaningful user input. --- source/blender/nodes/composite/nodes/node_composite_value.c | 2 ++ source/blender/nodes/shader/nodes/node_shader_value.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/blender/nodes/composite/nodes/node_composite_value.c b/source/blender/nodes/composite/nodes/node_composite_value.c index 0bb558cfa9d..80b71b9e65d 100644 --- a/source/blender/nodes/composite/nodes/node_composite_value.c +++ b/source/blender/nodes/composite/nodes/node_composite_value.c @@ -46,6 +46,8 @@ static void node_composit_init_value(bNodeTree *UNUSED(ntree), bNode *node, bNod bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value; /* uses the default value of the output socket, must be initialized here */ dval->value = 0.5f; + dval->min = -FLT_MAX; + dval->max = FLT_MAX; } static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) diff --git a/source/blender/nodes/shader/nodes/node_shader_value.c b/source/blender/nodes/shader/nodes/node_shader_value.c index bbd3f8fc242..aadbd034e10 100644 --- a/source/blender/nodes/shader/nodes/node_shader_value.c +++ b/source/blender/nodes/shader/nodes/node_shader_value.c @@ -46,6 +46,8 @@ static void node_shader_init_value(bNodeTree *UNUSED(ntree), bNode *node, bNodeT bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value; /* uses the default value of the output socket, must be initialized here */ dval->value = 0.5f; + dval->min = -FLT_MAX; + dval->max = FLT_MAX; } static void node_shader_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) -- cgit v1.2.3 From 5fa74525590f2014e92a687eb739389368a1b780 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Wed, 7 Sep 2011 07:02:56 +0000 Subject: Attempt to fix compile error on OSX --- source/blender/collada/SceneExporter.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/collada/SceneExporter.h b/source/blender/collada/SceneExporter.h index 30fef924ffd..65dbd616b20 100644 --- a/source/blender/collada/SceneExporter.h +++ b/source/blender/collada/SceneExporter.h @@ -29,6 +29,10 @@ #ifndef __SCENEEXPORTER_H__ #define __SCENEEXPORTER_H__ +#include +#include +#include + extern "C" { #include "DNA_scene_types.h" #include "DNA_object_types.h" -- cgit v1.2.3 From f6a64f4d799ad28b297d78c1107e74233b7018b0 Mon Sep 17 00:00:00 2001 From: "Guillermo S. Romero" Date: Wed, 7 Sep 2011 07:06:43 +0000 Subject: SVN maintenance. --- .../blender/modifiers/intern/MOD_weightvg_util.c | 58 +++++++++++----------- .../blender/modifiers/intern/MOD_weightvg_util.h | 52 +++++++++---------- source/blender/modifiers/intern/MOD_weightvgedit.c | 52 +++++++++---------- source/blender/modifiers/intern/MOD_weightvgmix.c | 52 +++++++++---------- .../modifiers/intern/MOD_weightvgproximity.c | 52 +++++++++---------- 5 files changed, 133 insertions(+), 133 deletions(-) diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 675f0d76a48..52c851c5a1d 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -1,34 +1,34 @@ /* -* $Id$ -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* The Original Code is Copyright (C) 2011 by Bastien Montagne. -* All rights reserved. -* -* Contributor(s): None yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -*/ + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 by Bastien Montagne. + * All rights reserved. + * + * Contributor(s): None yet. + * + * ***** END GPL LICENSE BLOCK ***** + * + */ /* * XXX I'd like to make modified weights visible in WeightPaint mode, - * but couldn't figure a way to do this… + * but couldn't figure a way to do this... * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)? * Or the WeightPaint mode code itself? */ @@ -131,7 +131,7 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne if (texture) { /* The texture coordinates. */ float (*tex_co)[3]; - /* See mapping note below… */ + /* See mapping note below... */ MappingInfoModifierData t_map; float (*v_co)[3]; @@ -158,7 +158,7 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne texres.nor = NULL; get_texture_value(texture, tex_co[idx], &texres); - /* Get the good channel value… */ + /* Get the good channel value... */ switch(tex_use_channel) { case MOD_WVG_MASK_TEX_USE_INT: org_w[i] = (new_w[i] * texres.tin * fact) + (org_w[i] * (1.0f - (texres.tin*fact))); diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h index 3afff391943..00c63a3d5d5 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.h +++ b/source/blender/modifiers/intern/MOD_weightvg_util.h @@ -1,30 +1,30 @@ /* -* $Id$ -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* The Original Code is Copyright (C) 2011 by Bastien Montagne. -* All rights reserved. -* -* Contributor(s): None yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -*/ + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 by Bastien Montagne. + * All rights reserved. + * + * Contributor(s): None yet. + * + * ***** END GPL LICENSE BLOCK ***** + * + */ /** \file blender/modifiers/intern/MOD_util.h * \ingroup modifiers diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index 763a063567b..7a7f69c4751 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -1,30 +1,30 @@ /* -* $Id$ -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* The Original Code is Copyright (C) 2011 by Bastien Montagne. -* All rights reserved. -* -* Contributor(s): None yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -*/ + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 by Bastien Montagne. + * All rights reserved. + * + * Contributor(s): None yet. + * + * ***** END GPL LICENSE BLOCK ***** + * + */ /* * XXX I'd like to make modified weights visible in WeightPaint mode, diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 7543b085b51..97857644c35 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -1,30 +1,30 @@ /* -* $Id$ -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* The Original Code is Copyright (C) 2011 by Bastien Montagne. -* All rights reserved. -* -* Contributor(s): None yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -*/ + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 by Bastien Montagne. + * All rights reserved. + * + * Contributor(s): None yet. + * + * ***** END GPL LICENSE BLOCK ***** + * + */ /* * XXX I'd like to make modified weights visible in WeightPaint mode, diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 35f993e24b6..55f0102bef3 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -1,30 +1,30 @@ /* -* $Id$ -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* The Original Code is Copyright (C) 2011 by Bastien Montagne. -* All rights reserved. -* -* Contributor(s): None yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -*/ + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 by Bastien Montagne. + * All rights reserved. + * + * Contributor(s): None yet. + * + * ***** END GPL LICENSE BLOCK ***** + * + */ /* * XXX I'd like to make modified weights visible in WeightPaint mode, -- cgit v1.2.3 From 6d18b1800a9bbbb7ab0ab03907a1d2a720d7f8d0 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Wed, 7 Sep 2011 07:29:29 +0000 Subject: Another fix for value nodes, those need full template definitions for their output sockets, since they use their range limits for buttons. --- source/blender/nodes/composite/nodes/node_composite_value.c | 3 ++- source/blender/nodes/shader/nodes/node_shader_value.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/nodes/composite/nodes/node_composite_value.c b/source/blender/nodes/composite/nodes/node_composite_value.c index 80b71b9e65d..ed650477f50 100644 --- a/source/blender/nodes/composite/nodes/node_composite_value.c +++ b/source/blender/nodes/composite/nodes/node_composite_value.c @@ -36,7 +36,8 @@ /* **************** VALUE ******************** */ static bNodeSocketTemplate cmp_node_value_out[]= { - { SOCK_FLOAT, 0, "Value"}, + /* XXX value nodes use the output sockets for buttons, so we need explicit limits here! */ + { SOCK_FLOAT, 0, "Value", 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX}, { -1, 0, "" } }; diff --git a/source/blender/nodes/shader/nodes/node_shader_value.c b/source/blender/nodes/shader/nodes/node_shader_value.c index aadbd034e10..119a3664308 100644 --- a/source/blender/nodes/shader/nodes/node_shader_value.c +++ b/source/blender/nodes/shader/nodes/node_shader_value.c @@ -36,7 +36,8 @@ /* **************** VALUE ******************** */ static bNodeSocketTemplate sh_node_value_out[]= { - { SOCK_FLOAT, 0, "Value"}, + /* XXX value nodes use the output sockets for buttons, so we need explicit limits here! */ + { SOCK_FLOAT, 0, "Value", 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX}, { -1, 0, "" } }; -- cgit v1.2.3 From 520778163debe82b8cebe9ddec6ab4111ab2d6bd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 7 Sep 2011 07:46:26 +0000 Subject: interface + naming improvements to vertex wright modifier - WeightVG -> Vertex Weight - mapping_mode -> falloff_type - nicer layout for VertexWeightModifiers add/remove options --- doc/python_api/rst/info_tips_and_tricks.rst | 16 +++++++++ .../startup/bl_ui/properties_data_modifier.py | 31 +++++++++-------- source/blender/editors/include/UI_icons.h | 2 +- source/blender/makesdna/DNA_modifier_types.h | 4 +-- source/blender/makesrna/intern/rna_modifier.c | 40 +++++++++++----------- .../blender/modifiers/intern/MOD_weightvg_util.c | 12 +++---- source/blender/modifiers/intern/MOD_weightvgedit.c | 10 +++--- source/blender/modifiers/intern/MOD_weightvgmix.c | 2 +- .../modifiers/intern/MOD_weightvgproximity.c | 8 ++--- 9 files changed, 72 insertions(+), 53 deletions(-) diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst index f4e68a4516c..3ce2cfd48ad 100644 --- a/doc/python_api/rst/info_tips_and_tricks.rst +++ b/doc/python_api/rst/info_tips_and_tricks.rst @@ -100,6 +100,22 @@ While this is not best practice - for testing you can extend the search path, th Don't Use Blender! ================== +While developing your own scripts blenders interface can get in the way, manually reloading, running the scripts, opening file import etc is just overhead. + +For scripts that are not interactive it can end up being easier not to use blender at all and run blender from a terminal, without opening a window and execute the script on the command line. + +.. code-block:: + + blender --backgruond --python myscript.py + + +You might want to run this with a blend file too. + +.. code-block:: + + blender myscene.blend --backgruond --python myscript.py + + Use External Tools ================== diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 8e7f50cd6f2..058e8161fe6 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -768,7 +768,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH': layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures") - def WEIGHT_VGEDIT(self, layout, ob, md): + def VERTEX_WEIGHT_EDIT(self, layout, ob, md): if ob.type == 'MESH': split = layout.split() col = split.column() @@ -779,25 +779,28 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.label(text="Default Weight:") col.prop(md, "default_weight", text="") - layout.prop(md, "mapping_mode") - if md.mapping_mode == 'CURVE': + layout.prop(md, "falloff_type") + if md.falloff_type == 'CURVE': col = layout.column() col.template_curve_mapping(md, "map_curve") - row = layout.row() - row.prop(md, "use_add") - row.prop(md, "use_remove") - row = layout.row() - if md.use_add: - row.prop(md, "add_threshold") - if md.use_remove: - row.prop(md, "remove_threshold") + split = layout.split(percentage=0.4) + split.prop(md, "use_add") + row = split.row() + row.active = md.use_add + row.prop(md, "add_threshold") + + split = layout.split(percentage=0.4) + split.prop(md, "use_remove") + row = split.row() + row.active = md.use_remove + row.prop(md, "remove_threshold") # Common mask options… layout.separator() self.weight_vg_mask(layout, ob, md) - def WEIGHT_VGMIX(self, layout, ob, md): + def VERTEX_WEIGHT_MIX(self, layout, ob, md): if ob.type == 'MESH': split = layout.split() col = split.column() @@ -822,7 +825,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.separator() self.weight_vg_mask(layout, ob, md) - def WEIGHT_VGPROXIMITY(self, layout, ob, md): + def VERTEX_WEIGHT_PROXIMITY(self, layout, ob, md): if ob.type == 'MESH': split = layout.split() col = split.column() @@ -843,7 +846,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row.prop(md, "min_dist") row.prop(md, "max_dist") - layout.prop(md, "mapping_mode") + layout.prop(md, "falloff_type") # Common mask options… layout.separator() diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index d6ef4264b07..f8d0b819ac1 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -589,7 +589,7 @@ DEF_ICON(MOD_MULTIRES) DEF_ICON(MOD_SMOKE) DEF_ICON(MOD_SOLIDIFY) DEF_ICON(MOD_SCREW) -DEF_ICON(MOD_WEIGHTVG) +DEF_ICON(MOD_VERTEX_WEIGHT) #ifndef DEF_ICON_BLANK_SKIP DEF_ICON(BLANK161) DEF_ICON(BLANK162) diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index c4eef981669..32a78cb823a 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -796,7 +796,7 @@ typedef struct WeightVGEditModifierData { char defgrp_name[32]; /* Name of vertex group to edit. */ short edit_flags; /* Using MOD_WVG_EDIT_* flags. */ - short mapping_mode; /* Using MOD_WVG_MAPPING_* defines. */ + short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */ float default_weight; /* Weight for vertices not in vgroup. */ /* Mapping stuff. */ @@ -913,7 +913,7 @@ typedef struct WeightVGProximityModifierData { float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */ /* Put here to avoid breaking existing struct... */ - short mapping_mode; /* Using MOD_WVG_MAPPING_* defines. */ + short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */ /* Padding... */ short pad_s1; diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 76e34352e8d..2e8e8520dbf 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -69,9 +69,9 @@ EnumPropertyItem modifier_type_items[] ={ {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""}, {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""}, {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""}, - {eModifierType_WeightVGEdit, "WEIGHT_VGEDIT", ICON_MOD_WEIGHTVG, "WeightVG Edit", ""}, - {eModifierType_WeightVGMix, "WEIGHT_VGMIX", ICON_MOD_WEIGHTVG, "WeightVG Mix", ""}, - {eModifierType_WeightVGProximity, "WEIGHT_VGPROXIMITY", ICON_MOD_WEIGHTVG, "WeightVG Proximity", ""}, + {eModifierType_WeightVGEdit, "VERTEX_WEIGHT_EDIT", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Edit", ""}, + {eModifierType_WeightVGMix, "VERTEX_WEIGHT_MIX", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Mix", ""}, + {eModifierType_WeightVGProximity, "VERTEX_WEIGHT_PROXIMITY", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Proximity", ""}, {0, "", 0, "Deform", ""}, {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""}, {eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""}, @@ -188,11 +188,11 @@ static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr) case eModifierType_Warp: return &RNA_WarpModifier; case eModifierType_WeightVGEdit: - return &RNA_WeightVGEditModifier; + return &RNA_VertexWeightEditModifier; case eModifierType_WeightVGMix: - return &RNA_WeightVGMixModifier; + return &RNA_VertexWeightMixModifier; case eModifierType_WeightVGProximity: - return &RNA_WeightVGProximityModifier; + return &RNA_VertexWeightProximityModifier; default: return &RNA_Modifier; } @@ -2552,7 +2552,7 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *brna, StructRNA *srna) static void rna_def_modifier_weightvgedit(BlenderRNA *brna) { - static EnumPropertyItem weightvg_edit_mapping_mode_items[] = { + static EnumPropertyItem weightvg_edit_falloff_type_items[] = { {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", ""}, {MOD_WVG_MAPPING_CURVE, "CURVE", ICON_RNDCURVE, "Custom Curve", ""}, {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""}, @@ -2566,11 +2566,11 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "WeightVGEditModifier", "Modifier"); + srna= RNA_def_struct(brna, "VertexWeightEditModifier", "Modifier"); RNA_def_struct_ui_text(srna, "WeightVG Edit Modifier", "Edit the weights of vertices in a group."); RNA_def_struct_sdna(srna, "WeightVGEditModifierData"); - RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); + RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT); prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); @@ -2578,9 +2578,9 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "mapping_mode", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, weightvg_edit_mapping_mode_items); - RNA_def_property_ui_text(prop, "Mapping Mode", "How weights are mapped to there new values."); + prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, weightvg_edit_falloff_type_items); + RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to there new values."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE); @@ -2650,11 +2650,11 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "WeightVGMixModifier", "Modifier"); + srna= RNA_def_struct(brna, "VertexWeightMixModifier", "Modifier"); RNA_def_struct_ui_text(srna, "WeightVG Mix Modifier", "Mix the weights of two vertex groups."); RNA_def_struct_sdna(srna, "WeightVGMixModifierData"); - RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); + RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT); prop= RNA_def_property(srna, "vertex_group_a", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "defgrp_name_a"); @@ -2712,7 +2712,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) {MOD_WVG_PROXIMITY_GEOM_FACES, "FACE", ICON_FACESEL, "Face", ""}, {0, NULL, 0, NULL, NULL}}; - static EnumPropertyItem weightvg_proximity_mapping_mode_items[] = { + static EnumPropertyItem weightvg_proximity_falloff_type_items[] = { {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", ""}, /* No curve mapping here! */ {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""}, @@ -2726,12 +2726,12 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "WeightVGProximityModifier", "Modifier"); + srna= RNA_def_struct(brna, "VertexWeightProximityModifier", "Modifier"); RNA_def_struct_ui_text(srna, "WeightVG Proximity Modifier", "Set the weights of vertices in a group from a target object's " "distance."); RNA_def_struct_sdna(srna, "WeightVGProximityModifierData"); - RNA_def_struct_ui_icon(srna, ICON_MOD_WEIGHTVG); + RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT); prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); @@ -2769,9 +2769,9 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Highest Dist", "Distance mapping to weight 1.0."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop= RNA_def_property(srna, "mapping_mode", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, weightvg_proximity_mapping_mode_items); - RNA_def_property_ui_text(prop, "Mapping Mode", "How weights are mapped to there new values."); + prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, weightvg_proximity_falloff_type_items); + RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to there new values."); RNA_def_property_update(prop, 0, "rna_Modifier_update"); /* Common masking properties. */ diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 52c851c5a1d..51465cc80b0 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -63,16 +63,16 @@ * vertex index (in case the weight tables do not cover the whole vertices...). * cmap might be NULL, in which case curve mapping mode will return unmodified data. */ -void weightvg_do_map(int num, float *new_w, short mode, CurveMapping *cmap) +void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cmap) { int i; /* Return immediately, if we have nothing to do! */ /* Also security checks... */ - if(((mode == MOD_WVG_MAPPING_CURVE) && (cmap == NULL)) - || !ELEM7(mode, MOD_WVG_MAPPING_CURVE, MOD_WVG_MAPPING_SHARP, MOD_WVG_MAPPING_SMOOTH, - MOD_WVG_MAPPING_ROOT, MOD_WVG_MAPPING_SPHERE, MOD_WVG_MAPPING_RANDOM, - MOD_WVG_MAPPING_STEP)) + if(((falloff_type == MOD_WVG_MAPPING_CURVE) && (cmap == NULL)) + || !ELEM7(falloff_type, MOD_WVG_MAPPING_CURVE, MOD_WVG_MAPPING_SHARP, MOD_WVG_MAPPING_SMOOTH, + MOD_WVG_MAPPING_ROOT, MOD_WVG_MAPPING_SPHERE, MOD_WVG_MAPPING_RANDOM, + MOD_WVG_MAPPING_STEP)) return; /* Map each weight (vertex) to its new value, accordingly to the chosen mode. */ @@ -81,7 +81,7 @@ void weightvg_do_map(int num, float *new_w, short mode, CurveMapping *cmap) /* Code borrowed from the warp modifier. */ /* Closely matches PROP_SMOOTH and similar. */ - switch(mode) { + switch(falloff_type) { case MOD_WVG_MAPPING_CURVE: fac = curvemapping_evaluateF(cmap, 0, fac); break; diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index 7a7f69c4751..0b6b69b2b3c 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -62,7 +62,7 @@ static void initData(ModifierData *md) { WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; wmd->edit_flags = 0; - wmd->mapping_mode = MOD_WVG_MAPPING_NONE; + wmd->falloff_type = MOD_WVG_MAPPING_NONE; wmd->default_weight = 0.0f; wmd->cmap_curve = curvemapping_add(1, 0.0, 0.0, 1.0, 1.0); @@ -90,7 +90,7 @@ static void copyData(ModifierData *md, ModifierData *target) BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name)); twmd->edit_flags = wmd->edit_flags; - twmd->mapping_mode = wmd->mapping_mode; + twmd->falloff_type = wmd->falloff_type; twmd->default_weight = wmd->default_weight; twmd->cmap_curve = curvemapping_copy(wmd->cmap_curve); @@ -268,8 +268,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der } /* Do mapping. */ - if (wmd->mapping_mode != MOD_WVG_MAPPING_NONE) { - weightvg_do_map(numVerts, new_w, wmd->mapping_mode, wmd->cmap_curve); + if (wmd->falloff_type != MOD_WVG_MAPPING_NONE) { + weightvg_do_map(numVerts, new_w, wmd->falloff_type, wmd->cmap_curve); } /* Do masking. */ @@ -298,7 +298,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, ModifierTypeInfo modifierType_WeightVGEdit = { - /* name */ "WeightVGEdit", + /* name */ "VertexWeightEdit", /* structName */ "WeightVGEditModifierData", /* structSize */ sizeof(WeightVGEditModifierData), /* type */ eModifierTypeType_Nonconstructive, diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 97857644c35..8bfc56fc18f 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -438,7 +438,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, ModifierTypeInfo modifierType_WeightVGMix = { - /* name */ "WeightVGMix", + /* name */ "VertexWeightMix", /* structName */ "WeightVGMixModifierData", /* structSize */ sizeof(WeightVGMixModifierData), /* type */ eModifierTypeType_Nonconstructive, diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 55f0102bef3..ffb783f8adc 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -220,7 +220,7 @@ static void initData(ModifierData *md) wmd->proximity_mode = MOD_WVG_PROXIMITY_OBJECT; wmd->proximity_flags = MOD_WVG_PROXIMITY_GEOM_VERTS; - wmd->mapping_mode = MOD_WVG_MAPPING_NONE; + wmd->falloff_type = MOD_WVG_MAPPING_NONE; wmd->mask_constant = 1.0f; wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */ @@ -238,7 +238,7 @@ static void copyData(ModifierData *md, ModifierData *target) twmd->proximity_flags = wmd->proximity_flags; twmd->proximity_ob_target = wmd->proximity_ob_target; - twmd->mapping_mode = wmd->mapping_mode; + twmd->falloff_type = wmd->falloff_type; twmd->mask_constant = wmd->mask_constant; BLI_strncpy(twmd->mask_defgrp_name, wmd->mask_defgrp_name, sizeof(twmd->mask_defgrp_name)); @@ -498,7 +498,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name); /* Map distances to weights. */ - do_map(org_w, numIdx, wmd->min_dist, wmd->max_dist, wmd->mapping_mode); + do_map(org_w, numIdx, wmd->min_dist, wmd->max_dist, wmd->falloff_type); /* Update vgroup. Note we never add nor remove vertices from vgroup here. */ weightvg_update_vg(dvert, defgrp_idx, numIdx, indices, org_w, 0, 0.0f, 0, 0.0f); @@ -522,7 +522,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, ModifierTypeInfo modifierType_WeightVGProximity = { - /* name */ "WeightVGProximity", + /* name */ "VertexWeightProximity", /* structName */ "WeightVGProximityModifierData", /* structSize */ sizeof(WeightVGProximityModifierData), /* type */ eModifierTypeType_Nonconstructive, -- cgit v1.2.3