robofab.objects.properties (version 0.1)
index
/Users/tal/robofab/projects/robofab/Lib/robofab/objects/properties.py

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
 
W A R N I N G
 
This is work in progress, a fast moving target.
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

 
Classes
       
robofab.objects.objectsBase.RBaseObject(__builtin__.object)
BaseGlyphProperties
GlyphProperties
BasePropertyItem
BaseAxis
Axis
BaseInstanceFactory
InstanceFactory
BaseLayer
Layer

 
class Axis(BaseAxis)
    
Method resolution order:
Axis
BaseAxis
BasePropertyItem
robofab.objects.objectsBase.RBaseObject
__builtin__.object

Methods defined here:
findSegment(self, factor)
getGlyphNames(self)
Make a list of glyph names needed by this axis.
interpolate(self, glyphs, factor)

Methods inherited from BaseAxis:
__repr__(self)
write(self)

Methods inherited from BasePropertyItem:
__init__(self, name, data)

Methods inherited from robofab.objects.objectsBase.RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
__dict__ = <dictproxy object at 0x4ceb890>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseAxis(BasePropertyItem)
    Base for a complete interpolation axis which contains one or more segments.
Each segment is an interpolation between two masters. An axis can therefor
contain inbetween masters. For instance:
        light -> regular ->black,
or even discontinuous designs. For instance:
        light.barreddollar-> regular.barreddollar -> bold.barreddollar/bold.nobardollar -> black.nobardollar
 
 
Method resolution order:
BaseAxis
BasePropertyItem
robofab.objects.objectsBase.RBaseObject
__builtin__.object

Methods defined here:
__repr__(self)
write(self)

Methods inherited from BasePropertyItem:
__init__(self, name, data)
getGlyphNames(self)
Make a list of needed glyphs for this property.

Methods inherited from robofab.objects.objectsBase.RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
__dict__ = <dictproxy object at 0x4ceb130>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseGlyphProperties(robofab.objects.objectsBase.RBaseObject)
    Base for a container of all glyph properties. Reads and writes to a plistable dict.
In order to make it easy to store different classes of objects in GlyphProperties,
the class of object is determined by the data read from the plist.
 
 
Method resolution order:
BaseGlyphProperties
robofab.objects.objectsBase.RBaseObject
__builtin__.object

Methods defined here:
__init__(self, data)
__repr__(self)
asDict(self)
Export the properties back to plist-ready dict. 
Ask each of the property instances to export themselves.
fromDict(self, data)
Read the dict and try to match the keys with classes.
Make a new instance for each entry. Keep a list of which 
items come from the data, to make exporting easier.
isEmpty(self)

Methods inherited from robofab.objects.objectsBase.RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
__dict__ = <dictproxy object at 0x4cebb70>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseInstanceFactory(BasePropertyItem)
    Base for information about making an instance by interpolation, assembly, trickery.
 
 
Method resolution order:
BaseInstanceFactory
BasePropertyItem
robofab.objects.objectsBase.RBaseObject
__builtin__.object

Methods defined here:
__repr__(self)
write(self)

Methods inherited from BasePropertyItem:
__init__(self, name, data)
getGlyphNames(self)
Make a list of needed glyphs for this property.

Methods inherited from robofab.objects.objectsBase.RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
__dict__ = <dictproxy object at 0x4ceb170>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseLayer(BasePropertyItem)
    Base for a description of a layer. Can be for coloring, layering, whatever.
 
 
Method resolution order:
BaseLayer
BasePropertyItem
robofab.objects.objectsBase.RBaseObject
__builtin__.object

Methods defined here:
__repr__(self)
needGlyphs(self)
Make a list of needed glyphs for this property.
write(self)

Methods inherited from BasePropertyItem:
__init__(self, name, data)
getGlyphNames(self)
Make a list of needed glyphs for this property.

Methods inherited from robofab.objects.objectsBase.RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
__dict__ = <dictproxy object at 0x4cebf50>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BasePropertyItem(robofab.objects.objectsBase.RBaseObject)
    A base class for one specific glyph property. Methods for reading and writing a plistable dict.
 
 
Method resolution order:
BasePropertyItem
robofab.objects.objectsBase.RBaseObject
__builtin__.object

Methods defined here:
__init__(self, name, data)
__repr__(self)
getGlyphNames(self)
Make a list of needed glyphs for this property.
write(self)
Write this property in a plist ready format

Methods inherited from robofab.objects.objectsBase.RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
__dict__ = <dictproxy object at 0x4ceb1b0>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class GlyphProperties(BaseGlyphProperties)
    Container of all glyph properties.  These are things like interpolation axes, layer information, etc.
 
 
Method resolution order:
GlyphProperties
BaseGlyphProperties
robofab.objects.objectsBase.RBaseObject
__builtin__.object

Methods defined here:
__init__(self, data=None)
getAxesGlyphNames(self)
# methods that deal with axes
getAxesNames(self)
getAxis(self, axisName)
getAxisGlyphs(self, axisName, nested=0)
getGlyph(self, glyphName, nested=0)
Retrieve a glyph, either from the parent glyphset or from one of the instanceFactories.
Keeps a count of nested calls, a requested glyph might possibly come from an instanceFactory which
requires the same glyph. Recursive glyph dependencies are obviously illegal,
but we need to be able to warn the user when the data is wrong.
getInstanceFactories(self)
getInstanceFactoryGlyphNames(self)
getLayer(self, layerName)
getLayersGlyphNames(self)
getLayersNames(self)
# methods that deal with layers
getNamesSyntheticGlyphs(self)
# methods that deal with factories
makeInstances(self)
Make all instances defined by all instanceFactories in this GlyphProperties object.

Methods inherited from BaseGlyphProperties:
__repr__(self)
asDict(self)
Export the properties back to plist-ready dict. 
Ask each of the property instances to export themselves.
fromDict(self, data)
Read the dict and try to match the keys with classes.
Make a new instance for each entry. Keep a list of which 
items come from the data, to make exporting easier.
isEmpty(self)

Methods inherited from robofab.objects.objectsBase.RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
__dict__ = <dictproxy object at 0x4ceb2b0>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class InstanceFactory(BaseInstanceFactory)
    
Method resolution order:
InstanceFactory
BaseInstanceFactory
BasePropertyItem
robofab.objects.objectsBase.RBaseObject
__builtin__.object

Methods defined here:
__init__(self, name, data=None)
getActions(self)
Return a list of the specified actions.
makeInstance(self, nested=0)
Execute all the actions and generate a new glyph.
supportedActions(self)
Return a list of all actions that are supported in this factory.

Methods inherited from BaseInstanceFactory:
__repr__(self)
write(self)

Methods inherited from BasePropertyItem:
getGlyphNames(self)
Make a list of needed glyphs for this property.

Methods inherited from robofab.objects.objectsBase.RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
__dict__ = <dictproxy object at 0x4ceb650>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class Layer(BaseLayer)
    
Method resolution order:
Layer
BaseLayer
BasePropertyItem
robofab.objects.objectsBase.RBaseObject
__builtin__.object

Methods inherited from BaseLayer:
__repr__(self)
needGlyphs(self)
Make a list of needed glyphs for this property.
write(self)

Methods inherited from BasePropertyItem:
__init__(self, name, data)
getGlyphNames(self)
Make a list of needed glyphs for this property.

Methods inherited from robofab.objects.objectsBase.RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
__dict__ = <dictproxy object at 0x4ceb850>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
Functions
       
makeAttrName(className)

 
Data
        __version__ = '0.1'