Full Chapter Core Blender Development Understanding The Essential Source Code Brad E Hollister PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

Core Blender Development:

Understanding the Essential Source


Code Brad E. Hollister
Visit to download the full and correct content document:
https://textbookfull.com/product/core-blender-development-understanding-the-essenti
al-source-code-brad-e-hollister/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Core Blender Development: Understanding the Essential


Source Code 1st Edition Brad E. Hollister

https://textbookfull.com/product/core-blender-development-
understanding-the-essential-source-code-1st-edition-brad-e-
hollister/

Neuroimaging, Software, and Communication: The Social


Code of Source Code Edison Bicudo

https://textbookfull.com/product/neuroimaging-software-and-
communication-the-social-code-of-source-code-edison-bicudo/

Understanding Business The Core 1st Edition William G.


Nickels

https://textbookfull.com/product/understanding-business-the-
core-1st-edition-william-g-nickels/

Source Code Analytics With Roslyn and JavaScript Data


Visualization Mukherjee

https://textbookfull.com/product/source-code-analytics-with-
roslyn-and-javascript-data-visualization-mukherjee/
C 8 0 and NET Core 3 0 Modern Cross Platform
Development Build applications with C NET Core Entity
Framework Core ASP NET Core and ML NET using Visual
Studio Code 4th Edition Mark J. Price
https://textbookfull.com/product/c-8-0-and-net-core-3-0-modern-
cross-platform-development-build-applications-with-c-net-core-
entity-framework-core-asp-net-core-and-ml-net-using-visual-
studio-code-4th-edition-mark-j-price/

Essential Angular for ASP.NET Core MVC 3 Adam Freeman

https://textbookfull.com/product/essential-angular-for-asp-net-
core-mvc-3-adam-freeman/

Write Great Code Understanding the Machine 2nd Edition


Randall Hyde

https://textbookfull.com/product/write-great-code-understanding-
the-machine-2nd-edition-randall-hyde/

The Blender Python API: Precision 3D Modeling and Add-


on Development 1st Edition Chris Conlan

https://textbookfull.com/product/the-blender-python-api-
precision-3d-modeling-and-add-on-development-1st-edition-chris-
conlan/

Essential Docker for ASP.NET Core MVC 1st Edition Adam


Freeman

https://textbookfull.com/product/essential-docker-for-asp-net-
core-mvc-1st-edition-adam-freeman/
Core Blender
Development
Understanding the Essential
Source Code

Brad E. Hollister
Core Blender
Development
Understanding the Essential
Source Code

Brad E. Hollister
Core Blender Development: Understanding the Essential Source Code
Brad E. Hollister
Computer Science Department, CSUDH, Carson, CA, USA

ISBN-13 (pbk): 978-1-4842-6414-0 ISBN-13 (electronic): 978-1-4842-6415-7


https://doi.org/10.1007/978-1-4842-6415-7

Copyright © 2021 by Brad E. Hollister


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole
or part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical
way, and transmission or information storage and retrieval, electronic adaptation, computer
software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a
trademark symbol with every occurrence of a trademarked name, logo, or image we use the
names, logos, and images only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms,
even if they are not identified as such, is not to be taken as an expression of opinion as to
whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the
date of publication, neither the authors nor the editors nor the publisher can accept any
legal responsibility for any errors or omissions that may be made. The publisher makes no
warranty, express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Natalie Pao
Development Editor: James Markham
Coordinating Editor: Jessica Vakili
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1
NY Plaza, New York, NY 10014. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail
orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a
California LLC and the sole member (owner) is Springer Science + Business Media Finance
Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail booktranslations@springernature.com; for
reprint, paperback, or audio rights, please e-mail bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our
Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is
available to readers on GitHub via the book's product page, located at www.apress.com/
978-1-4842-6414-0. For more detailed information, please visit http://www.apress.com/
source-code.
Printed on acid-free paper
Table of Contents
About the Author��������������������������������������������������������������������������������vii

Chapter 1: Intro to the “Core” Blender Source Code����������������������������1


The Blender Project�����������������������������������������������������������������������������������������������1
Official Documentation������������������������������������������������������������������������������������2
Communication Channels��������������������������������������������������������������������������������3
The Blender Source Tree���������������������������������������������������������������������������������������4
The Blender CMake Build System�������������������������������������������������������������������������9
The Basics�������������������������������������������������������������������������������������������������������9
Module Build Options������������������������������������������������������������������������������������12
A Representative Code Example�������������������������������������������������������������������������15
Geometric Modeling and Operators���������������������������������������������������������������15
Blender’s Event Loop�������������������������������������������������������������������������������������21
Road Map for the Remainder of the Book�����������������������������������������������������������23
What Will Not Be Covered������������������������������������������������������������������������������23
What Will Be Covered������������������������������������������������������������������������������������24

Chapter 2: Blender “DNA” and Serialization���������������������������������������25


Blend File Overview��������������������������������������������������������������������������������������������25
What Does the Blend File Contain?���������������������������������������������������������������25
Using the BlendFileReader.py Script�������������������������������������������������������������26
A Closer Look at the makesdna Module��������������������������������������������������������������31

iii
Table of Contents

Blend File Loading Trace in Core Blender: A First Encounter������������������������������34


The struct bContext and struct Main Types���������������������������������������������������34
Initialization of SDNA, Global, and the windowmanager��������������������������������38
From the Kernel to the Loader�����������������������������������������������������������������������41
Reading the In-Memory startup.blend File����������������������������������������������������45
Summary������������������������������������������������������������������������������������������������������������54

Chapter 3: ghost: Soul of the windowmanager Module���������������������55


The Generic Handy Operating System Toolkit (ghost)�����������������������������������������56
Overview��������������������������������������������������������������������������������������������������������56
Initialization���������������������������������������������������������������������������������������������������58
Header Files���������������������������������������������������������������������������������������������������59
Minimal OpenGL Program Written in C Using ghost��������������������������������������74
windowManager Revisit��������������������������������������������������������������������������������������77
windowManager’s ghost-Related Files���������������������������������������������������������77
ghost Initialization and Event Registration����������������������������������������������������79
Summary������������������������������������������������������������������������������������������������������������82

Chapter 4: The blenlib and blenkernel Modules���������������������������������83


Overview of blenlib���������������������������������������������������������������������������������������������84
Google Test����������������������������������������������������������������������������������������������������85
Running Tests������������������������������������������������������������������������������������������������86
blenlib’s Unit Tests�����������������������������������������������������������������������������������������87
blenlib’s API���������������������������������������������������������������������������������������������������89
Overview of blenkernel�������������������������������������������������������������������������������������101
DNA Types and blenkernel���������������������������������������������������������������������������103
blenkernel API Examples�����������������������������������������������������������������������������105
Summary����������������������������������������������������������������������������������������������������������109

iv
Table of Contents

Chapter 5: Blender’s Embedded Python�������������������������������������������111


