public class MainLib extends MainLibBase
This class is basically the entry point to all data in a blender file and associated external files (so called libraries). The content of one blender file goes in one main library. While blender can open multiple files, every file gets its own main lib and all main libs are linked to each other.
When initialised, it scans all block headers and searches for structs, which
contain a variable of class ID
as its first member and attaches
them to the appropriate members of the main lib (represented by this class).
This class is also vital to check whether a given blender file is compatible
with the data model associated with this Main lib class (see doVersionCheck(org.cakelab.blender.io.FileVersionInfo)
and {@link #getfileGlobal).
Modifier and Type | Field and Description |
---|---|
static short |
BLENDER_MINSUBVERSION
This is the minimal Blender file sub-version, the generated data model corresponds to.
|
static short |
BLENDER_MINVERSION
This is the minimal Blender file version, the generated data model corresponds to.
|
static java.lang.String |
BLENDER_MINVERSION_STRING
#BLENDER_MINVERSION and _MINSUBVERSION as a String.
|
static short |
BLENDER_SUBVERSION
This is the subversion of blender, the data model was generated from.
|
static short |
BLENDER_VERSION
This is the version of blender, the data model was generated from.
|
static java.lang.String |
BLENDER_VERSION_STRING
#BLENDER_VERSION and _SUBVERSION as a String.
|
blenderFile, blockTable
Constructor and Description |
---|
MainLib(BlenderFile blendFile) |
Modifier and Type | Method and Description |
---|---|
static boolean |
doCompatibilityCheck(FileVersionInfo fileVersionInfo)
This method checks, whether the given blender file complies to the file version range
(see e.g.
|
static boolean |
doVersionCheck(FileVersionInfo fileVersionInfo)
This method checks whether the given file is of the same version
as the generated data model.
|
bAction |
getBAction()
See
bAction for documentation. |
bArmature |
getBArmature()
See
bArmature for documentation. |
bGPdata |
getBGPdata()
See
bGPdata for documentation. |
bNodeTree |
getBNodeTree()
See
bNodeTree for documentation. |
Brush |
getBrush()
See
Brush for documentation. |
bScreen |
getBScreen()
See
bScreen for documentation. |
bSound |
getBSound()
See
bSound for documentation. |
CacheFile |
getCacheFile()
See
CacheFile for documentation. |
Camera |
getCamera()
See
Camera for documentation. |
Curve |
getCurve()
See
Curve for documentation. |
FileGlobal |
getFileGlobal()
Information about the associated file
|
protected CFacade |
getFirst(CFacade libElem)
returns the first library element in the list of ids which the given libElem is a part of.
|
FreestyleLineStyle |
getFreestyleLineStyle()
See
FreestyleLineStyle for documentation. |
Group |
getGroup()
See
Group for documentation. |
IdAdtTemplate |
getIdAdtTemplate()
See
IdAdtTemplate for documentation. |
Image |
getImage()
See
Image for documentation. |
Ipo |
getIpo()
See
Ipo for documentation. |
Key |
getKey()
See
Key for documentation. |
Lamp |
getLamp()
See
Lamp for documentation. |
Lattice |
getLattice()
See
Lattice for documentation. |
Library |
getLibrary()
See
Library for documentation. |
Mask |
getMask()
See
Mask for documentation. |
Material |
getMaterial()
See
Material for documentation. |
Mesh |
getMesh()
See
Mesh for documentation. |
MetaBall |
getMetaBall()
See
MetaBall for documentation. |
MovieClip |
getMovieClip()
See
MovieClip for documentation. |
MainLib |
getNext()
Linkage between main libraries.
|
BlenderObject |
getObject()
See
BlenderObject for documentation. |
PaintCurve |
getPaintCurve()
See
PaintCurve for documentation. |
Palette |
getPalette()
See
Palette for documentation. |
ParticleSettings |
getParticleSettings()
See
ParticleSettings for documentation. |
MainLib |
getPrev()
Linkage between main libraries.
|
Scene |
getScene()
See
Scene for documentation. |
Script |
getScript()
See
Script for documentation. |
Speaker |
getSpeaker()
See
Speaker for documentation. |
Tex |
getTex()
See
Tex for documentation. |
Text |
getText()
See
Text for documentation. |
VFont |
getVFont()
See
VFont for documentation. |
wmWindowManager |
getWmWindowManager()
See
wmWindowManager for documentation. |
World |
getWorld()
See
World for documentation. |
void |
setBAction(bAction bAction)
See
bAction for documentation. |
void |
setBArmature(bArmature bArmature)
See
bArmature for documentation. |
void |
setBGPdata(bGPdata bGPdata)
See
bGPdata for documentation. |
void |
setBNodeTree(bNodeTree bNodeTree)
See
bNodeTree for documentation. |
void |
setBrush(Brush brush)
See
Brush for documentation. |
void |
setBScreen(bScreen bScreen)
See
bScreen for documentation. |
void |
setBSound(bSound bSound)
See
bSound for documentation. |
void |
setCacheFile(CacheFile cacheFile)
See
CacheFile for documentation. |
void |
setCamera(Camera camera)
See
Camera for documentation. |
void |
setCurve(Curve curve)
See
Curve for documentation. |
void |
setFreestyleLineStyle(FreestyleLineStyle freestyleLineStyle)
See
FreestyleLineStyle for documentation. |
void |
setGroup(Group group)
See
Group for documentation. |
void |
setIdAdtTemplate(IdAdtTemplate idAdtTemplate)
See
IdAdtTemplate for documentation. |
void |
setImage(Image image)
See
Image for documentation. |
void |
setIpo(Ipo ipo)
See
Ipo for documentation. |
void |
setKey(Key key)
See
Key for documentation. |
void |
setLamp(Lamp lamp)
See
Lamp for documentation. |
void |
setLattice(Lattice lattice)
See
Lattice for documentation. |
void |
setLibrary(Library library)
See
Library for documentation. |
void |
setMask(Mask mask)
See
Mask for documentation. |
void |
setMaterial(Material material)
See
Material for documentation. |
void |
setMesh(Mesh mesh)
See
Mesh for documentation. |
void |
setMetaBall(MetaBall metaBall)
See
MetaBall for documentation. |
void |
setMovieClip(MovieClip movieClip)
See
MovieClip for documentation. |
void |
setObject(BlenderObject object)
See
BlenderObject for documentation. |
void |
setPaintCurve(PaintCurve paintCurve)
See
PaintCurve for documentation. |
void |
setPalette(Palette palette)
See
Palette for documentation. |
void |
setParticleSettings(ParticleSettings particleSettings)
See
ParticleSettings for documentation. |
void |
setScene(Scene scene)
See
Scene for documentation. |
void |
setScript(Script script)
See
Script for documentation. |
void |
setSpeaker(Speaker speaker)
See
Speaker for documentation. |
void |
setTex(Tex tex)
See
Tex for documentation. |
void |
setText(Text text)
See
Text for documentation. |
void |
setVFont(VFont vFont)
See
VFont for documentation. |
void |
setWmWindowManager(wmWindowManager wmWindowManager)
See
wmWindowManager for documentation. |
void |
setWorld(World world)
See
World for documentation. |
isLibraryElement
public static final short BLENDER_VERSION
public static final short BLENDER_SUBVERSION
public static final short BLENDER_MINVERSION
BLENDER_VERSION
,
Constant Field Valuespublic static final short BLENDER_MINSUBVERSION
BLENDER_SUBVERSION
,
Constant Field Valuespublic static final java.lang.String BLENDER_VERSION_STRING
BLENDER_VERSION
,
BLENDER_SUBVERSION
,
Constant Field Valuespublic static final java.lang.String BLENDER_MINVERSION_STRING
public MainLib(BlenderFile blendFile) throws java.io.IOException
java.io.IOException
public static boolean doVersionCheck(FileVersionInfo fileVersionInfo) throws java.io.IOException
BlenderFile.readFileGlobal()
.java.io.IOException
public static boolean doCompatibilityCheck(FileVersionInfo fileVersionInfo) throws java.io.IOException
source/blender/blenloader/intern/versioning_*.c
. These functions
are not implemeted in Java .Blend.
You can get file version info from BlenderFile.readFileGlobal()
.java.io.IOException
#readFileGlobal
,
doVersionCheck(org.cakelab.blender.io.FileVersionInfo)
protected CFacade getFirst(CFacade libElem) throws java.io.IOException
getFirst
in class MainLibBase
java.io.IOException
public MainLib getNext()
public MainLib getPrev()
public FileGlobal getFileGlobal()
public BlenderObject getObject()
BlenderObject
for documentation.public void setObject(BlenderObject object)
BlenderObject
for documentation.public PaintCurve getPaintCurve()
PaintCurve
for documentation.public void setPaintCurve(PaintCurve paintCurve)
PaintCurve
for documentation.public ParticleSettings getParticleSettings()
ParticleSettings
for documentation.public void setParticleSettings(ParticleSettings particleSettings)
ParticleSettings
for documentation.public wmWindowManager getWmWindowManager()
wmWindowManager
for documentation.public void setWmWindowManager(wmWindowManager wmWindowManager)
wmWindowManager
for documentation.public IdAdtTemplate getIdAdtTemplate()
IdAdtTemplate
for documentation.public void setIdAdtTemplate(IdAdtTemplate idAdtTemplate)
IdAdtTemplate
for documentation.public FreestyleLineStyle getFreestyleLineStyle()
FreestyleLineStyle
for documentation.public void setFreestyleLineStyle(FreestyleLineStyle freestyleLineStyle)
FreestyleLineStyle
for documentation.