diff --git a/SConstruct b/SConstruct index eeb39e9e612..72acbf845d7 100644 --- a/SConstruct +++ b/SConstruct @@ -29,6 +29,13 @@ # Set up some custom actions and target/argument handling # Then read all SConscripts and build +import platform as pltfrm + +if pltfrm.architecture()[0] == '64bit': + bitness = 64 +else: + bitness = 32 + import sys import os import os.path @@ -132,14 +139,17 @@ if cxx: env['CXX'] = cxx if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32': - platform = 'win32-vc' + if bitness == 64: + platform = 'win64-vc' + else: + platform = 'win32-vc' elif env['CC'] in ['gcc'] and sys.platform=='win32': platform = 'win32-mingw' env.SConscriptChdir(0) crossbuild = B.arguments.get('BF_CROSS', None) -if crossbuild and platform!='win32': +if crossbuild and platform not in ('win32-vc', 'win64-vc'): platform = 'linuxcross' env['OURPLATFORM'] = platform @@ -183,7 +193,7 @@ if env['BF_NO_ELBEEM'] == 1: env['CCFLAGS'].append('-DDISABLE_ELBEEM') if env['WITH_BF_OPENMP'] == 1: - if env['OURPLATFORM']=='win32-vc': + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): env['CCFLAGS'].append('/openmp') env['CPPFLAGS'].append('/openmp') env['CXXFLAGS'].append('/openmp') @@ -283,7 +293,7 @@ if 'blenderlite' in B.targets: env['BF_NO_ELBEEM'] = True env['WITH_BF_PYTHON'] = False -if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming'): +if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'): env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup') env['PLATFORM_LINKFLAGS'].append('/ENTRY:main') @@ -390,6 +400,7 @@ thestatlibs, thelibincs = B.setup_staticlibs(env) thesyslibs = B.setup_syslibs(env) if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']: + #env.BlenderProg(B.root_build_dir, "blender", dobj , [], mainlist + thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') if env['WITH_BF_PLAYER']: playerlist = B.create_blender_liblist(env, 'player') @@ -471,7 +482,6 @@ if env['OURPLATFORM']=='linux2': if '.svn' in tn: tn.remove('.svn') for f in tf: - print ">>>", env['BF_INSTALLDIR'], tp, f iconlist.append(tp+os.sep+f) icontargetlist.append(env['BF_INSTALLDIR']+tp[19:]+os.sep+f) @@ -496,7 +506,6 @@ for tp, tn, tf in os.walk('release/plugins'): if '.svn' in tn: tn.remove('.svn') for f in tf: - print ">>>", env['BF_INSTALLDIR'], tp, f pluglist.append(tp+os.sep+f) plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f) @@ -540,14 +549,20 @@ elif env['OURPLATFORM']=='linux2': else: allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall] -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): - dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll', - '${BF_PNG_LIBPATH}/libpng.dll', - '${BF_ZLIB_LIBPATH}/zlib.dll', - '${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll'] +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'): + if env['OURPLATFORM'] == 'win64-vc': + dllsources = [] + else: + dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll', + '${BF_PNG_LIBPATH}/libpng.dll', + '${BF_ZLIB_LIBPATH}/zlib.dll', + '${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll'] dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll'] if env['WITH_BF_SDL']: - dllsources.append('${BF_SDL_LIBPATH}/SDL.dll') + if env['OURPLATFORM'] == 'win64-vc': + pass # we link statically already to SDL on win64 + else: + dllsources.append('${BF_SDL_LIBPATH}/SDL.dll') if env['WITH_BF_PYTHON']: dllsources.append('#release/windows/extra/python25.zip') dllsources.append('#release/windows/extra/zlib.pyd') @@ -556,7 +571,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): else: dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}.dll') if env['WITH_BF_ICONV']: - dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll'] + if env['OURPLATFORM'] == 'win64-vc': + pass # we link statically to iconv on win64 + else: + dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll'] if env['WITH_BF_FFMPEG']: dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll', '${LCGDIR}/ffmpeg/lib/avformat-52.dll', @@ -601,12 +619,6 @@ Default(B.program_list) if not env['WITHOUT_BF_INSTALL']: Default(installtarget) -#------------ RELEASE -# TODO: zipup the installation - -#------------ BLENDERPLAYER -# TODO: build stubs and link into blenderplayer - #------------ EPYDOC if env['WITH_BF_DOCS']: SConscript('source/blender/python/api2_2x/doc/SConscript') diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript index a2b17598727..5811e97319d 100644 --- a/extern/bullet2/src/SConscript +++ b/extern/bullet2/src/SConscript @@ -7,7 +7,7 @@ Import('env') defs = 'USE_DOUBLES QHULL _LIB' cflags = [] -if env['OURPLATFORM']=='win32-vc': +if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): defs += ' WIN32 NDEBUG _WINDOWS _LIB' #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op'] cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6'] diff --git a/extern/solid/SConscript b/extern/solid/SConscript index c50815b590b..8c54442ca73 100644 --- a/extern/solid/SConscript +++ b/extern/solid/SConscript @@ -6,7 +6,7 @@ Import('env') defs = 'USE_DOUBLES QHULL _LIB' cflags = [] -if env['OURPLATFORM']=='win32-vc': +if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): defs += ' WIN32 NDEBUG _WINDOWS _LIB' cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6'] elif env['OURPLATFORM']=='win32-mingw': diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index b683740247a..2441251dc33 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -104,7 +104,9 @@ typedef enum { GHOST_kWindowState8Normal = 8, GHOST_kWindowState8Maximized, GHOST_kWindowState8Minimized, - GHOST_kWindowState8FullScreen + GHOST_kWindowState8FullScreen, + GHOST_kWindowStateModified, + GHOST_kWindowStateUnModified } GHOST_TWindowState; diff --git a/intern/ghost/Makefile b/intern/ghost/Makefile index f809a32ac8f..c5a9c522655 100644 --- a/intern/ghost/Makefile +++ b/intern/ghost/Makefile @@ -38,7 +38,7 @@ TESTDIRS = test include nan_subdirs.mk -install: all debug +install: all @[ -d $(NAN_GHOST) ] || mkdir $(NAN_GHOST) @[ -d $(NAN_GHOST)/include ] || mkdir $(NAN_GHOST)/include @[ -d $(NAN_GHOST)/lib ] || mkdir $(NAN_GHOST)/lib diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript index dc442b3bb54..9de82ac44fb 100644 --- a/intern/ghost/SConscript +++ b/intern/ghost/SConscript @@ -14,7 +14,7 @@ if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6', 'irix6'): for f in pf: sources.remove('intern' + os.sep + f + 'Win32.cpp') sources.remove('intern' + os.sep + f + 'Carbon.cpp') -elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross'): +elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'): for f in pf: sources.remove('intern' + os.sep + f + 'X11.cpp') sources.remove('intern' + os.sep + f + 'Carbon.cpp') @@ -27,6 +27,6 @@ else: Exit() incs = '. ../string ' + env['BF_OPENGL_INC'] -if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross'): +if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'): incs = env['BF_WINTAB_INC'] + ' ' + incs env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern'], priority = [40] ) diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index 5de00d9ab3e..203b3847019 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -438,6 +438,8 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent) bool anyProcessed = false; EventRef event; +// SetMouseCoalescingEnabled(false, NULL); + do { GHOST_TimerManager* timerMgr = getTimerManager(); @@ -469,7 +471,6 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent) } } - /* end loop when no more events available */ while (::ReceiveNextEvent(0, NULL, 0, true, &event)==noErr) { OSStatus status= ::SendEventToEventTarget(event, ::GetEventDispatcherTarget()); diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp index ba094501fe5..87bb86a37e7 100644 --- a/intern/ghost/intern/GHOST_WindowCarbon.cpp +++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp @@ -378,6 +378,12 @@ GHOST_TSuccess GHOST_WindowCarbon::setState(GHOST_TWindowState state) case GHOST_kWindowStateMinimized: ::HideWindow(m_windowRef); break; + case GHOST_kWindowStateModified: + SetWindowModified(m_windowRef, 1); + break; + case GHOST_kWindowStateUnModified: + SetWindowModified(m_windowRef, 0); + break; case GHOST_kWindowStateMaximized: case GHOST_kWindowStateNormal: default: diff --git a/release/datafiles/blenderbuttons b/release/datafiles/blenderbuttons index 4d70dd9b095..664c82ab2c0 100644 Binary files a/release/datafiles/blenderbuttons and b/release/datafiles/blenderbuttons differ diff --git a/source/Makefile b/source/Makefile index d9dd29143b5..90e93d55f6e 100644 --- a/source/Makefile +++ b/source/Makefile @@ -242,7 +242,7 @@ PULIB += $(OCGDIR)/blender/ed_object/libed_object.a PULIB += $(OCGDIR)/blender/ed_curve/libed_curve.a PULIB += $(OCGDIR)/blender/ed_armature/libed_armature.a PULIB += $(OCGDIR)/blender/ed_mesh/libed_mesh.a -PULIB += $(OCGDIR)/blender/ed_sculpt/libed_sculpt.a +PULIB += $(OCGDIR)/blender/ed_sculpt_paint/libed_sculpt_paint.a PULIB += $(OCGDIR)/blender/ed_physics/libed_physics.a PULIB += $(OCGDIR)/blender/ed_animation/libed_animation.a PULIB += $(OCGDIR)/blender/ed_transform/libed_transform.a diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index d91fbbf0fa9..1485f0881b2 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -29,6 +29,27 @@ #ifndef BLF_API_H #define BLF_API_H +int BLF_init(void); +void BLF_exit(void); + +int BLF_load(char *name); +int BLF_load_mem(char *name, unsigned char *mem, int mem_size); + +void BLF_set(int fontid); +void BLF_aspect(float aspect); +void BLF_position(float x, float y, float z); +void BLF_size(int size, int dpi); +void BLF_draw(char *str); + +void BLF_boundbox(char *str, rctf *box); +float BLF_width(char *str); +float BLF_height(char *str); +void BLF_rotation(float angle); +void BLF_clipping(float xmin, float ymin, float xmax, float ymax); + +void BLF_enable(int option); +void BLF_disable(int option); + /* Read the .Blanguages file, return 1 on success or 0 if fails. */ int BLF_lang_init(void); @@ -49,8 +70,6 @@ int BLF_lang_error(void); /* Return the code string for the specified language code. */ char *BLF_lang_find_code(short langid); -#if 0 - /* Add a path to the font dir paths. */ void BLF_dir_add(const char *path); @@ -63,6 +82,9 @@ char **BLF_dir_get(int *ndir); /* Free the data return by BLF_dir_get. */ void BLF_dir_free(char **dirs, int count); -#endif /* zero!! */ +/* font->flags. */ +#define BLF_ASPECT (1<<0) +#define BLF_ROTATION (1<<1) +#define BLF_CLIPPING (1<<2) #endif /* BLF_API_H */ diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt index cd91bf69c91..4c21138f552 100644 --- a/source/blender/blenfont/CMakeLists.txt +++ b/source/blender/blenfont/CMakeLists.txt @@ -24,15 +24,23 @@ FILE(GLOB SRC intern/*.c) -#SET(INC . intern ../../../intern/guardedalloc ../blenlib ../blenkernel ../makedna - SET(INC - ../../../intern/guardedalloc ../blenlib ../makesdna - ../blenkernel ../ftfont + ../../../intern/guardedalloc ../blenlib ../makesdna ../editors/include + ../blenkernel ../ftfont ../../../extern/glew/include . + ${FTGL_INC} + ${FREETYPE_INC} + ${GETTEXT_INC} ) +ADD_DEFINITIONS(-DFTGL_LIBRARY_STATIC) + IF(WITH_INTERNATIONAL) ADD_DEFINITIONS(-DWITH_FREETYPE2) ENDIF(WITH_INTERNATIONAL) -BLENDERLIB(bf_blenfont "${SRC}" "${INC}") \ No newline at end of file +IF(WIN32) + ADD_DEFINITIONS(-D_WIN32 -DUSE_GETTEXT_DLL) +ENDIF(WIN32) + +BLENDERLIB(bf_blenfont "${SRC}" "${INC}") + diff --git a/source/blender/blenfont/SConscript b/source/blender/blenfont/SConscript index 009b96f90b1..42ccfc8e2ed 100644 --- a/source/blender/blenfont/SConscript +++ b/source/blender/blenfont/SConscript @@ -4,11 +4,19 @@ Import ('env') sources = env.Glob('intern/*.c') -incs = '. intern #/intern/guardedalloc ../blenkernel ../blenlib ../makesdna ../ftfont' +incs = '. intern #/intern/guardedalloc ../blenkernel ../blenlib ../makesdna ../ftfont ../editors/include' +incs += ' #/extern/glew/include' +incs += ' ' + env['BF_FTGL_INC'] +incs += ' ' + env['BF_FREETYPE_INC'] +incs += ' ' + env['BF_GETTEXT_INC'] defs = '' if env['WITH_BF_INTERNATIONAL']: defs += ' WITH_FREETYPE2' +defs = 'FTGL_STATIC_LIBRARY' +if sys.platform == 'win32': + defs += ' _WIN32 USE_GETTEXT_DLL' + env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs), libtype=['core'], priority=[210] ) diff --git a/source/blender/blenfont/intern/Makefile b/source/blender/blenfont/intern/Makefile index 94e80466782..18bf42f3fa5 100644 --- a/source/blender/blenfont/intern/Makefile +++ b/source/blender/blenfont/intern/Makefile @@ -33,10 +33,46 @@ include nan_compile.mk CFLAGS += $(LEVEL_1_C_WARNINGS) -CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include +# OpenGL and Freetype2 +CPPFLAGS += -I$(NAN_GLEW)/include +CPPFLAGS += $(OGL_CPPFLAGS) +CPPFLAGS += -I$(NAN_FREETYPE)/include + +ifeq ($(OS), windows) + CPPFLAGS += -I$(NAN_ICONV)/include + ifeq ($(FREE_WINDOWS), true) + CPPFLAGS += -I$(NAN_FREETYPE)/include/freetype2 + CPPFLAGS += -DUSE_GETTEXT_DLL + endif +else + CPPFLAGS += -I$(NAN_FREETYPE)/include/freetype2 +endif + +ifeq ($(OS),linux) + ifeq ($(CPU),alpha) + CPPFLAGS += -I$(NAN_MESA)/include + endif + ifeq ($(CPU),i386) + CPPFLAGS += -I$(NAN_MESA)/include + endif + ifeq ($(CPU),powerpc) + CPPFLAGS += -I/usr/src/MesaCVS/include + endif +endif + +ifeq ($(WITH_FREETYPE2), true) + CPPFLAGS += -DWITH_FREETYPE2 +endif + +# Modules +CPPFLAGS += -I../../editors/include CPPFLAGS += -I../../makesdna CPPFLAGS += -I../../blenlib CPPFLAGS += -I../../blenkernel CPPFLAGS += -I../../ftfont +# Memory allocator +CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include + +# Our own headers CPPFLAGS += -I.. diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index b503ea06404..5b39c2c8ae5 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -26,20 +26,24 @@ * ***** END GPL LICENSE BLOCK ***** */ -#if 0 - #include #include #include +#include + +#ifdef WITH_FREETYPE2 #include #include FT_FREETYPE_H #include FT_GLYPH_H +#endif /* WITH_FREETYPE2 */ + #include "MEM_guardedalloc.h" #include "DNA_listBase.h" +#include "DNA_vec_types.h" #include "BKE_utildefines.h" @@ -47,9 +51,14 @@ #include "BLI_linklist.h" /* linknode */ #include "BLI_string.h" +#include "BIF_gl.h" +#include "BIF_glutil.h" +#include "BLF_api.h" + #include "blf_internal_types.h" #include "blf_internal.h" +#ifdef WITH_FREETYPE2 /* Max number of font in memory. * Take care that now every font have a glyph cache per size/dpi, @@ -67,31 +76,56 @@ int global_font_num= 0; /* Current font. */ int global_font_cur= 0; +#endif /* WITH_FREETYPE2 */ + int BLF_init(void) { +#ifdef WITH_FREETYPE2 int i; for (i= 0; i < BLF_MAX_FONT; i++) global_font[i]= NULL; return(blf_font_init()); +#else + return(0); +#endif } -int blf_search(char *name) +void BLF_exit(void) { +#ifdef WITH_FREETYPE2 FontBLF *font; int i; for (i= 0; i < global_font_num; i++) { + font= global_font[i]; + if(font) + blf_font_free(font); + } + + blf_font_exit(); +#endif +} + +int blf_search(char *name) +{ +#ifdef WITH_FREETYPE2 + FontBLF *font; + int i; + + for (i= 0; i < BLF_MAX_FONT; i++) { font= global_font[i]; if (font && (!strcmp(font->name, name))) return(i); } +#endif return(-1); } int BLF_load(char *name) { +#ifdef WITH_FREETYPE2 FontBLF *font; char *filename; int i; @@ -101,30 +135,44 @@ int BLF_load(char *name) /* check if we already load this font. */ i= blf_search(name); - if (i >= 0) + if (i >= 0) { + font= global_font[i]; + font->ref++; + printf("Increment reference (%d): %s\n", font->ref, name); return(i); + } - if (global_font_num+1 >= BLF_MAX_FONT) + if (global_font_num+1 >= BLF_MAX_FONT) { + printf("Too many fonts!!!\n"); return(-1); + } filename= blf_dir_search(name); - if (!filename) + if (!filename) { + printf("Can't found font: %s\n", name); return(-1); + } font= blf_font_new(name, filename); MEM_freeN(filename); - if (!font) + if (!font) { + printf("Can't load font: %s\n", name); return(-1); + } global_font[global_font_num]= font; i= global_font_num; global_font_num++; return(i); +#else + return(-1); +#endif /* WITH_FREETYPE2 */ } int BLF_load_mem(char *name, unsigned char *mem, int mem_size) { +#ifdef WITH_FREETYPE2 FontBLF *font; int i; @@ -132,64 +180,128 @@ int BLF_load_mem(char *name, unsigned char *mem, int mem_size) return(-1); i= blf_search(name); - if (i >= 0) + if (i >= 0) { + font= global_font[i]; + font->ref++; + printf("Increment reference (%d): %s\n", font->ref, name); return(i); + } - if (global_font_num+1 >= BLF_MAX_FONT) + if (global_font_num+1 >= BLF_MAX_FONT) { + printf("Too many fonts!!!\n"); return(-1); + } - font= blf_font_new_from_mem(name, mem, size); - if (!font) + font= blf_font_new_from_mem(name, mem, mem_size); + if (!font) { + printf("Can't load font, %s from memory!!\n", name); return(-1); + } global_font[global_font_num]= font; i= global_font_num; global_font_num++; return(i); +#else + return(-1); +#endif /* WITH_FREETYPE2 */ } void BLF_set(int fontid) { - if (fontid >= 0 && fontid < global_font_num) +#ifdef WITH_FREETYPE2 + if (fontid >= 0 && fontid < BLF_MAX_FONT) global_font_cur= fontid; +#endif +} + +void BLF_enable(int option) +{ +#ifdef WITH_FREETYPE2 + FontBLF *font; + + font= global_font[global_font_cur]; + if (font) + font->flags |= option; +#endif +} + +void BLF_disable(int option) +{ +#ifdef WITH_FREETYPE2 + FontBLF *font; + + font= global_font[global_font_cur]; + if (font) + font->flags &= ~option; +#endif } void BLF_aspect(float aspect) { +#ifdef WITH_FREETYPE2 FontBLF *font; font= global_font[global_font_cur]; if (font) font->aspect= aspect; +#endif } void BLF_position(float x, float y, float z) { +#ifdef WITH_FREETYPE2 FontBLF *font; + float remainder, aspect; font= global_font[global_font_cur]; if (font) { + if (font->flags & BLF_ASPECT) + aspect= font->aspect; + else + aspect= 1.0f; + + remainder= x - floor(x); + if (remainder > 0.4 && remainder < 0.6) { + if (remainder < 0.5) + x -= 0.1 * aspect; + else + x += 0.1 * aspect; + } + + remainder= y - floor(y); + if (remainder > 0.4 && remainder < 0.6) { + if (remainder < 0.5) + y -= 0.1 * aspect; + else + y += 0.1 * aspect; + } + font->pos[0]= x; font->pos[1]= y; font->pos[2]= z; } +#endif } void BLF_size(int size, int dpi) { +#ifdef WITH_FREETYPE2 FontBLF *font; font= global_font[global_font_cur]; if (font) blf_font_size(font, size, dpi); +#endif } void BLF_draw(char *str) { +#ifdef WITH_FREETYPE2 FontBLF *font; font= global_font[global_font_cur]; - if (font) { + if (font && font->glyph_cache) { glEnable(GL_BLEND); glEnable(GL_TEXTURE_2D); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -197,12 +309,78 @@ void BLF_draw(char *str) glPushMatrix(); glTranslatef(font->pos[0], font->pos[1], font->pos[2]); + if (font->flags & BLF_ASPECT) + glScalef(font->aspect, font->aspect, 1.0); + + if (font->flags & BLF_ROTATION) + glRotatef(font->angle, 0.0f, 0.0f, 1.0f); + blf_font_draw(font, str); glPopMatrix(); - glDisable(GL_TEXTURE_2D); glDisable(GL_BLEND); + glDisable(GL_TEXTURE_2D); } +#endif /* WITH_FREETYPE2 */ } +void BLF_boundbox(char *str, rctf *box) +{ +#ifdef WITH_FREETYPE2 + FontBLF *font; + + font= global_font[global_font_cur]; + if (font && font->glyph_cache) + blf_font_boundbox(font, str, box); #endif +} + +float BLF_width(char *str) +{ +#ifdef WITH_FREETYPE2 + FontBLF *font; + + font= global_font[global_font_cur]; + if (font && font->glyph_cache) + return(blf_font_width(font, str)); +#endif + return(0.0f); +} + +float BLF_height(char *str) +{ +#ifdef WITH_FREETYPE2 + FontBLF *font; + + font= global_font[global_font_cur]; + if (font && font->glyph_cache) + return(blf_font_height(font, str)); +#endif + return(0.0f); +} + +void BLF_rotation(float angle) +{ +#ifdef WITH_FREETYPE2 + FontBLF *font; + + font= global_font[global_font_cur]; + if (font) + font->angle= angle; +#endif +} + +void BLF_clipping(float xmin, float ymin, float xmax, float ymax) +{ +#ifdef WITH_FREETYPE2 + FontBLF *font; + + font= global_font[global_font_cur]; + if (font) { + font->clip_rec.xmin= xmin; + font->clip_rec.ymin= ymin; + font->clip_rec.xmax= xmax; + font->clip_rec.ymax= ymax; + } +#endif +} diff --git a/source/blender/blenfont/intern/blf_dir.c b/source/blender/blenfont/intern/blf_dir.c index dea422a1765..1216c610515 100644 --- a/source/blender/blenfont/intern/blf_dir.c +++ b/source/blender/blenfont/intern/blf_dir.c @@ -29,9 +29,19 @@ #include #include +#ifdef WITH_FREETYPE2 + +#include + +#include FT_FREETYPE_H +#include FT_GLYPH_H + +#endif /* WITH_FREETYPE2 */ + #include "MEM_guardedalloc.h" #include "DNA_listBase.h" +#include "DNA_vec_types.h" #include "BKE_utildefines.h" @@ -39,6 +49,8 @@ #include "BLI_linklist.h" /* linknode */ #include "BLI_string.h" +#include "BIF_gl.h" + #include "blf_internal_types.h" static ListBase global_font_dir= { NULL, NULL }; diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 28b33640692..44847e72727 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -26,31 +26,40 @@ * ***** END GPL LICENSE BLOCK ***** */ -#if 0 - #include #include #include +#ifdef WITH_FREETYPE2 + #include #include FT_FREETYPE_H #include FT_GLYPH_H +#endif /* WITH_FREETYPE2 */ + #include "MEM_guardedalloc.h" #include "DNA_listBase.h" +#include "DNA_vec_types.h" #include "BKE_utildefines.h" #include "BLI_blenlib.h" #include "BLI_linklist.h" /* linknode */ #include "BLI_string.h" +#include "BLI_arithb.h" + +#include "BIF_gl.h" +#include "BLF_api.h" #include "blf_internal_types.h" #include "blf_internal.h" +#ifdef WITH_FREETYPE2 + /* freetype2 handle. */ FT_Library global_ft_lib; @@ -61,7 +70,7 @@ int blf_font_init(void) void blf_font_exit(void) { - FT_Done_Freetype(global_ft_lib); + FT_Done_FreeType(global_ft_lib); } void blf_font_fill(FontBLF *font) @@ -70,15 +79,13 @@ void blf_font_fill(FontBLF *font) font->aspect= 1.0f; font->pos[0]= 0.0f; font->pos[1]= 0.0f; - font->angle[0]= 0.0f; - font->angle[1]= 0.0f; - font->angle[2]= 0.0f; + font->angle= 0.0f; Mat4One(font->mat); font->clip_rec.xmin= 0.0f; font->clip_rec.xmax= 0.0f; font->clip_rec.ymin= 0.0f; font->clip_rec.ymax= 0.0f; - font->clip_mode= BLF_CLIP_DISABLE; + font->flags= 0; font->dpi= 0; font->size= 0; font->cache.first= NULL; @@ -95,21 +102,20 @@ FontBLF *blf_font_new(char *name, char *filename) font= (FontBLF *)MEM_mallocN(sizeof(FontBLF), "blf_font_new"); err= FT_New_Face(global_ft_lib, filename, 0, &font->face); if (err) { - printf("BLF: Can't load font: %s\n", filename); MEM_freeN(font); return(NULL); } err= FT_Select_Charmap(font->face, ft_encoding_unicode); if (err) { - printf("Warning: FT_Select_Charmap fail!!\n"); + printf("Can't set the unicode character map!\n"); FT_Done_Face(font->face); MEM_freeN(font); return(NULL); } - font->name= MEM_strdup(name); - font->filename= MEM_strdup(filename); + font->name= BLI_strdup(name); + font->filename= BLI_strdup(filename); blf_font_fill(font); return(font); } @@ -120,22 +126,21 @@ FontBLF *blf_font_new_from_mem(char *name, unsigned char *mem, int mem_size) FT_Error err; font= (FontBLF *)MEM_mallocN(sizeof(FontBLF), "blf_font_new_from_mem"); - err= FT_New_Memory_Face(global_ft_lib, mem, size, 0, &font->face); + err= FT_New_Memory_Face(global_ft_lib, mem, mem_size, 0, &font->face); if (err) { - printf("BLF: Can't load font: %s, from memory!!\n", name); MEM_freeN(font); return(NULL); } err= FT_Select_Charmap(font->face, ft_encoding_unicode); if (err) { - printf("BLF: FT_Select_Charmap fail!!\n"); + printf("Can't set the unicode character map!\n"); FT_Done_Face(font->face); MEM_freeN(font); return(NULL); } - font->name= MEM_strdup(name); + font->name= BLI_strdup(name); font->filename= NULL; blf_font_fill(font); return(font); @@ -149,7 +154,7 @@ void blf_font_size(FontBLF *font, int size, int dpi) err= FT_Set_Char_Size(font->face, 0, (size * 64), dpi, dpi); if (err) { /* FIXME: here we can go through the fixed size and choice a close one */ - printf("Warning: The current face don't support the size (%d) and dpi (%d)\n", size, dpi); + printf("The current font don't support the size, %d and dpi, %d\n", size, dpi); return; } @@ -163,6 +168,8 @@ void blf_font_size(FontBLF *font, int size, int dpi) gc= blf_glyph_cache_new(font); if (gc) font->glyph_cache= gc; + else + font->glyph_cache= NULL; } } @@ -182,11 +189,11 @@ void blf_font_draw(FontBLF *font, char *str) g_prev= NULL; while (str[i]) { - c= blf_uf8_next((unsigned char *)str, &i); + c= blf_utf8_next((unsigned char *)str, &i); if (c == 0) break; - glyph_index= FT_Get_Char_Index(face, c); + glyph_index= FT_Get_Char_Index(font->face, c); g= blf_glyph_search(font->glyph_cache, glyph_index); if (!g) g= blf_glyph_add(font, glyph_index, c); @@ -195,18 +202,138 @@ void blf_font_draw(FontBLF *font, char *str) if (!g) continue; - if (use_kering && g_prev) { + if (has_kerning && g_prev) { delta.x= 0; delta.y= 0; - FT_Get_Kerning(font->face, g_prev->index, glyph_index, FT_KERNING_MODE_UNFITTED, &delta); + FT_Get_Kerning(font->face, g_prev->index, glyph_index, FT_KERNING_UNFITTED, &delta); pen_x += delta.x >> 6; } - blf_glyph_render(g, (float)pen_x, (float)pen_y); + /* This only return zero if the clipping is enable and the glyph is out of the clip rctf. */ + if (blf_glyph_render(font, g, (float)pen_x, (float)pen_y) == 0) + break; + pen_x += g->advance; g_prev= g; } } -#endif /* zero!! */ +void blf_font_boundbox(FontBLF *font, char *str, rctf *box) +{ + unsigned int c; + GlyphBLF *g, *g_prev; + FT_Vector delta; + FT_UInt glyph_index; + rctf gbox; + int pen_x, pen_y; + int i, has_kerning; + + box->xmin= 32000.0f; + box->xmax= -32000.0f; + box->ymin= 32000.0f; + box->ymax= -32000.0f; + + i= 0; + pen_x= 0; + pen_y= 0; + has_kerning= FT_HAS_KERNING(font->face); + g_prev= NULL; + + while (str[i]) { + c= blf_utf8_next((unsigned char *)str, &i); + if (c == 0) + break; + + glyph_index= FT_Get_Char_Index(font->face, c); + g= blf_glyph_search(font->glyph_cache, glyph_index); + if (!g) + g= blf_glyph_add(font, glyph_index, c); + + /* if we don't found a glyph, skip it. */ + if (!g) + continue; + + if (has_kerning && g_prev) { + delta.x= 0; + delta.y= 0; + + FT_Get_Kerning(font->face, g_prev->index, glyph_index, FT_KERNING_UNFITTED, &delta); + pen_x += delta.x >> 6; + } + + gbox.xmin= g->box.xmin + pen_x; + gbox.xmax= g->box.xmax + pen_x; + gbox.ymin= g->box.ymin + pen_y; + gbox.ymax= g->box.ymax + pen_y; + + if (gbox.xmin < box->xmin) + box->xmin= gbox.xmin; + if (gbox.ymin < box->ymin) + box->ymin= gbox.ymin; + + if (gbox.xmax > box->xmax) + box->xmax= gbox.xmax; + if (gbox.ymax > box->ymax) + box->ymax= gbox.ymax; + + pen_x += g->advance; + g_prev= g; + } + + if (box->xmin > box->xmax) { + box->xmin= 0.0f; + box->ymin= 0.0f; + box->xmax= 0.0f; + box->ymax= 0.0f; + } +} + +float blf_font_width(FontBLF *font, char *str) +{ + float aspect; + rctf box; + + if (font->flags & BLF_ASPECT) + aspect= font->aspect; + else + aspect= 1.0f; + + blf_font_boundbox(font, str, &box); + return((box.xmax - box.xmin) * aspect); +} + +float blf_font_height(FontBLF *font, char *str) +{ + float aspect; + rctf box; + + if (font->flags & BLF_ASPECT) + aspect= font->aspect; + else + aspect= 1.0f; + + blf_font_boundbox(font, str, &box); + return((box.ymax - box.ymin) * aspect); +} + +void blf_font_free(FontBLF *font) +{ + GlyphCacheBLF *gc; + + font->glyph_cache= NULL; + while (font->cache.first) { + gc= font->cache.first; + BLI_remlink(&font->cache, gc); + blf_glyph_cache_free(gc); + } + + FT_Done_Face(font->face); + if (font->filename) + MEM_freeN(font->filename); + if (font->name) + MEM_freeN(font->name); + MEM_freeN(font); +} + +#endif /* WITH_FREETYPE2 */ diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index ca8751a8746..2bbdeb9ad32 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -26,20 +26,25 @@ * ***** END GPL LICENSE BLOCK ***** */ -#if 0 - #include #include #include +#include + +#ifdef WITH_FREETYPE2 #include #include FT_FREETYPE_H #include FT_GLYPH_H +#include FT_OUTLINE_H + +#endif /* WITH_FREETYPE2 */ #include "MEM_guardedalloc.h" #include "DNA_listBase.h" +#include "DNA_vec_types.h" #include "BKE_utildefines.h" @@ -47,10 +52,15 @@ #include "BLI_linklist.h" /* linknode */ #include "BLI_string.h" +#include "BIF_gl.h" +#include "BLF_api.h" + #include "blf_internal_types.h" #include "blf_internal.h" +#ifdef WITH_FREETYPE2 + GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, int size, int dpi) { GlyphCacheBLF *p; @@ -70,7 +80,7 @@ GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font) GlyphCacheBLF *gc; int i; - gc= (GlyphCacheBLF *)MEM_mallocN(sizeof(GlyphCacheBLF)); + gc= (GlyphCacheBLF *)MEM_mallocN(sizeof(GlyphCacheBLF), "blf_glyph_cache_new"); gc->next= NULL; gc->prev= NULL; gc->size= font->size; @@ -81,30 +91,30 @@ GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font) gc->bucket[i].last= NULL; } - gc->textures= (GLuint *)malloc(sizeof(GLunit)*256); + gc->textures= (GLuint *)malloc(sizeof(GLuint)*256); gc->ntex= 256; gc->cur_tex= -1; gc->x_offs= 0; gc->y_offs= 0; gc->pad= 3; - gc->num_glyphs= font->face.num_glyphs; - gc->rem_glyphs= font->face.num_glyphs; - gc->ascender= ((float)font->size.metrics.ascender) / 64.0f; - gc->descender= ((float)font->size.metrics.descender) / 64.0f; + gc->num_glyphs= font->face->num_glyphs; + gc->rem_glyphs= font->face->num_glyphs; + gc->ascender= ((float)font->face->size->metrics.ascender) / 64.0f; + gc->descender= ((float)font->face->size->metrics.descender) / 64.0f; if (FT_IS_SCALABLE(font->face)) { gc->max_glyph_width= (float)((font->face->bbox.xMax - font->face->bbox.xMin) * - (((float)font->face->size.metrics.x_ppem) / + (((float)font->face->size->metrics.x_ppem) / ((float)font->face->units_per_EM))); gc->max_glyph_height= (float)((font->face->bbox.yMax - font->face->bbox.yMin) * - (((float)font->face->size.metrics.y_ppem) / + (((float)font->face->size->metrics.y_ppem) / ((float)font->face->units_per_EM))); } else { - gc->max_glyph_width= ((float)font->face->metrics.max_advance) / 64.0f; - gc->max_glyph_height= ((float)font->face->size.metrics.height) / 64.0f; + gc->max_glyph_width= ((float)font->face->size->metrics.max_advance) / 64.0f; + gc->max_glyph_height= ((float)font->face->size->metrics.height) / 64.0f; } gc->p2_width= 0; @@ -114,24 +124,42 @@ GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font) return(gc); } +void blf_glyph_cache_free(GlyphCacheBLF *gc) +{ + GlyphBLF *g; + int i; + + for (i= 0; i < 257; i++) { + while (gc->bucket[i].first) { + g= gc->bucket[i].first; + BLI_remlink(&(gc->bucket[i]), g); + blf_glyph_free(g); + } + } + + glDeleteTextures(gc->cur_tex+1, gc->textures); + free((void *)gc->textures); + MEM_freeN(gc); +} + void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc) { - int tot_mem; + int tot_mem, i; unsigned char *buf; /* move the index. */ gc->cur_tex++; - if (gc->cur_tex > gc->ntex) { + if (gc->cur_tex >= gc->ntex) { gc->ntex *= 2; - gc->textures= (GLuint *)realloc((void *)gc->textures, sizeof(GLunit)*gc->ntex); + gc->textures= (GLuint *)realloc((void *)gc->textures, sizeof(GLuint)*gc->ntex); } gc->p2_width= blf_next_p2((gc->rem_glyphs * gc->max_glyph_width) + (gc->pad * 2)); if (gc->p2_width > font->max_tex_size) gc->p2_width= font->max_tex_size; - i= (int)((gc->p2_width - (gc->pad * 2)) / gc->p2_width); + i= (int)((gc->p2_width - (gc->pad * 2)) / gc->max_glyph_width); gc->p2_height= blf_next_p2(((gc->num_glyphs / i) + 1) * gc->max_glyph_height); if (gc->p2_height > font->max_tex_size) @@ -141,7 +169,8 @@ void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc) buf= (unsigned char *)malloc(tot_mem); memset((void *)buf, 0, tot_mem); - glGenTextures(1, (GLuint*)gc->texures[gc->cur_tex]); + glGenTextures(1, &gc->textures[gc->cur_tex]); + glBindTexture(GL_TEXTURE_2D, gc->textures[gc->cur_tex]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -169,11 +198,11 @@ GlyphBLF *blf_glyph_search(GlyphCacheBLF *gc, FT_UInt idx) GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c) { FT_GlyphSlot slot; - GlyphCache *gc; + GlyphCacheBLF *gc; GlyphBLF *g; FT_Error err; FT_Bitmap bitmap; - FTBBox bbox; + FT_BBox bbox; unsigned int key; g= blf_glyph_search(font->glyph_cache, index); @@ -188,7 +217,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c) slot= font->face->glyph; err= FT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL); - if (err) + if (err || slot->format != FT_GLYPH_FORMAT_BITMAP) return(NULL); g= (GlyphBLF *)MEM_mallocN(sizeof(GlyphBLF), "blf_glyph_add"); @@ -216,6 +245,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c) bitmap= slot->bitmap; g->tex= gc->textures[gc->cur_tex]; + g->xoff= gc->x_offs; g->yoff= gc->y_offs; g->width= bitmap.width; @@ -233,8 +263,8 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c) } g->advance= ((float)slot->advance.x) / 64.0f; - g->pos_x= bitmap.left; - g->pos_y= bitmap.top; + g->pos_x= slot->bitmap_left; + g->pos_y= slot->bitmap_top; FT_Outline_Get_CBox(&(slot->outline), &bbox); g->box.xmin= ((float)bbox.xMin) / 64.0f; @@ -242,42 +272,69 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c) g->box.ymin= ((float)bbox.yMin) / 64.0f; g->box.ymax= ((float)bbox.yMax) / 64.0f; - g->uv[0][0]= ((float)g->xoff) / ((float)g->p2_width); - g->uv[0][1]= ((float)g->yoff) / ((float)g->p2_height); - g->uv[1][0]= ((float)(g->xoff + g->width)) / ((float)g->p2_width); - g->uv[1][1]= ((float)(g->yoff + g->height)) / ((float)g->p2_height); + g->uv[0][0]= ((float)g->xoff) / ((float)gc->p2_width); + g->uv[0][1]= ((float)g->yoff) / ((float)gc->p2_height); + g->uv[1][0]= ((float)(g->xoff + g->width)) / ((float)gc->p2_width); + g->uv[1][1]= ((float)(g->yoff + g->height)) / ((float)gc->p2_height); /* update the x offset for the next glyph. */ gc->x_offs += (int)(g->box.xmax - g->box.xmin + gc->pad); key= blf_hash(g->index); - BLI_addhead(&gc->bucket[key], g); + BLI_addhead(&(gc->bucket[key]), g); + gc->rem_glyphs--; return(g); } -void blf_glyph_render(GlyphBLF *g, float x, float y) +void blf_glyph_free(GlyphBLF *g) +{ + /* don't need free the texture, the GlyphCache already + * have a list of all the texture and free it. + */ + MEM_freeN(g); +} + +int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y) { GLint cur_tex; - float dx; + float dx, dx1; + float y1, y2; + + dx= floor(x + g->pos_x); + dx1= dx + g->width; + y1= y + g->pos_y; + y2= y + g->pos_y - g->height; + + if (font->flags & BLF_CLIPPING) { + if (!BLI_in_rctf(&font->clip_rec, dx + font->pos[0], y1 + font->pos[1])) + return(0); + if (!BLI_in_rctf(&font->clip_rec, dx + font->pos[0], y2 + font->pos[1])) + return(0); + if (!BLI_in_rctf(&font->clip_rec, dx1 + font->pos[0], y2 + font->pos[1])) + return(0); + if (!BLI_in_rctf(&font->clip_rec, dx1 + font->pos[0], y1 + font->pos[1])) + return(0); + } glGetIntegerv(GL_TEXTURE_2D_BINDING_EXT, &cur_tex); if (cur_tex != g->tex) - glBindTexture(GL_TEXTURE_2D, &g->tex); + glBindTexture(GL_TEXTURE_2D, g->tex); - dx= floor(x + g->pos_x); glBegin(GL_QUADS); glTexCoord2f(g->uv[0][0], g->uv[0][1]); - glVertex2f(dx, y + g->pos_y); + glVertex2f(dx, y1); glTexCoord2f(g->uv[0][0], g->uv[1][1]); - glVertex2f(dx, y + g->pos_y - g->height); + glVertex2f(dx, y2); glTexCoord2f(g->uv[1][0], g->uv[1][1]); - glVertex2f(dx + g->width, y + g->pos_y - g->height); + glVertex2f(dx1, y2); glTexCoord2f(g->uv[1][0], g->uv[0][1]); - glVertex2f(dx + g->width, y + g->pos_y); + glVertex2f(dx1, y1); glEnd(); + + return(1); } -#endif /* zero!! */ +#endif /* WITH_FREETYPE2 */ diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h index 8af94a8fb99..25df7e0e95f 100644 --- a/source/blender/blenfont/intern/blf_internal.h +++ b/source/blender/blenfont/intern/blf_internal.h @@ -35,4 +35,30 @@ int blf_utf8_next(unsigned char *buf, int *iindex); char *blf_dir_search(const char *file); int blf_dir_split(const char *str, char *file, int *size); +#ifdef WITH_FREETYPE2 + +int blf_font_init(void); +void blf_font_exit(void); + +FontBLF *blf_font_new(char *name, char *filename); +FontBLF *blf_font_new_from_mem(char *name, unsigned char *mem, int mem_size); + +void blf_font_free(FontBLF *font); +void blf_font_size(FontBLF *font, int size, int dpi); +void blf_font_draw(FontBLF *font, char *str); +void blf_font_boundbox(FontBLF *font, char *str, rctf *box); +float blf_font_width(FontBLF *font, char *str); +float blf_font_height(FontBLF *font, char *str); + +GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, int size, int dpi); +GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font); +void blf_glyph_cache_free(GlyphCacheBLF *gc); + +GlyphBLF *blf_glyph_search(GlyphCacheBLF *gc, FT_UInt idx); +GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c); + +void blf_glyph_free(GlyphBLF *g); +int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y); + +#endif /* WITH_FREETYPE2 */ #endif /* BLF_INTERNAL_H */ diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 5aacb2343bb..ccfd5c64200 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -36,11 +36,11 @@ typedef struct DirBLF { char *path; } DirBLF; -#if 0 +#ifdef WITH_FREETYPE2 -typedef struct _GlyphCacheBLF { - struct _GlyphCacheBLF *next; - struct _GlyphCacheBLF *prev; +typedef struct GlyphCacheBLF { + struct GlyphCacheBLF *next; + struct GlyphCacheBLF *prev; /* font size. */ int size; @@ -88,9 +88,9 @@ typedef struct _GlyphCacheBLF { float descender; } GlyphCacheBLF; -typedef struct _GlyphBLF { - struct _GlyphBLF *next; - struct _GlyphBLF *prev; +typedef struct GlyphBLF { + struct GlyphBLF *next; + struct GlyphBLF *prev; /* and the character, as UTF8 */ unsigned int c; @@ -143,7 +143,7 @@ typedef struct FontBLF { float pos[3]; /* angle in degrees. */ - float angle[3]; + float angle; /* this is the matrix that we load before rotate/scale/translate. */ float mat[4][4]; @@ -151,9 +151,6 @@ typedef struct FontBLF { /* clipping rectangle. */ rctf clip_rec; - /* and clipping mode. */ - int clip_mode; - /* font dpi (default 72). */ int dpi; @@ -163,6 +160,9 @@ typedef struct FontBLF { /* max texture size. */ int max_tex_size; + /* font options. */ + int flags; + /* freetype2 face. */ FT_Face face; @@ -173,7 +173,7 @@ typedef struct FontBLF { GlyphCacheBLF *glyph_cache; } FontBLF; -#endif /* zero!! */ +#endif /* WITH_FREETYPE2 */ typedef struct LangBLF { struct LangBLF *next; diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index 0aaf399cf58..730440a5ae5 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -29,9 +29,17 @@ #include #include +#ifdef WITH_FREETYPE2 +#include + +#include FT_FREETYPE_H +#include FT_GLYPH_H +#endif + #include "MEM_guardedalloc.h" #include "DNA_listBase.h" +#include "DNA_vec_types.h" #include "BKE_utildefines.h" @@ -39,6 +47,8 @@ #include "BLI_linklist.h" /* linknode */ #include "BLI_string.h" +#include "BIF_gl.h" + #include "blf_internal_types.h" // XXX 2.50 Remove this later. diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 47eaf68cc83..44c8d827e8c 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -10,6 +10,7 @@ struct ListBase; struct Main; struct AnimData; struct KeyingSet; +struct KS_Path; /* ************************************* */ /* AnimData API */ @@ -33,7 +34,9 @@ struct AnimData *BKE_copy_animdata(struct AnimData *adt); struct KeyingSet *BKE_keyingset_add(struct ListBase *list, const char name[], short flag, short keyingflag); /* Add a destination to a KeyingSet */ -void BKE_keyingset_add_destination(struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, int flag); +void BKE_keyingset_add_destination(struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, short flag, short groupmode); + +struct KS_Path *BKE_keyingset_find_destination(struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, int group_mode); /* Free data for KeyingSet but not set itself */ void BKE_keyingset_free(struct KeyingSet *ks); diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 5af97a7d8d5..a95b436d016 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -91,6 +91,10 @@ enum { CTX_DATA_ACTIVE_BONE, CTX_DATA_ACTIVE_PCHAN, + + CTX_DATA_VISIBLE_BONES, + CTX_DATA_EDITABLE_BONES, + CTX_DATA_VISIBLE_PCHANS, }; typedef int bContextDataMember; @@ -197,9 +201,12 @@ int CTX_data_selected_nodes(const bContext *C, ListBase *list); struct EditBone *CTX_data_active_bone(const bContext *C); int CTX_data_selected_bones(const bContext *C, ListBase *list); int CTX_data_selected_editable_bones(const bContext *C, ListBase *list); +int CTX_data_visible_bones(const bContext *C, ListBase *list); +int CTX_data_editable_bones(const bContext *C, ListBase *list); struct bPoseChannel *CTX_data_active_pchan(const bContext *C); int CTX_data_selected_pchans(const bContext *C, ListBase *list); +int CTX_data_visible_pchans(const bContext *C, ListBase *list); /* Data Evaluation Context */ diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index cb0c60fb1f1..25673aa6782 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -55,7 +55,7 @@ if env['WITH_BF_BULLET']: if env['BF_NO_ELBEEM']: defs += ' DISABLE_ELBEEM' -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'): +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = Split(defs), libtype=['core'], priority = [165] ) diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index cb29685bd15..0097b30b685 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -167,6 +167,56 @@ AnimData *BKE_copy_animdata (AnimData *adt) * from Python/scripts so that riggers can automate the creation of KeyingSets for their rigs. */ +/* Finding Tools --------------------------- */ + +/* Find the first path that matches the given criteria */ +// TODO: do we want some method to perform partial matches too? +KS_Path *BKE_keyingset_find_destination (KeyingSet *ks, ID *id, const char group_name[], const char rna_path[], int array_index, int group_mode) +{ + KS_Path *ksp; + + /* sanity checks */ + if ELEM(NULL, ks, rna_path) + return NULL; + + /* ID is optional for relative KeyingSets, but is necessary for absolute KeyingSets */ + if (id == NULL) { + if (ks->flag & KEYINGSET_ABSOLUTE) + return NULL; + } + + /* loop over paths in the current KeyingSet, finding the first one where all settings match + * (i.e. the first one where none of the checks fail and equal 0) + */ + for (ksp= ks->paths.first; ksp; ksp= ksp->next) { + short eq_id=1, eq_path=1, eq_index=1, eq_group=1; + + /* id */ + if ((ks->flag & KEYINGSET_ABSOLUTE) && (id != ksp->id)) + eq_id= 0; + + /* path */ + if ((ksp->rna_path==0) || strcmp(rna_path, ksp->rna_path)) + eq_path= 0; + + /* index */ + if (ksp->array_index != array_index) + eq_index= 0; + + /* group */ + if (group_name) { + // FIXME: these checks need to be coded... for now, it's not too important though + } + + /* if all aspects are ok, return */ + if (eq_id && eq_path && eq_index && eq_group) + return ksp; + } + + /* none found */ + return NULL; +} + /* Defining Tools --------------------------- */ /* Used to create a new 'custom' KeyingSet for the user, that will be automatically added to the stack */ @@ -195,7 +245,7 @@ KeyingSet *BKE_keyingset_add (ListBase *list, const char name[], short flag, sho /* Add a destination to a KeyingSet. Nothing is returned for now... * Checks are performed to ensure that destination is appropriate for the KeyingSet in question */ -void BKE_keyingset_add_destination (KeyingSet *ks, ID *id, const char group_name[], const char rna_path[], int array_index, int flag) +void BKE_keyingset_add_destination (KeyingSet *ks, ID *id, const char group_name[], const char rna_path[], int array_index, short flag, short groupmode) { KS_Path *ksp; @@ -203,12 +253,16 @@ void BKE_keyingset_add_destination (KeyingSet *ks, ID *id, const char group_name if ELEM(NULL, ks, rna_path) return; - /* ID is optional, and should only be provided for absolute KeyingSets */ - if (id) { - if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) + /* ID is optional for relative KeyingSets, but is necessary for absolute KeyingSets */ + if (id == NULL) { + if (ks->flag & KEYINGSET_ABSOLUTE) return; } + /* don't add if there is already a matching KS_Path in the KeyingSet */ + if (BKE_keyingset_find_destination(ks, id, group_name, rna_path, array_index, groupmode)) + return; + /* allocate a new KeyingSet Path */ ksp= MEM_callocN(sizeof(KS_Path), "KeyingSet Path"); @@ -229,6 +283,7 @@ void BKE_keyingset_add_destination (KeyingSet *ks, ID *id, const char group_name /* store flags */ ksp->flag= flag; + ksp->groupmode= groupmode; /* add KeyingSet path to KeyingSet */ BLI_addtail(&ks->paths, ksp); diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 69fb50bcf2b..1b930a74449 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1579,7 +1579,7 @@ static void initialize_posetree(struct Object *ob, bPoseChannel *pchan_tip) PoseTree *tree; PoseTarget *target; bConstraint *con; - bKinematicConstraint *data; + bKinematicConstraint *data= NULL; int a, segcount= 0, size, newsize, *oldparent, parent; /* find IK constraint, and validate it */ diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 4ad7d6da608..be64faec3cf 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -318,15 +318,9 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename) /* free G.main Main database */ clear_global(); - if(mode!='u') G.save_over = 1; - G.main= bfd->main; CTX_data_main_set(C, G.main); - CTX_wm_screen_set(C, NULL); - CTX_wm_area_set(C, NULL); - CTX_wm_region_set(C, NULL); - CTX_wm_ui_block_set(C, NULL, NULL); if (bfd->user) { @@ -342,15 +336,19 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename) /* case G_FILE_NO_UI or no screens in file */ if(mode) { - CTX_wm_screen_set(C, curscreen); + /* leave entire context further unaltered? */ CTX_data_scene_set(C, curscene); } else { G.winpos= bfd->winpos; G.displaymode= bfd->displaymode; G.fileflags= bfd->fileflags; + CTX_wm_screen_set(C, bfd->curscreen); CTX_data_scene_set(C, bfd->curscreen->scene); + CTX_wm_area_set(C, NULL); + CTX_wm_region_set(C, NULL); + CTX_wm_ui_block_set(C, NULL, NULL); } /* this can happen when active scene was lib-linked, and doesnt exist anymore */ @@ -374,8 +372,9 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename) //setscreen(G.curscreen); } - // XXX is this in the right place? - do_versions_ipos_to_animato(G.main); // XXX fixme... complicated versionpatching + // XXX temporarily here + if(G.main->versionfile < 250) + do_versions_ipos_to_animato(G.main); // XXX fixme... complicated versionpatching /* baseflags, groups, make depsgraph, etc */ set_scene_bg(CTX_data_scene(C)); diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 08a2b1dcecb..ab453fb6f44 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -1056,7 +1056,7 @@ static struct ImBuf *brush_gen_radial_control_imbuf(Brush *br) void brush_radial_control_invoke(wmOperator *op, Brush *br) { int mode = RNA_int_get(op->ptr, "mode"); - float original_value; + float original_value= 0; if(mode == WM_RADIALCONTROL_SIZE) original_value = br->size; diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 714965102d4..07937d0a901 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -459,6 +459,16 @@ int CTX_data_selected_editable_bones(const bContext *C, ListBase *list) return ctx_data_collection_get(C, CTX_DATA_SELECTED_EDITABLE_BONES, list); } +int CTX_data_visible_bones(const bContext *C, ListBase *list) +{ + return ctx_data_collection_get(C, CTX_DATA_VISIBLE_BONES, list); +} + +int CTX_data_editable_bones(const bContext *C, ListBase *list) +{ + return ctx_data_collection_get(C, CTX_DATA_EDITABLE_BONES, list); +} + struct bPoseChannel *CTX_data_active_pchan(const bContext *C) { return ctx_data_pointer_get(C, CTX_DATA_ACTIVE_PCHAN); @@ -469,6 +479,12 @@ int CTX_data_selected_pchans(const bContext *C, ListBase *list) return ctx_data_collection_get(C, CTX_DATA_SELECTED_PCHANS, list); } +int CTX_data_visible_pchans(const bContext *C, ListBase *list) +{ + return ctx_data_collection_get(C, CTX_DATA_VISIBLE_PCHANS, list); +} + + /* data evaluation */ float CTX_eval_frame(const bContext *C) diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 6f8732a35e2..49d1b06d9a2 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -622,8 +622,7 @@ static float evaluate_driver (ChannelDriver *driver, float evaltime) /* this evaluates the expression using Python,and returns its result: * - on errors it reports, then returns 0.0f */ - //return BPY_pydriver_eval(driver); // XXX old func - return 1.0f; + return BPY_pydriver_eval(driver); #endif /* DISABLE_PYTHON*/ } break; diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 8f8a8fba983..ced8d3bdebb 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -658,7 +658,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode) VChar *che; struct chartrans *chartransdata=NULL, *ct; float *f, xof, yof, xtrax, linedist, *linedata, *linedata2, *linedata3, *linedata4; - float twidth; + float twidth, maxlen= 0; int i, slen, j; int curbox; int selstart, selend; @@ -826,8 +826,6 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode) } } if(ascii== '\n' || ascii== '\r' || ascii==0 || ct->dobreak) { - float maxlen; - ct->xof= xof; ct->yof= yof; ct->linenr= lnr; diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index f6d604bdec7..360e1905ce8 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -443,7 +443,7 @@ static ImBuf *add_ibuf_size(int width, int height, char *name, int floatbuf, sho rect= (unsigned char*)ibuf->rect; } - strcpy(ibuf->name, "Untitled"); + strcpy(ibuf->name, "//Untitled"); ibuf->userflags |= IB_BITMAPDIRTY; if (uvtestgrid) { @@ -1051,7 +1051,7 @@ static void stampdata(Scene *scene, StampData *stamp_data, int do_prefix) } if (scene->r.stamp & R_STAMP_SEQSTRIP) { - Sequence *seq; //XXX = get_forground_frame_seq(scene->r.cfra); + Sequence *seq= NULL; //XXX = get_forground_frame_seq(scene->r.cfra); if (seq) strcpy(text, seq->name+2); else strcpy(text, ""); @@ -1800,7 +1800,7 @@ static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser) /* always returns a single ibuf, also during render progress */ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser) { - Render *re; + Render *re= NULL; RenderResult *rr= NULL; if(iuser->scene) { diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 103e2f7edac..440f83e6a4f 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1190,8 +1190,13 @@ static void ipo_to_animato (Ipo *ipo, char actname[], char constname[], ListBase /* Since an IPO-Curve may end up being made into many F-Curves (i.e. bitflag curves), * we figure out the best place to put the channel, then tell the curve-converter to just dump there */ - if (icu->driver) - icu_to_fcurves(drivers, icu, actname, constname); + if (icu->driver) { + /* Blender 2.4x allowed empty drivers */ + if(icu->driver->ob || icu->driver->type == IPO_DRIVER_TYPE_PYTHON) + icu_to_fcurves(drivers, icu, actname, constname); + else + MEM_freeN(icu->driver); + } else icu_to_fcurves(anim, icu, actname, constname); @@ -1401,6 +1406,10 @@ void do_versions_ipos_to_animato(Main *main) /* check PoseChannels for constraints with local data */ if (ob->pose) { + + /* Verify if there's AnimData block */ + BKE_id_add_animdata(id); + for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { for (con= pchan->constraints.first; con; con= con->next) { /* if constraint has own IPO, convert add these to Object diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index ddbb1c81e12..dfd83a7b42e 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -236,7 +236,7 @@ static void multires_subdisp(DerivedMesh *orig, Mesh *me, DerivedMesh *final, in for(i = 0; i < me->totface; ++i) { const int end = me->mface[i].v4 ? 4 : 3; - int x, y, x2, y2, mov; + int x, y, x2, y2, mov= 0; mvd_f1 += 1 + end * (slo2-2); //center+edgecross mvd_f3 = mvd_f4 = mvd_f1; @@ -268,7 +268,7 @@ static void multires_subdisp(DerivedMesh *orig, Mesh *me, DerivedMesh *final, in /* Main face verts */ for(k = 0; k < 4; ++k) { - int movx, movy; + int movx= 0, movy= 0; if(k == 0) { movx = -1; movy = -(slo2 - 2); } else if(k == 1) { movx = slo2 - 2; movy = -1; } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 610e513aa65..949808b2e56 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2268,7 +2268,9 @@ void object_handle_update(Scene *scene, Object *ob) { if(ob->recalc & OB_RECALC) { - if(ob->recalc & OB_RECALC_OB) { + /* XXX new animsys warning: depsgraph tag OB_RECALC_DATA should not skip drivers, + which is only in where_is_object now */ + if(ob->recalc & OB_RECALC) { if (G.f & G_DEBUG) printf("recalcob %s\n", ob->id.name+2); diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript index 142ffeb0a83..d0084be0d56 100644 --- a/source/blender/blenlib/SConscript +++ b/source/blender/blenlib/SConscript @@ -19,7 +19,7 @@ if env['OURPLATFORM'] == 'linux2': cflags='-pthread' incs += ' ../../../extern/binreloc/include' -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'): +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core'], priority = [180], compileflags =cflags ) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b3eee6e552e..023d7c09171 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1519,147 +1519,6 @@ static void direct_link_script(FileData *fd, Script *script) SCRIPT_SET_NULL(script) } -/* ************ READ NODE TREE *************** */ - -/* singe node tree (also used for material/scene trees), ntree is not NULL */ -static void lib_link_ntree(FileData *fd, ID *id, bNodeTree *ntree) -{ - bNode *node; - - for(node= ntree->nodes.first; node; node= node->next) - node->id= newlibadr_us(fd, id->lib, node->id); -} - -/* library ntree linking after fileread */ -static void lib_link_nodetree(FileData *fd, Main *main) -{ - bNodeTree *ntree; - - /* only link ID pointers */ - for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) { - if(ntree->id.flag & LIB_NEEDLINK) { - ntree->id.flag -= LIB_NEEDLINK; - lib_link_ntree(fd, &ntree->id, 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 open) -{ - Scene *sce; - Material *ma; - Tex *tx; - bNodeTree *ntree; - - /* 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! */ - ntreeMakeOwnType(ntree); /* for group usage */ - } - - /* 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); - } - /* and texture trees */ - for(tx= main->tex.first; tx; tx= tx->id.next) { - if(tx->nodetree) - ntreeVerifyTypes(tx->nodetree); - } -} - - - -/* ntree itself has been read! */ -static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) -{ - /* note: writing and reading goes in sync, for speed */ - bNode *node; - bNodeSocket *sock; - bNodeLink *link; - - ntree->init= 0; /* to set callbacks and force setting types */ - ntree->owntype= NULL; - ntree->timecursor= NULL; - - link_list(fd, &ntree->nodes); - for(node= ntree->nodes.first; node; node= node->next) { - if(node->type == NODE_DYNAMIC) { - node->custom1= 0; - node->custom1= BSET(node->custom1, NODE_DYNAMIC_LOADED); - node->typeinfo= NULL; - } - - 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); - else if(ntree->type==NTREE_COMPOSIT) { - if( ELEM3(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB)) - direct_link_curvemapping(fd, node->storage); - else if(ELEM3(node->type, CMP_NODE_IMAGE, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) - ((ImageUser *)node->storage)->ok= 1; - } - else if( ntree->type==NTREE_TEXTURE && (node->type==TEX_NODE_CURVE_RGB || node->type==TEX_NODE_CURVE_TIME) ) { - direct_link_curvemapping(fd, node->storage); - } - } - link_list(fd, &node->inputs); - link_list(fd, &node->outputs); - } - link_list(fd, &ntree->links); - - /* and we connect the rest */ - for(node= ntree->nodes.first; node; node= node->next) { - node->preview= newimaadr(fd, node->preview); - node->lasty= 0; - for(sock= node->inputs.first; sock; sock= sock->next) - sock->link= newdataadr(fd, sock->link); - for(sock= node->outputs.first; sock; sock= sock->next) - sock->ns.data= NULL; - } - for(link= ntree->links.first; link; link= link->next) { - link->fromnode= newdataadr(fd, link->fromnode); - link->tonode= newdataadr(fd, link->tonode); - link->fromsock= newdataadr(fd, link->fromsock); - link->tosock= newdataadr(fd, link->tosock); - } - - /* set selin and selout */ - for(node= ntree->nodes.first; node; node= node->next) { - for(sock= node->inputs.first; sock; sock= sock->next) { - if(sock->flag & SOCK_SEL) { - ntree->selin= sock; - break; - } - } - for(sock= node->outputs.first; sock; sock= sock->next) { - if(sock->flag & SOCK_SEL) { - ntree->selout= sock; - break; - } - } - } - - /* type verification is in lib-link */ -} /* ************ READ PACKEDFILE *************** */ @@ -1996,6 +1855,153 @@ static void direct_link_animdata(FileData *fd, AnimData *adt) // TODO... } +/* ************ READ NODE TREE *************** */ + +/* singe node tree (also used for material/scene trees), ntree is not NULL */ +static void lib_link_ntree(FileData *fd, ID *id, bNodeTree *ntree) +{ + bNode *node; + + if(ntree->adt) lib_link_animdata(fd, &ntree->id, ntree->adt); + + for(node= ntree->nodes.first; node; node= node->next) + node->id= newlibadr_us(fd, id->lib, node->id); +} + +/* library ntree linking after fileread */ +static void lib_link_nodetree(FileData *fd, Main *main) +{ + bNodeTree *ntree; + + /* only link ID pointers */ + for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) { + if(ntree->id.flag & LIB_NEEDLINK) { + ntree->id.flag -= LIB_NEEDLINK; + lib_link_ntree(fd, &ntree->id, 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 open) +{ + Scene *sce; + Material *ma; + Tex *tx; + bNodeTree *ntree; + + /* 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! */ + ntreeMakeOwnType(ntree); /* for group usage */ + } + + /* 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); + } + /* and texture trees */ + for(tx= main->tex.first; tx; tx= tx->id.next) { + if(tx->nodetree) + ntreeVerifyTypes(tx->nodetree); + } +} + + + +/* ntree itself has been read! */ +static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) +{ + /* note: writing and reading goes in sync, for speed */ + bNode *node; + bNodeSocket *sock; + bNodeLink *link; + + ntree->init= 0; /* to set callbacks and force setting types */ + ntree->owntype= NULL; + ntree->timecursor= NULL; + + ntree->adt= newdataadr(fd, ntree->adt); + direct_link_animdata(fd, ntree->adt); + + link_list(fd, &ntree->nodes); + for(node= ntree->nodes.first; node; node= node->next) { + if(node->type == NODE_DYNAMIC) { + node->custom1= 0; + node->custom1= BSET(node->custom1, NODE_DYNAMIC_LOADED); + node->typeinfo= NULL; + } + + 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); + else if(ntree->type==NTREE_COMPOSIT) { + if( ELEM3(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB)) + direct_link_curvemapping(fd, node->storage); + else if(ELEM3(node->type, CMP_NODE_IMAGE, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) + ((ImageUser *)node->storage)->ok= 1; + } + else if( ntree->type==NTREE_TEXTURE && (node->type==TEX_NODE_CURVE_RGB || node->type==TEX_NODE_CURVE_TIME) ) { + direct_link_curvemapping(fd, node->storage); + } + } + link_list(fd, &node->inputs); + link_list(fd, &node->outputs); + } + link_list(fd, &ntree->links); + + /* and we connect the rest */ + for(node= ntree->nodes.first; node; node= node->next) { + node->preview= newimaadr(fd, node->preview); + node->lasty= 0; + for(sock= node->inputs.first; sock; sock= sock->next) + sock->link= newdataadr(fd, sock->link); + for(sock= node->outputs.first; sock; sock= sock->next) + sock->ns.data= NULL; + } + for(link= ntree->links.first; link; link= link->next) { + link->fromnode= newdataadr(fd, link->fromnode); + link->tonode= newdataadr(fd, link->tonode); + link->fromsock= newdataadr(fd, link->fromsock); + link->tosock= newdataadr(fd, link->tosock); + } + + /* set selin and selout */ + for(node= ntree->nodes.first; node; node= node->next) { + for(sock= node->inputs.first; sock; sock= sock->next) { + if(sock->flag & SOCK_SEL) { + ntree->selin= sock; + break; + } + } + for(sock= node->outputs.first; sock; sock= sock->next) { + if(sock->flag & SOCK_SEL) { + ntree->selout= sock; + break; + } + } + } + + /* type verification is in lib-link */ +} + /* ************ READ ARMATURE ***************** */ static void lib_link_constraints(FileData *fd, ID *id, ListBase *conlist) @@ -2321,7 +2327,8 @@ static void lib_link_key(FileData *fd, Main *main) key= main->key.first; while(key) { if(key->id.flag & LIB_NEEDLINK) { - + if(key->adt) lib_link_animdata(fd, &key->id, key->adt); + key->ipo= newlibadr_us(fd, key->id.lib, key->ipo); // XXX depreceated - old animation system key->from= newlibadr(fd, key->id.lib, key->from); @@ -2615,6 +2622,7 @@ static void lib_link_curve(FileData *fd, Main *main) cu= main->curve.first; while(cu) { if(cu->id.flag & LIB_NEEDLINK) { + if(cu->adt) lib_link_animdata(fd, &cu->id, cu->adt); for(a=0; atotcol; a++) cu->mat[a]= newlibadr_us(fd, cu->id.lib, cu->mat[a]); @@ -2719,6 +2727,7 @@ static void lib_link_texture(FileData *fd, Main *main) tex= main->tex.first; while(tex) { if(tex->id.flag & LIB_NEEDLINK) { + if(tex->adt) lib_link_animdata(fd, &tex->id, tex->adt); tex->ima= newlibadr_us(fd, tex->id.lib, tex->ima); tex->ipo= newlibadr_us(fd, tex->id.lib, tex->ipo); @@ -2778,6 +2787,8 @@ static void lib_link_material(FileData *fd, Main *main) ma= main->mat.first; while(ma) { if(ma->id.flag & LIB_NEEDLINK) { + if(ma->adt) lib_link_animdata(fd, &ma->id, ma->adt); + /*Link ID Properties -- and copy this comment EXACTLY for easy finding of library blocks that implement this.*/ if (ma->id.properties) IDP_LibLinkProperty(ma->id.properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd); @@ -4316,16 +4327,18 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) v3d->localvd->camera= sc->scene->camera; /* localview can become invalid during undo/redo steps, so we exit it when no could be found */ + /* XXX regionlocalview ? for(base= sc->scene->base.first; base; base= base->next) { if(base->lay & v3d->lay) break; } if(base==NULL) { v3d->lay= v3d->localvd->lay; v3d->layact= v3d->localvd->layact; - MEM_freeN(v3d->localvd); + MEM_freeN(v3d->localvd); v3d->localvd= NULL; v3d->localview= 0; } + */ } else if(v3d->scenelock) v3d->lay= sc->scene->lay; @@ -4460,6 +4473,7 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype) rv3d->ri= NULL; rv3d->sms= NULL; rv3d->smooth_timer= NULL; + rv3d->lastmode= 0; } } @@ -9220,6 +9234,9 @@ static void expand_nodetree(FileData *fd, Main *mainvar, bNodeTree *ntree) { bNode *node; + if(ntree->adt) + expand_animdata(fd, mainvar, ntree->adt); + for(node= ntree->nodes.first; node; node= node->next) if(node->id && node->type!=CMP_NODE_R_LAYERS) expand_doit(fd, mainvar, node->id); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 623d1eebe31..45742b8f020 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1418,6 +1418,8 @@ static void write_textures(WriteData *wd, ListBase *idbase) writestruct(wd, ID_TE, "Tex", 1, tex); if (tex->id.properties) IDP_WriteProperty(tex->id.properties, wd); + if (tex->adt) write_animdata(wd, tex->adt); + /* direct data */ if(tex->plugin) writestruct(wd, DATA, "PluginTex", 1, tex->plugin); if(tex->coba) writestruct(wd, DATA, "ColorBand", 1, tex->coba); @@ -1454,6 +1456,8 @@ static void write_materials(WriteData *wd, ListBase *idbase) /*manually set head group property to IDP_GROUP, just in case it hadn't been set yet :) */ if (ma->id.properties) IDP_WriteProperty(ma->id.properties, wd); + + if (ma->adt) write_animdata(wd, ma->adt); for(a=0; amtex[a]) writestruct(wd, DATA, "MTex", 1, ma->mtex[a]); @@ -2084,7 +2088,10 @@ static void write_nodetrees(WriteData *wd, ListBase *idbase) if (ntree->id.us>0 || wd->current) { writestruct(wd, ID_NT, "bNodeTree", 1, ntree); write_nodetree(wd, ntree); + if (ntree->id.properties) IDP_WriteProperty(ntree->id.properties, wd); + + if (ntree->adt) write_animdata(wd, ntree->adt); } } } diff --git a/source/blender/bmesh/bmesh_operators.h b/source/blender/bmesh/bmesh_operators.h index 48330c4604a..4af6e89a94c 100644 --- a/source/blender/bmesh/bmesh_operators.h +++ b/source/blender/bmesh/bmesh_operators.h @@ -122,22 +122,40 @@ void *BMO_IterStep(BMOIter *iter); remember for pointer maps this will be a pointer to a pointer.*/ void *BMO_IterMapVal(BMOIter *iter); -/*if msg is null, then the default message for the errorcode is used*/ -void BMOP_RaiseError(BMesh *bm, int errcode, char *msg); -/*returns error code or 0 if no error*/ -int BMOP_GetError(BMesh *bm, char **msg); -/*returns 1 if there was an error*/ -int BMOP_CheckError(BMesh *bm); -int BMOP_PopError(BMesh *bm, char **msg); +/*----------- bmop error system ----------*/ + +/*pushes an error onto the bmesh error stack. + if msg is null, then the default message for the errorcode is used.*/ +void BMO_RaiseError(BMesh *bm, BMOperator *owner, int errcode, char *msg); + +/*gets the topmost error from the stack. + returns error code or 0 if no error.*/ +int BMO_GetError(BMesh *bm, char **msg, BMOperator **op); + +/*same as geterror, only pops the error off the stack as well*/ +int BMO_PopError(BMesh *bm, char **msg, BMOperator **op); +void BMO_ClearStack(BMesh *bm); + +#if 0 +//this is meant for handling errors, like self-intersection test failures. +//it's dangerous to handle errors in general though, so disabled for now. + +/*catches an error raised by the op pointed to by catchop. + errorcode is either the errorcode, or BMERR_ALL for any + error.*/ +int BMO_CatchOpError(BMesh *bm, BMOperator *catchop, int errorcode, char **msg); +#endif /*------ error code defines -------*/ /*error messages*/ -#define BMERR_SELF_INTERSECTING 1 +#define BMERR_SELF_INTERSECTING 1 +#define BMERR_DISSOLVEDISK_FAILED 2 static char *bmop_error_messages[] = { 0, "Self intersection error", + "Could not dissolve vert", }; /*------------begin operator defines (see bmesh_opdefines.c too)------------*/ @@ -244,9 +262,12 @@ enum { /*dissolve faces*/ #define BMOP_DISSOLVE_FACES 7 - -#define BMOP_DISFACES_FACEIN 0 -#define BMOP_DISFACES_TOTSLOT 1 +enum { + BMOP_DISFACES_FACEIN, + //list of faces that comprise regions of split faces + BMOP_DISFACES_REGIONOUT, + BMOP_DISFACES_TOTSLOT, +}; /*dissolve verts*/ #define BMOP_DISSOLVE_VERTS 8 @@ -265,6 +286,7 @@ enum { BMOP_EXFACE_TOTSLOT, }; + /*keep this updated!*/ #define BMOP_TOTAL_OPS 11 /*-------------------------------end operator defines-------------------------------*/ @@ -279,10 +301,12 @@ extern int bmesh_total_ops; to get more useful information (such as the mapping from original to new elements) you should run the dupe op manually.*/ struct Object; +struct EditMesh; void BMOP_DupeFromFlag(struct BMesh *bm, int etypeflag, int flag); void BM_esubdivideflag(struct Object *obedit, struct BMesh *bm, int selflag, float rad, int flag, int numcuts, int seltype); void BM_extrudefaceflag(BMesh *bm, int flag); +int BM_DissolveFaces(struct EditMesh *em, int flag); #endif diff --git a/source/blender/bmesh/bmesh_queries.h b/source/blender/bmesh/bmesh_queries.h index f02375313a1..a3df4390295 100644 --- a/source/blender/bmesh/bmesh_queries.h +++ b/source/blender/bmesh/bmesh_queries.h @@ -1,5 +1,6 @@ #ifndef BMESH_QUERIES_H #define BMESH_QUERIES_H +#include /*Queries*/ int BM_Count_Element(struct BMesh *bm, int type); @@ -26,5 +27,5 @@ int BM_Face_Sharededges(struct BMFace *f1, struct BMFace *f2); float BM_Face_Angle(struct BMesh *bm, struct BMEdge *e); int BM_Exist_Face_Overlaps(struct BMesh *bm, struct BMVert **varr, int len, struct BMFace **existface); int BM_Edge_Share_Faces(struct BMEdge *e1, struct BMEdge *e2); - +int BM_Validate_Face(BMesh *bm, BMFace *face, FILE *err); #endif diff --git a/source/blender/bmesh/intern/bmesh_eulers.c b/source/blender/bmesh/intern/bmesh_eulers.c index c7f42ae390c..bf918c92cca 100644 --- a/source/blender/bmesh/intern/bmesh_eulers.c +++ b/source/blender/bmesh/intern/bmesh_eulers.c @@ -909,7 +909,6 @@ BMFace *bmesh_jfke(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e) BMLoop *curloop, *f1loop=NULL, *f2loop=NULL; int loopok = 0, newlen = 0,i, f1len=0, f2len=0, radlen=0, edok, shared; - /*need to reinsert logic for checking to make sure that faces only share one edge!*/ if(f1 == f2) return NULL; //can't join a face to itself /*verify that e is in both f1 and f2*/ f1len = bmesh_cycle_length(f1->loopbase); @@ -948,7 +947,6 @@ BMFace *bmesh_jfke(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e) shared = BM_Face_Sharededges(f1,f2); if(shared > 1) return NULL; - /*join the two loops*/ f1loop->head.prev->next = f2loop->head.next; f2loop->head.next->prev = f1loop->head.prev; diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index e8066aa52f9..b79a8a5f4ab 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -49,46 +49,6 @@ void bmesh_error(void) printf("BM modelling error!"); } -/*error system*/ -typedef struct bmop_error { - struct bmop_error *next, *prev; - int errorcode; - char *msg; -} bmop_error; - -void BMOP_RaiseError(BMesh *bm, int errcode, char *msg) -{ - bmop_error *err = MEM_callocN(sizeof(bmop_error), "bmop_error"); - err->errorcode = errcode; - err->msg = msg; - BLI_addhead(&bm->errorstack, err); -} - -/*returns error code or 0 if no error*/ -int BMOP_GetError(BMesh *bm, char **msg) -{ - bmop_error *err = bm->errorstack.first; - if (!err) return 0; - - if (msg) *msg = err->msg; - - return err->errorcode; -} - -int BMOP_CheckError(BMesh *bm) -{ - return bm->errorstack.first != NULL; -} - -int BMOP_PopError(BMesh *bm, char **msg) -{ - int errorcode = BMOP_GetError(bm, msg); - if (errorcode) - BLI_remlink(&bm->errorstack, &bm->errorstack.first); - - return errorcode; -} - /* * BMESH SET SYSFLAG * diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c index 05d9fb34eff..ce59856f823 100644 --- a/source/blender/bmesh/intern/bmesh_mods.c +++ b/source/blender/bmesh/intern/bmesh_mods.c @@ -11,6 +11,8 @@ #include "bmesh.h" #include "bmesh_private.h" +#include +#include /* * BME_MODS.C @@ -99,8 +101,14 @@ void BM_Dissolve_Disk(BMesh *bm, BMVert *v) { do{ f = NULL; len = bmesh_cycle_length(&(e->loop->radial)); - if(len == 2 && (e!=baseedge) && (e!=keepedge)) + if(len == 2 && (e!=baseedge) && (e!=keepedge)) { f = BM_Join_Faces(bm, e->loop->f, ((BMLoop*)(e->loop->radial.next->data))->f, e, 0, 0); + /*return if couldn't join faces in manifold + conditions.*/ + //!disabled for testing why bad things happen + if (!f) return; + } + if(f){ done = 0; break; @@ -332,8 +340,49 @@ BMVert *BM_Split_Edge_Multi(BMesh *bm, BMEdge *e, int numcuts) BMVert *nv = NULL; for(i=0; i < numcuts; i++){ - percent = 1.0 / (float)(numcuts + 1 - i); + percent = 1.0f / (float)(numcuts + 1 - i); nv = BM_Split_Edge(bm, e->v2, e, NULL, percent, 0); } return nv; } + +int BM_Validate_Face(BMesh *bm, BMFace *face, FILE *err) +{ + BMIter iter; + V_DECLARE(verts); + BMVert **verts = NULL; + BMLoop *l; + int ret = 1, i, j; + + if (face->len == 2) { + fprintf(err, "warning: found two-edged face. face ptr: %p\n", face); + fflush(err); + } + + for (l=BMIter_New(&iter, bm, BM_LOOPS_OF_FACE, face);l;l=BMIter_Step(&iter)) { + V_GROW(verts); + verts[V_COUNT(verts)-1] = l->v; + + if (l->e->v1 == l->e->v2) { + fprintf(err, "Found bmesh edge with identical verts!\n"); + fprintf(err, " edge ptr: %p, vert: %p\n", l->e, l->e->v1); + fflush(err); + ret = 0; + } + } + + for (i=0; ival; } + + +/*error system*/ +typedef struct bmop_error { + struct bmop_error *next, *prev; + int errorcode; + BMOperator *op; + char *msg; +} bmop_error; + +void BMO_ClearStack(BMesh *bm) +{ + while (BMO_PopError(bm, NULL, NULL)); +} + +void BMO_RaiseError(BMesh *bm, BMOperator *owner, int errcode, char *msg) +{ + bmop_error *err = MEM_callocN(sizeof(bmop_error), "bmop_error"); + + err->errorcode = errcode; + err->msg = msg; + err->op = owner; + + BLI_addhead(&bm->errorstack, err); +} + +/*returns error code or 0 if no error*/ +int BMO_GetError(BMesh *bm, char **msg, BMOperator **op) +{ + bmop_error *err = bm->errorstack.first; + if (!err) return 0; + + if (msg) *msg = err->msg; + if (op) *op = err->op; + + return err->errorcode; +} + +int BMO_PopError(BMesh *bm, char **msg, BMOperator **op) +{ + int errorcode = BMO_GetError(bm, msg, op); + + if (errorcode) { + bmop_error *err = bm->errorstack.first; + + BLI_remlink(&bm->errorstack, &bm->errorstack.first); + MEM_freeN(err); + } + + return errorcode; +} diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index b5a65932743..1bf9f7daa08 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -140,11 +140,11 @@ static int compute_poly_center(float center[3], float *area, float (*verts)[3], } if(area) - *area = atmp / 2.0; + *area = atmp / 2.0f; if (atmp != 0){ - center[0] = xtmp / (3.0 * atmp); - center[1] = xtmp / (3.0 * atmp); + center[0] = xtmp / (3.0f * atmp); + center[1] = xtmp / (3.0f * atmp); return 1; } return 0; @@ -229,6 +229,8 @@ void poly_rotate_plane(float normal[3], float (*verts)[3], int nverts) Crossf(axis, up, normal); angle = VecAngle2(normal, up); + + if (angle == 0.0) return; AxisAngleToQuat(q, axis, angle); QuatToMat3(q, mat); @@ -302,6 +304,87 @@ void BM_flip_normal(BMesh *bm, BMFace *f) +int winding(float *a, float *b, float *c) +{ + float v1[3], v2[3], v[3]; + + VecSubf(v1, b, a); + VecSubf(v2, b, c); + + v1[2] = 0; + v2[2] = 0; + + Normalize(v1); + Normalize(v2); + + Crossf(v, v1, v2); + return !!(v[2] > 0); +} + +/* detects if two line segments cross each other (intersects). + note, there could be more winding cases then there needs to be. */ +int linecrosses(float *v1, float *v2, float *v3, float *v4) +{ + int w1, w2, w3, w4, w5; + + w1 = winding(v1, v3, v2); + w2 = winding(v2, v4, v1); + w3 = !winding(v1, v2, v3); + w4 = winding(v3, v2, v4); + w5 = !winding(v3, v1, v4); + return w1 == w2 && w2 == w3 && w3 == w4 && w4==w5; +} + +int goodline(float (*projectverts)[3], int v1i, int v2i, int nvert) +{ + /*the hardcoded stuff here, 200000, 0.999, and 1.0001 may be problems + in the future, not sure. - joeedh*/ + static float outv[3] = {20000000.0f, 20000000.0f, 0.0f}; + float v1[3], v2[3], p[3], vv1[3], vv2[3], mid[3], a[3], b[3]; + int i = 0, lcount=0; + + VECCOPY(v1, projectverts[v1i]) + VECCOPY(v2, projectverts[v2i]) + + VecAddf(p, v1, v2); + VecMulf(p, 0.5f); + + VecSubf(a, v1, p); + VecSubf(b, v2, p); + + VecMulf(a, 0.999f); + VecMulf(b, 0.999f); + + VecAddf(v1, p, a); + VecAddf(v2, p, b); + + while (i < nvert) { + VECCOPY(vv1, projectverts[i]); + VECCOPY(vv2, projectverts[(i+1)%nvert]); + + if (linecrosses(vv1, vv2, v1, v2)) return 0; + + VecAddf(mid, vv1, vv2); + VecMulf(mid, 0.5f); + + VecSubf(a, vv1, mid); + VecSubf(b, vv2, mid); + + VecMulf(a, 1.0001f); + VecMulf(b, 1.0001f); + + VecAddf(vv1, mid, a); + VecAddf(vv2, mid, b); + + if (linecrosses(vv1, vv2, p, outv)) lcount += 1; + + i += 1; + } + if ((lcount % 2) == 0) return 0; + + return 1; +} + /* * FIND EAR * @@ -311,10 +394,10 @@ void BM_flip_normal(BMesh *bm, BMFace *f) * */ -static BMLoop *find_ear(BMFace *f, float (*verts)[3]) +static BMLoop *find_ear(BMFace *f, float (*verts)[3], int nvert) { BMVert *v1, *v2, *v3; - BMLoop *bestear = NULL, *l, *l2; + BMLoop *bestear = NULL, *l; float angle, bestangle = 180.0f; int isear; @@ -328,15 +411,7 @@ static BMLoop *find_ear(BMFace *f, float (*verts)[3]) if (BM_Edge_Exist(v1, v3)) isear = 0; - if(isear && convexangle(verts[v1->head.eflag2], verts[v2->head.eflag2], verts[v3->head.eflag2])){ - for(l2 = ((BMLoop*)(l->head.next->next)); l2 != ((BMLoop*)(l->head.prev)); l2 = ((BMLoop*)(l2->head.next)) ){ - if(point_in_triangle(verts[v1->head.eflag2], verts[v2->head.eflag2],verts[v3->head.eflag2], l2->v->co)){ - isear = 0; - break; - } - } - } else isear = 0; - + if (isear && !goodline(verts, v1->head.eflag2, v3->head.eflag2, nvert)) isear = 0; if(isear){ angle = VecAngle3(verts[v1->head.eflag2], verts[v2->head.eflag2], verts[v3->head.eflag2]); if(!bestear || angle < bestangle){ @@ -371,7 +446,7 @@ static BMLoop *find_ear(BMFace *f, float (*verts)[3]) */ void BM_Triangulate_Face(BMesh *bm, BMFace *f, float (*projectverts)[3], int newedgeflag, int newfaceflag) { - int i, done; + int i, done, nvert; BMLoop *l, *newl, *nextloop; /*copy vertex coordinates to vertspace array*/ @@ -388,11 +463,13 @@ void BM_Triangulate_Face(BMesh *bm, BMFace *f, float (*projectverts)[3], int new compute_poly_plane(projectverts, i); poly_rotate_plane(f->no, projectverts, i); - + + nvert = f->len; + done = 0; while(!done && f->len > 3){ done = 1; - l = find_ear(f, projectverts); + l = find_ear(f, projectverts, nvert); if(l) { done = 0; f = bmesh_sfme(bm, f, ((BMLoop*)(l->head.prev))->v, ((BMLoop*)(l->head.next))->v, &newl); diff --git a/source/blender/bmesh/operators/dissolveops.c b/source/blender/bmesh/operators/dissolveops.c index e06a7f7dd27..c9e29c9f94a 100644 --- a/source/blender/bmesh/operators/dissolveops.c +++ b/source/blender/bmesh/operators/dissolveops.c @@ -3,6 +3,7 @@ #include "BKE_utildefines.h" #include "bmesh.h" +#include "mesh_intern.h" #include "bmesh_private.h" #include "BLI_arithb.h" @@ -12,14 +13,56 @@ #define VERT_MARK 1 -void dissolvefaces_exec(BMesh *bmesh, BMOperator *op) +void dissolvefaces_exec(BMesh *bm, BMOperator *op) { - BMO_Flag_Buffer(bmesh, op, BMOP_DISFACES_FACEIN, FACE_MARK); + BMOIter iter; + BMIter liter; + BMLoop *l; + BMFace *f, *f2, *nf = NULL; + + //BMO_Flag_Buffer(bm, op, BMOP_DISFACES_FACEIN, FACE_MARK); /*TODO: need to discuss with Briggs how best to implement this, seems this would be a great time to use the walker api, get it up to snuff. perhaps have a walker that goes over inner vertices of a contiguously-flagged region? then you could just use dissolve disk on them.*/ + if (BMO_GetSlot(op, BMOP_DISFACES_FACEIN)->len != 2) return; + + /*HACK: for debugging purposes, handle cases of two adjacent faces*/ + f = BMO_IterNew(&iter, bm, op, BMOP_DISFACES_FACEIN); + f2 = BMO_IterStep(&iter); + + for (l=BMIter_New(&liter, bm, BM_LOOPS_OF_FACE, f);l;l=BMIter_Step(&liter)) { + if (!l->radial.next) continue; + if (((BMLoop*)l->radial.next->data)->f == f2) { + nf = BM_Join_Faces(bm, f, f2, l->e, 1, 0); + break; + } + } + + if (nf) { + BMO_SetFlag(bm, nf, 1); + BMO_Flag_To_Slot(bm, op, BMOP_DISFACES_REGIONOUT, 1, BM_FACE); + } + +} + +/*returns 1 if any faces were dissolved*/ +int BM_DissolveFaces(EditMesh *em, int flag) { + BMesh *bm = editmesh_to_bmesh(em); + EditMesh *em2; + BMOperator op; + + BMO_Init_Op(&op, BMOP_DISSOLVE_FACES); + BMO_HeaderFlag_To_Slot(bm, &op, BMOP_DISFACES_FACEIN, flag, BM_FACE); + BMO_Exec_Op(bm, &op); + BMO_Finish_Op(bm, &op); + + em2 = bmesh_to_editmesh(bm); + set_editMesh(em, em2); + MEM_freeN(em2); + + return BMO_GetSlot(&op, BMOP_DISFACES_REGIONOUT)->len > 0; } void dissolveverts_exec(BMesh *bm, BMOperator *op) @@ -57,6 +100,10 @@ void dissolveverts_exec(BMesh *bm, BMOperator *op) while (found3) { found3 = 0; for (f=BMIter_New(&iter, bm, BM_FACES, NULL); f; f=BMIter_Step(&iter)){ + if (BM_Validate_Face(bm, f, stderr)) { + printf("error.\n"); + } + if (f->len == 2) { //this design relies on join faces working //with two-edged faces properly. diff --git a/source/blender/editors/Makefile b/source/blender/editors/Makefile index 312227ba4e9..8a819195fbd 100644 --- a/source/blender/editors/Makefile +++ b/source/blender/editors/Makefile @@ -29,6 +29,6 @@ # Bounces make to subdirectories. SOURCEDIR = source/blender/editors -DIRS = armature mesh animation object sculpt datafiles transform screen curve gpencil physics preview uvedit space_outliner space_time space_view3d interface util space_api space_graph space_image space_node space_buttons space_info space_file space_sound space_action space_nla space_script space_text space_sequencer +DIRS = armature mesh animation object sculpt_paint datafiles transform screen curve gpencil physics preview uvedit space_outliner space_time space_view3d interface util space_api space_graph space_image space_node space_buttons space_info space_file space_sound space_action space_nla space_script space_text space_sequencer include nan_subdirs.mk diff --git a/source/blender/editors/SConscript b/source/blender/editors/SConscript index 8346092976e..a99d21b19a4 100644 --- a/source/blender/editors/SConscript +++ b/source/blender/editors/SConscript @@ -31,5 +31,5 @@ SConscript(['datafiles/SConscript', 'space_sequencer/SConscript', 'transform/SConscript', 'screen/SConscript', - 'sculpt/SConscript', + 'sculpt_paint/SConscript', 'uvedit/SConscript']) diff --git a/source/blender/editors/animation/anim_channels.c b/source/blender/editors/animation/anim_channels.c index 9759d0905b6..ca385333d7a 100644 --- a/source/blender/editors/animation/anim_channels.c +++ b/source/blender/editors/animation/anim_channels.c @@ -58,6 +58,7 @@ #include "DNA_userdef_types.h" #include "DNA_gpencil_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_world_types.h" #include "RNA_access.h" #include "RNA_define.h" @@ -164,6 +165,10 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short break; switch (ale->type) { + case ANIMTYPE_SCENE: + if (ale->flag & SCE_DS_SELECTED) + sel= ACHANNEL_SETFLAG_CLEAR; + break; case ANIMTYPE_OBJECT: if (ale->flag & SELECT) sel= ACHANNEL_SETFLAG_CLEAR; @@ -187,6 +192,13 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short /* Now set the flags */ for (ale= anim_data.first; ale; ale= ale->next) { switch (ale->type) { + case ANIMTYPE_SCENE: + { + Scene *scene= (Scene *)ale->data; + + ACHANNEL_SET_FLAG(scene, sel, SCE_DS_SELECTED); + } + break; case ANIMTYPE_OBJECT: { Base *base= (Base *)ale->data; @@ -1046,6 +1058,26 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s /* action to take depends on what channel we've got */ switch (ale->type) { + case ANIMTYPE_SCENE: + { + Scene *sce= (Scene *)ale->data; + + if (x < 16) { + /* toggle expand */ + sce->flag ^= SCE_DS_COLLAPSED; + } + else { + /* set selection status */ + if (selectmode == SELECT_INVERT) { + /* swap select */ + sce->flag ^= SCE_DS_SELECTED; + } + else { + sce->flag |= SCE_DS_SELECTED; + } + } + } + break; case ANIMTYPE_OBJECT: { bDopeSheet *ads= (bDopeSheet *)ac->data; @@ -1132,6 +1164,12 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s key->flag ^= KEYBLOCK_DS_EXPAND; } break; + case ANIMTYPE_DSWOR: + { + World *wo= (World *)ale->data; + wo->flag ^= WO_DS_EXPAND; + } + break; case ANIMTYPE_GROUP: { @@ -1173,6 +1211,7 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s /* if group is selected now, and we're in Action Editor mode (so that we have pointer to active action), * we can make this group the 'active' one in that action */ + // TODO: we should be able to do this through dopesheet + f-curves editor too... if ((agrp->flag & AGRP_SELECTED) && (ac->datatype == ANIMCONT_ACTION)) action_set_active_agrp((bAction *)ac->data, agrp); } diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 75bc145e267..05fa1f3bc97 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -66,6 +66,7 @@ #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_world_types.h" #include "MEM_guardedalloc.h" @@ -333,6 +334,16 @@ bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, s /* do specifics */ switch (datatype) { + case ANIMTYPE_SCENE: + { + Scene *sce= (Scene *)data; + + ale->flag= sce->flag; + + ale->key_data= sce; + ale->datatype= ALE_SCE; + } + break; case ANIMTYPE_OBJECT: { Base *base= (Base *)data; @@ -427,6 +438,17 @@ bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, s ale->flag= FILTER_SKE_OBJD(key); + ale->key_data= (adt) ? adt->action : NULL; + ale->datatype= ALE_ACT; + } + break; + case ANIMTYPE_DSWOR: + { + World *wo= (World *)data; + AnimData *adt= wo->adt; + + ale->flag= FILTER_WOR_SCED(wo); + ale->key_data= (adt) ? adt->action : NULL; ale->datatype= ALE_ACT; } @@ -489,12 +511,15 @@ static int animdata_filter_fcurves (ListBase *anim_data, FCurve *first, bActionG if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_FCU(fcu)) { /* only include this curve if selected */ if (!(filter_mode & ANIMFILTER_SEL) || (SEL_FCU(fcu))) { - /* owner/ownertype will be either object or action-channel, depending if it was dopesheet or part of an action */ - ale= make_new_animlistelem(fcu, ANIMTYPE_FCURVE, owner, ownertype, owner_id); - - if (ale) { - BLI_addtail(anim_data, ale); - items++; + /* only include if this curve is active */ + if (!(filter_mode & ANIMFILTER_ACTIVE) || (fcu->flag & FCURVE_ACTIVE)) { + /* owner/ownertype will be either object or action-channel, depending if it was dopesheet or part of an action */ + ale= make_new_animlistelem(fcu, ANIMTYPE_FCURVE, owner, ownertype, owner_id); + + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } } } } @@ -1007,6 +1032,117 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B return items; } +static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode) +{ + World *wo= sce->world; + bAnimListElem *ale; + int items = 0; + + /* add scene as a channel first (even if we aren't showing scenes we still need to show the scene's sub-data */ + if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) { + /* check if filtering by selection */ + if ( !(filter_mode & ANIMFILTER_SEL) || (sce->flag & SCE_DS_SELECTED) ) { + ale= make_new_animlistelem(sce, ANIMTYPE_SCENE, NULL, ANIMTYPE_NONE, NULL); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } + } + } + + /* if collapsed, don't go any further (unless adding keyframes only) */ + if ( (EXPANDED_SCEC(sce) == 0) && !(filter_mode & ANIMFILTER_CURVESONLY) ) + return items; + + /* Action or Drivers */ + if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) { + /* Action? */ + if (ANIMDATA_HAS_KEYS(sce) && !(ads->filterflag & ADS_FILTER_NOSCE)) { + AnimData *adt= sce->adt; + + /* include action-expand widget? */ + if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) { + ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, sce, ANIMTYPE_SCENE, (ID *)sce); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } + } + + /* add F-Curve channels? */ + if (EXPANDED_ACTC(adt->action) || !(filter_mode & ANIMFILTER_CHANNELS)) { + items += animdata_filter_action(anim_data, adt->action, filter_mode, sce, ANIMTYPE_SCENE, (ID *)sce); + } + } + } + else { + /* Drivers */ + if (ANIMDATA_HAS_DRIVERS(sce) && !(ads->filterflag & ADS_FILTER_NOSCE)) { + AnimData *adt= sce->adt; + + /* include drivers-expand widget? */ + if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) { + ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, sce, ANIMTYPE_SCENE, (ID *)sce); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } + } + + /* add F-Curve channels (drivers are F-Curves) */ + if (EXPANDED_DRVD(adt) || !(filter_mode & ANIMFILTER_CHANNELS)) { + items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, sce, ANIMTYPE_SCENE, filter_mode, (ID *)sce); + } + } + } + + /* world */ + if ((wo && wo->adt) && !(ads->filterflag & ADS_FILTER_NOWOR)) { + /* Animation or Drivers */ + if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) { + AnimData *adt= wo->adt; + + /* include world-expand widget? */ + if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) { + ale= make_new_animlistelem(wo, ANIMTYPE_DSWOR, sce, ANIMTYPE_SCENE, (ID *)sce); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } + } + + /* add channels */ + if (FILTER_WOR_SCED(wo) || (filter_mode & ANIMFILTER_CURVESONLY)) { + items += animdata_filter_action(anim_data, adt->action, filter_mode, wo, ANIMTYPE_DSWOR, (ID *)wo); + } + } + else { + /* Drivers */ + if (ANIMDATA_HAS_DRIVERS(wo)) { + AnimData *adt= wo->adt; + + /* include shapekey-expand widget? */ + if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) { + ale= make_new_animlistelem(wo, ANIMTYPE_DSWOR, sce, ANIMTYPE_SCENE, (ID *)wo); + if (ale) { + BLI_addtail(anim_data, ale); + items++; + } + } + + /* add F-Curve channels (drivers are F-Curves) */ + if (FILTER_WOR_SCED(wo)/*EXPANDED_DRVD(adt)*/ || !(filter_mode & ANIMFILTER_CHANNELS)) { + // XXX owner info is messed up now... + items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, wo, ANIMTYPE_DSWOR, filter_mode, (ID *)wo); + } + } + } + } + + /* return the number of items added to the list */ + return items; +} + // TODO: implement pinning... (if and when pinning is done, what we need to do is to provide freeing mechanisms - to protect against data that was deleted) static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int filter_mode) { @@ -1020,6 +1156,35 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int return 0; } + /* scene-linked animation */ + // TODO: sequencer, composite nodes - are we to include those here too? + { + short sceOk, worOk; + + /* check filtering-flags if ok */ + if (ads->filterflag) { + if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) { + sceOk= (ANIMDATA_HAS_DRIVERS(sce) && !(ads->filterflag & ADS_FILTER_NOSCE)); + worOk= ((sce->world) && ANIMDATA_HAS_DRIVERS(sce->world) && !(ads->filterflag & ADS_FILTER_NOWOR)); + } + else { + sceOk= (ANIMDATA_HAS_KEYS(sce) && !(ads->filterflag & ADS_FILTER_NOSCE)); + worOk= ((sce->world) && ANIMDATA_HAS_KEYS(sce->world) && !(ads->filterflag & ADS_FILTER_NOWOR)); + } + } + else { + sceOk= (ANIMDATA_HAS_KEYS(sce)); + worOk= ((sce->world) && ANIMDATA_HAS_KEYS(sce->world)); + } + + /* check if not all bad (i.e. so there is something to show) */ + if ( !(!sceOk && !worOk) ) { + /* add scene data to the list of filtered channels */ + items += animdata_filter_dopesheet_scene(anim_data, ads, sce, filter_mode); + } + } + + /* loop over all bases in the scene */ for (base= sce->base.first; base; base= base->next) { /* check if there's an object (all the relevant checks are done in the ob-function) */ @@ -1049,16 +1214,6 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int /* only selected should be shown */ continue; } -#if 0 - if ((ads->filterflag & ADS_FILTER_NOARM) && (ob->type == OB_ARMATURE)) { - /* not showing armatures */ - continue; - } - if ((ads->filterflag & ADS_FILTER_NOOBJ) && (ob->type != OB_ARMATURE)) { - /* not showing objects that aren't armatures */ - continue; - } -#endif /* check filters for datatypes */ if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) { @@ -1066,7 +1221,7 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int keyOk= ((key) && ANIMDATA_HAS_DRIVERS(key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS)); } else { - actOk= (ANIMDATA_HAS_KEYS(ob) /*&& !(ads->filterflag & ADS_FILTER_NOACTS)*/); + actOk= ANIMDATA_HAS_KEYS(ob); keyOk= ((key) && ANIMDATA_HAS_KEYS(key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS)); } diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index ba478b9e8c4..ae0b8435635 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -65,17 +65,17 @@ int geticon_anim_blocktype(short blocktype) { switch (blocktype) { case ID_OB: - return ICON_OBJECT; + return ICON_OBJECT_DATA; case ID_PO: return ICON_POSE_HLT; case ID_KE: - return ICON_SHAPEKEY; + return ICON_SHAPEKEY_DATA; case ID_MA: return ICON_MATERIAL; case ID_WO: return ICON_WORLD; case ID_CU: - return ICON_CURVE; + return ICON_CURVE_DATA; case ID_CA: return ICON_CAMERA; case ID_LA: @@ -120,8 +120,16 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu) char *structname=NULL, *propname=NULL, *arrayname=NULL, arrayindbuf[16]; PropertyRNA *nameprop; - /* for now, name will consist of struct-name + property name + array index: - * i.e. Bone1.Location.X, or Object.Location.X + /* For now, name will consist of 3 parts: struct-name, property name, array index + * There are several options possible: + * 1) .. + * i.e. Bone1.Location.X, or Object.Location.X + * 2) () + * i.e. X Location (Bone1), or X Location (Object) + * + * Currently, option 2 is in use, to try and make it easier to quickly identify F-Curves (it does have + * problems with looking rather odd though). Option 1 is better in terms of revealing a consistent sense of + * hierarchy though, which isn't so clear with option 2. */ /* for structname, we use a custom name if one is available */ @@ -141,9 +149,14 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* Array Index - only if applicable */ if (RNA_property_array_length(&ptr, prop)) { // XXX the format of these is not final... we don't know how this will go yet - static char *vectoritem[4]= {".X", ".Y", ".Z", ".W"}; - static char *quatitem[4]= {".W", ".X", ".Y", ".Z"}; - static char *coloritem[4]= {".R", ".G", ".B", ".A"}; + // format 1 style + //static char *vectoritem[4]= {".X", ".Y", ".Z", ".W"}; + //static char *quatitem[4]= {".W", ".X", ".Y", ".Z"}; + //static char *coloritem[4]= {".R", ".G", ".B", ".A"}; + // format 2 style + static char *vectoritem[4]= {"X ", "Y ", "Z ", "W "}; + static char *quatitem[4]= {"W ", "X ", "Y ", "Z "}; + static char *coloritem[4]= {"R ", "G ", "B ", "A "}; int tot= RNA_property_array_length(&ptr, prop); int propsubtype= RNA_property_subtype(&ptr, prop); @@ -167,8 +180,9 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu) } /* putting this all together into the buffer */ - // XXX we need to check for invalid names... - BLI_snprintf(name, 128, "%s.%s%s", structname, propname, arrayname); + // XXX we need to check for invalid names... + //BLI_snprintf(name, 128, "%s.%s%s", structname, propname, arrayname); // format 1 + BLI_snprintf(name, 128, "%s%s (%s)", arrayname, propname, structname); // format 2 /* free temp name if nameprop is set */ if (nameprop) @@ -183,7 +197,9 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* ------------------------------- Color Codes for F-Curve Channels ---------------------------- */ -unsigned int ipo_rainbow(int cur, int tot) +/* used for FCURVE_COLOR_AUTO_RAINBOW */ +// XXX this still doesn't work too great when there are more than 32 curves (which happens most of the time) +void ipo_rainbow (int cur, int tot, float *out) { float dfac, fac, sat; @@ -198,5 +214,6 @@ unsigned int ipo_rainbow(int cur, int tot) if(fac>0.5f && fac<0.8f) sat= 0.5f; else sat= 0.6f; - return hsv_to_cpack(fac, sat, 1.0f); + //return hsv_to_cpack(fac, sat, 1.0f); + hsv_to_rgb(fac, sat, 1.0f, out, out+1, out+2); } diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 5aa0d50bdbf..b51fa223eb3 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -380,6 +380,11 @@ void ED_operatortypes_anim(void) // XXX this is used all over... maybe for screen instead? WM_operatortype_append(ANIM_OT_insert_keyframe); WM_operatortype_append(ANIM_OT_delete_keyframe); + WM_operatortype_append(ANIM_OT_insert_keyframe_old); + WM_operatortype_append(ANIM_OT_delete_keyframe_old); + + WM_operatortype_append(ANIM_OT_keyingset_add_new); + WM_operatortype_append(ANIM_OT_keyingset_add_destination); } void ED_keymap_anim(wmWindowManager *wm) diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 9d7913ec2af..1727ec17182 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -63,6 +63,7 @@ #include "DNA_userdef_types.h" #include "DNA_gpencil_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_world_types.h" #include "BKE_action.h" #include "BKE_depsgraph.h" @@ -331,6 +332,18 @@ static void draw_keylist(gla2DDrawInfo *di, ListBase *keys, ListBase *blocks, fl /* *************************** Channel Drawing Funcs *************************** */ +void draw_scene_channel(gla2DDrawInfo *di, ActKeysInc *aki, Scene *sce, float ypos) +{ + ListBase keys = {0, 0}; + ListBase blocks = {0, 0}; + + scene_to_keylist(sce, &keys, &blocks, aki); + draw_keylist(di, &keys, &blocks, ypos); + + BLI_freelistN(&keys); + BLI_freelistN(&blocks); +} + void draw_object_channel(gla2DDrawInfo *di, ActKeysInc *aki, Object *ob, float ypos) { ListBase keys = {0, 0}; @@ -390,9 +403,44 @@ void draw_gpl_channel(gla2DDrawInfo *di, ActKeysInc *aki, bGPDlayer *gpl, float /* *************************** Keyframe List Conversions *************************** */ +void scene_to_keylist(Scene *sce, ListBase *keys, ListBase *blocks, ActKeysInc *aki) +{ + if (sce) { + bDopeSheet *ads= (aki)? (aki->ads) : NULL; + AnimData *adt; + int filterflag; + + /* get filterflag */ + if (ads) + filterflag= ads->filterflag; + else if ((aki) && (aki->actmode == -1)) /* only set like this by NLA */ + filterflag= ADS_FILTER_NLADUMMY; + else + filterflag= 0; + + /* scene animdata */ + if ((sce->adt) && !(filterflag & ADS_FILTER_NOSCE)) { + adt= sce->adt; + + // TODO: when we adapt NLA system, this needs to be the NLA-scaled version + if (adt->action) + action_to_keylist(adt->action, keys, blocks, aki); + } + + /* world animdata */ + if ((sce->world) && (sce->world->adt) && !(filterflag & ADS_FILTER_NOWOR)) { + adt= sce->world->adt; + + // TODO: when we adapt NLA system, this needs to be the NLA-scaled version + if (adt->action) + action_to_keylist(adt->action, keys, blocks, aki); + } + } +} + void ob_to_keylist(Object *ob, ListBase *keys, ListBase *blocks, ActKeysInc *aki) { -// Key *key= ob_get_key(ob); + Key *key= ob_get_key(ob); if (ob) { bDopeSheet *ads= (aki)? (aki->ads) : NULL; @@ -407,14 +455,15 @@ void ob_to_keylist(Object *ob, ListBase *keys, ListBase *blocks, ActKeysInc *aki filterflag= 0; /* Add action keyframes */ - if ((ob->adt && ob->adt->action) /*&& !(filterflag & ADS_FILTER_NOACTS)*/) + if (ob->adt && ob->adt->action) action_nlascaled_to_keylist(ob, ob->adt->action, keys, blocks, aki); -#if 0 // XXX old animation system /* Add shapekey keyframes (only if dopesheet allows, if it is available) */ - if ((key && key->ipo) && !(filterflag & ADS_FILTER_NOSHAPEKEYS)) - ipo_to_keylist(key->ipo, keys, blocks, aki); + // TODO: when we adapt NLA system, this needs to be the NLA-scaled version + if ((key && key->adt && key->adt->action) && !(filterflag & ADS_FILTER_NOSHAPEKEYS)) + action_to_keylist(key->adt->action, keys, blocks, aki); +#if 0 // XXX old animation system /* Add material keyframes (only if dopesheet allows, if it is available) */ if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) { short a; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 157609ed640..9529eb84011 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -27,6 +27,7 @@ #include "BKE_animsys.h" #include "BKE_action.h" +#include "BKE_constraint.h" #include "BKE_fcurve.h" #include "BKE_utildefines.h" #include "BKE_context.h" @@ -119,10 +120,6 @@ FCurve *verify_fcurve (ID *id, const char group[], const char rna_path[], const fcu->rna_path= BLI_strdupn(rna_path, strlen(rna_path)); fcu->array_index= array_index; - /* set additional flags */ - // TODO: need to set the FCURVE_INT_VALUES flag must be set if property is not float! - - /* if a group name has been provided, try to add or find a group, then add F-Curve to it */ if (group) { /* try to find group */ @@ -531,36 +528,49 @@ enum { */ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) { - //Object *ob= NULL; bConstraint *con= NULL; short searchtype= VISUALKEY_NONE; + char *identifier= NULL; -#if 0 // XXX old animation system /* validate data */ - if ((id == NULL) || (GS(id->name)!=ID_OB) || !(ELEM(blocktype, ID_OB, ID_PO))) - return 0; - - /* get first constraint and determine type of keyframe constraints to check for*/ - ob= (Object *)id; - - if (blocktype == ID_OB) { + // TODO: this check is probably not needed, but it won't hurt + if (ELEM3(NULL, ptr, ptr->data, prop)) + return 0; + + /* get first constraint and determine type of keyframe constraints to check for + * - constraints can be on either Objects or PoseChannels, so we only check if the + * ptr->type is RNA_Object or RNA_PoseChannel, which are the RNA wrapping-info for + * those structs, allowing us to identify the owner of the data + */ + if (ptr->type == &RNA_Object) { + /* Object */ + Object *ob= (Object *)ptr->data; + con= ob->constraints.first; - - if (ELEM3(adrcode, OB_LOC_X, OB_LOC_Y, OB_LOC_Z)) - searchtype= VISUALKEY_LOC; - else if (ELEM3(adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) - searchtype= VISUALKEY_ROT; + identifier= (char *)RNA_property_identifier(ptr, prop); } - else if (blocktype == ID_PO) { - bPoseChannel *pchan= get_pose_channel(ob->pose, actname); + else if (ptr->type == &RNA_PoseChannel) { + /* Pose Channel */ + bPoseChannel *pchan= (bPoseChannel *)ptr->data; + con= pchan->constraints.first; - - if (ELEM3(adrcode, AC_LOC_X, AC_LOC_Y, AC_LOC_Z)) - searchtype= VISUALKEY_LOC; - else if (ELEM4(adrcode, AC_QUAT_W, AC_QUAT_X, AC_QUAT_Y, AC_QUAT_Z)) - searchtype= VISUALKEY_ROT; + identifier= (char *)RNA_property_identifier(ptr, prop); } -#endif + + /* check if any data to search using */ + if (ELEM(NULL, con, identifier)) + return 0; + + /* location or rotation identifiers only... */ + if (strstr(identifier, "location")) + searchtype= VISUALKEY_LOC; + else if (strstr(identifier, "rotation")) + searchtype= VISUALKEY_ROT; + else { + printf("visualkey_can_use() failed: identifier - '%s' \n", identifier); + return 0; + } + /* only search if a searchtype and initial constraint are available */ if (searchtype && con) { @@ -621,52 +631,40 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) * In the event that it is not possible to perform visual keying, try to fall-back * to using the default method. Assumes that all data it has been passed is valid. */ -// xxx... ptr here should be struct that data is in.... prop is the channel that's being used static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_index) { -#if 0 // XXX old animation system - Object *ob; - void *poin = NULL; - int index, vartype; + char *identifier= (char *)RNA_property_identifier(ptr, prop); - /* validate situtation */ - if ((id==NULL) || (GS(id->name)!=ID_OB) || (ELEM(blocktype, ID_OB, ID_PO)==0)) - return 0.0f; + /* handle for Objects or PoseChannels only + * - constraints can be on either Objects or PoseChannels, so we only check if the + * ptr->type is RNA_Object or RNA_PoseChannel, which are the RNA wrapping-info for + * those structs, allowing us to identify the owner of the data + * - assume that array_index will be sane + */ + if (ptr->type == &RNA_Object) { + Object *ob= (Object *)ptr->data; - /* get object */ - ob= (Object *)id; - - /* only valid for objects or posechannels */ - if (blocktype == ID_OB) { /* parented objects are not supported, as the effects of the parent * are included in the matrix, which kindof beats the point */ if (ob->parent == NULL) { /* only Location or Rotation keyframes are supported now */ - if (ELEM3(adrcode, OB_LOC_X, OB_LOC_Y, OB_LOC_Z)) { - /* assumes that OB_LOC_Z > OB_LOC_Y > OB_LOC_X */ - index= adrcode - OB_LOC_X; - - return ob->obmat[3][index]; + if (strstr(identifier, "location")) { + return ob->obmat[3][array_index]; } - else if (ELEM3(adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) { + else if (strstr(identifier, "rotation")) { float eul[3]; - /* assumes that OB_ROT_Z > OB_ROT_Y > OB_ROT_X */ - index= adrcode - OB_ROT_X; - Mat4ToEul(ob->obmat, eul); - return eul[index]*(5.72958f); + return eul[array_index]*(5.72958f); } } } - else if (blocktype == ID_PO) { - bPoseChannel *pchan; + else if (ptr->type == &RNA_PoseChannel) { + Object *ob= (Object *)ptr->id.data; /* we assume that this is always set, and is an object */ + bPoseChannel *pchan= (bPoseChannel *)ptr->data; float tmat[4][4]; - /* get data to use */ - pchan= get_pose_channel(ob->pose, actname); - /* Although it is not strictly required for this particular space conversion, * arg1 must not be null, as there is a null check for the other conversions to * be safe. Therefore, the active object is passed here, and in many cases, this @@ -676,29 +674,29 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_ constraint_mat_convertspace(ob, pchan, tmat, CONSTRAINT_SPACE_POSE, CONSTRAINT_SPACE_LOCAL); /* Loc, Rot/Quat keyframes are supported... */ - if (ELEM3(adrcode, AC_LOC_X, AC_LOC_Y, AC_LOC_Z)) { - /* assumes that AC_LOC_Z > AC_LOC_Y > AC_LOC_X */ - index= adrcode - AC_LOC_X; - + if (strstr(identifier, "location")) { /* only use for non-connected bones */ if ((pchan->bone->parent) && !(pchan->bone->flag & BONE_CONNECTED)) - return tmat[3][index]; + return tmat[3][array_index]; else if (pchan->bone->parent == NULL) - return tmat[3][index]; + return tmat[3][array_index]; } - else if (ELEM4(adrcode, AC_QUAT_W, AC_QUAT_X, AC_QUAT_Y, AC_QUAT_Z)) { - float trimat[3][3], quat[4]; + else if (strstr(identifier, "euler_rotation")) { + float eul[3]; - /* assumes that AC_QUAT_Z > AC_QUAT_Y > AC_QUAT_X > AC_QUAT_W */ - index= adrcode - AC_QUAT_W; + /* euler-rotation test before standard rotation, as standard rotation does quats */ + Mat4ToEul(tmat, eul); + return eul[array_index]; + } + else if (strstr(identifier, "rotation")) { + float trimat[3][3], quat[4]; Mat3CpyMat4(trimat, tmat); Mat3ToQuat_is_ok(trimat, quat); - return quat[index]; + return quat[array_index]; } } -#endif // XXX old animation system /* as the function hasn't returned yet, read value from system in the default way */ return setting_get_rna_value(ptr, prop, array_index); @@ -722,8 +720,8 @@ short insertkey (ID *id, const char group[], const char rna_path[], int array_in /* validate pointer first - exit if failure*/ RNA_id_pointer_create(id, &id_ptr); - if (RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0) { - printf("Insert Key: Could not insert keyframe, as RNA Path is invalid for the given ID \n"); + if (RNA_path_resolve(&id_ptr, rna_path, &ptr, &prop) == 0 || prop == NULL) { + printf("Insert Key: Could not insert keyframe, as RNA Path is invalid for the given ID (%s)\n", rna_path); return 0; } @@ -734,6 +732,10 @@ short insertkey (ID *id, const char group[], const char rna_path[], int array_in if (fcu) { float curval= 0.0f; + /* set additional flags for the F-Curve (i.e. only integer values) */ + if (RNA_property_type(&ptr, prop) != PROP_FLOAT) + fcu->flag |= FCURVE_INT_VALUES; + /* apply special time tweaking */ // XXX check on this stuff... if (GS(id->name) == ID_OB) { @@ -821,7 +823,7 @@ short deletekey (ID *id, const char group[], const char rna_path[], int array_in * Note: here is one of the places where we don't want new Action + F-Curve added! * so 'add' var must be 0 */ - // XXX we don't check the validity of the path here yet, but it should be ok... + /* we don't check the validity of the path here yet, but it should be ok... */ fcu= verify_fcurve(id, group, rna_path, array_index, 0); adt= BKE_animdata_from_id(id); @@ -868,14 +870,140 @@ short deletekey (ID *id, const char group[], const char rna_path[], int array_in } /* ******************************************* */ -/* KEYFRAME MODIFICATION */ +/* KEYINGSETS */ -/* mode for common_modifykey */ -enum { - COMMONKEY_MODE_INSERT = 0, - COMMONKEY_MODE_DELETE, -} eCommonModifyKey_Modes; +/* Operators ------------------------------------------- */ +/* These operators are only provided for scripting/macro usage, not for direct + * calling from the UI since they wrap some of the data-access API code for these + * (defined in blenkernel) which have quite a few properties. + */ + +/* ----- */ + +static int keyingset_add_destination_exec (bContext *C, wmOperator *op) +{ + PointerRNA ptr; + KeyingSet *ks= NULL; + ID *id= NULL; + char rna_path[256], group_name[64]; // xxx + short groupmode=0, flag=0; + int array_index=0; + + /* get settings from operator properties */ + ptr = RNA_pointer_get(op->ptr, "keyingset"); + if (ptr.data) + ks= (KeyingSet *)ptr.data; + + ptr = RNA_pointer_get(op->ptr, "id"); + if (ptr.data) + id= (ID *)ptr.data; + + groupmode= RNA_enum_get(op->ptr, "grouping_method"); + RNA_string_get(op->ptr, "group_name", group_name); + + RNA_string_get(op->ptr, "rna_path", rna_path); + array_index= RNA_int_get(op->ptr, "array_index"); + + if (RNA_boolean_get(op->ptr, "entire_array")) + flag |= KSP_FLAG_WHOLE_ARRAY; + + /* if enough args are provided, call API method */ + if (ks) { + BKE_keyingset_add_destination(ks, id, group_name, rna_path, array_index, flag, groupmode); + return OPERATOR_FINISHED; + } + else { + BKE_report(op->reports, RPT_ERROR, "Keying Set could not be added."); + return OPERATOR_CANCELLED; + } +} + +void ANIM_OT_keyingset_add_destination (wmOperatorType *ot) +{ + // XXX: this is also defined in rna_animation.c + static EnumPropertyItem prop_mode_grouping_items[] = { + {KSP_GROUP_NAMED, "NAMED", "Named Group", ""}, + {KSP_GROUP_NONE, "NONE", "None", ""}, + {KSP_GROUP_KSNAME, "KEYINGSET", "Keying Set Name", ""}, + {0, NULL, NULL, NULL}}; + + /* identifiers */ + ot->name= "Add Keying Set Destination"; + ot->idname= "ANIM_OT_keyingset_add_destination"; + + /* callbacks */ + ot->exec= keyingset_add_destination_exec; + ot->poll= ED_operator_scene_editable; + + /* props */ + /* pointers */ // xxx - do we want to directly expose these? + RNA_def_pointer_runtime(ot->srna, "keyingset", &RNA_KeyingSet, "Keying Set", "Keying Set to add destination to."); + RNA_def_pointer_runtime(ot->srna, "id", &RNA_ID, "ID", "ID-block for the destination."); + /* grouping */ + RNA_def_enum(ot->srna, "grouping_method", prop_mode_grouping_items, KSP_GROUP_NAMED, "Grouping Method", "Method used to define which Group-name to use."); + RNA_def_string(ot->srna, "group_name", "", 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name)."); + /* rna-path */ + RNA_def_string(ot->srna, "rna_path", "", 256, "RNA-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough + RNA_def_int(ot->srna, "array_index", 0, 0, INT_MAX, "Array Index", "If applicable, the index ", 0, INT_MAX); + /* flags */ + RNA_def_boolean(ot->srna, "entire_array", 1, "Entire Array", "hen an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used."); + +} + +/* ----- */ + +static int keyingset_add_new_exec (bContext *C, wmOperator *op) +{ + Scene *sce= CTX_data_scene(C); + KeyingSet *ks= NULL; + short flag=0, keyingflag=0; + char name[64]; + + /* get settings from operator properties */ + RNA_string_get(op->ptr, "name", name); + + if (RNA_boolean_get(op->ptr, "absolute")) + flag |= KEYINGSET_ABSOLUTE; + if (RNA_boolean_get(op->ptr, "insertkey_needed")) + keyingflag |= INSERTKEY_NEEDED; + if (RNA_boolean_get(op->ptr, "insertkey_visual")) + keyingflag |= INSERTKEY_MATRIX; + + /* call the API func, and set the active keyingset index */ + ks= BKE_keyingset_add(&sce->keyingsets, name, flag, keyingflag); + + if (ks) { + sce->active_keyingset= BLI_countlist(&sce->keyingsets); + return OPERATOR_FINISHED; + } + else { + BKE_report(op->reports, RPT_ERROR, "Keying Set could not be added."); + return OPERATOR_CANCELLED; + } +} + +void ANIM_OT_keyingset_add_new (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Keying Set"; + ot->idname= "ANIM_OT_keyingset_add_new"; + + /* callbacks */ + ot->exec= keyingset_add_new_exec; + ot->poll= ED_operator_scene_editable; + + /* props */ + /* name */ + RNA_def_string(ot->srna, "name", "KeyingSet", 64, "Name", "Name of Keying Set"); + /* flags */ + RNA_def_boolean(ot->srna, "absolute", 1, "Absolute", "Keying Set defines specifc paths/settings to be keyframed (i.e. is not reliant on context info)"); + /* keying flags */ + RNA_def_boolean(ot->srna, "insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves."); + RNA_def_boolean(ot->srna, "insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'."); +} + +/* UI API --------------------------------------------- */ /* Build menu-string of available keying-sets (allocates memory for string) * NOTE: mode must not be longer than 64 chars @@ -916,6 +1044,17 @@ char *ANIM_build_keyingsets_menu (ListBase *list, short for_edit) return str; } + + +/* ******************************************* */ +/* KEYFRAME MODIFICATION */ + +/* mode for common_modifykey */ +enum { + COMMONKEY_MODE_INSERT = 0, + COMMONKEY_MODE_DELETE, +} eCommonModifyKey_Modes; + #if 0 // XXX old keyingsets code based on adrcodes... to be restored in due course /* --------- KeyingSet Adrcode Getters ------------ */ @@ -2006,7 +2145,7 @@ void common_modifykey (bContext *C, short mode) static int commonkey_modifykey (ListBase *dsources, KeyingSet *ks, short mode, float cfra) { KS_Path *ksp; - int kflag, success= 0; + int kflag=0, success= 0; char *groupname= NULL; /* get flags to use */ @@ -2031,9 +2170,9 @@ static int commonkey_modifykey (ListBase *dsources, KeyingSet *ks, short mode, f int arraylen, i; /* get pointer to name of group to add channels to */ - if (ksp->flag & KSP_FLAG_GROUP_NONE) + if (ksp->groupmode == KSP_GROUP_NONE) groupname= NULL; - else if (ksp->flag & KSP_FLAG_GROUP_KSNAME) + else if (ksp->groupmode == KSP_GROUP_KSNAME) groupname= ks->name; else groupname= ksp->group; @@ -2050,7 +2189,7 @@ static int commonkey_modifykey (ListBase *dsources, KeyingSet *ks, short mode, f PropertyRNA *prop; RNA_id_pointer_create(ksp->id, &id_ptr); - if (RNA_path_resolve(&id_ptr, ksp->rna_path, &ptr, &prop)) + if (RNA_path_resolve(&id_ptr, ksp->rna_path, &ptr, &prop) && prop) arraylen= RNA_property_array_length(&ptr, prop); } @@ -2087,6 +2226,121 @@ static int commonkey_modifykey (ListBase *dsources, KeyingSet *ks, short mode, f /* Insert Key Operator ------------------------ */ +/* NOTE: + * This is one of the 'simpler new-style' Insert Keyframe operators which relies on Keying Sets. + * For now, these are absolute Keying Sets only, so there is very little context info involved. + * + * -- Joshua Leung, Feb 2009 + */ + +static int insert_key_exec (bContext *C, wmOperator *op) +{ + ListBase dsources = {NULL, NULL}; + Scene *scene= CTX_data_scene(C); + KeyingSet *ks= NULL; + float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap + short success; + + /* try to get KeyingSet */ + if (scene->active_keyingset > 0) + ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); + /* report failure */ + if (ks == NULL) { + BKE_report(op->reports, RPT_ERROR, "No active Keying Set"); + return OPERATOR_CANCELLED; + } + + /* try to insert keyframes for the channels specified by KeyingSet */ + success= commonkey_modifykey(&dsources, ks, COMMONKEY_MODE_INSERT, cfra); + printf("KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success); + + /* report failure? */ + if (success == 0) + BKE_report(op->reports, RPT_WARNING, "Keying Set failed to insert any keyframes"); + + /* send updates */ + ED_anim_dag_flush_update(C); + + /* for now, only send ND_KEYS for KeyingSets */ + WM_event_add_notifier(C, ND_KEYS, NULL); + + return OPERATOR_FINISHED; +} + +void ANIM_OT_insert_keyframe (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Insert Keyframe"; + ot->idname= "ANIM_OT_insert_keyframe"; + + /* callbacks */ + ot->exec= insert_key_exec; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/* Delete Key Operator ------------------------ */ + +/* NOTE: + * This is one of the 'simpler new-style' Insert Keyframe operators which relies on Keying Sets. + * For now, these are absolute Keying Sets only, so there is very little context info involved. + * + * -- Joshua Leung, Feb 2009 + */ + +static int delete_key_exec (bContext *C, wmOperator *op) +{ + ListBase dsources = {NULL, NULL}; + Scene *scene= CTX_data_scene(C); + KeyingSet *ks= NULL; + float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap + short success; + + /* try to get KeyingSet */ + if (scene->active_keyingset > 0) + ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); + /* report failure */ + if (ks == NULL) { + BKE_report(op->reports, RPT_ERROR, "No active Keying Set"); + return OPERATOR_CANCELLED; + } + + /* try to insert keyframes for the channels specified by KeyingSet */ + success= commonkey_modifykey(&dsources, ks, COMMONKEY_MODE_DELETE, cfra); + printf("KeyingSet '%s' - Successfully removed %d Keyframes \n", ks->name, success); + + /* report failure? */ + if (success == 0) + BKE_report(op->reports, RPT_WARNING, "Keying Set failed to remove any keyframes"); + + /* send updates */ + ED_anim_dag_flush_update(C); + + /* for now, only send ND_KEYS for KeyingSets */ + WM_event_add_notifier(C, ND_KEYS, NULL); + + return OPERATOR_FINISHED; +} + +void ANIM_OT_delete_keyframe (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Delete Keyframe"; + ot->idname= "ANIM_OT_delete_keyframe"; + + /* callbacks */ + ot->exec= delete_key_exec; + + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/* Insert Key Operator ------------------------ */ + /* XXX WARNING: * This is currently just a basic operator, which work in 3d-view context on objects/bones only * and will insert keyframes for a few settings only. This is until it becomes clear how @@ -2109,7 +2363,7 @@ EnumPropertyItem prop_insertkey_types[] = { {0, NULL, NULL, NULL} }; -static int insert_key_invoke (bContext *C, wmOperator *op, wmEvent *event) +static int insert_key_old_invoke (bContext *C, wmOperator *op, wmEvent *event) { Object *ob= CTX_data_active_object(C); uiMenuItem *head; @@ -2120,21 +2374,21 @@ static int insert_key_invoke (bContext *C, wmOperator *op, wmEvent *event) head= uiPupMenuBegin("Insert Keyframe", 0); /* active keyingset */ - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe", "type", 0); + uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 0); /* selective inclusion */ if ((ob->pose) && (ob->flag & OB_POSEMODE)) { /* bone types */ - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe", "type", 5); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe", "type", 6); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe", "type", 7); + uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 5); + uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 6); + uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 7); } else { /* object types */ - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe", "type", 1); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe", "type", 2); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe", "type", 3); - uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe", "type", 4); + uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 1); + uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 2); + uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 3); + uiMenuItemEnumO(head, "", 0, "ANIM_OT_insert_keyframe_old", "type", 4); } uiPupMenuEnd(C, head); @@ -2142,7 +2396,7 @@ static int insert_key_invoke (bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_CANCELLED; } -static int insert_key_exec (bContext *C, wmOperator *op) +static int insert_key_old_exec (bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); short mode= RNA_enum_get(op->ptr, "type"); @@ -2167,13 +2421,9 @@ static int insert_key_exec (bContext *C, wmOperator *op) success= commonkey_modifykey(&dsources, ks, COMMONKEY_MODE_INSERT, cfra); printf("KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success); - /* report failure */ - if (success == 0) { - BKE_report(op->reports, RPT_WARNING, "Keying Set failed to insert any keyframes"); - return OPERATOR_CANCELLED; // XXX? - } - else - return OPERATOR_FINISHED; + /* report failure? */ + if (success == 0) + BKE_report(op->reports, RPT_WARNING, "Keying Set failed to insert any keyframes"); } else { // more comprehensive tests will be needed @@ -2265,7 +2515,9 @@ static int insert_key_exec (bContext *C, wmOperator *op) /* send updates */ ED_anim_dag_flush_update(C); - if (mode == 4) // material color requires different notifiers + if (mode == 0) /* for now, only send ND_KEYS for KeyingSets */ + WM_event_add_notifier(C, ND_KEYS, NULL); + else if (mode == 4) /* material color requires different notifiers */ WM_event_add_notifier(C, NC_MATERIAL|ND_KEYS, NULL); else WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, NULL); @@ -2273,17 +2525,17 @@ static int insert_key_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_insert_keyframe (wmOperatorType *ot) +void ANIM_OT_insert_keyframe_old (wmOperatorType *ot) { PropertyRNA *prop; /* identifiers */ ot->name= "Insert Keyframe"; - ot->idname= "ANIM_OT_insert_keyframe"; + ot->idname= "ANIM_OT_insert_keyframe_old"; /* callbacks */ - ot->invoke= insert_key_invoke; - ot->exec= insert_key_exec; + ot->invoke= insert_key_old_invoke; + ot->exec= insert_key_old_exec; ot->poll= ED_operator_areaactive; /* flags */ @@ -2302,7 +2554,7 @@ void ANIM_OT_insert_keyframe (wmOperatorType *ot) * -- Joshua Leung, Jan 2009 */ -static int delete_key_exec (bContext *C, wmOperator *op) +static int delete_key_old_exec (bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap @@ -2341,15 +2593,15 @@ static int delete_key_exec (bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_delete_keyframe (wmOperatorType *ot) +void ANIM_OT_delete_keyframe_old (wmOperatorType *ot) { /* identifiers */ ot->name= "Delete Keyframe"; - ot->idname= "ANIM_OT_delete_keyframe"; + ot->idname= "ANIM_OT_delete_keyframe_old"; /* callbacks */ ot->invoke= WM_operator_confirm; // XXX we will need our own one eventually, to cope with the dynamic menus... - ot->exec= delete_key_exec; + ot->exec= delete_key_old_exec; ot->poll= ED_operator_areaactive; diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h index 9aacec7e44b..6ca92f35644 100644 --- a/source/blender/editors/armature/armature_intern.h +++ b/source/blender/editors/armature/armature_intern.h @@ -32,7 +32,7 @@ struct wmOperatorType; /* editarmature.c */ - +void ARMATURE_OT_bone_primitive_add(struct wmOperatorType *ot); void ARMATURE_OT_align_bones(struct wmOperatorType *ot); void ARMATURE_OT_calculate_roll(struct wmOperatorType *ot); void ARMATURE_OT_switch_direction(struct wmOperatorType *ot); @@ -43,6 +43,8 @@ void ARMATURE_OT_parent_set(struct wmOperatorType *ot); void ARMATURE_OT_parent_clear(struct wmOperatorType *ot); void ARMATURE_OT_de_select_all(struct wmOperatorType *ot); void ARMATURE_OT_selection_invert(struct wmOperatorType *ot); +void ARMATURE_OT_select_hierarchy(struct wmOperatorType *ot); +void ARMATURE_OT_select_connected(struct wmOperatorType *ot); void POSE_OT_hide(struct wmOperatorType *ot); void POSE_OT_reveal(struct wmOperatorType *ot); @@ -52,6 +54,8 @@ void POSE_OT_scale_clear(struct wmOperatorType *ot); void POSE_OT_de_select_all(struct wmOperatorType *ot); void POSE_OT_selection_invert(struct wmOperatorType *ot); void POSE_OT_select_parent(struct wmOperatorType *ot); +void POSE_OT_select_hierarchy(struct wmOperatorType *ot); +void POSE_OT_select_connected(struct wmOperatorType *ot); #endif /* ED_ARMATURE_INTERN_H */ diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index a8502aefcff..12554c8492f 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -108,6 +108,8 @@ void ARMATURE_OT_test(wmOperatorType *ot) void ED_operatortypes_armature(void) { /* EDIT ARMATURE */ + WM_operatortype_append(ARMATURE_OT_bone_primitive_add); + WM_operatortype_append(ARMATURE_OT_align_bones); WM_operatortype_append(ARMATURE_OT_calculate_roll); WM_operatortype_append(ARMATURE_OT_switch_direction); @@ -120,6 +122,8 @@ void ED_operatortypes_armature(void) WM_operatortype_append(ARMATURE_OT_de_select_all); WM_operatortype_append(ARMATURE_OT_selection_invert); + WM_operatortype_append(ARMATURE_OT_select_hierarchy); + WM_operatortype_append(ARMATURE_OT_select_connected); /* POSE */ WM_operatortype_append(POSE_OT_hide); @@ -133,6 +137,8 @@ void ED_operatortypes_armature(void) WM_operatortype_append(POSE_OT_selection_invert); WM_operatortype_append(POSE_OT_select_parent); + WM_operatortype_append(POSE_OT_select_hierarchy); + WM_operatortype_append(POSE_OT_select_connected); WM_operatortype_append(ARMATURE_OT_test); // XXX temp test for context iterators... to be removed } @@ -152,7 +158,8 @@ void ED_keymap_armature(wmWindowManager *wm) WM_keymap_add_item(keymap, "ARMATURE_OT_switch_direction", FKEY, KM_PRESS, KM_ALT, 0); - /* only menu is registered in keymaps for now */ + WM_keymap_add_item(keymap, "ARMATURE_OT_bone_primitive_add", AKEY, KM_PRESS, KM_SHIFT, 0); + /* only the menu-version of subdivide is registered in keymaps for now */ WM_keymap_add_item(keymap, "ARMATURE_OT_subdivs", SKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_set_parent", PKEY, KM_PRESS, KM_CTRL, 0); @@ -162,6 +169,22 @@ void ED_keymap_armature(wmWindowManager *wm) WM_keymap_add_item(keymap, "ARMATURE_OT_selection_invert", IKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_test", TKEY, KM_PRESS, 0, 0); // XXX temp test for context iterators... to be removed + + kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "add_to_sel", 0); + kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "add_to_sel", 1); + + kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "add_to_sel", 0); + kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "add_to_sel", 1); + + WM_keymap_add_item(keymap, "ARMATURE_OT_select_connected", LKEY, KM_PRESS, 0, 0); /* Pose ------------------------ */ /* only set in posemode, by space_view3d listener */ @@ -169,7 +192,7 @@ void ED_keymap_armature(wmWindowManager *wm) WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0); kmi= WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "invert", 1); + RNA_boolean_set(kmi->ptr, "unselected", 1); WM_keymap_add_item(keymap, "POSE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); /*clear pose*/ WM_keymap_add_item(keymap, "POSE_OT_rot_clear", RKEY, KM_PRESS, KM_ALT, 0); @@ -180,5 +203,21 @@ void ED_keymap_armature(wmWindowManager *wm) WM_keymap_add_item(keymap, "POSE_OT_selection_invert", IKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0); + + kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "add_to_sel", 0); + kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); + RNA_boolean_set(kmi->ptr, "add_to_sel", 1); + + kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "add_to_sel", 0); + kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); + RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); + RNA_boolean_set(kmi->ptr, "add_to_sel", 1); + + WM_keymap_add_item(keymap, "POSE_OT_select_connected", LKEY, KM_PRESS, 0, 0); } diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 15f8bcf9e29..3d8753d3ade 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -1137,7 +1137,8 @@ static void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int * /* used by posemode as well editmode */ /* only checks scene->basact! */ -static void *get_nearest_bone (bContext *C, short findunsel) +/* x and y are mouse coords (area space) */ +static void *get_nearest_bone (bContext *C, short findunsel, int x, int y) { ViewContext vc; rcti rect; @@ -1147,6 +1148,8 @@ static void *get_nearest_bone (bContext *C, short findunsel) view3d_set_viewcontext(C, &vc); // rect.xmin= ... mouseco! + rect.xmin= rect.xmax= x; + rect.ymin= rect.ymax= y; glInitNames(); hits= view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect); @@ -1201,60 +1204,6 @@ static EditBone *editbone_get_child(bArmature *arm, EditBone *pabone, short use_ return chbone; } -void armature_select_hierarchy(Scene *scene, short direction, short add_to_sel) -{ - Object *obedit= scene->obedit; // XXX get from context - Object *ob; - bArmature *arm; - EditBone *curbone, *pabone, *chbone; - - if (!obedit) return; - else ob= obedit; - arm= (bArmature *)ob->data; - - for (curbone= arm->edbo->first; curbone; curbone= curbone->next) { - if (EBONE_VISIBLE(arm, curbone)) { - if (curbone->flag & (BONE_ACTIVE)) { - if (direction == BONE_SELECT_PARENT) { - if (curbone->parent == NULL) continue; - else pabone = curbone->parent; - - if (EBONE_VISIBLE(arm, pabone)) { - pabone->flag |= (BONE_ACTIVE|BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); - if (pabone->parent) pabone->parent->flag |= BONE_TIPSEL; - - if (!add_to_sel) curbone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); - curbone->flag &= ~BONE_ACTIVE; - break; - } - - } - else { // BONE_SELECT_CHILD - chbone = editbone_get_child(arm, curbone, 1); - if (chbone == NULL) continue; - - if (EBONE_VISIBLE(arm, chbone)) { - chbone->flag |= (BONE_ACTIVE|BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); - - if (!add_to_sel) { - curbone->flag &= ~(BONE_SELECTED|BONE_ROOTSEL); - if (curbone->parent) curbone->parent->flag &= ~BONE_TIPSEL; - } - curbone->flag &= ~BONE_ACTIVE; - break; - } - } - } - } - } - - armature_sync_selection(arm->edbo); - - if (direction==BONE_SELECT_PARENT) - BIF_undo_push("Select edit bone parent"); - if (direction==BONE_SELECT_CHILD) - BIF_undo_push("Select edit bone child"); -} /* used by posemode and editmode */ void setflag_armature (Scene *scene, short mode) @@ -1347,19 +1296,29 @@ static void selectconnected_posebonechildren (Object *ob, Bone *bone) } /* within active object context */ -void selectconnected_posearmature(bContext *C) -{ +/* previously known as "selectconnected_posearmature" */ +static int pose_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + Bone *bone, *curBone, *next= NULL; + int shift= 0; // XXX in pose mode, Shift+L is bound to another command + // named "PoseLib Add Current Pose" + int x, y; + ARegion *ar; Object *ob= CTX_data_edit_object(C); - Bone *bone, *curBone, *next; - int shift= 0; // XXX + ar= CTX_wm_region(C); + + x= event->x - ar->winrct.xmin; + y= event->y - ar->winrct.ymin; + + view3d_operator_needs_opengl(C); if (shift) - bone= get_nearest_bone(C, 0); + bone= get_nearest_bone(C, 0, x, y); else - bone = get_nearest_bone(C, 1); + bone= get_nearest_bone(C, 1, x, y); if (!bone) - return; + return OPERATOR_CANCELLED; /* Select parents */ for (curBone=bone; curBone; curBone=next){ @@ -1381,31 +1340,58 @@ void selectconnected_posearmature(bContext *C) selectconnected_posebonechildren (ob, curBone); } - // XXX this only counted the number of pose channels selected + // XXX this only counted the number of pose channels selected //countall(); // flushes selection! + WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob); - BIF_undo_push("Select connected"); + return OPERATOR_FINISHED; +} +void POSE_OT_select_connected(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Select Connected"; + ot->idname= "POSE_OT_select_connected"; + + /* api callbacks */ + ot->exec= NULL; + ot->invoke= pose_select_connected_invoke; + ot->poll= ED_operator_posemode; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* props */ } /* **************** END Posemode stuff ********************** */ /* **************** EditMode stuff ********************** */ /* called in space.c */ -void selectconnected_armature(bContext *C) +/* previously "selectconnected_armature" */ +static int armature_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *event) { - Object *obedit= CTX_data_edit_object(C); - bArmature *arm= obedit->data; + bArmature *arm; EditBone *bone, *curBone, *next; int shift= 0; // XXX + int x, y; + ARegion *ar; + Object *obedit= CTX_data_edit_object(C); + arm= obedit->data; + ar= CTX_wm_region(C); + + x= event->x - ar->winrct.xmin; + y= event->y - ar->winrct.ymin; + + view3d_operator_needs_opengl(C); if (shift) - bone= get_nearest_bone(C, 0); + bone= get_nearest_bone(C, 0, x, y); else - bone= get_nearest_bone(C, 1); + bone= get_nearest_bone(C, 1, x, y); if (!bone) - return; + return OPERATOR_CANCELLED; /* Select parents */ for (curBone=bone; curBone; curBone=next){ @@ -1448,8 +1434,28 @@ void selectconnected_armature(bContext *C) armature_sync_selection(arm->edbo); - BIF_undo_push("Select connected"); + /* BIF_undo_push("Select connected"); */ + WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit); + + return OPERATOR_FINISHED; +} + +void ARMATURE_OT_select_connected(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Select Connected"; + ot->idname= "ARMATURE_OT_select_connected"; + + /* api callbacks */ + ot->exec= NULL; + ot->invoke= armature_select_connected_invoke; + ot->poll= ED_operator_editarmature; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* props */ } /* does bones and points */ @@ -3031,6 +3037,68 @@ void extrude_armature(Scene *scene, int forked) // Transform(); } +/* ********************** Bone Add ********************/ + +/*op makes a new bone and returns it with its tip selected */ + +static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) +{ + RegionView3D *rv3d= CTX_wm_region_view3d(C); + Object *obedit = CTX_data_edit_object(C); + EditBone *bone; + float obmat[3][3], curs[3], viewmat[3][3], totmat[3][3], imat[3][3]; + char name[32]; + + RNA_string_get(op->ptr, "name", name); + + VECCOPY(curs, give_cursor(CTX_data_scene(C),CTX_wm_view3d(C))); + + /* Get inverse point for head and orientation for tail */ + Mat4Invert(obedit->imat, obedit->obmat); + Mat4MulVecfl(obedit->imat, curs); + + if (U.flag & USER_ADD_VIEWALIGNED) + Mat3CpyMat4(obmat, rv3d->viewmat); + else Mat3One(obmat); + + Mat3CpyMat4(viewmat, obedit->obmat); + Mat3MulMat3(totmat, obmat, viewmat); + Mat3Inv(imat, totmat); + + deselectall_armature(obedit, 0, 0); + + /* Create a bone */ + bone= add_editbone(obedit, name); + + VECCOPY(bone->head, curs); + + if(U.flag & USER_ADD_VIEWALIGNED) + VecAddf(bone->tail, bone->head, imat[1]); // bone with unit length 1 + else + VecAddf(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z + + WM_event_add_notifier(C, NC_OBJECT, obedit); + + return OPERATOR_FINISHED; +} + +void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Bone"; + ot->idname= "ARMATURE_OT_bone_primitive_add"; + + /* api callbacks */ + ot->exec = armature_bone_primitive_add_exec; + ot->poll = ED_operator_editarmature; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_string(ot->srna, "name", "Bone", 32, "Name", "Name of the newly created bone"); + +} + /* ----------- */ @@ -3514,20 +3582,14 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot) static int armature_selection_invert_exec(bContext *C, wmOperator *op) { - Object *obedit = CTX_data_edit_object(C); - bArmature *arm= obedit->data; - EditBone *ebone; - /* Set the flags */ - for (ebone=arm->edbo->first;ebone;ebone=ebone->next) { + CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) { /* select bone */ - if(arm->layer & ebone->layer && (ebone->flag & BONE_HIDDEN_A)==0) { - ebone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); - ebone->flag &= ~BONE_ACTIVE; - } - } - - /* undo? */ + ebone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + ebone->flag &= ~BONE_ACTIVE; + } + CTX_DATA_END; + WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL); return OPERATOR_FINISHED; @@ -3550,9 +3612,6 @@ void ARMATURE_OT_selection_invert(wmOperatorType *ot) } static int armature_de_select_all_exec(bContext *C, wmOperator *op) { - Object *obedit = CTX_data_edit_object(C); - bArmature *arm= obedit->data; - EditBone *ebone; int sel=1; /* Determine if there are any selected bones @@ -3560,22 +3619,20 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op) if (CTX_DATA_COUNT(C, selected_bones) > 0) sel=0; /* Set the flags */ - for (ebone=arm->edbo->first;ebone;ebone=ebone->next) { + CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) { if (sel==1) { /* select bone */ - if(arm->layer & ebone->layer && (ebone->flag & BONE_HIDDEN_A)==0) { - ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); - if(ebone->parent) - ebone->parent->flag |= (BONE_TIPSEL); - } + ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + if(ebone->parent) + ebone->parent->flag |= (BONE_TIPSEL); } else { /* deselect bone */ ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL | BONE_ACTIVE); } - } - - /* undo? */ + } + CTX_DATA_END; + WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL); return OPERATOR_FINISHED; @@ -3596,6 +3653,89 @@ void ARMATURE_OT_de_select_all(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } + +/* ********************* select hierarchy operator ************** */ + +static int armature_select_hierarchy_exec(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + Object *ob; + bArmature *arm; + EditBone *curbone, *pabone, *chbone; + int direction = RNA_enum_get(op->ptr, "direction"); + int add_to_sel = RNA_boolean_get(op->ptr, "add_to_sel"); + + ob= obedit; + arm= (bArmature *)ob->data; + + for (curbone= arm->edbo->first; curbone; curbone= curbone->next) { + if (EBONE_VISIBLE(arm, curbone)) { + if (curbone->flag & (BONE_ACTIVE)) { + if (direction == BONE_SELECT_PARENT) { + if (curbone->parent == NULL) continue; + else pabone = curbone->parent; + + if (EBONE_VISIBLE(arm, pabone)) { + pabone->flag |= (BONE_ACTIVE|BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); + if (pabone->parent) pabone->parent->flag |= BONE_TIPSEL; + + if (!add_to_sel) curbone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); + curbone->flag &= ~BONE_ACTIVE; + break; + } + + } + else { // BONE_SELECT_CHILD + chbone = editbone_get_child(arm, curbone, 1); + if (chbone == NULL) continue; + + if (EBONE_VISIBLE(arm, chbone)) { + chbone->flag |= (BONE_ACTIVE|BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); + + if (!add_to_sel) { + curbone->flag &= ~(BONE_SELECTED|BONE_ROOTSEL); + if (curbone->parent) curbone->parent->flag &= ~BONE_TIPSEL; + } + curbone->flag &= ~BONE_ACTIVE; + break; + } + } + } + } + } + + armature_sync_selection(arm->edbo); + + WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob); + + return OPERATOR_FINISHED; +} + +void ARMATURE_OT_select_hierarchy(wmOperatorType *ot) +{ + static EnumPropertyItem direction_items[]= { + {BONE_SELECT_PARENT, "PARENT", "Select Parent", ""}, + {BONE_SELECT_CHILD, "CHILD", "Select Child", ""}, + {0, NULL, NULL, NULL} + }; + + /* identifiers */ + ot->name= "Select Hierarchy"; + ot->idname= "ARMATURE_OT_select_hierarchy"; + + /* api callbacks */ + ot->exec= armature_select_hierarchy_exec; + ot->poll= ED_operator_editarmature; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* props */ + RNA_def_enum(ot->srna, "direction", direction_items, + BONE_SELECT_PARENT, "Direction", ""); + RNA_def_boolean(ot->srna, "add_to_sel", 0, "Add to Selection", ""); +} + /* ***************** EditBone Alignment ********************* */ /* helper to fix a ebone position if its parent has moved due to alignment*/ @@ -4421,18 +4561,14 @@ void POSE_OT_rot_clear(wmOperatorType *ot) static int pose_selection_invert_exec(bContext *C, wmOperator *op) { - Object *ob= CTX_data_active_object(C); - bArmature *arm= ob->data; - bPoseChannel *pchan; /* Set the flags */ - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - if ((pchan->bone->layer & arm->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) { - pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); - pchan->bone->flag &= ~BONE_ACTIVE; - } + CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pchans) { + pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); + pchan->bone->flag &= ~BONE_ACTIVE; } - + CTX_DATA_END; + WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL); return OPERATOR_FINISHED; @@ -4455,9 +4591,6 @@ void POSE_OT_selection_invert(wmOperatorType *ot) } static int pose_de_select_all_exec(bContext *C, wmOperator *op) { - Object *ob= CTX_data_active_object(C); - bArmature *arm= ob->data; - bPoseChannel *pchan; int sel=1; /* Determine if there are any selected bones @@ -4465,12 +4598,12 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op) if (CTX_DATA_COUNT(C, selected_pchans) > 0) sel=0; /* Set the flags */ - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - if ((pchan->bone->layer & arm->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) { - if (sel==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE); - else pchan->bone->flag |= BONE_SELECTED; - } - } + CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pchans) { + /* select pchan */ + if (sel==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE); + else pchan->bone->flag |= BONE_SELECTED; + } + CTX_DATA_END; WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL); @@ -4534,6 +4667,7 @@ void POSE_OT_select_parent(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } + /* ************* hide/unhide pose bones ******************* */ static int hide_selected_pose_bone(Object *ob, Bone *bone, void *ptr) @@ -4569,7 +4703,7 @@ static int pose_hide_exec(bContext *C, wmOperator *op) Object *ob= CTX_data_active_object(C); bArmature *arm= ob->data; - if(RNA_boolean_get(op->ptr, "invert")) + if(RNA_boolean_get(op->ptr, "unselected")) bone_looper(ob, arm->bonebase.first, NULL, hide_unselected_pose_bone); else @@ -4585,7 +4719,7 @@ static int pose_hide_exec(bContext *C, wmOperator *op) void POSE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selection"; + ot->name= "Hide Selected"; ot->idname= "POSE_OT_hide"; /* api callbacks */ @@ -4596,7 +4730,7 @@ void POSE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); + RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", ""); } static int show_pose_bone(Object *ob, Bone *bone, void *ptr) @@ -4630,7 +4764,7 @@ static int pose_reveal_exec(bContext *C, wmOperator *op) void POSE_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveil Selection"; + ot->name= "Reveal Selected"; ot->idname= "POSE_OT_reveal"; /* api callbacks */ @@ -4639,9 +4773,6 @@ void POSE_OT_reveal(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - - /* props */ - RNA_def_boolean(ot->srna, "invert", 0, "Invert", ""); } /* ************* RENAMING DISASTERS ************ */ diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 66d1776961f..8e6f118118a 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -1203,7 +1203,7 @@ static void poselib_preview_cleanup (Scene *scene, tPoseLib_PreviewData *pld) DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* updates */ - if (IS_AUTOKEY_MODE(NORMAL)) { + if (IS_AUTOKEY_MODE(scene, NORMAL)) { remake_action_ipos(ob->action); } diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index ea0b492486e..b951829d9d1 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -78,6 +78,7 @@ #include "ED_keyframing.h" #include "ED_object.h" #include "ED_mesh.h" +#include "ED_screen.h" #include "ED_view3d.h" #include "armature_intern.h" @@ -127,7 +128,7 @@ void ED_armature_enter_posemode(bContext *C, Base *base) ob->flag |= OB_POSEMODE; base->flag= ob->flag; - WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_POSEMODE, NULL); + WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_POSE, NULL); break; default: @@ -442,17 +443,16 @@ void pose_select_constraint_target(Scene *scene) } -void pose_select_hierarchy(Scene *scene, short direction, short add_to_sel) +/* ******************* select hierarchy operator ************* */ + +static int pose_select_hierarchy_exec(bContext *C, wmOperator *op) { - Object *obedit= scene->obedit; // XXX context - Object *ob= OBACT; + Object *ob= CTX_data_active_object(C); bArmature *arm= ob->data; bPoseChannel *pchan; Bone *curbone, *pabone, *chbone; - - /* paranoia checks */ - if (!ob && !ob->pose) return; - if (ob==obedit || (ob->flag & OB_POSEMODE)==0) return; + int direction = RNA_enum_get(op->ptr, "direction"); + int add_to_sel = RNA_boolean_get(op->ptr, "add_to_sel"); for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { curbone= pchan->bone; @@ -491,11 +491,36 @@ void pose_select_hierarchy(Scene *scene, short direction, short add_to_sel) } } } + + WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob); + + return OPERATOR_FINISHED; +} + +void POSE_OT_select_hierarchy(wmOperatorType *ot) +{ + static EnumPropertyItem direction_items[]= { + {BONE_SELECT_PARENT, "PARENT", "Select Parent", ""}, + {BONE_SELECT_CHILD, "CHILD", "Select Child", ""}, + {0, NULL, NULL, NULL} + }; + + /* identifiers */ + ot->name= "Select Hierarchy"; + ot->idname= "POSE_OT_select_hierarchy"; + + /* api callbacks */ + ot->exec= pose_select_hierarchy_exec; + ot->poll= ED_operator_posemode; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* props */ + RNA_def_enum(ot->srna, "direction", direction_items, + BONE_SELECT_PARENT, "Direction", ""); + RNA_def_boolean(ot->srna, "add_to_sel", 0, "Add to Selection", ""); - if (direction==BONE_SELECT_PARENT) - BIF_undo_push("Select pose bone parent"); - if (direction==BONE_SELECT_CHILD) - BIF_undo_push("Select pose bone child"); } @@ -893,7 +918,7 @@ void paste_posebuf (Scene *scene, int flip) /* Update event for pose and deformation children */ DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - if (IS_AUTOKEY_ON) { + if (IS_AUTOKEY_ON(scene)) { // XXX remake_action_ipos(ob->action); } else { diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h index cced4720cec..68223633011 100644 --- a/source/blender/editors/curve/curve_intern.h +++ b/source/blender/editors/curve/curve_intern.h @@ -36,29 +36,57 @@ struct wmOperatorType; char *ED_lorem; /* editfont.c */ -void FONT_OT_textedit(struct wmOperatorType *ot); +enum { DEL_ALL, DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_SELECTION, DEL_NEXT_SEL, DEL_PREV_SEL }; +enum { CASE_LOWER, CASE_UPPER }; +enum { LINE_BEGIN, LINE_END, PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD, + PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE }; + +void FONT_OT_insert_text(struct wmOperatorType *ot); +void FONT_OT_line_break(struct wmOperatorType *ot); +void FONT_OT_insert_lorem(struct wmOperatorType *ot); +void FONT_OT_text_to_object(struct wmOperatorType *ot); + +void FONT_OT_toggle_case(struct wmOperatorType *ot); +void FONT_OT_set_case(struct wmOperatorType *ot); +void FONT_OT_toggle_style(struct wmOperatorType *ot); +void FONT_OT_set_style(struct wmOperatorType *ot); +void FONT_OT_set_material(struct wmOperatorType *ot); + +void FONT_OT_copy_text(struct wmOperatorType *ot); +void FONT_OT_cut_text(struct wmOperatorType *ot); +void FONT_OT_paste_text(struct wmOperatorType *ot); +void FONT_OT_paste_file(struct wmOperatorType *ot); +void FONT_OT_paste_buffer(struct wmOperatorType *ot); + +void FONT_OT_move(struct wmOperatorType *ot); +void FONT_OT_move_select(struct wmOperatorType *ot); +void FONT_OT_delete(struct wmOperatorType *ot); + +void FONT_OT_change_character(struct wmOperatorType *ot); +void FONT_OT_change_spacing(struct wmOperatorType *ot); /* editcurve.c */ +void CURVE_OT_hide(struct wmOperatorType *ot); +void CURVE_OT_reveal(struct wmOperatorType *ot); + void CURVE_OT_separate(struct wmOperatorType *ot); -void CURVE_OT_switch_direction(struct wmOperatorType *ot); +void CURVE_OT_duplicate(struct wmOperatorType *ot); +void CURVE_OT_delete(struct wmOperatorType *ot); + void CURVE_OT_set_weight(struct wmOperatorType *ot); void CURVE_OT_set_radius(struct wmOperatorType *ot); +void CURVE_OT_set_spline_type(struct wmOperatorType *ot); +void CURVE_OT_set_handle_type(struct wmOperatorType *ot); +void CURVE_OT_set_smooth(struct wmOperatorType *ot); +void CURVE_OT_clear_tilt(struct wmOperatorType *ot); + void CURVE_OT_smooth(struct wmOperatorType *ot); void CURVE_OT_smooth_radius(struct wmOperatorType *ot); + void CURVE_OT_de_select_first(struct wmOperatorType *ot); void CURVE_OT_de_select_last(struct wmOperatorType *ot); void CURVE_OT_de_select_all(struct wmOperatorType *ot); -void CURVE_OT_hide(struct wmOperatorType *ot); -void CURVE_OT_reveal(struct wmOperatorType *ot); void CURVE_OT_select_inverse(struct wmOperatorType *ot); -void CURVE_OT_subdivide(struct wmOperatorType *ot); -void CURVE_OT_set_spline_type(struct wmOperatorType *ot); -void CURVE_OT_set_handle_type(struct wmOperatorType *ot); -void CURVE_OT_make_segment(struct wmOperatorType *ot); -void CURVE_OT_spin(struct wmOperatorType *ot); -void CURVE_OT_add_vertex(struct wmOperatorType *ot); -void CURVE_OT_extrude(struct wmOperatorType *ot); -void CURVE_OT_toggle_cyclic(struct wmOperatorType *ot); void CURVE_OT_select_linked(struct wmOperatorType *ot); void CURVE_OT_select_row(struct wmOperatorType *ot); void CURVE_OT_select_next(struct wmOperatorType *ot); @@ -67,16 +95,16 @@ void CURVE_OT_select_more(struct wmOperatorType *ot); void CURVE_OT_select_less(struct wmOperatorType *ot); void CURVE_OT_select_random(struct wmOperatorType *ot); void CURVE_OT_select_every_nth(struct wmOperatorType *ot); -void CURVE_OT_duplicate(struct wmOperatorType *ot); -void CURVE_OT_delete(struct wmOperatorType *ot); -void CURVE_OT_set_smooth(struct wmOperatorType *ot); -void CURVE_OT_clear_tilt(struct wmOperatorType *ot); -void CURVE_OT_add_surface_primitive(struct wmOperatorType *ot); -void CURVE_OT_add_curve_primitive(struct wmOperatorType *ot); + +void CURVE_OT_switch_direction(struct wmOperatorType *ot); +void CURVE_OT_subdivide(struct wmOperatorType *ot); +void CURVE_OT_make_segment(struct wmOperatorType *ot); +void CURVE_OT_spin(struct wmOperatorType *ot); +void CURVE_OT_add_vertex(struct wmOperatorType *ot); +void CURVE_OT_extrude(struct wmOperatorType *ot); +void CURVE_OT_toggle_cyclic(struct wmOperatorType *ot); void CURVE_OT_specials_menu(struct wmOperatorType *ot); -void CURVE_OT_add_menu(struct wmOperatorType *ot); - #endif /* ED_UTIL_INTERN_H */ diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index 30ddb226045..8989d8720eb 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -31,6 +31,7 @@ #include "MEM_guardedalloc.h" +#include "DNA_curve_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" @@ -91,37 +92,33 @@ void CURVE_OT_specials_menu(wmOperatorType *ot) ot->poll= ED_operator_editsurfcurve; } -static int add_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) -{ - Object *obedit= CTX_data_edit_object(C); - uiMenuItem *head; - - head= uiPupMenuBegin("Add", 0); - if(obedit->type == OB_CURVE) - uiMenuItemsEnumO(head, "CURVE_OT_add_curve_primitive", "type"); - else - uiMenuItemsEnumO(head, "CURVE_OT_add_surface_primitive", "type"); - uiPupMenuEnd(C, head); - - return OPERATOR_CANCELLED; -} - -void CURVE_OT_add_menu(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Add Menu"; - ot->idname= "CURVE_OT_add_menu"; - - /* api clastbacks */ - ot->invoke= add_menu_invoke; - ot->poll= ED_operator_editsurfcurve; -} - /************************* registration ****************************/ void ED_operatortypes_curve(void) { - WM_operatortype_append(FONT_OT_textedit); + WM_operatortype_append(FONT_OT_insert_text); + WM_operatortype_append(FONT_OT_line_break); + WM_operatortype_append(FONT_OT_insert_lorem); + WM_operatortype_append(FONT_OT_text_to_object); + + WM_operatortype_append(FONT_OT_toggle_case); + WM_operatortype_append(FONT_OT_set_case); + WM_operatortype_append(FONT_OT_toggle_style); + WM_operatortype_append(FONT_OT_set_style); + WM_operatortype_append(FONT_OT_set_material); + + WM_operatortype_append(FONT_OT_copy_text); + WM_operatortype_append(FONT_OT_cut_text); + WM_operatortype_append(FONT_OT_paste_text); + WM_operatortype_append(FONT_OT_paste_file); + WM_operatortype_append(FONT_OT_paste_buffer); + + WM_operatortype_append(FONT_OT_move); + WM_operatortype_append(FONT_OT_move_select); + WM_operatortype_append(FONT_OT_delete); + + WM_operatortype_append(FONT_OT_change_character); + WM_operatortype_append(FONT_OT_change_spacing); WM_operatortype_append(CURVE_OT_hide); WM_operatortype_append(CURVE_OT_reveal); @@ -161,11 +158,7 @@ void ED_operatortypes_curve(void) WM_operatortype_append(CURVE_OT_extrude); WM_operatortype_append(CURVE_OT_toggle_cyclic); - WM_operatortype_append(CURVE_OT_add_menu); WM_operatortype_append(CURVE_OT_specials_menu); - - WM_operatortype_append(CURVE_OT_add_surface_primitive); - WM_operatortype_append(CURVE_OT_add_curve_primitive); } void ED_keymap_curve(wmWindowManager *wm) @@ -173,7 +166,47 @@ void ED_keymap_curve(wmWindowManager *wm) ListBase *keymap= WM_keymap_listbase(wm, "Font", 0, 0); /* only set in editmode font, by space_view3d listener */ - WM_keymap_add_item(keymap, "FONT_OT_textedit", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_toggle_style", BKEY, KM_PRESS, KM_CTRL, 0)->ptr, "style", CU_BOLD); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_toggle_style", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "style", CU_ITALIC); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_toggle_style", UKEY, KM_PRESS, KM_CTRL, 0)->ptr, "style", CU_UNDERLINE); + + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_delete", DELKEY, KM_PRESS, 0, 0)->ptr, "type", DEL_NEXT_SEL); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_delete", BACKSPACEKEY, KM_PRESS, 0, 0)->ptr, "type", DEL_PREV_SEL); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_delete", BACKSPACEKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", DEL_ALL); + + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", HOMEKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_BEGIN); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", LEFTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_CHAR); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", RIGHTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_CHAR); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", PREV_WORD); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", NEXT_WORD); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_LINE); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_LINE); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", PAGEUPKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_PAGE); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move", PAGEDOWNKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_PAGE); + + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", HOMEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", LINE_BEGIN); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", ENDKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", LINE_END); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", PREV_CHAR); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", NEXT_CHAR); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "type", PREV_WORD); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "type", NEXT_WORD); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", UPARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", PREV_LINE); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", DOWNARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", NEXT_LINE); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", PAGEUPKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", PREV_PAGE); + RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_move_select", PAGEDOWNKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", NEXT_PAGE); + + RNA_int_set(WM_keymap_add_item(keymap, "FONT_OT_change_spacing", LEFTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "delta", -1); + RNA_int_set(WM_keymap_add_item(keymap, "FONT_OT_change_spacing", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "delta", 1); + RNA_int_set(WM_keymap_add_item(keymap, "FONT_OT_change_character", UPARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "delta", 1); + RNA_int_set(WM_keymap_add_item(keymap, "FONT_OT_change_character", DOWNARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "delta", -1); + + WM_keymap_add_item(keymap, "FONT_OT_copy_text", CKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "FONT_OT_cut_text", XKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "FONT_OT_paste_text", PKEY, KM_PRESS, KM_CTRL, 0); + + WM_keymap_add_item(keymap, "FONT_OT_line_break", RETKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FONT_OT_insert_text", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last! /* only set in editmode curve, by space_view3d listener */ keymap= WM_keymap_listbase(wm, "Curve", 0, 0); @@ -204,7 +237,7 @@ void ED_keymap_curve(wmWindowManager *wm) WM_keymap_add_item(keymap, "CURVE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT|KM_CTRL, 0); - RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "deselected", 1); + RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "unselected", 1); WM_keymap_add_item(keymap, "CURVE_OT_specials_menu", WKEY, KM_PRESS, 0, 0); } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 848bec89a39..830d36dcfd8 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1077,7 +1077,7 @@ void CURVE_OT_set_weight(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f); + RNA_def_float_percentage(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f); } /******************* set radius operator ******************/ @@ -1618,7 +1618,7 @@ static int hide_exec(bContext *C, wmOperator *op) Nurb *nu; BPoint *bp; BezTriple *bezt; - int a, sel, invert= RNA_boolean_get(op->ptr, "deselected"); + int a, sel, invert= RNA_boolean_get(op->ptr, "unselected"); for(nu= editnurb->first; nu; nu= nu->next) { if((nu->type & 7)==CU_BEZIER) { @@ -1668,7 +1668,7 @@ static int hide_exec(bContext *C, wmOperator *op) void CURVE_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selection"; + ot->name= "Hide Selected"; ot->idname= "CURVE_OT_hide"; /* api callbacks */ @@ -1679,7 +1679,7 @@ void CURVE_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "deselected", 0, "Deselected", "Hide deselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); } /********************** reveal operator *********************/ @@ -3258,16 +3258,15 @@ void CURVE_OT_spin(wmOperatorType *ot) /***************** add vertex operator **********************/ -static int addvert_Nurb(bContext *C, short mode) +static int addvert_Nurb(bContext *C, short mode, float location[3]) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); ListBase *editnurb= curve_get_editcurve(obedit); - View3D *v3d= CTX_wm_view3d(C); Nurb *nu; BezTriple *bezt, *newbezt = NULL; BPoint *bp, *newbp = NULL; - float *curs, mat[3][3],imat[3][3], temp[3]; + float mat[3][3],imat[3][3], temp[3]; Mat3CpyMat4(mat, obedit->obmat); Mat3Inv(imat,mat); @@ -3315,16 +3314,7 @@ static int addvert_Nurb(bContext *C, short mode) VECCOPY(newbezt->vec[2], bezt->vec[2]); } else { - if(v3d) { - curs= give_cursor(scene, v3d); - VECCOPY(newbezt->vec[1], curs); - } - else { - newbezt->vec[1][0]= 0.0f; - newbezt->vec[1][1]= 0.0f; - newbezt->vec[1][2]= 0.0f; - } - + VECCOPY(newbezt->vec[1], location); VecSubf(newbezt->vec[1],newbezt->vec[1], obedit->obmat[3]); Mat3MulVecfl(imat,newbezt->vec[1]); VecSubf(temp, newbezt->vec[1],temp); @@ -3370,16 +3360,7 @@ static int addvert_Nurb(bContext *C, short mode) VECCOPY(newbp->vec, bp->vec); } else { - if(v3d) { - curs= give_cursor(scene, v3d); - VECCOPY(newbp->vec, curs); - } - else { - newbp->vec[0]= 0.0f; - newbp->vec[1]= 0.0f; - newbp->vec[1]= 0.0f; - } - + VECCOPY(newbp->vec, location); VecSubf(newbp->vec, newbp->vec, obedit->obmat[3]); Mat3MulVecfl(imat,newbp->vec); newbp->vec[3]= 1.0; @@ -3399,14 +3380,30 @@ static int addvert_Nurb(bContext *C, short mode) static int add_vertex_exec(bContext *C, wmOperator *op) { - return addvert_Nurb(C, 0); + float location[3]; + + RNA_float_get_array(op->ptr, "location", location); + return addvert_Nurb(C, 0, location); } static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event) { - // XXX doesn't work correct, old code was in mouse_cursor - // temporarly setting cursor, adding vertex and restoring cursor - return add_vertex_exec(C, 0); + RegionView3D *rv3d= CTX_wm_region_view3d(C); + ViewContext vc; + float location[3]; + short mval[2]; + + if(rv3d && !RNA_property_is_set(op->ptr, "location")) { + view3d_set_viewcontext(C, &vc); + + mval[0]= event->x - vc.ar->winrct.xmin; + mval[1]= event->y - vc.ar->winrct.ymin; + + view3d_get_view_aligned_coordinate(&vc, location, mval); + RNA_float_set_array(op->ptr, "location", location); + } + + return add_vertex_exec(C, op); } void CURVE_OT_add_vertex(wmOperatorType *ot) @@ -3422,6 +3419,9 @@ void CURVE_OT_add_vertex(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location to add new vertex at.", -1e4, 1e4); } /***************** extrude operator **********************/ @@ -3439,7 +3439,7 @@ static int extrude_exec(bContext *C, wmOperator *op) break; if(obedit->type==OB_CURVE || nu) { - addvert_Nurb(C, 'e'); + addvert_Nurb(C, 'e', NULL); } else { if(extrudeflagNurb(editnurb, 1)) { /* '1'= flag */ @@ -4195,7 +4195,7 @@ void CURVE_OT_select_random(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of vertices to select randomly.", 0.0001f, 1.0f); + RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of vertices to select randomly.", 0.0001f, 1.0f); } /********************** select every nth *********************/ @@ -4722,9 +4722,9 @@ int join_curve(bContext *C, wmOperator *op, int type) return OPERATOR_FINISHED; } -/************ add primitive, internal + external ****************/ +/************ add primitive, used by object/ module ****************/ -Nurb *addNurbprim(bContext *C, int type, int newname) +Nurb *add_nurbs_primitive(bContext *C, int type, int newname) { static int xzproj= 0; /* this function calls itself... */ Scene *scene= CTX_data_scene(C); @@ -5022,7 +5022,7 @@ Nurb *addNurbprim(bContext *C, int type, int newname) rename_id((ID *)obedit->data, "SurfTube"); } - nu= addNurbprim(C, CU_NURBS|CU_2D|CU_PRIM_CIRCLE, 0); /* circle */ + nu= add_nurbs_primitive(C, CU_NURBS|CU_PRIM_CIRCLE, 0); /* circle */ nu->resolu= 4; nu->flag= CU_SMOOTH; BLI_addtail(editnurb, nu); /* temporal for extrude and translate */ @@ -5101,7 +5101,7 @@ Nurb *addNurbprim(bContext *C, int type, int newname) } xzproj= 1; - nu= addNurbprim(C, CU_NURBS|CU_2D|CU_PRIM_CIRCLE, 0); /* circle */ + nu= add_nurbs_primitive(C, CU_NURBS|CU_PRIM_CIRCLE, 0); /* circle */ xzproj= 0; nu->resolu= 4; nu->resolv= 4; @@ -5133,87 +5133,6 @@ Nurb *addNurbprim(bContext *C, int type, int newname) return nu; } -/***************** add curve primitive operator ********************/ - -static int add_curve_primitive_exec(bContext *C, wmOperator *op) -{ - Scene *scene= CTX_data_scene(C); - Object *obedit= CTX_data_edit_object(C); - - addNurbprim(C, RNA_enum_get(op->ptr, "type"), 0); - - DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - - return OPERATOR_FINISHED; -} - -void CURVE_OT_add_curve_primitive(wmOperatorType *ot) -{ - static EnumPropertyItem type_items[]= { - {CU_PRIM_CURVE|CU_2D|CU_BEZIER, "BEZIER_CURVE", "Bezier Curve", ""}, - {CU_PRIM_CIRCLE|CU_2D|CU_BEZIER, "BEZIER_CIRCLE", "Bezier Circle", ""}, - {CU_PRIM_CURVE|CU_2D|CU_NURBS, "NURBS_CURVE", "NURBS Curve", ""}, - {CU_PRIM_CIRCLE|CU_2D|CU_NURBS, "NURBS_CIRCLE", "NURBS Circle", ""}, - {CU_PRIM_PATH|CU_2D|CU_NURBS, "PATH", "Path", ""}, - {0, NULL, NULL, NULL}}; - - /* identifiers */ - ot->name= "Add Curve Primitive"; - ot->idname= "CURVE_OT_add_curve_primitive"; - - /* api callbacks */ - ot->exec= add_curve_primitive_exec; - ot->poll= ED_operator_editcurve; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - - /* properties */ - RNA_def_enum(ot->srna, "type", type_items, CU_PRIM_CURVE|CU_2D|CU_BEZIER, "Type", "Type of primitive to add."); -} - -/***************** add surface primitive operator ********************/ - -static int add_surface_primitive_exec(bContext *C, wmOperator *op) -{ - Scene *scene= CTX_data_scene(C); - Object *obedit= CTX_data_edit_object(C); - - addNurbprim(C, RNA_enum_get(op->ptr, "type"), 0); - - DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); - - return OPERATOR_FINISHED; -} - -void CURVE_OT_add_surface_primitive(wmOperatorType *ot) -{ - static EnumPropertyItem type_items[]= { - {CU_PRIM_CURVE|CU_NURBS, "NURBS_CURVE", "NURBS Curve", ""}, - {CU_PRIM_CIRCLE|CU_NURBS, "NURBS_CIRCLE", "NURBS Circle", ""}, - {CU_PRIM_PATCH|CU_NURBS, "NURBS_SURFACE", "NURBS Surface", ""}, - {CU_PRIM_TUBE|CU_NURBS, "NURBS_TUBE", "NURBS Tube", ""}, - {CU_PRIM_SPHERE|CU_NURBS, "NURBS_SPHERE", "NURBS Sphere", ""}, - {CU_PRIM_DONUT|CU_NURBS, "NURBS_DONUT", "NURBS Donut", ""}, - {0, NULL, NULL, NULL}}; - - /* identifiers */ - ot->name= "Add Surface Primitive"; - ot->idname= "CURVE_OT_add_surface_primitive"; - - /* api callbacks */ - ot->exec= add_surface_primitive_exec; - ot->poll= ED_operator_editsurf; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - - /* properties */ - RNA_def_enum(ot->srna, "type", type_items, CU_PRIM_CURVE|CU_NURBS, "Type", "Type of primitive to add."); -} - /***************** clear tilt operator ********************/ static int clear_tilt_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 431637f77c6..edc1f8aecae 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -53,29 +53,28 @@ #include "BKE_curve.h" #include "BKE_depsgraph.h" #include "BKE_font.h" -#include "BKE_object.h" #include "BKE_global.h" #include "BKE_main.h" +#include "BKE_object.h" +#include "BKE_report.h" #include "BKE_utildefines.h" +#include "RNA_access.h" +#include "RNA_define.h" + #include "WM_api.h" #include "WM_types.h" #include "ED_curve.h" #include "ED_object.h" +#include "ED_screen.h" #include "ED_util.h" #include "curve_intern.h" -/* XXX */ -static void error() {} -static int okee() {return 0;} -/* XXX */ - - #define MAXTEXT 32766 -int textediting=0; +/************************* utilities ******************************/ static char findaccent(char char1, unsigned int code) { @@ -231,7 +230,7 @@ static int insert_into_textbuf(Object *obedit, unsigned long c) { Curve *cu= obedit->data; - if (cu->lenleneditfont; int x; @@ -240,7 +239,7 @@ static int insert_into_textbuf(Object *obedit, unsigned long c) ef->textbuf[cu->pos]= c; ef->textbufinfo[cu->pos] = cu->curinfo; ef->textbufinfo[cu->pos].kern = 0; - if (obedit->actcol>0) + if(obedit->actcol>0) ef->textbufinfo[cu->pos].mat_nr = obedit->actcol; else ef->textbufinfo[cu->pos].mat_nr = 0; @@ -252,61 +251,119 @@ static int insert_into_textbuf(Object *obedit, unsigned long c) update_string(cu); return 1; - } else { - return 0; } + else + return 0; } -void add_lorem(Scene *scene) +static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int recalc, int mode) { - Object *obedit= scene->obedit; + Curve *cu= obedit->data; + EditFont *ef= cu->editfont; + + if(cu->pos) + cu->curinfo = ef->textbufinfo[cu->pos-1]; + else + cu->curinfo = ef->textbufinfo[0]; + + if(obedit->totcol>0) + obedit->actcol= ef->textbufinfo[cu->pos-1].mat_nr; + + update_string(cu); + BKE_text_to_curve(scene, obedit, mode); + + if(recalc) + DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); +} + +/********************** insert lorem operator *********************/ + +static int insert_lorem_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); char *p, *p2; int i; static char *lastlorem; - if (lastlorem) + if(lastlorem) p= lastlorem; else p= ED_lorem; i= rand()/(RAND_MAX/6)+4; - for (p2=p; *p2 && i; p2++) { + for(p2=p; *p2 && i; p2++) { insert_into_textbuf(obedit, *p2); - if (*p2=='.') i--; + + if(*p2=='.') + i--; } + lastlorem = p2+1; - if (strlen(lastlorem)<5) lastlorem = ED_lorem; + if(strlen(lastlorem)<5) + lastlorem = ED_lorem; insert_into_textbuf(obedit, '\n'); insert_into_textbuf(obedit, '\n'); - DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); + DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); + + return OPERATOR_FINISHED; } -void load_3dtext_fs(Scene *scene, char *file) +void FONT_OT_insert_lorem(wmOperatorType *ot) { - Curve *cu= scene->obedit->data; + /* identifiers */ + ot->name= "Insert Lorem"; + ot->idname= "FONT_OT_insert_lorem"; + + /* api callbacks */ + ot->exec= insert_lorem_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/******************* paste file operator ********************/ + +/* note this handles both ascii and utf8 unicode, previously + * there were 3 functions that did effectively the same thing. */ + +static int paste_file(bContext *C, ReportList *reports, char *filename) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; EditFont *ef= cu->editfont; FILE *fp; int filelen; char *strp; - fp= fopen(file, "r"); - if (!fp) return; + fp= fopen(filename, "r"); + + if(!fp) { + if(reports) + BKE_reportf(reports, RPT_ERROR, "Failed to open file %s.", filename); + return OPERATOR_CANCELLED; + } fseek(fp, 0L, SEEK_END); filelen = ftell(fp); - fseek(fp, 0L, SEEK_SET); + fseek(fp, 0L, SEEK_SET); - strp = MEM_callocN(filelen+4, "tempstr"); + strp= MEM_callocN(filelen+4, "tempstr"); + // fread() instead of read(), because windows read() converts text + // to DOS \r\n linebreaks, causing double linebreaks in the 3d text filelen = fread(strp, 1, filelen, fp); fclose(fp); strp[filelen]= 0; - - if(cu->len+filelenlen+filelenobedit, OB_RECALC_DATA); + return OPERATOR_FINISHED; } - -void txt_export_to_object(Scene *scene, struct Text *text) +static int paste_file_exec(bContext *C, wmOperator *op) +{ + char *filename; + int retval; + + filename= RNA_string_get_alloc(op->ptr, "filename", NULL, 0); + retval= paste_file(C, op->reports, filename); + MEM_freeN(filename); + + return retval; +} + +static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + if(RNA_property_is_set(op->ptr, "filename")) + return paste_file_exec(C, op); + + WM_event_add_fileselect(C, op); + + return OPERATOR_RUNNING_MODAL; +} + +void FONT_OT_paste_file(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Paste File"; + ot->idname= "FONT_OT_paste_file"; + + /* api callbacks */ + ot->exec= paste_file_exec; + ot->invoke= paste_file_invoke; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_string_file_path(ot->srna, "filename", "", 0, "Filename", "File path of text file to load."); +} + +/******************* paste buffer operator ********************/ + +static int paste_buffer_exec(bContext *C, wmOperator *op) +{ + char *filename; + +#ifdef WIN32 + filename= "C:\\windows\\temp\\cutbuf.txt"; + +// The following is more likely to work on all Win32 installations. +// suggested by Douglas Toltzman. Needs windows include files... +/* + char tempFileName[MAX_PATH]; + DWORD pathlen; + static const char cutbufname[]="cutbuf.txt"; + + if((pathlen=GetTempPath(sizeof(tempFileName),tempFileName)) > 0 && + pathlen + sizeof(cutbufname) <= sizeof(tempFileName)) + { + strcat(tempFileName,cutbufname); + filename= tempFilename; + } +*/ +#else + filename= "/tmp/.cutbuffer"; +#endif + + return paste_file(C, NULL, filename); +} + +void FONT_OT_paste_buffer(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Paste Buffer"; + ot->idname= "FONT_OT_paste_buffer"; + + /* api callbacks */ + ot->exec= paste_buffer_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/******************* XXX text to object operator ********************/ + +static void txt_export_to_object(Scene *scene, Object *obedit, Text *text) { - Object *obedit= scene->obedit; // XXX ID *id; Curve *cu; struct TextLine *tmp; @@ -337,7 +478,7 @@ void txt_export_to_object(Scene *scene, struct Text *text) id = (ID *)text; - if (obedit && obedit->type==OB_FONT) return; + if(obedit && obedit->type==OB_FONT) return; // XXX check_editmode(OB_FONT); add_object(scene, OB_FONT); @@ -351,7 +492,7 @@ void txt_export_to_object(Scene *scene, struct Text *text) /* // renames object, careful with long filenames. - if (text->name) { + if(text->name) { //ID *find_id(char *type, char *name) BLI_split_dirfile(text->name, sdir, sfile); // rename_id((ID *)obedit, sfile); @@ -394,14 +535,10 @@ void txt_export_to_object(Scene *scene, struct Text *text) make_editText(obedit); ED_object_exit_editmode(NULL, EM_FREEDATA|EM_WAITCURSOR); // XXX - } - -void txt_export_to_objects(struct Text *text) +static void txt_export_to_objects(Scene *scene, Object *obedit, Text *text) { - Scene *scene= NULL; // XXX - Object *obedit= NULL; // XXX RegionView3D *rv3d= NULL; // XXX ID *id; Curve *cu; @@ -414,7 +551,7 @@ void txt_export_to_objects(struct Text *text) id = (ID *)text; - if (obedit && obedit->type==OB_FONT) return; + if(obedit && obedit->type==OB_FONT) return; // XXX check_editmode(OB_FONT); curline = text->lines.first; @@ -473,27 +610,58 @@ void txt_export_to_objects(struct Text *text) } } +static int text_to_object_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + Text *text= NULL; /// XXX retrieve this .. + + if(RNA_boolean_get(op->ptr, "split_lines")) + txt_export_to_objects(scene, obedit, text); + else + txt_export_to_object(scene, obedit, text); + + return OPERATOR_FINISHED; +} + +void FONT_OT_text_to_object(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Text to Object"; + ot->idname= "FONT_OT_text_to_object"; + + /* api callbacks */ + ot->exec= text_to_object_exec; + ot->poll= ED_operator_editfont; // XXX not correct + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_boolean(ot->srna, "split_lines", 0, "Split Lines", "Create one object per line in the text."); +} + +/********************** utilities ***************************/ + static short next_word(Curve *cu) { short s; - for (s=cu->pos; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') && + for(s=cu->pos; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') && (cu->str[s]!=1) && (cu->str[s]!='\r'); s++); - if (cu->str[s]) return(s+1); else return(s); + if(cu->str[s]) return(s+1); else return(s); } static short prev_word(Curve *cu) { short s; - if (cu->pos==0) return(0); - for (s=cu->pos-2; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') && + if(cu->pos==0) return(0); + for(s=cu->pos-2; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') && (cu->str[s]!=1) && (cu->str[s]!='\r'); s--); - if (cu->str[s]) return(s+1); else return(s); + if(cu->str[s]) return(s+1); else return(s); } - - -static int killselection(Object *obedit, int ins) /* 1 == new character */ +static int kill_selection(Object *obedit, int ins) /* 1 == new character */ { Curve *cu= obedit->data; EditFont *ef= cu->editfont; @@ -502,30 +670,173 @@ static int killselection(Object *obedit, int ins) /* 1 == new character */ int getfrom; direction = BKE_font_getselection(obedit, &selstart, &selend); - if (direction) { + if(direction) { int size; - if (ins) offset = 1; - if (cu->pos >= selstart) cu->pos = selstart+offset; - if ((direction == -1) && ins) { + if(ins) offset = 1; + if(cu->pos >= selstart) cu->pos = selstart+offset; + if((direction == -1) && ins) { selstart++; selend++; } getfrom = selend+offset; - if (ins==0) getfrom++; + if(ins==0) getfrom++; size = (cu->len * sizeof(wchar_t)) - (selstart * sizeof(wchar_t)) + (offset*sizeof(wchar_t)); memmove(ef->textbuf+selstart, ef->textbuf+getfrom, size); memmove(ef->textbufinfo+selstart, ef->textbufinfo+getfrom, ((cu->len-selstart)+offset)*sizeof(CharInfo)); cu->len -= (selend-selstart)+offset; cu->selstart = cu->selend = 0; } + return(direction); } -static void copyselection(Object *obedit) +/******************* set style operator ********************/ + +static EnumPropertyItem style_items[]= { + {CU_BOLD, "BOLD", "Bold", ""}, + {CU_ITALIC, "ITALIC", "Italic", ""}, + {CU_UNDERLINE, "UNDERLINE", "Underline", ""}, + {0, NULL, NULL, NULL}}; + +static int set_style(bContext *C, int style, int clear) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; + EditFont *ef= cu->editfont; + int i, selstart, selend; + + if(!BKE_font_getselection(obedit, &selstart, &selend)) + return OPERATOR_CANCELLED; + + for(i=selstart; i<=selend; i++) { + if(clear) + ef->textbufinfo[i].flag &= ~style; + else + ef->textbufinfo[i].flag |= style; + } + + DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); + + return OPERATOR_FINISHED; +} + +static int set_style_exec(bContext *C, wmOperator *op) +{ + int style, clear; + + style= RNA_enum_get(op->ptr, "style"); + clear= RNA_enum_get(op->ptr, "clear"); + + return set_style(C, style, clear); +} + +void FONT_OT_set_style(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Set Style"; + ot->idname= "FONT_OT_set_style"; + + /* api callbacks */ + ot->exec= set_style_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_enum(ot->srna, "style", style_items, CU_BOLD, "Style", "Style to set selection to."); + RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear style rather than setting it."); +} + +/******************* toggle style operator ********************/ + +static int toggle_style_exec(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; + int style, clear, selstart, selend; + + if(!BKE_font_getselection(obedit, &selstart, &selend)) + return OPERATOR_CANCELLED; + + style= RNA_enum_get(op->ptr, "style"); + + cu->curinfo.flag ^= style; + clear= (cu->curinfo.flag & style) == 0; + + return set_style(C, style, clear); +} + +void FONT_OT_toggle_style(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Toggle Style"; + ot->idname= "FONT_OT_toggle_style"; + + /* api callbacks */ + ot->exec= toggle_style_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_enum(ot->srna, "style", style_items, CU_BOLD, "Style", "Style to set selection to."); +} + +/******************* set material operator ********************/ + +static int set_material_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; + EditFont *ef= cu->editfont; + int i, mat_nr, selstart, selend; + + if(!BKE_font_getselection(obedit, &selstart, &selend)) + return OPERATOR_CANCELLED; + + if(RNA_property_is_set(op->ptr, "index")) + mat_nr= RNA_int_get(op->ptr, "index"); + else + mat_nr= obedit->actcol; + + for(i=selstart; i<=selend; i++) + ef->textbufinfo[i].mat_nr = mat_nr; + + DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit); + + return OPERATOR_FINISHED; +} + +void FONT_OT_set_material(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Set Material"; + ot->idname= "FONT_OT_set_material"; + + /* api callbacks */ + ot->exec= set_material_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Material Index", "Material slot index.", 0, INT_MAX); +} + +/******************* copy text operator ********************/ + +static void copy_selection(Object *obedit) { int selstart, selend; - if (BKE_font_getselection(obedit, &selstart, &selend)) { + if(BKE_font_getselection(obedit, &selstart, &selend)) { Curve *cu= obedit->data; EditFont *ef= cu->editfont; @@ -535,17 +846,70 @@ static void copyselection(Object *obedit) } } -static void pasteselection(Object *obedit) +static int copy_text_exec(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + + copy_selection(obedit); + + return OPERATOR_FINISHED; +} + +void FONT_OT_copy_text(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Copy Text"; + ot->idname= "FONT_OT_copy_text"; + + /* api callbacks */ + ot->exec= copy_text_exec; + ot->poll= ED_operator_editfont; +} + +/******************* cut text operator ********************/ + +static int cut_text_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + int selstart, selend; + + if(!BKE_font_getselection(obedit, &selstart, &selend)) + return OPERATOR_CANCELLED; + + copy_selection(obedit); + kill_selection(obedit, 0); + + text_update_edited(C, scene, obedit, 1, 0); + + return OPERATOR_FINISHED; +} + +void FONT_OT_cut_text(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Cut Text"; + ot->idname= "FONT_OT_cut_text"; + + /* api callbacks */ + ot->exec= cut_text_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/******************* paste text operator ********************/ + +static int paste_selection(Object *obedit, ReportList *reports) { Curve *cu= obedit->data; EditFont *ef= cu->editfont; - int len= wcslen(ef->copybuf); // Verify that the copy buffer => [copy buffer len] + cu->len < MAXTEXT - if(cu->len + len <= MAXTEXT) - { - if (len) { + if(cu->len + len <= MAXTEXT) { + if(len) { int size = (cu->len * sizeof(wchar_t)) - (cu->pos*sizeof(wchar_t)) + sizeof(wchar_t); memmove(ef->textbuf+cu->pos+len, ef->textbuf+cu->pos, size); memcpy(ef->textbuf+cu->pos, ef->copybuf, len * sizeof(wchar_t)); @@ -555,68 +919,470 @@ static void pasteselection(Object *obedit) cu->len += len; cu->pos += len; + + return 1; } } else - { - error("Text too long"); - } -} - -int style_to_sel(Object *obedit, int style, int toggle) -{ - int selstart, selend; - int i; + BKE_report(reports, RPT_WARNING, "Text too long."); - if (obedit && (obedit->type == OB_FONT)) { - Curve *cu= obedit->data; - EditFont *ef= cu->editfont; - - if (BKE_font_getselection(obedit, &selstart, &selend)) { - for (i=selstart; i<=selend; i++) { - if (toggle==0) { - ef->textbufinfo[i].flag &= ~style; - } else { - ef->textbufinfo[i].flag |= style; - } - } - return 1; - } - } return 0; } -int mat_to_sel(Object *obedit) +static int paste_text_exec(bContext *C, wmOperator *op) { - int selstart, selend; - int i; - - if (obedit && (obedit->type == OB_FONT)) { - Curve *cu= obedit->data; - EditFont *ef= cu->editfont; - - if (BKE_font_getselection(obedit, &selstart, &selend)) { - for (i=selstart; i<=selend; i++) { - ef->textbufinfo[i].mat_nr = obedit->actcol; - } - return 1; - } - } - return 0; + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + + if(!paste_selection(obedit, op->reports)) + return OPERATOR_CANCELLED; + + text_update_edited(C, scene, obedit, 1, 0); + + return OPERATOR_FINISHED; } -static int do_textedit(bContext *C, wmOperator *op, wmEvent *evt) +void FONT_OT_paste_text(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Paste Text"; + ot->idname= "FONT_OT_paste_text"; + + /* api callbacks */ + ot->exec= paste_text_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ move operator ************************/ + +static EnumPropertyItem move_type_items[]= { + {LINE_BEGIN, "LINE_BEGIN", "Line Begin", ""}, + {LINE_END, "LINE_END", "Line End", ""}, + {PREV_CHAR, "PREVIOUS_CHARACTER", "Previous Character", ""}, + {NEXT_CHAR, "NEXT_CHARACTER", "Next Character", ""}, + {PREV_WORD, "PREVIOUS_WORD", "Previous Word", ""}, + {NEXT_WORD, "NEXT_WORD", "Next Word", ""}, + {PREV_LINE, "PREVIOUS_LINE", "Previous Line", ""}, + {NEXT_LINE, "NEXT_LINE", "Next Line", ""}, + {PREV_PAGE, "PREVIOUS_PAGE", "Previous Page", ""}, + {NEXT_PAGE, "NEXT_PAGE", "Next Page", ""}, + {0, NULL, NULL, NULL}}; + +static int move_cursor(bContext *C, int type, int select) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; + EditFont *ef= cu->editfont; + int cursmove= 0; + + switch(type) { + case LINE_BEGIN: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + while(cu->pos>0) { + if(ef->textbuf[cu->pos-1]=='\n') break; + if(ef->textbufinfo[cu->pos-1].flag & CU_WRAP ) break; + cu->pos--; + } + cursmove=FO_CURS; + break; + + case LINE_END: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + while(cu->poslen) { + if(ef->textbuf[cu->pos]==0) break; + if(ef->textbuf[cu->pos]=='\n') break; + if(ef->textbufinfo[cu->pos].flag & CU_WRAP ) break; + cu->pos++; + } + cursmove=FO_CURS; + break; + + case PREV_WORD: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + cu->pos= prev_word(cu); + cursmove= FO_CURS; + break; + + case NEXT_WORD: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + cu->pos= next_word(cu); + cursmove= FO_CURS; + break; + + case PREV_CHAR: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + cu->pos--; + cursmove=FO_CURS; + break; + + case NEXT_CHAR: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + cu->pos++; + cursmove= FO_CURS; + + break; + + case PREV_LINE: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + cursmove=FO_CURSUP; + break; + + case NEXT_LINE: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + cursmove= FO_CURSDOWN; + break; + + case PREV_PAGE: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + cursmove=FO_PAGEUP; + break; + + case NEXT_PAGE: + if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; + cursmove=FO_PAGEDOWN; + break; + } + + if(!cursmove) + return OPERATOR_CANCELLED; + + if(select == 0) { + if(cu->selstart) { + cu->selstart = cu->selend = 0; + update_string(cu); + BKE_text_to_curve(scene, obedit, FO_SELCHANGE); + } + } + + if(cu->pos>cu->len) cu->pos= cu->len; + else if(cu->pos>=MAXTEXT) cu->pos= MAXTEXT; + else if(cu->pos<0) cu->pos= 0; + + text_update_edited(C, scene, obedit, select, cursmove); + + if(select) + cu->selend = cu->pos; + + return OPERATOR_FINISHED; +} + +static int move_exec(bContext *C, wmOperator *op) +{ + int type= RNA_enum_get(op->ptr, "type"); + + return move_cursor(C, type, 0); +} + +void FONT_OT_move(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Move Cursor"; + ot->idname= "FONT_OT_move"; + + /* api callbacks */ + ot->exec= move_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to."); +} + +/******************* move select operator ********************/ + +static int move_select_exec(bContext *C, wmOperator *op) +{ + int type= RNA_enum_get(op->ptr, "type"); + + return move_cursor(C, type, 1); +} + +void FONT_OT_move_select(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Move Select"; + ot->idname= "FONT_OT_move_select"; + + /* api callbacks */ + ot->exec= move_select_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection."); +} + +/************************* change spacing **********************/ + +static int change_spacing_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; + EditFont *ef= cu->editfont; + int kern, delta= RNA_int_get(op->ptr, "delta"); + + kern = ef->textbufinfo[cu->pos-1].kern; + kern += delta; + CLAMP(kern, -20, 20); + + if(ef->textbufinfo[cu->pos-1].kern == kern) + return OPERATOR_CANCELLED; + + ef->textbufinfo[cu->pos-1].kern = kern; + + text_update_edited(C, scene, obedit, 1, 0); + + return OPERATOR_FINISHED; +} + +void FONT_OT_change_spacing(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Change Spacing"; + ot->idname= "FONT_OT_change_spacing"; + + /* api callbacks */ + ot->exec= change_spacing_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_int(ot->srna, "delta", 1, -20, 20, "Delta", "Amount to decrease or increasing character spacing with.", -20, 20); +} + +/************************* change character **********************/ + +static int change_character_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; + EditFont *ef= cu->editfont; + int character, delta= RNA_int_get(op->ptr, "delta"); + + if(cu->pos <= 0) + return OPERATOR_CANCELLED; + + character= ef->textbuf[cu->pos - 1]; + character += delta; + CLAMP(character, 0, 255); + + if(character == ef->textbuf[cu->pos - 1]) + return OPERATOR_CANCELLED; + + ef->textbuf[cu->pos - 1]= character; + + text_update_edited(C, scene, obedit, 1, 0); + + return OPERATOR_FINISHED; +} + +void FONT_OT_change_character(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Change Character"; + ot->idname= "FONT_OT_change_character"; + + /* api callbacks */ + ot->exec= change_character_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_int(ot->srna, "delta", 1, -255, 255, "Delta", "Number to increase or decrease character code with.", -255, 255); +} + +/******************* line break operator ********************/ + +static int line_break_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; + EditFont *ef= cu->editfont; + int ctrl= RNA_enum_get(op->ptr, "ctrl"); + + if(ctrl) { + insert_into_textbuf(obedit, 1); + if(ef->textbuf[cu->pos]!='\n') + insert_into_textbuf(obedit, '\n'); + } + else + insert_into_textbuf(obedit, '\n'); + + cu->selstart = cu->selend = 0; + + text_update_edited(C, scene, obedit, 1, 0); + + return OPERATOR_FINISHED; +} + +void FONT_OT_line_break(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Line Break"; + ot->idname= "FONT_OT_line_break"; + + /* api callbacks */ + ot->exec= line_break_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_boolean(ot->srna, "ctrl", 0, "Ctrl", ""); // XXX what is this? +} + +/******************* delete operator **********************/ + +static EnumPropertyItem delete_type_items[]= { + {DEL_ALL, "ALL", "All", ""}, + {DEL_NEXT_CHAR, "NEXT_CHARACTER", "Next Character", ""}, + {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", "Previous Character", ""}, + {DEL_SELECTION, "SELECTION", "Selection", ""}, + {DEL_NEXT_SEL, "NEXT_OR_SELECTION", "Next or Selection", ""}, + {DEL_PREV_SEL, "PREVIOUS_OR_SELECTION", "Previous or Selection", ""}, + {0, NULL, NULL, NULL}}; + +static int delete_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; + EditFont *ef= cu->editfont; + int x, selstart, selend, type= RNA_enum_get(op->ptr, "type"); + + if(cu->len == 0) + return OPERATOR_CANCELLED; + + if(BKE_font_getselection(obedit, &selstart, &selend)) { + if(type == DEL_NEXT_SEL) type= DEL_SELECTION; + else if(type == DEL_PREV_SEL) type= DEL_SELECTION; + } + else { + if(type == DEL_NEXT_SEL) type= DEL_NEXT_CHAR; + else if(type == DEL_PREV_SEL) type= DEL_PREV_CHAR; + } + + switch(type) { + case DEL_ALL: + cu->len = cu->pos = 0; + ef->textbuf[0]= 0; + break; + case DEL_SELECTION: + if(!kill_selection(obedit, 0)) + return OPERATOR_CANCELLED; + break; + case DEL_PREV_CHAR: + if(cu->pos<=0) + return OPERATOR_CANCELLED; + + for(x=cu->pos;x<=cu->len;x++) + ef->textbuf[x-1]= ef->textbuf[x]; + for(x=cu->pos;x<=cu->len;x++) + ef->textbufinfo[x-1]= ef->textbufinfo[x]; + + cu->pos--; + ef->textbuf[--cu->len]='\0'; + break; + case DEL_NEXT_CHAR: + if(cu->pos>=cu->len) + return OPERATOR_CANCELLED; + + for(x=cu->pos;xlen;x++) + ef->textbuf[x]= ef->textbuf[x+1]; + for(x=cu->pos;xlen;x++) + ef->textbufinfo[x]= ef->textbufinfo[x+1]; + + ef->textbuf[--cu->len]='\0'; + break; + default: + return OPERATOR_CANCELLED; + } + + text_update_edited(C, scene, obedit, 1, 0); + + return OPERATOR_FINISHED; +} + +void FONT_OT_delete(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Delete"; + ot->idname= "FONT_OT_delete"; + + /* api callbacks */ + ot->exec= delete_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_enum(ot->srna, "type", delete_type_items, DEL_ALL, "Type", "Which part of the text to delete."); +} + +/*********************** insert text operator *************************/ + +static int insert_text_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); + char *inserted_utf8; + wchar_t *inserted_text, first; + int len; + + if(!RNA_property_is_set(op->ptr, "text")) + return OPERATOR_CANCELLED; + + inserted_utf8= RNA_string_get_alloc(op->ptr, "text", NULL, 0); + len= strlen(inserted_utf8); + + inserted_text= MEM_callocN(sizeof(wchar_t)*(len+1), "FONT_insert_text"); + utf8towchar(inserted_text, inserted_utf8); + first= inserted_text[0]; + + MEM_freeN(inserted_text); + MEM_freeN(inserted_utf8); + + if(!first) + return OPERATOR_CANCELLED; + + insert_into_textbuf(obedit, first); + kill_selection(obedit, 1); + text_update_edited(C, scene, obedit, 1, 0); + + return OPERATOR_FINISHED; +} + +static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt) { Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Curve *cu= obedit->data; EditFont *ef= cu->editfont; static int accentcode= 0; - int x, doit=0, cursmove=0; unsigned long ascii = evt->ascii; int alt= evt->alt, shift= evt->shift, ctrl= evt->ctrl; int event= evt->type, val= evt->val; - short kern; + wchar_t inserted_text[2]= {0}; + + if(RNA_property_is_set(op->ptr, "text")) + return insert_text_exec(C, op); /* tab should exit editmode, but we allow it to be typed using modifier keys */ if(event==TABKEY) { @@ -625,23 +1391,22 @@ static int do_textedit(bContext *C, wmOperator *op, wmEvent *evt) else ascii= 9; } - if(event==BACKSPACEKEY) + else if(event==BACKSPACEKEY) ascii= 0; if(val && ascii) { - - /* handle case like TAB (==9) */ - if( (ascii > 31 && ascii < 254 && ascii != 127) || (ascii==13) || (ascii==10) || (ascii==8)) { - + /* handle case like TAB (== 9) */ + if((ascii > 31 && ascii < 254 && ascii != 127) || (ascii==13) || (ascii==10) || (ascii==8)) { if(accentcode) { - if(cu->pos>0) ef->textbuf[cu->pos-1]= findaccent(ef->textbuf[cu->pos-1], ascii); + if(cu->pos>0) { + inserted_text[0]= findaccent(ef->textbuf[cu->pos-1], ascii); + ef->textbuf[cu->pos-1]= inserted_text[0]; + } accentcode= 0; } else if(cu->len') ascii= 187; else if(ascii=='<') ascii= 171; } - if(ascii==1001) { - int file, filelen; - char *strp; - -/* this should be solved by clipboard support */ -#ifdef __WIN32_DISABLED - file= open("C:\\windows\\temp\\cutbuf", O_BINARY|O_RDONLY); -#else - file= open("/tmp/.cutbuffer", O_BINARY|O_RDONLY); -#endif - if(file>0) { - - filelen = BLI_filesize(file); - - strp= MEM_mallocN(filelen+4, "tempstr"); - read(file, strp, filelen); - close(file); - strp[filelen]= 0; - if(cu->len+filelentextbuf, mem); - MEM_freeN(mem); - cu->len += tmplen; - cu->pos= cu->len; - } - MEM_freeN(strp); - } - } - else { - insert_into_textbuf(obedit, ascii); - } + inserted_text[0]= ascii; + insert_into_textbuf(obedit, ascii); } - killselection(obedit, 1); - - doit= 1; + kill_selection(obedit, 1); + text_update_edited(C, scene, obedit, 1, 0); } - else - { + else { + inserted_text[0]= ascii; insert_into_textbuf(obedit, ascii); - doit = 1; + text_update_edited(C, scene, obedit, 1, 0); } } - else if(val) { - cursmove= 0; - - switch(event) { - case ENDKEY: - if ((shift) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; - while(cu->poslen) { - if( ef->textbuf[cu->pos]==0) break; - if( ef->textbuf[cu->pos]=='\n') break; - if( ef->textbufinfo[cu->pos].flag & CU_WRAP ) break; - cu->pos++; - } - cursmove=FO_CURS; - break; + else if(val && event == BACKSPACEKEY) { + if(alt && cu->len!=0 && cu->pos>0) + accentcode= 1; - case HOMEKEY: - if ((shift) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; - while(cu->pos>0) { - if( ef->textbuf[cu->pos-1]=='\n') break; - if( ef->textbufinfo[cu->pos-1].flag & CU_WRAP ) break; - cu->pos--; - } - cursmove=FO_CURS; - break; - - case RETKEY: - if(ctrl) { - insert_into_textbuf(obedit, 1); - if (ef->textbuf[cu->pos]!='\n') insert_into_textbuf(obedit, '\n'); - } - else { - insert_into_textbuf(obedit, '\n'); - } - cu->selstart = cu->selend = 0; - doit= 1; - break; - - case RIGHTARROWKEY: - if ((shift) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; - if (ctrl) { - cu->pos= next_word(cu); - cursmove= FO_CURS; - } - else if (alt) { - kern = ef->textbufinfo[cu->pos-1].kern; - kern += 1; - if (kern>20) kern = 20; - ef->textbufinfo[cu->pos-1].kern = kern; - doit = 1; - } - else { - cu->pos++; - cursmove= FO_CURS; - } - - break; - - case LEFTARROWKEY: - if ((shift) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; - if (ctrl) { - cu->pos= prev_word(cu); - cursmove= FO_CURS; - } - else if (alt) { - kern = ef->textbufinfo[cu->pos-1].kern; - kern -= 1; - if (kern<-20) kern = -20; - ef->textbufinfo[cu->pos-1].kern = kern; - doit = 1; - } - else { - cu->pos--; - cursmove=FO_CURS; - } - break; - - case UPARROWKEY: - if ((shift) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; - if(alt) { - if (cu->pos && ef->textbuf[cu->pos - 1] < 255) { - ef->textbuf[cu->pos - 1]++; - doit= 1; - } - } - else cursmove=FO_CURSUP; - break; - - case PAGEUPKEY: - if ((shift) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; - cursmove=FO_PAGEUP; - break; - - case DOWNARROWKEY: - if ((shift) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; - if(alt) { - if (cu->pos && ef->textbuf[cu->pos - 1] > 1) { - ef->textbuf[cu->pos - 1]--; - doit= 1; - } - } - else cursmove= FO_CURSDOWN; - break; - - case PAGEDOWNKEY: - if ((shift) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; - cursmove=FO_PAGEDOWN; - break; - - case BACKSPACEKEY: - if(cu->len!=0) { - if(alt) { - if(cu->pos>0) accentcode= 1; - } - else if (ctrl) { - cu->len = cu->pos = 0; - ef->textbuf[0]= 0; - doit= 1; - } - else { - if (killselection(obedit, 0)==0) { - if (cu->pos>0) { - for(x=cu->pos;x<=cu->len;x++) ef->textbuf[x-1]= ef->textbuf[x]; - for(x=cu->pos;x<=cu->len;x++) ef->textbufinfo[x-1]= ef->textbufinfo[x]; - cu->pos--; - ef->textbuf[--cu->len]='\0'; - doit=1; - } - } else doit=1; - } - } - break; - - case DELKEY: - if(cu->len!=0) { - if (killselection(obedit, 0)==0) { - if(cu->poslen) { - for(x=cu->pos;xlen;x++) ef->textbuf[x]= ef->textbuf[x+1]; - for(x=cu->pos;xlen;x++) ef->textbufinfo[x]= ef->textbufinfo[x+1]; - ef->textbuf[--cu->len]='\0'; - doit=1; - } - } else doit=1; - } - break; - - case IKEY: - if (ctrl) { - cu->curinfo.flag ^= CU_ITALIC; - if (style_to_sel(obedit, CU_ITALIC, cu->curinfo.flag & CU_ITALIC)) doit= 1; - } - break; - - case BKEY: - if (ctrl) { - cu->curinfo.flag ^= CU_BOLD; - if (style_to_sel(obedit, CU_BOLD, cu->curinfo.flag & CU_BOLD)) doit= 1; - } - break; - - case UKEY: - if (ctrl) { - cu->curinfo.flag ^= CU_UNDERLINE; - if (style_to_sel(obedit, CU_UNDERLINE, cu->curinfo.flag & CU_UNDERLINE)) doit= 1; - } - break; - - case XKEY: - if (ctrl) { - copyselection(obedit); - killselection(obedit, 0); - doit= 1; - } - break; - - case CKEY: - if (ctrl) { - copyselection(obedit); - } - break; - - case VKEY: - if (ctrl) { - pasteselection(obedit); - doit= 1; - } - break; - default: - return OPERATOR_PASS_THROUGH; - } - - if(cursmove) { - if ((shift)==0) { - if (cu->selstart) { - cu->selstart = cu->selend = 0; - update_string(cu); - BKE_text_to_curve(scene, obedit, FO_SELCHANGE); - } - } - if(cu->pos>cu->len) cu->pos= cu->len; - else if(cu->pos>=MAXTEXT) cu->pos= MAXTEXT; - else if(cu->pos<0) cu->pos= 0; - } + return OPERATOR_PASS_THROUGH; } - if(doit || cursmove) { - - if (cu->pos) { - cu->curinfo = ef->textbufinfo[cu->pos-1]; - } else cu->curinfo = ef->textbufinfo[0]; - - if (obedit->totcol>0) { - obedit->actcol = ef->textbufinfo[cu->pos-1].mat_nr; - } - update_string(cu); - BKE_text_to_curve(scene, obedit, cursmove); - if (cursmove && (shift)) { - cu->selend = cu->pos; - DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - } - if(cursmove==0) { - DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - } + else + return OPERATOR_PASS_THROUGH; - WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, NULL); // XXX better note + if(inserted_text[0]) { + /* store as utf8 in RNA string */ + char inserted_utf8[8] = {0}; + wcs2utf8s(inserted_utf8, inserted_text); + RNA_string_set(op->ptr, "text", inserted_utf8); } + return OPERATOR_FINISHED; } -static int font_editmode(bContext *C) +void FONT_OT_insert_text(wmOperatorType *ot) { - Object *obedit= CTX_data_edit_object(C); - if(obedit && obedit->type==OB_FONT) - return 1; - return 0; -} - -void FONT_OT_textedit(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Edit Text"; - ot->idname= "FONT_OT_textedit"; + ot->name= "Insert Text"; + ot->idname= "FONT_OT_insert_text"; /* api callbacks */ - ot->invoke= do_textedit; + ot->exec= insert_text_exec; + ot->invoke= insert_text_invoke; + ot->poll= ED_operator_editfont; - ot->poll= font_editmode; - - ot->flag = OPTYPE_UNDO; + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); } - -void paste_unicodeText(Scene *scene, char *filename) -{ - Object *obedit= scene->obedit; // XXX - Curve *cu= obedit->data; - EditFont *ef= cu->editfont; - int filelen, doit= 0; - char *strp; - FILE *fp = NULL; - - fp= fopen(filename, "r"); - - if(fp) { - - fseek( fp, 0L, SEEK_END ); - filelen = ftell( fp ); - fseek( fp, 0L, SEEK_SET ); - - strp= MEM_mallocN(filelen+4, "tempstr"); - //fread() instead of read(), - //because windows read() converts text to DOS \r\n linebreaks - //causing double linebreaks in the 3d text - filelen = fread(strp, 1, filelen, fp); - fclose(fp); - strp[filelen]= 0; - - - if(cu->len+filelentextbuf, mem); - MEM_freeN(mem); - cu->len += tmplen; - cu->pos= cu->len; - } - MEM_freeN(strp); - doit = 1; - } - if(doit) { - update_string(cu); - BKE_text_to_curve(scene, obedit, 0); - DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - } -} - -void paste_editText(Scene *scene) -{ - Object *obedit= scene->obedit; // XXX - Curve *cu= obedit->data; - EditFont *ef= cu->editfont; - int filelen, doit= 0; - char *strp; - FILE *fp = NULL; - -#ifdef WIN32 - fp= fopen("C:\\windows\\temp\\cutbuf.txt", "r"); - -// The following is more likely to work on all Win32 installations. -// suggested by Douglas Toltzman. Needs windows include files... -/* - char tempFileName[MAX_PATH]; - DWORD pathlen; - static const char cutbufname[]="cutbuf.txt"; - - if ((pathlen=GetTempPath(sizeof(tempFileName),tempFileName)) > 0 && - pathlen + sizeof(cutbufname) <= sizeof(tempFileName)) - { - strcat(tempFileName,cutbufname); - file= open(tempFileName, O_BINARY|O_RDONLY); - } -*/ -#else - fp= fopen("/tmp/.cutbuffer", "r"); -#endif - - if(fp) { - - fseek(fp, 0L, SEEK_END); - filelen = ftell( fp ); - fseek(fp, 0L, SEEK_SET); - - strp= MEM_mallocN(filelen+4, "tempstr"); - // fread() instead of read(), - // because windows read() converts text to DOS \r\n linebreaks - // causing double linebreaks in the 3d text - filelen = fread(strp, 1, filelen, fp); - fclose(fp); - strp[filelen]= 0; - - if(cu->len+filelentextbuf, mem); - MEM_freeN(mem); - cu->len += tmplen; - cu->pos= cu->len; - } - MEM_freeN(strp); - doit = 1; - } - if(doit) { - update_string(cu); - BKE_text_to_curve(scene, obedit, 0); - DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - } -} +/***************** editmode enter/exit ********************/ void make_editText(Object *obedit) { @@ -1097,17 +1507,15 @@ void make_editText(Object *obedit) if(cu->pos>cu->len) cu->pos= cu->len; - if (cu->pos) { + if(cu->pos) cu->curinfo = ef->textbufinfo[cu->pos-1]; - } else cu->curinfo = ef->textbufinfo[0]; + else + cu->curinfo = ef->textbufinfo[0]; // Convert to UTF-8 update_string(cu); - - textediting= 1; } - void load_editText(Object *obedit) { Curve *cu= obedit->data; @@ -1129,117 +1537,119 @@ void load_editText(Object *obedit) /* this memory system is weak... */ - if (cu->selboxes) { + if(cu->selboxes) { MEM_freeN(cu->selboxes); cu->selboxes= NULL; } - - textediting= 0; - } -void remake_editText(Object *obedit) -{ - Curve *cu= obedit->data; - EditFont *ef= cu->editfont; - - if(okee("Reload original text")==0) return; - - // Copy the oldstr to textbuf temporary global variable - wcscpy(ef->textbuf, ef->oldstr); - memcpy(ef->textbufinfo, ef->oldstrinfo, (cu->len)*sizeof(CharInfo)); - - // Set the object length and position - cu= obedit->data; - cu->len= wcslen(ef->textbuf); - if(cu->pos>cu->len) cu->pos= cu->len; - - update_string(cu); - -} - - void free_editText(Object *obedit) { BKE_free_editfont((Curve *)obedit->data); - - textediting= 0; } +/********************** set case operator *********************/ -void add_primitiveFont(int dummy_argument) +static EnumPropertyItem case_items[]= { + {CASE_LOWER, "LOWER", "Lower", ""}, + {CASE_UPPER, "UPPER", "Upper", ""}, + {0, NULL, NULL, NULL}}; + +static int set_case(bContext *C, int ccase) { - Scene *scene= NULL; // XXX - Object *obedit= scene->obedit; - Curve *cu; - - if (obedit && obedit->type==OB_FONT) return; -// XXX check_editmode(OB_FONT); - -// XXX add_object_draw(OB_FONT); - ED_object_base_init_from_view(NULL, BASACT); // XXX - - where_is_object(scene, BASACT->object); - - cu= BASACT->object->data; - - cu->vfont= cu->vfontb= cu->vfonti= cu->vfontbi= get_builtin_font(); - cu->vfont->id.us+=4; - cu->str= MEM_mallocN(12, "str"); - strcpy(cu->str, "Text"); - cu->pos= 4; - cu->strinfo= MEM_callocN(12*sizeof(CharInfo), "strinfo"); - cu->totbox= cu->actbox= 1; - cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "textbox"); - cu->tb[0].w = cu->tb[0].h = 0.0; - -// if (U.flag & USER_ADD_EDITMODE) -// enter_editmode(EM_WAITCURSOR); - -} - -void to_upper(Scene *scene) -{ - Object *obedit= scene->obedit; // XXX + Scene *scene= CTX_data_scene(C); + Object *obedit= CTX_data_edit_object(C); Curve *cu= obedit->data; EditFont *ef= cu->editfont; - int len, ok; wchar_t *str; - - if(obedit==0) { - return; - } - - ok= 0; - cu= obedit->data; + int len; len= wcslen(ef->textbuf); str= ef->textbuf; while(len) { - if( *str>=97 && *str<=122) { - ok= 1; + if(*str>='a' && *str<='z') *str-= 32; - } len--; str++; } - if(ok==0) { + if(ccase == CASE_LOWER) { len= wcslen(ef->textbuf); str= ef->textbuf; while(len) { - if( *str>=65 && *str<=90) { + if(*str>='A' && *str<='Z') { *str+= 32; } len--; str++; } } - DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - update_string(cu); + text_update_edited(C, scene, obedit, 1, 0); + + return OPERATOR_FINISHED; } +static int set_case_exec(bContext *C, wmOperator *op) +{ + return set_case(C, RNA_enum_get(op->ptr, "case")); +} + +void FONT_OT_set_case(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Set Case"; + ot->idname= "FONT_OT_set_case"; + + /* api callbacks */ + ot->exec= set_case_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case."); +} + +/********************** toggle case operator *********************/ + +static int toggle_case_exec(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + Curve *cu= obedit->data; + EditFont *ef= cu->editfont; + wchar_t *str; + int len, ccase= CASE_UPPER; + + len= wcslen(ef->textbuf); + str= ef->textbuf; + while(len) { + if(*str>='a' && *str<='z') { + ccase= CASE_LOWER; + break; + } + + len--; + str++; + } + + return set_case(C, ccase); +} + +void FONT_OT_toggle_case(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Toggle Case"; + ot->idname= "FONT_OT_toggle_case"; + + /* api callbacks */ + ot->exec= toggle_case_exec; + ot->poll= ED_operator_editfont; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} /* **************** undo for font object ************** */ @@ -1258,7 +1668,6 @@ static void undoFont_to_editFont(void *strv, void *ecu) cu->selstart = cu->selend = 0; update_string(cu); - } static void *editFont_to_undoFont(void *ecu) @@ -1300,6 +1709,3 @@ void undo_push_font(bContext *C, char *name) undo_editmode_push(C, name, get_undoFont, free_undoFont, undoFont_to_editFont, editFont_to_undoFont, NULL); } - - -/***/ diff --git a/source/blender/editors/datafiles/blenderbuttons.c b/source/blender/editors/datafiles/blenderbuttons.c index d60237e98ea..d251673c1e9 100644 --- a/source/blender/editors/datafiles/blenderbuttons.c +++ b/source/blender/editors/datafiles/blenderbuttons.c @@ -1,3876 +1,3877 @@ /* DataToC output of file */ -int datatoc_blenderbuttons_size= 123826; +int datatoc_blenderbuttons_size= 123869; char datatoc_blenderbuttons[]= { -137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, - 2, 88, 0, 0, 2, 0, 8, 6, 0, 0, 0, 94,187, 18, 70, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, - 66, 40,155,120, 0, 0, 10, 77,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,119, 88,147,247, 22, 62,223,247,101, 15, 86, 66,216,240,177,151,108,129, 0, 34, 35,172, 8,200, 16, - 89,162, 16,146, 0, 97,132, 16, 18, 64,197,133,136, 10, 86, 20, 21, 17,156, 72, 85,196,130,213, 10, 72,157,136,226,160, 40,184, -103, 65,138,136, 90,139, 85, 92, 56,238, 31,220,167,181,125,122,239,237,237,251,215,251,188,231,156,231,252,206,121,207, 15,128, - 17, 18, 38,145,230,162,106, 0, 57, 82,133, 60, 58,216, 31,143, 79, 72,196,201,189,128, 2, 21, 72,224, 4, 32, 16,230,203,194, -103, 5,197, 0, 0,240, 3,121,120,126,116,176, 63,252, 1,175,111, 0, 2, 0,112,213, 46, 36, 18,199,225,255,131,186, 80, 38, - 87, 0, 32,145, 0,224, 34, 18,231, 11, 1,144, 82, 0,200, 46, 84,200, 20, 0,200, 24, 0,176, 83,179,100, 10, 0,148, 0, 0, -108,121,124, 66, 34, 0,170, 13, 0,236,244, 73, 62, 5, 0,216,169,147,220, 23, 0,216,162, 28,169, 8, 0,141, 1, 0,153, 40, - 71, 36, 2, 64,187, 0, 96, 85,129, 82, 44, 2,192,194, 0,160,172, 64, 34, 46, 4,192,174, 1,128, 89,182, 50, 71, 2,128,189, - 5, 0,118,142, 88,144, 15, 64, 96, 0,128,153, 66, 44,204, 0, 32, 56, 2, 0, 67, 30, 19,205, 3, 32, 76, 3,160, 48,210,191, -224,169, 95,112,133,184, 72, 1, 0,192,203,149,205,151, 75,210, 51, 20,184,149,208, 26,119,242,240,224,226, 33,226,194,108,177, - 66, 97, 23, 41, 16,102, 9,228, 34,156,151,155, 35, 19, 72,231, 3, 76,206, 12, 0, 0, 26,249,209,193,254, 56, 63,144,231,230, -228,225,230,102,231,108,239,244,197,162,254,107,240,111, 34, 62, 33,241,223,254,188,140, 2, 4, 0, 16, 78,207,239,218, 95,229, -229,214, 3,112,199, 1,176,117,191,107,169, 91, 0,218, 86, 0,104,223,249, 93, 51,219, 9,160, 90, 10,208,122,249,139,121, 56, -252, 64, 30,158,161, 80,200, 60, 29, 28, 10, 11, 11,237, 37, 98,161,189, 48,227,139, 62,255, 51,225,111,224,139,126,246,252, 64, - 30,254,219,122,240, 0,113,154, 64,153,173,192,163,131,253,113, 97,110,118,174, 82,142,231,203, 4, 66, 49,110,247,231, 35,254, -199,133,127,253,142, 41,209,226, 52,177, 92, 44, 21,138,241, 88,137,184, 80, 34, 77,199,121,185, 82,145, 68, 33,201,149,226, 18, -233,127, 50,241, 31,150,253, 9,147,119, 13, 0,172,134, 79,192, 78,182, 7,181,203,108,192,126,238, 1, 2,139, 14, 88,210,118, - 0, 64,126,243, 45,140, 26, 11,145, 0, 16,103, 52, 50,121,247, 0, 0,147,191,249,143, 64, 43, 1, 0,205,151,164,227, 0, 0, -188,232, 24, 92,168,148, 23, 76,198, 8, 0, 0, 68,160,129, 42,176, 65, 7, 12,193, 20,172,192, 14,156,193, 29,188,192, 23, 2, - 97, 6, 68, 64, 12, 36,192, 60, 16, 66, 6,228,128, 28, 10,161, 24,150, 65, 25, 84,192, 58,216, 4,181,176, 3, 26,160, 17,154, -225, 16,180,193, 49, 56, 13,231,224, 18, 92,129,235,112, 23, 6, 96, 24,158,194, 24,188,134, 9, 4, 65,200, 8, 19, 97, 33, 58, -136, 17, 98,142,216, 34,206, 8, 23,153,142, 4, 34, 97, 72, 52,146,128,164, 32,233,136, 20, 81, 34,197,200,114,164, 2,169, 66, -106,145, 93, 72, 35,242, 45,114, 20, 57,141, 92, 64,250,144,219,200, 32, 50,138,252,138,188, 71, 49,148,129,178, 81, 3,212, 2, -117, 64,185,168, 31, 26,138,198,160,115,209,116, 52, 15, 93,128,150,162,107,209, 26,180, 30, 61,128,182,162,167,209, 75,232,117, -116, 0,125,138,142, 99,128,209, 49, 14,102,140,217, 97, 92,140,135, 69, 96,137, 88, 26, 38,199, 22, 99,229, 88, 53, 86,143, 53, - 99, 29, 88, 55,118, 21, 27,192,158, 97,239, 8, 36, 2,139,128, 19,236, 8, 94,132, 16,194,108,130,144,144, 71, 88, 76, 88, 67, -168, 37,236, 35,180, 18,186, 8, 87, 9,131,132, 49,194, 39, 34,147,168, 79,180, 37,122, 18,249,196,120, 98, 58,177,144, 88, 70, -172, 38,238, 33, 30, 33,158, 37, 94, 39, 14, 19, 95,147, 72, 36, 14,201,146,228, 78, 10, 33, 37,144, 50, 73, 11, 73,107, 72,219, - 72, 45,164, 83,164, 62,210, 16,105,156, 76, 38,235,144,109,201,222,228, 8,178,128,172, 32,151,145,183,144, 15,144, 79,146,251, -201,195,228,183, 20, 58,197,136,226, 76, 9,162, 36, 82,164,148, 18, 74, 53,101, 63,229, 4,165,159, 50, 66,153,160,170, 81,205, -169,158,212, 8,170,136, 58,159, 90, 73,109,160,118, 80, 47, 83,135,169, 19, 52,117,154, 37,205,155, 22, 67,203,164, 45,163,213, -208,154,105,103,105,247,104, 47,233,116,186, 9,221,131, 30, 69,151,208,151,210,107,232, 7,233,231,233,131,244,119, 12, 13,134, - 13,131,199, 72, 98, 40, 25,107, 25,123, 25,167, 24,183, 25, 47,153, 76,166, 5,211,151,153,200, 84, 48,215, 50, 27,153,103,152, - 15,152,111, 85, 88, 42,246, 42,124, 21,145,202, 18,149, 58,149, 86,149,126,149,231,170, 84, 85,115, 85, 63,213,121,170, 11, 84, -171, 85, 15,171, 94, 86,125,166, 70, 85,179, 80,227,169, 9,212, 22,171,213,169, 29, 85,187,169, 54,174,206, 82,119, 82,143, 80, -207, 81, 95,163,190, 95,253,130,250, 99, 13,178,134,133, 70,160,134, 72,163, 84, 99,183,198, 25,141, 33, 22,198, 50,101,241, 88, - 66,214,114, 86, 3,235, 44,107,152, 77, 98, 91,178,249,236, 76,118, 5,251, 27,118, 47,123, 76, 83, 67,115,170,102,172,102,145, -102,157,230,113,205, 1, 14,198,177,224,240, 57,217,156, 74,206, 33,206, 13,206,123, 45, 3, 45, 63, 45,177,214,106,173,102,173, -126,173, 55,218,122,218,190,218, 98,237,114,237, 22,237,235,218,239,117,112,157, 64,157, 44,157,245, 58,109, 58,247,117, 9,186, - 54,186, 81,186,133,186,219,117,207,234, 62,211, 99,235,121,233, 9,245,202,245, 14,233,221,209, 71,245,109,244,163,245, 23,234, -239,214,239,209, 31, 55, 48, 52, 8, 54,144, 25,108, 49, 56, 99,240,204,144, 99,232,107,152,105,184,209,240,132,225,168, 17,203, -104,186,145,196,104,163,209, 73,163, 39,184, 38,238,135,103,227, 53,120, 23, 62,102,172,111, 28, 98,172, 52,222,101,220,107, 60, - 97, 98,105, 50,219,164,196,164,197,228,190, 41,205,148,107,154,102,186,209,180,211,116,204,204,200, 44,220,172,216,172,201,236, -142, 57,213,156,107,158, 97,190,217,188,219,252,141,133,165, 69,156,197, 74,139, 54,139,199,150,218,150,124,203, 5,150, 77,150, -247,172,152, 86, 62, 86,121, 86,245, 86,215,172, 73,214, 92,235, 44,235,109,214, 87,108, 80, 27, 87,155, 12,155, 58,155,203,182, -168,173,155,173,196,118,155,109,223, 20,226, 20,143, 41,210, 41,245, 83,110,218, 49,236,252,236, 10,236,154,236, 6,237, 57,246, - 97,246, 37,246,109,246,207, 29,204, 28, 18, 29,214, 59,116, 59,124,114,116,117,204,118,108,112,188,235,164,225, 52,195,169,196, -169,195,233, 87,103, 27,103,161,115,157,243, 53, 23,166, 75,144,203, 18,151,118,151, 23, 83,109,167,138,167,110,159,122,203,149, -229, 26,238,186,210,181,211,245,163,155,187,155,220,173,217,109,212,221,204, 61,197,125,171,251, 77, 46,155, 27,201, 93,195, 61, -239, 65,244,240,247, 88,226,113,204,227,157,167,155,167,194,243,144,231, 47, 94,118, 94, 89, 94,251,189, 30, 79,179,156, 38,158, -214, 48,109,200,219,196, 91,224,189,203,123, 96, 58, 62, 61,101,250,206,233, 3, 62,198, 62, 2,159,122,159,135,190,166,190, 34, -223, 61,190, 35,126,214,126,153,126, 7,252,158,251, 59,250,203,253,143,248,191,225,121,242, 22,241, 78, 5, 96, 1,193, 1,229, - 1,189,129, 26,129,179, 3,107, 3, 31, 4,153, 4,165, 7, 53, 5,141, 5,187, 6, 47, 12, 62, 21, 66, 12, 9, 13, 89, 31,114, -147,111,192, 23,242, 27,249, 99, 51,220,103, 44,154,209, 21,202, 8,157, 21, 90, 27,250, 48,204, 38, 76, 30,214, 17,142,134,207, - 8,223, 16,126,111,166,249, 76,233,204,182, 8,136,224, 71,108,136,184, 31,105, 25,153, 23,249,125, 20, 41, 42, 50,170, 46,234, - 81,180, 83,116,113,116,247, 44,214,172,228, 89,251,103,189,142,241,143,169,140,185, 59,219,106,182,114,118,103,172,106,108, 82, -108, 99,236,155,184,128,184,170,184,129,120,135,248, 69,241,151, 18,116, 19, 36, 9,237,137,228,196,216,196, 61,137,227,115, 2, -231,108,154, 51,156,228,154, 84,150,116, 99,174,229,220,162,185, 23,230,233,206,203,158,119, 60, 89, 53, 89,144,124, 56,133,152, - 18,151,178, 63,229,131, 32, 66, 80, 47, 24, 79,229,167,110, 77, 29, 19,242,132,155,133, 79, 69,190,162,141,162, 81,177,183,184, - 74, 60,146,230,157, 86,149,246, 56,221, 59,125, 67,250,104,134, 79, 70,117,198, 51, 9, 79, 82, 43,121,145, 25,146,185, 35,243, - 77, 86, 68,214,222,172,207,217,113,217, 45, 57,148,156,148,156,163, 82, 13,105,150,180, 43,215, 48,183, 40,183, 79,102, 43, 43, -147, 13,228,121,230,109,202, 27,147,135,202,247,228, 35,249,115,243,219, 21,108,133, 76,209,163,180, 82,174, 80, 14, 22, 76, 47, -168, 43,120, 91, 24, 91,120,184, 72,189, 72, 90,212, 51,223,102,254,234,249, 35, 11,130, 22,124,189,144,176, 80,184,176,179,216, -184,120, 89,241,224, 34,191, 69,187, 22, 35,139, 83, 23,119, 46, 49, 93, 82,186,100,120,105,240,210,125,203,104,203,178,150,253, - 80,226, 88, 82, 85,242,106,121,220,242,142, 82,131,210,165,165, 67, 43,130, 87, 52,149,169,148,201,203,110,174,244, 90,185, 99, - 21, 97,149,100, 85,239,106,151,213, 91, 86,127, 42, 23,149, 95,172,112,172,168,174,248,176, 70,184,230,226, 87, 78, 95,213,124, -245,121,109,218,218,222, 74,183,202,237,235, 72,235,164,235,110,172,247, 89,191,175, 74,189,106, 65,213,208,134,240, 13,173, 27, -241,141,229, 27, 95,109, 74,222,116,161,122,106,245,142,205,180,205,202,205, 3, 53, 97, 53,237, 91,204,182,172,219,242,161, 54, -163,246,122,157,127, 93,203, 86,253,173,171,183,190,217, 38,218,214,191,221,119,123,243, 14,131, 29, 21, 59,222,239,148,236,188, -181, 43,120, 87,107,189, 69,125,245,110,210,238,130,221,143, 26, 98, 27,186,191,230,126,221,184, 71,119, 79,197,158,143,123,165, -123, 7,246, 69,239,235,106,116,111,108,220,175,191,191,178, 9,109, 82, 54,141, 30, 72, 58,112,229,155,128,111,218,155,237,154, -119,181,112, 90, 42, 14,194, 65,229,193, 39,223,166,124,123,227, 80,232,161,206,195,220,195,205,223,153,127,183,245, 8,235, 72, -121, 43,210, 58,191,117,172, 45,163,109,160, 61,161,189,239,232,140,163,157, 29, 94, 29, 71,190,183,255,126,239, 49,227, 99,117, -199, 53,143, 87,158,160,157, 40, 61,241,249,228,130,147,227,167,100,167,158,157, 78, 63, 61,212,153,220,121,247, 76,252,153,107, - 93, 81, 93,189,103, 67,207,158, 63, 23,116,238, 76,183, 95,247,201,243,222,231,143, 93,240,188,112,244, 34,247, 98,219, 37,183, - 75,173, 61,174, 61, 71,126,112,253,225, 72,175, 91,111,235,101,247,203,237, 87, 60,174,116,244, 77,235, 59,209,239,211,127,250, -106,192,213,115,215,248,215, 46, 93,159,121,189,239,198,236, 27,183,110, 38,221, 28,184, 37,186,245,248,118,246,237, 23,119, 10, -238, 76,220, 93,122,143,120,175,252,190,218,253,234, 7,250, 15,234,127,180,254,177,101,192,109,224,248, 96,192, 96,207,195, 89, - 15,239, 14, 9,135,158,254,148,255,211,135,225,210, 71,204, 71,213, 35, 70, 35,141,143,157, 31, 31, 27, 13, 26,189,242,100,206, -147,225,167,178,167, 19,207,202,126, 86,255,121,235,115,171,231,223,253,226,251, 75,207, 88,252,216,240, 11,249,139,207,191,174, -121,169,243,114,239,171,169,175, 58,199, 35,199, 31,188,206,121, 61,241,166,252,173,206,219,125,239,184,239,186,223,199,189, 31, -153, 40,252, 64,254, 80,243,209,250, 99,199,167,208, 79,247, 62,231,124,254,252, 47,247,132,243,251, 37,210,159, 51, 0, 0, 0, - 4,103, 65, 77, 65, 0, 0,177,142,124,251, 81,147, 0, 0, 0, 32, 99, 72, 82, 77, 0, 0,122, 37, 0, 0,128,131, 0, 0,249, -255, 0, 0,128,233, 0, 0,117, 48, 0, 0,234, 96, 0, 0, 58,152, 0, 0, 23,111,146, 95,197, 70, 0, 1,216,207, 73, 68, 65, - 84,120,218,236,157,119,120, 20,197, 31,198,223,217,235, 53,149, 36,228, 2,132, 94,164, 73, 66,239, 32,189,136,116, 20, 27, 77, -249, 41, 10, 42, 10, 88, 64, 84,130, 32, 88, 80, 64,176,128,136, 84, 5,164, 74,239, 53,161,247, 22, 74, 46, 21, 82,238,114,253, -118,231,247, 7,119,241, 18, 46,201, 93, 18, 4,113, 62,207,179,207,221,238,237,189, 59, 59, 59, 59,251,238,119,102,103, 9,165, - 20, 15, 10, 66, 72,125, 74,233,105,166,201, 52,153, 38,211,100,154, 76,147,105, 50,205,255, 18, 92, 9, 50,181,204, 29, 25, 33, -132,186,166,118,143,186,230, 3,220,119, 90,134,154,237, 92,154, 83,254, 37,233,108,247,168,106,186,247,183, 44,117, 61,243,176, -172,242,211, 35,157,180,172,211,249,160, 52,203,250,188, 44,203, 50,234,229,184, 79,249,151,164,179,221,163,166, 89,176,252,148, -133,174,183, 50, 89,218,252,244,146, 78, 90,214,233,124, 80,154,101,125,189, 44,171, 50, 90,196,177, 47,179,107,211,163,140,248, - 97, 27, 12, 0,160,148, 18, 15,125,242,168,106,122,230,131, 91,191, 44,211, 90,134,236, 42,107,205, 2,249, 89, 86, 76,161,148, - 18, 66,200,110, 0,237,202,114,223,203,226,184, 23,216,215, 50,209,125,144,230,170, 44,203,253,131,214, 44,171,115,169,160,102, - 89,148,123,111,199,253, 1, 30,163,178, 74,103,153,156, 75, 15,162,204,123, 41, 63,165,214, 45,168, 89, 22,231, 82, 65,205,178, - 40,247,255,132,102, 89,156, 75,222, 52,203,162,220, 23,118,236, 89, 4,235,159, 49, 2, 5, 79,236,246,143,178, 17,122,192, 81, -172,118,255, 6,205, 50, 62, 70, 83, 92,154,101,121, 55,211,190,172,142, 81,193,178, 83, 22,119, 93,158,154,101, 85, 54,189,164, -179,212,199,201,155,102,105,211, 91, 72, 58,203,124,223, 75, 91,238,255, 41,205, 50, 62, 70,101,114, 46, 21,208,108, 95,198, 55, - 1,237,203,242, 92,242,212, 44,171,115,201, 75, 58, 75,125,156,188,105,150, 54,189,133,164,179,204,247,189, 12, 35,162,101,174, -251,216, 69,176, 30,164,185,122, 16,230,205,125,151, 84,214, 23,178,178, 52, 89, 15, 42,210, 86, 86, 81, 28, 47,186,187,203, 80, -110, 87, 89,167,211,149, 62,242, 32,140, 48,165,116, 10, 33,100,242,163,124, 66,179,115,137,157, 75,143,218,185,228,173,220,148, -246, 92,122, 80, 55,207,158,154,101,101,132,188,236,123,169,206,165,130,255, 45,139,115,169, 24, 77,242, 32,246,191,172,207,167, - 71, 17,238, 81, 73,200, 3,232,223, 67, 31, 68, 84,236, 1,238,119, 89,166,179,253,191, 97,223, 31, 68, 58, 9, 33, 83, 30,208, -190,255, 91,242,148,157, 75,236, 92,122,228,206,165, 2,101,178,125, 89, 69,134,202,250, 70,170,160,102, 89,246, 67, 42,203, 50, -250,160,247,189, 44,207,165, 7,113,236,255, 45,248, 29,193,122, 80,119,199,255, 6,205, 7,161,253,128,246,125,247,131,184, 59, -120, 0,253,186,202, 60,157,148,210, 41, 40,195, 38, 71,247, 62,151,101, 90, 31,100, 51,225,131, 40,155, 15,178,188,151,101, 63, -143, 7,180,239,255,150,227, 94,230,233, 44,171,115,201,203, 49, 47,117, 90,189,229, 95, 89, 55, 97,151,101,217,124,144,154,101, -161,253, 32,210,249,160,142,253,191, 9,242, 32,135,105, 96, 48, 24, 12, 6,131,193,248, 47,226, 53,130, 85,175, 94,189, 3,205, -155, 55,175,125,252,248,113,187, 32, 8,224, 56, 14,132,144,188, 73, 16, 4,253,177, 99,199, 98, 88,246, 49, 24, 12,159,238,228, - 8,225,240,119,151, 4,225,222,205, 44,187,187, 99, 48, 24,143,113,189,231,173,142,107,216,176,225,173,227,199,143, 87,248,235, -175,191,160, 84, 42,161, 86,171,161,209,104,160, 86,171,161, 86,171,209,179,103,207,228,189,123,247,234,252,221, 88,139, 22, 45, -110, 58,157,206, 72,127,254, 35, 18,137,210, 42, 84,168, 80,105,229,202,149,188,183,223, 35, 35, 35,111, 18, 66, 42,250, 89,217, -103,232,245,250, 72, 74,169,243,159,210,108,218,180,105, 42,207,243,225,254,104,202,100,178, 91, 7, 14, 28,168,196,138,233, 63, -131, 66,161,184,107,181, 90,131,139, 56,198, 84, 42,149, 58,101, 50,153, 73, 38,147, 89,197, 98,177, 88, 16,132,244,180,180,180, - 24, 74,169,213,203,250, 50, 0, 41, 0,130,138,216,172, 0,192, 12,224, 14,128, 28,151, 9,209, 3,232, 73, 41,229, 31,135,124, -141,141,141,149,148, 47, 95,254, 23, 66,200,224,162,214,147, 72, 36, 25,153,153,153,145,187,118,237,114,178,210,200, 96, 48,254, -237,120,141, 96,241, 60,127,123,244,232,209,234,132,132,132,194, 34, 88,169, 37,217,152,221,110,175,120,240,151, 95, 32,142,136, - 0,181,217,224, 8, 10,130, 32, 8, 16, 4, 1,146, 43, 87, 64,237,118,192,110,135,181, 94, 61, 0,128,195,225,192,211, 79, 63, - 29,145,145,145, 33, 1, 80,216,197, 38,242,141, 55,222,128, 86,171,133,197, 98,129,197, 98,129,213,106,133,213,106,133,205,102, -131,205,102,131,221,110,135,221,110,135,195,225,128,213,106, 69, 66, 66, 66,112,116,116,180, 24, 64, 97, 21,121,228,152, 49, 99, -160,209,104,242,244, 44, 22, 75,158,150,213,106,205,211,180,217,108,176, 90,173, 56,121,242,100,145,154, 60,207,135,239,222,189, - 27,106,181, 26,130, 32,128,231,121,240, 60,159,183,255,148, 82,120,154, 93,158,231,209,181,107,215, 72, 86, 68,255, 57, 28, 14, - 71,160,245,228, 73,136,130,130,192,223,185, 3, 71,181,106,112,186,142, 21, 55,127, 62,120,179,153,240, 14,135,196,242,202, 43, - 10, 39,165,124, 70, 70,134,115,212,168, 81,242,180,180, 52,113, 17,231,151,198, 96, 48,220,213,104, 52, 18, 0,119, 82, 82, 82, - 56,139,197, 98,168, 82,165,202, 41, 0,119,182,111,223, 30,145,155,155,155,213,167, 79,159, 29, 22,139, 37, 89,169, 84, 42, 0, -188,237, 50, 90,255,122,131,229, 54, 87,149, 42, 85,234, 57,123,246,108,172, 95,191, 30, 85,170, 84,129, 84, 42,133, 72, 36, 2, -199,113, 16,137, 68, 16,137, 68, 24, 59,118,108,176, 43,207,152,193, 98, 48, 24,143,167,193, 58,115,230, 76, 75, 0,232,223,191, -255,129,250,245,235,215, 62,119,238,156,221,117, 71,238,158,116,207, 61,247, 92,170,123, 30,128,126,201,146, 37, 62, 53, 25,138, - 35, 34,144, 24, 18, 2, 0,184,181,115, 39, 0,128,227, 56, 68,181,107,151,183, 78,230,209,163, 16,137, 68,168, 92,185, 50, 56, -174,248, 7, 29, 53, 26, 13,186,116,233, 2,153, 76,134,216,216, 88, 72,165, 82, 72, 36,146, 66, 39, 95, 80,169, 84,248,248,227, -143,239,165, 89, 44,134, 90,161,192,255,218, 52,131,146, 80,252,120,242, 2,172,188, 0,177, 88, 12,177, 88,236,179,166, 90,173, -198,138, 21, 43, 32,149, 74,189, 78,219,183,111, 71,159, 62,125, 32,149, 74, 17, 18, 18,130,255,210,128,108,143, 8, 2,167,209, -112,183,170, 87, 7,181,219, 97, 62,118, 12,144,201, 0, 0,202,249,243, 1,173, 22, 36, 40,136,191,219,167,143,213, 1, 56,213, -106,117,146, 90,173,206, 44,194, 16,240, 0,120,141, 70, 35, 33,132,140, 7,192, 83, 74,127, 36,132,136, 0, 12, 4, 96,163,148, -254,225,106, 62,123, 10,128,156, 82,186,139, 16,210, 19,192,191,190,249,140, 16,194,245,236,217,243,199, 74,149, 42,117,157, 61, -123,182, 90, 42,149, 98,238,220,185,144, 72, 36,232,209,163, 7, 66, 67, 67,241,215, 95,127, 65, 42,149, 98,252,248,241,172,244, - 49, 24,140,199,223, 96,121, 80,225,253,247,223, 15,250,245,215, 95, 33,151,203,161, 84, 42,161, 82,169,160, 82,169,242,125,159, - 52,105,146,207,119,218,212,102,203, 55,239,190,139, 45,184, 76, 36, 18,249,188, 19, 54,155, 13, 3, 7, 14, 4,128, 98,205,149, -175,102,200,102,179, 65, 44, 22,163, 90,165, 48,124, 56,160, 9, 90,138, 5,152, 50, 40,184, 59, 38,188, 24, 41,198,137,168,154, -152,115,235, 14,110,228, 24, 33, 22,251,246, 48, 38,207,243,133,154, 43,169, 84,138, 37, 75,150, 96,224,192,129,144, 74,165, 62, - 25, 75,198, 3,112, 88, 89, 89,222,127, 8, 9, 1,209,104,156, 8, 12,180, 59,157, 78,139,141,231,173,106,181,218, 32,147,201, -140, 62,152,161, 12, 15,195,149, 23, 48, 43, 96,204,156,174,101, 0,144,245, 24,152, 43, 2,128, 19,139,197,207,205,152, 49,131, -147, 74,165, 0,128,208,208, 80, 72, 36, 18,212,171, 87, 15, 90,173, 22,251,246,237,203, 59, 47, 24, 12, 6,163, 8, 36, 0,158, - 4, 16,230,170, 75, 13,200,223,253, 34,221,245, 25,230, 49,127,212,139, 78, 19,215, 58,238,223,221,243, 54, 0, 50, 47,203,239, - 0, 80,186, 38, 43,128, 3, 0,234,121,108,199,253, 63, 20,220,174,216, 85, 25,182, 3,176, 11, 64,251, 2,131,223,221,254,236, -179,207,212, 94, 34, 88,249, 38, 0, 62, 55, 25, 58,130,130,112,107,231, 78, 16, 66, 80,177,253,223, 67, 97,220, 57,124, 56,207, -108, 5,116,238, 12,168, 84, 16,125,241,133,207,102, 40, 53, 53, 21, 28,199,149,137,193, 34,132,192,110,183, 67, 33,151, 97,199, -252, 54, 72,185,230,196,103, 27,111, 99,237,225,235, 16,139,197,232, 89,187, 58, 6, 8, 4,211, 67, 20,120,197,193,195,238, 99, - 95, 93,167,211, 89,100,186, 8, 33,249,190, 51,254,113, 56,107,181,106, 48, 39, 36,128, 82, 10, 69,243,230,224, 52, 26,208,144, - 16, 88,126,249,197,104,118, 58,157,118,187,221, 90,126,229, 74, 59,213,106,141, 41, 28, 23,229,176,219,101, 40,124, 60, 57, 17, - 0, 81,106,106, 42,161,148, 46, 32,132,136, 8, 33, 67, 92,145,171,213,174,178,214, 25,128,147, 82,186,147, 16,194, 17, 66, 98, - 93, 39,242, 99,209, 1, 92, 16, 4,186,105,211, 38,204,157, 59, 23,161,161,161,232,210,165, 11,202,151, 47,143, 85,171, 86,129, - 82,138,215, 95,127, 29, 74,165, 18, 74,165,146,149, 62, 6,227, 63, 74, 17, 30,196,147,182, 19, 39, 78,108, 60,125,250,244,105, - 45, 90,180, 88,118,224,192,129,223, 8, 33,235,243,130, 55,148,246,114,105,173,247,152,111, 82,192,100, 73, 0,132, 17, 66,214, -187,215,247,156,247, 88,222, 9,128,204, 61, 63,113,226,196,122,211,167, 79,159, 54, 97,194,132, 73,113,113,113,210,137, 19, 39, - 54,152, 62,125,250, 52,247,118,188,165,195, 51,130,229,117, 20,224,213,171, 87,183, 44,184,135,117,234,212, 57,208,178,101,203, -218,241,241,241,121,166,139,227, 56, 93,147, 38, 77, 82, 41,165,197, 62, 93, 72, 41,117,255,199,107,212,138,227, 56, 64,173, 6, - 81,171,129,191, 13, 92,145,102,200,225,112, 64, 34,145,128,227, 56,108,221,186, 21, 74,165, 18, 61,122,244, 40,210,200,248, 98, -218, 20, 10, 25, 36,193, 34,188, 56,230, 48,210,239,154,242,154, 4,183, 39,222,198, 81,165, 10, 31, 60, 81, 31,106, 67, 34, 12, - 5,162,114,254, 70,176, 94,123,237, 53,216,108,182, 60,131,232,142, 96,177, 38,194,127, 30,158,255, 59,200, 68, 66, 66, 64, 53, - 26, 32, 40,200, 73, 1,131,221,110, 39, 14,135,195,198, 7, 6,230, 34, 48, 48,203,228,116,170, 57,145,200, 92,156, 25, 50,155, -205,198, 2,145,170,194, 34, 87,238,200, 86,214,191,221, 96,209,123, 21,138, 0,128, 86,169, 82, 37,239,220,139,136,136, 64,144, - 71,223, 75,133, 66, 1,165, 82, 9,169, 84,202,110, 42, 24,140,255, 46,190,188,137, 64, 62,125,250,244,105,158, 6,166,160,161, -241, 52, 78, 5, 76,148,167, 73,171, 87,140,167, 88, 95,208, 52,185,183, 75, 8, 89, 31, 23, 23,215,171,152,116,164, 23, 52, 88, - 62, 15,179, 47, 22,139, 43,204,159, 63, 63,104,205,154, 53,208,104, 52, 8, 10, 10, 66, 96, 96, 32, 2, 3, 3,209,191,127,255, - 98,155, 10,221,157,230, 11, 54, 1,122, 26, 44,226, 97,176,124,121,146,219,110,183,231, 25,172,209,163, 71,231,245,139, 42, 77, - 19,161,221,110, 7, 39, 18, 3,242, 42, 16,232,225, 60,115,229,158, 68, 18, 9, 18, 43, 54, 0,151,154, 4, 49,239, 91, 11,169, - 32, 8,249,210,241,209, 71, 31, 97,214,172, 89,121,134,211, 29,193,106,212,168, 17, 46, 93,186,196, 78,185,135, 16,112,113, 58, -157,127, 59,255,224, 96, 16,181,218,225, 12, 8, 16, 12, 70, 35,209, 6, 5,221, 38,132,228,164, 16, 82,201,228,112,104, 42,196, -196, 28,171,120,234, 84, 18,138,233,131, 21, 29, 29,125,138, 16,242,172, 43,114,181,202, 21,169,234,226,154,247,140, 92,217, 41, -165,167, 8, 33,186,199, 36, 63, 41, 0, 72, 36, 18,116,238,220, 25,245,235,215,199,218,181,107, 33, 8, 2, 94,123,237, 53, 40, -149, 74,124,245,213, 87,112, 58,157,152, 62,125, 58, 43,125, 12,198,127, 59,138, 85,220,197,222, 60, 97,194,132, 73,132,144,245, -174, 72,210,153, 34,140,148, 55,154, 20, 48,105,233,133,220, 28,246,242,102,178, 60,191,187,153, 56,113, 98, 61, 47,233, 56,122, -159,193,242,112,143,197,153,132,219,175,190,250,170, 58, 33, 33,193, 78, 41,133, 72, 36,202, 51, 8,190, 60, 93, 40,190,124, 25, -186,182,109, 1, 0,119,143, 28,201, 51, 85,218,174, 93, 1,149, 10, 68,165,130,227,247,223, 33, 18,137, 32,132,134, 2, 95,126, - 89,108,174, 57, 28,142,123,166, 71, 36,194,157, 59,119,202,164, 15,150,221,110,135, 72, 34,198, 33,141, 4, 84, 34,202,103,174, - 36, 18, 9, 68, 82, 9, 18, 35,106,129, 19,111,131, 88,236,219, 67, 79, 5, 13, 22,199,113, 24, 59,118,108,190, 60,108,213,170, - 85,158,225,100,252,179,112, 28, 39, 72, 22, 45,130,242,219,111, 65, 3, 2, 96,249,229,151, 44, 65, 36, 50, 24, 12, 6,177,122, -233, 82,169, 34, 52, 84,142,224, 96, 75,122,237,218, 25,102,155,205,166, 43, 87, 46, 93,161, 80, 20, 23,109,178,227, 94, 31, 44, - 71,129, 72,149,183, 72,150,123,254, 95, 31,193,114, 71,177,158,126,250,105,136, 68, 34, 4, 6, 6, 66,171,213,130, 82,154, 47, -114,229,116, 58,243,154,206, 25, 12,198,127, 23, 31, 60,136, 53, 46, 46,238, 76, 92, 92, 92, 94, 36,169, 96, 4,171, 16,122,186, -204, 84,152,219,156,225, 94, 95,170,163, 69,164,165, 87, 97,198,203,115,217,244,233,211,167,121, 73, 71, 94,179,100,161, 3,141, -182,104,209,162,182,231, 48, 13, 46, 3,165, 63,123,246,108,169, 6, 24,165,118,187,215,168,149,187, 89,144,168,213,127, 71,178, -124,104, 34,116, 27, 44,137, 68, 2,145, 72,148,103, 94, 22, 47, 94, 12,141, 70,131,151, 95,126,185, 68, 6,203,225,112,128,147, -138,176, 78,122, 9,144,136,239,139, 96,113, 98, 9,110, 6, 86, 4,145,136, 33,118,138,125, 74,103, 78, 78, 14,164, 82, 41,190, -250,234, 43,124,240,193, 7, 16,137, 68,224,121, 30,132,144,124,251,204, 58,184, 63, 28,164, 82, 41,207,219,108,160,193,193,148, -104,181, 14,179,217,204, 91,121, 94, 28, 16, 16,112, 83, 21, 22,166, 72,166, 84,110,176,219,181,213,106,214,220, 47, 22,139,179, -119,236,216, 81, 43, 49, 49, 49, 2,133, 15,169, 32, 2, 96,223,177, 99, 71,184, 71,228,170,171, 43,114,181,195,117,215,211, 24, -128,131, 82,122,146,220,163, 10,242,119,152,124, 28,140, 43,118,239,222,141,248,248,120,140, 30, 61, 26, 74,165, 18,223,124,243, - 13,156, 78, 39,166, 78,157, 10,165, 82, 9,153, 76,198, 10, 32,131,193, 40,138, 96,183,193,113,153,164,124,145, 37, 74,105, 47, - 79, 19, 84, 88, 83,161, 43,226,180,167,152,109,109,112, 25, 51,175,184, 35,105, 5, 34,112,235, 11,154, 51,177,219, 57,122,126, -138, 68,162, 10,243,230,205, 11,218,179,103, 15, 84, 42, 85,222, 0,163,207, 62,251,108,233,199,229,113, 27, 44, 87, 51,161,187, -185,144,104, 52,247, 12,150, 74,149,207,108,248, 26,109, 42,104,176, 38, 79,158, 12,177, 88,140,133, 11, 23, 2, 0,222,121,231, - 29,191, 35, 88,160,192, 65, 97, 23, 34,231, 53, 4, 22, 43,145,178,251, 28, 36, 18, 9,202, 55,237, 12,161,241, 0,220,149, 5, - 66,229, 26,174,193, 23, 50, 51, 51,113,238,220, 57,112, 28,135,143, 63,254, 56,223,254,187, 77,172,219, 92,109,221,186, 21,248, - 15,189,179,233, 81, 64, 46,151,219, 5,135, 67, 78, 2, 2, 28,208,106,109, 54,187,221, 98,231,121, 27, 33, 36, 71, 8, 14,182, -228,218,108,154, 28,165,210,172,187, 55, 32,104, 78,110,110,174,133, 82, 90,212, 83,132, 20,128,201, 96, 48,100,123,122,247, 2, -145, 43,111, 79, 19,102, 62, 78,163,156,187,111,148,120,158,191, 47,114,165, 80, 40, 32,151,203, 89,225, 99, 48,254,227,209, 43, -207,207, 66, 72, 47,208,207,137, 20,136, 52,165,123, 51, 86,158,205,129, 30,223, 29, 94,116,109, 5,154, 14, 11, 46,119,127,222, -137,139,139,219,233,142, 92,121, 44,207,151,142, 66, 35, 88,130, 32,228, 13, 52,234, 89, 65,150,116,128, 81, 79, 44,117,235, 34, - 59, 62, 30, 34,145, 8,218, 30, 61, 0,149, 10, 80,169,224, 92,185, 50,207,104,136, 63,249, 4,156, 90, 13,210,163,135, 79,154, - 60,207,231,107,190,147, 72, 36,200,202,202,130, 68, 34,193,167,159,126, 10,142,227,240,249,231,159, 35, 42, 42, 10,201,201,201, -216,188,121,115,177,154, 78,167, 19,196, 73, 32,127, 49, 28,138, 87, 53, 32,175, 84, 71,221, 94,175, 32,199, 16,141, 83, 54, 53, -234,228, 94, 68,208,142,201,176, 11, 78,159, 13,150,195,225,192,225,195,135, 33,149, 74, 65, 41,189, 55,128,229,189,206,236,121, -131,143, 58, 28, 14,216,237,118,204,152, 49, 3,236, 77, 34,255, 44, 10,133,226,174,233,229,151,145,222,189,187,221,102,179, 89, -163,214,172,177, 81,181,218,144, 36, 18, 69,167,212,168,113,167, 78,221,186,251, 43,112, 92,206,182,109,219,234,152, 76, 38, 91, -207,158, 61, 55, 63,241,196, 19, 23,118,238,220, 89, 84, 31,172, 27,125,250,244,217,238, 25,185,114, 69,178, 26,227, 94,159, 43, -207,200,149,131, 82,122,139, 16,146,254,184, 69,176, 94,126,249,101, 68, 70, 70, 98,206,156, 57,224,121, 30, 31,127,252, 49,148, - 74, 37, 38, 77,154, 4,135,195,129,175,190,250,138, 21, 64, 6,131, 81, 20, 71,253, 88,183,137,135, 89, 58, 90, 66,221,163,165, - 77,176, 87,103,112,250,244,233,150,133,253,193,179,249,208,109,190, 40,165,250,248,248,248, 24, 47,119,174,245, 41,165,167, 11, -152,183,191,199,185, 82,169,242, 34, 87,249,162, 57, 26, 13, 56,173, 22,240, 98, 92,188,105,186,251,112, 20,236,220, 46, 22,139, -145,157,157, 13,137, 68,130, 57,115,230, 32, 32, 32, 0, 86,171,213, 39, 77,119,191, 46,211,141, 92, 92,255,224, 52,228,170,171, -168,213, 57, 0, 26,201, 21,212,216,247, 7,156, 78, 59,224,209,100,232,139,102,213,170, 85,241,246,219,111, 23, 58, 14,150,103, -196,142, 82,138, 38, 77,154, 20,171, 89, 6,209, 5,166,233, 66, 42,149,154, 28, 14,135,204,110,183,243,118,187,221, 42,104,181, - 70, 4, 7,103,229,218,108, 90,139,205,102,161,148, 26, 40,165, 57, 38,147,201, 98, 48, 24,108, 60,207,231,212,174, 93, 59,167, - 8, 77, 10, 32, 75, 16,132, 20, 0, 90, 20,222,231, 42,223,124,193,215,238,252,155,143,145,187,201,187, 92,185,114, 80,169, 84, -224,121, 62, 47,114,165, 80, 40,224,112, 56,224,116, 58, 11,189,153, 96,229,147,105, 50,205,255,142,230, 67, 50, 99, 15, 12,177, -191,127,112, 55, 31, 30, 58,116, 8, 90,173, 22,129,129,129,126, 53, 29,218,108, 54,232,116, 58, 8,130, 0,249,231,159,223,139, -222, 0, 48, 73,165,127,191, 54,167, 67, 7, 80,142, 67,166,193, 0,187,221, 94,108,132,200,108, 54,123, 53, 87,158,243, 70,163, - 17, 86,171,213,231, 38, 66,147,201, 4,145, 72,148,167, 67, 4,138,107,219, 87,221,215, 23,203,159,145,220,121,158, 71, 88, 88, - 88, 94, 83,160,219,104,138,197,247,247,225,114,205,179, 38,194,127, 54,210,162,188,117,235,150, 16, 22, 22,150,200,113,156,225, - 54, 33, 85,114, 45,150,128, 42, 77,155, 30,172, 84,174,220,157,109,219,182,213, 54, 26,141,142, 46, 93,186,108, 86,171,213, 89, -159,125,246, 89,219,179,103,207,214, 61,123,246,236,236, 66,222, 27,200, 1, 80, 74,165, 82, 53,165,116,187, 43,114,213,196, 21, -185, 58,225, 58,206, 85, 61, 34, 87,132, 16, 18,232,154, 55, 61, 46,249,234,238,228, 46,147,201,240,201, 39,159, 64, 42,149,230, -141,123,245,213, 87, 95,129, 82,202, 58,185, 51, 24,140,199, 14,191, 13,150,187,249,240,248,241,227,158, 17, 44,159,154, 14, 37, - 18, 73, 90,239,222,189,253,122,225,177, 68, 34, 41,234, 85, 36, 32,132, 36,239,218,181,203,175, 23, 51,139, 68,162,204, 27, 55, -110, 20,169,121,232,208, 33,191, 52, 57,142, 43, 82, 83, 34,145,164,117,237,218,213,175,125,151,203,229,169,172,136,254,115, 88, - 44,150, 91,111,191,253,118,136, 86,171, 77,145,201,100, 57, 38,147, 73,194,113,156,173,242,185,115,215,180, 90,237,221,179,103, -207, 6, 81, 74,237,177,177,177,167,149, 74,165,241,196,137, 19,117,210,211,211, 29, 69,121,106,220, 11, 81,191, 68, 8,137, 1, - 96, 4, 16, 8, 32,135, 16,162,194,189,190, 92, 26, 0,153,132, 16,226, 26, 59,202,137,199,232, 93,124, 98,177, 56,249,141, 55, -222,240,233, 92,146, 74,165,153, 96,239, 33,100, 48, 24,255, 85,131, 85, 84,243, 97,113, 28, 58,116, 40,162,172,119, 32, 41, 41, -169,210,191, 65,243, 65,236, 59,163,204,143,123,135, 98, 86,249,205,115,230,226,197,139, 95, 21,181, 50,165,212, 1, 96,168, 63, -105,160,148,230, 62, 78,121,186,122,245,234, 74,172,100, 49, 24,140,255, 34,108, 60, 0, 6,131,193, 96, 48, 24, 12,102,176, 24, - 12, 6,131,193, 96, 48, 30,109, 8,128,250,222,126,240,231,233, 0, 66, 72,125,127, 55, 92,156, 62,211,100,154, 76,147,105, 50, - 77,166,201, 52, 31, 63,205,226,180, 31,225,167, 19,253, 51, 88, 15,114,172, 37,246, 8, 43,211,100,154, 76,147,105, 50, 77,166, -201, 52,255,139,176, 38, 66, 6,131,193, 96, 48, 24, 12,102,176, 30, 63, 42, 86,172, 24,201,114,129,193, 96, 48, 24,140,199,135, - 66,135,105,104,218,180,105, 42,207,243,254,142, 89,149,230,235,112, 4,132, 16,113,100,100,228, 64,181, 90,221, 65, 36, 18,181, - 2, 0,158,231,247,231,230,230,238, 76, 78, 78, 94, 73, 41, 45,209,120, 56, 17, 17, 17, 85, 68, 34,209,139, 0,158,117, 45,250, -141,231,249,197,169,169,169,215, 31,181,204, 39,132,112, 21, 42, 84, 88, 82,167, 78,157,206, 21, 42, 84, 56, 29, 16, 16,208,237, -236,217,179,246, 82,232, 89,189, 45,167,148,150,248,101,111,229,203,151,143,230, 56,174, 5,165, 52,198,181,141, 4, 65, 16, 14, -166,164,164,220, 96,167,207,227, 65, 73,206,117, 0,144, 74,165,105, 7, 15, 30,140, 40, 75, 77,153, 76,118,235,192,129, 3,149, - 10,209,188,201,243,124,197,127, 65, 58,255, 21,249, 89, 24,177,177,177, 27, 0,184,223, 83,182, 49, 62, 62,190, 39, 59, 75, 24, -140, 50, 52, 88, 60,207,135,239,222,189, 27,106,181,218,125,145, 6,207,243,224,121, 62,111,196,117, 65, 16, 64, 41, 5,165, 20, - 78,167, 19, 93,186,116,241,169, 2,168, 80,161, 66,253, 90,181,106,173,122,253,245,215, 43,245,238,221, 91, 22, 17, 17, 1, 66, - 8, 82, 82, 82,106,174, 95,191,126,232,156, 57,115, 38, 87,168, 80, 97,192,237,219,183,125,106,223, 13, 11, 11, 83, 75, 36,146, - 1, 0, 94,106,216,176, 97,235,241,227,199,147, 86,173, 90,129,231,121,236,216,177,227,163,217,179,103,127,168,211,233,246, 1, - 88,228,112, 56, 86,165,167,167, 63,180,177,134, 8, 33, 36, 60, 60, 60, 58, 45, 45,237, 38, 0, 18, 19, 19,211,102,214,172, 89, -161,171, 87,175,110,255,245,215, 95, 47, 0,240, 82, 41,228,101,101,149,206,234,213,171,203,204,102,243,167, 28,199,189, 5,128, -243, 28,105,158,227, 56, 65,167,211,205, 86, 42,149, 31, 92,185,114,197,198, 78,163,127, 55,158,231,186,251,157,152, 78,167,211, -235,121,238, 46, 7,148, 82,116,234,212, 41,220, 31, 77,111,122,158,125, 64,121,158, 71,215,174, 93, 11,141,230, 82, 74, 35,183, -111,223,142,192,192,192, 34, 53, 11,252, 7, 79, 61,245, 84,137,210,233,126, 71,168, 91,199,141,211,233, 68,215,174, 93,117,190, -106,122,234, 22,166, 73, 41, 69,135, 14, 29, 30, 68, 58,139,141,142, 55,105,210, 36, 66, 16,132,249,132, 16, 25,199,113,111, 2, -232,177,121,243,102,240, 60,143,158, 61,123,246,104,218,180,105, 13, 65, 16,190, 86, 42,149,130,197, 98, 25,126,244,232, 81, 54, - 0, 50,131, 81, 26,131, 5, 0,106,181, 26,203,150, 45,243,250,250,153,130,223,163,163,163,125,141,136, 52,174, 92,185,242,238, - 53,107,214, 40,195,195,255,174, 79,236,118, 59, 2, 2, 2,240,242,203, 47,203, 58,117,234, 84, 99,232,208,161,135,202,151, 47, -223, 46, 37, 37,229, 88, 81,122, 58,157,238,245,136,136,136,207,199,141, 27,167,124,250,233,167, 17, 28, 28,156,239,247, 94,189, -122,161, 71,143, 30,228,218,181,107,109, 86,174, 92,217,230,151, 95,126,153,163,211,233, 38,232,245,250,111,139, 75,107, 84, 84, - 84,136, 82,169, 92, 16, 17, 17,209,240,250,245,235,123, 37, 18,201, 56,187,221, 62, 54, 50, 50,242, 5,131,193,112,195, 98,177, -140,188,117,235,214, 53,127,204, 85,100,100,228,246,186,117,235, 54,186,116,233,210, 53,139,197, 50,232,244,233,211,199,174, 94, -189, 26,245,252,243,207,147,211,167, 79,247,139,140,140,220,150,156,156,188,180, 36,145, 43,167,211,121,164,168,223,125,141,100, -233,116, 58, 37,128, 3, 0, 26,246,236,217, 51,117,202,148, 41,182,144,144, 16, 53, 33,132, 75, 75, 75,203,154, 49, 99,134,250, -247,223,127,127,199,108, 54, 63,165,211,233, 90,234,245,122, 51, 59,149,254,221,168,213,106, 44, 95,190, 28, 18,137, 4, 82,169, - 52,239,211,243,187,231,103, 72, 72,200, 3,209,164,148, 22,249,122, 40,141, 70,131, 85,171, 86,129,227, 56,175, 58, 5,151,149, - 43, 87, 14, 28,199,193, 61, 82,126, 89,164, 51, 52, 52,180,204,247, 61, 44, 44,172,204, 53, 67, 67, 67,139,205, 79, 0, 16, 4, - 97,254,140, 25, 51,158,214,106,181,120,247,221,119, 47, 70, 71, 71, 35, 32, 32, 0,223,127,255, 61,130,130,130, 32, 8,194,197, - 47,190,248,130,220,186,117, 11, 95,127,253,245,143, 30,209, 45, 6,131, 81, 82,131, 5,160,208,247,251, 21,252, 94,200, 29,103, -190, 8, 84,229,202,149,229, 26,141,102,245,159,127,254,169,244,172,164,108, 54, 27, 12, 6, 3,140, 70, 35, 12, 6, 3,212,106, - 53,230,205,155,167,124,246,217,103, 87, 87,174, 92,185,102, 98, 98,162,181, 48, 77, 0,179, 79,156, 56, 33,113, 58,157,144,201, -188, 7,112, 56,142, 67,245,234,213,241,198, 27,111,160,117,235,214,170, 33, 67,134,204, 6,240,109, 17,154,238,255,253,182,119, -239,222,214,225,225,225,138, 53,107,214, 40,230,206,157,123,179, 71,143, 30,198, 23, 95,124, 81,151,153,153,169,235,213,171,215, - 86, 0, 85,125,217,119,151, 97, 11,122,242,201, 39, 27,204,154, 53, 43,240,236,217,179, 49, 83,166, 76,217,150,153,153,249,209, -212,169, 83,235, 45, 93,186,180,218, 39,159,124,162, 62,125,250,244, 71,132,144,229,222,222,109, 87,196, 19, 27, 50, 87,122,197, -254, 70,182, 10,209,156, 14,160,225,143, 63,254,120,177, 75,151, 46,229, 1,228, 2,208,187,205,215,215, 95,127, 45,106,211,166, -205,185, 55,223,124,179,161,107,221, 55,124, 76,103,137, 97,154, 15, 86, 83, 16, 4, 72, 36, 18,244,239,223, 31,132,144,124,239, -225,116,127,238,221,187, 23,157, 59,119,134, 68, 34,193,136, 17, 35,124,214, 28, 50,100, 8,156, 78,231,125,154,219,183,111,207, - 87,191,112, 28,231,147,166, 88, 44,134, 72, 36,202,247,223,194, 38,142,227,188, 69,181,188,166,211,215,169,224,123, 67, 31,134, -102,191,126,253,176,121,243,230, 82,107,186,150, 73, 79,158, 60,137,134, 13, 27, 98,233,210,165, 68, 36, 18,225,240,225,195, 80, - 42,149,120,249,229,151, 81,191,126,125,162, 80, 40,112,237,218, 53,228,228,228, 16,118, 30, 49,205, 7,165, 89,156, 29, 1,240, - 36,128, 48,220,123, 13,153, 1, 64, 16, 0,155,235, 26,119, 7,128,210, 53, 89,113,239,213,100,229, 92,255,205,192,189, 97,169, - 60,239,142,210,145,255,165,208, 77, 92,218,233,174,121,207,187, 30, 91,129,235,168,123,190,224,103, 62,109,206, 21,225,160,174, -169, 93,129, 12,244,201, 92, 21,118, 50,123, 57, 32,175, 79,156, 56, 49,194,211, 92, 89,173, 86,228,228,228,192, 96, 48,228,125, - 94,186,116, 9, 82,169, 20, 3, 7, 14,140,160,148,190, 94, 92,166,139, 68, 34, 36, 36, 36, 96,205,154, 53,184,126,253,254,174, - 86, 87,175, 94,197,215, 95,127,141, 47,190,248, 2, 57, 57, 57,238, 3, 85, 88,132,173, 92,221,186,117,227,234,215,175,127,171, -105,211,166,157,210,211,211, 21, 39, 79,158, 68,116,116,116,249, 63,254,248, 67, 27, 27, 27,171,139,143,143,199,197,139, 23,165, - 45, 91,182,140,126,226,137, 39,210, 26, 52,104,176, 32, 34, 34,162, 74,113,209, 43,135,195, 17,112,250,244,233,189, 27, 55,110, -228, 27, 55,110,140, 95,126,249,165,114,141, 26, 53,190, 76, 76, 76, 92, 58,127,254,124,115, 88, 88, 24,186,117,235, 86, 37, 50, - 50,210,167, 62, 15,132, 16, 43, 33,196,234,116, 58,143,120,139, 94, 81, 74,145,147,147,131, 27, 55,110, 28, 57,121,242,228, 49, -215,250,217,197, 68,175,158, 4,240,122,255,254,253,111,185,204, 85, 34,238,189, 51,207, 1,192,193,243,124, 78,118,118,246,173, -206,157, 59,135,180,107,215,238, 6,128,215, 93,255, 97,252,139,113, 58,157,144, 72, 36,216,180,105, 19,182,109,219,134, 29, 59, -118, 96,215,174, 93,216,189,123, 55,246,236,217,131,189,123,247, 66, 34,145, 96,255,254,253,216,191,127, 63,198,140, 25,227,179, -230,186,117,235,188,106,170, 84,170, 98, 13, 65, 65,120,158, 47,212, 80,252,252,243,207,224, 56,238, 62, 77, 66, 8, 69, 17, 47, - 78,119,167,211,219,212, 40, 38,198,171,105, 19, 4,129,248,146,206,141, 27, 55,194,233,116, 98,229,202,149,200,201,201,193, 79, - 63,253,132,228,228,100,204,153, 51, 7, 87,174, 92,193,244,233,211,113,242,228, 73,175,230,178,176,116,246,239,223, 31, 14,135, - 35, 47, 61, 25, 25, 25,248,254,251,239,113,227,198, 13,204,158, 61, 27,231,206,157,195, 39,159,124,226,147, 38, 0,136, 68,162, -215,151, 45, 91,230,220,185,115, 39,150, 44, 89,130, 21, 43, 86,224,202,149, 43, 80, 42,149, 80, 42,149, 72, 73, 73,193,197,139, - 23,177, 98,197, 10, 39, 33,100, 12, 59, 91, 24,101, 77, 97, 30,164, 0,109, 39, 78,156,216,145, 16,178,190,101,203,150,207, 3, - 8, 34,132,172, 7, 32,115,125,134, 78,156, 56,177, 41, 33,100,253,196,137, 19, 27, 3, 40, 71, 8, 89,239,154,239, 0, 32,212, - 61,239, 90, 63,172,128,121, 11,243, 88, 30, 86, 96, 93,153,183,249,130,159, 5,181,197, 30, 23, 99, 82,176, 34,242,172,204,202, -194, 96,105, 52,154, 30,221,186,117,147,122,154, 43,207,200,149,251,211, 96, 48,224,194,133, 11,168, 95,191,190, 84,163,209,244, - 0,240, 69,177,161, 56,177, 24, 58,157, 14, 25, 25, 25, 56,125,250, 52,162,163,163,225,112, 56,176,101,203, 22,100,101,101,229, -133,210,109,182,162,187, 12, 69, 68, 68,124, 63,116,232,208,222,163, 70,141, 18,253,245,215, 95,168, 83,167, 14,170, 84,169,130, - 3, 7, 14,192,110,183,163, 98,197,138,104,209,162, 5, 86,173, 90,133, 39,159,124,146, 27, 53,106, 84,216,153, 51,103, 70,124, -253,245,215, 45, 1, 60, 81,152,110,100,100,228,182, 6, 13, 26,196,156, 59,119,238,202,140, 25, 51,150, 38, 38, 38,246,157, 52, -105,146, 58, 46, 46, 46,180,127,255,254,221,182,108,217,114,225,163,143, 62,138,233,221,187,183,248,215, 95,127, 29, 1, 96,157, - 15,229,178,208,200,149,211,233,244,204, 83,113, 78, 78, 14, 7, 31,250,104, 17, 66, 58, 80, 74,201, 7, 31,124, 96,115,221, 17, -228, 69,210,236,118,187, 91, 83,224,121, 62,243,245,215, 95,183,236,222,189, 59,154, 16,210, 1,192, 9, 86, 77,252,123,113,159, -235,253,250,245,131, 88, 44,206, 59,175,183,111,223,142, 94,189,122,221,215, 4,213,189,123,119,159, 53, 7, 15, 30, 12, 74,105, -190,232,149,183,232,139, 47,134,192,173,233, 45,130,229,109,153, 47,154, 69, 69,155, 10, 70,241,253, 53,130, 3, 6, 12,128, 84, - 42,197, 75, 47,189, 4,169, 84,138,215, 95,127, 29, 18,137, 4,239,189,247, 30, 36, 18, 9, 26, 55,110,236,119, 58,215,174, 93, -139, 30, 61,122,228,165,167, 82,165, 74, 24, 55,110, 28,164, 82, 41, 26, 52,104, 0,169, 84,138, 22, 45, 90,248,148, 78,119,135, -246,250,245,235, 99,244,232,209,248,227,143, 63,176,120,241,226,188,223, 7, 12, 24,128,103,158,121, 6,185,185,185,136,136,136, - 16,235,245,250,171,177,177,177,172,227, 59,163,204,241,230, 65, 10, 32,159, 62,125,250, 52, 74,105,175,194, 52,220,191, 19, 66, -214,199,197,197,245,114,233,222, 55,239, 17,101,242, 52,111,245, 60, 35, 80,238,255,121,110,175,168,109, 23, 88, 63, 61,159,193, -114,237, 88,251,194,238, 22, 11, 54, 23, 20,252,238,203,201,108,177, 88,158,116, 71,175, 44, 22, 75, 62, 67,101, 52, 26,243, 25, - 45,155,205,134,170, 85,171,194, 98,177,248, 21, 29, 33,132, 32, 50, 50, 18,118,187, 29, 11, 23, 46,204, 51, 86,158, 38,161,152, -131,172,235,216,177,163,232,198,141, 27,208,235,245, 16, 4, 1, 7, 15, 30,132, 68, 34,129,217,108,134,205,102,195,170, 85,171, - 32, 18,137,112,245,234, 85, 40, 20, 10, 52,108,216,144,240, 60, 31, 92,132,105, 83, 53,111,222,188,222,156, 57,115, 2, 79,157, - 58,213,120,210,164, 73,129,171, 87,175, 94, 29, 29, 29,253,220,168, 81,163, 36,195,135, 15,143, 89,176, 96, 65,234,177, 99,199, -208,178,101, 75,104,181,218,202,165, 41,168, 86,171, 53, 95,222,186,163,131, 62, 22,242, 39, 1, 32, 56, 56, 56, 20, 64,146,123, -185,217,108,206, 59, 70, 70,163, 17, 22,139,197,174, 80, 40,100,158,255, 97,252,251, 13,214,230,205,155,243,245,235,145, 72, 36, -216,177, 99,199,125,253,123,228,114, 57, 54,108,216,224,147, 33,248,243,207, 63,189,246, 21,242,102,144,138,235, 51,228,214, 20, -137, 68, 88,186,244, 94, 87,197, 87, 95,125, 53,207,164,120,214, 73, 30,154, 24, 48, 96, 0,241, 37, 42,214,246,219,123,125,203, - 78,125,192, 23,106,176, 68, 34,145,207,102,104,213,170, 85,232,213,171, 23,214,175, 95, 95,228,103,215,174, 93,253,138,222, 1, -200,203,199,155, 55,111,122,213,157, 51,103,142, 47,125,176,122,108,222,188, 25, 1, 1, 1,121,205,130, 0,208,189,123,247, 49, -129,129,129,237, 44, 22, 75,191, 13, 27, 54, 32, 43, 43, 11, 85,171, 86, 69,120,120, 56, 14, 31, 62,204,250, 96, 49, 30, 72, 20, -171,160, 7, 41,128,121,194,132, 9,147, 8, 33,235, 39, 76,152, 48, 41, 46, 46,238,140,235,127,235, 11,232,172, 47,102, 59,110, - 19,228,110, 30,108, 82,192,188,185,155, 14,123, 22,241, 95, 91, 1, 67, 85,176,137,240,104,177, 17, 44,119, 37, 81, 92,244,202, -143, 59, 48, 49, 33,228, 62, 3,224, 45,130,229,112, 56,112,231,206, 29, 8,130, 32, 46,203,131, 88,156,193,186,115,231,206,155, -175,191,254,250,230, 47,191,252, 50,112,240,224,193,216,187,119, 47,234,214,173, 11,171,213,138,208,208, 80, 92,191,126, 29, 34, -145, 8, 23, 47, 94, 68,116,116, 52,212,106, 53, 62,250,232, 35,131,205,102,155, 88,152,102,106,106,170,169, 82,165, 74,187,255, -252,243,207,126,131, 6, 13, 18, 45, 95,190,188,250,255,254,247, 63,237,220,185,115,147,134, 12, 25, 82,121,240,224,193,162, 5, - 11, 22,136,175, 95,191,142,214,173, 91, 35, 40, 40, 72, 93,210,253, 51,153, 76,249,140,149,103,158,250,136,212, 85,144, 4,247, - 2, 79, 99,229,214,180, 88, 44,212,110,183, 19,207,255, 48,254,189,184,207,245,129, 3, 7,222,103, 82,164, 82, 41,182,108,217, -130,126,253,250, 65, 38,147, 65, 42,149, 34, 54, 54,214,103,205,103,159,125, 54,207,168,172, 91,183,174,208,104,145, 63,198, 69, - 36, 18, 97,228,200,145,144, 72, 36,248,233,167,159,240,191,255,253, 15, 34,145, 8,115,231,206, 5,199,113,152, 48, 97,130,167, - 38,245, 53,130,117,236, 93,203,189, 72,208,167, 34, 92,141,187,103,100, 42, 84,188, 55, 50,132,209, 96, 40,178,207,169, 55,205, - 23, 95,124, 17, 82,169, 20,175,189,246, 26, 36, 18, 9,222,125,247, 93, 72, 36, 18,196,198,198,222, 51,116,109,219,250,189,239, - 18,137, 4, 7, 14, 28,200,251, 94,187,118,109,212,175, 95, 31, 82,169, 20,205,155, 55,135, 84, 42,197, 83, 79, 61,229, 83, 58, -221,198,237,251,239,191,207,107, 18, 4, 0,153, 76,214,234,173,183,222,234,231,109,253,186,117,235,178, 19,134,241, 48, 34, 88, -214,184,184,184, 51,113,113,113, 94, 35, 84, 5, 35, 73, 69, 69,154, 60,140,213, 81,184,154, 3, 39, 76,152, 48, 9,247,250,110, - 29,245,225,191, 50,183,185, 42, 24,229,242,164, 96, 4,235, 99,111, 39,116,113, 6, 75, 44, 22,251,100,176, 84, 42,213,169,140, -140,140, 22,114,185, 28, 57, 57, 57,247, 93,180, 61, 77,129, 72, 36, 66, 90, 90, 26, 84, 42,213,169,178, 60,136,197, 53, 17, 38, - 37, 37, 29,142,138,138, 26, 58,114,228,200,247,236,118,123,125,177, 88, 44,179, 90,173,178, 63,255,252,147,108,217,178, 5,229, -203,151,199,155,111,190, 73, 13, 6,131,157, 16, 98,147, 74,165, 87, 77, 38,211,183,215,174, 93, 91, 84,148,238,205,155, 55, 7, - 69, 69, 69, 77, 75, 76, 76,124,109,242,228,201,218,113,227,198,133,255,239,127,255,203,137,143,143, 71,247,238,221, 17, 18, 18, - 2,163,209, 8, 0, 80,171,213,242,114,229,202,105, 50, 50, 50,140,126, 20,206, 66,141, 85,110,110, 46,178,178,178,124,213, 57, - 65, 8, 25, 96, 52, 26, 13, 26,141, 70,153,147,147, 99,247,140, 48, 26,141, 70,228,230,230, 66, 16, 4,241,173, 91,183,146, 1, - 60, 65, 41,101,205,131,143,137,193,218,176, 97, 67,161,209, 38,119,116,203,125, 67,181,101,203, 22,159, 52,215,174, 93,123, 95, - 84,204,215, 78,217,222, 52,221, 77,152,139, 22,221, 59,229,220, 77,131, 34,145, 8,227,198,141,131, 66,161,192,236,217,179, 49, -113,226,223,247, 60, 25, 25, 25,196, 23,227,210,120,134, 34,111,185, 59, 82,116,247,206, 29, 72, 36, 18,104,181, 90,240,206,188, -225,249,124,138,180,249, 58,249,115,140,138,138, 2,250,171, 9, 96, 93,207,158, 61,159, 14, 10, 10,194,176, 97,195,160, 84, 42, -209,183,111, 95, 88, 44,150, 65, 0, 48,125,250,244,188,124,156, 60,121, 50,166, 76,153,130,220,220, 92, 43, 59, 99, 24, 15, 40, -130,245,113, 17,171, 4,187,141,147,203, 12,249,170,187,222,115,125,183, 70, 65, 83,228,138,136,237, 41, 78,203,219,127, 11, 67, -236,118,142,133, 93,180,125,137, 94,185,159,234, 41, 14,179,217,188,125,215,174, 93, 77,158,121,230, 25,113, 81,205,131, 6,131, - 1,229,203,151,199,213,171, 87,157,102,179,121,187, 47,119, 96,101, 21,193,114,153,172,141, 0, 54,186,231, 67, 66, 66, 86, 27, -141,198,222,225,225,225, 18,155,205,134,172,172,172, 43, 87,175, 94,173,233,111, 1, 74, 74, 74,154, 20, 21, 21, 85,179, 67,135, - 14,125,123,244,232,129,176,176, 48,217,233,211,167,209,163, 71, 15,212,170, 85, 43,208, 29,101,210,104, 52,114,145, 72, 20,138, -123, 79, 65, 20,139,195,225, 40,212, 88,185,141,172,175, 77,132, 0,246, 3,192,103,159,125,102,253,236,179,207, 34,114,114,114, -140, 57, 57, 57,188,219, 88,229,228,228,192,100, 50, 17,181, 90, 45, 94,181,106, 85,152,231,127, 24,255,126,131,229,235,147,121, -190,154,126,119, 4,203,211, 24,120, 78,171, 86,173, 42,248,180, 31,241, 69,115,209,162, 69,120,229,149, 87, 32,151,203,177, 96, -193,130, 60, 13,207,104,152, 59,157,132, 16, 24,141, 70, 82,156,102,147,153, 74,156,155, 66, 32,149, 74, 81,125,146,237,190, 38, - 66, 0, 94,159, 74, 44, 74,243,135, 31,126,240,169,137,176, 71,143, 30, 62,107, 54,105,210, 4, 0,240,229,151, 95,226,153,103, -158,193,233,211,167,189,234,206,155, 55,175,216,252,140,143,143,239,243,228,147, 79, 86,119, 58,157,231,235,215,175, 47, 78, 73, - 73,193,128, 1, 3,176,124,249,114,184, 46,100,152, 48, 97, 66,190,255,228,230,230, 90,216, 25,195, 40,235,232,149, 15,171,165, - 23,232, 63, 69, 60,155,235,138,248, 44,184, 62, 60,150,121,234,166,227,222,195, 92,240,178,188,160,169, 42,184, 13,207,117,210, -239,139, 96,249, 82,233,150,214, 96, 9,130,240,229,228,201,147, 95,107,221,186,117, 72, 64, 64, 0,146,146,146,188, 70,176,180, - 90, 45,236,118, 59,118,237,218,149, 35, 8,194,151,197,200, 58, 29, 14,135, 56, 60, 60, 28, 25, 25, 25,121, 3,238, 21,132,227, - 56, 40,149, 74,119,148,200,175, 81,226, 57,142,179,230,228,228, 56,158,123,238, 57,201,156, 57,115, 96,177, 88, 44,165, 40, 72, - 27, 78,156, 56,241, 76,215,174, 93, 73,116,116,180,216,109,124,148, 74,165,216, 29,193, 82,169, 84, 74, 66, 72, 40,238, 61,193, - 87, 20, 10,151, 33,203, 6,128,131, 7, 15,158,117,155, 85,183,177, 50, 24, 12,120,255,253,247,235,186, 46, 10, 10, 20,211, 92, -146,156,156,188, 79,167,211,173, 88,186,116,233,160, 54,109,218, 36, 52,109,218, 84,151,149,149,149,101, 52, 26,109, 38,147,137, - 10,130, 32, 86,169, 84,146,173, 91,183,234, 47, 95,190,220, 17,192,138,228,228,228,125,172,138,248,247, 83,150,230,202,211, 16, - 20,140, 96, 21,252, 44,137,230,232,209,163,241,195, 15, 63,220, 23,193,154, 61,123, 54, 68, 34, 17, 62,248,224,131,188, 38,178, -226, 12,145, 91,243,236,100,224,137, 41, 20,247,186, 83,252, 29,193,210, 6, 4,220, 91,175,144,186,165, 40,205, 55,222,120, 3, - 82,169, 20,245,234,213,131, 68, 34, 65,179,102,205, 32,145, 72,208,177, 99, 71, 72, 36, 18,159,140,213,125,233, 60,123, 22, 82, -169, 20, 53,106,212,192,192,129, 3,209,172, 89, 51,180,110,221, 26, 82,169, 20, 93,187,118,133, 72, 36, 66,143, 30, 61,124, 50, -130, 0, 32, 22,139,191,153, 49, 99,134, 88,161, 80,192,110,183,195,104, 52,226,206,157, 59, 40, 44,130,101, 50,153, 20,236,108, - 97, 60, 4,142,254,195,186,165,222,158,216,151, 19,186,164, 79, 17, 22,124,219,118, 98, 98, 98,118,100,100,228,115,131, 7, 15, -254, 99,254,252,249,202,234,213,171,227,194,133, 11,200,204,204,132,221,110,135, 84, 42,133, 78,167,131,209,104,196,234,213,171, - 77, 38,147,233,185,228,228,228,236,162, 52, 1,124,216,173, 91,183, 79, 63,252,240, 67, 81,189,122,245,112,247,238, 93, 24,141, -198,188,202,133, 16,130,128,128, 0,168, 84, 42,156, 57,115, 6, 7, 14, 28,224, 1,124, 88,140,102, 62, 68, 34,209,205, 27, 55, -110,240,223,124,243, 13, 44, 22,139,149,231,249, 91, 62,132, 37,189,106, 18, 66,182, 37, 38, 38, 26, 0, 4,168,213,106, 33, 53, - 53,213, 2, 64, 33, 8, 2,159,158,158,110,195,189, 49, 60,168,200,139, 99, 45,168, 73, 41,181,186,150,203, 0, 32, 59, 59, 59, -159,177,114,127,242, 60, 47,243, 92,191,184,116, 18, 66, 94,163,148,182,120,229,149, 87, 98,186,117,235,118,249,185,231,158, 51, - 6, 7, 7, 7,114, 28,103,185,114,229, 74,246,138, 21, 43,130,175, 95,191,222, 17,192,109, 66,200,107,190,238,123, 41,195,199, - 76,243, 1,106,122,158,235, 37,237, 35, 85,152,166,187, 31,146,231,180,114,229, 74,175,154, 5, 77, 65, 97,154, 98,177, 24,111, -190,249,102,190,168,216,196,137, 19, 11,237, 35,101,181, 90, 73, 81,249,233,222,199,196, 25,249,155, 50,205, 38, 19,164, 82,169, -183,116,146,226,142,145, 68, 34,193, 55,223,124, 83,226, 8, 86, 81,233,236,211,167, 15,146,146,146, 32,145, 72,112,248,240,225, - 66, 35, 88,197,229,167,107, 95, 44, 91,182,108,129, 92, 46,199,234,213,171,157, 17, 17, 17,226,160,160,160, 66, 35, 88, 86,171, - 85,206,206, 35,166,249, 32, 52, 31, 55,138, 52, 88, 78,167, 19, 21, 43, 86,204, 51, 79,132, 16,247,168,200,121, 33,120,145, 72, -228, 83,223, 9,143, 8,201, 95,145,145,145,253,250,246,237,251,235, 75, 47,189,164,173, 83,167,142, 36, 58, 58, 26,102,179, 25, -137,137,137, 72, 76, 76,116,238,216,177, 35,199,100, 50, 13, 77, 78, 78,254,171, 56, 61,189, 94, 63, 61, 50, 50,114,221,243,207, - 63, 63,253,201, 39,159,236,253,214, 91,111,161,106,213,170,200,206,206, 70,112,112, 48,194,194,194,112,253,250,117,172, 94,189, - 26, 89, 89, 89,127, 82, 74, 39, 36, 39, 39, 95,240, 39,147, 20, 10,197,204,233,211,167,119,136,136,136,120, 34, 35, 35,227,150, - 72, 36, 26, 95,210, 12,215,235,245,169,155, 55,111,190,244,236,179,207, 70,236,219,183, 47,149, 16, 98, 29, 52,104, 80,244,193, -131, 7, 83, 9, 33,214,193,131, 7, 71, 31, 56,112, 32, 85,175,215, 31,241, 39,137, 0,208,181,107, 87, 75,193,139,148, 71,228, -202,103,146,146,146,238,234,116,186, 70,148,210,121,155, 55,111,238,191,121,243,102,111,230,123, 53, 33,100,116, 82, 82,210, 93, -118, 26, 61, 62, 17,172,162,158,240, 43,169,230,234,213,171,189, 70,174, 10,106,250, 90,143, 20,188,201, 43, 24,101,247,114, 33, -160,101,185,239,254,164,211,109,250,154, 54,109, 10,137, 68,130, 14, 29, 58,228,139, 92,249, 19,193,114,107,214,172,121,175,119, - 66, 84, 84, 20,178,178,178,208,161, 67, 7,116,233,210, 5, 98,177,184, 68,186,130, 32,188,178,110,221, 58, 39, 0, 21,128, 55, -244,122,253, 85,119, 84,209, 91, 4,139,193, 96,148,210, 96, 73, 36,146, 52, 95,223, 45,232, 70, 38,147,165,249,104,178,182, 84, -173, 90,181,234,194,133, 11,223, 84,171,213,157, 44, 22, 75, 3,151,145, 57,149,155,155,187,141,227,184,175,147,147,147,125,238, - 52,228, 50, 76, 79,235,116,186, 86,207, 63,255,252,231, 45, 91,182,108, 49,114,228, 72,136,197, 98,172, 92,185, 18, 73, 73, 73, - 7, 1,188,167,215,235, 75,212, 87, 40, 49, 49, 49, 27, 64,243,178,200,112,215, 75,172,155,150,229, 65,244,136,100, 21,249,187, -159, 70,240, 14,128, 1,145,145,145,173, 1,180,230, 56, 46,198, 85, 25, 39, 0,216,199,154, 5, 31, 47, 4, 65,200,123,173,140, -123,114,143,188, 94, 82,115, 37, 8, 2,194,194,194,242,233,185,135, 82, 40,162, 89,176,216, 1, 60,195,194,194,242,110,246, 60, -211, 89,152, 38,165, 20, 54,155,173,200, 78,238,225,225,225,247,221, 60,250,250,240, 78, 97,233,116,107,122,166,211,179,111, 88, - 73,242, 51, 60, 60, 28, 6,131,193,159,116, 22,235, 6,143, 31, 63,158, 1, 96,160,123, 62, 54, 54,118,221,249,243,231,159, 46, - 44,130,197, 96, 48, 74,105,176, 14, 29, 58, 20,241, 32, 55,124,237,218,181, 28, 0, 83, 93, 83,153,224, 50, 80, 45,117, 58, 93, -159, 3, 7, 14,124,224, 90,252,169, 94,175, 95,251, 95, 56,152, 62,118, 20,244, 11,151,145, 98,102,234,241,142, 92,165,117,235, -214, 45,220,223,255, 21,117, 67, 37,145, 72,210,186,118,237,234,183,166, 92, 46, 79, 45, 66, 51,185, 71,143, 30, 21, 75,144,206, -204,168,168, 40,190,172,110, 36,125, 72,103,137, 52,139,203,207,178, 78,103, 97,196,199,199,247,209,233,116, 9,161,161,161,213, - 45, 22,139,204, 98,177, 72, 61,163,226, 74,165, 50,157,157, 53, 12, 70, 41, 12,214,191, 25,151,161, 90,203, 14, 47,131, 81, 60, - 15,226,102,234, 65,104, 30, 56,112,160,210,127,117,223, 31,244, 13,175,151, 58, 52,134,157, 25, 12, 70,233,224, 88, 22, 48, 24, - 12, 6,131,193, 96,148, 45, 4, 64,125,111, 63,248,243,116, 0, 33,164,190,191, 27, 46, 78,159,105, 50, 77,166,201, 52,153, 38, -211,100,154,143,159,102,113,218,143,203,211,137,196,215,177, 82, 74, 36,206, 30, 97,101,154, 76,147,105, 50, 77,166,201, 52,153, -230,127, 16,214, 68,200, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, - 96, 49, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193,120,100,120,160, 79, 17, 50, 24, 12, 6,131,193, 96,252, - 23,201,139, 96, 17, 66,118, 19, 66,118,179, 44, 97, 48, 24, 12, 6,131,241, 79,242, 56,122, 16,177,107,199, 40,128,246,236, 16, - 51, 24, 12, 6,131,193,248,135,205,213, 99,233, 65, 8,165, 20,132, 16,250, 32, 94, 20,204, 96, 48, 24, 12, 6,131, 81,156,193, -122, 28, 61, 8,235,228,206, 96, 48, 24, 12, 6,131,241,128, 12,214,199,172, 15, 22,131,193, 96, 48, 24,140,135,192, 99,233, 65, -242,158, 34, 36,132,180, 3, 0, 74, 41, 51, 89, 12, 6,131,193, 96, 48,254, 57, 51,242, 24,122, 16, 54, 76, 3,131,193, 96, 48, - 24, 12, 70, 25,243, 64,251, 96, 17, 66,234, 51, 77,166,201, 52,153, 38,211,100,154, 76,147,105, 50,131,197, 96, 48, 24, 12, 6, -131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48, 24,204, - 96, 49, 24, 12, 6,131,193, 96, 60, 36, 8, 0,175, 79, 2, 80, 74, 79,251, 44, 82,130,167, 9,138,211,103,154, 76,147,105, 50, - 77,166,201, 52,153,230,227,167, 89,156,182, 63,254,227,145, 54, 88,190,140,131, 69, 92, 47, 10,242, 91,156,144,250,101,157, 81, - 69,105, 18, 66,136,235,224,208,178, 76,103, 73,246,255,159,222,119,166,201, 52,153, 38,211,100,154, 76,243,223,172,249,184, 33, - 46, 38, 3, 57,220,107, 70, 36,132, 16, 1,128, 64,203, 96,100, 82, 15, 93, 0, 16, 92,158,136,150, 66,143, 0, 16,185,247,135, - 16,226, 4,192,151, 54,173, 15,106,255,255, 21,206,251, 94,158,186, 95,190, 73, 75,224, 91, 25, 12, 6,131,193, 96, 6,171,224, -197,245,137, 39,158,144,180,110,221,250, 84, 96, 96, 96, 45,207,223,122,247,238, 13, 0,176,219,237,252,150, 45, 91,196,254,110, -176,110,221,186,210,162,116,121,158,231, 55,110,220,232,179, 46, 33,132, 68, 71, 71,203, 42, 84,168,112, 50, 48, 48,176,166, 55, - 77, 65, 16,248, 13, 27, 54,248,165, 89,220,254,251,155,206,127, 19, 58,157, 78, 92,179,102,205,193,106,181, 90,233,185, 60, 54, - 54,214,157, 63,244,216,177, 99, 11,217,233,195, 96, 48, 24, 12,134, 31, 6,171,122,245,234,210,176,176,176, 35,209,209,209, 53, - 23, 46, 92,136,147, 39, 79, 34, 38, 38, 6, 14,135, 3, 78,167, 19,130, 32, 96,200,144, 33,162,146,152,171,176,176,176,163,110, -221,212,212, 84, 40,149,127, 95,195,121,158,199,176, 97,195,124,214,117,155,171,232,232,232, 35, 85,170, 84,169,177, 96,193, 2, - 92,188,120, 17, 85,170, 84,129, 88, 44,134,221,110, 71,110,110, 46, 70,142, 28,233, 87, 90, 11,219,127, 65, 16,224,112, 56,192, -243, 60, 6, 15, 30,236,247,254, 55,109,218, 52,149,231,249,112, 95,214,149, 72, 36,105,135, 14, 29,138, 40,110,189,102,205,154, -165, 58,157, 78,159, 52,165, 82,105,218,193,131, 7, 35,138, 51, 87, 90,173,118, 72,157, 58,117, 20, 43, 87,174,196,237,219,183, -161, 82,169, 32, 8, 2, 4, 65,128,221,110, 71,191,126,253, 8, 59,117, 24,140,135, 15, 33,132, 40, 20,138,111, 45, 22,203,235, - 37, 9, 49,251, 83,127,248, 83,143, 16, 66, 42, 3,232, 45, 18,137,106, 72, 36,146,218,148,210,202, 78,167, 51,194,245,255, 84, -145, 72,148,232,112, 56, 46,216,108,182,203, 0,254,164,148, 38,178,163,201,120,236, 13, 22, 33,132,107,223,190,253,142, 74,149, - 42,213, 95,184,112, 33, 17,137, 68, 56,112,224, 0,146,146,146, 16, 25, 25, 9,173, 86, 11,133, 66, 81,146,138,128,107,223,190, -253, 78, 79,221,245,235,215, 35, 42, 42, 10, 17, 17, 17,208,104, 52, 37,209, 21, 69, 71, 71,239,172, 92,185,114,189, 5, 11, 22, -228,165,213, 96, 48, 32, 48, 48, 16,185,185,185, 72, 75, 75, 43, 73, 58,203,124,255, 93, 6, 50,124,207,158, 61, 80,169, 84, 69, -174,151,153,153,137,206,157, 59,251, 84,233, 57,157,206,240,189,123,247,230, 51,170,122,189, 30, 63,252,240, 3,222,121,231,157, -188,109,165,164,164,160, 87,175, 94,225,197, 85,214, 53,107,214, 28,236, 54, 87, 34,145, 8,203,150, 45, 67,100,100, 36, 66, 66, - 66,136, 66,161, 32,114,185, 28,148, 82, 90,210,126,121, 12, 6,163, 12, 43,112,177,184,163, 72, 36, 26, 38, 22,139,215, 0,216, -238,239,255,189,213, 31, 0, 32, 8, 2,120,158,207,187,177, 18, 4, 33,111,121,199,142, 29,139,171, 71,122,148, 43, 87,110,117, -243,230,205,197, 97, 97, 97, 98,165, 82, 9,181, 90,141,160,160, 32, 40, 20, 10, 8,130, 16,237,116, 58,163,173, 86,107,251,180, -180, 52,231, 31,127,252,241, 57, 33,164, 31,165,116, 35, 59,162,140,199,214, 96,185,250,221,112,106,181,186,229, 15, 63,252, 0, -145, 72,228,190, 99,129, 66,161,128, 82,169,132, 66,161,128, 66,161, 0,207,243,232,221,187,119,190, 11,108, 97,205,134, 69,233, - 42,149,202,124,186, 0,242,233,218,108, 54,254,175,191,254, 42, 76, 83,172,209,104,154, 47, 92,184, 48, 79,147,231,121,100,101, -101,193,110,183,195, 96, 48, 32, 61, 61,221,175,187, 65, 95,247,191,164, 72,165, 82,172, 89,179, 6, 82,169,244,190, 73, 38,147, -229,125,247, 87,115,231,206,157,249,180, 0, 64,165, 82, 97,251,246,237, 8, 10, 10, 66, 96, 96, 96,113,251, 14, 0, 68,173, 86, - 43,221,230,202,173,237,116, 58, 37,179,102,205,250, 84,163,209, 4,186,162, 92,208,233,116,243, 75,218, 4,203, 96, 48,202,134, -160,160,160,247, 87,173, 90, 37,239,223,191,255,164,146, 24, 44, 0, 80, 42,149,216,178,101, 11,196, 98, 49, 36, 18,137,215,201, -253, 91,112,112,176,187,174, 40,170, 62,250,120,229,202,149,242,165, 75,151,226,202,149, 43, 0, 0,153, 76, 6,181, 90, 13,173, - 86,139,144,144, 16, 4, 7, 7, 35, 52, 52, 20, 79, 62,249,164,120,196,136, 17,226,150, 45, 91,126, 12,128, 25, 44,198,227, 29, -193,130,171, 99,243,201,147, 39,113,224,192, 1, 72,165, 82,132,133,133, 33, 40, 40, 40,207, 96,200,229,114, 12, 26, 52, 8, 47, -188,240, 2,172, 86, 43,108, 54, 27,156, 78, 39, 94,126,249,229,124,205,102,222,158, 48,200,200,200,192,218,181,107, 33,147,201, - 16, 26, 26,154, 23, 17,114,235,182,111,223, 30,227,198,141, 3,165, 20,153,153,153,197,105, 18, 0,184,116,233, 18,246,239,223, - 15,167,211, 9,165, 82, 9,135,195,129,212,212, 84,156, 61,123, 22,137,137,137,200,205,205, 69,183,110,221,126, 20,139,197, 31, -173, 95,191, 94, 95, 48, 77,222, 52,139,219,255,226, 40,236,233, 10,135,195,129,190,125,251,130,227,184,188,202, 75, 42,149, 66, - 34,145,228, 25,172,221,187,119,251,173,217,177, 99, 71,136,197, 98,136,197, 98, 36, 36, 36,228,253,214,191,127,127, 72, 36, 18, -156, 60,121,210,103,205,148,148, 20, 44, 89,178,196,109,250, 36,191,254,250,235,180, 26, 53,106,104,230,206,157,235,181,201,112, -204,152, 49, 34, 95,210, 89, 26,152, 38,211,100,154,247,221, 20,149, 27, 61,122,116,189,170, 85,171, 34, 34, 34,162, 6, 33,164, - 28,165, 52,163, 36,154, 98,177, 24,148, 82,252,245,215, 95,184,124,249, 50,182,110,221, 10,155,205,134,160,160, 32, 4, 5, 5, -161,113,227,198, 24, 49, 98, 4, 66, 66, 66, 80, 48,112, 93, 80,147, 82,186, 24, 64,163,161, 67,135,146,141, 27, 55, 34, 35, 35, - 3, 6,131, 1,118,187, 29, 14,135, 3, 98,177, 24, 42,149, 10, 26,141, 6, 81, 81, 81,224, 56,142,218,108,182,197,236,184, 51, -205, 98,104, 2, 32,204, 99,222, 6, 64,230,241,153, 14,224,168,151,245,220,203, 37, 0,158,116,253,198, 3, 48, 0, 8,242,162, - 87,152, 78, 6,238, 61,240, 21, 86, 96,253,130,219,201,111,176, 8, 33,238, 51,166, 61,128,125, 0, 16, 19, 19, 3,189, 94, 15, -185, 92,142,160,160, 32, 52,105,210, 4, 0, 96, 48, 24, 32,151,203,177,102,205, 26, 72, 36, 18,168,213,234,188,169,136, 3, 65, - 93, 79,225, 65,165, 82,161, 66,133, 10, 80, 40, 20,232,216,177, 35,174, 94,189,138, 42, 85,170,228,233,158, 60,121, 18, 75,151, - 46, 69, 64, 64, 64,145, 81, 23,151,166, 3, 0,170, 86,173,138,172,172, 44,100,103,103,195,225,112,224,232,209,163,232,218,181, - 43,186,119,239, 14,181, 90,141,140,140, 12, 28, 59,118,172,215,244,233,211,251,247,234,213,107,200,250,245,235, 55, 21,151,206, -130,251,239, 54, 88,114,185,220, 39,131, 85, 24, 14,135, 3,127,253,245,151,215, 8, 86,193, 8,148, 63,154, 71,143, 30,245,250, -255,109,219,182, 33, 48, 48, 16, 50,153,172,184,147, 37,175, 28,168,213,106, 68, 70, 70, 66, 42,149,146,239,191,255,254,211,154, - 53,107,106,230,206,157, 75, 60,155, 12,195,195,195,161, 86,171, 75, 21,205, 99, 48, 24, 37, 39, 32, 32,224,205, 97,195,134, 5, -223,188,121, 19,125,250,244, 41,159,150,150,246, 38,128, 15, 74,116,167, 45, 22,227,189,247,222,195, 43,175,188,130,126,253,250, - 97,239,222,189, 24, 62,124, 56, 94,127,253,245,124, 17,172,226,162, 87,174,250,104,193,243,207, 63,255,202,170, 85,171,106,191, -245,214, 91, 28, 0,200,229,114,168, 84, 42, 16, 66, 96,177, 88,242,166,243,231,207, 11,163, 70,141,186,104,179,217, 22,176, 35, -250,223,197,211,131, 80, 74,119, 23,178, 90, 24, 33,100,189,199, 53,171, 23, 33,100,189,231,103, 97,235,185,190,182,157, 56,113, - 98,227,233,211,167, 79,107,209,162,197,178, 3, 7, 14,252, 86,152, 94, 97, 58, 19, 39, 78,172, 55,125,250,244,105,158,235,123, -217,206,253, 17, 44,119,183, 26,120,140,238, 30, 25, 25,153,215, 52,150,150,150, 6,165, 82, 9,141, 70, 3, 65, 16,160,209,104, -160,209,104,160, 86,171,161, 82,169,138, 52, 88,238, 77,184,191, 68, 68, 68, 64,161, 80,224,183,223,126, 67,181,106,213,176,105, -211, 38, 40, 20, 10,136, 68,162,188, 59, 27,247, 84, 12, 60, 0,136, 68, 34, 4, 6, 6,194,225,112, 96,199,142, 29,120,235,173, -183, 32, 8, 2,174, 94,189,138,121,243,230, 97,236,216,177,104,216,176, 97,185,159,126,250, 41,229,229,151, 95, 94,222,167, 79, -159, 39,214,174, 93,123,187, 16, 77,193,219,254,171, 84,170, 60,131,229,110, 62, 43, 9, 60,207,163, 79,159, 62,121, 81,171,130, - 77,132, 50,153, 12,219,182,109,243, 91,179, 91,183,110, 16,139,197,144, 74,165, 56,112,224, 64,222,111,131, 6, 13,130, 84, 42, -197,177, 99,199,124,186, 41, 1,238,245,179, 40, 87,174, 28, 17,137, 68, 68,171,213, 6,206,157, 59,247,190,230, 82,183,209, 44, -141,217,100, 48, 24,190, 33,149, 74,103, 73, 36,146, 65,181,107,215,182, 85,171, 86, 77,194,113, 28,250,245,235,167,170, 87,175, - 30,249,235,175,191,208,178,101, 75,238,218,181,107,175,140, 28, 57,242, 5,142,227,144,148,148,228, 56,115,230,140,204,102,179, -173, 72, 75, 75,123,187, 56,125,155,205,134,180,180, 52, 84,171, 86, 13,231,206,157, 67, 70, 70, 70, 94,157,226, 57,113, 28,135, -226,186, 94, 82, 74,109,132,144, 86,189,122,245, 58, 58,123,246,236,106,117,235,214, 37,185,185,185,200,205,205,133,201,100,130, -251,251,233,211,167,233,111,191,253,118,205,100, 50,181,164,148,218,216, 81,254,111,227,225, 65, 72, 49,235,245,242, 81,207,189, - 94,170,235, 83, 62,125,250,244,105, 5,255, 95,156,158,231,239, 5,254,111, 43, 96,202, 82, 11, 53, 88,158, 81,156,222,189,123, -131,231,121, 4, 4, 4, 64, 46,151, 67,161, 80,160, 92,185,114,249,214,211,106,181,249,162, 87,197, 25, 44,183, 46,165, 20, 90, -173, 22, 53,106,212,200,251,173,123,247,238,112, 95,216,221, 6, 75,171,213, 22,107,176,220,154,118,187, 29, 70,163, 17,201,201, -201,232,218,181, 43, 40,165,184,116,233, 18,164, 82, 41,126,252,241, 71,188,241,198, 27,176, 88, 44, 80,171,213,229, 95,122,233, -165,171, 43, 86,172,248, 10, 64,191,162, 52, 93,119,136,121,251,239, 54, 19,110,163, 33, 22,139,243,245, 21, 19,139,197,105,127, -252,241, 71,177, 79,253,241, 60,143,109,219,182, 21, 25,189,146, 72, 36,126, 27,172,253,251,247,123,141, 96,109,222,188, 25, 65, - 65, 65,197, 70,176,220, 81,172,216,216, 88,240, 60, 15,181, 90, 13,142,187,231,181, 61,155, 12, 67, 66, 66,160,213,106,253,106, - 46,101, 48, 24,165,195,225,112,124, 42,147,201, 98, 94,125,245,213,102,157, 59,119,150,137, 68, 34,136, 68, 34, 92,189,122, 21, -114,185, 28, 90,173, 22,243,230,205, 11,117,215, 81,251,247,239,183,189,240,194, 11,135,211,211,211, 63,245, 49, 26,134, 85,171, - 86, 65, 42,149, 98,243,230,205,208,106,181, 24, 60,120, 48, 2, 3, 3,241,214, 91,111,225,217,103,159,205, 51, 88, 62, 94,220, -178, 9, 33,173,198,141, 27,119,116,198,140, 25,149, 42, 85,170, 4,187,221, 14,155,205, 6,187,221,142,171, 87,175,226,183,223, -126,187,101, 50,153, 90, 81, 74,179,217, 17,102,248, 17,237, 90,239,139,201,242, 88, 47,222,181,200, 60, 97,194,132, 73,132,144, -245, 19, 38, 76,152, 20, 23, 23,119,198, 23,189, 66,126,223,224,250,236,233,177, 44,190, 88,131,229,121,209,118, 95, 64,203,149, - 43, 7,135,195, 1,145, 72,148,119,130,125,247,221,119,248,238,187,239,242,214,207,206,206,246, 53,115,160, 80, 40,220,205,118, -232,222,189, 59,118,238,220,137,118,237,218, 1,128,191, 17,172,123,185,102, 54, 35, 61, 61, 29,199,143, 31, 71,207,158, 61,145, -152,152,152,215,159,137,227,184,188,200, 14, 33, 4, 93,186,116,193,143, 63,254,216,218, 23,211, 82, 48, 82,227, 25,185,138,142, -142,198,236,217,179,243,230,123,247,238,237,211, 83,127, 60,207,163,111,223,190,247, 69,173,100, 50, 25,228,114, 57,100, 50, 25, - 54,108,216,224,119,161,123,230,153,103,242,244,182,110,221,154,183,124,232,208,161,144,203,229,216,187,119,175, 63,119, 18, 80, - 42,149,212,109,244,220, 77,134, 10,133, 2, 90,173, 22, 1, 1, 1,249,242,134,193, 96, 60,240,187,251, 44, 0,237, 2, 2, 2, - 62, 44, 95,190,252,235,111,188,241, 70, 88, 68, 68, 68,222,249,168,213,106, 97, 52, 26,145,157,157,141, 17, 35, 70,164, 95,184, -112, 97, 78, 82, 82,210,167,190,234,187,155, 0,157, 78, 39, 54,110,220,136, 57,115,230,160, 99,199,142,247,117,116,247, 37,130, -229,145,230,116, 66, 72,235,119,223,125,247,208, 39,159,124,162, 11, 13, 13,133,221,110,199,141, 27, 55,240,211, 79, 63,233, 77, - 38, 83,107, 74,105, 58, 59,186, 12, 63,207, 5,119,180,200, 91, 64,163,167,151,200, 83, 19,220,235, 27,101,141,139,139, 59, 19, - 23, 23,215,139, 16,178, 62, 46, 46,174, 87, 17, 17,172,158,197, 68,184,122,226, 94,159,171,162,207, 43, 15,227, 67,113,175, 15, - 86,222, 69,214,125, 1,117, 56, 28,247, 69, 85,166, 77,155,134,190,125,251, 66,173, 86, 35, 42, 42,202,151, 38,194, 60,131, 85, -161, 66, 5, 24,141, 70,116,239,222, 29,130, 32,128,227,184,188,199,128, 61, 13,150, 86,171,245, 73,211, 96, 48, 32, 53, 53, 21, -137,137,137,144, 74,165,224,121, 30,131, 6, 13, 66, 98, 98, 34, 2, 3, 3,243,140,139, 84, 42,133, 70,163,137,112, 56, 28,170, -238,221,187,203, 54,109,218, 84,104, 88, 90, 16,132, 66,205, 21, 0, 40, 20, 10,236,218,181,203,239,167, 10,221, 29, 73,139,138, - 96,137,197,254, 63,144, 87, 48, 42,230,102,253,250,245,197, 62, 65,232, 13,185, 92,158,167, 35, 8, 2,194,195,195, 33,151,203, -243, 61,245,201, 12, 22,131,241,207,146,147,147,243,137, 84, 42,221,250,227,143, 63,254,185,123,247,238,176,139, 23, 47,230,171, - 47,187,117,235,150,118,252,248,241,167,205,102,243, 17,127,116,121,158,207,139, 94, 69, 71, 71,163, 67,135, 14,247, 53, 15,250, - 19,193,242,168,239,110, 19, 66,218,127,243,205, 55,135,103,207,158, 29,108, 52, 26,177,104,209,162,108,163,209,216,158, 82,122, -155, 29, 81, 70, 97, 30,164, 24,226, 11, 68,143,224,238, 15,229, 54, 68, 5,231, 1, 4,187,151, 77,152, 48, 97,146,175,255,243, -156,119, 71,192,138, 48, 94,247, 27, 44, 74, 41, 41, 44,210, 36,147,201, 32, 18,137,242, 12,144, 27,119, 19,158, 78,167, 3,207, -243, 62,117,126,116,235,230,230,230, 66, 38,147,229, 27, 91,197,141, 74,165,202,211,246,181,179,119,118,118,118,222,120, 87,169, -169,169, 80,169, 84,216,180,105,147, 87,243, 98,183,219, 83,164, 82,105,112, 81,230,202,211, 68,185,247,223,219,111,110,163, 81, -112, 12,153,226, 12,150,183,199,160, 75,218, 60,232,206, 83,207, 33, 30,220,249,150,149,149,149, 23, 29,243,183,178,117,153, 39, -234,158, 87,171,213,247, 53,151, 50,131,197, 96, 60,148, 59,120,245,176, 97,195,212,130, 32, 64,171,213,230,213,151, 42,149, 10, -157, 59,119,150, 39, 36, 36,168,253,212,195, 31,127,252,129,243,231,207,195, 98,177,224,243,207, 63,247,106,174, 74,114,227,231, -210,191, 18, 19, 19, 35,116,235,214, 13, 7, 15, 30,132, 92, 46,119, 80, 74,175,176, 35,201,240, 40, 35,190, 24,136,140, 2,125, -157,220,243,182, 2,102,167,224,124,193,245, 1, 32, 13,128,168,152,255, 21,156,207,136,139,139,219,229,142,124,185,116, 69,133, -245,191,202, 23,193, 42, 16,189,225,251,247,239,159,207, 85, 72, 36, 18,188,252,242,203, 56,127,254, 60,212,106, 53,194,194,194, -252, 54, 87,130, 32,240,158, 35,192,139, 68, 34,244,236,217, 19, 55,111,222,204,235, 40, 31, 26, 26,234,239,160,163,252,148, 41, - 83, 68, 0,224,116, 58,177,107,215, 46,116,233,210, 5, 54,155,205,171,193,250,227,143, 63,120,165, 82,121,160,184,116,246,235, -215,207,107, 79,118,137, 68,130,134, 13, 27, 34, 36, 36, 36, 95, 52,199, 87,174, 28,253, 12, 63,175, 53,149,105,225,140,223,246, - 30,150,109,113,222,183,124,220,184,113,126,107,137,197, 98,218,171, 87,175,188, 3, 26, 25, 25,153, 23,205,244,102,174,152,193, - 98, 48,254, 89, 34, 34, 34,222,239,211,167,143,210,102,179,225,218,181,107,194,148, 41, 83,238,204,153, 51, 39,180, 73,147, 38, -220, 43,175,188, 18,176,116,233,210,247, 1,236,240, 85,207,102,179,225,211, 79, 63, 5,165, 52,223,205, 46, 33, 4,132,144,124, - 93, 67, 74,113, 1,101, 7,142, 81, 90,142, 20, 51,239,239,255, 31, 56, 94, 13,150,183, 65, 35,123,247,238, 77,219,181,107,135, -154, 53,107,230,245,201,113,155,164,130, 81, 40,143, 19, 52,223,219,182, 11,234,246,238,221,155,246,235,215, 15,167, 79,159, 70, - 96, 96, 32, 2, 3, 3, 17, 16, 16, 80,228, 72,231, 5, 53,255,252,243,207, 60,205,126,253,250,149,255,225,135, 31, 46, 52,109, -218, 52, 39, 56, 56,184,162,187,239,149, 59, 50,148,153,153,121,225,187,239,190,139, 10, 9, 9,233,225, 79, 58, 11,166,249,195, - 15, 63,196,217,179,103,139,140, 96,121,123,211,184, 92, 46, 79,108, 91, 63,163,114, 98,118,247, 98, 15,204,245,235,215,111,248, -162,169, 80, 40, 18,187, 52, 49, 84, 78,177,250,164,153, 88,156,230,225,195,135, 23, 22,216,223,239, 93,105,207,235, 39,230,158, -100, 50,153,215,138,151,189, 97,158,105, 50,205, 7,163, 73, 8, 41,215,162, 69,139, 26,132, 16,252,240,195, 15,185,243,230,205, - 75, 72, 74, 74,122,121,192,128, 1, 63,191,246,218,107,141,222,125,247, 93, 77,149, 42, 85, 10, 29, 19,203,155,230,150,101,195, -176,102,183,228,129,238,187,167,193,242,197,108,177,227,254,223,212,124,220, 16,251,153,161,121, 67, 51,120, 51, 84, 37,193,100, - 50,229,235,212,238,107,199,118,111,252,254,251,239, 41,189,122,245,122,118,212,168, 81,203,135, 12, 25,114,189, 79,159, 62, 80, -171,213,225, 22,139, 37,117,229,202,149,252,247,223,127, 95, 33, 52, 52,116,196,250,245,235,175,151, 54,221, 42,149, 42, 95, 51, -161, 47,216,237,246, 22,173, 95, 76, 57,104,177,124, 91,185,168,245,228,114,185,222,233,116,182,246, 69,211,102,179,181,104,243, - 82,234, 65,179,185,104, 77,165, 82,153,104,181, 90, 91,148,100, 95, 61,154, 12,243,117,198, 47,205,112, 21, 12, 6,195,127,194, -195,195,199, 62,251,236,179,229,159,125,246,217,244, 75,151, 46,125,151,146,146, 50,213,245, 83, 59,157, 78,247,209,142, 29, 59, - 94, 27, 57,114,100,249,115,231,206,141, 5,240,126,113,122,114,185, 60,177, 79, 91,103,229, 44,116,242, 57, 13,137,137,137,165, -122,111, 32,139,102, 49,152,193, 42, 64,193,230, 61,111, 72,165, 82,222,207, 11, 55, 63,122,244,232, 34, 53, 37, 18,137, 95,154, -235,215,175,223,212,167, 79,159, 39,214,175, 95,255,197,242,229,203,219,218,237,118,165, 68, 34,209,170, 84,170,131,161,161,161, - 61,214,173, 91,119,181, 52, 25, 38,145, 72,210,188, 61, 49, 40,149, 74,139,125,233,225,209,163, 71, 83, 1, 84, 41,203, 3,248, - 32, 52, 11, 30,166, 87, 94,121,165,200, 99,164, 86,171,121,118, 42, 49, 24,255, 64,133, 45, 22, 87,255,226,139, 47, 46,166,165, -165,141, 48,155,205,135, 60,127,211,235,245, 83,149, 74,229,182,235,215,175,255, 32, 18,137,170,251,119,211,247, 93,101, 95,214, - 47,233,141, 26,207,243, 36, 57, 57, 25, 51,102,204,200,205,200,200,216,199,142, 36,131, 25, 44, 15, 30,196,187,230, 54,110,220, -248, 64,222, 95,231, 26, 68,116, 16, 0, 20,247,180,160,191,252,254,251,239, 17,255,165, 2,226,217, 4,203, 96, 48, 30, 46, 73, - 73, 73, 3,139,250,221,101,186,158,120,132,110,208, 0, 0,201,201,201, 39,234,214,173,123, 41, 43, 43,107, 6,165,244, 22, 59, -146, 12,102,176, 30, 3,202,210, 92, 49, 24, 12, 6,195,127,238,220,185,211,137,229, 2,227,191, 6,199,178,128,193, 96, 48, 24, - 12, 6,163,108, 33, 0,234,123,251,193,159,167, 3, 8, 33,245,253,221,176, 15,111,138,103,154, 76,147,105, 50, 77,166,201, 52, -153,230, 99,166, 89,156,246,227,242,116, 34,121,144, 79,116,176, 71, 88,153, 38,211,100,154, 76,147,105, 50, 77,166,249, 95,132, - 53, 17, 50, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6, -131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48, 30, 25, 8,123, 47, 20,131,193, 96, 48, 24, 12, 70,217,194, 34, 88, - 12, 6,131,193, 96, 48, 24,101,140, 24, 0, 8, 33,121, 97, 44, 74, 41, 97,217,194, 96, 48, 24, 12, 6,227,159,224,113,245, 32, - 98,102,172, 24, 12, 6,131,193, 96, 60, 76, 30, 71, 15,194,121,115,144, 12, 6,131,193, 96, 48, 24,255, 20,143,163, 7,225, 30, -103,247,200, 96, 48, 24, 12, 6,227,209,231,177,143, 96,177, 40, 22,131,193, 96, 48, 24,140,127,154,199,209,131,176, 97, 26, 24, - 12, 6,131,193, 96, 48,202,152, 7, 58, 76, 3, 33,164, 62,211,100,154, 76,147,105, 50, 77,166,201, 52,153, 38, 51, 88, 12, 6, -131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, - 6,131,193, 12, 22,131,193, 96, 48, 24, 12,198, 67,130, 0,240,250, 36, 0,165,244,180,207, 34, 37,120,154,160, 56,125,166,201, - 52,153, 38,211,100,154, 76,147,105, 62,126,154,197,105,251,227, 63, 30,105,131,245, 32,199,193, 34,132,212, 47,235,140, 98,154, - 76,147,105, 50, 77,166,201, 52,153,230,227,167,249,184,193,154, 8, 25, 12, 6,131,193, 96, 48,202, 24, 49,203, 2, 6,195, 55, -170, 87,175,174,141,140,140,236,179,103,207, 30,217,197,139, 23,145,144,144,128, 5, 11, 22,216,146,147,147,215, 94,185,114,197, -192,114,232,241, 32, 38, 38,166, 43, 33,228, 61, 0,160,148,126,158,144,144,176,165, 20,119,249,164, 74,149, 42,111,168, 84,170, - 30, 98,177, 88,199,243, 60,177, 88, 44,122,139,197,178, 53, 41, 41,105, 22,165, 84, 40,129,102,147,114,229,202,189, 90,175, 94, -189,154, 87,175, 94,189,117,235,214,173, 37, 0,182, 0,232, 90,177, 98,197,231,171, 85,171, 86,241,204,153, 51,151, 50, 50, 50, -230, 83, 74,143, 62,172,116, 50, 24,204, 96,249,118,242,113, 26,141,166,147, 76, 38,251,159,197, 98,137, 81, 40, 20,167, 40,165, -243,239,222,189,187,145,157,120,143, 47, 58,157, 78, 4,160,115,120,120,248,219, 57, 57, 57, 45,131,130,130, 14,167,165,165,125, - 33, 8,194, 22,189, 94,207,151,240,130,195,169, 84,170,167,196, 98,241, 43, 54,155,173,137, 76, 38, 59, 1,224,251,156,156,156, -205, 15,179, 44, 53,111,222, 60,213,225,112,132, 23,181, 78,104,104, 40,118,239,222,141,121,243,230,209,213,171, 87,223, 29, 52, -104,144,124,248,240,225,138,133, 11, 23,182, 4,240, 74, 73, 52,221, 72, 36,146,180, 67,135, 14, 69, 60,172,253,215,104, 70,229, -235, 43, 96, 52, 46,240,235,197,171,167,178,247, 0, 0, 78,231,236, 1, 40, 80, 63,176,109,153,105,158,202,222,115,175,179,104, - 96, 91,144, 17,247,222, 85, 70,127,160,196,243,123, 89,230, 5, 33,228,189,225,211,119,181, 21, 40,176,104, 82, 7,226, 50, 47, - 37,162, 81,163, 70,139,159,121,230,153, 33,181,106,213, 18, 11,130, 0,135,195, 1,139,197, 82,251,248,241,227,237,183,110,221, -218, 24,192, 64, 63,211,214,107,194,132, 9, 11,167, 78,157, 26, 38,145, 72,136,195,225,104,190, 98,197,138,110,175,190,250,234, -137,249,243,231, 63, 57,104,208, 32,173,123,249,228,201,147,187, 19, 66,198, 81, 74,151,253,211,233,100, 48, 24,197, 24, 44,141, - 70, 83, 67,163,209,188,174,213,106,123,212,172, 89,243,214,176, 97,195, 14, 59, 28,142,139, 34,145,136,254,242,203, 47,111, 57, - 28,142,111,162,162,162, 54,155, 76,166,111,179,178,178,206,251, 89, 81,212, 0, 48, 10, 64,119, 0, 21, 0,232, 1,108, 2,176, -144, 82,122,161,132,134,160,129, 90,173,126,151,227,184,230, 38,147,169,130, 74,165,210, 83, 74, 15, 27,141,198,153,122,189, 62, -161,132,154,213,196, 98,241, 24,137, 68,210,198,233,116, 86, 17,139,197, 55,156, 78,231, 94,135,195,241,173, 94,175,191, 84,162, -139,121, 37,109,111,162,210,206,114,136,148, 21,141, 86, 94,170,145,139, 28, 18,222,114,139,154,114, 38, 28,186,105, 88,253, 8, - 24,171, 58,229,203,151, 31,167, 86,171, 7, 87,174, 92, 89,250,220,115,207, 73,219,181,107,135,221,187,119,183, 91,186,116,105, -139, 27, 55,110,216,155, 54,109,186, 34, 41, 41,105,182, 94,175,247,233,184,203,100,178,234, 26,141,230,127, 42,149,170, 71,237, -218,181,147,198,140, 25,115, 33, 62, 62,254, 92,131, 6, 13,110,205,159, 63,127,220,133, 11, 23,190, 14, 11, 11,219,100, 54,155, -231,229,230,230, 94, 40,105,218,155, 52,105, 18, 39, 8,194,232,192,192, 64,109,118,118,118,182, 32, 8, 95, 30, 63,126,252,147, -226,254,231,112, 56,194, 15, 30, 60, 8,169, 84,234,245,119,158,231,209,175, 95, 63, 16, 66,176, 98,197, 10,114,240,224,193, 9, -148,210,105,243,231,207, 87,253,240,195, 15,189,188, 25,172,162, 52,157, 78, 39,236,118, 59,236,118, 59,204,102, 51,122,247,238, - 29,254, 48,143,185,219,252, 20, 52, 69,126,156,207,184, 23,241,185,247,228, 76, 89,104,230,223,192, 63,123, 10, 80, 0,155, 78, - 90, 64, 41, 13, 42,141,144, 82,169,172,211,183,111, 95,113,122,122, 58, 36, 18, 9,236,118, 59, 82, 82, 82, 80,173, 90, 53,209, -186,117,235,106,249,171, 87,187,118,237, 87,227,226,226,194, 55,110,220,104,255,245,215, 95,173,157, 58,117,146, 14, 27, 54, 44, -160,109,219,182,109, 42, 84,168,192,253,244,211, 79,214,109,219,182,217,135, 14, 29, 42,159, 54,109, 90,248,166, 77,155,134, 0, - 88,246, 79,167,147,193, 96, 20, 97,176,148, 74,229,118,133, 66, 81,121,192,128, 1, 59, 63,250,232,163,217, 33, 33, 33, 14, 0, - 88,186,116,105,212,144, 33, 67,244,255,251,223,255,174,103,101,101,137,167, 78,157,218,224,215, 95,127,253, 83,169, 84,166,152, -205,230,214, 62, 84,196, 4,192,155, 28,199,141,105,220,184,241,159, 60,207, 95,222,177, 99,199,167,157, 59,119,238, 39, 8, 2, - 77, 72, 72, 88, 79, 8, 89, 0,224, 11, 95, 35, 26, 58,157, 78,164, 80, 40,166, 84,172, 88,241,157,121,243,230,201,171, 84,169, - 2,149, 74, 5,131,193, 80,233,210,165, 75, 21,223,124,243,205,167,171, 87,175,254,141,217,108,254, 64,175,215, 59,124,212, 36, - 34,145,104,108, 72, 72,200,167, 51,103,206, 84,212,170, 85,139,168,213,106, 36, 37, 37,213, 63,122,244,104,189,175,190,250,106, - 88,165, 74,149, 62,118, 58,157, 95,232,245,122,159,210,217,165,178, 92,108,144, 4,108, 9,170,213,172,195,188, 5, 11, 73,121, -149, 10, 18,142,131,195,110,151,220,202,205,173, 58,230,181, 87, 87, 54,175, 25,113, 64, 97, 51,116,220,121,195,108,127, 24, 5, -162, 90,181,106,151, 3, 2, 2,162,251,246,237, 43, 25, 56,112, 32,170, 85,171,150,247,219,243,207, 63,143,231,159,127, 94,122, -245,234, 85,233,202,149, 43,135,255,250,235,175, 47, 84,173, 90,245,230,181,107,215,170, 23,165, 41,151,203,183,170, 84,170, 42, -175,188,242,202,241, 9, 19, 38,236,212,104, 52,118, 0, 73, 39, 79,158,228,135, 14, 29,122,113,248,240,225, 55,115,114,114,240, -225,135, 31, 70,255,250,235,175,107,101, 50, 89,170,205,102,107, 91,130,104,193,236, 86,173, 90,142,125,247,189,241, 36, 60,172, - 60,174, 93,191, 18,244,249,231, 51, 62,110,210,164,137,229,232,209,163, 95, 20,247,127,169, 84,138,132,132,132,251,140,208,157, - 59,119,144,145,145, 1,179,217,140, 59,119,238,192,243,193, 16, 65, 16, 0,128,250,163,233, 50, 95,176, 88, 44,176,219,237, 16, - 40,133, 88,174, 64,155,167, 58,223, 38, 4,107,179,179,115,102,157, 58,118,228,198,195,138, 98,249, 27,105,186,103,172,104,158, - 15,162,101,164,233,242,108,174, 79,151,129,243,136, 92, 61,136,232,149,139,203,235,246, 92,169, 6,192, 78, 41, 61, 95, 26, 33, -119, 29,182,119,239, 94,164,166,166, 34, 61, 61, 29,233,233,233,168, 88,177, 34, 74, 18,177,189,112,225,194,215,141, 26, 53, 34, - 39, 78,156,248, 19,192,194,229,203,151,247,205,204,204,156,247,206, 59,239,132,124,241,197, 23,119,199,143, 31, 63, 26,192, 31, -203,151, 47,127,185, 65,131, 6,189, 79,157, 58,245,213,195, 72, 39,131,193, 40,162,147, 59,165, 84, 87,177, 98,197,196, 95,126, -249,165,195,168, 81,163,234,222,189,123, 87, 2, 0, 97, 97, 97, 86, 0,200,202,202, 18,143, 26, 53,170,193,143, 63,254,216, 81, - 46,151,223, 18, 4, 33,220,139,134,183, 39, 12,198,168, 84,170,158,103,206,156,249,172,122,245,234,138,105,211,166,109,215,106, -181,244,219,111,191,221, 26, 29, 29, 29,120,225,194,133,143, 85, 42, 85, 59, 0,239, 20,146,174,211, 94, 46,224,147,251,247,239, -255,206,254,253,251,229, 13, 27, 54,132, 86,171,133, 72, 36, 66, 80, 80, 16,154, 53,107, 70,246,236,217, 35,239,222,189,251, 27, - 10,133, 98,166,175,154, 98,177,248,157, 30, 61,122,124,118,244,232, 81,101,203,150, 45,137, 68, 34, 65,118,118, 54,164, 82, 41, - 90,180,104, 65,150,253,250,171,178,113,163, 70,147,197, 98,241, 84, 95, 53,141, 18,237,214, 65,175,190,219, 97,253,166,205, 36, - 60, 60, 28,214,143, 63, 70,118,189,122,176,190,247, 30,202,151, 47,143, 63, 55,108, 38,189, 94,120,173,165, 69,166,221,225,171, -102,105, 41,168,105,177, 88,170, 55,106,212, 72,116,224,192, 1,235,229,203,151,205, 5,159, 50,165,148,226,236,217,179,166, 77, -155, 54, 25,131,131,131, 97,181, 90,171, 21,167, 73, 41,213,181,109,219,214,190,120,241,226, 86,163, 70,141,146,164,166,166,238, - 3,112, 62, 40, 40,232, 22,128,219,233,233,233, 87,135, 14, 29, 90, 97,241,226,197, 93, 66, 67, 67,111, 83, 74,139, 45, 75,177, -177,177,113,177,177,177,217, 79, 61,245,148, 16, 27, 27,155, 25, 27, 27,251, 33,199,113, 35,222,126,231,109, 50,237,179,233, 56, -120,100, 31,190,249,250, 91, 12, 27,254, 50, 4, 65,120,175,164,249, 73, 8, 1, 33, 4, 34,145, 8, 58,157, 14,127,254,249, 39, - 6, 14, 28,136,214,173, 91, 79, 31, 60,120,176,242,192,129, 3, 60,165,116,149, 63,154,130, 32,192, 98,177,192,108, 54, 67,159, -156,140, 57,243,190,199,225,253,251,176, 98,201,226,168, 49,163, 71,143, 14, 14, 14, 78,104,208,184,105,244, 63,121,220, 93, 75, - 75, 30, 96, 34, 4, 39,179,118,159,246, 52, 70,101,129, 91,179, 96,218, 60, 77, 86,217,236,123, 62,110, 3,176, 3,200, 5,112, -189,164,154,207, 62,251,108,253,170, 85,171, 70,172, 56, 19,140, 76, 73,109,240,226, 64, 8,210, 32,240,161, 77,112, 89,218, 13, - 58,157, 46,188, 90,181,106, 45,252,209,164,148,110, 61,126,252,120,119, 74,233,124, 74, 41, 79, 41, 93, 53,126,252,248, 17,132, -144,213,227,199,143,127,133, 82,186,202,181,252,135,147, 39, 79,246,166,148,238,124, 24,233,124, 48,229,147,105, 62,238,154,197, -208, 4, 64, 79,215,212, 20, 64,179, 2,243,178, 2,235,117, 42,228,179,103,129,249, 38, 5,254,215,164, 76, 13, 22, 33,132,186, - 39,143, 10,211, 49,127,254,252,149, 11, 22, 44,152,147,145,145, 17, 81,181,106,213,119,219,180,105,211,230,218,181,107,170, 54, -109,218,180,141,138,138,122, 47, 62, 62, 62,162, 95,191,126,223,189,248,226,139,203, 9, 33, 14, 31, 42,225,106, 28,199,141, 61, -112,224,192,175,117,234,212,177,164,166,166, 6,119,232,208, 33,211,117,193, 52,100,102,102,106, 35, 34, 34,156,107,215,174, 93, - 65, 8, 25, 73, 8,169,237, 67,164,169, 81,104,104,232, 59,159,125,246,153, 92, 36, 18, 21, 22, 65,193,167,159,126, 42, 15, 12, - 12, 28,169,211,233,154,251,160, 89, 39, 32, 32, 96,202, 87, 95,125,165,176, 88, 44,112, 58,157, 8, 11, 11,131, 74,165,194,157, -140, 12,164,221,188,137, 44,253,109, 76, 28,251,134, 82,173, 84,142,211,233,116, 79, 22,167,217,178,146,166,143,186,226, 19,237, -198,188, 57,150, 88,134, 15,135, 73,161,128,233,237,183, 97,141,143,135,105,250,116, 88,131,131, 97,233,210, 5,227,198,190, 69, -100,225, 85, 91,182,172,164, 25,252,176, 92,247, 71, 31,125,196,141, 27, 55, 78,190, 97,195, 6, 69,187,118,237,108, 63,255,252, -115,142,209,104,196,119,223,125,151, 19, 27, 27,107,249,254,251,239, 21,205,154, 53,211, 60,245,212, 83, 18, 31, 47,190,246, 95, -126,249,229,196,188,121,243,166, 92,186,116, 73, 82,173, 90,181,233,141, 26, 53,234,109, 48, 24, 36, 77,155, 54,237, 93,177, 98, -197, 89, 9, 9, 9,193, 61,123,246,252,112,210,164, 73, 75, 8, 33, 69, 70,239, 98, 99, 99,103,183,104,209,252,189,181,235,254, - 8,216,180,105, 19, 89,242,235,226,192,122,245,235,126, 28, 26, 26,162,137,210, 85,192,224,231, 6,192,110,183, 97,208,144,126, - 80,171, 85, 68,163,209,132,148, 52, 47, 68, 34, 17,196, 98, 49, 36, 18, 9,234,214,173,139,101,203,150,129,227, 56,204,154, 53, - 43,132, 82, 42, 91,188,120,113,118, 86, 86,214,108,127, 52,109, 54, 27,172, 86, 43,204,102, 51,142, 29, 63,129, 77,235,214,224, -151, 95,151,226,197, 17,163,238, 58,156, 14,235,255, 70,141, 12, 8, 12, 12,120,251,159,143, 94,145, 18, 69,154,220,198,219,109, -172,220,158, 92,163, 25, 69, 9, 65,137, 53,255,214,254, 91, 51, 95,212,234, 1, 53, 27, 82, 74,121, 0,185,160, 48, 18, 66,108, -174, 58, 65,166,211,233,154,235,116, 58,153,175, 58,119,239,222,253,126,214,172, 89, 21, 56,121, 16,246,217,123, 96, 57,157,138, -173,193,223, 33,189,242,120, 68, 84,172,129,110,221,186, 69,240, 60,255,109, 25,164,119, 45,165,116, 0,165,244,247,146,252,255, - 65,167,179, 73,147, 38,109, 26, 55,110,124, 44, 54, 54, 54,185,113,227,198,199,154, 52,105,210,166,180,251,252,253,251,164,211, -143, 31,201,110,207,155, 72,232,143, 31,201,110,127,255, 62,233,196,226, 37,255, 94,188,121, 16, 47,132, 17, 66,214, 19, 66,214, - 79,156, 56,177, 3,128,208, 2,243, 45, 61,215, 3, 32,243,246,233,158, 60,150,135,185,140, 85,152,199,124,153, 32,246, 56, 73, -189, 86, 87, 21, 43, 86, 52,207,156, 57,115,179,209,104,220,246,205, 55,223, 52, 27, 55,110,220,203, 81, 81, 81, 59,251,247,239, - 63, 35, 48, 48,208, 33,145, 72,252,217,222,240,230,205,155,175,136,138,138, 18,110,223,190, 45,179,217,108,210,196,196, 68,185, -195,225, 32, 18,137,132, 90,173, 86,201,233,211,167,101,130, 32,240,117,235,214, 93,122,230,204,153, 81, 0,198, 21, 37,168, 82, -169, 94, 91,176, 96,129,162, 48,115,197,243, 60,140, 70, 35,156, 78, 39, 38, 79,158,172, 24, 63,126,252,155, 0, 14, 21,165, 41, -145, 72,222,248,238,187,239, 20, 14,135, 3, 98,241,189, 44,186,120,241, 34,178, 51, 51,225, 48, 26, 97, 55,230,192,105,204,134, -216, 28,128, 55,134, 62,171,248,252,199,159,223, 2,240,124, 81,154,188, 66, 59,125,254,130, 31,136,195,225,128,109,153,247, 46, - 17,142, 93,187, 0,155, 13,159,197,125, 78,222, 30,241,108, 28,128,229, 15,163,176, 11,130, 0,145, 72,132,151, 95,126,153, 88, -173, 86,217,250,245,235,101, 13, 27, 54,228, 27, 53,106, 20,240,204, 51,207,192,225,112, 32, 59, 59,219,221, 60,230, 43,124,181, -106,213, 76,243,231,207, 95,153,149,149,181,102,250,244,233,237,191,249,230,155,255,133,135,135,255, 57,112,224,192,119,180, 90, -173, 93, 38,147,193,225,112, 4,250,160,149, 23,169, 26,244,108, 63,172,248,237,119, 50,100,200, 96, 76,154,248, 1,206, 95, 56, -139,229, 75, 87,161,223,192, 62, 88,190,108, 53,218,182,107, 5,163,209,120,183, 52,249, 33,149, 74,161, 80, 40, 80,190,124,121, - 12, 30, 60, 24,243,230,205,195,210,165, 75,111, 2, 88,109, 54,155,191, 60,123,246,108,178, 63,122,118,187, 29, 86,171, 21, 22, -139, 5, 55,110,222,130,195,225,192,162, 37, 75,176,127,215,206,247, 4, 42,196, 45,251,101,177,234,187,239, 23,244, 3, 48,230, -159, 62,246, 37,109,210, 35,132,252,221, 76, 72,242,155, 35,173,118, 20,165,180,228, 70,139, 20, 18, 91,163, 11,203,190,121,112, -224,192,129, 34, 66, 72, 80,245,242,138, 92,142, 67,238,126, 65, 8,137,138,138,122, 9, 64,151,232,232,232,114, 55,110,220,200, -208,233,116, 91, 0,252,174,215,235,115,139, 75,186,211,233,196, 43, 77,179, 48,186, 57, 7,167,211,137,172,172, 44,220,188,121, - 19,103,206,156,193,225,195,103, 74,148,198,232,232,232,225,106,181,186,139, 84, 42,173,236,116, 58, 57,179,217,124,195, 98,177, -108, 3,240,189, 94,175, 47, 73,100,239,129,164,211,227,218, 50,171,111,223,190,186,192,192, 64, 28, 63,126, 92,119,242,228,201, - 89, 0, 26,151,234,194, 37,146,254, 52,248,127, 59,163, 84,218, 8,164, 93, 92, 30,181, 97,237,212,159,112,175, 47, 47,227, 95, - 74, 97, 30,196,131,116, 74,105, 47, 87,125,179, 62, 46, 46,174,151,235,127,189, 60,231,125,216, 78, 47, 47,245,215,122,111,203, -203,204, 96, 17, 66,104, 81, 59,168,209,104,156,239,191,255,254,254,221,187,119, 55,109,211,166,205, 94, 63,141,149,155, 86, 53, -107,214, 60,178,117,235,214,114,145,145,145, 22, 74, 41,209,106,181, 78,173, 86,203,103,101,101,193,225,112,208, 27, 55,110, 72, -174, 94,189,170, 9, 13, 13,229, 61, 28,105,225, 59, 32, 22,183,168, 82,165, 74,161,145, 2,163,209, 8,131,193, 0,171,213,138, -242,229,203, 19,142,227,154,249,160,217,186,122,245,234,196, 96, 48, 32, 34, 34, 2, 39, 79,158,132,197,104,128, 35,215, 8,167, -193, 0,222,144, 13,154,147,133,220,236, 44, 84,139, 8, 35, 28,199,181, 40, 78,211, 41, 86, 70,235, 84,106,216, 38, 76,128,253, -242,101, 64, 42,133, 52, 58, 26,176,223, 11,214,216, 19, 19, 1,153, 12,220,240,225,168, 49, 98, 4,156,156, 60,234, 33, 22,116, -216,108, 54,152, 76, 38, 72,165, 82,244,239,223, 31,123,246,236,177, 55,105,210, 68,113,251,246,109,216,108, 54,112, 28, 7,158, -231,253,209,228,169,235, 10, 28, 20, 20,228,248,252,243,207,183,182,111,223,190,227, 83, 79, 61,181, 89, 38,251, 59, 40,224,112, - 56,120, 20,211, 86,229, 25,169,178,217,172, 24, 56,164, 31,180, 26, 45, 90,180,104,129,205,155,183,224,197,151,159,135, 76, 38, - 69,207, 94, 93,177,232,231, 37,224, 56,238,243,210,228,135, 92, 46,135,201,100,114,151, 13,152,205,102,196,199,199, 87, 46,137, - 22,207,243,176,219,237,121, 81, 44, 65, 16,112,232,232, 65, 40,148, 10, 52,107,221,118,178, 32, 80,165, 68, 44,134,136,227,254, -209, 49,234, 74, 31,101,114, 69,176, 60,162, 77,165,213, 4,245,232,127,229, 17,194, 42, 77,243, 96, 49,145,150,198,114,194,207, - 28, 29,229,140,238,222,191,162, 81,174,144,228,246,223, 96,235, 88,189,122,139,254,211,166,197,105,171, 84,169,162, 62,117,234, -148, 97,234,212,169, 21,142, 28, 57, 2, 0,139,139,210, 75, 74, 74, 90,253,249,231,159,135,180,111,223,190,170, 88, 44, 38, 89, - 89, 89, 72, 79, 79, 71,106,106, 42,110,221,186, 69, 19, 19, 19,175, 58,157,206,149,254,164,177, 81,163, 70, 63, 60,255,252,243, - 47,212,173, 91, 87, 66, 41,133,195,225,128,201,100,106,116,228,200,145,167,247,238,221,219, 6,192,179,254,238,183, 94,175, 95, - 57, 99,198, 12,117,187,118,237,106,139,197, 98,174, 44,210, 89,160,108,232, 52, 26, 13,182,109,219,134,128,128, 0, 80, 74,117, -165, 61, 86,118,135, 61, 74, 21,160, 3, 18,191, 68,120, 80, 37,216, 29,246,135, 86, 95, 50,202, 46,138, 85,140,201, 58, 10,160, -103,105,205,208,131, 50, 83, 37,138, 96,185, 43,207,148,148, 20,133,201,100, 18, 83, 74, 69, 54,155, 77,204,243, 60,145,201,100, - 14, 63,183, 87,119,192,128, 1,203,187,118,237,154,233,138, 12, 56,194,194,194, 28, 89, 89, 89,200,205,205, 5,207,243,188, 90, -173,206, 45, 95,190,124,110,221,186,117,115,118,237,218, 85,108, 19,161,197, 98,169,164, 84, 42,239, 91,110, 50,153, 96, 52, 26, -243, 12,150,201,100, 66, 64, 64, 0,114,115,115,139, 61,185,237,118,123,101,165, 82,137,244,244,116,100,100,100,192, 98,200,129, -221,104,132,211,152, 3,103, 78, 54, 4, 67, 54,168,209, 0, 42,240, 8, 14, 11,131,205,102,171, 88,156,166,193,202,203, 36, 0, -204,191,255, 14,140, 29, 91,120,101,180,115, 39, 84,181,107,195,108,182, 63,180, 49,202, 60,251, 93,217,237,118, 56,157, 78, 80, - 74,169,205,102,131,205,102,203, 23,233,242,199, 96,185,181, 79,156, 56, 17,152,145,145,161,160,148,138,141, 70,163,220,108, 54, -115, 33, 33, 33,102, 15,131, 85, 36,119,238,220, 53, 94,185,122, 73,227,142, 84,173, 88,182, 26, 45, 91, 53,195,193,131, 7,161, - 82,169,240,215,150,173, 8, 14, 14,134, 78,167,195,141,196,155,160,148,210, 38, 77,154, 80,142,227,156,135, 15, 31,246,251,206, -192,225,112,228, 61,241,103,181, 90,253, 50,150, 5,215,117, 58,157,112, 58,157,112, 56, 28,184,151,159, 86,124,245,205, 92,172, - 89,177, 2,231,206,157,173,240,225,212,207,224,112, 58,193, 11,252,163, 83,241,249, 58, 52, 2,197,125, 17,172,210,109,216,245, - 84, 98, 1, 63,181,160,233,130,246, 35, 71,142,220, 93, 86,251,215,168, 81,163,110, 28,199,205,109, 17,192,107, 95,143,178, 27, -195,228,212,120,126,206,152,220,211, 21,149, 38,171,217, 17, 53,253,219,184,114,130, 0,188,255,254,251, 41,131, 7, 15,214,142, - 27, 55,174,254,224,193,131,187,234,116,186,101,122,189,222, 94, 72, 37, 46, 29, 62,124,248,225,192,192,192,106, 75,150, 44, 73, -213,235,245, 33, 14,135, 67,229,112, 56,236, 38,147,233,138,221,110,223,231,112, 56,182, 37, 39, 39,199,251,147, 86,149, 74,213, -112,240,224,193,146,204,204, 76,136,197, 98,216,237,118,164,167,167,163, 81,163, 70,162,173, 91,183,214, 45,201,254,159, 61,123, -118,182, 78,167,219,181,110,221,186, 46,106,181, 58, 86, 38,147,149, 23, 4,129,207,205,205, 77,181, 88, 44, 39, 74,146,206, 2, -121,161, 79, 72, 72,208,105,181, 90, 36, 37, 37,129, 16,162, 47,237, 49,147, 74,164,183,210, 46, 45,175, 24, 30, 88, 21, 87,207, -109,128, 84, 34,189,197, 44,202, 99, 31,193,106,226, 25,177, 42,194, 36,153, 39, 76,152, 48,137, 16,178,126,194,132, 9,147,138, -136, 96,241,158,235,121,172,111, 45,115,131,229,213, 20, 24, 12,226,248,248,248,114,169,169,169,154,176,176,176,220, 39,158,120, - 34,211, 85,141,146,236,236,108,117, 74, 74,138, 74,163,209, 88,163,163,163,179,125,220,222,165,113,227,198,245, 77, 73, 73,249, -107,200,144, 33,122, 0,200,202,202, 66, 90, 90, 26,238,220,185, 3,187,221,142,164,164, 36,110,239,222,189,229,183,111,223,222, - 9,192,181,226, 4, 21, 10,197, 77,131,193, 80, 43, 40, 40, 40,207, 28,184, 77,149,231,167,221,110,135,193, 96,128, 90,173, 46, -246,228,150, 72, 36, 73, 25, 25, 25,213,109, 86, 43,210,111,223,134,195,152, 3,167,209, 0, 62, 39, 11,124, 78, 54, 72,174, 1, - 82,135, 3,114,137, 4,134, 59, 25,144, 74,165, 41,197,105,106,229, 34,155,205,233,148,137,158,126,186,200, 43, 16,109,217, 18, -119,235,213,131, 98,157,212,241, 16, 11,250,125,243,148,210,251, 12,149, 63, 6, 43, 51, 51,147,251,230,155,111,234,158, 63,127, - 62, 64,167,211,165,117,232,208,225, 26, 0, 65, 36, 18, 9,105,105,105,161, 23, 47, 94,172, 21, 24, 24,104, 84, 40, 20,233, 62, -200,253,240,229,151, 95,141,125,246,185, 33, 68,171,213,160,109,187,150,248,125,245, 90, 40,149, 74, 52,108,216, 16, 53,239, 30, -194,255, 84, 59,177, 71,219, 7,241, 50, 25,134, 15, 31,254, 69,255,254,253,209,161, 67, 7,113,113, 70,202,219,178,220,220,220, -188, 38,189, 59,119,238, 64,161, 80,160, 85,171, 86,137,112, 53, 17, 30, 63,126, 60,185, 8,179,126, 95,158, 9,130,144,103,178, - 68, 34, 17,254, 88,177, 2,223,126,255, 45, 86,255,190,158, 14,234,223, 23,187,247,236, 37,130, 64,111,255,187,238, 62,221,101, - 5,165,233, 43, 95,160,220,185,154, 7,105,254, 83,166, 44,205, 21, 0,112, 28, 55,115,223,248,126, 90, 8,188, 49,107,219,178, -220,111,111, 73,115,215,159, 56,189,199,100,182,136,170, 85,175, 90, 55,186, 82, 21,201, 7, 31,189,151,122,242,220,161,235,119, -190,189, 19,249,238,187,239, 86,174, 81,163, 70,249,203,151, 47,215, 0,112,214,155,102, 64, 64, 64,229,151, 94,122,233,229,187, -119,239, 74,126,252,241,199, 69,183,111,223,222, 67, 41,189, 90,192,120,196, 16, 66,102, 2,144, 0,136, 0,224, 4,176,149, 82, -250, 75, 17,201, 21, 8, 33,216,181,107,215,125, 79,251, 9,126,182,217,123,146,156,156,156,217,172, 89,179,134,151, 46, 93, 90, -155,153,153,249,171, 23, 99,247,116,189,122,245,134, 28, 57,114,228, 67, 74,233, 21, 63,235,147,113,231,206,157,155, 33, 8, 66, - 52,199,113, 55, 40,165,239,150,246,152, 57,121,251,136, 13,127, 76, 89,104,119,216, 42, 73, 37,178,155, 78,222, 62,146, 89,148, -199, 30,119, 31, 41,120, 26, 39, 47,198,232, 64, 92, 92,156,114,250,244,233,136,139,139, 59,227, 45,130,229, 54, 90,113,113,113, -103,220,235,121,172,191,167, 76, 13,150, 55,231, 40, 8,130, 98,230,204,153,109,234,212,169,115,187, 85,171, 86, 73, 21, 43, 86, - 52,187,127,147,201,100, 14,181, 90,157,101,183,219,205, 41, 41, 41, 97,123,246,236,169, 34, 8,130,220,135,237,237,208,104, 52, -210,163, 71,143,234,150, 47, 95,222,232,194,133, 11,181,187,119,239,222,207,110,183,195,225,112,224,246,237,219,181,191,250,234, - 43, 94, 46,151,167, 19, 66,142, 2, 80, 22,123,162, 57,157, 7, 47, 94,188, 88,179,121,243,230,196,225,112,228, 51, 85,158,223, -101, 50, 25,146,146,146,168, 32, 8,135,125,168, 16, 14,157, 72, 72,168, 94,175,118,109, 56,141, 57,224, 13,217,224,115,178,193, -103,103,129,152,140,144, 58,236, 80,171, 4,200,101, 42,156, 73, 74,114,135, 46,139, 68,228, 52, 39,222, 48,228,212,170, 52, 99, - 6,164, 65, 65,128,221,158,215, 44, 8, 32,175,185,144, 38, 39,227,216,161,131, 16, 83,107,210,195, 42,197, 78,167, 19, 33, 33, - 33,200,201,201,129,213,106,189,207, 96,201,100, 50,200,100, 50, 56,157, 78, 95,163, 56, 65,125,250,244,105,215,180,105,211,115, - 35, 70,140,216, 90,171, 86,173, 68,119, 89, 87, 42,149,246, 90,181,106, 37,153, 76, 38,227,141, 27, 55,234, 44, 94,188,184,141, - 32, 8,218,162,244,226,227,227,223,138,141,141,197,201, 19,167,198,117,237,218, 21, 27, 55,110,132, 82,169,132, 70,163, 65,213, -170, 85,113,204, 96,192, 27,178,102,168, 25, 94, 19,157, 58,221, 65,189,122,245,112,225, 66,241, 67,107,121, 70,231, 10, 70,175, -172, 86, 43, 50, 50, 50,176,123,247,110, 28, 57,114, 4, 23, 46, 92,168,116,228,200,145, 55,151, 46, 93,250, 82,221,186,117, 99, -206,158, 61,123,203, 23,131,229,206, 75,183,217,114,127, 95,187,110, 19,122,246,108, 75, 12,185, 57,216,184,249,175, 50,105, 70, -241, 23,141,102, 20,245,214,172,231,203,208, 8,110, 79,238, 49,162, 66,145,154,239,104, 52, 20, 0,190, 48, 26, 9, 0,140,215, -104, 40,245,152,255, 91,139,128,120,121,130,208, 91, 26,198,187, 52,103,186, 52, 10,110,163, 8,114,193,243,185,182,221,191,229, - 14,191,160,200,202,112,144,143,226,227,227,119,245,236,217,115, 95,149,202, 53, 2, 1,192,102,225, 67, 84,178,114, 74,177, 88, - 44, 7,128,138, 21, 43, 54,161,148,206, 3,224,117,104,154,222,189,123,183, 12, 15, 15,111,180,105,211,166,227,183,111,223,222, - 91,208, 92, 1, 64,205,154, 53, 63, 62,115,230, 76,119,137, 68, 66, 60, 42,127, 10,192,171,193,234,215,175, 95,173, 10, 21, 42, -132,110,188, 28,136,108, 73, 53, 8, 92, 22,168, 72, 14, 62,184, 33,110, 72,234,162,124,249,243,161,149, 43, 87,126, 50, 49, 49, -241,132,159, 17,166, 74,131, 6, 13,218,240,195, 15, 63,212,233,214,173,155, 12,192,125, 6,171, 78,157, 58,253,182,111,223, 62, - 96,244,232,209, 13, 9, 33,189, 41,165,151,125,213,143,143,143,223, 15,160, 69, 89,150,213, 87, 62,163,219, 0, 68, 51,207,241, -159,137, 94, 1, 30,125,176, 0,164,227,222,187,148, 61,231,221,229,222,230,177,110,186, 71,212,202, 86, 32,234,229,237,183,116, - 0,101, 22,220, 16, 23,113,145,221,113,248,240,225,152,152,152,152,203,158,230,202,179,250,212,104, 52,182,212,212, 84,122,254, -252,249,250, 78,167,115,175, 15,219, 91, 24, 31, 31,191, 99,238,220,185,159, 69, 71, 71, 91,122,245,234,197, 77,155, 54,109,109, -102,102, 38, 77, 75, 75,195,172, 89,179,250,118,239,222,125,237,229,203,151,185,115,231,206,125,140,123,131,144, 22,137,201,100, -250,238,245,215, 95, 31,178,119,239, 94,133,205,102, 67, 86, 86,214,125,209, 43,119,164, 96,238,220,185, 86,163,209,248,181, 15, - 23,218,239,167, 79,159, 62, 96,217,162,159, 21, 34,135, 13,150,172, 76, 8, 57, 89,224, 76,185, 16, 59,108,144,139,121, 68,214, -208,192,144, 38,197,119,127,237, 50, 91,173,214,239,138, 53, 88, 22,195,248,215, 94, 29,245,231,150,109, 59,137,164, 99, 71, 56, - 54,111,190,255, 78, 58, 34, 2, 22,187, 29,113,159,125, 66,197,166,236,247, 30, 70, 65,151, 72, 36,103, 71,141, 26, 85,126,212, -168, 81, 33, 13, 26, 52,128,219,252, 82, 74,193,243, 60, 66, 67, 67, 1, 0,183,110,221, 66,124,124,124,150, 72, 36, 42, 54,122, - 39, 8,194,142,235,215,175,215,127,233,165,151, 46,117,235,214, 45,194,106,181,138,179,179,179,245, 0,160, 86,171,197, 21, 43, - 86, 84,137,197, 98,146,153,153,121, 55, 35, 35, 35, 66, 16,132,125, 62, 36,117, 42, 33,100, 92,211,166, 77,113,238,220, 57, 68, - 69, 69,161,114,229,202,208,233,116,184,124,249, 50,180, 90, 45,164, 82, 41,182,109,219,134,219,183,111,163,122,245,234,121,131, - 97, 22,198,205, 43,123, 48,127,254, 90,112, 28,151, 55, 57,157,206,188,254, 82,119,239,222,197,230,205,155,241,251,239,191, 99, -217,178,101, 25,131, 6, 13,210,188,248,226,139,129,139, 22, 45,122, 11,192, 88,111,154, 55, 46,239,198,252, 5, 27,242,105,122, - 78, 98,177, 24, 73, 73, 73,112, 56,157,248,253,247,173, 73, 98,177, 56,248,203,207, 63, 87,142,159,244, 62,121,212, 42,193,162, -250, 62,121,118,149,242, 37,225, 95, 24,141,100,188, 70, 67,221, 38,200,171, 17, 34, 0, 64,239,139, 96, 21,198, 76, 95, 52,189, -151,207,247, 91,207, 94, 59,150, 16,149, 93, 16,132,175, 18, 18,226,247,185,162, 54,225,179,103,207,150, 1,192, 23, 95,204,146, - 80, 74, 37,238,242,240,233,167,159, 42, 70,141, 26, 85,232,224,176,171, 86,173,202,252,228,147, 79,202, 13, 31, 62,188,251,206, -157, 59, 85,132,144, 77,174, 27,177, 12, 0, 60,128,114, 0,246,135,133,133, 69, 46, 95,190,188,122,151, 46, 93,212,197,165,211, -108, 54,255, 56,127,254,252,202,179,118,107,177, 41,183, 31,110,209, 65,160, 33, 20, 33, 82, 3,158,208,220, 68,135, 10, 73,186, - 37, 75,150, 44, 4, 16,235,135,185,170,219,191,127,255, 53, 63,252,240, 67,149, 81,163, 70,221,222,191,127,255, 45, 66,200,199, - 94, 86,189,243,210, 75, 47,221, 88,180,104, 81,117,158,231,183, 16, 66,186, 81, 74, 47,129,193,248,231, 56,250,128,214,125, 96, -112, 69, 24,172, 87,141, 70,227,176,153, 51,103,198,246,238,221,123,224,161, 67,135, 66, 60,171,189,219,183,111,135, 46, 90,180, -104,208, 95,127,253,213,212,108, 54,143,226,121,254,101, 47, 39,111,253, 2, 46,245, 6,165,116,102,171, 86,173,158,223,190,125, -187, 76,171,213,222,221,182,109, 91, 72, 90, 90, 26,226,227,227, 3, 57,142,203,185,124,249,178,100,219,182,109, 47, 0,248,214, -219, 93, 82, 65, 77,189, 94,127, 60, 59, 59,251,139,183,223,126,219,226,238, 52,108, 54,155, 97, 48, 24, 96,177, 88, 32, 22,139, - 33,149, 74,241,219,111,191, 89,173, 86,235, 2,189, 94,127,200, 7,205,131,119, 50, 51,231,127,241,197, 23,182,128,224, 16,104, - 85, 74,200,156, 78, 72,236, 86, 40, 69, 4,209,177,193,176,231,202, 49,247,175,125,182,116,179,101,185, 94,175,223, 85,156,230, -193,155,198, 13,150,148,203,219, 63,157, 58,133,138, 86,173,130, 36, 39, 7,242,113,227, 32,171, 81, 3,178,126,253, 64,245,122, - 88, 18, 18,240,254,228, 15,168, 56, 55,109,223,161,155,134, 85,197,105,150,201, 69,179,128,166,195,225,104,152,148,148,244,222, -212,169, 83,211, 38, 76,152,144,121,227,198, 13, 72,165, 82, 8,130, 0,169, 84,138, 59,119,238, 96,227,198,141,217,187,119,239, - 78, 55, 24, 12,239,240, 60, 95,191, 56, 77,158,231,135,231,230,230, 14, 27, 63,126,124,237, 58,117,234, 52,222,181,107,151, 38, - 56, 56,184,162, 76, 38,147,213,175, 95, 63,252,252,249,243, 97, 31,126,248,225,208,205,155, 55,119,182,217,108,163,121,158,127, -193,135,125,183, 58,157, 78,236,222,189, 27,207, 63,255, 60, 90,182,108,137,176,176, 48, 88, 44, 22, 52,105,210, 4, 53,106,212, -128, 94,175,135,195,225,160, 39, 79,158,124,231,143, 63,254,128, 72, 36,114, 22,166, 41,151,203, 19,159,136,136, 71,191,126,253, -240,212, 83, 79,161, 73,147, 38,168, 93,187, 54, 26, 52,104,128,102,205,154,161, 67,135, 14, 16,137, 68,144,201,100,248,245,215, - 95,177,109,219,182, 79,126,254,249,103, 99,203,150, 45, 69,132,144, 1,133,105, 54,136, 58,137,190,125,251,162, 83,167, 78,104, -218,180, 41,234,212,169,131,218,181,107,231, 77, 28, 39,130,221,110,135, 74,161, 66,194,161,131, 83,164, 18,169, 41, 56, 56, 8, -130, 32,208,127,242,184, 23,123,135,233,195,128,158, 13, 2,219,249,165, 57,211,104,204,243, 77,222,140, 16,165, 37,211,116, 87, - 82,133,153,171,130,251,126,252,248,241, 29,241,241,241,189,142, 29, 59,214, 47, 33, 33, 97,159,151,187,107, 80, 74,239,141, 91, -166,215,227,194,133, 11,176, 90,173,238, 65,147,189,106, 90,173,214, 19,239,189,247,222,177,208,208,208,160, 3, 7, 14, 12,220, -190,125,251,183, 19, 38, 76,216, 51,120,240,224,211,253,250,245, 59, 59,102,204,152,125, 43, 87,174,156,168,215,235, 27,116,234, -212, 73,253,254,251,239,103,184,141, 76, 17,245,167, 72, 16, 4,188,213, 54, 7, 7,223, 54,225,234,251,233,136,127,253, 50,126, -234, 30,143,206,129, 59,113,246,236,217, 34,235,244, 66,142,251,215,191,254,250,107, 85,181, 90,205,253,246,219,111,149, 40,165, -111, 80, 74, 63,242, 50,141, 91,189,122,117, 21,181, 90,205, 45, 89,178, 36, 26,192, 92, 66, 8,247,168,148, 79,166,249,120,104, - 62,110,136,139, 9,219,157, 1,208,157, 16,210,122,252,248,241,113, 21, 43, 86,204,224,121, 94,186,118,237,218,158, 57, 57, 57, -161, 60,207, 79,164,148,250,213, 94, 73, 41,157, 79, 8,193,179,207, 62,251, 81, 84, 84,212,186,179,103,207,118,234,215,175,223, -210, 63,255,252,179,179,211,233, 76,188,122,245,234,100, 0, 95, 3,152,227,171,166,213,106,253,120,251,246,237,228,200,145, 35, -111,191,251,238,187,242,240,240,112, 18, 20, 20, 4,179,217,140, 91,183,110,209, 69,139, 22, 89,109, 54,219, 28,139,197,242,129, -175,154, 14,135,227,189,173,251,246,203, 78,158, 62,253,242,184,103, 7, 42,162, 43, 84,132,150, 84,132,225,238, 29,236,223,175, -199,151, 91,247, 88,238, 88,109, 75, 29, 14,135,207,143,210, 43,236,185,221,182,174,252,105,227,174,157, 59, 59,127, 50,109, 58, -169, 51, 98, 4, 84, 85,171, 34,187,122,117, 28,217,187, 7,113,159,126, 66, 69,166,180, 61, 82,155,161,243,195, 42, 16,174,119, - 12,254,168,211,233,150, 94,184,112,225,245,137, 19, 39,126, 16, 19, 19, 67,109, 54,155,108,227,198,141, 70,189, 94, 47, 8,130, - 48, 13,192, 28,189, 94,111,245,227,184,159, 1,208,131, 16,210,122,216,176, 97,211,162,162,162, 82,237,118,187,120,194,132, 9, -157,178,178,178,202, 11,130, 48,201,159,178, 20, 31, 31,111,141,141,141,125,103,231,206,157, 95,236,220,185,211,123,212, 80, 36, -162, 60,207,143,136,143,143,255, 9,192,172,162,244,236,118,123,139, 86, 3,182, 29,180, 90,215, 23,250,116,160, 66,161, 64,102, -102, 38,204,102,179,221,233,116, 26,120,158,135,235, 97, 63, 82, 72,185, 44, 86, 83,170, 80, 98,223,129,131,232,251,116,111,222, -238,176,127,254,220,160, 65,242, 3,135, 14,243, 37, 29,211,168, 52,228,230, 46, 4, 25,177,176,232,166,192, 98,140, 22,241,162, -249,142,102, 89,222,159,102,122,152,158,241, 26,205,189, 71, 15, 41,197, 59, 26, 13, 45,104,136,220,254,197, 21,200,250,155, 31, -129,241, 43,238, 69,169, 10, 54, 43,142,215,104,242,182,229, 77,179,140,154, 51, 96, 50,153, 64, 11,118, 86,204,191,206, 77, 66, -200,187,241,241,241,138, 87, 95,125, 53,118,232,208,161, 1, 29, 59,118,212, 20,136, 72, 9,127,254,249,103,238,252,249,243,239, -236,217,179,231,232,176, 97,195,250,186,154, 55,188,114,251,246,237, 13,223,126,251,109, 96,187,118,237,106,242, 60,143,140,140, -140,188, 62, 88,183,110,221,194,205,155, 55,111,240, 60,191,206,207,221,121,237,185,231,158,219,184,104,209,162,232, 81,163, 70, -221, 94,182,108,217, 58, 0,217, 94,214,211,244,235,215,239,105,215,122, 55, 1,188,193, 70,120,103, 48,124,168, 44,124,157, 0, -244,225, 56,110, 31,128, 62, 62,174, 95,191,136,223,162, 1,124,138,123,237,166,217, 0, 78, 3,152, 6,160, 90, 73, 53, 35, 35, - 35, 27,212,168, 81, 99,105,173, 90,181,174, 87,168, 80,193, 81,171, 86,173, 27, 53,107,214, 92, 30, 25, 25, 25, 83, 10,205, 86, - 85,171, 86,221, 18, 29, 29,157, 81, 41, 74, 71,163,163,163,239, 86,173, 90,117, 91,100,100,100,187,146,106, 54,171,168,233,213, -172, 86,212,133,216,186,213,173, 53,171, 85, 17, 98,235,214,176, 54,171, 93,225, 98,179,138,154,126, 37,213, 44,233, 84,156,102, -100,100,100, 64, 84, 84, 84, 92, 84, 84, 84,174, 78,167,139,139,140,140, 12, 40,173,102, 89,151,165, 7,181,239, 5,167, 86,173, - 90,125,191,104,209, 34,231,215, 95,127,157,211,186,117,235, 59, 95,127,253,117,206,226,197,139,157,173, 90,181,250,190,164,154, -245, 99,155, 68,183,237,212,249,238, 47,191, 46,117, 94,186,116,137,254,242,235, 82,103,219, 78,157,239,214,143,109, 18,253, 40, -237, 59,134,131, 98,248, 61, 79,225,109, 58,149,181, 27, 0,234,159,202,222,131, 83, 89,187,139,213,123, 71,163,161,111,171,213, -121,122,239,168,213,249,230, 41,165, 56,149,237,161,153,237,131,166, 90, 77,223,201,167,169,185, 79,211,159,125, 31, 56,112,224, -101,234,129,205,102,163,233,233,233,244,226,197,139,116,239,222,189,180,115,231,206,151,139,211,116,221,196,118, 0, 48,187, 66, -133, 10, 91, 91,181,106,117,169, 77,155, 54, 87,170, 85,171,118, 64, 42,149,254, 10,224, 37, 0,161, 0, 34, 1,140, 7, 16, 81, -148,102,100,100,100,139,218,181,107, 79,107,212,168,209,186, 22, 45, 90,236,111,220,184,241,193, 90,181,106,173,143,142,142,158, - 30, 25, 25,217,178, 36,199, 29, 64,165, 65,131, 6,157, 49, 26,141,124,219,182,109,255,244,246,191,152,152,152, 69, 70,163,145, - 31, 58,116,232, 69, 0, 53, 30,181,115,147,105, 62, 30,154,143,219, 68,138,184, 9, 43,147, 16, 98, 89, 15,167,255, 48, 53,117, - 58,157,220,215,168,205,227,182,239, 76, 19,168, 94,189,186, 54, 50, 50,178,207,168, 81,163,100, 49, 49, 49, 72, 72, 72,192,130, - 5, 11,108,201,201,201,107,175, 92,185, 98, 40,105, 58, 27, 52,110, 26, 29,160,213,190, 77,129, 62, 4, 88,155, 99, 48,228,123, - 23, 33, 59, 70, 15, 71,243,233,167,159,222,164, 84, 42,171, 17,215, 0, 61,238,167, 63,221, 79,128, 90,173,214,171, 59,119,238, -236,254, 56,236, 59, 33,164, 82,147, 38, 77,166, 93,188,120,113,115, 78, 78,206,125,157,220,101, 50,217,211,177,177,177, 67, 15, - 30, 60, 56,169,224, 83,132,172, 44, 49, 77, 70, 9,154, 8, 25,247, 53,159, 89, 89, 46,252,119,113,153,168,188, 39,188,106,213, -170,133,231,158,123,174,212,186, 46, 51, 53, 6, 15, 97,228,118, 70,225,172, 91,183,174,251,127,101, 95, 41,165, 55, 1, 20, 90, -152,109, 54,219, 58, 0,235, 88,169, 96, 48,124,135, 99, 89,192, 96, 48, 24, 12, 6,131, 81,182, 16, 0,245, 11,185,163,241, 57, -244, 87,146,167, 9,138,211,103,154, 76,147,105, 50, 77,166,201, 52,153,230,227,167,233,161, 61,181,144,159,146, 92, 58, 11,254, -213, 6,139,245,193, 98,154, 76,147,105, 50, 77,166,201, 52,153,230,195,214, 44,160, 63,234,223,110,176, 88, 19, 33,131,193, 96, - 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,143, 54, 62, 61, 69, 40,147,201,234, 81, 74,135, 17, 66,202, 19, 66, 82, 40, -165, 63,217,108,182, 51,255,181,204,146,201,100,245, 8, 33,195, 40,165,229, 41,165, 41,132,144,135,154, 15,187, 62, 86, 17,252, - 61,182, 35, 5, 64,219, 79, 54,177, 82,205, 96, 48, 24, 12,198,163,106,176, 42, 87,172, 56,136, 19,145,111,236, 14, 62, 56, 40, - 40,136,251,246,219,111,185,222,189,123,227,207, 63,255,196, 27, 99,198,188, 17, 21,165, 19,164, 98,113, 38, 21,156,111, 36,222, -210,175,240,101, 99,253,250,245, 75,117, 56, 28,133,190,191, 75, 36, 18,165,173, 89,179, 38,162,180, 59, 21, 21, 59, 40,213, 97, -183, 23,186, 29,177, 88,146,166, 63,190,210,167,237, 84,172,168, 27, 36, 34,220, 55, 14, 94, 8, 14, 14, 14,230,230,204,153,147, -151, 15,175,191,254,250, 27, 21,162,162, 4,169, 68,148, 41,240,244,141,196, 91,183, 86,252, 83, 7,174,128,185, 66, 1,163,245, - 72,225,145, 86,102, 2, 25, 12, 6,131,241,223, 54, 88,132,195,220,101,223,207, 12,206,184,155,137,101,107,182,160, 78,157, 58, - 56,123,246, 44,234,212,169,131,214, 77, 27,114, 93, 91, 62,201,137, 8,194, 62,154,179,100, 46, 0,159,140,133,195,225, 8,255, -227,143, 63, 64, 8, 1,207,243,249, 6,237, 51, 24, 12,120,243,205, 55,195,203, 98,167, 28,118,123,248,213,163,191, 67, 34, 34, -112,240, 20, 14, 39,133,195, 41,192,206, 83,228,152,156,232,216,243, 57,159,183,195,129,155,251,211, 55, 51,131,179,178,178,241, -251,166,173,249,242,161, 99,171, 38,220,192, 30,237, 57,149, 82, 26, 54,234,189,207,125,206,135, 50,130, 20,178,140, 62,130,229, -140,120,124,146, 93, 31,171,192,204, 22,131,193, 96, 48,254,147, 6,203,230,224,131,195, 67, 2,241,211, 79, 63,225,221, 9,159, -160,118,237,218,247,134,126, 39, 4,147, 62,156,138, 47, 63,153,128,193,221,219,194,225, 20,130, 11,211, 40,100,196, 96, 92,191, -126, 29,102,179, 57,223, 84,175, 94, 61,159, 18,236,235, 83, 11, 18, 17,193,134, 4, 3,236, 14, 1,118,167,107,114, 8,232, 80, - 95,235,151,166,131, 23,130,131, 2, 52, 88,248,253, 60,188, 59,117,102,190,124,120,111,210,135,248,110,250, 7, 24, 55,250, 69, -216, 28,124,112, 73,210,233, 15,143,153,166,219,108,249,100,180, 88,126, 50, 77,166,201, 52,153,230,227,173,249, 88, 26, 44, 66, - 72, 59, 0,187, 92,153,150, 23, 25,113,216, 44,168, 91, 49, 20,243,102,125, 10, 10, 14, 2,165, 0, 5,168,224, 64,149,114, 42, -152, 77,254, 71, 31, 4, 65,128,221,110,135,195,225,192,130, 5, 11,144,155,155, 11,158,231, 81,167, 78, 29, 0, 64,108,108,172, -103, 4,230,102,124,124,124,116,113,154,225, 13,158,185, 1,138, 74,158,203, 38,207,252, 17,251, 19,174,130, 82, 64,174, 80, 98, -192,243,175,130, 23, 40,236, 14,255,223, 79,106, 49,153, 16,169,145,224,203,207, 62, 4, 39,145,130, 3, 1,199, 17,112, 68, 64, -237, 10,193,176,154,205, 15,227,216, 81,220, 31,197,162,255,194, 50, 72,254,197,105,103, 48, 24, 12, 70,105, 47, 2,133,120,144, -199,194, 96, 1,216,229,109,167,108, 22, 51, 42, 4, 75, 81, 94, 19, 8,167,147,199,105,123, 36,140, 38, 11,236,118, 7,110,218, -237,184,114, 60, 25, 45, 91,182,196, 51,207, 60,195,219,237,118, 72,165,210,236, 53,107,214,132, 20,103,176, 28, 14, 7,236,118, - 59, 76, 38, 19,150, 44, 89, 2,177, 88, 12, 65, 16,220,174, 56,239,179, 85,171, 86,149,124,180, 26,149,174, 28, 89, 13,173, 66, - 4,167, 64,225,116, 82, 56,120,128, 23, 40, 76, 54, 1,125,135,127, 0,167, 32,192, 41, 8,176,249, 96,176,242, 25,182,144, 38, -232, 51,113, 25, 0, 77,222,239, 1, 50,224,221,214, 4, 82,153, 28, 50,169, 8, 86,243, 63,223,204,213,126,178,137,186,154,218, -242,117,114,255, 23,148, 57,193,149,230,130,253,199,152,193, 98, 48, 24,140,255, 38,187, 30, 39, 99, 85,208, 96,229,185, 72, 74, -233,238,191, 13,150, 9, 78, 7, 15,135,147,135,211,225, 68,142,209,140, 25, 51,102, 64, 46,151,131, 16, 2,247,203, 79,121,158, -231, 28, 14, 7,122,244,232, 17, 92,220, 6,121,158,135,221,110,135,221,110,135, 32, 8, 16,137, 68,104,214,172,217,125,235, 29, - 58,116,200,175, 29,209, 42, 68,168,210,105,226,125,203, 15,175,254, 20,148, 2, 60, 79,193,243,212, 39,131, 85,156, 97,107,212, -110, 32,172, 54, 7,168,203,210, 88, 76, 15,167, 31, 81,251,201,166,127,139,169,242, 76, 51, 0, 80, 87,211, 32, 27, 38,132,193, - 96, 48, 24, 94, 61,200, 99,101,176,112, 47, 68,151,231, 34,173,102, 51, 28, 14, 39,156, 78, 30, 14,199, 61, 99,164, 84, 42,209, -166, 77,155,252,126,132, 82,108,217,178, 5,118,187,189,216, 13,186, 59,181, 59, 28, 14, 80, 74, 65, 41,197,178,101,203, 32,145, - 72,242, 38,169, 84,234,247,142, 56,121,138,137,239,189, 5,169,152,131, 68,204,229,125,242,148, 2,148,130, 23,238, 77, 86,135, -111,126,164, 40,195, 6, 0, 54,171, 29,160, 20, 20, 20,230,220, 92,118,102,148,192,104,185, 34,112, 12, 6,131,193, 96,220,231, - 65, 30, 23,131,213,158, 16,114,159,243,176,153,115, 93,209, 43, 30, 14,167, 51,207, 64,205,154, 53, 11, 18,137, 4, 50,153, 12, - 98,177, 24, 18,137, 4, 0,124, 50, 88, 22,139, 5, 85,171, 86,133,205,102,203,235, 48, 62,100,200,144,251,214, 59,114,228,136, - 95, 59,226,224, 41,226, 62,159,125,223,242,125, 43, 63, 65,195, 39,170,160,105, 13, 53, 44,118, 1, 6,147,179,244,134, 13,184, - 23,193, 2, 64, 41, 96,206,101, 79,194, 49, 24, 12, 6,131, 81,210,123,110,111, 30,228,177, 48, 88,174,144,220,125,174,209, 98, - 50,193,233,112,230,153, 44,155,205, 6, 65, 16, 48,102,204, 24, 16,146,127,245,237,219,183,195,102,179, 21,189, 49,177, 56,109, -228,200,145,249,134, 72,160,148,226,247,223,127,135, 76, 38,203, 23,197, 42,168,239,139,193,154,242,254, 59,144, 73, 68,249, 12, -145, 32, 0,235, 54,252,133,117, 27,254,202, 91, 87, 36,146,164,149,198,176, 1,128,205,230,138, 96, 81,138, 92,163,129,157, 30, -190,222,158,124,172, 34,174,166, 77, 6,131,193, 96, 48, 10,245, 32,143,133,193, 42, 12,139, 57, 23, 14,143, 62, 88,118,187, 29, - 78,167, 19, 11, 23, 46,204,103,134, 36, 18, 9, 56,142, 43, 54,130,245,199, 31,127,228, 27,220, 51, 54, 54,150, 82, 74,209,191, -127,255,188,206,237, 47,191,252, 50, 70,141, 26,229,183,193,114,242, 20, 31,127,246, 69, 94,135,164,238,157,218,224,153,238,237, - 32,184, 22,164,157, 94,227,151, 96, 81,134, 13, 0,108,214,123,125,176, 40, 0,147,129, 53, 17,250, 1,113, 13, 60, 42,176,172, - 96, 48, 24, 12,198,227, 74,161, 6, 75, 34,230,178, 47,223, 72, 14, 12, 83, 43,224, 20,172,112, 10,247,158,252,227,121, 30,163, - 70,141,202, 91,239,217,103,159,197, 11, 47,188,224,213, 96,249,242,182,109, 65, 16,176,111,223, 62, 16, 66,192,113, 92,222, 84, -232,213,185, 16,205, 92,171,128,253, 43, 63,129, 64, 41, 4, 10, 8,174, 7, 18,108,206,226,131, 37,222, 52,139, 51,108,114, 77, - 16, 68, 28, 5, 33,192,149,219,169, 16,139,184,108,127,247,221,111,103,242,239,213,244, 54,164, 4,247, 31,217,119,166,201, 52, -153, 38,211,100,154,204, 96,121, 92, 17,121,250,198,247,235, 15,127,227,224,133, 64,247,178,186,117,235,194,110,183, 99,243,230, -205,121, 17, 39,145, 72,228,115, 4,203, 11, 55,219,182,109, 91,212, 80, 12, 55,125, 59,210,184,217,184,195,160, 74, 69,253,238, -111,194,138, 51,108, 63,236,249,251, 21,132, 98,142,203, 6,165,111,176,226,228, 29,215,144, 18,110,147, 69, 88,142, 48, 24, 12, - 6,227, 63,107,176,110, 38, 37, 45, 1,176,196,115, 89,207,158, 61,141, 79, 63,253,180,210,253, 20,160,205,102,131,213,106,205, -251,174, 80, 40,252, 26,113,211,151, 65, 68,125, 33,237,212,154,232, 50,205, 21, 31, 12,155, 94,175,143,102,197,199, 47,147, 5, -252, 61, 60, 3, 51, 90, 12, 6,131,193,248,111, 26, 44,111,152, 76,166, 32, 66,136, 56, 57, 57,249,190,223, 92,203,156,143, 67, -166,148,185, 97, 99, 20,103,180, 88,167,119, 6,131,193, 96,252,119, 13,214,174, 93,187,156,143,139,137, 98, 60, 26, 70,139,153, - 43, 6,131,193, 96, 60,142,176,145,180, 25, 12, 6,131,193, 96, 48,202, 24, 2,160,190,183, 31,252,121, 58,128, 16, 82,223,223, - 13, 23,167,207, 52,153, 38,211,100,154, 76,147,105, 50,205,199, 79,179, 56,109, 74,233,105, 66,200, 40, 74,233,130,127,181,193, -114, 63, 13,248, 64,196,217, 35,172, 76,147,105, 50, 77,166,201, 52,153, 38,211,244, 95,255, 95,111,176, 88, 19, 33,227,161, 17, -251, 74,130,146,229, 2,131,193, 96, 48, 30, 71,196,143, 98,162, 26, 53,106, 20, 41, 18,137, 26, 3, 8,225,121,126,203,241,227, -199,147,217,161, 42,209, 29,128,152, 82,234,124, 20, 53, 43, 13, 90,185, 65,202, 27,187,235,250,156,187,217, 82,170,168,182,114, -229, 0,158, 29, 49, 6,131,193, 96, 48,131,229,162, 73,147, 38, 85, 4, 65,120, 17,192, 80, 74,233,137,132,132,132,254,254,106, -180,104,209, 66,225,112, 56,198, 80, 74,155,115, 34, 73,227,218,141,218,235, 26, 53,107,139, 44, 19,197,182, 21, 51,175,181,111, -223,190,238,174, 93,187,172,254,104,198,198,198,110, 0,208,163, 16,147,240,241,177, 99,199,166,248,163, 23, 19, 19,211, 21,192, - 4,215,236,244,132,132,132, 45,143,226, 1, 13, 11, 11, 83,107, 52,154,169, 53,107,214,236,242,220,115,207,213,104,217,178,101, - 70,114,114,242, 97,187,221,254,137, 94,175, 63, 81, 82,205,160,160,160,169,245,234,213,235, 54,108,216,176,106,173, 90,181,202, - 72, 74, 74, 58,236,112, 56, 74,164,217,116,252,209,202,130, 57,189,199,154,249,175, 97,244,199,203,162, 79, 59,148, 47, 2,248, -201,111, 35, 62,252,207, 72, 78,204,137,227,191,239,121, 11, 0,162,163,163, 43, 59, 28,142,142, 0,158,228, 56,238,132, 72, 36, -218,113,227,198,141,196,210,228,231,191, 69,147,193, 96, 48, 24,143,129,193,170, 91,183,174, 90, 38,147, 13,224, 56,238,165,134, -177, 45, 90, 63, 61,240, 37,226, 32, 42,124,246,206,179,126, 71, 54, 26, 53,106,212,156, 19, 75, 22,191, 48, 38,174,122,165,106, -117, 32, 87, 5, 32,215, 70,144,154,205, 67,102, 18, 80,161,225,165,170, 55,142,174,108, 3, 96,171,159,210, 61, 86,108, 60,140, -228, 44, 30,132, 0,132, 0, 28, 1,140, 22, 1,147,134,181,158, 12,192, 47,131,197,113,220, 71,195,226,118, 54, 23, 40,176,104, - 82, 7, 41,128, 71,206, 96,233,116,186, 86,205,155, 55, 95, 49,110,220,184,200,114,229,202, 65,173, 86, 67, 34,145,148, 79, 74, - 74,122,230,245,215, 95,239,165,211,233,198,233,245,250,111,253,213,236,218,181,235,170,119,222,121, 39,130, 16, 2,177, 88, 12, -169, 84, 90, 62, 41, 41,233,153,183,223,126,219,111, 77, 66, 8, 87,175,195, 75,163,180, 17,237,193, 17,130, 64,173, 2, 57, 87, - 79, 14,169, 92,249,245,223, 18, 19, 19,125, 54,209,141, 94,217, 56, 21, 98,241, 36, 1, 32,245, 7,205,219,112,119,255,167, 55, -106,214,172, 73, 70,140, 24,145,225,116, 58, 77,118,187, 61,124,209,162, 69,227,116, 58, 29, 5,176,221,106,181,238,185,123,247, -174,161,168,132,125, 60,229,222,224,167,139, 22, 5,106,237,118,101, 91, 0, 29,106,213,170, 69,134, 15, 31,158,225,116, 58, 77, - 86,171, 53,124,241,226,197,190,107,122, 16, 18, 18,162,149,203,229,237, 0,116, 44, 85, 58, 61, 24,216,137, 92, 88,185,141,214, - 46,233,239, 5,118, 63, 8,128,130, 82,154,236,195,186, 17, 0, 84,148,210,107,255,180,230,131, 32, 42, 42,202, 78, 41,149,248, -243, 31,169, 84,170,240,167,188, 50, 24, 12,102,176,138,170, 0, 73,108,108,108, 91, 74,233, 75,149,171, 86, 31,208,239,185, 87, -148,149,107,212,135, 81, 8,192,245, 12, 1, 9, 59,127, 3,128,229,190,234, 85,175, 94, 93, 22, 24, 24,248, 73,229, 58, 77,223, - 30, 57,118, 10,119, 38, 85,129,221,215,121,136, 57, 59, 68, 28, 96, 51,166, 35, 39,249, 2, 82, 47,238, 54, 59, 28,142, 3, 37, -217,185,219,153, 78,236,189, 96,131,136, 3, 56, 14, 16,113, 4,162, 18,142, 31, 78, 41,141,164, 0, 54,157,180,128, 82,170,123, -212, 14,100,133, 10, 21,186,247,238,221,123,221,155,111,190, 41, 54,153, 76,176, 88, 44,160,148, 66,161, 80, 64,167,211, 97,245, -234,213,226,193,131, 7,127, 21, 21, 21,149,144,148,148,116,200, 87,205,151, 94,122,105,221,235,175,191, 46, 62,127,254, 60,236, -118, 59,148, 74, 37, 20, 10, 5, 66, 66, 66,176,104,209, 34,241,136, 17, 35,124,210,172, 93,187,118, 11,185, 92,254,121,227,198, -141,155,214,170, 30, 33, 74, 11,169, 9, 0,168, 84,165, 6,180, 52,165,195,181,212,240,220,216,216,216,243, 38,147,105,202,133, - 11, 23,254, 40,210,224,143,248, 43, 88, 42, 34,239,205,123,171, 21, 39, 22,113,228,127, 95,238,239,189,100,237,238,175, 58, 52, -174,126, 23,128,113,195,134, 13,214,158, 61,123, 90, 71,140, 24, 97,191,112,225, 2,247,245,215, 95, 63,185,125,251,246,190, 81, - 81, 81,187,147,146,146, 22,123,211,252,120, 10,200,166,148,117,137, 54,187,179, 98,104, 7,135,165,123,212,249,217, 35, 71,142, -204,138,138,138,114,122,106,142, 26, 53,202,126,233,210, 37,238,171,175,190,106,184,125,251,246, 62, 46,205, 37, 69,154,193, 65, - 95,239, 41, 31, 59, 84,214, 35, 54,120,247,152,209,195,239,211,244, 39,157, 5,168, 85,202,223, 61, 17, 1,136, 35,132, 44,164, -148,238, 47,162, 30,136, 1,240, 44,128, 25, 15, 73,179, 72,148, 74,101,170,197, 98, 9, 7, 0,133, 66,145,102, 54,155, 35,124, - 56,183,201, 55,223,124, 3,169, 84, 10,142,227,192,243, 60,120,158,135, 32, 8,160,148,230,125,186, 31, 8,122,239,189,247, 88, -115, 54,131,193, 40, 59,131,213,168, 81,163,141,221,251,190,208,173,121,219, 46,112, 74,195,113, 33,141,224,214,117, 10,177,200, - 9, 14, 2,174, 29, 93, 75, 57,142, 91, 92,160,226, 58, 93, 88, 4, 44, 32, 48,240,224,128, 87, 62,174, 87,181, 94,107,108, 56, -235,128,192,219,144,113,126, 19,178,111, 30,133, 33,229,156,205,105, 53,158, 38,132,236, 21,139,197, 51, 79,157, 58,101, 42, 78, -211,123,197, 9, 8,148,130, 80, 2, 8, 0, 64,239,133,177,238,175, 96,125,209, 60,177,118,231,185, 74, 68,170, 6,165,244,178, - 15,149,118,153, 63, 93, 81,152,166, 78,167,235, 61,102,204,152, 53, 61,123,246,228, 50, 50, 50, 64, 41,197,154, 53,107,144,144, -144,128,168,168, 40,188,247,222,123,168, 84,169, 18, 62,254,248, 99,209, 75, 47,189, 52, 11, 64, 11, 95, 52, 63,124,241,197, 53, - 61,135, 15,231,142, 30, 61, 10,167,211,137,173, 91,183,226,204,153, 51,136,140,140,196,155,111,190,137, 74,149, 42,225,253,247, -223, 23,189,250,234,171, 69,106, 54,110,220,248, 90,149, 42, 85, 42,189,248,226,139, 92,175, 94,189, 72,154, 1,120,229,219, 11, -247, 10,160, 68,142, 65, 3, 7,112,221, 63, 31,133,173, 91,183,214,251,241,199, 31, 87,196,198,198,218,226,227,227,213,190,231, - 39,161,129, 1,193, 25, 0, 82, 1, 32, 48, 48, 80, 13,192, 4,192, 84,187,118,109,241,119,223,125,231, 60,127,254,252,213,238, -221,187,247, 4,176,184, 48, 77,135, 83,136,252,113, 82,103, 12,159,182, 85, 49,121,242, 7,105, 28, 39,113, 0,176, 3, 64,112, -112,112,158,102,205,154, 53,197,223,126,251,173,243,226,197,139, 87,187,118,237,218, 19, 30,175,148,242,150, 78, 94, 90,174,117, -131, 86,117,237,187,110,101, 54, 52, 44,191,186,251,245,190,202, 45, 79, 84, 9, 54,150, 52,157, 3, 59,145, 11,110,243, 52,176, - 19,161,197, 68,185, 40,128,139, 5, 35, 89, 5, 53, 41,165,119, 8, 33,243, 1,252, 65, 8, 25,224,205, 16, 17, 66, 90, 1, 88, - 5,160, 59,165, 52,173,184,242,233,169, 41,147,201,164,118,187, 61,184,160,241,241, 87,211, 35, 45, 52, 62, 62, 30,177,177,177, -240,252,116,223, 88,184,214, 9,247,245, 60, 18,137, 68,152, 55,111, 30, 56,142,131, 84, 42,133, 68, 34,129, 84, 42,189,111,106, -212,168, 17,188, 61,121, 93, 84,249, 36,132,136, 42, 85,170,244,158, 72, 36, 26, 97,179,217, 42,200,229,114, 61,207,243,139, 66, - 66, 66, 62,139,143,143,119, 60, 10,117, 8,211,100,154,143,130,102, 49, 52, 1, 16,230, 49,111, 3, 32,115,125,207,192,189, 97, -167, 66, 11, 44,247, 92,207,253,153,238, 90, 30,230,250, 31,245,208, 77, 7,112,180, 76, 13, 22, 33,132, 82, 74,137,251,179,144, -117, 3,110,155,131, 96,188, 94, 14, 98, 78,128, 88, 68, 32, 22, 1, 0,193,157,219,231, 96,203,189,179,239,216,177, 99,215,125, -217,168, 92, 46,255,124,208,232,105,245,248,208, 38,216,112,210, 14, 71,206, 45,220,218,253, 5, 53,167, 95,154,239,186,219, 61, -155,144,144,224, 40,237,206, 9, 20,224, 61,141,149, 0,144,146, 15, 28,126,211,163,194,212, 63, 42, 14, 57, 50, 50,178,239,196, -137, 19, 87, 55,106,212,136,252,250,235,175,168, 87,175, 30, 22, 46, 92, 72,175, 92,185, 50, 83, 16,132, 47,174, 93,187,214, 41, - 55, 55,119,233,111,191,253,134,102,205,154, 33, 32, 32, 32, 38, 54, 54, 86, 82, 84,197, 30, 25, 25,217,119,201,152, 49,171, 27, -182,110, 77,102,118,234,132,168, 33, 67,176,108,215, 46,122,227,198,141,153,130, 32,124,113,243,230,205, 78, 22,139,101,233,194, -133, 11,209,184,113,227, 98, 53, 69, 34, 81,197,101,203,150,137, 84, 42, 21, 68, 34, 17,162, 21, 64, 68,144, 20, 51, 86, 94, 64, -122,166, 5,227,251,234, 32, 22,139,209,169, 83, 39,232,116, 58,241,232,209,163,139,124,186,245,236, 15, 93, 50, 27,189,178,241, -243,209,179,246,125, 64, 8, 71,171,132,139,183, 5, 73, 12,103,128, 16, 49,128,160,114,229,202, 57, 0,192,110,183,103,173, 95, -191,222,153,144,144, 16, 90,189,122,245, 80,248, 49,106,252,241,227,199, 77, 33, 33, 97, 25,149, 43, 87, 22, 3, 8, 10, 9, 9, -241,166, 89,206, 87,189, 23,123, 52,146, 25,205, 54,236, 58,118,189,253, 75,211,118,180,171,174, 11, 56,222,179,113,224, 95, 0, -114,253, 77,167,219, 44, 13,236, 68,232,202, 85, 7,210,192, 11, 0,159,227,128, 61,219, 1,103,182, 3,142,108, 7, 28, 89,142, -129,111,206,106,184,114, 27, 37,126, 84,152,135, 8, 33, 3, 0,172, 42,104,178, 60,140,208, 0, 74,233, 9,127, 53,237,118,251, - 62,183, 49, 81, 40, 20,225,132,220, 51,134,114,185,220, 97,181, 90, 59,248,163, 9, 0,241,241,241,136,137,137, 17,185, 52,169, -251, 19, 37,124, 51,128,251,165,245, 34,145, 8, 49, 49, 49,232,221,187, 55,106,213,170,133,219,183,111, 99,215,174, 93,184,116, -233, 18,164, 82, 41, 8,241, 47, 4, 78, 8, 17, 85,174, 92,249, 64,231,206,157,235,191,241,198, 27,138, 74,149, 42,225,194,133, - 11,149,230,206,157, 59,126,223,190,125, 79,199,198,198, 54, 41,234, 92,100, 48,254, 11,248,232, 65,194, 8, 33,235, 61,234,150, - 94,238,249, 9, 19, 38, 76,138,139,139, 59, 67, 8, 89,239,185,220,115, 61,207, 79,215, 54,215, 83, 74,123, 77,156, 56,177,222, -244,233,211,167,185,215,125, 40, 17, 44,145, 72,212,239,244,230,175,226,107,216,169, 46,162, 94, 79, 87, 61,118,239, 53,114, 55, - 78,108,134, 32, 8,139,124,209,137,141,141,109, 31, 85,163,201,232,168, 90,205,176,225,132, 13,134, 43, 91,144,122,232,187,155, -130,211, 62, 44, 33, 33, 97,103, 89,236, 84,227,198,141,251, 7,133,150,135,213, 78, 93, 6, 43,191,201,122, 92,168, 88,177,226, -160,105,211,166, 45,171, 86,173, 26, 89,185,114, 37, 40,165, 88,189,122, 53,189,114,229,202,112,189, 94,255,179,107,181,223,106, -213,170,181, 80, 36, 18, 41, 57,142, 67,165, 74,149,164, 39, 78,156,136, 2,144, 88,152,230,138, 9, 19,150, 63, 89,171, 22,146, - 6, 14, 68,107,167, 19, 63,254,242, 11,189,193,243,249, 52,107,212,168,177, 80, 44, 22, 43,197, 98,113,177,154, 46, 99,130, 43, - 87,174, 64, 36, 18, 33, 52, 52, 20,159, 63, 95, 1,135, 47,102,162, 97,149,112,152, 51,111, 99,197,246,227,184,126,253, 58,130, -130,130,124, 51, 64,223,247,248, 40,186,118,108,221,197, 75,150, 37,201,249,204,147,233,233,233,229,210,211,211, 17, 20, 20,148, -197,113,156,253,139, 47,190,144, 94,190,124, 57, 72, 46,151, 67, 46,151,195,110,183,251,117,225,117, 58,157, 92, 89,107, 6,107, - 21,232,215,241, 9,105,183,150, 53,176,239,196,141, 38,179,255,184,214, 48,249,226,222,231, 74,163, 9, 94, 0, 14,181, 62,118, -223,242,168,151,194, 75,120, 87,186,223,101,178,118, 16, 66,164,174,197,169,174,207, 1, 69, 53,245, 21,163,153, 55,111,181, 90, - 61,163, 76,146,146,104,198,198,198,186, 53,242,157,209, 10,133, 34,205, 29,185, 82, 40, 20,105, 62,103, 35,207, 67, 38,147,161, -126,253,250,120,251,237,183,113,225,194, 5,236,219,183, 15,225,225,225,232,218,181, 43,196, 98, 49,110,221,186, 5,142,243,111, -100,155, 10, 21, 42,188,247,212, 83, 79,213,253,230,155,111, 20,137,137,137,184,112,225, 2, 2, 2, 2,240,201, 39,159, 40,223, -125,247,221,234,135, 14, 29,250, 8,192,135,236, 18,203, 96,248, 92,159,244, 42, 56, 79, 8, 89, 31, 23, 23,215,203,155,169,242, - 98,230,242, 45,159, 62,125,250, 52,143,249,204,178, 76, 43,231,233, 32,139,140, 6, 9, 66,171,160,114,186,240, 87,158,235, 10, - 65, 0,156, 2,224,228, 41,204,166, 92,164, 92,216,105,178,217,108,171,138,219, 88,221,186,117,213,224,196, 63,189, 60,230, 35, -178,254,184, 13,150, 59,137, 72, 57,248,237, 13,202, 59, 26,148,165,185, 10, 12,137, 88,246,225,140, 31,113,244,154, 13, 2,253, - 59,146,197, 11,247,190, 63, 14,148, 47, 95,190, 78,175, 94,189,150, 85,173, 90,149,172, 88,177, 2, 86,171, 21,183,110,221,162, -199,142, 29,123,217,195, 8, 65,167,211,141,232,222,189,187, 82, 36, 18,193,225,112,224,218,181,107,198,180,180,180,155,133,105, -142,108,219,118, 89,131, 10, 21,112,251,185,231,192,103,103,227,148, 66, 65,143, 10,194,125,154,125,251,246, 85, 74,165, 82, 80, - 74,139,212, 44, 80,176, 97,183,219,145,148,148,132, 83,199, 15,195,120, 99, 63,150,253,242, 61,150, 44, 89,130,235,215,175, 67, - 44, 22,195,233,244,253, 57, 9, 62, 55,205, 82, 67,167,206,241, 92,150,149,149, 21,116,248,240, 97,122,230,204,153, 32, 87,185, -117, 27,166, 18, 91,235,130,154, 30, 38,172, 68,154, 74,185, 4, 29, 26, 87, 21, 57,121, 65, 90,234,116, 10,217,118,175,203, 29, -119, 28,165,168,192,246, 3,144,122,244, 59,138, 40,169,185, 42, 96,124,252,142, 0, 21, 21,193,242, 22,173, 50,155,205, 17,148, - 82, 18, 31, 31, 15, 95,250, 95,121,212,111,144,201,100,232,221,187, 55,206,159, 63,143,164,164, 36,136, 68, 34, 88,173, 86, 88, -173, 86,196,196,196,148, 40,130, 37,147,201,158,127,227,141, 55, 84,215,175, 95,199,157, 59,119,192,113, 28,156, 78, 39,120,158, -199,168, 81,163, 84, 50,153,108, 40,187,100, 50, 24,222, 61, 8, 33,100, 20, 33,100, 84, 65,131, 84, 90,131,230, 77, 99,226,196, -137,245, 0,200, 31, 72, 4,203, 29,158, 43,228,110,177,127, 96,104,228,178,137,113, 63,136,255, 56, 41, 66,102,242, 69, 88,210, - 46,162, 98, 76, 31,164, 94,220, 15,202, 59,126, 63,123,246,108,110,113, 27,147,203,229,239,245, 27, 49, 37,122, 95,162, 28, 22, -155, 5,105, 7,190, 16, 4,167,253,197,227,199,143,231,148,149,185, 10, 8, 14, 95,246,254,231, 63,138,255, 60, 35,193, 29,253, - 69, 92, 88,251, 30,120,187,169,224,170, 27,253, 60,240, 36, 38, 38, 38,178, 70,164, 18,156, 76,142,131, 64,196,192,129, 3, 69, - 43, 87,174,124,104,157, 93, 83, 82, 82,206, 71, 69, 69, 77,182,219,237, 83, 57,142, 67,106,106, 42, 77, 72, 72,120, 41, 41, 41, -233, 23,143,187,231,238,205,154, 53,155, 59, 97,194, 4, 16, 66,176, 99,199, 14,152, 76,166,189,148, 82,161, 40,205,224,211,167, -167,182, 51,153,176, 54, 52,148,206,227,249,251, 52,187,118,237, 58,119,220,184,113, 32,132, 96,207,158, 61, 69,106,122,114, 45, -131,194,100, 1, 42,151,227, 16, 20, 20,132, 93,187,118, 65, 42,149, 66, 44, 22, 35,211,161,133,224,148, 33, 74, 98, 46,113,158, - 8,130, 64,114,114,114, 68,102,179, 89,228,112, 56, 56,169, 84,154,215,100,228,112, 56,132,178,210, 20, 4,161, 84,154,249,124, - 80,105,211,105,207,241,110,164,108,119,202,162,217,201,230,246, 9,165, 49, 87,110,227,227,238,128, 46,151,203,243,140,138, 63, - 81,166, 66, 34, 88, 37,250,221,155,193,146, 72, 36,168, 81,163, 6, 14, 30, 60,136,128,128, 0,104, 52, 26,168, 84, 42,200,229, -114, 4, 4, 4, 64, 38,147,129,227, 56,191, 76,150,221,110,175, 84,161, 66, 5, 92,190,124, 25, 10,133, 34,111,146,201,100,168, - 85,171, 22, 76, 38, 83, 20,187,180, 50, 24,222, 61,136,183,145,220,203,162, 25,207,155,201,154, 62,125,250, 52,207, 40, 88,153, - 26,172, 34, 42,170,254,129,161,145,203, 38, 76,251, 65,188, 50,129, 67, 86,242, 5,220,216, 60,201,201,219, 77,105,130,224,208, -101, 94,221, 7, 0,139,124,220, 94,187,242, 85, 26, 96,255, 9, 59, 44, 23, 86,195,158,121,237,171,227,199,143,239, 45, 75,115, - 53,105,250,143,226, 63, 78,138,113, 87,127, 17, 87, 55, 76,224,157,182,220, 23, 19, 18, 18,150,150, 84,183,105,211,166, 53, 90, - 54,142,249,105,104,132,163,229,211, 3,171, 66,166,144,226,189, 43,226, 46,103, 15, 36, 30,141,137,137,121, 57, 33, 33,225,244, -195, 42,144, 73, 73, 73,159,232,116, 58, 73, 84, 84,212, 7,183,111,223,126, 33, 57, 57,249, 87,143, 40, 83,239,254,253,251,175, -121,245,213, 87,185,128,128, 0,220,189,123, 23,147, 39, 79, 54,115, 28, 55,206, 23,205,237,161,161, 31, 28,113, 58,239,211,236, -240,204,171,107,222, 29,251, 34, 39,145, 72,144,145,145,129,169, 83,167, 22,171, 41,200,203,147,231,190,190, 5,181, 66, 2,133, - 84,129,155, 7,115, 17,215,231, 94, 83,145, 84, 42, 69,188,177, 1,136,166, 34,148, 82, 49,226,111,103,194,169, 61, 75, 98, 95, - 73,144,196,127, 31, 83,172, 73, 32,132,240,119,239,222,149, 36, 38, 38, 42, 44, 22, 11, 87,185,114,101, 11,199,113,212,233,116, -114,119,238,220,145,202,100, 50,148, 43, 87,206,206,243,188, 95,177,203, 59,119,238,138, 19, 19,111,202,109, 54, 91,153,105,122, -163,212,154,206, 66, 12,150, 61,221, 94,202,164,221, 36,132, 84,114,127, 47,139,242,106,177, 88,194, 61,154, 6, 81, 68, 95, 11, - 95, 35, 88, 37,254,221, 75,133, 11,153, 76,134, 43, 87,174, 32, 44, 44, 12, 78,167, 19,106,181, 26, 74,165, 18, 74,165, 18,102, -179, 25, 50,153, 12, 34,145,200, 47,227, 38,147,201,110, 94,184,112,161, 86,112,112, 48,120,158,207,103,178,174, 95,191, 14,181, - 90,157,196, 46,173, 12,134, 95, 1,143,245,158, 70,139, 16,178,126,194,132, 9,147, 74,170, 55, 97,194,132, 73,165,141,138, 21, -105,176,220, 21, 93,193, 10, 47, 54, 54,182,127, 96, 72,249,101,227, 63, 93, 40, 94,122,140, 67,118,242,121,232,183,190,239, 20, - 28,230, 33, 28,199,237,191,117, 96,193, 42, 0,166,132,132,132,221, 62,100, 10, 23,219,172,205,147, 34,185, 6,148,154, 97, 78, - 58, 8,142,227,102,150,165,185,154, 16,247,131,120,229,113, 49, 50,147, 47,224,198,166,137, 60,111, 55,149,216, 92,181,111,223, - 94,108, 52, 26,223,169,167,226, 63,126, 59,218, 46,141,146, 81,156,155,247, 30, 46, 84,210,162, 94,115, 21, 42,215, 17, 26, 29, -222,100, 73,136,141,141,157,110,181, 90, 63, 57,123,246,172,253, 97, 20, 54,189, 94,255, 81, 84, 84,212, 31,201,201,201, 39,221, -203, 34, 35, 35,251, 62,255,252,243,171,218,182,109,203,253,246,219,111,232,211,167, 15, 62,252,240, 67,154,158,158,254, 74,114, -114,242,149,146,106,246,125,115,209,234,193, 61, 91,144, 65,227,103,227,195,145, 29,241,195,156, 79,139,213, 12,233,245,203,201, -138, 81,189, 69, 53,130,205, 24, 61,168,213,189, 59,133,229,231,113, 33,245, 94,192,211, 33,136,144, 41,132, 99,254,176,134,224, - 56,130, 61,199, 46,227,231,148,122, 68,127,125,215, 21, 32, 38,186, 56,115,178,104,209,162,192,180,180, 52,174,118,237,218,119, -234,215,175,159, 43,149, 74, 5,179,217, 44, 40, 20, 10,167, 90,173, 22, 44, 22,139,236,250,245,235, 33, 73, 73, 73, 34,135,195, -225,243, 5,125,251,246,237,186, 58,117,234,102, 52,108,216,176, 80, 77,189, 94,207,249,162, 89,212,229,184,180,233,132, 35,171, - 16,131,149, 86,170, 8, 22,165, 52,186,152, 14,167, 15, 13, 87, 36, 12, 0,132,194,134, 98,240, 39,130,229,142, 72,201,100, 50, - 28, 56,112, 0,221,186,117,131, 32, 8,144,203,229,121,195,146, 28, 57,114, 4, 82,169, 20, 34,145,200,191, 0,163,221,190,100, -206,156, 57, 19,167, 79,159,174,118,155, 56,165, 82, 9,185, 92,142, 47,190,248, 34,215,106,181,254,202, 46,153, 12, 22,189,242, -238, 65, 10,144, 94, 32,122,101,243,152, 79,199,189,119, 43,247,114,125,135,151,239, 54, 47,203,238,196,197,197,237,244,136, 92, -165,255, 35, 17,172,216,216,216, 46,129, 33,229,151,189,253,233, 66,241,226,195, 34,100, 39,159, 67,198,206, 15,156,212,105, 25, - 18, 31, 31,191,218,181, 90,107, 95, 55,212,168, 81,163,154,149,159,104,174, 74,203, 17, 64, 5, 39,248,236,196,212, 99, 71,143, -166,150,118, 7, 98, 98, 98,186, 4,134, 68, 44,123,247,179, 31,196,191,197,139,145,165, 63, 15,253,214,247, 75,101,174, 98, 98, - 98,186, 74, 57,178,228,141, 10,246,208, 94,229,156,224, 41,176, 36, 69,130,101, 39, 14,237,113,128, 90,234, 54, 87,116,173,223, - 70,142,167,134,168,196,215, 78,219, 63, 56,186, 21, 99, 99, 98, 98,134, 36, 36, 36,108,120, 72,145,172, 60, 35, 20, 21, 21, 53, -112,248,240,225,203,219,183,111, 79, 54,111,222, 12, 65, 16, 48, 99,198, 12,122,242,228,201, 87, 61,163, 81,254,106,246, 27,187, -120,249,128,222,157,200,251, 43, 29,200, 52, 41, 49,126,202,108,106, 77, 58, 85,172,230, 19, 81,242,250,243, 63, 28, 8, 0, 56, -116, 54, 5,219, 79,101, 34, 41,221,132,225, 77,129,115, 0,196,196,137, 16, 46, 21, 31,254,124, 10, 13,171,104, 48,160,125, 13, -180,109, 92, 3,115, 22,111,170, 84,174,243,183,145, 25, 91, 95, 79, 46,226,164, 76,223,182,109,155,234,131, 15, 62, 48,232,116, - 58,177,193, 96,224,120,254,239,199, 26,228,114, 57,116, 58,157, 51, 43, 43,203,182,117,235,214,106, 0,238, 20,149, 86,137,152, - 75, 30, 62,109,107, 69,169,136,183, 60,243, 76, 63, 90,190,124,249, 66, 53, 51, 51, 51,237,219,182,109,171,230,203, 9, 41,226, - 13,233,179,150,236, 9, 30,216,185,161,164,138,238,254, 78,252,254,166, 51,191,193,202,116,160,194,139, 97,176,223,113,192,126, -199, 1, 91,134, 3,246, 52, 7,156,166, 71,238,113,142,146,118, 64, 47, 38, 18, 22, 94, 86, 17, 44,169, 84,138, 91,183,110, 97, -251,246,237,104,218,180, 41,180, 90, 45,114,115,115,113,240,224, 65,164,164,164,228, 69,176,252, 10, 3,222,188,249,185, 68, 34, -233, 61,102,204,152, 39, 94,125,245, 85,117,157, 58,117,144,152,152,136,217,179,103,155, 78,157, 58,117, 53, 56, 56,120, 42,187, -188, 50, 24, 62,113,244,223,150,224,162,154, 8, 39, 53,239,255,161,120,209, 33, 49, 50,147,206, 32,123,239, 71, 5,205,149, 47, -119,134,158,111,219,142,169,251,100,115, 92, 77,117,130,207,185, 1, 42, 56,227, 75,146, 96, 47,111,240,158,216,114,192,135,226, - 95,142,138,145,173, 63,135,244,157, 31,250,109,174,188,104,126,184,243,157,254,161, 16,156, 56,185, 97, 57,190,188, 37, 51, 94, -183,144,183, 18, 18, 18,126,164,148,210,152,152,152,161,183, 46, 57,230, 52,239,161, 8,236,247,204, 16, 60,211,199,169,126,103, -248, 47,239, 3,216, 80,132,102, 89,132, 70,139,212, 44, 95,190,124,157,122,245,234, 45,235,209,163, 7, 89,179,102, 13, 12, 6, - 3,178,178,178,112,224,192,129,145,201,201,201, 63,150, 84, 51,170, 65,159,101,125,123,117, 34, 31,174,226,113,241,240, 10,104, -108, 73,176,232, 15,251,164,121,230,150, 45,225,185,119,127,138,149,201,149,224, 85, 58,140,239, 19,133, 58,229, 8,204,230,191, -187,236, 53, 9,186, 8, 35,185,139,189,241, 58,172,219,178, 7, 34,222,132, 27,233,150, 91, 25,219,223, 77, 46, 42,157,105,105, -105, 99,197, 98,113,135, 97,195,134, 13,109,221,186,117,192, 43,175,188,146,170,213,106,141, 50,153, 76, 20, 26, 26, 42, 19, 4, - 65,182,117,235,214, 10, 41, 41, 41,193,130, 32,252,154,150,150,182,179,176,116, 78,158, 2,138, 41, 79, 87, 62,119, 14,228,200, -145,200,246, 47,109,151, 62,215,174, 93, 59,237,136, 17, 35,210, 2, 3, 3, 13, 5, 52, 43,166,164,164, 4, 9,130,176, 36, 45, - 45,109, 87,113,249,121,114, 89, 90,100,141, 46, 55, 62,153,155,105,120,171,106,133,112, 81,223,167,234, 74,130,181,247,222,115, -237,111, 58,129, 2,227, 96,189, 49,251,201,162,202, 76, 97,227, 96, 61,140,242,105, 54,155, 35,252,141,138,249,146,206,132,132, - 4, 90,112, 60,172,162, 34, 88,133,105,202,100, 50,136,197, 98,164,167,167,227,175,191,254,202, 55,254,149, 76, 38,203, 27,198, -193, 31, 77, 74, 41, 79, 8,105,201,243,252,123, 99,199,142, 29, 97, 50,153, 42,168,213,106,189,221,110, 95, 20, 20, 20, 84,228, - 56, 88, 15,227, 24, 49, 77,166,249, 48, 53, 31, 55,138, 50, 88,202,253, 9,151,192,201,211, 96, 56, 60,195,111,115,229,141,148, - 76, 11,110,203,157,112,220,189, 8, 66, 72, 66, 25, 29,100,237,190,132, 43, 16, 43,238, 32,251,208,231,188,224, 48,151,170,207, -149, 59, 46, 0,193, 9,219,174,223,240,230, 37,101,134, 0, 52,136,143,143, 79,241,168,208,127,109,208,160,193,214, 45,191, 8, -103,158,106,235, 12, 59,125,125, 29, 8, 33,246,135,125, 48, 93,157,212,167,172, 90,181,106,106,110,110, 46,238,222,189, 75, 15, - 31, 62, 60, 76,175,215, 47, 42,173,230,236,159,250, 77,189,124, 41, 27,138,156, 67,212,114, 99,173,231,144, 13, 69,146,181,241, -249,198, 79,140,252,171, 53,201, 62,213, 66,121,229,251,241,107, 51,202, 7,235, 94,123,141, 68, 70, 70, 34, 56, 56, 24,161,161, -161,200,205,205,197,229,195, 27,169, 57, 37,197, 42, 4, 52,254,198, 18,217,105,115,198,246, 94,123,124,136, 58, 80, 0, 59, 98, - 99, 99,247,238,218,181,171,231,129, 3, 7,250,118,234,212, 41,181, 69,139, 22,198,132,132,132,202,137,137,137, 17, 14,135, 99, - 77,100,100,228,134, 98,199, 26,162,148, 78,254,187, 53,111,123,108,108,236,158,237,219,183,247,220,183,111,223, 51, 79, 61,245, - 84, 90,139, 22, 45,114, 93,154,225, 78,167,243,143, 26, 53,106,108,220,181,107,151, 79,143, 60, 82, 58, 89, 0,240,126,131, 46, -227,167,157,207, 74,252,246,106, 82,198,115, 13,107, 70, 17, 10,202,249,157, 78, 20, 24, 7,171,136,113,174,138,251,253, 33,221, - 49,150, 90,179, 96, 36, 44, 38, 38, 38,194,109,166, 10,126,250, 81,143,160, 97,195,134,240,124,210,145,227,184,124,147, 72, 36, -130, 88,236,255,219,197, 40,165, 60,128,105,174,137,193, 96, 48,131,133, 55,141,241, 95, 79, 7, 16, 14,224,173,248,248,248,141, -165,217,144, 72, 36,218,147,176,229,135, 76, 89,212,249, 96,235,173, 61, 70, 74,233, 79,101,177, 3,130, 32,140,205, 77,248,102, - 58,165,180, 28,165,244,221,132,132,132, 53,101, 32, 59,189,213, 23,107,192,113, 42, 34, 80, 33, 46, 33, 33, 33,165,224, 10,167, - 78,157, 74,143,137,137,121,241,237, 97,139,243, 94, 0,253, 40, 28, 80,119, 39,245,232,232,232, 15,110,222,188,153,239, 9,192, -210,106, 42,194, 99, 63,176,167, 39,248,109,216,206, 45,236,178, 15,232,178, 15,120,247,243,218,181,107, 63, 59,113,226,196, 5, -117,234,212, 81,134,135,135,147, 67,135, 14,209,107,215,174, 57, 13, 6, 67,220,217,179,103, 39,151, 36,125, 46, 83,178, 70,167, -211,253,181,121,243,230, 1,155, 55,111,110,206,243,252, 33, 74,233,148,228,228,100,115, 89,105, 10,130,176, 31,192,239,122,189, -222, 82, 18,205, 83,127,205, 52, 1,120,185,110,251,119, 39, 38, 24,147,127, 22,201,212, 79, 94,189,122,245, 92, 41,210,121,177, -148,191, 23,199,234, 7, 80, 68, 75,173,233,207,240, 11,190,122,160,177, 99,199,250, 89,157,137,192, 96, 48, 24,197,221, 93, 61, -176, 9, 64,125,207,249,166, 77,155,106, 27, 53,106,212,183,126,253,250,170,178,210,124, 16,233,124, 28, 52,117, 58, 93,195, 71, - 89,179,118,237,218,227,155, 53,107,102,108,208,160,193,143, 0,196,236,184, 63,122,154, 0, 52, 15, 64,179, 60, 59, 70, 76,147, -105, 50, 77, 31,244, 71, 61, 72,253,127, 98, 18,255,147,102,238,240,225,195, 6, 0,127, 48, 91,251,143, 68,178, 78, 62,202,154, -231,207,159,159, 9, 96, 38, 59, 82,143,244,205,151,241, 1,104,166,176,156,101, 48, 24,255, 5, 56,150, 5, 12, 6,131,193, 96, - 48, 24,101, 11, 1, 80,191,144, 59, 77,159,159, 14, 32,132,212, 47,193,157,236,105,166,201, 52,153, 38,211,100,154, 76,147,105, -254,183, 52,139,211,166,148,158, 38,132,140,242, 54,146,251,191,202, 96,249,251,180,141, 95,226,236, 17, 86,166,201, 52,153, 38, -211,100,154, 76,147,105,250,175,255,175, 55, 88,172,137,144,193, 96, 48, 24, 12, 6,163,140, 17,179, 44, 96,248, 66,133, 10, 21, -226,154, 53,107,246,191,163, 71,143,206,186,121,243,102,137, 70,159,142,141,141,109,164,209,104, 62,115, 58,157, 77,156, 78,167, - 66,169, 84,158, 53, 24, 12,115,142, 29, 59,182,164,164,233,138,141,141,109,170,209,104, 62,113, 58,157, 49, 46,205,211,217,217, -217, 95, 38, 36, 36,172,120,148, 52, 25, 12, 6,131,193, 12, 86, 30,243, 38,146, 72, 0,226,209,113,244, 22, 0, 68, 69, 69, 85, - 22, 4,161, 35, 33,228, 73, 66,200, 9, 0, 59,146,146,146, 18, 75,147,128, 71, 89,115,254, 36, 17, 70, 14, 26, 1,163,201,248, -210,222, 99, 7,191, 74, 74, 77, 85,100,153,130,178,130, 84, 89,193, 81, 17, 17,230, 54,141, 91,140,213,168, 52,139, 22,174,248, - 1,175, 78,227, 31,137, 3, 74, 8, 41,175, 84, 42,135,113, 28,215, 77, 16,132,141,102,179,249,103, 74,105,169, 94, 73,164,211, -233,194,251,246,237, 59,225,155,111,190,193,176, 97,195, 62,208,233,116, 95,234,245,122,191,158, 48,107,221,186,245, 27,106,181, -122,218,152, 49, 99,148, 49, 49,177, 68,165, 82,225,210,165,139,141,103,205,154,245, 93,187,118,237, 6,239,217,179,167, 23,165, -212,175,215,187,180,105,211,230, 93,149, 74, 53,101,236,216,177,242, 70,141, 26, 17,169, 84,138, 19, 39, 78, 52,253,230,155,111, -126,108,215,174,221,192, 61,123,246,244,167,126,182,129, 23,212, 84, 40, 20, 56,125,250,116,211, 89,179,102,149, 72,179,243, 71, - 39, 37,148, 82,177,235,216, 56,183, 78,109,232,240,117, 25,171,158, 24, 12, 6,227, 49, 52, 88,243, 38,146,169, 0, 38, 1, 32, -147, 71, 73, 55,252,184, 41,236, 70,141, 26, 53,200,136, 17, 35, 50,156, 78,167,201,225,112,132,255,252,243,207,227,116, 58, 29, - 5,176, 29,192, 30,189, 94,111,240,241,130,173,165,148,182,227, 56,174, 67,141, 26, 53,200,200,145, 35,239, 56, 28, 14,147,205, -102,139, 88,180,104,209, 91, 58,157, 78,240, 85,115,215,199, 42, 2,128,140, 90, 20,160, 49,217,208,150,227,184,142,165, 77,167, - 91, 19, 64,165,125,241, 7,126,185,120,253, 74,139,192,128, 26,182, 17, 3, 59, 75,165, 18,113,184,221,225,196,242, 77,123, 45, -203, 54,172, 94, 88,173, 82,149,129, 0, 94,219,245,177,234, 38, 0,218,126,178,137,254,211, 7,145, 16, 34,147,203,229,207, 72, -165,210, 87, 66, 67, 67,195,186,117,235,118,188,124,249,242,103, 82, 82, 82,234,108,222,188,121,123, 64, 64, 64,154,221,110, 95, - 96,181, 90,215, 80, 74, 75, 50,226,124,101,142,227,144,148,148, 4,137, 68, 34, 1, 80, 5,192, 41, 95,255,220,164, 73,147,134, - 50,153,108,250,188, 31,151, 42,156, 92, 0,238, 56, 5,220,201, 1,164,161,181, 48, 37,238, 43,205,204, 79,223,111,219,162, 69, -139,241, 0, 62,247, 39,202,164, 82,169,166,172, 92,185, 82, 17, 30, 30, 14, 65, 16, 96, 48, 24, 80,167, 78, 29,124,250,233,167, -170,184,184,184, 46,205,154, 53,123, 29,192,156,146,106, 82, 74, 97,183,219, 81,175, 94, 61,204,156, 57, 83, 53,101,202, 20,191, - 52, 59,125,112, 92,146,161,191,212, 66,112,216, 63, 0, 0, 78, 34,253,180,211,135,194,145,140,164, 75, 77,139, 93,246,129,112, -112,219,167,141,152,201, 98,252,163,232,116,186, 86, 85,170, 84, 89,115,227,198,141, 3,130, 32, 12,214,235,245,214, 50,168,159, - 42,184,234,140, 96, 87,189,122, 23, 64, 34,165,247,110,220, 75, 66, 72,205,142,189, 69, 82,229,203,160,244, 73, 16,128, 35,220, - 9,167,221,244,243,157,139, 59,254, 44,157,166,106, 24,168,240, 36, 8, 4,142,112, 39,157,118,211,194, 59, 23,119,108, 98, 37, -131, 81,102, 6,107,222, 68, 18, 12,224,189, 81,131, 95,225, 68, 34,142, 44, 88,190,160,247,230,117,243,191,170, 23,211,243, 46, - 0,227,198,141, 27,173, 61,122,244,176, 14, 31, 62,220,126,241,226, 69,238,171,175,190,122,114,199,142, 29,125,117, 58,221,110, -189, 94,191,184,176,141, 45,248, 80,117,147,119,154, 43, 78,120, 94,105,205,148,143,155, 53,124,196,171,217, 81, 81, 81, 78, 79, -205,145, 35, 71,218, 46, 94,188,200,125,249,229,151, 79,238,220,185,179,159, 78,167,219, 85,148, 38, 0,114, 40,131,236,238,208, -216, 33, 45, 95,235,197, 61,195, 70,140,201,174, 88,161,162, 19,132, 24, 74,154, 78,151,230, 14,171, 67,219, 84,161, 22, 20, 67, -159,126, 14,106,165, 92,225,254, 81, 42, 17,227,133,167, 59, 68,228,154, 91,224,151,117,219,235,231,154, 21,167, 14, 25,144,208, -188, 28,237,136,191, 95,183,242,143,160,213,106,191, 82,169, 84,125, 26, 55,110,124,118,236,216,177, 59,159,126,250,233, 52, 0, -248,249,231,159, 43,126,254,249,231, 39, 0,236, 91,183,110, 93,248, 87, 95,125,245,252,177, 99,199, 62, 87,171,213,107,115,115, -115,199,250, 88,217,114, 0, 38,119,233,210,229,131,161, 67,135, 66,171,213,226,165,151, 94,130,197, 98,137,215,233,116, 31, 1, -152,174,215,235,139,221, 95,149, 74, 53,101,244,232,209,114, 65, 18,136, 15, 22, 95,193, 93,227, 61,143,167,146,114,120,237, 41, - 57, 6, 13, 26,164,250,236,179,207, 62,244,199, 96,105, 52,154, 79,198,142, 29, 43, 15, 15,191,247,174, 95,163,209, 8,163,209, - 8,131,193, 0,171,213,138,167,159,126, 90, 53,111,222,188, 79,252, 49, 88,158,154, 23, 47, 94,132,205,102,131,217,108,134,197, - 98,129, 86,171, 69,223,190,125, 85,115,230,204,241, 89,147,130, 72,120,187,227,187,241,255, 27, 28, 6, 0, 51,231,174,248, 14, - 32,205,124, 89, 70, 65,154, 0, 96, 6,171,232, 11,183, 8, 64, 95,177, 88,220,175, 70,141, 26,141, 47, 95,190,124,220,233,116, -254, 14,224,119, 74,169,163,148,218, 79, 69, 70, 70,126,150,156,156,252, 45,165,116,201,127, 37, 79,171, 87,175,254,199,210,165, - 75, 67, 55,108,216,240,244,212,169, 83, 7, 1, 88, 92,138, 60,148, 0,104,225, 50, 85,231, 93,198, 10, 46,163, 85,155, 16, 82, - 13,192,126,127,110,250,130,171,183,213,136,164,234,101,173,219,119,105, 61,160,127, 95,109, 88, 72, 32,114, 45, 60, 46,221, 72, -169,244,215,134, 63,218, 69,212,239,121,192,110, 49, 14,201,188,178,199,232,143, 38, 39, 85, 47,235,216,165,119,235,167, 58,117, -210, 6, 6, 6,226,142,193,129,171,137, 73,209,123,182,174,105, 19, 81,191,231, 30,187,197,248,124,230,149, 61, 38,118,214, 49, -252,129, 43,238, 18,225,254, 18, 18,172,201, 0,144, 12,192, 24, 24, 24,104, 3, 96, 2,112,183, 86,173, 90, 89,115,231,206, 77, - 90,179,102,205, 54, 66, 72,151,124,255, 46,240,132,129,192,219, 34, 95,125,110, 12,228, 82, 65,250,222,187,111,221,137,138,138, - 74, 45, 76,115,222,188,121, 73,107,214,172,217, 90,156, 38, 0, 4,105, 44,173,250,180, 11,108, 88,129,204,125,243,204,142, 81, -205,210,147,142,153,168,192,155, 2, 3, 3, 74,148, 78,151,102,219, 22, 13,203, 73, 57, 33, 25,250, 76, 51, 4, 34,207,247,187, - 64,228,208,103,154,161, 81, 24,116,245,107, 70,170,130, 52,150,182,197,105,150, 22,111,154, 54,155,173, 95, 72, 72, 72,214,157, - 59,119, 52, 54,155,141, 24,204, 78,201,133,219,166,192, 91,214,200,200, 11,183, 77,129, 6,179, 83, 98,179,217, 72, 74, 74,138, - 70,169, 84,102,217,108,182,126,126,164,243,147,105,211,166,125,244,211, 79, 63,113,141, 27, 55,134, 86,171, 69,139, 22, 45,176, -100,201, 18,241,228,201,147,167,185, 34,156,197,166, 83, 16,132,102, 49, 49, 49, 68,160, 20,153, 6, 7,118, 78,139,197,254, 25, - 77, 96,178,241,200,206, 49, 2,132, 64, 44, 22,147, 39,159,124,178,186,175,251,238,116, 58, 99, 26, 53,106, 68, 0,192, 96, 48, -220, 51, 87, 70, 35, 12,134,123,159, 50,153, 12,148, 82, 89,195,134, 13,117, 37,209,180,217,108,168, 92,185, 50,162,163,163, 97, - 48, 24,144,147,147, 3,169, 84,234,151, 38, 33, 32, 4, 52, 66, 33,151,149, 83,200,101,229, 8,104, 4, 0,248,178,140, 16,144, -127,186, 44, 21,184, 56,134,113, 28,247, 83,245,234,213,207,113, 28,183,152, 16, 82,190, 52,154,132,144, 38,132,144,105, 42,149, -106,219, 19, 79, 60,113, 75,173, 86,239, 32,132, 76, 39,132,180, 40,137, 38, 33, 68,166, 82,169,118, 76,155, 54,109,229,137, 19, - 39, 6,109,223,190,189,202,169, 83,167,250,207,152, 49, 99,153, 70,163,217, 67, 8, 81,150,116,223, 1,160, 74,149, 42, 63, 30, - 57,114,164, 73,203,150, 45,127, 32,164,192,201, 95, 66, 77, 66,136,136, 16,210,136,184, 95,118, 88, 6,154,101,121,220,117, 58, - 93,245, 39,159,124,178, 28,199,113,104,211,166, 13, 0,180, 41,165,102, 75, 0, 41,148,210,221,148,210,116, 74, 41,239,154, 50, - 40,165,123, 1,220, 44,108, 27,133,105,138,164,234,101,111,190, 53,190,219,219, 99, 70,106, 19,110,240, 88,248, 87, 50, 86,236, - 79, 71,146, 65,142,206,125,135, 5,182,239, 49,180,139, 76,169, 93,230,175,230,196,137,147,186,141, 28, 54, 84,123, 90,207, 97, -229,254, 59,216,119,222, 0, 51, 9, 70,187, 62,175, 4,215,105,218,189,167, 76,169, 93,244, 40, 28,163,199, 93,243, 63, 17,193, - 26, 29, 71, 51,231, 77, 36,159,127,191,108,193, 7,132, 16,170, 14,169,191,205, 41,170,124, 70, 16, 4, 49,199,113, 65,161,161, -161, 14,215, 69, 40,107,227,198,141,206, 99,199,142,133,214,168, 81, 35,212,159,232,205,201, 19,199,205,145, 21,106,164, 68, 69, - 69,149,137,102,231,150, 29,100,102,171, 25, 39, 47,156,110,191,126, 97,219,182,193,225,117, 78,132,213, 28,249, 23,104, 11,147, -205,238,200, 44,137,102,167, 22,237, 69,102,171, 25,167, 46,158,193,161,195, 27, 80,175,110, 75, 84,174,252, 36, 18, 19, 79,224, -204,217, 3,168, 86,185, 26,250,116,234, 5,165, 92,201, 45,184,117,141, 62,140, 3, 40, 18,137,204, 43, 87,174,156,183,117,235, - 86,221, 71, 31,127,218,237,211, 31,247, 69, 4,214, 27, 28,108, 23, 2,181, 59,190, 62,105,184,115,242,215,204,236,139,155, 83, - 99, 27,213,223, 90,191,126,125,253,204,153, 51,223,246, 33,114,165, 0, 80,187,103,207,158, 19, 94,124,241, 69, 36, 38, 38, 98, -252,248,241,230,227,199,143,223,105,220,184,113,232,204,153, 51,149,163, 70,141,194,193,131, 7,167,232,116,186, 63, 0,220, 40, -234,253,124, 78,167, 83,174, 80, 40, 96,118,197, 20,236, 78, 10,224, 94,119, 43, 99,174, 17,132,102, 65, 34,145,128,227,184, 90, -177,177,177, 87,227,227,227,139,205, 75,167,211,169, 80, 40, 20,200,205,205,133,209,104,196,237, 52, 3,110,164,230,194,104,178, -194,108,114,194,108,230, 33, 86,134, 66,108, 79,174, 27, 27, 27,155,236,143, 38,207,243, 48,155,205,200,205,205,133,217,108,134, -217,108,134, 32, 8,200,201,201,129, 68, 34,161, 18,137,164, 14, 0,125,177, 23, 84,192, 73, 69,162,105,243, 22,175,155, 2, 0, - 84, 36,154, 6, 10,193,151,101, 4,112, 62,172, 74,129, 16, 34, 15, 11, 11,219,185,114,229,202, 39,106,212,168,129,235,215,175, -215, 25, 48, 96, 64, 51, 66, 72, 35, 74,169,201, 79, 45, 21,199,113,159, 15, 27, 54,236,127, 67,134, 12, 33, 53,107,214,132, 88, - 44,134,211,233,172,112,229,202,149, 14, 43, 86,172,120, 79, 44, 22, 47,228,121,254,109, 95, 71,142, 39,132,112, 50,153,108,249, -247,223,127,223,182, 89,179,102, 88,188,120, 49, 14, 31, 62, 44, 52,109,218,148,123,225,133, 23, 16, 29, 29,221,252,197, 23, 95, - 92, 77, 8,233,229,122,209,178,191,251, 31, 61,116,232,208,138, 34,145, 8, 45, 91,182,148, 30, 56,112, 32, 6,192,129, 82,230, -169, 38, 42, 42,106,119,135, 14, 29, 26,109,219,182, 45,129, 16,210,222,159,145,242,117, 58, 93,159,240,240,240, 25, 1, 1, 1, -193,190,254,199,104, 52,154, 82, 82, 82,222,209,235,245,171,124,252, 75,203, 6, 13, 26,128,231,121, 4, 6, 6,162,124,249,242, -173,117, 58,221,219, 65, 65, 65,125,179,178,178,222,210,235,245, 71,252,216,223, 40, 0, 28,165,244,178,107,190, 50,128,218,174, -159, 47, 2,184, 78, 41,189, 70, 8,209, 17, 66, 42,250,210, 92, 24, 82,179, 99,239, 54, 29,186,181,110,211,172, 1, 23,183, 42, - 17,188, 32, 64, 12, 30, 98,145,128, 12, 94, 2,142, 16, 84,172,213, 88, 28,113,250, 72,243,114,181, 58,246,206,240,161,185, 48, -164,102,199,222, 61,122,245,105, 83,167, 86, 77,110,214, 31, 55,145,153,116,154, 79,189,176, 35,131, 35, 28,170, 62,217,169, 92, -116,237, 88, 81,141, 70, 79, 73, 82, 19,207,116, 8,169,209,190,211,221,203,187,182, 49,219,192,240,219, 96, 17, 66, 40,165,148, -120,152,172,143, 26, 60, 81,190,238,242,165, 63, 39, 25,108, 65, 39, 83, 82, 82,202,165,164,164, 32, 40, 40, 40,139, 82,234,152, - 53,107,150,228,226,197,139, 65, 10,133, 2,114,185, 28, 54,155,205, 47,131,193, 11, 60, 41,107, 77,141, 74,131,214,177, 45, 37, - 77,234,199,226,236,229,179,141,143,239,121,179,193,145, 83,198,161, 23, 46, 94, 46,149,102,171,152, 22,104, 92, 47, 6,231,174, -156,195,239,107,191, 68, 76,221, 39, 49,164,247, 32,200,164,178,123,251,194, 63,252, 14,238,157, 59,119,214, 87,143,233,178,238, -187,157,252,164, 47, 95,111,172,166,188,147,130, 19,107,198,124, 35,144,150,245, 43,126, 31, 44,201,206,228,184,226, 71,229,136, -142,142,254,172, 99,199,142,227, 37, 18,137,100,228,200,145, 0,128,177, 99,199,230,196,199,199,215,212,235,245,105, 58,157, 78, -247,246,219,111, 95, 90,181,106,149,106,248,240,225, 98,179,217,124, 94, 42,149, 82,157, 78, 55, 85,175,215, 79,241,166, 41,147, -201, 78,158, 59,119,174,109,128,174, 62,194, 2, 68,232,246, 97,194,189,188,149, 1,153,233,169,184,118,251, 36,162,163,163,149, - 0,214,164,167,167,211,230,205,155, 79,115, 56, 28, 83,227,227,227, 11,205, 88,165, 82,121,250,196,137, 19, 77,159,120,226,137, -123, 6, 43,195,132,159, 15, 18,152,237, 74, 80,170,132,136,106,161, 14,169, 32,151,194,252,135,201,100,226, 90,180,104,241,137, -221,110,255,188, 56,205,179,103,207, 54,173, 95,191, 62, 28, 14, 7,226,227,227, 97, 50,153, 96,179,217,144,149,149,133,107,215, -174,161, 90,181,106, 10, 65, 16, 54,247,232,209,131,191,123,247,238,251, 78,167,115, 86, 97,230,141, 88, 69,246,136, 74, 79,204, -205,205,210,175, 0,128,255,179,119,222,113, 81, 28,255, 27,127,102,175, 23,138,128,180, 3,197,130,138, 34, 54, 4,236, 37,246, -110, 76,108,209, 68, 99, 18,123, 98, 52,177, 39,106, 98,239, 37,213,216,107, 44,177,247,222, 43,118, 20, 21, 41, 2, 71,239, 92, -191,219,157,223, 31,128, 95, 98, 84, 14, 52,229,151,204,155,215,189,184,219,219,125,110,118,103,118,230,217,207,204,206,122, 86, -172,149,201,153,140,102,123,150, 17,147,200,242, 55, 22,167,193,147, 39, 79,174,229,234,234,138, 97,195,134, 97,198,140, 25,152, - 54,109, 90,181, 97,195,134,125, 2, 96, 73, 41, 26, 89,165,151,151,215,181,101,203,150,213,108,218,180, 41, 14, 30, 60,136, 45, - 91,182, 32, 58, 58,218, 86,185,114,101,113, 88, 88, 24,166, 77,155,134, 14, 29, 58,124, 60,122,244,232,150,132,144, 6,118,154, -142, 15,167, 77,155,214,163, 89,179,102, 24, 52,104,144,233,244,233,211,125, 0, 28, 61,126,252,248, 91,103,206,156,217,177,105, -211, 38,229,172, 89,179, 58,142, 29, 59,118, 56,128,239,202,176,255, 61, 91,180, 40, 8, 72, 55,107,214, 12,243,231,207,239,240, - 58, 6,139, 16, 34,115,115,115, 59,176, 97,195,134,250, 53,106,212,192,192,129, 3, 27,244,233,211,231, 0, 33,164, 29,165,212, -108,143,134,167,167,231,188, 95,126,249,197, 95,169, 84,218,253,187,102,179,217,117,232,208,161,115, 1,216,109,176,130,130,130, -112,234,212, 41,180,109,219, 22,181,107,215,246, 31, 58,116,232,194,142, 29, 59, 98,204,152, 49,231, 53, 26,141, 70,171,213,166, -219,169,229, 7, 32,178,112,255, 43, 2,168, 6,224, 66,225,119, 97,133,255, 99, 10,205, 86, 0,128, 18, 13,150, 72,166, 26,220, -173, 91, 55,199,223, 46,166,130, 23, 4,212,244, 81,160, 86, 69, 39,196,166, 26, 17,155,152, 1, 49, 44,112, 82,202, 81,167, 73, - 87,151,204,148,184,193, 0, 74, 52, 88, 34,169,114,112,207,238, 93, 29,118, 94, 74, 69,142,246, 30,141,187,182,253,164,205,172, -255, 24, 0, 34,206,110,254,201,211, 69,217,174,122,189, 96,145,190,121,119,151,211,123,146, 6, 3, 96, 6,235,207,187,176,251, -157, 7,249,215, 70,176,138,200,202, 19, 27,157, 61,234,228,230,197,255,175,236,103,103,103,151,139,138,138, 74,185,115,231, 78, - 57,153, 76, 6, 65, 16,138, 76,134, 80,214, 68,188,105, 77,153, 84,134,186, 1,117, 69,215,239,134, 75,239,220,185,235, 34,149, -201,133, 55,161, 89,167, 70, 29, 92,187,115, 29,117,106,212,129, 72, 36,250,199,101,230,253, 36, 84,180, 10,156,131, 66, 42,126, -150,181,148, 72, 29,178,137,119, 69, 23,228,100,217,113,149, 44,105,223,190,253,151,171, 87,175,150, 36, 37, 37,161, 92,185,114, - 69, 70, 35, 65,171,213,166, 2,128, 86,171,213,250,250,250,106,121,158,175, 86,179,102, 77, 12, 29, 58, 20, 1, 1, 1,100,220, -184,113, 19, 10, 77,214, 31,142,111, 94, 94,222,210, 69,139, 22, 5,207,152,189, 88, 53, 32, 12,200,207, 55, 67,167,211, 33, 49, -238, 17, 20,130,128,113,179,102, 65, 81, 48,196, 77,148,145,153,129,249,243,230, 77,189,121,243,102,251, 98, 21,241, 31,200,201, -201, 89,178,116,233,210,213,243,231,207, 87, 25, 12, 6,232,245, 6,228, 25,229,184,178, 56,180,160, 6, 31,123, 21,115,231,205, - 67,144,159, 90,153,152,152,136,105,211,166, 77,138,142,142,110, 10,160,211,171, 52, 23, 46, 92,184,122,241,226,197, 42, 7, 7, - 7, 8,130, 0, 65, 16,240,244,233, 83, 0,192,183, 51,103, 66,169, 80, 2,128, 40, 41, 57, 73, 52,123,214,172,121,247,239,223, -111, 11,160,253,139,244,142, 46, 8,162, 0, 76, 29,102,200,146, 34, 86,117,244,151,203, 36,211,141, 70,227,121,173, 86,187,161, -195, 12, 89, 18, 0, 28,153, 86,147,106, 52,154, 1, 50,153,172,153,197,202, 47, 13,252,232,240,195, 35,211,106,210,191,179, 28, -185,187,187,143,238,209,163, 7,230,206,157,139,125,251,246,141,117,117,117, 93, 60, 99,198, 12,104, 52,154, 81,132,144,165,165, -184,139,114,193,146, 37, 75,106,214,172, 89, 19, 31,124,240,129,249,248,241,227,147, 1,236, 6, 16,119,238,220,185,138,235,214, -173,235,246,235,175,191,206, 93,182,108,153, 98,197,138, 21,254,189,122,245, 90, 10, 96,136, 29,102,227,243,254,253,251, 99,225, -194,133, 56,125,250,244, 59,148,210,131,133, 95, 29, 34,132,116,155, 61,123,246,137,169, 83,167, 98,201,146, 37, 99, 74,107,176, - 8, 33, 14,181,106,213,250,170, 99,199,142, 56,119,238, 28,154, 55,111,142,198,141, 27,143, 37,132, 44,167,148,166,151,161,209, -224, 28, 28, 28,126, 93,187,118,109,243, 74,149, 42, 97,230,204,153,248,242,203, 47,177,122,245,234,230, 3, 7, 14,252,149, 16, -210,203,158,187,103,157,156,156, 28,148, 74, 37,230,206,157, 75,159, 62,125,106,207,185,236, 50,117,234, 84,226,236,236,236,108, -199,186, 34, 0,206, 94, 94, 94, 45,188,188,188,176,108,217, 50,120,120,120,224,243,207, 63, 71,249,242,229,161,211,233,208,171, - 87, 47,201,229,203,151,251, 1, 88,110,231,174,187, 1, 40,138,120,213, 66,193, 88,171,188,194, 99,114, 25, 64,179, 66,131,149, - 9,192,213, 46, 69, 74,131, 92,202, 57, 65,123, 39, 5, 98,216, 80,179,162, 35,174, 71,233, 96,225, 41, 84,106, 7,232,242,179, - 81,175,154, 59,242,244,190,160,148,218, 53,251,184, 68,204, 5,203,228, 74,164,229,230, 32,233,254,241, 12,155, 89, 63, 52, 43, -234,108, 60, 0,184,248,183, 24,122,247,242,225,235,189, 58, 53,247, 72,203,170, 8, 80, 26,202,108, 16,163, 52,148,106,162, 81, -158,231, 73, 86, 86,150, 88,175,215,139,120,158,231,138,187, 77,171,213, 90, 38,227,242,103,104, 62,175,255,166, 53,255,169, 84, -117,135, 86,204,225,119, 93,117, 4,130,209,145,166,105,237,217, 94,171,213, 90,207,156, 57,179,126,210,164, 73, 88,178,100, 9, -158, 60,121, 2,137, 68,130,154, 53,107,122,107, 52, 26,135,194,202,216,185, 78,157, 58, 30, 34,145, 8, 81, 81, 81,216,188,121, - 51,166, 77,155, 70,175, 95,191,190,250, 69,230, 10, 0,194,195,195,247,152, 76,166,189,243,103,125,165, 55,166, 61,132, 74, 72, - 3,205,139,129,146,232, 48,232,227,209,120,146,202,227,102, 76, 62,110,198,228, 35, 41, 79,134, 17,159, 79,225,170, 84,169,210, - 48, 36, 36,100,232,203,210,122,227,198,141,109,122,189,254,232, 55,223,124,163,143,142,142,134,209, 80,176,219, 22,155, 0,139, -237,247,201,240,241,241,193,220,185,115,213, 14, 14, 14,205, 27, 54,108,248,254,171, 52,117, 58,221,209,175,190,250, 74, 31, 21, - 21,133,220,220, 92,164,164,164,128, 16,130, 33,195,199, 33,186, 88, 58, 51,204, 14,248,108,252, 52,174, 98,197,138,111,133,132, -132,244,126,213,113,189,183,178,173,127,173,154, 53,182, 95,185,114,101, 80,181,106,213, 70, 20, 25,171, 34, 35, 85,169, 82,165, - 97,215,175, 95,255,176,110,157,218,219,239,173,108, 27,240, 55, 95, 69,182,238,211,167, 79,128, 32, 8,216,177, 99,199, 29, 74, -233,146, 93,187,118, 93, 51,153, 76,232,215,175, 95,101, 0, 29,237,212, 9,121,239,189,247, 70, 52,111,222, 28, 99,198,140,177, - 28, 63,126, 60,152, 82,186,152, 82, 26, 75, 11,136,163,148, 46, 63,115,230, 76,189, 81,163, 70,153, 66, 67, 67, 49,120,240,224, - 15, 9, 33,205, 75,208,109,210,191,127,255,154,130, 32, 96,235,214,173,183,139,153,171,194, 54,152,158,220,190,125,251,101,179, -217,140, 1, 3, 6, 84, 33,132,188, 85,138,125,151, 42, 20,138,237,223,126,251,109,185,196,196, 68,124,240,193, 7,166,200,200, - 72, 76,159, 62, 93,233,236,236,124,144, 16,226, 80,234, 11, 51,153,108,229,143, 63,254,216,163, 78,157, 58, 24, 62,124,184,249, -135, 31,126,248,116,196,136, 17,230,224,224, 96,124,255,253,247, 61,164, 82,105,169,102,170, 78, 73, 73,201, 62,125,250,180, 91, - 73,175,164,164, 36,187,166,102,209,104, 52,229, 92, 93, 93,239,132,133,133,165,215,173, 91,183, 42, 0,220,187,119, 47,109,251, -246,237,180,124,249,242, 56,124,248, 48, 86,174, 92,137, 38, 77,154,192,193,193,161, 95, 41,146, 74,241,191,161, 24,244, 37,223, - 63,191, 94,137, 17,142, 28,189, 13, 98,142,131, 68, 68, 17,151, 98,132,133,167,144, 74, 56, 72, 68,128,152,163,112,115,148, 64, - 34, 17,129, 16, 59, 53, 65,144,173,179, 66, 34, 34,144, 72,100, 4, 64,241, 16,161, 82,161, 80, 16, 15,103, 41,164, 98, 2, 6, -227,141, 70,176,138, 60, 74, 70, 70,134, 36, 46, 46, 78, 97, 50,153, 56, 63, 63, 63, 35, 33,132,218,108, 54, 46, 35, 35, 67, 42, -147,201, 80,190,124,121, 11,207,243,165,186,234,206,202,202,150,196, 39, 62,121,163,154, 47,194,198,219,184,140,140, 12,217,155, -212,252, 39, 18, 25, 25,233,248, 40, 70,235,224, 46,174,117,245,211,239,194,155, 8, 20, 18, 2,106,149,235, 31, 95,200,200,184, - 37,225,202, 41, 85,222,222,222, 37,142,159,137,137,137,249, 88,163,209,204, 4, 16,200,243,252,254, 37, 75,150,144,229,203,151, -187,140, 24, 49, 34, 74,163,209, 36, 6, 4, 4,248, 45, 94,188,216, 9, 0, 54,110,220, 40, 28, 61,122,180, 61,128,251, 90,173, - 54,249, 85,186,103,206,156,121, 47, 52, 52,116,232,143, 63,254, 56,199,102,179, 41, 60, 60, 60,100,235,215,175, 39,137, 57, 22, -124,181, 49, 10, 89,249, 5, 3,180,148, 50, 17,198,116,112, 64,171, 86,173,184,184,184,184, 73, 0,126,126,153,230,217,179,103, -223, 9, 11, 11, 27,245,253,247,223,127, 11, 7, 63,133, 60,224, 67,233, 91,147, 10,186, 31,189, 93,228,224,200,179,200, 20,178, -179,179,209,179,103, 79,213,166, 77,155, 70, 3,216, 80,146,230,138, 21, 43,190,229,121, 94,230,238,238, 46,223,188,121, 51, 98, - 51,204,152,184, 46, 10,249,198,130,161, 81,106,185, 8,163,219, 42,209,186,117,107, 81, 98, 98,226, 84, 0,219, 95,210,128, 85, - 11, 12, 12,220,190,121,243,230, 90, 75,151, 46,205,124,252,248,177, 78,163,209,204,120,110, 53,211,220,185,115, 51,214,175, 95, - 95,227,131, 15, 62,216,174,209,104,250,104,181,218,251,127, 71, 57,114,114,114,154, 59,116,232, 80,252,250,235,175,200,204,204, - 92, 10, 0,185,185,185, 75, 54,111,222,188,245,227,143, 63,198,134, 13, 27,230, 18, 66, 14,219, 17,197,234,212,175, 95, 63, 28, - 58,116, 8, 39, 78,156,248,138, 82, 26,241,226,160, 4,125, 68, 8,153,176,103,207,158,101,253,251,247,199,154, 53,107, 58, 2, - 56,247, 10,221,118, 29, 58,116,192,193,131, 7,145,145,145,241,253, 75, 34,145, 63,236,221,187,183, 81,135, 14, 29, 48,103,206, -156,118, 0, 78,218,209,120,215,116,118,118, 94,187,108,217,178,144, 58,117,234,224,189,247,222, 51,154,205,230,142, 95,126,249, -229,190, 45, 91,182, 56,174, 95,191,190,225, 39,159,124,114,133, 16,242, 17,165,244,178, 61,199, 82, 36, 18,205, 94,177, 98,197, -144, 86,173, 90, 97,236,216,177,182, 35, 71,142,116,167,148, 30, 37,132, 68,141, 31, 63,254,192,162, 69,139, 68,139, 22, 45, 26, - 34, 18,137,210,120,158,159,252,183, 52, 0, 98,241,194, 69,139, 22,213, 10, 12, 12,132,209,104, 68, 84, 84, 20, 82, 83, 83, 55, - 31, 57,114,228,232,221,187,119,231, 39, 37, 37,237,244,244,244,252,120,236,216,177,190,161,161,161, 33, 26,141,198, 69,171,213, -102,217, 33, 93, 20,153, 74, 5,112, 31, 64,163,194,200, 21, 10, 35,211, 15, 11,223,187, 0,176, 71, 15,132,144, 59,143, 98, 18, -171,184,168,157,144, 37,200, 16,147,152, 14,165, 90, 13,142,114,176, 25,178, 80,205,207, 3, 2, 5,114,211, 19, 65, 8,177,107, - 26, 25,155, 32,132,199,196,167,248,148, 83, 43, 80,173, 97,103,183,219, 39,215,108,116,241,111,241, 9, 0,145, 92,161,254,185, -255,123,239,151,183,242, 20,249, 89, 73,224, 56,238, 42, 24,140, 55,101,176,120,158,231,214,173, 91,231,156,150,150,198, 5, 4, - 4,100, 4, 5, 5,233,164, 82,169, 96, 52, 26, 5,153, 76,102, 83,169, 84,130,193, 96,144,197,198,198,186, 38, 37, 37,137,120, -158,183,215,230,147, 51,103,206,121, 87, 15,168,155,242, 6, 53, 95,124, 5, 41,149,241, 74,165,154,127,147,154,255, 36, 4, 65, -144,205,158, 61,187, 73,185,114,229,116, 97, 97, 97, 9,205,253,221,119, 39,228, 10,103, 23,174, 88,253, 97,253, 0,191, 53,106, - 81, 70,150, 94, 74,165,177,177,177,222,145,145,145,106, 74,169,212,142, 72,214, 83, 0, 79, 53, 26,205, 15,173, 91,183, 30,217, -181,107, 87,156, 62,125,218, 67,167,211,121,168,213,106, 0,192,206,157, 59,177,103,207,158, 69, 90,173,246,132,189,105,189,122, -245,234,207, 0,126,110,208,160, 65,136,179,179,243,101, 39, 39, 39, 18,159,163, 67, 86,158, 21, 39,231, 4, 67, 42,230,208,236, -203,107,200,200,204,130,152, 16, 40, 20, 10,223,224,224, 96, 46, 60, 60, 92,120, 73,227, 76, 81, 48,101,194,138, 70,157, 62,122, - 71,249,244,215,141, 11, 23, 45,146, 3,128,136, 16,120, 56, 75,145,157,157,141,244,244,116,164,165,165, 65, 44, 22,195,104, 52, - 6,190,242,178,187,152,102,131, 6, 13,218,186,185,185, 29, 86,169, 84, 34, 33, 93,135,172,124,235,239,186, 32,179,178,179, 33, -149, 74,161, 82,169,170,191,196, 92, 57, 2, 88,183,122,245,234,154,142,142,142,162, 79, 62,249,164,220, 39,159,124,210, 12, 5, -221, 35,127, 64,173, 86,139, 86,175, 94, 93,189,126,253,250,107, 53, 26, 77, 59,173, 86,155,243, 23, 70,174, 68, 0,134,125,241, -197, 23, 13, 21, 10, 5, 86,172, 88, 17, 13, 96, 83,225,215,219,127,252,241,199,175,251,247,239, 31,240,233,167,159,214,158, 58, -117,234,216,194,174,194,151,142,103,147, 72, 36,193,181,106,213,194,174, 93,187, 0, 96, 87, 9, 63,191,227,226,197,139,203,186, -118,237, 10,165, 82, 25, 82,194,186,149, 43, 84,168,128, 61,123,246, 0,192,205,151,172,115, 51, 50, 50, 18,189,122,245, 2, 33, -164,178, 29,251,222,163, 67,135, 14, 59,102,207,158, 45,118,116,116,196,144, 33, 67,204, 87,174, 92,233, 76, 41, 61, 75, 8,105, - 61, 96,192,128, 51,155, 54,109, 82,159, 57,115,166,230,172, 89,179, 46,138, 68,162,217, 60,207, 79, 45, 65,243,195,153, 51,103, - 78,234,217,179, 39,102,204,152, 65,183,109,219,246, 30,165,244,104, 97, 25, 59, 66, 8,121,223,213,213,117,211,228,201,147, 73, - 78, 78,206, 36, 66, 72, 2,165,244,199,151,233,233,245,250, 28, 65, 16,188, 12, 6,131, 93, 99,182,236, 93,223,223,223,191, 83, - 96, 96, 32,246,236,217,131,110,221,186,225,248,241,227, 0,112, 64,171,213,158, 2,112,180, 40,106,253,248,241,227,177,205,155, - 55,231, 78,156, 56,209, 11,192, 47,118, 36, 33, 6, 64, 29, 0,199, 40,165,241,133, 55, 78, 54, 65,193,148, 13,247, 41,165, 79, - 11,215, 11, 2, 16,101,151, 25, 50,235,214,159, 60,184,163,117,219,119, 70, 56,139,196, 28,196, 84, 10, 67,126, 46,192, 11,168, -230,231,137,208, 90,158,184, 29,107,192,165,227, 59,178, 13,250,252,245,246,105,234,215,158, 56,188,167,101, 72,251, 15,156,101, -254,129,168,224, 53,166,126,196,149,163,199, 20,114, 25,121,187,215,187,229, 90,135, 86,195,137, 59,185,184,124,114, 87,150, 94, -151,187,150, 89, 6, 70,153, 12,214,139, 6,151, 81, 74,211, 78,156, 56,161,154, 58,117,106,158,183,183,183, 88,167,211,113, 54, -219,255,250, 95, 20, 10, 5,188,189,189,109,217,217,217,230, 19, 39, 78, 84,165,148,102,188,234,199, 56,145, 44,233,167,205, 43, - 42, 8, 68,101,238,220,165,187,160,241,241,123,109, 77, 0,208,155,164,105,219, 15,239,118,105, 21,218, 84,226, 89,222,243, 15, -223,255, 25,154,207, 66,246,233, 41, 56,125,245,130, 85,111,146,102, 65,254,215,103, 32,165, 84,251,248,241, 99,247, 89,179,102, -221,212,104, 52, 70, 0,112, 81,211,164,236,136, 93,153,170,202,221,146,164, 50, 25, 84,238,238, 38, 71, 71, 71,235,129, 3, 7, -218, 83, 74,181,165,144, 31, 59,108,216, 48,238,220,185,115,195, 6, 14, 28, 72, 42, 85,170,132,155, 55,111, 98,227,198,141,116, -251,246,237,203,240,146,105, 26,236,104,208,162, 77,166,223,207, 95, 88,116,103, 33, 45,136,110,130,228,167,131,231,121,235,203, -204,213,243, 88,211,110, 95, 50, 42,149,168, 93, 81, 93, 44, 74,154,133,180, 66,115,149,158,158,142,212,212, 84,136, 68, 34, 67, - 41,210, 25, 99,177, 88,158, 75,231,255,146,147,157,157, 13, 33, 39, 13, 60,207, 91, 94, 98, 84,243, 52, 26,205,138,229,203,151, - 47,250,230,155,111, 60, 22, 47, 94,156,249,224,193,131, 92, 66,136,241,185, 60, 84,248,251,251, 59, 46, 92,184,208,115,197,138, - 21,153, 0, 86,252,197,230,170,103,157, 58,117,214,117,234,212,201,113,196,136, 17, 88,190,124, 57,146,147,147, 39, 82, 74,109, -133,233, 19, 8, 33,227,191,255,254,251,253, 19, 38, 76,128,197, 98, 89,120,240,224,193, 25,132,144, 97,148,210, 77, 47,210,244, -240,240,240, 21,139,197,184,113,227, 70, 46,165,244, 73, 9,101, 56,185, 70,141, 26, 41,132, 16, 79, 47, 47,175,170,175, 90,215, -205,205,205,223,209,209, 17,137,137,137, 69,141,248,139,136,213,106,181, 84, 38,147, 17,141, 70, 83,173,164,253,119,117,117, 29, -255,203, 47,191,136, 79,157, 58,133,105,211,166, 37,196,197,197, 13, 40,156, 70, 0,148,210, 27,132,144,230,173, 91,183,222, 50, - 97,194,132, 26,243,230,205, 35, 15, 30, 60, 24, 14,224,149, 6,203,207,207,111,216,135, 31,126,136, 21, 43, 86,224,231,159,127, - 30, 78, 41,221,254,220, 62,111, 33,132,184,184,186,186,174, 24, 58,116, 40,214,174, 93, 59, 0,192, 75, 13, 86, 98, 98,226,132, -190,125,251,126,157,153,153, 57,219,158, 60,181,103,125,141, 70,211,125,224,192,129,158,148, 82, 44, 95,190, 60,121,249,242,229, -250,188,188,188, 77,133,230,170, 56, 59,143, 28, 57, 50,118,196,136, 17, 56,125,250,244,119, 26,141,134,106,181,218, 85, 37,228, -105, 18, 33,164, 42, 33,164, 22,165,244,126,225, 93,130,241,207,149,187, 26,133,235, 38,216,179, 79, 25, 15, 79,238,243, 12,234, -124,225,214,213, 51,237,171,212,110, 38,241,112,117,132,111,141,242,112, 81, 75, 65, 1,220,141, 51,224,242,185,163,214,212,164, -184,139,233,145, 39,246,217,171,233, 21,212,229,162,186,124,165,246,149, 3,155,138, 43,251, 87, 71,187, 38,117, 93,220, 28, 37, - 48,219, 40,142,221,202,193,165, 51,135,172,105,201,241,167, 50, 31,177, 59, 8,255,228,182,236, 95,215, 15,251,202, 8, 86, 74, - 74,202, 24,145, 72,212,122,240,224,193, 3, 90,180,104,225, 52,116,232,208, 20, 7, 7,135,124,169, 84, 42,114,119,119,151,241, - 60, 47, 59,113,226,132,175, 86,171,117,161,148,110, 74, 77, 77, 61,245,220, 9,244,187,167,109,127,242,173,190, 34, 33,132,104, - 52,206,173,197, 91,134, 14,104,209,162,133,195,235,106, 2,160, 89, 73, 54,159,132, 52,221,140,172,156,131, 99,125,189,188, 68, -205, 27, 54,150, 56,168, 10,134, 75,184,187,151,151,218,120, 42,125,147,154, 0,144,147,151,131,115,215, 47, 89, 19,146,147,249, -199, 9,162,197, 42,155,109, 26,156,165,244, 21,154,111,162, 33,252,131,166,197, 98,105,250,248,241,227,247,222,123,239,189, 9, - 13, 27, 54,188, 55,117,234,212,139, 78, 78, 78,214,162,194,106, 50,153, 36, 71,143, 30,109, 18, 31, 31, 95,219,102,179,205, 3, -176,185, 36,205, 98, 6,193, 2, 96,132, 70,163,217,155,154,154,122,164, 95,191,126, 88,187,118, 45, 46, 94,188,216, 92,171,213, - 94, 40, 77, 58,139, 19, 30, 30,158,217,169, 83, 39,125,100,100,164,131, 72, 93, 1, 94, 46, 50,116,252,234, 6, 40, 0, 7, 25, -133, 46, 63, 7,182,172, 44,232,245,250,136, 82,104, 38, 53,107,214,204, 16, 29, 29, 45,175, 82,165, 74,129,185, 42, 52, 86,105, -105,105,200,204,204, 68, 94, 94, 30,149, 72, 36,215, 74,161, 25,221,177, 99, 71, 62, 38, 38, 70, 36, 18,123,192,195, 89,130,214, -147,194, 11,250, 53, 84, 64,126, 94, 46, 12,233,233,208,233,116, 87, 95,166,169,213,106,183,106, 52, 26, 0, 88,244,213, 87, 95, -149,239,220,185,243,227, 43, 87,174,180, 44,254, 59,193,193,193,187,103,204,152,209,101,214,172, 89,233,107,215,174,157,160,213, -106, 55,150,230,120,190,110, 89,114,115,115, 27,119,224,192, 1, 71,139,197,130,229,203,151, 99,241,226,197,171, 41,165, 59,159, -171,252, 14,136, 68,162,239, 57,142, 27, 57,106,212, 40, 12, 29, 58, 84,213,176, 97,195,177,197,162, 92,191,211, 76, 76, 76,156, - 26, 28, 28,252,117,106,106,170, 93,134,224,209,163, 71,159, 4, 7, 7, 79, 77, 77, 77,157,255,170,125, 87,171,213,106,158,231, - 17, 27, 27,155, 69, 41,205,121, 73, 69,109,172, 81,163, 70, 34,207,243,190, 42,149,202,181,164,242,153,153,153, 57,187, 97,195, -134,211, 83, 82, 82,142, 2,152, 73, 41,125,222, 0,223, 34,132,212,254,236,179,207, 70,207,157, 59,183, 87,114,114,242,214,146, - 52,227,226,226,102,183,110,221,250,171,135, 15, 31,174,163,148,254,252,146,116,126, 71, 8,177,108,220,184,113,120, 76, 76,204, -156, 87,105,106,181,218,253, 0,246,219,155,191, 47, 91,191,184,166,171,171,235,132,209,163, 71,227,240,225,195,200,203,203, 91, -166,213,106,231,189, 68,235,114,165, 74,149,246, 54,110,220,184,251,130, 5, 11,164, 93,186,116, 25, 14, 96,149, 29,229,243, 18, -128,166,133,227,224, 30, 0, 40,186,176,117, 69,193,157,131, 4,255,187,179,208,174, 58,196, 98,212,245,191,121,118,215,150,248, -168,219,141,131, 91,246,116,201,209,251, 66, 42,230,144,159,149,132, 75, 39,126,203, 74,138,127,114, 73,175,203,235, 95, 26, 77, -179, 49,191,223,173,115,187,183, 38,197, 70, 52,210, 55,237,236,146,157,231, 7,169,132, 32, 59, 45, 1, 87, 78,239,205, 76,138, -127,114, 78,151,159, 59,168, 44,117,221,155,170,231,255, 43,154,255, 54,136, 61, 55, 4,249,251,251, 75,204,102,115, 23,137, 68, -242,118,219,182,109, 83,194,194,194, 34,214,175, 95, 95, 43, 38, 38,198,147,231,249,221, 10,133,226, 64, 84, 84,148,181, 52, 25, -240, 38, 53, 79,207, 80, 1, 0,217,255, 88,162,150, 74,173, 43, 42,122, 89,251, 87,173, 88,153,139,126, 26, 69,182, 95,110,182, - 56, 58, 38,214,227, 13,106,138,170, 84,244,231,159, 60,141, 17,158, 38, 75,182, 88, 44,146,209, 93,171, 89,117, 40,120, 76,206, -223, 86,160, 9, 33, 82,177, 88, 60, 92, 34,145, 12,109,211,166,205,165, 75,151, 46, 53,116,113,113,185, 30, 23, 23,215, 88, 16, -132,159,121,158,255,241, 69, 51, 38,219,147, 78,141, 70, 83,190, 99,199,142,169, 83,166, 76, 33, 51,102,204,192,241,227,199,203, -189, 42,194, 98,143,102,104,104,232,160,218,181,107,175,158, 57,127, 57,247, 40, 46, 29,233, 25, 25,200,204,200, 68, 86,102, 6, - 36, 84,143,203,103,143,240, 79,159, 62,109, 22, 30, 30,126,217, 94,205,176,176,176, 15, 43, 87,174,188,116,225,194,133, 14,121, -121,121,207, 12, 86,102,102, 38, 12, 6, 3,118,236,216, 97, 52,155,205, 97,225,225,225,119, 75,161,249,121,253,250,245, 23,142, - 30, 55,133,139,209,230, 32, 59, 59, 7,217, 57,217,208,229,229, 65, 10, 61,206,157, 56,192,107,181,218,186,225,225,225, 17,175, -210,212,104, 52,125,155, 53,107,246,205,221,187,119, 79, 61,120,240, 96, 88,241,239,170, 85,171,246,125,189,122,245, 58, 95,184, -112,225,107,173, 86,187,225,175,174, 28, 9, 33, 29,125,125,125, 23,167,164,164, 68, 91,173,214,237,148,210, 13,175,216,174,159, - 88, 44,238, 87,190,124,121,207,228,228,228,185,148,210, 93,127,101,153, 39,132,116,245,240,240,152,156,154,154, 58,151, 82,186, -247, 21,219, 21,173, 55,159, 82,186,155, 53, 96,127,212,212,104, 52, 93, 61, 60, 60,190, 41,188,224, 28,175,213,106,249, 87,212, - 1, 10, 0,223,120,122,122, 54, 73, 73, 73, 89,164,213,106,127,179, 55,157,133,143,202,169,132,130,241, 86, 64,193,152,171,184, - 87,205,125, 85,146,102,249, 26,111,117,147, 43, 29, 6, 83, 42,212, 35, 0, 56,145,232,150, 65,159,191,246, 85,145, 43,123, 52, - 21, 42,199, 15,169,192,215, 3,129, 32,226, 68,183, 13,250,252, 95,210, 34, 79, 28, 98,102,232,175, 55, 88,132,144, 79, 40,165, - 43,241,255, 24, 82,154,103,225,186,186,186, 42,213,106,245,187,132,144, 70, 86,171,245,178,201,100,218,145,153,153,105,120,157, - 12,120,147,154, 69,166,104, 71, 4,239, 85,222, 69,180, 70,173, 68,221, 21, 59,157, 39,234, 13,166,237,111, 80,179,173,206,128, -227,233, 89,252,135,239, 6,138,146,159, 55, 86,127,119,129, 38,132,168,165, 82,233, 68, 65, 16, 6, 81, 74,215,241, 60, 63,151, - 82,170,123,221,147,164, 70,141, 26,171, 90,182,108, 57,248,200,145, 35, 63,196,197,197,141,126, 19, 39, 94,243,230,205,183, 84, -172, 88,177,119,203,150, 45, 69, 10,133, 2, 73, 73, 73,200,204,204,196,195,135, 15,109, 25, 25, 25, 51,206,159, 63, 63,179,180, -154, 45, 90,180, 88, 47,149, 74,123,117,235,214, 77, 37,149, 74,145,153,153,137,156,156, 28,122,254,252,121, 51,199,113,227, 46, - 94,188,248, 67,105, 52,131,131,131,137, 74,165,218, 95,161, 66,133, 14, 77,155, 54, 21, 73, 36, 18,100,101,101, 33, 51, 51, 19, -247,239,223,183,101,100,100,124,126,233,210,165,239,236,209,212,104, 52, 50,173, 86,107,126,201,119, 18,173, 86,107,101, 21, 46, -211,100,154, 76,147, 25,172,255,160,193,250,255,146,169, 69,166,168,240, 85,226, 3,152, 75,169, 41, 2,192,191,204, 88,253,155, - 79, 18,141, 70,163,212,106,181,134, 55,169, 25, 28, 28,220, 89,173, 86,207,144,203,229,181, 0, 88, 77, 38,211, 13,157, 78, 55, - 62, 60, 60,252,250,107,104,118,114,114,114,250,194, 98,177, 4,137, 68, 34, 19, 33,228, 90,126,126,254,215, 69, 81,166,178,104, -134,132,132,188,171, 82,169, 38,203,229,242, 0, 65, 16,204, 38,147,233,154, 94,175,255,252,117, 52, 89,133,203, 52,153, 38,211, -100,154,255, 94,131, 37,198,191,144, 66,227, 99,247,252, 42,165,212,180,225, 63,138, 61,230,170,180,132,135,135, 31, 4,112,240, - 13,107, 30, 2,112,232, 77,106, 94,187,118,109, 7,236,159, 17,155,193, 96, 48, 24,255,113, 56,118, 8, 24, 12, 6,131,193, 96, - 48,222, 44, 4, 5,243,144,252,129,210,132,254, 8, 33, 65,165,253, 97, 59,198, 18, 49, 77,166,201, 52,153, 38,211,100,154, 76, -243, 95,166, 89, 76,251,155,151,124,149, 88,168,195,198, 96,189, 42, 99, 88,255, 52,211,100,154, 76,147,105, 50, 77,166,201, 52, -255,107,176, 46, 66, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6, -139,193, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12,198, 63,134, 63,245, 46, 66, 6,131,193, 96, 48, 24,140,255, - 34,191,139, 96, 17, 66,152,219, 98, 48, 24, 12, 6,131,241,151,243,111,243, 32,172,139,144,193, 96, 48, 24, 12, 6,131, 25, 44, - 6,131,193, 96, 48, 24,140,255, 7, 6,139,117, 13, 50, 24, 12, 6,131,193,248, 59,248,183,122,144,162, 8, 86,171,194, 29,108, -197,178,154,193, 96, 48, 24, 12,198, 95,200,191,210,131,176,187, 8, 25, 12, 6,131,193, 96, 48,222, 48,108, 12, 22,131,193, 96, - 48, 24, 12,198,255, 39,131, 69, 8, 9, 98,154, 76,147,105, 50, 77,166,201, 52,153, 38,211,100, 6,139,193, 96, 48, 24, 12, 6, -131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,152,193, - 98, 48, 24, 12, 6,131,193,248,155, 32, 0, 94,120, 39, 0,165,244,174,221, 34,101,184,155,160, 36,125,166,201, 52,153, 38,211, -100,154, 76,147,105,254,251, 52, 75,210, 46,141,255,248, 71, 27,172, 63,115,162, 81, 66, 72,208,155, 62, 80, 76,147,105, 50, 77, -166,201, 52,153, 38,211,252,247,105,254,219, 16,179, 67,192, 96,252, 63,231, 92, 45, 17, 4,190, 50, 64, 52, 16,137,146, 64,233, - 19, 52,191, 47,188,182, 38, 71,253, 32, 80, 79, 64,156, 6, 8,209,175,173,201, 96, 48, 24,204, 96, 49, 24,140,255, 63,103, 49, -173, 1,155,104, 14, 8,245, 6,165, 81,224,185, 57, 0, 94,239,202, 82,160, 53, 0,110, 38,136,224, 11, 42, 60, 4,132,185, 0, - 34,216,193,102, 48, 24, 12,251,248, 91, 6,185,135,132,132,132,135,132,132,124,219,170, 85, 43, 57,203, 2, 6,227, 53, 56, 87, - 75, 5, 27, 58,153,173,188,207,225, 75,217, 30,122,147,173, 6, 56,190, 51,206,213,114,120, 45, 77,142,180, 55, 90,108, 21, 55, - 30,215,123,234, 76,182, 90,160,220,235,105, 22, 18, 20, 20, 84, 46, 52, 52,244,112,253,250,245,203,179,204, 99, 48, 24,204, 96, -189, 97, 4, 65,104,224,225,225, 49,214, 96, 48,196, 53,108,216,176,251,127,233,128,135,132,132, 60, 13, 14, 14,166,193,193,193, - 52, 36, 36, 36,173, 85,171, 86,226, 87, 45,255,183,210,160, 65,131, 6,205,155, 55, 63, 25, 24, 24,168, 6,128,218, 31,239,243, -168, 55,236,184,127,200,200, 99,190,236,180, 44,205, 25, 76, 61, 1,210,250,126,140, 81,149,146,105,243,188, 30,169,119, 4, 33, -173, 32,240,222,175,165, 73,241,214,173, 40,163,250,210, 19,119,207,243,119, 76, 78, 0,105, 13,145,224,245,186,201,149,201,100, -195, 41,165,237, 36, 18,201, 24,150,121,255,109, 8, 33, 65,132,144,238,132,144,144, 55,168, 57,175,102,205,154,137,132,144,207, -216, 17,102,252,191, 49, 88,189,171,144,166,239, 85, 37,103,250, 86, 33,121,253,170,146,252,129, 85,201,249,119,253, 73,203,178, -254,240,206,157, 59,149, 27, 54,108,240, 8, 12, 12,220, 26, 22, 22,118,190, 97,195,134,213,203,104, 88, 14,135,132,132,244,126, -126, 89,195,134, 13,251, 22, 95, 22, 26, 26,122, 47, 52, 52, 52, 39, 36, 36,228,137, 61,186,193,193,193,143,131,131,131,117, 33, - 33, 33,143,139, 47,111,216,176, 97,223,208,208,208,195,207,253, 94,239,231,151,189, 12, 74,169,247,145, 35, 71,112,252,248,113, - 0,112, 65, 97, 55, 45,165,212,251,240,225,195, 56,118,236,216,239,150,151,225,120,124, 28, 18, 18,114,241,185,125,249,232,249, -101,175,162, 97,195,134, 23,131,131,131, 63,122, 78,247, 98, 72, 72,200,199,111,200,100, 54, 84, 40, 20,167, 77, 38, 83, 75,165, - 82,169, 6, 0,177, 72,225, 72, 56,244,179, 16,113,112,237, 49, 39, 61,216,169,105, 7,231,106, 73,193,147, 22, 2, 21,220,239, -197, 24,220, 59,117,125, 71,124,251,177,193,221,202, 11,174,224, 68,173,112,174,150,188, 76,154, 2,154, 11, 16, 60, 79,220,146, -186,183,234, 58, 74,116,242,142,196,221, 42,240,110,176,145,150,101,210,252, 95, 57,148,136, 68,162,177, 67,135, 14,229, 8, 33, -163,252,253,253,101,255,165,236, 10,171, 67,124,218, 52, 20, 95, 13, 14, 36, 77,223,148,166,175,175,111,104,149, 42, 85, 34, 52, - 26, 77,253,255,103,230,170, 1, 0, 21,165,116, 47, 0, 79, 66,136,248, 13,104, 46,249,230,155,111,198,223,189,123, 87, 83,165, - 74,149, 25,132, 16, 17,171, 36, 24,255,120,131,213,175, 10,153,238,233,229,115,116,202,146,205, 45, 86,157,141,118,248,126,111, -184,122,236,132, 57, 77,189, 92,220, 15, 14,244, 39,115, 95, 97, 38,238,190,226, 74, 22, 79,158, 60,193,242,229,203, 21,211,166, - 77,107,226,228,228,116, 59, 44, 44,108,105, 81, 68,195, 94, 77, 74,105, 83,137, 68,178, 42, 44, 44,108,109, 81,133, 77, 8,105, - 42,151,203, 87,134,133,133,109, 44,234,134, 12, 14, 14,174,114,245,234, 85, 39, 66,136,167, 61,233, 12, 13, 13,245, 14, 15, 15, - 87, 1,240, 6,128, 86,173, 90,201, 67, 67, 67, 55,248,248,248,252, 12,160, 41, 0,248,251,251,203,194,194,194,214, 86,168, 80, -225, 23, 66,126, 95,105,190,106,223,203,149, 43,135,205,155, 55,255, 97,185,139,139, 11, 54,109,218,132,178, 28,207,192,192, 64, -117, 72, 72,200, 78,111,111,239,165,130, 32, 52, 6,128, 58,117,234,168, 66, 67, 67,119,248,248,248, 44, 43, 90,102,143, 38,165, -180,177, 84, 42, 93, 26, 26, 26,186,163, 78,157, 58, 42, 0, 16, 4,161,177, 88, 44, 94, 18, 18, 18,178,179,180,121,212,178,101, -203, 79, 27, 53,106,100, 10, 9, 9,177, 53,111,222,124,135, 68, 34, 57, 53,107,214, 44,181, 66,161, 48,243,170,234,234,250,163, - 78, 85, 20, 36,212, 70, 9,103, 34,130, 48, 71, 34,192,213,255,211,195, 50,123,247,189,172,252, 11, 52, 61, 64,208, 54, 50,206, -168,240,171, 22,162,246,168,249, 46,220,203, 73,228,151, 34,242, 29, 65,208, 6,128,123,153, 52,193,181,185,247,196,168,116,169, -210, 73, 21,210,168, 5,136, 67, 53,249,233, 91,249, 78, 32, 92, 89, 53,139,120,183,113,227,198,178, 54,109,218, 64,163,209,136, -156,157,157, 7,252, 7,242,232,153,185,114, 84,200,174, 44,250,230,243,134, 26, 55,213, 30,123, 76, 86, 73,154,190,190,190,161, -142,142,142,199,167, 77,155, 86, 75, 46,151,159,180,199,100,253, 19,142,103,161,185,146, 82, 74, 47, 23, 46,138, 0,208,252, 53, - 53,151, 76,159, 62,125,204,164, 73,147,144,151,151,135, 65,131, 6, 57, 1, 88, 84, 22,205,222,189,123,139,122,247,238, 45,250, -143,212, 33,255, 40,205, 18,144, 1,104, 13,160, 11,128, 54, 0, 66, 11,223,135, 20,190,186, 0,104,251,220,255,162,232,104,209, -247, 97, 47,209,232,242,130,237, 66,138, 45, 47,254,249,249,247,175, 54, 88,132, 16, 90,252,127,113,250, 84, 37, 77,220,188,124, -198,207,219,125, 77, 41, 60,188,133,240, 15, 91,227,225,152,183,161,124,124, 19, 19, 71, 79, 84, 58, 58,186,140,238, 93,149,180, - 46,203,209,122,248,240, 33,182,110,221, 10,119,119,119,178,102,205, 26,121,239,222,189,135, 59, 57, 57,197,135,132,132, 12,176, - 87, 67, 36, 18,241,107,215,174,117,232,217,179,103, 63, 87, 87,215,123,193,193,193, 85, 56,142,227,215,175, 95,239,208,183,111, -223,222,102,179,249,126,195,134, 13,171,223,184,113,131,191,118,237, 26, 56,206,190,160, 93,120,120,184,237,208,161, 67, 69, 17, -157,234,148,210,251,115,231,206,237,183,107,215, 46, 71,103,103,103, 33, 56, 56,184, 74,133, 10, 21,238,205,155, 55,111,192,142, - 29, 59, 28,157,156,156,236,190,195,202, 96, 48, 64,161, 80,188,112,185, 92, 94,250, 0, 65,112,112,112,109, 55, 55,183, 7,115, -230,204,233,177,123,247,110,165,163,163, 35, 66, 66, 66,106,149, 43, 87, 46,114,254,252,249, 61,247,236,217,163,116,116,116,180, - 91, 79, 42,149, 98,211,166, 77,170,254,253,251,119,151,203,229, 15, 66, 66, 66,106, 73,165, 82,108,217,178, 69, 53, 96,192,128, -174, 42,149,234,126,112,112,112,109,123,245,120,158,159,186,100,201, 18,217,182,109,219, 68, 21, 43, 86,236, 56,107,214, 44, 85, -112,112, 48,161,148, 66,112,169, 84, 14, 84,232, 39,162,240, 5, 47,236, 38, 64, 50,181, 10, 31, 56,153, 37, 44,138,245,234, 72, -147, 8, 2,109, 0, 66,253,111, 60,212,151,175,223,252, 61, 49, 82,247, 34,180,150, 90,124,250, 70,190, 7,165,212, 15,160,161, - 56, 87, 75, 92, 42, 77,160, 30,136, 80,253,232, 45, 82,190, 73,219, 1,226,184,184, 56, 84,174,217, 74,180,239, 42,231, 73, 33, - 84, 6, 65,195, 82,105, 22, 67, 34,145, 76,235,211,167,143, 58, 46, 46, 14, 77,154, 52, 81,201,100,178,175, 95,251, 56, 60, 8, -148,226, 76,128, 31,206, 4,180,196,197, 26,222, 56,243,207,235, 90, 15,171, 67,124,156, 20,178,203, 91, 54,254,170,169,211,252, - 99,242,243,231,126,174,238,142,146, 61,175, 19,201, 42, 50, 87, 7, 14, 28,112,104,215,174, 29, 70,142, 28,233,172, 80, 40, 78, -253,211, 35, 89,197,205, 21, 33, 68, 89,216, 61,152, 8,192,247, 53, 52,151, 77,159, 62,125,204,228,201,147,113,249,242,101,204, -159, 63, 31,157, 58,117,130,139,139, 75, 35,123, 53, 26, 52,104, 16,214,178,101,203,223, 90,180,104,145, 29, 31, 31,111,141,139, -139,179, 54,107,214, 44,187,101,203,150,191, 53,104,208, 32,236,117,118,185,240,197,120,117, 30,190,212,131, 20,163,238,164, 73, -147, 66, 9, 33,251, 39, 77,154,212, 16, 64,121, 66,200,254,194,139, 62,247,194,247,178,231,254,187, 23,154,166,162,239,221, 94, -164, 81,244,122,110, 59,247, 98,203,139,255,198,243,239, 75,142, 96, 17, 66, 90, 2, 56,251,252, 10, 98,138,111, 62, 25,251,173, - 34,102,237, 34, 36,109, 90, 2, 46, 93, 11, 81,118, 50, 76,103,247,194,122,110, 31,222,111,220, 88,169, 36,100,102, 89, 14,170, -163,163, 35,164, 82, 41, 30, 61,122,132,251,247,239,163,115,231,206,210,229,203,151,151,171, 93,187,246,202,166, 77,155,222, 10, - 9, 9,169,107, 71,198,160, 90,181,106,232,215,175,159,236,179,207, 62,171,170, 80, 40,110, 80, 74, 37,149, 43, 87, 70,223,190, -125,165, 19, 38, 76,168,164, 80, 40,174, 9,130, 32, 85,169, 84, 32,132,216,155,225, 80, 42,149, 0, 32,169, 94,189,250,245,173, - 91,183, 86,110,218,180,169,248,232,209,163,200,205,205, 21,215,168, 81,227,214,150, 45, 91,252,155, 52,105, 34, 62,127,254, 60, -116, 58,157,221, 19,138,233,245,250, 34,237,223,161,211,233, 94,104,188, 94, 69, 72, 72,200,199,254,254,254,215,182,110,221,234, -219,188,121,115,209,169, 83,167,144,151,151, 7, 63, 63,191,235, 91,183,110,245,109,218,180,169,232,226,197,139,200,203,203,179, -255, 50, 65, 38, 67,225,241,147,124,241,197, 23,190, 82,169,244,154, 76, 38,131,159,159, 31,250,244,233, 35, 29, 55,110,156,175, - 76, 38,187, 98,111,151, 33,207,243, 50,119,119,119, 56, 59, 59,227,227,143, 63, 86, 5, 4, 4, 16,155,205, 6, 74, 41,136, 69, -111, 1,165, 53, 8, 21,245, 33, 98,145,133, 18,186,158, 16,210,138,138,197, 82, 86,237,188, 18, 55,112,104, 23,155,100,150, 75, - 29,124, 29, 29,202, 7, 0,153,103, 81, 69, 35, 7, 33,156,226,218, 3,189, 26, 4,237, 0,184,149, 74,147,160, 93,116,162, 73, -110, 81, 4, 57,104,124, 42, 34, 35, 35, 3, 21, 42,215,132,153,148,151, 93,188,167,115, 0, 45,181, 38, 0,160,126,253,250,205, - 43, 84,168,224, 85,169, 82, 37,164,167,167,163, 90,181,106,112,112,112,112, 9, 14, 14,110, 87,230, 35,112,166,146, 28, 25,104, - 10,142, 44, 2,199,125, 3,129,155, 11,113, 90, 3,220, 8,150,252,227,204,213,166, 95,125,220,188,107, 2,119,135,192,211, 85, -134,213,147,234,185,186, 59,202,203,100,178,138,155, 43,165, 82,137,240,240,112,212,174, 93, 27,227,199,143,119, 82, 42,149,255, - 88,147,245,156,185,114,165,148, 26, 0, 8, 0,250,163, 12,119,189,146, 2,190,251,246,219,111, 63,157, 60,121, 50, 46, 93,186, - 4, 31, 31, 31,164,166,166,162,121,243,230,113, 89, 89, 89, 37,182, 75,189,123,247, 22, 53,109,218,244, 23, 55, 55,183,227, 67, -134, 12,233,177,101,203, 22,231,221,187,119,147, 22, 45, 90,144, 74,149, 42, 57, 15, 25, 50,164,135,155,155,219,241,166, 77,155, -254, 98,111, 84,171,168,233, 4,160, 0,160, 42,122, 61,121,242, 68,230,239,239, 47, 35,132, 40, 10,205,165,156, 16,194,158,166, - 82,130, 7, 41, 70,249,185,115,231,206,166,148,118,157, 59,119,238,236, 98,219,237,127,133,102,113,211, 4, 0,120, 94,131, 82, -218,181,248,255,226,219, 82, 74,187, 82, 74,187, 22,223,254, 85,191,247, 82,131, 5,224, 52,165,180,229, 31,194,128, 64, 93,239, - 42, 53,144,125,124, 59,148, 34,242,187, 23,247,228, 54, 42, 40,196,176, 82, 90,187, 44, 7,212,193,193,225,217,139,227, 56, 36, - 37, 37, 65, 36, 18,225,235,175,191, 86,140, 30, 61,186,142, 84, 42,189,212,162, 69,139, 57, 37, 25, 33, 0,184,114,229, 10,170, - 85,171, 70, 38, 79,158,236,212,178,101, 75, 49, 0,220,190,125, 27,254,254,254,100,214,172, 89,142,221,186,117, 35, 42,149,202, -238, 8, 22,199,113, 80, 42,149,104,213,170, 21, 89,187,118,173,131, 92, 46,199,129, 3, 7,144,158,158,142,246,237,219,139,215, -174, 93,235,160, 80, 40,112,230,204, 25,228,228,228,216,173, 75, 8,129,209,104,252,131,193, 34,132,188, 52,178,245, 50,154, 52, -105,178,218,203,203,107,233,134, 13, 27,228, 74,165, 18,167, 78,157, 66, 78, 78, 14,250,245,235,103,219,180,105,147,194,201,201, - 9, 23, 47, 94, 68, 78, 78, 78,153, 10,252,213,171, 87,225,239,239, 79, 38, 79,158,172,108,220,184,177, 21, 0,110,222,188,137, -234,213,171,147, 41, 83,166, 40,157,156,156,150, 52,107,214,108,181, 29,161,100,232,245,122, 24,141, 70, 60,126,252, 24,153,153, -153, 72, 72, 72, 0,165, 20, 50, 93, 82,174, 64, 68, 91, 40,165,189, 57, 43,167, 32, 28, 34, 64, 72, 32, 79,168,140,204,152,193, - 42,159, 23, 71,154, 8, 32, 84, 7, 72,131,203, 17,249,174, 45,218,191, 39, 69,218, 33,128, 90, 1, 34, 70,235, 80, 95,241,158, - 11, 58, 79, 8,164, 46,128,154, 5,235,219,161, 41,162,213, 0, 52, 60,122,131,119,107,214,113,184, 52, 33, 33, 1, 82,169, 20, -114,185, 28,245,155,188, 35,222,114,218,234, 5,160, 30, 56, 18, 96,151,102, 49,228,114,249, 87, 31,126,248,161, 58, 49, 49,241, -153,102,167, 78,157,212, 42,149,106, 90,153,205, 21,167,106, 12,208, 49,119,163,141,149,102,173,215,214,124,146, 96, 14, 0,197, - 56,152, 12,175,109,178,252,252,252, 90,213,168, 81, 35,186,114,229,202,205, 94,211, 92, 93,218,186,233, 87, 31, 87,175, 2,115, - 5, 94, 15,136,148,240,242,112,193,234,105,173, 92,221,157,148,165, 50, 89,207,155,171,235,215,175, 67, 38,147, 65,161, 80,160, - 65,131, 6,248,230,155,111,156, 84, 42,213, 63,194,100, 17, 66, 92, 8, 33, 29, 8, 33,239, 18, 66,222, 41,102,174, 42, 3,120, -139, 16,210, 14,128, 23,128, 51,148,210, 91,118,106, 54, 19,139,197, 7,234,213,171,167, 21,139,197, 17,179,103,207, 30, 57, 97, -194, 4, 44, 91,182, 12,173, 90,181,122, 50,113,226, 68, 68, 70, 70,218,244,122,125,119, 74,105,137, 13,161, 86,171,157, 81,189, -122,245,126,187,119,239, 86, 87,174, 92,153,211,235,245, 56,118,236, 24, 22, 46, 92, 8,163,209,136,138, 21, 43,114,187,119,239, - 86, 87,175, 94,189,159, 86,171,157, 97, 71,250,220,221,220,220,106,160,160, 59,171,200, 96,169,227,226,226, 28,206,157, 59,231, - 26, 20, 20,228,162, 86,171,213, 83,167, 78,245,253,252,243,207,123, 0, 96,145,250, 18, 60,200, 75, 76, 83,241,246,165,235,203, - 76, 79,209,119, 47, 50, 79,101, 77,228,171,126,239, 85, 6,171, 21, 33,228,204,139, 86,178,100,165, 66, 14, 1, 42, 17,129, 82, - 76, 10,254,139, 8,148, 28,133, 56, 43, 21,164,140, 1, 80, 7, 7, 7, 56, 58, 58,254,193,104, 25,141, 70,228,231,231,219, 21, -109, 18,137, 10, 46, 42, 92, 92, 92,144,151,151, 7,155,205, 6, 7,135,130,187,201, 93, 93, 93, 97, 50,153, 64, 8,129, 90,173, -134, 90,173, 46, 85, 4,171,200,236, 92,188,120, 17, 23, 46, 92,128, 88, 44,134,171,171, 43, 0,224,250,245,235,184,115,231, 14, -100, 50, 25,220,220,220,236,214, 5, 0,179,217,252, 66, 35,101, 50,153, 74,213, 69, 88,120,172,232,245,235,215,113,247,238, 93, -200,229,114,184,187,187, 67, 38,147, 33, 62, 62, 30, 15, 30, 60,128, 76, 38,131,187,187,123,153,242,199,201,201, 9,217,217,217, - 16, 4,225,153, 33,116,114,114, 66,126,126, 62, 56,142,179,219, 84, 22, 25,179, 75,151, 46, 33, 38, 38, 6,183,111,223, 70,100, -100, 36,158,123,138, 64,193, 1,180, 10, 86, 80,202, 9,132,231,128,105,172,202,121, 49,206, 0,215, 62, 45,215, 34, 79,203,147, - 59,123,250,183, 5,210, 15, 1, 68, 4, 72, 92,208,168,126, 21,196,165,242,234,200, 4,163, 2, 20, 29, 80,112,211, 68,201,154, - 2,215, 46, 53,219, 34,143,205, 46,239, 84, 43, 40, 24,169,169,169,144,203,229,144,203,229,104, 24,214, 6, 79,146, 5, 85, 68, -172, 65, 5,138,246,118,106, 2, 0, 26, 52,104, 80, 85,169, 84, 54,110,208,160, 1, 73, 73, 73,129, 92, 46,135, 66,161, 64,227, -198,141,193,113, 92,157,250,245,235,215, 44,213,222, 63,241,151,129,168, 26, 1,116, 76, 68,172, 65,179,247,162,161,122,183, 30, -239,184, 46,221,145, 82,243, 65,172,169, 50,108,100, 28,116,250,224,178,154,172, 74,149, 42,181,116,112,112,216,255,213, 87, 95, - 85,150,203,229,135, 42, 87,174,220,188, 76,245,155, 92,244,211, 87, 99,250,251,184, 20,153, 43,155, 14, 16, 41, 1,145,170,192, -100,121,150,199,204,207,218,186,170,164,146,223,236, 14,139,136,197,155,167, 79,159,254,204, 92, 73,165, 82, 40, 20,138,103,175, -176,176, 48, 12, 31, 62,220,201,193,193, 97,211,223,108,174, 92, 81, 48,174,234, 54,128,157, 0, 78, 20, 51, 87,213, 0,252, 86, - 24,181,186, 65, 41,141,179, 83,179, 73,199,142, 29, 79, 61,121,242,164,243,173, 91,183,188,147,147,147,107,142, 27, 55, 14, 75, -151, 46,197,132, 9, 19, 54, 83, 74,107,108,223,190,189,254,213,171, 87,235,216, 59, 62,136,227,184,161, 3, 6, 12, 80, 41,149, - 74, 40, 20, 10,172, 95,191, 30,195,135, 15,127, 86, 15,171, 84, 42, 40,149, 74, 12, 24, 48, 64, 69, 8,249,196, 14,201,140,188, -188, 60,135,119,222,121,199,175,200, 92,153,205,102,135,228,228,100,103,158,231,203,213,173, 91,215,115,250,244,233, 1,121,121, -121,245,118,237,218,149, 10, 32,141, 85,103, 37,123,144,231, 13,142, 61,203,202,186,190,189, 38,171, 84, 6,139, 82,122, 6, 64, -139, 63, 24, 24,130,219, 79,175,158,129,107, 96,131,223, 71,176,196, 4, 42, 39,103, 68, 39,196, 65, 10,114,175, 12, 9,124,102, -170,138,155,172,164,164, 36, 76,152, 48, 65,191,113,227,198, 59,102,179,185,241,217,179,103, 39,217, 19,193,242,240,240,192,211, -167, 79,233,130, 5, 11,114, 15, 29, 58,100, 43, 90, 22, 31, 31, 79,167, 78,157,154,247,235,175,191,210,210,116, 17, 22, 69,176, -206,156, 57, 67,167, 77,155,150,163,213,106,169,171,171, 43,220,220,220,112,252,248,113,219,164, 73,147,114,162,162,162,168,171, -171, 43, 92, 93, 93, 75,101,176,108, 54, 27,148, 74,229, 31,182,177, 90,173, 47, 92,254, 50,206,159, 63, 63, 36, 39, 39,231,243, - 47,190,248,194,112,255,254,125,234,238,238, 14,119,119,119,172, 91,183, 78,252,193, 7, 31, 24,110,223,190,253,108, 89, 89, 40, - 95,190, 60, 30, 62,124, 72,103,207,158,109, 56,113,226,132, 4, 0,220,221,221, 17, 25, 25, 73,191,249,230, 27, 67,118,118,246, -231,231,207,159, 31, 98, 79, 94,103,102,102, 34, 61, 61, 29, 9, 9, 9, 72, 79, 79, 71, 70, 70, 6, 4, 65,128, 89,237,237,196, - 81,190, 63,128, 29,130,196, 96, 36, 34,113, 13, 10, 68,137,172,212, 68,167,129,205, 28,254,194,171, 10,120,129,210,102,231,111, -229,151,107,215,185,143,140,228, 94, 5,172,249,128,196, 5,144,148,131, 88,225,134, 78,173,235,139,214, 30,205,243, 2, 65, 19, -112, 92,201,227, 91, 8,241,132, 64,155, 31, 15, 55,185, 52,237, 52, 90,150,153,153, 9,142,227,158, 25, 44,149, 90,141,182,157, - 7,114,107,142,153,188, 64,105, 83, 16,222,238, 49, 51, 82,169,116,252,224,193,131,165, 89, 89, 89,191,211, 84, 42,149,232,217, -179,167,220,209,209,113,170,221,251,254, 32, 80,138, 20,121, 35, 16, 58,230, 65,172, 65,179,231,130,190,198,184,105,171,149,181, -235,134, 97,104,119, 15,229,172,141, 41,129, 55,159, 24,170,128,227,198, 66,175,111,136,149,165, 51, 89,149, 43, 87,110,174, 86, -171, 15,236,222,189, 91,213,186,117,107,140, 27, 55, 78, 45,151,203, 15, 85,170, 84,169, 69,105,179, 73,151,199,143,250,102,201, -134,148,219,219, 58, 0,182,188, 66,115,245,191, 87,106,142,128,175,191, 59,149, 99,229,105,127,123, 53,173, 86,235, 39,147, 39, - 79,206,223,177, 99,199, 31,204,149, 66,161, 64, 76, 76, 12,126,254,249,231,252,252,252,252, 79,254,230, 82, 90, 31,192, 77, 0, - 70, 0, 45, 1,168, 10,239, 20,108, 12,224, 56,165,148,167,148,166, 80, 74,147,236, 46,246, 34,209,132, 31,126,248, 65,108, 48, - 24,240,241,199, 31, 35, 62, 62, 30, 90,173, 22, 83,166, 76,137, 17, 4,225,131, 66,205, 91,148,210, 7,246,106, 26, 12,134, 15, -103,204,152, 97, 72, 76, 76, 68, 80, 80, 16, 82, 83, 83,209,185,115,103,116,233,210, 5, 42,149, 10,117,234,212, 65,124,124, 60, -166, 79,159,110, 52, 26,141,246,212,117,130,213,106,189,119,252,248,113,101,183,110,221, 2, 22, 45, 90, 84,245,228,201,147,213, - 77, 38, 83,101,179,217, 28,152,156,156, 28,180,111,223,190, 74,191,252,242,203,211,167, 79,159, 94,166,148,242,172, 66,123,181, - 7,121, 3, 28,120,157, 72,213,139, 34, 96,118, 7, 65, 10,133, 72,241,255,191,139, 94, 1, 95,175,223,177,222, 40,243,171, 14, -231,154,245,160, 82, 40,160,148,203,160, 44,231, 10, 35,207, 99, 85,108,138, 94, 71,233,212, 50, 36,254,119,145, 43, 65, 16,240, -243,207, 63, 27,103,206,156,153,157,156,156, 60,236,236,217,179,245,174, 93,187,118,219, 30, 35,148,155,155,139,237,219,183, 27, -214,174, 93,251,196, 96, 48, 52,144, 74,165, 86,179,217,140,205,155, 55, 27,151, 46, 93, 26,171,215,235, 67, 36, 18,137, 69,161, - 80,148,122, 12,150, 68, 34,177, 26,141,198, 6, 91,183,110,141, 58,112,224,128,193,201,201, 9, 18,137,196,170,215,235,235,108, -216,176, 33,114,235,214,173, 6, 39, 39,167, 82, 25, 44, 65, 16, 94, 24,193,226,121,190,212, 99,176,174, 93,187,246,139,197, 98, - 9,219,188,121,115,194,154, 53,107,140, 78, 78, 78, 69, 21,113,200,250,245,235, 19,126,250,233, 39, 83,105, 6,184, 23, 69,216, -120,158,199,250,245,235, 77, 91,182,108, 73,176,217,108, 33, 69,203,214,172, 89, 99,220,176, 97, 67,130,197, 98, 9,187,118,237, -218, 47,118,230,181, 57, 41, 41, 9, 73, 73, 73,184,125,251,182,249,193,131, 7, 52, 61, 61,189, 96, 12,150, 88, 37, 6, 33, 15, -193, 9, 91,169, 77, 34, 21, 40, 6, 16,224, 52, 17,139, 44,172,202,121, 89, 43, 43,168,192, 65,249, 40,193,228,168,148, 90, 9, -146,127, 3,164, 46,133, 6,171,224,165,241,241,197,181, 72,189, 35, 8,149, 65,160, 37,119, 67,240,188, 26, 28, 85,221,141,133, -163, 68,170, 34,201,201,201,207, 34, 77, 69,134,168,114,213, 90,184,241, 40,223, 1,132,202,193,139, 60, 75, 83, 81, 57, 58, 58, -138,147,146,146,158,105, 61,211,172, 92, 89,100,181, 90, 59,216,189,239,241,188, 55, 4, 97,212,195,120,147,102,207, 69, 67,141, -177, 95,173, 81, 42,185, 44, 32,118, 25,106, 87,243,194,184, 15,234,201,166,174, 73, 13,188,250, 64, 95, 21, 68, 52, 12,181,243, -237,190,186,168, 92,185,114, 51,149, 74,117,104,247,238,221, 42,181, 90,141, 39, 79,158,160,110,221,186,248,246,219,111, 85, 42, -149,234,160,159,159, 95,171,210,100,211,229, 72, 26,151,159,199, 55, 30,255,115,124,242,237, 24,190,192, 88,113, 5,230, 42, 45, -135,226,163,175,246,101,103,229, 26,223,185,116,199,122,210, 94,205,196,196,196, 83, 70,163,177,199,178,101,203,242, 83, 82, 82, -126,103,174, 98, 99, 99, 49,114,228,200,252,252,252,252, 78, 90,173,246,194,223, 92, 74,213, 40, 24,188, 30, 0,192, 31, 64, 61, - 74,169, 13, 64, 94, 89, 77, 69, 96, 96, 96, 3, 63, 63, 63,252,248,227,143, 88,181,106, 85,214,226,197,139, 65, 41, 69,245,234, -213,157,202,170,121,227,198,141,253, 22,139,101,236,251,239,191,111,216,180,105, 19, 63,104,208, 32, 52,108,216, 16,193,193,193, -120,255,253,247,241,203, 47,191,216, 6, 12, 24, 96, 52,153, 76,159,223,184,113, 99,191,157,229,221,148,151,151, 23,190,127,255, -254, 91, 43, 86,172,136, 31, 51,102, 76,222,199, 31,127, 44,157, 53,107, 86,218,175,191,254,122,243,220,185,115, 7,141, 70,227, - 21, 74,169,137, 85,102,207,142,217, 75, 61, 72, 49,210, 10,141,142,249,185,255,105, 37,124,103,239,182, 47,124,111,199,122, 47, -143, 56,151,180,227,219,158,208,139, 3,253,201,252,111,215,252,252,229,192, 58, 53,149,149, 42,215, 2,159,159,141, 59,201,201, - 88,159,148,163,183, 82,250,221,246, 39,244, 84, 89, 13,150, 72, 36,194,145, 35, 71,248,205,155, 55, 91, 40,165, 43,115,115,115, -167, 70, 68, 68,232, 74, 97, 86, 68, 31,126,248, 97,126, 86, 86,214,111, 73, 73, 73,195,162,162,162,204,205,155, 55, 23,189,247, -222,123,249,153,153,153,123, 9, 33, 31, 95,191,126,221,212,172, 89, 51,148,230,193,214,132, 16, 72,165, 82, 16, 66,112,237,218, -181,152,192,192,192,218,151, 47, 95,254,254,225,195,135,125, 40,165,162,240,240,240,248,224,224,224,186, 23, 47, 94, 92,241,224, -193,131,254,130, 32,148,106,206,149, 23, 13,114,167,148,150,218, 96, 1, 64,120,120,248,189,192,192,192, 90, 87,175, 94, 93,247, -201, 39,159,116, 0,160,186,118,237,218,253, 58,117,234,212,188,124,249,242,186, 15, 62,248,160, 99, 97,184,218, 46, 44, 22, 11, -122,246,236,169,207,201,201, 57,156,151,151, 55,232,206,157, 59,250,224,224,224,162,101, 71,178,179,179, 7,149, 38,143, 40,165, - 51,207,158, 61, 59, 31,128, 88,169, 84,238,191,121,243,102, 7,189, 94,175,162,148,130,228,197,231, 8,158,182, 95,121, 34,225, - 56, 17,237,206, 81, 90,131,167,194, 36,149, 84,197, 66,231, 47, 63,162,185, 0,167,125,183,181,139,124,217,247,171,165,131,187, - 85, 85, 4,213,244, 43, 48, 87, 82, 23, 92,187,159,141,175, 23,111, 23,230,125,226, 30, 13, 1,241, 32, 52,178,228, 75, 45,113, - 46, 4, 33,245,163, 14, 18,249,156, 95,198, 84,105,218,229, 75,121,173,160,208,103, 70,232, 65,196,117, 44,153,251,169, 48,239, - 99,215,104, 8, 68, 11, 14,118, 71, 9,108, 54,219,187,115,230,204, 57, 60,120,240, 96,117,237,218,181,159,105,198,196,196, 96, -222,188,121, 6,147,201,244,142,189,103, 37,148, 53,234,243, 2, 60, 54, 31,205,168, 54,230,211,161, 74, 37,151, 9, 68, 47, 44, - 48, 47, 18,103,212,175, 93, 30, 95,143,242,146,124, 49,127, 95,224,249,101, 85,243, 97,149,214, 2,160,181, 71, 93, 44, 22, 31, -152, 61,123,182, 74,169, 84,226,209,163, 71, 40,234, 54, 10, 14, 14,198,210,165, 75, 85, 35, 71,142, 60,212,170, 85, 43,135,211, -167, 79,219, 74, 99,178, 26, 5,144,198,227,127,136,186, 52,255,179,114, 94,117, 3,202, 35, 61, 15,248,104,218,254,172,204, 92, - 67,239,210,152,171,226, 38,203,199,199,167,199,204,153, 51,247, 44, 88,176,192, 33, 40, 40, 8,113,113,113, 24, 49, 98, 68, 94, -126,126,126,231,127,128,185, 2, 0, 29, 0, 31, 0, 15, 81, 48, 22,233, 49, 33, 68,134,215,120, 60, 91, 68, 68,196,141,184,184, - 56,239, 33, 67,134, 32, 55, 55,215,165,111,223,190,120,242,228, 9, 30, 62,124,120,243,117, 18,122,233,210,165,159, 67, 66, 66, - 46,172, 89,179,102, 2,199,113, 45,204,102,179, 7, 0,225,232,209,163, 73, 54,155,237,180, 94,175, 95,124,227,198,141,200, 82, -157,161, 5,141, 77,122,225, 43,146,213, 89,111,132,107,127,211,182,101,198,174,194,190, 49,138, 78,239, 93,133,156, 88,117,249, -234, 76, 11,165,245, 41, 64,100, 28,185,157, 79,233, 87, 59,162,232,153, 87,152,148, 87, 62,109, 59, 38, 38, 6,203,150, 45,211, -231,231,231,223, 50,155,205, 31, 93,191,126,253,145, 29,198,231,119,154, 98,177,248, 66, 66, 66,194,218,107,215,174,109, 47,190, - 44, 49, 49,113,253,149, 43, 87,126, 45,182, 44,174,117,235,214,190,132,144, 12,123,210, 73, 8, 73,234,209,163,135, 88, 36, 18, -197, 23,158,220, 22, 0, 31,135,134,134, 30,116,112,112,248,168,208,216, 88, 1, 12, 11, 11, 11, 59,172, 86,171, 63,182,119,223, - 57,142,131, 74,245, 98,191,243, 42,131,245, 42,205, 66,195,243, 78, 72, 72,200,199, 42,149,106, 16, 0,220,185,115, 71, 15,224, -221,208,208,208,143, 84, 42,213, 96,123, 53, 85, 42,213,165,212,212,212,181, 87,175, 94, 93, 85,124, 89, 74, 74,202, 58,123,162, - 86,207,107, 94,187,118,109, 57,128,229, 69,159, 67, 66, 66, 26, 62,126,252,248,164, 32, 8, 42, 46,255,129, 62,252,199, 14, 41, - 13, 70,158,169, 74,169,213,129, 16, 50, 65, 70,164, 25,151, 22, 55, 50,150,166, 44,149,133,255,183,154,156, 40, 14, 4, 11,252, - 53,202,137,159,116, 43, 79,230,111,141,174, 50,106,160,151,172, 65, 93, 23, 92,137,200,194,184,153,155,132,249, 67, 61,162,154, -212, 82,199, 0,194, 50,128,164,150,156, 78, 33, 14, 68,152, 87,205, 87, 49,241,139,119, 40,249,106,195,172,170, 10,197, 76,105, -195,176, 86,184,127,239, 42,230, 78,255, 68, 88, 48,212, 53,170, 73, 45,245, 83, 80, 44, 3,144,106,239,190,135,135,135, 95, 8, - 14, 14,238,184,110,221,186,195,159,125,246,153,186,110,221,186,136,137,137,193,140, 25, 51, 12, 70,163,177,235,141, 27, 55, 78, -217,189,239,180,224, 54,110,129, 82,126,226,244,239,204, 6,139, 64,140, 38, 74,244, 22,112, 6,147, 64,244,102,129, 88,172, 2, -209,184, 43, 10, 34, 26, 28,229,236, 77, 39,199,113, 57,159,125,246,217, 75,195,189, 50,153, 44,191, 44,249,254,204,100, 45, 11, -191, 52,225, 35,169,215,242,205,225,153, 25, 57,134, 62, 37,153,171, 87,105, 22,153,172,241,227,199,239,249,226,139, 47, 28, 22, - 47, 94,108,151,185,250, 11,203,252, 77, 0,205, 0, 92,162,148,158, 38,132, 56, 0,104, 2,224, 78, 89, 53,121,158,159, 55,108, -216,176,142,179,103,207, 22, 79,155, 54, 13, 81, 81, 81,248,246,219,111,121,155,205, 54,231,117,207,205,107,215,174,221, 7,240, -254,127,166, 14,249,135,106,254,219, 32,165,137,234,188,169, 12, 8, 14, 14,166, 29, 58,116, 48,156, 57,115, 38,223,108, 54, 15, -189,126,253,250,222,255, 74,225,107,210,164,201, 83,179,217, 92,161,176,194, 78,151, 74,165,222,167, 79,159,182, 21, 95, 46,149, - 74,211,101, 50,153,247,243, 87,202,255,166, 19,175, 65,131, 6, 13, 8, 33,243, 77, 38, 83,247,136,136, 8, 93,157,225,199,220, - 57, 74,156,136, 88,100,185,249, 93,235,167,172,210, 41, 65,243, 92, 45, 25, 56, 52,132, 64, 38,222,137,214, 87,254,106, 77,122, -213,174,237,155, 72,214,237, 56, 43,204, 31,246,204, 92,205, 3,184,171,104,126,223,100,183, 38,132, 80,128,155,120, 43, 74,239, - 55,238,231,172,106,237,186,126, 36,218,247,219,207,194,130,161,110, 69,230,106, 30, 8, 46,217,173,249,251,243,190,169, 92, 46, - 63,212,191,127,127,135, 45, 91,182,148,104,174, 94,168,121,169,102, 69,216,200, 44, 0, 21,236,168,221, 30,193,138,153,104,253, -224,233, 63, 33,223, 27, 5, 16, 63,181,163,124,191,222,100, 27, 99, 79,228,202, 30, 77, 31, 31,159,214, 10,133, 98,189,193, 96, -232,103, 79,228,234,175,220,119, 66,136, 59, 10, 38, 98, 20,163,224, 38,150,123,148,210, 39,175,169,217, 76, 36, 18, 77,168, 90, -181,106,221, 39, 79,158,220,229,121,126, 1,165,244, 52, 51, 46,204, 96, 49,131, 85, 72,243,230,205,195,121,158, 63, 44,149, 74, -103,157, 62,125,218,196, 10, 31,211,100,154,101,208, 44,102,178,194, 31,233,170,204,222,146,229, 55,174,119,185,167, 37,153,171, - 18, 53, 11, 77,214,213,135,250, 74,115,127,205,243,251,226, 93,135,167, 37,153, 43,123,247, 61, 56, 56,184,105,161, 33,248,184, - 36,115,245, 66,205, 7,129, 82,100, 89,125, 64, 69, 65,160,120,249,163,118, 4,170,135, 68,116, 23, 73, 72,193,187, 17, 22, 86, -150,152, 38,211,100, 6,235,175,230,111,153,245,248,220,185,115,193,236,208, 51, 24,175, 73,243,251,102,156,171,117, 29, 28,157, - 27, 92, 93, 57,122,215, 55, 74, 61, 40,151, 0,240, 75, 95,101,174,236,208,188, 10, 8,115, 67,171, 43,199,236,158,161,212,131, - 34, 25, 20, 75, 94,101,174,236, 37, 60, 60,252, 2,128, 42,101, 22,168, 25, 97, 1, 16, 3,144, 88,204,120,197, 12,217,211, 64, -129, 63,241,234,145,193, 96, 48,254,137, 6,139,193, 96,188, 81,147,117, 13, 32, 95,192, 70,170, 64, 34,196, 65,224,146,209,252, -190,249, 53, 53,175,128,224, 51, 8,164, 6, 68, 66, 20, 4,188,158,230, 27,135,210, 2, 19,197, 96, 48, 24,204, 96, 49, 24,140, - 63,199,100, 89, 0, 36, 20,190,254,185,154, 12, 6,131,241, 31,130, 0, 8,122,241,245,161,253,125,171,132,144,160,210, 95,127, -190, 90,159,105, 50, 77,166,201, 52,153, 38,211,100,154,255, 62,205,146,180,255, 45, 99,187,254,150, 65,238, 76,147,105, 50, 77, -166,201, 52,153, 38,211,100,154,255,102,216,195,116, 25, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139, -193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,255, 24,254,212,187, 8, - 25, 12, 6,131,193, 96, 48,254,139,112, 0, 64, 8, 97, 46,139,193, 96, 48, 24, 12,198, 95,206,191,213,131,176, 46, 66, 6,131, -193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193,248,111, 26, 44, 66, 8,101, 99,177, - 24, 12, 6,131,193, 96,252,213,252, 27, 61, 8,187,139,144,193, 96, 48, 24, 12, 6,227, 13,195,186, 8, 25, 12, 6,131,193, 96, - 48,254, 63, 25, 44, 66, 72, 16,211,100,154, 76,147,105, 50, 77,166,201, 52,153, 38, 51, 88, 12, 6,131,193, 96, 48, 24, 12,102, -176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, - 96, 48, 24, 12,198,223, 4, 1,240,194, 59, 1, 40,165,119,237, 22, 41,195,221, 4, 37,233, 51, 77,166,201, 52,153, 38,211,100, -154, 76,243,223,167, 89,146,118,105,252,199, 63,218, 96,253,153, 19,141, 18, 66,130,222,244,129, 98,154, 76,147,105, 50, 77,166, -201, 52,153,230,191, 79,243,223, 6,235, 34,100, 48, 24, 12, 6,131,193,120,195,136,255,109, 59,228, 17,212, 83, 42, 22,139,223, -118,117,113,158, 72, 41, 69, 86,118,238, 92,155,205,182, 43,245,238,110,203,159,245,155,132, 16, 2, 0,244, 95,250,220, 33, 66, -136, 34, 48, 48,176, 17, 0, 68, 68, 68, 92,166,148, 26, 95, 51,143, 8,128, 9,142, 14,234,193, 54,222, 38, 24, 12,166, 85,169, -119,119, 47, 98,167,227,107,231,147,136, 82,202,255,211,211,233, 86,163,189,171, 72,170, 20,165,222,221,157,198,114,141,193, 96, - 48,131, 85,136,111, 96,111, 23, 43,199, 79, 23, 73,196,239, 80,129, 58, 38,221,218,174,254,135, 24,171,170,229,156, 29,199, 54, - 11,171,211,119,192, 59, 29,149,117, 2,171,203, 76, 22, 27,246, 28, 58,187,106,251,158,163,203,107, 52,255, 96,103,118, 78,222, -226,212,187,187,159,188,225, 70, 77, 62,117, 80,141, 78,229, 29, 21, 82, 66,200, 78, 74,169,237, 69,235,121, 54, 24,112,145, 16, - 84, 41,220, 6,132, 0, 4,208, 38, 94,219,216,224, 5,154, 42, 0,222, 0, 98, 95,166,247, 34,148,154,192, 10, 18, 78, 54,147, -211, 9,159,102,103,223,202,121,221,125,147, 74,165,158, 21, 43, 86,108, 86,163, 70, 13,207,209,163, 71, 75, 1, 96,201,146, 37, -181,252,253,253, 83,158, 62,125,122,222, 98,177,164,148, 81,250,171,175, 39,140,152,209,189,125,115,100,229, 91,176,124,213,246, -133, 30, 65, 61, 69,169,119,119,207,127, 83,249,162,246, 12,168,205, 73,213,227, 33,216, 58, 67, 36, 57, 38,152,243,231,234, 82, - 34,111,191,174,110,229,182,147, 38, 1, 8, 45,252,120, 53,230,248,156, 57,127,175,169, 10,150, 52,104, 85,229, 35,155,205, 54, -165,114,157, 22, 94,117,155,247, 74,214,229,235,191,142,190,157,177,145,210,112,235, 63,204, 0, 58,215,241, 47, 87,187,107,253, -122,251,206, 70, 89, 28, 61,130,122,110, 7,176, 32,245,238,238,155,246,106, 84,168,217,228,134, 72,196,105,120,155,144, 16, 31, -121,177,225,159,145, 78,181,103, 64, 91, 66,184, 77, 0,164,148, 10,139, 1,108, 3, 16,165, 75,137,124,173, 11, 40, 71, 77,117, - 87,158, 39,157,164, 82,121, 3,171,213,124, 93, 36, 22, 29,202, 77,136,200,126, 67,105, 22, 1, 24,164, 80, 42,191,240,175, 30, - 88, 35, 46,230,241,195,188,220,156,197, 0, 86,235, 82, 34,133, 82,150,241,247,168,192,127, 45,240, 22,142, 16,110,102,220,233, -197,235, 89, 83,201, 96,252,201, 6,171,124,141,238, 14, 34,185,228,110,179,166, 77,220,166,140,236, 37, 91,186,241, 44,188,235, -247, 73, 76,186,185,205,231,111, 54, 87,126,132,144,199,159, 15,237,135, 33,125,219,147,244, 60, 27,114, 13, 60,136, 4,232,211, -171,139,234,157, 30, 29, 85,243,151,175, 30,182,255,240,233, 97, 30, 65, 61, 43,167,222,221, 29, 87,146,166, 87,240,128,211, 0, - 2,138, 62, 83,193,166, 32,156,216, 88,220, 32,169,203,121,158,158,254, 97,205,221, 95, 15,169, 53,123,253,225,167,203, 0,148, - 7,144,252,194,198,133, 19,249,110, 88,185,216,195,199, 77, 6, 17,199, 33, 75,103, 69,223, 15, 63,231, 95,208, 8, 57,252,244, -101,131, 94,131, 58,251, 13,144,183,252,109, 34, 33,228, 38,165,180,196, 10, 82,237, 81,189,142, 76, 89,238, 88,213,122,109, 93, - 98,110, 31, 15, 82,123,212,120, 95,175, 52, 63,166,177,177,166,210, 70, 65, 28, 28, 28, 2, 28, 29, 29, 67,219,180,105,163, 28, - 63,126,188,180,101,203,150,207,190,255,228,147, 79,164,103,206,156,169, 48,127,254,252,119,125,124,124, 12,121,121,121, 87,243, -243,243, 35, 75, 19, 57,113,117,113,254,168, 87,231,150,232,218,111, 36, 4,112,248,114,194, 87, 56,116,232,200,135, 0,222,136, -193, 82,123, 6, 4,248, 85,170,114,229,171, 25,179, 21,213,171, 84, 36,135,207,222,238,253,243,178,111,187,168, 61, 3,154,190, -174,201, 18,139, 72,216,188, 49,239,118,179,218,128,137,203,182,151,184,190, 87,131,247,174,131, 16,223,103,166,154, 0, 28, 10, -222, 83, 74, 19,226,175,110, 44,147, 73, 8,107,251, 94,168, 72, 38, 93, 80, 35,196,173, 81,247,174, 29,196,157, 59,180,133,183, -151, 7,226,226,147, 52,123,246, 29, 88,189, 75,188,239,231, 58, 45,251,157,137,127, 26, 51, 54, 59,246,234, 61,123, 52, 61,235, -190,155, 66, 5,155,199,243,203, 69, 34, 73,106,210,173,237,158,175, 97,172,220, 59, 55,241, 12, 57,243,125,139, 14,141,106,187, -213, 93,121,204,228,220,160,243,104, 36,102,163,239,158,221,191,245,245, 8,234,121, 10,192,252,212,187,187,143,150,164, 37,151, -203, 61,247,237,219,231,209,161, 99, 39, 23,143,160,158,135, 0, 36,189,224,149, 12, 32, 69,102, 77,187, 34, 18,115,190, 60, 47, -104,227, 31, 92,108, 96,127,122,185, 77,135,142,159,119, 55, 90, 41,230,127,191,229, 27,125, 78,242, 55,177, 17, 23, 99,213,158, - 1,159,235, 82, 34,247,150,102,223,149,154,218, 62, 34,222,214,197,167, 66,165, 62,159,142,153,220,184, 93,155,150,146, 42, 21, - 60, 72,116,124, 42, 61,118,226,172, 37, 32,180,227,133,196,248,167,219, 5,155,176, 95,159,254, 48,185,140,229, 93, 76, 8,217, -210,189,207,144,119,123,244,234, 15,103, 39, 71, 88,204,230, 26,167,142,237, 95,249,243,119,243,154,170, 61, 3, 6,149,198, 28, - 82,193,246,245, 47,115, 70, 86, 3, 4,124, 48,250,219,233,132,144,141,246,212, 65, 12, 6,227, 53, 12,150, 72, 38,250,182, 81, -163, 80,183,207, 71,126, 40, 27,182,252, 52,158, 94, 61,104, 72,126, 67,230, 74,237, 30,232, 41,150, 75, 62,228, 56, 73, 57,112, -156, 82,176, 90,159,230, 34,109, 5, 77, 72, 40,177, 59, 42,245,238,238, 56,143,160,158, 65,203,126,217,246,109,248,237, 7,173, - 62,121,191,167, 67, 5, 95, 13,103,181, 81, 92,188,126,135,255,238,151,173, 57,153, 89, 57,231, 41,165, 95,217, 99,174, 0,128, - 82, 90,109,209,194, 5, 30, 26, 55, 57,114, 13, 54,140,252,124, 42,230,205,154,238, 88,209, 67, 1,163, 69,192, 15, 7, 19, 82, - 3,115,151, 94,251,186, 71,173,217,123,206, 37,253, 60,120,230,181,155, 0,244,175,210,116,119,150, 98,244, 79, 15,161, 84,136, -225,172,146,130, 43,232, 89,252,157,185,250, 97,124,131,183, 63,233, 94,121,218,172,245,145,191, 0,144, 0,144, 1, 48,190,186, -130,173,217, 70,237,236,190,189,227,224,111,202,169,156, 61, 49,176,119,167,160,179, 71,118,158,141,143,143, 69,133,154,205,140, - 60,207, 31,203,205,201, 92,162, 75,125,116,167,164,253,174, 84,169,210,251,221,186,117, 83,143, 27, 55, 78,234,235,235,139,109, -123, 78,250,182,121,119, 76,135,196,228, 52, 13, 0,248,120,185,107, 63,126,175,235,145, 67,135, 14, 37, 36, 36, 36, 72,231,207, -159,223, 98,219,182,109,245, 1,108,176,187, 2,167, 20, 54,158,130, 23, 40, 4, 42, 32, 35,191,244,189,183,175,234, 14, 35, 98, -249,244, 47, 39, 77, 83, 38, 25, 28,241,221,202,135, 8,174,234, 65, 58,245, 29,169,220,246,203,220,137, 0,250,190,110,180,202, -100, 5, 22,156,176,211,183,114,196,119,229,247, 75, 60,220, 28,165, 16,113, 4, 34, 17,129,136, 35,200, 55,218,240,254,144, 49, -101, 58, 87,106, 53,234,246, 36,184,126, 80,229,193,239,191, 71,106, 5, 84, 69,174,129, 34, 45,215,138,155, 49, 6, 40,101,229, -208,167,255, 32,244,127,239, 61,241,197,139, 23,219,108,219,190,243,142,127,112,199,199, 81,225,135,107,216,209,176,122,236,219, -177, 14,110, 78, 82,112, 4,200,200,179, 33, 38,197,136, 79, 71, 14,245, 40,163,177,114, 25,218,189, 74,231,219,235,219,182, 14, -240,115,172,126,235,113,118,196,224,153,215,150, 30,139,175,213,100,250,130,154,208, 27, 77, 24,246,249, 84,164,107, 99, 90, 31, - 57,184,175,181, 91,141,246,145,188,213, 48, 57, 59,250,252,158,151,105, 26,141,198,172,142,157, 58, 59,123,123,121, 42, 87,175, - 90,217, 49, 51,199,128,204,236,124,164,101,230, 32, 61, 35, 11, 73, 41,233, 72,212, 38, 33, 33, 62, 81,200,210,102,227,240,161, -131, 92,183,110,221, 74,221,109,106,176, 8,184, 21,157, 15,191, 26, 13,225,234,225,131,208,246,131, 43,221, 60,189,117,143,131, - 87,205, 57,249,201, 15, 38,219,163,225,224, 85,115,105,223,126, 31, 12,239,251,110, 79,113, 77,255, 10,156, 54, 53,155, 94,188, -122, 35,115,201,210,165,247,154,181,120,171,118,215, 78,109, 93,135, 13,238,253,214,131,168,248, 86, 91,119,236, 89,161,246, 8, - 88,171, 75,141, 28, 86,218,200, 21, 33,100,211, 91,221, 7,191, 27, 20,214, 30,143,162,158, 32, 42,226, 26, 90,181,233,132, 14, - 93,223,129,201,108,122,127,221,202,165,215, 0,124,255,162,237, 93,252, 91, 72, 0,168,126,159,238, 64, 49, 64, 11,206, 83, 83, -174, 84,237, 93,219,205,197,191, 69,209, 73,170,207,138, 58,107, 5,131,193,120,179, 6,139,136,101, 93, 63, 31,220, 89, 54,241, -199, 75,120,122,117,171, 33,249,230,246,103, 39,166,111,112,191,232,132,240,173, 85,158,107, 72, 75,188,195,128,144, 96,137,115, - 69, 76,240,240,241, 25, 49,224,195, 81,226, 74,190,158, 92,158,193,102, 75,210, 38,208,163,123, 55,127,234, 92,161,254,172,156, -248,155, 63,190, 76,147,248,119,146,209,168, 67,230,212,187,187, 35, 0,244,244, 8,234,233,121,238,202,157, 73,174, 46,142,253, -120, 94, 64, 78,174,110,107, 78,110,222,156,212,187,187, 83,138, 85,252,164,248,120,169,151,165,211,197, 81,138,113,171, 31,193, -104,230, 65, 41,224, 81, 78,134,185, 59,227, 32, 22,145,212,218,185, 75,231,125,211,195, 48,114,199, 5,243,150, 73,123,125,155, - 3,248,153, 82,154,247,210,116, 2, 16,113, 4,106,165, 4,106,185, 24,142, 74, 9, 56,242,187,198, 72,253,221,184,186,111, 15, -235, 94,121,250,156,141,145,191,124,181, 50,226, 44,128, 71,197,199, 59,189, 40,157,142, 94,117, 62,112,245,172,176,172,199,199, - 51,157, 98,179, 56, 72,108,128,155,119, 21, 50,109,250, 76,103,133,140,131, 82, 66,157,239, 68, 70,127, 48,114,212,103,221, 85, -222, 53,218,234,147, 30,134,191, 42,143,116, 58,157,252,189,247,222,147, 90,173, 86,243,144,207,231,182,138,137, 79,237, 52,123, -218, 56,121, 69, 31, 15,240, 2,197,221,135,241,213,103,204, 90, 92,241,192,137,203, 7,250,118,172,119,200,221,221,221,197,100, - 50, 9,165,201,247,172,236,220,245,155,118,157,152,186,108,241, 2,196,166,232,176,113,243,118,240,188,109, 77, 9,166,236,119, -154, 51,103,206,244,174, 93,187,182, 52, 34, 34, 34,153, 82,106,120,238, 88,119,241,243,171,136,117, 91,227,144,153,103, 69,116, -178, 9, 77, 3,106, 19,202, 91,219,149,178,124,134,126, 49,102,120,119,129, 2,139,151,253, 88,100,184, 66,166, 44,223, 14, 0, - 41, 0,174,150,148, 78, 2,130,242,142, 82,204,222, 17, 11,165, 76, 12,165, 76, 4,165,188,224,255,115,254,218,238,125,215,233, -242,189,127, 90,242, 45,137, 73,179,226, 86,156, 5,185, 58, 43,172,188, 0,128,194,108,166, 72, 73,201,130, 62, 47, 19,219,119, -236,134,201, 10,146,151,155, 91,169, 36,205, 34,220, 28,165,248,122, 83, 12,148,242,130,116,214,175,236, 96,119,253,240,188,166, - 79,157,206, 39,206,165, 73,106,234, 14,153, 46, 69, 63,186, 50,243,202,109,237, 85, 74,105,166, 71, 80, 79,152,109, 20,249, 6, - 43,238, 61,181, 65, 48, 74,209,179, 99, 8,234,186,148, 15, 88,190,254,212, 6, 66,136, 83,209,249,249,188,102, 66,228,165,218, - 30, 65, 61,157,147,242,149,143, 22,236,138,117,247,243,116,130,151,139, 3,220, 53,174,168, 89,179, 6, 92,212, 18, 56, 41, 69, - 80,202, 68, 92,203,142,189,209,161, 99, 39,131,192,219, 82, 74,147,239,148, 10, 3,222,233,220, 98, 43, 5,100, 68, 36, 75,240, -241,171,230, 23,214,113,136, 34,164,253, 96, 88,205,198,137,106,207,128, 83,186,148,200, 19, 37,105,186,184,121, 13, 30, 50,228, - 19,105,101, 79, 57, 78,156,189,100,155, 52,101,202,237,220,236,220,185,186,212,200,187,199,143, 30,211,148,115,115,157, 54,249, -171,111,155,181,105, 90, 95,212,166, 75, 63,233,225,195, 71,251, 2, 24, 86, 82, 58,213,158, 1, 28,128, 79,170, 5,212, 25,255, -254, 39,159, 87, 74,204, 48,195, 69, 83, 29,183,111, 92,199,209,237, 43,110, 24,117, 89, 11,143, 31,216, 57,254,171,217, 43,234, -117,237,209, 23, 7,118,111, 29,167,246, 12,248, 65,151, 18, 73,139,107,186,248,183,232,224,231, 87,121,163,135,167,167, 91,113, -125,129,138, 48,125,238,114, 24,243,179, 80,201,187,156,183, 99,205,142,169,148, 16, 80, 10,164,167,165,152, 93,252, 91,116,201, -138, 58,123,162, 52,245,124,105, 97,154,255, 77,205, 18, 8, 1,224, 14, 32, 13,192,181,231, 62,163,240, 61, 94,240, 57,189,176, - 9,118, 3, 96, 46, 12, 90, 20, 81,244,249,101,203,139,182,143, 0, 80,171, 80,147, 47,172,251,179, 74, 52, 88,133, 94,131, 20, -107,232,127,247,249,119, 7,148,183,250,122,120,122,193, 70,227, 64,240,191, 85,252, 66,223,211,127,246, 73,111,165,166,126,111, -157,246,166,253, 99,178,148, 62,254, 62,206,126,229, 78,126,250,217,151,206,195, 63,232,230,120, 63,222,152, 27,241, 84,151, 75, - 85,128,155,159,155,168,110, 39, 79, 33,109,219,194,233,206,154,186, 89, 57,218,219,219, 94,164,225,225,228, 26,237,219,104, 72, -166,201,160,155,154,113,119,251, 1, 74,105, 10,128,207, 60,130,122, 78, 44,140,110, 61, 51, 40, 30,245,122, 53,145, 43,156,103, -251,132, 12,112, 43, 60, 88,175, 36, 51,207, 2,158, 47,240, 97, 28, 71,144,111,228,161,144,113,105, 53, 50,151, 60, 51, 87,231, -232, 71, 31, 91,133, 95, 37,197,205,213,139,141, 36,144,145,103,133, 90, 46,134,131, 82, 2, 7,165,248, 89, 4,139, 16,162, 94, - 62,182,222,219, 35,222,174, 58,125,222,198, 71,171,166,252, 20,113, 22,192, 67, 74,233, 43, 51,208,209, 35,160,177,188,156,251, -138,143,190, 92,226,112,254,161, 14, 26, 87, 25,130,252,156,224,172,146, 33, 49,179,224,130, 83,155, 97,132,209,226,136,158, 31, -205,112, 62,188,237,251,171,229,124,130, 86,103, 39,222,253,164,164, 8,211,182, 61, 39,171, 70,199, 37,117,218,182,118,145, 60, - 83, 15, 60,205, 20,144,145,103,134, 89,228,130, 41,211,102,200, 39, 78,156,208,133,234,211, 18,252,253, 92,181,101, 56, 81,230, -238,216,125,120,114,237,224,102,220,233, 83,167,112, 55,252,252,214,210,142,191,170, 88,177,162,109,233,210,165,229, 86,172, 88, -241,150,139,139,203,211,172,172,172,187,133,199,178,130, 91,197,160,148, 35,167,175, 85,170, 83,169, 10,137,207, 48,163,102, 5, - 71, 60,186,123, 73, 16, 75, 36, 7, 95, 25, 97,172,221, 99, 38, 1, 9, 6, 0, 10, 26,174,246, 12,128,213, 70,241,243,145,132, -194, 50,192,133,141, 31, 59,220,147,231, 41, 22, 44,249,193,174,241, 87,132, 0, 34, 17,129, 74, 46,198,173, 35, 43,179, 77,134, - 28, 11, 1, 87,104,174,132,132,178,214, 52, 2,165,120,154,110,134,222,196,195, 96,225,193,243, 54,112,214,108,100,229,100,225, -215, 77,171, 97,178,240,104,248, 86, 31,184,187,151,199,218, 69, 19,236, 30,199,199,113,128, 66, 38,130, 66, 38,130, 82, 42, 66, -126,161,119,246,168,211, 99, 59, 40,201, 22,139,196,121,218, 91, 59,190,180, 71, 75,161, 46, 87,111,253,202, 5, 56,118, 46,188, -213,153,199,235, 66, 60,130,108,203, 61,130,122, 46, 4, 0,139, 77,128, 62, 63, 7,106,107, 28,154, 87, 74,135,155,138,199,195, - 44, 13,110,197,139, 29, 74,186, 89, 36,245,238,238, 28,143,160,158,195,110,157, 63,184, 75,220,170, 23,178,117, 60,226,228,102, -168,228,226,194,151, 8,247,111, 95, 65,114,142,112, 22,196,165,125,234,131,221,230,210, 28, 91, 93, 74,228,241,194,202,184,200, -208,184, 39,255, 52,110,253,187,163,151,119, 8,237, 56,132, 60, 12, 63, 54, 25,192,137,146,116,156,156, 93, 37, 81, 41, 60,158, -196, 69, 11, 97,161,141,197, 87,207,157, 12, 62,118,250,226,175, 27, 54,109, 49,118,126,123,160,178,109,179,250,162,248, 12, 51, -150,253,118,159, 70, 36,130,200,212,110, 82, 59, 34, 86,156, 74,237,184,121,221,134,205,125,107, 87,175,128,228,108, 43,180, 89, - 22,156, 11,127,140,181, 43, 39,100,235,210, 98, 6,216, 76,121,249, 84,224,115, 78, 28,221,123,120,216,232,137,168, 85,187,126, -165,179,167, 14, 59, 1,200,121, 78,238,227,111,103, 47,112, 83,171,255, 88,101,167,165,104,161,203,215, 65,166,114,130,202,201, - 21, 54,155, 0, 43, 79,145,151,151, 39,155,248,233,192,225,246,236, 63,131, 81,138,104,183, 61, 62,196,157, 16,178,159, 82,218, - 21, 64, 91, 0,178, 98,159, 65, 8,217, 95,216,126,253,238,243,196,137, 19, 39,207,153, 51,231, 94,209,186, 69,203,139,214,125, -213,242, 98,219,187, 77,154, 52, 41,104,238,220,185,179, 27, 55,110,188,245,226,197,139,209,118, 25,172,226, 59, 67, 8,121,105, -197,230, 89,167, 71, 40,165, 34,145,143,187, 3,170, 84,170, 0, 87,229, 7, 74, 77,131,190, 58,177,152,112,235,150, 78, 86,196, -100, 75, 33, 18,113,186,210,152, 43,185,184,220,217, 31, 87,110,112, 8,171, 83, 73,177,104,119,226,147,196, 76,179,153,183, 89, - 57,147, 33, 79,154,169,125,172,206, 77,141, 81, 59,122, 86, 23, 25,114, 83,190, 65,193, 64,211, 63, 32,147,201,185,101, 11,166, - 7,157, 62,115,126,235, 94, 7,199,108,175, 6, 3,231,137,101,230,213, 69,198,138,144, 25,156, 71,253,135,239,202, 21,170,169, - 1,117, 90,104,188,107,132,150,187,122,104,221, 35, 59,236,185,104,194,228,233,207,204,149, 85,159,133,249, 43,247,231,181, 41, -127,126,110,145,185,218,148,218,255,131, 14, 45,106,120, 30, 18, 75, 50, 74, 44, 64,224, 19,222,255,232, 51, 41,225, 0, 14, 28, - 8, 7, 16, 42,164, 16, 66, 84,203,198,212,235, 57,170, 87,213, 25,243, 55, 61, 92, 61,233,167,123, 69,230, 42,179, 36,205,124, -177,234, 54, 49, 26, 83,226,162,238, 41, 70,119,110, 34,246,243,114,134, 82, 38, 70,182,206,134,108, 61,143,132, 52, 35,158, 36, -235,112,247, 73, 26,120, 67, 46,222, 27,245, 13,183,118,254,167,157,236,201,159,131,167,111,116,152, 63,107,178, 60, 67, 7,100, -228,243, 72,202, 52, 34, 33,221,128,132,116, 3,148, 82,160,113,187,126,242,243, 7,215,117,242,247,115,253,165,180, 39, 83,234, -221,221,122,143,160,158,151,180, 73,233, 77,253,171, 7,130, 28,216, 91,203, 35,168,167, 79,234,221,221,137,246,106,236,219,183, - 47,205,215,215,215,243,167,159,126, 74, 93,188,120,113, 93, 95, 95,223,192,196,196,196,223,220,220,220,134,124, 57,250,195, 51, - 63,174, 89,236,211,170,219, 16,113,221,106, 65,220,147,123,167,133, 35, 59,127,214, 27,244,249,243, 95,157, 71, 36, 56, 62,252, -215,246, 0, 80,181,213,167,149, 1, 56, 44,251,238,167,103,209, 44, 80,192,102,163,216,126, 33,165, 20, 21, 7, 32,230, 10, 12, -150,201,144, 99,137,187,188,193,243, 77, 84, 72,188, 0, 24,205, 2,140, 22, 1, 38,139, 0,137, 45, 11,171,190, 95, 8,179,141, - 71,104,219,126,144,171,156, 64,100,206,136,207,181,129,130,216,173,203, 17, 82,104,174,196, 80,200, 68, 48, 89, 11,170,132,165, -179, 38,138,130, 2, 3,209,186,219, 64, 71,123,181, 28, 29,148,200,211, 91,160,114,246, 70,248,137, 13,170, 3,199,175, 78,154, -191,124,213,151,185,249,122, 36, 60,188,130,198, 46,105,240, 47,111,198,213,167,142, 56,250,212, 15,213,171, 86, 1, 39,222,109, -111, 25,218,237, 81,231,237, 93,185,181,234,191,237, 82,181, 6,228, 82, 17,228, 82, 14, 50, 41,135, 39, 15,239,225,215, 77,235, - 34, 0,116, 79,189, 91, 58,115,245, 18,195,149,166,246, 12, 24,249,232,198,241,232,102,221,135,195,197,211,175, 94,169,174, 38, -190,157, 98,226,109, 54,203,123, 31,124,162,238,214,233, 45,113,147, 38, 77, 28,174, 61,204,194,220,181,167,249, 11,135, 55,104, - 37,114, 39,165,111,147, 97,110,246,152, 43,185, 66,177,126,227,230,109,125, 43, 87,244,194,209,171, 49,184,241, 56, 27, 78,206, -206, 16,169,189, 17,208,114, 72,185, 59,135,150,190,195, 91,244,235, 69, 50,213, 71, 33, 97,205, 65, 41,197,195, 7,119, 51, 1, -188,168,110,254,241,235, 41,227, 59,187,123,120, 20,191,114, 71, 85,255,234,232,220,253, 93,156, 56,189, 29,209, 81,143, 32, 80, - 10, 74, 11, 76,125, 70,122,106, 6,128, 95,192, 96,252, 73, 38,235, 85, 62,164,200, 56, 61,111,136,158, 55, 90, 69,239,139,214, -155, 51,103, 78,215,231,130, 8, 93, 95, 18, 92,248,195,122, 69,219,207,157, 59,119,118,177,239,245,118,119, 17, 22,237,212,203, -118,206,189,238,219, 77,229, 50,213,209,239,231,140,225, 82,115,172, 80,202, 68, 80,251, 85,133,255,135, 99, 84,239,181,112,135, -214,232,130,253,251,215,230,218,120,126,191,189,230, 74, 38,118, 58,179,228,187,213, 82,255,202, 26, 50,125,107,236, 35,147,165, -224, 74,217, 98, 50,136,159,222, 58,162, 78,136, 56,102,224,121,126,141, 72, 42, 15, 1,197, 43, 27, 37, 63,175,114,104,210,178, -157,170,101,203, 86,170,163, 39,207,205, 63,112,240,224,103, 0,252, 1,192,187, 97,204,133,224,198,157,131, 52,254,117, 84,121, - 38, 2,153,148,179, 55,183,249,249,179,167,163,162,135, 2, 70,179,128,111,127, 60,148,219,194,249,228,140,226,230,202,211,183, - 90, 5,169, 66,109, 87, 87, 79,226,181, 77, 77, 94, 80, 80, 84, 75, 62,175,243,246,232,119,171,206, 88,176,249,225,154,137, 63, -222, 59, 3, 32,210, 30,115, 5, 0, 84, 27,110,112,242, 13, 12,219,189,110,193,140,131, 91,150,190, 69, 64,221, 2,106, 84, 19, -183,107,223, 94, 81,191, 97, 83,121, 90, 14,197,253,152, 52,152,242,179,240, 86,227,154, 56,180,107, 3,159,154, 20,107,215, 24, -143,180,140, 28,141,159,143, 39, 98,210, 5, 60, 77, 43, 48, 86, 9,105,122, 36,102, 24,144,149,111, 70, 72, 21, 79,232,116, 38, -205,107,156, 79,187, 47, 93,186,212,180, 81,139,118,120,103,192, 39, 65,251,127,219,112,199, 35,168,231,167,169,119,119,111,182, -103,227,237,219,183,243, 26,141,230, 81, 74, 74, 74,203,185,115,231,166, 86,171, 86,173,226, 55,223,124, 51,205,219,219,219,109, -252,184,207, 98, 26, 55,110,188, 97,193,178, 85,205,246,109, 92, 92, 9,132, 30, 52, 25,141, 83,116, 41,145,145,118,156,228, 72, - 75, 75, 3, 39,145, 59,125, 49,102,184,187,163, 82, 12,142, 0,217,122,222,115,209,210, 31, 82, 22, 46,253, 97, 47, 10,198,101, -133, 86,110, 59,105, 15, 74,184,147,144, 35, 5,227,174,212, 10, 49, 8, 41, 40,123, 47, 27, 76, 14, 0,156, 72,146,154, 92,194, -128,114, 74, 1, 27, 79, 97, 48,243, 48, 89,120,152,173, 60,212, 42, 23,116, 31,248, 41,114,116, 22,152,136, 26, 17, 79, 13, 72, -200,200, 64, 21, 79, 37, 4,193,254,241,201,137,153,102,116,106,224,138,244, 60, 27,178,116, 60,164,226,130, 52,239,191,145,137, - 39,250,156,210,117, 33, 8, 64,121, 55,103,168, 50,129,206, 99,119,161,117, 3, 95,156,218,187, 74,124,225,234, 29,124, 59,119, - 57, 60,122, 52,198,234, 91,254,144, 59, 85,128,220, 89, 14, 43, 45,229,180,124,148,142,186,121,102,119, 91,255,170,227, 29,100, - 18, 41,100, 18, 17,146,226,163,177,105,237, 79, 9,130, 32,180, 79,189,187, 59,247, 13,214,255,190, 46,174,238,144, 75, 56,240, - 86,179,174,180, 27, 39, 37,196, 87,159, 63,115,226,144,243,151,123, 77, 11,233, 52, 84,118,102,231, 50,211,221,171, 7, 62,214, -167,168,183, 85,109, 90,254, 94,241,136,217, 75,204, 21, 17,139, 37,107,127, 90,189,121,128,151,151, 7,118,159,184,141,181,171, -190,131, 79,237, 78,136,186,121, 4, 21, 27,244,128, 67,149, 86,144, 59,255,250, 9, 17,137,235, 12,251,108, 74,175,250, 13, 27, -227,210,249,147, 72, 77,209,254,164, 75,137,252, 67, 20, 51, 43,234,236, 9, 23,255, 22, 14,177,177,209,197,199, 96,105, 4, 1, - 17,109, 44, 2,162,163, 30,225,102,248,229, 64, 0,197,163,212,108, 12, 22,227, 79,161, 36, 31, 82, 82,212,169,148,102,110,255, -139, 76,214,243,203, 9, 33,251, 39, 78,156, 56, 25, 0,157, 56,113,226,228,162,207,115,230,204, 49, 60,119, 94,188,220, 96, 21, -237,220, 11,187, 77,234,190,221, 84, 46, 85, 28, 93,183,124,138,114,203, 85, 30, 11, 14,133,163, 94,117, 15, 72,165, 98, 56, 40, - 60,113,226,110, 14, 46,158,219,155,119,227,218, 37, 35,225,204,147,236, 49, 87, 18,162, 62, 57,111,241,143, 89, 1,213,253,100, -223, 29, 76,186, 97,180, 8,132, 82, 72, 8, 32,182, 9,188, 83, 66,196, 49,215,108,146, 81,159, 38,216,115, 7, 28, 17, 44, 54, -138,216, 84, 51, 8, 1,154, 54,111,173, 56,122,236,132,242,217,183,156,196,181, 98,205, 96,213,253,167, 58, 72,197, 28, 60,202, -201, 96,239,237, 52,238,229,100,152,179, 35, 22, 18, 49,151,218,194,249,228,188,226,230,202,203,183, 90, 5, 71,103, 39, 8, 2, -121,214,112,150, 50,131, 85,139, 63,171,211,243,179,119,171,205, 88,188,249,241,186, 9,223,223, 59, 99,111,228,170, 56,185, 9, - 17, 89, 0, 70, 63,235,150,240, 13,116,185,118,237, 90,251,114,110,238,203, 90,244,158, 90, 62, 63,199,140,182, 77, 10,204,213, -221,179,219,222,214,165, 68, 30,176, 87,219, 98, 19, 16,151,162, 71, 76,178, 30,137,133,209,171,132,116, 3,148, 50, 17,140,230, -215,158,110,233,251, 35, 7,118,119,179,242,104, 81, 43,184, 37,222,253,112,162,203,177, 61,235, 55,121, 4,245, 52,164,222,221, -109, 87, 24, 67,171,213, 26, 92, 92, 92, 46,230,228,228,244,220,178,101, 75,102, 72, 72,136,168, 92,185,114,153, 0,228,224,205, -150,203,167,118,199,228,229,228,188,111,177, 88,174,149,226, 36,135,197, 82,208,189,106,181, 81, 44,216, 21, 7,169,152,123,102, - 52,138,248,118,202,167,158, 2, 69,247,105,179,151,151, 16,185, 4,116, 38, 30, 42,185,248, 89, 28,137, 10, 54,143, 31,127,250, - 9, 46, 14,146,130,177,121, 34,130,204,124, 43,146, 50, 45,152, 62,113,180, 93, 3,202,109, 60,133,201,202,195,108, 41, 48, 89, - 49, 58, 30, 57, 6, 37, 30, 39,241, 72,204,204,134,185,240,130,197, 38, 20, 12, 86,182, 7,145, 72,146,250,118,159, 65,127,248, -125,165,202,193,168, 16,139,161, 86, 20,236,129, 71,237, 30, 35, 1,146, 43,146, 72,141, 73, 55,183,253,246, 50, 61,129, 10,144, -203,100,240,245,114,133,197,202,227,200,149, 56,116,105, 19,138, 70,161,193, 32, 18, 25,174,231,213,135,220,201, 1, 84, 68, 96, -227, 41,204,214,210,149,169,212,187,187,147, 61,130,122,142,189,117,233,232, 47,237,187,244, 66, 86,122, 18, 54,252,178, 34,199, -106,181,182, 77,189,187, 59,233, 77, 85,252,106,207, 0, 15, 7, 39,151,165, 13,154,180,133, 33, 59, 9, 25, 73,209,191,149, 86, - 67,159, 22,145, 5, 96,185,197, 98,156,198,113, 4, 16,204,208,167, 60,218, 1, 64, 0,234,219, 35, 49, 98,214,226,159,222,175, - 80,161, 2, 14, 95,120,128, 57,147,134,222, 80,169, 29, 43,123,182,114, 42,199, 87,175,135,216, 59, 71,225, 90, 57, 27, 14, 30, -213,125,251, 15, 24,226,219,161,243,219,184,123,251, 58, 86, 44,156,113, 9,192,236,151,137, 22,154,165,103,206,217,197,191,197, -156,198, 45,218,193,108,229, 17,218,180, 45,110,134, 95, 30,149, 21,117,118, 56,107,254, 25,127,149,201,178,115,189,174,175,249, - 59, 93, 81, 48, 86,203,221,222, 8,214,156, 57,115,238,205,153, 51,231,133, 17,177, 18, 13,214,171,204,213,218,165,147,149,155, -174,240,136,140,205, 68,187,134, 62, 72,210, 38, 96,219,150,239, 4, 74, 41,228, 10, 89,178,205,102, 59,100,160,182,241,217,225, -251,114, 74, 50, 87, 98,170, 56, 58,107,193,146,123,117, 3,107,136,126, 56,154,122, 78,111, 18, 40, 17,136,132,136,168, 68, 16, - 56,177, 72, 44, 87, 11,130, 80, 11,188, 43,103,239,161,178, 9,244,217,149,189,133,167,160,248,125, 38, 89,109, 2, 4, 1, 16, - 10,175,252,237, 51, 64,128,206,200, 67, 41, 19,165,213,200, 90,242,123,115, 85,161, 90, 5, 71, 39, 39, 40,164, 34,208,194, 70, -180,148,230, 74,185,120, 84,157,158, 99,250, 84,251,102,233,214,199,235,190,248,254,206,233,242, 53, 59,123,138,229,206,110,222, - 13, 6,252, 47,103,108,212,144,116, 99,243,209,210,104, 23, 26,174,173,106,175,128, 42, 73, 81,215,191,109,215,185, 31, 14,238, - 90, 95,100,174,246,217,171, 83,222,205, 89,123,253, 94,108,117, 11, 45,135,216,100, 29, 18,210, 13, 72,201, 46,240,187,238, 78, - 82, 36,196,199, 65,173,150,219, 61,254,202, 35,168,231,103, 28, 33, 31, 11,148,110, 72,189,187,123,126,234,221,221,102,143,160, -158,109, 79, 28,250,109,113,244,147, 71,163,194,218,244, 70,253, 86,189,112,120,211,130,175, 0,236,182, 87, 55, 43, 43, 43,183, - 92,185,114,167,199,141, 27,247,246,170, 85,171, 50, 1,136,243,242,242, 84,239,188,243, 78,133,244,244,244,145,148,210,216, 82, -158,120,176, 88, 44,224, 45, 6,213,226,197,139,159, 77,132,201, 73,228,202,233,147, 62,243, 20, 40,186,127, 59,111, 5, 40, 5, - 78,220,206,182, 71, 48,225,189, 15, 63,251,195,152, 43, 23, 7, 9, 70,253,244, 0,234,103,227,134,196,104, 91,223,213,206, 52, - 22,148, 99,179, 69,128,201, 90, 96,176,140, 22, 30,137,233, 38,100,228,253, 62,184, 96,181, 81, 8,118, 94, 82, 20,159,138,193, - 51,168,231,182, 21,115, 39,137,246,134,103, 66, 33, 22,195, 65, 37, 17,148, 82, 9, 0,224,199,133,147,197,213, 2,106,225,173, -206, 3, 20,175,142, 96, 81,156,185,246, 8, 43,118,220,194,210,201,189, 33,230, 8, 70,205,220,134, 1, 29, 2, 32, 8, 2,146, - 30, 93,135,119, 64, 35,200,101, 5, 50, 69,166,176,132,115, 39, 12,133,119,214, 82, 74,175,165,222,221,189,202,183,102,139,197, -209, 55,247, 59, 24,141, 22,193, 68,156, 58,164,222,221,253,168,112,221, 32, 0, 82, 0, 38, 74,105, 68, 25,140,149, 43,128,126, -126, 85,107, 78, 25, 50,230, 91, 79,149, 83,121,236, 92,191,156,162, 20,119,204, 2,128, 96,179,114, 0, 42, 0,200,161,133,153, - 65, 10,238,112,145, 1,112, 19, 4,139,184,164,232,149,155,135,207,248,154, 53,107,225,242,189, 4,204,155, 60,236, 70,126,122, - 76,127,179,209,117,168, 53, 63,105,108, 96, 80,125,120,123,148, 71,114,114, 18, 90,118,239,132,246,237, 59,224,238,237,235,152, - 51,109,220, 37,163,209,208, 94,151, 18,105,176, 39,157, 46,254, 45,234, 4,213, 11,249,164, 90,205,186, 72,203,200, 68,149, 26, -117, 80,163,118,131, 79, 92,252, 91,252,148, 21,117,246, 14, 24,140,127, 14, 7, 0,116,121,222, 8, 61,111,146,138, 69,160, 94, -196,181,226, 26, 69,235,191,204,192, 21, 31,147, 5,192,174,219,200,197,207, 59,198,162,207,238,117,223,110, 42,147,200,142,174, - 89, 50, 73,185,241,138, 13, 15,227,178,209, 46, 68,131,244,140,116, 28,222,249,115, 62,192,183, 77,189,187,231,170,189, 71, 67, -233,227,239, 35,162,178,131, 95, 77,159,121,160,121, 88,136,245,135, 99,137,167,243, 13, 84, 16, 8,145,136, 40, 21,115, 84, 36, - 22, 56, 42,145, 41, 29,197,229,171,132,148, 19,158, 92, 58,162,118, 15,252, 84,159, 94, 62,130,210,211,182,146,174,230,139,224, -121,138,226,237, 9, 45,252, 94, 40,186,237,216, 78,131,197, 17,130,245, 39,147, 82,107,231,253,239,110,193, 77,233, 5,230,202, -201,201, 9,114,105,193, 64, 96, 10, 2, 66,236,183, 88,132, 16,229,130, 17,117,222, 30,211,191,218, 55,203,183, 61, 89, 55,118, -197,157,211, 0, 30,138,229,206,110,235, 87, 45,149,123,187, 41, 32, 2,144,173,231,209,251,131,209,101,189,226,126, 47,184, 89, -231, 25,111,117,233,141, 3, 59,215,240,247,206,239, 44,149,185, 2,128, 46,173, 26, 28,153, 51,127, 89,197,113, 19,191,150,203, - 36, 20,121, 6, 43, 20, 82, 14,238,206, 50,184,170, 57,156, 59,242,155,169, 89, 77,183, 67,118,154, 43,167,138, 21, 43, 46,154, - 60,101,178,104,205, 47, 43,231,122, 4,245,220,159,122,119,119,100,234,221,221, 86, 0,163, 61,130,122, 62,244,241,245,251,174, - 98,237, 22,112, 46,239, 83,207, 35,168,167, 99,234,221,221,121,246,166, 53, 59, 59,251,169,159,159,223,163,239,190,251, 46,112, -212,168, 81,198,145, 35, 71, 86,208,233,116, 91, 75,107,174, 0, 64, 16, 4, 88, 44, 22, 60, 56,186, 72, 37,149, 74, 85, 0, 96, -179,217, 80,171,243,148, 52,129, 82,245,129,235,153, 0,144,242,245,236,229, 69,101,255,149,231,192,211,151,204,115, 69, 8,126, -103,174,212, 10, 49, 12, 38,251,186,242, 40, 40,172,188, 0,153, 24,200,214, 9, 48, 89, 5,152, 45, 2,108, 66,129,249, 42, 10, - 88, 73,196, 4, 54,129, 66,224, 75, 63, 63, 38, 5,114,170, 4,212, 68,245,252, 28, 40, 21, 4,106,169, 4, 74, 69,129, 15, 56, -124, 35, 7, 49,198,146,205,165, 64,255, 23,149, 50, 89,120,168,229, 5,219,155,173, 5,119,229, 38, 62, 56,179, 62, 37,234,202, - 0,175,234, 97, 34,223,128, 38, 48,201,237, 58,143, 92, 40,165,135, 8, 33, 29, 8, 33,237, 1,208,138,181,154, 8,123,118,253, -134,174, 93,187,234,226,111,239, 81, 17, 66, 90, 21,158,250,148, 82,122,150, 16,210,172, 36, 81, 7,175,128, 22, 20,220, 54, 16, -170,130,128,123, 94, 62, 21, 84,173, 58,188, 93,171,249, 91,157, 68,149,171,214,128,201,194, 99,227,170,165,244,210,137, 93,159, -234, 82, 34,111,150,230, 88,250, 84,170,142,164,196,216,207, 5,158,204,250,223,213, 24, 1,128,124,181, 71, 64, 59,165,139,175, -123, 9, 18, 78, 65, 33, 45, 43,196,165, 91,113,248,224, 65, 24,114, 83,190,226,205,249,122, 43, 71, 86,157,216,249,211,144,222, -195,103, 56,133,132, 52, 68, 57, 39, 21,220,202, 57,226,230,245, 75, 88, 48,115, 98,145,185,178,187, 59, 83,196,137,230,118,239, - 61,152,203,200,200,194,146,217,227, 49,236,139,217,104,215,253,125, 46,234,254,237,185, 0, 58,178, 54,157,241, 87, 69,174, 94, - 18,201, 74, 43, 22,121,250,195,231, 98,166,232, 69,159, 73,225,103,243, 75, 52,204,207,153, 42,243,115,203,205,207,233,221,122, -173, 8,150,136,136,142,173, 94, 50, 73,177,251,174, 8,209,137, 5,230, 42, 45, 53, 13, 7,126, 93,145,111,177, 90, 58,165,221, -177,223, 92, 1,128,200, 42,234,234, 93,209,123,236,136,254,221,200,154,115, 89,215,146,136,131,141, 32, 79,196, 73,228, 34, 78, -108,224,116, 38,145, 72,162, 20,113, 48, 91, 68, 65, 29,199, 93,188,181,207, 88, 63,227,233,157,233,106,207,212,202,142, 94, 53, - 55,230, 37, 63, 88,240, 34, 93,158,231,145,146,150, 5,111, 23, 21, 82,178,173,176,190,160, 49,225,121, 10, 66, 8, 84,114, 17, -244,186, 92, 8,188,181,196,154, 92,229,236,177,183,118,222,210,168, 34,115,181, 57,189,255, 7, 94, 62,191, 55, 87, 10,169, 8, - 92,225, 4,146,246,154,171,121, 35,106,247, 28, 55,160,192, 92,141, 89,118,235, 12, 10,186, 5,211,189, 27, 12,128,135,147, 20, - 35,127,184, 15,149, 66, 2, 23,149, 20, 34, 81,153,205,213,134,182,189,134,113,123,214,205,183, 69,222, 58,223,171, 52,230, 74, - 16, 4, 98,181, 90,241, 86,211, 58, 9, 55, 30,196,158,154, 57,227,171,214,161,109,251,202,155, 7,120,193, 96,230,145, 16,255, - 20,103,143,108, 55,105, 92, 36, 39,253,253, 92,181, 60,207,219, 19,214,213,153, 77,102,163, 88, 44, 85,191,251,118, 23,114,253, -198,205,237, 30, 65, 61,119, 0,184, 3, 32, 8, 64,175,122,129, 85,145, 13, 10,139,217, 96,180,247,234,224,119, 70,230,233,211, - 99, 43, 86,172,168, 35,145, 72,188, 14, 29, 58, 36,232,245,250, 95,203,120,162,195, 98,177,224,201,147, 39, 16,137, 68,224, 56, - 14, 28,199,129,183, 24, 84,211,191,157,159, 6, 0,130,213,148,111,206, 79,141, 72,187,183,103,106, 89, 43, 20, 17,199, 65, 37, -151, 64,173, 16, 61, 51, 89,102,171,125, 70,200,102,181,198, 46,251,105, 93,181,119,122,189, 35, 46,167, 18,225, 86,108, 62, 76, - 22,254,217, 29,175, 98, 17,224,230, 32,131,148, 26,144,120,115,135,141,130,127, 92,218,244,137, 69,226,188,142,221,255, 56,160, - 93,165,118,176,202,165, 4, 42,121,137, 55,188,193,106,179,161, 89,112, 53,184,121, 86,196,196,133, 5,189,106,223, 77,237, 3, - 15, 39, 17, 54,175,165, 72,189,187,123,144, 71, 80,207,153, 9,247, 78,127,149,112,247,248,123,111,133,122,139, 60, 21, 89,118, -156, 70,228, 29, 0, 2,128,125,148, 82, 91,133,128, 38, 81, 29, 59,118,240,229,121, 65, 75, 41, 61, 85,184,146, 12, 64,107, 66, - 72, 71, 0,118, 68,112,184,205,225,215,174,121, 88,108, 2, 78, 92,184,221,168, 89,163,250, 48, 91, 41,244, 70, 11,174,223,188, -133,189,219, 55,232, 35,239, 94,235, 95,154,115, 41, 41, 49,230, 72, 66,220,227,238, 3,135, 77,145, 7, 55,110, 59,124,207,214, -159,250,163, 48,218, 14, 2, 84,106,244,254, 29,175, 58, 61,106,137, 29,188, 56,106,206,166,121,105, 79,206,191,236,252,121, 24, -113, 51, 43, 58,197,236, 34,114,169, 6,145,220,113,168,204,201,123,153, 88,238, 48,205,167,241, 96,167,211,231, 47,227,193,173, - 11,240,118, 83, 35, 38,234,161,254,222,157,240, 31, 0,204,208,165, 68,234,237, 77,171,139,127, 11,175,128, 90,245,218, 57,150, -115,199,111, 91,126, 65, 78,118,198,252,147,135,127, 27,223,166,219, 7,168, 80,181, 86, 59, 23,255, 22, 94, 89, 81,103,147,193, - 96,252,125, 92, 43,225,243,155,208,124,163,188,212, 96, 9,188, 77, 81,222,203, 15, 59, 71,124,128,175,231,172,192,157,200, 56, - 28,218,246, 93,129,185,186,189,235,130,157,134,226,217,211,182,243, 83, 31, 62,155,203,106,116, 71,151,194, 65, 67, 94, 47,223, -120,252,186, 68, 0,251, 94,165, 9, 0,166,252,188,119,198, 78,152,177,170, 73,227, 16,223,230,111,117,112,178,241, 10, 80, 8, -228,185,171,113,184,171, 41,162,111, 31,207, 74, 79,120, 16,105,211,229,126,252, 42, 77, 66,136,124,250,135, 53,207,124,221,163, -214,236, 29, 23,204, 91,206,240, 67, 62,122,171, 73,117, 47,169,220,161,240,142, 44, 82,240,199, 17,200,164,162, 18,247,189, 72, -115,238,240,218, 61,190, 28, 80,227,219, 21, 59,162,214,143, 89,118,251, 12, 10, 6,180,167, 23,187,130,132,163, 66, 2, 39,149, - 20,229,212,210, 18, 53, 95, 96,174,186, 62, 51, 87,235,237, 51, 87,207,107, 82, 74,175,246,234,213, 43,120,232,208,161,178, 47, - 63,238,126,234,212,197,187, 81,219,143,108,235,144,145,145,171,225,121, 30,106,181, 92,219, 36,192,229, 72,117, 63,183,132, 59, -119,238,240,167, 78,157, 50, 81, 74,175,191, 74, 51,245,238,110,222, 35,168,231,182,235, 55,239, 12,105, 80,175, 54,126, 88,190, - 48,240,209,147,216,192,168,232,167,240,241,241,129,143,143, 15,114,109, 42, 68, 93,185, 11, 67,110,230, 11,159, 27, 89,210,190, - 83, 74,109,132,144,213, 95,127,253,245,244,172,172,172,153,246,204, 60,253, 34,205, 34,131, 85,100,172,138, 76,214,253, 35, 11, - 85, 82,169, 84, 69, 8,129,213,106,117,175,218,248,253, 96,123, 53, 95, 68, 86,190, 21,106, 69,193,148, 2, 42,185, 24,106,185, - 24, 22,222,190,116,166, 70, 93,170,189,230,151,252,143,118,110,251,117, 94,191, 15, 62,118, 10, 14,107, 69, 30,167, 16, 36,103, - 25,161,113,149,193, 81,198, 35,230,246,113,122,239,234,193, 44,179, 33,127,124,174,246,206,186,210,166,179,248, 84, 12, 30,129, - 61, 71,253,184,104,146,232,240,141, 28,200,229, 4,106,165, 82, 80,169, 68, 37,166, 51, 59, 59,239,194,194,101,191, 52,125,191, -127, 79,116,108, 84, 9,231,239, 36, 66,160, 5, 93,245, 69,217,147,118,111,143,249,179,190, 85,207,125,210,163,186,103,142, 33, -173,198,180, 56,243, 37, 66, 8, 87,148,127, 47, 40,159, 7, 9, 33, 34, 0,141, 0,116, 36,132,156,166,148, 54,124, 46, 29, 21, - 1,212, 1, 16, 93,120,142, 9,118,236, 59,177,216, 4,196,164, 24,113,241,226, 5,152, 12,185,136,122,244, 24, 71, 15,253,118, - 53, 47, 39,107, 21,128,237,186,148,200,188,210,148, 37,131, 53,119,244,252,169, 67,132,208,102,157, 58,119,126,119,136,108,194, -172, 85, 46, 81,143, 31, 10,130, 0,168,253, 59,203,124,170,170,107,115,130,153,102,220,223,107,142,187,185,247, 8, 15,250,233, -139, 52,117, 41,145, 54,181,103,192,143, 23,206,159,153,162,208, 52, 68,173, 46,147,187,107,111,237,237,238, 25,216, 1,229,253, -155, 66,123,107, 55,110, 92,216,124,240,186,205, 58, 17, 64,220,171,162, 86,175,200,247,190,181,131,155,113, 6,163, 25,247,110, - 94,122, 10, 96,210,253,219,151,251, 52,106,223,191, 98,213,192, 70, 92,236,227,187,125, 1, 44,121,157, 50, 95, 26,152,230,127, - 83,243,223,198, 75, 13,150, 88, 44, 49, 93,187,245, 80,222,233,195, 89, 8,191, 23,131, 99, 59,126,208, 89,121,251,205,213, 95, - 69,198,253,157, 87, 1,212,246,168,219,247,237, 75, 87,175, 47,170,219,160,177,171, 32, 20,187, 29, 73,224, 69,183,175,158,215, -101,196,133, 39, 88,205,186, 79, 83,110,110, 43,113,254,150, 79,222,174,252,214,215, 67, 10,102,104,159,184,219,167,142,149,110, - 21, 29,222, 39, 75, 37, 5,222,170,192, 98, 17, 82,248, 31,176,241, 86,123,158, 39,230, 61,166,111,181,143,190,219, 25,181,254, -179, 37,183, 79, 23, 69,174,138,175,144,173,183,192, 73, 37,133,163, 90, 10, 71, 71, 73,169, 31, 20, 41,149, 41,134,191,213,125, -136,221,230,234, 69,100,102,102,222, 32,132, 68, 44, 90,180,168,209,170, 85,171,170,125,241,197, 23, 49, 63,207,252,228, 23, 0, - 56,124,248, 48, 0, 32, 42, 42,138,126,247,221,175, 70,179,217,252, 72,167,211, 93,164,148,218,115, 43,252, 23,107, 87,253, 24, -152,220,229,221, 80, 63,255, 0,148,243, 10, 64, 99,159, 0,100,235,173,184, 23,159,137, 39,143,111,226,222,197, 3,183, 0,124, -102,231,201,221, 12, 64, 87, 0, 30,133, 47, 79, 0, 30,105,105,105, 30, 0,222, 38,132,164, 2, 40,254, 58, 66, 41, 45, 49,239, - 13, 6,195, 11, 13,214,227,199,143,127, 23,209,122, 93,146,178,204,104, 91,207, 21, 6, 19, 15,147,149,194,194,227, 89, 23,154, - 29, 81, 54, 1,192, 74,226,235,187,113,213, 15,139, 39,237,216,178,118,108,231,119, 63, 86, 54,168, 90,143,220,187,126,129,158, - 60,186, 81,167,215,229, 47,204, 66,198,124,154, 24,107,122,253,154, 20, 57, 85,170,213, 66,117,115, 54, 28, 20, 82,168,229, 34, -168,228,146,146,211, 9,180, 58,113,242,236,160,227,167,206,206,121,171, 85, 51,183,105, 31,246,192,142,131, 23,160, 86, 72, 33, -240, 60,250,190, 85,241,221,251, 91, 58,116,171,224,169,240,217,121, 42,225,236,168, 37,119,191,208,235, 45, 15, 75, 50,199,133, - 51,248, 95, 32,132, 4, 22,230,181, 13,128, 18, 64, 62, 10,230,166, 81, 2, 56, 95,210, 60,114,207, 93, 82,246,111,220, 56,108, - 59, 8,149,129,226,167,163,123,232, 62, 0,209,186,148,200,212,178, 30, 54, 67, 98,148, 22,192, 59, 14,158, 53, 90,220,188,114, -114,118,171, 14,189,131, 91,116,126, 79, 18,147, 97,133, 32,114,128,238,201, 57, 75,244,181, 95,111,241, 38,211, 20, 93,106,228, -201, 18,228,102,223,220, 55,191, 85,181, 54,159, 53, 46,239,223, 20, 46,126, 5,158, 50, 39,225, 14,158, 94,219,190, 71,176, 89, -123,235, 82, 34,203,124,119,159, 76, 38,127,223,191, 86, 3, 68, 70,220,130, 94,151,183, 41, 43,234,172,224,226,223, 98,211,147, -200,219, 83, 52, 85,235, 67, 44,149,191,255, 50,131,197, 96, 48, 74,105,176,172,130,173,237,244,153,243,143, 10, 2,175,228, 68, - 34, 3, 79,133,142,255, 52,115, 85,156,212,219,191,238, 34,189,123,239,181, 94, 62, 55, 66, 34, 17,181,251, 95,101, 44, 92, 75, -139, 58,127, 42,233,198,214,213,212,206,219,169, 82,211,141,182,165,219, 30, 47, 28,187,252,206, 61, 60, 55, 67,251,107,160,149, -183,248,109, 44, 0, 7, 20,204,208,158,246, 92,179, 97,232,247,225,152,103,221,130, 98, 0, 60,168,161, 52, 63, 96, 49, 27, 23, - 46,156,248,174,153,183,241, 63,235, 82, 34,143,148, 53,161,133,134,233, 12, 33,228,250,228,201,147,155,121,120,120,248,124,253, -245,215, 74,173, 86, 43, 57,120,240,160, 33, 47, 47, 47, 65,167,211,157,166,148,218,221, 5, 81, 56, 57,100,211,189, 59, 55,245, - 33,132,116,112,243,240,110,231, 82,222,219, 61, 43, 45, 57, 35, 51, 93,123, 76, 16,232, 81, 0, 91, 11,199,101,217,147,198,243, - 0,206,191,201, 50, 68, 65,195,107,191, 53,212,238,117,203,250, 59,156, 72,146, 58,109,194,139,239, 22, 20,139, 37,118, 55,232, -133,143,145,250,218, 81, 83,125,249,182,181, 75, 23,241, 54, 75, 31, 78, 36,222, 96, 49,235, 38, 22,222,236,240, 70, 16, 73,164, -198,118,221,254, 56,160, 93, 42,151, 26, 75,200,115, 27,128, 85, 30, 65, 61,215,157, 58,117,126,208,201,211,231,231, 52,110,213, -217,205,175, 82, 85,248,185, 88,176,238,203,224, 79, 79,220, 72,187,218,253,203,179, 63, 60,209, 26,111, 23,127,106,129,157,101, - 32,130, 16,146, 9,160, 43,165,116, 37, 33,228, 19, 0,143, 1,220, 41,237,179,243,242,147, 35,207, 22, 26,245, 55, 78,126,202, -195,179,132,144,166, 71,247,154,122, 95, 58,115,112, 73,179,206, 3,221,110,239, 91,155, 99, 52,228,125,174, 79,121,184,213,158, -180,234, 82, 34, 13,106,207,128,118, 15,143, 46,252, 42, 61,234,252, 8,149, 75, 69, 7, 93, 70, 76,102, 86,236,245,133, 0, 22, -190,104, 26,134,210, 80,222,211,167, 2, 37, 82,220, 14, 63, 15, 0,155, 10, 23,111,122,112,243,194, 20, 55,223, 64, 56,187,121, - 7,186,248,183, 32, 89, 81,103, 41, 24, 12,134,125,215,166,246,222,194,253, 95, 10,117,146,130, 81,235,238, 40,184, 83, 41,239, - 77,166,147, 16, 34,165,148, 90,254, 63, 29, 79, 66,136,139, 92, 46,111, 44,149, 74,165,121,121,121,103, 74,138, 12,216,155, 78, -143,160,158, 78,246,206, 85,196, 66,241,255,255, 53, 61,130,122,138, 9,197, 32,129, 96,102,107,255, 92,125,114,244,253,225,231, -238,164, 93,121,213, 57,102,103,249,236, 15, 64, 13, 64, 71, 41,221,242, 79, 62,158,132,180, 18, 43,221, 82,106, 27, 68,217,143, -104, 74,138,161, 44,154,106,207, 0, 41, 0, 23, 0, 25,165, 53, 86, 47,211,116,241,111, 49,169,188, 87,197, 9,233,201, 79,215, -100, 69,157, 29, 91,108,249, 52, 23, 15,191,209, 89,169,113,139,178,162,206,206, 97,101,158,105,254,153,154,255,153, 8,214,127, -153,194, 72, 87,234,159,164,109,249,127,120, 60,178, 80,112, 91,236, 27,229, 13, 79, 4,201,248,135, 83, 20,209, 2,176,170,248, - 56,171, 55, 80, 62,183,252,255, 57,151, 78,219, 96,231, 29, 72, 47, 67,151, 18,105, 65,193,179, 48,223, 24,133,230,105,206, 11, -150,207, 0, 48,131,149, 94, 6,163,244,112,236, 16, 48, 24,140,191,193,180, 11,236, 40, 48, 24,140,127, 51, 4, 5,183,201,191, -168, 2,180, 59,244, 87, 56,161, 95,105, 43,216,187, 76,147,105, 50, 77,166,201, 52,153, 38,211,252,111,105,150,164,253,111,233, -122,100, 99,176,152, 38,211,100,154, 76,147,105, 50, 77,166,249,183,107,254,219, 96, 93,132, 12, 70,201, 21,137, 39, 33,196,147, - 29, 9, 6,131,193, 96,252, 99, 13,150,189,141,213,235, 52,106,172, 65,252,255,129, 70,163,105,172,209,104, 86,122,121,121,173, -246,246,246,110,246, 39,150, 57, 31, 66,136, 79, 25,183,157, 67, 8,180, 5, 47, 50,135,229, 26,131,193, 96, 48,236,225,165,119, - 17,182,104,209,226,186, 72, 36,242, 21,139,197,228, 5,141,206, 31,214, 23, 4,129,218,108,182,132,211,167, 79, 55, 44,161,177, - 26, 95,248,126, 62,165,116,210,235,172, 87,210,182, 34, 17, 89,202,243,116, 92, 89, 26,100, 0,160,148, 38, 2,128,175,175,175, - 63,207,243,173,165, 82,105, 45,139,197,114, 95, 36, 18,157, 74, 72, 72,136,122,209,186,101,108,196, 61, 92, 92, 92,186, 74,165, - 82, 41,199,113,153, 73, 73, 73,231, 41,165, 73,165,212, 16,213,170, 85,109, 48, 33,104, 70, 0, 87, 10,100, 82,138,243,247,239, - 63, 94, 91, 56, 49,227, 63, 14, 74,233,224, 61,123,246,212, 17, 4, 1, 93,187,118,253,152, 16,114,145, 82, 42,148,116, 76, 9, - 33,196,203,203,171, 25, 0, 36, 39, 39,159,167,148, 82,111,111,239,230, 10,133,226, 99, 0, 48, 26,141,191, 36, 37, 37,157,123, - 3,101,201,147, 16,140, 47,154,184,150,227,200, 4, 7, 7,135, 13,249,249,249,145, 69,223, 23,166, 51,133, 85, 37, 12, 6,131, -193,176,203, 96, 17, 66,124, 87,173, 90,229,161, 84, 42,159, 25,170,226,198,138,144,255, 61,228,216,106,181,194, 96, 48, 96,212, -168, 81, 54,251, 27, 43,110, 98,155, 54,109, 58, 41, 20,138,223, 77, 44,105, 52, 26, 37,132,144, 32, 65, 40,184,201,136,227,200, -120, 66,200, 50,123, 26,177,162,223, 48,155, 77,156, 68, 34, 3,199,113, 99,235,215,175, 31,156,150,150,118,130,231,249,159,146, -147,147,211,237,208,216, 13,160, 7, 33, 4, 14, 14, 14, 87,252,253,253,211, 63,250,232, 35,239, 54,109,218,160, 82,165, 74, 72, - 74, 74,106,124,242,228,201,143, 27, 54,108,152,244,240,225,195,242,132,144, 48, 74, 41, 8, 33,123, 40,165, 61, 75,155, 1,106, -181,186,110,247,238,221, 59,172, 91,183, 78,166, 84, 42,241,228,201,147,242, 3, 7, 14,244, 34,132,108,126,126,166,247, 87,153, -171,192,192,234, 43, 70,140, 24, 93,187, 87,175,119, 42, 40,149, 74,121, 66,194,211,132,159,126,248,222, 69, 68, 72,125, 66,200, -232,215, 53, 89,193,193,193,223, 0, 24, 93,174,156,179, 83,118,118, 78, 46,128, 21,225,225,225, 95,191,142,166, 32, 8, 34, 65, - 16, 64, 41, 37, 60,207, 75, 1,136, 8, 33,179, 74, 50, 68, 26,141, 38,172,123,247,238,139,149, 74, 37, 54,111,222,188, 5,192, - 98, 66,200,128,227,199,143, 7, 0, 64,179,102,205, 6, 0, 56,231,236,236,220,128, 16, 76, 16,132,130,103, 37,150,166, 44,189, -136, 46, 93,186, 2,192, 47,222,222,222,103, 50, 50,210,124, 9,193,128,178, 24, 55, 6,131,193, 96,252,135, 13, 22, 0, 40,149, - 74,236,219,183, 15,148,210,103,143, 13, 33,132,128,227, 56, 92,207,175, 3,163, 85,140,252,164,219,232, 21, 44, 65,131, 6, 13, - 94, 24,217,122,222, 11, 20, 55,104, 99,199,142,133,135,199,239, 39, 79, 78, 77, 77,197,233,211,167,223,200,206, 17, 66, 48,115, -230, 76,231,140,140,140,238,171, 87,175,238,224,229,229, 53, 53, 57, 57,249,116, 9,145,171, 30, 69, 3,255,219,183,111, 31,246, -243,207, 63,223,211,233,116,150, 75,151, 46, 89,126,250,233,167,196,214,173, 91,251,244,233,211, 71, 58,108,216, 48,191,247,223, -127,191,246,222,189,123,139,182,237, 65, 8,241,177, 55,146, 69, 8,145, 0,168,218,178,101,203,246, 59,119,238,148,229,229,229, - 33, 46, 46, 14, 74,165, 18, 95,125,245,149,211,240,225,195, 91, 1,216,110,143, 86,173, 90,213, 6, 15, 31, 54,162,246,208,161, -195, 67, 44, 22,179,238,206,157,171, 39, 69,132,144,225, 35, 63,118, 76, 74,142,119,227, 41, 29,140,130,249,135,202,108,174, 66, -195, 66,166, 78,152, 48,129,120,121,122, 35, 38,246,137,243,130, 5, 11,167, 6, 7, 7,195, 30,147,165,209,104,234, 85,172, 88, -241, 27, 15, 15, 15, 47, 74, 41,138,142,111,221,186,117,241,249,231,159,195,100, 50,161, 90,181,106, 85,149, 74,101,248,153, 51, -103,236, 49,215, 74, 15, 15, 15, 12, 27, 54, 12,249,249,249,253, 53, 26, 77, 52, 0,177, 94,255,108, 98,121,207, 26, 53,106,108, -111,221,186,117,245,189,123,247,144,178,238, 55,165, 52,133, 16,178,160, 91,183,174,227, 1,130,183,222,122, 43,227,211, 79, 63, -181,221,191,127,191,213,219,111,191,221,232,241,227,199,111,196,184, 49, 24, 12, 6,227,191, 21,193, 2, 33, 4,199,143, 31,135, -217,252,199, 71,205,185,180,108,128, 47,122,249, 97,240,232,245,216, 26, 21,133, 58,117,234,224,249, 59, 18,159,123, 72,107,138, - 88, 44,250,153,227,184, 97,132, 16,212,175, 95, 63,101,225,194,133, 47,122, 44,138,181,126,253,250, 41, 34,145,200,179,208,216, -253,108,179,241, 41, 47,210,124, 73,131,184, 80, 38,147,127, 9, 0, 26,111, 77,202,190,125,251,172,189,123,247,198,130, 5, 11, -100, 19, 39, 78,156,169,209,104,250,106,181,218,132,151,165,179, 56, 21, 42, 84, 64,100,100, 36,166, 76,153,146,148,156,156,252, - 83, 74, 74,202,253, 77,155, 54, 85,174, 92,185,242,199, 63,254,248, 99,128,151,151,215,171, 26,231,187, 47, 57,174,237, 68, 34, -209,120,142,227,130,107,213,170,117,127,216,176, 97,183,179,178,178,210,226,227,227,159, 61, 7, 79, 44, 22, 67, 42,149, 82,123, - 53, 69, 4,205,187,247,232,225,105, 50, 25,243,141, 70,125,246,195, 7,215, 99,227,227,239,101, 86,174, 92,219,253,173, 54,141, -221,162,162,158, 52,127,153,193,122, 94,243, 69,145, 42, 0,163, 39, 76,152, 64,102,205,156,141,129,131,250, 99,227,186, 45,248, -232,227, 33, 24, 53,226,211,209, 0,190,182, 35,157,221,214,174, 93,235,229,230,230, 6,158,231, 33, 8,194,179,255, 73, 73, 73, -208,233,116, 80,169, 84, 48, 26,141, 56,123,246,236, 11, 13,121,113, 77,173, 86,123,234,151, 95,126, 57, 21, 16, 16,208,122,226, -196,137,144, 72, 36, 95,229,230,230, 98,193,130, 5, 80, 42,149,152, 57,115,166,119,221,186,117,193,113,156,213,102,179,165,136, - 56,206,147,130, 82, 66,176, 68, 16,168, 93,101,169, 8, 31, 31,159, 35,169,169,105,205, 90,183,110,141,236,236,108,203,180,105, -211, 80,191,126,125,212,168, 81,163, 84,249,254, 58, 48, 77,166,201, 52,153,230,127, 65,243, 95,105,176, 8, 33,148,210,130,110, -148,231,222, 99,199,142, 29, 47,220,112,208,226, 8,136, 69, 5,237,223,143, 63,254,136,204,204, 76, 8,130,240,202,104,129,205, -198, 15,247,240,240,208, 77,158, 60,185, 93,245,234,213,173, 67,135, 14,189,254,244,233,211,225,197,215,169, 88,177,226,143, 63, -255,252, 51, 30, 61,122,148, 54,123,246,236, 99,169,169,169, 95,150, 50,211, 39, 16, 66,150, 0, 64,162, 86,155,190,127,255,254, -208,243,231,207, 79, 92,188,120,177,247,168, 81,163,100,159,126,250,233,112, 0,147, 95,178,109, 34, 33,100,157,143,143,207,160, -102,205,154,161,103,207,158,233,205,154, 53,179, 92,189,122,213,251,242,229,203,223,124,255,253,247,194,251,239,191,207,181,104, -209, 2,169,169,169,188,175,175,111, 90, 88, 88,152,123,116,116, 52, 0,172, 43, 41,122, 69, 8,121,203,211,211,115,207,142, 29, - 59,108, 13, 27, 54, 84, 70, 70, 70, 6,142, 29, 59,214, 75,171,213, 30,170, 81,163, 70,186, 78,167,131,205,102,131, 78,167,131, -157, 15, 80, 46,212,133,139, 66, 33,151, 94,190,116,112,111,244,227, 91,201,113,241,183,179, 8,161, 36, 33, 33, 60,179, 86,173, -214,174,160,112, 41,109,164,202,211,211, 11, 49, 49,209,206, 11, 23, 46,156,250, 52,238, 41,241,242,244,198,192, 65,253, 97, 52, - 26,208,111, 64,111,200,229, 50, 82,174,156,179,147, 61,186, 28,199,237,250,224,131, 15, 90,123,120,120,168, 0,160, 40, 66,229, -239,239,143,145, 35, 71, 98,203,150, 45,136,138,138, 2, 0,171,175,143, 79, 10,199,113,158, 0,165, 98,177,104,189,197, 98, 75, -121, 65, 62, 81, 95, 95,223,105, 95,125,245, 85,197,159,126,250,169,202,152, 49, 99,126,103,218,146,147,147,177,111,223, 62, 92, -184,112,193,242,240,225,195,141, 78,206,206,119, 13, 6,195, 21,147,201,244,196,222, 99,234,235,235,171,224,121,126, 88, 64, 64, - 64,215,254,253,251, 91,164, 82, 41,244,122, 61,244,122, 61,238,221,187,103,233,216,177, 99, 70,183,110, 93,221, 14, 28, 56, 64, - 41,197,124, 22,189, 98, 48, 24,140,178,241, 50, 15,242,175,137, 96,189,108,167,214,174, 93, 11, 74, 41, 68, 34, 17, 56,142, 3, - 33, 4, 34,145, 8,121, 90, 27, 6,141,222, 8,169,136,226,240,225,195,168, 87,175,158, 93, 63, 40, 8,194,226, 67,135, 14, 53, -107,218,180,169,184,125,251,246, 13, 43, 84,168, 16, 28, 31, 31, 31, 94, 24, 49, 10,238,208,161, 67,195,242,229,203, 99,201,146, - 37, 70, 65, 16, 22,151,209, 89, 23,111,236, 46,249,250,250, 78,253,237,183,223,214, 12, 29, 58, 20,158,158,158,245, 75,216,118, -112,251,246,237, 27,140, 31, 63, 30, 83,166, 76,177,172, 90,181,202, 54,108,216, 48,113,171, 86,173,176, 97,195, 6,238,225,195, -135, 88,185,114,165,176,107,215,174, 36,142,227,146, 59,117,234, 84,241,212,169, 83, 81,103,206,156, 25, 92, 82,186, 68, 34,209, -151,155, 55,111,182, 54,109,218,212,145, 82,138, 58,117,234, 56,126,249,229,151,150, 69,139, 22, 85,117,115,115, 75, 79, 76, 76, - 68,118,118, 54, 82, 83, 83, 45, 9, 9, 9,143, 75, 81, 60,211, 18, 18, 98,146,242,243, 82, 13, 61, 58,132, 78, 73,139, 77,134, -123,165, 30,248,237,240,190,153,113, 79, 31, 10,132, 35,105,118, 10,253, 33, 82,213,255,189,126,100,252, 23, 19,241,240,113, 36, - 54,174,219,130,126, 3,122, 99,235,166,237,104,219,190, 53, 10, 35, 92, 37,146,144,144,112, 15, 64,139,226,203, 42, 85,170, 36, - 7,112,193,106,181, 34, 58, 58, 26,145,145,145, 77, 99, 99, 99, 77,133,101,209, 7, 0, 44, 22, 91,226, 43, 52,141,229,203,151, - 31,243,225,135, 31,142,243,242,242,170, 11, 0, 85,171, 86,117, 30, 59,118, 44, 22, 44, 88,128,123,247,238, 77,148, 74,165, 23, - 18, 18, 18, 76,165, 45, 63, 30, 30, 30, 65,106,181,122,210,168, 81,163, 60,131,130,130, 96, 52, 22, 60,131,216,193,193, 1,122, -189, 30, 78, 78, 78,104,210,164,201,253,111,191,253,214, 66, 41, 6, 81, 74,147, 89, 21,201, 96, 48, 24,111,198,100,253,171, 34, - 88,133,198,130, 16, 66,232,115, 59, 92, 20,129,120,102,174,138,222,247, 14,145, 33,167, 90, 85,136, 10,151,219,108,246, 61,115, - 52, 61, 61, 61, 89,163,209,236,188,121,243,102,223, 62,125,250,224,212,169, 83,159, 2,120, 31, 0,164, 82,233,167,125,250,244, -193,205,155, 55, 17, 17, 17,177, 51, 61, 61,253,141, 52, 92, 86,171, 85,103,181, 22,244, 70, 42, 20, 10,169, 29, 70,200, 34,147, -201, 0, 0,145,145,145,157, 70,141, 26,245, 78,199,142, 29, 63,233,210,165, 11,246,238,221,139,245,235,215, 79, 7,112,172, 69, -139, 22,219,197, 98,177, 69, 34,145,232,237, 52,151, 97, 97, 97, 97,170,162,174,212,152,152, 24, 56, 58, 58, 58,198,197,197,121, - 25, 12, 6, 24,141, 70,228,228,228,224,198,141, 27, 58, 0, 9,246,238,159, 77,160,151,126,250,225, 59,215,143, 62,238,235,115, -238,250,181,165,219,118,230, 13,105, 18,186,114, 65, 69,191,122, 30,171, 86,159, 82,243, 2, 61, 97,143, 78,185,114,206, 78,207, - 71,170,156, 28,157,208,180,105, 83, 28, 58,112, 8,131,135,124, 0,185, 92,134,238,111,119,193,134,117,155,128,130,238,195,210, -156, 64,207,238, 14, 52,155,205,131,186,118,237, 10, 65, 16,208,169, 83, 39,220,188,121,115, 16,128,159,138,190,183,183, 44, 1, -248, 2, 0, 52, 26,141,155,179,179,243, 17,158,231, 65, 41,133,151,151,215,217,240,240,112,171,143,143,207,251,114,185,188,169, - 78,167,251, 53, 37, 37,229, 84, 73,154,222,222,222,205,106,212,168, 49, 99,225,194,249,196,211,211, 27, 60,111,131,213,106, 65, - 90, 90, 6,242,242,242, 16, 24, 24,136,138, 21, 43, 98,238,220,185, 0,176,155,153, 43, 6,131,193,120,125, 94,228, 65,254, 53, - 6,235,249, 29, 44,110,174,138,198, 99, 21, 55, 90, 34,142, 67,121, 55,151,103,203,120,158, 7,138,141,153,121, 21, 28,199,173, -217,184,113, 99,207,197,139, 23,203,186,117,235, 86,211,203,203,171, 5, 0,244,235,215,175,166,147,147, 19, 54,110,220,104,230, - 56,110,205, 27,114,197,156, 70,163, 25,220,188,121,115,164,164,164, 32, 54, 54,246, 82,105,182, 79, 76, 76,204, 5,176, 81,167, -211,125, 34,145, 72,138,162, 25, 39, 0,148,250, 89,106, 28,199, 93, 57,113,226, 68, 88,215,174, 93,157,226,226,226,160,213,106, -177,115,231,206, 20, 55, 55,183,100, 65, 16, 80,190,124,121,120,120,120, 64, 16, 4,213,131, 7, 15,188, 1, 68,217,163,123,255, -254,227,181, 18, 17,169, 39, 87,152,148,109, 90,213, 85,184,148, 43,199,121,184, 11,206,103,206,220,118, 76, 78,206, 78,185,119, -239,177, 93,199, 50, 59, 59, 39, 55, 38, 54,218,185,120,164,170,117,155, 22,184,112,225, 2,148, 74, 37,142, 31, 63, 1,103,103, - 39,248,248,248,226, 73, 84, 52, 0,164,132,132,132, 80, 66,136,112,245,234, 85, 81, 9,249, 80,108,250, 12,209,143, 29, 58,116, -104,208,184,113, 99,196,199,199,163, 81,163, 70,168, 83,167,206, 7,229,203,151,223,151,158,158,158, 84,138,188,245, 6,192, 85, -175, 94, 61,215,193,193,225,135, 33, 67,134,192,102,179,161,109,219,182, 88,181,106,213, 38,111,111,239, 59,157, 58,117,122,187, - 79,159, 62, 24, 63,126,188, 15,128, 83,118,104,190,223,183,111, 95,162, 84,170, 97,179,217, 32,151, 75, 33,151,203,225,224,224, - 4, 87, 87, 87,196,197,197,225,173,183,222, 18,162,163,163,247,168, 84,170,181,172, 90,100, 48, 24, 12,102,178, 94,216,230,151, -208,216,128,231,121,240, 60,143,139, 89,129, 56,150, 18,132,109,151,141,176, 90,173,176,217,108,176,217,108,224,121, 30,132, 16, - 88,173, 86,216,251,216,157,132,132,132,172,168,168,168,205, 23, 47, 94, 68,207,158, 61,225,226,226, 50,202,197,197,101, 84,207, -158, 61,113,241,226, 69, 68, 69, 69,109, 78, 72, 72,200, 42,165,145,114, 39,132,252,110,212,185,135,135, 71,149,138, 21, 43, 46, - 29, 49, 98, 68,199,160,160, 32, 28, 59,118, 12,130, 32, 28,179, 87,179,208, 52,122, 2,144, 60,183,111, 50, 0,174,130, 32, 72, - 74,147, 70,158,231, 23, 12, 26, 52, 72,178,120,241,226,180, 7, 15, 30, 24, 87,174, 92,169,221,182,109,155, 57, 32, 32,224,137, -167,167, 39,130,130,130,224,231,231,135,234,213,171,203,188,189,189,107,148,162, 80,242, 86,158,255,254,254,253,204,186,183,238, -164,214, 17,139, 45,105,187,247,221, 10, 60,114,252,126, 64,158,206,182,162, 20, 83, 52,172, 88,176, 96, 1,237,219,191, 55,156, -157,156,209,186,109, 11,236,222,181, 23, 74,165, 18,245,234,213, 67, 23, 15, 29,118,186,238,194,187, 14,209,144, 74,165, 24, 54, -108,216,247,103,207,158, 5,207,243, 37,149,163,103, 83,116, 8, 2,229, 40, 21, 70,188,253,246,219,202,164,164, 36,140, 25, 51, - 6, 73, 73, 73, 24, 52,104,144, 68, 38,147, 13, 43, 69,126,207, 38, 4, 9, 4,136, 79,210,106, 47, 79,157, 58,181,178,151,151, - 23, 78,156, 56,129,144,144, 16,204,155, 55,175,202, 71, 31,125,244,118,191,126,253,112,245,234, 85,100,102,102, 94, 44, 73,179, - 85,171, 86, 98,145, 72, 84,213,199,199, 7,177,177,177,136,139,139, 67, 78, 78, 30, 0,130,242,229,203, 99,233,210,165,104,209, -162,197,173,216,216,216, 97, 90,173,118, 69, 84, 84,148,153, 85,137, 12, 6,131,193,120,105, 4,171,120,191,103,241,247,132, 16, - 28, 58,116, 8, 0,160,110,220, 16, 19,123, 87,194,192, 17,235,177, 53, 58, 18,114,185,252,127, 34, 98, 49,134, 13, 27, 86,170, - 31,118,117,117,221,176,101,203,150,222, 77,154, 52, 81,191,245,214, 91,213, 0, 64,161, 80, 88,183,108,217,162,115,117,117,221, - 80, 74,115, 53,157, 16, 76, 5, 5, 39,151,201,142,184,184,186, 30,117,114,114, 10,237,216,177, 99,181,142, 29, 59,162,106,213, -170,216,185,115, 39,126,251,237,183, 99,201,201,201,231,237,213,173, 82,165, 10, 52, 26,205, 96,158,231,127, 6, 64,139, 69,232, -172, 0,218,249,250,250, 42, 74,233,206, 79, 18, 66,122, 77,152, 48, 97, 44,165,180,129,135,135, 71,108,104,104,232,221,102,205, -154,165, 59, 59, 59, 67, 44, 22, 35, 45, 45, 13,249,249,249, 16, 4,193,181, 52,218,217,217,134,149,115,230,140,173,219,166, 77, - 27,228,230,230,226,192,129, 3,149,146, 82,214, 33, 54, 54,118, 61,128, 38,246,104,132,135,135,127, 29, 28, 28,140,219,183,238, -124,213,181,107, 23,236,223,127, 0, 74,165, 18,106,181, 26, 85,171, 86,197,141,220, 92,140,146, 4,163,150,119, 45,180,111,159, -134,186,117,235,226,254,253,251,101,138, 43,122,123,123, 99,211,166, 77,200,207,207,255,102,203,150, 45, 95,143, 24, 49, 2,213, -171, 87,111,163,209,104,230,106,181, 90, 67, 9,249,237,250,187, 57,213, 8,169, 37,147,201,238, 45, 95,190,220,124,238,220,185, - 29,135, 14, 29,234, 58,100,200, 16, 69,179,102,205,112,225,194, 5,172, 90,181,234,146,147,147,211,130,146, 82,117,230,204, 25, - 65,163,209, 60, 27,103,168,215,235, 17, 29, 29,141, 38, 77,154, 96,205,154, 53, 88,186,116,233,134,164,164, 36, 22,181, 98, 48, - 24,140, 55, 28,185,122,209,251,127,133,193,122, 21, 91,183,110, 5, 0,124,180,252, 33,204,150,130,113, 86, 63,252,240, 3,138, -166, 40, 40,234, 74, 60,123,246,108,169, 14, 76, 68, 68,132,206,199,199,103,205,232,209,163,231, 93,187,118,213, 19, 0,174, 95, -191,158,162,213,106, 39, 36, 38, 38,234, 74, 97,174, 92, 8,193, 20, 65,160, 34, 0, 80, 42, 21, 29,199,141, 27,231,211,184,113, - 99,139, 84, 42,197,211,167, 79, 49,127,254,124,156, 63,127,126, 99,114,114,242,114,106, 71,152, 45, 54, 54,246, 82,124,124,124, -227, 81,163, 70,161, 69,139, 22, 61, 86,174, 92,217,169,200, 92, 81, 74, 81,191,126,253,173,157, 59,119,246,146,203,229, 98,179, -217,204, 63,120,240, 32,188, 20, 5,233, 8,128, 35,132, 16,105,114,114,114,213,156,156,156,118,130, 32, 56,165,164,164, 32, 46, - 46, 14,233,233,233,200,203,203,131,205,102,203, 40, 77, 70,106,181,218,166, 3, 7, 14,164, 81, 81, 81,200,206,206,198,154, 53, -107,138,150, 55, 41,141, 78,161,201,250, 42, 52, 52, 12,247,238, 69, 64,163,209,160,114,229,202,240,241,241,193,195,135, 15,225, -232,232, 8,169, 84,138,227,199,143, 35, 62, 62, 30,213,170, 85,179,103,159, 83, 8, 33,243, 57,142,140, 7, 64, 66, 66, 66, 83, - 29, 29, 29,173,151, 47, 95,126,164,213,106,247,249,251,251,247, 25, 52,104, 80,245, 70,141, 26, 73, 31, 61,122,212, 10,192,193, -210,249, 53, 32, 51, 51, 19,231,206,157, 59,165,213,106,231,187,187,187,111,152, 62,125,250, 4, 47, 47,175, 6, 73, 73, 73, 23, - 60, 60, 60,166,133,135,135, 91,237, 72,167,160,209,104,158, 30, 61,122,180, 98,239,222,189, 33,149, 74,145,149,149, 5, 71, 71, - 71, 44, 92,184,144, 90, 44,150,157,172, 42,100, 48, 24, 12,198, 27, 49, 88,187,118,237, 2,199,113, 48,167, 89, 48, 98,252, 22, -168,228, 34,156, 62,125, 26,174,174,174,191, 27,151, 85,244,122,206,252,188,242,105,219, 89, 89, 89,103,146,146,180, 30,130, 80, -224,121, 56,142,120,200,229,138, 51, 37, 24,170, 63,104,146,231,198,126,153, 76, 38, 28, 59,118, 12,103,206,156,177, 68, 69, 69, -157,164,148,238, 78, 74, 74,186,105,175,102,118,118,246,204,161, 67,135, 78,237,216,177, 99,227,129, 3, 7, 98,197,138, 21,210, -251,247,239, 23,153, 43,212,173, 91,215,215,106,181,210,187,119,239,230,237,219,183,239,160,209,104, 92,103, 79, 58,159,107,204, - 45, 0, 30, 56, 56, 56,192,102,179,181,106,210,164,137,155,205,102, 67, 70, 70, 6, 46, 94,188, 24,147,145,145,113,174, 52,154, - 26,141,230,210,180,105,211,208,171, 87, 47,164,165,165,161, 98,197,138, 88,183,110, 29, 52, 26,205, 37,173, 86,219,184, 52,199, - 19, 0,142, 31, 63,142,129, 3, 7,194, 98,177,192,102,179, 65,175,215, 35, 52, 52, 20, 0, 16, 31, 31, 15,139,197,130, 59,119, -238,140,140,136,136,248, 94, 44, 22, 11, 37,105, 82, 74, 39, 17, 66,190,247,242,242,154, 61,123,246,236,154, 87,174, 92,129,201, -100, 58, 88,152, 95, 7,175, 95,191, 94, 61, 56, 56, 24,155, 54,109,234,252, 34,131, 85, 92,147, 82,154, 89,104,216, 38,128,130, - 4,214, 14, 76,171, 94,189,186, 69, 34,145,148, 7,128,180,180,180, 20, 0,159,219, 97,206,255,144, 78,155,205, 54, 97,215,174, - 93, 67, 47, 93,186,212,114,236,216,177,164, 77,155, 54, 0, 0,157, 78,199,167,167,167,231,151, 69,243,117, 97,154, 76,147,105, - 50,205,255,130,230,127,202, 96,229,228,228, 32, 52, 52, 20, 86,171, 21,181,106, 89,145,155, 91, 25, 86,171, 21, 86,171, 21, 50, -153, 12,130, 32, 60, 27,135,197,113,220,179,249,141,236,197,104, 52, 90,158,159,252,221,104, 52, 90, 74, 25, 90,204, 34,132,204, -226, 56, 50, 21, 20, 68, 38,151, 94,254,225,135, 31, 86,163,224, 46,188,139, 37,117, 55,189,136,148,148,148, 52, 0,159, 86,168, - 80,161,225,169, 83,167, 62,239,213,171, 87,181,110,221,186, 33, 62, 62, 30,130, 32, 32, 42, 42,202,186,119,239,222, 59,217,217, -217,223, 83, 74,239,189, 78, 6,228,231,231, 63, 32,132,104, 31, 62,124,216, 68, 38,147, 41,121,158, 79, 77, 79, 79,191, 71, 41, -205, 43,101, 4,171,177, 70,163,161, 51,102,204,248,195,242, 50, 36,107,228,217,179,103,191,127,110,210,207,103, 20,230,245,200, -240,240,240, 31, 0,252, 80,138,188, 74,108,218,180,169,179, 66,161,192,217,179,103, 5, 74,233,209,194,229, 71,207,159, 63, 63, -166,126,253,250,156,187,187,123, 45, 59,181, 38, 19, 66,190,115,116,116,244,169, 85, 43,240, 7, 74, 41,220,221,221, 43,190,238, - 9,145,154,154,154, 10,224, 27,141, 70,179,125,252,248,241,195, 67, 67, 67,131, 10,143,169,136, 85, 23, 12, 6,131,193,120, 19, - 6, 43,122,216,176, 97,150, 98,110,245,121,247,250,135,207,148,210,132,210,252,120, 97,215,209,188,194,174, 35, 80,138, 5,101, -153,176,145, 82, 58,141, 16,242, 61, 0,145,209,104,126, 99,183,205,199,199,199, 95, 39,132,188,183,110,221,186, 14,219,183,111, -159,212,175, 95, 63,229,170, 85,171, 44,169,169,169,115, 0, 28,164,148, 10,111,226,119, 40,165,185, 0, 14,189,174,142, 86,171, - 37,132,144,233, 0,166, 1,152, 65, 41,157, 94, 22,157,210, 26,167,210, 16, 23, 23,183,105,228,200,145,131, 83, 83, 83,183,107, -181,218, 76, 0, 72, 76, 76,204,244,241,241,153, 63,121,242,228,247,211,210,210, 54,149,226,184, 37, 17, 66, 82,163,162,162,114, - 51, 51, 51,157,236,157, 42,196,206, 99,249, 16,192,103, 26,141,166,113,135, 14, 29, 6, 81, 74, 83, 89,117,193, 96, 48, 24,140, -215, 54, 88,167, 78,157,106,242, 87, 36,160,176,235,104, 89,145,225,122, 13,157,180, 63, 41,125, 20,192, 97, 66,200,177,165, 75, -151, 6,234,245,250, 24, 74,105,254, 63, 53, 67, 11, 77,213,244,127,106,250, 18, 19, 19,183,227, 5,207, 88, 76, 76, 76,220, 9, - 96,103, 25,246,151,247,245,245,157,244,249,231,159,119,161,148,238,126,211,233,213,106,181,151, 0, 92, 98, 85, 5,131,193, 96, -252,237,132, 0,112, 47,124, 95,212,230,187, 63,247,222,140,130, 59,253,139, 40,250,156, 6,224, 90, 49,141,226,203, 75,218, 22, - 0,210, 1,220, 46, 92,102, 23,220, 63,196, 20,164,252,211, 31, 53, 66, 41,229,117, 58,221,157,127,178,185,250,175,146,144,144, -112, 45, 49, 49,241,107,173, 86,123,139, 29, 13, 6,131,193,248,247,154, 43, 66,200,126, 66,200,254, 66, 67,228,254,130,247,178, -162,117,138,127, 46,102,204,220, 95,176,252,149,219, 18, 66,246, 79,154, 52,169, 53,236,188, 35,255, 31,101,176, 24, 12, 6,131, -193, 96, 48, 94,129, 59, 33,100, 63,165,180, 43,165,180,107,161, 1,122, 33,148,210,174,197,255,191,138, 23,233, 20,253, 70,241, -207,115,231,206,157, 13, 64, 89,154, 4,139, 9, 33, 65, 47, 73,160,221,119, 7,188, 76,227, 85,223,149,164,207, 52,153, 38,211, -100,154, 76,147,105, 50,205,127,159,230,155,218,254, 77,240, 34,179, 86,100,228,138,127,158, 56,113,226,100,148,162,123,176, 72, -252, 79,123, 1, 8, 98,154, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,205, 87,151, 2,203, 66,187, 20,127,255,162,101,175, -122, 95,210,182,118,172,107,119,154,197, 96, 48, 24, 12, 6,131,193,248,103,147, 86, 60,218, 84, 24, 97,226, 39, 78,156, 56,185, -104, 89, 97,148,201, 4, 64,254,130,104, 89,241,237, 74,138,172,217,189,238,171, 96, 6,139,241,183, 17, 88,149,116,160, 20,147, -120, 1, 34, 66, 48, 55, 50,134, 30, 96, 71,133,193, 96, 48, 24, 47,224, 26,128,144, 98,166, 39, 13,192,157, 57,115,230,100,205, -153, 51,167,248,178, 91, 0,234, 21,174,151,246, 2,163,100, 46,252,108,126,193, 58,102,123,214,253, 83, 12, 86,237, 10,100, 56, - 10,166, 0,160, 0,102,220,139,167, 63,150,106,251,106,164,173, 66, 44, 90, 5, 0, 70, 27,255,209,189,199,244,248,235,172,247, -146,109,219, 73, 57,110,163, 64, 33,177,242,194, 18, 80,108, 3, 16, 21, 17, 77,203,252,132,110, 95, 95,226,194, 81,116,149,138, -197,161, 22,155,237,170, 64,176, 63, 33,129,102,189,169, 82, 83,222,153,212,117,114, 80,174,147, 72, 56, 7,169,132,123,148,146, -150,247, 77,106, 54,189, 82, 26,141,222,129, 68,202,249,202,151, 59, 40,249, 14, 98,142,119,225, 5, 81,118,190, 65,116,132, 79, - 48,141,222, 30, 65, 45,255,196,179, 69,160,152,252, 96,255,240,102, 0, 80,185,221,143,211, 8, 33,135, 74, 59,183, 88, 96, 21, - 82, 27,192, 72, 59, 86,253, 62, 34,186,108,147,194, 6, 86, 33,171, 1,212, 0,193, 14,155, 5, 91, 31,198,179, 57,177, 24, 12, - 6,227,111, 50, 89,207,115,213,206,245,254,114, 74, 27,193,154,121,239, 81,188, 11, 4, 11,106, 7, 84,253, 22, 64,169, 12,150, - 66, 44, 90,123,237,118,178, 6,188, 17,139,167,247, 61, 54,251,243, 70,224, 5, 27, 4,222, 6,158, 47,248, 47, 8, 60,186, 52, -171,136, 57, 63, 94, 3,108,121,104,216,160,198, 90, 0, 62,246,254,134,148,227, 54,134, 95, 56,234, 78,108, 57,216,186,102,230, - 55, 79,147, 13,223,156,188,166,141, 13,172, 66, 62,143,136,166,123,237,213,169, 80,129,120,115, 64,207, 10, 26,247,190,147, 70, -244,110,220,161,117,115,174,162, 95,101, 60,141,139, 25,126,228,212, 57,161,121, 35,143, 75,241,218,180, 95, 5, 96,119,124, 60, - 77, 42,107, 6, 84,240,148,125,212,182, 77,155,165, 63,173, 92,167,114,112, 42,143,220,204,167,149, 7, 13,124,183,158,167, 11, -105,151,146,101,159, 33,232, 29, 72,164, 14, 85,165,183,218,119, 27, 90,190, 77,231, 81, 34,185,210,153,166, 38,221, 35,251,182, -207,234,124,247,230,249,102,189, 3, 73,221,215, 53, 89, 33, 33, 33,115, 4, 65, 24,238,236,236,236,152,147,147,147, 35, 8,194, -146,155, 55,111,126, 91, 10,147, 34, 7,224, 92,124, 25,207,227,217,195,178,173, 54,168, 42,107,160, 9,172, 66,138,158, 25,152, - 23, 17, 77,237,153,133,127,228,173,107,167,134,218,178,175, 1,130, 5,148, 90, 1,193, 2, 80, 43,168, 96, 1, 4, 43, 40,181, - 32,236,237,181, 0, 48,172,140,187,223,254,248,137,107,222,169, 41, 73, 33,139,151,204,154, 20, 88,153, 28,162, 28, 54, 62,136, -198,153, 55, 53,217, 44,131,193,248,123,105,211,166,205,198,156,156,156, 89,225,225,225, 15,223,148,166,167,167,103,160, 72, 36, -138, 41,203, 19, 69, 94,197,144, 33, 67,166,155,205,230,241,130, 32, 72, 56,142,179,202,100,178,249,171, 87,175,158,254, 58,154, - 31,125,244, 81, 37,163,209,232,203,243, 60, 17,137, 68, 84,161, 80, 36,172, 90,181, 42,150,149,140,191,206, 96, 41, 64, 5,224, - 66, 79,160,148,183, 43, 2, 0, 40,228,160, 54, 64,255, 16, 3,123,133,162,188,139, 43,192,155, 0,193, 12, 8,166,130, 23,111, - 66,122,102, 10, 96,203, 3,210, 14,129, 23,168,172,212,191, 99,205, 1, 82,183,163, 67, 99, 47,148,115,116,192,103,253, 3, 43, -173,220,245,112, 79, 80, 85,110,206,221, 39,194,228, 18, 77,143, 47,249, 97,194,176,158,195,218,183,235, 66, 42, 85, 13, 66,102, -122, 2,174, 94,189,148,181,248,231, 29, 17,237, 91, 53, 12,124,167, 87, 95,151,161,195,190,108, 26,251,228,110,211, 51,167,246, -124,231,231, 75, 22,197, 37,208, 47, 74, 25,181, 82, 1,232,208, 56,172,225,162, 77,219, 14,168, 56,221,109, 32,126, 11,156,157, - 27,225,167,239,230,123,118,233,246,246, 15, 0,154,217,163, 37,242,149,175,104,223,109,168,219, 59,131, 22,150,179, 89,244,102, -237,227,131,145, 34, 66, 72,159,126, 95, 40,242, 51, 19, 28,239,155,227, 87, 0, 24, 90,214, 66, 82,191,126,253,197, 77,155, 54, - 25, 51,126,194,151,196,195,221, 11,209, 49, 81,229,230,205,155, 63, 35, 36, 36,196,120,237,218,181,133,118,152,171,254,237, 91, - 54, 92, 89,185,146,175,138, 82, 1, 69,175,124,157, 9, 35,230,132, 35, 43,199,128,206,173,235, 7, 84,170,224, 28,207,129,130, - 82, 1,177,241,169,124, 96, 21,242,118, 68, 52,221, 87, 82,100,170, 94, 72,235,102,183,195, 47,213,180,164,238, 71, 72,231, 57, - 15, 0,156, 47,246,125,179, 27,103,214,214, 4,214,150,105,223, 9, 33,164, 86,101,240, 79, 47,207, 67,133,250, 31,137, 86,174, - 61,226,158,147,153,248,193,111,219,126,124,247,135,159,127,218,244, 26,166,141,193, 96,252,131,160,148,118, 46, 95,190,124,155, -224,224,224, 86,111,202,100, 73, 36, 18, 37,207,243, 1, 26,141, 38,242, 77,153,172,224,224, 96,183,224,224,224,105,243,231,207, -135,163,163, 35,242,242,242,196, 83,166, 76,153, 22, 28, 28,252, 93,120,120,120, 70, 89, 52,195,194,194,164,245,234,213,171,176, -104,209, 34, 56, 57, 57, 33, 55, 55,151, 76,156, 56,177, 66, 88, 88,152,246,202,149, 43, 22, 86, 58,254, 26,131,245, 32,249,220, -152, 6,230, 76, 61, 0, 60,176,163,192,254,238, 86, 75,163,141, 31,255,253,183, 61, 87,135,213,115, 70,114,186, 25, 71,206,105, - 33, 8, 60, 4,158, 7, 47,240,197, 34, 88,238,104,142,225, 88,190,237, 17,172,130, 48,254, 85,154,207, 99, 17,132, 1, 13, 90, -246,217, 42, 80, 42, 83, 42,200,211,170, 62, 46,149,199, 13, 12, 82,124,214, 47, 16, 70,147,109, 98, 96, 21,114, 42, 34,154,158, -120,149,102, 96,101,151, 79, 70,124,252, 17, 17, 84,181,113,253,242, 65,124, 54,126,234,227,148,244,204,111,180,201,184,182,255, -248,217,202,126, 26,183,153, 75,102, 77, 9,174, 81,175, 35, 58,114, 6,156, 61,119,254, 35, 0, 95,216,147,206,242,206,164,158, -131, 90,241,105, 5, 95,223, 94,147, 39, 79, 18,119,235,209, 79,193,233, 35,128,164,173,224,205, 58, 8,121,177, 40,231,212, 4, -128,224, 83,210,241, 44,194, 81,201,119,104,217,254, 67,142,183,228,155,172,198, 76,163, 33,229,114,158, 41, 55,202,168,114,169, -234,208,188, 73,115, 65,155,184,161,163,189,121,244,162, 72, 21,199,113, 31,141,251, 98, 28,153, 61,107, 46,250,244,127, 7,219, -182,236,196,135, 67, 6,227,243,207,198, 77, 0,176,176, 36, 77,137, 68, 60,120,193,188,121, 42,142, 3, 32,216, 0,250,191,151, - 54, 57, 21, 58,157, 30,229, 28,100,112,119, 85, 62, 91,110,179,154, 68,193,157,190, 28, 5, 96,223,171,246, 61, 34,154,222, 11, -172, 66,206,131,218,106, 82,222, 0, 0,231, 35,162,233,176, 98,230,174,118,131,150,131, 71, 2,248,222,222,227,249,187,178, 80, - 9, 93, 67,107, 57,168, 85,214,251, 72, 56,243, 41,162,120, 37,245,168,243, 33,250,189, 55, 82,245,243,202,149,221, 8, 33,195, - 11,103,251,183, 91,179, 12, 21, 63,211,100,154,255,239, 53,123,247,238, 45, 2,128,237,219,183,243,255,196,116, 74, 36, 18,203, -143, 63,254,232, 57,124,248,240,211,246,154,172,146, 52,121,158,231, 9, 33,145,148, 82,187, 77,150, 29,251, 62,213,217,217, 25, - 10,133, 2, 18,137, 4, 10,133, 2,206,206,206,224, 56,110, 42,128, 49,101,209,180,217,108, 21,157,156,156, 32, 22, 23, 88, 2, -177, 88, 12, 39, 39, 39, 8,130, 80, 17, 64,212, 95,149, 71,255, 90,131, 69, 8,161,148, 82, 82,194,250, 79,188, 28, 37, 13, 96, -181, 2,192,147,210,254,216,189, 40,186,166, 94,117,113,243, 30, 29, 62,251,160, 90, 37, 14,243,127,185,126,230,220, 13, 93,171, -226,235, 52,174, 35, 59,181,120, 92,163, 86, 89,185,102,236, 59,157,184,254, 94, 20, 45, 85,232,161,112,188,150, 91,177, 6,214, -125,240,244, 51,235, 55,205,108,221, 97, 76,255,218,100,247,233,216,201, 0, 78,188, 74,195, 65, 37, 21,145,228,157,200,226,111, - 35, 44,180, 27,174, 92,141,174,118,235,242,238, 77, 91,126,221,200, 15,234,215, 75, 84,189,193,187,208,103,220, 71,220,197,217, -200,123,122, 28, 78, 42,177,212,206,168, 85,131,144,144,144,115,191,172, 90,163,240,242,169, 78,136, 53, 29,200, 59, 3, 91,242, - 81,152,117,233, 48, 25,243, 96, 17, 28,144,151,116, 28, 50, 9,177,251, 10,138,227,248,114, 10,165,131, 45,225,206,170,251,198, -204,123, 6, 91,254, 35,171,148,112, 50,228,223, 23,188,221, 27,130, 16,222,185,180,145, 42,247,242,158,136,142,137,114,158, 63, -127,193,140,228,164,100,226,163,241, 69,223,247,222,133,217,108, 66,159,126,189,160, 86,171,136,131,131,131,171, 93, 1, 69,171, -109,197,231, 95,140,107, 85,169,130,135,136, 82, 10, 65, 40,136, 96,213,171, 85, 5,111,181,108,132, 99,119,175, 98,247,189,168, -194,229, 5, 17,172,184,132,116,157,205, 38,172,179,187,242, 20,108, 0,111,120,161, 1, 43, 75,148, 41, 48,144,168,168, 17, 95, - 53, 10,116, 28, 50,105,160,159,163,131,156,192,104,226, 97, 48, 89,144,127,255, 59,184,251,214,133, 74, 37, 39, 13, 26, 24,196, - 0,172,172, 42, 97, 48,254, 72,131, 6, 13,194, 28, 28, 28,190,164,148,182, 54,155,205, 78,130, 32,160, 89,179,102,185, 34,145, -232, 84,126,126,254,130, 27, 55,110, 92, 41,163,116, 81, 91, 69,223,100,122,253,252,252, 80, 90,147, 85, 18, 90,173,214,160,209, -104, 74,101,178, 94, 16,181,122, 10,192,187,208,216, 8, 58,157, 14,203,151, 47, 47,110,228, 64, 41, 29,222,176, 97,195,145, 28, -199, 37, 93,189,122,181,162, 29,154,141, 0, 72, 11, 53,105, 94, 94, 30, 86,172, 88, 1, 74, 41, 8, 33,176, 90,173, 16, 4,193, - 43, 56, 56,216,155,227, 56,203,181,107,215, 46,255,153,101,197, 78, 15,242,255,207, 96, 21,237,216, 95,177,131, 86, 27, 63,237, -199, 77, 39,222,155,249, 89, 59,241,160, 30,117, 91, 6, 86, 33,173, 34,162,233,233, 66, 51,212,106, 68,239, 90,173,202, 57,200, -240,205,202,155, 54, 94,160,211, 94,247,247, 34,162,105, 90, 96, 21, 50,242,183, 83, 79,163,191,250,168, 46,252, 43, 56,213,179, -179,201,198,168,169, 43, 96,181, 45,179,126, 57,244,109, 73, 88,235, 15, 80,175,201, 33, 81,102,204, 97, 92,255,109, 8,214,252, -118, 73, 47,149, 64,241,126, 11,137,221,179,225, 59,168, 21, 35, 86,174, 92,165,240, 46,175, 34,120,186, 28,188,254, 41,108,134, - 12, 88, 76, 57,200,207,205, 70, 66, 82, 26, 50,117, 28, 18, 51, 68,250,196, 52,227,122,123,117, 5, 42,206,200, 76,188, 37,133, - 57, 9,181,234, 85,105,133,172, 27,128, 75,111,196,223,185, 18,158,156, 26, 37,167, 68,148,105,159, 81, 43, 30,169,234,133,109, - 91,126, 35,253,250,245,197,228, 73, 83,241, 32, 50, 2,191,110,222,129, 94,189,123,224,215,173, 59,209,162,101, 83,228,231,231, -103,218,153, 7,251, 2,171, 16, 71, 0,142,197,253,166,237,109,243,221,183,154,213, 65,248,157, 71,216,178,231,114, 16, 10,158, -245, 84, 68, 78, 68, 52, 53,217,127,121,106, 3,229,141, 40, 30,185, 66,193,224,247, 82, 15,110,175, 85,153,132, 42,229,146, 21, -223, 76,236, 28,216, 50, 80,144, 19, 83, 18, 8, 0,149, 66, 12,147,153, 71, 57,175, 90, 16, 44,121, 84,111, 48,101,223,139,130, - 13, 12, 6,227, 15,209,170,164,164,164,159,220,220,220,250, 14, 24, 48, 64,217,186,117,107,142,227, 56, 44, 94,188, 24,169,169, -169,206,109,219,182,237,177,105,211,166,118, 77,155, 54,253,213,219,219,123,152, 61, 81,173, 98,109,150, 4,128,168,232,204,127, -242,228,137,173, 99,199,142,120,242,228, 9, 87,104,188, 4, 0,150,178,142,143,252,135,154,172, 10,147, 38, 77,130, 78,167, 67, - 98, 98, 34, 98, 99, 99,145,159,159,143,154, 53,107, 34, 42, 42, 10,169,169,169,104,212,168,145,212,193,193, 1, 71,143, 30,173, - 96,167,166,116,202,148, 41, 48, 24, 12,120,250,244, 41,137,139,139,131,193, 96, 64, 96, 96, 32, 30, 63,126,140,172,172, 44, 52, -110,220,152, 56, 58, 58,226,200,145, 35,210, 63,179,188,252,149, 30,228,175,228, 47,127, 84, 78, 68, 52,125,186,231,248,221, 31, - 30, 61, 73, 68,223,246,254,240,112, 85, 62,235, 98,114,119, 81, 44,252,160, 75, 53, 68, 60,201,194,241, 43,137, 63, 68, 68,211, -167,111,232,103,125, 61,220, 28, 0, 34,129,222,104,211,149,102,195, 27,145,105,190,125,199,252, 52, 99,241,236, 97, 16,110,127, -132, 77,191, 76, 69,191,201,251, 63, 59,126, 35,211,131, 35,164, 84,179,186,114, 4,157,189, 43, 4, 16,154,178, 23,230,236, 7, -208,101, 37, 32, 51, 35, 17,249,121, 25,208,235,114,145,151,167, 71,146, 54, 5,135, 47, 37,102,216,120,122,198, 94,221, 60, 3, -119,124,223,142,121, 34,181,171,127,185,196,199,177,183,223,159,229,111,213,134, 31,184, 43, 83,184, 56,159,186,112,217, 41, 79, -207,157,176, 71,199,205,205,213,161, 40, 82,101,177, 88,208,187, 95, 47,184,149,119, 69,227,198,141,113,248,240, 17,124, 48,120, - 32, 92, 93, 92,209,165,107, 7,252,182,115, 55, 56,142,155, 87,138,124, 55, 68, 68,211,148,162, 23,128, 54,129,213, 52, 0,111, - 64,173,170,158, 0,208,166,248,247,165, 50, 87, 64,193,160,246,130, 8, 86,179,192, 42,228, 39, 0,191,134,159, 88, 50, 20,246, -221, 97,248,140,218, 85, 72,167,160, 0,159,125, 7,182, 46,174,223,174,235,135, 10,105,133,254, 68,236,247, 17, 56,199, 64,136, - 37, 82, 56, 86,125, 23,206,181, 71, 99,243,166,149,249,188, 32,108, 45,222, 61,200, 96, 48,158, 25,138, 25,213,171, 87,239,183, -123,247,110,117,229,202,149, 57,189, 94,143, 99,199,142, 97,225,194,133, 48, 26,141,168, 88,177, 34,183,123,247,110,117,245,234, -213,251,105,181,218, 25,118, 52,192,238,110,110,110, 53, 80,240,224, 93, 5, 0, 21, 0,117, 92, 92,156,195,185,115,231, 92,131, -130,130, 92,212,106,181,122,234,212,169,190,159,127,254,121, 15, 0, 30,111, 34,146, 85,190,124,249,211,193,193,193, 53,222,208, - 49, 49, 20,235, 46, 44,245, 24,102,147,201,132,205,155, 55,227,236,217,179,104,213,170, 21,226,226,226, 48,109,218, 52, 60,121, -242, 4, 31,125,244, 17,178,178,178,160,211,149,170,121,131,193, 96,192,154, 53,107,112,250,244,105, 52,111,222, 28,143, 31, 63, -198,248,241,227,113,255,254,125, 12, 30, 60, 24, 57, 57, 57,200,203,203, 99, 5,250,207, 54, 88,181, 43, 16, 49,225,224,101,181, - 24, 96,177, 81, 16, 14,154,218, 21, 72, 89, 93,237,172,101,155, 46,154,148, 82, 27, 6,117,173, 86, 63,176, 10,233, 30, 88,133, -116, 31,220,173,122,125,149, 66,140,229,191, 70,152, 0,204,122, 19, 59, 24, 88,133,120,184, 56, 41,151,116,107, 21,128,216, 20, - 19,162,226,115,119,150,102,251,248, 68,100,198, 39, 98,129,206, 96,133, 72, 44, 70,174,158, 34, 41, 25, 43,227, 19, 97, 42,109, - 90, 68, 28, 14,104, 99,111, 82, 27,113, 66, 94, 78, 58,226,158,198, 32, 38, 38, 17,217, 89,185, 80,200, 8,124,124, 60, 80,179, -102, 13,116,107,236,230, 42, 21,147, 70,246,234, 70,165,153, 70, 69, 68,220,201, 58,123,108,141, 84, 42,150, 40,124, 43, 84,228, -148,234,114, 14, 87,111,222,113,138, 75,204, 73,121,148,106, 26, 97,143, 78, 70, 70,102,126,212,147, 71,248,117,243, 14,112,156, - 8,219,182,238,196,131, 7, 15,112,233,210, 37, 28, 60,112, 8,147, 39, 78,197,172,111,231,226,248,209,211,136,139,125, 10, 65, - 16,104, 72, 72, 8, 13, 11, 11,179,150, 50, 79,106,183,106, 92,125, 94,231,214,181, 1,222,128,174,111,213, 66,179,134,149,230, - 21, 70,157,202, 4,165, 5, 93,132,151, 54,191, 85,243,210,198,102, 67, 47,174, 15,171,105, 78,220, 88,122, 29,224,243,177,125, -253,156, 93, 85,102, 14, 54, 61,136,216, 25,156,186, 26,225, 42,188, 71, 36, 13, 54,144, 4,189, 31,223,187, 95,223,212, 85, 27, -247,175,112, 50, 99, 1,171, 66, 24,140, 23, 52, 44, 28, 55,116,192,128, 1, 42,165, 82, 9,133, 66,129,245,235,215, 99,248,240, -225,144,203, 11,230,127, 84,169, 84, 80, 42,149, 24, 48, 96,128,138, 16,242,137, 61,213, 83, 94, 94,158,195, 59,239,188,227, 87, -100,174,204,102,179, 67,114,114,178, 51,207,243,229,234,214,173,235, 57,125,250,244,128,188,188,188,122,187,118,237, 74, 69, 41, -231, 43, 42, 34, 39, 39, 7, 79,158, 60,193,193,131, 7, 49,108,216,176,124,139,197, 34,115,118,118,158,242,154,209, 25,137,167, -167,167,202,203,203,171,188, 32, 8,181, 40,165,156, 32, 8,149, 74,171, 99, 52, 26, 97,177, 88, 80,175, 94, 61,236,220,185, 19, -163, 70,141,130,159,159, 31,142, 28, 57,130, 35, 71,142, 32, 52, 52, 20, 38,147, 9,165,185,230, 51, 26,141,224,121, 30,245,235, -215,199,214,173, 91, 49,118,236, 88, 84,173, 90, 21,199,143, 31,199,161, 67,135,208,184,113,227, 82,107, 50,158, 51, 88, 37,133, -230,106, 87, 32,245, 60,202,201,110, 77,121, 63,176,185, 56,104, 58,164,111, 29,197,111,107,230, 52,173,225,239,247,160,118, 5, - 18, 86,134, 40, 86,218,185,240,132, 69, 87,239, 38,160, 79,187, 42,240,245, 84,207,243,245, 84,207,235,211,174, 10,174, 70,164, -225,210,157,212, 69, 17,209, 52,237,117,118, 44,176, 10,113, 13,172, 66, 70,213,172,234,113,123,235,146,254,245, 60,221, 93,177, -249,224, 35, 10,192,238, 86,151, 47, 8, 90, 87, 0, 32,163,255,107,128, 65, 56,200, 1,120,240, 2, 74, 21,202,204,201, 55,254, - 56,254,203, 79, 51,162,227, 83,104,154,206, 1, 81,113, 89, 72, 78,207,131,213, 98,134,163,119, 48, 42,214,121, 23, 53, 2, 67, - 81, 55,192, 83,173,113, 35,125,236,213, 13, 15,167,214,116, 29,249,244,232, 85,131,251,137, 27,102, 55,133,144,100,217,124, 36, -193,101,237,129, 88, 85, 74, 6, 55, 60, 60,156,218,101,128, 4, 65, 88,181,100,201, 82,218,167,223,187,112, 41,231,130, 22, 45, -155, 96,239,158,253, 80, 42,149,168, 91,183, 46,122,121,229, 99,135,203, 78,244,116,124, 10,153, 76,134,145, 35, 71, 46, 60,121, -242, 36,120,158, 47,213,205, 18, 42,133,236,187,105,163, 59, 75,108,230,124, 76, 93,184, 29, 54,139, 14,211, 71,181,150, 40,229, -146, 21,101,206,112,161,160,139,176,241,123, 39, 31, 52, 30,120,254,231, 38, 31, 92,121, 32,245,124,187, 84, 18,193,193, 68, 34, - 17,147, 90,181,124, 76, 18, 62,225, 87,240,137,219,168,160,123, 72, 65, 45,128,186, 22, 86,172,152,151,223,237,221,247,246, 68, - 39, 36,183,189, 23, 67,167, 94, 74,160, 38, 86,133, 48, 24, 47,140,140,124, 56, 99,198, 12, 67, 98, 98, 34,130,130,130,144,154, -154,138,206,157, 59,163, 75,151, 46, 80,169, 84,168, 83,167, 14,226,227,227, 49,125,250,116,163,209,104, 28, 82,242, 5, 20, 21, -172, 86,235,189,227,199,143, 43,187,117,235, 22,176,104,209,162,170, 39, 79,158,172,110, 50,153, 42,155,205,230,192,228,228,228, -160,125,251,246, 85,250,229,151, 95,158, 62,125,250,244, 50,165,148, 47, 75,186,167, 79,159,174,219,190,125, 59, 90,181,106, 5, -163,209,152,112,242,228, 73,151, 19, 39, 78, 12,124,157, 99,225,229,229, 85, 85, 44, 22,107, 82, 82, 82,178, 68, 34,145, 53, 57, - 57,249,122,114,114,242,253, 50, 28, 83,112, 28,135, 6, 13, 26,224,210,165, 75, 88,184,112, 33, 34, 34, 34,224,233,233,137,216, -216, 88, 52,111,222, 28,132,148,174,119, 77,175,215,255, 78,115,246,236,217,184,119,239, 30, 60, 61, 61, 17, 19, 19,131,102,205, -154,129,227,254,252,142,174,127, 99,247, 32, 80,108,144,251,139,118,172,118, 5, 34, 3, 48,173,125,152,207,248,119,218,250,139, -120,253,255,177,119,230,113, 81,212,255, 31,127,125,102,102,119, 97,151, 27, 57, 23, 68,192,251, 22, 22, 81,201, 91,188, 82, 60, -179, 50,205, 50,243, 42,173, 52,175,180,180, 44, 53,239, 50,239, 51, 51, 45,175,188, 77,241,206, 11, 88, 80, 20, 5, 15, 20,132, -229,148,251,216,123, 62,191, 63, 96, 9,137, 99, 65,235,219,207,230,249, 96, 31,236,236,206,190,230, 51, 51,159,153,207,107,222, -159, 75, 5,158,231,193, 2,112,178, 97,176,117,203, 6,223,189, 7,143, 95,109,237,197,124, 79, 41,157,123,251, 9, 45,170,197, -182,151,173,249, 37,102,202,174,175,123,216,140, 31,218,172, 9, 0,136, 69, 12,214,252, 18,147, 15,212, 46, 50,208,210,151,116, -149,136,152, 95,141, 60,149, 25,140,244,182,167,187,131,116,112,112,187, 22,131,122,251,113,254, 45, 60, 97, 52,104, 48,127,237, -113,122,224,212,157,169, 49,241, 52,202, 92,221,230, 62,246,136,240, 72,155, 3, 96,190, 41,223, 18, 2,184,185, 64, 12, 96, 70, - 19, 15, 11, 9,106,209, 4, 39, 61,155, 70,186, 58,146, 87,239,220,190, 53,206,195,197,166, 95,255, 14, 86, 46, 46, 54, 84,108, -231,226, 3,137,180, 30,120,125, 33, 10,159,198,193,104, 80,131, 1,239, 83,155, 99, 16,126,199,225,203, 13, 27,190,149,246,234, -213, 75,154,151,151,135, 99,199,142, 89,102, 94,217,129,199,143, 31, 47, 5, 16,100,142, 70, 84, 84,212,180,246,237,219,227, 70, -212,205, 79,250,245,235,135,227,199,143, 67, 42,149,194,218,218, 26,190,190,190,136,200,207,199, 84, 73, 7, 52,113,105,130,224, -224,167,104,213,170, 21, 98, 99, 99,107,107,124,189,134,245,105,213,185,158, 45,139, 31, 15, 92,197,161,208, 59, 7,124,228,214, -195,198, 14,105,137, 30,129,158, 93, 90,250, 18,175, 58, 85, 13,255, 89, 69,248, 71, 76, 60,157,216,210,151,180, 10,232, 59,175, -210,222,131, 85,225, 19, 9, 62,206,151,130, 16, 22, 0, 1, 85, 39,195,248,100, 23,224,251, 33, 61,248,219,225,226,205,155,183, - 44,140,121, 68,133,168,149,128, 64, 13, 68, 70, 70, 30,237,212,169,211,180,183,223,126,123,229,219,111,191, 45,121,231,157,119, -216,171, 87,175,130, 82,138,128,128, 0,108,222,188,217,176,103,207, 30,189, 86,171,253, 36, 50, 50,242,168,153,133,176,134, 16, -162, 60,122,244,104,189, 91,183,110,213, 19,139,197, 78, 60,207, 59, 20, 21, 21,101,104,181,218,167, 57, 57, 57,169, 0,178,234, - 90,109, 95, 92, 92,108,121,247,238,221, 43, 55,111,222,244,248,248,227,143, 91, 4, 7, 7, 55, 87, 40, 20, 29,149, 74,101,157, - 27,119, 51, 12, 35,230,121,190,152, 82, 42, 43,221, 7,181,147,147,147,117,102,102,102, 65,109,181,244,122, 61,100, 50, 25, 30, - 60,120,128,174, 93,187,226,252,249,243,112,113,113,129,171,171, 43,122,244,232,129,219,183,111,195,198,198,166, 86, 38, 75,175, -215,195,202,202, 10,247,239,223, 71,183,110,221,112,249,242,101,184,186,186,194,213,213, 21,189,122,245, 66,116,116,116,173, 53, -159,199,100,189,108,215, 65,149,145,135, 86,245,201, 36,153, 4,171,223, 25,228, 43,246,105,224, 9, 93,134, 18, 81, 15, 10,240, -197,150,192, 24,194, 89,105, 62, 28,219, 87,209, 35,216, 25,221,186, 7, 18,239, 6,246, 31, 45, 89,178,254,131, 86,245,201,167, -183,159,208,239,204,140, 98,229,181,244, 37,223,156,143, 72,249,214,211,185, 24, 20, 20,231, 35, 82,112,243, 94,214, 55, 49,241, - 52,175, 54, 59, 97, 33,102,126, 86,134, 71,187,192, 88,140,212,251,135, 59,186,185, 54, 0,120, 29,244,218, 98, 92,137,188,141, -109,123, 47, 22, 69,220,126, 50,210,140, 49,149, 0, 0,247, 18,115,126,127,240, 36,183,239, 87, 19, 3,209,255, 21,175,113,139, -183, 69,142, 46,187,102, 41,208,163,157,253,163, 81, 61,108,100, 50, 78, 11, 3, 36,136,188,159,123,210,220,180,166,101,209, 8, - 0, 17,238,245,136,109,244,189,244,254, 3,187,184, 44, 15,244, 51,184, 23,166, 71, 34,229,201,125,100, 23, 73,144,146, 77,192, - 3,247,107,115, 12, 84, 42,213, 43,163, 71,143,166, 15, 30, 60, 64, 78, 78, 14,182,109,219,102,250, 60,168, 54, 58, 60,207,127, -197,113,220, 39,129,129,129,184,115,231, 14, 60, 60, 60,224,237,237, 13,185, 92,142,251,247,239,195,198,198, 6, 98,177, 24,161, -161,161, 72, 74, 74, 66,163, 70,141,106,123,241,141,236,219,217,151,192, 88,140,253,191,223,206, 4, 48,242,192,233,187,201, 99, - 7,249, 56,245, 13,114, 39,199, 46, 62, 26, 9, 96,113,237, 47, 78, 35,192, 23,151,207, 95,181,238, 61,184,151, 82, 99,203,134, -228,193,158,208,116,235,215,250,251, 75,197, 34,134, 64,157, 12, 74, 36,100,245,218,237,249,140, 17,155,132,162, 83, 64,192, 60, -174, 94,189,186,177,125,251,246,151,183,109,219, 54,139, 97,152,174, 90,173,214, 5, 0,127,234,212,169, 20,131,193,112,190,168, -168,104,101,100,100,100,108,237,174,115, 74, 81,210, 25, 38, 19, 64,236,139, 76, 47,199,113, 63,103,103,103,127, 1,224,141,223, -127,255,125,205,208,161, 67,113,232,208,161,241, 0,234,108,176,140, 70, 99, 94, 90, 90,218, 67, 15, 15, 15,103, 47, 47, 47,231, -130,130,130, 84, 11, 11, 11,119, 0,247,106,171,165,213,106, 97, 99, 99,131,251,247,239,227,131, 15, 62,128,175,175, 47, 18, 19, - 19,209,189,123,119,244,237,219, 23,107,215,174, 69,189,122,245,106,165,169,211,233, 96,109,109,141,251,247,239,227,147, 79, 62, - 65,139, 22, 45,240,232,209, 35,244,234,213, 11,189,123,247,198,250,245,235,107,173, 41, 96,134,193, 2,240,213,169, 95, 22,137, -193,235,177,111,215, 82,132, 70, 20,105,239, 38, 99, 46,128,213, 64, 33,255,249,242,253, 19,143, 94,120,184,236,189,119, 6,202, -122,118,235,141,158, 93,123,112,173,252,186,125, 14,160,204, 96, 17, 66, 90,215, 48, 86,198,154,141, 7,238, 46,254,229, 88, 28, - 3, 67, 62,222, 24,220,158, 7, 80,109, 53, 81,101,154,148,130,192, 88, 12,228, 94,199,209,211,215,225,230,154,140,123,241, 79, -112,228, 84,196,245,236,188,162,173, 0,246,198,196,211,124,115, 53,115,242,181,239,247,155,122,100,211,235,193,141,250,125,242, - 86, 91, 28, 90,241,170, 36, 62, 57, 15, 70,131, 1,125,218,240, 64, 51,137,140, 18, 35, 46,223,227,232,166, 99, 73,251,181,122, -254, 3,115,210, 89,158,148,167, 52, 15,192,158,102, 94, 44,138, 53,186, 47, 71,244,244,110, 72,224, 72,210, 51,115,177,255,124, -202,213, 39, 25,152, 87, 27, 77,185, 92,126,117,254,252,249, 24, 54,108, 24, 50, 50, 50,224,229,229,133, 29, 59,118, 64, 46,151, - 95, 85,169, 84,157,106,113, 60, 53, 6,131, 1, 23, 46, 92,192,232,209,163,161,211,233, 96, 48, 24,160, 86,171, 17, 24, 24, 8, - 74, 41, 30, 61,122, 4,189, 94, 79,111,222,188, 57,227,246,237,219,203, 89,150, 53,152,155, 78, 39,123,233,152,128, 22,142,184, - 29,151,136,199,170,220,159, 98,226,169,174,165, 47,249,233,102,108,218,180, 87,218,186,192,209, 86, 50,166, 50,131, 85,149,102, -105,187,173,206,224,245,166, 94,132,157, 91,250,146, 86,230,244, 28,172, 76,147,231,241,214,202, 61, 9,243,246,158,203, 28, 60, -243,253,174,182,175,116,236, 39,161,188,142,230, 23,105,244, 49,137, 53, 27,127, 51,242,124,173, 17, 52, 5,205,255,175,154,225, -225,225,119, 0,188,253,255, 97,223,207,157, 59, 55, 25, 0, 20, 10,197,174, 3, 7, 14, 44,255,241,199, 31, 37,182,182,182, 29, -158, 71, 51, 53, 53,245,110,233,122,233,238,238,238,173,178,179,179,111,122,120,120, 52,168,139,102,113,113, 49,164, 82, 41, 40, -165,216,179,103, 15, 2, 2, 2,240,230,155,111,226,238,221,187,216,184,113, 35,108,108,108, 96,101,101, 85,103,205,221,187,119, -163, 93,187,118, 24, 50,100, 8,226,226,226,176, 97,195, 6,200,100,178, 90,107, 10,152,103,176,140,224,245,200, 13,159,143, 13, -199,160,211,234,209,252,246, 19,250,168,220,247,235, 91,213, 39, 71,162,111,223,141, 87, 94,235, 41, 65, 94,116,201,111,106, 65, - 76, 60, 85, 7, 52,231,114, 97,200,119, 64,198, 9,196, 39,231,231,198,196, 83,117,173,157,189,158, 31,233,223,161,227, 94,158, - 66, 98, 48,242, 27, 40,197, 17, 0,241, 49,241,117,155, 51, 46, 49,137, 38, 3,232,239,229, 73,122, 28,190,248,120,197,184,193, -205,219, 78, 26,222, 10,197, 69,249, 96,169, 26,183, 82, 36, 88,123, 56,245,122, 86,190,238,163,196, 36,250, 92,115, 30,197, 38, - 26,247,120, 56,147,240,251,143,115,230, 74, 37,168,103, 52,226,246,163,116,108,127,146, 78, 19,106, 25,193,234, 36,151,203,233, -151, 95,126,249,151,207,107,163,163, 84, 42, 53, 10,133,226,211,115,231,206, 45, 63,119,238, 92,165,235,176, 44, 75,141, 70,227, - 56,165, 82,185, 13,192,138,218,232, 55,244,178,171,207, 65,131, 67,103,227, 0, 96, 87,233,199,187, 14,157, 79,152,214,182,137, - 35, 26,121,217, 54,110,233, 75,164,102, 78,147, 3, 0, 31, 68,156,252,178,185,250,222,231,160, 84,143, 63,214, 57, 52,239, 60, - 57,251, 3,212,113,132,245,187,143,104, 50,128,137, 45,125,200,198,143,190, 57,241,121, 64,235,219,157, 63,157, 56,196, 22,194, -196,232, 2, 2,255, 9,148, 74,101,174, 66,161, 24,217,179,103,207,153, 69, 69, 69,223,190, 8, 77, 74,169,193,213,213, 85,229, -234,234,218, 92,167,211,213,186, 92, 34,132,100,158, 58,117,202,225,207, 7, 65, 30,215,175, 95, 7,207,243, 96, 24, 6, 44,203, -130, 97, 24, 16, 66,192,113, 92,182,153,154,250, 83,167, 78,113,229, 52,201,181,107,215,202, 52, 57,142, 43,171,157,224, 56, 78, - 24,205,253, 5, 27,172, 47, 95, 25, 54,127, 62, 74,198, 21, 89, 80,193, 92, 1, 0,110, 63,161,170, 86,245,201, 39,173,252,186, -153,198,171,250,178,182, 9,208,234,248, 55,218, 43,154,238, 42,125, 63,170, 46, 59, 17, 19, 79, 47,226, 57,187,229, 86, 97,180, -206,121,121, 18,191, 85,187,111,142,252, 53,244,225,250, 25,111,183,179, 94,182,243,105, 65, 74,102,209,232,196, 36,243,231, 53, -172,137,228, 12, 26, 15, 96,236,243,234,168, 84, 42, 66, 8, 89, 0, 96, 62,128, 47, 41,165, 11,234,120,131, 89, 81, 91,227,100, - 46, 97,209,169,107,223,154,245,251,148,152,135,217, 59, 98,226,233,141,210,243,119,163,165, 47, 89,146,160, 42,248, 40,250,126, -214,186, 90,152, 43, 0, 88, 27,208,239, 47,195,165,173,125,222,116,198, 60,162, 55, 0, 12,109,233, 67,122,191, 62,249,251,233, - 4, 80, 9,183, 11, 1,129,255,140,201, 58, 8,224,224,139,212, 76, 75, 75,203, 64, 29,123, 55, 82, 74,221,241,236,192,224,224, - 56, 14, 58,157,142,112, 28, 71, 75,215, 65,233, 64,206,102, 53, 12,182,178,178,186,150,156,156, 76, 36, 18, 9,181,176,176, 0, - 33, 4, 14, 14, 37, 30,238,194,133, 11,229,103,167, 16, 50, 68, 29, 33,127,231,193,123,153,194,230, 94,158,132, 3,208, 8,192, -163,196, 36,170,253, 47,237,251,139,214,108,233, 75, 68, 49,241, 84,255, 95,205, 75,130,166,160, 41,104, 10,154,130,230,203,143, - 80,237, 97, 38,137, 73,212,128, 23,220,168,242,191, 74,109,205,149,128,128,128,128,128,192,255, 55, 24,225, 16, 8, 8, 8, 8, - 8, 8, 8, 8,188, 88, 8,128,214,149,125, 81,155,208, 31, 33,164,117,109, 55, 92,147,190,160, 41,104, 10,154,130,166,160, 41, -104, 10,154, 47,159,102, 77,218, 47, 75,213,163,208, 6, 75,208, 20, 52, 5, 77, 65, 83,208, 20, 52, 5,205,255,185,230,203,134, - 80, 69, 40, 32, 32, 32, 32, 32, 32, 32, 32, 24, 44, 1, 1, 1, 1, 1, 1, 1, 1,193, 96, 9, 8, 8, 8, 8, 8, 8, 8, 8, - 6, 75, 64, 64, 64, 64, 64, 64, 64, 64, 64, 48, 88, 2, 2, 2, 2, 2, 2, 2, 2,255, 26,136, 48, 12,190,128,128,128,128,128, -128,128,192,139,133, 1, 0, 66, 8, 45,125,117, 19, 14,137,128,128,128,128,128,128,192, 63,197,203,234, 65,202,166,202,161,148, - 18, 66, 8, 69,201,224,163, 2, 2, 2, 2, 2, 2, 2, 2,255, 8, 47,163, 7, 97,202, 59, 72, 0,221,133,211, 44, 32, 32, 32, - 32, 32, 32,240, 79,242, 50,122,144,103, 34, 88,194, 41, 22, 16, 16, 16, 16, 16, 16,248,167,121, 25, 61,136,208,139, 80, 64, 64, - 64, 64, 64, 64, 64,224, 5, 35,244, 34, 20, 16, 16, 16, 16, 16, 16, 16,120,193, 8, 17, 44, 1, 1, 1, 1, 1, 1, 1,129,255, - 79, 6,139, 16,210, 90,208, 20, 52, 5, 77, 65, 83,208, 20, 52, 5, 77, 65, 83, 48, 88, 2, 2, 2, 2, 2, 2, 2, 2, 2,130, -193, 18, 16, 16, 16, 16, 16, 16, 16, 16, 12,150,128,128,128,128,128,128,128,128, 96,176, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -131, 37, 32, 32, 32, 32, 32, 32, 32,240, 63,130, 0,168,180, 39, 0,165,244,150,217, 34,117,232, 77, 80,147,190,160, 41,104, 10, -154,130,166,160, 41,104, 10,154, 47,159,102, 77,218,181,241, 31,255,106,131,245,119, 14, 52, 74, 8,105,253,162, 15,148,160, 41, -104, 10,154,130,166,160, 41,104, 10,154, 47,159,230,203,134, 80, 69, 40, 32, 32, 32, 32, 32, 32, 32,240,178, 24, 44, 66, 8, 67, - 8,225, 74, 95, 12, 33,132,252, 27, 53, 5, 4, 4, 4, 4, 4, 94,118, 34, 34, 34,104,102,102, 38,117,119,119,191, 75, 8,153, - 36, 28,145,231,135,123,145, 98,205, 92,164, 29,189,235,187, 14, 56, 17,241,104,110,117,235, 41, 20, 10,209,128, 1, 3,118, 18, - 66,222, 40,255,121, 72, 72,200, 51,235,137, 68,162,204,236,236,108,247,243,231,207, 27,106,218,182, 66,161, 16, 13, 28, 56,112, - 39,128,231,214, 28, 50,100, 72,154,209,104,116,169,213,129,228,184,244,131, 7, 15,186,214,180,158, 92, 46,127, 5,192,167,102, - 72, 46, 87,169, 84,151,133, 44, 42, 32, 32, 32, 32,240,119,115,250,244,105,140, 31, 63, 30,209,209,209,205,142, 31, 63,190, 78, - 46,151,127,144,146,146,210,131, 82,154, 33, 28,157,255,177,193,106,236,110,221,204,205,217,233,232,183,223,204, 7,128,185,213, - 25, 33, 55, 55,183,157, 94, 94, 94, 3, 86,174, 92,137,163, 71,143,194,199,199, 7, 98,177, 24, 44,203,130, 97, 24,176, 44, 11, -150,101,241,241,199, 31, 59,148,166,209, 80,147,185,114,119,119,223,233,229,229, 53, 96,197,138, 21, 56,118,236, 24,188,189,189, -203, 52,203,235,154,163,105, 52, 26, 93,126,253,245, 87, 88, 90, 90, 2, 0, 40,165,224,121,254,153, 23,165,180,236,101, 52, 26, - 49,122,244,104,115, 13,217,167,119,239,222, 29, 84, 88, 88,248,140,134,105, 27,166,247, 93,186,116, 1, 0,193, 96, 9, 8, 8, - 8, 8,252, 45, 52, 24,182,101, 29,111,208,149, 70,171,236, 1,108, 66,126,126, 62,198,141, 27,135, 67,135, 14,181,232,216,177, -227, 18, 0, 99,133, 35,245, 63, 52, 88,141, 60,164, 30,118,150,178, 83, 27,215,127, 79,244,249,105, 14, 85,173, 71, 8, 97, 6, - 12, 24,176,213,203,203,171,239,202,149, 43,173,196, 98, 49,226,222,123, 15, 57,106, 53,116, 75,151,194,222,217, 25,141,199,143, - 71, 61,131, 1,198, 27, 55,204,218,182, 73,179,126,253,250,125, 87,172, 88, 97, 37, 22,139,145,148,148, 4,173, 86, 11, 23, 23, - 23,200,100, 50, 72, 36,146,178,151,185, 88, 90, 90,226,244,233,211,224, 56,174,236,197,178,108,165,203,174,174,174,181, 57, 92, -203,155, 55,111, 30, 24, 23, 23,231,154,157,157,141, 78,157, 58,165, 1, 8, 43,247,125,224,205,155, 55, 93,133,172, 41, 32, 32, - 32, 32,240,119,194, 27,116,147,218, 5, 4,149, 45,255,120,250,123,104,236,252,145,188, 96, 1, 86,175, 94,141, 38, 77,154, 4, - 10, 71,233,127,104,176, 90,123,217,217, 91, 16,209,169, 77,235, 86, 73,160, 43,116,136, 13,191,140, 86,253, 39, 0,120,182,171, -101,105,123, 40,134,227,184,183,150, 46, 93,202,136,197, 98, 0,128,194,104,132, 92,167, 67,110,203,150,144,218,219,163,190, 78, - 7,162,211, 65, 83,250,125, 69,204,209,100, 89, 22, 98,177, 24, 34,145, 8, 34,145, 8, 98,177,184, 90,131, 85, 85, 79, 8,147, -137, 58,125,250, 52,244,122, 61,134, 15, 31, 94,169,217,170,141,166, 74,165,186, 44,151,203,195, 40,165,131,120,158, 7,128, 48, -149, 74, 53,216,244,189, 92, 46,127,165,109,219,182,159, 2, 88,110,174,230,243, 32,104, 10,154,130,166,160, 41,104,254, 55, 53, - 25, 78,188,254, 70,196,149, 73, 0,144,119,231, 0, 62, 26, 25,132,252,252,251,152, 56,241,115, 36, 39, 39,227,222,189,123,202, -127, 50,157, 47,173,193, 34,132, 80, 74,105,173, 26,133,123,122, 18, 75, 27,163,244,232,186, 85, 75,236,108,172,101,206, 17,167, - 14, 34, 33, 33,181,122,199,204,243,244,196,137, 19,136, 27, 55, 14,126, 70, 35,178,151, 45, 3,145,203,209,106,240, 96,136,116, - 58,228,135,133, 65,108,109, 13,137,181,181,249, 46,188, 84, 51, 57, 57, 25, 28,199,193,218,218, 26, 86, 86, 86,176,176,176, 40, - 51, 86, 98,177, 24, 98,177, 24,230,182,123,167,148,130,227, 56, 68, 71, 71, 35, 33, 33, 1,118,118,118,184,114,229, 10,130,131, -131,159, 49, 87, 44,203,162, 46,109,233, 77, 85,139,149, 25, 48, 8, 85,131, 2, 2, 2, 2, 2,127, 51, 9, 7,198, 77, 38,132, - 44,244,242,242,186,176, 97,241,226,198,189,122,245, 2, 0,156, 57,115, 6,219, 70,142,196, 2,224,237,239, 9, 73,153, 74,233, -156,191, 59, 45,117,241, 32,255, 47, 12,150,105,199,106,179,131,132, 16,210,198,219,117,239,188, 25,239,249,120,249, 54,116,187, -126,236, 87,196,199,171,144,150,150, 93,149,161,160,132, 16, 30, 0,245,241,241, 65,182, 70, 3,185, 86, 11, 86, 46,135,117,189, -122, 96, 75, 35, 87, 34, 43, 43,136,173,173,205, 50, 67,229, 53,189,189,189,161,209,104, 32,145, 72, 96,109,109, 13, 27, 27,155, - 50,131,101, 50, 87,226, 42,162, 98, 85,152, 54,112, 28,135,155, 55,111,162,115,231,206,240,242,242,194,158, 61,123,208,183,111, -223,191, 68,177,234,106,176, 74, 35, 88, 0,158,105,252, 46, 52,110, 23, 16, 16, 16, 16,248, 71, 96, 89,118,201,111,191,253,214, -216,210,210, 18,223,124,243, 13,108,108,108,112,109,225, 66,108, 19,139, 33, 5,176, 94,167,155, 13,224,111, 53, 88,117,241, 32, -255,111, 12, 86, 93, 24, 50,100,200, 10,159,250,238, 93,125, 91, 7, 88, 94, 63,121, 0,247,239, 37, 32, 51, 51, 23, 0,138,171, -243, 21, 0, 32, 18,137, 80,188,112, 33,178, 90,183, 70,235,225,195,193,234,116,200,191,118, 13, 98,107,107,200,252,253, 1,173, - 22,226,180, 52,179,189,138, 73,211,217,217, 25, 98,177, 24,150,150,150,176,180,180,132,133,133,197, 51,230,170,182, 6, 43, 55, - 55, 23,143, 31, 63,198,132, 9, 19, 32,147,201,192, 48, 12,210,210,210,208,160, 65, 3,176, 44,139,228,228,100,156, 59,119, 14, - 62, 62, 62, 96, 89,182,174, 6, 43, 80, 46,151, 31, 2, 16,168, 84, 42, 93, 21, 10, 5, 32, 68,176, 4, 4, 4, 4, 4,254, 1, -154, 52,105,162,240,240,240,192,199, 31,127, 12,245,238,221, 40, 0, 48, 16,192,111, 58, 29, 0,192, 6,152, 46, 28,165,127,208, - 96, 13, 26, 52,232,195,198,141, 27,143, 91,180,104,145,245,183,159,207,204,123, 26, 19,205,234,138,181, 86, 26,189, 65,251, 32, -237,233,247,213,152, 10, 58,104,208, 32,176, 44, 11,107, 7, 7,200,236,236, 32,170, 16,185,130, 86, 11,104,181, 16,137, 68,230, - 26,149, 50, 77,169, 84, 10,137, 68, 82,105,228,170,182, 6, 43, 39, 39, 7,251,246,237, 67, 96, 96, 32,100, 50, 25, 88,150, 69, -155, 54,109,112,231,206, 29, 52,108,216, 16,148, 82,252,246,219,111, 24, 54,108, 24, 30, 60,120, 0,185, 92, 94,107,131,101, 52, - 26,113,234,212, 41, 87, 74,233, 32, 74, 41, 50, 50,132,222,176, 2, 2, 2, 2, 2,255, 28,247,238,221, 11, 75, 72, 72,104,254, -249,231,159, 99,187,135, 7,108,108,108, 48,109,254,252,171, 6,131, 33, 72, 56, 58, 47,192, 96,213, 38, 52, 55, 96,192,128,161, - 46, 46, 46,223, 46, 88,176, 64,154,156,156, 12,143, 38,173,109,143,253,182, 79, 83,207,130, 41, 78,202,200, 25, 19,157, 90,176, -191, 38, 13,134, 97,208,228,147, 79,224,173,213, 34,251,202, 21,136,173,173, 97, 29, 16, 0,104,181,176,120,252, 24, 18,107,107, -176, 82,169,217, 59, 65, 8, 1,195, 48,149, 70,172,202,191, 24,198,188,113, 85, 19, 18, 18, 16, 28, 28,140,224,224, 96, 12, 31, - 62,188,172, 42,176, 93,187,118,248,229,151, 95, 48,116,232, 80,220,184,113, 3,114,185, 28,205,154, 53, 67,179,102,205,112,237, -218,181, 90, 27, 44,158,231,209,183,111, 95, 83, 47,194,192,176,176, 48,161,247,160,128,128,128,128,192, 63,134,209,104,156, 61, -120,240,224,246,223,124,243, 77,139,105,211,166, 1, 0,228,114,121, 39,185, 92, 30,243, 79,141,131,245, 50, 86, 15, 2,229, 70, -114, 55,237, 96, 85, 43,118,239,222,125,243, 43,175,188,242,148, 97,152,253, 33, 33, 33,108, 90, 90, 26,142, 31, 63,142, 99,199, -143, 23, 57,248,182,186, 94, 32,177,109,106,142,185, 50, 25, 34, 75,189,254,217,200,149, 70, 83, 82, 53,104,101, 5, 86, 38,171, -253,142, 48, 76,165,166,202, 20,201,170, 77, 21,158,151,151, 23,254,248,227, 15,188,251,238,187,144,201,100,101,109,174,124,125, -125, 1, 0, 97, 97, 97,184,120,241, 34,186,118,237, 10,142,227, 32,149, 74,145,148,148, 84,171,244,242, 60,111,106,228,110,234, - 69,248, 90, 96, 96,224, 97, 84,210,123, 80, 64, 64, 64, 64, 64,224, 69,211, 96,216,150,117,158, 33,107,211, 89,197,220, 22,211, -191, 59, 3,191, 78,189,177,114,229, 74,116,232,208, 1,135, 14, 29,106,193,178,236,146,127, 42, 45, 53,121,144,255,143,112, 21, -119,176, 10,115,245,142,131,131,195,200,177, 99,199, 74,163,163,163,177,117,235, 86,206,215,215, 87,247,232,209, 35, 3,165,116, -250,137, 19, 39, 55,214,214, 12, 21, 31, 59,134,124, 55, 55,216,181,111, 15,104,181,144,148, 70,174, 10, 60, 61, 65, 53, 26, 56, -228,230,214,218, 96,153,134,100, 40, 63, 44,131, 88, 44,174,114, 40,133,234, 12,160,105,128,210,138,227, 94, 77,156, 56, 17,155, - 55,111, 70, 80, 80, 16, 26, 55,110, 12,142,227,204,142,140, 85, 56,214,207, 52,114, 23,122, 15, 10, 8, 8, 8, 8,252,147, 60, - 51, 14, 86, 64, 16, 46, 31, 88,134, 61,113, 94, 72, 94,184,240,127, 50, 14,214, 75, 27,193,170,138, 14, 29, 58,216,228,228,228, -124, 55,102,204, 24,105, 97, 97, 33,146,146,146,160, 84, 42, 17, 31, 31,127,218,104, 52,182, 58,114,228,200,198,106,140, 74,235, -202,204, 11,195, 48,176,119,113,129,196,198,166,164,205,149, 78, 7,177,149, 21, 56, 43, 43,208,210, 72, 22,165,212,108, 77,224, -207,177,175,202, 71,173,204, 53, 87,149,105,154,134,105,168,216, 99,176,126,253,250, 88,180,104, 17, 6, 13, 26, 84,237, 48, 13, - 85,165,179,180,183, 96, 32,128,242,141,220, 95, 49,211,248,181,126,209, 25, 64,208, 20, 52, 5, 77, 65, 83,208,252,111,106,150, -142,131,133, 27, 17, 87,112, 97,199, 52,124, 48,208, 7, 67,189,239,227,243,207,107, 30, 7,235,239, 72,231,203, 70,141,238,163, -168,168,104, 97,211,166, 77, 37,119,238,220,193,131, 7, 15, 16, 23, 23,135,172,172,172,251, 71,142, 28, 25, 88,215,141,178, 44, - 11, 59, 59, 59, 72, 36, 18,136,146,147, 33, 17,139, 33, 42, 29,247,202, 33, 55, 23,148, 82, 16, 11,139,218, 57, 69,134, 1,199, -113,207,152, 43,115, 27,202, 87,134,209,104, 44, 27,161,157, 16,242,204,139, 97,152,178, 87, 29,134,104,248,244,218,181,107,174, - 9, 9, 9,160,148,226,192,129, 3,174,195,134, 13,251, 20, 66,244, 74, 64, 64, 64, 64,224, 31, 36,225,192,184,201, 0, 38, 19, - 66,222,156, 63,127,254,238,201,147, 39,131,231,121,156, 63,127, 30,107,103,205,194, 2,163,241,237,239, 9, 41,154, 74,233,100, -225,104,189, 64,131, 21, 24, 24,232, 93, 88, 88,184, 83,175,215,251,241, 60, 47,185,112,225, 2,212,106, 53,238,220,185, 83,204, -243,252,190, 58,111,144,227, 82,166, 78,157, 90,223,156,117,197, 98,113, 54,106,152,135,176,212,176,189, 80, 77,142,227,210,107, - 49,183, 32, 0, 64, 36, 18,165,155,185,234,242,142, 29, 59,254,229, 51, 33, 43, 10, 8, 8, 8, 8,252, 47,176, 16,139,223,254, -224,131, 15,240,211, 79, 63,225,224,234,213,232,155,148,132, 61, 98, 49,164, 98, 49,214,235,116,147, 0, 8, 6,235, 69, 26,172, -252,252,252, 69, 89, 89, 89, 29,243,242,242, 12,241,241,241,197,132, 16, 3, 33,164,152,231,249,175,120,158,223, 80,215, 13,238, -223,191,223,235, 69,239,196,129, 3, 7, 94,168,230,193,131, 7,255,182,222,124, 66, 91, 43, 1, 1, 1, 1,129,127, 19, 55,162, -163,251, 2, 64,255,254,253, 81, 60,189,100,216,171, 31,255, 28, 7,107,253,191, 36,153,237, 1, 56,151,190,207, 4, 16, 11, 64, - 1, 64, 10, 64, 3,160, 0,128, 83,185,245,159,150,126,103,250,254, 34, 0,253, 63,153,224, 42,219, 96,197,198,198,190,153,145, -145,193,105,181, 90, 11,163,209, 40, 51, 24, 12,182,122,189,222,205,104, 52,174,167, 85, 53,144, 18, 16, 16, 16, 16, 16, 16,248, -127, 69,211,166, 77,137,147,147, 19,105,218,180, 41,153, 71,233, 51,175,127, 81,245,160, 51, 33,228, 40, 33,228,232,156, 57,115, -122, 0, 8,154, 51,103, 78, 96,233,114, 0, 0, 39,211,247,132,144,163, 0,234, 85,248,190,221, 63,157, 96, 70,200, 90, 2, 2, - 2, 2, 2, 2, 2,255, 31,160,148, 14, 92,178,100,201, 34, 0,236,146, 37, 75, 22,149, 91, 6,165,116, 96,249,255, 21,190,119, -254,167,211, 74, 0,180,174, 98, 39,204,158, 41,187, 46,189, 9,106,210, 23, 52, 5, 77, 65, 83,208, 20, 52, 5, 77, 65,243,229, -211,172, 73,187,138,223, 15, 32,132, 28,165,148, 14, 44,255,191,188,241, 42,213, 60, 90,254,125,133,239,143,253,211,110,240,111, -123, 1,104, 45,104, 10,154,130,166,160, 41,104, 10,154,130,166,160,249,156,175, 1, 37,150,165,234,255, 85,189, 47,247,217, 63, -153, 94,161,138, 80, 64, 64, 64, 64, 64, 64,224,255, 7,132,144,163,179,103,207,254,236,255, 67, 90,185,127, 67, 34, 66, 66, 66, -236, 1,136,142, 28, 57,242, 66,230, 60,106,217,114,132, 56,131,211,182, 96, 13,176, 83, 51,198,155,185,183,142,229, 60,143, 94, -235, 38,196,147, 55, 96, 8,128, 1,165, 31, 29, 99, 56,252,118,235, 30, 77,170,101,198,112, 45,141, 26,166,189,136,245, 94,244, -111, 5, 94, 14,228,114,185, 20,192, 16,142,227,198, 56, 58, 58, 6,166,167,167, 47, 80,169, 84,171, 94,194, 27, 45,211,174, 93, - 59, 75,150,101,137, 84, 42,229, 37, 18, 9,181,176,176,168,216, 1,199,112,228,200, 17,195,203,122,174,187,119,239,110, 1, 0, -231,207,159,215,252, 63,203,163, 12, 0, 27, 0,249, 42,149,138, 23,174, 90,243, 8, 10, 10, 74,212,106,181,213, 14, 73, 36, 22, -139, 51, 37, 18,137,251,249,243,231, 95,182,124,159,105,170,250, 3,144, 14,128, 45, 93,214,150,254, 79, 43,247, 89, 90, 21,223, -255,247, 12, 22,128, 72, 75, 75,203,250, 33, 33, 33,251, 0, 44, 59,114,228, 72, 84, 93, 68,220, 90, 14,110, 14,137,197, 46,207, - 38, 22,245, 7,182,104, 42,177,148,216, 48, 81,202,244, 34,119,197, 72, 45,111,208,205, 79,187,185,127,155,249, 38,141, 72,161, - 65, 95, 0, 67, 26,121,185, 4,125, 50,241, 53,167,246,175,244,149, 22, 22,235,113,241,236,177,142, 91,127, 58,242,113, 43, 95, -114,149, 7,126, 35,150, 56, 25, 19, 67,139,107, 40, 12, 22, 19,130,153,165,239,151, 82, 74,231, 60,207,122, 53,253,150, 97,152, - 85, 60,207,127,250,130, 11,180, 54,142,142,142,155, 36, 18,137, 21,203,178,247,146,146,146, 22, 83, 74, 35,106,171,227,233,233, -217,154,231,249, 97, 44,203,182, 55, 26,141,225, 12,195, 28, 72, 74, 74,186,245, 28,233, 98, 91,180,104,252, 46, 33,232, 76, 0, - 71, 10,100, 81,138, 63,238,220,185,191,157, 82,106,172, 99,193,197,169, 11, 11,223,102, 25,102, 32, 5,218, 2, 32, 4,184,105, - 48, 26,143, 73,173,173,119,152,123,243,234,212,169, 83,162,193, 96,112,175,205,182, 89,150, 77,215,235,245, 94, 74,165,178,214, -105,151,203,229, 35, 60, 60, 60,182,117,236,216, 81,214,174, 93, 59, 72, 36, 18, 44, 93,186,116, 58,128,127,165,193,114,119,119, -159, 67, 8, 9, 44,125, 40, 8, 75, 73, 73, 89,108,206,239, 2, 2, 2,196, 33, 33, 33,191, 18, 66, 6, 1,168,178,128,102, 24, - 38, 63, 36, 36,196,185, 58,147,229,211,201, 49,130,101, 88,207,170,190, 55,242,198,164, 71, 87,179, 2,158,119, 95,131,131,131, -247, 83, 74,135, 25, 12, 6,176, 44,123,246,236,217,179,189,204,253,173, 66,161,112, 2, 48, 19, 0, 11,224, 91,165, 82,153,238, -239,239, 31, 42,145, 72,122, 1,128,191,191,255,153,200,200,200,224, 10,191, 33, 74,165,178,206, 61,190,187,117,235,246, 37,165, -244, 3,177, 88,156,152,149,149, 53, 58, 42, 42,234,238, 11, 48, 86, 34, 0,211,157,157,157,167,180,111,223,222, 61, 38, 38, 38, - 85, 46,151,127, 15, 96,133, 74,165,210,155,113, 28,228, 0,222, 5,240,118,233,177,216, 3, 96,135, 82,169,124,248, 95, 48, 88, - 6,131,193,253,234,236,217,128,133, 5,140,221,186,129, 39, 4,228,235,175,193,167,165, 65,247,237,183, 48, 0, 24, 56,112,160, - 67,105,217,254,178, 25,172,176,255,111, 9,174,214, 96,249,118,122,251, 33,195, 16,103,202, 83,202,131,130,210,146, 1, 26, 40, - 45,249,163,244,207,207,120,158, 79, 75,141,250,181, 69, 45,162, 86, 31,235,245,250,198, 34,145,104, 13, 0,239, 13, 27, 54,224, -222,189,123,111,236,220,185,243,141,144,144,144,115, 0,150, 30, 57,114,228,148,217,230,170,221,235,159,186,120,120,124,246,205, -220, 41,246,173,155,216, 33, 51, 55, 1,160, 98, 76, 25,229, 37,205,204, 41,194,170, 45, 91,215,184,249,189, 49,218,168,227, 7, -102,196,236, 45,172,214, 92,249,144, 81, 82,169,120,230,148,201, 3,220,251,247, 31, 96,235,232,169,224, 64, 74, 38,139,182,176, - 5,134,141,154,102, 53,228,205,169, 86,241,119,254,240, 60,118,236,104,191,159, 15,158, 83,181,244, 33, 75, 99, 30,209, 93, 85, - 69,149, 8,193, 76,158,167, 76,201, 77,159,204,238,213,171, 87,127, 75, 75,203,103,110, 40,106,181, 90, 68, 8, 90,243, 60, 45, - 45, 28,200, 76, 66,200,119,230, 68,163, 76,219,208,106, 53,140, 72, 36, 1,203, 50,211,253,252,252, 2,210,211,211,207,176, 44, -187,225,201,147, 39,153,207,147, 81,100, 50,217,248,193,131, 7, 47,251,241,199, 31,109, 44, 45, 45,145,146,146,210,252,141, 55, -222,240, 35,132,244,167,148,214,120,227,117,119,119,247, 39,132, 12,119,118,118,126,125,220,184,113,222,189,122,245,130,183,183, - 55, 84, 42, 85,223,115,231,206,125, 17, 16, 16,144,144,146,146,242, 11,165,116,127, 74, 74, 74,100,109,204, 85,203,150, 77,214, - 76,158, 60,165,213,176, 97,195,235, 75,165, 82,139,164,164,196,164, 13,235,214, 58,176,132,248, 17, 66,166,212,214,100, 5, 4, - 4,180,228, 8, 57, 48, 97,236, 88,159,246, 65, 65,156,171,187, 59,212,185,185,120, 16, 27,235, 21, 30, 22,214,247, 80,104,232, - 76, 63, 63,191,215,162,162,162,162,107,210,210,233,116,245, 47,125,243, 13, 88, 39, 39, 80,189, 30,234,198,141,203,234,231, 45, -174, 94, 5,244,250,146,207,123,244, 0,165, 20, 70,163, 17,195,134, 13,115, 5, 32, 2, 80,171,116,203,229,114,121,211,166, 77, -127,154, 51,103,142, 88,163,209, 32, 42, 42, 10, 87,174, 92,225,211,211,211,235, 60, 97,171, 66,161,248, 10,192, 20,123,123, 59, -219,156,156,220, 60, 0,107,148, 74,229, 23, 47,234, 6, 36, 18,137, 58,196,197,197,133, 0, 64,195,134, 13,205, 61, 63, 98, 87, - 87,215, 95,124,124,124,130,191,253,246, 91,242,224,193, 3,182, 69,139, 22,224,121, 30, 6,131, 1, 70,163, 17, 70,163, 17,148, - 82,140, 30, 61,218,166,166,194,134,101, 88,207,203, 7,110,187, 72,165,210,178, 73,216, 77,255, 11, 11, 11,209,119, 76, 71, 76, - 83,182,199, 74, 69,248,115,237, 43,207,243, 3, 54,111,222, 12,142,227, 48,106,212,168,158, 10,133, 66,170, 84, 42,139,205,252, -249,148,113,227,198,125,106,109,109,141,213,171, 87, 7, 43, 20,138,142,132,144, 94,103,206,156, 1, 0,116,233,210,165,151, 66, -161,168, 7, 96, 8,128,215,236,236,236,186, 1,184,160, 80, 40, 94, 87, 42,149,181,142,224,183,111,223,126, 68,235,214,173, 63, - 89,186,116,169,245,237,219,183, 29,191,250,234,171,253, 0,154, 63,167,185, 18,139, 68,162,253,243,230,205, 27, 56,120,240, 96, -112, 28, 7,158,231,221, 46, 94,188,184,248,211, 79, 63, 13,146,203,229, 67,171, 50, 89, 10,133,194, 15,192, 87, 62, 62, 62,125, -199,140, 25,195,190,242,202, 43, 40, 40, 40,192,169, 83,167,230, 30, 56,112, 96,174, 66,161,184, 2,224,115,165, 82,121,254, 69, -229, 77,133, 66,145, 0,192, 52,198, 98,162, 82,169,108,240,175,136,220,218,218, 34,255,213, 87,161,187,127, 31,144, 72, 32, 94, -185, 18,208,233,160,155, 63, 31,144, 72,132, 48,223,255, 23,131,197, 16,226, 28,121,106,179,181,136, 99,160,211, 27,161,213, 27, -161,209, 26, 80,172, 53,160, 72,173, 71,177,198,128,130, 98, 29, 84,153, 5,248,226,203,111,106,245,164,148,157,157,189,106,226, -196,137,248,249,231,159, 39, 2, 64, 94, 94, 30,172,173,173,177,112,225, 66,164,165,165,245,216,179,103, 79,143,144,144,144, 91, - 0, 62, 62,114,228, 72,181, 23,141,107,155, 33, 61,219,180,107,246,197, 15, 95,143,181, 22,139, 8, 68,172, 21,164,146, 70,200, - 43,212, 34, 49, 45, 31,233, 89,177, 24, 51,180,137,212,219, 83,210,101,207,190,168,173, 0, 94,175, 62, 7, 99,206,181,235,119, -154, 49,198, 76, 66, 68,182,149, 31, 27,150, 67,163,214,221,185, 73, 62,173, 29,250,247,237,107, 55,108,204, 39,115, 0,236,170, - 86,245, 79, 83,128,105,211,166,193,197,229,217,193,226,211,211,211,113,254,252,185, 74,127, 99,238,181, 87,126,225,235,175,191, -182,123,250,244,233,160,173, 91,183,246,117,119,119,159,151,146,146, 82,235,155, 15, 33, 68, 10, 96, 64,143, 30, 61,150, 28, 56, -112,192,198, 52, 53,144,171,171, 43, 86,174, 92,233,245,198, 27,111,172, 4,208,183,134, 27,235,207,239,188,243,206,200,224,224, - 96, 52,109,218, 20, 79,159, 62,197,181,107,215,180,235,215,175,127,216,179,103,207,134, 35, 70,140,144,124,244,209, 71, 13, 30, - 61,122, 52,251,208,161, 67,179, 29, 28, 28, 54,101,103,103, 79, 48, 39,125, 45, 90, 52,126,119,210,196,201,173, 38, 76,152,212, - 94,167,211, 22, 70, 71,135,157,101, 9, 33,147, 62,120,223, 38, 37,245, 73, 61, 35,165,239, 2,216, 82, 11,115,213,196, 75, 46, -191,184,228,219,111, 29, 28,157,157,145,154,154,138, 39, 73, 73, 72,185,117, 11, 4, 64,239,222,189, 37,237,218,182,109,180,114, -227,198,115, 10,133,162,155, 82,169,188, 93, 99, 68,202,201, 9,201,254,254, 0,128, 39,231,206,153, 34, 43,240, 8, 9,249,243, -122, 8, 15, 7,203,178,240,244,244,172,203,244, 75,101, 1,179,206,157, 59,139, 41,165,248,244,211, 79,243, 10, 10, 10, 22, 3, -248, 89,165, 82, 37,215,213, 92, 5,118,104, 63,111,214,172, 89,196,205,213, 29,143, 30, 63,180, 91,182,108,249, 60,133, 66,129, -186,152,172,170,162, 85, 6,131, 1,121,121,121,230,230, 71,102,192,128, 1, 63,249,250,250,246,252,246,219,111,101, 98,177, 24, -209,209,209, 72, 77, 77,133,179,179, 51, 44, 45, 45, 33, 18,137,192,113, 92,173,166,202,146, 74,165, 72, 73, 73,129,174,116,112, - 69,131,193,128,130,130, 2,184,185,185,149,134,177, 24,102,218,181, 78,252,202,142, 87,205,141, 86,121, 1,240,174, 16,125, 96, - 76,230, 90,171,213, 66, 38,147,117, 15, 14, 14, 46, 42,253, 58, 43, 52, 52,180,186,188,100,239,238,238,142,144,144, 16,104,181, -218,150,235,214,173,219, 3, 0, 69, 69, 69,229,143,111, 90,151, 46, 93,216,206,157, 59,163, 97,195,134,216,180,105, 83,240,129, - 3, 7,186, 3, 56, 88,219,115,101,107,107,251,214,240,225,195,173,173,173,173,209,161, 67, 7,104,181, 90,207,238,221,187, 91, -212,165, 42, 82, 46,151,115, 0,220, 56,142, 91, 63,117,234,212, 87,187,117,235,134,187,119,239,226,228,201,147, 24, 52,104, 16, -186,119,239,142,185,115,231, 14,248,252,243,207,167, 3,168,234, 97, 96,223,254,253,251,125, 60, 61, 61,193,178,172, 41,141,120, -239,189,247,240,246,219,111,227,248,241,227, 65,139, 22, 45,218,175, 80, 40, 92,148, 74,229,139,138,220,120, 41,149, 74,211,181, -240,194, 7,200,174, 43,250,160, 32,232, 18, 19, 33,110,208,160,196, 88, 61,126, 92, 98,180, 74,151,197, 10,133,224,108,254, 63, - 24, 44, 74, 41,229, 88, 6, 91,142, 68,131, 26, 53, 40, 84,235,145,145,107, 64, 78,129, 1,133,106, 29, 10,139,245, 40, 40,214, - 97, 76,255, 22, 85,253,254, 86,133, 11,237, 84,233, 83,208,183, 30, 30, 30, 8, 14, 14, 70,143, 30, 61,200,131, 7, 15, 16, 26, - 26, 10,103,103,103,240, 60, 15, 7, 7, 7,204,155, 55, 15,105,105,105,173,167, 78,157,186, 23,229, 70,103,173,168,233,220,114, -132,149,189,147,100,215,215,179,135, 88, 71,199,159, 68, 97,177, 1, 1, 77,222, 70, 94,145, 22,185, 5, 90, 92,137,220,129,184, - 7,191, 3, 70,130, 65, 61, 71, 49,177, 45,141,131, 92,218, 14,233,157,126,243,183,211, 85,105, 2,224, 88,171,134, 68,123,110, - 40,207, 58,117, 37,172, 60,132, 16, 11,249, 51, 43, 20, 60,125,140,184,171, 59,104, 66,244, 17, 90,223,111, 52,169,120, 44,203, -107, 82, 74,211, 56,142,219,192, 48,100, 18, 33, 4,126,126,254,105,203,151, 47,175,236, 73, 77,239,231,231,159,198,178,140, 43, -165, 20, 12,195,174, 55, 24, 12,105,213,164,179,252,246,210, 8, 33, 75, 37, 18,139,153, 37, 55, 91,121,218,145, 35, 71,244, 35, - 70,140,192,178,101,203, 36,179,103,207,254,218,211,211,243,141,164,164,164,164,234,206, 81,185,130,172,173,173,173,237, 7, 77, -154, 52, 25,186,112,225, 66,139,126,253,250, 73, 41,165,200,207,207, 71,126,126, 62,138,138,138, 96,101,101, 5,142,227,220,107, - 58,239, 62, 62, 62,175,143, 29, 59, 22,206,206,206,184,126,253, 58,102,205,154,245, 56, 61, 61,125,126,122,122,122,248,207, 63, -255,220,220,215,215,119,193,166, 77,155, 90,118,238,220,153, 9, 9, 9,193,145, 35, 71,186,212,164, 89,102, 94, 8,186, 12, 26, - 60,216, 85,163, 81, 23,168,213, 69, 57,113,119, 35, 30, 63,121,114, 59,203,199,167,149,115,207, 94,157,234, 61,120,240,176, 75, - 85, 6,171,162,230,136, 17, 35, 88, 17, 33, 7,191, 93,182,204,129,225, 56,232,245,122, 52,104,208, 0,209,209,209,200,207,206, - 70, 81, 65, 1,226, 99, 98, 32,247,241,193, 71,163, 70, 57, 44, 92,183,110,191, 66,161,104,169, 84, 42,245,213,165,147,234,159, - 61,213, 44,203,130, 97,152,191,124,102, 42, 56,204,221,247, 74,120,164, 82,169, 96,101,101,133,230,205,155, 91,135,133,133, 93, -170,202, 92, 85,212,172, 44, 82, 5, 96,202,172, 89,179,200, 55, 95, 47,194,232,119, 70,226,167, 29,187, 49,238,253,247,240,225, -228,169, 83, 0,124, 81,219,116, 18, 66, 2, 99, 98, 98, 6, 1, 64,203,150, 45, 77,134,171,125,211,166, 77, 1, 32,141, 82, 26, - 86,157, 38, 41,113,158, 12,199,113,195, 23, 45, 90,196,136,197,226, 50,179, 42, 18,137,158, 49, 86,166, 73,218,205, 61,158, 70, -163, 17, 58,157, 14, 58,157, 14, 60,207, 35, 35, 35, 3,249,249,249,176,183,183,255,243,119, 12, 79, 38, 68, 42,232, 70,127,101, -181,154,193,193,193,159, 57, 59, 59,127,229,230,230,198, 86,136, 80, 99,246,236,217, 40, 40, 40,128,167,167, 39,228,114,249, 49, -134, 97, 64, 41,197,211,167, 79, 17, 28, 28,188, 48, 52, 52,244,139, 42,210,249,205,242,229,203,135, 54,107,214,204,125,236,216, -177,224, 56,110, 64,102,102, 38,126,252,241, 71, 88, 89, 89, 97,235,214,173,240,246,246,102,141, 70, 35,138,139,139,113,225,194, - 5, 92,185,114,165, 16,192,163,186,228,165,156,156,156,237, 71,143, 30,237,220,169, 83, 39,123, 0, 24, 52,104, 16,115,248,240, -225,140, 30, 61,122, 36,230,230,230,190, 94,190,186,176, 42,205,210,234,192, 89,221,187,119,159,222,187,119,111,187,204,204, 76, - 88, 88, 88,224,215, 95,127,197,150, 45, 91, 78,232,116,186,121,251,247,239,255,102,211,166, 77,253, 6, 15, 30,140,205,155, 55, - 79,149,203,229, 75, 85, 42, 21, 95,137,166,188,126,253,250,184,121,243, 38, 28, 28, 28,224,228,228,132,220,220, 92, 92,187,118, - 13, 97, 97, 97,104,222,188, 57, 8, 33,213, 86,141, 85,149,206,231,137, 84,213,102, 56,163, 23,165, 89,151,113,190,107,210, 84, - 40, 20, 62, 0,198, 0, 24, 89,250,209,110, 0, 63, 42,149,202, 71,255,228,190,191,148, 6,139, 16, 98, 58, 99,221, 41,165, 23, -202, 66,218,160,208,234,141,160, 70, 13,166,118, 45, 9, 69,127,178, 39, 0,133,106, 67,153,185, 42, 84,151,188,204,172,102,234, -253,253,143,191,227,244,239, 71,215,236,221,186, 28,201,201,201,208,104, 52,112,118,118, 70,203,150, 45,241,228,201, 19, 92,189, -122, 21,109,219,182, 5,195, 48,112,119,119, 7,128,122,213,223,180, 13,189, 95, 27,161,168,103, 52,230,224,206,195, 40,180,111, - 54, 6,217,249,106,228, 21,234,144, 91,168, 5,195,202, 81,223, 99, 36, 52,122, 75, 92,190,118, 10,157,218, 54,144, 68,221, 74, -251, 12,192,233,154, 99,250,122, 24,211,207, 80, 99,250, 89,202, 56, 4, 16, 86, 62,152,100,231,170, 17,123,101, 27, 85,197,157, -163, 40,205,232,122, 77,205, 79,223, 6,131, 97,178,139,139, 75,209,103,159,125,214,187,113,227,198,250, 73,147, 38, 69, 36, 36, - 36, 76, 42,191, 78,131, 6, 13,214,175, 95,191, 30,247,239,223,207, 88,180,104,209,233,244,244,244, 25,181,188,136,102, 19, 66, - 86, 3,128, 74,165,202, 60,124,248,112,224,165, 75,151,102,175, 90,181,202,253,195, 15, 63,148, 76,153, 50,101, 18,128, 26,123, - 95, 16, 66,252,187,119,239,126,238,167,159,126,178,118,115,115, 35,132, 16,232,116, 58,100,100,100, 32, 35, 35, 3, 57, 57, 57, - 40, 42, 42, 66, 65, 65, 1, 24,134,185,107,198,121,103,243,242,242,144,147,147,131,192,192, 64,132,133,133,121, 95,190,124,121, -231,134, 13, 27,140,111,191,253, 54,211,189,123,119,146,153,153,137,131, 7, 15,242, 41, 41, 41,140,133,133, 69,129,249, 17, 54, - 56, 88, 90, 90,136,175, 93, 61,126, 56,254,254,141,212,132, 39, 55,179, 9,161, 36, 41, 73,153,213,162, 69, 15, 71, 80, 56,152, -171, 21, 31, 31, 63,250,227,137, 19, 27,217, 57, 56,192, 96, 48,192,201,201, 9, 73, 73, 73, 40, 42, 42, 66, 97, 94, 30,138, 11, - 10,160,206,203,195,221, 51,103,208,233,213, 87,209,183, 93, 59,175, 99, 81, 81,239, 3, 88, 87,157,174,182,105, 83, 60, 57,119, - 14,132, 16,212,239,222,189,236,243,167,215,175,151,153, 45,219,222,189, 65,100, 50,136, 62,171,123,231, 24,149, 74, 21,217,160, - 65,131,227,253,250,245,123,117,252,248,241, 76, 90, 90,218, 73,185, 92,254,138, 74,165,138, 49, 55, 82,229,234,234,134, 71,143, -226,237,150, 47, 95, 62, 47, 49, 33,145,184,185,186, 99,244, 59, 35,161, 86, 23,227,205, 81, 35, 96, 97, 33, 33,246,246,118,182, -102, 70, 46,230, 0, 8, 44, 93, 12, 51, 25,153,228,228, 18,207, 39, 18,137, 58, 68, 71, 71,187,150, 68, 34, 91,152,221,254,138, -231,121,250,224,193, 3,220,190,125,187,228,216,217,218,194,202,202,170,108,146,119,147,185,170,202, 96, 85,134,169, 74,209,100, -174, 50, 50, 50,240, 32, 33, 14,251,207,254, 8,189, 81,231,116,240,163,184, 84,177, 88,124, 51,167, 32,235, 51,217,230,246,145, - 53, 84, 23,142, 93,182,108, 25, 91,122,255,122,134,164,164, 36,228,230,230,194,198,198, 6,246,246,246,101, 85,154,153,153,153, -248,232,163,143,198, 86,102, 92, 1, 64,169, 84,166, 41, 20,138,193,211,167, 79,255,227,199, 31,127,148,140, 26, 53,170,172, 42, -212,104, 52,162,160,160, 0,103,206,156,193,165, 75,151,160, 84, 42,179, 52, 26,205, 65, 0,223, 43,149,202,152,218,230,163,192, -192, 64, 71, 43, 43,171,101,147, 39, 79,182, 53, 25,195,209,163, 71, 75,223,120,227, 13, 40,149,202,150,107,214,172,217, 3,160, - 77, 77,213,129,142,142,142,135,247,237,219,215,183, 73,147, 38, 37,247, 73,189, 30,151, 47, 95,198,248,241,227,159,234,116,186, -215, 85, 42, 85,161, 92, 46,159,123,236,216,177,126,237,218,181, 67,235,214,173,221,158, 60,121, 98, 3, 32,183,138,243, 14,163, -209, 88,118,126,182,110,221,250,140,121, 5, 0,157, 78, 71,218,183,111,239, 19, 30, 30,254,232, 5, 68,170, 18,203, 45, 39,254, - 47, 11,106,133, 66, 97, 5, 96, 56,203,178, 44,183,111, 31,196,239,191, 15,221,131, 7,207, 68,174, 76,145, 44,221,224,193,102, - 53,174, 54,105, 2,120,199,201,201,169, 75, 80, 80, 16, 17,137, 68, 24, 50,100, 8,142, 29, 59,246,197,201,147, 39, 63, 87, 40, - 20,127, 0,216, 1, 96,159, 82,169, 44,252,187,246,175, 42, 15,242,210, 68,176, 40,165,164,116, 39,203,234, 39, 40, 79,169, 70, -103, 64,161,250,207, 39,240, 66,181, 30, 5, 69,122, 20,168,245, 40, 82,235, 64, 41, 80,164, 49,111,122, 31, 75, 75, 75,232, 96, -137,142,189,134, 99,208,144,215,112,236,252, 57, 36,220,190,136,144,129,253,193,243, 60,156,157,157, 49,102,204, 24,236,219,183, - 15,118,118,118,176,180,180,172, 57,148,237,100, 8,105,238, 43,231,120,163, 8,221,253,166,195, 72,109,145,157,175, 65,110,161, - 22, 15, 31, 95, 67,118,110, 54,138,138,117, 40, 42,206,128, 78,235,131, 22,246,109,192, 48, 39,124,107,233,255,193,103,135, 83, - 62, 59,156,158, 57, 21,247,151,111,117, 26,243,170, 55, 88,150, 93,121,226,196,137,206,175,188,242, 10,215,187,119,239, 0, 15, - 15, 15, 69,114,114,178, 18, 0, 60, 60, 60, 20,253,251,247, 15,112,118,118,198,234,213,171,213, 44,203,174,172,227,211, 79,249, -246, 90, 87,229,114,249,188, 3, 7, 14,108,155, 48, 97, 2,220,220,220,252,204,209,176,179,179,155,180, 99,199, 14,107,119,119, -119, 98, 48, 24,160, 86,171,145,150,150,134,236,236,108,100,103,103, 35, 49, 49, 17, 89, 89, 89, 72, 73, 73, 41,124,252,248,241, - 47,230,166,237,243,207, 63,135,193, 96,208,191,255,254,251,162, 30, 61,122, 96,231,206,157,108,124,124, 60, 54,109,218,100,220, -187,119,239, 99,134, 97,184,225,195,135, 55,168,229,165,153,145,148,244, 40,165, 32, 63,189,120,112,223,192,185, 25,143, 83,225, -236, 61, 24, 7, 78, 30,249, 58, 33, 49,142, 39, 12, 49,187,103,170, 37,199,245, 15,232,216, 81,148,154,154,138, 70,141, 26, 33, - 57, 57, 25,247,238,221,131, 86,171, 69, 97,110, 46,244,121,121, 48,102,103,131,230,229,225,241,197,139,104,209,168,145,228,247, -168,168,126, 53, 25, 44,158,231, 65, 8,169, 50,106,197, 48, 12,136,149, 21, 96,101, 5,202,212,110,228, 20,185, 92, 62,216,214, -214,118, 86, 94, 94,222,113,149, 74,245,181, 94,175,255,112,241,226,197,237,191,250,234, 43,167,153, 51,103,218,206,154, 53,107, -175, 92, 46,247, 83,169, 84,213, 85,237,252, 37, 82, 53,242,173, 55,201,204, 79,103, 35,238,126, 44,126,218,177, 27,111,142, 26, -129, 61,187,246, 34,184, 79, 15,148, 70,184,204, 42,171, 31, 61,122, 52,168, 52,138,217, 8,128, 67,155, 54,101,229,114, 32,165, - 20, 6,131, 1,169,169,169,230,230,109, 74, 8,225, 9, 33,180, 73,147, 38,200,206,206, 6,203,178,176,178,178,130,181,181, 53, -154, 55,111,142, 39, 79,158, 60, 99,176,204,173,110, 53,181,187, 50, 21,222,167,175, 28, 69,102, 97, 10,182, 44,219, 13, 15,183, -250, 12, 0,231,228,212, 39,189,223,157, 62,162,195,161,143, 30, 46,193,242, 78,139,171,169, 46,220, 54,107,214,172,111, 42, 54, - 1,240,244,244,196,132, 9, 19,112,244,232, 81,220,191,127,255,153,241,114,158, 62,125,202, 3,168,182, 19,142, 82,169,140, 80, - 40, 20,111,189,246,218,107, 63,248,248,248,184, 82, 74,209,182,109, 91,188,245,214, 91, 88,190,124, 57, 46, 92,184,240, 11,128, -205, 0, 46, 1, 96,149, 74,165,182, 14, 5,121, 61,169, 84,122,125,237,218,181,222, 13, 27, 54,100, 84, 42, 21,174, 94,189,138, -160,160, 32, 0, 64,227,198,141,161,215,235, 61,107, 50, 87,118,118,118,135, 14, 30, 60,216,183, 97,195,134,184,123,247, 46, 46, - 93,186, 4,103,103,103, 72,165, 82,132,132,132,212,251,229,151, 95, 62,148,203,229, 43, 69, 34,209,194,254,253,251,195,104, 52, - 34, 34, 34, 34, 5, 64,126,117,231,168, 42,212,106, 53, 40,165, 16,139,197,171, 9, 33,175, 43, 20,138, 62, 74,165,242,185, 26, - 69,255, 91,218, 92,181,106,213,106,186, 84, 42,253, 50, 40, 40, 72,118,245,234, 85,208,226, 26,155,237,177,133,133,133, 31, 1, -248,182,170, 21,130,131,131,103,136, 68,162,249, 65, 65, 65, 50,119,119,119, 20, 22, 22, 34, 43, 43, 11,153,153,153,152, 53,107, - 22,166, 77,155,134,169, 83,167,146, 43, 87,174,116, 57,122,244,104,151,203,151, 47,175, 81, 40, 20,179,149, 74,229, 15,127,215, -126, 86,230, 65, 94, 26,131, 85,186, 99,221,159,181, 21,128, 90,107, 64, 90,142,161, 52,114,165,135,234,169, 14,170,251,127, 64, -172, 77, 68,161,154,131,196,163, 59,138, 53,230, 87,121,171,178,212,184,122, 59, 5, 46,246, 28, 2,218,116, 68,239,158,254,184, -124,237, 14,238,222, 61,132,161, 67,135,194,194,194, 2, 57, 57, 57,200,207,207,135, 76, 38,171, 57, 50,164,231, 90,186,215,243, -129,157,117, 11,164,102, 21, 34,183, 64,131,188, 34, 45,242, 10,180,136,141, 61,130,236,204, 88,232,181, 90, 24,180, 6, 48, 18, -111,100,105, 7,195,218,198, 86,210,168, 81,127,201,131, 7, 39,180, 47,226, 32,234, 53,121,102,197,108, 83, 82, 82, 82,229,114, -249,254,168,168,168, 55, 94,127,253,117,156, 59,119,110, 42, 74,122,195,192,194,194, 98,234,235,175,191,142,168,168, 40,196,196, -196,236, 79, 73, 73, 73,125, 17,105,227,121,190, 80, 95, 90, 69,101,105,105, 41, 54,211, 8,246,115,113,113, 33, 58,157, 14, 79, -159, 62, 69,102,102, 38,158, 62,125,138,226,226, 98, 20, 20, 20,192, 96, 48, 64,175,215,227,250,245,235,169, 70,163,241,106,109, -210, 19, 27, 27,235, 57,109,218,180,137, 61,123,246, 92, 16, 18, 18,130,195,135, 15, 99,215,174, 93,239, 2,248, 37, 40, 40,232, - 78,109,247,207,192,211,171, 27,214,253,224, 56,238,253, 55, 60, 46, 69,132,175,254,117,127,254,123, 65,129,155,150,121, 53,104, -231,178,101,235, 57, 43, 35, 79,207,152,111,163,209,174,158,171, 43, 30, 63,126,140,240,240,112,168,213,106,104, 52, 26,104, 52, - 26,232,178,179,161,207,202, 2, 41, 44,132,133,193, 0,245,147, 39,104,216,186, 53, 64, 72, 43, 51,110, 28,213, 86, 11, 50, 12, - 3, 88, 89,149,152,172, 90,152, 2,185, 92,174,240,243,243,251,117,227,198,141,226,233,211,167,119,144,203,229, 63,168, 84,170, - 4,185, 92,222,107,217,178,101, 97, 95,127,253,181,197,168, 81,163,154,109,216,176, 97, 12,128,141, 85,233,216,219,219,217, 86, -140, 84,217,218,216,226,149, 87, 94,193,137, 99, 39,240,238,123, 99, 96, 97, 33,193,160,161, 3,176,115,199, 46,148, 86, 31,154, -251,100,138,140,140, 12, 0,112,136,140,140,116, 21,139,197, 40,141,136,186,250,249,249,165,181,105,211,230,112,105,148, 43, 80, - 46,151, 31, 50,163, 39, 33, 53,233, 58, 57, 57,149, 85, 9,154,170, 11, 93, 93, 93,145,155,155, 91,167, 8, 86,110,110, 46,114, -115,115,113,255,241, 93,100, 22,166,224,244,238,171, 48, 26,141,101,209, 17,185,171, 39,206,236, 9,179,233, 49, 34, 96,206,143, - 19,174,159, 93,121, 11,149,134,177, 66, 67, 67, 23, 5, 7, 7, 31, 74, 75, 75, 43, 63, 53,199, 43, 58,157,110,161, 94,175, 71, - 66, 66, 2,238,220,185,243, 13,128,242,121,243, 73,104,104,104,141, 81, 23,165, 82,121, 64,161, 80, 28,141,138,138,242, 1,240, -150,163,163,227, 60,131,193, 0,158,231, 1,224, 55, 0, 81, 0, 78, 57, 59, 59,119, 81, 40, 20,191, 42,149,202, 81, 53,156, 31, - 18, 24, 24,248,186, 84, 42, 29, 87, 88, 88,184, 75, 42,149,206, 91,183,110,157,183,175,175, 47,147,152,152, 8,189, 94,143,196, -196, 68, 62, 60, 60,188, 48, 32, 32,192,230,244,233,211,249, 12,195,108,171, 38, 79,138,172,173,173,127, 59,112,224, 64,191,134, - 13, 27,226,194,133, 11, 88,188,120, 49,154, 52,105,130,109,219,182, 33, 40, 40, 8, 13, 27, 54,132,163,163,227, 71,121,121,121, -157,150, 44, 89,242,170,191,191, 63, 14, 30, 60,136,244,244,244, 53,213, 13,217, 96, 48, 84, 93,206, 20, 23, 23,131, 82,138, 94, -189,122,141,255,228,147, 79, 48,104,208,160, 83, 1, 1, 1,129, 17, 17, 17,247,204, 56,253,255,154, 72, 85, 21,251,253,149,147, -147,147,244,225,195,135,160,148, 66, 55,106, 20,116, 67,134,252, 37,114,197, 53,104,128, 75,245,234,193, 93,161, 64,198,211,167, -223, 40, 20,138, 85, 74,165, 82, 87, 69,176, 99,209,132, 9, 19,184,132,132, 4,220,189,123, 23, 89, 89, 89,127, 49,176, 28,199, -161, 75,151, 46,240,242,242, 66,247,238,221,101, 11, 22, 44, 88, 9,224,111, 51, 88,149,121,144,151, 59,130, 69, 65,139,212,122, -228, 22,232, 81, 80,172, 71, 78,110, 46,116,143,246, 97,233,167,239,161,121,171, 22,136,139,127,132, 69,223,172, 65,102,154,163, -217, 27, 76,206, 84,195,152,242, 43,210,115, 60,240,196,186, 13, 94,111,176, 29,106,191,207,241,211,186,227,101,166, 42, 63, 63, - 31, 5, 5, 5,176,182,182,174, 81, 79, 93,108,113,235, 73, 74,145,127,113,113, 52,142,158,223, 4,222,104, 1,119,249, 80,232, -121, 7, 88,217,117, 71, 70,114, 44, 12,106, 61, 0, 10, 74,164,224, 41, 69, 81, 97,129, 49,169, 38,115, 69,205, 55,141,122, 77, -126,109,110,228,219,126,250,233,167, 33, 43, 87,174,148, 12, 28, 56,176,185, 92, 46,239, 10, 0, 35, 70,140,104,110,107,107,139, -159,126,250, 73,107, 52, 26,183,189,160, 12,203,184,187,187,191,219,185,115,103,164,165,165,225,209,163, 71,102,153, 33,134, 97, - 78,220,184,113,227,189,250,245,235,147,196,196, 68, 36, 37, 37, 33, 43, 43, 11,118,118,118,112,116,116,132,155,155, 27,120,158, - 71,113,113,177,235,173, 91,183, 20, 0, 78,152,155,166,148,148,148, 44, 0,203,139,139,139, 23,112, 28, 7,181, 90, 13,177, 88, -188, 95,167,211,213,105, 44,156, 59,119,238,111, 23,177,164,157,133,165, 70,218,171,123, 91, 75, 7,123,123,198,197,153,183,187, -112,225,166, 77,106,106, 78,218,237,219,247,205, 63,150,148,146,226,236,108,168,110,222, 68, 94,118, 54,138,243,243,161, 46, 40, -128, 33, 39, 7,238, 77,154, 0,133,133, 96,212,106,112,106, 53, 68, 60, 15,169,149, 21, 64,105,141,110,200,226,234, 85,184, 15, - 44, 25,190, 37, 43, 44,172,204, 84,217,244,237, 11,200,100, 32, 50, 25,244, 7, 14,128,101, 89, 80, 7, 7,160, 92,213, 71, 53, - 5,153,147,155,155,219,225, 53,107,214,136,179,178,178,112,251,246,237, 27, 42,149, 42, 87, 46,151,219, 0,224,239,221,187, 23, - 26, 27, 27, 59,208,215,215, 23, 0, 26, 85,167,149,147,147,155,247,232,113,188, 93,249, 72, 85,143, 94, 93,113,249,242,101, 72, -165, 82,132,134,158,129,157,157, 45, 60, 60, 60,241,240, 65, 60, 0,164,181,111,223,158, 18, 66,248,176,176, 48,182, 38,115,105, -106, 56,110, 52, 26, 17, 29, 29, 13,134, 97,254, 98, 54,111,222,188,233, 10, 96, 80,219,182,109,107,140, 98, 13, 30, 60, 24,148, - 82,132,135,135,227,210,165, 75,184,116,233, 18, 30, 63,126, 92, 62, 2,139,211,167, 79,163, 71,143, 30,102,159,250,162,162, 34, -184,187,187,195,222,222, 30, 7,206,237,196,150,101,187, 97, 52, 26,145,159,255,231,181,157,153,153, 9,153, 76,134,175,167,175, -178,126,111,246,107, 11, 1,244,169, 74, 47, 52, 52,244, 46,128,187,165,209, 2, 2, 96, 89,112,112, 48,244,122, 61, 58,119,238, -140, 27, 55,110, 12, 4, 48, 63, 52, 52,180,214, 67,113, 40,149, 74,157, 66,161,112,117,118,118,158, 57,102,204, 24, 24, 12, 6, -244,237,219, 23,113,113,113, 63,103,102,102, 38,189,247,222,123,222,221,186,117,195, 23, 95,124,241,150, 66,161,248,162,186,118, - 52,175,188,242,202,103, 35, 70,140,152, 59,100,200, 16,203, 75,151, 46,117, 42, 46, 46,102, 61, 61, 61,153, 7, 15, 30,192,104, - 52,226,242,229,203,134, 83,167, 78, 37,233,116,186, 37,183,110,221, 10, 42, 42, 42, 58,168, 84, 42,143, 84,147,188,233, 59,119, -238,236,223,180,105, 83,156, 60,121, 18, 19, 39, 78, 60,106,107,107,219, 58, 36, 36,196,203,202,202, 10, 55,110,220,128, 94,175, -135,187,187,187,235,236,217,179, 7,246,237,219, 23,103,206,156,193, 87, 95,125,117, 20,192,138,154, 76, 48, 87,218, 54,178,226, -131, 74, 84, 84, 20,122,246,236,137, 89,179,102,129, 16,130,208,208, 80,219, 62,125,250,220,234,222,189,187,109, 77, 13,243,171, -138, 84,253, 91,122, 17,202,100, 50,246,240,225,195,248,245,215, 95,177, 99,199, 14,108,220,184, 17, 67,135, 14,133,233,105, 89, -171,213,226,200,145, 35,184,171, 80,192,162,117,107,180,175, 95, 31,199,143, 31,103, 81,205, 92,195, 41, 41, 41,220,176, 97,195, -112,245,234, 85,120,120,120,224,222,189,123,136,142,142, 46, 51,177, 60,207, 35, 54, 54, 22,247,239,223,199,253,251,247,193,243, - 60, 40,165,162,191,115, 63, 95,234, 8, 86,229,143,138,148, 22,169,245,200, 43, 40, 70,198,163,171,240,181,203,196,234, 95,182, - 34,238,201, 31,184, 28,253, 59,180,122, 41,222,154, 56, 26,187, 55,254, 2,106,100,107, 60, 40, 60,207,163, 30,137, 70,223,183, -250,227,196,185, 43, 8,139,183,196, 23,197, 99,225,228,196, 66,171,213,150,153,170,188,188, 60,228,231,231,155,101,176,120,189, -230,236,245,168,172, 81,131,123,251,138,210,211, 30, 66,171,209,128, 21, 7,130,114,150,208,179,141, 33,171, 63, 23,185,247,231, - 2,212, 8, 43,231,158,200,200,202,131,193,200,215,248,148, 66, 13,102, 55, 3, 50,171, 13,150,137,180,180,180,108,119,119,247, -159,175, 92,185, 50,118,232,208,161, 56,125,250,244,135, 0, 48,116,232, 80, 92,185,114, 5, 15, 31, 62,252, 57, 45, 45, 45,187, -150, 70,202, 25, 37,131,170,149, 69,189, 92, 93, 93,125,189,188,188, 62, 26, 63,126,124,167, 54,109,218, 96,231,206,157,128, 57, -237,206, 74, 10,146,245,211,167, 79,239, 55,109,218, 52,119, 66, 8,137,139,139, 3, 33, 4, 46, 46, 46,168, 95,191, 62, 28, 29, - 29,145,147,147, 3,133, 66, 97,221,160, 65,131, 33,230, 26,172,210, 39,164,250,168,208,198,130, 82, 42, 1, 96, 79, 41,229,234, -112, 81, 26, 91,182,108,180,246,206,157,172,159, 29, 29,210, 53, 28,167,203,248,237,200,237,150,209,183,115, 29,140, 70,238,205, - 90, 13,209, 64,200,141,135,113,113,190,148,231, 81,144,157, 13,109,126, 62, 12,217,217, 48,100,101,129,184,187,131, 83,171,193, -106, 52, 96,181,106, 88, 90,202,144,155,158, 14, 66, 72,141, 13, 61,203, 55,114,175, 44,106, 69,172,172,254,172, 42, 36,196,172, - 70,172, 18,137,228,231,141, 27, 55,186,187,187,187, 99,198,140, 25,112,119,119,111,222,171, 87,175,162, 14, 29, 58, 72,157,156, -156,208,180,105, 83, 4, 4, 4,224,236,217,179, 0,240,160, 6,185, 53,203,150, 45,155,247,214,168,145,196,206,214, 14, 61,130, -187,226,183, 3,135, 33,149, 74,209,174, 93, 59,120, 63, 13,195,199, 86,103,113,197,122, 0,194,197, 98,140, 29, 59,118,237, 91, -111,189,133,206,157, 59, 51,102,156, 31,147,193,146,181,111,223,190,124,245,181, 76,169, 84,186, 82, 74, 7, 5, 4, 4,192,104, - 52, 62, 99,146,204,185,151,112, 28, 87,118,204, 42,137,194,254,197,196, 85,153, 47,121, 99, 82,191,119, 58,253,121, 61, 27,116, - 78, 30,110,245, 25, 83,228, 10, 40,233,229,108,138,232,212,171, 87, 15, 58,173,174,109, 45,178,233,187,141, 27, 55, 86,116,236, -216, 17, 9, 9, 9,104,215,174, 29,154, 52,105,210,250,222,189,123, 19, 80, 67,245,114, 21, 5,127, 83, 59, 59,187, 35,223,124, -243,141,216,214,214, 22, 81, 81, 81,104,209,162, 5,150, 47, 95,206,197,197,197,121, 55,107,214, 12,119,239,222, 69,114,114,242, -195,234,204, 85,105,228,252,131, 15, 62,248,192,242,201,147, 39, 24, 62,124,184,101,124,124, 60,110,223,190, 13, 74, 41, 34, 35, - 35, 13, 7, 15, 30, 76, 42, 44, 44, 12,140,138,138,202, 4,176,169, 6,211,207,248,250,250,126,212,184,113, 99,156, 57,115, 6, -147, 39, 79, 62, 97, 48, 24,134,103,101,101, 77,208,106,181,223, 15, 28, 56, 16, 65, 65, 65,136,141,141,197,160, 65,131,202,242, -231,140, 25, 51,142,233,245,250,225, 53,140,131,117,239,252,249,243,173, 3, 2, 2, 80, 88, 88,136,252,252,124,136, 68, 34,216, -219,219,227,206,157, 59,104,210,164, 9,102,205,154,133,149, 43, 87, 98,218,180,105,124,159, 62,125, 12, 58,157, 78, 44,121,190, - 97, 11,254, 53,189, 8, 9, 33,104,214,172, 25, 22, 47, 94,140,180,212, 84,172,157, 62, 29,214, 51,102, 64,103, 52, 34,113,212, - 40,200, 90,183,134, 77,135, 14,144, 72, 36,102, 71,192, 9, 33,176,176,176, 64,163, 70,141,224,237,237,141, 86,173, 90, 33, 58, - 58, 26, 51,103,206,132,143,143, 15, 30, 63,126, 12,163,209, 8,177, 88, 12, 91, 91, 91, 8,212,209, 96,209,210,167,112, 90,225, -105,156, 26, 13,204,207, 91,150,192,141,215, 96,242,228, 65,104,219,174, 25, 34,239, 29, 70,145, 58, 15, 4, 34, 24,140, 58, 20, -106, 11, 49,252,221, 81, 88,178,100, 95,205,103,149, 0, 29, 90,186, 65,103,204, 66,243, 70,114,156, 60,158,136,172, 2,111, 52, -211,104,161,211,233, 80, 80, 80,128,252,252,124, 60,120,240, 0, 77,155, 54,133,149,149,149, 25, 37,172,241,204,217,179, 23,178, - 7,245,238,232,226,229,166,192,237, 59,103,161, 49,216,163,168,184,164, 29, 86,126,177, 24, 70, 86, 14,142,102,162,161,175, 31, -162,148,215,243, 41,111,220, 90,227, 61, 87,147, 69, 25,207,183, 8,159,114,144,194,168,174, 34,212,195, 66, 36,177, 70, 81, 97, - 30,143, 90,140, 89,100,105,105,185,115,247,238,221, 35, 58,117,234,100,213,163, 71,143,198,165, 55, 58,253,238,221,187, 11, 45, - 45, 45,119,214,242,194, 91, 64, 8,230,129,130,145, 72, 36,191,215,171, 87,239,148,181,181,117, 96,223,190,125, 27,247,237,219, - 23,141, 26, 53,194,254,253,251,113,224,192,129,211, 41, 41, 41,127,152,105, 90,162, 8, 33,131, 30, 61,122, 52,198,221,221,189, -127,219,182,109,221,125,125,125, 45,237,236,236,192,113, 28, 10, 11, 11,145,153,153, 9,173, 86, 11,163,209,216,200,220,180,122, -123,123,195,221,221,125, 14,128,249,165, 85, 61, 4, 0, 68, 34,145, 78,175,215,191,225,225,225, 97, 85,151, 76,156,147, 83,188, -105,241,226,105,109,123,245,234,133,188,188, 60, 28, 59,118,204, 59, 37,109, 7, 30, 63,126,252, 35,128, 32,179,141, 50,165, 39, - 34, 34, 34, 6,116, 9, 10,178,120,164, 84,194,144,147, 3, 99,118, 54, 56,157, 14, 92, 97, 33, 88,141, 6,164,184, 24, 94,126, - 50,128,119, 69,216,195, 36,131,142,231,127, 55,215, 96, 81,134, 41, 43,248, 89,150, 5,177,182, 46, 49, 88, 50,217, 51, 6,171, -166, 27,164, 92, 46,151,245,233,211,167,151,191,191, 63, 40,165, 88,182,108, 25,180, 90,173, 68,175,215, 67,175,215, 67,167,211, - 33, 63, 63, 31, 7, 14, 28,192,142, 29, 59,174, 0,216, 94,195, 19,252, 23, 10,133, 2, 55,111, 68,127, 62,112,224, 0, 28, 61, -122, 12, 82,169, 20, 86, 86, 86,104,216,176, 33, 34,243,242,240,161, 72,129, 22,238, 45,208,167, 79, 6,218,182,109,139, 59,119, -204,171,205,229,121, 30, 58,157, 14,177,177,177,214, 98,177,216,218, 84,213,211,164, 73,147, 52,131,193, 96,125,239,222, 61, 0, - 72,243,247,247, 15, 43,205,123, 97,230,234,246,234,213, 11,125,250,244, 41,171, 14,116,113,113,129, 86,171,133,193, 96, 48,219, - 92, 1,192,163,171, 89, 1,211,148,237, 1, 99,201,143, 14,126, 20,151, 10,160,172,122, 47, 55, 55, 23, 79,158, 60, 65, 66, 66, - 66,169, 1,211,131, 82,243,158,178,131,131,131, 25, 0, 95,142, 30, 61, 26, 41, 41, 41, 88,176, 96, 1,230,206,157,139,225,195, -135, 99,209,162, 69,243,131,131,131, 55,135,134,134,234,107,153,229,223,157, 50,101,138,181,139,139, 11,182,110,221,138,195,135, - 15,167,181,109,219,214,245,189,247,222, 67,211,166, 77, 17, 19, 19,131,213,171, 87,103,234,116,186, 33,102, 84, 63, 61, 12, 11, - 11,115,211,233,116, 72, 78, 78, 46,139, 92, 36, 39, 39,243, 23, 46, 92, 72, 42, 42, 42, 50,153, 43,115,176, 9, 8, 8,112,141, -139,139,195,238,221,187,161,211,233,230,169, 84, 42,157, 92, 46,223,245,195, 15, 63,204,247,245,245,117,236,218,181, 43,130,130, -130, 64, 41,197,145, 35, 71, 48,127,254,252, 99, 58,157,110,152, 74,165,170,169,167,212,208,133, 11, 23, 46,172, 87,175,222,235, -163, 70,141, 98, 20, 10, 5, 34, 34, 34, 96, 52, 26,209,171, 87,175, 50,115,117,242,228,201,159, 79,158, 60,249, 26, 0,177,181, -181,181,165, 57,195, 74, 16, 66, 66, 0,152,218,163, 20, 81, 74,143,252,155, 11,109, 87, 55, 55,188,245,249,231,200,207,207,199, -143, 63,254, 8,107, 63,191,178, 42,242,210, 26,136,218, 27, 1,142,131,151,151, 23, 60, 61, 61,177,121,243,102,220,184,113, 3, - 98,177, 24, 38,131,250, 28, 67,199,152, 29,189,170,204,131,188,212, 17, 44,194,176,116,241,162, 5, 72, 74,143, 69, 86,110, 50, -174,220,220, 95, 46, 83, 82, 48,132,130, 33, 0, 43, 22,129,144,154, 79,170,209, 96,132,133, 37, 69, 81,174, 22,205,154, 52,132, -207,217,195,136, 76,171, 7,134, 33, 16,151,246, 74,147,201,100, 72, 73, 73,193,241,227,199,141, 45, 90,180, 96,107,210, 76,191, -125, 56,221,181,221,107,243, 86,111,222,183,106,252,219,159, 88,169, 53, 50, 36, 38, 41, 97,176, 12, 68,110,129, 22, 26,157, 1, - 86,245, 94, 67, 11,111,123,164,167,103,210, 39, 15, 99, 99,210,110,252,186,185, 6,217,213, 35,134,245,156,249,249,140,241,110, - 45,154,205,182,164,233,199, 65,115, 35, 41, 76,193, 16,194, 64, 98,229, 4,202, 74,168,242,238,211,252,115, 55,139, 51, 1,172, - 54,247,160,199,199,199, 23,202,229,242,109, 83,167, 78,253, 54, 60, 60,204,181,180,144, 75, 75, 78, 78,158,165, 82,169,204,238, -169, 65, 8,113, 32, 4,115,121,158,178, 0, 32,149, 90,246,251,228,147, 79, 60,130,130,130,116, 98,177, 24,137,137,137, 88,186, -116, 41, 46, 95,190,252, 83, 74, 74,202,247,180, 22,253,123, 41,165,145, 0, 34, 9, 33,159, 71, 71, 71,247,233,217,179,231,178, - 38, 77,154,212, 55, 24, 12,200,205,205, 69,118,118, 54,238,221,187,135,226,226,226,184,154,180, 18, 19, 19,127, 79, 74, 74,234, - 59, 97,194, 4, 4, 5, 5,141,219,177, 99,199,232,242, 23, 82,227,198,141,163, 67, 66, 66,234,219,217,217,137,139,139,139,245, -247,238,221, 59, 87,155, 76,172, 82,169, 94, 25, 61,122, 52,125,240,224, 1,114,114,114,176,109,219, 54,211,231, 65,181,209,105, -208,160,193,206, 35,161,161, 51,218, 53,107,214,204,219,199, 7,113,167, 79, 67,172,213, 66,100, 48,128, 45, 42,130, 72,167,129, -183,194, 10, 98,169, 19, 82, 30, 23, 99,119, 76,204, 99, 74,233,166, 26,171,159,186,118, 69,174, 82, 9,150,101, 97,243,234,171, - 32, 50, 25,168, 76, 6,195,222,189,101,198,138, 91,184,176,196,108,245,236,105,206,254, 22, 53,110,220, 56,226,238,221,187,237, -155, 53,107,134, 47,191,252, 18, 79,158, 60, 1,207,243,200,204,204, 84,167,167,167, 39, 63,125,250,244, 49, 74,198, 63,218,108, -206, 84, 36,165, 38,235,243,192,192, 14,184,125, 59, 6,114,185, 28, 62, 62, 62,240,240,240, 64, 92, 92, 28,108,108,108, 32, 22, -139, 17, 26, 26,138, 39, 79,158,160,113,227,198,230,230, 35,232,116, 58, 60,124,248,176,108, 95, 75, 11, 0, 89,135, 14, 29, 76, - 17,173,108, 0, 97, 42,149,106,113, 45,242, 39, 88,150,253, 75,143,193,218,154, 43, 19, 43, 21,225,152, 16,169,224,165, 6,142, -112, 28, 23,149,156,250,164,175,220,213, 19,233,233,233, 72, 76, 76, 68, 98, 98, 98,217,126, 63, 74,120, 8,137, 68,124,195, 76, -233,238,222,222,222, 30,158,158,158,216,180,105, 19,212,106,245,131,223,126,251,173,209,219,111,191,141, 6, 13, 26, 56, 63,126, -252,184, 15,128, 99,181,141,172,200,100, 50, 20, 23, 23,227,200,145, 35, 79, 1,120,223,188,121,243,205,153, 51,103,174,242,244, -244,180, 77, 72, 72, 72,213,233,116, 61,149, 74,101,108, 77, 66,121,121,121,163,103,206,156,185,159,231,249,134,173, 90,181,226, - 6, 13, 26,100,229,233,233,137,240,240,240, 66,141, 70,243,117, 45,204, 21, 0,228, 95,186,116, 41,173,101,203,150,174,114,185, - 28, 34,145,104,137, 92, 46,255,154, 97,152,229, 33, 33, 33,142,191,254,250, 43,246,237,219, 7, 43, 43, 43,196,199,199,171,238, -222,189,187, 26,192,119,230,140,224,174, 84, 42,227, 1,140, 84, 40, 20, 11, 86,175, 94, 61,143, 16, 50,250,212,169, 83,101, 99, -157,153,204,149,143,143,207,152,189,123,247,142,170,109, 45,156,105,200, 1, 66, 72,235,242,183,174,127, 73,219, 44,189,193, 96, -144,120,120,120, 32, 53, 53,181,172,138,212,198,198,230, 25,227,195,113, 28,108,108,108, 76, 61, 98,141,168,102,134, 3, 0, 6, -189, 94,207,121,122,122, 34, 45, 45,173, 76,147, 97, 24,232,116,186, 50, 99,197,113, 28,108,109,109, 77,215,212, 75, 59,229,212, -255,172,138,240,145,234, 38, 24,194,192, 74,234, 0, 75,137, 53, 12, 70, 61, 12, 70, 29,212, 90, 30, 5,106, 64,162, 6,178,138, -180, 85, 25,128,214,229,199,202,200,203,203,187,188,106,253,190, 87,134, 12,106, 15,137,184, 0,111,190,218, 26,141,110,158, 66, - 70, 14,240,123,244, 77, 88, 88, 88, 32, 36, 36,196, 52, 34,115,211,232,232,232,143, 42,102,236,138,154, 0,144,118, 99,223, 22, - 55,191,145, 61,151,229,230,190,250,218,176, 17,214,245,189,115,145,152, 73,144, 95,172,131,149,165, 8, 82,139,250,136,185, 29, -173,141,189,117, 86,165,215,232,134,215,148,206,152,120,186,169, 85, 3,114,118,212,164,121,159,250,183,242,237, 63,125,194, 96, -167,166,245, 7, 91,208,156,235,212,194, 38, 31, 98, 43,103,196, 62,202, 44, 58,118, 85,245, 52, 51,207,120,138, 24,176, 60, 38, -129,198,215,148,206,242, 60,125,250,244, 66,106,106,138, 75,185, 81,219, 93, 68, 34,241,133, 26, 12,213, 95, 52, 73,133,250,106, -173, 86,139, 83,167, 78,225,226,197,139,186,251,247,239,159,229,121,254,183,212,212,212,168,218,104, 86, 40,200,242, 0,236,181, -182,182,230, 53, 26,205, 87,253,251,247,111, 70, 8,193,131, 7, 15,112,246,236,217, 51, 25, 25, 25, 95,215,164,153,159,159,255, -254, 71, 31,125,180, 41, 56, 56,184,223,155,111,190,137,101,203,150, 73,238,221,187, 7, 74, 41,218,183,111,143,160,160,160,134, - 58,157,142,191,122,245,234,211, 99,199,142,237,210,104, 52, 75,107,147, 78,185, 92,126,117,254,252,249, 24, 54,108, 24, 50, 50, - 50,224,229,229,133, 29, 59,118, 64, 46,151, 95, 85,169, 84,157,204,221,247,189,123,247, 26, 3, 2, 2,134,124,183,109,219,149, - 41,195,135, 59,118, 12, 9, 65,242,213,171,208,170, 84,144, 24,141,144, 72, 44,161, 47,114, 65,150, 74,141, 45,183,111,231,106, -244,250, 97,229,199,192,170, 42,157, 60,207,255, 57,206,149, 76, 6, 88, 91,131, 41, 87, 45,104,138,102,177, 54, 54,128, 72,244, -151,167,197,202, 52,139,138,138,134,143, 31, 63,254,230,241,227,199, 29, 70,142, 28,137, 65,131, 6, 69,170,213,234, 30, 42,149, -202,172, 6,129, 85, 29,207,208,208, 80,140, 30, 61, 26, 58,157, 14, 6,131, 1, 69, 69, 69, 8, 12, 44, 25,105,225,201,147, 39, -208,233,116,136,142,142,254, 32, 38, 38,102, 45,199,113,124, 77,154, 38,131,101, 50, 86,166,125,190,123,247,174,181, 88, 44,182, - 38,132, 64,175,215,187, 54,109,218, 52,176, 54,233,164,148, 62, 99,174, 56,142, 67, 81, 81,145, 89,230,170, 42,205,141,254, 74, - 76,187,214,137,230, 21,229,204,123,119,250,136, 78,161,187,175,219, 88, 89, 89,149, 21, 62,141, 26, 53, 2,199,113,216,114,224, -251,194,167, 57,153,243,204,204,159,163, 58,116,232,128,162,162, 34, 68, 70, 70, 26, 1, 12,189,117,235, 86, 84, 65, 65,129,168, -109,219,182,120,252,248,241, 91, 85, 25,172,106, 52, 31, 36, 39, 39,195,199,199, 7,246,246,246,118,217,217,217, 6,165, 82,185, - 93,161, 80,236,189,127,255,126, 67, 0,143,149, 74,101,190, 57,154, 81, 81, 81,137, 0, 2,186,119,239,206,221,186,117, 43,189, - 75,151, 46,144, 72, 36,104,220,184,177,205,131, 7, 15,222, 70, 13, 61, 27,203,107,170, 84, 42, 94, 46,151,127, 23, 22, 22,182, -216,207,207, 15,111,189,245, 86,239,176,176,176,222,254,254,254,240,245,245, 69,118,118, 54,206,159, 63,255, 19,207,243, 19, 1, -168, 85, 42, 21,173,237, 57, 82, 42,149,247, 1,188,173, 80, 40, 94, 47, 45,252, 89,149, 74,197,158, 58,117, 10, 0,198,239,221, -187,215, 88,215,123, 93, 37,219,106, 80,215,188,244,156,213,129, 21, 53, 23,142, 28, 57,114,209,236,217,179,217, 54,109,218, 32, - 43, 43, 11,233,233,233, 48, 24, 12,160,148, 66, 34,145,192,219,219, 27,150,150,150,120,252,248, 49,162,162,162,140, 90,173,118, - 97,249, 6,238,149,104,206,123,235,173,183,190,153, 57,115,230, 95, 52, 75,107, 84,208,160, 65, 3, 88, 90, 90, 34, 62, 62, 30, - 81, 81, 81, 70, 0,243,254,238,125,255, 79, 25, 44,131,129, 79,237,247,230, 70, 90,133,251, 34,207, 22, 34,212,156, 94,111,221, -207,254,118,228,157,179,191, 29, 89,220,115, 72, 72,189, 33,131,218,163, 79,175, 14, 0, 8, 78,255,186, 31, 69, 69, 69,191,252, -240,195, 15, 35,108,109,109, 83,143, 28, 57,242, 16,192, 20,115,119, 36, 53,106,247,155, 46,173,135, 15, 94,181,234,251,117, 30, -245, 27,136, 29, 93,220,172, 89, 86, 34,122, 18,167,202, 75, 81, 37,240, 26,141,250, 23,171,252,252,105,230,246, 28,188, 93, 98, -152, 38,181,244, 37,254, 35, 63, 88, 49,163, 75,251,134, 65, 31,188, 25,224,152,203,231,210,223, 14,221,123, 26,159, 92,120, 13, -192,178,152,120, 26, 89,151, 3,175,211,233,116, 21,163,174, 58, 83,107, 96,243,159,226,179, 9, 33,223, 48, 12,153, 7, 10, 34, -145, 72,174,173, 93,187,118, 43,195, 48, 73, 90,173,246, 74,102,102,102,241,139,202, 40, 5, 5, 5,251, 9, 33, 17, 15, 31, 62, -156, 73, 8,113, 48, 24, 12,183,211,211,211,127,166,148,214, 56, 74,120,233, 96,151,253,229,114,121,143,139, 23, 47,174, 24, 52, -104, 80,219, 87, 95,125, 21,105,105,105, 96, 89, 22, 55,111,222,212, 30, 57,114,228,106,110,110,238,103,148,210,235,181, 77,155, - 74,165,234, 36,151,203,233,151, 95,126,249,151,207,107,171, 21, 17, 17,113, 47, 32, 32,160,219,215,219,183,239, 31,208,172,153, -119,211,134, 13,197, 13, 90,182,132, 84, 38, 67,238,211,167,184,241, 56,197,184, 51, 54, 54,190, 72,167, 27, 17, 21, 21,117,219, -204,115, 13, 39, 39, 39, 80, 74, 33,157, 51, 7,148, 16,240,148,162,128,144,178,177,125, 44, 58,116,128,129,101,145,157,159, 15, -115,178,129, 74,165, 74,146,203,229,195, 63,252,240,195, 51, 63,254,248, 35,211,189,123,119,191, 19, 39, 78, 60,239,164,185, 31, - 92,188,120,113,237,197,139, 23, 43,253,146, 97, 24,240, 60,255,129, 82,169, 92, 7, 51,219, 14, 21, 23, 23, 87,106,176,238,223, -191, 95, 49,162, 85,187, 71,122,189,254,153, 97, 14, 76, 67, 62, 60, 47, 43, 59, 94, 5, 54,183,143,252,109,234,131,197, 61, 95, -111,255,217,194,105, 43,173,157,156,157, 96, 48, 24,240, 40,241, 33,182, 30, 88, 83,152,175,206,254, 38, 59,166,230, 57, 56,131, -131,131, 45, 24,134, 25,234,231,231,135,168,168, 40,104,181,218,115,161,161,161, 49,193,193,193,191,223,188,121,115, 96,211,166, - 77,193,178,108, 72,112,112,176, 85,104,104,104,109,198, 24,122,144,156,156, 12,131,193, 0,103,103,103, 46, 59, 59,187, 1,128, -135, 74,165,178, 8, 64,116, 93,246,251,252,249,243,134, 46, 93,186,220,187,117,235, 86, 7,111,111,111,114,253,250,245, 66,181, - 90,189,179, 14, 82, 43,142, 29, 59,214,133, 82,218,207,223,223, 31, 94, 94, 37, 1,160,152,152, 24, 92,188,120,113, 55,207,243, -239,188,160,201,157, 41, 33, 4,121,121,121,166, 90, 14,157,181,181,117, 93,117,139,202, 69,174,138,254,109,133,180, 82,169, 92, -170, 80, 40, 14, 78,156, 56,113, 94,131, 6, 13, 70, 77,159, 62,157,109,222,188, 57,242,242,242,208,161, 67, 7,184,184,184,224, -238,221,187, 56,117,234,148,241,233,211,167,191, 0, 88,168, 84, 42,239,213,160,249,173, 66,161, 56, 48,113,226,196,121, 62, 62, - 62,163,166, 77,155,198, 54,111,222, 28,185,185,185,232,216,177, 35,156,157,157, 17, 19, 19,131, 19, 39, 78, 24,115,114,114,118, - 1,248,250,191, 50,223,227, 11, 53,203,117, 25, 21,246, 57,156,184, 41,226,192, 1,120, 7, 64,153,209,250,240,157,121, 80,169, - 84, 36, 36, 36,196, 5,128,225,200,145, 35, 89,117,121, 98, 32,132,144,122,173, 67, 26,179,148,243, 7, 33,245, 0, 26, 46,146, -177,209, 73, 87,247,170,159,231, 41,164, 85, 67, 18, 76, 41, 38, 1, 0, 79,176,238,238,195,234,187,255,155,163,201, 48,100, 49, - 74, 38,112, 5,128,101, 60, 79,103,215, 69,179,178, 70,238,207,123,142,254,142,243, 94,122,238, 9,128,145, 18,137,100,253,136, - 17, 35,172,183,111,223,174,201,200,200,152, 4,224,167,234, 26,164,155,147, 78, 66,200, 2,148,180,239,250,146, 82,186,224,121, -210, 89,126,178,103,148, 78,246, 12, 51, 38,123,174,168,217,177, 99,199, 52,189, 94,239, 82,171,167, 30,142,203, 52, 24, 12,238, -166, 41, 63,106, 56,158, 35,235,215,175,191, 36, 57, 57,249, 64, 82, 82,210, 39,255,166,243, 94, 97,160,209,154,168,180,138,176, -178,116,142, 24, 49,226,190, 78,167,243, 54, 71, 84, 36, 18,165,107,181, 90,175, 35, 71,142, 24,107,179,239, 19, 34, 21,216,255, -110, 84,123, 71,187,122, 11,181, 26, 93, 59, 66, 64,197, 98,241,205,167, 57,153,243, 42, 51, 87,149,105, 6, 7, 7, 59,214,171, - 87,239,233,130, 5, 11,176,126,253,122,220,185,115,103, 76,104,104,232,206,224,224,224, 17,222,222,222,191,142, 26, 53, 10,235, -215,175,199,211,167, 79, 3, 66, 67, 67,149,230,158, 35,133, 66,209,178, 73,147, 38,183,230,204,153, 67, 22, 46, 92,136,248,248, -248,150, 74,165,242,206,243,158,247,192,192, 64,111,145, 72,180,219,104, 52, 54, 36,132,108,185,118,237,218, 92, 74, 41, 95,135, -243, 46, 6,240, 81,253,250,245,167,185,186,186,186,166,165,165, 37, 60,121,242,100, 49,128, 45,230,154, 43,115,206,145, 66,161, -208, 0,144, 0,128, 57,237,173,254,233,123,221,223,161,169, 80, 40, 26, 2,152, 87,191,126,253, 81, 19, 39, 78,100,239,223,191, -143,147, 39, 79, 26,211,211,211,171, 53, 86,230,104, 54,104,208, 96,212,248,241,227,217,216,216, 88,156, 60,121,210,248,244,233, -211,106,141,149, 16,193,250,151, 26,172, 74,140,214, 2, 0,113, 42,149,170,215,191, 45, 67,255,221,154,132, 16,215,210,104, 84, -218,127,105,223,229,114, 57,151,147,147, 19,104, 52, 26,239,104,181,218,220,255,218,121, 23, 52, 95,126,205,210,225, 25, 78,216, -219,219,247,205,201,201,185, 9,160, 99,104,104,168, 38, 56, 56, 88, 4, 96,191,157,157, 93, 72,110,110,238, 5, 0, 61, 67, 67, - 67,249, 90, 22,138,223,112, 28, 55,210, 96, 48,252, 84,155,121, 33,255,201,227, 89,250, 48, 37,169, 97,144, 91, 33, 47,213,205, - 92, 54, 4,240, 17, 74,134, 98,248,190,166,136, 85, 45, 53, 1,224,187,154, 34, 86,130,193, 50,227, 97,249,127,185,113,149, 74, -101, 64,201, 60,113, 91,254,171, 39,192, 28, 99,245, 50, 82,122,238,175, 8,151,160,192,203, 74,104,104, 40, 5,208, 47, 56, 56, -216, 43, 52, 52, 52,177,220,231,250,224,224,224, 97,185,185,185, 14, 0,178, 43, 51, 87, 53,161, 84, 42,231, 2,152,251, 47,191, -198, 41, 0,141,144, 19, 94, 60,165,230,103,202,191, 93, 83, 48, 88, 2, 2, 2, 2, 2,127,167,209, 74,172,228, 51, 3,128, 12, -225,232, 8, 8,188,188, 16, 0,173, 43,251,162, 54,161,191, 10, 93, 91,205,194,140,246, 52,130,166,160, 41,104, 10,154,130,166, -160, 41,104,190,100,154, 53,105,191, 44, 85,143,255,211, 54, 88,130,166,160, 41,104, 10,154,130,166,160, 41,104, 10,154, 47, 35, -140,112, 8, 4, 4, 4, 4, 4, 4, 4, 4, 94, 44,102,183,193,106,221,132,120,242, 6, 12, 1, 48,160,244,163, 99, 12,135,223, -110,221,163, 73,117,221,184, 92, 46,111, 9,224, 29, 66,200,155, 0,120, 74,233,110, 0, 59, 84, 42, 85,108, 93, 53, 21, 10, 69, - 75, 0,111, 17, 66, 94, 3, 0, 74,233, 62, 0, 63, 43,149,202, 24,115,126, 47,149, 74,211,212,106,181, 11, 0, 88, 90, 90,166, - 55,111,222,220, 13,127, 14,230, 73, 0,144,162,162, 34, 20, 21, 21,209,194,194, 66, 90, 84, 84, 68,181, 90,109,181, 97, 64, 11, - 11,139, 52,173, 86,251,151,174,250, 34,145, 72,103,111,111,159, 93,175, 94,189,108, 23, 23,151,108,177, 88, 28,157,145,145,113, -246,198,141, 27, 97,148,210,148,218,236,119,215,174, 93,191,178,180,180,156,166,213,106,127, 56,127,254,252,236,191, 59,227, 16, - 66, 58,212,151,187,238, 48, 24, 12,198,148,244,167,115, 41,165,135,106,121,158, 36, 0,136, 82,169,124,166, 17,236,250,113,196, - 29, 0, 51,105, 75,205,227,107, 9, 8, 8, 8, 8, 8,252,191, 52, 88, 45, 91, 18, 41, 52,232, 11, 96, 72, 35, 47,151,160, 79, - 38,189,238,212, 62,168,143,172,176, 88, 71, 47,158, 61,214,113,235, 79, 71, 62,110,229, 75,174,242,192,111,196, 18, 39, 99, 98, -104,149, 3, 91,126,247,169, 40,205, 96, 52,184, 0, 0, 5, 87,176,106,175,243,125,133, 66,225, 63,125,250,116,116,232,208, 1, - 60,207,227,194,133, 11, 51, 87,173, 90, 53, 83, 46,151,135, 1,216, 1,224, 23,149, 74,149,107, 70, 97, 93, 31,192,155, 0, 70, -118,236,216,177,245,164, 73,147,208,184,113, 99,168,213,106,132,133,133,205,222,181,107,215,108,133, 66,113, 11,192,110, 0,123, -148, 74,229,147,170,180,212,106,181,139,169,218,148, 16,226,226,239,239,207,155,230,119,211,233,116, 80,171,213,183, 53, 26, 77, -164, 78,167, 11,147, 72, 36,151, 87,172, 88, 17, 11,192,216,204,213,170,163,143,135,211,128,227,202,199,127,233,217,163,213,106, - 93,212,215,175, 3, 70, 35, 12,137,137, 80,247,234, 5,157, 78, 7,189, 94, 47,102,251,247,119, 53, 48,140, 43,242,243, 31, 20, -110,223,190,166, 85,171, 86,101,221,109,171,211,172,176,255, 36, 32, 32, 96,246,236,217,179, 69,163, 70,141,122, 95,161, 80,204, - 51,141,161, 84, 17,115, 53,107, 48, 87, 22, 29, 3,218,158, 59,178,127,143, 37, 33, 12, 6, 15, 27,182,155, 16,242, 54,165,116, -127, 37,105,115, 66,201, 88, 95, 34, 0,223, 42,149,202, 84,133, 66,113, 84, 44, 22, 15, 40,253,254,178, 82,169,236, 92,106,174, - 22,149,174, 75,214,143, 35,223, 77,218, 66,167, 61, 79,230,174, 48, 14, 83,173,166, 98, 17, 16, 16, 16, 16, 16,248, 91, 12, 86, - 75, 31, 50, 74, 42, 21,207,156, 50,121,128,123,255,254, 3,108, 29, 61, 21, 28, 72,201,160,185, 22,182, 32,195, 70, 77,179, 26, -242,230, 84,171,248,187,151, 61,143, 31, 63,218,111,215,254,179,170,150, 62,100,105,204, 35,186,171, 50, 61,131,209,224, 50,253, -189, 73, 0,128, 21, 91,215, 91,199,198,198,250, 91, 91, 91, 63, 51, 45, 72,223,190,125,209,187,119,111, 36, 38, 38, 6,238,223, -191, 63,112,251,246,237,171,229,114,249, 28,149, 74,181,170, 26,115,177,196,195,195, 99,230,244,233,211, 73, 64, 64, 0, 44, 44, - 44,202,190,179,182,182, 70,175, 94,189,208,171, 87, 47,164,166,166,182, 62,127,254,124,235,159,127,254,121,177, 66,161, 88,170, - 84, 42,205,138,242,188,249,230,155,200,202,202,194,211,167, 79,145,151,151,167, 42, 44, 44, 76,211,104, 52, 42,177, 88, 28,251, -250,235,175,199,181,106,213,202,216,204,213,170,153,147,147,227,209, 37,223, 44, 0,170,233, 58,173, 10, 42,153, 26,175,248,214, -159,213,214, 82, 74, 41, 35,145,220,229, 82, 82, 14, 84, 48, 87,102,105,150,226,248,232,209, 35, 94, 44, 22,163,105,211,166,226, -184,184,184,180,238,221,187,111, 56,127,254,252,188, 10,230,170, 54,154,213,209, 97,254,140, 15,196,153, 15,163,112,247,202, 41, - 12,246,175,111, 25,117,235,222,215, 0,246, 87,178,238,148,119,222,121,231, 83, 7, 7, 7,172, 90,181,170,175, 66,161, 8, 4, - 16,124,242,228, 73,136, 68, 34,244,234,213,235, 21,133, 66, 33,183,183, 80,191, 54,164, 9,153, 61,249,147,137, 4, 0, 54,253, -176,233,227,245,227,200,234, 73, 91,232,147,231, 72,103, 96, 82, 82,210, 32, 66, 8, 60, 60, 60,132,171, 93, 64, 64, 64, 64,224, - 95, 16,193, 34,152,115,237,250,157,102,140, 49,147, 16,145,109,165,171, 48, 44,135, 70,173,186,113, 19,189, 91, 57,244,235,221, -199,110,216,152, 79,230, 0,216,101,206,134,109,108,108, 42,215,100, 24,120,123,123,227,211, 79, 63, 69,187,118,237, 36, 99,198, -140,249, 10,192,170,106,164,102,238,221,187,151,148,205,245, 86, 5,110,110,110,232,221,187, 55,220,220,220,200,140, 25, 51,102, - 2,168,212, 96, 89, 90, 90,166, 19, 66, 92, 0,192,209,209, 17, 27, 55,110,132, 86,171,229,139,139,139,111, 22, 23, 23, 71,106, -181,218,107,132,144, 43,215,175, 95,191, 95,106, 90, 60,164, 82,139, 83,155,214,127, 15,125,126,154, 99, 85,219, 55, 38, 85, 90, -147,154,195,202,100,143, 69,241,241,191, 74,114,115,195,202, 25, 33,179, 52, 75, 13,166,131,173,173,237,245,181,107,215,138,196, - 98, 49,222,127,255,125, 43,149, 74,101,181,108,217,178,143, 80,110,238,168,218,104, 86, 19,185,122,165,115, 7,197,169,239,151, -124, 33, 85,116,232,140,107,251,215, 33, 39,167, 16,133,249, 69, 48,242,188,101, 21, 63,179,119,119,119,199,208,161, 67,161,209, -104,154,172, 91,183,110, 47, 0,166,176,176,176,108, 6,120,119,119,247,196,174, 65, 10,150,137,255,234,185, 50,243,250,113, 37, -131,182, 78,218,242,231,216, 98,117,157,252, 87, 64, 64, 64, 64, 64,224,239, 49, 88, 0,199, 90, 53, 36,218,115, 67,121,214,169, - 43, 97,229, 33,132, 88,200,159, 89,161,224,233, 99,196, 93,221, 65, 19,162,143,208,250,126,163, 73, 69,189,242, 61, 12, 88,150, -203, 88,177,117,189, 51, 0, 88, 72,157,176,119,239, 94, 4, 7, 7, 99,255,247, 45,145,159, 91,210,220,200,198,206, 29,195,167, -198, 32, 54, 54, 22,151, 47, 95, 70,211,166, 77,129,146,170,165, 74, 53,203,172, 96, 68, 4, 50, 94,121, 5,146,172, 44,200,100, -178,178,153,192, 77,196,197,197,225,226,197,139, 72, 72, 72, 64,195,134, 13, 75,126, 83,133,102,113,113,177,235,219,111,191, 93, - 52,122,244,104,233,142, 29, 59, 16, 23, 23,103, 23, 25, 25,153, 87,217, 1,106,230,106,101,207,177,236,169,205,235,191, 19, 65, - 87,232, 24, 27,126, 25,173,250, 79,168, 52,157,234,110,221,202, 34, 87,210, 14, 29, 64,124,124,116, 68, 44,142, 43,216,177,163, -107,171, 86,173,244,181,213,236,220,185,243,124,158,231, 63,230, 56,206,114,221,186,117, 34, 39, 39, 39,102,229,202,149,250, 83, -167, 78, 25, 41,165,140, 88, 44,254,174, 46,233,172, 14, 75,137,104,199,250,165,243,164, 68, 95,140,200,227, 59,145,244, 56, 17, - 55,239, 39,235,127,185, 20, 99,212,234,141, 99,171, 56, 71,223,172, 92,185,114,104,211,166, 77,221,199,142, 29, 11,142,227,122, -103,102,102, 98,207,158, 61,176,178,178,194,250,245,235,225,237,237,205, 26,141, 70, 68, 30,125,138,245,223,173, 5,165, 20,133, - 58,241,238,153, 59, 13, 79,170, 57,239, 21,205,213, 98, 0, 51, 74,223, 47,251,250,164,123, 62,128, 64,111,111,111, 0, 72, 3, - 16, 86,241, 55,127, 71, 15, 24, 65, 83,208, 20, 52, 5, 77, 65,243,111,161, 61, 0,103,148,140, 31, 23, 94, 97, 25,165,239, 81, -201,114,102,105,153, 95,175,156, 86, 38, 0, 90,186,142,177,180,124,200,254, 91, 12, 22, 33,164, 27,128,243,168,108, 14, 55, 94, - 15, 99,250, 25,106, 76, 63, 75, 25,135, 0,194,202, 7,147,236, 92, 53, 98,175,108,163,170,184,115, 20,165,237,149,244,154,188, -106, 55,180,108,143,179,151,149,149,149, 58, 54, 54, 22,103,206,148, 76,227,119,224,192, 1,228,231,166,160, 92,213, 33,150, 47, - 95, 94, 22,117, 48,119,238, 99,170, 41,105, 39,173,213,106,161,213,106, 65, 2, 3, 33,234,218, 21, 15, 62,248, 0,161,161,161, -200,200,200,128, 88, 44,134, 88, 44, 54,107, 66, 88,157, 78, 71,210,211,211,161,209,104,248,162,162, 34,125, 21,230,202,146, 16, - 28,253,126,197, 66, 91, 91,107,169,107,196,169,131, 72, 72,168,122, 42, 64,189,254, 79, 25,210,176, 97, 49,195,178,225,146,168, -168,159,189,159, 53, 87,102,107,242, 60,255,233,238,221,187,173,178,179,179, 33,145, 72,176,116,233, 82,253,133, 11, 23,146, 13, - 6, 67,160, 82,169,204,172,107, 58,171,141, 58,218, 57,108, 30,241,238,212, 37,179, 94,235,136,226, 34, 53,126,251, 35, 6,161, - 55, 31, 13, 2,240, 7,165,180,210,201,106,149, 74,101,154, 66,161, 24,252,233,167,159,254,177,115,231, 78,201,168, 81,163, 96, - 52, 26,203, 94,133,133,133, 56,119,238, 28,254,248,227, 15,132,135,223,200, 17,243,205, 78,185, 89, 21,110,223,117, 42,225,116, -117,105, 41,223,190,202,217, 90,127,119,252, 43,152, 49,233,227, 73, 44, 0,172, 95,189,126,134,157,212, 24,122,233,250, 29, 87, -134, 97,208,178,101, 75,161,253,149,128,128,128,192,191,148,106, 61,200,159, 56, 19, 66,142, 82, 74, 7, 2, 8, 6, 32, 41,183, - 12, 66,200,209, 82,227,247,204,242,236,217,179, 63, 91,188,120,241,109,211,178,105,157, 57,115,230,180, 90,178,100,201,162, 78, -157, 58,237,185,114,229, 74,252,223,102,176, 0,156,167,148,146, 26,108, 12,248,236,112,202,103,135,211, 51,167,226,254,106, 74, -106, 48, 88,149, 81,191,126,125,220,174, 48, 69,105,121, 3,100,174,193,194, 43,175, 0, 41, 41,128,187,123, 73, 74, 83, 82,160, - 3,176, 97,206, 28, 72, 36,146,178,170, 40, 0, 48, 26,141,102, 25,172,140,140, 12, 90, 88, 88,120,163,168,168,200, 80, 73,102, - 32,109,124, 92,247,206,153,242,110, 3,239,134,141,228,215,143,253,138,248,120, 21,210,210, 42, 63, 63,214,214,214,249,122,189, -222, 84, 39, 26,201, 16,146,105,113,227,198, 47, 44,112,171,174,154, 12,195, 28,123,235,173,183, 6,119,232,208,129,180,104,209, - 66,114,230,204, 25,131,209,104,124,198, 92,213, 86,179, 58, 20, 10, 69,223, 65,131, 6,125,253,238,187,239,226,131,247,198, 96, - 64, 43, 55, 36,164,229,232, 1,156,174,110,146,230, 82,147, 21,161, 80, 40, 70,142, 24, 49,226, 7, 95, 95, 95, 55, 0,104,215, -174, 29,222,122,235, 45,124,247,221,119, 56,125,250,244,126, 0,155, 0, 92, 80,195,130, 57,123, 37, 70,107, 70,146, 2, 99, 98, - 98, 6, 17, 66, 16, 20,208, 84, 82,149,169, 21,170, 7, 5, 4, 4, 4,254,245,152,225, 65,202,202,181,163,148,210,129,229, 13, - 83, 69,163,101,122,111, 90,111,241,226,197, 3,203,155, 47, 0, 88,178,100,201,162,114,203, 69,127,199, 78,153, 12, 86,119, 66, - 8, 5,208,157, 82,122,161, 46, 66,122, 77, 94,157, 70, 44,181,144,214,195,138,173,235, 75, 76, 3,247,108,187, 44,173, 86,107, -150, 70,109, 6, 75, 53, 51,130,197,103,103,103, 63, 42, 40, 40, 8, 47, 44, 44,252,139,121, 24, 52,104,208,138, 70, 13, 60, 58, - 55,105,215, 65,118,253,228, 1,220,191,151,128,204,204, 92,128, 66, 93,153,158,163,163,227, 83,102,210, 36, 27, 89, 74, 74, 54, -195,243, 73, 13,162,163,135, 60,175,230, 31,127,252,241,166, 66,161, 8,184,114,229,202, 37, 59, 59, 59, 0,160,229,205, 85, 93, - 52, 43, 49, 85,175,176, 44,123,138,101, 89,105,187,118,237, 48,105,210, 36,252,240,195, 15,198,212,156,130,175, 87, 28,122,252, -126,145, 86,255, 94, 77,230,170,156,201, 58,168, 80, 40,142,222,184,113,195, 7,192,155,142,142,142,243,245,122, 61,120,158, 7, -128, 67, 0, 34, 0,156,112,118,118,238,166, 80, 40,126, 85, 42,149,163,106,210,100, 89, 22, 9, 9, 9,200, 45,102,181, 0,150, -173, 95,189,126, 70,233, 87,203,114,139,217,124,127,127,127,109,105,148, 43, 80, 46,151, 31,130,208,147, 80, 64, 64, 64,224,223, -136,217, 30,196,100,154, 42,154,172,218,152, 51, 0,197,179,103,207,254,140, 16,114,180, 52,194, 85, 12, 64,245,162,119,138, 41, - 77,240,133, 82,247,120,254,217, 61, 49,152, 45,164,215,228,215, 41, 1,141,186,254, 12,197,224, 11,120,164,155,140, 52,102,226, - 51,166,201,236, 42,194, 3, 7, 74,162, 87, 41, 41,127, 70,178, 74,163, 89,117, 49, 88,133,133,133, 55,179,178,178,110, 20, 20, - 20, 92, 41, 42, 42,122,102, 34,214,144,144,144, 15, 27, 54,108,248,222,162,101,171,108,143,156, 60, 91, 24, 30,126,171, 48, 45, - 61, 7,197, 90,189,238,102, 82,202,119,149,233,185,186,186,102,241,132, 60,101,245,250, 83, 22,183,110,237,169,248,125, 93, 52, - 77,145, 33, 66,200,161,147, 39, 79,198,177, 44,187,226, 69,104,150, 55, 87,246,246,246,191,127,251,237,183,210,111,191,253, 22, - 99,198,140,193,170, 85,171,112,243,230,205, 55, 82, 82, 82, 22, 20,106,116,114, 74,233,239,230,158,231, 31,222, 35,238,227,253, - 35,221, 0,184, 57, 58, 58,206, 25, 53,106, 20, 12, 6, 3,122,244,232, 1, 39, 39,167, 29,132,144,168,113,227,198,245, 90,185, -114, 37,231,235,235,251,150, 66,161,240,173, 73,147,231,249,178,170,215, 73, 91,232, 28, 0, 30, 0, 60, 76,237,175, 76,235,221, -187,119,207,245,254,253,251,131,202,127, 38, 32, 32, 32, 32,240,239,160, 74, 15, 82,141,201,170,227,118, 76,191, 19, 45, 94,188, -248, 54,165,116,224,146, 37, 75, 22, 1,144,254,109, 17,172, 82,231, 8, 0,221,159,245, 87, 5,181,137, 96, 85,251,253,204, 55, -211, 19, 13,198, 20,172,154,206,194, 66, 90, 15,141,186,254,108, 78, 36,201,188,131,166,209, 84,229, 86,255,178,108,142,193, 42, - 42, 42, 10, 79, 79, 79,191,159,148,148,116, 94,167,211,149,133,199, 6, 12, 24, 48,196,197,197,229,219, 47,191,252, 82,154,156, -156,140,250, 77,218,218,157,252,237,128,198,201,130, 83, 39,100,101,143,185,149,156,191,175, 50, 61, 75, 75,203, 24, 26, 31,127, -219, 50, 46,238, 56,128,232,242,223,213, 85,211,196,213,171, 87,223,172,248,217,243,106, 42, 20,138, 87, 28, 28, 28,126,159, 59, -119,174,236,206,157, 59, 96, 89, 22, 86, 86, 86,184,115,231, 14,148, 74,229,254,218,102,178,117,239,147, 5, 44,193, 92,163, 17, - 76, 87,239,116,195,155,179, 54,136, 29, 29, 29, 17, 21, 21,133, 22, 45, 90, 96,197,138, 21, 92, 92, 92,156,119,179,102,205,112, -239,222, 61, 36, 39, 39, 39, 2,120,100,198,197, 98, 50, 88,165, 17,170, 50, 83, 29,120,231,206, 29, 87, 0,104,209,162, 5,120, -158, 71, 86, 86,150,112, 23, 19, 16, 16, 16,248, 23, 82,149, 7,169,134, 99,248,115,208,115,148,143,102,149, 55, 95,166, 8, 85, -249,229,138,235,151,126,175,254, 59,246,139, 43,221, 88,101,117,159, 70, 94,147, 69, 25,207,183, 8,159,242, 27,133,177,138, 49, - 68, 25, 22,156,196, 26, 69, 5,121, 60, 74, 90,227, 87, 30, 57, 50, 26,157,203, 55,102,103, 89,182,202,246, 80, 44,203,194,206, -206, 14, 5, 5, 5, 0, 80,147,203, 50,234,135, 15,103, 37, 67,134, 64,231,230, 6,170,211,149, 68,177, 0,224,179,207,158, 49, - 87, 98,177, 24,154, 18, 51, 86,109,181, 86, 94, 94,222,213,155, 55,111,254,161,215,235,211, 0,160,123,247,238,155,245,122,253, - 16, 7, 7, 7,135,144,144, 16, 93, 90, 90, 26, 78,156, 56,129,139, 23, 47, 22, 59, 52,108, 29,145,155,153, 50,250, 86,114, 66, -149, 35,218,167,167,167,159,242,138,141,253,181,252,103,207,171, 89, 25, 47, 66, 83,161, 80,188, 82,175, 94,189,223, 63,251,236, - 51,217,221,187,119, 33, 18,137, 96,101,101,133,172,172, 44,176, 44, 91, 92,219, 12,182,117, 28,113, 32,192,156, 9, 83, 39, 48, - 12,195, 48,155,214,110, 22,219,203, 40,118,238,220,137,125,251,246,165,181,106,213,202,245,189,247,222, 67,211,166, 77, 17, 27, - 27,139, 85,171, 86,101,107,181,218,193, 74,165,178,198,122, 95, 83, 4, 43, 50, 50,210, 85, 34,145, 12, 34,132, 64,175,215,163, -109,219,182, 48, 26,141, 72, 41,201, 7,105,205,154, 53, 51,245, 32, 12, 19,110,101, 2, 2, 2, 2,255,186, 8,150, 57,237,175, - 50, 75,205, 83, 90, 37,203,108, 57, 99, 85,113, 57,189,194, 50, 0,104, 43,124,127,227,111, 51, 88, 85,176,122,196,208,158, 51, - 63,159, 53,193,173, 69,211, 89,150, 52,253, 4,104,174,146,194,212,228,134, 48,144, 88, 57,129,178, 22, 84,121, 55, 35,255,220, - 77,117, 38,128,213,230,110,184,121,243,230, 72, 77, 77,125, 38,178,192, 48, 12, 28, 29, 29, 33,149, 74, 17, 30, 30,142, 63,254, -248, 67, 15,224,139, 26,164, 22,142, 25, 51,230,139,201,147, 39, 51,129, 99,199, 66,119,233, 18, 12,127,141, 32, 65, 42,149, 34, - 57, 57, 25,177,177,177, 60,128,133,213, 9, 62,126,252,248,146, 94,175, 79, 47, 53, 45,239, 56, 56, 56,140, 28, 59,118,172,244, -230,205,155,216,186,117, 43,231,235,235,171,123,252,248,177,193, 96, 48, 76, 63,126,252,196,134,154,246,245,238,221,187,215, 43, - 24,161,231,214,172,196, 92, 61,183,102, 64, 64, 64,144,139,139,203,239,115,230,204, 41, 51, 87, 50,153, 12, 89, 89, 89,216,179, -103, 79,161,209,104,236,247, 34, 50,157, 90,173,198,254,253,251,243, 1,248,222,190,125,123,232,172, 89,179,190,247,242,242,178, - 79, 76, 76,204,208,106,181,193, 74,165,242,150,153, 23, 37,244,122, 61,226,226,226,192,178, 44, 24,134, 41,107,212,222,186,245, - 51,147,180, 11,109,175, 4, 4, 4, 4,254,127, 19, 86,195,242,191,142, 42,187, 88,197,196,211, 77,247, 31, 60,233, 51,106,226, -220,157,227,166,124,150, 20,151, 89, 79, 67,220, 6, 19, 88,202, 97, 97,227, 14, 27,247, 54,120,148, 41, 42, 90,115, 80,245,228, -200, 53,245, 47, 69, 69,232, 31, 19, 79, 55,149,215, 32,132,148,149,114, 28,203,166,175,216,186, 30, 43,182,174,135,145, 23,105, -223,125,247, 93,100,102,102, 34,254,143,209, 80, 30,234, 6, 31,241, 58,184,209,141,200,200,200,192,186,117,235,104,104,104,232, - 94,141, 70,211, 76,165, 82,173,174, 74, 19, 0,148, 74,229,151,201,201,201,126,159,125,246,217,201, 73,121,121,184,179,118, 45, - 36, 99,198,128,105,211, 6, 50,153, 12,206,206,206, 40, 40, 40,192,197,139, 23,113,243,230,205,147, 90,173,214, 79,169, 84,126, - 89,157,166,201, 92,117,232,208,193, 38, 39, 39,231,187, 49, 99,198, 72, 11, 11, 11,145,156,156, 12,165, 82,137,248,248,248,211, - 6,131,161,213,177, 99,199,170, 52, 45,229, 53, 41,165,137,166,247, 47, 74,179, 60, 47, 74, 83, 44, 22,207,216,180,105,147,172, -184,184, 24, 34,145, 8,214,214,214,200,206,206,198,238,221,187, 11,181, 90,109, 63,165, 82,121,217,156, 76, 85, 94,243,189, 45, - 52,155, 18, 44,222,248,253, 70,126,253,234,245,148, 58,118,131,212,206, 3,118,118,118,214, 40,105,152,191, 75,171,213,122,220, -191,127,191,141, 86,171,109, 82,149,185,170,108,223, 77, 17, 44,211, 84, 70,166,247,145,145,145,136,137,137,193,157, 59,119,112, -227,198, 13, 87, 84,209,246,170,170,227,249, 60, 8,154,130,166,160, 41,104, 10,154, 2, 53, 69,176,112, 59,129,198, 3,152,212, -210,151,248,143,252, 96,197,140,174,237, 27, 6, 77,126, 83,225,152,107,204,161,191,253,118,255,105,124,114,225, 53, 0,203, 98, - 30,209,200,154, 54,244,209,114,131,107,249,229,239,228,242, 14, 99,199,142, 93, 58,109, 68,122,231,242, 85,135, 63,239,253,249, - 60,128,153, 42,149, 74,105,238, 78, 40,149,202,104, 0,253, 21, 10, 69,215, 79, 63,253,244,219,161,158,158,129,163,186,119,135, - 72, 36, 66,120,120, 56,178,178,178,194, 0,204, 82, 42,149, 23,107,115,112,138,138,138, 22, 54,109,218, 84,114,231,206, 29, 60, -120,240, 0,113,113,113,200,202,202,186,127,228,200,145,129,117, 61,224,255,102, 77,157, 78,183,104,205,154, 53,125, 62,250,232, - 35, 11, 43, 43, 43, 68, 71, 71,227,231,159,127,174,149,185,170,140,201,155,233,130, 31,222, 35,155, 66, 31, 55,122,189,173,188, -211, 74,131,193, 0, 23, 23, 23,146,147,147,227, 11, 32, 70,169, 84, 22,163,220,144, 21,230, 82, 92, 92, 92, 54, 20, 3,195, 48, -224,121, 30, 12,195, 32, 54, 54,246, 47, 17, 45, 1, 1, 1, 1, 1,129,127,141,193, 42, 23,205,138, 4,240, 70,171,134, 36,248, - 98,248,195, 73, 0,192, 19,172,187, 27, 79,207,212,117,195, 42,149,234, 58,128, 46, 43, 62, 33,180,194,231, 61,234,170, 89,106, -160, 58, 40, 20,138,161, 7,129,207, 16, 31, 15, 0,139,148, 74,229,193,218,232, 4, 6, 6,122, 23, 22, 22,238,212,233,116,126, - 70,163, 81,114,225,194, 5,168,213,106,220,185,115,167,152,231,249,125,117, 73,219,255, 7,205,136,136,136,112,133, 66, 17, 76, - 8, 9,157, 48, 97,130,197,172, 89,179,158,219, 92,153,248,112, 43, 77,217,161, 80,132, 74, 98, 99,169, 78,167, 35,165,157, 13, -158,199,253,132, 5,149,206,237,104,206,186,194,165, 46, 32, 32, 32, 32,240,175, 51, 88, 38,110, 63,164,161, 0, 66, 95,104, 2, - 74,170, 14, 93, 76,239, 95,132,102,169,161, 58, 88,215,223,231,231,231, 47,202,202,202,234,152,151,151,103,120,244,232, 81, 49, - 33,196, 64, 8, 41,230,121,254, 43,158,231, 55,188,204,154, 74,165,242,114,251,246,237,187,132,133,133, 77,211,104, 52, 63, 40, -149,202, 43, 47,234, 92, 43,149,202, 24,133, 66,241,213,184,113,227,222, 54, 24, 12,191,152,219,214,170, 10,131, 46,180,169, 18, - 16, 16, 16, 16,120, 57, 12,214,223, 65,197,170,195,127, 3,177,177,177,111, 2,120,243,191,168, 9, 0,225,225,225, 17,127,135, -110,169,201, 90, 0, 96,129,112,233, 9, 8, 8, 8, 8,188,204, 8, 13, 84, 4, 4, 4, 4, 4, 4, 4, 4, 94, 48, 4, 64,165, - 61, 1,106, 51, 83,118, 93,122, 19,212,164, 47,104, 10,154,130,166,160, 41,104, 10,154,130,230,203,167, 89,147,118,109,252,199, -191,218, 96,213,102, 30,191, 90,139, 19,210,250, 69, 31, 40, 65, 83,208,252, 39, 52, 73,201, 52, 0,164,228, 90, 55,255, 34, 17, -142,167,160, 41,104, 10,154,130,166, 0,240, 47,104,131,245, 95,131, 16,194,224,207,170, 89,190,182, 5,184,192,223,126,126, 76, -198,138, 3,192, 2, 48, 18, 66, 12,194,121, 18, 16, 16, 16, 16,248, 91, 13,150, 66,161,104, 12, 0, 74,165,242,254,191, 97, 7, -252,253,253,175,251,250,250, 54,184,127,255,190,158, 16, 2, 66, 8, 24,134, 41,155,135, 80, 36, 18, 93,186,122,245,234, 91,255, -134,180,182,108,217, 82,220,179,103,207,223,165, 82,233, 51,243, 45,133,132,132, 0, 37, 37, 56, 95, 88, 88, 40, 59,127,254,188, -230,101,203,104,214,214,214, 60,195, 48,132, 97,152,178, 49,170,202,255,175,236, 51, 66,136,117, 76, 76, 76, 97, 85,154, 35, 70, -140,176,213,106,181,131, 9, 33, 17,148,210, 0, 66, 72, 4,195, 48, 1, 60,207, 63,243,159,227,184, 51,123,247,238, 85,153,153, -159, 44, 93, 92, 92, 30,179, 44,235, 92,241, 59,211,121, 58,114,228, 8, 17,110, 29, 47, 23,110,110,110, 93, 25,134, 89, 3,160, - 85,133,175,238, 2,248, 72,165, 82,157, 17,142,146,128,128,192, 11, 53, 88, 10,133,162, 41,128,110,165,175,174,205,155, 55,119, - 45, 42, 42,130, 66,161, 72, 3,112, 17,192, 5, 0, 23,148, 74,101, 92, 77, 90, 65, 65, 65,183,181, 90,109,203, 90, 37,144,227, -242, 56,142,243,188,124,249,114,165, 51, 79,187,186,186,250,238,218,181,171, 94,116,116, 52,172,172,172,158,121,113, 28,135,142, - 29, 59,118,252,183,152, 43,119,119,247,211, 46, 46, 46,157,183,111,223,142,155, 55,111, 66,161, 80,148,125,111, 52, 26, 49, 98, -196, 8,198,206,206,206, 2,128, 89, 6,171, 99,199,142,137,122,189,190,126,109,210, 33, 22,139, 51, 37, 18,137,251,249,243,231, -107,156,245,186, 67,135, 14, 54, 0,102,176, 44,219,147,231,249, 86, 0,192,178,236,109,131,193,112, 22,192,178,235,215,175,231, -155,187, 93,134, 97, 72,102,102, 38,246,236,217,131,214,126, 29, 65, 1,180,107,217,168,204, 8, 95,143,188, 3,163,209,136, 63, -206,159,196,167,211,167,195,207,207, 15, 5, 5, 5,213,230, 79,145, 72,116, 78, 36, 18,249,153,150,203, 79,238, 93,225,125, 56, -170, 24,205,189, 66, 94,151,186,186,186, 38, 88, 88, 88,212,219,189,123, 55,174, 93,187,134,198,141, 27,195,104, 52,130, 82, 10, - 74, 41, 62,252,240,195, 23,146, 31, 8, 33, 65, 0,222, 5,144, 1, 96, 27,165,244,225,255, 42,111,182,107,215,238, 74,135, 14, - 29,154, 69, 70, 70,234, 40,165,101,199,206,244,192, 98, 52, 26, 85, 17, 17, 17,254, 47,232,129,104, 63, 33,100, 88,233, 3,197, -153,200,200,200,224,186,106, 57, 58, 58,218,200,100,178, 25, 18,137,164,167, 94,175,111,197, 48, 12, 56,142,187,173,211,233,206, - 22, 20, 20, 44,203,202,202,170, 77,254, 92,189,101,203,150, 86, 94, 94, 94, 72, 75, 75, 67, 70, 70, 6,114,115,115,145,159,159, -223,124,203,150, 45,235, 0, 52, 22,138, 11, 1, 1,129, 23, 98,176, 20, 10,197,113, 0,221,154, 55,111, 46,237,221,187, 55,252, -253,253,209,160, 65, 3, 88, 90, 90, 2, 0,178,178,178, 92, 99, 98, 98, 94,143,138,138,122,253,234,213,171, 80, 40, 20,197, 0, -254, 80, 42,149,125,171,210,228,121,190,254,201,147, 39,225,228,228,100, 86,226,120,158,199,171,175,190, 42,206,202,202,146, 1, -168,212, 96,165,164,164,240, 95,124,241, 69,206,229,203,151,117,165, 5, 3, 41, 87,205, 3,163,209,248,244,127,125,144, 9, 33, - 76,207,158, 61, 79,150,154, 43,134,227, 56, 68, 68, 68, 32, 57, 57, 25, 46, 46, 46,176,178,178,130,133,133, 5, 12, 6, 3, 40, -165, 57, 33, 33, 33,124, 65, 65, 65,141,145, 44,163,209,232,126,225,194, 5, 88, 89, 89,153,149, 14,163,209,136,206,157, 59, 59, -148,158,119, 67, 13, 5, 97, 15,137, 68,242,203,132, 9, 19,236,131,130,130, 56, 79, 79, 79, 16, 66,144,154,154,218,241,202,149, - 43, 1,235,215,175,159,224,239,239,255, 70,100,100,228, 57, 51, 11, 48,252,248,227,143, 88,184,112, 33,166,207, 91,134, 15,223, -123, 13,132, 16, 88, 88, 88, 32, 55, 55, 23, 29,252, 91, 96,253,143,135,176,103,207, 30,168,139,139,193,113, 28,236,236,236,170, -213,148,201,100, 45,214,174, 93,139, 79, 62,249, 4,171, 86,173, 42,251, 63,109,218, 52,172, 92,185, 18,211,167, 79,199,138, 21, - 43, 48,125,250,244,246,239,190,251,174,197,246,237,219, 53,213,157,163,254,253,251, 63, 46, 53, 87, 68, 44, 22, 35,187, 91, 55, - 36, 0,176,137,137,129,181,181, 53,180, 90,173, 41,146, 69,159, 55,146,229,228,228,244,211,129, 3, 7,188,245,122, 61,230,204, -153, 51,141, 16, 18, 66, 41, 61,253,130,242, 91, 95, 0,179, 75, 23,151, 80, 74,127,175,225, 33,198,115,221,186,117,246,119,239, -222,133, 88, 44,134,133,133, 5, 36, 18, 9, 36, 18, 9, 44, 44, 44, 16, 28, 28,108,172,107, 90,252,252,252,156, 24,134,217, 8, - 64,202,178,236, 84, 66,200,128,211,167, 79,131, 97, 24,244,233,211,167,151,159,159, 95,115, 66,200,114, 43, 43, 43,170, 86,171, -223, 11, 15, 15, 79, 51, 71,215,195,195,163,135,189,189,253, 47,179,103,207,182,239,220,185, 51,231,236,236,140,176,176, 48,216, -219,219,119,188,116,233,146, 98,211,166, 77, 19, 60, 60, 60,222, 72, 78, 78, 62,103,102, 82,155,213,175, 95, 31,159,127,254, 57, -108,109,109,225,232,232, 8, 7, 7, 7, 56, 58, 58,194,221,221,189,225,219,111,191,157,147,149,149, 85, 16, 29, 29, 61,143, 16, -114, 54, 41, 41, 73, 37, 20, 31, 2, 2, 2,117,141, 96,245, 63,127,254, 60, 12, 6, 3,108,108,108,192,178,108,197,167, 71,116, -237,218, 21, 29, 58,116, 64,112,112, 48, 98, 99, 99,165,223,126,251,109,239,154, 54, 40,147,201,112,245,234, 85, 24,141, 70, 68, - 68, 68, 32, 63, 63, 31, 33, 33, 33, 16,139,197, 16,137, 68,224, 56,174,236,191,171,171, 43, 36, 18, 73,181,133,152,157,157,157, -252,216,177, 99,140,133,133, 5,181,182,182,166, 23, 46, 92,160, 0, 40,158,163,205,140, 66,161,112, 19,139,197,223, 26, 12,134, - 17, 60,207, 75,170, 90,143,101, 89,189, 88, 44,254,173,168,168,104,102, 84, 84, 84, 98, 21,133, 29, 1,192,200,100,178, 30,155, - 55,111, 6,199,149, 28,114, 83,225,101,105,105, 89,246,223,193,193, 1, 31,125,244, 17,190,248,226, 11,179, 35, 89, 82,169, 20, - 23, 46, 92, 0,203,178,104,209,179, 39,136, 94,143, 39, 97, 97,224,100, 50,184,249,249,129,232,116, 40,184,127, 31, 34, 43, 43, -184,186,186,254,229, 60, 86, 97,174,250,122,122,122, 30,248,238,187,239,164, 44,203,226,222,189,123, 32,132,128,101, 89,164,167, -167,163,115,231,206, 92,235,214,173,157,230,204,153,115,212,223,223,127, 88,100,100,228,239, 53,105,178, 44,139, 49, 99,198, 96, -249,242,229,152, 50,238, 53, 48, 12, 3, 11, 11,139, 50,211, 2, 0,147,198, 12,198,246,117,139,241,249,231,159,227,248,241,227, -176,182,182,174, 54,122, 23, 24, 24, 40,201,200,200,128, 84, 42, 69,122,122, 58,100, 50,217, 51,255,165, 82, 41,210,210,210, 32, -147,201, 16, 21, 21,149,212,189,123,119,183,202, 34,119,165,231,136, 99, 89,214,121,247,238,221, 16,139,197, 0,128, 34, 0, 70, - 0,206,206,206,208,104, 52,101,147,134,207,157, 59, 23,115,231,206,125,174, 11,175, 97,195,134, 30,157, 59,119,134, 70,163,193, -153, 51,103, 36, 33, 33, 33,199, 8, 33,171, 0,172, 43, 63,119,101, 29,153, 77, 41,237, 90, 46,146, 87,237,249, 49, 24, 12, 73, -147, 39, 79,182,170, 38,130,149, 86,215,132,176, 44,187,230,200,145, 35, 67,116, 58, 29,198,142, 29,123,199,215,215,151,179,179, -179,195,214,173, 91,225,224,224, 0,141, 70, 19,189, 98,197, 10, 46, 33, 33, 1, 63,252,240,195,118, 0, 53, 78, 40,238,238,238, -222,215,215,215,247,192,222,189,123,165, 0, 16, 31, 31,143,164,164, 36,252,254,251,239,120,243,205, 55, 49,124,248,112, 81, 80, - 80,144,211,148, 41, 83,142,186,187,187, 15, 75, 73, 73,249,221,156,180,218,219,219, 27,103,205,154,197,202,100,178,103, 34,225, -199,142, 29, 35,223,126,251,173,221,234,213,171,109, 7, 14, 28, 56,107,195,134, 13, 65, 30, 30, 30, 11,147,147,147,147,133, 34, - 68, 64, 64,160, 46, 6, 11,214,214,214, 8, 15, 15, 7, 33, 4, 54, 54, 54,176,181,181,133,157,157, 29,242,242,242, 16, 19, 19, -131,187,119,239,226,209,163, 71, 96, 24, 6, 13, 27, 54,132, 41,106,100,162,178, 30, 6,166,130, 58, 33, 33, 1,169,169,169, 96, - 24, 6, 23, 47, 94, 68,255,254,253,159, 49, 87, 34,145,168,210, 52, 85,212, 60,127,254,188, 97,250, 24,247, 43,122,109,129,179, -209,160,189,116,158,210,247, 20, 10,197,117,103,103,231,250,237,218,181, 51,154, 10,139,234,218,101, 85,212, 20,137, 68,203, 39, - 77,154,244,198,235,175,191,206,152, 12,145, 41, 2,164,209,104,202, 38, 22, 46, 46, 46, 22,237,223,191,127,248,177, 99,199,100, - 0, 6, 84,151, 78,163,209,136, 91,183,110,225,230,205,155, 96, 24, 6, 14, 14, 14,176,181,181,133, 84, 42,133, 84, 42,133, 68, - 34,129, 76, 38,131,133,133, 5, 24,134,129,209,104,204,233,215,175, 31, 31, 23, 23, 39,123,252,248,177,166,170,227, 89,154,222, -146, 57,247, 76,251,199,113, 96, 57,174,236,100,112, 28, 7,142,227,158,169, 54,171, 42,157, 10,133,194, 86, 36, 18,237, 90,185, -114,165, 52, 61, 61, 29,209,209,209,104,219,182, 45,230,206,157,139,194,194, 66,172, 88,177, 2, 15, 30, 60,128,139,139, 11,230, -204,153, 35,157, 49, 99,198, 46,133, 66,225,171, 84, 42,243,170, 59,239, 12,195, 96,203,150, 45,101,115, 7, 2,128, 70,163,129, -133,133,197,179,233,225, 41,230,207,159,255, 23, 35, 88,201,241,116,119,117,117,197,249,243,231, 97,105,105,137, 11, 23, 46,148, -253,183,176,176,192,197,139, 23, 97,105,105,137,139, 23, 47, 66, 38,147,129,231,121,251,138,145,187,114,154, 4, 37, 13,218,113, -227,198, 13,164,116,232,128, 34, 0, 54,135, 15,195,214,219, 27,112,118,134, 19,128,194,204,204,178,115, 84, 85, 36,171, 22,221, -147, 75, 76,229,164, 73,152, 49, 99, 6,206,156, 57, 35,250,227,143, 63,102, 14, 31, 62,188, 11,128,142, 53, 93, 71, 21,180,218, -185,184,184,108,107,214,172, 89, 91, 0,232,218,181,107,141,219, 47,175,121,227,198,141, 32, 0,216, 50,137,124,238,226,211,245, - 11,213,253, 63, 56, 74,249,242,171,187,172, 31, 87, 50,165, 21, 97, 96, 16,179, 88, 58,118, 61,157, 91, 83, 94, 42,253, 76, 18, - 27, 27, 11, 27, 27, 27,108,218,180,137,115,116,116,132, 82,169, 4,199,113, 24, 61,122, 52,218,180,105,195, 73,165, 82,156, 63, -127, 30, 5, 5, 5, 53,230, 79, 95, 95, 95, 91,137, 68,178,107,207,158, 61,210,217,179,103, 35, 32, 32, 0, 77,155, 54, 5, 33, - 4,195,134, 13, 3,165, 20, 57, 57, 57,112,118,118,198,242,229,203,165,227,199,143,223,229,235,235,235, 27, 31, 31,159, 87,195, -241,164, 26,141,134, 90, 90, 90,150, 61,244, 88, 88, 88, 64, 44, 22, 35, 55, 55,151,206,156, 57, 51,151,101, 89,118,200,144, 33, -141, 62,248,224, 3,102,193,130, 5,193, 0,182,215,246,188,215, 6, 65, 83,208,252,175,105,214, 64,123, 0,229,219,198,106, 1, -152, 2, 32,153,165,247,241,122, 21, 62, 7, 74,154, 97,160,220,111, 43, 46,103, 2,136, 1,208,162,244, 51, 35, 74,166, 87,203, -126, 33, 6,139,144, 63,231, 3,164,148,146, 74, 14, 36,242,242,242,144,151,151,135, 39, 79,158, 96,253,250,245,101, 70,136,227, - 56, 48, 12,131,210,185,229,204, 66, 36, 18,225,201,147, 39,104,215,174, 29, 92, 92, 92,176,125,251,118,132,132,132,148,233,149, - 55, 4,230, 76,214,251, 74,143,145, 45,134,180,136,179,157,188,228, 52, 5, 74,218,101,253,246,219,111,245,238,221,187, 87, 22, -117,144, 74,165,176,180,180,132, 72, 36,170,177, 93, 22,207,243, 67, 71,140, 24,193,156, 62,125, 26, 6,131, 1, 28,199, 65, 44, - 22, 67, 44, 22, 63,243, 94, 44, 22, 35, 36, 36,132, 57,112,224, 64,239,238,221,187,115,149, 69, 71, 40,165,148, 16,194, 19, 66, -160, 80, 40,144,153,153, 9,177, 88, 12, 27, 27, 27,216,217,217, 65, 42,149,150, 85,201, 88, 89, 89,193,210,210, 18,110,110,110, -152, 48, 97, 2, 62,255,252,115,179, 34, 89,205,186,119, 47,139, 92,177, 82, 41,220,253,253,203, 34, 87,156, 76, 6, 75,111,111, - 64,167, 3, 85,171,107,206, 16, 28,247,233,216,177, 99,109, 45, 44, 44,112,235,214, 45, 88, 88, 88,160,176,176, 16,131, 7, 15, - 70, 65, 65, 1, 12, 6, 3, 44, 44, 44,160,209,104,224,230,230,134,224,224, 96,235, 83,167, 78,125, 10,224,243,154, 34, 88,227, -198,141,195,218,181,107,241,221,230, 95,241,209,251,175,255,101,157,117, 59, 14,130, 16,130, 47,191,252, 18,231,207,159,175, 49, -173,189,123,247,198,197,139, 23, 33,151,203,145,149,149, 5, 79, 79, 79,228,228,228,160, 65,131, 6,200,201,201,129,143,143, 15, -242,242,242,208,173, 91, 55,156, 56,113,162,218,123, 69,233, 69,133, 86,173, 90,193,136,146,238,157,182,222,222,168, 87,175, 30, - 44, 80,210,237,211,194,194, 2, 50,153,236,133, 68,178, 74,163,102, 72, 73, 73, 65,247,238,221,227, 39, 76,152,224,235,239,239, - 15,134, 97, 36,181,212,241,107,222,188,249,249,179,103,207,218,184,186,186,194, 96, 48, 64,175,215,163,160,160, 0,111,188,241, - 6, 0,236, 53, 91,140,199,180,129,211, 67, 57, 68, 14, 6,120, 93, 85, 7,138,219,182,227,220,199, 0,204,218,113,150,101,167, -205,154, 53,107,192,160, 65,131, 56, 91, 91, 91,136, 68,162,178,234, 71,177, 88,140,199,143, 31, 67,175,215, 99,223,190,125,148, - 97,152,143,106,210,211,235,245,159,206,153, 51,199, 86, 36, 18,161, 89,179,102,248,248,227,143,241,243,207, 63, 67, 46,151, 67, - 34,145,192,201, 42, 21,132,112,208, 24,101,104,220,184, 49, 6, 14, 28,104,125,240,224,193, 26,243, 39,128,155, 90,173, 54,192, -116, 61,154,140, 22, 0,168, 84,170,219,151, 46, 93,106,227,234,234,218,178, 89,179,102,219,187,117,235,214,214,201,201,169, 3, - 33,100,135,208,179, 84, 64,224,249,169,201,131,152, 12, 17, 33,228,104,185,245, 6,154,150,103,207,158,253,217,226,197,139,111, - 19, 66,142,150,255,220,180, 94,233, 54,142, 86,182, 92,250,219,122,115,230,204,105,189,100,201,146, 69,157, 58,117,218,115,229, -202,149,248, 23,102,176, 74, 60, 0,161,213,236, 88,165, 79,223,229, 49,199, 96,153,170, 28, 52, 26, 13, 50, 50, 50,208,167, 79, - 31, 88, 90, 90,130, 97, 24, 36, 37, 37,161,113,227,198,224, 56, 14, 55,110,220,192, 23, 95,124,129,150, 45, 91, 66,167,211,213, -152,166,223,143,110, 44,190, 18,202, 23,243, 70,154, 6, 0,169,169,169,116,241,226,197,249,167, 79,159,214, 86, 40,207, 64, 41, - 37, 53,181,203,162,148,114, 28,199,149, 69, 91,202,247,114,235,209,163, 7, 46, 93,186, 84,246, 89,105, 52,131, 65,245,237,154, -104,169,113,131,139,139, 11, 36, 18, 9,202,223,200, 77, 5,142, 41, 58, 98,250,174, 22,185,179,228,100,178, 44, 56,145,232, 47, -145, 43, 16,243,155, 10,177, 44,219,171, 75,151, 46, 92, 92, 92, 92, 89,186,116, 58, 29,186,117,235, 6,134, 97,144,152,152, 88, -246, 57,165, 20,126,126,126,226, 75,151, 46,245,170,169, 0, 99, 24, 6,235,215,175,135, 94,175, 7, 0,252,176,237, 0, 62, 28, - 59, 12, 26,141,166,108,217,180,222,220,185,115,205, 50,214,109,219,182, 69,126,126,126,217, 57,226, 56,174,210,255,142,142,142, -168,174, 28, 44, 53,193, 6, 83, 62,182,141,137,129,139,139, 11,224,228, 4, 9, 0,169,193,128,140,140, 12, 56,149, 26, 44,139, -114,255,159,227,134, 66, 76, 15, 47, 25, 25, 25,109, 22, 46, 92,248, 10,128,250, 0, 78,215, 66,195,213,100,174, 40,165, 24, 48, - 96, 0, 62,254,248, 99,180,111,223, 30,249,249,249,152, 62,125, 58,114,114,114,214,182,105,211,102,213,173, 91,183,102, 80, 74, -191,175, 86,144,193,202,163, 43,130, 43,139, 96,253,185,205,146, 8,214,106,115,210,103,106,208,222,166, 77, 27, 76,156, 56, 17, -251,247,239,199,246,237,219, 97, 52,150, 52,233, 26, 58,116, 40,134, 12, 25,130,140,140, 12,184,186,186,146,228,228,228,123,254, -254,254,213, 54,124,183,176,176,232,213,185,115,103, 46, 33, 33, 1,157, 58,117,194,248,241,227, 49,110,220, 56, 28, 62,124, 24, - 94,110,128,242,240, 72,180, 9,222, 4,177,149, 24,132, 16,116,238,220, 89,124,234,212, 41,115,242,231, 71,189,122,245, 90,142, -146, 94,132,229, 47,152, 59, 0,102, 0, 64, 90, 90, 90, 76, 72, 72,200,163, 94,189,122, 41, 26, 54,108,232, 28, 29, 29,205, 1, -208, 11,197,163,128,192,115, 71,195,204,246, 32, 38,131, 84,209,104, 45, 94,188,120, 96,197,207,202,155,169,202,222,151,255,237, -146, 37, 75, 22,149,211, 46,122, 17,251,245,194,198,193, 50, 21,156, 53,161,209,104, 16, 21, 21,133,198,141, 27,195,210,210, 18, - 28,199,193,207,207, 15, 74,165, 18,205,155, 55, 7,165, 20,159,125,246, 25,230,207,159,143,189,123,247,226,246,237,219,156,139, -139, 75,181,154, 27,247, 23,184,151, 95,182,177,177,113,223,187,119,239,115,181,203, 34,132,148, 21,208,131, 6, 13,194,241,227, -199, 33, 18,137,202,170, 56, 21, 10, 69, 89,117,159, 25, 25,130, 14, 28, 56,176,172, 61, 91,197,134,196, 18,137, 4, 12,195,148, - 53,118, 47,255,244, 92, 83, 67,111, 0, 72, 10, 15, 7,203,178,101,145,171,252,123,247, 32,178,178, 42,139, 92,113, 25, 25, 16, - 89, 91,131,152, 97, 8, 12, 6, 67, 43, 15, 15, 15,196,197,197,149,165,209,203,203, 11, 83,166, 76, 65, 81, 81, 17,182,108,217, -130,156,156, 28, 72, 36, 18,136, 68, 34, 52,106,212, 8, 26,141,166,149, 25,198, 13, 19, 39, 78,196,182,109,219,176,110,249, 23, - 96, 89, 22, 27, 86,206, 7,195, 48,207, 12,207,192, 48, 12, 22, 45, 90,132, 30, 61,122,152, 29, 13,221,185,115, 39, 76,109,135, - 76, 26,166,215,148, 41, 83,202,122, 0,214,112,142,248,144,144, 16, 80, 74,203,162,139,134, 82,231,108,170,174,100, 89,182,204, -252,154, 34, 89,207,243,208,102, 50, 88, 0,116,148,210, 83,117,208,232, 63,123,246,108, 27,158,231,209,163, 71, 15,140, 29, 59, - 22, 1, 1, 1, 88,179,102, 13, 46, 95,190,140,205,155, 55,227,231,159,127,134,193, 96, 16,247,237,219,119, 6,128,106, 13,214, -184,245,116, 33,128,133, 21, 76,236,149, 14, 29, 58, 52,139,138,138,210,241, 60,111,122, 72,122,111, 99, 96,224,123, 60,207, 87, -219,187,208,212,160,221,193,193, 1, 17, 17, 17,144, 72, 36, 32,132,192,218,218,218,242,252,249,243,154,181,107,215,234,165, 82, - 41, 39,145, 72,240,197, 23, 95, 64, 34,145, 96,220,184,113,189,186,119,239,110, 81, 85, 7, 15,157, 78,215, 74,165, 82,225,248, -241,227, 24, 56,112, 32,222,127,255,125, 60,121,242, 4,163, 70,189,133,197, 83,197,104,237, 63, 22, 98,251, 46,101, 15, 24, 45, - 90,180,128, 90,173,174, 49,127, 38, 37, 37,133, 3,232, 34, 20,117, 2, 2,255,250,104,215,209,138, 38,235,121,180,102,207,158, -253, 25, 0, 58,123,246,236,207, 76,203,139, 23, 47, 46, 6,240,220, 29, 89, 94,152,193, 50, 39,130,213,165, 75, 23,233,186,117, -235,224,238,238, 14, 63, 63,191,178,182, 86,166, 66, 97,236,216,177, 56,113,226, 4, 90,180,104,129,126,253,250,161,107,215,174, -104,221,186,230, 81,250,103,140,245,140,208,107,242, 28,244, 90,205,181,181, 7,116,163,242,243,243,195, 27, 53,106, 36, 79, 76, - 76, 52,228,231,231,195,223,223,191,204, 52,181,111,223, 30, 44,203, 94,187,118,237,218,240, 26, 15, 14,199,225,181,215, 94,195, -111,191,253,134,161, 67,135,226,212,169,146, 50,176,125,251,246,184,115,231, 14,100, 50, 89,149,109,197, 42, 51,108, 70,163, 17, -150,150,150, 16,139,197,101,141,220, 37,146, 63,107,132, 42, 70,176,136, 25,145,167,242, 70,176,170,200, 85,217,178,249,153, 14, - 98,177, 24, 12,195,148, 85,229, 20, 20, 20, 32, 55, 55,183, 44,237,166,151,185, 85,195, 44,203, 98,205,154, 53,208,235,245,152, -252,233, 87, 96, 89, 14,147,198, 12, 1,203,150, 24,212,245, 63, 30,130,209,104,196,175,219,191,195,236,217,179,205, 50,174,166, -125, 27, 55,110, 92, 89,196,170,178, 40, 86,109,113,173, 95, 31, 20,128, 69,169, 41,211, 19,130,122, 37, 33,200, 23, 25,193, 66, - 57,131, 85,215,106,166,131, 51,103,206,156,160,215,235, 91,182,111,223, 94, 58,126,252,120, 60,121,242, 4,171, 86,173, 82,103, -101,101,125,215,187,119,239, 9,214,214,214,246,133,133,133, 5,143, 30, 61, 90, 92,167, 27, 68,105, 15,195,155, 55,111,150,153, -127, 83,117,251,128, 1, 3,106,236, 93,104, 52, 26,177,105,211,166,178,170,193,202,242, 69,249, 60,101, 14, 45, 91,182,132,149, -149, 21, 40,165,208,235,245,248,246,219,111,241,250,240,190, 56,254, 7, 69,239, 49, 51,193,243, 4, 34,145, 8,219,182,109,131, -175,175,111,141,122, 85,140,129, 37,140,127, 37, 32,240,239,140,118, 13,124,145, 90,166, 8,214,226,197,139,111, 47, 94,188,248, - 47,209,176,191,213, 96,177, 44, 91, 22,210,175,170,160, 48,183, 13,214, 31,127,252, 81,124,246,236, 89,155,164,164,164, 50, 99, -192,113, 28, 26, 54,108, 8, 66, 8, 78,156, 56,129, 93,187,118, 97,222,188,121,224, 56, 14,182,182,182,240,247,247,215,215,212, - 89,167, 83,215,215, 27,149,182,193, 50,150,222, 48, 61,247,238,221, 91, 93, 27, 44, 63,115, 34,109, 34,145, 8, 71,143, 30, 69, -159, 62,125,112,254,252,121, 72,165, 82, 0, 64, 76, 76, 12,218,181,107,135,123,247,238,153,109,176, 74,202,103,254, 25, 99,101, -234,173, 86,222, 96,177, 44, 91,214,200,214, 92, 76,189, 5,243,239,221, 3, 39,147, 65,234,227, 83, 22,185,226,172,172,160,177, -183,135, 70,171,133,157, 25,109,176,196, 98,113, 76,106,106,106,160,139,139, 11,178,178,178, 32,145, 72,158, 49, 41, 28,199, 61, - 19,125,187,117,235, 22, 44, 45, 45, 99,106,210, 53, 69,147,126,249,229, 23, 0,192,164, 49, 67, 32,147, 73,161,213,106,161, 86, -171, 49,105,204, 96,172,255,241, 16, 24,134,193,226,197,139,209,183,111,223,106,243, 93,249, 8,214,182,109,219,192,243,252, 51, -145, 43, 83,190,252,228,147, 79,192, 48, 12,234,210, 84, 38, 53, 53, 21, 64, 73,171,201,138,231,168,214,213,184,127, 94, 47, 34, - 0,190, 93,186,116, 33,229, 30, 76,248, 90,106,124,208,178,101,203,217,150,150,150,137,105,105,105, 63,187,185,185, 77,251,238, -187,239,188, 18, 18, 18, 96,107,107,139, 19, 39, 78, 88, 78,157, 58,245,163,176,176,176, 97,148,210,147,207,249,224,148, 52,121, -242,100,171,168,168,168,191,244, 48,228,121,190,166,222,133,191,247,235,215,111,144,173,173, 45,198,142, 29, 11,177, 88,140,161, - 67,135,194,206,206, 78,189,105,211, 38, 4, 4, 4,128,101, 89, 72, 36, 18,204,159, 63, 31, 9, 9, 9, 32,132,252, 94,221,240, - 36, 18,137, 36, 38, 33, 33, 33,208,202,202, 10, 90,173,182,236,250, 59,118,226, 34, 88, 78, 84,102,174,196, 98, 49,166, 76,153, -130,139, 23, 47, 66, 42,149,198,212,144, 55, 87,108,217,178,165,149,139,139, 11, 84, 42, 21,178,178,178,144,159,159,223,124,221, -186,117,223, 3,164, 5,190, 4,193,124, 80,185,220,189,241,164, 73,147,234,243, 60,207, 63,122,244,232, 41,106, 24,234, 68, 64, - 64,224,239,137, 96,149, 55, 90,229,162, 80, 85,145, 81,190, 93, 86, 85, 6,173,124,155, 44,152, 57, 22,165,217, 6,171,146,186, -207,123, 55,110,220,104,210,170, 85, 43, 36, 38, 38, 34, 39, 39,167, 82, 1, 43, 43, 43, 72,165, 82,220,191,127, 31, 0,238,213, -224, 22,193, 48, 76,217, 77,177,124,143,193,207, 62,251, 12,179,103,207, 70,112,112, 48,130,130,130,106,181, 19,191, 31, 89,159, -247,199, 41, 90,200,243, 52,169,180, 96,228, 23, 46, 92, 88,112,234,212, 41,173,169,221,151,169,144, 47,125,170, 78,169,225, 4, - 26,242,243,243, 57, 83,149,198,229,203,151, 33, 18,137, 32, 18,137, 16, 19, 19, 3,145, 72,132,199,143, 31, 67, 44, 22, 67,167, -211,153, 10, 72,131, 25, 25,163,172,205, 85,101,198, 76, 38,147,149,173, 99, 42,188,205,169, 34,124, 81,145, 43, 0,208,233,116, -103,174, 95,191,238, 31, 28, 28,204, 21, 22, 22,254,197, 96,153, 10, 68,147, 81,188,118,237,154,182,184,184,184,198,167,124,150, -101,177,106,213, 42,232,245,122, 76,121,175,100,152, 6, 83,251, 43,211, 88, 88,147,198, 12,198,193, 93,107, 49, 99,198, 12,179, -162,119,166,125,156, 56,113, 98,165,145, 43,211,123,115,134,166, 40,159, 78, 77,126, 62, 36, 18, 9, 92, 77,231,136,231,159, 57, - 71,229,163,141,181,188, 49, 12,112,118,118,254,238,141, 55,222,240, 9, 10, 10, 66, 78, 78, 14,212, 37,166,183, 86,227,105,249, -248,248,204,141,138,138,114,203,206,206,246, 56,122,244,104,144,139,139, 11, 44, 44, 44, 48,100,200,144, 34,158,231,153,239,190, -251,206,114,195,134, 13,150, 51,103,206,220, 12,192,163, 38, 61,211, 64,163, 21,170, 1,193,243,188,234,230,205,155,117, 30, 96, - 84,169, 84, 14, 14, 12, 12,244, 54, 26,141,247,219,182,109,203, 37, 36, 36, 96,224,192,129,144, 74,165,101,231,165,176,176, 16, - 90,173, 22, 42,149,138,178, 44,219, 52, 44, 44,172,218, 25, 34,180, 90,237,153, 75,151, 46,249,189,249,230,155,162,220,220,220, -178,235, 18,164,196, 88,155,134,123, 49,253, 63,119,238,156, 57,249,179,133,167,167, 39,230,207,159,143,122,245,234,193,197,197, - 5,190,190,190,112,115,115,109,250,214, 91,126, 57, 69, 69, 69, 90, 62,196,120,249,131,201, 29, 61,186,118,235,214, 38, 38, 38, - 38, 62, 61, 61,253,186,208,192, 93, 64,224,133, 70,166,106,186, 15,102, 84, 48, 71,218,114,203, 25, 40,153, 91,121, 96,233,123, -148,123, 31, 14,160,125,133,117, 77,223,107, 43,252, 55,125,127,227,239,142, 96,189,250,254,251,239,111,232,221,187,119,175,233, -211,167,195,218,218, 26, 41, 41, 41,101,145, 42,137, 68,130,250,245,235,163,184,184, 24, 23, 47, 94, 68, 78, 78,206, 89, 0, 19, -106,218,160, 94,175, 55, 77,131,242, 76,143, 65, 95, 95, 95, 28, 58,116,232, 47,134,192,156, 40,198,198, 3, 69, 94,229,151, 35, - 35, 35, 93, 0,224,171,175,190,170,219, 65,225,184,223,246,237,219,247,122,223,190,125, 25, 83, 4,207,116, 47, 45, 63,148,132, - 70,163,193,206,157, 59,169, 84, 42, 61, 93,211,200,232, 28,199,233, 71,142, 28, 41, 50,181, 11,145,201,100,101,145, 53, 83,116, -205,193,193, 1,132,144,178, 2,200, 28,244,122, 61,242,239,223, 47, 59,142, 34,145, 8,108, 70,198, 51,189, 60, 77,145, 43,115, - 76,139,209,104, 92,182,126,253,250,137,254,254,254,142,238,238,238, 40, 42, 42, 2, 33, 4,206,206,206,207, 52,236,151, 72, 36, -184,123,247, 46, 78,157, 58, 85,168,215,235,151,153, 19,193,250,228,147, 79,112,232,208,161,103,170,255, 76,230,202,100, 86, 40, -165, 88,182,108, 25, 6, 12, 24, 80, 99, 84,212,148,135, 54,109,218, 84,102,222,203, 71,175, 24,134,193,204,153, 51,107,101, 50, - 71,142, 28, 89, 82,226,182,104, 81,214, 22,174,252,171, 94,189,122,207, 68,178,106, 97,174,250, 15, 30, 60,248,232,230,205,155, -225,232,232,136,194,194, 66, 60,124,248,208,148,175,234, 1, 72, 55, 87,235,209,163, 71,107, 66, 66, 66,190, 25, 60,120, 48, 9, - 14, 14,134, 84, 42,197,188,121,243,112,231,206,157,247, 1,220, 60,124,248,240,221,241,227,199,195,199,199, 71,110,102,126,247, - 92,183,110,157,253,189,123,247,158,169,254, 29, 60,120,176,241,121,111, 48, 70,163,113,229,178,101,203, 56,153, 76, 6,181, 90, -141,244,244,244,103,182, 81, 84, 84, 4, 55, 55, 55,124,248,225,135,100,245,234,213,223,161,134,113,176, 88,150, 93,182,121,243, -230,137, 93,186,116,113,116,117,117, 5,207,243,207, 24,170,242,239,111,220,184,129,195,135, 15, 23, 18, 66,106,202,159,196,221, -221,157,159, 59,119, 46, 99, 99, 99, 83, 54, 36,205,129, 3, 7,200,242,229, 43,108,191,251,238, 59,188,246,218,240,161, 60,207, -243,119,238,220,141, 95,191,126,253,101,158,231,207, 10, 69,162,128,192, 63, 74,248,255,232,183, 47,222, 96, 41,149,202,120, 0, -193, 10,133,226,173, 11, 23, 46,172,156, 62,125,186,115,231,206,157,145,149,149,133, 6, 13, 26,192,221,221, 29, 17, 17, 17,184, -113,227, 70, 38,165,116,122, 68, 68,196, 79,149, 20, 42,127,153,109,251, 94,204, 89,252,252,235, 89, 20, 22,105,254,210, 32,185, - 98, 21,207,160, 65,131,254, 98, 10, 42,211,172,216, 6,203,223,223, 63,170,126,253,250,242,196,196, 68, 67,249, 8,150,233,125, -197, 54, 88, 21, 53,213,106,245,167,123,247,238, 21,253,244,211, 79,131,120,158, 23, 85,115,179, 55, 88, 90, 90,158, 84,171,213, - 31,213,180,239, 7, 15, 30, 20, 3,192,160, 65,131,232,251,239,191, 15,123,123,251, 42, 35, 89,166,246, 87,230,236,251,189,219, -167,177,110,203, 49,240, 60,173,246,120, 50, 12,131, 97,195,134,161,166,116, 42,149,202, 60,127,127,255,119,102,206,156,249,235, -151, 95,126, 41,117,118,118,134,193, 96,192,154, 53,107,192,243,124, 89, 53,231,221,187,119, 49,125,250,244, 34,181, 90,253, 78, -100,100,100, 94, 77,233,100, 89, 22, 75,151, 46,133,193, 96,192,119,155,247,226,163,247, 71,148, 13, 52,106,105,105, 9,181, 90, -141,109,191,156, 0,195, 48,152, 62,125,250, 95,204, 75,101,154, 58,157, 14, 34,145, 8, 83,167, 78,173,182, 23, 97, 85, 6,171, -162,166,105, 60,171,144,144, 16, 58,125,250,244, 50, 19, 80, 85,180,209, 28,205,114,140,253,225,135, 31,224,232,232,136,167, 79, -159,226,225,195,135, 8, 15, 15,199,205,155, 55, 99, 41,165,233, 53,152,179,103, 52, 41,165,139, 9, 33, 63,254,254,251,239,195, - 44, 44, 44, 94,119,113,113,241, 76, 76, 76,220, 69, 41,221, 3,148,140,173,165,215,235,107,170,218, 47,211, 44, 95, 13, 88, 33, -130, 85,171, 1, 70, 43,219,119, 66,136,246,240,225,195,176,182,182,198,193,131, 7, 13,142,142,142,220,151, 95,126, 9,137, 68, -130, 5, 11, 22, 32, 49, 49,209, 48,110,220, 56,142,231,121, 80, 74,181, 53,105,198,199,199,231,121,120,120,188,243,225,135, 31, -254,242,221,119,223,201, 76,205, 11,182,111,223,142,137, 19, 39, 62, 99,174,198,142, 29, 91,164, 86,171,223, 73, 78, 78,174, 41, -127, 82,163,209, 72,203, 87,125,139,197, 98,228,231,231,209, 57,115,102,231, 23, 20, 20,106,151, 44, 89,114, 45, 33,225,113,182, - 74,149, 26,198,243,252,233,180,180,180, 4, 51,207,251,243, 84,133, 8,154,130,230,127, 74,243,101,163,198, 71,123,165, 82,249, -179, 66,161, 56,177,120,241,226, 37, 7, 15, 30,124,127,234,212,169,196,214,214, 22,123,247,238,165, 89, 89, 89,219, 37, 18,201, -140,171, 87,175,154, 53, 94, 4,199,113,177, 77, 93, 98, 2, 67, 6,244,128,214, 96, 89,118, 35, 47, 63, 65,115,249,151,193, 96, -128, 70,163,225,181, 90,109, 65,117,186, 47,186, 13, 86, 84, 84, 84, 10,128,215,254,142, 3, 46, 18,137,244, 31,126,248,161, 72, - 36, 18,161,109,219,182,101, 85,134,166,129, 13, 37, 18, 9,236,236,236,202,204, 85,117, 85,132, 98,177, 56,161,133, 91, 84,195, - 33,131, 67, 0,194,213,120, 60,213,106, 53, 24,134,201,119,114,114,170,182,203,103,100,100,228,177,128,128,128,225, 83,166, 76, -217, 53,112,224, 64,171,246,237,219,139, 27, 52,104, 0,142,227,144,152,152,136, 75,151, 46,105, 79,158, 60, 89,164,213,106, 71, - 69, 70, 70,154,213,198,135, 97, 24,204,152, 49, 3, 12,195,160,105, 67, 47,156,186, 16, 94, 86, 69, 8, 0,135, 79,253, 1, 55, -151,122,104,217,170, 21,150,126,251, 45,134, 12, 25, 82,163,166,193, 96,128,155,155, 27, 74, 11,103,148,111, 35, 84,222, 96,213, - 38,210, 84,230,134,198,142, 53, 43,146, 85, 11, 44,119,239,222,141,193,131, 7,227,214,173, 91,248,237,183,223,112,224,192,129, - 7,122,189,126,100, 29,195,233, 41, 0,214,148,190,158, 33, 53, 53,181, 72,167,211,201, 82, 82, 82,204,234,218,107, 26,104,180, - 50,202, 87, 31,154,142,111, 77,189, 7, 43, 68,176,166,252,254,251,239, 98,148, 78,149,147,145,145,113, 75, 44, 22, 75, 36, 18, - 9,146,147,147, 97, 48, 24,218,108,220,184,113, 57, 33, 68,199, 48,204, 68,115, 52,147,147,147,143,185,185,185,189,246,238,187, -239,238, 26, 54,108,152,172, 91,183,110,146,166, 77,155, 34, 63, 63, 31, 81, 81, 81, 56,117,234,148,246,208,161, 67, 69,133,133, -133,163, 82, 83, 83,205,201,159,119,180, 90,109, 59, 71, 71, 71,136, 68,162,178,104,106,114,178, 42,246,194,133, 75, 45,241, 37, -200,151, 0,246,237,163,188, 80,100, 8, 8, 8,152,109, 66,107,211,140, 64,161, 80,116, 42,237, 34, 41,226,121,126, 64, 84, 84, -212,165,218, 56, 92,133, 66, 97, 43,149, 74, 47, 21, 23, 23,183, 54,103,123, 18,137, 36, 91,171,213, 6, 43,149,202,168,234, 92, -243,132, 97,178, 68,153,132,178,197, 26,253,189, 13, 7,245, 61,253,253,253,211, 95,125,245, 85,203,170,218, 96,233,116,186,123, - 17, 17, 17,175,252, 47,221,253,192,129, 3,233,154, 53,107,224,232,232, 88,101,148,100,240,224,193,112,112,112,176,223,190,125, -123,110,101,154,237,219,183,119,149, 72, 36, 87,212,106,181,143, 89, 37,188,165,165,170,184,184,184, 91,100,100,228, 67,115,210, -217,169, 83, 39, 7, 74,233,116, 11, 11,139, 96,141, 70,211, 18, 0,164, 82,105, 76,113,113,113, 40, 33,100, 69, 85,198,186, 50, -205,182,109,219,242, 44,203,146,242, 67, 50, 84,246,191,252,251,252,252,124,235,243,231,207, 23, 86,166, 25, 20, 20,148,168,213, -106,205,158,232, 90, 34,145,100,138,197,226,103, 38,185,174,233, 28,133,132,132,208,109,219,182, 85, 27,201, 26, 52,104,208, 51, - 35,185, 87,167, 73, 8,249, 0,192, 64, 0, 41, 0,148, 0, 54, 83, 74,245,207,155,151, 42, 89,127,114,211,166, 77, 63,139,139, -139, 91, 90,213,216, 87,230,106, 6, 4, 4, 60, 9, 15, 15,247,124,244,232, 81, 89, 15,215,144,144,144,148, 63,254,248, 67, 94, - 23, 77,133, 66,113, 8,192,160,210,245,127,143,136,136,232, 87,215,125,247,244,244,116, 96, 89,118,186, 76, 38, 11, 46, 46, 46, -110, 89, 26, 89,140, 41, 46, 46, 14,213,235,245, 43,146,146,146,204,202,159, 47,162, 23,161, 16,201, 16, 52, 5, 77,129,231, 50, - 88, 66, 70,121,113,154, 3, 6, 12,208, 49, 12, 83,109, 23, 68,177, 88,204, 91, 91, 91,203, 76,147, 20,255, 47,247,189,220,192, -152,244,191,114,142, 76, 83,225,212,160,129,195,135, 15,147,151, 53,207,215, 38,130, 37,228, 79, 65, 83,208, 20, 52, 5,254,132, - 19, 14,193,255,134, 99,199,142,137,255, 63,165,247,191,216, 99,170,124,100,234,191, 74,117,213,135, 66,254, 20, 16, 16, 16,168, - 26, 70, 56, 4, 2, 2, 2, 2, 2, 2, 2, 2, 47, 22, 2,160,117, 21, 79,132,181,105,243,209,186,182, 27,174, 73, 95,208, 20, - 52, 5, 77, 65, 83,208, 20, 52, 5,205,151, 79,179, 38,237,151,165,234, 81,104,131, 37,104, 10,154,130,166,160, 41,104, 10,154, -130,230,255, 92,243,101, 67,168, 34, 20, 16, 16, 16, 16, 16, 16, 16,120,193, 8,141,220,235,128, 92, 46,151, 2, 24,194,113,220, - 24, 71, 71,199,192,244,244,244, 5, 42,149,106,213,191, 33,109,193,193,193, 75,244,122,253,116, 66, 8, 39,145, 72, 12,182,182, -182, 43,126,253,245,215,217,207,177,175,205, 0,140, 33,132,188, 5, 0,148,210,221, 0,118,168, 84,170, 88, 33, 39, 8, 8, 8, - 8, 8, 8, 60,135,193, 34,132,176, 45, 90, 52,126,151, 16,116, 38,128, 35, 5,178, 40,197, 31,119,238,220,223, 78, 41,173,211, -116, 26,221,187,119,231,212,133,133,111,179, 12, 51,144, 2,109, 81, 50,131,222, 77,131,209,120, 76,106,109,189,163,166,169,103, - 0, 96,196,136, 17,108, 82, 82, 82,162,209,104,116,169,213, 78,115, 92,202,213,171, 87,189,234,104, 56, 70,120,120,120,108,235, -216,177,163,172, 93,187,118,144, 72, 36, 88,186,116,233,116, 0,102, 27, 44,210,189, 59,231,146,227,248, 54, 43, 18,133, 80, 74, -219,130, 2, 32,236, 77, 94,175, 59,150,238,240,116, 7, 53, 99,223, 77,180,118, 35, 93,197, 34,188,107,164,216,203,186,248,223, -112,113,113,153,181,111,223, 62,216,217,217, 33, 47, 47,143,251,240,195, 15,103,117,232,208, 97,213,245,235,215,107,156,138,229, -251,153,226, 68,189, 94, 95, 58,182, 20, 87,184,122,191, 83,108,187,118,126, 1,159,126,250, 41, 58,117,234, 4,158,231,113,241, -226,197,153,171, 86,173,154, 41,151,203,195, 0,236, 0,240,139, 74,165,202,173,205, 49,108,223,190,125, 91, 0,179, 9, 33,129, - 60,207,123,112, 28,151, 12, 32, 76,167,211, 45,139,140,140,140,172,237, 57, 33,132,144, 14, 29,252, 94,179,177,193, 64, 2,248, -131,128, 48,160, 81, 89, 57,204,241,240,240,200, 95, 40,173,251, 0,145, 10,133,226, 24,128, 87, 75, 23,143, 43,149,202, 1, 47, -250, 34, 92, 63,142,204, 33, 64, 32, 0, 80, 32,108,210, 22,186,248,121,244,172, 92,155,181, 98, 37, 86, 51,169,209,240, 42, 97, - 68,167,141,154,226, 37,133, 25, 49, 55,255,151, 55,154, 78,157, 58, 89, 26, 12,134, 15, 88,160, 55, 5,218, 0, 0, 1,162,141, -192,105,142,227,214, 94,189,122, 85, 45,220,142, 5, 4, 4,254, 83, 6,139, 16,194,182,108,217,100,205,228,201, 83, 90, 13, 27, - 54,188,190, 84, 42,181, 72, 74, 74, 76,218,176,110,173, 3, 75,136, 31, 33,100, 74,109, 77, 86, 64, 64, 64, 75,142,144, 3, 19, -198,142,245,105, 31, 20,196,185,186,187,163, 56, 55, 23, 15, 99, 99,189,194,195,194,250, 30, 10, 13,157,233,231,231,247, 90, 84, - 84, 84,116,117, 58,153,153,153, 34, 17,207,187,158, 91,180,136,101, 28, 28, 64, 13, 6,168, 27, 53, 42, 25,213,219,104,132,197, -245,235,128, 94, 15,106, 52,162,184,107, 87, 0, 37,163,127,135,132,132,212,175,203,193,146,203,229,242,166, 77,155,254, 52,103, -206, 28,177, 70,163, 65, 84, 84, 20,174, 92,185,194,167,167,167, 47, 49, 87,195,181,205,208,150,110,156,219,190, 33, 67,250,123, - 15,232,237, 42,241,114,115, 6,165,150,136,141,215,121,157,186,168,236,119,252,228,169, 25, 46, 45,135,142, 72,143, 57, 24,109, -142,158, 88,132,215, 47, 79,195,152,110,223, 65,172,167,116,136,189,189,253, 51, 83, 3,217,219,219,131,231,249, 5,132,144, 15, -106, 50, 26, 6,163,193,253,163,119,198,131, 99, 89,172,218,190,217,234,230,205, 27, 1, 14, 14,206,207, 76,217,211,167, 79, 31, -244,238,221, 27,137,137,137,129, 7, 14, 28, 8,220,182,109,219,106,185, 92, 62, 87,165, 82,173, 48,199, 84, 23, 20, 20, 44,116, -116,116,252,104,202,148, 41,150, 13, 27, 54,132, 76, 38, 67,106,106,106,131,184,184, 56,175,159,126,250, 41, 36, 40, 40,104,141, - 88, 44,158,123,222, 76,147,169, 80, 40,124,251, 4,251,239, 27, 50,172, 91, 11, 55,183,150, 98,145,200, 9,148, 82,232,245, 89, - 77, 51,210,239,188,102,103,135,217,129,129,129,195,107,154, 68,184,156,158, 43,128, 13, 0,196, 0,166, 0,120,245,228,201,147, - 48, 26,141, 24, 48, 96,192,171, 10,133,194, 23,192, 26, 43, 43, 43, 90, 88, 88,248,158, 82,169, 76,123,222,139,144,101,217, 14, -227,103,125, 21, 2, 94,139, 13, 75,190,122, 46, 45,107,247,198,205, 26,120, 55,186,254,249,151,139, 45,155,248,122,145, 83,127, -220, 28,177, 97,213,215, 3,172,156, 91,190, 82, 91,147,229,239,239,239, 47,147,201,150,102,103,103, 15,138,137,137, 41,244,155, - 28,234, 2, 66,108, 64,161,137, 90,215, 43,169, 22, 38, 53, 80,204,178,251,151,207,124,207,189,121,155,182,140,133,179, 19, 72, - 66, 26,178,141,234,224, 43,209,119,186,175, 94,191,235, 35,133, 66, 49, 92,169, 84,134, 9,183,100, 1, 1,129,255,140,193,106, -209,162,241,187,147, 38, 78,110, 53, 97,194,164,246, 58,157,182, 48, 58, 58,236, 44, 75, 8,153,244,193,251, 54, 41,169, 79,234, - 25, 41,125, 23,192,150, 90,152,171, 38, 94, 30, 30, 23,151, 44, 89,226,224,232,236,140,212,212, 84, 60, 73, 74, 66,202,173,146, -182,114,189,123,247,150,180,107,211,166,209,202, 77,155,206, 41, 20,138,110, 74,165,242,118,117,122, 12,195,128, 88, 89, 33,217, -223, 31, 84, 36, 66,210,169, 83, 37,133,150,193, 0,121, 72, 8, 0,128,138, 68,200,185,114, 5, 44,203,162,126,253,250,207,115, -188, 58,117,238,220, 89, 76, 41,197,167,159,126,154, 87, 80, 80,176, 24,192,207, 42,149, 42,217,156, 31, 59,181, 25,212,196,213, -197,245,226,138,133,227, 29,252,154, 54, 1, 1,143, 39,233, 42, 0, 86,240,245,100,241,206, 48,127,241, 43, 10, 73,227, 21,107, -207,156,119,109, 61,184,107,218,173, 67,183,107,136, 4,165,241,182,141, 93,130,214, 62, 69, 30, 47,126,211,197,194, 66,223,168, - 81, 35,204,159, 63, 31, 28,199, 65, 44, 22,195,219,219, 27, 17, 17, 17, 99,219,181,107, 55, 49, 48, 48,176,216,104, 52,246, 81, - 42,149,151,205, 48,214,176,181,181,173,116,130,104, 66, 8, 26, 52,104,128,105,211,166,193,223,223, 95, 50,122,244,232, 37, 0, -106, 52, 88,133,133,133,223,116,236,216,241,163,133, 11, 23, 74,174, 95,191,142, 11, 23, 46,224,248,241,227,144,203,229,240,245, -245, 37,139, 22, 45,178, 92,189,122,245,135,143, 31, 63,102, 0,204,168, 73,207,207,207,207,171, 85, 43,231,171, 43,150,127,225, -124,228,232,109, 44, 95,190, 13, 15, 30, 60, 0, 0, 52,108,216, 16,111,141, 28, 33,250,121,215,134, 86,179,103,127,121, 69,161, - 80,116, 86, 42,149,113,102,156,166, 13,139, 23, 47, 30,100,109,109,141,217,179,103,199,249,250,250,194,214,214, 22, 27, 55,110, -132,131,131, 3,244,122,125,220,210,165, 75, 57,149, 74,133,239,191,255,126,107,185,232,214,243, 69,171,168, 26,200,251,218,220, -136, 29, 91,229, 67, 13, 35, 91, 48, 99,206, 2,105, 74,177, 13,126,216, 24, 7, 69, 35, 23,210,239,205, 15,164,191,108, 92, 50, - 27,192, 27,181,136, 50, 6, 88, 90, 90,158,213,104, 52, 50,169, 84,106, 5,160, 16, 32, 54,224,201,155,132,240,183,253, 38,135, -234,162,214, 5,215, 24, 21, 85, 40, 20,129,173,155,122,135,174,250,122,174, 53,147, 17,135, 66, 18,137,226,116, 61,176,252, 8, -136,157, 19,186,127, 58,133,107,235,223,206, 99,246,103,139, 67, 3, 2, 2,122, 69, 68, 68,132, 11,183,101, 1, 1,129,151,129, - 26, 27,185,179, 4, 93, 6, 13, 30,236,170,209,168, 11,138,138, 10,178,227,238, 70, 60, 62,121,114,107, 68,100,196,217,219, 61, -123,117, 42,230, 88,116,169,234,183, 21,123, 24,140, 24, 49,130, 21, 17,114,112,233,210,165, 14,172, 88, 12,189, 94,143, 6, 13, - 26, 64,173, 86, 35, 63, 59, 27,105,137,137,184,124,244, 40, 10,159, 62,197,212, 81,163, 28, 36, 44,187, 95,161, 80,136,170,211, - 44, 13, 75, 85,140, 8, 60, 51,255, 92,233, 4,207, 85,206, 73, 87,139,158, 16,143, 84, 42, 21,172,172,172,208,188,121,115,107, - 0,151,170, 50, 87,127,153,244,118,196, 8, 86, 44,182, 56,188,108,225,155, 14,156,232, 33,226, 18, 35,144,157,111,132,193,104, -143,167,185, 58,156,143, 56,142, 45,251,230, 35, 73, 21,134,247,223,106,100, 47,181, 50, 30, 37,138, 9,213,238, 59,207,243, 46, - 91,119,254,130,165, 27,246, 34,184,255, 96,244,234,213, 75, 20, 19, 19,131,240,240,112,132,135,135, 35, 50, 50, 18, 9, 9, 9, - 24, 59,118,172,248,171,175,190, 66,159, 62,125,164, 44,203,158,170, 74,147, 99,185,148,239,118,108,194,138,173,235, 33,146,216, -224,192,129, 67,200,202,202,194,246, 69,190, 88,241, 9,193,138, 79, 8, 54, 45,112, 67,118,246, 83, 92,187,118, 13,203,150, 45, - 67, 81, 81, 17,120,158,231,106, 58,158,254,254,254,254,182,182,182, 83, 23, 44, 88, 32,217,181,107, 23, 34, 34, 34,160,215,235, -225,228,228,132, 27, 55,110,224,215, 95,127,133, 66,161,192,236,217,179,165, 98,177,120,146,191,191,127,135,106,143, 39, 33,196, -217,137, 28, 92,181,234,115,103,150,137,129,163,221,183, 8, 11,187,140,180,180, 52,164,165,165,225,250,245, 43,112,176,223, 12, -142,187,131, 21, 43,190,168, 87,175, 30,246, 19, 66, 24, 51,206,187,248,238,221,187, 40, 46, 46,198,158, 61,123,184,197,139, 23, -227,250,245,235,144, 74,165,120,231,157,119,176,102,205, 26,206,209,209, 17,241,241,241,200,207,207, 39,181,205, 75, 4, 8,156, - 56,103,225,160,137,115,190, 26, 68,128,192,245,227,200, 28,163,209,216,126,253,226,175,177,126, 61,210, 40, 16, 86,147,230,215, - 95,127,237,222,170, 85, 43, 95, 66,136,180,146, 11,122, 64,131, 6, 94, 56, 18,150,129,172, 2, 61,226, 83, 53,104,224,219,146, - 80, 94,215,187, 58,205,110,221,186, 77,237,216,177,163,166,125,251,246,134, 46, 93,186,236, 19,137, 68,231,190,249,230, 27, 43, - 75, 75, 75, 45,117,104,101,229, 55,233,140, 23, 64, 12, 96,168,134,130, 44, 6, 88,199,118,227, 67, 37,213,105,118,234,212,201, - 82,194,113,251, 87, 47,154,103,173,143, 56, 0,226,238, 9, 87,223, 9,176,182,239, 8,154, 91, 12,195,141, 88, 20, 44, 95, 3, -206,146,199,188,121, 51,173, 89, 96,111,163, 70,141, 36,117,188, 54,205, 70,208, 20, 52, 5,205,127,167,230,127, 46,130, 69, 8, - 28, 44, 45, 45,196,215,174, 30, 63, 28,127,255, 70,106,194,147,155,217,132, 80,146,148,164,204,106,209,162,135, 35, 40, 28,204, -221, 88,124,124,252,232,143, 39, 78,108,100,235,224, 0,131,193, 0, 39, 39, 39, 36, 37, 37, 65,173, 86,163, 48, 47, 15,197, 5, - 5,208,228,229,225,238,217,179,232,212,175, 31,250,250,249,121, 29,141,140,124, 31,192,186,170, 52,245, 12, 3,117,139, 22,120, -114,238, 28, 24,189, 30,245,123,244, 40,139, 90, 61,189,126,189,100,110, 59,131, 1,182,189,123, 3, 50, 25,184,249,243,235,124, -176, 84, 42, 85,100,131, 6, 13, 78,244,235,215,175,255,248,241,227,153,180,180,180,147,114,185,252, 21,149, 74, 21, 83,211,111, - 93,238, 25,223,121,251,125,255,134, 46, 14, 28,142, 94, 62,129,230, 94, 3,192, 49, 26,228, 21,106,145, 91,168, 69, 76,220,239, -160,188, 53,110,197, 62, 65, 96, 75, 25, 58,183,183,247, 44, 60,151, 53, 30,192,218,234,116,139,139,139,177,117,235, 86,220,189, -123, 23, 98,177, 24,245,234,213, 67,247,238,221,209,184,113, 99,168, 84, 42, 60,124,248, 16, 87,175, 94,133,143,143, 15,210,211, -211, 97, 52, 26,165, 85,105, 77, 93,170,243,146,203,229, 84,165, 82,225,244,233,211, 0,128, 67,135, 14, 33, 47,251, 9,202, 85, - 29, 98,229,202,229,208,235, 75,134,247,208,233,116,102, 29, 59,150,101,103, 76,158, 60,217, 66,169, 84, 34, 39, 39, 7,118,118, -118,176,181,181,133, 92, 46,199,221,187,119,203,214,243,240,240,192,228,201,147,165,107,215,174,253,184,186,136, 75,135, 14,126, -175,125,248,225,128, 22, 82, 75, 41,146, 18, 87,163,121,115, 49,166,127, 82, 15,139,191,205, 44,217,151, 15, 61, 17, 16, 80, 15, -121, 57,251,224,228,242, 25,166,125, 50,184, 81, 65, 1,125, 27, 37,237,198,170, 99,202,174, 93,187,226,250,244,233,195, 69, 70, - 70,150,205,191,103,154, 52, 60, 53, 53, 21, 90,173, 22,123,247,238, 53,160,164, 10,177, 90,228,114,249, 28,148, 70,172, 0,132, -125,222, 15, 0,213, 3,121, 95,153,142, 75,135,241,179,190,114, 45,173, 30, 12,155,104, 70,251, 43, 47, 47, 47,195,234,213,171, -237,215,172, 89,211,211,193,193, 33, 49, 59, 59,251, 86,169,233,172,239,228,213, 58,237,228,249,112,239, 54,222,190,228,201, 83, - 45,154,215,183,193,189, 91, 87,121,142, 19, 31,175, 78,211,104, 52,206,219,185,115,167,196,201,201, 9, 31,126,248, 97,191,113, -227,198, 73, 21, 10, 5,161,148,130,202, 60,236, 41, 67,123, 82,194, 92,101,120,250, 27, 1,250,241,224,199, 16,142,172, 5,240, -164, 42, 77,131,193,240,193,178,175, 63,114,163,178, 12,136,123,246, 7,147, 65,144, 60,113, 16,248,124, 53,116,223,124, 0,158, -138,161,209,114,208, 13,249, 16, 98,223, 38,248,208,191,189,252,187,200,240, 73, 0, 86, 11,183,102, 1, 1,129, 10,180, 7,224, - 92,250, 62,179,228,121, 21,245, 0,100,148,126,230, 12, 64, 11,160,252, 67, 90,197,229,242,235, 86, 92, 46,255, 62, 19, 0, 45, -125,111, 68,201,131,111,118,157, 34, 88,132, 16, 90, 46, 50, 80, 97, 96, 44,146,145,148,244, 40,165, 32, 63,189,120,112,223,192, -185, 35,131, 93, 86,124,244,254,196,229,182,182, 50,105, 66, 98, 28, 79, 24,146, 97,238,198, 44, 57,174,191,162, 99, 71, 81,106, -106, 42,236,236,236,144,156,156,140,123,247,238,149, 24,172,220, 92,104,178,179, 97,120,250, 20,244,233, 83, 60,190,120, 17,205, -228,114, 9, 7,244, 51,195, 73,131, 16, 82, 54,153,179,201, 25,154,162, 86, 44,203, 2, 86, 86, 32,214,214, 0, 83,187,145, 41, -228,114,249,224,230,205,155, 95,147,203,229,243, 0, 64,175,215,127,176,120,241,226, 76, 74, 41,102,206,156,105,107,101,101,181, - 87, 46,151, 91,212,164, 99,227,104,124,173, 99,219, 38,236,195,228,219,104,209, 96, 16, 92, 29, 59, 33, 59, 95,141,172, 60, 53, -178,243, 53,104,212,120, 58, 92, 61,223,131,131,199,251,136,142, 75,132,187,107, 3,134, 21,137,251,213,180,223,197,197,197,208, -235,245,208,106,181,176,183,183, 71,191,126,253,192,178, 44,126,250,233, 39,156, 56,113, 2,221,186,117,131,181,181, 53,138,139, -139,193,243, 60,106, 59,238,153,167,167, 39, 72,133,109,234,245,127,206, 79,172,213,106,205,210, 33,132, 4,214,175, 95, 31, 9, - 9, 9,101,230,202,214,214, 22, 3, 6, 12,192,245,235,215,161, 84, 42,203,170, 37,219,180,105, 67, 24,134,233, 80,157,158,173, - 45, 6, 4, 4,116,150,228,100,111, 3, 80,210,180,108,236,187,206,248,227, 66, 43, 92,190,164,192,148, 15, 27,130, 33,150, 32, -140, 24, 69, 5,103,208,170,117, 27,177,141, 13, 29, 88,157,102,105,131,246,135,173, 90,181,226, 38, 77,154, 4, 11, 11, 11,252, -248,227,143, 88,191,126, 61, 86,174, 92,137,184,184, 56, 52,104,208, 0,238,238,238,112,117,117,229, 0, 60, 44,253, 77,117, 4, - 62,122,244,104,208,163, 71,143, 6,245,110,150, 55,138, 2,129,235,151,124,133,245,235, 1, 10, 4,242,148,182, 47,169, 30, 52, -191,237,213,145, 35, 71, 50, 78,156, 56,193,110,216,176, 33,125,220,184,113,109, 61, 61, 61, 71, 18, 66, 36,245,234,213,123,111, -250,148,247, 46,236,221,186, 82,159,159, 28,201,183,243,100,241,228,246, 57,254,232,158, 53, 69,234,162,188,165, 53, 24, 44, 9, -203,178,160,148,226,253,247,223,151, 53,109,218,148, 24, 12,134,146,252, 98,208,232, 24,202, 52, 99,120,254,117, 16,232, 40,240, - 35,161,164, 59, 74,218,169, 85,109,170,129,222, 45,219,180, 97,139, 10, 31,193,218, 86,129,167, 75,191, 0,159,154, 13,154,158, - 7, 35, 39, 67, 49,111,137, 60,173, 8, 89,109,252,160,186,113, 23, 46, 50, 91, 78, 68, 72, 95,161, 28, 17, 16,248,111, 81,189, - 7, 41,195,153, 16,114,148, 16,114,116,206,156, 57, 61, 0,212, 35,132, 28, 45, 53, 65,206,165,239, 37,166,117,170, 88,118, 46, -175, 83,225,183,229,223, 59,205,153, 51,167, 39, 33,228,104, 80, 80,208,232, 82, 35,247,226, 35, 88, 6,158, 94,221,176,238, 7, -199,113,239,191,225,113, 41, 34,124,245,175,251,243,223, 11, 10,220,180,204,171, 65, 59,151, 45, 91,207, 89, 25,121,122,198,220, -141, 81,160,157,147,171, 43, 30, 63,126,140,240,240,112,168,213,106,104, 52, 26,104, 52, 26,232,178,179,161,207,201, 1,201,207, -135,196, 96,128, 58, 41, 9, 13,219,180, 1, 8,105,101,142,193, 98, 89, 22,108, 57,243, 64,240,103, 85, 33, 67, 41,136,149, 21, -136,149, 21, 80, 69, 53, 97, 21,230, 74,225,231,231,247,235,198,141, 27,197,211,167, 79,239, 32,151,203,127, 80,169,254,143,189, -243, 14,143,162,218,223,248,123,102,119,182,183, 84,210, 19, 18, 90,232,144, 37, 52, 17, 34, 32,189, 8,130, 87, 84,138,162, 23, - 1, 27,138, 20,229, 7,138, 26,202,181,208, 36, 52,165,137,136,160, 32, 93, 64,202,149, 22, 18, 16, 66, 73, 32, 16, 82, 54,164, -247,178,117,206,239,143,100,115, 3, 6,178, 27, 64, 34,158,207,243,204,179, 59,179,187,239,206,156, 57,115,230,157,239,105,134, -155,190,190,190,189, 22, 46, 92,120,250,147, 79, 62,145,189,248,226,139,161, 81, 81, 81, 99, 0,172,184,151, 22, 47, 53,181, 9, -242,110, 10, 17,121, 18,185,133, 38,228, 21, 25, 81, 88,106, 66, 97,177, 9,251,246,189, 12, 99,121, 25, 44, 70, 51,172, 38, 51, -212, 13,134,160,113,203,158, 0,174,213, 58,130,174,209,104,132,205,102,131,213,106, 69, 88, 88, 24, 50, 51, 51,209,183,111, 95, -156, 60,121, 18,151, 47, 95,198,206,157, 59, 49,112,224, 64,196,197,197,213, 57,243,203, 20,158, 88,180,118,101,133, 35, 23,171, - 81,189,102,217,209, 8,150, 32, 8,126, 82,169,180,210, 28,105,171,150, 37, 75,150,148, 78,154, 52, 73,249, 39, 51, 46,151,223, -123, 30, 64,129,134,185,186,181,128, 33, 37,178,242,162, 20,131, 16, 25,122, 62,125, 14,102,179,128,132, 43,253, 32,147,201,192, - 17, 25,172,182,108,104,117, 94,160,180,214, 17,137, 7,236,221,187, 23, 90,173,182,170, 90, 16, 0, 6, 12, 24,240,134, 86,171, -237, 81, 94, 94, 62,124,231,206,157,200,207,207, 71, 72, 72, 8, 26, 52,104,128, 83,167, 78, 13,112,160,240, 64, 86, 86, 22,188, - 53, 22,215,215,103,204,245, 2,231, 86,233,106,110,121, 45,159, 55, 55, 35, 42,242,147, 29,180, 34,202,213, 49,106, 60,217, 94, - 91, 79,194, 45, 91,182,216,124,125,125, 19, 50, 50, 50,122,204,155, 55, 47,179, 73,147, 38,129, 31,127,252,241,108, 31, 31, 31, -247,105,239,190,121,227,137,174,157,215, 47,248,106, 77,183, 29, 27,190,108, 72,128,221, 38, 83,241, 7, 37, 25, 87,175,212,118, - 13, 93,184,112, 1, 26,141, 6,137,137,137,112,119,119,135,205,102,171,120,120, 41, 73, 46,180, 17,250, 29,161,248,142, 0, 75, - 40, 71, 46, 66,160, 45,169, 77,144,182, 28,249, 35,119,113,203, 8,225, 46,215,123, 27,169, 92,134,146, 82,138,162,223,119,129, -230,150,130,230,151, 65, 40, 53,161,164, 76,132,162, 82,130,162, 82, 1,101,109, 59,192,182,255, 36,220, 10,202, 33, 0,237,216, -237,134,193, 96,220,163,172, 26, 68, 8,217, 25, 25, 25, 57,232, 94,159, 83, 74, 7, 1, 48,221,177, 14, 71,222, 3,192,188,121, -243, 62,171,182, 94,250, 80, 12,214,165, 75, 87,191,229, 69,164,157, 76,110, 84,244,138,104, 43,119,117,113,225, 26,120, 10,186, - 35, 71,254,208,220,186,149,159, 17, 23,119,245, 27, 39, 82,134,148,229,229,193,112,238, 28, 10,243,242, 80, 86, 92,140,242,162, - 34, 88,243,242,224,211,188, 57,104,113, 49, 68,101,101, 16, 27,141,144, 8, 2, 20, 42, 21, 64,233, 61,111,180, 98, 65,128,236, -216, 49,248, 12, 27, 6,202,243,200, 61,125,186,170, 90, 80,211,183, 47,160, 84,130,232,116,176,108,219, 6,145, 72, 4,193,213, - 21, 88,180,200, 17,115,229,225,237,237,189, 99,201,146, 37,146,220,220, 92,196,197,197,157, 51, 24, 12, 5,190,190,190, 26, 0, - 66, 66, 66,194,129, 43, 87,174, 12, 10, 9, 9, 1,128,198,181,233, 21, 23, 40,205, 86, 11, 69,106, 78, 18,174,220, 56, 11,142, -107, 0,142, 15, 68, 97,137, 9, 28,231, 5, 75,217, 21, 88,204,102, 80,155,128,242,210, 52,148,154, 28,155,103, 88, 16, 4,136, -197, 98,112, 28,135,102,205,154, 97,253,250,245,184,120,241, 34, 18, 19, 19,225,233,233,137,130,130, 2, 52,107,214, 12,151, 47, - 95,190,107, 27,180,154,110,182,213, 9,121,226, 91, 72,165, 82,252,248,227,143, 80, 74,110,247, 66,142, 26, 44,177, 88,156,150, -146,146, 18,228,233,233, 9,142,227,160,213,106,161,211,233, 48, 96,192, 0,197,205,155, 55,179,140, 70, 99,139,152,152,152, 28, -103, 50,239,174, 93, 39, 48, 97,194, 69,100,101, 85, 4, 81, 55,111,106, 89,245,217,141,235,102,244, 27,184, 23, 0,224,226,226, -130,207, 63,111,235,144,166,205,102,195,138, 21, 43,160, 80, 40,170, 12,150, 84, 42,125, 98,202,148, 41,195,107,250,126,203,150, - 45, 29, 74,207,170,116,162, 22, 32,111, 98,141,223,123,125,198, 92, 47, 80,203, 16, 71,122, 18, 26, 12,134, 50, 87, 87,215,227, - 5, 5, 5,207,108,218,180, 41, 55, 60, 60, 92,228,226,226,146, 11, 64, 70,173, 38,243,201,223,126,186, 81, 92, 80, 48,218,108, - 54, 59,220,104, 60, 55, 55, 23, 70,163, 17, 55,110,220,128, 66,161, 0,207,243, 16,132,219,188, 19, 1, 1, 96,179, 89, 64, 56, - 78, 76, 68, 28,148, 30,247, 52,150,184,113, 11,100,217,118,228,140, 30, 8,219,220, 73,176, 88, 37, 40, 41, 20, 96, 26, 56, 25, - 38,179, 0,139, 72,138,178,230,173,144,247,241,167, 48,106,148, 64,220,113,118, 7, 97, 48, 24,247, 42, 87,118, 78,159, 62,125, -166,131, 95, 63, 0,192,161,161,117,236, 70,204,190, 62,125,250,244,153,246,255,138,140,140, 44, 3, 96,112,118, 95, 57, 7,254, -212,102,177,217,150, 93,186,148,219,246,220,249,204, 54, 98,177, 57,235,231, 95,206,181,220,119,224, 82,104, 81,137,117,137, 83, - 67, 52, 16,114, 46, 49, 62, 30,130, 32,160, 56, 63, 31,101,121,121,176,100,101,193,146,149, 5, 82, 84, 4,190,172, 12,226,242, -114,240,166,114,200,197, 98, 20,100,100,128, 16, 82,107, 67, 58, 90, 89,101, 69,238,172, 22, 84,171, 65, 42, 23,251,182,154,122, -197,213,132, 84, 42,253,110,197,138, 21, 62, 62, 62, 62, 88,189,122, 53,124,124,124,154,247,234,213,171,180, 83,167, 78,133,131, - 6, 13,138,155, 58,117,234,160, 14, 29, 58, 32, 51, 51, 19, 0,174,213, 26, 9, 52, 75, 99, 46, 37, 90,145,146, 30,141, 83, 49, -223,226,240,177,143,145,150,126, 13,121, 69, 70,104,188, 95,129, 88,217, 5,212, 86,113, 51,147,185,246, 64, 70, 70, 54,128,218, -143,157,227, 56,200,100, 50, 72, 36, 18, 36, 37, 37, 65, 16, 4,196,198,198, 66, 46,151,195,207,207, 15, 61,122,244, 64, 90, 90, - 26, 84, 42, 21,120,158,191,167,214,226,247, 37,201, 83, 70,166,227,139, 41, 28,174, 30,121, 30,142,156, 90, 71, 13, 22,128,211, - 9, 9, 9, 84,163,209, 84,153, 43,173, 86,139, 62,125,250,144, 17, 35, 70,104, 21, 10,197,174,136,136, 8,135, 7,190,165,132, -156, 21,108, 57,104,212,168, 81,213,182,117,235,179, 16,123,166, 55, 46,158, 31,140,159,119,164, 87,109, 15, 12, 12, 68, 70,198, -117, 16, 82,107,163,204,221, 3, 7, 14,196,206,157, 59,171, 12,214,176, 97,195, 80, 94, 94,254, 92,229, 19, 13, 8, 33, 32,132, - 96,206,156, 57, 21,143, 53,165,165, 70, 71, 13, 86, 82,174, 84, 57,243,253,121, 25, 51, 63,149,100,204,252, 84,146,177,104, 41, - 41,126,125,198, 92,175, 9,211,103, 13, 1,224, 85,189,109,150, 35,228,229,229, 21,158, 56,113,226,240,187,239,190, 27,208,186, -117,235, 82,127,127,127,115, 81, 81,145,232,217,103,159, 13,200,206,206,158,228,140,185,162,148, 34, 39, 39, 7,217,217,217, 72, - 73, 73, 65,102,102, 38,178,179,179, 43,134, 60, 81, 5,106, 57, 74, 94, 32, 32, 63, 82, 27,202, 65, 68,205, 0, 92,179,113,212, -120,238,219, 30,194, 61, 68,207,151, 21, 22, 1,165, 20, 56,119, 19, 70, 65,142, 66,147, 24,249, 70, 17,138,202,109, 40, 36, 18, - 20,113, 50,228,118,141,128,209, 38, 66, 65,126, 1, 56,224, 28,187,133, 48, 24,140,123, 25,161,121,243,230,125,246,176,180,237, -239, 35, 35, 35,227,170,253,151,226,126, 34, 88, 17,213,234, 61, 35,238,252, 82,126,126,217,202,200,200, 41,109,123,245,234,133, -194,194, 66,236,218,181,171, 97,122,198, 90, 36, 37, 37,173, 3,208,213,209, 63,179, 80,186,231,204,153, 51, 3,187,117,233, 34, - 75,138,141,133, 53, 63, 31,182,188, 60,240,102, 51,196, 37, 37,224,140, 70,136,202,202, 16,216, 94, 9, 66,189,113, 42,209, 96, - 53, 11,194,190, 90, 82, 4,168, 52, 88,212, 94, 37,200,113, 21,102,170,178, 90,208,110,176, 56,142,115,200, 96,249,250,250, 42, -251,244,233,211, 43, 44, 44, 12,148, 82, 44, 92,184, 16, 38,147, 73,106,177, 88, 96,177, 88, 96, 54,155, 81, 84, 84,132,109,219, -182, 97,237,218,181,199, 1,124, 91,107,164,201,106,220,115,232,191,103, 7,140, 25,241,148,116,207,175,171, 96, 54,217, 80,110, -117, 69, 97,105, 57, 10,203,196,176,168,250, 2, 57, 71, 65, 57, 25, 2,252, 91,224, 90,194,197,114,155,197,188,183, 22, 39, 15, -158,231,161,209,104,160, 82,169, 16, 31, 31,143,137, 19, 39,226,208,161, 67, 72, 79, 79,199,147, 79, 62,137, 30, 61,122, 96,255, -254,253,112,117,117, 69, 97, 97,225, 61,143,191,250, 56, 88, 95,173, 93, 13,145,136, 64,184,203,237, 83, 36, 18, 65,167,211,161, -184,184, 24, 0,106,117, 89,102,179,121,225,182,109,219, 6, 55,106,212, 72, 30, 16, 16, 80, 85, 69,168,211,233, 48,121,242,100, -233,165, 75,151, 90, 94,185,114,229, 43, 0,147, 29,201, 75,133,133,116,119, 78,238,213,145, 67,135, 14,149,156, 60,121, 18,148, - 82, 52,109,170,131, 86,163, 6,225,100,104,209,194, 19,192, 21, 16, 66, 16, 17, 17, 1,147, 41,205, 90, 82,130,123, 54,244,142, -137,137, 25,168,215,235, 67, 44, 22, 75,124,235,214,173,197,183,110,221,194,136, 17, 35,176,121,243,102,251, 19, 13,166, 79,191, -125, 80,252,226,226,226, 90, 7,200, 20, 4, 1,102,179, 25, 43,118,166,169, 37, 18,137, 26,168, 24,143,237,179,209,110, 25,160, - 22, 53, 10,231, 2, 64, 70,212,188,143, 79, 3, 21,195, 55, 56,122, 77,229,231,231, 39, 7, 5, 5, 37, 44, 93,186,180,229,228, -201,147,203, 39, 77,154, 20, 80, 82, 82,242, 61,165, 52,201,201,130,197,148,158,158, 14,133, 66,129, 11, 23, 46,152,148, 74,165, -196,219,219,187,162,145,187, 72, 34, 22,136,112,133, 18,209, 9,206, 70, 37,160,244, 69, 10, 28, 38,132,220,243,188,219,128, 95, -175,198, 93,234,217,216,191, 9, 87,244,219, 5, 20,132,117, 67, 81, 9, 80, 82, 76, 96,227, 21, 40, 17,203, 80,220,168, 41,138, -220,189, 33, 6, 7, 67,114,146,197, 66,233, 62,118, 11, 97, 48,254,113,220,211,131,220, 25,193,234,210,165,203,247,213,163, 76, -246,247, 0,140, 0,238,213, 38, 58,171,122,164,170,186,161,170,233,127,238,208,173,155,193,162,148, 30, 1,112,215, 59,175,193, - 96,120,226,165,151, 94,162,215,174, 93, 67,126,126, 62,190,249,230, 27,251,246,174,206,252, 89, 80, 80,208,250, 95, 14, 28,152, -218, 46, 52, 52, 52, 56, 56, 24, 87,246,237,131,196, 98,129,216,106,133,168,180, 20,188,217,136,134,122, 21, 36, 10, 15,164, 39, -149, 98,227,249,243, 73,148,210,149,247, 52,109, 28,135,226,167,158, 66, 97,108,108, 69,181,224,128, 1,255,171, 22,220,178,165, -194, 88, 9, 2,196,115,231,130, 83,169, 64,158,126,186,214,253, 52, 24, 12,165, 77,154, 52, 57,115,249,242,229,240,208,208, 80, -124,244,209, 71, 72, 73, 73,129, 32, 8,200,206,206, 46,207,204,204, 76,203,201,201, 73, 2,240, 19,128, 85, 6,131,161,214,145, -194, 51,155,138,214,238, 63,112,240, 61,125,251,150,205,250,246,154,131,159,126,254, 63,228,230,231,163,200, 40, 70, 65,177, 9, -197,101, 20, 50, 73, 40, 66, 66, 58,192,100, 44,197,213,184,152,212,108,137,219,202, 90, 79,160, 88, 12,157, 78, 7,157, 78, 7, -177, 88,140,253,251,247, 67,175,215, 99,204,152, 49, 72, 74, 74,194,158, 61,123,160, 80, 40,224,230,230,134,244,244,116,103,110, -184,104,214,172, 25,178,179,243,145,147,147,115, 91,196,204,205,205, 13, 74,165, 18,103,206,156,193,177, 99,199, 44, 0,106,157, -138, 39, 54, 54, 54,182,107,215,174, 75,214,175, 95,255,198, 7, 31,124, 32,183,155, 43,123, 68,232, 63,255,249,143,242,185,231, -158, 27,171,215,235, 79,196,196,196,108,170, 53, 28,118,250,220, 22,181,154,204, 24, 55,238,245,214, 47,190,248, 34,182,110,253, - 30, 47,143, 11, 5,225,100, 32, 68,134, 33,131,155,227,227,185,103,208,169, 83, 4, 60, 61, 37,248,245,215,184,235, 98,177,110, -189, 3,135,190,100,193,130, 5, 98,185, 92, 14,147,201,132,226,226,226,170,227,159, 55,111, 30,102,204,152, 1, 0,152, 61,123, - 54,230,204,153,131,178,178, 50,185,163, 17,172,196,196,196, 42,163,207,113, 92, 85, 68, 11,144,224, 86, 17,159,247,235, 21,237, -105,131,193,224,244, 40,238,201,201,201,191, 46, 89,178,164, 13,207,243,222,123,246,236, 17, 74, 75, 75, 55,215,225,201,237,147, - 19, 39, 78, 44, 0, 32, 86, 42,149, 59,255,248,227,143,190,197,197,197, 74, 74, 41,184,146,212, 2, 74,201,102, 66, 5, 14, 32, - 67, 64,104, 51, 74, 48,131, 16, 91, 86, 45,121,115,217,140,239,126,126,107, 85,212,127,252,138, 74, 10, 81,250,105, 20,204, 49, - 23, 97,150,170,145, 61, 55, 18,101, 38, 1,101,121,197,208,174, 94, 6,185,151, 55, 14, 23, 37,102, 20, 20, 22, 46,103,247, 26, - 6,227, 31, 23,149,186,167, 7,169,110,142, 42,223,231, 2, 72,138,140,140,204,174,214, 22, 43, 11, 21, 17,240,118,149,223,203, -186,227,119, 89, 0,162, 1,132, 87,211,201,170,102,180,170,191, 55,221,241,157, 58, 69,214,137, 35,189,202,124,125,125, 79,204, -158, 61,187,243,240,225,195,145,149,149,133,227,199,143, 99,237,218,181, 72, 74, 74, 58,105, 48, 24,186,220,195, 1,254,105,182, -237, 14, 29, 58, 52,109,160,213, 30,159, 52,124,184,155,204,104, 68,234,137, 19, 48, 27, 12,240, 12, 14,134,148,231,225,214,208, - 7,197,133, 70, 68,157, 63, 95,112,189,160,224,201, 59, 7, 26,173,174, 25, 17, 17, 33, 51,153, 76, 37, 91,183,110, 21,101,103, -103,131,179, 90,161, 28, 53,170, 34,106,165,211,193,182,114,101, 69, 52,139, 82,136, 22, 45, 2,167,209, 64,209,173, 27,122,206, -156,137,152,152, 24,114,175,253,244,245,245,245,111,216,176,225, 31,187,119,239,118, 77, 75, 75,195,144, 33, 67, 98,203,203,203, -159, 50, 24, 12, 69, 14, 37,108, 13,154, 30,109,134, 52,117,115,245, 60, 62,118,204, 24, 55,181,220,134,216,184, 56,164, 20, 52, - 64,169,209, 2,173, 74, 10,255, 6,106, 24,203, 75,240,251,161,157,121,229,197,249, 61,238, 28,104,244, 78, 77,189, 94, 79, 43, -163,107,216,191,127, 63, 90,180,104,129,194,194, 66,148,151,151,131, 16, 2,165, 82, 9, 87, 87, 87,184,186,186, 66,167,211,225, -247,223,127,199,214,173, 91,239,122,236,213,167,202,177, 9,188,233,224,149, 39, 37,239,188,243, 46, 73,141,254, 55,138, 11, 42, - 6,238,230,165, 58,164,227, 85,236,217,179,143,230,230,230,110, 1,240,129,193, 96,184, 94,219,177, 87,158, 47,177,197, 98,153, - 43, 18,137,222,124,245,213, 87,229,109,218,180, 33,193,193,193, 48, 24, 12, 56,119,238, 28, 93,190,124,185,145, 16, 50,235,240, -225,195,159, 59,146,158,225,225,225,193,205, 67,221, 79, 13, 28, 52,204,195, 98,177,162,119,207, 34, 88,173,217, 32,156, 4, 98, -113, 3, 28,251, 47, 65, 70, 70, 46, 78,156, 56,145, 27, 31,159,223,227,204,153, 51, 23,107,211,212,235,245,219, 7, 15, 30, 60, - 68, 46,151, 99,235,214,173, 86, 47, 47, 47,177,139,139, 11,214,174, 93,123,215, 40, 34,173,214, 78,240, 78, 77, 95, 95,223,237, - 9, 9, 9, 67, 46, 92,184, 80,101,172,236, 38, 43, 56, 56, 24, 18,137, 4,132, 16, 88, 44, 22, 52,107,214,108,135,193, 96, 24, -234,200,177,215,240, 29, 79, 79, 79,207, 57, 89, 89, 89,243, 40,165, 41,117,201,159,119,164,109, 7, 0,135, 4, 65, 80,114, 28, -231, 27, 29, 29,157,209,126,226,193, 70,160,100, 20, 64, 47,130,224,196,217,175,123,101, 56,144,158, 29, 27,135, 52, 60, 56,233, -141, 55, 84,133, 89,133,200,157,246, 9,138, 76, 2,114,222,155, 14,163,153,194,227,251,111, 32, 82, 41,113, 84, 82, 82,146, 86, -144,211,243,206,129, 70, 29, 57,118,167, 11, 61,166,201, 52,153,102,189,212,124,220,112,168,205,139,193, 96,232,226,235,235, 75, - 63,250,232,163, 63,109,119,246, 15,207,156, 57,147,208,161, 67,135, 30,115,191,253,118,235,160, 22, 45, 26, 54,107,212, 72,226, -222,178, 37, 20, 42, 21,242,179,179,113,238,134,193,182,238,202,149,235,101, 22,203,200,179,103,207,214,218,245, 77, 16, 4, 88, -173, 86,184,187,187,131, 90,173, 80, 76,159, 14, 74, 8, 4, 66, 80, 76, 8, 4, 65,128,205,102,131,172, 83, 39, 88, 69, 34,228, -230, 57, 54,148,133,193, 96, 72,245,245,245,125,118,242,228,201, 7,215,173, 91,199, 69, 68, 68,180,223,179,103,143,112, 63,137, -157,125,126, 71,130, 87,155, 97, 61, 22, 47,249,250,199,176, 14,157,131, 26, 6, 7,203,186, 4,104, 97,178,216,144,145,153,131, -107,151,255, 48, 38, 92, 58,151, 34,152, 77, 35, 51, 47,110,175,245,216, 69, 34, 81,230,212,169, 83, 27, 0, 64, 81, 81, 17,142, - 28, 57,114,219, 80, 12,246,161, 43,170, 87,141,242, 60,127,215,209,183,223, 92, 96,190,109,126,198, 69,190,190,250,241,227,199, - 47,120,247,185,204, 8,123,213,225, 23,223,172,192,230,109, 27,143, 90,172,228, 61,131,193, 16,227,204,241, 87, 78,127, 51, 35, - 60, 60,252,135, 85,171, 86, 77,231, 56,174, 99, 89, 89,153,159, 76, 38,203,226, 56,238,108, 73, 73,201,236,152,152,152,179,142, -234, 69, 71, 71,223, 8, 11, 11,235,146,145, 17,181,109,194,132, 62, 77, 45,150, 14, 82,173,174, 59, 40,181, 34, 63, 47, 25,132, -158, 51,255,252,243,161,107,249,249,162,225,103,206,156, 73,112, 80,118,194, 47,191,252, 2, 84, 78,149, 99, 48, 24, 18,237,195, -127,212, 20,193,114,132,178,178, 50,152,205,230, 63, 25,172,171, 87,175,222, 22,209,114,162, 96,235, 6, 96, 16,128, 6,149,139, - 23,128, 6, 89, 89, 89, 13, 0, 12, 35,132,100, 2,168,190,236,163,212,241,222,190,149,105,123, 38, 44, 44, 44,130, 16,178,160, -172,172,172,164,114,115, 17, 8,253,158, 0,230,216, 59,204,213,221,136,137,137, 57,173,215,235,123,189,255,222,251, 91,135, 13, -123,222,219,127,236, 11, 34,237, 31,241, 48,201,165,144,167, 36, 0,106, 37,221, 85,116,227, 86, 1, 71,134,197,196,196,176, 81, -220, 25, 12,198, 99, 3,113,102, 92, 36, 66,200, 28, 0,179, 1,124, 68, 41,157,227,192,247,239,234,112,239,156,236,153, 84,132, - 7,107,157,236,249,142, 8,150,216,104, 52,166, 91, 44, 22, 15,103, 14,154,231,249,204,147, 39, 79,122, 57,178,159,190,190,190, -163, 2, 2, 2,230,165,165,165,109, 75, 77, 77,125,231, 65,184,123,251,100,207,156, 72, 50,136, 82,218, 22, 0, 33, 28, 87,235, -100,207,181, 61, 49, 84,142, 84, 46,170, 22,106,165, 0,108,247,154,131,208,145,167,144, 47,166,112,214, 55,199,188, 42,170, 52, - 88, 2,165,130,242,221, 47,169,177,190, 60, 45, 17, 66,184,174, 93,219, 63,175, 81, 99,160, 64,209, 14,160,132, 16,114,190,184, -152,236,246,241, 9,222,184,101,203, 22, 91, 93,247, 83,175,215,239, 42, 46, 46, 30,144,144,144, 80,215, 8, 86,245,129, 70,107, -163,198, 42,194,199,225,137,182,250,100,207, 98, 65,104,107,225, 56,234,200,100,207, 44, 66,192, 52,153, 38,139, 96, 61,214, 17, - 44, 59,149,166,106,206,131,248,227, 74, 3,245, 77,229,114, 63, 26,158, 15, 51,129, 12, 6,195, 38, 0,155, 30,164, 38,125, 0, -199,126,151,243, 35,192, 62,234,230,131,204, 36, 34,145, 97,209,218,149, 1,149,239,115,173, 54, 88,235, 83, 38,174, 60,238,239, - 42,151, 7, 74, 76, 76,204, 64, 95, 95,223, 88,119,119,247,198,229,229,229,210,242,242,114,190,186,161, 82, 40, 20, 89,181,228, -159, 72, 86,204, 0,149, 6,234, 63,149, 11,131,193, 96, 48,131,197, 96,188,185,208, 18,248, 79, 62,126,131,193, 16,198,114, 1, -131,193, 96, 48,156,129, 99, 73,192, 96, 48, 24, 12, 6,131,241, 96, 33, 0,106,156, 62,196,153,186, 85, 66,106,157,130,196,105, -125,166,201, 52,153, 38,211,100,154, 76,147,105, 62,126,154,181,105, 63, 46,109,187,136,179,147,255, 58, 37,206, 26, 0, 50, 77, -166,201, 52,153, 38,211,100,154, 76,243, 31, 8,171, 34,100, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131, 25, - 44, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96,212, 27, 30,106, 47, - 66, 6,131,193, 96, 48, 24,140,127, 34, 44,130,197, 96, 48, 24, 12, 6,131,241, 48, 12, 22, 33,132, 86,127,101, 48, 24, 12, 6, -131,193,248, 43,120, 92, 61, 8,139, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,241,247, 48, 88, 17,149, -161,185, 8,150, 36, 12, 6,131,193, 96, 48,254, 66, 30, 75, 15, 82,213,139,144, 16, 66, 41,165,132,157,103, 6,131,193, 96, 48, - 24,127,169, 25,121, 12, 61, 8, 27,166,129,193, 96, 48, 24, 12, 6,227, 1,243, 80,219, 96, 17, 66, 90, 51, 77,166,201, 52,153, - 38,211,100,154, 76,147,105, 50,131,197, 96, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, - 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 60, 34, 8,128, 26,123, 2, 80, 74, - 47, 56, 44, 82,135,222, 4,181,233, 51, 77,166,201, 52,153, 38,211,100,154, 76,243,241,211,172, 77,219, 25,255, 81,175, 13,214, -195, 28, 7,139, 16,210,250, 65, 39, 20,211,100,154, 76,147,105, 50, 77,166,201, 52, 31, 63,205,199, 13, 86, 69,200, 96, 48, 24, - 12, 6,131,241,128, 17,179, 36, 96, 48, 24,127,119,188,188,188,148,132, 16, 61,165,244, 74, 70, 70, 70,214,131,208,244,246,246, -246,224, 56,174,169,205,102,187,250,160, 52, 25, 12, 6, 51, 88,232,220,185,115,178,197, 98, 9,112, 84, 72, 34,145,100, 75,165, - 82,159,195,135, 15, 91,239,246,157,240,240,240,100, 65, 16,254,164,201,113,156, 32, 8,194,159,162,105, 60,207,103,203,100,178, -123,106,254,213, 16, 66,252, 1, 44, 84,169, 84, 61, 57,142,227,138,138,138,126, 3, 48,149, 82,122,179,142,122, 90, 0,175, 2, - 8,175,220, 20, 13, 96, 21,165,180,144,101,207,250,121, 35, 23,137, 68,109,211,211,211, 79, 81, 74,109, 44, 69, 30, 45,126,126, -126,109, 0,188,235,230,230, 54,188,121,243,230,138,196,196, 68,248,250,250,158, 16,137, 68,163, 83, 82, 82,174,215, 69,211,199, -199, 39,144, 16,178,222,203,203,235,201,198,141, 27,227,218,181,107,247,173,201, 96,212, 87, 2, 3, 3, 93, 74, 74, 74, 86,139, -197,226, 48,169, 84,234,173,209,104,160, 86,171,111,201,100,178,179, 74,165,242,149, 93,187,118,229,179, 84,122,192, 6,203,102, -179,249, 28, 58,116, 8, 26,141, 6, 54,155, 13,148, 82, 8,130, 0, 74,105,213, 82,237,187,120,250,233,167, 93, 43,245,238,106, -134, 40,165, 62, 7, 14, 28,128,139,139, 75,213,182,172,172, 44, 12, 24, 48,128,171,105,251,160, 65,131,106,213,252,139,205,149, -159, 90,173, 62,223,175, 95, 63,115,120,120,184, 82, 42,149,210,172,172,172, 39,214,172, 89,115,158, 16,210,150, 82,154,228,164, - 94,103,157, 78,183,122,216,176, 97,198,128,128,128, 32,181, 90,141,242,242,242,144,175,191,254,122, 28, 33,100, 60,165,244, 36, -203,162,245, 7, 95, 95,223,193, 34,145,232, 7,127,127,127, 1, 64,174,191,191,255,136,212,212,212,211, 44,101, 30, 13, 13, 27, - 54,212,113, 28,183,119,222,188,121,222, 35, 71,142,132, 72, 36, 66,121,121, 57,126,252,241,199, 46,115,231,206,253,195,215,215, - 87,111, 48, 24, 18,156, 52,208,193, 74,165,242, 92,100,100,164,102,196,136, 17, 0,128,210,210, 82,108,219,182,173,206,154, 12, - 70,125,197,195,195, 99,124, 81, 81,209, 50,133, 66, 33,209,106,181, 80, 40, 20,144, 72, 36,144, 74,165,129,174,174,174,129,106, -181,122,192,168, 81,163, 38,109,218,180,105, 53, 75,173, 7,104,176, 0, 64,161, 80, 96,251,246,237, 16,139,197,224,121, 30, 18, -137,164,234,181,250,123, 95, 95, 95,112,156, 99,205,185, 52, 26, 13,118,238,220, 9,141, 70, 3,173, 86, 11,157, 78,119,207,237, -143,130,145,189,137, 17,128,244,187, 25,161, 38, 94, 76,164, 35,231, 94, 54, 1,144,142,232,174, 17,116, 65, 17,220,103,255, 89, -154,234,226,226,122, 64, 16,132,173,135, 14, 29,106,235,237,237,253,175,137, 19, 39,126, 1,224, 25, 39,204,149,214,197,197,101, -245,196,137, 19, 27,140, 27, 55,238,188,143,143,207,154,162,162,162,255,158, 60,121, 50,116,213,170, 85, 83, 95,127,253,245,213, -132,144, 46,206, 70,178,170, 71, 9, 69, 34, 81,182, 66,161,168, 23, 17, 64,189, 94,175, 5, 48,131, 16, 98,179,217,108,203,206, -158, 61,155, 94,237, 51,111, 0, 31, 2, 40, 50,155,205, 11, 46, 92,184, 80,239,158,152, 26, 54,108,168,115,115,115,219, 56,127, -222, 60,217,238,221,187,145,154,154,170, 16, 4, 97, 27, 33, 36,136, 82,106,125, 4,233, 25, 34,151,203, 23, 2, 8, 51, 26,141, -126,149,215,107, 26,165,244,167,178,178,178, 15, 98, 98, 98,202,234,248, 16, 17, 0,160, 21, 42,122, 24,215,248,156,180, 96,193, -130,248,169, 83,167, 94,127,148,154, 0, 96, 50,153, 34,159,126,250,105,239,231,159,127, 30,251,247,239,199,175,191,254,138,142, - 29, 59,162,111,223,190, 72, 76, 76, 84,125,243,205, 55,175, 2,120,207, 25, 77,142,227, 94, 30, 63,126,188,102,196,136, 17,216, -181,107, 23, 14, 30, 60,136,206,157, 59,223,151, 38,163,254, 34, 18,137,204,130, 32,240, 0,228,148, 82, 99,109,235,143,211,177, -187,187,187,191,158,151,151,247,181,175,175, 47, 60, 61, 61, 65, 72,197,229, 41, 8, 2, 74, 74, 74, 80, 86, 86,134,144,144, 16, - 73,139, 22, 45, 86,189,249,230,155,252,226,197,139,151,179, 28,227, 28, 28, 33,164,199, 29,133, 97,143,234,145, 41,158,231,107, - 93, 8, 33,168,169, 55,226,157, 61, 12, 8, 33, 32,132, 64,167,211, 85,153, 40,187,145,186,219,246,218, 52, 31, 4, 53,105, 42, -173,144,243, 79, 93,150,225,201, 75,100,203, 1, 42,219,114,128,146,221,103,172, 89, 77, 91,117, 43,117,115,115, 63, 43, 18,137, -126, 53, 24, 12,113,145,145,145, 75,123,244,232,161,241,246,246,238,225,228,126,190, 58,124,248,112,227,232,209,163,255, 8, 9, - 9,121, 74, 46,151, 55,104,208,160,129, 68,163,209,252, 96,179,217, 86, 44, 94,188,216,132,138,170, 67,167,142,157, 82,234,179, -127,255,126, 28, 58,116, 8,148, 82,215,218, 76,244, 95,149,158, 0,222, 29, 52,104,208,180, 87, 94,121,101,166, 72, 36, 58,209, -174, 93,187,160, 74, 67,232, 15,224,191,163, 71,143,158,248,204, 51,207, 76,151, 72, 36, 51, 31,241,126,222,237,102,222,113,198, -244,233,146,235,215,175, 99,215,238,221,246,205, 90, 63, 63,191, 39,254,234,253,108,223,190,125,115,185, 92, 30,243,249,231,159, - 15,221,191,127,127,192,137, 19, 39,184, 99,199,142,113,139, 22, 45, 10,232,208,161,195,191,229,114,249, 57,189, 94,207,215,241, -216, 91, 29, 59,118,172, 36, 61, 61,189,160,166,229,218,181,107, 37, 83,167, 78,141,168, 7,154, 32,132, 68, 30, 60,120,112,239, - 11, 47,188,128,241,227,199, 39,111,222,188,249,223, 83,166, 76, 73,140,143,143, 71,191,126,253, 64, 8, 25, 93, 83, 58,220, 77, -147, 16, 34,226, 56,110,236,243,207, 63,143,235,215,175, 99,194,132, 9,201, 91,183,110,125,254,221,119,223, 77,140,143,143, 71, -255,254,253,157,214,252,171,242,103,125,213, 36,132, 20, 16, 66, 40, 33, 68,247, 32, 52, 43,245,140,246, 69, 34,145, 24, 53, 26, -141,177, 65,131, 6,198,160,160, 32,163,205,102,219, 8,128,119, 84,147,216, 93, 5,208,142, 16,194,213,182, 94, 31,206, 17, 33, -196,159,227,184,109, 28,199,229,115, 28, 87,200,113,220, 14,111,111,239, 32,103, 52,125,125,125,221,139,139,139, 23,249,249,249, -161, 65,131, 6, 32,132, 64, 36, 18,161, 83,167, 78,104,211,166, 13, 56,142,131, 32, 8,184,118,237, 26,210,210,210, 16, 26, 26, -186,232,163,143, 62,114,127, 24,199,126, 47, 15,242,183, 55, 88, 0, 14,223,113, 80,135,171, 27, 44,123,244,170, 46, 6,235,110, -216, 77,148, 86,171,133, 86,171,173,114,206,119,110,191, 31, 92, 93, 93,247, 17, 66,250,212,229,183, 91,102, 53,199,183,179,131, -106,202, 8, 80, 40, 20,212,100, 50,253,152,152,152,120,178, 97,195,134,153, 5, 5, 5, 46, 46, 46, 46, 14, 71,240,170, 7,155, -130,130,130,130, 2, 2, 2,162, 1,124, 7, 96, 79, 92, 92,220,205,158, 61,123,210,149, 43, 87, 30,110,213,170, 85, 67,252,175, - 93,150, 83,232,116, 58, 28, 58,116,168, 94,101, 52, 74,169,139, 90,173,198,132, 9, 19, 48,109,218,180, 64,158,231, 15,135,135, -135,119, 23, 4,225,232,228,201,147, 67,222,124,243, 77,104, 52, 26, 0, 40,175, 79,251,237,231,231,183,219,215,215,151,138,197, -226,125,215,175, 95, 23, 47, 95,190, 28, 22,139,197,254, 49, 47, 22,139,255,248,171,247, 73, 46,151,191,247,201, 39,159,104, 91, -182,108, 73,178,179,179, 97, 48, 24,144,157,157, 13, 15, 15, 15, 76,157, 58, 85,222,164, 73, 19, 63,169, 84, 58,179,174,229, 93, -163, 70,141,238,218,182, 76,169, 84,218,224,124,239,227, 26, 53,173, 86, 43,233,220,185,243,251,173, 91,183, 94, 95, 7, 77, 24, - 12,134,148,180,180,180,254, 71,142, 28, 25,109,179,217,198,164,167,167,175, 36,132,124,189,125,251,118,120,122,122,162, 69,139, - 22, 30,153,153,153, 93, 29,213,243,241,241,105,211,166, 77, 27,223,192,192, 64,124,255,253,247, 32,132,172, 50, 24, 12,155,239, - 71,147, 81, 69, 62,207,243,212,197,197, 69,119,159, 58, 50, 0, 82, 0, 82,177, 88, 44,149,201,100, 82,185, 92, 46,149,201,100, - 82,153, 76, 38,125,220, 19,145, 16,226, 71, 8,185,200,243,252, 64, 23, 23, 23,157,155,155,155, 38, 48, 48,176,111,227,198,141, -227, 70,143, 30,221,208, 81,157,242,242,242,245,114,185,156,247,240,240, 0, 0,244,233,211, 7, 27, 55,110,196,168, 81,163,132, - 62,125,250, 8, 35, 71,142,132,151,151, 23, 0,224,220,185,115,144, 74,165,188,155,155,219,250,135,116, 88,119,245, 32,127,119, -196,119, 28,228,109, 33,124, 65, 16, 28,142, 96, 57,202,173, 91,183,160,213,106,161,209,104,110,139, 82,221,109,123, 93,105,210, -164, 73, 79,165, 82,249, 36, 33,100, 8,165,244,192, 3,200,216, 60,128,115,215,175, 95,239,182,109,219,182, 1,235,215,175,143, -213,235,245,254,139, 22, 45,122,243,210,165, 75,197, 6,131,193,233,182, 56, 26,141, 6,249,249,249, 71,189,189,189,213, 39, 79, -158, 76,233,210,165, 75, 46, 0,247,162,162, 34, 55,181, 90,237,112,162, 86,175, 22,148,203,229, 38, 66,136,216,197,197, 5, 58, -157,206,156,151,151, 87,174,215,235, 33,149, 74,179, 37, 18,137,195,213,133, 29, 59,118,204,176,217,108, 13,238,245, 29,137, 68, -146,121,226,196, 9, 47, 71,244,172, 86,235,220, 77,155, 54,245, 82,169, 84,205, 94,123,237, 53, 0, 8,154, 63,127,254,145,201, -147, 39, 99,236,216,177,216,184,113, 35,214,173, 91,119,157,227,184,175,235,211, 5, 98, 52, 26, 87,123,120,120,244,235,219,183, - 47,137, 90,177, 66, 36, 8,130,141, 16, 82, 10, 64, 68, 8,121, 57, 41, 41,169,224, 47,127, 42,226,184,190,161,161,161,164,160, -160, 0,148, 82,136, 68,162,219,150,169, 83,167, 42, 94,121,229,149, 15,187,116,233, 50,149,231,249, 66,171,213,250,125,113,113, -241,167,245,173,234,181,123,247,238,239, 36, 39, 39, 15, 10, 12, 12,252,229,126,116,210,211,211, 55, 84, 91, 61,153,150,150, 6, - 0, 80,171,213,176,217,108, 50, 39,174,113,137,189,236,185,121,243, 38, 4, 65,136,189, 95, 77, 70, 5, 34,145, 8, 50,153, 12, - 60,207,231, 7, 6, 6,130,227, 56,121, 82, 82, 82, 93,170,220,180, 0, 10,197, 98,177, 84, 46,151, 67, 38,147, 65, 38,147, 65, - 46,151,227,194,133, 11,155, 69, 34,209, 56, 0, 22, 39, 30,252,168, 51,235,245,192, 96,125,197,243,188,204,221,221, 93, 98,223, -102, 54,155, 37,174,174,174, 8, 10, 10, 90, 10, 96,128,131, 58,237,237,213,130, 18,137, 4,175,189,246, 26, 78,157, 58,245, 83, -106,106,234,232,204,204, 76, 20, 23, 23,175,215,106,181,195, 50, 50, 50, 96,179,217,144,148,148,132,118,237,218,181,127,200,135, -247, 39, 15,242, 88, 24, 44,187,115,188, 51, 52,231,168,193,226, 56,206,161, 8, 22, 33, 4,207, 60,243, 12,196,226,255,249, 58, -155,205,118,215,237, 28,199,213, 57,177,101, 50, 25, 6, 12, 24, 32, 87, 42,149, 63, 87,154, 44,135, 67, 58, 35,231, 94,134,210, - 10,124,219,163,106,191,125, 3, 2, 2,142, 12, 27, 54,172,145,201,100, 66,110,110,238,224,101,203,150, 13,213,233,116,184,122, -241,164,108,226,235,239,150, 0,152,226,228, 46, 70,151,149,149,133, 68, 71, 71,183, 51, 24, 12, 91,167, 76,153, 66, 1,184, 3, -112,123,235,173,183,134,100,100,100,220, 68, 69,143, 66, 71, 10,137,234,157, 7,164, 38,147, 9, 46, 46, 46,136,138,138,146,219, -163,129, 93,187,118,117,149, 72, 36, 14,119, 24,176,217,108, 13, 14, 31, 62, 12,181, 90,141,146,146, 18, 24,141, 70, 88,173, 86, - 80, 74, 33, 22,139, 33,147,201, 16, 17, 17,209,192,209,131, 61,127,254,124, 86,120,120,120,196,202,149, 43, 15, 3,104,246,218, -107,175,161,117,235,214,104,210,164, 9,214,175, 95,143,197,139, 23, 39,113, 28, 23, 17, 29, 29,157, 81,159,158, 22,159,126,250, -233,197,221,186,117, 35, 43, 86,172,160,148, 82, 82, 89,205, 61,222,106,181, 30,125, 84, 93,247,173, 86,171, 70, 42,149,194, 98, -177, 64, 44, 22, 67, 36, 18, 85,189,138, 68, 34,248,249,249,225,215, 95,127, 21,151,150,150,138,115,114,114,148,107,214,172,121, -227,204,153, 51, 62, 0, 70, 61,202,244, 92,190,124,121,208,171,175,190,154, 44, 22,139,105,255,254,253, 95, 74, 74, 74,122,198, -199,199,231,224,145, 35, 71, 62, 7,208,204, 25,173, 39,158,120, 34,217,104, 52,254,169, 71,178,187,187,123, 85, 57, 34, 22,139, -225,229,229,181, 41, 34, 34,194,211,145, 7, 11, 63, 63,191,173,114,185,188,170,252,240,244,244,220,171,215,235,225,225,225, 1, -251,118,185, 92, 14, 31, 31,159,239, 34, 34, 34, 26,212,167,222,205,245, 25,142,227,170,140, 80, 53, 67, 84,222,185,115,103,252, -254,251,239,223, 57, 99,138, 40,165, 38,158,231,111, 51, 86,118,163, 37, 18,137,156,238,213,107,179,217, 36,132,144,246,246, 27, -123,109,235,245,128, 30, 42,149, 74,114,231,198,188,188, 60, 73,104,104,232,147, 78,220, 31,221, 21, 10,133,253, 65, 7, 25, 25, - 25,182, 70,141, 26,253,235,185,231,158,179, 0,192,191,255,253,239,127,101,101,101,149, 91,173, 86,145, 88, 44, 70, 86, 86, 22, - 66, 66, 66,220, 31, 98, 89, 91,163, 7,249,219, 27,172,202,155, 6,173,254, 90,221, 96,221, 89, 69,104,111,220,126,167,193,114, - 4, 65, 16,112,224,192, 1,168,213,234,170,168, 87,101,111,193, 26,183, 15, 25, 50,164,206, 79, 15, 50,153, 12, 46, 46, 46, 24, - 53,106,148, 50, 45, 45,109, 45, 0,255, 58,158,120,239,160,160,160, 99,177,177,177,193,201,201,201,120,235,173,183,176,116,233, -210,147,243,231,207,111,203,113, 28,215, 49,184, 72, 42,179,154, 58, 56,211,131,176, 50, 26, 22,189,125,251,246, 79, 62,248,224, -131, 86, 62, 62, 62,154, 39,159,124,242,119,147,201,164,155, 52,105, 82,255, 1, 3, 6,244,107,219,182,237, 45, 0,171, 28,212, -131, 32, 8,216,181,107, 87, 85, 39, 1, 23, 23,151,251,174,106,189,126,253, 58, 82, 83, 83,161, 82,169,160, 82,169,160, 86,171, -161, 86,171, 33,149, 74,161, 84, 42,157,214,139,142,142,206,232,208,161,195,168,149, 43, 87,158,237,220,185, 51, 90,181,106,133, -171, 87,175, 98,201,146, 37,224, 56,110, 92,116,116,116,106,125, 50, 87,253,251,247, 63,177,105,211, 38,191, 51,103,206, 32, 47, - 47,143,108,222,188,153, 18, 66, 56,158,231,119,166,165,165, 61,178, 6,175,130, 32, 72, 56,142,131,125,185, 51,130,101, 55, 91, - 10,133, 2, 30, 30, 30,152, 49, 99,134,100,232,208,161,131, 30,101,122, 46, 92,184,176,201,151, 95,126,185,102,237,218,181,123, - 94,122,233,165, 31,206,159, 63, 63, 78,167,211,157, 63,116,232,208, 39, 82,169, 84,112, 86,207, 98,177,248,156, 57,115,230,182, -232,185,205,102,131,205,102,131,213,106,133,197, 98,193, 23, 95,124,129, 97,195,134,105,224, 96, 79,100, 74,105,131, 85,171, 86, -129, 16,130,101,203,150, 85,149, 89,213, 53, 23, 46, 92,136,161, 67,135,106, 81,143,122, 55,215,119,115,101, 55, 65, 53, 45,117, -124,192,208,202,229,242,194,202,170, 65,200,100, 50, 68, 71, 71, 59, 29,189,170,118,222,207, 58,179,254, 40,177,151,193,213,154, - 41, 0, 0, 84, 42, 21,154, 54,109,234,140, 14,225,121, 30,148, 82, 88,173, 86, 24, 12, 6, 91, 92, 92,156, 45, 44, 44, 12, 0, -224,227,227, 99, 59,121,242,164,205,104, 52,138, 42,155,110,192,197,197,229,161,152,204,123,121,144,199, 34,130, 5,224,232, 29, -175,246, 3,127,160, 17, 44,123,168,248,151, 95,126,129, 90,173,254, 83, 99,246,187,109,175, 11, 82,169, 20, 58,157, 14,251,247, -239, 47, 63,119,238,220,171,206,252,118,203,172,230,128, 80,209, 9, 43, 48, 48,112,119,108,108,108,112, 73, 73, 9, 86,175, 94, -141,232,232,232,171,148,210,222, 85,209,174,222,196,216, 62, 16,201, 78,220,184,131,218,183,111,127,236,149, 87, 94,241,207,200, -200,192,204,153, 51,141,243,230,205,235,187,122,245,234,215, 85, 42, 21, 49, 24, 12, 55,219,182,109,123, 43, 62, 62,126,188,163, - 61, 8, 69, 34, 81,122,159, 62,125, 2, 0, 64,163,209,152,190,249,230, 27,169,139,139, 11, 94,120,225,133,242, 91,183,110,201, - 43,211, 35,207,153, 27,130, 88, 44,206, 28, 63,126,124,131, 90,210, 56,211,153,116,109,223,190,189, 15,199,113,155,167, 76,153, -130, 86,173, 90, 33, 46, 46, 14,173, 90,181,194,180,105,211, 48,127,254,252,117,237,218,181,235,113,238,220,185,155,245,193, 92, - 13, 25, 50,228,228,119,223,125,231,119,245,234, 85,164,167,167,227,135, 31,126, 72, 54,153, 76,211,100, 50,217,248,155, 55,111, - 62,234, 27, 43, 73, 75, 75,195,134, 13, 27, 96,179,217,240,210, 75, 47, 33, 40, 40,168,202, 96,221,186,117, 11,107,214,172,129, - 32, 8,120,245,213, 87, 17, 16, 16, 0,139,197, 34,143,136,136, 16, 63,170,168,203, 59,239,188,115,109,235,214,173,123, 82, 83, - 83,251,207,159, 63,191, 7, 33, 68,152, 54,109,218, 60,173, 86,107,187,143,243,132,178,178, 50, 24,141,198, 26,151,128,128, 0, -167,154, 47,216, 53,205,102,243,109, 58, 38,147,169,234,189,175,175,175,211,154,255,100,238,140, 92,217,151,202,200, 21, 7,224, - 23, 0, 78, 25,108, 74,169, 41, 32, 32,160, 42,130, 85,215,232,213,195,226, 97,246, 76,108,218,180,233, 17,173, 86, 59,232,242, -229,203,183, 69,177, 70,141, 26,101,110,220,184,241, 49, 39, 12, 86,158, 84, 42,117, 55, 26,141, 56,113,226, 4,154, 55,111, 46, - 41, 40, 40,136, 36,132, 76, 7,128,182,109,219, 70,102,100,100, 72,252,252,252, 0, 0,161,161,161, 40, 40, 40,200, 11, 8, 8, -120, 88,201, 86,163, 7,121, 44, 12, 22,165,180, 71,245, 87,103, 13,150,163, 5, 14, 33, 4, 37, 37, 37, 80,171,213,168, 28,204, - 12,106,181, 26, 64,197, 88, 51, 53,109,191,159, 11,251,183,223,126, 43, 95,177, 98,197, 8, 74,233,190, 58, 22,224,193,111,188, -241, 70,187,220,220, 92, 44, 90,180, 8,223,124,243, 77,154,201,100,234, 83,215,125, 34,132, 4,133,133,133,157, 56,114,228,136, -247,181,107,215,240,222,123,239, 33, 46, 46,110,208,128, 1, 3,218,226, 62, 6, 26, 61,121,242,100,160,253,125,199,142, 29, 45, - 90,173, 22,106,181, 26, 89, 89, 89, 18,181, 90, 45, 63,124,248,176,211,209,150, 83,167, 78,121, 61,200,140,214,166, 77, 27, 79, -158,231,143, 76,153, 50,165,241,168, 81,163,176,118,237, 90, 44, 93,186, 20,246, 54, 88, 0, 2,231,207,159,127,164, 83,167, 78, - 79,156, 58,117, 42,237, 17,154, 43,229,224,193,131,255,187,121,243,102,191,172,172, 44,100,100,100, 96,214,172, 89,201,233,233, -233, 79, 81, 74,111, 0,248,225, 81, 95,180,130, 32,208,183,223,126, 27,171, 86,173, 2,199,113, 24, 51,102, 12, 10, 11,255,151, - 93,220,220,220,106,250, 76,244, 40,163, 46, 98,177,152, 30, 59,118,108,254,147, 79, 62,137,212,212,212,254,122,189,126,201,152, - 49, 99, 30,234,121, 54,153, 76, 15, 92,243,206,200, 1,195, 57,131,117,230,204,153,205, 18,137,132, 2,168, 83,180,201, 78, 74, - 74,138,172, 77,155, 54, 70,153, 76, 38, 61,126,252,248,119,117,141, 94, 61,164, 50,164,122,207,195,211, 34,145,232,158,235,148, - 82,135, 13,102,147, 38, 77,222,246,247,247,239, 29, 22, 22,134,139, 23, 47, 74,100, 50, 25, 94,122,233, 37,243,128, 1, 3,204, - 98,177,120,178,163, 58, 10,133,226,146, 70,163,233,126,235,214, 45,152, 76, 38, 28, 56,112, 0,110,110,110,239, 15, 26, 52,232, -173,244,244,116, 24, 12, 6,169, 76, 38, 3,199,113, 32,132,224,169,167,158, 66, 94, 94,222,165,135,149,102,119,243, 32,143, 75, - 4,235,174,133, 73, 96, 96, 96,213,240, 10,246,234,136,234,213, 18,206, 62,205, 25,141,198,170,234, 38,187,153, 34,132,192,100, - 50,253,105,251,253,112,246,236,217,227,137,137,137,159, 83, 74,119, 59,251, 91,123, 27, 44, 0, 73,107,215,174,141, 61,125,250, -116,216,133, 11, 23,146,140, 70,227, 83,119,142,216, 94, 61,218,229,168,185, 74, 74, 74,194,198,141, 27,113,226,196,137, 4, 74, -233, 65, 0, 7, 31,228, 73,181,215,173,215, 39,120,158,255,247,232,209,163,171,155,171,171,132,144,127, 45, 93,186,116, 19,128, -102, 99,199,142, 69,126,126,126,224,138, 21, 43,102,227,142,225, 41,254, 74, 2, 2, 2,162,214,175, 95, 31, 40, 8, 2,114,114, -114, 48,121,242,228,155, 41, 41, 41, 79, 57, 59,136,236,195,228,204,153, 51,146,193,131, 7, 31, 4,208,243,210,165, 75, 16, 4, -225,120, 76, 76, 76,213,112, 17,247,250,204, 17,255, 86, 84, 84,196,107, 52,154, 26,111, 86, 18,137, 68,226,108,196,161,186,230, -241,227,199,231,125,241,197, 23, 63, 77,153, 50,229,234,125,106,214, 26, 53, 55,155,205,112,182,141,242,195,208,100, 6, 75,134, - 75,151, 46,217,141,213,152, 7,101,132,236, 17,172,127, 18, 27, 55,110, 76,251,246,219,111, 91,250,248,248,124,245,210, 75, 47, - 61,229,235,235,203, 73,165,210, 35, 98,177,248, 45, 0, 55,157, 72,187,113,174,174,174,215,196, 98,177, 40, 53, 53, 21, 87,175, - 94,181, 55,245,145,150,149,149,193,203,203, 11, 34,145, 8, 0,240,194, 11, 47,192,223,223,223,150,144,144, 48,142,229,232, 7, -104,176,142,239,154,130, 29, 71, 9,108, 14, 20,125, 53, 25,173,154,102,219, 78,190,184, 22, 27,183,167,192, 98, 21,110, 43,208, - 82, 46,173,195,198,237, 41,176,218,168,211,154, 53,113,237,218, 53,135,157,240,221, 52, 43, 43,133,195,163,163,163,131, 1,164, - 82, 74, 77,117,213,244,245,245, 93,114,244,232, 81,239,164,164, 36,172, 91,183, 14, 81, 81, 81,105, 70,163,177,175,147, 79, 70, -181, 30, 59,207,243,233, 93,187,118, 13, 0, 28,171, 22,252,171,102, 89, 39,132,136,178,178,178,240,213, 87, 95, 97,227,198,141, -215, 4, 65,136, 56,123,246,108,122,120,120,120,196,210,165, 75, 15, 23, 20, 20, 52, 43, 46, 46, 6,165, 52,239, 81,237,167, 92, - 46,143, 88,182,108,217, 96,173, 86, 75,142, 29, 59,102,123,249,229,151,111,222,184,113,163,151, 51,211, 32,253, 85,233,153,158, -158,254,239, 9, 19, 38,172, 48, 26,141,226,146,146,146,127, 59,250, 89,109,251,185,101,203,150,171, 77,155, 54,237,129,187, 15, -155, 32, 0, 56,113, 63,154, 95,126,249, 37, 0,132,222,143,230,253,152,161,191, 90,243, 65,158,247,191,155,166,193, 96,216,129, -138,113,169,156, 50, 86,142,236,231,233,211,167,127,168,212,222,237,136,246, 95,117,236,247,219, 51,177,182,253, 28, 55,110, 92, - 42,128,225,247,179,159,251,247,239, 79,122,254,249,231,231,182,110,221,122,142, 82,169, 68,124,124, 60, 4, 65,184,237, 1,157, - 16,130,145, 35, 71,226,245,215, 95,199,222,189,123,231,142, 24, 49, 34,233, 97,167,231, 63,198, 96,241, 60,127,115,104, 15,161, - 81,158,240, 36,108, 66,237,141,216,211,211,211, 51,142, 28, 57, 98,174,229,230,127,179, 91,104, 66,163,212,252,167, 97,181,145, -170, 2, 45, 33, 33, 1,221, 66, 19,144,154,255,244,109,255,149,156,156, 92,171,230,195,160,122, 84,170, 50,124,155, 88, 91,180, -235,219, 90,236,156,139,139, 75,187,184,184, 56,108,219,182, 13,203,151, 47, 79, 43, 43, 43,235, 86,215,249, 11,239,197,239,191, -255, 30, 88, 31, 51,154,217,108, 94,184,111,223, 62, 27,165,212, 69, 36, 18, 45,136,137,137,201, 0, 42, 26,190,235,245,250,110, - 27, 54,108,152, 4, 64,193,243,252,167,143,106, 31,221,220,220,230,246,232,209, 67,243,206, 59,239,228,237,216,177,227,183,164, -164,164,151, 41,165,197,245, 49, 61, 99, 98, 98,174, 3,232,229,236,103,181, 49, 98,196,136,196,123,229,247,250,162,105, 47, 59, - 36, 18, 9, 56,142, 3,207,243,144, 74,165,144,201,100, 48, 26,141, 40, 47, 47, 71,105,105,105,157, 34, 88,246, 94,178, 34,145, -168, 74,215, 62,123, 69, 89, 89, 25,139, 96, 57,199,152,191,169,118,157,249,187,244, 76,252,254,251,239, 63,154, 56,113,162,184, -115,231,206, 51,195,195,195,185,164,164, 36,100,102,102, 66, 44, 22,163,105,211,166,232,219,183, 47,130,130,130,132,221,187,119, -127, 54,108,216,176,143, 88, 86,126,128, 6,203, 98,177,116,235, 62, 54,237,184,209,248, 77,176, 3,225,198,116,163,209,216,165, -182,186,228,255,105,126, 29, 92,205, 5, 83,158,231,247,117,122,254,122, 31, 74,191,174,114, 87, 10,133, 34,213,108, 54,119,113, -166,126,250,129,194, 41,202, 71,246, 38, 38,212, 48,101,206,157,235,142,200, 93,188,120,113,114,255,254,253, 63, 43, 41, 41,201, -179, 88, 44, 47, 62, 12,115, 85,159, 57,127,254,124, 41,128,185,119, 49, 4, 57, 0, 30,249, 5,108, 48, 24,254,213,189,123,247, - 31,139,138,138,230, 20, 22, 22,238,103,197, 67,253,133,231,249,244,142, 29, 59, 6, 56,240, 61,135, 59,119, 60, 12, 77,198, 63, -147,191, 75,207,196,175,191,254,122,214,251,239,191,191,214,215,215,119, 67,183,110,221, 66, 27, 55,110,172,213,106,181, 40, 40, - 40, 40,202,205,205,189,178,107,215,174, 23,199,140, 25,195, 38, 56,127,208, 6,171,114, 60,162,144, 7,249,103, 15, 67,243,161, -240,228, 37, 25, 0,108,185, 99,120,210,218,214,107,185,224,182, 3,216,206,178, 92,189, 46, 20,211, 0,116,102, 41, 81,255,121, - 24,145,218,250, 26,253,101, 48, 30, 38, 11, 22, 44,184, 14,160, 11, 0,140, 28, 57, 82, 4, 0, 91,182,108,177,213,195, 93, 13, - 7,224, 9,192, 62,254,160, 39, 0,123,144, 35, 11, 14,142, 27, 89, 47, 12, 22,131,193, 96, 48, 24,140,127, 14,245,212, 88,217, -241, 36,132,236,164,148, 14, 2, 0,251,251,234,219,234, 27, 28,203, 82, 12, 6,131,193, 96, 48, 24, 15, 22, 2,160,117, 77, 31, - 56,211, 59,128, 16,210,218,217, 63,118, 96,198,112,166,201, 52,153, 38,211,100,154, 76,147,105, 62,102,154,181,105,223,229,247, - 3,107,137, 96,237,170,119, 6,235, 97,246,136, 97, 93,151,153, 38,211,100,154, 76,147,105, 50, 77,166,249, 0,248,219, 25, 44, -214, 6,139,193, 96, 48, 24, 12, 70,125,167,108,250,244,233, 51, 9, 33, 59, 1, 96,250,244,233, 51,235,251, 14, 51,131,197, 96, - 48, 24, 12, 6,163,190,115, 60, 50, 50,178, 52, 50, 50,210,222,160, 61, 11, 21,181,112,131,240,191,158,133,127,111,131, 53,163, -119,240,147,190,254,126,223,229,230,228,196, 26,203,141,175, 68, 30,184,145, 91,151, 63, 38,132,184, 75,165,210,127,169, 84,170, -222,148,210, 70, 34,145,232,114, 65, 65,193, 1,139,197,242,125,125, 29,220,145,241,207,162,125,251,246,109,164, 82,233,251,132, -144,206, 86,171,213,159,231,121, 3,128, 83, 70,163,113, 97,108,108,108, 44, 75,161,199, 23,189, 94,191, 11,192,128,202,213,221, - 49, 49, 49, 3, 89,170, 60,126,116,236,216, 49,195,102,179, 53,112,244,251, 18,137, 36, 91, 42,149,250, 60,170, 73,211,255,225, -152, 0,156,254, 59,237,112, 93, 34, 88, 47,189,252,218, 24,191,252,212,120,191,245,155,246, 52,155,209, 59, 56, 34,242,192,141, - 91,206, 8, 40, 20,138,127,181,110,221,122,241,226,197,139,221,131,131,131,137, 66,161, 64,122,122,122,243,115,231,206, 13,155, - 51,103,206,108,158,231,199, 89, 44,150, 95,239,231,192, 8, 33, 46,110,106,241,251, 57, 69,150, 25, 44, 95, 50,156, 97,228,200, -145,162,148,148,148, 57,158,158,158,239,189,255,254,251,178,144,144, 16,168,213,106,100,102,102, 6,198,199,199, 7, 44, 95,190, -124,112,215,174, 93,151, 72, 36,146, 15, 88, 65,251,216, 24, 42, 47, 0, 81,168, 24, 83,231, 45, 0, 3,246,238,221, 11,155,205, -134,129, 3, 7, 14,208,235,245, 77, 0, 44, 82,169, 84, 66, 73, 73,201, 43,246,153, 8, 24,127,111,108, 54, 91,131,131, 7, 15, - 66,163,209,212,116, 15,185,109, 61, 39, 39, 7, 3, 7, 14,116,197, 35,156, 52,157,241,247,162, 46, 6,107,247,174, 31,127,120, -101,112,143, 80, 50,102,168,190,233,198, 95,206,156,152,209, 59,184,123,228,129, 27, 41, 14,154,171, 55, 39, 76,152, 48,111,238, -220,185,242,203,151, 47,227,226,197,139,176, 90,173, 80,171,213,104,211,166, 13,183,123,247,110,159,183,222,122,235, 71,169, 84, -250,178,201,100,218, 86,215, 3,243,118, 21, 45, 84, 41, 68, 47, 72,197,226, 83, 38,171,117, 71,125, 76,252, 78,157, 58,237,183, - 88, 44,243, 99, 99, 99,127,251, 27,221,136,158,144, 72, 36,179,165, 82,105,191,199,213, 92,220,188,121,115,118,183,110,221,222, -251,232,163,143,100, 55,110,220, 64,124,124, 60,210,211,211, 17, 28, 28,140,144,144, 16,178,120,241, 98,249,226,197,139,223,248, -227,143, 63, 56, 0, 83,157, 48,253,156,143,143,207,248,158, 61,123, 62,235,225,225,161, 75, 75, 75, 43, 56,126,252,248,118,131, -193,176,146, 82, 90,167,180, 36,132,112, 30, 30, 30, 99, 7, 14, 28,248,172,187,187,187, 91,122,122,122,238,129, 3, 7,182,103, -101,101,173,190,159, 89, 16, 8, 33, 62, 0,218, 2,112,175,220,148,222,176, 97,195,184, 27, 55,110,100, 62, 64, 77, 67,195,134, - 13, 47,214, 69,179, 83,167, 78,126, 86,171,245, 0,128,102,247,248,218, 69,142,227,122, 87, 14,112, 92, 27, 81, 11, 22, 44, 24, -162,209,104, 48,109,218,180,248,160,160, 32,104,181, 90,172, 88,177, 2,174,174,174, 16, 4, 33,126,225,194,133, 36, 37, 37, 5, -139, 22, 45, 90,131,255, 69,183, 24,247, 62,231, 91, 0,184, 0, 24, 69, 41,205,174,182,221, 3,192,207, 0, 50, 41,165,195, 31, -229, 62, 74, 36, 18,236,216,177, 3, 98,177, 24, 60,207, 35, 55, 55, 23, 1, 1, 1, 85,211, 35,241, 60, 95,245,202, 96, 56,149, -255,239,213,139,112, 70,239,224,137,173,195,218, 47,148, 72,120,133, 96, 51, 67,176, 88, 32, 88,205,224,168, 21, 45, 27,186,160, -145,151, 20,197, 69,197, 88,191,239,106, 97,118,161,169, 83,228,129, 27,241,181, 92,108, 13,195,195,195,207, 30, 62,124, 88,119, -240,224, 65, 92,185,114, 5,159,125,246, 25, 0, 64,165, 82, 97,207,158, 61, 16,137, 68,160,148,162, 95,191,126, 89, 6,131,161, - 57,165, 52,183, 14, 23,117, 80,247, 14,254, 49,219,254,211,221,173,213,176, 31,111,222,202, 53, 53,162,148,214,187, 1,212,244, -122, 61, 21,139,197,165, 22,139,101,240,223,193,100,233,245,250, 39,120,158,223,107,177, 88,148,106,181, 90,113,248,240, 97,227, -227,118, 65,180,111,223,190,141,155,155,219,201,159,126,250, 73,126,234,212, 41,228,229,229, 33, 51, 51, 19,111,189,245, 22,150, - 47, 95,142, 86,173, 90, 65,165, 82, 65, 42,149, 98,226,196,137,101, 37, 37, 37, 61,162,163,163,207, 56, 98,132,186,119,239,190, -105,227,198,141,193, 86,171,149,163,148,194, 98,177, 32, 37, 37,197, 54,125,250,244,228,216,216,216, 81,206,154, 44, 66, 8,215, -181,107,215, 13, 27, 55,110,108, 44,149, 74, 57,171,213, 10, 65, 16,112,245,234, 85,219,204,153, 51,147, 98, 98, 98, 94,168, 75, -190, 39,132,180, 87, 42,149, 45, 38, 78,156,152, 61,116,232, 80, 51, 0,196,196,196,144,179,103,207,234, 26, 54,108,152, 52,123, -246,236,179,117,208,212, 43,149,202,208,201,147, 39,103, 13, 24, 48,192, 42,145, 72,132,147, 39, 79,138, 46, 92,184,160,107,212, -168, 81,226,204,153, 51,255,112, 50, 47,198,207,152, 49,163,169, 88, 44,134,197, 98,129,213,106,133,205,102,131,213,106,173,122, -111, 52, 26,177,126,253,250,139, 49, 49, 49,173, 28,208,219, 51,106,212,168,126,109,219,182, 69,104,104, 40, 68, 34, 17,226,227, -227,113,237,218, 53,200,229,114,180,110,221, 26, 10,133, 2, 63,255,252, 51,190,255,254,251,189, 49, 49, 49,253,217,237,195,161, -243,126, 10, 64, 71, 0,113, 0,122, 82, 74,179, 43,205,213,111, 0, 90, 2,248,157, 82,218,237, 81,150,193,191,253,246, 27,142, - 29, 59, 6,177, 88,140,125,251,246, 97,209,162, 69,248,241,199, 31, 17, 28, 28,252, 39,131, 53,124,248,112,155, 66,161, 80, 61, -142,101, 31,227, 47,142, 96,249,120,123,124,240,236,240,167, 21,176, 89, 1,115, 9, 96, 46, 5, 53,151,130,154, 74, 64,164, 10, - 80, 75, 57, 84,162, 28,252,187,183,167,118,235,137,172, 75, 51,122, 7, 15,140, 60,112, 99,239,221,244,180, 90,237,172, 21, 43, - 86,232,206,159, 63,143,248,248,120,124,249,229,151,248,248,227,143, 33,145, 72,144,151,151,135, 33, 67,134,224,248,241,227, 48, -153, 76,248,240,195, 15,221,166, 77,155, 54, 25,117,152,163,206,219, 93,188,252,135,245,139,221,220, 20,217,120,121,104,180,251, -178, 31,146, 38, 2, 88, 82, 31, 79,192,180,105,211,148, 11, 22, 44,248, 37, 44, 44,172, 94,155, 44,189, 94,255,132, 76, 38,219, - 59,107,214, 44,213,172, 89,179,108, 15, 72,179,149, 88, 44,222,108,177, 88,222,141,141,141,221, 87, 31,142, 83, 38,147,189,249, -222,123,239,201, 83, 83, 83,145,159,159, 15,153, 76, 86, 53,203,124,229,231,224, 56, 14, 82,169, 20, 99,198,140,145,175, 89,179, -102, 10,128,231,107,211,245,242,242, 26,191, 97,195,134, 96,179,217,204,149,148,148, 84, 61, 29,183,106,213, 74, 52,117,234,212, -128,119,222,121,103, 2,128,165,206,236,171,155,155,219,152, 13, 27, 54, 52,150, 74,165, 92,122,122, 58,186,118,237,138,211,167, - 79,163, 99,199,142,162,169, 83,167, 6, 78,158, 60,249, 53, 0,203,157,141, 50, 41,149,202, 86, 71,143, 30, 77,241,245,245,173, -218, 30, 28, 28, 76,251,247,239,159, 27, 31, 31, 31, 26, 27, 27,155, 19, 22, 22,150,226,132,166,159, 82,169,108,190,127,255,254, -244,143, 62,250,168,215,242,229,203,135, 2, 64,120,120,248,142,121,243,230, 29,204,206,206,110,121,250,244,233,156,142, 29, 59, -166, 57,177,171, 77, 13, 6, 3,246,238,221,123,183,255, 68, 96, 96, 32, 42,111,226,142, 48,249,251,239,191, 79,200,203,203, 19, -199,196,196, 64, 46,151, 67,161, 80, 64,161, 80, 64, 46,151,227,214,173, 91, 48,153, 76,216,178,101,139, 21,192, 27,236,214,225, - 48, 67, 1, 28, 6,208, 10,192, 33, 66,200,115, 0,126, 4,208, 2, 64, 60,128, 17,143,122, 7,173, 86, 43,120,158,135,193, 96, - 64, 84, 84, 20, 70,143, 30,141,240,240,112, 20, 22, 22,130,231,249,219, 22, 6,195,105,131, 69, 8,161,148, 82, 98,127,181,127, -152,126, 43,123,254,218,168,111,254, 35,229, 57,190,119,215, 80,184,202,172, 32, 10, 55, 72,122, 76, 7,113, 9, 2, 0,208,220, - 68,152,246, 77,199,136,118, 57,220,122, 35,249,121, 70,239, 96,207,200, 3, 55,138,106,250, 51,142,227, 58, 7, 6, 6,226,232, -209,163, 8, 14, 14,198,172, 89,179,208,188,121,115, 40,149, 74,100,100,100,160,164,164, 4, 42,149, 10, 54,155, 13, 97, 97, 97, - 34,141, 70,243,148,179, 6,139, 16, 18, 54,254,185, 78, 29,197,218,230,120,162, 95, 23,236,255,186,135,106,237, 78,195, 12, 66, -200, 55,148,210,210,250,118, 2,158,121,230, 25,100,100,100, 40, 55,108,216, 80,103,147,213,169, 83,167,253, 86,171,245,233,218, -190,167, 80, 40,126, 59,118,236, 88,207,186,154,171, 53,107,214,168, 92, 92, 92,254,212, 54,225, 62,204,213,127,199,140, 25,163, -221,176, 97,195, 79, 97, 97, 97,195,234,131,201, 34,132,116, 13, 9, 9, 65,114,114, 50, 50, 50, 50, 96, 52, 26,145,145, 81, 81, -195,148,154,154, 10,127,127,127,184,186,186,194,223,223, 31,205,154, 53, 35, 28,199,117,114, 68,183,103,207,158, 67, 1,112,137, -137,137,200,202,202,130, 78,167,131, 74,165,130,159,159, 31,122,246,236, 41,110,212,168,209, 0,103, 13, 86,223,190,125,159, 85, - 40, 20, 92,114,114, 50,146,146,146, 96, 50,153,144,144,144, 0,157, 78,135, 94,189,122,241,141, 27, 55, 30,228,172,193, 2,208, -250,181,215, 94,203,172,110,174,236,168, 84, 42, 18, 26, 26,154,235,226,226,210, 1, 64,138, 51,154,111,188,241, 70,198,103,159, -125,214,253,192,129, 3,211,236, 27, 15, 30, 60,248,254,244,233,211,177,108,217,178,163,110,110,110, 29, 0, 56, 99,176,208,181, -107,215,140,192,192,192, 34,169, 84, 10,251, 34,145, 72,170,222,203,100, 50, 50,108,216,176,198, 14,228,197, 93, 0, 6,180,106, -213, 10,175,191,254, 58,126,250,233, 39,172, 91,183,174,234,243,103,159,125, 22,195,135, 15, 71,113,113, 49,188,188,188,196, 6, -131, 33, 81,175,215,215,139,134,239,132,144,112, 0, 95,160,162, 1,240, 7,148,210, 83,245,169,124,163,148,102, 16, 66, 34,170, -153,172,179, 0,100,149,230, 42,130, 82,250,200,219,178,217,108, 54,240, 60,143,200,200, 72,152, 76, 38,196,196,196,224,217,103, -159,181,223,179,160, 82,169,176,108,217, 50,120,120,120, 48,199,240,240,242,113,141, 30,228,177,142, 96, 1, 88,122, 51, 53,187, -221,240, 65,157,199,186,105, 21, 16,138, 12,144,244,154,131,243,185, 74,124, 21, 85,113, 47,124,123, 68, 24, 90, 63,253, 9,140, -223,244, 65,239,134,102,233,234, 60,249, 84, 0,179,106, 18,243,240,240,240,176, 90,173, 85,153,214,205,205, 13, 10,133, 2,217, -217,217,120,243,205, 55,177,119,239, 94,152, 76, 38, 72, 36, 18,132,132,132,192,108, 54, 55,114, 58,122,229, 42, 94,253,229,127, - 62,115,201, 73,252, 14, 49, 87,242,161,212,249,227,131,215, 58,184,206,249,250,204,108, 0,239,215,199,147,208,178,101, 75,188, -245,214, 91,202, 37, 75,150,212,201,100, 89,173,214,185, 98,177,248,137,119,223,125, 87, 49, 98,196,159, 31, 8, 47, 94,188,136, - 9, 19, 38,148,149,150,150,126, 90, 23,115, 37,149, 74,247,174, 94,189, 90,165,211,233,144,156,156,252,192,204,213,226,197,139, -181,141, 26, 53, 2,207,243,242,111,191,253,182, 94,152, 44,171,213, 26,168, 84, 42,145,157,157,141,183,223,126, 27,213,171,208, -237,213,217, 0, 16, 31, 31, 15,127,127,127,148,151,151,251, 57, 24,109,114,165,148,226,213, 87, 95, 69, 74,202,255,188,137,175, -175, 47, 82, 83, 83, 97,181, 90,221,156,221, 87, 55, 55, 55, 55,139,197,130, 30, 61,122,160,188,188, 28, 0,240,220,115,207,129, -231,121,100,102,102,194,106,181,186,215, 33, 9, 60, 6, 14, 28,104,184,219,135, 42,149,202,226,234,234,218,208, 73, 77,247, 65, -131, 6,165,173, 88,177, 98,200,157, 31, 68, 71, 71, 15,209,233,116, 7,220,220,220, 66,235,176,175,130, 76, 38,131, 76, 38, 3, -207,243,118, 83, 5,169, 84,106,175,214,113,116, 20,229, 1,123,247,238,133, 86,171,197,169, 83,167,160, 80, 40, 0, 0,253,251, -247,127, 67,167,211,245, 40, 47, 47, 31,190,115,231, 78,228,231,231, 35, 36, 36, 4, 13, 26, 52,192,169, 83,167,234, 75, 27,172, -133, 0,186, 86,190, 95, 14,160, 93,125, 43,223, 42, 77,214, 72, 0,103, 42,205,149, 9,192,179,245,193, 92,217, 13,150, 72, 36, -170,138, 84, 43,149, 74,132,133,133, 85, 25,172,178,178,178,170,246, 89, 12,134,211, 6,171, 38,231, 56,163,119, 48,199, 17,178, -102,248,128,142, 99, 91,250,171, 97,204, 78,132, 84,237, 6,226,210, 16, 95, 69,237,195,165,164,138,166, 81, 95,253, 24,139,181, - 51,250,130, 40,221,224, 93,118, 5, 90,169,116,216,221, 12, 86, 78, 78, 78,177,217,108,118, 83, 40, 20, 16,139,197,144, 72, 36, -200,206,206,198,255,253,223,255,225,135, 31,126, 64,195,134, 13, 97,181, 90, 33,149, 74,145,149,149, 5,137, 68,226, 84,239, 68, -177,152, 12,156,243, 86,255, 96,149,123, 83,228,196,126, 92,177, 81, 27,134,215,158, 19, 73, 63, 95, 31, 55,134, 16,242, 57,165, - 52,179,190,157, 4,181, 90,141,118,237,218,225,133, 23, 94, 80,110,220,184,113, 29, 0,127,103,126, 31, 19, 19,243,187, 94,175, -239,243,197, 23, 95,236, 79, 79, 79, 87,180,111,223, 30,106,181, 26,106,181, 26,137,137,137,248,248,227,143,203,141, 70,227,160, -186, 68,199,196, 98,241,183,175,188,242,138, 74,171,213, 34, 49, 49, 17,110,110,110,247,117,172,122,189,190, 21,207,243,255, 93, -188,120,177,182,113,227,198,184,124,249, 50,244,122, 61,188,189,189,229,145,145,145,143,220,100, 73, 36,146,212,172,172,172,198, - 1, 1, 1, 88,179,102, 13, 56,142,131,193, 96,192, 7, 31,124,128,200,200, 72,116,234,212, 9, 26,141, 6, 1, 1, 1,184,122, -245, 42,228,114,121,186, 35,186,105,105,105,185, 0, 26,236,217,179, 7,217,217, 85,109,125, 17, 24, 24,136,220,220, 92, 24,141, -198, 28,103,247, 53, 45, 45, 45, 7,128,215,185,115,231,144,148,148,132,126,253,250,225,231,159,127, 70,135, 14, 29, 96,179,217, - 96, 50,153,114,234,144, 4, 54,145, 72, 68,239,241,164, 73, 0,184, 58,235, 91,239,165,137,138, 41,187,156,213,132, 72, 36,162, -119, 51, 87,246,117,103,110,178, 43, 86,172,168,170, 22, 4, 0,169, 84,250,196,148, 41, 83,134,223,237,161,168,158,160,171,158, -206,245, 52, 58,209, 0,192, 15,168,232,161,105,174,124,253,158, 16,210,179,122,195,247, 71,133, 32, 8,144, 72, 36,136,140,140, -196,232,209,163,225,233,233,137, 15, 63,252, 16, 60,207, 67, 44, 22,131,227, 56,136, 68, 34,102,176, 30,174, 9,127,236,162, 87, - 64,229,100,207,213,195,115,183,153,171,126,250,177, 45,252, 21, 56, 27,123, 30, 98, 99, 46,168,177,232, 30, 37,148, 5, 68,162, -130, 78, 41,246,191,199,133, 22,155,148,148, 4,157, 78, 87, 85, 0,182,110,221, 26, 39, 78,156, 64,211,166, 77, 97,179,217,170, - 10,201,184,184, 56,152,205,230,163, 78, 92,196, 34, 15,173,104,241,251, 51, 63,214, 32,109, 13, 92, 52, 82, 60,213,185, 49,160, -106, 1, 17, 47,197, 23, 31, 14,114,243,242,208,126, 85, 31, 79,130, 90,173, 70,106,106, 42, 54,109,218, 84,106, 52, 26,199,212, - 69, 35, 38, 38,230,119,139,197,210,231,135, 31,126, 40, 75, 74, 74,130, 66,161, 64, 66, 66,130,221, 92, 13,172,107,251, 46,171, -213, 58,110,213,170, 85, 37, 59,119,238,132, 90,173,174,177, 59,179,179,145,171, 55,223,124, 83,211,164, 73, 19, 36, 38, 38, 66, -167,211,193,221,221, 29,221,186,117,195,146, 37, 75,228, 10,133,226,167,176,176,176,190,143,176,176, 61,126,245,234, 85,170,211, -233,208,172, 89, 51,180,106,213, 10, 29, 59,118, 4, 0,180,109,219, 22,205,155, 55, 71,112,112, 48, 0,224,218,181,107,128,131, -227,178, 28, 59,118,108,123,124,124,188,205,219,219, 27,173, 91,183,134, 94,175, 71,231,206,157, 17, 20, 20,132,149, 43, 87,154, -111,222,188,233,244, 52, 15, 7, 15, 30,252,249,226,197,139, 86, 31, 31, 31,132,133,133, 85, 93, 79, 62, 62, 62,136,138,138,170, -147, 38,128,228,115,231,206,137,238,145, 87, 53, 0,156,141, 60,164,198,196,196,112,157, 59,119,254, 83,111,222,240,240,240, 29, -106,181, 90, 7, 32,221,233,194,139,227,168, 84, 42,133, 92, 46,175, 42, 55,236,235,246,109, 14,178, 99,224,192,129,216,185,115, -103,149,193, 26, 54,108, 24,140, 70,227,115, 0, 48,111,222, 60, 16, 66, 64, 8,193,156, 57,115, 0, 0,165,165,165,245,165,145, -243,219, 0,206, 3, 72, 4, 48,173, 30,154, 43, 47, 84, 84, 15,134,162,162, 90,176, 67,229,171,189, 77,214, 35,175,119,163,148, -130,231,121, 52,109,218, 20,211,166, 77,195,238,221,187,145,144,144, 0,155,205, 6, 74, 41, 56,142, 99,109,176, 30,126, 62,185, -205,131, 60, 86, 6,235,207, 7,139, 79,134,247,109, 55,182,133,159, 12,231, 98,227,240,203,233,140, 43, 89, 57,249, 16, 50, 46, - 64,200,186,140,183, 71,132,161, 69, 67, 55,180,104,232,134,183, 71,132, 65,200,140, 3,205, 75, 4,149,185, 34,187, 4,119,173, - 94,200,205,205, 93,248,201, 39,159,228,185,185,185, 65, 46,151, 67, 42,149, 34, 53, 53, 21, 45, 91,182,172, 90,151, 74,165, 16, -137, 68,152, 53,107, 86, 86, 86, 86, 86,148,163, 7,162, 82,112,175,205,255,224,121, 47,137, 76, 3,228, 30,133, 86,171,198,154, -168,255, 0, 70, 3,192, 73, 49,184,119, 59,145,143,151, 75, 79, 66, 72,179,250,118, 18,146,147,147, 49,103,206,156,210,178,178, -178,251,106,232, 30, 19, 19,243,187,217,108,238, 19, 21, 21, 85,182,115,231, 78,124,250,233,167,247,101,174,170, 25,183,126,235, -214,173, 43, 73, 78, 78,134, 90,173,190,159,232,208,116,171,213,170,253,242,203, 47,133,167,159,126,218, 54,105,210, 36,219,184, -113,227,108,195,135, 15,183,245,238,221,219, 54, 97,194, 4,155,209,104,148, 41,149,202, 5,143,234, 92, 24,141,198,165,203,151, - 47, 47,231, 56, 14,106,181, 26, 82,169, 20,158,158,158, 85, 70,216,222,198,199,108, 54,227,235,175,191, 46, 43, 43, 43,115,200, -180,231,228,228,172,153, 58,117,234,141,253,251,247, 91, 10, 11, 11, 1, 0, 6,131, 1,159,126,250,169, 57, 42, 42, 42, 45, 63, - 63,127,165,179,251, 90, 84, 84,244,237,212,169, 83,147,118,237,218,101,225, 56, 14,121,121,121,208,233,116,248,244,211, 79,205, - 43, 87,174, 76, 43, 44, 44,116, 90,179, 75,151, 46,215,210,210,210, 52, 70,163,241, 79, 5, 29,207,243, 68, 46,151,119, 4,112, -200, 25,205, 14, 29, 58, 92, 75, 74, 74,210,126,242,201, 39, 71,122,247,238, 61, 95,163,209, 36,104, 52,154,132, 94,189,122, 45, - 88,190,124,249,111,149,154, 7,156,221, 87,158,231,133,106,237,173,170,150,234,109,178, 28,204,227, 67, 1, 52,177, 88, 44,214, -214,173, 91, 67,169, 84,226,217,103,159,133, 68, 34, 1, 0, 76,159, 62, 29,148, 82, 80, 74,171, 12, 86,113,113,113,121, 61,121, -242, 63, 76, 41,109, 75, 41,109, 76, 41,173,143,157,100,126,172,102,174, 34, 42,231,174,139,168,102,178,182,215, 23,131,197,243, - 60, 94,124,241, 69, 28, 63,126, 28,161,161,161,127,106,224,206,113, 28,115, 66, 12,167,168,170, 34,172,254,234,229,174, 26,215, -194, 71,140,115,103, 47, 98,103,108,254, 90, 74,177, 45, 54,201,184,179, 95,112, 17,204, 63,140, 66,235,145, 27,176,118, 70, 69, -144, 65,200,140,131,121,203, 75, 32, 74, 15, 92, 45, 84,161,204,156,191,235, 30, 25,249,180,171,171,235,230,245,235,215,191, 50, -118,236, 88,169, 32, 8, 80, 40, 20,152, 50,101, 10, 40,165, 85,230,106,226,196,137,197,153,153,153, 95, 82, 74,175, 57,232,126, - 21,126,158,210, 15, 95,124,117,150, 28, 41, 43, 0, 78,130,108,180, 71,219,238,175, 32, 51,233, 4, 80,114, 9, 32, 18, 68,205, - 27,239, 49,100,220,231, 43, 1, 60, 89, 95, 78,192,229,203,151, 49,123,246,236,251, 54, 87,213, 13,145, 94,175,239,179, 99,199, -142,117, 70,163,241,213, 7,168,217,111,254,252,249,123, 27, 52,104,160,170,171,142,159,159,223,232,236,236,236, 87, 28, 9,156, - 61,170,243, 17, 27, 27, 27,219,185,115,231,229, 95,124,241,197,196,183,223,126, 91,174, 80, 40,160,213,106, 17, 31, 31,111,239, -149,134,178,178, 50,204,152, 49,163,204, 98,177,172,141,142,142, 62,225, 96, 33, 46, 16, 66, 94,156, 56,113,226,248,166, 77,155, - 14, 17, 4,193,221,100, 50,229, 36, 39, 39,239, 42, 44, 44,172,211, 56, 88,149,154, 47, 76,154, 52,105,108,147, 38, 77,158,181, - 88, 44,238, 22,139, 37, 39, 53, 53,117, 71, 65, 65,193,154,186,104, 30, 63,126, 60,107,245,234,213,137,183,110,221,106,233,227, -227, 83,160,211,233, 76, 38,147, 73,164, 86,171, 53, 82,169, 84, 15,224, 4,128, 75,206,104, 70, 71, 71,103, 68, 69, 69, 37, 25, -141,198,102,171, 86,173, 58,170, 82,169, 14, 18, 66,136, 68, 34,113, 85,169, 84, 79, 1, 56, 2,224,170,179,251,106,175, 34,172, -169,129,187,221, 28, 57,193,226, 5, 11, 22,136,229,114, 57, 76, 38, 19, 74, 74, 74,144,147, 83, 81,195, 58,111,222, 60,204,152, - 81, 49, 94,241,236,217,179, 49,103,206, 28,148,150,150,202,217,237,195, 33,114, 80, 17,229, 29,106,111,115, 85,173,225,251,143, - 0,242,235,147,193,146, 72, 36, 8, 10, 10, 98,230,234,175, 63, 7,183,121,144,199, 38, 50, 87,211, 56, 88, 51,122, 7, 79,242, -115, 21,207, 48,228, 91,183, 81,138,119, 0, 80, 0,123,159,105, 90,220,167,165, 23, 5,168, 21, 68, 91,113,179,161,197, 6, 16, -149, 55,242, 4, 29,190, 57,148,121,171,204,100,109, 19,121,224, 70,246, 61,204, 16,239,226,226,178,164, 73,147, 38, 35, 63,251, -236, 51,151,208,208, 80, 40,149, 74, 80, 74,113,254,252,121, 76,152, 48, 33, 55, 43, 43,107, 69,110,110,238,135,244, 94,131,116, - 85,195, 83,199,207, 91,254, 81,255,119,134,143,253, 63, 9,174,188, 11,136,117,128, 71,111,220, 34, 61,225, 45,254, 3, 48,221, -170,216,198,235,208,255,197,121,185,123, 15, 69, 63, 67, 41,253,239,163, 78,124,189, 94, 79,229,114,249, 3, 51, 87,127,193,254, - 62, 33,151,203,247, 26,141, 70,165, 74,165, 82, 60,174, 99,193,232,245,122, 94, 42,149, 70, 74, 36,146,215, 71,143, 30,173, 8, - 13, 13, 69, 80, 80, 16, 50, 51, 51, 17, 31, 31,143,229,203,151,151, 11,130,176, 58, 47, 47,239,189,139, 23, 47,154, 31,199, 52, -184,122,245,170,111, 72, 72, 72, 39,145, 72,212, 4, 21, 3, 69,166, 3,216, 83, 23, 35,100, 39, 49, 49,209, 47, 32, 32,160,147, - 68, 34,105, 92,169,153, 6, 96, 95, 93, 52,245,122,125,252,107,175,189,230,209,187,119,239,156,234,198,202,222, 6, 11, 0,162, -162,162, 92,215,172, 89,147,225,224, 56, 88, 63, 13, 30, 60,248, 25,185, 92,142,173, 91,183, 90,189,188,188,196, 46, 46, 46, 88, -187,118,237,221,202,177,199,238,102,240, 79, 68,175,215,211, 5,179,250, 99,195,246, 84, 56,114,187,137,143,143,183,201,229,114, - 54, 14, 22,163,238, 6,171, 38,102,244, 14,214, 1,248,169,157, 47, 34,244, 13,101,240,112,145, 65,196,203, 80, 80, 14, 92, 54, - 24,113,236,114, 97,138,197, 74, 7, 69, 30,184,113,193,193,168, 83,103, 31, 31,159,153, 54,155,173, 21,199,113, 74, 74,105,177, - 72, 36, 58,107, 48, 24, 62,162,148,198, 57,115, 16, 46, 26,209, 85, 87,149, 72,199, 75,165,212,102, 21, 0,112, 0,199, 1,132, - 3, 32,170,124,173, 88, 47, 43, 51, 75,108, 2,217,150,145,149, 61,254, 81, 39,126,247,238,221,247,151,148,148,252,237, 70,114, - 87, 40, 20,179, 69, 34, 81,191,199,125,154,152,240,240,240, 14, 10,133, 98,166, 32, 8,225,229,229,229,222, 10,133, 34,131, 16, -114,166,168,168,104,222,217,179,103, 79,178,226,227,209,241,160, 71,114,215,235,245, 30, 0,150, 1, 80, 2,120, 19, 64,162,191, -191, 63,126,254,249,231, 26, 35, 88,204, 96, 61, 30,116,238,220, 57,247,228, 79,125, 93,215,238, 15,116,232,251,235,214,173, 51, - 28, 57,114, 36,224,126,102, 73, 96, 48,131,117, 55,147, 69, 0, 60, 7, 96, 36, 1, 90, 19, 2,169, 64, 17, 15, 96, 63,128,175, - 35, 15,220, 40,187,195, 68,181,174,172,115,127,112, 59,204, 52,153,230, 35,208, 36,132,112,142, 20,170, 44, 61, 31, 15, 77,189, - 94,191,189,184,184,120, 72, 66, 66,194,221, 52,110, 51, 88, 44, 61,255,158,154,122,189, 62, 68, 38,147, 29, 50, 26,141,181, 58, - 44,133, 66,145,106, 54,155,187,156, 58,117, 42,141,165,231,195,209,124,220,112,106, 46,194,200, 3, 55, 40,128,205,149, 11,131, -241,143,129, 61,177,254,179,136,137,137, 25,234,235,235, 27,235,238,238,222,184,188,188, 92, 90, 94, 94, 46,169,254, 48,170, 80, - 40,178, 88, 42, 61, 22,231,249, 58,128, 32,150, 18,140, 71,110,176, 24, 12, 6,227,159,130,193, 96, 8, 99,169,192, 96, 48,234, - 10,235, 26,193, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, - 24, 12, 6,131,193, 96, 48,234,206,255, 15, 0,181,216,148,115,199,248,129, 71, 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, 88, 0, 0, 2, 0, 8, 6, 0, 0, 0, + 94,187, 18, 70, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66, 40,155,120, 0, 0, 1, 57,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,173,145,177, 74,195, 80, + 20,134,191, 27, 69,197,161, 86, 8,226,224,112, 39, 81, 80,108,213,193,140, 73, 91,138, 32, 88,171, 67,146,173, 73, 67,149,210, + 36,220,220,170,125, 8, 71,183, 14, 46,238, 62,129,147,163,224,160,248, 4,190,129,226,212,193, 33, 72,112, 18,193,111,250,206, +207,225,112,224, 7,163, 98,215,157,134, 81,134, 65,172, 85,187,233, 72,215,243,229,236, 19, 51, 76, 1, 64, 39,204, 82,187,213, + 58, 0,136,147, 56,226, 39, 2, 62, 95, 17, 0,207,155,118,221,105,240, 55,230,195, 84,105, 96, 2,108,119,163, 44, 4, 81, 1, +250, 23, 58,213, 32,198,128, 25,244, 83, 13,226, 14, 48,213, 73,187, 6,226, 1, 40,245,114,127, 1, 74, 65,238,111, 64, 73,185, +158, 15,226, 3, 48,123,174,231,131, 49, 7,152, 65,238, 43,128,169,163, 75, 13, 80, 75,210,145, 58,235,157,106, 89,181, 44, 75, +218,221, 36,136,228,241, 40,211,209, 32,147,251,113,152,168, 52, 81, 29, 29,117,129,252, 63, 0, 22,243,197,118,211,145,107, 85, +203,218, 91,231,159,113, 61, 95,230,246,126,132, 0,196,210, 99,145, 21,132, 67,117,254,221,133,177,243,251, 92,220, 24, 47,195, +225, 45, 76, 79,138,108,247, 10,110, 54, 96,225,186,200, 86,171, 80,222,130,251,241, 23,194,179, 79,254, 28, 9,179, 39, 0, 0, + 0, 32, 99, 72, 82, 77, 0, 0,122, 37, 0, 0,128,131, 0, 0,249,255, 0, 0,128,232, 0, 0, 82, 8, 0, 1, 21, 88, 0, 0, + 58,151, 0, 0, 23,111,215, 90, 31,144, 0, 1,226, 30, 73, 68, 65, 84,120,218,236,157,119,120, 20,197,255,199,223,179,123,123, + 61,141,132, 36,228, 82,105,210,107,232, 32, 77, 20,233, 2, 2, 42, 40,162, 82,108, 40, 42, 77,233, 96, 80, 4, 17, 20,193,138, +128, 32,168,128, 2,130,116,144, 78, 66,175, 95, 32,129, 52, 72, 33, 61,151,187,219,219,157,223, 31,228,238,119, 9,151,228, 46, + 9, 69,156,215,243,220,115,119,123,187,239,155,217,157,153,125,239,103,102,103, 9,165, 20,247, 10, 66, 72, 35, 74,233, 25,166, +201, 52,153, 38,211,100,154, 76,147,105, 50,205,255, 18, 92, 57,118,106,165, 59, 50, 66, 8, 45,124,117,122,216, 53,239, 97,222, +105, 37,106,118, 42,212,156,254, 47, 73,103,167,135, 85,211,150,223,202,212,117,220,135,149,181, 63, 29,210, 73, 43, 59,157,247, + 74,179,178,235,101,101,150, 81, 39,199,125,250,191, 36,157,157, 30, 54,205,226,229,167, 50,116,157,149,201,138,238, 79, 39,233, +164,149,157,206,123,165, 89,217,231,203,202, 42,163,165, 28,251, 74, 59, 55, 61,204, 40, 30,180,193, 0, 0, 74, 41,113,208, 39, + 15,171,166,227,126,176,233, 87,102, 90, 43,145, 61,149,173, 89,108,127, 86, 22,211, 41,165,132, 16,178, 23, 64,167,202,204,123, +101, 28,247, 98,121,173, 20,221,123,105,174, 42,179,220,223,107,205,202,170, 75,197, 53, 43,163,220, 59, 59,238,247,240, 24, 85, + 86, 58, 43,165, 46,221,139, 50,239,164,252, 84, 88,183,184,102,101,212,165,226,154,149, 81,238,239,135,102,101,212, 37,103,154, +149, 81,238, 75, 58,246, 44,130,117,127,140, 64,241,138,221,249, 97, 54, 66,247, 56,138,213,233,223,160, 89,201,199,104,122,161, +102,101, 94,205,116,174,172, 99, 84,188,236, 84,198, 85,151,163,102,101,149, 77, 39,233,172,240,113,114,166, 89,209,244,150,144, +206, 74,207,123, 69,203,253,253,210,172,228, 99, 84, 41,117,169,152,102,231, 74,190, 8,232, 92,153,117,201, 81,179,178,234,146, +147,116, 86,248, 56, 57,211,172,104,122, 75, 72,103,165,231,189, 18, 35,162,149,174,251,200, 69,176,238,165,185,186, 23,230,205, +118,149, 84,217, 39,178,202, 52, 89,247, 42,210, 86, 89, 81, 28, 39,186,123, 43, 81,110, 79,101,167,179, 48,125,228, 94, 24, 97, + 74,233,116, 66,200,180,135,185, 66,179,186,196,234,210,195, 86,151,156,149,155,138,214,165,123,117,241,236,168, 89, 89, 70,200, + 73,222, 43, 84,151,138,111, 91, 25,117,169, 12, 77,114, 47,242, 95,217,245,233, 97,132,123, 88, 18,114, 15,198,247,208,123, 17, + 21,187,135,249,174,204,116,118,254, 55,228,253, 94,164,147, 16, 50,253, 30,229,253,223,178, 79, 89, 93, 98,117,233,161,171, 75, +197,202,100,231,202,138, 12, 85,246,133, 84,113,205,202, 28,135, 84,153,101,244, 94,231,189, 50,235,210,189, 56,246,255, 22,220, +142, 96,221,171,171,227,127,131,230,189,208,190, 71,121,223,123, 47,174, 14,238,193,184,174, 74, 79, 39,165,116, 58, 42,177,203, +209,150,231,202, 76,235,189,236, 38,188, 23,101,243, 94,150,247,202, 28,231,113,143,242,254,111, 57,238,149,158,206,202,170, 75, + 78,142,121,133,211,234,108,255, 85,118, 23,118,101,150,205,123,169, 89, 25,218,247, 34,157,247,234,216,255,155, 32,247,114,154, + 6, 6,131,193, 96, 48, 24,140,255, 34, 78, 35, 88,141, 26, 53,218,213,170, 85,171, 58, 39, 78,156,176, 80, 74, 65, 8, 1, 33, + 4, 28,199,129, 16, 2, 89,150,147,143, 31, 63,222,142,237, 62, 6,131,225,210,149, 28, 33, 28,254,127, 72,130,124,231, 98,150, + 93,221, 49, 24,140, 71,184,221,115,214,198, 53,105,210,228,242,137, 19, 39,130,255,254,251,111,104,181, 90,232,245,122,232,245, +122,120,120,120, 64,175,215,163, 87,175, 94, 55,247,239,223, 95,211,221, 63,171, 94,189,250, 37,171,213, 90,205, 45, 7,168, 80, +164,198,197,197,213,161,148, 74,206,126, 15, 10, 10,186, 68, 8, 9,113,179,177, 79, 79, 74, 74,170, 65, 41,181,222, 47,205, 86, +173, 90,197, 73,146,228,239,142,166, 74,165, 74, 56,120,240, 96, 29, 86, 76,239, 15,237,218,181,187, 36,138,162,219,229, 51, 56, + 56,184,206,186,117,235,156,150,207, 54,109,218, 92,151, 36,169,138,139,101, 8, 0,192,113, 92,236,145, 35, 71,154,150,100, 64, +154, 55,111,238,118,249, 4,144, 26, 29, 29, 29, 81,210,143, 77,155, 54,189,196,243,124,165,106,218,136,140,140, 20,130,130,130, +190, 5,240,108,105,235, 9,130,144,158,145,145, 81, 99,207,158, 61, 86, 86, 26, 25, 12,198,191, 29,167, 17, 44, 89,150, 19, 71, +143, 30,173,143,137,137, 41, 41,130,149, 82,158, 63, 51,155,205, 33,113, 59,118, 64, 17, 24, 8,106, 54,195,226,237, 13, 74, 41, +100, 89,134,112,229, 10,168,197, 2, 88, 44, 48, 53,108, 8, 0, 16, 69, 17,173, 91,183, 14, 8, 15, 15, 23, 0, 72, 37,200, 86, +123,251,237,183,225,233,233,137,130,130, 2, 20, 20, 20,192,100, 50,193,100, 50,193,108, 54,195,108, 54,195, 98,177,192, 98,177, + 64, 20, 69,152, 76, 38,196,196,196,248,132,135,135, 43, 0,148,212,144, 87,123,235,173,183,224,225,225, 97,215,179,189,219, 52, + 28,245, 76, 38, 19, 78,157, 58, 85,170,166, 36, 73,254,123,247,238,133, 94,175,135, 44,203,144, 36, 9,146, 36, 65,150,101,200, +178,108,219,239,142,235,163,123,247,238,213, 88, 17,189,127,152,205,230,144,253,115,230,128,175, 90, 21, 84, 20, 97,173, 95,223, +126,124,132,127,254, 1, 68, 17, 84, 20, 33, 62,249,164,189,220,246,237,219, 55, 32, 45, 45,173,196,242, 41,138, 98,213,189, 31, +124, 0,206,211, 19,180,160, 0,186,254,253,129, 59,225, 27,228, 44, 92, 8, 42,138,160, 22, 11, 60, 38, 78,188,179, 44, 39, 39, +187,105,211,166, 59,166, 79,159, 78, 0,208, 18,140, 88,181,157, 59,119,218,203, 12,165, 20, 54, 47,102,171,167, 60,207,219, 95, + 71,143, 30,197,123,239,189, 87,170,185,231,121,190,218,240,225,195, 97,177, 88,236,117,199,246, 89, 20, 69,123,121,183, 90,173, + 16, 69, 17,102,179, 25, 9, 9, 9,101, 94, 48,216,204, 85,104,104,232,211, 11, 22, 44,192,166, 77,155, 80,189,122,117, 40,149, + 74,123,250,108,233,125,231,157,119,124, 10,219, 36,102,176, 24, 12,198,163,105,176,206,156, 57,211, 21, 0, 6, 12, 24,176,171, + 81,163, 70,117, 46, 92,184, 96,177, 53,222,133,175,160, 23, 94,120, 33,206,214,152, 83, 74,147, 87,174, 92,233, 82,151,161, 34, + 48, 16,113,190,190, 0,128,248,221,187,109, 87,236, 8,238,212,201,190, 78,198,177, 99,224,121, 30, 17, 17, 17,246,171,250,210, +240,240,240,192, 83, 79, 61, 5,149, 74,133,200,200, 72, 40,149, 74, 8,130, 80,226,203, 21,116, 58, 29,102,204,152, 97,139, 82, + 64,175, 81,227,245,199,219, 64, 67,128, 31, 78, 93,128, 73,146,161, 80, 40,160, 80, 40, 92,214,212,235,245, 88,187,118, 45,148, + 74,165,211,215,206,157, 59,209,175, 95, 63, 40,149, 74,248,250,250,226,191, 52, 33,219,195, 2, 95,181, 42, 18,155, 55, 7, 0, +100, 69, 71,219,203,167,103,159, 62,246,117, 44, 23, 46,128,227, 56, 4, 4, 4,184, 84, 62, 57, 79, 79,220,236,209, 3, 0,144, +180,111, 31, 84, 42, 21,148, 74, 37,188,102,205, 2, 21, 4,112, 74, 37, 44,175,189, 6,139,197,146, 53,117,234,212, 21,106,181, +250,108, 89,154,146, 36,225,200,145, 35, 80, 42,149, 80,171,213,119,189, 84, 42, 21,212,106, 53,214,172, 89,131,248,248,120,151, +242,110, 52, 26, 49,103,206, 28, 16, 66,138,212,161,146, 62,187, 16,145,227,122,246,236,249,117, 72, 72,200,147, 11, 22, 44,208, + 43,149, 74, 44, 89,178, 4, 10,133, 2,189,122,245,130,175,175, 47,182,111,223, 14,165, 82,137, 15, 62,248,128, 21, 62, 6,131, +241,232, 27, 44,135, 6, 50,248,163,143, 62,242, 94,181,106, 21,212,106, 53,180, 90, 45,116, 58, 29,116, 58, 93,145,207, 31,126, +248,161,228,234, 31, 82,179,185,248,149, 51, 56,142,187,107, 25,207,243,246, 43,114, 23, 34, 15, 24, 52,104, 16, 0,148,105,174, + 92, 53, 67, 38,147, 9, 10,133, 2, 53,195,252,241,209,160, 22,104,207, 83, 24,211, 1,164,229, 97,120,144, 2, 39, 67, 30,195, +226, 27,233,184,158,157, 11,133,194,181,155, 49, 37, 73, 42,209, 92, 41,149, 74,172, 92,185, 18,131, 6, 13,130, 82,169,188,107, +159, 48,238, 15, 84, 20,139,154, 35,142,187,235, 88, 56, 91, 86,170,102, 65,129,173, 96,219,205,149, 74,165, 2, 84, 42,112,130, + 0,162, 84,194, 98,177,100,189,248,226,139,235,188,188,188,142,249,248,248, 24,203,212,164, 20,106,181,250, 46,131,165, 82,169, +236,230,106,221,186,117, 88,181,106, 21, 90,183,110,237,114,153, 87, 42,149,120,243,205, 55,239,250,109,227,198,141,118,131,165, + 80, 40,160, 84, 42,203, 50, 87, 4, 0, 39, 8,194,224,121,243,230,113,182,245,253,252,252, 32, 8, 2, 26, 53,106, 4, 15, 15, + 15, 28, 56,112,192, 94, 47, 24, 12, 6,163, 20, 4, 0, 77, 1,248,227, 78,143, 65, 14, 0, 31,135,223, 83, 11,223,253, 29,190, + 31,115,162,211,178,112, 29,219,239,182,239,102, 0, 42, 39,203,211, 1,104, 11, 95, 38, 0, 7, 1, 52,116,248, 31,219,118, 40, +254,191,138,194,198,176, 19,128, 61, 0, 58, 59, 78,126, 71, 41, 77,156, 61,123,182,222, 73, 4,171, 72,183, 33,165,212,229, 46, + 67,209,199, 7,241,187,119,131,227, 56,132, 58, 68,173,210,143, 28,177,155, 45,175, 39,159, 4,209,233, 32,124,246,153, 75,154, +102,179, 25, 41, 41, 41,119, 93,121,151,215, 96, 17, 66, 32,138, 34,180, 90, 53,118, 47,235,136,228,107, 86,204,217, 20,143,141, + 71, 99,161, 80, 40,208,187,110,109, 12,180, 2,115,125, 53, 24,101,149, 96,145, 93, 27,171,107,181, 90,157, 70, 2,108, 47, 66, + 72,145,207,140,251,143,181,126,125,123,228,202, 59, 50,242,255,205,199,185,115,118, 99, 37,180,111, 15,162,211,129, 76,158,236, +146,166,174,127,127, 36,239,223, 15,165, 82, 9,191, 39,159, 4, 10,163, 86,138, 99,199,160, 84, 42, 33,138, 98,214, 59, 79, 61, +245,221, 45, 89,142,110,211,166, 77,198,205,155, 55,245,174, 24, 44, 71, 51,229, 24,181,114, 52, 87,130, 32, 64, 44,102, 26, 75, + 51, 88, 37,213, 15, 91,121,117, 39,130, 5, 0,178, 44,211,191,254,250, 11, 75,150, 44,129,159,159, 31,158,122,234, 41, 84,171, + 86, 13,235,214,173, 3,165, 20,111,190,249, 38,180, 90, 45,180, 90, 45, 43,243, 12,198,127,148,146, 60, 72, 49, 58, 78,154, 52, +169,197,220,185,115, 63,110,219,182,237,154,131, 7, 15,174, 38,132,108,114,104, 19,123, 23,106,109,114,248,222,178,152,201, 18, + 0,248, 19, 66, 54,217,214,119,252,238,176,188, 27, 0,149,237,251,164, 73,147, 26,206,157, 59,247,227,137, 19, 39, 78,142,138, +138, 82, 78,154, 52,169,241,220,185,115, 63,182,253,143,179,116, 56, 70,176,156,206, 2,252,251,239,191,119, 45,158,195,250,245, +235,239,106,211,166, 77,157,152,152, 24, 71,211, 21,212,178,101,203, 56, 74,105,153,119, 23, 82, 74,237, 99,185,156, 69,173, 56, +142, 3,209,235, 1,189, 30,178, 11, 13,174,205, 12, 41, 20, 10,112, 28,135,237,219,183, 67,171,213,162,103,207,158, 37, 26, 44, + 87,163, 98, 42,149, 18, 10, 31, 14, 47, 46, 56,142,180,140,124,123,151,224,142,184,120, 28,213,104,240, 81,131, 38,240,200,141, + 67,182,201,236, 86, 4, 75,165, 82,217, 79, 86, 74,165, 18,111,188,241, 6,204,102, 51, 56,142,179, 47, 43, 52,174,236,140,243, + 96, 42,123,137, 81, 43,199,242, 73, 93,140, 98,201,178,252,255, 81, 43,165, 18,156, 82, 9, 82,120,156, 69, 81,204, 26, 54,108, +216,186, 91,178, 28,125,241,226,197,179, 0,116,173, 90,181,114,201, 96,217, 76,149, 77,219,153,185, 82, 40, 20,176, 88, 44, 46, + 95,168,148, 20, 73,114,215, 96,209, 59, 13,138, 12,128, 70, 68, 68,216,183, 9, 12, 12,132,143,143,143,125,108,155, 70,163,129, + 86,171,101, 17, 44, 6,227,191,141, 43, 79, 34, 80,207,157, 59,247, 99, 71, 3, 83,220,208, 56, 26,167, 98, 38,202,209,164, 53, + 44,163,253,223, 84,220, 52,217,254,151, 16,178, 41, 42, 42,170,119, 25,233, 72, 45,110,176, 92,158,102,159,231,249,224,101,203, +150,121,111,216,176, 1, 30, 30, 30,240,241,241,129,151,151, 23,124,124,124, 48,112,224,192, 50,187, 10,101, 89,118,218,197,226, +104,176,160,215,223, 57,137,185,120, 69,107,177, 88, 32, 8, 2, 56,142,195,152, 49, 99,236,227,162, 42,210, 69,104, 54,155,193, +115, 60,160,174, 14,138, 35,118,115,101,127,169, 84,136, 11,107, 2,114, 51, 17, 10,133,107, 61,164,178, 44,219, 79,122,130, 32, + 96,234,212,169,152, 63,127,126,145, 27, 8, 4, 65, 64,179,102,205,112,249,242,101, 86,229, 30, 0, 37,149, 79,219, 64,108, 66, + 8,136,135,199,157,242,169, 80,184,100,214,109,209, 38,165, 82, 9, 78,165, 2, 41, 52, 88,162, 40,102,189,255,254,251,223,221, +186,117, 43, 58, 52, 52, 52, 21, 0, 15, 23, 39,225, 35,132,216, 53, 53, 26, 77,137,230, 74,161, 80,184, 28,193,178,213, 35, 71, + 70,142, 28, 89,228, 29, 0,222,124,243, 77, 87,235, 17, 5, 0, 65, 16,208,173, 91, 55, 52,110,220, 24, 27, 55,110,132, 44,203, +120,227,141, 55,160,213,106,177,112,225, 66, 88,173, 86,124,242,201, 39,172,240, 49, 24,255,237, 11,219,178, 60,136,113,226,196, +137,147, 9, 33,155, 10, 35, 73,103, 75, 49, 82,206,104, 89,204,164,165,150,208, 94,247,118,102,178, 28, 63,219,152, 52,105, 82, + 67, 39,233, 56,118,151,193,114,112,143,101,157,128, 18, 71,141, 26,165,183,205,145,101, 51, 6, 60,207,187,116,119,161,226,127, +255, 67,208,227,143, 3, 0,110, 31, 61,106, 55, 85,158,221,187, 3, 58, 29,136, 78, 7,241,247,223,239,232,249,249,185,116, 96, + 68, 81,180, 27,172,244,244,244, 74, 25,131, 37,138, 34,120,165,128,195, 30, 2,168,192, 23, 49, 87,130, 32,128, 83, 8,136,243, +127, 12, 68,241, 55, 20,146,107, 55, 61,217, 12,150,237,197,113, 28,222,121,231, 29,251, 62,228, 56, 14,237,219,183,183, 27, 78, +198,253, 71,177,127, 63, 60,122,223,169,171,230,243,231,255,223,248,118,236, 8,162,215,131,232,116,224, 54,111,190, 99,180, 60, + 61,129,239,191, 47, 83, 51,111,201, 18,120,206,153, 3, 34, 8, 80, 28, 62, 12,149, 74, 5,139,197,146,245, 66,100,228,186, 84, + 31,159,227, 23, 47, 94, 60, 15,128, 27, 56,112,160, 95,171, 86,173, 20, 46, 54, 70, 78,187, 5, 87,175, 94, 93,196, 92, 41, 20, + 10, 88,173,174,149,207,210, 34, 88,206,162, 89, 46, 24, 75,218,183,111, 95,240, 60, 15,111,111,111,120,122,122,218,239,190,180, + 69,174,172, 86, 43,172, 86,171,203,227, 24, 25, 12,198,163,137, 11, 30,196, 20, 21, 21,117, 54, 42, 42,202, 30, 73, 42, 30,193, + 42,129, 94,133,102,202,223,102,206,112,103, 44,213,177, 82,210,210,187, 36,227,229,184,108,238,220,185, 31, 59, 73,135,189, 91, +178,196,137, 70, 91,183,110, 93,199,113,154, 6,158,231, 33, 73, 82,242,185,115,231, 42, 52,193, 40,117,232,174,112, 22,181, 34, +122,253,255,119, 21,186, 24,193,178,117, 17,242, 60,111, 55, 47, 63,253,244, 19, 60, 60, 60,240,242,203, 47, 87,192, 96,241,248, + 67,121, 25, 80, 42,238,138, 96,241,130,128, 27,222,161,224, 4, 1, 10, 73,116, 41,173,217,217,217, 80, 42,149,248,226,139, 47, +240,225,135, 31,218,246,169, 61, 58,226,104,180, 24, 15,168,146, 59, 68,123, 28, 47, 30,108, 81, 43,162,215,219, 35, 92, 60,207, +195,165,185, 50,173, 86, 64,169, 4, 10,187,242, 44, 22, 75,214,248,241,227,191, 75,245,241,137, 14, 11, 11, 75,197,157, 9, 56, + 57, 79, 79, 79,151,203, 39,199,113, 78,205,149,173, 30,216,203, 41,207,187, 21,193, 82, 42,149,216,188,121,179,189,174, 56, 70, +174,220, 53, 88,142,105,221,183,111, 31, 98, 98, 98, 48,102,204, 24,104,181, 90, 44, 90,180, 8, 86,171, 21, 51,103,206,132, 86, +171,189,211,125,202, 96, 48, 24, 37, 83,197,102,112, 10, 77, 82,145,200, 18,165,180,183,163, 9, 42,169,171,176, 48,226,180,175, +140,255,218, 92,104,204,156, 98,139,164, 21,187,232,221, 84,220,156, 41,108,206,209,241,157,227,184,224,165, 75,151,122,239,219, +183, 15, 58,157,206, 62,209,232,243,207, 63, 47, 85,120, 23, 21, 26, 44,234, 96, 42,138,156,192,116,186,114, 25, 44, 65, 16,138, + 24,172,105,211,166, 65,161, 80,224,219,111,191, 5, 0,188,255,254,251,110, 25, 44,139,197, 2, 42, 3, 7,165, 61, 48, 44,105, + 2,186, 92,131, 91,251, 46, 64, 16, 4, 84,107,245, 36,228, 22, 3,145,174,242,130,158,202, 46, 95,125,103,100,100,224,252,249, +243, 32,132, 96,198,140, 25, 69,242,239, 56,198, 7, 0,182,111,223, 14,252,135,158,217,244,208, 25,172,194,238, 64,123, 89, 44, + 44,159,156,131,193,178, 69,146, 92,209, 36, 42, 21,248, 66,115,245,210, 75, 47,173, 75, 78, 78, 62,126,241,226,197, 11, 0,184, +231,158,123,206, 79,163,209,224,135, 31,126,200, 1,160, 94,179,102, 77,153, 99,176, 56,142,115,106,174,156, 25, 44, 73,146,220, +170, 71,101, 93,140,148,199, 96, 17, 66, 32, 73,146, 61,114, 37,138,162,253,187, 90,173,102, 5,143,193,248,143, 71,175, 28,223, + 75, 32,181,216, 56, 39, 82, 44,210,148,234,204, 88, 57,118, 7, 58,124, 22,157,232,154,139,117, 29, 22, 95,110,123, 79,143,138, +138,218,109,139, 92, 57, 44, 47,146,142, 18, 35, 88,148, 82,251, 68,163,182,147, 8,199,113,144, 36, 41,165,162, 59,178,160, 65, + 3,100, 69, 71,131,231,121,120,246,236, 9,162,211,129,234,116, 16,215,174,181, 15, 84, 87,204,154,117,231,100,214,179,167, 75, +154,182,187,243, 28, 13, 86,102,102, 38, 4, 65,192,236,217,179,193,113, 28, 62,249,228, 19, 4, 7, 7, 35, 57, 57, 25, 91,183, +110,117, 73,147,147, 57,104,134,251, 66, 51,202, 19,220,152, 90,104,216,103, 20,178,114, 34,112,218,172, 71,189,188,203,168,178, +107, 26, 44,146,235,221, 27,162, 40,218,231, 46,162,148,218,163, 87,182,110, 19, 73,146,236,147, 58,126,250,233,167, 96, 79, 18, +185,255, 88,158,120, 2,226,197,139,224,121, 30,202,206,157,239,140,181,210,233,192,109,220,248,255,198,106,218, 52, 80,189, 30, +114,103,215, 30, 8,175,125,231, 29, 88,238, 76,226,153,245,110,143, 30,223, 39,139,226,177,154, 53,107,218, 34, 87, 68,163,209, + 64,175,215, 19,220, 25,131,229, 82,248,210, 86, 87,202, 50, 87,182,207,174,150, 79,199,105, 24, 42,195, 96,217,218,142,151, 95, +126, 25, 65, 65, 65, 88,188,120,113,145,200,213,228,201,147, 33,138, 34, 22, 46, 92,200, 10, 31,131,193, 40,141, 99,110,172,219, +210,193, 44, 29, 43,167,238,177,138, 38,216,105,203,123,250,244,233,174, 37,109,224,216,125,104,107, 64, 41,165,201, 49, 49, 49, +237,156, 52,174,141, 40,165,103, 28,151,201,178,252,255,243, 92,233,116,128,135, 7, 56,189,222,126,194,176, 69,179,120, 79, 79, +167,131,136,157,105,218, 12, 22,199,113, 69,174,190, 21, 10, 5,178,178,178, 32, 8, 2, 22, 47, 94, 12, 47, 47, 47,152, 76, 38, +184,146, 78,139,197, 2,158,231,145,127, 61, 31,177, 83, 78, 67,173,191,130, 58, 79,122,194, 83,184,138,218,251, 55,192,106, 53, + 3, 14, 93,134,174,104,214,168, 81, 3,227,198,141,179, 15, 78, 46,254,114,204, 43,165, 20, 45, 91,182, 44, 83,179,162, 48,205, +162,154,182, 46,113,219,221,130,196,195,227,206,184, 43,135, 8, 35,245,240, 0,231,225,113,231,110, 64, 23,202,103,161,121,185, + 19,185, 18,197, 99,182,200,213,139, 47,190,232, 91, 24,185,202, 5,192,205,154, 53,203, 35, 36, 36, 68, 81,124,252,157, 51, 77, +158,231,239, 50, 87,238, 24,172,146,234, 81,241,233, 67,198,142, 29,123,215, 68,163, 37, 25,172,146,242,206,243, 60,170, 86,173, + 10,157, 78, 7,171,213,106,143, 92,105, 52, 26,251,236,240, 37, 93, 76,176,242,201, 52,153,230,127, 71,243, 1,153,177,123,134, +219, 35, 75,109,221,135,135, 15, 31,134,167,167, 39,188,189,189,221,234, 58, 52,155,205, 48, 24, 12,144,101, 25,234, 79, 62,185, + 19,189, 1,144,175, 84,254,255, 99, 73,186,116, 1,229, 56,100,228,228,192, 98,177,148,217, 13, 99, 52, 26,139, 12, 64,183,153, + 43,199, 19, 67,110,110,174,125,242, 80, 87,176,105,218,162, 98, 68,162,184,182,227,215,187,239, 38,116, 99, 38,119, 73,146, 16, + 16, 16, 80,100, 12,143,237, 36,232,228, 68, 13,176, 46,194,251,142, 40,138,168, 82,165, 10, 40,165, 16, 38, 78, 4, 8, 1, 37, + 4,166,194, 72,163,213,106,133,208,182, 45, 40,207, 35,219,104,132,197, 98,129, 70,163, 41, 85, 51, 55, 55, 55,235,131, 15, 62, +248, 14,192,145,174, 93,187,166, 0, 48, 2,160, 62, 62, 62,106, 74,169, 12, 32, 5, 0, 77, 74, 74,242,189,118,237,154,108, 54, +155,203,124,206,231,225,195,135,113,237,218, 53, 52,111,222,220,254,248, 26,219,203,246, 8,166,242, 68,176,156,205,209, 86,222, +153,220, 29,218, 12,120,123,123, 67,165, 82, 97,246,236,217, 80, 42,149,208,106,181, 0,128,133, 11, 23,222,217,215,110,232, 49, + 24, 12,198,191, 1,183, 13,150,173,251,240,196,137, 19, 22, 91,227,233,234, 68,163, 74,165, 50,181, 69,139, 22,110, 61,240, 88, +169, 84,102, 94,191,126,221, 90,138,139,190,185,103,207, 30,183, 30, 82,203,243,124,153,154,135, 15, 31,118, 75,147,227,184, 82, + 53, 5, 65, 72,237,222,189,187, 91,121, 87,171,213, 41,172,136,222, 63, 4, 65, 72,237,213,171,151,243, 99,180,104, 81, 73,219, +100,162,148,103,231, 9,130,112,173, 97,195,134,187,212,106,245, 21,111,111,111, 28, 58,116, 40,160, 89,179,102, 1,142,235, 52, +107,214, 44,172, 88, 89, 50, 77,159, 62,157, 78,155, 54,173, 36,217,155,227,199,143,119,183,124,166,150,113, 53,122,243,230,205, +155,238,214,163,212, 50, 27, 24,133,226,230,219,111,191, 29,226,106, 93, 7,123, 14, 33,131,193,248,175, 26,172,210,186, 15,203, + 34, 46, 46, 46,162,178, 51,144,152,152, 88,231,223,160,121,248,240,225, 8, 86,220, 30,110,238,197, 49, 58,124,248,112,163,202, +214,140,142,142,174,244,242,121,252,248,241, 58,247, 98,159,254,246,219,111,117, 88,201, 98, 48, 24,255, 69,216,124, 0, 12, 6, +131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 60,220, 16, 0, 78,187, 48,220,185, 59,128, 16,226,118, 55, 72, 89,250, + 76,147,105, 50, 77,166,201, 52,153, 38,211,124,244, 52,203,210,126,136,239, 78,116,207, 96,221,203,185,150,216, 45,172, 76,147, +105, 50, 77,166,201, 52,153, 38,211,252, 47,194,186, 8, 25, 12, 6,131,193, 96, 48,152,193,122,244, 8, 15, 15,175,198,246, 2, +131,193, 96, 48, 24,143, 14, 37, 78,211,208,170, 85,171, 56, 73,146,220,154,183, 73, 16,132, 84, 87,111,117, 39,132, 40, 12, 6, + 67,127,173, 86,219, 73, 16,132,182, 0, 32,138,226, 33,163,209,184, 55, 41, 41,105, 61,165,180, 92,243,225, 4, 6, 6, 70,112, + 28,247, 2, 33,100, 16, 0, 80, 74,215,201,178,252,243,173, 91,183,226, 30,182,157, 79, 8,225, 66, 66, 66,190,175, 91,183,110, +215,144,144,144,115, 94, 94, 94,253,206,157, 59,103,169,128, 94,134,179,229,148,210, 42,229,213, 12, 11, 11,243,177, 90,173, 45, + 0, 52, 43, 92,116, 66,161, 80, 28,191,113,227, 70, 38,171, 62,143, 6,229,169,235,192,157,121,237, 14, 29, 58, 20, 81,153,154, + 42,149, 42,225,224,193,131,117, 74,208,188, 36, 73, 82,200,191, 32,157,255,138,253, 89, 18, 45, 90,180,248,157, 82,218,189,176, + 77,217,118,252,248,241, 1,172,150, 48, 24,149,104,176, 36, 73,242,223,187,119, 47,244,122,189,237, 36, 13, 73,146,236,179, 68, +203,178,108,127,134,158,109,134,235,167,158,122,202,165, 6, 32, 52, 52,180, 65,157, 58,117, 86,189,249,230,155,161,125,250,244, + 81, 5, 6, 6,130, 16,130,155, 55,111,214,218,180,105,211,144,197,139, 23, 79, 14, 13, 13, 29, 26, 31, 31,127,206, 21, 61,127, +127,127,189, 82,169,124,134, 82, 58,180, 73,147, 38,237, 62,248,224, 3,210,190,125,123, 72,146,132, 93,187,118, 77, 90,176, 96, +193, 68,131,193,112,144, 16,178,202, 98,177,108, 72, 77, 77,205,123,128,166,138, 4, 6, 6,134,221,186,117, 43, 30, 0,105,222, +188,121,187,249,243,231,251,254,254,251,239,143,127,254,249,231, 95, 2, 24, 89, 1,121, 85, 37,166, 83, 17, 20, 20, 52, 14,192, +196,226,186, 86,171,213,108, 48, 24,230, 38, 39, 39, 47, 40,175, 17,102, 60, 60, 56,214,117,219, 51, 49,173, 86,171,189,110, 75, +146, 4, 74,169,253, 49, 66,182,246,160, 91,183,110,254,238,104,218,218, 13,155, 46,112,231,209, 89, 14,219,160,123,247,238, 37, + 70,115, 41,165,213,118,238,220, 9,111,111,239, 82, 53, 29,145,101, 25, 79, 60,241, 68,185,210,105,107,223,138, 35,138, 98,169, +233, 44,174,233,168, 91,146,166, 44,203,232,210,165,203,125, 77,167,141,214,173, 91, 7, 88,173,214, 69,132, 16, 21,207,243, 31, + 80, 74,187,111,221,186, 21,146, 36,161, 87,175, 94,221, 91,183,110, 93, 75,146,164,121, 58,157, 78, 54,153, 76, 99,142, 28, 57, +194, 38, 64,102, 48, 42, 98,176, 0, 64,175,215, 99,245,234,213,246,199, 99, 20,127, 20,141,227,231,240,240,112,151,254, 48, 40, + 40,168,121, 68, 68,196,182,245,235,215,107, 3, 2,254,127, 66,107,139,197, 2, 47, 47, 47,188,252,242,203,170,110,221,186,213, + 26, 58,116,232,158,160,160,160,238,201,201,201, 49,165,233, 5, 7, 7,143, 14, 8, 8,152, 53,110,220, 56,109,223,190,125, 81, +165, 74,209, 96, 77,239,222,189,209,179,103, 79,114,237,218,181,246,235,214,173,107,191, 98,197,138,249,193,193,193, 83, 19, 19, + 19,151,150,149,214,144,144,144, 42, 26,141,230,203,192,192,192, 70,177,177,177, 7, 85, 42,213,248,130,130,130, 55,131,130,130, +158,207,205,205,141, 55,153, 76,111,220,184,113, 35,214, 29,115, 85,173, 90,181, 45,141, 26, 53,106,162, 82,169, 98, 77, 38,211, +139,103,206,156,137,185,122,245,170, 97,232,208,161,228,204,153, 51,125, 13, 6,195,174,164,164,164,181,229,137, 92, 89,173,214, +227,165,253,238,106, 36,171, 65,131, 6,202,160,160,160,109, 0, 90,245,233,211,231,250,244,233,211,169,143,143,143, 39,199,113, + 36, 61, 61, 61,227,211, 79, 63, 85,174, 93,187,118, 90, 80, 80, 80,247, 6, 13, 26,116,175, 72,212,141,241,112,160,215,235,241, +203, 47,191, 20,121, 28,142,227,115, 7,139, 63, 46,199,215,215,247,158,104, 82, 74, 75,125, 60,148,135,135, 7,126,253,245, 87, +112, 28,119,151,142,163,182,237,123,213,170, 85, 65, 8, 1, 33,132,208, 18,238,232,113, 55,157, 85,171, 86,133, 44,203, 92,101, +230,221,223,223,191,210,247,103,213,170, 85,203,220,159,133,237,198,162, 79, 63,253,180,151,167,167, 39, 38, 76,152,112, 50, 60, + 60, 28, 94, 94, 94, 88,182,108, 25,170, 84,169, 2, 73,146, 78,126,246,217,103, 36, 62, 62, 30, 11, 23, 46,252, 26, 64,127, 86, + 99, 24,140, 10, 26, 44, 0, 69, 42,109,105, 6,171,132, 43,206, 34,119, 24, 68, 68, 68,168, 61, 60, 60,126,254,227,143, 63,180, +126,126,126,246,229,102,179, 25, 57, 57, 57,200,205,205, 69, 78, 78, 14,244,122, 61,150, 44, 89,162,125,225,133, 23,126,142,136, +136,104, 18, 23, 23,103, 42, 73,147, 82, 58,247,212,169, 83,130,213,106,133, 74,229, 60,128,195,113, 28,106,213,170,133,177, 99, +199,162, 67,135, 14,186,231,158,123,110, 46,128,165, 37,105, 58, 24,147,229,251,247,239,111, 27, 16, 16,160,217,176, 97,131,102, +201,146, 37,151,123,246,236,153,251,210, 75, 47, 5,101,102,102, 6,245,238,221,251, 79, 0, 13, 92,201,123, 97,228,206,187, 81, +163, 70, 13, 23, 44, 88,224,117,238,220,185,166, 83,167, 78,221,148,157,157, 61,107,214,172, 89,245, 87,174, 92, 89, 99,230,204, +153,250, 83,167, 78, 77, 34,132,252, 70, 41,149, 92,209,116,140, 92,113, 28,167,112, 55,178,229, 76, 51, 51, 51,115, 50,128, 86, + 63,253,244,211,153, 39,158,120, 34,140, 82,154, 14,224, 38, 0, 4, 4, 4,104, 22, 44, 88,160,235,212,169,211,137, 49, 99,198, +180, 42, 92,119,186,139,233, 44, 55, 76,243,222,106,202,178, 12, 65, 16, 48,112,224, 64, 16, 66,138, 60,199,208, 86,207,247,239, +223,143,167,158,122, 10,130, 32,224,213, 87, 95,117, 89,243,185,231,158,131,213,106,189, 75,115,231,206,157, 69,140, 1,199,113, + 46,105, 58, 62, 35,180,164,151,187,154,165,105, 21,215,116,103,127,186,170,233,236,121,171,165,105, 14, 24, 48, 0, 91,183,110, +173,112, 58,109,205,252,169, 83,167,208,164, 73, 19,172, 90,181,138,240, 60,143, 35, 71,142, 64,171,213, 98,248,240,225,104,212, +168, 17,209,106,181,184,118,237, 26,114,115,115, 9,171, 71, 76,243, 94,105,150,129, 0,160, 41, 0,127, 0, 18,128, 28, 0, 62, + 0,204,133,231,184,116, 0,218,194,151, 9, 64, 46,128,170,133,219,166,225,206,180, 84,126, 14,122,169, 40,250, 80,232,150,133, +218,182, 71,128, 57, 94,245,152,139,157, 71,109,223,139,191, 23,209,230, 10,141, 4, 45,124,117, 42,182, 3, 93, 50, 87, 37, 53, + 16,197,145,101,121,212,196,137, 19, 3, 28,205,149,201,100, 66,118,118, 54,114,114,114,236,239,151, 47, 95,134, 74,165,194,160, + 65,131, 2,100, 89, 30, 85,214, 78,231,121, 30, 49, 49, 49,216,176, 97, 3, 98, 99,239, 14, 40, 93,189,122, 21, 95,124,241, 5, +230,205,155,135,236,236,108,219,129,114,138,193, 96,240,107,208,160,193,204, 70,141, 26, 93,110,221,186,117,151,212,212, 84,205, +169, 83,167, 16, 30, 30, 30,184,126,253,122,143,200,200,200,160,232,232,104, 92,188,120, 81,217,182,109,219,176,250,245,235, 95, +111,210,164,201,151,129,129,129, 17,101, 69,175, 44, 22,139,215,217,179,103, 15,108,222,188, 89,106,209,162, 5, 86,173, 90, 21, + 94,187,118,237, 79,175, 93,187,182,118,217,178,101, 70,127,127,127,244,236,217, 51,194, 96, 48, 60,237,106,228,138, 16,146, 97, +181, 90,143, 59,139, 94,201,178,140,236,236,108, 92,191,126,253,248,233,211,167, 99, 10,215,191, 89, 70,212,174, 38,128,113,131, + 7, 15,254, 95,161,185,186, 81, 88,144, 69, 0,162, 36, 73, 57, 25, 25, 25,137,157, 58,117, 10,234,214,173,219, 69, 0,227, 10, +183, 97,252,139,177, 90,173, 16, 4, 1,127,253,245, 23,118,236,216,129, 93,187,118, 97,207,158, 61,216,183,111, 31,246,237,219, +135,253,251,247, 67, 16, 4, 28, 56,112, 0, 7, 14, 28,192, 91,111,189,229,178,230, 31,127,252,225, 84, 83,167,211, 21, 49, 6, +174,180, 33,146, 36,149,104, 86,126,252,241, 71,112, 28,119,151, 38, 33,132,162,148, 7,167,219,210,233,236,213,172,121,243,187, +150, 57, 51,109, 37,165,115,203,150, 45,176, 90,173, 88,183,110, 29,178,179,179,241,195, 15, 63, 32, 57, 57, 25,139, 23, 47,198, +149, 43, 87, 48,119,238, 92,156, 58,117,202, 37, 77, 91, 58, 7, 14, 28,104,127, 48,183, 32, 8, 72, 75, 75,195,178,101,203,112, +253,250,117, 44, 88,176, 0,231,207,159,199,172, 89,179, 92,210, 4, 0,158,231,199,173, 89,179,198,186,123,247,110,172, 92,185, + 18,107,215,174,197,149, 43, 87,160,209,104,160,213,106,113,243,230, 77, 92,184,112, 1,107,215,174,181,114, 28,247, 30,171, 45, +140,202,166, 36, 15, 82,140,142,147, 38, 77,234, 74, 8,217,212,174, 93,187, 97, 0,124, 8, 33,155, 0,168, 10,223,253, 38, 77, +154,212,138, 16,178,105,210,164, 73, 45, 0, 84, 37,132,108, 42,252,222, 5,128,159,237,123,225,250,254,197,204,155,191,195,114, +255, 98,235,170,156,125, 47,254, 94, 92, 91,225, 96,166, 72,241,134,200,177, 49, 43,203, 96,185, 82,153, 61, 61, 61,159,126,250, +233,167,149,142,230,202, 49,114,101,123,207,201,201,193,165, 75,151,208,168, 81, 35,165,167,167,231,211, 0,190, 40, 51, 20,167, + 80,192, 96, 48, 32, 45, 45, 13,103,206,156, 65,120,120, 56, 68, 81,196,182,109,219,144,153,153,105, 15,165,155,205,230, 82,117, + 2, 2, 2, 22,191,240,194, 11, 61, 71,141, 26,197,255,253,247,223,168, 87,175, 30,170, 87,175,142,131, 7, 15,194, 98,177, 32, + 52, 52, 20,109,219,182,197,175,191,254,138,166, 77,155,114, 35, 71,142,172,122,246,236,217,225,139, 22, 45,106, 3,160,121, 73, +186,213,170, 85,219,220,164, 73,147,166,231,207,159,191, 58,111,222,188,181, 55,110,220,232, 51,113,226, 68,125, 84, 84,148,239, +192,129, 3,159,220,186,117,235,229, 41, 83,166, 52,237,221,187,183, 98,197,138, 21,195, 1,108,118,161, 92,150, 24,185,178, 90, +173,200,205,205,181,153, 86, 69,118,118, 54, 7, 23,198,104,201,178,252, 56, 0,126,202,148, 41,160,148,222, 46,188, 82,176, 71, + 26,115,115,115,145,155,155, 43, 75,146,148, 53,106,212, 40,227,142, 29, 59,248,194,109,174,178,102,226,223,139,173,174, 15, 24, + 48,160, 72,116,104,231,206,157,232,221,187,247, 93,221, 82, 61,122,244,112, 89,115,200,144, 33, 69,162, 47, 10,133,194,105,244, +197, 29,227,226, 44,130, 85,220, 92,217,150,149, 53,215, 95,105,209, 38, 0,119, 45,115,199, 8, 62,251,236,179, 80, 42,149, 24, + 62,124, 56,148, 74, 37,222,124,243, 77, 8,130,128, 9, 19, 38, 64, 16, 4,180,104,209,194,229,188,219,210,185,113,227, 70,244, +236,217,211,158,158,176,176, 48,188,251,238,187, 80, 42,149,104,220,184, 49,148, 74, 37,218,182,109,235, 82, 58,109, 3,218, 27, + 53,106,132, 49, 99,198, 96,253,250,245,248,233,167,159,236,191, 15, 28, 56, 16, 3, 6, 12, 64,110,110, 46, 2, 3, 3, 21, 73, + 73, 73,103, 91,180,104,193, 6,190, 51, 42, 29,103, 30,164, 24,234,185,115,231,126, 76, 41,237, 93,146,134,237,119, 66,200,166, +168,168,168,222,133,186,119,125,119,136, 50, 57,154,183,134,142, 17, 40,219,118,142,255, 87,218,127, 23, 91, 63,181,136,193, 42, +204, 88,103,103,141,132, 82,169,180, 55,104, 37, 25, 45, 87, 40, 40, 40,104,108,139, 94, 21, 20, 20, 20, 49, 84,133, 39,110,251, +103,179,217,140, 26, 53,106,160,160,160,160,177,155, 78, 24, 65, 65, 65,176, 88, 44,248,246,219,111,237,198,202,134,197, 98, 41, +235, 32, 7,117,237,218,149,143,139,139, 67, 98, 98, 34,100, 89,198,161, 67,135, 32, 8, 2,140, 70, 35, 76, 38, 19,126,253,245, + 87,240, 60,143,171, 87,175, 66,163,209,160, 73,147, 38, 68,146, 36,159,146, 52, 3, 3, 3,117,109,218,180,169,191,120,241, 98, +175,211,167, 79, 55,159, 52,105,146,215,186,117,235, 54,134,135,135, 15,126,237,181,215,132, 17, 35, 70, 52,253,230,155,111, 82, +162,163,163,209,174, 93, 59,120,121,121,133, 87,164,160,154, 76,166, 34,251, 50, 59, 59, 27, 89, 89, 89,174,110,222, 12, 0,188, +188,188,170, 2, 72,182, 45,204,207,207, 71,126,126, 62,178,179,179,145,159,159, 15,163,209,104,209,233,116, 42,135,109,126, 96, + 77,196,191,223, 96,109,221,186,245,174,177, 76,187,118,237,186,107,204,143, 74,165,194,230,205,155, 93, 50, 4,127,254,249,103, +137, 99,133, 28,187,181,120,158, 47,115,204,144, 45,170,206,243, 60,126,254,249,103, 0,192,232,209,163,237,203, 28,219, 36,155, + 38, 0, 60,251,236,179,196,149,168, 88,199, 47,239,140, 45, 59,253,145,228,212, 96, 57,106,186,146,247, 95,127,253, 21,189,123, +247,198,166, 77,155, 74,125,239,222,189,187, 91,209, 59,224,255,135,111,220,184,113,195,169,238,226,197,139, 93,217,159,221,183, +110,221, 10, 47, 47, 47,123,183, 32, 0,244,238,221,251, 61, 15, 15,143, 14, 5, 5, 5,253, 54,109,218,132,204,204, 76,212,168, + 81, 3, 1, 1, 1, 56,114,228, 72,119, 86, 99, 24,247, 34,138, 85,220,131, 20,195, 56,113,226,196,201,132,144, 77, 19, 39, 78, +156, 28, 21, 21,117,182,112,187, 77,197,116, 54,149,241, 63, 54, 19,100,235, 30,108, 89,204,188,217,186, 14,123,149,178,173,185, +152,161, 42,222, 69,120,172,204, 8,150, 44,203, 69,204, 85,105, 6,203,149, 43, 48, 74, 41, 79, 8, 41, 98, 0, 74,138, 96,137, +162,136,244,244,116, 80, 74,249,202, 60,136,101, 25,172,244,244,244, 15,222,124,243,205,141,159,127,254,185,215,144, 33, 67,240, +207, 63,255,160,126,253,250, 48,153, 76,240,243,243, 67,108,108, 44,120,158,199,229,203,151, 17, 30, 30, 14,189, 94,143,169, 83, +167,230, 26,141,198,169, 37,105,222,186,117, 43, 63, 60, 60,124,255, 31,127,252,209,111,200,144, 33,252,218,181,107,107,142, 25, + 51,198,243,171,175,190, 74, 26, 60,120,112,248,224,193,131,249,111,190,249, 70, 17, 27, 27,139, 14, 29, 58,192,199,199, 71, 87, +222,252,229,229,229,221,101,174,108,223, 93,188,138, 16, 10, 67,181,246,219,146,108,230,215,246,202,206,206,134,201,100,162,162, + 40,114,119, 54,161, 2,107, 30,254,221,216, 12,193,160, 65,131,138,212,107,155,169,216,182,109, 27, 6, 12, 24, 0,149, 74, 5, +165, 82,137,200,200, 72, 87,202, 18, 4, 65,192,243,207, 63,111, 55, 42,127,252,241,135, 83,115,101, 27, 87,229,138,201,176,141, +227,122,237,181,215, 32, 8, 2,126,248,225, 7,188,254,250,235,224,121, 30, 75,150, 44, 1,199,113,152, 56,113,162, 93,179,176, + 93, 43, 51,157,130, 32,224,248,248,130, 59,145,160,217, 60,174, 70,221, 41,214, 33,161,161,119,234, 86,110,174,253,191, 93,221, +159, 47,189,244, 18,148, 74, 37,222,120,227, 13, 8,130,128,241,227,199, 67, 16, 4, 68, 70, 70, 66, 16, 4,116,234,212,201,229, +188, 59,166,243,224,193,131,246,207,117,235,214, 69,163, 70,141,160, 84, 42,209,166, 77, 27,168, 84, 42, 60,241,196, 19, 46,165, +211,182, 79,151, 45, 91, 6,173, 86, 11,141, 70, 99, 59, 86,109,198,141, 27,215,207,217,250, 13, 26, 52, 96, 21,134,241, 32, 34, + 88,166,168,168,168,179, 81, 81, 81, 78, 35, 84,197, 35, 73,165, 69,154, 28,140,213, 49, 20,118, 7, 78,156, 56,113, 50,238,140, +221, 58,230,194,182, 42,155,185, 42, 30,229,114,164,120, 4,107, 70,241, 70,162,248, 64, 87,103,159, 21, 10,133, 75, 6, 75,167, +211,157, 77, 75, 75,107,173, 86,171,237, 39,126,103,230, 42, 55, 55, 23, 60,207, 35, 37, 37, 5, 58,157,238,108,101, 30,196,178, +186, 8, 19, 18, 18,142,133,132,132,140, 24, 57,114,228, 56,179,217,220, 80,161, 80, 40, 77, 38,147,234,207, 63,255, 36,219,182, +109, 67,181,106,213, 48,118,236, 88,154,155,155,107, 33,132,152, 5, 65,136,205,203,203, 91, 26, 27, 27,187,170, 52,221,235,215, +175,191,104, 48, 24,102,220,184,113, 99,212,212,169, 83, 61,198,141, 27,231, 63,102,204,152,156,152,152, 24,244,232,209, 3,190, +190,190,118, 19,228,225,225,161,246,247,247,215,187, 51,157,132, 44,203,119,237, 67,199,125, 92, 56,246,172, 76, 56,142, 59, 73, + 41, 29,154,159,159,159,173,213,106, 53,217,217,217, 22,199, 8, 99,110,110, 46,242,242,242, 32, 73,146,226,214,173, 91, 9, 0, +234,113, 28,119,146, 53, 15,143,134,193,218,188,121,115,137,209, 38, 91,116,203,118, 65,181,109,219, 54,151, 34, 46, 27, 55,110, +188, 43, 42,230,248,114,115, 28,167,125,155,229,203,151, 3,128,253, 2,144,227, 56,140, 27, 55, 14, 26,141, 6, 11, 22, 44,192, +164, 73,147,236,219,165,165,165,185, 20,193,106,241,169,198,190,220, 22, 41,186,157,158, 14, 65, 16,224,233,225, 1,201,106,117, +107,127,150,245,178,229,221,157, 40, 99, 73, 81,192,242,104, 2,216,220,171, 87,175, 94, 85,170, 84,193,240,225,195,161,211,233, +208,191,127,127, 20, 20, 20, 12, 4,128,185,115,231,218,247,227,180,105,211, 48,125,250,116,228,231,231,155, 88,141, 97,220,163, + 8,214,140, 82, 86,169, 98, 51, 78,133,102,200, 85,221, 77,142,235,219, 52,138,155,162,194,136,216,190,178,180,156,109, 91, 18, + 10,155,115, 44,233,138,169, 44,115,101,123,185,114, 5,150,151,151,183,103,207,158, 61,145,207, 60,243,140,194,241,196, 95,220, +104, 21,246,247,227,234,213,171,214,188,188,188, 61,174, 52, 60,149, 21,193, 42, 52, 89,219, 0,216,207, 30,126,126,126, 63,231, +230,230,246, 12, 8, 8, 16,204,102, 51,178,178,178,174, 94,185,114,165,137,187, 5, 40, 41, 41,105,154,193, 96,168,213,165, 75, +151,190, 61,123,246, 68, 64, 64,128,242,236,217,179,232,217,179, 39,234,213,171,231,149,151,119,199, 79,233,245,122, 53,207,243, +126, 0,242, 92,205,147,179,136, 96, 94, 94, 30,178,178,178,144,159,159,239,114, 23, 33, 33,228, 32,165, 20, 31,127,252,113,246, +244,233,211, 35,178,179,179,243,178,178,178, 36,199,200, 88,126,126, 62,209,233,116,138,213,171, 87,123,218,182, 97,205,195,163, + 97,176, 92,121,185, 58,120,218, 49,130,229,104, 12,108,230, 64,165, 82, 97,221,186,117,197,199, 74,185,212, 69,248,227,143, 63, + 98,244,232,209, 80,171,213, 88,186,116,233, 93,227,178, 56,142,179,167,147, 16,226,244,238,183,226,154, 45,231,105,113,126, 58, +129, 82,169, 68,173,201,230,187,186, 8, 11, 47, 64,220, 74,231,119,223,125,231, 82, 23, 97,207,158, 61, 93,222,159, 45, 91,182, + 4, 0,124,254,249,231,120,230,153,103,112,230,204, 25,167,186, 95,127,253,117,153,233,140,142,142, 30,220,188,121,243,154, 86, +171, 53,166,113,227,198,138,155, 55,111, 98,192,128, 1, 88,183,110, 29, 10, 79,100,152, 56,113, 98,145,109,114,115,115,153,193, + 98, 84,122,244,202,133,213, 82,139,141,159, 34,142,221,117,165,188, 23, 95, 31, 14,203, 28,117, 83,113,231,102, 46, 56, 89, 94, +220, 84, 21,255, 15,199,117, 82,239,138, 96,185,210,232,150,102,182, 92, 49, 88,132,144,197,211,166, 77, 27,213,161, 67,135, 42, + 94, 94, 94, 72, 74, 74,114, 26,193,242,242,242,130,197, 98,193,158, 61,123,114, 8, 33,139,203,144,181,138,162,168, 8, 8, 8, + 64, 90, 90,154,211, 9,247,108, 13,163, 86,171, 69,110,110, 46, 0,184, 59, 57,166, 57, 39, 39, 71,124,254,249,231,133,197,139, + 23,195,104, 52,150,187,129, 33,132,108, 61,113,226, 68,159,167,158,122,138,132,135,135, 43,108,198, 71,173, 86, 43,108, 17, 44, +189, 94,175, 33,132,248, 2,184, 94,134,156, 47, 0,120,122,122, 38, 3,192,161, 67,135, 46, 56, 27,215, 54,121,242,228,122,133, + 39, 5, 95, 0,180, 12,115,121,214, 96, 48, 44,255,233,167,159,134,119,234,212,233, 80,211,166, 77,107,100,100,100,100,229,230, +230,154,243,243,243, 41,165, 84,161,211,233,132,253,251,247, 95,190,124,249,114,111, 0,203, 19, 18, 18,206,178, 38,226,223, 79, +101,154, 43, 71, 67, 80, 60,130, 85,252,189, 60,154,175,191,254, 58,190,251,238, 59,123,221,182,233, 44, 88,176, 0, 60,207,227, +163,143, 62,114,185,139,204,166,121,110, 26, 80,127, 58,197,157,225, 20,255, 31,193,242,244,242,186,179, 94, 9,109, 75,105,154, +111,191,253, 54,148, 74, 37, 26, 54,108, 8, 65, 16,208,186,117,107, 8,130,128,174, 93,187, 66, 16, 4,151,140,213, 93,233, 60, +119, 14, 74,165, 18,181,107,215,198,160, 65,131,208,186,117,107,116,232,208, 1, 74,165, 18,221,187,119, 7,207,243,232,217,179, +103,153,131,251, 29,218,198,207, 62,249,228, 19,133, 70,163,129,217,108, 70,126,126, 62,210,211,211, 81, 82, 4,203,104, 52,170, + 89,109, 97, 60, 0,142,221,103,221, 10,255,159,194,149, 10, 93,222,105, 26,138, 63,109,251,218,181,107,217, 6,131,225,229,231, +159,127,126,205,146, 37, 75,180, 53,107,214,196,197,139, 23,145,145,145, 1,139,197, 2,165, 82, 9,131,193,128,220,220, 92,252, +246,219,111,249, 70,163,241,229,164,164,164,236,210, 52, 9, 33, 51,159,126,250,233,105, 83,166, 76,225, 27, 52,104,128,140,140, + 12,228,230,230,218, 27, 23, 66, 8,188,188,188,160,211,233,112,230,204, 25, 28, 62,124, 88, 34,132,204, 44, 77,211,201,137, 39, + 62, 54, 54, 86, 94,180,104, 17, 10, 10, 10, 76, 86,171, 53,193, 5, 35,229, 84,147, 16,178, 59, 46, 46, 46, 23,128,167, 94,175, +151, 83, 82, 82, 10, 0,104,100, 89,150,210,210,210,204,184, 51,135, 7,229,157, 56,214,226,154,148, 82, 83,225,114, 21, 0,100, +102,102,222, 53,166, 45, 59, 59, 27,146, 36,169, 28,215, 47, 43,157,162, 40, 78, 16, 4,161,195,203, 47,191,220,182, 87,175, 94, +167,134, 14, 29, 90,224,227,227,227,199,243,188,241,234,213,171,183,215,173, 91,167,190,114,229, 74,111, 0,215, 68, 81,156,224, +106,222, 43, 24, 62,102,154,247, 80,211, 86,215,139, 71,166,221,137, 82,151,164,105, 27,135,228,248,178, 69,174,138,107, 22, 55, + 5, 37,105,242, 60,143,177, 99,199, 22,137,138, 77,158, 60,185,196,121,249, 76, 38, 19, 41,109,127,218,182,139,251, 84, 85,164, +251,205,152,159,239,116, 96,123, 89,233,180,105, 46, 90,180,168,220, 17,172,210,210,217,175, 95, 63, 36, 38, 38, 66, 16, 4, 28, + 57,114,164,196, 8,150, 43,233, 4, 80,176,117,235, 86,104, 52, 26,252,246,219,111,214,192,192, 64,133,143,143, 79,137, 17,172, +130,130, 2, 53,171, 71, 76,243, 94,104, 62,106,148,106,176,172, 86, 43, 66, 67, 67,237,230,137,227, 56,219,188, 50,224,121, 30, + 28,199,217, 6,145,186,252,135, 73, 73, 73, 59, 13, 6,195,243,253,251,247,255, 97,248,240,225, 30,245,234,213, 19,194,195,195, + 97, 52, 26, 17, 23, 23,135,184,184, 56,235,174, 93,187,114,140, 70,227,136,164,164,164,157,101,233, 37, 38, 38,206, 55, 24, 12, +155,135, 13, 27, 54,171,105,211,166, 61,199,141, 27,135, 26, 53,106, 32, 43, 43, 11, 85,170, 84, 65, 64, 64, 0, 98, 99, 99,241, +235,175,191, 34, 43, 43,107, 11,128, 41, 73, 73, 73,151,221,217, 73, 90,173,246,243, 79, 62,249,164, 99, 96, 96, 96,189,244,244, +244, 4,165, 82, 57,185,188, 59, 60, 49, 49, 49,229,175,191,254,250,223,208,161, 67, 3,246,238,221,155,194,113,156,105,240,224, +193, 97, 7, 15, 30, 76,225, 56,206, 52,100,200,144,176, 3, 7, 14,164, 36, 39, 39, 31,119, 67,214, 23, 0,158,126,250,233,219, +197, 27,127,135,200,149,203,164,166,166,230,213,170, 85,171,189,209,104,140,218,188,121,243,240, 18,238, 22, 91,174,213,106, 39, + 93,185,114, 37,143, 85,163, 71,164, 49, 80, 40,160, 82,169,202,101,174, 74,211,252,237,183,223,156, 70,174,138,107,186,218,142, +148,102, 4,157,153, 43, 87, 34, 57,238,228,221,213,116, 42, 20, 10, 76,154, 52, 9,130, 32,160, 85,171, 86, 16, 4, 1, 93,186, +116, 41, 18,185,114, 39,130,101,211,172, 83,231,206,163, 5,131,131,131,145,153,153,137, 46, 93,186,224,169,167,158,130, 66,161, + 40,151, 46,165,244,173, 77,155, 54, 89, 41,165, 58,142,227,222, 79, 74, 74, 58,107,139, 42, 58,139, 96, 49, 24,140, 10, 26, 44, + 65, 16, 82, 93,125,182,160, 13,149, 74,149,234,162,201,218, 81,171, 86,173,250,223,126,251,237, 27, 30, 30, 30, 93,140, 70, 99, +163, 66, 35,115, 38, 55, 55,119,183, 66,161,248, 42, 41, 41, 41,199,213,255, 45, 52, 76,131, 12, 6, 67,219, 97,195,134,205,106, +215,174, 93,235,215, 94,123, 13, 10,133, 2,107,215,174, 69, 98, 98,226,145, 66, 99,117,168, 60, 59,233,218,181,107,217, 40,253, +246, 81,119, 26, 51, 43,128,142,149,121, 16, 29, 34, 89,165,254,238, 14, 87,174, 92,201, 1,240, 70, 80, 80,208,151, 60,207,183, +151, 36,169, 25, 0,240, 60,127, 66,146,164, 3,201,201,201, 23, 89,245,121,116,144,101, 25,254,254,254, 69, 46,154,108,211, 30, +148,215, 92,201,178,140,128,128, 0,251,120, 40,219, 69, 89, 25, 55,197, 16, 87,210, 73, 8, 41,162, 91,154, 38,165,148,154,205, +102, 82,154,102, 96, 96,160, 61,159,149,145, 78, 73,146,236,154,182,180,242, 60,111,215, 46,239,254, 12, 12, 12,180, 13,115,168, +148,116, 2, 64,116,116,116, 58,128, 97,182,239,145,145,145,155, 47, 94,188,216,171,164, 8, 22,131,193,168,160,193, 58,124,248, +112,196,189,252,227,194, 19,120, 84,225,171, 82, 40, 52, 80, 93, 13, 6, 67,239,131, 7, 15,218,186,174, 62, 73, 74, 74,218,244, + 95, 56,152,148, 82, 93,101,107, 22, 26, 41,102,166, 30, 97, 4, 65, 72,125,250,233,167,253,221,221,174,180, 11, 42, 65, 16, 82, +187,119,239,238,182,166, 90,173, 78, 41, 69,243,102,143, 30, 61, 66,202,145,206,204,224,224, 96,169,178, 46, 36, 93, 72,103,185, + 52,203,218,159,149,157,206, 82, 12,215, 96,131,193,112,208,207,207,175,166,201,100, 82, 26,141, 70,165, 99, 20, 80,171,213,166, +177, 90,195, 96, 84,192, 96,253,155, 41, 52, 84,155,216,225,101, 48,202,230, 94, 92, 76,221, 11,205,131, 7, 15,214,249,175,230, +253, 94, 95,240, 58,105, 67,219,177,154,193, 96, 84, 12,142,237, 2, 6,131,193, 96, 48, 24,140,202,133, 0,104,228,236, 7,119, +238, 14, 32,132, 52,114,247,143,203,210,103,154, 76,147,105, 50, 77,166,201, 52,153,230,163,167, 89,150,246,163,114,119, 34,113, +117,174,148,114,137,179, 91, 88,153, 38,211,100,154, 76,147,105, 50, 77,166,249, 31,132,117, 17, 50, 24, 12, 6,131,193, 96, 48, +131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, + 6,131,193, 96, 48, 30, 26,238,233, 93,132, 12, 6,131,193, 96, 48, 24,255, 69,236, 17, 44, 66,200, 94, 66,200, 94,182, 75, 24, + 12, 6,131,193, 96,220, 79, 30, 69, 15,162, 40,204, 24, 69, 37, 61,204,152,193, 96, 48, 24, 12, 6,195, 13,115,245, 72,122, 16, + 66, 41, 5, 33,132, 82, 74, 9, 59,204, 12, 6,131,193, 96, 48,238,183,193,122, 20, 61, 8, 27,228,206, 96, 48, 24, 12, 6,131, +113,143, 12,214, 12, 54, 6,139,193, 96, 48, 24, 12,198, 3,224,145,244, 32,246,187, 8, 9, 33,157, 0,128, 82,202, 76, 22,131, +193, 96, 48, 24,140,251,103, 70, 30, 65, 15,194,166,105, 96, 48, 24, 12, 6,131,193,168,100,238,233, 24, 44, 66, 72, 35,166,201, + 52,153, 38,211,100,154, 76,147,105, 50, 77,102,176, 24, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131, +197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24,140, 7, 4, 1,224,244, + 78, 0, 74,233, 25,151, 69,202,113, 55, 65, 89,250, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,244, 52,203,210,118,199,127, + 60,212, 6,203,149,121,176, 72,225,131,130,220, 22, 39,164, 81,101,239,168,210, 52, 9, 33,164,240,224,208,202, 76,103,121,242, +127,191,243,206, 52,153, 38,211,100,154, 76,147,105,254,155, 53, 31, 53, 20,101,236, 64, 14,119,186, 17, 9, 33, 68, 6, 32,211, + 74,152,153,212, 65, 23, 0,228, 66, 79, 68, 43,160, 71, 0,240,182,252, 16, 66,172, 0,164,138,166,245, 94,229,255, 95,225,188, +239,236, 83,242,255, 23, 20,108, 70, 90, 6,131,193, 96, 48, 42,100,176, 8, 33,164,126,253,250, 66,251,246,237,143,250,248,248, +212,118,252,173, 79,159, 62, 0, 0,139,197, 34,109,219,182,205,211,221, 63,108,208,160,129,178, 52, 93, 73,146,164, 45, 91,182, +184,172, 75, 8, 33,225,225,225,170,144,144,144, 35,222,222,222,181,156,105,202,178, 44,109,222,188,217, 45,205,178,242,239,110, + 58,255,101,230, 74, 81,187,118,237,129, 58,157, 78,107, 91,214,172, 89, 51,199,223,105, 76, 76,204,143,172,250, 48, 24, 15,158, +176,176,176, 81, 0,112,227,198,141,101,238,110,219,185,115,103, 69, 89, 23,218, 78,176,238,217,179,199,202,246, 60,131, 81, 14, +131, 85,179,102, 77,165,191,191,255,190,176,176,176, 90,223,125,247, 29, 78,157, 58,133,230,205,155, 67, 20, 69, 88,173, 86,200, +178,140,231,158,123,142, 47,143,185,242,247,247,223,111,211,189,117,235, 22,180, 90,251, 57, 28,146, 36, 97,196,136, 17, 46,235, +218,204, 85, 68, 68,196,190,240,240,240,154,223,126,251, 45, 46, 93,186,132,234,213,171, 67,161, 80,192, 98,177, 32, 47, 47, 15, +175,189,246,154, 91,105, 45, 41,255,178, 44, 67, 20, 69, 72,146,132, 33, 67,134,184,165,217,186,117,235, 75, 86,171, 53,196,157, +109, 84, 42, 85,194,193,131, 7,235,148,244,123,219,182,109, 47, 89, 44, 22,183, 52,213,106,117,194,129, 3, 7,234,148,102,174, +106,213,170,245,108,195,134, 13, 53,107,215,174, 69, 98, 98, 34,180, 90, 45,100, 89,134, 36, 73, 16, 69, 17,207, 60,243, 12, 97, + 85,135,193,120,240,212,170, 85, 75, 69, 41,157, 66, 8, 65,173, 90,181,150, 95,185,114,197,236,206,246, 70,163,241, 26,165,212, +167,132,182,192,233, 54, 60,207,103, 2, 8, 43,163,109, 14, 7,208, 83,161, 80,212, 84, 40, 20,117, 40,165, 97, 86,171, 53,160, +176, 93, 75,225,121,254,134,197, 98,185,100, 54,155,175, 2,216, 66, 41,189,206,142, 38,227,145, 55, 88,132, 16,174,115,231,206, + 91, 66, 67, 67, 27,124,247,221,119,132,231,121, 28, 60,120, 16,137,137,137, 8, 10, 10,130,167,167, 39, 52, 26, 77,121,162, 34, + 92,231,206,157,255,114,212,221,180,105, 19,130,131,131, 17, 24, 24, 8, 15, 15,143,242,232,242,225,225,225,127,133,133,133,213, +255,246,219,111,237,105,205,201,201,129,183,183, 55,242,242,242,144,146,146, 82,158,116, 86,122,254,101, 89,174,182,107,215, 46, +120,122,122, 66,146, 36, 80, 74, 33,203, 50, 40,165,246, 87,145, 75, 68,171, 21,221,186,117,171, 86,234,101,164,213, 90,109,223, +190,125,118, 3,228,168, 37, 73, 18, 84, 42, 21, 56,142,179,155, 87,139,197,130, 78,157, 58, 85, 43,205,176,214,174, 93,123,160, +205, 92,241, 60,143, 53,107,214, 32, 48, 48, 16,190,190,190, 68,167,211,145, 66, 67, 76,203, 59, 46,143,193, 96, 84, 30,102,179, +249,185,113,227,198,105, 11, 10, 10,240,245,215, 95, 63, 7, 96,185, 59,219, 75,146,228,183,127,255,254, 34, 23,186,101,172,143, + 86,173, 90,249,149,209,134,118,247,243,243,251,185,109,219,182,130,191,191, 63,175,213,106,161,215,235,225,227,227, 3,141, 70, + 3, 89,150,195,172, 86,107,152,201,100,122, 60, 37, 37, 69, 90,191,126,253, 76, 66,200, 11,148,210,109,236,136, 50, 30, 89,131, + 85, 56,238,134,211,235,245,109,190,255,254,123,240,252,157, 32,141, 82,169,132, 70,163,129, 86,171,133, 70,163,129, 70,163,129, + 36, 73,232,211,167, 79,190,227,246, 37,117, 27,150,166,171,213,106,139,232, 2, 40,162,107, 54,155,165,191,255,254,187, 36, 77, +133,135,135, 71,171,239,190,251,206,174, 41, 73, 18, 50, 51, 51, 97,177, 88,144,147,147,131,212,212, 84,119,204,149,203,249, 47, + 15, 58,157, 14, 27, 55,110,132, 66,161,128, 32, 8, 80, 42,149,246,119,219,103,219,119,127,127,127, 87, 35, 82, 56,120,240, 32, + 56,142,179,111, 47, 8, 2, 54,111,222,140,247,222,123, 15,183,110,221,178,255,166,215,235,203,220, 5, 58,157, 78,107, 51, 87, +182,188,139,162,168, 92,176, 96,193, 84, 15, 15, 15, 47, 0, 8, 14, 14, 70,112,112,240,162,242,118,193, 50, 24,140,202,193,203, +203,235,195, 81,163, 70,169, 86,174, 92, 9, 65, 16, 38,185,107,176, 0, 64,171,213, 98,219,182,109,246,118, 73, 16, 4,240, 60, + 15,149, 74, 5, 65, 16,138, 44, 15, 9, 9,113,165, 77,250,104,221,186,117,234,213,171, 87,227,202,149, 43, 40,140, 90, 65,175, +215,195,203,203, 11, 62, 62, 62,240,245,245,133,159,159, 31,154, 53,107,198,191,250,234,171,124,135, 14, 29, 62, 2,192, 12, 22, +227,209,142, 96,161,112, 96,243,169, 83,167,112,240,224, 65,251,201,222,199,199,167,136,193, 24, 60,120, 48, 94,124,241, 69,152, + 76, 38,152,205,102, 88,173, 86,188,252,242,203, 69,186,205,156,221, 97,144,150,150,134,141, 27, 55, 66,165, 82,193,207,207,207, + 30, 17,178,189, 58,119,238,140,119,223,125, 23,148, 82,100,100,100,148,165, 73, 0,224,242,229,203, 56,112,224, 0,172, 86, 43, +180, 90, 45, 68, 81,196,173, 91,183,112,238,220, 57,196,197,197, 33, 47, 47, 15, 61,122,244,248, 90, 16,132, 89,127,252,241, 71, +114,241, 52, 57,211, 44, 43,255,101,225, 44,239,146, 36,161,127,255,254, 32,132,128,231,121, 40, 20,138, 34,141,151,227,231,211, +167, 79,187,164, 41,203, 50, 58,116,232, 0, 0,208,235,245,240,240,240,192,238,221,187,237,191, 55,111,222, 28,102,179, 25,254, +254,254, 56,115,230,140, 75,154,201,201,201,248,249,231,159,109,198, 79,185,102,205,154,233, 53,107,214,212, 47, 93,186, 20, 9, + 9, 9,208,233,116,144,101, 25,178, 44,195, 98,177,224,173,183,222, 42,243,184, 87, 20,166,201, 52,153,102, 81, 12, 6,195, 19, + 31,125,244,145, 79, 94, 94, 30,242,243,243, 81,173, 90, 53, 15,131,193,240, 68, 82, 82,210, 78,119, 53, 21, 10, 5, 36, 73,194, +214,173, 91, 17, 27, 27,139,157, 59,119,162,160,160, 0, 85,171, 86,133,143,143, 15,218,180,105,131, 17, 35, 70, 56, 53, 88,197, + 53, 37, 73,250,153, 16,210,100,232,208,161,100,203,150, 45, 72, 75, 75, 67, 78, 78, 14, 44, 22, 11, 44, 22, 11, 4, 65,128, 78, +167,131, 94,175,135,193, 96, 0,199,113,180,160,160,224,103,118,220,153,102, 25,180, 4,224, 24,121, 48, 3, 80, 57,188,167, 2, + 56,230,100, 61,219,114, 1, 64,211,194,223, 36, 0, 57, 0,124,156,232,149,164,147, 6,128, 58, 44,179,173, 95,252,127,138, 26, + 44, 66,136,173,171,167, 51,128,127,108, 39,230,164,164, 36,168,213,106,248,248,248,160,101,203,150, 0,128,220,220, 92,168, 84, + 42,108,216,176, 1, 10,133, 2, 30, 30, 30,208,235,245,165, 70, 71, 40,165,180,240, 46, 60,232,245,122,132,132,132, 64,163,209, +160,107,215,174,184,122,245, 42,170, 87,175,110,215, 61,117,234, 20,126,254,249,103,120,121,121,193,219,219,187, 44, 77, 17, 0, +106,212,168,129,204,204, 76,100,101,101, 65, 20, 69, 28, 59,118, 12,221,187,119, 71,207,158, 61,161,211,233,144,150,150,134,227, +199,143,247,152, 59,119,238, 51,189,122,245,122,105,243,230,205,127,151,149,206,226,249,119, 52, 88, 42,149,170, 92,165, 67,150, +101,108,221,186,181, 72,164,170,120, 4,203,246, 94,210,248, 7,103,154, 71,142, 28,177,155, 51,133, 66, 97,143, 62, 17, 66,112, +246,236, 89,112, 28, 7,165, 82,233, 82,157, 1, 0, 15, 15, 15, 4, 6, 6, 66,169, 84,146,111,190,249,102,106,173, 90,181,244, + 75,151, 46, 37,182, 46,195,160,160, 32, 4, 4, 4, 64,175,215,151, 59,154,199, 96, 48, 92, 39, 44, 44, 44,134, 16, 18,164,215, +235,137, 78,167, 3, 0, 68, 68, 68,112,195,134, 13,211, 28, 63,126, 28,190,190,190,232,219,183,175,215,234,213,171, 87,183,107, +215, 78, 38,132, 32, 55, 55, 23,102,179,153, 18, 66,146, 47, 94,188,216,188, 52,125,158,231, 49,110,220, 56, 76,156, 56, 17,131, + 6, 13,194,206,157, 59, 49, 97,194, 4,140, 24, 49,162,200, 5,160, 43,136,162,248,195,176, 97,195, 94, 89,183,110,221, 99,227, +198,141,227, 10,163, 90,208,233,116, 32,132,192,100, 50,193,104, 52,162,160,160, 0, 23, 47, 94,148, 95,125,245,213,255,153,205, +230, 31,216, 81,254,239,226,232, 65, 40,165,123, 75, 88,205,159, 16,178,201,225,124,221,155, 16,178,201,241,189,164,245, 10, 63, +118,156, 52,105, 82,139,185,115,231,126,220,182,109,219, 53, 7, 15, 30, 92, 93,146, 94, 73, 58,147, 38, 77,106, 56,119,238,220, +143, 29,215,119,242, 63,119, 71,176,238,120, 11, 66,225, 48,187,123, 80, 80,144,189,107, 44, 37, 37, 5, 90,173, 22, 30, 30, 30, +144,101, 25, 30, 30, 30,240,244,244,132,135,135, 7,108,125,236,174,156,188, 1, 32, 48, 48, 16, 26,141, 6, 63,255,252, 51,106, +214,172,137,191,254,250, 11,106,181, 26, 60,207, 67,167,211,193,195,195,195,254, 42, 3,201,214, 56,120,123,123,195,106,181, 98, +231,206,157, 24, 55,110, 28,100, 89,198,149, 43, 87,240,245,215, 95,227,157,119,222, 65,147, 38, 77,252,190,255,254,251, 91, 35, + 70,140, 88, 49, 96,192,128,230,191,255,254,123, 98, 73,158,197, 89,254,117, 58, 29,180, 90,173, 61,157,229, 53, 88,253,251,247, + 7,207,243, 78,163, 86,142, 38,107,255,254,253, 46,107,182,105,211, 6, 58,157,206,126, 60,254,250,235, 47,251,239,173, 90,181, + 2,165, 20,254,254,254,248,231,159,127,202,186, 34,161,205,154, 53,131, 44,203,168, 90,181, 42, 81, 40, 20,196,211,211,211,107, +233,210,165,246, 60,171, 84, 42,123, 20, 79,173, 86, 67,173, 86,179,214,129,193,184,247, 39, 32,159, 46, 93,186,120,126,253,245, +215, 69, 46,240,114,114,114,112,251,246,109, 84,169, 82, 5,193,193,193, 24, 55,110,156,206, 86, 87, 11, 10, 10,176,107,215, 46, +188,255,254,251, 5,101,233, 27,141, 70, 88, 44, 22,132,135,135, 35, 58, 58, 26,121,121,121,120,226,137, 39,238,138,182,187, 24, +217, 48, 19, 66,186,246,233,211,103,255,130, 5, 11,106, 52,104,208,128,228,229,229,193, 22,105,179,125, 62,115,230, 12, 93,189, +122,117,108,126,126,126, 23, 74,169,153, 29,229,255, 54, 14, 30,132,148,177, 94,111, 23,245,108,235,221, 42,124, 87,207,157, 59, +247,227,226,219,151,165,231,248,123,177,237,205,197, 76,217,173, 18, 13,150,227, 73,182, 79,159, 62,144, 36, 9, 94, 94, 94, 80, +171,213,208,104, 52,168, 90,181,106,145,245,108, 39,115, 91,168,183, 44,131,101,211,149,101, 25,158,158,158,168, 93,251,255,103, + 63,232,209,163,135,221, 44,216, 12,150, 77,223, 21, 77,139,197,130,220,220, 92, 36, 37, 37,161,123,247,238,160,148,226,242,229, +203, 80, 42,149,248,254,251,239,241,246,219,111,163,160,160, 0, 30, 30, 30,129,195,135, 15,191,182,118,237,218, 79, 1, 60, 95, +154, 38,128, 34,249,183,153, 9, 91,227,165, 80, 40,138,140, 21, 83, 40, 20,169,235,215,175,143, 40, 35,189,216,182,109, 91,153, + 17, 44,165, 82,105, 31,156,238, 66, 33, 66, 76, 76,204, 93,227, 39,108, 17,176,147, 39, 79,218, 27, 72, 87,163, 98,146, 36,193, +195,195,195,158,215,155, 55,111, 98,229,202,149, 80,169, 84,168, 82,165, 74,145,110, 93,102,176, 24,140,123,143, 36, 73, 79,237, +221,187,119,219,248,241,227,253, 90,180,104,161,112,108,143,170, 84,169, 98,175,139,177,177,177,246,207,219,182,109,179,126,252, +241,199,105,249,249,249, 79,151,165,239,235,235,139, 85,171, 86, 65, 16, 4,108,218,180, 9, 94, 94, 94, 24, 48, 96, 0,188,188, +188, 48,126,252,120, 12, 25, 50, 4,130, 32,184,115,178,204, 38,132, 60,241,238,187,239,238,255,244,211, 79, 67,195,194,194, 96, +177, 88, 96, 54,155, 97,177, 88,112,245,234, 85,172, 89,179, 38, 33, 63, 63,255, 9, 74,105, 54, 59,194, 12, 55, 46, 54, 54,185, + 98,178, 28,214,139,182, 93, 71, 76,156, 56,113, 50, 33,100,211,196,137, 19, 39, 71, 69, 69,157,117, 69,175,132,223, 55, 23,190, +247,114, 88, 22, 93,166,193,114, 60,201,218, 42,106,213,170, 85, 33,138, 34,120,158,183,159,248,191,250,234, 43,124,245,213, 87, +246,245,179,178,178, 92,218, 57, 28,199, 65,163,209,216,186,237,208,163, 71, 15,236,222,189, 27,157, 58,117, 2, 0,119, 35, 88, +246,171,175,212,212, 84,196,196,196,160, 87,175, 94,136,139,139,131, 74,165,178, 27, 21,133, 66, 1,165, 82, 9, 66, 8,158,122, +234, 41,252,240,195, 15,237, 92, 49, 25,142,198,170,120,228, 42, 60, 60, 28, 11, 22, 44,176,127,239,211,167, 79,153,163,210,101, + 89,198,179,207, 62, 91,196, 12, 21, 55, 88,182,116,111,222,188,217,101,131,213,169, 83, 39,251,254,242,244,244,196,250,245,235, +237,191,119,236,216, 17,132, 16, 4, 4, 4, 96,211,166, 77, 46, 71,197,180, 90, 45,181,117, 43,234,245,122,123, 52,207,211,211, + 19, 94, 94, 94, 44,130,197, 96,220, 71, 18, 18, 18,174, 24, 12,134, 86, 91,182,108,217,150,153,153, 25, 62,104,208, 32,141,227, +152,208,226,175,133, 11, 23, 22,172, 89,179,230, 90, 78, 78, 78,143,196,196,196,219,101,233,219,218,164,220,220, 92,236,217,179, + 7,191,252,242, 11, 90,180,104, 81,164,157,114, 55,114, 79, 41, 77, 35,132,116, 27, 63,126,252,158, 89,179,102, 5,249,249,249, +193, 98,177,224,250,245,235,248,241,199, 31,147,243,242,242,186, 81, 74,211,216,209,101,184, 89,174,108,209,162, 64, 39, 63,247, +114, 18,121,106,137, 59, 99,163, 76, 81, 81, 81,103,163,162,162,122, 19, 66, 54, 69, 69, 69,245, 46, 37,130,213,171,140, 8, 87, + 47,220, 25,115, 85,122,189,114,112,105, 20,119,198, 96,217, 79,220,182, 19,168, 40,138,119, 93,189,124,252,241,199,232,223,191, + 63,244,122, 61,130,131,131, 93,233, 34,180, 19, 18, 18,130,220,220, 92,244,232,209, 3,178, 44,131,227, 56,200,178,124,151,193, +242,244,116,237,198,180,156,156, 28,220,186,117, 11,215,175, 95,135, 82,169,132, 36, 73, 24, 60,120, 48,226,226,226,224,237,237, + 13,181, 90,109, 55, 46,158,158,158, 1, 22,139, 69,215,163, 71, 15,213, 95,127,253,101, 46,205,100,148,100,174, 0, 64,163,209, + 96,207,158, 61,110,221, 85, 72, 41,197,230,205,155, 75, 29,123,101,123,119,117, 6, 4, 74, 41, 14, 29, 58,116, 87, 4,171,240, +152,218,127,179, 13, 98,117, 21, 71,243, 36,203, 50, 2, 2, 2,236,121,181, 53,236,204, 96, 49, 24,247,143,164,164,164,244,144, +144,144, 14,135, 15, 31,222,221,175, 95,191, 70,117,234,212,129, 36, 73,246,161, 11,182,250,185,125,251,118,252,252,243,207,255, +179, 90,173,157, 19, 19, 19, 93,234,122,179, 88, 44, 80, 42,149,248,227,143, 63,208,178,101, 75, 68, 70, 70,218,219, 13,219,184, + 78, 87,187, 8,139,181, 79,137,132,144,167, 23, 45, 90,180,119,193,130, 5, 62,185,185,185,248,241,199, 31,179,115,114,114,158, +166,148, 38,178,163,202, 40,201,131,148, 65,116,177,232, 17,108,227,161,108,134,168,248,119, 0, 85,108,203, 38, 78,156, 56,217, +213,237, 28,191,219, 34, 96,165, 24,175,187, 13, 22,165,148, 56,201,172,125, 64, 55,207,243,118, 3,100,195,214,133,103, 48, 24, + 32, 73,146,203,221, 79,132, 16,228,229,229, 65,165, 82,217, 53, 29,181, 29,199, 18,185, 56, 48, 27, 89, 89, 89,246,249,174,110, +221,186, 5,157, 78,135,191,254,250,203,110, 96, 28, 95,162, 40,222, 82, 42,149, 85, 74, 51, 87,142, 38,202,150,127,103,191,217, +140,134,171,115,200, 80, 74,139, 92, 17,150,244,226, 56,206,101, 51, 36,203,178,189,241,227,121,222,254, 34,132,192,104, 52,150, +235,202,211,214,104, 11,130, 64,109,223,245,122,253, 93,221,165,204, 96, 49, 24,247, 61,146, 85, 80,183,110, 93,191,238,221,187, +195, 98,177,192,106,181,218,141,149,173, 13,142,140,140, 4, 33, 36,248,234,213,171, 46, 95, 81,173, 93,187, 22,215,174, 93,131, +197, 98,193,236,217,179,139,152, 43,199, 87, 57, 35, 14, 87,155, 55,111, 46, 63,253,244,211, 56,116,232, 16, 52, 26,141, 72, 41, +189,202,142, 38,195,161,140,184, 98, 32,210,138,141,117,178,125, 55, 23, 51, 59,197,191, 23, 95, 31, 0, 82, 0,240,101,108, 87, +252,123, 90, 84, 84,212, 30, 91,228,171, 80,151, 47,105,252, 85,145, 8, 86,177,147,182, 52,112,224,192, 34,103,101, 65, 16,240, +242,203, 47,227,194,133, 11,208,235,245,240,247,247,119,219, 92, 81, 74, 37,199, 25,224,121,158, 71,175, 94,189,112,227,198, 13, +251, 88, 46, 63, 63, 63,119, 39, 29,149,166, 79,159,206, 3,119, 38,231,220,179,103, 15,158,122,234, 41,152,205,102,167, 6,107, +253,250,245,178, 78,167, 59, 92,134,105,145, 6, 12, 24,224,212,149, 8,130,128, 38, 77,154,192,215,215,183,200, 28, 94,174,226, +138,185,114, 23,155,169,114, 52, 89, 99,198,140,177,127,119,245,248, 0,128, 82,169,164,189,122,245,178,111, 16, 28, 28,108,143, +102, 58, 51, 87,204, 96, 49, 24,247,143,208,208,208, 22,253,250,245,211,107,181, 90, 16, 66,144,147,147,131,215, 95,127, 61,135, +227, 56, 44, 92,184,208, 51, 32, 32, 0,126,126,126,104,223,190,189, 50, 63, 63,255, 25, 0,191,186, 18,189,122,237,181,215,156, +222, 45,104,155,184,216,246, 20, 11, 87, 47,122,157, 93, 92, 50, 24, 21,228,104, 25,223,221,221,254,158,227,212, 96, 57,155, 52, +178, 79,159, 62,249,157, 58,117,194, 99,143, 61,102, 31,147, 99, 59,185, 23,143, 66, 57, 68,171,138, 60,109,123,211,166, 77,158, +197, 53, 7, 12, 24,128, 51,103,206,192,219,219, 27,222,222,222,240,242,242,130,237, 54,228, 18, 34, 96, 69, 52,255,252,243, 79, +187,230,160, 65,131, 2,191,255,254,251,147,173, 90,181,202,174, 82,165, 74,136,109,236,149,173,219,237,246,237,219,151,151, 44, + 89, 98,240,243,243,235, 95,154,102,105,147,102,246,233,211, 39,127,202,148, 41, 56,119,238, 92,169, 17,172,146,158, 52,190,104, +209, 34, 44, 59,112, 0,163,218,183, 47,245,192,124,249,229,151, 46,105, 82, 74,241,217,103,159, 85,154,230,145, 35, 71,126, 44, +150,223,197, 0,236,221,172,142,198,202,113,166,120, 87,242, 94, 17,152, 38,211,100,154,128,151,151,215,152,209,163, 71,123, 80, + 74,241,253,247,223, 91,190,250,234,171,124,179,217, 60, 14,128,178, 75,151, 46,159, 78,155, 54, 77, 63,104,208, 32,254,141, 55, +222,240, 56,114,228,200,196,226, 6,203,153,102, 65, 65, 1, 22, 47, 94,236, 82, 27,178,108,217,178,114,229,221,241,252,224,138, +217, 98,199,253,191,169,249,168,161,112,115,135,218,231,189,114,102,168,202, 67,126,126,126,145, 65,237,174, 14,108,119,198,186, +117,235,110,245,234,213,107,248,168, 81,163, 86, 12, 25, 50, 36,238,153,103,158,129, 94,175,247, 55,153, 76, 41,191,254,250,171, +180,116,233, 82,131,175,175,239, 27,127,254,249,103, 92, 69,211,173,211,233,138,116, 19,186, 16,185,186,113,245,234,213,136,249, +243,231,115,121, 0, 62,231, 56,112, 28,103,191,113,160,184, 81,217,189,123,183, 85,165, 82,149,154, 78,149, 74,101,215,204, 39, + 4,159, 19, 98,215,178,105,187,171,233, 52, 68, 40, 73, 69, 76,149,237,189,188,211, 85, 48, 24,140,242, 33, 73,210,147,102,179, +153, 12, 28, 56, 48,239,242,229,203,219, 76, 38,211,216,184,184,184, 44, 0, 8, 15, 15,223, 53,123,246,236,229,191,253,246, 91, +227,197,139, 23,123, 88,173,214,160,178,244,212,106,117,220,222,189,123, 67,103,206,156,201,167,113, 28,162, 28,134, 25,216, 94, +142,109,211,238,221,187, 37,173, 86, 27, 95,145, 60,176,104, 22,131, 25,172,187,175, 64,164,178, 30,240,172, 84, 42, 37, 55, 27, + 11,105,204,152, 49,124, 25,198,196, 45,205,205,155, 55,255, 61, 96,192,128,230,155, 54,109,250,120,237,218,181, 29, 76, 38,147, + 86,165, 82,121,106, 52,154, 35,254,254,254, 3, 54,108,216,112,173, 66, 59, 76,161, 72,117,118,199,160, 82,169, 76, 45, 35,175, +221,222,121,231,157, 93, 38,147, 41,194,149,255,209,106,181,137,121,121,121,221, 74, 91, 71, 20,197,110, 99,199,142,173, 84, 77, + 39,166, 90, 26, 53,106, 84,169,199,200,195,195, 67, 98, 85,137,193,184, 47,164, 12, 27, 54, 44, 59, 35, 35, 99,116,114,114,114, +145,137,237,174, 95,191,126, 19,192, 83,213,171, 87,127,177, 83,167, 78,115, 56,142, 43,243, 46, 39,171,213,218,245,179,207, 62, +219, 97,177, 88,194, 92,249,115,149, 74,117,195, 98,177,116,115, 55,209,178, 44,147,228,228,100,204,155, 55, 47, 47, 61, 61,253, + 32, 59,140,140,255, 2,228, 94, 94, 77, 60, 12, 97,201,178,238, 22,124, 88,210,201, 52,153, 38,211,100,154,143,170,166,175,175, +239,102, 0,255,203,200,200,248,156, 82,154,192,246, 39,211,252, 47,160,120,212, 51,232,202,221,130, 12, 6,131,193,184,119,220, +190,125,187, 23,219, 11,140,255, 26, 28,219, 5, 12, 6,131,193, 96, 48, 24,149, 11, 1,208,200,217, 15,238,132,254, 8, 33,141, +220,253,227,178,244,153, 38,211,100,154, 76,147,105, 50, 77,166,249,232,105,150,165,253,168,116, 61, 62,242, 99,176,152, 38,211, +100,154, 76,147,105, 50, 77,166,201,198, 96,221,111, 88, 23, 33,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24, +204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,227,161,129,176, +231, 66, 49, 24, 12, 6,131,193, 96, 84, 46, 44,130,197, 96, 48, 24, 12, 6,131, 81,201, 40, 0,128, 16, 98, 15, 99, 81, 74, 9, +219, 45, 12, 6,131,193, 96, 48,238, 7,143,170, 7, 81, 48, 99,197, 96, 48, 24, 12, 6,227, 65,242, 40,122, 16,206,153,131,100, + 48, 24, 12, 6,131,193,184, 95, 60,138, 30,132,123,148,221, 35,131,193, 96, 48, 24,140,135,159, 71, 62,130,197,162, 88, 12, 6, +131,193, 96, 48,238, 55,143,162, 7, 97,211, 52, 48, 24, 12, 6,131,193, 96, 84, 50,247,116,154, 6, 66, 72, 35,166,201, 52,153, + 38,211,100,154, 76,147,105, 50, 77,102,176, 24, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, + 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24,140, 7, 4, 1,224,244, 78, 0, + 74,233, 25,151, 69,202,113, 55, 65, 89,250, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,244, 52,203,210,118,199,127, 60,212, + 6,235, 94,206,131, 69, 8,105, 84,217, 59,138,105, 50, 77,166,201, 52,153, 38,211,100,154,143,158,230,163, 6,235, 34,100, 48, + 24, 12, 6,131,193,168,100, 20,108, 23, 48, 24,174, 17, 25, 25,169, 85,171,213, 79,236,222,189, 91,121,254,252,121, 28, 61,122, +148,174, 90,181, 74, 52,153, 76, 59,163,163,163,141,108, 15, 61, 26, 52,109,218,180, 27,207,243,239, 1,128, 36, 73,243, 79,158, + 60,185,163, 2, 87,249,164,102,205,154,175,171,213,234,238,130, 32, 4, 73,146, 68, 76, 38, 83,114,126,126,254,206,164,164,164, + 69,148, 82,185, 28,154,145,126,126,126,175, 54,106,212,168,214,213,171, 87, 19,226,227,227,215, 0,216, 1,160, 91,104,104,232, +115, 53,107,214, 12, 57,115,230,204,149,244,244,244,239, 40,165,209, 15, 42,157, 12, 6, 51, 88,174, 85, 62,206,203,203,171,139, + 32, 8, 35,141, 70, 99, 83,141, 70,115,150,227,184,239,210,210,210,182,177,138,247,232, 66, 8,225,131,130,130,186, 6, 4, 4, +140,205,206,206,110,237,227,227,115,252,246,237,219, 11,175, 95,191,190,131, 82, 42,149, 83,147,211,233,116,157, 21, 10,197, 43, +102,179, 57, 82,173, 86,159,150,101,249,251,156,156,156,237, 15,178, 44,181,111,223,254,180,213,106, 13, 46,109, 29,149, 74, 37, +236,218,181,139, 95,191,126, 61,253,249,231,159,111, 63,247,220,115,250, 17, 35, 70, 40,150, 47, 95,190, 12,192,248,226,235,183, +105,211, 38, 78, 20, 69,127, 87,254, 95, 16,132,212,195,135, 15, 71,176, 82,247,224,225,121,254,189, 17,115,247,180,151, 41,176, +124, 82,103, 20,154,151,114,209,188,121,243,111,251,245,235,247,108,157, 58,117, 20,178, 44, 67, 20, 69,152, 76,166,199, 98, 98, + 98, 30,223,182,109, 91,115, 0,195,220,172, 63, 61, 38, 78,156,248,213,204,153, 51,171, 10,130, 64, 68, 81,108,245,203, 47,191, + 60, 53,102,204,152,211, 95,127,253,117,227, 33, 67,134,120,216,150, 79,155, 54,237, 41, 66,200, 4, 74,233,186,251,157, 78, 6, +131, 81,134,193,242,242,242,170,165,213,106, 71,121,122,122,118,175, 93,187,118,226,136, 17, 35,142, 89, 44,150,255,241, 60, 79, + 87,172, 88,241,182,217,108,254, 44, 56, 56,120,187,201,100, 90,154,158,158,126,201,205,134,162, 22,128, 17, 0,158, 2, 96, 0, +112, 19,192, 54, 0, 63, 82, 74, 47,151, 39, 51, 33, 33, 33, 13,181, 90,237, 56,158,231, 91,230,229,229, 5,235,116,186,100, 0, +199,114,114,114, 22, 38, 37, 37,157, 44,143,102,104,104,104, 13, 0,163,149, 74,101,123,171,213, 26, 33, 8,194, 13, 81, 20, 15, + 72,146,180, 52, 33, 33,225, 74,121, 52,219,133,123,245,164,122,207, 40, 11,209,132,228,153, 36,165, 94,197,139, 74,106, 74,144, +242,179,166, 30,189,158,179,225, 65, 23, 10,131,193, 80,167, 90,181,106,111,213,174, 93,123, 96,120,120,184,114,232,208,161,202, + 78,157, 58, 97,239,222,189, 29, 86,173, 90,213, 74,169, 84, 90, 90,181,106,245,123, 98, 98,226,162,164,164, 36,151,142,187, 90, +173,174,233,225,225,241,154, 78,167,235, 94,183,110,221,228, 55,223,124,243, 82, 76, 76,204,197,198,141, 27,199, 47, 93,186,244, +173, 75,151, 46,205, 11, 8, 8,248,187,160,160,224,219,156,156,156,203,247, 59,207, 38,147,169,230,190,125,251,160, 82,169,156, +254, 46,203, 50, 6, 15, 30, 12,149, 74,133,165, 75,151,146,163, 71,143,206, 52, 26,141, 83,190,250,234, 43,191,229,203,151,247, +119,102,176, 68, 81,244, 63,116,232, 16,148, 74,229, 93,122, 86,171, 21, 22,139, 5, 22,139, 5, 70,163, 17,125,250,244,241,103, +205,209,195, 1,165,180, 26, 5,176,245, 84, 1, 0,248, 84, 68, 75,163,209,212,233,223,191,191, 34, 45, 45, 13, 10,133, 2, 22, +139, 5, 55,111,222, 68,205,154, 53,121,147,201,244,152,187,122,117,235,214,125, 53, 42, 42,202,127,203,150, 45,150, 85,171, 86, +153,187,117,235, 38,140, 24, 49,194,179, 83,167, 78,237, 66, 66, 66,184, 31,126,248,193,180, 99,199, 14,113,232,208,161,170,143, + 63,254,216,127,235,214,173,207, 2, 88,119,191,211,201, 96, 48, 74, 49, 88, 58,157,110,139, 74,165, 10, 27, 52,104,208,190, 41, + 83,166, 44,246,243,243, 19, 1, 96,245,234,213,134,193,131, 7, 39,191,241,198, 27,113,153,153,153,138,153, 51,103, 54, 90,185, +114,229,111, 90,173,246,150,209,104,124,194, 5, 99, 69, 0,188,193,113,220,232,150, 45, 91,110,145, 36,233,202,238,221,187,231, + 62,241,196, 19,253, 0,208,227,199,143,255, 70, 8,249, 1,192, 23,174, 70, 52, 8, 33,124,245,234,213, 63, 12, 14, 14, 30,251, +245,215, 95,171,171, 87,175, 14,157, 78,135,156,156,156,208,203,151, 47,135,140, 29, 59,182, 87,205,154, 53,191,246,246,246,158, + 17, 29, 29, 45,186,168, 73,130,131,131,223,244,242,242,154, 58,127,254,124, 77,157, 58,117,136, 94,175, 71, 98, 98, 98,131, 99, +199,142,213, 95,184,112,225,139,161,161,161, 31, 39, 36, 36,184,156,206,206,132, 40, 10,106, 85,253,163,202, 99, 45, 59,126,253, +205,119,164,154, 78, 7,129,227, 32, 90, 44, 66, 66, 94, 94,245, 55, 95, 31,189,178,205, 99,129,135,114,133,148, 94,231,206, 81, +203,131, 40, 16, 53,107,214, 60,237,233,233, 25,214,191,127,127, 97,208,160, 65,168, 89,179,166,253,183, 97,195,134, 97,216,176, + 97,202,171, 87,175, 42,215,173, 91,247,210,202,149, 43,159,175, 94,189,122,124,108,108,108,163, 50,204,213, 38,173, 86, 27, 62, +106,212,168,147,227,199,143,223,231,233,233,105, 1,144,116,250,244,105,105,232,208,161,255,123,229,149, 87, 18,114,114,114,240, +225,135, 31,134,175, 90,181,106,173, 90,173, 78, 49,153, 76, 79,221,239,188,235,116, 58,156, 58,117,170,200, 50, 73,146,144,150, +150,134,219,183,111, 35, 63, 63, 31,153,153,153, 40,188,194, 47,144,101, 25, 28,199, 1,119,238,198,117,138, 82,169, 68, 76, 76, + 12,156,152, 47, 20, 20, 20,192, 98,177,128, 2, 80,168,212,232,216,237,201,255, 17,138, 77, 57, 5,249,139, 78, 28, 60,120,131, + 53, 79, 15, 6,142,227,174,254,185,239, 74, 13, 0, 22, 0, 23, 43, 40, 39, 3,192,190,125,251,112,235,214, 45,164,166,166, 34, + 53, 53, 21,161,161,161, 40, 79,196,246,226,197,139, 95, 53,111,222,156,156, 56,113, 98, 11,128, 31,127,249,229,151,190,183,111, +223,254,226,131, 15, 62,168, 50,111,222,188,140,241,227,199,143, 5,240,199, 47,191,252, 50,172, 73,147, 38, 61, 79,157, 58,245, +229,131, 72, 39,131,193, 40,101,144, 59,165, 52, 40, 44, 44,236,198,138, 21, 43, 58,142, 30, 61,186, 94,122,122,186, 0, 0,254, +254,254, 38, 0,200,204,204, 84,188,246,218,107, 13,191,255,254,251,142, 26,141, 38, 65,146,164,170, 78, 52,156,221, 97, 48, 70, +167,211, 61,125,238,220,185, 79,107,213,170,165,153, 51,103,206, 30,189, 94,143, 47,191,252,114, 87, 72, 72,136,247,165, 75,151, + 62,214,235,245,143, 3, 24, 91, 66,186,238,210,140,136,136,152,252,236,179,207,142, 61,112,224,128,186, 73,147, 38,240,244,244, + 4,207,243,240,241,241, 65,235,214,173,201,190,125,251,212,189,122,245, 26,147,149,149, 53,199, 85,205,208,208,208,177,189,123, +247,158, 22, 29, 29,173,109,215,174, 29, 17, 4, 1, 89, 89, 89, 80, 42,149,104,219,182, 45, 89,179,106,149,182, 69,179,102,147, + 67, 67, 67,167,184,170,105,170, 93,117,211,224,209,227, 59,109,250,107, 27, 9, 8, 8,128,105,230, 76,100, 53,108, 8,211,132, + 9, 8,172, 86, 13,127,110,217, 74,122, 15,123,189,157,167, 24,176,197, 85,205, 74,184, 90, 47,162, 89, 80, 80, 80,179, 89,179, +102,252,193,131, 7, 77, 87,174, 92, 49, 22,191,203,148, 82,138,115,231,206,229,255,245,215, 95,121,126,126,126, 48,155,205, 53, +202,210,164,148, 86,123,252,241,199,197,229,203,151,183, 27, 53,106,148,112,243,230,205, 67, 0, 46, 85,169, 82, 37, 1, 64, 98, + 74, 74, 74,236,243,207, 63, 31,188,114,229,202,174, 85,171, 86, 77,162,148,250, 63,136,188,219, 12, 85,241,151, 44,203,144, 36, + 9,213,170, 85,195,166, 77,155,208,171, 87, 47,180,105,211,230,147,190,125,251,170,143, 30, 61, 74, 9, 33,127,185,147, 78, 89, +150, 81, 80, 80, 0,163,209,136,164,228,100, 44, 90,178, 20, 71, 14, 30,192, 47, 43,126, 50,188,249,250,152,215,188,117,158, 7, +155,181,107, 23,118,191,243,206, 52,237,191, 39,222, 49, 87, 36,159, 82,122,189,188,154,253,251,247,111, 16, 17, 17, 17,176,246, +108, 21,100, 40,235, 66, 18,188, 33,171,124, 32,249,181,192,255,148, 79,195, 96, 48, 4, 68, 68, 68,180,118, 71,147, 82,186, 43, + 38, 38,230, 25, 74,233,119,148, 82,137, 82,186,126,252,248,241,175, 19, 66, 54,140, 31, 63,254, 45, 74,233,250,194,229,203, 79, +158, 60,249, 44,165,116,223,131, 72, 39, 43, 75, 76,243, 30,208, 18, 64,175,194, 87, 43, 0,173,139,125, 87, 21, 91,175, 91, 9, +239,189,138,125,111, 89,108,187,150,149,106,176, 8, 33,212,246,114,136,224,136, 75,151, 46,253,253,155,111,190, 89,154,154,154, + 26, 80,163, 70,141,119, 59,116,232,208,254,234,213,171,186,142, 29, 59,182, 55, 24, 12,227, 98, 98, 98, 2, 6, 12, 24,240,205, +139, 47,190,248, 43, 33,196,234, 66, 84,168, 6,199,113,111, 28, 60,120,112, 77,221,186,117, 77,201,201,201, 62,221,186,117,203, + 0,128,200,200,200,220,204,204, 76, 15,127,127,127,105,227,198,141,191, 17, 66, 94, 38,132,148, 25,154, 14, 14, 14,110, 82,181, +106,213,177,115,230,204, 81,243, 60, 95, 82, 4, 5,179,103,207, 86,123,121,121,189, 28, 18, 18,210,170, 44, 77,131,193, 80,199, +211,211,243,195,207, 63,255, 92, 83, 80, 80, 0,171,213, 10,127,127,127,232,116, 58,164,167,165, 33,229,198, 13,100, 38, 37, 96, +242,187, 99,181,122,173,246,205,224,224,224,198,101,105,118,168,238,217, 91,111,168,247,248,219, 99,223, 69,193, 43,175, 32, 95, +163, 65,254,184,113, 48, 69, 71, 35,127,238, 92,152,170, 84, 65,193, 83, 79,225,221,119,223,131, 42,160,102,155,182, 97, 30,207, + 62, 40,215, 61,117,234, 84,238,221,119,223, 85,111,218,180, 73,211,169, 83, 39,243,143, 63,254,152,147,151,151,135,175,190,250, + 42, 39, 50, 50,178, 96,233,210,165,154, 54,109,218,232,187,118,237, 42,184, 24, 17, 16, 87,174, 92,121,122,217,178,101,115, 46, + 95,190, 44,212,174, 93,123,102,211,166, 77,123,230,228,228, 8,173, 91,183,238, 21, 22, 22, 22, 21, 19, 19, 83,165, 71,143, 30, +179, 62,252,240,195,213, 0, 68, 60, 36,240, 60, 15,133, 66, 1,133, 66,129,250,245,235,227,151, 95,126, 65,112,112, 48,190,253, +246, 91,159,192,192, 64,221,242,229,203,179, 50, 51, 51, 63,119, 71,211,108, 54,195,100, 50,193,104, 52, 34,250,196, 73,252,245, +199, 6,172, 88,245, 51, 94,122,245,181, 12,171,213,106, 26, 51,234, 53, 79, 79,141,238,109,118,253,247, 96,184, 51,190,144,228, + 3, 52,151, 16, 98, 6,128, 90,181,106,169, 66, 66, 66, 90,213,170, 85, 75,229,170,142,209,104, 92,188, 96,193,130, 96, 78,237, +131,127,204, 61,241, 11,157,137,237,222, 95, 33, 53, 98, 60, 2, 67,107,163, 71,143, 30,254, 0, 22, 84, 66,122, 55, 81, 74,135, + 82, 74, 55,150,103,251,123,157,206,200,200,200,246,145,145,145,255, 68, 70, 70, 94, 43,124,111, 95,209, 60, 47,157, 66,186,252, + 48, 85,245,191,175, 39,145,252, 31,166,170,254,183,116, 10,233,194, 74,238,191, 23,103, 30,196, 9,254,132,144, 77,132,144, 77, +147, 38, 77,234, 2,192,175,216,247,118,142,235, 1, 80, 57,123,183,189, 28,150,251, 23, 26, 43,127,135,239,149,130,194,161,146, + 58,237,230, 8, 13, 13, 53,206,155, 55,111,123, 94, 94,222,238, 47,190,248,162,229,187,239,190, 59, 44, 56, 56,120,223,179,207, + 62,251,185,151,151,151, 40, 8,130, 59,255,247, 82,155, 54,109,126, 15, 13, 13,149, 19, 19, 19,149,162, 40, 42,175, 93,187,166, + 22, 69,145, 8,130, 64,141, 70,163,112,230,204, 25,165, 40,138, 82,195,134, 13,215,158, 57,115,102, 4,128, 9,165, 9,106,181, +218, 81,223,124,243,141,166, 36,115, 37, 73, 18,114,115,115, 97,181, 90, 49, 99,198, 12,205, 7, 31,124,240, 58,128,163,165,105, + 10,130,240,250, 87, 95,125,165, 17, 69, 17,182,252, 93,186,116, 9, 89, 25, 25, 16,115,115, 97,201,205,134, 53, 55, 11,138,124, + 47,140, 29,246,130, 38,234,219,239,223, 6,240, 74,105,154, 22,149,199,172,159,190,253, 30,162, 40,194,188,102,141,211,117,196, + 61,123, 0,179, 25,179, 63,158, 75,222, 27,245,252, 12, 0,191, 62,160, 19, 12,120,158,199,203, 47,191, 76,204,102,179,234,207, + 63,255, 84, 53,110,220, 88,106,214,172,153,103,191,126,253, 96,181, 90,145,149,149, 5,141, 70,227,142,172, 84,189,122,245,252, +111,190,249,230,247,244,244,244, 63, 63,249,228,147,199, 23, 45, 90, 52,210,223,223,127,203,224,193,131, 39,123,122,122, 90, 84, + 42, 21,172, 86,171,215,195, 86,249, 5, 65,128, 86,171,133,193, 96, 64,239,222,189,177,104,209, 34,240, 60,159,206,243,252,246, +220,220,220,121,103,206,156,137,117, 71,207, 98,177,192,100, 50,161,160,160, 0,113, 55,226, 33,138, 34,150,175, 92,137, 3,123, +118,127, 68, 41,157,185,122,197, 79,186,175,150, 45,235, 7,224, 61,214,244,222, 95, 6, 13, 26,196, 19, 66,124,106, 85,211,228, + 17,142,230, 31,162,180, 74, 88, 88,216, 48,171,213,218, 53, 52, 52,180,106,124,124,124, 90, 72, 72,200, 14,179,217,252, 71,106, +106,106, 94, 25,145, 74, 98,181, 90, 49,170, 85, 38,198,180,225, 96,181, 90,145,153,153,137, 27, 55,110,224,236,217,179, 56,114, +228,108,185,210, 24, 17, 17,241,146, 86,171,125, 66,169, 84,134, 83, 74,185,188,188,188, 27,102,179,121,119, 98, 98,226,247,180, + 28, 19, 27,222,171,116, 58, 16, 53, 96,192,128, 32,111,111,111,196,196,196, 4,157, 58,117, 42, 10, 64,135,138, 8, 42,137,114, +233,224,215,119, 27,116,158,129, 72,185,244,139, 97,203,198,153, 75, 1,212,102, 37,248, 95,125, 97, 67,202, 88, 37,149, 82,218, +187,208,144,109,138,138,138,234, 93,184, 93,111,199,239, 46,252, 79,111, 39, 6,111,147,179,229,149,102,176, 8, 33,180,180, 12, +234,245,122,235,135, 31,126,120,104,239,222,189,145,237,219,183, 63,224,166,177,178,209,230,177,199, 30,139,254,251,239,191,253, +130,130,130, 76,178, 44, 19, 47, 47, 47,171,167,167,167, 84, 56,182,133,198,198,198, 10,177,177,177, 30,126,126,126, 18,128, 54, + 46,156,252, 90,215,168, 81,163,196, 72, 65,110,110, 46,114,114,114, 96, 50,153, 16, 24, 24, 72, 56,142, 43, 51,252,167, 80, 40, +218,213,174, 93,155,228,228,228, 32, 48, 48, 16,167, 78,157, 66, 65,110, 46,196,188, 28, 88,179,115, 32,229,102,129,102,103, 34, + 47, 43, 19, 53, 2,170, 18,158,231,203,140,138, 89,121,109,168, 65,175,135,121,226, 68, 88,254,247, 63, 64,169,132, 50, 60, 28, +176,220, 25,106,101,137,139, 3, 84, 42,112,175,188,130,218,175,190, 10, 43,212,134, 7, 88,208, 97, 54,155,145,159,159, 15,165, + 82,137,129, 3, 7, 98,239,222,189,150,150, 45, 91,106, 18, 18, 18, 96, 54,155,193,113, 28, 36,201,245, 27, 9,101, 89,150, 56, +142,163, 0,224,231,231, 39,206,155, 55,111, 87,199,142, 29, 59,119,235,214,109,187,227,192,114,147,201, 36, 3,160, 15, 83,197, + 87,171,213, 48, 26,141, 32,132,216,198,246,225,194,133, 11,225,229,209,146, 36, 9, 22,139,197, 30,197,146,101, 25,135,143, 29, +130, 70,171, 69,235,199, 59, 78,150,101, 89, 43, 40, 20,224, 11, 7,119, 49,238, 31,173, 91,183,110,174,164,214, 57,175, 27, 44, + 97, 79, 15, 8,201,211,232, 20,121, 3,182,152, 59,215,172,213,250,153, 57,179,231,120,212,168, 81, 67,127,226,196,137,220, 57, +115,230, 4, 31, 63,126, 28, 0,126, 46, 77, 47, 49, 49,113,195,220,185,115,171,116,238,220,185,186, 32, 8, 36, 51, 51, 19,169, +169,169, 72, 73, 73, 65,124,124, 60,141,141,141,189, 38,138,226,239,238,164,177,105,211,166, 75,134, 14, 29,250,124,131, 6, 13, + 4, 74, 41, 68, 81, 68,126,126,126,147, 35, 71,142,244,250,231,159,127,218, 1,120,217,221,124, 39, 37, 37,173,159, 59,119,174, +190,115,231,206,143, 9,130,192, 85, 70, 58,139, 17,228,233,233,137, 29, 59,118,192,219,219, 27, 0,130, 42,122,172,204,162,197, +160,243, 50, 0,113,159, 35,192, 39, 12,102,209, 98, 96, 37,248,223, 31,197, 42,195,100, 29, 3,208,171,162,102,232, 94,153,169, +114, 69,176,108,220,186,117, 75,157,147,147,163,160,148,114,146, 36, 41,100, 89, 38,106,181,218,221,174,156,250,207, 62,251,236, +111,221,187,119,207, 4, 0,165, 82, 41,250,249,249, 89, 51, 50, 50,144,149,149, 5,171,213, 42,121,121,121,229, 87,171, 86, 45, +191, 94,189,122,217,187,119,239, 46,179,139,208,104, 52,134, 56,139,164,228,231,231, 35, 55, 55,215,110,176,242,243,243,225,229, +229,133,188,188,188, 50, 43,183,197, 98, 9,211,106,181, 72, 77, 77, 69, 90, 90, 26, 10,114,179, 97,201,201,133, 53, 55, 27,214, +236, 44,200, 57, 89,160,185, 57,144,101, 9, 85,252,253, 97, 54,155, 67,202,210,204, 55, 73, 42, 1,128,241,247,223,129,119,222, + 41,217,220,236,222, 13, 93,157, 58, 48, 26, 45, 15,108,142, 50,199,139, 96,139,197, 2,171,213, 10, 74, 41, 53,155,205, 48,155, +205,142,166,201, 77,111,113,199,144,157, 60,121,210, 43, 37, 37, 69, 67, 41,229,115,115,115,213,121,121,121, 92,213,170, 85, 11, + 0, 80,171,213, 42, 61,108, 21,223,241,142, 63,179,217,236, 86,190,139,155, 80,171,213, 10,171,213,122, 39,146,105, 54,195,108, + 49, 97,225,162, 37,216,176,246, 23,156, 63,127, 46,120,202,204,217, 16,173, 86, 72, 50, 27, 87,124,191,104,210,164,201,147, 60, +207, 47,108,227, 45,123,142, 13, 17,115,171,170,228,188, 75, 95,189,149,119, 42, 84,107, 44, 48, 90, 12, 81,139, 62,246,163, 20, +248,240,195, 15,111, 13, 30, 60,216,227,221,119,223,109, 56,100,200,144,110, 13, 26, 52,248,245,220,185,115,150, 18, 26,113,229, +136, 17, 35,142, 85,169, 82,165,198,202,149, 43, 83,146,147,147,125, 69, 81,212,154,205,102,139,217,108,190,102, 54,155, 15,138, +162,184, 59, 41, 41,233,132, 59,105,213,235,245,141,134, 12, 25, 34,100,100,100,216,239,246, 75, 77, 77, 69,243,230,205,249,157, + 59,119,214, 47, 79,254,207,159, 63,191, 40, 56, 56,120,223,159,127,254,249,132,135,135, 71, 51,149, 74, 21, 40,203,178,100, 52, + 26, 83,140, 70,227,233,242,164,179, 24,201, 49, 49, 49, 65, 94, 94, 94, 72, 72, 72, 0,128,228,138, 30, 51,149,160, 76, 72,185, +252, 75, 72,128,119, 13, 92, 61,191, 25, 42, 65,153,192, 74,242, 35, 31,193,106,233, 24,177, 42,197, 36, 25, 39, 78,156, 56,153, + 16,178,105,226,196,137,147, 75,137, 96, 73,142,235, 57,172,111,170,116,131,229,140,188,188, 60,197,177, 99,199,252,110,221,186, +229, 17, 16, 16,144, 87,191,126,253, 76, 66, 8, 40,165, 36, 59, 59, 91,151,146,146,162,211,235,245,166,240,240,240,108, 23,255, +239,127,239,188,243, 78,223, 9, 19, 38,236,120,225,133, 23,146, 1, 32, 35, 35, 3,183,110,221, 66,122,122, 58, 44, 22, 11, 18, + 19, 19,201,254,253,251, 3,119,238,220,217, 21, 64, 92, 89,130, 90,173, 54, 33, 39, 39,167,182,143,143,143,221, 28,216, 76,149, +227,187,197, 98, 65, 78, 78, 14,244,122,125,153,149, 91, 16,132,164,212,212,212,154,102,147, 9,169, 9, 9,119,140, 85,110, 14, +164,236, 76, 72,217, 89, 32,121, 57, 80,138, 34,212,130,128,156,219,233, 80, 42,149,183,202,210,212,169,121,179,217,106, 85,241, +125,250, 0,164,228,114, 68,219,181,195,237,134, 13,161,217,244,187,248, 0, 11,186,211,239,197,141,133, 59, 70,227,246,237,219, +220,162, 69,139,234, 95,186,116,201, 35, 32, 32, 32,173, 91,183,110,177,132, 16,202,113,156,156,146,146,226,123,233,210,165,218, + 62, 62, 62,121,130, 32,164, 62,168,124,139,162,232,212, 92,229,231,231,219, 35, 78, 89, 89, 89, 80, 40, 20,232,216,177,227,110, +147,201,180,158, 16,178,226,200,145, 35, 57,165,152,245,187,246,153, 44,203,118,147,165,224, 20, 88,191,118, 45,190, 92,246, 37, +126,255,253, 79, 58,248,217, 1,100,239,190,253,144,101,154,200,154,220,251, 3,207,243, 31, 31,152, 48,208,147, 72,214,220,204, + 93,107,243,191,140, 87,229,109, 62,121,230, 64,126,129,153,175, 94,179, 70,189,136,240,234,194,148,105, 19, 82, 78, 93, 56, 28, +151,241,117, 70,181,247,223,127, 63,188,118,237,218,129,177,177,177, 53, 1, 92,112,166,233,233,233, 25, 54,124,248,240, 23, 51, + 51, 51,133,239,191,255,126, 85,124,124,252, 1, 74,233,181, 98, 38,172, 41, 33,228,227,194,118, 56, 0,128, 4, 96, 39,165,116, +117, 41,201,149, 9, 33,216,179,103,207, 93,119,251, 73,146, 84,110, 87,158,148,148,148,217,166, 77,155, 70,151, 46, 93,218,148, +145,145,241,203, 93,237,151, 78,215,171, 97,195,134,207, 30, 61,122,116, 22,165,244,170, 59,218, 28,199, 77, 56,123,246,236,108, + 74,105, 24, 33,228, 6,199,113, 31, 85,244,152, 89,168,229,245, 45, 27,166,127,101,182,152, 67, 85, 74, 85,188,133, 90,222, 96, + 37,249,145,199, 54, 70, 10,142,198,201,137, 49, 58, 24, 21, 21,165,157, 59,119, 46,162,162,162,206, 58,139, 96,217,140, 86, 84, + 84,212, 89,219,122, 14,235,239,171, 84,131,229,204, 57, 74,146,164,153, 59,119,110,187, 6, 13, 26, 36,181,111,223, 62, 41, 52, + 52,212,104, 59,217, 42, 20, 10, 49, 32, 32, 32,203,106,181, 22,220,186,117,171,234,190,125,251,170, 83, 74, 93, 25,252,185,215, +211,211, 83,121,252,248,241,160, 95,126,249,165,201,197,139, 23,235,244,234,213,203, 30, 29, 72, 72, 72,168,179,112,225, 66, 73, +173, 86,167,241, 60, 31, 13,160,204, 65, 62,162, 40, 30,185,124,249,114,173,214,173, 91, 19, 81, 20,139,152, 42,199,207, 42,149, + 10, 9, 9, 9, 84,150,229, 99, 46, 24,140, 99,167, 78,156,168,217,176,110,221, 59,230, 42, 39, 11, 82,118, 22,164,172, 76,144, +252, 92, 40, 69, 11,244, 58, 25,106,149, 14,103,239, 92,145,149, 57, 91,178,194,106,188, 17,151,157, 93, 59,124,222, 60, 40,125, +124, 0,139,197,222, 45, 8,192,222, 93, 72,147,147,113,252,208, 33, 40,100, 83,210,131,140,216,248,250,250, 34, 59, 59, 27, 38, +147, 9,148, 82, 80, 74,237,134, 74,165, 82,161,112,188,148,171, 81, 28,239,126,253,250,117,104,221,186,245,197,151, 95,126,121, + 87,253,250,245,175,219,202,186, 78,167,179,212,173, 91, 55,201,100, 50,229, 94,187,118,173,206,202,149, 43,219,201,178,236,241, + 32,242,237, 24,157,115, 52, 72,102,179, 25, 5, 5, 5, 72, 75, 75,195,158, 61,123,112,240,224, 65,156, 59,119,174,229,145, 35, + 71, 26,111,216,176,225,253, 6, 13, 26,180, 62,119,238,220, 45, 87, 12,150,109, 95,218,204, 22,189,115,119, 60, 54,254,241, 23, +122,246,234, 68,114,242,178,177,105,203,223,160,148, 6,177,246,244,190,145, 7,171,148,103,218,187, 38,255,229,243,234,204, 84, + 51,102,157, 56, 17,189,191, 87,175, 94, 59,106, 86,127,204, 11, 0,204, 38, 90, 69,167,244,211, 42, 20, 10, 21, 0,132,133,133, + 69, 82, 74,191,192,157, 59,145,238,226,153,103,158,105, 19, 24, 24,216,100,235,214,173,167,227,227,227, 15, 22, 55, 87, 0, 80, +167, 78,157,143,206,156, 57,243,148, 32, 8,196,161,241,167, 0,156, 26,172,254,253,251,215, 14, 13, 13,245,221,114,217, 27,217, +202,154,144,185, 76, 80, 94, 13,201,167, 9,174, 43, 27,160, 90,181, 11,190,143, 61,246, 88,227,203,151, 47,159,118, 39,243,132, +144,208,193,131, 7,255,254,221,119,223,213,233,222,189,187, 10,192, 93, 6,171, 94,189,122,253,118,238,220,217,127,204,152, 49, +141, 9, 33,207, 82, 74, 93,158, 3,240,216,177, 99,135, 0, 84,234, 32,244,209,179,232,110, 0,117, 89,209,253,207, 68,175, 0, +135, 49, 88, 0, 82,113,231, 89,202,142,223,109,115, 93,154, 29,214, 77,117,136, 90,153,139, 69,189,156,253,150,138, 74,188,201, + 74, 81,202, 73,118,207,209,163, 71,155, 70, 70, 70, 94,181,153, 43, 91,125,180,125,208,235,245,102, 0,244,226,197,139,245, 37, + 73, 58,232,194,255,253, 24, 29, 29,189,101,201,146, 37,159,134,133,133,153,250,245,235,199,205,158, 61,123,147, 45,138,181, 96, +193, 2,218,179,103,207,205,151, 46, 93, 34,231,207,159,255, 8, 64,255,178, 4,141, 70,227,178, 55,222,120,227,217,253,251,247, +107,204,102, 51, 50, 51, 51,139, 68,175,114,114,114, 96,181, 90,193,243, 60,150, 44, 89, 98,202,203,203, 91, 82,230,213,145,197, +242,253, 39,159,124,242,204,234, 31,127,208,240,162, 25, 5,153, 25,144,179, 51,193,229,231, 65, 97, 49, 67, 45, 72, 8,170,173, + 71, 78,138, 18, 95,110,219, 99, 20, 69,113, 89,153, 81, 49, 83,222,228,215, 71,141,252,109,251,174,221, 16,186,118,133,184,117, +235,221, 87,122,129,129, 40,176, 88, 16, 53,103, 22, 37,198,204, 41, 15,162,160, 11,130,112, 97,228,200,145,129,163, 70,141,170, +210,168, 81, 35, 88, 44, 22,136,162, 8, 74, 41, 36, 73,130,159,159, 31, 0, 32, 62, 62, 30, 49, 49, 49, 89, 60,207,151, 25,189, +147, 36,105,239,245,235,215, 27,188,242,202, 43, 87,158,126,250,233, 0,139,197,162,200,200,200, 72, 46,188, 50, 86,132,132,132, +104, 85, 42, 21, 73, 73, 73,201,188,125,251,118,128, 44,203, 7, 31, 68,222, 45, 22, 11,230,206,157,139,159, 46, 95,198, 75,143, + 61,102, 55,155, 38,147,201, 30,193,218,182,109, 27,254,249,231, 31,172, 90,181, 42,125,224,192,129,222, 47,188,240,130,247,170, + 85,171,222, 4,240, 81, 73,154, 51,102,204,192,159,215,174,161,143,147,177,130,148, 18, 36, 38, 37, 66, 20, 69,252,254,251,246, + 36, 65, 33,248, 44,248,116,174,246,131,201,147, 9,107,118,239, 15,178, 44, 79,111, 63,127,195,155, 28,167,179, 0,248,234,196, +137,227, 7, 1, 64,171,213,250,207,159, 63, 95, 5, 0,243, 62,157, 39, 80, 74, 5,171,213, 10,179,217,140, 89,179,102,105, 70, +141, 26, 85,226,221, 70,191,254,250,107,230,204,153, 51,125, 95,125,245,213, 39,247,236,217,163, 38,132,108, 47,188, 16, 75, 47, +140, 84, 85, 5,112,168,106,213,170,213,214,174, 93, 91,227,169,167,158,210,151,149,206,130,130,130,175,151, 45, 91, 22, 62,127, +159, 39,182,228, 13, 64, 60, 29, 12,234, 75,225,171,204, 65,125,143, 27,232, 20, 20, 31,180,106,213,170,175, 0,184,124,151, 30, + 33,164,222,192,129, 3,127,249,238,187,239, 34, 70,142, 28,153,120,240,224,193, 4, 66,136,179,178,156, 62,124,248,240, 27,203, +151, 47,175, 33,203,242, 70, 66, 72, 63,119, 76, 22,131, 81, 9, 28,187, 71,235,222, 51, 74, 51, 88,111, 19, 66,234,207,155, 55, +111,246,247,223,127,223,122,242,228,201,123,218,180,105,147, 97, 51, 88, 55,111,222,244,221,191,127,127,231,252,252,124,171, 36, + 73,111, 58,155, 19,163,248,211,182, 41,165, 55, 8, 33, 11,219,183,111,255,252,138, 21, 43, 86,233,245,250,140, 29, 59,118,248, + 26, 12,134,219,209,209,209, 94, 28,199,229, 92,190,124, 89,177, 99,199,142, 33, 0,150, 57,171,192,197, 53, 19, 19, 19, 79, 85, +175, 94,253,139,247,223,127,127,236,148, 41, 83, 52,178, 44,195,104, 52, 34, 39, 39, 7, 5, 5, 5, 16, 4, 1, 60,207, 99,205, +154, 53, 38,179,217,252, 67, 66, 66,194, 81, 23, 52,143, 68, 68, 68,124,247,217,188,207, 70,190, 53,226, 37, 21,151,157, 9,227, +237, 52,192, 98,130, 90,193, 33, 52,178, 10,140, 25, 60,190,218,246,143, 57,213,104,252, 45, 62, 62,126,127, 89,154, 7,174,103, +111,109, 83,219,127,247,172, 25,211,186, 76,252,245, 87, 64,146, 64, 94,122, 9,216,185, 19,104,212, 8,114, 82, 18, 10, 44, 22, +124, 56,105, 2,120, 99,202,129, 35,215,115,215,151,165, 89, 25, 20,215,188,113,227, 70,107,171,213, 58,116,230,204,153,211,107, +214,172, 41,140, 24, 49,194, 39, 34, 34, 2,178, 44, 67,169, 84, 34, 49, 49, 17, 71,143, 30,205,190,125,251,182,133, 82, 58, 53, + 41, 41,233,231,178, 52, 37, 73, 26, 67, 8,169,255,222,123,239,205,154, 61,123,182,240,217,103,159, 29,122,242,201, 39,131, 5, + 65, 80, 54,105,210,196,127,223,190,125,218, 13, 27, 54, 60,145,151,151, 7, 74,233, 88, 87,202, 82,101,231, 93,169, 84,166,158, + 63,127,190,234,236,217,179,201,245,172, 44, 76,224,121,123, 68,203, 22,185,251,228,147, 79,224,233,233,137, 5, 11, 22,224,216, +177, 99, 11,210,211,211,199, 45, 90,180,200,111,205,154, 53,131,108, 6,203, 81, 83,173, 86, 95, 63,125,250,116,232, 23, 95,124, +193, 93,182, 88, 48,167, 48, 82,235,200,244, 57, 31,195, 98,182,128, 16, 30, 49,135,247,205,233,208,249,137,153, 85,124,124,180, +178, 76,233,253, 60,238,255,101,205,147, 39, 79,238, 5,176,183,148,171,107,219,197, 28,210,210,210,144,150,150, 6,111,111,111, +219,164,201, 78, 53,141, 70,227,233, 9, 19, 38,156, 88,186,116,233,147, 7, 14, 28, 24,184,119,239,222,167,119,237,218, 85, 16, + 23, 23,103, 21, 69,145, 6, 5, 5, 41, 58,116,232,160,233,217,179,167, 78,173, 86,115, 31,126,248, 97,250,156, 57,115,252, 10, + 13,152, 83, 77, 89,150,121, 89,150, 49,238,241,108,140,239,162,128,201,116,231,130, 50, 41, 41, 17,231,206,157,195,193,131, 23, + 65, 8,225,220,220,159,159,173, 90,181,170,186, 74,165, 34,171, 87,175, 14, 93,189,122,245,235,101,237,191, 21, 43, 86,132,175, + 94,189,250, 11, 66, 72, 47, 74,169,204,202, 18,211,100,184,105,176, 10, 27,150,243, 0,158, 33,132,180,251,224,131, 15,102,132, +132,132,164, 75,146,164,252,243,207, 63,159,206,206,206,246,149, 36,105, 26,165,244, 31, 55, 67,129,223, 17, 66, 48,100,200,144, + 73, 33, 33, 33,155,207,158, 61,219,101,224,192,129,107,255,252,243,207,174,146, 36, 93,191,122,245,234,100, 0, 75, 0,124,237, +170,102, 92, 92,220,199,219,183,111, 39,135, 14, 29,122,123,226,196,137,234,128,128, 0,226,227,227, 3,163,209,136,248,248,120, +250,227,143, 63,154,204,102,243, 82,111,111,239, 25,174,106,250,250,250, 78,217,126,224,128,234,244,185, 51,195,222,121,110,144, + 38, 60, 56, 20,158, 92, 40,114,110,167,227,159, 3,137,248,226,239,253, 5,105,102,243, 90,142,227, 92,190,149, 62,228, 74, 90, +191,237,235,190,223,176,111,207,158, 46,179,162, 62, 33,117, 95,125, 21,186,234,213,145, 85,187, 54,142,238,219,135,168, 57,179, + 40,159,151,114,192,122,229, 86,239, 7, 85, 32, 10,159, 49,248, 83, 68, 68,196,218,203,151, 47,143,154, 60,121,242,196,230,205, +155, 83,147,201,164,220,178,101, 75, 94,114,114,178, 44,203,242,167,130, 32, 44,141,139,139, 51,185,161,123, 30, 64,127, 66, 72, +187, 87, 94,121,101,122,112,112,112,138,213,106, 85,140, 31, 63,190, 75, 70, 70, 70, 32,165,116,186,187,101,169,146,163, 87, 79, + 76,154, 52,105, 55, 33,196,195,177, 59,180, 72,101, 81, 40,148,217,217,217, 68,150,101,177,160,160, 32,213, 22, 25, 45,169, 30, + 89,173,214, 46,211,167, 79,223,109, 50,153,194, 75,250, 95,165, 70,139,127, 14, 30,194,208, 33,131, 37, 5,207,207,126, 97,200, + 96,213,193,195, 71, 36, 74,229,141,172,121,122, 56,161,148,162,240, 98,128,150,178, 78, 60, 33,228,163,227,199,143,107, 70,143, + 30,221,108,232,208,161,158, 93,187,118,213, 23,139,190,203,127,254,249,103,254,178,101,203,210,247,238,221, 27,253,202, 43,175, +244,197,157,217,227,157,146,148,148,180,245,203, 47,191,244,238,212,169, 83, 45,219, 19, 6,108, 99,176, 18, 18, 18,112,253,250, +245, 27,146, 36,109,118, 51, 59,239,188,240,194, 11,235,151, 47, 95, 30, 54,114,228,200,196, 53,107,214,108, 6,224,108, 76,173, +126,192,128, 1,189,150, 47, 95, 30, 54,106,212,168,120, 0,239,177, 25,222, 25,140, 10, 24, 44,135,198,226, 32,128, 39, 8, 33, +189, 9, 33,126, 5, 5, 5, 43, 40,165,155, 42,208, 64,125, 71, 8,217, 17, 31, 31, 63, 28, 64,240,226,197,139, 23, 3, 72, 0, +112, 25, 64, 95,103,227, 21, 92, 48, 5, 51, 67, 66, 66, 54, 76,159, 62,189, 82,158, 69, 88,248, 72,157,119, 13, 6,195,175, 31, +125,243,227, 4, 89,150,155,202,162,197, 23,188, 34,147,231,249, 83,162, 40,126, 18, 31, 31,239,150, 33, 88,119, 39,157,125, 90, +135,123,245,152, 48,102,232, 28, 43,175, 13,203, 51, 89, 85, 58,149,194,172,164, 5,241,156, 49,107,250,145,184,156,135,226,196, + 90,104,158,190,168, 85,171,214,143, 71,143, 30,125, 31,192,232,220,220,220,101, 26,141,230,179, 43, 87,174,228, 84,224,216, 31, + 4,208,173,176, 44, 5,228,231,231,255, 82,145,178, 84, 89, 68, 71, 71, 95,139,140,140,172, 9, 64, 91,210, 58, 60,207, 47,218, +186,117,107,255, 39,159,124,178,192,100, 50,205,123,242,201, 39, 21, 39, 78,156,160,148,210,221,206,214, 63,114,228, 72, 10,128, + 82,239,236,106,214,174, 93,216,242, 21, 43, 14,142, 24, 62,220,243,171,133, 11,170, 28,139,142,145,126, 88,190, 60, 39,175,160, + 96, 17,107,158, 30, 14,108,129, 42, 65, 16,160,211,233,224,229,229,133,212,212,212, 50,111,242,160,148, 94, 37,132, 12,248,224, +131, 15,218,125,240,193, 7, 79, 7, 7, 7,215, 15, 15, 15, 15,225, 56,142, 75, 78, 78, 78,139,143,143,191, 97,177, 88,118, 3, +216, 10, 64, 89,163, 70,141, 83, 0,214,148,164,119,238,220,185, 79,130,131,131,247,173, 95,191,254,105,141, 70, 83, 87,169, 84, + 86,177, 88, 44, 92,126,126,126,134,217,108,190,104,177, 88,254, 74, 76, 76, 60,236,102,125,252, 31, 33,164,135, 66,161,248,253, +187,239,190,171,147,156,156, 28,190,119,239,222,187, 38, 57,142,140,140,252,102,249,242,229, 97, 99,198,140,185,182,122,245,234, +103, 89,247, 32,131,225, 66,219, 81,142,121,233,220,105,152, 30,169, 80,103, 68, 68,132,218,213,168, 13, 11, 29, 63,122,154,141, + 26, 53,242, 9, 12, 12, 28,244,246,219,111,171,234,214,173,139,139, 23, 47,226,171,175,190, 50, 39, 37, 37,173, 59,115,230, 76, +102,121,211,217,172, 93,187, 48,189, 70,243, 54, 64,122, 3,116, 83, 94, 65, 65,145,103, 17,178, 99,244, 96, 52,251,245,235,183, + 65,173, 86, 87,231, 56,142, 80, 74,169,237,209, 73, 14,211,108,196,238,218,181,235,153, 71, 33,239,132,144,208, 86,173, 90,205, +184,120,241,226,223,217,217,217,119, 13,114, 87,171,213,189,154, 55,111, 62,228,208,161, 67,211,139,223, 69,200,202, 18,211,100, + 84, 32,130,197, 40, 18,213, 97,252, 71, 41, 52, 81,246, 27, 26,106,212,168,129, 94,189,122, 85, 88,183,208, 76,189, 7, 54,115, +251, 67,197,198,141, 27,159,249,175,228,149, 82, 26,143, 82, 38, 41, 53,153, 76,155, 1,108,102,165,130,193,112, 29, 54, 91, 52, +131,193, 96, 48, 24, 12, 70, 37, 67, 0, 52, 42,225,138,198,229,208, 31, 33,164, 81, 57,174,152,206, 48, 77,166,201, 52,153, 38, +211,100,154, 76,243,191,165,233,160, 61,179,132,159, 18, 11,117,190,249, 87, 27, 44, 54, 6,139,105, 50, 77,166,201, 52,153, 38, +211,100,154, 15, 90,179,152,254,200,127,187,193, 98, 93,132, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 60, +220,184,116, 23,161, 74,165,170, 15,224, 69, 0,129,132,144, 91,148,210, 21,102,179,249,252,127,109,103,169, 84,170,250,132,144, + 23, 41,165,129, 0,110, 1,120,176,251,129, 16, 50, 99,250,157,153,245,167, 77, 7,197,189,236,239,101, 48, 24, 12, 6,131, 81, +113,131, 85, 61, 44,108, 32,225,240,153,104,149,125,124,124,124,184, 47,191,252,146,235,211,167, 15,254,252,243, 79,188,253,214, + 91,175,135,132, 24,100,129, 87,100,130, 74,239,199,222, 72,252,205,149, 63, 27, 48, 96, 64,156, 40,138, 37, 62,191,139,231,249, +212, 13, 27, 54, 68, 84, 52, 83,193,205, 7,199,137,162,165,196,255, 81, 40,132,212,164, 19,235, 92,250,159,176,176,224,129, 28, +200,103, 86, 89,246,169, 82,165, 10,183,120,241, 98,251,126,120,243,205, 55, 95, 15, 13, 9,145, 5, 5,151, 73,101,188, 31,123, +227,198,111,247,237,200, 57,152, 43, 0,152, 49, 29,100, 26, 33,120, 40, 77, 86, 97, 90,167, 77, 3, 5,152, 9,100, 48, 24, 12, +198,127,216, 96, 17, 66, 23,174, 94,246,153, 79,122,122, 6,214,108,220,134,122,245,234,225,220,185,115,168, 87,175, 30, 58,180, +106,194,117,111,219,148,227, 57, 84,157,186,120,229, 66, 0, 46, 25, 11, 81, 20,253,215,175, 95, 15, 66,136,125,194, 62,219,164, +125, 57, 57, 57, 24, 59,118,172,127,101,100, 74, 20, 45,254,215,142,253, 14, 5, 79, 96,149, 40, 44, 86, 10,209, 42,195, 34, 81, +100,231, 91,209,181,215, 11, 46,255, 15,161,100,225, 15,139,231,249,100,102,101,225,247, 45,219,139,236,135,174,237, 91,114,131, +122,118,230,116, 90,101,213, 81, 19, 62,113,121, 63, 84, 6,142,230,170,136,201, 2, 30, 58, 3, 99, 75,235,140, 25, 32,192,157, +105,177,167, 79, 7,165, 44,226,198, 96, 48, 24,140,255,154,193, 50,137,146, 79,160,175, 55,126,252,225, 7,140,159, 56, 11,117, +235,214, 5,165, 20,132, 16, 76,158, 50, 19,159,207,154,136, 33, 61, 58, 66,180,202, 62, 37,105,148, 48, 99, 48, 98, 99, 99, 97, + 52, 26,139,188, 26, 54,108,232, 82,130, 93,189,107, 65,193, 19,108,142,201,129, 69,148, 97,177, 22,190, 68, 25, 93, 26,121,186, +165, 41, 74,178,143,143,183, 7,190, 91,246, 53, 62,152, 57,175,200,126,152, 48,121, 10,190,154,251, 17,222, 29,243, 18, 76,162, +228, 83,158,116,186,195,163,164, 57,125, 58,200,140, 25,132,184,218,181,201,246, 39,211,100,154, 76,147,105, 62,218,154,143,164, +193, 34,132,116, 2,176,167,112,167,217, 35, 35,162,185, 0, 13, 66,253,240,245,252,217,160,224, 32,131, 2, 50, 64,101, 17,213, +171,234, 96,204,207,119,251, 15,101, 89,134,197, 98,129, 40,138,248,230,155,111,144,155,155, 11, 89,150, 81,175, 94, 61, 0, 64, +100,100,164,163,104,124,116,116,116,221,178, 52,253, 27,245,187, 72, 64, 66, 29,151, 77,155,247, 61, 14,196, 92, 5,165,128, 90, +171,195,179, 67, 71, 65,146, 41, 44,162,251,207, 39, 45,200,203, 71,160,135,128,207,231, 76, 1, 39, 40,193,129,128,227, 8, 56, + 34,163,110, 72, 21,152,140,198,251,126,224,166, 77, 7, 45, 30,197,154, 54, 29, 20,211,254, 93, 5,240,161,238,218,100, 48, 24, + 12,198, 61,167, 36, 15,242, 72, 24, 44, 0,123,156,101,202, 92,144,143,144, 42, 74, 84,243,240,134,213, 42,225,172, 37, 8, 57, +249, 5,176, 88, 68, 92,183, 88,112,229, 68, 50,218,181,107,135,103,158,121, 38,215,108, 54, 67,169, 84,102,111,220,184, 49,184, + 44,131, 37,138, 34, 44, 22, 11,242,242,242,176,106,213, 42, 40, 20, 10,251,131, 83,109,231, 89, 74, 41,218,183,111, 31,234,210, +193, 1, 9,189,114,244, 55,120,106,120, 88,101, 10,171,149,194, 42, 1, 86,153, 34,223, 44, 99,192, 43, 31,193, 42,203,144,100, + 25,102, 75,217,231,241, 34,134,205,183, 37,250, 77, 90, 3,192,195,254,187,151,154, 98,124,123, 14, 74,149, 26, 42, 37, 15,147, + 49,255,254, 31, 57, 74,233, 52, 66,240,111, 27,228, 62,109, 26,149, 1, 66,238,116, 23, 58,152,172,135,176,107,147,193, 96, 48, + 24,247,133, 61,143,146,177, 42,110,176,236, 46,146, 82,186,247,255, 13,150, 17, 86, 81,130,104,149, 96, 21,173,200,202, 53,226, +211, 79, 63,133, 90,173, 6, 33,196,110,150,100, 89,230, 68, 81, 68,207,158, 61,125,202,250, 67, 73,146,236, 17, 44, 74, 41,120, +158, 71,235,214,173,239, 90,239,240, 97,183, 30, 10, 15, 79, 13,143,234,221, 38,221,181,252,200,111,179, 65, 41,133, 36, 81, 88, + 37, 10,179, 85,170,176, 97,107,214,105, 16, 76,102,241,206,112,109, 10, 20,228,231, 63,152,163, 71, 41,181, 27,147,127, 85,228, +138,210,105,211, 64,103,204, 32,108,154, 16, 6,131,193, 96, 56,245, 32,143,148,193,194,157, 16,157,221, 69,154,140, 70,136,162, + 21, 86,171, 4, 81,188, 99,140,180, 90, 45, 58,118,236,104, 59,191,219,223,183,109,219, 6,139,197, 82,230, 31,218, 6,181, 91, + 44, 22,200,178, 12, 74, 41,214,172, 89, 3, 65, 16,236, 47,165, 82,233,118, 70,172, 18,197,164, 9,227,160, 20, 56, 8, 60, 7, +165,130,131,160,224, 33, 81, 10, 74, 1, 89,166,144,100, 10,147,232, 90,160,164, 52,195, 6, 0, 22,147, 5,160, 20, 20, 20,198, +188, 60, 86, 51, 24, 12, 6,131,193,168, 24, 69, 60,200,163, 98,176, 58, 19, 66,238,114, 30,102, 99, 94, 97,244, 74,130,104,181, +218, 13,212,252,249,243,161, 80, 40,160, 82,169,160, 80, 40,236,134,200, 21,131, 85, 80, 80,128, 26, 53,106,192,108, 54,163, 94, +189,122,160,148,226,185,231,158,187,107,189,163, 71,143,186,149, 17, 81,162,136,250,100,193, 93,203,255, 89, 55, 11,141,235, 87, + 71,203,218,122, 20, 88,100,100,231, 91, 43,108,216, 0,160,192, 44, 66,198,157, 73, 7,140,121,249,172, 90, 48, 24, 12, 6,131, + 81, 62,156,122,144, 71,194, 96, 21,134,228,238,114,141, 5,249,249,176,138, 86,187,201, 50,155,205,144,101, 25,111,189,245,214, + 93, 66, 59,119,238,132,217,108, 46,253,207, 20,138,212,215, 94,123,173,200, 20, 9,148, 82,252,246,219,111, 80,171,213, 69,162, + 88,132,184,103, 98, 69,137, 98,250, 71,239, 67,165,224, 33, 40,108,134,136,131, 44, 3,127,110,254, 27,127,110,254,219,190, 46, +207, 11,169, 21, 49,108, 0, 96, 54, 91, 0,122, 39, 2,151,151,155,195,170,135,139, 16, 66, 8,155,158,129,193, 96, 48, 24, 14, + 62,192,169, 7,121, 36, 12, 86, 73, 20, 24,243, 32, 58,140,193,178, 88, 44,176, 90,173,248,230,155,111,138,116,231, 9,130, 0, +142,227,202,140, 96,173, 95,191,190,200,228,158,145,145,145,249,148, 82, 60,251,236,179,246,238,198,151, 95,126, 25, 35, 71,142, +116,219, 96, 89, 37,138, 25,115,230,219,117,122,118,123, 28,253,122,116,130, 92,120, 42, 79, 57,179, 65, 87, 89,134, 13, 0,204, +166, 59, 99,176, 40,128,252, 28,214, 69,232, 42,246,233, 25,166, 81,153,237, 13, 6,131,193, 96, 60,170,148,104,176, 4, 5,151, +125,229,250, 77,175,170,122, 45,172,114, 1, 36,249,206,184, 41, 73,146, 48,114,228, 72,251,122,207, 63,255, 60, 94,124,241, 69, +167, 6,203,149,167,109,203,178,140,127,254,249, 7,132, 16,112, 28,103,127,149, 18, 1,113,170,153,103,146,113, 96,237, 76,200, +148, 66,166,128, 92,120, 67,130,201, 90,118,176,196,153,102, 89,134, 77,237,233, 3,158, 80, 16, 2, 92, 73,184, 5, 5,207,101, +187,155,119,119,249,183,106, 78,159, 14, 58,189,216,148, 18,238, 14,112,103,251,147,105, 50, 77,166,201, 52, 31,109,205,255,140, +193, 34,148,188,183,116,211,225,249,162, 36,123,217,150, 53,104,208, 0, 22,139, 5, 91,183,110,181, 27, 15,158,231,237, 93,122, +174,140,193, 42, 70,124,199,142, 29, 75,155,138, 33,222, 21, 17, 10, 26,223,162,203,224,208,210,126,119, 55, 97,101, 25,182,239, +246,158,253,255,157,200,113,217, 28, 33,239,177,226, 84,194,254,167,182,251, 45,139, 78,207,192, 96, 48, 24, 12,198,127,206, 96, +197,197,199,175, 1,176,198,113, 89,207,158, 61, 83,250,245,235,167,181, 90,173, 48,153, 76,176, 88, 44, 48,155,205,176, 88, 44, + 48,153, 76,208,104, 52,110,205,184,233,202, 36,162,174,144,122,102, 99,221,202,220, 41,174, 24,182,164,164,164,186,172,248,184, +111,181,238, 60,143,144, 25, 45, 6,131,193, 96,252, 71, 13,150, 51,140, 70,163, 1,128, 34, 49, 49,241,174,223,110,222,188, 9, + 0,214, 71, 97,167, 84,182, 97, 99,148,110,180,254,141, 51,208, 51, 24, 12, 6,131, 81,105, 6,107,207,158, 61,214, 71,197, 68, + 49, 30, 34,163,197,204, 21,131,193, 96, 48, 30, 49,216, 76,218, 12, 6,131,193, 96, 48, 24,149, 12, 1,208,200,217, 15,238,220, + 29, 64, 8,105,228,238, 31,151,165,207, 52,153, 38,211,100,154, 76,147,105, 50,205, 71, 79,179, 44,109, 74,233, 25, 66,200, 72, + 74,233, 55,255,106,131,117, 47,231,124,100,183,176, 50, 77,166,201, 52,153, 38,211,100,154, 76,179, 28,250,255,122,131,197,186, + 8, 25, 15,140,200, 81, 49, 90,182, 23, 24, 12, 6,131,241, 40,162,120, 24, 19, 21, 25, 25, 89,141, 82,218,156,227,184, 42,148, +210, 29,209,209,209, 55,217,161, 42,215, 21,128,130, 82,106,125, 24, 53, 67,135,172,253, 93, 45,231, 62,101,232,119, 62,190,157, + 82,211,112,221,186,103, 37,118,196, 24, 12, 6,131,193, 12, 86, 33,173, 90,181,138,144, 36,233, 5, 0, 67, 0,156,142,142,142, +126,193, 93,141,182,109,219,106, 68, 81, 28, 13,160, 21, 56, 69,243,199,154,116, 12,106,222,186, 35, 50,242,101,236, 88,251, 89, +108,231,206,157, 91,236,217,179,199,228,142,102,139, 22, 45,126,167,148,118, 47,193, 36,124,124,252,248,241, 57,238,232, 53,109, +218,180, 27,207,243,239, 1,128, 36, 73,243, 79,158, 60,185,227, 97, 60,160,254,254,254,122, 47, 47,175,143,106,213,170,213,237, +133, 23, 94,168,217,190,125,251,244,164,164,164, 99,162, 40,206, 77, 76, 76, 60, 93, 94, 77, 31, 31,159,143, 26, 54,108,248,212, +203, 47,191, 92,189,125,251,246,233,137,137,137,199,172, 86,107,185, 52,219,188,123, 36,156,230,165,117, 95,191,244, 13,140,153, +181, 38,236,180, 85,243, 2,128, 21,110, 27,241, 81,235,171,113, 10, 94,113,236,171,190, 9, 0, 16, 17, 17, 17, 46,138, 98, 39, + 89,150, 27, 43, 20,138,211, 60,207,239,141,139,139,187, 94,145,253,249,111,209,100, 48, 24, 12,198, 35, 96,176, 26, 52,104,160, + 87, 42,149,207,112, 28, 55,180,105,203,246,237,250, 62,251, 18, 17, 57, 45,102,143,123,222,237,200, 70,100,100,100, 43, 16,254, +155, 23,223,142,170, 25, 86,163, 30,212, 58,111,228,153,129, 91, 89, 50, 84,249, 18, 66,155, 92,169,126,237,200,154,118, 0,118, +185,163, 75, 41,237,190,118,203, 17, 36,103, 74, 32,228,206,104,126,142, 3,114, 11,100, 76, 30,209, 97, 50, 0,183, 12, 22,199, +113,147, 94,153,187,183,149, 76,129, 31, 38,118, 84, 2,120,232, 12,150,193, 96,104,219,166, 77,155, 21,227,198,141,171,230,231, +231, 7,189, 94, 15, 65, 16, 2, 19, 19, 19,251,188,249,230,155, 61,130,131,131, 39, 36, 38, 38, 46,117, 87,179,123,247,238,171, +222,127,255,253, 0, 66, 8, 20, 10, 5,148, 74,101, 96, 98, 98, 98,159,247,222,123,207,109, 77, 66, 8,215,176,235,136, 17,158, + 1, 29,193,113, 4,222,122, 13,178,226, 78, 15,138,136,120,107, 93, 92, 92,156,203, 38,186,217,168, 45, 83, 40,212, 31,200, 86, + 66, 26, 61,191,108,235,237,125, 51,111,212,169, 83,135,140, 24, 49,226,182, 36, 73, 70, 81, 20,253,151, 47, 95,254,166,193, 96, +160, 28,199,237, 49,153, 76,255,164,165,165,229,150,150,176, 25,133,143,243, 89,177,194,199,195,108,214,118,160,148,118,172, 91, +183, 46,121,229,149, 87,210, 69, 81, 52, 22, 20, 20, 4,172, 88,177,194,117, 77, 7,170, 86,173,234,161, 82,169, 30,167,148,118, +170, 80, 58, 29, 24,212,141,156, 92,183,131, 54, 45,239,239,197,178,239, 13, 64, 67, 41,189,233,194,186, 1, 0,116,148,210,216, +251,173,121, 47, 8, 14, 14,206,162,148, 10,238,108,163, 84, 42,125,221, 41,175, 12, 6,131, 25,172,210, 26, 64,210,172, 89,179, +246,132,144, 97, 17, 53,106, 61, 51,224,133, 81,218,136,218,141,144, 43,123, 33, 54,141, 34,102,247,207, 32,132,252,230,170, 94, +173, 90,181, 84,222,222,222, 83,195, 30,107,241,246,200,119,167,115,103,110,105,176, 55, 86,130,130, 51,131, 7, 96,206, 79, 69, +118,242, 69,220,186,180,199, 40, 73,210,145,242,100, 46, 49,195,138,125, 23,205,224,185, 59,230,138,231, 8, 20,229,159, 63,188, + 26, 5,240,215, 41, 35, 8, 33, 65, 15,219,129, 12, 13, 13,125,170, 79,159, 62,235,198,142, 29,171,200,207,207, 71, 65, 65, 1, + 40,165,208,104, 52, 48, 24, 12,248,237,183,223, 20, 67,134, 12,249, 52, 36, 36,228,100, 66, 66,194, 81, 87, 53,135, 15, 31,190, +238,141, 55,222, 80, 92,188,120, 17, 22,139, 5, 90,173, 22, 26,141, 6,190,190,190, 88,190,124,185,226,213, 87, 95,117, 73,179, + 94,189,122,173,213,106,245,172,150, 45, 91,182,168, 85,211,159, 79,243,125, 12, 0, 16, 86,163, 54, 60,113,171,227,181,228,128, +212,230,205,155, 95,202,207,207,159,115,233,210,165, 63, 74,211,106,244,250, 22, 31, 5,200,184,165,227,218,113, 10,158, 39, 99, + 62,255,167,231,234, 63,246,126,217, 49,178, 86, 6,128,188, 45, 91,182, 20,244,236,217,211,252,202, 43,175, 88, 46, 93,186,196, +125,254,249,231, 77,118,237,218,213, 55, 36, 36,100,127, 66, 66,194,207,206, 52,103, 76, 7,217,146,252,199, 5,139,104, 13,169, +210, 81, 52,245, 8, 57,183,248,213, 87, 71,102,135,132,132,136,133,154,166,158, 61,123,154, 71,141, 26,101,190,122,245, 42,153, + 63,127,126,163,237,219,183,247, 14, 13, 13,221, 31,127,231,169, 7, 37,210,124,200,162,191, 3,154, 62,167,236,213,178,202,129, +183,198,188,150,101, 48, 24,172,229, 77,103, 49,106, 87,240,119, 71,120, 0, 51, 9, 33, 63, 82, 74, 15,149,210, 14, 52, 5, 48, + 8,192,231, 15, 72,179, 84,180, 90,109, 92, 65, 65,129, 63, 0,104, 52,154, 84,163,209, 24,225,194,197, 24, 89,180,104, 17,148, + 74, 37, 56,142,131, 36, 73,144, 36, 9,178, 44,131, 82,106,127,183,221, 16, 52,113,226, 68,214,157,205, 96, 48, 42,207, 96, 53, +111,222,124,125,207, 1, 47, 61,217,166,227,147,176, 42, 3,113, 49,133, 32, 62,150, 66,193, 91,193, 65, 70,236,177,141,148,231, +249,159,139, 53, 92,103, 74,138,128,121,123,251,236,126,118,212,244,250, 53, 26, 62,142, 77,231, 44,144, 37, 51,210, 46,252,133, +204,235, 71,145,119,235,130, 89, 52,229,158, 35,132, 28, 84,169, 84,159,159, 62,125, 58,191, 44, 77,103,220,121,134, 32, 5,161, + 4,144, 1,128, 2, 28,113,214,192,150,169,201,113,220,233,141,187,207,133, 18, 65, 15, 0, 87, 93,104,180, 43,253,238,138,146, + 52,131,131,131,123,190,249,230,155,191,244,234,213,139, 75, 75, 75, 3, 0,108,216,176, 1,199,143, 31, 71,104,104, 40,198,143, + 31,143,176,176, 48,204,152, 49,131, 31, 62,124,120, 20,128, 46,174,104,126,244,226,139,191,244,122,229, 21,238,248,241,227,176, + 90,173,216,177, 99, 7,206,156, 57,131,160,160, 32,140, 29, 59, 22, 97, 97, 97,248,240,195, 15,249,209,163, 71,151,170,217,162, + 69,139,115, 17, 17, 17,161, 47,190,248, 34,215,167, 79, 31,146,146, 3,140,254,242,226,157, 2,168, 84, 99,240,160,129, 92,143, + 79, 94,195,246,237,219,235,255,248,227,143, 43, 90,180,104, 97, 62,126,252,184,191,203,251,147, 16,234,225,229,151, 14, 32, 5, + 0,188,188,188,244, 0,242, 1,228,215,169, 83, 71,177,100,201, 18,235,197,139, 23,175,118,239,222,253,105, 0, 63,151,164,105, +181,202,213,190,159,252, 36, 94,249,120,187,122,218,180,169, 41, 28, 39,136, 0, 44, 0,224,227,227, 99,215,172, 89,179,166,226, +203, 47,191, 20, 47, 94,188, 24, 91,168,185,166,180,116,138,130, 95,187,166, 29, 26, 90,246,196,167, 55,202, 90,125,229,224, 27, +253,213,219, 27,214,240,205, 45,111, 58, 7,117, 35, 39,109,230,105, 80, 55,146, 95, 70,148, 43, 31,192,255,138, 71,178,138,107, + 82, 74,111, 19, 66,190, 3,176,134, 16, 50,212,153, 33, 34,132,180, 5,176, 10,192, 51,148,210,212,178,202,167,163,166, 90,173, + 86,154,205,102,159,226,198,199, 93, 77,135,180,228, 71, 71, 71, 35, 50, 50, 18,142,239,182, 11,139,194,117,252, 93,173, 71, 60, +207,227,235,175,191, 6,199,113, 80, 42,149, 16, 4, 1, 74,165,242,174, 87,211,166, 77, 65, 41, 5, 33,196,229,250, 78, 8,225, +195,194,194,198, 41, 20,138,225,102,179, 57, 88,173, 86, 39,139,162,184,202,207,207,239,211,232,232,104,241, 97,104, 67,152, 38, +211,124, 24, 52,203,160, 37, 0,199, 58,109, 6,160, 42,252,156,134, 59, 29, 85,126,197,150, 59,174,103,123,183,181, 51,254,133, +219, 81, 7,221, 84, 0,199, 42,213, 96, 17, 66, 40,165,148,216,222, 75,216,153,158, 9, 70, 31,228,198,250, 67,193,201, 80,240, + 4, 10, 30, 0, 8,210, 19,206,163, 32, 55,237, 96,116,116,116,156, 43,127,170,209,104,102, 13, 26, 51,167,190,228,215, 18,155, + 79,153, 33,102,199, 35, 97,239,103, 52, 63,245,242,119, 60,207,255, 40, 73,210,133,152,152, 24,177,162,153,147, 41, 32, 57, 26, + 43, 25, 32, 40,247,180, 20,142, 15,140, 78,126, 88, 28,178,193, 96,232, 59, 97,194,132,159,155, 55,111, 78, 86,174, 92,137, 70, +141, 26,225,187,239,190,163,151, 47, 95, 94, 72, 8, 89, 24, 23, 23,215, 37, 47, 47,239,199,159,127,254, 25,109,218,180,129,183, +183,119,211,200,200, 72,161,180,134,221, 96, 48,244, 93,241,214, 91, 63, 55,110,223,158,204,239,214, 13,134,231,158,195, 47,123, +247,210,216,216,216,133,132,144,133,241,241,241, 93, 10, 10, 10,126,252,246,219,111,209,162, 69,139, 50, 53,121,158, 15, 89,179, +102, 13,175,211,233,192,243, 60,194, 53, 64,128,143, 18,159,174,189,136,212,172, 2,124,240,140, 1, 10,133, 2,221,186,117, 67, +112,112,176, 98,204,152, 49,165,222,221,122,102, 73,207,204,102,163,182, 44, 24, 61,255,192, 4,142,112,180, 70,128, 98,183, 55, +159,121, 30,240, 81, 0,240,246,247,247, 23, 1,192,108, 54,103,109,222,188,217, 26, 19, 19,227, 91,163, 70, 13, 63,119,246,235, +137, 19, 39,243,171, 84,241, 75,175, 94,189,186, 2,128,183,159,159, 95,133, 52,135,245,108,162,202, 53,154,177,231,248,181, 14, +175, 68,237,110, 95,221,224,121,170, 95, 75,223,157, 0,242,220,213,180,153,165, 65,221, 72,254,186,117, 7, 83, 65, 37,192,154, + 35,194,146, 37, 66,202, 18, 97,201,182, 66,188, 45, 14, 26,187,160,209,186, 29, 84,231, 70,131,121,148, 16, 50, 20,192,170,226, + 38,203,193, 8, 13,165,148,158,118, 87,211,108, 54,239,176, 25, 31,141, 70,227, 79,200, 29, 99,168,209,104,196,130,130,130, 30, +238,104, 2, 64,116,116, 52,154, 55,111,238, 81,168, 73,109,239,133,134,213,109,108, 15,173,231,121, 30,205,155, 55, 71,159, 62, +125, 80,167, 78, 29, 36, 36, 36, 96,207,158, 61,184,124,249,178, 61,194,229, 14,132, 16, 62, 34, 34, 98,215,147, 79, 62,217,224, +237,183,223,214,132,133,133,225,226,197,139,161, 75,150, 44,121,231,159,127,254,233, 21, 25, 25,249,120,105,117,145,193,248, 47, +224,138, 7, 1,224, 79, 8,217,228,208,182,244,182,125,159, 56,113,226,228,168,168,168,179,132,144, 77,142,203, 29,215,115,124, + 47,252,207, 77,148,210,222,147, 38, 77,106, 56,119,238,220,143,109,235, 62,144, 8,150, 32, 8,207,159,217,186,240,192, 99, 22, + 26, 20,208,176, 87, 97, 91, 70, 0, 80, 92, 63,185, 21,178, 44,175,114, 69,167, 89,179,102,143,135,214,109,243,154,161, 78, 27, +108, 57,105, 66,206,149,109,184,121,232,171,120,217,106, 30,125,226,196,137,125,149,145,169,230,205,155, 63, 83,165,106, 16, 76, + 22, 90,104,176,138,154,172, 71,133,176,176,176,129,115,230,204, 89, 94,179,102, 77,178,110,221, 58, 80, 74,241,235,175,191,210, + 43, 87,174,140, 73, 78, 78, 94,105, 59, 31,215,169, 83,231, 43,158,231,181, 28,199, 33, 52, 52, 84,121,234,212, 41, 3,128,235, + 37,105,254, 50, 97,194, 79, 77,235,212, 65,226,160, 65,232, 96,181,226,251, 21, 43,232,117, 89, 46,162,249,216, 99,143,125,165, + 80, 40,180, 60,207, 35, 44, 44, 76,121,242,228,201, 18, 53, 1, 64, 20, 69,156, 58,117, 10, 10,133, 2,190,190,190,248,228,197, + 16, 28,185,112, 27,141,107, 4,192,152,145,128,181, 59, 79, 32, 54, 54, 22, 62, 62, 62,174, 25,160,101, 61,103,133, 63,214,188, +222,138, 85,107,147,212, 52,227, 76,122,122,186, 95,122,122, 58,188,188,188,178, 36, 73, 18, 63,253,244, 83,225,202,149, 43,222, + 26,141, 6,106,181, 26,162, 40,186,229,172,173, 86, 43, 87,217,154, 85, 60, 53, 24,208,181,129,242,233,118,143,225,159,147,215, + 35, 63,251, 45,182, 81,252,249,221, 35, 42,162, 9, 42, 1,135, 30,143,185,107,121,200,112,255,114, 94,149, 30, 42, 52, 89, 91, + 8, 33,202,194,197, 41,133,239, 67, 75,235,234, 43, 67,211,254,221,100, 50, 57, 70,153,132,242,104, 70, 70, 70,218, 52,228, 98, + 23,111,169,182,200,149, 70,163, 73,117, 85, 79,146, 36,168, 84, 42, 52,108,216, 16,239,189,247, 30, 46, 94,188,136,127,254,249, + 7, 1, 1, 1,232,222,189, 59, 20, 10, 5,226,227,227,221, 54, 88,193,193,193,227,158,120,226,137,122,139, 22, 45,210,196,197, +197,225,226,197,139,240,242,242,194,172, 89,179,180, 19, 39, 78,172,113,224,192,129, 73, 0,102,178, 83, 44,131,225,114,123,210, +187,248,119, 66,200,166,168,168,168,222,206, 76,149, 19, 51, 87,100,249,220,185,115, 63,118,248,158, 81,153,105,229, 28, 29,100, +105, 43,138,162,216,214,167,170,193,127,228, 11,221, 33,203,128, 85, 6,172, 18, 69,126,126, 30,110, 94,220,147,111,177, 88, 54, +148,245,103, 13, 26, 52,208, 19, 94,185,244,229, 55,167,144, 45, 39, 76, 40,184, 29,135,228,131, 95,222, 80,112,180, 85, 37,155, +171,229, 83, 62,253, 30,199,174,153, 11,187, 9,239, 68,178, 36,249,206,231, 71, 1,131,193, 80,167,119,239,222,203,107,212,168, + 65,214,174, 93, 11,147,201,132,248,248,120, 26, 19, 19, 51, 42, 49, 49,113,165, 67, 3, 63,188, 71,143, 30, 90,158,231, 33,138, + 34,174, 93,187,150,119,235,214,173,248,146, 52, 95,121,252,241,229,141, 67, 66,144,240,194, 11,144,178,178,112, 74,171,165,199, + 40,189, 75,243,153,103,158,209, 42,149,119,206,191, 87,175, 94, 45, 81,179, 88,193,134,217,108, 70, 98, 98, 34, 78,199, 28, 65, + 94,252, 33,252,178, 98, 25, 86,172, 88,129,216,216, 88, 40, 20, 10, 88,173,174,223, 39, 97,205, 79, 49,213, 52,104,115, 28,151, +101,103,103,123,199,196,196,200, 23, 46, 92,240,182,157, 56, 1, 64,150,229,114, 91,235,226,154,246, 8,105, 57, 53,181,106, 1, + 93, 90,212,224, 69,153, 42, 43,156, 78, 41,199,226,116,185,229,182, 88,129, 6,236, 16, 0,165,195,184,163,128,242,154,171, 98, +198,231,174,174,181,242, 18, 29, 29,109,139, 88, 21,193,104, 52, 70, 80, 74,117,209,209,209,112,101,252,149,195,177,132, 74,165, + 66,223,190,125,113,225,194, 5, 36, 38, 38,130,231,121,152, 76, 38,152, 76, 38, 52,111,222, 28, 74,165,210,237,244,171,213,234, +231,223,126,251,109, 93,108,108, 44,210,211,211,193,113, 28,172, 86, 43, 36, 73,194,171,175,190,170,211,104, 52, 67,216, 41,147, +193,112,238, 65, 8, 33, 35, 9, 33, 35,139, 27,164,138, 26, 52,103, 26,147, 38, 77,106, 8, 64,125, 79, 34, 88,182,240, 92, 73, +166,197,167,170, 97,249,164,168,239, 20,235, 79,241,200, 72,190,132,130,148, 75, 8,109,222, 15, 41,151, 14,128, 74,150, 63,206, +157, 59,151,231, 66, 99, 51,110,192,107,211,195,246,199,169, 97,180, 20, 32,245,159,207,100, 66,173, 35,143, 28,137,206,169, 44, +115,229,227, 87,109,249, 71,159,124,175,248,227,172,128,219, 73,151,112,113,227, 4, 72,150,252,226, 7,109,155,155, 7,158, 68, + 70, 70, 86,171, 29,164, 5,167, 84,227, 48, 33, 1,131, 6, 13,226,215,173, 91,247,192, 6,187, 38, 37, 37, 93, 50, 24, 12,179, +205,102,243, 20,142,227,112,243,230, 77,122,242,228,201,145, 9, 9, 9,171,109,235,132,134,134, 62,213,170, 85,171,133, 19, 39, + 78, 4, 33, 4,187,118,237, 66, 94, 94,222, 1, 74,169, 92,154,166,239,217,179, 83, 58,229,231, 99,131,159, 31, 93, 38, 73,119, +105, 62,249,228,147, 11,223,125,247, 93, 16, 66,176,127,255,254, 82, 53, 29,137, 77,163,200, 51, 1, 17,126, 28,124,124,124,176, +103,207, 30,251,120,151, 76,209, 19,146, 85, 5,131, 96, 44,247, 62,145,101,153,100,102,102,242, 70,163,145, 23, 69,145, 83, 40, + 20,212,118, 18, 22, 69, 81,174, 44, 77, 73,146, 42,164, 89,236,194,165, 98,233, 20,179,156, 27, 41,115,106,101,116, 59,153, 11, +223, 85, 21, 49, 87, 54,227, 99, 27,128,174, 86,171,237, 70,197,157, 40, 83, 9, 17,172,114,253,238,204, 96, 9,130,128,218,181, +107,227,208,161, 67,240,242,242,130,135,135, 7,180, 90, 45,212,106, 53,188,188,188,160, 82,169,192,113,156, 91, 38,203, 98,177, +132,132,132,132,224,127,255,251, 31, 52, 26,141,253,165, 82,169, 80,167, 78, 29,228,231,231, 27,216,169,149,193,112,238, 65,156, +205,228, 94, 25,221,120,206, 76,214,220,185,115, 63,118,140,130, 85,170,193, 42,213,180, 84, 53, 44,159,248,241,119,138,117, 49, + 28, 50,147, 47,226,250,214,201, 86,201,146,159, 42,203, 98, 80,198,213,127, 32,203,242, 74, 23, 51,213,161, 90,141,198, 56,112, +194,130,130,139,191,193,156,121,237,203,232,232,232, 3,149,105,174, 38,207,253, 94,241,251, 41, 5,110, 39, 93,194,213,205, 19, + 37,171, 57,239,181,152,152,152,181,229,213,109,221,186,117,173,182, 45,154,125, 61, 44,208,210,166,239,160, 26, 80,105,149,152, +112, 85,241,196,185,131,113,251, 91,180,104, 49,234,248,241,227,231, 30,160,201,154, 91,173, 90, 53, 33, 52, 52,116, 66, 98, 98, +226,171, 73, 73, 73,191, 56, 68,153,122, 14, 24, 48,224,151,209,163, 71,115, 94, 94, 94, 72, 79, 79,199,180,105,211,140, 60,207, + 79,112, 69,115,167,159,223,132, 99,146,116,151,102,167,126,163,126,153,240,206, 75,156, 32, 8, 72, 75, 75,195,140, 25, 51,202, +212,164,154, 32,242,220,231, 55,224,161, 21,160, 86,106, 16,127, 32, 15, 31, 63,115,167,171, 72,169, 84,226,120,118, 35,112, 94, + 97,208, 42, 21,136, 73,200,128,232,121,142, 68,142,138, 17,162,151, 53, 47,211, 36, 16, 66,164,180,180, 52, 33, 54, 54, 86, 99, + 54,155,185,136,136,136, 2,224, 78, 23, 95, 70, 70,134, 82,165, 82,129, 16, 98,177, 90,173,110,197, 46, 51, 50, 50, 20, 87,174, + 92, 83,139,162, 88,162,166,197, 98,169,112, 60,180,162,233,132,152,229, 60,228,103, 73,171,168,193,138, 39,132,132,218, 62, 87, + 70,121, 45, 40, 40,240,119,232, 26, 4,165,174,143, 15, 43, 33,130, 85,238,223,157,180, 77, 80,169, 84,184,114,229, 10,252,253, +253, 97,181, 90,161,215,235,161,213,106,161,213,106, 97, 52, 26,161, 82,169,192,243,188,211, 65,238, 37,161, 82,169, 18, 46, 94, +188, 88,219,199,199, 7,178, 44, 23, 49, 89,177,177,177,208,235,245, 73,236,212,202, 96,184, 21,240,216,228,104,180, 8, 33,155, + 38, 78,156, 56,185,188,122, 19, 39, 78,156, 92,209,168, 88,169, 6,203, 54,168,172,248,224,178,230,205,155, 63,227,237, 23,180, +252,131,217,223, 42,126, 62,206, 33, 43,249, 2,146,182,127,104,149, 44,249,195, 5, 65, 56,116,227,192,178, 85, 28,199, 25, 79, +158, 60,249,143, 11, 59,133,139,108,243,120, 99, 94,233, 1, 74,141, 40, 72, 60, 2,133, 66,177,176, 50,205,213,196,168,239, 20, +235, 78, 40,144,145,124, 17,215,255,154, 36, 73,150,252,114,155,171,206,157, 59, 43,114,115,115,199, 54,212, 75, 31,189, 23, 38, + 42,131, 85, 50,206,127, 61, 1, 23,195,188,208,176,141, 22, 17,117,165, 38, 71,182,153, 14, 70, 70, 70,206, 55,153, 76,115,207, +157, 59,103,121, 16,133,237,230,205,155,179, 66, 66, 66,254, 72, 74, 74,178,223,209, 97, 48, 24,250, 14, 29, 58,116, 85,167, 78, +157,184,213,171, 87,163, 95,191,126,152, 58,117, 42, 77, 75, 75,123, 43, 41, 41,233,106,121, 53, 7,188,253,227,207,131,122,181, + 37,131, 63,248, 28, 83, 94,235,130,239,191,156, 83,166,166,111,175,149, 71, 66, 13,189,248,199,124,141, 24, 51,184,253,157, 43, +133, 95, 46,224,242,173, 59, 1, 79, 81, 86, 32, 11,129,248,122, 68, 19,112, 28,193,190,227,151,241,227,173, 70, 36, 49,110,207, + 25,160,121,221,210,210, 41, 73, 18,249,233,167,159,188, 82, 82, 82,184, 58,117,234,220,110,210,164, 73,158, 74,165,146,141, 70, +163,164,209,104,172,122,189, 94, 46, 40, 40, 80, 93,191,126,189, 74, 98, 98, 34,111,235,134,115,133,237,219,183, 7,213,173, 91, + 63,189, 89,179,102, 37,106, 38, 37, 37,113,238,104, 58,163,162,233, 44, 49,130,101,169, 88, 4,139, 82, 90,151, 16,146, 95, 17, + 19,116,175, 40,140,132, 1, 64, 94, 73, 83, 49,184, 19,193,178,141,171, 82,169, 84, 56,120,240, 32,158,126,250,105,200,178, 12, +181, 90,109,159,150,228,232,209,163, 80, 42,149,224,121,222,173,180, 90, 44,150,213, 95,126,249,229,251,115,231,206,213,219,186, + 33,117, 58, 29, 84, 42, 21,230,207,159,159,103, 52, 26,127, 97,167, 76, 6,139, 94, 57,247, 32,197, 72, 45, 22,189, 50, 59,124, + 79,197,157,103, 43,247, 46,252, 12, 39,159,205, 78,150,165, 71, 69, 69,237,118,136, 92,165, 86,102,190, 74,140, 96, 53,107,214, +236, 9,159,170,134,229,239,207,254, 86,177,226, 8,143,204,228,243, 72,219,253,145, 85, 22,141,195, 99, 98, 98,108,227,173,186, +185,250, 71,145,145,145,181,194,235,182,214,165,228,200,160,178, 21,214,172,107, 41,199,143, 29, 73,169,104, 6,154, 53,107,246, +132,143, 95,181,229,227,231,124,167, 88, 29,173, 64,102,210, 5, 36,109,255,176, 66,230,170,105,211,166,221,212, 10,238,251,183, + 67, 68,223,222, 85,173,144, 40,176,242,166,128, 53, 39,142,252, 99, 33,178,169, 97, 91, 77,183, 70,237, 85,120, 98,136, 78,113, +245,180,101,194,241, 29,120,163, 89,179,102,195, 79,156, 56,177,245, 65, 20,206,132,132, 4,187, 17, 10, 9, 9, 25, 48, 98,196, +136,159, 58,119,238, 76,182,110,221, 10, 89,150, 49,111,222, 60,122,234,212,169,183, 29,163, 81,238,106, 14,120,251,199,159, 6, +246,125,146,124,184, 78,196,237,124, 29, 62,152,254, 57, 53, 39,157, 46, 83,179, 65,168,178,193,215, 31, 13, 3, 0, 28, 62,119, + 19, 59, 79,101, 32, 49, 45, 31,175,180, 2,206, 1, 80, 16, 17, 85,184,155,152,242,227,105, 52,137,240,192,179, 93, 30, 67,199, + 22,143, 97,241, 79,127,133, 86,237,254,113,181,180,109,147, 75,156,164, 82,150,229,180,237,219,183,235,166, 76,153,146, 27, 20, + 20,164,200,205,205,229, 28,199, 48, 41,149, 74, 4, 5, 5, 89, 51, 51, 51, 45,219,183,111,175, 46,203,242,237, 82, 43,131,130, +187,249,202,199,219, 67, 84,156, 92,240,204, 51, 3,104,213,170, 85, 21, 70,163,209,169,102,122,122,186,101,215,174, 93, 53,100, + 89, 78, 43,107, 95,242, 82, 78,218,252, 85,251,124, 6,117,107, 34, 84, 55,220, 61,136,223,221,116, 22, 53, 88,183, 69,132,190, + 84, 21,230,219, 34,204,169, 86, 88,210, 69, 88, 82, 69, 88,243, 30,186,219, 57,202, 59, 0,189,140, 72,152,127,101, 69,176,148, + 74, 37,226,227,227,177,115,231, 78,180,106,213, 10,158,158,158,200,203,203,195,161, 67,135,112,243,230, 77,123, 4,203, 29,110, +220,184,177, 64, 16,132,158,111,190,249,102,221,209,163, 71,235,235,213,171,135,184,184, 56, 44, 88,176, 32,255,244,233,211,177, +190,190,190, 81,236,244,202, 96,184,196,177,127, 91,130, 21,165, 92,213,125,208,246,217, 41,138,229,135, 21,200, 72, 60,139,172, +253, 83,139,155, 43, 87, 66,121,246,167,109, 75,146,212,180, 97,179,182,184,122,203, 10,107,118, 28, 64,165, 19,229, 12, 15, 22, +121,130, 55,199,113,239,183,123,118,138, 98,197, 49, 5,178,146,206, 35,117,247, 20,183,205,149, 19,205,137,187, 63,120,214, 23, + 86, 43, 78,109,249, 5,159,199, 43,243,174, 25,201,132, 19, 39, 98,126,162,148,210,102,205,154, 13, 73,184, 44, 46,104,221, 67, +227, 53,112,192,115, 24,240,140, 85,255,238,203,203,199, 3,216, 90,146,102, 37,133, 70, 75,213, 52, 24, 12,117,234,215,175,191, +188,103,207,158,100,195,134, 13,200,201,201, 65, 70, 70, 6, 14, 31, 62,252, 70, 82, 82,210, 79,229,213, 12,106,208,103,249, 51, +125,158, 36, 83,126,149,112,233,200, 90,120,152,110,192,148,124,196, 37,205, 51,241,150,147, 47,140,255,161,153, 90,163,133,164, + 13,198,251,253, 12,168,231, 79, 96,204,255,255, 33,123, 45,171,252, 15,185,200,196, 63, 39,170,225,143,191,247,129,151,243,113, + 35,165, 32, 33,109,231,255,155, 43,103,233, 76, 77, 77, 29,175, 84, 42, 59,142, 24, 49,226,185,199, 31,127,220,115,228,200,145, + 41, 94, 94, 94,121, 42,149,138,247,245,245, 85, 81, 74, 85,127,255,253,183,225,230,205,155, 85, 0,172, 73, 77, 77,221, 87, 82, + 58,167, 77, 7,197,244,190,245,206,159, 7, 57,118,204,240,248,240, 93,194,144,199, 31,127,220, 99,228,200,145,169,142,154,146, + 36,169,254,254,251,239,224,155, 55,111,250, 0, 88,157,154,154,186,191,172,253,121,106, 77, 74,141,218,221, 19,166,126,117, 59, +231,173,154, 33,254,124,255,110, 13,133, 42, 30,119,158,115,237,110, 58,129, 98,243, 96,189,253,121,227,210,202, 76, 73,243, 96, + 61,136,242,105, 52, 26, 35,220,141,138,185,146,206,152,152,152,252,226,243, 97,149, 22,193, 42, 73, 83,165, 82, 65,161, 80, 32, + 53, 53, 21,219,183,111, 47, 50, 23,150, 74,165,178, 79,227,224,142, 38,165, 84, 34,132,116,149, 36,105,220,187,239,190, 59, 60, + 63, 63, 63, 88,167,211, 37,155,205,230, 85, 85,170, 84, 41,117, 30,172, 7,113,140,152, 38,211,124,144,154,143, 26,165,141,193, +210,254, 19,125, 25,188, 58, 5, 57, 71, 62,117,219, 92, 57,227,230,237, 2, 36,104,172, 16,111, 95, 2,128,147,149, 20, 90,244, +220, 31,115, 5,130, 38, 29, 89,135, 63,145,100,209, 88,161, 49, 87,133, 5, 71,132,213, 10,243,222,213,120,251,178, 38,157,112, +124,171,152,152, 99,183,108,191,159, 56,113,226,151,102,205,154,237,218,182, 34,239,120,183,142,214,170,167, 99,255, 0,199,113, +150, 7,125, 48, 11, 7,169,207,249,245,215, 95,167,228,229,229,225,246,237,219,244,232,209,163,163, 19, 19, 19, 87, 85, 84,243, +243, 31, 6, 76,185,124, 41, 11,218,156, 35,212,116,125,227, 24,199,187, 10, 75, 35,115,243,176, 14, 13, 94,221,218,142,100,158, +105,165,187,188,244,221, 63,210, 13, 62,134,215, 95, 39, 65, 65, 65,168, 82,165, 10,252,252,252,144,155,155,139,171,199,255,162, +198,228,100,147,213, 35,242,107,115, 80,215,237,169, 59,251,254,227,194,177,167, 0,246, 70, 70, 70, 30,220,179,103,207,211, 7, + 14, 28,232,219,181,107,215,148,118,237,218,229,198,196,196,132,199,198,198, 6, 0,248, 51, 32, 32, 96,107,153,115, 13, 81, 74, +167,253,255, 93,105,123, 34, 35, 35, 15, 20,106,246,233,214,173, 91,106,155, 54,109,114, 99, 98, 98,194,227,226,226,252, 37, 73, +250,163, 86,173, 90,219,246,236,217, 99,117,173,140, 78,147, 1, 76,111,252,212, 7,243, 46,100,234, 23, 92, 77,188, 61,184,241, + 99,193, 4, 0,113, 59,157, 40, 54, 15, 86, 41,243, 92,149,245,187, 11, 68,223,131, 98, 90, 97,205,226,145,176,230,205,155, 71, +216,204, 84,241,119, 55,234, 60,154, 52,105, 2,199, 59, 29, 57,142, 43,242,226,121, 30, 10,133,162, 60,109,148, 4, 96, 94,225, +139,193, 96,252,215, 13,150, 66,161,248, 32, 47,250,139,153,148, 82,127, 0, 19, 99, 98, 98,182, 85,228,143,148, 74,229,129,152, +191,191,205, 84, 5, 95,240, 41,136,223,151,199, 17,178,162, 50, 50, 64, 8, 25,159, 23,253,197, 76, 0,126,178, 44,127,116,226, +196,137, 63, 43,170, 41, 73,210,252, 14, 11, 54, 2,208, 18, 73,146, 62, 59, 25, 29,115,171,248, 58, 39, 78,156, 72,107,218,180, +233,107,239,189,178,194,254, 0,232,135,225,128,218, 6,169,215,168, 81, 99,194,141, 27, 55,138,220, 1, 88, 81, 77,109,181,150, + 19,196,180, 19,163, 18, 19, 19,127,118,103,251,115,223, 61,125, 16,120,250, 32, 48, 97, 65,157, 58,117, 6, 77,158, 60,249,203, +250,245,235,107,171, 86,173, 74,142, 28, 57, 66,175, 94,189,106,205,203,203,251,236,204,153, 51,179,203,117,198,190, 99, 74,254, + 52, 24, 12, 59,183,111,223,254,204,223,127,255,221, 74,150,229,163,178, 44,207, 73, 74, 74, 50, 86, 84,115,219,182,109,207,108, +221,186,181, 21,165,244, 16,165,244,143,196,196,196,130,242,104,158,254,123, 94, 62,128, 81, 13,159,248,112,234,137,188,196,101, +188,210,179,241,181,107,215, 46, 84, 32,157,255,171,224,239,101,177,225, 30, 20,209, 10,107,186, 51,253,130,139, 6,136,190,243, +206, 59,238,108,194,219,166, 40, 97, 48, 24,140,210, 26,151,123,246, 2,208,200,241,123,187,118,237, 60,154, 52,105,210,183, 81, +163, 70,186,202,210,188, 23,233,124, 20, 52,131,131,131, 27, 61,204,154,117,235,214,125,167,117,235,214, 41, 77,155, 54,253, 26, +128,130, 29,247,135, 79, 19,128,254, 30,104, 6,178, 99,196, 52,153, 38,211,116, 65,127,228,189,212,191, 31, 47,197,253, 52,115, + 7, 14, 28,200, 5,240, 7,179,181,247, 30,199, 65,234, 15,163,230,133, 11, 23, 22, 2, 88,200,142,212, 67,125,241,149,119, 15, + 52,111,177, 61,203, 96, 48,254, 11,112,108, 23, 48, 24, 12, 6,131,193, 96, 84, 46, 4, 64,163, 18,174, 52, 93,142, 86, 16, 66, + 26,149,227, 74,246, 12,211,100,154, 76,147,105, 50, 77,166,201, 52,255, 91,154,101,105, 83, 74,207, 16, 66, 70, 58,155,201,253, + 95,101,176,220,189,219,198, 45,113,118, 11, 43,211,100,154, 76,147,105, 50, 77,166,201, 52,221,215,255,215, 27, 44,214, 69,200, + 96, 48, 24, 12, 6,131, 81,201, 40,216, 46, 96,184, 66,112,112,240,204, 54,109,218,140, 60,118,236,216, 23, 55,110,220, 40,215, +236,211, 45, 91,182,108,162,211,233,166, 91,173,214, 72,171,213,170,214,106,181, 23,114,114,114,190, 62,126,252,248,154,242,166, +171,101,203,150, 45,116, 58,221, 84,171,213,218,180, 80,243, 92,102,102,230,151, 39, 78,156,248,237, 97,210,100, 48, 24, 12, 6, + 51, 88,118, 22,126, 72,170, 41, 77, 80,188, 62,159, 38, 0, 64, 68, 68, 68,184, 40,138,157,100, 89,110,172, 80, 40, 78,243, 60, +191, 55, 46, 46,238,122, 69, 18,240,111,209,252,183, 64, 8, 9,212,233,116, 47, 18, 66,158,164,148,110,203,207,207, 95, 73, 41, +173,208, 35,137, 2, 3, 3,253, 7, 13, 26,244,222, 23, 95,124,129, 17, 35, 70, 76,240,247,247, 95,156,154,154,234,214, 29,102, + 29, 58,116,120, 93,171,213, 78,127,227,141, 55,181, 45, 90,180, 32, 58,157, 14,151, 46, 93,106,190, 96,193,252,133,157, 58,117, +122,118,223,190,125, 3, 41,165,110, 61,222,229,241,199, 31,127, 87,171,213,126,248,206, 59,239,168,155, 53,107, 70,148, 74, 37, + 78,158, 60,217, 98,209,162, 69, 75, 58,117,234,212,127,223,190,125, 47, 80, 55,251,192,139,107,106, 52, 26,156, 57,115,166,197, +252,249,243,203,165, 25, 57, 42, 70, 80,234, 44, 10, 0,176,228, 43,173,209,203,154,139,174, 46, 99,205, 19,131,193, 96, 60,130, + 6,107,201, 36, 50, 69, 5,124, 0, 37,200,140, 81,170,173,223,108,246,187, 81,167, 78, 29, 50, 98,196,136,219,146, 36, 25, 69, + 81,244, 95,190,124,249,155, 6,131,129,114, 28,183,199,100, 50,253,147,150,150,150,235,202,159, 86,173, 90,213, 67,165, 82, 61, + 78, 41,237, 88,167, 78, 29,242,234,171,175,222, 22, 69,209, 88, 80, 80, 16,176,106,213,170,183, 12, 6,131,236,178, 38, 33,100, +198,116,144, 85,171,170,232, 11, 10, 52, 29, 40,165,157, 42, 43,157,255, 34, 83,165,210,104, 52,125, 4, 65,120,197,207,207,175, +106,143, 30, 61, 78, 5, 6, 6,158,191,117,235, 86,221,191,254,250,107,139,151,151, 87,170, 40,138, 63, 20, 20, 20,252, 73, 41, +117,123,198,121, 65, 16,194, 9, 33, 72, 76, 76,132, 32, 8,130, 74,165,138, 0,112,214,213,237, 91,183,110,221, 72,169, 84,206, +252,250,251,213, 26, 43,239,137,116,171,140,244,108, 64, 89,181, 14,166, 71, 45,212,127, 54,231,163,246,109,219,182,125, 7,192, + 2,119,162, 76, 90,173,246,195,181,107,215,106, 2, 2, 2, 32,203, 50,114,114,114, 80,175, 94, 61,204,158, 61, 91, 23, 21, 21, +245, 68,235,214,173, 71, 3,248,186,188,154,148, 82, 88, 44, 22, 52,108,216, 16,243,230,205,211, 77,159, 62,221, 45,205,200,111, + 98, 4,209,114,177,181, 37, 95,154, 0, 0, 68,224, 63,233, 60,195,247,184,104,185,216,162,172,101,145,223,224, 72,244, 72,102, +178, 24,247, 23,131,193,208,182,122,245,234,191,220,184,113,227, 48,207,243, 47,197,197,197,153, 42,161,125, 10, 6, 16, 1,192, + 7,119,110,172,202, 0,112,157,210, 59, 23,238,229,161,106,237, 46, 61,161,210, 13, 3,104, 99, 2, 0, 28,119,154,138,121, 43, +211, 46,236,222, 82, 33, 77,181,254, 69, 80,169, 49, 1,100,112,252, 25, 34,229,253,152,114,110,247,223,172,100, 48, 42,205, 96, +173,158, 68,124, 64, 49,110,228,115, 35, 57,158,231,201,178, 95,190,233,185,125,211,183, 95,214,111,214, 35, 3, 64,222,150, 45, + 91, 10,122,246,236,105,126,229,149, 87, 44,151, 46, 93,226, 62,255,252,243, 38,187,118,237,234, 27, 18, 18,178, 63, 33, 33,161, +196, 89,190,191,153,170,191, 36,137,249, 33, 83, 95,209,154,210, 85, 35, 23,141, 28,249,122,182,193, 96,176, 22,106,154,122,246, +236,105, 30, 53,106,148,217, 65,179, 95, 72, 72,200,190,210, 52,103, 76, 7, 81,222,214,109,237,220,132, 40,171,213,121,238,224, +171, 35,223,206, 54, 24, 12, 86,142,227,114,203,155,206,127, 19,158,158,158,159,234,245,250,222,205,155, 55,191,240,238,187,239, +238,237,219,183,111, 42, 0, 44, 95,190, 60,228,147, 79, 62, 57, 13,224,224, 31,127,252,225,255,249,231,159, 63, 23, 19, 19, 51, +203,211,211,115, 83, 78, 78,206,120, 23, 27, 70,174, 90,181,106,147,187,119,239, 62,225,133, 23, 94,128,167,167, 39,134, 15, 31, +142,130,130,130, 3, 6,131, 97, 86,114,114,242,124, 87,162, 57,106,181,250,195, 49, 99,198,168,101,133, 39, 62,250,233, 10,110, +231,222,241, 13, 58, 21,135, 55,186,169,241,236,179,131,116, 81, 81, 31, 79,116,199, 96,233,116,186,169,239,188,243,142, 58, 32, + 32, 0, 0,144,155,155,139,220,220, 92,228,228,228,192,100, 50,161,111,223,190,186,165, 75,151, 78,117,199, 96, 57,106, 94,186, +116, 9,102,179, 25, 70,163, 17, 5, 5, 5,240,244,244, 68,255,254,253,117, 95,126,249,165,203,154, 65, 55, 33, 92,183,200,159, +191, 55,102,112, 85, 0,152,255,245,186,207, 1, 99, 39,234,194,178,160,155,120, 28, 0, 51, 88,165,151, 79, 30, 64, 95, 65, 16, +250,214,170, 85,171,249,149, 43, 87, 78,137,162,248, 7,128,141,148, 82,177,130,218,157,131,130,130,166, 39, 39, 39, 47,165,148, +174,249,175,236,211,154, 53,107,174,249,249,231,159,125,183,108,217,210,107,246,236,217, 3, 0,252, 92,129,125, 40, 0,104, 93, +248,245, 82,161,177, 66,161,209,170, 67, 8,169, 14,224,176, 59, 23,125,254, 13, 58,235,101,104,127,106,215,185,123,187, 65,207, +246,247,240,247,245, 70,158, 73,194,229,184,155,161,127,111,249,253,241,106,141,123, 29,150,164,252,151, 82,207,237,201,115, 87, +179,235,211,125,219,117,125,162,155,135,183,183, 15,210,115, 68, 92,141, 75, 8,219,187,125, 99,251,192,198,189,254, 1,196, 87, +111,157,254, 59,159,213, 58,134, 59,184, 52,200,157, 0,212,215, 71,151, 14,224, 38,128, 92, 47, 47, 47, 11,128,124, 0, 25,117, +234,212,201, 90,178,100, 73,226,198,141, 27,119, 81, 74,159,112,220,174,248, 29, 6,178,100,170, 54,250,133,183,160, 86,202,202, +201, 19,199,221, 54, 24, 12, 41,101,104,238, 44, 75, 19, 0,188,180,198,118,253, 59,251, 52, 14,229,150,140, 57,189,227,213, 86, +183,147,163,243, 1, 41,207,203,195, 67, 44, 79, 58, 43,131,251,165,105, 54,155,251,249,248,248,100,221,190,125, 91, 47,138, 34, +201, 54,138,194,197,132, 2,175, 27,198,160,106, 23, 19, 10,188,178,141,162, 32,138, 34, 73, 73, 73,209,107, 52,154, 44,147,201, +212,207,213,116, 6, 5, 5, 77,141,138,138,154,244,195, 15, 63,112, 45, 91,182,132,167,167, 39,218,182,109,139,149, 43, 87, 42, +166, 77,155, 54, 35, 40, 40,232, 3, 87,210, 73, 41,109, 25, 25, 25, 73,100, 0, 25,185, 86,236,142,138,196,129,121, 45,145,111, +150,145,149,157, 11,142,227,160, 80, 40, 72,243,230,205,107,186,154,119,171,213,218,180, 89,179,102, 4, 0,114,114,114, 10,205, +213,157, 87,110,110, 30,148, 74, 21,100, 89, 86, 54,107,214, 44,168, 60,154,102,179, 25, 17, 17, 17, 8, 15, 15, 71, 78, 78, 14, +178,179,179,161, 84, 42,221,210, 52,235, 4, 66, 65, 3,180, 26,181,159, 86,163,246,163,160, 1, 0,224,202, 50,179, 78, 32, 15, +178,124, 18, 66,170,242, 60,191,180, 86,173, 90, 49, 60,207,127, 75, 8, 9,172,136, 38, 33, 36,146, 16, 50, 67,167,211,109,174, + 95,191,254,101,189, 94,255, 23, 33,100, 22, 33,164,117,121, 52, 9, 33, 42,157, 78,183,229,227,143, 63, 94,121,226,196,137,129, + 59,119,238,140, 56,117,234,212, 51,159,126,250,233,114, 15, 15,143,191, 9, 33,218,138,212,205,234,213,171,127,125,244,232,209, +200,246,237,219, 47, 33,132,168, 43,163,190, 19, 66,120, 66, 72, 19, 98,123,216,225, 67,210,134,216, 8, 9, 9,169,217,172, 89, + 51, 63,158,231,241,248,227,143, 67,146,164,246, 21,212,108, 13,224, 22,165,244, 31, 74,105, 26,165, 84, 42,124,165, 83, 74, 15, + 0, 72, 0,208,206, 29, 77, 25,218,159,222,121,119,252,147,239,191,253,154, 71,204,117, 9,223,254,157,140,181,255,164, 34, 49, + 71,141, 39,251,189,226,213,185,199, 11,221,120, 94,247,147,187,154,147, 39, 77,122,242,213,225, 67, 61,206, 36,113, 88,119, 32, + 13,255, 92,200, 70, 62,169,130,206,253, 70,250,212,111,217,227,105, 16,229,178,135,225, 24, 61,234,154,255,137, 8,214,243, 81, + 52,115,201, 36,178, 96,233,154,111, 38,112,132, 80,189,111,163,221, 70, 26,114,190,112,125,111,127,127,127,177,240, 36,148,181, +121,243,102,107, 76, 76,140,111,141, 26, 53,252, 92, 63, 50, 32,167, 78,157, 52, 86, 13,168,126,171,122,245,234,149,162,217,173, + 93, 23, 85,129,201,136, 83, 23,207,180,255,243,155,142,237,170, 4,212, 59, 21, 80,247,181, 93,144,218,229,153,173,214,204,114, +165,243, 95, 0,207,243,198, 95,127,253,245,219,237,219,183, 7,125, 52,117,230,147, 51,191,221, 27,224,213,240,185, 42,162,236, +229,177,115,225,137,220,204, 51,171, 50,110, 95,220,154, 18,217,180,225,174,254,253,251, 39,127,246,217,103,111,151,165, 25, 18, + 18,162, 81, 40, 20,143,245,234,213,235,189,151, 94,122, 9,113,113,113,120,255,253,247,141, 39, 79,158,188,221,162, 69, 11,223, +121,243,230,105, 71,142, 28,137, 67,135, 14,125, 88,189,122,245, 63, 68, 81,140, 79, 72, 72, 40,241,249,124,146, 36,169, 53, 26, + 13,140,133, 49, 5,139,149, 2,144,237,145, 39,142,102, 66,161, 80, 64,150,229,218,132,144,107,174, 68,197,172, 86,171, 90,163, +209, 32, 47, 47, 15,185,185,185, 72, 76,205,197,245, 91,121,200,201, 51,193,104, 20,145,159, 39, 66,208,249,193,106,189, 85,143, + 16,114,211, 29, 77, 73,146, 96, 52, 26,145,151,151, 7,163,209, 8,163,209, 8, 89,150,145,157,157, 13, 65, 16,168,217,108,174, + 3, 32,185,204, 99,163,210, 90, 1,110,222,210,229, 27, 63, 44,188,158,153,231,129, 2, 57,221,133,101,119,182,125, 96,145, 33, +117,213,170, 85,183,254,250,235,175,117,107,215,174,141,216,216,216, 58,131, 6, 13,106, 65, 8,105, 71, 41,205,119, 83, 75,199, +113,220,172,151, 95,126,121,228,243,207, 63, 79, 30,123,236, 49, 40, 20, 10, 88,173,214,224, 43, 87,174,116, 92,187,118,237, 56, +133, 66,241,163, 36, 73, 19, 93,157, 57,158, 16,194,169,213,234,159,150, 45, 91,214,161,117,235,214,248,233,167,159,112,228,200, + 17,185, 85,171, 86,220,139, 47,190,136,240,240,240, 86, 47,189,244,210,207,132,144,129,133, 15, 90,118, 55,255, 97, 67,135, 14, + 13,225,121, 30,109,219,182, 85, 30, 56,112,160, 41,128,195, 21,220,167,250,224,224,224,191,187,116,233,210,100,199,142, 29, 39, + 9, 33,221,221,153, 41,223, 96, 48,244, 14, 12, 12,156,237,233,233, 89,197,213,109,114,115,115,243, 83, 82, 82, 38, 39, 36, 36, +172,119,113,147,214,141, 27, 55,134,213,106,133,183,183, 55,130,130,130,218,134,132,132,188,237,229,229,213, 55, 39, 39,103, 98, +124,124,252,113, 55,242,107, 0,192, 81, 74,175, 20,126, 15, 7,240, 88,225,207,255,163,148,198, 81, 74, 99, 9, 33, 65,132,144, + 16, 87,186, 11,171,214,238,210,179,125,215,158,237, 30,111,221,136,139,250, 53, 14,146, 44, 67, 1, 9, 10, 94, 70,154, 36,128, + 16,130,176, 58, 45,249,192, 51,199, 91, 85,173,215,173,103,218,133, 29, 91, 92,209,236,209,167,127,251, 58,143,213,225,230,111, +184,129,204,196, 51,210,173, 11,187,210, 9,199,161,122,211, 39,253, 34,234, 52,227,107, 53,235, 42,220,140, 59,211,201,175, 78, +199, 46,233,151,246,237,102,182,129,225,182,193, 34,132, 80, 74,169,253,202,234,245, 40, 58,171,113,189,192,122,107,126,254, 49, + 41, 79,244, 61,147,158,158,238,151,158,158, 14, 47, 47,175, 44, 73,146,196, 79, 63,253, 84,184,114,229,138,183, 70,163,129, 90, +173,134, 40,138,110, 13, 38,150,101,153, 84,182,166, 94,231,129,246,145,237,148, 45, 26, 69,226,220,149,243,145, 49,187,199, 54, + 58,116, 34,251,149,203,151,175,150, 91,243,223,194,147, 79, 62,153,252, 88,100,247,205,139,119,137,227, 23,190,217, 82, 71,101, +137, 18,142,215,191,245,133, 76, 90,213, 15,249,222, 87,153,149,201,243,124,153, 58, 97, 97, 97,211,187,116,233,242,142, 66,161, + 16, 94,123,237, 53, 0,192,216,177, 99,115,142, 29, 59,214,248,214,173, 91,169,161,161,161, 65,239,189,247,222,169, 95,127,253, + 85,247,202, 43,175, 40,140, 70,227, 9, 65, 16,104, 80, 80, 80, 84,114,114,242, 28,103,154, 74,165,242,244,249,243,231, 59,120, + 5, 55, 66, 85, 79, 14,221, 63,140, 1, 0,120,104, 40, 50,210,110,226,234,141,211, 8, 15, 15,215,134,133,133,253, 18, 20, 20, + 36,183,105,211,230,179,144,144,144,168,117,235,214,149,120,114,212,106,181,231, 78,158, 60,217,162,126,253,250,200,205,205, 69, +124, 74, 30,126, 56, 68,144, 95,160, 5,160, 5, 7, 15,120, 84, 9, 86, 11,212,184,166,117,235,214, 92,219,182,109,231, 6, 7, + 7, 47, 40, 75,243,252,249,243, 45, 26, 54,108, 8, 81, 20, 17, 29, 29,141,188,188, 60,152,205,102,100,100,100, 32, 54, 54, 22, + 53,107,214,212,200,178,188,177, 87,175, 94, 82,122,122,250,244,163, 71,143, 46, 42,201,188,109,125,187,150,165,211,244, 61,223, +152,141, 57,191, 1,128,159, 95, 72,198,166,233,205,205,157,166,231,150,185,108,235,219,181, 44,120,235,129, 21,213, 97, 31,126, +248, 97, 93, 95, 95, 95,140, 30, 61, 26, 51,102,204,192,212,169, 83,107,141, 30, 61,122, 4,128,197,110,156,100,181,213,170, 85, +219,255,197, 23, 95,212,105,223,190, 61,182,108,217,130,213,171, 87,227,218,181,107,214,234,213,171, 43, 90,183,110,141,105,211, +166,161,123,247,238, 47,191,245,214, 91, 29, 10, 13,156, 43,166,227,197,169, 83,167,246,238,208,161, 3, 94,126,249,101,211,238, +221,187, 95, 4,176,115,199,142, 29,157,246,237,219,183,106,229,202,149,218, 57,115,230, 60, 57,110,220,184,215, 0, 44, 45, 71, +254,251,116,236,216, 17, 0,208,161, 67, 7,124,250,233,167,221, 42, 98,176, 8, 33, 42, 95, 95,223,223, 87,172, 88,209,164, 78, +157, 58, 24, 54,108, 88,211,193,131, 7,255, 78, 8,233, 67, 41, 53,187,162, 81,173, 90,181, 89,223,124,243, 77, 77,173, 86,235, +242,255,154,205,230, 42,163, 70,141,154, 9, 96,189,139,109,114,155, 70,141, 26, 97,207,158, 61,232,214,173, 27, 26, 54,108, 88, +115,212,168, 81, 81,221,187,119,199,187,239,190,187,195, 96, 48,212, 76, 74, 74, 74,119,241,239,195, 0, 92, 46,204,127, 40,128, +154, 0, 14, 21,254,214,146, 16, 2, 74,105, 92,225, 58,117, 10,163, 89,165,163,209, 15,235,219,167,151,199,239, 7, 83, 32,201, + 50,234, 5,107, 80, 63,204, 11,113, 41, 5,184,158,152, 14,129, 88,224,169, 85,163,113,187, 94, 62,183,111,197, 13, 3, 80,246, +120, 44,149,110,216, 51,125,123,233,215, 31, 74, 65,102,226, 89, 26,119,108,237, 94,201,100,124, 3, 0,206,239, 95,185, 40,168, +138,166,235, 99, 77, 35,249,252,199,251,249,236,217,112,107, 24, 0,102,176,238,221,133, 93, 17, 15,242,200, 70,176,108,220,206, + 81,152,188, 3, 26,231,228, 37, 38,218,151,101,103,103,123, 95,190,124, 57,229,194,133, 11,222,130, 32, 64,146, 36, 91,229,148, +203,155,136,202,214, 84, 41, 85,104, 82,167, 49, 31,125,250,184,242,194,133, 11,222, 60,175,164,149,145,206,135,157, 51, 73, 82, +168, 40,243,122,141, 82, 97, 63,180, 50, 81,234,179, 73,181, 80, 95,100,101,150,181,125,100,100,164,208,181,107,215,119,190,255, +254,123, 33, 57, 57, 25, 62, 62, 62, 16, 69, 17, 49, 49, 49,137,183,110,221, 74, 5,128,248,248,248,228,144,144,144,100, 73,146, +106,213,171, 87, 15,163, 70,141, 66,221,186,117,201,123,239,189, 55,142, 16, 18,229,236, 78,192,236,236,236,175,230,207,159,223, +236,255,216, 59,239,248, 40,138, 62,140, 63,179,123,253, 46,157,244, 66, 73, 2, 1, 66,104, 33, 1, 66,111,210, 5, 20,164,163, + 40, 69,165,136,160,244, 34, 82,165, 23, 65, 16,164,131, 34,189,247,222, 9, 61,212,132,244,222,235, 93,174,236,206,251, 71, 18, +222,128,129, 92, 2,190,250,234,124,225, 62,185,219,219,125,110,118,103,118,246,217,223,148,253,110,206, 98,117,255,134, 4,185, +121,122,228,228,228, 32, 46,226, 41, 20, 38,138,217,179,103, 67,169, 84, 2, 0,159,154,154,202,207,159, 63,111,252,157, 59,119, +218, 0,104,241,186,180,102,100,100,172, 92,186,116,233,170, 31,126,248, 65,173,213,106,161,213,233,144,173,149,227,218,226,192, +130, 91,241,175,175, 99,222,252, 31,224, 87, 73,163,138,141,141,197,244,233,211,199, 61,127,254,188, 49,128,238,111,210, 92,176, + 96,193,170, 69,139, 22,169, 45, 44, 44, 64, 41,133, 40,138,136,142,142, 6, 0,124,255,253, 44, 20, 94,224,248,248,248,120,126, +206,156,217,179, 20, 10, 69,107, 0, 93, 95, 19, 66,167, 0,242, 9, 65,130,155,155,167,151, 66,193, 77,118,115,203,191,124,118, +122,204,118, 66,144, 80,176, 14,168,235, 90,215,222, 81,155,228, 65,122, 61, 86,198,199,135, 63,163, 20, 20,211,255,186,251, 0, +123,123,251,207,187,117,235,134,121,243,230,225,192,129, 3, 19,236,236,236,230,125,247,221,119,112,113,113, 25, 70, 8, 89, 89, +134, 81,148,179,151, 44, 89,226, 83,163, 70, 13, 12, 26, 52, 72,127,242,228,201, 25, 0, 14, 0,136,186,112,225,130,199,198,141, + 27, 59,253,246,219,111, 51,151, 46, 93,170, 92,177, 98,133,215,135, 31,126,184, 0,192,231,165,137, 58, 57, 57,141,236,219,183, + 47, 22, 46, 92,136, 51,103,206,244,163,148, 30, 43,252,234, 56, 33,164,231,156, 57,115, 14, 79,153, 50, 5, 75,150, 44,249,178, +172, 6,139, 16,162,169, 81,163,198,132, 14, 29, 58,224,194,133, 11,104,214,172, 25,130,130,130, 70, 18, 66, 86, 81, 74, 83,203, +113,209,224, 44, 45, 45, 55,109,220,184,177, 73,229,202,149, 49,107,214, 44,124,243,205, 55, 88,191,126,125,147, 1, 3, 6,108, + 34,132,244, 53,103,244,172,149,149,149,133, 74,165,194,188,121,243,104, 84, 84, 84,169,231,178,139,139,139,205,212,169, 83,137, +149,149,149,181, 25,105,228,221,220,220,172,156,157,157,155, 56, 59, 59, 99,217,178,101,112,116,116,196,215, 95,127,141, 10, 21, + 42, 32, 55, 55, 23, 61,122,244,144, 94,189,122,181, 23,128, 85,102,238,186, 29,128,162,136, 87,117, 0, 87, 40,165, 57,133,191, +119, 29, 5, 77,131, 17, 40,232,151,101, 86, 84,142,163,212,215,214,198, 26,113,247, 18, 33,129, 9, 53, 42, 90,226,102,104, 46, + 12, 2,133, 74, 99,129,220,236, 12,212,245,118, 64, 86,158, 59, 64, 69, 95,115, 52,101, 60,169, 39, 87,168,144,148,149,137,132, +135,167,210,140,162, 97,100, 70,216,249, 24, 0,176,243,110, 57,242,254,245, 35, 23,123,116,108,230,144,148, 94, 17,148, 10, 13, +152, 13, 98,148,133, 50, 77, 52, 42,138, 34, 73, 75, 75,147,104,181, 90,222,104, 52,114,197,221,166,209,104, 44,151,113,249, 51, + 52,139,243,103,104,254, 93,169,234,200,197,243, 60, 94,106,170, 35,160, 58, 11,146, 18,111,206,246,193,193,193,198,243,231,207, +111,155, 56,113, 34, 22, 47, 94,140,176,176, 48, 72,165, 82,212,168, 81,195,217,193,193, 65, 3, 0,158,158,158, 86,126,126,126, +142, 60,207, 35, 52, 52, 20,219,183,111,199,140, 25, 51,104,112,112,240,166,215, 93, 40,110,221,186,117, 48, 63, 63,255,240, 15, +179,167,230,229,167, 60,129, 90, 72, 6,205, 10,135,154,215,226,147,161, 35,241, 60, 89,192,237,240,108,220, 14,207, 70, 92,174, + 2, 95,126, 61,153,171, 82,165, 74,253,192,192,192, 79, 95,151,214,219,183,111,239,202,203,203, 59, 53,115,230,204,188,231,207, +159, 67,171,213, 2, 0, 12, 38, 17, 6,211,203,201,112,115,115,195,188,121,243, 52, 26,141, 38,200,223,223,191,239,155, 52,115, +115,115, 79, 77,155, 54, 45, 47, 52, 52, 20,153,153,153, 72, 72, 72, 0, 33, 4,159,125, 49, 22,207,147,197, 23,233, 76, 53, 88, +226,171,111,167,115, 30, 30, 30, 45,234,213,171,247,193,155,142,171,155,155,187, 87,141, 26, 94, 91,174, 94,189,218,223,203,203, +107,104,145,177,162, 20, 20, 0, 42, 85,170,244, 89,112,112,240,192,186,117,107,108,117,113,113,173,246, 23,223, 69, 54,239,221, +187,119, 53, 81, 20,177,115,231,206, 7,148,210, 21,123,247,238, 13,206,207,207, 71,223,190,125, 43, 3,104,103,166,142,127,191, +126,253,134, 54,107,214, 12,163, 71,143, 54,156, 60,121,178, 9,165,116, 57,165, 52,146, 22, 16, 69, 41, 93,117,246,236,217, 70, + 35, 71,142,204, 15, 12, 12,196,199, 31,127, 60,144, 16,210,164, 20,221, 70,125,251,246,245, 17, 69, 17,219,183,111,191, 95,204, + 92, 21,153,218,115, 59,119,238,188,174,215,235,209,191,127,255, 42,132,144, 22,101,216,119,153, 82,169,220, 58,107,214, 44,235, +216,216, 88, 12, 28, 56, 48,255,241,227,199,152, 62,125,186,202,218,218,122, 15, 33, 68, 83,214,227,169, 84, 42, 87,174, 90,181, +170, 75,237,218,181,241,249,231,159,235, 87,173, 90, 53,238,139, 47,190,208,251,251,251,227,199, 31,127,236, 34,151,203, 87,150, + 69, 47, 33, 33, 33,243,236,217,179,238,165,189, 18, 19, 19,205,154,154,165,114,229,202,214,181,106,213,186, 30, 16, 16, 16, 93, +167, 78, 29, 79, 0,120,240,224, 65,202,206,157, 59,105,133, 10, 21,112,244,232, 81,172, 93,187, 22, 77,155, 54,133,165,165,101, +207, 50, 36,149, 22,190, 80,236,239,171,223,191,186, 94,169,154,153,121, 38, 72, 56, 14, 82,158, 34, 50, 81, 11,131, 64, 33,147, +114,144,242,128,132,163,168, 96, 41,133, 84,202, 3,132,152,165,201, 17,130,244, 92, 35, 36, 60,129, 84, 46, 37,188, 32, 42,139, +190,227,165,162, 82, 46, 87, 18, 71,107, 25,228, 18, 2,142,128,193,120,119, 17,172,194, 74, 71, 72, 73, 73,145,134,135,135, 43, +245,122, 61, 87,185,114,101, 29, 0,152, 76, 38, 46, 61, 61, 93, 38,151,203, 65, 8, 49,152, 76,166, 50,221,114,167,165,165, 75, + 35,162,158,190, 83,205,146, 48,153, 76, 92, 94, 94,186,252, 93,106,254, 29,121,252,248,177,197,179,240, 56,141, 19, 95, 51,120, +228,138,224,134, 20,144, 18, 74,141, 10,237,227,171, 41, 73,119,100,176, 86,168,221,221,221, 75,237, 63,243,252,249,243, 47, 93, + 93, 93,231, 83, 74,107, 80, 74,119, 45, 94,188,152, 44, 95,190,220,230,139, 47,190,120,224,234,234, 26,231,227,227, 83,113,241, +226,197,150, 0,176,101,203, 22,241,200,145, 35, 93, 21, 10,197,227,136,136,136,196, 55,233,158, 59,119,238,147,192,192,192, 79, + 87,175, 94, 61,211,100, 50, 41, 28, 28, 28, 20,155, 55,111, 70,108,134, 30, 83, 54,255,119,100,161, 70,193, 99,116,123, 13, 90, +182,108,205, 69, 69, 69,141, 3,176,254,117,154,231,207,159,239,215,176, 97,195,225, 63,254,248,227, 52, 88, 84, 82, 40,170, 15, +150,181,158, 88,208,252,232, 98,167,120, 81, 33,102,102,102, 34, 61, 61, 29, 61,122,244, 80,111,221,186,245,115, 0,219, 75,211, + 92,177, 98,197, 52, 65, 16,100, 14, 14, 14,138,109,219,182, 33, 60, 69,143, 9, 27, 67,145,173, 43, 72,167,133, 66,130,145,109, + 21,104,221,186, 53, 31, 23, 23, 55, 30,192,238,146,244,220,221,221,189,107,212,168,177,101,219,182,109,213,151, 46, 93,154,254, +244,233,211, 60, 23, 23,151, 41,175,172,166,159, 59,119,110,218,230,205,155,171, 14, 28, 56,112,171,139,139,203,128,248,248,248, +199,127, 69, 57,178,182,182,254,126,216,176, 97,248,245,215, 95,145,158,158,190,178,240,248,173,220,182,109,219,198,207, 62,251, + 12,155, 54,109,250,158, 16,114,194,140, 40,214,123,125,250,244,193,145, 35, 71,112,250,244,233,153,148,210, 71,175,137,242,133, + 18, 66,166,238,219,183,111, 65,223,190,125,241,203, 47,191,180, 3,112,233, 13,186,173,219,183,111,143,195,135, 15, 35, 45, 45, +173,196,142,199,153,153,153,107, 15, 28, 56, 16,216,190,125,123,204,157, 59,183, 13,128,115,102,212,115, 62,214,214,214,107,150, + 45, 91,230, 95,187,118,109,244,235,215, 79,103, 48, 24,186,143, 27, 55,238,247, 29, 59,118, 88,108,218,180,169,254,144, 33, 67, +206, 19, 66,190,160,148, 94, 55,231, 88,242, 60,255,221,138, 21, 43, 6,181,108,217, 18, 99,199,142, 53, 29, 59,118,172, 23,165, +244, 20, 33, 36,108,252,248,241,187, 23, 46, 92,200, 47, 92,184,112, 16,207,243, 41,130, 32, 76,255, 43,242, 91, 20,197,185,139, + 22, 45,170,238,235,235, 11,157, 78,135,176,176, 48, 36, 36, 36,252,154,148,148,116,234,254,253,251,179,227,227,227,247, 58, 59, + 59,127,242,245,215, 95,187, 53,104,208,192,191, 98,197,138, 54,230, 68,208,138, 69,166,146, 1, 60, 6, 16, 88, 24,185, 2,128, + 0, 0,207, 10,223,219, 0,200, 48, 43,177,132,123,240, 52, 60,182,138,173,133, 21,210, 69, 57,194, 99, 83,161,210,104,192, 81, + 14, 38,109, 58,170, 86,114,132, 72,129,172,148, 88,112, 28, 49,107, 26, 25,163, 72,111, 71, 68, 39,186,218,104,148,168,234,223, +217,238,206,153, 95,214,219,120, 55, 31, 33,225, 5, 94, 34,183, 90,209,175,239,160, 10, 38,129, 34, 39, 61, 30,132,231,111,130, +193,120, 87, 6, 75, 16, 4,178,105,211, 38,171,164,164, 36,206,199,199, 39,173, 78,157, 58,185,114,185, 92,212,106,181,130, 82, +169, 52,105, 52, 26, 81,167,211,201, 35, 35, 35,109, 99, 99, 99,249,162,102, 56,115, 56,119,238,130,179,119,181,218, 73,239, 82, +243, 53,119,144, 38,149, 74, 34,188, 75,205,191, 19,162, 40,202,103,207,158,221,200,206,206, 46, 55, 48, 48, 48, 54,200,219,225, + 64, 92, 46, 46, 46, 94,242,243, 64,223,154, 21, 55, 91,243,233, 25,185,114, 42,141,137,137,113,126,246,236,153,154, 82, 42, 43, + 77, 51, 46, 46, 46, 26, 64,180,139,139,203,218,150, 45, 91, 14,235,210,165, 11,206,158, 61,235,144,155,155,235,160,209, 20,220, +196,239,218,181, 11,123,247,238, 93,158,144,144,112,214,220,180, 94,191,126,125, 61,128,245,245,234,213,243,183,182,182, 62,107, +101,101,197, 69,103,230,190, 24, 89, 40,147,112,104,242,205, 13,164,166,103, 64,202, 17, 40,149, 74, 55, 66, 8,247,186,200, 88, +225, 69,126, 53,128,213,129, 29, 63,235,102, 21,185, 99,253,162,197,139, 21, 69,119,166, 78,182, 50,100,100,100, 32, 57, 57, 25, + 41, 41, 41,144, 72, 36,208,233,116, 53,222,120,139, 92, 76,179,118,237,218,173, 42, 84,168,176, 79,173, 86,243, 52, 37, 23,233, + 57,134,151,154, 32,211, 51,242, 33,149, 74,161,209,104,188, 75,210,178,183,183,183,144,201,100,107,214,173, 91,231, 99,105,105, +201, 15, 25, 50,196,122,200,144, 33,141, 1, 52, 46,105,125,181, 90,205,255,242,203, 47,222,117,235,214, 93,227,233,233,217,229, +249,243,231, 89,255,195,200, 21, 15,224,179,113,227,198,213, 87, 42,149, 88,177, 98, 69, 56,128, 95, 11,191,222,189,106,213,170, +137,125,250,244,169, 54,122,244,232,154, 83,166, 76, 25, 73, 8,249,241, 77, 29,200,101, 50, 89,189,154, 53,107, 98,207,158, 61, + 64, 65,179,224,155,216,115,249,242,229, 5, 93,186,116,129, 74,165,242, 47, 45,232,226,225,225,129,125,251,246, 1,192,221,215, +172,115,247,209,163, 71,232,209,163, 7, 56,142,171,100,198,190,119,121,239,189,247,182,206,157, 59, 87, 98,105,105,137, 79, 63, +253, 84,127,237,218,181, 30,148,210,139,132,144, 14, 3, 6, 12, 56,182,101,203, 22,205,249,243,231,125,102,207,158,125,154,231, +249, 5,130, 32,124, 87,138,230,192, 89,179,102,141,235,222,189, 59,190,251,238, 59,250,235,175,191, 14,166,148,158, 42, 44, 99, + 39, 9, 33,159,217,218,218,254, 50,105,210, 36,146,153,153, 57,142, 16, 18, 75, 41,253,249,117,122, 57, 57, 57, 89,130, 32, 56, +105,181, 90,179,250,108,153,187,190,183,183,247,123,190,190,190,216,183,111, 31,186,118,237,138, 19, 39, 78, 64, 34,145, 28,141, +137,137, 57, 15,224, 20, 0,184,184,184, 88,133,134,134,142,106,222,188, 57,119,250,244,233,110, 0, 54,152,145,132, 8, 0,181, + 0,156,166,148,198, 20, 14,156,108,132,130,121,176, 30, 83, 74,163, 11,215,243, 5,240,220,172,186,206,152,179,237,212,225,223, + 91,180,251,240, 11, 43,158, 39,144, 64,134,188,236, 44, 64, 16,224, 93,201, 9,129, 53,157,112, 55, 66,139,203, 39,118,102,230, +229,229,154, 53,189,132, 96,204,221,114,234,216,222,102, 1,237, 62,182, 82,120,215,132,135,211, 87,117, 30, 92, 63,126, 80, 41, +151,145, 15, 62,236,101,221, 42,176, 42, 78,221,203,194,149, 83,123, 50,180,185, 25, 91,152,101, 96,148,203, 96,149,212,185, 76, + 20,197,148, 19, 39, 78,168,167, 78,157,154,227,226,226, 34,201,201,201,225,138,247, 97,146,201,100,112,113,113, 49,101,100,100, + 24, 78,156, 56, 81, 69, 20,197,180, 55,134, 99,121, 69,194, 79,219, 86,184, 11, 68,173,111,223,177,171,232,238, 94,249,173, 53, + 1, 64,167, 87,164,252,126,116,143, 77,139,192,166, 82, 39,123,167,146, 42,251, 50,107,254, 31, 17,255,236,217, 51,251,217,179, +103,223,117,115,115,211, 1, 64, 5,141,144,144, 26,178, 59,221,162,114,151, 4,169, 66, 1, 7, 7,135,124, 11, 11, 11,211,225, +195,135,219, 80, 74, 19,204, 21,182,181,181,157, 48,108,216, 48,238,194,133, 11,159, 13, 24, 48,128, 84,169, 82, 5,183,111,223, +198,150, 45, 91,232,206,157, 59,127, 76, 72, 72, 40,215, 93,183, 66,161, 8, 55, 24, 94,158,250,166,248,200,194,244,244,116,112, +217, 41, 16, 4,193,100,238,236,238, 66,242,221,235,249, 42, 21,106, 85,252,111, 43, 78,122,122, 58,146, 83, 82, 94, 24,172,164, +164, 36,240, 60,175, 51, 55,157,114,185, 60, 82,175,215,191,146, 78,177,120,164, 4, 66, 70, 10, 12,175,238, 76, 33, 41, 41, 41, + 57,110,110,110, 63,173, 88,177, 98,238,204,153, 51, 29,150, 44, 89,146,254,232,209,163,108,142,227,116,175,156,103, 74, 47, 47, + 47,139, 69,139, 22, 57, 46, 95,190, 60, 29,192,234,255,177,185,234,234,231,231,183,182, 83,167, 78, 22, 95,124,241, 5,150, 47, + 95,142,132,132,132,105,148, 82, 83, 97,221, 32, 18, 66, 38,175, 90,181,106,215,248,241,227, 97, 48, 24,230, 30, 62,124,120, 10, + 33,100, 20,165,244,215,146, 52, 29, 28, 28,220, 36, 18, 9,130,131,131,179, 41,165,207, 75, 49,181,137, 62, 62, 62, 73,132, 16, + 71,103,103,231, 42,111, 90,215,206,206,206,211,210,210, 18,177, 5,253, 66, 35, 94,179, 90, 84, 92, 92, 28,149,203,229,196,197, +197,197,187,180,253,183,177,177, 25,179,110,221, 58,201,153, 51,103, 48,125,250,244,216,200,200,200, 79, 11,167, 17, 0,165,244, + 14, 33,164, 93,171, 86,173, 54,142, 31, 63,190,234,252,249,243,201,163, 71,143,134, 0,120,163,193,170, 84,169,210,103,131, 7, + 15,198,138, 21, 43,176,102,205,154,209,148,210,221,175,236,243, 78, 66,136,173,157,157,221,162, 97,195,134, 97,195,134, 13,189, + 1,188,214, 96, 37, 36, 36, 76,233,221,187,247,196,244,244,244, 5,230,228,169, 57,235,187,185,185,117,238,223,191,191, 35,165, + 20,203,151, 47, 79, 92,177, 98, 69, 94,102,102,230,175,241,241,241,231, 95,137,196,237, 59,122,244,232,168, 47,190,248, 2,103, +207,158, 93,236,230,230, 70, 99, 99, 99, 55,150,146,167, 9,132, 16, 79, 66, 72,117, 74,233,227,194, 81,130, 49,175,148,187,170, +133,235,198,154,179, 79, 41,143,206, 28,118,172,213,233,202,157,235,103,219, 84,169,213, 76,234,104,107, 9,183,106,246,176,211, +200, 64, 1,220,143,212,226,234,249,227,198,164,196,168,171,230,140, 32, 44,210,116,174,221,249,170,186,194,133, 54,158,190, 65, +146, 42, 85,171,161, 93,147, 58, 54, 21,172,164,208, 27, 41, 78,220,201,196,149,243, 71,140,201, 73, 49,231,216, 8,194, 63,151, +127, 90, 7,247, 82, 35, 88,201,201,201,223,202,100,178,230,131, 7, 15,238,211,172, 89, 51,203,161, 67,135, 38, 89, 89, 89,229, +202,229,114,222,206,206, 78, 78, 41,149, 31, 63,126,220, 53, 33, 33,193, 22,192,142,228,228,228,243,175,156, 64, 47, 61,109,123, +232,204, 92, 31, 66, 8,113,115,179,105, 46,217,241,121,159,102,205,154,105,222, 86,115,198, 12,208, 25, 45,116,222, 87,156,201, +212,212,140,195, 35,220,157,157,249,230, 1, 65, 82, 11,181,166,208, 36,216,201, 69, 17,178,178,104,190,163,139,214,255, 68, 83, +175,215,183, 9, 11, 11,251,104,192,128, 1, 99,253,253,253, 67, 38, 77,154,116,205,198,198,198, 88,120,167, 8,189, 94, 47, 61, +113,226, 68,195,152,152, 24, 95,163,209,184, 8,192,111,230,166, 51, 36, 36,196, 0,224, 43, 87, 87,215, 67, 73, 73, 73,251,251, +244,233,131, 13, 27, 54,224,242,229,203,237,226,226,226,174,148,119,223,175, 92,185,146,222,161, 67, 7,237,227,199,143, 53,188, +198, 3,206,182, 50,116,152,122, 27, 84,164,176, 80, 82,228,102,103,194,152,150,134,188,188,188,135,230,106, 6, 7, 7, 39, 52, +109,218, 84,247,252,249,115,133,167,167,103,129,185, 42, 52, 86,201,201,201, 72, 75, 75, 67, 86, 86, 22,149, 74,165,193,230,106, +222,184,113, 35,188,125,251,246, 66, 68, 68, 4,207,243, 14,112,178,145,161,245,196,130,205,109,213, 64,118, 86, 38,180, 41, 41, +208,106,181,175,213,140,141,141,221,233,230,230, 6, 0,115,167, 77,155, 86,161, 67,135, 14,161,215,175, 95,111, 95,252,119, 26, + 52,104,240,235,204,153, 51, 59,204,158, 61, 59,117,211,166, 77, 83,226,226,226,118,252, 47,203,146,157,157,221,168,195,135, 15, + 91, 24, 12, 6, 44, 95,190, 28,139, 23, 47,222, 68, 41,221,251, 74,229,119,148,231,249, 53, 28,199, 13, 27, 49, 98, 4,134, 13, + 27,166,110,208,160,193,168, 98, 81,174,151, 52, 99, 99, 99,191,171, 95,191,254,196,228,228,100,179, 12,193,211,167, 79, 71,212, +175, 95,127,124,114,114,242,146, 55,237,187, 70,163,209, 8,130,128,240,240,240, 12, 74,105,214,107, 42,106,157,143,143, 79,156, + 32, 8,110, 26,141,198,182,180,242,153,145,145,177,192,223,223,127,114, 82, 82,210, 41, 0,243, 41,165,186, 87,244,238, 17, 66, + 26,140, 30, 61,250,243,185,115,231,190,159,152,152,248,123,105,154,145,145,145, 11, 90,181,106, 53,225,201,147, 39, 91, 41,165, +235, 95,147,206,159, 8, 33,134,173, 91,183, 14, 9, 15, 15, 95,248, 38,205,152,152,152, 35, 0,142,152,155,191,175, 91,255,149, +124,255,122,228,200,145, 56,114,228, 8,114,114,114,126,140,141,141, 93,252, 26,173,235, 85,170, 84, 57,212,184,113,227,206, 11, + 22, 44,144,117,234,212,105, 8,128,141,102,148,207,107, 0, 26, 21,246,131,123, 2,160,232,198,214, 22, 5, 83, 54, 16,188,102, +116,230,235, 52, 41,213,126,124,251,194,158,141,209,207,238, 54,244,111,217,195, 38, 51,207, 29, 50, 9,135,156,244,120, 92, 57, +185, 59, 35, 46, 54,236,154,193,144,251,113, 89, 52, 5, 33,111,208,221,139,123, 54, 37, 68,132, 4,230, 53,233,100,147,145, 93, + 9, 50, 9, 65, 70, 74, 12,174,157,221,151, 30, 31, 29,126,201, 40,228, 15,251, 43,235,249,127,139,230,191,202, 96, 21, 54,151, +156,243,247,247,191,124,246,236,217, 14,151, 46, 93,122,191,117,235,214, 73, 65, 65, 65, 57,183,110,221,170, 20, 30, 30,238, 8, +224,128,163,163,227,209,224,224, 96,179,102, 78,126,215,154,133,122, 38,128,204,248,238, 75,251, 5, 49,247, 82, 22,199, 39,253, +222,203,187, 82, 21, 2,128, 4, 7,223,174, 20, 30, 30,238, 80,214,116,254, 31,185,126, 10,224, 87, 66,200,158,107,215,174, 13, +249,224,131, 15,134,181,110,221,250, 26,165,148, 92,190,124,217, 63, 50, 50,178,161, 32, 8,235, 69, 81, 28, 86,158,199,228, 20, + 53,185,200,100, 50,234,227,227, 67, 84, 42, 21, 20, 10,197,195,183, 77,119, 70, 70,198,216, 69,139, 22,173,154,253,195,114,254, +203,247,172,145,146,154,138,212,212, 84,164,167,165, 65, 6, 45,238,132, 60, 16,114,114,114,198,150, 69,211, 96, 48, 76,154, 58, +117,234,130,133, 11, 23,106,178,179,179, 95, 24,172,180,180, 52,104,181, 90,156, 61,123, 54,223, 96, 48, 76, 41,139,102, 86, 86, +214,180, 5, 11, 22,204, 25, 57,118, 50, 55,164,153, 20, 25, 89, 90,100,100,100, 32, 39, 59, 27, 10,162,197,245, 7, 15, 4,189, + 94,255,205,155, 52, 10, 77, 22,141,142,142,158,146,157,157,253,172,132,223, 72, 24, 49, 98, 68,252,229,203,151,191,143,137,137, +217,254,191, 46, 67,105,105,105, 63, 52,106,212,104,126,114,114,114,184,193, 96,216, 77, 41, 45, 49, 13,130, 32,124, 77, 8,185, +182,114,229,202,158,246,246,246,142, 9, 9, 9,139,222, 80, 46,203,100, 8,204, 93, 63, 42, 42,106,154,191,191,255, 55, 73, 73, + 73,139, 74, 49,108, 99, 10,215, 91, 98,198,111, 31, 5,112,180,148,117, 76, 40,152,162, 98,133,153,251,115, 16,192, 65, 51,214, +251, 5,192, 47,127, 69,221,145,158,158,190,176, 75,151, 46, 83, 19, 19, 19,207, 37, 36, 36, 44,123,211,186, 70,163,241,227, 97, +195,134, 77,117,118,118,110,152,148,148,180,220,204, 99, 96, 2,112,177,240, 81, 57, 94, 0,138, 70,225,101, 0,136, 40,207,163, +114, 10,103,104,255,208,190, 70,219, 78, 39,127, 95, 54, 0,130, 80, 27, 32,224,164,252, 61, 93, 94,238, 22,115, 35, 87, 37,104, +126, 96, 95,163,109,167,180,196,136,129,162, 32,212,230, 8, 68,194,243,247,243,117,185, 27,146, 66, 78,178, 71,229, 48,202,103, + 66,203,242, 44, 92, 87, 87, 87,149, 84, 42,237, 78, 41, 13, 20, 69,241,186, 40,138,123,227,226,226,180,111,227,112,223,189, 38, + 33, 99, 6,168,156, 44, 84,248,201, 66, 5,191,149,123,108,167,154, 76,226,158,183, 77,231,255,203, 29, 3, 33, 68, 35,147,201, +198,138,162,216, 79, 20,197,109,162, 40, 46,122,211,220, 66,230,166,179,106,213,170,171, 90,181,106, 53,224,216,177, 99,107, 35, + 35, 35,199,190,139,125,111,214,172,217, 6, 15, 15,143, 15, 90,182,108,201, 43,149, 74,196,199,199, 35, 45, 45, 13, 79,158, 60, + 49,165,166,166,206,185,120,241,226,252,114,104,254, 44,151,203,223,239,218,181,171, 90, 38,147, 33, 45, 45, 13,153,153,153,244, +226,197,139,122,142,227, 38, 94,190,124,121,109, 25,143, 39,105,214,172,217,110, 15, 15,143, 54, 65, 65, 65,188, 76, 38, 67,122, +122, 58, 82, 83, 83,241,248,241, 99, 33, 57, 57,249,219,171, 87,175,254,100,142,166,183,183,183, 60, 52, 52,180,196, 62, 49,254, +254,254,210,215,153,127,118,151,204, 52,153, 38,211,252,183, 69,176, 8, 33, 67, 41,165,107,255,177, 17,172, 87, 41, 52, 41,219, +240, 22,207,167,250,243, 53, 41, 93,178, 5, 9, 0,233,246,221,119, 32, 81,209,218,130, 1,241,255, 18, 10,205,212,119, 40,165, +143, 72, 89,121,246,236,217, 23,174,174,174,227,222,100, 84,203,202,133, 11, 23, 62,169, 95,191,254,111, 49, 49, 49, 83, 84, 42, + 85,117, 65, 16, 76,122,189,254,142, 94,175,159,124,237,218,181, 91,229,212, 28, 82,191,126,253, 93,123,247,238,253, 74, 16, 4, + 95,142,227,242, 41,165,193,148,210,239, 47, 95,190,252,168,156, 17,194, 30,245,235,215,239, 17, 27, 27,251,141, 66,161,168, 38, +138,162, 49, 63, 63,255,166, 94,175,255,246,218,181,107,102,107,190,206, 92, 1, 5, 83,100,176,251, 61, 6,131,193,248,231, 32, +249,231,238, 26,165,211,167,131, 98, 58,203,228,119,108,134,223, 41,183,110,221, 58, 6,224,216, 59,214, 60, 14,224,248, 59,214, +220, 3, 51,103,196,102, 48, 24, 12, 6,131, 99,135,128,193, 96, 48, 24, 12, 6,227,221, 66, 0,248,149,244, 69, 89,218, 86, 9, + 33,126,101,253, 97, 51,250,190, 48, 77,166,201, 52,153, 38,211,100,154, 76,243, 31,166, 89, 76,123,230,107,190,138, 45,212,249, +191,238,131, 69,254,204,238, 73,172, 3, 32,211,100,154, 76,147,105, 50, 77,166,201, 52,255,141,176, 38, 66, 6,131,193, 96, 48, + 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131,193, 12, + 22,131,193, 96, 48, 24, 12,198,223, 6,242, 47,154,228,156,193, 96, 48, 24, 12, 6,227,127,194, 75, 17, 44, 66, 8,115, 91, 12, + 6,131,193, 96, 48,254,231,252,211, 60, 8,107, 34,100, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,227,255,192, + 96,177,166, 65, 6,131,193, 96, 48, 24,127, 5,255, 84, 15, 82, 20,193,106, 89,184,131, 45, 89, 86, 51, 24, 12, 6,131,193,248, + 31,242,143,244, 32,108, 20, 33,131,193, 96, 48, 24, 12,198, 59,134,245,193, 98, 48, 24, 12, 6,131,193,248,127, 50, 88,132, 16, + 63,166,201, 52,153, 38,211,100,154, 76,147,105, 50, 77,102,176, 24, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, + 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24,140,191, 8, + 2,160,196,145, 0,148,210,251,102,139,148, 99, 52, 65,105,250, 76,147,105, 50, 77,166,201, 52,153, 38,211,252,231,105,150,166, + 93, 22,255,241,183, 54, 88,127,230, 68,163,132, 16,191,119,125,160,152, 38,211,100,154, 76,147,105, 50, 77,166,249,207,211,252, +167, 33, 97,135,128,193,248, 63,231,119,194,195,190,102,101, 16,234, 12, 34, 75,196,217,187,207, 49,157,138,111,173,233, 92,171, + 34,244, 70, 71,168, 84, 41, 56,113, 59,252,173, 53, 25, 12, 6,131, 25, 44, 6,131,241,127,131,187,111, 85, 24,197,153, 0,156, + 1,125, 24,154,251, 45, 4, 16,242, 86,154,142,190, 85, 33,138,211, 33,227,220, 96,200,127,134, 86, 53, 23, 2,120,196, 14, 54, +131,193, 96,152,199, 95,210,201,189, 65,131, 6,151, 2, 2, 2,166,181,108,217, 82,193,178,128,193,120, 11,238,215, 86,195,104, +124, 47,223, 32,186, 30,189,156,230,144,171, 19,170,129, 51,180,199, 35, 95,205, 91,105,114, 98, 91,157, 65,240,216,114, 50,215, + 49, 71,103,170, 14, 81,120, 59,205, 66,234,214,173,107, 29, 24, 24,184,207,223,223,191, 2,203, 60, 6,131,193, 12,214, 59,134, + 82, 90,215,209,209,113,164, 86,171,125, 92,191,126,253,206,255,166, 3,222,176, 97,195,211,141, 27, 55,142, 8, 10, 10,138, 8, + 10, 10,186, 92,218,242,127, 42, 13, 26, 52,168,219,180,105,211, 35,190,190, 5, 23,237,218,159,239,117,168,255,217,113,175,134, +163,142,186,177,211,178, 12,100, 83, 71,128,111,241, 40, 60, 79,149,152,110,114, 12,126,156,107, 1,202, 55, 71,170,232,252, 86, +154, 34,105,113, 59, 84,167,190, 18,230,224,120,233, 65,190, 37,192,183,120, 43,205, 66, 36, 18,201, 16, 0,173,121,158, 31,193, + 50,239,223, 13, 33,196,151, 16,210,153, 16,226,255, 14, 53,103,213,172, 89, 51,148, 16,242, 37, 59,194,140,255, 27,131,213,211, +139, 52,238,231, 69,142,245,241, 36, 73,125,189, 72, 82,127, 47,114,178,103, 53,210,180,188, 63,188,107,215, 46,213,230,205,155, + 29,252,252,252, 54, 54,108,216,240,100,195,134, 13,189,203,163, 19, 24, 24,184,175, 65,131, 6, 31,188,186,204,223,223,191,231, + 43,203,110, 6, 6, 6, 38, 4, 4, 4, 60, 48, 71,215,223,223,255,158,191,191,127,114,131, 6, 13,238,189,178,188,103, 96, 96, +224,190, 87,204,194, 7,175, 46,123, 29, 60,207,187, 29, 56,112,192,225,208,161, 67, 14, 82,169,212,241,213,229, 7, 15, 30,124, +105,121, 89, 9, 8, 8,248, 36, 32, 32,224,116,241,101,245,235,215,255,248,213,101,165,236,251,233,250,245,235,127,252,138,238, +233,128,128,128, 79,222,145,201,172, 47,151,203,143, 25, 12,134,166, 26,141, 70, 13, 0, 18,163,202, 82,148, 73,122, 26,168,164, + 94,237,111, 78, 56,176, 83,211, 12, 30,249,202, 32,154,154, 8, 34,181,127, 16,174,115,232,216,165,167,228,238, 51,173,189, 81, + 16,108, 33,162, 57,206, 85, 86,148, 75, 83,208, 7, 9, 84,116, 60,117, 91,234,208,178,243, 8,254,204,125,169,189, 81, 16,236, + 32,136, 77,203,165,249,223,114, 37,229,121,126,212,208,161, 67, 57, 66,200,112,111,111,111,249,191, 41,187, 26,215, 33,174,109, + 26, 72,206, 7,212, 34,141,223,161,161,168,105, 97, 97,113,145, 16, 82,245,255,204, 92,213, 5,160,166,148, 30, 2,224, 72, 8, +145,188, 3,205,249, 51,103,206, 28,115,239,222, 61, 23, 79, 79,207, 41,132, 16,158, 85, 18,140,191,189,193,234, 93,133, 76,118, +113,118,219, 63,121,201,182,166, 63,159,123,174,249,241,192, 45,205,216,241,115, 26,187, 88, 59,236,233,239, 69,190,127,221,118, +111, 26, 97, 32,151,203, 17, 22, 22,134, 21, 43, 86, 40,103,204,152,209,200,194,194,226, 90,195,134, 13,127, 40,138,104,152,171, + 73, 41,109, 36,147,201, 86, 53,108,216,112, 77,177, 10,187,145, 82,169, 92,217,176, 97,195,245, 69,205,144,254,254,254,149,175, + 95,191,110, 73, 8,113, 52, 39,157,129,129,129,206,193,193,193,106, 66,136, 51, 0,180,108,217, 82, 17, 24, 24,184,206,221,221, +125, 5,128, 70, 0,224,237,237, 45,111,216,176,225, 26, 15, 15,143, 31, 9, 33,141,204,217,119,142,227, 96, 99, 99,131,109,219, +182,129,227,184,226,149, 3,108,108,108,176,117,235, 86, 16, 66,202,124, 60,125,125,125, 53,129,129,129,219, 92, 92, 92,126, 16, + 69,177, 33, 0,212,174, 93, 91, 29, 24, 24,184,213,221,221,125, 65,209, 50, 51, 53, 27, 42, 20,138, 31, 2, 3, 3,183,214,174, + 93, 91, 13, 0,162, 40, 54,148, 74,165,243, 3, 3, 3,183,149, 53,143, 90,180,104,241, 69,163, 70,141,210, 3, 2, 2,178,155, + 53,107,182,149,231,249, 35,179,103,207, 86, 43,149, 74,189,201,182,146,198,127,216, 41, 15,153, 84,110,162,132,203,167, 2,102, + 74,179,101,182,222,163,142,202,205,221,247,242,242,127,175,153,204, 59,128,160,213,147, 72,173,178, 74,213, 6,106,199, 26, 61, +225, 96, 35, 85, 92,125,152,107, 1, 9,105, 9, 78, 99, 95, 46, 77, 72, 91, 61, 8,211,170,236,188, 58,170, 2, 26, 55, 7,212, + 85, 21,231,238,228, 90, 66,194,151, 79,243,191,223,119, 15, 10, 10,146,181,109,219, 22,174,174,174,156,149,149, 85,239,127,124, + 30, 21, 51, 87, 22, 10,249,185, 69, 51,199,212,119,182, 83,255,102,142,201, 50, 99,248,124, 77, 71, 71,199,163, 43, 87,174,172, +103,105,105,121,194, 28,147,245,119, 56,158,133,230, 74, 70, 41,189, 94,100,235, 1, 4,189,165,230,252, 25, 51,102,140,152, 56, +113, 34,178,179,179,241,241,199, 31, 91, 2,152, 91, 30,205, 94,189,122,241,189,122,245,226,255, 21,117,200,223, 76,179, 20,228, + 0, 90, 1,232, 12,160, 13,128,192,194,247, 1,133,175,206, 0,218,190,242, 55,160, 40, 70, 80,248,185,225,107, 52, 58,151,176, + 93, 64,177,229,197, 63,191,250,254,205, 6,139, 16, 66,139,255,125,169,176,121,147, 70,246, 46,110, 99,230,237,185,161, 18,159, +222,193,173, 79, 91,227,241,232,238, 80, 61,187,131,241, 35, 39,168,172,172,108,134,247,242, 38,205,203,115,180,158, 62,125,138, +237,219,183,195,222,222,158,172, 95,191, 94,241,209, 71, 31, 13,177,178,178,122,218,160, 65,131,222,230,106,112, 28, 39,254,242, +203, 47,154,110,221,186,245,180,179,179,187, 17, 16, 16, 80,133,227, 56,113,211,166, 77,154, 62,125,250,244,208,235,245,193, 13, + 27, 54,244,190,117,235,150,112,227,198, 13,240,188,121, 55, 53,193,193,193,194,145, 35, 71,138, 34, 46,222, 0,130,231,205,155, +215,115,207,158, 61, 22, 86, 86, 86, 52, 32, 32,160,138,135,135,199,141, 31,126,248,161,247,174, 93,187, 44, 44, 45, 45,169,153, + 21, 1,116, 58, 29,148, 74,229, 75, 70,170,104,185, 66,161,120,173,193,122, 67,212,170,102,133, 10, 21,110,205,157, 59,183,203, +222,189,123, 85,150,150,150,104,212,168, 81,117, 27, 27,155,219, 11, 22, 44,232,186,111,223, 62,149,165,165,165,217,122, 50,153, + 12, 91,182,108, 81,247,235,215,175,179, 66,161,184,213,168, 81,163,234, 50,153, 12,219,182,109, 83,247,235,215,175,163, 90,173, + 14, 14, 8, 8,168,105,174,158, 32, 8,227,151, 44, 89, 34,255,237,183,223,248, 74,149, 42,181,155, 61,123,182,218,223,223,159, + 80, 74, 65,229, 85,173, 77, 18,218, 83,199,153,220,120,189,225, 32, 7,146, 40, 72, 12,253,109, 4,158, 69,177,222,196,239,132, + 7, 49,212, 5,136, 87,240,211,188, 10,117,155,245,151, 32,105, 63, 2,107, 88, 72,206, 4,103, 59, 82, 17, 21, 33,152, 26,224, + 92, 75, 73,153, 52,101,198,218,224,168,247,137, 59, 92,133,160,182,253, 37, 81, 81, 81,168, 82,179, 37,127,224, 6, 28, 41, 69, +101, 16,161,126,153, 52, 95, 46, 87,147,122,245,234,165,137,136,136, 64, 80, 80,144, 90,161, 80, 76,124, 39, 81,188, 43, 53, 42, +226, 66,141,102,184, 88,195,185,188,105,251,179, 35, 87, 22, 10,249,217,109, 91,126,117,169,221,236, 51,178,102, 76, 37,219, 10, + 22,178,223,222, 38,146, 85,104,174,142, 92,187,118,205,238,189,247,222,195,140, 25, 51,236,173,172,172, 78,252,221, 35, 89,197, +205, 21, 33, 68, 85,216, 60, 24, 7,192,237, 45, 52, 23,204,152, 49, 99,196,164, 73,147,112,245,234, 85,252,240,195, 15,232,216, +177, 35,108,108,108, 2,205,213,104,208,160, 65, 64,139, 22, 45,182,183,104,209, 34, 62, 58, 58, 58, 43, 50, 50, 50,171, 89,179, +102,241, 45, 90,180,216,222,160, 65,131,128,183,217,229,194, 23,227,205,121,248, 90, 15, 82,140, 58, 19, 39, 78, 12, 36,132, 28, +156, 56,113, 98, 3, 0,246,132,144,131, 0, 28, 0, 56, 20,190,151,191,242,215,161,208, 52, 21,125, 95,161, 36,141,162,215, 43, +219, 57, 20, 91, 94,252, 55, 94,125, 95,122, 4,139, 16,210, 2,192,249, 87, 87,144,138,152, 58,236,235,239,149,225, 27, 23, 35, +126,203, 18,144,148, 88,240, 25, 9,200, 63,191, 31,198, 11,251, 49,176,113,144, 74, 5, 50,189, 60, 7,213,194,194, 2, 50,153, + 12, 79,159, 62,197,195,135, 15,209,177, 99, 71,217,242,229,203,173,253,252,252, 86, 54,105,210,228,106,195,134, 13,253,204,200, + 24, 84,171, 86, 13,125,250,244,145,143, 30, 61,218, 83, 46,151, 95,166,148, 74,170, 84,169,130,143, 62,250, 72, 54,126,252,248, + 74,114,185,252,162, 40,138, 50,181, 90,109,182,121, 33,132, 64,173, 86, 3,128,212,203,203,235,210,246,237,219, 43, 55,105,210, + 68,114,252,248,113,100,103,103,243, 85,171, 86,189,186,125,251,118,175,198,141, 27, 75, 46, 94,188, 8,173, 86,107,182,193,202, +205,205, 45,209, 96,229,228,228,252, 97,185, 25,230,234, 19, 79, 79,207, 11, 59,118,236,112,107,218,180, 41,127,230,204, 25,100, +103,103,195,221,221,253,226,142, 29, 59,220,130,130,130,248,203,151, 47, 35, 59, 59,187, 76, 6,171,240,248, 73,199,142, 29,235, +198,243,252, 5,153, 76,134, 74,149, 42,225,163,143, 62,146,125,253,245,215,110, 50,153,236,156,185, 77,134,130, 32,200, 29, 28, + 28, 96,109,109,141,207, 62,251, 76, 93,189,122,117, 98, 50,153, 64, 41,133,220,144,107, 32, 34,173, 70, 8,247, 1,225,121,131, + 0,178,149, 80,190,153,104,146,200, 88,181,243, 6,172,252,236,192,147,214,145,241,249, 10,165,198,195, 66, 99, 95, 29, 72, 59, + 15, 79, 55, 5, 8,225, 20,215, 31,229,104,192,147,214, 16, 82,237,202,164, 41,160,245,243,216,124,133, 65, 85, 75,227,234, 86, + 17, 41, 41, 41,240,168, 82, 3, 58,206, 65,126,249, 65,142, 6,180,140,154,133,248,251,251, 55,241,240,240,112,174, 92,185, 50, + 82, 82, 82, 80,181,106, 85, 88, 88, 88,216,212,171, 87,175,117,185,143,193,185,202, 10,100,113,141, 32, 96, 46,128, 41, 0, 55, + 19, 36,165, 46,110,249, 75,255,110,230,106,251,214, 95, 93, 43,184, 84, 7,238,127, 6, 39, 59, 57,214, 79,172, 99, 91,193, 66, + 81, 46,147, 69, 8,169,233,228,228,116,228,218,181,107, 21,148, 74, 37,130,131,131,225,235,235,139,197,139, 23,219,219,216,216, +252,109, 77,214, 43,230,202,150, 82,170, 5, 32, 2,232,133,114,140,122, 37, 5, 44,254,254,251,239,191,152, 52,105, 18,174, 92, +185, 2, 55, 55, 55, 36, 37, 37,161,121,243,230, 81, 25, 25, 25,243,205,137, 86, 53,111,222,252, 71, 91, 91,219,131, 67,134, 12, +233,178,109,219, 54,171,189,123,247,146, 22, 45, 90,144,138, 21, 43, 90, 13, 25, 50,164,139,173,173,237,193,230,205,155,255,104, +110, 84,171, 16, 9, 0, 37, 0,117,209, 43, 44, 44, 76,238,237,237, 45, 39,132, 40, 11,205,165,130, 16,194,158,166, 82,138, 7, + 41,134,253,188,121,243,230, 80, 74,187,204,155, 55,111, 78,177,237, 14,190, 65,179,184,105, 2, 0,188,170, 65, 41,237, 82,252, +111,241,109, 41,165, 93, 40,165, 93,138,111,255,166,223,123,173,193, 2,112,150, 82,218,226, 15, 97, 64, 2, 63,103,207,234,200, + 56,177, 19, 42,158,188,244,226,158,223,135,135, 82, 2, 19,165, 53,203,115, 64, 45, 44, 44, 94,188, 56,142, 67,124,124, 60,120, +158,199,180,105,211,148, 35, 70,140,168, 37,145, 72,206,180,104,209, 98,102,105,134, 5, 0,174, 95,191,142,170, 85,171,146, 73, +147, 38, 89, 54,111,222, 92, 2, 0,119,239,222,133,183,183, 55,153, 53,107,150, 69,215,174, 93, 73, 89, 12, 22,199,113, 80, 42, +149,104,217,178, 37,217,176, 97,131, 70,161, 80,224,208,161, 67, 72, 73, 73,193,123,239,189, 39,217,176, 97,131, 70,169, 84,226, +220,185,115,200,204,204, 44,147,113,203,207,207,199,171,105,121, 93,100,235, 77, 52,105,210,100,181,179,179,243, 15,155, 55,111, + 86,168, 84, 42,156, 57,115, 6,153,153,153,232,219,183,175,105,235,214,173, 74, 43, 43, 43, 92,190,124, 25,153,153,153,229, 42, +240,197,142,169, 42, 40, 40,200, 8, 0,183,111,223,134,143,143, 15,153, 52,105,146,202,202,202,106,126,179,102,205, 86,155, 17, + 74, 70, 94, 94, 30,116, 58, 29,158, 61,123,134,180,180, 52,196,196,196, 64, 20, 69, 16, 36,101,139, 50,233,111, 68, 20, 62,224, +165, 10,133,132, 35,143, 64, 80,131, 74, 68, 25,249,238, 59, 86,249,188,174, 16,201,242,171, 66, 36,117,175,132,228,216, 54,125, +175,159, 12,201, 71, 0,106, 4,136, 4,173, 26,186, 75,246, 95,206,115, 4, 37,126, 80, 17, 31,192,140, 2, 69, 8,129, 84,239, + 13, 74,234,159, 8, 54,217, 53,109,255,185, 44, 38, 38, 6, 50,153, 12, 10,133, 2,245, 27,127, 40,217,126,214,232, 12,160, 54, +148,164,154, 89,154, 47,155,246, 9,131, 7, 15, 86,199,198,198,190,208,236,216,177,163,198,194,194, 98, 82,185,205, 21,111, 17, + 8,147, 48,226,193,115,109,197, 89,155,227,171,135,198,104,125,192,209, 81,208, 11,117,222,214,100, 85,169, 82,165, 89,245,234, +213, 67,188,188,188,130,222,198, 92, 89, 42,228,103,118,108,253,213,213,206,185,192, 92, 65,200, 3,120, 21,156, 29,109,177,126, +122, 75,219, 10,150,170, 50,153,172, 66,115,117,248,234,213,171, 21,148, 74, 37,110,222,188, 9,185, 92, 14,165, 82,137,218,181, +107, 99,237,218,181,246,182,182,182,127, 11,147, 69, 8,177, 33,132,180, 37,132,244, 32,132,116, 47,102,174, 42, 3,104, 73, 8, +105, 13,192, 9,192, 69, 74,233, 61, 51, 53,131, 36, 18,201,238,186,117,235,134, 73, 36,146,224, 57,115,230, 12, 27, 63,126, 60, +150, 45, 91,134,150, 45, 91, 62,159, 48, 97, 2, 30, 63,126,108,202,205,205,237, 69, 41, 61, 82,154, 94, 92, 92,220, 20, 47, 47, +175,158,123,247,238,213, 84,170, 84,137,203,205,205,197,137, 19, 39,176, 96,193, 2,228,231,231,195,221,221,157,219,187,119,175, +198,203,203,171,103, 92, 92,220, 20, 51,210,103,111,111,111, 95, 21, 5,205, 89, 10, 0, 42, 0,234,136,136, 8,205,153, 51,103, +108,235,214,173,107, 99, 97, 97,161,158, 50,101,138,235,232,209,163,187,148, 22, 1,249,151, 81,162, 7,121,141,105, 42,126,125, +233,242, 58,211, 83,244, 93, 73,230,169,188,137,124,211,239,189,201, 96,181, 36,132,156, 43,105, 37, 67, 90, 34, 20, 16,160,230, + 9, 84, 18, 82,240,151, 39, 80, 17, 17,146,244,196, 50, 86,181, 47, 27, 44, 75, 75, 75, 88, 90, 90,190,100,180,180, 90, 45,114, +115,115, 95,234,163,244, 58,138,154,252,108,109,109,145,157,157, 13,147,201,132,162,230, 48, 59, 59, 59,228,231,231,131, 16, 2, +141, 70, 3,141, 70, 83,102,131, 5, 0, 87,174, 92,193,165, 75,151, 32,145, 72, 96,103, 87,112,243,126,243,230, 77,220,187,119, + 15,114,185, 28, 21, 42, 84, 40,147,174, 94,175,135, 82,169,252, 67, 31, 44,189, 94, 15,133, 66, 97,118, 51, 38,199,113,208,233, +116,244,230,205,155,184,127,255, 62, 20, 10, 5, 28, 28, 28, 32,147,201, 16, 29, 29,141, 71,143, 30, 65, 46,151,195,193,161,124, +231,176,149,149, 21, 50, 50, 50, 32,138, 34, 84, 42,213,139,101, 57, 57, 57,224, 56,206,172,252, 41,226,246,237,219,184,114,229, + 10,194,195,195,113,247,238, 93, 60,126,252, 24, 47, 61, 69,128, 22,134,209,141,162,145, 2, 28,111,228,185, 25,152,206,170,156, + 18,171,161, 58, 86,224, 36,109,146, 51,140,138,148, 28,185,149,147,119, 27, 32,229, 8, 64,120, 64,106,131, 70,245, 60, 17,149, + 32,168, 31,199,228, 43, 97, 16,218,225,120, 77, 27,179, 52, 37,146,214, 73, 25, 70, 69,120,166,131,101, 77, 63,127, 36, 37, 37, + 65,161, 80, 64,161, 80,160, 65,195, 54, 8, 75, 16, 85, 15, 34,180,106,136, 98, 91,179, 52,255, 27,189,242, 84, 42,149,129,245, +235,215, 39,137,137,137, 80, 40, 20, 80, 42,149,104,220,184, 49, 56,142,171,229,239,239,239, 83,166,253, 15,243,150, 67,102, 17, + 0, 8, 35, 30, 62,207,115,217,119, 73, 91,245,253,247, 63,180, 93,250,123,178,207,195, 8, 93,101,152, 12,163,145,109,172, 87, + 94,147, 85,165, 74,149,166,106,181,122,215,148, 41, 83, 42, 75,165,210, 61,158,158,158, 77,202,163,163, 86,240,203, 39,143,238, +235,106, 91,100,174, 76,185, 0,175, 2,120,117,129,201,114,178,199,172,209,109,109, 85, 82,217,118,115, 53, 85, 42,213,198,149, + 43, 87,218, 23,153, 43,153, 76, 6,165, 82,249,226, 85,191,126,125, 76,159, 62,221,222,214,214,118,195, 95,108,174,108, 1, 52, + 1,112, 31,192, 94, 0,103,138,153, 43, 47, 0,251, 10,163, 86,119, 40,165, 81,102,106, 54,234,208,161,195,145,176,176,176,246, +119,238,220,113, 78, 72, 72,240, 25, 59,118, 44,150, 46, 93,138,241,227,199,255, 70, 41,173,187,115,231,206,198,215,175, 95, 15, +164,148,134,152, 89,135,126,218,191,127,127,181, 74,165,130, 82,169,196,230,205,155,241,249,231,159, 67,161, 40, 24,203,161, 86, +171,161, 82,169,208,191,127,127, 53, 33,100,176, 25,146,105, 89, 89, 89, 22, 61,122,244,240, 40,140, 92,105,244,122,189, 69, 74, + 74,138, 21,199,113,214,181,106,213,114,156, 62,125,186, 79, 78, 78, 78,157, 3, 7, 14, 36, 1, 72, 97, 21, 90,233, 30,228, 85, +131, 99,206,178,242,174,111,174,201, 42,147,193,162,148,158, 3,208,188,132, 21,238, 71,221, 56, 7, 59,223,250, 47, 71,176, 36, + 4,106, 75, 43, 60,143,141,134, 20,228, 97, 57, 18,248, 82, 4,171,232, 21, 31, 31,143, 9, 19, 38,228,109,217,178,229,129,193, + 96,104,117,238,220,185,105,230, 68,176, 28, 29, 29, 17, 21, 21, 69, 23, 44, 88,144,125,244,232, 81, 83,209,178,232,232,104, 58, +117,234,212,156, 95,127,253,149,150,181,137, 80,165, 82,225,220,185,115,116,218,180,105, 89,177,177,177,212,206,206, 14, 21, 42, + 84,192,169, 83,167, 76, 19, 39, 78,204, 10, 13, 13,165,118,118,118,176,179,179, 43,147,174, 32, 8, 80,169, 84, 47,109,195,113, + 28,140, 70,227, 31,150,191,137, 11, 23, 46,124,158,153,153, 57,254,155,111,190,209,134,132,132, 80, 7, 7, 7, 56, 56, 56, 96, +227,198,141,146,143, 63,254, 88,123,247,238,221, 23,203,202,131,189,189, 61, 30, 63,126, 76,231,206,157,171, 61,121,242,164, 20, + 0, 28, 28, 28,240,248,241, 99,250,253,247,223,107, 51, 50, 50,198, 95,184,112,225,115,115,242, 58, 45, 45, 13, 41, 41, 41,136, +137,137, 65, 74, 74, 10, 82, 83, 83, 33,138, 34, 40, 28, 45, 57,131,241, 35,240,220, 30,193,152,159,111,148,144,106, 0,125, 46, +136, 6,253,244,233, 96, 51,135,151,132, 92,112, 2,104,227,139,247,114,172,219,117,234, 45, 39, 89,215, 1, 99, 14, 32,181, 5, +164,182,144, 40, 43,160, 67,235,122,252,134,227, 89, 78, 32,104, 8,107,121,233,253, 91,164,162, 35,168, 24,116,242,150,206,166, +105,199,145,242,180,180, 52,112, 28,247,194, 96,169, 53, 26,180,237,212,159,251,229,132,206, 9, 34,109, 4, 21, 49,187,207,140, + 76, 38, 27, 51,120,240, 96,217,171,154, 42,149, 10,221,186,117, 83,104, 52,154,241,102,239,251, 35, 95, 25,146, 84, 1, 16,133, + 17,143, 35,180, 46,123, 47,107,171,142,157,254,139,170, 86,157,134, 24,254,190,131,106,238,150,228, 26,119,194,242, 42, 67, 98, + 26,137, 28, 99,125,172, 45,155,201,242,244,244,108,162, 86,171,119,239,221,187, 87,221,170, 85, 43,140, 27, 55, 78, 35,147,201, +246, 84,169, 82,165,204, 35,166,181,217,194,215,223, 47,221,156,116,247,183, 14,128, 41,187,208, 92,253,247,149,148, 41, 98,234, +202, 51, 89,122, 42,126,108,182,166, 86, 59,228,179,207, 62, 75,219,181,107,215, 31,204,149, 82,169, 68,120,120, 56,102,205,154, +149,158,158,158, 62,244, 47, 46,165,117, 0,220, 5,160, 3,208, 20,128,186,112,164, 96, 96,161,217, 18, 40,165, 73,148,210, 4, +115, 5,121,158,255,122,213,170, 85, 18,173, 86,139, 33, 67,134, 32, 58, 58, 26,113,113,113,152, 60,121,114,132, 40,138, 67, 10, + 53,239, 81, 74,159,152,171,153,155,155, 59,124,230,204,153,218,216,216, 88,248,249,249, 33, 41, 41, 9,157, 58,117, 66,231,206, +157,161, 86,171, 81,187,118,109, 68, 71, 71,227,187,239,190,211,229,229,229,153, 83,215,137, 70,163,241,225,153, 51,103,148, 93, +186,116,169,182,112,225,194, 42,103,206,156,241,206,203,203,171,156,159,159, 95, 35, 62, 62,222,247,192,129, 3, 21,215,174, 93, + 27, 29, 17, 17,113,131, 82, 42,176, 10,237,205, 30,228, 29,112,232,109, 34, 85, 37, 69,192,204,133, 43, 20, 34,197,255,190, 20, +189, 34,248,126,211,239, 27,117,242, 74,213, 96, 93,163, 46,212, 74, 37, 84, 10, 57, 84, 54,118,208,137, 34,214,133, 39,228,229, +130,126,247,182, 6, 75, 20, 69,172, 89,179, 70, 55,107,214,172,204,248,248,248, 81,231,207,159,111,116,237,218,181, 82, 71, 41, +112, 28,135,172,172, 44,236,220,185, 83,187, 97,195,134,231,249,249,249, 65, 82,169,212,164,215,235,177,109,219, 54,221,178,101, +203, 34,117, 58, 93, 83,169, 84,106, 40, 75,243, 91,145,193,146, 74,165,198,252,252,252,160,223,126,251, 45,236,224,193,131, 90, + 43, 43, 43, 72, 36, 18,147, 78,167, 11,220,188,121,243,211, 29, 59,118,104,173,172,172,202,164, 43,138, 98,137,125,176, 4, 65, +120,113,231,100, 46, 55,110,220,216, 96, 52, 26, 91,108,223,190, 61,118,195,134, 13, 58, 43, 43, 43, 0,128, 32, 8,205, 54,109, +218, 20,251,211, 79, 63,229,151,165,131, 59, 0, 24, 12, 6, 8,130,128, 77,155, 54,229,239,216,177, 35, 86, 20,197,102, 69,203, +126,249,229, 23,221,230,205,155, 99,141, 70, 99,139, 27, 55,110,108, 48, 51,175,245,113,113,113,136,143,143,199,221,187,119,245, +143, 30, 61,162, 41, 41, 41,160,148,194, 40,209, 72, 40, 71,158,138,148,254, 78, 5, 65,198, 83,244, 38, 32,231, 9,207, 27, 88, +149,243, 26,114,160, 6, 33,170, 39,209, 58, 75,165,204, 72,144,176, 27,144,217,190, 48, 88,144,218,194,213,205, 29, 55, 30,231, + 89,128, 64, 14,157,177,116,135,157, 71, 53, 32, 68,253, 32,130, 90, 74,100, 42,146,152,152,248,226,162, 93,100,136,170,120,249, +226,246,211, 60, 13, 8, 20, 16, 97,246, 84, 34,162, 40,118,180,176,176,144, 20,105, 22,233, 41, 20, 10,120,122,122,242, 70,163, +177,157,217,251,158, 40, 58, 67, 48, 13,127, 18,169,115,217,123, 81,235,253,245,212, 95, 84, 42, 46, 29,136, 88,134, 90, 85,157, +241,245,160, 58,242,201,235, 83,106,222,120,152,231, 9, 78,248, 12, 53,115,237,205,149,246,242,242, 10, 82,169, 84,123,246,238, +221,171,214,104, 52, 8, 11, 11, 67,157, 58,117, 48,107,214, 44,181, 74,165,218, 93,165, 74,149,102,101,201,166,203,143,104, 84, + 94,142,208,234,219, 53,209,137,119,195,133, 2, 99,197, 21,152,171,228, 44,138,207,166,238,207, 76,207,209,245,189,122,199,120, +174, 12,245,230,221,204,204,204,174, 83,167, 78, 77, 75, 73, 73,121,201, 92, 69, 70, 70,162, 79,159, 62,233, 41, 41, 41,237, 41, +165, 15,255,226, 82,170, 65, 65,231,117,159,194,136, 85,109, 74,169, 9, 64, 78,121, 77, 69,205,154, 53,235, 86,170, 84, 9,171, + 87,175,198,186,117,235, 50, 22, 47, 94, 12, 74, 41,170, 85,171,102, 85, 94,205, 59,119,238, 28,209,106,181, 19, 6, 14, 28,168, +221,186,117,171,240,241,199, 31, 35, 32, 32, 0,254,254,254, 24, 56,112, 32,214,173, 91,103, 26, 48, 96,128, 78,167,211,141,191, +115,231,206, 17, 51,243, 40, 63, 43, 43,235,206,161, 67,135,238,173, 90,181, 42,230,171,175,190,202, 25, 58,116,168,108,206,156, + 57, 41, 59,119,238,188,115,225,194,133, 99, 58,157,238, 6,165, 52,159, 85,102, 47,142,217,107, 61, 72, 49,146, 11,141,142,254, +149,191,201,165,124,103,238,182, 37,190, 55, 99,189,215, 82,234,136,155,157,161,244,106,127, 47,178,228,251, 95,126,250,106, 64, +237,154,170,202, 85,106, 66,200,201,192,189,132, 4,108,138,207,204, 51,136,116,205,206, 48,122,190,188, 6,139,231,121, 28, 59, +118, 76,216,182,109,155, 1,192, 47,153,153,153, 51, 67, 66, 66,114,203, 80,121,115,131, 7, 15,206, 77, 75, 75,219, 23, 31, 31, + 63, 42, 52, 52, 84,223,172, 89, 51,174, 95,191,126,185,169,169,169,135, 8, 33, 95, 94,187,118, 45,191,105,211,166, 40,203,131, +173, 9, 33,144,201,100, 32,132,224,250,245,235, 17,190,190,190, 1, 87,175, 94, 93,242,244,233,211, 15, 41,165,220,141, 27, 55, + 98,252,253,253, 27, 94,190,124,121,209,163, 71,143, 62, 18, 69,145, 51, 87,151,227,184, 63, 68,170, 8, 33, 47, 76, 93, 89, 71, + 17,222,184,113,227,161,175,175,175,255,213,171, 87,215, 12, 29, 58,180, 45, 0,245,213,171, 87, 31,215,174, 93,187,254,213,171, + 87,215, 12, 26, 52,168, 93, 97,184,218,108,131,213,189,123,247,188,204,204,204, 19,217,217,217,195,238,221,187,151,231,239,239, +143,238,221,187,231,101,100,100,156,204,200,200, 24, 86,150, 60,162,148,206,191,120,241,226, 44, 74,169, 68,165, 82, 29,185,115, +231, 78,219,188,188, 60, 53,165, 20, 68,120,158,197,233, 27,238, 18,136,132,163, 18,190, 51, 8,170,130,199, 52,153, 92,205, 66, +231,175, 67, 97,202, 6, 33,241,189, 90,219, 41,150,173,252, 69,250, 73, 87, 79,165, 95,141, 74, 5,230, 74,102,139, 27, 15, 51, + 48,125,241, 78,113,238, 80,251, 8,136, 52, 6, 6,250,180, 84, 77, 43, 62, 27,249, 98,242,224,246,114,197,188,159,191,170,220, +164,243, 55,138,154,126,129, 47,140,208,163,144,155, 88, 58,111,148, 56,119,136, 77, 4, 68,196, 67,143, 39,101, 56, 71,251,207, +155, 55,111,239, 39,159,124,162,169, 85,171,214, 11,205,240,240,112,252,240,195, 15, 90,157, 78,215,215,220,179, 18,210, 26,117, + 4, 19,117,216,122, 34,213,123,204,200,225,106, 21,151, 6, 60, 95, 88, 96, 94,164,214,168, 87,203, 30,211,190,116,150,142, 93, +112,160,198,197,101,158, 57, 16,229,213, 1,196,155,117,183,201,113,187,231,204,153,163, 86,169, 84,120,250,244, 41,138,154,141, +252,253,253,177,116,233, 82,245,136, 17, 35,246,182,108,217,210,241,236,217,179,166,178,152,172,160, 26,164,213,183,171, 66,207, +252, 48,218,198,169, 78,117, 7,164,100, 3,159, 77, 63,144,145,154,163,235, 95, 22,115, 85,220,100, 17, 66,186,142, 30, 61,250, +192,198,141, 27,237,106,214,172,137,232,232,104,244,233,211, 39, 45, 37, 37,165,195,223,192, 92, 1, 64, 46, 0, 87, 0, 79, 81, +208, 23, 41,140, 16, 34,199, 91, 60,158,237,225,195,135,119, 34, 35, 35,157, 63,253,244, 83,100,101,101,217,244,238,221, 27, 97, + 97, 97,120,242,228,201,221,183, 73,232,245,235,215,215, 55,106,212,232,202,134, 13, 27,198,114, 28,215, 36, 63, 63,223, 1,128, +120,252,248,241, 4, 65, 16, 46,104,181,218,229, 55,111,222,124, 90,198, 60,162, 0, 82, 11, 95, 79, 89,165,245, 78,184,241, 23, +109, 91,110,204, 42,236, 91,195,232,236,158, 94,228,236,186,171,215,167, 25, 40,173, 11, 0, 50,142,220,207, 33,116,230,239, 97, +244,226, 27,204,196, 27,159,182, 29, 30, 30,142,101,203,150,229,229,228,228,220, 51,153, 76, 95, 92,187,118, 45,212, 12,131,242, +146,166, 68, 34,185, 26, 29, 29,189,229,230,205,155,187,139, 47,139,137,137,217,118,253,250,245,223,139, 45,139,110,213,170,149, + 27, 33, 36,213,156,116, 18, 66, 18,186,117,235,198,243, 60, 31, 11, 0, 33, 33, 33, 6, 0, 95, 6, 4, 4, 28,179,176,176,248, + 24, 0,130,131,131,141, 0, 70, 5, 6, 6,158,208,104, 52,159,152,179,239,132, 16,240, 60, 95, 98, 4, 11,192, 27, 59,185,191, +233,120, 22, 26,158,126, 1, 1, 1,159,168,213,234,254, 0,112,239,222,189, 60, 0,253, 3, 2, 2, 62, 86,171,213, 3,204,213, + 84,171,213,215, 18, 19, 19,183,220,184,113, 99,227, 43,203,182,154, 19,181,122, 85,243,198,141, 27,171, 0,172, 42,250,220,176, + 97,195,250,207,158, 61, 59, 34,138,162, 74,146,250, 60,239,246,161,142, 73,254,195,206,120, 10, 28,213,128,208,169, 38,142,164, +221, 94,220, 72, 87,150,178, 84, 30,254,111, 53, 43,112, 81, 72, 37, 75,189, 93,149, 99,135,118,181, 35,243,119, 60,175, 60,178, +191,179,188,126, 93, 91, 92, 11, 73,199,184, 89, 91,197,121,195, 28,158, 55,241,181,136,128,136, 85, 16,242,147, 75,213,180, 48, + 70, 65,103, 92, 92,205, 67, 49,118,236, 7, 34,153,182,121,118, 21,165,114,150,172, 65,195,150,120,248,224, 58,230,207, 24, 38, +206, 31,102,243,188, 73, 77,203,104, 16,238, 71, 8,186,100,115,247,253,198,141, 27, 87, 2, 2, 2,186,111,220,184,113,239,232, +209,163, 53,181,107,215, 70,120,120, 56,102,206,156,169,205,203,203,251,240,246,237,219,231,205,222,119, 74, 40, 64, 33, 10, 16, + 38,204,248, 81,175,213, 11, 68,107,160, 68,167, 7,167,205, 23, 73,142, 94, 36, 70,163, 72,220, 28,212, 5, 17, 13,238,143, 55, + 62,175, 75, 39,199,113,153,163, 71,143,182,120,173,175, 85, 40,114,203,147,239, 47, 76,214,178,224, 51,227, 63,147, 57, 45,223, +118, 51, 61, 37, 75, 55,160, 52,115,245, 38,205, 34,147,245,201, 39,159, 28, 88,176, 96,129,221,196,137, 19, 83,147,146,146, 58, +150,102,174,254,135,101,254, 46, 10,230,182,186, 70, 41,189, 64, 8,209,160, 96, 14,162, 7,229,213, 20, 4, 97,241,240,225,195, +219,205,153, 51, 71, 50,125,250,116,132,134,134,226,251,239,191, 23, 76, 38,211,130,183, 61, 55,175, 94,189,250, 24,192,103,255, +154, 58,228,111,170,249, 79,131,148, 37,170,243,174, 50,192,223,223, 63,175,125,251,246,218,115,231,206,229,234,116,186,145,183, +110,221, 58,244,111, 41,124,173, 91,183, 62,205,243,124, 21, 66, 8, 40,165,241, 39, 78,156, 8, 2,128, 86,173, 90,157,150, 72, + 36, 85, 10,239,248,227, 79,157, 58, 21,244, 79, 62,241, 26, 52,104, 80, 23,192,108,157, 78,215, 43, 36, 36, 36,183,222,168,163, +246, 68,203, 89, 17,158, 55, 4,175,105, 19,205, 42,157, 82, 52,143,122,203,161, 86,212, 7,232,216,123, 97,121,149,167,110, 76, +173,210,165, 93, 99,233,166,223,207,139,243,134,191, 48, 87,139, 65,181, 55,209, 34, 34,223,108, 77, 37,215, 0,188,100,236,237, +103,121, 21,199,173, 73,247,106,215,229, 51,254,224,238, 53,226,252, 97,118, 69,230,106, 17,132,156,235,102,107, 22, 35, 32, 32, +160,177, 76, 38,219,219,183,111, 95,205,142, 29, 59, 74, 53, 87, 37,106, 94,246,245,128,137,206, 0,161,165,247, 1,163, 92, 24, +140,152,135, 54, 33,209,127,135,124, 15,170, 65, 42,170, 44,148,187,114, 13,198,111,204,137, 92,153,163, 73, 8,169, 99, 99, 99, +179, 62, 35, 35, 99,160, 57,145,171,255,229,190, 19, 66,236, 1,248, 23,222,200, 19, 0, 15, 41,165,207,223, 82, 51,136,231,249, +175,189,189,189,253, 66, 67, 67, 67, 4, 65, 88, 66, 41,189,192,140, 11, 51, 88,204, 96, 21,210,172, 89,179, 75,162, 40,158,144, + 74,165, 63,156, 61,123, 54,159, 21, 62,166,201, 52,203,161, 89,204,100,221,124,154, 91,101,222,142,116,143, 49, 61,173, 99, 74, + 51, 87,165,106, 22,154,172,235,143,243, 42,205,255, 45,203,227,235, 15, 45, 98, 74, 51, 87,230,238,123, 64, 64, 64, 99,185, 92, +190, 54, 47, 47,239,203,210,204, 85,137,154,143,124,101, 72, 53,185,130, 18, 95, 80,250,250, 71,237, 16, 62, 15,132, 11, 65, 18, + 77, 66,207, 16, 3, 43, 75, 76,147,105, 50,131,245,191,230, 47,153,245,248,194,133, 11, 77,216,161,103, 48,222,146, 14,161,122, + 28,245,190, 5,181, 98, 81, 3, 31,213,240,221,223,169,243, 64, 73, 44, 68,250,227,155,204,149, 25,154, 55,161, 52, 45, 10,172, +166,250,114,207, 12,117, 30,128, 68,128, 91,241, 38,115,101, 46, 55,110,220,184, 2,192,183,220, 2, 53, 66, 12, 0, 34, 0, 18, +137,239,222, 48, 67,246,116, 80,224, 79,188,123,100, 48, 24,140,191,163,193, 98, 48, 24,239,208,100, 61,242, 13, 70,178,116, 18, + 8, 42, 67,106,140, 70,150, 49, 17, 29, 34,244,111,169,121, 3,201,124, 36, 40,170, 66, 98,124,142, 44,221,219,105,190,115, 40, + 45, 48, 81, 12, 6,131,193, 12, 22,131,193,248, 51,168, 17, 98, 64, 13,196, 2,136,253, 91,107, 50, 24, 12,198,191, 8, 2,192, +175,228,251, 67,243,219, 86, 9, 33,126,101,253, 97, 51, 58,111, 50, 77,166,201, 52,153, 38,211,100,154, 76,243, 31,166, 89,154, +246, 63,165,111,215, 95,210,201,157,105, 50, 77,166,201, 52,153, 38,211,100,154, 76,243,159, 12,123,152, 46,131,193, 96, 48, 24, + 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 96, 6, +139,193, 96, 48, 24, 12, 6,227,111,195,159, 58,138,144,193, 96, 48, 24, 12, 6,227,223, 8, 7, 0,132, 16,230,178, 24, 12, 6, +131,193, 96,252,207,249,167,122, 16,214, 68,200, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6, +131,193, 96, 48, 24,255, 78,131, 69, 8,161,172, 47, 22,131,193, 96, 48, 24,140,255, 53,255, 68, 15,194, 70, 17, 50, 24, 12, 6, +131,193, 96,188, 99, 88, 19, 33,131,193, 96, 48, 24, 12,198,255,147,193, 34,132,248, 49, 77,166,201, 52,153, 38,211,100,154, 76, +147,105, 50,131,197, 96, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24, 12,102, +176, 24, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96,252, 69, 16, 0, 37,142, 4,160,148,222, 55, 91,164, 28, +163, 9, 74,211,103,154, 76,147,105, 50, 77,166,201, 52,153,230, 63, 79,179, 52,237,178,248,143,191,181,193,250, 51, 39, 26, 37, +132,248,189,235, 3,197, 52,153, 38,211,100,154, 76,147,105, 50,205,127,158,230, 63, 13,214, 68,200, 96, 48, 24, 12, 6,131,241, +142,145,252,211,118,200,215,183,151, 44, 83, 74,223,183,181,181, 26, 11, 74,145,158,145,189,200,218, 72,246,135,132,236, 52,252, + 89,191, 73, 8, 33, 0, 64,255,161,207, 29, 34,132, 40,107,213,170, 21, 0, 0, 15, 30, 60,184, 65, 41,213,189,237,241,114,240, +237,241,181,165,149,106,128,201, 40, 80,157, 54,127, 67,226,131, 61,203,217,233,248,239,192,202,183,189,173, 74,102,201, 39,220, +222,153,194,142, 6,131,193, 96, 6,171,144,138,126,253,108,242,137, 97, 50, 47,225,187, 83, 42, 90, 36,220,222,233,240,119,216, + 17,199, 90,221, 61,109,108, 45, 71,214,106, 84,163,103,191, 15,219, 43,107,215,242,145,231, 27, 76,216,127,248,252,143,191,237, + 63,190,208,167,249,160,189, 25,233,217, 43,146, 30,236,125,254,142,205,135, 98,242, 39,213,222,179,179, 80,200, 9, 33,123, 40, +165,166,146,214,115,170,223,239, 52, 1,169, 82,176, 13, 7,194, 1, 4, 52, 62,246,198,150,160, 18, 52,213, 0,156, 1, 68,190, + 78,175, 36, 84,174,181,220,101,156,124, 58,151,135,177,233,233,193, 89,239, 96,223, 28,189,189,189,131,170, 85,171,230, 56, 98, +196, 8, 41, 0, 44, 94,188,184, 70,213,170, 85,147, 66, 67, 67, 47, 83, 74,147,202,149, 87,190,221, 38, 76, 29,255,249,148,247, +219, 55, 69,122,142, 17, 43,214,255, 54,215,201,175, 7,159,120,127,207,146,119,149, 47, 22,206, 53,107,242, 82,213,215,162,104, +106, 79, 56,217, 41, 65,175, 93,148,155,244,224,173,195,217, 85,218, 78, 26, 7,160, 65,225,199,155,225, 39,231, 44,100,213,136, +217,229,201,170, 78, 53, 27,223,238,117,235,253,126,241,105,174,133,131, 95,247,221,224,177, 52,249,206,222,187,230,106,184,215, + 8,186, 44,225,120, 23, 65, 20, 98,163, 31, 93,110,250,103,164, 83,227, 84,179, 53, 8,214, 19, 74,165, 20,116, 5, 47,146,221, +217, 41,143,195,222,246, 6,202,202,221,215, 86, 16, 13,239,201, 57,117, 93,131,168,189, 37,145,169,142,103, 68,220,201,124, 71, +199,150, 87, 59,249,244, 87, 42,212, 95,121,251,212,168, 26, 30,254,236, 89,110,118,230,242,188,196,167,155, 40,165, 98, 89,180, +188,218, 76,252, 72,128, 56, 81, 52,233, 57, 9, 37,243,159,159, 95,178,141,149, 94, 6,227, 79, 54, 88, 14,190,189, 52, 68, 66, +111, 52, 15,106,100, 55,233,203, 30,242,165, 91,207,195,185,238, 71,161, 9,119,126,243,254, 43,119,194,165,222, 7, 21, 9,193, +189, 49,195,250,226,211,143,218,145,148,108, 19,178,180, 2,136, 20,232,245, 97,103,245, 7,221, 59,168,231, 47, 91,255,217,161, +163,103, 62,115,169,247, 65,205,248,219,187,163, 74,211,116,246,239,119, 12, 32,213,138, 62, 83,193,164, 36,188, 68, 7,160,208, + 28,113,208,216, 56, 94,152, 54,216,231,192,140, 79,107,205,216,120, 52,114, 21,128, 10, 0, 18, 75,172, 0, 57,137,219,230,181, +139, 29,220, 42,200,193,113, 28, 50,114,141,232, 61,120,140, 80, 66, 69,169,249,105, 92,189,110, 31,119,174,220, 71,209, 98,247, + 20, 66,200, 61,115, 42, 72,141, 83,245, 90,114,165,213, 65,175,186,109,109,194,239,158,244,181,112,170,241, 89,174, 82, 23, 70, + 35, 34,242,203, 90, 81,107, 52,154,106, 86, 86, 86, 13, 58,116,232,160, 26, 63,126,188,180,121,243,230, 47,190, 31, 58,116,168, +244,252,249,243,110,243,231,207,239,225,230,230,166,205,202,202,186,153,155,155,251,148, 82, 42,152,251, 27,182,182,182, 31,127, +208,185, 57,186,244,249, 18, 20, 28,198, 77,152,138, 35,135,143, 14, 2,240, 78, 12,150,165,171, 79, 53,143, 74,158,231,166,126, + 55, 87,233,227, 89,145, 28,187,120,247,131, 53, 75,102,118,208, 56,214,106,243,182, 38, 75,202,147,128,121, 95,125,216,201,104, + 2, 38, 44,251,189,212,245,157,235,247,189, 8,194,185, 21,149, 25, 66, 0,142, 0, 4, 4,148,138,177,209,215,183,188,181, 73, + 32,132,240, 42,167,234,237, 57, 42, 14, 0, 0,145,112, 91,180,137,143,143,149, 37, 79, 0,192,169,206,135, 17, 84, 20,254,112, +195,196,243,210,228,248, 59, 59, 43,191, 69,250,236, 59, 4, 57,249,159,251,177,101,219,198,181,108,253,214,156,200,183,242,239, + 56, 18,177, 25,232,185,111,207,238,158, 14,126,221,207,115,160,139, 19,239,239, 59, 85,154,150, 82,161,112, 60,112,224,128, 67, +135, 14,157,108, 28,253,186,239, 21, 9, 18, 56,138, 4, 34,114, 9,132,152, 18, 76, 28, 77, 0, 79, 18, 83,189,228, 73,238, 33, +113,231,120,142,119, 51,137, 66,124,204,163,203, 65,230, 39, 24,235,143,158,188,104,175, 51, 82,252,240,227,182,169,121,153,137, + 83, 35, 30,218, 71,170,157,170,143,207, 75,124,124,168, 44,251,174,114,175,227, 42, 17,117, 29, 92, 92, 61, 63, 28, 57,250,219, +192,118,173,155, 75, 61, 61,156,200,243,232, 68,122,226,244,121,131, 79, 96,199,171,241,177,225,187, 69,163,228, 72,110,114, 72, + 98,249,142,111, 75,137,133, 99,141, 13, 93, 63,250,180,199,251, 31,244,133,141,149, 5,244,134,252,170,103, 78, 28, 94,249,243, +202,121,141, 9, 33, 67,203, 98, 14, 5,106,154,248,243,220, 47,189, 1, 17,131, 70,205,154, 76, 8,217, 81, 86,147,198, 96, 48, +202,104,176, 8,111,154,214,184, 97, 35,187,175, 70, 12,150, 15, 95,126, 22, 81,215,143,104,223,149,185,210, 56,214,114,148,200, + 36, 3, 57,142,183, 33,224,148,162, 32, 68,103,146,228,159,104, 76, 76,169,205, 81,241,183,119, 71, 57,215,235, 22,176,108,205, +175,211,110,222, 9,105, 62,124, 80, 15,141,187,155, 43,103, 52, 81, 92,190,121, 79, 88,185,118,123, 86, 90,122,214,101, 34,161, + 51,205, 49, 87, 0, 64, 41,188, 22, 45,252,193,193,173,130, 2,153,121, 38,124,249,245, 84,204,159, 61,221,162,162,163, 18, 58, +189,136, 85, 71, 99,146,125,211, 23, 6,207,232, 81,107,198,254, 75,241,235, 7,207,186,121, 23, 64,222, 27, 13,170,181, 28, 35, +127,122, 2,149, 82, 2,107,181, 12, 60,225,254, 96,174, 86,127, 91,239,253,161,239,123, 78,154,179,233,209, 70, 0, 82, 0,114, + 0,186, 55, 71,107,124, 91,170,173, 42,108,237,248,201, 76,107,181,181, 19,250,247,236,232,123,225,248,174, 19,209,209, 17,240, +168,217, 84,103, 50,137,167,179,179,210, 87,228, 38, 62,126, 80,218,126, 87,174, 92,185,111,231,206,157, 53,223,126,251,173,212, +205,205, 13,191,237, 63,237,214,230,195,209,237, 98, 19, 83,157, 1,192,205,169, 66,194,144, 1, 93, 79, 28, 57,114, 36, 54, 54, + 54,214,106,238,220,185, 77,119,239,222, 93, 7,192,118,115,243,154, 82, 17, 38,129, 66, 16, 41, 68, 42, 34, 53, 91, 95, 46, 83, +241, 90, 3, 65, 84,147,191,157, 56, 67,149,160,181,196,143,107,159,192,223,203,145,116,236, 51, 82,181, 99,205,188,177, 0, 6, +189,109,180, 74,103, 4, 22,158, 50,211,183, 18,206,109,237,170, 37, 14, 21, 44,101,224, 9, 1, 47,225,192,115, 64,142, 78,192, +192,207, 70,189,213, 57,163,114,173,229,206, 83,227, 32, 75,215,154,131, 62,248,160,183, 75,223, 62,189, 40,207,115,216,185,231, + 96,151, 95,183,111, 76,176,112,241,217, 40, 16,233, 38,109,220,131, 24,179,242, 69, 20, 28, 14,252,190, 17, 21,172,100,224, 8, +144,154, 45, 32, 60, 81,139, 81, 95, 14, 43, 87,148,154, 16, 98,243, 69,183, 42,237,239,110,110,211,194,167,162,165,247,221,103, + 25,143, 62,249, 62,248,199,227, 49,213, 27,205, 88, 80, 3,121,186,124, 12,255,122, 10, 82,226, 34,154, 31, 59,188,191,121,133, +234,237,159, 18,125,214,244,148,240,171, 7, 95,167,169,211,233, 50, 58,118,232,108,229,236,236,168, 90,191,110,109,187,180, 76, + 45,210, 50,178,145,156,150,133,148,212,116,196, 39,166, 32, 54, 46, 30, 49,209,177, 98, 26,159,140,163, 71, 15,115, 93,187,118, + 21,202,154,118,173, 65,196,157,231, 57,168,228,211, 0,118,142,238, 8,120,239,147, 74,119,206,237,248,205,194,185,230,194,156, +132,135,211,205, 50,250,142, 62, 63,244,238,247,201,144,222, 61,123, 72,170,123,187,115, 9,201, 25,244,210,213,224,244,165,139, +151, 61,108,210,162,101,205,174, 29,219,218, 14,251,184, 87,139,199,161, 49,205,182,255,190,119,145,133, 67,245, 45, 57,201,143, + 71,149,245, 60, 80, 59, 85, 95,223,234,253, 79,122,248, 53,108,135,208,208, 80, 60, 11,185,137,150,109, 58,160, 67,231, 15,160, +207,215,245,221,180,110,105, 48,128, 53, 37,110,239,239, 47,181,201,176, 81,189, 84, 23,187,250, 72, 0, 10, 74, 41, 76,218, 76, +153,198,169,174,157,173,103, 91, 3, 0,100,216,100,104,105,112,176,145, 93, 58, 25,140,119,108,176, 56, 94,222,113,204,224, 78, +242, 9,171,175, 32,234,250,175,218,132,219,191,217, 23,125,231,238,223, 39, 36, 38,120,135,239,203, 23,210,210, 71, 24, 16,226, + 47,181,113,195,215,142, 46, 46,195,250,127, 58,146,175,228,238,196,229,232, 76,166,196,184, 24,122,244,192,246, 47,172, 43,214, +253, 33, 51,234,206,207,175,211, 36,222, 29,229, 52,244,136, 62,225,246,190, 71, 0,122, 59,214,234,235,120,233,250,253,113,182, + 54, 86,189, 76,130, 9,217,217,121, 59, 51, 50,140, 11,147, 30,108, 79, 42, 86, 41,145,226,119,116,175, 75,167,173,133, 12, 95, +175,127, 10,157, 94, 0,165, 20, 14, 54,114,204,219, 21, 9, 9, 79,146,107,101, 44, 92, 60,179,135, 97,232,111,151,244, 59, 39, +239,241,104, 2, 92, 94, 79, 41,205,121,109, 58, 1,240, 28,160, 81, 73,161, 81, 74, 96,169,146,162,160,231,214,127,205,213,143, + 99,235,188, 63,236,125,207,201,115,183, 62,222, 48,101,237,195,203, 0, 66,139,247,119, 42, 41,157, 86, 46,126,253,108, 29,220, + 22,118, 27, 58,203, 50, 34,157,131,212, 4,216,187,122,146,233, 51,102, 89, 41,229, 28, 84, 82,106,117,239,241,243,126, 95,126, +249, 85,103,181,107,141,206,121,113,143,110,191, 41,143,180, 90,173, 98,192,128, 1, 82,157, 78,103,248,116,204,188,102, 17,209, +137,239,205,158, 62, 78, 81,209,205, 17,130, 72,113,255, 73,180,247,140,217,139,220, 15,157,184,122,180, 87,251,218,199, 93, 92, + 92,108,180, 90,173, 88,150,124,207,204,204,218,182,117,207,201,241,203, 22, 47, 64, 68, 98, 46,182,110,255, 29,130, 32,110,122, +179, 41,123, 89,115,198,140, 25,206,126,126,126,178, 7, 15, 30, 36, 82, 74,181,175,172,221,177, 82,165,138,216,176, 35, 18,105, +217, 70, 60, 79,200, 71,147,234,190,132,138,134, 54,101, 44,159, 13,198,125, 53,188,179, 72,129,197,203,126, 42, 48, 92, 4,254, + 83,150,239, 4, 8, 73, 2,112,179,180,116, 18, 14,176,183,148, 97,206,239, 17, 80,201, 37, 80,201,121,168, 20, 5,127, 9,136, +153,134,244,143,233,212, 56, 87, 31, 91,167, 86,221, 25,159,125,246, 41,215, 36,168, 33,229,121, 9, 18, 51,141,132, 35,192, 87, + 35,134, 99,228, 23, 67,157,194,194,163, 38,174,254,105,205,120, 11,167, 26,243,114, 18, 31,205, 54,103,223, 43, 88,202, 48,109, +107, 56, 84,138,130,116,214,171, 98, 97,118,253,240,170,166,107,157, 78,135,207, 36, 73,125,178, 15,233,174, 63,123,122,123,254, +141,123,145, 55, 41,165,233,142,126,221,161, 55, 81,228,104,141,120, 16,101,130,168,147,162,123,135, 0,212,177,177,175,182,108, +211,153,117,132, 16,167,162,243,243, 85,205,152,199, 87, 26,216,250,247,178,162,185,234,123, 11,246, 68,216, 87,114,178,130,179, +173, 37, 28, 92, 43,160, 70, 13, 31,216,106,164,176, 82,241, 80,201,121,174, 69,135, 94,104,223,190,163, 86, 16, 77, 73,101,201, +119, 66,201,224, 15, 58, 53,223, 68, 0, 25,199,203,226, 92, 42, 85,245, 8,236,240,153,178, 65,187, 79, 96,212,235,198, 90, 56, +251,158,203, 73, 8, 57, 91,154,166,141,131,235,192,193,159, 14,149,121, 58, 41,112,250,220, 21,211,164,201,147,239,103,230,164, + 47,202,137,127, 22,114,234,244,113,103,107, 91,187,201,147,166,206,106,220, 58,168, 30,223,182,115, 31,217,209,163,199,123, 2, + 24, 85, 90, 58, 9, 33,156,202,177,234,224,170, 53,234,140,249,124,234,154, 74,177,169,122,216,186, 86,195,189,219, 55,113,116, +231,138, 59,249, 57,153,203,142, 31,218, 53,102,250,156,229,181, 59,119,235,141,131,123,119,140, 34,132,172,165, 5,188,208,180, +171,218,162,109,237, 74,126,235,157,171, 59,218, 21,215, 23, 41,143, 25,243,150, 67,151,147,142,202,174, 54,206,150, 53,189, 35, + 41, 71, 64, 69, 32, 57, 57, 65,111,239,211,226,131,148, 39,231,206,150,165,158, 47, 43, 76,243,223,169, 89, 10, 1, 0, 28, 0, + 36, 3,184,241,202,103, 20,190, 71, 9,159, 83, 10, 47,193, 21, 0,232, 11,131, 22, 69, 20,125,126,221,242,162,237, 67, 0,212, + 44,212, 20, 0, 92, 7,144, 94,170,193, 42,244, 26,164,216,201,251,210,231,151,239,112,141,110, 14, 78,206, 16,104,228, 75,151, +134, 74,129,125, 83, 70, 15,237,165,114,169,215, 51, 57,254,246,239,102,223,237,170,220,171,185,218, 84,180, 58, 60,226,171,111, +173,191,248,184,171,197,163,232,188,236,144,200,188, 44,168, 40,108, 61, 42, 72,252,218, 59, 8, 73,191, 45,156,108,237, 86, 59, + 35, 51,246,222,174,146, 52, 28,173,236, 66,220, 27,125,154,174,207,203,253, 46,229,193,206,163,133,253,130,190,113,111,220,107, + 26, 0,196, 92,217,249,194,160, 56,214,235,209, 72,161,176,153,225,218,160,127, 5, 0,245, 75, 75, 95, 90,142, 1,130, 80,224, +195, 56,142, 32, 87, 39, 64, 41,227, 82,124, 82, 23,188, 48, 87,151,232,144,143,141,116,135,172,184,185, 42,185, 82, 4,210,178, +141,208, 40, 37,176, 80, 74, 96,161,146,128, 43,116, 88,132, 16,205,138, 49,117,186,126,222,195,123,242,188, 45, 79, 54, 78,254, + 41,228, 50,128, 39,148,210,140, 55,105, 90, 57,213,104, 40,183,182, 95,252,217,183, 75, 52, 23,159,228,194,213, 78, 14,191, 74, + 86,176, 86,203, 17,155, 86,208,167, 63, 46, 85, 7,157,193, 18,221,135,204,176, 58,178,115,229,121, 91,247, 58,155,210, 99,238, +142, 40,109,223,119, 31, 58, 95,229,121, 84,194,123,191,253,178, 80,145,150, 7, 68,166,137, 72,203,214, 67,207,219, 98,202,244, +153,138, 9, 19,198,119, 64,126,106,108,213, 74,118,241,101, 62, 49, 73,222,162,157,123,142,127,227,231,223,156, 59,123,230, 12, +238,222,188,176, 51,249,254,222, 50, 53, 15, 86,172, 88,209,180,124,249,114,235,165, 75,151,182,176,181,181,141, 78, 79, 79, 15, + 41, 60,150,238, 21, 42,250, 37, 30, 61,115,163, 82,157,202,158, 36, 58, 85,143, 26, 30,150,120,122,255,170,200, 75,100,199,222, +164,233, 88,235,253,233, 32,124,189,130, 68, 10,183,213, 78, 53, 97, 52, 81,172, 57, 86, 16, 0,226, 9, 23,240,205,216,225,142, +130, 64,177, 96,201,106,179,250, 95, 17,112,224,121, 2,181, 66,130, 59,199,215,102,230,231,101, 25, 72, 97, 19,161, 72,133,216, +114, 87, 53, 34,233,127,116,223, 22, 46, 62,195,132,167, 9,249, 36, 38, 53, 23, 28, 40, 42, 88,242, 48, 24,165,200,206, 72, 34, + 59,118,108,199,221, 91,215, 57, 66,184,143, 1,204, 54,235, 38,138, 3,148,114, 30, 74, 57, 15,149,140, 71, 78,126,129,119,118, +244,235,190,133, 2,153, 18, 94,146, 19,127,231,247, 73,102,157,223,106,155,218,155,215, 46,192,241, 11,193,205,206,134,110,170, +239, 84,171,246,234,138,126,253,150, 2,128,193, 36, 34, 47, 39, 19, 26, 99, 36,154, 85, 78, 65, 5,181,128, 39,233,174,184, 27, + 35,209,148,214,156,149, 30,188, 51,203,201,247,253, 81,119, 46, 30,222, 33,105,249, 1, 50,114, 5, 68, 42,244, 80, 43, 36,133, + 47, 30, 15,239, 94, 67, 66,150,120,209, 82,175,126, 63, 50,244, 72,153, 66,164, 57,137, 33,103, 0,184,255, 55, 66,236,109, 31, +191,106,236,207,189, 70,175,104, 27,208,254, 83,242,244,198,137,111, 1,156, 45, 53,130,101, 99, 39, 9, 75, 20, 16, 30,241, 92, + 12,108,216, 88,114,245,226,233,122, 39,206, 92,222,180,101,235,214,252, 78, 31,126,172,108,211,164, 46, 31,157,170,199,242,221, + 15,233,131,120, 74,228,154, 10, 82, 51, 34, 86,156,131,119,192, 47, 27, 55,110,235,233, 91,205, 3,137, 25, 70,196,165, 27,112, + 62,248, 25, 54,173,157,144,153,145, 20, 54, 24,250,156, 92, 17, 66,230,169,227,251,247, 13, 31, 57, 1,190,126,245, 42,229,196, +229, 90, 2,120,185, 95,166, 40,126, 50,123,246, 15,118, 26,141,230, 15,191,147,156, 24,135,220,156, 92,200,213, 86, 80, 91, 85, +128,201, 36,192, 40, 80,100,103,103,203, 39,142,236, 63,196,156,253,103, 48,202, 16,137, 53,199,135, 56, 16, 66, 14, 82, 74,187, + 0,104, 11, 64, 94,236, 51, 8, 33, 7, 11,141,223, 75,159, 39, 76,152, 48,105,238,220,185, 15,138,214, 45, 90, 94,180,238,155, +150, 23,219,190,194,196,137, 19,253,230,205,155, 55,167,113,227,198, 59, 46, 95,190,252,220, 44,131, 85,124,103, 8, 33,175,173, +216,156,235,118,109, 0, 81,194,187, 59, 88,160, 74,101, 15,216,168, 7,169, 92,235,247, 78,150, 72,120,110,195,210,137,202,136, + 12, 25, 36,156, 36,175, 44,230, 74,193, 91, 29, 95,253,243, 38,139,134,181,171, 40, 22,237,137, 9,143, 73,203,215,139, 38, 35, +167,203,203,145,165, 39, 60,149,102, 37, 69, 88, 90, 57, 87,231,117, 89,201, 83, 0,148,104,176,228,114, 57,183,108,193,119,190, +103,207, 93,218,120,192,194, 42,211,165, 94,255,197,188,194,176,169,200, 88, 17,242, 29,231, 84,247, 73, 15,185, 82, 61,190,122, +237, 22, 46,174,213, 2,173,175, 29,217, 24,106,134, 61,231,199, 79,154,241,194, 92, 25,181,105,248, 97,237,129,236, 54,118,231, + 22, 21,153,171,237,201,125,251,181,111, 94,205,233,200, 1, 89, 90,233, 23, 90, 83,236,128,207,190,146, 17, 14,224, 64, 10,250, +113, 81, 49,137, 16,162, 94,254, 85,221, 46, 95,126,232, 53,101,254,214, 39,155, 38,253,244,160,200, 92,149,154,121,217,188,234, +190, 85,190, 54, 49, 34,244,126,165,145,157,154, 72, 42, 57, 91, 67, 37,151, 32, 35,215,132,140, 60, 1, 49,201, 58,132, 37,228, +226,126, 88, 50, 4,109, 22,250,127,249, 61,183,225,135,145,239,153,147, 63,135, 78, 7,183,251, 97,206, 36, 69, 90, 46,144,146, + 35, 32, 46, 77,135,216, 20, 45, 98, 82,180, 80,201,128,198,237,250, 40, 46, 30,222,208,190,106, 37,187, 95,202,122, 50, 37,222, + 59,158,231,232,215,253, 90,108,124,114, 99,239,106,190,224, 14,239,171, 81,161, 78, 47,215,212,187, 59,227,204,213, 56,114,228, + 72,138,187,187,187,227,234,213,171,147, 23, 47, 94,236, 87,177, 98,197, 26,209,209,209,251,237,237,237, 7,125, 51,242,211,139, +171,126, 89,236,218,234,253, 79, 37,117,170,250,113,161, 15,206,136,199,119,255,172,213,107,115, 23,191, 57,147,248,122,209, 55, +119,180, 1, 0,175,150,163, 42,129,192, 98,217,202,159,138,206,248, 6, 32,128,201, 68,177,243, 82, 98, 25, 42, 14, 64,194,113, + 80, 43, 36,200,207,203, 50, 68, 94,221, 84,249, 29,213, 73, 84,164, 20,193, 97,121,200,203, 55, 65,111, 20,225,110, 39, 65, 90, + 82, 52,214, 44,219,140,144,123, 55, 16,208,172, 51,190, 91,178, 9, 19, 70,244, 49,123,212, 39, 71, 72,161,185,146, 64, 41,231, +145,111, 44,168, 18,150,205,157,192,215,242,173,137,150, 93, 6,152, 29,210,178,180, 80, 33, 91,107,128,198,198, 5,193,167, 54, +169, 15,157,186, 62,238,135,229,191,124,149,159, 77, 17,243,228, 10, 26,219,166,194,219, 94,143,235, 81,150, 56, 30, 85, 9,213, +188, 60,193, 73,246,154, 87,134, 66,246, 31,112,172,219, 99,127, 86,205,122,239,219,122,249, 64, 33,227,161,144,113,144,203, 56, +132, 61,121,128, 95,183,108,124,100, 82,170,123,133,222,219,171,127,219, 3,157,147, 16,154,162,116,242, 25,243,236,214,241,144, + 38,239,127, 1, 27,231, 74,181,203,178,253,220, 89,147,243, 5,147,209,216,111,208,112,117,215,142,173, 36,141,155, 4,105,110, + 62, 73,199,252, 13,103,132,139, 71,183,196,203, 20,214, 42,183,160, 97,118,230,152, 43,187, 74,245,126,222,188,229,183,158,158, + 21,157,113,226,122, 56,110,133,102,192,202,210, 26, 18,141, 11,124, 90,124, 98,125,255,232,210,238,121, 41, 57,219,164, 82,229, +199, 13, 26, 54, 5,165, 20, 79, 67, 66,210, 51, 50, 44,254, 80, 55,115, 18,238,231,169, 83,190,105,239,232,224, 84,252,206, 29, + 94,222,213,208,233,253,158, 56,117,118, 39,158,135, 62,133, 72, 41, 68, 10, 80, 74,145,154,146,156, 6,142,219,192, 44, 1,227, +207, 50, 89,111,242, 33, 69,198,233, 85, 67,244,170,209, 42,122, 95,180,222,220,185,115,187,188, 18,125,235,242,154,168,220, 31, +214, 43,218,126,222,188,121,115,138,125,111,150,215,145, 20,138,144, 55,237,156, 99,221,110,141,229, 82,139,253, 63, 46,252,138, + 75,202, 52, 66, 37,231,161,169,232,137,170,131,191, 82,247,107,230,128,184,124, 91, 28, 56,248, 75,182,145,154,142,152,107,174, +228,156,197,177, 69, 43,127,145,121, 87,118, 37, 51,182, 71,132,234,140, 5,221, 36,244,249, 58, 73,228,221,163,234,152,144, 83, + 58,152,140,155,121,185,194, 31, 84,116,124,147, 94, 37,103, 27, 4,181,104,171,110,209,162,133,250,248,153, 75,179, 14, 29, 58, +244, 5, 10,103,168,119,241, 15, 63,229,223,164,147,175,171, 87,109,117,182,158, 64, 46,229,204,205,109,225,135, 57, 51, 80,209, + 81, 9,173, 94,196,247, 63, 29,206,110, 97,113, 98, 78,113,115,229,228, 94,213, 93,166,208,188,212,212,247, 58, 98,111,108,107, + 93, 66, 65, 81, 47,249,202,175,235,136, 94, 94, 83,126,216,250,100,243,196,213, 15, 46, 1,120,108,142,185, 2, 0, 26, 23,172, +181,174,232,215, 98,255,198,133, 83, 14,111, 95,214,146, 3,181,171,225, 83, 77,210,174,221,123,138,186, 1, 65,138,228, 76,138, +135,225,201,208,229,164,163, 77,227, 26, 56,186,103,139,144,152, 16,109, 86, 31,143,228,244, 44,231, 74,110, 78, 8, 79, 17, 17, +149, 92, 96,172, 98,146,243, 16,155,170, 69,122,142, 30, 1,158, 78,200,205,213, 59,151,251,100,162,228,224,149, 43, 87, 26, 55, +106,222, 14, 31,246, 27,230,123,112,247,150,235, 78,181, 62, 24,155,248, 96,247,111,230,108,191,115,231, 78,193,213,213, 53, 52, + 49, 49,177,233,130, 5, 11,146,125,124,124, 60,102,204,152, 49,201,213,213,213,238,155,177,163, 34, 26, 53,106,180,253,135, 21, +235,131,246,109, 93, 92, 17,192, 49,163, 33,111, 70, 78,194,147,167,102,156,228, 72, 78, 78, 6, 47, 83, 88,141, 27, 61,220,222, + 82, 37, 1,199, 1, 25,185,130,227,162,101,171,147, 22, 46, 93,125, 8, 4, 13, 64,208,160, 74,219, 73,191,161,148,145,132, 28, + 33,224,121, 64,163,148,188, 40, 39,142,117, 62,140, 64, 9,157,201, 11, 60, 30,159,156,120,103, 87,101, 51, 14,160,104, 18, 40, +116, 6, 1,249, 6, 1, 60,161,200,206, 72,198,236,169, 99, 17,212,186, 27,190,233,245, 57,178,242,121, 60,142, 23, 96, 50,154, +136,185,249, 18,155,166, 71,199,250,118, 72,201, 54, 33, 61, 87,128, 76, 82,112,190, 28,186,149,138,208,220,204,178, 5,217, 68, + 10,123, 59,107,168, 83,129, 78, 95,239, 65,171,250,238, 56,179,111,173,228,210,245,123,248,126,254, 10, 56,118,107,132,245,119, +188,161,176,242,128,194, 90, 1, 35, 45,219,180,124,212, 40,249,250,246,185, 61,173,189,189,198,107,228, 82, 25,228, 82, 30,241, +209,207,177,101,227,154, 88,147, 20, 93,211,174,109,205,126, 87,149,191,148,227,221,172,237, 28,160,144,114,160, 38,125,110, 89, +183, 79,136, 75,172,189, 96,214,248, 65, 23,174,246,152, 20,216,113,184,252,236,158,101,249, 33,215, 15,126,153, 27,111,177,219, +171,169,253, 77, 0,118,165,148, 75, 98,237,226,183,230,167,245, 91,123,187, 56, 59, 98,207,169,187,216,184,238, 71,184,213,106, +143,208, 91,199,225,225,223, 13, 22,158,173, 33,181,220, 57, 88,195, 73,107, 13, 29, 61,185, 91,253, 6, 65,184,114,241, 52,146, +146, 99,214, 81,250,248, 15,163,145, 83,158,156, 59, 75,252,253, 29,109,194, 98, 95,244,193,226,120,131,139, 40, 34,184,141,129, +226,121,232, 83,220,189,117,213, 95, 20,100, 47,162,212, 25, 54, 25, 90,250,140,245,193, 98,188,123, 74,243, 33,165, 69,157,202, +104,230, 14,150,100,178, 94, 93, 78, 8, 57, 56, 97,194,132, 73, 0,232,132, 9, 19, 38, 21,125,158, 59,119,174, 22, 64,169, 1, + 1, 73,241,157, 43,177,217,164,110,183,198,114,137,122,255,198,229,147, 85,219,175, 11, 88,112, 36, 24,245,124,156, 32,149,242, +208, 40,157,113,234, 65, 38, 46,159,223,159, 19,124,243,154,142,151, 10,211,204, 49, 87, 50,162, 58, 60,111,233,234, 12,223,106, + 30,242,149,135, 19,238,232,140, 34,161,148, 72, 9, 37, 60,165,162, 85,108,200,233,154, 89, 36,165, 49,141, 53,103, 4, 28, 17, + 13, 38,138,136, 36, 61, 8, 1,154, 52,109,161, 60,126,252,132,234,191, 23, 44,169,109,197,234,254,234,135, 81,185,144, 73, 56, + 56,218,200, 97,238,112, 26, 7, 27, 57,230,254, 30, 1,169,132, 75,110, 97,113, 98,113,113,115,229,236, 94,213,221,210,202, 10, +162, 72, 64, 8, 41, 79, 6,171, 23,143,242,235, 50,186, 87,181, 41,139,183, 63,219, 50, 97,213,131,139,230, 70,174,138,147, 25, +117, 63, 3,192,216,162,207,214, 21,253,108,110,220,188,214,214,218,214,113, 65,243,143,166, 84,200,201,212,163,109, 80,129,185, +186,123,225,183, 62,121, 9,143,142,154,171,109, 48,137,136, 76,204, 67,120, 66,222,139,232, 85, 76,138, 22, 42, 57, 15,157, 94, +120,171,147,201, 34, 63,127,205,209,195,251, 58, 26, 5, 52,173,233,223, 2, 31, 14, 30,111,115,114,223,198, 95,156,124,223,215, + 37,134,236, 63, 96,142, 70, 92, 92,156,214,206,206,238,106, 86, 86, 86,215,173, 91,183,166, 7, 4, 4,240, 54, 54, 54,105, 0, + 20,132, 26, 12, 87, 79,237,142,200,201,202,250,204, 96, 48, 4,151,225, 36,135,193, 80,208,188,106, 52, 81, 44,216, 19, 9,153, +132,123, 97, 52,138,248,126,242, 72, 71, 81, 68,231,233,115, 86,148, 26,193,202,205, 23,160, 86, 72,254, 91, 78, 68,193, 97,245, + 79, 63,193,206,162,160, 69,136,231, 9,210,114,140,136, 79, 51, 96,198,132,145,230, 54,177, 83,147,137, 34,223, 32, 20,152, 44, +163, 9,214,142, 21, 48,101,225, 22,196,164,234,113,234, 65, 22, 34,147,116,168,231,109, 9,136,230, 21, 80,158,151, 38,247,248, +232,227, 63,252,190, 82,109,161,147,241, 18,104,148, 5,199,192,177,102,183, 97,132,112, 89,188, 84,154, 31,119,231,183,125,175, + 79, 33, 32,151,203,225,238,108, 7,131, 81,192,177,107,145,232,220, 38, 16,141, 2,253, 65, 36, 50,220,204,170, 7,133,149, 5, + 40, 79, 96, 18, 41,244,198,178,149,169,228,144,157,137,206,126,221,199,223,185,114,252,199,247, 58,127,128,244,148,120,108,254, +121,101,150, 81, 16, 58,167,220,217,157,240,174, 42,126, 11,167,218, 14,106, 43,235, 31,252,131,218, 65,155,153,128,228,216,240, +125,101,213,200, 77,188,147, 1, 96,181,201,160,159,196,113, 4,196,164, 71,110,252,179,189, 0, 68,160, 94,169,219,107,156,125, +134,206, 94,178,186,175,135,135, 7,142, 94,124,136,185,147,135,223, 81,171, 45, 43, 59,217, 89, 91,139, 62,117, 17,126,255, 4, +236, 42,103,192,218,169,154, 91,231,182,131,221, 58,116,234,129, 7,119,131,177,124,225,204,107,185,156,122,193,107,179,168,160, +195,250,139,166, 67, 59,175, 22, 51, 27, 55,111, 7,189,209,132,192, 38,109,113,231,230,181,225,233,207, 79,142,102,151,127,198, +255,202,100,153,185, 94,151,183,252,157, 46, 40,232,171,229, 96,110, 4,107,238,220,185, 15,230,206,157, 91, 98, 68,172, 84,131, +245, 38,115,181, 97,217, 36,213,214,107, 38, 60,138,200,192,123, 13, 92, 16, 31, 23,139,131,219, 87,136,160,128, 92, 41, 79, 52, +153,196,227,249, 28, 38,167, 95,223,147, 85,154,185,146, 82,197,129, 89, 11,150, 62,172, 87,179, 26,191,234,104,210,229, 60,189, + 64, 41,136,132, 0, 82,145, 18, 9, 56,165, 70, 20,141,213, 33,216,153, 27,106,162, 38,145, 22, 30, 12,192, 32, 80, 80,136, 47, +101,146,209, 36, 66, 16, 1,145, 2, 69,235,150,110,128, 10, 70,122,169,100,124,138, 79, 90, 65,159,171,223,139,204,149, 71, 85, +119, 75, 75, 43, 40,101, 60,104,225,186,101, 52, 87,170,197, 95,250,117,249,170,119,181,169, 75,126,125,186,117,220,202,251, 23, + 29,124, 58, 57, 74,148, 54,118,174,245, 6, 20, 94,237, 0, 8,162, 54,238,246,182, 83,101,209, 46, 52, 92, 59, 53,206, 62,149, +227, 67,111, 78,107,215,169, 15,142,236,217, 92,100,174, 14,155,171, 99,111,107,149,112,243, 65,132,183,129,218, 32, 34, 33, 23, + 49, 41, 90, 36,102, 20,248, 93, 7,107, 25, 98,162, 35,161,209,200,205,190,136, 57,251,245,248,146, 18,124, 2,138,109,137,247, +247, 44, 9, 13, 61,162, 39,254,195,186,156, 58,178,123,222,243,176,167,195, 27,182,233,133,122, 45, 63,196,209,173, 11, 38, 0, + 56, 96,174,110, 90, 90, 90,182,173,173,237,133,177, 99,199,190,191,126,253,250, 52, 0,146,172,172, 44,117,143, 30, 61,220, 83, + 83, 83,199, 80, 74, 35,203,120,226,193, 96, 48, 64, 48,104, 85, 75,150, 44,126, 49, 17, 38, 39, 81, 42,167, 79, 28,229, 40, 82, +116,254,126,254, 10, 80, 17, 56,117, 55,195, 12, 65, 49,182,223,224,209, 5,101, 68, 20, 95,244,185,178,179,144,226,203,159, 30, + 65,243,162,223,144, 4,109,235,217,149, 41,169, 70, 65,132, 78, 47, 64,167, 23,144,167, 23,112,237, 73, 38,158,198,230, 32, 75, +107, 68,190,161,192,172, 24, 12, 34, 0,243, 42,173,226, 83, 49, 56,214,238,190,121,229,220, 73,252,193, 91,169,144,241, 60, 44, +213, 50, 81, 41, 47, 48,132,171, 22, 79,145,248,212,168,137,214, 29,250, 41,222, 28,193, 18,113,254,198, 83,172,248,253, 14,150, + 78,234, 5, 9, 71, 48, 98,214,111,232,223,190, 58, 68,145, 34,254,233, 77,184, 84,111, 4,133, 92, 89, 16,189, 54,136,230,156, + 59, 1, 40, 28, 89, 75, 41, 13, 78,184,191,119,163,123,245,230,243,159,223, 62,168,209,233, 12,162, 65,162,121, 63,249,206,129, +208,194,117,125, 1,200, 0,228, 83, 74, 31,149,181, 18,182,114,247,181, 21, 5, 83,175,138, 94,190,223,126, 58,122,166,163,218, +218, 30,187, 54, 45,167,144,114,219,203,148, 81,130,129, 67, 65,159,174, 76,177,176,254, 33, 28, 65, 97,218,236, 68,193,192,151, + 22,189,242,240,107, 61,166,122, 13, 95, 92,125, 16,131,249, 83, 63,191,163, 75, 10,255, 68,111,105, 59,216,144, 19, 63,170,166, + 95, 61, 56, 57,217, 35, 49, 62, 30, 45,186,182,199,123,237, 59,224,193,221, 96,204,158, 62,246, 26,151,151,255, 62, 77, 14,209, +154,147, 78,219,234,205,107,213,174,215, 96,176,119,141, 58, 72, 78, 77,131,167, 79,109,248,248,213, 27,108, 91,189,249,186,244, +199,231, 31,128,193,248,251,112, 8, 64,231, 87,141,208,171, 38,169, 88, 4,170, 36,110, 20,215, 40, 90,255,117, 6,174,120,159, + 44, 0,102, 13, 35,151,188,234, 24,139, 62, 59,214,237,214, 88, 38, 85,237,255,101,201, 68,213,150,107, 38, 60,137,204,196,123, + 1, 46, 72, 73, 73,197,177,223,127,206, 37,156,169,115,194,157, 3, 55,205, 61, 26, 42,247,106,174, 18, 65,186,103,242,204,153, + 71,155, 53,108, 96, 92,125, 44,254,124,182, 17,162, 40,145, 72,249,124, 81, 66,120, 42,161, 28,149, 42, 84,106,137, 67,149, 64, +107,132, 93,221,167,113,172, 53, 46, 47,185,194, 35, 74,207,190,113,178, 77, 83,177, 27, 95, 65,160, 40, 30,162,162, 0, 76, 2, + 5, 45, 26,118,108, 50,207, 96,113, 4,216,124, 42, 62,185, 86,214,194, 23,230,106,107, 74,129,185,178,178,180,130, 66, 86,208, + 17,152,154, 61, 22,236,191,230,106,193,151,126, 93,191,234, 87,109,234,178,157,161, 91,199, 46,191,127, 1,192, 83,137,210,198, +238,151,117,139, 21,174, 21,148,224, 0,100,228, 10,232, 51,168,124, 55,142, 22, 78,213, 62,242,111,214,101, 74,235,206,189,112, +120,215, 47,194,189, 75,187,203,100,174, 0,160, 75,107,255, 19,115,127, 88,230, 62,118,210, 52,133, 92, 74,145,173, 53, 66, 33, +227,224,104, 45,135,157,154,195,133,163,187,243,155,249, 58, 30, 51, 71,203,174, 97,127, 75,175,138, 21,231, 78,156, 60,145,255, +229,231,159,191,119,173,253,254,145,184,123,251,159,210,224, 53, 70, 0, 99, 29,253, 62,120,230,230,126, 99,113,197, 90,205, 97, + 99,239, 86,219,222,231,125,139,148, 39,251,115,204, 77,107,122,122,122,116,229,202,149,159,173, 92,185,178,198,136, 17, 35,242, + 71,140, 24,225,174,213,106,119,150,213, 92, 21,153, 2,131,193,128,135,199, 22,169,101, 50,153, 26, 0, 76, 38, 19,124, 59, 79, + 78, 17, 41,213, 28,186,153, 6, 16,146, 52,109,206,138,162,178,255,198,115, 32,234,218,107,230,185, 34,120,201, 92, 89, 40, 37, +208,230,151,101,170, 33, 66, 13, 38, 17, 70,147,136,124,131,128,124,189, 9, 90,189,136,124,131,248,162,248,243, 28,129,177,160, +188,151, 57,196, 74, 41,178, 60,171, 87,135,119, 78, 38,212, 74, 14, 42,185, 20, 42,121,193, 61,207,177, 91,105,136,208,103,152, +119, 44, 11,163, 82,249, 6, 1, 26, 69,193,253,156,222, 88, 48, 42, 55,246,209,217,109,137,161,215,123, 59,251, 4,242,238, 62, + 65,200, 87,152,149, 76, 27, 74,233,113, 66, 72, 91, 66, 72, 27, 0,180, 98,205, 38,226,190, 61,187,209,165,115,151,188,232,187, + 7, 85,132,144,102,133,167, 62, 40,165, 23, 9, 33,165,206,129,101,233, 82,179,169, 72,177,153, 0, 42, 80,241,161,147, 75, 69, +117,243, 86, 93,171, 55,109,221,137,175,236,229, 3,189, 81,192,150,117, 75,233,213, 51,187,199,229,198, 63,185, 91,150, 99,233, + 90,169, 58,226,163, 35, 71,136,144,252,128, 2, 99, 5, 90,240,148,178, 92, 11,231,170,109, 84,182, 30,111,140, 90,218,216,212, +183,172, 29,208,210, 61, 50,197,128, 35, 71,142, 32, 47, 43,105,166, 94,159,157,135,124,186,241,244,222, 53, 31,127, 52,236, 59, +203,192, 6,254,176,177,210,160,130,141, 21,110,221,188,140, 5,179, 38, 93,227,242,242,223, 79, 78, 14, 49,187, 57,147,163,220, +247, 93,123, 13,230,210, 82,211,177,100,206,183, 24, 62,110, 14,218,190, 63,144,123,250,232,206,247, 0,186,177,107, 58,227,127, + 21,185,122, 77, 36, 43,185, 88,228,233, 15,159,139,153,162,146, 62,147,194,207,250,215,104,232, 95, 49, 85,250, 87,150,235, 95, +209,187,243, 86, 17, 44, 30,210, 3,235, 23, 79, 80,238,189,207,227,121,108, 58,222, 11,112, 65, 82,114, 50, 14,109, 91,153,107, + 20,117,221,147,202, 96,174, 0, 64, 98, 68,199,138,238,206,227,191,232,253, 62,217,121, 47, 53, 56,142, 83, 11, 10,165,132,227, + 37, 57,188, 84,153,199,229,104,229,188,132,242, 28, 53, 24,248,186,109,199, 92,189,101,204,173,147, 26, 21, 50,217,194, 41,165, +178,149, 75,141,237, 89,241,143,150,150,164, 43, 8, 38, 36,166,164,193,197, 86,141,196, 12, 35,140, 2, 45, 97, 29, 10, 66, 8, +212, 10, 30,121,185, 89, 16,133,210,187, 16,168, 45,157, 14,214,202, 90, 24, 94,100,174,182,165, 20, 52, 11, 22, 55, 87, 74, 25, + 15,142, 16,179, 35, 88,132, 16,213, 15, 35,124,187,140,237, 91, 96,174,198, 44,189,123, 17,192, 83, 74,105,170,107,189, 1,176, +183,148,225,203, 21, 33,208,104,100,176, 85,203, 32, 41,199,131,140, 44,156,170,125, 84,191, 89,151,117,109,123, 12,231,246,109, +252,193,244,232,238,165,190,101, 49, 87,130, 32, 16,163,209,136,214, 77,106,199,222, 10,137, 56, 63,107,250,212,230,129,109,123, + 43,154, 85,119, 70,158,222,132,216,168,104, 92, 56,182, 51,223,197, 86,122,174,106, 37,187,120,163,209, 88,234, 5, 60,221,195, +144,151,159,161,211, 73, 36, 50, 77,207, 30,157,200,205,224,224,173, 78,181,186,239, 1,200, 3, 16,209, 23, 4,221,234,250,122, + 33, 29, 20,250,124,173,206, 81, 34, 47,115,199,228,200,200,200,211,203,151, 47,175, 37,149, 74,157,142, 30, 61, 42,230,230,230, +238, 42,231,137, 14,131,193,128,176,176, 48,240, 60, 15,142,227,192,113, 28, 4,131, 86,245,221,172, 31, 82, 0, 64, 48,228,231, + 24,114, 18, 31, 37, 61,216,255, 93,121, 43, 20,158,227,160, 86, 72,161, 81,242,208, 40, 36, 80, 41, 36,208, 27,205,159, 40,156, +128,134, 95,184,114,203,183, 89, 13, 95, 4,135,229,226, 97,180, 30, 58,131, 0, 10, 10, 82, 24,101,180, 86, 73,145, 20, 31, 9, +145, 10,101, 54,154, 18, 94,146,211,254,253, 63,118,104, 87,107, 44,140,114, 5, 7,141, 76, 86,170,134, 81, 16,208,196,191, 42, +108,157, 42, 98,194,194,221, 0,128,149, 83, 62,130,163, 21,143,237, 27, 40,146,238,239, 27,234, 88,171,251,252,232,251,103, 39, +196,220, 61,245, 81,155,134,206,188,147, 50,221,140,211,136,116, 7, 32, 2, 56, 76, 41, 53,121,212, 8, 10,235,208,190,131,155, + 73, 20,226, 41,165,231, 11, 87,146, 3,104, 78, 8,105,135, 82,230,145, 43,200,119,242, 75,240,141,235, 14, 6, 19,197,169, 75, +119, 2,155, 54,170, 7,189,145, 34, 55,223,128, 91,193,119,176,111,215,150,188, 71,247,111,124,146,151,240,196,236,115, 41, 49, + 58,226,100, 76,196,211,206, 3,134, 79, 82,212,111,220,102,200,254, 29,171, 63,162,133, 33, 44, 66,128,202,141, 6, 92,119,174, +221,189,186,196,194,153,131, 33,131,230, 38,133, 95, 41, 73, 39, 35,195, 34,239, 73,200,237,140,231, 9,122, 27,137, 77, 85, 72, +101, 22,159, 18,107,247, 31,121,133,122,146, 91,163,143, 45,207, 94,186,138,144,219, 23,225,106,175, 65,120,216,211,188,144,187, + 55,127,206,133,108, 14, 77, 14, 49,123,208,145,131,111, 75,167,106,213,107,183,182,180,113,192,238,237, 63, 35, 51, 61,117,201, +233,163,187,199,180,233, 58, 8, 30, 94,190,173, 29,124, 91, 58, 37,135,156, 77, 4,131,241,215,113,163,148,207,239, 66,243,157, + 34,121,253,133,214,164,180,119,174,132, 93, 95, 12,194,180,185, 43,112,239,113, 36,142,236,248,177,208, 92,237,187, 98,166,161, +120,241,180,237,236,196,167, 47,230,178, 26, 28, 84, 1,131, 95,220, 83,218,151,188,241,228, 45,113, 0, 14,191, 73, 19, 0,242, +115,179,250,141,249,246,187, 85, 77, 26, 5,184, 53,107,211,222,210, 36, 40, 65, 95,105, 18,161, 0, 28, 52, 20,207,239,158,204, + 72,142,121,244, 68,212,166,127,249, 38, 77, 66,136, 98,218, 96,159, 75, 51,122,212,154,241,251, 37,253,206,115,194,103, 31,183, + 9,170,234, 36, 85, 88, 20, 94,190, 72,193, 63,142, 64, 46,231, 75,116, 23, 37,105,206,251,210,183,243,184,190,213,167, 45,255, + 61,116, 91,161,185,122, 66, 41, 77, 45, 90, 71,198,243,176,210,200, 96,165,150,193, 86, 35, 45, 85,243, 15, 23, 63,231, 26, 29, + 27, 20,153,171, 77,230,153,171, 18,210,121,179, 71,143, 30,245, 62,255,252,115,249,216, 33, 93,206,157,187, 26, 18,246,235,209, +223,218,165,165,102, 57, 11,130, 0,141, 70,158, 16, 84,195,254, 68,181, 74,118,177,247,238,221, 19, 79,157, 58,149, 47, 8,194, +173, 55,105,210,157, 59, 5,251,218,221,119,223,188,125,111, 80,253,186,181,176,106,197,162, 26, 79,195, 34,106,132, 62,143,130, +155,155, 27,220,220,220,144,101, 82, 35,236,218,125,228,101,167, 30,136, 8,217,103, 40,235,190, 83, 74, 77,132,144, 77, 83,167, + 78,157,156,150,150, 54,223,156,153,167, 75,210, 44, 50, 88, 69,198,170,200,100,133, 28, 93,168,150,201,100,106, 66, 8, 76, 38, +147,189,103,227,129,245,204,213, 44,209,116,230, 20, 76,217,161, 41,156,111, 74,163,144,192, 32,152,159, 78,169, 65, 61,124,244, +151, 67,158,215,242,243,255,242,163,143,135,203, 2,171, 85,198,141,103, 89,176,179,144,194,217, 86,142,148,228, 84,220,220,187, +216,148, 17,115,239,103, 78,138,185,101, 77,103,241,169, 24, 28,107,246, 24,190,106,241, 36,254,216,173, 52,200, 21, 28, 52,114, +133,168, 86,243,165,166, 51, 61, 35,251,202,194,229, 63, 55, 30,216,167, 27, 58, 54,174,140, 11,119, 99, 33,210,130,166,122, 65, + 44,200,158,228,144,125,250, 81,125, 60, 47, 13,123,191,154, 99,166, 54,185,234,180, 8,195, 53, 66, 8, 87,148,127,127, 40, 75, +148, 30, 35,132,240, 0, 2, 1,180, 35,132, 92,160,148, 54,125, 37, 29, 30, 0,106, 1, 8, 47,188,129, 17,205,216,119, 98, 48, + 81,132, 39,106,113,249,242, 37,232,242,178, 16, 26,250, 12, 39,142,236,189,153,157,153,186, 81,105,162,187,243, 82,158,228,148, +165, 44,105,197,156,177, 11,167, 12, 21,253,155,183,111,223,233,131,193,242,241,179,215,217,132,134, 62, 19, 68, 17,208,120,117, +148,187,121,105,106,114,212, 64, 83, 31,237,215, 71,221, 58,112, 82,224,184,113, 37,105, 82,122,214,100,225, 92,253,231, 75,151, +206,125,171,116,245, 71,141,206,147, 58,199,222,217,223,217,217,183, 61,236,189,131, 16,119,103, 31,238, 94,222,126,236,150, 32, + 76, 85, 10,136,206, 73,126,156, 91,150,116, 2,128,152, 47,244,172, 85,191, 41,167,213,233,241,224,214,149,232,140,231, 23,166, + 61,212, 88,126,208,232,189,190, 30,222, 53, 27,113,209, 79,238,245, 4,176,226,109,202,124, 89, 96,154,255, 78,205,127, 26,146, +215,223,193, 74,243,111,220,125,162,232,244,233, 28, 4, 63, 8,199,201, 93,171,203,100,174,254, 87,164,134,236,190, 9,160,129, +147, 95,239,247,175,222, 8,158, 91,187,126, 67, 59, 81,252,239,112, 36, 42,138,252,221, 27, 23,115, 83, 35,130,227, 76,186,220, +177, 9,119,127, 43,117,254,150, 97,221, 61, 91,204,248,180, 96,134,246,241,123,220,252, 76,194,118,254,168, 84,150, 76, 64, 80, +248, 31,132, 16,112, 92,193,123,163,201,152,105, 70, 82,157,191,234,233,243,201,202,221,161,219,190, 90,114,247, 66, 81,228,234, +165,139,110,158, 1, 86,106, 25,172, 52, 82,104,172,100,224,203,120, 44,228, 82,229,144,214, 93, 63, 53,219, 92,149, 68,114,114, +242, 29, 66,200,163, 69,139, 22, 5,172, 93,187,214,123,220,184,113,145, 63,207, 30,246, 11, 0, 28, 59, 86,208, 34,248,228,201, + 19,172, 92,185, 67,151,159,159,255, 44, 55, 55,247, 26,165,180,212,136,147, 32,149, 78,220,244,243, 79, 53, 18,186,124,216,160, +146, 87,117,216, 56, 87, 71, 99,183,234,200,200, 51,226, 65,116, 26,194,158,221,198,253, 43, 7,239,201, 69,217, 56, 51, 79,238, + 32, 0, 29, 81,208, 73,209, 1,128, 35, 0,135,148,148, 20, 7, 0,239, 19, 66,146, 11, 67,185, 69,175, 19,148,210, 82,243, 94, +171,213,194,104, 52, 22,230,239,127, 13,214,179,103,207, 94,138,104,189, 45,241,233,122,180,173,107, 7,109,190,128,124, 35,133, + 65,192,139, 38, 52,115, 40,124,214,228, 20,149, 91,237,159, 30,140, 25, 50,205, 47,160,105,159,102, 29,251,115,170, 10,150, 56, +119,112, 61, 13,191,125,116,183,132,136,223,229, 38, 61, 13,127,251,138, 20,153,222,213,106, 34, 66,159, 1, 43,133, 12,106, 37, + 15,141, 82, 90,122, 89,178,203,236,112,250,244,249,254, 39, 78,157,159,217,182, 85, 83,187,105,131,187, 97,231,161, 75,176, 80, +201, 64, 69, 1,189, 91, 85,234,241,112,251,123,157, 60, 28,212,174,187,207, 69, 95, 28,177,244,254,196,220, 92,195,179,210,204, +113,225, 12,254, 87, 8, 33, 53, 0,116, 37,132,152, 0,168, 0,228,162, 96,110, 26, 21,128,203,165,205, 35,247,242, 62,210, 79, + 26, 55, 14,220, 66, 64,229,160, 88,119,106, 31, 14,139,144,134,231, 36,222, 75, 46,239,113,203,139,126, 18, 15,160,159,165, 75, +205,166,119,175,156,158,209,188, 67,207,122,205, 59, 15,144, 70,164, 24, 33, 74, 44,144, 27,118,209, 16,113,243,215,123, 38,189, +110, 70, 78,194,227,115,111,210,202,229,212, 11,110, 31, 92,208,172, 90,235, 81, 13, 43,120, 7,193,182,146, 63, 0, 32, 51,230, + 1,162,111,236, 58,152, 21, 39, 29, 64,233,189,114,143,238,147, 40,149,125,171,214,172,143,199, 33,119,160,205,203,254,149, 82, + 42,218,121, 55,255, 53,236,241,221,111, 93,189,234,129,147, 43,251,190,206, 96, 49, 24,140, 50, 26, 44, 19, 12, 93,102,124,191, + 96,191, 40,154, 84, 60, 47,209, 10, 48,254,237,204,213, 75,225,248,251,191,238, 39,189,122, 29, 50, 94, 61, 63, 84, 34,145,180, +254,111,244, 74, 12, 78,121,122,233,124,220,237,237,155,204,125, 30, 87, 98,138,206,180,236,183,167,203,198, 44,191,255, 16,192, +250,210, 38, 17, 53,247,154,170,104,177,107, 60, 0, 11, 0,207, 40,165, 41,175,220, 67,106,251,127,242,245,139,102, 65, 30,128, + 8,170, 45,203, 15, 24,141,218,165,139, 38,244,210,155,140,194,250,188,164, 71, 39,203,155,208, 66,195,116,145, 16,114,123,226, +196,137,141,157,157,157, 93,167, 76,153,162,138,141,141,149, 28, 57,114, 68,151,157,157, 29,155,157,157,125,129, 82,106,118, 19, + 68,122,240,206, 44,210,178,101,155, 3,191,111,255, 0, 60,109,103,231,224,218,218,206,222,217, 62, 45, 37, 62, 45, 53, 57,225, + 52, 17,133,147, 73, 50,199,223,105,200, 26,163,153,105,188, 12,224,242, 59, 45, 68, 84,184, 93,171,205,112,179,215, 45,183, 97, +225,249,228,233,227, 75, 30, 45, 40,145, 74,203,116, 65,215,198,222,139, 5, 48,212,194,185,230,178,251,183, 46, 79,226, 40,164, + 38, 34,206,207, 75,122,124,235, 93, 29, 22, 94, 42,205,111,215,249,143, 29,218,101, 10,233, 27, 59,122,210,179,103, 77, 0, 54, +146,150, 45,183,158, 57,123,177,255,201, 51, 23,103, 6,181,236,100,167,168,226,141, 74,182, 6,108,250,198,255,243, 19,183,146, +130,187,125,123, 97,109,104,172,238,126,241,167, 22,152, 89, 6, 30, 17, 66,210, 1,116,164,148,254, 66, 8, 25, 12, 32, 20,192, +185,178, 62, 59, 47, 59,254,225, 69, 0,149,254,140,186, 41, 59,254,225, 69, 66, 72,155,147, 7,243, 62,184,122,238,232,252,166, +157,250,219,221, 57,184, 33, 91,175,203,252, 38, 55,254,217,239,230,164,149,198, 5,107,137, 83,237,174, 79,142, 45,156, 96, 23, +122,113,168,202,206, 67,147,155, 18,145,158, 30,121,115,105, 94,162,211,178,210,250,169,150,134,189,163,171,187, 72,100,184, 27, +124, 17,156, 68,186, 3, 0, 56,137,116,199,163,219, 23,191,173,224,238, 11,107, 59,151, 26,175, 62, 1,131,193, 96,148, 94, 73, +253,105, 47, 0,126,255,143,154, 40, 8, 76, 57, 0,176,120,215,233, 4, 32,251,127, 59,158, 0,108, 84, 42, 85, 7,107,107,235, +247, 81,208,201,248,157,164,211, 54,176,159,229, 63,189, 44, 49,205, 98,223,183,104, 33,113,170,213,237, 99,251, 90,239, 71,124, +212,163, 69, 72, 83, 63,199,214,165,157, 99,102,150,207, 94, 0, 6, 3,232,245,119, 63,158, 64, 11,137,218,181,110,109,184,184, +168,202, 93,135,212,172, 41, 83, 59,248, 58, 2, 45, 36,239, 42,157,182,158,205,198, 85,107, 58, 48,193,198,171,197,188,226,203, +109,188,154, 79,242,108, 50, 32,198,214,179,217, 56, 86,230,153,230,159,173,249, 79,123, 73,152,197, 44,209,116, 82,252,119,148, +193,187,214, 54,252, 31, 30,143, 12, 0, 71,223,181,238,187,156, 8,146,241,127, 80,142, 10, 35, 90, 0, 54, 22,239,103,245, 14, +202,231,206,255,159,115,233,172, 9,192,189,183,210, 8, 9, 49, 0, 72,122,167,231, 98,216,249,133, 0,254, 48, 97,110,122,232, +185, 57, 0,230,176,210,203, 96,148, 29,142, 29, 2, 6,131,241, 23,152,118,145, 29, 5, 6,131,241, 79,134,160,240,145, 50, 37, + 84,128,102,143, 14, 32,132,248,149,163,130,189,207, 52,153, 38,211,100,154, 76,147,105, 50,205,127,151,102,105,218,255,148,209, +137,228,207,236,179,200,134,176, 50, 77,166,201, 52,153, 38,211,100,154, 76,243,223, 8,107, 34,100, 48, 74,175, 72, 28, 9, 33, +142,236, 72, 48, 24, 12, 6,227,111,107,176,204,189, 88,189,205, 69,141, 93, 16,255,148,124,147, 16, 66,190,182,181,181,189,234, +233,233,153,100,109,109,125,149, 16, 50,150, 16, 34, 45,175,166,155,155, 91, 67, 87, 87,215,149,206,206,206,171, 93, 93, 93,131, +254,196,180,187, 18, 66, 92,203,185,237, 76, 66, 16, 86,240, 34, 51, 89, 73, 96, 48, 24, 12,134, 57,188,118, 20, 97,179,102,205, + 46, 74, 36, 18, 55,137, 68, 98,238,115,204,168,209,104,140, 61,123,246,108,211, 82, 46, 86, 99, 10,223, 47,161,148, 78,123,155, +245,204,216,118, 37,165,116, 98,121, 46,200, 0, 64, 41,141, 3, 0,119,119,119, 47, 81, 20,155, 75,165,210,234, 70,163,241, 49, +199,113,231, 99, 98, 98,194,254,102, 6,136,175, 89,211,123, 0, 79, 72, 19, 0, 54, 0, 50, 76, 34,189,236,224,224,186,229,236, + 89,243,231,200, 33,132, 72, 0,140,210,104, 52, 61,213,106,117,149,156,156,156,231, 90,173,118,175, 92, 46,111,189,124,249,114, +183,198,141, 27, 91, 38, 39, 39, 19,142,227, 28, 15, 30, 60,216,111,249,242,229,109, 9, 33,157, 41,165,101,158,135, 71, 16,132, + 1,251,247,239,175, 5, 0,157, 58,117,250,132, 16,114,149, 82, 42,190,122,252, 75, 72, 35,113,113,113, 9, 2,128,248,248,248, +203,148, 82,234,234,234,218, 68,161, 80,124, 2, 0,249,249,249, 27,226,226,226, 46,189,131,178,228, 72, 8,198, 20, 77, 92,203, +113,228,107, 75, 75,203,109,217,217,217, 79,139,190, 47, 76,103, 18,171, 74, 24, 12, 6,131, 97,150,193,226, 56,206,109,221,186, +117, 14, 42,149, 10,164,240, 97,123,164,216, 67,247, 8, 33, 47, 62, 27,141, 70,104,181, 90,124,249,229,151,166, 50, 92,172,198, +182,107,215,238, 61,165, 82,249,210,196,146, 58,157, 78, 74, 8,124,139,158, 58,207,113,100, 12, 33,228, 71,115, 46, 98, 69,191, +161,215,231,115, 82,169, 28, 60,207,141,170, 91,183,110,189,228,228,228,179, 0,214,197,197,197,165,154,161,241, 43,128, 46,132, + 16, 88, 88, 88,220,240,242,242, 74,253,236,179,207,156,219,180,105,131,202,149, 43, 35, 62, 62,190,225,153, 51,103, 62,105,208, +160, 65, 66, 66, 66,194,105, 74,233,217,184,184,184,167,111,105,142, 28,236,236,236, 58,202,100, 50, 25,199,113,233,113,113,113, +151, 41,165, 9,101, 49, 87,126,190,213, 22, 13, 29, 54,188, 70,143, 30, 61, 92, 84,106, 75,101, 84, 84,104,220,207,107,127,178, +190,120,225, 82, 93, 66,200,152,194,217,175,205,137, 82, 29,152, 62,125,186,107,211,166, 77, 45, 83, 83, 83, 97, 50,153, 42,236, +221,187,119,104,253,250,245, 45,221,220,220,228,155, 55,111, 70, 78, 78, 14, 4, 65,176,245,242,242,178,237,219,183,175,126,243, +230,205,163, 0, 44, 46,235,126,139,162,200, 23,254, 37,130, 32, 72, 1,240,132,144, 25,165, 25, 34, 55, 55,183,128,110,221,186, +205, 83, 40, 20,216,190,125,251, 78, 0,203, 1,244, 62,121,242,100, 53, 0,104,218,180,105,111, 0,151,108,108,108,234, 18,130, +175, 69,177,224,209, 73,101, 41, 75, 37,209,185,115, 23, 16, 66, 86, 58, 59, 59, 95, 74, 73, 73,113, 35, 4,189,203, 99,220, 24, + 12, 6,131,241, 47, 54, 88, 0,160, 82,169,112,224,192, 1, 80, 74, 95, 60, 54,164,232, 17, 34, 55,115,252,160, 51, 73,145, 19, +127, 23, 31,212,151,162,126,253,250, 47, 25,176,215, 93,195,139, 27,180,209,163, 71,195,201,201,233,165, 21, 18, 19, 19,113,250, +244,169, 18,183, 49,215,111, 20,255, 48,107,214, 44,235,180,180,180,206,235,215,175,111,235,226,226,242, 93,124,124,252,133, 82, + 34, 87, 93,138, 58,254,191,247,222,123, 1,107,214,172,121,152,157,157,109,184,118,237,154,225,167,159,126,138,107,213,170,149, +107,207,158, 61,101,163, 70,141,114,126,254,252,121,255, 3, 7, 14,244,183,181,181,221,159,158,158,190,160, 60, 25,160,209,104, +252,186,117,235,214,246,151, 95,126,145,171,213,106,132,133,133, 85, 24, 48, 96,128, 19, 33,228,215, 87, 31,165,243, 58,106,214, +244, 30, 48,100,232, 80,159,225,159,143,240, 55, 24,244,121,119,131,207,158,150,200, 56,254,203, 47, 63,181, 78, 77, 77,180, 19, + 69, 58, 0, 5,243, 15,149,198,168, 41, 83,166,184,120,121,121, 85,220,182,109, 27,114,114,114, 0,192,193,211,211, 19,213,170, + 85, 19,206,157, 59, 7, 31, 31, 31, 88, 90, 90,226,220,185,115,184,114,229, 10,252,253,253, 45,100, 50,217,135,111, 50, 88,110, +110,110,181,221,220,220,166, 58, 21,102,118,209,241,173, 87,175, 30, 70,143, 30, 13,157, 78,135,170, 85,171,122,170, 84,170, 75, +231,206,157, 53,199, 92, 43,237,237,237, 49,124,248,112,228,228,228,244,114,115,115, 11,167,148, 74, 10,211, 11, 74,169, 99,181, +106,213,182,180,108,217,178,234,254,253,251, 72,121, 79, 14, 74,105, 18, 33,100, 73,215,174, 93,190, 6, 8, 90,183,110,157, 54, +122,244,104,225,225,195,135,205, 62,248,160, 71,224,147, 39, 79,223,137,113, 99, 48, 24, 12,198,191,200, 96, 21, 69,168, 78,158, + 60, 9,189,254,143,143,154,179,109, 81, 31,227, 62,168,132, 79, 70,110,194,142,103,161,168, 93,187, 54, 94, 29,145,248,202, 67, + 90,147,120,158, 95,199,113,100, 8, 33, 4,245,234,213, 79, 90,180,104, 81, 73,143, 69, 49,214,171, 87, 63,137,231, 57, 71, 74, + 41, 8,225,126, 22, 69, 33,169, 36,205,215, 93, 16,229,114,197, 24, 0,112,113,113, 77, 58,116,232,144,177,103,207,158, 88,184, +112,161,124,252,248,241,211,221,220,220, 6,197,198,198,198,190, 46,157,197,241,240,240,192,227,199,143, 49,121,242,228,132,196, +196,196,117, 9, 9, 9,143,183,110,221, 90,201,211,211,243,147,181,107,215,122, 6, 5, 5,113, 29, 58,116,192,193,131, 7,235, +150,144,150,210,134,190, 74, 1, 84,105,217,178,101,155,223,127,255, 93,158,149,149,133,200,200, 72,168,213,106, 76,155, 54,205, +242,243,207, 63,111, 14, 96,183, 57,154, 60, 33, 77,222,239,214,221, 73,175,215,230,232,245,186,236,240,200,155,241,113,113, 15, + 51,170,122,249, 59,190,215,190,177,221,227,199, 97, 77, 94,103,176,138,107, 42,149,202, 15,155, 52,105, 98,185,109,219, 54, 52, +104,208, 0,214,214,214, 56,115,230, 12,238,221,187,135,180,180, 52,142, 82, 10, 11, 11, 11,204,155, 55, 15, 30, 30, 30,200,206, +206, 70, 68, 68, 68, 5,169, 84,106,255,166,116,138,162,216,105,211,166, 77, 78,246,246,246, 48,153, 76,160,148,194,100, 50, 65, + 20, 69,196,199,199, 35, 39, 39, 7, 26,141, 6, 58,157, 14,231,207,159, 43,209, 44, 23,215,140,141,141, 61,191,118,237,218,243, +213,171, 87,111, 62,126,252,120,200,100,178, 9, 25, 25, 25, 88,184,112, 33,212,106, 53,102,205,154,229, 92,175, 94, 61, 0, 48, +154, 76,166,162,178, 68, 41,197,138,226, 38,200,156, 17, 48,238,238,238, 39,147,146,146,131, 90,181,106,133,244,244,116,227,180, +105,211, 80,175, 94, 61, 84,173, 90, 13,165, 29,207,119, 5,211,100,154, 76,147,105,254, 27, 52,255,145, 6,171,240, 17, 83,164, +132,247,248,253,247,223, 75,220,240,227,197, 33,144,240, 5,215,191,213,171, 87, 35, 45, 45,173,212,104,147, 32, 8, 95, 57, 57, + 57,105, 39, 76,152,208,186,106,213,170,198, 47,191,252,242, 86, 68, 68,196,232,226,235, 84,174, 92,121,217,143, 63,254,136,103, +207,158,165,204,155, 55,239,116, 98, 98,226,164, 50,102,250, 84, 66,200, 74, 0,136,139,139, 75, 61,120,240, 96,131,115,231,206, +141, 93,178,100,137,243,136, 17, 35,228, 35, 71,142, 28, 2, 96,250,107,182,141, 35,132,108,117,115,115,235,223,180,105, 83,116, +239,222, 61,181, 73,147, 38,134,235,215,175, 59, 95,189,122,117,234,202,149, 43,197, 65,131, 6,113,205,154, 53, 67,114,114, 50, +118,237,218, 37, 70, 69, 69,113, 10,133,194,236,103, 6, 18, 66, 90,243, 60,255, 53,199,113,245,124,125,125, 31, 13, 27, 54,236, +126, 90, 90, 90, 74, 76, 76, 12,242,242,242, 96, 48, 24, 32,145, 72, 32,147,201,202, 48,127, 6,177, 86,171, 85,178, 43,151,246, + 30,139,139, 9, 73,137, 79,188,159,201,129,114,113,113, 55, 51,125,124, 90,219,161,160, 79, 86,169, 88, 88, 88,120, 38, 39, 39, + 35, 39, 39, 7, 54, 54, 54, 88,178,100, 9, 28, 29, 29,161,213,106,241,248,241, 99,234,238,238, 78,206,156, 57, 3, 55, 55, 55, +164,167,167, 67,175,215, 35, 47, 47, 47, 81,175,215,191,113,255,165, 82,233,254, 65,131, 6, 53,119,116,116, 84, 23, 69,176, 68, + 81,132,183,183, 55, 70,140, 24,129, 29, 59,118, 32, 52, 52, 20,148, 82,163,155,155,123, 18,199, 17, 71, 0,148,227,248,173, 38, +147, 41,169,132,124,162,238,238,238,179,166, 78,157,234,254,211, 79, 63, 85, 25, 61,122, 52, 4, 65,128, 40,138, 16, 4, 1, 73, + 73, 73,216,191,127, 63, 46, 93,186,100,120,252,248,241, 14, 43, 43,235, 7, 90,173,246,102,126,126,254,115,115,143,168,187,187, +187, 82, 20,197,207,170, 85,171,214,177,111,223,190, 70,153, 76, 6,173, 86,139,188,188, 60,220,191,127,223,216,177, 99,199,180, +174, 93,187,216, 29, 58,116,136, 82,138, 37, 44,122,197, 96, 48, 24,229,227,117, 30,228, 31, 19,193,122,221, 78,109,216,176, 1, +148, 82,240, 60, 15,142,227, 94, 52, 17,230,196,137,248,120,228, 22,200,120, 17, 71,143, 30, 69,221,186,117,205,250, 65, 81, 20, +151, 31, 61,122,180,113,211,166, 77, 37,109,219,182,173, 95,169, 82,165,122,145,145,145,183, 1,160, 82,165, 74,245,218,181,107, + 87,223,209,209, 17,203,150, 45,211,137,162,184,188,156,206,186,248,197,238,154,135,135,199,119,123,246,236,249,105,216,176, 97, +112,113,113,169, 83,202,182,195,218,183,111, 95,247,219,111,191,197,228,201,147, 13,235,214,173, 51, 13, 31, 62, 92,210,178,101, + 75,108,222,188,153,123,242,228, 9,214,173, 91, 39,238,217,179, 39,129, 16,194,183,111,223,222,169, 12,133,168,133,147,147,211, +175, 59,119,238, 20, 3, 2, 2,148, 79,159, 62,173, 49,102,204, 24,167,248,248,248,227, 85,171, 86, 77,205,203,203,131,201,100, + 66,110,110, 46, 0,232,205,213,229,120,146, 24, 19,243,220, 49,223,144,161,235,208, 50,104, 76,114, 68, 10, 28, 42,119,195,137, +115,191, 47,141,140, 14, 21, 9, 7,179,154, 26,115,114,114,158,155, 76, 38, 59, 0,142, 39, 79,158,132,131,131, 3,178,179,179, + 97, 48, 24,160,213,106, 13,182,182,182,138,212,212, 84,228,231,231, 35, 63, 63, 31, 86, 86, 86, 8, 14, 14, 78, 51,153, 76,135, +223,164, 27, 21, 21,245, 16,192,123,175, 24,105, 5,199,113,167,140, 70, 35,194,194,194,240,232,209,163, 54, 17, 17, 17,249,133, +199,201, 21, 0, 76, 38, 83,220,235, 52, 99, 98, 98,116, 14, 14, 14,223,126,250,233,167,163,157,156,156,252, 0,192,203,203,203, +106,204,152, 49, 88,176, 96, 1, 30, 60,120, 48, 85, 42,149, 94,141,141,141,205, 47,107,249,113,114,114,242, 85,169, 84,227, 70, +141, 26,229,228,235,235,139,252,252, 2, 9, 75, 75, 75,228,229,229,193,202,202, 10,141, 27, 55,126,252,221,119,223, 25, 40,197, + 80, 74,105, 34,171, 34, 25, 12, 6,227,221,152,172,127, 84, 4,171,208, 88, 16, 66, 8,125,101,135, 11, 46,224, 28,247,146,185, +226,121, 30, 31, 52,224,145, 93,213, 11, 28, 87,208,148,104, 50,153, 55,136, 44, 57, 57, 57,209,221,221,125,111,112,112,112,207, + 94,189,122,225,244,233,211, 95, 0,248, 12, 0,120,158,255,162, 87,175, 94, 8, 14, 14,198,163, 71,143,246, 38, 39, 39,191,147, + 11,151,193, 96,200, 51, 26, 11, 90, 35,149, 74,165,172, 84,195,194,113, 6,153,172, 96,181,167, 79,159,118, 31, 57,114,100,247, +246,237,219, 15,238,220,185, 51,246,239,223,143, 77,155, 54,205, 6,112,186,105,211,166, 91,202,146, 14,158,231,199,236,216,177, +195,212,180,105, 83, 75, 74, 41,106,213,170,101, 57,110,220, 56,195,194,133, 11, 61, 7, 13, 26,148, 26, 19, 19,131,172,172, 44, + 36, 36, 36, 24,162,162,162, 66,205,213, 53, 9,226,233,149, 43,127,116, 27,250, 89, 55,167,223, 15,174,159,187,107,247,221, 58, +253,122, 39,132,184,186,213,118, 88,190,234,146,210,100, 18,247,153,163,163,211,233,118, 29, 58,116,168,119,165, 74,149, 28,239, +221,187, 7,157, 78, 7, 81, 20,209,177, 99, 71, 0, 80, 20,173,247,248,241, 99, 93, 94, 94, 94, 82, 72, 72, 72,118,100,100,164, + 17, 5,157,204,205, 57,129, 94,140, 14, 52, 24, 12,253, 59,117,234, 4, 65, 16,208,161, 67, 7,220,185,115,167, 63,128,117, 69, +223,155, 91,150, 0, 76, 4, 0, 55, 55, 55, 59,107,107,235,253, 69,209, 49, 39, 39,167, 75,193,193,193, 70,119,119,247,190, 50, +153,172,177, 86,171,253, 61, 33, 33,225,124,105,154,174,174,174, 65, 85,171, 86,157,178,112,225, 2,226,228,228, 12, 65, 48,194, +100, 50, 33, 41, 41, 5, 57, 57, 57,240,245,245,133,135,135, 7,230,205,155, 7,142,227, 14, 48,115,197, 96, 48, 24,111, 79, 73, + 30,228,255, 29,238,213, 29, 44,205, 92, 21,189,151, 73,120,216, 87,176,133,125, 5, 59,216,218,218, 66, 16, 4,152,235, 62, 57, +142,219,188,109,219, 54,189,181,181, 53,186,118,237,234,227,226,226,210,212,197,197,165,105,215,174, 93,125,172,173,173,177,109, +219, 54, 61,199,113,155,223,145, 43,230,120,158, 31,208,180,105, 83, 36, 38, 38,226,249,243,231,215,202,178,125,116,116,116,118, +124,124,252,142,220,220, 92, 72, 36, 18,232,116, 58, 0, 56, 11,160,204,207, 82, 19, 69, 49, 32, 32, 32, 64, 85,212, 87, 45, 60, + 60, 28,150,150,150,150,209,209,209,142,121,121,121,208,235,245,200,200,200,192,173, 91,183,242, 0,196,153,171,251,224,193,211, +189, 55,175,223, 12, 62,122,252, 2, 87,165, 74, 29, 7,119, 55,117,150,189,131,187,229,225,163,247, 84, 9,241,169, 97, 15, 30, +132,154,251, 48,220,229,123,246,236, 73, 13, 14, 14,126,228,238,238, 30,101,109,109, 77, 1, 32, 62, 62,254,165,215,141, 27, 55, + 20, 71,143, 30,205,139,140,140,220,143,130, 65, 1, 38, 51,242, 97, 38, 33,120, 66, 8,158,240, 60,191,168,110,221,186,253,130, +130,130, 16, 29, 29,141,160,160, 32,212,170, 85,171,159,189,189,189,115, 25,243,214,153, 16,226,234,235,235,171,209,104, 52, 75, + 7, 15, 30, 12,147,201,132,182,109,219, 34, 55, 55,119,189,171,171,235, 55,237,219,183,255, 98,205,154, 53,117,156,156,156,190, + 50, 83,182,111,159, 62,125,136, 90,173,129,209,104,132, 92, 46,135, 70, 99, 1, 79, 79, 79,180,110,221, 26,148, 82,180,110,221, + 90, 92,187,118,237,126,149, 74,181,133, 85,139, 12, 6,131,241,238, 76,214, 63, 50,130,245,154, 11, 24, 4, 65, 0, 33, 4, 87, + 51,253,160, 51, 73,144, 25,125, 19,189, 2,228, 47,140, 22,207,243,224,121, 30, 70,163, 17,230, 62,118, 39, 42, 42, 42,195,197, +197,229,183, 75,151, 46, 13,236,209,163, 7,142, 29, 59, 54, 12, 0,122,244,232,129, 75,151, 46, 33, 44, 44,236,183,248,248,248, +140, 50, 94,108,237, 1,240,197, 35, 10, 78, 78, 78, 85, 42, 86,172,248,197,208,161, 67, 27,214,174, 93, 27, 91,183,110, 5,128, +211,102, 71,134, 10,162,114,142, 0,114, 94,217, 55, 25, 0, 75, 81, 20,203, 52,201, 38,199,113, 55, 78,159, 62, 29,208,185,115, +103,203,200,200, 72,196,197,197, 97,231,206,157, 73,118,118,118, 73,162, 40,194,206,206, 14,246,246,246, 48, 26,141,170,199,143, + 31, 59, 3, 48,123,174, 45,129,202,127, 62,126,236,218, 79,129,254, 29,185, 42,149, 52,153,128,158,220, 8,142,213, 72,100,146, +213,101, 40,220, 38, 66, 72,215,139, 23, 47,142,186,114,229,202, 7, 46, 46, 46,100,224,192,129,232,216,177, 35,228,114, 57,180, + 90, 45,210,211,211,113,232,208, 33, 98, 50,153,130, 0,192,197,197,165, 98,229,202,149, 55, 16, 66, 98,195,195,195, 7,190, 38, +111, 94,157,162, 99, 88,247,238,221, 31,198,199,199, 27,199,140, 25,131, 69,139, 22,225,147, 79, 62,145,134,132,132,124, 6,224, +123, 51,243,251, 59, 66,240, 53, 40, 72, 76,116,244,147, 31, 87,173,202,119,113,113,193,201,147, 39,209,184,113, 99,120,123,123, + 87,185,117,235, 86,149,102,205,154,225,218,181,107, 72, 77, 77,189, 82,154,102,203,150, 45, 37, 60,207,123,186,186,186, 34, 34, + 34, 2, 74,165, 18,206,206,206,176,177,177,129,131,131, 3, 22, 45, 90,132, 37, 75,150,220,149, 72, 36,235, 98, 99, 99,195, 88, +117,200, 96, 48, 24,140, 55, 26,172,226,174,241,213, 40,214,145, 35, 71, 64, 41,133, 69, 80, 3, 76,232, 85, 25, 3,190,216,132, +237, 97,143,161, 80, 40,254, 43, 34,145,224,243,207, 63, 47,211, 15,219,218,218,110,223,190,125,123,143, 38, 77,154,104,218,182, +109,235, 13, 0, 74,165,210,184,125,251,246, 92, 91, 91,219,237,101, 52, 87,147, 9,193,120, 80,112, 10,185,252,164, 93,133, 10, +167, 44, 45, 45,253,219,183,111,239,221,161, 67, 7,120,121,121, 97,231,206,157,216,185,115,231,233,248,248,248,203,230,234,122, +122,122,226,225,195,135, 3, 0,172, 7, 64,241,223, 78,252, 38, 0, 77, 60, 60, 60,148,101, 73,167, 32, 8, 75, 6, 13, 26,244, +251,228,201,147, 83,124,124,124, 52, 59,118,236, 72, 63,121,242,164,190, 83,167, 78,207,139, 46,228, 90,173, 22, 90,173, 86,238, +230,230, 86,181, 44, 6,235,193,131, 7, 73, 29,218,183,113, 88,245,211, 37,111,173, 86, 48,236, 59,114,210, 96,212,107,180, 15, + 31,135, 37,148, 37,141,148, 82,147,187,187,251,112, 81, 20, 29, 76, 38,147,193,193,193, 65,246,235,175,191, 66,169, 84,130,227, + 56,212,171, 87, 15, 74,165, 82,239,234,234,154, 9, 0,142,142,142,198,197,139, 23, 75, 62,253,244, 83, 89, 89,178,204,217,217, + 25, 91,182,108, 65,110,110,238,220, 29, 59,118, 76,252,252,243,207,225,227,227,211,210,213,213,117, 81, 92, 92,156,182,148,252, +182, 45,110,216, 8, 33,213,101, 50,217,195,229,203,151,235, 47, 94,188,184,231,232,209,163, 29, 63,249,228, 19,101,211,166, 77, +113,249,242,101,252,252,243,207,215,172,173,173,151,149,150,168,115,231,206,137, 46, 46, 46, 47,154,193,117, 58, 29,194,195,195, +209,184,113, 99,172, 91,183, 14,203,151, 47,223,150,144,144,192,162, 86, 12, 6,131,241, 39, 69,174,254, 73, 81, 44, 73,105, 43, +236,216,177, 3, 0,240,217,138,199,208,235, 11,250, 49,173, 94,189,250,197,252, 85, 69, 77,137,231,207,159, 7,202, 48,103, 85, + 72, 72, 72,174,187,187,251,230,145, 35, 71,206,186,113,227,186, 35, 0,220,188,121, 51, 41, 33, 33, 97, 74, 76, 76, 76,110, 25, +204,149, 13, 33, 24, 47,138,148, 47, 52,105,237,198,140, 25,227,218,164, 73, 19,131, 84, 42, 69, 84, 84, 20,126,248,225, 7, 92, +186,116,105, 71,124,124,252, 42,106, 70,152, 45, 34, 34,226, 90,116,116,116,195, 17, 35, 70,160,121,243,230, 93,126,254,249,231, +247,138,239, 91,189,122,245, 54,118,234,212,201, 73,161, 80, 72,244,122,189,240,244,233,211,219,102, 22,162,115,132,144,190,227, +199,143, 31, 69, 41,173,235,232,232, 24, 21, 24, 24, 24,210,164, 73,147, 84, 43, 43, 43, 72, 36, 18, 36, 37, 37, 33, 47, 47, 15, +130, 32,216,150, 37, 35, 61, 60, 60,154,142, 26, 53,170,206,240,225,195,145,155,155,139, 77,155, 54, 97,213,170, 85,240,240,240, +104, 26, 29, 29,125,177, 44, 90,162, 40, 58, 28, 56,112,160, 40, 82,135, 83,167, 78,193,213,213, 21,214,214,214,200,202,202,194, +192,129, 3,229, 83,167, 78, 5, 0,220,186,117, 75,170, 82,169, 74,219,239, 36, 66,200, 18,142, 35, 99, 0,144,128,128,192,100, + 43, 43, 43,227,213,171, 87, 67, 99, 99, 99, 15,123,121,121,125, 56,104,208, 32,239,192,192, 64,217,211,167, 79,155, 1, 56, 86, +214,130,156,150,150,134,243,231,207,159,143,143,143, 95,226,232,232,184,253,187,239,190,251,218,217,217,185,110, 92, 92,220, 85, + 39, 39,167, 89,193,193,193, 70, 51,242, 71,116,113,113,137, 62,126,252,184, 71,207,158, 61, 33,151,203,145,158,158, 14, 43, 43, + 43, 44, 94,188,152, 26, 12,134,189,172, 42,100, 48, 24, 12,198, 59, 49, 88,123,246,236, 1,199,113,208, 39,233,241,249,248, 29, + 80, 43,121,156, 57,115, 6,118,118,118, 47,245,203, 42,106, 50,124,197,252,188,241,105,219,105,105,105, 23,227,226, 98, 29,138, + 77, 44,233,160, 80, 40, 47,150, 98,168,222,168, 73, 8,129,193, 96,192,209,163, 71,113,225,194, 5,195,179,103,207,206, 17, 66, + 14,196,197,197,221, 53, 87, 51, 51, 51,115,254,176, 97,195,198,119,236,216,177,225,128, 1, 3,176,124,249,114,217,195,135, 15, + 65, 41, 69,253,250,245, 81,187,118,109, 55,163,209, 72, 31, 60,120,144,179,127,255,254,163, 58,157,110,139,185,233,164,148,158, + 4,112,146, 16, 34, 75, 72, 72,168,146,153,153,217, 70, 20, 69,203,164,164, 36, 68, 68, 68, 32, 45, 45, 13, 89, 89, 89, 48,153, + 76,105,101,217,247,232,232,232,139, 1, 1, 1,224, 56, 14, 90,173, 22, 49, 49, 49, 48,153, 76,136,139,139, 43,243,241,228, 56, + 46,185, 83,167, 78, 14,249,249,249,166, 62,125,250, 72,146,147,147,225,227,227, 3, 0,200,206,206,198,145, 35, 71, 80,189,122, +245,162,200, 25,124,125,125, 75,213,164,148, 78, 35,132,172,113,113,113,249,110,206,156, 57, 62, 87,175, 94,133,209,104, 60, 10, + 0, 70,163,241,232,205,155, 55,189,253,253,253,177,117,235,214,246, 37, 25,172,226,154,148,210,244, 66,195,246, 53, 40,136,111, +205,154,169, 62, 62, 62, 6,169, 84, 90, 1, 0,146,146,146,146, 0,140, 55,195,156,251,149, 48,103,215,148,221,187,119,127,122, +229,202,149,102, 95,127,253, 53,105,221,186, 53, 0, 32, 55, 55, 87, 72, 78, 78,206, 45,143,230,219,194, 52,153, 38,211,100,154, +255, 6,205,127,149,193,202,204,204, 68, 96, 96, 32,140, 70, 35,106,214, 52, 34, 43,203, 19, 70,163,241, 69,231, 95, 81, 20, 97, + 50,153, 32, 8, 2, 56,142, 51,187, 15, 86, 17, 58,157,206,240,234,228,239, 58,157,206, 80,198,208, 98, 6, 33,228, 7,142, 35, +227, 65,193,201,229,242,107,171, 86,173,218, 4, 32,150, 82,122,173,180,230,166,146, 72, 72, 72, 72, 1, 48,174, 98,197,138,245, +207,156, 57, 51,226,131, 15, 62,240,238,218,181, 43,162,162,162, 96, 50,153, 16, 26, 26,106,220,191,127,255,131,140,140,140, 53, +148,210,135,229, 57,240,148, 82, 3,128, 39,150,150,150, 16, 69,177,121,227,198,141,237, 76, 38, 19, 82, 82, 82,112,229,202,149, +136,148,148,148, 75,229,136, 96, 97,216,176, 97,200,201,201,193,142, 29, 59,112,236,216,177,114, 69,176, 98, 98, 98,170, 2,128, +171,171,107,162,149,149,149,100,240,224,193, 48, 26,141,200,203,203, 67, 86, 86, 22, 82, 83, 83,245, 95,125,245,149, 28, 0,228, +114,185,177, 67,135, 14, 18, 51,247, 57, 46, 40, 40,200, 90,169, 84,226,252,249,243,162, 40,138,167, 10, 77,205,169,139, 23, 47, +142,168, 91,183, 46,103,111,111, 95,221, 76,173,233,132,144,159,172,172,172, 92,107,250,250, 46,165,148,194,193,193,193,227,109, + 79,136,196,196,196,100, 0,115,221,220,220,118,127,251,237,183, 67, 26, 54,108, 88,107,250,244,233,160,180, 32, 66,202, 96, 48, + 24, 12,198,219, 26,172,240,225,195,135, 27,138, 71,134, 94,137,114,252, 33,114, 36,138, 98,108, 25, 77, 70, 18, 33,100,113, 97, +211, 17,202, 59, 97, 35,165,116, 22, 33,100, 13, 0, 94,151,159,255,206,134,205, 71, 69, 69,221, 34,132, 12,222,188,121,115,219, +157, 59,119,142,235,221,187,183,106,253,250,245,250,164,164,164, 69, 0,142, 81, 74,197,183,253,141,236,236,236, 39,132,144,248, +199,143, 31, 55,146,203,229, 42, 65, 16,146,147,147,147, 67, 40,165, 57,101,209,137,142,142,190,232,234,234,138,189,123,247,194, +206,206, 14,105,105,105,102, 69,176, 74,185, 67,233,190,109,219,182, 61,162, 40, 42, 95,201,251,172,184,184,184,170, 64, 65, 39, +247, 35, 71,142,108, 32,132,196,154,153,206, 29, 95,126,249,229,192,228,228,228, 93,177,177,177,233,133,134, 46,221,221,221,125, +201,228,201,147,251,166,164,164,252, 90,134,124, 79, 32,132, 36, 63,127,254, 60, 59, 45, 45,205, 82, 16,132,119,118, 98,196,198, +198, 62, 3,240,141,155,155, 91,195, 14, 29, 58,244,167,148, 38,179,234,130,193, 96, 48, 24,111,109,176,206,156, 57,211,250,127, +145,128,194,166,163, 31,139, 12,215, 91,232,164,252, 73,233,163, 0, 78, 16, 66, 78, 47, 91,182,172, 70, 94, 94, 94, 4,165, 52, +247, 29,255, 70, 54,128,227,111,171, 19, 23, 23,167, 38,132, 76, 6, 48, 9,192, 28, 74,233,236,183, 52, 25, 87, 1,188,113,234, +132,248,248,248, 40, 0,173,204,213,140,137,137,217,141, 87, 30, 1, 84,184,124, 47,128,189,229, 56,118,130,135,135,199,180, 49, + 99,198,116, 0,112,224, 93,231,127,108,108,236, 53, 0,215, 88, 85,193, 96, 48, 24,127, 57, 1, 0, 28, 10,223, 23,221,244, 58, +188,242, 94, 15, 64, 94,108,155,162,207,201, 0,110, 20,211, 40,190,188,180,109, 1, 32, 5,192, 93,148,101, 18,240,191,195, 17, +163,148, 38,253,221, 31, 53, 66, 41, 21,114,115,115, 31,188,107,115,245, 39,164,115, 54,165, 84,253,182,230,234,255,137,232,232, +232,224,216,216,216,239, 99, 99, 99,239,177,250,135,193, 96, 48,254,185,230,138, 16,114,144, 16,114,176,208, 16, 57,148,240, 94, + 94,180, 78,241,207,197,140,153, 67, 9,203,223,184, 45, 33,228,224,196,137, 19, 91, 1, 8, 42, 75,130, 57,150,103, 12, 6,131, +193, 96, 48,254,230, 56, 16, 66, 14, 82, 74,187, 80, 74,187, 20, 26,160,215, 5, 26,186, 20,255,251, 38, 74,210, 41,250,141,226, +159,231,205,155, 55, 7,128,170, 44, 9,150, 16, 66,252, 94,147, 64,179, 71, 7,188, 78,227, 77,223,149,166,207, 52,153, 38,211, +100,154, 76,147,105, 50,205,127,158,230,187,218,254, 93, 80,146, 89, 43, 50,114,197, 63, 79,152, 48, 97, 18,202,208, 60, 88, 36, +254,167,189, 0,248, 49, 77,166,201, 52,153, 38,211,100,154, 76,147,105,190,229,171,115,129,101,161,157,139,191, 47,105,217,155, +222,151,182,173, 25,235,154,157,102, 9, 24, 12, 6,131,193, 96, 48,254,222, 36, 23,143, 54, 21, 70,152,132, 9, 19, 38, 76, 42, + 90, 86, 24,101,202, 7,160, 40, 33, 90, 86,124,187,210, 34,107,102,175,251, 38,152,193, 98,152, 5, 33, 68, 2, 96,148,141,141, + 77, 47, 27, 27,155,202,105,105,105,225, 89, 89, 89,187, 0, 44,167,148, 26,203,163, 89,171, 42,105, 43,152, 48, 78, 20,193,243, + 18, 44,122, 24, 70,143,178, 35,205, 96, 48, 24,140, 18,184, 1, 32,160,152,233, 73, 6,112,111,238,220,185,233,115,231,206, 45, +190,236, 14,128,186,133,235, 37,151, 96,148,244,133,159,245, 37,172,163, 55,103,221, 63,197, 96,249, 86, 36, 67, 32, 98, 50, 8, + 40, 8,230,132, 68,209,159,203,178,125,109, 31,210, 74,206, 73, 86, 81, 80, 94,103, 20, 38, 18, 1, 37,206,209, 68,121, 52, 85, + 74,249,185, 4, 68,212,139,166,207,239, 61,161,103,204,190,104, 87, 39,237, 36,148, 91, 47,138, 84, 42,138,116, 43, 7, 28, 81, +235,113,245, 74, 12,213,149, 55, 87, 43, 86, 36, 54, 68, 68, 71,153, 68,210,192, 96, 50,221,164, 28,142, 68, 69,209,140,191, 83, +201,235,229, 75,100, 18, 15,213, 66,141,194,216,150,231, 5, 91, 65,228,211,243,116,210, 83,198,104,237,216,157, 33,212,236,201, + 91, 9, 33, 82, 0,163, 52, 26,205,135,106,181,186, 74, 78, 78,206,115,173, 86,187, 71, 46,151,183, 89,190,124,185,123,227,198, +141, 45,146,147,147, 9,199,113,142,251,247,239,239,191,114,229,202,182,132,144,206,148, 82, 83, 89,211, 44,152,240,205,163, 67, +159, 7, 1, 64,149,182,171, 39, 17, 66,142,151,117,110,177, 58,222,164,166, 32, 96, 88,105,235,241, 60,214,220, 13, 45,223,164, +176, 53, 61,201,106, 2, 84, 5,197, 94,158,195,206,123, 97,108, 78, 44, 6,131,193,248,139, 76,214,171, 92, 55,115,189,255, 57, +101, 50, 88,132, 98,250,131,103,209, 54, 16, 13,168,229,227, 53, 13, 64,153, 12,150,156,231,127,190,113, 39,222, 9,130, 14,139, +191,235,179, 73,167, 23, 33,138, 38, 8, 38, 19, 68,209, 4, 81, 16, 32,138, 38, 80,106,192,220,213, 55, 0, 83, 54, 26,212,243, +249, 25,128,167,185,191, 33, 21,185,245,183, 46, 31,183, 37,166, 76,108,255,101,214,231,209, 9,218,207, 79, 93,143, 75,245,173, + 76,166, 61,140,196, 22,115, 47,224,149, 42, 17,103, 74,209,181,162,171,195,135,227,135,127,212,176,125,171,166, 92,197, 74, 85, + 16, 21, 25, 62,228,216,153,139, 98,179,198,142,215,162,226,146,119, 17,130, 3,145,145, 52,225,109, 50,193,193,134,212,177,210, +168, 86, 75,101,156, 70,202,243,207,146,211,179,230, 39,164, 82,179, 11, 72, 47, 95, 34,179,240,148, 93,109,213,105,144,109,179, +214,159, 8, 42,181, 69,118,204,243, 96,253,209, 3,139,218,133,201, 30, 93,235,229, 75, 26,154, 99,178, 8, 33, 18, 66,200,193, +233,211,167, 59, 55,109,218,212, 50, 53, 53, 21, 38,147,201,110,247,238,221,195, 3, 2, 2, 44,220,220,220,228,155, 55,111, 70, + 78, 78, 14, 4, 65,176,245,242,242,178,237,221,187,183,105,235,214,173,163, 0, 44,126,147,118,229,202, 68,161, 33,176,122,201, + 96,137,120, 49,129,169,209, 4,181,151, 43, 92,106, 85, 33, 70, 0,144,235,145, 19, 28, 71, 75,157,133, 95, 16, 48,236,246,205, + 51,159,154, 50,110, 0,130, 1, 20, 70, 64, 52, 0,212, 8, 42, 26, 0,209, 8, 74, 13,104,212,125, 3, 0,140, 42, 79,254, 16, +130, 54,167, 78,221,112, 78, 76,136,247, 95,178,100,206, 56,223, 42,228, 56,199, 99,251,131, 48, 92,124, 23,147,205, 50, 24,140, +191,158, 54,109,218,172,207,201,201,153,127,253,250,245,103,239, 74,211,217,217,185, 6,199,113,145,229,121,162, 72,113,234,215, +175,255, 21,128,143, 11, 63,110,188,117,235,214,210,183, 77, 91,195,134, 13,221, 40,165, 78,133,117,127,226,181,107,215, 98, 89, + 41,248, 11, 13, 22, 5, 20,160, 34,112,169, 59, 40,129,178,172, 63, 70, 41,148,160, 38, 32,239, 9, 6,244, 8,128,189,173, 29, + 32,228, 3,162, 30, 16,243, 11, 94, 66, 62, 82,210, 18, 1, 83, 54,144,124, 4, 38, 74, 21,101,222, 43, 99, 38,144,180, 19, 29, +130,156, 97, 99, 97,129,209,125,124, 43,172,221,251,100,213,186,189,143, 91, 1, 24, 84,218,230,238,238,100,233,132,225,221, 62, +123,175, 93, 23, 82,217,203, 15,105,201, 49,184,126,227, 74,198,146,181,191, 63,108,215,162, 65,205, 15,123,124,100, 51,108,248, +184,198,145, 97,247, 27,159, 61,189,111,113, 69, 87,178, 60, 42,142, 78, 44, 87,116,204, 69, 54,236,189,182,109,191, 95,189,118, +163, 90,101, 81, 1, 89,105, 81, 85, 6,244,235, 81,215,217,142,116, 73, 72, 51, 47,226, 34,245, 80, 45,106,219,101,176, 93,207, +143, 23, 90, 26, 13, 57,134,184,167, 71, 31,106, 84, 38,174,119,159,209,153, 27,127,158,230, 28,102, 72, 91, 4, 96,164, 25, 82, +163,166, 79,159,238,236,229,229, 85,113,219,182,109,200,201,201, 1, 0,199,170, 85,171,162,106,213,170,194,185,115,231,224,227, +227, 3, 75, 75, 75,156, 61,123, 22, 87,175, 94, 69,189,122,245,212, 50,153,236,195, 55, 25,172,154,222,164, 87,247, 86, 13, 86, +122, 86,114, 83, 23,116,254, 19, 65,169,136,156,156,124,124, 49, 39, 24,233, 89, 58,116,106, 83,191, 90,101, 55,203,167, 28, 68, + 80, 10, 68,196, 37, 10, 53, 60, 73,159, 71,207,233,225,210, 34, 83,245, 2, 90, 5,221, 9,190,226, 99, 72, 58,136,192, 78,115, +159,128,226,242,127,221, 17,130,130,207,109,240, 1, 54,148,235, 4, 33,132, 16,223, 42, 16,162,174,204,135,123,253, 33,252,154, + 13, 71,237, 51, 83, 99,251,237,222,185,186,251,170, 53, 63,253, 90, 94,211,198, 96, 48,254,118,180,183,177,177,105, 25, 24, 24, +216,254, 93,153, 44,169, 84,170, 18, 4,161,154,171,171,235,211,242,154,172,209,163, 71,127, 73, 8,153, 29, 28, 28, 12, 0,240, +247,247,159,237,239,239, 95,226, 60,135, 86, 86, 86,185,190,190,190, 51,151, 45, 91,246,227,155, 52,199,143, 31,239, 98, 52, 26, + 43,223,186,117,171,200,192, 85,174, 95,191,126,229,146,214,213,104, 52, 66,195,134, 13, 35,231,207,159, 31,207,138,200,159, 25, +193, 2,158, 36, 92,248,170,174, 62, 45, 15, 4,120, 82,186,161,122,121,168,165,206, 40, 44, 92,249,125,247,239, 27,213,181, 70, + 66, 74, 62,142, 93, 76,132,104, 50, 66, 20, 5, 8, 66, 81, 4, 75, 64,231,166, 14,104,134,207,177,252,215,167, 48,154,196, 5, +111,210,252, 67, 68, 3,226,199,245, 90,124,180, 69,160, 84,166, 82,144, 44, 79, 55, 27,135,111, 7,214,230, 70,247,241,133, 86, +103,250,176,102,101,114,238, 97, 4,221,240, 38,205, 90, 85,108, 7,127, 49,100, 8, 17,213,181,112,243,234, 97,140,250,118,114, +104, 74,106,250,220,200, 24,220, 58,112,234,124,165,138, 78, 21,166, 47,157, 51,185,158, 79,221, 14,232,192,105,113,254,226,133, +143, 1, 76, 44, 75, 58,157,156,136, 90,204, 71,167,134,129, 13,102,110,218,113, 80,205,229,220, 6,162,182,194,198,166, 49,214, + 44,159,239,248,126,143, 94,139, 1,188,103,142,166, 70, 97,108,219,172,205,199, 48, 26,114, 12,198,252,236,124,109,122,136, 65, +200, 75, 50,112, 82, 78, 18, 80,167,102, 82, 98,226,153,118,230,228,145, 70,163,233, 25, 20, 20,100,177,117,235, 86,248,251,251, +195,198,198, 6,167, 79,159,198,221,187,119,145,154,154,202, 81, 74, 97, 97, 97,129,121,243,230,193,195,195, 3, 89, 89, 89,136, +140,140,180,149, 74,165,118,111, 74,167, 66, 34, 25,184,112,254,124, 53,199, 1, 16, 77, 0,253,239, 43, 46, 33, 9,185,185, 90, +216, 88,200,224, 96,167,122,177,220,100,212,243, 13, 58,126, 51, 28,192,225, 55,237,251,221, 80,250,176, 86, 21,114, 25,212,228, + 67, 5, 45, 64,113,249, 65, 56,125, 97,122,234,120,147,154,254,205, 63, 25,198,243, 88, 83, 90,249, 44, 9,223, 42,232, 24, 80, +195, 66,163, 50, 62, 68,204,153, 81, 8, 21, 20,212,169,246,167,232,211,239, 75,245,154,159,215,116, 34,132,140,166,197, 30,194, +249,103, 12, 47,102,154, 76,243,159,160,217,171, 87, 47, 30, 0,118,238,220, 41,252, 29,211, 41,145, 72, 12, 63,253,244,147,227, +240,225,195,143,153,107,178, 74,189, 30, 21, 60,191,235, 41, 0,179, 77,214,171,154,161,161,161,115,231,206,157,139,223,126,251, + 13, 0,176,109,219, 54, 84,171, 86,173,196,109,239,222,189,171,153, 52,105,210, 92, 0, 63,190, 73,243,254,253,251, 85,230,204, +153,131, 95,127, 45,120, 50,217,150, 45, 91, 80,163, 70,141, 18, 53,111,223,190,205, 79,158, 60,185, 10,128,248, 63, 59,143,254, +177, 6,139, 16, 66, 41,165,164,148,245,159, 59, 91, 74,235,194,104, 4,128,231,101,253,177,144, 80,186,184, 78, 85, 73,187,238, +237, 71, 55,173, 86, 25,152,187,122,117,116, 70,150,174, 21,207, 65, 4, 0, 65, 4,103,105, 33, 61,179,120, 92, 35,143,244, 44, + 61, 14,156,139,189, 24,242,156,150, 41, 20,122,239, 41, 61, 13,192,229,197, 5,214,147, 84, 29, 52,237,252,166,237,115, 90,250, +141,233, 87, 11,123,207, 70,140, 68, 41,225, 12, 11,181,140, 39, 9,187,144, 46,220, 69,195,134, 93,113,253,122,184,247,157,171, +123,127,217,177, 99,179, 48,168,207,135,124, 53,255,158,200, 75,125,132,200, 43,115,144, 29,121, 18, 86,106,137,212,220,244, 57, +216,144, 58, 42,149,234,203,138,206,149,186,140,159, 56, 94,210,165, 75,111, 37,151,123, 31, 52,126, 39, 68, 67, 14,196,220,104, +216, 89, 4,130, 16, 56,153,125,151, 36,231,109, 44, 44,108, 12,177, 15,182, 61, 50,228, 60, 55, 64,155, 32,208,188, 56, 66,228, + 82,234,238,232, 12,158, 51, 89,155,163,163, 82,169,170, 36, 37, 37, 33, 59, 59, 27,214,214,214, 88,178,100, 9, 28, 29, 29,161, +213,106,241,248,241, 99,234,238,238, 78,206,156, 57, 3, 55, 55, 55,164,167,167, 67,175,215, 35, 47, 47, 47, 81,175,215,191,177, +210,208, 25, 76,171,191, 30,247,117,179, 74,238, 78,124, 81, 4, 75, 20, 69,212,173,229,137,214,205, 27,225,196,131, 27,216,123, +247, 25, 68, 42,162,232,251,136,152,148, 92,131, 40,108, 49,187,242, 20, 77,128,160, 45,209,128,149, 39,202, 84,187, 54, 81, 11, + 57,152,208,208,215,114,208,196, 1, 21, 45, 44, 20, 28,116, 74, 1, 58,189, 17,217,143, 86,161,130, 71, 29,168,149, 74, 82,191, +190, 86, 2,192,200,170, 18, 6,227,143, 52,104,208, 32, 64,173, 86,127, 5,160, 69,126,126,190,165, 40,138,104,214,172, 89, 54, +199,113,231,242,242,242,150,222,188,121,179,188,125,101,138,174, 85,244, 93,166,183, 82,165, 74, 40,171,201, 42,141,184,184, 56, +173,171,171,107,153, 76, 86,113,146,147,147,121, 31, 31, 31,104,181, 90,136,162,136,220,220, 92,236,221,187, 23, 89, 89, 89, 16, + 69, 17, 42,149, 10, 75, 79,230, 35,247,193, 86,108, 93,187, 16,201,201,201,188, 25,154,164, 70,141, 26,208,233,116, 48,153, 76, +200,207,207,199,241,227,199,145,159,159, 15,163,209, 8,169, 84,138, 57,251, 50,144,127,127, 43, 54,252,252, 3,146,147,147,201, +159, 93, 86,204,244, 32,255,127, 6,171,104,199,254, 23, 59, 72, 33, 76, 95,181,229,228,153,217, 95,189,135, 79, 63,172,231,177, +104,227,229, 86, 15,158,211,109, 0, 80,211,147,244, 27,216,185,170,135,141,133, 28,223,173,189, 5, 16, 58,253,109,127,239,238, +115,250,172,118, 53,242,237,238, 51, 81,199,166,126, 86, 7, 94,110,150,222,222,222, 68, 30, 26, 74,245,165,165,116,196,148, 21, + 48, 25,151, 26,199, 13,255, 64,218,176,213, 32,212, 13, 58,202,167,133, 31,197,205,221,159, 98,195,158, 43,121, 82, 9,148, 3, +155, 75,205,158, 13,223,222,154,212,111,212,168,241,177, 53,107,215, 41,157, 92,189, 9, 49, 38, 3, 89,231, 96, 74, 56,142,124, +109, 10,244,218,108, 24, 68, 75,100, 70,157,134, 66, 78,205, 62,177,141,122, 49, 53, 35, 37, 76,197,139, 25,164, 70, 77,187,166, + 72, 63, 13,216,246, 66,196,237, 75, 55,194,147,226, 44, 5, 81,146,102,142, 78, 78, 78,206,115,163,209, 88, 1,128,195,169, 83, +167,224,224,224,128,236,236,108, 24, 12, 6,104,181, 90,163,173,173,173, 60, 53, 53, 21,249,249,249,200,207,207,135,149,149, 21, +110,222,188,153, 99, 50,153,222,248, 12,193, 71,207,233, 97,127, 87,226,116, 90, 14,139,162,101, 60,143, 10, 38,131,254, 70,235, + 38,181, 17,124,231, 49,118, 30,188, 22, 32, 8, 72, 45,250, 62,151, 34, 43, 34,130,230,155, 95,176, 76,160,194,127,199, 49, 20, +117,126, 47, 79,231,118, 95, 79,210, 64,161,144, 46,154, 55,169,115,141, 22,190,130,130,232,226, 65, 0,168,149, 18,228,235, 5, + 88,187,120,131,234,179,169, 86,167,203,188,127, 31, 38, 48, 24,140, 63, 68,171,146,146,146,150,219,218,218,126, 56,112,224, 64, + 85,139, 22, 45, 56,142,227,176,100,201, 18, 36, 36, 36, 88,181,111,223,190,203,230,205,155, 91, 55,111,222,124,151,163,163,227, + 40,115,162, 90,197,174, 89, 82, 0, 69, 38,130,134,133,133,153, 58,116,232,128,176,176, 48,174,208,120,137, 0, 12,229,237, 31, +249,119, 52, 89,241,241,241, 72, 78, 78, 70,187,174, 93,177,116,222, 60, 52,111,222, 28,109,219,182, 5, 0,156, 60,121, 18, 13, + 45,174,193,174, 75,115, 60,124,104,126, 85, 23, 29, 29,141,212,212, 84,116,234,214, 13, 63,175, 90,133,250,245,235,163,122,245, +234, 0,128, 51,103,206,160,181,243, 51, 88, 84,109,141, 71,143, 30,253,233,229,229,127,233, 65,254,146, 8,214,255,138,123,207, +232,117, 95, 79,114,100, 96,231,154, 29,123,183,247,198,150,253,183,167,251,250,146,223, 11, 12,136, 98,250,160, 46, 85, 17, 18, +150,142, 83,215,226,142,132, 60,167,215,223,197,111,154, 76,240,112,172, 96, 1, 16, 41,114,243,141, 38, 43, 43,152,125,226,221, +139, 72,169,250,209,232,159,134,124,245,209,149, 73,163,251,249, 97,235,142,219, 88,252,219,163,111, 12, 6,108,250,176,153, 93, + 20, 96,126, 95, 52, 75,181,234,243, 53,107,215, 41,157, 43,200, 8, 34,151, 66,208,198, 64,208,165,194,144,159,129,172,204, 12, +196,196,167, 32, 61, 79,130,200, 68,162,141, 77,208,111, 53, 87, 55, 51, 79,178,255,192,239, 11, 6,245,252,112, 96,133,167,215, +215, 94,221,119, 90,235,208,167,221,145, 92,185,166,146,205,185,235, 39,109, 51,181,146, 95,204,209,209,233,116,187,142, 28, 57, +210,187, 82,165, 74, 14,247,238,221,131, 78,167,131, 40,138,232,216,177, 35, 80,236, 1,152,143, 30, 61,210,105,181,218,164, 7, + 15, 30,228, 68, 69, 69,229, 1, 88, 94,154,118, 97,135,245, 23,149, 74,205, 42,164,151,175,143, 11, 32,104, 81,179,170, 51,140, + 2, 90, 61, 12,167, 43,202,239,220,141, 5, 17, 44,130,160, 90, 85,200,114, 16, 4,221, 60,189,196,167, 65,235, 49, 40, 75, 4, +203,215,155,188,231,231,227,186,102,201,156,137,182,118, 14, 30, 60, 4, 45,136, 41,139,138,105, 87, 33,201,125, 10, 43,247,206, + 16,172,131,176,230,199, 69,185,130, 64,119, 22,111, 30,100, 48, 24, 47, 12,197, 20, 31, 31,159,158, 43, 86,172, 80,223,185,115, + 7,185,185,185,184,118,237, 26, 22, 44, 88,128, 15, 63,252, 16,238,238,238,220,222,189,123, 53, 35, 71,142,236,249,228,201,147, +100, 0,223,149,114, 1,182,175, 80,161,130, 77, 74, 74, 74, 28, 0, 89,161,201, 34, 17, 17, 17, 56,115,230, 12, 87,183,110, 93, +154,148,148,100, 26, 61,122,180, 77, 78, 78, 78,157,101,203,150, 93, 4,144,248, 79,137,100,237,218,181, 11,183,111,223,198,244, +186,117, 49,198,197, 5, 21, 42, 84,192,185,115,231, 64, 41,133, 70,163, 65, 90, 90, 26,126,253,245, 87,180,108,217,210,236,244, +236,223,191, 31, 55,110,220,192,204,122,245, 48, 82,169,132,181,181, 53,206,156, 41, 24,176,175, 80, 40, 16, 19, 19,131,211,167, + 79,163,121,243,230,172, 64,151, 19,179,163, 47, 45, 9,145, 16, 2, 39,163, 81, 11,131,137,130, 16,184,248,250, 18, 89,185, 92, + 29,135, 25,203,182, 94,166, 42,169, 9,131,223,175,230, 10, 45,134, 64,139, 33,159,118,243,113, 85, 43, 36, 88,182, 35,132, 74, + 56,204,120, 23, 59, 88,187, 10,169,102,103,169,152,214,181,101,117, 68, 36,230, 35, 60, 54,231, 88,112,176,249,243, 54, 61,127, +142,244,152, 56, 44,205,209,155,192,243, 18,100,106, 41, 98, 98,240, 75, 82, 18,242,203,154, 22, 94, 66,222,115,114,245, 38, 52, +113, 47,242, 51, 30, 35, 55, 35, 6,169,169, 49,200,206, 76, 69,110, 94, 54,178,179,243, 16, 31, 27,135,163, 87,226,210, 77, 58, +225,162,185,186,191, 29,207,155,116,235,214,197,199,215,175, 30,215, 88, 57,212,177,245,173,172, 16, 53,150,174,150,231,174,133, + 88,199, 37,233, 30,253,118, 52,207,220, 99,185,124,215,174, 93,233,183,110,221,122,228,238,238, 30,101,109,109, 77, 9, 33,136, +143,143,127,233,117,243,230, 77,197,209,163, 71,243,162,162,162,246, 1,232, 82,214, 41, 26,234,120,147,154,173, 27, 87,251,190, + 83, 75, 63, 64,208,162, 75,203,154,104, 30, 80,229,251, 58,222,164,102,185,253, 21, 45,104, 34,188,188,173,181,207,229,173, 77, + 63,189,180,169,161,143, 62,118, 75,153,117,136,136,145, 99,122, 87,182,178, 83,233, 57, 34,228,128, 72,173, 1,181, 55,225,220, +251, 17,105,253, 77, 36, 42,175,146,208,179, 95,159,228,159,183, 28, 92,109, 47, 98, 41,171, 66, 24,140, 18, 46, 44, 28,247,105, +255,254,253,213, 42,149, 10, 74,165, 18,155, 55,111,198,231,159,127, 14,133,162, 96,204,146, 90,173,134, 74,165, 66,255,254,253, +213,132,144,193,102, 72,166,101,101,101, 89,244,232,209,195, 3,128, 26,128, 70,175,215, 91,164,164,164, 88,113, 28,103, 93,171, + 86, 45,199,233,211,167,251,228,228,228,212, 57,112,224, 64, 18,128,148,242,164, 59, 51, 51, 19, 97, 97, 97, 56,124,248, 48,134, + 13, 27,150,107, 50,153,228, 22, 22, 22,227,223, 50, 58, 35,117,114,114, 82,187,186,186, 86,160,148, 86,167,148,114,148,210,138, +229,209, 18, 4, 1, 13, 26, 52,192,201,243, 55,176,102,231, 37, 44,250,113, 19,162,162,162, 80,163, 70, 13,136, 98,249, 7, 52, + 7, 4, 4,224,244,233, 11,216,186,239, 58, 22, 44, 89,141,152,152,152,215,246,201, 98,148, 49,130, 85, 90,104,206,183, 10,169, +237,228,167, 88, 55,249,125,175, 26,146, 90, 51, 64, 36, 42,236,222,112,160,241,196,185, 63,221,170,227, 78, 62,189, 27, 67,203, +212,142,126, 55,148, 62,172,229, 73,118, 94,191, 31,243,209, 71,237, 60,177,229,112,232, 4, 0,248,168,157, 39,174,135, 36,227, +218,253,164,157, 15,158,151,111,206,162, 34,106,120, 18,111,142, 98, 80,245, 42, 14, 67,150, 78,237,170,113,170,160,194,247,171, + 79, 67, 4,182,154, 95,152, 1, 0,238, 0, 50,255, 27,167, 32, 69,209, 28, 27, 65, 68,153, 66,153, 28,161,199, 19, 34,239,244, +174,192,217,145,156,172, 20, 36,196, 69, 35, 59, 43, 7, 54, 86, 82, 88,171,121,184,186, 56, 66,109,237, 14, 81,146,108,243,248, +121, 78, 32, 0,179, 39,222,204, 50,202,190,184,116,233,196,197, 38,117,135,234,106, 86,145,154, 36, 82, 94,121, 35, 36, 66,145, +173,149,141, 52, 87,131, 82,106, 34,132,116,185,112,225,194,168,203,151, 47,247,112,113,113, 33, 3, 7, 14, 68,135, 14, 29,160, + 80, 40,160,213,106,145,158,158,142, 67,135, 14, 17,147,201, 20, 4, 0, 46, 46, 46, 21, 43, 87,174,188,129, 16, 18, 27, 30, 30, + 62,208,156,223,145,203,229,139,166,141,234, 36, 53, 25,114,240,221,242, 67,152, 54,162, 45,166,143,104, 41,237, 50, 44,118, 17, +128,246,229,202,112,209, 4, 81,208, 33,104,192,249,130, 81,132, 4, 65, 55,142,205,242, 1,110,155, 45,225,239, 79,164,188,132, + 84,175,233,150, 47, 21, 98,119,128, 40,221, 40, 95,161, 5, 96,225, 67,168,133, 31, 86, 46,155,150,187,110,221,186,147,148,195, +156,255,176,119,222,225, 81, 84,109, 27,191,207,204,108, 79, 15,233,133, 64, 40,161, 24, 8,217, 20,170, 4,233, 72, 17, 4, 21, + 17, 21,164,169, 32, 69, 5,108, 8, 40, 96,161, 88, 0, 65, 80, 81,138,244, 46, 16,164,183,144, 2, 4, 66, 2, 4, 72,239, 61, +217,100,235,204,249,254, 72, 54, 95,192,148, 77,192, 87, 95,222,249, 93,215, 94,187,179, 59,123,207,153,153, 51,115,238,121, 78, +139, 75,162,241,226,237, 67, 68,164,118, 52, 26,205,212, 69,139, 22,109,106,221,186,181,210,223,223, 31,107,214,172,193,144, 33, + 67,170,205, 85,167, 78,157,144,154,154,138,133, 11, 23,106,203,203,203,167, 89,112,111, 18, 8, 33, 55, 79,158, 60,217,126,232, +208,161,238, 79, 63,253, 52,233,208,161,131, 68, 46,151, 11, 58,157,206, 42, 51, 51, 83, 30, 31, 31,143,168,168,168,187, 90,173, + 54,150, 82,202, 55, 37,221, 11, 23, 46,212, 56, 57, 57, 89,205,156, 57, 19, 95,126,249,101,250,153, 51,103, 2, 31,245, 88,184, +187,187,183,100, 24, 70, 72, 79, 79,191,239,233,233,233,158,150,150,214,164,198,225,230, 96,249,181,107,215,112,246,142, 0,153, +149, 3,146,226, 75,112,124,255, 62,140,155, 60, 5, 38, 83,211, 91, 43, 92,185,114, 5, 91,142,197,195,173,101,123,104,227,175, + 96,215,174, 93,152, 54,109,218, 35,105, 54,114,223,200, 19,219, 6,203,188,131, 15,255,216,186, 53,145,201,116,248, 96, 96, 55, +207, 89,163,251,182,102, 77,229,153, 16, 4, 1, 44, 0, 39, 27, 6, 63,173, 95,215,114,199,158, 63, 78,118,106,206,174,129, 94, + 88, 24,155, 77,203, 45,118,245, 28, 62,251,118,235,141, 81, 91,150, 60,195, 77, 27,211,222, 1, 0,164, 18, 6,223,110,189, 97, + 34, 28, 62,107,100,148,170, 39, 39, 97,182, 24, 41, 85, 82,158,166,120,184,217, 89, 61,215,175,179,231,136,254,129, 8,236,224, + 5,222,164,195,130,213,135,177,251,232,205,213,241,247,235,239,246,255,128, 73,107,105,143, 72,143,236,119, 25, 14,159,145, 26, +246,202,213, 21, 82, 41,135,153,109,189, 21, 50, 52,162, 9, 78,105,121,197,218,249,115,103,246,251,240,237,225,142,134, 82, 21, +185,157, 84, 8,240, 90, 88, 41,173, 97,237,214, 11,246,182,109,160, 45,201,132,148,139, 86,185, 58,165,141,105,140,193,218,115, +184,244,206,219,227,219,177,159,126, 23,233,164, 47, 7, 53, 25,162,153,114, 45,161,187,194, 75, 18, 27,153,209,141, 94, 94, 94, + 83, 4, 65,112, 54,153, 76, 6,103,103,103,233,246,237,219,161, 80, 40,192, 48, 12, 2, 2, 2,160, 80, 40,244, 30, 30, 30,197, + 0,224,226,226, 98, 92,177, 98, 5, 55,113,226, 68,139,162,153, 29,125,137,247,200, 1, 79,245,104,102,203, 98,211,158, 11,216, +119,252,230,190,150,158, 86, 35, 38,140,120, 10, 97, 33,158, 61, 58,250, 18,239,184,123, 52,181,241, 87,168, 17, 53,123, 17,118, +110, 77, 58, 4, 15,248,168,214,222,131,117,209, 50, 6,194,173, 86, 20,132,176,160, 32,128, 54, 29,166,180,205, 96,125,167,211, + 61,123, 63,171,248,113,253,134,165,113, 73,141,235,116, 33, 34,242,191,200,213,171, 87,255, 8, 9, 9,153, 55,126,252,248,101, +227,199,143,151,189,246,218,107,236,165, 75,151, 32, 8, 2,130,130,130,176, 97,195, 6,211,182,109,219,140, 58,157,110,238,213, +171, 87,255,176,240,222,164, 35,132, 92, 61,116,232,144,227,205,155, 55, 29, 37, 18,137,147, 32, 8,246,229,229,229,121,122,189, + 62,191,176,176, 48, 7, 64, 97, 83,171,237,181, 90,173,226,230,205,155, 17, 6,131,193, 99,230,204,153,237,250,245,235,231,167, + 86,171, 67,162,163,163,155,220, 84,133, 97, 24,169, 32, 8, 21,148, 82,165,121, 51,206,206,206, 86,185,185,185,154,166,232,177, + 44,139,194,194, 66,148,166, 39,162, 60, 47, 15,237,216,114,116,113,116,134,141,141, 13,140,198,166,247,181, 41, 43, 43,131,220, +148,134,251,145,247,145,151,151,132, 54, 45,187,192,202,202, 10, 58,157,238, 63,150,103,158, 52,115,245,128,193,250, 75, 65,216, +156, 76,114,144,226,203,215,198,248, 74,125, 91,120, 66,159, 27,133, 43,137, 26,124,180, 49, 36,158,149,218,232,222,126,181,127, +151, 62,253,156,209, 59, 44,152,180,240,249,232,173,101,203,214, 78,233,232, 77, 62,136, 75,165,171, 45,217,240,245,219,244,126, +135,150,228,151,147, 81,153,111,120, 57, 85,128,130,226,100, 84, 38,174,221, 41,252,229,230,125,122,191, 81,153, 78,202,252, 26, + 19, 29,235, 8, 83, 5,178,238,236,247,115,115,245, 1, 4, 3,140,250, 10, 92,136,185,129, 13,219,207,152,162,175,167,190,127, + 51,137, 90, 84,216,222, 73, 41, 58,158,152, 86,220,111,209,212, 16, 12,238,209,252,181,165, 27,163, 95,170,238,172, 66, 41, 6, + 5,217,223, 28,215,199, 70,165,228,244, 48, 65,134,232,219,197,225,150,232,102,230,209, 24,119, 39, 50,234,218,181,171,175,123, +186,217,245, 27, 28,172,116,114,182,133,212,198,169, 5,100, 86,142, 16, 76,101, 40, 47,184, 5,202,107, 65, 32,248, 54,230, 24, +120,123,123,247,156, 57,115,166, 98,202,148, 41, 40, 43, 43,195,166, 77,155,176,102,205, 26,120,123,123,247, 76, 77, 77, 61,215, + 24, 45, 65, 16,156, 15, 28, 56, 0, 84,182,117,192,159,127,254, 9, 15, 15, 15,216,217,217,161,180,180, 20,227,199,143,151,125, +252,241,199, 0,128,152,152, 24,137, 82,169,108,196, 69,132, 49,131,122,248, 18,240, 21,216,121,228, 70, 62, 20,120,125,119,120, + 66,143, 9,195,124,155, 13,238,234, 78, 14,157,190, 63, 6,192,215,141,191, 56,121, 64,168,120, 32, 74,138, 70,246, 30,220, 65, + 41,223,209,151,220,221, 22,158,107, 53,122, 72,160, 82, 42, 97, 8,213,166, 65, 32, 82,178,106,205, 79,101, 86, 28,126,130,136, +136,136, 69, 92,190,124,121, 99,215,174, 93, 47,254,252,243,207,115, 24,134,233,161,211,233,156, 1, 8,199,142, 29,203,226,121, +254,108, 69, 69,197,183, 81, 81, 81,183, 27, 89, 8, 83, 0,249, 85,175,219,143, 51,189, 28,199,253, 94, 82, 82,178,152,231,249, +209, 71,143, 30, 93, 62,114,228, 72,236,223,191,127, 2,106, 31, 41,220,210,123,105, 73,102,102,230,125, 47, 47, 47, 39, 31, 31, + 31, 39,141, 70,147, 45,151,203,221, 0, 36, 54, 69, 79, 46,151,227,236,217,179, 24,220,179, 23,174, 30, 79, 70,123, 87,111,244, + 25,247, 42,246,158, 60, 9,150,101,155,186,223, 56,123,246, 44, 70, 13,233,131,221,187,119,163,101,160, 63,222,126,251,109, 28, + 59,118, 12, 28, 39,206,166,247,183, 24, 44, 34,224,227,240,223,151, 72, 33, 24,177,115,203,151, 56, 30, 89,174,143, 79,195,167, +237,210,177,122, 39, 74,133,236,252, 93,111,132,158,190,251,249,132,215,134,170,158,233,221, 31,207, 60,221,135,123, 42,160,247, + 60,212, 24,127,131, 16,226, 95,223, 88, 25, 84,192,178, 31,119,197, 79,220,118,248, 22,129,169, 20, 47, 13, 15,166, 84,192,178, +122, 35, 95,117,105,154, 42,128,226, 8, 28, 12,143,128,155,107, 58,110,223, 75,193,222, 35,209,169,197,165,229,191, 17,130,205, + 55,147,234,142,138, 60,172,153, 95,170,127,107,208,244,131,223,191,208,191, 85,255, 89, 99, 59, 99,223,138,103,101,247, 50,138, +193,243, 38,244,239, 76, 65,218,203, 84, 2,120, 92, 72,228,232,143, 7,211,247,150,233,249, 89,150,166, 51, 51,143, 70, 3,136, +246,117, 32,182, 55,238, 96,240,200, 94, 46,159,119, 13,228, 93,202,178,163,145,153,114, 7, 69, 21, 10,164,229, 19,128,226,174, +197,251, 14, 32, 53, 53,245, 92,112,112, 48, 0,160,162,162, 2,105,105,105, 48,153, 76,200,200,200, 56,215,216,227,201, 48, 76, +238,144, 33, 67,156,117, 58,157,105,236,216,177, 92, 94, 94, 30,252,252,252, 42,163,112,165,165,248,227,143, 63,170,123,155,220, +184,113, 3, 29, 59,118,180, 56,157,206,246,202,113, 65, 29, 29,113,227, 86, 10,146, 51, 74,182,198,221,163,134,142,190,100,235, +181,132,236, 25,221,187,184,192,209, 86, 54,174, 54,131, 85,151,102,231,214,164, 3, 8,186, 67, 48, 86,246, 34, 36,232,222,185, + 53,233, 96, 73,207,193,218, 52, 57, 14, 19,150,255,158, 52,119,199,233,220,161,239,191,209,203,166, 71,183,193, 50, 8, 70, 90, + 86,174, 51,222,184, 71, 75,155,162,249,168,136,154,162,230,127,171,230,165, 75,151, 18, 0,188,241,223,176,239, 39, 78,156,152, + 9, 0,106,181,122,219,238,221,187,151,108,218,180, 73,102,109,109, 29,252, 40,154, 25, 25, 25,183,170,214,203,245,240,240,232, +144,159,159,127,221,203,203, 75,214, 24, 77,137, 68,146,219,185,115,103,231,231,158,123, 14, 38,147, 9,119,238,220, 65,114,114, + 50,134, 77,120, 29, 14, 14, 14,136,136,139,195,157, 59,119,240,201, 39,159, 64,167,211,225,254,253,251,185, 13,105, 74,165, 82, +131,191,191,191,116,248,240,225, 48,153, 76, 72, 76, 76, 68,106,106, 42,166, 79,159, 14, 59, 59, 59, 36, 36, 36, 32, 49, 49, 17, + 31,127,252, 49,116, 58, 29,146,147,147, 13,255,137,115,244, 63, 99,176, 40, 1, 15,193,136,226,200, 5,248,225, 32, 12, 70, 30, +129, 55,210,104, 82,141, 85,126,236,226, 77, 14, 95,187, 30, 31, 23, 29,241,140, 12, 37,177,160, 64,163,234,189,227,147,105, 86, +112,123,174, 12,166, 82, 27,228,254,129,123, 25,165,154,248, 38, 76, 59,195, 27,132,241, 93, 66,186,110, 21, 64,165, 2, 79,119, +152,128, 19, 28,197,189, 27,247, 17,215,148,112,113, 90, 26,205, 0,240, 92, 11, 47,242,244,129,179, 73,203, 38, 14,107,239, 63, +109,244, 83, 40,215,148, 66, 66,181,184,158, 37,195,247,251,179, 35,243, 75,245,239,165,166,210,232,166, 28,248,123,133,180, 4, +192,182,246, 45, 56, 90, 90,113,227,195, 81,125,124, 90, 18, 56, 33, 59,183, 24,187, 78,102, 94,202, 40,168,191, 87, 77, 29, 17, + 44, 76,157, 58, 21,165,165,165,216,182,109, 27,142, 30, 61,218,164, 8, 86, 90, 90, 90, 27, 0,240,240,240,200,182,177,177,225, + 94,127,253,117,243, 80, 13, 40, 41, 41, 65,126,126,190,126,230,204,153, 50, 0,144,201,100,198, 65,131, 6, 89,252,152,211,198, +199,206,147,131, 14,123,255,188, 5,112,248,189, 42, 23,254,190,239, 84,242,140,206,109, 29,209,166,185,109, 43,181, 7, 81, 90, + 50, 77, 14, 80, 57, 85, 78,228,145,133,126,218,219, 31,131, 82, 35,206,174,113,240,235, 53,173,112, 10,154, 56,194,250,181,219, + 52, 3,192,140,142, 45,201,198,119, 62, 63, 50, 47,200, 63,174,251,187, 83, 71,216, 80, 34, 78,140, 46, 34,242,191, 64,116,116, +116, 73, 64, 64,192,235,207, 60,243,204,172,178,178,178, 21,143, 67,147, 82,106,114,115,115,203,116,115,115,243, 51, 24, 12,141, +154,203,212, 96, 48, 76,255,254,251,239,191, 51, 26,141,206,230,239,116, 58, 29,182,108,217, 2,131,193, 0,169, 84, 10,149, 74, +133,196,196, 68,176, 44,155,107, 50,153, 26,108,119, 43, 8,194,221,213,171, 87,183, 50, 24, 12,213, 77, 59, 76, 38, 19, 54,111, +222, 12,157, 78, 7,185, 92, 14,107,107,107,220,185,115, 7, 82,169,212, 32, 8,194, 93, 49,103, 52,193,212,215,229, 63, 58, 54, + 39,147, 64,241, 1, 40, 8, 24,124, 94,215,196,206,213,235, 1,120,120, 2,104, 75, 28,110, 39, 63,210, 71,198,178,155, 0, 64, + 43,240, 19,111, 36,208,240,127,211,147, 13, 33,132,248,120, 97,140,187,147,213,183,239,142, 11,176,250,242,183,171,154,204, 2, +205,196,148, 20,122,232,113,165,179,185, 43,105,233,233,128,121,114, 25,236, 77, 38,196, 37,229, 98,115,106, 14,189,215, 88, 77, + 15, 15,143,114, 31, 31, 31, 56, 58, 58,162,160,160, 0,201,201,201,200,200,200, 80, 53, 53,157,158,158,158, 93, 9, 33,123, 4, + 65, 80, 60, 28,225, 50,155, 48,119,119,247,230, 50,153,236,129, 70,238,245,105, 62,213,154, 44,241,111,237, 48,245,198,221,226, +205,215,239,240,213, 38,168, 99, 75,178, 40,176,131,211,155,177,119, 10,126,188,118,155,159,223,152, 8,214,195,147, 61, 91, 58, +246,149, 69,249,211,151, 60, 35, 80,188, 3,130,204, 27,247,232, 84, 49,146, 33,106,138,154,162,166,168, 41, 70,176, 44,117,214, +127,219, 11,128,255,147,162, 9,128,107,209, 2,109, 1,200,254,229,233,252, 16, 64, 57,128, 15,255,173,233, 12, 12,132,228,127, + 57, 47,137,154,162,166,168, 41,106,138,154, 79,254, 75,172,246,104, 68,136, 23,143,185, 81,229,223,148,206,207, 1,124,254,239, + 14,193, 83,113,106, 25, 17, 17, 17, 17,145, 39, 26, 70, 60, 4, 34, 34, 34, 34, 34, 34, 34, 34,143, 23, 2,192,191,182, 31, 26, + 83,183, 74, 8,241,111,236,134, 27,210, 23, 53, 69, 77, 81, 83,212, 20, 53, 69, 77, 81,243,201,211,108, 72,251, 73,105,219, 69, +254,206,169,212,196, 6,128,162,166,168, 41,106,138,154,162,166,168, 41,106,254, 47, 34, 86, 17,138,136,136,136,136,136,136,136, +136, 6, 75, 68, 68, 68, 68, 68, 68, 68, 68, 52, 88, 34, 34, 34, 34, 34, 34, 34, 34,162,193, 18, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 13,150,136,136,136,136,136,136,136,200,191,134,191,181, 23,161,136,136,136,136,136,136,136,200,255, 34, 12, 0, 16, 66,104, +213,171,183,120, 72, 68, 68, 68, 68, 68, 68, 68,254, 83, 60,169, 30,164,122,170, 28, 74, 41, 33,132, 80, 84, 14, 62, 42, 34, 34, + 34, 34, 34, 34, 34,242, 31,225, 73,244, 32, 76, 77, 7, 9, 32, 76, 60,205, 34, 34, 34, 34, 34, 34, 34,255, 73,158, 68, 15,242, + 64, 4, 75, 60,197, 34, 34, 34, 34, 34, 34, 34,255,105,158, 68, 15, 34,246, 34, 20, 17, 17, 17, 17, 17, 17, 17,121,204,136,189, + 8, 69, 68, 68, 68, 68, 68, 68, 68, 30, 51, 98, 4, 75, 68, 68, 68, 68, 68, 68, 68,228,191,201, 96, 17, 66,252, 69, 77, 81, 83, +212, 20, 53, 69, 77, 81, 83,212, 20, 53, 69,131, 37, 34, 34, 34, 34, 34, 34, 34, 34, 34, 26, 44, 17, 17, 17, 17, 17, 17, 17, 17, +209, 96,137,136,136,136,136,136,136,136,136, 6, 75, 68, 68, 68, 68, 68, 68, 68, 68, 68, 52, 88, 34, 34, 34, 34, 34, 34, 34, 34, +255, 16, 4, 64,173, 61, 1, 40,165,215, 45, 22,105, 66,111,130,134,244, 69, 77, 81, 83,212, 20, 53, 69, 77, 81, 83,212,124,242, + 52, 27,210,110,140,255,248, 87, 27,172,191,115,160, 81, 66,136,255,227, 62, 80,162,166,168, 41,106,138,154,162,166,168, 41,106, + 62,121,154, 79, 26, 98, 21,161,136,136,136,136,136,136,136,200, 99,134,251,167, 54, 76, 8, 97,106, 24, 60, 1, 0,165,143, 24, + 78,251, 59, 52,255,173, 16,128,233,176,112, 33, 39,207,204,108,212, 57,212,185,187,155,110, 46, 88, 96,162,149,199, 71, 68,228, +191,142, 59,197,103,171, 63,183,181,127,154, 84, 94, 14, 0, 0,122,187,232, 76,157,215,123, 27,187, 94,226,193, 19, 17,169,131, +168,168,168,114, 31, 31, 31,116,234,212,233,118, 86, 86,214, 90, 74,233,143,226, 81,249, 23, 25,172, 14,174,202, 16, 31, 47,167, + 65,135,163, 82, 62,173,111, 61,181, 90, 45, 25, 58,116,232,143, 0, 70,215,252,126,216,176, 97, 15,172, 39,145, 72,242, 11, 11, + 11,125, 79,157, 58,101,106,104,219,106,181, 90, 50,116,216,176,191,106, 14, 31,254, 23,205, 20, 71,199, 86, 49,235,214,153,106, +124, 73, 8, 64, 40, 64, 1,192,207,207,239, 28,195, 48,158,132,144,186,140, 92,245,103,134,169,244,115,130, 32,164,199,197,197, +245,108, 40,157, 30, 30, 30,253, 0,204,177,224,112, 46,207,200,200, 56, 94,223, 10,182,225,225,137,148, 82,123,150,101, 45, 58, + 63, 60,207, 67,122,227, 70, 17, 22, 44,104, 33,102,125,145,255,118,218,218, 63,205, 12, 27, 54,236, 25, 0,213,249,249,189, 87, +151,255,101, 61,150,101,117,123,247,238,221, 76, 41, 21, 31, 42, 68, 68,234, 32, 60, 60, 28,147, 39, 79, 70,108,108,108,219,195, +135, 15,175,242,240,240,152,146,153,153, 57,136, 82,154, 39, 30,157,127,216, 96,249,121,216,180,117,105,214,108,215,210,207, 22, + 1,192,167,245, 25, 33,119,119,247, 31,189,189,189, 7,173, 88,177, 2, 7, 15, 30, 68,203,150, 45, 33,149, 74,193,178, 44, 88, +150, 5,195, 48, 96, 89, 22, 51,103,206,180,175, 74,163,169, 33,115,229,238,238,254,163,151,183,247,160,229,203,151,227,240,225, +195,240,241,241,169, 85,115,214,172, 89,246, 0, 36, 0,248,106, 1,169,212,252, 20, 76,171, 76,147,103, 76, 76,140,179, 66,161, +168,124, 44,166, 20,130, 32, 60,240,162,148, 86,191,120,158, 71,175, 94, 22, 63, 29,207,137,143,143,239,169,209,104, 30,208, 48, +111,195,252,185, 74,175, 94,131,165,215,235,155, 69, 93, 62, 7, 98,184, 7,240, 5,160,140, 35, 32,243, 5, 24,121,173,235, 23, + 20, 20, 96,224,192,129,205,196,108, 47,242, 36,152,171,161, 67,135,246,109,211,166,141,199,146, 37, 75,144,152,152, 8, 63, 63, + 63,240, 60, 15, 65, 16, 30,120, 31, 63,126,188,108,244,232,209, 68, 60,106, 34, 34, 15,210,124,228,143,171, 40,111,156, 84,185, +100, 15, 96, 61, 74, 75, 75,241,198, 27,111, 96,223,190,125,237,186,118,237,186, 24,192, 84,241, 72,253,131, 6,171,173,151,210, + 67, 37,179, 58,176,238,135,239,137,177, 52,203,190,174,245, 8, 33,204,144, 33, 67,214,122,121,121,245, 95,177, 98,133,149, 84, + 42, 69,194,196,137, 40,210,106,161,255,242, 75,216, 59, 57,193,111,202, 20, 52, 51,153, 96,186,122,213,162,109,215,212, 92,190, +124,185,149, 84, 42, 69, 90, 90, 26,244,122, 61, 92, 92, 92,160, 84, 42, 33,147,201,170, 95, 22,106, 66,161, 80, 32, 60, 60, 28, + 28,199, 85,191, 88,150,173,117,217,213,213,181, 49,135,107,121,187,118,237, 58,221,185,115,199,166,160,160, 0, 93,187,118, 45, + 37,132,196,154,127,164,148,118,138,141,141,181,177, 84,140, 24,238, 65,147,242, 3,132,194, 93,128,253, 40,240,182, 47, 66, 11, +223, 90, 11, 26, 65, 16, 31,224, 69,158, 8,115, 69,134, 12, 25,210,167,117,235,214,238, 75,150, 44,145, 72, 36, 18, 92,185,114, + 5, 57, 57, 57,104,214,172, 25,148, 74, 37, 36, 18, 9, 88,150,133, 68, 34, 17, 15,152,136, 72, 29, 80,222, 56, 41, 32,168,123, +245,242,166,240,111,161,179, 11, 68,250,167,159, 98,213,170, 85,104,219,182,109,144,120,148,254, 65,131, 21,208,194,222, 78, 70, +165, 7, 54,174, 89, 33,131,161,204, 62, 33,242, 60,158, 26, 60,197,108, 22,174,215, 48, 45, 4, 0, 35,145, 72, 94,248,234,171, +175, 24,169, 84, 10, 0, 8,226,121,120, 24, 12, 40,238,216, 17, 74,123,123, 52, 55, 24, 0,131, 1,186,170,223,255,146, 33, 44, +208,100, 89, 22, 82,169, 20, 28,199, 65, 34,145, 64, 42,149,214,111,176, 52,154, 90,123, 66,152, 77, 84,120,120, 56,140, 70, 35, + 70,143, 30, 93,171,217,106, 40,157, 53,201,200,200, 56,238,225,225, 17, 43, 8, 66, 79, 65, 16, 64, 8,137,205,200,200, 24,104, +254,221,195,195,163, 95,231,206,157,231, 0, 88,110,145, 38, 95, 0,161, 96, 43,108,186,229,161,228,162, 19,136, 85, 63,240,240, +193,133,107,201, 56, 29,157,140,220,130, 18,248,251, 58,225,133,129,254,181, 26,172,191,163, 23,136,168, 41,106,254,205,154, 68, + 42,149,182, 88,178,100, 9, 49, 27, 40,115,132,218,108,172,204,159,205, 85,248,226,241, 20, 53, 69,205, 90, 46, 36, 86,242,227, +213,168, 11,147, 0,160,228,230,110,188, 51,182, 59, 74, 75,239, 96,234,212,143,145,158,158,142,219,183,111, 95,249, 79,166,243, +137, 53, 88,132, 16, 74, 41,109, 84, 24,221,203,139, 40,108, 76,170, 93,171, 87, 45,181,181,177, 81, 57, 69, 29,219,139,228,228, +172,122,255, 35, 8, 2,253,227,143, 63,112,107,210, 36,116, 49,153, 80,248,213, 87, 32, 30, 30,120,106,196, 8, 72, 13, 6,148, + 92,190, 12,169,181, 53,100,214,214,168,171, 13, 84, 93,154,105, 25, 25,224, 56, 14,214,214,214,176,178,178,130, 92, 46,175, 54, + 86, 82,169, 20, 82,169,212, 98, 77, 74, 41, 56,142,195,245,235,215,145,156,156, 12,123,123,123,156, 63,127, 30,253,250,245,123, +192, 92,177, 44, 11, 66,136,197,186, 53,245,121,158,175,213,128,161,129,170,193, 7,207, 96, 51,192,241, 21,148, 94,242, 0, 28, +198,193, 72,237, 33, 80, 1, 81, 9,217,248, 97,225, 43, 0,128,192,145, 11, 49,186,127, 71, 49,130, 37,242,196,192,243, 60,110, +221,186,133,155, 55,111,130,101, 89,216,218,218,194,202,202, 10, 18,137,164,250,197, 48,140, 24,193, 18, 17,169,135,148, 61,147, +102, 18, 66,150, 53,111,222,252,232,218, 37, 75, 90,247,235,215, 15, 0,112,252,248,113,252,252,242,203,248, 20, 24,251, 45, 33, + 89, 51, 40,253,228,239, 78, 75, 83, 60,200,127,133,193, 50,239, 88, 99,118,144, 16, 66, 90,187,218,254,182,240,195,183, 90,248, +248,182,114,141, 56,180, 29,247,238,165, 35, 59,187,176, 46, 67, 65, 9, 33, 2, 0,218,162, 69, 11, 20,106,181,240,208,235,193, +122,120,192,186, 89, 51,112, 85,145, 43,137,149, 21,164,214,214,144,214, 17,193,170, 79, 83,171,215, 67, 38,147,193,218,218, 26, +214,214,214,144,203,229,144,214, 48, 87,150,104,214, 48,109,224, 56, 14,215,174, 93, 67,207,158, 61,225,237,237,141,223,127,255, + 29, 3, 7, 14,252, 75, 20,171,177,230,170, 54,131, 85,163,241,123,131,141,219, 31, 64,214, 26, 38,155, 23,192,168,250,194, 64, +109,161,163,238,149, 85,130, 38, 1, 95,239,190,135, 91, 41,121,224,121,161,186,154, 80, 68,228, 9,128, 18, 66,104,251,246,237, + 73,126,126, 62, 36, 18, 73,181,185,106,215,174, 29,210,211,211,171,205,149, 57,162, 37, 34, 34, 82, 59, 44,203, 46,222,187,119, +111,107,133, 66,129,207, 63,255, 28, 54, 54, 54,184,180,120, 49,126,146, 74,161, 4,176,214, 96,152, 3,224,111, 53, 88, 77,241, + 32,255, 85, 17,172,198,226,233,233,185,180,107,207,174, 61,125, 59, 4,203, 35,142,236,198,157,219,201,200,203, 43, 6,165,168, +168,239,198, 8, 0, 18,137, 4,229,139, 22,161,176, 83, 39,248, 63,255, 60, 56,131, 1, 37,151, 46, 65,106,109, 13, 85, 96, 32, +136, 94, 15, 73,118,182,197, 55, 91,179,166,179,179, 51,164, 82, 41,228,114, 57, 20, 10, 69,101, 4,171,134,185,106,172,193, 42, + 41, 41,193,253,251,247, 49,121,242,100,168, 84, 42, 16, 66,144,147,147,131,230,205,155,131,101, 89,164,167,167,227,196,137, 19, +104,217,178, 37,100, 50, 89,163, 50, 69,141,198,237,157, 60, 60, 60,142, 82, 74, 59,197,196,196,216,168,213,106, 52, 42,130, 69, +164,208,193, 7, 60,188, 32,208,255, 55, 82,198, 26,102,138, 82,177, 13,150,200,147,195,237,162, 51,244,253,215, 86, 0, 0,156, +157,157,171,141, 84,171, 86,173, 30,136, 92,137,230, 74, 68,164, 97,218,182,109,219,197,211,211, 19, 51,103,206,132,118,235, 86, +148, 1, 24, 10, 96,175,193, 0, 0,176, 6,230,139, 71,233, 63,104,176,188,189,189,167, 6, 4, 4,188,254,227, 47,155,173,150, +125,252, 94,105,113,220,117, 70,167,213, 91,105,141, 70,253,189,140,130,181,245, 69,156,134, 15, 31, 14,150,101, 97,237,224, 0, +165,157, 29,164,230,200,149, 74, 5,169,181, 53,136, 94, 15,170,215, 67,106, 97,104,191,166,166, 66,161,128, 76, 38,171,213, 88, + 53,214, 96, 21, 21, 21, 97,251,246,237, 8, 9, 9,129, 74,165, 2,203,178,232,220,185, 51,226,226,226,224,235,235, 11, 0,216, +187,119, 47, 70,141, 26,133, 59,119,238,160, 67,135, 14, 86,141, 53, 88, 60,207, 35, 60, 60,220,134, 82,218,147, 82,138,220,220, +220, 38,157, 68,158,231, 81, 80, 80,128,125,251,246, 33, 59, 59, 27,206,206,206, 40, 41,181,131,185, 87,186, 32,252,127, 47, 72, + 17,145, 39, 5, 65, 16,160, 84, 42, 17, 29, 29,141, 23, 95,124, 17, 0, 96, 52, 26,225,228,228, 4, 95, 95, 95, 12, 26, 52, 8, + 3, 7, 14, 20, 15,148,136, 72,125, 15, 44,183,111, 71, 37, 39, 39,251,125,252,241,199,248,217,211, 19, 54, 54, 54,152,189, 96, + 65,132,201,100,122, 70, 60, 58,143,193, 96, 53, 38, 52,231,237,237, 61,220,205,205,109,241,230,205,155,149, 25, 25, 25,240,108, +235,111,115,112,231, 14,157,139,181,180, 34,189,176,104,242,181,180,210,189, 13,105, 48, 12,131,118,179,102,161,165,193,128,252, + 11, 23, 32,179,182,134,117,112, 48,136, 94, 15, 89, 82, 18,164,214,214, 96,149,202, 70,237, 8,195, 48,149, 85,130,102, 51, 85, +163,106,208,108,182,106,107,240, 90, 27, 6,131,193,174, 95,191,126,232,219,183, 47,158,127,254,249,234,170,192, 46, 93,186, 96, +219,182,109, 24, 57,114, 36,174, 94,189, 10, 15, 15, 15,180,107,215, 14,237,218,181,195,201,147, 39, 27,149, 94,243,176, 12, 3, + 6, 12, 40, 37,132,196, 82, 74, 59, 69, 70, 70,218, 52,229, 36, 10,130,128,125,251,246,225,165,151, 94, 66,219,182,109,113,233, +210, 37,204,253,248,115,216,185,248,192,196, 56, 3,160, 98, 21,161,200, 19, 7,207,243,117, 54,100, 55,223, 19, 68, 68, 68, 26, +188,142, 62, 30, 49, 98,132,250,243,207, 63,111, 55,123,246,108, 0,128,135,135, 71,168,135,135, 71,244,127,106, 28,172, 39,177, +122,176,218, 96, 89,178,131,189,123,247, 94,205,243,252, 48,149, 74,101,255,198, 27,111, 24,242,242,242,176,103,207, 30,252,244, +211, 79,229, 26, 35,115,165,184,128,127, 35, 49,189, 52,221, 82, 51,164, 48,153, 0,131, 1,210,170, 54, 87,208,233, 64, 13, 6, + 72,172,173,193,169, 84,141,222, 17,134, 97,106,141, 88,201,101, 50, 72,170,198,195,178, 20,153, 76, 86,124,238,220, 57,231,180, +180,180, 7, 26,180,183,108,217, 18, 0,112,249,242,101, 92,186,116, 9, 47,189,244, 18, 56,142,131, 84, 42,197,181,107,215,202, + 26,107,138,120,158,175,238, 69,232,225,225,209, 47, 36, 36,164,214,222,131,150,104,165,165,165,161,109,219,182,208,233,116,176, +177,177, 65, 94,230,125,220,189,125, 7, 37, 21,113,104,238,172, 66, 78, 78, 14,228,114,185,120, 55, 17,121,162, 96, 89, 22, 79, + 63,253, 52,242,242,242,224,228,228, 4,185, 92,142,226,226,226, 7,140,215,198,141, 27,197, 3, 37, 34, 82, 11,205, 71,254,184, +202,107,216,234, 73, 0, 48,231,155, 63,241,225,226,149, 24,247,252, 64,188,254,250,235,255,241,113,176,158,248, 54, 88,117,237, + 88, 88, 88,216, 56, 71, 71,199, 49, 19, 38, 76, 80, 94,190,124, 25,159,125,246, 25, 23, 30, 30,110,136,140,140, 52, 9,130, 48, + 63, 45, 45,195,226, 59, 24, 33, 4, 12,195,160,236,208, 33,148,186,185,193, 54, 40, 8,196, 96,168,140, 92,217,216, 64,227,233, + 9,232,116,176, 43, 46, 70, 99, 53,205, 67, 50,212, 28,150, 65, 82, 53, 92, 67, 83,110,220,181,141,123, 53,117,234, 84,252,248, +227,143,232,214,173, 27,218,180,105, 3,142,227,192, 48, 76,147,122, 17,214,172,178,107,116,239,193,135,158,228,189,189,189, 17, + 29, 29, 13,123,123,123,252,244,211, 79,112,113,118,198,212, 17,126,208,235,245, 48, 26,141,208,104, 52,224,121, 30, 79,232,204, + 65, 34,255,131, 8,130,240, 64,155,171,188,188, 60,120,121,121,213, 27,213, 18, 17, 17,169, 81, 14,213, 28, 7, 43,168, 59,206, +239,254, 10,219,110, 53, 71,250,226,197,255,200, 56, 88, 79, 90, 4,171,193,187, 80,143, 30, 61,172, 11, 11, 11,191,126,245,213, + 87,149, 26,141, 6,121,121,121,200,203,203, 67, 68, 68,196, 9,189, 94, 31,156,150,150,182,177, 30,227,227, 95,151,121,113,116, +113,129,204,198, 6,164, 70,239, 65,137, 74, 85, 25,201,210,235,129, 58,140, 64,125,154, 53,205,149,185,138,208, 34,115,101,101, +245,128, 38,195, 48,213,195, 52, 60,220, 99,208,219,219, 27, 75,150, 44,193,136, 17, 35, 30, 24,166,193,210,116,122,120,120,244, +163,148,118, 50, 23, 16, 85,141,220,251, 89,104, 36,253,235, 50, 88,131, 7, 15,198,193,131, 7,241,238,187,239, 34, 41, 41, 9, + 35, 71,142, 4, 33, 4,118,118,118,112,115,115,131,131,131, 3, 20, 10,197, 95,210, 90,151,230,163, 32,106,138,154,255, 41,205, +154, 13,218,173,173,173, 81, 94, 94,222,160,185, 18,143,167,168, 41,106, 86,125, 95, 57, 14, 22,174, 70, 93,192,233, 95,102,227, +173,161, 45, 49,178,197, 29,124,252,113,195,227, 96,253, 29,233,124,210,104,208,125,148,148,148,124,210,174, 93, 59,233,205,155, + 55,145,152,152,136, 91,183,110,129,231,249,187,105,105,105,207, 55,217,213, 49, 12,236,236,236, 32,147,201,192,165,167, 87,182, +145,178,182, 6,128,202,200, 21,165, 32,141,172,206, 98, 24, 6, 28,199,253,255,152, 87, 85, 55,221,166,194,243,124,245, 8,237, +230,113,174,204, 47,134, 97,170, 95, 77, 24,162, 97, 78, 68, 68,132, 77,114,114, 50, 40,165,216,179,103,143,205,168, 81,163,230, + 52, 53,122,149,147,147, 3,131,193, 0,137, 68,130,193,131, 7,163,123,247,238, 40, 43, 43,171,142, 86, 17, 66,192,113,156,216, +139, 80,228,137,195,220, 6,171,230,168,237, 98,228, 74, 68,196,114, 82,246, 76,154, 9, 96, 38, 33,100,204,130, 5, 11,126,126, +243,205, 55, 33, 8, 2, 78,158, 60,137, 53,243,230,225, 83,158, 31,251, 45, 33,229, 51, 40,157, 41, 30,173,199,104,176,186,118, +237,234, 83, 90, 90,250,163,201,100,234,204,243,188,236,244,233,211,208,106,181,136,139,139,171, 16, 4, 97, 79,147, 55,200,113, + 89, 51,102,204,240,178,100, 93,169, 84, 90,132, 6,230, 33,172,169, 73, 45, 48, 59, 82,169,180, 72,231,238, 94,175,166, 32, 8, +233, 53,231, 22, 52,155,168, 90,162, 63, 53,111,246,233, 22, 30,130,229, 93,187,118,253,203,119, 77, 57,150, 50,153, 44,109,232, +208,161,110,141,249,143, 84, 42,205, 18,179,189,200,127, 59, 82,169,180, 98,252,248,241, 22,245,220,101, 89, 86,191,115,231, 78, +177,110, 92, 68,164, 14, 20, 82,233,216,183,222,122, 11,191,253,246, 27,246,172, 90,133,129,105,105,216, 38,149, 66, 41,149, 98, +173,193, 48, 9,128,104,176, 30,167,193, 42, 46, 46,254,180,160,160, 32,164,164,164,196,116,247,238,221, 10, 66, 8,207, 48, 76, +133, 32, 8, 75,121,158,223,208,212, 13,238,218,181,203,239,113,239,132, 89,147, 88, 80,229,105, 9,113,113,113, 61,255,174, 3, +254, 40,109,173, 30,230,226,133, 11,237,197, 44, 44,242,191, 70, 27,187, 94,216,177,163,215, 86,241, 72,136,136, 60, 30,174,196, +198,246, 3,128,193,131, 7,163, 98,206, 28, 0,192,166,170,113,176,108,128, 31,255, 37,201, 12, 6,224, 92,245, 57, 15, 64, 2, + 0, 53, 0, 37, 0, 29,128, 50, 0, 78, 53,214,207,175,250,205,252,251, 25, 0,198,255,100,130,235, 52, 36, 9, 9, 9,175,229, +230,230,218,232,245,122, 7,158,231,157, 76, 38,147,171,193, 96,104,105, 50,153,126,164, 98, 75,233,127, 28, 10, 8,143,242, 18, +143,160,136,136,136,136, 8, 0,248,249,249,169,156,156,156, 84,126,126,126,170,143, 40,125,224,245, 47,170, 30,116, 38,132, 28, + 36,132, 28,156, 63,127,126, 31, 0,221,231,207,159, 31, 82,181, 28, 4,192,201,252, 59, 33,228, 32,128,102, 15,253, 30,240,159, + 78,240,147,214, 96,129, 54,233,101, 48,152, 63,139,136,136,136,136,136,136,252, 91, 11,121, 74,135, 46, 91,182,108, 9, 0,118, +217,178,101, 75,106, 44,131, 82, 58,180,230,251, 67,191, 59,255,167,211, 74, 0,248,215,177, 19, 22,207,148,221,148,222, 4, 13, +233,139,154,162,166,168, 41,106,138,154,162,166,168,249,228,105, 54,164, 93,199,255,159, 37,132, 28,164,148, 14,173,249, 94,211, +120, 85,105, 30,172,249,249,161,223, 15,253,167,221,224,223,246, 2,224, 47,106,138,154,162,166,168, 41,106,138,154,162,166,168, +249,136,175,103, 43, 45, 75,221,239,117,125,174,241,221,127, 50,189,245, 12,211,176,115, 39,155,234,167,180,145, 91,241, 82, 0, +208,105, 88,131,247,173,138, 82,140, 30, 45,206,183, 34, 34, 34, 34, 34, 34, 34,242, 31,135, 16,114,112,222,188,121, 31,252, 55, +164,149,171,203, 92,229,170,101,205, 20,198,162, 54, 38, 19,218, 1,128, 66,134,132, 92,181,205, 29,231,157, 59,243, 31,183,201, + 26, 62,124,184,181, 76, 38,147,236,216,177,163,240,223,120,144, 58,181, 38,158,188, 17,195,192, 98, 16, 0,128,199, 17, 86,130, + 3,177,137, 52,189,145, 25,195,165, 42,106,152,243, 56,214,123,220,255, 21,121, 50,240,240,240, 80, 2, 24,202,113,220, 56, 7, + 7,135,160,252,252,252,207,211,210,210,190,107,226,205,140, 3, 48,195,222,222,126,140,189,189,125,139,130,130,130,251, 37, 37, + 37,187, 0,124, 75, 41, 53,254,147,251, 73, 8, 97,252,253,253, 21, 60,207, 19,185, 92, 46, 72,165, 82, 42,147,201, 30,110, 75, +105, 58,117,234,148,233, 73, 61,215, 97, 97, 97,114, 0, 56,117,234,148,238,191,172,144,100, 90,182,108,105,125,255,254,253, 50, +106,158,149, 94,164, 65,186,119,239,126, 75,175,215,215, 59,204,145, 84, 42,205,151,201,100,190, 79, 96,190,207, 51, 87,253, 1, +200, 1,192, 86, 45,235,171,222,179,107,124,151, 93,199,239,255,188,193, 74,245, 83,218, 40,140, 69,109,114,178,226, 70,231,100, + 92,121, 30, 0, 92, 60,186,236,114,113,235,184, 51,213,207,222,208,181,227, 24,107, 86, 73, 86,113,140,164,179, 86,167,107, 38, +145, 72,242,245, 38,211, 53,206, 72,102,102,196,237, 72,109,108, 34, 40,165,219, 9, 33,238,195,134, 13, 59, 42, 8,194,166, 67, +135, 14, 37, 52,233,162, 13, 11,227, 92, 11,155,141,101, 36,220, 16,128,250, 83, 10, 80,194, 93,135,193,112, 36,219, 49,111, 51, +109, 68,134, 83,171,137, 82, 91,130,126, 16, 48,172,109, 75,215,208,153, 83,158,111, 22,210,125,160, 82, 83,110,196,153, 19, 7, +131, 55,108, 57,240,214, 83,190,228, 50, 79,112, 64,105,135,240,232,104, 90,209,192, 13,101, 17, 33,152, 85,245,121, 37,165,244, +147, 71, 89,207,130,255,126, 79, 41,157,255,152,111,138, 79, 57, 56, 56,124, 47,151,203,173, 88,150,189,147,150,150,246, 53,165, + 52,166,177, 58,222,222,222, 29, 77, 38,211, 8,137, 68,162, 54, 26,141,209, 28,199,237, 75, 77, 77,141,123,132,116,177, 29, 58, +180,126,133, 37,164, 7, 0,123, 0, 69, 60,165,231,111,222, 76,252,141, 82,218,164,135,129,176,176, 48,174, 66,163, 25,203,177, +236, 96, 74,169, 63, 40, 37, 32,228,186,201,100, 58,162,178,177,217,108,233,205,171, 91,183,110,183, 76, 38, 83,163,198, 42, 99, + 89, 54,215,203,203,203,111,199,142, 29,141, 78,187,151,151,215, 40, 79, 79,207,181, 93,187,118, 85,117,233,210, 5, 82,169, 20, + 95,126,249,229, 12, 0,223, 89, 98,164,172,172,172, 70,171, 84,170,150,101,101,101,247, 42, 42, 42,246,202,100,178,103,190,253, +246, 91,207,110,221,186,217,228,230,230, 18,134, 97, 92, 14, 28, 56,240,242,119,223,125,215,143, 16,242, 44,165,244,145,110,226, + 30, 30, 30,239, 2, 48, 79,199, 17,149,145,145,241,181, 37,255,235,216,177,163,116,232,208,161,191, 18, 66,158, 37,132,212, 89, + 64, 51, 12, 83, 22, 22, 22,214,188,190,243,213,178,171,195, 57,142,229, 60,235,250,221,196,155,210,239, 95, 42,124,228,161, 91, +250,245,235,183,133, 82, 58,194,100, 50,129,101,217,211, 39, 78,156, 24, 98,249,253, 72,221, 12,192,108, 0,140, 76, 38, 91,113, +225,194,133, 92,181, 90,125, 72, 42,149,134, 85,253,126, 42, 58, 58,250,217,135,206, 41,121,148, 30,223, 97, 97, 97, 31, 9,130, + 48, 69, 38,147,165, 22, 22, 22, 78,140,142,142,190,245,168,199, 64,173, 86, 75,178,179,179,103,116,238,220,121, 90,112,112,176, + 91, 92, 92, 92,182,167,167,231, 26, 87, 87,215,111,163,163,163, 27, 52,236, 93,186,116,113,103, 24,230, 21, 0, 99,171, 10,208, +157,132,144,205,209,209,209,247,254, 23, 12,150,201,100,114,187, 56,111, 30, 32,151,131,239,221, 27, 2, 33, 32,159,125, 6, 33, + 59, 27,134, 47,190,128, 9,192,208,161, 67,237,171,202,246, 39,205, 96, 93,254,111, 75,112,173, 6, 75,110,197, 75, 77, 38,180, +203,201,184,242,124,232,160,111,109, 1, 32,226,200,140,231, 29,221, 59,198,201,173,248, 59, 50,107,233,214, 81,195,250,117, 30, + 61,180, 55,241,114,119, 65, 90,102,142,203,198,109, 71,251, 31, 60,114,114, 43,128, 30, 22, 70,173, 94, 54, 26,141, 62, 12,195, +108, 99, 24,198,125,213,170, 85,173, 18, 19, 19, 39,110,219,182,109,248,176, 97,195,206, 11,130,240,243,161, 67,135, 46, 90,186, + 35,110, 93, 70,180,119,131,219,150, 17, 35,135, 52,127,182,191,179,204,199,205, 25,130, 32, 71,194, 61,163,119,248,217,152,254, +135,255, 56, 54,211,213,127,196, 43,217,215,247,221,104, 72,171,125, 43,242,162, 74, 46,157, 61,239,205,103,221, 6, 15, 26,106, +227,232, 21,200,129, 84, 78, 22, 45,179, 5, 70,190, 50,199,106,196,203,239, 88,221,187,113,206,243,208,225, 3,253, 55,239, 61, +149,217,190, 21, 89, 17,127,151,254, 94, 87, 84,137, 16,204, 18, 4,202, 84,222,244,201,156,254,253,251, 15, 80, 40, 20, 15,220, + 80,180, 90,173,132, 16,116, 20, 4, 90, 85, 56,144, 89,132,144,213,150, 68,163,204,219,208,235,117,140, 68, 34, 3,203, 50, 51, + 2, 2, 2,186,228,230,230,158, 2,176, 33, 35, 35, 35,255, 81, 50,138, 74,165,154, 48, 98,196,136, 37,155, 54,109,178, 86, 42, +149,200,200,200,240,123,241,197, 23, 59, 19, 66,158,163,148, 54,120,227,245,240,240, 8, 0,240,156,147,147,211,168,137, 19, 39, +250,244,237,219, 23, 45, 90,180, 64, 70, 70, 70,191,147, 39, 79,206, 15, 12, 12, 76,201,206,206,222, 5, 96,111, 70, 70,198,213, +198,152, 43,255,142,109,151, 79,158, 50,181,253,200,145, 35,221,229, 10, 37,151,150,150,148,187,254,135, 53,118, 44, 97, 58, 19, + 66,230, 52,214,100,133,134,134,182, 39,130,176,117,218,132, 9, 45,130,186,119,231, 92,221,221,161, 45, 46, 70, 98, 66,130,119, +228,229,203,253,246, 29, 63, 62, 75,173, 86,143,139,142,142,110, 48, 47, 25, 12, 6,175,179,159,127, 14,214,201, 9,212,104,132, +182, 77,155,234,250,121,249,197,139,128,209, 88,249,125,159, 62,160,148,130,231,121,140, 26, 53,202, 37, 47, 47, 79, 2,160, 81, +233,246,246,246,118,111,211,166,205,134,249,243,231, 75,117, 58, 29,174, 92,185,130, 11, 23, 46, 8,185,185,185,203, 27, 50, 87, +132,144, 3, 11, 22, 44,240,232,217,179,167, 77,126,126, 62, 76, 38, 83,179,189,123,247, 78, 86,171,213, 54,158,158,158,178, 95, +127,253,213, 60, 67,128, 67,171, 86,173, 28,198,142, 29,171,255,245,215, 95,103, 0, 88,241, 72, 55, 32,142, 11,190,117,235,214, + 16, 0,104,213,170,149, 69,255,233,216,177,163,212,215,215,119,147,175,175,111,159,101,203,150,145,196,196, 68,182, 67,135, 14, + 16, 4, 1, 38,147, 9, 60,207,131,231, 43, 15,221,184,113,227,172, 27, 42,108, 56,150,243, 60,183,251,134,179, 74,165,170,254, +175,121, 50,118,141, 70,131, 65,175,118,125, 44, 55, 91,158,231, 7,109,216,176, 1, 28,199, 97,220,184,113,189,213,106,181, 50, + 58, 58,186,194,194,191, 79,123,227,141, 55,222,177,182,182,198,170, 85,171,158,233,216,177, 99,152, 92, 46, 15,251,243,207, 63, + 1, 0,189,122,245, 10, 11, 9, 9,113, 52,153, 76,195, 8, 33, 35,109,109,109,123, 6, 6, 6,158, 11, 8, 8,120,229,234,213, +171,197,141, 77,107, 80, 80,208, 40,127,127,255,233, 95,125,245,149,213,141, 27, 55, 28, 22, 45, 90,180, 21, 64,151, 71,217,255, +142, 29, 59, 74, 53, 26,205,150, 79, 63,253,116,176,121,170, 49, 65, 16, 92,207,156, 57,179,232,221,119,223,237,170, 86,171, 95, +170,203,100, 5, 7, 7,119,166,148,126,220,170, 85,171,126,175,190,250, 42,219,163, 71, 15,148,149,149,225,216,177, 99,239,239, +222,189,251,253,192,192,192, 75,148,210, 69, 87,174, 92, 57,251,184, 10, 71,181, 90,157, 0,192,219, 28,119,136,142,142,110,247, +175,136,254,217,217,161,116,240, 96, 24,238,220, 1,100, 50, 72, 87,172, 0, 12, 6, 24, 22, 44, 0,100, 50, 49,204,247,111, 55, + 88, 13, 81, 94, 94, 30, 48,127,198,120, 48, 76,229, 72,230,109,124,155, 99,233, 7,147,201,190,131, 71, 45, 30,103,162,160,160, +224,227,177, 99,199,186,239,219,183,239, 13,134, 97, 20, 57, 57, 57,164,188,188, 92, 57,107,214, 44,175,210,210,210,145,123,247, +238,125,122,248,240,225,177,148,210, 47, 15, 28, 56, 16, 85,159,150,115,192,243,173, 93,156, 92,142,125,189,120,178,131,191,111, + 43,232,141, 70,164,229,164,131, 66, 14, 55, 23,107,140,123, 46, 64,218, 35, 72,210,122,249,247,127, 30,117,235, 60,172,127,214, +181, 3, 55,235,141, 32, 80,188, 23,113, 57,174, 45, 99,202, 39, 68, 98, 91,199,147, 49,135,214,157,194,184,105,190,254,246, 67, + 6, 12,178, 29,245,218,172,247, 0,252, 94,223,117, 81,163, 64,195, 59,239,188, 83, 61, 21,143,153,236,236,108,156, 56,241,103, +173,255,177,244,218,171,185,240,217,103,159,217, 21, 20, 20, 60,187,113,227,198,126,238,238,238, 11, 51, 51, 51, 27,125,243, 33, +132, 40, 1, 12,122,230,153,103, 22,239,222,189,219,218, 60,122,189,171,171, 43, 86,172, 88,225,253,226,139, 47,126, 1, 96,120, + 3,230,234,231,241,227,199,143,233,223,191, 63,252,252,252,144,159,159,143, 75,151, 46,233,215,172, 89,115,191,111,223,190, 45, +199,140, 25, 35,123,231,157,119,154, 39, 37, 37,205,217,187,119,239, 28, 7, 7,135,159, 10, 11, 11,167, 91,146,190, 14, 29, 90, +191, 50,113,210,164,246, 83,167,189,173, 54, 24,116,229,215,162, 79,159,224,164, 12,251,246,244, 73,118, 5,133,185, 78,148, 10, +175, 0,248,165, 17,230,170,181,167,171,107,248,178, 47,190,176,119,116,118, 70, 86, 86, 22, 82,211,210,144,121,253, 58, 8,128, +254,253,251,203, 2, 58,119,110,181,114,221,186, 35,193,193,193, 3, 34, 35, 35,111, 54, 24,145,114,114, 66,122, 96, 96,229, 93, +250,228, 73,115,100, 5,158,195,134, 85,175, 83, 24, 25, 9,150,101,225,229,229,213,148,233,151,204,145,224,208,158, 61,123, 74, + 1,224,221,119,223, 45,213,104, 52, 95, 17, 66,182,167,167,167,103, 52,240,215, 25, 31,125,244,145,123,171, 86,173,154,111,217, +178, 5,101,101,101, 0,224,236,235,235,139, 54,109,218,240,167, 79,159,134,159,159, 31,108,108,108,112,250,244,105, 92,186,116, + 9,129,129,129,214, 82,169,244,249,198, 24,172,186,162, 85, 60,207,163,216,194,201,221, 9, 33,204,179,207, 62,187,161, 69,139, + 22, 97,203,150, 45, 83, 73,165, 82,196,198,198, 34, 43, 43, 11,206,206,206, 80, 40, 20,144, 72, 36,224, 56,174, 81, 83,101,169, + 84, 42,100,100,100,192, 80, 53,184, 34,207,243, 40, 45, 45,133,155, 91,101,240,113,225, 66,194, 44, 88, 96,121, 85, 86,191,126, +253,188, 41,165,205, 31, 50, 88,140,217, 92,235,245,122, 40, 20,138, 94,125,251,246, 45,175, 50,154,133, 71,143, 30,173, 47, 47, +217,185,187,187, 99,216,176, 97,208,235,245,237,215,174, 93,251, 11,165, 20,229,229,229,213, 43,184,184,184, 36,245,234,213,139, +237,217,179, 39, 90,181,106,133,117,235,214,245,217,185,115,231,211, 0,246, 55, 54, 47,217,217,217,189, 48,122,244,104, 43,107, +107,107,132,134,134, 66,175,215,123,132,133,133,201,155, 82, 21, 73, 8,225, 60, 60, 60, 92, 57,142,251,102,198,140, 25, 3,123, +247,238,141,248,248,120, 28, 57,114, 4,195,135, 15, 71, 88, 88, 24, 62,252,240,195, 65,159,124,242,201, 12,212, 49,171,133, 32, + 8,155,119,237,218,213,194,203,203, 11, 44, 91,249,176,107,107,107,139,137, 19, 39, 98,252,248,241, 56,124,248,112,215, 37, 75, +150,108, 13, 11, 11,243,121,140, 85, 99,222,209,209,209,102,179,229,253,111, 41,180,141,221,186,193,144,146, 2,169,143, 79,165, +177, 74, 74,170, 52, 90, 85,203, 18,181, 90,116, 54,255,102,131,165,211,176, 6,133, 12, 9, 46, 30, 93,118, 69, 28,153, 81, 93, + 69,200, 81, 36,104, 53,172, 1, 0,120, 74, 81, 82,102,130, 82,206, 32, 41,179, 20,215,239,230,214,118,195,127,160,171,101,255, +254,253, 15,148,150,150,250, 57, 58, 58,174, 48,153, 76,108,159, 62,125,216,174, 93,187, 58, 39, 39, 39,227,212,169, 83,144, 72, + 36,208,235,245,196,193,193, 65, 62,113,226, 68,143,138,138,138,102, 31,124,240,129, 19,128,222,117,105,146, 49, 99, 88,119, 9, +187,243,171,197, 99, 29, 8,123, 11,183, 82,138,208,218, 43, 20,205,236,188,145,158, 91,134,232,184,195,184,149,120, 8,173,189, +154, 99,242,184, 54,118, 43,127,200,219, 69,212, 83,252,105,244, 58, 99, 93,154, 0, 88, 86,213,154,232, 79,142, 18, 88,167,222, +132,117, 31, 74,136,194,227,129, 21, 52,249, 73, 72,184,184,137, 38,197,238,167,205, 3, 94, 33, 0,216,186,246,157, 82,154,195, +178,236, 6,134, 33,147, 8, 33,232,210, 37, 48,103,249,242,229,181, 61,169, 25,187,116, 9,204, 97, 89,198,165,114, 30, 65,230, + 71, 65,224,115,234, 73,103,205,237,229, 16, 66, 86,202,100,242, 89, 0,224,238,238,145,115,232,208, 33,227,232,209,163,241,245, +215, 95,203,230,206,157,187,192,211,211,243,213,244,244,244,244,250,206, 81,141,155,162,191,173,173,237,148,182,109,219, 14, 95, +188,120,177,108,208,160, 65, 74, 74, 41, 74, 75, 75, 81, 90, 90,138,242,242,114, 88, 89, 89,129,227, 56,183,134,206,123,139, 22, + 45, 70, 77,156, 56, 17,206,206,206,136,136,136,192,220,185,115,147,115,115,115, 63,203,204,204,140,222,186,117,107,187, 86,173, + 90,125,184,110,221,186,246, 61,123,246,100,134, 13, 27,134, 3, 7, 14,244,104, 72,179,250, 68, 17,210,227,185,231, 70, 58,235, +245, 21, 26,157,174,162,248,126,114, 84,102, 90,218,141, 34,191, 54,193, 46, 3, 6,118,115, 76, 72,184,219,163, 46,131,245,176, +230,152, 49, 99, 88,134,231,127,255,226,171,175,236, 25,142,131,209,104,132,143,143, 15, 98, 99, 99, 81, 82, 88,136,138,178, 50, +220,139,139,131, 71,203,150,152, 49,110,156,253,103,107,214,108, 81,171,213, 65, 53,159,186,107, 75, 39, 53, 26, 31,202, 92,236, + 95,230,204, 99, 89,182,186,224,176,116,223,107, 41,132,146, 50, 50, 50,160, 82,169,208,190,125,123,171,168,168,168, 11,105,105, +105, 25, 13,105, 42, 20,138,231,123,244,232, 97,179,117,235, 86,168,213,106,216,219,219,227,196,137, 19,136,141,141,133,193, 96, + 96, 74, 75, 75, 97,109,109,141,101,203,150,161,121,243,230, 40, 41, 41, 65, 82, 82, 82, 51,137, 68,226,212,200,116, 6,197,197, +197, 61, 91, 21,205, 48, 27, 46,117,219,182,109,129,202, 54, 21, 81,245,165,147, 84, 58, 79,134,227,184,231,150, 44, 89,194, 72, +165,210,106,179,106,158,147,208,108,172,204,147,180,215,102, 86,107, 75,167,201,100,130,193, 96,128,193, 96,128, 32, 8,200,205, +205, 69, 73, 73, 9, 28, 28, 28, 42, 87, 88, 0, 16, 16, 66,235,152,133,190,166,230,128, 1, 3,222,115,113,113,249,216,197,197, +229,129, 19,170,211,233, 48,111,222, 60,148,149,149,193,211,211, 19,158,158,158,187,205, 19,203,231,231,231,163,127,255,254,203, +194,195,195, 23,215,166,201,113,220,151, 95,127,253,245,240,118,237,218,185, 77,152, 48, 1, 28,199, 13,202,207,207,199,166, 77, +155,160, 82,169,176,113,227, 70,180,104,209,130,229,121, 30, 21, 21, 21,102, 35,172,145,201,100, 73, 77,201, 75,133,133,133,191, + 29, 60,120,176,123,183,110,221,236, 0, 96,196,136, 17,204,190,125,251, 82,250,244,233,147, 90, 90, 90,250, 74,205,234,194,186, + 52,213,106,181, 36, 43, 43,107,246,184,113,227,222,233,215,175,159,109,126,126, 62,228,114, 57,182,111,223,142, 13, 27, 54, 28, + 51, 26,141, 11,119,237,218,245,233,250,245,235,251,143, 24, 49, 2,235,215,175,127,179,170, 89,132, 80,139,166,187,183,183, 55, +174, 93,187, 6, 7, 7, 7, 56, 57, 57,161,184,184, 24,151, 46, 93,194,229,203,151,209,190,125,123, 16, 66,234,173, 26,171, 39, +157, 77,142, 84, 53,102, 56,163,199,165,217,148, 90,223,134, 52, 67, 66, 66, 90,240, 60,255, 50,128, 49, 85, 95,237, 96, 89,118, +203,229,203,151,147,254,147,251,254, 68, 26, 44, 66,136,249,140,133, 81, 74, 79,123,223,170, 40,205, 85,219,220,113,113,235,184, +211,209,189, 99, 28, 0,112, 20, 9, 84, 98,115,199, 59,182,162,180,178,234,131,226, 66, 66, 33,174,222,206, 70,236,237, 44, 88, + 43, 26,126,234,214,233,116,207, 28, 57,114, 4, 59,119,238, 92,254,221,119,223,209,148,148, 20, 36, 39, 39,195,193,193, 1,189, +123,247, 70,110,110, 46, 34, 35, 35,209,186,117,107, 80, 74,225,237,237, 45, 3, 96, 87,159,166,235,109, 97,220,171,147,187,180, +116,178, 35, 56,112,225, 40,186,182, 31, 9,149,156, 67,110, 97, 57, 24, 66,144,120,255, 56,120,222, 10, 87,227, 83,208,221,223, + 10, 61, 67,109, 61, 53,127, 22, 78, 0,176,174,225, 18,203, 8, 62,231, 56,229,115,254,164,140, 67, 16, 97,221, 71,144,194, 98, + 45,226, 47,254, 68, 51, 19, 78, 86,223,107, 13,250, 82, 75,170, 7,102,186,186,186, 86,204,155, 55,239,153, 54,109,218, 24,223, +122,235,173,152,164,164,164,119, 30, 50, 34,223,172, 94,189, 26,119,238,220,201, 91,182,108,217,137,236,236,236, 15, 26,121, 17, +125, 76, 8,249, 30, 0, 50, 50, 50,242, 15, 30, 60, 24,116,250,244,233, 57, 43, 87,174,116,123,251,237,183,101,211,167, 79,159, + 84, 89, 84, 52,248,196, 25, 16, 22, 22,118,228,183,223,126,179,114,115,115, 35,132, 16, 24, 12, 6,228,230,230, 34, 55, 55, 23, +197,197,197,208,104, 52, 40, 43, 43, 3,195, 48, 13,182,151, 83,169, 84,108, 73, 73, 9,138,138,138, 16, 18, 18,130,203,151, 47, +251,156, 63,127,126,195, 15, 63,252, 32,140, 31, 63,158,132,133,133,145,188,188, 60,236,222,189, 91,200,202,202, 98, 20, 10, 69, +153,197, 79,199, 12,236, 85, 42,165,244,226,249,189, 71, 50,210,226,242, 50,179,175, 23, 51,160, 76, 70, 70, 84,177,111,155, 62, +205, 80,217, 38,203, 34,238,221,187,247,210,172,169, 83,125,237, 28, 28, 96, 50,153,224,228,228,132,180,180, 52,148,151,151,163, +188,164, 4, 21,101,101,208,150,148, 32,254,207, 63,209,109,200, 16, 12,232,210,197,251, 80, 76,204,235, 0,214,215,167,171,247, +243, 67,234,201,147, 96, 24, 6,222,189,171,159, 21,144, 31, 17, 81,109,182,108,251,247, 7, 81,169, 32,249,160,233,157, 99, 50, + 50, 50,174,250,248,248, 28, 29, 52,104,208,192,201,147, 39, 51, 89, 89, 89,251,220,220,220,158,201,202,202,138,175,239,127,214, +214,214,190,121,121,121, 40, 45, 45,133,189,189, 61, 86,174, 92, 9, 23, 23, 23, 84, 84, 84, 32, 50, 50,146,122,121,121,145,147, + 39, 79,194,211,211, 19, 5, 5, 5,208,235,245, 40, 47, 47,207,214,235,245, 21,141,137, 88,153, 35, 67,102,143,207,113, 92,112, +108,108,172, 75,101, 36,178,131,197,237,175, 4, 65,160,119,238,220, 65, 92, 92, 92,229,177,179,181,133,149,149, 85,229, 36,239, + 82,105,181,185,226, 56,203, 3,244,230,201,209,205,230, 42, 55, 55, 23,137,201,183,176,251,228,175, 48,240,198,102, 63,135,218, +222,111, 37,145, 92,119, 46, 35, 11,114,175,209,171, 13, 92,135,227,191,252,242, 75,214,221,221,253, 47,191,165,165,165,161,184, +184, 24, 54, 54, 54,176,183,183,175,174,210,204,203,203,195,204,153, 51,199, 3, 88, 92,155,102, 68, 68, 68, 78,104,104,232, 11, +179,103,207, 62,254,235,175,191,202,198,141, 27, 87, 93,157,201,243, 60,202,202,202,240,231,159,127,226,236,217,179,136,138,138, + 42, 52, 24, 12,251, 89,150, 93, 19, 17, 17, 17,223,216,124,212,173, 91, 55, 7,107,107,235,207,223,124,243, 77, 27, 0,208,106, +181, 24, 55,110,156,242,133, 23, 94, 64,116,116,116,251,239,190,251,110, 19,128,144,134,170, 3, 25,134,217,113,242,228,201,126, + 85, 6, 26, 70,163, 17,231,207,159,199,228,201,147, 11, 84, 42,213,248,184,184, 56,141,167,167,231,167, 7, 15, 30,236, 31, 16, + 16,128, 78,157, 58,185,230,229,229, 89, 3, 40,169,227,188,131,231,249,234,243,179,113,227,198,234,223,180, 90,109,229,181,166, +215,147,144,144,144, 22,245, 25,131, 70, 68,170, 82,107, 44,167,254,147, 5,117,199,142, 29,173,100, 50,217, 8,142,227, 88,110, +231, 78, 72, 39, 77,130, 33, 49,241,129,200,149, 57,146,101, 28, 49, 2,146, 70,104, 18, 66,198, 57, 57, 57,245,232,222,189, 59, +145, 72, 36, 24, 49, 98, 4, 14, 31, 62, 60,255,200,145, 35,243,212,106,245, 5, 65, 16, 54, 27, 12,134,189,113,113,113,154,191, +173,218,243, 33, 15,242,196, 69,176, 40,165,164,106, 39, 9, 70,143,230,157,119,238,204, 79,245,179, 55,200,173,248, 59, 0,160, +213,176, 6,239,216,170, 97, 26, 22,111, 5, 5, 5,207, 83, 80, 65,128, 64, 41,120, 11,130,231,205,108,141, 96,174, 59, 96,108, +215, 17, 24, 63, 62,138,252,249,231,159, 56,117,234, 20, 2, 2, 2, 96, 52, 26, 97,107,107,139, 49, 99,198, 96,239,222,189, 80, +169, 84,208,104, 26, 62,159,214,142,166,145,161,157,218,176,183, 82, 98, 17,212,246,121,180,112,239,137,196,244, 98, 20,150,234, +144, 95, 92, 1, 63,191,247,144, 93, 80,129, 18, 77, 5,174, 37,108,129,151,187, 47,195, 72,238,246,183,200, 96,253,255, 45, 19, + 66, 97, 36, 21, 10, 35,233,159, 71,255,218,220,200,164,179,172,122, 67, 16,132,111,143, 28, 57,210,173,103,207,158, 92,191,126, +253, 2,125,124,124,186, 36, 39, 39, 95, 1, 0, 31, 31,159, 46,253,251,247, 15,116,113,113,193, 55,223,124,163, 21, 4,225,219, + 38, 62,253,212,108,175, 21,225,237,237,189,112,207,158, 61, 63, 76,153, 50, 5,238,238,238,157, 45,209,176,183,183,159,180,105, +211, 38, 43,119,119,119, 98, 50,153,160,213,106,145,149,149,133,162,162, 34, 20, 22, 22, 34, 37, 37, 5, 5, 5, 5,200,204,204, +212, 36, 37, 37,237,178, 52,109, 31,125,244, 17, 76, 38,147,113,242,228,201,146, 62,125,250,224,215, 95,127,101,238,221,187,135, +245,235,215,243, 59,118,236, 72,102, 24,134,123,254,249,231,155, 55,110,135, 73, 94, 90,218, 61,103,157,161, 80, 59, 40,172,251, +172,220,164, 60, 56,183, 24,129,227,103,118,125,147,146,148, 72, 9, 3,139,219,158,201, 37,146, 1,234,174, 93, 37, 89, 89, 89, +104,221,186, 53,210,211,211,113,251,246,109,232,245,122,104,138,139, 97, 44, 41, 1, 95, 88, 8, 90, 82,130,164, 51,103,208,161, +117,107,217,145,152,152,254, 13, 25, 44, 65, 16,192, 48,204, 95,162, 41,230,168, 21,195, 48, 32, 86, 86,128,149, 21, 40,211,184, +201, 21, 60, 60, 60,134,218,218,218,206, 46, 41, 41, 57,154,145,145,241,133,193, 96,152,189,116,233, 82,245,162, 69,139,154,205, +157, 59,215,102,238,220,185,155, 91,180,104,209, 45, 41, 41,169,206,170,157,178,178,178,123, 70,163,209, 17,128,203,241,227,199, +225,236,236,140,210,210, 82, 24, 12, 6, 84, 84, 84, 24, 28, 28, 28,228,249,249,249,208,233,116,208,233,116,176,181,181, 69,116, +116,116,129,201,100, 58,220, 80,196,234,254,253,251,207, 86, 61, 60,180, 34,132,216,119,234,212,169,250, 55,115,228, 40, 43, 43, +203,210,188, 77, 9, 33, 2, 33,132,250,249,249,161,168,168, 8, 44,203,194,202,202, 10,214,214,214,104,223,190, 61, 82, 83, 83, +155,108,176,106,154,171, 63, 47, 30, 68,110, 89, 38,126,252,106, 43, 60,221,188, 25, 0, 78,233, 89,169,207, 76,152, 51, 38,184, +101, 79,199,175,238,159, 43, 88, 94, 79, 97,241,235,220,185,115, 63,117,118,126,112,224,104,111,111,111, 76,153, 50, 5, 7, 15, + 30,196,157, 59,119, 30, 24, 47,167,160,160, 64, 0,240,107,125,105,140,136,136,136, 81,171,213, 19,198,140, 25,179,162, 69,139, + 22, 46,148, 82, 4, 4, 4, 96,236,216,177,248,234,171,175,112,230,204,153,157,130, 32,252,108,107,107,123, 33, 55, 55,151, 77, + 76, 76,212, 55,246,254, 17, 18, 18,226, 40,151,203, 79,175, 94,189,218,167, 85,171, 86, 76, 70, 70, 6, 46, 94,188,136,110,221, +186,129, 16,130, 54,109,218,192,104, 52,122, 54,100,174, 40,165,219,247,236,217,211,175, 85,171, 86,136,143,143,199,217,179,103, +225,236,236, 12,165, 82,137, 97,195,134, 57,110,223,190,125, 74,199,142, 29,191,227, 56,238,147, 33, 67,134,128,231,121, 68, 69, + 69,101,221,191,127,191,172,190,115, 84,207,195, 59, 40,165, 48, 26,141, 95, 50, 12,243,124,112,112,240,176,200,200,200,168, 71, + 41, 28,255, 45,109,174,158,122,234,169, 25, 42,149,234,163,238,221,187,171, 46, 94,188, 8, 90,101, 38,235,129, 45, 43, 43,123, + 19,245, 84,223, 15, 28, 56,112,166,141,141,205, 7, 93,187,118, 85,121,120,120, 64,163,209,160,160,160, 0,121,121,121,152, 59, +119, 46,218,182,109,139, 25, 51,102,144, 11, 23, 46,244, 56,112,224, 64,143,139, 23, 47, 46, 87,171,213,159, 68, 71, 71,255,240, +119,237,231, 3, 30,228, 73, 51, 88, 85, 59, 22, 86,253,203,232,209,188, 55, 80, 84,117, 19,111,102,111,111,191,130,231,249,222, +248,228, 19,216,112,118, 72, 74,188,141,210, 66, 1, 70,189, 14,130, 64, 65,133,134,143,137, 82,198,195,246,105,138,146, 51, 4, + 18, 66, 48,100,200, 16, 12, 28, 56, 16, 49, 49, 49,248,245,215, 95,209,179,103, 79, 20, 23, 23,163,164,164, 4,101,101,101,230, +182, 32,245, 34, 85,104,159,242,113,109,139,210,138, 16,168,100, 50, 20,148,232, 80, 88,170, 67, 94,145, 22,187,247,141,133, 78, + 91, 14,147, 78, 15,222, 96,130,181,235, 72,180,113,236, 3,208, 59, 29, 31,231, 65, 52,234, 74, 45,138,217,230,230,230,102,123, +121,121,237,141,142,142, 30, 61,102,204, 24,156, 56,113,226, 77, 0,111, 84, 21,182,111,142, 25, 51, 6,209,209,209,136,143,143, +223,155,155,155,251, 88,186,148, 26, 12,134,114, 99, 85, 21,149, 66,161,144, 90,242, 31,134, 97,250, 59, 59, 59, 19,131,193,128, +252,252,124,228,229,229, 33, 63, 63, 31, 21, 21, 21, 40, 43, 43,131,201,100,130,209,104, 68, 68, 68, 68, 54,207,243, 17,141, 73, +207,205,155, 55,219,204,154, 53,235,141,126,253,250,125, 56,116,232, 80, 28, 56,112, 0,191,253,246,219, 20, 0,187,122,244,232, + 17,221,216,253,227,121,254,228,234,213,107, 92, 39, 77, 28,238,186,243,224,198,165,187,118, 95,235,252,242,139, 89,113, 30,158, +157,156, 55,175, 57, 47, 51,153,232, 65,139,197, 4,161, 83, 51, 87, 87, 36, 37, 37, 33, 50, 50, 18, 90,173,182,218, 84, 24, 10, + 11, 97, 44, 40, 0,209,104, 32, 55,153,160, 77, 73, 65,171, 78,157, 64,128, 14, 22,220, 56,192, 48, 76,157,213,130, 12,195, 0, + 86, 86,149, 38,171,142,106,173, 58,204, 85,151, 46, 93,186,252,186,126,253,122,233,236,217,179,131,125,125,125,127,200,204,204, + 76,241,246,246, 30,242,245,215, 95,159, 89,188,120,177,124,220,184,113,109,215,175, 95,255, 50,128,141,117,233,104,181,218, 93, +135, 14, 29,122,209,199,199,199, 37, 54, 54, 22, 90,173, 22,130, 32, 96,240,224,193, 0, 32, 55,175,151,144,144,160, 45, 47, 47, +207,137,139,139, 43, 77, 78, 78, 54, 2,104,240, 33,128, 16,130,220,220, 92, 16, 66,236, 99, 98, 98, 92,164, 82, 41,170, 34,162, + 46, 93,186,116,201,233,212,169,211,161, 42,179, 21,228,225,225,177, 29, 13,247, 36,164,102, 93, 39, 39,167,234, 42, 65,115,117, +161,171,171, 43,138,139,139,155,100,176, 74, 74, 74, 80, 92, 92,140,219,247,227,145, 83,154,137,240,109, 23,193,243, 60,116,186, + 74,111,234,225,234,133,227,219, 46, 91,135,141, 14,122,223,169, 11, 57,147,119,133,214,154, 95,143, 29, 59,246,213,128, 1, 3, + 14,102,101,101, 57,213,184,166,186, 25,141,198, 79, 76, 38, 19,146,146,146,112,243,230,205, 47, 41,165, 39,107,228,133,244,240, +240,240, 6,163, 46,209,209,209,251, 58,118,236,248, 71,105,105,169, 15,207,243, 47, 58, 58, 58,206, 53,153, 76,230,232,219, 65, +134, 97,174,105, 52,154, 3,173, 91,183,238, 30, 20, 20,180, 59, 42, 42,106, 66, 3,231,135, 4, 7, 7, 63,175, 82,169, 94,211, +104, 52,219, 20, 10,197,220,213,171, 87,251,248,250,250, 50,201,201,201, 48,153, 76, 72, 73, 73, 17, 34, 35, 35,203,131,130,130, +172,195,195,195,203, 24,134,169,211, 8,170,213,106,137,209,104,252,125,255,254,253,253, 91,181,106,133, 51,103,206, 96,217,178, +101,104,221,186, 53,126,254,249,103,116,239,222, 29, 45, 91,182,132,131,131,195, 91, 37, 37, 37,161, 95,124,241,197,192,192,192, + 64,236,217,179, 7,185,185,185,107,235, 27,178,193,100,170,187,105, 85,121,121, 57, 40,165,120,230,153,103, 38,204,158, 61, 27, +195,134, 13, 59, 16, 26, 26,218, 43, 34, 34, 34,209,130,211,255,175,137, 84,213,177,223, 31, 59, 57, 57, 41,239,222,189, 11, 74, + 41, 12, 47,191, 12,195,136, 17,127,137, 92,113, 62, 62, 56,219,172, 25,220,131,130,144,155,151,247,105,199,142, 29,191,143,139, +139, 51,212, 90,110, 74,165, 11,103,207,158,205, 37, 39, 39, 35, 62, 62, 30, 5, 5, 5,127, 49,176, 28,199,161, 87,175, 94,104, +222,188, 57,250,244,233,163,250,244,211, 79,151, 1,248,219, 12,214, 95, 60,200, 19, 27,193,122,240, 38,222,204,206,206, 46,106, +245,234,213,142, 33, 33, 33,172,201,100,194,159, 39, 78,224,221,233, 19, 48,104,232, 91,208,234,100, 48,105, 9,120,169,117,131, + 27,171,208,179, 40, 57, 67, 32, 88, 15,129, 94,175,199,228,173, 82,216,147,124,172,122, 45, 4,223,125,247, 93,101, 85, 76,121, + 57, 74, 75, 75, 81, 86, 86,134,210,210,134,171,222,202,138,172, 13, 6,163,128,244,156,100,164,101, 94,135,157,117,115, 80,198, + 27,217, 5,229, 32,112,129,177, 34, 1, 66,213,133,169,171, 72,131, 70,103,161, 57,110, 68,239,115,131,190,196,226,117, 25,134, +249,117,203,150, 45,195, 86,172, 88, 33, 27, 54,108,152,159,187,187,123, 79, 0,120,225,133, 23,252,236,236,236,176,101,203, 22, +125,125, 55,176, 70,102, 88,198,221,221,253,149,158, 61,123, 34, 59, 59, 27,247,238,221,139,176, 48,141,199,174, 94,189,250,170, +183,183, 55, 73, 73, 73, 65, 90, 90, 26, 10, 10, 10, 96,103,103, 7, 71, 71, 71,184,185,185, 65, 16, 4, 84, 84, 84,184,222,184, +113,163, 11,128, 99,150,166, 41, 39, 39,167, 16,192, 55,229,229,229, 31,114, 28,103, 14,237,239, 67, 19, 39,160,190,113, 51,113, +135,191,127,155,142, 94, 94, 14,109,213,254,254,206, 94,158,137, 37, 78,206, 94, 54,135,143,196, 42,115,178, 11, 19,110,220,184, +179,167, 49,135,172,162,160, 0, 25,215,174, 85,182,185, 42, 45,133,182,172, 12,166,162, 34,184,183,109, 11,104, 52, 96,180, 90, +112, 90, 45, 36,130, 0,165, 74, 5, 75,158,182,228, 23, 47,194,125,104,229,240, 45, 5,151, 47, 87,155, 42,155,129, 3, 1,149, + 10, 68,165,130,113,247,110,176, 44, 11,234,224, 0,108,220,104,137,185,106,230,230,230,182,227,187,239,190,147,230,229,229, 33, + 46, 46, 46,246,222,189,123, 37, 78, 78, 78,214, 28,199, 9, 9, 9, 9, 39, 19, 18, 18, 6,183,108,217, 18, 60,207, 55,212, 61, +239,219, 61,123,246,244,237,209,163,135,169,101,203,150,170,220,220, 92,239,194,194, 66,146,153,153,249,192, 74,145,145,145,242, +212,212,212,114,158,231,247,163,114, 28,172, 6, 47, 18, 74,233, 3, 13,199, 99, 99, 99,107, 53,155,215,174, 93,115, 1,240,108, +231,206,157, 27,140, 98,141, 24, 49, 2,148, 82, 68, 70, 70,226,236,217,179, 56,123,246, 44,146,146,254,223,155,216,217,217, 33, + 60, 60, 28,125,250,244,177,248,196,151,151,151,195,213,213, 21,118,118,118,216,115,234, 87,108,248,122,107,117, 67,247, 26, 15, + 72, 80,169, 84,248,252,221,149, 86, 19,222,127,254, 19, 0,195,234,210, 59,118,236,216, 45, 0,183,204, 38,166,111,223,190, 75, +250,245,235, 7,131,193,128, 94,189,122, 33, 54, 54,118,176,189,189,253,103, 77, 25,138, 35, 46, 46,206, 16, 24, 24,232,226,234, +234, 58,235,213, 87, 95,133,201,100,194,192,129, 3,113,235,214,173,159,114,115,115,211, 39, 78,156,232,211,187,119,111,124,242, +201, 39, 47,132,132,132, 44,174,175,186,172,103,207,158,239,141, 30, 61,250,253,231,158,123, 78,113,246,236,217,144,138,138, 10, +214,203,203,139, 73, 76, 76, 4,207,243, 56,127,254,188,233,216,177, 99,233, 6,131, 97,249,245,235,215,187,150,149,149,237,191, +114,229, 74,157,145,203,236,236,236, 25,123,246,236, 25,224,231,231,135, 35, 71,142, 96,218,180,105, 71,172,173,173, 59, 60,251, +236,179,222, 86, 86, 86,184,122,245, 42, 12, 6, 3,220,221,221, 93,230,205,155, 55,120,224,192,129, 56,126,252, 56, 22, 45, 90, +244,135,171,171,235,183, 13,153, 96,174,170,109,228,195, 15, 42, 87,174, 92,193, 51,207, 60,131,185,115,231, 2, 0,254,252,243, + 79,155, 1, 3, 6, 68,134,133,133,185, 53,212, 48,191,174, 72,213,191,165, 23,161, 74,165, 98,247,239,223,143,237,219,183,227, +151, 95,126,193,186,117,235, 48,114,228, 72,152,159,150,245,122, 61, 14, 28, 56,128,120,181, 26,114,127,127, 4,123,123,227,240, +225,195,172,147,147, 83,157,225,240,204,204, 76,110,212,168, 81,184,120,241, 34, 60, 61, 61,113,251,246,109,196,198,198, 86,155, + 88, 65, 16,144,144,144,128, 59,119,238,224,206,157, 59, 16, 4, 1,148, 82,201,223,185,159, 79,116, 4,171, 46,236,236,236,190, + 90,187,118,173, 99,247,238,221, 89,141, 70, 3, 65, 16,208,173,107, 87,188,250,218,171, 56,186,103, 39,220,125,251,128,213, 42, + 97,178, 81, 53,108,176,140,182, 64,231, 98,104, 74, 75,161,168,106, 76,122, 45, 77, 91,125, 19,214,104, 52,213,109,123,204,141, +169, 27,140, 30, 25,228, 87,110,222,229,189, 74,202,174, 32, 34,250, 55, 24,245,122,180,244,155, 15,157,209, 9, 86, 46, 19, 81, + 97, 56, 0, 67, 81,229,131,162,204, 54, 12,217,217,121, 0, 97, 26, 28,115,137,154, 44,110, 6, 4,163,214,114,131,149,146,146, + 82,228,238,238,190,253,252,249,243,227, 71,142, 28,137,163, 71,143, 78, 1,128,145, 35, 71,226,252,249,243,184,123,247,238,246, +204,204,204,162, 70, 26, 41, 39, 84,142, 9, 83, 29,245,114,117,117,109,217,188,121,243, 55, 39, 79,158, 28,218,169, 83, 39,108, +222,188, 25, 0, 78, 88,162,151,151,151,247,227,156, 57,115,250,207,154, 53,203,141, 97, 24,114,235,214, 45, 16, 66,224,226,226, + 2,111,111,111, 56, 58, 58,162,168,168, 8,129,129,129, 86,222,222,222,195, 44, 53, 88, 85, 79, 72, 94, 0,138,205, 13, 53,171, +222,165, 0,236, 40,165, 77,234,213, 42, 8,210, 53,199,142, 68,172, 9, 14, 28,196,180,244,177, 42, 6,244,228,114,100,186,149, +145,151,172,111,164, 35,141,189,123,251,118, 75, 42, 8, 40, 43, 44,132,161,180, 20,198,194, 66,152, 10, 10, 64,220,221,193,105, +181, 96,117, 58,176,122, 45, 20, 10, 21,138,115,114, 64, 24, 11,242, 82,141, 2,161,182,168, 21,177,178,250,255,170, 66, 66, 44, +106,196, 42,151,203,127, 94,183,110,157,155,187,187, 59, 86,174, 92, 9, 55, 55, 55,191,190,125,251,230,245,234,213, 75,233,228, +228, 4, 63, 63, 63, 4, 5, 5,225,228,201,147, 96, 89,246,110, 3, 55, 54, 19, 33,100,216,185,115,231,102, 92,188,120,113,148, +187,187, 59, 25, 63,126, 60, 6, 13, 26, 4,185, 92,142,138,138, 10, 20, 22, 22,226,208,161, 67,196,100, 50,117, 7, 0,119,119, +247,230, 45, 90,180,248,153, 16,146,126,255,254,253,241, 22, 24, 44, 85,112,112,112,205,234,107, 85,116,116,180, 11,165,244,217, +160,160, 32,240, 60,255,128, 73,178, 36, 47,113, 28, 87,107,213,171,249, 56, 51, 22, 86,183,154,120, 83,250,224,215,186,253,255, + 3, 19,111,104,230,233,230,205,152, 35, 87, 0, 80, 82, 82,130,148,148, 20, 24,141, 70, 52,107,214, 12, 70,163,209,226,249,217, +250,246,237,251, 74,155, 54,109,186,132,134,134, 34, 41, 41, 9, 1, 1, 1,104,211,166, 77,199,219,183,111, 79, 68, 3,213,203, +117, 84,227,181,177,183,183,223,245,217,103,159, 73,109,109,109,113,229,202, 21,116,232,208, 1, 95,127,253, 53,119,235,214, 45, +159,118,237,218, 33, 62, 62, 30,233,233,233,247, 26,106,139, 36,147,201,166,188,245,214, 91,138,212,212, 84, 60,255,252,243,138, +123,247,238,225,198,141, 27,160,148, 34, 38, 38,198,180,103,207,158,244,138,138,138,167,163,163,163,243, 1,252,212,208, 3, 93, +175, 94,189,222,106,211,166, 13,254,252,243, 79,188,249,230,155,199,172,172,172,198, 22, 21, 21, 77,212,235,245, 95, 15, 29, 58, + 20,221,187,119, 71, 66, 66, 2,134, 13, 27,134,224,224, 96,156, 56,113, 2,115,231,206, 61, 98,101,101,245,114, 3,227, 96, 37, +158, 58,117,170, 99, 80, 80, 80,117,237,134, 68, 34,129,189,189, 61,110,222,188,137,182,109,219, 98,238,220,185, 88,177, 98, 5, +102,207,158, 45, 12, 24, 48,192,164,215,235,165,230,200,102, 19,249,215,244, 34, 36,132,160, 93,187,118, 88,186,116, 41,178,179, +178,176,122,206, 28, 88,191,247, 30, 12, 60,143,212,113,227,160,244,247,135, 77,104, 40,100, 50,153,197,249,158, 16, 2,185, 92, +142,214,173, 91,163, 69,139, 22,120,234,169,167, 16, 27, 27,139,247,223,127, 31, 45, 91,182, 68, 82, 82, 18, 76, 38, 19,100, 50, + 25,108,109,109, 33,210, 68,131, 69, 41, 37, 53,223, 31, 44,188,132,222, 65, 65, 65,108, 89, 89, 25,180, 90, 45,178,179,179,113, +255,254,125, 40,149, 74,164,231,164, 32,164,117, 25,178,136, 30,113, 49,183,121,112,220,181,134,110,138,122,189, 30, 17, 17, 17, +136,136,136,128,224,183, 12,130, 32,152,171, 41,170,163, 87, 89, 89, 89,130,183,183, 55, 74, 74, 74,152,134, 11, 47,221,177, 19, +231,175, 14, 28, 63,242, 25, 89,248,169, 13, 48,234, 76, 40,211,218, 67,163,213,163,180, 66, 2,189,124, 0, 8, 57, 3,134,149, +163,123,151,214, 56,121,238,182, 86, 48, 26,194,235, 47,112, 32, 8,134,124,202,120,141, 35, 66,230,110, 10,190,142, 58,111,150, + 5, 39,179, 70, 69,121,169, 64,169,229, 17, 24, 7, 7,135,173, 91,183,110, 29,217,163, 71, 15,171,126,253,250,181,174,170,190, + 51,110,221,186, 85,227,224,224,176,181,145, 23,222,135,132, 96, 46, 40, 24,185, 76,118,220,177, 89,179, 63,109,108,108,212, 3, + 7, 14,108, 61,104,208, 32,180,106,213, 10, 59,118,236,192,142, 29, 59, 78,100,102,102, 94,176,240, 73,226, 26, 33,100,204,253, +251,247, 95,118,119,119, 31,208,185,115,103, 55, 95, 95, 95,133,157,157, 29, 88,150,133, 70,163, 65, 94, 94,158,185,199,149,175, +165,105,109,209,162, 5,220,221,221,223,149, 72, 36,159, 61,244,164, 98, 2, 48,196,221,221,221,170, 41,153, 56, 46, 46, 46,123, +208,192,190, 46,107,126, 56,223,166,162,130, 55,236,251,227,184,193,168,183,170,184,153,112,183, 81,163,217, 27, 4,225, 88,116, + 84,212,160,158,221,187,203,147,162,163, 97, 44, 42, 2, 95, 88, 8,206, 96, 0,167,209,128,213,233, 64, 42, 42,208,188,139, 10, + 16, 92,113,249, 94,186,201,192,243,199, 45, 53, 88,148, 97,170, 11,126,150,101, 65,172,173, 43, 13,150, 74,245,128,193,106,168, +138,208,213,213, 85, 53,120,240,224,176,192,192, 64, 80, 74,241,213, 87, 95,193, 96, 48,200, 12, 6, 3,140, 70, 35, 12, 6, 3, + 74, 75, 75,177,107,215, 46,252,250,235,175, 23,109,109,109,127,179,224,156,155,188,188,188,166, 10,130,224,108, 50,153, 12,206, +206,206,210,237,219,183, 67,161, 80,128, 97, 24,116,233,210, 5, 10,133, 66,239,225,225, 81, 12, 0, 46, 46, 46,198, 21, 43, 86, +112, 19, 39, 78,148,214,111,126, 5, 24, 12, 6, 36, 36, 36, 88, 73,165, 82, 43,115, 85, 79,219,182,109,115, 76, 38,147,213,237, +219,183, 1, 32, 39, 48, 48,208,220, 94, 38,202,194, 60,138,190,125,251, 98,192,128, 1,213,213,129, 46, 46, 46,208,235,245, 48, +153, 76, 22, 23, 50, 0, 96, 30, 68,116,225, 66,194, 96, 1,240,115,168,205,125, 0,213,213,123,197,197,197, 72, 77, 77, 69,114, +114,114,229, 3,149,209, 8,129, 90,246,148,189,112,225, 66,134, 16,242,209, 43,175,188,130,172,172, 44, 44, 90,180, 8, 31,124, +240, 1, 70,143, 30,141,207, 63,255,252, 3,181, 90,253,179, 37, 3,108, 62, 84,101, 52,126,250,244,233, 86, 46, 46, 46,216,184, +113, 35,246,239,223,159,211,185,115,103,151, 9, 19, 38,192,207,207, 15,113,113,113,248,230,155,111,242, 5, 65,120,209, 2,173, +123,151, 47, 95,118, 53, 24, 12, 72, 79, 79,175,142, 92,164,167,167, 11,167, 79,159, 78,215,106,181,102,115,213, 32, 45, 91,182, +180, 86,171,213, 46,183,110,221,194,182,109,219, 96, 52, 26, 23,198,197,197, 25,236,237,237,183,173, 94,189,250, 3, 95, 95, 95, +135,167,159,126, 26,221,187,119, 7,165, 20, 7, 14, 28,192,167,159,126,122, 68,169, 84,142,173,171, 42,171, 70, 84,253,165,197, +139, 23,127,220,172, 89,179,231,199,141, 27,199,168,213,106, 68, 69, 69,129,231,121,244,237,219,183,218, 92, 29, 61,122,116,251, +145, 35, 71,158, 3, 32,181,182,182,118,180,100, 88, 9, 66,200, 16, 0,230, 8, 65, 57,165,244,240,191,185,208,118,117,115,195, +203, 31,127,140,210,210, 82,108,218,180, 9, 86, 85, 3, 10,215, 52, 78,141, 54, 2, 28,135,230,205,155,195,203,203, 11, 63,254, +248, 35,174, 94,189, 90,221,105,164,169,154,141,141, 94,213,229, 65,158,232, 8,150,217, 24, 9,130,128,140,140, 12, 68, 70, 70, +226,222,189,123,176,182,182, 70,133, 73, 16,190,187,116, 85, 96,136, 36,195, 68,113,145,240,146, 15,235, 45,192, 12, 6,240, 60, +143,139, 23, 47,226,206,157, 59,176,107, 75,205, 13, 19,161,213,106,161,209,104,204,145,171,138,155, 55,111,102, 21, 23, 23, 59, + 54,148,182,236,182,204,230,240,240,227, 51,131,186,116,108,211,175,247,167, 56,120,240, 19, 20,149,148, 64,163,227, 80, 86, 97, +128, 70, 75,225, 97,211, 10,161,157, 3,145,155,175,199,173, 27,209,233,185, 82,135,122,159,196, 40,193,247, 99, 70,246,157,245, +241,123,147, 93, 59,248,205, 83,208,156,195,160,197, 49, 20,230,241, 42, 9, 3,153,181, 19,192,201,105,212,205,188,178,147,177, + 21,121,148,224,251, 70, 24, 2,141,151,151,215,175,211,167, 79,255, 44, 50,242,178, 11, 0, 68, 69, 69,229,100,101,101,125,148, +150,150,102,113, 79, 13, 66,136, 61, 33,152, 43, 8,148,173, 50,105,253,103,205,154,229,209,163, 71, 15,131, 68, 34, 65, 74, 74, + 10,190,252,242, 75,156, 63,127,126, 91,102,102,230,154,198,140,234, 76, 41,189, 10,224, 42, 33,100, 81,108,108,108,191,190,125, +251,126,222,182,109, 91, 47,147,201,132,226,226, 98, 20, 22, 22,226,246,237,219, 40, 47, 47,191, 99, 65,212,238,120,106,106,106, +191,169, 83,167,162, 71,143, 30,175,253,242,203, 47, 47,213, 12, 3,119,234,212,233,210,240,225,195,189,236,236,236,164, 21, 21, + 21,198,132,132,132, 51,141,122,204,244,246,238, 57,115,230,204,206, 83,166, 76, 65, 89, 89, 25, 54,109,218,132, 53,107,214,192, +219,219,187,103,106,106,234,185, 70, 24,192,173,251,195,195,103,117,110,215,174,173, 79,203,150,184,117,236, 24,164, 6, 3, 36, + 38, 19,216,242,114, 72,140, 58,180, 8,178,130, 84,225,132,204,164, 10,108,187,113, 35,153, 82,250, 83,131,213, 79, 79, 63,141, +226,232,104,176, 44, 11,155, 33, 67, 64, 84, 42, 80,149, 10,198,237,219,171,163, 48,220,226,197,149,102,235,153,103, 26, 76,103, +118,118,118,121,155, 54,109, 98,226,227,227,213,237,218,181,195,194,133, 11,145,154,154, 10, 74, 41,114,114,114,180, 57, 57, 57, + 25, 5, 5, 5, 41, 12,195,236, 79, 79, 79,255,217,210,169, 72, 4, 65,112, 62,112,224,128, 57,162,136, 63,255,252, 19, 30, 30, + 30,176,179,179, 67, 73, 73, 9,198,143, 31, 47,251,248,227,143, 1, 0, 49, 49, 49, 18,165, 82,105,145, 17, 50, 24, 12,184,123, +247,110,181,137,172, 50, 63,170,208,208,208,156,170,117,138, 8, 33, 22,247, 34, 52, 27, 55,150,101,255,210,160,189,177,230,170, + 38, 11, 22, 80,129,128, 16, 95,142,189,150,158,149,218,207,195,213, 11,217,217,217, 72, 73, 73, 65, 74, 74, 10, 82, 83, 83,209, +166, 77, 27,220, 79,190, 11,153, 84,114,205, 18,205,243,231,207,247,106,217,178,165,135,151,151, 23,214,175, 95,143,138,138,138, +187,123,247,238,109, 53,126,252,120,248,248,248, 56,241, 60,223, 23,192,145,198,164,147, 97, 24, 47,149, 74,133,138,138, 10, 28, + 56,112,160,192,218,218,186,253,149, 43, 87, 70,223,190,125,251, 75,111,111,111,155,228,228,228,108,131,193, 48, 56, 42, 42,234, +118, 67, 90,101,101,101,111,188,255,254,251, 91, 4, 65,240,125,234,169,167,216,225,195,135, 91,121,122,122, 34, 50, 50,178, 92, +167,211,125, 97,169,185, 2,128,251,247,239,151,157, 61,123, 54,167, 99,199,142, 46,238,238,238,144, 72, 36,139, 61, 60, 60,190, +176,178,178, 90, 50,116,232, 80,135, 29, 59,118, 96,231,206,157,176,178,178,194,253,251,247, 51, 19, 18, 18,190,119,113,113, 89, + 99,137,193,140,140,140,188, 15,224,245,208,208,208, 37,171, 86,173,154, 75, 8,121,233,216,177, 99,213, 6, 96,249,242,229, 56, +122,244,232,246, 22, 45, 90, 76,218,177, 99,199,132,198,214,194, 81, 74,111, 84,221, 83,159,170,241,253,191,165,109,150,209,100, + 50,201, 60, 61, 61,145,149,149, 85, 93, 69,106, 99, 99,243,128,241,225, 56, 14, 54, 54, 54,230, 30,177,124, 94, 94, 94,125,215, +189,201,104, 52,114, 94, 94,149,121,220,172,201, 48, 12, 12, 6, 3,100, 85, 3,150, 74, 36, 18,216,218,218,154,183,243,196, 78, + 57,245,143, 25,172,170, 41, 29, 70,118,238,220,153,187,125,251, 54,170,158, 56, 81, 94, 94,110,226, 88,236,201,190,182,247,245, +122, 12,128,255, 67,227, 65, 93, 92,176, 96, 65,183,215, 94,123, 13,158,158,158, 88,119,217,128,228, 20, 30, 6,131, 1,153,153, +153,184,112,225, 2,223,171, 87, 47,214,100, 50,149,241, 60, 63, 44, 53, 53,117, 44, 33, 36,171, 94,205, 29, 59,120,231,128,231, +199,172, 94,251,227,201,215, 94,123,205, 97,248,136, 53,136,137,187,142, 66,141, 11, 0,192,195,201, 10,161,237,222, 71, 78,190, + 14, 71,255, 56, 88, 68,133,242,151,233,149,109,198,250, 52,111,222,163, 63,249, 55, 39,167, 95,153,252,209, 59, 93,252, 91, 14, +120,119,234,115,205,218,122,141,144,163, 40,130,202,109, 75, 33,179,114, 70,252,189,188,138,195, 23, 51,242,243,138, 77,127, 18, + 30,223,220, 76,161,247,235,211,124,152,130,130,130,115, 25, 25,233,206, 53, 70,109,119,150,203, 21,231, 26, 48, 84,245,106,154, +135, 83, 56,114,228, 8,206,158, 61,107,184,115,231,206,105, 66,200,129,140,140,140,107, 77,213,164,148,150, 2,216,109, 99, 99, + 35,104,181,218, 79, 6, 15, 30,220,134, 16,130,196,196, 68,156, 56,113,226, 84, 94, 94,222, 23, 13,105,150,151,151,191,245,206, + 59,239,124,223,175, 95,191,254, 85, 61,158,100,183,110,221, 2,165, 20,193,193,193,232,222,189,187,175, 94,175, 23, 46, 93,186, + 84,112,232,208,161,109, 90,173,118, 69, 99,210,153,154,154,122, 46, 56, 56, 24, 0, 80, 81, 81,129,180,180, 52,152, 76, 38,100, +100,100, 52,234,120,238,216,177,131, 15, 13, 13,125, 97,213, 79, 63,157,156,241,252,243, 14, 93,135, 15, 71,250,197,139,208,103, +100, 64,198,243,144, 73, 21, 48,106, 92, 80,144,174,197,134, 27, 55, 74,244, 60, 63,246,225,194,161,182,116,154,205, 0,203,178, +128, 74, 5, 88, 91,131,169, 28, 67,236,129,104, 22,107, 99, 3, 72, 36,127,121, 90,172, 77,179,162,162,226,229,201,147, 39, 71, + 28, 62,124,216,126,236,216,177, 24, 62,124,248,213,146,146,146, 65,121,121,121, 22,213,109,215,166,201, 48, 76,238,144, 33, 67, +156,117, 58,157,233,165,151, 94,226,242,242,242,224,231,231, 7, 0, 40, 45, 45,197, 31,127,252,129,118,237, 42,155,161,220,184, +113, 3, 29, 59,118,108, 80,211,108,176,204,198,202,108,178,226,227,227,173,164, 82,169, 21, 33, 4, 38,147,201,165,109,219,182, + 65,141,201,159,148,210, 7,204, 21,199,113, 40, 47, 47,183,200, 92,213,151,151, 40, 40,117,214,144,133,175,207, 30, 19,122,124, + 91,132,181,149,149, 85,117,225,211,186,117,107,112, 18, 14, 27,247,126,167, 41, 46,205, 95,100, 97, 58, 95, 10, 9, 9, 65, 69, + 69, 5, 98, 98, 98,120,137, 68,242, 82,108,108,236, 69,141, 70, 35,233,220,185, 51,146,147,147, 95,168,203, 96,213,163,121, 47, + 45, 45, 13, 45, 91,182,132,189,189,189,173,209,104, 52, 93,185,114,229,183, 78,157, 58,237,185,125,251,118, 75,185, 92,158, 28, + 21, 21, 85,102,137,102,116,116,116, 42,128,158, 97, 97, 97,220,245,235,215,147,123,245,234, 5,153, 76,134, 54,109,218, 88, 39, + 38, 38,142, 69, 3, 61, 27,107,106, 82, 74, 5, 79, 79,207,213,151, 47, 95, 94,212,165, 75, 23,188,244,210, 75,207, 68, 69, 69, + 61, 19, 16, 16,128, 86,173, 90,225,252,249,243, 56,117,234,212, 54, 65, 16,102,100,102,102,106,235,123,224,171,107,223,171, 26, +173,191,161, 86,171, 71, 85, 25, 10, 54, 61, 61,157, 61,118,236, 24, 40,165,111,215,215,166,173,161,123,221,195, 88,210,230,170, +177,154, 77,185, 54, 9, 33,203,198,142, 29,187,112,222,188,121,108,167, 78,157, 80, 80, 80,128,156,156, 28,152, 59, 55,200,100, + 50,248,248,248, 64,169, 84, 34, 41, 41, 9,209,209,209,188, 78,167, 91, 86, 51, 42, 88, 75, 58, 23,190,252,242,203,159,190,255, +254,251,127,209, 4, 0,185, 92, 14, 31, 31, 31, 40, 20, 10,220,191,127, 31,209,209,209, 60,128,133,127,247,190,255,207, 25,172, +162,162,162,247,230,207,159,223,123,226,196,137,142, 21, 21, 21,172,147,147, 19, 50, 50, 50, 76,199,142, 29, 43, 44, 43, 43,123, +175, 49, 27, 99, 89,118, 80, 70, 70,198,184,153, 51,103, 46,106,211,166,141,227,235,175,191,142,183,222,106, 7,189, 94, 15,185, + 92, 14,169, 84,250,195,193,131, 7, 71,219,219,219,167, 31, 56,112, 32, 21,192, 50, 75,116,115,175,238, 74,116,235, 50, 98,192, +183,223,174,217, 18, 24, 28,234,221,162,101, 75,121, 79,111, 59, 24,140, 60,178,115,242,113,250,194, 77,221,173,184, 43,105, 48, +105, 95,201,190,126,224,166, 37,154,215, 43, 13,211, 59,157, 91,147,128,151,222, 92, 62,179, 87, 72,171,174,111,191, 20,236, 80, + 34, 20,211, 61,251,239, 20,220, 75, 45,187,204,177, 88,117,227, 62,189,218,148, 3,175,213,106, 13, 15, 71, 93,181, 90,173,161, +145, 97,213, 34, 66,200,151, 12, 67,230,130,130,145,201,100, 17,107,214,172,217, 4, 32,157, 82, 26,145,145,145, 81,241,184, 50, + 74,105,105,233, 94, 66, 72, 76, 98, 98,226, 44,134, 97,236,121,158,191,153,157,157,189,157, 82,218,208, 40,225,168, 26,236,242, + 57, 47, 47,175,167,207,157, 59,183,108,232,208,161,254,207, 62,251, 44,178,178,178,192,113, 28,174, 94,189,170, 63,116,232, 80, + 68, 81, 81,209,167,148,210,200,198,166,173, 42,130,133,169, 83,167,162,180,180, 20,219,182,109,195,209,163, 71, 27, 29,193, 50, +223,192, 67, 67, 67, 7,124,246,243,207, 91,135,180,107,215,188, 93,171, 86, 82,159,142, 29,161, 84,169, 80,156,159,143,171, 73, +153,252,111, 9, 9,247, 43, 76,166, 87,162,163,163, 45,202, 75, 6,131, 1, 78, 78, 78,160,148, 66, 57,127, 62, 40, 33, 16, 40, + 69, 25, 33,213, 99,251,200, 67, 66, 96,226, 56, 20, 86, 13,143,208, 80, 15,184,244,244,244,116,111,111,239,177,111,191,253,246, +225, 77,155, 54, 49, 97, 97, 97,157,247,239,223, 79, 31,229, 28,167,165,165,181, 1, 0, 15, 15,143,108, 91, 91, 91,238,245,215, + 95,135,209,104, 68,121,121, 57, 74, 74, 74,144,159,159,175,159, 57,115,166, 12, 0,100, 50,153,113,208,160, 65, 13,222, 63, 42, + 42, 42, 96, 52, 26, 65, 8,121,192, 96,221,185,115,231,225,136, 86,163, 48, 71,213,171, 26,223, 86, 79,147,243, 56,200,189, 70, +175,182,236,110,255, 85,159, 49,193,239,127, 54,103,165,149,147,179, 19, 76, 38, 19,238,165,220,197, 79,123,190,215,148,232,138, +190,204,187,222,240, 28,156, 97, 97, 97,114,137, 68, 50,188, 75,151, 46,136,138,138,130, 94,175, 63,115,252,248,241,248,190,125, +251, 30,191,122,245,234, 96, 63, 63, 63, 48, 12, 51, 36, 44, 44,204,234,212,169, 83,141, 25, 99,232,110, 70, 70, 6,140, 70, 35, +156,157,157,185, 91,183,110, 53, 7,112, 47, 54, 54,182, 28,192,141,166,236,243,169, 83,167, 76, 61,123,246,188,115,253,250,245, +224, 22, 45, 90,144,136,136, 8,141, 86,171,221,218, 88, 29, 87, 87,215,111, 15, 30, 60,216,131, 82,218, 63, 48, 48, 16, 62, 62, + 62,230,168, 61,206,156, 57,179, 35, 61, 61,125,242, 99,154,220,153, 18, 66, 80, 90, 90,202, 86, 21,246, 6,107,107,235,166,234, +150,215,136, 92,149,255,219, 10,233,168,168,168,149,106,181,250,192,212,169, 83,231,250,248,248,188,248,238,187,239,178,237,218, +181, 67, 73, 73, 9, 66, 67, 67,225,226,226,130,248,248,120, 28, 59,118,140, 47, 44, 44,220,197,178,236,210,152,152,152,196, 6, +204,227, 10,181, 90,189,127,234,212,169,115, 91,182,108,249,226,236,217,179,217,246,237,219,163,184,184,184, 90, 51, 46, 46, 14, +135, 15, 31,230,139,139,139,127, 7,240,197,255,202,124,143,143,213, 44, 91, 82,107, 84, 53, 76,195, 87, 60,207,247, 54, 71,181, +138,138,138,222,107,104,126,187,186, 28,110, 88, 88, 24,167, 84, 42,199,229,229,229, 45,242,242,242,114,124,253,245,215,241,225, +135, 31, 34, 54, 54, 86, 53,114,228, 72, 71,142,227, 76, 59,118,236, 40,105,236, 19,131,121,178,103,112,210,193,160,130, 63, 0, + 2,134,109,112,178,103, 75,156,120,167, 86,164, 15, 79, 49,169,242, 15, 88, 31,119,151,158,122,212, 39,155,154,147, 51, 83,138, + 6, 39,118,174, 75,179,182, 70,238, 77,125, 90,250, 59,158,192, 30,250,141,184,187,187,143,145,201,100,223,142, 25, 51,198,234, +151, 95,126,209,230,228,228,204, 4,176,173,190, 57, 3, 27, 74,167,135,135, 71,185,143,143, 15, 28, 29, 29, 81, 80, 80,128,228, +228,100,100,100,100,168,154,154,206,154,147, 61,163,106,178,103,106,193,100,207, 15,107,118,237,218, 53,201,104, 52, 58, 55,230, +248, 73, 36,146,124,185, 92,238,107,222, 70,125,233,244,244,244, 28,227,229,229,181, 56, 61, 61,125, 95, 90, 90,218,220,199,113, +142, 60, 61, 61,187, 18, 66,246, 8,130,160,120, 56,194,101, 54, 97,238,238,238,205,101, 50,217, 3,141,220, 31,214,124,104,160, +209, 6,203,145,218,170, 8,107, 75,231,152, 49, 99, 98, 13, 6,131,143,133,199, 50,151, 16,242,192,196,217,150,230,121,167, 46, + 68,109,167,108,246,137,222, 96,236,196, 16, 80,137, 68, 18, 91, 92,154,191,168, 54,115, 85,155,230,192,129, 3, 29, 28, 29, 29, +211, 62,249,228, 19,172, 93,187, 22, 55,111,222,156,116,252,248,241,173,253,250,245, 27,213,162, 69,139, 95,199,141, 27,135,181, +107,215, 34, 55, 55,183,231,137, 19, 39,174, 88,122,142, 66, 67, 67,219,251,250,250, 70,206,159, 63,159, 44, 94,188, 24,169,169, +169,234, 75,151, 46, 37, 60,234,121,239,218,181,171, 15,203,178, 63,243, 60,239, 75, 8,249,229,210,165, 75,159, 90, 98,134, 30, +214,236,216,177,163,180,184,184,248, 77, 47, 47,175, 25,174,174,174, 46,217,217,217, 41,169,169,169, 95,103,102,102,254, 98,169, +185,178,228, 28,169,213,234, 66, 0, 50, 0,176,164,189,213,127,250, 94,247,119,104,170,213,106, 95, 0,115,189,189,189, 95,156, + 58,117, 42,123,251,246,109, 28, 57,114,132,207,203,203,219,197,178,236,210,186,134,165,176, 68,211,199,199,231,197, 41, 83,166, +176, 85,211, 24,241,249,249,249,245, 26, 43, 49,130,245,152, 12,214,223,149,249,204, 70,171,176,176,240, 67,107,107,235, 59,225, +225,225, 67,254,109, 25,250,239,214, 36,132,184, 84, 69,163,114,254,151,246,157, 16,194, 41, 20,138, 32,173, 86, 27, 79, 41, 45, +121, 76,154, 31, 2,248, 0,192, 18, 74,233,231,255,107,121, 73,212,252,119,105, 86, 13,207,176,215,193,193,161, 95, 97, 97,225, +117,147,201, 20,118,234,212, 41,157, 90,173,150,216,219,219,111,177,181,181, 29, 82, 82, 82,114,174, 71,143, 30,131, 23, 44, 88, + 32, 52, 38,157, 65, 65, 65,159,178, 44, 59,198,100, 50,109,139,142,142, 94,252,111, 60,158,132, 16,226,227,227, 35,171,111,144, + 91, 49, 47, 53,217, 92,250, 2,120,147, 16,194, 84,141,216,159,248,184, 52,171, 22,215, 52, 20,177, 18, 13, 86,195,112,255,228, +198,171,158,208,127, 65, 35, 38,227,125,210,176,196, 88, 61,161,251,109, 2,112,233, 49,107,126, 14,224,115,241,178, 22,249,151, +228,113, 10, 96, 68,191,126,253,188,143, 31, 63, 94,221, 72, 58, 58, 58,218, 24, 22, 22, 54,182,162,162,194,222,100, 50, 21,213, +102,174, 26, 34, 42, 42,234, 83, 0,159,254, 23,236,191, 78,204, 9,143,159, 42,243, 51,231,223,174, 41, 26, 44, 17, 17, 17, 17, +145,191,141,154,230,234,161,135,203, 60,241,232,136,136, 60,185, 16, 0,254,117, 60,125, 88, 28,250, 35,132,248, 55,118,195, 22, + 84,247,136,154,162,166,168, 41,106,138,154,162,166,168,249,132,105, 54,164,253,164, 84, 61,254,163,109,176, 68, 77, 81, 83,212, + 20, 53, 69, 77, 81, 83,212, 20, 53,159, 68, 24,241, 16,136,136,136,136,136,136,136,136, 60, 94, 44,110,131,213,169, 53,241,228, +141, 24, 6, 22,131, 0, 0, 60,142,176, 18, 28,136, 77,164,233, 77,221,184,155,155, 91,123, 66,200, 43, 12,195,140, 6, 32, 8, +130,176,131, 16,242, 91, 70, 70,198,237,166,106,134,134,134,182, 55,153, 76, 47, 18, 66,158, 3, 0, 74,233, 94,142,227,126,143, +136,136,136,183,228,255, 74,165, 50, 73,171,213, 58, 3,128, 66,161,200,213,106,181, 45, 81, 53,234,248,232,209,163, 73, 94, 94, + 30, 1,128,211,167, 79, 83, 0,180,114, 19,245,135, 1,229,114,121,146, 94,175,255, 75, 87,125,137, 68, 98,176,183,183, 47,106, +214,172, 89,145,179,179,115,161, 84, 42,189,145,151,151,119,250,234,213,171, 81,148,210,172,198,236,119,239,222,189, 63,150,203, +229,211,245,122,253,186, 83,167, 78,125,252,119,103, 28, 66, 72,176,183,135,219, 58,163,209, 32,100,229, 22,124, 74, 41, 61,216, +152,255,183,110,221, 90,230,233,233, 73, 30,238, 90,189,106, 10,113,163, 12,152, 89,107, 27, 30, 95,171,129,244, 5, 74, 36,146, +169,174,174,174, 3,210,210,210, 98, 0,124, 72, 41,141, 23, 47,121, 17, 17, 17, 17,145,127,220, 96,169,213, 68,169, 45, 65, 63, + 8, 24,214,182,165,107,232,172,169,163,155, 5,117, 27,168, 42, 47, 55,208, 51, 39, 14, 6,111,216,114,224,173,167,124,201,101, +158,224,128,210, 14,225,209,209,180,206,129, 45,191,121,151, 75,226,121,222, 25, 0, 4,112,154,149, 59,156, 19,131,131,131, 3, +230,204,153,131,208,208, 80, 8,130,128,211,167, 79,207, 90,185,114,229, 44,119,119,247, 40,150,101, 55, 75,165,210,157,247,238, +221,107,176, 11,127,112,112,176,151, 32, 8,163, 1,188,208,181,107,215,142,211,166, 77, 67,155, 54,109,160,211,233, 16, 17, 17, + 49,103,243,230,205,115,212,106,117, 28,128,237, 12,195,236,140,140,140, 76,171, 75, 75,171,213, 58,155,253, 18, 33,196,121,242, +228,201, 26,163,209, 8,189, 94, 15,163,209, 8,107,107,235, 56,173, 86,123,173,103,207,158, 81, 54, 54, 54, 23, 14, 29, 58,116, + 7, 0,223,193, 85, 25,226,227,229, 52,232,112, 84,202,167, 15,107,234,245,122,103,109, 68, 4,192,243, 48, 37, 39, 67,219,175, + 31,170,230,141,147,178,131, 7,187,152, 24,198,133,148,149,221,213,254,246,219,218,118,237,218, 85,119,183,173, 79,243, 33, 51, + 65,166, 78,157, 58,103,222,188,121,146,151, 95,126,249,245,176,176,176,133,117,141,211,100,169,102, 3,219,147,119, 13,234,252, +199,129, 93,219, 20, 32, 4, 35, 71,142,254,153, 16, 50,137, 82,186,247,225,117,187,116,233,210, 87, 42,149,126,106, 50,153, 98, + 56,142,251, 56, 34, 34,162, 52, 40, 40,104,151,147,147,211, 32,189, 94,143,192,192,192,139, 49, 49, 49,253, 0, 96,237, 27,100, +161, 12,152, 5, 30,100,221, 27,100,245,148, 13,116, 94, 19,211, 55,249,181,215, 94,251,250,243,207, 63,103,221,221,221,145,158, +158,222,191, 67,135, 14,109, 8, 33, 65,148,210, 10,241,178, 23, 17, 17, 17, 17,249,199, 12, 86,251, 86,228, 69,149, 92, 58,123, +222,155,207,186, 13, 30, 52,212,198,209, 43,144, 3, 97, 43, 35, 50,182, 32, 35, 95,153, 99, 53,226,229,119,172,238,199,157,247, + 60,116,248, 96,255,223,246,156,200,108,223,138,172,136,191, 75,127,175, 77,143,231,121,231,217, 19,167, 1, 0, 86,108, 92,107, +149,144,144, 16, 96,109,109,253,192,180, 32, 3, 7, 14, 68,255,254,253,145,146,146, 18,180,107,215,174,160,159,127,254,249, 75, + 47, 47,175, 5,105,105,105,223,213,109, 2,213,139, 61, 61, 61,103,205,153, 51,135, 4, 5, 5, 65, 46,151, 87,255,102,101,101, +133,190,125,251,162,111,223,190,200,202,202,234,120,234,212,169,142, 91,182,108, 89,164, 86,171, 87, 70, 71, 71, 91, 20,229, 25, + 59,118, 44,242,243,243,145,159,159,143,146,146,146, 76,141, 70,147,171,213,106, 51, 21, 10,197,237, 62,125,250, 36, 2,224,253, + 60,108,218, 58, 59, 53,219,181,244,179, 69, 64, 61, 93,167, 51,186,119, 7, 0, 84, 92,255,255,106,107, 21,165, 20, 82,233, 45, + 46, 51,115, 95, 77,115,101,169,102,149,193,116,184,119,239,158, 32,149, 74,209,174, 93, 59,201,173, 91,183,146,194,194,194, 54, +156, 58,117,234,129,169, 13, 26,163,217, 0, 65,159,190,247,150, 52,239,238, 21,196, 95, 56,134, 17,106, 47, 69,204,141, 91, 11, + 0,252,197, 96,177, 44, 59,239,240,225,195, 1,151, 47, 95, 14, 88,176, 96, 65,107,181, 90, 61, 28, 64,159, 35, 71,142, 64, 34, +145,160,111,223,190,221,194,194,194,154, 73, 77,185,195,134,183, 33,115,222,156, 53,149, 0,192,250,239,215,191,189,230, 45,178, +250,205,213, 52,173, 17,198, 74,202,178,236,202, 77,155, 54,189, 54,126,252,120, 36, 39, 39,227,220,185,115,176,182,182,198,226, +197,139,125,230,204,153,179, 16,192,123,226,101, 47, 34, 34, 34, 34,242,143, 25, 44,150,226,189,136,203,113,109, 25, 83, 62, 33, + 18,219, 90,215, 97, 24, 14,173,252,123,115, 83, 91, 62,101, 63,184,255, 0,219, 81,175,205,122, 15,192,239,150,108,216,198,198, +166, 14, 77, 6, 45, 90,180,192,187,239,190,139,128,128, 0,217,171,175,190,250, 17,128,239,234,145,154,181, 99,199, 14, 82, 61, +215, 91, 29,184,185,185,161,127,255,254,112,115,115, 35,239,189,247,222, 44, 0,181, 26, 44,133, 66,145, 75, 8,113, 6, 0, 71, + 71, 71,172, 93,187, 22, 70,163, 81, 40, 47, 47,191, 94, 94, 94,126,213, 96, 48, 68,202,229,242, 75,103,206,156, 73, 4,128,182, + 94, 74, 15,149, 76,117, 96,253,218,239, 96, 44,205,118,168,107,251,124,218, 95,125, 2,165,180,152, 81, 42,147, 37,247,239,239, +146, 22, 23, 71,155,191,183, 84, 19, 0,122,246,236,105,111,101,101,117,122,205,154, 53, 18,169, 84,138, 73,147, 38, 89,101,100, +100,224,171,175,190,122, 19, 53,230,142,106,140,102, 61, 6,166, 91,207, 80,245,254,111,151,125,162, 12, 12,237,137, 75, 59,215, +160,168, 72,131,178,210,114,240, 2,149,215,246, 31, 74,105, 65, 98, 98, 34, 6, 15, 30,140,204,204,204,167,215,173, 91,183, 78, + 16, 4,162,209,104,170, 39,106,181,182,182,190,211,187,123,152,140,185,187,168,201, 25,153, 16,226,108,107,107,187,253,232,209, +163,193,193,193,193,184,116,233, 18,238,222,189,139,183,222,122, 75,255,214, 91,111, 73, 95,125,245, 85, 50,123,246,236,105,132, +144,189,148,210,139,226,165, 47, 34, 34, 34, 34,242,143, 24, 44, 0, 44,171,106, 77,244, 39, 71, 9,172, 83,111,194,186, 15, 37, + 68,225,241,192, 10,154,252, 36, 36, 92,220, 68,147, 98,247,211,230, 1,175, 16, 0,236, 67,133,107,117,168,134, 97,217,188, 21, + 27,215, 58, 1,128, 76,217, 12, 59,118,236, 64,191,126,253,176,235,219,142, 40, 43,206,172, 44,104,237,220,241,252,140, 56, 36, + 36, 36,224,252,249,243,230,137,102, 37,117,105,154,203, 86, 68, 69, 33,183, 71, 15,200, 10, 10,160, 82,169,170,103, 2, 55,115, +235,214, 45,156, 57,115, 6,201,201,201,104,213,170, 85,229,127,234,208,172,168,168,104, 49,126,252,248,188, 87, 94,121, 69,249, +203, 47,191,224,222,189,123,110, 17, 17, 17,165,181, 29,160,128, 22,246,118, 82, 65,122, 96,227,218,149, 18, 24, 52, 14, 9,145, +231,241,212,224, 41,181,166, 83,219,187,119,117,228, 74, 25, 26, 10,166,101, 75, 3,145, 74,111, 23,172, 95, 63, 32, 48, 48,208, +216, 88,205, 94,189,122,125,192,243,252,219,130, 32,200, 55,110,220, 40,113,114,114, 98, 86,172, 88, 97, 60,118,236, 24, 79, 41, +101,164, 82,233,154,166,164,179, 62,228, 50,201,186,181, 95,126,164, 36,134,114,196, 28,254, 13,105,201, 41,184,118, 39,221,248, +251,185,155,188,222,104,154, 90,219,241,228, 56,110,198,252,249,243,187,108,220,184,209,253,141, 55,222,128, 84, 42,125, 33, 63, + 63, 31,219,182,109,131, 74,165,194,218,181,107,209,162, 69, 11, 25,207,243,184,114, 48, 31,107,191, 89, 13, 80, 10,173, 81,186, +117,246, 38, 83, 90, 61,231,189,166,185,234,232,227,227,115,224,228,201,147, 46,158,158,158, 56,117,234, 20,178,178,178,224,238, +238,142,183,222,122, 75,182,108,217,178, 45, 37, 37, 37, 35, 63,255,252,115, 69,108,108,236, 47,132,144,182,180,146,199,222, 3, + 70,212, 20, 53, 69, 77, 81, 83,212,252, 91, 8, 6,224, 12, 32, 23, 64,228, 67,203,168,250,140, 90,150,243,170,202,252,102, 53, +180,242, 80,217,134,218, 25, 0, 15,224, 50,128,194,191,197, 96, 17, 66,122, 3, 56, 5, 96, 33,165,244,211, 7,214, 16,140,224, +115,142, 83, 62,231, 79,202, 56, 4, 17,214,125, 4, 41, 44,214, 34,254,226, 79, 52, 51,225, 36, 69, 85,123, 37,131,190,180,222, + 13,125,179,219,203, 79, 38,147, 21,196,199,199,227,207, 63,255, 4, 0,236,222,189, 27,101,197,153,168, 81,117,136,175,191,254, + 26, 38,147, 9, 12,195,192, 96,176,108,238, 99,170,171,108, 39,173,215,235,161,215,235, 65, 66, 66, 32,121,250,105, 36,190,245, + 22,142, 31, 63,142,220,220, 92, 72,165, 82, 72,165, 82,139, 38,132, 53,153, 76, 36, 39, 39, 7, 90,173, 86, 48,213,241, 7, 47, + 47,162,176, 49,169,118,125,183,242,115, 27, 27,107,149, 75,212,177,189, 72, 78,174,187, 93,186,209,104,252,255, 40, 93,171, 86, + 21,224,184, 24,201,149, 43,191,215, 52, 87,141,209,228,121,254,157,173, 91,183, 90, 21, 22, 22, 66, 42,149,226,139, 47,190, 48, +158, 61,123, 54,195,100, 50, 61, 29, 29, 29,157,223,212,116,214, 7,203, 73,127, 30, 50,102,226,226, 69,175,245, 69, 69,185, 22, +123,206,198,225,207,216,251, 99, 0, 92,164,148,214, 58, 89,109, 68, 68, 68, 78,104,104,232,168,153, 51,103,158,248,249,231,159, +149,227,198,141, 3,207,243,213,175,242,242,114,156, 60,121, 18,103,207,158, 69,116,244,181, 52, 41,109,247,167,155,170,116,251, +111, 71, 45,155,164,153, 16,226,222,178,101,203, 67, 17, 17, 17, 78, 42,149, 10,225,225,225, 40, 42, 42,194,155,111,190, 89, 29, +185, 42, 42, 42, 26,189,118,237,218,151,147,146,146,150,156, 63,127,190,160,234, 65,192, 4, 17, 17, 17, 17,145,127,156,122, 61, +200,255,227, 76, 8, 57, 72, 41, 29, 10,160, 31, 0, 89,141,101, 16, 66, 14, 86, 25,191, 7,150,231,205,155,247,193,210,165, 75, +111,152,151,205,235,204,159, 63,255,169,101,203,150, 45,233,214,173,219,182, 11, 23, 46,220,251,219, 12, 22,128, 83,148, 82,210, +128,141,129, 80, 24, 73,133,194, 72,250,231,209, 91,127, 53, 37,186,226, 70,111,220,219,219, 27,113, 55,255, 98,110,170, 63, 91, +106,176,208,163, 7,144,153, 9,184,187, 87,166, 52, 51, 19, 6, 0, 63,204,159, 15,153, 76, 86, 93, 21, 85,101, 76, 26,148,211, +235,245, 36, 55, 55,151,106,181,218, 88,157, 78,103,170, 37, 51,144,214,174,182,191, 45,152,247, 86,243,150,173,218,184, 71, 28, +218,142,123,247,210,145,157, 93,251,249,177,182,182, 46, 51, 26,141,214, 85, 39,246, 42, 97,152,124,229,149, 43, 59, 1,196, 53, + 85,147, 16,114,100,220,184,113, 67, 67, 67, 67, 73,251,246,237,101, 39, 78,156, 48,241, 60,255,128,185,106,172,102,125,120,120, +120,244, 27, 59,118,236,167,147, 39, 79,198,200,193,253,241,122, 31,127,164,100, 23, 25, 1,156,168,111,146,230, 42,147,117, 93, +173, 86,191, 60,122,244,232,111,124,125,125,189, 1, 32, 32, 32, 0, 47,191,252, 50, 86,173, 90,133,240,240,240, 95, 0,108,140, +142,142,190,210,200,139, 82,229,224,224,176,239,196,137, 19, 78, 42,149, 10,199,142, 29, 67,121,121,249, 95, 34, 87, 75,150, 44, + 81, 36, 37, 37,173, 56,122,244,104,123, 0, 76,213, 52, 61, 34, 34, 34, 34, 34,255, 14, 44,240, 32,213,247,253,131,148,210,161, + 53, 13,211,195, 70,203,252,217,188,222,210,165, 75,135,214, 52, 95, 0,176,108,217,178, 37, 53,150,203,255,142,157, 50, 27,172, + 48, 66, 8, 5, 16, 70, 41, 61,221, 20, 33,163,174,180, 73, 35,150,202,148,205,176, 98,227,218,202,131,196, 61,216, 46,203,226, + 8, 86, 35, 6, 75,181, 36,130,101, 48, 24,132,194,194,194, 36,141, 70, 19,125,243,230,205,191,152, 7, 79, 79,207,165,221,122, +118,237,222,166,115,136, 50,226,200,110,220,185,157,140,188,188, 98,128, 82,109,109,122,142,142,142,249,204,180,105,214,170,204, +204, 34, 70, 16,210,125, 98, 99, 95,124, 84,205,243,231,207,191, 22, 26, 26, 26,120,225,194,133,112, 91, 91, 91, 0,160, 53,205, + 85, 83, 52,107, 49, 85,221, 56,142,219,207, 48,140,114,224,192,129,152, 49, 99, 6, 86,173, 90,101, 42,172, 48, 44, 92,177,255, +210,155, 26,157, 97, 90, 67,230,202, 76,116,116,116,248,152, 49, 99, 58, 94,189,122,213,131, 82, 58,200,193,193, 97,133,209,104, +132, 32, 8,160,148, 30, 48,153, 76,183,131,130,130,182, 58, 59, 59,247,205,201,201,217, 26, 29, 29, 61,179,129,139,140,145, 74, +165,191, 28, 63,126,188,131,135,135, 7,194,195,195, 81, 94, 94, 94, 29,185,122,237,181,215, 30,136, 92, 93,184,112,161, 64, 52, + 87, 34, 34, 34, 34,255, 74, 44,246, 32,102,211,244,176,201,106,140, 57, 3, 80, 49,111,222,188, 15, 8, 33, 7,171, 34, 92, 21, + 0, 50, 30,247, 78, 49, 85, 9, 62, 93,229, 30, 79, 61,184, 39,150,151, 69, 6,125, 73,147, 18,208,250,233, 45, 8, 28,113, 26, +247, 12,111, 34,155,153,250,112, 36,201, 50,131,181,123,119,101,244, 42, 51,243,255, 35, 89, 85,209,172,166, 24,172,178,178,178, +235, 5, 5, 5,177,197,197,197,151, 0, 8, 15, 69,221,166,118,238,220,249,181,245,191,108,182, 57,112,228,100,121,116,228, 13, + 77,118, 78, 17,202, 13, 70, 67,108, 74,246,154,218,244, 92, 92, 92, 10, 41, 80,192, 25,141,199,101,215,175,239,172, 37,146,215, +104,205,170,200, 80, 12,128,131, 71,142, 28,185,195,178,236,183,143, 67,179,166,185,106,214,172,217,190,205,155, 55, 43,119,237, +218,133, 9, 19, 38,224,203, 47,191,196,145, 35, 71,158,215,104, 52, 43,202,180,250, 86,148,210,227,150,158,231, 85, 83,136, 91, +111,167,157,238, 28,199,217, 53,107,214,108,209, 43,175,188, 2,147,201,132, 62,125,250,192,217,217,121,155, 84, 42, 61, 61,113, +226,196,225,203,151, 47, 87,181,108,217,114,146, 90,173,118,107, 64,242,179, 45, 91,182, 12, 14, 8, 8,192,249,243,231, 81, 92, + 92, 12,119,119,119,188,253,246,219,178,101,203,150,109,253,246,219,111,181, 75,151, 46,149,246,239,223,127,197,209,163, 71,187, +148,151,151, 15, 16,205,149,136,136,136,200,191,143, 58, 61, 72, 61, 38,171,137,219, 49,255, 79,178,116,233,210, 27,148,210,161, +203,150, 45, 91, 2, 64,249,183, 69,176,170,156, 35, 0,132, 61,232,175,202, 44,143, 96,105,235, 55, 88,239,140, 74,187, 37,240, + 60, 86,205, 97, 33, 83, 54, 67,235,167,183, 52, 24,149,106,108, 27,172, 90,220,234, 95,150, 45, 49, 88,229,229,229,209, 57, 57, + 57,119,239,223,191,127,182,230, 32,162,222,222,222,195, 92, 93, 93, 23,111,217,178, 69,153,145,145, 1,175,182,254,182,107,119, +254,174,115, 85,201,181,169, 69, 5,147,175,165,149,237,169, 77, 79,161, 80,196,211,164,164,155,178,132,132,163, 4,184,241,144, + 17,106,146,166,153,139, 23, 47,190, 86,139, 97,123, 36, 77, 15, 15,143,110, 78, 78, 78,251,190,255,254,123, 85, 70, 70, 6,164, + 82, 41,172,173,173,113,226,196, 9,100,100,100, 28,111,108, 38, 91, 51,137,124, 40, 19,240, 62,120, 48, 61,188,211,117, 47,190, +255,189,210,209,209, 17, 87,174, 92, 65,135, 14, 29,176,124,249,114,217,173, 91,183,218,183,107,215, 14,183,111,223, 70,102,102, +102,124,116,116,116, 86, 61, 79, 33,195, 39, 79,158,252,206,243,207, 63,143,203,151, 47, 35, 51, 51, 19,211,166, 77,211,191,253, +246,219,210, 87, 95,125,149, 20, 23, 23,143, 94,179,102,205,203,247,239,223, 23, 35, 87, 34, 34, 34, 34,255,114,234,242, 32,245, +112, 8,192,179, 15, 71,181, 30, 54, 95,230, 8, 85,205,229,135,215,175,250, 93,251,119,236, 23, 87,181, 49,242, 87,131, 3, 65, + 48,228, 83,198,107, 28, 17, 50,119, 83,240,117,108,159,101,193,201,172, 81, 81, 94, 42, 80,250, 96,180,167, 38, 2,207, 59,213, +108,204,206,178,108,157,237,161, 88,150,133,157,157, 29, 74, 75, 75, 1,192,216,192, 62,240,198,231,159,103,101,207, 61, 7,131, +155, 27,168,193, 80, 25,197, 2,128, 15, 62,120, 96, 69,169, 84,106,142,138,213, 91,173, 85, 82, 82,114, 57, 58, 58,250, 2,165, + 52, 7, 0,122,247,238,189,154,231,249, 97, 86, 86, 86,246,147, 38, 77, 50,228,229,229, 97,207,158, 61,248,233,167,159, 42, 52, + 6, 54,166, 72,111,122, 35, 49,189,172,206, 17,237,243,242,242,254,244,142,143,223, 85,243,187, 71,213,172,141,199,161,233,225, +225,209,205,197,197,165,218, 92,201,229,114, 88, 91, 91, 35, 61, 61, 29, 28,199, 53,122,144,206,173,111, 18,123, 80,188, 59,229, +157, 41, 12,195, 48,204,250,213, 63, 42,237, 85, 20,191,254,250, 43,118,236,216,145,224,239,239,223,110,226,196,137,240,243,243, + 67, 66, 66, 2, 86,174, 92,153, 97, 48, 24, 94,168, 55,211,114,220,107,139, 23, 47,166, 25, 25, 25,228,238,221,187,213,145,171, +165, 75,151, 86,183,185,186,119,239,158,216,230, 74, 68, 68, 68,228,191, 35,130,101, 73,251,171,188, 42,243,148, 93,203, 50, 91, +195, 88, 61,188,156,243,208, 50, 0,232, 31,250,253,234,223,102,176,106,221, 97,130,239,199,140,236, 59,235,147,247,166,184,182, +247,155,167,160, 57,127,128, 22, 71, 83,152,155,220, 16, 6, 50,107, 39,128,147,211,168,155,121,101, 39, 99, 43,242, 40,193,247, +150,110,184,125,251,246,200,202,202, 66, 65, 65, 65,245,119, 12,195,192,209,209, 17, 10,133, 2, 81, 81, 81, 56,127,254,188, 17, +192,226, 6, 78,204,178, 87, 95,125,117,254,155,111,190,201,132, 76,152, 0,195,217,179, 15,116, 15, 35,132, 64,161, 80, 64,169, + 84, 34, 61, 61, 29,183,110,221, 18, 40,165,203,234,211, 76, 76, 76, 60, 79, 41,205, 5,128,176,176,176,113,142,142,142, 99, 38, + 76,152,160,188,124,249, 50, 62,251,236, 51, 46, 60, 60,220, 16, 25, 25,105, 18, 4, 97,126, 90, 90,198,134,134,246,245,230,205, +155,145, 53,151, 31,135,230,195, 60, 14, 77, 79, 79,207,174, 30, 30, 30,251,190,249,230, 27, 85, 86, 86, 22,228,114, 57,108,108, +108,144,146,146,130,197,139, 23,107, 76, 38,211,115,143, 35,211,105,181, 90,236,218,181, 43,211,215,215, 55,228,218,181,107,125, +230,206,157,187,218,199,199,199, 35, 37, 37, 37,137,231,249,103, 35, 35, 35,147,235,251,191,189,189,125,168,179,179, 51,185,120, +241, 34,166, 77,155,166,159, 62,125,186, 24,185, 18, 17, 17, 17,121,178,185,220,192,242,191,142, 58, 39,123,190,121,143,254,148, +120, 43,117,248,184,201, 31,110,125,227,237,249,233,183,243,154,233,136,235, 8, 66,228, 30,144,219,186,195,214,221, 31,247,115, +185,138,239,118,101,164, 29,140,168,216, 89, 81,134,145, 55,239,209,159, 30, 10,251,249,215,136, 74,229,174,216,184, 22, 43, 54, +174,133, 73,144,232, 95,127,253,117,228,229,229,225,222,185, 87, 16,179,175, 55,124,165,107,224, 70,215, 33, 55, 55, 23, 63,252, +240, 3, 13, 15, 15,223,109, 52, 26,187,100,100,100,124, 95,151, 38, 0,196,196,196, 44, 73, 79, 79,239,246,193, 7, 31,132,191, + 89, 90,138,248, 53,107, 32,123,245, 85, 48,157, 58, 65,165, 82,193,201,201, 9, 26,141, 6,167, 79,159,198,181,107,215,194,117, + 58, 93,183,152,152,152, 37,245,105,154,205, 85,143, 30, 61,172,139,138,138,190,126,245,213, 87,149, 26,141, 6,121,121,121,200, +203,203, 67, 68, 68,196, 9,189, 94, 31,156,150,150, 86,167,105,169,169, 73, 41, 77, 53,127,126, 92,154, 53,121, 92,154, 42,149, +106,230,158, 61,123, 84, 12,195, 64, 46,151,195,206,206, 14,169,169,169, 88,180,104,145,166,162,162,226,185,140,140, 12,139, 6, +232,172,169, 57,118, 13, 45, 2,193,215,235,190, 89, 39,172, 89,185,150, 82,199,222, 80,218,121,194,206,206,206,113,231,206,157, +194,213,171, 87,143,123,120,120,180,187,125,251,182,191, 78,167, 11,190,116,233, 82,114, 67,154,121,121,121,103,146,146,146, 96, +101,101,133,233,211,167,203,150, 44, 89,178,245,219,111,191,213, 46, 89,178,164, 81,109,174,234, 58,158,143,130,168, 41,106,138, +154,162,166,168, 41, 82,111, 4, 11, 0,174,167,208,251, 0,222,233,220,154, 4,188,244,230,242,153,189, 66, 90,117,125,251,165, + 96,135, 18,161,152,238,217,127,167,224, 94,106,217,101,142,197,170, 27,247,104,131,225,181,119,190, 54,181,168,185,252,157,151, + 87,240,132, 9, 19, 62,155, 51, 38,167,123,205,170,195,205,219, 55,159, 37,132,124,152,153,153,105,113,151,253,232,232,232, 27, + 0,158, 11, 12, 12,236, 57,123,246,236,197,163,188,189,131,198,133,133, 65, 34,145, 32, 50, 50, 18,249,249,249, 81, 0, 62,142, +137,137, 57,215,152,131, 83, 82, 82,242,137,159,159,159,244,230,205,155, 72, 76, 76,196,173, 91,183,192,243,252,221,180,180,180, +231,155,122,192,255,205,154, 90,173,246,171,207, 62,251,172,239,194,133, 11,229, 54, 54, 54,184,114,229, 10, 22, 46, 92,168,209, +106,181, 22,155,171,218,120,243, 71,250,249,170, 41,228,167,243,247,124,251,119,240,236,182,198,104, 52,194,197,197, 69,214,181, +107, 87,119, 0, 25, 59,118,236,224, 1,220,107,132,228,199, 1, 1, 1,126,159,125,246, 89,235,215, 94,123, 13, 69, 69, 69, 98, +228, 74, 68, 68, 68, 68,228,191,199, 96,153,185,150, 72,175, 2,120,181, 83, 43,210,231,108,228,221, 73,149,246, 21,235,227,238, +211, 83, 77,221,112, 90, 90, 90, 36,128,254, 43,102,145, 7,198,159,200,204,204, 28,212, 84,205, 42, 3,213, 59, 32, 32, 96,248, + 30,150,125, 15,247,238,129,231,249,175,174, 94,189,186,191, 49, 58, 93,187,118,245, 41, 45, 45,253,209,104, 52,118,230,121, 94, +118,250,244,105,104,181, 90,196,197,197, 85, 8,130,176,167, 41,105,251,111,208, 76, 77, 77,141,246,240,240, 24, 74, 8, 57, 56, +119,238, 92,249,162, 69,139, 30,217, 92,153,153,185,142,102,109, 86,171, 79,177,183,110,241, 70,163,145, 53,153, 76,224,121, 94, +218, 20, 45, 74,105, 34, 33, 36,100,214,172, 89, 31,191,251,238,187, 51,151, 45, 91, 38, 21,219, 92,137,136,136,136,136,252,215, + 25, 44, 51,177,119,233, 73, 0, 39, 31,103, 2,170,170, 14,157,205,159, 31,135,102,149,161,218,223,212,255, 23, 23, 23,127, 90, + 80, 80, 16, 82, 82, 82, 98,186,119,239, 94, 5, 33,132,103, 24,166, 66, 16,132,165, 60,207,111,120,146, 53, 51, 50, 50, 46,186, +187,187,247,191,112,225,194,244,242,242,242,117, 25, 25, 25,151, 30,215,185,142,142,142, 78, 85,171,213, 31, 77,154, 52,233,101, +147,201,244,123, 84, 84, 84, 82, 83,181, 40,165,122, 0, 31, 17, 66,246,197,198,198,254,122,225,194,133, 44,209, 92,137,136,136, +136,136,252, 87, 26,172,191,131,135,171, 14,255, 13, 36, 36, 36,188, 6,224,181,255, 69, 77, 0,200,204,204,140,249, 59,116,171, + 76,214,183, 0,190,125, 92,122,148,210,104, 66, 72, 7, 84,246, 18, 17,205,149,136,136,136,136,136,104,176, 68, 68, 30,147,201, +162, 16,231, 22, 20, 17, 17, 17, 17,249, 23, 65, 0,248,215, 81,104, 89, 60, 83,118, 83,122, 19, 52,164, 47,106,138,154,162,166, +168, 41,106,138,154,162,230,147,167,217,144,118, 99,252,199,191,218, 96, 53,102, 30,191, 70,139, 19,226,255,184, 15,148,168, 41, +106,254, 39, 52, 73,229, 52, 0,164,242, 90,183,252, 34, 17,143,167,168, 41,106,138,154,162,166, 8, 32, 86, 17,254,231, 29, 45, + 33, 12,254,127,252, 49,161,177, 5,184,200,223,126,126,204,198,138, 3,192, 2,224, 9, 33, 38,241, 60,137,136,136,136,136,252, +173, 6, 43, 52, 52,180, 53, 0, 68, 68, 68, 36,254, 27,118,160, 75,151, 46,167, 91,181,106,213,252,206,157, 59, 70, 66, 8,106, +190, 0, 64, 38,147, 93,184,112,225,194,235,255,134,180,118,236,216, 81,250,212, 83, 79,237,151, 74,165,189,106,126,175, 86,171, +205, 31, 5,107,107,107,167, 83,167, 78,233,158,180,140,102,101,101,165, 97, 89,150, 48, 12, 3,150,101,241,240,123,109,223, 17, + 66, 92,226,226,226, 52,117,105,142, 27, 55,206,166,172,172,108, 40,165, 52,134, 16, 18, 72, 41,141,225, 56, 46,208,100, 50, 61, +240, 46,147,201, 78,109,219,182, 45,211,146,116, 6, 6, 6, 42, 56,142,139, 55,153, 76, 78, 15,255,166, 86,171,193,178, 44, 46, + 95,190,172,122,146,206,141,191,191,255,137,144,144, 16,191, 43, 87,174, 24, 40,165,213,215, 15,195, 48, 32,132, 64, 16,132,204, +168,168,168,238, 79,242,141,208,221,221,189, 39,128,229, 85, 29, 38,106,114,139, 16,242,110,122,122,250, 41,136,136,136,136, 60, + 78,131, 21, 18, 18,210,134,231,249, 94,132,144,158,148,210,158,237,219,183,119, 41, 47, 47,135, 90,173,206, 33,132,156,163,148, +158, 99, 89,246,236,229,203,151,239, 52,164,213,189,123,247, 40,189, 94,223,190, 81, 9,228,184, 82,133, 66,209,250,212,169, 83, +181, 22,180,174,174,174, 45, 55,111,222,236, 24, 27, 27, 11, 43, 43,171, 7, 94, 28,199,161,107,215,174,193,255, 22,115,197,178, +236, 1, 15, 15,143,238,251,247,239, 71,108,108,108, 77, 99, 5,158,231,209,171, 87, 47,198,201,201, 73, 6,192, 34,131, 21, 26, + 26,154,100, 50,153,156, 27,147, 14,169, 84,154,123,241,226, 69,139,122,110,246,232,209,195,218,100, 50,205, 98, 89,182,183, 32, + 8, 29, 0,128,101,217,155, 38,147,233, 52,199,113, 43,207,159, 63,111,241,108,224, 44,203,146,188,188, 60,108,219,182, 13,254, +129,161,160, 20, 8,232,216,166,218, 8, 71,196,220, 4,207,243, 56,127,234, 8,230,204,153,131,192,192, 64,104, 52, 26,182, 62, + 77, 65, 16,142, 88, 89, 89,117, 54, 47,215,156,220,251,161,137,190,163, 1, 60,221, 80, 26,213,106,181, 82, 34,145, 36, 40,149, + 74,199, 35, 71,142,224,210,165, 75,104,211,166, 13,120,158, 7,165, 20,148, 82,140, 28, 57,242,137,187, 9, 48, 12,227,185,110, +221, 58,187, 99,199,142, 65,169, 84, 86, 95, 63,214,214,214,176,178,178,194,179,207, 62,203, 63,174,109,169,213,234, 45, 0, 70, + 84, 45,158,138,142,142,126,182,169, 90, 78, 78, 78,214,114,185,124,150, 92, 46,239,109, 50,153, 58, 16, 66, 32,145, 72,110,234, +116,186,211, 21, 21, 21, 43,243,242,242, 44,206,159,132,144, 47, 55,108,216,208,161,121,243,230,200,206,206, 70,110,110, 46,138, +139,139, 81, 90, 90,234,183,113,227,198, 85, 0, 58,137,197,133,136,136,200, 99, 49, 88,106,181,122, 15,128,158,237,219,183, 87, +246,239,223, 31,129,129,129,240,241,241,129, 66,161, 0, 0, 20, 20, 20,184,196,197,197, 61,127,229,202,149,231, 47, 94,188, 8, +181, 90, 93, 65, 8,185, 24, 21, 21, 53,188,158, 2,209,235,200,145, 35,112,114,114,178, 40,113,130, 32, 96,240,224,193,146,226, +226, 98, 21,128, 90, 13, 86, 86, 86,150,240,201, 39,159, 20,159, 63,127,222,192, 48, 12, 40,165,164, 70, 53, 15, 76, 38, 83,193, + 63,125,144, 9, 33,204, 83, 79, 61,181,175,202, 92, 49, 18,137, 4, 81, 81, 81, 72, 79, 79,135,139,139, 11,172,172,172, 32,151, +203, 33, 8, 2,238,223,191,159, 25, 18, 18, 34, 40,149,202, 6, 35, 89, 38,147,201,249,220,185,115,213,231,164, 33,120,158, 71, + 72, 72,136, 69,134,172, 75,151, 46, 79,203,229,242, 95,167, 77,155,102,215,189,123,119,206,203,203, 11,132, 16,100,101,101,133, + 92,184,112, 33,112,205,154, 53, 19,187,116,233, 50,254,202,149, 43,103, 44, 52, 88,216,180,105, 19, 62,251,236, 51,204,254,232, + 75,188, 61, 97, 52, 8, 33,144,203,229, 40, 46, 46, 70,104, 96, 7,172,221,180, 15,219,182,109, 67, 69, 69, 5, 88,150, 69,203, +150, 45, 27,138,138,181, 91,189,122, 53,102,205,154,133,149, 43, 87, 86,191,207,158, 61, 27, 43, 86,172,192,156, 57,115,176,124, +249,114,204,153, 51, 71,253,250,235,175,203,127,254,249,103, 93,125,231, 40, 36, 36, 36,190,202, 92, 17,169, 84,138,194,222,189, +145, 12,192, 38, 46, 14,214,214,214,208,235,245, 96, 89, 22,106,181,186,188, 41,145,172, 78,157, 58,157, 99, 89,214,211,130,243, +148, 30, 27, 27,219,243, 17,242, 91, 63, 0,115,170, 22,151, 83, 74,143, 55,112,157,165, 79,157, 58,213, 42, 38, 38,166,174, 8, + 86,206, 35, 24,170,102,132,144,239, 0, 40, 89,150,125, 23,192,160,240,240,112, 48, 12,131, 1, 3, 6,132,169,213,106, 63, 0, + 75, 85, 42, 21,213,235,245,211, 34, 34, 34, 44,218,150,151,151,215,211,182,182,182,191,206,159, 63,223,174, 71,143, 30,156,179, +179, 51, 34, 34, 34, 96,111,111, 31,114,246,236,217, 46, 63,254,248,227, 68, 47, 47,175,241,105,105,105,103, 44, 76,106, 91,111, +111,111,124,252,241,199,176,181,181,133,163,163, 35, 28, 28, 28,224,232,232, 8,119,119,119,223,241,227,199,103, 22, 20, 20,148, + 93,191,126,125, 33, 33,228,116,106,106,106,166, 88,124,136,136,136, 52, 53,130, 53,224,244,233,211, 48, 26,141,176,177,177, 1, +203, 62, 24, 76,112,116,116,196,211, 79, 63,141,208,208, 80,244,235,215, 15, 9, 9, 9,202, 47,190,248,226,153,134, 54,168, 82, +169,112,241,226, 69,152, 76, 38, 68, 71, 71,163,180,180, 20,195,135, 15,135, 68, 34,129, 68, 34, 1,199,113,213,239,174,174,174, + 80, 40, 20,164,184,184,184, 78, 61, 59, 59,187, 86,135, 14, 29, 98,228,114, 57,181,182,182,166,167, 79,159,166, 0, 40, 30,161, +205, 76,112,112,176, 43,199,113,159,241, 60, 63,146,231,121, 89, 61,166,193, 40,149, 74, 15,104,181,218,143,162,163,163, 83,235, + 40,236, 8, 0, 70, 46,151, 63,189,107,215, 46, 72, 36, 18, 0,128, 76, 38,131, 92, 46,135, 66,161,168,126,247,243,243,195,140, + 25, 51, 48,121,242,100,139, 35, 89, 10,133, 2,167, 78,157, 2,199,113,232,216,171,178,230, 49,229,234, 85, 72, 36, 18,184,119, +236, 8, 0, 40, 75, 73,129, 68, 34,129,155,155,155, 69,251, 31, 16, 16,208,175,121,243,230, 91,191,249,230, 27, 37,203,178,184, +125,251, 54, 8, 33, 96, 89, 22, 57, 57, 57,232,217,179, 39,231,239,239,223,108,254,252,249,187, 2, 2, 2,198, 94,189,122,245, +184, 5, 81, 18,188,250,234,171,248,234,171,175, 48,125,226,104,152,231, 59,212,235,245,213,235, 76,123,117, 4,126, 89,179, 20, + 31,127,252, 49,254,248,227,143,134,162,119,183, 66, 67, 67,101,185,185,185, 80, 40, 20,200,201,201,129, 82,169,124,224, 93,161, + 80, 32, 59, 59, 27, 74,165, 18, 87,174, 92,185, 19, 22, 22,214,242,212,169, 83,166, 58,206, 17,103, 50,153,156,142, 28, 57, 2, +169,180,114,128,249,114, 0, 60, 0,103,103,103,232,116, 58, 40, 20, 10,180,104,209, 2, 31,126,248, 33, 94,127,189,241,181,206, + 44,203,122,198,196,196, 52,104,112, 3, 3, 3, 31,245,186,158, 67, 41,237, 89, 35,146, 87,239,249,185,126,253,250, 51, 0, 48, +106,212,168, 19,254,254,254,126,241,241,241, 6,243,127,171, 94,238, 47,191,252,114,146,217,116, 81, 74, 51,127,251,237, 55,139, +170, 12, 9, 33,203, 15, 28, 56, 48,204, 96, 48, 96,194,132, 9,209,190,190,190,156,157,157, 29, 54,110,220, 8, 7, 7, 7,232, +245,250,203, 95,127,253, 53,151,156,156,140,239,191,255,126, 93,141,232, 86,157,120,120,120,244,243,245,245,221,186,125,251,118, + 37, 0,220,187,119, 15,105,105,105, 56,118,236, 24, 94,122,233, 37,140, 30, 61, 90,210,163, 71,143,102,211,167, 79,223,229,225, +225, 49, 54, 35, 35,227,184, 37,105,181,183,183,231,231,206,157,203,170, 84,170, 7, 34,225,135, 14, 29, 34, 95,124,241,133,237, + 55,223,124, 99, 51,116,232,208, 57, 63,252,240, 67, 87, 47, 47,175,101,105,105,105, 25, 98, 17, 34, 34, 34,210, 20,131, 5, 43, + 43, 43, 68, 70, 70,130, 16, 2, 27, 27, 27,216,218,218,194,206,206, 14, 37, 37, 37,136,139,139, 67,124,124, 60,238,223,191, 15, +134, 97,208,170, 85, 43,152,163, 70,102,106,235, 97, 96, 46,168,147,146,146,144,149,149, 5,134, 97,112,230,204, 25, 12, 26, 52, +232, 1,115,101, 54, 34, 15,243,176,230,169, 83,167, 76,239,190,234,118,194,160,215, 56,153, 76,250, 11,167, 40,157, 22, 24, 24, +120,218,197,197,197, 43, 32, 32,128, 55, 87, 21,213,215, 46,235, 97, 77,150,101,151,190,249,230,155,207,143, 25, 51,134,225, 56, +238,129, 8,144, 94,175,135, 94,175,135,209,104, 68, 69, 69,133,100,215,174, 93,207, 29, 60,120, 80, 5, 96, 84,125,233,228,121, + 30,113,113,113,184,118,237, 26, 24,134,129,131,131, 3,108,109,109,161, 80, 40,160, 84, 42, 33,147,201,160, 82,169,160, 80, 40, + 32,145, 72,112,255,254,253,204,206,157, 59, 11, 37, 37, 37, 78, 73, 73, 73,186,186,142, 39, 0,112, 28,135,154,233, 52, 31,195, +186,150,235, 75,103,104,104,168,141, 76, 38,251,105,197,138, 21,202,156,156, 28,196,198,198,162,115,231,206,248,240,195, 15,161, +209,104,176,124,249,114, 36, 38, 38,194,197,197, 5, 31,124,240,129,242,221,119,223,253, 41, 52, 52,180, 67, 68, 68, 68,105,125, +231,157, 97, 24,108,216,176, 1, 38,147, 9, 12, 83,217,198, 95,167,211, 65, 46,151, 63,156, 30, 44, 88,176,160,122,157,186, 52, + 5, 65,112,115,113,113,193,169, 83,167,160, 84, 42,113,250,244,105, 40,149, 74,156, 57,115, 6, 10,133, 2,103,206,156,169, 94, +182,178,178,130, 32, 8,118, 85,249,221, 84,139, 38, 65,101,131,118, 92,185,114, 5, 89, 93,187,162, 28,128,205,254,253,176,109, +209, 2,112,118,134, 19, 0, 77, 94, 30, 84, 42, 21,228,114,121,157,145, 44, 75,122,213,196,199,199, 67,167,251,171,119,150,203, +229,104,223,190,125,131,231,168,150,107,170,147,139,139,203, 15,126,126,126,254, 0,240,244,211, 13,214,134,214,117,109,122,126, +244,209, 71,118,155, 55,111,134, 92, 46,135, 82,169,132, 74,165,130, 74,165,122,224,243,135, 31,126,200, 91,170, 9, 64,150,144, +144, 0, 27, 27, 27,172, 95,191,158,115,116,116, 68,116,116, 52, 56,142,195, 43,175,188,130, 78,157, 58,113,230,243, 87, 86, 86, +214,160,102,235,214,173,109,100, 50,217, 79, 91,183,110, 85,206,155, 55, 15, 65, 65, 65,240,243,243, 3, 33, 4,163, 70,141, 2, +165, 20, 69, 69, 69,112,118,118,198,215, 95,127,173,156, 60,121,242, 79,173, 91,183,238,144,152,152, 88,218, 64, 58,169, 78,167, +163, 10,133,162,250,161, 71, 46,151, 67, 42,149,162,164,164,132,190,255,254,251, 37, 44,203, 50, 35, 70,140,240,125,235,173,183, +152,133, 11, 23,246, 1,240, 91, 99,206,123, 99, 17, 53, 69,205,255, 53,205,134, 98, 31, 0,106, 62,160,234, 1,152, 3, 32,121, + 85,247,241,102, 15,125, 15, 0,230, 25, 98,156,235, 88,206, 3, 16, 7,160, 67,213,119, 60,128,203, 0, 10, 31,139,193, 34,132, +208, 26, 7,141,212,114, 32, 81, 82, 82,130,146,146, 18,164,166,166, 98,237,218,181,213,133, 54,199,113, 96, 24, 6, 38,147,229, +227, 60, 74, 36, 18,164,166,166, 34, 32, 32, 0, 46, 46, 46,248,249,231,159, 49,116,232,208,106, 61,243,171,166, 41,170,143,238, +125, 94,110,255, 92,135, 91, 54,111, 46, 11,167, 64,101,187,172,125,251,246, 57,222,190,125,187,218,192, 40,149,202,106,243,210, + 80,187, 44, 65, 16,134,141, 30, 61,154, 9, 15, 15,135,201,100, 2,199,113,144, 74,165,144,201,100, 96, 89, 22, 82,169,180,250, + 53,108,216, 48,102,247,238,221,207,132,133,133,113,181, 69, 71,104,101,157,165, 64, 8,129, 90,173, 70, 94, 94, 30,164, 82, 41, +108,108,108, 96,103,103, 87, 93, 96,203,100, 50, 88, 89, 89, 65,161, 80,160, 83,167, 78,152, 60,121, 50, 38, 77,154,196, 56, 58, + 58, 54, 24,201,170, 25,185,226, 56, 14, 30, 53, 34, 87, 28,199, 65,225,238,110, 78,140, 37,167,103,230,132, 9, 19,108,228,114, + 57,174, 95,191, 14,185, 92, 14,141, 70,131, 17, 35, 70,160,172,172, 12, 38,147, 9,114,185, 28, 58,157, 14,174,174,174,232,215, +175,159, 85,120,120,248, 76, 0,139, 26,136,222,224,141, 55,222,192,234,213,171,241,205,143,219,241,206,164, 23,254,178,206,154, + 95, 42,167, 79, 92,184,112, 33, 78,157,106,184, 77,241,128, 1, 3,112,230,204, 25,120,122,122,162,160,160, 0, 94, 94, 94, 40, + 44, 44,132,143,143, 15,138,138,138,224,235,235,139,210,210, 82,244,238,221,187,161,136, 24,173,186,168,224,239,239, 15, 1,149, +221, 59,109, 91,180, 64,179,102,205,160, 64,101,183, 79,185, 92, 94,109,130,155, 26,201,162,148, 98,238,220,185,197, 25, 25, 25, +134, 90, 34, 51,210,221,187,119,219, 53, 38,240, 74, 8,233,220,190,125,251,163, 39, 78,156,176,118,117,117,133,201,100,130,209, +104,132, 70,163,193, 11, 47,188, 0, 0,123, 26,145,182,244,207, 62,251,204,170,150, 8,214, 3,213,134,148, 82,139,171, 12, 57, +142,155, 55,119,238,220, 65, 35, 70,140,224,108,108,108, 32,145, 72, 32,147,201, 32,147,201, 32,149, 74,145,148,148, 4,163,209, +136, 29, 59,118, 80,150,101,223,107, 72, 79,167,211,205,252,224,131, 15,108, 36, 18, 9,218,181,107,135,153, 51,103, 98,203,150, + 45,240,240,240,128, 76, 38, 67, 51, 85, 22, 24,134,131,142, 87,161, 77,155, 54, 24, 58,116,168,213,238,221,187, 27,204,159,148, +210,235,122,189, 62, 80,169, 84, 86, 71,148,205, 85,239,233,233,233, 55,207,156, 57, 19,226,230,230,214,190, 93,187,118,235,194, +194,194,252,155, 53,107, 22, 76, 8,217, 44,246, 44, 21, 17,121,116, 26,242, 32,102, 67, 68, 8, 57, 88, 99,189,161,230,229,121, +243,230,125,176,116,233,210, 27,132,144,131, 53,191, 55,175, 87,181,141,131,181, 45, 87,253,183,217,252,249,243,253,151, 45, 91, +182,164, 91,183,110,219, 46, 92,184,112,239,177, 25,172,170,118, 75,180,158, 29,251, 75, 20,234, 97, 44, 49, 88,230,155,180, 78, +167, 67, 94, 94, 30, 6, 12, 24, 0,165, 82, 9,134, 97,144,154,154,138,182,109,219,130,227, 56, 92,189,122, 21,159,124,242, 9, + 58,118,236, 8,131,193,208, 96,154,142, 30, 92, 95,113,225, 56, 95, 33, 8,149, 55,254,236,236,108,186,116,233,210,178,240,240, +112,253,255,111,186, 90,134, 52,212, 46,139, 82,202,113, 28, 7,163,209,248, 64, 47, 55, 66, 8,250,244,233,131,179,103,207, 86, +127, 87, 21,129, 97, 30,142,142,212, 82,128, 67, 16, 4,184,184,184, 64, 38,147,161,230,141,220, 92,224,152,205, 86,205,155,123, +163, 78,230, 67,145,191,250, 34,129,117,193, 48, 76, 88,175, 94,189,184, 91,183,110, 85,167,203, 96, 48,160,119,239,222, 96, 24, + 6, 41, 41, 41,213,223, 83, 74,209,165, 75, 23,233,217,179,103,195, 26, 42,192, 24,134,193,218,181,107, 97, 52, 26, 1, 0,223, +255,180, 27,111, 79, 24, 85, 29,201,249,254,167,221,213,235,125,244,209, 71,127,137, 96,213, 70,231,206,157, 81, 86, 86, 86, 29, + 21,229, 56,238, 47,239, 12,195,160, 89,179,102,168,175, 28,172, 50,193, 38,115, 62,182,141,139,131,139,139, 11,224,228, 4, 57, + 0,133,201,132,220,220, 92, 56, 85, 25, 44,121,141,247,198,154, 43,189, 94,143,140,140, 12,195,213,171, 87,255,210,209, 32, 32, + 32, 32, 73,175,215,195,210, 50,155, 16,226, 98, 54, 87,148, 82, 60,251,236,179,152, 57,115, 38,130,131,131, 81, 90, 90,138, 57, +115,230,160,168,168,104,101,167, 78,157,190,184,126,253,250,135,148,210, 53,245,233,237,222,189,251, 47, 85,252, 29, 58,116, 56, +209,181,107, 87,191,152,152,152,154,166,203, 61, 56, 56, 56,137, 82, 90,111,239, 66,115,131,246, 78,157, 58, 97,202,148, 41,216, +181,107, 23,126,254,249,103,240,124,101, 0,108,228,200,145,120,238,185,231,144,155,155, 11, 87, 87, 87,146,158,158,126, 77,173, + 86,215,219,240, 93,161, 80,132,245,236,217,147, 75, 78, 78, 70,183,110,221, 48,121,242,100,188,241,198, 27,216,191,127, 63,154, +187, 1,209,251,199,162, 83,191,245,144, 90, 73, 65, 8, 65,207,158, 61,165,225,225,225, 13,230, 79,142,227,222,235,219,183,239, + 18, 0, 29,107,222, 7, 9, 33,241,132,144, 15, 1, 32, 43, 43, 43,126,216,176, 97, 73,125,251,246,237,210,170, 85, 43,167,216, +216, 88, 14,128, 81, 44, 30, 69, 68, 30, 57, 26,102,177, 7, 49, 27,164,135,141,214,210,165, 75,135, 62,252, 93, 77, 51, 85,219, +231,154,255, 93,182,108,217,146, 26,218,229,143, 99,191, 30,219, 56, 88,230,130,179, 33,244,122, 61, 98, 98, 98,208,166, 77, 27, + 40,149, 74,112, 28,135,192,192, 64,196,196,196,160, 67,135, 14, 16, 4, 1, 31,124,240, 1, 22, 44, 88,128, 29, 59,118, 32, 46, + 46,142,115,117,117,173, 87,115,221,174, 82,223,154,203, 54, 54, 54,190, 59,118,236,120,164,118, 89,132,144,234,130,122,248,240, +225, 56,124,248, 48, 36, 18, 73,117, 97,174, 86,171,171,171,251, 44,200, 16, 84,173, 86,195,100, 50,193,218,218,186,186,253,149, +217,168,200,100, 50, 48, 12, 83,221,216,221, 28,109, 3, 0,123,123,251, 6,245,147,175, 92,129, 68, 34,129,199, 83, 79, 1, 0, + 74,147,147, 33,145, 72,160,240,240,168,140, 24,150,149,213, 89, 69,248, 48, 60,207,119,240,244,244,196,173, 91,183,170,211,216, +188,121,115, 76,159, 62, 29,229,229,229,216,176, 97, 3,138,138,138, 32,147,201, 32,145, 72,208,186,117,107,232,245,250, 14, 13, +233,178, 44,139,169, 83,167,226,167,159,126,194,218,229,149, 85,128, 63,172,168,124,175, 57, 60, 3,195, 48,248,252,243,207,209, +167, 79, 31,139, 77,229,166, 77,155,170,207,153, 89,195,252,154, 62,125,186, 69,134,133, 82, 42,168,213,106, 80, 74,171,163,139, +166, 42,231,108,110,127,200,178,108,181, 49, 54, 71,178,154, 98,176,234, 74, 15,165,180,214,170,195,250,130,120,243,230,205,179, + 22, 4, 1,125,250,244,193,132, 9, 19, 16, 20, 20,132,239,190,251, 14,231,207,159,199,143, 63,254,136, 45, 91,182,192,100, 50, + 73, 7, 14, 28, 56, 19,192,154,198, 94,215, 44,203,122,174, 91,183,206,110,239,222,189,176,182,182,134,189,189, 61,108,109,109, + 97,111,111,143,231,159,127,190,161,222,133,131,194,195,195,225,224,224,128,168,168, 40,200,100,149, 81,123,107,107,107,199, 83, +167, 78,233, 86,175, 94, 93,162, 84, 42, 57,153, 76,134, 79, 62,249, 4, 50,153, 12,111,188,241, 70, 88, 88, 88,152,188,174, 14, + 30, 70,163,177, 67, 70, 70, 6, 14, 31, 62,140,161, 67,135, 98,210,164, 73, 72, 77, 77,197,184,113, 47, 99,233, 12, 41,252, 3, + 39, 64,106,223,171, 58,111,180,111,223, 30, 90,173,182,193,252,153,154,154, 26, 13,160,191, 37,231, 80, 68, 68,228, 31,141,118, + 29,124,216,100, 61,138,214,188,121,243, 62, 0, 64,231,205,155,247,129,121,121,233,210,165, 21, 0, 30,185,141,229, 99, 51, 88, +150, 68,176,122,245,234,165, 88,189,122, 53,220,220,220, 16, 24, 24, 88, 29, 97, 81,171,213,248,238,187,239, 48, 97,194, 4,252, +241,199, 31,232,208,161, 3, 6, 13, 26,132,167,159,126, 26,157, 58, 53,220, 59,250,221, 9,158,231, 76,186, 82,123,131, 94, 23, +185,102,183, 97, 66, 73, 73,201,217,214,173, 91,187,167,164,164,152, 74, 75, 75,171, 27, 13, 19, 66, 16, 28, 28, 12,142,227, 46, + 95,188,120,241,101, 75, 10,239,209,163, 71, 99,239,222,189, 24, 57,114, 36,142, 29, 59, 6, 0, 8, 14, 14,198,205,155, 55,161, + 82,169, 44,142, 16, 17, 66,192,243, 60,148, 74,101,117,117,163,217,192,152, 49, 71, 69,204,133,184, 37,213,163, 64,195,109,174, +204,209,156, 70,100, 58, 72,165, 82, 48, 12, 83, 93,149, 83, 86, 86,134,226,226,226,234,180,155, 95,150, 86, 13,179, 44,139,239, +190,251, 14, 70,163, 17,211,230, 44, 4,203,114,152,246,234,115, 96,217, 74,131,186,118,211, 62,240, 60,143,237, 63,175,194,188, +121,243, 44,222,119,142,227, 48,105,210,164,234,125,172, 45,138,213,216,130,209,213,219, 27, 20,128,188,234, 63, 70, 66,208,172, + 50, 4,249, 72, 17, 44,243, 3, 70, 83, 13, 88, 45,236,127,255,253,247, 39, 26, 12,134,246, 33, 33, 33,202,201,147, 39, 35, 53, + 53, 21, 43, 86,172,208, 22, 22, 22,174,233,223,191,255, 68,107,107,107, 59,141, 70,163,185,127,255,254,215, 77,185,174, 5, 65, + 72,159, 50,101,138,149,121,140, 44,115,207, 66,150,101, 45,234, 93,200,243, 60,214,175, 95, 95, 93, 53, 88, 91,190,168,153,167, + 44,161, 99,199,142,176,178,178, 2,165, 20, 70,163, 17, 95,124,241, 5, 94,120,126, 32, 14,159,163,232, 63,254,125, 8,148, 64, + 34,145,224,167,159,126,130,175,175,111,131,122,117,140,129, 37,142,127, 37, 34,242,239,140,118, 13,125,156, 90,230, 8,214,210, +165, 75,111, 44, 93,186,244, 47,209,176,191,213, 96,177, 44, 91, 29,210,175,171, 48,182,180, 13,214,185,115,231,180, 39, 78,156, +176, 78, 75, 75,171,142, 16,113, 28,135, 86,173, 90,129, 16,130, 63,254,248, 3,155, 55,111,198,135, 31,126, 8,142,227, 96,107, +107,139, 46, 93,186, 24, 51, 51,235,239, 17,221,253,233, 23, 91, 85,181,193,226, 1,192,205,205,205,115,199,142, 29,245,181,193, +234,108, 73, 65, 40,145, 72,112,240,224, 65, 12, 24, 48,160,186, 49, 53, 0,196,197,197, 33, 32, 32, 0,183,111,223,110, 84, 21, + 28,165,244, 1, 99,101,238,173, 86,211, 96,177, 44, 91,221,200,214, 82,106, 70,174, 56,142,131,178, 70,228,138,101, 89,232,148, + 74,232, 0,216, 91, 80,112, 75,165,210,248,172,172,172, 32, 23, 23, 23, 20, 20, 20, 64, 38,147, 61, 96,206, 56,142,123, 32,250, + 86,213, 78, 43,190, 33, 93,115, 52,233,247,223,127, 7, 0, 76,123,245, 57,168, 84, 74,232,245,122,104,181, 90, 76,123,117, 4, +214,110,218, 7,134, 97,176,116,233, 82, 12, 24, 48,192, 98,115,185,113,227, 70,152, 11,127,243,203,156, 47,103,205,154,101,110, + 55,212,232,139, 35, 43, 43, 11, 64,101,171,201,135,207,145,217, 4, 63,238, 8,150, 37, 6,139, 16, 50,165, 67,135, 14,115, 20, + 10, 69,106,118,118,246,118, 55, 55,183,233,223,124,243,141,119,114,114, 50,108,109,109,113,228,200, 17,197,140, 25, 51,222,188, +124,249,242, 88, 74,105,120, 67,233,242,247,247, 63, 17, 26, 26,234, 87,115,152,134,170,235, 62, 51, 46, 46,238, 81, 6, 24, 61, + 62,104,208,160,103,109,109,109, 49, 97,194, 4, 72,165, 82,140, 26, 53, 10,118,118,118, 5,235,215,175, 71, 80, 80, 80,181,137, + 95,176, 96, 1,146,147,147, 65, 8, 57, 94,223,240, 36, 50,153, 44, 62, 57, 57, 57, 72,165, 82,193, 96, 48, 84, 95,127, 7,255, + 56, 3,142,147, 84,155, 43,169, 84,138,233,211,167,155, 59, 59,196, 55,112, 60,151,110,216,176,161,131,139,139, 11, 50, 50, 50, + 80, 80, 80,128,210,210, 82,191,213,171, 87, 47, 7, 72, 32, 22,130, 96, 1,168,151,151,103,171, 41, 83,166,120,153, 76, 38, 33, + 41, 41,169, 0,226, 4,227, 34, 34,255, 72, 4,171,166,209,170, 17,133,170,139,220,154,237,178,234, 50,104, 53,219,100,193,194, +177, 40, 45, 54, 88, 15,215,125, 82, 74, 19,175, 94,189,218,250,169,167,158, 66, 74, 74, 10,138,138,138,106, 21,176,178,178,130, + 82,169,196,157, 59,119, 64, 41, 77,108,168,128, 97, 24,166,250,166, 88,179,199,224, 7, 31,124,128,121,243,230,161,127,255,254, +232,209,163, 71,163,118,226,232,254, 31, 74,206,133, 11, 26, 94,160, 25, 0,144,157,157, 45, 44, 94,188, 88,115,236,216, 49,125, +205,134,242,230,234, 60,158,231,179, 26, 56,129,166,146,146, 18, 78, 38,147,129, 16,130,243,231,207, 87, 15, 35, 17, 23, 23, 7, +137, 68,130,164,164, 36, 72,165, 82, 24, 12, 6,160,178, 77,180, 69, 55, 91,115, 4,171, 54, 99,166, 82,169, 64, 8,121,192, 96, + 89, 82, 69, 88,211,252,212,212,109,108,228, 10, 0, 12, 6,195,169,136,136,136,128,126,253,250,113, 26,141,166, 86,131,101, 54, + 87,114,185, 28,151, 46, 93,210, 87, 84, 84, 52,248,148,207,178, 44, 86,174, 92, 9,131,193, 80, 61, 76,131,185, 58,204, 60, 22, +214,180, 87, 71, 96,207,230,213,120,239,189,247, 44,170,122, 53,167,103,218,180,105,181, 70,174,204,159, 31, 30, 98,164,161,116, +234,203,202, 32,149, 74,225,106, 62,150,130,240,192, 57,170, 25,109,180, 4, 55, 55, 55, 39,103,103,231,111, 28, 28, 28, 20, 90, +173,246, 47, 6,170,230,239,245, 69,184,204,248,250,250,190,127,245,234, 85,215,194,194, 66,143,131, 7, 15,118,117,113,113,129, + 92, 46,199,115,207, 61, 87, 46, 8, 2,243,205, 55,223, 40,126,248,225, 7,197,220,185,115,215, 0,104,101,129,249,245,252,225, +135, 31,236,206,156, 57,131,154, 67, 20,140, 29, 59,246,145, 6, 24,141,142,142,126,161,107,215,174, 62, 60,207,199,118,238,220, +153, 75, 78, 78,198,208,161, 67,161, 84, 42,171,207,139, 70,163, 49,183, 75,163, 28,199, 5, 52, 52, 67,132, 86,171, 61,117,246, +236,217,206, 47,189,244,146,164,184,184,184,250, 30, 66, 72,165,177, 54, 95, 91,230,247, 83,167, 78,233, 53, 26, 77, 67,249,179, +157,151,151, 23, 22, 44, 88,128,102,205,154,193,197,197, 5,190,190,190,112,119,119,111, 61,110, 92, 96,166, 70, 83,161,167,195, + 76, 23,167, 77,235,234,209,187,119,216, 83,183,110,221,186,159,147,147, 19, 41, 54,112, 23, 17,121,172,145,169,134,170, 45,114, + 31, 50, 71,250, 26,203,185,168,156, 91,121,104,213,103,212,248, 28, 9, 32,248,161,117,205,191,235, 31,122, 55,255,126,245,111, +141, 96,177, 44, 59,114,210,164, 73,223,246,239,223, 63,108,206,156, 57,176,182,182, 70,102,102,102,117,164, 74, 38,147,193,219, +219, 27, 21, 21, 21, 56,115,230, 12,138,138,138, 78,179, 44, 59,189,161, 13, 26,141,198,234, 6,227, 53,123, 12,250,250,250, 98, +223,190,125,127, 49, 4, 66,141,194,173, 46,214,237,209,248,213, 92,142,137,137,241, 1,128, 69,139, 22, 53,233,160, 72, 36,146, + 3, 59,119,238,124,126,224,192,129,140, 57,130,103, 78, 71,205,161, 36,116, 58, 29,126,253,245, 87,170, 80, 40, 78,212,214,131, +240,161,200,144,177,119,239,222, 18,153, 76,134, 62,125,250, 84,119,125,175, 25, 93,115,112,112,168, 54, 88,150,154, 2,163,209, +136,146,164,164, 7,122,117,178, 37, 37, 15, 44,219, 89,112, 12,107,152,203,149,107,215,174,125, 35, 48, 48,208,193,221,221, 29, +229,229,229, 32,132,192,217,217,185,186,157,148, 66,161,128, 84, 42, 69,124,124, 60,194,195,195,203, 41,165, 43, 45,137, 96,205, +156, 57, 19,123,247,238,125,192, 60,153,205,149,217,172, 80, 74,241,213, 87, 95,225,217,103,159,173, 55,114,106,142,158,114, 28, +135,245,235,215, 63, 16,193, 50, 27, 37,134, 97,240,254,251,239, 91,108, 50, 57,142, 67,239,222,189,193,113, 28,194,194,194,170, + 59, 27,212,124, 53,107,214,236,129, 72, 86, 67,120,122,122,118, 10, 13, 13, 61,184,110,221, 58, 71, 39, 39, 39,100,100,100, 60, +144,167, 61, 61, 61, 59,133,132,132, 28, 92,183,110,157,163,179,179, 51, 82, 82, 82, 26,220,239,123,247,238,173, 29, 54,108,216, +167, 35, 70,140, 32,253,250,245,131, 82,169,196, 71, 31,125,132,155, 55,111,190, 13, 32,118,255,254,253, 87, 38, 79,158,140, 22, + 45, 90,184, 89,120, 99,171, 30,104,180,102, 84,154,231,249,156, 71,189,193,152, 76,166,101,223,126,251, 45,167, 82,169, 80, 81, + 81,129,220,220,220, 7,170, 4,203,203,203,225,230,230,134,183,223,126,155,172, 90,181,234, 43, 52, 48, 14,150, 84, 42, 93,185, +113,227,198, 55,122,245,234,229,224,234,234, 10, 65, 16, 30, 48, 84, 53, 63, 95,189,122, 21,251,246,237, 43,231, 56,174,161,252, + 73,220,221,221,133, 15, 63,252,144,177,177,177,169, 30,146,102,247,238, 93,204, 87, 95, 45,183,249,246,155,111,240,252,243,163, +134,155, 76, 38,225,214,237, 59,247,215,172, 89,115, 73, 16,132,211, 98,145, 40, 34,242, 31, 37,242, 31,250,239,227, 55, 88,145, +145,145,247, 1, 60, 27, 24, 24,248,194,153, 51,103,190,152, 61,123,182, 83,207,158, 61, 81, 80, 80, 0, 31, 31, 31,184,187,187, + 35, 42, 42, 10, 87,175, 94,205,167,148,206,139,138,138,218, 86, 75, 1,248,151,217,182, 43, 42, 42,176, 97,195, 6,204, 56,120, + 16,203,159,122, 10, 5,245, 68, 1, 86,173, 90,101,142, 16,213,171,249,112, 27,172, 46, 93,186, 92,108,222,188,185,123, 74, 74, +138,169,102, 4,203,252,249,225, 54, 88, 15,107,234,116,186, 15,182,111,223, 46,249,237,183,223,158, 21, 4, 65, 82,143, 9, 53, + 41, 20,138,112,189, 94,255, 94, 67,251,126,225,194, 5, 59, 0, 8, 14, 14, 46,159, 52,105, 18, 28, 28, 28,234,140,100,153, 27, + 79, 63,220, 14,169,182,125,215,235,245, 88,185,108, 25,150, 95,184,128,183,186,117,171,215, 60,172, 94,189, 26, 13,165, 51, 34, + 34,162,180, 75,151, 46,147,223,123,239,189, 95, 23, 45, 90,164,116,118,118,134,201,100,194,119,223,125, 7, 65, 16, 32, 8, 66, +181,185,154, 51,103, 78,121,121,121,249,228, 43, 87,174,148, 54,148, 78,150,101,241,213, 87, 95,193,100, 50, 85, 15,211, 96, 30, +104, 84,161, 80, 64,171,213,226,167,223,255, 0,195, 48,152, 51,103,206, 95,170,166,107,211, 52, 26,141,144, 72, 36,152, 49, 99, + 70,173,189, 8, 37, 18, 9, 24,134,169,211, 96,213,178,239, 42, 0, 80,171,213,229,115,230,204,169, 30, 7,169,174,104,163, 37, +154,205,154, 53,155,185, 97,195, 6,199,138,138, 10,196,199,199, 35, 62, 62, 30, 12,195, 36, 60,252,187, 70,163,193,245,235,215, +113,243,230, 77, 16, 66, 18,234,211,164,148,126, 77, 8,217,114,244,232,209, 17,114,185,124,164,139,139,139, 87, 74, 74,202,239, +148,210, 29, 0, 48,109,218, 52, 24,141,198,134,170,246,171, 53, 99, 99, 99,235, 28, 32,184,102,245,161, 57, 79, 82, 74, 51, 99, + 98, 98,186, 91,114,189, 3,208,239,223,191, 31,214,214,214,216,187,119,175,201,193,193,129, 91,184,112, 33,100, 50, 25, 62,253, +244, 83,164,164,164,152,222,120,227, 13, 78, 16, 4, 80, 74,245, 13,105, 38, 38, 38,150,122,121,121, 77,158, 62,125,250,166, 85, +171, 86,169,204,205, 11,126,254,249,103, 76,153, 50,229, 1,115, 53, 97,194,132,114,157, 78, 55, 57, 45, 45,173,161,252, 73,121, +158,167, 53,171,190,171,218, 29,210,249,243,230,149,149,105,202,116, 95,126,241, 69,100,114,106, 74, 97,122,122,102,180, 32, 8, + 39,178,178,178, 82, 44,216,247, 71,173, 10, 17, 53, 69,205,255, 41,205, 39,141, 6, 31,237, 99, 98, 98,182, 7, 4, 4, 28, 91, +182,108,217,226, 61,123,246,188, 62, 99,198, 12, 98,107,107,139, 29, 59,118,208,194,194,194,223, 20, 10,197, 7,231,206,157, 43, +178, 48, 66,112,235,248,241,227,157,103,207,158, 45, 97,223,123, 15, 31, 63, 52,201,239,195,196,199,199, 83,141, 70,195,107,181, + 90, 77,125,186,143,187, 13, 86,116,116,116, 22,128,113,127,199, 1,151,201,100,198,145, 35, 71, 74,228,114, 57, 6, 12, 24, 80, + 61, 76,131,121, 96, 67,153, 76, 6,123,123,251,234, 72, 76,125, 85,132, 10,133, 34,249,252,249,243, 94,139,191,252,146,213, 49, + 12, 86, 85, 29, 79,243, 49,125,152,243,231,207, 83,153, 76, 86,220, 80, 26,175, 92,185,114, 68,173, 86,191, 60,125,250,244,159, +134, 13, 27,166, 10, 10, 10,146,250,248,248,128,227, 56,164,164,164,224,236,217,179,250, 35, 71,142, 84,232,116,186, 9, 87,174, + 92, 9,183,100,191, 25,134,193,187,239,190, 11,134, 97,224,215,170, 57,142,157,137,124,160,199,220,254, 99,231,224,230,210, 12, + 79, 61,245, 20,190,248,226, 11, 60,247,220,115, 22, 69,239,220,220,220, 80, 85, 56,195,220,126,200,108,232,154, 82, 69,104, 54, +163, 3, 7, 14,180, 40,146,101, 65, 4,167,125, 97, 97, 33, 52, 26, 13,162,162,162,232,234,213,171,243,138,139,139, 23,212,252, +189,170,205, 15, 46, 95,190, 76,127,252,241,199,188,210,210,210, 5, 22, 68,157,178, 0,172,173,122, 61, 64,118,118,118,185,193, + 96, 80,101,102,102, 62,242, 16, 2,230,234,195, 75,151, 46, 85,247,174,108, 76,213, 33,165,116,206,177, 99,199,164,168,154, 42, + 39, 55, 55,247,178, 68, 34,145,201,100, 50,164,167,167, 67, 16,132,144,245,235,215, 47, 5, 96,224, 56,110,134, 37,154,105,105, +105, 71, 60, 60, 60,198, 77,152, 48,225,167,145, 35, 71, 42,123,247,238, 45,243,243,243, 67, 89, 89, 25,174, 94,189,138,240,240, +112,253,222,189,123, 43, 42, 42, 42, 38,100,100,100, 88,146, 63, 19,116, 58, 93, 39, 71, 71, 71, 72, 36,146,234,104,106, 90, 90, +250,237, 83,167,206,168,177, 16,100, 33,128,237, 59,169, 32, 22, 25, 34, 34, 34, 22,155,208,198, 52, 35, 8, 13, 13, 13, 21, 4, + 97, 23,207,243, 18, 66,200,168,232,232,232,243,141,113,184,161,161,161, 54, 82,169,244,120, 69, 69, 69, 71, 11,205, 72,145,209, +104,124, 54, 50, 50,242, 90,125,174,121,202, 72,171, 91, 42,133,192,150,107,141,137,235,246, 24, 7, 7, 6, 6, 38, 15, 25, 50, + 68, 81, 87, 27, 44,131,193,112, 39, 42, 42,170,239, 63,233,238,213,106,117,249,174, 93,187,208,172, 89,179, 58,163, 36, 33, 33, + 33, 8, 8, 8,112, 95,183,110, 93, 73, 29,199,211, 69, 34,145,156,212,106,181, 62,150,164, 73, 46,151,103,234,116,186,129,209, +209,209,247, 44, 73,103,207,158, 61,237, 77, 38,211, 59,114,185,188,143, 78,167,107, 15, 0, 74,165, 50,190,162,162,226, 36,199, +113,223,212,101,172,107,211,236,220,185,179,134,101, 89, 82,115, 72,134,218,222,107, 14,215, 80, 86, 86,230, 98,158,228,251, 97, +205,238,221,187,223,210,235,245, 94,141, 48,182,249, 82,169,212,183,102, 85,174, 37,231,232,232,209,163,245, 70,178,130,130,130, + 16, 29, 29,173,170, 75,211,199,199, 39,192,202,202,106, 61, 42, 71, 22,190, 91, 92, 92, 60, 35, 61, 61, 61,189,230,239, 74,165, +114, 61, 0, 25,195, 48,127,249,189, 41,249,147, 16, 50,185, 93,187,118,239, 37, 36, 36,172,172,107,236, 43, 75, 53, 59,117,234, +116, 34, 36, 36,196,239,202,149, 43, 6,243, 53, 84,215,248, 87,150,104,170,213,234,237, 0,158,173, 90,255,120, 84, 84,212,136, +166, 94, 71,205,155, 55,183, 7,240,142,149,149, 85,159,138,138,138,246, 85,145,197,248,242,242,242,147,130, 32,124,147,146,146, + 98, 81,254,124, 28,189, 8,197, 72,134,168, 41,106,138, 60,146,193, 18, 51,202,227,211, 12, 10, 10, 42,166,148, 74, 26, 48, 68, + 66,235,214,173,157,204,147, 20,255,147,251,110, 30,169,213,146,134,189, 79,202, 57, 10, 13, 13, 45,111,168,119,172, 68, 34,193, +165, 75,151, 84, 98,158, 23,243,167,168, 41,106,138,154, 34, 53,225,196, 67,240,207, 16, 21, 21,101,247,223,148,222,255,197, 30, + 83,230, 54, 89, 34, 98,254, 20, 17, 17, 17,105, 44,140,120, 8, 68, 68, 68, 68, 68, 68, 68, 68, 30, 47, 4,128,127, 29, 79,132, +141,105,243,225,223,132, 39,206,235,162,166,168, 41,106,138,154,162,166,168, 41,106,254,111,105, 54,164,253,164, 84, 61,138,109, +176, 68, 77, 81, 83,212, 20, 53, 69, 77, 81, 83,212,252,199, 53,159, 52,196, 42, 66, 17, 17, 17, 17, 17, 17, 17,145,199,140,216, +200,189, 9,120,120,120, 40, 1, 12,229, 56,110,156,131,131, 67, 80,126,126,254,231,105,105,105,223, 61,161,251,218,150, 82, 58, +142, 97,152, 23, 0, 64, 16,132, 29,132,144,223, 50, 50, 50,110,139, 57, 65, 68, 68, 68, 68, 68,228, 17, 12, 22, 33,132,237,208, +161,245, 43, 44, 33, 61, 0,216, 3, 40,226, 41, 61,127,243,102,226,111,148,210, 38,205, 87, 22, 22, 22,198, 85,104, 52, 99, 57, +150, 29, 76, 41,245, 7,165, 4,132, 92, 55,153, 76, 71, 84, 54, 54,155, 27,154,122, 6, 0,198,140, 25,195,166,165,165,221,226, +121,222,185, 81, 59,205,113, 89, 23, 47, 94,244,107, 74,186,189,188,188, 70,121,122,122,174,237,218,181,171,170, 75,151, 46,144, + 74,165,248,242,203, 47,103, 0,176,216, 96,145,176, 48,206,181,176,217, 88, 70,194, 13, 1,168, 63,165, 0, 37,220,117, 24, 12, + 71,178, 29,243, 54, 83, 11,246, 29, 0, 2, 3, 3,223, 35,132,140,171,234, 65,245, 75, 76, 76,204,170, 71,201, 12,159, 76, 98, +179, 41, 21,172, 5, 74, 80,166,149, 24,118,157,118,188,209,165, 75,151,192,247,222,123, 15, 93,187,118,133, 32, 8, 56,115,230, +204,172,149, 43, 87,206,114,119,119,143, 98, 89,118,179, 84, 42,221,121,239,222,189,146,198,108, 39, 52, 52,212,159, 82, 58, 7, + 64,144, 32, 8, 30, 28,199,101, 16, 66,162,140, 70,227,170,168,168,168, 70,207, 1, 69, 8, 33, 33, 33, 1, 35,109,109,201, 96, +134, 32,128,130, 18, 2,114,173,160, 16, 71,162,162,174,236,162,180,233, 3, 68, 6, 5, 5,237,166,148, 14,172,218,206,209,168, +168,168, 81,143,251, 34, 92,243, 6,121,151,161, 8, 2, 0,129, 32,234,205, 13,244,235, 71,209,179,118,235,208,193,202,218,118, +182,201,100, 24, 40,145,200,255, 44, 45, 46, 89,174,201,185,241,143,134,242,187,117,235,166, 48,153, 76,147, 89,160, 47,165,244, +169,170,227,121,131, 7,254,228, 56,110,253,197,139, 23,181,226,237, 88, 68, 68,228,127,202, 96, 17, 66, 88,255,142,109,151, 79, +158, 50,181,253,200,145, 35,221,149, 42, 27, 69, 74, 74, 98,198,250, 31,214,216,177,132,233, 76, 8,153,211, 88,147, 21, 26, 26, +218,158, 8,194,214,105, 19, 38,180, 8,234,222,157,115,117,119,135,182,184, 24,137, 9, 9,222,145,151, 47,247,219,119,252,248, + 44,181, 90, 61, 46, 58, 58,250, 70,125, 58,121,121,121, 18,142,231, 93, 78, 46, 89,194, 50, 14, 14,160, 38, 19,180,173, 91, 87, +142,234,205,243,144, 71, 68, 0, 70, 35, 40,207,163,226,233,167, 1, 0, 38,147, 9,195,134, 13,243,106,202,193,242,246,246,118, +111,211,166,205,134,249,243,231, 75,117, 58, 29,174, 92,185,130, 11, 23, 46, 8,185,185,185,203, 45,213,112,235, 50,162,189, 27, +220,182,140, 24, 57,164,249,179,253,157,101, 62,110,206, 16, 4, 57, 18,238, 25,189,195,207,198,244, 63,252,199,177,153,174,254, + 35, 94,201,190,190,175,222,125, 15, 9, 9, 25,192, 48,204,167, 81, 81, 81, 0, 0,181, 90,253,185, 90,173,254,188,161,237, 91, + 89, 89,229,104, 52,154,137,209,209,209,181, 12,160, 40,168, 22,206,152, 10,129, 2, 63, 30, 74,144,198,175,217, 23,104,107,107, +251,192,148, 61, 3, 6, 12, 64,255,254,253,145,146,146, 18,180,103,207,158,160, 13, 27, 54,124,233,229,229,245,105, 90, 90,218, +183,150,152,234,178,178,178, 79, 28, 29, 29,223,156, 62,125,186,162, 85,171, 86, 80,169, 84,200,202,202,106,158,144,144,224,189, +121,243,230, 33,221,187,119,255, 65, 42,149,126,122,202, 66,147, 25, 28, 28,220,114, 64,255, 46,155,159, 27, 25,214,206,205,173, +163, 84, 34,113, 2,165, 20, 70, 99, 65,155,220,220,155,207, 57, 56,224,221,208,208,208,151, 27,154, 68,184, 70,222,116, 49,153, + 76,223, 2,144, 50, 12, 51,135, 82, 58,240,200,145, 35,224,121, 30,207, 62,251,236,192,224,224,224,150,130, 32, 44,183,178,178, +162, 58,157,110, 90, 68, 68,196, 35,207,215,199, 49,108,240,228,121,139,134, 64,208,227,135,165,139, 30, 73,203,198,195,175,109, +219, 54,109, 79,175, 91,189, 82,225,219,194,155, 68, 94,137, 31, 53,125,214,187,131,172, 92,158,234,219, 88,147, 21, 20, 20, 20, + 32,151,203, 63, 47, 42, 42, 26, 19, 23, 23,167,233, 52,109,175, 51,103, 84,218, 72,148,130, 46,226,219, 65,233,150,234, 4, 7, + 7, 7,113,132,108,249,250,253,137,110,237, 58,117,102, 20,206, 78, 32,201, 57, 40,228, 43,250, 92,184,126,179,215,170, 53,155, +223, 10, 14, 14,126, 57, 50, 50, 50, 74,188, 37,139,136,136,252,207, 24,172, 14, 29, 90,191, 50,113,210,164,246, 83,167,189,173, + 54, 24,116,229,215,162, 79,159,224,164, 12,251,246,244, 73,118, 5,133,185, 78,148, 10,175, 0,248,165, 17,230,170,181,167,171, +107,248,178, 47,190,176,119,116,118, 70, 86, 86, 22, 82,211,210,144,121,253, 58, 8,128,254,253,251,203, 2, 58,119,110,181,114, +221,186, 35,193,193,193, 3, 34, 35, 35,111,214,167,199,114, 28,136,149, 21,210, 3, 3, 65, 37, 18,164, 29, 59, 86,249,189,201, + 4,143, 97,195, 0, 0, 84, 34, 65,209,133, 11, 96, 89, 22,222,222,222, 77, 62, 88,148,210,208,158, 61,123, 74, 1,224,221,119, +223, 45,213,104, 52, 95, 17, 66,182,167,167,167,103, 88,242,127,231,128,231, 91,187, 56,185, 28,251,122,241,100, 7,127,223, 86, +208, 27,141, 72,203, 73, 7,133, 28,110, 46,214, 24,247, 92,128,180, 71,144,164,245,242,239,255, 60,234,214,121, 88,255,172,107, + 7,234,220,119,150,101,151,207,155, 55, 15,219,183,111, 7, 0,108,217,178, 5,109,219,182,109, 48, 13, 23, 46, 92,112,121,255, +253,247,215, 2,168, 53,130, 39,208,202,169, 98, 90,181,106, 13, 59, 59,187,186, 76, 55,124,124,124, 48,107,214, 44, 4, 6, 6, +202, 94,121,229,149,197, 0, 26, 52, 88, 26,141,230,211,174, 93,187,190,185,120,241, 98, 89, 68, 68, 4, 78,159, 62,141,195,135, + 15,195,195,195, 3,190,190,190,100,201,146, 37,138, 85,171, 86, 77, 73, 74, 74, 98, 0,124,208,144,158, 90,173,246,238,208,161, +217,201,229, 95,127,226,116,224,224, 13,124,253,245, 79, 72, 76,172,244, 81,173, 90,181,194,203, 99,199, 72, 54,255,182,174,195, +220,185, 11, 78,132,132,132,244,189,124,249,242,157,134, 52, 77, 38,211,183, 75,151, 46,125,214,218,218, 26,243,230,205,187,234, +235,235, 11, 91, 91, 91,172, 91,183, 14, 14, 14, 14, 48,153, 76, 87,191,248,226, 11, 46, 35, 35, 3,223,124,243,205, 90, 0, 35, + 31, 75,180,138,106,129,146,207, 44,141,216,177,117, 61,212, 40, 20,214, 31,126,179,124,153,210,193,217, 27, 9,153, 60,138,136, + 27,233, 53,124,138,114,199,143, 95,206, 1,240,106, 35,174,211, 64,153, 76,246,135,193, 96, 80, 90, 89, 89,169, 0,104, 56,163, +210, 70,144,114,163, 13, 84,184,217,233,189,112, 67,236, 87,253,115, 45, 49, 87,237, 91, 55, 63,244,205,231, 31, 90,177,185,183, +161, 33, 87, 80,152,109, 0,150, 31, 0, 99,235,140, 62,239,190,205,117,238, 18,224, 49,239,195,165,135, 66, 66, 66,134, 92,190, +124, 57, 90,188, 45,139,136,136, 60, 9, 52,216,200,157, 37,164,199,115,207,141,116,214,235, 43, 52, 90,173,166,232,126,114, 84, +230,137, 19, 27,174,223,186,121,246,246,128,129,221, 12, 12, 75,122,212, 99, 72, 30,120, 98, 30, 51,102, 12,203,240,252,239, 95, +124,245,149, 61, 43,149,194,104, 52,194,199,199, 7, 90,173, 22, 37,133,133,200, 74, 73,193,249,131, 7,161,201,203,195,244,113, +227,236, 37,132,108, 81,171,213,146,250, 52, 65, 41,240,208,104,219, 15,207, 63, 71, 8,169,119, 78, 58, 75,123, 66, 8,130,144, +148,145,145, 1,149, 74,133,246,237,219, 91, 17, 66, 46,164,165,165,101, 88,162, 73,198,140, 97, 37, 18,118,231, 87,139,199, 58, + 16,246, 22,110,165, 68,129, 99,229,104,102,231, 13,189, 1, 56, 23,125, 24, 63,237,252, 24,105,233, 17,152, 60,174,141,157, 82, + 73,119, 17,245,148, 58,247,221, 96, 48,180,104,221,186, 53,252,253,253,209,169, 83, 39,240, 60,143, 27, 55,110, 32, 54, 54, 22, + 87,174, 92, 65,116,116, 52, 34, 35, 35,113,233,210, 37, 92,184,112, 1, 99,166,175,192,212,233,239,161,172,172, 12, 53,167,152, +121, 48,157, 76,249,196,143,127,253, 63,246,206, 59, 58,138,234,111,227,207,157,217,190,217,108, 26, 33,201, 38, 33, 16,122, 47, + 73, 0, 17, 5,149, 14,130, 40,160,136,138,130, 74, 17, 65, 16, 41,190, 10,130, 18, 16, 65, 65,133, 32,162,128, 40,210, 4, 5, + 69, 64,138, 34, 36,164, 24, 58, 1, 2, 33,101,211,123,178,217, 54, 51,247,253, 35,229, 23, 16,146,221, 0, 18,241,126,206,217, +179, 59,187,179,207,220,185, 51,115,231,153,239,109, 56,112,206,134,156,124, 51,182,110,221,138,188,188, 60,124,255,105, 79, 68, +204,243, 67,196, 60, 63,124,179,188, 11,242,243,115, 17, 25, 25,137,165, 75,151,162,180,180, 20,162, 40,202,106,203,207,208,208, +208, 78,122,189,126,226,252,249,243,149,155, 54,109, 66, 76, 76, 12,236,118, 59, 26, 52,104,128,147, 39, 79, 98,203,150, 45, 8, + 9, 9,193,236,217,179, 53, 10,133, 98,124,104,104,104, 88,141,249, 73, 8,241,242,148, 54,127,252,241, 59, 13,120,238, 44, 60, +221,150,224,196,137, 63,145,153,153,137,204,204, 76, 68, 69, 29,131,135,251, 90,200,100,231,176,124,249,124, 79,119,119,225, 59, + 66, 8,231,192,113, 87,156, 63,127, 30,101,101,101,216,188,121,179, 44, 60, 60, 28, 81, 81, 81,208,104, 52, 24, 59,118, 44, 86, +174, 92, 41,243,244,244,196,213,171, 87, 81, 82, 82, 66,156, 61,151, 56,138,208, 9,115, 23, 14,158, 48,119,193, 96,142, 34,116, +213,120,242,166, 40,137, 33,171,195,223,199,234,213,200,146, 8, 98,106,211,156, 63,127,190,111,251,246,237,155, 16, 66, 52, 55, +113,200, 3,131,155, 4, 33,179, 64,196,174,227,233, 88,177,243, 10,120,183, 38,132, 74,182,199,106,210,236,213,171,215,164,238, +221,187,231,135,133,133, 21, 63,244,208, 67,155,120,158,255,229,131, 15, 62,208,170,213,106,171,224, 17,228, 18,242,234,111,129, + 10,185, 82,160,132,179, 80, 17, 11,228,197, 10,143,102,175,239, 85,214,164,249,192, 3, 15,168,229, 28,247,237,202,240,255,115, +177,199,236, 0,252,252,209, 48,248, 21,232, 60,186,131, 22,148, 65,136, 63,143,226,143, 62,131, 76, 45,225,255,222,158,229, 66, + 36,233,155,102,205,154, 41,235,114,109, 58,249,160,196, 52,153, 38,211,172,135,154,255,185, 8, 22,225,224,174,213,106, 20,199, +255,220,185,215,152,122, 54, 39, 61,243,116, 33, 7,202, 25,141, 49,133,193,205, 31,241, 66,121,155, 44,135,184,114,229,202, 51, +111, 76,152, 16,236, 86, 30, 9, 64,131, 6, 13,144,154,154, 10,179,217, 12, 83, 81, 17,202, 74, 74, 96, 41, 42,194,185,131, 7, +209, 99,224, 64,244,239,220, 57,112,119, 92,220,139, 0,190,184,149,166,157,227, 96,110,211, 6, 41,135, 14,129,179,219, 17,248, +200, 35, 85, 81,171,220,168,168,114, 99, 37, 8,208,247,237, 11,162,213, 66, 54,127,126,157, 51,203,104, 52,198, 7, 5, 5,237, + 27, 48, 96, 64,191, 87, 94,121,133,203,200,200,216,229,235,235,251,104, 70, 70,198,249,218,254,235,115, 81, 26,243,194, 43,157, +155, 52,112, 35,248,233,216,175,232,222,122, 56,180, 42, 25,178,243, 77,224, 8,193,229,171, 7, 32,138, 46,136, 63,159,140, 30, +237, 93,208,179,155,222,191,244,183,252,151, 0,172,185,149,166,217,108, 70, 86, 86, 22,236,118, 59, 4, 65,192,136,145, 35,177, + 97,253,122,148,150,150,194,108, 54,195,106,181, 66,146,202,155, 31,101,100,153, 17, 21,247, 11, 66, 58,220, 58,202,181, 96,173, +232, 99, 48, 24, 76, 27,126, 90,131,253,251,203,231,200,221,181,107, 23,204,153,137,152,252, 76,121,211,163,143, 55,108,198,199, +203,151,193,102,151, 42,141,158, 99, 78,158,227,166, 77,154, 52, 73, 21, 27, 27,139,130,130, 2,184,185,185, 65,175,215,195, 96, + 48,224,252,249,255,101,159,191,191, 63, 38, 78,156,168, 89,181,106,213,100, 0,209,183,210,235,218,181,211,240,215, 94, 27,210, + 74,163,214, 32, 53,249, 19,180,110,173,192,140, 55,188, 16,190, 36, 7, 0,240,250,107, 1, 8, 13,245, 66, 81,193, 54, 52,104, + 56, 23,111,206, 24, 30, 92, 82,130,209, 0, 54,213,146,206, 25,155, 54,109,138,239,215,175,159, 44, 46, 46, 14, 42,149,170,106, +162,112,141, 70,131,140,140, 12, 88,173, 86,108,217,178, 69,224, 56,110, 70,109,251,109, 48, 24,222, 4,202, 35, 86, 0, 98,222, +233, 15,128,218,129,162,242,170,192,138,234,193,134, 21,213,131, 49, 19,215,213,222,254,170, 81,163, 70,194,202,149, 43,221, 62, +249,228,147, 94, 30, 30, 30, 41,249,249,249,103, 43, 76,103,128,127,211,142,153, 71,142,199, 5,153,213, 77,201,239,167,179,224, +227,174,196,201,232,227, 18,199,201,126,173, 73, 83, 20,197, 89, 27, 55,110, 84, 54,104,208, 0, 83,166, 76,233, 59,110,220, 56, + 77, 72, 72, 8,161,148,130, 42,155,187,137, 50,218, 75,128,112,130,183,138,187,161,224,251,137, 50,219, 24,119,145, 95, 3, 32, +181,134,104,224, 43, 75,223,127,221,135,106,178,160,120,116, 32,184,108,130,180, 9, 67, 33, 21,155, 97,251, 96, 50, 36,170,128, +197, 42,131,237,137,201, 80, 4,183,196,107, 93,194,252, 86,196, 69,191, 12,224, 51, 86, 52, 51, 24,140, 27, 8, 3, 80,217,222, + 58, 7,229,227,120,122, 1,168,140,164,123, 3,176,162,124,222,215, 74,110, 92,174,190,238,141,203,213, 63,231, 0,160, 21,159, + 69, 0, 39, 0,228,215, 41,130, 69, 8,161,213, 34, 3,215, 15,140, 69, 73, 78,106,234,149, 60,139, 45,223, 60,160,119,143, 55, +134,116,243,125,239,197,103, 38,205,115,115, 85,107,146,147, 46, 83,194, 33,215,209,141,169,228,242,126, 33,221,187,203, 51, 50, + 50,224,230,230,134,180,180, 52, 92,188,120, 17,102,179, 25,165,133,133,176,228,231, 67,200,205, 5,114,115,145,244,251,239,104, +101, 48, 40,121,160,175, 3, 78,186,106,130,224,155, 69,173, 56,158, 7, 92, 92, 0,157, 14,148, 16,167, 50,200, 96, 48, 12,105, +221,186,245, 97,131,193, 48,171,194, 80,188, 17, 30, 30,158, 75, 41,197,172, 89,179, 92, 93, 93, 93, 55, 53,110,220, 88, 85,155, +142,206, 83, 24,222,173, 67,115, 62, 33,249, 20, 66, 91, 60,133,198,126, 15,227,114, 90, 33,178, 11,205,200,200, 43, 69,203,150, + 51,225,109,120, 5,110,190, 19,112,242, 66, 10, 12,190,193, 28, 39, 87,212,184,239, 25, 25, 25,215, 45,127,247,237,183, 48,153, + 76,104,222,188, 57,158,121,230, 25,188,245,214, 91,120,250,233,167, 97, 48, 24,208,179, 41,240,210,115, 35,144,149,229, 92,147, +161,128,128, 0,144,255, 69,240, 32, 8, 2,236,246,255,153, 42,171,213,234,168, 84,104, 96, 96, 32,174, 93,187, 86,101,174,244, +122, 61, 6, 13, 26,132,168,168, 40,196,198,198,130, 16, 2,189, 94,143,142, 29, 59, 18,142,227,194,106, 18,211,235,185, 1,161, +161, 61,149, 5,249, 95, 1, 40, 55,123, 47,189,232,141,163, 71,218,225,207, 63, 66, 48,229,181,166,224,136, 26,132, 83,192, 84, +250, 27,218,180,109,175,112,117,165, 3,107, 76, 96,104,232, 14, 73,146,206,180,107,215, 78, 54,113,226, 68,168, 84, 42,108,216, +176, 1,171, 87,175,198,242,229,203,145,144,144,128,160,160, 32,248,249,249,193,199,199, 71, 38, 73,210,153,208,208,208, 29,181, +237,247,213,171, 87, 7, 95,189,122,117,112,223, 86, 69,207, 80,130,208,213,139, 23, 96,245,106,128, 18,132, 82,208,144,242,234, + 65,199,219, 94,253,242,203, 47, 57,187,119,239,230, 87,175, 94,157, 61,110,220,184,246,141, 26, 53, 26, 73, 8, 81, 54,104,208, +224,133,215, 39,188,120,244,255,222,121,215,190,119,239, 62,169,169,151,132,148,115, 71,164,243,127,124, 85, 38,218,203,150,215, + 98,176,148, 60,207,131, 82,138,241,227,199,107, 91,182,108, 73, 4, 65, 0,165, 20, 74, 91,169,141,147,208,146, 16,238, 73,194, +243, 54, 17,100, 19,161,252, 67,146, 32, 83,212, 24,253, 6, 30,107,219,177, 35,111, 42, 75,130, 78, 31,130,220, 15,223,133,148, +145, 15,154, 85, 4, 81,166, 69,153,164, 70,145, 85,142,188, 14, 93, 96,140, 63,143,134, 90,189, 76, 70, 72, 31,118, 31, 97, 48, +254, 91,212,232, 65,254,135, 55, 33,100, 55, 33,100,247,156, 57,115, 30, 1,224, 69, 8,217, 93, 97,130,188, 43, 62, 43, 43,215, +185,197,178,119,117,157, 27,254, 91,253,115,131, 57,115,230, 60, 74, 8,217,221,163, 71,143,231, 42,140,220,157,143, 96,137,162, +120,232,243,207, 87,249,188, 60,110,168,207,182,221,235,194,183,239, 56,217,241,217,167, 51,206, 26,252, 59,120,111, 90,245,167, + 82, 16,232,110,135,183, 38, 73, 29,188,124,124,144,148,148,132,232,232,104,152,205,102, 88, 44, 22, 88, 44, 22,216,242,243, 97, + 47, 40, 0, 41, 46,134, 82, 16, 96, 78, 78, 70,211, 14, 29, 64,128, 54,142, 26,172, 27,171, 0,171, 12, 22,165, 32, 46, 46,229, +175, 91, 84, 19,222,194, 92,117,238,220,185,243,198, 47,190,248, 66, 49,125,250,244,176,224,224,224,136,244,244,244,228,192,192, +192, 65, 31,125,244,209,239, 11, 23, 46, 84,141, 25, 51,166,197, 23, 95,124,241, 44,128,117, 53,105, 41,212,230,118, 65, 62, 45, + 80, 92,214, 21, 90,165, 18,121, 69, 22,228, 23, 91,144, 83, 96,198,142, 93,163, 97, 49,155, 32, 88,172, 16,109, 2,116, 62,195, +209,220,243, 17,128, 94,106, 91,147,102,100,100, 36,206,156, 57, 83, 21,193, 50,155,205, 24, 48, 96, 0,134, 15, 31,142,164,164, + 36,196,197,197,193,205,205, 13,222,222,222,216,186,117, 43, 78,157, 58,133,144,144, 16,167, 79, 18, 94,229,133, 79,191,253, 30, +102,179, 25,148,211,129, 86,171, 89,118, 52,130, 37, 73,146, 65,169, 84, 86,152,163,114,115,229,230,230,134,207, 63,255,220,244, +218,107,175,253,109,206, 63,181, 90, 93,163, 19, 38,144, 58,121,120,182,129, 49, 37,188,226,162,148,129, 64,133, 71,251,198,195, +102,147,144,112, 97, 0,212, 42, 21, 56,162,130, 32,228, 66,239,230, 3,128,180,173,229, 60,234,191,119,239, 94,232,245,250,170, +106, 65, 0, 24, 50,100,200, 12,157, 78,215,211,108, 54, 15,219,189,123, 55, 10, 10, 10, 16, 28, 28,140,134, 13, 27, 34, 42, 42, +170,191, 3,133, 7,178,179,179,225,167, 23,220, 39,206, 89,216, 16,156,103,197,197,149,209,112,245,226,133, 89, 17,139,222,223, + 67, 9, 66, 65, 16, 26, 49,142,108,169,173, 39,225,214,173, 91, 69,131,193,112, 57, 51, 51,179,231,210,165, 75,179, 91,182,108, + 25, 56,127,254,252,185, 6,131,193,115,230,140,215,147,186,119,239,254,221,226, 21, 95,246,216,183,229,147, 70,146, 68,127, 37, +176,204, 47,201, 72,184, 88,219, 53,116,250,244,105,184,186,186, 34, 49, 49, 17, 94, 94, 94, 16, 69, 17,146, 36,129, 32,171, 88, + 84,200,190,231,237,194,215,188, 92,189, 26,176,157,151, 40,109, 77,101,146,130,188,247, 30, 71,231,205,147,110,161,217, 78,169, + 82,161,180,148,162,248,207, 61,144,242, 76,160, 5,101,128,201,138,210, 50, 30,197, 38,130, 98,147,132,178,142,161, 16,247, 69, +194,163,208, 12, 74,105, 7,118,187, 97, 48, 24, 53,148, 85, 67, 8, 33,187,195,195,195,135,212,244, 59,165,116, 8, 0,235, 13, +203,112,228, 51, 0, 44, 94,188,120, 81,181,101,211, 93, 49, 88,103,206, 93,222,218,190,125,243,182, 1, 1, 30, 45, 66,218,183, +247, 14,240,191, 92,212,192, 59,192,245,231,189,167, 52, 89,153,249, 23,206,156,185,244,131, 51, 70,181, 44, 47, 15,198,147, 39, + 81,148,151,135,178,210, 82,152,139,139, 33,228,231,195,175, 85, 43,208,146, 18,240,101,101,144, 89, 44, 80, 72, 18, 52, 90, 45, + 42,194,128,183, 68, 46, 73, 80,253,241, 7,252,134, 15, 7,149,203,145,119,226, 68, 85,181,160,107,255,254,128, 86, 11,206,221, + 29,182, 29, 59,192,243, 60, 36, 15, 15, 96,197, 10, 71,204,149,151,175,175,239,214, 79, 63,253, 84,145,147,147,131,179,103,207, +158,186,114,229, 74, 81,131, 6, 13,116, 50,153, 76,186,112,225,194,161, 11, 23, 46, 12,108,210,164, 9, 68, 81,108, 90,155, 94, + 73,129,206,102,179, 75, 72,203,186,134,212,244,211,112,211, 53, 2,229, 2,145,153,103, 2, 65, 67,216,203, 46, 64,170,104, 75, +102, 41, 75, 69,169,197,177, 72,155,205,102,131,205,102,131, 32, 8,176, 90,173,120,254,249,231,113,236,248,113,124,187,235,119, +164,164,164, 32,216, 71,131,103,158, 30,129, 78,157, 58,161,178,199,161, 35,134,181, 58, 77,186, 46,131, 82,169,196,182,109,219, +160,213,106,255,182,125,135, 78, 52,153,204,152,156,156,220,200,219,219, 27, 28,199, 85, 69,177, 6, 14, 28,168, 73, 74, 74,202, +177,219,237, 93, 78,156, 56,145,231,204,201,187,103,207,113, 76,152,112, 22,217,217,229,145,221,239,191,253,159,127, 74,186, 98, +195,128,193,123, 1, 0,238,238,238, 88,182,204,177,217, 30, 68, 81,196,154, 53,107,170,170, 5, 1, 64,169, 84,118,159, 62,125, +250,176,155,173,223,182,109, 91,135,242,179, 42,159,168, 29,200,159,116,211,245, 38,206, 89,216, 16,212, 62,216,145,158,132, 70, +163,177,204,211,211, 51,178,168,168,232,241, 77,155, 54,229,135,133,133,241,238,238,238,121, 0, 84,132,218,108, 39, 14,253,144, +100, 46, 42, 26,111,179,217, 28,110, 52,158,151,151, 7,139,197,130,171, 87,175, 66,163,209, 64, 46,151, 87, 24,172,202, 29,169, +248,104,151,236, 84, 70, 56,153,157,231,230, 99,222,173, 47,118,142, 3,174,102, 0,159,237, 66,222,216,193,176, 47,156, 12, 81, + 80,160,164, 72,130,117,240,107,176,218, 36,216,121, 37,202, 90,183, 67,254,130, 15, 96,209,105,128,211,127,178, 59, 8,131,193, +168,233,129,117,247,236,217,179,231, 58,184,250, 1, 0,131,157, 49,110,149,203,179,103,207,158, 91,185,173,240,240,240, 50, 0, + 70,103,211,234,208, 72,238,146,164, 88,181,111,111,148,156,147,203,184, 38, 65, 46,133,128, 21, 39,162,211, 92,236,162,252, 11, + 39,115,230, 84,226,197,139,160,146,132,146,130, 2,152,243,242, 96,207,202,130, 61, 43, 11,164,184, 24,178,178, 50,200,204,102, +200,173,102,168,101, 50, 20,102,102,130,112,220,217, 90, 51,198,110,175,138, 20, 92, 87, 45,168,211,129,232,116,128,139, 75,213, +247,196,193, 42, 66,149, 74,245,245,154, 53,107,124,253,252,252,176,110,221, 58,248,250,250,182,124,236,177,199,114, 30,122,232, +161,204,161, 67,135,198,188,245,214, 91, 3, 67, 67, 67,145,147,147, 3,158,231, 19,107,211,179,219, 84,127,157, 75, 20,145,157, +243, 23,162, 98,191,198,238, 95,231,224,252,213,179, 72,207, 45,133, 75,195,113,144,233, 30,170, 90, 87,169,239,141,204,204, 28, +128,212,188,239, 55, 26, 33, 74, 41, 78,158, 60,137, 13, 59,143,193,208,246, 49,200, 93,188,113,250,244, 57, 28,222,191, 15, 1, + 1, 1,181,154,161,119, 95,230, 51, 31,235, 82,136,253, 91, 94, 65,214,165,175, 29, 54,120, 14, 94, 20, 49,151, 46, 93,162,174, +174,174,215, 85, 17,246,235,215,143,140, 28, 57,210, 85,169, 84,238,232,221,187,183,195, 3,223, 82,144,147,146,152,139,166, 77, +255,231,109, 55,124,147,141,184,152, 62, 56,123,234,113,236,252, 49,189,234,251, 70,141, 26, 33, 35,227, 10, 0,122,182,150, 52, +254, 58,120,240, 96,236,222,189, 27,106,181, 26, 90,173, 22,195,135, 15,135,201,100,122,170,226,137, 6,132, 16, 16, 66, 48,191, +162, 45,159,201,100,178, 56,106,176,146,242, 20,218,183,103, 45,201,122,123,145, 50,235,237, 69,202,172, 21,159,146,210,137,115, + 22, 54,156, 48,231,157,193, 0, 26, 86,111,155,229,160, 33, 42, 62,126,252,248, 31, 51,102,204, 8,104,215,174,157,201,223,223, +223, 94, 84, 84,196, 15, 31, 62, 60, 32, 55, 55,247, 13,103,204, 21,165, 20,185,185,185,200,201,201, 65,106,106, 42,178,179,179, +145,147,147, 83, 62,228, 9, 26,186,242, 54,225,105,240,220, 15,162,221, 98,177,203, 72, 11,128, 94, 17, 37,155,117,222, 60, 72, + 53,136,158, 49, 21, 21,131, 51, 83, 72,127, 37,193, 42,169, 81,104,149,161,192,194,163,216, 44,162,136, 40, 80,204,169,144,215, +163, 55, 44, 34,143,162,194, 34, 16, 66, 78,177, 91, 8,131,193,168,201, 8, 45, 94,188,120,209,221,210,174,252, 28, 30, 30,126, +166,218,182, 52,183, 19,193,234, 93,173,222,179,247,141, 43,157, 61,123, 54,115, 64,255,199, 26,174,252,252,112, 83,155, 85, 20, +118,253,188,223,102,183,233,202,206, 93, 72,116,170, 65,143, 77,146,246,197,198,196, 12,232,217,163,135, 42, 41, 46, 14,246,252, +124,136,249,249,144,219,108,144,149,150,130,179, 88,192,151,149,161, 81,103, 45, 64,125,113, 34,209, 40,216, 68,241, 64,173, 38, +163,194, 96,161,210, 92, 85, 84, 23, 86, 85, 11,234,116, 85,223, 59, 98,176,124,124,124,180, 3, 7, 14,236,221,165, 75, 23, 80, + 74,177,116,233, 82,216,108, 54,165,205,102,131,221,110,135,205,102, 67,113,113, 49,182,111,223,142,141, 27, 55, 30,215,235,245, +223,212,110, 2, 45,251, 14,254, 25,223,255,249,225,143, 42,247, 31,254, 18,118,139,128, 18,179, 59, 74,205, 86, 20,151,201, 97, + 85,245, 3, 33,191,131,227, 85,232,209,185, 25, 14, 29,189,104,150,236,182,253, 78, 58,123, 88, 44, 22,100,101,101, 35,175,228, + 55,160, 48, 21, 13,108,197, 40,185,122, 25,157,159,127,161, 86, 51,196,113,208,174, 91,248, 60,100, 50, 25,182, 31, 47,129, 76, + 38,131, 32,220,124, 56, 42,158,231,225,230,230,134,146,146, 18, 0,168,213,101,217,237,246, 79,118,236,216, 49,168,105,211,166, +234,192,192,192,235,170, 9, 39, 79,158,172, 60,123,246,108,235,132,132,132, 15, 1, 76,119,100, 95, 11, 11,165, 95,243,242, 46, + 13, 31, 54,108,152, 34, 50, 50, 18,148, 82,180,104,225, 14,189,171, 14,132, 83,161, 77, 27,111, 0, 23, 64, 8, 65,239,222,189, + 97,179, 25,133,210, 82,212,216,208, 59, 38, 38,230,201,176,176,176, 38,130, 32,196,119,232,208, 65,150,145,145,129, 17, 35, 70, +224,251,239,191,175,124,162,193,236,217,179,175,143, 76,150,148,212,106,176, 36, 73,130,205,102, 67,196, 79,105, 46, 10,133,194, + 5, 40, 31,143, 45,252, 5,175, 44, 80,187, 11,138, 22, 2, 64, 86, 68,248,130, 24,160,124,248, 6, 71,143,121,126,126,126, 74, +227,198,141, 47,125,246,217,103,173, 95,123,237, 53,203,107,175,189, 22, 80, 86, 86,182,149, 82,122,205,201,130,197,154,158,158, +174,211,104, 52, 56,117,234,148, 85,163,209, 40,124,125,125, 9,165, 20,130,204, 69, 38,113, 72, 0,165, 39,136, 40, 42,120, 94, +246, 52, 8,249,157,240,124,141,199, 93, 4,126,187,116,246, 92,175,230,254, 45,184,226,195,103, 80,216,229, 33, 20,151, 2,165, + 37, 4,162, 92,131, 82,153, 10, 37, 77, 91,160,216,203, 23, 50,112, 48,166, 36,217, 5, 74, 15,176, 91, 8,131,241,159,163, 70, + 15,114, 99, 4,235,129, 7, 30,216, 92, 61,202, 84,249, 25,128, 5, 64, 77,109,162,179,171, 71,170,170, 27,170,155,109,231, 6, +221,186, 25, 44, 74,233, 17,212, 80, 21, 23, 24, 24,216,115,218,180,105, 29, 95,125,245, 85,148,148,148, 96,195,134, 13, 88,181, +106, 21, 2, 3, 3,123,166,164,164, 28,117,116, 99,141, 27, 55,254,238,199,253,251,223,232,216,170, 85,139,198,141, 27,227,194, +165, 75, 80,216,108,144, 9, 2,120,147, 9,114,187, 5,141, 67, 93,160, 80, 55, 64,122,146, 9,155,207,156,185, 70, 41,253,170, +198, 27, 55,199,161,244,209, 71, 81, 20, 23, 7, 78, 16,224, 58,104, 16,136, 86, 11,170,215,195,190,101, 11,100, 50, 25, 56, 73, +130,108,225,194,114,179,213,183,214, 54,243,200,204,204, 52, 53,111,222, 60,238,252,249,243, 33,173, 90,181,194,123,239,189,135, +148,148, 20, 80, 74,145,149,149,101,206,202,202, 50,230,229,229, 37,115, 28,247, 99, 90, 90,218,215,142,140, 20,158,217,130,219, +180,127,255,129,105,161,157,219, 54,239,211,107, 62,118,239,126, 23, 5, 69, 69, 40,181,200, 80, 82,102, 67,169,153,194,224,218, + 20,221, 58,118, 65,118,174, 21, 9,103, 98,211,178, 21, 30, 95, 57,107,176,226,227,227,209,200, 19, 56,123, 33, 6, 13, 44,185, +104,229,174, 67,151,158, 15,225,202,149, 43, 55,141,122,253,205,100,145,242,155,127, 81, 81, 17,122,180,106,133,204,204, 76,228, +230,230, 86, 51, 97, 28, 60, 61, 61,161,213,106, 17, 19, 19,131, 63,254,248,195,206,113,220,187,181,165, 45, 38, 38, 38,190, 71, +143, 30, 17, 27, 55,110,156,240,246,219,111,171, 43,205, 85,101, 68,232,163,143, 62,210,142, 26, 53,106, 76,151, 46, 93,162,226, +226,226,182,214,166, 23, 29,125,114,135, 94, 79,222, 28, 59,118, 82,219, 49, 99,198, 96,251,246,205,120,233,197,150, 32,156, 10, +132,168, 48,244,241,214, 88,176, 48, 6,221,186,245, 70,131, 6, 10, 28, 56,112, 38, 73, 38,115,251,206, 1, 51,180,108,201,146, + 37, 50,181, 90, 13,171,213,138,146,146,146,170,253, 95,188,120, 49,230,204,153, 3, 0,152, 55,111, 30,230,207,159, 15,179,217, + 92,107, 7,135,202, 8, 86, 98, 98, 98,149,209,231, 56,174, 42,162, 5, 40,145, 94, 36, 43,216,127, 65, 31, 99, 52, 26,157, 30, +197,253,218,181,107, 7, 87,174, 92,217, 78, 46,151,251,236,221,187, 87, 42, 45, 45,221, 94,135, 39,183, 37,145,145,145,239, 83, + 74,101, 90,173,246,151, 83,167, 78,245, 41, 45, 45,213, 82, 74, 65,196, 43, 69,156,181,219,118,145,200, 56, 42,227, 7,131,160, + 57,120,188,171, 80,106,115,106, 44, 92,100,178, 47,230,110,218, 57,121,109,196, 71,134,162,210, 66,148,125,176, 6,182,216,179, +176, 41,117,200, 93, 24, 14,147, 85, 66, 89,126, 9, 92,215,126, 14,141,175, 47, 14, 23, 39,102, 21, 22, 21,173,101,247, 26, 6, +227, 63, 23,149,170,209,131, 84, 55, 71, 21,159,243, 0, 36,133,135,135,231, 84,107,139,149, 13, 32, 30, 64,167,138,245,178,111, +248, 95, 54,202,123,166,135, 85,211,201,174,102,180,170,127,182,222,176, 78,124, 93,246,203,161, 42,153,148,148,148,163, 97, 97, +229,157,186,202,202,202,144,154,154, 10, 65, 16, 96, 52, 26,143,214,114,195,191,110,182,237,173, 91,183,138,221,186,117, 27,245, +201, 87, 95, 29,154,242,228,147, 30,221,135, 14, 69,234,241,227,176, 25,141, 80, 10, 2,148, 10, 53,236,165, 13,145,151,102,198, +151,103,206, 20, 89, 69,113,116,108,108,172,189, 38,205,202, 8, 65,101, 99,118,232,116,229,237,174, 92, 93,203,205, 21,199,129, + 39,164, 60,138,229,234, 10, 40, 20,181,166,179, 98, 63,159,125,229,149, 87,162,126,254,249,103,247,209,163, 71, 99,232,208,161, +241, 69, 69, 69, 3,114,114,114, 74, 28, 52, 59,215,105,210,173, 91, 69,239, 78, 79,141,252,124,245,218, 67, 99,199,142,245, 24, + 58,108, 21,226,206,158, 70,126,105, 67, 0,128,161,129, 11,186,181,122, 11, 89,185, 22,252,250,203,238, 2, 42,153,158,165,127, +109,174,113,223,189,189,189,175,139,200,241, 60,143,195,135, 15, 99,234,212,169,104,160, 59,140,226,164,203,232,240, 80,111,244, + 29,243, 2, 94,122,233, 37,240, 60, 15, 47, 47, 47,100,102,102,222, 84, 83,146, 96,154,183, 50, 66, 39,136, 28,178, 11,149,226, +247,251,158,231,166, 79,159, 78,210, 79,206, 66, 89, 73, 6, 26, 41, 44, 80,112, 13,144,145, 59, 18, 27, 55,110,164,185,185,185, + 59,228,114,249,123,169,169,169, 87,107,203, 79, 0, 80, 40, 20,243, 51, 51, 51,165, 55,222,120, 99,226,248,241,227,213, 29, 58, +116, 32, 77,154, 52, 65, 90, 90, 26,226,227,227,169,197, 98,225,244,122,189,143, 67,249, 73,169,212,181,107,215,167,247,239,255, +225,200,227,143, 63,233,213,191,255, 3,240,245, 45,134, 32,228,128,112, 10,168,212, 13,177,118,237, 98,100,101,230,225,216,241, +227,249,101,101,202,209, 81, 81,215,143, 14,127,139,116,218,246,238,221, 11,181, 90,141,237,219,183, 11, 62, 62, 62, 50,119,119, +247, 91, 70,176,202,202,202, 84,181,105, 86, 26,172, 74, 99, 85,105,178, 86,255,152,234,162, 80, 40, 92, 8, 33, 16, 4,161, 97, +139, 22, 45, 66, 29,217,247,155, 20, 78, 2, 33,100,195, 59,239,188,243,118, 94, 94,222, 18, 71, 12,255,141,154,209,209,209,171, + 0,172,170, 92,238,214,173, 91,151, 43, 87,174,252, 34, 73,146, 70,150,123,197,244,215,158,129, 89, 33,175, 30, 10, 22, 57,234, + 2, 66,223, 17, 56,146,247,215,242,238,230,154, 52,143, 31, 63,110, 14, 11, 11,123,118,193,162, 79,246, 76,154, 50,197, 69, 28, +255, 50, 74, 47,189,143, 98,155,132, 98, 59,129, 69,226,224,245,203, 54,200, 26, 52,196, 33,174,160,212,202,243,207, 94,190,124, +217,234,204,190,215, 5,166,201, 52,153,102,253,212,172,237,185,250,102,177, 11, 7,214,139,118, 64,231,174,224,144,193,170,136, + 96, 97,194,132, 9, 40, 46, 46,198,230,205,155,241,235,175,191, 58, 29,193, 2,128,168,168,168,203,221,186,117,235,247,254,250, +245,223, 13,110,213,170, 81,171,166, 77, 21,158,109,219, 66,163,213,162, 32, 55, 23,241, 73,233,226,198, 11, 23,174,154, 5,225, +185,216,216,216,115, 14, 68, 28, 32, 8, 2,188,188,188, 64, 5, 1,154, 89,179, 64, 9,129, 68, 8, 74, 8,129, 36, 73, 16, 5, + 1,170,174, 93, 33,200,100,200, 43, 40,112, 40,157,105,105,105,105,129,129,129,163, 95,123,237,181,159, 55,108,216,192,245,238, +221,187,227,143, 63,254, 72,111, 39,179,179,227,183, 95,246,237, 60,172,223,202,149,171,190,237, 18,214, 45,176,113,147, 38,170, +158,129,110,176,217, 69,100,102,229,226,200,177,115,150,132,179,127,165, 66, 48, 63,151,121,250,167, 26,247, 93,161, 80, 36,185, +187,187, 55,158, 63,127, 62, 4, 65,128, 36, 73,176,219,237,200,206,206, 70, 92, 92, 28, 66,186, 63,128,214,227,198, 35, 47, 47, + 15,235,214,173, 67, 64, 64, 0, 6, 13, 26,132,130,130, 2, 92,184,112, 33,233,102,154, 11,214,138,215,153, 27,131,193,208,121, +220,184,113, 31,188, 49,170,248,161, 55,199,141, 5,165, 20,225,107,190,196, 55, 59, 55, 30, 5,200,220,244,244,244,191,156,217, +255,138,233,111,222,237,214,173,219,246,181,107,215,206,224, 56, 46,180,172,172,204,160, 86,171,115, 8, 33, 39, 77, 38,211,251, +209,209,209, 39, 29,213, 59,113,226, 68, 82, 72, 72,200, 35,153, 25,171,191,155, 56,161, 95, 51,187, 61, 84,169,119,123, 8,148, + 10, 40,200, 79, 1,161, 39,109, 63,236,252,237, 74,113,177,226, 25, 71,167,202,145,201,100,175,255,244,211, 79, 64,197, 84, 57, + 70,163,241, 76,229,240, 31, 55,139, 96, 57, 66, 89, 89, 25,236,118, 59, 8, 33,215, 25,172, 75,151, 46, 93, 23,209,114,162, 96, +235, 1, 96, 32, 42,186, 21, 3,104, 8,192, 59, 39, 39,199, 27,192, 80, 66, 72,118,197, 83, 87,229,107, 63,165,244,176,147,215, +105, 92,104,104,104,127, 66,200, 7,165,165,165, 38, 0,144,148,214, 98,174,140,219, 70,120,222, 22,255,217,163, 14, 53, 15,136, +142,142,142, 9, 11, 11, 27, 60,107,230,172,111,159,120, 98,148, 79,224,139,207,242,228,228, 5,216,212, 74,168, 18, 18,192,233, + 92,233,158,194, 43,153,197,114,254,153,232,232,104, 54,138, 59,131,193,184,111, 32,181, 85, 25, 85,187,217,154,130,130,130,224, +233,233,137,188,188, 60, 92,187,118, 13, 70,163, 81, 91, 87,135,123,227,100,207,132, 82, 66, 29,152,236,185,186,102,239,222,189, +101, 22,139,229,138,221,110,119,106,140, 10,185, 92,158, 29, 25, 25,217,216,145,116,250,251,251,143, 12, 8, 8, 88,152,150,150, +182, 43, 53, 53,117,214,157,112,247,149,147, 61, 67,166, 24, 8, 42,181, 7, 64,192,241,181, 78,246, 92, 93, 51, 36, 36,164,183, + 66,161,248,212,102,179, 53,190,113, 61,155,205,134,220,220, 92, 88, 44,229,213,198, 74,165, 18, 94, 94, 94, 80, 42,149,224,121, + 62, 73, 20,197, 41,149,115, 17, 58,242, 20,242,225, 84,185,105,250, 75,227, 40, 0, 44, 93,251, 5,185,100,162,158, 95,127, 77, + 45,245,229,105,137, 16,194,245,232,209,121,132,171,142, 12,144,168,212,177,226,187, 51, 37, 37,248,213,207, 47,248,251,173, 91, +183,138,117, 77,103,104,104,232,142,146,146,146,254, 9, 9, 9,183, 74, 23, 40,165,218, 91,105,222, 48,208,104,109,220,180,138, +240,126,120,162,173, 62,217,179, 76,146,218,219, 9,161,142, 76,246,204, 34, 4, 76,147,105,178, 8,214,191, 21,135,123,109, 25, +141, 70, 45, 33,228,109,148,207, 17,183,136, 82,250,193,237,108,184,194, 64,109,172,120,221,142, 70,163,187,153, 65,105,105,105, + 91, 1,108,189,147,154,244, 14,236,123,133, 65,106,251, 79,156, 36,130, 40, 88,150,173, 91,163, 2, 0, 9,176, 5, 93,131, 80, +159, 78,226,138, 42,177, 45, 21,175, 59, 74, 76, 76,204,147, 6,131,225,152,151,151, 87, 83,139,197,162, 40, 43, 43,147, 83, 74, +171,234,101, 53, 26, 77, 78, 45,215,205, 71,172,152, 41,175, 46, 4,176,162,226,197, 96, 48, 24,204, 96,221,112, 35,251, 0,192, + 7, 44,219,254, 91,204,253,140,122,254,151,247,223,104, 52,246, 96,103, 1,131,193, 96, 48,156,129, 99, 89,192, 96, 48, 24, 12, + 6,131,113,103, 33, 0,110, 58,196,181, 51,117,171,132,144,246,206,110,184, 54,125,166,201, 52,153, 38,211,100,154, 76,147,105, +222,127,154,181,105,223, 47,109,187, 28,110,228, 94, 39,113,214, 0,144,105, 50, 77,166,201, 52,153, 38,211,100,154,255, 65, 88, + 21, 33,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, + 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,163,222,112, 87,123, 17, 50, 24, 12, 6,131,193, 96,252, 23, 97, 17, 44, + 6,131,193, 96, 48, 24,140,187, 97,176, 8, 33,180,250, 59,131,193, 96, 48, 24, 12,198, 63,193,253,234, 65, 88, 4,139,193, 96, + 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24,140,127,135,193,234, 93, 17,154,235,205,178,132,193, 96, 48, 24, 12,198, 63, +200,125,233, 65,170,122, 17, 18, 66, 40,165,148,176,227,204, 96, 48, 24, 12, 6,227, 31, 53, 35,247,161, 7, 97,195, 52, 48, 24, + 12, 6,131,193, 96,220, 97,238,106, 27, 44, 66, 72,123,166,201, 52,153, 38,211,100,154, 76,147,105, 50, 77,102,176, 24, 12, 6, +131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, + 6,131, 25, 44, 6,131,193, 96, 48, 24,140,123, 4, 1,112,211,158, 0,148,210,211, 14,139,212,161, 55, 65,109,250, 76,147,105, + 50, 77,166,201, 52,153, 38,211,188,255, 52,107,211,118,198,127,212,107,131,117, 55,199,193, 34,132,180,191,211, 25,197, 52,153, + 38,211,100,154, 76,147,105, 50,205,251, 79,243,126,131, 85, 17, 50, 24, 12, 6,131,193, 96,220, 97,100, 44, 11, 24, 12,231,240, +241,241,209,202,100,178,246, 70,163, 49,154, 82, 42,178, 28,169, 31,199,132,227,184,206,148,210,132,140,140,140,156, 59,161,105, + 48, 24,188, 0, 52,151, 36,233,242,157,210,100, 48, 24,204, 96,161,107,215,174, 9,162, 40, 6, 56, 35,166, 84, 42, 83,143, 29, + 59,214,242, 86,191,135,133,133, 37, 72,146,244, 55, 77,185, 92, 46,217,237,246,155, 70,211,228,114,121,118,100,100,100,227,250, +146, 97,132, 16,127, 0, 31,184,184,184,244, 38,132,112, 37, 37, 37, 71, 0,188, 77, 41, 77,174,163,158, 43,128, 23, 1,132, 84, +124, 21, 11,224,107, 74,105, 49, 59, 61,235, 31,254,254,254,131,120,158,223,232,239,239, 47, 81, 74,243, 3, 3, 3,199,164,164, +164,196,176,156,185, 55, 4, 4, 4,180,147, 36,105,170,135,135,199,208, 54,109,218,104, 18, 19, 19, 97, 48, 24,162,100, 50,217, +203,201,201,201, 87,235,104,172, 2, 1,172,245,246,246,126,176, 89,179,102,184,124,249,242,109,107, 50, 24,245,149,198,141, 27, +187, 21, 23, 23,175,226, 56,174,147, 90,173,246,113,117,117,133, 78,167,203, 84,169, 84, 39,221,220,220, 38,238,220,185,179,144, +229,210, 29, 54, 88,148, 82,223,223,126,251, 13,122,189, 30,162, 40, 66,146, 36, 72,146, 4, 74,105,213,123,117,108, 54, 27,250, +247,239,239, 91,211,198, 40,165,126,135, 14, 29,130,171,171,235,117,255,123,224,129, 7,184,163, 71,143, 66,173, 86, 95,183,190, +213,106, 69,143, 30, 61,188,235,145,185, 50,232,116,186, 19, 3, 6, 12,176,133,133,133,105, 20, 10, 5,205,201,201,121, 96,221, +186,117, 39, 8, 33,221, 40,165,215,156,212,235,170,215,235, 87, 61,249,228,147,150,192,192,192, 70, 58,157, 14,102,179,185,201, +170, 85,171,158, 39,132, 76,162,148,158, 96,167,104,253, 33, 56, 56, 88,239,225,225,241,213,146,197,139, 85,191,252,252, 51, 82, + 83, 83, 53,162, 40,126, 71, 8,105, 69, 41, 21, 88, 14,253,243,199,131, 16,178,235,195, 15, 63,244, 25, 53,106, 20,120,158,135, +217,108,198,182,109,219,186, 45, 92,184, 48, 50, 32, 32,224,193,212,212,212,203,206,104,250,248,248, 52,214,106,181,145,225,225, +225,186, 17, 35, 70, 0, 0, 76, 38, 19,118,236,216, 81,103, 77, 6,163,190,226,237,237, 61,182,168,168,232, 99,173, 86,171,112, +119,119,135, 70,163,129, 66,161,128, 82,169, 12,244,240,240, 8,212,233,116,253,159,125,246,217, 55,190,253,246,219,245, 44,183, +238,160,193, 2, 0,173, 86,139,205,155, 55, 67, 38,147, 65,161, 80, 64, 46,151, 67, 46,151, 67,169, 84, 66, 38,147, 85, 45, 43, + 20, 10, 4, 4, 56, 30,236,250,241,199, 31,225,230,230, 6,189, 94,143, 54,109,218, 0, 0, 84, 42, 21, 14, 28, 56, 0,133, 66, + 81,165, 29, 26, 26,122, 79, 50,101, 84, 31,146, 79, 1,229,183,115, 91, 89,229, 60, 81,142, 90,120,222, 74, 1,229,136, 94,174, +146, 91,163,222,220,162,143, 62, 75,115,119,247, 56,100,183,219,119, 29, 58,116,168,157,159,159,223,136,137, 19, 39, 46, 6,240, +180, 19,230,202,213,205,205,109,213,107,175,189,230, 61,118,236,216, 51,190,190,190, 27,138,139,139,143, 69, 70, 70,182, 88,187, +118,237, 27, 19, 39, 78, 92, 69, 8,233,237,108, 36,171,122,148,144,231,249, 92,141, 70, 19,124,248,240,225,123,126,243, 39,132, +248, 1,248, 0,128, 0, 96, 25,165, 52,161,218,111,205, 21, 10,197, 7, 54,155, 45, 31,192,251,148,210,212,250,120,177, 88, 44, +150,208,247, 23, 46,148, 95, 73, 76,196, 79,123,246, 84,126,237, 26, 16, 16,208, 29,192,209,127, 50, 45, 97, 97, 97, 77,148, 74, +229, 7, 0, 58, 89, 44, 22, 67,197,245,106,148, 36,233,199,178,178,178,247, 98, 99, 99,203,234,120,156, 2, 0,180, 65,121, 15, +227,155, 62, 39,133,135,135, 95,154, 61,123,246,213,123,169, 9, 0,102,179,121, 65,223,190,125,125, 70,143, 30,141,125,251,246, + 97,255,254,253,232,218,181, 43,250,247,239,143,196,196, 68,151,117,235,214,189, 4, 96,142,147,251,255,252,203, 47,191,172, 27, + 49, 98, 4,246,236,217,131,223,126,251, 13,221,187,119,191, 45, 77, 70,253,133,231,249, 66, 73,146,228, 0, 60, 41,165,150,218, +150,239,167,125,111,208,160,193,203,121,121,121,159, 24, 12, 6,120,123,123,131,144,242,203, 83,146, 36,148,150,150,162,172,172, + 12,193,193,193,138, 54,109,218,124, 62,121,242,100,249,231,159,127,190,150,157, 49,206,193, 17, 66,122,221, 80,192, 84, 45, 75, +146, 84,101,172,170, 27, 42,158,231,171, 62, 87,254, 86,241,223, 27, 35, 86,167,111, 88, 38, 37, 37, 37, 85,230,202,205,205,173, + 42, 18,102,183,219,175, 51, 87,114,185, 28,162, 40,222, 44, 10,118,199,123, 45,220, 76, 83, 43,192, 83,222,251,188, 7, 30, 58, +167,221,114,128,122,108, 61, 64,181, 63, 71, 11, 57, 45,219, 63, 84,234,238,238,113,146,231,249,131, 25, 25, 25,103,151, 46, 93, +186,166, 87,175, 94, 58, 31, 31,159,135,156, 76,231,139, 79, 61,245,148,101,204,152, 49,167,131,131,131, 31,214,104, 52,222, 62, + 62, 62, 10,157, 78,183, 67, 16,132,117, 43, 86,172,176,162,188,234,208,169,125,167,148,250,238,219,183, 15, 7, 15, 30, 4,165, +212,189, 54, 19,253, 79,229, 39,128, 89,153,153,153, 35,147,146,146, 70,123,121,121, 29, 38,132,116,172, 56,103,218, 13, 27, 54, +236,143,210,210,210,129,145,145,145, 99, 42, 76,216,189, 76,231,223, 48, 24, 12, 63, 24, 12, 6, 19,207,243, 63, 94,185,114, 69, +182, 42, 34, 2,130, 80,229, 89,229,114,185,252,244, 63,153,206,144,144,144,150, 74,165,242,207,101,203,150, 13,217,183,111, 95, +192,241,227,199,185, 63,254,248,131,251,228,147, 79, 2,194,194,194,198,169,213,234,227, 33, 33, 33,242, 58,238,123,155, 35, 71, +142,152,140, 70, 99,209,205, 94, 23, 47, 94, 52,205,158, 61,251,161,122,160, 9, 66,200, 71, 7, 14, 28,216, 63,102,204, 24,140, + 31, 63, 62,101,203,150, 45, 83,166, 79,159,126, 37, 33, 33, 1, 3, 6, 12, 0,207,243,163,111,150, 15,183,210, 36,132,240, 60, +207,143,121,250,233,167,113,229,202, 21, 76,152, 48, 33,101,199,142, 29, 99,103,204,152,113, 37, 33, 33, 1, 3, 7, 14,116, 90, +243,159, 56, 63,235,179, 38, 33, 36,131, 16, 98, 34,132,232,239,132,102,133, 94,126,229, 75,161, 80,228,187,186,186,230,123,123, +123,231, 7, 5, 5,229,139,162,248, 21, 0,185,163,154,228,127, 55,173, 14,132, 16,174,182,229,250,112,140, 8, 33,254, 60,207, +127,199,113, 92, 58,199,113,153, 60,207,111,245,243,243,107,228,140,166,191,191,191,103,113,113,241, 82,131,193,128,134, 13, 27, +130, 16, 2,158,231,209,173, 91, 55,116,232,208, 1, 28,199, 65,146, 36, 92,190,124, 25,105,105,105,104,219,182,237,210,240,240, +112,207,187,177,239, 53,121,144,127,189,193, 2,112,248,134,157, 58, 92,249,163, 40,138,215, 25,169, 27, 77, 85,245,101,142,115, +168, 67, 34,177, 90,173, 85,230, 74,175,215, 67, 46, 47,191, 22, 4, 65,248,155,230,205, 12,150,163,120,120,120,252, 72, 8,121, +172, 46,255,221,242,110,107,124, 61, 47,232,102, 39, 2,212,106, 53, 68, 81,252,225,242,229,203, 39,154, 52,105,146, 93, 88, 88, +232,230,230,230, 6,158,231,157,221, 76, 72, 80, 80, 80,163,128,128,128, 88, 0, 91, 0,236, 59,117,234, 84,114,159, 62,125,232, +218,181,107,127,111,223,190,125, 16,254,215, 46,203, 41,220,220,220,112,240,224,193,250,118,174,185,151,149,149, 33, 47, 47, 15, + 17, 17, 17,174, 94, 94, 94,123, 9, 33,207, 14, 27, 54,236,183,109,219,182,233, 10, 11, 11, 97,179,217, 0,192, 92,223, 18,110, +179,217,214,235,245,122, 58,124,248,112, 68,172, 89,195, 23, 22, 22,138, 0, 74, 0,152, 56,142,123,249,202,149, 43, 69,255,100, +122, 84, 42,213,180,247,223,127,223,181,109,219,182, 36, 39, 39, 7, 70,163, 17, 57, 57, 57,104,208,160, 1,222,124,243, 77,117, +243,230,205, 13, 42,149,106,102, 93,203,187,102,205,154,221,242,194,115,113,113, 17,225,124,239,227,155,106, 10,130, 64,186,119, +239,254, 70,199,142, 29,215,214, 65, 19, 70,163, 49,213,104, 52, 62,113,228,200,145,241,146, 36,189, 98, 52, 26,191,226, 56,110, +237,174, 93,187,224,237,237,141,214,173, 91,123,101,103,103,119,115, 84,207, 96, 48,180,235,208,161,131, 95,163, 70,141,176,121, +243,102, 0,248, 58, 45, 45,109, 91,117,205, 54,109,218, 56,165,201,168, 34, 93, 46,151,155, 60, 60, 60,244,183,169,163,172,124, +201,100, 50,165, 82,169, 84,170,213,106,165, 90,173, 86,170, 84, 42,229,253,158,137,132, 16, 3, 33, 36, 86, 38,147, 13,112,119, +119,215,123,122,122,234, 2, 3, 3,251, 52,109,218, 52,250,197, 23, 95, 12,114, 84,167,172,172,236, 75,141, 70, 35,247,246, 46, +111,129,211,175, 95, 63,108,218,180, 9, 79, 63,253,180,212,175, 95, 63,105,228,200,145,240,241,241, 1, 0,196,199,199, 67,169, + 84,202,117, 58,221,151,119,105,183,110,233, 65,254,237,200,110,216,201,235, 66, 80,146, 36, 93, 23,173,186,209, 0, 85,127, 57, +138, 40,138,240,245,245,133, 86,171,133, 86,171,189,110, 91, 55,106,222,206, 24, 93,205,155, 55,239,165,213,106,123, 16, 66, 70, + 82, 74, 15,221,129, 19, 91, 14,224,212,213,171, 87, 31,216,190,125,123,255,111,191,253, 54, 62, 44, 44,204,255,227,143, 63,158, +116,238,220,185, 82,163,209,232,116, 67,103,189, 94,143,194,194,194,163, 26,141, 70,119,236,216,177,212, 7, 31,124, 48, 31,128, +103, 81, 81,145,167,139,139, 11,113, 84,167,122,181,160, 90,173,182, 18, 66,100,238,238,238,112,115,115,179,229,231,231,231,133, +132,132, 64,169, 84,230, 42, 20, 10,135,171, 11,187,118,237,154, 36,138, 98,141,237,223, 20, 10, 69,246,241,227,199, 29,237,128, +240, 94,167, 78,157, 30, 90,181,106, 85,131, 22, 45, 90, 32, 34, 34,194,117,219,182,109, 95,108,218,180, 9, 5, 5, 5,184,122, +245, 42, 94,122,233,165, 98, 0, 31,215,179, 2,205,255,177,199, 30, 91,214,169, 83, 39,178,121,243,102, 74, 41, 37,132, 16,112, + 28, 55, 73, 16,132,163, 70,163, 49,231, 30,164,169, 79,171, 86,173, 72, 97, 97, 33, 40,165,224,121,254,186,215,204,153, 51, 53, +227,198,141,155,213,163, 71,143,105,114,185,188, 88, 16,132,109, 38,147,105, 73,124,124,124, 97,125,202,219,135, 31,126,248,181, +148,148,148,129, 65, 65, 65, 63,223,142,142,209,104,220, 92,109,241,132,209,104, 4, 0,232,116, 58,136,162,168,114, 34, 95, 21, +238,238,238, 0,128,107,215,174, 1, 64,252,237,106, 50,202,225,121, 30, 42,149, 10, 50,153, 44,189, 81,163, 70,224, 56,206, 51, + 41, 41,169, 46, 85,110,190, 0, 50,100, 50,153, 82,165, 82, 65,173, 86,163,242,253,204,153, 51,219,120,158,127, 21,128,221,137, +104, 17,117,102,249,158, 71, 68, 56,238, 67,153, 76,166,244,242,242, 82, 84,123, 0, 84,120,120,120, 32, 48, 48,112, 57,128,225, + 14, 74,117,108,208,160, 1, 8, 33, 80, 40, 20,120,249,229,151, 17, 29, 29,253, 99, 74, 74,202,203, 89, 89, 89, 40, 41, 41, 89, +171,215,235,135,102,101,101, 65, 20, 69, 36, 37, 37,161, 83,167, 78, 29,239,242,238,253,205,131,220, 23, 6,171,210, 57,222, 24, +154,187,153,233,169,110,178,170,127,118,240, 34,147,158,121,230,153,155,134,122, 4, 65,248, 91, 21,225,237,156,219, 42,149, 10, +131, 6, 13, 82,107,181,218,239, 43, 76,214, 17, 71,255, 59,106,193,121,104, 4,224,235, 94, 85, 5,175, 95, 96, 96,224,175,195, +135, 15, 15,182, 88, 44,200,205,205, 29,188, 98,197,138, 33,238,238,238,184,112,230,184,106,226,196, 25,165, 0,102, 59,153,196, + 88,147,201,212, 36, 54, 54,182, 67,114,114,242,174,183,222,122,139, 2,240, 4,224, 49,109,218,180,193,153,153,153,201, 40,239, + 81,232, 72, 33,225,123,224,192, 1, 84,220, 28,148, 86,171, 21,238,238,238,136,136,136, 80,235,245,122,232,245,122,244,232,209, +195, 93,161, 80,200, 80,222, 6,202, 17, 35,236,125,228,200, 17,184,184,184,160,180,180, 20, 22,139, 5,130, 32,128, 82, 10,153, + 76, 6,181, 90,141, 94,189,122,121, 59, 81,144, 93, 33,132,244,157, 52,105,210,254, 85,171, 86, 53,104,214,172, 25,222,123,239, + 61,228,230,230, 34, 57, 57, 25, 99,198,140, 41,190,114,229,202,128,234,109,179,234,129,185, 10,232,219,183,239,161,205,155, 55, +251,237,223,191, 31,185,185,185,100,223,190,125, 20, 0, 39,147,201,126, 73, 77, 77,189, 39,109, 50, 68, 81,212, 41,149, 74,216, +237,118,200,100, 50,240, 60, 95,245,206,243, 60,252,253,253,177,127,255,126,153,201,100,146,229,230,230,106,215,173, 91, 55, 33, + 38, 38,198, 7, 55, 84, 57,255,211, 68, 68, 68, 4,142, 31, 63, 62, 85, 38,147,209,129, 3, 7, 62,115,237,218,181,199,253,252, +252, 14, 31, 60,120,112, 37,128,230,206,104, 61,248,224,131, 9, 22,139,229,111, 13, 63, 61, 61, 61,171,202, 35,185, 92,142,134, + 13, 27,174,239,221,187,119, 35, 71, 30, 44, 12, 6,195,183, 42,149,170,170,252,240,246,246,222, 21, 18, 18, 2, 47, 47, 47, 84, +255,222,215,215,247,235,222,189,123, 7,213,135,182,141,255, 6, 56,142,131, 74,165,170,122, 85,152,162,188,238,221,187,227,207, + 63,255,220,226,140, 41,162,148, 90,229,114,121,149, 78,229, 75,165, 82,129,227, 56,169, 14,215,146, 91, 69,115, 5,226,200,242, +189,134, 82,250,144,139,139,139,226,198,239,243,243,243, 21, 45, 91,182,236,225,168,142, 90,173,246,212,104, 52, 0,128, 94,189, +122, 33, 43, 43, 75, 12, 14, 14,126, 97,228,200,145,118, 0,120,245,213, 87, 95,200,202,202,202,179,219,237,188, 76, 38, 67,118, +118, 54,154, 54,109,234,121, 23,203,218,155,122,144,127,189,193,170,120, 34,167,213,223,171, 29,204, 90, 35, 87,149,191, 57, 82, + 69, 40, 73, 18,189, 69, 47,194, 42, 51,119, 39, 13,150,187,187, 59, 70,143, 30,173, 77, 75, 75,251,194,217, 2,188,218,129,247, + 9, 10, 10,218, 31, 23, 23,215, 56, 57, 57, 25, 83,167, 78,197,103,159,125,118, 98,201,146, 37,237, 57,142,227,186, 6, 23, 43, +181,162,181,167, 51, 61, 8, 43,162, 97,113,187,118,237,154,215,166, 77,155,119,252,253,253, 93, 31,124,240,193,227, 54,155, 77, + 63,121,242,228,254, 3, 7, 14,236,219,169, 83,167, 76, 0, 95, 59,168, 7, 73,146,176,103,207, 30,184,186,186, 66,175,215,195, +221,221, 29,149,230,170,174, 36, 38, 38, 34, 53, 53, 21, 46, 46, 46,112,113,113,129, 78,167,131, 78,167,131, 82,169, 68,229,197, +233,100,225,112,137, 16, 50,115,199,142, 29,235, 23, 45, 90,132,130,130, 2,152, 76, 38,204,155, 55, 15,137,137,137, 51, 41,165, + 39,235,147,185, 26, 48, 96,192,225,205,155, 55,251, 70, 70, 70, 34, 53, 53, 21,123,246,236, 73, 17, 69,241, 29,149, 74, 53,246, +218,181,107,247,236,230, 42,138,162,130,231,121,112, 28, 7,142,227,254, 22,193,170, 52, 91, 26,141, 6, 13, 26, 52,192,156, 57, +115, 20,195,134, 13, 27,120, 47,243,243,195, 15, 63,108,186, 98,197,138,213,235,215,175,223,247,220,115,207,109, 63,125,250,244, +115,122,189,254,204,129, 3, 7,150,168, 84, 42,167,111,140,118,187,221, 55, 38, 38,230,186,118,159,162, 40, 66, 20, 69, 8,130, + 0,187,221,142,101,203,150, 97,248,240,225,186,138, 7, 73,193,129,243,211,123,237,218,181, 32,132,224,243,207, 63,175,122,200, +172,174,185,116,233, 82, 12, 27, 54,204,213, 81, 77,102,174,184,235,140,144, 70,163,185,206, 28,213, 5, 65, 16,124, 85, 42, 85, + 70, 69,213, 32, 84, 42, 21, 98, 98, 98,156,142, 94, 85, 59,238, 39,157, 89,190,151, 84,150,195,118,187,253,111,223,183,104,209, +194, 97, 29,157, 78, 71, 42,239,177,118,187, 29,233,233,233,226,233,211,167,197, 46, 93,186, 0, 0,252,252,252,196,200,200, 72, +209, 98,177,240,149,247,107, 55, 55,183,187, 98, 50,107,242, 32,247, 69, 4, 11,192,239, 55,188, 87, 21, 46,149,134,231, 86,145, +171,202,101, 7,219, 96, 65, 38,147, 97,199,142, 29, 85,237,176, 58,118,236, 88,101,230,110,212,189,177,209,188, 51, 40,149, 74, +184,185,185, 97,223,190,125,230,248,248,248,201,206,252,119,203,187,173, 1,177,188, 19, 86,163, 70,141,126,136,139,139,107, 92, + 90, 90,138, 47,191,252, 18,209,209,209,151, 41,165,131,171,162, 93,125, 72,126,199, 64, 56,220,235,141, 16,210,168, 83,167, 78, +251,199,141, 27,231,159,149,149,133, 57,115,230, 88, 22, 47, 94,220,103,221,186,117, 47,107,181, 90, 98, 52, 26,147, 59,117,234, +148,153,144,144, 48,201,209, 30,132, 28,199,101,244,235,215, 47, 0, 0, 92, 93, 93,173, 95,125,245,149,210,221,221, 29,207, 62, +251,172, 57, 35, 35, 67, 93,145, 31, 5,206,220, 16,100, 50, 89,246,248,241,227,189,107,201,227,108, 39, 77, 75,199, 33, 67,134, +124,246,253,247,223, 35, 55, 55, 23, 38,147, 9, 10,133, 2, 75,151, 46, 69, 74, 74,202, 71,132,144,179,245,161, 48, 35,132, 4, + 14, 25, 50,228,208,119,223,125,231,123,238,220, 57, 24,141, 70,124,252,241,199, 41, 57, 57, 57, 3, 41,165, 73, 0,182,223,235, + 36,166,166,166,226,155,111,190,129, 40,138, 24, 51,102, 12, 26, 55,110, 92,101,176, 50, 50, 50,240,213, 87, 95, 65, 20, 69,140, + 31, 63, 30,141, 26, 53,130,221,110, 87,247,238,221, 91,118,175,162, 46,211,167, 79,191,242,195, 15, 63,236, 75, 77, 77,237,183, +100,201,146,158,132, 16,105,230,204,153,203,220,220,220,196,219, 56, 78, 40, 43, 43,131,197, 98,185,233, 43, 48, 48,208,233, 50, +132, 16, 2,155,205,118,157,142,213,106,173,250,108, 48, 24,110,171, 92,250,175, 81, 61,114,165, 82,169,160, 84, 42,161, 82,169, + 42, 35, 87, 4,192,207, 0,156, 50,216,148, 82,107, 96, 96, 96, 85,228,170,174,209,171,187,197,221,236,153,216,170, 85,171, 63, +116, 58,221,192, 11, 23, 46, 92, 23,197, 26, 61,122,180,173, 89,179,102,199, 28,213,113,117,117, 45, 80, 42,149,158,102,179, 25, +199,143, 31, 71,235,214,173, 21,133,133,133, 11, 8, 33,239, 0, 64,199,142, 29, 23,100,102,102, 42,252,253,253, 43,183,139,194, +194,194,130,192,192,192,187,149,109, 55,245, 32,247,133,193,162,148,246,170,254,126, 99, 4,171,182,234, 65, 71, 35, 88,132, 16, +148,148,148, 64,167,211,161, 98, 48, 51, 72,146, 84,181,173, 27,171, 8,111,167, 32, 83,171,213, 56,116,232,144,121,205,154, 53, + 99, 40,165, 7,234, 88,128, 55,158, 50,101, 74,135,188,188, 60,172, 88,177, 2, 95,125,245,149,209,106,181, 14,189,141, 27, 66, +163, 46, 93,186, 28, 58,114,228,136,207,229,203,151,241,230,155,111,226,236,217,179, 79, 13, 30, 60,184, 61,110, 99,160,209,168, +168,168,170,193, 93,187,118,237, 90,164,215,235,161,211,233,144,157,157,173,208,233,116,158,135, 15, 31,118,186, 42, 43, 42, 42, +234,142, 14,238, 74, 8,105,254,248,227,143,239,219,190,125,187, 75, 65, 65, 1,146,146,146,240,214, 91,111,225,243,207, 63,135, + 94,175,199,238,221,187,117, 67,134, 12,249,149, 16,242, 8,165,244,252, 61, 52, 87,218,129, 3, 7,254,250,253,247,223,251,166, +166,166, 34, 61, 61, 29,243,230,205, 75,206,200,200, 24,232,236, 56,103,119, 11, 73,146,232,180,105,211,176,118,237, 90,112, 28, +135, 23, 94,120, 1, 69, 69,255,107,103,239,233,233,121,179,223,248,123, 25,117,145,201,100,244,200,145, 35,203,123,245,234,133, +212,212,212,126,161,161,161,171, 95,124,241, 69,227,221,220,166,205,102,195,157,110, 66, 99,183,219, 81,207,154,229,252,171, 12, + 86,108,108,236, 54,185, 92, 78, 1,212, 41,218, 84, 73, 74, 74,138, 71,135, 14, 29,242, 85, 42,149,242,216,177, 99, 91,234, 26, +189,186, 75,101, 72,245,158,135, 49, 21, 70,242,150,203,148, 82,135,205, 97,203,150, 45,223,242,243,243,123,180, 75,151, 46, 56, +119,238,156, 66,165, 82,225,185,231,158,179, 13, 30, 60,216,198,243,252,116, 39,238,143,231, 93, 93, 93,123, 86, 62, 64,252,246, +219,111,240,240,240,120, 99,200,144, 33,147,210,211,211, 97, 52, 26,149, 21,198, 21, 28,199,225,145, 71, 30, 65, 94, 94,222, 93, + 43,151,111,229, 65,238,151, 8,214,173,118,218,161,234, 65,103,204,144,217,108,174,170,106,114,117,117,173, 50,102,132,144,191, +105, 58, 26, 21,187, 25,113,113,113,145,137,137,137, 43, 41,165,191, 58,251,223,202, 54, 88, 0,174,173, 95,191, 62,254,196,137, + 19,157, 78,159, 62,125,205, 98,177, 12,188,113,196,246,234,209, 46, 71,205, 85, 82, 82, 18, 54,109,218,132,200,200,200,203,148, +210,195,184,195,189, 38,234, 82,125,119,183, 81,171,213,175,109,219,182,205,165,160,160, 0,137,137,137, 24, 51,102, 76, 97, 82, + 82,210,180,225,195,135,127,252,203, 47,191,184,123,122,122, 98,223,190,125,186,192,192,192, 5, 0,158,186, 87,233,108,216,176, +225,242,111,191,253, 54,192,100, 50, 33, 43, 43, 11,111,188,241,198, 53,163,209, 56,168,190,152, 43, 0,136,137,137,113,123,252, +241,199,127, 6,208,235,220,185,115,144, 36, 41, 50, 54, 54,182,170,199,108, 77,191, 57,226,223, 76, 38,147, 76,171,213, 10,183, + 56,183,228,206, 70, 28,170,107,254,249,231,159,203,150, 45, 91,246,227,140, 25, 51, 18,111, 83,179, 86,163, 99,181, 90,113,167, + 53, 43,122,186, 50, 28,164, 50, 98,117,254,252,249, 74, 99,245,202,157, 50, 66,149, 17,172,255, 18, 27, 54,108, 48,126,249,229, +151, 33, 1, 1, 1, 31, 62,255,252,243,189, 12, 6, 3,167, 84, 42,255,224,121,126, 38, 0,135,103, 19,209,104, 52, 19, 60, 60, + 60, 78,243, 60,207,167,165,165,225,226,197,139,224,121, 30,148, 82,101, 89, 89, 25,124,124,124,170,122,198,143, 30, 61, 26, 1, + 1, 1,226,249,243,231, 39,176, 51,250, 14, 26, 44, 0, 88,184,112, 33,126,186,114, 5,143, 7, 7,215,184,222,142, 29, 59,110, +102, 42,254, 54,219,182,221,110, 71,120,120,120,213,242,143, 63,254, 88,101,176, 38, 77,154,116,221,255,119,238,220,233,144,230, +205,184,124,249,114,127, 39,158, 56,110,170, 89, 81, 41,252, 80,116,116,116, 99, 0,105,148, 82,107, 93, 53, 13, 6,195,178,223, +127,255,221, 39, 41, 41, 9,235,215,175,199,154, 53,107,140,102,179,217,169,104,152, 35,251, 46,151,203, 51,122,244,232, 17, 80, + 81,184,213, 90, 45,248, 79,205,178,110, 54,155, 17, 25, 25, 9, 0, 24, 55,110, 92, 97, 82, 82, 82, 95, 74,233, 57, 66,200,249, + 65,131, 6,237,251,249,231,159,221, 43, 86,205,187, 87,233,148,203,229, 61,215,172, 89, 51,200,213,213,149,251,233,167,159, 44, + 83,167, 78, 77, 73, 73, 73, 25,230,204, 52, 72,255, 84,126,102,102,102, 78,153, 48, 97,194,167, 22,139,133, 55,155,205, 83, 28, +253,173,182,116,126,255,253,247,137,205,154, 53,235,137, 91, 15,155, 32, 1,136,186, 29,205, 21, 43, 86, 0, 64,139,219,209,188, + 29, 51,244, 79,107,222,201,227,254,111,211, 76, 79, 79,223, 83,113,159,113,202, 88, 57,146,206,168,168,168, 29, 21,218,191, 58, +162,253, 79,237,251,237,246, 76,172, 45,157,227,199,143, 79, 3, 48,250,118,210,185,119,239,222,107,207, 60,243,204,226,246,237, +219,191,173,211,233,144,144,144, 80, 53, 44, 82,229, 3, 58, 33, 4, 35, 71,142,196,196,137, 19,177,127,255,254,197, 79, 63,253, +244,181,187,157,159,255, 25,131, 37,151,203,147, 19, 19, 19, 27,111,216,176,129, 43, 36, 4,223, 84, 12, 68, 86,209, 69, 29,149, +141,108, 43, 93,238,161, 67,135, 4,165, 82,153, 84,203,205, 63,249,196,137, 19,141,190,252,242, 75,153,139,139, 11,212,106, 53, + 46, 93,186, 4,153, 76,134,107,215,174,225,187,239,190,187,174,209,238,254,253,251, 69,141, 70,243,143,143,234, 93, 61, 42, 85, + 17,190,189, 82, 91,180,235,235, 90, 2,155,110,110,110, 29,206,156, 57,131, 29, 59,118, 96,205,154, 53, 70,147,201,212,167,174, +243, 23,214,196,159,127,254,217,178,158,158,107,239,247,234,213, 75, 2,224, 5,224, 61, 74,233,229,138,252, 61, 71, 8,233,221, +178,101,203,215, 1,104, 0,188,127,175, 18,200,243,252,140, 71, 30,121,132,159, 58,117,106,230,214,173, 91,127,203,206,206,158, + 78, 41, 53,213,199,204,140,142,142,190, 10, 96,144,179,191,213,198,168, 81,163,174,212,116,190,215, 23,205, 74, 51,164, 80, 40, +192,113, 92,229,244, 30, 80,169, 84,176, 88, 44, 48,155,205, 48,153, 76, 78, 87,231, 85, 70,237, 85, 42, 85,213, 16, 53, 74,165, + 18, 10,133, 2, 10,133, 2,101,101,101,172,138,208, 57, 94,254,151,106,215,153,127, 75,207,196,205,155, 55, 47,154, 52,105,146, +172, 91,183,110, 51,195,194,194,184,171, 87,175, 34, 59, 59, 27, 60,207,163, 69,139, 22,232,223,191, 63,130,130,130,164, 95,126, +249,101,233, 19, 79, 60,177,136,157,202,119,208, 96,137,162,216,103,198,140, 25, 7, 45, 22,139, 67,109,113, 52, 26, 77, 90,105, +105,105,159, 90, 78,188, 62, 17, 17, 17, 7, 63,249,228,147,198,213, 76, 87,153,221,110,127,123,210,164, 73, 31, 8,130,160,185, + 65, 51,213,102,179, 61,114, 79,114,134,211,228,141,234, 67,172, 55,155, 50,231,198,101, 71,228,206,157, 59, 55,125,192,128, 1, +239,153, 76,166,124,187,221, 62,238,110,152,171,250, 12,165, 52, 27,192,180, 91,252,118, 25,192,148,123,157, 70,171,213, 58,181, +101,203,150, 43, 68, 81, 92,102,183,219,143,178,226,161,254, 34,151,203, 51,186,118,237, 26,224,192,122, 14,119,238,184, 27,154, +140,255, 38,255,150,158,137,171, 86,173, 90, 48,125,250,244, 77, 65, 65, 65, 95,246,236,217,179,101,179,102,205, 92, 93, 93, 93, + 81, 84, 84, 84,146,151,151,151,240,211, 79, 63,141,123,241,197, 23,217, 4,231,119,218, 96, 69, 69, 69,101, 1,104,123, 39, 55, + 86,139,230, 23,245, 38, 87,122,158,243, 0,128, 45, 55, 52,141,175,109,185,150, 11,110, 55,128,221,236,148,171,215,133, 98, 50, +128, 97, 44, 39,234, 63,119, 35, 82, 91,143,163,191, 12,198, 93, 99,249,242,229, 87, 1, 60, 2, 0, 35, 71,142,228, 1, 96,235, +214,173, 98, 61, 76,106, 24, 0,111, 0,149,189,215,189, 1, 88, 81, 30,228,200, 6, 16,253,175, 49, 88, 12, 6,131,193, 96, 48, +254, 59,212, 83, 99, 85,137, 55, 33,100, 55,165,116, 8, 0, 84,126,174,254, 93,125,131, 99,167, 20,131,193, 96, 48, 24, 12,198, +157,133, 0,104,127,179, 31,156,233, 29, 64, 8,105,239,236,134, 29,152, 49,156,105, 50, 77,166,201, 52,153, 38,211,100,154,247, +153,102,109,218,183,248,255,224, 90, 34, 88,123,234,157,193,186,155, 61, 98, 88,215,101,166,201, 52,153, 38,211,100,154, 76,147, +105,222, 1,254,117, 6,139,181,193, 98, 48, 24, 12, 6,131, 81,223, 41,155, 61,123,246, 92, 66,200,110, 0,152, 61,123,246,220, +250,158, 96,102,176, 24, 12, 6,131,193, 96,212,119,142,133,135,135,155,194,195,195, 43, 27,180,103,163,188, 22,110, 8,254,215, +179,240,223,109,176,102,247, 9,126,208, 16,104,248,170, 48, 55, 55, 94,178,150, 76,156,247,107,106,126, 93, 54, 76, 8,241, 84, + 42,149, 35,180, 90,237, 35,148,210, 96,158,231, 47, 20, 21, 21, 29,178,219,237, 91, 41,165,165,236, 92, 98,220,107, 66, 66, 66, +218,201,229,242,233,132,144, 48, 65, 16,252,229,114,121, 58, 33, 36,218,106,181,126, 18, 19, 19, 19,207,114,232,254, 37, 52, 52, +116, 7,165,180,127, 69, 89,245,107, 76, 76,204,147, 44, 87, 24,140,123,138, 21,192,137,127, 83,130,157, 54, 88,132,210,103,198, +189,252,130,161, 32, 37,193,176,113,243,222, 22,239, 13,106,220,127,222,207, 73,153,206,104,104, 52,154, 17,237,218,181,251,232, +211, 79, 63,245,108,210,164, 9,209,104, 52, 72, 79, 79,111,121,242,228,201,161,243,231,207,159, 43,151,203, 95,181,219,237, 7, +111,103,199, 8, 33,110, 94,174,178,233, 57, 69,246,119,217,121,201,112,134,145, 35, 71,242, 41, 41, 41,111,123,122,122, 78,157, + 53,107,150, 42, 56, 56, 24, 58,157, 14, 89, 89, 89,129, 23, 47, 94, 12, 88,181,106,213,160, 30, 61,122, 68, 40, 20,138,249,135, + 15, 31,102, 3, 78,222, 7,116,235,214,173,161, 32, 8, 43, 9, 33, 74,158,231,103, 82, 74,251,239,221,187, 23,162, 40, 98,240, +224,193,253,187,117,235,214, 76, 20,197,165, 90,173, 86,178, 88, 44, 19, 43,198,244, 99,252,203,233,218,181,107,146, 40,138,222, +142,174,175, 84, 42, 83,143, 29, 59,198,198, 75, 99,220, 29,131,197, 83,252,186,103,251,150, 23, 30,127,184, 21,121, 97, 88,151, +102,155,126,140, 61, 52,163, 95,211,126,203,246, 37, 58, 52,165,141, 86,171,157, 52, 97,194,132, 5, 11, 22, 44, 80, 95,184,112, + 1,103,207,158,133, 32, 8,112,117,117, 69,251,246,237,185, 61,123,246,248, 78,153, 50,229, 91,165, 82, 57,193,106,181,238,170, +235,142,249,120,242,139, 92,213,178, 81, 42,153, 44,218, 34, 8,123,234,233,197,253,147,221,110, 95,246,215, 95,127,253,254,111, + 57, 97,194,194,194, 30,144,201,100,115,149, 74,229,176,251,213, 92, 92,187,118,109,238, 67, 15, 61, 52,117,254,252,249,170,171, + 87,175, 34, 33, 33, 1,233,233,233,104,210,164, 9,154, 52,105, 66, 86,174, 92,169,254,244,211, 79, 39,196,199,199,115, 0, 28, +110, 7, 64, 8,225,252,252,252,198, 62,250,232,163, 79,120,121,121,233,211,211,211,139,142, 29, 59,182, 59, 45, 45,237, 43, 74, +105,157,242,146, 16,194,121,123,123,143, 25, 60,120,240, 19, 30, 30, 30, 30,233,233,233,249, 7, 15, 30,220,157,149,149,181,190, + 98,154,167,186, 62,160,248,162,188,135,177,103,197, 87, 25,193,193,193,231, 18, 19, 19,179,239,160,102,122,112,112,240,249,186, +104, 62,240,192, 3, 6,155,205,182, 7, 64,243, 91,173, 67, 41, 61, 47,151,203, 7, 59, 98,134, 4, 65, 88,249,225,135, 31, 14, +118,117,117,197,172, 89,179,226,131,130,130,160,215,235,177,102,205, 26,120,120,120, 64, 20,197,248,143, 62,250,136,164,164,164, +224,147, 79, 62, 89, 13, 96, 56,187,125, 56,116,204,191, 1,224, 14, 96, 44,165, 52,183,218,247, 94, 0,190, 7,144, 77, 41, 29, +125,175,210, 39,138,162,247,145, 35, 71,160, 82,169, 32, 73, 18, 36, 73, 2,165,180,234,189, 58, 54,155, 13,253,251,247,247,101, + 71,149,225,240,249, 95, 83, 47,194, 57,125,154,188,210,190,115,151, 15, 20, 74,153, 70, 18,237,144, 4, 59, 68,187, 21, 60, 21, +208,182,137, 59,154, 54, 84,162,164,184, 4, 27,247, 93, 42,206, 45,195,195,139,126,190,112,169,150,139, 45, 40, 44, 44,236,248, +225,195,135,245,191,253,246, 27, 46, 92,184,128, 69,139,202,167, 56,114,113,113,193, 47,191,252, 82, 57,163, 55, 6, 12, 24,144, + 99, 52, 26, 59, 83, 74,243,235,112, 81, 55,122, 56, 52,224,207, 29, 31, 61,236,209,110,248,182,228,140, 60,107, 59, 74,105,189, + 27, 64, 45, 36, 36,196, 36,151,203, 77, 86,171,117,196,191,193,100,133,133,133, 61,192,243,252, 78,187,221,174,213,233,116, 94, +135, 15, 31,182,220,111, 23, 68, 72, 72, 72, 59,119,119,247,195, 59,119,238, 84, 71, 70, 70, 34, 63, 63, 31, 89, 89, 89,152, 58, +117, 42, 86,175, 94,141,118,237,218,193,197,197, 5, 74,165, 18,147, 39, 79, 46, 51,153, 76,253,163,162,162,226, 28, 49, 66, 15, + 63,252,240,215,155, 54,109,106,108,183,219, 57,160,124,226,243,228,228,100,113,238,220,185, 41,177,177,177, 47, 58,107,178, 8, + 33, 92,143, 30, 61,214,109,218,180, 41, 88,169, 84,114,130, 32, 64,146, 36, 92,188,120, 81,124,251,237,183,175,197,198,198,190, + 84,151,243,158, 16,210, 81,171,213,182,154, 60,121,114,238,176, 97,195,108, 0, 16, 23, 23, 71,226,226,226,220,130,130,130,174, +205,155, 55,239,100, 29, 52, 59,107,181,218, 22, 83,166, 76,201, 25, 52,104,144,160, 84, 42,165,200,200, 72,254,212,169, 83,110, +193,193,193, 87,230,206,157,235, 84,111,164, 46, 93,186,156,252,236,179,207,252, 3, 2, 2, 68, 66, 8,173,216, 6, 37,132, 80, +142,227, 40, 0,156, 63,127, 94,254,230,155,111, 38,199,197,197,133, 58,112,220,119,142, 30, 61,186,111,199,142, 29,209,170, 85, + 43,240, 60,143,132,132, 4, 92,190,124, 25,106,181, 26,237,219,183,135, 70,163,193,174, 93,187,240,221,119,223,237,143,141,141, +125,130,221, 62, 28, 58,238, 71, 0,132, 2, 56, 7, 96, 32,165, 52,183,194, 92,237, 5,208, 26,192,113, 74,105,159,123, 89, 6, + 71, 70, 70, 98,231,206,157, 80, 40, 20,144,203,229,200,205,205, 69, 80, 80, 16,100, 50, 25,228,114, 57,228,114, 57, 20, 10, 5, + 2, 2, 2,240,216, 99,143, 9,209,209,209,122,118,100, 25,183, 29,193,242,243,109,240,214, 83, 79,245,209, 64, 20, 0, 91, 41, + 96, 51,129,218, 74, 65,173, 38, 16,165, 6,212,110,134, 11,159,139, 87, 31,107,232,186,253, 88,102,220,156, 71,155, 60, 25,126, +240,234,254, 91,233,233,245,250,217,107,214,172,209,159, 58,117, 10, 9, 9, 9,248,248,227,143,177, 96,193, 2, 40, 20, 10,228, +231,231, 99,232,208,161, 56,118,236, 24,172, 86, 43,254,239,255,254,207, 99,246,236,217, 19, 0, 56, 61,201,164,175,167,108,197, +150,141, 43, 61, 60, 53, 57,120,105,104,180,231,170,173, 73,175, 0, 88, 93, 31, 15,192, 91,111,189,165, 93,186,116,233,182,206, +157, 59,215,107,147, 21, 22, 22,246,128, 66,161,216,249,206, 59,239,184,188,243,206, 59,226, 29,210,108,195,113,220, 70,171,213, + 58, 59, 62, 62,254, 64,125,216, 79,133, 66, 49,233,205, 55,223, 84,167,164,164,160,160,160,160,234,201,182, 18,149, 74, 5,142, +227,160, 84, 42,241,252,243,207,171,215,173, 91, 55, 5,192,216,218,116,253,252,252,198,126,243,205, 55,141,109, 54, 27, 87, 82, + 82, 82, 53,129,112,135, 14, 29,248,153, 51,103, 6, 76,155, 54,109, 60,128, 8,103,210,234,233,233,249,236, 55,223,124, 19,172, + 84, 42,185,244,244,116, 60,248,224,131,136,140,140, 68,183,110,221,248,183,222,122, 43,112,202,148, 41, 47, 1, 88,235,108,148, + 73,171,213,182, 57,122,244,104,170,191,191,127,213,247, 77,155, 54,165,131, 6, 13,202, 59,119,238, 92,139,152,152,152,188,208, +208,208, 84, 39, 52, 13, 90,173,182,229,190,125,251, 50, 22, 44, 88,240,200,234,213,171,135, 0, 64,215,174, 93,247,132,135,135, + 31,202,206,206,110, 29, 25, 25,153,215,189,123,119,163, 19,154,205,252,252,252, 74, 38, 77,154,164,187,213, 58, 95,127,253,117, + 30, 33,164,181, 35,122, 60,207, 79,223,188,121,243,201,252,252,124, 89,108,108, 44,212,106, 53, 52, 26, 77,213,123, 70, 70, 6, +172, 86, 43,182,108,217, 34,112, 28, 55,131,221, 58, 28,102, 20,128, 95, 1,180, 1,240, 11, 33,228, 57, 0,223, 2,104, 5,224, + 18,128, 49,247, 58,129,146, 36, 65, 46,151, 67, 38,147, 97,207,158, 61,136,136,136,192, 15, 63,252, 0,131,193, 80,101,176,100, + 50, 89,229,121,199,142, 40,195, 57,131, 69, 8,161,148, 82, 82,249, 94,249, 99,122,122,214,242,245, 17, 95, 45, 82,202, 57,121, +159, 30,173,224,161, 18, 64,180,158, 80,244,154, 13,226, 30, 4, 0,160,121,137,176,254, 58, 27, 35, 59,231,112, 27,109,228,251, + 15,135,182,108,244,214,143, 9, 37,183, 40, 20,187, 54,106,212, 8,191,255,254, 59,154, 52,105,130,119,222,121, 7,173, 91,183, +134, 86,171, 69,102,102, 38, 74, 75, 75,225,226,226, 2, 81, 20,209,165, 75, 23, 94,167,211, 61,236,172,193, 34,132,116, 26, 55, +170, 91,168, 76,223, 10, 15, 14, 24,143,125,171,122,185,172,223,147,254, 38, 33,100, 35,165,212, 84,223, 14,192, 19, 79, 60,129, +204,204, 76,237,166, 77,155,234,108,178,186,118,237,250,147, 40,138,143,214,182,158, 90,173,254,253,232,209,163, 3,235,106,174, +214,173, 91,231,226,238,238,126, 71, 10,153, 10,115,245,219, 11, 47,188,224,250,205, 55,223,108,238,212,169,211, 51,245,193,100, + 17, 66,186, 7, 7, 7, 35, 57, 57, 25,153,153,153,176, 88, 44,200,204, 44,111, 98,152,154,154,138,128,128, 0,120,120,120, 32, + 32, 32, 0, 45, 91,182, 36, 28,199,133, 57,162,219,171, 87,175, 33, 0,184,196,196, 68,100,103,103, 67,175,215, 67,167,211,193, +223,223, 31,143, 60,242,136,172,105,211,166,253,157, 53, 88,253,251,247,127, 66,171,213,114,201,201,201,184,122,245, 42, 44, 22, + 11, 46, 93,186, 4,119,119,119, 60,246,216, 99,242,224,224,224,129,206, 26, 44, 0,109, 39, 76,152,144, 93,221, 92, 85,226,226, +226, 66,218,180,105,147,239,234,234,218, 5, 64,170, 51,154, 83,167, 78,205, 10, 15, 15,239,185,127,255,254,233,149, 95,238,223, +191,255, 13, 0,248,252,243,207,143,186,185,185,117, 1, 96,116, 38,161,148, 82,105,252,248,241,151,149, 74,101,149, 97,173,252, +172, 84, 42,193,113,156,155, 35, 58,149, 13,218,219,183,111,143,137, 19, 39,226,135, 31,126,192,134, 13, 27,170,126,127,234,169, +167,240,228,147, 79,162,164,164, 4, 62, 62, 62, 50,163,209,120, 38, 52, 52,180, 94, 52,124, 39,132,132, 0, 88, 12,192, 6, 96, + 62,165,180, 94,205,199, 70, 41,205, 34,132,244,175,102,178,142, 3, 80, 85,152,171,254,148,210,123,222,150, 77, 20, 69,200,229, +114,164,164,164,224,203, 47,191,196, 43,175,188,130, 14, 29, 58,160,176,176,176,202, 96,201,229,114,112, 28,155,248,228, 46,158, +199, 55,245, 32,247,117, 4, 75,213, 51, 57,226,234,159, 92,135,145,143,247, 24,227,169,215, 64, 42, 54, 66,241,216,124,156,202, +211,226,147,136, 95, 1, 0,211, 70,116, 65,251,190,239,195,242, 85, 63, 60, 26,100, 85,126,245,151,250, 13, 0, 11,110,166,231, +237,237,237, 37, 8, 2, 56,142,131,139,139, 11, 60, 61, 61,161,209,104,144,147,147,131,215, 95,127, 29,123,247,238,133,213,106, +133, 66,161, 64,112,112, 48,108, 54, 91,176,179, 59,228,227, 33, 91,245,201, 71,139,220,114, 19,191, 67,236,133, 2,104,221, 2, +240,246, 43, 33,238,239,173,142,157, 11,224,237,250,120, 16,218,182,109,139,215, 95,127, 93,251,233,167,159,214,201,100, 81, 74, + 23,203,100,178,238, 51,102,204,208,140, 24, 49,226,111,191,159, 61,123, 22, 19, 39, 78, 44, 51,153, 76, 75,234, 98,174,228,114, +249,206, 47,191,252,210,197,205,205, 13,201,201,201,119,204, 92,173, 92,185,210,181,105,211,166,144,203,229,234,175,191,254,186, + 94,152, 44, 65, 16, 2,180, 90, 45,114,114,114, 48,109,218,180,235,218, 97, 84, 86,103, 3, 64, 66, 66, 2, 2, 2, 2, 96, 54, +155, 13,142,232,122,121,121,185, 83, 74,241,242,203, 47, 35, 37, 37,165,234,123,131,193,128,212,212, 84, 8,130,224,225,108, 90, + 61, 61, 61, 61,236,118, 59, 30,126,248, 97,152,205,230,242,112,193,168, 81,144,203,229,200,202,202,130,221,110,247,172, 67, 22, +120, 13, 26, 52, 40,253, 86, 63,234,116, 58,187,167,167,103, 35,103,147, 58,120,240, 96,227,170, 85,171, 6,223,248,195,137, 19, + 39, 6,187,185,185, 29,244,242,242,106, 81,151,224,131, 74,165,130, 82,169,132, 92, 46, 71,229,231,202, 23,207,243,146,131,215, + 79,255,189,123,247, 66,175,215, 35, 42, 42, 10, 26,141, 6, 0, 48,100,200,144, 25, 58,157,174,167,217,108, 30,182,123,247,110, + 20, 20, 20, 32, 56, 56, 24, 13, 27, 54, 68, 84, 84, 84,255,122, 82,124,124, 0,160,123,197,231, 21,213, 62,215, 55,147, 53, 6, +192,209, 10,115,101, 5, 48,186, 62,152,171,234, 17,172, 37, 75,150, 64, 16, 4, 28, 59,118, 12, 35, 71,142, 4, 33, 4,132, 16, +232,245,122,172, 88,177,130,185, 32, 70,221, 12,214,205,156,227,123,239, 17,206,242,103,227,213, 35, 7,119, 31,211, 38,192, 5, +150,156, 68, 40,117, 94, 32,238,141,241, 73,196,175, 56,151,148, 7, 0,248,100, 91, 28,214,207,233, 15,162,245,132, 95,217, 5, +232,149,170,161,183, 50, 88,185,185,185, 37, 54,155,205, 67,163,209, 84, 61, 21,228,228,228,224,221,119,223,197,150, 45, 91,208, +184,113, 99, 8,130, 0,165, 82,137,236,236,108,200,229,114,167,122, 39,202,100,100,192,252,169, 3, 27,187,120,181, 64,110,220, +123,229, 95,234,187,224,149, 81,156,114,217,198,211,207, 18, 66, 86, 80, 74,235,221,120, 25, 58,157, 14, 29, 59,118,196,179,207, + 62,171,221,180,105,211, 90,212,208,112,247,102, 68, 71, 71, 31, 15, 11, 11, 27,186,124,249,242, 31,211,211,211, 53,157, 59,119, +134, 78,167,131, 78,167, 67, 98, 98, 34, 22, 44, 88, 96, 54,155,205, 79,213, 37, 58,198,113, 92,196,184,113,227, 92,244,122, 61, + 18, 19, 19,225,233,233,121, 91,251, 26, 22, 22,214,134,231,249,223, 86,174, 92,233,218,172, 89, 51,156, 63,127, 30, 33, 33, 33, +240,245,245, 85,135,135,135,223,115,147,165, 80, 40,210,178,179,179,155, 6, 6, 6, 98,221,186,117,224, 56, 14, 70,163, 17,111, +191,253, 54,194,195,195,209,189,123,119,232,116, 58, 4, 6, 6,226,210,165, 75,208,104, 52, 25,142,232,166,165,165,229, 3,240, +254,229,151, 95,144,147,147, 83,245,125,163, 70,141,144,151,151, 7,171,213,154,231,108, 90,141, 70, 99, 30,128,134,241,241,241, +184,122,245, 42, 6, 14, 28,136, 93,187,118, 33, 36, 36, 4,162, 40,194,110,183,231,213, 33, 11, 68,158,231,107,154,222,129, 0, +112,214, 12, 10, 50,153,140,214,240,244, 90, 23, 77, 72,146, 68,111,101,174, 20, 10, 5,106,218,230,205,162, 24,107,214,172,169, +170, 22, 4, 0,185, 92,222,125,250,244,233,195,110,245, 80, 84, 79,168, 30,165,171,151,157, 78, 8, 33,222, 0,190, 1,160,172, +136,180, 41, 1,108, 32,132, 12,172,222,240,253, 94, 26, 44,158,231,171,150, 93, 92, 92,208,177, 99,199, 42,131,101, 50,153, 32, +151,203,153, 91,184,187, 38,252,190,139, 94, 1, 21,147, 61, 87, 15,207, 93,103,174, 6,134,142,105, 29,160,198, 95,113,167, 33, +179,230,129, 90,138,106, 40,161,236, 32, 10, 23,232, 93,100,254, 53, 92,104,241, 73, 73, 73,112,119,119,135, 66,161,128, 74,165, + 66,251,246,237,113,252,248,113,180,104,209, 2,162, 40, 86, 21,148,103,206,156,129, 32, 8, 71,157,184,136,249, 6,122,217, 71, +111,205, 93,160, 67,218, 58,184,187,170,240, 72,247,102,128, 75, 27,240,114, 21,150,255,223,227, 30, 62, 13,220, 62,172,143, 7, + 65,167,211, 33, 45, 45, 13,223,125,247,157,201,108, 54,191, 92, 23,141,232,232,232,227,162, 40, 14,221,186,117,107, 89, 82, 82, + 18,212,106, 53, 46, 94,188, 88,105,174,158,172,107,251, 46, 73,146, 38,172, 93,187,182,116,247,238,221,208,233,116,112,117,117, +189,237,200,213,235,175,191,174,107,222,188, 57, 18, 19, 19,225,230,230, 6, 47, 47, 47,244,236,217, 19,159,126,250,169, 90,167, +211,109,238,212,169,211, 61,107,244, 42, 73, 82,212,165, 75,151,168,155,155, 27, 90,182,108,137,118,237,218,161,107,215,174, 0, +128,202, 6,208, 77,154, 52, 1, 0, 92,190,124, 25,148,210, 24, 71,116,143, 30, 61,186, 59, 33, 33, 65,244,243,243, 67,135, 14, + 29,208,165, 75, 23,116,235,214, 13, 65, 65, 65,248,226,139, 47,108,215,174, 93,219,235,108, 90, 15, 30, 60,248,211,233,211,167, + 5, 63, 63, 63,132,132,132, 64,165, 82,161, 93,187,118,240,243,243,195,154, 53,107,108, 73, 73, 73,123,235,144, 5,169, 39, 79, +158,228,111,245,163, 70,163,113, 5,224,108,228,193,120,226,196, 9,174, 71,143, 30,127,235,205,219,181,107,215, 61, 26,141,198, + 13, 64,134,179, 9, 37,132, 72, 74,165, 18,106,181,250, 58,115,165, 84, 42,161, 82,169, 32,147,201, 28,237, 69,185,103,240,224, +193,216,189,123, 55,212,106, 53,180, 90, 45,134, 15, 31, 14,179,217,252, 20, 0, 44, 94,188,184,234,102, 59,127,254,124, 0,128, +201,100,170, 47, 29, 60,102, 2, 56, 3,224, 10,128,255,171,135,230,170, 33,202,171, 7, 91,160,188, 90,176,103,197,123,101,155, + 44,175,122,112,115,135, 66,161,192,194,133, 11, 33,151,203,225,235,235,139,185,115,231,226,157,119,222,193,252,249,243,177,116, +233, 82,120,120,120,176, 42,194,187,123,158, 92,231, 65,238, 43,131,117, 35,214,200,160,121, 35, 6,116, 30,211,218, 95,133,248, +184, 51,248,233, 68,250,197,156,156, 2, 72,153,167, 33,101,159,199,180, 17, 93,208,166,177, 39,218, 52,246,196,180, 17, 93, 32, +101,157, 1,205, 79, 4, 85,123, 34,187,132,220,178,122, 33, 47, 47,239,147, 5, 11, 22, 20,120,120,120, 84, 21,138,169,169,169, +104,219,182,237,117,133, 36,207,243,120,247,221,119,115,178,178,178,214, 57,108, 82, 52,252, 75, 75,254,239,153,134, 10,149, 43, +144,247, 59,244,122, 29,214, 69,124, 4, 88,140, 0,167,196,227,125, 58,241,126, 13,221,122, 19, 66,154,215,183,131,144,156,156, +140,249,243,231,155, 76, 38,211,109, 53,116,143,142,142, 62,110,183,219,135,174, 89,179,166,236,231,159,127,198, 7, 31,124,112, + 91,230,170,154,113,123, 98,195,134, 13,165,201,201,201,183,101,176,228,114,249,155,130, 32,184,126,252,241,199, 82,223,190,125, +197,201,147, 39,139, 47,190,248,162,248,228,147, 79,138,125,250,244, 17, 39, 76,152, 32,154,205,102,149, 78,167,251,224, 94, 29, + 11,155,205, 22, 17, 17, 17, 97,230, 56, 14, 58,157, 14, 74,165, 18,222,222,222, 85, 70,184,178,157,143,205,102,195,170, 85,171, +202, 44, 22,203,231,142,232,230,228,228,108,152, 57,115,102,210,190,125,251,236,133,133,133, 0,128,244,244,116, 44, 90,180,200, +182,122,245,106, 99,126,126,254, 87,206,166,181,176,176,240,155, 89,179,102, 93,251,249,231,159,237, 60,207, 35, 63, 63, 31,238, +238,238, 88,180,104,145, 45, 34, 34,194, 88, 84, 84,228,180,102,207,158, 61, 19, 83, 83, 83, 93, 45, 22, 11,189,201,241, 35, 26, +141, 38, 20,192, 97,103, 52,187,118,237,154,152,156,156,172,127,255,253,247,255,232,219,183,239,114,189, 94,127, 89,175,215, 95, +238,219,183,239,199,171, 87,175, 62,162, 86,171, 67, 1, 28,170, 67,116, 85,170, 44, 51,212,106, 53, 84, 42, 85,213, 3,154, 74, +165,130, 92, 46,119,200, 96,197,198,198,142,162,148,118, 16, 4, 65,232,208,161, 3,180, 90, 45,158,124,242, 73, 40, 20, 10, 0, +192,236,217,179, 65, 41, 5,165,180,202, 96,149,148,148,212, 11,131, 69, 41,253,131, 82,218,141, 82,218,158, 82, 90, 31, 59,201, +108,170,102,174,250, 83, 74,207, 2,232, 95,205,100,109,169, 15, 6, 75, 46,151,163,117,235,214,152, 54,109, 26,118,237,218,133, +164,164, 36, 8,130, 0, 81, 20,193,113, 28,100, 50, 25, 51, 88, 12,167,169,170, 34,172,254,238,235,238,242, 92, 27, 63, 25,226, +227,207,225,199,152,188, 77, 28,199,239,138,187,106,217,222, 63,184, 24,182, 45,163,209,126,228, 55, 88, 63,167,188, 9,130,148, +117, 6,182,173,207,129,104, 27,224, 82,145, 22, 38, 91,254,222, 26, 78,228, 24, 79, 79,207,109, 27, 55,110,124, 97,236,216,177, + 74, 73,146,160,209,104, 48,125,250,116, 80, 74,171,204,213,196,137, 19, 75,179,178,178, 62,165,148, 38, 58,232,126, 53,254,222, +202, 89, 99, 94,126, 91,141,148, 8,128, 83, 32, 7,157,209,241,225,113,200, 74, 58, 14,148,158, 3,136, 2, 17, 75,198,123, 13, +125,241,163,207, 0,244,173, 47, 7,224,252,249,243,152, 55,111,222,109,155,171,234,134, 40, 44, 44,108,232,174, 93,187,190, 48, +155,205,147,239,160,230, 19, 75,150, 44,217,217,176, 97, 67,151,186,234, 24, 12,134,241, 57, 57, 57, 19, 29, 88,245,158, 85,117, +196,196,196,196, 63,240,192, 3, 95,126,252,241,199, 47, 79,157, 58, 85,173,209,104,160,215,235,145,144,144,128, 70,141,202,155, + 30,149,149,149, 97,206,156, 57,101,130, 32,108,138,138,138,138,114,176, 16,151, 8, 33,227, 38, 76,152, 48,182, 69,139, 22,131, + 41,165,158, 54,155, 45,239,218,181,107,123,139,138,138,234, 52, 14, 86,133,230, 75, 19, 39, 78, 28,211,188,121,243, 39,236,118, +187,167, 32, 8,121, 41, 41, 41,123,138,138,138, 54,212, 69,243,143, 63,254,200, 89,183,110,221, 21,163,209,216,218,199,199,167, +200,203,203,203,106, 50,153,120, 87, 87, 87, 87,165, 82,217, 25, 64, 20,128, 11,206,104, 70, 69, 69,101,173, 89,179,230,154,201, +100,106, 17, 17, 17,113,212,221,221,253,144, 40,138, 68,169, 84,122,184,184,184,244, 2,240, 7,128,203,117, 49, 88,149, 15,102, + 10,133,162, 42, 42, 94,185, 12, 64,114, 66,235,163, 37, 75,150,200,212,106, 53,172, 86, 43, 76, 38, 19,114,115,203,107,175, 22, + 47, 94,140, 57,115,230, 0, 0,230,205,155,135,249,243,231,163,172,172, 76,197,110, 31, 14,145, 7, 32, 6,192,168,202, 54, 87, +213, 26,190,111, 2, 80, 88, 95, 12,150, 92, 46,199,216,177, 99, 49,104,208,160,191, 13,211,192, 26,185,223,245, 99,112,157, 7, +185,111, 34,115, 55, 27, 7,107,118,223,198,175, 6,184,201,223, 52, 22, 9,187,148, 15, 36,205,154, 63, 31,116,206, 99,141,119, + 61,209,188,244,177, 54,190, 18, 64, 5, 16,125,249,205,134,150, 24, 65, 92,124,145, 47,185, 97,221,193,204, 76,202,113, 93,231, +253,116, 49,183, 6, 51, 36,119,119,119, 95,214,188,121,243, 39, 23, 45, 90,228,214,170, 85, 43,104,181, 90, 80, 74,113,234,212, + 41, 76,156, 56, 49, 63, 59, 59,123, 93,110,110,238,123,180,166, 65,186,170,225,237, 46, 95,184,122,254,192,215,158, 28,251,174, + 2, 23,102, 0, 50, 55,160, 65, 31,100,144, 71,225, 43, 59, 9, 88, 51,202,191,147,187, 97,224,152,197,249,123, 15, 70, 63, 77, + 41, 61,118,175, 51, 63, 36, 36,196,164, 86,171,239,152,185,186,219,132,133,133, 61,160, 84, 42,119, 90, 44, 22,173,139,139,203, +125, 57, 14, 86,197,113,145,171, 84,170, 5, 10,133, 98,252,115,207, 61,167,105,213,170, 21,130,130,130,144,149,149,133,132,132, + 4, 68, 68, 68,152, 37, 73, 90,159,151,151, 55,247,236,217,179,182,251, 49, 15, 46, 94,188,232,215,180,105,211, 48,158,231,155, +162,124,160,200, 12, 0,251,234, 98,132, 42,185,116,233,146, 33, 40, 40, 40, 76,161, 80, 4, 87,104, 26, 1, 28,168,139,102,151, + 46, 93, 78,206,158, 61,187,225,195, 15, 63, 92,202,243, 60, 85, 40, 20,148,227, 56, 40, 20, 10, 42,147,201, 40, 33,132,126,251, +237,183,250,229,203,151,167, 59, 50, 14, 86,104,104,232,230, 33, 67,134, 60,174, 86,171,177,125,251,118,193,199,199, 71,230,238, +238,142,245,235,215,223,170, 28, 3,165, 84,203,110,141,255,250,107,221,116,224,192, 1,164,164,164, 92, 55,230, 85,117, 99, 85, +185, 76, 8, 65,143, 30, 61,132, 19, 39, 78,176,113,176, 24,117, 55, 88, 55, 99, 73,159, 96,125, 33,232,247, 29,253,233, 67,161, + 65, 42,120,187,171,193,201, 85, 40, 50, 19,156, 53,154,113,244,124, 81,170, 40,145,167, 62,216,151,120,214,193,168, 83, 87, 95, + 95,223,153,146, 36,181,225, 56, 78, 75, 41, 45,225, 56,238,100,122,122,250, 34, 74,233, 57,103,118,194,221,149, 63,229,225, 34, +115, 83, 40,149, 84, 16, 68, 0, 60,192, 17,128,112, 0,184,138,119, 30, 32, 28,202,202,108, 10, 65, 36,187,178,114,114, 38,221, +235,204,127,248,225,135,127, 42, 41, 41,249,215,141,228,174, 82,169,230,242, 60, 63,236,126,159, 38,166, 91,183,110, 93,148, 74, +229, 76, 74,105,136,217,108,246,209,104, 52, 89,132,144,184,210,210,210,101,177,177,177, 39, 88,241,113,239,184,211, 35,185,135, +132,132,120, 17, 66, 62,166,148,106, 57,142,123, 83,146,164, 51, 1, 1, 1,216,185,115,231, 77, 35, 88,204, 96,221, 95, 6,235, +133, 23, 94,192, 79, 87,174,224,241,224, 91,119, 92,223,177, 99, 7, 30,124,240, 65,102,176, 24,119,222, 96, 85,152, 34, 50,243, +145,198, 79,201, 8, 25, 78, 56,218,150, 0, 74,145,226, 18, 71,232, 1,133,202,182,118,222, 79,198,178, 27,214,111, 79, 41, 61, +125, 71, 19,204, 52,153,230, 61,208, 36,132,112,142, 76, 61,195,242,243,254,208, 12, 9, 9,217, 82, 90, 90, 58, 56, 33, 33,225, + 86, 26,215, 25, 44,150,159,255, 78,205, 7, 31,124,240,220,242,229,203, 3,155, 55,111,206, 17, 66,192,243, 60, 8, 33,224, 56, + 14, 60,207, 87,189, 3,192,161, 67,135,132,247,222,123, 47,233,143, 63,254,232,200,242,243,238,104,222,111, 56, 53, 23, 97, 69, +149,221,182,138, 23,131,241,159,225,118,230,245, 99,252,251,136,141,141, 29,101, 48, 24,142,121,121,121, 53,181, 88, 44,138,178, +178, 50, 69,245,135, 81,141, 70,147,195,114,233,223,143, 32, 8,143,204,152, 49,227,144,217,108, 14,170,109, 93,141, 70,147, 86, + 90, 90,218,135,229, 26,227,174, 24, 44, 6,131,193,248,175, 96, 52, 26,123,176, 92,184,191,169,168, 62,110,195,114,130,113, 55, + 96,221, 34, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131, 25, 44, 6, +131,193, 96, 48, 24, 12, 70,221,249,255, 1, 0, 74,212, 19,245, 82,154, 3,217, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, 0}; diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index c0287380567..5fceea63d32 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -107,6 +107,7 @@ typedef enum eAnim_ChannelType { ANIMTYPE_NONE= 0, ANIMTYPE_SPECIALDATA, + ANIMTYPE_SCENE, ANIMTYPE_OBJECT, ANIMTYPE_GROUP, ANIMTYPE_FCURVE, @@ -120,6 +121,7 @@ typedef enum eAnim_ChannelType { ANIMTYPE_DSCAM, ANIMTYPE_DSCUR, ANIMTYPE_DSSKEY, + ANIMTYPE_DSWOR, ANIMTYPE_SHAPEKEY, // XXX probably can become depreceated??? @@ -134,6 +136,7 @@ typedef enum eAnim_KeyType { ALE_GPFRAME, /* Grease Pencil Frames */ // XXX the following are for summaries... should these be kept? + ALE_SCE, /* Scene summary */ ALE_OB, /* Object summary */ ALE_ACT, /* Action summary */ ALE_GROUP, /* Action Group summary */ @@ -151,6 +154,7 @@ typedef enum eAnimFilter_Flags { ANIMFILTER_CHANNELS = (1<<4), /* make list for interface drawing */ ANIMFILTER_ACTGROUPED = (1<<5), /* belongs to the active actiongroup */ ANIMFILTER_CURVEVISIBLE = (1<<6), /* F-Curve is visible for editing/viewing in Graph Editor */ + ANIMFILTER_ACTIVE = (1<<7), /* channel should be 'active' */ // FIXME: this is only relevant for F-Curves for now } eAnimFilter_Flags; @@ -158,6 +162,11 @@ typedef enum eAnimFilter_Flags { // xxx check on all of these flags again... /* Dopesheet only */ + /* 'Scene' channels */ +#define SEL_SCEC(sce) ((sce->flag & SCE_DS_SELECTED)) +#define EXPANDED_SCEC(sce) ((sce->flag & SCE_DS_COLLAPSED)==0) + /* 'Sub-Scene' channels (flags stored in Data block) */ +#define FILTER_WOR_SCED(wo) ((wo->flag & WO_DS_EXPAND)) /* 'Object' channels */ #define SEL_OBJC(base) ((base->flag & SELECT)) #define EXPANDED_OBJC(ob) ((ob->nlaflag & OB_ADS_COLLAPSED)==0) @@ -282,7 +291,7 @@ int geticon_anim_blocktype(short blocktype); void getname_anim_fcurve(char *name, struct ID *id, struct FCurve *fcu); -unsigned int ipo_rainbow(int cur, int tot); +void ipo_rainbow(int cur, int tot, float *out); /* ------------- NLA-Mapping ----------------------- */ diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 3d428dbf754..b79d69e7d07 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -49,13 +49,12 @@ void free_editNurb (struct Object *obedit); void mouse_nurb (struct bContext *C, short mval[2], int extend); -struct Nurb *addNurbprim(struct bContext *C, int type, int newname); +struct Nurb *add_nurbs_primitive(struct bContext *C, int type, int newname); /* editfont.h */ void undo_push_font (struct bContext *C, char *name); void make_editText (struct Object *obedit); void load_editText (struct Object *obedit); -void remake_editText (struct Object *obedit); void free_editText (struct Object *obedit); #endif /* ED_CURVE_H */ diff --git a/source/blender/editors/include/ED_editparticle.h b/source/blender/editors/include/ED_editparticle.h deleted file mode 100644 index e719562d5d6..00000000000 --- a/source/blender/editors/include/ED_editparticle.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * $Id: ED_editparticle.h $ - * - * ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2007 by Janne Karhu. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef ED_EDITPARTICLE_H -#define ED_EDITPARTICLE_H - -struct Object; -struct ParticleSystem; -struct ParticleEditSettings; -struct RadialControl; -struct ViewContext; -struct rcti; - -/* particle edit mode */ -void PE_set_particle_edit(struct Scene *scene); -void PE_create_particle_edit(struct Object *ob, struct ParticleSystem *psys); -void PE_free_particle_edit(struct ParticleSystem *psys); - -void PE_change_act(void *ob_v, void *act_v); -void PE_change_act_psys(struct Object *ob, struct ParticleSystem *psys); -int PE_can_edit(struct ParticleSystem *psys); - -/* access */ -struct ParticleSystem *PE_get_current(struct Object *ob); -short PE_get_current_num(struct Object *ob); -int PE_minmax(struct Scene *scene, float *min, float *max); -void PE_get_colors(char sel[4], char nosel[4]); -struct ParticleEditSettings *PE_settings(Scene *scene); -struct RadialControl **PE_radialcontrol(void); - -/* update calls */ -void PE_hide_keys_time(struct Scene *scene, struct ParticleSystem *psys, float cfra); -void PE_update_object(struct Scene *scene, struct Object *ob, int useflag); -void PE_update_selection(struct Scene *scene, struct Object *ob, int useflag); -void PE_recalc_world_cos(struct Object *ob, struct ParticleSystem *psys); - -/* selection tools */ -void PE_select_root(void); -void PE_select_tip(void); -void PE_deselectall(void); -void PE_select_linked(void); -void PE_select_less(void); -void PE_select_more(void); - -void PE_mouse_particles(void); -void PE_borderselect(struct ViewContext *vc, struct rcti *rect, int select); -void PE_selectionCB(short selecting, struct Object *editobj, short *mval, float rad); -void PE_do_lasso_select(struct ViewContext *, short mcords[][2], short moves, short select); - -/* tools */ -void PE_hide(int mode); -void PE_rekey(void); -void PE_subdivide(Object *ob); -int PE_brush_particles(void); -void PE_delete_particle(void); -void PE_remove_doubles(void); -void PE_mirror_x(Scene *scene, int tagged); -void PE_selectbrush_menu(Scene *scene); -void PE_remove_doubles(void); -void PE_radialcontrol_start(const int mode); - -/* undo */ -void PE_undo_push(Scene *scene, char *str); -void PE_undo_step(Scene *scene, int step); -void PE_undo(Scene *scene); -void PE_redo(Scene *scene); -void PE_undo_menu(Scene *scene); - -#endif /* ED_EDITPARTICLE_H */ - diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index b9308b6d8a6..81420ac95e5 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -35,10 +35,10 @@ struct FCurve; struct gla2DDrawInfo; struct bAction; struct bActionGroup; -struct bActListElem; struct Object; struct ListBase; struct bGPDlayer; +struct Scene; /* ****************************** Base Structs ****************************** */ @@ -82,6 +82,7 @@ void draw_fcurve_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct FCurv void draw_agroup_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct bActionGroup *agrp, float ypos); void draw_action_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct bAction *act, float ypos); void draw_object_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct Object *ob, float ypos); +void draw_scene_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct Scene *sce, float ypos); void draw_gpl_channel(struct gla2DDrawInfo *di, ActKeysInc *aki, struct bGPDlayer *gpl, float ypos); /* Keydata Generation */ @@ -90,6 +91,7 @@ void agroup_to_keylist(struct bActionGroup *agrp, ListBase *keys, ListBase *bloc void action_to_keylist(struct bAction *act, ListBase *keys, ListBase *blocks, ActKeysInc *aki); void action_nlascaled_to_keylist(struct Object *ob, struct bAction *act, ListBase *keys, ListBase *blocks, ActKeysInc *aki); void ob_to_keylist(struct Object *ob, ListBase *keys, ListBase *blocks, ActKeysInc *aki); +void scene_to_keylist(struct Scene *sce, ListBase *keys, ListBase *blocks, ActKeysInc *aki); void gpl_to_keylist(struct bGPDlayer *gpl, ListBase *keys, ListBase *blocks, ActKeysInc *aki); #endif /* ED_KEYFRAMES_DRAW_H */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index d310066c999..b2846fc0bd9 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -52,23 +52,6 @@ int insert_bezt_fcurve(struct FCurve *fcu, struct BezTriple *bezt); */ void insert_vert_fcurve(struct FCurve *fcu, float x, float y, short flag); - -/* flags for use by keyframe creation/deletion calls */ -enum { - /* used by isnertkey() and insert_vert_icu() */ - INSERTKEY_NEEDED = (1<<0), /* only insert keyframes where they're needed */ - INSERTKEY_MATRIX = (1<<1), /* insert 'visual' keyframes where possible/needed */ - INSERTKEY_FAST = (1<<2), /* don't recalculate handles,etc. after adding key */ - INSERTKEY_FASTR = (1<<3), /* don't realloc mem (or increase count, as array has already been set out) */ - INSERTKEY_REPLACE = (1<<4), /* only replace an existing keyframe (this overrides INSERTKEY_NEEDED) */ - - /* used by common_*key() functions - Note: these are generally mutually exclusive (only one will work at a time) */ - COMMONKEY_ADDMAP = (1<<10), /* common key: add texture-slot offset bitflag to adrcode before use */ - COMMONKEY_PCHANROT = (1<<11), /* common key: extend channel list using relevant pchan-rotations */ - /* all possible items for common_*key() functions */ - COMMONKEY_MODES = (COMMONKEY_ADDMAP|COMMONKEY_PCHANROT) -} eInsertKeyFlags; - /* -------- */ /* Main Keyframing API calls: @@ -86,13 +69,27 @@ short deletekey(struct ID *id, const char group[], const char rna_path[], int ar /* Generate menu of KeyingSets */ char *ANIM_build_keyingsets_menu(struct ListBase *list, short for_edit); +/* KeyingSet Editing Operators: + * These can add a new KeyingSet and/or add 'destinations' to the KeyingSets, + * acting as a means by which they can be added outside the Outliner. + */ +void ANIM_OT_keyingset_add_new(struct wmOperatorType *ot); +void ANIM_OT_keyingset_add_destination(struct wmOperatorType *ot); + /* Main Keyframe Management operators: - * These handle keyframes management from various spaces. They will handle the menus - * required for each space. + * These handle keyframes management from various spaces. They only make use of + * Keying Sets. */ void ANIM_OT_insert_keyframe(struct wmOperatorType *ot); void ANIM_OT_delete_keyframe(struct wmOperatorType *ot); +/* Main Keyframe Management operators (legacy style): + * These handle keyframes management from various spaces. They will handle the menus + * required for each space. + */ +void ANIM_OT_insert_keyframe_old(struct wmOperatorType *ot); +void ANIM_OT_delete_keyframe_old(struct wmOperatorType *ot); + /* ************ Auto-Keyframing ********************** */ /* Notes: * - All the defines for this (User-Pref settings and Per-Scene settings) @@ -105,9 +102,9 @@ void ANIM_OT_delete_keyframe(struct wmOperatorType *ot); /* Auto-Keying macros for use by various tools */ /* check if auto-keyframing is enabled (per scene takes presidence) */ -#define IS_AUTOKEY_ON ((scene) ? (scene->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON)) +#define IS_AUTOKEY_ON(scene) ((scene) ? (scene->autokey_mode & AUTOKEY_ON) : (U.autokey_mode & AUTOKEY_ON)) /* check the mode for auto-keyframing (per scene takes presidence) */ -#define IS_AUTOKEY_MODE(mode) ((scene) ? (scene->autokey_mode == AUTOKEY_MODE_##mode) : (U.autokey_mode == AUTOKEY_MODE_##mode)) +#define IS_AUTOKEY_MODE(scene, mode) ((scene) ? (scene->autokey_mode == AUTOKEY_MODE_##mode) : (U.autokey_mode == AUTOKEY_MODE_##mode)) /* check if a flag is set for auto-keyframing (as userprefs only!) */ #define IS_AUTOKEY_FLAG(flag) (U.autokey_flag & AUTOKEY_FLAG_##flag) diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index e32243fc28f..0353fb8c28d 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -120,11 +120,12 @@ void EM_selectmode_set(struct EditMesh *em); void EM_select_flush(struct EditMesh *em); void EM_convertsel(struct EditMesh *em, short oldmode, short selectmode); void EM_validate_selections(struct EditMesh *em); - + /* exported to transform */ int EM_get_actSelection(struct EditMesh *em, struct EditSelection *ese); void EM_editselection_normal(float *normal, struct EditSelection *ese); void EM_editselection_plane(float *plane, struct EditSelection *ese); +void EM_editselection_center(float *center, struct EditSelection *ese); struct UvVertMap *EM_make_uv_vert_map(struct EditMesh *em, int selected, int do_face_idx_array, float *limit); struct UvMapVert *EM_get_uv_map_vert(struct UvVertMap *vmap, unsigned int v); diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 3ec472a9085..0433bf3f235 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -99,6 +99,7 @@ void ED_keymap_screen(struct wmWindowManager *wm); int ED_operator_screenactive(struct bContext *C); int ED_operator_screen_mainwinactive(struct bContext *C); int ED_operator_areaactive(struct bContext *C); +int ED_operator_regionactive(struct bContext *C); int ED_operator_scene_editable(struct bContext *C); @@ -119,6 +120,7 @@ int ED_operator_editarmature(struct bContext *C); int ED_operator_editcurve(struct bContext *C); int ED_operator_editsurf(struct bContext *C); int ED_operator_editsurfcurve(struct bContext *C); +int ED_operator_editfont(struct bContext *C); int ED_operator_uvedit(struct bContext *C); int ED_operator_uvmap(struct bContext *C); int ED_operator_posemode(struct bContext *C); diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index f42bb9b46a1..c6a8881a0c6 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -31,7 +31,15 @@ struct bContext; struct wmWindowManager; +/* sculpt.c */ void ED_operatortypes_sculpt(void); -void ED_keymap_sculpt(wmWindowManager *wm); +void ED_keymap_sculpt(struct wmWindowManager *wm); + +/* paint_ops.c */ +void ED_operatortypes_paint(void); + +/* paint_image.c */ +void undo_imagepaint_step(int step); +void undo_imagepaint_clear(void); #endif diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 7519bfabf65..1ab61da83bb 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -33,6 +33,7 @@ struct ARegion; struct View3D; struct RegionView3D; struct ViewContext; +struct bglMats; struct BPoint; struct Nurb; struct BezTriple; @@ -90,6 +91,8 @@ void viewline(struct ARegion *ar, struct View3D *v3d, short mval[2], float ray_s void viewray(struct ARegion *ar, struct View3D *v3d, short mval[2], float ray_start[3], float ray_normal[3]); int get_view3d_viewplane(struct View3D *v3d, struct RegionView3D *rv3d, int winxi, int winyi, rctf *viewplane, float *clipsta, float *clipend, float *pixsize); +void view3d_get_object_project_mat(struct RegionView3D *v3d, struct Object *ob, float pmat[4][4], float vmat[4][4]); +void view3d_project_float(struct ARegion *a, float *vec, float *adr, float mat[4][4]); /* drawobject.c itterators */ void mesh_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, int clipVerts); @@ -110,12 +113,17 @@ unsigned int view3d_sample_backbuf_rect(struct ViewContext *vc, short mval[2], i void *handle, unsigned int (*indextest)(void *handle, unsigned int index)); unsigned int view3d_sample_backbuf(struct ViewContext *vc, int x, int y); +int view_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, short *mval, float mouse_worldloc[3]); + /* select */ #define MAXPICKBUF 10000 short view3d_opengl_select(struct ViewContext *vc, unsigned int *buffer, unsigned int bufsize, rcti *input); void view3d_set_viewcontext(struct bContext *C, struct ViewContext *vc); void view3d_operator_needs_opengl(const struct bContext *C); +void view3d_get_view_aligned_coordinate(struct ViewContext *vc, float *fp, short mval[2]); +void view3d_get_object_project_mat(struct RegionView3D *v3d, struct Object *ob, float pmat[4][4], float vmat[4][4]);; +void view3d_get_transformation(struct ViewContext *vc, struct Object *ob, struct bglMats *mats); /* XXX should move to arithb.c */ int edge_inside_circle(short centx, short centy, short rad, short x1, short y1, short x2, short y2); @@ -123,6 +131,5 @@ int edge_inside_circle(short centx, short centy, short rad, short x1, short y1, /* modes */ void ED_view3d_exit_paint_modes(struct bContext *C); - #endif /* ED_VIEW3D_H */ diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 7826c0b86b2..936508cdc63 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -217,6 +217,7 @@ void uiMenuItemBooleanO(uiMenuItem *head, const char *name, int icon, char *opna void uiMenuItemsEnumO(uiMenuItem *head, char *opname, char *propname); void uiMenuItemIntO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, int value); void uiMenuItemFloatO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, float value); +void uiMenuItemStringO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, char *value); void uiMenuItemO(uiMenuItem *head, int icon, char *opname); void uiMenuItemBooleanR(uiMenuItem *head, struct PointerRNA *ptr, char *propname); diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index b00ac5e58cb..1b3c4f17ea3 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -51,8 +51,8 @@ typedef enum { ICON_PLUS, ICON_DISCLOSURE_TRI_DOWN, ICON_DISCLOSURE_TRI_RIGHT, - ICON_CHECKBOX_DEHLT, - ICON_CHECKBOX_HLT, + ICON_RADIOBUT_OFF, + ICON_RADIOBUT_ON, ICON_MENU_PANEL, ICON_PYTHON, ICON_BLANK003, @@ -79,8 +79,8 @@ typedef enum { ICON_EYEDROPPER, ICON_BLANK010, ICON_AUTO, - ICON_BLANK011, - ICON_BLANK012, + ICON_CHECKBOX_DEHLT, + ICON_CHECKBOX_HLT, ICON_UNLOCKED, ICON_LOCKED, ICON_BLANK013, @@ -179,7 +179,7 @@ typedef enum { ICON_BLANK061b, /* MODES */ - ICON_OBJECTMODE, // XXX fix this up + ICON_OBJECT_DATAMODE, // XXX fix this up ICON_EDITMODE_HLT, ICON_FACESEL_HLT, ICON_VPAINT_HLT, @@ -207,27 +207,27 @@ typedef enum { ICON_BLANK077b, /* DATA */ - ICON_SCENE_DEHLT, + ICON_SCENE_DATA, ICON_RENDERLAYERS, - ICON_WORLD_DEHLT, - ICON_OBJECT, - ICON_MESH, - ICON_CURVE, - ICON_MBALL, - ICON_LATTICE, - ICON_LAMP_DEHLT, - ICON_MATERIAL_DEHLT, - ICON_TEXTURE_DEHLT, - ICON_IPO_DEHLT, - ICON_CAMERA_DEHLT, + ICON_WORLD_DATA, + ICON_OBJECT_DATA, + ICON_MESH_DATA, + ICON_CURVE_DATA, + ICON_MBALL_DATA, + ICON_LATTICE_DATA, + ICON_LAMP_DATA, + ICON_MATERIAL_DATA, + ICON_TEXTURE_DATA, + ICON_ANIM_DATA, + ICON_CAMERA_DATA, ICON_PARTICLE_DATA, - ICON_LIBRARY_DEHLT, + ICON_LIBRARY_DATA_DIRECT, ICON_GROUP, - ICON_ARMATURE, - ICON_POSE_DEHLT, - ICON_BONE_DEHLT, + ICON_ARMATURE_DATA, + ICON_POSE_DATA, + ICON_BONE_DATA, ICON_CONSTRAINT, - ICON_SHAPEKEY, + ICON_SHAPEKEY_DATA, ICON_VGROUP, ICON_BLANK079, ICON_PACKAGE, @@ -235,21 +235,21 @@ typedef enum { ICON_BLANK079b, /* DATA */ - ICON_BRUSH, - ICON_IMAGE_DEHLT, + ICON_BRUSH_DATA, + ICON_IMAGE_DATA, ICON_FILE, ICON_FCURVE, ICON_FONT, - ICON_CURVE_HLT, - ICON_MBALL_HLT, - ICON_LATTICE_HLT, - ICON_LAMP_HLT, - ICON_MATERIAL_HLT, - ICON_TEXTURE_HLT, - ICON_IPO_HLT, + ICON_RENDER_RESULT, + ICON_BLANK080A, + ICON_BLANK080B, + ICON_BLANK080C, + ICON_BLANK080D, + ICON_BLANK080E, + ICON_BLANK080F, ICON_BLANK080, ICON_BLANK081, - ICON_LIBRARY_HLT, + ICON_LIBRARY_DATA_INDIRECT, ICON_BLANK082, ICON_BLANK083, ICON_BLANK084, @@ -687,15 +687,15 @@ typedef enum { ICON_SEQ_PREVIEW, ICON_SEQ_LUMA_WAVEFORM, ICON_SEQ_CHROMA_SCOPE, - ICON_BLANK329, + ICON_SEQ_HISTOGRAM, ICON_BLANK330, ICON_BLANK331, ICON_BLANK332, ICON_BLANK333, - ICON_TRANSP_HLT, // XXX CHANGE TO STRAIGHT ALPHA, Z ETC - ICON_TRANSP_DEHLT, - ICON_BLANK334, - ICON_BLANK335, + ICON_IMAGE_RGB, // XXX CHANGE TO STRAIGHT ALPHA, Z ETC + ICON_IMAGE_RGB_ALPHA, + ICON_IMAGE_ALPHA, + ICON_IMAGE_ZDEPTH, ICON_IMAGEFILE, ICON_BLANK336, ICON_BLANK337, diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 8f96732a911..d1c4447f215 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -593,9 +593,19 @@ void uiEndBlock(const bContext *C, uiBlock *block) * on matching buttons, we need this to make button event handling non * blocking, while still alowing buttons to be remade each redraw as it * is expected by blender code */ - for(but=block->buttons.first; but; but=but->next) + for(but=block->buttons.first; but; but=but->next) { if(ui_but_update_from_old_block(C, block, but)) ui_check_but(but); + + /* temp? Proper check for greying out */ + if(but->opname) { + wmOperatorType *ot= WM_operatortype_find(but->opname); + if(ot==NULL || ot->poll((bContext *)C)==0) { + but->flag |= UI_BUT_DISABLED; + but->lock = 1; + } + } + } if(block->oldblock) { block->auto_open= block->oldblock->auto_open; @@ -607,7 +617,7 @@ void uiEndBlock(const bContext *C, uiBlock *block) /* handle pending stuff */ if(block->flag & UI_BLOCK_LOOP) ui_menu_block_set_keymaps(C, block); - + /* after keymaps! */ if(block->dobounds == 1) ui_bounds_block(block); else if(block->dobounds == 2) ui_text_bounds_block(block, 0.0f); @@ -1494,6 +1504,7 @@ static void ui_free_link(uiLink *link) } } +/* can be called with C==NULL */ static void ui_free_but(const bContext *C, uiBut *but) { if(but->opptr) { @@ -1501,13 +1512,21 @@ static void ui_free_but(const bContext *C, uiBut *but) MEM_freeN(but->opptr); } if(but->func_argN) MEM_freeN(but->func_argN); - if(but->active) ui_button_active_cancel(C, but); + if(but->active) { + /* XXX solve later, buttons should be free-able without context? */ + if(C) + ui_button_active_cancel(C, but); + else + if(but->active) + MEM_freeN(but->active); + } if(but->str && but->str != but->strdata) MEM_freeN(but->str); ui_free_link(but->link); MEM_freeN(but); } +/* can be called with C==NULL */ void uiFreeBlock(const bContext *C, uiBlock *block) { uiBut *but; @@ -1525,6 +1544,7 @@ void uiFreeBlock(const bContext *C, uiBlock *block) MEM_freeN(block); } +/* can be called with C==NULL */ void uiFreeBlocks(const bContext *C, ListBase *lb) { uiBlock *block; @@ -1610,8 +1630,8 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, char *name, short dt, /* no subwindow created yet, for menus for example, so we * use the main window instead, since buttons are created * there anyway */ - wm_subwindow_getmatrix(window, window->winid, block->winmat); - wm_subwindow_getsize(window, window->winid, &getsizex, &getsizey); + wm_subwindow_getmatrix(window, window->screen->mainwin, block->winmat); + wm_subwindow_getsize(window, window->screen->mainwin, &getsizex, &getsizey); block->aspect= 2.0/fabs(getsizex*block->winmat[0][0]); block->auto_open= 2; diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index ad372077351..5365c3e09f0 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -287,7 +287,7 @@ static void ui_tooltip_region_draw(const bContext *C, ARegion *ar) /* draw background */ glColor3f(1.0f, 1.0f, 0.8666f); - glRectf(0, 4, x2-x1+4, y2-y1); + glRectf(0, 4, x2-x1-4, y2-y1); /* draw text */ glColor3ub(0,0,0); @@ -349,7 +349,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) y1= y2-but->aspect*((data->bbox.ymax+(data->bbox.ymax-data->bbox.ymin))); y2 += 8; - x2 += 8; + x2 += 4; if(butregion) { /* XXX temp, region v2ds can be empty still */ @@ -1661,17 +1661,18 @@ static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, /* type, internal */ #define MENU_ITEM_TITLE 0 #define MENU_ITEM_ITEM 1 -#define MENU_ITEM_OPNAME 2 -#define MENU_ITEM_OPNAME_BOOL 3 -#define MENU_ITEM_OPNAME_ENUM 4 -#define MENU_ITEM_OPNAME_INT 5 -#define MENU_ITEM_OPNAME_FLOAT 6 -#define MENU_ITEM_RNA_BOOL 7 -#define MENU_ITEM_RNA_ENUM 8 -#define MENU_ITEM_LEVEL 9 -#define MENU_ITEM_LEVEL_OPNAME_ENUM 10 -#define MENU_ITEM_LEVEL_RNA_ENUM 11 -#define MENU_ITEM_SEPARATOR 12 +#define MENU_ITEM_SEPARATOR 2 +#define MENU_ITEM_OPNAME 10 +#define MENU_ITEM_OPNAME_BOOL 11 +#define MENU_ITEM_OPNAME_ENUM 12 +#define MENU_ITEM_OPNAME_INT 13 +#define MENU_ITEM_OPNAME_FLOAT 14 +#define MENU_ITEM_OPNAME_STRING 15 +#define MENU_ITEM_RNA_BOOL 20 +#define MENU_ITEM_RNA_ENUM 21 +#define MENU_ITEM_LEVEL 30 +#define MENU_ITEM_LEVEL_OPNAME_ENUM 31 +#define MENU_ITEM_LEVEL_RNA_ENUM 32 struct uiMenuItem { struct uiMenuItem *next, *prev; @@ -1685,6 +1686,7 @@ struct uiMenuItem { int retval, enumval, boolval, intval; float fltval; + char *strval; int opcontext; uiMenuHandleFunc eventfunc; void *argv; @@ -1729,22 +1731,28 @@ const char *ui_menu_enumpropname(char *opname, const char *propname, int retval) return ""; } +typedef struct MenuItemLevel { + int opcontext; + char *opname; + char *propname; + PointerRNA rnapoin; +} MenuItemLevel; + /* make a menu level from enum properties */ static void menu_item_enum_opname_menu(bContext *C, uiMenuItem *head, void *arg) { - uiBut *but= arg; /* parent caller */ - char *opname= but->func_arg1; - char *propname= but->func_arg2; + MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN); - uiMenuItemsEnumO(head, opname, propname); + head->opcontext= lvl->opcontext; + uiMenuItemsEnumO(head, lvl->opname, lvl->propname); } static void menu_item_enum_rna_menu(bContext *C, uiMenuItem *head, void *arg) { - uiBut *but= arg; /* parent caller */ - char *propname= but->func_arg1; + MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN); - uiMenuItemsEnumR(head, &but->rnapoin, propname); + head->opcontext= lvl->opcontext; + uiMenuItemsEnumR(head, &lvl->rnapoin, lvl->propname); } static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, void *arg_info) @@ -1753,6 +1761,7 @@ static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, uiBut *but; uiMenuInfo *info= arg_info; uiMenuItem *head, *item; + MenuItemLevel *lvl; ScrArea *sa; ARegion *ar; static int counter= 0; @@ -1810,19 +1819,29 @@ static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, } else if(item->type==MENU_ITEM_LEVEL_OPNAME_ENUM) { but= uiDefIconTextMenuBut(block, menu_item_enum_opname_menu, NULL, ICON_RIGHTARROW_THIN, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, NULL); + /* XXX warning, abuse of func_arg! */ + lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); + lvl->opname= item->opname; + lvl->propname= item->propname; + lvl->opcontext= item->opcontext; + but->poin= (char*)but; - but->func_arg1= item->opname; - but->func_arg2= item->propname; + but->func_argN= lvl; y1 -= MENU_BUTTON_HEIGHT; } else if(item->type==MENU_ITEM_LEVEL_RNA_ENUM) { but= uiDefIconTextMenuBut(block, menu_item_enum_rna_menu, NULL, ICON_RIGHTARROW_THIN, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, NULL); + /* XXX warning, abuse of func_arg! */ + lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); + lvl->rnapoin= item->rnapoin; + lvl->propname= item->propname; + lvl->opcontext= item->opcontext; + but->poin= (char*)but; - but->rnapoin= item->rnapoin; - but->func_arg1= item->propname; + but->func_argN= lvl; y1 -= MENU_BUTTON_HEIGHT; } @@ -1861,6 +1880,12 @@ static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, y1 -= MENU_BUTTON_HEIGHT; } + else if(item->type==MENU_ITEM_OPNAME_STRING) { + but= uiDefIconTextButO(block, BUTM, item->opname, item->opcontext, item->icon, item->name, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, ""); + RNA_string_set(uiButGetOperatorPtrRNA(but), item->propname, item->strval); + + y1 -= MENU_BUTTON_HEIGHT; + } else if(item->type==MENU_ITEM_OPNAME) { uiDefIconTextButO(block, BUTM, item->opname, item->opcontext, item->icon, NULL, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, NULL); y1 -= MENU_BUTTON_HEIGHT; @@ -2057,6 +2082,17 @@ void uiMenuItemBooleanO(uiMenuItem *head, const char *name, int icon, char *opna item->type = MENU_ITEM_OPNAME_BOOL; } +/* single operator item with property */ +void uiMenuItemStringO(uiMenuItem *head, const char *name, int icon, char *opname, char *propname, char *value) +{ + uiMenuItem *item= ui_menu_add_item(head, name, icon, 0); + + item->opname= opname; // static! + item->propname= propname; // static! + item->strval= value; + item->type = MENU_ITEM_OPNAME_STRING; +} + /* add all operator items with property */ void uiMenuItemsEnumO(uiMenuItem *head, char *opname, char *propname) { diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 9c18cd381f2..6633e34c06a 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -66,13 +66,13 @@ int UI_GetIconRNA(PointerRNA *ptr) StructRNA *rnatype= ptr->type; if(rnatype == &RNA_Scene) - return ICON_SCENE_DEHLT; + return ICON_SCENE_DATA; else if(rnatype == &RNA_World) - return ICON_WORLD; + return ICON_WORLD_DATA; else if(rnatype == &RNA_Object) - return ICON_OBJECT; + return ICON_OBJECT_DATA; else if(rnatype == &RNA_Mesh) - return ICON_MESH; + return ICON_MESH_DATA; else if(rnatype == &RNA_MeshVertex) return ICON_VERTEXSEL; else if(rnatype == &RNA_MeshEdge) @@ -86,49 +86,49 @@ int UI_GetIconRNA(PointerRNA *ptr) else if(rnatype == &RNA_VertexGroupElement) return ICON_VGROUP; else if(rnatype == &RNA_Curve) - return ICON_CURVE; + return ICON_CURVE_DATA; else if(rnatype == &RNA_MetaBall) - return ICON_MBALL; + return ICON_MBALL_DATA; else if(rnatype == &RNA_MetaElement) return ICON_OUTLINER_DATA_META; else if(rnatype == &RNA_Lattice) - return ICON_LATTICE; + return ICON_LATTICE_DATA; else if(rnatype == &RNA_Armature) - return ICON_ARMATURE; + return ICON_ARMATURE_DATA; else if(rnatype == &RNA_Bone) - return ICON_BONE_DEHLT; + return ICON_BONE_DATA; else if(rnatype == &RNA_Camera) - return ICON_CAMERA; + return ICON_CAMERA_DATA; else if(rnatype == &RNA_LocalLamp) - return ICON_LAMP; + return ICON_LAMP_DATA; else if(rnatype == &RNA_AreaLamp) - return ICON_LAMP; + return ICON_LAMP_DATA; else if(rnatype == &RNA_SpotLamp) - return ICON_LAMP; + return ICON_LAMP_DATA; else if(rnatype == &RNA_SunLamp) - return ICON_LAMP; + return ICON_LAMP_DATA; else if(rnatype == &RNA_HemiLamp) - return ICON_LAMP; + return ICON_LAMP_DATA; else if(rnatype == &RNA_Lamp) - return ICON_LAMP; + return ICON_LAMP_DATA; else if(rnatype == &RNA_Group) return ICON_GROUP; else if(rnatype == &RNA_ParticleSystem) - return ICON_PARTICLES; + return ICON_PARTICLE_DATA; else if(rnatype == &RNA_ParticleSettings) - return ICON_PARTICLES; + return ICON_PARTICLE_DATA; else if(rnatype == &RNA_Material) - return ICON_MATERIAL; + return ICON_MATERIAL_DATA; else if(rnatype == &RNA_Texture) - return ICON_TEXTURE; + return ICON_TEXTURE_DATA; else if(rnatype == &RNA_TextureSlot) - return ICON_TEXTURE; + return ICON_TEXTURE_DATA; else if(rnatype == &RNA_WorldTextureSlot) - return ICON_TEXTURE; + return ICON_TEXTURE_DATA; else if(rnatype == &RNA_MaterialTextureSlot) - return ICON_TEXTURE; + return ICON_TEXTURE_DATA; else if(rnatype == &RNA_Image) - return ICON_TEXTURE; + return ICON_IMAGE_DATA; else if(rnatype == &RNA_Screen) return ICON_SPLITSCREEN; else if(rnatype == &RNA_NodeTree) @@ -138,19 +138,19 @@ int UI_GetIconRNA(PointerRNA *ptr) else if(rnatype == &RNA_Sound) return ICON_SOUND; else if(rnatype == &RNA_Brush) - return ICON_BRUSH; + return ICON_BRUSH_DATA; else if(rnatype == &RNA_VectorFont) return ICON_FONT; else if(rnatype == &RNA_Library) - return ICON_LIBRARY_DEHLT; + return ICON_LIBRARY_DATA_DIRECT; else if(rnatype == &RNA_Action) return ICON_ACTION; else if(rnatype == &RNA_FCurve) - return ICON_IPO_DEHLT; + return ICON_ANIM_DATA; //else if(rnatype == &RNA_Ipo) - // return ICON_IPO_DEHLT; + // return ICON_ANIM_DATA; else if(rnatype == &RNA_Key) - return ICON_SHAPEKEY; + return ICON_SHAPEKEY_DATA; else if(rnatype == &RNA_Main) return ICON_BLENDER; else if(rnatype == &RNA_Struct) @@ -182,11 +182,11 @@ int UI_GetIconRNA(PointerRNA *ptr) else if(rnatype == &RNA_SubsurfModifier) return ICON_MOD_SUBSURF; else if(rnatype == &RNA_ArmatureModifier) - return ICON_ARMATURE; + return ICON_MOD_ARMATURE; else if(rnatype == &RNA_LatticeModifier) - return ICON_LATTICE; + return ICON_MOD_LATTICE; else if(rnatype == &RNA_CurveModifier) - return ICON_CURVE; + return ICON_MOD_CURVE; else if(rnatype == &RNA_BuildModifier) return ICON_MOD_BUILD; else if(rnatype == &RNA_MirrorModifier) @@ -249,6 +249,8 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind if(RNA_property_subtype(ptr, prop) == PROP_COLOR) but= uiDefButR(block, COL, 0, name, x1, y1, x2, y2, ptr, propname, 0, 0, 0, -1, -1, NULL); } + else if(RNA_property_subtype(ptr, prop) == PROP_PERCENTAGE) + but= uiDefButR(block, NUMSLI, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); else but= uiDefButR(block, NUM, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL); break; @@ -307,7 +309,7 @@ int uiDefAutoButsRNA(uiBlock *block, PointerRNA *ptr) PropertyRNA *iterprop, *prop; PropertySubType subtype; char *name, namebuf[128]; - int a, length, x= 0, y= 0; + int a= 0, length, x= 0, y= 0; x= 0; y= 0; @@ -387,7 +389,7 @@ int uiDefAutoButsRNA(uiBlock *block, PointerRNA *ptr) else name= ""; - uiDefAutoButR(block, ptr, prop, a, name, x+DEF_BUT_WIDTH, y, DEF_BUT_WIDTH, DEF_BUT_HEIGHT-1); + uiDefAutoButR(block, ptr, prop, 0, name, x+DEF_BUT_WIDTH, y, DEF_BUT_WIDTH, DEF_BUT_HEIGHT-1); y -= DEF_BUT_HEIGHT; } @@ -440,7 +442,7 @@ static void idpoin_cb(bContext *C, void *arg_params, void *arg_event) for(idtest=lb->first, nr=1; idtest; idtest=idtest->next, nr++) { if(nr==params->browsenr) { - if(id == idtest) + if(*id_p == idtest) return; *id_p= idtest; @@ -1128,7 +1130,5 @@ void curvemap_buttons(uiBlock *block, CurveMapping *cumap, char labeltype, short uiDefBut(block, BUT_CURVE, event, "", rect->xmin, rect->ymin, rect->xmax-rect->xmin, fy-rect->ymin, cumap, 0.0f, 1.0f, 0, 0, ""); - } - diff --git a/source/blender/editors/interface/text.c b/source/blender/editors/interface/text.c index 8d4a3e4fb29..c3dc40e59ef 100644 --- a/source/blender/editors/interface/text.c +++ b/source/blender/editors/interface/text.c @@ -96,6 +96,18 @@ void UI_SetScale(float aspect) void ui_text_init_userdef(void) { + int id; + + id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size); + if (id == -1) + printf("Warning can't load built-in font ??\n"); + else { + BLF_set(id); + BLF_size(12, 72); + BLF_size(11, 96); + BLF_size(14, 96); + } + #ifdef INTERNATIONAL if(U.transopts & USER_DOTRANSLATE) start_interface_font(); @@ -124,7 +136,6 @@ int UI_DrawString(BMF_Font* font, char *str, int translate) else if (!strcmp(code, "zh_CN")) string_to_utf8(str, utf_8, "GB2312"); /* Chinese */ } - return FTF_DrawString(utf_8, FTF_INPUT_UTF8); } else @@ -208,7 +219,6 @@ void set_interface_font(char *str) if(U.transopts & USER_DOTRANSLATE) { if(FTF_SetFont((unsigned char*)str, 0, U.fontsize)) { BLF_lang_set(U.language); - if(strlen(str) < FILE_MAXDIR) strcpy(U.fontname, str); G.ui_international = TRUE; } diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 85766adeef4..15b345e5992 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -731,10 +731,18 @@ void UI_view2d_curRect_reset (View2D *v2d) /* Change the size of the maximum viewable area (i.e. 'tot' rect) */ void UI_view2d_totRect_set (View2D *v2d, int width, int height) { + int scroll= view2d_scroll_mapped(v2d->scroll); + /* don't do anything if either value is 0 */ width= abs(width); height= abs(height); + /* hrumf! */ + if(scroll & V2D_SCROLL_HORIZONTAL) + width -= V2D_SCROLL_WIDTH; + if(scroll & V2D_SCROLL_VERTICAL) + height -= V2D_SCROLL_HEIGHT; + if (ELEM3(0, v2d, width, height)) { printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d \n", v2d, width, height); // XXX temp debug info return; diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 2fe33c0065d..506e299f890 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -367,9 +367,16 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op) return OPERATOR_PASS_THROUGH; } - /* set RNA-Props - only movement in positive x-direction */ - RNA_int_set(op->ptr, "deltax", 0); - RNA_int_set(op->ptr, "deltay", -20); + /* set RNA-Props */ + /* automatically fall back to horizontal on this exception: */ + if( ELEM(vpd->v2d->scroll, V2D_SCROLL_BOTTOM, V2D_SCROLL_TOP) ) { + RNA_int_set(op->ptr, "deltax", -20); + RNA_int_set(op->ptr, "deltay", 0); + } + else { + RNA_int_set(op->ptr, "deltax", 0); + RNA_int_set(op->ptr, "deltay", -20); + } /* apply movement, then we're done */ view_pan_apply(C, op); @@ -413,9 +420,16 @@ static int view_scrollup_exec(bContext *C, wmOperator *op) return OPERATOR_PASS_THROUGH; } - /* set RNA-Props - only movement in negative x-direction */ - RNA_int_set(op->ptr, "deltax", 0); - RNA_int_set(op->ptr, "deltay", 20); + /* set RNA-Props */ + /* automatically fall back to horizontal on this exception: */ + if( ELEM(vpd->v2d->scroll, V2D_SCROLL_BOTTOM, V2D_SCROLL_TOP) ) { + RNA_int_set(op->ptr, "deltax", 20); + RNA_int_set(op->ptr, "deltay", 0); + } + else { + RNA_int_set(op->ptr, "deltax", 0); + RNA_int_set(op->ptr, "deltay", 20); + } /* apply movement, then we're done */ view_pan_apply(C, op); diff --git a/source/blender/editors/mesh/editdeform.c b/source/blender/editors/mesh/editdeform.c index 845290660c7..83668400708 100644 --- a/source/blender/editors/mesh/editdeform.c +++ b/source/blender/editors/mesh/editdeform.c @@ -43,6 +43,7 @@ #include "DNA_object_force.h" #include "DNA_scene_types.h" #include "DNA_particle_types.h" +#include "DNA_windowmanager_types.h" #include "BLI_blenlib.h" #include "BLI_editVert.h" @@ -989,7 +990,7 @@ void vgroup_assign_with_menu(Scene *scene, Object *ob) { VPaint *wp= scene->toolsettings->wpaint; int defCount; - int mode; + int mode= 0; /* prevent crashes */ if (wp==NULL || ob==NULL) return; @@ -1031,7 +1032,7 @@ void vgroup_assign_with_menu(Scene *scene, Object *ob) void vgroup_operation_with_menu(Object *ob) { int defCount; - int mode; + int mode= 0; /* prevent crashes and useless cases */ if (ob==NULL) return; diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 6c17dff3428..a6c5e5beccf 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -144,16 +144,6 @@ MTFace *EM_get_active_mtface(EditMesh *em, EditFace **act_efa, MCol **mcol, int return NULL; } -static void make_tfaces(Object *ob) -{ - Mesh *me= ob->data; - - if(!me->mtface) { - me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT, - NULL, me->totface); - } -} - void reveal_tface(Scene *scene) { Mesh *me; @@ -676,7 +666,7 @@ void face_borderselect(Scene *scene, ARegion *ar) rcti rect; struct ImBuf *ibuf; unsigned int *rt; - int a, sx, sy, index, val; + int a, sx, sy, index, val= 0; char *selar; me= get_mesh(OBACT); @@ -734,155 +724,4 @@ void face_borderselect(Scene *scene, ARegion *ar) #endif } -/* Texture Paint */ -void set_texturepaint(Scene *scene) /* toggle */ -{ - Object *ob = OBACT; - Mesh *me = 0; - - if(ob==NULL) return; - - if (object_data_is_libdata(ob)) { -// XXX error_libdata(); - return; - } - - me= get_mesh(ob); - - if(me) - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - - if(G.f & G_TEXTUREPAINT) { - G.f &= ~G_TEXTUREPAINT; - GPU_paint_set_mipmap(1); - } - else if (me) { - G.f |= G_TEXTUREPAINT; - - if(me->mtface==NULL) - make_tfaces(ob); - - brush_check_exists(&scene->toolsettings->imapaint.brush); - GPU_paint_set_mipmap(0); - } - -} - -static void texpaint_project(Object *ob, float *model, float *proj, float *co, float *pco) -{ - VECCOPY(pco, co); - pco[3]= 1.0f; - - Mat4MulVecfl(ob->obmat, pco); - Mat4MulVecfl((float(*)[4])model, pco); - Mat4MulVec4fl((float(*)[4])proj, pco); -} - -static void texpaint_tri_weights(Object *ob, float *v1, float *v2, float *v3, float *co, float *w) -{ - float pv1[4], pv2[4], pv3[4], h[3], divw; - float model[16], proj[16], wmat[3][3], invwmat[3][3]; - GLint view[4]; - - /* compute barycentric coordinates */ - - /* get the needed opengl matrices */ - glGetIntegerv(GL_VIEWPORT, view); - glGetFloatv(GL_MODELVIEW_MATRIX, model); - glGetFloatv(GL_PROJECTION_MATRIX, proj); - view[0] = view[1] = 0; - - /* project the verts */ - texpaint_project(ob, model, proj, v1, pv1); - texpaint_project(ob, model, proj, v2, pv2); - texpaint_project(ob, model, proj, v3, pv3); - - /* do inverse view mapping, see gluProject man page */ - h[0]= (co[0] - view[0])*2.0f/view[2] - 1; - h[1]= (co[1] - view[1])*2.0f/view[3] - 1; - h[2]= 1.0f; - - /* solve for (w1,w2,w3)/perspdiv in: - h*perspdiv = Project*Model*(w1*v1 + w2*v2 + w3*v3) */ - - wmat[0][0]= pv1[0]; wmat[1][0]= pv2[0]; wmat[2][0]= pv3[0]; - wmat[0][1]= pv1[1]; wmat[1][1]= pv2[1]; wmat[2][1]= pv3[1]; - wmat[0][2]= pv1[3]; wmat[1][2]= pv2[3]; wmat[2][2]= pv3[3]; - - Mat3Inv(invwmat, wmat); - Mat3MulVecfl(invwmat, h); - - VECCOPY(w, h); - - /* w is still divided by perspdiv, make it sum to one */ - divw= w[0] + w[1] + w[2]; - if(divw != 0.0f) - VecMulf(w, 1.0f/divw); -} - -/* compute uv coordinates of mouse in face */ -void texpaint_pick_uv(Scene *scene, Object *ob, Mesh *mesh, unsigned int faceindex, short *xy, float *uv) -{ - DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); - int *index = dm->getFaceDataArray(dm, CD_ORIGINDEX); - MTFace *tface = dm->getFaceDataArray(dm, CD_MTFACE), *tf; - int numfaces = dm->getNumFaces(dm), a; - float p[2], w[3], absw, minabsw; - MFace mf; - MVert mv[4]; - - minabsw = 1e10; - uv[0] = uv[1] = 0.0; - -// XXX persp(PERSP_VIEW); - - /* test all faces in the derivedmesh with the original index of the picked face */ - for (a = 0; a < numfaces; a++) { - if (index[a] == faceindex) { - dm->getFace(dm, a, &mf); - - dm->getVert(dm, mf.v1, &mv[0]); - dm->getVert(dm, mf.v2, &mv[1]); - dm->getVert(dm, mf.v3, &mv[2]); - if (mf.v4) - dm->getVert(dm, mf.v4, &mv[3]); - - tf= &tface[a]; - - p[0]= xy[0]; - p[1]= xy[1]; - - if (mf.v4) { - /* the triangle with the largest absolute values is the one - with the most negative weights */ - texpaint_tri_weights(ob, mv[0].co, mv[1].co, mv[3].co, p, w); - absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]); - if(absw < minabsw) { - uv[0]= tf->uv[0][0]*w[0] + tf->uv[1][0]*w[1] + tf->uv[3][0]*w[2]; - uv[1]= tf->uv[0][1]*w[0] + tf->uv[1][1]*w[1] + tf->uv[3][1]*w[2]; - minabsw = absw; - } - - texpaint_tri_weights(ob, mv[1].co, mv[2].co, mv[3].co, p, w); - absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]); - if (absw < minabsw) { - uv[0]= tf->uv[1][0]*w[0] + tf->uv[2][0]*w[1] + tf->uv[3][0]*w[2]; - uv[1]= tf->uv[1][1]*w[0] + tf->uv[2][1]*w[1] + tf->uv[3][1]*w[2]; - minabsw = absw; - } - } - else { - texpaint_tri_weights(ob, mv[0].co, mv[1].co, mv[2].co, p, w); - absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]); - if (absw < minabsw) { - uv[0]= tf->uv[0][0]*w[0] + tf->uv[1][0]*w[1] + tf->uv[2][0]*w[2]; - uv[1]= tf->uv[0][1]*w[0] + tf->uv[1][1]*w[1] + tf->uv[2][1]*w[2]; - minabsw = absw; - } - } - } - } - - dm->release(dm); -} diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index e16ec867e7c..d4780927b70 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -59,6 +59,7 @@ #include "BKE_mesh.h" #include "BKE_object.h" #include "BKE_utildefines.h" +#include "BKE_report.h" #include "BIF_retopo.h" @@ -70,12 +71,13 @@ #include "ED_view3d.h" #include "ED_screen.h" +#include "bmesh.h" + #include "mesh_intern.h" /* bpymenu removed XXX */ /* XXX */ -static void error() {} #define add_numbut(a, b, c, d, e, f, g) {} /* XXX */ @@ -118,37 +120,15 @@ static short icoface[20][3] = { /* *************** add-click-mesh (extrude) operator ************** */ -static void get_view_aligned_coordinate(ViewContext *vc, float *fp, short mval[2]) -{ - float dvec[3]; - short mx, my; - - mx= mval[0]; - my= mval[1]; - - project_short_noclip(vc->ar, fp, mval); - - initgrabz(vc->rv3d, fp[0], fp[1], fp[2]); - - if(mval[0]!=IS_CLIPPED) { - window_to_3d_delta(vc->ar, dvec, mval[0]-mx, mval[1]-my); - VecSubf(fp, fp, dvec); - } -} - static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) { ViewContext vc; EditVert *eve, *v1; float min[3], max[3]; int done= 0; - short mval[2]; em_setup_viewcontext(C, &vc); - mval[0]= event->x - vc.ar->winrct.xmin; - mval[1]= event->y - vc.ar->winrct.ymin; - INIT_MINMAX(min, max); for(v1= vc.em->verts.first;v1; v1=v1->next) { @@ -182,7 +162,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) VECCOPY(min, cent); Mat4MulVecfl(vc.obedit->obmat, min); // view space - get_view_aligned_coordinate(&vc, min, mval); + view3d_get_view_aligned_coordinate(&vc, min, event->mval); Mat4Invert(vc.obedit->imat, vc.obedit->obmat); Mat4MulVecfl(vc.obedit->imat, min); // back in object space @@ -224,7 +204,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) float *curs= give_cursor(vc.scene, vc.v3d); VECCOPY(min, curs); - get_view_aligned_coordinate(&vc, min, mval); + view3d_get_view_aligned_coordinate(&vc, min, event->mval); eve= addvertlist(vc.em, 0, NULL); @@ -263,7 +243,7 @@ void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot) /* ********************** */ /* selected faces get hidden edges */ -int make_fgon(EditMesh *em, int make) +int make_fgon(EditMesh *em, wmOperator *op, int make) { EditFace *efa; EditEdge *eed; @@ -335,13 +315,13 @@ int make_fgon(EditMesh *em, int make) if(eve->f1==1) break; } if(eve) { - error("Cannot make polygon with interior vertices"); + BKE_report(op->reports, RPT_ERROR, "Cannot make a polygon with interior vertices"); return 0; } // check for faces if(nor==NULL) { - error("No faces selected to make FGon"); + BKE_report(op->reports, RPT_ERROR, "No faces were selected to make FGon"); return 0; } @@ -363,7 +343,7 @@ static int make_fgon_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - if( make_fgon(em, 1) ) { + if( make_fgon(em, op, 1) ) { DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); @@ -392,7 +372,7 @@ static int clear_fgon_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - if( make_fgon(em, 0) ) { + if( make_fgon(em, op, 0) ) { DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); @@ -682,12 +662,18 @@ void addfaces_from_edgenet(EditMesh *em) // XXX DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); } -static void addedgeface_mesh(EditMesh *em) +static void addedgeface_mesh(EditMesh *em, wmOperator *op) { EditVert *eve, *neweve[4]; EditEdge *eed; EditFace *efa; short amount=0; + + if (em->selectmode & SCE_SELECT_FACE) { + /*return if bmesh face dissolve finds stuff to + dissolve.*/ + if (BM_DissolveFaces(em, BM_SELECT)) return; + } /* how many selected ? */ if(em->selectmode & SCE_SELECT_EDGE) { @@ -716,7 +702,7 @@ static void addedgeface_mesh(EditMesh *em) return; } else if(amount<2) { - error("Incorrect number of vertices to make edge/face"); + BKE_report(op->reports, RPT_ERROR, "More vertices are needed to make an edge/face"); return; } @@ -728,7 +714,7 @@ static void addedgeface_mesh(EditMesh *em) efa= addfacelist(em, neweve[0], neweve[1], neweve[2], 0, NULL, NULL); EM_select_face(efa, 1); } - else error("The selected vertices already form a face"); + else BKE_report(op->reports, RPT_ERROR, "The selected vertices already form a face"); } else if(amount==4) { /* this test survives when theres 2 triangles */ @@ -784,9 +770,9 @@ static void addedgeface_mesh(EditMesh *em) } } } - else error("The selected vertices already form a face"); + else BKE_report(op->reports, RPT_ERROR, "The selected vertices already form a face"); } - else error("The selected vertices already form a face"); + else BKE_report(op->reports, RPT_ERROR, "The selected vertices already form a face"); } if(efa) { @@ -803,7 +789,7 @@ static int addedgeface_mesh_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - addedgeface_mesh(em); + addedgeface_mesh(em, op); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c index 054e3013234..3f01363553c 100644 --- a/source/blender/editors/mesh/editmesh_lib.c +++ b/source/blender/editors/mesh/editmesh_lib.c @@ -44,6 +44,7 @@ editmesh_lib: generic (no UI, no menus) operations/evaluators for editmesh data #include "DNA_modifier_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "DNA_windowmanager_types.h" #include "BLI_blenlib.h" #include "BLI_arithb.h" diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index db2f6d5f886..5fd0a2b6988 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -46,6 +46,7 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_view3d_types.h" +#include "DNA_windowmanager_types.h" #include "BLI_blenlib.h" #include "BLI_arithb.h" @@ -199,13 +200,13 @@ static void edgering_sel(EditMesh *em, EditEdge *startedge, int select, int prev } } } -void CutEdgeloop(Object *obedit, EditMesh *em, int numcuts) +void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts) { ViewContext vc; // XXX EditEdge *nearest=NULL, *eed; float fac; int keys = 0, holdnum=0, selectmode, dist; - short mvalo[2] = {0,0}, mval[2] = {0, 0}; + short mvalo[2] = {0,0}, mval[2]; short event=0, val, choosing=1, cancel=0, cuthalf = 0, smooth=0; short hasHidden = 0; char msg[128]; @@ -376,9 +377,9 @@ void CutEdgeloop(Object *obedit, EditMesh *em, int numcuts) /* if this was a single cut, enter edgeslide mode */ if(numcuts == 1 && hasHidden == 0){ if(cuthalf) - EdgeSlide(em, 1,0.0); + EdgeSlide(em, op, 1,0.0); else { - if(EdgeSlide(em, 0,0.0) == -1){ + if(EdgeSlide(em, op, 0,0.0) == -1){ BIF_undo(); } } @@ -477,7 +478,7 @@ static float seg_intersect(EditEdge *e, CutCurve *c, int len, char mode, struct float threshold = 0.0; int i; - //threshold = 0.000001; /*tolerance for vertex intersection*/ + threshold = 0.000001; /*tolerance for vertex intersection*/ // XXX threshold = scene->toolsettings->select_thresh / 100; /* Get screen coords of verts */ diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 64bc706a640..e2898d88640 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -67,6 +67,7 @@ editmesh_mods.c, UI level access, no geometry changes #include "BKE_material.h" #include "BKE_texture.h" #include "BKE_utildefines.h" +#include "BKE_report.h" #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -93,7 +94,6 @@ editmesh_mods.c, UI level access, no geometry changes /* XXX */ static void waitcursor() {} -static void error() {} static int pupmenu() {return 0;} /* ****************************** MIRROR **************** */ @@ -1380,7 +1380,7 @@ void EM_mesh_copy_edge(EditMesh *em, short type) } } -void EM_mesh_copy_face(EditMesh *em, short type) +void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type) { short change=0; @@ -1406,7 +1406,7 @@ void EM_mesh_copy_face(EditMesh *em, short type) break; case 2: /* copy image */ if (!tf_act) { - error("mesh has no uv/image layers"); + BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers"); return; } for(efa=em->faces.first; efa; efa=efa->next) { @@ -1427,7 +1427,7 @@ void EM_mesh_copy_face(EditMesh *em, short type) case 3: /* copy UV's */ if (!tf_act) { - error("mesh has no uv/image layers"); + BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers"); return; } for(efa=em->faces.first; efa; efa=efa->next) { @@ -1440,7 +1440,7 @@ void EM_mesh_copy_face(EditMesh *em, short type) break; case 4: /* mode's */ if (!tf_act) { - error("mesh has no uv/image layers"); + BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers"); return; } for(efa=em->faces.first; efa; efa=efa->next) { @@ -1453,7 +1453,7 @@ void EM_mesh_copy_face(EditMesh *em, short type) break; case 5: /* copy transp's */ if (!tf_act) { - error("mesh has no uv/image layers"); + BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers"); return; } for(efa=em->faces.first; efa; efa=efa->next) { @@ -1467,7 +1467,7 @@ void EM_mesh_copy_face(EditMesh *em, short type) case 6: /* copy vcols's */ if (!mcol_act) { - error("mesh has no color layers"); + BKE_report(op->reports, RPT_ERROR, "mesh has no color layers"); return; } else { /* guess the 4th color if needs be */ @@ -1509,7 +1509,7 @@ void EM_mesh_copy_face(EditMesh *em, short type) } -void EM_mesh_copy_face_layer(EditMesh *em, short type) +void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type) { short change=0; @@ -1524,7 +1524,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, short type) case 8: case 9: if (CustomData_number_of_layers(&em->fdata, CD_MTFACE)<2) { - error("mesh does not have multiple uv/image layers"); + BKE_report(op->reports, RPT_ERROR, "mesh does not have multiple uv/image layers"); return; } else { int layer_orig_idx, layer_idx; @@ -1551,7 +1551,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, short type) case 10: /* select vcol layers - make sure this stays in sync with above code */ if (CustomData_number_of_layers(&em->fdata, CD_MCOL)<2) { - error("mesh does not have multiple color layers"); + BKE_report(op->reports, RPT_ERROR, "mesh does not have multiple color layers"); return; } else { int layer_orig_idx, layer_idx; @@ -1640,7 +1640,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, short type) /* ctrl+c in mesh editmode */ -void mesh_copy_menu(EditMesh *em) +void mesh_copy_menu(EditMesh *em, wmOperator *op) { EditSelection *ese; int ret; @@ -1672,9 +1672,9 @@ void mesh_copy_menu(EditMesh *em) if (ret<1) return; if (ret<=6) { - EM_mesh_copy_face(em, ret); + EM_mesh_copy_face(em, op, ret); } else { - EM_mesh_copy_face_layer(em, ret); + EM_mesh_copy_face_layer(em, op, ret); } } } @@ -2025,15 +2025,10 @@ static void mouse_mesh_loop(bContext *C, short mval[2], short extend, short ring static int mesh_loop_select_invoke(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); - short mval[2]; - - mval[0]= event->x - ar->winrct.xmin; - mval[1]= event->y - ar->winrct.ymin; view3d_operator_needs_opengl(C); - mouse_mesh_loop(C, mval, RNA_boolean_get(op->ptr, "extend"), + mouse_mesh_loop(C, event->mval, RNA_boolean_get(op->ptr, "extend"), RNA_boolean_get(op->ptr, "ring")); /* cannot do tweaks for as long this keymap is after transform map */ @@ -2131,15 +2126,10 @@ static void mouse_mesh_shortest_path(bContext *C, short mval[2]) static int mesh_shortest_path_select_invoke(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); - short mval[2]; - - mval[0]= event->x - ar->winrct.xmin; - mval[1]= event->y - ar->winrct.ymin; view3d_operator_needs_opengl(C); - mouse_mesh_shortest_path(C, mval); + mouse_mesh_shortest_path(C, event->mval); return OPERATOR_FINISHED; } @@ -2366,8 +2356,8 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event if(vc.em->edges.first==0) return OPERATOR_CANCELLED; - vc.mval[0]= event->x - vc.ar->winrct.xmin; - vc.mval[1]= event->y - vc.ar->winrct.ymin; + vc.mval[0]= event->mval[0]; + vc.mval[1]= event->mval[1]; /* return warning! */ if(limit) { @@ -2642,7 +2632,7 @@ static int hide_mesh_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - EM_hide_mesh(em, RNA_boolean_get(op->ptr, "invert")); + EM_hide_mesh(em, RNA_boolean_get(op->ptr, "unselected")); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); return OPERATOR_FINISHED; @@ -2662,7 +2652,7 @@ void MESH_OT_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "invert", 0, "Invert", "Hide unselected rather than selected."); + RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); } void EM_reveal_mesh(EditMesh *em) @@ -2726,7 +2716,7 @@ void MESH_OT_reveal(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -void select_faces_by_numverts(EditMesh *em, int numverts) +void select_faces_by_numverts(EditMesh *em, wmOperator *op, int numverts) { EditFace *efa; @@ -2738,7 +2728,7 @@ void select_faces_by_numverts(EditMesh *em, int numverts) if(numverts==5) EM_set_flag_all(em, SELECT); else if(em->selectmode!=SCE_SELECT_FACE) { - error("Only works in face selection mode"); + BKE_report(op->reports, RPT_ERROR, "Only works in face selection mode"); return; } @@ -2773,7 +2763,7 @@ static int select_sharp_edges_exec(bContext *C, wmOperator *op) /* 'standard' behaviour - check if selected, then apply relevant selection */ if(em->selectmode==SCE_SELECT_FACE) { - error("Doesn't work in face selection mode"); + BKE_report(op->reports, RPT_ERROR, "Doesn't work in face selection mode"); return OPERATOR_CANCELLED; } @@ -2873,7 +2863,7 @@ void MESH_OT_select_sharp_edges(wmOperatorType *ot) } -static void select_linked_flat_faces(EditMesh *em, float sharpness) +static void select_linked_flat_faces(EditMesh *em, wmOperator *op, float sharpness) { /* Find faces that are linked to selected faces that are * relatively flat (angle between faces is higher than @@ -2887,7 +2877,7 @@ static void select_linked_flat_faces(EditMesh *em, float sharpness) float fsharpness; if(em->selectmode!=SCE_SELECT_FACE) { - error("Only works in face selection mode"); + BKE_report(op->reports, RPT_ERROR, "Only works in face selection mode"); return; } @@ -3014,7 +3004,7 @@ static int select_linked_flat_faces_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - select_linked_flat_faces(em, RNA_float_get(op->ptr, "sharpness")); + select_linked_flat_faces(em, op, RNA_float_get(op->ptr, "sharpness")); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); return OPERATOR_FINISHED; @@ -3037,7 +3027,7 @@ void MESH_OT_select_linked_flat_faces(wmOperatorType *ot) RNA_def_float(ot->srna, "sharpness", 0.0f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f); } -void select_non_manifold(EditMesh *em) +void select_non_manifold(EditMesh *em, wmOperator *op ) { EditVert *eve; EditEdge *eed; @@ -3048,7 +3038,7 @@ void select_non_manifold(EditMesh *em) */ if(em->selectmode==SCE_SELECT_FACE) { - error("Doesn't work in face selection mode"); + BKE_report(op->reports, RPT_ERROR, "Doesn't work in face selection mode"); return; } @@ -3112,7 +3102,7 @@ static int select_non_manifold_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - select_non_manifold(em); + select_non_manifold(em, op); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); return OPERATOR_FINISHED; @@ -3533,10 +3523,10 @@ void MESH_OT_select_random(wmOperatorType *ot) ot->poll= ED_operator_editmesh; /* flags */ - ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/; + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_float(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of vertices to select randomly.", 0.0001f, 1.0f); + RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of vertices to select randomly.", 0.0001f, 1.0f); } void editmesh_select_by_material(EditMesh *em, int index) @@ -4171,7 +4161,7 @@ static int mface_is_selected(MFace *mf) * which would use same as vertices method), then added * to interface! Hoera! - zr */ -void faceselect_align_view_to_selected(View3D *v3d, RegionView3D *rv3d, Mesh *me, int axis) +void faceselect_align_view_to_selected(View3D *v3d, RegionView3D *rv3d, Mesh *me, wmOperator *op, int axis) { float norm[3]; int i, totselected = 0; @@ -4202,7 +4192,7 @@ void faceselect_align_view_to_selected(View3D *v3d, RegionView3D *rv3d, Mesh *me } if (totselected == 0) - error("No faces selected."); + BKE_report(op->reports, RPT_ERROR, "No faces selected."); else view3d_align_axis_to_vector(v3d, rv3d, axis, norm); } @@ -4228,13 +4218,13 @@ static void face_getnormal_obspace(Object *obedit, EditFace *efa, float *fno) } -void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, View3D *v3d, RegionView3D *rv3d, int axis) +void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, wmOperator *op, View3D *v3d, RegionView3D *rv3d, int axis) { int nselverts= EM_nvertices_selected(em); float norm[3]={0.0, 0.0, 0.0}; /* used for storing the mesh normal */ if (nselverts==0) { - error("No faces or vertices selected."); + BKE_report(op->reports, RPT_ERROR, "No faces or vertices selected."); } else if (EM_nfaces_selected(em)) { EditFace *efa; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 591854c2811..3bc59fe9094 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -74,6 +74,7 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise #include "BKE_object.h" #include "BKE_utildefines.h" #include "BKE_bmesh.h" +#include "BKE_report.h" #include "BIF_gl.h" #include "BIF_glutil.h" @@ -87,6 +88,7 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise #include "ED_view3d.h" #include "ED_util.h" #include "ED_screen.h" +#include "BIF_transform.h" #include "UI_interface.h" @@ -96,11 +98,9 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise /* XXX */ static int extern_qread() {return 0;} static void waitcursor() {} -static void error() {} static int pupmenu() {return 0;} static int qtest() {return 0;} #define add_numbut(a, b, c, d, e, f, g) {} -static int do_clever_numbuts() {return 0;} static int snap_sel_to_curs() {return 0;} static int snap_to_center() {return 0;} @@ -108,7 +108,7 @@ static int snap_to_center() {return 0;} /* local prototypes ---------------*/ static void free_tagged_edges_faces(EditMesh *em, EditEdge *eed, EditFace *efa); -int EdgeLoopDelete(EditMesh *em); +int EdgeLoopDelete(EditMesh *em, wmOperator *op); /********* qsort routines *********/ @@ -489,8 +489,15 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); Scene *scene = CTX_data_scene(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; + char msg[100]; - removedoublesflag(em,1,0,scene->toolsettings->doublimit); + int cnt = removedoublesflag(em,1,0,scene->toolsettings->doublimit); + + if(cnt) + { + sprintf(msg, "Removed %d vertices", cnt); + BKE_report(op->reports, RPT_INFO, msg); + } WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); @@ -616,7 +623,7 @@ void hashvert_flag(EditMesh *em, int flag) } /* generic extern called extruder */ -void extrude_mesh(Object *obedit, EditMesh *em) +void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op) { Scene *scene= NULL; // XXX CTX! float nor[3]= {0.0, 0.0, 0.0}; @@ -627,11 +634,11 @@ void extrude_mesh(Object *obedit, EditMesh *em) else if(em->totvertsel==1) nr= 4; else if(em->totedgesel==0) nr= 4; else if(em->totfacesel==0) - nr= pupmenu("Extrude %t|Only Edges%x3|Only Vertices%x4"); + nr= 3; // pupmenu("Extrude %t|Only Edges%x3|Only Vertices%x4"); else if(em->totfacesel==1) - nr= pupmenu("Extrude %t|Region %x1|Only Edges%x3|Only Vertices%x4"); + nr= 1; // pupmenu("Extrude %t|Region %x1|Only Edges%x3|Only Vertices%x4"); else - nr= pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3|Only Vertices%x4"); + nr= 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3|Only Vertices%x4"); } else if(em->selectmode & SCE_SELECT_EDGE) { if (em->totedgesel==0) nr = 0; @@ -640,16 +647,16 @@ void extrude_mesh(Object *obedit, EditMesh *em) /*else if (em->totedgesel==1) nr = 3; else if(em->totfacesel==0) nr = 3; else if(em->totfacesel==1) - nr= pupmenu("Extrude %t|Region %x1|Only Edges%x3"); + nr= 1; // pupmenu("Extrude %t|Region %x1|Only Edges%x3"); else - nr= pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3"); + nr= 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3"); */ } else { if (em->totfacesel == 0) nr = 0; - else nr = 1; //if (em->totfacesel == 1) nr = 1; - //else - // nr= pupmenu("Extrude %t|Region %x1||Individual Faces %x2"); + else if (em->totfacesel == 1) nr = 1; + else + nr= 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2"); } if(nr<1) return; @@ -660,7 +667,7 @@ void extrude_mesh(Object *obedit, EditMesh *em) else transmode= extrudeflag_face_indiv(em, SELECT, nor); if(transmode==0) { - error("No valid selection"); + BKE_report(op->reports, RPT_ERROR, "Not a valid selection for extrude"); } else { EM_fgon_flags(em); @@ -694,18 +701,35 @@ void extrude_mesh(Object *obedit, EditMesh *em) } // XXX should be a menu item -static int mesh_extrude_exec(bContext *C, wmOperator *op) +static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event) { Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - extrude_mesh(obedit,em); - + extrude_mesh(obedit,em, op); + + RNA_int_set(op->ptr, "mode", TFM_TRANSLATION); + WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); return OPERATOR_FINISHED; } +/* extrude without transform */ +static int mesh_extrude_exec(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; + + extrude_mesh(obedit,em, op); + + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); + + return OPERATOR_FINISHED; +} + + void MESH_OT_extrude(wmOperatorType *ot) { /* identifiers */ @@ -713,11 +737,15 @@ void MESH_OT_extrude(wmOperatorType *ot) ot->idname= "MESH_OT_extrude"; /* api callbacks */ + ot->invoke= mesh_extrude_invoke; ot->exec= mesh_extrude_exec; ot->poll= ED_operator_editmesh; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* to give to transform */ + RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX); } static int split_mesh(bContext *C, wmOperator *op) @@ -816,23 +844,28 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot) RNA_def_float(ot->srna, "offset", 2.0f, 0.0f, 100.0f, "Offset", "", 0.0f, FLT_MAX); RNA_def_int(ot->srna, "steps", 10, 0, 180, "Steps", "", 0, INT_MAX); } + +/* ************************** spin operator ******************** */ -void spin_mesh(View3D *v3d, Object *obedit, EditMesh *em, int steps, float degr, float *dvec, int mode) +static int spin_mesh(bContext *C, float *dvec, int steps, float degr, int dupli ) { - Scene *scene= NULL; // XXX from context! - RegionView3D *rv3d= NULL; // XXX from context + Object *obedit= CTX_data_edit_object(C); + View3D *v3d = CTX_wm_view3d(C); + Scene *scene = CTX_data_scene(C); + EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; + RegionView3D *rv3d= CTX_wm_region_view3d(C); EditVert *eve,*nextve; - float nor[3]= {0.0, 0.0, 0.0}; - float *curs, si,n[3],q[4],cmat[3][3],imat[3][3], tmat[3][3]; - float cent[3],bmat[3][3]; + float nor[3]= {0.0f, 0.0f, 0.0f}; + float *curs, si, n[3], q[4], cmat[3][3], imat[3][3], tmat[3][3]; + float cent[3], bmat[3][3]; float phi; - short a,ok; + short a, ok= 1; /* imat and center and size */ Mat3CpyMat4(bmat, obedit->obmat); Mat3Inv(imat,bmat); - curs= give_cursor(NULL, v3d); // XXX + curs= give_cursor(scene, v3d); VECCOPY(cent, curs); cent[0]-= obedit->obmat[3][0]; cent[1]-= obedit->obmat[3][1]; @@ -864,16 +897,17 @@ void spin_mesh(View3D *v3d, Object *obedit, EditMesh *em, int steps, float degr, Mat3MulMat3(tmat,cmat,bmat); Mat3MulMat3(bmat,imat,tmat); - if(mode==0) if(scene->toolsettings->editbutflag & B_KEEPORIG) adduplicateflag(em, 1); - ok= 1; + if(dupli==0) + if(scene->toolsettings->editbutflag & B_KEEPORIG) + adduplicateflag(em, 1); - for(a=0;aptr,"steps"), RNA_float_get(op->ptr,"degrees"), RNA_boolean_get(op->ptr,"dupli")); + if(ok==0) { + BKE_report(op->reports, RPT_ERROR, "No valid vertices are selected"); + return OPERATOR_CANCELLED; + } + return OPERATOR_FINISHED; +} + +void MESH_OT_spin(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Spin"; + ot->idname= "MESH_OT_spin"; + + /* api callbacks */ + ot->exec= spin_mesh_exec; + ot->poll= ED_operator_editmesh; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /*props */ + RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, INT_MAX); + RNA_def_boolean(ot->srna, "dupli", 0, "Dupli", "Make Duplicates"); + RNA_def_float(ot->srna, "degrees", 90.0f, -FLT_MAX, FLT_MAX, "Degrees", "Degrees", -360.0f, 360.0f); +} + +static int screw_mesh_exec(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; EditVert *eve,*v1=0,*v2=0; EditEdge *eed; float dvec[3], nor[3]; + int steps, turns; + turns= RNA_int_get(op->ptr, "turns"); + steps= RNA_int_get(op->ptr, "steps"); + /* clear flags */ - eve= em->verts.first; - while(eve) { + for(eve= em->verts.first; eve; eve= eve->next) eve->f1= 0; - eve= eve->next; - } + /* edges set flags in verts */ - eed= em->edges.first; - while(eed) { + for(eed= em->edges.first; eed; eed= eed->next) { if(eed->v1->f & SELECT) { if(eed->v2->f & SELECT) { /* watch: f1 is a byte */ @@ -924,30 +997,27 @@ void screw_mesh(Object *obedit, EditMesh *em, int steps, int turns) if(eed->v2->f1<2) eed->v2->f1++; } } - eed= eed->next; } /* find two vertices with eve->f1==1, more or less is wrong */ - eve= em->verts.first; - while(eve) { + for(eve= em->verts.first; eve; eve= eve->next) { if(eve->f1==1) { - if(v1==0) v1= eve; - else if(v2==0) v2= eve; + if(v1==NULL) v1= eve; + else if(v2==NULL) v2= eve; else { - v1=0; + v1= NULL; break; } } - eve= eve->next; } - if(v1==0 || v2==0) { - error("You have to select a string of connected vertices too"); - return; + if(v1==NULL || v2==NULL) { + BKE_report(op->reports, RPT_ERROR, "You have to select a string of connected vertices too"); + return OPERATOR_CANCELLED; } /* calculate dvec */ - dvec[0]= ( (v1->co[0]- v2->co[0]) )/(steps); - dvec[1]= ( (v1->co[1]- v2->co[1]) )/(steps); - dvec[2]= ( (v1->co[2]- v2->co[2]) )/(steps); + dvec[0]= ( v1->co[0]- v2->co[0] )/steps; + dvec[1]= ( v1->co[1]- v2->co[1] )/steps; + dvec[2]= ( v1->co[2]- v2->co[2] )/steps; VECCOPY(nor, obedit->obmat[2]); @@ -956,11 +1026,35 @@ void screw_mesh(Object *obedit, EditMesh *em, int steps, int turns) dvec[1]= -dvec[1]; dvec[2]= -dvec[2]; } - - spin_mesh(v3d, obedit, em, turns*steps, turns*360, dvec, 0); - + + if(spin_mesh(C, dvec, turns*steps, 360.0f*turns, 0)) { + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); + + return OPERATOR_FINISHED; + } + else { + BKE_report(op->reports, RPT_ERROR, "No valid vertices are selected"); + return OPERATOR_CANCELLED; + } } +void MESH_OT_screw(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Screw"; + ot->idname= "MESH_OT_screw"; + + /* api callbacks */ + ot->exec= screw_mesh_exec; + ot->poll= ED_operator_editmesh; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /*props */ + RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, 256); + RNA_def_int(ot->srna, "turns", 1, 0, INT_MAX, "Turns", "Turns", 0, 256); +} static void erase_edges(EditMesh *em, ListBase *l) { @@ -1008,7 +1102,7 @@ static void erase_vertices(EditMesh *em, ListBase *l) } } -void delete_mesh(Object *obedit, EditMesh *em, int event) +void delete_mesh(Object *obedit, EditMesh *em, wmOperator *op, int event) { EditFace *efa, *nextvl; EditVert *eve,*nextve; @@ -1042,7 +1136,7 @@ void delete_mesh(Object *obedit, EditMesh *em, int event) MEM_freeN(em2); } else if(event==6) { - if(!EdgeLoopDelete(em)) + if(!EdgeLoopDelete(em, op)) return; str= "Erase Edge Loop"; @@ -1181,7 +1275,7 @@ static int delete_mesh_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - delete_mesh(obedit,em,RNA_enum_get(op->ptr, "type")); + delete_mesh(obedit,em, op,RNA_enum_get(op->ptr, "type")); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); @@ -1207,87 +1301,6 @@ void MESH_OT_delete(wmOperatorType *ot) RNA_def_enum(ot->srna, "type", prop_mesh_delete_types, 10, "Type", "Method used for deleting mesh data"); } -/* Got this from scanfill.c. You will need to juggle around the - * callbacks for the scanfill.c code a bit for this to work. */ -void fill_mesh(EditMesh *em) -{ - EditVert *eve,*v1; - EditEdge *eed,*e1,*nexted; - EditFace *efa,*nextvl, *efan; - short ok; - - if(em==NULL) return; - waitcursor(1); - - /* copy all selected vertices */ - eve= em->verts.first; - while(eve) { - if(eve->f & SELECT) { - v1= BLI_addfillvert(eve->co); - eve->tmp.v= v1; - v1->tmp.v= eve; - v1->xs= 0; // used for counting edges - } - eve= eve->next; - } - /* copy all selected edges */ - eed= em->edges.first; - while(eed) { - if( (eed->v1->f & SELECT) && (eed->v2->f & SELECT) ) { - e1= BLI_addfilledge(eed->v1->tmp.v, eed->v2->tmp.v); - e1->v1->xs++; - e1->v2->xs++; - } - eed= eed->next; - } - /* from all selected faces: remove vertices and edges to prevent doubles */ - /* all edges add values, faces subtract, - then remove edges with vertices ->xs<2 */ - efa= em->faces.first; - ok= 0; - while(efa) { - nextvl= efa->next; - if( faceselectedAND(efa, 1) ) { - efa->v1->tmp.v->xs--; - efa->v2->tmp.v->xs--; - efa->v3->tmp.v->xs--; - if(efa->v4) efa->v4->tmp.v->xs--; - ok= 1; - - } - efa= nextvl; - } - if(ok) { /* there are faces selected */ - eed= filledgebase.first; - while(eed) { - nexted= eed->next; - if(eed->v1->xs<2 || eed->v2->xs<2) { - BLI_remlink(&filledgebase,eed); - } - eed= nexted; - } - } - - if(BLI_edgefill(0, em->mat_nr)) { - efa= fillfacebase.first; - while(efa) { - /* normals default pointing up */ - efan= addfacelist(em, efa->v3->tmp.v, efa->v2->tmp.v, - efa->v1->tmp.v, 0, NULL, NULL); - if(efan) EM_select_face(efan, 1); - efa= efa->next; - } - } - - BLI_end_edgefill(); - - // XXX option beautyfill */ - - WM_cursor_wait(0); - EM_select_flush(em); -// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - -} /*GB*/ /*-------------------------------------------------------------------------------*/ @@ -3053,172 +3066,6 @@ static void free_tagged_edges_faces(EditMesh *em, EditEdge *eed, EditFace *efa) } } -/* note; the EM_selectmode_set() calls here illustrate how badly constructed it all is... from before the - edge/face flags, with very mixed results.... */ -void beauty_fill(EditMesh *em) -{ - EditVert *v1, *v2, *v3, *v4; - EditEdge *eed, *nexted; - EditEdge dia1, dia2; - EditFace *efa, *w; - // void **efaar, **efaa; - EVPTuple *efaar; - EVPtr *efaa; - float len1, len2, len3, len4, len5, len6, opp1, opp2, fac1, fac2; - int totedge, ok, notbeauty=8, onedone, vindex[4]; - - /* - all selected edges with two faces - * - find the faces: store them in edges (using datablock) - * - per edge: - test convex - * - test edge: flip? - * - if true: remedge, addedge, all edges at the edge get new face pointers - */ - - EM_selectmode_set(em); // makes sure in selectmode 'face' the edges of selected faces are selected too - - totedge = count_selected_edges(em->edges.first); - if(totedge==0) return; - - /* temp block with face pointers */ - efaar= (EVPTuple *) MEM_callocN(totedge * sizeof(EVPTuple), "beautyfill"); - - while (notbeauty) { - notbeauty--; - - ok = collect_quadedges(efaar, em->edges.first, em->faces.first); - - /* there we go */ - onedone= 0; - - eed= em->edges.first; - while(eed) { - nexted= eed->next; - - /* f2 is set in collect_quadedges() */ - if(eed->f2==2 && eed->h==0) { - - efaa = (EVPtr *) eed->tmp.p; - - /* none of the faces should be treated before, nor be part of fgon */ - ok= 1; - efa= efaa[0]; - if(efa->e1->f1 || efa->e2->f1 || efa->e3->f1) ok= 0; - if(efa->fgonf) ok= 0; - efa= efaa[1]; - if(efa->e1->f1 || efa->e2->f1 || efa->e3->f1) ok= 0; - if(efa->fgonf) ok= 0; - - if(ok) { - /* test convex */ - givequadverts(efaa[0], efaa[1], &v1, &v2, &v3, &v4, vindex); - if(v1 && v2 && v3 && v4) { - if( convex(v1->co, v2->co, v3->co, v4->co) ) { - - /* test edges */ - if( (v1) > (v3) ) { - dia1.v1= v3; - dia1.v2= v1; - } - else { - dia1.v1= v1; - dia1.v2= v3; - } - - if( (v2) > (v4) ) { - dia2.v1= v4; - dia2.v2= v2; - } - else { - dia2.v1= v2; - dia2.v2= v4; - } - - /* testing rule: - * the area divided by the total edge lengths - */ - - len1= VecLenf(v1->co, v2->co); - len2= VecLenf(v2->co, v3->co); - len3= VecLenf(v3->co, v4->co); - len4= VecLenf(v4->co, v1->co); - len5= VecLenf(v1->co, v3->co); - len6= VecLenf(v2->co, v4->co); - - opp1= AreaT3Dfl(v1->co, v2->co, v3->co); - opp2= AreaT3Dfl(v1->co, v3->co, v4->co); - - fac1= opp1/(len1+len2+len5) + opp2/(len3+len4+len5); - - opp1= AreaT3Dfl(v2->co, v3->co, v4->co); - opp2= AreaT3Dfl(v2->co, v4->co, v1->co); - - fac2= opp1/(len2+len3+len6) + opp2/(len4+len1+len6); - - ok= 0; - if(fac1 > fac2) { - if(dia2.v1==eed->v1 && dia2.v2==eed->v2) { - eed->f1= 1; - efa= efaa[0]; - efa->f1= 1; - efa= efaa[1]; - efa->f1= 1; - - w= EM_face_from_faces(em, efaa[0], efaa[1], - vindex[0], vindex[1], 4+vindex[2], -1); - w->f |= SELECT; - - - w= EM_face_from_faces(em, efaa[0], efaa[1], - vindex[0], 4+vindex[2], 4+vindex[3], -1); - w->f |= SELECT; - - onedone= 1; - } - } - else if(fac1 < fac2) { - if(dia1.v1==eed->v1 && dia1.v2==eed->v2) { - eed->f1= 1; - efa= efaa[0]; - efa->f1= 1; - efa= efaa[1]; - efa->f1= 1; - - - w= EM_face_from_faces(em, efaa[0], efaa[1], - vindex[1], 4+vindex[2], 4+vindex[3], -1); - w->f |= SELECT; - - - w= EM_face_from_faces(em, efaa[0], efaa[1], - vindex[0], 4+vindex[1], 4+vindex[3], -1); - w->f |= SELECT; - - onedone= 1; - } - } - } - } - } - - } - eed= nexted; - } - - free_tagged_edges_faces(em, em->edges.first, em->faces.first); - - if(onedone==0) break; - - EM_selectmode_set(em); // new edges/faces were added - } - - MEM_freeN(efaar); - - EM_select_flush(em); - -// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - -} - /* ******************** BEGIN TRIANGLE TO QUAD ************************************* */ static float measure_facepair(EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4, float limit) @@ -3617,7 +3464,7 @@ void edge_flip(EditMesh *em) } -static void edge_rotate(EditMesh *em, EditEdge *eed,int dir) +static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed,int dir) { EditVert **verts[2]; EditFace *face[2], *efa, *newFace[2]; @@ -3702,7 +3549,7 @@ static void edge_rotate(EditMesh *em, EditEdge *eed,int dir) hiddenedges = MEM_mallocN(sizeof(EditVert*)*numhidden+1, "RotateEdgeHiddenVerts"); if(!hiddenedges) { - error("Malloc Was not happy!"); + BKE_report(op->reports, RPT_ERROR, "Memory allocation failed"); return; } @@ -3831,14 +3678,14 @@ static int edge_rotate_selected(bContext *C, wmOperator *op) if(edgeCount==1) { for(eed= em->edges.first; eed; eed= eed->next) { if(eed->f1==2) { - edge_rotate(em, eed,dir); + edge_rotate(em, op, eed,dir); break; } } } else { - error("Select one edge or two adjacent faces"); + BKE_report(op->reports, RPT_ERROR, "Select one edge or two adjacent faces"); return OPERATOR_CANCELLED; } } @@ -3846,14 +3693,14 @@ static int edge_rotate_selected(bContext *C, wmOperator *op) for(eed= em->edges.first; eed; eed= eed->next) { if(eed->f & SELECT) { EM_select_edge(eed, 0); - edge_rotate(em, eed,dir); + edge_rotate(em, op, eed,dir); break; } } } else { - error("Select one edge or two adjacent faces"); + BKE_report(op->reports, RPT_ERROR, "Select one edge or two adjacent faces"); return OPERATOR_CANCELLED; } @@ -3977,8 +3824,14 @@ typedef struct SlideVert { EditVert origvert; } SlideVert; -int EdgeSlide(EditMesh *em, short immediate, float imperc) +int EdgeSlide(EditMesh *em, wmOperator *op, short immediate, float imperc) { + return 0; +/* XXX REFACTOR - #if 0'd for now, otherwise can't make 64bit windows builds on 64bit machine */ +#if 0 +useless: + goto useless // because it doesn't do anything right now + // NumInput num; XXX Mesh *me= NULL; // XXX EditFace *efa; @@ -4032,7 +3885,7 @@ int EdgeSlide(EditMesh *em, short immediate, float imperc) ct++; efa->e1->f1++; if(efa->e1->f1 > 2) { - error("3+ face edge"); + BKE_report(op->reports, RPT_ERROR, "3+ face edge"); return 0; } } @@ -4040,7 +3893,7 @@ int EdgeSlide(EditMesh *em, short immediate, float imperc) ct++; efa->e2->f1++; if(efa->e2->f1 > 2) { - error("3+ face edge"); + BKE_report(op->reports, RPT_ERROR, "3+ face edge"); return 0; } } @@ -4048,7 +3901,7 @@ int EdgeSlide(EditMesh *em, short immediate, float imperc) ct++; efa->e3->f1++; if(efa->e3->f1 > 2) { - error("3+ face edge"); + BKE_report(op->reports, RPT_ERROR, "3+ face edge"); return 0; } } @@ -4056,13 +3909,13 @@ int EdgeSlide(EditMesh *em, short immediate, float imperc) ct++; efa->e4->f1++; if(efa->e4->f1 > 2) { - error("3+ face edge"); + BKE_report(op->reports, RPT_ERROR, "3+ face edge"); return 0; } } // Make sure loop is not 2 edges of same face if(ct > 1) { - error("loop crosses itself"); + BKE_report(op->reports, RPT_ERROR, "Loop crosses itself"); return 0; } } @@ -4073,7 +3926,7 @@ int EdgeSlide(EditMesh *em, short immediate, float imperc) // Test for multiple segments if(vertsel > numsel+1) { - error("Was not a single edge loop"); + BKE_report(op->reports, RPT_ERROR, "Please choose a single edge loop"); return 0; } @@ -4109,7 +3962,7 @@ int EdgeSlide(EditMesh *em, short immediate, float imperc) // It looks like there was an unexpected case - Hopefully should not happen if(timesthrough >= numsel*2) { BLI_linklist_free(edgelist,NULL); - error("could not order loop"); + BKE_report(op->reports, RPT_ERROR, "Could not order loop"); return 0; } } @@ -4252,7 +4105,7 @@ int EdgeSlide(EditMesh *em, short immediate, float imperc) tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link); if(!tempsv->up || !tempsv->down) { - error("Missing rails"); + BKE_report(op->reports, RPT_ERROR, "Missing rails"); BLI_ghash_free(vertgh, NULL, (GHashValFreeFP)MEM_freeN); BLI_linklist_free(vertlist,NULL); BLI_linklist_free(edgelist,NULL); @@ -4757,9 +4610,10 @@ int EdgeSlide(EditMesh *em, short immediate, float imperc) } return 1; +#endif // END OF XXX } -int EdgeLoopDelete(EditMesh *em) +int EdgeLoopDelete(EditMesh *em, wmOperator *op) { /* temporal flag setting so we keep UVs when deleting edge loops, @@ -4767,7 +4621,7 @@ int EdgeLoopDelete(EditMesh *em) // short uvcalc_flag_orig = 0; // XXX scene->toolsettings->uvcalc_flag; // scene->toolsettings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT; - if(!EdgeSlide(em, 1, 1)) { + if(!EdgeSlide(em, op, 1, 1)) { return 0; } @@ -4783,7 +4637,7 @@ int EdgeLoopDelete(EditMesh *em) /* -------------------- More tools ------------------ */ - +#if 0 void mesh_set_face_flags(EditMesh *em, short mode) { EditFace *efa; @@ -4851,6 +4705,7 @@ void mesh_set_face_flags(EditMesh *em, short mode) } } +#endif void mesh_set_smooth_faces(EditMesh *em, short event) { @@ -4871,13 +4726,15 @@ void mesh_set_smooth_faces(EditMesh *em, short event) } +/* ********************** mesh rip ********************** */ + /* helper to find edge for edge_rip */ -static float mesh_rip_edgedist(float mat[][4], float *co1, float *co2, short *mval) +static float mesh_rip_edgedist(ARegion *ar, float mat[][4], float *co1, float *co2, short *mval) { float vec1[3], vec2[3], mvalf[2]; -// XXX view3d_project_float(curarea, co1, vec1, mat); -// view3d_project_float(curarea, co2, vec2, mat); + view3d_project_float(ar, co1, vec1, mat); + view3d_project_float(ar, co2, vec2, mat); mvalf[0]= (float)mval[0]; mvalf[1]= (float)mval[1]; @@ -4905,14 +4762,18 @@ static void mesh_rip_setface(EditMesh *em, EditFace *sefa) } /* based on mouse cursor position, it defines how is being ripped */ -void mesh_rip(EditMesh *em) +static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) { - extern void faceloop_select(EditEdge *startedge, int select); + ARegion *ar= CTX_wm_region(C); + RegionView3D *rv3d= ar->regiondata; + Object *obedit= CTX_data_edit_object(C); + EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; EditVert *eve, *nextve; EditEdge *eed, *seed= NULL; EditFace *efa, *sefa= NULL; - float projectMat[4][4], vec[3], dist, mindist; // viewMat[4][4], XXX - short doit= 1, mval[2]; // XXX ,propmode,prop; + float projectMat[4][4], vec[3], dist, mindist, viewMat[4][4]; + short doit= 1, *mval= event->mval; // XXX ,propmode,prop; + // XXX propmode = scene->prop_mode; // scene->prop_mode = 0; @@ -4922,8 +4783,7 @@ void mesh_rip(EditMesh *em) /* select flush... vertices are important */ EM_selectmode_set(em); -// XXX getmouseco_areawin(mval); -// view3d_get_object_project_mat(curarea, obedit, projectMat, viewMat); + view3d_get_object_project_mat(rv3d, obedit, projectMat, viewMat); /* find best face, exclude triangles and break on face select or faces with 2 edges select */ mindist= 1000000.0f; @@ -4940,7 +4800,7 @@ void mesh_rip(EditMesh *em) if(totsel>1) break; -// view3d_project_float(curarea, efa->cent, vec, projectMat); + view3d_project_float(ar, efa->cent, vec, projectMat); dist= sqrt( (vec[0]-mval[0])*(vec[0]-mval[0]) + (vec[1]-mval[1])*(vec[1]-mval[1]) ); if(distreports, RPT_ERROR, "Can't perform ripping with faces selected this way"); + return OPERATOR_CANCELLED; } if(sefa==NULL) { - error("No proper selection or faces included"); - return; + BKE_report(op->reports, RPT_ERROR, "No proper selection or faces included"); + return OPERATOR_CANCELLED; } @@ -4980,7 +4840,7 @@ void mesh_rip(EditMesh *em) if(seed==NULL) { mindist= 1000000.0f; if(sefa->e1->v1->tmp.v || sefa->e1->v2->tmp.v) { - dist = mesh_rip_edgedist(projectMat, + dist = mesh_rip_edgedist(ar, projectMat, sefa->e1->v1->co, sefa->e1->v2->co, mval); if(diste2->v1->tmp.v || sefa->e2->v2->tmp.v) { - dist = mesh_rip_edgedist(projectMat, + dist = mesh_rip_edgedist(ar, projectMat, sefa->e2->v1->co, sefa->e2->v2->co, mval); if(diste3->v1->tmp.v || sefa->e3->v2->tmp.v) { - dist= mesh_rip_edgedist(projectMat, + dist= mesh_rip_edgedist(ar, projectMat, sefa->e3->v1->co, sefa->e3->v2->co, mval); if(diste4 && (sefa->e4->v1->tmp.v || sefa->e4->v2->tmp.v)) { - dist= mesh_rip_edgedist(projectMat, + dist= mesh_rip_edgedist(ar, projectMat, sefa->e4->v1->co, sefa->e4->v2->co, mval); if(distreports, RPT_ERROR, "No proper edge found to start"); + return OPERATOR_CANCELLED; } - faceloop_select(seed, 2); // tmp abuse for finding all edges that need duplicated, returns OK faces with f1 + faceloop_select(em, seed, 2); // tmp abuse for finding all edges that need duplicated, returns OK faces with f1 /* duplicate edges in the loop, with at least 1 vertex selected, needed for selection flip */ for(eed = em->edges.last; eed; eed= eed->prev) { @@ -5033,8 +4893,9 @@ void mesh_rip(EditMesh *em) newed= addedgelist(em, eed->v1->tmp.v?eed->v1->tmp.v:eed->v1, eed->v2->tmp.v?eed->v2->tmp.v:eed->v2, eed); if(eed->f & SELECT) { - eed->f &= ~SELECT; - newed->f |= SELECT; + EM_select_edge(eed, 0); + EM_remove_selection(em, eed, EDITEDGE); + EM_select_edge(newed, 1); } eed->tmp.v = (EditVert *)newed; } @@ -5101,15 +4962,36 @@ void mesh_rip(EditMesh *em) } } -// BIF_TransformSetUndo("Rip"); -// initTransform(TFM_TRANSLATION, 0); -// Transform(); - + RNA_int_set(op->ptr, "mode", TFM_TRANSLATION); + WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr); + // scene->prop_mode = propmode; // XXX scene->proportional = prop; + + return OPERATOR_FINISHED; } -void shape_propagate(Scene *scene, Object *obedit, EditMesh *em) +void MESH_OT_rip(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Rip"; + ot->idname= "MESH_OT_rip"; + + /* api callbacks */ + ot->invoke= mesh_rip_invoke; + ot->poll= ED_operator_editmesh; // XXX + v3d! + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* to give to transform */ + RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX); +} + + +/* ************************************** */ + +void shape_propagate(Scene *scene, Object *obedit, EditMesh *em, wmOperator *op) { EditVert *ev = NULL; Mesh* me = (Mesh*)obedit->data; @@ -5121,7 +5003,7 @@ void shape_propagate(Scene *scene, Object *obedit, EditMesh *em) if(me->key){ ky = me->key; } else { - error("Object Has No Key"); + BKE_report(op->reports, RPT_ERROR, "Object Has No Key"); return; } @@ -5136,7 +5018,7 @@ void shape_propagate(Scene *scene, Object *obedit, EditMesh *em) } } } else { - error("Object Has No Blendshapes"); + BKE_report(op->reports, RPT_ERROR, "Object Has No Blendshapes"); return; } @@ -5233,7 +5115,7 @@ void shape_copy_from_lerp(EditMesh *em, KeyBlock* thisBlock, KeyBlock* fromBlock -void shape_copy_select_from(Object *obedit, EditMesh *em) +void shape_copy_select_from(Object *obedit, EditMesh *em, wmOperator *op) { Mesh* me = (Mesh*)obedit->data; EditVert *ev = NULL; @@ -5247,7 +5129,7 @@ void shape_copy_select_from(Object *obedit, EditMesh *em) if(me->key){ ky = me->key; } else { - error("Object Has No Key"); + BKE_report(op->reports, RPT_ERROR, "Object Has No Key"); return; } @@ -5272,7 +5154,7 @@ void shape_copy_select_from(Object *obedit, EditMesh *em) // XXX nr = pupmenu_col(menu, 20); MEM_freeN(menu); } else { - error("Object Has No Blendshapes"); + BKE_report(op->reports, RPT_ERROR, "Object Has No Blendshapes"); return; } @@ -5286,7 +5168,7 @@ void shape_copy_select_from(Object *obedit, EditMesh *em) } if(me->totvert != totverts){ - error("Shape Has had Verts Added/Removed, please cycle editmode before copying"); + BKE_report(op->reports, RPT_ERROR, "Shape Has had Verts Added/Removed, please cycle editmode before copying"); return; } shape_copy_from_lerp(em, thisBlock,kb); @@ -5864,7 +5746,7 @@ typedef struct PathEdge{ float w; } PathEdge; -void pathselect(EditMesh *em) +void pathselect(EditMesh *em, wmOperator *op) { EditVert *eve, *s, *t; EditEdge *eed; @@ -6016,7 +5898,7 @@ void pathselect(EditMesh *em) } } else{ - error("Path Selection requires that exactly two vertices be selected"); + BKE_report(op->reports, RPT_ERROR, "Path Selection requires that exactly two vertices be selected"); return; } } @@ -6025,7 +5907,6 @@ static int region_to_loop(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - EditEdge *eed; EditFace *efa; @@ -6268,7 +6149,7 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op) int shift = 0; // XXX if (!EM_texFaceCheck(em)) { - error("mesh has no uv/image layers"); + BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers"); return OPERATOR_CANCELLED; } @@ -6340,7 +6221,7 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op) int shift= 0; // XXX if (!EM_texFaceCheck(em)) { - error("mesh has no uv/image layers"); + BKE_report(op->reports, RPT_ERROR, "mesh has no uv/image layers"); return OPERATOR_CANCELLED; } @@ -6425,7 +6306,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op) int shift= 0; // XXX if (!EM_vertColorCheck(em)) { - error("mesh has no color layers"); + BKE_report(op->reports, RPT_ERROR, "mesh has no color layers"); return OPERATOR_CANCELLED; } @@ -6480,7 +6361,7 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op) int shift= 0; // XXX if (!EM_vertColorCheck(em)) { - error("mesh has no color layers"); + BKE_report(op->reports, RPT_ERROR, "Mesh has no color layers"); return OPERATOR_CANCELLED; } @@ -6760,12 +6641,260 @@ void MESH_OT_subdivs(wmOperatorType *ot) } +/* ************************************* */ + +/* note; the EM_selectmode_set() calls here illustrate how badly constructed it all is... from before the +edge/face flags, with very mixed results.... */ +static void beauty_fill(EditMesh *em) +{ + EditVert *v1, *v2, *v3, *v4; + EditEdge *eed, *nexted; + EditEdge dia1, dia2; + EditFace *efa, *w; + // void **efaar, **efaa; + EVPTuple *efaar; + EVPtr *efaa; + float len1, len2, len3, len4, len5, len6, opp1, opp2, fac1, fac2; + int totedge, ok, notbeauty=8, onedone, vindex[4]; + + /* - all selected edges with two faces + * - find the faces: store them in edges (using datablock) + * - per edge: - test convex + * - test edge: flip? + * - if true: remedge, addedge, all edges at the edge get new face pointers + */ + + EM_selectmode_set(em); // makes sure in selectmode 'face' the edges of selected faces are selected too + + totedge = count_selected_edges(em->edges.first); + if(totedge==0) return; + + /* temp block with face pointers */ + efaar= (EVPTuple *) MEM_callocN(totedge * sizeof(EVPTuple), "beautyfill"); + + while (notbeauty) { + notbeauty--; + + ok = collect_quadedges(efaar, em->edges.first, em->faces.first); + + /* there we go */ + onedone= 0; + + eed= em->edges.first; + while(eed) { + nexted= eed->next; + + /* f2 is set in collect_quadedges() */ + if(eed->f2==2 && eed->h==0) { + + efaa = (EVPtr *) eed->tmp.p; + + /* none of the faces should be treated before, nor be part of fgon */ + ok= 1; + efa= efaa[0]; + if(efa->e1->f1 || efa->e2->f1 || efa->e3->f1) ok= 0; + if(efa->fgonf) ok= 0; + efa= efaa[1]; + if(efa->e1->f1 || efa->e2->f1 || efa->e3->f1) ok= 0; + if(efa->fgonf) ok= 0; + + if(ok) { + /* test convex */ + givequadverts(efaa[0], efaa[1], &v1, &v2, &v3, &v4, vindex); + if(v1 && v2 && v3 && v4) { + if( convex(v1->co, v2->co, v3->co, v4->co) ) { + + /* test edges */ + if( (v1) > (v3) ) { + dia1.v1= v3; + dia1.v2= v1; + } + else { + dia1.v1= v1; + dia1.v2= v3; + } + + if( (v2) > (v4) ) { + dia2.v1= v4; + dia2.v2= v2; + } + else { + dia2.v1= v2; + dia2.v2= v4; + } + + /* testing rule: + * the area divided by the total edge lengths + */ + + len1= VecLenf(v1->co, v2->co); + len2= VecLenf(v2->co, v3->co); + len3= VecLenf(v3->co, v4->co); + len4= VecLenf(v4->co, v1->co); + len5= VecLenf(v1->co, v3->co); + len6= VecLenf(v2->co, v4->co); + + opp1= AreaT3Dfl(v1->co, v2->co, v3->co); + opp2= AreaT3Dfl(v1->co, v3->co, v4->co); + + fac1= opp1/(len1+len2+len5) + opp2/(len3+len4+len5); + + opp1= AreaT3Dfl(v2->co, v3->co, v4->co); + opp2= AreaT3Dfl(v2->co, v4->co, v1->co); + + fac2= opp1/(len2+len3+len6) + opp2/(len4+len1+len6); + + ok= 0; + if(fac1 > fac2) { + if(dia2.v1==eed->v1 && dia2.v2==eed->v2) { + eed->f1= 1; + efa= efaa[0]; + efa->f1= 1; + efa= efaa[1]; + efa->f1= 1; + + w= EM_face_from_faces(em, efaa[0], efaa[1], + vindex[0], vindex[1], 4+vindex[2], -1); + w->f |= SELECT; + + + w= EM_face_from_faces(em, efaa[0], efaa[1], + vindex[0], 4+vindex[2], 4+vindex[3], -1); + w->f |= SELECT; + + onedone= 1; + } + } + else if(fac1 < fac2) { + if(dia1.v1==eed->v1 && dia1.v2==eed->v2) { + eed->f1= 1; + efa= efaa[0]; + efa->f1= 1; + efa= efaa[1]; + efa->f1= 1; + + + w= EM_face_from_faces(em, efaa[0], efaa[1], + vindex[1], 4+vindex[2], 4+vindex[3], -1); + w->f |= SELECT; + + + w= EM_face_from_faces(em, efaa[0], efaa[1], + vindex[0], 4+vindex[1], 4+vindex[3], -1); + w->f |= SELECT; + + onedone= 1; + } + } + } + } + } + + } + eed= nexted; + } + + free_tagged_edges_faces(em, em->edges.first, em->faces.first); + + if(onedone==0) break; + + EM_selectmode_set(em); // new edges/faces were added + } + + MEM_freeN(efaar); + + EM_select_flush(em); + +} + +/* Got this from scanfill.c. You will need to juggle around the +* callbacks for the scanfill.c code a bit for this to work. */ +static void fill_mesh(EditMesh *em) +{ + EditVert *eve,*v1; + EditEdge *eed,*e1,*nexted; + EditFace *efa,*nextvl, *efan; + short ok; + + if(em==NULL) return; + waitcursor(1); + + /* copy all selected vertices */ + eve= em->verts.first; + while(eve) { + if(eve->f & SELECT) { + v1= BLI_addfillvert(eve->co); + eve->tmp.v= v1; + v1->tmp.v= eve; + v1->xs= 0; // used for counting edges + } + eve= eve->next; + } + /* copy all selected edges */ + eed= em->edges.first; + while(eed) { + if( (eed->v1->f & SELECT) && (eed->v2->f & SELECT) ) { + e1= BLI_addfilledge(eed->v1->tmp.v, eed->v2->tmp.v); + e1->v1->xs++; + e1->v2->xs++; + } + eed= eed->next; + } + /* from all selected faces: remove vertices and edges to prevent doubles */ + /* all edges add values, faces subtract, + then remove edges with vertices ->xs<2 */ + efa= em->faces.first; + ok= 0; + while(efa) { + nextvl= efa->next; + if( faceselectedAND(efa, 1) ) { + efa->v1->tmp.v->xs--; + efa->v2->tmp.v->xs--; + efa->v3->tmp.v->xs--; + if(efa->v4) efa->v4->tmp.v->xs--; + ok= 1; + + } + efa= nextvl; + } + if(ok) { /* there are faces selected */ + eed= filledgebase.first; + while(eed) { + nexted= eed->next; + if(eed->v1->xs<2 || eed->v2->xs<2) { + BLI_remlink(&filledgebase,eed); + } + eed= nexted; + } + } + + if(BLI_edgefill(0, em->mat_nr)) { + efa= fillfacebase.first; + while(efa) { + /* normals default pointing up */ + efan= addfacelist(em, efa->v3->tmp.v, efa->v2->tmp.v, + efa->v1->tmp.v, 0, NULL, NULL); + if(efan) EM_select_face(efan, 1); + efa= efa->next; + } + } + + BLI_end_edgefill(); + beauty_fill(em); + + WM_cursor_wait(0); + EM_select_flush(em); + +} + + static int fill_mesh_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; fill_mesh(em); + DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); @@ -6792,7 +6921,7 @@ static int beauty_fill_exec(bContext *C, wmOperator *op) Object *obedit= CTX_data_edit_object(C); EditMesh *em= ((Mesh *)obedit->data)->edit_mesh; - beauty_fill(em); + beauty_fill(em); WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 20366427767..0a5b97eeabd 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -187,6 +187,7 @@ void editmesh_select_by_material(EditMesh *em, int index); void righthandfaces(EditMesh *em, int select); /* makes faces righthand turning */ void EM_select_more(EditMesh *em); void selectconnected_mesh_all(EditMesh *em); +void faceloop_select(EditMesh *em, EditEdge *startedge, int select); /** * findnearestvert @@ -210,7 +211,7 @@ extern EditVert *findnearestvert(struct ViewContext *vc, int *dist, short sel, s void join_triangles(EditMesh *em); int removedoublesflag(EditMesh *em, short flag, short automerge, float limit); /* return amount */ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float rad, int beauty, int numcuts, int seltype); -int EdgeSlide(EditMesh *em, short immediate, float imperc); +int EdgeSlide(EditMesh *em, struct wmOperator *op, short immediate, float imperc); void MESH_OT_subdivs(struct wmOperatorType *ot); void MESH_OT_subdivide(struct wmOperatorType *ot); @@ -219,6 +220,8 @@ void MESH_OT_subdivide_multi_fractal(struct wmOperatorType *ot); void MESH_OT_subdivide_smooth(struct wmOperatorType *ot); void MESH_OT_removedoublesflag(struct wmOperatorType *ot); void MESH_OT_extrude(struct wmOperatorType *ot); +void MESH_OT_spin(struct wmOperatorType *ot); +void MESH_OT_screw(struct wmOperatorType *ot); void MESH_OT_fill(struct wmOperatorType *ot); void MESH_OT_beauty_fill(struct wmOperatorType *ot); @@ -239,6 +242,7 @@ void MESH_OT_rotate_colors(struct wmOperatorType *ot); void MESH_OT_mirror_colors(struct wmOperatorType *ot); void MESH_OT_delete(struct wmOperatorType *ot); +void MESH_OT_rip(struct wmOperatorType *ot); #endif // MESH_INTERN_H diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 06e07dc0026..05cc377c6f3 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -140,6 +140,9 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_add_duplicate); WM_operatortype_append(MESH_OT_removedoublesflag); WM_operatortype_append(MESH_OT_extrude); + WM_operatortype_append(MESH_OT_spin); + WM_operatortype_append(MESH_OT_screw); + WM_operatortype_append(MESH_OT_vertices_to_sphere); WM_operatortype_append(MESH_OT_split_mesh); WM_operatortype_append(MESH_OT_extrude_repeat); @@ -177,6 +180,7 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_flip_editnormals); WM_operatortype_append(MESH_OT_knife_cut); + WM_operatortype_append(MESH_OT_rip); WM_operatortype_append(MESH_OT_bmesh_test); } @@ -222,27 +226,24 @@ void ED_keymap_mesh(wmWindowManager *wm) WM_keymap_add_item(keymap, "MESH_OT_mark_sharp", TWOKEY, KM_PRESS, KM_CTRL , 0); RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_mark_sharp", TWOKEY, KM_PRESS, KM_ALT , 0)->ptr,"set",1); - WM_keymap_add_item(keymap, "MESH_OT_smooth_vertex", THREEKEY, KM_PRESS, KM_CTRL , 0); - - WM_keymap_add_item(keymap, "MESH_OT_flip_editnormals", THREEKEY, KM_PRESS, KM_ALT , 0); - /* temp hotkeys! */ WM_keymap_add_item(keymap, "MESH_OT_similar_vertex_select", GKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "MESH_OT_similar_edge_select", GKEY, KM_PRESS, KM_SHIFT2|KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_similar_face_select", GKEY, KM_PRESS, KM_SHIFT|KM_CTRL2, 0); /* selection mode */ - WM_keymap_add_item(keymap, "MESH_OT_selection_type", TABKEY, KM_PRESS, KM_CTRL, 0); /* hide */ WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "invert", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); WM_keymap_add_item(keymap, "MESH_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); /* tools */ WM_keymap_add_item(keymap, "MESH_OT_consistant_normals", NKEY, KM_PRESS, KM_CTRL, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "MESH_OT_consistant_normals", NKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "inside", 1); + WM_keymap_add_item(keymap, "MESH_OT_smooth_vertex", THREEKEY, KM_PRESS, KM_CTRL , 0); + WM_keymap_add_item(keymap, "MESH_OT_flip_editnormals", THREEKEY, KM_PRESS, KM_ALT , 0); WM_keymap_add_item(keymap, "MESH_OT_subdivs", WKEY, KM_PRESS, 0, 0); // this is the menu /*WM_keymap_add_item(keymap, "MESH_OT_subdivide_multi", WKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); @@ -251,6 +252,9 @@ void ED_keymap_mesh(wmWindowManager *wm) WM_keymap_add_item(keymap, "MESH_OT_removedoublesflag", VKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_extrude", EKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "MESH_OT_spin", RKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "MESH_OT_screw", NINEKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "VIEW3D_OT_editmesh_face_toolbox", FKEY, KM_PRESS, KM_CTRL, 0); /* operators below are in this toolbox */ WM_keymap_add_item(keymap, "MESH_OT_fill", FKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "MESH_OT_beauty_fill", FKEY, KM_PRESS, KM_ALT, 0); @@ -269,9 +273,8 @@ void ED_keymap_mesh(wmWindowManager *wm) WM_keymap_add_item(keymap, "MESH_OT_rotate_colors",EIGHTKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_mirror_colors",EIGHTKEY, KM_PRESS, KM_ALT, 0); - - - + WM_keymap_add_item(keymap, "MESH_OT_rip",VKEY, KM_PRESS, 0, 0); + /* add/remove */ WM_keymap_add_item(keymap, "MESH_OT_add_edge_face", FKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MESH_OT_add_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index aef22bb7e83..22857b0718b 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -47,6 +47,7 @@ #include "DNA_space_types.h" #include "DNA_view3d_types.h" #include "DNA_world_types.h" +#include "DNA_windowmanager_types.h" #include "BLI_arithb.h" #include "BLI_blenlib.h" @@ -67,6 +68,7 @@ #include "BKE_material.h" #include "BKE_object.h" #include "BKE_utildefines.h" +#include "BKE_report.h" #include "RE_pipeline.h" #include "RE_shader_ext.h" @@ -103,7 +105,7 @@ static int pupmenu() {return 0;} /* join selected meshes into the active mesh, context sensitive return 0 if no join is made (error) and 1 of the join is done */ -int join_mesh(Scene *scene, View3D *v3d) +int join_mesh(Scene *scene, View3D *v3d, wmOperator *op) { Base *base, *nextb; Object *ob; @@ -154,11 +156,11 @@ int join_mesh(Scene *scene, View3D *v3d) } if(haskey) { - error("Can't join meshes with vertex keys"); + BKE_report(op->reports, RPT_ERROR, "Can't join meshes with vertex keys"); return 0; } if(hasmulti) { - error("Can't join meshes with Multires"); + BKE_report(op->reports, RPT_ERROR, "Can't join meshes with Multires"); return 0; } /* that way the active object is always selected */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index aeddff72539..6e2b38acd8d 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -112,7 +112,7 @@ #include "ED_anim_api.h" #include "ED_armature.h" #include "ED_curve.h" -#include "ED_editparticle.h" +#include "ED_particle.h" #include "ED_mesh.h" #include "ED_object.h" #include "ED_screen.h" @@ -139,7 +139,6 @@ #include "object_intern.h" // own include /* ************* XXX **************** */ -static void allqueue() {} static void error() {} static void waitcursor() {} static int pupmenu() {return 0;} @@ -190,7 +189,6 @@ void ED_base_object_activate(bContext *C, Base *base) if(base) { /* XXX old signals, remember to handle notifiers now! */ - // allqueue(REDRAWIPO, base->object->ipowin); // select_actionchannel_by_name(base->object->action, "Object", 1); /* disable temporal locks */ @@ -444,8 +442,9 @@ static int object_add_curve_exec(bContext *C, wmOperator *op) } else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); - nu= addNurbprim(C, RNA_enum_get(op->ptr, "type"), newob); - editnurb= curve_get_editcurve(CTX_data_edit_object(C)); + obedit= CTX_data_edit_object(C); + nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob); + editnurb= curve_get_editcurve(obedit); BLI_addtail(editnurb, nu); /* userdef */ @@ -458,6 +457,21 @@ static int object_add_curve_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +static int object_add_curve_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + Object *obedit= CTX_data_edit_object(C); + uiMenuItem *head; + + head= uiPupMenuBegin(op->type->name, 0); + if(!obedit || obedit->type == OB_CURVE) + uiMenuItemsEnumO(head, op->type->idname, "type"); + else + uiMenuItemsEnumO(head, "OBJECT_OT_surface_add", "type"); + uiPupMenuEnd(C, head); + + return OPERATOR_CANCELLED; +} + void OBJECT_OT_curve_add(wmOperatorType *ot) { /* identifiers */ @@ -465,7 +479,7 @@ void OBJECT_OT_curve_add(wmOperatorType *ot) ot->idname= "OBJECT_OT_curve_add"; /* api callbacks */ - ot->invoke= WM_menu_invoke; + ot->invoke= object_add_curve_invoke; ot->exec= object_add_curve_exec; ot->poll= ED_operator_scene_editable; @@ -476,6 +490,94 @@ void OBJECT_OT_curve_add(wmOperatorType *ot) RNA_def_enum(ot->srna, "type", prop_curve_types, 0, "Primitive", ""); } +static EnumPropertyItem prop_surface_types[]= { + {CU_PRIM_CURVE|CU_NURBS, "NURBS_CURVE", "NURBS Curve", ""}, + {CU_PRIM_CIRCLE|CU_NURBS, "NURBS_CIRCLE", "NURBS Circle", ""}, + {CU_PRIM_PATCH|CU_NURBS, "NURBS_SURFACE", "NURBS Surface", ""}, + {CU_PRIM_TUBE|CU_NURBS, "NURBS_TUBE", "NURBS Tube", ""}, + {CU_PRIM_SPHERE|CU_NURBS, "NURBS_SPHERE", "NURBS Sphere", ""}, + {CU_PRIM_DONUT|CU_NURBS, "NURBS_DONUT", "NURBS Donut", ""}, + {0, NULL, NULL, NULL} +}; + +static int object_add_surface_exec(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + ListBase *editnurb; + Nurb *nu; + int newob= 0; + + if(obedit==NULL || obedit->type!=OB_SURF) { + object_add_type(C, OB_SURF); + ED_object_enter_editmode(C, 0); + newob = 1; + } + else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); + + obedit= CTX_data_edit_object(C); + nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob); + editnurb= curve_get_editcurve(obedit); + BLI_addtail(editnurb, nu); + + /* userdef */ + if (newob && (U.flag & USER_ADD_EDITMODE)==0) { + ED_object_exit_editmode(C, EM_FREEDATA); + } + + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_surface_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Surface"; + ot->idname= "OBJECT_OT_surface_add"; + + /* api callbacks */ + ot->invoke= WM_menu_invoke; + ot->exec= object_add_surface_exec; + + ot->poll= ED_operator_scene_editable; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_enum(ot->srna, "type", prop_surface_types, 0, "Primitive", ""); +} + +static int object_add_text_exec(bContext *C, wmOperator *op) +{ + Object *obedit= CTX_data_edit_object(C); + + if(obedit && obedit->type==OB_FONT) + return OPERATOR_CANCELLED; + + object_add_type(C, OB_FONT); + obedit= CTX_data_active_object(C); + + if(U.flag & USER_ADD_EDITMODE) + ED_object_enter_editmode(C, 0); + + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); + + return OPERATOR_FINISHED; +} + +void OBJECT_OT_text_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Text"; + ot->idname= "OBJECT_OT_text_add"; + + /* api callbacks */ + ot->exec= object_add_text_exec; + ot->poll= ED_operator_scene_editable; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} static int object_add_armature_exec(bContext *C, wmOperator *op) { @@ -489,7 +591,7 @@ static int object_add_armature_exec(bContext *C, wmOperator *op) } else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA); - //nu= addNurbprim(C, RNA_enum_get(op->ptr, "type"), newob); + //nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob); //editnurb= curve_get_editcurve(CTX_data_edit_object(C)); //BLI_addtail(editnurb, nu); @@ -524,12 +626,13 @@ static int object_add_primitive_invoke(bContext *C, wmOperator *op, wmEvent *eve uiMenuLevelEnumO(head, "OBJECT_OT_mesh_add", "type"); uiMenuLevelEnumO(head, "OBJECT_OT_curve_add", "type"); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_SURF); + uiMenuLevelEnumO(head, "OBJECT_OT_surface_add", "type"); + uiMenuItemO(head, 0, "OBJECT_OT_text_add"); uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_MBALL); uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_CAMERA); uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_LAMP); uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_EMPTY); - uiMenuItemEnumO(head, "", 0, "OBJECT_OT_armature_add", "type", OB_ARMATURE); + uiMenuItemO(head, 0, "OBJECT_OT_armature_add"); uiMenuItemEnumO(head, "", 0, "OBJECT_OT_object_add", "type", OB_LATTICE); uiPupMenuEnd(C, head); @@ -1250,10 +1353,6 @@ void add_hook_menu(Scene *scene, View3D *v3d) /* do operations */ add_hook(scene, v3d, mode); - - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSOBJECT, 0); - } /* ******************** clear parent operator ******************* */ @@ -1671,7 +1770,7 @@ static int object_select_random_exec(bContext *C, wmOperator *op) { float percent; - percent = RNA_float_get(op->ptr, "percent") / 100.0f; + percent = RNA_float_get(op->ptr, "percent"); CTX_DATA_BEGIN(C, Base*, base, visible_bases) { if ((!base->flag & SELECT && BLI_frand() < percent)) { @@ -1699,7 +1798,7 @@ void OBJECT_OT_select_random(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_float(ot->srna, "percent", 50.0f, 0.0f, 100.0f, "Percent", "percentage of objects to randomly select", 0.01f, 100.0f); + RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "percentage of objects to randomly select", 0.0001f, 1.0f); } /* ******** Clear object Translation *********** */ @@ -2193,7 +2292,6 @@ void make_vertex_parent(Scene *scene, Object *obedit, View3D *v3d) } } } - allqueue(REDRAWVIEW3D, 0); DAG_scene_sort(scene); } @@ -2280,7 +2378,6 @@ void make_proxy(Scene *scene) DAG_scene_sort(scene); DAG_object_flush_update(scene, newob, OB_RECALC); - allqueue(REDRAWALL, 0); } } @@ -2946,7 +3043,6 @@ static int object_set_center_exec(bContext *C, wmOperator *op) cu->xof /= cu->fsize; cu->yof /= cu->fsize; - allqueue(REDRAWBUTSEDIT, 0); tot_change++; } } @@ -2980,7 +3076,6 @@ static int object_set_center_exec(bContext *C, wmOperator *op) if (tot_change) { ED_anim_dag_flush_update(C); - allqueue(REDRAWVIEW3D, 0); } /* Warn if any errors occured */ @@ -3272,11 +3367,6 @@ void movetolayer(Scene *scene, View3D *v3d) DAG_scene_sort(scene); - allqueue(REDRAWBUTSEDIT, 0); - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWINFO, 0); - } @@ -3401,9 +3491,6 @@ static void spot_interactive(Object *ob, int mode) la->clipend= origval; } - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSSHADING, 0); - BIF_preview_changed(ID_LA); } #endif @@ -3413,7 +3500,7 @@ void special_editmenu(Scene *scene, View3D *v3d) Object *ob= OBACT; Object *obedit= NULL; // XXX float fac; - int nr,ret; + int nr,ret=0; short randfac; if(ob==NULL) return; @@ -3468,8 +3555,6 @@ void special_editmenu(Scene *scene, View3D *v3d) } } DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSEDIT, 0); } else if(G.f & G_VERTEXPAINT) { Mesh *me= get_mesh(ob); @@ -3591,7 +3676,6 @@ void special_editmenu(Scene *scene, View3D *v3d) } } - allqueue(REDRAWVIEW3D, 0); } else if (ob->type == OB_FONT) { /* removed until this gets a decent implementation (ton) */ @@ -3778,8 +3862,6 @@ void special_editmenu(Scene *scene, View3D *v3d) } } - allqueue(REDRAWVIEW3D, 0); - } static void curvetomesh(Scene *scene, Object *ob) @@ -4013,10 +4095,6 @@ void convertmenu(Scene *scene, View3D *v3d) // XXX exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */ BASACT= basact; - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWOOPS, 0); -// allspace(OOPS_TEST, 0); - allqueue(REDRAWBUTSEDIT, 0); DAG_scene_sort(scene); } @@ -4155,10 +4233,6 @@ void flip_subdivison(Scene *scene, View3D *v3d, int level) } } - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWBUTSEDIT, 0); - allqueue(REDRAWBUTSOBJECT, 0); ED_anim_dag_flush_update(C); } @@ -4219,7 +4293,6 @@ static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob) } } MEM_freeN(str); - allqueue(REDRAWVIEW3D, 0); } @@ -4354,8 +4427,6 @@ static void copymenu_modifiers(Scene *scene, View3D *v3d, Object *ob) // if(errorstr) notice(errorstr); - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSOBJECT, 0); DAG_scene_sort(scene); } @@ -4645,16 +4716,11 @@ void copy_attr(Scene *scene, View3D *v3d, short event) } } - allqueue(REDRAWVIEW3D, 0); if(do_scene_sort) DAG_scene_sort(scene); ED_anim_dag_flush_update(C); - if(event==20) { - allqueue(REDRAWBUTSOBJECT, 0); - } - } void copy_attr_menu(Scene *scene, View3D *v3d) @@ -4853,10 +4919,6 @@ void make_links(Scene *scene, View3D *v3d, short event) } } - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWBUTSHEAD, 0); - ED_anim_dag_flush_update(C); } @@ -5085,7 +5147,6 @@ static void apply_objects_internal(Scene *scene, View3D *v3d, int apply_scale, i } } if (change) { - allqueue(REDRAWVIEW3D, 0); } } @@ -5124,7 +5185,6 @@ void apply_objects_visual_tx( Scene *scene, View3D *v3d ) } } if (change) { - allqueue(REDRAWVIEW3D, 0); } } @@ -5548,7 +5608,6 @@ void single_user(Scene *scene, View3D *v3d) clear_id_newpoins(); - allqueue(REDRAWALL, 0); } } @@ -5593,7 +5652,6 @@ void make_local(Scene *scene, View3D *v3d, int mode) if(mode==3) { all_local(NULL, 0); /* NULL is all libs */ - allqueue(REDRAWALL, 0); return; } else if(mode<1) return; @@ -5719,7 +5777,6 @@ void make_local(Scene *scene, View3D *v3d, int mode) } } - allqueue(REDRAWALL, 0); } void make_local_menu(Scene *scene, View3D *v3d) @@ -6078,7 +6135,6 @@ void image_aspect(Scene *scene, View3D *v3d) } } - allqueue(REDRAWVIEW3D, 0); } void set_ob_ipoflags(Scene *scene, View3D *v3d) @@ -6113,12 +6169,6 @@ void set_ob_ipoflags(Scene *scene, View3D *v3d) } } } - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSOBJECT, 0); - allqueue(REDRAWNLA, 0); - allqueue (REDRAWACTION, 0); -// allspace(REMAKEIPO, 0); - allqueue(REDRAWIPO, 0); #endif // XXX old animation system } @@ -6161,11 +6211,6 @@ void select_select_keys(Scene *scene, View3D *v3d) } } - allqueue(REDRAWNLA, 0); - allqueue(REDRAWACTION, 0); - allqueue(REDRAWVIEW3D, 0); -// allspace(REMAKEIPO, 0); - allqueue(REDRAWIPO, 0); #endif // XXX old animation system } @@ -6226,8 +6271,6 @@ void auto_timeoffs(Scene *scene, View3D *v3d) } MEM_freeN(basesort); - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSOBJECT, 0); } void ofs_timeoffs(Scene *scene, View3D *v3d) @@ -6248,8 +6291,6 @@ void ofs_timeoffs(Scene *scene, View3D *v3d) } } - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSOBJECT, 0); } @@ -6272,8 +6313,6 @@ void rand_timeoffs(Scene *scene, View3D *v3d) } } - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSOBJECT, 0); } @@ -6327,15 +6366,8 @@ void texspace_edit(Scene *scene, View3D *v3d) void mirrormenu(void) { - Scene *scene= NULL; // XXX - - if(G.f & G_PARTICLEEDIT) { - PE_mirror_x(scene, 0); - } - else { // XXX initTransform(TFM_MIRROR, CTX_NO_PET); // XXX Transform(); - } } void hookmenu(Scene *scene, View3D *v3d) @@ -6398,8 +6430,5 @@ void hookmenu(Scene *scene, View3D *v3d) } if (changed) { - - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSEDIT, 0); } } diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index e7d75e85657..138f278fe77 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -69,6 +69,9 @@ void OBJECT_OT_delete(struct wmOperatorType *ot); void OBJECT_OT_mesh_add(struct wmOperatorType *ot); void OBJECT_OT_curve_add(struct wmOperatorType *ot); +void OBJECT_OT_surface_add(struct wmOperatorType *ot); +void OBJECT_OT_text_add(struct wmOperatorType *ot); +void OBJECT_OT_armature_add(struct wmOperatorType *ot); /* only used as menu */ void OBJECT_OT_primitive_add(struct wmOperatorType *ot); diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 0139c2bf2a9..134c486bb66 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -93,6 +93,9 @@ void ED_operatortypes_object(void) WM_operatortype_append(OBJECT_OT_delete); WM_operatortype_append(OBJECT_OT_mesh_add); WM_operatortype_append(OBJECT_OT_curve_add); + WM_operatortype_append(OBJECT_OT_text_add); + WM_operatortype_append(OBJECT_OT_surface_add); + WM_operatortype_append(OBJECT_OT_armature_add); WM_operatortype_append(OBJECT_OT_object_add); WM_operatortype_append(OBJECT_OT_primitive_add); } @@ -133,8 +136,8 @@ void ED_keymap_object(wmWindowManager *wm) WM_keymap_verify_item(keymap, "OBJECT_OT_add_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); // XXX this should probably be in screen instead... here for testing purposes in the meantime... - Aligorith - WM_keymap_verify_item(keymap, "ANIM_OT_insert_keyframe", IKEY, KM_PRESS, 0, 0); - WM_keymap_verify_item(keymap, "ANIM_OT_delete_keyframe", IKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_verify_item(keymap, "ANIM_OT_insert_keyframe_old", IKEY, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "ANIM_OT_delete_keyframe_old", IKEY, KM_PRESS, KM_ALT, 0); WM_keymap_verify_item(keymap, "GROUP_OT_group_create", GKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_verify_item(keymap, "GROUP_OT_group_remove", GKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); diff --git a/source/blender/editors/physics/editparticle.c b/source/blender/editors/physics/editparticle.c index 89d4466d849..4751bd7bb33 100644 --- a/source/blender/editors/physics/editparticle.c +++ b/source/blender/editors/physics/editparticle.c @@ -1,6 +1,4 @@ -/* editparticle.c - * - * +/* * $Id: editparticle.c $ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -46,6 +44,7 @@ #include "DNA_view3d_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" +#include "DNA_windowmanager_types.h" #include "BKE_DerivedMesh.h" #include "BKE_depsgraph.h" @@ -56,6 +55,7 @@ #include "BKE_mesh.h" #include "BKE_modifier.h" #include "BKE_particle.h" +#include "BKE_report.h" #include "BKE_scene.h" #include "BKE_utildefines.h" @@ -70,11 +70,18 @@ #include "BIF_gl.h" #include "BIF_glutil.h" -#include "ED_editparticle.h" +#include "ED_particle.h" #include "ED_view3d.h" +#include "UI_interface.h" #include "UI_resources.h" +#include "WM_api.h" +#include "WM_types.h" + +#include "RNA_access.h" +#include "RNA_define.h" + #include "physics_intern.h" static void ParticleUndo_clear(ParticleSystem *psys); @@ -83,17 +90,46 @@ static void ParticleUndo_clear(ParticleSystem *psys); #define LOOP_KEYS(k,key) if(psys->edit)for(k=0, key=psys->edit->keys[i]; ktotkey; k++, key++) /* XXX */ -static void BIF_undo_push() {} static void error() {} -static int pupmenu() {return 0;} static int lasso_inside() {return 0;} static void *mesh_get_x_mirror_faces() {return NULL;} -#define LEFTMOUSE 0 + #define RADIALCONTROL_SIZE 0 #define RADIALCONTROL_STRENGTH 0 #define RADIALCONTROL_NONE 0 /* XXX */ + +/**************************** utilities *******************************/ + +static int PE_poll(bContext *C) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + ParticleSystem *psys; + + if(!scene || !ob) + return 0; + + psys= PE_get_current(scene, ob); + + return (psys && psys->edit && (G.f & G_PARTICLEEDIT)); +} + +static int PE_poll_3dview(bContext *C) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + ParticleSystem *psys; + + if(!scene || !ob || !CTX_wm_region_view3d(C)) + return 0; + + psys= PE_get_current(scene, ob); + + return (psys && psys->edit && (G.f & G_PARTICLEEDIT)); +} + void PE_free_particle_edit(ParticleSystem *psys) { ParticleEdit *edit=psys->edit; @@ -103,34 +139,37 @@ void PE_free_particle_edit(ParticleSystem *psys) ParticleUndo_clear(psys); - if(edit->keys){ - for(i=0; ikeys) { + for(i=0; ikeys[i]) MEM_freeN(edit->keys[i]); } + MEM_freeN(edit->keys); } if(edit->mirror_cache) MEM_freeN(edit->mirror_cache); - if(edit->emitter_cosnos){ + if(edit->emitter_cosnos) { MEM_freeN(edit->emitter_cosnos); - edit->emitter_cosnos=0; + edit->emitter_cosnos= 0; } - if(edit->emitter_field){ + if(edit->emitter_field) { BLI_kdtree_free(edit->emitter_field); - edit->emitter_field=0; + edit->emitter_field= 0; } MEM_freeN(edit); - psys->edit=NULL; + psys->edit= NULL; } + /************************************************/ /* Edit Mode Helpers */ /************************************************/ + int PE_can_edit(ParticleSystem *psys) { return (psys && psys->edit && (G.f & G_PARTICLEEDIT)); @@ -143,27 +182,28 @@ ParticleEditSettings *PE_settings(Scene *scene) void PE_change_act(void *ob_v, void *act_v) { - Object *ob = ob_v; + Scene *scene= NULL; // XXX + Object *ob= ob_v; ParticleSystem *psys; - short act = *((short*)act_v) - 1; + short act= *((short*)act_v) - 1; if((psys=psys_get_current(ob))) psys->flag &= ~PSYS_CURRENT; - if(act>=0){ + if(act>=0) { if((psys=BLI_findlink(&ob->particlesystem,act))) { psys->flag |= PSYS_CURRENT; if(psys_check_enabled(ob, psys)) { if(G.f & G_PARTICLEEDIT && !psys->edit) - PE_create_particle_edit(ob, psys); + PE_create_particle_edit(scene, ob, psys); PE_recalc_world_cos(ob, psys); } } } } -void PE_change_act_psys(Object *ob, ParticleSystem *psys) +void PE_change_act_psys(Scene *scene, Object *ob, ParticleSystem *psys) { ParticleSystem *p; @@ -174,13 +214,13 @@ void PE_change_act_psys(Object *ob, ParticleSystem *psys) if(psys_check_enabled(ob, psys)) { if(G.f & G_PARTICLEEDIT && !psys->edit) - PE_create_particle_edit(ob, psys); + PE_create_particle_edit(scene, ob, psys); PE_recalc_world_cos(ob, psys); } } /* always gets atleast the first particlesystem even if PSYS_CURRENT flag is not set */ -ParticleSystem *PE_get_current(Object *ob) +ParticleSystem *PE_get_current(Scene *scene, Object *ob) { ParticleSystem *psys; @@ -188,7 +228,7 @@ ParticleSystem *PE_get_current(Object *ob) return NULL; psys= ob->particlesystem.first; - while(psys){ + while(psys) { if(psys->flag & PSYS_CURRENT) break; psys=psys->next; @@ -199,10 +239,10 @@ ParticleSystem *PE_get_current(Object *ob) psys->flag |= PSYS_CURRENT; } - if(psys && psys_check_enabled(ob, psys)) // XXX && ob == OBACT && (G.f & G_PARTICLEEDIT)) + if(psys && psys_check_enabled(ob, psys)) // XXX && (ob == scene->obact) && (G.f & G_PARTICLEEDIT)) if(psys->part->type == PART_HAIR && psys->flag & PSYS_EDITED) if(psys->edit == NULL) - PE_create_particle_edit(ob, psys); + PE_create_particle_edit(scene, ob, psys); return psys; } @@ -211,9 +251,9 @@ ParticleSystem *PE_get_current(Object *ob) short PE_get_current_num(Object *ob) { short num=0; - ParticleSystem *psys = ob->particlesystem.first; + ParticleSystem *psys= ob->particlesystem.first; - while(psys){ + while(psys) { if(psys->flag & PSYS_CURRENT) return num; num++; @@ -228,100 +268,114 @@ void PE_hide_keys_time(Scene *scene, ParticleSystem *psys, float cfra) ParticleData *pa; ParticleEditKey *key; ParticleEditSettings *pset=PE_settings(scene); - int i,k,totpart=psys->totpart; + int i, k, totpart=psys->totpart; - if(pset->draw_timed && scene->selectmode==SCE_SELECT_POINT){ - LOOP_PARTICLES(i,pa){ - LOOP_KEYS(k,key){ + if(pset->draw_timed && scene->selectmode==SCE_SELECT_POINT) { + LOOP_PARTICLES(i,pa) { + LOOP_KEYS(k,key) { if(fabs(cfra-*key->time) < pset->draw_timed) key->flag &= ~PEK_HIDE; - else{ + else { key->flag |= PEK_HIDE; key->flag &= ~PEK_SELECT; } } } } - else{ - LOOP_PARTICLES(i,pa){ - LOOP_KEYS(k,key){ + else { + LOOP_PARTICLES(i,pa) { + LOOP_KEYS(k,key) { key->flag &= ~PEK_HIDE; } } } } -static int key_inside_circle(short mco[2], float rad, float co[3], float *distance) +/****************** common struct passed to callbacks ******************/ + +typedef struct PEData { + ViewContext vc; + bglMats mats; + + Scene *scene; + Object *ob; + DerivedMesh *dm; + ParticleSystem *psys; + + short *mval; + rcti *rect; + float rad; + float dist; + float dval; + int select; + + float *dvec; + float combfac; + float pufffac; + float cutfac; + float smoothfac; + float weightfac; + float growfac; + + int invert; + int tot; + float vec[3]; +} PEData; + +static void PE_set_data(bContext *C, PEData *data) { - ARegion *ar= NULL; // XXX - float dx,dy,dist; - short vertco[2]; + memset(data, 0, sizeof(*data)); - project_short(ar, co, vertco); - - if (vertco[0]==IS_CLIPPED) - return 0; - - dx=(float)(mco[0]-vertco[0]); - dy=(float)(mco[1]-vertco[1]); - dist=(float)sqrt((double)(dx*dx + dy*dy)); - - if(dist<=rad){ - if(distance) *distance=dist; - return 1; - } - else - return 0; -} -static int key_inside_rect(rcti *rect, float co[3]) -{ - ARegion *ar= NULL; // XXX - short vertco[2]; - - project_short(ar, co,vertco); - - if (vertco[0]==IS_CLIPPED) - return 0; - - if(vertco[0] > rect->xmin && vertco[0] < rect->xmax && - vertco[1] > rect->ymin && vertco[1] < rect->ymax) - return 1; - else - return 0; + data->scene= CTX_data_scene(C); + data->ob= CTX_data_active_object(C); + data->psys= PE_get_current(data->scene, data->ob); } -static int test_key_depth(float *co, bglMats *mats) +static void PE_set_view3d_data(bContext *C, PEData *data) { - ARegion *ar= NULL; // XXX - View3D *v3d= NULL; - RegionView3D *rv3d= ar->regiondata; + PE_set_data(C, data); + + view3d_set_viewcontext(C, &data->vc); + view3d_get_transformation(&data->vc, data->ob, &data->mats); +} + +/*************************** selection utilities *******************************/ + +static int key_test_depth(PEData *data, float co[3]) +{ + View3D *v3d= data->vc.v3d; + RegionView3D *rv3d= data->vc.rv3d; double ux, uy, uz; float depth; short wco[3], x,y; - if((v3d->drawtype<=OB_WIRE) || (v3d->flag & V3D_ZBUF_SELECT)==0) return 1; + /* nothing to do */ + if((v3d->drawtype<=OB_WIRE) || (v3d->flag & V3D_ZBUF_SELECT)==0) + return 1; - gluProject(co[0],co[1],co[2], mats->modelview, mats->projection, - (GLint *)mats->viewport, &ux, &uy, &uz ); - - project_short(ar, co, wco); + project_short(data->vc.ar, co, wco); - if (wco[0]==IS_CLIPPED) + if(wco[0] == IS_CLIPPED) return 0; - + + gluProject(co[0],co[1],co[2], data->mats.modelview, data->mats.projection, + (GLint *)data->mats.viewport, &ux, &uy, &uz); + x=wco[0]; y=wco[1]; - if(rv3d->depths && xdepths->w && ydepths->h){ + // XXX verify .. + + if(rv3d->depths && xdepths->w && ydepths->h) { /* the 0.0001 is an experimental threshold to make selecting keys right next to a surface work better */ if((float)uz - 0.0001 > rv3d->depths->depths[y*rv3d->depths->w+x]) return 0; else return 1; } - else{ - x+= (short)ar->winrct.xmin; - y+= (short)ar->winrct.ymin; + else { + x+= (short)data->vc.ar->winrct.xmin; + y+= (short)data->vc.ar->winrct.ymin; glReadPixels(x, y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); @@ -332,241 +386,294 @@ static int test_key_depth(float *co, bglMats *mats) } } +static int key_inside_circle(PEData *data, float co[3], float *distance) +{ + float dx, dy, dist; + short sco[2]; + + project_short(data->vc.ar, co, sco); + + if(sco[0] == IS_CLIPPED) + return 0; + + dx= data->mval[0] - sco[0]; + dy= data->mval[1] - sco[1]; + dist= sqrt(dx*dx + dy*dy); + + if(dist > data->rad) + return 0; + + if(key_test_depth(data, co)) { + if(distance) + *distance=dist; + + return 1; + } + + return 0; +} + +static int key_inside_rect(PEData *data, float co[3]) +{ + short sco[2]; + + project_short(data->vc.ar, co,sco); + + if(sco[0] == IS_CLIPPED) + return 0; + + if(sco[0] > data->rect->xmin && sco[0] < data->rect->xmax && + sco[1] > data->rect->ymin && sco[1] < data->rect->ymax) + return key_test_depth(data, co); + + return 0; +} + +static int key_inside_test(PEData *data, float co[3]) +{ + if(data->mval) + return key_inside_circle(data, co, NULL); + else + return key_inside_rect(data, co); +} + static int particle_is_selected(ParticleSystem *psys, ParticleData *pa) { ParticleEditKey *key; int sel, i, k; - if(pa->flag&PARS_HIDE) return 0; + if(pa->flag & PARS_HIDE) + return 0; - sel=0; + sel= 0; i= pa - psys->particles; + LOOP_KEYS(k,key) - if(key->flag&PEK_SELECT) + if(key->flag & PEK_SELECT) return 1; return 0; } -/*-----iterators over editable particles-----*/ -static void for_mouse_hit_keys(int nearest, ParticleSystem *psys, void (*func)(ParticleSystem *psys, - int pa_index, int key_index, void *userData), void *userData) +/*************************** iterators *******************************/ + +typedef void (*ForParticleFunc)(PEData *data, int pa_index); +typedef void (*ForKeyFunc)(PEData *data, int pa_index, int key_index); +typedef void (*ForKeyMatFunc)(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index); + +static void for_mouse_hit_keys(PEData *data, ForKeyFunc func, int nearest) { - /* these are allways the first in this userData */ - struct {Scene *scene; short *mval; float rad; rcti *rect;} *data = userData; + ParticleSystem *psys= data->psys; + ParticleEdit *edit= psys->edit; ParticleData *pa; ParticleEditKey *key; - bglMats mats; - int i,k, totpart, nearest_pa=-1, nearest_key=-1; - float dist=data->rad; + int i, k, totpart, nearest_pa, nearest_key; + float dist= data->rad; - if(psys==0 || data->scene->selectmode==SCE_SELECT_PATH) return; + /* in path select mode we have no keys */ + if(data->scene->selectmode==SCE_SELECT_PATH) + return; - totpart=psys->totpart; + totpart= psys->totpart; + nearest_pa= -1; + nearest_key= -1; - bgl_get_mats(&mats); - - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i, pa) { if(pa->flag & PARS_HIDE) continue; - if(data->scene->selectmode==SCE_SELECT_END){ - key=psys->edit->keys[i]+pa->totkey-1; + if(data->scene->selectmode == SCE_SELECT_END) { + /* only do end keys */ + key= edit->keys[i] + pa->totkey-1; - if(nearest){ - if(key_inside_circle(data->mval,dist,key->world_co,&dist) && test_key_depth(key->world_co,&mats)){ - nearest_pa=i; - nearest_key=pa->totkey-1; + if(nearest) { + if(key_inside_circle(data, key->world_co, &dist)) { + nearest_pa= i; + nearest_key= pa->totkey-1; } } - else if(((data->mval)? - key_inside_circle(data->mval,data->rad,key->world_co,0): - key_inside_rect(data->rect,key->world_co)) && test_key_depth(key->world_co,&mats)) - func(psys,i,pa->totkey-1,userData); + else if(key_inside_test(data, key->world_co)) + func(data, i, pa->totkey-1); } - else{ - key=psys->edit->keys[i]; + else { + /* do all keys */ + key= edit->keys[i]; - LOOP_KEYS(k,key){ - if(key->flag&PEK_HIDE) continue; + LOOP_KEYS(k, key) { + if(key->flag & PEK_HIDE) continue; - if(nearest){ - if(key_inside_circle(data->mval,dist,key->world_co,&dist) && test_key_depth(key->world_co,&mats)){ - nearest_pa=i; - nearest_key=k; + if(nearest) { + if(key_inside_circle(data, key->world_co, &dist)) { + nearest_pa= i; + nearest_key= k; } } - else if(((data->mval)? - key_inside_circle(data->mval,data->rad,key->world_co,0): - key_inside_rect(data->rect,key->world_co)) && test_key_depth(key->world_co,&mats)) - func(psys,i,k,userData); + else if(key_inside_test(data, key->world_co)) + func(data, i, k); } } } - if(nearest && nearest_pa>-1){ - func(psys,nearest_pa,nearest_key,userData); - } + + /* do nearest only */ + if(nearest && nearest_pa > -1) + func(data, nearest_pa, nearest_key); } -static void foreach_mouse_hit_element(int selected, ParticleSystem *psys,void (*func)(ParticleSystem *psys, int index, void *userData), void *userData) +static void foreach_mouse_hit_particle(PEData *data, ForParticleFunc func, int selected) { - /* these are allways the first in this userData */ - struct {Scene *scene; short *mval; float rad; rcti* rect; float dist;} *data = userData; + ParticleSystem *psys= data->psys; ParticleData *pa; ParticleEditKey *key; - bglMats mats; - int i,k, totpart; + int i, k, totpart; - if(psys==0) return; - - totpart=psys->totpart; - - bgl_get_mats(&mats); + totpart= psys->totpart; + /* all is selected in path mode */ if(data->scene->selectmode==SCE_SELECT_PATH) selected=0; - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i, pa) { if(pa->flag & PARS_HIDE) continue; - if(data->scene->selectmode==SCE_SELECT_END){ - key=psys->edit->keys[i]+pa->totkey-1; - if(key_inside_circle(data->mval,data->rad,key->world_co,&data->dist) && (selected==0 || key->flag&PEK_SELECT) && test_key_depth(key->world_co,&mats)) - func(psys,i,userData); - } - else{ - LOOP_KEYS(k,key){ - if(key->flag&PEK_HIDE) continue; + if(data->scene->selectmode==SCE_SELECT_END) { + /* only do end keys */ + key= psys->edit->keys[i] + pa->totkey-1; - if(key_inside_circle(data->mval,data->rad,key->world_co,&data->dist) && (selected==0 || key->flag&PEK_SELECT) && test_key_depth(key->world_co,&mats)){ - func(psys,i,userData); - break; + if(selected==0 || key->flag & PEK_SELECT) + if(key_inside_circle(data, key->world_co, &data->dist)) + func(data, i); + } + else { + /* do all keys */ + LOOP_KEYS(k,key) { + if(key->flag & PEK_HIDE) continue; + + if(selected==0 || key->flag & PEK_SELECT) { + if(key_inside_circle(data, key->world_co, &data->dist)) { + func(data, i); + break; + } } } } } } -static void foreach_mouse_hit_key(int selected, ParticleSystem *psys,void (*func)(ParticleSystem *psys, float mat[][4], float imat[][4], int bel_index, int key_index, void *userData), void *userData) +static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected) { - /* these are allways the first in this userData */ - struct {Scene *scene; Object *ob; short *mval; float rad; rcti* rect; float dist;} *data = userData; + ParticleSystem *psys= data->psys; ParticleData *pa; ParticleEditKey *key; ParticleSystemModifierData *psmd=0; - bglMats mats; - int i,k, totpart; + int i, k, totpart; float mat[4][4], imat[4][4]; - if(psys==0) return; - - psmd=psys_get_modifier(data->ob,psys); - - totpart=psys->totpart; - - bgl_get_mats(&mats); + psmd= psys_get_modifier(data->ob,psys); + totpart= psys->totpart; + /* all is selected in path mode */ if(data->scene->selectmode==SCE_SELECT_PATH) - selected=0; + selected= 0; Mat4One(imat); Mat4One(mat); - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i,pa) { if(pa->flag & PARS_HIDE) continue; psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, pa, mat); - //psys_geometry_mat(psmd->dm,pa,tmat); - //Mat4MulMat4(mat,tmat,data->ob->obmat); Mat4Invert(imat,mat); - if(data->scene->selectmode==SCE_SELECT_END){ - key=psys->edit->keys[i]+pa->totkey-1; - if(key_inside_circle(data->mval,data->rad,key->world_co,&data->dist) && (selected==0 || key->flag&PEK_SELECT) && test_key_depth(key->world_co,&mats)) - func(psys,mat,imat,i,pa->totkey-1,userData); + if(data->scene->selectmode==SCE_SELECT_END) { + /* only do end keys */ + key= psys->edit->keys[i] + pa->totkey-1; + + if(selected==0 || key->flag & PEK_SELECT) + if(key_inside_circle(data, key->world_co, &data->dist)) + func(data, mat, imat, i, pa->totkey-1); } - else{ - LOOP_KEYS(k,key){ + else { + /* do all keys */ + LOOP_KEYS(k,key) { if(key->flag&PEK_HIDE) continue; - if(key_inside_circle(data->mval,data->rad,key->world_co,&data->dist) && (selected==0 || key->flag&PEK_SELECT) && test_key_depth(key->world_co,&mats)){ - func(psys,mat,imat,i,k,userData); - } + if(selected==0 || key->flag & PEK_SELECT) + if(key_inside_circle(data, key->world_co, &data->dist)) + func(data, mat, imat, i, k); } } } } -static void foreach_selected_element(ParticleSystem *psys, void (*func)(ParticleSystem *psys, int index, void *userData), void *userData) +static void foreach_selected_particle(PEData *data, ForParticleFunc func) { + ParticleSystem *psys= data->psys; ParticleData *pa; - int i,totpart; + int i, totpart; - if(psys==0) return; - - totpart=psys->totpart; + totpart= psys->totpart; LOOP_PARTICLES(i,pa) if(particle_is_selected(psys, pa)) - func(psys,i,userData); + func(data, i); } -static void foreach_selected_key(ParticleSystem *psys, void (*func)(ParticleSystem *psys, int pa_index, int key_index, void *userData), void *userData) +static void foreach_selected_key(PEData *data, ForKeyFunc func) { + ParticleSystem *psys= data->psys; ParticleData *pa; ParticleEditKey *key; - int i,k,totpart; + int i, k, totpart; - if(psys==0) return; + totpart= psys->totpart; - totpart=psys->totpart; + LOOP_PARTICLES(i,pa) { + if(pa->flag & PARS_HIDE) continue; - LOOP_PARTICLES(i,pa){ - if(pa->flag&PARS_HIDE) continue; + key= psys->edit->keys[i]; - key=psys->edit->keys[i]; - LOOP_KEYS(k,key){ - if(key->flag&PEK_SELECT) - func(psys,i,k,userData); - } + LOOP_KEYS(k,key) + if(key->flag & PEK_SELECT) + func(data, i, k); } } -void PE_foreach_element(ParticleSystem *psys, void (*func)(ParticleSystem *psys, int index, void *userData), void *userData) + +void PE_foreach_particle(PEData *data, ForParticleFunc func) { - int i,totpart; + ParticleSystem *psys= data->psys; + int i, totpart; - if(psys==0) return; - - totpart=psys->totpart; + totpart= psys->totpart; for(i=0; itotpart; - totpart=psys->totpart; + LOOP_PARTICLES(i,pa) { + if(pa->flag & PARS_HIDE) continue; - LOOP_PARTICLES(i,pa){ - if(pa->flag&PARS_HIDE) continue; + key= psys->edit->keys[i]; - key=psys->edit->keys[i]; - if(scene->selectmode==SCE_SELECT_POINT){ - for(k=0; ktotkey; k++,key++){ - if(key->flag&PEK_SELECT) + if(scene->selectmode==SCE_SELECT_POINT) { + for(k=0; ktotkey; k++,key++) + if(key->flag & PEK_SELECT) sel++; - } } - else if(scene->selectmode==SCE_SELECT_END){ - key+=pa->totkey-1; - if(key->flag&PEK_SELECT) + else if(scene->selectmode==SCE_SELECT_END) { + key += pa->totkey-1; + + if(key->flag & PEK_SELECT) sel++; } } + return sel; } @@ -737,9 +844,9 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, ParticleSystem *psys) ParticleEdit *edit; ParticleData *pa; ParticleEditKey *key; - ParticleEditSettings *pset = PE_settings(scene); - ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys); - int i,k,totpart,index; + ParticleEditSettings *pset= PE_settings(scene); + ParticleSystemModifierData *psmd= psys_get_modifier(ob,psys); + int i, k, totpart,index; float *vec, *nor, dvec[3], dot, dist_1st; float hairimat[4][4], hairmat[4][4]; @@ -752,24 +859,24 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, ParticleSystem *psys) edit=psys->edit; totpart=psys->totpart; - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i,pa) { if(!(pa->flag & PARS_EDIT_RECALC)) continue; psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, pa, hairmat); - LOOP_KEYS(k,key){ + LOOP_KEYS(k,key) { Mat4MulVecfl(hairmat, key->co); } //} - //LOOP_PARTICLES(i,pa){ + //LOOP_PARTICLES(i,pa) { key=psys->edit->keys[i]+1; dist_1st=VecLenf((key-1)->co,key->co); dist_1st*=0.75f*pset->emitterdist; - for(k=1; ktotkey; k++, key++){ + for(k=1; ktotkey; k++, key++) { index= BLI_kdtree_find_nearest(edit->emitter_field,key->co,NULL,NULL); vec=edit->emitter_cosnos +index*6; @@ -780,14 +887,14 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, ParticleSystem *psys) dot=Inpf(dvec,nor); VECCOPY(dvec,nor); - if(dot>0.0f){ - if(dot0.0f) { + if(dotco,key->co,dvec); } } - else{ + else { Normalize(dvec); VecMulf(dvec,dist_1st-dot); VecAddf(key->co,key->co,dvec); @@ -797,11 +904,11 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, ParticleSystem *psys) } //} - //LOOP_PARTICLES(i,pa){ + //LOOP_PARTICLES(i,pa) { Mat4Invert(hairimat,hairmat); - LOOP_KEYS(k,key){ + LOOP_KEYS(k,key) { Mat4MulVecfl(hairimat, key->co); } } @@ -813,7 +920,7 @@ void PE_apply_lengths(Scene *scene, ParticleSystem *psys) ParticleData *pa; ParticleEditKey *key; ParticleEditSettings *pset=PE_settings(scene); - int i,k,totpart; + int i, k, totpart; float dv1[3]; if(psys==0) @@ -825,11 +932,11 @@ void PE_apply_lengths(Scene *scene, ParticleSystem *psys) edit=psys->edit; totpart=psys->totpart; - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i,pa) { if(!(pa->flag & PARS_EDIT_RECALC)) continue; - for(k=1, key=edit->keys[i] + 1; ktotkey; k++, key++){ + for(k=1, key=edit->keys[i] + 1; ktotkey; k++, key++) { VecSubf(dv1, key->co, (key - 1)->co); Normalize(dv1); VecMulf(dv1, (key - 1)->length); @@ -844,11 +951,11 @@ static void pe_iterate_lengths(Scene *scene, ParticleSystem *psys) ParticleData *pa; ParticleEditKey *key; ParticleEditSettings *pset=PE_settings(scene); - int i, j, k,totpart; + int i, j, k, totpart; float tlen; - float dv0[3] = {0.0f, 0.0f, 0.0f}; - float dv1[3] = {0.0f, 0.0f, 0.0f}; - float dv2[3] = {0.0f, 0.0f, 0.0f}; + float dv0[3]= {0.0f, 0.0f, 0.0f}; + float dv1[3]= {0.0f, 0.0f, 0.0f}; + float dv2[3]= {0.0f, 0.0f, 0.0f}; if(psys==0) return; @@ -859,38 +966,38 @@ static void pe_iterate_lengths(Scene *scene, ParticleSystem *psys) edit=psys->edit; totpart=psys->totpart; - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i,pa) { if(!(pa->flag & PARS_EDIT_RECALC)) continue; - for(j=1; jtotkey; j++){ - float mul = 1.0f / (float)pa->totkey; + for(j=1; jtotkey; j++) { + float mul= 1.0f / (float)pa->totkey; - if(pset->flag & PE_LOCK_FIRST){ - key = edit->keys[i] + 1; - k = 1; - dv1[0] = dv1[1] = dv1[2] = 0.0; + if(pset->flag & PE_LOCK_FIRST) { + key= edit->keys[i] + 1; + k= 1; + dv1[0]= dv1[1]= dv1[2]= 0.0; } - else{ - key = edit->keys[i]; - k = 0; - dv0[0] = dv0[1] = dv0[2] = 0.0; + else { + key= edit->keys[i]; + k= 0; + dv0[0]= dv0[1]= dv0[2]= 0.0; } - for(; ktotkey; k++, key++){ - if(k){ + for(; ktotkey; k++, key++) { + if(k) { VecSubf(dv0, (key - 1)->co, key->co); - tlen = Normalize(dv0); + tlen= Normalize(dv0); VecMulf(dv0, (mul * (tlen - (key - 1)->length))); } - if(k < pa->totkey - 1){ + if(k < pa->totkey - 1) { VecSubf(dv2, (key + 1)->co, key->co); - tlen = Normalize(dv2); + tlen= Normalize(dv2); VecMulf(dv2, mul * (tlen - key->length)); } - if(k){ + if(k) { VecAddf((key-1)->co,(key-1)->co,dv1); } @@ -909,19 +1016,19 @@ static void recalc_lengths(ParticleSystem *psys) if(psys==0) return; - totpart = psys->totpart; + totpart= psys->totpart; - LOOP_PARTICLES(i,pa){ - key = psys->edit->keys[i]; - for(k=0; ktotkey-1; k++, key++){ - key->length = VecLenf(key->co, (key + 1)->co); + LOOP_PARTICLES(i,pa) { + key= psys->edit->keys[i]; + for(k=0; ktotkey-1; k++, key++) { + key->length= VecLenf(key->co, (key + 1)->co); } } } /* calculate and store key locations in world coordinates */ void PE_recalc_world_cos(Object *ob, ParticleSystem *psys) { - ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys); + ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys); ParticleData *pa; ParticleEditKey *key; int i, k, totpart; @@ -930,12 +1037,12 @@ void PE_recalc_world_cos(Object *ob, ParticleSystem *psys) if(psys==0) return; - totpart = psys->totpart; + totpart= psys->totpart; - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i,pa) { psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat); - LOOP_KEYS(k,key){ + LOOP_KEYS(k,key) { VECCOPY(key->world_co,key->co); Mat4MulVecfl(hairmat, key->world_co); } @@ -945,7 +1052,7 @@ void PE_recalc_world_cos(Object *ob, ParticleSystem *psys) static void recalc_emitter_field(Object *ob, ParticleSystem *psys) { DerivedMesh *dm=psys_get_modifier(ob,psys)->dm; - ParticleEdit *edit = psys->edit; + ParticleEdit *edit= psys->edit; MFace *mface; MVert *mvert; float *vec, *nor; @@ -967,7 +1074,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys) nor=vec+3; mvert=dm->getVertDataArray(dm,CD_MVERT); - for(i=0; igetFaceData(dm,i,CD_MFACE); mvert=dm->getVertData(dm,mface->v1,CD_MVERT); @@ -982,7 +1089,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys) VECADD(vec,vec,mvert->co); VECADD(nor,nor,mvert->no); - if (mface->v4){ + if(mface->v4) { mvert=dm->getVertData(dm,mface->v4,CD_MVERT); VECADD(vec,vec,mvert->co); VECADD(nor,nor,mvert->no); @@ -1002,7 +1109,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys) void PE_update_selection(Scene *scene, Object *ob, int useflag) { - ParticleSystem *psys= PE_get_current(ob); + ParticleSystem *psys= PE_get_current(scene, ob); ParticleEdit *edit= psys->edit; ParticleEditSettings *pset= PE_settings(scene); ParticleSettings *part= psys->part; @@ -1022,7 +1129,7 @@ void PE_update_selection(Scene *scene, Object *ob, int useflag) /* flush edit key flag to hair key flag to preserve selection * on save */ LOOP_PARTICLES(i,pa) { - key = edit->keys[i]; + key= edit->keys[i]; for(k=0, hkey=pa->hair; ktotkey; k++, hkey++, key++) hkey->editflag= key->flag; @@ -1040,7 +1147,7 @@ void PE_update_selection(Scene *scene, Object *ob, int useflag) void PE_update_object(Scene *scene, Object *ob, int useflag) { - ParticleSystem *psys= PE_get_current(ob); + ParticleSystem *psys= PE_get_current(scene, ob); ParticleEditSettings *pset= PE_settings(scene); ParticleSettings *part= psys->part; ParticleData *pa; @@ -1072,27 +1179,28 @@ void PE_update_object(Scene *scene, Object *ob, int useflag) pa->flag &= ~PARS_EDIT_RECALC; } +/************************ particle edit toggle operator ************************/ + /* initialize needed data for bake edit */ -void PE_create_particle_edit(Object *ob, ParticleSystem *psys) +void PE_create_particle_edit(Scene *scene, Object *ob, ParticleSystem *psys) { - Scene *scene= NULL; // XXX ParticleEdit *edit=psys->edit; ParticleData *pa; ParticleEditKey *key; HairKey *hkey; - int i,k, totpart=psys->totpart, alloc=1; + int i, k, totpart=psys->totpart, alloc=1; if((psys->flag & PSYS_EDITED)==0) return; - if(edit){ - int newtotkeys = psys_count_keys(psys); + if(edit) { + int newtotkeys= psys_count_keys(psys); if(newtotkeys == edit->totkeys) alloc=0; } - if(alloc){ - if(edit){ + if(alloc) { + if(edit) { error("ParticleEdit exists allready! Poke jahka!"); PE_free_particle_edit(psys); } @@ -1101,16 +1209,16 @@ void PE_create_particle_edit(Object *ob, ParticleSystem *psys) edit->keys=MEM_callocN(totpart*sizeof(ParticleEditKey*),"ParticleEditKey array"); - LOOP_PARTICLES(i,pa){ - key = edit->keys[i] = MEM_callocN(pa->totkey*sizeof(ParticleEditKey),"ParticleEditKeys"); - for(k=0, hkey=pa->hair; ktotkey; k++, hkey++, key++){ - key->co = hkey->co; - key->time = &hkey->time; + LOOP_PARTICLES(i,pa) { + key= edit->keys[i]= MEM_callocN(pa->totkey*sizeof(ParticleEditKey),"ParticleEditKeys"); + for(k=0, hkey=pa->hair; ktotkey; k++, hkey++, key++) { + key->co= hkey->co; + key->time= &hkey->time; key->flag= hkey->editflag; } } - edit->totkeys = psys_count_keys(psys); + edit->totkeys= psys_count_keys(psys); } recalc_lengths(psys); @@ -1123,197 +1231,145 @@ void PE_create_particle_edit(Object *ob, ParticleSystem *psys) } } -/* toggle particle mode on & off */ -void PE_set_particle_edit(Scene *scene) +static int particle_edit_toggle_poll(bContext *C) { - Object *ob= OBACT; - ParticleSystem *psys = PE_get_current(ob); + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + if(!scene || !ob || ob->id.lib) + return 0; - //if(!ob || ob->id.lib) return; /* is the id.lib test needed? -jahka*/ - if(ob==0 || psys==0) return; + return (ob->particlesystem.first != NULL); +} + +static int particle_edit_toggle_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + ParticleSystem *psys= PE_get_current(scene, ob); - if(psys==0){ - if(ob->particlesystem.first){ - psys=ob->particlesystem.first; - psys->flag |= PSYS_CURRENT; - } - else - return; + if(psys==NULL) { + psys= ob->particlesystem.first; + psys->flag |= PSYS_CURRENT; } - if((G.f & G_PARTICLEEDIT)==0){ + if(!(G.f & G_PARTICLEEDIT)) { if(psys && psys->part->type == PART_HAIR && psys->flag & PSYS_EDITED) { if(psys_check_enabled(ob, psys)) { - if(psys->edit==0) - PE_create_particle_edit(ob, psys); + if(psys->edit==NULL) + PE_create_particle_edit(scene, ob, psys); + PE_recalc_world_cos(ob, psys); } } G.f |= G_PARTICLEEDIT; + WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_PARTICLE, NULL); } - else{ + else { G.f &= ~G_PARTICLEEDIT; + WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL); } - DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA); + DAG_object_flush_update(scene, ob, OB_RECALC_DATA); + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_particle_edit_toggle(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Particle Edit Toggle"; + ot->idname= "PARTICLE_OT_particle_edit_toggle"; + + /* api callbacks */ + ot->exec= particle_edit_toggle_exec; + ot->poll= particle_edit_toggle_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } /************************************************/ /* Edit Selections */ /************************************************/ + /*-----selection callbacks-----*/ -static void select_key(ParticleSystem *psys, int pa_index, int key_index, void *userData) + +static void select_key(PEData *data, int pa_index, int key_index) { - struct {Scene *scene; short *mval; float rad; rcti* rect; int select; } *data = userData; - ParticleData *pa = psys->particles + pa_index; - ParticleEditKey *key = psys->edit->keys[pa_index] + key_index; + ParticleSystem *psys= data->psys; + ParticleData *pa= psys->particles + pa_index; + ParticleEditKey *key= psys->edit->keys[pa_index] + key_index; if(data->select) - key->flag|=PEK_SELECT; + key->flag |= PEK_SELECT; else - key->flag&=~PEK_SELECT; + key->flag &= ~PEK_SELECT; pa->flag |= PARS_EDIT_RECALC; } -static void select_keys(ParticleSystem *psys, int pa_index, int key_index, void *userData) +static void select_keys(PEData *data, int pa_index, int key_index) { - struct {Scene *scene; short *mval; float rad; rcti* rect; int select; } *data = userData; - ParticleData *pa = psys->particles + pa_index; - ParticleEditKey *key = psys->edit->keys[pa_index]; + ParticleSystem *psys= data->psys; + ParticleData *pa= psys->particles + pa_index; + ParticleEditKey *key= psys->edit->keys[pa_index]; int k; - for(k=0; ktotkey; k++,key++){ + for(k=0; ktotkey; k++,key++) { if(data->select) - key->flag|=PEK_SELECT; + key->flag |= PEK_SELECT; else - key->flag&=~PEK_SELECT; + key->flag &= ~PEK_SELECT; } pa->flag |= PARS_EDIT_RECALC; } -static void toggle_key_select(ParticleSystem *psys, int pa_index, int key_index, void *userData) +static void toggle_key_select(PEData *data, int pa_index, int key_index) { - ParticleData *pa = psys->particles + pa_index; + ParticleSystem *psys= data->psys; + ParticleData *pa= psys->particles + pa_index; if(psys->edit->keys[pa_index][key_index].flag&PEK_SELECT) - psys->edit->keys[pa_index][key_index].flag&=~PEK_SELECT; + psys->edit->keys[pa_index][key_index].flag &= ~PEK_SELECT; else - psys->edit->keys[pa_index][key_index].flag|=PEK_SELECT; + psys->edit->keys[pa_index][key_index].flag |= PEK_SELECT; pa->flag |= PARS_EDIT_RECALC; } -static void select_root(ParticleSystem *psys, int index, void *userData) +/************************ de select all operator ************************/ + +static int de_select_all_exec(bContext *C, wmOperator *op) { - psys->edit->keys[index]->flag |= PEK_SELECT; -} - -static void select_tip(ParticleSystem *psys, int index, void *userData) -{ - ParticleData *pa = psys->particles + index; - ParticleEditKey *key = psys->edit->keys[index] + pa->totkey-1; - - key->flag |= PEK_SELECT; -} -static void select_more_keys(ParticleSystem *psys, int index, void *userData) -{ - ParticleEdit *edit = psys->edit; - ParticleData *pa = psys->particles+index; - ParticleEditKey *key; - int k; - - for(k=0,key=edit->keys[index]; ktotkey; k++,key++){ - if(key->flag&PEK_SELECT) continue; - - if(k==0){ - if((key+1)->flag&PEK_SELECT) - key->flag |= PEK_TO_SELECT; - } - else if(k==pa->totkey-1){ - if((key-1)->flag&PEK_SELECT) - key->flag |= PEK_TO_SELECT; - } - else{ - if(((key-1)->flag | (key+1)->flag) & PEK_SELECT) - key->flag |= PEK_TO_SELECT; - } - } - - for(k=0,key=edit->keys[index]; ktotkey; k++,key++){ - if(key->flag&PEK_TO_SELECT){ - key->flag &= ~PEK_TO_SELECT; - key->flag |= PEK_SELECT; - } - } -} - -static void select_less_keys(ParticleSystem *psys, int index, void *userData) -{ - ParticleEdit *edit = psys->edit; - ParticleData *pa = psys->particles+index; - ParticleEditKey *key; - int k; - - for(k=0,key=edit->keys[index]; ktotkey; k++,key++){ - if((key->flag&PEK_SELECT)==0) continue; - - if(k==0){ - if(((key+1)->flag&PEK_SELECT)==0) - key->flag |= PEK_TO_SELECT; - } - else if(k==pa->totkey-1){ - if(((key-1)->flag&PEK_SELECT)==0) - key->flag |= PEK_TO_SELECT; - } - else{ - if((((key-1)->flag & (key+1)->flag) & PEK_SELECT)==0) - key->flag |= PEK_TO_SELECT; - } - } - - for(k=0,key=edit->keys[index]; ktotkey; k++,key++){ - if(key->flag&PEK_TO_SELECT) - key->flag &= ~(PEK_TO_SELECT|PEK_SELECT); - } -} - -/*-----using above callbacks-----*/ -void PE_deselectall(void) -{ - Scene *scene= NULL; - Object *ob = OBACT; - ParticleSystem *psys = PE_get_current(ob); - ParticleEdit *edit = 0; + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + ParticleSystem *psys= PE_get_current(scene, ob); + ParticleEdit *edit= 0; ParticleData *pa; ParticleEditKey *key; - int i,k,totpart, sel = 0; - - if(!PE_can_edit(psys)) return; + int i, k, totpart, sel= 0; - edit = psys->edit; - - totpart = psys->totpart; + edit= psys->edit; + totpart= psys->totpart; - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i,pa) { if(pa->flag & PARS_HIDE) continue; - LOOP_KEYS(k,key){ - if(key->flag&PEK_SELECT){ - sel = 1; + LOOP_KEYS(k,key) { + if(key->flag & PEK_SELECT) { + sel= 1; key->flag &= ~PEK_SELECT; pa->flag |= PARS_EDIT_RECALC; } } } - if(sel==0){ - LOOP_PARTICLES(i,pa){ + if(sel==0) { + LOOP_PARTICLES(i,pa) { if(pa->flag & PARS_HIDE) continue; - LOOP_KEYS(k,key){ + LOOP_KEYS(k,key) { if(!(key->flag & PEK_SELECT)) { key->flag |= PEK_SELECT; pa->flag |= PARS_EDIT_RECALC; @@ -1323,28 +1379,46 @@ void PE_deselectall(void) } PE_update_selection(scene, ob, 1); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob); - BIF_undo_push("(De)select all keys"); + return OPERATOR_FINISHED; } +void PARTICLE_OT_de_select_all(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Select or Deselect All"; + ot->idname= "PARTICLE_OT_de_select_all"; + + /* api callbacks */ + ot->exec= de_select_all_exec; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ pick select operator ************************/ + void PE_mouse_particles(void) { - struct {Scene *scene; short *mval; float rad; rcti* rect; int select; } data; - Scene *scene= NULL; - Object *ob = OBACT; - ParticleSystem *psys = PE_get_current(ob); - ParticleEdit *edit = 0; + bContext *C= NULL; // XXX + PEData data; + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + ParticleSystem *psys= PE_get_current(scene, ob); + ParticleEdit *edit= 0; ParticleData *pa; ParticleEditKey *key; short mval[2]; - int i,k,totpart; + int i, k, totpart; int shift= 0; // XXX if(!PE_can_edit(psys)) return; - edit = psys->edit; + edit= psys->edit; - totpart = psys->totpart; + totpart= psys->totpart; bglFlush(); glReadBuffer(GL_BACK); @@ -1352,128 +1426,214 @@ void PE_mouse_particles(void) // persp(PERSP_VIEW); if(shift) - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i,pa) { if(pa->flag & PARS_HIDE) continue; - LOOP_KEYS(k,key){ + LOOP_KEYS(k,key) { if(key->flag & PEK_SELECT) { key->flag &= ~PEK_SELECT; pa->flag |= PARS_EDIT_RECALC; } } } + + // XXX mval -// getmouseco_areawin(mval); - - data.scene= scene; + PE_set_view3d_data(C, &data); data.mval= mval; data.rad= 75.0f; - data.rect= 0; - data.select= 0; - for_mouse_hit_keys(1,psys,toggle_key_select,&data); + for_mouse_hit_keys(&data, toggle_key_select, 1); /* nearest only */ PE_update_selection(scene, ob, 1); } -void PE_select_root(void) +/************************ select first operator ************************/ + +static void select_root(PEData *data, int pa_index) { - Object *ob=NULL; // XXX - ParticleSystem *psys = PE_get_current(ob); + ParticleSystem *psys= data->psys; - if(!PE_can_edit(psys)) return; - - PE_foreach_element(psys,select_root,NULL); - BIF_undo_push("Select first"); + psys->edit->keys[pa_index]->flag |= PEK_SELECT; } -void PE_select_tip() +static int select_first_exec(bContext *C, wmOperator *op) { - Object *ob=NULL; // XXX - ParticleSystem *psys = PE_get_current(ob); + PEData data; - if(!PE_can_edit(psys)) return; + PE_set_data(C, &data); + PE_foreach_particle(&data, select_root); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob); - PE_foreach_element(psys,select_tip,NULL); - BIF_undo_push("Select last"); + return OPERATOR_FINISHED; } -void PE_select_linked(void) +void PARTICLE_OT_select_first(wmOperatorType *ot) { - struct {Scene *scene; short *mval; float rad; rcti* rect; int select; } data; - Object *ob=NULL; // XXX - Scene *scene= NULL; - ParticleSystem *psys = PE_get_current(ob); - short mval[2]; - int shift= 0; // XXX + /* identifiers */ + ot->name= "Select First"; + ot->idname= "PARTICLE_OT_select_first"; - if(!PE_can_edit(psys)) return; + /* api callbacks */ + ot->exec= select_first_exec; + ot->poll= PE_poll; -// getmouseco_areawin(mval); - - data.scene= NULL; // XXX - data.mval=mval; - data.rad=75.0f; - data.rect=0; - data.select=(shift); - - for_mouse_hit_keys(1,psys,select_keys,&data); - - PE_update_selection(scene, ob, 1); - - BIF_undo_push("Select linked keys"); - - return; + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -void PE_borderselect(ViewContext *vc, rcti *rect, int select) +/************************ select last operator ************************/ + +static void select_tip(PEData *data, int pa_index) +{ + ParticleSystem *psys= data->psys; + ParticleData *pa= psys->particles + pa_index; + ParticleEditKey *key= psys->edit->keys[pa_index] + pa->totkey-1; + + key->flag |= PEK_SELECT; +} + +static int select_last_exec(bContext *C, wmOperator *op) +{ + PEData data; + + PE_set_data(C, &data); + PE_foreach_particle(&data, select_tip); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_select_last(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Select Last"; + ot->idname= "PARTICLE_OT_select_last"; + + /* api callbacks */ + ot->exec= select_last_exec; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ select linked operator ************************/ + +static int select_linked_exec(bContext *C, wmOperator *op) +{ + PEData data; + short mval[2]; + int location[2]; + + RNA_int_get_array(op->ptr, "location", location); + mval[0]= location[0]; + mval[1]= location[1]; + + PE_set_view3d_data(C, &data); + data.mval= mval; + data.rad=75.0f; + data.select= !RNA_boolean_get(op->ptr, "deselect"); + + for_mouse_hit_keys(&data, select_keys, 1); /* nearest only */ + PE_update_selection(data.scene, data.ob, 1); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob); + + return OPERATOR_FINISHED; +} + +static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + ARegion *ar= CTX_wm_region(C); + int location[2]; + + location[0]= event->x - ar->winrct.xmin; + location[1]= event->y - ar->winrct.ymin; + RNA_int_set_array(op->ptr, "location", location); + + return select_linked_exec(C, op); +} + +void PARTICLE_OT_select_linked(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Select Linked"; + ot->idname= "PARTICLE_OT_select_linked"; + + /* api callbacks */ + ot->exec= select_linked_exec; + ot->invoke= select_linked_invoke; + ot->poll= PE_poll_3dview; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked keys rather than selecting them."); + RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "", 0, 16384); +} + +/************************ border select operator ************************/ + +void PE_border_select(ViewContext *vc, rcti *rect, int select) { - struct {Scene *scene; short *mval; float rad; rcti* rect; int select; } data; Scene *scene= vc->scene; Object *ob= vc->obact; - ParticleSystem *psys = PE_get_current(ob); + ParticleSystem *psys= PE_get_current(scene, ob); + PEData data; if(!PE_can_edit(psys)) return; + memset(&data, 0, sizeof(data)); + data.vc= *vc; data.scene= scene; - data.mval=0; + data.ob= ob; + data.psys= psys; data.rect= rect; data.select= select; - for_mouse_hit_keys(0, psys, select_key, &data); + for_mouse_hit_keys(&data, select_key, 0); PE_update_selection(scene, ob, 1); - BIF_undo_push("Select keys"); - - return; + /* XXX undo, notifier */ + PE_undo_push(scene, "Border Select"); } -void PE_selectionCB(short selecting, Object *editobj, short *mval, float rad) +/************************ circle select operator ************************/ + +void PE_circle_select(ViewContext *vc, int selecting, short *mval, float rad) { - struct {Scene *scene; short *mval; float rad; rcti* rect; int select; } data; - Scene *scene= NULL; - ParticleSystem *psys = PE_get_current(OBACT); + Scene *scene= vc->scene; + Object *ob= vc->obact; + ParticleSystem *psys= PE_get_current(scene, ob); + PEData data; if(!PE_can_edit(psys)) return; + memset(&data, 0, sizeof(data)); + data.vc= *vc; data.scene= scene; + data.ob= ob; + data.psys= psys; data.mval=mval; data.rad=rad; - data.rect=0; - data.select=(selecting==LEFTMOUSE); + data.select= selecting; - for_mouse_hit_keys(0,psys,select_key,&data); + for_mouse_hit_keys(&data, select_key, 0); -// draw_sel_circle(0, 0, 0, 0, 0); /* signal */ + /* XXX undo, notifier */ + PE_undo_push(scene, "Circle Select"); } -void PE_do_lasso_select(ViewContext *vc, short mcords[][2], short moves, short select) +/************************ lasso select operator ************************/ + +void PE_lasso_select(ViewContext *vc, short mcords[][2], short moves, short select) { Scene *scene= vc->scene; ARegion *ar= vc->ar; - Object *ob = OBACT; - ParticleSystem *psys = PE_get_current(ob); + Object *ob= OBACT; + ParticleSystem *psys= PE_get_current(scene, ob); ParticleSystemModifierData *psmd; ParticleEdit *edit; ParticleData *pa; @@ -1488,41 +1648,41 @@ void PE_do_lasso_select(ViewContext *vc, short mcords[][2], short moves, short s edit=psys->edit; totpart=psys->totpart; - LOOP_PARTICLES(i,pa){ + LOOP_PARTICLES(i,pa) { if(pa->flag & PARS_HIDE) continue; psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, mat); - if(scene->selectmode==SCE_SELECT_POINT){ - LOOP_KEYS(k,key){ + if(scene->selectmode==SCE_SELECT_POINT) { + LOOP_KEYS(k,key) { VECCOPY(co, key->co); Mat4MulVecfl(mat, co); project_short(ar, co, vertco); - if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1])){ + if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1])) { if(select && !(key->flag & PEK_SELECT)) { - key->flag|=PEK_SELECT; + key->flag |= PEK_SELECT; pa->flag |= PARS_EDIT_RECALC; } else if(key->flag & PEK_SELECT) { - key->flag&=~PEK_SELECT; + key->flag &= ~PEK_SELECT; pa->flag |= PARS_EDIT_RECALC; } } } } - else if(scene->selectmode==SCE_SELECT_END){ - key = edit->keys[i] + pa->totkey - 1; + else if(scene->selectmode==SCE_SELECT_END) { + key= edit->keys[i] + pa->totkey - 1; VECCOPY(co, key->co); Mat4MulVecfl(mat, co); project_short(ar, co,vertco); - if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1])){ + if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1])) { if(select && !(key->flag & PEK_SELECT)) { - key->flag|=PEK_SELECT; + key->flag |= PEK_SELECT; pa->flag |= PARS_EDIT_RECALC; } else if(key->flag & PEK_SELECT) { - key->flag&=~PEK_SELECT; + key->flag &= ~PEK_SELECT; pa->flag |= PARS_EDIT_RECALC; } } @@ -1531,37 +1691,26 @@ void PE_do_lasso_select(ViewContext *vc, short mcords[][2], short moves, short s PE_update_selection(scene, ob, 1); - BIF_undo_push("Lasso select particles"); - + /* XXX undo, notifier */ + PE_undo_push(scene, "Lasso select particles"); } -void PE_hide(int mode) +/*************************** hide operator **************************/ + +static int hide_exec(bContext *C, wmOperator *op) { - Scene *scene= NULL; - Object *ob = OBACT; - ParticleSystem *psys = PE_get_current(ob); + Object *ob= CTX_data_active_object(C); + Scene *scene= CTX_data_scene(C); + ParticleSystem *psys= PE_get_current(scene, ob); ParticleEdit *edit; ParticleEditKey *key; ParticleData *pa; int i, k, totpart; - if(!PE_can_edit(psys)) return; - - edit = psys->edit; - totpart = psys->totpart; + edit= psys->edit; + totpart= psys->totpart; - if(mode == 0){ /* reveal all particles */ - LOOP_PARTICLES(i, pa){ - if(pa->flag & PARS_HIDE) { - pa->flag &= ~PARS_HIDE; - pa->flag |= PARS_EDIT_RECALC; - - LOOP_KEYS(k, key) - key->flag |= PEK_SELECT; - } - } - } - else if(mode == 1){ /* hide unselected particles */ + if(RNA_enum_get(op->ptr, "unselected")) { LOOP_PARTICLES(i, pa) { if(!particle_is_selected(psys, pa)) { pa->flag |= PARS_HIDE; @@ -1572,7 +1721,7 @@ void PE_hide(int mode) } } } - else{ /* hide selected particles */ + else { LOOP_PARTICLES(i, pa) { if(particle_is_selected(psys, pa)) { pa->flag |= PARS_HIDE; @@ -1585,43 +1734,199 @@ void PE_hide(int mode) } PE_update_selection(scene, ob, 1); - BIF_undo_push("(Un)hide elements"); - + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob); + + return OPERATOR_FINISHED; } -void PE_select_less(void) +void PARTICLE_OT_hide(wmOperatorType *ot) { - Scene *scene= NULL; - ParticleSystem *psys = PE_get_current(OBACT); - - if(!PE_can_edit(psys)) return; - - PE_foreach_element(psys,select_less_keys,NULL); + /* identifiers */ + ot->name= "Hide Selected"; + ot->idname= "PARTICLE_OT_hide"; - BIF_undo_push("Select less"); + /* api callbacks */ + ot->exec= hide_exec; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* props */ + RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); } -void PE_select_more(void) +/*************************** reveal operator **************************/ + +static int reveal_exec(bContext *C, wmOperator *op) { - Scene *scene= NULL; - ParticleSystem *psys = PE_get_current(OBACT); + Object *ob= CTX_data_active_object(C); + Scene *scene= CTX_data_scene(C); + ParticleSystem *psys= PE_get_current(scene, ob); + ParticleEdit *edit; + ParticleEditKey *key; + ParticleData *pa; + int i, k, totpart; - if(!PE_can_edit(psys)) return; + edit= psys->edit; + totpart= psys->totpart; - PE_foreach_element(psys,select_more_keys,NULL); - - BIF_undo_push("Select more"); + LOOP_PARTICLES(i, pa) { + if(pa->flag & PARS_HIDE) { + pa->flag &= ~PARS_HIDE; + pa->flag |= PARS_EDIT_RECALC; + + LOOP_KEYS(k, key) + key->flag |= PEK_SELECT; + } + } + + PE_update_selection(scene, ob, 1); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob); + + return OPERATOR_FINISHED; } -/************************************************/ -/* Edit Rekey */ -/************************************************/ -static void rekey_element(ParticleSystem *psys, int index, void *userData) +void PARTICLE_OT_reveal(wmOperatorType *ot) { - struct {Scene *scene; Object *ob; float dval; } *data = userData; - ParticleData *pa = psys->particles + index; - ParticleEdit *edit = psys->edit; - ParticleEditSettings *pset = PE_settings(data->scene); + /* identifiers */ + ot->name= "Reveal"; + ot->idname= "PARTICLE_OT_reveal"; + + /* api callbacks */ + ot->exec= reveal_exec; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ select less operator ************************/ + +static void select_less_keys(PEData *data, int pa_index) +{ + ParticleSystem *psys= data->psys; + ParticleEdit *edit= psys->edit; + ParticleData *pa= &psys->particles[pa_index]; + ParticleEditKey *key; + int k; + + for(k=0,key=edit->keys[pa_index]; ktotkey; k++,key++) { + if((key->flag & PEK_SELECT)==0) continue; + + if(k==0) { + if(((key+1)->flag&PEK_SELECT)==0) + key->flag |= PEK_TO_SELECT; + } + else if(k==pa->totkey-1) { + if(((key-1)->flag&PEK_SELECT)==0) + key->flag |= PEK_TO_SELECT; + } + else { + if((((key-1)->flag & (key+1)->flag) & PEK_SELECT)==0) + key->flag |= PEK_TO_SELECT; + } + } + + for(k=0,key=edit->keys[pa_index]; ktotkey; k++,key++) { + if(key->flag&PEK_TO_SELECT) + key->flag &= ~(PEK_TO_SELECT|PEK_SELECT); + } +} + +static int select_less_exec(bContext *C, wmOperator *op) +{ + PEData data; + + PE_set_data(C, &data); + PE_foreach_particle(&data, select_less_keys); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_select_less(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Select Less"; + ot->idname= "PARTICLE_OT_select_less"; + + /* api callbacks */ + ot->exec= select_less_exec; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ select more operator ************************/ + +static void select_more_keys(PEData *data, int pa_index) +{ + ParticleSystem *psys= data->psys; + ParticleEdit *edit= psys->edit; + ParticleData *pa= &psys->particles[pa_index]; + ParticleEditKey *key; + int k; + + for(k=0,key=edit->keys[pa_index]; ktotkey; k++,key++) { + if(key->flag & PEK_SELECT) continue; + + if(k==0) { + if((key+1)->flag&PEK_SELECT) + key->flag |= PEK_TO_SELECT; + } + else if(k==pa->totkey-1) { + if((key-1)->flag&PEK_SELECT) + key->flag |= PEK_TO_SELECT; + } + else { + if(((key-1)->flag | (key+1)->flag) & PEK_SELECT) + key->flag |= PEK_TO_SELECT; + } + } + + for(k=0,key=edit->keys[pa_index]; ktotkey; k++,key++) { + if(key->flag&PEK_TO_SELECT) { + key->flag &= ~PEK_TO_SELECT; + key->flag |= PEK_SELECT; + } + } +} + +static int select_more_exec(bContext *C, wmOperator *op) +{ + PEData data; + + PE_set_data(C, &data); + PE_foreach_particle(&data, select_more_keys); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_select_more(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Select More"; + ot->idname= "PARTICLE_OT_select_more"; + + /* api callbacks */ + ot->exec= select_more_exec; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ rekey operator ************************/ + +static void rekey_particle(PEData *data, int pa_index) +{ + ParticleSystem *psys= data->psys; + ParticleData *pa= &psys->particles[pa_index]; + ParticleEdit *edit= psys->edit; + ParticleEditSettings *pset= PE_settings(data->scene); ParticleKey state; HairKey *key, *new_keys; ParticleEditKey *ekey; @@ -1630,73 +1935,88 @@ static void rekey_element(ParticleSystem *psys, int index, void *userData) pa->flag |= PARS_REKEY; - key = new_keys = MEM_callocN(pset->totrekey * sizeof(HairKey),"Hair re-key keys"); + key= new_keys= MEM_callocN(pset->totrekey * sizeof(HairKey),"Hair re-key keys"); /* root and tip stay the same */ VECCOPY(key->co, pa->hair->co); VECCOPY((key + pset->totrekey - 1)->co, (pa->hair + pa->totkey - 1)->co); - sta = key->time = pa->hair->time; - end = (key + pset->totrekey - 1)->time = (pa->hair + pa->totkey - 1)->time; - dval = (end - sta) / (float)(pset->totrekey - 1); + sta= key->time= pa->hair->time; + end= (key + pset->totrekey - 1)->time= (pa->hair + pa->totkey - 1)->time; + dval= (end - sta) / (float)(pset->totrekey - 1); /* interpolate new keys from old ones */ for(k=1,key++; ktotrekey-1; k++,key++) { - state.time = (float)k / (float)(pset->totrekey-1); - psys_get_particle_on_path(data->scene, data->ob, psys, index, &state, 0); + state.time= (float)k / (float)(pset->totrekey-1); + psys_get_particle_on_path(data->scene, data->ob, psys, pa_index, &state, 0); VECCOPY(key->co, state.co); - key->time = sta + k * dval; + key->time= sta + k * dval; } /* replace keys */ if(pa->hair) MEM_freeN(pa->hair); - pa->hair = new_keys; + pa->hair= new_keys; pa->totkey=pset->totrekey; - if(edit->keys[index]) - MEM_freeN(edit->keys[index]); - ekey = edit->keys[index] = MEM_callocN(pa->totkey * sizeof(ParticleEditKey),"Hair re-key edit keys"); + if(edit->keys[pa_index]) + MEM_freeN(edit->keys[pa_index]); + ekey= edit->keys[pa_index]= MEM_callocN(pa->totkey * sizeof(ParticleEditKey),"Hair re-key edit keys"); for(k=0, key=pa->hair; ktotkey; k++, key++, ekey++) { - ekey->co = key->co; - ekey->time = &key->time; + ekey->co= key->co; + ekey->time= &key->time; } pa->flag &= ~PARS_REKEY; pa->flag |= PARS_EDIT_RECALC; } -void PE_rekey(void) +static int rekey_exec(bContext *C, wmOperator *op) { - Scene *scene= NULL; // XXX - Object *ob=OBACT; - ParticleSystem *psys = PE_get_current(ob); - ParticleEditSettings *pset = PE_settings(scene); - struct {Scene *scene; Object *ob; float dval; } data; + PEData data; + ParticleEditSettings *pset; - if(!PE_can_edit(psys)) return; + PE_set_data(C, &data); - data.scene = scene; - data.ob = ob; - data.dval = 1.0f / (float)(pset->totrekey-1); + pset= PE_settings(data.scene); + pset->totrekey= RNA_int_get(op->ptr, "keys"); - foreach_selected_element(psys, rekey_element, &data); + data.dval= 1.0f / (float)(pset->totrekey-1); + + foreach_selected_particle(&data, rekey_particle); - psys->edit->totkeys = psys_count_keys(psys); - - recalc_lengths(psys); + data.psys->edit->totkeys= psys_count_keys(data.psys); + recalc_lengths(data.psys); - PE_update_object(scene, ob, 1); + PE_update_object(data.scene, data.ob, 1); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, data.ob); - BIF_undo_push("Re-key particles"); + return OPERATOR_FINISHED; } -static void rekey_element_to_time(Object *ob, int index, float path_time) +void PARTICLE_OT_rekey(wmOperatorType *ot) { - Scene *scene= NULL; // XXX - ParticleSystem *psys = PE_get_current(ob); + /* identifiers */ + ot->name= "Rekey"; + ot->idname= "PARTICLE_OT_rekey"; + + /* api callbacks */ + ot->exec= rekey_exec; + // XXX show buttons ot->invoke= rekey_invoke; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_int(ot->srna, "keys", 2, 2, INT_MAX, "Number of Keys", "", 2, 100); +} + +static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float path_time) +{ + ParticleSystem *psys= PE_get_current(scene, ob); ParticleEdit *edit=0; ParticleData *pa; ParticleKey state; @@ -1706,48 +2026,50 @@ static void rekey_element_to_time(Object *ob, int index, float path_time) if(psys==0) return; - edit = psys->edit; + edit= psys->edit; - pa = psys->particles + index; + pa= &psys->particles[pa_index]; pa->flag |= PARS_REKEY; - key = new_keys = MEM_dupallocN(pa->hair); + key= new_keys= MEM_dupallocN(pa->hair); /* interpolate new keys from old ones (roots stay the same) */ for(k=1, key++; k < pa->totkey; k++, key++) { - state.time = path_time * (float)k / (float)(pa->totkey-1); - psys_get_particle_on_path(scene, ob, psys, index, &state, 0); + state.time= path_time * (float)k / (float)(pa->totkey-1); + psys_get_particle_on_path(scene, ob, psys, pa_index, &state, 0); VECCOPY(key->co, state.co); } /* replace hair keys */ if(pa->hair) MEM_freeN(pa->hair); - pa->hair = new_keys; + pa->hair= new_keys; /* update edit pointers */ - for(k=0, key=pa->hair, ekey=edit->keys[index]; ktotkey; k++, key++, ekey++) { - ekey->co = key->co; - ekey->time = &key->time; + for(k=0, key=pa->hair, ekey=edit->keys[pa_index]; ktotkey; k++, key++, ekey++) { + ekey->co= key->co; + ekey->time= &key->time; } pa->flag &= ~PARS_REKEY; } -static int remove_tagged_elements(Scene *scene, Object *ob, ParticleSystem *psys) +/************************* utilities **************************/ + +static int remove_tagged_particles(Scene *scene, Object *ob, ParticleSystem *psys) { - ParticleEdit *edit = psys->edit; - ParticleEditSettings *pset = PE_settings(scene); + ParticleEdit *edit= psys->edit; + ParticleEditSettings *pset= PE_settings(scene); ParticleData *pa, *npa=0, *new_pars=0; ParticleEditKey **key, **nkey=0, **new_keys=0; ParticleSystemModifierData *psmd; - int i, totpart, new_totpart = psys->totpart, removed = 0; + int i, totpart, new_totpart= psys->totpart, removed= 0; if(pset->flag & PE_X_MIRROR) { /* mirror tags */ - psmd = psys_get_modifier(ob, psys); - totpart = psys->totpart; + psmd= psys_get_modifier(ob, psys); + totpart= psys->totpart; LOOP_PARTICLES(i,pa) if(pa->flag & PARS_TAG) @@ -1763,12 +2085,12 @@ static int remove_tagged_elements(Scene *scene, Object *ob, ParticleSystem *psys if(new_totpart != psys->totpart) { if(new_totpart) { - npa = new_pars = MEM_callocN(new_totpart * sizeof(ParticleData), "ParticleData array"); - nkey = new_keys = MEM_callocN(new_totpart * sizeof(ParticleEditKey *), "ParticleEditKey array"); + npa= new_pars= MEM_callocN(new_totpart * sizeof(ParticleData), "ParticleData array"); + nkey= new_keys= MEM_callocN(new_totpart * sizeof(ParticleEditKey *), "ParticleEditKey array"); } - pa = psys->particles; - key = edit->keys; + pa= psys->particles; + key= edit->keys; for(i=0; itotpart; i++, pa++, key++) { if(pa->flag & PARS_TAG) { if(*key) @@ -1785,19 +2107,19 @@ static int remove_tagged_elements(Scene *scene, Object *ob, ParticleSystem *psys } if(psys->particles) MEM_freeN(psys->particles); - psys->particles = new_pars; + psys->particles= new_pars; if(edit->keys) MEM_freeN(edit->keys); - edit->keys = new_keys; + edit->keys= new_keys; if(edit->mirror_cache) { MEM_freeN(edit->mirror_cache); - edit->mirror_cache = NULL; + edit->mirror_cache= NULL; } - psys->totpart = new_totpart; + psys->totpart= new_totpart; - edit->totkeys = psys_count_keys(psys); + edit->totkeys= psys_count_keys(psys); } return removed; @@ -1805,18 +2127,18 @@ static int remove_tagged_elements(Scene *scene, Object *ob, ParticleSystem *psys static void remove_tagged_keys(Scene *scene, Object *ob, ParticleSystem *psys) { - ParticleEdit *edit = psys->edit; - ParticleEditSettings *pset = PE_settings(scene); + ParticleEdit *edit= psys->edit; + ParticleEditSettings *pset= PE_settings(scene); ParticleData *pa; HairKey *key, *nkey, *new_keys=0; ParticleEditKey *ekey; ParticleSystemModifierData *psmd; - int i, k, totpart = psys->totpart; + int i, k, totpart= psys->totpart; short new_totkey; if(pset->flag & PE_X_MIRROR) { /* mirror key tags */ - psmd = psys_get_modifier(ob, psys); + psmd= psys_get_modifier(ob, psys); LOOP_PARTICLES(i,pa) { LOOP_KEYS(k,ekey) { @@ -1829,7 +2151,7 @@ static void remove_tagged_keys(Scene *scene, Object *ob, ParticleSystem *psys) } LOOP_PARTICLES(i,pa) { - new_totkey = pa->totkey; + new_totkey= pa->totkey; LOOP_KEYS(k,ekey) { if(ekey->flag & PEK_TAG) new_totkey--; @@ -1838,19 +2160,19 @@ static void remove_tagged_keys(Scene *scene, Object *ob, ParticleSystem *psys) if(new_totkey < 2) pa->flag |= PARS_TAG; } - remove_tagged_elements(scene, ob, psys); + remove_tagged_particles(scene, ob, psys); - totpart = psys->totpart; + totpart= psys->totpart; LOOP_PARTICLES(i,pa) { - new_totkey = pa->totkey; + new_totkey= pa->totkey; LOOP_KEYS(k,ekey) { if(ekey->flag & PEK_TAG) new_totkey--; } if(new_totkey != pa->totkey) { - key = pa->hair; - nkey = new_keys = MEM_callocN(new_totkey*sizeof(HairKey), "HairKeys"); + key= pa->hair; + nkey= new_keys= MEM_callocN(new_totkey*sizeof(HairKey), "HairKeys"); for(k=0, ekey=edit->keys[i]; kflag & PEK_TAG && key < pa->hair + pa->totkey) { @@ -1860,36 +2182,39 @@ static void remove_tagged_keys(Scene *scene, Object *ob, ParticleSystem *psys) if(key < pa->hair + pa->totkey) { VECCOPY(nkey->co, key->co); - nkey->time = key->time; - nkey->weight = key->weight; + nkey->time= key->time; + nkey->weight= key->weight; } } if(pa->hair) MEM_freeN(pa->hair); - pa->hair = new_keys; + pa->hair= new_keys; pa->totkey=new_totkey; if(edit->keys[i]) MEM_freeN(edit->keys[i]); - ekey = edit->keys[i] = MEM_callocN(new_totkey*sizeof(ParticleEditKey), "particle edit keys"); + ekey= edit->keys[i]= MEM_callocN(new_totkey*sizeof(ParticleEditKey), "particle edit keys"); for(k=0, key=pa->hair; ktotkey; k++, key++, ekey++) { - ekey->co = key->co; - ekey->time = &key->time; + ekey->co= key->co; + ekey->time= &key->time; } } } - edit->totkeys = psys_count_keys(psys); + edit->totkeys= psys_count_keys(psys); } + +/************************ subdivide opertor *********************/ + /* works like normal edit mode subdivide, inserts keys between neighbouring selected keys */ -static void subdivide_element(ParticleSystem *psys, int index, void *userData) +static void subdivide_particle(PEData *data, int pa_index) { - struct {Scene *scene; Object *ob; } *data = userData; - ParticleEdit *edit = psys->edit; - ParticleData *pa = psys->particles + index; + ParticleSystem *psys= data->psys; + ParticleEdit *edit= psys->edit; + ParticleData *pa= &psys->particles[pa_index]; ParticleKey state; HairKey *key, *nkey, *new_keys; @@ -1899,7 +2224,7 @@ static void subdivide_element(ParticleSystem *psys, int index, void *userData) short totnewkey=0; float endtime; - for(k=0, ekey=edit->keys[index]; ktotkey-1; k++,ekey++){ + for(k=0, ekey=edit->keys[pa_index]; ktotkey-1; k++,ekey++) { if(ekey->flag&PEK_SELECT && (ekey+1)->flag&PEK_SELECT) totnewkey++; } @@ -1908,25 +2233,25 @@ static void subdivide_element(ParticleSystem *psys, int index, void *userData) pa->flag |= PARS_REKEY; - nkey = new_keys = MEM_callocN((pa->totkey+totnewkey)*(sizeof(HairKey)),"Hair subdivide keys"); - nekey = new_ekeys = MEM_callocN((pa->totkey+totnewkey)*(sizeof(ParticleEditKey)),"Hair subdivide edit keys"); - endtime = pa->hair[pa->totkey-1].time; + nkey= new_keys= MEM_callocN((pa->totkey+totnewkey)*(sizeof(HairKey)),"Hair subdivide keys"); + nekey= new_ekeys= MEM_callocN((pa->totkey+totnewkey)*(sizeof(ParticleEditKey)),"Hair subdivide edit keys"); + endtime= pa->hair[pa->totkey-1].time; - for(k=0, key=pa->hair, ekey=edit->keys[index]; ktotkey-1; k++, key++, ekey++){ + for(k=0, key=pa->hair, ekey=edit->keys[pa_index]; ktotkey-1; k++, key++, ekey++) { memcpy(nkey,key,sizeof(HairKey)); memcpy(nekey,ekey,sizeof(ParticleEditKey)); - nekey->co = nkey->co; - nekey->time = &nkey->time; + nekey->co= nkey->co; + nekey->time= &nkey->time; nkey++; nekey++; - if(ekey->flag & PEK_SELECT && (ekey+1)->flag & PEK_SELECT){ + if(ekey->flag & PEK_SELECT && (ekey+1)->flag & PEK_SELECT) { nkey->time= (key->time + (key+1)->time)*0.5f; - state.time = (endtime != 0.0f)? nkey->time/endtime: 0.0f; - psys_get_particle_on_path(data->scene, data->ob, psys, index, &state, 0); + state.time= (endtime != 0.0f)? nkey->time/endtime: 0.0f; + psys_get_particle_on_path(data->scene, data->ob, psys, pa_index, &state, 0); VECCOPY(nkey->co, state.co); nekey->co= nkey->co; @@ -1941,61 +2266,71 @@ static void subdivide_element(ParticleSystem *psys, int index, void *userData) memcpy(nkey,key,sizeof(HairKey)); memcpy(nekey,ekey,sizeof(ParticleEditKey)); - nekey->co = nkey->co; - nekey->time = &nkey->time; + nekey->co= nkey->co; + nekey->time= &nkey->time; if(pa->hair) MEM_freeN(pa->hair); - pa->hair = new_keys; + pa->hair= new_keys; - if(edit->keys[index]) - MEM_freeN(edit->keys[index]); + if(edit->keys[pa_index]) + MEM_freeN(edit->keys[pa_index]); - edit->keys[index] = new_ekeys; + edit->keys[pa_index]= new_ekeys; pa->totkey += totnewkey; pa->flag |= PARS_EDIT_RECALC; pa->flag &= ~PARS_REKEY; } -void PE_subdivide(Object *ob) +static int subdivide_exec(bContext *C, wmOperator *op) { - ParticleSystem *psys = PE_get_current(ob); - Scene *scene= NULL; - struct {Scene *scene; Object *ob; } data; + PEData data; - if(!PE_can_edit(psys)) return; + PE_set_data(C, &data); + PE_foreach_particle(&data, subdivide_particle); + + data.psys->edit->totkeys= psys_count_keys(data.psys); + + recalc_lengths(data.psys); + PE_recalc_world_cos(data.ob, data.psys); - data.scene= scene; - data.ob= ob; - PE_foreach_element(psys,subdivide_element,&data); - - psys->edit->totkeys = psys_count_keys(psys); - - recalc_lengths(psys); - PE_recalc_world_cos(ob, psys); + PE_update_object(data.scene, data.ob, 1); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, data.ob); - PE_update_object(scene, ob, 1); - - BIF_undo_push("Subdivide hair(s)"); + return OPERATOR_FINISHED; } -void PE_remove_doubles() +void PARTICLE_OT_subdivide(wmOperatorType *ot) { - Scene *scene= NULL; // XXX - Object *ob=OBACT; - ParticleSystem *psys=PE_get_current(ob); + /* identifiers */ + ot->name= "Subdivide"; + ot->idname= "PARTICLE_OT_subdivide"; + + /* api callbacks */ + ot->exec= subdivide_exec; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/************************ remove doubles opertor *********************/ + +static int remove_doubles_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + ParticleSystem *psys= PE_get_current(scene, ob); ParticleEditSettings *pset=PE_settings(scene); ParticleData *pa; ParticleEdit *edit; ParticleSystemModifierData *psmd; KDTree *tree; KDTreeNearest nearest[10]; - float mat[4][4], co[3]; + float mat[4][4], co[3], threshold= RNA_float_get(op->ptr, "threshold"); int i, n, totn, removed, totpart, flag, totremoved; - if(!PE_can_edit(psys)) return; - edit= psys->edit; psmd= psys_get_modifier(ob, psys); totremoved= 0; @@ -2029,7 +2364,7 @@ void PE_remove_doubles() for(n=0; n i && nearest[n].dist < 0.0002f) { + if(nearest[n].index > i && nearest[n].dist < threshold) { if(!(pa->flag & PARS_TAG)) { pa->flag |= PARS_TAG; removed++; @@ -2044,817 +2379,155 @@ void PE_remove_doubles() /* remove tagged particles - don't do mirror here! */ flag= pset->flag; pset->flag &= ~PE_X_MIRROR; - remove_tagged_elements(scene, ob, psys); + remove_tagged_particles(scene, ob, psys); pset->flag= flag; totremoved += removed; } while(removed); -// if(totremoved) -// XXX notice("Removed: %d", totremoved); + if(totremoved == 0) + return OPERATOR_CANCELLED; + + BKE_reportf(op->reports, RPT_INFO, "Remove %d double particles.", totremoved); PE_recalc_world_cos(ob, psys); DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - BIF_undo_push("Remove double particles"); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob); + + return OPERATOR_FINISHED; } +void PARTICLE_OT_remove_doubles(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Remove Doubles"; + ot->idname= "PARTICLE_OT_remove_doubles"; + + /* api callbacks */ + ot->exec= remove_doubles_exec; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_float(ot->srna, "threshold", 0.0002f, 0.0f, FLT_MAX, "Threshold", "Threshold distance withing which particles are removed", 0.00001f, 0.1f); +} + +/********************* radial control operator *********************/ + /* XXX static */ void PE_radialcontrol_callback(const int mode, const int val) { - ParticleEditSettings *pset = NULL; // XXX PE_settings(scene); + ParticleEditSettings *pset= NULL; // XXX PE_settings(scene); if(pset->brushtype>=0) { ParticleBrushData *brush= &pset->brush[pset->brushtype]; if(mode == RADIALCONTROL_SIZE) - brush->size = val; + brush->size= val; else if(mode == RADIALCONTROL_STRENGTH) - brush->strength = val; + brush->strength= val; } - (*PE_radialcontrol()) = NULL; + (*PE_radialcontrol())= NULL; } struct RadialControl **PE_radialcontrol(void) { - static struct RadialControl *rc = NULL; + static struct RadialControl *rc= NULL; return &rc; } void PE_radialcontrol_start(const int mode) { - ParticleEditSettings *pset = NULL; // XXX PE_settings(scene); + ParticleEditSettings *pset= NULL; // XXX PE_settings(scene); int orig= 1; if(pset->brushtype>=0) { ParticleBrushData *brush= &pset->brush[pset->brushtype]; if(mode == RADIALCONTROL_SIZE) - orig = brush->size; + orig= brush->size; else if(mode == RADIALCONTROL_STRENGTH) - orig = brush->strength; + orig= brush->strength; // if(mode != RADIALCONTROL_NONE) // (*PE_radialcontrol())= radialcontrol_start(mode, PE_radialcontrol_callback, orig, 100, 0); } } -/************************************************/ -/* Edit Brushes */ -/************************************************/ -static void brush_comb(ParticleSystem *psys, float mat[][4], float imat[][4], int pa_index, int key_index, void *userData) +/*************************** delete operator **************************/ + +enum { DEL_PARTICLE, DEL_KEY }; + +static EnumPropertyItem delete_type_items[]= { + {DEL_PARTICLE, "PARTICLE", "Particle", ""}, + {DEL_KEY, "KEY", "Key", ""}, + {0, NULL, NULL}}; + +static void set_delete_particle(PEData *data, int pa_index) { - struct {Scene *scene; Object *ob; short *mval; float rad; rcti* rect; float dist; float *dvec; float combfac;} *data = userData; - ParticleData *pa= &psys->particles[pa_index]; - ParticleEditSettings *pset= PE_settings(data->scene); - HairKey *key = pa->hair + key_index; - float cvec[3], fac; + ParticleSystem *psys= data->psys; - if(pset->flag & PE_LOCK_FIRST && key_index == 0) return; - - fac = (float)pow((double)(1.0f - data->dist / data->rad), (double)data->combfac); - - VECCOPY(cvec,data->dvec); - Mat4Mul3Vecfl(imat,cvec); - VecMulf(cvec, fac); - VECADD(key->co, key->co, cvec); - - pa->flag |= PARS_EDIT_RECALC; + psys->particles[pa_index].flag |= PARS_TAG; } -static void brush_cut(ParticleSystem *psys, int index, void *userData) +static void set_delete_particle_key(PEData *data, int pa_index, int key_index) { - struct {Scene *scene; short *mval; float rad; rcti* rect; int selected; float cutfac; bglMats mats;} *data = userData; - ARegion *ar= NULL; // XXX - Object *ob= NULL; // XXX - ParticleData *pa= &psys->particles[index]; - ParticleCacheKey *key = psys->pathcache[index]; - float rad2, cut_time = 1.0; - float x0, x1, v0, v1, o0, o1, xo0, xo1, d, dv; - int k, cut, keys = (int)pow(2.0, (double)psys->part->draw_step); - short vertco[2]; + ParticleSystem *psys= data->psys; - /* blunt scissors */ - if(BLI_frand() > data->cutfac) return; - - rad2 = data->rad * data->rad; - - cut=0; - - project_short_noclip(ar, key->co, vertco); - x0 = (float)vertco[0]; - x1 = (float)vertco[1]; - - o0 = (float)data->mval[0]; - o1 = (float)data->mval[1]; - - xo0 = x0 - o0; - xo1 = x1 - o1; - - /* check if root is inside circle */ - if(xo0*xo0 + xo1*xo1 < rad2 && test_key_depth(key->co,&(data->mats))) { - cut_time = -1.0f; - cut = 1; - } - else { - /* calculate path time closest to root that was inside the circle */ - for(k=1, key++; k<=keys; k++, key++){ - project_short_noclip(ar, key->co, vertco); - - if(test_key_depth(key->co,&(data->mats)) == 0) { - x0 = (float)vertco[0]; - x1 = (float)vertco[1]; - - xo0 = x0 - o0; - xo1 = x1 - o1; - continue; - } - - v0 = (float)vertco[0] - x0; - v1 = (float)vertco[1] - x1; - - dv = v0*v0 + v1*v1; - - d = (v0*xo1 - v1*xo0); - - d = dv * rad2 - d*d; - - if(d > 0.0f) { - d = sqrt(d); - - cut_time = -(v0*xo0 + v1*xo1 + d); - - if(cut_time > 0.0f) { - cut_time /= dv; - - if(cut_time < 1.0f) { - cut_time += (float)(k-1); - cut_time /= (float)keys; - cut = 1; - break; - } - } - } - - x0 = (float)vertco[0]; - x1 = (float)vertco[1]; - - xo0 = x0 - o0; - xo1 = x1 - o1; - } - } - - if(cut) { - if(cut_time < 0.0f) { - pa->flag |= PARS_TAG; - } - else { - rekey_element_to_time(ob, index, cut_time); - pa->flag |= PARS_EDIT_RECALC; - } - } -} - -static void brush_length(ParticleSystem *psys, int index, void *userData) -{ - struct {Scene *scene; short *mval; float rad; rcti* rect; float dist; float growfac; } *data = userData; - ParticleData *pa = &psys->particles[index]; - HairKey *key; - float dvec[3],pvec[3]; - int k; - - key = pa->hair; - VECCOPY(pvec,key->co); - - for(k=1, key++; ktotkey; k++,key++){ - VECSUB(dvec,key->co,pvec); - VECCOPY(pvec,key->co); - VecMulf(dvec,data->growfac); - VECADD(key->co,(key-1)->co,dvec); - } - - pa->flag |= PARS_EDIT_RECALC; -} - -static void brush_puff(ParticleSystem *psys, int index, void *userData) -{ - struct {Scene *scene; short *mval; float rad; rcti* rect; float dist; - Object *ob; DerivedMesh *dm; float pufffac; int invert; } *data = userData; - ParticleData *pa = &psys->particles[index]; - ParticleEdit *edit = psys->edit; - HairKey *key; - float mat[4][4], imat[4][4]; - float lastco[3], rootco[3], co[3], nor[3], kco[3], dco[3], fac, length; - int k; - - psys_mat_hair_to_global(data->ob, data->dm, psys->part->from, pa, mat); - Mat4Invert(imat,mat); - - /* find root coordinate and normal on emitter */ - key = pa->hair; - VECCOPY(co, key->co); - Mat4MulVecfl(mat, co); - - index= BLI_kdtree_find_nearest(edit->emitter_field, co, NULL, NULL); - if(index == -1) return; - - VECCOPY(rootco, co); - VecCopyf(nor, &psys->edit->emitter_cosnos[index*6+3]); - Normalize(nor); - length= 0.0f; - - fac= (float)pow((double)(1.0f - data->dist / data->rad), (double)data->pufffac); - fac *= 0.025f; - if(data->invert) - fac= -fac; - - for(k=1, key++; ktotkey; k++, key++){ - /* compute position as if hair was standing up straight */ - VECCOPY(lastco, co); - VECCOPY(co, key->co); - Mat4MulVecfl(mat, co); - length += VecLenf(lastco, co); - - VECADDFAC(kco, rootco, nor, length); - - /* blend between the current and straight position */ - VECSUB(dco, kco, co); - VECADDFAC(co, co, dco, fac); - - VECCOPY(key->co, co); - Mat4MulVecfl(imat, key->co); - } - - pa->flag |= PARS_EDIT_RECALC; -} - -static void brush_smooth_get(ParticleSystem *psys, float mat[][4], float imat[][4], int pa_index, int key_index, void *userData) -{ - struct {Scene *scene; Object *ob; short *mval; float rad; rcti* rect; float dist; float vec[3]; int tot; float smoothfac;} *data = userData; - ParticleData *pa= &psys->particles[pa_index]; - HairKey *key = pa->hair + key_index; - - if(key_index){ - float dvec[3]; - - VecSubf(dvec,key->co,(key-1)->co); - Mat4Mul3Vecfl(mat,dvec); - VECADD(data->vec,data->vec,dvec); - data->tot++; - } -} - -static void brush_smooth_do(ParticleSystem *psys, float mat[][4], float imat[][4], int pa_index, int key_index, void *userData) -{ - struct {Scene *scene; Object *ob; short *mval; float rad; rcti* rect; float dist; float vec[3]; int tot; float smoothfac;} *data = userData; - ParticleData *pa= &psys->particles[pa_index]; - HairKey *key = pa->hair + key_index; - float vec[3], dvec[3]; - - if(key_index){ - VECCOPY(vec,data->vec); - Mat4Mul3Vecfl(imat,vec); - - VecSubf(dvec,key->co,(key-1)->co); - - VECSUB(dvec,vec,dvec); - VecMulf(dvec,data->smoothfac); - - VECADD(key->co,key->co,dvec); - } - - pa->flag |= PARS_EDIT_RECALC; -} - -#define EXPERIMENTAL_DEFORM_ONLY_PAINTING 1 -static void brush_add(Scene *scene, Object *ob, ParticleSystem *psys, short *mval, short number) -{ - ParticleData *add_pars = MEM_callocN(number*sizeof(ParticleData),"ParticleData add"); - ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys); - ParticleEditSettings *pset= PE_settings(scene); - ARegion *ar= NULL; // XXX - View3D *v3d= NULL; // XXX - ParticleEdit *edit = psys->edit; - int i, k, n = 0, totpart = psys->totpart; - short mco[2]; - short dmx = 0, dmy = 0; - float co1[3], co2[3], min_d, imat[4][4]; - float framestep, timestep = psys_get_timestep(psys->part); - short size = pset->brush[PE_BRUSH_ADD].size; - short size2 = size*size; -#if EXPERIMENTAL_DEFORM_ONLY_PAINTING - DerivedMesh *dm=0; -#endif - Mat4Invert(imat,ob->obmat); - - BLI_srandom(psys->seed+mval[0]+mval[1]); - - /* painting onto the deformed mesh, could be an option? */ -#if EXPERIMENTAL_DEFORM_ONLY_PAINTING - if (psmd->dm->deformedOnly) - dm = psmd->dm; - else - dm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH); -#endif - for(i=0; i1){ - dmx=dmy=size; - while(dmx*dmx+dmy*dmy>size2){ - dmx=(short)((2.0f*BLI_frand()-1.0f)*size); - dmy=(short)((2.0f*BLI_frand()-1.0f)*size); - } - } - - mco[0] = mval[0] + dmx; - mco[1] = mval[1] + dmy; - viewline(ar, v3d, mco, co1, co2); - - Mat4MulVecfl(imat,co1); - Mat4MulVecfl(imat,co2); - min_d=2.0; - - /* warning, returns the derived mesh face */ -#if EXPERIMENTAL_DEFORM_ONLY_PAINTING - if(psys_intersect_dm(scene, ob,dm,0,co1,co2,&min_d,&add_pars[n].num,add_pars[n].fuv,0,0,0,0)) { - add_pars[n].num_dmcache= psys_particle_dm_face_lookup(ob,psmd->dm,add_pars[n].num,add_pars[n].fuv,NULL); - n++; - } -#else -#if 0 - if (psmd->dm->deformedOnly) { - if(psys_intersect_dm(scene, ob,psmd->dm,0,co1,co2,&min_d,&add_pars[n].num,add_pars[n].fuv,0,0,0,0)){ - n++; - } - } else { - /* we need to test against the cage mesh, because 1) its faster and 2) then we can avoid converting the fuv back which is not simple */ - if(psys_intersect_dm(scene, ob,psmd->dm,0,co1,co2,&min_d,&add_pars[n].num,add_pars[n].fuv,0,0,0,0)){ - MFace *mface; - float fuv_mod[3] = {0.0, 0.0, 0.0}; - OrigSpaceFace *osface; - - mface= psmd->dm->getFaceData(psmd->dm,add_pars[n].num,CD_MFACE); - osface= psmd->dm->getFaceData(psmd->dm, add_pars[n].num, CD_ORIGSPACE); - - add_pars[n].fuv[2]=0.0; - - /* use the original index for num and the derived index for num_dmcache */ - add_pars[n].num_dmcache = add_pars[n].num; - add_pars[n].num = *(int *)psmd->dm->getFaceData(psmd->dm, add_pars[n].num, CD_ORIGINDEX); - - /* This is totally unaceptable code (fakeing mesh dara) but changing the target function isnt really nice either, do this temporarily */ - if (1) { /* Evilness*/ - MFace mface_fake; - MVert mvert_fake[4]; - //int test1,test2; - //test1 = add_pars[n].num_dmcache; - //test2 = add_pars[n].num; - - mvert_fake[0].co[2] = mvert_fake[1].co[2] = mvert_fake[2].co[2] = mvert_fake[3].co[2] = 0.0; - - mface_fake.v1 = 0; - mface_fake.v2 = 1; - mface_fake.v3 = 2; - - if (mface->v4) { - mface_fake.v4 = 3; - } else { - mface_fake.v4 = 0; - } - - Vec2Copyf(mvert_fake[0].co, osface->uv[0]); - Vec2Copyf(mvert_fake[1].co, osface->uv[1]); - Vec2Copyf(mvert_fake[2].co, osface->uv[2]); - Vec2Copyf(mvert_fake[3].co, osface->uv[3]); - //printf("before %f %f %i %i\n", add_pars[n].fuv[0], add_pars[n].fuv[1], test1, test2); - psys_interpolate_face(&mvert_fake, &mface_fake, NULL, &add_pars[n].fuv, &fuv_mod, NULL, NULL, NULL); - - /* Apply as the UV */ - Vec2Copyf(add_pars[n].fuv, fuv_mod); - //printf("after %f %f\n", add_pars[n].fuv[0], add_pars[n].fuv[1]); - } - /* Make a fake face, for calculating the derived face's fuv on the original face */ - //PointInFace2DUV(mface->v4, osface->uv[0], osface->uv[1], osface->uv[2], osface->uv[3], add_pars[n].fuv, fuv_mod); - //Vec2Copyf(add_pars[n].fuv, fuv_mod); - - n++; - } - } -#endif -#endif - } - if(n){ - int newtotpart=totpart+n; - float hairmat[4][4], cur_co[3]; - KDTree *tree=0; - ParticleData *pa, *new_pars = MEM_callocN(newtotpart*sizeof(ParticleData),"ParticleData new"); - ParticleEditKey *ekey, **key, **new_keys = MEM_callocN(newtotpart*sizeof(ParticleEditKey *),"ParticleEditKey array new"); - HairKey *hkey; - - /* save existing elements */ - memcpy(new_pars, psys->particles, totpart * sizeof(ParticleData)); - memcpy(new_keys, edit->keys, totpart * sizeof(ParticleEditKey*)); - - /* change old arrays to new ones */ - if(psys->particles) MEM_freeN(psys->particles); - psys->particles = new_pars; - - if(edit->keys) MEM_freeN(edit->keys); - edit->keys = new_keys; - - if(edit->mirror_cache) { - MEM_freeN(edit->mirror_cache); - edit->mirror_cache = NULL; - } - - /* create tree for interpolation */ - if(pset->flag & PE_INTERPOLATE_ADDED && psys->totpart){ - tree=BLI_kdtree_new(psys->totpart); - - for(i=0, pa=psys->particles; idm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,cur_co,0,0,0,0,0); - BLI_kdtree_insert(tree, i, cur_co, NULL); - } - - BLI_kdtree_balance(tree); - } - - psys->totpart = newtotpart; - - /* create new elements */ - pa = psys->particles + totpart; - key = edit->keys + totpart; - - for(i=totpart; ihair = MEM_callocN(pset->totaddkey * sizeof(HairKey), "BakeKey key add"); - ekey = *key = MEM_callocN(pset->totaddkey * sizeof(ParticleEditKey), "ParticleEditKey add"); - pa->totkey = pset->totaddkey; - - for(k=0, hkey=pa->hair; ktotkey; k++, hkey++, ekey++) { - ekey->co = hkey->co; - ekey->time = &hkey->time; - } - - pa->size= 1.0f; - initialize_particle(pa,i,ob,psys,psmd); - reset_particle(scene, pa,psys,psmd,ob,0.0,1.0,0,0,0); - pa->flag |= PARS_EDIT_RECALC; - if(pset->flag & PE_X_MIRROR) - pa->flag |= PARS_TAG; /* signal for duplicate */ - - framestep = pa->lifetime/(float)(pset->totaddkey-1); - - if(tree){ - HairKey *hkey; - ParticleKey key[3]; - KDTreeNearest ptn[3]; - int w, maxw; - float maxd, mind, dd, totw=0.0, weight[3]; - - psys_particle_on_dm(psmd->dm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co1,0,0,0,0,0); - maxw = BLI_kdtree_find_n_nearest(tree,3,co1,NULL,ptn); - - maxd = ptn[maxw-1].dist; - mind = ptn[0].dist; - dd = maxd - mind; - - for(w=0; wtotaddkey; k++) { - hkey = pa->hair + k; - hkey->time = pa->time + k * framestep; - - key[0].time = hkey->time/ 100.0f; - psys_get_particle_on_path(scene, ob, psys, ptn[0].index, key, 0); - VecMulf(key[0].co, weight[0]); - - if(maxw>1) { - key[1].time = key[0].time; - psys_get_particle_on_path(scene, ob, psys, ptn[1].index, key + 1, 0); - VecMulf(key[1].co, weight[1]); - VECADD(key[0].co, key[0].co, key[1].co); - - if(maxw>2) { - key[2].time = key[0].time; - psys_get_particle_on_path(scene, ob, psys, ptn[2].index, key + 2, 0); - VecMulf(key[2].co, weight[2]); - VECADD(key[0].co, key[0].co, key[2].co); - } - } - - if(k==0) - VECSUB(co1, pa->state.co, key[0].co); - - VECADD(pa->hair[k].co, key[0].co, co1); - - pa->hair[k].time = key[0].time; - } - } - else{ - for(k=0, hkey=pa->hair; ktotaddkey; k++, hkey++) { - VECADDFAC(hkey->co, pa->state.co, pa->state.vel, k * framestep * timestep); - pa->hair[k].time += k * framestep; - } - } - for(k=0, hkey=pa->hair; ktotaddkey; k++, hkey++) { - psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat); - Mat4Invert(imat,hairmat); - Mat4MulVecfl(imat, hkey->co); - } - } - edit->totkeys = psys_count_keys(psys); - - if(tree) - BLI_kdtree_free(tree); - } - if(add_pars) - MEM_freeN(add_pars); - -/* painting onto the deformed mesh, could be an option? */ -#if EXPERIMENTAL_DEFORM_ONLY_PAINTING - if (!psmd->dm->deformedOnly) - dm->release(dm); -#endif -} -static void brush_weight(ParticleSystem *psys, float mat[][4], float imat[][4], int pa_index, int key_index, void *userData) -{ - struct {Scene *scene; Object *ob; short *mval; float rad; rcti* rect; float dist; float weightfac;} *data = userData; - ParticleData *pa; - - /* roots have full weight allways */ - if(key_index) { - pa= &psys->particles[pa_index]; - pa->hair[key_index].weight = data->weightfac; - pa->flag |= PARS_EDIT_RECALC; - } -} - -/* returns 0 if no brush was used */ -int PE_brush_particles(void) -{ - Scene *scene= NULL; // XXX - ARegion *ar= NULL; // XXX - Object *ob = OBACT; - ParticleSystem *psys = PE_get_current(ob); - ParticleEdit *edit; - ParticleEditSettings *pset = PE_settings(scene); - ParticleSystemModifierData *psmd; - ParticleBrushData *brush; - float vec1[3], vec2[3]; - short mval[2], mvalo[2], firsttime = 1, dx, dy; - int selected = 0, flip, removed = 0; - - if(!PE_can_edit(psys)) return 0; - - edit = psys->edit; - psmd= psys_get_modifier(ob, psys); - -// XXX flip= (get_qual() == LR_SHIFTKEY); - - if(pset->brushtype<0) return 0; - brush= &pset->brush[pset->brushtype]; - - initgrabz(ar->regiondata, ob->obmat[3][0], ob->obmat[3][1], ob->obmat[3][2]); - -// getmouseco_areawin(mvalo); - - mval[0] = mvalo[0]; mval[1] = mvalo[1]; - - while(0){ // XXX get_mbut - bglFlush(); - glReadBuffer(GL_BACK); - glDrawBuffer(GL_BACK); -// persp(PERSP_VIEW); - - dx=mval[0]-mvalo[0]; - dy=mval[1]-mvalo[1]; - if(((pset->brushtype == PE_BRUSH_ADD) ? - (sqrt(dx * dx + dy * dy) > pset->brush[PE_BRUSH_ADD].step) : (dx != 0 || dy != 0)) - || firsttime){ - firsttime = 0; - - selected = (short)count_selected_keys(scene, psys); - - switch(pset->brushtype){ - case PE_BRUSH_COMB: - { - struct {Scene *scene; Object *ob; short *mval; float rad; rcti* rect; float dist; float *dvec; float combfac;} data; - - data.scene = scene; - data.ob = ob; - data.mval = mval; - data.rad = (float)brush->size; - - data.combfac = (float)(brush->strength - 50) / 50.0f; - if(data.combfac < 0.0f) - data.combfac = 1.0f - 9.0f * data.combfac; - else - data.combfac = 1.0f - data.combfac; - - Mat4Invert(ob->imat, ob->obmat); - - window_to_3d(ar, vec1, mvalo[0], mvalo[1]); - window_to_3d(ar, vec2, mval[0], mval[1]); - VECSUB(vec1, vec2, vec1); - data.dvec = vec1; - - foreach_mouse_hit_key(selected, psys,brush_comb, &data); - break; - } - case PE_BRUSH_CUT: - { - struct {Scene *scene; short *mval; float rad; rcti* rect; int selected; float cutfac; bglMats mats;} data; - - data.scene = scene; - data.mval = mval; - data.rad = (float)brush->size; - - data.selected = selected; - - data.cutfac = (float)(brush->strength / 100.0f); - - bgl_get_mats(&(data.mats)); - - if(selected) - foreach_selected_element(psys, brush_cut, &data); - else - PE_foreach_element(psys, brush_cut, &data); - - removed= remove_tagged_elements(scene, ob, psys); - if(pset->flag & PE_KEEP_LENGTHS) - recalc_lengths(psys); - break; - } - case PE_BRUSH_LENGTH: - { - struct {Scene *scene; short *mval; float rad; rcti* rect; float dist; float growfac; } data; - - data.scene= scene; - data.mval = mval; - - data.rad = (float)brush->size; - data.growfac = (float)brush->strength / 5000.0f; - - if(brush->invert ^ flip) - data.growfac = 1.0f - data.growfac; - else - data.growfac = 1.0f + data.growfac; - - foreach_mouse_hit_element(selected, psys, brush_length, &data); - - if(pset->flag & PE_KEEP_LENGTHS) - recalc_lengths(psys); - break; - } - case PE_BRUSH_PUFF: - { - struct {Scene *scene; short *mval; float rad; rcti* rect; float dist; - Object *ob; DerivedMesh *dm; float pufffac; int invert; } data; - - data.scene= scene; - data.ob = ob; - data.dm = psmd->dm; - data.mval = mval; - data.rad = (float)brush->size; - - data.pufffac = (float)(brush->strength - 50) / 50.0f; - if(data.pufffac < 0.0f) - data.pufffac = 1.0f - 9.0f * data.pufffac; - else - data.pufffac = 1.0f - data.pufffac; - - data.invert= (brush->invert ^ flip); - Mat4Invert(ob->imat, ob->obmat); - - foreach_mouse_hit_element(selected, psys, brush_puff, &data); - break; - } - case PE_BRUSH_ADD: - if(psys->part->from==PART_FROM_FACE){ - brush_add(scene, ob, psys, mval, brush->strength); - if(pset->flag & PE_KEEP_LENGTHS) - recalc_lengths(psys); - } - break; - case PE_BRUSH_WEIGHT: - { - struct {Scene *scene; Object *ob; short *mval; float rad; rcti* rect; float dist; float weightfac;} data; - - data.scene = scene; - data.ob = ob; - data.mval = mval; - data.rad = (float)brush->size; - - data.weightfac = (float)(brush->strength / 100.0f); - - foreach_mouse_hit_key(selected, psys, brush_weight, &data); - break; - } - case PE_BRUSH_SMOOTH: - { - struct {Scene *scene; Object *ob; short *mval; float rad; rcti* rect; float dist; float vec[3]; int tot; float smoothfac;} data; - - data.scene = scene; - data.ob = ob; - data.mval = mval; - data.rad = (float)brush->size; - - data.vec[0] = data.vec[1] = data.vec[2] = 0.0f; - data.tot = 0; - - data.smoothfac = (float)(brush->strength / 100.0f); - - Mat4Invert(ob->imat, ob->obmat); - - foreach_mouse_hit_key(selected, psys, brush_smooth_get, &data); - - if(data.tot){ - VecMulf(data.vec, 1.0f / (float)data.tot); - foreach_mouse_hit_key(selected, psys, brush_smooth_do, &data); - } - - break; - } - } - if((pset->flag & PE_KEEP_LENGTHS)==0) - recalc_lengths(psys); - - if(pset->brushtype == PE_BRUSH_ADD || removed) { - if(pset->brushtype == PE_BRUSH_ADD && (pset->flag & PE_X_MIRROR)) - PE_mirror_x(scene, 1); - PE_recalc_world_cos(ob,psys); - psys_free_path_cache(psys); - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - } - else - PE_update_object(scene, ob, 1); - - mvalo[0] = mval[0]; - mvalo[1] = mval[1]; - } - - PIL_sleep_ms(10); - -// getmouseco_areawin(mval); - } - - BIF_undo_push("Brush edit particles"); - - return 1; -} - -static void set_delete_particle(ParticleSystem *psys, int index, void *userData) -{ - psys->particles[index].flag |= PARS_TAG; -} - -static void set_delete_particle_key(ParticleSystem *psys, int pa_index, int key_index, void *userData) -{ psys->edit->keys[pa_index][key_index].flag |= PEK_TAG; } -void PE_delete_particle(void) +static int delete_exec(bContext *C, wmOperator *op) { - Scene *scene= NULL; // XXX - Object *ob=OBACT; - ParticleSystem *psys = PE_get_current(ob); - short event=0; + PEData data; + int type= RNA_enum_get(op->ptr, "type"); - if(!PE_can_edit(psys)) return; + PE_set_data(C, &data); - event= pupmenu("Erase %t|Particle%x2|Key%x1"); - - if(event<1) return; - - if(event==1){ - foreach_selected_key(psys, set_delete_particle_key, 0); - remove_tagged_keys(scene, ob, psys); - recalc_lengths(psys); + if(type == DEL_KEY) { + foreach_selected_key(&data, set_delete_particle_key); + remove_tagged_keys(data.scene, data.ob, data.psys); + recalc_lengths(data.psys); } - else if(event==2){ - foreach_selected_element(psys, set_delete_particle, 0); - remove_tagged_elements(scene, ob, psys); - recalc_lengths(psys); + else if(type == DEL_PARTICLE) { + foreach_selected_particle(&data, set_delete_particle); + remove_tagged_particles(data.scene, data.ob, data.psys); + recalc_lengths(data.psys); } - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - BIF_undo_push("Delete particles/keys"); + DAG_object_flush_update(data.scene, data.ob, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, data.ob); + + return OPERATOR_FINISHED; } -void PE_mirror_x(Scene *scene, int tagged) +void PARTICLE_OT_delete(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Delete"; + ot->idname= "PARTICLE_OT_delete"; + + /* api callbacks */ + ot->exec= delete_exec; + ot->invoke= WM_menu_invoke; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_enum(ot->srna, "type", delete_type_items, DEL_PARTICLE, "Type", "Delete a full particle or only keys."); +} + +/*************************** mirror operator **************************/ + +static void PE_mirror_x(Scene *scene, Object *ob, int tagged) { - Object *ob=OBACT; Mesh *me= (Mesh*)(ob->data); ParticleSystemModifierData *psmd; - ParticleSystem *psys = PE_get_current(ob); + ParticleSystem *psys= PE_get_current(scene, ob); ParticleEdit *edit; ParticleData *pa, *newpa, *new_pars; ParticleEditKey *ekey, **newkey, **key, **new_keys; @@ -2862,8 +2535,6 @@ void PE_mirror_x(Scene *scene, int tagged) int *mirrorfaces; int i, k, rotation, totpart, newtotpart; - if(!PE_can_edit(psys)) return; - edit= psys->edit; psmd= psys_get_modifier(ob, psys); @@ -2875,7 +2546,7 @@ void PE_mirror_x(Scene *scene, int tagged) totpart= psys->totpart; newtotpart= psys->totpart; LOOP_PARTICLES(i,pa) { - if(pa->flag&PARS_HIDE) continue; + if(pa->flag & PARS_HIDE) continue; if(!tagged) { if(particle_is_selected(psys, pa)) { @@ -2921,7 +2592,7 @@ void PE_mirror_x(Scene *scene, int tagged) newkey= edit->keys + totpart; for(i=0; iflag&PARS_HIDE) continue; + if(pa->flag & PARS_HIDE) continue; if(!(pa->flag & PARS_TAG) || mirrorfaces[pa->num*2] == -1) continue; @@ -2962,38 +2633,845 @@ void PE_mirror_x(Scene *scene, int tagged) newkey++; } - edit->totkeys = psys_count_keys(psys); + edit->totkeys= psys_count_keys(psys); } for(pa=psys->particles, i=0; itotpart; i++, pa++) pa->flag &= ~PARS_TAG; MEM_freeN(mirrorfaces); - - if(!tagged) { - PE_recalc_world_cos(ob,psys); - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - BIF_undo_push("Mirror particles"); - } } -void PE_selectbrush_menu(Scene *scene) +static int mirror_exec(bContext *C, wmOperator *op) { - ParticleEditSettings *pset= PE_settings(scene); - int val; + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + ParticleSystem *psys= PE_get_current(scene, ob); - // XXX pupmenu_set_active(pset->brushtype); - - val= pupmenu("Select Brush%t|None %x0|Comb %x1|Smooth %x7|Weight %x6|Add %x5|Length %x3|Puff %x4|Cut %x2"); + PE_mirror_x(scene, ob, 0); - if(val>=0) { - pset->brushtype= val-1; + PE_recalc_world_cos(ob, psys); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob); + DAG_object_flush_update(scene, ob, OB_RECALC_DATA); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_mirror(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Mirror"; + ot->idname= "PARTICLE_OT_mirror"; + + /* api callbacks */ + ot->exec= mirror_exec; + ot->poll= PE_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +/*********************** set brush operator **********************/ + +static EnumPropertyItem brush_type_items[]= { + {PE_BRUSH_NONE, "NONE", "None", ""}, + {PE_BRUSH_COMB, "COMB", "Comb", ""}, + {PE_BRUSH_SMOOTH, "SMOOTH", "Smooth", ""}, + {PE_BRUSH_WEIGHT, "WEIGHT", "Weight", ""}, + {PE_BRUSH_ADD, "ADD", "Add", ""}, + {PE_BRUSH_LENGTH, "LENGTH", "Length", ""}, + {PE_BRUSH_PUFF, "PUFF", "Puff", ""}, + {PE_BRUSH_CUT, "CUT", "Cut", ""}, + {0, NULL, NULL, NULL} +}; + +static int set_brush_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + ParticleEditSettings *pset= PE_settings(scene); + + pset->brushtype= RNA_enum_get(op->ptr, "type"); + + return OPERATOR_FINISHED; +} + +void PARTICLE_OT_set_brush(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Set Brush"; + ot->idname= "PARTICLE_OT_set_brush"; + + /* api callbacks */ + ot->exec= set_brush_exec; + ot->invoke= WM_menu_invoke; + ot->poll= PE_poll; + + /* properties */ + RNA_def_enum(ot->srna, "type", brush_type_items, PE_BRUSH_NONE, "Type", "Brush type to select for editing."); +} + +/************************* brush edit callbacks ********************/ + +static void brush_comb(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index) +{ + ParticleSystem *psys= data->psys; + ParticleData *pa= &psys->particles[pa_index]; + ParticleEditSettings *pset= PE_settings(data->scene); + HairKey *key= pa->hair + key_index; + float cvec[3], fac; + + if(pset->flag & PE_LOCK_FIRST && key_index == 0) return; + + fac= (float)pow((double)(1.0f - data->dist / data->rad), (double)data->combfac); + + VECCOPY(cvec,data->dvec); + Mat4Mul3Vecfl(imat,cvec); + VecMulf(cvec, fac); + VECADD(key->co, key->co, cvec); + + pa->flag |= PARS_EDIT_RECALC; +} + +static void brush_cut(PEData *data, int pa_index) +{ + ParticleSystem *psys= data->psys; + ARegion *ar= data->vc.ar; + Object *ob= data->ob; + ParticleData *pa= &psys->particles[pa_index]; + ParticleCacheKey *key= psys->pathcache[pa_index]; + float rad2, cut_time= 1.0; + float x0, x1, v0, v1, o0, o1, xo0, xo1, d, dv; + int k, cut, keys= (int)pow(2.0, (double)psys->part->draw_step); + short vertco[2]; + + /* blunt scissors */ + if(BLI_frand() > data->cutfac) return; + + rad2= data->rad * data->rad; + + cut=0; + + project_short_noclip(ar, key->co, vertco); + x0= (float)vertco[0]; + x1= (float)vertco[1]; + + o0= (float)data->mval[0]; + o1= (float)data->mval[1]; + + xo0= x0 - o0; + xo1= x1 - o1; + + /* check if root is inside circle */ + if(xo0*xo0 + xo1*xo1 < rad2 && key_test_depth(data, key->co)) { + cut_time= -1.0f; + cut= 1; + } + else { + /* calculate path time closest to root that was inside the circle */ + for(k=1, key++; k<=keys; k++, key++) { + project_short_noclip(ar, key->co, vertco); + + if(key_test_depth(data, key->co) == 0) { + x0= (float)vertco[0]; + x1= (float)vertco[1]; + + xo0= x0 - o0; + xo1= x1 - o1; + continue; + } + + v0= (float)vertco[0] - x0; + v1= (float)vertco[1] - x1; + + dv= v0*v0 + v1*v1; + + d= (v0*xo1 - v1*xo0); + + d= dv * rad2 - d*d; + + if(d > 0.0f) { + d= sqrt(d); + + cut_time= -(v0*xo0 + v1*xo1 + d); + + if(cut_time > 0.0f) { + cut_time /= dv; + + if(cut_time < 1.0f) { + cut_time += (float)(k-1); + cut_time /= (float)keys; + cut= 1; + break; + } + } + } + + x0= (float)vertco[0]; + x1= (float)vertco[1]; + + xo0= x0 - o0; + xo1= x1 - o1; + } + } + + if(cut) { + if(cut_time < 0.0f) { + pa->flag |= PARS_TAG; + } + else { + rekey_particle_to_time(data->scene, ob, pa_index, cut_time); + pa->flag |= PARS_EDIT_RECALC; + } } } -/************************************************/ -/* Particle Edit Undo */ -/************************************************/ +static void brush_length(PEData *data, int pa_index) +{ + ParticleSystem *psys= data->psys; + ParticleData *pa= &psys->particles[pa_index]; + HairKey *key; + float dvec[3],pvec[3]; + int k; + + key= pa->hair; + VECCOPY(pvec,key->co); + + for(k=1, key++; ktotkey; k++,key++) { + VECSUB(dvec,key->co,pvec); + VECCOPY(pvec,key->co); + VecMulf(dvec,data->growfac); + VECADD(key->co,(key-1)->co,dvec); + } + + pa->flag |= PARS_EDIT_RECALC; +} + +static void brush_puff(PEData *data, int pa_index) +{ + ParticleSystem *psys= data->psys; + ParticleData *pa= &psys->particles[pa_index]; + ParticleEdit *edit= psys->edit; + HairKey *key; + float mat[4][4], imat[4][4]; + float lastco[3], rootco[3], co[3], nor[3], kco[3], dco[3], fac, length; + int k; + + psys_mat_hair_to_global(data->ob, data->dm, psys->part->from, pa, mat); + Mat4Invert(imat,mat); + + /* find root coordinate and normal on emitter */ + key= pa->hair; + VECCOPY(co, key->co); + Mat4MulVecfl(mat, co); + + pa_index= BLI_kdtree_find_nearest(edit->emitter_field, co, NULL, NULL); + if(pa_index == -1) return; + + VECCOPY(rootco, co); + VecCopyf(nor, &psys->edit->emitter_cosnos[pa_index*6+3]); + Normalize(nor); + length= 0.0f; + + fac= (float)pow((double)(1.0f - data->dist / data->rad), (double)data->pufffac); + fac *= 0.025f; + if(data->invert) + fac= -fac; + + for(k=1, key++; ktotkey; k++, key++) { + /* compute position as if hair was standing up straight */ + VECCOPY(lastco, co); + VECCOPY(co, key->co); + Mat4MulVecfl(mat, co); + length += VecLenf(lastco, co); + + VECADDFAC(kco, rootco, nor, length); + + /* blend between the current and straight position */ + VECSUB(dco, kco, co); + VECADDFAC(co, co, dco, fac); + + VECCOPY(key->co, co); + Mat4MulVecfl(imat, key->co); + } + + pa->flag |= PARS_EDIT_RECALC; +} + +static void brush_smooth_get(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index) +{ + ParticleSystem *psys= data->psys; + ParticleData *pa= &psys->particles[pa_index]; + HairKey *key= pa->hair + key_index; + + if(key_index) { + float dvec[3]; + + VecSubf(dvec,key->co,(key-1)->co); + Mat4Mul3Vecfl(mat,dvec); + VECADD(data->vec,data->vec,dvec); + data->tot++; + } +} + +static void brush_smooth_do(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index) +{ + ParticleSystem *psys= data->psys; + ParticleData *pa= &psys->particles[pa_index]; + HairKey *key= pa->hair + key_index; + float vec[3], dvec[3]; + + if(key_index) { + VECCOPY(vec,data->vec); + Mat4Mul3Vecfl(imat,vec); + + VecSubf(dvec,key->co,(key-1)->co); + + VECSUB(dvec,vec,dvec); + VecMulf(dvec,data->smoothfac); + + VECADD(key->co,key->co,dvec); + } + + pa->flag |= PARS_EDIT_RECALC; +} + +static void brush_add(PEData *data, short number) +{ + Scene *scene= data->scene; + Object *ob= data->ob; + ParticleSystem *psys= data->psys; + ParticleData *add_pars= MEM_callocN(number*sizeof(ParticleData),"ParticleData add"); + ParticleSystemModifierData *psmd= psys_get_modifier(ob,psys); + ParticleEditSettings *pset= PE_settings(scene); + ParticleEdit *edit= psys->edit; + int i, k, n= 0, totpart= psys->totpart; + short mco[2]; + short dmx= 0, dmy= 0; + float co1[3], co2[3], min_d, imat[4][4]; + float framestep, timestep= psys_get_timestep(psys->part); + short size= pset->brush[PE_BRUSH_ADD].size; + short size2= size*size; + DerivedMesh *dm=0; + Mat4Invert(imat,ob->obmat); + + BLI_srandom(psys->seed+data->mval[0]+data->mval[1]); + + /* painting onto the deformed mesh, could be an option? */ + if(psmd->dm->deformedOnly) + dm= psmd->dm; + else + dm= mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH); + + for(i=0; i1) { + dmx=dmy=size; + while(dmx*dmx+dmy*dmy>size2) { + dmx=(short)((2.0f*BLI_frand()-1.0f)*size); + dmy=(short)((2.0f*BLI_frand()-1.0f)*size); + } + } + + mco[0]= data->mval[0] + dmx; + mco[1]= data->mval[1] + dmy; + viewline(data->vc.ar, data->vc.v3d, mco, co1, co2); + + Mat4MulVecfl(imat,co1); + Mat4MulVecfl(imat,co2); + min_d=2.0; + + /* warning, returns the derived mesh face */ + if(psys_intersect_dm(scene, ob,dm,0,co1,co2,&min_d,&add_pars[n].num,add_pars[n].fuv,0,0,0,0)) { + add_pars[n].num_dmcache= psys_particle_dm_face_lookup(ob,psmd->dm,add_pars[n].num,add_pars[n].fuv,NULL); + n++; + } + } + if(n) { + int newtotpart=totpart+n; + float hairmat[4][4], cur_co[3]; + KDTree *tree=0; + ParticleData *pa, *new_pars= MEM_callocN(newtotpart*sizeof(ParticleData),"ParticleData new"); + ParticleEditKey *ekey, **key, **new_keys= MEM_callocN(newtotpart*sizeof(ParticleEditKey *),"ParticleEditKey array new"); + HairKey *hkey; + + /* save existing elements */ + memcpy(new_pars, psys->particles, totpart * sizeof(ParticleData)); + memcpy(new_keys, edit->keys, totpart * sizeof(ParticleEditKey*)); + + /* change old arrays to new ones */ + if(psys->particles) MEM_freeN(psys->particles); + psys->particles= new_pars; + + if(edit->keys) MEM_freeN(edit->keys); + edit->keys= new_keys; + + if(edit->mirror_cache) { + MEM_freeN(edit->mirror_cache); + edit->mirror_cache= NULL; + } + + /* create tree for interpolation */ + if(pset->flag & PE_INTERPOLATE_ADDED && psys->totpart) { + tree=BLI_kdtree_new(psys->totpart); + + for(i=0, pa=psys->particles; idm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,cur_co,0,0,0,0,0); + BLI_kdtree_insert(tree, i, cur_co, NULL); + } + + BLI_kdtree_balance(tree); + } + + psys->totpart= newtotpart; + + /* create new elements */ + pa= psys->particles + totpart; + key= edit->keys + totpart; + + for(i=totpart; ihair= MEM_callocN(pset->totaddkey * sizeof(HairKey), "BakeKey key add"); + ekey= *key= MEM_callocN(pset->totaddkey * sizeof(ParticleEditKey), "ParticleEditKey add"); + pa->totkey= pset->totaddkey; + + for(k=0, hkey=pa->hair; ktotkey; k++, hkey++, ekey++) { + ekey->co= hkey->co; + ekey->time= &hkey->time; + } + + pa->size= 1.0f; + initialize_particle(pa,i,ob,psys,psmd); + reset_particle(scene, pa,psys,psmd,ob,0.0,1.0,0,0,0); + pa->flag |= PARS_EDIT_RECALC; + if(pset->flag & PE_X_MIRROR) + pa->flag |= PARS_TAG; /* signal for duplicate */ + + framestep= pa->lifetime/(float)(pset->totaddkey-1); + + if(tree) { + HairKey *hkey; + ParticleKey key[3]; + KDTreeNearest ptn[3]; + int w, maxw; + float maxd, mind, dd, totw=0.0, weight[3]; + + psys_particle_on_dm(psmd->dm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co1,0,0,0,0,0); + maxw= BLI_kdtree_find_n_nearest(tree,3,co1,NULL,ptn); + + maxd= ptn[maxw-1].dist; + mind= ptn[0].dist; + dd= maxd - mind; + + for(w=0; wtotaddkey; k++) { + hkey= pa->hair + k; + hkey->time= pa->time + k * framestep; + + key[0].time= hkey->time/ 100.0f; + psys_get_particle_on_path(scene, ob, psys, ptn[0].index, key, 0); + VecMulf(key[0].co, weight[0]); + + if(maxw>1) { + key[1].time= key[0].time; + psys_get_particle_on_path(scene, ob, psys, ptn[1].index, key + 1, 0); + VecMulf(key[1].co, weight[1]); + VECADD(key[0].co, key[0].co, key[1].co); + + if(maxw>2) { + key[2].time= key[0].time; + psys_get_particle_on_path(scene, ob, psys, ptn[2].index, key + 2, 0); + VecMulf(key[2].co, weight[2]); + VECADD(key[0].co, key[0].co, key[2].co); + } + } + + if(k==0) + VECSUB(co1, pa->state.co, key[0].co); + + VECADD(pa->hair[k].co, key[0].co, co1); + + pa->hair[k].time= key[0].time; + } + } + else { + for(k=0, hkey=pa->hair; ktotaddkey; k++, hkey++) { + VECADDFAC(hkey->co, pa->state.co, pa->state.vel, k * framestep * timestep); + pa->hair[k].time += k * framestep; + } + } + for(k=0, hkey=pa->hair; ktotaddkey; k++, hkey++) { + psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat); + Mat4Invert(imat,hairmat); + Mat4MulVecfl(imat, hkey->co); + } + } + edit->totkeys= psys_count_keys(psys); + + if(tree) + BLI_kdtree_free(tree); + } + if(add_pars) + MEM_freeN(add_pars); + + if(!psmd->dm->deformedOnly) + dm->release(dm); +} + +static void brush_weight(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index) +{ + ParticleSystem *psys= data->psys; + ParticleData *pa; + + /* roots have full weight allways */ + if(key_index) { + pa= &psys->particles[pa_index]; + pa->hair[key_index].weight= data->weightfac; + pa->flag |= PARS_EDIT_RECALC; + } +} + +/************************* brush edit operator ********************/ + +typedef struct BrushEdit { + Scene *scene; + Object *ob; + ParticleSystem *psys; + + int first; + int lastmouse[2]; +} BrushEdit; + +static int brush_edit_init(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + ParticleSystem *psys= PE_get_current(scene, ob); + ParticleEditSettings *pset= PE_settings(scene); + ARegion *ar= CTX_wm_region(C); + BrushEdit *bedit; + + if(pset->brushtype < 0) + return 0; + + // XXX + initgrabz(ar->regiondata, ob->obmat[3][0], ob->obmat[3][1], ob->obmat[3][2]); + + bedit= MEM_callocN(sizeof(BrushEdit), "BrushEdit"); + bedit->first= 1; + op->customdata= bedit; + + bedit->scene= scene; + bedit->ob= ob; + bedit->psys= psys; + + return 1; +} + +static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) +{ + BrushEdit *bedit= op->customdata; + Scene *scene= bedit->scene; + Object *ob= bedit->ob; + ParticleSystem *psys= bedit->psys; + ParticleEditSettings *pset= PE_settings(scene); + ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys); + ParticleBrushData *brush= &pset->brush[pset->brushtype]; + ARegion *ar= CTX_wm_region(C); + float vec1[3], vec2[3]; + short mval[2], mvalo[2]; + int flip, mouse[2], dx, dy, removed= 0, selected= 0; + + RNA_int_get_array(itemptr, "mouse", mouse); + flip= RNA_boolean_get(itemptr, "flip"); + + bglFlush(); + glReadBuffer(GL_BACK); + glDrawBuffer(GL_BACK); +// persp(PERSP_VIEW); + + dx= mouse[0] - bedit->lastmouse[0]; + dy= mouse[1] - bedit->lastmouse[1]; + + mval[0]= mouse[0]; + mval[1]= mouse[1]; + + mvalo[0]= bedit->lastmouse[0]; + mvalo[1]= bedit->lastmouse[1]; + + if(((pset->brushtype == PE_BRUSH_ADD) ? + (sqrt(dx * dx + dy * dy) > pset->brush[PE_BRUSH_ADD].step) : (dx != 0 || dy != 0)) + || bedit->first) { + + selected= (short)count_selected_keys(scene, psys); + + switch(pset->brushtype) { + case PE_BRUSH_COMB: + { + PEData data; + + PE_set_view3d_data(C, &data); + data.mval= mval; + data.rad= (float)brush->size; + + data.combfac= (float)(brush->strength - 50) / 50.0f; + if(data.combfac < 0.0f) + data.combfac= 1.0f - 9.0f * data.combfac; + else + data.combfac= 1.0f - data.combfac; + + Mat4Invert(ob->imat, ob->obmat); + + window_to_3d(ar, vec1, mvalo[0], mvalo[1]); + window_to_3d(ar, vec2, mval[0], mval[1]); + VECSUB(vec1, vec2, vec1); + data.dvec= vec1; + + foreach_mouse_hit_key(&data, brush_comb, selected); + break; + } + case PE_BRUSH_CUT: + { + PEData data; + + PE_set_view3d_data(C, &data); + data.mval= mval; + data.rad= (float)brush->size; + data.cutfac= (float)(brush->strength / 100.0f); + + if(selected) + foreach_selected_particle(&data, brush_cut); + else + PE_foreach_particle(&data, brush_cut); + + removed= remove_tagged_particles(scene, ob, psys); + if(pset->flag & PE_KEEP_LENGTHS) + recalc_lengths(psys); + break; + } + case PE_BRUSH_LENGTH: + { + PEData data; + + PE_set_view3d_data(C, &data); + data.mval= mval; + + data.rad= (float)brush->size; + data.growfac= (float)brush->strength / 5000.0f; + + if(brush->invert ^ flip) + data.growfac= 1.0f - data.growfac; + else + data.growfac= 1.0f + data.growfac; + + foreach_mouse_hit_particle(&data, brush_length, selected); + + if(pset->flag & PE_KEEP_LENGTHS) + recalc_lengths(psys); + break; + } + case PE_BRUSH_PUFF: + { + PEData data; + + PE_set_view3d_data(C, &data); + data.dm= psmd->dm; + data.mval= mval; + data.rad= (float)brush->size; + + data.pufffac= (float)(brush->strength - 50) / 50.0f; + if(data.pufffac < 0.0f) + data.pufffac= 1.0f - 9.0f * data.pufffac; + else + data.pufffac= 1.0f - data.pufffac; + + data.invert= (brush->invert ^ flip); + Mat4Invert(ob->imat, ob->obmat); + + foreach_mouse_hit_particle(&data, brush_puff, selected); + break; + } + case PE_BRUSH_ADD: + { + PEData data; + + if(psys->part->from==PART_FROM_FACE) { + PE_set_view3d_data(C, &data); + data.mval= mval; + + brush_add(&data, brush->strength); + + if(pset->flag & PE_KEEP_LENGTHS) + recalc_lengths(psys); + } + break; + } + case PE_BRUSH_WEIGHT: + { + PEData data; + + PE_set_view3d_data(C, &data); + data.mval= mval; + data.rad= (float)brush->size; + + data.weightfac= (float)(brush->strength / 100.0f); + + foreach_mouse_hit_key(&data, brush_weight, selected); + break; + } + case PE_BRUSH_SMOOTH: + { + PEData data; + + PE_set_view3d_data(C, &data); + data.mval= mval; + data.rad= (float)brush->size; + + data.vec[0]= data.vec[1]= data.vec[2]= 0.0f; + data.tot= 0; + + data.smoothfac= (float)(brush->strength / 100.0f); + + Mat4Invert(ob->imat, ob->obmat); + + foreach_mouse_hit_key(&data, brush_smooth_get, selected); + + if(data.tot) { + VecMulf(data.vec, 1.0f / (float)data.tot); + foreach_mouse_hit_key(&data, brush_smooth_do, selected); + } + + break; + } + } + if((pset->flag & PE_KEEP_LENGTHS)==0) + recalc_lengths(psys); + + if(pset->brushtype == PE_BRUSH_ADD || removed) { + if(pset->brushtype == PE_BRUSH_ADD && (pset->flag & PE_X_MIRROR)) + PE_mirror_x(scene, ob, 1); + + PE_recalc_world_cos(ob,psys); + psys_free_path_cache(psys); + DAG_object_flush_update(scene, ob, OB_RECALC_DATA); + } + else + PE_update_object(scene, ob, 1); + + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob); + + bedit->lastmouse[0]= mouse[0]; + bedit->lastmouse[1]= mouse[1]; + bedit->first= 0; + } +} + +static void brush_edit_exit(bContext *C, wmOperator *op) +{ + BrushEdit *bedit= op->customdata; + + MEM_freeN(bedit); +} + +static int brush_edit_exec(bContext *C, wmOperator *op) +{ + if(!brush_edit_init(C, op)) + return OPERATOR_CANCELLED; + + RNA_BEGIN(op->ptr, itemptr, "stroke") { + brush_edit_apply(C, op, &itemptr); + } + RNA_END; + + brush_edit_exit(C, op); + + return OPERATOR_FINISHED; +} + +static void brush_edit_apply_event(bContext *C, wmOperator *op, wmEvent *event) +{ + ARegion *ar= CTX_wm_region(C); + PointerRNA itemptr; + int mouse[2]; + + mouse[0]= event->x - ar->winrct.xmin; + mouse[1]= event->y - ar->winrct.ymin; + + /* fill in stroke */ + RNA_collection_add(op->ptr, "stroke", &itemptr); + + RNA_int_set_array(&itemptr, "mouse", mouse); + RNA_boolean_set(&itemptr, "flip", event->shift != 0); // XXX hardcoded + + /* apply */ + brush_edit_apply(C, op, &itemptr); +} + +static int brush_edit_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + if(!brush_edit_init(C, op)) + return OPERATOR_CANCELLED; + + brush_edit_apply_event(C, op, event); + + WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + + return OPERATOR_RUNNING_MODAL; +} + +static int brush_edit_modal(bContext *C, wmOperator *op, wmEvent *event) +{ + switch(event->type) { + case LEFTMOUSE: + case MIDDLEMOUSE: + case RIGHTMOUSE: // XXX hardcoded + brush_edit_exit(C, op); + return OPERATOR_FINISHED; + case MOUSEMOVE: + brush_edit_apply_event(C, op, event); + break; + } + + return OPERATOR_RUNNING_MODAL; +} + +static int brush_edit_cancel(bContext *C, wmOperator *op) +{ + brush_edit_exit(C, op); + + return OPERATOR_CANCELLED; +} + +void PARTICLE_OT_brush_edit(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Brush Edit"; + ot->idname= "PARTICLE_OT_brush_edit"; + + /* api callbacks */ + ot->exec= brush_edit_exec; + ot->invoke= brush_edit_invoke; + ot->modal= brush_edit_modal; + ot->cancel= brush_edit_cancel; + ot->poll= PE_poll_3dview; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); +} + +/*********************** undo ***************************/ + static void free_ParticleUndo(ParticleUndo *undo) { ParticleData *pa; @@ -3014,29 +3492,31 @@ static void free_ParticleUndo(ParticleUndo *undo) //if(undo->emitter_cosnos) // MEM_freeN(undo->emitter_cosnos); } + static void make_ParticleUndo(ParticleSystem *psys, ParticleUndo *undo) { ParticleData *pa,*upa; int i; - undo->totpart = psys->totpart; - undo->totkeys = psys->edit->totkeys; + undo->totpart= psys->totpart; + undo->totkeys= psys->edit->totkeys; - upa = undo->particles = MEM_dupallocN(psys->particles); - undo->keys = MEM_dupallocN(psys->edit->keys); + upa= undo->particles= MEM_dupallocN(psys->particles); + undo->keys= MEM_dupallocN(psys->edit->keys); for(i=0, pa=psys->particles; itotpart; i++, pa++, upa++) { - upa->hair = MEM_dupallocN(pa->hair); - undo->keys[i] = MEM_dupallocN(psys->edit->keys[i]); + upa->hair= MEM_dupallocN(pa->hair); + undo->keys[i]= MEM_dupallocN(psys->edit->keys[i]); /* no need to update edit key->co & key->time pointers here */ } } + static void get_ParticleUndo(ParticleSystem *psys, ParticleUndo *undo) { ParticleData *pa, *upa; ParticleEditKey *key; HairKey *hkey; - int i, k, totpart = psys->totpart; + int i, k, totpart= psys->totpart; LOOP_PARTICLES(i,pa) { if(pa->hair) @@ -3054,31 +3534,31 @@ static void get_ParticleUndo(ParticleSystem *psys, ParticleUndo *undo) psys->edit->mirror_cache= NULL; } - pa = psys->particles = MEM_dupallocN(undo->particles); - psys->edit->keys = MEM_dupallocN(undo->keys); + pa= psys->particles= MEM_dupallocN(undo->particles); + psys->edit->keys= MEM_dupallocN(undo->keys); - for(i=0,upa=undo->particles; itotpart; i++, upa++, pa++){ - hkey = pa->hair = MEM_dupallocN(upa->hair); - key = psys->edit->keys[i] = MEM_dupallocN(undo->keys[i]); + for(i=0,upa=undo->particles; itotpart; i++, upa++, pa++) { + hkey= pa->hair= MEM_dupallocN(upa->hair); + key= psys->edit->keys[i]= MEM_dupallocN(undo->keys[i]); for(k=0; ktotkey; k++, hkey++, key++) { - key->co = hkey->co; - key->time = &hkey->time; + key->co= hkey->co; + key->time= &hkey->time; } } - psys->totpart = undo->totpart; - psys->edit->totkeys = undo->totkeys; + psys->totpart= undo->totpart; + psys->edit->totkeys= undo->totkeys; } void PE_undo_push(Scene *scene, char *str) { - ParticleSystem *psys = PE_get_current(OBACT); - ParticleEdit *edit = 0; + ParticleSystem *psys= PE_get_current(scene, OBACT); + ParticleEdit *edit= 0; ParticleUndo *undo; int nr; if(!PE_can_edit(psys)) return; - edit = psys->edit; + edit= psys->edit; /* remove all undos after (also when curundo==NULL) */ while(edit->undo.last != edit->curundo) { @@ -3113,10 +3593,11 @@ void PE_undo_push(Scene *scene, char *str) /* copy */ make_ParticleUndo(psys,edit->curundo); } + void PE_undo_step(Scene *scene, int step) { - ParticleSystem *psys = PE_get_current(OBACT); - ParticleEdit *edit = 0; + ParticleSystem *psys= PE_get_current(scene, OBACT); + ParticleEdit *edit= 0; if(!PE_can_edit(psys)) return; edit=psys->edit; @@ -3166,7 +3647,7 @@ static void ParticleUndo_clear(ParticleSystem *psys) if(psys==0) return; - edit = psys->edit; + edit= psys->edit; if(edit==0) return; @@ -3178,25 +3659,28 @@ static void ParticleUndo_clear(ParticleSystem *psys) BLI_freelistN(&edit->undo); edit->curundo= NULL; } + void PE_undo(Scene *scene) { PE_undo_step(scene, 1); } + void PE_redo(Scene *scene) { PE_undo_step(scene, -1); } -void PE_undo_menu(Scene *scene) + +void PE_undo_menu(Scene *scene, Object *ob) { - ParticleSystem *psys = PE_get_current(OBACT); - ParticleEdit *edit = 0; + ParticleSystem *psys= PE_get_current(scene, ob); + ParticleEdit *edit= 0; ParticleUndo *undo; DynStr *ds; short event; char *menu; if(!PE_can_edit(psys)) return; - edit = psys->edit; + edit= psys->edit; ds= BLI_dynstr_new(); @@ -3216,6 +3700,8 @@ void PE_undo_menu(Scene *scene) if(event>0) ParticleUndo_number(scene, edit,event); } +/************************ utilities ******************************/ + void PE_get_colors(char sel[4], char nosel[4]) { UI_GetThemeColor3ubv(TH_EDGE_SELECT, sel); @@ -3224,26 +3710,26 @@ void PE_get_colors(char sel[4], char nosel[4]) int PE_minmax(Scene *scene, float *min, float *max) { - Object *ob = OBACT; - ParticleSystem *psys = PE_get_current(ob); + Object *ob= OBACT; + ParticleSystem *psys= PE_get_current(scene, ob); ParticleSystemModifierData *psmd; ParticleData *pa; ParticleEditKey *key; float co[3], mat[4][4]; - int i, k, totpart, ok = 0; + int i, k, totpart, ok= 0; if(!PE_can_edit(psys)) return ok; psmd= psys_get_modifier(ob, psys); totpart= psys->totpart; - LOOP_PARTICLES(i,pa){ - if(pa->flag&PARS_HIDE) continue; + LOOP_PARTICLES(i,pa) { + if(pa->flag & PARS_HIDE) continue; psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, mat); - LOOP_KEYS(k,key){ - if(key->flag&PEK_SELECT) { + LOOP_KEYS(k,key) { + if(key->flag & PEK_SELECT) { VECCOPY(co, key->co); Mat4MulVecfl(mat, co); DO_MINMAX(co, min, max); @@ -3260,3 +3746,87 @@ int PE_minmax(Scene *scene, float *min, float *max) return ok; } +/*********************** specials menu **************************/ + +static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + Scene *scene= CTX_data_scene(C); + uiMenuItem *head; + + head= uiPupMenuBegin("Specials", 0); + + uiMenuItemO(head, 0, "PARTICLE_OT_rekey"); + if(scene->selectmode & SCE_SELECT_POINT) { + uiMenuItemO(head, 0, "PARTICLE_OT_subdivide"); + uiMenuItemO(head, 0, "PARTICLE_OT_select_first"); + uiMenuItemO(head, 0, "PARTICLE_OT_select_last"); + } + uiMenuItemO(head, 0, "PARTICLE_OT_remove_doubles"); + + uiPupMenuEnd(C, head); + + return OPERATOR_CANCELLED; +} + +void PARTICLE_OT_specials_menu(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Specials Menu"; + ot->idname= "PARTICLE_OT_specials_menu"; + + /* api callbacks */ + ot->invoke= specials_menu_invoke; + ot->poll= PE_poll; +} + +/**************************** registration **********************************/ + +void ED_operatortypes_particle(void) +{ + WM_operatortype_append(PARTICLE_OT_de_select_all); + WM_operatortype_append(PARTICLE_OT_select_first); + WM_operatortype_append(PARTICLE_OT_select_last); + WM_operatortype_append(PARTICLE_OT_select_linked); + WM_operatortype_append(PARTICLE_OT_select_less); + WM_operatortype_append(PARTICLE_OT_select_more); + + WM_operatortype_append(PARTICLE_OT_hide); + WM_operatortype_append(PARTICLE_OT_reveal); + + WM_operatortype_append(PARTICLE_OT_rekey); + WM_operatortype_append(PARTICLE_OT_subdivide); + WM_operatortype_append(PARTICLE_OT_remove_doubles); + WM_operatortype_append(PARTICLE_OT_delete); + WM_operatortype_append(PARTICLE_OT_mirror); + + WM_operatortype_append(PARTICLE_OT_set_brush); + WM_operatortype_append(PARTICLE_OT_brush_edit); + + WM_operatortype_append(PARTICLE_OT_specials_menu); + + WM_operatortype_append(PARTICLE_OT_particle_edit_toggle); +} + +void ED_keymap_particle(wmWindowManager *wm) +{ + ListBase *keymap= WM_keymap_listbase(wm, "Particle", 0, 0); + + WM_keymap_add_item(keymap, "PARTICLE_OT_de_select_all", AKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1); + + WM_keymap_add_item(keymap, "PARTICLE_OT_delete", XKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_delete", DELKEY, KM_PRESS, 0, 0); + + WM_keymap_add_item(keymap, "PARTICLE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, 0, 0); + RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); + + WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0); + + WM_keymap_add_item(keymap, "PARTICLE_OT_specials_menu", WKEY, KM_PRESS, 0, 0); +} + diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index c738aa78d51..be9c76111db 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -119,7 +119,7 @@ void ED_region_do_listen(ARegion *ar, wmNotifier *note) case NC_SCREEN: if(note->action==NA_EDITED) ED_region_tag_redraw(ar); - break; + /* pass on */ default: if(ar->type && ar->type->listener) ar->type->listener(ar, note); @@ -325,16 +325,27 @@ static int rct_fits(rcti *rect, char dir, int size) static void region_rect_recursive(ARegion *ar, rcti *remainder, int quad) { + rcti *remainder_prev= remainder; int prefsizex, prefsizey; + int alignment; if(ar==NULL) return; + BLI_init_rcti(&ar->winrct, 0, 0, 0, 0); + + /* for test; allow split of previously defined region */ + if(ar->alignment & RGN_SPLIT_PREV) + if(ar->prev) + remainder= &ar->prev->winrct; + + alignment = ar->alignment & ~RGN_SPLIT_PREV; + /* clear state flags first */ ar->flag &= ~RGN_FLAG_TOO_SMALL; /* user errors */ - if(ar->next==NULL && ar->alignment!=RGN_ALIGN_QSPLIT) - ar->alignment= RGN_ALIGN_NONE; + if(ar->next==NULL && alignment!=RGN_ALIGN_QSPLIT) + alignment= RGN_ALIGN_NONE; prefsizex= ar->type->minsizex; prefsizey= ar->type->minsizey; @@ -342,17 +353,17 @@ static void region_rect_recursive(ARegion *ar, rcti *remainder, int quad) /* hidden is user flag */ if(ar->flag & RGN_FLAG_HIDDEN); /* XXX floating area region, not handled yet here */ - else if(ar->alignment == RGN_ALIGN_FLOAT); + else if(alignment == RGN_ALIGN_FLOAT); /* remainder is too small for any usage */ else if( rct_fits(remainder, 'v', 1)<0 || rct_fits(remainder, 'h', 1) < 0 ) { ar->flag |= RGN_FLAG_TOO_SMALL; } - else if(ar->alignment==RGN_ALIGN_NONE) { + else if(alignment==RGN_ALIGN_NONE) { /* typically last region */ ar->winrct= *remainder; BLI_init_rcti(remainder, 0, 0, 0, 0); } - else if(ar->alignment==RGN_ALIGN_TOP || ar->alignment==RGN_ALIGN_BOTTOM) { + else if(alignment==RGN_ALIGN_TOP || alignment==RGN_ALIGN_BOTTOM) { if( rct_fits(remainder, 'v', prefsizey) < 0 ) { ar->flag |= RGN_FLAG_TOO_SMALL; @@ -365,7 +376,7 @@ static void region_rect_recursive(ARegion *ar, rcti *remainder, int quad) ar->winrct= *remainder; - if(ar->alignment==RGN_ALIGN_TOP) { + if(alignment==RGN_ALIGN_TOP) { ar->winrct.ymin= ar->winrct.ymax - prefsizey + 1; remainder->ymax= ar->winrct.ymin - 1; } @@ -375,7 +386,7 @@ static void region_rect_recursive(ARegion *ar, rcti *remainder, int quad) } } } - else if( ELEM4(ar->alignment, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT)) { + else if( ELEM4(alignment, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT)) { if( rct_fits(remainder, 'h', prefsizex) < 0 ) { ar->flag |= RGN_FLAG_TOO_SMALL; @@ -388,23 +399,23 @@ static void region_rect_recursive(ARegion *ar, rcti *remainder, int quad) ar->winrct= *remainder; - if(ELEM(ar->alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT)) { + if(ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT)) { ar->winrct.xmin= ar->winrct.xmax - prefsizex + 1; - if(ar->alignment==RGN_ALIGN_RIGHT) + if(alignment==RGN_ALIGN_RIGHT) remainder->xmax= ar->winrct.xmin - 1; } else { ar->winrct.xmax= ar->winrct.xmin + prefsizex - 1; - if(ar->alignment==RGN_ALIGN_LEFT) + if(alignment==RGN_ALIGN_LEFT) remainder->xmin= ar->winrct.xmax + 1; } } } - else if(ar->alignment==RGN_ALIGN_VSPLIT || ar->alignment==RGN_ALIGN_HSPLIT) { + else if(alignment==RGN_ALIGN_VSPLIT || alignment==RGN_ALIGN_HSPLIT) { /* percentage subdiv*/ ar->winrct= *remainder; - if(ar->alignment==RGN_ALIGN_HSPLIT) { + if(alignment==RGN_ALIGN_HSPLIT) { if( rct_fits(remainder, 'h', prefsizex) > 4) { ar->winrct.xmax= (remainder->xmin+remainder->xmax)/2; remainder->xmin= ar->winrct.xmax+1; @@ -423,7 +434,7 @@ static void region_rect_recursive(ARegion *ar, rcti *remainder, int quad) } } } - else if(ar->alignment==RGN_ALIGN_QSPLIT) { + else if(alignment==RGN_ALIGN_QSPLIT) { ar->winrct= *remainder; /* test if there's still 4 regions left */ @@ -471,6 +482,14 @@ static void region_rect_recursive(ARegion *ar, rcti *remainder, int quad) ar->winx= ar->winrct.xmax - ar->winrct.xmin + 1; ar->winy= ar->winrct.ymax - ar->winrct.ymin + 1; + /* restore test exception */ + if(ar->alignment & RGN_SPLIT_PREV) { + if(ar->prev) { + remainder= remainder_prev; + ar->prev->winx= ar->prev->winrct.xmax - ar->prev->winrct.xmin + 1; + ar->prev->winy= ar->prev->winrct.ymax - ar->prev->winrct.ymin + 1; + } + } region_rect_recursive(ar->next, remainder, quad); } @@ -603,11 +622,17 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa) for(ar= sa->regionbase.first; ar; ar= ar->next) { region_subwindow(wm, win, ar); - /* default region handlers */ - ed_default_handlers(wm, &ar->handlers, ar->type->keymapflag); + if(ar->swinid) { + /* default region handlers */ + ed_default_handlers(wm, &ar->handlers, ar->type->keymapflag); - if(ar->type->init) - ar->type->init(wm, ar); + if(ar->type->init) + ar->type->init(wm, ar); + } + else { + /* prevent uiblocks to run */ + uiFreeBlocks(NULL, &ar->uiblocks); + } } area_azone_initialize(sa); @@ -729,6 +754,7 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type) WM_event_add_mousemove(C); ED_area_tag_redraw(sa); + ED_area_tag_refresh(sa); } } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 3f047add6d5..51515f18623 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1374,7 +1374,6 @@ void ed_screen_fullarea(bContext *C, ScrArea *sa) /* is there only 1 area? */ if(oldscreen->areabase.first==oldscreen->areabase.last) return; - if(sa->spacetype==SPACE_INFO) return; oldscreen->full = SCREENFULL; diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index 208e7a3f3dc..f39ca7d4c3e 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -57,6 +57,10 @@ void ed_screen_fullarea(bContext *C, ScrArea *sa); /* screen_context.c */ void ed_screen_context(const bContext *C, bContextDataMember member, bContextDataResult *result); +/* screendump.c */ +void SCREEN_OT_screenshot(struct wmOperatorType *ot); +void SCREEN_OT_screencast(struct wmOperatorType *ot); + #endif /* ED_SCREEN_INTERN_H */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 04e66995b2e..49acfed859c 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -24,6 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include + #include "MEM_guardedalloc.h" #include "BLI_arithb.h" @@ -71,6 +73,14 @@ /* ************** Exported Poll tests ********************** */ +int ED_operator_regionactive(bContext *C) +{ + if(CTX_wm_window(C)==NULL) return 0; + if(CTX_wm_screen(C)==NULL) return 0; + if(CTX_wm_region(C)==NULL) return 0; + return 1; +} + int ED_operator_areaactive(bContext *C) { if(CTX_wm_window(C)==NULL) return 0; @@ -238,9 +248,6 @@ int ED_operator_editsurfcurve(bContext *C) if(obedit && ELEM(obedit->type, OB_CURVE, OB_SURF)) return NULL != ((Curve *)obedit->data)->editnurb; return 0; - - // XXX this test was in many tools, still needed? - // if(v3d==0 || (v3d->lay & obedit->lay)==0 ) return 0; } @@ -260,6 +267,14 @@ int ED_operator_editsurf(bContext *C) return 0; } +int ED_operator_editfont(bContext *C) +{ + Object *obedit= CTX_data_edit_object(C); + if(obedit && obedit->type==OB_FONT) + return NULL != ((Curve *)obedit->data)->editfont; + return 0; +} + /* *************************** action zone operator ************************** */ /* operator state vars used: @@ -1040,7 +1055,7 @@ void SCREEN_OT_frame_offset(wmOperatorType *ot) ot->exec= frame_offset_exec; ot->poll= ED_operator_screenactive; - ot->flag= OPTYPE_REGISTER; + ot->flag= 0; /* rna */ RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); @@ -1118,7 +1133,7 @@ void SCREEN_OT_screen_full_area(wmOperatorType *ot) ot->exec= screen_full_area_exec; ot->poll= ED_operator_areaactive; - ot->flag= OPTYPE_REGISTER; + ot->flag= 0; } @@ -1478,24 +1493,9 @@ void SCREEN_OT_repeat_history(wmOperatorType *ot) /* ********************** redo operator ***************************** */ -static int redo_last_exec(bContext *C, wmOperator *op) +static void redo_last_cb(bContext *C, void *arg_op, void *arg2) { -#if 0 - /* XXX context is not correct after popup menu */ - wmOperator *lastop= CTX_wm_manager(C)->operators.last; - - if(lastop) { - ED_undo_pop(C); - WM_operator_repeat(C, lastop); - } -#endif - - return OPERATOR_CANCELLED; -} - -static void redo_last_cb(bContext *C, void *arg1, void *arg2) -{ - wmOperator *lastop= CTX_wm_manager(C)->operators.last; + wmOperator *lastop= arg_op; if(lastop) { ED_undo_pop(C); @@ -1514,7 +1514,7 @@ static uiBlock *ui_block_create_redo_last(bContext *C, ARegion *ar, void *arg_op block= uiBeginBlock(C, ar, "redo_last_popup", UI_EMBOSS, UI_HELV); uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1); - uiBlockSetFunc(block, redo_last_cb, NULL, NULL); + uiBlockSetFunc(block, redo_last_cb, arg_op, NULL); if(!op->properties) { IDPropertyTemplate val = {0}; @@ -1533,16 +1533,17 @@ static uiBlock *ui_block_create_redo_last(bContext *C, ARegion *ar, void *arg_op static int redo_last_invoke(bContext *C, wmOperator *op, wmEvent *event) { wmWindowManager *wm= CTX_wm_manager(C); - wmOperator *lastop= wm->operators.last; + wmOperator *lastop; + /* only for operators that are registered and did an undo push */ + for(lastop= wm->operators.last; lastop; lastop= lastop->prev) + if((lastop->type->flag & OPTYPE_REGISTER) && (lastop->type->flag & OPTYPE_UNDO)) + break; + if(!lastop) return OPERATOR_CANCELLED; - /* only for operators that are registered and did an undo push */ - if(!(lastop->type->flag & OPTYPE_REGISTER) || !(lastop->type->flag & OPTYPE_UNDO)) - return OPERATOR_CANCELLED; - - uiPupBlockO(C, ui_block_create_redo_last, lastop, op->type->idname, WM_OP_EXEC_DEFAULT); + uiPupBlock(C, ui_block_create_redo_last, lastop); return OPERATOR_CANCELLED; } @@ -1555,7 +1556,6 @@ void SCREEN_OT_redo_last(wmOperatorType *ot) /* api callbacks */ ot->invoke= redo_last_invoke; - ot->exec= redo_last_exec; ot->poll= ED_operator_screenactive; } @@ -1625,6 +1625,7 @@ static int region_foursplit_exec(bContext *C, wmOperator *op) if(sa->spacetype==SPACE_VIEW3D) { RegionView3D *rv3d= ar->regiondata; rv3d->viewlock= 0; + rv3d->rflag &= ~RV3D_CLIPPING; } for(ar= sa->regionbase.first; ar; ar= arn) { @@ -1774,7 +1775,14 @@ static int screen_animation_play(bContext *C, wmOperator *op, wmEvent *event) if(screen->animtimer==event->customdata) { Scene *scene= CTX_data_scene(C); - scene->r.cfra++; + if(scene->audio.flag & AUDIO_SYNC) { + wmTimer *wt= screen->animtimer; + int step = floor(wt->duration * FPS); + scene->r.cfra += step; + wt->duration -= ((float)step)/FPS; + } + else + scene->r.cfra++; if (scene->r.psfra) { if(scene->r.cfra > scene->r.pefra) @@ -2038,15 +2046,16 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec return; /* xmin here is first subrect x coord, xmax defines subrect width */ - xmin = renrect->xmin; - xmax = renrect->xmax - xmin; + xmin = renrect->xmin + rr->crop; + xmax = renrect->xmax - xmin - rr->crop; if (xmax<2) return; - ymin= renrect->ymin; - ymax= renrect->ymax - ymin; + ymin= renrect->ymin + rr->crop; + ymax= renrect->ymax - ymin - rr->crop; if(ymax<2) return; renrect->ymin= renrect->ymax; + } else { xmin = ymin = rr->crop; @@ -2064,6 +2073,7 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec xmax= ibuf->x - rxmin; if(rymin + ymax > ibuf->y) ymax= ibuf->y - rymin; + if(xmax < 1 || ymax < 1) return; /* find current float rect for display, first case is after composit... still weak */ @@ -2086,11 +2096,14 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec float *rf= rectf; char *rc= rectc; - for(x1= 0; x1= (char *)(ibuf->rect)) { + for(x1= 0; x1rectx; rectc += 4*ibuf->x; @@ -2125,6 +2138,22 @@ static int render_breakjob(void *rjv) return 0; } +/* catch esc */ +static int screen_render_modal(bContext *C, wmOperator *op, wmEvent *event) +{ + /* no running blender, remove handler and pass through */ + if(0==WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) + return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; + + /* running render */ + switch (event->type) { + case ESCKEY: + return OPERATOR_RUNNING_MODAL; + break; + } + return OPERATOR_PASS_THROUGH; +} + /* using context, starts job */ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) { @@ -2189,7 +2218,10 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) WM_cursor_wait(0); WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, scene); - return OPERATOR_FINISHED; + /* add modal handler for ESC */ + WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + + return OPERATOR_RUNNING_MODAL; } @@ -2202,6 +2234,7 @@ void SCREEN_OT_render(wmOperatorType *ot) /* api callbacks */ ot->invoke= screen_render_invoke; + ot->modal= screen_render_modal; ot->exec= screen_render_exec; ot->poll= ED_operator_screenactive; @@ -2219,12 +2252,18 @@ static int render_view_cancel_exec(bContext *C, wmOperator *unused) if(sima->flag & SI_PREVSPACE) { sima->flag &= ~SI_PREVSPACE; - ED_area_prevspace(C); + + if(sima->flag & SI_FULLWINDOW) { + sima->flag &= ~SI_FULLWINDOW; + ED_screen_full_prevspace(C); + } + else + ED_area_prevspace(C); } else if(sima->flag & SI_FULLWINDOW) { sima->flag &= ~SI_FULLWINDOW; - ED_screen_full_prevspace(C); - } + ed_screen_fullarea(C, sa); + } return OPERATOR_FINISHED; } @@ -2262,6 +2301,8 @@ void ED_operatortypes_screen(void) WM_operatortype_append(SCREEN_OT_region_flip); WM_operatortype_append(SCREEN_OT_screen_set); WM_operatortype_append(SCREEN_OT_screen_full_area); + WM_operatortype_append(SCREEN_OT_screenshot); + WM_operatortype_append(SCREEN_OT_screencast); /*frame changes*/ WM_operatortype_append(SCREEN_OT_frame_offset); @@ -2287,6 +2328,7 @@ void ED_keymap_screen(wmWindowManager *wm) WM_keymap_verify_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, 0, 0); + /* screen tools */ WM_keymap_verify_item(keymap, "SCREEN_OT_area_move", LEFTMOUSE, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "SCREEN_OT_area_split", EVT_ACTIONZONE, 0, 0, 0); WM_keymap_verify_item(keymap, "SCREEN_OT_area_join", EVT_ACTIONZONE, 0, 0, 0); @@ -2296,6 +2338,8 @@ void ED_keymap_screen(wmWindowManager *wm) WM_keymap_add_item(keymap, "SCREEN_OT_screen_full_area", UPARROWKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "SCREEN_OT_screen_full_area", DOWNARROWKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "SCREEN_OT_screen_full_area", SPACEKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "SCREEN_OT_screenshot", F3KEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "SCREEN_OT_screencast", F3KEY, KM_PRESS, KM_ALT, 0); /* tests */ WM_keymap_add_item(keymap, "SCREEN_OT_region_split", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); @@ -2307,8 +2351,8 @@ void ED_keymap_screen(wmWindowManager *wm) WM_keymap_verify_item(keymap, "SCREEN_OT_redo_last", F6KEY, KM_PRESS, 0, 0); /* files */ - WM_keymap_add_item(keymap, "ED_FILE_OT_load", RETKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "ED_FILE_OT_cancel", ESCKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_exec", RETKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_cancel", ESCKEY, KM_PRESS, 0, 0); /* undo */ WM_keymap_add_item(keymap, "ED_OT_undo", ZKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 34094c99120..75b85b9499f 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -43,89 +43,293 @@ #include "BKE_global.h" #include "BKE_image.h" #include "BKE_utildefines.h" +#include "BKE_writeavi.h" #include "BIF_gl.h" +#include "RNA_access.h" +#include "RNA_define.h" + #include "WM_types.h" #include "WM_api.h" -static unsigned int *dumprect= NULL; -static int dumpsx, dumpsy; +#include "PIL_time.h" -/* XXX */ -static int saveover() {return 0;} +#include "ED_fileselect.h" +#include "ED_screen.h" +#include "ED_screen_types.h" -/* Callback */ -void write_screendump(bContext *C, char *name) +#include "screen_intern.h" + +typedef struct ScreenshotData { + unsigned int *dumprect; + int dumpsx, dumpsy; +} ScreenshotData; + +static int screenshot_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - ImBuf *ibuf; + ScreenshotData *scd= op->customdata; - if(dumprect) { - - strcpy(G.ima, name); - BLI_convertstringcode(name, G.sce); - BLI_convertstringframe(name, scene->r.cfra); /* TODO - is this ever used? */ + if(scd && scd->dumprect) { + Scene *scene= CTX_data_scene(C); + ImBuf *ibuf; + char filename[FILE_MAX]; + + RNA_string_get(op->ptr, "filename", filename); + + strcpy(G.ima, filename); + BLI_convertstringcode(filename, G.sce); /* BKE_add_image_extension() checks for if extension was already set */ if(scene->r.scemode & R_EXTENSION) - if(strlen(name)r.imtype); + if(strlen(filename)r.imtype); - if(saveover(name)) { -// waitcursor(1); - - ibuf= IMB_allocImBuf(dumpsx, dumpsy, 24, 0, 0); - ibuf->rect= dumprect; - - if(scene->r.planes == 8) IMB_cspace(ibuf, rgb_to_bw); - - BKE_write_ibuf(scene, ibuf, name, scene->r.imtype, scene->r.subimtype, scene->r.quality); + ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0, 0); + ibuf->rect= scd->dumprect; + + if(scene->r.planes == 8) IMB_cspace(ibuf, rgb_to_bw); + + BKE_write_ibuf(scene, ibuf, filename, scene->r.imtype, scene->r.subimtype, scene->r.quality); - IMB_freeImBuf(ibuf); - -// waitcursor(0); - } - MEM_freeN(dumprect); - dumprect= NULL; + IMB_freeImBuf(ibuf); + + MEM_freeN(scd->dumprect); + MEM_freeN(scd); + op->customdata= NULL; } + return OPERATOR_FINISHED; } -/* get dump from frontbuffer */ -void ED_screendump(bContext *C, int fscreen) +/* get shot from frontbuffer */ +static unsigned int *screenshot(bContext *C, int *dumpsx, int *dumpsy, int fscreen) { wmWindow *win= CTX_wm_window(C); ScrArea *curarea= CTX_wm_area(C); int x=0, y=0; -// char imstr[64]; - - if(dumprect) MEM_freeN(dumprect); - dumprect= NULL; + unsigned int *dumprect= NULL; if(fscreen) { /* full screen */ x= 0; y= 0; - dumpsx= win->sizex; - dumpsy= win->sizey; - + *dumpsx= win->sizex; + *dumpsy= win->sizey; } else { x= curarea->totrct.xmin; y= curarea->totrct.ymin; - dumpsx= curarea->totrct.xmax-x; - dumpsy= curarea->totrct.ymax-y; + *dumpsx= curarea->totrct.xmax-x; + *dumpsy= curarea->totrct.ymax-y; } - - if (dumpsx && dumpsy) { + + if (*dumpsx && *dumpsy) { - dumprect= MEM_mallocN(sizeof(int)*dumpsx*dumpsy, "dumprect"); + dumprect= MEM_mallocN(sizeof(int) * dumpsx[0] * dumpsy[0], "dumprect"); glReadBuffer(GL_FRONT); - glReadPixels(x, y, dumpsx, dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect); + glReadPixels(x, y, *dumpsx, *dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect); glFinish(); glReadBuffer(GL_BACK); - - // save_image_filesel_str(imstr); - // activate_fileselect(FILE_SPECIAL, imstr, G.ima, write_screendump); } + return dumprect; } + + +static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + unsigned int *dumprect; + int dumpsx, dumpsy; + + dumprect= screenshot(C, &dumpsx, &dumpsy, RNA_boolean_get(op->ptr, "full")); + if(dumprect) { + ScreenshotData *scd= MEM_callocN(sizeof(ScreenshotData), "screenshot"); + + scd->dumpsx= dumpsx; + scd->dumpsy= dumpsy; + scd->dumprect= dumprect; + op->customdata= scd; + + if(RNA_property_is_set(op->ptr, "filename")) + return screenshot_exec(C, op); + + RNA_string_set(op->ptr, "filename", G.ima); + + WM_event_add_fileselect(C, op); + + return OPERATOR_RUNNING_MODAL; + } + return OPERATOR_CANCELLED; +} + + +void SCREEN_OT_screenshot(wmOperatorType *ot) +{ + ot->name= "Save Screenshot"; /* weak: opname starting with 'save' makes filewindow give save-over */ + ot->idname= "SCREEN_OT_screenshot"; + + ot->invoke= screenshot_invoke; + ot->exec= screenshot_exec; + ot->poll= WM_operator_winactive; + + ot->flag= 0; + + RNA_def_property(ot->srna, "filename", PROP_STRING, PROP_FILEPATH); + RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); +} + +/* *************** screenshot movie job ************************* */ + +typedef struct ScreenshotJob { + Scene *scene; + unsigned int *dumprect; + int x, y, dumpsx, dumpsy; + short *stop; + short *do_update; +} ScreenshotJob; + + +static void screenshot_freejob(void *sjv) +{ + ScreenshotJob *sj= sjv; + + if(sj->dumprect) + MEM_freeN(sj->dumprect); + + MEM_freeN(sj); +} + + +/* called before redraw notifiers, copies a new dumprect */ +static void screenshot_updatejob(void *sjv) +{ + ScreenshotJob *sj= sjv; + unsigned int *dumprect; + + if(sj->dumprect==NULL) { + dumprect= MEM_mallocN(sizeof(int) * sj->dumpsx * sj->dumpsy, "dumprect"); + glReadPixels(sj->x, sj->y, sj->dumpsx, sj->dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect); + glFinish(); + + sj->dumprect= dumprect; + } +} + + +/* only this runs inside thread */ +static void screenshot_startjob(void *sjv, short *stop, short *do_update) +{ + ScreenshotJob *sj= sjv; + RenderData rd= sj->scene->r; + bMovieHandle *mh= BKE_get_movie_handle(sj->scene->r.imtype); + int cfra= 1; + + /* we need this as local variables for renderdata */ + rd.frs_sec= 10; + rd.frs_sec_base= 1.0f; + + if(BKE_imtype_is_movie(rd.imtype)) + mh->start_movie(&rd, sj->dumpsx, sj->dumpsy); + else + mh= NULL; + + sj->stop= stop; + sj->do_update= do_update; + + *do_update= 1; // wait for opengl rect + + while(*stop==0) { + + if(sj->dumprect) { + + if(mh) { + mh->append_movie(&rd, cfra, sj->dumprect, sj->dumpsx, sj->dumpsy); + printf("Append frame %d\n", cfra); + } + else { + ImBuf *ibuf= IMB_allocImBuf(sj->dumpsx, sj->dumpsy, rd.planes, 0, 0); + char name[FILE_MAXDIR+FILE_MAXFILE]; + int ok; + + BKE_makepicstring(sj->scene, name, rd.pic, cfra, rd.imtype); + + ibuf->rect= sj->dumprect; + ok= BKE_write_ibuf(sj->scene, ibuf, name, rd.imtype, rd.subimtype, rd.quality); + + if(ok==0) { + printf("Write error: cannot save %s\n", name); + break; + } + else printf("Saved: %s\n", name); + + /* imbuf knows which rects are not part of ibuf */ + IMB_freeImBuf(ibuf); + } + + MEM_freeN(sj->dumprect); + sj->dumprect= NULL; + + *do_update= 1; + + cfra++; + } + else + PIL_sleep_ms(50); + } + + if(mh) + mh->end_movie(); + printf("screencast job stopped\n"); +} + +static int screencast_exec(bContext *C, wmOperator *op) +{ + bScreen *screen= CTX_wm_screen(C); + wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), screen); + ScreenshotJob *sj= MEM_callocN(sizeof(ScreenshotJob), "screenshot job"); + + /* setup sj */ + if(RNA_boolean_get(op->ptr, "full")) { + wmWindow *win= CTX_wm_window(C); + sj->x= 0; + sj->y= 0; + sj->dumpsx= win->sizex; + sj->dumpsy= win->sizey; + } + else { + ScrArea *curarea= CTX_wm_area(C); + sj->x= curarea->totrct.xmin; + sj->y= curarea->totrct.ymin; + sj->dumpsx= curarea->totrct.xmax - sj->x; + sj->dumpsy= curarea->totrct.ymax - sj->y; + } + sj->scene= CTX_data_scene(C); + + /* setup job */ + WM_jobs_customdata(steve, sj, screenshot_freejob); + WM_jobs_timer(steve, 0.1, 0, NC_SCREEN|ND_SCREENCAST); + WM_jobs_callbacks(steve, screenshot_startjob, NULL, screenshot_updatejob); + + WM_jobs_start(steve); + + WM_event_add_notifier(C, NC_SCREEN|ND_SCREENCAST, screen); + + return OPERATOR_FINISHED; +} + +void SCREEN_OT_screencast(wmOperatorType *ot) +{ + ot->name= "Make Screencast"; + ot->idname= "SCREEN_OT_screencast"; + + ot->invoke= WM_operator_confirm; + ot->exec= screencast_exec; + ot->poll= WM_operator_winactive; + + ot->flag= 0; + + RNA_def_property(ot->srna, "filename", PROP_STRING, PROP_FILEPATH); + RNA_def_boolean(ot->srna, "full", 1, "Full Screen", ""); +} + + + diff --git a/source/blender/editors/sculpt/Makefile b/source/blender/editors/sculpt_paint/Makefile similarity index 98% rename from source/blender/editors/sculpt/Makefile rename to source/blender/editors/sculpt_paint/Makefile index 6b5c8baf27a..e810f7efbe4 100644 --- a/source/blender/editors/sculpt/Makefile +++ b/source/blender/editors/sculpt_paint/Makefile @@ -28,7 +28,7 @@ # # Makes module object directory and bounces make to subdirectories. -LIBNAME = ed_sculpt +LIBNAME = ed_sculpt_paint DIR = $(OCGDIR)/blender/$(LIBNAME) include nan_compile.mk diff --git a/source/blender/editors/sculpt/SConscript b/source/blender/editors/sculpt_paint/SConscript similarity index 75% rename from source/blender/editors/sculpt/SConscript rename to source/blender/editors/sculpt_paint/SConscript index 430563323de..3e00453e049 100644 --- a/source/blender/editors/sculpt/SConscript +++ b/source/blender/editors/sculpt_paint/SConscript @@ -8,4 +8,4 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../render/extern/include #/intern/guardedalloc #intern/bmfont' incs += ' ../../gpu ../../makesrna' -env.BlenderLib ( 'bf_editors_sculpt', sources, Split(incs), [], libtype=['core'], priority=[40] ) \ No newline at end of file +env.BlenderLib ( 'bf_editors_sculpt_paint', sources, Split(incs), [], libtype=['core'], priority=[40] ) diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c new file mode 100644 index 00000000000..ee5aa1ee4a7 --- /dev/null +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -0,0 +1,5078 @@ +/** + * $Id$ + * imagepaint.c + * + * Functions to paint images in 2D and 3D. + * + * ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: some of this file. + * + * Contributor(s): Jens Ole Wund (bjornmose), Campbell Barton (ideasman42) + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include +#include +#include +#include + +#include "MEM_guardedalloc.h" + +#ifdef WIN32 +#include "BLI_winstuff.h" +#endif +#include "BLI_arithb.h" +#include "BLI_blenlib.h" +#include "BLI_dynstr.h" +#include "BLI_linklist.h" +#include "BLI_memarena.h" +#include "PIL_time.h" +#include "BLI_threads.h" + +#include "IMB_imbuf.h" +#include "IMB_imbuf_types.h" + +#include "DNA_brush_types.h" +#include "DNA_image_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_screen_types.h" +#include "DNA_space_types.h" +#include "DNA_userdef_types.h" +#include "DNA_view3d_types.h" +#include "DNA_windowmanager_types.h" + +#include "BKE_context.h" +#include "BKE_brush.h" +#include "BKE_global.h" +#include "BKE_image.h" +#include "BKE_main.h" +#include "BKE_mesh.h" +#include "BKE_node.h" +#include "BKE_utildefines.h" +#include "BKE_DerivedMesh.h" +#include "BKE_report.h" +#include "BKE_depsgraph.h" + +#include "BIF_gl.h" +#include "BIF_glutil.h" + +#include "UI_interface.h" +#include "UI_view2d.h" + +#include "ED_image.h" +#include "ED_object.h" +#include "ED_screen.h" +#include "ED_view3d.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "RNA_access.h" +#include "RNA_define.h" + +#include "GPU_draw.h" + +#include "paint_intern.h" + +/* Defines and Structs */ + +#define IMAPAINT_CHAR_TO_FLOAT(c) ((c)/255.0f) + +#define IMAPAINT_FLOAT_RGB_TO_CHAR(c, f) { (c)[0]=FTOCHAR((f)[0]); (c)[1]=FTOCHAR((f)[1]); (c)[2]=FTOCHAR((f)[2]); } +#define IMAPAINT_FLOAT_RGBA_TO_CHAR(c, f) { (c)[0]=FTOCHAR((f)[0]); (c)[1]=FTOCHAR((f)[1]); (c)[2]=FTOCHAR((f)[2]); (c)[3]=FTOCHAR((f)[3]); } + +#define IMAPAINT_CHAR_RGB_TO_FLOAT(f, c) { (f)[0]=IMAPAINT_CHAR_TO_FLOAT((c)[0]); (f)[1]=IMAPAINT_CHAR_TO_FLOAT((c)[1]); (f)[2]=IMAPAINT_CHAR_TO_FLOAT((c)[2]); } +#define IMAPAINT_CHAR_RGBA_TO_FLOAT(f, c) { (f)[0]=IMAPAINT_CHAR_TO_FLOAT((c)[0]); (f)[1]=IMAPAINT_CHAR_TO_FLOAT((c)[1]); (f)[2]=IMAPAINT_CHAR_TO_FLOAT((c)[2]); (f)[3]=IMAPAINT_CHAR_TO_FLOAT((c)[3]); } +#define IMAPAINT_FLOAT_RGB_COPY(a, b) VECCOPY(a, b) + +#define IMAPAINT_TILE_BITS 6 +#define IMAPAINT_TILE_SIZE (1 << IMAPAINT_TILE_BITS) +#define IMAPAINT_TILE_NUMBER(size) (((size)+IMAPAINT_TILE_SIZE-1) >> IMAPAINT_TILE_BITS) + +#define MAXUNDONAME 64 + +static void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, short texpaint); + + +typedef struct ImagePaintState { + SpaceImage *sima; + View2D *v2d; + Scene *scene; + bScreen *screen; + + Brush *brush; + short tool, blend; + Image *image; + ImBuf *canvas; + ImBuf *clonecanvas; + short clonefreefloat; + char *warnpackedfile; + char *warnmultifile; + + /* texture paint only */ + Object *ob; + Mesh *me; + int faceindex; + float uv[2]; +} ImagePaintState; + +typedef struct ImagePaintPartialRedraw { + int x1, y1, x2, y2; + int enabled; +} ImagePaintPartialRedraw; + + +/* ProjectionPaint defines */ + +/* approx the number of buckets to have under the brush, + * used with the brush size to set the ps->buckets_x and ps->buckets_y value. + * + * When 3 - a brush should have ~9 buckets under it at once + * ...this helps for threading while painting as well as + * avoiding initializing pixels that wont touch the brush */ +#define PROJ_BUCKET_BRUSH_DIV 4 + +#define PROJ_BUCKET_RECT_MIN 4 +#define PROJ_BUCKET_RECT_MAX 256 + +#define PROJ_BOUNDBOX_DIV 8 +#define PROJ_BOUNDBOX_SQUARED (PROJ_BOUNDBOX_DIV * PROJ_BOUNDBOX_DIV) + +//#define PROJ_DEBUG_PAINT 1 +//#define PROJ_DEBUG_NOSEAMBLEED 1 +//#define PROJ_DEBUG_PRINT_CLIP 1 +#define PROJ_DEBUG_WINCLIP 1 + +/* projectFaceSeamFlags options */ +//#define PROJ_FACE_IGNORE 1<<0 /* When the face is hidden, backfacing or occluded */ +//#define PROJ_FACE_INIT 1<<1 /* When we have initialized the faces data */ +#define PROJ_FACE_SEAM1 1<<0 /* If this face has a seam on any of its edges */ +#define PROJ_FACE_SEAM2 1<<1 +#define PROJ_FACE_SEAM3 1<<2 +#define PROJ_FACE_SEAM4 1<<3 + +#define PROJ_FACE_NOSEAM1 1<<4 +#define PROJ_FACE_NOSEAM2 1<<5 +#define PROJ_FACE_NOSEAM3 1<<6 +#define PROJ_FACE_NOSEAM4 1<<7 + +/* a slightly scaled down face is used to get fake 3D location for edge pixels in the seams + * as this number approaches 1.0f the likelihood increases of float precision errors where + * it is occluded by an adjacent face */ +#define PROJ_FACE_SCALE_SEAM 0.99f + +#define PROJ_BUCKET_NULL 0 +#define PROJ_BUCKET_INIT 1<<0 +// #define PROJ_BUCKET_CLONE_INIT 1<<1 + +/* used for testing doubles, if a point is on a line etc */ +#define PROJ_GEOM_TOLERANCE 0.0002f + +/* vert flags */ +#define PROJ_VERT_CULL 1 + +#define PI_80_DEG ((M_PI_2 / 9) * 8) + +/* This is mainly a convenience struct used so we can keep an array of images we use + * Thir imbufs, etc, in 1 array, When using threads this array is copied for each thread + * because 'partRedrawRect' and 'touch' values would not be thread safe */ +typedef struct ProjPaintImage { + Image *ima; + ImBuf *ibuf; + ImagePaintPartialRedraw *partRedrawRect; + struct UndoTile **undoRect; /* only used to build undo tiles after painting */ + int touch; +} ProjPaintImage; + +/* Main projection painting struct passed to all projection painting functions */ +typedef struct ProjPaintState { + View3D *v3d; + RegionView3D *rv3d; + ARegion *ar; + Scene *scene; + + Brush *brush; + short tool, blend; + Object *ob; + /* end similarities with ImagePaintState */ + + DerivedMesh *dm; + int dm_totface; + int dm_totvert; + + MVert *dm_mvert; + MFace *dm_mface; + MTFace *dm_mtface; + MTFace *dm_mtface_clone; /* other UV layer, use for cloning between layers */ + MTFace *dm_mtface_mask; + + /* projection painting only */ + MemArena *arena_mt[BLENDER_MAX_THREADS];/* for multithreading, the first item is sometimes used for non threaded cases too */ + LinkNode **bucketRect; /* screen sized 2D array, each pixel has a linked list of ProjPixel's */ + LinkNode **bucketFaces; /* bucketRect aligned array linkList of faces overlapping each bucket */ + unsigned char *bucketFlags; /* store if the bucks have been initialized */ +#ifndef PROJ_DEBUG_NOSEAMBLEED + char *faceSeamFlags; /* store info about faces, if they are initialized etc*/ + float (*faceSeamUVs)[4][2]; /* expanded UVs for faces to use as seams */ + LinkNode **vertFaces; /* Only needed for when seam_bleed_px is enabled, use to find UV seams */ + char *vertFlags; /* store options per vert, now only store if the vert is pointing away from the view */ +#endif + int buckets_x; /* The size of the bucket grid, the grid span's screenMin/screenMax so you can paint outsize the screen or with 2 brushes at once */ + int buckets_y; + + ProjPaintImage *projImages; + + int image_tot; /* size of projectImages array */ + + float (*screenCoords)[4]; /* verts projected into floating point screen space */ + + float screenMin[2]; /* 2D bounds for mesh verts on the screen's plane (screenspace) */ + float screenMax[2]; + float screen_width; /* Calculated from screenMin & screenMax */ + float screen_height; + + /* options for projection painting */ + int do_layer_clone; + int do_layer_mask; + int do_layer_mask_inv; + + short do_occlude; /* Use raytraced occlusion? - ortherwise will paint right through to the back*/ + short do_backfacecull; /* ignore faces with normals pointing away, skips a lot of raycasts if your normals are correctly flipped */ + short do_mask_normal; /* mask out pixels based on their normals */ + float normal_angle; /* what angle to mask at*/ + float normal_angle_inner; + float normal_angle_range; /* difference between normal_angle and normal_angle_inner, for easy access */ + + short is_ortho; + short is_airbrush; /* only to avoid using (ps.brush->flag & BRUSH_AIRBRUSH) */ + short is_texbrush; /* only to avoid running */ +#ifndef PROJ_DEBUG_NOSEAMBLEED + float seam_bleed_px; +#endif + /* clone vars */ + float cloneOffset[2]; + + float projectMat[4][4]; /* Projection matrix, use for getting screen coords */ + float viewMat[4][4]; + float viewDir[3]; /* View vector, use for do_backfacecull and for ray casting with an ortho viewport */ + float viewPos[3]; /* View location in object relative 3D space, so can compare to verts */ + float clipsta, clipend; + + /* threads */ + int thread_tot; + int bucketMin[2]; + int bucketMax[2]; + int context_bucket_x, context_bucket_y; /* must lock threads while accessing these */ +} ProjPaintState; + +typedef union pixelPointer +{ + float *f_pt; /* float buffer */ + unsigned int *uint_pt; /* 2 ways to access a char buffer */ + unsigned char *ch_pt; +} PixelPointer; + +typedef union pixelStore +{ + unsigned char ch[4]; + unsigned int uint; + float f[4]; +} PixelStore; + +typedef struct ProjPixel { + float projCoSS[2]; /* the floating point screen projection of this pixel */ + + /* Only used when the airbrush is disabled. + * Store the max mask value to avoid painting over an area with a lower opacity + * with an advantage that we can avoid touching the pixel at all, if the + * new mask value is lower then mask_max */ + unsigned short mask_max; + + /* for various reasons we may want to mask out painting onto this pixel */ + unsigned short mask; + + short x_px, y_px; + + PixelStore origColor; + PixelStore newColor; + PixelPointer pixel; + + short image_index; /* if anyone wants to paint onto more then 32768 images they can bite me */ + unsigned char bb_cell_index; +} ProjPixel; + +typedef struct ProjPixelClone { + struct ProjPixel __pp; + PixelStore clonepx; +} ProjPixelClone; + +/* Finish projection painting structs */ + + +typedef struct UndoTile { + struct UndoTile *next, *prev; + ID id; + void *rect; + int x, y; +} UndoTile; + +typedef struct UndoElem { + struct UndoElem *next, *prev; + char name[MAXUNDONAME]; + unsigned long undosize; + + ImBuf *ibuf; + ListBase tiles; +} UndoElem; + +static ListBase undobase = {NULL, NULL}; +static UndoElem *curundo = NULL; +static ImagePaintPartialRedraw imapaintpartial = {0, 0, 0, 0, 0}; + +/* UNDO */ + +/* internal functions */ + +static void undo_copy_tile(UndoTile *tile, ImBuf *tmpibuf, ImBuf *ibuf, int restore) +{ + /* copy or swap contents of tile->rect and region in ibuf->rect */ + IMB_rectcpy(tmpibuf, ibuf, 0, 0, tile->x*IMAPAINT_TILE_SIZE, + tile->y*IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); + + if(ibuf->rect_float) { + SWAP(void*, tmpibuf->rect_float, tile->rect); + } else { + SWAP(void*, tmpibuf->rect, tile->rect); + } + + if(restore) + IMB_rectcpy(ibuf, tmpibuf, tile->x*IMAPAINT_TILE_SIZE, + tile->y*IMAPAINT_TILE_SIZE, 0, 0, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); +} + +static UndoTile *undo_init_tile(ID *id, ImBuf *ibuf, ImBuf **tmpibuf, int x_tile, int y_tile) +{ + UndoTile *tile; + int allocsize; + + if (*tmpibuf==NULL) + *tmpibuf = IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, IB_rectfloat|IB_rect, 0); + + tile= MEM_callocN(sizeof(UndoTile), "ImaUndoTile"); + tile->id= *id; + tile->x= x_tile; + tile->y= y_tile; + + allocsize= IMAPAINT_TILE_SIZE*IMAPAINT_TILE_SIZE*4; + allocsize *= (ibuf->rect_float)? sizeof(float): sizeof(char); + tile->rect= MEM_mapallocN(allocsize, "ImaUndoRect"); + + undo_copy_tile(tile, *tmpibuf, ibuf, 0); + curundo->undosize += allocsize; + + BLI_addtail(&curundo->tiles, tile); + + return tile; +} + +static void undo_restore(UndoElem *undo) +{ + Image *ima = NULL; + ImBuf *ibuf, *tmpibuf; + UndoTile *tile; + + if(!undo) + return; + + tmpibuf= IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, + IB_rectfloat|IB_rect, 0); + + for(tile=undo->tiles.first; tile; tile=tile->next) { + /* find image based on name, pointer becomes invalid with global undo */ + if(ima && strcmp(tile->id.name, ima->id.name)==0); + else { + for(ima=G.main->image.first; ima; ima=ima->id.next) + if(strcmp(tile->id.name, ima->id.name)==0) + break; + } + + ibuf= BKE_image_get_ibuf(ima, NULL); + + if (!ima || !ibuf || !(ibuf->rect || ibuf->rect_float)) + continue; + + undo_copy_tile(tile, tmpibuf, ibuf, 1); + + GPU_free_image(ima); /* force OpenGL reload */ + if(ibuf->rect_float) + imb_freerectImBuf(ibuf); /* force recreate of char rect */ + } + + IMB_freeImBuf(tmpibuf); +} + +static void undo_free(UndoElem *undo) +{ + UndoTile *tile; + + for(tile=undo->tiles.first; tile; tile=tile->next) + MEM_freeN(tile->rect); + BLI_freelistN(&undo->tiles); +} + +static void undo_imagepaint_push_begin(char *name) +{ + UndoElem *uel; + int nr; + + /* Undo push is split up in begin and end, the reason is that as painting + * happens more tiles are added to the list, and at the very end we know + * how much memory the undo used to remove old undo elements */ + + /* remove all undos after (also when curundo==NULL) */ + while(undobase.last != curundo) { + uel= undobase.last; + undo_free(uel); + BLI_freelinkN(&undobase, uel); + } + + /* make new */ + curundo= uel= MEM_callocN(sizeof(UndoElem), "undo file"); + BLI_addtail(&undobase, uel); + + /* name can be a dynamic string */ + strncpy(uel->name, name, MAXUNDONAME-1); + + /* limit amount to the maximum amount*/ + nr= 0; + uel= undobase.last; + while(uel) { + nr++; + if(nr==U.undosteps) break; + uel= uel->prev; + } + if(uel) { + while(undobase.first!=uel) { + UndoElem *first= undobase.first; + undo_free(first); + BLI_freelinkN(&undobase, first); + } + } +} + +static void undo_imagepaint_push_end() +{ + UndoElem *uel; + unsigned long totmem, maxmem; + + if(U.undomemory != 0) { + /* limit to maximum memory (afterwards, we can't know in advance) */ + totmem= 0; + maxmem= ((unsigned long)U.undomemory)*1024*1024; + + uel= undobase.last; + while(uel) { + totmem+= uel->undosize; + if(totmem>maxmem) break; + uel= uel->prev; + } + + if(uel) { + while(undobase.first!=uel) { + UndoElem *first= undobase.first; + undo_free(first); + BLI_freelinkN(&undobase, first); + } + } + } +} + +void undo_imagepaint_step(int step) +{ + UndoElem *undo; + + if(step==1) { + if(curundo==NULL); + else { + if(G.f & G_DEBUG) printf("undo %s\n", curundo->name); + undo_restore(curundo); + curundo= curundo->prev; + } + } + else if(step==-1) { + if((curundo!=NULL && curundo->next==NULL) || undobase.first==NULL); + else { + undo= (curundo && curundo->next)? curundo->next: undobase.first; + undo_restore(undo); + curundo= undo; + if(G.f & G_DEBUG) printf("redo %s\n", undo->name); + } + } +} + +void undo_imagepaint_clear(void) +{ + UndoElem *uel; + + uel= undobase.first; + while(uel) { + undo_free(uel); + uel= uel->next; + } + + BLI_freelistN(&undobase); + curundo= NULL; +} + +/* fast projection bucket array lookup, use the safe version for bound checking */ +static int project_bucket_offset(const ProjPaintState *ps, const float projCoSS[2]) +{ + /* If we were not dealing with screenspace 2D coords we could simple do... + * ps->bucketRect[x + (y*ps->buckets_y)] */ + + /* please explain? + * projCoSS[0] - ps->screenMin[0] : zero origin + * ... / ps->screen_width : range from 0.0 to 1.0 + * ... * ps->buckets_x : use as a bucket index + * + * Second multiplication does similar but for vertical offset + */ + return ( (int)(((projCoSS[0] - ps->screenMin[0]) / ps->screen_width) * ps->buckets_x)) + + ( ( (int)(((projCoSS[1] - ps->screenMin[1]) / ps->screen_height) * ps->buckets_y)) * ps->buckets_x); +} + +static int project_bucket_offset_safe(const ProjPaintState *ps, const float projCoSS[2]) +{ + int bucket_index = project_bucket_offset(ps, projCoSS); + + if (bucket_index < 0 || bucket_index >= ps->buckets_x*ps->buckets_y) { + return -1; + } + else { + return bucket_index; + } +} + +#define SIDE_OF_LINE(pa, pb, pp) ((pa[0]-pp[0])*(pb[1]-pp[1]))-((pb[0]-pp[0])*(pa[1]-pp[1])) + +static float AreaSignedF2Dfl(float *v1, float *v2, float *v3) +{ + return (float)(0.5f*((v1[0]-v2[0])*(v2[1]-v3[1]) + +(v1[1]-v2[1])*(v3[0]-v2[0]))); +} + +static void BarycentricWeights2f(float pt[2], float v1[2], float v2[2], float v3[2], float w[3]) +{ + float wtot_inv, wtot; + + w[0] = AreaSignedF2Dfl(v2, v3, pt); + w[1] = AreaSignedF2Dfl(v3, v1, pt); + w[2] = AreaSignedF2Dfl(v1, v2, pt); + wtot = w[0]+w[1]+w[2]; + + if (wtot != 0.0f) { + wtot_inv = 1.0f/wtot; + + w[0] = w[0]*wtot_inv; + w[1] = w[1]*wtot_inv; + w[2] = w[2]*wtot_inv; + } + else /* dummy values for zero area face */ + w[0] = w[1] = w[2] = 1.0f/3.0f; +} + +/* still use 2D X,Y space but this works for verts transformed by a perspective matrix, using their 4th component as a weight */ +static void BarycentricWeightsPersp2f(float pt[2], float v1[4], float v2[4], float v3[4], float w[3]) +{ + float wtot_inv, wtot; + + w[0] = AreaSignedF2Dfl(v2, v3, pt) / v1[3]; + w[1] = AreaSignedF2Dfl(v3, v1, pt) / v2[3]; + w[2] = AreaSignedF2Dfl(v1, v2, pt) / v3[3]; + wtot = w[0]+w[1]+w[2]; + + if (wtot != 0.0f) { + wtot_inv = 1.0f/wtot; + + w[0] = w[0]*wtot_inv; + w[1] = w[1]*wtot_inv; + w[2] = w[2]*wtot_inv; + } + else /* dummy values for zero area face */ + w[0] = w[1] = w[2] = 1.0f/3.0f; +} + +static void VecWeightf(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3]) +{ + p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2]; + p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2]; + p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2]; +} + +static void Vec2Weightf(float p[2], const float v1[2], const float v2[2], const float v3[2], const float w[3]) +{ + p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2]; + p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2]; +} + +static float VecZDepthOrtho(float pt[2], float v1[3], float v2[3], float v3[3], float w[3]) +{ + BarycentricWeights2f(pt, v1, v2, v3, w); + return (v1[2]*w[0]) + (v2[2]*w[1]) + (v3[2]*w[2]); +} + +static float VecZDepthPersp(float pt[2], float v1[3], float v2[3], float v3[3], float w[3]) +{ + BarycentricWeightsPersp2f(pt, v1, v2, v3, w); + return (v1[2]*w[0]) + (v2[2]*w[1]) + (v3[2]*w[2]); +} + + +/* Return the top-most face index that the screen space coord 'pt' touches (or -1) */ +static int project_paint_PickFace(const ProjPaintState *ps, float pt[2], float w[3], int *side) +{ + LinkNode *node; + float w_tmp[3]; + float *v1, *v2, *v3, *v4; + int bucket_index; + int face_index; + int best_side = -1; + int best_face_index = -1; + float z_depth_best = FLT_MAX, z_depth; + MFace *mf; + + bucket_index = project_bucket_offset_safe(ps, pt); + if (bucket_index==-1) + return -1; + + + + /* we could return 0 for 1 face buckets, as long as this function assumes + * that the point its testing is only every originated from an existing face */ + + for (node= ps->bucketFaces[bucket_index]; node; node= node->next) { + face_index = GET_INT_FROM_POINTER(node->link); + mf= ps->dm_mface + face_index; + + v1= ps->screenCoords[mf->v1]; + v2= ps->screenCoords[mf->v2]; + v3= ps->screenCoords[mf->v3]; + + if (IsectPT2Df(pt, v1, v2, v3)) { + if (ps->is_ortho) z_depth= VecZDepthOrtho(pt, v1, v2, v3, w_tmp); + else z_depth= VecZDepthPersp(pt, v1, v2, v3, w_tmp); + + if (z_depth < z_depth_best) { + best_face_index = face_index; + best_side = 0; + z_depth_best = z_depth; + VECCOPY(w, w_tmp); + } + } + else if (mf->v4) { + v4= ps->screenCoords[mf->v4]; + + if (IsectPT2Df(pt, v1, v3, v4)) { + if (ps->is_ortho) z_depth= VecZDepthOrtho(pt, v1, v3, v4, w_tmp); + else z_depth= VecZDepthPersp(pt, v1, v3, v4, w_tmp); + + if (z_depth < z_depth_best) { + best_face_index = face_index; + best_side= 1; + z_depth_best = z_depth; + VECCOPY(w, w_tmp); + } + } + } + } + + *side = best_side; + return best_face_index; /* will be -1 or a valid face */ +} + +/* Converts a uv coord into a pixel location wrapping if the uv is outside 0-1 range */ +static void uvco_to_wrapped_pxco(float uv[2], int ibuf_x, int ibuf_y, float *x, float *y) +{ + /* use */ + *x = (float)fmod(uv[0], 1.0f); + *y = (float)fmod(uv[1], 1.0f); + + if (*x < 0.0f) *x += 1.0f; + if (*y < 0.0f) *y += 1.0f; + + *x = *x * ibuf_x - 0.5f; + *y = *y * ibuf_y - 0.5f; +} + +/* Set the top-most face color that the screen space coord 'pt' touches (or return 0 if none touch) */ +static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float *rgba_fp, unsigned char *rgba, const int interp) +{ + float w[3], uv[2]; + int side; + int face_index; + MTFace *tf; + ImBuf *ibuf; + int xi, yi; + + + face_index = project_paint_PickFace(ps, pt, w, &side); + + if (face_index == -1) + return 0; + + tf = ps->dm_mtface + face_index; + + if (side == 0) { + Vec2Weightf(uv, tf->uv[0], tf->uv[1], tf->uv[2], w); + } + else { /* QUAD */ + Vec2Weightf(uv, tf->uv[0], tf->uv[2], tf->uv[3], w); + } + + ibuf = BKE_image_get_ibuf((Image *)tf->tpage, NULL); /* TODO - this may be slow, the only way around it is to have an ibuf index per face */ + + + + if (interp) { + float x, y; + uvco_to_wrapped_pxco(uv, ibuf->x, ibuf->y, &x, &y); + + if (ibuf->rect_float) { + if (rgba_fp) { + bilinear_interpolation_color(ibuf, NULL, rgba_fp, x, y); + } + else { + float rgba_tmp_f[4]; + bilinear_interpolation_color(ibuf, NULL, rgba_tmp_f, x, y); + IMAPAINT_FLOAT_RGBA_TO_CHAR(rgba, rgba_tmp_f); + } + } + else { + if (rgba) { + bilinear_interpolation_color(ibuf, rgba, NULL, x, y); + } + else { + unsigned char rgba_tmp[4]; + bilinear_interpolation_color(ibuf, rgba_tmp, NULL, x, y); + IMAPAINT_CHAR_RGBA_TO_FLOAT(rgba_fp, rgba_tmp); + } + } + } + else { + xi = (uv[0]*ibuf->x) + 0.5f; + yi = (uv[1]*ibuf->y) + 0.5f; + + //if (xi<0 || xi>=ibuf->x || yi<0 || yi>=ibuf->y) return 0; + + /* wrap */ + xi = ((int)(uv[0]*ibuf->x)) % ibuf->x; + if (xi<0) xi += ibuf->x; + yi = ((int)(uv[1]*ibuf->y)) % ibuf->y; + if (yi<0) yi += ibuf->y; + + + if (rgba) { + if (ibuf->rect_float) { + float *rgba_tmp_fp = ibuf->rect_float + (xi + yi * ibuf->x * 4); + IMAPAINT_FLOAT_RGBA_TO_CHAR(rgba, rgba_tmp_fp); + } + else { + *((unsigned int *)rgba) = *(unsigned int *)(((char *)ibuf->rect) + ((xi + yi * ibuf->x) * 4)); + } + } + + if (rgba_fp) { + if (ibuf->rect_float) { + QUATCOPY(rgba_fp, ((float *)ibuf->rect_float + ((xi + yi * ibuf->x) * 4))); + } + else { + char *tmp_ch= ((char *)ibuf->rect) + ((xi + yi * ibuf->x) * 4); + IMAPAINT_CHAR_RGBA_TO_FLOAT(rgba_fp, tmp_ch); + } + } + } + return 1; +} + +/* Check if 'pt' is infront of the 3 verts on the Z axis (used for screenspace occlusuion test) + * return... + * 0 : no occlusion + * -1 : no occlusion but 2D intersection is true (avoid testing the other half of a quad) + * 1 : occluded + 2 : occluded with w[3] weights set (need to know in some cases) */ + +static int project_paint_occlude_ptv(float pt[3], float v1[3], float v2[3], float v3[3], float w[3], int is_ortho) +{ + /* if all are behind us, return false */ + if(v1[2] > pt[2] && v2[2] > pt[2] && v3[2] > pt[2]) + return 0; + + /* do a 2D point in try intersection */ + if (!IsectPT2Df(pt, v1, v2, v3)) + return 0; /* we know there is */ + + + /* From here on we know there IS an intersection */ + /* if ALL of the verts are infront of us then we know it intersects ? */ + if(v1[2] < pt[2] && v2[2] < pt[2] && v3[2] < pt[2]) { + return 1; + } + else { + /* we intersect? - find the exact depth at the point of intersection */ + /* Is this point is occluded by another face? */ + if (is_ortho) { + if (VecZDepthOrtho(pt, v1, v2, v3, w) < pt[2]) return 2; + } + else { + if (VecZDepthPersp(pt, v1, v2, v3, w) < pt[2]) return 2; + } + } + return -1; +} + + +static int project_paint_occlude_ptv_clip( + const ProjPaintState *ps, const MFace *mf, + float pt[3], float v1[3], float v2[3], float v3[3], + const int side ) +{ + float w[3], wco[3]; + int ret = project_paint_occlude_ptv(pt, v1, v2, v3, w, ps->is_ortho); + + if (ret <= 0) + return ret; + + if (ret==1) { /* weights not calculated */ + if (ps->is_ortho) BarycentricWeights2f(pt, v1, v2, v3, w); + else BarycentricWeightsPersp2f(pt, v1, v2, v3, w); + } + + /* Test if we're in the clipped area, */ + if (side) VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); + else VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); + + Mat4MulVecfl(ps->ob->obmat, wco); + if(!view3d_test_clipping(ps->rv3d, wco)) { + return 1; + } + + return -1; +} + + +/* Check if a screenspace location is occluded by any other faces + * check, pixelScreenCo must be in screenspace, its Z-Depth only needs to be used for comparison + * and dosn't need to be correct in relation to X and Y coords (this is the case in perspective view) */ +static int project_bucket_point_occluded(const ProjPaintState *ps, LinkNode *bucketFace, const int orig_face, float pixelScreenCo[4]) +{ + MFace *mf; + int face_index; + int isect_ret; + float w[3]; /* not needed when clipping */ + + /* we could return 0 for 1 face buckets, as long as this function assumes + * that the point its testing is only every originated from an existing face */ + + for (; bucketFace; bucketFace = bucketFace->next) { + face_index = GET_INT_FROM_POINTER(bucketFace->link); + + if (orig_face != face_index) { + mf = ps->dm_mface + face_index; + if(ps->rv3d->rflag & RV3D_CLIPPING) + isect_ret = project_paint_occlude_ptv_clip(ps, mf, pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v2], ps->screenCoords[mf->v3], 0); + else + isect_ret = project_paint_occlude_ptv(pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v2], ps->screenCoords[mf->v3], w, ps->is_ortho); + + /* Note, if isect_ret==-1 then we dont want to test the other side of the quad */ + if (isect_ret==0 && mf->v4) { + if(ps->rv3d->rflag & RV3D_CLIPPING) + isect_ret = project_paint_occlude_ptv_clip(ps, mf, pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v3], ps->screenCoords[mf->v4], 1); + else + isect_ret = project_paint_occlude_ptv(pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v3], ps->screenCoords[mf->v4], w, ps->is_ortho); + } + if (isect_ret==1) { + /* TODO - we may want to cache the first hit, + * it is not possible to swap the face order in the list anymore */ + return 1; + } + } + } + return 0; +} + +/* basic line intersection, could move to arithb.c, 2 points with a horiz line + * 1 for an intersection, 2 if the first point is aligned, 3 if the second point is aligned */ +#define ISECT_TRUE 1 +#define ISECT_TRUE_P1 2 +#define ISECT_TRUE_P2 3 +static int line_isect_y(const float p1[2], const float p2[2], const float y_level, float *x_isect) +{ + float y_diff; + + if (y_level==p1[1]) { /* are we touching the first point? - no interpolation needed */ + *x_isect = p1[0]; + return ISECT_TRUE_P1; + } + if (y_level==p2[1]) { /* are we touching the second point? - no interpolation needed */ + *x_isect = p2[0]; + return ISECT_TRUE_P2; + } + + y_diff= fabs(p1[1]-p2[1]); /* yuck, horizontal line, we cant do much here */ + + if (y_diff < 0.000001f) { + *x_isect = (p1[0]+p2[0]) * 0.5f; + return ISECT_TRUE; + } + + if (p1[1] > y_level && p2[1] < y_level) { + *x_isect = (p2[0]*(p1[1]-y_level) + p1[0]*(y_level-p2[1])) / y_diff; /*(p1[1]-p2[1]);*/ + return ISECT_TRUE; + } + else if (p1[1] < y_level && p2[1] > y_level) { + *x_isect = (p2[0]*(y_level-p1[1]) + p1[0]*(p2[1]-y_level)) / y_diff; /*(p2[1]-p1[1]);*/ + return ISECT_TRUE; + } + else { + return 0; + } +} + +static int line_isect_x(const float p1[2], const float p2[2], const float x_level, float *y_isect) +{ + float x_diff; + + if (x_level==p1[0]) { /* are we touching the first point? - no interpolation needed */ + *y_isect = p1[1]; + return ISECT_TRUE_P1; + } + if (x_level==p2[0]) { /* are we touching the second point? - no interpolation needed */ + *y_isect = p2[1]; + return ISECT_TRUE_P2; + } + + x_diff= fabs(p1[0]-p2[0]); /* yuck, horizontal line, we cant do much here */ + + if (x_diff < 0.000001) { /* yuck, vertical line, we cant do much here */ + *y_isect = (p1[0]+p2[0]) * 0.5f; + return ISECT_TRUE; + } + + if (p1[0] > x_level && p2[0] < x_level) { + *y_isect = (p2[1]*(p1[0]-x_level) + p1[1]*(x_level-p2[0])) / x_diff; /*(p1[0]-p2[0]);*/ + return ISECT_TRUE; + } + else if (p1[0] < x_level && p2[0] > x_level) { + *y_isect = (p2[1]*(x_level-p1[0]) + p1[1]*(p2[0]-x_level)) / x_diff; /*(p2[0]-p1[0]);*/ + return ISECT_TRUE; + } + else { + return 0; + } +} + +/* simple func use for comparing UV locations to check if there are seams. + * Its possible this gives incorrect results, when the UVs for 1 face go into the next + * tile, but do not do this for the adjacent face, it could return a false positive. + * This is so unlikely that Id not worry about it. */ +static int cmp_uv(const float vec2a[2], const float vec2b[2]) +{ + /* if the UV's are not between 0.0 and 1.0 */ + float xa = (float)fmod(vec2a[0], 1.0f); + float ya = (float)fmod(vec2a[1], 1.0f); + + float xb = (float)fmod(vec2b[0], 1.0f); + float yb = (float)fmod(vec2b[1], 1.0f); + + if (xa < 0.0f) xa += 1.0f; + if (ya < 0.0f) ya += 1.0f; + + if (xb < 0.0f) xb += 1.0f; + if (yb < 0.0f) yb += 1.0f; + + return ((fabs(xa-xb) < PROJ_GEOM_TOLERANCE) && (fabs(ya-yb) < PROJ_GEOM_TOLERANCE)) ? 1:0; +} + + +/* set min_px and max_px to the image space bounds of the UV coords + * return zero if there is no area in the returned rectangle */ +static int pixel_bounds_uv( + const float uv1[2], const float uv2[2], const float uv3[2], const float uv4[2], + rcti *bounds_px, + const int ibuf_x, const int ibuf_y, + int is_quad +) { + float min_uv[2], max_uv[2]; /* UV bounds */ + + INIT_MINMAX2(min_uv, max_uv); + + DO_MINMAX2(uv1, min_uv, max_uv); + DO_MINMAX2(uv2, min_uv, max_uv); + DO_MINMAX2(uv3, min_uv, max_uv); + if (is_quad) + DO_MINMAX2(uv4, min_uv, max_uv); + + bounds_px->xmin = (int)(ibuf_x * min_uv[0]); + bounds_px->ymin = (int)(ibuf_y * min_uv[1]); + + bounds_px->xmax = (int)(ibuf_x * max_uv[0]) +1; + bounds_px->ymax = (int)(ibuf_y * max_uv[1]) +1; + + /*printf("%d %d %d %d \n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ + + /* face uses no UV area when quantized to pixels? */ + return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? 0 : 1; +} + +static int pixel_bounds_array(float (* uv)[2], rcti *bounds_px, const int ibuf_x, const int ibuf_y, int tot) +{ + float min_uv[2], max_uv[2]; /* UV bounds */ + + if (tot==0) { + return 0; + } + + INIT_MINMAX2(min_uv, max_uv); + + while (tot--) { + DO_MINMAX2((*uv), min_uv, max_uv); + uv++; + } + + bounds_px->xmin = (int)(ibuf_x * min_uv[0]); + bounds_px->ymin = (int)(ibuf_y * min_uv[1]); + + bounds_px->xmax = (int)(ibuf_x * max_uv[0]) +1; + bounds_px->ymax = (int)(ibuf_y * max_uv[1]) +1; + + /*printf("%d %d %d %d \n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ + + /* face uses no UV area when quantized to pixels? */ + return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? 0 : 1; +} + +#ifndef PROJ_DEBUG_NOSEAMBLEED + +/* This function returns 1 if this face has a seam along the 2 face-vert indicies + * 'orig_i1_fidx' and 'orig_i2_fidx' */ +static int check_seam(const ProjPaintState *ps, const int orig_face, const int orig_i1_fidx, const int orig_i2_fidx, int *other_face, int *orig_fidx) +{ + LinkNode *node; + int face_index; + int i1, i2; + int i1_fidx = -1, i2_fidx = -1; /* index in face */ + MFace *mf; + MTFace *tf; + const MFace *orig_mf = ps->dm_mface + orig_face; + const MTFace *orig_tf = ps->dm_mtface + orig_face; + + /* vert indicies from face vert order indicies */ + i1 = (*(&orig_mf->v1 + orig_i1_fidx)); + i2 = (*(&orig_mf->v1 + orig_i2_fidx)); + + for (node = ps->vertFaces[i1]; node; node = node->next) { + face_index = GET_INT_FROM_POINTER(node->link); + + if (face_index != orig_face) { + mf = ps->dm_mface + face_index; + /* could check if the 2 faces images match here, + * but then there wouldn't be a way to return the opposite face's info */ + + + /* We need to know the order of the verts in the adjacent face + * set the i1_fidx and i2_fidx to (0,1,2,3) */ + if (mf->v1==i1) i1_fidx = 0; + else if (mf->v2==i1) i1_fidx = 1; + else if (mf->v3==i1) i1_fidx = 2; + else if (mf->v4 && mf->v4==i1) i1_fidx = 3; + + if (mf->v1==i2) i2_fidx = 0; + else if (mf->v2==i2) i2_fidx = 1; + else if (mf->v3==i2) i2_fidx = 2; + else if (mf->v4 && mf->v4==i2) i2_fidx = 3; + + /* Only need to check if 'i2_fidx' is valid because we know i1_fidx is the same vert on both faces */ + if (i2_fidx != -1) { + /* This IS an adjacent face!, now lets check if the UVs are ok */ + tf = ps->dm_mtface + face_index; + + /* set up the other face */ + *other_face = face_index; + *orig_fidx = (i1_fidx < i2_fidx) ? i1_fidx : i2_fidx; + + /* first test if they have the same image */ + if ( (orig_tf->tpage == tf->tpage) && + cmp_uv(orig_tf->uv[orig_i1_fidx], tf->uv[i1_fidx]) && + cmp_uv(orig_tf->uv[orig_i2_fidx], tf->uv[i2_fidx]) ) + { + // printf("SEAM (NONE)\n"); + return 0; + + } + else { + // printf("SEAM (UV GAP)\n"); + return 1; + } + } + } + } + // printf("SEAM (NO FACE)\n"); + *other_face = -1; + return 1; +} + +/* TODO - move to arithb.c */ +/* Converts an angle to a length that can be used for maintaining an even margin around UV's */ +static float angleToLength(float angle) +{ + // already accounted for + if (angle < 0.000001f) { + return 1.0f; + } + else { + return fabs(1.0f / cos(angle * (M_PI/180.0f))); + } +} + +/* Calculate outset UV's, this is not the same as simply scaling the UVs, + * since the outset coords are a margin that keep an even distance from the original UV's, + * note that the image aspect is taken into account */ +static void uv_image_outset(float (*orig_uv)[2], float (*outset_uv)[2], const float scaler, const int ibuf_x, const int ibuf_y, const int is_quad) +{ + float a1, a2, a3, a4=0.0f; + float puv[4][2]; /* pixelspace uv's */ + float no1[2], no2[2], no3[2], no4[2]; /* normals */ + float dir1[2], dir2[2], dir3[2], dir4[2]; + float ibuf_x_inv = 1.0f / (float)ibuf_x; + float ibuf_y_inv = 1.0f / (float)ibuf_y; + + /* make UV's in pixel space so we can */ + puv[0][0] = orig_uv[0][0] * ibuf_x; + puv[0][1] = orig_uv[0][1] * ibuf_y; + + puv[1][0] = orig_uv[1][0] * ibuf_x; + puv[1][1] = orig_uv[1][1] * ibuf_y; + + puv[2][0] = orig_uv[2][0] * ibuf_x; + puv[2][1] = orig_uv[2][1] * ibuf_y; + + if (is_quad) { + puv[3][0] = orig_uv[3][0] * ibuf_x; + puv[3][1] = orig_uv[3][1] * ibuf_y; + } + + /* face edge directions */ + Vec2Subf(dir1, puv[1], puv[0]); + Vec2Subf(dir2, puv[2], puv[1]); + Normalize2(dir1); + Normalize2(dir2); + + if (is_quad) { + Vec2Subf(dir3, puv[3], puv[2]); + Vec2Subf(dir4, puv[0], puv[3]); + Normalize2(dir3); + Normalize2(dir4); + } + else { + Vec2Subf(dir3, puv[0], puv[2]); + Normalize2(dir3); + } + + if (is_quad) { + a1 = angleToLength(NormalizedVecAngle2_2D(dir4, dir1)); + a2 = angleToLength(NormalizedVecAngle2_2D(dir1, dir2)); + a3 = angleToLength(NormalizedVecAngle2_2D(dir2, dir3)); + a4 = angleToLength(NormalizedVecAngle2_2D(dir3, dir4)); + } + else { + a1 = angleToLength(NormalizedVecAngle2_2D(dir3, dir1)); + a2 = angleToLength(NormalizedVecAngle2_2D(dir1, dir2)); + a3 = angleToLength(NormalizedVecAngle2_2D(dir2, dir3)); + } + + if (is_quad) { + Vec2Subf(no1, dir4, dir1); + Vec2Subf(no2, dir1, dir2); + Vec2Subf(no3, dir2, dir3); + Vec2Subf(no4, dir3, dir4); + Normalize2(no1); + Normalize2(no2); + Normalize2(no3); + Normalize2(no4); + Vec2Mulf(no1, a1*scaler); + Vec2Mulf(no2, a2*scaler); + Vec2Mulf(no3, a3*scaler); + Vec2Mulf(no4, a4*scaler); + Vec2Addf(outset_uv[0], puv[0], no1); + Vec2Addf(outset_uv[1], puv[1], no2); + Vec2Addf(outset_uv[2], puv[2], no3); + Vec2Addf(outset_uv[3], puv[3], no4); + outset_uv[0][0] *= ibuf_x_inv; + outset_uv[0][1] *= ibuf_y_inv; + + outset_uv[1][0] *= ibuf_x_inv; + outset_uv[1][1] *= ibuf_y_inv; + + outset_uv[2][0] *= ibuf_x_inv; + outset_uv[2][1] *= ibuf_y_inv; + + outset_uv[3][0] *= ibuf_x_inv; + outset_uv[3][1] *= ibuf_y_inv; + } + else { + Vec2Subf(no1, dir3, dir1); + Vec2Subf(no2, dir1, dir2); + Vec2Subf(no3, dir2, dir3); + Normalize2(no1); + Normalize2(no2); + Normalize2(no3); + Vec2Mulf(no1, a1*scaler); + Vec2Mulf(no2, a2*scaler); + Vec2Mulf(no3, a3*scaler); + Vec2Addf(outset_uv[0], puv[0], no1); + Vec2Addf(outset_uv[1], puv[1], no2); + Vec2Addf(outset_uv[2], puv[2], no3); + outset_uv[0][0] *= ibuf_x_inv; + outset_uv[0][1] *= ibuf_y_inv; + + outset_uv[1][0] *= ibuf_x_inv; + outset_uv[1][1] *= ibuf_y_inv; + + outset_uv[2][0] *= ibuf_x_inv; + outset_uv[2][1] *= ibuf_y_inv; + } +} + +/* + * Be tricky with flags, first 4 bits are PROJ_FACE_SEAM1 to 4, last 4 bits are PROJ_FACE_NOSEAM1 to 4 + * 1< (1,2,3,0) or (0,1,2) -> (1,2,0) for a tri */ + + do { + if ((ps->faceSeamFlags[face_index] & (1<faceSeamFlags[face_index] |= 1<faceSeamFlags[other_face] |= 1<faceSeamFlags[face_index] |= 16<faceSeamFlags[other_face] |= 16< 0.0f) { + wtot_inv = 1.0f / wtot; + w[0] *= wtot_inv; + w[1] *= wtot_inv; + w[2] *= wtot_inv; + } + else { + w[0] = w[1] = w[2] = 1.0/3.0; /* dummy values for zero area face */ + } + /* done re-weighting */ + + VecWeightf(pixelScreenCo, v1co, v2co, v3co, w); +} + +static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const float w[3], int side, unsigned char rgba_ub[4], float rgba_f[4]) +{ + float *uvCo1, *uvCo2, *uvCo3; + float uv_other[2], x, y; + + uvCo1 = (float *)tf_other->uv[0]; + if (side==1) { + uvCo2 = (float *)tf_other->uv[2]; + uvCo3 = (float *)tf_other->uv[3]; + } + else { + uvCo2 = (float *)tf_other->uv[1]; + uvCo3 = (float *)tf_other->uv[2]; + } + + Vec2Weightf(uv_other, uvCo1, uvCo2, uvCo3, w); + + /* use */ + uvco_to_wrapped_pxco(uv_other, ibuf_other->x, ibuf_other->y, &x, &y); + + + if (ibuf_other->rect_float) { /* from float to float */ + bilinear_interpolation_color(ibuf_other, NULL, rgba_f, x, y); + } + else { /* from char to float */ + bilinear_interpolation_color(ibuf_other, rgba_ub, NULL, x, y); + } + +} + +/* run this outside project_paint_uvpixel_init since pixels with mask 0 dont need init */ +float project_paint_uvpixel_mask( + const ProjPaintState *ps, + const int face_index, + const int side, + const float w[3]) +{ + float mask; + + /* Image Mask */ + if (ps->do_layer_mask) { + /* another UV layers image is masking this one's */ + ImBuf *ibuf_other; + const MTFace *tf_other = ps->dm_mtface_mask + face_index; + + if (tf_other->tpage && (ibuf_other = BKE_image_get_ibuf((Image *)tf_other->tpage, NULL))) { + /* BKE_image_get_ibuf - TODO - this may be slow */ + unsigned char rgba_ub[4]; + float rgba_f[4]; + + project_face_pixel(tf_other, ibuf_other, w, side, rgba_ub, rgba_f); + + if (ibuf_other->rect_float) { /* from float to float */ + mask = ((rgba_f[0]+rgba_f[1]+rgba_f[2])/3.0f) * rgba_f[3]; + } + else { /* from char to float */ + mask = ((rgba_ub[0]+rgba_ub[1]+rgba_ub[2])/(256*3.0f)) * (rgba_ub[3]/256.0f); + } + + if (!ps->do_layer_mask_inv) /* matching the gimps layer mask black/white rules, white==full opacity */ + mask = (1.0f - mask); + + if (mask == 0.0f) { + return 0.0f; + } + } + else { + return 0.0f; + } + } else { + mask = 1.0f; + } + + /* calculate mask */ + if (ps->do_mask_normal) { + MFace *mf = ps->dm_mface + face_index; + short *no1, *no2, *no3; + float no[3], angle; + no1 = ps->dm_mvert[mf->v1].no; + if (side==1) { + no2 = ps->dm_mvert[mf->v3].no; + no3 = ps->dm_mvert[mf->v4].no; + } + else { + no2 = ps->dm_mvert[mf->v2].no; + no3 = ps->dm_mvert[mf->v3].no; + } + + no[0] = w[0]*no1[0] + w[1]*no2[0] + w[2]*no3[0]; + no[1] = w[0]*no1[1] + w[1]*no2[1] + w[2]*no3[1]; + no[2] = w[0]*no1[2] + w[1]*no2[2] + w[2]*no3[2]; + Normalize(no); + + /* now we can use the normal as a mask */ + if (ps->is_ortho) { + angle = NormalizedVecAngle2((float *)ps->viewDir, no); + } + else { + /* Annoying but for the perspective view we need to get the pixels location in 3D space :/ */ + float viewDirPersp[3]; + float *co1, *co2, *co3; + co1 = ps->dm_mvert[mf->v1].co; + if (side==1) { + co2 = ps->dm_mvert[mf->v3].co; + co3 = ps->dm_mvert[mf->v4].co; + } + else { + co2 = ps->dm_mvert[mf->v2].co; + co3 = ps->dm_mvert[mf->v3].co; + } + + /* Get the direction from the viewPoint to the pixel and normalize */ + viewDirPersp[0] = (ps->viewPos[0] - (w[0]*co1[0] + w[1]*co2[0] + w[2]*co3[0])); + viewDirPersp[1] = (ps->viewPos[1] - (w[0]*co1[1] + w[1]*co2[1] + w[2]*co3[1])); + viewDirPersp[2] = (ps->viewPos[2] - (w[0]*co1[2] + w[1]*co2[2] + w[2]*co3[2])); + Normalize(viewDirPersp); + + angle = NormalizedVecAngle2(viewDirPersp, no); + } + + if (angle >= ps->normal_angle) { + return 0.0f; /* outsize the normal limit*/ + } + else if (angle > ps->normal_angle_inner) { + mask *= (ps->normal_angle - angle) / ps->normal_angle_range; + } /* otherwise no mask normal is needed, were within the limit */ + } + + // This only works when the opacity dosnt change while painting, stylus pressure messes with this + // so dont use it. + // if (ps->is_airbrush==0) mask *= ps->brush->alpha; + + return mask; +} + +/* run this function when we know a bucket's, face's pixel can be initialized, + * return the ProjPixel which is added to 'ps->bucketRect[bucket_index]' */ +static ProjPixel *project_paint_uvpixel_init( + const ProjPaintState *ps, + MemArena *arena, + const ImBuf *ibuf, + short x_px, short y_px, + const float mask, + const int face_index, + const int image_index, + const float pixelScreenCo[4], + const int side, + const float w[3]) +{ + ProjPixel *projPixel; + short size; + + /* wrap pixel location */ + x_px = x_px % ibuf->x; + if (x_px<0) x_px += ibuf->x; + y_px = y_px % ibuf->y; + if (y_px<0) y_px += ibuf->y; + + if (ps->tool==PAINT_TOOL_CLONE) { + size = sizeof(ProjPixelClone); + } + else if (ps->tool==PAINT_TOOL_SMEAR) { + size = sizeof(ProjPixelClone); + } + else { + size = sizeof(ProjPixel); + } + + projPixel = (ProjPixel *)BLI_memarena_alloc(arena, size); + //memset(projPixel, 0, size); + + if (ibuf->rect_float) { + projPixel->pixel.f_pt = (float *)ibuf->rect_float + ((x_px + y_px * ibuf->x) * 4); + projPixel->origColor.f[0] = projPixel->newColor.f[0] = projPixel->pixel.f_pt[0]; + projPixel->origColor.f[1] = projPixel->newColor.f[1] = projPixel->pixel.f_pt[1]; + projPixel->origColor.f[2] = projPixel->newColor.f[2] = projPixel->pixel.f_pt[2]; + projPixel->origColor.f[3] = projPixel->newColor.f[3] = projPixel->pixel.f_pt[3]; + } + else { + projPixel->pixel.ch_pt = ((unsigned char *)ibuf->rect + ((x_px + y_px * ibuf->x) * 4)); + projPixel->origColor.uint = projPixel->newColor.uint = *projPixel->pixel.uint_pt; + } + + /* screenspace unclamped, we could keep its z and w values but dont need them at the moment */ + VECCOPY2D(projPixel->projCoSS, pixelScreenCo); + + projPixel->x_px = x_px; + projPixel->y_px = y_px; + + projPixel->mask = (unsigned short)(mask * 65535); + projPixel->mask_max = 0; + + /* which bounding box cell are we in?, needed for undo */ + projPixel->bb_cell_index = ((int)(((float)x_px/(float)ibuf->x) * PROJ_BOUNDBOX_DIV)) + ((int)(((float)y_px/(float)ibuf->y) * PROJ_BOUNDBOX_DIV)) * PROJ_BOUNDBOX_DIV ; + + /* done with view3d_project_float inline */ + if (ps->tool==PAINT_TOOL_CLONE) { + if (ps->dm_mtface_clone) { + ImBuf *ibuf_other; + const MTFace *tf_other = ps->dm_mtface_clone + face_index; + + if (tf_other->tpage && (ibuf_other = BKE_image_get_ibuf((Image *)tf_other->tpage, NULL))) { + /* BKE_image_get_ibuf - TODO - this may be slow */ + + if (ibuf->rect_float) { + if (ibuf_other->rect_float) { /* from float to float */ + project_face_pixel(tf_other, ibuf_other, w, side, NULL, ((ProjPixelClone *)projPixel)->clonepx.f); + } + else { /* from char to float */ + unsigned char rgba_ub[4]; + project_face_pixel(tf_other, ibuf_other, w, side, rgba_ub, NULL); + IMAPAINT_CHAR_RGBA_TO_FLOAT(((ProjPixelClone *)projPixel)->clonepx.f, rgba_ub); + } + } + else { + if (ibuf_other->rect_float) { /* float to char */ + float rgba[4]; + project_face_pixel(tf_other, ibuf_other, w, side, NULL, rgba); + IMAPAINT_FLOAT_RGBA_TO_CHAR(((ProjPixelClone *)projPixel)->clonepx.ch, rgba) + } + else { /* char to char */ + project_face_pixel(tf_other, ibuf_other, w, side, ((ProjPixelClone *)projPixel)->clonepx.ch, NULL); + } + } + } + else { + if (ibuf->rect_float) { + ((ProjPixelClone *)projPixel)->clonepx.f[3] = 0; + } + else { + ((ProjPixelClone *)projPixel)->clonepx.ch[3] = 0; + } + } + + } + else { + float co[2]; + Vec2Subf(co, projPixel->projCoSS, (float *)ps->cloneOffset); + + /* no need to initialize the bucket, we're only checking buckets faces and for this + * the faces are alredy initialized in project_paint_delayed_face_init(...) */ + if (ibuf->rect_float) { + if (!project_paint_PickColor(ps, co, ((ProjPixelClone *)projPixel)->clonepx.f, NULL, 1)) { + ((ProjPixelClone *)projPixel)->clonepx.f[3] = 0; /* zero alpha - ignore */ + } + } + else { + if (!project_paint_PickColor(ps, co, NULL, ((ProjPixelClone *)projPixel)->clonepx.ch, 1)) { + ((ProjPixelClone *)projPixel)->clonepx.ch[3] = 0; /* zero alpha - ignore */ + } + } + } + } + +#ifdef PROJ_DEBUG_PAINT + if (ibuf->rect_float) projPixel->pixel.f_pt[0] = 0; + else projPixel->pixel.ch_pt[0] = 0; +#endif + projPixel->image_index = image_index; + + return projPixel; +} + +static int line_clip_rect2f( + rctf *rect, + const float l1[2], const float l2[2], + float l1_clip[2], float l2_clip[2]) +{ + /* first account for horizontal, then vertical lines */ + /* horiz */ + if (fabs(l1[1]-l2[1]) < PROJ_GEOM_TOLERANCE) { + /* is the line out of range on its Y axis? */ + if (l1[1] < rect->ymin || l1[1] > rect->ymax) { + return 0; + } + /* line is out of range on its X axis */ + if ((l1[0] < rect->xmin && l2[0] < rect->xmin) || (l1[0] > rect->xmax && l2[0] > rect->xmax)) { + return 0; + } + + + if (fabs(l1[0]-l2[0]) < PROJ_GEOM_TOLERANCE) { /* this is a single point (or close to)*/ + if (BLI_in_rctf(rect, l1[0], l1[1])) { + VECCOPY2D(l1_clip, l1); + VECCOPY2D(l2_clip, l2); + return 1; + } + else { + return 0; + } + } + + VECCOPY2D(l1_clip, l1); + VECCOPY2D(l2_clip, l2); + CLAMP(l1_clip[0], rect->xmin, rect->xmax); + CLAMP(l2_clip[0], rect->xmin, rect->xmax); + return 1; + } + else if (fabs(l1[0]-l2[0]) < PROJ_GEOM_TOLERANCE) { + /* is the line out of range on its X axis? */ + if (l1[0] < rect->xmin || l1[0] > rect->xmax) { + return 0; + } + + /* line is out of range on its Y axis */ + if ((l1[1] < rect->ymin && l2[1] < rect->ymin) || (l1[1] > rect->ymax && l2[1] > rect->ymax)) { + return 0; + } + + if (fabs(l1[1]-l2[1]) < PROJ_GEOM_TOLERANCE) { /* this is a single point (or close to)*/ + if (BLI_in_rctf(rect, l1[0], l1[1])) { + VECCOPY2D(l1_clip, l1); + VECCOPY2D(l2_clip, l2); + return 1; + } + else { + return 0; + } + } + + VECCOPY2D(l1_clip, l1); + VECCOPY2D(l2_clip, l2); + CLAMP(l1_clip[1], rect->ymin, rect->ymax); + CLAMP(l2_clip[1], rect->ymin, rect->ymax); + return 1; + } + else { + float isect; + short ok1 = 0; + short ok2 = 0; + + /* Done with vertical lines */ + + /* are either of the points inside the rectangle ? */ + if (BLI_in_rctf(rect, l1[0], l1[1])) { + VECCOPY2D(l1_clip, l1); + ok1 = 1; + } + + if (BLI_in_rctf(rect, l2[0], l2[1])) { + VECCOPY2D(l2_clip, l2); + ok2 = 1; + } + + /* line inside rect */ + if (ok1 && ok2) return 1; + + /* top/bottom */ + if (line_isect_y(l1, l2, rect->ymin, &isect) && (isect >= rect->xmin) && (isect <= rect->xmax)) { + if (l1[1] < l2[1]) { /* line 1 is outside */ + l1_clip[0] = isect; + l1_clip[1] = rect->ymin; + ok1 = 1; + } + else { + l2_clip[0] = isect; + l2_clip[1] = rect->ymin; + ok2 = 2; + } + } + + if (ok1 && ok2) return 1; + + if (line_isect_y(l1, l2, rect->ymax, &isect) && (isect >= rect->xmin) && (isect <= rect->xmax)) { + if (l1[1] > l2[1]) { /* line 1 is outside */ + l1_clip[0] = isect; + l1_clip[1] = rect->ymax; + ok1 = 1; + } + else { + l2_clip[0] = isect; + l2_clip[1] = rect->ymax; + ok2 = 2; + } + } + + if (ok1 && ok2) return 1; + + /* left/right */ + if (line_isect_x(l1, l2, rect->xmin, &isect) && (isect >= rect->ymin) && (isect <= rect->ymax)) { + if (l1[0] < l2[0]) { /* line 1 is outside */ + l1_clip[0] = rect->xmin; + l1_clip[1] = isect; + ok1 = 1; + } + else { + l2_clip[0] = rect->xmin; + l2_clip[1] = isect; + ok2 = 2; + } + } + + if (ok1 && ok2) return 1; + + if (line_isect_x(l1, l2, rect->xmax, &isect) && (isect >= rect->ymin) && (isect <= rect->ymax)) { + if (l1[0] > l2[0]) { /* line 1 is outside */ + l1_clip[0] = rect->xmax; + l1_clip[1] = isect; + ok1 = 1; + } + else { + l2_clip[0] = rect->xmax; + l2_clip[1] = isect; + ok2 = 2; + } + } + + if (ok1 && ok2) { + return 1; + } + else { + return 0; + } + } +} + + + +/* scale the quad & tri about its center + * scaling by PROJ_FACE_SCALE_SEAM (0.99x) is used for getting fake UV pixel coords that are on the + * edge of the face but slightly inside it occlusion tests dont return hits on adjacent faces */ +static void scale_quad(float insetCos[4][3], float *origCos[4], const float inset) +{ + float cent[3]; + cent[0] = (origCos[0][0] + origCos[1][0] + origCos[2][0] + origCos[3][0]) / 4.0f; + cent[1] = (origCos[0][1] + origCos[1][1] + origCos[2][1] + origCos[3][1]) / 4.0f; + cent[2] = (origCos[0][2] + origCos[1][2] + origCos[2][2] + origCos[3][2]) / 4.0f; + + VecSubf(insetCos[0], origCos[0], cent); + VecSubf(insetCos[1], origCos[1], cent); + VecSubf(insetCos[2], origCos[2], cent); + VecSubf(insetCos[3], origCos[3], cent); + + VecMulf(insetCos[0], inset); + VecMulf(insetCos[1], inset); + VecMulf(insetCos[2], inset); + VecMulf(insetCos[3], inset); + + VecAddf(insetCos[0], insetCos[0], cent); + VecAddf(insetCos[1], insetCos[1], cent); + VecAddf(insetCos[2], insetCos[2], cent); + VecAddf(insetCos[3], insetCos[3], cent); +} + + +static void scale_tri(float insetCos[4][3], float *origCos[4], const float inset) +{ + float cent[3]; + cent[0] = (origCos[0][0] + origCos[1][0] + origCos[2][0]) / 3.0f; + cent[1] = (origCos[0][1] + origCos[1][1] + origCos[2][1]) / 3.0f; + cent[2] = (origCos[0][2] + origCos[1][2] + origCos[2][2]) / 3.0f; + + VecSubf(insetCos[0], origCos[0], cent); + VecSubf(insetCos[1], origCos[1], cent); + VecSubf(insetCos[2], origCos[2], cent); + + VecMulf(insetCos[0], inset); + VecMulf(insetCos[1], inset); + VecMulf(insetCos[2], inset); + + VecAddf(insetCos[0], insetCos[0], cent); + VecAddf(insetCos[1], insetCos[1], cent); + VecAddf(insetCos[2], insetCos[2], cent); +} + + +static float Vec2Lenf_nosqrt(const float *v1, const float *v2) +{ + float x, y; + + x = v1[0]-v2[0]; + y = v1[1]-v2[1]; + return x*x+y*y; +} + +static float Vec2Lenf_nosqrt_other(const float *v1, const float v2_1, const float v2_2) +{ + float x, y; + + x = v1[0]-v2_1; + y = v1[1]-v2_2; + return x*x+y*y; +} + +/* note, use a squared value so we can use Vec2Lenf_nosqrt + * be sure that you have done a bounds check first or this may fail */ +/* only give bucket_bounds as an arg because we need it elsewhere */ +static int project_bucket_isect_circle(const int bucket_x, const int bucket_y, const float cent[2], const float radius_squared, rctf *bucket_bounds) +{ + + /* Would normally to a simple intersection test, however we know the bounds of these 2 alredy intersect + * so we only need to test if the center is inside the vertical or horizontal bounds on either axis, + * this is even less work then an intersection test + * + if (BLI_in_rctf(bucket_bounds, cent[0], cent[1])) + return 1; + */ + + if((bucket_bounds->xmin <= cent[0] && bucket_bounds->xmax >= cent[0]) || (bucket_bounds->ymin <= cent[1] && bucket_bounds->ymax >= cent[1]) ) { + return 1; + } + + /* out of bounds left */ + if (cent[0] < bucket_bounds->xmin) { + /* lower left out of radius test */ + if (cent[1] < bucket_bounds->ymin) { + return (Vec2Lenf_nosqrt_other(cent, bucket_bounds->xmin, bucket_bounds->ymin) < radius_squared) ? 1 : 0; + } + /* top left test */ + else if (cent[1] > bucket_bounds->ymax) { + return (Vec2Lenf_nosqrt_other(cent, bucket_bounds->xmin, bucket_bounds->ymax) < radius_squared) ? 1 : 0; + } + } + else if (cent[0] > bucket_bounds->xmax) { + /* lower right out of radius test */ + if (cent[1] < bucket_bounds->ymin) { + return (Vec2Lenf_nosqrt_other(cent, bucket_bounds->xmax, bucket_bounds->ymin) < radius_squared) ? 1 : 0; + } + /* top right test */ + else if (cent[1] > bucket_bounds->ymax) { + return (Vec2Lenf_nosqrt_other(cent, bucket_bounds->xmax, bucket_bounds->ymax) < radius_squared) ? 1 : 0; + } + } + + return 0; +} + + + +/* Note for rect_to_uvspace_ortho() and rect_to_uvspace_persp() + * in ortho view this function gives good results when bucket_bounds are outside the triangle + * however in some cases, perspective view will mess up with faces that have minimal screenspace area (viewed from the side) + * + * for this reason its not relyable in this case so we'll use the Simple Barycentric' funcs that only account for points inside the triangle. + * however switching back to this for ortho is always an option */ + +static void rect_to_uvspace_ortho( + rctf *bucket_bounds, + float *v1coSS, float *v2coSS, float *v3coSS, + float *uv1co, float *uv2co, float *uv3co, + float bucket_bounds_uv[4][2], + const int flip) +{ + float uv[2]; + float w[3]; + + /* get the UV space bounding box */ + uv[0] = bucket_bounds->xmax; + uv[1] = bucket_bounds->ymin; + BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w); + + //uv[0] = bucket_bounds->xmax; // set above + uv[1] = bucket_bounds->ymax; + BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w); + + uv[0] = bucket_bounds->xmin; + //uv[1] = bucket_bounds->ymax; // set above + BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w); + + //uv[0] = bucket_bounds->xmin; // set above + uv[1] = bucket_bounds->ymin; + BarycentricWeights2f(uv, v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w); +} + +/* same as above but use BarycentricWeightsPersp2f */ +static void rect_to_uvspace_persp( + rctf *bucket_bounds, + float *v1coSS, float *v2coSS, float *v3coSS, + float *uv1co, float *uv2co, float *uv3co, + float bucket_bounds_uv[4][2], + const int flip + ) +{ + float uv[2]; + float w[3]; + + /* get the UV space bounding box */ + uv[0] = bucket_bounds->xmax; + uv[1] = bucket_bounds->ymin; + BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w); + + //uv[0] = bucket_bounds->xmax; // set above + uv[1] = bucket_bounds->ymax; + BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w); + + uv[0] = bucket_bounds->xmin; + //uv[1] = bucket_bounds->ymax; // set above + BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w); + + //uv[0] = bucket_bounds->xmin; // set above + uv[1] = bucket_bounds->ymin; + BarycentricWeightsPersp2f(uv, v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w); +} + +/* This works as we need it to but we can save a few steps and not use it */ + +#if 0 +static float angle_2d_clockwise(const float p1[2], const float p2[2], const float p3[2]) +{ + float v1[2], v2[2]; + + v1[0] = p1[0]-p2[0]; v1[1] = p1[1]-p2[1]; + v2[0] = p3[0]-p2[0]; v2[1] = p3[1]-p2[1]; + + return -atan2(v1[0]*v2[1] - v1[1]*v2[0], v1[0]*v2[0]+v1[1]*v2[1]); +} +#endif + +#define ISECT_1 (1) +#define ISECT_2 (1<<1) +#define ISECT_3 (1<<2) +#define ISECT_4 (1<<3) +#define ISECT_ALL3 ((1<<3)-1) +#define ISECT_ALL4 ((1<<4)-1) + +/* limit must be a fraction over 1.0f */ +static int IsectPT2Df_limit(float pt[2], float v1[2], float v2[2], float v3[2], float limit) +{ + return ((AreaF2Dfl(pt,v1,v2) + AreaF2Dfl(pt,v2,v3) + AreaF2Dfl(pt,v3,v1)) / (AreaF2Dfl(v1,v2,v3))) < limit; +} + +/* Clip the face by a bucket and set the uv-space bucket_bounds_uv + * so we have the clipped UV's to do pixel intersection tests with + * */ +static int float_z_sort_flip(const void *p1, const void *p2) { + return (((float *)p1)[2] < ((float *)p2)[2] ? 1:-1); +} + +static int float_z_sort(const void *p1, const void *p2) { + return (((float *)p1)[2] < ((float *)p2)[2] ?-1:1); +} + +static void project_bucket_clip_face( + const int is_ortho, + rctf *bucket_bounds, + float *v1coSS, float *v2coSS, float *v3coSS, + float *uv1co, float *uv2co, float *uv3co, + float bucket_bounds_uv[8][2], + int *tot) +{ + int inside_bucket_flag = 0; + int inside_face_flag = 0; + const int flip = ((SIDE_OF_LINE(v1coSS, v2coSS, v3coSS) > 0.0f) != (SIDE_OF_LINE(uv1co, uv2co, uv3co) > 0.0f)); + + float bucket_bounds_ss[4][2]; + float w[3]; + + /* get the UV space bounding box */ + inside_bucket_flag |= BLI_in_rctf(bucket_bounds, v1coSS[0], v1coSS[1]); + inside_bucket_flag |= BLI_in_rctf(bucket_bounds, v2coSS[0], v2coSS[1]) << 1; + inside_bucket_flag |= BLI_in_rctf(bucket_bounds, v3coSS[0], v3coSS[1]) << 2; + + if (inside_bucket_flag == ISECT_ALL3) { + /* all screenspace points are inside the bucket bounding box, this means we dont need to clip and can simply return the UVs */ + if (flip) { /* facing the back? */ + VECCOPY2D(bucket_bounds_uv[0], uv3co); + VECCOPY2D(bucket_bounds_uv[1], uv2co); + VECCOPY2D(bucket_bounds_uv[2], uv1co); + } + else { + VECCOPY2D(bucket_bounds_uv[0], uv1co); + VECCOPY2D(bucket_bounds_uv[1], uv2co); + VECCOPY2D(bucket_bounds_uv[2], uv3co); + } + + *tot = 3; + return; + } + + /* get the UV space bounding box */ + /* use IsectPT2Df_limit here so we catch points are are touching the tri edge (or a small fraction over) */ + bucket_bounds_ss[0][0] = bucket_bounds->xmax; + bucket_bounds_ss[0][1] = bucket_bounds->ymin; + inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[0], v1coSS, v2coSS, v3coSS, 1+PROJ_GEOM_TOLERANCE) ? ISECT_1 : 0); + + bucket_bounds_ss[1][0] = bucket_bounds->xmax; + bucket_bounds_ss[1][1] = bucket_bounds->ymax; + inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[1], v1coSS, v2coSS, v3coSS, 1+PROJ_GEOM_TOLERANCE) ? ISECT_2 : 0); + + bucket_bounds_ss[2][0] = bucket_bounds->xmin; + bucket_bounds_ss[2][1] = bucket_bounds->ymax; + inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[2], v1coSS, v2coSS, v3coSS, 1+PROJ_GEOM_TOLERANCE) ? ISECT_3 : 0); + + bucket_bounds_ss[3][0] = bucket_bounds->xmin; + bucket_bounds_ss[3][1] = bucket_bounds->ymin; + inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[3], v1coSS, v2coSS, v3coSS, 1+PROJ_GEOM_TOLERANCE) ? ISECT_4 : 0); + + if (inside_face_flag == ISECT_ALL4) { + /* bucket is totally inside the screenspace face, we can safely use weights */ + + if (is_ortho) rect_to_uvspace_ortho(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, bucket_bounds_uv, flip); + else rect_to_uvspace_persp(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, bucket_bounds_uv, flip); + + *tot = 4; + return; + } + else { + /* The Complicated Case! + * + * The 2 cases above are where the face is inside the bucket or the bucket is inside the face. + * + * we need to make a convex polyline from the intersection between the screenspace face + * and the bucket bounds. + * + * There are a number of ways this could be done, currently it just collects all intersecting verts, + * and line intersections, then sorts them clockwise, this is a lot easier then evaluating the geometry to + * do a correct clipping on both shapes. */ + + + /* add a bunch of points, we know must make up the convex hull which is the clipped rect and triangle */ + + + + /* Maximum possible 6 intersections when using a rectangle and triangle */ + float isectVCosSS[8][3]; /* The 3rd float is used to store angle for qsort(), NOT as a Z location */ + float v1_clipSS[2], v2_clipSS[2]; + + /* calc center*/ + float cent[2] = {0.0f, 0.0f}; + /*float up[2] = {0.0f, 1.0f};*/ + int i; + short doubles; + + (*tot) = 0; + + if (inside_face_flag & ISECT_1) { VECCOPY2D(isectVCosSS[*tot], bucket_bounds_ss[0]); (*tot)++; } + if (inside_face_flag & ISECT_2) { VECCOPY2D(isectVCosSS[*tot], bucket_bounds_ss[1]); (*tot)++; } + if (inside_face_flag & ISECT_3) { VECCOPY2D(isectVCosSS[*tot], bucket_bounds_ss[2]); (*tot)++; } + if (inside_face_flag & ISECT_4) { VECCOPY2D(isectVCosSS[*tot], bucket_bounds_ss[3]); (*tot)++; } + + if (inside_bucket_flag & ISECT_1) { VECCOPY2D(isectVCosSS[*tot], v1coSS); (*tot)++; } + if (inside_bucket_flag & ISECT_2) { VECCOPY2D(isectVCosSS[*tot], v2coSS); (*tot)++; } + if (inside_bucket_flag & ISECT_3) { VECCOPY2D(isectVCosSS[*tot], v3coSS); (*tot)++; } + + if ((inside_bucket_flag & (ISECT_1|ISECT_2)) != (ISECT_1|ISECT_2)) { + if (line_clip_rect2f(bucket_bounds, v1coSS, v2coSS, v1_clipSS, v2_clipSS)) { + if ((inside_bucket_flag & ISECT_1)==0) { VECCOPY2D(isectVCosSS[*tot], v1_clipSS); (*tot)++; } + if ((inside_bucket_flag & ISECT_2)==0) { VECCOPY2D(isectVCosSS[*tot], v2_clipSS); (*tot)++; } + } + } + + if ((inside_bucket_flag & (ISECT_2|ISECT_3)) != (ISECT_2|ISECT_3)) { + if (line_clip_rect2f(bucket_bounds, v2coSS, v3coSS, v1_clipSS, v2_clipSS)) { + if ((inside_bucket_flag & ISECT_2)==0) { VECCOPY2D(isectVCosSS[*tot], v1_clipSS); (*tot)++; } + if ((inside_bucket_flag & ISECT_3)==0) { VECCOPY2D(isectVCosSS[*tot], v2_clipSS); (*tot)++; } + } + } + + if ((inside_bucket_flag & (ISECT_3|ISECT_1)) != (ISECT_3|ISECT_1)) { + if (line_clip_rect2f(bucket_bounds, v3coSS, v1coSS, v1_clipSS, v2_clipSS)) { + if ((inside_bucket_flag & ISECT_3)==0) { VECCOPY2D(isectVCosSS[*tot], v1_clipSS); (*tot)++; } + if ((inside_bucket_flag & ISECT_1)==0) { VECCOPY2D(isectVCosSS[*tot], v2_clipSS); (*tot)++; } + } + } + + + if ((*tot) < 3) { /* no intersections to speak of */ + *tot = 0; + } + + /* now we have all points we need, collect their angles and sort them clockwise */ + + for(i=0; i<(*tot); i++) { + cent[0] += isectVCosSS[i][0]; + cent[1] += isectVCosSS[i][1]; + } + cent[0] = cent[0] / (float)(*tot); + cent[1] = cent[1] / (float)(*tot); + + + + /* Collect angles for every point around the center point */ + + +#if 0 /* uses a few more cycles then the above loop */ + for(i=0; i<(*tot); i++) { + isectVCosSS[i][2] = angle_2d_clockwise(up, cent, isectVCosSS[i]); + } +#endif + + v1_clipSS[0] = cent[0]; /* Abuse this var for the loop below */ + v1_clipSS[1] = cent[1] + 1.0f; + + for(i=0; i<(*tot); i++) { + v2_clipSS[0] = isectVCosSS[i][0] - cent[0]; + v2_clipSS[1] = isectVCosSS[i][1] - cent[1]; + isectVCosSS[i][2] = atan2(v1_clipSS[0]*v2_clipSS[1] - v1_clipSS[1]*v2_clipSS[0], v1_clipSS[0]*v2_clipSS[0]+v1_clipSS[1]*v2_clipSS[1]); + } + + if (flip) qsort(isectVCosSS, *tot, sizeof(float)*3, float_z_sort_flip); + else qsort(isectVCosSS, *tot, sizeof(float)*3, float_z_sort); + + + /* remove doubles */ + /* first/last check */ + if (fabs(isectVCosSS[0][0]-isectVCosSS[(*tot)-1][0]) < PROJ_GEOM_TOLERANCE && fabs(isectVCosSS[0][1]-isectVCosSS[(*tot)-1][1]) < PROJ_GEOM_TOLERANCE) { + (*tot)--; + } + + /* its possible there is only a few left after remove doubles */ + if ((*tot) < 3) { + // printf("removed too many doubles A\n"); + *tot = 0; + return; + } + + doubles = TRUE; + while (doubles==TRUE) { + doubles = FALSE; + for(i=1; i<(*tot); i++) { + if (fabs(isectVCosSS[i-1][0]-isectVCosSS[i][0]) < PROJ_GEOM_TOLERANCE && + fabs(isectVCosSS[i-1][1]-isectVCosSS[i][1]) < PROJ_GEOM_TOLERANCE) + { + int j; + for(j=i+1; j<(*tot); j++) { + isectVCosSS[j-1][0] = isectVCosSS[j][0]; + isectVCosSS[j-1][1] = isectVCosSS[j][1]; + } + doubles = TRUE; /* keep looking for more doubles */ + (*tot)--; + } + } + } + + /* its possible there is only a few left after remove doubles */ + if ((*tot) < 3) { + // printf("removed too many doubles B\n"); + *tot = 0; + return; + } + + + if (is_ortho) { + for(i=0; i<(*tot); i++) { + BarycentricWeights2f(isectVCosSS[i], v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w); + } + } + else { + for(i=0; i<(*tot); i++) { + BarycentricWeightsPersp2f(isectVCosSS[i], v1coSS, v2coSS, v3coSS, w); + Vec2Weightf(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w); + } + } + } + +#ifdef PROJ_DEBUG_PRINT_CLIP + /* include this at the bottom of the above function to debug the output */ + + { + /* If there are ever any problems, */ + float test_uv[4][2]; + int i; + if (is_ortho) rect_to_uvspace_ortho(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, test_uv, flip); + else rect_to_uvspace_persp(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, test_uv, flip); + printf("( [(%f,%f), (%f,%f), (%f,%f), (%f,%f)], ", test_uv[0][0], test_uv[0][1], test_uv[1][0], test_uv[1][1], test_uv[2][0], test_uv[2][1], test_uv[3][0], test_uv[3][1]); + + printf(" [(%f,%f), (%f,%f), (%f,%f)], ", uv1co[0], uv1co[1], uv2co[0], uv2co[1], uv3co[0], uv3co[1]); + + printf("["); + for (i=0; i < (*tot); i++) { + printf("(%f, %f),", bucket_bounds_uv[i][0], bucket_bounds_uv[i][1]); + } + printf("]),\\\n"); + } +#endif +} + + /* +# This script creates faces in a blender scene from printed data above. + +project_ls = [ +...(output from above block)... +] + +from Blender import Scene, Mesh, Window, sys, Mathutils + +import bpy + +V = Mathutils.Vector + +def main(): + sce = bpy.data.scenes.active + + for item in project_ls: + bb = item[0] + uv = item[1] + poly = item[2] + + me = bpy.data.meshes.new() + ob = sce.objects.new(me) + + me.verts.extend([V(bb[0]).resize3D(), V(bb[1]).resize3D(), V(bb[2]).resize3D(), V(bb[3]).resize3D()]) + me.faces.extend([(0,1,2,3),]) + me.verts.extend([V(uv[0]).resize3D(), V(uv[1]).resize3D(), V(uv[2]).resize3D()]) + me.faces.extend([(4,5,6),]) + + vs = [V(p).resize3D() for p in poly] + print len(vs) + l = len(me.verts) + me.verts.extend(vs) + + i = l + while i < len(me.verts): + ii = i+1 + if ii==len(me.verts): + ii = l + me.edges.extend([i, ii]) + i+=1 + +if __name__ == '__main__': + main() + */ + + +#undef ISECT_1 +#undef ISECT_2 +#undef ISECT_3 +#undef ISECT_4 +#undef ISECT_ALL3 +#undef ISECT_ALL4 + + +/* checks if pt is inside a convex 2D polyline, the polyline must be ordered rotating clockwise + * otherwise it would have to test for mixed (SIDE_OF_LINE > 0.0f) cases */ +int IsectPoly2Df(const float pt[2], float uv[][2], const int tot) +{ + int i; + if (SIDE_OF_LINE(uv[tot-1], uv[0], pt) < 0.0f) + return 0; + + for (i=1; iarena_mt[thread_index]; + LinkNode **bucketPixelNodes = ps->bucketRect + bucket_index; + LinkNode *bucketFaceNodes = ps->bucketFaces[bucket_index]; + + const MFace *mf = ps->dm_mface + face_index; + const MTFace *tf = ps->dm_mtface + face_index; + + /* UV/pixel seeking data */ + int x; /* Image X-Pixel */ + int y;/* Image Y-Pixel */ + float mask; + float uv[2]; /* Image floating point UV - same as x, y but from 0.0-1.0 */ + + int side; + float *v1coSS, *v2coSS, *v3coSS; /* vert co screen-space, these will be assigned to mf->v1,2,3 or mf->v1,3,4 */ + + float *vCo[4]; /* vertex screenspace coords */ + + float w[3], wco[3]; + + float *uv1co, *uv2co, *uv3co; /* for convenience only, these will be assigned to tf->uv[0],1,2 or tf->uv[0],2,3 */ + float pixelScreenCo[4]; + + rcti bounds_px; /* ispace bounds */ + /* vars for getting uvspace bounds */ + + float tf_uv_pxoffset[4][2]; /* bucket bounds in UV space so we can init pixels only for this face, */ + float xhalfpx, yhalfpx; + const float ibuf_xf = ibuf->x, ibuf_yf = ibuf->y; + + int has_x_isect = 0, has_isect = 0; /* for early loop exit */ + + int i1, i2, i3; + + float uv_clip[8][2]; + int uv_clip_tot; + const short is_ortho = ps->is_ortho; + + vCo[0] = ps->dm_mvert[mf->v1].co; + vCo[1] = ps->dm_mvert[mf->v2].co; + vCo[2] = ps->dm_mvert[mf->v3].co; + + + /* Use tf_uv_pxoffset instead of tf->uv so we can offset the UV half a pixel + * this is done so we can avoid offseting all the pixels by 0.5 which causes + * problems when wrapping negative coords */ + xhalfpx = 0.5f / ibuf_xf; + yhalfpx = 0.5f / ibuf_yf; + + tf_uv_pxoffset[0][0] = tf->uv[0][0] - xhalfpx; + tf_uv_pxoffset[0][1] = tf->uv[0][1] - yhalfpx; + + tf_uv_pxoffset[1][0] = tf->uv[1][0] - xhalfpx; + tf_uv_pxoffset[1][1] = tf->uv[1][1] - yhalfpx; + + tf_uv_pxoffset[2][0] = tf->uv[2][0] - xhalfpx; + tf_uv_pxoffset[2][1] = tf->uv[2][1] - yhalfpx; + + if (mf->v4) { + vCo[3] = ps->dm_mvert[ mf->v4 ].co; + + tf_uv_pxoffset[3][0] = tf->uv[3][0] - xhalfpx; + tf_uv_pxoffset[3][1] = tf->uv[3][1] - yhalfpx; + side = 1; + } + else { + side = 0; + } + + do { + if (side==1) { + i1=0; i2=2; i3=3; + } + else { + i1=0; i2=1; i3=2; + } + + uv1co = tf_uv_pxoffset[i1]; // was tf->uv[i1]; + uv2co = tf_uv_pxoffset[i2]; // was tf->uv[i2]; + uv3co = tf_uv_pxoffset[i3]; // was tf->uv[i3]; + + v1coSS = ps->screenCoords[ (*(&mf->v1 + i1)) ]; + v2coSS = ps->screenCoords[ (*(&mf->v1 + i2)) ]; + v3coSS = ps->screenCoords[ (*(&mf->v1 + i3)) ]; + + + /* This funtion gives is a concave polyline in UV space from the clipped quad and tri*/ + project_bucket_clip_face( + is_ortho, bucket_bounds, + v1coSS, v2coSS, v3coSS, + uv1co, uv2co, uv3co, + uv_clip, &uv_clip_tot + ); + + + /* sometimes this happens, better just allow for 8 intersectiosn even though there should be max 6 */ + /* + if (uv_clip_tot>6) { + printf("this should never happen! %d\n", uv_clip_tot); + }*/ + + + if (pixel_bounds_array(uv_clip, &bounds_px, ibuf->x, ibuf->y, uv_clip_tot)) { + + /* clip face and */ + + has_isect = 0; + for (y = bounds_px.ymin; y < bounds_px.ymax; y++) { + //uv[1] = (((float)y) + 0.5f) / (float)ibuf->y; + uv[1] = (float)y / ibuf_yf; /* use pixel offset UV coords instead */ + + has_x_isect = 0; + for (x = bounds_px.xmin; x < bounds_px.xmax; x++) { + //uv[0] = (((float)x) + 0.5f) / ibuf->x; + uv[0] = (float)x / ibuf_xf; /* use pixel offset UV coords instead */ + + if (IsectPoly2Df(uv, uv_clip, uv_clip_tot)) { + + has_x_isect = has_isect = 1; + + if (is_ortho) screen_px_from_ortho(uv, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, pixelScreenCo, w); + else screen_px_from_persp(uv, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, pixelScreenCo, w); + + /* a pitty we need to get the worldspace pixel location here */ + if(ps->rv3d->rflag & RV3D_CLIPPING) { + VecWeightf(wco, ps->dm_mvert[ (*(&mf->v1 + i1)) ].co, ps->dm_mvert[ (*(&mf->v1 + i2)) ].co, ps->dm_mvert[ (*(&mf->v1 + i3)) ].co, w); + Mat4MulVecfl(ps->ob->obmat, wco); + if(view3d_test_clipping(ps->rv3d, wco)) { + continue; /* Watch out that no code below this needs to run */ + } + } + + /* Is this UV visible from the view? - raytrace */ + /* project_paint_PickFace is less complex, use for testing */ + //if (project_paint_PickFace(ps, pixelScreenCo, w, &side) == face_index) { + if (ps->do_occlude==0 || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) { + + mask = project_paint_uvpixel_mask(ps, face_index, side, w); + + if (mask > 0.0f) { + BLI_linklist_prepend_arena( + bucketPixelNodes, + project_paint_uvpixel_init(ps, arena, ibuf, x, y, mask, face_index, image_index, pixelScreenCo, side, w), + arena + ); + } + } + + } +//#if 0 + else if (has_x_isect) { + /* assuming the face is not a bow-tie - we know we cant intersect again on the X */ + break; + } +//#endif + } + + +#if 0 /* TODO - investigate why this dosnt work sometimes! it should! */ + /* no intersection for this entire row, after some intersection above means we can quit now */ + if (has_x_isect==0 && has_isect) { + break; + } +#endif + } + } + } while(side--); + + + +#ifndef PROJ_DEBUG_NOSEAMBLEED + if (ps->seam_bleed_px > 0.0f) { + int face_seam_flag; + + if (ps->thread_tot > 1) + BLI_lock_thread(LOCK_CUSTOM1); /* Other threads could be modifying these vars */ + + face_seam_flag = ps->faceSeamFlags[face_index]; + + /* are any of our edges un-initialized? */ + if ((face_seam_flag & (PROJ_FACE_SEAM1|PROJ_FACE_NOSEAM1))==0 || + (face_seam_flag & (PROJ_FACE_SEAM2|PROJ_FACE_NOSEAM2))==0 || + (face_seam_flag & (PROJ_FACE_SEAM3|PROJ_FACE_NOSEAM3))==0 || + (face_seam_flag & (PROJ_FACE_SEAM4|PROJ_FACE_NOSEAM4))==0 + ) { + project_face_seams_init(ps, face_index, mf->v4); + face_seam_flag = ps->faceSeamFlags[face_index]; + //printf("seams - %d %d %d %d\n", flag&PROJ_FACE_SEAM1, flag&PROJ_FACE_SEAM2, flag&PROJ_FACE_SEAM3, flag&PROJ_FACE_SEAM4); + } + + if ((face_seam_flag & (PROJ_FACE_SEAM1|PROJ_FACE_SEAM2|PROJ_FACE_SEAM3|PROJ_FACE_SEAM4))==0) { + + if (ps->thread_tot > 1) + BLI_unlock_thread(LOCK_CUSTOM1); /* Other threads could be modifying these vars */ + + } + else { + /* we have a seam - deal with it! */ + + /* Now create new UV's for the seam face */ + float (*outset_uv)[2] = ps->faceSeamUVs[face_index]; + float insetCos[4][3]; /* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in prespective view */ + + float *uv_seam_quad[4]; + float fac; + float *vCoSS[4]; /* vertex screenspace coords */ + + float bucket_clip_edges[2][2]; /* store the screenspace coords of the face, clipped by the bucket's screen aligned rectangle */ + float edge_verts_inset_clip[2][3]; + int fidx1, fidx2; /* face edge pairs - loop throuh these ((0,1), (1,2), (2,3), (3,0)) or ((0,1), (1,2), (2,0)) for a tri */ + + float seam_subsection[4][2]; + float fac1, fac2, ftot; + + + if (outset_uv[0][0]==FLT_MAX) /* first time initialize */ + uv_image_outset(tf_uv_pxoffset, outset_uv, ps->seam_bleed_px, ibuf->x, ibuf->y, mf->v4); + + /* ps->faceSeamUVs cant be modified when threading, now this is done we can unlock */ + if (ps->thread_tot > 1) + BLI_unlock_thread(LOCK_CUSTOM1); /* Other threads could be modifying these vars */ + + vCoSS[0] = ps->screenCoords[mf->v1]; + vCoSS[1] = ps->screenCoords[mf->v2]; + vCoSS[2] = ps->screenCoords[mf->v3]; + if (mf->v4) + vCoSS[3] = ps->screenCoords[ mf->v4 ]; + + /* PROJ_FACE_SCALE_SEAM must be slightly less then 1.0f */ + if (is_ortho) { + if (mf->v4) scale_quad(insetCos, vCoSS, PROJ_FACE_SCALE_SEAM); + else scale_tri(insetCos, vCoSS, PROJ_FACE_SCALE_SEAM); + } + else { + if (mf->v4) scale_quad(insetCos, vCo, PROJ_FACE_SCALE_SEAM); + else scale_tri(insetCos, vCo, PROJ_FACE_SCALE_SEAM); + } + + side = 0; /* for triangles this wont need to change */ + + for (fidx1 = 0; fidx1 < (mf->v4 ? 4 : 3); fidx1++) { + if (mf->v4) fidx2 = (fidx1==3) ? 0 : fidx1+1; /* next fidx in the face (0,1,2,3) -> (1,2,3,0) */ + else fidx2 = (fidx1==2) ? 0 : fidx1+1; /* next fidx in the face (0,1,2) -> (1,2,0) */ + + if ( (face_seam_flag & (1< PROJ_FACE_SEAM# */ + line_clip_rect2f(bucket_bounds, vCoSS[fidx1], vCoSS[fidx2], bucket_clip_edges[0], bucket_clip_edges[1]) + ) { + + ftot = Vec2Lenf(vCoSS[fidx1], vCoSS[fidx2]); /* screenspace edge length */ + + if (ftot > 0.0f) { /* avoid div by zero */ + if (mf->v4) { + if (fidx1==2 || fidx2==2) side= 1; + else side= 0; + } + + fac1 = Vec2Lenf(vCoSS[fidx1], bucket_clip_edges[0]) / ftot; + fac2 = Vec2Lenf(vCoSS[fidx1], bucket_clip_edges[1]) / ftot; + + uv_seam_quad[0] = tf_uv_pxoffset[fidx1]; + uv_seam_quad[1] = tf_uv_pxoffset[fidx2]; + uv_seam_quad[2] = outset_uv[fidx2]; + uv_seam_quad[3] = outset_uv[fidx1]; + + Vec2Lerpf(seam_subsection[0], uv_seam_quad[0], uv_seam_quad[1], fac1); + Vec2Lerpf(seam_subsection[1], uv_seam_quad[0], uv_seam_quad[1], fac2); + + Vec2Lerpf(seam_subsection[2], uv_seam_quad[3], uv_seam_quad[2], fac2); + Vec2Lerpf(seam_subsection[3], uv_seam_quad[3], uv_seam_quad[2], fac1); + + /* if the bucket_clip_edges values Z values was kept we could avoid this + * Inset needs to be added so occlusion tests wont hit adjacent faces */ + VecLerpf(edge_verts_inset_clip[0], insetCos[fidx1], insetCos[fidx2], fac1); + VecLerpf(edge_verts_inset_clip[1], insetCos[fidx1], insetCos[fidx2], fac2); + + + if (pixel_bounds_uv(seam_subsection[0], seam_subsection[1], seam_subsection[2], seam_subsection[3], &bounds_px, ibuf->x, ibuf->y, 1)) { + /* bounds between the seam rect and the uvspace bucket pixels */ + + has_isect = 0; + for (y = bounds_px.ymin; y < bounds_px.ymax; y++) { + // uv[1] = (((float)y) + 0.5f) / (float)ibuf->y; + uv[1] = (float)y / ibuf_yf; /* use offset uvs instead */ + + has_x_isect = 0; + for (x = bounds_px.xmin; x < bounds_px.xmax; x++) { + //uv[0] = (((float)x) + 0.5f) / (float)ibuf->x; + uv[0] = (float)x / ibuf_xf; /* use offset uvs instead */ + + /* test we're inside uvspace bucket and triangle bounds */ + if (IsectPQ2Df(uv, seam_subsection[0], seam_subsection[1], seam_subsection[2], seam_subsection[3])) { + + /* We need to find the closest point along the face edge, + * getting the screen_px_from_*** wont work because our actual location + * is not relevent, since we are outside the face, Use VecLerpf to find + * our location on the side of the face's UV */ + /* + if (is_ortho) screen_px_from_ortho(ps, uv, v1co, v2co, v3co, uv1co, uv2co, uv3co, pixelScreenCo); + else screen_px_from_persp(ps, uv, v1co, v2co, v3co, uv1co, uv2co, uv3co, pixelScreenCo); + */ + + /* Since this is a seam we need to work out where on the line this pixel is */ + //fac = lambda_cp_line2(uv, uv_seam_quad[0], uv_seam_quad[1]); + + fac = lambda_cp_line2(uv, seam_subsection[0], seam_subsection[1]); + if (fac < 0.0f) { VECCOPY(pixelScreenCo, edge_verts_inset_clip[0]); } + else if (fac > 1.0f) { VECCOPY(pixelScreenCo, edge_verts_inset_clip[1]); } + else { VecLerpf(pixelScreenCo, edge_verts_inset_clip[0], edge_verts_inset_clip[1], fac); } + + if (!is_ortho) { + pixelScreenCo[3] = 1.0f; + Mat4MulVec4fl((float(*)[4])ps->projectMat, pixelScreenCo); /* cast because of const */ + pixelScreenCo[0] = (float)(ps->ar->winx/2.0f)+(ps->ar->winx/2.0f)*pixelScreenCo[0]/pixelScreenCo[3]; + pixelScreenCo[1] = (float)(ps->ar->winy/2.0f)+(ps->ar->winy/2.0f)*pixelScreenCo[1]/pixelScreenCo[3]; + pixelScreenCo[2] = pixelScreenCo[2]/pixelScreenCo[3]; /* Use the depth for bucket point occlusion */ + } + + if (ps->do_occlude==0 || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) { + + /* Only bother calculating the weights if we intersect */ + if (ps->do_mask_normal || ps->dm_mtface_clone) { + /* TODO, this is not QUITE correct since UV is not inside the UV's but good enough for seams */ + if (side) { + BarycentricWeights2f(uv, tf_uv_pxoffset[0], tf_uv_pxoffset[2], tf_uv_pxoffset[3], w); + } + else { + BarycentricWeights2f(uv, tf_uv_pxoffset[0], tf_uv_pxoffset[1], tf_uv_pxoffset[2], w); + } + + } + + /* a pitty we need to get the worldspace pixel location here */ + if(ps->rv3d->rflag & RV3D_CLIPPING) { + if (side) VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); + else VecWeightf(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); + + Mat4MulVecfl(ps->ob->obmat, wco); + if(view3d_test_clipping(ps->rv3d, wco)) { + continue; /* Watch out that no code below this needs to run */ + } + } + + mask = project_paint_uvpixel_mask(ps, face_index, side, w); + + if (mask > 0.0f) { + BLI_linklist_prepend_arena( + bucketPixelNodes, + project_paint_uvpixel_init(ps, arena, ibuf, x, y, mask, face_index, image_index, pixelScreenCo, side, w), + arena + ); + } + + } + } + else if (has_x_isect) { + /* assuming the face is not a bow-tie - we know we cant intersect again on the X */ + break; + } + } + +#if 0 /* TODO - investigate why this dosnt work sometimes! it should! */ + /* no intersection for this entire row, after some intersection above means we can quit now */ + if (has_x_isect==0 && has_isect) { + break; + } +#endif + } + } + } + } + } + } + } +#endif // PROJ_DEBUG_NOSEAMBLEED +} + + +/* takes floating point screenspace min/max and returns int min/max to be used as indicies for ps->bucketRect, ps->bucketFlags */ +static void project_paint_bucket_bounds(const ProjPaintState *ps, const float min[2], const float max[2], int bucketMin[2], int bucketMax[2]) +{ + /* divide by bucketWidth & bucketHeight so the bounds are offset in bucket grid units */ + bucketMin[0] = (int)(((float)(min[0] - ps->screenMin[0]) / ps->screen_width) * ps->buckets_x) + 0.5f; /* these offsets of 0.5 and 1.5 seem odd but they are correct */ + bucketMin[1] = (int)(((float)(min[1] - ps->screenMin[1]) / ps->screen_height) * ps->buckets_y) + 0.5f; + + bucketMax[0] = (int)(((float)(max[0] - ps->screenMin[0]) / ps->screen_width) * ps->buckets_x) + 1.5f; + bucketMax[1] = (int)(((float)(max[1] - ps->screenMin[1]) / ps->screen_height) * ps->buckets_y) + 1.5f; + + /* incase the rect is outside the mesh 2d bounds */ + CLAMP(bucketMin[0], 0, ps->buckets_x); + CLAMP(bucketMin[1], 0, ps->buckets_y); + + CLAMP(bucketMax[0], 0, ps->buckets_x); + CLAMP(bucketMax[1], 0, ps->buckets_y); +} + +/* set bucket_bounds to a screen space-aligned floating point bound-box */ +static void project_bucket_bounds(const ProjPaintState *ps, const int bucket_x, const int bucket_y, rctf *bucket_bounds) +{ + bucket_bounds->xmin = ps->screenMin[0]+((bucket_x)*(ps->screen_width / ps->buckets_x)); /* left */ + bucket_bounds->xmax = ps->screenMin[0]+((bucket_x+1)*(ps->screen_width / ps->buckets_x)); /* right */ + + bucket_bounds->ymin = ps->screenMin[1]+((bucket_y)*(ps->screen_height / ps->buckets_y)); /* bottom */ + bucket_bounds->ymax = ps->screenMin[1]+((bucket_y+1)*(ps->screen_height / ps->buckets_y)); /* top */ +} + +/* Fill this bucket with pixels from the faces that intersect it. + * + * have bucket_bounds as an argument so we don;t need to give bucket_x/y the rect function needs */ +static void project_bucket_init(const ProjPaintState *ps, const int thread_index, const int bucket_index, rctf *bucket_bounds) +{ + LinkNode *node; + int face_index, image_index; + ImBuf *ibuf = NULL; + MTFace *tf; + + Image *tpage_last = NULL; + + + if (ps->image_tot==1) { + /* Simple loop, no context switching */ + ibuf = ps->projImages[0].ibuf; + + for (node = ps->bucketFaces[bucket_index]; node; node= node->next) { + project_paint_face_init(ps, thread_index, bucket_index, GET_INT_FROM_POINTER(node->link), 0, bucket_bounds, ibuf); + } + } + else { + + /* More complicated loop, switch between images */ + for (node = ps->bucketFaces[bucket_index]; node; node= node->next) { + face_index = GET_INT_FROM_POINTER(node->link); + + /* Image context switching */ + tf = ps->dm_mtface+face_index; + if (tpage_last != tf->tpage) { + tpage_last = tf->tpage; + + image_index = -1; /* sanity check */ + + for (image_index=0; image_index < ps->image_tot; image_index++) { + if (ps->projImages[image_index].ima == tpage_last) { + ibuf = ps->projImages[image_index].ibuf; + break; + } + } + } + /* context switching done */ + + project_paint_face_init(ps, thread_index, bucket_index, face_index, image_index, bucket_bounds, ibuf); + + } + } + + ps->bucketFlags[bucket_index] |= PROJ_BUCKET_INIT; +} + + +/* We want to know if a bucket and a face overlap in screen-space + * + * Note, if this ever returns false positives its not that bad, since a face in the bounding area will have its pixels + * calculated when it might not be needed later, (at the moment at least) + * obviously it shouldn't have bugs though */ + +static int project_bucket_face_isect(ProjPaintState *ps, float min[2], float max[2], int bucket_x, int bucket_y, int bucket_index, const MFace *mf) +{ + /* TODO - replace this with a tricker method that uses sideofline for all screenCoords's edges against the closest bucket corner */ + rctf bucket_bounds; + float p1[2], p2[2], p3[2], p4[2]; + float *v, *v1,*v2,*v3,*v4; + int fidx; + + project_bucket_bounds(ps, bucket_x, bucket_y, &bucket_bounds); + + /* Is one of the faces verts in the bucket bounds? */ + + fidx = mf->v4 ? 3:2; + do { + v = ps->screenCoords[ (*(&mf->v1 + fidx)) ]; + if (BLI_in_rctf(&bucket_bounds, v[0], v[1])) { + return 1; + } + } while (fidx--); + + v1 = ps->screenCoords[mf->v1]; + v2 = ps->screenCoords[mf->v2]; + v3 = ps->screenCoords[mf->v3]; + if (mf->v4) { + v4 = ps->screenCoords[mf->v4]; + } + + p1[0] = bucket_bounds.xmin; p1[1] = bucket_bounds.ymin; + p2[0] = bucket_bounds.xmin; p2[1] = bucket_bounds.ymax; + p3[0] = bucket_bounds.xmax; p3[1] = bucket_bounds.ymax; + p4[0] = bucket_bounds.xmax; p4[1] = bucket_bounds.ymin; + + if (mf->v4) { + if( IsectPQ2Df(p1, v1, v2, v3, v4) || IsectPQ2Df(p2, v1, v2, v3, v4) || IsectPQ2Df(p3, v1, v2, v3, v4) || IsectPQ2Df(p4, v1, v2, v3, v4) || + /* we can avoid testing v3,v1 because another intersection MUST exist if this intersects */ + (IsectLL2Df(p1, p2, v1, v2) || IsectLL2Df(p1, p2, v2, v3) || IsectLL2Df(p1, p2, v3, v4)) || + (IsectLL2Df(p2, p3, v1, v2) || IsectLL2Df(p2, p3, v2, v3) || IsectLL2Df(p2, p3, v3, v4)) || + (IsectLL2Df(p3, p4, v1, v2) || IsectLL2Df(p3, p4, v2, v3) || IsectLL2Df(p3, p4, v3, v4)) || + (IsectLL2Df(p4, p1, v1, v2) || IsectLL2Df(p4, p1, v2, v3) || IsectLL2Df(p4, p1, v3, v4)) + ) { + return 1; + } + } + else { + if( IsectPT2Df(p1, v1, v2, v3) || IsectPT2Df(p2, v1, v2, v3) || IsectPT2Df(p3, v1, v2, v3) || IsectPT2Df(p4, v1, v2, v3) || + /* we can avoid testing v3,v1 because another intersection MUST exist if this intersects */ + (IsectLL2Df(p1, p2, v1, v2) || IsectLL2Df(p1, p2, v2, v3)) || + (IsectLL2Df(p2, p3, v1, v2) || IsectLL2Df(p2, p3, v2, v3)) || + (IsectLL2Df(p3, p4, v1, v2) || IsectLL2Df(p3, p4, v2, v3)) || + (IsectLL2Df(p4, p1, v1, v2) || IsectLL2Df(p4, p1, v2, v3)) + ) { + return 1; + } + } + + return 0; +} + +/* Add faces to the bucket but dont initialize its pixels + * TODO - when painting occluded, sort the faces on their min-Z and only add faces that faces that are not occluded */ +static void project_paint_delayed_face_init(ProjPaintState *ps, const MFace *mf, const MTFace *tf, const int face_index) +{ + float min[2], max[2], *vCoSS; + int bucketMin[2], bucketMax[2]; /* for ps->bucketRect indexing */ + int fidx, bucket_x, bucket_y, bucket_index; + int has_x_isect = -1, has_isect = 0; /* for early loop exit */ + MemArena *arena = ps->arena_mt[0]; /* just use the first thread arena since threading has not started yet */ + + INIT_MINMAX2(min, max); + + fidx = mf->v4 ? 3:2; + do { + vCoSS = ps->screenCoords[ *(&mf->v1 + fidx) ]; + DO_MINMAX2(vCoSS, min, max); + } while (fidx--); + + project_paint_bucket_bounds(ps, min, max, bucketMin, bucketMax); + + for (bucket_y = bucketMin[1]; bucket_y < bucketMax[1]; bucket_y++) { + has_x_isect = 0; + for (bucket_x = bucketMin[0]; bucket_x < bucketMax[0]; bucket_x++) { + + bucket_index = bucket_x + (bucket_y * ps->buckets_x); + + if (project_bucket_face_isect(ps, min, max, bucket_x, bucket_y, bucket_index, mf)) { + BLI_linklist_prepend_arena( + &ps->bucketFaces[ bucket_index ], + SET_INT_IN_POINTER(face_index), /* cast to a pointer to shut up the compiler */ + arena + ); + + has_x_isect = has_isect = 1; + } + else if (has_x_isect) { + /* assuming the face is not a bow-tie - we know we cant intersect again on the X */ + break; + } + } + + /* no intersection for this entire row, after some intersection above means we can quit now */ + if (has_x_isect==0 && has_isect) { + break; + } + } + +#ifndef PROJ_DEBUG_NOSEAMBLEED + if (ps->seam_bleed_px > 0.0f) { + if (!mf->v4) { + ps->faceSeamFlags[face_index] |= PROJ_FACE_NOSEAM4; /* so this wont show up as an untagged edge */ + } + **ps->faceSeamUVs[face_index] = FLT_MAX; /* set as uninitialized */ + } +#endif +} + +/* run once per stroke before projection painting */ +static void project_paint_begin(ProjPaintState *ps) +{ + /* Viewport vars */ + float mat[3][3]; + + float no[3]; + + float (*projScreenCo)[4]; /* Note, we could have 4D vectors are only needed for */ + float projMargin; + /* Image Vars - keep track of images we have used */ + LinkNode *image_LinkList = NULL; + LinkNode *node; + + ProjPaintImage *projIma; + Image *tpage_last = NULL; + + /* Face vars */ + MFace *mf; + MTFace *tf; + + int a, i; /* generic looping vars */ + int image_index = -1, face_index; + + MemArena *arena; /* at the moment this is just ps->arena_mt[0], but use this to show were not multithreading */ + + /* ---- end defines ---- */ + + /* paint onto the derived mesh */ + ps->dm = mesh_get_derived_final(ps->scene, ps->ob, ps->v3d->customdata_mask); + + if ( !CustomData_has_layer( &ps->dm->faceData, CD_MTFACE) ) { + ps->dm = NULL; + return; + } + ps->dm_mvert = ps->dm->getVertArray(ps->dm); + ps->dm_mface = ps->dm->getFaceArray(ps->dm); + ps->dm_mtface= ps->dm->getFaceDataArray(ps->dm, CD_MTFACE); + + ps->dm_totvert = ps->dm->getNumVerts(ps->dm); + ps->dm_totface = ps->dm->getNumFaces(ps->dm); + + /* use clone mtface? */ + + + /* Note, use the original mesh for getting the clone and mask layer index + * this avoids re-generating the derived mesh just to get the new index */ + if (ps->do_layer_clone) { + //int layer_num = CustomData_get_clone_layer(&ps->dm->faceData, CD_MTFACE); + int layer_num = CustomData_get_clone_layer(&((Mesh *)ps->ob->data)->fdata, CD_MTFACE); + if (layer_num != -1) + ps->dm_mtface_clone = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num); + + if (ps->dm_mtface_clone==NULL || ps->dm_mtface_clone==ps->dm_mtface) { + ps->do_layer_clone = 0; + ps->dm_mtface_clone= NULL; + } + } + + if (ps->do_layer_mask) { + //int layer_num = CustomData_get_mask_layer(&ps->dm->faceData, CD_MTFACE); + int layer_num = CustomData_get_mask_layer(&((Mesh *)ps->ob->data)->fdata, CD_MTFACE); + if (layer_num != -1) + ps->dm_mtface_mask = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num); + + if (ps->dm_mtface_mask==NULL || ps->dm_mtface_mask==ps->dm_mtface) { + ps->do_layer_mask = 0; + ps->dm_mtface_mask = NULL; + } + } + + + + ps->viewDir[0] = 0.0f; + ps->viewDir[1] = 0.0f; + ps->viewDir[2] = 1.0f; + + view3d_get_object_project_mat(ps->rv3d, ps->ob, ps->projectMat, ps->viewMat); + + /* viewDir - object relative */ + Mat4Invert(ps->ob->imat, ps->ob->obmat); + Mat3CpyMat4(mat, ps->rv3d->viewinv); + Mat3MulVecfl(mat, ps->viewDir); + Mat3CpyMat4(mat, ps->ob->imat); + Mat3MulVecfl(mat, ps->viewDir); + Normalize(ps->viewDir); + + /* viewPos - object relative */ + VECCOPY(ps->viewPos, ps->rv3d->viewinv[3]); + Mat3CpyMat4(mat, ps->ob->imat); + Mat3MulVecfl(mat, ps->viewPos); + VecAddf(ps->viewPos, ps->viewPos, ps->ob->imat[3]); + + { /* only use these for running 'get_view3d_viewplane' */ + rctf viewplane; + + ps->is_ortho = get_view3d_viewplane(ps->v3d, ps->rv3d, ps->ar->winx, ps->ar->winy, &viewplane, &ps->clipsta, &ps->clipend, NULL); + + //printf("%f %f\n", ps->clipsta, ps->clipend); + if (ps->is_ortho) { /* only needed for ortho */ + float fac = 2.0f / (ps->clipend - ps->clipsta); + ps->clipsta *= fac; + ps->clipend *= fac; + } + else { + /* TODO - can we even adjust for clip start/end? */ + } + + } + + ps->is_airbrush = (ps->brush->flag & BRUSH_AIRBRUSH) ? 1 : 0; + + ps->is_texbrush = (ps->brush->mtex[ps->brush->texact] && ps->brush->mtex[ps->brush->texact]->tex) ? 1 : 0; + + + /* calculate vert screen coords + * run this early so we can calculate the x/y resolution of our bucket rect */ + INIT_MINMAX2(ps->screenMin, ps->screenMax); + + ps->screenCoords = MEM_mallocN(sizeof(float) * ps->dm_totvert * 4, "ProjectPaint ScreenVerts"); + projScreenCo = ps->screenCoords; + + if (ps->is_ortho) { + for(a=0; a < ps->dm_totvert; a++, projScreenCo++) { + VECCOPY((*projScreenCo), ps->dm_mvert[a].co); + Mat4MulVecfl(ps->projectMat, (*projScreenCo)); + + /* screen space, not clamped */ + (*projScreenCo)[0] = (float)(ps->ar->winx/2.0f)+(ps->ar->winx/2.0f)*(*projScreenCo)[0]; + (*projScreenCo)[1] = (float)(ps->ar->winy/2.0f)+(ps->ar->winy/2.0f)*(*projScreenCo)[1]; + DO_MINMAX2((*projScreenCo), ps->screenMin, ps->screenMax); + } + } + else { + for(a=0; a < ps->dm_totvert; a++, projScreenCo++) { + VECCOPY((*projScreenCo), ps->dm_mvert[a].co); + (*projScreenCo)[3] = 1.0f; + + Mat4MulVec4fl(ps->projectMat, (*projScreenCo)); + + + if ((*projScreenCo)[3] > ps->clipsta) { + /* screen space, not clamped */ + (*projScreenCo)[0] = (float)(ps->ar->winx/2.0f)+(ps->ar->winx/2.0f)*(*projScreenCo)[0]/(*projScreenCo)[3]; + (*projScreenCo)[1] = (float)(ps->ar->winy/2.0f)+(ps->ar->winy/2.0f)*(*projScreenCo)[1]/(*projScreenCo)[3]; + (*projScreenCo)[2] = (*projScreenCo)[2]/(*projScreenCo)[3]; /* Use the depth for bucket point occlusion */ + DO_MINMAX2((*projScreenCo), ps->screenMin, ps->screenMax); + } + else { + /* TODO - deal with cases where 1 side of a face goes behind the view ? + * + * After some research this is actually very tricky, only option is to + * clip the derived mesh before painting, which is a Pain */ + (*projScreenCo)[0] = FLT_MAX; + } + } + } + + /* If this border is not added we get artifacts for faces that + * have a parallel edge and at the bounds of the the 2D projected verts eg + * - a single screen aligned quad */ + projMargin = (ps->screenMax[0] - ps->screenMin[0]) * 0.000001f; + ps->screenMax[0] += projMargin; + ps->screenMin[0] -= projMargin; + projMargin = (ps->screenMax[1] - ps->screenMin[1]) * 0.000001f; + ps->screenMax[1] += projMargin; + ps->screenMin[1] -= projMargin; + +#ifdef PROJ_DEBUG_WINCLIP + CLAMP(ps->screenMin[0], -ps->brush->size, ps->ar->winx + ps->brush->size); + CLAMP(ps->screenMax[0], -ps->brush->size, ps->ar->winx + ps->brush->size); + + CLAMP(ps->screenMin[1], -ps->brush->size, ps->ar->winy + ps->brush->size); + CLAMP(ps->screenMax[1], -ps->brush->size, ps->ar->winy + ps->brush->size); +#endif + + /* only for convenience */ + ps->screen_width = ps->screenMax[0] - ps->screenMin[0]; + ps->screen_height = ps->screenMax[1] - ps->screenMin[1]; + + ps->buckets_x = (int)(ps->screen_width / (((float)ps->brush->size) / PROJ_BUCKET_BRUSH_DIV)); + ps->buckets_y = (int)(ps->screen_height / (((float)ps->brush->size) / PROJ_BUCKET_BRUSH_DIV)); + + printf("\tscreenspace bucket division x:%d y:%d\n", ps->buckets_x, ps->buckets_y); + + /* really high values could cause problems since it has to allocate a few + * (ps->buckets_x*ps->buckets_y) sized arrays */ + CLAMP(ps->buckets_x, PROJ_BUCKET_RECT_MIN, PROJ_BUCKET_RECT_MAX); + CLAMP(ps->buckets_y, PROJ_BUCKET_RECT_MIN, PROJ_BUCKET_RECT_MAX); + + ps->bucketRect = (LinkNode **)MEM_callocN(sizeof(LinkNode *) * ps->buckets_x * ps->buckets_y, "paint-bucketRect"); + ps->bucketFaces= (LinkNode **)MEM_callocN(sizeof(LinkNode *) * ps->buckets_x * ps->buckets_y, "paint-bucketFaces"); + + ps->bucketFlags= (unsigned char *)MEM_callocN(sizeof(char) * ps->buckets_x * ps->buckets_y, "paint-bucketFaces"); +#ifndef PROJ_DEBUG_NOSEAMBLEED + if (ps->seam_bleed_px > 0.0f) { + ps->vertFaces= (LinkNode **)MEM_callocN(sizeof(LinkNode *) * ps->dm_totvert, "paint-vertFaces"); + ps->faceSeamFlags = (char *)MEM_callocN(sizeof(char) * ps->dm_totface, "paint-faceSeamFlags"); + ps->faceSeamUVs= MEM_mallocN(sizeof(float) * ps->dm_totface * 8, "paint-faceSeamUVs"); + } +#endif + + /* Thread stuff + * + * very small brushes run a lot slower multithreaded since the advantage with + * threads is being able to fill in multiple buckets at once. + * Only use threads for bigger brushes. */ + + if (ps->scene->r.mode & R_FIXED_THREADS) { + ps->thread_tot = ps->scene->r.threads; + } + else { + ps->thread_tot = BLI_system_thread_count(); + } + for (a=0; athread_tot; a++) { + ps->arena_mt[a] = BLI_memarena_new(1<<16); + } + + arena = ps->arena_mt[0]; + + if (ps->do_backfacecull && ps->do_mask_normal) { + MVert *v = ps->dm_mvert; + float viewDirPersp[3]; + + ps->vertFlags = MEM_callocN(sizeof(char) * ps->dm_totvert, "paint-vertFlags"); + + for(a=0; a < ps->dm_totvert; a++, v++) { + no[0] = (float)(v->no[0] / 32767.0f); + no[1] = (float)(v->no[1] / 32767.0f); + no[2] = (float)(v->no[2] / 32767.0f); + + if (ps->is_ortho) { + if (NormalizedVecAngle2(ps->viewDir, no) >= ps->normal_angle) { /* 1 vert of this face is towards us */ + ps->vertFlags[a] |= PROJ_VERT_CULL; + } + } + else { + VecSubf(viewDirPersp, ps->viewPos, v->co); + Normalize(viewDirPersp); + if (NormalizedVecAngle2(viewDirPersp, no) >= ps->normal_angle) { /* 1 vert of this face is towards us */ + ps->vertFlags[a] |= PROJ_VERT_CULL; + } + } + } + } + + + for(face_index = 0, tf = ps->dm_mtface, mf = ps->dm_mface; face_index < ps->dm_totface; mf++, tf++, face_index++) { + +#ifndef PROJ_DEBUG_NOSEAMBLEED + /* add face user if we have bleed enabled, set the UV seam flags later */ + /* annoying but we need to add all faces even ones we never use elsewhere */ + if (ps->seam_bleed_px > 0.0f) { + BLI_linklist_prepend_arena(&ps->vertFaces[mf->v1], SET_INT_IN_POINTER(face_index), arena); + BLI_linklist_prepend_arena(&ps->vertFaces[mf->v2], SET_INT_IN_POINTER(face_index), arena); + BLI_linklist_prepend_arena(&ps->vertFaces[mf->v3], SET_INT_IN_POINTER(face_index), arena); + if (mf->v4) { + BLI_linklist_prepend_arena(&ps->vertFaces[ mf->v4 ], SET_INT_IN_POINTER(face_index), arena); + } + } +#endif + + if (tf->tpage && ((G.f & G_FACESELECT)==0 || mf->flag & ME_FACE_SEL)) { + + float *v1coSS, *v2coSS, *v3coSS, *v4coSS; + + v1coSS = ps->screenCoords[mf->v1]; + v2coSS = ps->screenCoords[mf->v2]; + v3coSS = ps->screenCoords[mf->v3]; + if (mf->v4) { + v4coSS = ps->screenCoords[mf->v4]; + } + + + if (!ps->is_ortho) { + if ( v1coSS[0]==FLT_MAX || + v2coSS[0]==FLT_MAX || + v3coSS[0]==FLT_MAX || + (mf->v4 && v4coSS[0]==FLT_MAX) + ) { + continue; + } + } + +#ifdef PROJ_DEBUG_WINCLIP + /* ignore faces outside the view */ + if ( + (v1coSS[0] < ps->screenMin[0] && + v2coSS[0] < ps->screenMin[0] && + v3coSS[0] < ps->screenMin[0] && + (mf->v4 && v4coSS[0] < ps->screenMin[0])) || + + (v1coSS[0] > ps->screenMax[0] && + v2coSS[0] > ps->screenMax[0] && + v3coSS[0] > ps->screenMax[0] && + (mf->v4 && v4coSS[0] > ps->screenMax[0])) || + + (v1coSS[1] < ps->screenMin[1] && + v2coSS[1] < ps->screenMin[1] && + v3coSS[1] < ps->screenMin[1] && + (mf->v4 && v4coSS[1] < ps->screenMin[1])) || + + (v1coSS[1] > ps->screenMax[1] && + v2coSS[1] > ps->screenMax[1] && + v3coSS[1] > ps->screenMax[1] && + (mf->v4 && v4coSS[1] > ps->screenMax[1])) + ) { + continue; + } + +#endif //PROJ_DEBUG_WINCLIP + + + if (ps->do_backfacecull) { + if (ps->do_mask_normal) { + /* Since we are interpolating the normals of faces, we want to make + * sure all the verts are pointing away from the view, + * not just the face */ + if ( (ps->vertFlags[mf->v1] & PROJ_VERT_CULL) && + (ps->vertFlags[mf->v2] & PROJ_VERT_CULL) && + (ps->vertFlags[mf->v3] & PROJ_VERT_CULL) && + (mf->v4==0 || ps->vertFlags[mf->v4] & PROJ_VERT_CULL) + + ) { + continue; + } + } + else { + if (SIDE_OF_LINE(v1coSS, v2coSS, v3coSS) < 0.0f) { + continue; + } + + } + } + + if (tpage_last != tf->tpage) { + + image_index = BLI_linklist_index(image_LinkList, tf->tpage); + + if (image_index==-1 && BKE_image_get_ibuf((Image *)tf->tpage, NULL)) { /* MemArena dosnt have an append func */ + BLI_linklist_append(&image_LinkList, tf->tpage); + image_index = ps->image_tot; + ps->image_tot++; + } + + tpage_last = tf->tpage; + } + + if (image_index != -1) { + /* Initialize the faces screen pixels */ + /* Add this to a list to initialize later */ + project_paint_delayed_face_init(ps, mf, tf, face_index); + } + } + } + + /* build an array of images we use*/ + projIma = ps->projImages = (ProjPaintImage *)BLI_memarena_alloc(arena, sizeof(ProjPaintImage) * ps->image_tot); + + for (node= image_LinkList, i=0; node; node= node->next, i++, projIma++) { + projIma->ima = node->link; + // calloced - projIma->touch = 0; + projIma->ibuf = BKE_image_get_ibuf(projIma->ima, NULL); + projIma->partRedrawRect = BLI_memarena_alloc(arena, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); + // calloced - memset(projIma->partRedrawRect, 0, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); + } + + /* we have built the array, discard the linked list */ + BLI_linklist_free(image_LinkList, NULL); +} + +static void project_paint_begin_clone(ProjPaintState *ps, int mouse[2]) +{ + /* setup clone offset */ + if (ps->tool == PAINT_TOOL_CLONE) { + float projCo[4]; + float *curs= give_cursor(ps->scene, ps->v3d); + VECCOPY(projCo, curs); + Mat4MulVecfl(ps->ob->imat, projCo); + + projCo[3] = 1.0f; + Mat4MulVec4fl(ps->projectMat, projCo); + ps->cloneOffset[0] = mouse[0] - ((float)(ps->ar->winx/2.0f)+(ps->ar->winx/2.0f)*projCo[0]/projCo[3]); + ps->cloneOffset[1] = mouse[1] - ((float)(ps->ar->winy/2.0f)+(ps->ar->winy/2.0f)*projCo[1]/projCo[3]); + } +} + +static void project_paint_end(ProjPaintState *ps) +{ + int a; + + /* build undo data from original pixel colors */ + if(U.uiflag & USER_GLOBALUNDO) { + ProjPixel *projPixel; + ImBuf *tmpibuf = NULL, *tmpibuf_float = NULL; + LinkNode *pixel_node; + UndoTile *tile; + MemArena *arena = ps->arena_mt[0]; /* threaded arena re-used for non threaded case */ + + int bucket_tot = (ps->buckets_x * ps->buckets_y); /* we could get an X/Y but easier to loop through all possible buckets */ + int bucket_index; + int tile_index; + int x_round, y_round; + int x_tile, y_tile; + int is_float = -1; + + /* context */ + ProjPaintImage *last_projIma; + int last_image_index = -1; + int last_tile_width; + + for(a=0, last_projIma=ps->projImages; a < ps->image_tot; a++, last_projIma++) { + int size = sizeof(UndoTile **) * IMAPAINT_TILE_NUMBER(last_projIma->ibuf->x) * IMAPAINT_TILE_NUMBER(last_projIma->ibuf->y); + last_projIma->undoRect = (UndoTile **) BLI_memarena_alloc(arena, size); + memset(last_projIma->undoRect, 0, size); + } + + for (bucket_index = 0; bucket_index < bucket_tot; bucket_index++) { + /* loop through all pixels */ + for(pixel_node= ps->bucketRect[bucket_index]; pixel_node; pixel_node= pixel_node->next) { + + /* ok we have a pixel, was it modified? */ + projPixel = (ProjPixel *)pixel_node->link; + + if (last_image_index != projPixel->image_index) { + /* set the context */ + last_image_index = projPixel->image_index; + last_projIma = ps->projImages + last_image_index; + last_tile_width = IMAPAINT_TILE_NUMBER(last_projIma->ibuf->x); + is_float = last_projIma->ibuf->rect_float ? 1 : 0; + } + + + if ( (is_float == 0 && projPixel->origColor.uint != *projPixel->pixel.uint_pt) || + + (is_float == 1 && + ( projPixel->origColor.f[0] != projPixel->pixel.f_pt[0] || + projPixel->origColor.f[1] != projPixel->pixel.f_pt[1] || + projPixel->origColor.f[2] != projPixel->pixel.f_pt[2] || + projPixel->origColor.f[3] != projPixel->pixel.f_pt[3] )) + ) { + + x_tile = projPixel->x_px >> IMAPAINT_TILE_BITS; + y_tile = projPixel->y_px >> IMAPAINT_TILE_BITS; + + x_round = x_tile * IMAPAINT_TILE_SIZE; + y_round = y_tile * IMAPAINT_TILE_SIZE; + + tile_index = x_tile + y_tile * last_tile_width; + + if (last_projIma->undoRect[tile_index]==NULL) { + /* add the undo tile from the modified image, then write the original colors back into it */ + tile = last_projIma->undoRect[tile_index] = undo_init_tile(&last_projIma->ima->id, last_projIma->ibuf, is_float ? (&tmpibuf_float):(&tmpibuf) , x_tile, y_tile); + } + else { + tile = last_projIma->undoRect[tile_index]; + } + + /* This is a BIT ODD, but overwrite the undo tiles image info with this pixels original color + * because allocating the tiles allong the way slows down painting */ + + if (is_float) { + float *rgba_fp = (float *)tile->rect + (((projPixel->x_px - x_round) + (projPixel->y_px - y_round) * IMAPAINT_TILE_SIZE)) * 4; + QUATCOPY(rgba_fp, projPixel->origColor.f); + } + else { + ((unsigned int *)tile->rect)[ (projPixel->x_px - x_round) + (projPixel->y_px - y_round) * IMAPAINT_TILE_SIZE ] = projPixel->origColor.uint; + } + } + } + } + + if (tmpibuf) IMB_freeImBuf(tmpibuf); + if (tmpibuf_float) IMB_freeImBuf(tmpibuf_float); + } + /* done calculating undo data */ + + MEM_freeN(ps->screenCoords); + MEM_freeN(ps->bucketRect); + MEM_freeN(ps->bucketFaces); + MEM_freeN(ps->bucketFlags); + + if (ps->seam_bleed_px > 0.0f) { + MEM_freeN(ps->vertFaces); + MEM_freeN(ps->faceSeamFlags); + MEM_freeN(ps->faceSeamUVs); + } + + if (ps->vertFlags) MEM_freeN(ps->vertFlags); + + + for (a=0; athread_tot; a++) { + BLI_memarena_free(ps->arena_mt[a]); + } + + ps->dm->release(ps->dm); +} + +/* 1= an undo, -1 is a redo. */ +static void partial_redraw_array_init(ImagePaintPartialRedraw *pr) +{ + int tot = PROJ_BOUNDBOX_SQUARED; + while (tot--) { + pr->x1 = 10000000; + pr->y1 = 10000000; + + pr->x2 = -1; + pr->y2 = -1; + + pr->enabled = 1; + + pr++; + } +} + + +static int partial_redraw_array_merge(ImagePaintPartialRedraw *pr, ImagePaintPartialRedraw *pr_other, int tot) +{ + int touch; + while (tot--) { + pr->x1 = MIN2(pr->x1, pr_other->x1); + pr->y1 = MIN2(pr->y1, pr_other->y1); + + pr->x2 = MAX2(pr->x2, pr_other->x2); + pr->y2 = MAX2(pr->y2, pr_other->y2); + + if (pr->x2 != -1) + touch = 1; + + pr++; pr_other++; + } + + return touch; +} + +/* Loop over all images on this mesh and update any we have touched */ +static int project_image_refresh_tagged(ProjPaintState *ps) +{ + ImagePaintPartialRedraw *pr; + ProjPaintImage *projIma; + int a,i; + int redraw = 0; + + + for (a=0, projIma=ps->projImages; a < ps->image_tot; a++, projIma++) { + if (projIma->touch) { + /* look over each bound cell */ + for (i=0; ipartRedrawRect[i]); + if (pr->x2 != -1) { /* TODO - use 'enabled' ? */ + imapaintpartial = *pr; + imapaint_image_update(NULL, projIma->ima, projIma->ibuf, 1); /*last 1 is for texpaint*/ + redraw = 1; + } + } + + projIma->touch = 0; /* clear for reuse */ + } + } + + return redraw; +} + +/* run this per painting onto each mouse location */ +static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2]) +{ + float min_brush[2], max_brush[2]; + float size_half = ((float)ps->brush->size) * 0.5f; + + /* so we dont have a bucket bounds that is way too small to paint into */ + // if (size_half < 1.0f) size_half = 1.0f; // this dosnt work yet :/ + + min_brush[0] = mval_f[0] - size_half; + min_brush[1] = mval_f[1] - size_half; + + max_brush[0] = mval_f[0] + size_half; + max_brush[1] = mval_f[1] + size_half; + + /* offset to make this a valid bucket index */ + project_paint_bucket_bounds(ps, min_brush, max_brush, ps->bucketMin, ps->bucketMax); + + /* mouse outside the model areas? */ + if (ps->bucketMin[0]==ps->bucketMax[0] || ps->bucketMin[1]==ps->bucketMax[1]) { + return 0; + } + + ps->context_bucket_x = ps->bucketMin[0]; + ps->context_bucket_y = ps->bucketMin[1]; + return 1; +} + +static int project_bucket_iter_next(ProjPaintState *ps, int *bucket_index, rctf *bucket_bounds, const float mval[2]) +{ + if (ps->thread_tot > 1) + BLI_lock_thread(LOCK_CUSTOM1); + + //printf("%d %d \n", ps->context_bucket_x, ps->context_bucket_y); + + for ( ; ps->context_bucket_y < ps->bucketMax[1]; ps->context_bucket_y++) { + for ( ; ps->context_bucket_x < ps->bucketMax[0]; ps->context_bucket_x++) { + + /* use bucket_bounds for project_bucket_isect_circle and project_bucket_init*/ + project_bucket_bounds(ps, ps->context_bucket_x, ps->context_bucket_y, bucket_bounds); + + if (project_bucket_isect_circle(ps->context_bucket_x, ps->context_bucket_y, mval, ps->brush->size * ps->brush->size, bucket_bounds)) { + *bucket_index = ps->context_bucket_x + (ps->context_bucket_y * ps->buckets_x); + ps->context_bucket_x++; + + if (ps->thread_tot > 1) + BLI_unlock_thread(LOCK_CUSTOM1); + + return 1; + } + } + ps->context_bucket_x = ps->bucketMin[0]; + } + + if (ps->thread_tot > 1) + BLI_unlock_thread(LOCK_CUSTOM1); + return 0; +} + +/* Each thread gets one of these, also used as an argument to pass to project_paint_op */ +typedef struct ProjectHandle { + /* args */ + ProjPaintState *ps; + float prevmval[2]; + float mval[2]; + + /* annoying but we need to have image bounds per thread, then merge into ps->projectPartialRedraws */ + ProjPaintImage *projImages; /* array of partial redraws */ + + /* thread settings */ + int thread_index; +} ProjectHandle; + +static void blend_color_mix(unsigned char *cp, const unsigned char *cp1, const unsigned char *cp2, const int fac) +{ + /* this and other blending modes previously used >>8 instead of /255. both + are not equivalent (>>8 is /256), and the former results in rounding + errors that can turn colors black fast after repeated blending */ + const int mfac= 255-fac; + + cp[0]= (mfac*cp1[0]+fac*cp2[0])/255; + cp[1]= (mfac*cp1[1]+fac*cp2[1])/255; + cp[2]= (mfac*cp1[2]+fac*cp2[2])/255; +} + +static void blend_color_mix_float(float *cp, const float *cp1, const float *cp2, const float fac) +{ + const float mfac= 1.0-fac; + cp[0]= mfac*cp1[0] + fac*cp2[0]; + cp[1]= mfac*cp1[1] + fac*cp2[1]; + cp[2]= mfac*cp1[2] + fac*cp2[2]; +} + +static void do_projectpaint_clone(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask) +{ + if (ps->is_airbrush==0 && mask < 1.0f) { + projPixel->newColor.uint = IMB_blend_color(projPixel->newColor.uint, ((ProjPixelClone*)projPixel)->clonepx.uint, (int)(alpha*255), ps->blend); + blend_color_mix(projPixel->pixel.ch_pt, projPixel->origColor.ch, projPixel->newColor.ch, (int)(mask*255)); + } + else { + *projPixel->pixel.uint_pt = IMB_blend_color(*projPixel->pixel.uint_pt, ((ProjPixelClone*)projPixel)->clonepx.uint, (int)(alpha*mask*255), ps->blend); + } +} + +static void do_projectpaint_clone_f(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask) +{ + if (ps->is_airbrush==0 && mask < 1.0f) { + IMB_blend_color_float(projPixel->newColor.f, projPixel->newColor.f, ((ProjPixelClone *)projPixel)->clonepx.f, alpha, ps->blend); + blend_color_mix_float(projPixel->pixel.f_pt, projPixel->origColor.f, projPixel->newColor.f, mask); + } + else { + IMB_blend_color_float(projPixel->pixel.f_pt, projPixel->pixel.f_pt, ((ProjPixelClone *)projPixel)->clonepx.f, alpha*mask, ps->blend); + } +} + +/* do_projectpaint_smear* + * + * note, mask is used to modify the alpha here, this is not correct since it allows + * accumulation of color greater then 'projPixel->mask' however in the case of smear its not + * really that important to be correct as it is with clone and painting + */ +static void do_projectpaint_smear(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask, MemArena *smearArena, LinkNode **smearPixels, float co[2]) +{ + unsigned char rgba_ub[4]; + + if (project_paint_PickColor(ps, co, NULL, rgba_ub, 1)==0) + return; + + ((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color(*projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha*mask*255), ps->blend); + BLI_linklist_prepend_arena(smearPixels, (void *)projPixel, smearArena); +} + +static void do_projectpaint_smear_f(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask, MemArena *smearArena, LinkNode **smearPixels_f, float co[2]) +{ + unsigned char rgba_ub[4]; + unsigned char rgba_smear[4]; + + if (project_paint_PickColor(ps, co, NULL, rgba_ub, 1)==0) + return; + + IMAPAINT_FLOAT_RGBA_TO_CHAR(rgba_smear, projPixel->pixel.f_pt); + ((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color(*((unsigned int *)rgba_smear), *((unsigned int *)rgba_ub), (int)(alpha*mask*255), ps->blend); + BLI_linklist_prepend_arena(smearPixels_f, (void *)projPixel, smearArena); +} + +static void do_projectpaint_draw(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask) +{ + unsigned char rgba_ub[4]; + + if (ps->is_texbrush) { + rgba_ub[0] = FTOCHAR(rgba[0] * ps->brush->rgb[0]); + rgba_ub[1] = FTOCHAR(rgba[1] * ps->brush->rgb[1]); + rgba_ub[2] = FTOCHAR(rgba[2] * ps->brush->rgb[2]); + rgba_ub[3] = FTOCHAR(rgba[3]); + } + else { + IMAPAINT_FLOAT_RGB_TO_CHAR(rgba_ub, ps->brush->rgb); + rgba_ub[3] = 255; + } + + if (ps->is_airbrush==0 && mask < 1.0f) { + projPixel->newColor.uint = IMB_blend_color(projPixel->newColor.uint, *((unsigned int *)rgba_ub), (int)(alpha*255), ps->blend); + blend_color_mix(projPixel->pixel.ch_pt, projPixel->origColor.ch, projPixel->newColor.ch, (int)(mask*255)); + } + else { + *projPixel->pixel.uint_pt = IMB_blend_color(*projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha*mask*255), ps->blend); + } +} + +static void do_projectpaint_draw_f(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask) { + if (ps->is_texbrush) { + rgba[0] *= ps->brush->rgb[0]; + rgba[1] *= ps->brush->rgb[1]; + rgba[2] *= ps->brush->rgb[2]; + } + else { + VECCOPY(rgba, ps->brush->rgb); + } + + if (ps->is_airbrush==0 && mask < 1.0f) { + IMB_blend_color_float(projPixel->newColor.f, projPixel->newColor.f, rgba, alpha, ps->blend); + blend_color_mix_float(projPixel->pixel.f_pt, projPixel->origColor.f, projPixel->newColor.f, mask); + } + else { + IMB_blend_color_float(projPixel->pixel.f_pt, projPixel->pixel.f_pt, rgba, alpha*mask, ps->blend); + } +} + + + +/* run this for single and multithreaded painting */ +static void *do_projectpaint_thread(void *ph_v) +{ + /* First unpack args from the struct */ + ProjPaintState *ps = ((ProjectHandle *)ph_v)->ps; + ProjPaintImage *projImages = ((ProjectHandle *)ph_v)->projImages; + const float *lastpos = ((ProjectHandle *)ph_v)->prevmval; + const float *pos = ((ProjectHandle *)ph_v)->mval; + const int thread_index = ((ProjectHandle *)ph_v)->thread_index; + /* Done with args from ProjectHandle */ + + LinkNode *node; + ProjPixel *projPixel; + + int last_index = -1; + ProjPaintImage *last_projIma; + ImagePaintPartialRedraw *last_partial_redraw_cell; + + float rgba[4], alpha, dist_nosqrt; + + float brush_size_sqared; + float falloff; + int bucket_index; + int is_floatbuf = 0; + const short tool = ps->tool; + rctf bucket_bounds; + + /* for smear only */ + float pos_ofs[2]; + float co[2]; + float mask = 1.0f; /* airbrush wont use mask */ + unsigned short mask_short; + + LinkNode *smearPixels = NULL; + LinkNode *smearPixels_f = NULL; + MemArena *smearArena = NULL; /* mem arena for this brush projection only */ + + + if (tool==PAINT_TOOL_SMEAR) { + pos_ofs[0] = pos[0] - lastpos[0]; + pos_ofs[1] = pos[1] - lastpos[1]; + + smearArena = BLI_memarena_new(1<<16); + } + + /* avoid a square root with every dist comparison */ + brush_size_sqared = ps->brush->size * ps->brush->size; + + /* printf("brush bounds %d %d %d %d\n", bucketMin[0], bucketMin[1], bucketMax[0], bucketMax[1]); */ + + while (project_bucket_iter_next(ps, &bucket_index, &bucket_bounds, pos)) { + + /* Check this bucket and its faces are initialized */ + if (ps->bucketFlags[bucket_index] == PROJ_BUCKET_NULL) { + /* No pixels initialized */ + project_bucket_init(ps, thread_index, bucket_index, &bucket_bounds); + } + + for (node = ps->bucketRect[bucket_index]; node; node = node->next) { + + projPixel = (ProjPixel *)node->link; + + /*dist = Vec2Lenf(projPixel->projCoSS, pos);*/ /* correct but uses a sqrt */ + dist_nosqrt = Vec2Lenf_nosqrt(projPixel->projCoSS, pos); + + /*if (dist < s->brush->size) {*/ /* correct but uses a sqrt */ + if (dist_nosqrt < brush_size_sqared) { + falloff = brush_sample_falloff_noalpha(ps->brush, sqrt(dist_nosqrt)); + if (falloff > 0.0f) { + if (ps->is_texbrush) { + brush_sample_tex(ps->brush, projPixel->projCoSS, rgba); + alpha = rgba[3]; + } else { + alpha = 1.0f; + } + + if (ps->is_airbrush) { + /* for an aurbrush there is no real mask, so just multiply the alpha by it */ + alpha *= falloff * ps->brush->alpha; + mask = ((float)projPixel->mask)/65535.0f; + } + else { + /* This brush dosnt accumulate so add some curve to the brushes falloff */ + falloff = 1.0f - falloff; + falloff = 1.0f - (falloff * falloff); + + mask_short = projPixel->mask * (ps->brush->alpha * falloff); + if (mask_short > projPixel->mask_max) { + mask = ((float)mask_short)/65535.0f; + projPixel->mask_max = mask_short; + } + else { + /*mask = ((float)projPixel->mask_max)/65535.0f;*/ + + /* Go onto the next pixel */ + continue; + } + } + + if (alpha > 0.0f) { + + if (last_index != projPixel->image_index) { + last_index = projPixel->image_index; + last_projIma = projImages + last_index; + + last_projIma->touch = 1; + is_floatbuf = last_projIma->ibuf->rect_float ? 1 : 0; + } + + last_partial_redraw_cell = last_projIma->partRedrawRect + projPixel->bb_cell_index; + last_partial_redraw_cell->x1 = MIN2(last_partial_redraw_cell->x1, projPixel->x_px); + last_partial_redraw_cell->y1 = MIN2(last_partial_redraw_cell->y1, projPixel->y_px); + + last_partial_redraw_cell->x2 = MAX2(last_partial_redraw_cell->x2, projPixel->x_px+1); + last_partial_redraw_cell->y2 = MAX2(last_partial_redraw_cell->y2, projPixel->y_px+1); + + + switch(tool) { + case PAINT_TOOL_CLONE: + if (is_floatbuf) { + if (((ProjPixelClone *)projPixel)->clonepx.f[3]) { + do_projectpaint_clone_f(ps, projPixel, rgba, alpha, mask); + } + } + else { + if (((ProjPixelClone*)projPixel)->clonepx.ch[3]) { + do_projectpaint_clone(ps, projPixel, rgba, alpha, mask); + } + } + break; + case PAINT_TOOL_SMEAR: + Vec2Subf(co, projPixel->projCoSS, pos_ofs); + + if (is_floatbuf) do_projectpaint_smear_f(ps, projPixel, rgba, alpha, mask, smearArena, &smearPixels_f, co); + else do_projectpaint_smear(ps, projPixel, rgba, alpha, mask, smearArena, &smearPixels, co); + break; + default: + if (is_floatbuf) do_projectpaint_draw_f(ps, projPixel, rgba, alpha, mask); + else do_projectpaint_draw(ps, projPixel, rgba, alpha, mask); + break; + } + } + /* done painting */ + } + } + } + } + + + if (tool==PAINT_TOOL_SMEAR) { + + for (node= smearPixels; node; node= node->next) { /* this wont run for a float image */ + projPixel = node->link; + *projPixel->pixel.uint_pt = ((ProjPixelClone *)projPixel)->clonepx.uint; + } + + for (node= smearPixels_f; node; node= node->next) { /* this wont run for a float image */ + projPixel = node->link; + IMAPAINT_CHAR_RGBA_TO_FLOAT(projPixel->pixel.f_pt, ((ProjPixelClone *)projPixel)->clonepx.ch); + node = node->next; + } + + BLI_memarena_free(smearArena); + } + + return NULL; +} + +static int project_paint_op(void *state, ImBuf *ibufb, float *lastpos, float *pos) +{ + /* First unpack args from the struct */ + ProjPaintState *ps = (ProjPaintState *)state; + int touch_any = 0; + + ProjectHandle handles[BLENDER_MAX_THREADS]; + ListBase threads; + int a,i; + + if (!project_bucket_iter_init(ps, pos)) { + return 0; + } + + if (ps->thread_tot > 1) + BLI_init_threads(&threads, do_projectpaint_thread, ps->thread_tot); + + /* get the threads running */ + for(a=0; a < ps->thread_tot; a++) { + + /* set defaults in handles */ + //memset(&handles[a], 0, sizeof(BakeShade)); + + handles[a].ps = ps; + VECCOPY2D(handles[a].mval, pos); + VECCOPY2D(handles[a].prevmval, lastpos); + + /* thread spesific */ + handles[a].thread_index = a; + + handles[a].projImages = (ProjPaintImage *)BLI_memarena_alloc(ps->arena_mt[a], ps->image_tot * sizeof(ProjPaintImage)); + + memcpy(handles[a].projImages, ps->projImages, ps->image_tot * sizeof(ProjPaintImage)); + + /* image bounds */ + for (i=0; i< ps->image_tot; i++) { + handles[a].projImages[i].partRedrawRect = (ImagePaintPartialRedraw *)BLI_memarena_alloc(ps->arena_mt[a], sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); + memcpy(handles[a].projImages[i].partRedrawRect, ps->projImages[i].partRedrawRect, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); + } + + if (ps->thread_tot > 1) + BLI_insert_thread(&threads, &handles[a]); + } + + if (ps->thread_tot > 1) /* wait for everything to be done */ + BLI_end_threads(&threads); + else + do_projectpaint_thread(&handles[0]); + + + /* move threaded bounds back into ps->projectPartialRedraws */ + for(i=0; i < ps->image_tot; i++) { + int touch = 0; + for(a=0; a < ps->thread_tot; a++) { + touch |= partial_redraw_array_merge(ps->projImages[i].partRedrawRect, handles[a].projImages[i].partRedrawRect, PROJ_BOUNDBOX_SQUARED); + } + + if (touch) { + ps->projImages[i].touch = 1; + touch_any = 1; + } + } + + return touch_any; +} + + +static int project_paint_sub_stroke(ProjPaintState *ps, BrushPainter *painter, int *prevmval_i, int *mval_i, double time, float pressure) +{ + + /* Use mouse coords as floats for projection painting */ + float pos[2]; + + pos[0] = mval_i[0]; + pos[1] = mval_i[1]; + + // we may want to use this later + // brush_painter_require_imbuf(painter, ((ibuf->rect_float)? 1: 0), 0, 0); + + if (brush_painter_paint(painter, project_paint_op, pos, time, pressure, ps)) { + return 1; + } + else return 0; +} + + +static int project_paint_stroke(ProjPaintState *ps, BrushPainter *painter, int *prevmval_i, int *mval_i, double time, float pressure) +{ + int a, redraw; + + for (a=0; a < ps->image_tot; a++) + partial_redraw_array_init(ps->projImages[a].partRedrawRect); + + redraw= project_paint_sub_stroke(ps, painter, prevmval_i, mval_i, time, pressure); + + if(project_image_refresh_tagged(ps)) + return redraw; + + return 0; +} + +/* Imagepaint Partial Redraw & Dirty Region */ + +static void imapaint_clear_partial_redraw() +{ + memset(&imapaintpartial, 0, sizeof(imapaintpartial)); +} + +static void imapaint_dirty_region(Image *ima, ImBuf *ibuf, int x, int y, int w, int h) +{ + ImBuf *tmpibuf = NULL; + UndoTile *tile; + int srcx= 0, srcy= 0, origx; + + IMB_rectclip(ibuf, NULL, &x, &y, &srcx, &srcy, &w, &h); + + if (w == 0 || h == 0) + return; + + if (!imapaintpartial.enabled) { + imapaintpartial.x1 = x; + imapaintpartial.y1 = y; + imapaintpartial.x2 = x+w; + imapaintpartial.y2 = y+h; + imapaintpartial.enabled = 1; + } + else { + imapaintpartial.x1 = MIN2(imapaintpartial.x1, x); + imapaintpartial.y1 = MIN2(imapaintpartial.y1, y); + imapaintpartial.x2 = MAX2(imapaintpartial.x2, x+w); + imapaintpartial.y2 = MAX2(imapaintpartial.y2, y+h); + } + + w = ((x + w - 1) >> IMAPAINT_TILE_BITS); + h = ((y + h - 1) >> IMAPAINT_TILE_BITS); + origx = (x >> IMAPAINT_TILE_BITS); + y = (y >> IMAPAINT_TILE_BITS); + + for (; y <= h; y++) { + for (x=origx; x <= w; x++) { + for(tile=curundo->tiles.first; tile; tile=tile->next) + if(tile->x == x && tile->y == y && strcmp(tile->id.name, ima->id.name)==0) + break; + + if(!tile) { + undo_init_tile(&ima->id, ibuf, &tmpibuf, x, y); + } + } + } + + ibuf->userflags |= IB_BITMAPDIRTY; + + if (tmpibuf) + IMB_freeImBuf(tmpibuf); +} + +static void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, short texpaint) +{ + if(ibuf->rect_float) + /* TODO - should just update a portion from imapaintpartial! */ + imb_freerectImBuf(ibuf); /* force recreate of char rect */ + if(ibuf->mipmap[0]) + imb_freemipmapImBuf(ibuf); + + /* todo: should set_tpage create ->rect? */ + if(texpaint || (sima && sima->lock)) { + int w = imapaintpartial.x2 - imapaintpartial.x1; + int h = imapaintpartial.y2 - imapaintpartial.y1; + GPU_paint_update_image(image, imapaintpartial.x1, imapaintpartial.y1, w, h); + } +} + +/* Image Paint Operations */ + +static void imapaint_ibuf_get_set_rgb(ImBuf *ibuf, int x, int y, short torus, short set, float *rgb) +{ + if (torus) { + x %= ibuf->x; + if (x < 0) x += ibuf->x; + y %= ibuf->y; + if (y < 0) y += ibuf->y; + } + + if (ibuf->rect_float) { + float *rrgbf = ibuf->rect_float + (ibuf->x*y + x)*4; + + if (set) { + IMAPAINT_FLOAT_RGB_COPY(rrgbf, rgb); + } else { + IMAPAINT_FLOAT_RGB_COPY(rgb, rrgbf); + } + } + else { + char *rrgb = (char*)ibuf->rect + (ibuf->x*y + x)*4; + + if (set) { + IMAPAINT_FLOAT_RGB_TO_CHAR(rrgb, rgb) + } else { + IMAPAINT_CHAR_RGB_TO_FLOAT(rgb, rrgb) + } + } +} + +static int imapaint_ibuf_add_if(ImBuf *ibuf, unsigned int x, unsigned int y, float *outrgb, short torus) +{ + float inrgb[3]; + + if ((x >= ibuf->x) || (y >= ibuf->y)) { + if (torus) imapaint_ibuf_get_set_rgb(ibuf, x, y, 1, 0, inrgb); + else return 0; + } + else imapaint_ibuf_get_set_rgb(ibuf, x, y, 0, 0, inrgb); + + outrgb[0] += inrgb[0]; + outrgb[1] += inrgb[1]; + outrgb[2] += inrgb[2]; + + return 1; +} + +static void imapaint_lift_soften(ImBuf *ibuf, ImBuf *ibufb, int *pos, short torus) +{ + int x, y, count, xi, yi, xo, yo; + int out_off[2], in_off[2], dim[2]; + float outrgb[3]; + + dim[0] = ibufb->x; + dim[1] = ibufb->y; + in_off[0] = pos[0]; + in_off[1] = pos[1]; + out_off[0] = out_off[1] = 0; + + if (!torus) { + IMB_rectclip(ibuf, ibufb, &in_off[0], &in_off[1], &out_off[0], + &out_off[1], &dim[0], &dim[1]); + + if ((dim[0] == 0) || (dim[1] == 0)) + return; + } + + for (y=0; y < dim[1]; y++) { + for (x=0; x < dim[0]; x++) { + /* get input pixel */ + xi = in_off[0] + x; + yi = in_off[1] + y; + + count = 1; + imapaint_ibuf_get_set_rgb(ibuf, xi, yi, torus, 0, outrgb); + + count += imapaint_ibuf_add_if(ibuf, xi-1, yi-1, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi-1, yi , outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi-1, yi+1, outrgb, torus); + + count += imapaint_ibuf_add_if(ibuf, xi , yi-1, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi , yi+1, outrgb, torus); + + count += imapaint_ibuf_add_if(ibuf, xi+1, yi-1, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi+1, yi , outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi+1, yi+1, outrgb, torus); + + outrgb[0] /= count; + outrgb[1] /= count; + outrgb[2] /= count; + + /* write into brush buffer */ + xo = out_off[0] + x; + yo = out_off[1] + y; + imapaint_ibuf_get_set_rgb(ibufb, xo, yo, 0, 1, outrgb); + } + } +} + +static void imapaint_lift_smear(ImBuf *ibuf, ImBuf *ibufb, int *pos) +{ + IMB_rectblend_torus(ibufb, ibuf, 0, 0, pos[0], pos[1], + ibufb->x, ibufb->y, IMB_BLEND_COPY_RGB); +} + +static ImBuf *imapaint_lift_clone(ImBuf *ibuf, ImBuf *ibufb, int *pos) +{ + /* note: allocImbuf returns zero'd memory, so regions outside image will + have zero alpha, and hence not be blended onto the image */ + int w=ibufb->x, h=ibufb->y, destx=0, desty=0, srcx=pos[0], srcy=pos[1]; + ImBuf *clonebuf= IMB_allocImBuf(w, h, ibufb->depth, ibufb->flags, 0); + + IMB_rectclip(clonebuf, ibuf, &destx, &desty, &srcx, &srcy, &w, &h); + IMB_rectblend(clonebuf, ibuf, destx, desty, srcx, srcy, w, h, + IMB_BLEND_COPY_RGB); + IMB_rectblend(clonebuf, ibufb, destx, desty, destx, desty, w, h, + IMB_BLEND_COPY_ALPHA); + + return clonebuf; +} + +static void imapaint_convert_brushco(ImBuf *ibufb, float *pos, int *ipos) +{ + ipos[0]= (int)(pos[0] - ibufb->x/2); + ipos[1]= (int)(pos[1] - ibufb->y/2); +} + +/* dosnt run for projection painting + * only the old style painting in the 3d view */ +static int imapaint_paint_op(void *state, ImBuf *ibufb, float *lastpos, float *pos) +{ + ImagePaintState *s= ((ImagePaintState*)state); + ImBuf *clonebuf= NULL; + short torus= s->brush->flag & BRUSH_TORUS; + short blend= s->blend; + float *offset= s->brush->clone.offset; + float liftpos[2]; + int bpos[2], blastpos[2], bliftpos[2]; + + imapaint_convert_brushco(ibufb, pos, bpos); + + /* lift from canvas */ + if(s->tool == PAINT_TOOL_SOFTEN) { + imapaint_lift_soften(s->canvas, ibufb, bpos, torus); + } + else if(s->tool == PAINT_TOOL_SMEAR) { + if (lastpos[0]==pos[0] && lastpos[1]==pos[1]) + return 0; + + imapaint_convert_brushco(ibufb, lastpos, blastpos); + imapaint_lift_smear(s->canvas, ibufb, blastpos); + } + else if(s->tool == PAINT_TOOL_CLONE && s->clonecanvas) { + liftpos[0]= pos[0] - offset[0]*s->canvas->x; + liftpos[1]= pos[1] - offset[1]*s->canvas->y; + + imapaint_convert_brushco(ibufb, liftpos, bliftpos); + clonebuf= imapaint_lift_clone(s->clonecanvas, ibufb, bliftpos); + } + + imapaint_dirty_region(s->image, s->canvas, bpos[0], bpos[1], ibufb->x, ibufb->y); + + /* blend into canvas */ + if(torus) + IMB_rectblend_torus(s->canvas, (clonebuf)? clonebuf: ibufb, + bpos[0], bpos[1], 0, 0, ibufb->x, ibufb->y, blend); + else + IMB_rectblend(s->canvas, (clonebuf)? clonebuf: ibufb, + bpos[0], bpos[1], 0, 0, ibufb->x, ibufb->y, blend); + + if(clonebuf) IMB_freeImBuf(clonebuf); + + return 1; +} + +/* 3D TexturePaint */ + +static int texpaint_break_stroke(float *prevuv, float *fwuv, float *bkuv, float *uv) +{ + float d1[2], d2[2]; + float mismatch = Vec2Lenf(fwuv, uv); + float len1 = Vec2Lenf(prevuv, fwuv); + float len2 = Vec2Lenf(bkuv, uv); + + Vec2Subf(d1, fwuv, prevuv); + Vec2Subf(d2, uv, bkuv); + + return ((Inp2f(d1, d2) < 0.0f) || (mismatch > MAX2(len1, len2)*2)); +} + +/* ImagePaint Common */ + +static int imapaint_canvas_set(ImagePaintState *s, Image *ima) +{ + ImBuf *ibuf= BKE_image_get_ibuf(ima, s->sima? &s->sima->iuser: NULL); + + /* verify that we can paint and set canvas */ + if(ima->packedfile && ima->rr) { + s->warnpackedfile = ima->id.name + 2; + return 0; + } + else if(ibuf && ibuf->channels!=4) { + s->warnmultifile = ima->id.name + 2; + return 0; + } + else if(!ima || !ibuf || !(ibuf->rect || ibuf->rect_float)) + return 0; + + s->image= ima; + s->canvas= ibuf; + + /* set clone canvas */ + if(s->tool == PAINT_TOOL_CLONE) { + ima= s->brush->clone.image; + ibuf= BKE_image_get_ibuf(ima, s->sima? &s->sima->iuser: NULL); + + if(!ima || !ibuf || !(ibuf->rect || ibuf->rect_float)) + return 0; + + s->clonecanvas= ibuf; + + if(s->canvas->rect_float && !s->clonecanvas->rect_float) { + /* temporarily add float rect for cloning */ + IMB_float_from_rect(s->clonecanvas); + s->clonefreefloat= 1; + } + else if(!s->canvas->rect_float && !s->clonecanvas->rect) + IMB_rect_from_float(s->clonecanvas); + } + + return 1; +} + +static void imapaint_canvas_free(ImagePaintState *s) +{ + if (s->clonefreefloat) + imb_freerectfloatImBuf(s->clonecanvas); +} + +static int imapaint_paint_sub_stroke(ImagePaintState *s, BrushPainter *painter, Image *image, short texpaint, float *uv, double time, int update, float pressure) +{ + ImBuf *ibuf= BKE_image_get_ibuf(image, s->sima? &s->sima->iuser: NULL); + float pos[2]; + + if(!ibuf) + return 0; + + pos[0] = uv[0]*ibuf->x; + pos[1] = uv[1]*ibuf->y; + + brush_painter_require_imbuf(painter, ((ibuf->rect_float)? 1: 0), 0, 0); + + if (brush_painter_paint(painter, imapaint_paint_op, pos, time, pressure, s)) { + if (update) + imapaint_image_update(s->sima, image, ibuf, texpaint); + return 1; + } + else return 0; +} + +static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPainter *painter, short texpaint, int *prevmval, int *mval, double time, float pressure) +{ + Image *newimage = NULL; + float fwuv[2], bkuv[2], newuv[2]; + unsigned int newfaceindex; + int breakstroke = 0, redraw = 0; + + if (texpaint) { + /* pick new face and image */ + if ( imapaint_pick_face(vc, s->me, mval, &newfaceindex) && + ((G.f & G_FACESELECT)==0 || (s->me->mface+newfaceindex)->flag & ME_FACE_SEL) + ) { + ImBuf *ibuf; + + newimage = (Image*)((s->me->mtface+newfaceindex)->tpage); + ibuf= BKE_image_get_ibuf(newimage, s->sima? &s->sima->iuser: NULL); + + if(ibuf && ibuf->rect) + imapaint_pick_uv(s->scene, s->ob, s->me, newfaceindex, mval, newuv); + else { + newimage = NULL; + newuv[0] = newuv[1] = 0.0f; + } + } + else + newuv[0] = newuv[1] = 0.0f; + + /* see if stroke is broken, and if so finish painting in old position */ + if (s->image) { + imapaint_pick_uv(s->scene, s->ob, s->me, s->faceindex, mval, fwuv); + imapaint_pick_uv(s->scene, s->ob, s->me, newfaceindex, prevmval, bkuv); + + if (newimage == s->image) + breakstroke= texpaint_break_stroke(s->uv, fwuv, bkuv, newuv); + else + breakstroke= 1; + } + else + fwuv[0]= fwuv[1]= 0.0f; + + if (breakstroke) { + imapaint_pick_uv(s->scene, s->ob, s->me, s->faceindex, mval, fwuv); + redraw |= imapaint_paint_sub_stroke(s, painter, s->image, texpaint, + fwuv, time, 1, pressure); + imapaint_clear_partial_redraw(); + brush_painter_break_stroke(painter); + } + + /* set new canvas */ + if (newimage && (newimage != s->image)) + if (!imapaint_canvas_set(s, newimage)) + newimage = NULL; + + /* paint in new image */ + if (newimage) { + if (breakstroke) + redraw|= imapaint_paint_sub_stroke(s, painter, newimage, + texpaint, bkuv, time, 0, pressure); + redraw|= imapaint_paint_sub_stroke(s, painter, newimage, texpaint, + newuv, time, 1, pressure); + } + + /* update state */ + s->image = newimage; + s->faceindex = newfaceindex; + s->uv[0] = newuv[0]; + s->uv[1] = newuv[1]; + } + else { + UI_view2d_region_to_view(s->v2d, mval[0], mval[1], &newuv[0], &newuv[1]); + redraw |= imapaint_paint_sub_stroke(s, painter, s->image, texpaint, newuv, + time, 1, pressure); + } + + if (redraw) + imapaint_clear_partial_redraw(); + + return redraw; +} + +/************************ image paint poll ************************/ + +static Brush *image_paint_brush(bContext *C) +{ + Scene *scene= CTX_data_scene(C); + ToolSettings *settings= scene->toolsettings; + + return settings->imapaint.brush; +} + +static int image_paint_poll(bContext *C) +{ + if(!image_paint_brush(C)) + return 0; + + if((G.f & G_TEXTUREPAINT) && CTX_wm_region_view3d(C)) { + return 1; + } + else { + ScrArea *sa= CTX_wm_area(C); + SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); + + if(sa && sa->spacetype==SPACE_IMAGE) { + ARegion *ar= CTX_wm_region(C); + + if((sima->flag & SI_DRAWTOOL) && ar->regiontype==RGN_TYPE_WINDOW) + return 1; + } + } + + return 0; +} + +static int image_paint_3d_poll(bContext *C) +{ + if(CTX_wm_region_view3d(C)) + return image_paint_poll(C); + + return 0; +} + +static int image_paint_2d_clone_poll(bContext *C) +{ + Scene *scene= CTX_data_scene(C); + ToolSettings *settings= scene->toolsettings; + Brush *brush= image_paint_brush(C); + + if(!CTX_wm_region_view3d(C) && image_paint_poll(C)) + if(brush && (settings->imapaint.tool == PAINT_TOOL_CLONE)) + if(brush->clone.image) + return 1; + + return 0; +} + +/************************ paint operator ************************/ + +typedef enum PaintMode { + PAINT_MODE_2D, + PAINT_MODE_3D, + PAINT_MODE_3D_PROJECT +} PaintMode; + +typedef struct PaintOperation { + PaintMode mode; + + BrushPainter *painter; + ImagePaintState s; + ProjPaintState ps; + + int first; + int prevmouse[2]; + double starttime; + + ViewContext vc; + wmTimer *timer; +} PaintOperation; + +static void paint_redraw(bContext *C, ImagePaintState *s, int final) +{ + if(final) { + if(s->image) + GPU_free_image(s->image); + + WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, s->image); + + // XXX node update +#if 0 + if(!s->sima && s->image) { + /* after paint, tag Image or RenderResult nodes changed */ + if(s->scene->nodetree) { + imagepaint_composite_tags(s->scene->nodetree, image, &s->sima->iuser); + } + /* signal composite (hurmf, need an allqueue?) */ + if(s->sima->lock) { + ScrArea *sa; + for(sa=s->screen->areabase.first; sa; sa= sa->next) { + if(sa->spacetype==SPACE_NODE) { + if(((SpaceNode *)sa->spacedata.first)->treetype==NTREE_COMPOSIT) { + addqueue(sa->win, UI_BUT_EVENT, B_NODE_TREE_EXEC); + break; + } + } + } + } + } +#endif + } + else { + if(!s->sima || !s->sima->lock) + ED_region_tag_redraw(CTX_wm_region(C)); + else + WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, s->image); + } +} + +static int paint_init(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + ToolSettings *settings= scene->toolsettings; + PaintOperation *pop; + + pop= MEM_callocN(sizeof(PaintOperation), "PaintOperation"); + pop->first= 1; + op->customdata= pop; + + /* initialize from context */ + if(CTX_wm_region_view3d(C)) { + pop->ps.v3d= CTX_wm_view3d(C); + pop->ps.rv3d= CTX_wm_region_view3d(C); + pop->mode= PAINT_MODE_3D; + + if(!(settings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)) + pop->mode= PAINT_MODE_3D_PROJECT; + else + view3d_set_viewcontext(C, &pop->vc); + } + else { + pop->s.sima= (SpaceImage*)CTX_wm_space_data(C); + pop->s.v2d= &CTX_wm_region(C)->v2d; + } + + pop->s.scene= scene; + pop->ps.scene= scene; + pop->s.screen= CTX_wm_screen(C); + pop->ps.ar= CTX_wm_region(C); + + /* intialize brush */ + pop->s.brush = settings->imapaint.brush; + pop->s.tool = settings->imapaint.tool; + if(pop->mode == PAINT_MODE_3D && (pop->s.tool == PAINT_TOOL_CLONE)) + pop->s.tool = PAINT_TOOL_DRAW; + pop->s.blend = pop->s.brush->blend; + + if(pop->mode == PAINT_MODE_3D_PROJECT) { + pop->ps.brush = pop->s.brush; + pop->ps.tool = pop->s.tool; + pop->ps.blend = pop->s.blend; + } + + if(pop->mode != PAINT_MODE_2D) { + pop->ps.ob = pop->s.ob = OBACT; + if (!pop->s.ob || !(pop->s.ob->lay & pop->ps.v3d->lay)) return 0; + pop->s.me = get_mesh(pop->s.ob); + if (!pop->s.me) return 0; + } + else { + pop->s.image = pop->s.sima->image; + + if(!imapaint_canvas_set(&pop->s, pop->s.sima->image)) { + if(pop->s.warnmultifile) + BKE_report(op->reports, RPT_WARNING, "Image requires 4 color channels to paint"); + if(pop->s.warnpackedfile) + BKE_report(op->reports, RPT_WARNING, "Packed MultiLayer files cannot be painted"); + + return 0; + } + } + + /* note, if we have no UVs on the derived mesh, then we must return here */ + if(pop->mode == PAINT_MODE_3D_PROJECT) { + /* setup projection painting data */ + pop->ps.do_backfacecull = (settings->imapaint.flag & IMAGEPAINT_PROJECT_BACKFACE) ? 0 : 1; + pop->ps.do_occlude = (settings->imapaint.flag & IMAGEPAINT_PROJECT_XRAY) ? 0 : 1; + pop->ps.do_mask_normal = (settings->imapaint.flag & IMAGEPAINT_PROJECT_FLAT) ? 0 : 1;; + + if (pop->ps.tool == PAINT_TOOL_CLONE) + pop->ps.do_layer_clone = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_CLONE); + + pop->ps.do_layer_mask = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_MASK) ? 1 : 0; + pop->ps.do_layer_mask_inv = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_MASK_INV) ? 1 : 0; + + +#ifndef PROJ_DEBUG_NOSEAMBLEED + pop->ps.seam_bleed_px = settings->imapaint.seam_bleed; /* pixel num to bleed */ +#endif + + if(pop->ps.do_mask_normal) { + pop->ps.normal_angle_inner = settings->imapaint.normal_angle; + pop->ps.normal_angle = (pop->ps.normal_angle_inner + 90.0f) * 0.5f; + } + else { + pop->ps.normal_angle_inner= pop->ps.normal_angle= settings->imapaint.normal_angle; + } + + pop->ps.normal_angle_inner *= M_PI_2 / 90; + pop->ps.normal_angle *= M_PI_2 / 90; + pop->ps.normal_angle_range = pop->ps.normal_angle - pop->ps.normal_angle_inner; + + if(pop->ps.normal_angle_range <= 0.0f) + pop->ps.do_mask_normal = 0; /* no need to do blending */ + + project_paint_begin(&pop->ps); + + if(pop->ps.dm==NULL) + return 0; + } + + settings->imapaint.flag |= IMAGEPAINT_DRAWING; + undo_imagepaint_push_begin("Image Paint"); + + /* create painter */ + pop->painter= brush_painter_new(pop->s.brush); + + return 1; +} + +static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) +{ + PaintOperation *pop= op->customdata; + float time; + float pressure; + int mouse[2], redraw; + + RNA_int_get_array(itemptr, "mouse", mouse); + time= RNA_float_get(itemptr, "time"); + pressure= RNA_float_get(itemptr, "pressure"); + + if(pop->first) + project_paint_begin_clone(&pop->ps, mouse); + + if(pop->mode == PAINT_MODE_3D) + view3d_operator_needs_opengl(C); + + if(pop->mode == PAINT_MODE_3D_PROJECT) { + redraw= project_paint_stroke(&pop->ps, pop->painter, pop->prevmouse, mouse, time, pressure); + pop->prevmouse[0]= mouse[0]; + pop->prevmouse[1]= mouse[1]; + + } + else { + redraw= imapaint_paint_stroke(&pop->vc, &pop->s, pop->painter, pop->mode == PAINT_MODE_3D, pop->prevmouse, mouse, time, pressure); + pop->prevmouse[0]= mouse[0]; + pop->prevmouse[1]= mouse[1]; + } + + if(redraw) + paint_redraw(C, &pop->s, 0); + + pop->first= 0; +} + +static void paint_exit(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + ToolSettings *settings= scene->toolsettings; + PaintOperation *pop= op->customdata; + + if(pop->timer) + WM_event_remove_window_timer(CTX_wm_window(C), pop->timer); + + settings->imapaint.flag &= ~IMAGEPAINT_DRAWING; + imapaint_canvas_free(&pop->s); + brush_painter_free(pop->painter); + + if(pop->mode == PAINT_MODE_3D_PROJECT) + project_paint_end(&pop->ps); + + paint_redraw(C, &pop->s, 1); + undo_imagepaint_push_end(); + + if(pop->s.warnmultifile) + BKE_reportf(op->reports, RPT_WARNING, "Image requires 4 color channels to paint: %s", pop->s.warnmultifile); + if(pop->s.warnpackedfile) + BKE_reportf(op->reports, RPT_WARNING, "Packed MultiLayer files cannot be painted: %s", pop->s.warnpackedfile); + + MEM_freeN(pop); +} + +static int paint_exec(bContext *C, wmOperator *op) +{ + if(!paint_init(C, op)) { + MEM_freeN(op->customdata); + return OPERATOR_CANCELLED; + } + + RNA_BEGIN(op->ptr, itemptr, "stroke") { + paint_apply(C, op, &itemptr); + } + RNA_END; + + paint_exit(C, op); + + return OPERATOR_FINISHED; +} + +static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event) +{ + ARegion *ar= CTX_wm_region(C); + PaintOperation *pop= op->customdata; + wmTabletData *wmtab; + PointerRNA itemptr; + float pressure; + double time; + int tablet, mouse[2]; + + // XXX +1 matches brush location better but + // still not exact, find out why and fix .. + mouse[0]= event->x - ar->winrct.xmin + 1; + mouse[1]= event->y - ar->winrct.ymin + 1; + + time= PIL_check_seconds_timer(); + + tablet= 0; + pressure= 0; + pop->s.blend= pop->s.brush->blend; + + if(event->custom == EVT_DATA_TABLET) { + wmtab= event->customdata; + + tablet= (wmtab->Active != EVT_TABLET_NONE); + pressure= wmtab->Pressure; + if(wmtab->Active == EVT_TABLET_ERASER) + pop->s.blend= BRUSH_BLEND_ERASE_ALPHA; + } + else + pressure= 1.0f; + + if(pop->first) { + pop->prevmouse[0]= mouse[0]; + pop->prevmouse[1]= mouse[1]; + pop->starttime= time; + + /* special exception here for too high pressure values on first touch in + windows for some tablets, then we just skip first touch .. */ + if ((pop->s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE| + BRUSH_SPACING_PRESSURE|BRUSH_RAD_PRESSURE)) && tablet && (pressure >= 0.99f)) + return; + } + + /* fill in stroke */ + RNA_collection_add(op->ptr, "stroke", &itemptr); + + RNA_int_set_array(&itemptr, "mouse", mouse); + RNA_float_set(&itemptr, "time", (float)(time - pop->starttime)); + RNA_float_set(&itemptr, "pressure", pressure); + + /* apply */ + paint_apply(C, op, &itemptr); +} + +static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + PaintOperation *pop; + + if(!paint_init(C, op)) { + MEM_freeN(op->customdata); + return OPERATOR_CANCELLED; + } + + paint_apply_event(C, op, event); + + pop= op->customdata; + WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + + if(pop->s.brush->flag & BRUSH_AIRBRUSH) + pop->timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER, 0.01f); + + return OPERATOR_RUNNING_MODAL; +} + +static int paint_modal(bContext *C, wmOperator *op, wmEvent *event) +{ + PaintOperation *pop= op->customdata; + + switch(event->type) { + case LEFTMOUSE: + case MIDDLEMOUSE: + case RIGHTMOUSE: // XXX hardcoded + paint_exit(C, op); + return OPERATOR_FINISHED; + case MOUSEMOVE: + paint_apply_event(C, op, event); + break; + case TIMER: + if(event->customdata == pop->timer) + paint_apply_event(C, op, event); + break; + } + + return OPERATOR_RUNNING_MODAL; +} + +static int paint_cancel(bContext *C, wmOperator *op) +{ + paint_exit(C, op); + + return OPERATOR_CANCELLED; +} + +void PAINT_OT_image_paint(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Image Paint"; + ot->idname= "PAINT_OT_image_paint"; + + /* api callbacks */ + ot->exec= paint_exec; + ot->invoke= paint_invoke; + ot->modal= paint_modal; + ot->cancel= paint_cancel; + ot->poll= image_paint_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); +} + +/************************ grab clone operator ************************/ + +typedef struct GrabClone { + float startoffset[2]; + int startx, starty; +} GrabClone; + +static void grab_clone_apply(bContext *C, wmOperator *op) +{ + Brush *brush= image_paint_brush(C); + float delta[2]; + + RNA_float_get_array(op->ptr, "delta", delta); + brush->clone.offset[0] += delta[0]; + brush->clone.offset[1] += delta[1]; + + ED_region_tag_redraw(CTX_wm_region(C)); +} + +static int grab_clone_exec(bContext *C, wmOperator *op) +{ + grab_clone_apply(C, op); + + return OPERATOR_FINISHED; +} + +static int grab_clone_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + Brush *brush= image_paint_brush(C); + GrabClone *cmv; + + cmv= MEM_callocN(sizeof(GrabClone), "GrabClone"); + cmv->startoffset[0]= brush->clone.offset[0]; + cmv->startoffset[1]= brush->clone.offset[1]; + cmv->startx= event->x; + cmv->starty= event->y; + op->customdata= cmv; + + WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op); + + return OPERATOR_RUNNING_MODAL; +} + +static int grab_clone_modal(bContext *C, wmOperator *op, wmEvent *event) +{ + Brush *brush= image_paint_brush(C); + ARegion *ar= CTX_wm_region(C); + GrabClone *cmv= op->customdata; + float startfx, startfy, fx, fy, delta[2]; + int xmin= ar->winrct.xmin, ymin= ar->winrct.ymin; + + switch(event->type) { + case LEFTMOUSE: + case MIDDLEMOUSE: + case RIGHTMOUSE: // XXX hardcoded + MEM_freeN(op->customdata); + return OPERATOR_FINISHED; + case MOUSEMOVE: + /* mouse moved, so move the clone image */ + UI_view2d_region_to_view(&ar->v2d, cmv->startx - xmin, cmv->starty - ymin, &startfx, &startfy); + UI_view2d_region_to_view(&ar->v2d, event->x - xmin, event->y - ymin, &fx, &fy); + + delta[0]= fx - startfx; + delta[1]= fy - startfy; + RNA_float_set_array(op->ptr, "delta", delta); + + brush->clone.offset[0]= cmv->startoffset[0]; + brush->clone.offset[1]= cmv->startoffset[1]; + + grab_clone_apply(C, op); + break; + } + + return OPERATOR_RUNNING_MODAL; +} + +static int grab_clone_cancel(bContext *C, wmOperator *op) +{ + MEM_freeN(op->customdata); + return OPERATOR_CANCELLED; +} + +void PAINT_OT_grab_clone(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Grab Clone"; + ot->idname= "PAINT_OT_grab_clone"; + + /* api callbacks */ + ot->exec= grab_clone_exec; + ot->invoke= grab_clone_invoke; + ot->modal= grab_clone_modal; + ot->cancel= grab_clone_cancel; + ot->poll= image_paint_2d_clone_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates.", -1.0f, 1.0f); +} + +/******************** sample color operator ********************/ + +static int sample_color_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Brush *brush= image_paint_brush(C); + ARegion *ar= CTX_wm_region(C); + int location[2]; + + RNA_int_get_array(op->ptr, "location", location); + paint_sample_color(scene, ar, location[0], location[1]); + + WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); + + return OPERATOR_FINISHED; +} + +static int sample_color_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + ARegion *ar= CTX_wm_region(C); + int location[2]; + + location[0]= event->x - ar->winrct.xmin; + location[1]= event->y - ar->winrct.ymin; + RNA_int_set_array(op->ptr, "location", location); + + return sample_color_exec(C, op); +} + +void PAINT_OT_sample_color(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Sample Color"; + ot->idname= "PAINT_OT_sample_color"; + + /* api callbacks */ + ot->exec= sample_color_exec; + ot->invoke= sample_color_invoke; + ot->poll= image_paint_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "Cursor location in region coordinates.", 0, 16384); +} + +/******************** set clone cursor operator ********************/ + +static int set_clone_cursor_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + View3D *v3d= CTX_wm_view3d(C); + float *cursor= give_cursor(scene, v3d); + + RNA_float_get_array(op->ptr, "location", cursor); + + ED_area_tag_redraw(CTX_wm_area(C)); + + return OPERATOR_FINISHED; +} + +static int set_clone_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + Scene *scene= CTX_data_scene(C); + View3D *v3d= CTX_wm_view3d(C); + ARegion *ar= CTX_wm_region(C); + float location[3]; + short mval[2]; + + mval[0]= event->x - ar->winrct.xmin; + mval[1]= event->y - ar->winrct.ymin; + + view3d_operator_needs_opengl(C); + + if(!view_autodist(scene, ar, v3d, mval, location)) + return OPERATOR_CANCELLED; + + RNA_float_set_array(op->ptr, "location", location); + + return set_clone_cursor_exec(C, op); +} + +void PAINT_OT_set_clone_cursor(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Set Clone Cursor"; + ot->idname= "PAINT_OT_set_clone_cursor"; + + /* api callbacks */ + ot->exec= set_clone_cursor_exec; + ot->invoke= set_clone_cursor_invoke; + ot->poll= image_paint_3d_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in world space coordinates.", -10000.0f, 10000.0f); +} + +/************************ cursor drawing *******************************/ + +static void brush_drawcursor(bContext *C, int x, int y, void *customdata) +{ + Brush *brush= image_paint_brush(C); + RegionView3D *rv3d= CTX_wm_region_view3d(C); + + if(brush) { + glPushMatrix(); + + glTranslatef((float)x, (float)y, 0.0f); + + if(!rv3d) { + SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); + ARegion *ar= CTX_wm_region(C); + float zoomx, zoomy; + + ED_space_image_zoom(sima, ar, &zoomx, &zoomy); + glScalef(zoomx, zoomy, 1.0f); + } + + glColor4ub(255, 255, 255, 128); + glEnable( GL_LINE_SMOOTH ); + glEnable(GL_BLEND); + glutil_draw_lined_arc(0.0, M_PI*2.0, brush->size*0.5f, 40); + glDisable(GL_BLEND); + glDisable( GL_LINE_SMOOTH ); + + glPopMatrix(); + } +} + +static void toggle_paint_cursor(bContext *C, int enable) +{ + ToolSettings *settings= CTX_data_scene(C)->toolsettings; + + if(settings->imapaint.paintcursor && !enable) { + WM_paint_cursor_end(CTX_wm_manager(C), settings->imapaint.paintcursor); + settings->imapaint.paintcursor = NULL; + } + else if(enable) + settings->imapaint.paintcursor= WM_paint_cursor_activate(CTX_wm_manager(C), image_paint_poll, brush_drawcursor, NULL); +} + +/******************** texture paint toggle operator ********************/ + +static int texture_paint_toggle_poll(bContext *C) +{ + if(CTX_data_edit_object(C)) + return 0; + if(CTX_data_active_object(C)==NULL) + return 0; + + return 1; +} + +static int texture_paint_toggle_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Object *ob= CTX_data_active_object(C); + Mesh *me= 0; + + if(ob==NULL) + return OPERATOR_CANCELLED; + + if (object_data_is_libdata(ob)) { + BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata."); + return OPERATOR_CANCELLED; + } + + me= get_mesh(ob); + + if(!(G.f & G_TEXTUREPAINT) && !me) { + BKE_report(op->reports, RPT_ERROR, "Can only enter texture paint mode for mesh objects."); + return OPERATOR_CANCELLED; + } + + if(G.f & G_TEXTUREPAINT) { + G.f &= ~G_TEXTUREPAINT; + GPU_paint_set_mipmap(1); + toggle_paint_cursor(C, 0); + } + else { + G.f |= G_TEXTUREPAINT; + + if(me->mtface==NULL) + me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT, + NULL, me->totface); + + brush_check_exists(&scene->toolsettings->imapaint.brush); + GPU_paint_set_mipmap(0); + toggle_paint_cursor(C, 1); + } + + DAG_object_flush_update(scene, ob, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene); + + return OPERATOR_FINISHED; +} + +void PAINT_OT_texture_paint_toggle(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Texture Paint Toggle"; + ot->idname= "PAINT_OT_texture_paint_toggle"; + + /* api callbacks */ + ot->exec= texture_paint_toggle_exec; + ot->poll= texture_paint_toggle_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h new file mode 100644 index 00000000000..a5ac3264eee --- /dev/null +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -0,0 +1,62 @@ +/** + * $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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2008 Blender Foundation. + * All rights reserved. + * + * + * Contributor(s): Blender Foundation + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef ED_PAINT_INTERN_H +#define ED_PAINT_INTERN_H + +struct Scene; +struct Object; +struct Mesh; +struct ViewContext; +struct wmOperatorType; +struct ARegion; + +/* paint_vertex.c */ +void PAINT_OT_weight_paint_toggle(struct wmOperatorType *ot); +void PAINT_OT_weight_paint_radial_control(struct wmOperatorType *ot); +void PAINT_OT_weight_paint(struct wmOperatorType *ot); + +void PAINT_OT_vertex_paint_radial_control(struct wmOperatorType *ot); +void PAINT_OT_vertex_paint_toggle(struct wmOperatorType *ot); +void PAINT_OT_vertex_paint(struct wmOperatorType *ot); + +/* paint_image.c */ +void PAINT_OT_image_paint(struct wmOperatorType *ot); +void PAINT_OT_grab_clone(struct wmOperatorType *ot); +void PAINT_OT_sample_color(struct wmOperatorType *ot); +void PAINT_OT_set_clone_cursor(struct wmOperatorType *ot); +void PAINT_OT_texture_paint_toggle(struct wmOperatorType *ot); + +/* paint_utils.c */ +int imapaint_pick_face(struct ViewContext *vc, struct Mesh *me, int *mval, unsigned int *index); +void imapaint_pick_uv(struct Scene *scene, struct Object *ob, struct Mesh *mesh, unsigned int faceindex, int *xy, float *uv); + +void paint_sample_color(struct Scene *scene, struct ARegion *ar, int x, int y); + +#endif /* ED_PAINT_INTERN_H */ + diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c new file mode 100644 index 00000000000..0918e8c9b94 --- /dev/null +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -0,0 +1,30 @@ + +#include "ED_sculpt.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "paint_intern.h" + +/**************************** registration **********************************/ + +void ED_operatortypes_paint(void) +{ + /* image */ + WM_operatortype_append(PAINT_OT_texture_paint_toggle); + WM_operatortype_append(PAINT_OT_image_paint); + WM_operatortype_append(PAINT_OT_sample_color); + WM_operatortype_append(PAINT_OT_grab_clone); + WM_operatortype_append(PAINT_OT_set_clone_cursor); + + /* weight */ + WM_operatortype_append(PAINT_OT_weight_paint_toggle); + WM_operatortype_append(PAINT_OT_weight_paint_radial_control); + WM_operatortype_append(PAINT_OT_weight_paint); + + /* vertex */ + WM_operatortype_append(PAINT_OT_vertex_paint_radial_control); + WM_operatortype_append(PAINT_OT_vertex_paint_toggle); + WM_operatortype_append(PAINT_OT_vertex_paint); +} + diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c new file mode 100644 index 00000000000..e0ac3c94109 --- /dev/null +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -0,0 +1,191 @@ + +#include +#include + +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_object_types.h" +#include "DNA_scene_types.h" +#include "DNA_screen_types.h" +#include "DNA_view3d_types.h" + +#include "BLI_arithb.h" + +#include "BKE_DerivedMesh.h" +#include "BKE_global.h" +#include "BKE_utildefines.h" + +#include "BIF_gl.h" + +#include "ED_view3d.h" + +#include "paint_intern.h" + +/* 3D Paint */ + +static void imapaint_project(Object *ob, float *model, float *proj, float *co, float *pco) +{ + VECCOPY(pco, co); + pco[3]= 1.0f; + + Mat4MulVecfl(ob->obmat, pco); + Mat4MulVecfl((float(*)[4])model, pco); + Mat4MulVec4fl((float(*)[4])proj, pco); +} + +static void imapaint_tri_weights(Object *ob, float *v1, float *v2, float *v3, float *co, float *w) +{ + float pv1[4], pv2[4], pv3[4], h[3], divw; + float model[16], proj[16], wmat[3][3], invwmat[3][3]; + GLint view[4]; + + /* compute barycentric coordinates */ + + /* get the needed opengl matrices */ + glGetIntegerv(GL_VIEWPORT, view); + glGetFloatv(GL_MODELVIEW_MATRIX, model); + glGetFloatv(GL_PROJECTION_MATRIX, proj); + view[0] = view[1] = 0; + + /* project the verts */ + imapaint_project(ob, model, proj, v1, pv1); + imapaint_project(ob, model, proj, v2, pv2); + imapaint_project(ob, model, proj, v3, pv3); + + /* do inverse view mapping, see gluProject man page */ + h[0]= (co[0] - view[0])*2.0f/view[2] - 1; + h[1]= (co[1] - view[1])*2.0f/view[3] - 1; + h[2]= 1.0f; + + /* solve for(w1,w2,w3)/perspdiv in: + h*perspdiv = Project*Model*(w1*v1 + w2*v2 + w3*v3) */ + + wmat[0][0]= pv1[0]; wmat[1][0]= pv2[0]; wmat[2][0]= pv3[0]; + wmat[0][1]= pv1[1]; wmat[1][1]= pv2[1]; wmat[2][1]= pv3[1]; + wmat[0][2]= pv1[3]; wmat[1][2]= pv2[3]; wmat[2][2]= pv3[3]; + + Mat3Inv(invwmat, wmat); + Mat3MulVecfl(invwmat, h); + + VECCOPY(w, h); + + /* w is still divided by perspdiv, make it sum to one */ + divw= w[0] + w[1] + w[2]; + if(divw != 0.0f) + VecMulf(w, 1.0f/divw); +} + +/* compute uv coordinates of mouse in face */ +void imapaint_pick_uv(Scene *scene, Object *ob, Mesh *mesh, unsigned int faceindex, int *xy, float *uv) +{ + DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); + int *index = dm->getFaceDataArray(dm, CD_ORIGINDEX); + MTFace *tface = dm->getFaceDataArray(dm, CD_MTFACE), *tf; + int numfaces = dm->getNumFaces(dm), a; + float p[2], w[3], absw, minabsw; + MFace mf; + MVert mv[4]; + + minabsw = 1e10; + uv[0] = uv[1] = 0.0; + + /* test all faces in the derivedmesh with the original index of the picked face */ + for(a = 0; a < numfaces; a++) { + if(index[a] == faceindex) { + dm->getFace(dm, a, &mf); + + dm->getVert(dm, mf.v1, &mv[0]); + dm->getVert(dm, mf.v2, &mv[1]); + dm->getVert(dm, mf.v3, &mv[2]); + if(mf.v4) + dm->getVert(dm, mf.v4, &mv[3]); + + tf= &tface[a]; + + p[0]= xy[0]; + p[1]= xy[1]; + + if(mf.v4) { + /* the triangle with the largest absolute values is the one + with the most negative weights */ + imapaint_tri_weights(ob, mv[0].co, mv[1].co, mv[3].co, p, w); + absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]); + if(absw < minabsw) { + uv[0]= tf->uv[0][0]*w[0] + tf->uv[1][0]*w[1] + tf->uv[3][0]*w[2]; + uv[1]= tf->uv[0][1]*w[0] + tf->uv[1][1]*w[1] + tf->uv[3][1]*w[2]; + minabsw = absw; + } + + imapaint_tri_weights(ob, mv[1].co, mv[2].co, mv[3].co, p, w); + absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]); + if(absw < minabsw) { + uv[0]= tf->uv[1][0]*w[0] + tf->uv[2][0]*w[1] + tf->uv[3][0]*w[2]; + uv[1]= tf->uv[1][1]*w[0] + tf->uv[2][1]*w[1] + tf->uv[3][1]*w[2]; + minabsw = absw; + } + } + else { + imapaint_tri_weights(ob, mv[0].co, mv[1].co, mv[2].co, p, w); + absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]); + if(absw < minabsw) { + uv[0]= tf->uv[0][0]*w[0] + tf->uv[1][0]*w[1] + tf->uv[2][0]*w[2]; + uv[1]= tf->uv[0][1]*w[0] + tf->uv[1][1]*w[1] + tf->uv[2][1]*w[2]; + minabsw = absw; + } + } + } + } + + dm->release(dm); +} + +///* returns 0 if not found, otherwise 1 */ +int imapaint_pick_face(ViewContext *vc, Mesh *me, int *mval, unsigned int *index) +{ + if(!me || me->totface==0) + return 0; + + /* sample only on the exact position */ + *index = view3d_sample_backbuf(vc, mval[0], mval[1]); + + if((*index)<=0 || (*index)>(unsigned int)me->totface) + return 0; + + (*index)--; + + return 1; +} + +/* used for both 3d view and image window */ +void paint_sample_color(Scene *scene, ARegion *ar, int x, int y) /* frontbuf */ +{ + VPaint *vp= scene->toolsettings->vpaint; + unsigned int col; + char *cp; + + CLAMP(x, 0, ar->winx); + CLAMP(y, 0, ar->winy); + + glReadBuffer(GL_FRONT); + glReadPixels(x+ar->winrct.xmin, y+ar->winrct.ymin, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &col); + glReadBuffer(GL_BACK); + + cp = (char *)&col; + + if(G.f & (G_VERTEXPAINT|G_WEIGHTPAINT)) { + vp->r= cp[0]/255.0f; + vp->g= cp[1]/255.0f; + vp->b= cp[2]/255.0f; + } + else { + Brush *brush= scene->toolsettings->imapaint.brush; + + if(brush) { + brush->rgb[0]= cp[0]/255.0f; + brush->rgb[1]= cp[1]/255.0f; + brush->rgb[2]= cp[2]/255.0f; + + } + } +} + diff --git a/source/blender/editors/space_view3d/vpaint.c b/source/blender/editors/sculpt_paint/paint_vertex.c similarity index 97% rename from source/blender/editors/space_view3d/vpaint.c rename to source/blender/editors/sculpt_paint/paint_vertex.c index 5d5efbeb091..1623c7feef1 100644 --- a/source/blender/editors/space_view3d/vpaint.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -90,8 +90,6 @@ #include "ED_util.h" #include "ED_view3d.h" -#include "view3d_intern.h" - /* vp->mode */ #define VP_MIX 0 #define VP_ADD 1 @@ -581,48 +579,6 @@ void vpaint_dogamma(Scene *scene) } } -/* used for both 3d view and image window */ -void sample_vpaint(Scene *scene, ARegion *ar) /* frontbuf */ -{ - VPaint *vp= scene->toolsettings->vpaint; - unsigned int col; - int x, y; - short mval[2]; - char *cp; - -// getmouseco_areawin(mval); - x= mval[0]; y= mval[1]; - - if(x<0 || y<0) return; - if(x>=ar->winx || y>=ar->winy) return; - - x+= ar->winrct.xmin; - y+= ar->winrct.ymin; - - glReadBuffer(GL_FRONT); - glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &col); - glReadBuffer(GL_BACK); - - cp = (char *)&col; - - if(G.f & (G_VERTEXPAINT|G_WEIGHTPAINT)) { - vp->r= cp[0]/255.0f; - vp->g= cp[1]/255.0f; - vp->b= cp[2]/255.0f; - } - else { - Brush *brush= scene->toolsettings->imapaint.brush; - - if(brush) { - brush->rgb[0]= cp[0]/255.0f; - brush->rgb[1]= cp[1]/255.0f; - brush->rgb[2]= cp[2]/255.0f; - - } - } - -} - static unsigned int mcol_blend(unsigned int col1, unsigned int col2, int fac) { char *cp1, *cp2, *cp; @@ -1204,12 +1160,12 @@ static int paint_poll_test(bContext *C) return 1; } -void VIEW3D_OT_wpaint_toggle(wmOperatorType *ot) +void PAINT_OT_weight_paint_toggle(wmOperatorType *ot) { /* identifiers */ ot->name= "Weight Paint Mode"; - ot->idname= "VIEW3D_OT_wpaint_toggle"; + ot->idname= "PAINT_OT_weight_paint_toggle"; /* api callbacks */ ot->exec= set_wpaint; @@ -1294,12 +1250,12 @@ static int wpaint_radial_control_exec(bContext *C, wmOperator *op) return ret; } -void VIEW3D_OT_wpaint_radial_control(wmOperatorType *ot) +void PAINT_OT_weight_paint_radial_control(wmOperatorType *ot) { WM_OT_radial_control_partial(ot); ot->name= "Weight Paint Radial Control"; - ot->idname= "VIEW3D_OT_wpaint_radial_control"; + ot->idname= "PAINT_OT_weight_paint_radial_control"; ot->invoke= wpaint_radial_control_invoke; ot->modal= wpaint_radial_control_modal; @@ -1310,12 +1266,12 @@ void VIEW3D_OT_wpaint_radial_control(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -void VIEW3D_OT_vpaint_radial_control(wmOperatorType *ot) +void PAINT_OT_vertex_paint_radial_control(wmOperatorType *ot) { WM_OT_radial_control_partial(ot); ot->name= "Vertex Paint Radial Control"; - ot->idname= "VIEW3D_OT_vpaint_radial_control"; + ot->idname= "PAINT_OT_vertex_paint_radial_control"; ot->invoke= vpaint_radial_control_invoke; ot->modal= vpaint_radial_control_modal; @@ -1635,12 +1591,12 @@ static int wpaint_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -void VIEW3D_OT_wpaint(wmOperatorType *ot) +void PAINT_OT_weight_paint(wmOperatorType *ot) { /* identifiers */ ot->name= "Weight Paint"; - ot->idname= "VIEW3D_OT_wpaint"; + ot->idname= "PAINT_OT_weight_paint"; /* api callbacks */ ot->invoke= wpaint_invoke; @@ -1653,7 +1609,6 @@ void VIEW3D_OT_wpaint(wmOperatorType *ot) } - /* ************ set / clear vertex paint mode ********** */ @@ -1711,12 +1666,12 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */ return OPERATOR_FINISHED; } -void VIEW3D_OT_vpaint_toggle(wmOperatorType *ot) +void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot) { /* identifiers */ ot->name= "Vertex Paint Mode"; - ot->idname= "VIEW3D_OT_vpaint_toggle"; + ot->idname= "PAINT_OT_vertex_paint_toggle"; /* api callbacks */ ot->exec= set_vpaint; @@ -1933,12 +1888,12 @@ static int vpaint_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -void VIEW3D_OT_vpaint(wmOperatorType *ot) +void PAINT_OT_vertex_paint(wmOperatorType *ot) { /* identifiers */ ot->name= "Vertex Paint"; - ot->idname= "VIEW3D_OT_vpaint"; + ot->idname= "PAINT_OT_vertex_paint"; /* api callbacks */ ot->invoke= vpaint_invoke; @@ -1951,4 +1906,3 @@ void VIEW3D_OT_vpaint(wmOperatorType *ot) } - diff --git a/source/blender/editors/sculpt/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c similarity index 99% rename from source/blender/editors/sculpt/sculpt.c rename to source/blender/editors/sculpt_paint/sculpt.c index f3d29989bb8..8987479bbfc 100644 --- a/source/blender/editors/sculpt/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1300,26 +1300,6 @@ static void SCULPT_OT_radial_control(wmOperatorType *ot) /**** Operator for applying a stroke (various attributes including mouse path) using the current brush. ****/ -static void sculpt_load_mats(bglMats *mats, ViewContext *vc) -{ - float cpy[4][4]; - int i, j; - - Mat4MulMat4(cpy, vc->rv3d->viewmat, vc->obact->obmat); - - for(i = 0; i < 4; ++i) { - for(j = 0; j < 4; ++j) { - mats->projection[i*4+j] = vc->rv3d->winmat[i][j]; - mats->modelview[i*4+j] = cpy[i][j]; - } - } - - mats->viewport[0] = vc->ar->winrct.xmin; - mats->viewport[1] = vc->ar->winrct.ymin; - mats->viewport[2] = vc->ar->winx; - mats->viewport[3] = vc->ar->winy; -} - static float unproject_brush_radius(SculptSession *ss, float offset) { float brush_edge[3]; @@ -1363,7 +1343,7 @@ static void sculpt_update_cache_invariants(Sculpt *sd, bContext *C, wmOperator * view3d_set_viewcontext(C, &cache->vc); cache->mats = MEM_callocN(sizeof(bglMats), "sculpt bglMats"); - sculpt_load_mats(cache->mats, &cache->vc); + view3d_get_transformation(&cache->vc, cache->vc.obact, cache->mats); sculpt_update_mesh_elements(C); diff --git a/source/blender/editors/sculpt/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h similarity index 100% rename from source/blender/editors/sculpt/sculpt_intern.h rename to source/blender/editors/sculpt_paint/sculpt_intern.h diff --git a/source/blender/editors/sculpt/stroke.c b/source/blender/editors/sculpt_paint/sculpt_stroke.c similarity index 100% rename from source/blender/editors/sculpt/stroke.c rename to source/blender/editors/sculpt_paint/sculpt_stroke.c diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index ccee97ad605..75ff73de56e 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -62,6 +62,7 @@ #include "DNA_userdef_types.h" #include "DNA_gpencil_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_world_types.h" #include "BKE_action.h" #include "BKE_depsgraph.h" @@ -443,6 +444,25 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) /* determine what needs to be drawn */ switch (ale->type) { + case ANIMTYPE_SCENE: /* scene */ + { + Scene *sce= (Scene *)ale->data; + + group= 4; + indent= 0; + + special= ICON_SCENE_DATA; + + /* only show expand if there are any channels */ + if (EXPANDED_SCEC(sce)) + expand= ICON_TRIA_DOWN; + else + expand= ICON_TRIA_RIGHT; + + sel = SEL_SCEC(sce); + strcpy(name, sce->id.name+2); + } + break; case ANIMTYPE_OBJECT: /* object */ { Base *base= (Base *)ale->data; @@ -453,9 +473,9 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) /* icon depends on object-type */ if (ob->type == OB_ARMATURE) - special= ICON_ARMATURE; + special= ICON_ARMATURE_DATA; else - special= ICON_OBJECT; + special= ICON_OBJECT_DATA; /* only show expand if there are any channels */ if (EXPANDED_OBJC(ob)) @@ -490,7 +510,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) group = 4; indent = 1; - special = ICON_MATERIAL; + special = ICON_MATERIAL_DATA; if (FILTER_MAT_OBJC(ob)) expand = ICON_TRIA_DOWN; @@ -508,7 +528,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) group = 0; indent = 0; - special = ICON_MATERIAL; + special = ICON_MATERIAL_DATA; offset = 21; if (FILTER_MAT_OBJD(ma)) @@ -525,7 +545,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) group = 4; indent = 1; - special = ICON_LAMP; + special = ICON_LAMP_DATA; if (FILTER_LAM_OBJD(la)) expand = ICON_TRIA_DOWN; @@ -541,7 +561,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) group = 4; indent = 1; - special = ICON_CAMERA; + special = ICON_CAMERA_DATA; if (FILTER_CAM_OBJD(ca)) expand = ICON_TRIA_DOWN; @@ -557,7 +577,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) group = 4; indent = 1; - special = ICON_CURVE; + special = ICON_CURVE_DATA; if (FILTER_CUR_OBJD(cu)) expand = ICON_TRIA_DOWN; @@ -573,7 +593,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) group = 4; indent = 1; - special = ICON_EDIT; + special = ICON_SHAPEKEY_DATA; // XXX if (FILTER_SKE_OBJD(key)) expand = ICON_TRIA_DOWN; @@ -584,6 +604,22 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) strcpy(name, "Shape Keys"); } break; + case ANIMTYPE_DSWOR: /* world (dopesheet) expand widget */ + { + World *wo= (World *)ale->data; + + group = 4; + indent = 1; + special = ICON_WORLD_DATA; + + if (FILTER_WOR_SCED(wo)) + expand = ICON_TRIA_DOWN; + else + expand = ICON_TRIA_RIGHT; + + strcpy(name, wo->id.name+2); + } + break; case ANIMTYPE_GROUP: /* action group */ @@ -781,7 +817,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar) /* draw backing strip behind channel name */ if (group == 4) { /* only used in dopesheet... */ - if (ale->type == ANIMTYPE_OBJECT) { + if (ELEM(ale->type, ANIMTYPE_SCENE, ANIMTYPE_OBJECT)) { /* object channel - darker */ UI_ThemeColor(TH_DOPESHEET_CHANNELOB); uiSetRoundBox((expand == ICON_TRIA_DOWN)? (1):(1|8)); @@ -1001,12 +1037,10 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) * start of list offset, and the second is as a correction for the scrollers. */ height= ((items*ACHANNEL_STEP) + (ACHANNEL_HEIGHT*2)); - if (height > (v2d->mask.ymax - v2d->mask.ymin)) { - /* don't use totrect set, as the width stays the same - * (NOTE: this is ok here, the configuration is pretty straightforward) - */ - v2d->tot.ymin= (float)(-height); - } + /* don't use totrect set, as the width stays the same + * (NOTE: this is ok here, the configuration is pretty straightforward) + */ + v2d->tot.ymin= (float)(-height); /* first backdrop strips */ y= (float)(-ACHANNEL_HEIGHT); @@ -1026,6 +1060,12 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) if (ale->datatype != ALE_NONE) { /* determine if channel is selected */ switch (ale->type) { + case ANIMTYPE_SCENE: + { + Scene *sce= (Scene *)ale->data; + sel = SEL_SCEC(sce); + } + break; case ANIMTYPE_OBJECT: { Base *base= (Base *)ale->data; @@ -1056,6 +1096,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) gla2DDrawTranslatePt(di, v2d->cur.xmin, y, &frame1_x, &channel_y); switch (ale->type) { + case ANIMTYPE_SCENE: case ANIMTYPE_OBJECT: { if (sel) glColor4ub(col1b[0], col1b[1], col1b[2], 0x45); @@ -1066,6 +1107,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) case ANIMTYPE_FILLACTD: case ANIMTYPE_FILLMATD: case ANIMTYPE_DSSKEY: + case ANIMTYPE_DSWOR: { if (sel) glColor4ub(col2b[0], col2b[1], col2b[2], 0x45); else glColor4ub(col2b[0], col2b[1], col2b[2], 0x22); @@ -1152,6 +1194,9 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) /* draw 'keyframes' for each specific datatype */ switch (ale->datatype) { + case ALE_SCE: + draw_scene_channel(di, aki, ale->key_data, y); + break; case ALE_OB: draw_object_channel(di, aki, ale->key_data, y); break; diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index d9b752cd30d..68e61d24b62 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -72,6 +72,8 @@ #include "UI_view2d.h" +#include "BIF_transform.h" + #include "ED_anim_api.h" #include "ED_keyframing.h" #include "ED_keyframes_draw.h" @@ -233,9 +235,6 @@ void ACT_OT_view_all (wmOperatorType *ot) /* ************************************************************************** */ /* GENERAL STUFF */ -// TODO: -// - insert key - /* ******************** Copy/Paste Keyframes Operator ************************* */ /* - The copy/paste buffer currently stores a set of temporary F-Curves containing only the keyframes * that were selected in each of the original F-Curves @@ -573,6 +572,265 @@ void ACT_OT_keyframes_paste (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } +/* ******************** Insert Keyframes Operator ************************* */ + +/* defines for insert keyframes tool */ +EnumPropertyItem prop_actkeys_insertkey_types[] = { + {1, "ALL", "All Channels", ""}, + {2, "SEL", "Only Selected Channels", ""}, + {3, "GROUP", "In Active Group", ""}, // xxx not in all cases + {0, NULL, NULL, NULL} +}; + +#if 0 +void insertkey_action(void) +{ + void *data; + short datatype; + + short mode; + float cfra; + + /* get data */ + data= get_action_context(&datatype); + if (data == NULL) return; + cfra = frame_to_float(CFRA); + + if (ELEM(datatype, ACTCONT_ACTION, ACTCONT_DOPESHEET)) { + ListBase act_data = {NULL, NULL}; + bActListElem *ale; + int filter; + + /* ask user what to keyframe */ + if (datatype == ACTCONT_ACTION) + mode = pupmenu("Insert Key%t|All Channels%x1|Only Selected Channels%x2|In Active Group%x3"); + else + mode = pupmenu("Insert Key%t|All Channels%x1|Only Selected Channels%x2"); + if (mode <= 0) return; + + /* filter data */ + filter= (ACTFILTER_VISIBLE | ACTFILTER_FOREDIT | ACTFILTER_ONLYICU ); + if (mode == 2) filter |= ACTFILTER_SEL; + else if (mode == 3) filter |= ACTFILTER_ACTGROUPED; + + actdata_filter(&act_data, filter, data, datatype); + + /* loop through ipo curves retrieved */ + for (ale= act_data.first; ale; ale= ale->next) { + /* verify that this is indeed an ipo curve */ + if ((ale->key_data) && ((ale->owner) || (ale->id))) { + bActionChannel *achan= (ale->ownertype==ACTTYPE_ACHAN) ? ((bActionChannel *)ale->owner) : (NULL); + bConstraintChannel *conchan= (ale->type==ACTTYPE_CONCHAN) ? ale->data : NULL; + IpoCurve *icu= (IpoCurve *)ale->key_data; + ID *id= NULL; + + if (datatype == ACTCONT_ACTION) { + if (ale->owner) + id= ale->owner; + } + else if (datatype == ACTCONT_DOPESHEET) { + if (ale->id) + id= ale->id; + } + + if (id) + insertkey(id, icu->blocktype, ((achan)?(achan->name):(NULL)), ((conchan)?(conchan->name):(NULL)), icu->adrcode, 0); + else + insert_vert_icu(icu, cfra, icu->curval, 0); + } + } + + /* cleanup */ + BLI_freelistN(&act_data); + } + else if (datatype == ACTCONT_SHAPEKEY) { + Key *key= (Key *)data; + IpoCurve *icu; + + /* ask user if they want to insert a keyframe */ + mode = okee("Insert Keyframe?"); + if (mode <= 0) return; + + if (key->ipo) { + for (icu= key->ipo->curve.first; icu; icu=icu->next) { + insert_vert_icu(icu, cfra, icu->curval, 0); + } + } + } + else { + /* this tool is not supported in this mode */ + return; + } +} +#endif + +/* this function is responsible for snapping keyframes to frame-times */ +static void insert_action_keys(bAnimContext *ac, short mode) +{ + ListBase anim_data = {NULL, NULL}; + bAnimListElem *ale; + int filter; + + Scene *scene= ac->scene; + float cfra= (float)CFRA; + short flag = 0; + + /* filter data */ + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY); + if (mode == 2) filter |= ANIMFILTER_SEL; + else if (mode == 3) filter |= ANIMFILTER_ACTGROUPED; + + ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); + + /* init keyframing flag */ + if (IS_AUTOKEY_FLAG(AUTOMATKEY)) flag |= INSERTKEY_MATRIX; + if (IS_AUTOKEY_FLAG(INSERTNEEDED)) flag |= INSERTKEY_NEEDED; + // if (IS_AUTOKEY_MODE(EDITKEYS)) flag |= INSERTKEY_REPLACE; + + /* insert keyframes */ + for (ale= anim_data.first; ale; ale= ale->next) { + //Object *nob= ANIM_nla_mapping_get(ac, ale); + FCurve *fcu= (FCurve *)ale->key_data; + + /* adjust current frame for NLA-scaling */ + //if (nob) + // cfra= get_action_frame(nob, CFRA); + //else + // cfra= (float)CFRA; + + /* if there's an id */ + if (ale->id) + insertkey(ale->id, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); + else + insert_vert_fcurve(fcu, cfra, fcu->curval, 0); + } + + BLI_freelistN(&anim_data); +} + +/* ------------------- */ + +static int actkeys_insertkey_exec(bContext *C, wmOperator *op) +{ + bAnimContext ac; + short mode; + + /* get editor data */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return OPERATOR_CANCELLED; + if (ac.datatype == ANIMCONT_GPENCIL) + return OPERATOR_CANCELLED; + + /* get snapping mode */ + mode= RNA_enum_get(op->ptr, "type"); + + /* snap keyframes */ + insert_action_keys(&ac, mode); + + /* validate keyframes after editing */ + ANIM_editkeyframes_refresh(&ac); + + /* set notifier tha things have changed */ + ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); + + return OPERATOR_FINISHED; +} + +void ACT_OT_keyframes_insert (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Insert Keyframes"; + ot->idname= "ACT_OT_keyframes_insert"; + + /* api callbacks */ + ot->invoke= WM_menu_invoke; + ot->exec= actkeys_insertkey_exec; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* id-props */ + RNA_def_enum(ot->srna, "type", prop_actkeys_insertkey_types, 0, "Type", ""); +} + +/* ******************** Duplicate Keyframes Operator ************************* */ + +static void duplicate_action_keys (bAnimContext *ac) +{ + ListBase anim_data = {NULL, NULL}; + bAnimListElem *ale; + int filter; + + /* filter data */ + if (ac->datatype == ANIMCONT_GPENCIL) + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT); + else + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY); + ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); + + /* loop through filtered data and delete selected keys */ + for (ale= anim_data.first; ale; ale= ale->next) { + //if (ale->type == ANIMTYPE_GPLAYER) + // delete_gplayer_frames((bGPDlayer *)ale->data); + //else + duplicate_fcurve_keys((FCurve *)ale->key_data); + } + + /* free filtered list */ + BLI_freelistN(&anim_data); +} + +/* ------------------- */ + +static int actkeys_duplicate_exec(bContext *C, wmOperator *op) +{ + bAnimContext ac; + + /* get editor data */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return OPERATOR_CANCELLED; + + /* duplicate keyframes */ + duplicate_action_keys(&ac); + + /* validate keyframes after editing */ + ANIM_editkeyframes_refresh(&ac); + + /* set notifier tha things have changed */ + ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); + + return OPERATOR_FINISHED; // xxx - start transform +} + +static int actkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + actkeys_duplicate_exec(C, op); + + RNA_int_set(op->ptr, "mode", TFM_TIME_TRANSLATE); + WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr); + + return OPERATOR_FINISHED; +} + +void ACT_OT_keyframes_duplicate (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Duplicate Keyframes"; + ot->idname= "ACT_OT_keyframes_duplicate"; + + /* api callbacks */ + ot->invoke= actkeys_duplicate_invoke; + ot->exec= actkeys_duplicate_exec; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* to give to transform */ + RNA_def_int(ot->srna, "mode", TFM_TIME_TRANSLATE, 0, INT_MAX, "Mode", "", 0, INT_MAX); +} + /* ******************** Delete Keyframes Operator ************************* */ static void delete_action_keys (bAnimContext *ac) diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c index 19e7543c328..9723a7f7b03 100644 --- a/source/blender/editors/space_action/action_header.c +++ b/source/blender/editors/space_action/action_header.c @@ -1676,13 +1676,13 @@ void action_header_buttons(const bContext *C, ARegion *ar) xco += 5; uiBlockBeginAlign(block); - //uiDefIconButBitI(block, TOGN, ADS_FILTER_NOOBJ, B_REDR, ICON_OBJECT, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Non-Armature Objects"); - //uiDefIconButBitI(block, TOGN, ADS_FILTER_NOARM, B_REDR, ICON_ARMATURE, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Armature Objects"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_EDIT, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display ShapeKeys"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Materials"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Lamps"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Cameras"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Curves"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Scene Animation"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOWOR, B_REDR, ICON_WORLD_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display World Animation"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_SHAPEKEY_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display ShapeKeys"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Materials"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Lamps"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Cameras"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Curves"); uiBlockEndAlign(block); xco += 30; } diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h index 591aecb061a..7d21ac263c3 100644 --- a/source/blender/editors/space_action/action_intern.h +++ b/source/blender/editors/space_action/action_intern.h @@ -83,6 +83,8 @@ void ACT_OT_view_all(struct wmOperatorType *ot); void ACT_OT_keyframes_copy(struct wmOperatorType *ot); void ACT_OT_keyframes_paste(struct wmOperatorType *ot); +void ACT_OT_keyframes_insert(struct wmOperatorType *ot); +void ACT_OT_keyframes_duplicate(struct wmOperatorType *ot); void ACT_OT_keyframes_delete(struct wmOperatorType *ot); void ACT_OT_keyframes_clean(struct wmOperatorType *ot); void ACT_OT_keyframes_sample(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index a07e38c4361..081b5539524 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -78,6 +78,8 @@ void action_operatortypes(void) WM_operatortype_append(ACT_OT_keyframes_sample); WM_operatortype_append(ACT_OT_keyframes_clean); WM_operatortype_append(ACT_OT_keyframes_delete); + WM_operatortype_append(ACT_OT_keyframes_duplicate); + WM_operatortype_append(ACT_OT_keyframes_insert); WM_operatortype_append(ACT_OT_keyframes_copy); WM_operatortype_append(ACT_OT_keyframes_paste); @@ -131,6 +133,9 @@ static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) WM_keymap_add_item(keymap, "ACT_OT_keyframes_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "ACT_OT_keyframes_delete", DELKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "ACT_OT_keyframes_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "ACT_OT_keyframes_insert", IKEY, KM_PRESS, 0, 0); + /* copy/paste */ WM_keymap_add_item(keymap, "ACT_OT_keyframes_copy", CKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "ACT_OT_keyframes_paste", VKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index b9bcc628160..311ac8ec6b4 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -54,6 +54,7 @@ #include "DNA_userdef_types.h" #include "DNA_gpencil_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_world_types.h" #include "RNA_access.h" #include "RNA_define.h" @@ -763,6 +764,7 @@ static EnumPropertyItem prop_leftright_select_types[] = { /* option 1) select keyframe directly under mouse */ static void mouse_action_keys (bAnimContext *ac, int mval[2], short selectmode) { + Scene *sce= NULL; Object *ob= NULL; bDopeSheet *ads= NULL; bAction *act= NULL; @@ -820,6 +822,9 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short selectmode) case ANIMTYPE_OBJECT: ob= ((Base *)anim_channel)->object; break; + case ANIMTYPE_SCENE: + sce= (Scene *)anim_channel; + break; case ANIMTYPE_GPLAYER: gpl= (bGPDlayer *)anim_channel; break; @@ -887,6 +892,28 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short selectmode) /* 'Sub-Object' animation data */ // TODO... } + else if (sce) { + World *wo= sce->world; + AnimData *adt; + + /* Scene's own animation */ + if (sce->adt && sce->adt->action) { + adt= sce->adt; + act= adt->action; + + for (fcu= act->curves.first; fcu; fcu= fcu->next) + ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); + } + + /* World */ + if (wo && wo->adt && wo->adt->action) { + adt= wo->adt; + act= adt->action; + + for (fcu= act->curves.first; fcu; fcu= fcu->next) + ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); + } + } //else if (gpl) // select_gpencil_frame(gpl, (int)selx, selectmode); } diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 86d29840be6..9a4d1f329e8 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -45,6 +45,7 @@ #include "ED_mesh.h" #include "ED_markers.h" #include "ED_object.h" +#include "ED_particle.h" #include "ED_sculpt.h" #include "ED_screen.h" #include "ED_space_api.h" @@ -82,6 +83,8 @@ void ED_spacetypes_init(void) ED_operatortypes_mesh(); ED_operatortypes_sculpt(); ED_operatortypes_uvedit(); + ED_operatortypes_paint(); + ED_operatortypes_particle(); ED_operatortypes_curve(); ED_operatortypes_armature(); ED_marker_operatortypes(); @@ -110,6 +113,7 @@ void ED_spacetypes_keymap(wmWindowManager *wm) ED_keymap_uvedit(wm); ED_keymap_curve(wm); ED_keymap_armature(wm); + ED_keymap_particle(wm); ED_marker_keymap(wm); UI_view2d_keymap(wm); diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index abccb1aa733..515083c9fec 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -138,10 +138,10 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) uiBlockBeginAlign(block); uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_GAME, xco, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_LOGIC, 0, 0, "Logic (F4) "); uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCRIPT, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_SCRIPT, 0, 0, "Script "); - uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_MATERIAL_DEHLT,xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_SHADING, 0, 0, "Shading (F5) "); - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_OBJECT, 0, 0, "Object (F7) "); + uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_MATERIAL_DATA,xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_SHADING, 0, 0, "Shading (F5) "); + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_OBJECT, 0, 0, "Object (F7) "); uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_EDIT, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_EDITING, 0, 0, "Editing (F9) "); - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE_DEHLT, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_SCENE, 0, 0, "Scene (F10) "); + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)CONTEXT_SCENE, 0, 0, "Scene (F10) "); xco+= XIC; @@ -158,7 +158,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) break; case CONTEXT_OBJECT: uiBlockBeginAlign(block); - uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_OBJECT]), 1.0, (float)TAB_OBJECT_OBJECT, 0, 0, "Object buttons "); + uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_OBJECT]), 1.0, (float)TAB_OBJECT_OBJECT, 0, 0, "Object buttons "); uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_PHYSICS, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_OBJECT]), 1.0, (float)TAB_OBJECT_PHYSICS, 0, 0, "Physics buttons"); uiDefIconButC(block, ROW, B_CONTEXT_SWITCH, ICON_PARTICLES, xco+=XIC, yco, XIC, YIC, &(sbuts->tab[CONTEXT_OBJECT]), 1.0, (float)TAB_OBJECT_PARTICLE, 0, 0, "Particle buttons"); diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 2c839adc451..29faf660575 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -83,7 +83,7 @@ /* button events */ enum { B_REDR = 0, - B_FS_LOAD, + B_FS_EXEC, B_FS_CANCEL, B_FS_PARENT, } eFile_ButEvents; @@ -91,8 +91,8 @@ enum { static void do_file_buttons(bContext *C, void *arg, int event) { switch(event) { - case B_FS_LOAD: - file_load_exec(C, NULL); /* file_ops.c */ + case B_FS_EXEC: + file_exec(C, NULL); /* file_ops.c */ break; case B_FS_CANCEL: file_cancel_exec(C, NULL); /* file_ops.c */ @@ -103,6 +103,7 @@ static void do_file_buttons(bContext *C, void *arg, int event) } } +/* note; this function uses pixelspace (0, 0, winx, winy), not view2d */ void file_draw_buttons(const bContext *C, ARegion *ar) { SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C); @@ -118,14 +119,14 @@ void file_draw_buttons(const bContext *C, ARegion *ar) int filebuty1, filebuty2; - float xmin = ar->v2d.mask.xmin + 10; - float xmax = ar->v2d.mask.xmax - 10; + float xmin = 10; + float xmax = ar->winx - 10; - filebuty1= ar->v2d.mask.ymax - IMASEL_BUTTONS_HEIGHT; + filebuty1= ar->winy - IMASEL_BUTTONS_HEIGHT; filebuty2= filebuty1+IMASEL_BUTTONS_HEIGHT/2 -6; /* HEADER */ - sprintf(name, "win %d", 1); // XXX sa-win??? + sprintf(name, "win %p", ar); block = uiBeginBlock(C, ar, name, UI_EMBOSS, UI_HELV); uiBlockSetHandleFunc(block, do_file_buttons, NULL); @@ -136,7 +137,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) /* space available for load/save buttons? */ slen = UI_GetStringWidth(G.font, sfile->params->title, 0); loadbutton= slen > 60 ? slen + 20 : MAX2(80, 20+UI_GetStringWidth(G.font, params->title, 0)); - if(ar->v2d.cur.xmax-ar->v2d.cur.xmin > loadbutton+20) { + if(ar->winx > loadbutton+20) { if(params->title[0]==0) { loadbutton= 0; } @@ -158,7 +159,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) if(loadbutton) { uiSetCurFont(block, UI_HELV); - uiDefBut(block, BUT, B_FS_LOAD, params->title, xmax-loadbutton, filebuty2, loadbutton, 21, params->dir, 0.0, (float)FILE_MAXFILE-1, 0, 0, ""); + uiDefBut(block, BUT, B_FS_EXEC, params->title, xmax-loadbutton, filebuty2, loadbutton, 21, params->dir, 0.0, (float)FILE_MAXFILE-1, 0, 0, ""); uiDefBut(block, BUT, B_FS_CANCEL, "Cancel", xmax-loadbutton, filebuty1, loadbutton, 21, params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0, ""); } diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h index d4cb80c1b39..e47387a2d22 100644 --- a/source/blender/editors/space_file/file_intern.h +++ b/source/blender/editors/space_file/file_intern.h @@ -49,17 +49,17 @@ void file_draw_fsmenu(const bContext *C, ARegion *ar); struct wmOperatorType; struct wmOperator; struct wmEvent; -void ED_FILE_OT_highlight(struct wmOperatorType *ot); -void ED_FILE_OT_select(struct wmOperatorType *ot); -void ED_FILE_OT_select_all(struct wmOperatorType *ot); -void ED_FILE_OT_border_select(struct wmOperatorType *ot); -void ED_FILE_OT_select_bookmark(struct wmOperatorType *ot); -void ED_FILE_OT_loadimages(struct wmOperatorType *ot); -void ED_FILE_OT_load(struct wmOperatorType *ot); -void ED_FILE_OT_cancel(struct wmOperatorType *ot); -void ED_FILE_OT_parent(struct wmOperatorType *ot); +void FILE_OT_highlight(struct wmOperatorType *ot); +void FILE_OT_select(struct wmOperatorType *ot); +void FILE_OT_select_all(struct wmOperatorType *ot); +void FILE_OT_border_select(struct wmOperatorType *ot); +void FILE_OT_select_bookmark(struct wmOperatorType *ot); +void FILE_OT_loadimages(struct wmOperatorType *ot); +void FILE_OT_exec(struct wmOperatorType *ot); +void FILE_OT_cancel(struct wmOperatorType *ot); +void FILE_OT_parent(struct wmOperatorType *ot); -int file_load_exec(bContext *C, struct wmOperator *unused); +int file_exec(bContext *C, struct wmOperator *unused); int file_cancel_exec(bContext *C, struct wmOperator *unused); int file_parent_exec(bContext *C, struct wmOperator *unused); int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my); diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 2a95a1e15a1..1cedc7b0282 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -45,6 +45,7 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "UI_interface.h" #include "UI_view2d.h" #include "WM_api.h" @@ -219,11 +220,11 @@ static int file_border_select_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ED_FILE_OT_border_select(wmOperatorType *ot) +void FILE_OT_border_select(wmOperatorType *ot) { /* identifiers */ ot->name= "Activate/Select File"; - ot->idname= "ED_FILE_OT_border_select"; + ot->idname= "FILE_OT_border_select"; /* api callbacks */ ot->invoke= WM_border_select_invoke; @@ -258,11 +259,11 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; } -void ED_FILE_OT_select(wmOperatorType *ot) +void FILE_OT_select(wmOperatorType *ot) { /* identifiers */ ot->name= "Activate/Select File"; - ot->idname= "ED_FILE_OT_select"; + ot->idname= "FILE_OT_select"; /* api callbacks */ ot->invoke= file_select_invoke; @@ -302,11 +303,11 @@ static int file_select_all_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; } -void ED_FILE_OT_select_all(wmOperatorType *ot) +void FILE_OT_select_all(wmOperatorType *ot) { /* identifiers */ ot->name= "Select/Deselect all files"; - ot->idname= "ED_FILE_OT_select_all"; + ot->idname= "FILE_OT_select_all"; /* api callbacks */ ot->invoke= file_select_all_invoke; @@ -368,11 +369,11 @@ static int bookmark_select_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; } -void ED_FILE_OT_select_bookmark(wmOperatorType *ot) +void FILE_OT_select_bookmark(wmOperatorType *ot) { /* identifiers */ ot->name= "Select Directory"; - ot->idname= "ED_FILE_OT_select_bookmark"; + ot->idname= "FILE_OT_select_bookmark"; /* api callbacks */ ot->invoke= bookmark_select_invoke; @@ -393,12 +394,12 @@ static int loadimages_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; } -void ED_FILE_OT_loadimages(wmOperatorType *ot) +void FILE_OT_loadimages(wmOperatorType *ot) { /* identifiers */ ot->name= "Load Images"; - ot->idname= "ED_FILE_OT_loadimages"; + ot->idname= "FILE_OT_loadimages"; /* api callbacks */ ot->invoke= loadimages_invoke; @@ -441,11 +442,11 @@ static int file_highlight_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; } -void ED_FILE_OT_highlight(struct wmOperatorType *ot) +void FILE_OT_highlight(struct wmOperatorType *ot) { /* identifiers */ ot->name= "Highlight File"; - ot->idname= "ED_FILE_OT_highlight"; + ot->idname= "FILE_OT_highlight"; /* api callbacks */ ot->invoke= file_highlight_invoke; @@ -456,64 +457,55 @@ int file_cancel_exec(bContext *C, wmOperator *unused) { SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C); - if(sfile->op) { - WM_operator_free(sfile->op); - sfile->op = NULL; - } - ED_screen_full_prevspace(C); + WM_event_fileselect_event(C, sfile->op, EVT_FILESELECT_CANCEL); + sfile->op = NULL; return OPERATOR_FINISHED; } -void ED_FILE_OT_cancel(struct wmOperatorType *ot) +void FILE_OT_cancel(struct wmOperatorType *ot) { /* identifiers */ ot->name= "Cancel File Load"; - ot->idname= "ED_FILE_OT_cancel"; + ot->idname= "FILE_OT_cancel"; /* api callbacks */ ot->exec= file_cancel_exec; ot->poll= ED_operator_file_active; } - -int file_load_exec(bContext *C, wmOperator *unused) +/* sends events now, so things get handled on windowqueue level */ +int file_exec(bContext *C, wmOperator *unused) { SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C); char name[FILE_MAX]; - ED_screen_full_prevspace(C); - if(sfile->op) { wmOperator *op= sfile->op; - /* if load .blend, all UI pointers after exec are invalid! */ - /* but, operator can be freed still */ - sfile->op = NULL; BLI_strncpy(name, sfile->params->dir, sizeof(name)); strcat(name, sfile->params->file); RNA_string_set(op->ptr, "filename", name); - op->type->exec(C, op); - - WM_operator_free(op); + WM_event_fileselect_event(C, op, EVT_FILESELECT_EXEC); } return OPERATOR_FINISHED; } -void ED_FILE_OT_load(struct wmOperatorType *ot) +void FILE_OT_exec(struct wmOperatorType *ot) { /* identifiers */ - ot->name= "Load File"; - ot->idname= "ED_FILE_OT_load"; + ot->name= "Execute File Window"; + ot->idname= "FILE_OT_exec"; /* api callbacks */ - ot->exec= file_load_exec; + ot->exec= file_exec; ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ } + int file_parent_exec(bContext *C, wmOperator *unused) { SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C); @@ -530,11 +522,11 @@ int file_parent_exec(bContext *C, wmOperator *unused) } -void ED_FILE_OT_parent(struct wmOperatorType *ot) +void FILE_OT_parent(struct wmOperatorType *ot) { /* identifiers */ ot->name= "Parent File"; - ot->idname= "ED_FILE_OT_parent"; + ot->idname= "FILE_OT_parent"; /* api callbacks */ ot->exec= file_parent_exec; diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index fe681e246ce..48f501f0173 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -125,47 +125,31 @@ static void file_free(SpaceLink *sl) MEM_freeN(sfile->params); sfile->params= NULL; } - - if (sfile->op) { - WM_operator_free(sfile->op); - } } -/* spacetype; init callback */ +/* spacetype; init callback, area size changes, screen set, etc */ static void file_init(struct wmWindowManager *wm, ScrArea *sa) { - SpaceFile *sfile= sa->spacedata.first; /* XXX get through context? */ - if (sfile->params) { - ED_fileselect_reset_params(sfile); - } - if (sfile->files) { - filelist_free(sfile->files); - filelist_freelib(sfile->files); - MEM_freeN(sfile->files); - sfile->files= NULL; - } } + static SpaceLink *file_duplicate(SpaceLink *sl) { SpaceFile *sfileo= (SpaceFile*)sl; SpaceFile *sfilen= MEM_dupallocN(sl); /* clear or remove stuff from old */ - sfilen->op = NULL; // XXX check if operator can be duplicated + sfilen->op = NULL; /* file window doesn't own operators */ - sfilen->params= MEM_dupallocN(sfileo->params); - if (!sfilen->params) { - sfilen->params= MEM_callocN(sizeof(FileSelectParams), "fileselparams"); - ED_fileselect_set_params(sfilen, FILE_UNIX, "", "/", 0, 0, 0); - sfilen->params->pupmenu = NULL; - } - sfilen->files = filelist_new(); - filelist_setdir(sfilen->files, sfilen->params->dir); - filelist_settype(sfilen->files, sfilen->params->type); - + + if(sfileo->params) { + sfilen->params= MEM_dupallocN(sfileo->params); + + filelist_setdir(sfilen->files, sfilen->params->dir); + filelist_settype(sfilen->files, sfilen->params->type); + } return (SpaceLink *)sfilen; } @@ -180,6 +164,8 @@ static void file_main_area_init(wmWindowManager *wm, ARegion *ar) /* own keymap */ keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0); /* XXX weak? */ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); + + } static void file_main_area_draw(const bContext *C, ARegion *ar) @@ -219,19 +205,26 @@ static void file_main_area_draw(const bContext *C, ARegion *ar) glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); + /* Allow dynamically sliders to be set, saves notifiers etc. */ + if (sfile->params && sfile->params->display) + v2d->scroll = V2D_SCROLL_RIGHT; + else + v2d->scroll = V2D_SCROLL_BOTTOM; + /* v2d has initialized flag, so this call will only set the mask correct */ + UI_view2d_region_reinit(v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); + /* sets tile/border settings in sfile */ file_calc_previews(C, ar); + /* set view */ + UI_view2d_view_ortho(C, v2d); + /* on first read, find active file */ if (params->active_file == -1) { wmEvent *event= CTX_wm_window(C)->eventstate; file_hilight_set(sfile, ar, event->x - ar->winrct.xmin, event->y - ar->winrct.ymin); - } - /* data... */ - UI_view2d_view_ortho(C, v2d); - if (params->display) { file_draw_previews(C, ar); } else { @@ -251,31 +244,31 @@ static void file_main_area_draw(const bContext *C, ARegion *ar) void file_operatortypes(void) { - WM_operatortype_append(ED_FILE_OT_select); - WM_operatortype_append(ED_FILE_OT_select_all); - WM_operatortype_append(ED_FILE_OT_border_select); - WM_operatortype_append(ED_FILE_OT_select_bookmark); - WM_operatortype_append(ED_FILE_OT_loadimages); - WM_operatortype_append(ED_FILE_OT_highlight); - WM_operatortype_append(ED_FILE_OT_load); - WM_operatortype_append(ED_FILE_OT_cancel); - WM_operatortype_append(ED_FILE_OT_parent); + WM_operatortype_append(FILE_OT_select); + WM_operatortype_append(FILE_OT_select_all); + WM_operatortype_append(FILE_OT_border_select); + WM_operatortype_append(FILE_OT_select_bookmark); + WM_operatortype_append(FILE_OT_loadimages); + WM_operatortype_append(FILE_OT_highlight); + WM_operatortype_append(FILE_OT_exec); + WM_operatortype_append(FILE_OT_cancel); + WM_operatortype_append(FILE_OT_parent); } /* NOTE: do not add .blend file reading on this level */ void file_keymap(struct wmWindowManager *wm) { ListBase *keymap= WM_keymap_listbase(wm, "File", SPACE_FILE, 0); - WM_keymap_add_item(keymap, "ED_FILE_OT_select", LEFTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "ED_FILE_OT_select_all", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "ED_FILE_OT_border_select", BKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "ED_FILE_OT_highlight", MOUSEMOVE, KM_ANY, 0, 0); - WM_keymap_add_item(keymap, "ED_FILE_OT_parent", PKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_select_all", AKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_border_select", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_highlight", MOUSEMOVE, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_parent", PKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "ED_FILE_OT_loadimages", TIMER1, KM_ANY, KM_ANY, 0); + WM_keymap_add_item(keymap, "FILE_OT_loadimages", TIMER1, KM_ANY, KM_ANY, 0); keymap= WM_keymap_listbase(wm, "FileBookmark", SPACE_FILE, 0); - WM_keymap_add_item(keymap, "ED_FILE_OT_select_bookmark", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_select_bookmark", LEFTMOUSE, KM_PRESS, 0, 0); } diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 86316d93214..04cf54e67bc 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -58,6 +58,7 @@ #include "DNA_userdef_types.h" #include "DNA_view2d_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_world_types.h" #include "BKE_animsys.h" #include "BKE_context.h" @@ -239,7 +240,7 @@ void draw_fcurve_vertices (SpaceIpo *sipo, ARegion *ar, FCurve *fcu) glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE)); /* draw the two handles first (if they're shown, and if curve is being edited) */ - if ((fcu->flag & FCURVE_PROTECTED)==0 && (sipo->flag & SIPO_NOHANDLES)==0) { + if ((fcu->flag & FCURVE_PROTECTED)==0 && (fcu->flag & FCURVE_INT_VALUES)==0 && (sipo->flag & SIPO_NOHANDLES)==0) { set_fcurve_vertex_color(sipo, fcu, 0); draw_fcurve_vertices_handles(fcu, v2d, 0); @@ -267,7 +268,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, ARegion *ar, FCurve *fcu) int sel, b; /* don't draw handle lines if handles are not shown */ - if ((sipo->flag & SIPO_NOHANDLES) || (fcu->flag & FCURVE_PROTECTED)) + if ((sipo->flag & SIPO_NOHANDLES) || (fcu->flag & FCURVE_PROTECTED) || (fcu->flag & FCURVE_INT_VALUES)) return; /* slightly hacky, but we want to draw unselected points before selected ones*/ @@ -420,7 +421,7 @@ static void draw_fcurve_repeat (FCurve *fcu, View2D *v2d, float cycxofs, float c v1[0]= v2d->cur.xmin; /* y-value depends on the interpolation */ - if ((fcu->extend==FCURVE_EXTRAPOLATE_CONSTANT) || (prevbezt->ipo==BEZT_IPO_CONST) || (fcu->totvert==1)) { + if ((fcu->extend==FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (prevbezt->ipo==BEZT_IPO_CONST) || (fcu->totvert==1)) { /* just extend across the first keyframe's value */ v1[1]= prevbezt->vec[1][1]; } @@ -451,7 +452,7 @@ static void draw_fcurve_repeat (FCurve *fcu, View2D *v2d, float cycxofs, float c /* draw curve between first and last keyframe (if there are enough to do so) */ // XXX this doesn't take into account modifiers, or sample data while (b--) { - if (prevbezt->ipo==BEZT_IPO_CONST) { + if ((fcu->flag & FCURVE_INT_VALUES) || (prevbezt->ipo==BEZT_IPO_CONST)) { /* Constant-Interpolation: draw segment between previous keyframe and next, but holding same value */ v1[0]= prevbezt->vec[1][0]+cycxofs; v1[1]= prevbezt->vec[1][1]+cycyofs; @@ -527,7 +528,7 @@ static void draw_fcurve_repeat (FCurve *fcu, View2D *v2d, float cycxofs, float c v1[0]= v2d->cur.xmax; /* y-value depends on the interpolation */ - if ((fcu->extend==FCURVE_EXTRAPOLATE_CONSTANT) || (prevbezt->ipo==BEZT_IPO_CONST) || (fcu->totvert==1)) { + if ((fcu->extend==FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (prevbezt->ipo==BEZT_IPO_CONST) || (fcu->totvert==1)) { /* based on last keyframe's value */ v1[1]= prevbezt->vec[1][1]; } @@ -685,18 +686,15 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) bAnimListElem *ale; int filter; - unsigned int col; - int items, i; - /* build list of curves to draw */ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CURVESONLY|ANIMFILTER_CURVEVISIBLE); - items= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); + ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* for each curve: * draw curve, then handle-lines, and finally vertices in this order so that * the data will be layered correctly */ - for (ale=anim_data.first, i=0; ale; ale=ale->next, i++) { + for (ale=anim_data.first; ale; ale=ale->next) { FCurve *fcu= (FCurve *)ale->key_data; Object *nob= ANIM_nla_mapping_get(ac, ale); float fac=0.0f; // dummy var @@ -705,7 +703,12 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) if (nob) ANIM_nla_mapping_apply_fcurve(nob, ale->key_data, 0, 0); - /* draw curve - we currently calculate colour on the fly, but that should probably be done in advance instead */ + /* draw curve - if there's an active modifier (or a stack of modifiers) drawing these takes presidence, + * unless modifiers in use will not alter any of the values within the keyframed area... + */ + + + /* draw curve - as defined by keyframes */ if ( ((fcu->bezt) || (fcu->fpt)) && (fcu->totvert) ) { /* set color/drawing style for curve itself */ if ( ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) || (fcu->flag & FCURVE_PROTECTED) ) { @@ -718,9 +721,8 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) UI_ThemeColorShade(TH_HEADER, 50); } else { - // XXX color calculation here really needs to be done in advance instead - col= ipo_rainbow(i, items); - cpack(col); + /* set whatever color the curve has set */ + glColor3fv(fcu->color); } /* draw F-Curve */ @@ -767,7 +769,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) View2D *v2d= &ar->v2d; float x= 0.0f, y= 0.0f, height; - int items; + int items, i=0; /* build list of channels to draw */ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CHANNELS); @@ -789,12 +791,12 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) } /* XXX I would call the below line! (ton) */ - /* UI_view2d_totRect_set(v2d, ar->type->minsizex, height); */ + UI_view2d_totRect_set(v2d, ar->winx, height); /* loop through channels, and set up drawing depending on their type */ y= (float)ACHANNEL_FIRST; - for (ale= anim_data.first; ale; ale= ale->next) { + for (ale= anim_data.first, i=0; ale; ale= ale->next, i++) { const float yminc= (float)(y - ACHANNEL_HEIGHT_HALF); const float ymaxc= (float)(y + ACHANNEL_HEIGHT_HALF); @@ -809,6 +811,25 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) /* determine what needs to be drawn */ switch (ale->type) { + case ANIMTYPE_SCENE: /* scene */ + { + Scene *sce= (Scene *)ale->data; + + group= 4; + indent= 0; + + special= ICON_SCENE_DATA; + + /* only show expand if there are any channels */ + if (EXPANDED_SCEC(sce)) + expand= ICON_TRIA_DOWN; + else + expand= ICON_TRIA_RIGHT; + + sel = SEL_SCEC(sce); + strcpy(name, sce->id.name+2); + } + break; case ANIMTYPE_OBJECT: /* object */ { Base *base= (Base *)ale->data; @@ -819,9 +840,9 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) /* icon depends on object-type */ if (ob->type == OB_ARMATURE) - special= ICON_ARMATURE; + special= ICON_ARMATURE_DATA; else - special= ICON_OBJECT; + special= ICON_OBJECT_DATA; /* only show expand if there are any channels */ if (EXPANDED_OBJC(ob)) @@ -856,7 +877,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) group = 4; indent= 1; - special= ICON_IPO_DEHLT; + special= ICON_ANIM_DATA; if (EXPANDED_DRVD(adt)) expand= ICON_TRIA_DOWN; @@ -872,7 +893,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) group = 4; indent = 1; - special = ICON_MATERIAL; + special = ICON_MATERIAL_DATA; if (FILTER_MAT_OBJC(ob)) expand = ICON_TRIA_DOWN; @@ -890,7 +911,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) group = 0; indent = 0; - special = ICON_MATERIAL; + special = ICON_MATERIAL_DATA; offset = 21; if (FILTER_MAT_OBJD(ma)) @@ -907,7 +928,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) group = 4; indent = 1; - special = ICON_LAMP; + special = ICON_LAMP_DATA; if (FILTER_LAM_OBJD(la)) expand = ICON_TRIA_DOWN; @@ -923,7 +944,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) group = 4; indent = 1; - special = ICON_CAMERA; + special = ICON_CAMERA_DATA; if (FILTER_CAM_OBJD(ca)) expand = ICON_TRIA_DOWN; @@ -939,7 +960,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) group = 4; indent = 1; - special = ICON_CURVE; + special = ICON_CURVE_DATA; if (FILTER_CUR_OBJD(cu)) expand = ICON_TRIA_DOWN; @@ -955,7 +976,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) group = 4; indent = 1; - special = ICON_EDIT; + special = ICON_SHAPEKEY_DATA; if (FILTER_SKE_OBJD(key)) expand = ICON_TRIA_DOWN; @@ -966,7 +987,23 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) strcpy(name, "Shape Keys"); } break; + case ANIMTYPE_DSWOR: /* world (dopesheet) expand widget */ + { + World *wo= (World *)ale->data; + group = 4; + indent = 1; + special = ICON_WORLD_DATA; + + if (FILTER_WOR_SCED(wo)) + expand = ICON_TRIA_DOWN; + else + expand = ICON_TRIA_RIGHT; + + strcpy(name, wo->id.name+2); + } + break; + case ANIMTYPE_GROUP: /* action group */ { @@ -1003,7 +1040,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) group= (fcu->grp) ? 1 : 0; grp= fcu->grp; - + switch (ale->ownertype) { case ANIMTYPE_NONE: /* no owner */ case ANIMTYPE_FCURVE: @@ -1021,11 +1058,10 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) } /* for now, 'special' (i.e. in front of name) is used to show visibility status */ - // XXX these 'blank' icons are currently checkboxes if (fcu->flag & FCURVE_VISIBLE) - special= ICON_BLANK012; + special= ICON_CHECKBOX_HLT; else - special= ICON_BLANK011; + special= ICON_CHECKBOX_DEHLT; if (fcu->flag & FCURVE_MUTED) mute = ICON_MUTE_IPO_ON; @@ -1067,7 +1103,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) /* draw backing strip behind channel name */ if (group == 4) { /* only used in dopesheet... */ - if (ale->type == ANIMTYPE_OBJECT) { + if (ELEM(ale->type, ANIMTYPE_SCENE, ANIMTYPE_OBJECT)) { /* object channel - darker */ UI_ThemeColor(TH_DOPESHEET_CHANNELOB); uiSetRoundBox((expand == ICON_TRIA_DOWN)? (1):(1|8)); @@ -1105,25 +1141,11 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) gl_round_box(GL_POLYGON, x+offset, yminc, (float)ACHANNEL_NAMEWIDTH, ymaxc, 8); } else { - /* for normal channels - * - use 3 shades of color group/standard color for 3 indention level - * - only use group colors if allowed to, and if actually feasible - */ - if ((grp) && (grp->customCol)) - { - char cp[3]; - - if (indent == 2) { - VECCOPY(cp, grp->cs.solid); - } - else if (indent == 1) { - VECCOPY(cp, grp->cs.select); - } - else { - VECCOPY(cp, grp->cs.active); - } - - glColor3ub(cp[0], cp[1], cp[2]); + /* most of the time, only F-Curves are going to be drawn here */ + if (ale->type == ANIMTYPE_FCURVE) { + /* F-Curve channels are colored with whatever color the curve has stored */ + FCurve *fcu= (FCurve *)ale->data; + glColor3fv(fcu->color); } else UI_ThemeColorShade(TH_HEADER, ((indent==0)?20: (indent==1)?-20: -40)); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index e5edbf7d5bb..e252a75532d 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -72,6 +72,8 @@ #include "UI_view2d.h" +#include "BIF_transform.h" + #include "ED_anim_api.h" #include "ED_keyframing.h" #include "ED_keyframes_draw.h" @@ -558,6 +560,77 @@ void GRAPHEDIT_OT_keyframes_paste (wmOperatorType *ot) #endif // XXX code to be sanitied for new system +/* ******************** Duplicate Keyframes Operator ************************* */ + +static void duplicate_graph_keys (bAnimContext *ac) +{ + ListBase anim_data = {NULL, NULL}; + bAnimListElem *ale; + int filter; + + /* filter data */ + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY); + ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); + + /* loop through filtered data and delete selected keys */ + for (ale= anim_data.first; ale; ale= ale->next) { + duplicate_fcurve_keys((FCurve *)ale->key_data); + } + + /* free filtered list */ + BLI_freelistN(&anim_data); +} + +/* ------------------- */ + +static int graphkeys_duplicate_exec(bContext *C, wmOperator *op) +{ + bAnimContext ac; + + /* get editor data */ + if (ANIM_animdata_get_context(C, &ac) == 0) + return OPERATOR_CANCELLED; + + /* duplicate keyframes */ + duplicate_graph_keys(&ac); + + /* validate keyframes after editing */ + ANIM_editkeyframes_refresh(&ac); + + /* set notifier tha things have changed */ + ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES); + + return OPERATOR_FINISHED; +} + +static int graphkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + graphkeys_duplicate_exec(C, op); + + RNA_int_set(op->ptr, "mode", TFM_TRANSLATION); + WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr); + + return OPERATOR_FINISHED; +} + +void GRAPHEDIT_OT_keyframes_duplicate (wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Duplicate Keyframes"; + ot->idname= "GRAPHEDIT_OT_keyframes_duplicate"; + + /* api callbacks */ + ot->invoke= graphkeys_duplicate_invoke; + ot->exec= graphkeys_duplicate_exec; + ot->poll= ED_operator_areaactive; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* to give to transform */ + RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX); +} + /* ******************** Delete Keyframes Operator ************************* */ static void delete_graph_keys (bAnimContext *ac) diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c index 3e856833954..cbd5372b0e2 100644 --- a/source/blender/editors/space_graph/graph_header.c +++ b/source/blender/editors/space_graph/graph_header.c @@ -185,13 +185,13 @@ void graph_header_buttons(const bContext *C, ARegion *ar) xco += 5; uiBlockBeginAlign(block); - //uiDefIconButBitI(block, TOGN, ADS_FILTER_NOOBJ, B_REDR, ICON_OBJECT, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Non-Armature Objects"); - //uiDefIconButBitI(block, TOGN, ADS_FILTER_NOARM, B_REDR, ICON_ARMATURE, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Armature Objects"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_EDIT, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display ShapeKeys"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Materials"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Lamps"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Cameras"); - uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Curves"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSCE, B_REDR, ICON_SCENE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Scene Animation"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOWOR, B_REDR, ICON_WORLD_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display World Animation"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOSHAPEKEYS, B_REDR, ICON_SHAPEKEY_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display ShapeKeys"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMAT, B_REDR, ICON_MATERIAL_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Materials"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Lamps"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Cameras"); + uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Curves"); uiBlockEndAlign(block); xco += 30; } diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index f44f2174462..f37fbdca9b9 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -25,28 +25,33 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef ED_IPO_INTERN_H -#define ED_IPO_INTERN_H +#ifndef ED_GRAPH_INTERN_H +#define ED_GRAPH_INTERN_H struct bContext; struct wmWindowManager; struct bAnimContext; struct SpaceIpo; +struct ScrArea; struct ARegion; /* internal exports only */ /* ***************************************** */ -/* ipo_draw.c */ +/* space_graph.c */ +struct ARegion *graph_has_buttons_region(struct ScrArea *sa); + +/* ***************************************** */ +/* graph_draw.c */ void graph_draw_channel_names(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar); void graph_draw_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar); /* ***************************************** */ -/* ipo_header.c */ +/* graph_header.c */ void graph_header_buttons(const bContext *C, struct ARegion *ar); /* ***************************************** */ -/* ipo_select.c */ +/* graph_select.c */ void GRAPHEDIT_OT_keyframes_deselectall(struct wmOperatorType *ot); void GRAPHEDIT_OT_keyframes_borderselect(struct wmOperatorType *ot); @@ -70,7 +75,7 @@ enum { } eGraphKeys_ColumnSelect_Mode; /* ***************************************** */ -/* ipo_edit.c */ +/* graph_edit.c */ void GRAPHEDIT_OT_set_previewrange(struct wmOperatorType *ot); void GRAPHEDIT_OT_view_all(struct wmOperatorType *ot); @@ -78,6 +83,7 @@ void GRAPHEDIT_OT_view_all(struct wmOperatorType *ot); void GRAPHEDIT_OT_keyframes_copy(struct wmOperatorType *ot); void GRAPHEDIT_OT_keyframes_paste(struct wmOperatorType *ot); +void GRAPHEDIT_OT_keyframes_duplicate(struct wmOperatorType *ot); void GRAPHEDIT_OT_keyframes_delete(struct wmOperatorType *ot); void GRAPHEDIT_OT_keyframes_clean(struct wmOperatorType *ot); void GRAPHEDIT_OT_keyframes_sample(struct wmOperatorType *ot); @@ -113,10 +119,15 @@ enum { } eGraphKeys_Mirror_Mode; /* ***************************************** */ -/* ipo_ops.c */ +/* graph_buttons.c */ +void GRAPHEDIT_OT_properties(struct wmOperatorType *ot); +void graph_region_buttons(const struct bContext *C, struct ARegion *ar); + +/* ***************************************** */ +/* graph_ops.c */ void graphedit_keymap(struct wmWindowManager *wm); void graphedit_operatortypes(void); -#endif /* ED_IPO_INTERN_H */ +#endif /* ED_GRAPH_INTERN_H */ diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 09c5b9c7f07..f9900306c53 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -99,6 +99,7 @@ void graphedit_operatortypes(void) WM_operatortype_append(GRAPHEDIT_OT_view_togglehandles); WM_operatortype_append(GRAPHEDIT_OT_set_previewrange); WM_operatortype_append(GRAPHEDIT_OT_view_all); + WM_operatortype_append(GRAPHEDIT_OT_properties); /* keyframes */ /* selection */ @@ -118,6 +119,7 @@ void graphedit_operatortypes(void) WM_operatortype_append(GRAPHEDIT_OT_keyframes_smooth); WM_operatortype_append(GRAPHEDIT_OT_keyframes_clean); WM_operatortype_append(GRAPHEDIT_OT_keyframes_delete); + WM_operatortype_append(GRAPHEDIT_OT_keyframes_duplicate); #if 0 // XXX code to be sanitied for new system WM_operatortype_append(GRAPHEDIT_OT_keyframes_copy); WM_operatortype_append(GRAPHEDIT_OT_keyframes_paste); @@ -131,7 +133,7 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) /* view */ WM_keymap_add_item(keymap, "GRAPHEDIT_OT_view_toggle_handles", HKEY, KM_PRESS, KM_CTRL, 0); - /* iposelect.c - selection tools */ + /* graph_select.c - selection tools */ /* click-select */ // TODO: column to alt, left-right to ctrl (for select-linked consistency) WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); @@ -155,7 +157,7 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_columnselect", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN); - /* ipo_edit.c */ + /* graph_edit.c */ /* snap - current frame to selected keys */ WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_cfrasnap", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); @@ -176,6 +178,8 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_delete", DELKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); + #if 0 // XXX code to be sanitied for new system /* copy/paste */ WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_copy", CKEY, KM_PRESS, KM_CTRL, 0); @@ -196,6 +200,10 @@ void graphedit_keymap(wmWindowManager *wm) { ListBase *keymap; + /* keymap for all regions */ + keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0); + WM_keymap_add_item(keymap, "GRAPHEDIT_OT_properties", NKEY, KM_PRESS, 0, 0); + /* channels */ /* Channels are not directly handled by the Graph Editor module, but are inherited from the Animation module. * All the relevant operations, keymaps, drawing, etc. can therefore all be found in that module instead, as these diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 29c92ee4496..11922a2b383 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -43,6 +43,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "BKE_utildefines.h" #include "ED_space_api.h" #include "ED_screen.h" @@ -60,6 +61,36 @@ #include "graph_intern.h" // own include +/* ******************** manage regions ********************* */ + +ARegion *graph_has_buttons_region(ScrArea *sa) +{ + ARegion *ar, *arnew; + + for(ar= sa->regionbase.first; ar; ar= ar->next) + if(ar->regiontype==RGN_TYPE_UI) + return ar; + + /* add subdiv level; after channel */ + for(ar= sa->regionbase.first; ar; ar= ar->next) + if(ar->regiontype==RGN_TYPE_CHANNELS) + break; + + /* is error! */ + if(ar==NULL) return NULL; + + arnew= MEM_callocN(sizeof(ARegion), "buttons for view3d"); + + BLI_insertlinkafter(&sa->regionbase, ar, arnew); + arnew->regiontype= RGN_TYPE_UI; + arnew->alignment= RGN_ALIGN_TOP|RGN_SPLIT_PREV; + + arnew->flag = RGN_FLAG_HIDDEN; + + return arnew; +} + + /* ******************** default callbacks for ipo space ***************** */ static SpaceLink *graph_new(const bContext *C) @@ -93,6 +124,14 @@ static SpaceLink *graph_new(const bContext *C) ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); + /* ui buttons */ + ar= MEM_callocN(sizeof(ARegion), "main area for graphedit"); + + BLI_addtail(&sipo->regionbase, ar); + ar->regiontype= RGN_TYPE_UI; + ar->alignment= RGN_ALIGN_TOP|RGN_SPLIT_PREV; + ar->flag = RGN_FLAG_HIDDEN; + /* main area */ ar= MEM_callocN(sizeof(ARegion), "main area for graphedit"); @@ -140,6 +179,8 @@ static void graph_init(struct wmWindowManager *wm, ScrArea *sa) /* init dopesheet data if non-existant (i.e. for old files) */ if (sipo->ads == NULL) sipo->ads= MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet"); + + ED_area_tag_refresh(sa); } static SpaceLink *graph_duplicate(SpaceLink *sl) @@ -163,6 +204,8 @@ static void graph_main_area_init(wmWindowManager *wm, ARegion *ar) /* own keymap */ keymap= WM_keymap_listbase(wm, "GraphEdit Keys", SPACE_IPO, 0); /* XXX weak? */ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); + keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); } static void graph_main_area_draw(const bContext *C, ARegion *ar) @@ -226,6 +269,8 @@ static void graph_channel_area_init(wmWindowManager *wm, ARegion *ar) /* own keymap */ keymap= WM_keymap_listbase(wm, "Animation_Channels", 0, 0); /* XXX weak? */ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); + keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); } static void graph_channel_area_draw(const bContext *C, ARegion *ar) @@ -285,6 +330,37 @@ static void graph_header_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_restore(C); } +/* add handlers, stuff you only do once or on area/region changes */ +static void graph_buttons_area_init(wmWindowManager *wm, ARegion *ar) +{ + ListBase *keymap; + + UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST_UI, ar->winx, ar->winy); + + keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0); + WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); +} + +static void graph_buttons_area_draw(const bContext *C, ARegion *ar) +{ + float col[3]; + + /* clear */ + UI_GetThemeColor3fv(TH_HEADER, col); + + glClearColor(col[0], col[1], col[2], 0.0); + glClear(GL_COLOR_BUFFER_BIT); + + /* set view2d view matrix for scrolling (without scrollers) */ + UI_view2d_view_ortho(C, &ar->v2d); + + graph_region_buttons(C, ar); + + /* restore view matrix? */ + UI_view2d_view_restore(C); +} + + static void graph_region_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ @@ -337,12 +413,18 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) }*/ ED_area_tag_refresh(sa); break; + default: + if(wmn->data==ND_KEYS) + ED_area_tag_refresh(sa); } } + + static void graph_refresh(const bContext *C, ScrArea *sa) { SpaceIpo *sipo = (SpaceIpo *)sa->spacedata.first; + bAnimContext ac; /* updates to data needed depends on Graph Editor mode... */ switch (sipo->mode) { @@ -354,16 +436,82 @@ static void graph_refresh(const bContext *C, ScrArea *sa) case SIPO_MODE_DRIVERS: /* drivers only */ { - Object *ob= CTX_data_active_object(C); - - /* sync changes to bones to the corresponding action channels */ - ANIM_pose_to_action_sync(ob, sa); + } break; } /* region updates? */ // XXX resizing y-extents of tot should go here? + + /* init/adjust F-Curve colors */ + if (ANIM_animdata_get_context(C, &ac)) { + ListBase anim_data = {NULL, NULL}; + bAnimListElem *ale; + int filter; + int items, i; + + /* build list of F-Curves which will be visible as channels in channel-region + * - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a + * mismatch between channel-colors and the drawn curves + */ + filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CURVESONLY); + items= ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); + + /* loop over F-Curves, assigning colors */ + for (ale=anim_data.first, i=0; ale; ale= ale->next, i++) { + FCurve *fcu= (FCurve *)ale->data; + + /* set color of curve here */ + switch (fcu->color_mode) { + case FCURVE_COLOR_CUSTOM: + /* User has defined a custom color for this curve already (we assume it's not going to cause clashes with text colors), + * which should be left alone... Nothing needs to be done here. + */ + break; + + case FCURVE_COLOR_AUTO_RGB: + { + /* F-Curve's array index is automatically mapped to RGB values. This works best of 3-value vectors. + * TODO: find a way to module the hue so that not all curves have same color... + */ + + /* standard table of colors to use */ + const float _colorsets[4][3]= + { + {1.0f, 0.0f, 0.0f}, /* red */ + {0.0f, 1.0f, 0.0f}, /* green */ + {0.0f, 0.0f, 1.0f}, /* blue */ + {0.3f, 0.8f, 1.0f}, /* 'unknown' color - bluish so as to not conflict with handles */ + }; + + /* simply copy the relevant color over to the F-Curve */ + if ((fcu->array_index >= 0) && (fcu->array_index < 3)) { + /* if the index is within safe bounds, use index to access table */ + VECCOPY(fcu->color, _colorsets[fcu->array_index]); + } + else { + /* use the 'unknown' color... */ + VECCOPY(fcu->color, _colorsets[3]); + } + } + break; + + case FCURVE_COLOR_AUTO_RAINBOW: + default: + { + /* determine color 'automatically' using 'magic function' which uses the given args + * of current item index + total items to determine some RGB color + */ + ipo_rainbow(i, items, fcu->color); + } + break; + } + } + + /* free temp list */ + BLI_freelistN(&anim_data); + } } /* only called once, from space/spacetypes.c */ @@ -407,7 +555,7 @@ void ED_spacetype_ipo(void) /* regions: channels */ art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region"); art->regionid = RGN_TYPE_CHANNELS; - art->minsizex= 214; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */ + art->minsizex= 200+V2D_SCROLL_WIDTH; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */ art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES; art->listener= graph_region_listener; art->init= graph_channel_area_init; @@ -415,6 +563,16 @@ void ED_spacetype_ipo(void) BLI_addhead(&st->regiontypes, art); + /* regions: UI buttons */ + art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region"); + art->regionid = RGN_TYPE_UI; + art->minsizey= 160; + art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES; + art->listener= NULL; // graph_region_listener; + art->init= graph_buttons_area_init; + art->draw= graph_buttons_area_draw; + + BLI_addhead(&st->regiontypes, art); BKE_spacetype_register(st); } diff --git a/source/blender/editors/space_image/image_header.c b/source/blender/editors/space_image/image_header.c index 120d1debde2..8f981b6982b 100644 --- a/source/blender/editors/space_image/image_header.c +++ b/source/blender/editors/space_image/image_header.c @@ -261,9 +261,9 @@ static void image_imagemenu(bContext *C, uiMenuItem *head, void *arg_unused) static void image_uvs_showhidemenu(bContext *C, uiMenuItem *head, void *arg_unused) { - uiMenuItemO(head, 0, "UV_OT_show_hidden"); - uiMenuItemO(head, 0, "UV_OT_hide_selected"); - uiMenuItemO(head, 0, "UV_OT_hide_deselected"); + uiMenuItemO(head, 0, "UV_OT_reveal"); + uiMenuItemO(head, 0, "UV_OT_hide"); + uiMenuItemBooleanO(head, "Hide Unselected", 0, "UV_OT_hide", "unselected", 1); } static void image_uvs_transformmenu(bContext *C, uiMenuItem *head, void *arg_unused) @@ -892,17 +892,17 @@ void image_header_buttons(const bContext *C, ARegion *ar) /* image draw options */ uiBlockBeginAlign(block); - uiDefIconButR(block, ROW, B_REDR, ICON_TEXTURE, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, 0, 0, 0, NULL); + uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_RGB, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, 0, 0, 0, NULL); xco+= XIC; if(ibuf==NULL || ibuf->channels==4) { - uiDefIconButR(block, ROW, B_REDR, ICON_TRANSP_HLT, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_USE_ALPHA, 0, 0, NULL); + uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_RGB_ALPHA, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_USE_ALPHA, 0, 0, NULL); xco+= XIC; - uiDefIconButR(block, ROW, B_REDR, ICON_DOT, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_SHOW_ALPHA, 0, 0, NULL); + uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_ALPHA, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_SHOW_ALPHA, 0, 0, NULL); xco+= XIC; } if(ibuf) { if(ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1)) { - uiDefIconButR(block, ROW, B_REDR, ICON_SOLID, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_SHOW_ZBUF, 0, 0, NULL); + uiDefIconButR(block, ROW, B_REDR, ICON_IMAGE_ZDEPTH, xco,yco,XIC,YIC, &spaceptr, "draw_channels", 0, 0, SI_SHOW_ZBUF, 0, 0, NULL); xco+= XIC; } } diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index c4363f3981a..cfd58d13495 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -32,6 +32,7 @@ /* internal exports only */ struct bContext; struct ARegion; +struct ScrArea; struct SpaceImage; struct Object; struct Image; @@ -39,6 +40,9 @@ struct ImBuf; struct wmOperatorType; struct Scene; +/* space_image.c */ +struct ARegion *image_has_buttons_region(struct ScrArea *sa); + /* image_header.c */ void image_header_buttons(const struct bContext *C, struct ARegion *ar); @@ -77,5 +81,9 @@ void IMAGE_OT_record_composite(struct wmOperatorType *ot); /* uvedit_draw.c */ void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene, struct Object *obedit); +/* image_panels.c */ +void image_buttons_area_defbuts(const struct bContext *C, struct ARegion *ar); +void IMAGE_OT_properties(struct wmOperatorType *ot); + #endif /* ED_IMAGE_INTERN_H */ diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 51bca9d4fcc..0652196842c 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -63,7 +63,6 @@ #include "RNA_types.h" #include "ED_image.h" -#include "ED_fileselect.h" #include "ED_screen.h" #include "ED_space_api.h" #include "ED_uvedit.h" @@ -108,13 +107,28 @@ static void sima_zoom_set_factor(SpaceImage *sima, ARegion *ar, float zoomfac) sima_zoom_set(sima, ar, sima->zoom*zoomfac); } -int space_image_poll(bContext *C) +static int space_image_poll(bContext *C) { - SpaceLink *slink= CTX_wm_space_data(C); - - return (slink && (slink->spacetype == SPACE_IMAGE)); + SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); + if(sima && sima->spacetype==SPACE_IMAGE) + if(ED_space_image_buffer(sima)) + return 1; + return 0; } +static int space_image_file_exists_poll(bContext *C) +{ + if(space_image_poll(C)) { + SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); + ImBuf *ibuf= ED_space_image_buffer(sima); + + if(ibuf && BLI_exists(ibuf->name) && BLI_is_writable(ibuf->name)) + return 1; + } + return 0; +} + + int space_image_main_area_poll(bContext *C) { SpaceLink *slink= CTX_wm_space_data(C); @@ -591,18 +605,8 @@ static char *filesel_imagetype_string(Image *ima) static void image_filesel(bContext *C, wmOperator *op, const char *path) { - SpaceFile *sfile; - - // XXX context is not set back ok afterwards - // ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_FILE); - ED_area_newspace(C, CTX_wm_area(C), SPACE_FILE); - - /* settings for filebrowser */ - sfile= (SpaceFile*)CTX_wm_space_data(C); - sfile->op= op; - - /* XXX right params for image save, with pupmenu and image type .. */ - ED_fileselect_set_params(sfile, FILE_SPECIAL, op->type->name, path, 0, 0, 0); + RNA_string_set(op->ptr, "filename", path); + WM_event_add_fileselect(C, op); } /******************** open image operator ********************/ @@ -613,9 +617,9 @@ static int open_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Image *ima= NULL; - char *str; + char str[FILE_MAX]; - str= RNA_string_get_alloc(op->ptr, "filename", NULL, 0); + RNA_string_get(op->ptr, "filename", str); ima= BKE_add_image_file(str, scene->r.cfra); MEM_freeN(str); @@ -650,13 +654,13 @@ void IMAGE_OT_open(wmOperatorType *ot) /* api callbacks */ ot->exec= open_exec; ot->invoke= open_invoke; - ot->poll= space_image_poll; + ot->poll= ED_operator_image_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_string_file_path(ot->srna, "filename", "", 0, "Filename", "File path of image to open."); + RNA_def_string_file_path(ot->srna, "filename", "", FILE_MAX, "Filename", "File path of image to open."); } /******************** replace image operator ********************/ @@ -664,14 +668,13 @@ void IMAGE_OT_open(wmOperatorType *ot) static int replace_exec(bContext *C, wmOperator *op) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); - char *str; + char str[FILE_MAX]; if(!sima->image) return OPERATOR_CANCELLED; - str= RNA_string_get_alloc(op->ptr, "filename", NULL, 0); + RNA_string_get(op->ptr, "filename", str); BLI_strncpy(sima->image->name, str, sizeof(sima->image->name)-1); /* we cant do much if the str is longer then 240 :/ */ - MEM_freeN(str); BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_RELOAD); WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, sima->image); @@ -710,82 +713,77 @@ void IMAGE_OT_replace(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_string_file_path(ot->srna, "filename", "", 0, "Filename", "File path of image to replace current image with."); + RNA_def_string_file_path(ot->srna, "filename", "", FILE_MAX, "Filename", "File path of image to replace current image with."); } /******************** save image as operator ********************/ +/* assumes name is FILE_MAX */ +/* ima->name and ibuf->name should end up the same */ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOperator *op, char *name) { Image *ima= ED_space_image(sima); ImBuf *ibuf= ED_space_image_buffer(sima); int len; - char str[FILE_MAXDIR+FILE_MAXFILE]; - if (ibuf) { - BLI_strncpy(str, name, sizeof(str)); - - BLI_convertstringcode(str, G.sce); - BLI_convertstringframe(str, scene->r.cfra); - + if (ibuf) { + BLI_convertstringcode(name, G.sce); + BLI_convertstringframe(name, scene->r.cfra); if(scene->r.scemode & R_EXTENSION) { - BKE_add_image_extension(scene, str, sima->imtypenr); + BKE_add_image_extension(scene, name, sima->imtypenr); BKE_add_image_extension(scene, name, sima->imtypenr); } - if(1) { // XXX saveover(str)) { - - /* enforce user setting for RGB or RGBA, but skip BW */ - if(scene->r.planes==32) - ibuf->depth= 32; - else if(scene->r.planes==24) - ibuf->depth= 24; - - WM_cursor_wait(1); + /* enforce user setting for RGB or RGBA, but skip BW */ + if(scene->r.planes==32) + ibuf->depth= 32; + else if(scene->r.planes==24) + ibuf->depth= 24; + + WM_cursor_wait(1); - if(sima->imtypenr==R_MULTILAYER) { - RenderResult *rr= BKE_image_get_renderresult(scene, ima); - if(rr) { - RE_WriteRenderResult(rr, str, scene->r.quality); - - BLI_strncpy(ima->name, name, sizeof(ima->name)); - BLI_strncpy(ibuf->name, str, sizeof(ibuf->name)); - - /* should be function? nevertheless, saving only happens here */ - for(ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next) - ibuf->userflags &= ~IB_BITMAPDIRTY; - - } - else - BKE_report(op->reports, RPT_ERROR, "Did not write, no Multilayer Image"); - } - else if (BKE_write_ibuf(scene, ibuf, str, sima->imtypenr, scene->r.subimtype, scene->r.quality)) { + if(sima->imtypenr==R_MULTILAYER) { + RenderResult *rr= BKE_image_get_renderresult(scene, ima); + if(rr) { + RE_WriteRenderResult(rr, name, scene->r.quality); + BLI_strncpy(ima->name, name, sizeof(ima->name)); - BLI_strncpy(ibuf->name, str, sizeof(ibuf->name)); + BLI_strncpy(ibuf->name, name, sizeof(ibuf->name)); - ibuf->userflags &= ~IB_BITMAPDIRTY; + /* should be function? nevertheless, saving only happens here */ + for(ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next) + ibuf->userflags &= ~IB_BITMAPDIRTY; - /* change type? */ - if( ELEM(ima->source, IMA_SRC_GENERATED, IMA_SRC_VIEWER)) { - ima->source= IMA_SRC_FILE; - ima->type= IMA_TYPE_IMAGE; - } - if(ima->type==IMA_TYPE_R_RESULT) - ima->type= IMA_TYPE_IMAGE; - - /* name image as how we saved it */ - len= strlen(str); - while (len > 0 && str[len - 1] != '/' && str[len - 1] != '\\') len--; - rename_id(&ima->id, str+len); - } + } else - BKE_reportf(op->reports, RPT_ERROR, "Couldn't write image: %s", str); - - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, sima->image); - - WM_cursor_wait(0); + BKE_report(op->reports, RPT_ERROR, "Did not write, no Multilayer Image"); } + else if (BKE_write_ibuf(scene, ibuf, name, sima->imtypenr, scene->r.subimtype, scene->r.quality)) { + BLI_strncpy(ima->name, name, sizeof(ima->name)); + BLI_strncpy(ibuf->name, name, sizeof(ibuf->name)); + + ibuf->userflags &= ~IB_BITMAPDIRTY; + + /* change type? */ + if( ELEM(ima->source, IMA_SRC_GENERATED, IMA_SRC_VIEWER)) { + ima->source= IMA_SRC_FILE; + ima->type= IMA_TYPE_IMAGE; + } + if(ima->type==IMA_TYPE_R_RESULT) + ima->type= IMA_TYPE_IMAGE; + + /* name image as how we saved it */ + len= strlen(name); + while (len > 0 && name[len - 1] != '/' && name[len - 1] != '\\') len--; + rename_id(&ima->id, name+len); + } + else + BKE_reportf(op->reports, RPT_ERROR, "Couldn't write image: %s", name); + + WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, sima->image); + + WM_cursor_wait(0); } } @@ -794,14 +792,13 @@ static int save_as_exec(bContext *C, wmOperator *op) SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); Scene *scene= CTX_data_scene(C); Image *ima = ED_space_image(sima); - char *str; + char str[FILE_MAX]; if(!ima) return OPERATOR_CANCELLED; - str= RNA_string_get_alloc(op->ptr, "filename", NULL, 0); + RNA_string_get(op->ptr, "filename", str); save_image_doit(C, sima, scene, op, str); - MEM_freeN(str); return OPERATOR_FINISHED; } @@ -823,7 +820,7 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event) if(ibuf) { char *strp; - strp= filesel_imagetype_string(ima); + strp= filesel_imagetype_string(ima); // XXX unused still /* cant save multilayer sequence, ima->rr isn't valid for a specific frame */ if(ima->rr && !(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER)) @@ -833,10 +830,14 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *event) else sima->imtypenr= BKE_ftype_to_imtype(ibuf->ftype); - // XXX activate_fileselect_menu(FILE_SPECIAL, "Save Image", name, strp, &sima->imtypenr, save_image_doit); + if(ibuf->name[0]==0) + BLI_strncpy(ibuf->name, G.ima, FILE_MAX); - image_filesel(C, op, ima->name); + // XXX note: we can give default menu enums to operator for this + image_filesel(C, op, ibuf->name); + MEM_freeN(strp); + return OPERATOR_RUNNING_MODAL; } @@ -858,7 +859,7 @@ void IMAGE_OT_save_as(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_string_file_path(ot->srna, "filename", "", 0, "Filename", "File path to save image to."); + RNA_def_string_file_path(ot->srna, "filename", "", FILE_MAX, "Filename", "File path to save image to."); } /******************** save image operator ********************/ @@ -869,28 +870,30 @@ static int save_exec(bContext *C, wmOperator *op) Image *ima = ED_space_image(sima); ImBuf *ibuf= ED_space_image_buffer(sima); Scene *scene= CTX_data_scene(C); - char name[FILE_MAXDIR+FILE_MAXFILE]; + char name[FILE_MAX]; - if(!ima) + if(!ima || !ibuf) return OPERATOR_CANCELLED; /* if exists, saves over without fileselect */ - - strcpy(name, ima->name); - - if(ibuf) { - if(BLI_exists(ibuf->name)) { - if(BKE_image_get_renderresult(scene, ima)) - sima->imtypenr= R_MULTILAYER; - else - sima->imtypenr= BKE_ftype_to_imtype(ibuf->ftype); - - save_image_doit(C, sima, scene, op, ibuf->name); - } - else - return save_as_exec(C, op); - } + BLI_strncpy(name, ibuf->name, FILE_MAX); + if(name[0]==0) + BLI_strncpy(name, G.ima, FILE_MAX); + + if(BLI_exists(name) && BLI_is_writable(name)) { + if(BKE_image_get_renderresult(scene, ima)) + sima->imtypenr= R_MULTILAYER; + else + sima->imtypenr= BKE_ftype_to_imtype(ibuf->ftype); + + save_image_doit(C, sima, scene, op, name); + } + else { + BKE_report(op->reports, RPT_ERROR, "Can not save image."); + return OPERATOR_CANCELLED; + } + return OPERATOR_FINISHED; } @@ -902,7 +905,7 @@ void IMAGE_OT_save(wmOperatorType *ot) /* api callbacks */ ot->exec= save_exec; - ot->poll= space_image_poll; + ot->poll= space_image_file_exists_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -1060,7 +1063,7 @@ void IMAGE_OT_new(wmOperatorType *ot) /* api callbacks */ ot->exec= new_exec; - ot->poll= space_image_poll; + ot->poll= ED_operator_image_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; diff --git a/source/blender/editors/space_image/image_panels.c b/source/blender/editors/space_image/image_panels.c index 39ceaa799e7..a9ddc855fdf 100644 --- a/source/blender/editors/space_image/image_panels.c +++ b/source/blender/editors/space_image/image_panels.c @@ -25,6 +25,55 @@ * ***** END GPL LICENSE BLOCK ***** */ + +#include +#include + +#include "DNA_image_types.h" +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_object_types.h" +#include "DNA_space_types.h" +#include "DNA_scene_types.h" +#include "DNA_screen_types.h" + +#include "MEM_guardedalloc.h" + +#include "BLI_blenlib.h" +#include "BLI_arithb.h" +#include "BLI_editVert.h" +#include "BLI_rand.h" + +#include "BKE_colortools.h" +#include "BKE_context.h" +#include "BKE_image.h" +#include "BKE_screen.h" +#include "BKE_utildefines.h" + +#include "IMB_imbuf.h" +#include "IMB_imbuf_types.h" + +#include "ED_image.h" +#include "ED_mesh.h" +#include "ED_space_api.h" +#include "ED_screen.h" +#include "ED_uvedit.h" + +#include "BIF_gl.h" +#include "BIF_glutil.h" + +#include "RNA_access.h" + +#include "WM_api.h" +#include "WM_types.h" + +#include "UI_interface.h" +#include "UI_resources.h" +#include "UI_view2d.h" + +#include "image_intern.h" + + #if 0 /* ************ panel stuff ************* */ @@ -237,21 +286,6 @@ void image_info(Image *ima, ImBuf *ibuf, char *str) } -static void image_panel_properties(short cntrl) // IMAGE_HANDLER_PROPERTIES -{ - uiBlock *block; - - block= uiNewBlock(&curarea->uiblocks, "image_panel_properties", UI_EMBOSS, UI_HELV, curarea->win); - uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl); - uiSetPanelHandler(IMAGE_HANDLER_PROPERTIES); // for close and esc - if(uiNewPanel(curarea, block, "Image Properties", "Image", 10, 10, 318, 204)==0) - return; - - /* note, it draws no bottom half in facemode, for vertex buttons */ - uiblock_image_panel(block, &G.sima->image, &G.sima->iuser, B_REDR, B_REDR); - image_editvertex_buts(block); -} - static void image_panel_game_properties(short cntrl) // IMAGE_HANDLER_GAME_PROPERTIES { ImBuf *ibuf= BKE_image_get_ibuf(G.sima->image, &G.sima->iuser); @@ -629,3 +663,60 @@ static void image_blockhandlers(ScrArea *sa) } #endif +static void image_panel_properties(const bContext *C, ARegion *ar) +{ + uiBlock *block; + + block= uiBeginBlock(C, ar, "image_panel_properties", UI_EMBOSS, UI_HELV); + if(uiNewPanel(C, ar, block, "Image Properties", "Image", 10, 10, 318, 204)==0) + return; + + /* note, it draws no bottom half in facemode, for vertex buttons */ +// uiblock_image_panel(block, &G.sima->image, &G.sima->iuser, B_REDR, B_REDR); +// image_editvertex_buts(block); + + uiEndBlock(C, block); +} + + + +void image_buttons_area_defbuts(const bContext *C, ARegion *ar) +{ + + image_panel_properties(C, ar); + + uiDrawPanels(C, 1); /* 1 = align */ + uiMatchPanelsView2d(ar); /* sets v2d->totrct */ + +} + + +static int image_properties(bContext *C, wmOperator *op) +{ + ScrArea *sa= CTX_wm_area(C); + ARegion *ar= image_has_buttons_region(sa); + + if(ar) { + ar->flag ^= RGN_FLAG_HIDDEN; + ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */ + + ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa); + ED_area_tag_redraw(sa); + } + return OPERATOR_FINISHED; +} + +void IMAGE_OT_properties(wmOperatorType *ot) +{ + ot->name= "Properties"; + ot->idname= "IMAGE_OT_properties"; + + ot->exec= image_properties; + ot->poll= ED_operator_image_active; + + /* flags */ + ot->flag= 0; +} + + + diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index f3b414262a8..703b309f2ab 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -73,6 +73,35 @@ #include "image_intern.h" +/* ******************** manage regions ********************* */ + +ARegion *image_has_buttons_region(ScrArea *sa) +{ + ARegion *ar, *arnew; + + for(ar= sa->regionbase.first; ar; ar= ar->next) + if(ar->regiontype==RGN_TYPE_UI) + return ar; + + /* add subdiv level; after header */ + for(ar= sa->regionbase.first; ar; ar= ar->next) + if(ar->regiontype==RGN_TYPE_HEADER) + break; + + /* is error! */ + if(ar==NULL) return NULL; + + arnew= MEM_callocN(sizeof(ARegion), "buttons for image"); + + BLI_insertlinkafter(&sa->regionbase, ar, arnew); + arnew->regiontype= RGN_TYPE_UI; + arnew->alignment= RGN_ALIGN_LEFT; + + arnew->flag = RGN_FLAG_HIDDEN; + + return arnew; +} + /* ******************** default callbacks for image space ***************** */ static SpaceLink *image_new(const bContext *C) @@ -95,6 +124,14 @@ static SpaceLink *image_new(const bContext *C) ar->regiontype= RGN_TYPE_HEADER; ar->alignment= RGN_ALIGN_BOTTOM; + /* buttons/list view */ + ar= MEM_callocN(sizeof(ARegion), "buttons for image"); + + BLI_addtail(&simage->regionbase, ar); + ar->regiontype= RGN_TYPE_UI; + ar->alignment= RGN_ALIGN_LEFT; + ar->flag = RGN_FLAG_HIDDEN; + /* main area */ ar= MEM_callocN(sizeof(ARegion), "main area for image"); @@ -160,11 +197,20 @@ void image_operatortypes(void) WM_operatortype_append(IMAGE_OT_record_composite); WM_operatortype_append(IMAGE_OT_toolbox); + WM_operatortype_append(IMAGE_OT_properties); } void image_keymap(struct wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "Image", SPACE_IMAGE, 0); + ListBase *keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0); + + WM_keymap_add_item(keymap, "IMAGE_OT_new", NKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "IMAGE_OT_open", OKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "IMAGE_OT_reload", RKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "IMAGE_OT_save", SKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "IMAGE_OT_properties", NKEY, KM_PRESS, 0, 0); + + keymap= WM_keymap_listbase(wm, "Image", SPACE_IMAGE, 0); WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); @@ -184,10 +230,9 @@ void image_keymap(struct wmWindowManager *wm) RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f); RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD8, KM_PRESS, 0, 0)->ptr, "ratio", 0.125f); - WM_keymap_add_item(keymap, "IMAGE_OT_new", NKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "IMAGE_OT_open", OKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "IMAGE_OT_reload", RKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "IMAGE_OT_save", SKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "PAINT_OT_image_paint", ACTIONMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", SELECTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_sample_color", SELECTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "IMAGE_OT_sample", ACTIONMOUSE, KM_PRESS, 0, 0); RNA_enum_set(WM_keymap_add_item(keymap, "IMAGE_OT_set_curves_point", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "point", 0); @@ -276,32 +321,34 @@ static int image_context(const bContext *C, bContextDataMember member, bContextD /************************** main region ***************************/ /* sets up the fields of the View2D from zoom and offset */ -static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar) +static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar, Scene *scene) { Image *ima= ED_space_image(sima); float x1, y1, w, h; int width, height, winx, winy; #if 0 - if(image_preview_active(curarea, &xim, &yim)); - else if(sima->image) { + if(image_preview_active(curarea, &width, &height)); +#endif + if(sima->image) { ImBuf *ibuf= ED_space_image_buffer(sima); float xuser_asp, yuser_asp; ED_image_aspect(sima->image, &xuser_asp, &yuser_asp); if(ibuf) { - xim= ibuf->x * xuser_asp; - yim= ibuf->y * yuser_asp; + width= ibuf->x*xuser_asp; + height= ibuf->y*yuser_asp; } - else if( sima->image->type==IMA_TYPE_R_RESULT ) { + else if(sima->image->type==IMA_TYPE_R_RESULT) { /* not very important, just nice */ - xim= (G.scene->r.xsch*G.scene->r.size)/100; - yim= (G.scene->r.ysch*G.scene->r.size)/100; + width= (scene->r.xsch*scene->r.size)/100; + height= (scene->r.ysch*scene->r.size)/100; } + else + ED_space_image_size(sima, &width, &height); } -#endif - - ED_space_image_size(sima, &width, &height); + else + ED_space_image_size(sima, &width, &height); w= width; h= height; @@ -351,8 +398,14 @@ static void image_main_area_init(wmWindowManager *wm, ARegion *ar) // image space manages own v2d // UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy); + + /* image paint polls for mode */ + keymap= WM_keymap_listbase(wm, "ImagePaint", SPACE_IMAGE, 0); + WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - /* own keymap */ + /* own keymaps */ + keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); keymap= WM_keymap_listbase(wm, "Image", SPACE_IMAGE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -373,7 +426,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) glClear(GL_COLOR_BUFFER_BIT); /* we set view2d from own zoom and offset each time */ - image_main_area_set_view2d(sima, ar); + image_main_area_set_view2d(sima, ar, scene); /* we draw image in pixelspace */ draw_image_main(sima, ar, scene); @@ -423,6 +476,46 @@ static void image_main_area_listener(ARegion *ar, wmNotifier *wmn) } } +/* *********************** buttons region ************************ */ + +/* add handlers, stuff you only do once or on area/region changes */ +static void image_buttons_area_init(wmWindowManager *wm, ARegion *ar) +{ + ListBase *keymap; + + keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + + UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST_UI, ar->winx, ar->winy); +} + +static void image_buttons_area_draw(const bContext *C, ARegion *ar) +{ + float col[3]; + + /* clear */ + UI_GetThemeColor3fv(TH_BACK, col); + + glClearColor(col[0], col[1], col[2], 0.0); + glClear(GL_COLOR_BUFFER_BIT); + + /* set view2d view matrix for scrolling (without scrollers) */ + UI_view2d_view_ortho(C, &ar->v2d); + + image_buttons_area_defbuts(C, ar); + + /* restore view matrix? */ + UI_view2d_view_restore(C); +} + +static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn) +{ + /* context changes */ + switch(wmn->category) { + + } +} + /************************* header region **************************/ /* add handlers, stuff you only do once or on area/region changes */ @@ -484,12 +577,21 @@ void ED_spacetype_image(void) BLI_addhead(&st->regiontypes, art); + /* regions: listview/buttons */ + art= MEM_callocN(sizeof(ARegionType), "spacetype image region"); + art->regionid = RGN_TYPE_UI; + art->minsizex= 220; // XXX + art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; + art->listener= image_buttons_area_listener; + art->init= image_buttons_area_init; + art->draw= image_buttons_area_draw; + BLI_addhead(&st->regiontypes, art); + /* regions: header */ art= MEM_callocN(sizeof(ARegionType), "spacetype image region"); art->regionid = RGN_TYPE_HEADER; art->minsizey= HEADERY; art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES; - art->init= image_header_area_init; art->draw= image_header_area_draw; diff --git a/source/blender/editors/space_info/Makefile b/source/blender/editors/space_info/Makefile index 31401d8f628..13f7a0d169f 100644 --- a/source/blender/editors/space_info/Makefile +++ b/source/blender/editors/space_info/Makefile @@ -46,6 +46,7 @@ CPPFLAGS += -I../../blenlib CPPFLAGS += -I../../makesdna CPPFLAGS += -I../../imbuf CPPFLAGS += -I../../python +CPPFLAGS += -I../../blenfont CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include # own include diff --git a/source/blender/editors/space_info/SConscript b/source/blender/editors/space_info/SConscript index f6c135bc2a8..faedcbfa587 100644 --- a/source/blender/editors/space_info/SConscript +++ b/source/blender/editors/space_info/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf ../../blenfont' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' env.BlenderLib ( 'bf_editors_space_info', sources, Split(incs), [], libtype=['core'], priority=[70] ) diff --git a/source/blender/editors/space_info/info_header.c b/source/blender/editors/space_info/info_header.c index 4b750600583..32c01b53a9e 100644 --- a/source/blender/editors/space_info/info_header.c +++ b/source/blender/editors/space_info/info_header.c @@ -29,17 +29,23 @@ #include #include +#include "DNA_packedFile_types.h" #include "DNA_space_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" +#include "DNA_userdef_types.h" #include "DNA_windowmanager_types.h" #include "MEM_guardedalloc.h" #include "BLI_blenlib.h" +#include "BLI_bpath.h" #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_image.h" +#include "BKE_main.h" +#include "BKE_packedFile.h" #include "BKE_screen.h" #include "ED_screen.h" @@ -56,12 +62,18 @@ #include "UI_resources.h" #include "UI_view2d.h" +#include "IMB_imbuf_types.h" + #include "info_intern.h" +static int pupmenu() {return 0;} +static int okee() {return 0;} +static int error() {return 0;} /* ************************ header area region *********************** */ #define B_STOPRENDER 1 +#define B_STOPCAST 2 static void do_viewmenu(bContext *C, void *arg, int event) { @@ -93,6 +105,219 @@ static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused) return block; } +static int buttons_do_unpack() +{ + int how; + char menu[2048]; + char *line = menu; + int ret_value = 1, count = 0; + + count = countPackedFiles(); + + if(!count) { + pupmenu("No packed files. Autopack disabled"); + return ret_value; + } + if (count == 1) + line += sprintf(line, "Unpack 1 file%%t"); + else + line += sprintf(line, "Unpack %d files%%t", count); + + line += sprintf(line, "|Use files in current directory (create when necessary)%%x%d", PF_USE_LOCAL); + line += sprintf(line, "|Write files to current directory (overwrite existing files)%%x%d", PF_WRITE_LOCAL); + line += sprintf(line, "|%%l|Use files in original location (create when necessary)%%x%d", PF_USE_ORIGINAL); + line += sprintf(line, "|Write files to original location (overwrite existing files)%%x%d", PF_WRITE_ORIGINAL); + line += sprintf(line, "|%%l|Disable AutoPack, keep all packed files %%x%d", PF_KEEP); + line += sprintf(line, "|Ask for each file %%x%d", PF_ASK); + + how = pupmenu(menu); + + if(how == -1) + ret_value = 0; + else { + if (how != PF_KEEP) unpackAll(how); + G.fileflags &= ~G_AUTOPACK; + } + + return ret_value; +} + +static void check_packAll() +{ + // first check for dirty images + Image *ima; + + for(ima = G.main->image.first; ima; ima= ima->id.next) { + if (ima->ibufs.first) { /* XXX FIX */ + ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); + + if (ibuf && (ibuf->userflags &= IB_BITMAPDIRTY)) + break; + } + } + + if (ima == NULL || okee("Some images are painted on. These changes will be lost. Continue ?")) { + packAll(); + G.fileflags |= G_AUTOPACK; + } +} + +static void do_info_externalfiles(bContext *C, void *arg, int event) +{ + switch (event) { + + case 1: /* pack data */ + check_packAll(); + break; + case 3: /* unpack data */ + if (buttons_do_unpack() != 0) { + /* Clear autopack bit only if user selected one of the unpack options */ + G.fileflags &= ~G_AUTOPACK; + } + break; + case 10: /* make all paths relative */ + if (G.relbase_valid) { + int tot,changed,failed,linked; + char str[512]; + char txtname[24]; /* text block name */ + txtname[0] = '\0'; + makeFilesRelative(txtname, &tot, &changed, &failed, &linked); + if (failed) sprintf(str, "Make Relative%%t|Total files %i|Changed %i|Failed %i, See Text \"%s\"|Linked %i", tot, changed, failed, txtname, linked); + else sprintf(str, "Make Relative%%t|Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked); + pupmenu(str); + } else { + pupmenu("Can't set relative paths with an unsaved blend file"); + } + break; + case 11: /* make all paths absolute */ + { + int tot,changed,failed,linked; + char str[512]; + char txtname[24]; /* text block name */ + txtname[0] = '\0'; + makeFilesAbsolute(txtname, &tot, &changed, &failed, &linked); + sprintf(str, "Make Absolute%%t|Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked); + if (failed) sprintf(str, "Make Absolute%%t|Total files %i|Changed %i|Failed %i, See Text \"%s\"|Linked %i", tot, changed, failed, txtname, linked); + else sprintf(str, "Make Absolute%%t|Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked); + + pupmenu(str); + } + break; + case 12: /* check images exist */ + { + char txtname[24]; /* text block name */ + txtname[0] = '\0'; + + /* run the missing file check */ + checkMissingFiles( txtname ); + + if (txtname[0] == '\0') { + okee("No external files missing"); + } else { + char str[128]; + sprintf(str, "Missing files listed in Text \"%s\"", txtname ); + error(str); + } + } + break; + case 13: /* search for referenced files that are not available */ +// XXX if(curarea->spacetype==SPACE_INFO) { +// ScrArea *sa; +// sa= closest_bigger_area(); +// areawinset(sa->win); +// } +// activate_fileselect(FILE_SPECIAL, "Find Missing Files", "", findMissingFiles); + break; + } + +} + + +uiBlock *info_externalfiles(bContext *C, ARegion *ar, void *arg_unused) +{ + uiBlock *block; + short yco = 20, menuwidth = 120; + + block= uiBeginBlock(C, ar, "info_externalfiles", UI_EMBOSSP, UI_HELV); + uiBlockSetButmFunc(block, do_info_externalfiles, NULL); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pack into .blend file", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Unpack into Files...", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 3, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make all Paths Relative", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 10, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make all Paths Absolute", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 11, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Report Missing Files...", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 12, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Find Missing Files...", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 13, ""); + + uiBlockSetDirection(block, UI_RIGHT); + uiTextBoundsBlock(block, 60); + return block; +} + + + +static void info_filemenu(bContext *C, uiMenuItem *head, void *arg_unused) +{ + + uiMenuContext(head, WM_OP_EXEC_AREA); + uiMenuItemO(head, 0, "WM_OT_read_homefile"); + uiMenuContext(head, WM_OP_INVOKE_AREA); + uiMenuItemO(head, 0, "WM_OT_open_mainfile"); +// uiDefIconTextBlockBut(block, info_openrecentmenu, NULL, ICON_RIGHTARROW_THIN, "Open Recent",0, yco-=20, 120, 19, ""); +// uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recover Last Session", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, ""); + + uiMenuSeparator(head); + + uiMenuContext(head, WM_OP_EXEC_AREA); + uiMenuItemO(head, 0, "WM_OT_save_mainfile"); + uiMenuContext(head, WM_OP_INVOKE_AREA); + uiMenuItemO(head, 0, "WM_OT_save_as_mainfile"); + +#if 0 + if(U.flag & USER_FILECOMPRESS) { + uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Compress File", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 35, "Enable file compression"); + } else { + uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Compress File", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 35, "Enable file compression"); + } + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Rendered Image...|F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Screenshot Subwindow|Ctrl F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 24, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Screenshot All|Ctrl Shift F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 25, ""); +#if GAMEBLENDER == 1 + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Game As Runtime...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 22, ""); +#endif + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Default Settings|Ctrl U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 31, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Load Factory Settings", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 32, ""); + + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append or Link|Shift F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append or Link (Image Browser)|Ctrl F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); +// uiDefIconTextBlockBut(block, info_file_importmenu, NULL, ICON_RIGHTARROW_THIN, "Import", 0, yco-=20, menuwidth, 19, ""); +// uiDefIconTextBlockBut(block, info_file_exportmenu, NULL, ICON_RIGHTARROW_THIN, "Export", 0, yco-=20, menuwidth, 19, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBlockBut(block, info_externalfiles, NULL, ICON_RIGHTARROW_THIN, "External Data",0, yco-=20, 120, 19, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Quit Blender|Ctrl Q", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, ""); + uiBlockSetDirection(block, UI_DOWN); + uiTextBoundsBlock(block, 80); + + uiEndBlock(C, block); + return block; +#endif +} + static void do_info_buttons(bContext *C, void *arg, int event) { @@ -100,6 +325,9 @@ static void do_info_buttons(bContext *C, void *arg, int event) case B_STOPRENDER: G.afbreek= 1; break; + case B_STOPCAST: + WM_jobs_stop(CTX_wm_manager(C), CTX_wm_screen(C)); + break; } } @@ -179,7 +407,7 @@ void info_header_buttons(const bContext *C, ARegion *ar) uiBlockSetEmboss(block, UI_EMBOSSP); xmax= GetButStringLength("File"); - uiDefPulldownBut(block, dummy_viewmenu, sa, "File", xco, yco, xmax-3, 22, ""); + uiDefMenuBut(block, info_filemenu, NULL, "File", xco, yco-2, xmax-3, 24, ""); xco+= xmax; xmax= GetButStringLength("Add"); @@ -218,6 +446,11 @@ void info_header_buttons(const bContext *C, ARegion *ar) if(WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) { uiDefIconTextBut(block, BUT, B_STOPRENDER, ICON_REC, "Render", xco+5,yco,75,19, NULL, 0.0f, 0.0f, 0, 0, "Stop rendering"); + xco+= 80; + } + if(WM_jobs_test(CTX_wm_manager(C), CTX_wm_screen(C))) { + uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_REC, "Capture", xco+5,yco,85,19, NULL, 0.0f, 0.0f, 0, 0, "Stop screencast"); + xco+= 90; } /* always as last */ diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 8b01080495b..f1968114b14 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -48,6 +48,7 @@ #include "ED_screen.h" #include "BIF_gl.h" +#include "BLF_api.h" #include "WM_api.h" #include "WM_types.h" @@ -132,7 +133,8 @@ static void info_main_area_draw(const bContext *C, ARegion *ar) // SpaceInfo *sinfo= (SpaceInfo*)CTX_wm_space_data(C); View2D *v2d= &ar->v2d; float col[3]; - + float width, height; + /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); @@ -141,8 +143,38 @@ static void info_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_ortho(C, v2d); /* data... */ + // XXX 2.50 Testing new font library - Diego + glColor3f(1.0, 0.0, 0.0); + BLF_aspect(1.0); + + BLF_size(14, 96); + BLF_position(5.0, 5.0, 0.0); + + width= BLF_width("Hello Blender, size 14, dpi 96"); + height= BLF_height("Hello Blender, size 14, dpi 96"); + + glRectf(7.0, 20.0, 7.0+width, 20.0+height); + glRectf(5.0+width+10.0, 3.0, 5.0+width+10.0+width, 3.0+height); + BLF_draw("Hello Blender, size 14, dpi 96"); + + glColor3f(0.0, 0.0, 1.0); + BLF_size(11, 96); + BLF_position(200.0, 50.0, 0.0); + BLF_rotation(45.0f); + BLF_draw("Another Hello Blender, size 11 and dpi 96!!"); + + glColor3f(0.8, 0.0, 0.7); + BLF_size(12, 72); + BLF_position(200.0, 100.0, 0.0); + BLF_rotation(180.0f); + BLF_draw("Hello World, size 12, dpi 72"); - + glColor3f(0.8, 0.7, 0.5); + BLF_size(12, 96); + BLF_position(5.0, 200.0, 0.0); + BLF_rotation(0.0f); + BLF_draw("And this make a new glyph cache!!"); + /* reset view matrix */ UI_view2d_view_restore(C); @@ -196,9 +228,14 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ switch(wmn->category) { + case NC_SCREEN: + if(wmn->data==ND_SCREENCAST) + ED_region_tag_redraw(ar); + break; case NC_SCENE: if(wmn->data==ND_RENDER_RESULT) ED_region_tag_redraw(ar); + break; } } diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index cc6fe4e9ebd..bf96d1c38aa 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -852,7 +852,7 @@ static char *node_image_type_pup(void) str[0]= 0; a= sprintf(str, "Image Type %%t|"); - a+= sprintf(str+a, " Image %%x%d %%i%d|", IMA_SRC_FILE, ICON_IMAGE_DEHLT); + a+= sprintf(str+a, " Image %%x%d %%i%d|", IMA_SRC_FILE, ICON_IMAGE_DATA); a+= sprintf(str+a, " Movie %%x%d %%i%d|", IMA_SRC_MOVIE, ICON_SEQUENCE); a+= sprintf(str+a, " Sequence %%x%d %%i%d|", IMA_SRC_SEQUENCE, ICON_IMAGE_COL); a+= sprintf(str+a, " Generated %%x%d %%i%d", IMA_SRC_GENERATED, ICON_BLANK1); @@ -920,7 +920,7 @@ static int node_composit_buts_image(uiBlock *block, bNodeTree *ntree, bNode *nod Image *ima= (Image *)node->id; short xmin= (short)butr->xmin, xmax= (short)butr->xmax; short width= xmax - xmin - 45; - short icon= ICON_IMAGE_DEHLT; + short icon= ICON_IMAGE_DATA; if(ima->source==IMA_SRC_MOVIE) icon= ICON_SEQUENCE; else if(ima->source==IMA_SRC_SEQUENCE) icon= ICON_IMAGE_COL; @@ -1086,7 +1086,7 @@ static int node_composit_buts_renderlayers(uiBlock *block, bNodeTree *ntree, bNo /* browse button layer */ strp= scene_layer_menu(node->id?(Scene *)node->id:scene); if(node->id) - bt= uiDefIconTextButS(block, MENU, B_NODE_EXEC, ICON_SCENE_DEHLT, strp, + bt= uiDefIconTextButS(block, MENU, B_NODE_EXEC, ICON_SCENE_DATA, strp, butr->xmin+20, butr->ymin, (butr->xmax-butr->xmin)-40, 19, &node->custom1, 0, 0, 0, 0, "Choose Render Layer"); else @@ -2443,7 +2443,7 @@ void node_rename_but(char *s) #endif -void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode) +void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode) { if((snode->flag & SNODE_BACKDRAW) && snode->treetype==NTREE_COMPOSIT) { @@ -2453,12 +2453,12 @@ void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode) float x, y; /* somehow the offset has to be calculated inverse */ - //glaDefine2DArea(&sa->winrct); + glaDefine2DArea(&ar->winrct); /* ortho at pixel level curarea */ - //myortho2(-0.375, sa->winx-0.375, -0.375, sa->winy-0.375); + wmOrtho2(-0.375, ar->winx-0.375, -0.375, ar->winy-0.375); - x = (sa->winx-ibuf->x)/2 + snode->xof; - y = (sa->winy-ibuf->y)/2 + snode->yof; + x = (ar->winx-ibuf->x)/2 + snode->xof; + y = (ar->winy-ibuf->y)/2 + snode->yof; if(ibuf->rect) glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); @@ -2466,9 +2466,8 @@ void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode) glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_FLOAT, ibuf->rect_float); /* sort this out, this should not be needed */ - //myortho2(snode->v2d.cur.xmin, snode->v2d.cur.xmax, snode->v2d.cur.ymin, snode->v2d.cur.ymax); - //bwin_clear_viewmat(sa->win); /* clear buttons view */ - // glLoadIdentity(); + wmOrtho2(ar->v2d.cur.xmin, ar->v2d.cur.xmax, ar->v2d.cur.ymin, ar->v2d.cur.ymax); + glLoadIdentity(); } } } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 39a2144e867..28deb705b7b 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -94,7 +94,7 @@ extern void ui_rasterpos_safe(float x, float y, float aspect); extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad); extern void ui_draw_tria_icon(float x, float y, float aspect, char dir); -#if 0 // XXX + static void snode_drawstring(void *curfont, SpaceNode *snode, char *str, int okwidth) { char drawstr[NODE_MAXSTR]; @@ -118,7 +118,7 @@ static void snode_drawstring(void *curfont, SpaceNode *snode, char *str, int okw } UI_DrawString(curfont, drawstr, 0); } -#endif + static void node_scaling_widget(int color_id, float aspect, float xmin, float ymin, float xmax, float ymax) { @@ -674,7 +674,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN if(node->flag & (NODE_ACTIVE_ID|NODE_DO_OUTPUT)) icon_id= ICON_MATERIAL; else - icon_id= ICON_MATERIAL_DEHLT; + icon_id= ICON_MATERIAL_DATA; iconofs-= 18.0f; glEnable(GL_BLEND); UI_icon_draw_aspect_blended(iconofs, rct->ymax-NODE_DY+2, icon_id, snode->aspect, -60); @@ -730,7 +730,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN else UI_ThemeColor(TH_TEXT); - // ui_rasterpos_safe(rct->xmin+19.0f, rct->ymax-NODE_DY+5.0f, snode->aspect); + ui_rasterpos_safe(rct->xmin+19.0f, rct->ymax-NODE_DY+5.0f, snode->aspect); if(node->flag & NODE_MUTED) sprintf(showname, "[%s]", node->name); @@ -739,11 +739,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN else BLI_strncpy(showname, node->name, 128); - block= uiBeginBlock(C, ar, "snode_drawstring_hack", UI_EMBOSSN, UI_HELV); - // snode_drawstring(block->curfont, snode, showname, (int)(iconofs - rct->xmin-18.0f)); - bt= uiDefBut(block, LABEL, 0, showname, (int)rct->xmin+19, (int)rct->ymax-NODE_DY+5, 100, 20, NULL, 0, 0, 0, 0, ""); - uiEndBlock(C, block); - block= NULL; + snode_drawstring(snode->curfont, snode, showname, (int)(iconofs - rct->xmin-18.0f)); /* body */ UI_ThemeColor4(TH_NODE); @@ -871,7 +867,6 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN static void node_draw_hidden(View2D *v2d, SpaceNode *snode, bNode *node) { -// uiBlock *block; // XXX HACK bNodeSocket *sock; rctf *rct= &node->totr; float dx, centy= 0.5f*(rct->ymax+rct->ymin); @@ -923,13 +918,7 @@ static void node_draw_hidden(View2D *v2d, SpaceNode *snode, bNode *node) else BLI_strncpy(showname, node->name, 128); - /* XXX - block= uiBeginBlock(C, ar, "snode_drawstring_hack", UI_EMBOSSN, UI_HELV); - // snode_drawstring(block->curfont, snode, showname, (int)(iconofs - rct->xmin-18.0f)); - bt= uiDefBut(block, LABEL, 0, showname, rct->xmin+21, centy-4, 100, 20, NULL, 0, 0, 0, 0, ""); - uiEndBlock(C, block); - */ - + snode_drawstring(snode->curfont, snode, showname, (int)(rct->xmax - rct->xmin-18.0f -12.0f)); } /* scale widget thing */ @@ -1092,7 +1081,6 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) float col[3]; View2DScrollers *scrollers; SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C); - ScrArea *sa= CTX_wm_area(C); UI_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0); @@ -1112,7 +1100,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) UI_view2d_constant_grid_draw(C, v2d); /* backdrop */ - draw_nodespace_back_pix(sa, snode); + draw_nodespace_back_pix(ar, snode); /* nodes */ snode_set_context(snode, CTX_data_scene(C)); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 22e90d949e3..85812438a2e 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -204,7 +204,7 @@ bNode *editnode_get_active(bNodeTree *ntree) return nodeGetActive(ntree); } -static void snode_handle_recalc(bContext *C, SpaceNode *snode) +void snode_handle_recalc(bContext *C, SpaceNode *snode) { if(snode->treetype==NTREE_SHADER) WM_event_add_notifier(C, NC_MATERIAL|ND_NODES, snode->id); @@ -1399,7 +1399,7 @@ void node_active_link_viewer(SpaceNode *snode) /*static*/ int node_mouse_groupheader(SpaceNode *snode) { bNode *gnode; - float mx, my; + float mx=0, my=0; // XXX short mval[2]; gnode= snode_get_editgroup(snode); diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c index fb21b894ce7..d2e7df55e54 100644 --- a/source/blender/editors/space_node/node_header.c +++ b/source/blender/editors/space_node/node_header.c @@ -125,12 +125,8 @@ static uiBlock *node_selectmenu(bContext *C, ARegion *ar, void *arg_unused) void do_node_addmenu(bContext *C, void *arg, int event) { - // XXX enable - // ScrArea *curarea= CTX_wm_area(C); SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C); bNode *node; - //float locx, locy; - //short mval[2]; /* store selection in temp test flag */ for(node= snode->edittree->nodes.first; node; node= node->next) { @@ -138,15 +134,12 @@ void do_node_addmenu(bContext *C, void *arg, int event) else node->flag &= ~NODE_TEST; } - // toolbox_mousepos(mval, 0 ); /* get initial mouse position */ - // areamouseco_to_ipoco(G.v2d, mval, &locx, &locy); - // NODE_FIX_ME - node= node_add_node(snode, CTX_data_scene(C), event, 0.0, 0.0); + node= node_add_node(snode, CTX_data_scene(C), event, snode->mx, snode->my); /* uses test flag */ - // XXX snode_autoconnect(snode, node, NODE_TEST); + snode_autoconnect(snode, node, NODE_TEST); - // XXX addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC); + snode_handle_recalc(C, snode); } static void node_make_addmenu(bContext *C, int nodeclass, uiBlock *block) @@ -739,13 +732,13 @@ void node_header_buttons(const bContext *C, ARegion *ar) /* main type choosing */ uiBlockBeginAlign(block); - uiDefIconButI(block, ROW, B_REDR, ICON_MATERIAL_DEHLT, xco,yco,XIC,YIC-2, + uiDefIconButI(block, ROW, B_REDR, ICON_MATERIAL_DATA, xco,yco,XIC,YIC-2, &(snode->treetype), 2.0f, 0.0f, 0.0f, 0.0f, "Material Nodes"); xco+= XIC; - uiDefIconButI(block, ROW, B_REDR, ICON_IMAGE_DEHLT, xco,yco,XIC,YIC-2, + uiDefIconButI(block, ROW, B_REDR, ICON_IMAGE_DATA, xco,yco,XIC,YIC-2, &(snode->treetype), 2.0f, 1.0f, 0.0f, 0.0f, "Composite Nodes"); xco+= XIC; - uiDefIconButI(block, ROW, B_REDR, ICON_TEXTURE_DEHLT, xco,yco,XIC,YIC-2, + uiDefIconButI(block, ROW, B_REDR, ICON_TEXTURE_DATA, xco,yco,XIC,YIC-2, &(snode->treetype), 2.0f, 2.0f, 0.0f, 0.0f, "Texture Nodes"); xco+= 2*XIC; uiBlockEndAlign(block); @@ -774,7 +767,7 @@ void node_header_buttons(const bContext *C, ARegion *ar) xco+= 100; uiDefButBitI(block, TOG, R_COMP_FREE, B_NOP, "Free Unused", xco+5,yco,100,19, &scene->r.scemode, 0.0f, 0.0f, 0, 0, "Free Nodes that are not used while composite"); xco+= 100; - uiDefButBitS(block, TOG, SNODE_BACKDRAW, REDRAWNODE, "Backdrop", xco+5,yco,90,19, &snode->flag, 0.0f, 0.0f, 0, 0, "Use active Viewer Node output as backdrop"); + uiDefButBitS(block, TOG, SNODE_BACKDRAW, B_REDR, "Backdrop", xco+5,yco,90,19, &snode->flag, 0.0f, 0.0f, 0, 0, "Use active Viewer Node output as backdrop"); xco+= 90; } else if(snode->treetype==NTREE_TEXTURE) { diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 069f25fdbdb..de3999ae5cb 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -64,9 +64,10 @@ void NODE_OT_border_select(struct 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 th_col2, int do_shaded); int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, float coord_array[][2], int resol); -void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode); +void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode); /* node_edit.c */ +void snode_handle_recalc(bContext *C, SpaceNode *snode); bNode *next_node(bNodeTree *ntree); bNode *node_add_node(SpaceNode *snode, Scene *scene, int type, float locx, float locy); void snode_set_context(SpaceNode *snode, Scene *scene); @@ -79,6 +80,7 @@ void node_composit_default(Scene *sce); void node_texture_default(Tex *tx); void snode_composite_job(const struct bContext *C, ScrArea *sa); bNode *snode_get_editgroup(SpaceNode *snode); +void snode_autoconnect(SpaceNode *snode, bNode *node_to, int flag); void NODE_OT_link(struct wmOperatorType *ot); void NODE_OT_delete_selection(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 3e2d5edd4ed..3fb640e34ba 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -132,7 +132,6 @@ /* ************* XXX **************** */ -static void allqueue() {} static void BIF_undo_push() {} static void BIF_preview_changed() {} static void error() {} @@ -1465,9 +1464,6 @@ void outliner_toggle_visibility(Scene *scene, SpaceOops *soops) BIF_undo_push("Outliner toggle selectability"); - allqueue(REDRAWVIEW3D, 1); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWINFO, 1); } static void object_toggle_selectability_cb(TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem) @@ -1488,9 +1484,6 @@ void outliner_toggle_selectability(Scene *scene, SpaceOops *soops) BIF_undo_push("Outliner toggle selectability"); - allqueue(REDRAWVIEW3D, 1); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWINFO, 1); } void object_toggle_renderability_cb(TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem) @@ -1511,9 +1504,6 @@ void outliner_toggle_renderability(Scene *scene, SpaceOops *soops) BIF_undo_push("Outliner toggle renderability"); - allqueue(REDRAWVIEW3D, 1); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWINFO, 1); } void outliner_toggle_visible(SpaceOops *soops) @@ -1641,7 +1631,6 @@ static int tree_element_active_renderlayer(TreeElement *te, TreeStoreElem *tsele if(set) { sce->r.actlay= tselem->nr; - allqueue(REDRAWBUTSSCENE, 0); } else { return sce->r.actlay==tselem->nr; @@ -1733,10 +1722,6 @@ static int tree_element_active_material(Scene *scene, SpaceOops *soops, TreeElem if(set) { // XXX extern_set_butspace(F5KEY, 0); // force shading buttons BIF_preview_changed(ID_MA); - allqueue(REDRAWBUTSSHADING, 1); - allqueue(REDRAWNODE, 0); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWIPO, 0); } return 0; } @@ -1823,9 +1808,6 @@ static int tree_element_active_lamp(Scene *scene, SpaceOops *soops, TreeElement if(set) { // XXX extern_set_butspace(F5KEY, 0); BIF_preview_changed(ID_LA); - allqueue(REDRAWBUTSSHADING, 1); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWIPO, 0); } else return 1; @@ -1870,7 +1852,6 @@ static int tree_element_active_defgroup(Scene *scene, TreeElement *te, TreeStore if(set) { ob->actdef= te->index+1; DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - allqueue(REDRAWVIEW3D, ob->ipowin); } else { if(ob==OBACT) @@ -1886,7 +1867,6 @@ static int tree_element_active_posegroup(Scene *scene, TreeElement *te, TreeStor if(set) { if (ob->pose) { ob->pose->active_group= te->index+1; - allqueue(REDRAWBUTSEDIT, 0); } } else { @@ -1909,9 +1889,6 @@ static int tree_element_active_posechannel(Scene *scene, TreeElement *te, TreeSt // else deselectall_posearmature(ob, 0, 0); // 0 = deselect pchan->bone->flag |= BONE_SELECTED|BONE_ACTIVE; - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWACTION, 0); } } else { @@ -1933,9 +1910,6 @@ static int tree_element_active_bone(Scene *scene, TreeElement *te, TreeStoreElem // else deselectall_posearmature(OBACT, 0, 0); bone->flag |= BONE_SELECTED|BONE_ACTIVE; - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWACTION, 0); } } else { @@ -1965,9 +1939,6 @@ static int tree_element_active_ebone(TreeElement *te, TreeStoreElem *tselem, int // flush to parent? if(ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag |= BONE_TIPSEL; - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWACTION, 0); } } else { @@ -2053,7 +2024,6 @@ static int tree_element_active_sequence(TreeElement *te, TreeStoreElem *tselem, if(set) { // XXX select_single_seq(seq, 1); - allqueue(REDRAWSEQ, 0); } else { if(seq->flag & SELECT) @@ -2086,7 +2056,6 @@ static int tree_element_active_sequence_dup(Scene *scene, TreeElement *te, TreeS // XXX select_single_seq(p, 0); p= p->next; } - allqueue(REDRAWSEQ, 0); return(0); } @@ -2917,7 +2886,6 @@ static void sequence_cb(int event, TreeElement *te, TreeStoreElem *tselem) // Sequence *seq= (Sequence*) te->directdata; if(event==1) { // XXX select_single_seq(seq, 1); - allqueue(REDRAWSEQ, 0); } } @@ -2950,7 +2918,6 @@ void outliner_del(Scene *scene, ARegion *ar, SpaceOops *soops) // DAG_scene_sort(scene); // BIF_undo_push("Delete Objects"); // } -// allqueue(REDRAWALL, 0); } @@ -3005,7 +2972,6 @@ void outliner_operation_menu(Scene *scene, ARegion *ar, SpaceOops *soops) } BIF_undo_push(str); - allqueue(REDRAWALL, 0); } } else if(idlevel) { @@ -3023,11 +2989,9 @@ void outliner_operation_menu(Scene *scene, ARegion *ar, SpaceOops *soops) case ID_MA: outliner_do_libdata_operation(soops, &soops->tree, unlink_material_cb); BIF_undo_push("Unlink material"); - allqueue(REDRAWBUTSSHADING, 1); break; case ID_TE: outliner_do_libdata_operation(soops, &soops->tree, unlink_texture_cb); - allqueue(REDRAWBUTSSHADING, 1); BIF_undo_push("Unlink texture"); break; case ID_GR: @@ -3037,12 +3001,10 @@ void outliner_operation_menu(Scene *scene, ARegion *ar, SpaceOops *soops) default: error("Not yet..."); } - allqueue(REDRAWALL, 0); } else if(event==2) { outliner_do_libdata_operation(soops, &soops->tree, id_local_cb); BIF_undo_push("Localized Data"); - allqueue(REDRAWALL, 0); } else if(event==3 && idlevel==ID_GR) { outliner_do_libdata_operation(soops, &soops->tree, group_linkobs2scene_cb); @@ -3081,9 +3043,6 @@ void outliner_operation_menu(Scene *scene, ARegion *ar, SpaceOops *soops) } } - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWBUTSALL, 0); - allqueue(REDRAWVIEW3D, 0); } } } @@ -3098,9 +3057,6 @@ enum { KEYINGSET_EDITMODE_REMOVE, } eKeyingSet_EditModes; -/* typedef'd function-prototype style for KeyingSet operation callbacks */ -typedef void (*ksEditOp)(SpaceOops *soops, KeyingSet *ks, TreeElement *te, TreeStoreElem *tselem); - /* Utilities ---------------------------------- */ /* specialised poll callback for these operators to work in Datablocks view only */ @@ -3139,19 +3095,20 @@ static KeyingSet *verify_active_keyingset(Scene *scene, short add) return ks; } -/* helper func to add a new KeyingSet Path */ -static void ks_editop_add_cb(SpaceOops *soops, KeyingSet *ks, TreeElement *te, TreeStoreElem *tselem) +/* Helper func to extract an RNA path from seleted tree element + * NOTE: the caller must zero-out all values of the pointers that it passes here first, as + * this function does not do that yet + */ +static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, + ID **id, char **path, int *array_index, short *flag, short *groupmode) { ListBase hierarchy = {NULL, NULL}; LinkData *ld; - TreeElement *tem; - TreeStoreElem *tse; - PointerRNA *ptr; - PropertyRNA *prop; - ID *id = NULL; - char *path=NULL, *newpath=NULL; - int array_index= 0; - int flag= KSP_FLAG_GROUP_KSNAME; + TreeElement *tem, *temnext, *temsub; + TreeStoreElem *tse, *tsenext; + PointerRNA *ptr, *nextptr; + PropertyRNA *prop, *nameprop; + char *newpath=NULL; /* optimise tricks: * - Don't do anything if the selected item is a 'struct', but arrays are allowed @@ -3159,8 +3116,6 @@ static void ks_editop_add_cb(SpaceOops *soops, KeyingSet *ks, TreeElement *te, T if (tselem->type == TSE_RNA_STRUCT) return; - //printf("ks_editop_add_cb() \n"); - /* Overview of Algorithm: * 1. Go up the chain of parents until we find the 'root', taking note of the * levels encountered in reverse-order (i.e. items are added to the start of the list @@ -3169,7 +3124,6 @@ static void ks_editop_add_cb(SpaceOops *soops, KeyingSet *ks, TreeElement *te, T * (which will become the 'ID' for the KeyingSet Path), and build a * path as we step through the chain */ - // XXX do we want to separate this part out to a helper func for the other editing op at some point? /* step 1: flatten out hierarchy of parents into a flat chain */ for (tem= te->parent; tem; tem= tem->parent) { @@ -3187,63 +3141,99 @@ static void ks_editop_add_cb(SpaceOops *soops, KeyingSet *ks, TreeElement *te, T prop= tem->directdata; /* check if we're looking for first ID, or appending to path */ - if (id) { + if (*id) { /* just 'append' property to path * - to prevent memory leaks, we must write to newpath not path, then free old path + swap them */ - // TODO: how to do this? we must use 'string' identifiers for collections so that these don't break if data is added/removed - //newpath= RNA_path_append(path, NULL, prop, index, NULL); - if (path) MEM_freeN(path); - path= newpath; + if(tse->type == TSE_RNA_PROPERTY) { + if(RNA_property_type(ptr, prop) == PROP_POINTER) { + /* for pointer we just append property name */ + newpath= RNA_path_append(*path, ptr, prop, 0, NULL); + } + else if(RNA_property_type(ptr, prop) == PROP_COLLECTION) { + temnext= (TreeElement*)(ld->next->data); + tsenext= TREESTORE(temnext); + + nextptr= &temnext->rnaptr; + nameprop= RNA_struct_name_property(nextptr); + + if(nameprop) { + /* if possible, use name as a key in the path */ + char buf[128], *name; + name= RNA_property_string_get_alloc(nextptr, nameprop, buf, sizeof(buf)); + + newpath= RNA_path_append(*path, NULL, prop, 0, name); + + if(name != buf) + MEM_freeN(name); + } + else { + /* otherwise use index */ + int index= 0; + + for(temsub=tem->subtree.first; temsub; temsub=temsub->next, index++) + if(temsub == temnext) + break; + + newpath= RNA_path_append(*path, NULL, prop, index, NULL); + } + + ld= ld->next; + } + } + + if(newpath) { + if (*path) MEM_freeN(*path); + *path= newpath; + newpath= NULL; + } } else { /* no ID, so check if entry is RNA-struct, and if that RNA-struct is an ID datablock to extract info from */ if (tse->type == TSE_RNA_STRUCT) { /* ptr->data not ptr->id.data seems to be the one we want, since ptr->data is sometimes the owner of this ID? */ - if (RNA_struct_is_ID(ptr)) - id= (ID *)ptr->data; + if(RNA_struct_is_ID(ptr)) { + *id= (ID *)ptr->data; + + /* clear path */ + if(*path) { + MEM_freeN(*path); + path= NULL; + } + } } } } - + /* step 3: if we've got an ID, add the current item to the path */ - if (id) { + if (*id) { /* add the active property to the path */ - // if array base, add KSP_FLAG_WHOLE_ARRAY ptr= &te->rnaptr; prop= te->directdata; /* array checks */ if (tselem->type == TSE_RNA_ARRAY_ELEM) { /* item is part of an array, so must set the array_index */ - array_index= te->index; + *array_index= te->index; } else if (RNA_property_array_length(ptr, prop)) { /* entire array was selected, so keyframe all */ - flag |= KSP_FLAG_WHOLE_ARRAY; + *flag |= KSP_FLAG_WHOLE_ARRAY; } /* path */ - newpath= RNA_path_append(path, NULL, prop, 0, NULL); - if (path) MEM_freeN(path); - path= newpath; - - printf("Adding KeyingSet '%s': Path %s %d \n", ks->name, path, array_index); - - /* add a new path with the information obtained (only if valid) */ - // TODO: what do we do with group name? for now, we don't supply one, and just let this use the KeyingSet name - if (path) - BKE_keyingset_add_destination(ks, id, NULL, path, array_index, flag); + newpath= RNA_path_append(*path, NULL, prop, 0, NULL); + if (*path) MEM_freeN(*path); + *path= newpath; } - + /* free temp data */ - if (path) MEM_freeN(path); BLI_freelistN(&hierarchy); } /* Recursively iterate over tree, finding and working on selected items */ -static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBase *tree, ksEditOp edit_cb) +static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBase *tree, short mode) { TreeElement *te; TreeStoreElem *tselem; @@ -3253,12 +3243,54 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa /* if item is selected, perform operation */ if (tselem->flag & TSE_SELECTED) { - if (edit_cb) edit_cb(soops, ks, te, tselem); + ID *id= NULL; + char *path= NULL; + int array_index= 0; + short flag= 0; + short groupmode= KSP_GROUP_KSNAME; + + /* get id + path + index info from the selected element */ + tree_element_to_path(soops, te, tselem, + &id, &path, &array_index, &flag, &groupmode); + + /* only if ID and path were set, should we perform any actions */ + if (id && path) { + /* action depends on mode */ + switch (mode) { + case KEYINGSET_EDITMODE_ADD: + { + /* add a new path with the information obtained (only if valid) */ + // TODO: what do we do with group name? for now, we don't supply one, and just let this use the KeyingSet name + BKE_keyingset_add_destination(ks, id, NULL, path, array_index, flag, groupmode); + } + break; + case KEYINGSET_EDITMODE_REMOVE: + { + /* find the relevant path, then remove it from the KeyingSet */ + KS_Path *ksp= BKE_keyingset_find_destination(ks, id, NULL, path, array_index, groupmode); + + if (ksp) { + /* free path's data */ + // TODO: we probably need an API method for this + if (ksp->rna_path) MEM_freeN(ksp->rna_path); + + /* remove path from set */ + BLI_freelinkN(&ks->paths, ksp); + } + } + break; + } + + /* free path, since it had to be generated */ + MEM_freeN(path); + } + + } /* go over sub-tree */ if ((tselem->flag & TSE_CLOSED)==0) - do_outliner_keyingset_editop(soops, ks, &te->subtree, edit_cb); + do_outliner_keyingset_editop(soops, ks, &te->subtree, mode); } } @@ -3279,8 +3311,7 @@ static int outliner_keyingset_additems_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* recursively go into tree, adding selected items */ - // TODO: make the last arg a callback func instead... - do_outliner_keyingset_editop(soutliner, ks, &soutliner->tree, ks_editop_add_cb); + do_outliner_keyingset_editop(soutliner, ks, &soutliner->tree, KEYINGSET_EDITMODE_ADD); /* send notifiers */ WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL); @@ -3305,6 +3336,25 @@ void OUTLINER_OT_keyingset_add_selected(wmOperatorType *ot) /* Remove Operator ---------------------------------- */ +static int outliner_keyingset_removeitems_exec(bContext *C, wmOperator *op) +{ + SpaceOops *soutliner= (SpaceOops*)CTX_wm_space_data(C); + Scene *scene= CTX_data_scene(C); + KeyingSet *ks= verify_active_keyingset(scene, 1); + + /* check for invalid states */ + if (soutliner == NULL) + return OPERATOR_CANCELLED; + + /* recursively go into tree, adding selected items */ + do_outliner_keyingset_editop(soutliner, ks, &soutliner->tree, KEYINGSET_EDITMODE_REMOVE); + + /* send notifiers */ + WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL); + + return OPERATOR_FINISHED; +} + void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot) { /* identifiers */ @@ -3312,6 +3362,7 @@ void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot) ot->name= "Keyingset Remove Selected"; /* api callbacks */ + ot->exec= outliner_keyingset_removeitems_exec; ot->poll= ed_operator_outliner_datablocks_active; /* flags */ @@ -3325,7 +3376,7 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen if(tselem->type) { switch( tselem->type) { case TSE_ANIM_DATA: - UI_icon_draw(x, y, ICON_IPO_DEHLT); break; // xxx + UI_icon_draw(x, y, ICON_ANIM_DATA); break; // xxx case TSE_NLA: UI_icon_draw(x, y, ICON_NLA); break; case TSE_NLA_ACTION: @@ -3334,13 +3385,13 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen UI_icon_draw(x, y, ICON_VGROUP); break; case TSE_BONE: case TSE_EBONE: - UI_icon_draw(x, y, ICON_BONE_DEHLT); break; + UI_icon_draw(x, y, ICON_BONE_DATA); break; case TSE_CONSTRAINT_BASE: UI_icon_draw(x, y, ICON_CONSTRAINT); break; case TSE_MODIFIER_BASE: UI_icon_draw(x, y, ICON_MODIFIER); break; case TSE_LINKED_OB: - UI_icon_draw(x, y, ICON_OBJECT); break; + UI_icon_draw(x, y, ICON_OBJECT_DATA); break; case TSE_LINKED_PSYS: UI_icon_draw(x, y, ICON_PARTICLES); break; case TSE_MODIFIER: @@ -3390,19 +3441,19 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen case TSE_SCRIPT_BASE: UI_icon_draw(x, y, ICON_TEXT); break; case TSE_POSE_BASE: - UI_icon_draw(x, y, ICON_ARMATURE); break; + UI_icon_draw(x, y, ICON_ARMATURE_DATA); break; case TSE_POSE_CHANNEL: - UI_icon_draw(x, y, ICON_BONE_DEHLT); break; + UI_icon_draw(x, y, ICON_BONE_DATA); break; case TSE_PROXY: UI_icon_draw(x, y, ICON_GHOST); break; case TSE_R_LAYER_BASE: UI_icon_draw(x, y, ICON_RENDERLAYERS); break; case TSE_R_LAYER: - UI_icon_draw(x, y, ICON_IMAGE_DEHLT); break; + UI_icon_draw(x, y, ICON_RENDER_RESULT); break; case TSE_LINKED_LAMP: - UI_icon_draw(x, y, ICON_LAMP_DEHLT); break; + UI_icon_draw(x, y, ICON_LAMP_DATA); break; case TSE_LINKED_MAT: - UI_icon_draw(x, y, ICON_MATERIAL_DEHLT); break; + UI_icon_draw(x, y, ICON_MATERIAL_DATA); break; case TSE_POSEGRP_BASE: UI_icon_draw(x, y, ICON_VERTEXSEL); break; case TSE_SEQUENCE: @@ -3420,10 +3471,10 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen UI_icon_draw(x, y, ICON_PARTICLES); break; case TSE_SEQ_STRIP: - UI_icon_draw(x, y, ICON_LIBRARY_DEHLT); + UI_icon_draw(x, y, ICON_LIBRARY_DATA_DIRECT); break; case TSE_SEQUENCE_DUP: - UI_icon_draw(x, y, ICON_OBJECT); + UI_icon_draw(x, y, ICON_OBJECT_DATA); break; case TSE_RNA_STRUCT: UI_icon_draw(x, y, UI_GetIconRNA(&te->rnaptr)); @@ -3461,7 +3512,7 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen else { switch( GS(tselem->id->name)) { case ID_SCE: - UI_icon_draw(x, y, ICON_SCENE_DEHLT); break; + UI_icon_draw(x, y, ICON_SCENE_DATA); break; case ID_ME: UI_icon_draw(x, y, ICON_OUTLINER_DATA_MESH); break; case ID_CU: @@ -3473,11 +3524,11 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen case ID_LA: UI_icon_draw(x, y, ICON_OUTLINER_DATA_LAMP); break; case ID_MA: - UI_icon_draw(x, y, ICON_MATERIAL_DEHLT); break; + UI_icon_draw(x, y, ICON_MATERIAL_DATA); break; case ID_TE: - UI_icon_draw(x, y, ICON_TEXTURE_DEHLT); break; + UI_icon_draw(x, y, ICON_TEXTURE_DATA); break; case ID_IM: - UI_icon_draw(x, y, ICON_IMAGE_DEHLT); break; + UI_icon_draw(x, y, ICON_IMAGE_DATA); break; case ID_SO: UI_icon_draw(x, y, ICON_SPEAKER); break; case ID_AR: @@ -3485,9 +3536,9 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen case ID_CA: UI_icon_draw(x, y, ICON_OUTLINER_DATA_CAMERA); break; case ID_KE: - UI_icon_draw(x, y, ICON_SHAPEKEY); break; + UI_icon_draw(x, y, ICON_SHAPEKEY_DATA); break; case ID_WO: - UI_icon_draw(x, y, ICON_WORLD_DEHLT); break; + UI_icon_draw(x, y, ICON_WORLD_DATA); break; case ID_AC: UI_icon_draw(x, y, ICON_ACTION); break; case ID_NLA: @@ -3497,7 +3548,7 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen case ID_GR: UI_icon_draw(x, y, ICON_GROUP); break; case ID_LI: - UI_icon_draw(x, y, ICON_LIBRARY_DEHLT); break; + UI_icon_draw(x, y, ICON_LIBRARY_DATA_DIRECT); break; } } } @@ -3638,9 +3689,9 @@ static void outliner_draw_tree_element(Scene *scene, ARegion *ar, SpaceOops *soo if(tselem->type==0 && tselem->id->lib) { glPixelTransferf(GL_ALPHA_SCALE, 0.5f); if(tselem->id->flag & LIB_INDIRECT) - UI_icon_draw((float)startx+offsx, (float)*starty+2, ICON_LIBRARY_HLT); + UI_icon_draw((float)startx+offsx, (float)*starty+2, ICON_LIBRARY_DATA_INDIRECT); else - UI_icon_draw((float)startx+offsx, (float)*starty+2, ICON_LIBRARY_DEHLT); + UI_icon_draw((float)startx+offsx, (float)*starty+2, ICON_LIBRARY_DATA_DIRECT); glPixelTransferf(GL_ALPHA_SCALE, 1.0f); offsx+= OL_X; } @@ -3877,8 +3928,6 @@ static void restrictbutton_view_cb(bContext *C, void *poin, void *poin2) } } - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWVIEW3D, 0); } static void restrictbutton_sel_cb(bContext *C, void *poin, void *poin2) @@ -3900,21 +3949,15 @@ static void restrictbutton_sel_cb(bContext *C, void *poin, void *poin2) } } - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWVIEW3D, 0); } static void restrictbutton_rend_cb(bContext *C, void *poin, void *poin2) { - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWVIEW3D, 0); } static void restrictbutton_r_lay_cb(bContext *C, void *poin, void *poin2) { - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWNODE, 0); - allqueue(REDRAWBUTSSCENE, 0); + /* XXX redraws */ } static void restrictbutton_modifier_cb(bContext *C, void *poin, void *poin2) @@ -3925,17 +3968,11 @@ static void restrictbutton_modifier_cb(bContext *C, void *poin, void *poin2) DAG_object_flush_update(scene, ob, OB_RECALC_DATA); object_handle_update(scene, ob); - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSEDIT, 0); - allqueue(REDRAWBUTSOBJECT, 0); } static void restrictbutton_bone_cb(bContext *C, void *poin, void *poin2) { - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWBUTSEDIT, 0); + /* XXX redraws */ } static void namebutton_cb(bContext *C, void *tep, void *oldnamep) @@ -3965,7 +4002,6 @@ static void namebutton_cb(bContext *C, void *tep, void *oldnamep) switch(tselem->type) { case TSE_DEFGROUP: unique_vertexgroup_name(te->directdata, (Object *)tselem->id); // id = object - allqueue(REDRAWBUTSEDIT, 0); break; case TSE_NLA_ACTION: test_idbutton(tselem->id->name+2); @@ -3982,9 +4018,6 @@ static void namebutton_cb(bContext *C, void *tep, void *oldnamep) BLI_strncpy(ebone->name, oldnamep, 32); // XXX armature_bone_rename(obedit->data, oldnamep, newname); } - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWVIEW3D, 1); - allqueue(REDRAWBUTSEDIT, 0); } break; @@ -4003,9 +4036,6 @@ static void namebutton_cb(bContext *C, void *tep, void *oldnamep) BLI_strncpy(bone->name, oldnamep, 32); // XXX armature_bone_rename(ob->data, oldnamep, newname); } - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWVIEW3D, 1); - allqueue(REDRAWBUTSEDIT, 0); break; case TSE_POSE_CHANNEL: { @@ -4022,9 +4052,6 @@ static void namebutton_cb(bContext *C, void *tep, void *oldnamep) BLI_strncpy(pchan->name, oldnamep, 32); // XXX armature_bone_rename(ob->data, oldnamep, newname); } - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWVIEW3D, 1); - allqueue(REDRAWBUTSEDIT, 0); break; case TSE_POSEGRP: { @@ -4032,12 +4059,9 @@ static void namebutton_cb(bContext *C, void *tep, void *oldnamep) bActionGroup *grp= te->directdata; BLI_uniquename(&ob->pose->agroups, grp, "Group", offsetof(bActionGroup, name), 32); - allqueue(REDRAWBUTSEDIT, 0); } break; case TSE_R_LAYER: - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWBUTSSCENE, 0); break; } } @@ -4059,17 +4083,17 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar ob = (Object *)tselem->id; uiBlockSetEmboss(block, UI_EMBOSSN); - bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_VIEW, REDRAWALL, ICON_RESTRICT_VIEW_OFF, + bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_VIEW, 0, ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_view_cb, scene, ob); uiButSetFlag(bt, UI_NO_HILITE); - bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_SELECT, REDRAWALL, ICON_RESTRICT_SELECT_OFF, + bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_SELECT, 0, ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View"); uiButSetFunc(bt, restrictbutton_sel_cb, scene, ob); uiButSetFlag(bt, UI_NO_HILITE); - bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_RENDER, REDRAWALL, ICON_RESTRICT_RENDER_OFF, + bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_RENDER, 0, ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow renderability"); uiButSetFunc(bt, restrictbutton_rend_cb, NULL, NULL); uiButSetFlag(bt, UI_NO_HILITE); @@ -4080,7 +4104,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar else if(tselem->type==TSE_R_LAYER) { uiBlockSetEmboss(block, UI_EMBOSSN); - bt= uiDefIconButBitI(block, ICONTOGN, SCE_LAY_DISABLE, REDRAWBUTSSCENE, ICON_CHECKBOX_HLT-1, + bt= uiDefIconButBitI(block, ICONTOGN, SCE_LAY_DISABLE, 0, ICON_CHECKBOX_HLT-1, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, te->directdata, 0, 0, 0, 0, "Render this RenderLayer"); uiButSetFunc(bt, restrictbutton_r_lay_cb, NULL, NULL); @@ -4091,13 +4115,13 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar uiBlockSetEmboss(block, UI_EMBOSSN); /* NOTE: tselem->nr is short! */ - bt= uiDefIconButBitI(block, ICONTOG, tselem->nr, REDRAWBUTSSCENE, ICON_CHECKBOX_HLT-1, + bt= uiDefIconButBitI(block, ICONTOG, tselem->nr, 0, ICON_CHECKBOX_HLT-1, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Render this Pass"); uiButSetFunc(bt, restrictbutton_r_lay_cb, NULL, NULL); layflag++; /* is lay_xor */ if(ELEM6(tselem->nr, SCE_PASS_SPEC, SCE_PASS_SHADOW, SCE_PASS_AO, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_RADIO)) - bt= uiDefIconButBitI(block, TOG, tselem->nr, REDRAWBUTSSCENE, (*layflag & tselem->nr)?ICON_DOT:ICON_BLANK1, + bt= uiDefIconButBitI(block, TOG, tselem->nr, 0, (*layflag & tselem->nr)?ICON_DOT:ICON_BLANK1, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined"); uiButSetFunc(bt, restrictbutton_r_lay_cb, NULL, NULL); @@ -4108,12 +4132,12 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar ob = (Object *)tselem->id; uiBlockSetEmboss(block, UI_EMBOSSN); - bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Realtime, REDRAWALL, ICON_RESTRICT_VIEW_OFF, + bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Realtime, 0, ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_modifier_cb, scene, ob); uiButSetFlag(bt, UI_NO_HILITE); - bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Render, REDRAWALL, ICON_RESTRICT_RENDER_OFF, + bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Render, 0, ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability"); uiButSetFunc(bt, restrictbutton_modifier_cb, scene, ob); uiButSetFlag(bt, UI_NO_HILITE); @@ -4123,7 +4147,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar Bone *bone = pchan->bone; uiBlockSetEmboss(block, UI_EMBOSSN); - bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, REDRAWALL, ICON_RESTRICT_VIEW_OFF, + bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, 0, ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL); uiButSetFlag(bt, UI_NO_HILITE); @@ -4132,7 +4156,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar EditBone *ebone= (EditBone *)te->directdata; uiBlockSetEmboss(block, UI_EMBOSSN); - bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, REDRAWALL, ICON_RESTRICT_VIEW_OFF, + bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, 0, ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL); uiButSetFlag(bt, UI_NO_HILITE); diff --git a/source/blender/editors/space_outliner/outliner_header.c b/source/blender/editors/space_outliner/outliner_header.c index f5b93254693..b42f6ec16ff 100644 --- a/source/blender/editors/space_outliner/outliner_header.c +++ b/source/blender/editors/space_outliner/outliner_header.c @@ -291,6 +291,16 @@ void outliner_header_buttons(const bContext *C, ARegion *ar) uiDefIconButO(block, BUT, "OUTLINER_OT_keyingset_add_selected", WM_OP_INVOKE_REGION_WIN, ICON_ZOOMIN, xco,yco,XIC,YIC, "Add selected properties to active Keying Set (K)"); xco += XIC; uiBlockEndAlign(block); + + xco += 10; + + /* operator buttons to insert/delete keyframes for the active set */ + uiBlockBeginAlign(block); + uiDefIconButO(block, BUT, "ANIM_OT_delete_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_DEHLT, xco,yco,XIC,YIC, "Delete Keyframes for the Active Keying Set (Alt-I)"); + xco+= XIC; + uiDefIconButO(block, BUT, "ANIM_OT_insert_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_HLT, xco,yco,XIC,YIC, "Insert Keyframes for the Active Keying Set (I)"); + xco+= XIC; + uiBlockEndAlign(block); } xco += XIC*2; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index ea1b36af137..a9a3591c54f 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -255,51 +255,45 @@ int mouse_frame_side(View2D *v2d, short mouse_x, int frame ) /* choose the side based on which side of the playhead the mouse is on */ UI_view2d_region_to_view(v2d, mval[0], mval[1], &mouseloc[0], &mouseloc[1]); - return mouseloc[0] > frame; + return mouseloc[0] > frame ? SEQ_SIDE_RIGHT : SEQ_SIDE_LEFT; } Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int sel) { -/* looks to the left on lr==1, to the right on lr==2 - sel - 0==unselected, 1==selected, -1==done care*/ + /* sel - 0==unselected, 1==selected, -1==done care*/ Sequence *seq; Editing *ed= seq_give_editing(scene, FALSE); - if(ed==NULL) return NULL; if (sel>0) sel = SELECT; - seq= ed->seqbasep->first; - while(seq) { + for(seq= ed->seqbasep->first; seq; seq= seq->next) { if( (seq!=test) && (test->machine==seq->machine) && - (test->depth==seq->depth) && ((sel == -1) || (sel && (seq->flag & SELECT)) || (sel==0 && (seq->flag & SELECT)==0) )) { switch (lr) { - case 1: + case SEQ_SIDE_LEFT: if (test->startdisp == (seq->enddisp)) { return seq; } break; - case 2: + case SEQ_SIDE_RIGHT: if (test->enddisp == (seq->startdisp)) { return seq; } break; } } - seq= seq->next; } return NULL; } Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, int sel) { -/* looks to the left on lr==1, to the right on lr==2 - sel - 0==unselected, 1==selected, -1==done care*/ + /* sel - 0==unselected, 1==selected, -1==done care*/ Sequence *seq,*best_seq = NULL; Editing *ed= seq_give_editing(scene, FALSE); @@ -321,12 +315,12 @@ Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, int sel) dist = MAXFRAME*2; switch (lr) { - case 1: + case SEQ_SIDE_LEFT: if (seq->enddisp <= test->startdisp) { dist = test->enddisp - seq->startdisp; } break; - case 2: + case SEQ_SIDE_RIGHT: if (seq->startdisp >= test->enddisp) { dist = seq->startdisp - test->enddisp; } @@ -355,7 +349,7 @@ Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, short mval[2]) float pixelx; float handsize; float displen; - *hand= 0; + *hand= SEQ_SIDE_NONE; if(ed==NULL) return NULL; @@ -390,9 +384,9 @@ Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, short mval[2]) } if( handsize+seq->startdisp >=x ) - *hand= 1; + *hand= SEQ_SIDE_LEFT; else if( -handsize+seq->enddisp <=x ) - *hand= 2; + *hand= SEQ_SIDE_RIGHT; } } return seq; diff --git a/source/blender/editors/space_sequencer/sequencer_header.c b/source/blender/editors/space_sequencer/sequencer_header.c index 32a60f1fb54..71d7ff728d3 100644 --- a/source/blender/editors/space_sequencer/sequencer_header.c +++ b/source/blender/editors/space_sequencer/sequencer_header.c @@ -146,7 +146,7 @@ static uiBlock *seq_viewmenu(bContext *C, ARegion *ar, void *arg_unused) //static uiBlock *seq_selectmenu(bContext *C, ARegion *ar, void *arg_unused) static void seq_selectmenu(bContext *C, uiMenuItem *head, void *arg_unused) { - uiMenuContext(head, WM_OP_INVOKE_DEFAULT); + uiMenuContext(head, WM_OP_INVOKE_REGION_WIN); uiMenuItemEnumO(head, "Strips to the Left", 0, "SEQUENCER_OT_select_active_side", "side", SEQ_SIDE_LEFT); uiMenuItemEnumO(head, "Strips to the Right", 0, "SEQUENCER_OT_select_active_side", "side", SEQ_SIDE_RIGHT); @@ -212,7 +212,7 @@ static uiBlock *seq_markermenu(bContext *C, ARegion *ar, void *arg_unused) //static uiBlock *seq_addmenu_effectmenu(bContext *C, ARegion *ar, void *arg_unused) static void seq_addmenu_effectmenu(bContext *C, uiMenuItem *head, void *arg_unused) { - uiMenuContext(head, WM_OP_INVOKE_DEFAULT); + uiMenuContext(head, WM_OP_INVOKE_REGION_WIN); uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_ADD); uiMenuItemEnumO(head, "", 0, "SEQUENCER_OT_add_effect_strip", "type", SEQ_SUB); @@ -238,7 +238,7 @@ static void seq_addmenu(bContext *C, uiMenuItem *head, void *arg_unused) uiMenuLevel(head, "Effects...", seq_addmenu_effectmenu); uiMenuSeparator(head); - uiMenuContext(head, WM_OP_INVOKE_DEFAULT); + uiMenuContext(head, WM_OP_INVOKE_REGION_WIN); #ifdef WITH_FFMPEG uiMenuItemBooleanO(head, "Audio (RAM)", 0, "SEQUENCER_OT_add_sound_strip", "hd", FALSE); @@ -263,7 +263,7 @@ static void seq_editmenu(bContext *C, uiMenuItem *head, void *arg_unused) Scene *scene= CTX_data_scene(C); Editing *ed= seq_give_editing(scene, FALSE); - uiMenuContext(head, WM_OP_INVOKE_DEFAULT); + uiMenuContext(head, WM_OP_INVOKE_REGION_WIN); uiMenuItemEnumO(head, "", 0, "TFM_OT_transform", "mode", TFM_TRANSLATION); uiMenuItemEnumO(head, "", 0, "TFM_OT_transform", "mode", TFM_TIME_EXTEND); diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index ef583e56dd4..18c08d94094 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -96,6 +96,7 @@ void SEQUENCER_OT_select_less(struct wmOperatorType *ot); void SEQUENCER_OT_select_linked(struct wmOperatorType *ot); void SEQUENCER_OT_select_pick_linked(struct wmOperatorType *ot); void SEQUENCER_OT_select_handles(struct wmOperatorType *ot); +void SEQUENCER_OT_select_active_side(struct wmOperatorType *ot); void SEQUENCER_OT_borderselect(struct wmOperatorType *ot); void SEQUENCER_OT_select_invert(struct wmOperatorType *ot); @@ -109,6 +110,7 @@ void SEQUENCER_OT_add_effect_strip(struct wmOperatorType *ot); /* RNA enums, just to be more readable */ enum { + SEQ_SIDE_NONE=0, SEQ_SIDE_LEFT, SEQ_SIDE_RIGHT, SEQ_SIDE_BOTH, diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 6797a080798..d7ca063f4c5 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -90,6 +90,7 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_select_pick_linked); WM_operatortype_append(SEQUENCER_OT_select_linked); WM_operatortype_append(SEQUENCER_OT_select_handles); + WM_operatortype_append(SEQUENCER_OT_select_active_side); WM_operatortype_append(SEQUENCER_OT_borderselect); /* sequencer_add.c */ @@ -104,6 +105,7 @@ void sequencer_operatortypes(void) void sequencer_keymap(wmWindowManager *wm) { ListBase *keymap= WM_keymap_listbase(wm, "Sequencer", SPACE_SEQ, 0); + wmKeymapItem *kmi; WM_keymap_add_item(keymap, "SEQUENCER_OT_deselect_all", AKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_invert", IKEY, KM_PRESS, KM_CTRL, 0); @@ -137,15 +139,37 @@ void sequencer_keymap(wmWindowManager *wm) WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); - + + /* Mouse selection, a bit verbose :/ */ WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "type", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "linked_left", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "linked_right", 1); + kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "linked_left", 1); + RNA_boolean_set(kmi->ptr, "linked_right", 1); + + kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL|KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "linked_left", 1); + RNA_boolean_set(kmi->ptr, "linked_right", 1); + + kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "linked_left", 1); + + kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "extend", 1); + RNA_boolean_set(kmi->ptr, "linked_right", 1); + + + WM_keymap_add_item(keymap, "SEQUENCER_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_pick_linked", LKEY, KM_PRESS, 0, 0); - RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select_pick_linked", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select_pick_linked", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 2328ab2f9d1..f7548aa556a 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -81,55 +81,17 @@ static void *find_nearest_marker() {return NULL;} static void deselect_markers() {} - - -/****** TODO - bring back into operators ******* */ -void select_channel_direction(Scene *scene, Sequence *test,int lr) { -/* selects all strips in a channel to one direction of the passed strip */ - Sequence *seq; - Editing *ed= seq_give_editing(scene, FALSE); - - if(ed==NULL) return; - - seq= ed->seqbasep->first; - while(seq) { - if(seq!=test) { - if (test->machine==seq->machine) { - if(test->depth==seq->depth) { - if (((lr==1)&&(test->startdisp > (seq->startdisp)))||((lr==2)&&(test->startdisp < (seq->startdisp)))) { - seq->flag |= SELECT; - recurs_sel_seq(seq); - } - } - } - } - seq= seq->next; - } - test->flag |= SELECT; - recurs_sel_seq(test); -} - -void select_dir_from_last(Scene *scene, int lr) -{ - Sequence *seq=get_last_seq(scene); - if (seq==NULL) - return; - - select_channel_direction(scene, seq,lr); - -} - void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK */ { Sequence *neighbor; - neighbor=find_neighboring_sequence(scene, test, 1, -1); + neighbor=find_neighboring_sequence(scene, test, SEQ_SIDE_LEFT, -1); if (neighbor) { neighbor->flag |= SELECT; recurs_sel_seq(neighbor); neighbor->flag |= SEQ_RIGHTSEL; } - neighbor=find_neighboring_sequence(scene, test, 2, -1); + neighbor=find_neighboring_sequence(scene, test, SEQ_SIDE_RIGHT, -1); if (neighbor) { neighbor->flag |= SELECT; recurs_sel_seq(neighbor); @@ -137,6 +99,35 @@ void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK } test->flag |= SELECT; } + +/* used for mouse selection and for SEQUENCER_OT_select_active_side() */ +static void select_active_side(ListBase *seqbase, int sel_side, int channel, int frame) +{ + Sequence *seq; + + for(seq= seqbase->first; seq; seq=seq->next) { + if(channel==seq->machine) { + switch(sel_side) { + case SEQ_SIDE_LEFT: + if (frame > (seq->startdisp)) { + seq->flag &= ~(SEQ_RIGHTSEL|SEQ_LEFTSEL); + seq->flag |= SELECT; + } + break; + case SEQ_SIDE_RIGHT: + if (frame < (seq->startdisp)) { + seq->flag &= ~(SEQ_RIGHTSEL|SEQ_LEFTSEL); + seq->flag |= SELECT; + } + break; + case SEQ_SIDE_BOTH: + seq->flag &= ~(SEQ_RIGHTSEL|SEQ_LEFTSEL); + break; + } + } + } +} + #if 0 // BRING BACK void select_surround_from_last(Scene *scene) { @@ -182,13 +173,13 @@ void select_neighbor_from_last(Scene *scene, int lr) neighbor=find_neighboring_sequence(scene, seq, lr, -1); if (neighbor) { switch (lr) { - case 1: + case SEQ_SIDE_LEFT: neighbor->flag |= SELECT; recurs_sel_seq(neighbor); neighbor->flag |= SEQ_RIGHTSEL; seq->flag |= SEQ_LEFTSEL; break; - case 2: + case SEQ_SIDE_RIGHT: neighbor->flag |= SELECT; recurs_sel_seq(neighbor); neighbor->flag |= SEQ_LEFTSEL; @@ -291,30 +282,25 @@ void SEQUENCER_OT_select_invert(struct wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } - -/* *****************Selection Operators******************* */ -static EnumPropertyItem prop_select_types[] = { - {0, "EXCLUSIVE", "Exclusive", ""}, - {1, "EXTEND", "Extend", ""}, - {0, NULL, NULL, NULL} -}; - static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) { ARegion *ar= CTX_wm_region(C); View2D *v2d= UI_view2d_fromcontext(C); Scene *scene= CTX_data_scene(C); Editing *ed= seq_give_editing(scene, FALSE); - short extend= RNA_enum_is_equal(op->ptr, "type", "EXTEND"); + short extend= RNA_boolean_get(op->ptr, "extend"); + short linked_left= RNA_boolean_get(op->ptr, "linked_left"); + short linked_right= RNA_boolean_get(op->ptr, "linked_right"); + short mval[2]; Sequence *seq,*neighbor; - int hand,seldir, shift= 0; // XXX + int hand,sel_side, shift= 0; // XXX TimeMarker *marker; if(ed==NULL) return OPERATOR_CANCELLED; - + marker=find_nearest_marker(SCE_MARKERS, 1); //XXX - dummy function for now mval[0]= event->x - ar->winrct.xmin; @@ -338,7 +324,8 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) } else { seq= find_nearest_seq(scene, v2d, &hand, mval); - if (extend == 0) + + if(extend == 0 && linked_left==0 && linked_right==0) deselect_all_seq(scene); if(seq) { @@ -356,57 +343,67 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) } if(extend && (seq->flag & SELECT)) { - if(hand==0) seq->flag &= SEQ_DESEL; - else if(hand==1) { - if(seq->flag & SEQ_LEFTSEL) - seq->flag &= ~SEQ_LEFTSEL; - else seq->flag |= SEQ_LEFTSEL; - } - else if(hand==2) { - if(seq->flag & SEQ_RIGHTSEL) - seq->flag &= ~SEQ_RIGHTSEL; - else seq->flag |= SEQ_RIGHTSEL; + switch(hand) { + case SEQ_SIDE_NONE: + if (linked_left==0 && linked_right==0) + seq->flag &= SEQ_DESEL; + break; + case SEQ_SIDE_LEFT: + seq->flag ^= SEQ_LEFTSEL; + break; + case SEQ_SIDE_RIGHT: + seq->flag ^= SEQ_RIGHTSEL; + break; } } else { seq->flag |= SELECT; - if(hand==1) seq->flag |= SEQ_LEFTSEL; - if(hand==2) seq->flag |= SEQ_RIGHTSEL; + if(hand==SEQ_SIDE_LEFT) seq->flag |= SEQ_LEFTSEL; + if(hand==SEQ_SIDE_RIGHT) seq->flag |= SEQ_RIGHTSEL; } /* On Ctrl-Alt selection, select the strip and bordering handles */ - if (0) { // XXX (G.qual & LR_CTRLKEY) && (G.qual & LR_ALTKEY)) { + if (linked_left && linked_right) { if(extend==0) deselect_all_seq(scene); seq->flag |= SELECT; select_surrounding_handles(scene, seq); - - /* Ctrl signals Left, Alt signals Right - First click selects adjacent handles on that side. - Second click selects all strips in that direction. - If there are no adjacent strips, it just selects all in that direction. */ - } else if (0) { // XXX ((G.qual & LR_CTRLKEY) || (G.qual & LR_ALTKEY)) && (seq->flag & SELECT)) { - - if (0); // G.qual & LR_CTRLKEY) seldir=1; - else seldir=2; - neighbor=find_neighboring_sequence(scene, seq, seldir, -1); + } + else if ((linked_left || linked_right) && (seq->flag & SELECT)) { + /* + * First click selects adjacent handles on that side. + * Second click selects all strips in that direction. + * If there are no adjacent strips, it just selects all in that direction. + */ + sel_side= linked_left ? SEQ_SIDE_LEFT:SEQ_SIDE_RIGHT; + neighbor=find_neighboring_sequence(scene, seq, sel_side, -1); if (neighbor) { - switch (seldir) { - case 1: - if ((seq->flag & SEQ_LEFTSEL)&&(neighbor->flag & SEQ_RIGHTSEL)) { + switch (sel_side) { + case SEQ_SIDE_LEFT: + if ((seq->flag & SEQ_LEFTSEL) && (neighbor->flag & SEQ_RIGHTSEL)) { if(extend==0) deselect_all_seq(scene); - select_channel_direction(scene, seq,1); + seq->flag |= SELECT; + + select_active_side(ed->seqbasep, SEQ_SIDE_LEFT, seq->machine, seq->startdisp); } else { + if(extend==0) deselect_all_seq(scene); + seq->flag |= SELECT; + neighbor->flag |= SELECT; recurs_sel_seq(neighbor); neighbor->flag |= SEQ_RIGHTSEL; seq->flag |= SEQ_LEFTSEL; } break; - case 2: - if ((seq->flag & SEQ_RIGHTSEL)&&(neighbor->flag & SEQ_LEFTSEL)) { + case SEQ_SIDE_RIGHT: + if ((seq->flag & SEQ_RIGHTSEL) && (neighbor->flag & SEQ_LEFTSEL)) { if(extend==0) deselect_all_seq(scene); - select_channel_direction(scene, seq,2); + seq->flag |= SELECT; + + select_active_side(ed->seqbasep, SEQ_SIDE_RIGHT, seq->machine, seq->startdisp); } else { + if(extend==0) deselect_all_seq(scene); + seq->flag |= SELECT; + neighbor->flag |= SELECT; recurs_sel_seq(neighbor); neighbor->flag |= SEQ_LEFTSEL; @@ -416,10 +413,9 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) } } else { if(extend==0) deselect_all_seq(scene); - select_channel_direction(scene, seq,seldir); + select_active_side(ed->seqbasep, sel_side, seq->machine, seq->startdisp); } } - recurs_sel_seq(seq); } } @@ -461,7 +457,9 @@ void SEQUENCER_OT_select(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "type", prop_select_types, 0, "Type", ""); + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "extend the selection"); + RNA_def_boolean(ot->srna, "linked_left", 0, "Linked Left", "Select strips to the left of the active strip"); + RNA_def_boolean(ot->srna, "linked_right", 0, "Linked Right", "Select strips to the right of the active strip"); } @@ -495,14 +493,14 @@ static int select_more_less_seq__internal(Scene *scene, int sel, int linked) { if((int)(seq->flag & SELECT) == sel) { if ((linked==0 && seq->tmp)==0) { /* only get unselected nabours */ - neighbor = find_neighboring_sequence(scene, seq, 1, isel); + neighbor = find_neighboring_sequence(scene, seq, SEQ_SIDE_LEFT, isel); if (neighbor) { if (sel) {neighbor->flag |= SELECT; recurs_sel_seq(neighbor);} else neighbor->flag &= ~SELECT; if (linked==0) neighbor->tmp = (Sequence *)1; change = 1; } - neighbor = find_neighboring_sequence(scene, seq, 2, isel); + neighbor = find_neighboring_sequence(scene, seq, SEQ_SIDE_RIGHT, isel); if (neighbor) { if (sel) {neighbor->flag |= SELECT; recurs_sel_seq(neighbor);} else neighbor->flag &= ~SELECT; @@ -583,7 +581,7 @@ static int sequencer_select_pick_linked_invoke(bContext *C, wmOperator *op, wmEv ARegion *ar= CTX_wm_region(C); View2D *v2d= UI_view2d_fromcontext(C); - short extend= RNA_enum_is_equal(op->ptr, "type", "EXTEND"); + short extend= RNA_boolean_get(op->ptr, "extend"); short mval[2]; Sequence *mouse_seq; @@ -627,7 +625,7 @@ void SEQUENCER_OT_select_pick_linked(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "type", prop_select_types, 0, "Type", "Type of select linked operation"); + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "extend the selection"); } @@ -664,7 +662,7 @@ void SEQUENCER_OT_select_linked(wmOperatorType *ot) } -/* select linked operator */ +/* select handles operator */ static int sequencer_select_handles_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); @@ -715,6 +713,42 @@ void SEQUENCER_OT_select_handles(wmOperatorType *ot) RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side of the handle that is selected"); } +/* select side operator */ +static int sequencer_select_active_side_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + Editing *ed= seq_give_editing(scene, 0); + Sequence *seq_act=get_last_seq(scene); + + if (ed==NULL || seq_act==NULL) + return OPERATOR_CANCELLED; + + seq_act->flag |= SELECT; + + select_active_side(ed->seqbasep, RNA_enum_get(op->ptr, "side"), seq_act->machine, seq_act->startdisp); + + ED_area_tag_redraw(CTX_wm_area(C)); + + return OPERATOR_FINISHED; +} + +void SEQUENCER_OT_select_active_side(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Select Active Side"; + ot->idname= "SEQUENCER_OT_select_active_side"; + + /* api callbacks */ + ot->exec= sequencer_select_active_side_exec; + ot->poll= ED_operator_sequencer_active; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + /* properties */ + RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side of the handle that is selected"); +} + /* borderselect operator */ static int sequencer_borderselect_exec(bContext *C, wmOperator *op) @@ -782,6 +816,4 @@ void SEQUENCER_OT_borderselect(wmOperatorType *ot) RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); - - RNA_def_enum(ot->srna, "type", prop_select_types, 0, "Type", ""); } diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c index 38c0f2dfc1d..7c5c25a78a9 100644 --- a/source/blender/editors/space_time/time_header.c +++ b/source/blender/editors/space_time/time_header.c @@ -34,6 +34,7 @@ #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_userdef_types.h" #include "MEM_guardedalloc.h" @@ -352,7 +353,6 @@ static uiBlock *time_framemenu(bContext *C, ARegion *ar, void *arg_unused) #define B_FLIPINFOMENU 0 #define B_NEWFRAME 0 -#define AUTOKEY_ON 0 #define B_DIFF 0 @@ -528,16 +528,18 @@ void time_header_buttons(const bContext *C, ARegion *ar) xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Skip to End frame (Shift UpArrow)"); xco+= XIC+8; - uiDefIconButBitS(block, TOG, AUTOKEY_ON, REDRAWINFO, ICON_REC, - xco, yco, XIC, YIC, &(scene->autokey_mode), 0, 0, 0, 0, "Automatic keyframe insertion for Objects and Bones"); - xco+= XIC; - if (scene->autokey_mode & AUTOKEY_ON) { - uiDefButS(block, MENU, REDRAWINFO, - "Auto-Keying Mode %t|Add/Replace Keys%x3|Replace Keys %x5", - xco, yco, (int)3.5*XIC, YIC, &(scene->autokey_mode), 0, 1, 0, 0, - "Mode of automatic keyframe insertion for Objects and Bones"); - xco+= (4*XIC); - } + uiBlockBeginAlign(block); + uiDefIconButBitS(block, TOG, AUTOKEY_ON, B_REDRAWALL, ICON_REC, + xco, yco, XIC, YIC, &(scene->autokey_mode), 0, 0, 0, 0, "Automatic keyframe insertion for Objects and Bones"); + xco+= XIC; + if (IS_AUTOKEY_ON(scene)) { + uiDefButS(block, MENU, B_REDRAWALL, + "Auto-Keying Mode %t|Add/Replace Keys%x3|Replace Keys %x5", + xco, yco, (int)5.5*XIC, YIC, &(scene->autokey_mode), 0, 1, 0, 0, + "Mode of automatic keyframe insertion for Objects and Bones"); + xco+= (6*XIC); + } + uiBlockEndAlign(block); xco+= 16; @@ -550,12 +552,12 @@ void time_header_buttons(const bContext *C, ARegion *ar) MEM_freeN(menustr); xco+= (6*XIC); - uiDefIconBut(block, BUT, B_TL_DELETEKEY, ICON_KEY_DEHLT, - xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Delete Keyframe for the context of the largest area (ALTKEY-IKEY)"); - xco+= XIC+4; - uiDefIconBut(block, BUT, B_TL_INSERTKEY, ICON_KEY_HLT, - xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Insert Keyframe for the context of the largest area (IKEY)"); - xco+= XIC+4; + uiBlockBeginAlign(block); + uiDefIconButO(block, BUT, "ANIM_OT_delete_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_DEHLT, xco,yco,XIC,YIC, "Delete Keyframes for the Active Keying Set (Alt-I)"); + xco += XIC; + uiDefIconButO(block, BUT, "ANIM_OT_insert_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_HLT, xco,yco,XIC,YIC, "Insert Keyframes for the Active Keying Set (I)"); + xco += XIC; + uiBlockEndAlign(block); xco+= 16; diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 92c8b8f0b69..5eb7caf50f1 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -478,7 +478,7 @@ void draw_mesh_text(Scene *scene, Object *ob, int glsl) return; /* don't draw when editing */ - if(me->edit_mesh) + if(ob == scene->obedit) return; else if(ob==OBACT) if(FACESEL_PAINT_TEST) @@ -558,7 +558,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o /* draw the textured mesh */ draw_textured_begin(scene, v3d, rv3d, ob); - if(me->edit_mesh) { + if(ob == scene->obedit) { dm->drawMappedFacesTex(dm, draw_em_tf_mapped__set_draw, me->edit_mesh); } else if(faceselect) { if(G.f & G_WEIGHTPAINT) @@ -566,8 +566,9 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o else dm->drawMappedFacesTex(dm, draw_tface_mapped__set_draw, me); } - else + else { dm->drawFacesTex(dm, draw_tface__set_draw); + } /* draw game engine text hack */ if(get_ob_property(ob, "Text")) @@ -576,7 +577,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o draw_textured_end(); /* draw edges and selected faces over textured mesh */ - if(!me->edit_mesh && faceselect) + if(!(ob == scene->obedit) && faceselect) draw_tfaces3D(rv3d, ob, me, dm); /* reset from negative scale correction */ diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 85edf6cf5fb..f9a5195860d 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -98,7 +98,7 @@ #include "GPU_material.h" #include "GPU_extensions.h" -#include "ED_editparticle.h" +#include "ED_particle.h" #include "ED_mesh.h" #include "ED_types.h" #include "ED_util.h" @@ -5086,7 +5086,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) draw_new_particle_system(scene, v3d, rv3d, base, psys, dt); if(G.f & G_PARTICLEEDIT && ob==OBACT) { - psys= PE_get_current(ob); + psys= PE_get_current(scene, ob); if(psys && !scene->obedit && psys_in_edit_mode(scene, psys)) draw_particle_edit(scene, v3d, rv3d, ob, psys, dt); } @@ -5360,9 +5360,10 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec switch( ob->type) { case OB_MESH: { - Mesh *me= ob->data; - EditMesh *em= me->edit_mesh; - if(em) { + if(ob == scene->obedit) { + Mesh *me= ob->data; + EditMesh *em= me->edit_mesh; + DerivedMesh *dm = editmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH); EM_init_index_arrays(em, 1, 1, 1); @@ -5415,7 +5416,7 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r DerivedMesh *dm=NULL, *edm=NULL; int glsl; - if(me->edit_mesh) + if(ob == scene->obedit) edm= editmesh_get_derived_base(ob, me->edit_mesh); else dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 45e9245d46a..4e2a0090244 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -138,7 +138,8 @@ static SpaceLink *view3d_new(const bContext *C) BLI_addtail(&v3d->regionbase, ar); ar->regiontype= RGN_TYPE_UI; - ar->alignment= RGN_OVERLAP_LEFT; + ar->alignment= RGN_ALIGN_LEFT; + ar->flag = RGN_FLAG_HIDDEN; /* main area */ ar= MEM_callocN(sizeof(ARegion), "main area for view3d"); @@ -190,10 +191,10 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) // XXX BIF_view3d_previewrender_free(v3do); if(v3do->localvd) { -// XXX restore_localviewdata(v3do); v3do->localvd= NULL; v3do->properties_storage= NULL; v3do->localview= 0; + v3do->lay= v3dn->localvd->lay; v3do->lay &= 0xFFFFFF; } @@ -208,9 +209,57 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) return (SpaceLink *)v3dn; } +static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype) +{ + RegionView3D *rv3d= ar->regiondata; + ListBase *keymap; + + /* copy last mode, then we can re-init the region maps */ + rv3d->lastmode= stype; + + keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0); + if(ELEM(stype, 0, NS_MODE_OBJECT)) + WM_event_add_keymap_handler(&ar->handlers, keymap); + else + WM_event_remove_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_listbase(wm, "EditMesh", 0, 0); + if(stype==NS_EDITMODE_MESH) + WM_event_add_keymap_handler(&ar->handlers, keymap); + else + WM_event_remove_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_listbase(wm, "Curve", 0, 0); + if(stype==NS_EDITMODE_CURVE) + WM_event_add_keymap_handler(&ar->handlers, keymap); + else + WM_event_remove_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_listbase(wm, "Armature", 0, 0); + if(stype==NS_EDITMODE_ARMATURE) + WM_event_add_keymap_handler(&ar->handlers, keymap); + else + WM_event_remove_keymap_handler(&ar->handlers, keymap); + + keymap= WM_keymap_listbase(wm, "Particle", 0, 0); + if(stype==NS_MODE_PARTICLE) + WM_event_add_keymap_handler(&ar->handlers, keymap); + else + WM_event_remove_keymap_handler(&ar->handlers, keymap); + + /* editfont keymap swallows all... */ + keymap= WM_keymap_listbase(wm, "Font", 0, 0); + if(stype==NS_EDITMODE_TEXT) + WM_event_add_keymap_handler_priority(&ar->handlers, keymap, 10); + else + WM_event_remove_keymap_handler(&ar->handlers, keymap); + +} + /* add handlers, stuff you only do once or on area/region changes */ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) { + RegionView3D *rv3d= ar->regiondata; ListBase *keymap; /* own keymap */ @@ -227,10 +276,11 @@ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) keymap= WM_keymap_listbase(wm, "Pose", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - /* object modal ops default */ - keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0); + /* modal ops keymaps */ + view3d_modal_keymaps(wm, ar, rv3d->lastmode); + /* operator poll checks for modes */ + keymap= WM_keymap_listbase(wm, "ImagePaint", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - } /* type callback, not region itself */ @@ -280,50 +330,13 @@ static void *view3d_main_area_duplicate(void *poin) return NULL; } - -static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype) -{ - ListBase *keymap; - - keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0); - if(stype==NS_MODE_OBJECT) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "EditMesh", 0, 0); - if(stype==NS_EDITMODE_MESH) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "Curve", 0, 0); - if(stype==NS_EDITMODE_CURVE) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - keymap= WM_keymap_listbase(wm, "Armature", 0, 0); - if(stype==NS_EDITMODE_ARMATURE) - WM_event_add_keymap_handler(&ar->handlers, keymap); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - - /* editfont keymap swallows all... */ - keymap= WM_keymap_listbase(wm, "Font", 0, 0); - if(stype==NS_EDITMODE_TEXT) - WM_event_add_keymap_handler_priority(&ar->handlers, keymap, 10); - else - WM_event_remove_keymap_handler(&ar->handlers, keymap); - -} - static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ switch(wmn->category) { case NC_SCENE: switch(wmn->data) { + case ND_TRANSFORM: case ND_FRAME: case ND_OB_ACTIVE: case ND_OB_SELECT: @@ -364,6 +377,11 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; } + case NC_IMAGE: + /* this could be more fine grained checks if we had + * more context than just the region */ + ED_region_tag_redraw(ar); + break; } } @@ -557,16 +575,58 @@ static int view3d_context(const bContext *C, bContextDataMember member, bContext if(scene->basact && (scene->basact->lay & v3d->lay)) if((scene->basact->object->restrictflag & OB_RESTRICT_VIEW)==0) CTX_data_pointer_set(result, scene->basact); - + return 1; } else if(member == CTX_DATA_ACTIVE_OBJECT) { if(scene->basact && (scene->basact->lay & v3d->lay)) if((scene->basact->object->restrictflag & OB_RESTRICT_VIEW)==0) CTX_data_pointer_set(result, scene->basact->object); - + return 1; } + else if(ELEM(member, CTX_DATA_VISIBLE_BONES, CTX_DATA_EDITABLE_BONES)) { + Object *obedit= scene->obedit; // XXX get from context? + bArmature *arm= (obedit) ? obedit->data : NULL; + EditBone *ebone, *flipbone=NULL; + + if (arm && arm->edbo) { + /* Attention: X-Axis Mirroring is also handled here... */ + for (ebone= arm->edbo->first; ebone; ebone= ebone->next) { + /* first and foremost, bone must be visible and selected */ + if (EBONE_VISIBLE(arm, ebone)) { + /* Get 'x-axis mirror equivalent' bone if the X-Axis Mirroring option is enabled + * so that most users of this data don't need to explicitly check for it themselves. + * + * We need to make sure that these mirrored copies are not selected, otherwise some + * bones will be operated on twice. + */ + if (arm->flag & ARM_MIRROR_EDIT) + flipbone = ED_armature_bone_get_mirrored(arm->edbo, ebone); + + /* if we're filtering for editable too, use the check for that instead, as it has selection check too */ + if (member == CTX_DATA_EDITABLE_BONES) { + /* only selected + editable */ + if (EBONE_EDITABLE(ebone)) { + CTX_data_list_add(result, ebone); + + if ((flipbone) && !(flipbone->flag & BONE_SELECTED)) + CTX_data_list_add(result, flipbone); + } + } + else { + /* only include bones if visible */ + CTX_data_list_add(result, ebone); + + if ((flipbone) && EBONE_VISIBLE(arm, flipbone)==0) + CTX_data_list_add(result, flipbone); + } + } + } + + return 1; + } + } else if(ELEM(member, CTX_DATA_SELECTED_BONES, CTX_DATA_SELECTED_EDITABLE_BONES)) { Object *obedit= scene->obedit; // XXX get from context? bArmature *arm= (obedit) ? obedit->data : NULL; @@ -609,6 +669,22 @@ static int view3d_context(const bContext *C, bContextDataMember member, bContext return 1; } } + else if(member == CTX_DATA_VISIBLE_PCHANS) { + Object *obact= OBACT; + bArmature *arm= (obact) ? obact->data : NULL; + bPoseChannel *pchan; + + if (obact && arm) { + for (pchan= obact->pose->chanbase.first; pchan; pchan= pchan->next) { + /* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */ + if ((pchan->bone) && (arm->layer & pchan->bone->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) { + CTX_data_list_add(result, pchan); + } + } + + return 1; + } + } else if(member == CTX_DATA_SELECTED_PCHANS) { Object *obact= OBACT; bArmature *arm= (obact) ? obact->data : NULL; diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index e5ab9ddc369..d449b0cc774 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -77,7 +77,7 @@ #include "ED_armature.h" #include "ED_curve.h" -#include "ED_editparticle.h" +#include "ED_particle.h" #include "ED_keyframing.h" #include "ED_mesh.h" #include "ED_object.h" @@ -967,19 +967,19 @@ static void view3d_panel_transform_spaces(const bContext *C, ARegion *ar, short uiBlockBeginAlign(block); - uiDefButS(block, ROW, REDRAWHEADERS, "Global", xco, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_GLOBAL,0, 0, "Global Transform Orientation"); - uiDefButS(block, ROW, REDRAWHEADERS, "Local", xco + 40, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_LOCAL, 0, 0, "Local Transform Orientation"); - uiDefButS(block, ROW, REDRAWHEADERS, "Normal", xco + 80, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_NORMAL,0, 0, "Normal Transform Orientation"); - uiDefButS(block, ROW, REDRAWHEADERS, "View", xco + 120, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_VIEW, 0, 0, "View Transform Orientation"); + uiDefButS(block, ROW, B_REDR, "Global", xco, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_GLOBAL,0, 0, "Global Transform Orientation"); + uiDefButS(block, ROW, B_REDR, "Local", xco + 40, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_LOCAL, 0, 0, "Local Transform Orientation"); + uiDefButS(block, ROW, B_REDR, "Normal", xco + 80, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_NORMAL,0, 0, "Normal Transform Orientation"); + uiDefButS(block, ROW, B_REDR, "View", xco + 120, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_VIEW, 0, 0, "View Transform Orientation"); for (index = V3D_MANIP_CUSTOM, ts = transform_spaces->first ; ts ; ts = ts->next, index++) { UI_ThemeColor(TH_BUT_ACTION); if (v3d->twmode == index) { - but = uiDefIconButS(block,ROW, REDRAWHEADERS, ICON_CHECKBOX_HLT, xco,yco,XIC,YIC, &v3d->twmode, 5.0, (float)index, 0, 0, "Use this Custom Transform Orientation"); + but = uiDefIconButS(block,ROW, B_REDR, ICON_CHECKBOX_HLT, xco,yco,XIC,YIC, &v3d->twmode, 5.0, (float)index, 0, 0, "Use this Custom Transform Orientation"); } else { - but = uiDefIconButS(block,ROW, REDRAWHEADERS, ICON_CHECKBOX_DEHLT, xco,yco,XIC,YIC, &v3d->twmode, 5.0, (float)index, 0, 0, "Use this Custom Transform Orientation"); + but = uiDefIconButS(block,ROW, B_REDR, ICON_CHECKBOX_DEHLT, xco,yco,XIC,YIC, &v3d->twmode, 5.0, (float)index, 0, 0, "Use this Custom Transform Orientation"); } uiButSetFunc(but, selectTransformOrientation_func, ts, NULL); uiDefBut(block, TEX, 0, "", xco+=XIC, yco,100+XIC,20, &ts->name, 0, 30, 0, 0, "Edits the name of this Transform Orientation"); @@ -1515,6 +1515,7 @@ static int view3d_properties(bContext *C, wmOperator *op) if(ar) { ar->flag ^= RGN_FLAG_HIDDEN; + ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */ ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa); ED_area_tag_redraw(sa); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index ba774677420..706ce8c9d40 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1081,7 +1081,7 @@ void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) #endif if(G.f & G_VERTEXPAINT || G.f & G_WEIGHTPAINT); - else if((G.f & G_TEXTUREPAINT) && scene->toolsettings && (scene->toolsettings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)==0); + else if((G.f & G_TEXTUREPAINT) && scene->toolsettings && (scene->toolsettings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)); else if(scene->obedit && v3d->drawtype>OB_WIRE && (v3d->flag & V3D_ZBUF_SELECT)); else { v3d->flag &= ~V3D_NEEDBACKBUFDRAW; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 0a247eceba1..78309a40f94 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -70,7 +70,7 @@ #include "RNA_access.h" #include "RNA_define.h" -#include "ED_editparticle.h" +#include "ED_particle.h" #include "ED_space_api.h" #include "ED_screen.h" #include "ED_types.h" @@ -92,7 +92,7 @@ static void view3d_boxview_clip(ScrArea *sa) ARegion *ar; BoundBox *bb = MEM_callocN(sizeof(BoundBox), "clipbb"); float clip[6][4]; - float x1, y1, z1, ofs[3]; + float x1= 0.0f, y1= 0.0f, z1= 0.0f, ofs[3]; int val; /* create bounding box */ @@ -956,7 +956,7 @@ static int viewcenter_exec(bContext *C, wmOperator *op) /* like a localview with if(obedit) { -// XXX ok = minmax_verts(min, max); /* only selected */ + ok = minmax_verts(obedit, min, max); /* only selected */ } else if(ob && (ob->flag & OB_POSEMODE)) { if(ob->pose) { @@ -1004,8 +1004,11 @@ static int viewcenter_exec(bContext *C, wmOperator *op) /* like a localview with afm[0]= (max[0]-min[0]); afm[1]= (max[1]-min[1]); afm[2]= (max[2]-min[2]); - size= 0.7f*MAX3(afm[0], afm[1], afm[2]); - + size= MAX3(afm[0], afm[1], afm[2]); + /* perspective should be a bit farther away to look nice */ + if(rv3d->persp==V3D_ORTHO) + size*= 0.7; + if(size <= v3d->near*1.5f) size= v3d->near*1.5f; new_ofs[0]= -(min[0]+max[0])/2.0f; @@ -1039,6 +1042,7 @@ static int viewcenter_exec(bContext *C, wmOperator *op) /* like a localview with return OPERATOR_FINISHED; } + void VIEW3D_OT_viewcenter(wmOperatorType *ot) { diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 7131bf65495..a7dd419f672 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -66,7 +66,7 @@ #include "BKE_utildefines.h" /* for VECCOPY */ #include "ED_armature.h" -#include "ED_editparticle.h" +#include "ED_particle.h" #include "ED_object.h" #include "ED_mesh.h" #include "ED_util.h" @@ -76,6 +76,9 @@ #include "WM_api.h" #include "WM_types.h" +#include "RNA_access.h" +#include "RNA_define.h" + #include "BIF_gl.h" #include "BIF_glutil.h" #include "BIF_transform.h" @@ -103,7 +106,7 @@ * This can be cleaned when I make some new 'mode' icons. */ -#define V3D_OBJECTMODE_SEL ICON_OBJECT +#define V3D_OBJECTMODE_SEL ICON_OBJECT_DATA #define V3D_EDITMODE_SEL ICON_EDITMODE_HLT #define V3D_SCULPTMODE_SEL ICON_SCULPTMODE_HLT #define V3D_FACESELECT_SEL ICON_FACESEL_HLT /* this is not a mode anymore - just a switch */ @@ -118,7 +121,6 @@ /* XXX port over */ static void handle_view3d_lock(void) {} -static void allqueue(int x, int y) {} static void countall(void) {} extern void borderselect(); static int retopo_mesh_paint_check() {return 0;} @@ -138,16 +140,17 @@ static int retopo_mesh_paint_check() {return 0;} /* well... in this file a lot of view mode manipulation happens, so let's have it defined here */ void ED_view3d_exit_paint_modes(bContext *C) { + if(G.f & G_TEXTUREPAINT) + WM_operator_name_call(C, "PAINT_OT_texture_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL); if(G.f & G_VERTEXPAINT) - WM_operator_name_call(C, "VIEW3D_OT_vpaint_toggle", WM_OP_EXEC_REGION_WIN, NULL); + WM_operator_name_call(C, "PAINT_OT_vertex_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL); else if(G.f & G_WEIGHTPAINT) - WM_operator_name_call(C, "VIEW3D_OT_wpaint_toggle", WM_OP_EXEC_REGION_WIN, NULL); + WM_operator_name_call(C, "PAINT_OT_weight_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL); if(G.f & G_SCULPTMODE) WM_operator_name_call(C, "SCULPT_OT_sculptmode_toggle", WM_OP_EXEC_REGION_WIN, NULL); - -// if(G.f & G_TEXTUREPAINT) set_texturepaint(); - if(G.f & G_PARTICLEEDIT) PE_set_particle_edit(CTX_data_scene(C)); + if(G.f & G_PARTICLEEDIT) + WM_operator_name_call(C, "PARTICLE_OT_particle_edit_toggle", WM_OP_EXEC_REGION_WIN, NULL); G.f &= ~(G_VERTEXPAINT+G_TEXTUREPAINT+G_WEIGHTPAINT+G_SCULPTMODE+G_PARTICLEEDIT); } @@ -245,11 +248,73 @@ void do_layer_buttons(bContext *C, short event) } ED_area_tag_redraw(sa); - if(sa->spacetype==SPACE_OOPS) allqueue(REDRAWVIEW3D, 1); /* 1==also do headwin */ if(v3d->drawtype == OB_SHADED) reshadeall_displist(scene); - allqueue(REDRAWNLA, 0); } +static int layers_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + ScrArea *sa= CTX_wm_area(C); + View3D *v3d= sa->spacedata.first; + int nr= RNA_int_get(op->ptr, "nr"); + + if(nr<=0) + return OPERATOR_CANCELLED; + nr--; + + if(RNA_boolean_get(op->ptr, "extend")) + v3d->lay |= (1<lay = (1<scenelock) handle_view3d_lock(); + + /* new layers might need unflushed events events */ + DAG_scene_update_flags(scene, v3d->lay); /* tags all that moves and flushes */ + + ED_area_tag_redraw(sa); + + return OPERATOR_FINISHED; +} + +/* applies shift and alt, lazy coding or ok? :) */ +/* the local per-keymap-entry keymap will solve it */ +static int layers_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + if(event->ctrl || event->oskey) + return OPERATOR_PASS_THROUGH; + + if(event->shift) + RNA_boolean_set(op->ptr, "extend", 1); + + if(event->alt) { + int nr= RNA_int_get(op->ptr, "nr") + 10; + RNA_int_set(op->ptr, "nr", nr); + } + layers_exec(C, op); + + return OPERATOR_FINISHED; +} + +void VIEW3D_OT_layers(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Layers"; + ot->idname= "VIEW3D_OT_layers"; + + /* api callbacks */ + ot->invoke= layers_invoke; + ot->exec= layers_exec; + ot->poll= ED_operator_view3d_active; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "", 0, 20); + RNA_def_boolean(ot->srna, "extend", 0, "Extend", ""); +} + + #if 0 static void do_view3d_view_camerasmenu(bContext *C, void *arg, int event) { @@ -278,7 +343,6 @@ static void do_view3d_view_camerasmenu(bContext *C, void *arg, int event) } } - allqueue(REDRAWVIEW3D, 0); } @@ -368,7 +432,6 @@ static void do_view3d_view_cameracontrolsmenu(bContext *C, void *arg, int event) fly(); break; } - allqueue(REDRAWVIEW3D, 0); } @@ -460,7 +523,6 @@ static void do_view3d_view_alignviewmenu(bContext *C, void *arg, int event) curs[0]=curs[1]=curs[2]= 0.0; break; } - allqueue(REDRAWVIEW3D, 0); } static uiBlock *view3d_view_alignviewmenu(bContext *C, ARegion *ar, void *arg_unused) @@ -554,7 +616,6 @@ static void do_view3d_viewmenu(bContext *C, void *arg, int event) do_layer_buttons(C, -2); break; } - allqueue(REDRAWVIEW3D, 1); } #endif @@ -768,7 +829,6 @@ void do_view3d_select_object_typemenu(bContext *C, void *arg, int event) do_layer_buttons(C, -2); break; } - allqueue(REDRAWVIEW3D, 0); } static uiBlock *view3d_select_object_typemenu(bContext *C, ARegion *ar, void *arg_unused) @@ -831,7 +891,6 @@ void do_view3d_select_object_layermenu(bContext *C, void *arg, int event) // XXX selectall_layer(event); break; } - allqueue(REDRAWVIEW3D, 0); } static uiBlock *view3d_select_object_layermenu(bContext *C, ARegion *ar, void *arg_unused) @@ -882,7 +941,6 @@ void do_view3d_select_object_linkedmenu(bContext *C, void *arg, int event) break; } countall(); - allqueue(REDRAWVIEW3D, 0); } static uiBlock *view3d_select_object_linkedmenu(bContext *C, ARegion *ar, void *arg_unused) @@ -921,8 +979,6 @@ void do_view3d_select_object_groupedmenu(bContext *C, void *arg, int event) select_object_grouped((short)event); break; } - allqueue(REDRAWVIEW3D, 0); - } static uiBlock *view3d_select_object_groupedmenu(bContext *C, ARegion *ar, void *arg_unused) @@ -1068,7 +1124,6 @@ void do_view3d_select_meshmenu(bContext *C, void *arg, int event) select_mesh_group_menu(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1212,7 +1267,6 @@ void do_view3d_select_metaballmenu(bContext *C, void *arg, int event) selectrandom_mball(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1262,7 +1316,6 @@ static void do_view3d_select_latticemenu(bContext *C, void *arg, int event) deselectall_Latt(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1320,7 +1373,6 @@ static void do_view3d_select_armaturemenu(bContext *C, void *arg, int event) armature_select_hierarchy(BONE_SELECT_CHILD, 1); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1392,7 +1444,6 @@ static void do_view3d_select_pose_armaturemenu(bContext *C, void *arg, int event pose_select_hierarchy(BONE_SELECT_CHILD, 1); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1456,7 +1507,6 @@ void do_view3d_select_faceselmenu(bContext *C, void *arg, int event) select_linked_tfaces(2); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1532,7 +1582,6 @@ void do_view3d_edit_snapmenu(bContext *C, void *arg, int event) ED_undo_push(C, "Snap selection to center"); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1599,7 +1648,6 @@ void do_view3d_transform_moveaxismenu(bContext *C, void *arg, int event) Transform(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1667,7 +1715,6 @@ void do_view3d_transform_rotateaxismenu(bContext *C, void *arg, int event) Transform(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1735,7 +1782,6 @@ void do_view3d_transform_scaleaxismenu(bContext *C, void *arg, int event) Transform(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1846,7 +1892,6 @@ static void do_view3d_transformmenu(bContext *C, void *arg, int event) alignmenu(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -1975,7 +2020,6 @@ void do_view3d_object_mirrormenu(bContext *C, void *arg, int event) Transform(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2027,7 +2071,6 @@ static void do_view3d_edit_object_transformmenu(bContext *C, void *arg, int even apply_objects_visual_tx(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2097,7 +2140,6 @@ static void do_view3d_edit_object_makelinksmenu(bContext *C, void *arg, int even make_links((short)event); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2177,7 +2219,6 @@ static void do_view3d_edit_object_singleusermenu(bContext *C, void *arg, int eve clear_id_newpoins(); countall(); - allqueue(REDRAWALL, 0); #endif } @@ -2230,7 +2271,6 @@ static void do_view3d_edit_object_copyattrmenu(bContext *C, void *arg, int event // XXX copy_attr((short)event); break; } - allqueue(REDRAWVIEW3D, 0); } static uiBlock *view3d_edit_object_copyattrmenu(bContext *C, ARegion *ar, void *arg_unused) @@ -2308,7 +2348,6 @@ static void do_view3d_edit_object_parentmenu(bContext *C, void *arg, int event) make_parent(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2338,7 +2377,6 @@ static void do_view3d_edit_object_groupmenu(bContext *C, void *arg, int event) group_operation(event); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2370,7 +2408,6 @@ static void do_view3d_edit_object_trackmenu(bContext *C, void *arg, int event) make_track(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2401,7 +2438,6 @@ static void do_view3d_edit_object_constraintsmenu(bContext *C, void *arg, int ev ob_clear_constraints(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2437,7 +2473,6 @@ static void do_view3d_edit_object_showhidemenu(bContext *C, void *arg, int event hide_objects(0); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2451,7 +2486,7 @@ static uiBlock *view3d_edit_object_showhidemenu(bContext *C, ARegion *ar, void * uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Deselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Unselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 60); @@ -2464,7 +2499,6 @@ static void do_view3d_edit_object_scriptsmenu(bContext *C, void *arg, int event) #if 0 BPY_menu_do_python(PYMENU_OBJECT, event); - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2539,7 +2573,6 @@ static void do_view3d_edit_objectmenu(bContext *C, void *arg, int event) common_deletekey(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2622,7 +2655,6 @@ static void do_view3d_edit_propfalloffmenu(bContext *C, void *arg, int event) scene->prop_mode= event; - allqueue(REDRAWVIEW3D, 1); } static uiBlock *view3d_edit_propfalloffmenu(bContext *C, ARegion *ar, void *arg_unused) @@ -2694,7 +2726,6 @@ void do_view3d_edit_mesh_verticesmenu(bContext *C, void *arg, int event) mesh_rip(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2813,7 +2844,6 @@ void do_view3d_edit_mesh_edgesmenu(bContext *C, void *arg, int event) } break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2883,7 +2913,6 @@ void do_view3d_edit_mesh_facesmenu(bContext *C, void *arg, int event) break; case 2: /* Quads to Tris */ convert_to_triface(0); - allqueue(REDRAWVIEW3D, 0); countall(); DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); break; @@ -2903,7 +2932,6 @@ void do_view3d_edit_mesh_facesmenu(bContext *C, void *arg, int event) mesh_set_smooth_faces(0); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -2950,7 +2978,6 @@ void do_view3d_edit_mesh_normalsmenu(bContext *C, void *arg, int event) righthandfaces(1); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3017,7 +3044,6 @@ void do_view3d_edit_mirrormenu(bContext *C, void *arg, int event) Transform(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3064,7 +3090,6 @@ static void do_view3d_edit_mesh_showhidemenu(bContext *C, void *arg, int event) hide_mesh(1); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3078,7 +3103,7 @@ static uiBlock *view3d_edit_mesh_showhidemenu(bContext *C, ARegion *ar, void *ar uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Deselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Unselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 60); @@ -3091,7 +3116,6 @@ static void do_view3d_edit_mesh_scriptsmenu(bContext *C, void *arg, int event) #if 0 BPY_menu_do_python(PYMENU_MESH, event); - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3176,7 +3200,6 @@ static void do_view3d_edit_meshmenu(bContext *C, void *arg, int event) common_deletekey(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3298,7 +3321,7 @@ static void view3d_edit_curve_showhidemenu(bContext *C, uiMenuItem *head, void * { uiMenuItemO(head, 0, "CURVE_OT_reveal"); uiMenuItemO(head, 0, "CURVE_OT_hide"); - uiMenuItemBooleanO(head, "Hide Deselected", 0, "CURVE_OT_hide", "deselected", 1); + uiMenuItemBooleanO(head, "Hide Unselected", 0, "CURVE_OT_hide", "unselected", 1); } static void view3d_edit_curvemenu(bContext *C, uiMenuItem *head, void *arg_unused) @@ -3355,11 +3378,10 @@ static void do_view3d_edit_mball_showhidemenu(bContext *C, void *arg, int event) case 11: /* hide selected control points */ hide_mball(0); break; - case 12: /* hide deselected control points */ + case 12: /* hide selected control points */ hide_mball(1); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3373,7 +3395,7 @@ static uiBlock *view3d_edit_mball_showhidemenu(bContext *C, ARegion *ar, void *a uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Deselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Unselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 60); @@ -3411,7 +3433,6 @@ static void do_view3d_edit_metaballmenu(bContext *C, void *arg, int event) add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, 0); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3455,151 +3476,43 @@ static uiBlock *view3d_edit_metaballmenu(bContext *C, ARegion *ar, void *arg_unu return block; } -static void do_view3d_edit_text_charsmenu(bContext *C, void *arg, int event) +static void view3d_edit_text_charsmenu(bContext *C, uiMenuItem *head, void *arg_unused) { -#if 0 - switch(event) { - case 0: /* copyright */ - do_textedit(0,0,169); - break; - case 1: /* registered trademark */ - do_textedit(0,0,174); - break; - case 2: /* degree sign */ - do_textedit(0,0,176); - break; - case 3: /* Multiplication Sign */ - do_textedit(0,0,215); - break; - case 4: /* Circle */ - do_textedit(0,0,138); - break; - case 5: /* superscript 1 */ - do_textedit(0,0,185); - break; - case 6: /* superscript 2 */ - do_textedit(0,0,178); - break; - case 7: /* superscript 3 */ - do_textedit(0,0,179); - break; - case 8: /* double >> */ - do_textedit(0,0,187); - break; - case 9: /* double << */ - do_textedit(0,0,171); - break; - case 10: /* Promillage */ - do_textedit(0,0,139); - break; - case 11: /* dutch florin */ - do_textedit(0,0,164); - break; - case 12: /* british pound */ - do_textedit(0,0,163); - break; - case 13: /* japanese yen*/ - do_textedit(0,0,165); - break; - case 14: /* german S */ - do_textedit(0,0,223); - break; - case 15: /* spanish question mark */ - do_textedit(0,0,191); - break; - case 16: /* spanish exclamation mark */ - do_textedit(0,0,161); - break; - } - allqueue(REDRAWVIEW3D, 0); -#endif + /* the character codes are specified in UTF-8 */ + + uiMenuItemStringO(head, "Copyright|Alt C", 0, "FONT_OT_insert_text", "text", "\xC2\xA9"); + uiMenuItemStringO(head, "Registered Trademark|Alt R", 0, "FONT_OT_insert_text", "text", "\xC2\xAE"); + + uiMenuSeparator(head); + + uiMenuItemStringO(head, "Degree Sign|Alt G", 0, "FONT_OT_insert_text", "text", "\xC2\xB0"); + uiMenuItemStringO(head, "Multiplication Sign|Alt x", 0, "FONT_OT_insert_text", "text", "\xC3\x97"); + uiMenuItemStringO(head, "Circle|Alt .", 0, "FONT_OT_insert_text", "text", "\xC2\x8A"); + uiMenuItemStringO(head, "Superscript 1|Alt 1", 0, "FONT_OT_insert_text", "text", "\xC2\xB9"); + uiMenuItemStringO(head, "Superscript 2|Alt 2", 0, "FONT_OT_insert_text", "text", "\xC2\xB2"); + uiMenuItemStringO(head, "Superscript 3|Alt 3", 0, "FONT_OT_insert_text", "text", "\xC2\xB3"); + uiMenuItemStringO(head, "Double >>|Alt >", 0, "FONT_OT_insert_text", "text", "\xC2\xBB"); + uiMenuItemStringO(head, "Double <<|Alt <", 0, "FONT_OT_insert_text", "text", "\xC2\xAB"); + uiMenuItemStringO(head, "Promillage|Alt %", 0, "FONT_OT_insert_text", "text", "\xE2\x80\xB0"); + + uiMenuSeparator(head); + + uiMenuItemStringO(head, "Dutch Florin|Alt F", 0, "FONT_OT_insert_text", "text", "\xC2\xA4"); + uiMenuItemStringO(head, "British Pound|Alt L", 0, "FONT_OT_insert_text", "text", "\xC2\xA3"); + uiMenuItemStringO(head, "Japanese Yen|Alt Y", 0, "FONT_OT_insert_text", "text", "\xC2\xA5"); + + uiMenuSeparator(head); + + uiMenuItemStringO(head, "German S|Alt S", 0, "FONT_OT_insert_text", "text", "\xC3\x9F"); + uiMenuItemStringO(head, "Spanish Question Mark|Alt ?", 0, "FONT_OT_insert_text", "text", "\xC2\xBF"); + uiMenuItemStringO(head, "Spanish Exclamation Mark|Alt !", 0, "FONT_OT_insert_text", "text", "\xC2\xA1"); } -static uiBlock *view3d_edit_text_charsmenu(bContext *C, ARegion *ar, void *arg_unused) +static void view3d_edit_textmenu(bContext *C, uiMenuItem *head, void *arg_unused) { - uiBlock *block; - short yco = 20, menuwidth = 120; - - block= uiBeginBlock(C, ar, "view3d_edit_text_charsmenu", UI_EMBOSSP, UI_HELV); - uiBlockSetButmFunc(block, do_view3d_edit_text_charsmenu, NULL); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Copyright|Alt C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Registered Trademark|Alt R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); - - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Degree Sign|Alt G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Multiplication Sign|Alt x", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Circle|Alt .", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Superscript 1|Alt 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Superscript 2|Alt 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Superscript 3|Alt 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Double >>|Alt >", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Double <<|Alt <", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Promillage|Alt %", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, ""); - - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Dutch Florin|Alt F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "British Pound|Alt L", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Japanese Yen|Alt Y", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, ""); - - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "German S|Alt S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 14, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Spanish Question Mark|Alt ?", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Spanish Exclamation Mark|Alt !", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, ""); - - uiBlockSetDirection(block, UI_RIGHT); - uiTextBoundsBlock(block, 60); - - return block; -} - -static void do_view3d_edit_textmenu(bContext *C, void *arg, int event) -{ -#if 0 - switch(event) { - - case 0: /* Undo Editing */ - remake_editText(); - break; - case 1: /* paste from file buffer */ - paste_editText(); - break; - } - allqueue(REDRAWVIEW3D, 0); -#endif -} - -static uiBlock *view3d_edit_textmenu(bContext *C, ARegion *ar, void *arg_unused) -{ - uiBlock *block; - short yco= 0, menuwidth=120; - - block= uiBeginBlock(C, ar, "view3d_edit_textmenu", UI_EMBOSSP, UI_HELV); - uiBlockSetButmFunc(block, do_view3d_edit_textmenu, NULL); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); - - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Paste From Buffer File|Alt V", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); - - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - - uiDefIconTextBlockBut(block, view3d_edit_text_charsmenu, NULL, ICON_RIGHTARROW_THIN, "Special Characters", 0, yco-=20, 120, 19, ""); - - if(ar->alignment==RGN_ALIGN_TOP) { - uiBlockSetDirection(block, UI_DOWN); - } - else { - uiBlockSetDirection(block, UI_TOP); - uiBlockFlipOrder(block); - } - - uiTextBoundsBlock(block, 50); - return block; + uiMenuItemO(head, 0, "FONT_OT_paste_file"); + uiMenuSeparator(head); + uiMenuLevel(head, "Special Characters", view3d_edit_text_charsmenu); } static void do_view3d_edit_latticemenu(bContext *C, void *arg, int event) @@ -3627,14 +3540,10 @@ static void do_view3d_edit_latticemenu(bContext *C, void *arg, int event) if(scene->proportional) scene->proportional= 0; else scene->proportional= 1; break; - case 6: - uv_autocalc_tface(); - break; case 7: /* delete keyframe */ common_deletekey(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3696,7 +3605,6 @@ void do_view3d_edit_armature_parentmenu(bContext *C, void *arg, int event) clear_bone_parent(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3727,7 +3635,6 @@ void do_view3d_edit_armature_rollmenu(bContext *C, void *arg, int event) initTransform(TFM_BONE_ROLL, CTX_NONE); Transform(); } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3813,7 +3720,6 @@ static void do_view3d_edit_armaturemenu(bContext *C, void *arg, int event) break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3824,7 +3730,6 @@ static void do_view3d_scripts_armaturemenu(bContext *C, void *arg, int event) #if 0 BPY_menu_do_python(PYMENU_ARMATURE, event); - allqueue(REDRAWVIEW3D, 0); #endif } @@ -3976,7 +3881,6 @@ static void do_view3d_pose_armature_transformmenu(bContext *C, void *arg, int ev ED_undo_push(C, "Pose, Clear User Transform"); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4016,7 +3920,6 @@ static void do_view3d_pose_armature_showhidemenu(bContext *C, void *arg, int eve hide_unselected_pose_bones(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4030,7 +3933,7 @@ static uiBlock *view3d_pose_armature_showhidemenu(bContext *C, ARegion *ar, void uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Deselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Unselected|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 60); @@ -4050,7 +3953,6 @@ static void do_view3d_pose_armature_ikmenu(bContext *C, void *arg, int event) pose_clear_IK(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4083,7 +3985,6 @@ static void do_view3d_pose_armature_constraintsmenu(bContext *C, void *arg, int pose_clear_constraints(); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4158,7 +4059,6 @@ static void do_view3d_pose_armature_motionpathsmenu(bContext *C, void *arg, int pose_clear_paths(OBACT); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4198,7 +4098,6 @@ static void do_view3d_pose_armature_poselibmenu(bContext *C, void *arg, int even break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4280,7 +4179,6 @@ static void do_view3d_pose_armaturemenu(bContext *C, void *arg, int event) break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4378,7 +4276,6 @@ static void do_view3d_vpaintmenu(bContext *C, void *arg, int event) make_vertexcol(1); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4431,7 +4328,6 @@ static void do_view3d_tpaintmenu(bContext *C, void *arg, int event) break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4482,7 +4378,6 @@ static void do_view3d_wpaintmenu(bContext *C, void *arg, int event) pose_adds_vgroups(ob, 1); break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4561,8 +4456,6 @@ void do_view3d_sculpt_inputmenu(bContext *C, void *arg, int event) break; } - allqueue(REDRAWBUTSEDIT, 0); - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4731,7 +4624,6 @@ static void do_view3d_facesel_showhidemenu(bContext *C, void *arg, int event) // G.qual &= ~LR_SHIFTKEY; break; } - allqueue(REDRAWVIEW3D, 0); #endif } @@ -4745,7 +4637,7 @@ static uiBlock *view3d_facesel_showhidemenu(bContext *C, ARegion *ar, void *arg_ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden Faces|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected Faces|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Deselected Faces|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Unselected Faces|Shift H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 60); @@ -4766,8 +4658,6 @@ static void do_view3d_faceselmenu(bContext *C, void *arg, int event) seam_mark_clear_tface(2); break; } - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWIMAGE, 0); #endif } @@ -4802,196 +4692,61 @@ static uiBlock *view3d_faceselmenu(bContext *C, ARegion *ar, void *arg_unused) return block; } -void do_view3d_select_particlemenu(bContext *C, void *arg, int event) -{ - - /* events >= 6 are registered bpython scripts */ -#ifndef DISABLE_PYTHON -// XXX if (event >= 6) BPY_menu_do_python(PYMENU_FACESELECT, event - 6); -#endif - switch(event) { - case 0: - // XXX PE_borderselect(); - break; - case 1: - PE_deselectall(); - break; - case 2: - PE_select_root(); - break; - case 3: - PE_select_tip(); - break; - case 4: - PE_select_more(); - break; - case 5: - PE_select_less(); - break; - case 7: - PE_select_linked(); - break; - } -} - -static uiBlock *view3d_select_particlemenu(bContext *C, ARegion *ar, void *arg_unused) -{ - uiBlock *block; - short yco= 0, menuwidth=120; - - block= uiBeginBlock(C, ar, "view3d_select_particlemenu", UI_EMBOSSP, UI_HELV); - uiBlockSetButmFunc(block, do_view3d_select_particlemenu, NULL); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); - - uiDefBut(block, SEPR, 0, "", - 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select/Deselect All|A", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Linked|L", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Last|W, 4", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select First|W, 3", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); - - uiDefBut(block, SEPR, 0, "", - 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "More|Ctrl NumPad +", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Less|Ctrl NumPad -", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); - - - if(ar->alignment==RGN_ALIGN_TOP) { - uiBlockSetDirection(block, UI_DOWN); - } - else { - uiBlockSetDirection(block, UI_TOP); - uiBlockFlipOrder(block); - } - - uiTextBoundsBlock(block, 50); - return block; -} - -void do_view3d_particle_showhidemenu(bContext *C, void *arg, int event) -{ - - switch(event) { - case 1: /* show hidden */ - PE_hide(0); - break; - case 2: /* hide selected */ - PE_hide(2); - break; - case 3: /* hide deselected */ - PE_hide(1); - break; - } -} - -static uiBlock *view3d_particle_showhidemenu(bContext *C, ARegion *ar, void *arg_unused) -{ - uiBlock *block; - short yco = 20, menuwidth = 120; - - block= uiBeginBlock(C, ar, "view3d_particle_showhidemenu", UI_EMBOSSP, UI_HELV); - uiBlockSetButmFunc(block, do_view3d_particle_showhidemenu, NULL); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden|Alt H", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected|H", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Deselected|Shift H", - 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); - - uiBlockSetDirection(block, UI_RIGHT); - uiTextBoundsBlock(block, 60); - return block; -} - -void do_view3d_particlemenu(bContext *C, void *arg, int event) -{ -#if 0 - Scene *scene= CTX_data_scene(C); - ScrArea *sa= CTX_wm_area(C); - View3D *v3d= sa->spacedata.first; - ParticleEditSettings *pset= PE_settings(); - - switch(event) { - case 1: - add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, UI_PNL_UNSTOW); - break; - case 2: - if(button(&pset->totrekey, 2, 100, "Number of Keys:")==0) return; - PE_rekey(); - break; - case 3: - PE_subdivide(); - break; - case 4: - PE_delete_particle(); - break; - case 5: - PE_mirror_x(0); - break; - case 6: - pset->flag ^= PE_X_MIRROR; - break; - case 7: - PE_remove_doubles(); - break; - } - - allqueue(REDRAWVIEW3D, 0); -#endif -} - -uiBlock *view3d_particlemenu(bContext *C, ARegion *ar, void *arg_unused) +static void view3d_select_particlemenu(bContext *C, uiMenuItem *head, void *arg_unused) { Scene *scene= CTX_data_scene(C); - uiBlock *block; - ParticleEditSettings *pset= PE_settings(scene); - short yco= 0, menuwidth= 120; - block= uiBeginBlock(C, ar, "view3d_particlemenu", UI_EMBOSSP, UI_HELV); - uiBlockSetButmFunc(block, do_view3d_particlemenu, NULL); - - uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Particle Edit Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, ""); - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiMenuItemO(head, 0, "VIEW3D_OT_borderselect"); - uiDefIconTextBut(block, BUTM, 1, (pset->flag & PE_X_MIRROR)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT, "X-Axis Mirror Editing", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Mirror|Ctrl M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiMenuSeparator(head); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Remove Doubles|W, 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete...|X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); + uiMenuItemO(head, 0, "PARTICLE_OT_de_select_all"); + uiMenuItemO(head, 0, "PARTICLE_OT_select_linked"); + + if(scene->selectmode & SCE_SELECT_POINT) { + uiMenuItemO(head, 0, "PARTICLE_OT_select_last"); // |W, 4 + uiMenuItemO(head, 0, "PARTICLE_OT_select_first"); // |W, 3 + } + + uiMenuSeparator(head); + + uiMenuItemO(head, 0, "PARTICLE_OT_select_more"); + uiMenuItemO(head, 0, "PARTICLE_OT_select_less"); +} + +static void view3d_particle_showhidemenu(bContext *C, uiMenuItem *head, void *arg_unused) +{ + uiMenuItemO(head, 0, "PARTICLE_OT_reveal"); + uiMenuItemO(head, 0, "PARTICLE_OT_hide"); + uiMenuItemBooleanO(head, "Hide Unselected", 0, "PARTICLE_OT_hide", "unselected", 1); +} + +static void view3d_particlemenu(bContext *C, uiMenuItem *head, void *arg_unused) +{ + Scene *scene= CTX_data_scene(C); + + // XXX uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Particle Edit Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, ""); + // add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, UI_PNL_UNSTOW); + // XXX uiMenuSeparator(head); + // + // XXX uiDefIconTextBut(block, BUTM, 1, (pset->flag & PE_X_MIRROR)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT, "X-Axis Mirror Editing", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); + // pset->flag ^= PE_X_MIRROR; + + uiMenuItemO(head, 0, "PARTICLE_OT_mirror"); // |Ctrl M + + uiMenuSeparator(head); + + uiMenuItemO(head, 0, "PARTICLE_OT_remove_doubles"); // |W, 5 + uiMenuItemO(head, 0, "PARTICLE_OT_delete"); if(scene->selectmode & SCE_SELECT_POINT) - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Subdivide|W, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Rekey|W, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); - uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiMenuItemO(head, 0, "PARTICLE_OT_subdivide"); // |W, 2 + uiMenuItemO(head, 0, "PARTICLE_OT_rekey"); // |W, 1 - uiDefIconTextBlockBut(block, view3d_particle_showhidemenu, NULL, ICON_RIGHTARROW_THIN, "Show/Hide Particles", 0, yco-=20, menuwidth, 19, ""); + uiMenuSeparator(head); - if(ar->alignment==RGN_ALIGN_TOP) { - uiBlockSetDirection(block, UI_DOWN); - } - else { - uiBlockSetDirection(block, UI_TOP); - uiBlockFlipOrder(block); - } - - uiTextBoundsBlock(block, 50); - - return block; + uiMenuLevel(head, "Show/Hide Particles", view3d_particle_showhidemenu); } - static char *view3d_modeselect_pup(Scene *scene) { Object *ob= OBACT; @@ -5002,9 +4757,9 @@ static char *view3d_modeselect_pup(Scene *scene) str += sprintf(str, "Mode: %%t"); if(ob) - str += sprintf(str, formatstr, "Object Mode", V3D_OBJECTMODE_SEL, ICON_OBJECT); + str += sprintf(str, formatstr, "Object Mode", V3D_OBJECTMODE_SEL, ICON_OBJECT_DATA); else - str += sprintf(str, formatstr, " ", V3D_OBJECTMODE_SEL, ICON_OBJECT); + str += sprintf(str, formatstr, " ", V3D_OBJECTMODE_SEL, ICON_OBJECT_DATA); if(ob==NULL) return string; @@ -5032,7 +4787,7 @@ static char *view3d_modeselect_pup(Scene *scene) } if (ob->particlesystem.first) { - str += sprintf(str, formatstr, "Particle Mode", V3D_PARTICLEEDITMODE_SEL, ICON_PHYSICS); + str += sprintf(str, formatstr, "Particle Mode", V3D_PARTICLEEDITMODE_SEL, ICON_PARTICLEMODE); } return (string); @@ -5114,6 +4869,7 @@ static char *propfalloff_pup(void) static void do_view3d_header_buttons(bContext *C, void *arg, int event) { + wmWindow *win= CTX_wm_window(C); Scene *scene= CTX_data_scene(C); ScrArea *sa= CTX_wm_area(C); View3D *v3d= sa->spacedata.first; @@ -5121,7 +4877,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) Object *ob= CTX_data_active_object(C); Object *obedit = CTX_data_edit_object(C); EditMesh *em= NULL; - int bit, ctrl=0, shift=0; // XXX shift arg? + int bit, ctrl= win->eventstate->ctrl, shift= win->eventstate->shift; if(obedit && obedit->type==OB_MESH) { em= ((Mesh *)obedit->data)->edit_mesh; @@ -5198,7 +4954,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) ED_view3d_exit_paint_modes(C); if(obedit) ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ - WM_operator_name_call(C, "VIEW3D_OT_vpaint_toggle", WM_OP_EXEC_REGION_WIN, NULL); + WM_operator_name_call(C, "PAINT_OT_vertex_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL); } } else if (v3d->modeselect == V3D_TEXTUREPAINTMODE_SEL) { @@ -5206,8 +4962,8 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) v3d->flag &= ~V3D_MODE; ED_view3d_exit_paint_modes(C); if(obedit) ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ - -// XXX set_texturepaint(); + + WM_operator_name_call(C, "PAINT_OT_texture_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL); } } else if (v3d->modeselect == V3D_WEIGHTPAINTMODE_SEL) { @@ -5217,7 +4973,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) if(obedit) ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ - WM_operator_name_call(C, "VIEW3D_OT_wpaint_toggle", WM_OP_EXEC_REGION_WIN, NULL); + WM_operator_name_call(C, "PAINT_OT_weight_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL); } } else if (v3d->modeselect == V3D_POSEMODE_SEL) { @@ -5236,15 +4992,13 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) ED_view3d_exit_paint_modes(C); if(obedit) ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ - PE_set_particle_edit(scene); + WM_operator_name_call(C, "PARTICLE_OT_particle_edit_toggle", WM_OP_EXEC_REGION_WIN, NULL); } } - allqueue(REDRAWVIEW3D, 1); break; case B_AROUND: // XXX handle_view3d_around(); /* copies to other 3d windows */ - allqueue(REDRAWVIEW3D, 1); break; case B_SEL_VERT: @@ -5289,43 +5043,33 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) case B_SEL_PATH: scene->selectmode= SCE_SELECT_PATH; ED_undo_push(C, "Selectmode Set: Path"); - allqueue(REDRAWVIEW3D, 1); break; case B_SEL_POINT: scene->selectmode = SCE_SELECT_POINT; ED_undo_push(C, "Selectmode Set: Point"); - allqueue(REDRAWVIEW3D, 1); break; case B_SEL_END: scene->selectmode = SCE_SELECT_END; ED_undo_push(C, "Selectmode Set: End point"); - allqueue(REDRAWVIEW3D, 1); break; case B_MAN_TRANS: if( shift==0 || v3d->twtype==0) v3d->twtype= V3D_MANIP_TRANSLATE; - allqueue(REDRAWVIEW3D, 1); break; case B_MAN_ROT: if( shift==0 || v3d->twtype==0) v3d->twtype= V3D_MANIP_ROTATE; - allqueue(REDRAWVIEW3D, 1); break; case B_MAN_SCALE: if( shift==0 || v3d->twtype==0) v3d->twtype= V3D_MANIP_SCALE; - allqueue(REDRAWVIEW3D, 1); break; case B_NDOF: - allqueue(REDRAWVIEW3D, 1); break; case B_MAN_MODE: - allqueue(REDRAWVIEW3D, 1); break; case B_VIEW_BUTSEDIT: - allqueue(REDRAWVIEW3D, 1); - allqueue(REDRAWBUTSEDIT, 1); break; default: @@ -5364,8 +5108,6 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) /* new layers might need unflushed events events */ DAG_scene_update_flags(scene, v3d->lay); /* tags all that moves and flushes */ - allqueue(REDRAWOOPS, 0); - allqueue(REDRAWNLA, 0); } break; } @@ -5403,7 +5145,7 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o } else if (ob && (ob->type == OB_CURVE || ob->type == OB_SURF)) { uiDefMenuBut(block, view3d_select_curvemenu, NULL, "Select", xco, yco-2, xmax-3, 24, ""); } else if (ob && ob->type == OB_FONT) { - uiDefPulldownBut(block, view3d_select_meshmenu, NULL, "Select", xco, yco-2, xmax-3, 24, ""); + xmax= 0; } else if (ob && ob->type == OB_MBALL) { uiDefPulldownBut(block, view3d_select_metaballmenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); } else if (ob && ob->type == OB_LATTICE) { @@ -5418,7 +5160,7 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o } else if ((G.f & G_VERTEXPAINT) || (G.f & G_TEXTUREPAINT) || (G.f & G_WEIGHTPAINT)) { uiDefBut(block, LABEL,0,"", xco, 0, xmax, 20, 0, 0, 0, 0, 0, ""); } else if (G.f & G_PARTICLEEDIT) { - uiDefPulldownBut(block, view3d_select_particlemenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_select_particlemenu, NULL, "Select", xco,yco-2, xmax-3, 24, ""); } else { if (ob && (ob->flag & OB_POSEMODE)) @@ -5443,7 +5185,7 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o xco+= xmax; } else if (ob && ob->type == OB_FONT) { xmax= GetButStringLength("Text"); - uiDefPulldownBut(block, view3d_edit_textmenu, NULL, "Text", xco,yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_edit_textmenu, NULL, "Text", xco, yco-2, xmax-3, 24, ""); xco+= xmax; } else if (ob && ob->type == OB_MBALL) { xmax= GetButStringLength("Metaball"); @@ -5489,7 +5231,7 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o } else if(G.f & G_PARTICLEEDIT) { xmax= GetButStringLength("Particle"); - uiDefPulldownBut(block, view3d_particlemenu, NULL, "Particle", xco,yco-2, xmax-3, 24, ""); + uiDefMenuBut(block, view3d_particlemenu, NULL, "Particle", xco,yco-2, xmax-3, 24, ""); xco+= xmax; } else { @@ -5767,7 +5509,7 @@ void view3d_header_buttons(const bContext *C, ARegion *ar) xco+= 20; } - uiDefIconBut(block, BUT, B_VIEWRENDER, ICON_SCENE_DEHLT, xco,yco,XIC,YIC, NULL, 0, 1.0, 0, 0, "Render this window (Ctrl Click for anim)"); + uiDefIconBut(block, BUT, B_VIEWRENDER, ICON_SCENE, xco,yco,XIC,YIC, NULL, 0, 1.0, 0, 0, "Render this window (Ctrl Click for anim)"); if (ob && (ob->flag & OB_POSEMODE)) { diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 61762928996..6e26a9a7ad8 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -55,6 +55,7 @@ struct ViewContext; /* view3d_header.c */ void view3d_header_buttons(const struct bContext *C, struct ARegion *ar); +void VIEW3D_OT_layers(struct wmOperatorType *ot); /* view3d_ops.c */ void view3d_operatortypes(void); @@ -112,28 +113,17 @@ void VIEW3D_OT_circle_select(struct wmOperatorType *ot); void VIEW3D_OT_borderselect(struct wmOperatorType *ot); void VIEW3D_OT_lasso_select(struct wmOperatorType *ot); -/* vpaint.c */ -void VIEW3D_OT_vpaint_radial_control(struct wmOperatorType *ot); -void VIEW3D_OT_wpaint_radial_control(struct wmOperatorType *ot); -void VIEW3D_OT_vpaint_toggle(struct wmOperatorType *ot); -void VIEW3D_OT_vpaint(struct wmOperatorType *ot); -void VIEW3D_OT_wpaint_toggle(struct wmOperatorType *ot); -void VIEW3D_OT_wpaint(struct wmOperatorType *ot); - /* view3d_view.c */ void VIEW3D_OT_smoothview(struct wmOperatorType *ot); void VIEW3D_OT_setcameratoview(struct wmOperatorType *ot); +void VIEW3D_OT_localview(struct wmOperatorType *ot); int boundbox_clip(RegionView3D *rv3d, float obmat[][4], struct BoundBox *bb); void view3d_project_short_clip(struct ARegion *ar, float *vec, short *adr, float projmat[4][4], float wmat[4][4]); void view3d_project_short_noclip(struct ARegion *ar, float *vec, short *adr, float mat[4][4]); -void view3d_project_float(struct ARegion *a, float *vec, float *adr, float mat[4][4]); -void view3d_get_object_project_mat(RegionView3D *v3d, struct Object *ob, float pmat[4][4], float vmat[4][4]); -void initlocalview(Scene *scene, struct ARegion *ar, View3D *v3d); -void restore_localviewdata(View3D *vd); -void endlocalview(Scene *scene, ScrArea *sa); +void view3d_project_float(struct ARegion *a, float *vec, float *adr, float mat[4][4]); void centerview(struct ARegion *ar, View3D *v3d); @@ -147,6 +137,17 @@ void VIEW3D_OT_properties(struct wmOperatorType *ot); void view3d_buttons_area_defbuts(const struct bContext *C, ARegion *ar); +/* view3d_snap.c */ +int minmax_verts(Object *obedit, float *min, float *max); + +void VIEW3D_OT_snap_selected_to_grid(struct wmOperatorType *ot); +void VIEW3D_OT_snap_selected_to_cursor(struct wmOperatorType *ot); +void VIEW3D_OT_snap_selected_to_center(struct wmOperatorType *ot); +void VIEW3D_OT_snap_cursor_to_grid(struct wmOperatorType *ot); +void VIEW3D_OT_snap_cursor_to_selected(struct wmOperatorType *ot); +void VIEW3D_OT_snap_cursor_to_active(struct wmOperatorType *ot); +void VIEW3D_OT_snap_menu(struct wmOperatorType *ot); + /* space_view3d.c */ ARegion *view3d_has_buttons_region(ScrArea *sa); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index b2accbdda26..6d071056b78 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -83,15 +83,19 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_lasso_select); WM_operatortype_append(VIEW3D_OT_setcameratoview); WM_operatortype_append(VIEW3D_OT_drawtype); - WM_operatortype_append(VIEW3D_OT_vpaint_radial_control); - WM_operatortype_append(VIEW3D_OT_wpaint_radial_control); - WM_operatortype_append(VIEW3D_OT_vpaint_toggle); - WM_operatortype_append(VIEW3D_OT_wpaint_toggle); - WM_operatortype_append(VIEW3D_OT_vpaint); - WM_operatortype_append(VIEW3D_OT_wpaint); WM_operatortype_append(VIEW3D_OT_editmesh_face_toolbox); WM_operatortype_append(VIEW3D_OT_properties); + WM_operatortype_append(VIEW3D_OT_localview); + WM_operatortype_append(VIEW3D_OT_layers); + WM_operatortype_append(VIEW3D_OT_snap_selected_to_grid); + WM_operatortype_append(VIEW3D_OT_snap_selected_to_cursor); + WM_operatortype_append(VIEW3D_OT_snap_selected_to_center); + WM_operatortype_append(VIEW3D_OT_snap_cursor_to_grid); + WM_operatortype_append(VIEW3D_OT_snap_cursor_to_selected); + WM_operatortype_append(VIEW3D_OT_snap_cursor_to_active); + WM_operatortype_append(VIEW3D_OT_snap_menu); + transform_operatortypes(); } @@ -100,8 +104,8 @@ void view3d_keymap(wmWindowManager *wm) ListBase *keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0); wmKeymapItem *km; - WM_keymap_add_item(keymap, "VIEW3D_OT_vpaint_toggle", VKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "VIEW3D_OT_wpaint_toggle", TABKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_toggle", VKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_toggle", TABKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_properties", NKEY, KM_PRESS, 0, 0); @@ -109,8 +113,12 @@ void view3d_keymap(wmWindowManager *wm) keymap= WM_keymap_listbase(wm, "View3D", SPACE_VIEW3D, 0); /* paint poll checks mode */ - WM_keymap_verify_item(keymap, "VIEW3D_OT_vpaint", LEFTMOUSE, KM_PRESS, 0, 0); - WM_keymap_verify_item(keymap, "VIEW3D_OT_wpaint", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "PAINT_OT_weight_paint", LEFTMOUSE, KM_PRESS, 0, 0); + + WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_set_clone_cursor", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); @@ -151,6 +159,20 @@ void view3d_keymap(wmWindowManager *wm) RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", PAD6, KM_PRESS, KM_CTRL, 0)->ptr, "type", V3D_VIEW_PANRIGHT); RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", PAD8, KM_PRESS, KM_CTRL, 0)->ptr, "type", V3D_VIEW_PANUP); + WM_keymap_add_item(keymap, "VIEW3D_OT_localview", PADSLASHKEY, KM_PRESS, 0, 0); + + /* layers, shift + alt are properties set in invoke() */ + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", ONEKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 1); + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", TWOKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 2); + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", THREEKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 3); + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", FOURKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 4); + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", FIVEKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 5); + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", SIXKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 6); + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", SEVENKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 7); + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", EIGHTKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 8); + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", NINEKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 9); + RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_layers", ZEROKEY, KM_PRESS, KM_ANY, 0)->ptr, "nr", 10); + /* drawtype */ km = WM_keymap_add_item(keymap, "VIEW3D_OT_drawtype", ZKEY, KM_PRESS, 0, 0); RNA_int_set(km->ptr, "draw_type", OB_SOLID); @@ -178,15 +200,17 @@ void view3d_keymap(wmWindowManager *wm) WM_keymap_add_item(keymap, "VIEW3D_OT_set_camera_to_view", PAD0, KM_PRESS, KM_ALT|KM_CTRL, 0); + WM_keymap_add_item(keymap, "VIEW3D_OT_snap_menu", SKEY, KM_PRESS, KM_SHIFT, 0); + /* radial control */ RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", WM_RADIALCONTROL_ANGLE); - RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_vpaint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); - RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_wpaint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); - RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_vpaint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); - RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_wpaint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); + RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); + RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); + RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); + RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); /* TODO - this is just while we have no way to load a text datablock */ RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile", PKEY, KM_PRESS, 0, 0)->ptr, "filename", "test.py"); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 9a94ca8624c..f4525b97128 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -76,7 +76,7 @@ #include "ED_armature.h" #include "ED_curve.h" -#include "ED_editparticle.h" +#include "ED_particle.h" #include "ED_mesh.h" #include "ED_object.h" #include "ED_screen.h" @@ -103,6 +103,44 @@ void view3d_set_viewcontext(bContext *C, ViewContext *vc) vc->obedit= CTX_data_edit_object(C); } +void view3d_get_view_aligned_coordinate(ViewContext *vc, float *fp, short mval[2]) +{ + float dvec[3]; + short mx, my; + + mx= mval[0]; + my= mval[1]; + + project_short_noclip(vc->ar, fp, mval); + + initgrabz(vc->rv3d, fp[0], fp[1], fp[2]); + + if(mval[0]!=IS_CLIPPED) { + window_to_3d_delta(vc->ar, dvec, mval[0]-mx, mval[1]-my); + VecSubf(fp, fp, dvec); + } +} + +void view3d_get_transformation(ViewContext *vc, Object *ob, bglMats *mats) +{ + float cpy[4][4]; + int i, j; + + Mat4MulMat4(cpy, vc->rv3d->viewmat, ob->obmat); + + for(i = 0; i < 4; ++i) { + for(j = 0; j < 4; ++j) { + mats->projection[i*4+j] = vc->rv3d->winmat[i][j]; + mats->modelview[i*4+j] = cpy[i][j]; + } + } + + mats->viewport[0] = vc->ar->winrct.xmin; + mats->viewport[1] = vc->ar->winrct.ymin; + mats->viewport[2] = vc->ar->winx; + mats->viewport[3] = vc->ar->winy; +} + /* ********************** view3d_select: selection manipulations ********************* */ /* XXX to solve *************** */ @@ -659,7 +697,7 @@ void view3d_lasso_select(ViewContext *vc, short mcords[][2], short moves, short else if(G.f & (G_VERTEXPAINT|G_TEXTUREPAINT|G_WEIGHTPAINT)) ; else if(G.f & G_PARTICLEEDIT) - PE_do_lasso_select(vc, mcords, moves, select); + PE_lasso_select(vc, mcords, moves, select); else do_lasso_select_objects(vc, mcords, moves, select); } @@ -1311,7 +1349,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } else if(obedit==NULL && (G.f & G_PARTICLEEDIT)) { - PE_borderselect(&vc, &rect, (val==LEFTMOUSE)); + PE_border_select(&vc, &rect, (val==LEFTMOUSE)); return OPERATOR_FINISHED; } @@ -1526,29 +1564,24 @@ void VIEW3D_OT_borderselect(wmOperatorType *ot) static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); Object *obedit= CTX_data_edit_object(C); short extend= RNA_enum_is_equal(op->ptr, "type", "EXTEND"); - short mval[2]; - - mval[0]= event->x - ar->winrct.xmin; - mval[1]= event->y - ar->winrct.ymin; view3d_operator_needs_opengl(C); if(obedit) { if(obedit->type==OB_MESH) - mouse_mesh(C, mval, extend); + mouse_mesh(C, event->mval, extend); else if(obedit->type==OB_ARMATURE) - mouse_armature(C, mval, extend); + mouse_armature(C, event->mval, extend); else if(obedit->type==OB_LATTICE) - mouse_lattice(C, mval, extend); + mouse_lattice(C, event->mval, extend); else if(ELEM(obedit->type, OB_CURVE, OB_SURF)) - mouse_nurb(C, mval, extend); + mouse_nurb(C, event->mval, extend); } else - mouse_select(C, mval, extend, 0); + mouse_select(C, event->mval, extend, 0); /* allowing tweaks */ return OPERATOR_PASS_THROUGH|OPERATOR_FINISHED; @@ -1752,7 +1785,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) int y= RNA_int_get(op->ptr, "y"); int radius= RNA_int_get(op->ptr, "radius"); - if(CTX_data_edit_object(C)) { + if(CTX_data_edit_object(C) || (G.f & G_PARTICLEEDIT)) { ViewContext vc; short mval[2], selecting; @@ -1762,7 +1795,11 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) mval[0]= x; mval[1]= y; selecting= LEFTMOUSE==RNA_int_get(op->ptr, "event_type"); // XXX solve - obedit_circle_select(&vc, selecting, mval, (float)radius); + + if(CTX_data_edit_object(C)) + obedit_circle_select(&vc, selecting, mval, (float)radius); + else + PE_circle_select(&vc, selecting, mval, (float)radius); } else { Base *base; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index c45cb024e4f..0dd4d072d72 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1090,7 +1090,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b rect.xmin= input->xmin-12; // seems to be default value for bones only now rect.xmax= input->xmin+12; rect.ymin= input->ymin-12; - rect.ymax= input->xmin+12; + rect.ymax= input->ymin+12; } else { rect.xmin= input->xmin; @@ -1183,7 +1183,8 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b return hits; } -// XXX solve: localview on region level? no.... layers are area, so all regions in area have to be set +/* ********************** local view operator ******************** */ + static unsigned int free_localbit(void) { unsigned int lay; @@ -1219,11 +1220,11 @@ static unsigned int free_localbit(void) } -void initlocalview(Scene *scene, ARegion *ar, View3D *v3d) +static void initlocalview(Scene *scene, ScrArea *sa) { - RegionView3D *rv3d= ar->regiondata; + View3D *v3d= sa->spacedata.first; Base *base; - float size = 0.0, min[3], max[3], afm[3]; + float size = 0.0, min[3], max[3], box[3]; unsigned int locallay; int ok=0; @@ -1247,111 +1248,136 @@ void initlocalview(Scene *scene, ARegion *ar, View3D *v3d) scene->obedit->lay= BASACT->lay; } else { - base= FIRSTBASE; - while(base) { + for(base= FIRSTBASE; base; base= base->next) { if(TESTBASE(v3d, base)) { minmax_object(base->object, min, max); base->lay |= locallay; base->object->lay= base->lay; ok= 1; } - base= base->next; } } - afm[0]= (max[0]-min[0]); - afm[1]= (max[1]-min[1]); - afm[2]= (max[2]-min[2]); - size= 0.7*MAX3(afm[0], afm[1], afm[2]); + box[0]= (max[0]-min[0]); + box[1]= (max[1]-min[1]); + box[2]= (max[2]-min[2]); + size= MAX3(box[0], box[1], box[2]); if(size<=0.01) size= 0.01; } if(ok) { + ARegion *ar; + v3d->localvd= MEM_mallocN(sizeof(View3D), "localview"); + memcpy(v3d->localvd, v3d, sizeof(View3D)); - rv3d->ofs[0]= -(min[0]+max[0])/2.0; - rv3d->ofs[1]= -(min[1]+max[1])/2.0; - rv3d->ofs[2]= -(min[2]+max[2])/2.0; + for(ar= sa->regionbase.first; ar; ar= ar->next) { + if(ar->regiontype == RGN_TYPE_WINDOW) { + RegionView3D *rv3d= ar->regiondata; - rv3d->dist= size; + rv3d->localvd= MEM_mallocN(sizeof(RegionView3D), "localview region"); + memcpy(rv3d->localvd, rv3d, sizeof(RegionView3D)); + + rv3d->ofs[0]= -(min[0]+max[0])/2.0; + rv3d->ofs[1]= -(min[1]+max[1])/2.0; + rv3d->ofs[2]= -(min[2]+max[2])/2.0; - // correction for window aspect ratio - if(ar->winy>2 && ar->winx>2) { - size= (float)ar->winx/(float)ar->winy; - if(size<1.0) size= 1.0/size; - rv3d->dist*= size; + rv3d->dist= size; + /* perspective should be a bit farther away to look nice */ + if(rv3d->persp==V3D_ORTHO) + rv3d->dist*= 0.7; + + // correction for window aspect ratio + if(ar->winy>2 && ar->winx>2) { + float asp= (float)ar->winx/(float)ar->winy; + if(asp<1.0) asp= 1.0/asp; + rv3d->dist*= asp; + } + + if (rv3d->persp==V3D_CAMOB) rv3d->persp= V3D_PERSP; + + v3d->cursor[0]= -rv3d->ofs[0]; + v3d->cursor[1]= -rv3d->ofs[1]; + v3d->cursor[2]= -rv3d->ofs[2]; + } } - - if (rv3d->persp==V3D_CAMOB) rv3d->persp= V3D_PERSP; if (v3d->near> 0.1) v3d->near= 0.1; - v3d->cursor[0]= -rv3d->ofs[0]; - v3d->cursor[1]= -rv3d->ofs[1]; - v3d->cursor[2]= -rv3d->ofs[2]; - v3d->lay= locallay; - -// XXX countall(); -// XXX scrarea_queue_winredraw(curarea); } else { /* clear flags */ - base= FIRSTBASE; - while(base) { + for(base= FIRSTBASE; base; base= base->next) { if( base->lay & locallay ) { base->lay-= locallay; if(base->lay==0) base->lay= v3d->layact; if(base->object != scene->obedit) base->flag |= SELECT; base->object->lay= base->lay; } - base= base->next; - } -// XXX scrarea_queue_headredraw(curarea); - + } v3d->localview= 0; } -// XXX BIF_view3d_previewrender_signal(curarea, PR_DBASE|PR_DISPRECT); + } -void restore_localviewdata(View3D *vd) +static void restore_localviewdata(ScrArea *sa, int free) { - if(vd->localvd==0) return; + ARegion *ar; + View3D *v3d= sa->spacedata.first; - VECCOPY(vd->ofs, vd->localvd->ofs); - vd->near= vd->localvd->near; - vd->far= vd->localvd->far; - vd->lay= vd->localvd->lay; - vd->layact= vd->localvd->layact; - vd->drawtype= vd->localvd->drawtype; - vd->camera= vd->localvd->camera; + if(v3d->localvd==NULL) return; + v3d->near= v3d->localvd->near; + v3d->far= v3d->localvd->far; + v3d->lay= v3d->localvd->lay; + v3d->layact= v3d->localvd->layact; + v3d->drawtype= v3d->localvd->drawtype; + v3d->camera= v3d->localvd->camera; + + if(free) { + MEM_freeN(v3d->localvd); + v3d->localvd= NULL; + v3d->localview= 0; + } + + for(ar= sa->regionbase.first; ar; ar= ar->next) { + if(ar->regiontype == RGN_TYPE_WINDOW) { + RegionView3D *rv3d= ar->regiondata; + + if(rv3d->localvd) { + rv3d->dist= rv3d->localvd->dist; + VECCOPY(rv3d->ofs, rv3d->localvd->ofs); + QUATCOPY(rv3d->viewquat, rv3d->localvd->viewquat); + rv3d->view= rv3d->localvd->view; + rv3d->persp= rv3d->localvd->persp; + rv3d->camzoom= rv3d->localvd->camzoom; + + if(free) { + MEM_freeN(rv3d->localvd); + rv3d->localvd= NULL; + } + } + } + } } -void endlocalview(Scene *scene, ScrArea *sa) +static void endlocalview(Scene *scene, ScrArea *sa) { - View3D *v3d; + View3D *v3d= sa->spacedata.first; struct Base *base; unsigned int locallay; - if(sa->spacetype!=SPACE_VIEW3D) return; - v3d= sa->spacedata.first; - if(v3d->localvd) { locallay= v3d->lay & 0xFF000000; - restore_localviewdata(v3d); - - MEM_freeN(v3d->localvd); - v3d->localvd= 0; - v3d->localview= 0; + restore_localviewdata(sa, 1); // 1 = free /* for when in other window the layers have changed */ if(v3d->scenelock) v3d->lay= scene->lay; - base= FIRSTBASE; - while(base) { + for(base= FIRSTBASE; base; base= base->next) { if( base->lay & locallay ) { base->lay-= locallay; if(base->lay==0) base->lay= v3d->layact; @@ -1361,16 +1387,39 @@ void endlocalview(Scene *scene, ScrArea *sa) } base->object->lay= base->lay; } - base= base->next; } - -// XXX countall(); -// XXX allqueue(REDRAWVIEW3D, 0); /* because of select */ -// XXX allqueue(REDRAWOOPS, 0); /* because of select */ -// XXX BIF_view3d_previewrender_signal(curarea, PR_DBASE|PR_DISPRECT); } } +static int localview_exec(bContext *C, wmOperator *unused) +{ + View3D *v3d= CTX_wm_view3d(C); + + if(v3d->localvd) + endlocalview(CTX_data_scene(C), CTX_wm_area(C)); + else + initlocalview(CTX_data_scene(C), CTX_wm_area(C)); + + ED_area_tag_redraw(CTX_wm_area(C)); + + return OPERATOR_FINISHED; +} + +void VIEW3D_OT_localview(wmOperatorType *ot) +{ + + /* identifiers */ + ot->name= "Local View"; + ot->idname= "VIEW3D_OT_localview"; + + /* api callbacks */ + ot->exec= localview_exec; + + ot->poll= ED_operator_view3d_active; +} + +/* ************************************** */ + void view3d_align_axis_to_vector(View3D *v3d, RegionView3D *rv3d, int axisidx, float vec[3]) { float alignaxis[3] = {0.0, 0.0, 0.0}; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 8c7bb0463c2..e6b8662ce4c 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1175,11 +1175,11 @@ int transformEnd(bContext *C, TransInfo *t) /* Undo as last, certainly after special_trans_update! */ if(t->state == TRANS_CANCEL) { - if(t->undostr) ED_undo_push(C, t->undostr); +// if(t->undostr) ED_undo_push(C, t->undostr); } else { - if(t->undostr) ED_undo_push(C, t->undostr); - else ED_undo_push(C, transform_to_undostr(t)); +// if(t->undostr) ED_undo_push(C, t->undostr); +// else ED_undo_push(C, transform_to_undostr(t)); } t->undostr= NULL; diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 89f31c18338..ddf10c213af 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -49,6 +49,7 @@ struct wmOperatorType; struct wmOperator; struct bContext; struct wmEvent; +struct wmTimer; struct ARegion; typedef struct NDofInput { @@ -249,6 +250,7 @@ typedef struct TransInfo { struct ScrArea *sa; struct ARegion *ar; struct Scene *scene; + struct wmTimer *animtimer; short mval[2]; /* current mouse position */ struct Object *obedit; void *draw_handle; @@ -467,9 +469,9 @@ void special_aftertrans_update(TransInfo *t); void transform_autoik_update(TransInfo *t, short mode); /* auto-keying stuff used by special_aftertrans_update */ -short autokeyframe_cfra_can_key(struct Object *ob); -void autokeyframe_ob_cb_func(struct Object *ob, int tmode); -void autokeyframe_pose_cb_func(struct Object *ob, int tmode, short targetless_ik); +short autokeyframe_cfra_can_key(struct Scene *scene, struct Object *ob); +void autokeyframe_ob_cb_func(struct Scene *scene, struct View3D *v3d, struct Object *ob, int tmode); +void autokeyframe_pose_cb_func(struct Scene *scene, struct View3D *v3d, struct Object *ob, int tmode, short targetless_ik); /*********************** Constraints *****************************/ diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 0a87940d917..641b538a3ed 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -121,10 +121,11 @@ #include "ED_anim_api.h" #include "ED_armature.h" -#include "ED_editparticle.h" +#include "ED_particle.h" #include "ED_image.h" #include "ED_keyframing.h" #include "ED_keyframes_edit.h" +#include "ED_object.h" #include "ED_mesh.h" #include "ED_types.h" #include "ED_uvedit.h" @@ -835,18 +836,17 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan) if(data->tar==NULL || (data->tar->type==OB_ARMATURE && data->subtarget[0]==0)) { targetless = con; /* but, if this is a targetless IK, we make it auto anyway (for the children loop) */ - if (con->enforce!=0.0) { + if (con->enforce!=0.0f) { targetless->flag |= CONSTRAINT_IK_AUTO; return 0; } } - if ((con->flag & CONSTRAINT_DISABLE)==0 && (con->enforce!=0.0)) + if ((con->flag & CONSTRAINT_DISABLE)==0 && (con->enforce!=0.0f)) return 0; } } - // TRANSFORM_FIX_ME - //con = add_new_constraint(CONSTRAINT_TYPE_KINEMATIC); + con = add_new_constraint(CONSTRAINT_TYPE_KINEMATIC); BLI_addtail(&pchan->constraints, con); pchan->constflag |= (PCHAN_HAS_IK|PCHAN_HAS_TARGET); /* for draw, but also for detecting while pose solving */ data= con->data; @@ -965,7 +965,6 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob) if (arm->flag & ARM_RESTPOS) { if (ELEM(t->mode, TFM_DUMMY, TFM_BONESIZE)==0) { - //notice("Pose edit not possible while Rest Position is enabled"); BKE_report(CTX_reports(C), RPT_ERROR, "Can't select linked when sync selection is enabled."); return; } @@ -1004,7 +1003,6 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob) } if(td != (t->data+t->total)) { - // printf("Bone selection count error\n"); BKE_report(CTX_reports(C), RPT_DEBUG, "Bone selection count error."); } @@ -4086,69 +4084,33 @@ static void clear_trans_object_base_flags(TransInfo *t) } /* auto-keyframing feature - checks for whether anything should be done for the current frame */ -short autokeyframe_cfra_can_key(Object *ob) +// TODO: this should probably be done per channel instead... +short autokeyframe_cfra_can_key(Scene *scene, Object *ob) { -#if 0 // TRANSFORM_FIX_ME - ListBase keys = {NULL, NULL}; - ActKeyColumn *ak; - float cfra; - short found= 0; + float cfra= (float)CFRA; // XXX for now, this will do /* only filter if auto-key mode requires this */ - if (IS_AUTOKEY_ON == 0) + if (IS_AUTOKEY_ON(scene) == 0) return 0; - else if (IS_AUTOKEY_MODE(NORMAL)) + else if (IS_AUTOKEY_MODE(scene, NORMAL)) return 1; - - /* sanity check */ - if (ob == NULL) - return 0; - - /* get keyframes that object has (bone anim is stored on ob too) */ - if (ob->action) - action_to_keylist(ob->action, &keys, NULL, NULL); - else if (ob->ipo) - ipo_to_keylist(ob->ipo, &keys, NULL, NULL); - else - return 0; - - /* get current frame (will apply nla-scaling as necessary) */ - // ack... this is messy... - cfra= frame_to_float(CFRA); - cfra= get_action_frame(ob, cfra); - - /* check if a keyframe occurs on current frame */ - for (ak= keys.first; ak; ak= ak->next) { - if (IS_EQ(cfra, ak->cfra)) { - found= 1; - break; - } - } - - /* free temp list */ - BLI_freelistN(&keys); - - return found; -#endif -return 0; + else + return id_frame_has_keyframe(&ob->id, cfra, ANIMFILTER_KEYS_LOCAL); } /* auto-keyframing feature - for objects * tmode: should be a transform mode */ -void autokeyframe_ob_cb_func(Object *ob, int tmode) +void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode) { -#if 0 // TRANSFORM_FIX_ME - ID *id= (ID *)(ob); - IpoCurve *icu; + ID *id= &ob->id; + FCurve *fcu; - if (autokeyframe_cfra_can_key(ob)) { - char *actname = NULL; + if (autokeyframe_cfra_can_key(scene, ob)) { + AnimData *adt= ob->adt; + float cfra= (float)CFRA; // xxx this will do for now short flag = 0; - if (ob->ipoflag & OB_ACTION_OB) - actname= "Object"; - if (IS_AUTOKEY_FLAG(INSERTNEEDED)) flag |= INSERTKEY_NEEDED; if (IS_AUTOKEY_FLAG(AUTOMATKEY)) @@ -4156,22 +4118,10 @@ void autokeyframe_ob_cb_func(Object *ob, int tmode) if (IS_AUTOKEY_FLAG(INSERTAVAIL)) { /* only key on available channels */ - if ((ob->ipo) || (ob->action)) { - if (ob->action && actname) { - bActionChannel *achan; - achan= get_action_channel(ob->action, actname); - - if (achan && achan->ipo) - icu= achan->ipo->curve.first; - else - icu= NULL; - } - else - icu= ob->ipo->curve.first; - - for (; icu; icu= icu->next) { - icu->flag &= ~IPO_SELECT; - insertkey(id, ID_OB, actname, NULL, icu->adrcode, flag); + if (adt && adt->action) { + for (fcu= adt->action->curves.first; fcu; fcu= fcu->next) { + fcu->flag &= ~FCURVE_SELECTED; + insertkey(id, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); } } } @@ -4183,92 +4133,94 @@ void autokeyframe_ob_cb_func(Object *ob, int tmode) doLoc = 1; } else if (tmode == TFM_ROTATION) { - if (G.vd->around == V3D_ACTIVE) { + if (v3d->around == V3D_ACTIVE) { if (ob != OBACT) doLoc = 1; } - else if (G.vd->around == V3D_CURSOR) + else if (v3d->around == V3D_CURSOR) doLoc = 1; - if ((G.vd->flag & V3D_ALIGN)==0) + if ((v3d->flag & V3D_ALIGN)==0) doRot = 1; } else if (tmode == TFM_RESIZE) { - if (G.vd->around == V3D_ACTIVE) { + if (v3d->around == V3D_ACTIVE) { if (ob != OBACT) doLoc = 1; } - else if (G.vd->around == V3D_CURSOR) + else if (v3d->around == V3D_CURSOR) doLoc = 1; - if ((G.vd->flag & V3D_ALIGN)==0) + if ((v3d->flag & V3D_ALIGN)==0) doScale = 1; } + // TODO: the group names here are temporary... + // TODO: should this be made to use the builtin KeyingSets instead? if (doLoc) { - insertkey(id, ID_OB, actname, NULL, OB_LOC_X, flag); - insertkey(id, ID_OB, actname, NULL, OB_LOC_Y, flag); - insertkey(id, ID_OB, actname, NULL, OB_LOC_Z, flag); + insertkey(id, "Object Transform", "location", 0, cfra, flag); + insertkey(id, "Object Transform", "location", 1, cfra, flag); + insertkey(id, "Object Transform", "location", 2, cfra, flag); } if (doRot) { - insertkey(id, ID_OB, actname, NULL, OB_ROT_X, flag); - insertkey(id, ID_OB, actname, NULL, OB_ROT_Y, flag); - insertkey(id, ID_OB, actname, NULL, OB_ROT_Z, flag); + insertkey(id, "Object Transform", "rotation", 0, cfra, flag); + insertkey(id, "Object Transform", "rotation", 1, cfra, flag); + insertkey(id, "Object Transform", "rotation", 2, cfra, flag); } if (doScale) { - insertkey(id, ID_OB, actname, NULL, OB_SIZE_X, flag); - insertkey(id, ID_OB, actname, NULL, OB_SIZE_Y, flag); - insertkey(id, ID_OB, actname, NULL, OB_SIZE_Z, flag); + insertkey(id, "Object Transform", "scale", 0, cfra, flag); + insertkey(id, "Object Transform", "scale", 1, cfra, flag); + insertkey(id, "Object Transform", "scale", 2, cfra, flag); } } else { - insertkey(id, ID_OB, actname, NULL, OB_LOC_X, flag); - insertkey(id, ID_OB, actname, NULL, OB_LOC_Y, flag); - insertkey(id, ID_OB, actname, NULL, OB_LOC_Z, flag); + // TODO: the group names here are temporary... + // TODO: should this be made to use the builtin KeyingSets instead? + insertkey(id, "Object Transform", "location", 0, cfra, flag); + insertkey(id, "Object Transform", "location", 1, cfra, flag); + insertkey(id, "Object Transform", "location", 2, cfra, flag); - insertkey(id, ID_OB, actname, NULL, OB_ROT_X, flag); - insertkey(id, ID_OB, actname, NULL, OB_ROT_Y, flag); - insertkey(id, ID_OB, actname, NULL, OB_ROT_Z, flag); + insertkey(id, "Object Transform", "rotation", 0, cfra, flag); + insertkey(id, "Object Transform", "rotation", 1, cfra, flag); + insertkey(id, "Object Transform", "rotation", 2, cfra, flag); - insertkey(id, ID_OB, actname, NULL, OB_SIZE_X, flag); - insertkey(id, ID_OB, actname, NULL, OB_SIZE_Y, flag); - insertkey(id, ID_OB, actname, NULL, OB_SIZE_Z, flag); + insertkey(id, "Object Transform", "scale", 0, cfra, flag); + insertkey(id, "Object Transform", "scale", 1, cfra, flag); + insertkey(id, "Object Transform", "scale", 2, cfra, flag); } - remake_object_ipos(ob); - allqueue(REDRAWMARKER, 0); - allqueue(REDRAWOOPS, 0); + // XXX todo... find a way to send notifiers from here... } -#endif } /* auto-keyframing feature - for poses/pose-channels * tmode: should be a transform mode * targetless_ik: has targetless ik been done on any channels? */ -void autokeyframe_pose_cb_func(Object *ob, int tmode, short targetless_ik) +void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode, short targetless_ik) { -#if 0 // TRANSFORM_FIX_ME - ID *id= (ID *)(ob); - bArmature *arm= ob->data; - bAction *act; - bPose *pose; + ID *id= &ob->id; + AnimData *adt= ob->adt; + //bArmature *arm= ob->data; + bAction *act= (adt) ? adt->action : NULL; + bPose *pose= ob->pose; bPoseChannel *pchan; - IpoCurve *icu; + FCurve *fcu; - pose= ob->pose; - act= ob->action; - - if (autokeyframe_cfra_can_key(ob)) { + if (autokeyframe_cfra_can_key(scene, ob)) { + float cfra= (float)CFRA; short flag= 0; + char buf[512]; - if (act == NULL) - act= ob->action= add_empty_action("Action"); - + /* flag is initialised from UserPref keyframing settings + * - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get + * visual keyframes even if flag not set, as it's not that useful otherwise + * (for quick animation recording) + */ + if (IS_AUTOKEY_FLAG(AUTOMATKEY) || (targetless_ik)) + flag |= INSERTKEY_MATRIX; if (IS_AUTOKEY_FLAG(INSERTNEEDED)) flag |= INSERTKEY_NEEDED; - if (IS_AUTOKEY_FLAG(AUTOMATKEY)) - flag |= INSERTKEY_MATRIX; for (pchan=pose->chanbase.first; pchan; pchan=pchan->next) { if (pchan->bone->flag & BONE_TRANSFORM) { @@ -4277,12 +4229,9 @@ void autokeyframe_pose_cb_func(Object *ob, int tmode, short targetless_ik) /* only insert into available channels? */ if (IS_AUTOKEY_FLAG(INSERTAVAIL)) { - bActionChannel *achan; - - achan= get_action_channel(act, pchan->name); - if (achan && achan->ipo) { - for (icu= achan->ipo->curve.first; icu; icu= icu->next) - insertkey(id, ID_PO, pchan->name, NULL, icu->adrcode, flag); + if (act) { + for (fcu= act->curves.first; fcu; fcu= fcu->next) + insertkey(id, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); } } /* only insert keyframe if needed? */ @@ -4297,67 +4246,86 @@ void autokeyframe_pose_cb_func(Object *ob, int tmode, short targetless_ik) doLoc = 1; } else if (tmode == TFM_ROTATION) { - if (ELEM(G.vd->around, V3D_CURSOR, V3D_ACTIVE)) + if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE)) doLoc = 1; - if ((G.vd->flag & V3D_ALIGN)==0) + if ((v3d->flag & V3D_ALIGN)==0) doRot = 1; } else if (tmode == TFM_RESIZE) { - if (ELEM(G.vd->around, V3D_CURSOR, V3D_ACTIVE)) + if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE)) doLoc = 1; - if ((G.vd->flag & V3D_ALIGN)==0) + if ((v3d->flag & V3D_ALIGN)==0) doScale = 1; } if (doLoc) { - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_X, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Y, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Z, flag); + sprintf(buf, "pose.pose_channels[\"%s\"].location", pchan->name); + insertkey(id, pchan->name, buf, 0, cfra, flag); + insertkey(id, pchan->name, buf, 1, cfra, flag); + insertkey(id, pchan->name, buf, 2, cfra, flag); } if (doRot) { - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_W, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_X, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Y, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Z, flag); + if (pchan->rotmode == PCHAN_ROT_QUAT) { + sprintf(buf, "pose.pose_channels[\"%s\"].rotation", pchan->name); + insertkey(id, pchan->name, buf, 0, cfra, flag); + insertkey(id, pchan->name, buf, 1, cfra, flag); + insertkey(id, pchan->name, buf, 2, cfra, flag); + insertkey(id, pchan->name, buf, 3, cfra, flag); + } + else { + sprintf(buf, "pose.pose_channels[\"%s\"].euler_rotation", pchan->name); + insertkey(id, pchan->name, buf, 0, cfra, flag); + insertkey(id, pchan->name, buf, 1, cfra, flag); + insertkey(id, pchan->name, buf, 2, cfra, flag); + } } if (doScale) { - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_X, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Y, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Z, flag); + sprintf(buf, "pose.pose_channels[\"%s\"].scale", pchan->name); + insertkey(id, pchan->name, buf, 0, cfra, flag); + insertkey(id, pchan->name, buf, 1, cfra, flag); + insertkey(id, pchan->name, buf, 2, cfra, flag); } } /* insert keyframe in any channel that's appropriate */ else { - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_X, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Y, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Z, flag); + sprintf(buf, "pose.pose_channels[\"%s\"].location", pchan->name); + insertkey(id, pchan->name, buf, 0, cfra, flag); + insertkey(id, pchan->name, buf, 1, cfra, flag); + insertkey(id, pchan->name, buf, 2, cfra, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_W, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_X, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Y, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Z, flag); + if (pchan->rotmode == PCHAN_ROT_QUAT) { + sprintf(buf, "pose.pose_channels[\"%s\"].rotation", pchan->name); + insertkey(id, pchan->name, buf, 0, cfra, flag); + insertkey(id, pchan->name, buf, 1, cfra, flag); + insertkey(id, pchan->name, buf, 2, cfra, flag); + insertkey(id, pchan->name, buf, 3, cfra, flag); + } + else { + sprintf(buf, "pose.pose_channels[\"%s\"].euler_rotation", pchan->name); + insertkey(id, pchan->name, buf, 0, cfra, flag); + insertkey(id, pchan->name, buf, 1, cfra, flag); + insertkey(id, pchan->name, buf, 2, cfra, flag); + } - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_X, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Y, flag); - insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Z, flag); + sprintf(buf, "pose.pose_channels[\"%s\"].scale", pchan->name); + insertkey(id, pchan->name, buf, 0, cfra, flag); + insertkey(id, pchan->name, buf, 1, cfra, flag); + insertkey(id, pchan->name, buf, 2, cfra, flag); } } } - remake_action_ipos(act); - allqueue(REDRAWMARKER, 0); - allqueue(REDRAWOOPS, 0); - - /* locking can be disabled */ - ob->pose->flag &= ~(POSE_DO_UNLOCK|POSE_LOCKED); + // XXX todo... figure out way to get appropriate notifiers sent /* do the bone paths */ +#if 0 // TRANSFORM_FIX_ME if (arm->pathflag & ARM_PATH_ACFRA) { - //pose_clear_paths(ob); + pose_clear_paths(ob); pose_recalculate_paths(ob); } +#endif } else { /* tag channels that should have unkeyed data */ @@ -4368,7 +4336,6 @@ void autokeyframe_pose_cb_func(Object *ob, int tmode, short targetless_ik) } } } -#endif } @@ -4622,22 +4589,6 @@ void special_aftertrans_update(TransInfo *t) mesh_octree_table(t->obedit, em, NULL, 'e'); } } -#if 0 // TRANSFORM_FIX_ME - else if (t->spacetype == SPACE_NLA) { - recalc_all_ipos(); // bad - synchronize_action_strips(); - - /* cleanup */ - for (base=t->scene->base.first; base; base=base->next) - base->flag &= ~(BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA); - - /* after transform, remove duplicate keyframes on a frame that resulted from transform */ - if ( (G.snla->flag & SNLA_NOTRANSKEYCULL)==0 && - ((cancelled == 0) || (duplicate)) ) - { - posttrans_nla_clean(t); - } - } else if ((t->flag & T_POSE) && (t->poseobj)) { bArmature *arm; bPose *pose; @@ -4648,9 +4599,6 @@ void special_aftertrans_update(TransInfo *t) arm= ob->data; pose= ob->pose; - /* this signal does one recalc on pose, then unlocks, so ESC or edit will work */ - pose->flag |= POSE_DO_UNLOCK; - /* if target-less IK grabbing, we calculate the pchan transforms and clear flag */ if (!cancelled && t->mode==TFM_TRANSLATION) targetless_ik= apply_targetless_ik(ob); @@ -4667,7 +4615,7 @@ void special_aftertrans_update(TransInfo *t) /* automatic inserting of keys and unkeyed tagging - only if transform wasn't cancelled (or TFM_DUMMY) */ if (!cancelled && (t->mode != TFM_DUMMY)) { - autokeyframe_pose_cb_func(ob, t->mode, targetless_ik); + autokeyframe_pose_cb_func(t->scene, (View3D *)t->view, ob, t->mode, targetless_ik); DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA); } else if (arm->flag & ARM_DELAYDEFORM) { @@ -4678,34 +4626,52 @@ void special_aftertrans_update(TransInfo *t) else DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA); - if (t->mode==TFM_BONESIZE || t->mode==TFM_BONE_ENVELOPE) - allqueue(REDRAWBUTSEDIT, 0); + //if (t->mode==TFM_BONESIZE || t->mode==TFM_BONE_ENVELOPE) + // allqueue(REDRAWBUTSEDIT, 0); } +#if 0 // TRANSFORM_FIX_ME else if(G.f & G_PARTICLEEDIT) { ; } - else { - base= FIRSTBASE; - - while (base) { - - if(base->flag & BA_DO_IPO) redrawipo= 1; - +#endif + else { + /* Objects */ + // XXX ideally, this would go through context iterators, but we don't have context iterator access here, + // so we make do with old data + access styles... + Scene *scene= t->scene; + Base *base; + + for (base= FIRSTBASE; base; base= base->next) { ob= base->object; - if(base->flag & SELECT && (t->mode != TFM_DUMMY)) { - if(BKE_ptcache_object_reset(ob, PTCACHE_RESET_DEPSGRAPH)) + if (base->flag & SELECT && (t->mode != TFM_DUMMY)) { + /* pointcache refresh */ + if (BKE_ptcache_object_reset(ob, PTCACHE_RESET_DEPSGRAPH)) ob->recalc |= OB_RECALC_DATA; /* Set autokey if necessary */ if (!cancelled) - autokeyframe_ob_cb_func(ob, t->mode); + autokeyframe_ob_cb_func(t->scene, (View3D *)t->view, ob, t->mode); } - - base= base->next; } + } + +#if 0 // TRANSFORM_FIX_ME + else if (t->spacetype == SPACE_NLA) { + recalc_all_ipos(); // bad + synchronize_action_strips(); + /* cleanup */ + for (base=t->scene->base.first; base; base=base->next) + base->flag &= ~(BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA); + + /* after transform, remove duplicate keyframes on a frame that resulted from transform */ + if ( (G.snla->flag & SNLA_NOTRANSKEYCULL)==0 && + ((cancelled == 0) || (duplicate)) ) + { + posttrans_nla_clean(t); + } } #endif diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index b1387d7d504..276b09563a7 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -86,6 +86,7 @@ #include "ED_anim_api.h" #include "ED_armature.h" #include "ED_image.h" +#include "ED_keyframing.h" #include "ED_mesh.h" #include "ED_space_api.h" #include "ED_uvedit.h" @@ -386,6 +387,8 @@ void recalcData(TransInfo *t) ac.spacetype= (t->sa)? t->sa->spacetype : 0; ac.regiontype= (t->ar)? t->ar->regiontype : 0; + ANIM_animdata_context_getdata(&ac); + /* do the flush first */ flushTransGraphData(t); @@ -558,6 +561,17 @@ void recalcData(TransInfo *t) Object *ob= t->poseobj; bArmature *arm= ob->data; + /* if animtimer is running, and the object already has animation data, + * check if the auto-record feature means that we should record 'samples' + * (i.e. uneditable animation values) + */ + // TODO: autokeyframe calls need some setting to specify to add samples (FPoints) instead of keyframes? + // TODO: maybe the ob->adt check isn't really needed? makes it too difficult to use... + if (/*(ob->adt) && */(t->animtimer) && IS_AUTOKEY_ON(t->scene)) { + short targetless_ik= (t->flag & T_AUTOIK); // XXX this currently doesn't work, since flags aren't set yet! + autokeyframe_pose_cb_func(t->scene, (View3D *)t->view, ob, t->mode, targetless_ik); + } + /* old optimize trick... this enforces to bypass the depgraph */ if (!(arm->flag & ARM_DELAYDEFORM)) { DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* sets recalc flags */ @@ -574,24 +588,19 @@ void recalcData(TransInfo *t) ob->recalc |= OB_RECALC_OB; if(base->flag & BA_HAS_RECALC_DATA) ob->recalc |= OB_RECALC_DATA; - -#if 0 // XXX old animation system - /* thanks to ob->ctime usage, ipos are not called in where_is_object, - unless we edit ipokeys */ - if(base->flag & BA_DO_IPO) { - if(ob->ipo) { - IpoCurve *icu; - - ob->ctime= -1234567.0; - - icu= ob->ipo->curve.first; - while(icu) { - calchandles_ipocurve(icu); - icu= icu->next; - } - } + + /* if object/base is selected */ + if ((base->flag & SELECT) || (ob->flag & SELECT)) { + /* if animtimer is running, and the object already has animation data, + * check if the auto-record feature means that we should record 'samples' + * (i.e. uneditable animation values) + */ + // TODO: autokeyframe calls need some setting to specify to add samples (FPoints) instead of keyframes? + // TODO: maybe the ob->adt check isn't really needed? makes it too difficult to use... + if (/*(ob->adt) && */(t->animtimer) && IS_AUTOKEY_ON(t->scene)) { + autokeyframe_ob_cb_func(t->scene, (View3D *)t->view, ob, t->mode); + } } -#endif // XXX old animation system /* proxy exception */ if(ob->proxy) @@ -728,6 +737,7 @@ void initTransInfo (bContext *C, TransInfo *t, wmEvent *event) View3D *v3d = sa->spacedata.first; t->view = v3d; + t->animtimer= CTX_wm_screen(C)->animtimer; if(v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN; t->around = v3d->around; diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index ae75c9d967b..9dca9350754 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -45,6 +45,7 @@ #include "ED_armature.h" #include "ED_mesh.h" +#include "ED_sculpt.h" #include "ED_util.h" #include "UI_text.h" @@ -57,6 +58,7 @@ void ED_editors_exit(bContext *C) /* frees all editmode undos */ undo_editmode_clear(); + undo_imagepaint_clear(); /* global in meshtools... */ mesh_octree_table(ob, NULL, NULL, 'e'); diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index b593c99e5f4..d813069a4a8 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -303,7 +303,7 @@ void undo_editmode_menu(bContext *C) { UndoElem *uel; DynStr *ds= BLI_dynstr_new(); - short event; + short event= 0; char *menu; undo_clean_stack(C); // removes other objects from it diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 5d7ed72127e..a54d590c2af 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -55,11 +55,12 @@ #include "BKE_utildefines.h" #include "ED_armature.h" -#include "ED_editparticle.h" +#include "ED_particle.h" #include "ED_curve.h" #include "ED_mesh.h" #include "ED_object.h" #include "ED_screen.h" +#include "ED_sculpt.h" #include "ED_util.h" #include "WM_api.h" @@ -72,12 +73,12 @@ /* ********* XXX **************** */ static void undo_push_mball() {} -static void undo_imagepaint_step() {} static void sound_initialize_sounds() {} /* ********* XXX **************** */ void ED_undo_push(bContext *C, char *str) { + wmWindowManager *wm= CTX_wm_manager(C); Object *obedit= CTX_data_edit_object(C); if(obedit) { @@ -105,6 +106,11 @@ void ED_undo_push(bContext *C, char *str) if(U.uiflag & USER_GLOBALUNDO) BKE_write_undo(C, str); } + + if(wm->file_saved) { + wm->file_saved= 0; + WM_event_add_notifier(C, NC_WM|ND_DATACHANGED, NULL); + } } void ED_undo_push_op(bContext *C, wmOperator *op) @@ -185,7 +191,7 @@ void ED_undo_menu(bContext *C) } else { if(G.f & G_PARTICLEEDIT) - PE_undo_menu(CTX_data_scene(C)); + PE_undo_menu(CTX_data_scene(C), CTX_data_active_object(C)); else if(U.uiflag & USER_GLOBALUNDO) { char *menu= BKE_undo_menu_string(); if(menu) { diff --git a/source/blender/editors/uvedit/Makefile b/source/blender/editors/uvedit/Makefile index bd19bfdacb2..b8a8f0bc8af 100644 --- a/source/blender/editors/uvedit/Makefile +++ b/source/blender/editors/uvedit/Makefile @@ -45,6 +45,7 @@ CPPFLAGS += -I../../blenlib CPPFLAGS += -I../../makesdna CPPFLAGS += -I../../makesrna CPPFLAGS += -I../../imbuf +CPPFLAGS += -I../../gpu CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I$(NAN_OPENNL)/include diff --git a/source/blender/editors/uvedit/SConscript b/source/blender/editors/uvedit/SConscript index 29989a5b439..b472b89d23d 100644 --- a/source/blender/editors/uvedit/SConscript +++ b/source/blender/editors/uvedit/SConscript @@ -5,6 +5,6 @@ sources = env.Glob('*.c') incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -incs += ' ../../makesrna #/intern/opennl/extern' +incs += ' ../../makesrna #/intern/opennl/extern ../../gpu' env.BlenderLib ( 'bf_editors_uvedit', sources, Split(incs), [], libtype=['core'], priority=[45] ) diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 6697cc83845..60cfbfd0f39 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -88,7 +88,7 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre EditMesh *em; EditFace *efa; MTFace *tf; - int update; + int update= 0; /* skip assigning these procedural images... */ if(ima && (ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE)) @@ -2513,7 +2513,7 @@ void UV_OT_snap_selection(wmOperatorType *ot) static EnumPropertyItem target_items[] = { {0, "PIXELS", "Pixels", ""}, {1, "CURSOR", "Cursor", ""}, - {2, "ADJACENT_DESELECTED", "Adjacent Deselected", ""}, + {2, "ADJACENT_UNSELECTED", "Adjacent Unselected", ""}, {0, NULL, NULL, NULL}}; /* identifiers */ @@ -2633,7 +2633,7 @@ static int hide_exec(bContext *C, wmOperator *op) EditMesh *em= ((Mesh*)obedit->data)->edit_mesh; EditFace *efa; MTFace *tf; - int swap= (strcmp(op->idname, "UV_OT_hide_deselected") == 0); + int swap= RNA_boolean_get(op->ptr, "unselected"); if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { EM_hide_mesh(em, swap); @@ -2748,33 +2748,24 @@ static int hide_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_hide_selected(wmOperatorType *ot) +void UV_OT_hide(wmOperatorType *ot) { /* identifiers */ ot->name= "Hide Selected"; - ot->idname= "UV_OT_hide_selected"; + ot->idname= "UV_OT_hide"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ ot->exec= hide_exec; ot->poll= ED_operator_uvedit; + + /* props */ + RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected."); } -void UV_OT_hide_deselected(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Hide Deselected"; - ot->idname= "UV_OT_hide_deselected"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - - /* api callbacks */ - ot->exec= hide_exec; - ot->poll= ED_operator_uvedit; -} +/****************** reveal operator ******************/ -/****************** show hidden operator ******************/ - -static int show_hidden_exec(bContext *C, wmOperator *op) +static int reveal_exec(bContext *C, wmOperator *op) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); Scene *scene= CTX_data_scene(C); @@ -2885,22 +2876,21 @@ static int show_hidden_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_show_hidden(wmOperatorType *ot) +void UV_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Show Hidden"; - ot->idname= "UV_OT_show_hidden"; + ot->name= "Reveal Hidden"; + ot->idname= "UV_OT_reveal"; ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= show_hidden_exec; + ot->exec= reveal_exec; ot->poll= ED_operator_uvedit; } - /******************** set 3d cursor operator ********************/ -static int set_3d_cursor_exec(bContext *C, wmOperator *op) +static int set_2d_cursor_exec(bContext *C, wmOperator *op) { ARegion *ar= CTX_wm_region(C); float location[2]; @@ -2914,7 +2904,7 @@ static int set_3d_cursor_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int set_3d_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int set_2d_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) { ARegion *ar= CTX_wm_region(C); int x, y; @@ -2925,18 +2915,18 @@ static int set_3d_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) UI_view2d_region_to_view(&ar->v2d, x, y, &location[0], &location[1]); RNA_float_set_array(op->ptr, "location", location); - return set_3d_cursor_exec(C, op); + return set_2d_cursor_exec(C, op); } -void UV_OT_set_3d_cursor(wmOperatorType *ot) +void UV_OT_set_2d_cursor(wmOperatorType *ot) { /* identifiers */ ot->name= "Set 3D Cursor"; - ot->idname= "UV_OT_set_3d_cursor"; + ot->idname= "UV_OT_set_2d_cursor"; /* api callbacks */ - ot->exec= set_3d_cursor_exec; - ot->invoke= set_3d_cursor_invoke; + ot->exec= set_2d_cursor_exec; + ot->invoke= set_2d_cursor_invoke; ot->poll= ED_operator_uvedit; /* flags */ @@ -3045,11 +3035,10 @@ void ED_operatortypes_uvedit(void) WM_operatortype_append(UV_OT_sphere_project); WM_operatortype_append(UV_OT_unwrap); - WM_operatortype_append(UV_OT_show_hidden); - WM_operatortype_append(UV_OT_hide_selected); - WM_operatortype_append(UV_OT_hide_deselected); + WM_operatortype_append(UV_OT_reveal); + WM_operatortype_append(UV_OT_hide); - WM_operatortype_append(UV_OT_set_3d_cursor); + WM_operatortype_append(UV_OT_set_2d_cursor); WM_operatortype_append(UV_OT_set_tile); } @@ -3087,12 +3076,12 @@ void ED_keymap_uvedit(wmWindowManager *wm) WM_keymap_add_item(keymap, "UV_OT_average_islands_scale", AKEY, KM_PRESS, KM_CTRL, 0); /* hide */ - WM_keymap_add_item(keymap, "UV_OT_hide_selected", HKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "UV_OT_hide_deselected", HKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "UV_OT_show_hidden", HKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, 0, 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); + WM_keymap_add_item(keymap, "UV_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); /* cursor */ - WM_keymap_add_item(keymap, "UV_OT_set_3d_cursor", ACTIONMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "UV_OT_set_2d_cursor", ACTIONMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "UV_OT_set_tile", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0); transform_keymap_for_space(wm, keymap, SPACE_IMAGE); diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 7efeb51e6f2..d34c0b916ec 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -390,7 +390,7 @@ void UV_OT_minimize_stretch(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry."); - RNA_def_float(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend", "Blend factor between stretch minimized and original.", 0.0f, 1.0f); + RNA_def_float_percentage(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend", "Blend factor between stretch minimized and original.", 0.0f, 1.0f); RNA_def_int(ot->srna, "iterations", 0, 0, INT_MAX, "Iterations", "Number of iterations to run, 0 is unlimited when run interactively.", 0, 100); } diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 0187834af6b..cf54d69bb8b 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -289,14 +289,13 @@ typedef enum DOPESHEET_FILTERFLAG { ADS_FILTER_ONLYDRIVERS = (1<<1), /* datatype-based filtering */ - ADS_FILTER_NOOBJ = (1<<4), // XXX - ADS_FILTER_NOARM = (1<<5), // XXX - ADS_FILTER_NOSHAPEKEYS = (1<<6), ADS_FILTER_NOCAM = (1<<10), ADS_FILTER_NOMAT = (1<<11), ADS_FILTER_NOLAM = (1<<12), ADS_FILTER_NOCUR = (1<<13), + ADS_FILTER_NOWOR = (1<<14), + ADS_FILTER_NOSCE = (1<<15), /* combination filters (some only used at runtime) */ ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR), diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 68564b1ee73..3ce656faf92 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -225,6 +225,10 @@ typedef struct FCurve { /* RNA - data link */ int array_index; /* if applicable, the index of the RNA-array item to get */ char *rna_path; /* RNA-path to resolve data-access */ + + /* curve coloring (for editor) */ + int color_mode; /* coloring method to use */ + float color[3]; /* the last-color this curve took */ } FCurve; @@ -255,6 +259,13 @@ enum { FCURVE_EXTRAPOLATE_LINEAR, /* just extend gradient of segment between first segment keyframes */ } eFCurve_Extend; +/* curve coloring modes */ +enum { + FCURVE_COLOR_AUTO_RAINBOW = 0, /* automatically determine color using rainbow (calculated at drawtime) */ + FCURVE_COLOR_AUTO_RGB, /* automatically determine color using XYZ (array index) <-> RGB */ + FCURVE_COLOR_CUSTOM, /* custom color */ +} eFCurve_Coloring; + /* ************************************************ */ /* 'Action' Datatypes */ @@ -445,20 +456,26 @@ typedef struct KS_Path { char *rna_path; /* dynamically (or statically in the case of predefined sets) path */ int array_index; /* index that path affects */ - int flag; /* various settings, etc. */ + short flag; /* various settings, etc. */ + short groupmode; /* group naming (eKSP_Grouping) */ } KS_Path; /* KS_Path->flag */ enum { /* entire array (not just the specified index) gets keyframed */ KSP_FLAG_WHOLE_ARRAY = (1<<0), - - /* path should not be grouped at all */ - KSP_FLAG_GROUP_NONE = (1<<10), - /* path should be grouped under an ActionGroup KeyingSet's name */ - KSP_FLAG_GROUP_KSNAME = (1<<11), } eKSP_Settings; +/* KS_Path->groupmode */ +enum { + /* path should be grouped using its own group-name */ + KSP_GROUP_NAMED = 0, + /* path should not be grouped at all */ + KSP_GROUP_NONE, + /* path should be grouped under an ActionGroup KeyingSet's name */ + KSP_GROUP_KSNAME, +} eKSP_Grouping; + /* ---------------- */ /* KeyingSet definition (ks) @@ -486,12 +503,19 @@ typedef struct KeyingSet { enum { /* keyingset cannot be removed (and doesn't need to be freed) */ KEYINGSET_BUILTIN = (1<<0), - /* keyingset is the one currently in use */ - KEYINGSET_ACTIVE = (1<<1), /* keyingset does not depend on context info (i.e. paths are absolute) */ - KEYINGSET_ABSOLUTE = (1<<2), + KEYINGSET_ABSOLUTE = (1<<1), } eKS_Settings; +/* Flags for use by keyframe creation/deletion calls */ +enum { + INSERTKEY_NEEDED = (1<<0), /* only insert keyframes where they're needed */ + INSERTKEY_MATRIX = (1<<1), /* insert 'visual' keyframes where possible/needed */ + INSERTKEY_FAST = (1<<2), /* don't recalculate handles,etc. after adding key */ + INSERTKEY_FASTR = (1<<3), /* don't realloc mem (or increase count, as array has already been set out) */ + INSERTKEY_REPLACE = (1<<4), /* only replace an existing keyframe (this overrides INSERTKEY_NEEDED) */ +} eInsertKeyFlags; + /* ************************************************ */ /* Animation Data */ diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 359573a141c..88520a12e75 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -51,7 +51,7 @@ typedef struct Brush { struct BrushClone clone; - struct CurveMapping *curve; /* falloff curve */ + struct CurveMapping *curve; /* falloff curve */ struct MTex *mtex[18]; /* MAX_MTEX */ short flag, blend; /* general purpose flag, blend mode */ @@ -63,7 +63,7 @@ typedef struct Brush { float rgb[3]; /* color */ float alpha; /* opacity */ - float rot; /* rotation in radians */ + float rot; /* rotation in radians */ short texact; /* active texture */ char sculpt_tool; /* active tool */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 7b618502089..ce3d627863e 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -354,6 +354,8 @@ typedef struct ImagePaintSettings { /* for projection painting only */ short seam_bleed,normal_angle; + + void *paintcursor; /* wm handle */ } ImagePaintSettings; typedef struct ParticleBrushData { @@ -535,8 +537,9 @@ typedef struct Scene { float editbutsize; /* size of normals */ short selectmode; /* for mesh only! */ short proportional, prop_mode; - short automerge, pad5, pad6; + short automerge, pad5; + short flag; /* various settings */ short autokey_mode; /* mode for autokeying (defines in DNA_userdef_types.h) */ short use_nodes; @@ -801,6 +804,11 @@ typedef struct Scene { #define PROP_CONST 5 #define PROP_RANDOM 6 +/* sce->flag */ +#define SCE_DS_SELECTED (1<<0) +#define SCE_DS_COLLAPSED (1<<1) + + /* return flag next_object function */ #define F_START 0 #define F_SCENE 1 diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 89bf32ef16d..d90527040dd 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -44,14 +44,15 @@ struct wmTimer; typedef struct bScreen { ID id; - ListBase vertbase, edgebase; + ListBase vertbase; /* screens have vertices/edges to define areas */ + ListBase edgebase; ListBase areabase; - ListBase regionbase; /* screen level regions, runtime only */ + ListBase regionbase; /* screen level regions (menus), runtime only */ + struct Scene *scene; - short scenenr, screennr; /* only for pupmenu */ - - short full, winid; /* winid from WM, starts with 1 */ + short full; /* fade out? */ + short winid; /* winid from WM, starts with 1 */ short do_draw; /* notifier for drawing edges */ short do_refresh; /* notifier for scale screen, changed screen, etc */ short do_draw_gesture; /* notifier for gesture draw. */ @@ -62,6 +63,8 @@ typedef struct bScreen { short mainwin; /* screensize subwindow, for screenedges and global menus */ short subwinactive; /* active subwindow */ + int pad2; + struct wmTimer *animtimer; /* if set, screen has timer handler added in window */ void *context; /* context callback */ @@ -214,6 +217,8 @@ typedef struct ARegion { #define RGN_OVERLAP_LEFT 11 #define RGN_OVERLAP_RIGHT 12 +#define RGN_SPLIT_PREV 32 + /* region flag */ #define RGN_FLAG_HIDDEN 1 #define RGN_FLAG_TOO_SMALL 2 diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index fe70f451eaf..3b56fd96493 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -85,7 +85,8 @@ typedef struct RegionView3D { float pixsize; float ofs[3]; short camzoom, viewbut; - int pad1; + + int lastmode; /* for modal keymap switching, int because it stores notifier code */ short rflag, viewlock; short persp; diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 5ca268692e5..ba423334cce 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -61,7 +61,8 @@ typedef struct wmWindowManager { ListBase windows; int initialized; /* set on file read */ - int pad; + short file_saved; /* indicator whether data was saved */ + short pad; ListBase operators; /* operator registry */ @@ -117,8 +118,11 @@ typedef struct wmWindow { ListBase gesture; /* gesture stuff */ } wmWindow; +/* should be somthing like DNA_EXCLUDE + * but the preprocessor first removes all comments, spaces etc */ - +# +# typedef struct wmOperatorType { struct wmOperatorType *next, *prev; diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index 39d8d38ec54..3fd6642df8a 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -104,8 +104,12 @@ typedef struct World { short aomode, aosamp, aomix, aocolor; float ao_adapt_thresh, ao_adapt_speed_fac; float ao_approx_error, ao_approx_correction; - short ao_samp_method, ao_gather_method, ao_approx_passes, pad1; + short ao_samp_method, ao_gather_method, ao_approx_passes; + /* assorted settings (in the middle of ambient occlusion settings for padding reasons) */ + short flag; + + /* ambient occlusion (contd...) */ float *aosphere, *aotables; @@ -180,5 +184,8 @@ typedef struct World { #define WOPHY_ODE 4 #define WOPHY_BULLET 5 +/* flag */ +#define WO_DS_EXPAND (1<<0) + #endif diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 4271dcbe8c5..f286cd46479 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -117,6 +117,8 @@ extern StructRNA RNA_IntProperty; extern StructRNA RNA_JoystickSensor; extern StructRNA RNA_Key; extern StructRNA RNA_KeyboardSensor; +extern StructRNA RNA_KeyingSet; +extern StructRNA RNA_KeyingSetPath; extern StructRNA RNA_Lamp; extern StructRNA RNA_LampSkySettings; extern StructRNA RNA_LampTextureSlot; diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index bac160f4bbc..b732ab8479a 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -87,6 +87,8 @@ PropertyRNA *RNA_def_float_rotation(StructRNA *srna, const char *identifier, int float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax); PropertyRNA *RNA_def_float_array(StructRNA *srna, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax); +PropertyRNA *RNA_def_float_percentage(StructRNA *srna, const char *identifier, float default_value, float hardmin, float hardmax, + const char *ui_name, const char *ui_description, float softmin, float softmax); PropertyRNA *RNA_def_pointer_runtime(StructRNA *srna, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description); diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index f914c85340d..03c6fc1a335 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -67,7 +67,8 @@ typedef enum PropertySubType { PROP_VECTOR = 5, PROP_MATRIX = 6, PROP_ROTATION = 7, - PROP_NEVER_NULL = 8 + PROP_NEVER_NULL = 8, + PROP_PERCENTAGE = 9 } PropertySubType; typedef enum PropertyFlag { diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index b2d3614bdc7..0d35f7cb1aa 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -27,6 +27,7 @@ SET(DEFSRC rna_action.c rna_actuator.c + rna_animation.c rna_armature.c rna_brush.c rna_camera.c diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 800ee1f5ca1..33af7945878 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -445,7 +445,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr fprintf(f, " else data->%s &= ~(%d<<%d);\n", dp->dnaname, dp->booleanbit, i); } else { - fprintf(f, " (&data->%s)[%d]= %s\n", dp->dnaname, i, (dp->booleannegative)? "!": ""); + fprintf(f, " (&data->%s)[%d]= %s", dp->dnaname, i, (dp->booleannegative)? "!": ""); rna_clamp_value(f, prop, 1, i); } } @@ -462,7 +462,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr fprintf(f, " data->%s[%d]= FTOCHAR(values[%d]);\n", dp->dnaname, i, i); } else { - fprintf(f, " data->%s[%d]= %s\n", dp->dnaname, i, (dp->booleannegative)? "!": ""); + fprintf(f, " data->%s[%d]= %s", dp->dnaname, i, (dp->booleannegative)? "!": ""); rna_clamp_value(f, prop, 1, i); } } @@ -959,6 +959,7 @@ static const char *rna_property_subtypename(PropertyType type) case PROP_MATRIX: return "PROP_MATRIX"; case PROP_ROTATION: return "PROP_ROTATION"; case PROP_NEVER_NULL: return "PROP_NEVER_NULL"; + case PROP_PERCENTAGE: return "PROP_PERCENTAGE"; default: return "PROP_UNKNOWN"; } } @@ -1246,7 +1247,8 @@ typedef struct RNAProcessItem { RNAProcessItem PROCESS_ITEMS[]= { {"rna_ID.c", RNA_def_ID}, {"rna_texture.c", RNA_def_texture}, - {"rna_action.c", RNA_def_animation}, + {"rna_action.c", RNA_def_action}, + {"rna_animation.c", RNA_def_animation}, {"rna_actuator.c", RNA_def_actuator}, {"rna_armature.c", RNA_def_armature}, {"rna_brush.c", RNA_def_brush}, diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 74caa4d17e0..97c87c6a962 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -75,6 +75,7 @@ StructRNA *rna_ID_refine(PointerRNA *ptr) case ID_NT: return &RNA_NodeTree; case ID_ME: return &RNA_Mesh; case ID_OB: return &RNA_Object; + case ID_PA: return &RNA_ParticleSettings; case ID_SCE: return &RNA_Scene; case ID_SCR: return &RNA_Screen; case ID_SO: return &RNA_Sound; diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 5143160c69e..d52881598f1 100755 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -157,6 +157,11 @@ void rna_def_fcurve(BlenderRNA *brna) {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", "Constant", ""}, {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", "Linear", ""}, {0, NULL, NULL, NULL}}; + static EnumPropertyItem prop_mode_color_items[] = { + {FCURVE_COLOR_AUTO_RAINBOW, "AUTO_RAINBOW", "Automatic Rainbow", ""}, + {FCURVE_COLOR_AUTO_RGB, "AUTO_RGB", "Automatic XYZ to RGB", ""}, + {FCURVE_COLOR_CUSTOM, "CUSTOM", "User Defined", ""}, + {0, NULL, NULL, NULL}}; srna= RNA_def_struct(brna, "FCurve", NULL); RNA_def_struct_ui_text(srna, "F-Curve", "F-Curve defining values of a period of time."); @@ -164,14 +169,13 @@ void rna_def_fcurve(BlenderRNA *brna) /* Enums */ prop= RNA_def_property(srna, "extrapolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "extend"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_enum_items(prop, prop_mode_extend_items); RNA_def_property_ui_text(prop, "Extrapolation", ""); /* Pointers */ - //prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); - //RNA_def_property_pointer_sdna(prop, NULL, "driver"); - //RNA_def_property_ui_text(prop, "Driver", ""); + prop= RNA_def_property(srna, "driver", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // xxx? + RNA_def_property_ui_text(prop, "Driver", "Channel Driver (only set for Driver F-Curves)"); /* Path + Array Index */ prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE); @@ -181,7 +185,16 @@ void rna_def_fcurve(BlenderRNA *brna) prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE); RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific property affected by F-Curve if applicable."); - + + /* Color */ + prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, prop_mode_color_items); + RNA_def_property_ui_text(prop, "Color Mode", "Method used to determine color of F-Curve in Graph Editor."); + + prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Color", "Color of the F-Curve in the Graph Editor."); + /* Collections */ prop= RNA_def_property(srna, "sampled_points", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "fpt", "totvert"); @@ -261,59 +274,17 @@ void rna_def_action(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this Action, for labeling poses."); } -/* --- */ +/* --------- */ -void rna_def_animdata_common(StructRNA *srna) +void RNA_def_action(BlenderRNA *brna) { - PropertyRNA *prop; - - prop= RNA_def_property(srna, "animation_data", PROP_POINTER, PROP_NONE); - RNA_def_property_pointer_sdna(prop, NULL, "adt"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); - RNA_def_property_ui_text(prop, "Animation Data", "Animation data for this datablock."); -} - -void rna_def_animdata(BlenderRNA *brna) -{ - StructRNA *srna; - PropertyRNA *prop; - - srna= RNA_def_struct(brna, "AnimData", NULL); - //RNA_def_struct_sdna(srna, "AnimData"); - RNA_def_struct_ui_text(srna, "Animation Data", "Animation data for datablock."); - - /* NLA */ - prop= RNA_def_property(srna, "nla_tracks", PROP_COLLECTION, PROP_NONE); - RNA_def_property_collection_sdna(prop, NULL, "nla_tracks", NULL); - RNA_def_property_struct_type(prop, "UnknownType"); // XXX! - RNA_def_property_ui_text(prop, "NLA Tracks", "NLA Tracks (i.e. Animation Layers)."); - - /* Action */ - prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE); - RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock."); - - /* Drivers */ - prop= RNA_def_property(srna, "drivers", PROP_COLLECTION, PROP_NONE); - RNA_def_property_collection_sdna(prop, NULL, "drivers", NULL); - RNA_def_property_struct_type(prop, "FCurve"); - RNA_def_property_ui_text(prop, "Drivers", "The Drivers/Expressions for this datablock."); - - /* Settings */ -} - -/* --- */ - -void RNA_def_animation(BlenderRNA *brna) -{ - // XXX move this into its own file? - rna_def_animdata(brna); - rna_def_action(brna); rna_def_action_group(brna); - // XXX move these to their own file? + // should these be in their own file, or is that overkill? rna_def_fcurve(brna); rna_def_channeldriver(brna); } + #endif diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c new file mode 100644 index 00000000000..95091741db4 --- /dev/null +++ b/source/blender/makesrna/intern/rna_animation.c @@ -0,0 +1,213 @@ +/** + * $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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Blender Foundation (2008), Roland Hess + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include + +#include "RNA_define.h" +#include "RNA_types.h" + +#include "rna_internal.h" + +#include "DNA_anim_types.h" +#include "DNA_action_types.h" +#include "DNA_scene_types.h" + +#include "MEM_guardedalloc.h" + +#ifdef RNA_RUNTIME + +static void rna_ksPath_RnaPath_get(PointerRNA *ptr, char *value) +{ + KS_Path *ksp= (KS_Path *)ptr->data; + + if (ksp->rna_path) + strcpy(value, ksp->rna_path); + else + strcpy(value, ""); +} + +static int rna_ksPath_RnaPath_length(PointerRNA *ptr) +{ + KS_Path *ksp= (KS_Path *)ptr->data; + + if (ksp->rna_path) + return strlen(ksp->rna_path); + else + return 0; +} + +#if 0 +static void rna_ksPath_RnaPath_set(PointerRNA *ptr, const char *value) +{ + KS_Path *ksp= (KS_Path *)ptr->data; + + if (ksp->rna_path) + MEM_freeN(ksp->ksp_path); + + if (strlen(value)) + ksp->rna_path= BLI_strdup(value); + else + ksp->rna_path= NULL; +} +#endif + +#else + + +void rna_def_keyingset_path(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + static EnumPropertyItem prop_mode_grouping_items[] = { + {KSP_GROUP_NAMED, "NAMED", "Named Group", ""}, + {KSP_GROUP_NONE, "NONE", "None", ""}, + {KSP_GROUP_KSNAME, "KEYINGSET", "Keying Set Name", ""}, + {0, NULL, NULL, NULL}}; + + srna= RNA_def_struct(brna, "KeyingSetPath", NULL); + RNA_def_struct_sdna(srna, "KS_Path"); + RNA_def_struct_ui_text(srna, "Keying Set Path", "Path to a setting for use in a Keying Set."); + + /* ID */ + prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE); + RNA_def_property_ui_text(prop, "ID-Block", "ID-Block that keyframes for Keying Set should be added to (for Absolute Keying Sets only)."); + + /* Group */ + prop= RNA_def_property(srna, "group", PROP_STRING, PROP_NONE); + RNA_def_property_ui_text(prop, "Group Name", "Name of Action Group to assign setting(s) for this path to."); + + /* Grouping */ + prop= RNA_def_property(srna, "grouping", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "groupmode"); + RNA_def_property_enum_items(prop, prop_mode_grouping_items); + RNA_def_property_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use."); + + /* Path + Array Index */ + prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_string_funcs(prop, "rna_ksPath_RnaPath_get", "rna_ksPath_RnaPath_length", "rna_ksPath_RnaPath_set"); + RNA_def_property_ui_text(prop, "RNA Path", "RNA Path to property setting."); + + prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE); + RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific setting if applicable."); + + /* Flags */ + prop= RNA_def_property(srna, "entire_array", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", KSP_FLAG_WHOLE_ARRAY); + RNA_def_property_ui_text(prop, "Entire Array", "When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used."); +} + +void rna_def_keyingset(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "KeyingSet", NULL); + RNA_def_struct_ui_text(srna, "Keying Set", "Settings that should be keyframed together."); + + /* Name */ + prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); + RNA_def_property_ui_text(prop, "Name", ""); + RNA_def_struct_name_property(srna, prop); + + /* Paths */ + prop= RNA_def_property(srna, "paths", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "paths", NULL); + RNA_def_property_struct_type(prop, "KeyingSetPath"); + RNA_def_property_ui_text(prop, "Paths", "Keying Set Paths to define settings that get keyframed together."); + + /* Flags */ + prop= RNA_def_property(srna, "builtin", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_BUILTIN); + RNA_def_property_ui_text(prop, "Built-In", "Keying Set is a built-in to Blender."); + + /* TODO: for now, this is editable, but do we really want this to happen? */ + prop= RNA_def_property(srna, "absolute", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_ABSOLUTE); + RNA_def_property_ui_text(prop, "Absolute", "Keying Set defines specifc paths/settings to be keyframed (i.e. is not reliant on context info)"); + + /* Keyframing Flags */ + prop= RNA_def_property(srna, "insertkey_needed", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_NEEDED); + RNA_def_property_ui_text(prop, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves."); + + prop= RNA_def_property(srna, "insertkey_visual", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_MATRIX); + RNA_def_property_ui_text(prop, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'."); + + +} + +/* --- */ + +void rna_def_animdata_common(StructRNA *srna) +{ + PropertyRNA *prop; + + prop= RNA_def_property(srna, "animation_data", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "adt"); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_ui_text(prop, "Animation Data", "Animation data for this datablock."); +} + +void rna_def_animdata(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "AnimData", NULL); + RNA_def_struct_ui_text(srna, "Animation Data", "Animation data for datablock."); + + /* NLA */ + prop= RNA_def_property(srna, "nla_tracks", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "nla_tracks", NULL); + RNA_def_property_struct_type(prop, "UnknownType"); // XXX! + RNA_def_property_ui_text(prop, "NLA Tracks", "NLA Tracks (i.e. Animation Layers)."); + + /* Action */ + prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE); + RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock."); + + /* Drivers */ + prop= RNA_def_property(srna, "drivers", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "drivers", NULL); + RNA_def_property_struct_type(prop, "FCurve"); + RNA_def_property_ui_text(prop, "Drivers", "The Drivers/Expressions for this datablock."); + + /* Settings */ +} + +/* --- */ + +void RNA_def_animation(BlenderRNA *brna) +{ + rna_def_animdata(brna); + + rna_def_keyingset(brna); + rna_def_keyingset_path(brna); +} + +#endif diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 69e2cba5331..d21c79fbe52 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -241,10 +241,14 @@ static void rna_def_operator_stroke_element(BlenderRNA *brna) RNA_def_property_array(prop, 2); RNA_def_property_ui_text(prop, "Mouse", ""); - /*prop= RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE); RNA_def_property_flag(prop, PROP_IDPROPERTY); - RNA_def_property_range(prop, 0, 1); - RNA_def_property_ui_text(prop, "Pressure", "");*/ + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Pressure", "Tablet pressure."); + + prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED); + RNA_def_property_flag(prop, PROP_IDPROPERTY); + RNA_def_property_ui_text(prop, "Time", ""); prop= RNA_def_property(srna, "flip", PROP_BOOLEAN, PROP_NONE); RNA_def_property_flag(prop, PROP_IDPROPERTY); @@ -252,8 +256,6 @@ static void rna_def_operator_stroke_element(BlenderRNA *brna) /* XXX: Tool (this will be for pressing a modifier key for a different brush, e.g. switching to a Smooth brush in the middle of the stroke */ - - /* XXX: Time (should be useful for airbrush mode) */ } void RNA_def_brush(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 1393f266734..f2b39e76354 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -584,6 +584,10 @@ PropertyRNA *RNA_def_property(StructRNA *srna, const char *identifier, int type, fprop->softmin= 0.0f; fprop->softmax= 1.0f; } + else if(subtype == PROP_PERCENTAGE) { + fprop->softmin= fprop->hardmin= 0.0f; + fprop->softmax= fprop->hardmax= 1.0f; + } else { fprop->softmin= (subtype == PROP_UNSIGNED)? 0.0f: -10000.0f; /* rather arbitrary .. */ fprop->softmax= 10000.0f; @@ -1712,6 +1716,20 @@ PropertyRNA *RNA_def_float_array(StructRNA *srna, const char *identifier, int le return prop; } +PropertyRNA *RNA_def_float_percentage(StructRNA *srna, const char *identifier, float default_value, + float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax) +{ + PropertyRNA *prop; + + prop= RNA_def_property(srna, identifier, PROP_FLOAT, PROP_PERCENTAGE); + RNA_def_property_float_default(prop, default_value); + if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax); + RNA_def_property_ui_text(prop, ui_name, ui_description); + RNA_def_property_ui_range(prop, softmin, softmax, 1, 3); + + return prop; +} + PropertyRNA *RNA_def_pointer_runtime(StructRNA *srna, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description) { diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 27ea74d6331..528cac6fda6 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -95,6 +95,7 @@ extern BlenderDefRNA DefRNA; extern BlenderRNA BLENDER_RNA; void RNA_def_ID(struct BlenderRNA *brna); +void RNA_def_action(struct BlenderRNA *brna); void RNA_def_animation(struct BlenderRNA *brna); void RNA_def_armature(struct BlenderRNA *brna); void RNA_def_actuator(struct BlenderRNA *brna); diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 6081147694b..39fc1dbc5ad 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -242,7 +242,7 @@ void RNA_def_main(BlenderRNA *brna) {"sounds", "ID", "rna_Main_sound_begin", "Sounds", "Sound datablocks."}, {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks."}, {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks."}, - {"particles", "ID", "rna_Main_particle_begin", "Particles", "Particle datablocks."}, + {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks."}, {NULL, NULL, NULL, NULL, NULL}}; int i; diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index c893ac028be..fbf4e048f96 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -24,6 +24,8 @@ #include +#include "limits.h" + #include "RNA_define.h" #include "RNA_types.h" @@ -33,14 +35,1152 @@ #ifdef RNA_RUNTIME +static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value) +{ + ParticleSettings *settings = (ParticleSettings*)ptr->data; + + /* check for clipping */ + if(value > settings->end) + value = settings->end; + + if(settings->type==PART_REACTOR && value < 1.0) + value = 1.0; + else if (value < -30000.0f) //TODO: replace 30000 with MAXFRAMEF when available in 2.5 + value = -30000.0f; + + settings->sta = value; +} + +static void rna_PartSettings_end_set(struct PointerRNA *ptr, float value) +{ + ParticleSettings *settings = (ParticleSettings*)ptr->data; + + /* check for clipping */ + if(value < settings->sta) + value = settings->sta; + + settings->end = value; +} + +static void rna_PartSetting_linelentail_set(struct PointerRNA *ptr, float value) +{ + ParticleSettings *settings = (ParticleSettings*)ptr->data; + settings->draw_line[0] = value; +} + +static float rna_PartSetting_linelentail_get(struct PointerRNA *ptr) +{ + ParticleSettings *settings = (ParticleSettings*)ptr->data; + return settings->draw_line[0]; +} + +static void rna_PartSetting_linelenhead_set(struct PointerRNA *ptr, float value) +{ + ParticleSettings *settings = (ParticleSettings*)ptr->data; + settings->draw_line[1] = value; +} + +static float rna_PartSetting_linelenhead_get(struct PointerRNA *ptr) +{ + ParticleSettings *settings = (ParticleSettings*)ptr->data; + return settings->draw_line[1]; +} #else +static void rna_def_hair_key(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "HairKey", NULL); + RNA_def_struct_ui_text(srna, "Hair Key", "DOC_BROKEN"); + + prop= RNA_def_property(srna, "hair_vertex_location", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "co"); + RNA_def_property_array(prop, 3); + //TODO:bounds + RNA_def_property_ui_text(prop, "Hair Vertex Location", ""); + + prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_NONE); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Time", "Time along hair"); + + prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Softbody Weight", ""); + +// short editflag; /* saved particled edit mode flags */ + +} + +static void rna_def_particle_key(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "ParticleKey", NULL); + RNA_def_struct_ui_text(srna, "Particle Key", "DOC_BROKEN"); + + prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "co"); + RNA_def_property_array(prop, 3); + //TODO:bounds + RNA_def_property_ui_text(prop, "Location", ""); + + prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "vel"); + RNA_def_property_array(prop, 3); + //TODO:bounds + RNA_def_property_ui_text(prop, "Velocity", ""); + + prop= RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "rot"); + RNA_def_property_array(prop, 4); + //TODO:bounds + RNA_def_property_ui_text(prop, "Rotation Quaternion", ""); + + prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "ave"); + RNA_def_property_array(prop, 3); + //TODO:bounds + RNA_def_property_ui_text(prop, "Angular Velocity", ""); + + prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "time");//optional if prop names are the same +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Time", "Time along hair"); +} + +static void rna_def_child_particle(BlenderRNA *brna) +{ + StructRNA *srna; + //PropertyRNA *prop; + + srna = RNA_def_struct(brna, "ChildParticle", NULL); + RNA_def_struct_ui_text(srna, "Child Particle", "DOC_BROKEN"); + +// int num, parent; /* num is face index on the final derived mesh */ + +// int pa[4]; /* nearest particles to the child, used for the interpolation */ +// float w[4]; /* interpolation weights for the above particles */ +// float fuv[4], foffset; /* face vertex weights and offset */ +// float rand[3]; +} + +static void rna_def_particle_data(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + static EnumPropertyItem alive_items[] = { + {PARS_KILLED, "KILLED", "Killed", ""}, + {PARS_DEAD, "DEAD", "Dead", ""}, + {PARS_UNBORN, "UNBORN", "Unborn", ""}, + {PARS_ALIVE, "ALIVE", "Alive", ""}, + {PARS_DYING, "DYING", "Dying", ""}, + {0, NULL, NULL, NULL} + }; + + srna = RNA_def_struct(brna, "Particle", NULL); + RNA_def_struct_sdna(srna, "ParticleData"); + RNA_def_struct_ui_text(srna, "Particle", "Particle in a particle system."); + + prop= RNA_def_property(srna, "stick_object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "stick_ob"); + RNA_def_property_struct_type(prop, "Object"); + RNA_def_property_ui_text(prop, "Stick Object", "Object that particle sticks to when dead"); + +// ParticleKey state; /* normally current global coordinates or */ +// /* in sticky object space if dead & sticky */ +// +// ParticleKey prev_state; /* previous state */ + +// prop= RNA_def_property(srna, "hair", PROP_COLLECTION, PROP_NONE); +// RNA_def_property_collection_sdna(prop, NULL, "hair", "???totalHair???"); //don't know what the hair array size is +// RNA_def_property_struct_type(prop, "HairKey"); +// RNA_def_property_ui_text(prop, "Hair", ""); + + prop= RNA_def_property(srna, "keys", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "keys", "totkey"); + RNA_def_property_struct_type(prop, "ParticleKey"); + RNA_def_property_ui_text(prop, "Keyed States", ""); + + prop= RNA_def_property(srna, "random_rotation", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "r_rot"); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Random Rotation", ""); + + prop= RNA_def_property(srna, "random_a_velocity", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "r_ave"); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Random erm.. Velocity", "");//TODO: fix name + + prop= RNA_def_property(srna, "random_velocity", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "r_ve");//optional if prop names are the same +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Random Velocity", ""); + +// +// float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/ +// /* face normal for volume emission */ + + prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_NONE); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Time", ""); + + prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_NONE); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Lifetime", ""); + + prop= RNA_def_property(srna, "die_time", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "dietime"); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Die Time", ""); + + prop= RNA_def_property(srna, "banking_angle", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "bank"); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Banking Angle", ""); + + prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Size", ""); + + prop= RNA_def_property(srna, "size_multiplier", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "sizemul"); +// RNA_def_property_range(prop, lowerLimitf, upperLimitf); + RNA_def_property_ui_text(prop, "Size Multiplier", ""); + +// +// int num; /* index to vert/edge/face */ +// int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */ +// int pad; +// +// int totkey; +// int bpi; /* softbody body point start index */ + + /* flag */ + prop= RNA_def_property(srna, "unexist", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_UNEXIST); + RNA_def_property_ui_text(prop, "unexist", ""); + + prop= RNA_def_property(srna, "no_disp", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_NO_DISP); + RNA_def_property_ui_text(prop, "no_disp", ""); + + prop= RNA_def_property(srna, "sticky", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_STICKY); + RNA_def_property_ui_text(prop, "sticky", ""); + + prop= RNA_def_property(srna, "transform", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_TRANSFORM); + RNA_def_property_ui_text(prop, "transform", ""); + + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_HIDE); + RNA_def_property_ui_text(prop, "hide", ""); + + prop= RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_TAG); + RNA_def_property_ui_text(prop, "tag", ""); + + prop= RNA_def_property(srna, "rekey", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_REKEY); + RNA_def_property_ui_text(prop, "rekey", ""); + + prop= RNA_def_property(srna, "edit_recalc", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_EDIT_RECALC); + RNA_def_property_ui_text(prop, "edit_recalc", ""); + + + prop= RNA_def_property(srna, "alive_state", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "alive"); + RNA_def_property_enum_items(prop, alive_items); + RNA_def_property_ui_text(prop, "Alive State", ""); + + prop= RNA_def_property(srna, "loop", PROP_INT, PROP_NONE); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + //TODO: bounds + RNA_def_property_ui_text(prop, "Loop", "How may times the particle life has looped"); + +// short rt2; +} + static void rna_def_particlesettings(BlenderRNA *brna) { StructRNA *srna; + PropertyRNA *prop; + + static EnumPropertyItem type_items[] = { + {PART_EMITTER, "EMITTER", "Emitter", ""}, + {PART_REACTOR, "REACTOR", "Reactor", ""}, + {PART_HAIR, "HAIR", "Hair", ""}, + {PART_FLUID, "FLUID", "Fluid", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem from_items[] = { + {PART_FROM_VERT, "VERT", "Vertexes", ""}, + {PART_FROM_FACE, "FACE", "Faces", ""}, + {PART_FROM_VOLUME, "VOLUME", "Volume", ""}, + {PART_FROM_PARTICLE, "PARTICLE", "Particle", ""}, + {PART_FROM_CHILD, "CHILD", "Child", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem dist_items[] = { + {PART_DISTR_JIT, "JIT", "Jittered", ""}, + {PART_DISTR_RAND, "RAND", "Random", ""}, + {PART_DISTR_GRID, "GRID", "Grid", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem phys_type_items[] = { + {PART_PHYS_NO, "NO", "no", ""}, + {PART_PHYS_NEWTON, "NEWTON", "Newtonian", ""}, + {PART_PHYS_KEYED, "KEYED", "Keyed", ""}, + {PART_PHYS_BOIDS, "BOIDS", "Boids", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem rot_mode_items[] = { + {0, "NONE", "None", ""}, + {PART_ROT_NOR, "NOR", "Normal", ""}, + {PART_ROT_VEL, "VEL", "Velocity", ""}, + {PART_ROT_GLOB_X, "GLOB_X", "Global X", ""}, + {PART_ROT_GLOB_Y, "GLOB_Y", "Global Y", ""}, + {PART_ROT_GLOB_Z, "GLOB_Z", "Global Z", ""}, + {PART_ROT_OB_X, "OB_X", "Object X", ""}, + {PART_ROT_OB_Y, "OB_Y", "Object Y", ""}, + {PART_ROT_OB_Z, "OB_Z", "Object Z", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem ave_mode_items[] = { + {0, "NONE", "None", ""}, + {PART_AVE_SPIN, "SPIN", "Spin", ""}, + {PART_AVE_RAND, "RAND", "Random", ""} , + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem react_event_items[] = { + {PART_EVENT_DEATH, "DEATH", "Death", ""}, + {PART_EVENT_COLLIDE, "COLLIDE", "Collision", ""}, + {PART_EVENT_NEAR, "NEAR", "Near", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem draw_as_items[] = { + {PART_DRAW_NOT, "NONE", "None", ""}, + {PART_DRAW_DOT, "DOT", "Point", ""}, + {PART_DRAW_CIRC, "CIRC", "Circle", ""}, + {PART_DRAW_CROSS, "CROSS", "Cross", ""}, + {PART_DRAW_AXIS, "AXIS", "Axis", ""}, + {PART_DRAW_LINE, "LINE", "Line", ""}, + {PART_DRAW_PATH, "PATH", "Path", ""}, + {PART_DRAW_OB, "OBJECT", "Object", ""}, + {PART_DRAW_GR, "GROUP", "Group", ""}, + {PART_DRAW_BB, "BILLBOARD", "Billboard", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem child_type_items[] = { + {0, "NONE", "None", ""}, + {PART_CHILD_PARTICLES, "PARTICLES", "Particles", ""}, + {PART_CHILD_FACES, "FACES", "Faces", ""}, + {0, NULL, NULL, NULL} + }; + + //TODO: names, tooltips + static EnumPropertyItem rot_from_items[] = { + {PART_ROT_KEYS, "KEYS", "keys", ""}, + {PART_ROT_ZINCR, "ZINCR", "zincr", ""}, + {PART_ROT_IINCR, "IINCR", "iincr", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem integrator_type_items[] = { + {PART_INT_EULER, "EULER", "Euler", ""}, + {PART_INT_MIDPOINT, "MIDPOINT", "Midpoint", ""}, + {PART_INT_RK4, "RK4", "RK4", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem kink_type_items[] = { + {PART_KINK_NO, "NO", "Nothing", ""}, + {PART_KINK_CURL, "CURL", "Curl", ""}, + {PART_KINK_RADIAL, "RADIAL", "Radial", ""}, + {PART_KINK_WAVE, "WAVE", "Wave", ""}, + {PART_KINK_BRAID, "BRAID", "Braid", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem kink_axis_items[] = { + {0, "X", "X", ""}, + {1, "Y", "Y", ""}, + {2, "Z", "Z", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem bb_align_items[] = { + {PART_BB_X, "X", "X", ""}, + {PART_BB_Y, "Y", "Y", ""}, + {PART_BB_Z, "Z", "Z", ""}, + {PART_BB_VIEW, "VIEW", "View", ""}, + {PART_BB_VEL, "VEL", "Velocity", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem bb_anim_items[] = { + {PART_BB_ANIM_NONE, "NONE", "None", ""}, + {PART_BB_ANIM_TIME, "TIME", "Time", ""}, + {PART_BB_ANIM_ANGLE, "ANGLE", "Angle", ""}, + //{PART_BB_ANIM_OFF_TIME, "OFF_TIME", "off_time", ""}, + //{PART_BB_ANIM_OFF_ANGLE, "OFF_ANGLE", "off_angle", ""}, + {0, NULL, NULL, NULL} + }; + + static EnumPropertyItem bb_split_offset_items[] = { + {PART_BB_OFF_NONE, "NONE", "None", ""}, + {PART_BB_OFF_LINEAR, "LINEAR", "Linear", ""}, + {PART_BB_OFF_RANDOM, "RANDOM", "Random", ""}, + {0, NULL, NULL, NULL} + }; srna= RNA_def_struct(brna, "ParticleSettings", "ID"); RNA_def_struct_ui_text(srna, "Particle Settings", "Particle settings, reusable by multiple particle systems."); + + /* flag */ + prop= RNA_def_property(srna, "react_start_end", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_STA_END); + RNA_def_property_ui_text(prop, "Start/End", "Give birth to unreacted particles eventually."); + + prop= RNA_def_property(srna, "react_multiple", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_MULTIPLE); + RNA_def_property_ui_text(prop, "Multi React", "React multiple times."); + + prop= RNA_def_property(srna, "loop", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_LOOP); + RNA_def_property_ui_text(prop, "Loop", "Loop particle lives."); + + prop= RNA_def_property(srna, "hair_geometry", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_GEOMETRY); + RNA_def_property_ui_text(prop, "Hair Geometry", "");//TODO: tooltip + + prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_UNBORN); + RNA_def_property_ui_text(prop, "Unborn", "Show particles before they are emitted."); + + prop= RNA_def_property(srna, "died", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIED); + RNA_def_property_ui_text(prop, "Died", "Show particles after they have died"); + + prop= RNA_def_property(srna, "trand", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_TRAND); + RNA_def_property_ui_text(prop, "Random", "Emit in random order of elements"); + + prop= RNA_def_property(srna, "even_distribution", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_EDISTR); + RNA_def_property_ui_text(prop, "Even Distribution", "Use even distribution from faces based on face areas or edge lengths."); + + prop= RNA_def_property(srna, "sticky", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_STICKY); + RNA_def_property_ui_text(prop, "Sticky", "Particles stick to collided objects if they die in the collision."); + + prop= RNA_def_property(srna, "die_on_collision", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIE_ON_COL); + RNA_def_property_ui_text(prop, "Die on hit", "Particles die when they collide with a deflector object."); + + prop= RNA_def_property(srna, "size_deflect", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZE_DEFL); + RNA_def_property_ui_text(prop, "Size Deflect", "Use particle's size in deflection."); + + prop= RNA_def_property(srna, "rotation_dynamic", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ROT_DYN); + RNA_def_property_ui_text(prop, "Dynamic", "Sets rotation to dynamic/constant"); + + prop= RNA_def_property(srna, "sizemass", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZEMASS); + RNA_def_property_ui_text(prop, "Mass from Size", "Multiply mass with particle size."); + + prop= RNA_def_property(srna, "abs_length", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ABS_LENGTH); + RNA_def_property_ui_text(prop, "Abs Length", "Use maximum length for children"); + + prop= RNA_def_property(srna, "absolute_time", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ABS_TIME); + RNA_def_property_ui_text(prop, "Absolute Time", "Set all ipos that work on particles to be calculated in absolute/relative time."); + + prop= RNA_def_property(srna, "global_time", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GLOB_TIME); + RNA_def_property_ui_text(prop, "Global Time", "Set all ipos that work on particles to be calculated in global/object time."); + + prop= RNA_def_property(srna, "boids_2d", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BOIDS_2D); + RNA_def_property_ui_text(prop, "Boids 2D", "Constrain boids to a surface"); + + prop= RNA_def_property(srna, "branching", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BRANCHING); + RNA_def_property_ui_text(prop, "Branching", "Branch child paths from eachother."); + + prop= RNA_def_property(srna, "animate_branching", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ANIM_BRANCHING); + RNA_def_property_ui_text(prop, "Animated", "Animate branching"); + + prop= RNA_def_property(srna, "symmetric_branching", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SYMM_BRANCHING); + RNA_def_property_ui_text(prop, "Symmetric", "Start and end points are the same."); + + prop= RNA_def_property(srna, "hair_bspline", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_BSPLINE); + RNA_def_property_ui_text(prop, "B-Spline", "Interpolate hair using B-Splines."); + + prop= RNA_def_property(srna, "grid_invert", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GRID_INVERT); + RNA_def_property_ui_text(prop, "Invert", "Invert what is considered object and what is not."); + + prop= RNA_def_property(srna, "child_effector", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_EFFECT); + RNA_def_property_ui_text(prop, "Children", "Apply effectors to children."); + + prop= RNA_def_property(srna, "child_seams", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_SEAMS); + RNA_def_property_ui_text(prop, "Use seams", "Use seams to determine parents"); + + prop= RNA_def_property(srna, "child_render", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_RENDER); + RNA_def_property_ui_text(prop, "child_render", ""); + + prop= RNA_def_property(srna, "child_guide", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_GUIDE); + RNA_def_property_ui_text(prop, "child_guide", ""); + + prop= RNA_def_property(srna, "self_effect", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SELF_EFFECT); + RNA_def_property_ui_text(prop, "Self Effect", "Particle effectors effect themselves."); + + + prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, type_items); + RNA_def_property_ui_text(prop, "Type", ""); + + prop= RNA_def_property(srna, "emit_from", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "from"); + RNA_def_property_enum_items(prop, from_items); + RNA_def_property_ui_text(prop, "Emit From", "Where to emit particles from"); + + prop= RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "distr"); + RNA_def_property_enum_items(prop, dist_items); + RNA_def_property_ui_text(prop, "Distribution", "How to distribute particles on selected element"); + + /* physics modes */ + prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "phystype"); + RNA_def_property_enum_items(prop, phys_type_items); + RNA_def_property_ui_text(prop, "Physics Type", "Particle physics type"); + + prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "rotmode"); + RNA_def_property_enum_items(prop, rot_mode_items); + RNA_def_property_ui_text(prop, "Rotation", "Particles initial rotation"); + + prop= RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "avemode"); + RNA_def_property_enum_items(prop, ave_mode_items); + RNA_def_property_ui_text(prop, "Angular Velocity Mode", "Particle angular velocity mode."); + + prop= RNA_def_property(srna, "react_event", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "reactevent"); + RNA_def_property_enum_items(prop, react_event_items); + RNA_def_property_ui_text(prop, "React On", "The event of target particles to react on."); + + /*draw flag*/ + prop= RNA_def_property(srna, "velocity", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL); + RNA_def_property_ui_text(prop, "Velocity", "Show particle velocity"); + + /* used? + prop= RNA_def_property(srna, "angle", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_ANG); + RNA_def_property_ui_text(prop, "Angle", ""); + */ + + prop= RNA_def_property(srna, "show_size", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_SIZE); + RNA_def_property_ui_text(prop, "Size", "Show particle size"); + + prop= RNA_def_property(srna, "emitter", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_EMITTER); + RNA_def_property_ui_text(prop, "Emitter", "Render emitter Object also."); + + //could not find this one in the UI - should this be read only? + prop= RNA_def_property(srna, "keys", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_KEYS); + RNA_def_property_ui_text(prop, "Keys", ""); + + /* used? + prop= RNA_def_property(srna, "adapt", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_ADAPT); + RNA_def_property_ui_text(prop, "adapt", ""); + + prop= RNA_def_property(srna, "cos", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_COS); + RNA_def_property_ui_text(prop, "cos", ""); + */ + + prop= RNA_def_property(srna, "billboard_lock", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_BB_LOCK); + RNA_def_property_ui_text(prop, "Lock Billboard", "Lock the billboards align axis"); + + prop= RNA_def_property(srna, "parent", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_PARENT); + RNA_def_property_ui_text(prop, "Parents", "Render parent particles."); + + prop= RNA_def_property(srna, "num", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_NUM); + RNA_def_property_ui_text(prop, "Number", "Show particle number"); + + prop= RNA_def_property(srna, "rand_group", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_RAND_GR); + RNA_def_property_ui_text(prop, "Pick Random", "Pick objects from group randomly"); + + prop= RNA_def_property(srna, "render_adaptive", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_ADAPT); + RNA_def_property_ui_text(prop, "Adaptive render", "Draw steps of the particle path"); + + prop= RNA_def_property(srna, "velocity_length", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL_LENGTH); + RNA_def_property_ui_text(prop, "Speed", "Multiply line length by particle speed"); + + prop= RNA_def_property(srna, "material_color", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_MAT_COL); + RNA_def_property_ui_text(prop, "Material Color", "Draw particles using material's diffuse color."); + + prop= RNA_def_property(srna, "whole_group", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_WHOLE_GR); + RNA_def_property_ui_text(prop, "Dupli Group", "Use whole group at once."); + + prop= RNA_def_property(srna, "render_strand", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_STRAND); + RNA_def_property_ui_text(prop, "Strand render", "Use the strand primitive for rendering"); + + + prop= RNA_def_property(srna, "draw_as", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, draw_as_items); + RNA_def_property_ui_text(prop, "Particle Visualization", "How particles are visualized"); + + prop= RNA_def_property(srna, "draw_size", PROP_INT, PROP_NONE); + RNA_def_property_range(prop, 0, 10); + RNA_def_property_ui_text(prop, "Draw Size", "Size of particles on viewport in pixels (0=default)"); + + prop= RNA_def_property(srna, "child_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "childtype"); + RNA_def_property_enum_items(prop, child_type_items); + RNA_def_property_ui_text(prop, "Children From", "Create child particles"); + + prop= RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE); + RNA_def_property_range(prop, 0, 7); + RNA_def_property_ui_text(prop, "Steps", "How many steps paths are drawn with (power of 2)"); + + prop= RNA_def_property(srna, "render_step", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "ren_step"); + RNA_def_property_range(prop, 0, 9); + RNA_def_property_ui_text(prop, "Render", "How many steps paths are rendered with (power of 2)"); + + prop= RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE); + RNA_def_property_range(prop, 2, 50); + RNA_def_property_ui_text(prop, "Segments", "Amount of hair segments"); + + //TODO: not found in UI, readonly? + prop= RNA_def_property(srna, "keys_step", PROP_INT, PROP_NONE); + RNA_def_property_range(prop, 0, INT_MAX);//TODO:min,max + RNA_def_property_ui_text(prop, "Keys Step", ""); + + /* adaptive path rendering */ + prop= RNA_def_property(srna, "adaptive_angle", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "adapt_angle"); + RNA_def_property_range(prop, 0, 45); + RNA_def_property_ui_text(prop, "Degrees", "How many degrees path has to curve to make another render segment"); + + prop= RNA_def_property(srna, "adaptive_pix", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "adapt_pix"); + RNA_def_property_range(prop, 0, 50); + RNA_def_property_ui_text(prop, "Pixel", "How many pixels path has to cover to make another render segment"); + + prop= RNA_def_property(srna, "display", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "disp"); + RNA_def_property_range(prop, 0, 100); + RNA_def_property_ui_text(prop, "Display", "Percentage of particles to display in 3d view"); + + prop= RNA_def_property(srna, "material", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "omat"); + RNA_def_property_range(prop, 1, 16); + RNA_def_property_ui_text(prop, "Material", "Specify material used for the particles"); + + + //interpolation + //TODO: can't find where interpolation is used + + //TODO: is this read only/internal? + prop= RNA_def_property(srna, "rotate_from", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "rotfrom"); + RNA_def_property_enum_items(prop, rot_from_items); + RNA_def_property_ui_text(prop, "Rotate From", ""); + + prop= RNA_def_property(srna, "integrator", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, integrator_type_items); + RNA_def_property_ui_text(prop, "Integration", "Select physics integrator type"); + + prop= RNA_def_property(srna, "kink", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, kink_type_items); + RNA_def_property_ui_text(prop, "Kink", "Type of periodic offset on the path"); + + prop= RNA_def_property(srna, "kink_axis", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, kink_axis_items); + RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset"); + + /* used? + prop= RNA_def_property(srna, "inbetween", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "nbetween"); + RNA_def_property_range(prop, 0, INT_MAX); + RNA_def_property_ui_text(prop, "Inbetween", ""); + */ + + prop= RNA_def_property(srna, "boid_neighbours", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "boidneighbours"); + RNA_def_property_range(prop, 1, 10); + RNA_def_property_ui_text(prop, "Neighbours", "How many neighbours to consider for each boid"); + + /* billboards */ + prop= RNA_def_property(srna, "billboard_align", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "bb_align"); + RNA_def_property_enum_items(prop, bb_align_items); + RNA_def_property_ui_text(prop, "Align to", "In respect to what the billboards are aligned"); + + prop= RNA_def_property(srna, "billboard_uv_split", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "bb_uv_split"); + RNA_def_property_range(prop, 1, 10); + RNA_def_property_ui_text(prop, "UV Split", "Amount of rows/columns to split uv coordinates for billboards"); + + prop= RNA_def_property(srna, "billboard_animation", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "bb_anim"); + RNA_def_property_enum_items(prop, bb_anim_items); + RNA_def_property_ui_text(prop, "Animate", "How to animate billboard textures."); + + prop= RNA_def_property(srna, "billboard_split_offset", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "bb_split_offset"); + RNA_def_property_enum_items(prop, bb_split_offset_items); + RNA_def_property_ui_text(prop, "Offset", "How to offset billboard textures"); + + prop= RNA_def_property(srna, "billboard_tilt", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "bb_tilt"); + RNA_def_property_range(prop, -1.0f, 1.0f); + RNA_def_property_ui_text(prop, "Tilt", "Tilt of the billboards"); + + prop= RNA_def_property(srna, "billboard_random_tilt", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "bb_rand_tilt"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Random Tilt", "Random tilt of the billboards"); + + prop= RNA_def_property(srna, "billboard_offset", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "bb_offset"); + RNA_def_property_array(prop, 2); + RNA_def_property_range(prop, -1.0f, 1.0f); + RNA_def_property_ui_text(prop, "Billboard Offset", ""); + + /* simplification */ + prop= RNA_def_property(srna, "enable_simplify", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", PART_SIMPLIFY_ENABLE); + RNA_def_property_ui_text(prop, "Child Simplification", "Remove child strands as the object becomes smaller on the screen."); + + prop= RNA_def_property(srna, "viewport", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", PART_SIMPLIFY_VIEWPORT); + RNA_def_property_ui_text(prop, "Viewport", ""); + + prop= RNA_def_property(srna, "simplify_refsize", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "simplify_refsize"); + RNA_def_property_range(prop, 1, 32768); + RNA_def_property_ui_text(prop, "Reference Size", "Reference size size in pixels, after which simplification begins."); + + prop= RNA_def_property(srna, "simplify_rate", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Rate", "Speed of simplification"); + + prop= RNA_def_property(srna, "simplify_transition", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Transition", "Transition period for fading out strands."); + + prop= RNA_def_property(srna, "simplify_viewport", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0f, 0.999f); + RNA_def_property_ui_text(prop, "Rate", "Speed of Simplification"); + + /* general values */ + prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "sta");//optional if prop names are the same + RNA_def_property_range(prop, -30000.0f, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5 + RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL); + RNA_def_property_ui_text(prop, "Start", "Frame # to start emitting particles."); + + prop= RNA_def_property(srna, "end", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -30000.0f, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5 + RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_end_set", NULL); + RNA_def_property_ui_text(prop, "End", "Frame # to stop emitting particles."); + + prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 1.0f, 30000.0f); + RNA_def_property_ui_text(prop, "Lifetime", "Specify the life span of the particles"); + + prop= RNA_def_property(srna, "random_lifetime", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "randlife"); + RNA_def_property_range(prop, 0.0f, 2.0f); + RNA_def_property_ui_text(prop, "Random", "Give the particle life a random variation."); + + prop= RNA_def_property(srna, "time_tweak", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "timetweak"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Tweak", "A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)"); + + prop= RNA_def_property(srna, "jitter_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "jitfac"); + RNA_def_property_range(prop, 0.0f, 2.0f); + RNA_def_property_ui_text(prop, "Amount", "Amount of jitter applied to the sampling."); + + prop= RNA_def_property(srna, "keyed_time", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Time", "Keyed key time relative to remaining particle life."); + + prop= RNA_def_property(srna, "effect_hair", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "eff_hair"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Stiffnes", "Hair stiffness for effectors"); + + //float rt; TODO:find where rt is used - can't find it in UI + + prop= RNA_def_property(srna, "total_particles", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "totpart"); + RNA_def_property_range(prop, 0, 100000); + RNA_def_property_ui_text(prop, "Particle Amount", "The total number of particles."); + + prop= RNA_def_property(srna, "userjit", PROP_INT, PROP_UNSIGNED);//TODO: can we get a better name for userjit? + RNA_def_property_int_sdna(prop, NULL, "userjit"); + RNA_def_property_range(prop, 0, 1000); + RNA_def_property_ui_text(prop, "P/F", "Emission locations / face (0 = automatic)."); + + prop= RNA_def_property(srna, "grid_resolution", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "grid_res"); + RNA_def_property_range(prop, 1, 100); + RNA_def_property_ui_text(prop, "Resolution", "The resolution of the particle grid."); + + /* initial velocity factors */ + prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "normfac");//optional if prop names are the same + RNA_def_property_range(prop, -200.0f, 200.0f); + RNA_def_property_ui_text(prop, "Normal", "Let the surface normal give the particle a starting speed."); + + prop= RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "obfac"); + RNA_def_property_range(prop, -1.0f, 1.0f); + RNA_def_property_ui_text(prop, "Object", "Let the object give the particle a starting speed"); + + prop= RNA_def_property(srna, "random_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "randfac");//optional if prop names are the same + RNA_def_property_range(prop, 0.0f, 200.0f); + RNA_def_property_ui_text(prop, "Random", "Give the starting speed a random variation."); + + prop= RNA_def_property(srna, "particle_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "partfac"); + RNA_def_property_range(prop, -10.0f, 10.0f); + RNA_def_property_ui_text(prop, "Particle", "Let the target particle give the particle a starting speed."); + + prop= RNA_def_property(srna, "tangent_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "tanfac"); + RNA_def_property_range(prop, -200.0f, 200.0f); + RNA_def_property_ui_text(prop, "Tangent", "Let the surface tangent give the particle a starting speed."); + + prop= RNA_def_property(srna, "tangent_phase", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "tanphase"); + RNA_def_property_range(prop, -1.0f, 1.0f); + RNA_def_property_ui_text(prop, "Rot", "Rotate the surface tangent."); + + prop= RNA_def_property(srna, "reactor_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "reactfac"); + RNA_def_property_range(prop, -10.0f, 10.0f); + RNA_def_property_ui_text(prop, "Reactor", "Let the vector away from the target particles location give the particle a starting speed."); + + prop= RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "avefac"); + RNA_def_property_range(prop, -200.0f, 200.0f); + RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity amount"); + + prop= RNA_def_property(srna, "phase_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "phasefac"); + RNA_def_property_range(prop, -1.0f, 1.0f); + RNA_def_property_ui_text(prop, "Phase", "Initial rotation phase"); + + prop= RNA_def_property(srna, "random_rotation_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "randrotfac"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Random Rotation", "Randomize rotation"); + + prop= RNA_def_property(srna, "random_phase_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "randphasefac"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Random Phase", "Randomize rotation phase"); + + /* physical properties */ + prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.01f, 100.0f); + RNA_def_property_ui_text(prop, "Mass", "Specify the mass of the particles"); + + prop= RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "size"); + RNA_def_property_range(prop, 0.01f, 100.0f); + RNA_def_property_ui_text(prop, "Size", "The size of the particles"); + + prop= RNA_def_property(srna, "random_size", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "randsize"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation"); + + prop= RNA_def_property(srna, "reaction_shape", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "reactshape"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Shape", "Power of reaction strength dependence on distance to target."); + + + /* global physical properties */ + prop= RNA_def_property(srna, "acceleration", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "acc"); + RNA_def_property_array(prop, 3); + RNA_def_property_range(prop, -200.0f, 200.0f); + RNA_def_property_ui_text(prop, "Accelaration", "Constant acceleration"); + + prop= RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "dragfac"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Drag", "Specify the amount of air-drag."); + + prop= RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "brownfac"); + RNA_def_property_range(prop, 0.0f, 200.0f); + RNA_def_property_ui_text(prop, "Brownian", "Specify the amount of brownian motion"); + + prop= RNA_def_property(srna, "damp_factorq", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "dampfac"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Damp", "Specify the amount of damping"); + + /* length */ + //TODO: is this readonly? + prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "length"); +// RNA_def_property_range(prop, 0.0f, upperLimitf);//TODO: limits + RNA_def_property_ui_text(prop, "Length", ""); + + prop= RNA_def_property(srna, "absolute_length", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "abslength"); + RNA_def_property_range(prop, 0.0f, 10000.0f); + RNA_def_property_ui_text(prop, "Max Length", "Absolute maximum path length for children, in blender units."); + + prop= RNA_def_property(srna, "random_length", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "randlength"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Random Length", "Give path length a random variation."); + + /* children */ + prop= RNA_def_property(srna, "child_nbr", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "child_nbr");//optional if prop names are the same + RNA_def_property_range(prop, 0.0f, MAX_PART_CHILDREN); + RNA_def_property_ui_text(prop, "Children Per Parent", "Amount of children/parent"); + + prop= RNA_def_property(srna, "rendered_child_nbr", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "ren_child_nbr"); + RNA_def_property_range(prop, 0.0f, MAX_PART_CHILDREN); + RNA_def_property_ui_text(prop, "Rendered Children", "Amount of children/parent for rendering."); + + prop= RNA_def_property(srna, "virtual_parents", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "parents"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Virtual Parents", "Relative amount of virtual parents."); + + prop= RNA_def_property(srna, "child_size", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "childsize"); + RNA_def_property_range(prop, 0.01f, 100.0f); + RNA_def_property_ui_text(prop, "Child Size", "A multiplier for the child particle size."); + + prop= RNA_def_property(srna, "child_random_size", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "childrandsize"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Random Child Size", "Random variation to the size of the child particles."); + + prop= RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "childrad"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent."); + + prop= RNA_def_property(srna, "child_roundness", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "childflat"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Child Roundness", "Roundness of children around parent."); + + //TODO: is this readonly? + prop= RNA_def_property(srna, "child_spread", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "childspread"); +// RNA_def_property_range(prop, 0.0f, upperLimitf); TODO: limits + RNA_def_property_ui_text(prop, "Child Spread", ""); + + /* clumping */ + prop= RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "clumpfac"); + RNA_def_property_range(prop, -1.0f, 1.0f); + RNA_def_property_ui_text(prop, "Clump", "Amount of clumpimg"); + + prop= RNA_def_property(srna, "clumppow", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "clumppow"); + RNA_def_property_range(prop, -0.999f, 0.999f); + RNA_def_property_ui_text(prop, "Shape", "Shape of clumpimg"); + + + /* kink */ + prop= RNA_def_property(srna, "kink_amplitude", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "kink_amp"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset."); + + prop= RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "kink_freq"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)"); + + prop= RNA_def_property(srna, "kink_shape", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -0.999f, 0.999f); + RNA_def_property_ui_text(prop, "Shape", "Adjust the offset to the beginning/end"); + + + /* rough */ + prop= RNA_def_property(srna, "rough1", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Rough1", "Amount of location dependant rough."); + + prop= RNA_def_property(srna, "rough1_size", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.01f, 10.0f); + RNA_def_property_ui_text(prop, "Size1", "Size of location dependant rough."); + + prop= RNA_def_property(srna, "rough2", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rough2"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Rough2", "Amount of random rough."); + + prop= RNA_def_property(srna, "rough2_size", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rough2_size"); + RNA_def_property_range(prop, 0.01f, 10.0f); + RNA_def_property_ui_text(prop, "Size2", "Size of random rough."); + + prop= RNA_def_property(srna, "rough2_thres", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rough2_thres"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by random rough."); + + prop= RNA_def_property(srna, "rough_endpoint", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rough_end"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Rough Endpoint", "Amount of end point rough."); + + prop= RNA_def_property(srna, "rough_end_shape", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Shape", "Shape of end point rough"); + + /* branching */ + prop= RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "branch_thres"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Threshold", "Threshold of branching."); + + /* drawing stuff */ + prop= RNA_def_property(srna, "line_length_tail", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_funcs(prop, "rna_PartSetting_linelentail_get", "rna_PartSetting_linelentail_set", NULL); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Back", "Length of the line's tail"); + + prop= RNA_def_property(srna, "line_length_head", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_funcs(prop, "rna_PartSetting_linelenhead_get", "rna_PartSetting_linelenhead_set", NULL); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Head", "Length of the line's head"); + + /* boids */ + prop= RNA_def_property(srna, "max_velocity", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "max_vel"); + RNA_def_property_range(prop, 0.0f, 200.0f); + RNA_def_property_ui_text(prop, "Maximum Velocity", ""); + + prop= RNA_def_property(srna, "lateral_acceleration_max", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "max_lat_acc"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Lateral Acceleration", "Lateral acceleration % of max velocity"); + + prop= RNA_def_property(srna, "tangential_acceleration_max", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "max_tan_acc"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Tangential acceleration", "Tangential acceleration % of max velocity"); + + prop= RNA_def_property(srna, "average_velocity", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "average_vel"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Average Velocity", "The usual speed % of max velocity"); + + prop= RNA_def_property(srna, "banking", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -10.0f, 10.0f); + RNA_def_property_ui_text(prop, "Banking", "Banking of boids on turns (1.0==natural banking)"); + + prop= RNA_def_property(srna, "banking_max", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "max_bank"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Maximum Banking", "How much a boid can bank at a single step"); + + prop= RNA_def_property(srna, "ground_z", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "groundz"); + RNA_def_property_range(prop, -100.0f, 100.0f); + RNA_def_property_ui_text(prop, "Ground Z", "Default Z value"); + + /*TODO: not sure how to deal with this + prop= RNA_def_property(srna, "boid_factor", PROP_FLOAT, PROP_VECTOR); + RNA_def_property_float_sdna(prop, NULL, "boidfac"); + RNA_def_property_ui_text(prop, "Boid Factor", ""); + + //char boidrule[8]; + */ + + prop= RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "dup_group"); + RNA_def_property_struct_type(prop, "Group"); + RNA_def_property_ui_text(prop, "Dupli Group", "Show Objects in this Group in place of particles"); + + prop= RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "eff_group"); + RNA_def_property_struct_type(prop, "Group"); + RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this Group."); + + prop= RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "dup_ob"); + RNA_def_property_struct_type(prop, "Object"); + RNA_def_property_ui_text(prop, "Dupli Object", "Show this Object in place of particles."); + + prop= RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "bb_ob"); + RNA_def_property_struct_type(prop, "Object"); + RNA_def_property_ui_text(prop, "Billboard Object", "Billboards face this object (default is active camera)"); + +#if 0 + prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_pointer_sdna(prop, NULL, "ipo"); + RNA_def_property_struct_type(prop, "Ipo"); + RNA_def_property_ui_text(prop, "Ipo", ""); +#endif + +// struct PartDeflect *pd; +// struct PartDeflect *pd2; } static void rna_def_particlesystem(BlenderRNA *brna) @@ -54,10 +1194,67 @@ static void rna_def_particlesystem(BlenderRNA *brna) prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "part"); RNA_def_property_ui_text(prop, "Settings", "Particle system settings."); + + prop= RNA_def_property(srna, "particles", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "particles", "totpart"); + RNA_def_property_struct_type(prop, "Particle"); + RNA_def_property_ui_text(prop, "Particles", "Particles generated by the particle system."); + + prop= RNA_def_property(srna, "child_particles", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "child", "totchild"); + RNA_def_property_struct_type(prop, "ChildParticle"); + RNA_def_property_ui_text(prop, "Child Particles", "Child particles generated by the particle system."); + + prop= RNA_def_property(srna, "softbody", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "soft"); + RNA_def_property_ui_text(prop, "Soft Body", "Soft body settings for hair physics simulation."); + + prop= RNA_def_property(srna, "reactor_target_object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "target_ob"); + RNA_def_property_ui_text(prop, "Reactor Target Object", "For reactor systems, the object that has the target particle system (empty if same object)."); + + prop= RNA_def_property(srna, "reactor_target_particle_system", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "target_psys"); + RNA_def_property_range(prop, 1, INT_MAX); + RNA_def_property_ui_text(prop, "Reactor Target Particle System", "For reactor systems, index of particle system on the target object."); + + prop= RNA_def_property(srna, "boids_surface_object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "keyed_ob"); + RNA_def_property_ui_text(prop, "Boids Surface Object", "For boids physics systems, constrain boids to this object's surface."); + + prop= RNA_def_property(srna, "keyed_object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "keyed_ob"); + RNA_def_property_ui_text(prop, "Keyed Object", "For keyed physics systems, the object that has the target particle system."); + + prop= RNA_def_property(srna, "keyed_particle_system", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "keyed_psys"); + RNA_def_property_range(prop, 1, INT_MAX); + RNA_def_property_ui_text(prop, "Keyed Particle System", "For keyed physics systems, index of particle system on the keyed object."); + + prop= RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED); + RNA_def_property_ui_text(prop, "Seed", "Offset in the random number table, to get a different randomized result."); + + // int seed; + // int flag, rt; + // short recalc, totkeyed, softflag, bakespace; + // + // char bb_uvname[3][32]; /* billboard uv name */ + // + // /* if you change these remember to update array lengths to PSYS_TOT_VG! */ + // short vgroup[12], vg_neg, rt3; /* vertex groups */ + + prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL); + RNA_def_property_pointer_sdna(prop, NULL, "pointcache"); + RNA_def_property_struct_type(prop, "PointCache"); + RNA_def_property_ui_text(prop, "Point Cache", ""); } void RNA_def_particle(BlenderRNA *brna) { + rna_def_hair_key(brna); + rna_def_particle_key(brna); + rna_def_child_particle(brna); + rna_def_particle_data(brna); rna_def_particlesystem(brna); rna_def_particlesettings(brna); } diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 2d19e2c177d..4b9c1e0067b 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -532,6 +532,7 @@ static void rna_def_property(BlenderRNA *brna) {PROP_MATRIX, "MATRIX", "Matrix", ""}, {PROP_ROTATION, "ROTATION", "Rotation", ""}, {PROP_NEVER_NULL, "NEVER_NULL", "Never Null", ""}, + {PROP_PERCENTAGE, "PERCENTAGE", "Percentage", ""}, {0, NULL, NULL, NULL}}; srna= RNA_def_struct(brna, "Property", NULL); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 6b66b283f36..a287846f716 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -149,6 +149,213 @@ void rna_def_tool_settings(BlenderRNA *brna) rna_def_sculpt(brna); } +void rna_def_scene_render_data(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + static EnumPropertyItem pixel_filter_items[] ={ + {R_FILTER_BOX, "BOX", "Box", ""}, + {R_FILTER_TENT, "TENT", "Tent", ""}, + {R_FILTER_QUAD, "QUADRATIC", "Quadratic", ""}, + {R_FILTER_CUBIC, "CUBIC", "Cubic", ""}, + {R_FILTER_CATROM, "CATMULLROM", "Catmull-Rom", ""}, + {R_FILTER_GAUSS, "GAUSSIAN", "Gaussian", ""}, + {R_FILTER_MITCH, "MITCHELL", "Mitchell-Netravali", ""}, + {0, NULL, NULL, NULL}}; + + static EnumPropertyItem alpha_mode_items[] ={ + {R_ADDSKY, "SKY", "Sky", "Transparent pixels are filled with sky color"}, + {R_ALPHAPREMUL, "PREMUL", "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"}, + {R_ALPHAKEY, "STRAIGHT", "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"}, + {0, NULL, NULL, NULL}}; + + static EnumPropertyItem octree_resolution_items[] = { + {64, "OCTREE_RES_64", "64", ""}, + {128, "OCTREE_RES_128", "128", ""}, + {256, "OCTREE_RES_256", "256", ""}, + {512, "OCTREE_RES_512", "512", ""}, + {0, NULL, NULL, NULL}}; + + static EnumPropertyItem fixed_oversample_items[] = { + {5, "OVERSAMPLE_5", "5", ""}, + {8, "OVERSAMPLE_8", "8", ""}, + {11, "OVERSAMPLE_11", "11", ""}, + {16, "OVERSAMPLE_16", "16", ""}, + {0, NULL, NULL, NULL}}; + + static EnumPropertyItem field_order_items[] = { + {0, "FIELDS_EVENFIRST", "Even Fields First", ""}, + {R_ODDFIELD, "FIELDS_ODDFIRST", "Odd Fields First", ""}, + {0, NULL, NULL, NULL}}; + + static EnumPropertyItem threads_mode_items[] = { + {0, "THREADS_AUTO", "Auto-detect", ""}, + {R_FIXED_THREADS, "THREADS_FIXED", "Fixed Number", ""}, + {0, NULL, NULL, NULL}}; + + srna= RNA_def_struct(brna, "SceneRenderData", NULL); + RNA_def_struct_sdna(srna, "RenderData"); + RNA_def_struct_nested(brna, srna, "Scene"); + RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock."); + + prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "xsch"); + RNA_def_property_range(prop, 0, 10000); + RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "ysch"); + RNA_def_property_range(prop, 0, 10000); + RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "size"); + RNA_def_property_range(prop, 1, 400); + RNA_def_property_ui_text(prop, "Resolution %", "Preview scale for render resolution"); + + prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "xparts"); + RNA_def_property_range(prop, 0, 512); + RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "yparts"); + RNA_def_property_range(prop, 0, 512); + RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "xasp"); + RNA_def_property_range(prop, 1.0f, 200.0f); + RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output"); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "yasp"); + RNA_def_property_range(prop, 1.0f, 200.0f); + RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output"); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "dither_intensity"); + RNA_def_property_range(prop, 0.0f, 2.0f); + RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "pixel_filter", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "filtertype"); + RNA_def_property_enum_items(prop, pixel_filter_items); + RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining AA samples."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "gauss"); + RNA_def_property_range(prop, 0.5f, 1.5f); + RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "alphamode"); + RNA_def_property_enum_items(prop, alpha_mode_items); + RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "ocres"); + RNA_def_property_enum_items(prop, octree_resolution_items); + RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator - use higher resolutions for larger scenes."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA); + RNA_def_property_ui_text(prop, "Anti-Aliasing", "Renders and combines multiple samples per pixel to prevent aliasing."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "osa"); + RNA_def_property_enum_items(prop, fixed_oversample_items); + RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "The number of fixed samples per pixel for anti-aliasing."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "fields", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS); + RNA_def_property_ui_text(prop, "Fields", "Renders image to two fields per frame, for interlaced TV display."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); + RNA_def_property_enum_items(prop, field_order_items); + RNA_def_property_ui_text(prop, "Field Order", ""); + + prop= RNA_def_property(srna, "fields_still", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL); + RNA_def_property_ui_text(prop, "Fields Still", "Disables the time difference between fields."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW); + RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "render_envmaps", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP); + RNA_def_property_ui_text(prop, "Render Environment Maps", "Calculate environment maps while rendering."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "render_radiosity", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO); + RNA_def_property_ui_text(prop, "Render Radiosity", "Calculate radiosity in a pre-process before rendering."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "render_raytracing", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE); + RNA_def_property_ui_text(prop, "Render Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "render_textures", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX); + RNA_def_property_ui_text(prop, "Render Textures", "Use textures to affect material properties."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE); + RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry"); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "edge_intensity", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "edgeint"); + RNA_def_property_range(prop, 0, 255); + RNA_def_property_ui_text(prop, "Edge Intensity", "Threshold for drawing outlines on geometry edges"); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR); + RNA_def_property_float_sdna(prop, NULL, "edgeR"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Edge Color", ""); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "panorama", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PANORAMA); + RNA_def_property_ui_text(prop, "Panorama", "Render the scene with a cylindrical camera for pseudo-fisheye lens effects"); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "threads"); + RNA_def_property_range(prop, 0, 8); + RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)"); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); + RNA_def_property_enum_items(prop, threads_mode_items); + RNA_def_property_ui_text(prop, "Threads Mode", ""); + +} + void RNA_def_scene(BlenderRNA *brna) { StructRNA *srna; @@ -215,6 +422,12 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL); RNA_def_property_ui_text(prop, "End Frame", ""); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE); + RNA_def_property_flag(prop, PROP_NOT_ANIMATEABLE); + RNA_def_property_int_sdna(prop, NULL, "frame_step"); + RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame"); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "stamp_note", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata"); @@ -237,13 +450,28 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "radiosity", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "radio"); RNA_def_property_ui_text(prop, "Radiosity", ""); + + prop= RNA_def_property(srna, "keyingsets", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL); + RNA_def_property_struct_type(prop, "KeyingSet"); + RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene."); + + prop= RNA_def_property(srna, "active_keyingset", PROP_INT, PROP_NONE); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_ui_text(prop, "Active Keying Set", "Current Keying Set index."); prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "toolsettings"); RNA_def_property_struct_type(prop, "ToolSettings"); RNA_def_property_ui_text(prop, "Tool Settings", ""); + prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "r"); + RNA_def_property_struct_type(prop, "SceneRenderData"); + RNA_def_property_ui_text(prop, "Render Data", ""); + rna_def_tool_settings(brna); + rna_def_scene_render_data(brna); } #endif diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c index e7e799b6e76..2c7974d129d 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c @@ -665,6 +665,8 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN if(img!=in[0]->data) free_compbuf(img); } + + generate_preview(node, out[0]->data); } static void node_composit_init_blur(bNode* node) @@ -677,7 +679,7 @@ bNodeType cmp_node_blur= { /* type code */ CMP_NODE_BLUR, /* name */ "Blur", /* width+range */ 120, 80, 200, - /* class+opts */ NODE_CLASS_OP_FILTER, NODE_OPTIONS, + /* class+opts */ NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS, /* input sock */ cmp_node_blur_in, /* output sock */ cmp_node_blur_out, /* storage */ "NodeBlurData", diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c b/source/blender/nodes/intern/CMP_nodes/CMP_filter.c index 6011ac3b58a..2c3b78e13a3 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_filter.c @@ -211,6 +211,8 @@ static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in, } out[0]->data= stackbuf; + + generate_preview(node, out[0]->data); } } @@ -220,7 +222,7 @@ bNodeType cmp_node_filter= { /* type code */ CMP_NODE_FILTER, /* name */ "Filter", /* width+range */ 80, 40, 120, - /* class+opts */ NODE_CLASS_OP_FILTER, NODE_OPTIONS, + /* class+opts */ NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS, /* input sock */ cmp_node_filter_in, /* output sock */ cmp_node_filter_out, /* storage */ "", diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c b/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c index 6a4916b3fac..ca6de027b1d 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c @@ -73,6 +73,8 @@ static void node_composit_exec_mix_rgb(void *data, bNode *node, bNodeStack **in, 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(node, out[0]->data); } } @@ -82,7 +84,7 @@ bNodeType cmp_node_mix_rgb= { /* type code */ CMP_NODE_MIX_RGB, /* name */ "Mix", /* width+range */ 110, 60, 120, - /* class+opts */ NODE_CLASS_OP_COLOR, NODE_OPTIONS, + /* class+opts */ NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS, /* input sock */ cmp_node_mix_rgb_in, /* output sock */ cmp_node_mix_rgb_out, /* storage */ "", diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index 296eb6296a7..35dba84d553 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -36,7 +36,7 @@ extern char btempdir[]; /* use this to store a valid temp directory */ struct Text; /* defined in DNA_text_types.h */ struct ID; /* DNA_ID.h */ struct Object; /* DNA_object_types.h */ -struct IpoDriver; /* DNA_curve_types.h */ +struct ChannelDriver; /* DNA_anim_types.h */ struct ScriptLink; /* DNA_scriptlink_types.h */ struct ListBase; /* DNA_listBase.h */ struct SpaceText; /* DNA_space_types.h */ @@ -116,8 +116,8 @@ extern "C" { short eventValue, unsigned short space_event); void BPY_pydriver_update(void); - float BPY_pydriver_eval(struct IpoDriver *driver); - struct Object **BPY_pydriver_get_objects(struct IpoDriver *driver); + float BPY_pydriver_eval(struct ChannelDriver *driver); + struct Object **BPY_pydriver_get_objects(struct ChannelDriver *driver); int BPY_button_eval(char *expr, double *value); diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 1b4b611120a..17802ec3a29 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -1,4 +1,7 @@ +#include +#include + #include #include "compile.h" /* for the PyCodeObject */ #include "eval.h" /* for PyEval_EvalCode */ @@ -35,6 +38,17 @@ static PyObject *CreateGlobalDictionary( bContext *C ) item = BPY_operator_module(C); PyDict_SetItemString( dict, "bpyoperator", item ); Py_DECREF(item); + + + // XXX very experemental, consiter this a test, especiall PyCObject is not meant to be perminant + item = BPY_ui_module(); + PyDict_SetItemString( dict, "bpyui", item ); + Py_DECREF(item); + + // XXX - evil, need to access context + item = PyCObject_FromVoidPtr( C, NULL ); + PyDict_SetItemString( dict, "__bpy_context__", item ); + Py_DECREF(item); return dict; } diff --git a/source/blender/readblenfile/SConscript b/source/blender/readblenfile/SConscript index 59771aa0829..430c53e3ef0 100644 --- a/source/blender/readblenfile/SConscript +++ b/source/blender/readblenfile/SConscript @@ -5,4 +5,4 @@ sources = env.Glob('intern/*.c') incs = '. ../blenloader ../blenloader/intern ../blenkernel ../blenlib ../makesdna ../../kernel/gen_messaging' -env.BlenderLib ( 'bf_readblenfile', sources, Split(incs), [], libtype=['core','player'], priority = [0, 220] ) +env.BlenderLib ( 'bf_readblenfile', sources, Split(incs), [], libtype=['core','player'], priority = [155, 220] ) diff --git a/source/blender/readblenfile/intern/BLO_readblenfile.c b/source/blender/readblenfile/intern/BLO_readblenfile.c index 40a991ad702..496ac529406 100644 --- a/source/blender/readblenfile/intern/BLO_readblenfile.c +++ b/source/blender/readblenfile/intern/BLO_readblenfile.c @@ -170,4 +170,3 @@ cleanup: return bfd; } - diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 62954711344..a77570ec1a5 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -952,7 +952,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, flo int first, int line, int adapt, float adapt_angle, float adapt_pix, int override_uv) { static VertRen *v1= NULL, *v2= NULL; - VlakRen *vlr; + VlakRen *vlr= NULL; float nor[3], cross[3], crosslen, w, dx, dy, width; static float anor[3], avec[3]; int flag, i; diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript index 862235d7b4b..9f87272ee20 100644 --- a/source/blender/windowmanager/SConscript +++ b/source/blender/windowmanager/SConscript @@ -19,4 +19,4 @@ defs = [] if not env['WITH_BF_PYTHON']: defs.append('DISABLE_PYTHON') -env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defs, libtype=['core'], priority=[5] ) +env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defs, libtype=['core'], priority=[100] ) diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index f0f8996cca9..2dd1aa871c2 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -161,11 +161,15 @@ struct wmGesture *WM_gesture_new(struct bContext *C, struct wmEvent *event, int void WM_gesture_end(struct bContext *C, struct wmGesture *gesture); /* radial control operator */ -int WM_radial_control_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int WM_radial_control_modal(struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_radial_control_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_radial_control_modal(struct bContext *C, struct wmOperator *op, struct wmEvent *event); void WM_OT_radial_control_partial(struct wmOperatorType *ot); void WM_radial_control_string(struct wmOperator *op, char str[], int maxlen); + /* fileselecting support */ +void WM_event_add_fileselect(struct bContext *C, struct wmOperator *op); +void WM_event_fileselect_event(struct bContext *C, void *ophandle, int eventval); + /* OpenGL wrappers, mimicking opengl syntax */ void wmSubWindowSet (struct wmWindow *win, int swinid); void wmSubWindowScissorSet (struct wmWindow *win, int swinid, struct rcti *srct); @@ -199,6 +203,7 @@ void WM_jobs_callbacks(struct wmJob *, void (*update)(void *)); void WM_jobs_start(struct wmJob *); +void WM_jobs_stop(struct wmWindowManager *wm, void *owner); void WM_jobs_stop_all(struct wmWindowManager *wm); #endif /* WM_API_H */ diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 2e7b31b0700..9dc2d5cf0b2 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -66,7 +66,8 @@ typedef struct wmEvent { short type; /* event code itself (short, is also in keymap) */ short val; /* press, release, scrollvalue */ - short x, y; /* mouse pointer position */ + short x, y; /* mouse pointer position, screen coord */ + short mval[2]; /* region mouse position, name convention pre 2.5 :) */ short prevx, prevy; /* previous mouse pointer position */ short unicode; /* future, ghost? */ char ascii; /* from ghost */ @@ -154,15 +155,20 @@ typedef struct wmNotifier { #define NC_LAMP (8<<24) #define NC_GROUP (9<<24) #define NC_IMAGE (10<<24) +#define NC_BRUSH (11<<24) /* data type, 256 entries is enough, it can overlap */ #define NOTE_DATA 0x00FF0000 /* NC_WM windowmanager */ #define ND_FILEREAD (1<<16) +#define ND_FILESAVE (2<<16) +#define ND_DATACHANGED (3<<16) /* NC_SCREEN screen */ #define ND_SCREENBROWSE (1<<16) +#define ND_SCREENCAST (2<<16) + /* NC_SCENE Scene */ #define ND_SCENEBROWSE (1<<16) @@ -212,7 +218,8 @@ typedef struct wmNotifier { #define NS_EDITMODE_MBALL (6<<8) #define NS_EDITMODE_LATTICE (7<<8) #define NS_EDITMODE_ARMATURE (8<<8) -#define NS_POSEMODE (9<<8) +#define NS_MODE_POSE (9<<8) +#define NS_MODE_PARTICLE (10<<8) /* action classification */ diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 56d8788fdcb..200d2652af3 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -135,6 +135,7 @@ void wm_add_default(bContext *C) BLI_strncpy(win->screenname, screen->id.name+2, 21); wm->winactive= win; + wm->file_saved= 1; wm_window_make_drawable(C, win); } @@ -149,6 +150,7 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm) while((win= wm->windows.first)) { BLI_remlink(&wm->windows, win); + win->screen= NULL; /* prevent draw clear to use screen */ wm_draw_window_clear(win); wm_window_free(C, win); } diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 1f417860e0c..6eb71d3d314 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -50,6 +50,7 @@ #include "BKE_scene.h" #include "BKE_utildefines.h" +#include "ED_fileselect.h" #include "ED_screen.h" #include "ED_space_api.h" #include "ED_util.h" @@ -140,6 +141,14 @@ void wm_event_do_notifiers(bContext *C) CTX_wm_window_set(C, win); for(note= wm->queue.first; note; note= note->next) { + if(note->category==NC_WM) { + if( ELEM(note->data, ND_FILEREAD, ND_FILESAVE)) { + wm->file_saved= 1; + wm_window_title(wm, win); + } + else if(note->data==ND_DATACHANGED) + wm_window_title(wm, win); + } if(note->window==win) { if(note->category==NC_SCREEN) { if(note->data==ND_SCREENBROWSE) @@ -176,7 +185,7 @@ void wm_event_do_notifiers(bContext *C) /* XXX context in notifiers? */ CTX_wm_window_set(C, win); - /* printf("notifier win %d screen %s\n", win->winid, win->screen->id.name+2); */ + /* printf("notifier win %d screen %s cat %x\n", win->winid, win->screen->id.name+2, note->category); */ ED_screen_do_listen(win, note); for(ar=win->screen->regionbase.first; ar; ar= ar->next) { @@ -313,6 +322,16 @@ static void wm_operator_print(wmOperator *op) MEM_freeN(buf); } +static void wm_region_mouse_co(bContext *C, wmEvent *event) +{ + ARegion *ar= CTX_wm_region(C); + if(ar) { + /* compatibility convention */ + event->mval[0]= event->x - ar->winrct.xmin; + event->mval[1]= event->y - ar->winrct.ymin; + } +} + static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerRNA *properties) { wmWindowManager *wm= CTX_wm_manager(C); @@ -324,8 +343,10 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P if((G.f & G_DEBUG) && event && event->type!=MOUSEMOVE) printf("handle evt %d win %d op %s\n", event?event->type:0, CTX_wm_screen(C)->subwinactive, ot->idname); - if(op->type->invoke && event) - retval= (*op->type->invoke)(C, op, event); + if(op->type->invoke && event) { + wm_region_mouse_co(C, event); + retval= op->type->invoke(C, op, event); + } else if(op->type->exec) retval= op->type->exec(C, op); else @@ -455,10 +476,40 @@ int WM_operator_call_py(bContext *C, wmOperatorType *ot, PointerRNA *properties, /* ********************* handlers *************** */ -/* not handler itself, is called by UI to move handlers to other queues, so don't close modal ones */ +/* future extra customadata free? */ static void wm_event_free_handler(wmEventHandler *handler) { + MEM_freeN(handler); +} + +/* only set context when area/region is part of screen */ +static void wm_handler_op_context(bContext *C, wmEventHandler *handler) +{ + bScreen *screen= CTX_wm_screen(C); + if(screen && handler->op) { + if(handler->op_area==NULL) + CTX_wm_area_set(C, NULL); + else { + ScrArea *sa; + + for(sa= screen->areabase.first; sa; sa= sa->next) + if(sa==handler->op_area) + break; + if(sa==NULL) + printf("internal error: handler (%s) has invalid area\n", handler->op->type->idname); + else { + ARegion *ar; + CTX_wm_area_set(C, sa); + for(ar= sa->regionbase.first; ar; ar= ar->next) + if(ar==handler->op_region) + break; + /* XXX no warning print here, after full-area and back regions are remade */ + if(ar) + CTX_wm_region_set(C, ar); + } + } + } } /* called on exit or remove area, only here call cancel callback */ @@ -475,8 +526,7 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers) ScrArea *area= CTX_wm_area(C); ARegion *region= CTX_wm_region(C); - CTX_wm_area_set(C, handler->op_area); - CTX_wm_region_set(C, handler->op_region); + wm_handler_op_context(C, handler); handler->op->type->cancel(C, handler->op); @@ -500,7 +550,6 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers) } wm_event_free_handler(handler); - MEM_freeN(handler); } } @@ -597,9 +646,9 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand ScrArea *area= CTX_wm_area(C); ARegion *region= CTX_wm_region(C); - CTX_wm_area_set(C, handler->op_area); - CTX_wm_region_set(C, handler->op_region); + wm_handler_op_context(C, handler); + wm_region_mouse_co(C, event); retval= ot->modal(C, op, event); /* putting back screen context, reval can pass trough after modal failures! */ @@ -641,7 +690,6 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand if(retval & (OPERATOR_CANCELLED|OPERATOR_FINISHED)) { BLI_remlink(handlers, handler); wm_event_free_handler(handler); - MEM_freeN(handler); /* prevent silly errors from operator users */ //retval &= ~OPERATOR_PASS_THROUGH; @@ -693,6 +741,88 @@ static int wm_handler_ui_call(bContext *C, wmEventHandler *handler, wmEvent *eve return WM_HANDLER_CONTINUE; } +/* fileselect handlers are only in the window queue, so it's save to switch screens or area types */ +static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHandler *handler, wmEvent *event) +{ + SpaceFile *sfile; + int action= WM_HANDLER_CONTINUE; + + if(event->type != EVT_FILESELECT) + return action; + if(handler->op != (wmOperator *)event->customdata) + return action; + + switch(event->val) { + case EVT_FILESELECT_OPEN: + case EVT_FILESELECT_FULL_OPEN: + { + int filetype= FILE_BLENDER; + char *path= RNA_string_get_alloc(handler->op->ptr, "filename", NULL, 0); + + if(RNA_struct_find_property(handler->op->ptr, "filetype")) + filetype= RNA_int_get(handler->op->ptr, "filetype"); + + if(event->val==EVT_FILESELECT_OPEN) + ED_area_newspace(C, handler->op_area, SPACE_FILE); + else + ED_screen_full_newspace(C, handler->op_area, SPACE_FILE); + + /* settings for filebrowser, sfile is not operator owner but sends events */ + sfile= (SpaceFile*)CTX_wm_space_data(C); + sfile->op= handler->op; + + ED_fileselect_set_params(sfile, filetype, handler->op->type->name, path, 0, 0, 0); + MEM_freeN(path); + + action= WM_HANDLER_BREAK; + } + break; + + case EVT_FILESELECT_EXEC: + case EVT_FILESELECT_CANCEL: + { + /* XXX validate area and region? */ + bScreen *screen= CTX_wm_screen(C); + char *path= RNA_string_get_alloc(handler->op->ptr, "filename", NULL, 0); + + if(screen != handler->filescreen) + ED_screen_full_prevspace(C); + else + ED_area_prevspace(C); + + /* remlink now, for load file case */ + BLI_remlink(handlers, handler); + + if(event->val==EVT_FILESELECT_EXEC) { + wm_handler_op_context(C, handler); + + /* a bit weak, might become arg for WM_event_fileselect? */ + /* XXX also extension code in image-save doesnt work for this yet */ + if(strncmp(handler->op->type->name, "Save", 4)==0) { + /* this gives ownership to pupmenu */ + uiPupMenuSaveOver(C, handler->op, path); + } + else { + handler->op->type->exec(C, handler->op); + WM_operator_free(handler->op); + } + + CTX_wm_area_set(C, NULL); + } + else + WM_operator_free(handler->op); + + wm_event_free_handler(handler); + MEM_freeN(path); + + action= WM_HANDLER_BREAK; + } + break; + } + + return action; +} + static int handler_boundbox_test(wmEventHandler *handler, wmEvent *event) { if(handler->bbwin) { @@ -742,6 +872,10 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) else if(handler->ui_handle) { action= wm_handler_ui_call(C, handler, event); } + else if(handler->type==WM_HANDLER_FILESELECT) { + /* screen context changes here */ + action= wm_handler_fileselect_call(C, handlers, handler, event); + } else { /* modal, swallows all */ action= wm_handler_operator_call(C, handlers, handler, event, NULL); @@ -930,6 +1064,49 @@ void wm_event_do_handlers(bContext *C) } } +/* ********** filesector handling ************ */ + +void WM_event_fileselect_event(bContext *C, void *ophandle, int eventval) +{ + /* add to all windows! */ + wmWindow *win; + + for(win= CTX_wm_manager(C)->windows.first; win; win= win->next) { + wmEvent event= *win->eventstate; + + event.type= EVT_FILESELECT; + event.val= eventval; + event.customdata= ophandle; // only as void pointer type check + + wm_event_add(win, &event); + } +} + +/* operator is supposed to have a filled "filename" property */ +/* optional property: filetype (XXX enum?) */ + +/* Idea is to keep a handler alive on window queue, owning the operator. + The filewindow can send event to make it execute, thus ensuring + executing happens outside of lower level queues, with UI refreshed. + Should also allow multiwin solutions */ + +void WM_event_add_fileselect(bContext *C, wmOperator *op) +{ + wmEventHandler *handler= MEM_callocN(sizeof(wmEventHandler), "fileselect handler"); + wmWindow *win= CTX_wm_window(C); + int full= 1; // XXX preset? + + handler->type= WM_HANDLER_FILESELECT; + handler->op= op; + handler->op_area= CTX_wm_area(C); + handler->op_region= CTX_wm_region(C); + handler->filescreen= CTX_wm_screen(C); + + BLI_addhead(&win->handlers, handler); + + WM_event_fileselect_event(C, op, full?EVT_FILESELECT_FULL_OPEN:EVT_FILESELECT_OPEN); +} + /* lets not expose struct outside wm? */ void WM_event_set_handler_flag(wmEventHandler *handler, int flag) { @@ -997,7 +1174,6 @@ void WM_event_remove_keymap_handler(ListBase *handlers, ListBase *keymap) if(handler->keymap==keymap) { BLI_remlink(handlers, handler); wm_event_free_handler(handler); - MEM_freeN(handler); break; } } @@ -1025,7 +1201,6 @@ void WM_event_remove_ui_handler(ListBase *handlers, wmUIHandlerFunc func, wmUIHa if(handler->ui_handle == func && handler->ui_remove == remove && handler->ui_userdata == userdata) { BLI_remlink(handlers, handler); wm_event_free_handler(handler); - MEM_freeN(handler); break; } } diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 484d97e7b71..1f9c335485d 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -84,7 +84,6 @@ #include "GHOST_C-api.h" #include "UI_interface.h" -#include "BLF_api.h" #include "GPU_draw.h" @@ -93,6 +92,7 @@ #include "WM_api.h" #include "WM_types.h" #include "wm.h" +#include "wm_window.h" /***/ @@ -325,21 +325,141 @@ static void init_userdef_themes(void) SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255); } } - if ((G.main->versionfile < 248) || (G.main->versionfile == 248 && G.main->subversionfile < 3)) { + if ((G.main->versionfile < 245) || (G.main->versionfile == 245 && G.main->subversionfile < 11)) { + bTheme *btheme; + for (btheme= U.themes.first; btheme; btheme= btheme->next) { + /* these should all use the same color */ + SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tnla.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tseq.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); + SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255); + } + } + if ((G.main->versionfile < 245) || (G.main->versionfile == 245 && G.main->subversionfile < 13)) { + bTheme *btheme; + for (btheme= U.themes.first; btheme; btheme= btheme->next) { + /* action channel groups (recolor anyway) */ + SETCOL(btheme->tact.group, 0x39, 0x7d, 0x1b, 255); + SETCOL(btheme->tact.group_active, 0x7d, 0xe9, 0x60, 255); + + /* bone custom-color sets */ + // FIXME: this check for initialised colors is bad + if (btheme->tarm[0].solid[3] == 0) { + /* set 1 */ + SETCOL(btheme->tarm[0].solid, 0x9a, 0x00, 0x00, 255); + SETCOL(btheme->tarm[0].select, 0xbd, 0x11, 0x11, 255); + SETCOL(btheme->tarm[0].active, 0xf7, 0x0a, 0x0a, 255); + /* set 2 */ + SETCOL(btheme->tarm[1].solid, 0xf7, 0x40, 0x18, 255); + SETCOL(btheme->tarm[1].select, 0xf6, 0x69, 0x13, 255); + SETCOL(btheme->tarm[1].active, 0xfa, 0x99, 0x00, 255); + /* set 3 */ + SETCOL(btheme->tarm[2].solid, 0x1e, 0x91, 0x09, 255); + SETCOL(btheme->tarm[2].select, 0x59, 0xb7, 0x0b, 255); + SETCOL(btheme->tarm[2].active, 0x83, 0xef, 0x1d, 255); + /* set 4 */ + SETCOL(btheme->tarm[3].solid, 0x0a, 0x36, 0x94, 255); + SETCOL(btheme->tarm[3].select, 0x36, 0x67, 0xdf, 255); + SETCOL(btheme->tarm[3].active, 0x5e, 0xc1, 0xef, 255); + /* set 5 */ + SETCOL(btheme->tarm[4].solid, 0xa9, 0x29, 0x4e, 255); + SETCOL(btheme->tarm[4].select, 0xc1, 0x41, 0x6a, 255); + SETCOL(btheme->tarm[4].active, 0xf0, 0x5d, 0x91, 255); + /* set 6 */ + SETCOL(btheme->tarm[5].solid, 0x43, 0x0c, 0x78, 255); + SETCOL(btheme->tarm[5].select, 0x54, 0x3a, 0xa3, 255); + SETCOL(btheme->tarm[5].active, 0x87, 0x64, 0xd5, 255); + /* set 7 */ + SETCOL(btheme->tarm[6].solid, 0x24, 0x78, 0x5a, 255); + SETCOL(btheme->tarm[6].select, 0x3c, 0x95, 0x79, 255); + SETCOL(btheme->tarm[6].active, 0x6f, 0xb6, 0xab, 255); + /* set 8 */ + SETCOL(btheme->tarm[7].solid, 0x4b, 0x70, 0x7c, 255); + SETCOL(btheme->tarm[7].select, 0x6a, 0x86, 0x91, 255); + SETCOL(btheme->tarm[7].active, 0x9b, 0xc2, 0xcd, 255); + /* set 9 */ + SETCOL(btheme->tarm[8].solid, 0xf4, 0xc9, 0x0c, 255); + SETCOL(btheme->tarm[8].select, 0xee, 0xc2, 0x36, 255); + SETCOL(btheme->tarm[8].active, 0xf3, 0xff, 0x00, 255); + /* set 10 */ + SETCOL(btheme->tarm[9].solid, 0x1e, 0x20, 0x24, 255); + SETCOL(btheme->tarm[9].select, 0x48, 0x4c, 0x56, 255); + SETCOL(btheme->tarm[9].active, 0xff, 0xff, 0xff, 255); + /* set 11 */ + SETCOL(btheme->tarm[10].solid, 0x6f, 0x2f, 0x6a, 255); + SETCOL(btheme->tarm[10].select, 0x98, 0x45, 0xbe, 255); + SETCOL(btheme->tarm[10].active, 0xd3, 0x30, 0xd6, 255); + /* set 12 */ + SETCOL(btheme->tarm[11].solid, 0x6c, 0x8e, 0x22, 255); + SETCOL(btheme->tarm[11].select, 0x7f, 0xb0, 0x22, 255); + SETCOL(btheme->tarm[11].active, 0xbb, 0xef, 0x5b, 255); + /* set 13 */ + SETCOL(btheme->tarm[12].solid, 0x8d, 0x8d, 0x8d, 255); + SETCOL(btheme->tarm[12].select, 0xb0, 0xb0, 0xb0, 255); + SETCOL(btheme->tarm[12].active, 0xde, 0xde, 0xde, 255); + /* set 14 */ + SETCOL(btheme->tarm[13].solid, 0x83, 0x43, 0x26, 255); + SETCOL(btheme->tarm[13].select, 0x8b, 0x58, 0x11, 255); + SETCOL(btheme->tarm[13].active, 0xbd, 0x6a, 0x11, 255); + /* set 15 */ + SETCOL(btheme->tarm[14].solid, 0x08, 0x31, 0x0e, 255); + SETCOL(btheme->tarm[14].select, 0x1c, 0x43, 0x0b, 255); + SETCOL(btheme->tarm[14].active, 0x34, 0x62, 0x2b, 255); + } + } + } + if ((G.main->versionfile < 245) || (G.main->versionfile == 245 && G.main->subversionfile < 16)) { + U.flag |= USER_ADD_VIEWALIGNED|USER_ADD_EDITMODE; + } + if ((G.main->versionfile < 247) || (G.main->versionfile == 247 && G.main->subversionfile <= 2)) { bTheme *btheme; /* adjust themes */ for (btheme= U.themes.first; btheme; btheme= btheme->next) { + char *col; + + /* IPO Editor: Handles/Vertices */ + col = btheme->tipo.vertex; + SETCOL(btheme->tipo.handle_vertex, col[0], col[1], col[2], 255); + col = btheme->tipo.vertex_select; + SETCOL(btheme->tipo.handle_vertex_select, col[0], col[1], col[2], 255); + btheme->tipo.handle_vertex_size= btheme->tipo.vertex_size; + + /* Sequence/Image Editor: colors for GPencil text */ + col = btheme->tv3d.bone_pose; + SETCOL(btheme->tseq.bone_pose, col[0], col[1], col[2], 255); + SETCOL(btheme->tima.bone_pose, col[0], col[1], col[2], 255); + col = btheme->tv3d.vertex_select; + SETCOL(btheme->tseq.vertex_select, col[0], col[1], col[2], 255); + } + } + if (G.main->versionfile < 250) { + bTheme *btheme; + + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + /* this was not properly initialized in 2.45 */ + if(btheme->tima.face_dot[3]==0) { + SETCOL(btheme->tima.editmesh_active, 255, 255, 255, 128); + SETCOL(btheme->tima.face_dot, 255, 133, 0, 255); + btheme->tima.facedot_size= 2; + } + /* DopeSheet - (Object) Channel color */ SETCOL(btheme->tact.ds_channel, 82, 96, 110, 255); SETCOL(btheme->tact.ds_subchannel, 124, 137, 150, 255); + /* DopeSheet - Group Channel color (saner version) */ + SETCOL(btheme->tact.group, 79, 101, 73, 255); + SETCOL(btheme->tact.group_active, 135, 177, 125, 255); /* Graph Editor - (Object) Channel color */ SETCOL(btheme->tipo.ds_channel, 82, 96, 110, 255); SETCOL(btheme->tipo.ds_subchannel, 124, 137, 150, 255); /* Graph Editor - Group Channel color */ - SETCOL(btheme->tipo.group, 22, 112, 0, 255); - SETCOL(btheme->tipo.group_active, 125, 233, 96, 255); + SETCOL(btheme->tipo.group, 79, 101, 73, 255); + SETCOL(btheme->tipo.group_active, 135, 177, 125, 255); } /* adjust grease-pencil distances */ @@ -349,18 +469,6 @@ static void init_userdef_themes(void) /* adjust default interpolation for new IPO-curves */ U.ipo_new= BEZT_IPO_BEZ; } - if (G.main->versionfile < 250) { - bTheme *btheme; - - /* this was not properly initialized in 2.45 */ - for(btheme= U.themes.first; btheme; btheme= btheme->next) { - if(btheme->tima.face_dot[3]==0) { - SETCOL(btheme->tima.editmesh_active, 255, 255, 255, 128); - SETCOL(btheme->tima.face_dot, 255, 133, 0, 255); - btheme->tima.facedot_size= 2; - } - } - } /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { @@ -521,6 +629,7 @@ void WM_read_file(bContext *C, char *name, ReportList *reports) wm_window_match_init(C, &wmbase); retval= BKE_read_file(C, name, NULL, reports); + G.save_over = 1; /* match the read WM with current WM */ wm_window_match_do(C, &wmbase); @@ -586,7 +695,7 @@ int WM_read_homefile(bContext *C, wmOperator *op) wm_check(C); /* opens window(s), checks keymaps */ strcpy(G.sce, scestr); /* restore */ - + init_userdef_themes(); /* When loading factory settings, the reset solid OpenGL lights need to be applied. */ @@ -596,8 +705,6 @@ int WM_read_homefile(bContext *C, wmOperator *op) G.save_over = 0; // start with save preference untitled.blend G.fileflags &= ~G_FILE_AUTOPLAY; /* disable autoplay in .B.blend... */ // mainwindow_set_filename_to_title(""); // empty string re-initializes title to "Blender" - - BLF_lang_init(); // refresh_interface_font(); @@ -865,10 +972,8 @@ void WM_write_file(bContext *C, char *target, ReportList *reports) G.relbase_valid = 1; strcpy(G.main->name, di); /* is guaranteed current file */ -// XXX mainwindow_set_filename_to_title(G.main->name); - - G.save_over = 1; - + G.save_over = 1; /* disable untitled.blend convention */ + writeBlog(); } @@ -888,6 +993,8 @@ int WM_write_homefile(bContext *C, wmOperator *op) BLO_write_file(CTX_data_main(C), tstr, write_flags, op->reports); + G.save_over= 0; + return OPERATOR_FINISHED; } diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 9f56cfa9bd1..9c13a321cf1 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -121,6 +121,9 @@ void WM_init(bContext *C) ED_file_init(); /* for fsmenu */ ED_init_node_butfuncs(); + BLF_init(); + BLF_lang_init(); + /* get the default database, plus a wm */ WM_read_homefile(C, NULL); @@ -223,8 +226,10 @@ void WM_exit(bContext *C) // free_imagepaint(); // fsmenu_free(); - + + BLF_exit(); BLF_lang_exit(); + RE_FreeAllRender(); // free_txt_data(); diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index 40a72034d26..31c3a803246 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -249,6 +249,17 @@ void WM_jobs_stop_all(wmWindowManager *wm) BLI_freelistN(&wm->jobs); } +/* stops job(s) from this owner */ +void WM_jobs_stop(wmWindowManager *wm, void *owner) +{ + wmJob *steve; + + for(steve= wm->jobs.first; steve; steve= steve->next) + if(steve->owner==owner) + if(steve->running) + steve->stop= 1; +} + /* hardcoded to event TIMERJOBS */ static int wm_jobs_timer(bContext *C, wmOperator *op, wmEvent *evt) { diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index eb0d9d312e9..b310fb81216 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -53,7 +53,6 @@ #include "BIF_glutil.h" /* for paint cursor */ #include "IMB_imbuf_types.h" -#include "ED_fileselect.h" #include "ED_screen.h" #include "RNA_access.h" @@ -235,17 +234,9 @@ int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event) { if (RNA_property_is_set(op->ptr, "filename")) { return WM_operator_call(C, op); - } else { - SpaceFile *sfile; - - ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_FILE); - - /* settings for filebrowser */ - sfile= (SpaceFile*)CTX_wm_space_data(C); - sfile->op = op; - ED_fileselect_set_params(sfile, FILE_BLENDER, op->type->name, "", 0, 0, 0); - - /* screen and area have been reset already in ED_screen_full_newspace */ + } + else { + WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; } } @@ -353,25 +344,29 @@ static void WM_OT_open_recentfile(wmOperatorType *ot) /* ********* main file *********** */ -static int wm_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) +static void untitled(char *name) { - SpaceFile *sfile; - - if(0==ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_FILE)) - return OPERATOR_CANCELLED; + if (G.save_over == 0 && strlen(name) < FILE_MAX-16) { + char *c= BLI_last_slash(name); + + if (c) + strcpy(&c[1], "untitled.blend"); + else + strcpy(name, "untitled.blend"); + } +} - /* settings for filebrowser */ - sfile= (SpaceFile*)CTX_wm_space_data(C); - sfile->op = op; - // XXX replace G.sce - ED_fileselect_set_params(sfile, FILE_BLENDER, "Load", G.sce, 0, 0, 0); - /* screen and area have been reset already in ED_screen_full_newspace */ +static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + + RNA_string_set(op->ptr, "filename", G.sce); + WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; } -static int wm_mainfile_exec(bContext *C, wmOperator *op) +static int wm_open_mainfile_exec(bContext *C, wmOperator *op) { char filename[FILE_MAX]; RNA_string_get(op->ptr, "filename", filename); @@ -390,8 +385,8 @@ static void WM_OT_open_mainfile(wmOperatorType *ot) ot->name= "Open Blender File"; ot->idname= "WM_OT_open_mainfile"; - ot->invoke= wm_mainfile_invoke; - ot->exec= wm_mainfile_exec; + ot->invoke= wm_open_mainfile_invoke; + ot->exec= wm_open_mainfile_exec; ot->poll= WM_operator_winactive; ot->flag= 0; @@ -402,17 +397,13 @@ static void WM_OT_open_mainfile(wmOperatorType *ot) static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceFile *sfile; + char name[FILE_MAX]; - ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_FILE); - - /* settings for filebrowser */ - sfile= (SpaceFile*)CTX_wm_space_data(C); - sfile->op = op; - // XXX replace G.sce - ED_fileselect_set_params(sfile, FILE_BLENDER, "Save As", G.sce, 0, 0, 0); - - /* screen and area have been reset already in ED_screen_full_newspace */ + BLI_strncpy(name, G.sce, FILE_MAX); + untitled(name); + RNA_string_set(op->ptr, "filename", name); + + WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; } @@ -421,11 +412,16 @@ static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *even static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op) { char filename[FILE_MAX]; - RNA_string_get(op->ptr, "filename", filename); + if(RNA_property_is_set(op->ptr, "filename")) + RNA_string_get(op->ptr, "filename", filename); + else { + BLI_strncpy(filename, G.sce, FILE_MAX); + untitled(filename); + } WM_write_file(C, filename, op->reports); - WM_event_add_notifier(C, NC_WINDOW, NULL); + WM_event_add_notifier(C, NC_WM|ND_FILESAVE, NULL); return 0; } @@ -449,9 +445,12 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot) static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event) { + char name[FILE_MAX]; - RNA_string_set(op->ptr, "filename", G.sce); - uiPupMenuSaveOver(C, op, G.sce); + BLI_strncpy(name, G.sce, FILE_MAX); + untitled(name); + RNA_string_set(op->ptr, "filename", name); + uiPupMenuSaveOver(C, op, name); return OPERATOR_RUNNING_MODAL; } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 67eb043b1cf..43871ba5a7f 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -28,6 +28,7 @@ #include #include +#include #include "DNA_listBase.h" #include "DNA_screen_types.h" @@ -180,6 +181,33 @@ static void wm_window_close(bContext *C, wmWindow *win) WM_exit(C); } +void wm_window_title(wmWindowManager *wm, wmWindow *win) +{ + /* this is set to 1 if you don't have .B.blend open */ + if(G.save_over) { + char *str= MEM_mallocN(strlen(G.sce) + 16, "title"); + + if(wm->file_saved) + sprintf(str, "Blender [%s]", G.sce); + else + sprintf(str, "Blender* [%s]", G.sce); + + GHOST_SetTitle(win->ghostwin, str); + + MEM_freeN(str); + } + else + GHOST_SetTitle(win->ghostwin, "Blender"); + +#ifdef __APPLE__ + if(wm->file_saved) + GHOST_SetWindowState(win->ghostwin, GHOST_kWindowStateUnModified); + else + GHOST_SetWindowState(win->ghostwin, GHOST_kWindowStateModified); +#endif + +} + /* belongs to below */ static void wm_window_add_ghostwindow(wmWindowManager *wm, char *title, wmWindow *win) { @@ -220,6 +248,8 @@ static void wm_window_add_ghostwindow(wmWindowManager *wm, char *title, wmWindow glClear(GL_COLOR_BUFFER_BIT); wm_window_swap_buffers(win); + //GHOST_SetWindowState(ghostwin, GHOST_kWindowStateModified); + /* standard state vars for window */ glEnable(GL_SCISSOR_TEST); @@ -267,7 +297,6 @@ void wm_window_add_ghostwindows(wmWindowManager *wm) if(win->eventstate==NULL) win->eventstate= MEM_callocN(sizeof(wmEvent), "window event state"); - /* add keymap handlers (1 handler for all keys in map!) */ keymap= WM_keymap_listbase(wm, "Window", 0, 0); WM_event_add_keymap_handler(&win->handlers, keymap); @@ -275,6 +304,7 @@ void wm_window_add_ghostwindows(wmWindowManager *wm) keymap= WM_keymap_listbase(wm, "Screen", 0, 0); WM_event_add_keymap_handler(&win->handlers, keymap); + wm_window_title(wm, win); } } @@ -511,7 +541,8 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) /* This timer system only gives maximum 1 timer event per redraw cycle, to prevent queues to get overloaded. Timer handlers should check for delta to decide if they just - update, or follow real time + update, or follow real time. + Timer handlers can also set duration to match frames passed */ static int wm_window_timer(const bContext *C) { @@ -632,11 +663,6 @@ void WM_event_remove_window_timer(wmWindow *win, wmTimer *timer) /* ************************************ */ -void wm_window_set_title(wmWindow *win, char *title) -{ - GHOST_SetTitle(win->ghostwin, title); -} - void wm_window_get_position(wmWindow *win, int *posx_r, int *posy_r) { *posx_r= win->posx; diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h index d6899d47471..930f20dfa63 100644 --- a/source/blender/windowmanager/wm_event_system.h +++ b/source/blender/windowmanager/wm_event_system.h @@ -59,6 +59,9 @@ typedef struct wmEventHandler { struct ScrArea *ui_area; /* for derived/modal handlers */ struct ARegion *ui_region; /* for derived/modal handlers */ + /* fileselect handler re-uses modal operator data */ + struct bScreen *filescreen; /* screen it started in, to validate exec */ + } wmEventHandler; @@ -71,7 +74,7 @@ typedef struct wmEventHandler { /* custom types for handlers, for signalling, freeing */ enum { WM_HANDLER_DEFAULT, - WM_HANDLER_TRANSFORM + WM_HANDLER_FILESELECT }; diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index a3bf0ca728f..9b9af1844b6 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -40,6 +40,11 @@ #define EVT_DATA_GESTURE 2 #define EVT_DATA_TIMER 3 +/* tablet active */ +#define EVT_TABLET_NONE 0 +#define EVT_TABLET_STYLUS 1 +#define EVT_TABLET_ERASER 2 + #define MOUSEX 0x004 #define MOUSEY 0x005 @@ -60,16 +65,7 @@ /* SYSTEM : 0x01x */ -#define KEYBD 0x0100 /* keyboard */ -#define RAWKEYBD 0x0101 /* raw keyboard for keyboard manager */ -#define REDRAW 0x0102 /* used by port manager to signal redraws */ #define INPUTCHANGE 0x0103 /* input connected or disconnected */ -#define QFULL 0x0104 /* queue was filled */ -#define WINFREEZE 0x0105 /* user wants process in this win to shut up */ -#define WINTHAW 0x0106 /* user wants process in this win to go again */ -#define WINCLOSE 0x0107 /* window close */ -#define WINQUIT 0x0108 /* signal from user that app is to go away */ -#define Q_FIRSTTIME 0x0109 /* on startup */ #define TIMER 0x0110 /* timer event, passed on to all queues */ #define TIMER0 0x0111 /* timer event, slot for internal use */ @@ -196,69 +192,6 @@ /* for event checks */ #define ISKEYBOARD(event) (event >='a' && event <=255) - -/* **************** BLENDER QUEUE EVENTS ********************* */ - -#define CHANGED 0x4000 -#define DRAWEDGES 0x4001 -#define AFTERQUEUE 0x4002 -#define BACKBUFDRAW 0x4003 -#define EXECUTE 0x4004 -#define IGNORE_REDRAW 0x4005 -#define LOAD_FILE 0x4006 -#define RESHAPE 0x4007 -#define UI_BUT_EVENT 0x4008 -#define AUTOSAVE_FILE 0x4009 -#define UNDOPUSH 0x400A - -/* REDRAWVIEW3D has to be the first one (lowest number) for buttons! */ -#define REDRAWVIEW3D 0x4010 -#define REDRAWVIEWCAM 0x4011 -#define REDRAWVIEW3D_Z 0x4012 - -#define REDRAWALL 0x4013 -#define REDRAWHEADERS 0x4014 - -#define REDRAWBUTSHEAD 0x4015 -#define REDRAWBUTSALL 0x4016 - -#define REDRAWBUTSSCENE 0x4017 -#define REDRAWBUTSOBJECT 0x4018 -#define REDRAWBUTSEDIT 0x4019 -#define REDRAWBUTSSCRIPT 0x401A -#define REDRAWBUTSLOGIC 0x401B -#define REDRAWBUTSSHADING 0x401C -#define REDRAWBUTSGAME 0x401D -#define REDRAWBUTSEFFECTS 0x401D - -#define REDRAWINFO 0x4021 -#define RENDERPREVIEW 0x4022 -#define REDRAWIPO 0x4023 -#define REDRAWDATASELECT 0x4024 -#define REDRAWSEQ 0x4025 -#define REDRAWIMAGE 0x4026 -#define REDRAWOOPS 0x4027 -#define REDRAWIMASEL 0x4028 -#define AFTERIMASELIMA 0x4029 -#define AFTERIMASELGET 0x402A -#define AFTERIMAWRITE 0x402B -#define IMALEFTMOUSE 0x402C -#define AFTERPIBREAD 0x402D -#define REDRAWTEXT 0x402E -#define REDRAWSOUND 0x402F -#define REDRAWACTION 0x4030 -#define REDRAWNLA 0x4031 -#define REDRAWSCRIPT 0x4032 -#define REDRAWTIME 0x4033 -#define REDRAWBUTSCONSTRAINT 0x4034 -#define ONLOAD_SCRIPT 0x4035 -#define SCREEN_HANDLER 0x4036 -#define REDRAWANIM 0x4037 -#define REDRAWNODE 0x4038 -#define RECALC_COMPOSITE 0x4039 -#define REDRAWMARKER 0x4040 /* all views that display markers */ -#define REDRAWVIEW3D_IMAGE 0x4041 - /* **************** BLENDER GESTURE EVENTS ********************* */ #define EVT_ACTIONZONE 0x5001 @@ -270,8 +203,6 @@ #define EVT_TWEAK_A 0x5005 #define EVT_TWEAK_S 0x5006 - - #define EVT_GESTURE 0x5010 /* value of tweaks and line gestures, note, KM_ANY (-1) works for this case too */ @@ -293,5 +224,17 @@ #define EVT_GESTURE_W_S 15 #define EVT_GESTURE_W_N 16 +/* **************** OTHER BLENDER EVENTS ********************* */ + +/* event->type */ +#define EVT_FILESELECT 0x5020 + +/* event->val */ +#define EVT_FILESELECT_OPEN 1 +#define EVT_FILESELECT_FULL_OPEN 2 +#define EVT_FILESELECT_EXEC 3 +#define EVT_FILESELECT_CANCEL 4 + + #endif /* WM_EVENT_TYPES_H */ diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h index 86ceac9203e..f386510a2eb 100644 --- a/source/blender/windowmanager/wm_window.h +++ b/source/blender/windowmanager/wm_window.h @@ -36,6 +36,8 @@ void wm_ghost_init (bContext *C); wmWindow *wm_window_new (bContext *C); void wm_window_free (bContext *C, wmWindow *win); + +void wm_window_title (wmWindowManager *wm, wmWindow *win); void wm_window_add_ghostwindows (wmWindowManager *wm); void wm_window_process_events (const bContext *C); diff --git a/source/creator/SConscript b/source/creator/SConscript index 6c36a8f5b41..805de4601a4 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -30,4 +30,4 @@ if env['WITH_BF_PYTHON']: else: defs.append('DISABLE_PYTHON') -env.BlenderLib ( libname = 'bf_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 0 ) +env.BlenderLib ( libname = 'bf_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 154 ) diff --git a/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h b/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h index ba3095d4f38..7da4b9efb68 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h +++ b/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h @@ -38,6 +38,8 @@ #include "wm_event_types.h" #include "SCA_IInputDevice.h" + + /** Base Class for Blender specific inputdevices. Blender specific inputdevices are used when the gameengine is running in embedded mode instead of standalone mode. */ @@ -65,8 +67,9 @@ public: m_reverseKeyTranslateTable[TIMER1 ] = KX_TIMER1 ; m_reverseKeyTranslateTable[TIMER2 ] = KX_TIMER2 ; - // SYSTEM - + // SYSTEM +#if 0 + /* **** XXX **** */ m_reverseKeyTranslateTable[KEYBD ] = KX_KEYBD ; m_reverseKeyTranslateTable[RAWKEYBD ] = KX_RAWKEYBD ; m_reverseKeyTranslateTable[REDRAW ] = KX_REDRAW ; @@ -77,7 +80,8 @@ public: m_reverseKeyTranslateTable[WINCLOSE ] = KX_WINCLOSE ; m_reverseKeyTranslateTable[WINQUIT ] = KX_WINQUIT ; m_reverseKeyTranslateTable[Q_FIRSTTIME ] = KX_Q_FIRSTTIME ; - + /* **** XXX **** */ +#endif // standard keyboard m_reverseKeyTranslateTable[AKEY ] = KX_AKEY ; diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp index ae2842076a6..b7b47b3b39f 100644 --- a/source/gameengine/Converter/KX_ConvertSensors.cpp +++ b/source/gameengine/Converter/KX_ConvertSensors.cpp @@ -123,6 +123,8 @@ void BL_ConvertSensors(struct Object* blenderobject, // SYSTEM +#if 0 + /* **** XXX **** */ gReverseKeyTranslateTable[KEYBD ] = SCA_IInputDevice::KX_KEYBD; gReverseKeyTranslateTable[RAWKEYBD ] = SCA_IInputDevice::KX_RAWKEYBD; gReverseKeyTranslateTable[REDRAW ] = SCA_IInputDevice::KX_REDRAW; @@ -133,7 +135,8 @@ void BL_ConvertSensors(struct Object* blenderobject, gReverseKeyTranslateTable[WINCLOSE ] = SCA_IInputDevice::KX_WINCLOSE; gReverseKeyTranslateTable[WINQUIT ] = SCA_IInputDevice::KX_WINQUIT; gReverseKeyTranslateTable[Q_FIRSTTIME ] = SCA_IInputDevice::KX_Q_FIRSTTIME; - + /* **** XXX **** */ +#endif // standard keyboard gReverseKeyTranslateTable[AKEY ] = SCA_IInputDevice::KX_AKEY; diff --git a/source/nan_compile.mk b/source/nan_compile.mk index 19d833b5b0d..0ac712b3a18 100644 --- a/source/nan_compile.mk +++ b/source/nan_compile.mk @@ -89,7 +89,7 @@ ifeq ($(OS),darwin) CFLAGS += -pipe -fPIC -ffast-math -march=pentium-m -funsigned-char -fno-strict-aliasing CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing endif -# REL_CFLAGS += -O2 + REL_CFLAGS += -O # REL_CCFLAGS += -O2 CPPFLAGS += -D_THREAD_SAFE NAN_DEPEND = true