The Blender python Module������������������������������������������������������������������������������111
Source Files and Directories�����������������������������������������������������������������������112
The python module API��������������������������������������������������������������������������������113
Extending and Embedding Python��������������������������������������������������������������������114
Adding Python Extensions���������������������������������������������������������������������������115
The mathutils Extension Module�����������������������������������������������������������������������119
Implementation of the mathutils.Vector Class���������������������������������������������121
VectorObject������������������������������������������������������������������������������������������������122
Adding Methods to vector_Type������������������������������������������������������������������123
Vector_new()’s Implementation�������������������������������������������������������������������124
Vector_normalize()’s Implementation����������������������������������������������������������129
Other mathutils.Vector Methods������������������������������������������������������������������130
Submodules in mathutils�����������������������������������������������������������������������������132
Summary����������������������������������������������������������������������������������������������������������135

Chapter 6: Blender “RNA” and the Data API�������������������������������������137


The Blender makesrna Module�������������������������������������������������������������������������138
Runtime vs. Non-runtime Code�������������������������������������������������������������������138
Repository “RNA” Code��������������������������������������������������������������������������������139
Generated “RNA” Code��������������������������������������������������������������������������������155
Setting Blender “DNA” Using “RNA”������������������������������������������������������������������157
wmOperatorType�����������������������������������������������������������������������������������������157
Adding a Light���������������������������������������������������������������������������������������������158
The python Module and Blender “RNA”������������������������������������������������������������168
Summary����������������������������������������������������������������������������������������������������������171

v
Table of Contents

Chapter 7: The editors Module, Operators, and Event System���������173


Editors���������������������������������������������������������������������������������������������������������������173
Directory Layout and Files���������������������������������������������������������������������������174
Editor Structs: The “Space” Types���������������������������������������������������������������177
Editor Registration���������������������������������������������������������������������������������������180
windowmanager Revisit: Windows, “Screens,” “Areas,” and “Regions”�����������182
Blender’s Operators������������������������������������������������������������������������������������������189
The Operator Structs: wmOperatorType and wmOperator���������������������������190
The exec and poll Callbacks������������������������������������������������������������������������193
Operator Registration����������������������������������������������������������������������������������195
Event Distribution����������������������������������������������������������������������������������������197
Summary����������������������������������������������������������������������������������������������������������204

Chapter 8: Editor Creation����������������������������������������������������������������207


Drawing Editors from WM_main()���������������������������������������������������������������������207
Adding a Custom Editor������������������������������������������������������������������������������������212
Editor Registration���������������������������������������������������������������������������������������216
Editor Regions���������������������������������������������������������������������������������������������221
Operator Registration and Definition�����������������������������������������������������������225
Header Buttons��������������������������������������������������������������������������������������������227
File Changes for the Tutorial Editor�������������������������������������������������������������229
The User Interface API���������������������������������������������������������������������������������������230
Headers�������������������������������������������������������������������������������������������������������231
The UI_* API Implementation Files��������������������������������������������������������������234
Summary����������������������������������������������������������������������������������������������������������236

Index�������������������������������������������������������������������������������������������������239

vi
About the Author
Brad E. Hollister holds a PhD from the University of California Santa Cruz
in computer science. His research includes scientific visualization and
virtual reality for training. Dr. Hollister is also faculty adviser for the Open-
Source Mozilla Campus Club at the California State University Dominguez
Hills.

vii
CHAPTER 1

Intro to the “Core”


Blender Source Code
The goal of this chapter is to familiarize you with the Blender “core”
source1, and is intended to be the starting point for the rest of the book.
Blender’s codebase is written primarily in the C programming language.
Part of this introduction is a preliminary discussion of Blender’s CMake
build system. Additionally, we provide an execution trace of how Blender
registers an operator, and of the execution of its callback. Much of this
book will be easier to digest, if you make an effort to browse the source
code in a text editor—ideally, after reading the associated passage. If you
have not yet downloaded and compiled the Blender source code, you will
eventually want to do so. However, this chapter may be read first.

The Blender Project


Throughout this book, we do not want to merely replicate the wealth
of information already present at https://developer.blender.org.
Nonetheless, we direct your attention to these valuable resources at the
appropriate times. You should use those external documents in support of,
and in tandem with, the material of this text.

1
 t the time of writing, version 2.90 was just released. The book was started while
A
2.83 was still current. However, the core principles of the Blender codebase have
remained consistent over time. The book’s code repository is based on the master
branch Git revision (SHA1 ID) 28fca2c588fdfb44919ec82eddab19d8cf2e8c9e.

© Brad E. Hollister 2021 1


B. E. Hollister, Core Blender Development,
https://doi.org/10.1007/978-1-4842-6415-7_1
Chapter 1 Intro to the “Core” Blender Source Code

We endeavor to provide a separate perspective from the official guides.


This book’s goals are the following:
• To fill in “missing” parts of the Blender Foundation’s
documentation
• To present a simpler starting point in becoming a
Blender “core” developer
• To go beyond existing documentation, so as to jump-­
start your efforts
Such experience could otherwise only be gained by direct inspection
(and significant experimentation) of the source code. Ultimately, as you
progress, that approach will be necessary as well.

O
 fficial Documentation
The official developer site is available at https://developer.blender.org
(see Figure 1-1). There you will find the Blender Foundation’s Phabricator
site, responsible for being a portal to their code repositories, bug tracker,
developer documents, etc.

Figure 1-1. The Blender Foundation’s portal for developers:


https://developer.blender.org

2
Chapter 1 Intro to the “Core” Blender Source Code

As aspects can change concerning how to clone and build Blender, and
building is both platform specific and configurable, the best way to obtain
up-to-date instructions is to visit https://developer.blender.org.

C
 ommunication Channels
It is helpful to speak with developers actively working on the core source
code. While the Blender developer community maintains an Internet Relay
Chat (IRC) room, located on Freenode in the channel #blendercoders, the
latest way to interact in real-time is on https://blender.chat. #blender-­
coders is the relevant channel there, for developers (Figure 1-2).

Figure 1-2. Blender’s browser-based chat server interface

As with most open source projects, Blender has an email list. This
provides another key resource for communication with the Blender
developer community. To post a message for “core” developers to read,
and potentially answer, the email address is bf-committers@blender.org
(see Figure 1-3). This is the appropriate list for developers (and, hopefully,
eventually committers), as there are other mailing lists dedicated only to
users, and other aspects of the Blender project apart from development.

3
Chapter 1 Intro to the “Core” Blender Source Code

Figure 1-3. Bf-committers subscription web page. This sign-up page


is accessible from the official Blender project wiki

The Blender Source Tree


To begin, you should become familiar with three essential documents.
These are

• https://wiki.blender.org/wiki/Reference/
FAQ, which is unfortunately not found in the source
distribution itself. It contains information on what
Blender “DNA” and “RNA” are, along with the datatoc
module.

• The second is the wiki description of the source code


modules, https://wiki.blender.org/wiki/Source/
File_Structure.

• Third is the slightly out-of-date www.blender.org/bf/


codelayout.jpg. Inaccuracies are due to omission of
newer modules.

4
Chapter 1 Intro to the “Core” Blender Source Code

