2002-10-12 13:37:38 +02:00
|
|
|
/**
|
|
|
|
* blenlib/BKE_main.h (mar-2001 nzc)
|
|
|
|
*
|
|
|
|
* Main is the root of the 'database' of a Blender context. All data
|
|
|
|
* is stuffed into lists, and all these lists are knotted to here. A
|
|
|
|
* Blender file is not much more but a binary dump of these
|
|
|
|
* lists. This list of lists is not serialized itself.
|
|
|
|
*
|
|
|
|
* Oops... this should be a _types.h file.
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
2008-01-07 20:13:47 +01:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
2002-10-12 13:37:38 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2008-01-07 20:13:47 +01:00
|
|
|
* of the License, or (at your option) any later version.
|
2002-10-12 13:37:38 +02:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
*
|
|
|
|
* Contributor(s): none yet.
|
|
|
|
*
|
2008-01-07 20:13:47 +01:00
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
2002-10-12 13:37:38 +02:00
|
|
|
*/
|
|
|
|
#ifndef BKE_MAIN_H
|
|
|
|
#define BKE_MAIN_H
|
|
|
|
|
|
|
|
#include "DNA_listBase.h"
|
|
|
|
|
|
|
|
struct Library;
|
|
|
|
|
|
|
|
typedef struct Main {
|
|
|
|
struct Main *next, *prev;
|
2008-03-30 18:18:01 +02:00
|
|
|
char name[240];
|
2006-11-26 22:17:15 +01:00
|
|
|
short versionfile, subversionfile;
|
|
|
|
short minversionfile, minsubversionfile;
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
struct Library *curlib;
|
|
|
|
ListBase scene;
|
|
|
|
ListBase library;
|
|
|
|
ListBase object;
|
|
|
|
ListBase mesh;
|
|
|
|
ListBase curve;
|
|
|
|
ListBase mball;
|
|
|
|
ListBase mat;
|
|
|
|
ListBase tex;
|
|
|
|
ListBase image;
|
|
|
|
ListBase wave;
|
|
|
|
ListBase latt;
|
|
|
|
ListBase lamp;
|
|
|
|
ListBase camera;
|
2009-01-18 11:41:45 +01:00
|
|
|
ListBase ipo; // XXX depreceated
|
2002-10-12 13:37:38 +02:00
|
|
|
ListBase key;
|
|
|
|
ListBase world;
|
|
|
|
ListBase screen;
|
2003-12-14 02:18:09 +01:00
|
|
|
ListBase script;
|
2002-10-12 13:37:38 +02:00
|
|
|
ListBase vfont;
|
|
|
|
ListBase text;
|
|
|
|
ListBase sound;
|
|
|
|
ListBase group;
|
Orange: more noodle updates!
**** NEW: Group Nodes
Node trees usually become messy and confusing quickly, so we need
not only a way to collapse Nodes into single 'groups', but also a
way to re-use that data to create libraries of effects.
This has been done by making a new Library data type, the NodeTree.
Everything that has been grouped is stored here, and available for
re-use, appending or linking. These NodeTrees are fully generic,
i.e. can store shader trees, composit trees, and so on. The 'type'
value as stored in the NodeTree will keep track of internal type
definitions and execute/drawing callbacks. Needless to say, re-using
shader trees in a composit tree is a bit useless, and will be
prevented in the browsing code. :)
So; any NodeTree can become a "Goup Node" inside in a NodeTree. This
Group Node then works just like any Node.
To prevent the current code to become too complex, I've disabled
the possibility to insert Groups inside of Groups. That might be
enabled later, but is a real nasty piece of code to get OK.
Since Group Nodes are a dynamic Node type, a lot of work has been
done to ensure Node definitions can be dynamic too, but still allow
to be stored in files, and allow to be verified for type-definition
changes on reloading. This system needs a little bit maturing still,
so the Python gurus should better wait a little bit! (Also for me to
write the definite API docs for it).
What works now:
- Press CTRL+G to create a new Group. The grouping code checks for
impossible selections (like an unselected node between selected nodes).
Everthing that's selected then gets removed from the current tree, and
inserted in a new NodeTree library data block. A Group Node then is
added which links to this new NodeTree.
- Press ALT+G to ungroup. This will not delete the NodeTree library
data, but just duplicate the Group into the current tree.
- Press TAB, or click on the NodeTree icon to edit Groups. Note that
NodeTrees are instances, so editing one Group will also change the
other users.
This also means that when removing nodes in a Group (or hiding sockets
or changing internal links) this is immediately corrected for all users
of this Group, also in other Materials.
- While editing Groups, only the internal Nodes can be edited. A single
click outside of the Group boundary will close this 'edit mode'.
What needs to be done:
- SHIFT+A menu in toolbox style, also including a list of Groups
- Enable the single-user button in the Group Node
- Displaying all (visible) internal group UI elements in the Node Panel
- Enable Library linking and prevent editing of Groups then.
**** NEW: Socket Visibility control
Node types will be generated with a lot of possible inputs or outputs,
and drawing all sockets all the time isn't very useful then.
A new option in the Node header ('plus' icon) allows to either hide all
unused sockets (first keypress) or to reveil them (when there are hidden
sockets, the icon displays black, otherwise it's blended).
Hidden sockets in Nodes also are not exported to a Group, so this way
you can control what options (in/outputs) exactly are available.
To be done:
- a way to hide individual sockets, like with a RMB click on it.
**** NEW: Nodes now render!
This is still quite primitive, more on a level to replace the (now
obsolete and disabled) Material Layers.
What needs to be done:
- make the "Geometry" node work properly, also for AA textures
- make the Texture Node work (does very little at the moment)
- give Material Nodes all inputs as needed (like Map-to Panel)
- find a way to export more data from a Material Node, like the
shadow value, or light intensity only, etc
Very important also to separate from the Material Buttons the
"global" options, like "Ztransp" or "Wire" or "Halo". These can not
be set for each Material-Node individually.
Also note that the Preview Render (Buttons window) now renders a bit
differently. This was a horrid piece of antique code, using a totally
incompatible way of rendering. Target is to fully re-use internal
render code for previews.
OK... that's it mostly. Now test!
2006-01-02 14:06:05 +01:00
|
|
|
ListBase armature;
|
|
|
|
ListBase action;
|
|
|
|
ListBase nodetree;
|
Brush Datablock:
- Added a new Brush datablock, only used by image paint, but intended
to be used in texture paint, vertex paint, weight paint and sculpt
mode also.
- Being a datablock, these brushes can be saved, appended and linked.
They have a fake user by default, to make sure they are saved even if
not selected.
Image Painting:
- Replaced the img module with C code in imagepaint.c
- Airbrush is no longer a separate tool, but rather an option that can
be used for soften, smear and clone also.
- Blend modes mix, add, subtract, multiply, darken and lighten have been
added, code taken directly from vertex paint.
Note to project files maintainers:
- The img module was removed from SCons and Makefiles, and this should
be done in other build systems also. I'll wait to remove the module
from cvs, to not break compilation.
2006-07-27 00:29:23 +02:00
|
|
|
ListBase brush;
|
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 23:09:57 +01:00
|
|
|
ListBase particle;
|
2007-12-24 19:38:03 +01:00
|
|
|
ListBase wm;
|
2.5
Patch from Joshua, converting Grease Pencil to 2.5.
All GP data now is an ID block, allowing re-use, link and append.
For better contextual control within 2.5, these GP ID's will get
linked to actual data, like NodeTrees, Scenes, Images or Objects.
That will ensure Undo works, and opens up exciting new use cases
as well. :)
Patch note: on reading files, GPencils linked from editors will
get moved to the main library, using standard naming (indicating
where it was used), and with "Fake User" set. That way the user
can manually relink the pencils where appropriate.
We can check on just linking GP to some default, like 3d window
pencils to Scene? Nice to experiment with.
Notes for Joshua:
- for reading old GPencil, it has to use old code as well, meaning
to tread data as "indirect data, within another ID".
- Saving ID data means the chunk in file BHead needs the ID_GD code,
and not "DATA", which indicates 'indirect data'. That's the file
format spec.
- I've added do_versions_gpencil_2_50(), feel free to further tweak
things here, like linking things to scene or so.
- Formerly GPencil saved 2.50 files won't convert gpencil
2009-04-20 12:13:55 +02:00
|
|
|
ListBase gpencil;
|
2002-10-12 13:37:38 +02:00
|
|
|
} Main;
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
2002-10-30 03:07:20 +01:00
|
|
|
|