Professional Documents
Culture Documents
Full Chapter Core Blender Development Understanding The Essential Source Code Brad E Hollister PDF
Full Chapter Core Blender Development Understanding The Essential Source Code Brad E Hollister PDF
Full Chapter Core Blender Development Understanding The Essential Source Code Brad E Hollister PDF
https://textbookfull.com/product/core-blender-development-
understanding-the-essential-source-code-1st-edition-brad-e-
hollister/
https://textbookfull.com/product/neuroimaging-software-and-
communication-the-social-code-of-source-code-edison-bicudo/
https://textbookfull.com/product/understanding-business-the-
core-1st-edition-william-g-nickels/
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/
https://textbookfull.com/product/essential-angular-for-asp-net-
core-mvc-3-adam-freeman/
https://textbookfull.com/product/write-great-code-understanding-
the-machine-2nd-edition-randall-hyde/
https://textbookfull.com/product/the-blender-python-api-
precision-3d-modeling-and-add-on-development-1st-edition-chris-
conlan/
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
iii
Table of Contents
iv
Table of Contents
v
Table of Contents
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
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.
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.
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).
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
• 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.
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
6
Chapter 1 Intro to the “Core” Blender Source Code
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
8
Chapter 1 Intro to the “Core” Blender Source Code
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
...
cmake_minimum_required(VERSION 3.5)
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()
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
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()
...
14
Chapter 1 Intro to the “Core” Blender Source Code
15
Chapter 1 Intro to the “Core” Blender Source Code
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().
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);
...
17
Chapter 1 Intro to the “Core” Blender Source Code
/* 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
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;
}
20
Chapter 1 Intro to the “Core” Blender Source Code
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.
Author: G. F. Browne
Language: English
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
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.