There are other important documents that we will mention. But for
starters, you should at least read the aforementioned material.
The key aspect of the codelayout.jpg information is the calling
hierarchy of the modules. “Modules” in the Blender Project’s parlance
represent directories containing code related to a particular set of
functions (much as a component is, in an object-oriented design). Some
modules have interfaces for client modules. The Blender terminology for
these interfaces is module “APIs.”
The easiest way to begin browsing Blender’s source is by using
the project’s repository server: https://developer.blender.org/
diffusion/B/. There, you will also find the latest instructions on cloning
the git repository.2
Start by looking at the top-level directory in the repository (Figure 1-4).
The “core” Blender source code is in source/ (Figure 1-5).

2
I f any of the URLs become broken, it is suggested to use https://developer.
blender.org as a starting point to finding the source, etc. The primary developer
site is likely to remain stable.

5
Chapter 1 Intro to the “Core” Blender Source Code

Figure 1-4. The Eclipse IDE’s “project explorer” view, from the
CMake generated .proj. We can see that Blender contains many more
directories than those of the “core” source code, located in source/.
There is a directory for unit tests, that is, tests/. And, doc/ is for
documentation. We will stay focused on source/, and go beyond it
only when required

Libraries not considered “core,” but maintained by Blender, are in


the intern directory. Notably, the ghost module is located there. We will,
however, talk more about ghost (Generic Handy Operating System Toolkit)
as it provides an abstraction to the underlying platform.

6
Chapter 1 Intro to the “Core” Blender Source Code

Figure 1-5. The Eclipse IDE’s “project explorer” view of source/.


Note that in codelayout.jpg and https://wiki.blender.org/wiki/
Source/File_Structure, this path would be written as blender/source/.
Most of the official documents refer to the repository’s directory as
blender/. However, during cloning with git, you can name this directory

Also in intern is an internal module called guardedalloc. This module


wraps the dynamic memory allocation functions from the C standard
library. The allocation functions are of the form:

MEM_[mc]allocN(unsigned int len, char * str)

Whenever Blender dynamically allocates (or deallocates) memory, you


will see the MEM_* API being used instead of malloc, calloc, etc. The MEM_*
API prototypes are available from [Source Directory]/intern/guardedalloc/
MEM_guardedalloc.h.

Note The [Source Directory]/doc/guides/ directory contains


additional official documentation on guardedalloc and the user
interface API. The two text files are blender-guardedalloc.txt and
interface_API.txt. We will talk more about the UI_* API in Chapter 8.
Much of the interface_API.txt document is now obsolete, but still
contains useful information.

There are modules that we will not concern ourselves with, due
to the scope of the codebase. Therefore, this book focuses on UI and

7
Chapter 1 Intro to the “Core” Blender Source Code

geometric modeling, along with the essential modules from Blender (e.g.,
windowmanager, blenloader, etc.). Figure 1-6 shows a listing of the “core”
Blender modules.
For now, realize that modules serving as support for other modules
have an intern subdirectory of their own. There will also be a number
of header files above their intern/, which allow export (inclusion) of the
interface function prototypes. For the module blenloader (Figure 1-7), we
can see this convention in the source tree.

Figure 1-6. The “core” blender modules, showing the entire set
located in source/blender/. The directory layout is split over two
subfigures, left-to-right

In a general sense, the editors module is one of the highest in the


module hierarchy, in that it only calls to lower-level functions. This module’s
contents (each subdirectory being an editor or tool, not to be confused with
source/tools) ties together the support functionality of other modules. We
will explore editors/mesh/ (mesh operators or “tool” code), and editors/
space_view3d/ (an editor “view”), further in subsequent chapters.

8
Chapter 1 Intro to the “Core” Blender Source Code

Figure 1-7. The blenloader module. The intern subdirectory


contains the implementation of its interface and static “internal”
functions. Blenloader’s interface prototypes are located at the same
level as intern/, in C header files. There is a similar layout for all
modules with an API

The Blender CMake Build System


Now let us discuss how Blender makes use of the CMake build system and
how various modules can be included or excluded from a build.

T he Basics
CMake is a “meta” build system, developed by Kitware. By “meta,”
it is implied that CMake acts as an abstraction layer over platform-­
specific build systems, such as autotools or Visual Studio. The official
documentation for CMake is available at https://cmake.org. Kitware
provides a complete description of their scripting language used to write
CMakeLists.txt files there.
The responsibility of CMake is to produce build files for any given
platform which is supported by Blender. CMake uses CMakeLists.txt files
to direct the generation of platform-specific build scripts. For example,
Blender’s CMakeLists.txt files are written to support build script generation
for Linux, Windows, and Mac OS, and for a chosen build script type on that
platform, that is, Visual Studio vs. Makefile on Linux.

9
Chapter 1 Intro to the “Core” Blender Source Code

In Blender’s source tree, a CMakeLists.txt file is provided at the top-­


level (shown in Figure 1-4) as the entry point. There is also a CMakeLists.
txt file above the individual “core” modules (Figure 1-6) and in each of
blender/, creator/, and tools/ (Figure 1-5). There is at least one CMakeLists.
txt file in every module directory (not necessarily one in a module’s
subdirectory, however) directing CMake to include the module’s source
files and headers. For instance, see the CMakeLists.txt file in Figure 1-7, for
the blenloader module.
Listing 1-1 shows an excerpt from the entry-point CMakeLists.txt.
In addition to setting various CMake built-in environment variables
(e.g., CMAKE_BUILD_TYPE_INIT), new ones are defined (here, OpenGL_
GL_PREFERENCE, for instance). Also shown in Listing 1-1 is an inclusion
of a number of modules (externally referenced CMake scripts), located
at ${CMAKE_SOURCE_DIR}/build_files/cmake/Modules and ${CMAKE_
SOURCE_DIR}/build_files/cmake/platform.

Listing 1-1. Excerpt from the repository top-level CMakeLists.txt file3

...
cmake_minimum_required(VERSION 3.5)

# Prever LEGACY OpenGL to eb compatible with all the existing


releases and
# platforms which don't hare GLVND yet. Only do it if
preference was not set
# externally.
if(NOT DEFINED OpenGL_GL_PREFERENCE)
  set(OpenGL_GL_PREFERENCE "LEGACY")
endif()

3
 s this is the first listing in the book, note that each listing is verbatim from the
A
distribution. At times, you will see typos and spelling errors, especially in the
comments from the source. Here, we see that “hare” is a misspelling of “have.” We
do not mention any further typos in the source.

10
Chapter 1 Intro to the “Core” Blender Source Code

if(NOT EXECUTABLE_OUTPUT_PATH)
  set(FIRST_RUN TRUE)
else()
  set(FIRST_RUN FALSE)
endif()

# this starts out unset


list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/
cmake/Modules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/
cmake/platform")

# avoid having empty buildtype


if(NOT DEFINED CMAKE_BUILD_TYPE_INIT)
  set(CMAKE_BUILD_TYPE_INIT "Release")
...

As this book is about “core” Blender development, we focus on the


CMakeLists.txt files that direct the build system for the primary source
code. You should verify that Blender’s build system is more extensive than
the CMakeLists.txt files in the repository’s source/ directory alone.
In Figure 1-8, we see the repository’s build_files/, where “support”
CMake modules for the “core” build system are located. Other types of
build scripts (e.g., bash scripts or Python scripts) are also placed in build_
files/ for things such as downloading and building dependencies either for
the development platform or internal and external libraries (e.g., the ones
in intern/ and extern/ from Figure 1-4).

11
Chapter 1 Intro to the “Core” Blender Source Code

Figure 1-8. The directories in the repository that comprise the build
system. Most of the build system for “core” Blender is in the source/
directory, alongside the source files. We have CMake script support
functions (defined in build_files/ subdirectories) or scripts for
building Blender dependencies

Module Build Options


CMake allows for exclusion of modules and their dependencies. Listing 1-2
has an excerpt from source/blender/CMakeLists.txt, showing modules
that are included always in a build, and then the optional ones. The
WITH_* variables are set by default in source/CMakeLists.txt and can
be reconfigured after running the initial configuration with the cmake
executable.

Listing 1-2. From source/blender/CMakeLists.txt, we see the


“core” modules included by the add_subdirectory() CMake script
function, along with conditional modules near the end of the
snippet
...

add_subdirectory(datatoc)
add_subdirectory(editors)
add_subdirectory(windowmanager)
add_subdirectory(blenkernel)

12
Chapter 1 Intro to the “Core” Blender Source Code

add_subdirectory(blenlib)
add_subdirectory(bmesh)
add_subdirectory(draw)
add_subdirectory(render)
add_subdirectory(blenfont)
add_subdirectory(blentranslation)
add_subdirectory(blenloader)
add_subdirectory(depsgraph)
add_subdirectory(ikplugin)
add_subdirectory(physics)
add_subdirectory(gpu)
add_subdirectory(imbuf)
add_subdirectory(nodes)
add_subdirectory(modifiers)
add_subdirectory(gpencil_modifiers)
add_subdirectory(shader_fx)
add_subdirectory(makesdna)
add_subdirectory(makesrna)

if(WITH_COMPOSITOR)
  add_subdirectory(compositor)
endif()

if(WITH_IMAGE_OPENEXR)
  add_subdirectory(imbuf/intern/openexr)
endif()

if(WITH_OPENIMAGEIO)
  add_subdirectory(imbuf/intern/oiio)
endif()

if(WITH_IMAGE_DDS)
  add_subdirectory(imbuf/intern/dds)
endif()

13
Chapter 1 Intro to the “Core” Blender Source Code

if(WITH_IMAGE_CINEON)
  add_subdirectory(imbuf/intern/cineon)
endif()

if(WITH_CODEC_AVI)
  add_subdirectory(avi)
endif()

if(WITH_PYTHON)
  add_subdirectory(python)
endif()

if(WITH_OPENCOLLADA)
  add_subdirectory(collada)
endif()

if(WITH_FREESTYLE)
  add_subdirectory(freestyle)
endif()

if(WITH_ALEMBIC)
  add_subdirectory(alembic)
endif()

...

You should find it useful to reset some of these options when


configuring your build. Beyond what is shown here, there are more fine-­
grained configurations for builds. CMake actually defines C preprocessor
macros to allow inclusion of individual lines of source code, instead of the
coarser-level “whole” directories we show in Listing 1-2.
It is advisable that when building Blender for the first time, that you
build in debug mode, by setting CMAKE_BUILD_TYPE_INIT to “Debug.” This
can be done through the cmake executable after the initial configuration,
or by changing the source/CMakeLists.txt file itself.

14
Chapter 1 Intro to the “Core” Blender Source Code

A Representative Code Example


Let us commence with exploring the Blender code, by a concrete example.
It will relate UI interaction with the operator code tied to particular UI
events. The purpose of this relatively simple example is to lay some
groundwork for more future descriptions about operators and related
topics.

Geometric Modeling and Operators


We wish to get the “ball rolling,” as it were, by introducing operator
registration and associated callback invocation. Thus, we will trace the
execution path taken by Blender when a user creates a spherical model,
regarding the operator registration for that case.
Operators in Blender are essentially functions (and state) that are
called when they are triggered by the UI. They are more than just a callback
in Blender. We will mostly focus on the callback portion, in our example
trace.
First, let us investigate operator registration. As we are interested in
creating a sphere primitive, an icosphere modeled with polygons, we note
the registration of this operator via MESH_OT_primitive_ico_sphere_
add(). This function is defined in source/blender/editors/mesh/editmesh_
add.c.
The actual registration entails the windowmanager’s WM_
operatortype_append() and wmOperatorType struct. We will eventually
describe these items more specifically further along in the book,
together with naming conventions for module APIs. Relevant now is ED_
operatortypes_mesh(), shown in Figure 1-9 and Listing 1-3.

15
Chapter 1 Intro to the “Core” Blender Source Code

Figure 1-9. During Blender initialization, mesh operators are


registered. The windowmanager module is called from main(),
located in source/creator/creator.c, which subsequently calls the
editor module’s ED_operatortypes_mesh(). The call stack is shown
here (from gdb within the Eclipse IDE). Hexadecimal numbers are the
logical addresses of the functions. These numbers are unimportant
here, and sometimes may be partially abbreviated for clarity

Figure 1-9 exhibits the call stack at the point when ED_operatortypes_
mesh() is executed. This is part of the regular initialization of Blender.
We started in main() from source/creator/creator.c, and then there is a
cascade of calls from the windowmanager module to the editor module,
first starting from WM_init()—that is, the high-level windowmanager
initialization routine. We see in Listing 1-3 a snippet of ED_operatortypes_
mesh().

Listing 1-3. Excerpt from ED_operatortypes_mesh() from source/


blender/editors/mesh/mesh_ops.c. This code snippet shows
operator registration for many of the “primitives” that can be
easily created by either menu or hotkey combinations. MESH_OT_
primitive_ico_sphere_add is a function pointer and is in bold type
/**************************** registration ********************
**************/

16
Chapter 1 Intro to the “Core” Blender Source Code

void ED_operatortypes_mesh(void)
{
  ...
  WM_operatortype_append(MESH_OT_primitive_cone_add);
  WM_operatortype_append(MESH_OT_primitive_grid_add);
  WM_operatortype_append(
                MESH_OT_primitive_monkey_add);
  WM_operatortype_append(
                MESH_OT_primitive_uv_sphere_add);
  WM_operatortype_append(
                MESH_OT_primitive_ico_sphere_add);
  ...

The call to WM_operatortype_append() connects the operator to the


Blender “RNA” system (Listing 1-4). We defer a discussion about Blender
“RNA” until the appropriate chapter, but wm_operatortype_append__
begin() from source/blender/windowmanager/intern/wm_operator_type.c
forms part of this “gluing” process.

Listing 1-4. The WM_operatortype_append() function. This


function calls MESH_OT_primitive_ico_sphere_add() to register the
operator shown in bold type
/* all ops in 1 list (for time being... needs evaluation later) */
void WM_operatortype_append(void (*opfunc)(wmOperatorType *))
{
  wmOperatorType *ot =
         wm_operatortype_append__begin();
opfunc(ot);
  wm_operatortype_append__end(ot);
}

17
Chapter 1 Intro to the “Core” Blender Source Code

Also in WM_operatortype_append(), we call MESH_OT_primitive_ico_


sphere_add(). MESH_OT_primitive_sphere_add() is shown in Listing 1-5.
Notice the wmOperatorType object (referenced by ot) has an exec field.
MESH_OT_primitive_ico_sphere_add() assigns the callback add_
primitive_icosphere_exec() to the wmOperatorType object’s exec field.
There are also other aspects of the operator registration, like setting the
name, description, id name, and other fields of the wmOperatorType struct.

Listing 1-5. MEST_OT_primitive_ico_sphere_add(), an operator


registration function from source/blender/editors/mesh/editmesh_
add.c. Setting the callback for the operator is in bold type
void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot)
{
  /* identifiers */
  ot->name = "Add Ico Sphere";
  ot->description = "Construct an Icosphere mesh";
  ot->idname = "MESH_OT_primitive_ico_sphere_add";

  /* api callbacks */


ot->exec = add_primitive_icosphere_exec;
  ot->poll = ED_operator_scene_editable;

  /* flags */
  ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;

  /* props */
  RNA_def_int(ot->srna, "subdivisions", 2, 1, 10,
"Subdivisions", "", 1, 8);

  ED_object_add_unit_props_radius(ot);
  ED_object_add_mesh_props(ot);
  ED_object_add_generic_props(ot, true);
}

18
Chapter 1 Intro to the “Core” Blender Source Code

Listing 1-6 shows the add_primitive_icosphere_exec() callback


implementation, defined in the same source file as ­MESH_OT_primitive_
ico_sphere_add(). It is declared static, so that only the callback
mechanism (operator) has access to the function.

Listing 1-6. Elided add_primitive_icosphere_exec() callback


function, from source/blender/editors/mesh/editmesh_add.c.
Notice the bContext struct pointer called C, and the call to the
makesrna module via RNA_boolean_get(). These are important
parts of the Blender architecture, for maintaining and conveying
state information
static int add_primitive_icosphere_exec(bContext *C,
wmOperator *op)
{
  MakePrimitiveData creation_data;
  Object *obedit;
  BMEditMesh *em;
  float loc[3], rot[3];
  bool enter_editmode;
  ushort local_view_bits;
  const bool calc_uvs = RNA_boolean_get(op->ptr, "calc_uvs");

  WM_operator_view3d_unit_defaults(C, op);
  ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_
editmode, &local_view_bits, NULL);
  obedit = make_prim_init(C,
                          CTX_DATA_(BLT_I18NCONTEXT_ID_MESH,
"Icosphere"),
                          loc,
                          rot,
                          local_view_bits,
                          &creation_data);

19
Chapter 1 Intro to the “Core” Blender Source Code

  em = BKE_editmesh_from_object(obedit);

  ...

  return OPERATOR_FINISHED;
}

If a user creates an icosphere from the UI, add_primitive_icosphere_


exec() will be called in response. Figure 1-10 shows the call stack for this
scenario.

Figure 1-10. WM_main() is the event loop for Blender, located in


source/blender/windowmanager/intern/wm.c. wm_event_do_
handlers() is the high-level function updating the callback (or
handler) mechanism. We see here that add_primitive_icosphere_
exec() is called after having been registered, and now invoked from
the UI

20
Chapter 1 Intro to the “Core” Blender Source Code

We will not go further into add_primitive_icosphere_exec(), as the


point of this example is to illustrate operator registration and invocation
of a callback (other operators are registered similarly). For the present,
however, notice the interaction with the module makesrna and the
bContext struct called C (Listing 1-6). The global variable named C is
significant.

Blender’s Event Loop


WM_main() contains the event loop for Blender, as shown in Listing 1-7. C,
the same object of type bContext struct as already mentioned, is passed
to each of the high-level update function calls of the event loop. All of these
are wrappers who either collect events, process callbacks based on those
events, or broadcast notifiers based on event processing.
The last routine in the event loop to execute is wm_draw_update().
Once all model data is updated, then the view is updated. Blender is a
Model-View-Controller (MVC) application, and as such, the “model” parts
are updated first, and then the “view.”

Listing 1-7. Blender’s main event loop, called WM_main(), is defined


in source/blender/windowmanager/intern/wm.c
void WM_main(bContext *C)
{
  /* Single refresh before handling events.
   * This ensures we don't run operators before the depsgraph
has been evaluated. */
  wm_event_do_refresh_wm_and_depsgraph(C);

21
Another random document with
no related content on Scribd:
The Project Gutenberg eBook of Alcuin of York
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

Title: Alcuin of York


Lectures delivered in the cathedral church of Bristol in
1907 and 1908

Author: G. F. Browne

Release date: October 18, 2023 [eBook #71904]

Language: English

Original publication: London: Society for Promoting Christian


Knowledge, 1908

Credits: MWS and the Online Distributed Proofreading Team at


https://www.pgdp.net (This file was produced from
images generously made available by The Internet
Archive/American Libraries.)

*** START OF THE PROJECT GUTENBERG EBOOK ALCUIN OF


YORK ***
ALCUIN OF YORK
LECTURES DELIVERED IN THE CATHEDRAL
CHURCH OF BRISTOL IN 1907 AND 1908

BY THE
RIGHT REV. G. F. BROWNE
D.D., D.C.L., F.S.A.
BISHOP OF BRISTOL
FORMERLY DISNEY PROFESSOR OF ART AND ARCHAEOLOGY
IN THE UNIVERSITY OF CAMBRIDGE

WITH ILLUSTRATIONS

PUBLISHED UNDER THE DIRECTION OF THE TRACT COMMITTEE.

LONDON:
SOCIETY FOR PROMOTING CHRISTIAN KNOWLEDGE.
NORTHUMBERLAND AVENUE, W.C.; 43, QUEEN VICTORIA STREET, E.C.
BRIGHTON: 129, North Street.
New York: E. S. Gorham.
1908
PREFACE
No attempt has been made to correct the various forms of many of
the proper names so as to make the spelling uniform. It is true to the
period to leave the curious variations as Alcuin and others wrote
them. In the case of Pope Hadrian, the name has been written
Hadrian and Adrian indiscriminately in the text.
While Alcuin’s style is lucid, his habit of dictating letters hurriedly,
and sending them off without revision if he had a headache, has left
its mark on the letters as we have them. It has seemed better to
leave the difficulties in the English as he left them in the Latin.
The edition used, and the numbering of the Epistles adopted, is
that of Wattenbach and Dümmler, Monumenta Alcuiniana, Berlin
1873, being the sixth volume of the Bibliotheca Rerum
Germanicarum.
CONTENTS
PAGE

CHAPTER I
The authorship of the anonymous Life of Alcuin.—Alcuin’s
Life of his relative Willibrord.—Willibrord at Ripon.—
Alchfrith and Wilfrith.—Alcuin’s conversion.—His studies
under Ecgbert and Albert at the Cathedral School of
York.—Ecgbert’s method of teaching.—Alcuin becomes
assistant master of the School.—Is ordained deacon.—
Becomes head master.—Joins Karl 1
CHAPTER II
Alcuin finally leaves England.—The Adoptionist heresy.—
Alcuin’s retirement to Tours.—His knowledge of secrets.
—Karl and the three kings his sons.—Fire at St. Martin’s,
Tours.—References to the life of St. Martin.—Alcuin’s
writings.—His interview with the devil.—His last days 23
CHAPTER III
The large bulk of Alcuin’s letters and other writings.—The
main dates of his life.—Bede’s advice to Ecgbert.—
Careless lives of bishops.—No parochial system.—
Inadequacy of the bishops’ oversight.—Great
monasteries to be used as sees for new bishoprics, and
evil monasteries to be suppressed.—Election of abbats
and hereditary descent.—Evils of pilgrimages.—Daily
Eucharists 51
CHAPTER IV
The school of York.—Alcuin’s poem on the Bishops and 68
Saints of the Church of York.—The destruction of the
Britons by the Saxons.—Description of Wilfrith II,
Ecgbert, Albert, of York.—Balther and Eata.—Church
building in York.—The Library of York
CHAPTER V
The affairs of Mercia.—Tripartite division of England.—The
creation of a third archbishopric, at Lichfield.—Offa and
Karl.—Alcuin’s letter to Athelhard of Canterbury; to
Beornwin of Mercia.—Karl’s letter to Offa, a commercial
treaty.—Alcuin’s letter to Offa.—Offa’s death 87
CHAPTER VI
Grant to Malmesbury by Ecgfrith of Mercia.—Alcuin’s letters
to Mercia.—Kenulf and Leo III restore Canterbury to its
primatial position.—Gifts of money to the Pope.—
Alcuin’s letters to the restored archbishop.—His letter to
Karl on the archbishop’s proposed visit.—Letters of Karl
to Offa (on a question of discipline) and Athelhard (in
favour of Mercian exiles) 106
CHAPTER VII
List of the ten kings of Northumbria of Alcuin’s time.—
Destruction of Lindisfarne, Wearmouth, and Jarrow, by
the Danes.—Letters of Alcuin on the subject to King
Ethelred, the Bishop and monks of Lindisfarne, and the
monks of Wearmouth and Jarrow.—His letter to the
Bishop and monks of Hexham 122
CHAPTER VIII
Alcuin’s letters to King Eardulf and the banished intruder
Osbald.—His letters to King Ethelred and Ethelred’s
mother.—The Irish claim that Alcuin studied at
Clonmacnoise.—Mayo of the Saxons 140
CHAPTER IX
Alcuin’s letter to all the prelates of England.—To the Bishops 157
of Elmham and Dunwich.—His letters on the election to
the archbishopric of York.—To the new archbishop, and
the monks whom he sent to advise him.—His urgency
that bishops should read Pope Gregory’s Pastoral Care
CHAPTER X
Summary of Alcuin’s work in France.—Adoptionism, Alcuin’s
seven books against Felix and three against Elipandus.
—Alcuin’s advice that a treatise of Felix be sent to the
Pope and three others.—Alcuin’s name dragged into the
controversy on Transubstantiation.—Image-worship.—
The four Libri Carolini and the Council of Frankfurt.—The
bearing of the Libri Carolini on the doctrine of
Transubstantiation 172
CHAPTER XI
Karl and Rome.—His visits to that city.—The offences and
troubles of Leo III.—The coronation of Charlemagne.—
The Pope’s adoration of the Emperor.—Alcuin’s famous
letter to Karl prior to his coronation.—Two great Roman
forgeries, the Donation of Constantine and the Letter of
St. Peter to the Franks 186
CHAPTER XII
Alcuin retires to the Abbey and School of Tours.—Sends to
York for more advanced books.—Begs for old wine from
Orleans.—Karl calls Tours a smoky place.—Fees
charged to the students.—History and remains of the
Abbey Church of St. Martin.—The tombs of St. Martin
and six other Saints.—The Public Library of Tours.—A
famous Book of the Gospels.—St. Martin’s secularised.
—Martinensian bishops 202
CHAPTER XIII
Further details of the Public Library of Tours.—Marmoutier.— 219
The Royal Abbey of Cormery.—Licence of Hadrian I to
St. Martin’s to elect bishops.—Details of the Chapter of
the Cathedral Church of Tours
CHAPTER XIV
Great dispute on right of sanctuary.—Letters of Alcuin on the
subject to his representatives at court and to a bishop.—
The emperor’s severe letter to St. Martin’s.—Alcuin’s
reply.—Verses of the bishop of Orleans on Charlemagne,
Luitgard, and Alcuin 231
CHAPTER XV
Alcuin’s letters to Charlemagne’s sons.—Recension of the
Bible.—The “Alcuin Bible” at the British Museum.—Other
supposed “Alcuin Bibles.”—Anglo-Saxon Forms of
Coronation used at the coronations of French kings 246
CHAPTER XVI
Examples of Alcuin’s style in his letters, allusive, jocose,
playful.—The perils of the Alps.—The vision of
Drithelme.—Letters to Arno.—Bacchus and Cupid 264
CHAPTER XVII
Grammatical questions submitted to Alcuin by Karl.—Alcuin
and Eginhart.—Eginhart’s description of Charlemagne.—
Alcuin’s interest in missions.—The premature exaction of
tithes.—Charlemagne’s elephant Abulabaz.—Figures of
elephants in silk stuffs.—Earliest examples of French
and German.—Boniface’s Abrenuntiatio Diaboli.—Early
Saxon.—The earliest examples of Anglo-Saxon prose
and verse 280
CHAPTER XVIII
Alcuin’s latest days.—His letters mention his ill health.—His
appeals for the prayers of friends, and of strangers.—An
affectionate letter to Charlemagne.—The death scene 298
APPENDICES
A. A letter of Alcuin to Fulda 305
B. The report of the papal legates, George and Theophylact,
on their mission to England 310
C. The original Latin of Alcuin’s suggestion that a treatise by
Felix should be sent to the Pope and three others 319
D. The Donation of Constantine 320
E. Harun Al Raschid and Charlemagne 324
Index 325
LIST OF ILLUSTRATIONS
PAGE
Plate I. St. Martin’s, Tours, before the pillage To face page 210
Plate II. The Tour St. Martin 211
Plate III. The Tour Charlemagne 212
Plate IV. The Tomb of St. Martin 213
Plate V. Some remains of Marmoutier 222
Plate VI. Early capital at Cormery 227
Plate VII. Elephant from robes in the tomb of
Charlemagne 290
Plate VIII. Inscription worked into the above robe 291
Plate IX. Silk stuff of the seventh or eighth
century 292
Plate X. Archbishop Boniface’s form for
renouncing the devil 295
Plate XI. The earliest piece of English prose 296
Plate XII. The earliest piece of English verse 297
ALCUIN OF YORK.
CHAPTER I
The authorship of the anonymous Life of Alcuin.—Alcuin’s Life of his relative
Willibrord.—Willibrord at Ripon.—Alchfrith and Wilfrith.—Alcuin’s conversion.—His
studies under Ecgbert and Albert at the Cathedral School of York.—Ecgbert’s
method of teaching.—Alcuin becomes assistant master of the School.—Is
ordained deacon.—Becomes head master.—Joins Karl.

The only Life of Alcuin which we possess, coming from early


times, was written by a monk who does not give his name, at the
command of an abbat whose name, as also that of his abbey, is not
mentioned by the writer. We have, however, this clue, that the writer
learned his facts from a favourite disciple and priest of Alcuin
himself, by name Sigulf. Sigulf received from Alcuin the pet name of
Vetulus, “little old fellow,” in accordance with the custom of the
literary and friendly circle of which Alcuin was the centre. Alcuin
himself was Flaccus; Karl the King of the Franks, and afterwards
Emperor, was David; and so on. We learn further that the abbat who
assigned to the anonymous monk the task of writing the Life was
himself a disciple of Sigulf. Sigulf succeeded Alcuin as Abbat of
Ferrières; and when he retired on account of old age, he was in turn
succeeded by two of his pupils whom he had brought up as his sons,
Adalbert and Aldric. The Life was written after the death of Benedict
of Aniane, that is, after the year 823. Adalbert had before that date
been succeeded by Aldric, and Aldric became Archbishop of Sens in
the end of 829. The Life was probably written between 823 and 829
by a monk of Ferrières, by order of Aldric. Alcuin had died in 804.
The writer of the Life had never even seen Alcuin; he was in all
probability not a monk of Tours.
That is the view of the German editor Wattenbach as to the
authorship and dedication of the Life. That learned man appears to
have given inadequate weight to the writer’s manner of citing Aldric
as a witness to the truth of a quaint story told in the Life. This is the
story, as nearly as possible in the monk’s words:—
“The man of the Lord [Alcuin himself] had read in his youth the
books of the ancient philosophers and the romances[1] of Vergil,[2]
but he would not in his old age have them read to him or allow others
to read them. The divine poets, he was wont to say, were sufficient
for them, they did not need to be polluted with the luxurious flow of
Vergil’s verse. Against this precept the little old fellow Sigulf tried to
act secretly, and for this he was put to the blush publicly. Calling to
him two youths whom he was bringing up as sons, Adalbert and
Aldric, he bade them read Vergil with him in complete secrecy,
ordering them by no means to let any one know, lest it come to the
ears of Father Albinus [Alcuin]. But Albinus called him in an ordinary
way to come to him, and then said: ‘Where do you come from, you
Vergilian? Why have you planned, contrary to my wish and advice, to
read Vergil?’ Sigulf threw himself at his feet, confessed that he had
acted most foolishly, and declared himself penitent. The pious father
administered a scolding to him, and then accepted the amends he
made, warning him never to do such a thing again. Abbat Aldric, a
man worthy of God, who still survives, testifies that neither he nor
Adalbert had told any one about it; they had been absolutely silent,
as Sigulf had enjoined.”
It seems practically impossible to suppose that the monk would
have put it in this way, if Aldric had been the abbat to whom he
dedicated the Life, or indeed the abbat of his own monastery. It is
clear that the Life was written while Aldric was still an abbat, that is
between 823 and 829; and it seems most probable that it was written
by a monk of some other monastery for his own abbat. Nothing of
importance, however, turns upon this discussion. It is a rather
curious fact, considering the severity of Alcuin’s objection to Vergil
being read in his monastery, that the beautiful copy of Vergil at
Berne, of very early ninth-century date, belonged to St. Martin of
Tours from Carolingian times, and was written there.[3]
Not unnaturally, the Life, written in and for a French monastery,
does not give details of the Northumbrian origin of Alcuin. It makes
only the statement usual in such biographies, that he sprang from a
noble Anglian family. Curiously enough, we get such further details
as we have from a Life of St. Willibrord written by Alcuin himself at
the request of Archbishop Beornrad of Sens, who was Abbat of
Epternach, a monastery of Willibrord’s, from 777 to 797.
“There was,” he writes, “in the province of Northumbria, a father of
a family, by race Saxon, by name Wilgils, who lived a religious life
with his wife and all his house. He had given up the secular life and
entered upon the life of a monk; and when spiritual fervour increased
in him he lived solitary on the promontory which is girt by the ocean
and the river Humber (Spurn Point)[4]. Here he lived long in fasting
and prayer in a little oratory dedicated to St. Andrew[5] the Apostle;
he worked miracles; his name became celebrated. Crowds of people
consulted him; he comforted them with the most sweet admonitions
of the Word of God. His fame became known to the king and great
men of the realm, and they conferred upon him some small
neighbouring properties, so that he might build a church. There he
collected a congregation of servants of God, moderate in size, but
honourable. There, after long labours, he received his crown from
God; and there his body lies buried. His descendants to this day hold
the property by the title of his sanctity. Of them I am the least in merit
and the last in order. I, who write this book of the history of the most
holy father and greatest teacher Willibrord, succeeded to the
government of that small cell by legitimate degrees of descent.”
Inasmuch as the book is dedicated to Beornrad by the humble
Levite (that is, deacon) Alcuin, we learn the very interesting fact that
Alcuin, born in 735, came by hereditary right into possession of the
property got together by Wilgils, whose son Willibrord was born in
657. The dates make it practically almost certain that Wilgils was
born a pagan. Alcuin informs us that he only entered upon marriage
because it was fated that he should be the father of one who should
be for the profit of many peoples. If Willibrord was, as Alcuin’s words
mean, the only child of Wilgils, we must suppose that Alcuin was the
great-great-great-nephew of Wilgils, allowing twenty-five years for a
generation in those short-lived times.
Alcuin three times insists on the lawful hereditary descent of the
ownership and government of a monastery. A second case is in his
preface to this Life of Willibrord. The body of the saint, he says,
“rests in a certain small maritime cell, over which I, though unworthy,
preside by God’s gift in lawful succession.” A third case occurs also
in this Life. “There is,” he says, “in the city of Trèves a monastery[6]
of nuns, which in the times of the blessed Willibrord was visited by a
very severe plague. Many of the handmaids of the Lord were dying
of it; others were lying on their beds enfeebled by a long attack; the
rest were in a state of terror, as fearing the presence of death. Now
there is near that same city the monastery of that holy man, which is
called Aefternac,[7] in which up to this day the saint rests in the body,
while his descendants are known to hold the monastery by legitimate
paternal descent, and by the piety of most pious kings. When the
women of the above-named monastery heard that he was coming to
this monastery of his, they sent messengers begging him to hasten
to them.” He went, as the blessed Peter went to raise Tabitha;
celebrated a mass for the sick; blessed water, and had the houses
sprinkled with it; and sent it to the sick sisters to drink. Needless to
say, they all recovered.
In two of these cases, the two in which Alcuin speaks of his own
property, he uses the word succession, “by legitimate succession” in
the one case, legitima successione, “through legitimate successions”
in the other case, per legitimas successiones, the former no doubt
referring to the succession from his immediate predecessor, the
latter referring to the four, or five, steps in the descent from Wilgils to
Alcuin. In the case of the monastery of Epternach he defines it from
the other end, “from the legitimate handing-down,” traditione ex
legitima, the piety of the most pious kings being called in to confirm
the handing-down.
It is remarkable that Alcuin should thus go out of his way to insist
upon the lawfulness of the hereditary descent of monasteries, when
he knew well that his venerated predecessor Bede, following the
positive principle of the founder of Anglian monasticism in
Northumbria, Benedict Biscop, attributed great evils to such
hereditary succession to the property and governance of
monasteries. We shall see something of this when we come to the
consideration of Bede’s famous letter to Ecgbert, written in or about
the year of Alcuin’s birth.
It is probably not necessary to suppose that Alcuin intends to draw
a distinction between the constitutional practice in Northumbria and
that in the lands ruled by Karl, though it is a marked fact that he
mentions the intervention of kings in the latter case and twice does
not mention it in the former. Bede says so much about the bribes—or
fees—paid to Northumbrian kings and bishops for ratification of first
grants by their signatures, that we can hardly suppose there were no
fees to pay on succession. We cannot press such a point as this in
Alcuin’s Life of Willibrord, for he tells Beornrad in his Preface that he
has been busy with other things all day long, and has only been able
to dictate this book in the retirement of the night; and he urges that
the work should be mercifully judged because he has not had leisure
to polish it. The grammar of this dictated work needs a certain
amount of correction; Alcuin did not always remember with what
construction he had begun a sentence. In these days of dictated
letters he has the sympathy of many in this respect.
Alcuin’s young relative Willibrord was sent away to Ripon, as soon
as he was weaned, to the charge of the brethren there. Alchfrith, the
sub-King of Deira under his father Oswy, had driven out the Irish
monks whom he had at one time patronised at Ripon, and had given
their possessions to Wilfrith. Under the influence of that remarkable
man the little child came, still, in Alcuin’s phrase, only an infantulus.
His father’s purpose in sending him to Ripon was twofold. He was to
be educated in religious study and sacred letters, in a place where
his tender age might be strengthened by vigorous discipline, where
he would see nothing that was not honourable, hear nothing that was
not holy. At Ripon he remained till he was twenty years of age, and
then he passed across to Ireland, to complete his studies under
Ecgbert, the great creator of missionaries. With Ecgbert he spent
twelve years.
Now in the thirty-two years covered by that short narration, from
657 to 689, events of the utmost moment had occurred in
Northumbria, and had mainly centered round Ripon. At the most
critical juncture of these events Bede becomes suddenly silent.
Alfred’s Anglo-Saxon version of Bede goes further, and omits the
bulk of what Bede does say. A few words from Alcuin would have
been of priceless value, and he, writing in France to a Frank, could
have no national or ecclesiastical reason for silence on points which
Bede and Alfred let alone. The whole of the variance between Oswy
and his son and sub-King Alchfrith, on which Bede is determinedly
silent, the only hint of which is preserved to us solely by the noble
runes on the Bewcastle Cross, erected in 670 and still standing,
which bid men pray for the “high sin” of Alchfrith’s soul[8]; the whole
secret of the variance between Oswy and Wilfrith; of Oswy’s refusal
to recognize Wilfrith’s consecration at Paris—with unrivalled
magnificence of pomp—to the episcopal See of York; all this, and
more, is included in the first thirteen years of Willibrord’s life at
Ripon, and Ripon was the pivot of it all. Alcuin has no scintilla of a
hint of anything unusual, not even when he mentions Ecgbert, the
Northumbrian teacher, dwelling in Ireland, of whom we know from
another source that he fled from Northumbria to safety in Ireland
when Alchfrith and Wilfrith lost their power, and Alchfrith presumably
lost his life. It is quite possible that if the head of the Bewcastle
Cross were ever found[9] the runes on it might tell us just what we
want to know. The illustration of this portion of the Cross given in
Gough’s edition of Camden’s Britannia[10] was drawn in 1607, at
which time English scholars could not read runic letters, and
naturally could not copy them with perfect accuracy. Still, it is evident
that the runes stand for rikaes dryhtnaes, apparently meaning ‘of
the kingdom’s lord’, the copyist having failed to notice the mark of
modification in the rune for u, which turned it into y.
Turning now to Alcuin himself, a remarkable story is told in the
Life, evidently and avowedly on his authority. When he was still a
small boy, parvulus, he was regular in attendance at church at the
canonical hours of the day, but very seldom appeared there at night.
What the monastery was in which he passed his earliest years we
are not told; but inasmuch as no break or change is mentioned
between the story to which we now turn and the description of his
more advanced studies, which certainly indicates the Archiepiscopal
School of York, we must understand that York was the scene of this
occurrence.
“When he was eleven years of age, it happened one night that he
and a tonsured rustic, one of the menial monks, that is, were
sleeping on separate pallets in one cell. The rustic did not like being
alone in the night, and as none of the rustics could accommodate
him, he had begged that one of the young students might be sent to
sleep in the cell. The boy Albinus was sent, who was fonder of Vergil
than of Psalms. At cock-crow the warden struck the bell for nocturns,
and the brethren got up for the appointed service. This rustic,
however, only turned round onto his other side, as careless of such
matters, and went on snoring. At the moment when the invitatory
psalm was as usual being sung, with the antiphon, the rustic’s cell
was suddenly filled with horrid spirits, who surrounded his bed, and
said to him, ‘You sleep well, brother.’ That roused him, and they
asked, ‘Why are you snoring here by yourself, while the brethren are
keeping watch in the church?’ He then received a useful flogging, so
that by his amendment a warning might be given to all, and they
might sing, ‘I will remember the years of the right hand of the Most
Highest,’[11] while their eyes prevented the night watches. During the
flogging of the rustic, the noble boy trembled lest the same should
happen to him; and, as he related afterwards, cried from the very
bottom of his heart, ‘O Lord Jesus, if Thou dost now deliver me from
the cruel hands of these evil spirits, and I do not hereafter prove to
be eager for the night watches of Thy Church and the ministry of
praise, and if I any longer love Vergil more than the chanting of
psalms, may I receive a flogging such as this. Only, I earnestly pray,
deliver me, O Lord, now.’ That the lesson might be the more deeply
impressed upon his mind, as soon as by the Lord’s command the
flogging of the rustic ceased, the evil spirits cast their eyes about
here and there, and saw the body and head of the boy most carefully
wrapped up in the bedclothes, scarce taking breath. The leader of
the spirits asked, ‘Who is this other asleep in the cell?’ ‘It is the boy
Albinus,’ they told him, ‘hid away in his bed.’ When the boy found
that he was discovered, he burst into showers of tears; and the more
he had suppressed his cries before, the louder he cried now. They
had all the will to deal unmercifully with him, but they had not the
power. They discussed what they should do with him; but the
sentence of the Lord compelled them to help him to keep the vow

You might also like